@qrvey/utils 1.12.0-9 → 1.13.0-0
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/README.md +2606 -2130
- package/dist/charts/adapters/endpointData.js +4 -5
- package/dist/charts/adapters/endpointDataGet.js +3 -3
- package/dist/cjs/charts/adapters/endpointData.js +3 -4
- package/dist/cjs/charts/adapters/endpointDataGet.js +2 -2
- package/dist/cjs/constants/Charts.Const.d.ts +4 -1
- package/dist/cjs/constants/Charts.Const.js +3 -0
- package/dist/cjs/dates/relative/RelativeStatementAdapter.d.ts +1 -1
- package/dist/cjs/dates/relative/RelativeStatementAdapter.js +2 -1
- package/dist/cjs/dates/relative/relative.d.ts +3 -4
- package/dist/cjs/dates/relative/relative.js +5 -9
- package/dist/cjs/filters/adapters/FDToFlatUI.js +2 -2
- package/dist/cjs/filters/adapters/FDToUI.js +2 -2
- package/dist/cjs/filters/adapters/UIToFD.js +2 -2
- package/dist/cjs/filters/adapters/UIToFlatUI.js +2 -2
- package/dist/cjs/filters/adapters/UIToOldLogic.js +2 -2
- package/dist/cjs/filters/adapters/adaptFilterData.js +2 -2
- package/dist/cjs/filters/adapters/flatUIToFD.js +2 -2
- package/dist/cjs/filters/adapters/flatUIToOldLogic.js +2 -2
- package/dist/cjs/filters/adapters/flatUIToUI.js +2 -2
- package/dist/cjs/filters/constants/common/FILTER_SCOPE.d.ts +7 -7
- package/dist/cjs/filters/helpers/OLD_getAggFilters.js +2 -2
- package/dist/cjs/filters/helpers/backend/getLogicByScopes.js +2 -2
- package/dist/cjs/filters/helpers/common/excludeFiltersByAggregateColumn.js +2 -2
- package/dist/cjs/filters/helpers/common/excludeFiltersByParams.js +2 -2
- package/dist/cjs/filters/helpers/common/excludeFiltersByScopes.js +2 -2
- package/dist/cjs/filters/helpers/common/getFiltersByAggregateColumn.js +2 -2
- package/dist/cjs/filters/helpers/common/getFiltersByParams.js +2 -2
- package/dist/cjs/filters/helpers/common/getFiltersByScopes.js +2 -2
- package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.js +2 -2
- package/dist/cjs/filters/helpers/common/getFiltersByVisibility.js +2 -2
- package/dist/cjs/filters/helpers/settings/getFilterSettings.js +4 -4
- package/dist/cjs/filters/helpers/ui/excludeUIFiltersByAggregate.js +2 -2
- package/dist/cjs/filters/helpers/ui/excludeUIFlatFiltersByScopes.js +2 -2
- package/dist/cjs/filters/helpers/ui/getUIFlatFilterByParams.js +2 -2
- package/dist/cjs/filters/helpers/ui/getUIFlatFiltersByParams.js +2 -2
- package/dist/cjs/filters/helpers/ui/getUIFlatFiltersByScopes.js +2 -2
- package/dist/cjs/filters/services/Filters.api.js +4 -7
- package/dist/cjs/filters/services/UChartApi.d.ts +1 -1
- package/dist/cjs/filters/services/UChartApi.js +4 -3
- package/dist/cjs/filters/services/UChartPaginationApi.d.ts +1 -1
- package/dist/cjs/filters/services/UChartPaginationApi.js +5 -4
- package/dist/cjs/format/format.js +2 -2
- package/dist/cjs/general/array/filterNestedTree.js +2 -2
- package/dist/cjs/general/object/objectCopy.js +8 -7
- package/dist/cjs/globalization/interfaces/II18nResource.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +9 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderChartNames.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderMenuActions.d.ts +5 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderRadarType.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderRadarType.js +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +9 -0
- package/dist/cjs/globalization/interfaces/dashboard/II18nDashboard.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModal.d.ts +67 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModal.js +2 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.d.ts +3 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.js +2 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModalErrorMessages.d.ts +3 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModalErrorMessages.js +2 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModalRecurrence.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModalRecurrence.js +2 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModalTimeStamp.d.ts +7 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModalTimeStamp.js +2 -0
- package/dist/cjs/globalization/interfaces/export/index.d.ts +5 -0
- package/dist/cjs/globalization/interfaces/export/index.js +21 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionHour.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.d.ts +5 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.js +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.d.ts +5 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.js +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/panel/I18nPanelColumnInteractive.d.ts +5 -0
- package/dist/cjs/globalization/interfaces/panel/I18nPanelColumnInteractive.js +2 -0
- package/dist/cjs/globalization/interfaces/panel/II18nPanel.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/panel/II18nPanelErrors.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/panel/II18nPanelTooltips.d.ts +3 -0
- package/dist/cjs/globalization/interfaces/panel/index.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/panel/index.js +1 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +4 -1
- package/dist/cjs/globalization/labels/I18N_DEFAULT.d.ts +1 -1
- package/dist/cjs/globalization/labels/I18N_DEFAULT.js +3 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +7 -0
- 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 +7 -2
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +18 -0
- package/dist/cjs/globalization/labels/dashboard/I18N_DASHBOARD.js +2 -0
- package/dist/cjs/globalization/labels/export/I18N_EXPORT_MODAL.d.ts +5 -0
- package/dist/cjs/globalization/labels/export/I18N_EXPORT_MODAL.js +78 -0
- package/dist/cjs/globalization/labels/export/index.d.ts +1 -0
- package/dist/cjs/globalization/labels/export/index.js +17 -0
- package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +20 -5
- package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +9 -0
- package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.js +4 -1
- package/dist/cjs/globalization/service/i18nextBuilder.js +2 -3
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/services/api/getAllQrveys.api.d.ts +1 -1
- package/dist/cjs/services/helpers/Request.js +5 -2
- package/dist/cjs/services/helpers/getDefaultQuestionListOptionsAttributes.js +7 -7
- package/dist/cjs/services/interfaces/IPayloadQrveyAll.d.ts +1 -1
- package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.d.ts +6 -0
- package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.js +10 -0
- package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.d.ts +6 -0
- package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.js +10 -0
- package/dist/cjs/themes/constants/AUTOMATIC_CSS_VARIABLES.d.ts +39 -0
- package/dist/cjs/themes/constants/AUTOMATIC_CSS_VARIABLES.js +22 -0
- package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.d.ts +15 -0
- package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.js +19 -0
- package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.d.ts +15 -0
- package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +19 -0
- package/dist/cjs/themes/constants/CANVAS_CSS_VARIABLES.d.ts +6 -0
- package/dist/cjs/themes/constants/CANVAS_CSS_VARIABLES.js +10 -0
- package/dist/cjs/themes/constants/CHANNEL_BLACK_COLOR.d.ts +5 -0
- package/dist/cjs/themes/constants/CHANNEL_BLACK_COLOR.js +12 -0
- package/dist/cjs/themes/constants/CHANNEL_WHITE_COLOR.d.ts +5 -0
- package/dist/cjs/themes/constants/CHANNEL_WHITE_COLOR.js +12 -0
- package/dist/cjs/themes/constants/COLOR_NAME.d.ts +154 -0
- package/dist/cjs/themes/constants/COLOR_NAME.js +157 -0
- package/dist/cjs/themes/constants/COLOR_TYPE.d.ts +7 -0
- package/dist/cjs/themes/constants/COLOR_TYPE.js +11 -0
- package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +7 -0
- package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.js +11 -0
- package/dist/cjs/themes/constants/GLOBAL_CSS_VARIABLES.d.ts +15 -0
- package/dist/cjs/themes/constants/GLOBAL_CSS_VARIABLES.js +19 -0
- package/dist/cjs/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.d.ts +4 -0
- package/dist/cjs/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +7 -0
- package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +4 -0
- package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.js +7 -0
- package/dist/cjs/themes/constants/index.d.ts +14 -0
- package/dist/cjs/themes/constants/index.js +30 -0
- package/dist/cjs/themes/helpers/calculateHSP.d.ts +8 -0
- package/dist/cjs/themes/helpers/calculateHSP.js +20 -0
- package/dist/cjs/themes/helpers/getCSSVariablesByDestination.d.ts +40 -0
- package/dist/cjs/themes/helpers/getCSSVariablesByDestination.js +18 -0
- package/dist/cjs/themes/helpers/getChannelsByHexadecimalColor.d.ts +8 -0
- package/dist/cjs/themes/helpers/getChannelsByHexadecimalColor.js +26 -0
- package/dist/cjs/themes/helpers/getChannelsByNameColor.d.ts +8 -0
- package/dist/cjs/themes/helpers/getChannelsByNameColor.js +26 -0
- package/dist/cjs/themes/helpers/getChannelsByRgbaColor.d.ts +8 -0
- package/dist/cjs/themes/helpers/getChannelsByRgbaColor.js +25 -0
- package/dist/cjs/themes/helpers/getHexadecimalOpacity.d.ts +7 -0
- package/dist/cjs/themes/helpers/getHexadecimalOpacity.js +19 -0
- package/dist/cjs/themes/helpers/getRgbaOpacity.d.ts +7 -0
- package/dist/cjs/themes/helpers/getRgbaOpacity.js +21 -0
- package/dist/cjs/themes/helpers/index.d.ts +12 -0
- package/dist/cjs/themes/helpers/index.js +28 -0
- package/dist/cjs/themes/helpers/isDarkColor.d.ts +7 -0
- package/dist/cjs/themes/helpers/isDarkColor.js +15 -0
- package/dist/cjs/themes/helpers/isHexadecimalColor.d.ts +6 -0
- package/dist/cjs/themes/helpers/isHexadecimalColor.js +15 -0
- package/dist/cjs/themes/helpers/isRGBAColor.d.ts +6 -0
- package/dist/cjs/themes/helpers/isRGBAColor.js +15 -0
- package/dist/cjs/themes/helpers/lightOrDark.d.ts +9 -0
- package/dist/cjs/themes/helpers/lightOrDark.js +40 -0
- package/dist/cjs/themes/helpers/setAutomaticCSSVariablesForDark.d.ts +9 -0
- package/dist/cjs/themes/helpers/setAutomaticCSSVariablesForDark.js +43 -0
- package/dist/cjs/themes/index.d.ts +3 -0
- package/dist/cjs/themes/index.js +19 -0
- package/dist/cjs/themes/interfaces/IColorCSSVariableDestination.d.ts +5 -0
- package/dist/cjs/themes/interfaces/IColorCSSVariableDestination.js +2 -0
- package/dist/cjs/themes/interfaces/IColorChannel.d.ts +9 -0
- package/dist/cjs/themes/interfaces/IColorChannel.js +2 -0
- package/dist/cjs/themes/interfaces/IColorType.d.ts +5 -0
- package/dist/cjs/themes/interfaces/IColorType.js +2 -0
- package/dist/cjs/themes/interfaces/index.d.ts +3 -0
- package/dist/cjs/themes/interfaces/index.js +19 -0
- package/dist/cjs/tokens/getCleanCustomTokens.d.ts +9 -0
- package/dist/cjs/tokens/getCleanCustomTokens.js +22 -0
- package/dist/cjs/tokens/getCustomtonTokens.d.ts +3 -3
- package/dist/cjs/tokens/getCustomtonTokens.js +7 -4
- package/dist/cjs/tokens/getCustomtonTokensWithKeys.js +1 -1
- package/dist/cjs/tokens/index.d.ts +1 -0
- package/dist/cjs/tokens/index.js +1 -0
- package/dist/constants/Charts.Const.d.ts +4 -1
- package/dist/constants/Charts.Const.js +3 -0
- package/dist/dates/relative/RelativeStatementAdapter.d.ts +1 -1
- package/dist/dates/relative/RelativeStatementAdapter.js +1 -1
- package/dist/dates/relative/relative.d.ts +3 -4
- package/dist/dates/relative/relative.js +4 -5
- package/dist/filters/adapters/FDToFlatUI.js +2 -2
- package/dist/filters/adapters/FDToUI.js +2 -2
- package/dist/filters/adapters/UIToFD.js +2 -2
- package/dist/filters/adapters/UIToFlatUI.js +2 -2
- package/dist/filters/adapters/UIToOldLogic.js +2 -2
- package/dist/filters/adapters/adaptFilterData.js +2 -2
- package/dist/filters/adapters/flatUIToFD.js +2 -2
- package/dist/filters/adapters/flatUIToOldLogic.js +2 -2
- package/dist/filters/adapters/flatUIToUI.js +2 -2
- package/dist/filters/constants/common/FILTER_SCOPE.d.ts +7 -7
- package/dist/filters/helpers/OLD_getAggFilters.js +2 -2
- package/dist/filters/helpers/backend/getLogicByScopes.js +2 -2
- package/dist/filters/helpers/common/excludeFiltersByAggregateColumn.js +2 -2
- package/dist/filters/helpers/common/excludeFiltersByParams.js +2 -2
- package/dist/filters/helpers/common/excludeFiltersByScopes.js +2 -2
- package/dist/filters/helpers/common/getFiltersByAggregateColumn.js +2 -2
- package/dist/filters/helpers/common/getFiltersByParams.js +2 -2
- package/dist/filters/helpers/common/getFiltersByScopes.js +2 -2
- package/dist/filters/helpers/common/getFiltersByScopesIds.js +2 -2
- package/dist/filters/helpers/common/getFiltersByVisibility.js +2 -2
- package/dist/filters/helpers/settings/getFilterSettings.js +4 -4
- package/dist/filters/helpers/ui/excludeUIFiltersByAggregate.js +2 -2
- package/dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js +2 -2
- package/dist/filters/helpers/ui/getUIFlatFilterByParams.js +2 -2
- package/dist/filters/helpers/ui/getUIFlatFiltersByParams.js +2 -2
- package/dist/filters/helpers/ui/getUIFlatFiltersByScopes.js +2 -2
- package/dist/filters/services/Filters.api.js +2 -2
- package/dist/filters/services/UChartApi.d.ts +1 -1
- package/dist/filters/services/UChartApi.js +3 -4
- package/dist/filters/services/UChartPaginationApi.d.ts +1 -1
- package/dist/filters/services/UChartPaginationApi.js +4 -5
- package/dist/format/format.js +2 -2
- package/dist/general/array/filterNestedTree.js +2 -2
- package/dist/general/object/objectCopy.js +8 -7
- package/dist/globalization/interfaces/II18nResource.d.ts +2 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +9 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.d.ts +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderChartNames.d.ts +2 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderMenuActions.d.ts +5 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderRadarType.d.ts +6 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +9 -0
- package/dist/globalization/interfaces/dashboard/II18nDashboard.d.ts +1 -0
- package/dist/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
- package/dist/globalization/interfaces/export/II18nExportingModal.d.ts +67 -0
- package/dist/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.d.ts +3 -0
- package/dist/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.js +1 -0
- package/dist/globalization/interfaces/export/II18nExportingModalErrorMessages.d.ts +3 -0
- package/dist/globalization/interfaces/export/II18nExportingModalErrorMessages.js +1 -0
- package/dist/globalization/interfaces/export/II18nExportingModalRecurrence.d.ts +6 -0
- package/dist/globalization/interfaces/export/II18nExportingModalRecurrence.js +1 -0
- package/dist/globalization/interfaces/export/II18nExportingModalTimeStamp.d.ts +7 -0
- package/dist/globalization/interfaces/export/II18nExportingModalTimeStamp.js +1 -0
- package/dist/globalization/interfaces/export/index.d.ts +5 -0
- package/dist/globalization/interfaces/export/index.js +5 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionHour.d.ts +2 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.d.ts +5 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.js +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.d.ts +5 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.js +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +4 -0
- package/dist/globalization/interfaces/panel/I18nPanelColumnInteractive.d.ts +5 -0
- package/dist/globalization/interfaces/panel/I18nPanelColumnInteractive.js +1 -0
- package/dist/globalization/interfaces/panel/II18nPanel.d.ts +2 -0
- package/dist/globalization/interfaces/panel/II18nPanelErrors.d.ts +1 -0
- package/dist/globalization/interfaces/panel/II18nPanelTooltips.d.ts +3 -0
- package/dist/globalization/interfaces/panel/index.d.ts +1 -0
- package/dist/globalization/interfaces/panel/index.js +1 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +4 -1
- package/dist/globalization/labels/I18N_DEFAULT.d.ts +1 -1
- package/dist/globalization/labels/I18N_DEFAULT.js +3 -1
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +7 -0
- 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 +7 -2
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +18 -0
- package/dist/globalization/labels/dashboard/I18N_DASHBOARD.js +2 -0
- package/dist/globalization/labels/export/I18N_EXPORT_MODAL.d.ts +5 -0
- package/dist/globalization/labels/export/I18N_EXPORT_MODAL.js +75 -0
- package/dist/globalization/labels/export/index.d.ts +1 -0
- package/dist/globalization/labels/export/index.js +1 -0
- package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +20 -5
- package/dist/globalization/labels/panel/I18N_PANEL.js +9 -0
- package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +4 -1
- package/dist/globalization/service/i18nextBuilder.js +3 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/services/api/getAllQrveys.api.d.ts +1 -1
- package/dist/services/helpers/Request.js +5 -2
- package/dist/services/helpers/getDefaultQuestionListOptionsAttributes.js +7 -7
- package/dist/services/interfaces/IPayloadQrveyAll.d.ts +1 -1
- package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.d.ts +6 -0
- package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.js +7 -0
- package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.d.ts +6 -0
- package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.js +7 -0
- package/dist/themes/constants/AUTOMATIC_CSS_VARIABLES.d.ts +39 -0
- package/dist/themes/constants/AUTOMATIC_CSS_VARIABLES.js +19 -0
- package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.d.ts +15 -0
- package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.js +16 -0
- package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.d.ts +15 -0
- package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +16 -0
- package/dist/themes/constants/CANVAS_CSS_VARIABLES.d.ts +6 -0
- package/dist/themes/constants/CANVAS_CSS_VARIABLES.js +7 -0
- package/dist/themes/constants/CHANNEL_BLACK_COLOR.d.ts +5 -0
- package/dist/themes/constants/CHANNEL_BLACK_COLOR.js +9 -0
- package/dist/themes/constants/CHANNEL_WHITE_COLOR.d.ts +5 -0
- package/dist/themes/constants/CHANNEL_WHITE_COLOR.js +9 -0
- package/dist/themes/constants/COLOR_NAME.d.ts +154 -0
- package/dist/themes/constants/COLOR_NAME.js +154 -0
- package/dist/themes/constants/COLOR_TYPE.d.ts +7 -0
- package/dist/themes/constants/COLOR_TYPE.js +8 -0
- package/dist/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +7 -0
- package/dist/themes/constants/CSS_VARIABLE_DESTINATION.js +8 -0
- package/dist/themes/constants/GLOBAL_CSS_VARIABLES.d.ts +15 -0
- package/dist/themes/constants/GLOBAL_CSS_VARIABLES.js +16 -0
- package/dist/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.d.ts +4 -0
- package/dist/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +4 -0
- package/dist/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +4 -0
- package/dist/themes/constants/RGBA_REGULAR_EXPRESION.js +4 -0
- package/dist/themes/constants/index.d.ts +14 -0
- package/dist/themes/constants/index.js +14 -0
- package/dist/themes/helpers/calculateHSP.d.ts +8 -0
- package/dist/themes/helpers/calculateHSP.js +16 -0
- package/dist/themes/helpers/getCSSVariablesByDestination.d.ts +40 -0
- package/dist/themes/helpers/getCSSVariablesByDestination.js +14 -0
- package/dist/themes/helpers/getChannelsByHexadecimalColor.d.ts +8 -0
- package/dist/themes/helpers/getChannelsByHexadecimalColor.js +22 -0
- package/dist/themes/helpers/getChannelsByNameColor.d.ts +8 -0
- package/dist/themes/helpers/getChannelsByNameColor.js +22 -0
- package/dist/themes/helpers/getChannelsByRgbaColor.d.ts +8 -0
- package/dist/themes/helpers/getChannelsByRgbaColor.js +21 -0
- package/dist/themes/helpers/getHexadecimalOpacity.d.ts +7 -0
- package/dist/themes/helpers/getHexadecimalOpacity.js +15 -0
- package/dist/themes/helpers/getRgbaOpacity.d.ts +7 -0
- package/dist/themes/helpers/getRgbaOpacity.js +17 -0
- package/dist/themes/helpers/index.d.ts +12 -0
- package/dist/themes/helpers/index.js +12 -0
- package/dist/themes/helpers/isDarkColor.d.ts +7 -0
- package/dist/themes/helpers/isDarkColor.js +11 -0
- package/dist/themes/helpers/isHexadecimalColor.d.ts +6 -0
- package/dist/themes/helpers/isHexadecimalColor.js +11 -0
- package/dist/themes/helpers/isRGBAColor.d.ts +6 -0
- package/dist/themes/helpers/isRGBAColor.js +11 -0
- package/dist/themes/helpers/lightOrDark.d.ts +9 -0
- package/dist/themes/helpers/lightOrDark.js +36 -0
- package/dist/themes/helpers/setAutomaticCSSVariablesForDark.d.ts +9 -0
- package/dist/themes/helpers/setAutomaticCSSVariablesForDark.js +39 -0
- package/dist/themes/index.d.ts +3 -0
- package/dist/themes/index.js +3 -0
- package/dist/themes/interfaces/IColorCSSVariableDestination.d.ts +5 -0
- package/dist/themes/interfaces/IColorCSSVariableDestination.js +1 -0
- package/dist/themes/interfaces/IColorChannel.d.ts +9 -0
- package/dist/themes/interfaces/IColorChannel.js +1 -0
- package/dist/themes/interfaces/IColorType.d.ts +5 -0
- package/dist/themes/interfaces/IColorType.js +1 -0
- package/dist/themes/interfaces/index.d.ts +3 -0
- package/dist/themes/interfaces/index.js +3 -0
- package/dist/tokens/getCleanCustomTokens.d.ts +9 -0
- package/dist/tokens/getCleanCustomTokens.js +18 -0
- package/dist/tokens/getCustomtonTokens.d.ts +3 -3
- package/dist/tokens/getCustomtonTokens.js +8 -5
- package/dist/tokens/getCustomtonTokensWithKeys.js +1 -1
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.js +1 -0
- package/package.json +20 -17
- package/dist/cjs/tokens/getCustomtonTokensWithKeys.test.js +0 -23
- package/dist/tokens/getCustomtonTokensWithKeys.test.js +0 -21
- /package/dist/{cjs/tokens/getCustomtonTokensWithKeys.test.d.ts → globalization/interfaces/chart_builder/II18nChartBuilderRadarType.js} +0 -0
- /package/dist/{tokens/getCustomtonTokensWithKeys.test.d.ts → globalization/interfaces/export/II18nExportingModal.js} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCSSVariablesByDestination = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
5
|
+
const AUTOMATIC_CSS_VARIABLES_1 = require("../constants/AUTOMATIC_CSS_VARIABLES");
|
|
6
|
+
const CSS_VARIABLE_DESTINATION_1 = require("../constants/CSS_VARIABLE_DESTINATION");
|
|
7
|
+
/**
|
|
8
|
+
* Gets CSS variables depending on the destination of them.
|
|
9
|
+
* - Destination is the place where the CSS variables are going to be applied. With this, the right CSS variables are searched and set.
|
|
10
|
+
* @param destination the string of the destination.
|
|
11
|
+
* @returns the CSS variables and their values.
|
|
12
|
+
*/
|
|
13
|
+
function getCSSVariablesByDestination(destination = CSS_VARIABLE_DESTINATION_1.CSS_VARIABLE_DESTINATION.GLOBAL) {
|
|
14
|
+
if ((0, isEmpty_1.isEmpty)(destination))
|
|
15
|
+
return AUTOMATIC_CSS_VARIABLES_1.AUTOMATIC_CANVAS_CSS_VARIABLES[CSS_VARIABLE_DESTINATION_1.CSS_VARIABLE_DESTINATION.GLOBAL];
|
|
16
|
+
return AUTOMATIC_CSS_VARIABLES_1.AUTOMATIC_CANVAS_CSS_VARIABLES[destination];
|
|
17
|
+
}
|
|
18
|
+
exports.getCSSVariablesByDestination = getCSSVariablesByDestination;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IColorChannel } from "../interfaces/IColorChannel";
|
|
2
|
+
/**
|
|
3
|
+
* Gets the RGBA channels based on the given string Hexadecimal color
|
|
4
|
+
* - If the given argument is undefined or invalid, the function will return a channel related to white color
|
|
5
|
+
* @param color the Hexadecimal color
|
|
6
|
+
* @returns the RGBA channels
|
|
7
|
+
*/
|
|
8
|
+
export declare function getChannelsByHexadecimalColor(hexadecimal?: string): IColorChannel;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getChannelsByHexadecimalColor = void 0;
|
|
4
|
+
const CHANNEL_WHITE_COLOR_1 = require("../constants/CHANNEL_WHITE_COLOR");
|
|
5
|
+
const getHexadecimalOpacity_1 = require("./getHexadecimalOpacity");
|
|
6
|
+
const isHexadecimalColor_1 = require("./isHexadecimalColor");
|
|
7
|
+
/**
|
|
8
|
+
* Gets the RGBA channels based on the given string Hexadecimal color
|
|
9
|
+
* - If the given argument is undefined or invalid, the function will return a channel related to white color
|
|
10
|
+
* @param color the Hexadecimal color
|
|
11
|
+
* @returns the RGBA channels
|
|
12
|
+
*/
|
|
13
|
+
function getChannelsByHexadecimalColor(hexadecimal = "") {
|
|
14
|
+
if (!(0, isHexadecimalColor_1.isHexadecimalColor)(hexadecimal))
|
|
15
|
+
return CHANNEL_WHITE_COLOR_1.CHANNEL_WHITE_COLOR;
|
|
16
|
+
const colorCode = +`0x${hexadecimal
|
|
17
|
+
.slice(1)
|
|
18
|
+
.replace(hexadecimal.length < 5 && /./g, "$&$&")}`;
|
|
19
|
+
return {
|
|
20
|
+
r: colorCode >> 16,
|
|
21
|
+
g: (colorCode >> 8) & 255,
|
|
22
|
+
b: colorCode & 255,
|
|
23
|
+
a: (0, getHexadecimalOpacity_1.getHexadecimalOpacity)(hexadecimal),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.getChannelsByHexadecimalColor = getChannelsByHexadecimalColor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IColorChannel } from "../interfaces/IColorChannel";
|
|
2
|
+
/**
|
|
3
|
+
* Gets the RGBA channels based on the given string name color
|
|
4
|
+
* - If the given argument is undefined or invalid, the function will return a channel related to white color
|
|
5
|
+
* @param color the name color
|
|
6
|
+
* @returns the RGBA channels
|
|
7
|
+
*/
|
|
8
|
+
export declare function getChannelsByNameColor(name?: string): IColorChannel;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getChannelsByNameColor = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
5
|
+
const CHANNEL_WHITE_COLOR_1 = require("../constants/CHANNEL_WHITE_COLOR");
|
|
6
|
+
const COLOR_NAME_1 = require("../constants/COLOR_NAME");
|
|
7
|
+
/**
|
|
8
|
+
* Gets the RGBA channels based on the given string name color
|
|
9
|
+
* - If the given argument is undefined or invalid, the function will return a channel related to white color
|
|
10
|
+
* @param color the name color
|
|
11
|
+
* @returns the RGBA channels
|
|
12
|
+
*/
|
|
13
|
+
function getChannelsByNameColor(name = "") {
|
|
14
|
+
const nameColorChannel = COLOR_NAME_1.COLOR_NAME[String(name).toLowerCase()];
|
|
15
|
+
if ((0, isEmpty_1.isEmpty)(nameColorChannel) ||
|
|
16
|
+
!Array.isArray(nameColorChannel) ||
|
|
17
|
+
nameColorChannel.length !== 3)
|
|
18
|
+
return CHANNEL_WHITE_COLOR_1.CHANNEL_WHITE_COLOR;
|
|
19
|
+
return {
|
|
20
|
+
r: nameColorChannel[0],
|
|
21
|
+
g: nameColorChannel[1],
|
|
22
|
+
b: nameColorChannel[2],
|
|
23
|
+
a: 1,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.getChannelsByNameColor = getChannelsByNameColor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IColorChannel } from "../interfaces/IColorChannel";
|
|
2
|
+
/**
|
|
3
|
+
* Gets the RGBA channels based on the given string RGBA color
|
|
4
|
+
* - If the given argument is undefined or invalid, the function will return a channel related to white color
|
|
5
|
+
* @param color the RGBA color
|
|
6
|
+
* @returns the RGBA channels
|
|
7
|
+
*/
|
|
8
|
+
export declare function getChannelsByRgbaColor(rgba?: string): IColorChannel;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getChannelsByRgbaColor = void 0;
|
|
4
|
+
const CHANNEL_WHITE_COLOR_1 = require("../constants/CHANNEL_WHITE_COLOR");
|
|
5
|
+
const RGBA_REGULAR_EXPRESION_1 = require("../constants/RGBA_REGULAR_EXPRESION");
|
|
6
|
+
const getRgbaOpacity_1 = require("./getRgbaOpacity");
|
|
7
|
+
const isRGBAColor_1 = require("./isRGBAColor");
|
|
8
|
+
/**
|
|
9
|
+
* Gets the RGBA channels based on the given string RGBA color
|
|
10
|
+
* - If the given argument is undefined or invalid, the function will return a channel related to white color
|
|
11
|
+
* @param color the RGBA color
|
|
12
|
+
* @returns the RGBA channels
|
|
13
|
+
*/
|
|
14
|
+
function getChannelsByRgbaColor(rgba = "") {
|
|
15
|
+
if (!(0, isRGBAColor_1.isRGBAColor)(rgba))
|
|
16
|
+
return CHANNEL_WHITE_COLOR_1.CHANNEL_WHITE_COLOR;
|
|
17
|
+
const colors = rgba.toLowerCase().match(RGBA_REGULAR_EXPRESION_1.RGBA_REGULAR_EXPRESSION);
|
|
18
|
+
return {
|
|
19
|
+
r: Number(colors[1]),
|
|
20
|
+
g: Number(colors[2]),
|
|
21
|
+
b: Number(colors[3]),
|
|
22
|
+
a: (0, getRgbaOpacity_1.getRgbaOpacity)(rgba),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
exports.getChannelsByRgbaColor = getChannelsByRgbaColor;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the Alpha channel (opacity) base on the hexadecimal color
|
|
3
|
+
* - If the alpha channel is not set into the given parameter or the calculation is NaN, the function will return 1
|
|
4
|
+
* @param hexadecimal hexadecimal color
|
|
5
|
+
* @returns the Alpha channel (opacity)
|
|
6
|
+
*/
|
|
7
|
+
export declare function getHexadecimalOpacity(hexadecimal?: string): number;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHexadecimalOpacity = void 0;
|
|
4
|
+
const isNaNV2_1 = require("../../general/mix/isNaNV2");
|
|
5
|
+
const isHexadecimalColor_1 = require("./isHexadecimalColor");
|
|
6
|
+
/**
|
|
7
|
+
* Gets the Alpha channel (opacity) base on the hexadecimal color
|
|
8
|
+
* - If the alpha channel is not set into the given parameter or the calculation is NaN, the function will return 1
|
|
9
|
+
* @param hexadecimal hexadecimal color
|
|
10
|
+
* @returns the Alpha channel (opacity)
|
|
11
|
+
*/
|
|
12
|
+
function getHexadecimalOpacity(hexadecimal = "") {
|
|
13
|
+
if (!(0, isHexadecimalColor_1.isHexadecimalColor)(hexadecimal))
|
|
14
|
+
return 1;
|
|
15
|
+
const opacityHexa = hexadecimal.slice(7) || "FF";
|
|
16
|
+
const opacity = parseInt(opacityHexa, 16) / 255;
|
|
17
|
+
return (0, isNaNV2_1.isNaNV2)(opacity) ? 1 : opacity;
|
|
18
|
+
}
|
|
19
|
+
exports.getHexadecimalOpacity = getHexadecimalOpacity;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the Alpha channel (opacity) base on the RGBA color
|
|
3
|
+
* * - If the alpha channel is not set into the given parameter or the calculation is NaN, the function will return 1
|
|
4
|
+
* @param hexadecimal RGBA color
|
|
5
|
+
* @returns the Alpha channel (opacity)
|
|
6
|
+
*/
|
|
7
|
+
export declare function getRgbaOpacity(rgba?: string): number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRgbaOpacity = void 0;
|
|
4
|
+
const isNaNV2_1 = require("../../general/mix/isNaNV2");
|
|
5
|
+
const RGBA_REGULAR_EXPRESION_1 = require("../constants/RGBA_REGULAR_EXPRESION");
|
|
6
|
+
const isRGBAColor_1 = require("./isRGBAColor");
|
|
7
|
+
/**
|
|
8
|
+
* Gets the Alpha channel (opacity) base on the RGBA color
|
|
9
|
+
* * - If the alpha channel is not set into the given parameter or the calculation is NaN, the function will return 1
|
|
10
|
+
* @param hexadecimal RGBA color
|
|
11
|
+
* @returns the Alpha channel (opacity)
|
|
12
|
+
*/
|
|
13
|
+
function getRgbaOpacity(rgba = "") {
|
|
14
|
+
var _a;
|
|
15
|
+
if (!(0, isRGBAColor_1.isRGBAColor)(rgba))
|
|
16
|
+
return 1;
|
|
17
|
+
const colors = rgba.toLowerCase().match(RGBA_REGULAR_EXPRESION_1.RGBA_REGULAR_EXPRESSION);
|
|
18
|
+
const opacity = (_a = Number(colors[4])) !== null && _a !== void 0 ? _a : 1;
|
|
19
|
+
return (0, isNaNV2_1.isNaNV2)(opacity) ? 1 : opacity;
|
|
20
|
+
}
|
|
21
|
+
exports.getRgbaOpacity = getRgbaOpacity;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./calculateHSP";
|
|
2
|
+
export * from "./getChannelsByHexadecimalColor";
|
|
3
|
+
export * from "./getChannelsByNameColor";
|
|
4
|
+
export * from "./getChannelsByRgbaColor";
|
|
5
|
+
export * from "./getCSSVariablesByDestination";
|
|
6
|
+
export * from "./getHexadecimalOpacity";
|
|
7
|
+
export * from "./getRgbaOpacity";
|
|
8
|
+
export * from "./isDarkColor";
|
|
9
|
+
export * from "./isHexadecimalColor";
|
|
10
|
+
export * from "./isRGBAColor";
|
|
11
|
+
export * from "./lightOrDark";
|
|
12
|
+
export * from "./setAutomaticCSSVariablesForDark";
|
|
@@ -0,0 +1,28 @@
|
|
|
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("./calculateHSP"), exports);
|
|
18
|
+
__exportStar(require("./getChannelsByHexadecimalColor"), exports);
|
|
19
|
+
__exportStar(require("./getChannelsByNameColor"), exports);
|
|
20
|
+
__exportStar(require("./getChannelsByRgbaColor"), exports);
|
|
21
|
+
__exportStar(require("./getCSSVariablesByDestination"), exports);
|
|
22
|
+
__exportStar(require("./getHexadecimalOpacity"), exports);
|
|
23
|
+
__exportStar(require("./getRgbaOpacity"), exports);
|
|
24
|
+
__exportStar(require("./isDarkColor"), exports);
|
|
25
|
+
__exportStar(require("./isHexadecimalColor"), exports);
|
|
26
|
+
__exportStar(require("./isRGBAColor"), exports);
|
|
27
|
+
__exportStar(require("./lightOrDark"), exports);
|
|
28
|
+
__exportStar(require("./setAutomaticCSSVariablesForDark"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines if the Color is dark or light.
|
|
3
|
+
* Uses the lightOrDark module.
|
|
4
|
+
* @param color the string of the color (RGBA, or Hexadecimal)
|
|
5
|
+
* @returns true: the color is dark.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isDarkColor(color: string, brightnessThreshold?: number): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDarkColor = void 0;
|
|
4
|
+
const COLOR_TYPE_1 = require("../constants/COLOR_TYPE");
|
|
5
|
+
const lightOrDark_1 = require("./lightOrDark");
|
|
6
|
+
/**
|
|
7
|
+
* Determines if the Color is dark or light.
|
|
8
|
+
* Uses the lightOrDark module.
|
|
9
|
+
* @param color the string of the color (RGBA, or Hexadecimal)
|
|
10
|
+
* @returns true: the color is dark.
|
|
11
|
+
*/
|
|
12
|
+
function isDarkColor(color, brightnessThreshold = 127.5) {
|
|
13
|
+
return (0, lightOrDark_1.lightOrDark)(color, brightnessThreshold) === COLOR_TYPE_1.COLOR_TYPE.DARK;
|
|
14
|
+
}
|
|
15
|
+
exports.isDarkColor = isDarkColor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isHexadecimalColor = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
5
|
+
const HEXADECIMAL_REGULAR_EXPRESSION_1 = require("../constants/HEXADECIMAL_REGULAR_EXPRESSION");
|
|
6
|
+
/**
|
|
7
|
+
* Validates if the given color is an hexadecimal structure
|
|
8
|
+
* @param color the string of the color
|
|
9
|
+
* @returns true: the color is an hexadecimal type
|
|
10
|
+
*/
|
|
11
|
+
function isHexadecimalColor(color = "") {
|
|
12
|
+
return (typeof color === "string" &&
|
|
13
|
+
!(0, isEmpty_1.isEmpty)(color.match(HEXADECIMAL_REGULAR_EXPRESSION_1.HEXADECIMAL_REGULAR_EXPRESSION)));
|
|
14
|
+
}
|
|
15
|
+
exports.isHexadecimalColor = isHexadecimalColor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isRGBAColor = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
5
|
+
const RGBA_REGULAR_EXPRESION_1 = require("../constants/RGBA_REGULAR_EXPRESION");
|
|
6
|
+
/**
|
|
7
|
+
* Validates if the given color is an RGBA structure
|
|
8
|
+
* @param color the string of the color
|
|
9
|
+
* @returns true: the color is an RGBA type
|
|
10
|
+
*/
|
|
11
|
+
function isRGBAColor(color = "") {
|
|
12
|
+
return (typeof color === "string" &&
|
|
13
|
+
!(0, isEmpty_1.isEmpty)(color.toLowerCase().match(RGBA_REGULAR_EXPRESION_1.RGBA_REGULAR_EXPRESSION)));
|
|
14
|
+
}
|
|
15
|
+
exports.isRGBAColor = isRGBAColor;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IColorType } from "../interfaces/IColorType";
|
|
2
|
+
/**
|
|
3
|
+
* Validates if the given color is light or dark
|
|
4
|
+
* The module extracts the rgba channels and calculate the brightness or darkness by a threshold
|
|
5
|
+
* - If there is not color provided, the returning will be Light
|
|
6
|
+
* @param color the string of the color.
|
|
7
|
+
* @returns the color type (Dark or Light)
|
|
8
|
+
*/
|
|
9
|
+
export declare function lightOrDark(color: string, brightnessThreshold?: number, opacityThreshold?: number): IColorType;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lightOrDark = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
5
|
+
const COLOR_TYPE_1 = require("../constants/COLOR_TYPE");
|
|
6
|
+
const calculateHSP_1 = require("./calculateHSP");
|
|
7
|
+
const getChannelsByHexadecimalColor_1 = require("./getChannelsByHexadecimalColor");
|
|
8
|
+
const getChannelsByNameColor_1 = require("./getChannelsByNameColor");
|
|
9
|
+
const getChannelsByRgbaColor_1 = require("./getChannelsByRgbaColor");
|
|
10
|
+
const isHexadecimalColor_1 = require("./isHexadecimalColor");
|
|
11
|
+
const isRGBAColor_1 = require("./isRGBAColor");
|
|
12
|
+
/**
|
|
13
|
+
* Validates if the given color is light or dark
|
|
14
|
+
* The module extracts the rgba channels and calculate the brightness or darkness by a threshold
|
|
15
|
+
* - If there is not color provided, the returning will be Light
|
|
16
|
+
* @param color the string of the color.
|
|
17
|
+
* @returns the color type (Dark or Light)
|
|
18
|
+
*/
|
|
19
|
+
function lightOrDark(color, brightnessThreshold = 127.5, opacityThreshold = 0.5) {
|
|
20
|
+
if ((0, isEmpty_1.isEmpty)(color) || typeof color !== "string")
|
|
21
|
+
return COLOR_TYPE_1.COLOR_TYPE.LIGHT;
|
|
22
|
+
let rgbaChannel = { r: 0, g: 0, b: 0, a: 1 };
|
|
23
|
+
const rgbaColor = (0, isRGBAColor_1.isRGBAColor)(color);
|
|
24
|
+
const hexadecimalColor = (0, isHexadecimalColor_1.isHexadecimalColor)(color);
|
|
25
|
+
if (rgbaColor) {
|
|
26
|
+
rgbaChannel = (0, getChannelsByRgbaColor_1.getChannelsByRgbaColor)(color);
|
|
27
|
+
}
|
|
28
|
+
else if (hexadecimalColor) {
|
|
29
|
+
rgbaChannel = (0, getChannelsByHexadecimalColor_1.getChannelsByHexadecimalColor)(color);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
rgbaChannel = (0, getChannelsByNameColor_1.getChannelsByNameColor)(color);
|
|
33
|
+
}
|
|
34
|
+
const hsp = (0, calculateHSP_1.calculateHSP)(rgbaChannel);
|
|
35
|
+
if (hsp > brightnessThreshold || rgbaChannel.a < opacityThreshold) {
|
|
36
|
+
return COLOR_TYPE_1.COLOR_TYPE.LIGHT;
|
|
37
|
+
}
|
|
38
|
+
return COLOR_TYPE_1.COLOR_TYPE.DARK;
|
|
39
|
+
}
|
|
40
|
+
exports.lightOrDark = lightOrDark;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IColorCSSVariableDestination } from "../interfaces/IColorCSSVariableDestination";
|
|
2
|
+
import { IColorType } from "../interfaces/IColorType";
|
|
3
|
+
/**
|
|
4
|
+
* Sets CSS Variables into a given wrapper collection.
|
|
5
|
+
* For the Dark Theme feature.
|
|
6
|
+
* @param colorType the color type
|
|
7
|
+
* @param wrapperTags the html elements to set the CSS variables
|
|
8
|
+
*/
|
|
9
|
+
export declare function setAutomaticCSSVariablesForDark(colorType: IColorType, wrapperTags: string[], destination?: IColorCSSVariableDestination): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setAutomaticCSSVariablesForDark = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
5
|
+
const CSS_VARIABLE_DESTINATION_1 = require("../constants/CSS_VARIABLE_DESTINATION");
|
|
6
|
+
const getCSSVariablesByDestination_1 = require("./getCSSVariablesByDestination");
|
|
7
|
+
/**
|
|
8
|
+
* Sets CSS Variables into a given wrapper collection.
|
|
9
|
+
* For the Dark Theme feature.
|
|
10
|
+
* @param colorType the color type
|
|
11
|
+
* @param wrapperTags the html elements to set the CSS variables
|
|
12
|
+
*/
|
|
13
|
+
function setAutomaticCSSVariablesForDark(colorType, wrapperTags, destination = CSS_VARIABLE_DESTINATION_1.CSS_VARIABLE_DESTINATION.GLOBAL) {
|
|
14
|
+
if ((0, isEmpty_1.isEmpty)(colorType) || !Array.isArray(wrapperTags))
|
|
15
|
+
return;
|
|
16
|
+
const cssVariables = (0, getCSSVariablesByDestination_1.getCSSVariablesByDestination)(destination);
|
|
17
|
+
const cssVariablesKeys = Object.keys(cssVariables[colorType] || {});
|
|
18
|
+
wrapperTags.forEach((wrapperTag) => {
|
|
19
|
+
const wrapperElement = document.querySelector(wrapperTag);
|
|
20
|
+
setCSSVariable(wrapperElement, cssVariablesKeys, cssVariables[colorType]);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
exports.setAutomaticCSSVariablesForDark = setAutomaticCSSVariablesForDark;
|
|
24
|
+
/**
|
|
25
|
+
* Sets CSS Variables into a given wrapper collection.
|
|
26
|
+
* For the Dark Theme feature.
|
|
27
|
+
* @param colorType the color type
|
|
28
|
+
* @param wrapper the html element to set the CSS variables
|
|
29
|
+
* @param cssVariables the CSS variables name to apply the style property
|
|
30
|
+
*/
|
|
31
|
+
function setCSSVariable(wrapper, cssVariables, cssProperties) {
|
|
32
|
+
if ((0, isEmpty_1.isEmpty)(wrapper) || (0, isEmpty_1.isEmpty)(cssVariables))
|
|
33
|
+
return;
|
|
34
|
+
cssVariables.forEach((cssVariable) => {
|
|
35
|
+
const cssProperty = cssProperties[cssVariable];
|
|
36
|
+
if ((0, isEmpty_1.isEmpty)(cssProperty)) {
|
|
37
|
+
wrapper.style.removeProperty(cssVariable);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
wrapper.style.setProperty(cssVariable, cssProperty);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./constants"), exports);
|
|
18
|
+
__exportStar(require("./interfaces"), exports);
|
|
19
|
+
__exportStar(require("./helpers"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./IColorChannel"), exports);
|
|
18
|
+
__exportStar(require("./IColorCSSVariableDestination"), exports);
|
|
19
|
+
__exportStar(require("./IColorType"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ICustomTokensComplex } from "../interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* The function `getCleanCustomTokens` takes an object `customTokens` and returns a new object
|
|
4
|
+
* `cleanTokens` with filtered values based on certain conditions.
|
|
5
|
+
* @param {ICustomTokensComplex} customTokens - The `customTokens` parameter is an object of type
|
|
6
|
+
* `ICustomTokensComplex`.
|
|
7
|
+
* @returns a cleaned version of the customTokens object.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getCleanCustomTokens(customTokens?: ICustomTokensComplex): ICustomTokensComplex;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCleanCustomTokens = void 0;
|
|
4
|
+
const general_1 = require("../general");
|
|
5
|
+
/**
|
|
6
|
+
* The function `getCleanCustomTokens` takes an object `customTokens` and returns a new object
|
|
7
|
+
* `cleanTokens` with filtered values based on certain conditions.
|
|
8
|
+
* @param {ICustomTokensComplex} customTokens - The `customTokens` parameter is an object of type
|
|
9
|
+
* `ICustomTokensComplex`.
|
|
10
|
+
* @returns a cleaned version of the customTokens object.
|
|
11
|
+
*/
|
|
12
|
+
function getCleanCustomTokens(customTokens = {}) {
|
|
13
|
+
const cleanTokens = {};
|
|
14
|
+
for (const tokenKey in customTokens) {
|
|
15
|
+
if ((0, general_1._hasProperty)(customTokens, tokenKey)) {
|
|
16
|
+
const tokensGroup = customTokens[tokenKey];
|
|
17
|
+
cleanTokens[tokenKey] = tokensGroup.filter((token) => !(0, general_1.isEmpty)(token.value) && (token.label || token.key));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return cleanTokens;
|
|
21
|
+
}
|
|
22
|
+
exports.getCleanCustomTokens = getCleanCustomTokens;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ICustomTokensComplex, ICustomTokensSimple } from "../interfaces";
|
|
2
2
|
/**
|
|
3
3
|
* The function `getCustomtonTokens` takes a configuration object and returns a parsed version of the
|
|
4
|
-
* custom tokens.
|
|
4
|
+
* custom tokens, with keys and values appropriately formatted.
|
|
5
5
|
* @param {ICustomTokensSimple | ICustomTokensComplex} customtonTokensConfig - The
|
|
6
|
-
* `customtonTokensConfig` parameter is an object that can
|
|
7
|
-
* `ICustomTokensComplex`.
|
|
6
|
+
* `customtonTokensConfig` parameter is an object that can have two possible types:
|
|
7
|
+
* `ICustomTokensSimple` or `ICustomTokensComplex`.
|
|
8
8
|
* @returns an object of type `ICustomTokensComplex`.
|
|
9
9
|
*/
|
|
10
10
|
export declare function getCustomtonTokens(customtonTokensConfig: ICustomTokensSimple | ICustomTokensComplex): ICustomTokensComplex;
|
|
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getCustomtonTokens = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const general_1 = require("../general");
|
|
6
|
+
const getCleanCustomTokens_1 = require("./getCleanCustomTokens");
|
|
6
7
|
const getCustomtonTokensWithKeys_1 = require("./getCustomtonTokensWithKeys");
|
|
7
8
|
/**
|
|
8
9
|
* The function `getCustomtonTokens` takes a configuration object and returns a parsed version of the
|
|
9
|
-
* custom tokens.
|
|
10
|
+
* custom tokens, with keys and values appropriately formatted.
|
|
10
11
|
* @param {ICustomTokensSimple | ICustomTokensComplex} customtonTokensConfig - The
|
|
11
|
-
* `customtonTokensConfig` parameter is an object that can
|
|
12
|
-
* `ICustomTokensComplex`.
|
|
12
|
+
* `customtonTokensConfig` parameter is an object that can have two possible types:
|
|
13
|
+
* `ICustomTokensSimple` or `ICustomTokensComplex`.
|
|
13
14
|
* @returns an object of type `ICustomTokensComplex`.
|
|
14
15
|
*/
|
|
15
16
|
function getCustomtonTokens(customtonTokensConfig) {
|
|
@@ -37,6 +38,8 @@ function getCustomtonTokens(customtonTokensConfig) {
|
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
+
if ((0, general_1.isEmpty)(customTokensparsed[constants_1.CUSTOM_TOKEN_DEFAULT_KEY]))
|
|
42
|
+
delete customTokensparsed[constants_1.CUSTOM_TOKEN_DEFAULT_KEY];
|
|
43
|
+
return (0, getCleanCustomTokens_1.getCleanCustomTokens)(customTokensparsed);
|
|
41
44
|
}
|
|
42
45
|
exports.getCustomtonTokens = getCustomtonTokens;
|
|
@@ -13,6 +13,6 @@ const general_1 = require("../general");
|
|
|
13
13
|
* `CustomTokens` object.
|
|
14
14
|
*/
|
|
15
15
|
function getCustomtonTokensWithKeys(customTokens) {
|
|
16
|
-
return customTokens.map((token) => (Object.assign(Object.assign({}, token), { key: (0, general_1.camelize)((token === null || token === void 0 ? void 0 : token.key) || token.label) })));
|
|
16
|
+
return customTokens.map((token) => (Object.assign(Object.assign({}, token), { label: token.label || token.key, key: (0, general_1.camelize)((token === null || token === void 0 ? void 0 : token.key) || token.label) })));
|
|
17
17
|
}
|
|
18
18
|
exports.getCustomtonTokensWithKeys = getCustomtonTokensWithKeys;
|
package/dist/cjs/tokens/index.js
CHANGED
|
@@ -18,3 +18,4 @@ __exportStar(require("./isTokenLabel"), exports);
|
|
|
18
18
|
__exportStar(require("./getCustomtonTokensWithKeys"), exports);
|
|
19
19
|
__exportStar(require("./getCustomtonTokens"), exports);
|
|
20
20
|
__exportStar(require("./getCustomTokenBoxParse"), exports);
|
|
21
|
+
__exportStar(require("./getCleanCustomTokens"), exports);
|
|
@@ -26,7 +26,10 @@ export declare enum CHART_TYPE {
|
|
|
26
26
|
BULLET_METRIC = "BULLET",
|
|
27
27
|
SUMMARY_CHART = "SUMMARY_CHART",
|
|
28
28
|
MINMAX_CHART = "MINMAX_CHART",
|
|
29
|
-
COMBINED_CHART = "COMBINED_CHART"
|
|
29
|
+
COMBINED_CHART = "COMBINED_CHART",
|
|
30
|
+
RADAR_CHART = "RADAR_CHART",
|
|
31
|
+
TREEMAP_CHART = "TREEMAP_CHART",
|
|
32
|
+
AREA_CHART = "AREA_CHART"
|
|
30
33
|
}
|
|
31
34
|
export declare enum CHART_DIMENSION {
|
|
32
35
|
CATEGORIES = "categories",
|
|
@@ -28,6 +28,9 @@ export var CHART_TYPE;
|
|
|
28
28
|
CHART_TYPE["SUMMARY_CHART"] = "SUMMARY_CHART";
|
|
29
29
|
CHART_TYPE["MINMAX_CHART"] = "MINMAX_CHART";
|
|
30
30
|
CHART_TYPE["COMBINED_CHART"] = "COMBINED_CHART";
|
|
31
|
+
CHART_TYPE["RADAR_CHART"] = "RADAR_CHART";
|
|
32
|
+
CHART_TYPE["TREEMAP_CHART"] = "TREEMAP_CHART";
|
|
33
|
+
CHART_TYPE["AREA_CHART"] = "AREA_CHART";
|
|
31
34
|
})(CHART_TYPE || (CHART_TYPE = {}));
|
|
32
35
|
export var CHART_DIMENSION;
|
|
33
36
|
(function (CHART_DIMENSION) {
|