@antscorp/antsomi-ui 1.3.5-beta.960 → 1.3.5-beta.962

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.
@@ -21,6 +21,6 @@ const SelectTag = (props) => {
21
21
  setOpen(false);
22
22
  onSelect(item);
23
23
  };
24
- return (_jsx(Popover, { open: open, title: _jsx(Typography.Text, { style: { fontWeight: '400', maxWidth: 130 }, ellipsis: { tooltip: title }, children: title }), content: _jsx(Flex, { wrap: "wrap", gap: 6, style: { padding: '10px 0px' }, children: options.map(item => (_jsx(SelectedTag, { "$color": item.color, "$background": item.background, ellipsis: { tooltip: item.label }, onClick: () => handleClick(item), children: item.label }, item.value))) }), placement: "bottomLeft", trigger: "click", overlayInnerStyle: { padding: 10, maxWidth: 150 }, onOpenChange: handleOpenChange, children: _jsx(SelectedTag, { "$color": selectedItem?.color, "$background": selectedItem?.background, ellipsis: { tooltip: selectedItem?.label }, children: selectedItem?.label }) }));
24
+ return (_jsx(Popover, { open: open, title: _jsx(Typography.Text, { style: { fontWeight: '400', maxWidth: 130 }, ellipsis: { tooltip: title }, children: title }), content: _jsx(Flex, { wrap: "wrap", gap: 6, style: { padding: '10px 0px' }, children: options?.map(item => (_jsx(SelectedTag, { "$color": item.color, "$background": item.background, ellipsis: { tooltip: item.label }, onClick: () => handleClick(item), children: item.label }, item.value))) }), placement: "bottomLeft", trigger: "click", overlayInnerStyle: { padding: 10, maxWidth: 150 }, onOpenChange: handleOpenChange, children: _jsx(SelectedTag, { "$color": selectedItem?.color, "$background": selectedItem?.background, ellipsis: { tooltip: selectedItem?.label }, children: selectedItem?.label }) }));
25
25
  };
26
26
  export default memo(SelectTag);
@@ -1,2 +1,3 @@
1
1
  export { SelectAssociatedTag } from './SelectAssociatedTag';
2
2
  export type { SelectAssociatedTagProps } from './types';
3
+ export * from './constants';
@@ -1 +1,2 @@
1
1
  export { SelectAssociatedTag } from './SelectAssociatedTag';
2
+ export * from './constants';
@@ -34,7 +34,6 @@ export { Image } from './Image';
34
34
  export { IconField } from './IconField';
35
35
  export { Suspense } from './Suspense';
36
36
  export { App } from './App';
37
- export { SelectAssociatedTag } from './SelectAssociatedTag';
38
37
  export * from './Flex';
39
38
  export * from './PreviewTabs';
40
39
  export * from './MobileFrame';
@@ -50,9 +49,9 @@ export * from './Iframe';
50
49
  export * from './Avatar';
51
50
  export * from './NotificationStatus';
52
51
  export * from './List';
52
+ export * from './SelectAssociatedTag';
53
53
  export type { SliderProps } from './Slider';
54
54
  export type { PaginationProps } from './Pagination';
55
55
  export type { InputDynamicProps } from './InputDynamic';
56
56
  export type { ImageProps } from './Image';
57
57
  export type { AppProps } from './App';
58
- export type { SelectAssociatedTagProps } from './SelectAssociatedTag';
@@ -34,7 +34,6 @@ export { Image } from './Image';
34
34
  export { IconField } from './IconField';
35
35
  export { Suspense } from './Suspense';
36
36
  export { App } from './App';
37
- export { SelectAssociatedTag } from './SelectAssociatedTag';
38
37
  export * from './Flex';
39
38
  export * from './PreviewTabs';
40
39
  export * from './MobileFrame';
@@ -50,3 +49,4 @@ export * from './Iframe';
50
49
  export * from './Avatar';
51
50
  export * from './NotificationStatus';
52
51
  export * from './List';
52
+ export * from './SelectAssociatedTag';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
2
3
  export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
3
4
  type DisplayFormatProps = {
@@ -5,11 +5,11 @@ import { DisplayFormatSettings } from './DisplayFormatSettings';
5
5
  // Types
6
6
  import { Select } from '../Select';
7
7
  // Constants
8
- import { DYNAMIC_CONTENT_ATTR_DF_TYPE, NUMBER_SETTINGS_DEFAULT, DATETIME_SETTINGS_DEFAULT, } from './constants';
8
+ import { DYNAMIC_CONTENT_ATTR_DF_TYPE, NUMBER_SETTINGS_DEFAULT, DATETIME_SETTINGS_DEFAULT, DYNAMIC_CONTENT_DF_FORMAT_TYPE, } from './constants';
9
9
  import { useUpdateEffect } from '@antscorp/antsomi-ui/es/hooks';
10
10
  export const DisplayFormatSelect = props => {
11
- const { onSettingChange, formatType = 'number', setting = formatType === 'datetime' ? DATETIME_SETTINGS_DEFAULT : NUMBER_SETTINGS_DEFAULT, disabled, infos, url, ...rest } = props;
12
- const { type: settingType = 'number' } = setting || {};
11
+ const { onSettingChange, formatType, setting = formatType === 'datetime' ? DATETIME_SETTINGS_DEFAULT : NUMBER_SETTINGS_DEFAULT, disabled, infos, url, ...rest } = props;
12
+ const { type: settingType = DYNAMIC_CONTENT_DF_FORMAT_TYPE[formatType] } = setting || {};
13
13
  // Memo
14
14
  const typeOptions = useMemo(() => DYNAMIC_CONTENT_ATTR_DF_TYPE.filter(dfType => dfType.dataType === formatType), [formatType]);
15
15
  // Effects
@@ -17,9 +17,9 @@ export const DisplayFormatSelect = props => {
17
17
  onSettingChange(formatType === 'datetime' ? DATETIME_SETTINGS_DEFAULT : NUMBER_SETTINGS_DEFAULT);
18
18
  // eslint-disable-next-line react-hooks/exhaustive-deps
19
19
  }, [formatType]);
20
- return (typeOptions.length > 0 && (_jsxs("div", { ...rest, style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: [_jsx(Select, { disabled: disabled, value: settingType, options: typeOptions, onSelect: type => onSettingChange({
20
+ return (typeOptions.length > 0 && (_jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, ...rest, children: [_jsx(Select, { disabled: disabled, value: settingType, options: typeOptions, onSelect: type => onSettingChange({
21
21
  ...setting,
22
- type,
22
+ type: type,
23
23
  }) }), _jsx(DisplayFormatSettings, { disabled: disabled, onSettingsChange: setting => {
24
24
  onSettingChange(setting);
25
25
  }, displayFormatType: settingType, formatSettings: setting, url: url ?? '', infos: infos ?? {} })] })));
@@ -12,39 +12,39 @@ import { formatDatetimeDF, formatNumberDF } from './utils';
12
12
  import { DATE_TIME_EXAMPLE, DATETIME_SETTINGS_DEFAULT, NUMBER_SETTINGS_DEFAULT, NUMBER_EXAMPLE, } from './constants';
13
13
  export const DisplayFormatSettings = props => {
14
14
  const { infos, url, displayFormatType, formatSettings, dynamicContentType, onSettingsChange, disabled, ...rest } = props;
15
- const [settings, setSettings] = useState(displayFormatType === 'datetime' ? DATETIME_SETTINGS_DEFAULT : NUMBER_SETTINGS_DEFAULT);
15
+ const [settings, setSettings] = useState(formatSettings ??
16
+ (displayFormatType === 'datetime' ? DATETIME_SETTINGS_DEFAULT : NUMBER_SETTINGS_DEFAULT));
16
17
  const [showDetailEdit, setShowDetailEdit] = useState(false);
17
- const [formatType, setFormatType] = useState(displayFormatType);
18
18
  useEffect(() => {
19
19
  setSettings(displayFormatType === 'datetime' ? DATETIME_SETTINGS_DEFAULT : NUMBER_SETTINGS_DEFAULT);
20
- setFormatType(displayFormatType);
21
20
  }, [displayFormatType]);
22
21
  useEffect(() => {
23
22
  if (Object.keys(formatSettings).length > 0) {
24
23
  setSettings(formatSettings);
25
24
  }
26
25
  }, [formatSettings]);
27
- // const handleChange = (updatedSettings: TDatetimeFormatSetting) => {
28
- // if (onSettingsChange) {
29
- // onSettingsChange({
30
- // ...updatedSettings,
31
- // type: 'datetime',
32
- // language: portalLanguage,
33
- // });
34
- // }
35
- // };
26
+ const handleChangeFormat = (updatedSettings) => {
27
+ if (onSettingsChange) {
28
+ onSettingsChange({
29
+ ...updatedSettings,
30
+ type: displayFormatType,
31
+ });
32
+ }
33
+ };
36
34
  const renderFormatDisplay = () => {
37
35
  let formatDFValue = '';
38
36
  // Numeric Attribute DF
39
- if (formatType === 'number' || formatType === 'currency' || formatType === 'percentage') {
40
- formatDFValue = formatNumberDF(NUMBER_EXAMPLE, formatType, settings);
37
+ if (displayFormatType === 'number' ||
38
+ displayFormatType === 'currency' ||
39
+ displayFormatType === 'percentage') {
40
+ formatDFValue = formatNumberDF(NUMBER_EXAMPLE, displayFormatType, settings);
41
41
  }
42
42
  // Datetime Attribute DF
43
- if (formatType === 'datetime') {
43
+ if (displayFormatType === 'datetime') {
44
44
  formatDFValue = formatDatetimeDF(DATE_TIME_EXAMPLE, settings);
45
45
  }
46
- return (_jsxs("div", { ...rest, className: "ants-flex ants-flex-wrap ants-items-center ants-mt-4 ants-gap-2 ant-flex-row", style: { display: 'flex', alignItems: 'end', gap: '8px', marginBottom: '5px' }, children: [_jsx(Text, { size: 11, className: "text-[11px] ants-flex", color: "#7F7F7F", dangerouslySetInnerHTML: {
47
- __html: `${translate(translations._ACT_PREVIEW)}: <bdo dir='ltr'>${formatDFValue}</bdo>`,
46
+ return (_jsxs("div", { className: "ants-flex ants-flex-wrap ants-items-center ants-mt-1 ants-gap-2 ant-flex-row", style: { display: 'flex', alignItems: 'end', gap: '8px', marginBottom: '5px' }, ...rest, children: [_jsx(Text, { size: 11, className: "ants-flex", color: "#7F7F7F", dangerouslySetInnerHTML: {
47
+ __html: `${translate(translations._ACT_PREVIEW)}: &nbsp;<bdo dir='ltr'>${formatDFValue}</bdo>`,
48
48
  } }), _jsx(Button, { disabled: disabled, size: "small", icon: _jsx(EditIcon, { width: 16, height: 16, color: "#005EB8" }), className: "ants-border-none", style: {
49
49
  marginTop: '1px',
50
50
  backgroundColor: showDetailEdit ? '#DEEFFE' : 'transparent',
@@ -54,14 +54,14 @@ export const DisplayFormatSettings = props => {
54
54
  }, onClick: () => setShowDetailEdit(prevShow => !prevShow) })] }));
55
55
  };
56
56
  const renderFormatSetting = () => {
57
- switch (formatType) {
57
+ switch (displayFormatType) {
58
58
  case 'number':
59
59
  case 'percentage':
60
60
  case 'currency': {
61
- return (_jsx(FormatNumber, { ...settings, onSettingsChange: onSettingsChange, type: formatType, url: url, infos: infos }));
61
+ return (_jsx(FormatNumber, { ...settings, onSettingsChange: handleChangeFormat, type: displayFormatType, url: url, infos: infos }));
62
62
  }
63
63
  case 'datetime': {
64
- return (_jsx(FormatDatetime, { ...settings, onSettingsChange: onSettingsChange, type: formatType, dynamicContentType: dynamicContentType }));
64
+ return (_jsx(FormatDatetime, { ...settings, onSettingsChange: handleChangeFormat, type: displayFormatType, dynamicContentType: dynamicContentType }));
65
65
  }
66
66
  default: {
67
67
  return null;
@@ -3,7 +3,7 @@ export type TDatetimeFormatSetting = {
3
3
  hasDateFormat: boolean;
4
4
  hasTimeFormat: boolean;
5
5
  dateParseFormat: 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'YYYY/MM/DD';
6
- timeParseFormat: '12hour' | '24hour' | string;
6
+ timeParseFormat: '12hour' | '24hour';
7
7
  dateParseOption: 'short' | 'medium' | 'long' | undefined;
8
8
  timeParseOption: 'short' | 'medium' | 'long' | undefined;
9
9
  language?: string;
@@ -42,7 +42,13 @@ export const FormatDatetime = (props) => {
42
42
  return (_jsxs("div", { children: [_jsxs("div", { style: { display: 'flex', gap: '16px', alignItems: 'start' }, children: [_jsx(Checkbox, { style: { marginTop: '4px' }, checked: hasDateFormat, disabled: hasDateFormat && !hasTimeFormat, onChange: e => handleChange({
43
43
  ...dfSettings,
44
44
  hasDateFormat: e.target.checked,
45
- }) }), _jsxs("div", { children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px', marginBottom: '4px' }, children: [_jsx("span", { style: { width: '135px' }, children: translate(translations._TITL_DISPLAY_DATE_AS) }), _jsx(Select, { style: { width: 150 }, disabled: !hasDateFormat, defaultValue: dateParseFormat, options: DATE_FORMAT_OPTIONS, onChange: value => {
45
+ }) }), _jsxs("div", { style: { width: '100%' }, children: [_jsxs("div", { style: {
46
+ display: 'flex',
47
+ alignItems: 'center',
48
+ marginBottom: '4px',
49
+ width: '100%',
50
+ justifyContent: 'space-between',
51
+ }, children: [_jsx("span", { style: { fontSize: '12px' }, children: translate(translations._TITL_DISPLAY_DATE_AS) }), _jsx(Select, { style: { width: 150 }, disabled: !hasDateFormat, defaultValue: dateParseFormat, options: DATE_FORMAT_OPTIONS, onChange: value => {
46
52
  handleChange({
47
53
  ...dfSettings,
48
54
  dateParseFormat: value,
@@ -51,10 +57,21 @@ export const FormatDatetime = (props) => {
51
57
  } })] }), _jsx(RadioGroup, { disabled: !hasDateFormat, defaultValue: dateParseOption, onChange: e => handleChange({
52
58
  ...dfSettings,
53
59
  dateParseOption: e.target.value,
54
- }), children: _jsxs(Space, { direction: "vertical", size: "middle", children: [_jsx(Radio, { value: "short", children: dateFormatExamples.SHORT }), _jsx(Radio, { value: "medium", children: dateFormatExamples.MEDIUM }), _jsx(Radio, { value: "long", children: dateFormatExamples.LONG })] }) })] })] }), _jsxs("div", { style: { display: 'flex', gap: '16px', alignItems: 'start', marginTop: '10px' }, children: [_jsx(Checkbox, { style: { marginTop: '4px' }, checked: hasTimeFormat, disabled: hasTimeFormat && !hasDateFormat, onChange: e => handleChange({
60
+ }), children: _jsxs(Space, { direction: "vertical", size: "middle", children: [_jsx(Radio, { value: "short", children: dateFormatExamples.SHORT }), _jsx(Radio, { value: "medium", children: dateFormatExamples.MEDIUM }), _jsx(Radio, { value: "long", children: dateFormatExamples.LONG })] }) })] })] }), _jsxs("div", { style: {
61
+ display: 'flex',
62
+ gap: '16px',
63
+ alignItems: 'start',
64
+ marginTop: '10px',
65
+ }, children: [_jsx(Checkbox, { style: { marginTop: '4px' }, checked: hasTimeFormat, disabled: hasTimeFormat && !hasDateFormat, onChange: e => handleChange({
55
66
  ...dfSettings,
56
67
  hasTimeFormat: e.target.checked,
57
- }) }), _jsxs("div", { children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px', marginBottom: '4px' }, children: [_jsx("span", { style: { width: '135px' }, children: translate(translations._TITL_DISPLAY_TIME_AS) }), _jsx(Select, { style: { width: 150 }, disabled: !hasTimeFormat, defaultValue: timeParseFormat, options: TIME_FORMAT_OPTIONS, onChange: value => {
68
+ }) }), _jsxs("div", { style: { width: '100%' }, children: [_jsxs("div", { style: {
69
+ display: 'flex',
70
+ alignItems: 'center',
71
+ justifyContent: 'space-between',
72
+ width: '100%',
73
+ marginBottom: '4px',
74
+ }, children: [_jsx("span", { style: { fontSize: '12px' }, children: translate(translations._TITL_DISPLAY_TIME_AS) }), _jsx(Select, { style: { width: 150 }, disabled: !hasTimeFormat, defaultValue: timeParseFormat, options: TIME_FORMAT_OPTIONS, onChange: value => {
58
75
  handleChange({
59
76
  ...dfSettings,
60
77
  timeParseFormat: value,
@@ -42,7 +42,6 @@ export type TNumberFormatSettings = {
42
42
  };
43
43
  type FormatNumberProps = {
44
44
  onSettingsChange?: (settingValues: TNumberFormatSettings) => void;
45
- type: TDisplayFormat;
46
45
  } & TNumberFormatSettings & {
47
46
  infos: PayloadInfo;
48
47
  url: string;
@@ -15,11 +15,15 @@ import { translate, translations } from '@antscorp/antsomi-locales';
15
15
  import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
16
16
  import { DecreaseDecimalIcon, IncreaseDecimalIcon, ViewDetailsInformationIcon, } from '../../../icons';
17
17
  import { CURRENCY_REGEX, DECIMAL_PLACES_REGEX } from '../regex';
18
+ import { useAppConfigContext } from '@antscorp/antsomi-ui/es/providers';
19
+ import { MEDIA_TEMPLATE_API } from '@antscorp/antsomi-ui/es/constants';
18
20
  const groupingOptions = ATTRIBUTE_NUMBERIC_FORMAT_OPTION.GROUPING_SEPARATOR;
19
21
  const decimalOptions = ATTRIBUTE_NUMBERIC_FORMAT_OPTION.DECIMAL_SEPARATOR;
20
22
  export const FormatNumber = (props) => {
21
23
  const { t, language } = i18nInstance;
22
- const { onSettingsChange, type: displayType, infos, url } = props;
24
+ const { onSettingsChange, type: formatType, infos, url } = props;
25
+ const { appConfig } = useAppConfigContext();
26
+ const { auth, env } = appConfig || {};
23
27
  const { currencyCode, decimalPlaces, grouping, decimal, prefixType, isCompact } = props;
24
28
  const settingValues = {
25
29
  decimalPlaces,
@@ -28,6 +32,7 @@ export const FormatNumber = (props) => {
28
32
  isCompact,
29
33
  currencyCode,
30
34
  prefixType,
35
+ type: formatType,
31
36
  };
32
37
  const [listCurrencyOptions, setListCurrencyOptions] = useState([]);
33
38
  const [isLoadingCurrencyOptions, setIsLoadingCurrencyOptions] = useState(true);
@@ -36,7 +41,7 @@ export const FormatNumber = (props) => {
36
41
  if (onSettingsChange) {
37
42
  onSettingsChange({
38
43
  ...settingValues,
39
- type: displayType,
44
+ // type: displayType,
40
45
  });
41
46
  }
42
47
  };
@@ -54,7 +59,7 @@ export const FormatNumber = (props) => {
54
59
  else {
55
60
  setIsLoadingCurrencyOptions(true);
56
61
  try {
57
- const data = await getCurrencyList({ lang: language, url }, infos);
62
+ const data = await getCurrencyList({ lang: language, url: `${MEDIA_TEMPLATE_API[env || 'sandbox-cdp']}/api/v1` }, auth || {});
58
63
  const currencies = data.reduce((accumulate, currency) => {
59
64
  if (Currencies[currency.code]) {
60
65
  accumulate.push({
@@ -96,10 +101,10 @@ export const FormatNumber = (props) => {
96
101
  ...decimal,
97
102
  ...(decimal.value === grouping && { disabled: true }),
98
103
  })), [grouping]);
99
- return (_jsxs(Form, { style: { width: '100%', fontSize: '12px' }, labelAlign: "left", children: [displayType === 'currency' && (_jsxs(_Fragment, { children: [_jsx(Form.Item, { labelCol: { span: 3 }, wrapperCol: { span: 21 }, label: translate(translations._TITL_CURRENCY), colon: false, children: _jsxs(Radio.Group, { value: prefixType, onChange: ({ target: { value } }) => onChangeSettingsHandle({
104
+ return (_jsxs(Form, { style: { width: '100%', fontSize: '12px' }, labelAlign: "left", children: [formatType === 'currency' && (_jsxs(_Fragment, { children: [_jsx(Form.Item, { labelCol: { span: 10 }, wrapperCol: { span: 14 }, label: translate(translations._TITL_CURRENCY), colon: false, children: _jsxs(Radio.Group, { value: prefixType, onChange: ({ target: { value } }) => onChangeSettingsHandle({
100
105
  ...settingValues,
101
106
  prefixType: value,
102
- }), children: [_jsx(Radio, { style: { fontSize: 12 }, value: "code", children: t(translations.dynamicContent.modal.label.formNumberDisplayFormat.currencyCode) }), _jsx(Radio, { style: { fontSize: 12 }, value: "symbol", children: t(translations.dynamicContent.modal.label.formNumberDisplayFormat.currencySymbol) })] }) }), _jsx(Form.Item, { label: " ", labelCol: { span: 3 }, wrapperCol: { span: 21 }, colon: false, children: _jsx(Select, { style: { width: 150 }, disabled: isLoadingCurrencyOptions, options: listCurrencyOptions, value: currencyCode, onChange: value => onChangeSettingsHandle({
107
+ }), children: [_jsx(Radio, { style: { fontSize: 12 }, value: "code", children: t(translations.dynamicContent.modal.label.formNumberDisplayFormat.currencyCode) }), _jsx(Radio, { style: { fontSize: 12 }, value: "symbol", children: t(translations.dynamicContent.modal.label.formNumberDisplayFormat.currencySymbol) })] }) }), _jsx(Form.Item, { label: " ", labelCol: { span: 10 }, wrapperCol: { span: 14 }, colon: false, children: _jsx(Select, { style: { width: 150 }, disabled: isLoadingCurrencyOptions, options: listCurrencyOptions, value: currencyCode, onChange: value => onChangeSettingsHandle({
103
108
  ...settingValues,
104
109
  currencyCode: value,
105
110
  }), showSearch: true }) })] })), _jsx(Form.Item, { children: _jsx(Checkbox, { style: { fontSize: 12 }, checked: isCompact, onChange: ({ target: { checked } }) => {
@@ -107,18 +112,18 @@ export const FormatNumber = (props) => {
107
112
  ...settingValues,
108
113
  isCompact: checked,
109
114
  });
110
- }, children: t(translations.dynamicContent.modal.label.formNumberDisplayFormat.compact) }) }), _jsx(Form.Item, { label: decimalPlacesLabel, style: { marginBottom: 12 }, colon: false, labelCol: { span: 3 }, wrapperCol: { span: 21 }, children: _jsxs("div", { style: { display: 'flex', marginLeft: '55px', gap: '15px' }, children: [_jsx(Button, { style: { border: 'none', boxShadow: 'none', borderRadius: '5px' }, disabled: decimalPlaces <= 0, onClick: () => onChangeSettingsHandle({
115
+ }, children: t(translations.dynamicContent.modal.label.formNumberDisplayFormat.compact) }) }), _jsx(Form.Item, { label: decimalPlacesLabel, style: { marginBottom: 12 }, colon: false, labelCol: { span: 10 }, wrapperCol: { span: 14 }, children: _jsxs("div", { style: { display: 'flex', marginLeft: '55px', gap: '15px' }, children: [_jsx(Button, { style: { border: 'none', boxShadow: 'none', borderRadius: '5px' }, disabled: decimalPlaces <= 0, onClick: () => onChangeSettingsHandle({
111
116
  ...settingValues,
112
117
  decimalPlaces: decimalPlaces - 1,
113
118
  }), size: "small", icon: _jsx(DecreaseDecimalIcon, { color: "#005EB8", style: { padding: '2px' } }) }), _jsx(Button, { style: { border: 'none', boxShadow: 'none', borderRadius: '5px' }, onClick: () => onChangeSettingsHandle({
114
119
  ...settingValues,
115
120
  decimalPlaces: decimalPlaces + 1,
116
121
  }), size: "small", icon: _jsx(IncreaseDecimalIcon, { color: "#005EB8", style: { padding: '2px' } }) })] }) }), _jsx(Form.Item, { label: _jsxs(_Fragment, { children: [_jsx("span", { style: { marginRight: '6px' }, children: translate(translations._DISPLAY_GROUPING) }), _jsx(Tooltip, { placement: "top", title: t(translations.dynamicContent.modal.label.formNumberDisplayFormat
117
- .groupingIconTooltipTitle), style: { marginLeft: 4, opacity: 0.4 }, children: _jsx(ViewDetailsInformationIcon, { size: 14 }) })] }), colon: false, labelCol: { span: 3 }, wrapperCol: { span: 21 }, children: _jsx(Select, { style: { width: 100 }, value: grouping, onChange: value => onChangeSettingsHandle({
122
+ .groupingIconTooltipTitle), style: { marginLeft: 4, opacity: 0.4 }, children: _jsx(ViewDetailsInformationIcon, { size: 14 }) })] }), colon: false, labelCol: { span: 10 }, wrapperCol: { span: 14 }, children: _jsx(Select, { style: { width: 100 }, value: grouping, onChange: value => onChangeSettingsHandle({
118
123
  ...settingValues,
119
124
  grouping: value,
120
125
  }), options: listGroupingSeparatorOptions }) }), _jsx(Form.Item, { label: _jsxs(_Fragment, { children: [_jsx("span", { style: { marginRight: '6px' }, children: translate(translations._DISPLAY_DECIMAL) }), _jsx(Tooltip, { placement: "top", title: t(translations.dynamicContent.modal.label.formNumberDisplayFormat
121
- .decimalIconTooltipTitle), style: { marginLeft: 4, opacity: 0.4 }, children: _jsx(ViewDetailsInformationIcon, { size: 14 }) })] }), labelCol: { span: 3 }, wrapperCol: { span: 21 }, colon: false, children: _jsx(Select, { style: { width: 100 }, value: decimal, onChange: value => onChangeSettingsHandle({
126
+ .decimalIconTooltipTitle), style: { marginLeft: 4, opacity: 0.4 }, children: _jsx(ViewDetailsInformationIcon, { size: 14 }) })] }), labelCol: { span: 10 }, wrapperCol: { span: 14 }, colon: false, children: _jsx(Select, { style: { width: 100 }, value: decimal, onChange: value => onChangeSettingsHandle({
122
127
  ...settingValues,
123
128
  decimal: value,
124
129
  }), options: listDecimalSeparatorOptions }) })] }));
@@ -145,3 +145,7 @@ export declare const TIME_FORMAT_LIST: {
145
145
  export declare const GROUPING_OPTIONS: {};
146
146
  export declare const NUMBER_SETTINGS_DEFAULT: TNumberFormatSettings;
147
147
  export declare const DATETIME_SETTINGS_DEFAULT: TDatetimeFormatSetting;
148
+ export declare const DYNAMIC_CONTENT_DF_FORMAT_TYPE: {
149
+ number: string;
150
+ datetime: string;
151
+ };
@@ -235,3 +235,7 @@ export const DATETIME_SETTINGS_DEFAULT = {
235
235
  timeParseFormat: '12hour',
236
236
  type: 'datetime',
237
237
  };
238
+ export const DYNAMIC_CONTENT_DF_FORMAT_TYPE = {
239
+ number: 'number',
240
+ datetime: 'datetime',
241
+ };
@@ -64,6 +64,7 @@ export * from './Tabs';
64
64
  export * from './TagifyInput';
65
65
  export * from './EmojiCollections';
66
66
  export * from './EmojiPopover';
67
+ export * from './DisplayFormat';
67
68
  export { EditorScript } from './EditorScript';
68
69
  export { EditorTab } from './EditorTab';
69
70
  export { SelectAccount } from './SelectAccount';
@@ -64,6 +64,7 @@ export * from './Tabs';
64
64
  export * from './TagifyInput';
65
65
  export * from './EmojiCollections';
66
66
  export * from './EmojiPopover';
67
+ export * from './DisplayFormat';
67
68
  export { EditorScript } from './EditorScript';
68
69
  export { EditorTab } from './EditorTab';
69
70
  export { SelectAccount } from './SelectAccount';
@@ -3,4 +3,5 @@
3
3
  * Asynchronously loads the component for TemplateListing
4
4
  *
5
5
  */
6
+ /// <reference types="react" />
6
7
  export declare const TemplateListing: (props: import("./types").TemplateListingProps<{}>) => JSX.Element;
@@ -16,7 +16,7 @@ export const CDP_API = {
16
16
  export const MEDIA_TEMPLATE_API = {
17
17
  [ENV.DEV]: 'https://sandbox-media-template.antsomi.com',
18
18
  [ENV.SANDBOX]: 'https://sandbox-media-template.antsomi.com',
19
- [ENV.SANDBOX_CDP]: 'https://sandbox-media-template.antsomi.com',
19
+ [ENV.SANDBOX_CDP]: 'https://sandbox-media-template.antsomi.com/cdp',
20
20
  [ENV.STAGING]: 'https://staging-media-template.antsomi.com',
21
21
  [ENV.PROD]: 'https://media-template.antsomi.com',
22
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.960",
3
+ "version": "1.3.5-beta.962",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",