@gooddata/sdk-ui-kit 11.13.0-alpha.1 → 11.13.0-alpha.2
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/esm/@ui/UiAsyncTable/UiAsyncTable/UiAsyncTableBulkActions.d.ts.map +1 -1
- package/esm/@ui/UiAsyncTable/UiAsyncTable/UiAsyncTableBulkActions.js +2 -2
- package/esm/@ui/UiAsyncTable/UiAsyncTable/UiAsyncTableBulkActions.js.map +1 -1
- package/esm/@ui/UiAsyncTable/UiAsyncTable/UiAsyncTableDropdownItem.d.ts +1 -2
- package/esm/@ui/UiAsyncTable/UiAsyncTable/UiAsyncTableDropdownItem.d.ts.map +1 -1
- package/esm/@ui/UiAsyncTable/UiAsyncTable/UiAsyncTableDropdownItem.js +3 -3
- package/esm/@ui/UiAsyncTable/UiAsyncTable/UiAsyncTableDropdownItem.js.map +1 -1
- package/esm/@ui/UiAsyncTable/UiAsyncTable/UiAsyncTableFilter.d.ts.map +1 -1
- package/esm/@ui/UiAsyncTable/UiAsyncTable/UiAsyncTableFilter.js +2 -1
- package/esm/@ui/UiAsyncTable/UiAsyncTable/UiAsyncTableFilter.js.map +1 -1
- package/esm/@ui/UiAsyncTable/types.d.ts +3 -0
- package/esm/@ui/UiAsyncTable/types.d.ts.map +1 -1
- package/esm/@ui/UiBadge/UiBadge.d.ts +0 -1
- package/esm/@ui/UiBadge/UiBadge.d.ts.map +1 -1
- package/esm/@ui/UiBadge/UiBadge.js +0 -1
- package/esm/@ui/UiBadge/UiBadge.js.map +1 -1
- package/esm/@ui/UiButton/UiButton.d.ts.map +1 -1
- package/esm/@ui/UiButton/UiButton.js +1 -1
- package/esm/@ui/UiButton/UiButton.js.map +1 -1
- package/esm/@ui/UiCheckbox/UiCheckbox.d.ts.map +1 -1
- package/esm/@ui/UiCheckbox/UiCheckbox.js +1 -1
- package/esm/@ui/UiCheckbox/UiCheckbox.js.map +1 -1
- package/esm/@ui/UiPaginationButton/UiPaginationButton.d.ts +85 -0
- package/esm/@ui/UiPaginationButton/UiPaginationButton.d.ts.map +1 -0
- package/esm/@ui/UiPaginationButton/UiPaginationButton.js +28 -0
- package/esm/@ui/UiPaginationButton/UiPaginationButton.js.map +1 -0
- package/esm/ChartSorting/ChartSorting.d.ts +0 -4
- package/esm/ChartSorting/ChartSorting.d.ts.map +1 -1
- package/esm/ChartSorting/ChartSorting.js +1 -4
- package/esm/ChartSorting/ChartSorting.js.map +1 -1
- package/esm/ColorPicker/ColorPicker.d.ts +1 -4
- package/esm/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/esm/ColorPicker/ColorPicker.js +6 -7
- package/esm/ColorPicker/ColorPicker.js.map +1 -1
- package/esm/DocumentHeader/DocumentHeader.d.ts +1 -1
- package/esm/DocumentHeader/DocumentHeader.d.ts.map +1 -1
- package/esm/DocumentHeader/DocumentHeader.js +1 -1
- package/esm/DocumentHeader/DocumentHeader.js.map +1 -1
- package/esm/DocumentHeader/index.d.ts +1 -1
- package/esm/DocumentHeader/index.d.ts.map +1 -1
- package/esm/DocumentHeader/index.js +2 -1
- package/esm/DocumentHeader/index.js.map +1 -1
- package/esm/FilterLabel/FilterLabel.d.ts +1 -4
- package/esm/FilterLabel/FilterLabel.d.ts.map +1 -1
- package/esm/FilterLabel/FilterLabel.js +7 -7
- package/esm/FilterLabel/FilterLabel.js.map +1 -1
- package/esm/Form/InputWithNumberFormat.d.ts +2 -39
- package/esm/Form/InputWithNumberFormat.d.ts.map +1 -1
- package/esm/Form/InputWithNumberFormat.js +33 -50
- package/esm/Form/InputWithNumberFormat.js.map +1 -1
- package/esm/Header/Header.d.ts +1 -2
- package/esm/Header/Header.d.ts.map +1 -1
- package/esm/Header/Header.js +7 -7
- package/esm/Header/Header.js.map +1 -1
- package/esm/Header/HeaderDataMenu.d.ts +0 -1
- package/esm/Header/HeaderDataMenu.d.ts.map +1 -1
- package/esm/Header/HeaderDataMenu.js +1 -1
- package/esm/Header/HeaderDataMenu.js.map +1 -1
- package/esm/Header/HeaderHelp.d.ts +0 -1
- package/esm/Header/HeaderHelp.d.ts.map +1 -1
- package/esm/Header/HeaderHelp.js +1 -1
- package/esm/Header/HeaderHelp.js.map +1 -1
- package/esm/Header/HeaderMenu.d.ts +1 -2
- package/esm/Header/HeaderMenu.d.ts.map +1 -1
- package/esm/Header/HeaderMenu.js +4 -4
- package/esm/Header/HeaderMenu.js.map +1 -1
- package/esm/Header/HeaderWorkspacePicker.d.ts +0 -1
- package/esm/Header/HeaderWorkspacePicker.d.ts.map +1 -1
- package/esm/Header/HeaderWorkspacePicker.js +1 -1
- package/esm/Header/HeaderWorkspacePicker.js.map +1 -1
- package/esm/Header/HeaderWorkspacePickerItem.d.ts +0 -1
- package/esm/Header/HeaderWorkspacePickerItem.d.ts.map +1 -1
- package/esm/Header/HeaderWorkspacePickerItem.js +1 -1
- package/esm/Header/HeaderWorkspacePickerItem.js.map +1 -1
- package/esm/List/InsightListItem.d.ts +1 -4
- package/esm/List/InsightListItem.d.ts.map +1 -1
- package/esm/List/InsightListItem.js +3 -6
- package/esm/List/InsightListItem.js.map +1 -1
- package/esm/List/LegacyInvertableList.d.ts +0 -1
- package/esm/List/LegacyInvertableList.d.ts.map +1 -1
- package/esm/List/LegacyInvertableList.js +3 -4
- package/esm/List/LegacyInvertableList.js.map +1 -1
- package/esm/List/LegacyMultiSelectList.d.ts +1 -2
- package/esm/List/LegacyMultiSelectList.d.ts.map +1 -1
- package/esm/List/LegacyMultiSelectList.js +7 -12
- package/esm/List/LegacyMultiSelectList.js.map +1 -1
- package/esm/List/LegacyMultiSelectListItem.d.ts +0 -6
- package/esm/List/LegacyMultiSelectListItem.d.ts.map +1 -1
- package/esm/List/LegacyMultiSelectListItem.js +1 -2
- package/esm/List/LegacyMultiSelectListItem.js.map +1 -1
- package/esm/List/MultiSelectList.d.ts +1 -5
- package/esm/List/MultiSelectList.d.ts.map +1 -1
- package/esm/List/MultiSelectList.js +6 -6
- package/esm/List/MultiSelectList.js.map +1 -1
- package/esm/List/index.d.ts +2 -2
- package/esm/List/index.d.ts.map +1 -1
- package/esm/List/index.js +2 -2
- package/esm/List/index.js.map +1 -1
- package/esm/Overlay/ErrorOverlay.d.ts.map +1 -1
- package/esm/Overlay/ErrorOverlay.js +4 -4
- package/esm/Overlay/ErrorOverlay.js.map +1 -1
- package/esm/SettingWidget/StylingSettingWidget/StylingSettingWidget.d.ts +2 -2
- package/esm/SettingWidget/StylingSettingWidget/StylingSettingWidget.d.ts.map +1 -1
- package/esm/SettingWidget/StylingSettingWidget/StylingSettingWidget.js +2 -6
- package/esm/SettingWidget/StylingSettingWidget/StylingSettingWidget.js.map +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/measureNumberFormat/MeasureNumberFormat.d.ts +1 -2
- package/esm/measureNumberFormat/MeasureNumberFormat.d.ts.map +1 -1
- package/esm/measureNumberFormat/MeasureNumberFormat.js +6 -6
- package/esm/measureNumberFormat/MeasureNumberFormat.js.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/CustomFormatDialog.js +4 -4
- package/esm/measureNumberFormat/customFormatDialog/CustomFormatDialog.js.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/DocumentationLink.d.ts +3 -7
- package/esm/measureNumberFormat/customFormatDialog/DocumentationLink.d.ts.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/DocumentationLink.js +2 -3
- package/esm/measureNumberFormat/customFormatDialog/DocumentationLink.js.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/FormatInput.d.ts +3 -7
- package/esm/measureNumberFormat/customFormatDialog/FormatInput.d.ts.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/FormatInput.js +4 -5
- package/esm/measureNumberFormat/customFormatDialog/FormatInput.js.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/formatTemplatesDropdown/DropdownItem.d.ts +2 -2
- package/esm/measureNumberFormat/customFormatDialog/formatTemplatesDropdown/DropdownItem.d.ts.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/formatTemplatesDropdown/DropdownItem.js +2 -3
- package/esm/measureNumberFormat/customFormatDialog/formatTemplatesDropdown/DropdownItem.js.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/formatTemplatesDropdown/DropdownToggleButton.d.ts +2 -2
- package/esm/measureNumberFormat/customFormatDialog/formatTemplatesDropdown/DropdownToggleButton.d.ts.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/formatTemplatesDropdown/DropdownToggleButton.js +1 -2
- package/esm/measureNumberFormat/customFormatDialog/formatTemplatesDropdown/DropdownToggleButton.js.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/formatTemplatesDropdown/FormatTemplatesDropdown.js +2 -2
- package/esm/measureNumberFormat/customFormatDialog/formatTemplatesDropdown/FormatTemplatesDropdown.js.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/previewSection/ExtendedPreview.js +1 -1
- package/esm/measureNumberFormat/customFormatDialog/previewSection/ExtendedPreview.js.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/previewSection/Preview.d.ts +2 -7
- package/esm/measureNumberFormat/customFormatDialog/previewSection/Preview.d.ts.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/previewSection/Preview.js +3 -3
- package/esm/measureNumberFormat/customFormatDialog/previewSection/Preview.js.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/shared/PreviewRows.d.ts +1 -2
- package/esm/measureNumberFormat/customFormatDialog/shared/PreviewRows.d.ts.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/shared/PreviewRows.js +1 -2
- package/esm/measureNumberFormat/customFormatDialog/shared/PreviewRows.js.map +1 -1
- package/esm/measureNumberFormat/hooks/useCurrencyFormatDefaults.d.ts +21 -0
- package/esm/measureNumberFormat/hooks/useCurrencyFormatDefaults.d.ts.map +1 -0
- package/esm/measureNumberFormat/hooks/useCurrencyFormatDefaults.js +49 -0
- package/esm/measureNumberFormat/hooks/useCurrencyFormatDefaults.js.map +1 -0
- package/esm/measureNumberFormat/index.d.ts +4 -0
- package/esm/measureNumberFormat/index.d.ts.map +1 -1
- package/esm/measureNumberFormat/index.js +4 -1
- package/esm/measureNumberFormat/index.js.map +1 -1
- package/esm/measureNumberFormat/presets/currencyPresets.d.ts +28 -0
- package/esm/measureNumberFormat/presets/currencyPresets.d.ts.map +1 -0
- package/esm/measureNumberFormat/presets/currencyPresets.js +42 -0
- package/esm/measureNumberFormat/presets/currencyPresets.js.map +1 -0
- package/esm/measureNumberFormat/validation/currencyFormatValidator.d.ts +55 -0
- package/esm/measureNumberFormat/validation/currencyFormatValidator.d.ts.map +1 -0
- package/esm/measureNumberFormat/validation/currencyFormatValidator.js +118 -0
- package/esm/measureNumberFormat/validation/currencyFormatValidator.js.map +1 -0
- package/esm/sdk-ui-kit.d.ts +211 -59
- package/package.json +9 -9
- package/src/@ui/UiPaginationButton/UiPaginationButton.scss +56 -0
- package/src/@ui/index.scss +1 -0
- package/styles/css/main.css +40 -0
- package/styles/css/main.css.map +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { MetricType } from "@gooddata/sdk-model";
|
|
2
|
+
/** @internal */
|
|
3
|
+
export interface UseCurrencyFormatDefaultsConfig {
|
|
4
|
+
metricType?: MetricType;
|
|
5
|
+
normalizedFormat: string | null;
|
|
6
|
+
currencyFormatOverride?: string | null;
|
|
7
|
+
presetFormats: string[];
|
|
8
|
+
hasInheritPreset: boolean;
|
|
9
|
+
onFormatChange: (format: string | null) => void;
|
|
10
|
+
shouldBootstrap: boolean;
|
|
11
|
+
fallbackFormat?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*
|
|
16
|
+
* Ensures that currency metrics default to a meaningful preset instead of falling back to custom formats.
|
|
17
|
+
* - When no format is set yet, it applies the inherited override or the standard currency preset.
|
|
18
|
+
* - When switching to currency with an incompatible format, it coerces the format to a supported preset.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useCurrencyFormatDefaults({ metricType, normalizedFormat, currencyFormatOverride, presetFormats, hasInheritPreset, onFormatChange, shouldBootstrap, fallbackFormat, }: UseCurrencyFormatDefaultsConfig): void;
|
|
21
|
+
//# sourceMappingURL=useCurrencyFormatDefaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCurrencyFormatDefaults.d.ts","sourceRoot":"","sources":["../../../src/measureNumberFormat/hooks/useCurrencyFormatDefaults.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,gBAAgB;AAChB,MAAM,WAAW,+BAA+B;IAC5C,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,EACtC,UAAU,EACV,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAwC,GAC3C,EAAE,+BAA+B,QAkCjC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// (C) 2025 GoodData Corporation
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
const DEFAULT_CURRENCY_FORMAT = "$#,##0.00";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*
|
|
7
|
+
* Ensures that currency metrics default to a meaningful preset instead of falling back to custom formats.
|
|
8
|
+
* - When no format is set yet, it applies the inherited override or the standard currency preset.
|
|
9
|
+
* - When switching to currency with an incompatible format, it coerces the format to a supported preset.
|
|
10
|
+
*/
|
|
11
|
+
export function useCurrencyFormatDefaults({ metricType, normalizedFormat, currencyFormatOverride, presetFormats, hasInheritPreset, onFormatChange, shouldBootstrap, fallbackFormat = DEFAULT_CURRENCY_FORMAT, }) {
|
|
12
|
+
const previousMetricType = usePreviousMetricType(metricType);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (metricType !== "CURRENCY" || !shouldBootstrap) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
onFormatChange(resolveDefaultFormat(currencyFormatOverride, fallbackFormat));
|
|
18
|
+
}, [currencyFormatOverride, fallbackFormat, metricType, onFormatChange, shouldBootstrap]);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (metricType !== "CURRENCY" || previousMetricType === "CURRENCY") {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const matchesCurrencyPreset = normalizedFormat === null ? hasInheritPreset : presetFormats.includes(normalizedFormat);
|
|
24
|
+
if (matchesCurrencyPreset) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
onFormatChange(resolveDefaultFormat(currencyFormatOverride, fallbackFormat));
|
|
28
|
+
}, [
|
|
29
|
+
currencyFormatOverride,
|
|
30
|
+
fallbackFormat,
|
|
31
|
+
hasInheritPreset,
|
|
32
|
+
metricType,
|
|
33
|
+
normalizedFormat,
|
|
34
|
+
onFormatChange,
|
|
35
|
+
presetFormats,
|
|
36
|
+
previousMetricType,
|
|
37
|
+
]);
|
|
38
|
+
}
|
|
39
|
+
function resolveDefaultFormat(currencyFormatOverride, fallbackFormat) {
|
|
40
|
+
return currencyFormatOverride ? null : fallbackFormat;
|
|
41
|
+
}
|
|
42
|
+
function usePreviousMetricType(metricType) {
|
|
43
|
+
const ref = useRef(undefined);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
ref.current = metricType;
|
|
46
|
+
}, [metricType]);
|
|
47
|
+
return ref.current;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=useCurrencyFormatDefaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCurrencyFormatDefaults.js","sourceRoot":"","sources":["../../../src/measureNumberFormat/hooks/useCurrencyFormatDefaults.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAI1C,MAAM,uBAAuB,GAAG,WAAW,CAAC;AAc5C;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,EACtC,UAAU,EACV,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,GAAG,uBAAuB,GACV;IAC9B,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAE7D,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,UAAU,KAAK,UAAU,IAAI,CAAC,eAAe,EAAE,CAAC;YAChD,OAAO;QACX,CAAC;QAED,cAAc,CAAC,oBAAoB,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAAC;IACjF,CAAC,EAAE,CAAC,sBAAsB,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC;IAE1F,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,UAAU,KAAK,UAAU,IAAI,kBAAkB,KAAK,UAAU,EAAE,CAAC;YACjE,OAAO;QACX,CAAC;QAED,MAAM,qBAAqB,GACvB,gBAAgB,KAAK,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;QAE5F,IAAI,qBAAqB,EAAE,CAAC;YACxB,OAAO;QACX,CAAC;QAED,cAAc,CAAC,oBAAoB,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAAC;IACjF,CAAC,EAAE;QACC,sBAAsB;QACtB,cAAc;QACd,gBAAgB;QAChB,UAAU;QACV,gBAAgB;QAChB,cAAc;QACd,aAAa;QACb,kBAAkB;KACrB,CAAC,CAAC;AACP,CAAC;AAED,SAAS,oBAAoB,CAAC,sBAAiD,EAAE,cAAsB;IACnG,OAAO,sBAAsB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC;AAC1D,CAAC;AAED,SAAS,qBAAqB,CAAC,UAAkC;IAC7D,MAAM,GAAG,GAAG,MAAM,CAAyB,SAAS,CAAC,CAAC;IACtD,SAAS,CAAC,GAAG,EAAE;QACX,GAAG,CAAC,OAAO,GAAG,UAAU,CAAC;IAC7B,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IACjB,OAAO,GAAG,CAAC,OAAO,CAAC;AACvB,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export * from "./typings.js";
|
|
2
2
|
export type { IMeasureNumberFormatOwnProps } from "./MeasureNumberFormat.js";
|
|
3
3
|
export { MeasureNumberFormat } from "./MeasureNumberFormat.js";
|
|
4
|
+
export { validateCurrencyFormat, isCurrencyFormat, type CurrencyFormatValidationErrorCode, type ICurrencyFormatValidationError, type ICurrencyFormatValidationOptions, type ICurrencyFormatValidationResult, } from "./validation/currencyFormatValidator.js";
|
|
5
|
+
export { useCurrencyFormatDefaults } from "./hooks/useCurrencyFormatDefaults.js";
|
|
6
|
+
export type { UseCurrencyFormatDefaultsConfig } from "./hooks/useCurrencyFormatDefaults.js";
|
|
7
|
+
export { createCurrencyPresets, CURRENCY_PRESET_DEFINITIONS, type ICurrencyPresetDefinition, } from "./presets/currencyPresets.js";
|
|
4
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/measureNumberFormat/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,YAAY,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/measureNumberFormat/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,YAAY,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACH,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,iCAAiC,EACtC,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,GACvC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,YAAY,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EACH,qBAAqB,EACrB,2BAA2B,EAC3B,KAAK,yBAAyB,GACjC,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
// (C) 2020-
|
|
1
|
+
// (C) 2020-2025 GoodData Corporation
|
|
2
2
|
export * from "./typings.js";
|
|
3
3
|
export { MeasureNumberFormat } from "./MeasureNumberFormat.js";
|
|
4
|
+
export { validateCurrencyFormat, isCurrencyFormat, } from "./validation/currencyFormatValidator.js";
|
|
5
|
+
export { useCurrencyFormatDefaults } from "./hooks/useCurrencyFormatDefaults.js";
|
|
6
|
+
export { createCurrencyPresets, CURRENCY_PRESET_DEFINITIONS, } from "./presets/currencyPresets.js";
|
|
4
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/measureNumberFormat/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/measureNumberFormat/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACH,sBAAsB,EACtB,gBAAgB,GAKnB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAEjF,OAAO,EACH,qBAAqB,EACrB,2BAA2B,GAE9B,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type IFormatPreset } from "../typings.js";
|
|
2
|
+
/**
|
|
3
|
+
* Base currency preset definitions without localized names.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface ICurrencyPresetDefinition {
|
|
7
|
+
localIdentifier: string;
|
|
8
|
+
format: string;
|
|
9
|
+
previewNumber: number;
|
|
10
|
+
messageId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Base currency preset definitions.
|
|
14
|
+
* These are the raw preset data that can be used to create localized presets.
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const CURRENCY_PRESET_DEFINITIONS: readonly ICurrencyPresetDefinition[];
|
|
18
|
+
/**
|
|
19
|
+
* Creates localized currency format presets.
|
|
20
|
+
*
|
|
21
|
+
* @param formatMessage - Function to format localized messages (e.g., from react-intl)
|
|
22
|
+
* @returns Array of currency format presets with localized names
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function createCurrencyPresets(formatMessage: (descriptor: {
|
|
26
|
+
id: string;
|
|
27
|
+
}) => string): IFormatPreset[];
|
|
28
|
+
//# sourceMappingURL=currencyPresets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currencyPresets.d.ts","sourceRoot":"","sources":["../../../src/measureNumberFormat/presets/currencyPresets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,yBAAyB,EAmBlE,CAAC;AAEX;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACjC,aAAa,EAAE,CAAC,UAAU,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,KAAK,MAAM,GACtD,aAAa,EAAE,CAOjB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// (C) 2025 GoodData Corporation
|
|
2
|
+
/**
|
|
3
|
+
* Base currency preset definitions.
|
|
4
|
+
* These are the raw preset data that can be used to create localized presets.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export const CURRENCY_PRESET_DEFINITIONS = [
|
|
8
|
+
{
|
|
9
|
+
localIdentifier: "currency",
|
|
10
|
+
format: "$#,##0.00",
|
|
11
|
+
previewNumber: 1000.12,
|
|
12
|
+
messageId: "metricComponent.numberFormat.preset.currency",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
localIdentifier: "currency-single-decimal",
|
|
16
|
+
format: "$#,##0.0",
|
|
17
|
+
previewNumber: 1000.12,
|
|
18
|
+
messageId: "metricComponent.numberFormat.preset.currency1",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
localIdentifier: "currency-rounded",
|
|
22
|
+
format: "$#,##0",
|
|
23
|
+
previewNumber: 1000.12,
|
|
24
|
+
messageId: "metricComponent.numberFormat.preset.currencyRounded",
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
/**
|
|
28
|
+
* Creates localized currency format presets.
|
|
29
|
+
*
|
|
30
|
+
* @param formatMessage - Function to format localized messages (e.g., from react-intl)
|
|
31
|
+
* @returns Array of currency format presets with localized names
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export function createCurrencyPresets(formatMessage) {
|
|
35
|
+
return CURRENCY_PRESET_DEFINITIONS.map((definition) => ({
|
|
36
|
+
name: formatMessage({ id: definition.messageId }),
|
|
37
|
+
localIdentifier: definition.localIdentifier,
|
|
38
|
+
format: definition.format,
|
|
39
|
+
previewNumber: definition.previewNumber,
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=currencyPresets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currencyPresets.js","sourceRoot":"","sources":["../../../src/measureNumberFormat/presets/currencyPresets.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAehC;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAyC;IAC7E;QACI,eAAe,EAAE,UAAU;QAC3B,MAAM,EAAE,WAAW;QACnB,aAAa,EAAE,OAAO;QACtB,SAAS,EAAE,8CAA8C;KAC5D;IACD;QACI,eAAe,EAAE,yBAAyB;QAC1C,MAAM,EAAE,UAAU;QAClB,aAAa,EAAE,OAAO;QACtB,SAAS,EAAE,+CAA+C;KAC7D;IACD;QACI,eAAe,EAAE,kBAAkB;QACnC,MAAM,EAAE,QAAQ;QAChB,aAAa,EAAE,OAAO;QACtB,SAAS,EAAE,qDAAqD;KACnE;CACK,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACjC,aAAqD;IAErD,OAAO,2BAA2B,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACpD,IAAI,EAAE,aAAa,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC;QACjD,eAAe,EAAE,UAAU,CAAC,eAAe;QAC3C,MAAM,EAAE,UAAU,CAAC,MAAM;QACzB,aAAa,EAAE,UAAU,CAAC,aAAa;KAC1C,CAAC,CAAC,CAAC;AACR,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type ISeparators } from "@gooddata/number-formatter";
|
|
2
|
+
/**
|
|
3
|
+
* @alpha
|
|
4
|
+
*/
|
|
5
|
+
export type CurrencyFormatValidationErrorCode = "empty" | "invalidFormat" | "missingCurrencySymbol" | "missingDecimalPlaces";
|
|
6
|
+
/**
|
|
7
|
+
* @alpha
|
|
8
|
+
*/
|
|
9
|
+
export interface ICurrencyFormatValidationError {
|
|
10
|
+
code: CurrencyFormatValidationErrorCode;
|
|
11
|
+
/**
|
|
12
|
+
* Indexes of sections (0-based) that failed validation.
|
|
13
|
+
* The value is only present for section-driven validations.
|
|
14
|
+
*/
|
|
15
|
+
sectionIndexes?: number[];
|
|
16
|
+
message: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @alpha
|
|
20
|
+
*/
|
|
21
|
+
export interface ICurrencyFormatValidationResult {
|
|
22
|
+
isValid: boolean;
|
|
23
|
+
errors: ICurrencyFormatValidationError[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @alpha
|
|
27
|
+
*/
|
|
28
|
+
export interface ICurrencyFormatValidationOptions {
|
|
29
|
+
/**
|
|
30
|
+
* Sample value used to verify the formatter does not throw.
|
|
31
|
+
* Defaults to 12345.67 to cover both thousands and decimals.
|
|
32
|
+
*/
|
|
33
|
+
sampleValue?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Number of mandatory decimal places each section must contain.
|
|
36
|
+
* Set to 0 (or a negative value) to skip the decimal check.
|
|
37
|
+
* Defaults to 2.
|
|
38
|
+
*/
|
|
39
|
+
requiredDecimalPlaces?: number;
|
|
40
|
+
separators?: ISeparators;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Validates a number format string that is expected to represent a currency amount.
|
|
44
|
+
*
|
|
45
|
+
* @alpha
|
|
46
|
+
*/
|
|
47
|
+
export declare function validateCurrencyFormat(format: string | undefined | null, options?: ICurrencyFormatValidationOptions): ICurrencyFormatValidationResult;
|
|
48
|
+
/**
|
|
49
|
+
* Checks if a format string represents a currency format.
|
|
50
|
+
* A currency format is one where at least one numeric section contains a currency symbol.
|
|
51
|
+
*
|
|
52
|
+
* @alpha
|
|
53
|
+
*/
|
|
54
|
+
export declare function isCurrencyFormat(format: string | undefined | null): boolean;
|
|
55
|
+
//# sourceMappingURL=currencyFormatValidator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currencyFormatValidator.d.ts","sourceRoot":"","sources":["../../../src/measureNumberFormat/validation/currencyFormatValidator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAWrF;;GAEG;AACH,MAAM,MAAM,iCAAiC,GACvC,OAAO,GACP,eAAe,GACf,uBAAuB,GACvB,sBAAsB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,IAAI,EAAE,iCAAiC,CAAC;IACxC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,8BAA8B,EAAE,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC7C;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,WAAW,CAAC;CAC5B;AASD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAClC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EACjC,OAAO,GAAE,gCAAqC,GAC/C,+BAA+B,CAsDjC;AAgED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAc3E"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// (C) 2025 GoodData Corporation
|
|
2
|
+
import { ClientFormatterFacade } from "@gooddata/number-formatter";
|
|
3
|
+
const DEFAULT_SAMPLE_VALUE = 12345.67;
|
|
4
|
+
const DEFAULT_REQUIRED_DECIMALS = 2;
|
|
5
|
+
const SECTION_SEPARATOR = ";";
|
|
6
|
+
const NUMBER_PLACEHOLDER_PATTERN = /[0#?]/;
|
|
7
|
+
const DECIMAL_TOKEN_PATTERN = /\.(0+)/;
|
|
8
|
+
const CURRENCY_SYMBOL_PATTERN = /\p{Sc}/u;
|
|
9
|
+
const CURRENCY_BRACKET_PATTERN = /\[\$[^\]]+\]/;
|
|
10
|
+
const QUOTED_CURRENCY_PATTERN = /(["'])[ \t]*[A-Za-z]{2,6}[ \t]*\1/;
|
|
11
|
+
const DEFAULT_ERROR_MESSAGES = {
|
|
12
|
+
empty: "Format is required.",
|
|
13
|
+
invalidFormat: "Format contains invalid tokens.",
|
|
14
|
+
missingCurrencySymbol: "Currency symbol is missing.",
|
|
15
|
+
missingDecimalPlaces: "Format must include the required decimal places.",
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Validates a number format string that is expected to represent a currency amount.
|
|
19
|
+
*
|
|
20
|
+
* @alpha
|
|
21
|
+
*/
|
|
22
|
+
export function validateCurrencyFormat(format, options = {}) {
|
|
23
|
+
const sanitizedFormat = format?.trim() ?? "";
|
|
24
|
+
const errors = [];
|
|
25
|
+
if (!sanitizedFormat) {
|
|
26
|
+
errors.push(buildError("empty"));
|
|
27
|
+
return { isValid: false, errors };
|
|
28
|
+
}
|
|
29
|
+
const sampleValue = options.sampleValue ?? DEFAULT_SAMPLE_VALUE;
|
|
30
|
+
const separators = options.separators;
|
|
31
|
+
if (!isParsableFormat(sanitizedFormat, sampleValue, separators)) {
|
|
32
|
+
errors.push(buildError("invalidFormat"));
|
|
33
|
+
return { isValid: false, errors };
|
|
34
|
+
}
|
|
35
|
+
const sections = getFormatSections(sanitizedFormat);
|
|
36
|
+
const sectionsWithNumbers = sections.filter(hasNumericPlaceholder);
|
|
37
|
+
if (sectionsWithNumbers.length === 0) {
|
|
38
|
+
errors.push(buildError("invalidFormat"));
|
|
39
|
+
return { isValid: false, errors };
|
|
40
|
+
}
|
|
41
|
+
if (!sectionsWithNumbers.every(hasCurrencyToken)) {
|
|
42
|
+
errors.push(buildError("missingCurrencySymbol", collectInvalidSections(sectionsWithNumbers, hasCurrencyToken)));
|
|
43
|
+
}
|
|
44
|
+
const requiredDecimals = options.requiredDecimalPlaces ?? DEFAULT_REQUIRED_DECIMALS;
|
|
45
|
+
if (requiredDecimals > 0 &&
|
|
46
|
+
!sectionsWithNumbers.every((section) => hasRequiredDecimals(section, requiredDecimals))) {
|
|
47
|
+
errors.push(buildError("missingDecimalPlaces", collectInvalidSections(sectionsWithNumbers, (section) => hasRequiredDecimals(section, requiredDecimals))));
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
isValid: errors.length === 0,
|
|
51
|
+
errors,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function buildError(code, sectionIndexes) {
|
|
55
|
+
return {
|
|
56
|
+
code,
|
|
57
|
+
sectionIndexes,
|
|
58
|
+
message: DEFAULT_ERROR_MESSAGES[code],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function getFormatSections(format) {
|
|
62
|
+
return format
|
|
63
|
+
.split(SECTION_SEPARATOR)
|
|
64
|
+
.map((section) => section.trim())
|
|
65
|
+
.filter((section) => section.length > 0);
|
|
66
|
+
}
|
|
67
|
+
function hasNumericPlaceholder(section) {
|
|
68
|
+
return NUMBER_PLACEHOLDER_PATTERN.test(section);
|
|
69
|
+
}
|
|
70
|
+
function hasCurrencyToken(section) {
|
|
71
|
+
return (CURRENCY_BRACKET_PATTERN.test(section) ||
|
|
72
|
+
CURRENCY_SYMBOL_PATTERN.test(section) ||
|
|
73
|
+
QUOTED_CURRENCY_PATTERN.test(section));
|
|
74
|
+
}
|
|
75
|
+
function hasRequiredDecimals(section, requiredDecimalPlaces) {
|
|
76
|
+
const match = section.match(DECIMAL_TOKEN_PATTERN);
|
|
77
|
+
if (!match) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
return match[1].length >= requiredDecimalPlaces;
|
|
81
|
+
}
|
|
82
|
+
function collectInvalidSections(sections, predicate) {
|
|
83
|
+
const invalidIndexes = sections.reduce((result, section, index) => {
|
|
84
|
+
if (!predicate(section)) {
|
|
85
|
+
result.push(index);
|
|
86
|
+
}
|
|
87
|
+
return result;
|
|
88
|
+
}, []);
|
|
89
|
+
return invalidIndexes.length > 0 ? invalidIndexes : undefined;
|
|
90
|
+
}
|
|
91
|
+
function isParsableFormat(format, sampleValue, separators) {
|
|
92
|
+
try {
|
|
93
|
+
ClientFormatterFacade.formatValue(sampleValue, format, separators);
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Checks if a format string represents a currency format.
|
|
102
|
+
* A currency format is one where at least one numeric section contains a currency symbol.
|
|
103
|
+
*
|
|
104
|
+
* @alpha
|
|
105
|
+
*/
|
|
106
|
+
export function isCurrencyFormat(format) {
|
|
107
|
+
const sanitizedFormat = format?.trim();
|
|
108
|
+
if (!sanitizedFormat) {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
const sections = getFormatSections(sanitizedFormat);
|
|
112
|
+
const sectionsWithNumbers = sections.filter(hasNumericPlaceholder);
|
|
113
|
+
if (sectionsWithNumbers.length === 0) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
return sectionsWithNumbers.some(hasCurrencyToken);
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=currencyFormatValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currencyFormatValidator.js","sourceRoot":"","sources":["../../../src/measureNumberFormat/validation/currencyFormatValidator.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,qBAAqB,EAAoB,MAAM,4BAA4B,CAAC;AAErF,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AACtC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AACpC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,0BAA0B,GAAG,OAAO,CAAC;AAC3C,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AACvC,MAAM,uBAAuB,GAAG,SAAS,CAAC;AAC1C,MAAM,wBAAwB,GAAG,cAAc,CAAC;AAChD,MAAM,uBAAuB,GAAG,mCAAmC,CAAC;AAkDpE,MAAM,sBAAsB,GAAsD;IAC9E,KAAK,EAAE,qBAAqB;IAC5B,aAAa,EAAE,iCAAiC;IAChD,qBAAqB,EAAE,6BAA6B;IACpD,oBAAoB,EAAE,kDAAkD;CAC3E,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAClC,MAAiC,EACjC,UAA4C,EAAE;IAE9C,MAAM,eAAe,GAAG,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC7C,MAAM,MAAM,GAAqC,EAAE,CAAC;IAEpD,IAAI,CAAC,eAAe,EAAE,CAAC;QACnB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;QACjC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IACtC,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,oBAAoB,CAAC;IAChE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAEtC,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC;QAC9D,MAAM,CAAC,IAAI,C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