@qrvey/utils 1.5.0 → 1.6.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/column_format/helpers/columnTypeByChart.d.ts +1 -1
- package/dist/cjs/column_format/helpers/defineXYChartFormat.js +9 -2
- package/dist/cjs/column_format/interfaces/IChartColumn.d.ts +2 -0
- package/dist/cjs/columns/constants/COLUMN.d.ts +1 -0
- package/dist/cjs/columns/constants/COLUMN.js +1 -0
- package/dist/cjs/columns/constants/COLUMNS.js +1 -0
- package/dist/cjs/columns/constants/COLUMN_INFO.js +7 -0
- package/dist/cjs/columns/constants/COLUMN_INFO_LIST.js +1 -0
- package/dist/cjs/columns/constants/COLUMN_LABEL.d.ts +1 -0
- package/dist/cjs/columns/constants/COLUMN_LABEL.js +1 -1
- package/dist/cjs/columns/constants/COLUMN_PROPERTY_INFO.js +1 -1
- package/dist/cjs/columns/constants/COLUMN_PROPERTY_LABEL.d.ts +4 -0
- package/dist/cjs/columns/constants/COLUMN_PROPERTY_LABEL.js +2 -1
- package/dist/cjs/columns/interfaces/IColumnTimeGroupSettings.d.ts +7 -0
- package/dist/cjs/{filters/interfaces/builder/IFilterBuilderSettingsScopes.js → columns/interfaces/IColumnTimeGroupSettings.js} +0 -0
- package/dist/cjs/dates/adapters/hmsToDate.d.ts +7 -0
- package/dist/cjs/dates/adapters/hmsToDate.js +24 -0
- package/dist/cjs/dates/adapters/index.d.ts +1 -0
- package/dist/cjs/dates/adapters/index.js +1 -0
- package/dist/cjs/dates/constants/TIME_GROUPING_PROPERTY_INFO.d.ts +5 -0
- package/dist/cjs/dates/constants/TIME_GROUPING_PROPERTY_INFO.js +31 -0
- package/dist/cjs/dates/constants/TIME_GROUPING_PROPERTY_INFO_LIST.d.ts +2 -0
- package/dist/cjs/dates/constants/TIME_GROUPING_PROPERTY_INFO_LIST.js +10 -0
- package/dist/cjs/dates/constants/TIME_GROUPING_PROPERTY_LABEL.d.ts +5 -0
- package/dist/cjs/dates/constants/TIME_GROUPING_PROPERTY_LABEL.js +9 -0
- package/dist/cjs/dates/constants/index.d.ts +3 -0
- package/dist/cjs/dates/constants/index.js +3 -0
- package/dist/cjs/filters/constants/index.d.ts +1 -0
- package/dist/cjs/filters/constants/index.js +1 -0
- package/dist/cjs/filters/constants/settings/FILTER_SETTINGS_DEFAULT.d.ts +3 -0
- package/dist/cjs/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +239 -0
- package/dist/cjs/filters/constants/settings/index.d.ts +1 -0
- package/dist/cjs/filters/constants/settings/index.js +17 -0
- package/dist/cjs/filters/helpers/backend/getBackendGroupValue.js +3 -1
- package/dist/cjs/filters/helpers/backend/getBackendProperty.js +2 -1
- package/dist/cjs/filters/helpers/backend/getLogicByDatasets.js +4 -3
- package/dist/cjs/filters/helpers/index.d.ts +1 -0
- package/dist/cjs/filters/helpers/index.js +1 -0
- package/dist/cjs/filters/helpers/settings/areMultipleScopesByProperties.d.ts +9 -0
- package/dist/cjs/filters/helpers/settings/areMultipleScopesByProperties.js +24 -0
- package/dist/cjs/filters/helpers/settings/areMultipleScopesByProperty.d.ts +8 -0
- package/dist/cjs/filters/helpers/settings/areMultipleScopesByProperty.js +20 -0
- package/dist/cjs/filters/helpers/settings/getFilterSettings.d.ts +13 -0
- package/dist/cjs/filters/helpers/settings/getFilterSettings.js +331 -0
- package/dist/cjs/filters/helpers/settings/getScopeColorSetting.d.ts +9 -0
- package/dist/cjs/filters/helpers/settings/getScopeColorSetting.js +19 -0
- package/dist/cjs/filters/helpers/settings/getScopeSettings.d.ts +10 -0
- package/dist/cjs/filters/helpers/settings/getScopeSettings.js +17 -0
- package/dist/cjs/filters/helpers/settings/getScopesSettings.d.ts +8 -0
- package/dist/cjs/filters/helpers/settings/getScopesSettings.js +15 -0
- package/dist/cjs/filters/helpers/settings/getScopesToDisplay.d.ts +8 -0
- package/dist/cjs/filters/helpers/settings/getScopesToDisplay.js +16 -0
- package/dist/cjs/filters/helpers/settings/index.d.ts +9 -0
- package/dist/cjs/filters/helpers/settings/index.js +25 -0
- package/dist/cjs/filters/helpers/settings/isLeastSingleScopeByProperties.d.ts +9 -0
- package/dist/cjs/filters/helpers/settings/isLeastSingleScopeByProperties.js +24 -0
- package/dist/cjs/filters/helpers/settings/isLeastSingleScopeByProperty.d.ts +8 -0
- package/dist/cjs/filters/helpers/settings/isLeastSingleScopeByProperty.js +20 -0
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderConfig.d.ts +2 -0
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderSettings.d.ts +0 -3
- package/dist/cjs/filters/interfaces/builder/index.d.ts +0 -1
- package/dist/cjs/filters/interfaces/builder/index.js +0 -1
- package/dist/cjs/filters/interfaces/common/IFSDataStore.d.ts +3 -5
- package/dist/cjs/filters/interfaces/index.d.ts +1 -0
- package/dist/cjs/filters/interfaces/index.js +1 -0
- package/dist/cjs/filters/interfaces/panel/IFilterPanelConfig.d.ts +4 -0
- package/dist/cjs/filters/interfaces/panel/index.d.ts +0 -20
- package/dist/cjs/filters/interfaces/panel/index.js +0 -20
- package/dist/cjs/filters/interfaces/settings/IFSettings.d.ts +19 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettings.js → settings/IFSettings.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsChartBuilder.d.ts +5 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanel.js → settings/IFSettingsChartBuilder.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterBuilder.d.ts +7 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBody.js → settings/IFSettingsFilterBuilder.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterDisplayer.d.ts +8 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyDataset.js → settings/IFSettingsFilterDisplayer.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterPanel.d.ts +18 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyDatasetHeader.js → settings/IFSettingsFilterPanel.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterPanelBody.d.ts +13 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyFilter.js → settings/IFSettingsFilterPanelBody.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterPanelBodyDataset.d.ts +9 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyFilterMenu.js → settings/IFSettingsFilterPanelBodyDataset.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterPanelBodyFilter.d.ts +11 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyOperator.js → settings/IFSettingsFilterPanelBodyFilter.js} +0 -0
- package/dist/{filters/interfaces/panel/IFPSettingsFilterPanelBodyFilterMenu.d.ts → cjs/filters/interfaces/settings/IFSettingsFilterPanelBodyFilterMenu.d.ts} +5 -2
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScope.js → settings/IFSettingsFilterPanelBodyFilterMenu.js} +0 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyOperator.d.ts → settings/IFSettingsFilterPanelBodyOperator.d.ts} +1 -1
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScopeBody.js → settings/IFSettingsFilterPanelBodyOperator.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterPanelBodyScope.d.ts +8 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScopeHeader.js → settings/IFSettingsFilterPanelBodyScope.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterPanelHeader.d.ts +13 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScopeScope.js → settings/IFSettingsFilterPanelHeader.js} +0 -0
- package/dist/{filters/interfaces/panel/IFPSettingsFilterPanelHeaderMenu.d.ts → cjs/filters/interfaces/settings/IFSettingsFilterPanelHeaderMenu.d.ts} +4 -2
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScopeScopeBody.js → settings/IFSettingsFilterPanelHeaderMenu.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterPanelSettings.d.ts +16 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScopeScopeHeader.js → settings/IFSettingsFilterPanelSettings.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsPanel.d.ts +11 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelHeader.js → settings/IFSettingsPanel.js} +0 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsPanelView.d.ts → settings/IFSettingsPanelView.d.ts} +0 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelHeaderMenu.js → settings/IFSettingsPanelView.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsScope.d.ts +20 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelSettings.js → settings/IFSettingsScope.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsScopeHeader.d.ts +9 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsFilterPanelSettingsScope.js → settings/IFSettingsScopeHeader.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsScopeInteraction.d.ts +13 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsGeneral.js → settings/IFSettingsScopeInteraction.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsScopes.d.ts +8 -0
- package/dist/cjs/filters/interfaces/{panel/IFPSettingsPanelView.js → settings/IFSettingsScopes.js} +0 -0
- package/dist/cjs/filters/interfaces/settings/index.d.ts +19 -0
- package/dist/cjs/filters/interfaces/settings/index.js +35 -0
- package/dist/cjs/filters/interfaces/ui/IFUDataStore.d.ts +2 -2
- package/dist/cjs/filters/services/UChartApi.js +6 -2
- package/dist/cjs/filters/services/UChartPaginationApi.js +6 -2
- package/dist/cjs/format/definition.d.ts +1 -0
- package/dist/cjs/format/definition.js +2 -1
- package/dist/cjs/format/format.d.ts +12 -0
- package/dist/cjs/format/format.js +32 -4
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderFormatValues.d.ts +11 -10
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderShelfMenu.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/common/II18nColumnProperties.d.ts +3 -0
- package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/common/II18nTokenMode.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/common/II18nTokenMode.js +2 -0
- package/dist/cjs/globalization/interfaces/common/II18nTooltipForTokenMode.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/common/II18nTooltipForTokenMode.js +2 -0
- package/dist/cjs/globalization/interfaces/panel/II18nPanelErrors.d.ts +1 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +11 -10
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +1 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +1 -1
- package/dist/cjs/globalization/labels/common/I18N_COLUMN_LABEL.d.ts +1 -0
- package/dist/cjs/globalization/labels/common/I18N_COLUMN_LABEL.js +1 -0
- package/dist/cjs/globalization/labels/common/I18N_COLUMN_PROPERTY_LABEL.js +3 -0
- package/dist/cjs/globalization/labels/common/I18N_COMMON.js +6 -0
- package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +1 -0
- package/dist/cjs/qrvey/helpers/transformValue.js +5 -0
- package/dist/cjs/typescript/DeepRequired.d.ts +3 -0
- package/dist/cjs/typescript/DeepRequired.js +2 -0
- package/dist/cjs/typescript/index.d.ts +1 -0
- package/dist/cjs/typescript/index.js +1 -0
- package/dist/column_format/helpers/columnTypeByChart.d.ts +1 -1
- package/dist/column_format/helpers/defineXYChartFormat.js +9 -2
- package/dist/column_format/interfaces/IChartColumn.d.ts +2 -0
- package/dist/columns/constants/COLUMN.d.ts +1 -0
- package/dist/columns/constants/COLUMN.js +1 -0
- package/dist/columns/constants/COLUMNS.js +1 -0
- package/dist/columns/constants/COLUMN_INFO.js +7 -0
- package/dist/columns/constants/COLUMN_INFO_LIST.js +1 -0
- package/dist/columns/constants/COLUMN_LABEL.d.ts +1 -0
- package/dist/columns/constants/COLUMN_LABEL.js +1 -1
- package/dist/columns/constants/COLUMN_PROPERTY_INFO.js +1 -1
- package/dist/columns/constants/COLUMN_PROPERTY_LABEL.d.ts +4 -0
- package/dist/columns/constants/COLUMN_PROPERTY_LABEL.js +2 -1
- package/dist/columns/interfaces/IColumnTimeGroupSettings.d.ts +7 -0
- package/dist/{filters/interfaces/builder/IFilterBuilderSettingsScopes.js → columns/interfaces/IColumnTimeGroupSettings.js} +0 -0
- package/dist/dates/adapters/hmsToDate.d.ts +7 -0
- package/dist/dates/adapters/hmsToDate.js +20 -0
- package/dist/dates/adapters/index.d.ts +1 -0
- package/dist/dates/adapters/index.js +1 -0
- package/dist/dates/constants/TIME_GROUPING_PROPERTY_INFO.d.ts +5 -0
- package/dist/dates/constants/TIME_GROUPING_PROPERTY_INFO.js +28 -0
- package/dist/dates/constants/TIME_GROUPING_PROPERTY_INFO_LIST.d.ts +2 -0
- package/dist/dates/constants/TIME_GROUPING_PROPERTY_INFO_LIST.js +7 -0
- package/dist/dates/constants/TIME_GROUPING_PROPERTY_LABEL.d.ts +5 -0
- package/dist/dates/constants/TIME_GROUPING_PROPERTY_LABEL.js +6 -0
- package/dist/dates/constants/index.d.ts +3 -0
- package/dist/dates/constants/index.js +3 -0
- package/dist/filters/constants/index.d.ts +1 -0
- package/dist/filters/constants/index.js +1 -0
- package/dist/filters/constants/settings/FILTER_SETTINGS_DEFAULT.d.ts +3 -0
- package/dist/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +236 -0
- package/dist/filters/constants/settings/index.d.ts +1 -0
- package/dist/filters/constants/settings/index.js +1 -0
- package/dist/filters/helpers/backend/getBackendGroupValue.js +3 -1
- package/dist/filters/helpers/backend/getBackendProperty.js +2 -1
- package/dist/filters/helpers/backend/getLogicByDatasets.js +2 -1
- package/dist/filters/helpers/index.d.ts +1 -0
- package/dist/filters/helpers/index.js +1 -0
- package/dist/filters/helpers/settings/areMultipleScopesByProperties.d.ts +9 -0
- package/dist/filters/helpers/settings/areMultipleScopesByProperties.js +20 -0
- package/dist/filters/helpers/settings/areMultipleScopesByProperty.d.ts +8 -0
- package/dist/filters/helpers/settings/areMultipleScopesByProperty.js +16 -0
- package/dist/filters/helpers/settings/getFilterSettings.d.ts +13 -0
- package/dist/filters/helpers/settings/getFilterSettings.js +327 -0
- package/dist/filters/helpers/settings/getScopeColorSetting.d.ts +9 -0
- package/dist/filters/helpers/settings/getScopeColorSetting.js +15 -0
- package/dist/filters/helpers/settings/getScopeSettings.d.ts +10 -0
- package/dist/filters/helpers/settings/getScopeSettings.js +13 -0
- package/dist/filters/helpers/settings/getScopesSettings.d.ts +8 -0
- package/dist/filters/helpers/settings/getScopesSettings.js +11 -0
- package/dist/filters/helpers/settings/getScopesToDisplay.d.ts +8 -0
- package/dist/filters/helpers/settings/getScopesToDisplay.js +12 -0
- package/dist/filters/helpers/settings/index.d.ts +9 -0
- package/dist/filters/helpers/settings/index.js +9 -0
- package/dist/filters/helpers/settings/isLeastSingleScopeByProperties.d.ts +9 -0
- package/dist/filters/helpers/settings/isLeastSingleScopeByProperties.js +20 -0
- package/dist/filters/helpers/settings/isLeastSingleScopeByProperty.d.ts +8 -0
- package/dist/filters/helpers/settings/isLeastSingleScopeByProperty.js +16 -0
- package/dist/filters/interfaces/builder/IFilterBuilderConfig.d.ts +2 -0
- package/dist/filters/interfaces/builder/IFilterBuilderSettings.d.ts +0 -3
- package/dist/filters/interfaces/builder/index.d.ts +0 -1
- package/dist/filters/interfaces/builder/index.js +0 -1
- package/dist/filters/interfaces/common/IFSDataStore.d.ts +3 -5
- package/dist/filters/interfaces/index.d.ts +1 -0
- package/dist/filters/interfaces/index.js +1 -0
- package/dist/filters/interfaces/panel/IFilterPanelConfig.d.ts +4 -0
- package/dist/filters/interfaces/panel/index.d.ts +0 -20
- package/dist/filters/interfaces/panel/index.js +0 -20
- package/dist/filters/interfaces/settings/IFSettings.d.ts +19 -0
- package/dist/filters/interfaces/{panel/IFPSettings.js → settings/IFSettings.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsChartBuilder.d.ts +5 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanel.js → settings/IFSettingsChartBuilder.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterBuilder.d.ts +7 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBody.js → settings/IFSettingsFilterBuilder.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterDisplayer.d.ts +8 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyDataset.js → settings/IFSettingsFilterDisplayer.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterPanel.d.ts +18 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyDatasetHeader.js → settings/IFSettingsFilterPanel.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterPanelBody.d.ts +13 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyFilter.js → settings/IFSettingsFilterPanelBody.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterPanelBodyDataset.d.ts +9 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyFilterMenu.js → settings/IFSettingsFilterPanelBodyDataset.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterPanelBodyFilter.d.ts +11 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyOperator.js → settings/IFSettingsFilterPanelBodyFilter.js} +0 -0
- package/dist/{cjs/filters/interfaces/panel/IFPSettingsFilterPanelBodyFilterMenu.d.ts → filters/interfaces/settings/IFSettingsFilterPanelBodyFilterMenu.d.ts} +5 -2
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScope.js → settings/IFSettingsFilterPanelBodyFilterMenu.js} +0 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyOperator.d.ts → settings/IFSettingsFilterPanelBodyOperator.d.ts} +1 -1
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScopeBody.js → settings/IFSettingsFilterPanelBodyOperator.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterPanelBodyScope.d.ts +8 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScopeHeader.js → settings/IFSettingsFilterPanelBodyScope.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterPanelHeader.d.ts +13 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScopeScope.js → settings/IFSettingsFilterPanelHeader.js} +0 -0
- package/dist/{cjs/filters/interfaces/panel/IFPSettingsFilterPanelHeaderMenu.d.ts → filters/interfaces/settings/IFSettingsFilterPanelHeaderMenu.d.ts} +4 -2
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScopeScopeBody.js → settings/IFSettingsFilterPanelHeaderMenu.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterPanelSettings.d.ts +16 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelBodyScopeScopeHeader.js → settings/IFSettingsFilterPanelSettings.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsPanel.d.ts +11 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelHeader.js → settings/IFSettingsPanel.js} +0 -0
- package/dist/filters/interfaces/{panel/IFPSettingsPanelView.d.ts → settings/IFSettingsPanelView.d.ts} +0 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelHeaderMenu.js → settings/IFSettingsPanelView.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsScope.d.ts +20 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelSettings.js → settings/IFSettingsScope.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsScopeHeader.d.ts +9 -0
- package/dist/filters/interfaces/{panel/IFPSettingsFilterPanelSettingsScope.js → settings/IFSettingsScopeHeader.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsScopeInteraction.d.ts +13 -0
- package/dist/filters/interfaces/{panel/IFPSettingsGeneral.js → settings/IFSettingsScopeInteraction.js} +0 -0
- package/dist/filters/interfaces/settings/IFSettingsScopes.d.ts +8 -0
- package/dist/filters/interfaces/{panel/IFPSettingsPanelView.js → settings/IFSettingsScopes.js} +0 -0
- package/dist/filters/interfaces/settings/index.d.ts +19 -0
- package/dist/filters/interfaces/settings/index.js +19 -0
- package/dist/filters/interfaces/ui/IFUDataStore.d.ts +2 -2
- package/dist/filters/services/UChartApi.js +6 -2
- package/dist/filters/services/UChartPaginationApi.js +6 -2
- package/dist/format/definition.d.ts +1 -0
- package/dist/format/definition.js +1 -0
- package/dist/format/format.d.ts +12 -0
- package/dist/format/format.js +30 -4
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderFormatValues.d.ts +11 -10
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderShelfMenu.d.ts +1 -0
- package/dist/globalization/interfaces/common/II18nColumnProperties.d.ts +3 -0
- package/dist/globalization/interfaces/common/II18nCommon.d.ts +2 -0
- package/dist/globalization/interfaces/common/II18nTokenMode.d.ts +4 -0
- package/dist/globalization/interfaces/common/II18nTokenMode.js +1 -0
- package/dist/globalization/interfaces/common/II18nTooltipForTokenMode.d.ts +4 -0
- package/dist/globalization/interfaces/common/II18nTooltipForTokenMode.js +1 -0
- package/dist/globalization/interfaces/panel/II18nPanelErrors.d.ts +1 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +11 -10
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +1 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +1 -1
- package/dist/globalization/labels/common/I18N_COLUMN_LABEL.d.ts +1 -0
- package/dist/globalization/labels/common/I18N_COLUMN_LABEL.js +1 -0
- package/dist/globalization/labels/common/I18N_COLUMN_PROPERTY_LABEL.js +3 -0
- package/dist/globalization/labels/common/I18N_COMMON.js +6 -0
- package/dist/globalization/labels/panel/I18N_PANEL.js +1 -0
- package/dist/qrvey/helpers/transformValue.js +5 -0
- package/dist/typescript/DeepRequired.d.ts +3 -0
- package/dist/typescript/DeepRequired.js +1 -0
- package/dist/typescript/index.d.ts +1 -0
- package/dist/typescript/index.js +1 -0
- package/package.json +15 -14
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderSettingsScopes.d.ts +0 -8
- package/dist/cjs/filters/interfaces/panel/IFPSettings.d.ts +0 -11
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanel.d.ts +0 -9
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelBody.d.ts +0 -13
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelBodyDataset.d.ts +0 -9
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelBodyDatasetHeader.d.ts +0 -8
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelBodyFilter.d.ts +0 -11
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelBodyScope.d.ts +0 -11
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelBodyScopeBody.d.ts +0 -7
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelBodyScopeHeader.d.ts +0 -8
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelBodyScopeScope.d.ts +0 -17
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelBodyScopeScopeBody.d.ts +0 -7
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelBodyScopeScopeHeader.d.ts +0 -9
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelHeader.d.ts +0 -12
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelSettings.d.ts +0 -12
- package/dist/cjs/filters/interfaces/panel/IFPSettingsFilterPanelSettingsScope.d.ts +0 -7
- package/dist/cjs/filters/interfaces/panel/IFPSettingsGeneral.d.ts +0 -13
- package/dist/filters/interfaces/builder/IFilterBuilderSettingsScopes.d.ts +0 -8
- package/dist/filters/interfaces/panel/IFPSettings.d.ts +0 -11
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanel.d.ts +0 -9
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelBody.d.ts +0 -13
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelBodyDataset.d.ts +0 -9
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelBodyDatasetHeader.d.ts +0 -8
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelBodyFilter.d.ts +0 -11
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelBodyScope.d.ts +0 -11
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelBodyScopeBody.d.ts +0 -7
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelBodyScopeHeader.d.ts +0 -8
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelBodyScopeScope.d.ts +0 -17
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelBodyScopeScopeBody.d.ts +0 -7
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelBodyScopeScopeHeader.d.ts +0 -9
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelHeader.d.ts +0 -12
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelSettings.d.ts +0 -12
- package/dist/filters/interfaces/panel/IFPSettingsFilterPanelSettingsScope.d.ts +0 -7
- package/dist/filters/interfaces/panel/IFPSettingsGeneral.d.ts +0 -13
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getLogicByDatasets = void 0;
|
|
4
|
-
const
|
|
4
|
+
const filterNestedTree_1 = require("../../../general/array/filterNestedTree");
|
|
5
5
|
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
6
|
+
const hasProperty_1 = require("../../../general/object/hasProperty");
|
|
6
7
|
/**
|
|
7
8
|
* [TODO: Add filterEmptyArrays to the filterNestedTree filter condition. Firstly, that function should accept this argument]
|
|
8
9
|
* Filters the logic by a qrveyids array
|
|
@@ -17,10 +18,10 @@ function getLogicByDatasets(logic, datasets = [], settings) {
|
|
|
17
18
|
if ((0, isEmpty_1.isEmpty)(datasets))
|
|
18
19
|
return logic;
|
|
19
20
|
const defaultSettings = getGetLogicByDatasetsSettings(settings);
|
|
20
|
-
return logic.map((_l) => (Object.assign(Object.assign({}, _l), { filters: (0,
|
|
21
|
+
return logic.map((_l) => (Object.assign(Object.assign({}, _l), { filters: (0, filterNestedTree_1.filterNestedTree)(_l.filters, "expressions", (expression) => {
|
|
21
22
|
const dataset = datasets.find((_data) => _data === expression.qrveyid);
|
|
22
23
|
return ((defaultSettings.letPassUndefinedProperties.qrveyid &&
|
|
23
|
-
!(0,
|
|
24
|
+
!(0, hasProperty_1._hasProperty)(expression, "qrveyid")) ||
|
|
24
25
|
!(0, isEmpty_1.isEmpty)(dataset));
|
|
25
26
|
}) })));
|
|
26
27
|
}
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./backend/index"), exports);
|
|
18
18
|
__exportStar(require("./builder/index"), exports);
|
|
19
19
|
__exportStar(require("./common/index"), exports);
|
|
20
|
+
__exportStar(require("./settings/index"), exports);
|
|
20
21
|
__exportStar(require("./ui/index"), exports);
|
|
21
22
|
__exportStar(require("./applyHierarchyForAggFilters"), exports);
|
|
22
23
|
__exportStar(require("./getAvailableScopes"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IFSettings } from "../../interfaces/settings/IFSettings";
|
|
2
|
+
/**
|
|
3
|
+
* Validates if the scope settings is satisfied by properties in multiple scopes
|
|
4
|
+
* @param {IFSettings} settings the filter setting
|
|
5
|
+
* @param {string} scopeProperties the property or the string path of the scope settings
|
|
6
|
+
* @param {string} condition validate with AND or OR condition
|
|
7
|
+
* @returns true iif there are scopes to be satisfied; false: one or none scopes to be satisfied
|
|
8
|
+
*/
|
|
9
|
+
export declare function areMultipleScopesByProperties(settings: IFSettings, scopeProperties: string[], condition?: "AND" | "OR"): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.areMultipleScopesByProperties = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
5
|
+
const get_1 = require("../../../general/object/get");
|
|
6
|
+
const getScopesSettings_1 = require("./getScopesSettings");
|
|
7
|
+
/**
|
|
8
|
+
* Validates if the scope settings is satisfied by properties in multiple scopes
|
|
9
|
+
* @param {IFSettings} settings the filter setting
|
|
10
|
+
* @param {string} scopeProperties the property or the string path of the scope settings
|
|
11
|
+
* @param {string} condition validate with AND or OR condition
|
|
12
|
+
* @returns true iif there are scopes to be satisfied; false: one or none scopes to be satisfied
|
|
13
|
+
*/
|
|
14
|
+
function areMultipleScopesByProperties(settings, scopeProperties, condition = "AND") {
|
|
15
|
+
if ((0, isEmpty_1.isEmpty)(settings) || (0, isEmpty_1.isEmpty)(settings.scopes))
|
|
16
|
+
return false;
|
|
17
|
+
const scopes = Object.keys(settings.scopes);
|
|
18
|
+
const conditionFunction = (scope) => (property) => (0, get_1._get)(scope, property, false);
|
|
19
|
+
return (scopes.length > 0 &&
|
|
20
|
+
(0, getScopesSettings_1.getScopesSettings)(settings.scopes).filter((scope) => condition === "AND"
|
|
21
|
+
? scopeProperties.every(conditionFunction(scope))
|
|
22
|
+
: scopeProperties.some(conditionFunction(scope))).length > 0);
|
|
23
|
+
}
|
|
24
|
+
exports.areMultipleScopesByProperties = areMultipleScopesByProperties;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IFSettings } from "../../interfaces/settings/IFSettings";
|
|
2
|
+
/**
|
|
3
|
+
* Validates if the scope settings is satisfied the property in multiple scopes
|
|
4
|
+
* @param {IFSettings} settings the filter setting
|
|
5
|
+
* @param {string} property the property or the string path of the scope settings
|
|
6
|
+
* @returns true if there are scopes to be satisfied; false: one or none scopes to be satisfied
|
|
7
|
+
*/
|
|
8
|
+
export declare function areMultipleScopesByProperty(settings: IFSettings, property: string): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.areMultipleScopesByProperty = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
5
|
+
const get_1 = require("../../../general/object/get");
|
|
6
|
+
const getScopesSettings_1 = require("./getScopesSettings");
|
|
7
|
+
/**
|
|
8
|
+
* Validates if the scope settings is satisfied the property in multiple scopes
|
|
9
|
+
* @param {IFSettings} settings the filter setting
|
|
10
|
+
* @param {string} property the property or the string path of the scope settings
|
|
11
|
+
* @returns true if there are scopes to be satisfied; false: one or none scopes to be satisfied
|
|
12
|
+
*/
|
|
13
|
+
function areMultipleScopesByProperty(settings, property) {
|
|
14
|
+
if ((0, isEmpty_1.isEmpty)(settings) || (0, isEmpty_1.isEmpty)(settings.scopes))
|
|
15
|
+
return false;
|
|
16
|
+
const scopes = Object.keys(settings.scopes);
|
|
17
|
+
return (scopes.length > 1 &&
|
|
18
|
+
(0, getScopesSettings_1.getScopesSettings)(settings.scopes).filter((scope) => (0, get_1._get)(scope, property, false)).length > 1);
|
|
19
|
+
}
|
|
20
|
+
exports.areMultipleScopesByProperty = areMultipleScopesByProperty;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IFScope } from "../../interfaces/IFScope";
|
|
2
|
+
import { IFSettings } from "../../interfaces/settings/IFSettings";
|
|
3
|
+
/**
|
|
4
|
+
* Gets a new filter settings object according to various conditions
|
|
5
|
+
* - By allowed scopes. Different implementation could accept some scopes, so the forbidden scopes into the filter settings will be skipped
|
|
6
|
+
* - If there is not filter settings provived, a default one is returned
|
|
7
|
+
* - The returned filter settings depend on the coexisting scopes
|
|
8
|
+
* @param {IFSettings} filterSettings the given filter settings
|
|
9
|
+
* @param {IFScope[]} allowedScopes a collection of scope types that are permitted
|
|
10
|
+
* @param {IFSettings} otherSettings another filter settings object to be merged with the filterSettings param
|
|
11
|
+
* @returns a new filter settings object
|
|
12
|
+
*/
|
|
13
|
+
export declare function getFilterSettings(filterSettings: IFSettings, allowedScopes?: IFScope[], otherSettings?: IFSettings): IFSettings;
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFilterSettings = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
5
|
+
const cloneDeep_1 = require("../../../general/object/cloneDeep");
|
|
6
|
+
const mergeDeep_1 = require("../../../general/object/mergeDeep");
|
|
7
|
+
const FILTER_SCOPE_1 = require("../../constants/common/FILTER_SCOPE");
|
|
8
|
+
const FILTER_SETTINGS_DEFAULT_1 = require("../../constants/settings/FILTER_SETTINGS_DEFAULT");
|
|
9
|
+
const getScopesToDisplay_1 = require("./getScopesToDisplay");
|
|
10
|
+
/**
|
|
11
|
+
* Gets a new filter settings object according to various conditions
|
|
12
|
+
* - By allowed scopes. Different implementation could accept some scopes, so the forbidden scopes into the filter settings will be skipped
|
|
13
|
+
* - If there is not filter settings provived, a default one is returned
|
|
14
|
+
* - The returned filter settings depend on the coexisting scopes
|
|
15
|
+
* @param {IFSettings} filterSettings the given filter settings
|
|
16
|
+
* @param {IFScope[]} allowedScopes a collection of scope types that are permitted
|
|
17
|
+
* @param {IFSettings} otherSettings another filter settings object to be merged with the filterSettings param
|
|
18
|
+
* @returns a new filter settings object
|
|
19
|
+
*/
|
|
20
|
+
function getFilterSettings(filterSettings, allowedScopes = [], otherSettings) {
|
|
21
|
+
let settings = (0, mergeDeep_1.mergeDeep)(FILTER_SETTINGS_DEFAULT_1.FILTER_SETTINGS_DEFAULT, (0, cloneDeep_1.cloneDeep)(filterSettings));
|
|
22
|
+
settings = (0, mergeDeep_1.mergeDeep)(settings, otherSettings);
|
|
23
|
+
const scopesSettings = (0, getScopesToDisplay_1.getScopesToDisplay)(settings).filter((scope) => allowedScopes.includes(scope.id));
|
|
24
|
+
if (scopesSettings.length > 1) {
|
|
25
|
+
settings = getFilterSettingsByMultipleScopes(settings, allowedScopes);
|
|
26
|
+
}
|
|
27
|
+
else if (scopesSettings.length > 0) {
|
|
28
|
+
settings = getFilterSettingsByOnlyScope(settings, allowedScopes);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
settings = getFilterSettingsByNoScopes(settings);
|
|
32
|
+
}
|
|
33
|
+
return settings;
|
|
34
|
+
}
|
|
35
|
+
exports.getFilterSettings = getFilterSettings;
|
|
36
|
+
/**
|
|
37
|
+
* Gets the filter settings by multiple scopes conditions
|
|
38
|
+
* @param {IFSettings} settings the given filter settings
|
|
39
|
+
* @param {IFScope[]} allowedScopes a collection of scope types that are permitted
|
|
40
|
+
* @returns a new filter settings object
|
|
41
|
+
*/
|
|
42
|
+
function getFilterSettingsByMultipleScopes(settings, allowedScopes) {
|
|
43
|
+
const scopesSettings = (0, getScopesToDisplay_1.getScopesToDisplay)(settings).filter((scope) => allowedScopes.includes(scope.id));
|
|
44
|
+
let newSettings = settings;
|
|
45
|
+
if ((0, isEmpty_1.isEmpty)(scopesSettings.find((scope) => scope.id === FILTER_SCOPE_1.FILTER_SCOPE.DEFAULT))) {
|
|
46
|
+
newSettings = getFilterSettingsByNoDefaultScope(newSettings);
|
|
47
|
+
}
|
|
48
|
+
else if (scopesSettings.length <= 2) {
|
|
49
|
+
newSettings = getFilterSettingsByDefaultWithOneAdditionalScope(newSettings);
|
|
50
|
+
}
|
|
51
|
+
if ((0, isEmpty_1.isEmpty)(scopesSettings.find((scope) => scope.id === FILTER_SCOPE_1.FILTER_SCOPE.CHART))) {
|
|
52
|
+
newSettings = getFilterSettingsByMultipleNoPanelScopes(newSettings);
|
|
53
|
+
}
|
|
54
|
+
if ((0, isEmpty_1.isEmpty)(scopesSettings.find((scope) => scope.id === FILTER_SCOPE_1.FILTER_SCOPE.CHART)) &&
|
|
55
|
+
(0, isEmpty_1.isEmpty)(scopesSettings.find((scope) => scope.id === FILTER_SCOPE_1.FILTER_SCOPE.GLOBAL)) &&
|
|
56
|
+
(0, isEmpty_1.isEmpty)(scopesSettings.find((scope) => scope.id === FILTER_SCOPE_1.FILTER_SCOPE.PAGE)) &&
|
|
57
|
+
(0, isEmpty_1.isEmpty)(scopesSettings.find((scope) => scope.id === FILTER_SCOPE_1.FILTER_SCOPE.TAB))) {
|
|
58
|
+
newSettings = getFilterSettingsBySkippingGeneralScopes(newSettings);
|
|
59
|
+
}
|
|
60
|
+
return newSettings;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Gets the filter settings when a single scope is permitted
|
|
64
|
+
* @param {IFSettings} settings the given filter settings
|
|
65
|
+
* @param {IFScope[]} allowedScopes a collection of scope types that are permitted
|
|
66
|
+
* @returns a new filter settings object
|
|
67
|
+
*/
|
|
68
|
+
function getFilterSettingsByOnlyScope(settings, allowedScopes) {
|
|
69
|
+
const scopesSettings = (0, getScopesToDisplay_1.getScopesToDisplay)(settings).filter((scope) => allowedScopes.includes(scope.id));
|
|
70
|
+
let newSettings = getFilterSettingsByGeneralOnlyScope(settings);
|
|
71
|
+
if ((0, isEmpty_1.isEmpty)(scopesSettings.find((scope) => scope.id === FILTER_SCOPE_1.FILTER_SCOPE.DEFAULT))) {
|
|
72
|
+
newSettings = getFilterSettingsByNoDefaultScope(newSettings);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
newSettings = getFilterSettingsByOnlyDefaultScope(newSettings);
|
|
76
|
+
}
|
|
77
|
+
if (!(0, isEmpty_1.isEmpty)(scopesSettings.find((scope) => scope.id === FILTER_SCOPE_1.FILTER_SCOPE.CHART))) {
|
|
78
|
+
newSettings = getFilterSettingsByOnlyPanelScope(newSettings);
|
|
79
|
+
}
|
|
80
|
+
if (!(0, isEmpty_1.isEmpty)(scopesSettings.find((scope) => scope.id === FILTER_SCOPE_1.FILTER_SCOPE.DATA))) {
|
|
81
|
+
newSettings = getFilterSettingsByOnlyDataScope(newSettings);
|
|
82
|
+
}
|
|
83
|
+
return newSettings;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Gets the filter settings when there is not scope to accept
|
|
87
|
+
* @param {IFSettings} settings the given filter settings
|
|
88
|
+
* @returns a new filter settings object
|
|
89
|
+
*/
|
|
90
|
+
function getFilterSettingsByNoScopes(settings) {
|
|
91
|
+
const newSettings = {
|
|
92
|
+
chartBuilder: {
|
|
93
|
+
addFilterDisplayed: false,
|
|
94
|
+
filterSectionDisplayed: false,
|
|
95
|
+
},
|
|
96
|
+
filterBuilder: {
|
|
97
|
+
scopeSelectorDisplayed: false,
|
|
98
|
+
},
|
|
99
|
+
filterDisplayer: {
|
|
100
|
+
addFilterDisplayed: false,
|
|
101
|
+
displayed: false,
|
|
102
|
+
},
|
|
103
|
+
filterPanel: {
|
|
104
|
+
body: {
|
|
105
|
+
dataset: {
|
|
106
|
+
headerDisplayed: false,
|
|
107
|
+
},
|
|
108
|
+
filter: {
|
|
109
|
+
menu: {
|
|
110
|
+
deleteDisplayed: false,
|
|
111
|
+
displayed: false,
|
|
112
|
+
editDisplayed: false,
|
|
113
|
+
enableDisplayed: false,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
scope: {
|
|
117
|
+
headerDisplayed: false,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
colorized: false,
|
|
121
|
+
displayed: false,
|
|
122
|
+
header: {
|
|
123
|
+
filterButtonDisplayed: false,
|
|
124
|
+
menu: {
|
|
125
|
+
deleteDisplayed: false,
|
|
126
|
+
displayed: false,
|
|
127
|
+
enableDisplayed: false,
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
filterPanelSettings: {
|
|
132
|
+
displayColorModeDisplayed: false,
|
|
133
|
+
displayIconsDisplayed: false,
|
|
134
|
+
panelDefaultViewDisplayed: false,
|
|
135
|
+
showPanelInPageViewDisplayed: false,
|
|
136
|
+
},
|
|
137
|
+
panel: {
|
|
138
|
+
filterAccessDisplayed: false,
|
|
139
|
+
filterByDisplayed: false,
|
|
140
|
+
seeDataDisplayed: false,
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
return (0, mergeDeep_1.mergeDeep)(settings, newSettings);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Gets the filter settings when a general scope are only permitted
|
|
147
|
+
* The general scopes could be the GLOBAL, PAGE, TAB and PANEL types.
|
|
148
|
+
* @param {IFSettings} settings the given filter settings
|
|
149
|
+
* @returns a new filter settings object
|
|
150
|
+
*/
|
|
151
|
+
function getFilterSettingsByGeneralOnlyScope(settings) {
|
|
152
|
+
const newSettings = {
|
|
153
|
+
filterBuilder: {
|
|
154
|
+
scopeSelectorDisplayed: false,
|
|
155
|
+
},
|
|
156
|
+
filterPanel: {
|
|
157
|
+
body: {
|
|
158
|
+
dataset: {
|
|
159
|
+
headerDisplayed: false,
|
|
160
|
+
},
|
|
161
|
+
scope: {
|
|
162
|
+
headerDisplayed: false,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
colorized: false,
|
|
166
|
+
},
|
|
167
|
+
filterPanelSettings: {
|
|
168
|
+
displayColorModeDisplayed: false,
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
return (0, mergeDeep_1.mergeDeep)(settings, newSettings);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Gets the filter settings when there is not a default scope type
|
|
175
|
+
* @param {IFSettings} settings the given filter settings
|
|
176
|
+
* @returns a new filter settings object
|
|
177
|
+
*/
|
|
178
|
+
function getFilterSettingsByNoDefaultScope(settings) {
|
|
179
|
+
const newSettings = {
|
|
180
|
+
chartBuilder: {
|
|
181
|
+
addFilterDisplayed: false,
|
|
182
|
+
filterSectionDisplayed: false,
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
return (0, mergeDeep_1.mergeDeep)(settings, newSettings);
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Gets the filter settings when there is only a default scope type
|
|
189
|
+
* @param {IFSettings} settings the given filter settings
|
|
190
|
+
* @returns a new filter settings object
|
|
191
|
+
*/
|
|
192
|
+
function getFilterSettingsByOnlyDefaultScope(settings) {
|
|
193
|
+
const newSettings = {
|
|
194
|
+
filterDisplayer: {
|
|
195
|
+
addFilterDisplayed: false,
|
|
196
|
+
addFilterEnabled: false,
|
|
197
|
+
displayed: false,
|
|
198
|
+
},
|
|
199
|
+
filterPanel: {
|
|
200
|
+
body: {
|
|
201
|
+
filter: {
|
|
202
|
+
menu: {
|
|
203
|
+
deleteDisplayed: false,
|
|
204
|
+
displayed: false,
|
|
205
|
+
editDisplayed: false,
|
|
206
|
+
enableDisplayed: false,
|
|
207
|
+
},
|
|
208
|
+
readonly: true,
|
|
209
|
+
},
|
|
210
|
+
operator: {
|
|
211
|
+
displayed: false,
|
|
212
|
+
readonly: true,
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
displayed: false,
|
|
216
|
+
header: {
|
|
217
|
+
displayed: false,
|
|
218
|
+
filterButtonDisplayed: false,
|
|
219
|
+
menu: {
|
|
220
|
+
deleteDisplayed: false,
|
|
221
|
+
displayed: false,
|
|
222
|
+
enableDisplayed: false,
|
|
223
|
+
},
|
|
224
|
+
readonly: true,
|
|
225
|
+
settingsButtonDisplayed: false,
|
|
226
|
+
},
|
|
227
|
+
readonly: true,
|
|
228
|
+
},
|
|
229
|
+
panel: {
|
|
230
|
+
filterAccessDisplayed: false,
|
|
231
|
+
filterByDisplayed: false,
|
|
232
|
+
seeDataDisplayed: false,
|
|
233
|
+
},
|
|
234
|
+
};
|
|
235
|
+
return (0, mergeDeep_1.mergeDeep)(settings, newSettings);
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Gets the filter settings when there are a default scope and other single scope
|
|
239
|
+
* @param {IFSettings} settings the given filter settings
|
|
240
|
+
* @returns a new filter settings object
|
|
241
|
+
*/
|
|
242
|
+
function getFilterSettingsByDefaultWithOneAdditionalScope(settings) {
|
|
243
|
+
const newSettings = {
|
|
244
|
+
filterPanel: {
|
|
245
|
+
body: {
|
|
246
|
+
dataset: {
|
|
247
|
+
headerDisplayed: false,
|
|
248
|
+
},
|
|
249
|
+
scope: {
|
|
250
|
+
headerDisplayed: false,
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
colorized: false,
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
return (0, mergeDeep_1.mergeDeep)(settings, newSettings);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Gets the filter settings when there is only the panel scope
|
|
260
|
+
* @param {IFSettings} settings the given filter settings
|
|
261
|
+
* @returns a new filter settings object
|
|
262
|
+
*/
|
|
263
|
+
function getFilterSettingsByOnlyPanelScope(settings) {
|
|
264
|
+
const newSettings = {
|
|
265
|
+
chartBuilder: {
|
|
266
|
+
addFilterDisplayed: false,
|
|
267
|
+
filterSectionDisplayed: false,
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
return (0, mergeDeep_1.mergeDeep)(settings, newSettings);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Gets the filter settings when there is only the data scope
|
|
274
|
+
* @param {IFSettings} settings the given filter settings
|
|
275
|
+
* @returns a new filter settings object
|
|
276
|
+
*/
|
|
277
|
+
function getFilterSettingsByOnlyDataScope(settings) {
|
|
278
|
+
const newSettings = {
|
|
279
|
+
filterDisplayer: {
|
|
280
|
+
addFilterDisplayed: false,
|
|
281
|
+
displayed: false,
|
|
282
|
+
},
|
|
283
|
+
panel: {
|
|
284
|
+
filterAccessDisplayed: false,
|
|
285
|
+
filterByDisplayed: false,
|
|
286
|
+
seeDataDisplayed: false,
|
|
287
|
+
},
|
|
288
|
+
};
|
|
289
|
+
return (0, mergeDeep_1.mergeDeep)(settings, newSettings);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Gets the filter settings when there are not general scopes allowed
|
|
293
|
+
* The general scopes could be the GLOBAL, PAGE, TAB and PANEL types.
|
|
294
|
+
* @param {IFSettings} settings the given filter settings
|
|
295
|
+
* @returns a new filter settings object
|
|
296
|
+
*/
|
|
297
|
+
function getFilterSettingsBySkippingGeneralScopes(settings) {
|
|
298
|
+
const newSettings = {
|
|
299
|
+
panel: {
|
|
300
|
+
filterAccessDisplayed: false,
|
|
301
|
+
filterByDisplayed: false,
|
|
302
|
+
seeDataDisplayed: false,
|
|
303
|
+
},
|
|
304
|
+
filterPanel: {
|
|
305
|
+
header: {
|
|
306
|
+
filterButtonDisplayed: false,
|
|
307
|
+
menu: {
|
|
308
|
+
displayed: false,
|
|
309
|
+
},
|
|
310
|
+
settingsButtonDisplayed: false,
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
};
|
|
314
|
+
return (0, mergeDeep_1.mergeDeep)(settings, newSettings);
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Gets the filter settings when there are no panel scopes and multiple scopes allowed.
|
|
318
|
+
* @param {IFSettings} settings the given filter settings
|
|
319
|
+
* @returns a new filter settings object
|
|
320
|
+
*/
|
|
321
|
+
function getFilterSettingsByMultipleNoPanelScopes(settings) {
|
|
322
|
+
const newSettings = {
|
|
323
|
+
filterDisplayer: {
|
|
324
|
+
addFilterDisplayed: false,
|
|
325
|
+
},
|
|
326
|
+
panel: {
|
|
327
|
+
filterAccessEnabled: false,
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
return (0, mergeDeep_1.mergeDeep)(settings, newSettings);
|
|
331
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IFScope } from "../../interfaces/IFScope";
|
|
2
|
+
import { IFSettings } from "../../interfaces/settings/IFSettings";
|
|
3
|
+
/**
|
|
4
|
+
* Gets the color of the scope in the settings object
|
|
5
|
+
* @param {IFSettings} settings the filter settings
|
|
6
|
+
* @param {IFScope} scope the scope type
|
|
7
|
+
* @returns an string with the color.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getScopeColorSetting(settings: IFSettings, scope: IFScope): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getScopeColorSetting = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
5
|
+
const getScopeSettings_1 = require("./getScopeSettings");
|
|
6
|
+
/**
|
|
7
|
+
* Gets the color of the scope in the settings object
|
|
8
|
+
* @param {IFSettings} settings the filter settings
|
|
9
|
+
* @param {IFScope} scope the scope type
|
|
10
|
+
* @returns an string with the color.
|
|
11
|
+
*/
|
|
12
|
+
function getScopeColorSetting(settings, scope) {
|
|
13
|
+
const defaultColor = "#C0C0C0";
|
|
14
|
+
const scopeSetting = (0, getScopeSettings_1.getScopeSettings)(settings, scope);
|
|
15
|
+
return !(0, isEmpty_1.isEmpty)(scopeSetting) && scopeSetting.colorized
|
|
16
|
+
? scopeSetting.color
|
|
17
|
+
: defaultColor;
|
|
18
|
+
}
|
|
19
|
+
exports.getScopeColorSetting = getScopeColorSetting;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IFScope } from "../../interfaces/IFScope";
|
|
2
|
+
import { IFSettings } from "../../interfaces/settings/IFSettings";
|
|
3
|
+
import { IFSettingsScope } from "../../interfaces/settings/IFSettingsScope";
|
|
4
|
+
/**
|
|
5
|
+
* Gets the scope settings by the scope type
|
|
6
|
+
* @param {IFSettings} settings the filter settings
|
|
7
|
+
* @param {IFScope} scope the scope type
|
|
8
|
+
* @returns the scope settings
|
|
9
|
+
*/
|
|
10
|
+
export declare function getScopeSettings(settings: IFSettings, scope: IFScope): IFSettingsScope;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getScopeSettings = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
5
|
+
const getScopesSettings_1 = require("./getScopesSettings");
|
|
6
|
+
/**
|
|
7
|
+
* Gets the scope settings by the scope type
|
|
8
|
+
* @param {IFSettings} settings the filter settings
|
|
9
|
+
* @param {IFScope} scope the scope type
|
|
10
|
+
* @returns the scope settings
|
|
11
|
+
*/
|
|
12
|
+
function getScopeSettings(settings, scope) {
|
|
13
|
+
if ((0, isEmpty_1.isEmpty)(settings) || (0, isEmpty_1.isEmpty)(settings.scopes))
|
|
14
|
+
return;
|
|
15
|
+
return (0, getScopesSettings_1.getScopesSettings)(settings.scopes).find((_scope) => _scope.id === scope);
|
|
16
|
+
}
|
|
17
|
+
exports.getScopeSettings = getScopeSettings;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IFSettingsScope } from "../../interfaces/settings/IFSettingsScope";
|
|
2
|
+
import { IFSettingsScopes } from "../../interfaces/settings/IFSettingsScopes";
|
|
3
|
+
/**
|
|
4
|
+
* Gets the scopes settings as array
|
|
5
|
+
* @param {IFSettingsScopes} scopes the scopes settings
|
|
6
|
+
* @returns an array of the scopes settings
|
|
7
|
+
*/
|
|
8
|
+
export declare function getScopesSettings(scopes: IFSettingsScopes): IFSettingsScope[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getScopesSettings = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
5
|
+
/**
|
|
6
|
+
* Gets the scopes settings as array
|
|
7
|
+
* @param {IFSettingsScopes} scopes the scopes settings
|
|
8
|
+
* @returns an array of the scopes settings
|
|
9
|
+
*/
|
|
10
|
+
function getScopesSettings(scopes) {
|
|
11
|
+
if ((0, isEmpty_1.isEmpty)(scopes))
|
|
12
|
+
return [];
|
|
13
|
+
return Object.keys(scopes).map((scope) => (Object.assign(Object.assign({}, scopes[scope.toUpperCase()]), { id: scope.toUpperCase() })));
|
|
14
|
+
}
|
|
15
|
+
exports.getScopesSettings = getScopesSettings;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IFSettings } from "../../interfaces/settings/IFSettings";
|
|
2
|
+
import { IFSettingsScope } from "../../interfaces/settings/IFSettingsScope";
|
|
3
|
+
/**
|
|
4
|
+
* Gets the scope allowed to display
|
|
5
|
+
* @param {IFSettings} settings the filter settings
|
|
6
|
+
* @returns an array of the scopes settings
|
|
7
|
+
*/
|
|
8
|
+
export declare function getScopesToDisplay(settings: IFSettings): IFSettingsScope[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getScopesToDisplay = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
5
|
+
const getScopesSettings_1 = require("./getScopesSettings");
|
|
6
|
+
/**
|
|
7
|
+
* Gets the scope allowed to display
|
|
8
|
+
* @param {IFSettings} settings the filter settings
|
|
9
|
+
* @returns an array of the scopes settings
|
|
10
|
+
*/
|
|
11
|
+
function getScopesToDisplay(settings) {
|
|
12
|
+
if ((0, isEmpty_1.isEmpty)(settings) || (0, isEmpty_1.isEmpty)(settings.scopes))
|
|
13
|
+
return [];
|
|
14
|
+
return (0, getScopesSettings_1.getScopesSettings)(settings.scopes).filter((scope) => scope.displayed);
|
|
15
|
+
}
|
|
16
|
+
exports.getScopesToDisplay = getScopesToDisplay;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./areMultipleScopesByProperties";
|
|
2
|
+
export * from "./areMultipleScopesByProperty";
|
|
3
|
+
export * from "./getFilterSettings";
|
|
4
|
+
export * from "./getScopeColorSetting";
|
|
5
|
+
export * from "./getScopeSettings";
|
|
6
|
+
export * from "./getScopesSettings";
|
|
7
|
+
export * from "./getScopesToDisplay";
|
|
8
|
+
export * from "./isLeastSingleScopeByProperties";
|
|
9
|
+
export * from "./isLeastSingleScopeByProperty";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./areMultipleScopesByProperties"), exports);
|
|
18
|
+
__exportStar(require("./areMultipleScopesByProperty"), exports);
|
|
19
|
+
__exportStar(require("./getFilterSettings"), exports);
|
|
20
|
+
__exportStar(require("./getScopeColorSetting"), exports);
|
|
21
|
+
__exportStar(require("./getScopeSettings"), exports);
|
|
22
|
+
__exportStar(require("./getScopesSettings"), exports);
|
|
23
|
+
__exportStar(require("./getScopesToDisplay"), exports);
|
|
24
|
+
__exportStar(require("./isLeastSingleScopeByProperties"), exports);
|
|
25
|
+
__exportStar(require("./isLeastSingleScopeByProperty"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IFSettings } from "../../interfaces/settings/IFSettings";
|
|
2
|
+
/**
|
|
3
|
+
* Validates if the scope settings is satisfied by properties at least in one scope
|
|
4
|
+
* @param {IFSettings} settings the filter setting
|
|
5
|
+
* @param {string} scopeProperties the property or the string path of the scope settings
|
|
6
|
+
* @param {string} condition validate with AND or OR condition
|
|
7
|
+
* @returns true if there is one scope to be satisfied; false: none scopes to be satisfied
|
|
8
|
+
*/
|
|
9
|
+
export declare function isLeastSingleScopeByProperties(settings: IFSettings, scopeProperties: string[], condition?: "AND" | "OR"): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isLeastSingleScopeByProperties = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
5
|
+
const get_1 = require("../../../general/object/get");
|
|
6
|
+
const getScopesSettings_1 = require("./getScopesSettings");
|
|
7
|
+
/**
|
|
8
|
+
* Validates if the scope settings is satisfied by properties at least in one scope
|
|
9
|
+
* @param {IFSettings} settings the filter setting
|
|
10
|
+
* @param {string} scopeProperties the property or the string path of the scope settings
|
|
11
|
+
* @param {string} condition validate with AND or OR condition
|
|
12
|
+
* @returns true if there is one scope to be satisfied; false: none scopes to be satisfied
|
|
13
|
+
*/
|
|
14
|
+
function isLeastSingleScopeByProperties(settings, scopeProperties, condition = "AND") {
|
|
15
|
+
if ((0, isEmpty_1.isEmpty)(settings) || (0, isEmpty_1.isEmpty)(settings.scopes))
|
|
16
|
+
return false;
|
|
17
|
+
const scopes = Object.keys(settings.scopes);
|
|
18
|
+
const conditionFunction = (scope) => (property) => (0, get_1._get)(scope, property, false);
|
|
19
|
+
return (scopes.length > 0 &&
|
|
20
|
+
(0, getScopesSettings_1.getScopesSettings)(settings.scopes).filter((scope) => condition === "AND"
|
|
21
|
+
? scopeProperties.every(conditionFunction(scope))
|
|
22
|
+
: scopeProperties.some(conditionFunction(scope))).length > 0);
|
|
23
|
+
}
|
|
24
|
+
exports.isLeastSingleScopeByProperties = isLeastSingleScopeByProperties;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IFSettings } from "../../interfaces/settings/IFSettings";
|
|
2
|
+
/**
|
|
3
|
+
* Validates if the scope settings is satisfied by a property at least in one scope
|
|
4
|
+
* @param {IFSettings} settings the filter setting
|
|
5
|
+
* @param {string} property the property or the string path of the scope settings
|
|
6
|
+
* @returns true if there is one scope to be satisfied; false: none scopes to be satisfied
|
|
7
|
+
*/
|
|
8
|
+
export declare function isLeastSingleScopeByProperty(settings: IFSettings, property: string): boolean;
|