@antscorp/antsomi-ui 1.3.3-beta.69 → 1.3.3-beta.70
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/es/components/atoms/InputDynamic/InputDynamic.d.ts +5 -25
- package/es/components/atoms/InputDynamic/InputDynamic.js +200 -16
- package/es/components/atoms/InputDynamic/PopupShortLink.d.ts +1 -1
- package/es/components/atoms/InputDynamic/constants.d.ts +71 -0
- package/es/components/atoms/InputDynamic/constants.js +71 -0
- package/es/components/atoms/InputDynamic/index.d.ts +1 -1
- package/es/components/atoms/InputDynamic/styled.d.ts +1 -0
- package/es/components/atoms/InputDynamic/styled.js +14 -2
- package/es/components/atoms/InputDynamic/types.d.ts +110 -0
- package/es/components/atoms/InputDynamic/types.js +1 -0
- package/es/components/atoms/InputDynamic/utils.d.ts +8 -0
- package/es/components/atoms/InputDynamic/utils.js +123 -2
- package/es/components/atoms/Spin/styled.d.ts +1 -1
- package/es/components/common/ConfigProvider/GlobalStyle.js +10 -0
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.d.ts +35 -0
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +1245 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +12 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.js +25 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.d.ts +3 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.js +3 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.d.ts +19 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.js +101 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.d.ts +1 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.js +1 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.d.ts +52 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.js +132 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.d.ts +1 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.js +1 -0
- package/es/components/molecules/AddDynamicContent/components/index.d.ts +3 -0
- package/es/components/molecules/AddDynamicContent/components/index.js +3 -0
- package/es/components/molecules/AddDynamicContent/constants.d.ts +101 -0
- package/es/components/molecules/AddDynamicContent/constants.js +152 -0
- package/es/components/molecules/AddDynamicContent/currencies.json +1523 -0
- package/es/components/molecules/AddDynamicContent/index.d.ts +2 -0
- package/es/components/molecules/AddDynamicContent/index.js +2 -0
- package/es/components/molecules/AddDynamicContent/styled.d.ts +9 -0
- package/es/components/molecules/AddDynamicContent/styled.js +18 -0
- package/es/components/molecules/AddDynamicContent/types.d.ts +13 -0
- package/es/components/molecules/AddDynamicContent/types.js +1 -0
- package/es/components/molecules/AddDynamicContent/utils.d.ts +42 -0
- package/es/components/molecules/AddDynamicContent/utils.js +398 -0
- package/es/components/molecules/Modal/Modal.d.ts +2 -2
- package/es/components/molecules/Modal/styled.d.ts +1 -1
- package/es/components/molecules/Modal/styled.js +2 -0
- package/es/components/molecules/ModalV2/styled.d.ts +1 -1
- package/es/components/molecules/Select/Select.d.ts +2 -4
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.d.ts +1 -1
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +3 -5
- package/es/components/molecules/UploadImage/MediaThumb.d.ts +11 -0
- package/es/components/molecules/UploadImage/MediaThumb.js +31 -0
- package/es/components/molecules/UploadImage/index.d.ts +6 -2
- package/es/components/molecules/UploadImage/index.js +101 -77
- package/es/components/molecules/UploadImage/styled.js +0 -4
- package/es/components/molecules/UploadImage/utils.d.ts +3 -0
- package/es/components/molecules/UploadImage/utils.js +24 -0
- package/es/components/organism/Help/styled.d.ts +2 -6
- package/es/constants/queries.d.ts +14 -0
- package/es/constants/queries.js +21 -0
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.js +1 -0
- package/es/hooks/useDeepCompareMemo.d.ts +2 -0
- package/es/hooks/useDeepCompareMemo.js +21 -0
- package/es/locales/en/translation.json +151 -0
- package/es/locales/i18n.d.ts +151 -0
- package/es/locales/translations.d.ts +151 -0
- package/es/models/BusinessObject.d.ts +116 -0
- package/es/models/BusinessObject.js +113 -0
- package/es/models/Currency.d.ts +9 -0
- package/es/models/Currency.js +10 -0
- package/es/models/CustomFunction.d.ts +19 -0
- package/es/models/CustomFunction.js +25 -0
- package/es/models/DynamicContentAttribute.d.ts +34 -0
- package/es/models/DynamicContentAttribute.js +9 -0
- package/es/models/EventTrackingAttribute.d.ts +11 -0
- package/es/models/EventTrackingAttribute.js +13 -0
- package/es/models/PromotionPool.d.ts +11 -0
- package/es/models/PromotionPool.js +12 -0
- package/es/models/{SavedImage.d.ts → SavedMedia.d.ts} +5 -5
- package/es/models/{SavedImage.js → SavedMedia.js} +3 -3
- package/es/queries/BusinessObject/index.d.ts +6 -0
- package/es/queries/BusinessObject/index.js +6 -0
- package/es/queries/BusinessObject/useGetListAllEvents.d.ts +11 -0
- package/es/queries/BusinessObject/useGetListAllEvents.js +14 -0
- package/es/queries/BusinessObject/useGetListAttributeBO.d.ts +17 -0
- package/es/queries/BusinessObject/useGetListAttributeBO.js +41 -0
- package/es/queries/BusinessObject/useGetListBO.d.ts +6 -0
- package/es/queries/BusinessObject/useGetListBO.js +19 -0
- package/es/queries/BusinessObject/useGetListEventAttr.d.ts +4 -0
- package/es/queries/BusinessObject/useGetListEventAttr.js +15 -0
- package/es/queries/BusinessObject/useGetListPromotionCodeAttr.d.ts +6 -0
- package/es/queries/BusinessObject/useGetListPromotionCodeAttr.js +26 -0
- package/es/queries/BusinessObject/useGetListSourceByEvent.d.ts +13 -0
- package/es/queries/BusinessObject/useGetListSourceByEvent.js +11 -0
- package/es/queries/CustomFunction/index.d.ts +2 -0
- package/es/queries/CustomFunction/index.js +2 -0
- package/es/queries/CustomFunction/useCustomFunction.d.ts +19 -0
- package/es/queries/CustomFunction/useCustomFunction.js +53 -0
- package/es/queries/DynamicContentAttribute/index.d.ts +1 -0
- package/es/queries/DynamicContentAttribute/index.js +1 -0
- package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.d.ts +10 -0
- package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.js +21 -0
- package/es/queries/PromotionPool/index.d.ts +1 -0
- package/es/queries/PromotionPool/index.js +1 -0
- package/es/queries/PromotionPool/useGetListPromotionPool.d.ts +9 -0
- package/es/queries/PromotionPool/useGetListPromotionPool.js +62 -0
- package/es/queries/ThirdParty/index.d.ts +1 -0
- package/es/queries/ThirdParty/index.js +1 -0
- package/es/queries/ThirdParty/useGetEventTrackingAttributes.d.ts +14 -0
- package/es/queries/ThirdParty/useGetEventTrackingAttributes.js +15 -0
- package/es/queries/configs.d.ts +4 -0
- package/es/queries/configs.js +13 -0
- package/es/queries/index.d.ts +6 -0
- package/es/queries/index.js +6 -0
- package/es/services/MediaTemplateDesign/BusinessObject/index.d.ts +8 -0
- package/es/services/MediaTemplateDesign/BusinessObject/index.js +100 -0
- package/es/services/MediaTemplateDesign/CustomFunction/index.d.ts +15 -0
- package/es/services/MediaTemplateDesign/CustomFunction/index.js +135 -0
- package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.d.ts +4 -0
- package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.js +39 -0
- package/es/services/MediaTemplateDesign/ListCurrency/index.d.ts +6 -0
- package/es/services/MediaTemplateDesign/ListCurrency/index.js +34 -0
- package/es/services/MediaTemplateDesign/PromotionPool/index.d.ts +3 -0
- package/es/services/MediaTemplateDesign/PromotionPool/index.js +31 -0
- package/es/services/MediaTemplateDesign/UploadFile/index.d.ts +5 -5
- package/es/services/MediaTemplateDesign/UploadFile/index.js +36 -19
- package/es/services/ThirParty/index.d.ts +8 -0
- package/es/services/ThirParty/index.js +26 -0
- package/es/services/index.d.ts +14 -5
- package/es/services/index.js +45 -1
- package/es/test.js +50 -10
- package/es/types/index.d.ts +5 -0
- package/es/utils/common.d.ts +1 -0
- package/es/utils/common.js +1 -0
- package/package.json +9 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
|
|
2
|
+
export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
|
|
3
|
+
type DisplayFormatProps = {
|
|
4
|
+
onSettingsChange: (settings: any) => void;
|
|
5
|
+
formatSettings: any;
|
|
6
|
+
displayFormatType: TDisplayFormat;
|
|
7
|
+
dynamicContentType?: string;
|
|
8
|
+
infos: PayloadInfo;
|
|
9
|
+
url: string;
|
|
10
|
+
};
|
|
11
|
+
declare const DisplayFormat: (props: DisplayFormatProps) => JSX.Element | null;
|
|
12
|
+
export default DisplayFormat;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import React from 'react';
|
|
3
|
+
// Components
|
|
4
|
+
import FormatDatetime from '../FormatDatetime/FormatDatetime';
|
|
5
|
+
import FormatNumber from '../FormatNumber/FormatNumber';
|
|
6
|
+
const DisplayFormat = (props) => {
|
|
7
|
+
const { infos, url } = props;
|
|
8
|
+
const renderFormatSetting = () => {
|
|
9
|
+
switch (props.displayFormatType) {
|
|
10
|
+
case 'number':
|
|
11
|
+
case 'percentage':
|
|
12
|
+
case 'currency': {
|
|
13
|
+
return (React.createElement(FormatNumber, Object.assign({}, props.formatSettings, { onSettingsChange: props.onSettingsChange, type: props.displayFormatType, url: url, infos: infos })));
|
|
14
|
+
}
|
|
15
|
+
case 'datetime': {
|
|
16
|
+
return (React.createElement(FormatDatetime, Object.assign({}, props.formatSettings, { onSettingsChange: props.onSettingsChange, type: props.displayFormatType, dynamicContentType: props.dynamicContentType })));
|
|
17
|
+
}
|
|
18
|
+
default: {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return renderFormatSetting();
|
|
24
|
+
};
|
|
25
|
+
export default DisplayFormat;
|
package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
export type TDatetimeFormatSetting = {
|
|
4
|
+
hasDateFormat: boolean;
|
|
5
|
+
hasTimeFormat: boolean;
|
|
6
|
+
dateParseFormat: 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'YYYY/MM/DD';
|
|
7
|
+
timeParseFormat: '12hour' | '24hour' | string;
|
|
8
|
+
dateParseOption: 'short' | 'medium' | 'long' | undefined;
|
|
9
|
+
timeParseOption: 'short' | 'medium' | 'long' | undefined;
|
|
10
|
+
language?: string;
|
|
11
|
+
type?: 'datetime';
|
|
12
|
+
};
|
|
13
|
+
export type FormatDatetimeProps = {
|
|
14
|
+
onSettingsChange?: (settingValues: TDatetimeFormatSetting) => void;
|
|
15
|
+
dynamicContentType?: string;
|
|
16
|
+
} & TDatetimeFormatSetting;
|
|
17
|
+
export declare const dateExample: dayjs.Dayjs;
|
|
18
|
+
declare const FormatDatetime: ({ hasDateFormat, hasTimeFormat, dateParseFormat, timeParseFormat, dateParseOption, timeParseOption, onSettingsChange, dynamicContentType, }: FormatDatetimeProps) => React.JSX.Element;
|
|
19
|
+
export default FormatDatetime;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
2
|
+
// Libraries
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import dayjs from 'dayjs';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
// Locales
|
|
7
|
+
import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
|
|
8
|
+
// Atoms
|
|
9
|
+
import { Checkbox, Radio, Space } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
10
|
+
// Molecules
|
|
11
|
+
import { RadioGroup } from '../../../RadioGroup';
|
|
12
|
+
import { Select } from '../../../Select';
|
|
13
|
+
// Utils
|
|
14
|
+
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
15
|
+
// Utils
|
|
16
|
+
import { transformDateFormat } from '../../utils';
|
|
17
|
+
dayjs.extend(customParseFormat);
|
|
18
|
+
export const dateExample = dayjs('2020-04-15 18:23:11');
|
|
19
|
+
const FormatDatetime = ({ hasDateFormat, hasTimeFormat, dateParseFormat, timeParseFormat, dateParseOption, timeParseOption, onSettingsChange, dynamicContentType, }) => {
|
|
20
|
+
const { t, i18n: { language: portalLanguage }, } = useTranslation();
|
|
21
|
+
const dfSettings = {
|
|
22
|
+
hasDateFormat,
|
|
23
|
+
hasTimeFormat,
|
|
24
|
+
dateParseFormat,
|
|
25
|
+
timeParseFormat,
|
|
26
|
+
dateParseOption,
|
|
27
|
+
timeParseOption,
|
|
28
|
+
};
|
|
29
|
+
const datetimeEx = dayjs(dateExample).locale(portalLanguage);
|
|
30
|
+
const timezone = Math.round(dayjs(dateExample).utcOffset() / 60);
|
|
31
|
+
const prefix = timezone > 0 ? '+' : '';
|
|
32
|
+
const gmtString = `GMT ${prefix}${timezone}`;
|
|
33
|
+
const handleChange = (updatedSettings) => {
|
|
34
|
+
if (onSettingsChange) {
|
|
35
|
+
onSettingsChange(Object.assign(Object.assign({}, updatedSettings), { type: 'datetime', language: portalLanguage }));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const labelHours = dynamicContentType !== 'custom' ? 'HH:MM:SS' : '';
|
|
39
|
+
return (React.createElement("div", null,
|
|
40
|
+
React.createElement("div", { className: "ants-flex ants-items-center ants-gap-4" },
|
|
41
|
+
React.createElement(Checkbox, { checked: hasDateFormat, disabled: hasDateFormat && !hasTimeFormat, onChange: e => handleChange(Object.assign(Object.assign({}, dfSettings), { hasDateFormat: e.target.checked })) }, t(translations.dynamicContent.modal.label.datimeDisplayFormat.dateDF)),
|
|
42
|
+
React.createElement(Select, { className: "ants-w-[190px]", disabled: !hasDateFormat, defaultValue: dateParseFormat, options: [
|
|
43
|
+
{
|
|
44
|
+
label: `MM/DD/YYYY ${labelHours}`,
|
|
45
|
+
value: 'MM/DD/YYYY',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: `DD/MM/YYYY ${labelHours}`,
|
|
49
|
+
value: 'DD/MM/YYYY',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: `YYYY/MM/DD ${labelHours}`,
|
|
53
|
+
value: 'YYYY/MM/DD',
|
|
54
|
+
},
|
|
55
|
+
], onChange: value => handleChange(Object.assign(Object.assign({}, dfSettings), { dateParseFormat: value })) })),
|
|
56
|
+
React.createElement("div", { className: "ants-mt-2" },
|
|
57
|
+
React.createElement(RadioGroup, { disabled: !hasDateFormat, defaultValue: dateParseOption, onChange: e => handleChange(Object.assign(Object.assign({}, dfSettings), { dateParseOption: e.target.value })) },
|
|
58
|
+
React.createElement(Space, { direction: "vertical", size: 4, className: "ants-ml-5" },
|
|
59
|
+
React.createElement(Radio, { value: "short" },
|
|
60
|
+
t(translations.dynamicContent.modal.label.datimeDisplayFormat.short),
|
|
61
|
+
' - ',
|
|
62
|
+
datetimeEx.format(transformDateFormat(dateParseFormat, 'short'))),
|
|
63
|
+
React.createElement(Radio, { value: "medium" },
|
|
64
|
+
t(translations.dynamicContent.modal.label.datimeDisplayFormat.medium),
|
|
65
|
+
' - ',
|
|
66
|
+
datetimeEx.format(transformDateFormat(dateParseFormat, 'medium'))),
|
|
67
|
+
React.createElement(Radio, { value: "long" },
|
|
68
|
+
t(translations.dynamicContent.modal.label.datimeDisplayFormat.long),
|
|
69
|
+
' - ',
|
|
70
|
+
datetimeEx.format(transformDateFormat(dateParseFormat, 'long')))))),
|
|
71
|
+
React.createElement("div", { className: "ants-flex ants-items-center ants-gap-4 ants-mt-4" },
|
|
72
|
+
React.createElement(Checkbox, { checked: hasTimeFormat, disabled: hasTimeFormat && !hasDateFormat, onChange: e => handleChange(Object.assign(Object.assign({}, dfSettings), { hasTimeFormat: e.target.checked })) }, t(translations.dynamicContent.modal.label.datimeDisplayFormat.timeDF)),
|
|
73
|
+
React.createElement(Select, { className: "ants-w-[190px]", disabled: !hasTimeFormat, defaultValue: timeParseFormat, options: [
|
|
74
|
+
{
|
|
75
|
+
label: 'AM/PM',
|
|
76
|
+
value: '12hour',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: t(translations.dynamicContent.modal.label.datimeDisplayFormat.use24hour),
|
|
80
|
+
value: '24hour',
|
|
81
|
+
},
|
|
82
|
+
], onChange: value => handleChange(Object.assign(Object.assign({}, dfSettings), { timeParseFormat: value })) })),
|
|
83
|
+
React.createElement("div", { className: "ants-mt-2" },
|
|
84
|
+
React.createElement(RadioGroup, { defaultValue: timeParseOption, disabled: !hasTimeFormat, onChange: e => handleChange(Object.assign(Object.assign({}, dfSettings), { timeParseOption: e.target.value })) },
|
|
85
|
+
React.createElement(Space, { direction: "vertical", size: 4, className: "ants-ml-5" },
|
|
86
|
+
React.createElement(Radio, { value: "short" },
|
|
87
|
+
t(translations.dynamicContent.modal.label.datimeDisplayFormat.short),
|
|
88
|
+
' - ',
|
|
89
|
+
datetimeEx.format(timeParseFormat === '12hour' ? 'h:mm A' : 'H:mm')),
|
|
90
|
+
React.createElement(Radio, { value: "medium" },
|
|
91
|
+
t(translations.dynamicContent.modal.label.datimeDisplayFormat.medium),
|
|
92
|
+
' - ',
|
|
93
|
+
datetimeEx.format(timeParseFormat === '12hour' ? 'h:mm:ss A' : 'H:mm:ss')),
|
|
94
|
+
React.createElement(Radio, { value: "long" },
|
|
95
|
+
t(translations.dynamicContent.modal.label.datimeDisplayFormat.long),
|
|
96
|
+
' - ',
|
|
97
|
+
datetimeEx.format(timeParseFormat === '12hour'
|
|
98
|
+
? `h:mm:ss A [${gmtString}]`
|
|
99
|
+
: `H:mm:ss [${gmtString}]`)))))));
|
|
100
|
+
};
|
|
101
|
+
export default FormatDatetime;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormatDatetime';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormatDatetime';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TDisplayFormat } from '../DisplayFormat';
|
|
3
|
+
import { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
|
|
4
|
+
declare const groupingOptions: {
|
|
5
|
+
readonly COMMA: {
|
|
6
|
+
readonly index: 0;
|
|
7
|
+
readonly label: ",";
|
|
8
|
+
readonly value: ",";
|
|
9
|
+
};
|
|
10
|
+
readonly DOT: {
|
|
11
|
+
readonly index: 1;
|
|
12
|
+
readonly label: ".";
|
|
13
|
+
readonly value: ".";
|
|
14
|
+
};
|
|
15
|
+
readonly NONE: {
|
|
16
|
+
readonly index: 2;
|
|
17
|
+
readonly label: "none";
|
|
18
|
+
readonly value: "none";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
declare const decimalOptions: {
|
|
22
|
+
readonly COMMA: {
|
|
23
|
+
readonly index: 0;
|
|
24
|
+
readonly label: ",";
|
|
25
|
+
readonly value: ",";
|
|
26
|
+
};
|
|
27
|
+
readonly DOT: {
|
|
28
|
+
readonly index: 1;
|
|
29
|
+
readonly label: ".";
|
|
30
|
+
readonly value: ".";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type TGroupingSeparator = (typeof groupingOptions)[keyof typeof groupingOptions]['value'];
|
|
34
|
+
export type TDecimalSeparator = (typeof decimalOptions)[keyof typeof decimalOptions]['value'];
|
|
35
|
+
export type TNumberFormatSettings = {
|
|
36
|
+
decimalPlaces: number;
|
|
37
|
+
grouping: TGroupingSeparator;
|
|
38
|
+
decimal: TDecimalSeparator;
|
|
39
|
+
isCompact: boolean;
|
|
40
|
+
currencyCode: string;
|
|
41
|
+
prefixType: 'symbol' | 'code';
|
|
42
|
+
type?: TDisplayFormat;
|
|
43
|
+
};
|
|
44
|
+
type FormatNumberProps = {
|
|
45
|
+
onSettingsChange?: (settingValues: TNumberFormatSettings) => void;
|
|
46
|
+
type: TDisplayFormat;
|
|
47
|
+
} & TNumberFormatSettings & {
|
|
48
|
+
infos: PayloadInfo;
|
|
49
|
+
url: string;
|
|
50
|
+
};
|
|
51
|
+
declare const FormatNumber: (props: FormatNumberProps) => React.JSX.Element;
|
|
52
|
+
export default FormatNumber;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
// Libraries
|
|
11
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
12
|
+
import classnames from 'classnames';
|
|
13
|
+
// Components
|
|
14
|
+
import { Radio } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
15
|
+
import { Col, Row, Tooltip, Button, Form, Select, Checkbox } from 'antd';
|
|
16
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
17
|
+
// Json
|
|
18
|
+
import Currencies from '../../currencies.json';
|
|
19
|
+
// Constants
|
|
20
|
+
import { ATTRIBUTE_NUMBERIC_FORMAT_OPTION } from '../../constants';
|
|
21
|
+
// Services
|
|
22
|
+
import { getCurrencyList } from '@antscorp/antsomi-ui/es/services/MediaTemplateDesign/ListCurrency';
|
|
23
|
+
// Locales
|
|
24
|
+
import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
|
|
25
|
+
import { useTranslation } from 'react-i18next';
|
|
26
|
+
const groupingOptions = ATTRIBUTE_NUMBERIC_FORMAT_OPTION.GROUPING_SEPARATOR;
|
|
27
|
+
const decimalOptions = ATTRIBUTE_NUMBERIC_FORMAT_OPTION.DECIMAL_SEPARATOR;
|
|
28
|
+
const FormatNumber = (props) => {
|
|
29
|
+
const { t, i18n: { language }, } = useTranslation();
|
|
30
|
+
const { onSettingsChange, type: displayType, infos, url } = props;
|
|
31
|
+
const { currencyCode, decimalPlaces, grouping, decimal, prefixType, isCompact } = props;
|
|
32
|
+
const settingValues = {
|
|
33
|
+
decimalPlaces,
|
|
34
|
+
grouping,
|
|
35
|
+
decimal,
|
|
36
|
+
isCompact,
|
|
37
|
+
currencyCode,
|
|
38
|
+
prefixType,
|
|
39
|
+
};
|
|
40
|
+
const [listCurrencyOptions, setListCurrencyOptions] = useState([]);
|
|
41
|
+
const [isLoadingCurrencyOptions, setIsLoadingCurrencyOptions] = useState(true);
|
|
42
|
+
const onChangeSettingsHandle = (settingValues) => {
|
|
43
|
+
if (onSettingsChange) {
|
|
44
|
+
onSettingsChange(Object.assign(Object.assign({}, settingValues), { type: displayType }));
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
+
// Regex for getting text between the last brackets (with brakets) of line
|
|
50
|
+
const regex = /\(([^)]*)\)[^(]*$/;
|
|
51
|
+
if (listCurrencyOptions.length) {
|
|
52
|
+
setListCurrencyOptions(prevOptions => prevOptions.map(currencyOption => {
|
|
53
|
+
var _a;
|
|
54
|
+
// setLabel: Dollal Mỹ (USD) or Dollal Mỹ ($)
|
|
55
|
+
currencyOption.label =
|
|
56
|
+
prefixType === 'symbol'
|
|
57
|
+
? currencyOption.label.replace(regex, `(${(_a = Currencies[currencyOption.value]) === null || _a === void 0 ? void 0 : _a.symbol})`)
|
|
58
|
+
: currencyOption.label.replace(regex, `(${currencyOption.value})`);
|
|
59
|
+
return currencyOption;
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
setIsLoadingCurrencyOptions(true);
|
|
64
|
+
try {
|
|
65
|
+
const data = yield getCurrencyList({ lang: language, url }, infos);
|
|
66
|
+
const currencies = data.reduce((accumulate, currency) => {
|
|
67
|
+
var _a;
|
|
68
|
+
if (Currencies[currency.code]) {
|
|
69
|
+
accumulate.push({
|
|
70
|
+
value: currency.code,
|
|
71
|
+
// setLabel: Dollal Mỹ (USD) or Dollal Mỹ ($)
|
|
72
|
+
label: prefixType === 'symbol'
|
|
73
|
+
? `${currency.name.replace(regex, '')} (${(_a = Currencies[currency.code]) === null || _a === void 0 ? void 0 : _a.symbol})`
|
|
74
|
+
: `${currency.name.replace(regex, '')} (${currency.code})`,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
// console.log('library not found ', currency.code + ' - ' + currency.name);
|
|
79
|
+
}
|
|
80
|
+
return accumulate;
|
|
81
|
+
}, []);
|
|
82
|
+
setListCurrencyOptions(currencies);
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
setListCurrencyOptions([]);
|
|
86
|
+
}
|
|
87
|
+
finally {
|
|
88
|
+
setIsLoadingCurrencyOptions(false);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}))();
|
|
92
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
93
|
+
}, [prefixType]);
|
|
94
|
+
const listGroupingSeparatorOptions = useMemo(() => Object.values(groupingOptions)
|
|
95
|
+
.sort((a, b) => a.index - b.index)
|
|
96
|
+
.map(grouping => (Object.assign(Object.assign({}, grouping), (grouping.value === decimal && { disabled: true })))), [decimal]);
|
|
97
|
+
const listDecimalSeparatorOptions = useMemo(() => Object.values(decimalOptions)
|
|
98
|
+
.sort((a, b) => a.index - b.index)
|
|
99
|
+
.map(decimal => (Object.assign(Object.assign({}, decimal), (decimal.value === grouping && { disabled: true })))), [grouping]);
|
|
100
|
+
return (React.createElement(Form, { className: classnames('ants-w-full', 'ants-text-[12px]'), labelAlign: "left" },
|
|
101
|
+
displayType === 'currency' && (React.createElement(React.Fragment, null,
|
|
102
|
+
React.createElement(Form.Item, { labelCol: { span: 8 }, wrapperCol: { span: 16 }, label: t(translations.dynamicContent.modal.label.formNumberDisplayFormat.currency), colon: false },
|
|
103
|
+
React.createElement(Radio.Group, { value: prefixType, onChange: ({ target: { value } }) => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { prefixType: value })) },
|
|
104
|
+
React.createElement(Radio, { style: { fontSize: 12 }, value: "code" }, t(translations.dynamicContent.modal.label.formNumberDisplayFormat.currencyCode)),
|
|
105
|
+
React.createElement(Radio, { style: { fontSize: 12 }, value: "symbol" }, t(translations.dynamicContent.modal.label.formNumberDisplayFormat.currencySymbol)))),
|
|
106
|
+
React.createElement(Form.Item, { label: " ", labelCol: { span: 8 }, wrapperCol: { span: 16 }, colon: false },
|
|
107
|
+
React.createElement(Select, { className: classnames('ants-h-7'), disabled: isLoadingCurrencyOptions, options: listCurrencyOptions, value: currencyCode, onChange: value => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { currencyCode: value })), showSearch: true })))),
|
|
108
|
+
React.createElement(Form.Item, null,
|
|
109
|
+
React.createElement(Checkbox, { style: { fontSize: 12 }, checked: isCompact, onChange: ({ target: { checked } }) => {
|
|
110
|
+
onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { isCompact: checked }));
|
|
111
|
+
} }, t(translations.dynamicContent.modal.label.formNumberDisplayFormat.compact))),
|
|
112
|
+
React.createElement(Form.Item, { label: `${t(translations.dynamicContent.modal.label.formNumberDisplayFormat.decimalPlace)} (${decimalPlaces})`, className: "ants-mb-3", colon: false },
|
|
113
|
+
React.createElement("div", { className: "ants-flex ants-ml-12 ants-space-x-10" },
|
|
114
|
+
React.createElement(Button, { className: "ants-w-16 ants-bg-blue-200 hover:ants-bg-blue-300 focus:ants-bg-blue-200", disabled: decimalPlaces <= 0, onClick: () => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { decimalPlaces: decimalPlaces - 1 })) }, '<< .0'),
|
|
115
|
+
React.createElement(Button, { className: "ants-w-16 ants-bg-blue-200 hover:ants-bg-blue-300 focus:ants-bg-blue-200", onClick: () => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { decimalPlaces: decimalPlaces + 1 })) }, '.00 >>'))),
|
|
116
|
+
React.createElement(Row, { gutter: 15 },
|
|
117
|
+
React.createElement(Col, { span: 12 },
|
|
118
|
+
React.createElement(Form.Item, { label: React.createElement("span", null,
|
|
119
|
+
t(translations.dynamicContent.modal.label.formNumberDisplayFormat.grouping),
|
|
120
|
+
React.createElement(Tooltip, { placement: "top", title: t(translations.dynamicContent.modal.label.formNumberDisplayFormat
|
|
121
|
+
.groupingIconTooltipTitle), className: "ants-ml-1 ants-bg-opacity-40" },
|
|
122
|
+
React.createElement(FontAwesomeIcon, { icon: ['fas', 'info-circle'] }))), colon: false },
|
|
123
|
+
React.createElement(Select, { className: classnames('ants-h-7'), value: grouping, onChange: value => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { grouping: value })), options: listGroupingSeparatorOptions }))),
|
|
124
|
+
React.createElement(Col, { span: 12 },
|
|
125
|
+
React.createElement(Form.Item, { label: React.createElement("span", null,
|
|
126
|
+
t(translations.dynamicContent.modal.label.formNumberDisplayFormat.decimal),
|
|
127
|
+
React.createElement(Tooltip, { placement: "top", title: t(translations.dynamicContent.modal.label.formNumberDisplayFormat
|
|
128
|
+
.decimalIconTooltipTitle), className: "ants-ml-1 ants-bg-opacity-40" },
|
|
129
|
+
React.createElement(FontAwesomeIcon, { icon: ['fas', 'info-circle'] }))), colon: false },
|
|
130
|
+
React.createElement(Select, { className: classnames('ants-h-7'), value: decimal, onChange: value => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { decimal: value })), options: listDecimalSeparatorOptions }))))));
|
|
131
|
+
};
|
|
132
|
+
export default FormatNumber;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormatNumber';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormatNumber';
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { TDataType } from './types';
|
|
2
|
+
export declare const DYNAMIC_CONTENT_SETTING_KEY: {
|
|
3
|
+
EVENT: string;
|
|
4
|
+
INDEX: string;
|
|
5
|
+
ATTRIBUTE: string;
|
|
6
|
+
DYNAMIC_CONTENT_NUMBERIC_ATTR_FORMAT_SETTINGS: string;
|
|
7
|
+
DYNAMIC_CONTENT_DATETIME_ATTR_FORMAT_SETTINGS: string;
|
|
8
|
+
DISPLAY_FORMAT_TYPE: string;
|
|
9
|
+
DYNAMIC_CONTENT_TYPE: string;
|
|
10
|
+
PROMOTION_POOL: string;
|
|
11
|
+
SOURCE: string;
|
|
12
|
+
FUNCTION: string;
|
|
13
|
+
PERNAME: string;
|
|
14
|
+
SAVE_AS_TEMPLATE: string;
|
|
15
|
+
DATA_TYPE: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const DYNAMIC_CONTENT_TYPE_KEY: {
|
|
18
|
+
readonly BO_SETTINGS: "bo-settings";
|
|
19
|
+
readonly CUSTOMER_ATTRIBUTE: "customer-attribute";
|
|
20
|
+
readonly EVENT_ATTRIBUTE: "event-attribute";
|
|
21
|
+
readonly PROMOTION_CODE: "promotion-code";
|
|
22
|
+
readonly VISITOR_ATTRIBUTE: "visitor-attribute";
|
|
23
|
+
readonly CUSTOM_FUNCTION: "custom-function";
|
|
24
|
+
};
|
|
25
|
+
export declare const DYNAMIC_CONTENT_TYPE: {
|
|
26
|
+
[key: string]: {
|
|
27
|
+
index: number;
|
|
28
|
+
label: string;
|
|
29
|
+
value: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const DYNAMIC_CONTENT_ATTR_DF_TYPE: {
|
|
33
|
+
label: string;
|
|
34
|
+
value: string;
|
|
35
|
+
dataType: TDataType;
|
|
36
|
+
}[];
|
|
37
|
+
export declare const DATA_TYPE: {
|
|
38
|
+
[key: string]: {
|
|
39
|
+
index: number;
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export declare const ATTRIBUTE_STATUS: {
|
|
45
|
+
4: {
|
|
46
|
+
value: number;
|
|
47
|
+
label: string;
|
|
48
|
+
errorMessage: string;
|
|
49
|
+
};
|
|
50
|
+
DELETE: {
|
|
51
|
+
value: number;
|
|
52
|
+
label: string;
|
|
53
|
+
errorMessage: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export declare const ATTRIBUTE_TYPE: {
|
|
57
|
+
ITEM: number;
|
|
58
|
+
};
|
|
59
|
+
export declare const BO_STATUS: {
|
|
60
|
+
4: {
|
|
61
|
+
value: number;
|
|
62
|
+
label: string;
|
|
63
|
+
errorMessage: string;
|
|
64
|
+
};
|
|
65
|
+
DELETE: {
|
|
66
|
+
value: number;
|
|
67
|
+
label: string;
|
|
68
|
+
errorMessage: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export declare const ATTRIBUTE_NUMBERIC_FORMAT_OPTION: {
|
|
72
|
+
readonly DECIMAL_SEPARATOR: {
|
|
73
|
+
readonly COMMA: {
|
|
74
|
+
readonly index: 0;
|
|
75
|
+
readonly label: ",";
|
|
76
|
+
readonly value: ",";
|
|
77
|
+
};
|
|
78
|
+
readonly DOT: {
|
|
79
|
+
readonly index: 1;
|
|
80
|
+
readonly label: ".";
|
|
81
|
+
readonly value: ".";
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
readonly GROUPING_SEPARATOR: {
|
|
85
|
+
readonly COMMA: {
|
|
86
|
+
readonly index: 0;
|
|
87
|
+
readonly label: ",";
|
|
88
|
+
readonly value: ",";
|
|
89
|
+
};
|
|
90
|
+
readonly DOT: {
|
|
91
|
+
readonly index: 1;
|
|
92
|
+
readonly label: ".";
|
|
93
|
+
readonly value: ".";
|
|
94
|
+
};
|
|
95
|
+
readonly NONE: {
|
|
96
|
+
readonly index: 2;
|
|
97
|
+
readonly label: "none";
|
|
98
|
+
readonly value: "none";
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
export const DYNAMIC_CONTENT_SETTING_KEY = {
|
|
2
|
+
EVENT: 'event',
|
|
3
|
+
INDEX: 'index',
|
|
4
|
+
ATTRIBUTE: 'attribute',
|
|
5
|
+
DYNAMIC_CONTENT_NUMBERIC_ATTR_FORMAT_SETTINGS: 'numberFormatSettings',
|
|
6
|
+
DYNAMIC_CONTENT_DATETIME_ATTR_FORMAT_SETTINGS: 'datetimeFormatSettings',
|
|
7
|
+
DISPLAY_FORMAT_TYPE: 'dfType',
|
|
8
|
+
DYNAMIC_CONTENT_TYPE: 'type',
|
|
9
|
+
PROMOTION_POOL: 'pool',
|
|
10
|
+
SOURCE: 'source',
|
|
11
|
+
FUNCTION: 'customFunction',
|
|
12
|
+
PERNAME: 'templateName',
|
|
13
|
+
SAVE_AS_TEMPLATE: 'saveAsTemplate',
|
|
14
|
+
DATA_TYPE: 'dataType',
|
|
15
|
+
};
|
|
16
|
+
export const DYNAMIC_CONTENT_TYPE_KEY = {
|
|
17
|
+
BO_SETTINGS: 'bo-settings',
|
|
18
|
+
CUSTOMER_ATTRIBUTE: 'customer-attribute',
|
|
19
|
+
EVENT_ATTRIBUTE: 'event-attribute',
|
|
20
|
+
PROMOTION_CODE: 'promotion-code',
|
|
21
|
+
VISITOR_ATTRIBUTE: 'visitor-attribute',
|
|
22
|
+
CUSTOM_FUNCTION: 'custom-function',
|
|
23
|
+
};
|
|
24
|
+
export const DYNAMIC_CONTENT_TYPE = {
|
|
25
|
+
BO_SETTINGS: {
|
|
26
|
+
index: 4,
|
|
27
|
+
label: '',
|
|
28
|
+
value: DYNAMIC_CONTENT_TYPE_KEY.BO_SETTINGS,
|
|
29
|
+
},
|
|
30
|
+
CUSTOMER_ATTRIBUTE: {
|
|
31
|
+
index: 1,
|
|
32
|
+
label: 'Customer Attribute',
|
|
33
|
+
value: DYNAMIC_CONTENT_TYPE_KEY.CUSTOMER_ATTRIBUTE,
|
|
34
|
+
},
|
|
35
|
+
EVENT_ATTRIBUTE: {
|
|
36
|
+
index: 2,
|
|
37
|
+
label: 'Event Attribute',
|
|
38
|
+
value: DYNAMIC_CONTENT_TYPE_KEY.EVENT_ATTRIBUTE,
|
|
39
|
+
},
|
|
40
|
+
PROMOTION_CODE: {
|
|
41
|
+
index: 3,
|
|
42
|
+
label: 'Promotion Code',
|
|
43
|
+
value: DYNAMIC_CONTENT_TYPE_KEY.PROMOTION_CODE,
|
|
44
|
+
},
|
|
45
|
+
VISITOR_ATTRIBUTE: {
|
|
46
|
+
index: 0,
|
|
47
|
+
label: 'Visitor Attribute',
|
|
48
|
+
value: DYNAMIC_CONTENT_TYPE_KEY.VISITOR_ATTRIBUTE,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
export const DYNAMIC_CONTENT_ATTR_DF_TYPE = [
|
|
52
|
+
{
|
|
53
|
+
label: 'Number',
|
|
54
|
+
value: 'number',
|
|
55
|
+
dataType: 'number',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'Percentage',
|
|
59
|
+
value: 'percentage',
|
|
60
|
+
dataType: 'number',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
label: 'Currency',
|
|
64
|
+
value: 'currency',
|
|
65
|
+
dataType: 'number',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: 'Datetime',
|
|
69
|
+
value: 'datetime',
|
|
70
|
+
dataType: 'datetime',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: 'Raw string',
|
|
74
|
+
value: 'raw_string',
|
|
75
|
+
dataType: 'string',
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
export const DATA_TYPE = {
|
|
79
|
+
NUMBER: {
|
|
80
|
+
index: 0,
|
|
81
|
+
label: 'Number',
|
|
82
|
+
value: 'number',
|
|
83
|
+
},
|
|
84
|
+
DATE_TIME: {
|
|
85
|
+
index: 1,
|
|
86
|
+
label: 'Datetime',
|
|
87
|
+
value: 'datetime',
|
|
88
|
+
},
|
|
89
|
+
STRING: {
|
|
90
|
+
index: 2,
|
|
91
|
+
label: 'String',
|
|
92
|
+
value: 'string',
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
export const ATTRIBUTE_STATUS = {
|
|
96
|
+
4: {
|
|
97
|
+
value: 4,
|
|
98
|
+
label: 'Archive',
|
|
99
|
+
errorMessage: 'This attribute is not available',
|
|
100
|
+
},
|
|
101
|
+
DELETE: {
|
|
102
|
+
value: 3,
|
|
103
|
+
label: 'Delete',
|
|
104
|
+
errorMessage: 'This attribute does not exist',
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
export const ATTRIBUTE_TYPE = {
|
|
108
|
+
ITEM: 2,
|
|
109
|
+
};
|
|
110
|
+
export const BO_STATUS = {
|
|
111
|
+
4: {
|
|
112
|
+
value: 4,
|
|
113
|
+
label: 'Archive',
|
|
114
|
+
errorMessage: 'This BO is archive',
|
|
115
|
+
},
|
|
116
|
+
DELETE: {
|
|
117
|
+
value: 3,
|
|
118
|
+
label: 'Delete',
|
|
119
|
+
errorMessage: 'This BO does not exist',
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
export const ATTRIBUTE_NUMBERIC_FORMAT_OPTION = {
|
|
123
|
+
DECIMAL_SEPARATOR: {
|
|
124
|
+
COMMA: {
|
|
125
|
+
index: 0,
|
|
126
|
+
label: ',',
|
|
127
|
+
value: ',',
|
|
128
|
+
},
|
|
129
|
+
DOT: {
|
|
130
|
+
index: 1,
|
|
131
|
+
label: '.',
|
|
132
|
+
value: '.',
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
GROUPING_SEPARATOR: {
|
|
136
|
+
COMMA: {
|
|
137
|
+
index: 0,
|
|
138
|
+
label: ',',
|
|
139
|
+
value: ',',
|
|
140
|
+
},
|
|
141
|
+
DOT: {
|
|
142
|
+
index: 1,
|
|
143
|
+
label: '.',
|
|
144
|
+
value: '.',
|
|
145
|
+
},
|
|
146
|
+
NONE: {
|
|
147
|
+
index: 2,
|
|
148
|
+
label: 'none',
|
|
149
|
+
value: 'none',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
};
|