diff --git a/src/index.js b/src/index.js index f68873b7f..01beb9152 100644 --- a/src/index.js +++ b/src/index.js @@ -148,7 +148,7 @@ export { // Modules: layoutUiRules -export { getAvailableAxes } from './modules/layoutUiRules' +export { getAvailableAxes, getDisallowedDims } from './modules/layoutUiRules' // Visualizations diff --git a/src/modules/layoutUiRules/index.js b/src/modules/layoutUiRules/index.js index 24c122c3b..17cd01d9a 100644 --- a/src/modules/layoutUiRules/index.js +++ b/src/modules/layoutUiRules/index.js @@ -1,5 +1,11 @@ -import { getAvailableAxesByRules } from './rulesHelper' +import { + getAvailableAxesByRules, + getDisallowedDimsByRules, +} from './rulesHelper' import { getRulesByVisType } from './rules' export const getAvailableAxes = visType => getAvailableAxesByRules(getRulesByVisType(visType)) + +export const getDisallowedDims = visType => + getDisallowedDimsByRules(getRulesByVisType(visType)) diff --git a/src/modules/layoutUiRules/rulesHelper.js b/src/modules/layoutUiRules/rulesHelper.js index 26f4dac10..0139dbb87 100644 --- a/src/modules/layoutUiRules/rulesHelper.js +++ b/src/modules/layoutUiRules/rulesHelper.js @@ -1,3 +1,5 @@ export const getAvailableAxesByRules = rules => rules.availableAxes || [] +export const getDisallowedDimsByRules = rules => rules.disallowedDims || [] + // TODO: implement all rules