@qrvey/utils 1.12.0-8 → 1.12.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/dist/charts/adapters/endpointData.js +3 -4
- package/dist/charts/adapters/endpointDataGet.js +2 -2
- package/dist/cjs/charts/adapters/endpointData.js +2 -3
- package/dist/cjs/charts/adapters/endpointDataGet.js +1 -1
- package/dist/cjs/constants/Charts.Const.d.ts +4 -1
- package/dist/cjs/constants/Charts.Const.js +3 -0
- 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/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/interfaces/builder/IFilterBuilderDisplayEvent.d.ts +4 -0
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderDisplayEvent.js +2 -0
- package/dist/cjs/filters/interfaces/builder/index.d.ts +1 -0
- package/dist/cjs/filters/interfaces/builder/index.js +1 -0
- package/dist/cjs/filters/services/UChartApi.js +2 -2
- package/dist/cjs/filters/services/UChartPaginationApi.js +3 -3
- 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/chart_builder/II18nChartBuilderThreshold.d.ts +2 -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/chart_builder/I18N_CHART_BUILDER_THRESHOLD.js +2 -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/interfaces/CustomTokens.interface.d.ts +7 -0
- package/dist/cjs/services/helpers/Request.js +5 -2
- 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/COLOR_TYPE.d.ts +4 -0
- package/dist/cjs/themes/constants/COLOR_TYPE.js +8 -0
- package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +4 -0
- package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.js +8 -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 +1 -0
- package/dist/cjs/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +4 -0
- package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +1 -0
- package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.js +4 -0
- package/dist/cjs/themes/constants/index.d.ts +10 -0
- package/dist/cjs/themes/constants/index.js +26 -0
- package/dist/cjs/themes/helpers/getCSSVariablesByDestination.d.ts +45 -0
- package/dist/cjs/themes/helpers/getCSSVariablesByDestination.js +15 -0
- package/dist/cjs/themes/helpers/index.d.ts +7 -0
- package/dist/cjs/themes/helpers/index.js +23 -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 +14 -0
- package/dist/cjs/themes/helpers/isRGBAColor.d.ts +6 -0
- package/dist/cjs/themes/helpers/isRGBAColor.js +14 -0
- package/dist/cjs/themes/helpers/lightOrDark.d.ts +9 -0
- package/dist/cjs/themes/helpers/lightOrDark.js +56 -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 +2 -0
- package/dist/cjs/themes/interfaces/IColorCSSVariableDestination.js +2 -0
- package/dist/cjs/themes/interfaces/IColorType.d.ts +2 -0
- package/dist/cjs/themes/interfaces/IColorType.js +2 -0
- package/dist/cjs/themes/interfaces/index.d.ts +2 -0
- package/dist/cjs/themes/interfaces/index.js +18 -0
- package/dist/cjs/tokens/getCleanCustomTokens.d.ts +9 -0
- package/dist/cjs/tokens/getCleanCustomTokens.js +22 -0
- package/dist/cjs/tokens/getCustomTokenBoxParse.d.ts +2 -2
- 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/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/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/interfaces/builder/IFilterBuilderDisplayEvent.d.ts +4 -0
- package/dist/filters/interfaces/builder/IFilterBuilderDisplayEvent.js +1 -0
- package/dist/filters/interfaces/builder/index.d.ts +1 -0
- package/dist/filters/interfaces/builder/index.js +1 -0
- package/dist/filters/services/UChartApi.js +2 -2
- package/dist/filters/services/UChartPaginationApi.js +3 -3
- 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/II18nChartBuilderRadarType.js +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +9 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderThreshold.d.ts +2 -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/II18nExportingModal.js +1 -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/chart_builder/I18N_CHART_BUILDER_THRESHOLD.js +2 -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/interfaces/CustomTokens.interface.d.ts +7 -0
- package/dist/services/helpers/Request.js +5 -2
- 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/COLOR_TYPE.d.ts +4 -0
- package/dist/themes/constants/COLOR_TYPE.js +5 -0
- package/dist/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +4 -0
- package/dist/themes/constants/CSS_VARIABLE_DESTINATION.js +5 -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 +1 -0
- package/dist/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +1 -0
- package/dist/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +1 -0
- package/dist/themes/constants/RGBA_REGULAR_EXPRESION.js +1 -0
- package/dist/themes/constants/index.d.ts +10 -0
- package/dist/themes/constants/index.js +10 -0
- package/dist/themes/helpers/getCSSVariablesByDestination.d.ts +45 -0
- package/dist/themes/helpers/getCSSVariablesByDestination.js +11 -0
- package/dist/themes/helpers/index.d.ts +7 -0
- package/dist/themes/helpers/index.js +7 -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 +10 -0
- package/dist/themes/helpers/isRGBAColor.d.ts +6 -0
- package/dist/themes/helpers/isRGBAColor.js +10 -0
- package/dist/themes/helpers/lightOrDark.d.ts +9 -0
- package/dist/themes/helpers/lightOrDark.js +52 -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 +2 -0
- package/dist/themes/interfaces/IColorCSSVariableDestination.js +1 -0
- package/dist/themes/interfaces/IColorType.d.ts +2 -0
- package/dist/themes/interfaces/IColorType.js +1 -0
- package/dist/themes/interfaces/index.d.ts +2 -0
- package/dist/themes/interfaces/index.js +2 -0
- package/dist/tokens/getCleanCustomTokens.d.ts +9 -0
- package/dist/tokens/getCleanCustomTokens.js +18 -0
- package/dist/tokens/getCustomTokenBoxParse.d.ts +2 -2
- 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 +1 -1
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import i18next from "i18next";
|
|
11
|
-
import {
|
|
11
|
+
import { isEmpty } from "../../general";
|
|
12
12
|
import { mergeDeep } from "../../general/object/mergeDeep";
|
|
13
13
|
export class I18nServiceBuilder {
|
|
14
14
|
static buildI18n(i18nResource, i18nDefault) {
|
|
@@ -16,9 +16,8 @@ export class I18nServiceBuilder {
|
|
|
16
16
|
}
|
|
17
17
|
static _initI18n(i18nResource = {}, i18nDefault = {}) {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_get(i18nResource, "common.aggregates")) {
|
|
19
|
+
//Temporarily we meed to review this code
|
|
20
|
+
if (!i18next.isInitialized || !isEmpty(i18nResource)) {
|
|
22
21
|
yield this.getI18nInstance(i18nResource, i18nDefault, i18next);
|
|
23
22
|
}
|
|
24
23
|
return new I18nServiceConcrete(i18next);
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -9,3 +9,10 @@ export interface ICustomTokensSimple {
|
|
|
9
9
|
export interface ICustomTokensComplex {
|
|
10
10
|
[key: string]: CustomTokens[];
|
|
11
11
|
}
|
|
12
|
+
export interface ICustomTokensBoxDetail {
|
|
13
|
+
alias: string;
|
|
14
|
+
label: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ICustomTokensBox {
|
|
17
|
+
[key: string]: ICustomTokensBoxDetail[];
|
|
18
|
+
}
|
|
@@ -107,9 +107,12 @@ export class Request {
|
|
|
107
107
|
static resolveRequest(reqData) {
|
|
108
108
|
const url = this.makeUrl(reqData.config, reqData.url, reqData.params);
|
|
109
109
|
const config = this.requestConfig(reqData);
|
|
110
|
-
|
|
110
|
+
const controller = new AbortController();
|
|
111
|
+
const { signal } = controller;
|
|
112
|
+
return fetch(url, Object.assign(Object.assign({}, config), { signal }))
|
|
111
113
|
.then((res) => this.checkStatus(res))
|
|
112
|
-
.then((res) => res.json())
|
|
114
|
+
.then((res) => res.json())
|
|
115
|
+
.finally(() => signal.aborted && controller.abort());
|
|
113
116
|
}
|
|
114
117
|
static get(config, url = "", params) {
|
|
115
118
|
return this.resolveRequest({ config, url, type: "GET", params });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CANVAS_CSS_VARIABLES } from "./CANVAS_CSS_VARIABLES";
|
|
2
|
+
/**
|
|
3
|
+
* Collection of CSS Variables for Dark Theme and its assigned values. Canvas porpuses
|
|
4
|
+
*/
|
|
5
|
+
export const AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK = {
|
|
6
|
+
[CANVAS_CSS_VARIABLES.BORDER]: "#FFFFFF20",
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CANVAS_CSS_VARIABLES } from "./CANVAS_CSS_VARIABLES";
|
|
2
|
+
/**
|
|
3
|
+
* Collection of CSS Variables for Light Theme and its assigned values. Canvas porpuses
|
|
4
|
+
*/
|
|
5
|
+
export const AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT = {
|
|
6
|
+
[CANVAS_CSS_VARIABLES.BORDER]: "#00000010",
|
|
7
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection of CSS Variables for the theme and its assigned values.
|
|
3
|
+
*/
|
|
4
|
+
export declare const AUTOMATIC_CANVAS_CSS_VARIABLES: {
|
|
5
|
+
GLOBAL: {
|
|
6
|
+
DARK: {
|
|
7
|
+
"--qv-global-header-background-color": string;
|
|
8
|
+
"--qv-global-opacity-black-color": string;
|
|
9
|
+
"--qv-global-border-color": string;
|
|
10
|
+
"--qv-global-divider-color": string;
|
|
11
|
+
"--qv-global-hover-color": string;
|
|
12
|
+
"--qv-global-placeholder-color": string;
|
|
13
|
+
"--qv-pills-background-color": string;
|
|
14
|
+
"--qv-global-text-color": string;
|
|
15
|
+
"--qv-global-text-secondary-color": string;
|
|
16
|
+
"--qv-global-text-tertiary-color": string;
|
|
17
|
+
};
|
|
18
|
+
LIGHT: {
|
|
19
|
+
"--qv-global-header-background-color": string;
|
|
20
|
+
"--qv-global-opacity-black-color": string;
|
|
21
|
+
"--qv-global-border-color": string;
|
|
22
|
+
"--qv-global-divider-color": string;
|
|
23
|
+
"--qv-global-hover-color": string;
|
|
24
|
+
"--qv-global-placeholder-color": string;
|
|
25
|
+
"--qv-pills-background-color": string;
|
|
26
|
+
"--qv-global-text-color": any;
|
|
27
|
+
"--qv-global-text-secondary-color": string;
|
|
28
|
+
"--qv-global-text-tertiary-color": string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
CANVAS: {
|
|
32
|
+
DARK: {
|
|
33
|
+
"--qv-canvas-border-color": string;
|
|
34
|
+
};
|
|
35
|
+
LIGHT: {
|
|
36
|
+
"--qv-canvas-border-color": string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK } from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK";
|
|
2
|
+
import { AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT } from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT";
|
|
3
|
+
import { AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK } from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK";
|
|
4
|
+
import { AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT } from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT";
|
|
5
|
+
import { COLOR_TYPE } from "./COLOR_TYPE";
|
|
6
|
+
import { CSS_VARIABLE_DESTINATION } from "./CSS_VARIABLE_DESTINATION";
|
|
7
|
+
/**
|
|
8
|
+
* Collection of CSS Variables for the theme and its assigned values.
|
|
9
|
+
*/
|
|
10
|
+
export const AUTOMATIC_CANVAS_CSS_VARIABLES = {
|
|
11
|
+
[CSS_VARIABLE_DESTINATION.GLOBAL]: {
|
|
12
|
+
[COLOR_TYPE.DARK]: AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK,
|
|
13
|
+
[COLOR_TYPE.LIGHT]: AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT,
|
|
14
|
+
},
|
|
15
|
+
[CSS_VARIABLE_DESTINATION.CANVAS]: {
|
|
16
|
+
[COLOR_TYPE.DARK]: AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK,
|
|
17
|
+
[COLOR_TYPE.LIGHT]: AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection of CSS Variables for Dark Theme and its assigned values.
|
|
3
|
+
*/
|
|
4
|
+
export declare const AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK: {
|
|
5
|
+
"--qv-global-header-background-color": string;
|
|
6
|
+
"--qv-global-opacity-black-color": string;
|
|
7
|
+
"--qv-global-border-color": string;
|
|
8
|
+
"--qv-global-divider-color": string;
|
|
9
|
+
"--qv-global-hover-color": string;
|
|
10
|
+
"--qv-global-placeholder-color": string;
|
|
11
|
+
"--qv-pills-background-color": string;
|
|
12
|
+
"--qv-global-text-color": string;
|
|
13
|
+
"--qv-global-text-secondary-color": string;
|
|
14
|
+
"--qv-global-text-tertiary-color": string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GLOBAL_CSS_VARIABLES } from "./GLOBAL_CSS_VARIABLES";
|
|
2
|
+
/**
|
|
3
|
+
* Collection of CSS Variables for Dark Theme and its assigned values.
|
|
4
|
+
*/
|
|
5
|
+
export const AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK = {
|
|
6
|
+
[GLOBAL_CSS_VARIABLES.HEADER_BACKGROUND_COLOR]: "#FFFFFF20",
|
|
7
|
+
[GLOBAL_CSS_VARIABLES.BACKGROUND_OPACITY_BLACK_COLOR]: "#00000010",
|
|
8
|
+
[GLOBAL_CSS_VARIABLES.BORDER_COLOR]: "#FFFFFF20",
|
|
9
|
+
[GLOBAL_CSS_VARIABLES.DIVIDER_COLOR]: "#FFFFFF20",
|
|
10
|
+
[GLOBAL_CSS_VARIABLES.HOVER_COLOR]: "#FFFFFF10",
|
|
11
|
+
[GLOBAL_CSS_VARIABLES.PLACEHOLDER_COLOR]: "#FFFFFF90",
|
|
12
|
+
[GLOBAL_CSS_VARIABLES.PILLS_BACKGROUND_COLOR]: "#00000020",
|
|
13
|
+
[GLOBAL_CSS_VARIABLES.TEXT_COLOR]: "#FFFFFF",
|
|
14
|
+
[GLOBAL_CSS_VARIABLES.TEXT_SECONDARY_COLOR]: "#FFFFFF90",
|
|
15
|
+
[GLOBAL_CSS_VARIABLES.TEXT_TERTIARY_COLOR]: "#FFFFFF80",
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection of CSS Variables for Light Themes and its assigned values.
|
|
3
|
+
*/
|
|
4
|
+
export declare const AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT: {
|
|
5
|
+
"--qv-global-header-background-color": string;
|
|
6
|
+
"--qv-global-opacity-black-color": string;
|
|
7
|
+
"--qv-global-border-color": string;
|
|
8
|
+
"--qv-global-divider-color": string;
|
|
9
|
+
"--qv-global-hover-color": string;
|
|
10
|
+
"--qv-global-placeholder-color": string;
|
|
11
|
+
"--qv-pills-background-color": string;
|
|
12
|
+
"--qv-global-text-color": any;
|
|
13
|
+
"--qv-global-text-secondary-color": string;
|
|
14
|
+
"--qv-global-text-tertiary-color": string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GLOBAL_CSS_VARIABLES } from "./GLOBAL_CSS_VARIABLES";
|
|
2
|
+
/**
|
|
3
|
+
* Collection of CSS Variables for Light Themes and its assigned values.
|
|
4
|
+
*/
|
|
5
|
+
export const AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT = {
|
|
6
|
+
[GLOBAL_CSS_VARIABLES.HEADER_BACKGROUND_COLOR]: "#00000009",
|
|
7
|
+
[GLOBAL_CSS_VARIABLES.BACKGROUND_OPACITY_BLACK_COLOR]: "#FFFFFF10",
|
|
8
|
+
[GLOBAL_CSS_VARIABLES.BORDER_COLOR]: "#00000020",
|
|
9
|
+
[GLOBAL_CSS_VARIABLES.DIVIDER_COLOR]: "#00000020",
|
|
10
|
+
[GLOBAL_CSS_VARIABLES.HOVER_COLOR]: "#00000010",
|
|
11
|
+
[GLOBAL_CSS_VARIABLES.PLACEHOLDER_COLOR]: "#00000070",
|
|
12
|
+
[GLOBAL_CSS_VARIABLES.PILLS_BACKGROUND_COLOR]: "#FFFFFF40",
|
|
13
|
+
[GLOBAL_CSS_VARIABLES.TEXT_COLOR]: undefined,
|
|
14
|
+
[GLOBAL_CSS_VARIABLES.TEXT_SECONDARY_COLOR]: "#00000080",
|
|
15
|
+
[GLOBAL_CSS_VARIABLES.TEXT_TERTIARY_COLOR]: "#00000070",
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection of CSS Variables to apply for Dark Theme
|
|
3
|
+
*/
|
|
4
|
+
export declare enum GLOBAL_CSS_VARIABLES {
|
|
5
|
+
BACKGROUND_OPACITY_BLACK_COLOR = "--qv-global-opacity-black-color",
|
|
6
|
+
HEADER_BACKGROUND_COLOR = "--qv-global-header-background-color",
|
|
7
|
+
BORDER_COLOR = "--qv-global-border-color",
|
|
8
|
+
DIVIDER_COLOR = "--qv-global-divider-color",
|
|
9
|
+
HOVER_COLOR = "--qv-global-hover-color",
|
|
10
|
+
PLACEHOLDER_COLOR = "--qv-global-placeholder-color",
|
|
11
|
+
PILLS_BACKGROUND_COLOR = "--qv-pills-background-color",
|
|
12
|
+
TEXT_COLOR = "--qv-global-text-color",
|
|
13
|
+
TEXT_SECONDARY_COLOR = "--qv-global-text-secondary-color",
|
|
14
|
+
TEXT_TERTIARY_COLOR = "--qv-global-text-tertiary-color"
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection of CSS Variables to apply for Dark Theme
|
|
3
|
+
*/
|
|
4
|
+
export var GLOBAL_CSS_VARIABLES;
|
|
5
|
+
(function (GLOBAL_CSS_VARIABLES) {
|
|
6
|
+
GLOBAL_CSS_VARIABLES["BACKGROUND_OPACITY_BLACK_COLOR"] = "--qv-global-opacity-black-color";
|
|
7
|
+
GLOBAL_CSS_VARIABLES["HEADER_BACKGROUND_COLOR"] = "--qv-global-header-background-color";
|
|
8
|
+
GLOBAL_CSS_VARIABLES["BORDER_COLOR"] = "--qv-global-border-color";
|
|
9
|
+
GLOBAL_CSS_VARIABLES["DIVIDER_COLOR"] = "--qv-global-divider-color";
|
|
10
|
+
GLOBAL_CSS_VARIABLES["HOVER_COLOR"] = "--qv-global-hover-color";
|
|
11
|
+
GLOBAL_CSS_VARIABLES["PLACEHOLDER_COLOR"] = "--qv-global-placeholder-color";
|
|
12
|
+
GLOBAL_CSS_VARIABLES["PILLS_BACKGROUND_COLOR"] = "--qv-pills-background-color";
|
|
13
|
+
GLOBAL_CSS_VARIABLES["TEXT_COLOR"] = "--qv-global-text-color";
|
|
14
|
+
GLOBAL_CSS_VARIABLES["TEXT_SECONDARY_COLOR"] = "--qv-global-text-secondary-color";
|
|
15
|
+
GLOBAL_CSS_VARIABLES["TEXT_TERTIARY_COLOR"] = "--qv-global-text-tertiary-color";
|
|
16
|
+
})(GLOBAL_CSS_VARIABLES || (GLOBAL_CSS_VARIABLES = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const HEXADECIMAL_REGULAR_EXPRESSION: RegExp;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const HEXADECIMAL_REGULAR_EXPRESSION = /^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RGBA_REGULAR_EXPRESSION: RegExp;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const RGBA_REGULAR_EXPRESSION = /^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK";
|
|
2
|
+
export * from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT";
|
|
3
|
+
export * from "./AUTOMATIC_CSS_VARIABLES";
|
|
4
|
+
export * from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK";
|
|
5
|
+
export * from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT";
|
|
6
|
+
export * from "./COLOR_TYPE";
|
|
7
|
+
export * from "./CSS_VARIABLE_DESTINATION";
|
|
8
|
+
export * from "./GLOBAL_CSS_VARIABLES";
|
|
9
|
+
export * from "./HEXADECIMAL_REGULAR_EXPRESSION";
|
|
10
|
+
export * from "./RGBA_REGULAR_EXPRESION";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK";
|
|
2
|
+
export * from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT";
|
|
3
|
+
export * from "./AUTOMATIC_CSS_VARIABLES";
|
|
4
|
+
export * from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK";
|
|
5
|
+
export * from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT";
|
|
6
|
+
export * from "./COLOR_TYPE";
|
|
7
|
+
export * from "./CSS_VARIABLE_DESTINATION";
|
|
8
|
+
export * from "./GLOBAL_CSS_VARIABLES";
|
|
9
|
+
export * from "./HEXADECIMAL_REGULAR_EXPRESSION";
|
|
10
|
+
export * from "./RGBA_REGULAR_EXPRESION";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IColorCSSVariableDestination } from "../interfaces/IColorCSSVariableDestination";
|
|
2
|
+
/**
|
|
3
|
+
* Gets CSS variables depending on the destination of them.
|
|
4
|
+
* - Destination is the place where the CSS variables are going to be applied. With this, the right CSS variables are searched and set.
|
|
5
|
+
* @param destination the string of the destination.
|
|
6
|
+
* @returns the CSS variables and their values.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCSSVariablesByDestination(destination?: IColorCSSVariableDestination): {
|
|
9
|
+
DARK: {
|
|
10
|
+
"--qv-global-header-background-color": string; /**
|
|
11
|
+
* Gets CSS variables depending on the destination of them.
|
|
12
|
+
* - Destination is the place where the CSS variables are going to be applied. With this, the right CSS variables are searched and set.
|
|
13
|
+
* @param destination the string of the destination.
|
|
14
|
+
* @returns the CSS variables and their values.
|
|
15
|
+
*/
|
|
16
|
+
"--qv-global-opacity-black-color": string;
|
|
17
|
+
"--qv-global-border-color": string;
|
|
18
|
+
"--qv-global-divider-color": string;
|
|
19
|
+
"--qv-global-hover-color": string;
|
|
20
|
+
"--qv-global-placeholder-color": string;
|
|
21
|
+
"--qv-pills-background-color": string;
|
|
22
|
+
"--qv-global-text-color": string;
|
|
23
|
+
"--qv-global-text-secondary-color": string;
|
|
24
|
+
"--qv-global-text-tertiary-color": string;
|
|
25
|
+
};
|
|
26
|
+
LIGHT: {
|
|
27
|
+
"--qv-global-header-background-color": string;
|
|
28
|
+
"--qv-global-opacity-black-color": string;
|
|
29
|
+
"--qv-global-border-color": string;
|
|
30
|
+
"--qv-global-divider-color": string;
|
|
31
|
+
"--qv-global-hover-color": string;
|
|
32
|
+
"--qv-global-placeholder-color": string;
|
|
33
|
+
"--qv-pills-background-color": string;
|
|
34
|
+
"--qv-global-text-color": any;
|
|
35
|
+
"--qv-global-text-secondary-color": string;
|
|
36
|
+
"--qv-global-text-tertiary-color": string;
|
|
37
|
+
};
|
|
38
|
+
} | {
|
|
39
|
+
DARK: {
|
|
40
|
+
"--qv-canvas-border-color": string;
|
|
41
|
+
};
|
|
42
|
+
LIGHT: {
|
|
43
|
+
"--qv-canvas-border-color": string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AUTOMATIC_CANVAS_CSS_VARIABLES } from "../constants/AUTOMATIC_CSS_VARIABLES";
|
|
2
|
+
import { CSS_VARIABLE_DESTINATION } from "../constants/CSS_VARIABLE_DESTINATION";
|
|
3
|
+
/**
|
|
4
|
+
* Gets CSS variables depending on the destination of them.
|
|
5
|
+
* - Destination is the place where the CSS variables are going to be applied. With this, the right CSS variables are searched and set.
|
|
6
|
+
* @param destination the string of the destination.
|
|
7
|
+
* @returns the CSS variables and their values.
|
|
8
|
+
*/
|
|
9
|
+
export function getCSSVariablesByDestination(destination = CSS_VARIABLE_DESTINATION.GLOBAL) {
|
|
10
|
+
return AUTOMATIC_CANVAS_CSS_VARIABLES[destination];
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./getCSSVariablesByDestination";
|
|
2
|
+
export * from "./lightOrDark";
|
|
3
|
+
export * from "./isDarkColor";
|
|
4
|
+
export * from "./isHexadecimalColor";
|
|
5
|
+
export * from "./isRGBAColor";
|
|
6
|
+
export * from "./lightOrDark";
|
|
7
|
+
export * from "./setAutomaticCSSVariablesForDark";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./getCSSVariablesByDestination";
|
|
2
|
+
export * from "./lightOrDark";
|
|
3
|
+
export * from "./isDarkColor";
|
|
4
|
+
export * from "./isHexadecimalColor";
|
|
5
|
+
export * from "./isRGBAColor";
|
|
6
|
+
export * from "./lightOrDark";
|
|
7
|
+
export * from "./setAutomaticCSSVariablesForDark";
|
|
@@ -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,11 @@
|
|
|
1
|
+
import { COLOR_TYPE } from "../constants/COLOR_TYPE";
|
|
2
|
+
import { lightOrDark } from "./lightOrDark";
|
|
3
|
+
/**
|
|
4
|
+
* Determines if the Color is dark or light.
|
|
5
|
+
* Uses the lightOrDark module.
|
|
6
|
+
* @param color the string of the color (RGBA, or Hexadecimal)
|
|
7
|
+
* @returns true: the color is dark.
|
|
8
|
+
*/
|
|
9
|
+
export function isDarkColor(color, brightnessThreshold = 127.5) {
|
|
10
|
+
return lightOrDark(color, brightnessThreshold) === COLOR_TYPE.DARK;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isEmpty } from "../../general/mix/isEmpty";
|
|
2
|
+
import { HEXADECIMAL_REGULAR_EXPRESSION } from "../constants/HEXADECIMAL_REGULAR_EXPRESSION";
|
|
3
|
+
/**
|
|
4
|
+
* Validates if the given color is an hexadecimal structure
|
|
5
|
+
* @param color the string of the color
|
|
6
|
+
* @returns true: the color is an hexadecimal type
|
|
7
|
+
*/
|
|
8
|
+
export function isHexadecimalColor(color = "") {
|
|
9
|
+
return !isEmpty(color === null || color === void 0 ? void 0 : color.match(HEXADECIMAL_REGULAR_EXPRESSION));
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isEmpty } from "../../general/mix/isEmpty";
|
|
2
|
+
import { RGBA_REGULAR_EXPRESSION } from "../constants/RGBA_REGULAR_EXPRESION";
|
|
3
|
+
/**
|
|
4
|
+
* Validates if the given color is an RGBA structure
|
|
5
|
+
* @param color the string of the color
|
|
6
|
+
* @returns true: the color is an RGBA type
|
|
7
|
+
*/
|
|
8
|
+
export function isRGBAColor(color = "") {
|
|
9
|
+
return !isEmpty(color === null || color === void 0 ? void 0 : color.match(RGBA_REGULAR_EXPRESSION));
|
|
10
|
+
}
|
|
@@ -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,52 @@
|
|
|
1
|
+
import { isEmpty } from "../../general/mix/isEmpty";
|
|
2
|
+
import { COLOR_TYPE } from "../constants/COLOR_TYPE";
|
|
3
|
+
import { RGBA_REGULAR_EXPRESSION } from "../constants/RGBA_REGULAR_EXPRESION";
|
|
4
|
+
import { isHexadecimalColor } from "./isHexadecimalColor";
|
|
5
|
+
import { isRGBAColor } from "./isRGBAColor";
|
|
6
|
+
/**
|
|
7
|
+
* Validates if the given color is light or dark
|
|
8
|
+
* The module extracts the rgba channels and calculate the brightness or darkness by a threshold
|
|
9
|
+
* - If there is not color provided, the returning will be Light
|
|
10
|
+
* @param color the string of the color.
|
|
11
|
+
* @returns the color type (Dark or Light)
|
|
12
|
+
*/
|
|
13
|
+
export function lightOrDark(color, brightnessThreshold = 127.5, opacityThreshold = 0.5) {
|
|
14
|
+
if (isEmpty(color))
|
|
15
|
+
return COLOR_TYPE.LIGHT;
|
|
16
|
+
const rgbaColor = isRGBAColor(color);
|
|
17
|
+
const hexadecimalColor = isHexadecimalColor(color);
|
|
18
|
+
if (!rgbaColor && !hexadecimalColor)
|
|
19
|
+
return;
|
|
20
|
+
let r, g, b, a;
|
|
21
|
+
if (rgbaColor) {
|
|
22
|
+
const colors = color.match(RGBA_REGULAR_EXPRESSION);
|
|
23
|
+
r = Number(colors[1]);
|
|
24
|
+
g = Number(colors[2]);
|
|
25
|
+
b = Number(colors[3]);
|
|
26
|
+
a = rgbaOpacity(color);
|
|
27
|
+
}
|
|
28
|
+
if (hexadecimalColor) {
|
|
29
|
+
const colorCode = +`0x${color
|
|
30
|
+
.slice(1)
|
|
31
|
+
.replace(color.length < 5 && /./g, "$&$&")}`;
|
|
32
|
+
r = colorCode >> 16;
|
|
33
|
+
g = (colorCode >> 8) & 255;
|
|
34
|
+
b = colorCode & 255;
|
|
35
|
+
a = hexadecimalOpacity(color);
|
|
36
|
+
}
|
|
37
|
+
// HSP equation from http://alienryderflex.com/hsp.html
|
|
38
|
+
const hsp = Math.sqrt(0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b));
|
|
39
|
+
if (hsp > brightnessThreshold || a < opacityThreshold) {
|
|
40
|
+
return COLOR_TYPE.LIGHT;
|
|
41
|
+
}
|
|
42
|
+
return COLOR_TYPE.DARK;
|
|
43
|
+
}
|
|
44
|
+
function hexadecimalOpacity(hexadecimal) {
|
|
45
|
+
const opacityHexa = hexadecimal.slice(7) || "FF";
|
|
46
|
+
return parseInt(opacityHexa, 16) / 255;
|
|
47
|
+
}
|
|
48
|
+
function rgbaOpacity(rgba) {
|
|
49
|
+
var _a;
|
|
50
|
+
const colors = rgba.match(RGBA_REGULAR_EXPRESSION);
|
|
51
|
+
return (_a = Number(colors[4])) !== null && _a !== void 0 ? _a : 1;
|
|
52
|
+
}
|
|
@@ -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,39 @@
|
|
|
1
|
+
import { isEmpty } from "../../general/mix/isEmpty";
|
|
2
|
+
import { CSS_VARIABLE_DESTINATION } from "../constants/CSS_VARIABLE_DESTINATION";
|
|
3
|
+
import { getCSSVariablesByDestination } from "./getCSSVariablesByDestination";
|
|
4
|
+
/**
|
|
5
|
+
* Sets CSS Variables into a given wrapper collection.
|
|
6
|
+
* For the Dark Theme feature.
|
|
7
|
+
* @param colorType the color type
|
|
8
|
+
* @param wrapperTags the html elements to set the CSS variables
|
|
9
|
+
*/
|
|
10
|
+
export function setAutomaticCSSVariablesForDark(colorType, wrapperTags, destination = CSS_VARIABLE_DESTINATION.GLOBAL) {
|
|
11
|
+
if (isEmpty(colorType) || isEmpty(wrapperTags))
|
|
12
|
+
return;
|
|
13
|
+
const cssVariables = getCSSVariablesByDestination(destination);
|
|
14
|
+
const cssVariablesKeys = Object.keys(cssVariables[colorType] || {});
|
|
15
|
+
wrapperTags.forEach((wrapperTag) => {
|
|
16
|
+
const wrapperElement = document.querySelector(wrapperTag);
|
|
17
|
+
setCSSVariable(wrapperElement, cssVariablesKeys, cssVariables[colorType]);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Sets CSS Variables into a given wrapper collection.
|
|
22
|
+
* For the Dark Theme feature.
|
|
23
|
+
* @param colorType the color type
|
|
24
|
+
* @param wrapper the html element to set the CSS variables
|
|
25
|
+
* @param cssVariables the CSS variables name to apply the style property
|
|
26
|
+
*/
|
|
27
|
+
function setCSSVariable(wrapper, cssVariables, cssProperties) {
|
|
28
|
+
if (isEmpty(wrapper) || isEmpty(cssVariables))
|
|
29
|
+
return;
|
|
30
|
+
cssVariables.forEach((cssVariable) => {
|
|
31
|
+
const cssProperty = cssProperties[cssVariable];
|
|
32
|
+
if (isEmpty(cssProperty)) {
|
|
33
|
+
wrapper.style.removeProperty(cssVariable);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
wrapper.style.setProperty(cssVariable, cssProperty);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|