@antscorp/antsomi-ui 1.3.5-beta.972 → 1.3.5-beta.973
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/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +1 -0
- package/es/components/molecules/DisplayFormat/DisplayFormatSettings.js +30 -4
- package/es/components/molecules/DisplayFormat/components/FormatNumber.js +1 -1
- package/es/components/molecules/DisplayFormat/constants.d.ts +21 -0
- package/es/components/molecules/DisplayFormat/constants.js +65 -0
- package/es/components/template/TemplateListing/Loadable.d.ts +1 -0
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@ import { translate, translations } from '@antscorp/antsomi-locales';
|
|
|
5
5
|
// Components
|
|
6
6
|
import { FormatDatetime, FormatNumber, } from './components';
|
|
7
7
|
import { EditIcon } from '../../icons';
|
|
8
|
-
import { Button,
|
|
8
|
+
import { Button, Typography } from '../../atoms';
|
|
9
9
|
// Utils
|
|
10
10
|
import { formatDatetimeDF, formatNumberDF } from './utils';
|
|
11
11
|
// Constants
|
|
@@ -43,14 +43,40 @@ export const DisplayFormatSettings = props => {
|
|
|
43
43
|
if (displayFormatType === 'datetime') {
|
|
44
44
|
formatDFValue = formatDatetimeDF(DATE_TIME_EXAMPLE, settings);
|
|
45
45
|
}
|
|
46
|
-
return (_jsxs("div", { className: "ants-flex ants-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
return (_jsxs("div", { className: "ants-flex ants-items-center ants-mt-1 ants-gap-2 ant-flex-row", style: {
|
|
47
|
+
display: 'flex',
|
|
48
|
+
alignItems: 'end',
|
|
49
|
+
gap: '8px',
|
|
50
|
+
marginBottom: '5px',
|
|
51
|
+
flexShrink: 0,
|
|
52
|
+
width: '100%',
|
|
53
|
+
flexWrap: 'nowrap',
|
|
54
|
+
overflow: 'hidden',
|
|
55
|
+
}, ...rest, children: [_jsxs(Typography.Text
|
|
56
|
+
// size={11}
|
|
57
|
+
, {
|
|
58
|
+
// size={11}
|
|
59
|
+
className: "ants-flex", style: {
|
|
60
|
+
color: '#7F7F7F',
|
|
61
|
+
fontSize: '11px',
|
|
62
|
+
whiteSpace: 'nowrap',
|
|
63
|
+
maxWidth: 'calc(89%)',
|
|
64
|
+
}, children: [translate(translations._ACT_PREVIEW), ": \u00A0", _jsx(Typography.Text, { style: {
|
|
65
|
+
color: '#7F7F7F',
|
|
66
|
+
fontSize: '11px',
|
|
67
|
+
whiteSpace: 'nowrap',
|
|
68
|
+
maxWidth: 'calc(85%)',
|
|
69
|
+
}, ellipsis: { tooltip: true }, children: _jsx("bdo", { dir: "ltr", children: formatDFValue }) })] }), _jsx(Button, { disabled: disabled, size: "small", icon: _jsx(EditIcon, { width: 16, height: 16, color: "#005EB8" }), className: "ants-border-none",
|
|
70
|
+
// className={`ants-border-none transition-colors duration-300 rounded-md ${
|
|
71
|
+
// showDetailEdit ? 'bg-[#DEEFFE]' : 'hover:bg-[#E0F2FE]'
|
|
72
|
+
// }`}
|
|
73
|
+
style: {
|
|
49
74
|
marginTop: '1px',
|
|
50
75
|
backgroundColor: showDetailEdit ? '#DEEFFE' : 'transparent',
|
|
51
76
|
border: 'none',
|
|
52
77
|
boxShadow: 'none',
|
|
53
78
|
borderRadius: '5px',
|
|
79
|
+
flexShrink: 0,
|
|
54
80
|
}, onClick: () => setShowDetailEdit(prevShow => !prevShow) })] }));
|
|
55
81
|
};
|
|
56
82
|
const renderFormatSetting = () => {
|
|
@@ -112,7 +112,7 @@ export const FormatNumber = (props) => {
|
|
|
112
112
|
...settingValues,
|
|
113
113
|
isCompact: checked,
|
|
114
114
|
});
|
|
115
|
-
}, children:
|
|
115
|
+
}, children: translate(translations._TITL_EDIT_NUMBER_COMPACT) }) }), _jsx(Form.Item, { label: decimalPlacesLabel, style: { marginBottom: 12 }, colon: false, labelCol: { span: 11 }, wrapperCol: { span: 13 }, 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({
|
|
116
116
|
...settingValues,
|
|
117
117
|
decimalPlaces: decimalPlaces - 1,
|
|
118
118
|
}), size: "small", icon: _jsx(DecreaseDecimalIcon, { color: "#005EB8", style: { padding: '2px' } }) }), _jsx(Button, { style: { border: 'none', boxShadow: 'none', borderRadius: '5px' }, onClick: () => onChangeSettingsHandle({
|
|
@@ -149,3 +149,24 @@ export declare const DYNAMIC_CONTENT_DF_FORMAT_TYPE: {
|
|
|
149
149
|
number: string;
|
|
150
150
|
datetime: string;
|
|
151
151
|
};
|
|
152
|
+
export declare const TYPE_FORMAT_OPTIONS: {
|
|
153
|
+
SHORT: string;
|
|
154
|
+
MEDIUM: string;
|
|
155
|
+
LONG: string;
|
|
156
|
+
};
|
|
157
|
+
export declare const DATE_FORMAT_LIST_TEST: {
|
|
158
|
+
[x: string]: {
|
|
159
|
+
[x: string]: {
|
|
160
|
+
label: string;
|
|
161
|
+
value: string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
export declare const TIME_FORMAT_LIST_TEST: {
|
|
166
|
+
[x: string]: {
|
|
167
|
+
[x: string]: {
|
|
168
|
+
label: string;
|
|
169
|
+
value: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
};
|
|
@@ -239,3 +239,68 @@ export const DYNAMIC_CONTENT_DF_FORMAT_TYPE = {
|
|
|
239
239
|
number: 'number',
|
|
240
240
|
datetime: 'datetime',
|
|
241
241
|
};
|
|
242
|
+
export const TYPE_FORMAT_OPTIONS = {
|
|
243
|
+
SHORT: 'short',
|
|
244
|
+
MEDIUM: 'medium',
|
|
245
|
+
LONG: 'long',
|
|
246
|
+
};
|
|
247
|
+
export const DATE_FORMAT_LIST_TEST = {
|
|
248
|
+
[DATE_FORMAT_OPTIONS[0].value]: {
|
|
249
|
+
[TYPE_FORMAT_OPTIONS.SHORT]: {
|
|
250
|
+
label: translate(translations._DATE_SHORT_FORMAT1),
|
|
251
|
+
value: 'MM/DD/YYYY',
|
|
252
|
+
},
|
|
253
|
+
[TYPE_FORMAT_OPTIONS.MEDIUM]: {
|
|
254
|
+
label: translate(translations._DATE_MEDIUM_FORMAT1),
|
|
255
|
+
value: 'MMM DD, YYYY',
|
|
256
|
+
},
|
|
257
|
+
[TYPE_FORMAT_OPTIONS.LONG]: {
|
|
258
|
+
label: translate(translations._DATE_LONG_FORMAT1),
|
|
259
|
+
value: 'MMMM DD, YYYY',
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
[DATE_FORMAT_OPTIONS[1].value]: {
|
|
263
|
+
[TYPE_FORMAT_OPTIONS.SHORT]: {
|
|
264
|
+
label: translate(translations._DATE_SHORT_FORMAT2),
|
|
265
|
+
value: 'DD/MM/YYYY',
|
|
266
|
+
},
|
|
267
|
+
[TYPE_FORMAT_OPTIONS.MEDIUM]: {
|
|
268
|
+
label: translate(translations._DATE_MEDIUM_FORMAT2),
|
|
269
|
+
value: 'DD MMM, YYYY',
|
|
270
|
+
},
|
|
271
|
+
[TYPE_FORMAT_OPTIONS.LONG]: {
|
|
272
|
+
label: translate(translations._DATE_LONG_FORMAT2),
|
|
273
|
+
value: 'DD MMMM, YYYY',
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
export const TIME_FORMAT_LIST_TEST = {
|
|
278
|
+
[TIME_FORMAT_OPTIONS[0].value]: {
|
|
279
|
+
[TYPE_FORMAT_OPTIONS.SHORT]: {
|
|
280
|
+
label: translate(translations._TIME_SHORT_FOTMAT1),
|
|
281
|
+
value: 'h:mm A',
|
|
282
|
+
},
|
|
283
|
+
[TYPE_FORMAT_OPTIONS.MEDIUM]: {
|
|
284
|
+
label: translate(translations._TIME_MEDIUM_FORMAT1),
|
|
285
|
+
value: 'h:mm:ss A',
|
|
286
|
+
},
|
|
287
|
+
[TYPE_FORMAT_OPTIONS.LONG]: {
|
|
288
|
+
label: translate(translations._TIME_LONG_FORMAT1),
|
|
289
|
+
value: 'h:mm:ss A [GMT]',
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
[TIME_FORMAT_OPTIONS[1].value]: {
|
|
293
|
+
[TYPE_FORMAT_OPTIONS.SHORT]: {
|
|
294
|
+
label: translate(translations._TIME_SHORT_FOTMAT2),
|
|
295
|
+
value: 'H:mm',
|
|
296
|
+
},
|
|
297
|
+
[TYPE_FORMAT_OPTIONS.MEDIUM]: {
|
|
298
|
+
label: translate(translations._TIME_MEDIUM_FORMAT2),
|
|
299
|
+
value: 'H:mm:ss',
|
|
300
|
+
},
|
|
301
|
+
[TYPE_FORMAT_OPTIONS.LONG]: {
|
|
302
|
+
label: translate(translations._TIME_LONG_FORMAT2),
|
|
303
|
+
value: 'H:mm:ss [GMT]',
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antscorp/antsomi-ui",
|
|
3
|
-
"version": "1.3.5-beta.
|
|
3
|
+
"version": "1.3.5-beta.973",
|
|
4
4
|
"description": "An enterprise-class UI design language and React UI library.",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"dist/*",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"not op_mini all"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@antscorp/antsomi-locales": "1.0.
|
|
64
|
+
"@antscorp/antsomi-locales": "1.0.33",
|
|
65
65
|
"@ant-design/cssinjs": "^1.6.2",
|
|
66
66
|
"@antscorp/icons": "0.27.54",
|
|
67
67
|
"@antscorp/image-editor": "1.0.2",
|