dtable-ui-component 6.0.110 → 6.0.111-amk.13
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/lib/ActionSheet/index.js +42 -35
- package/lib/ActivityIndicator/index.js +9 -9
- package/lib/AsyncUserSelect/index.js +3 -3
- package/lib/Badge/index.js +27 -31
- package/lib/CheckboxEditor/index.js +15 -14
- package/lib/CollaboratorEditor/index.js +16 -15
- package/lib/CollaboratorEditor/pc-editor/index.js +1 -1
- package/lib/CollapsibleSettingLayout/index.js +1 -1
- package/lib/Comment/body/comment.js +1 -1
- package/lib/Comment/body/index.js +7 -9
- package/lib/Comment/footer/index.js +1 -1
- package/lib/Comment/footer/input/index.js +5 -5
- package/lib/Comment/footer/input/participant/index.js +1 -1
- package/lib/Comment/footer/participants/participant-select/index.js +2 -2
- package/lib/Comment/utils/utilities.js +1 -1
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +8 -6
- package/lib/DTableColorPicker/index.js +13 -12
- package/lib/DTableColorPicker/utils.js +1 -1
- package/lib/DTableCommonAddTool/index.js +2 -2
- package/lib/DTableFiltersPopover/index.js +1 -1
- package/lib/DTableFiltersPopover/utils/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/filter-group.js +2 -2
- package/lib/DTableFiltersPopover/widgets/filter-item.js +1 -1
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/rate-item.js +5 -5
- package/lib/DTableGroupSelect/select-option-group.js +1 -1
- package/lib/DTableIcon/index.js +4 -4
- package/lib/DTableIcon/svg-icon.js +4 -4
- package/lib/DTableModalHeader/index.js +6 -8
- package/lib/DTableRadioGroup/index.js +3 -3
- package/lib/DTableSelect/dtable-select-label.js +1 -1
- package/lib/DTableSelect/utils.js +55 -36
- package/lib/DateEditor/index.js +13 -10
- package/lib/DateEditor/pc-editor.js +1 -1
- package/lib/DatePicker/utils.js +4 -4
- package/lib/DepartmentMultipleSelectEditor/index.js +3 -3
- package/lib/DepartmentSelectFilter/index.js +5 -2
- package/lib/DepartmentSingleSelectEditor/index.js +15 -14
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +2 -2
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +6 -6
- package/lib/DigitalSignEditor/index.js +15 -14
- package/lib/DigitalSignEditor/mb-editor/index.js +4 -4
- package/lib/DigitalSignEditor/pc-editor/index.js +7 -6
- package/lib/DigitalSignEditor/service.js +1 -1
- package/lib/DigitalSignEditor/signature-board/index.js +2 -2
- package/lib/DigitalSignFormatter/utils.js +1 -1
- package/lib/Drawer/index.js +3 -2
- package/lib/FieldDisplaySetting/field-item.js +1 -1
- package/lib/FieldDisplaySetting/index.js +11 -9
- package/lib/FileEditor/files-previewer/index.js +15 -14
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +2 -2
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +3 -3
- package/lib/FileEditor/index.js +15 -14
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +6 -6
- package/lib/FileEditor/pc-editor/index.js +3 -3
- package/lib/FileFormatter/index.js +5 -3
- package/lib/FileItemFormatter/index.js +1 -1
- package/lib/FileUploader/index.js +1 -1
- package/lib/FormulaFormatter/index.js +15 -9
- package/lib/GeolocationEditor/index.js +23 -19
- package/lib/GeolocationEditor/map-editor-utils.js +10 -6
- package/lib/GeolocationEditor/mb-editor/index.js +27 -23
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +9 -6
- package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/index.js +21 -15
- package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +13 -9
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +9 -6
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +24 -7
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +20 -3
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +1 -1
- package/lib/GeolocationEditor/pc-editor/province-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/selector-list.js +1 -1
- package/lib/HtmlLongTextFormatter/index.js +1 -1
- package/lib/Icon/index.js +13 -17
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +11 -14
- package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
- package/lib/ImageEditor/index.js +15 -14
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +2 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +5 -5
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +1 -1
- package/lib/ImageFormatter/index.js +1 -1
- package/lib/ImagePreviewerLightbox/index.js +20 -17
- package/lib/ImageThumbnail/index.js +2 -2
- package/lib/InputItem/custom-input.js +9 -9
- package/lib/InputItem/custom-keyboard.js +34 -37
- package/lib/InputItem/index.js +52 -49
- package/lib/InputItem/input.js +9 -13
- package/lib/LinkEditor/pc-popover/index.js +3 -2
- package/lib/List/index.js +17 -21
- package/lib/List/list-item.js +50 -52
- package/lib/MBEditorHeader/index.js +1 -1
- package/lib/MobileFullScreenPage/body/index.js +1 -1
- package/lib/MobileFullScreenPage/header/index.js +4 -4
- package/lib/MobileFullScreenPage/index.js +1 -1
- package/lib/MobileModal/index.js +7 -10
- package/lib/Modal/alert.js +2 -2
- package/lib/Modal/modal.js +28 -31
- package/lib/Modal/prompt.js +10 -10
- package/lib/MultipleSelectEditor/index.js +6 -8
- package/lib/MultipleSelectFormatter/index.js +1 -1
- package/lib/PhoneNumberLink/index.js +1 -1
- package/lib/Picker/AbstractPicker.js +26 -28
- package/lib/Popover/index.js +9 -12
- package/lib/Popover/item.js +22 -26
- package/lib/Progress/index.js +10 -8
- package/lib/Radio/Radio.js +13 -15
- package/lib/Radio/RadioItem.js +18 -18
- package/lib/RateFormatter/index.js +2 -2
- package/lib/RoleStatusEditor/index.js +1 -1
- package/lib/RowExpand/index.js +7 -6
- package/lib/RowExpandDialog/body/index.js +14 -14
- package/lib/RowExpandDialog/column-content/index.js +1 -1
- package/lib/RowExpandDialog/header/index.js +4 -3
- package/lib/RowExpandDialog/index.js +43 -32
- package/lib/RowExpandEditor/add-btn/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
- package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
- package/lib/RowExpandEditor/date-editor/index.js +7 -6
- package/lib/RowExpandEditor/department-editor/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +4 -4
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +4 -4
- package/lib/RowExpandEditor/duration-editor/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandEditor/file-editor/index.js +7 -6
- package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandEditor/index.js +11 -10
- package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +5 -5
- package/lib/RowExpandEditor/number-editor/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +1 -1
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +5 -5
- package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +4 -4
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
- package/lib/RowExpandEditor/text-editor/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +2 -2
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +2 -2
- package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
- package/lib/RowExpandFormatter/email-formatter/index.js +1 -1
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/formula-formatter/index.js +17 -11
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/index.js +11 -7
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +1 -1
- package/lib/RowExpandFormatter/link-formatter/index.js +6 -6
- package/lib/RowExpandFormatter/rate-formatter/index.js +2 -2
- package/lib/RowExpandFormatter/url-formatter/index.js +2 -2
- package/lib/RowExpandView/body/index.js +13 -15
- package/lib/RowExpandView/index.js +39 -28
- package/lib/SelectOptionGroup/index.js +1 -1
- package/lib/SelectedDepartments/index.js +3 -3
- package/lib/SimpleLongTextFormatter/index.js +2 -2
- package/lib/SingleSelectEditor/index.js +6 -8
- package/lib/TabBar/Tab.js +10 -10
- package/lib/TabBar/index.js +7 -6
- package/lib/Tabs/index.js +10 -9
- package/lib/TextareaItem/index.js +43 -45
- package/lib/Toast/index.js +5 -5
- package/lib/formatterConfig/index.js +3 -3
- package/lib/select-editor/index.js +15 -14
- package/lib/select-editor/pc-editor/index.js +5 -5
- package/lib/toaster/alert.js +1 -1
- package/lib/toaster/toast.js +1 -1
- package/lib/toaster/toastManager.js +12 -14
- package/lib/toaster/toaster.js +12 -9
- package/lib/utils/class.js +3 -3
- package/lib/utils/departments.js +3 -4
- package/lib/utils/getLocale.js +11 -5
- package/lib/utils/object-utils.js +5 -4
- package/lib/utils/url.js +4 -4
- package/package.json +3 -3
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _reactstrap = require("reactstrap");
|
|
12
11
|
var _reactColor = require("react-color");
|
|
@@ -180,9 +179,10 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
180
179
|
setSpecColor(value[specColor]);
|
|
181
180
|
return;
|
|
182
181
|
}
|
|
183
|
-
const newValue =
|
|
182
|
+
const newValue = {
|
|
183
|
+
...value,
|
|
184
184
|
[specColor]: val
|
|
185
|
-
}
|
|
185
|
+
};
|
|
186
186
|
updateValue(newValue);
|
|
187
187
|
};
|
|
188
188
|
const updateValue = newValue => {
|
|
@@ -195,9 +195,10 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
195
195
|
setAlphaVal((0, _utils.toPercentage)(value.a));
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
const newValue =
|
|
198
|
+
const newValue = {
|
|
199
|
+
...value,
|
|
199
200
|
a: parseFloat(alphaVal) / 100
|
|
200
|
-
}
|
|
201
|
+
};
|
|
201
202
|
updateValue(newValue);
|
|
202
203
|
};
|
|
203
204
|
const onKeyDown = (event, callBack) => {
|
|
@@ -245,18 +246,18 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
245
246
|
children: colors.map((color, index) => {
|
|
246
247
|
const isLight = (0, _utils.isLightColor)(color);
|
|
247
248
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
248
|
-
className:
|
|
249
|
+
className: `color-item mr-2 ${isLight ? '' : 'dark'}`,
|
|
249
250
|
onClick: () => onSelectDefaultColor(color),
|
|
250
251
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
251
252
|
className: "colorinput-color d-flex align-items-center justify-content-center",
|
|
252
253
|
style: {
|
|
253
254
|
backgroundColor: color
|
|
254
255
|
},
|
|
255
|
-
children: color ===
|
|
256
|
+
children: color === `${(0, _utils.rgbaToHex)(value)}` && alphaVal === 100 && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
256
257
|
className: "dtable-icon-color-check dtable-font dtable-icon-check-mark"
|
|
257
258
|
})
|
|
258
259
|
})
|
|
259
|
-
},
|
|
260
|
+
}, `default-color-${index}`);
|
|
260
261
|
})
|
|
261
262
|
})]
|
|
262
263
|
});
|
|
@@ -270,7 +271,7 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
270
271
|
color: value,
|
|
271
272
|
onChange: onChangeChromePicker
|
|
272
273
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
273
|
-
className:
|
|
274
|
+
className: `color-setting d-flex align-items-center ${colorMode}`,
|
|
274
275
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
275
276
|
className: "mode-btn d-flex",
|
|
276
277
|
onClick: onChangeMode,
|
|
@@ -344,7 +345,7 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
344
345
|
children: currentUsedColors.map((color, index) => {
|
|
345
346
|
const isLight = (0, _utils.isLightColor)(color);
|
|
346
347
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
347
|
-
className:
|
|
348
|
+
className: `color-item mr-2 ${isLight ? '' : 'dark'}`,
|
|
348
349
|
onClick: () => onSelectDefaultColor(color),
|
|
349
350
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
350
351
|
className: "colorinput-color d-flex align-items-center justify-content-center",
|
|
@@ -352,7 +353,7 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
352
353
|
backgroundColor: color
|
|
353
354
|
}
|
|
354
355
|
})
|
|
355
|
-
},
|
|
356
|
+
}, `default-color-${index}`);
|
|
356
357
|
})
|
|
357
358
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
358
359
|
className: "blank-placeholder d-flex align-items-center justify-content-center",
|
|
@@ -54,7 +54,7 @@ const rgbaToHex = function (color) {
|
|
|
54
54
|
return hex.length === 1 ? '0' + hex : hex;
|
|
55
55
|
};
|
|
56
56
|
const alpha = a !== undefined && a !== 1 ? toHex(Math.round(a * 255)) : '';
|
|
57
|
-
return
|
|
57
|
+
return `${isNeedPrefix ? '#' : ''}${toHex(r)}${toHex(g)}${toHex(b)}${isNeedAlpha ? alpha : ''}`;
|
|
58
58
|
};
|
|
59
59
|
exports.rgbaToHex = rgbaToHex;
|
|
60
60
|
const isLightColor = color => {
|
|
@@ -18,11 +18,11 @@ function DTableCommonAddTool(_ref) {
|
|
|
18
18
|
style
|
|
19
19
|
} = _ref;
|
|
20
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21
|
-
className:
|
|
21
|
+
className: `dtable-ui add-item-btn ${className ? className : ''}`,
|
|
22
22
|
style: style,
|
|
23
23
|
onClick: e => callBack(e),
|
|
24
24
|
children: [!hideIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
25
|
-
className:
|
|
25
|
+
className: `dtable-font dtable-icon-add-table ${addIconClassName || ''}`
|
|
26
26
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
27
27
|
className: "add-new-option text-truncate",
|
|
28
28
|
children: footerName
|
|
@@ -156,7 +156,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
156
156
|
firstDayOfWeek: firstDayOfWeek,
|
|
157
157
|
updateFilters: this.updateFilters
|
|
158
158
|
}), !isSupportAdvanced && !readOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCommonAddTool.default, {
|
|
159
|
-
className:
|
|
159
|
+
className: `popover-add-tool ${canAddFilter ? '' : 'disabled'}`,
|
|
160
160
|
callBack: canAddFilter ? () => this.addFilter() : () => {},
|
|
161
161
|
footerName: (0, _lang.getLocale)('Add_filter'),
|
|
162
162
|
addIconClassName: "popover-add-icon"
|
|
@@ -407,7 +407,7 @@ const getMediaUrl = () => {
|
|
|
407
407
|
};
|
|
408
408
|
const generateDefaultUser = name => {
|
|
409
409
|
const mediaUrl = getMediaUrl();
|
|
410
|
-
const defaultAvatarUrl =
|
|
410
|
+
const defaultAvatarUrl = `${mediaUrl}avatars/default.png`;
|
|
411
411
|
return {
|
|
412
412
|
name,
|
|
413
413
|
email: name,
|
|
@@ -146,7 +146,7 @@ class FilterGroup extends _react.Component {
|
|
|
146
146
|
updateConjunction: this.modifyConjunctionInGroup,
|
|
147
147
|
deleteFilter: this.deleteFilterInGroup,
|
|
148
148
|
updateFilter: this.updateFilterInGroup
|
|
149
|
-
},
|
|
149
|
+
}, `filter-in-group-${groupIndex}-${subFilterIndex}`);
|
|
150
150
|
});
|
|
151
151
|
};
|
|
152
152
|
}
|
|
@@ -157,7 +157,7 @@ class FilterGroup extends _react.Component {
|
|
|
157
157
|
readOnly
|
|
158
158
|
} = this.props;
|
|
159
159
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
160
|
-
className: (0, _classnames.default)('filter-item', 'filter-group',
|
|
160
|
+
className: (0, _classnames.default)('filter-item', 'filter-group', `level-${level}`),
|
|
161
161
|
children: [!readOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
162
162
|
className: "delete-filter",
|
|
163
163
|
onClick: this.deleteFilterGroup,
|
|
@@ -790,7 +790,7 @@ class FilterItem extends _react.default.Component {
|
|
|
790
790
|
isLocked: readOnly
|
|
791
791
|
})
|
|
792
792
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
793
|
-
className:
|
|
793
|
+
className: `filter-predicate ml-2 ${_isCheckboxColumn ? 'filter-checkbox-predicate' : ''}`,
|
|
794
794
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSelect.default, {
|
|
795
795
|
value: activePredicate,
|
|
796
796
|
options: filterPredicateOptions,
|
|
@@ -261,7 +261,7 @@ class FiltersList extends _react.Component {
|
|
|
261
261
|
modifyConjunctionInGroup: this.modifyConjunctionInGroup,
|
|
262
262
|
deleteFilterInGroup: this.deleteFilterInGroup,
|
|
263
263
|
updateFilterInGroup: this.updateFilterInGroup
|
|
264
|
-
},
|
|
264
|
+
}, `filter-group-${index}`);
|
|
265
265
|
}
|
|
266
266
|
const {
|
|
267
267
|
error_message
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _reactstrap = require("reactstrap");
|
|
11
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -57,19 +56,20 @@ class RateItem extends _react.default.Component {
|
|
|
57
56
|
};
|
|
58
57
|
let style = itemStyle;
|
|
59
58
|
if (enterRateItemIndex >= rateItemIndex) {
|
|
60
|
-
style =
|
|
59
|
+
style = {
|
|
60
|
+
...itemStyle,
|
|
61
61
|
color: rate_style_color,
|
|
62
62
|
opacity: 0.4
|
|
63
|
-
}
|
|
63
|
+
};
|
|
64
64
|
}
|
|
65
65
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
66
66
|
onMouseEnter: this.onMouseEnterRateItem,
|
|
67
67
|
onMouseLeave: this.onMouseLeaveRateItem,
|
|
68
68
|
style: style,
|
|
69
69
|
onClick: this.onChangeRateNumber,
|
|
70
|
-
className:
|
|
70
|
+
className: `rate-item ${value >= rateItemIndex ? 'rate-item-active' : ''}`,
|
|
71
71
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
72
|
-
className:
|
|
72
|
+
className: `dtable-font ${rateShowType}`,
|
|
73
73
|
ref: this.tooltipRef
|
|
74
74
|
}), editable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.UncontrolledTooltip, {
|
|
75
75
|
placement: "bottom",
|
|
@@ -154,7 +154,7 @@ class SelectOptionGroup extends _react.Component {
|
|
|
154
154
|
}), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
155
155
|
className: "dtable-font dtable-icon-check-mark"
|
|
156
156
|
})]
|
|
157
|
-
},
|
|
157
|
+
}, `${option.id}-${index}`);
|
|
158
158
|
});
|
|
159
159
|
};
|
|
160
160
|
this.state = {
|
package/lib/DTableIcon/index.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
9
|
var _svgIcon = _interopRequireDefault(require("./svg-icon"));
|
|
11
10
|
require("./index.css");
|
|
@@ -24,14 +23,15 @@ const DTableIcon = _ref => {
|
|
|
24
23
|
if (ariaHidden) {
|
|
25
24
|
customProps['aria-hidden'] = ariaHidden;
|
|
26
25
|
}
|
|
27
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i",
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
28
27
|
className: (0, _classnames.default)(symbol, className, {
|
|
29
28
|
'dtable-font': !symbol.includes('dtable-font')
|
|
30
29
|
}),
|
|
31
30
|
style: {
|
|
32
31
|
color
|
|
33
|
-
}
|
|
34
|
-
|
|
32
|
+
},
|
|
33
|
+
...customProps
|
|
34
|
+
});
|
|
35
35
|
}
|
|
36
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgIcon.default, {
|
|
37
37
|
symbol: symbol,
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
10
|
let svgIconComponents = null;
|
|
@@ -49,8 +48,9 @@ const SvgIcon = _ref => {
|
|
|
49
48
|
IconComponent = getSvg(symbol);
|
|
50
49
|
}
|
|
51
50
|
if (!IconComponent) return null;
|
|
52
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent,
|
|
53
|
-
className: (0, _classnames.default)('multicolor-icon', className,
|
|
54
|
-
|
|
51
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
|
|
52
|
+
className: (0, _classnames.default)('multicolor-icon', className, `multicolor-icon-${symbol}`),
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
55
|
};
|
|
56
56
|
var _default = exports.default = SvgIcon;
|
|
@@ -5,19 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
var _reactstrap = require("reactstrap");
|
|
12
10
|
var _IconButton = _interopRequireDefault(require("../IconButton"));
|
|
13
11
|
require("./index.css");
|
|
14
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
const _excluded = ["children"];
|
|
16
13
|
const DTableModalHeader = _ref => {
|
|
17
14
|
let {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
21
18
|
const customCloseBtn = /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
22
19
|
type: "button",
|
|
23
20
|
className: "close dtable-modal-close",
|
|
@@ -29,9 +26,10 @@ const DTableModalHeader = _ref => {
|
|
|
29
26
|
className: "dtable-modal-close-inner"
|
|
30
27
|
})
|
|
31
28
|
});
|
|
32
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalHeader,
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalHeader, {
|
|
30
|
+
...props,
|
|
33
31
|
close: customCloseBtn,
|
|
34
32
|
children: children
|
|
35
|
-
})
|
|
33
|
+
});
|
|
36
34
|
};
|
|
37
35
|
var _default = exports.default = DTableModalHeader;
|
|
@@ -49,7 +49,7 @@ class DTableRadioGroup extends _react.default.Component {
|
|
|
49
49
|
options
|
|
50
50
|
} = this.props;
|
|
51
51
|
if (!this.btn || !this.slider || !Array.isArray(options)) return;
|
|
52
|
-
this.slider.style.width =
|
|
52
|
+
this.slider.style.width = `${100 / options.length}%`;
|
|
53
53
|
this.setSliderTransition();
|
|
54
54
|
}
|
|
55
55
|
componentDidUpdate(prevProps) {
|
|
@@ -77,13 +77,13 @@ class DTableRadioGroup extends _react.default.Component {
|
|
|
77
77
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
78
78
|
className: "radio-group-wrapper",
|
|
79
79
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
80
|
-
className:
|
|
80
|
+
className: `radio-group-options ${readOnly ? 'read-only' : ''}`,
|
|
81
81
|
children: [options.map(option => {
|
|
82
82
|
const isActive = activeOption === option ? true : false;
|
|
83
83
|
const displayOption = optionsDisplay && optionsDisplay[option] || '';
|
|
84
84
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
85
85
|
ref: ref => this.btn = ref,
|
|
86
|
-
className:
|
|
86
|
+
className: `radio-group-button ${isActive ? 'active' : ''}`,
|
|
87
87
|
"data-option": option,
|
|
88
88
|
onClick: this.onSelectChanged,
|
|
89
89
|
children: displayOption
|
|
@@ -15,7 +15,7 @@ function DTableSelectLabel(_ref) {
|
|
|
15
15
|
isSelect = false
|
|
16
16
|
} = _ref;
|
|
17
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
18
|
-
className:
|
|
18
|
+
className: `${classname} w-100 d-flex justify-content-between`,
|
|
19
19
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
20
20
|
children: name
|
|
21
21
|
}), isSelect && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -5,12 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.UserSelectStyle = exports.Option = exports.MenuSelectStyle = exports.MenuList = exports.DropdownIndicator = exports.ClearIndicator = void 0;
|
|
8
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
var _reactSelect = require("react-select");
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
|
|
11
|
+
// DtableSelect is based on seatable-ui.css, so use the following content to override the default react-select style
|
|
14
12
|
const DEFAULT_CONTROL_STYLE = {
|
|
15
13
|
border: '1px solid rgba(0, 40, 100, 0.12) !important'
|
|
16
14
|
};
|
|
@@ -30,17 +28,25 @@ const controlCallback = (provided, state) => {
|
|
|
30
28
|
isFocused
|
|
31
29
|
} = state;
|
|
32
30
|
if (isFocused && !isDisabled) {
|
|
33
|
-
return
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
return {
|
|
32
|
+
...provided,
|
|
33
|
+
...FOCUS_CONTROL_STYLE,
|
|
34
|
+
'&:hover': {
|
|
35
|
+
...provided,
|
|
36
|
+
...FOCUS_CONTROL_STYLE
|
|
37
|
+
}
|
|
38
|
+
};
|
|
36
39
|
}
|
|
37
|
-
return
|
|
40
|
+
return {
|
|
41
|
+
...provided,
|
|
38
42
|
fontSize: '14px',
|
|
39
43
|
lineHeight: '1.5',
|
|
40
|
-
cursor: 'pointer'
|
|
41
|
-
|
|
42
|
-
'&:hover':
|
|
43
|
-
|
|
44
|
+
cursor: 'pointer',
|
|
45
|
+
...DEFAULT_CONTROL_STYLE,
|
|
46
|
+
'&:hover': {
|
|
47
|
+
...DEFAULT_CONTROL_STYLE
|
|
48
|
+
}
|
|
49
|
+
};
|
|
44
50
|
};
|
|
45
51
|
const UserSelectStyle = exports.UserSelectStyle = {
|
|
46
52
|
option: (provided, state) => {
|
|
@@ -48,41 +54,46 @@ const UserSelectStyle = exports.UserSelectStyle = {
|
|
|
48
54
|
isDisabled,
|
|
49
55
|
isFocused
|
|
50
56
|
} = state;
|
|
51
|
-
return
|
|
57
|
+
return {
|
|
58
|
+
...provided,
|
|
52
59
|
cursor: isDisabled ? 'default' : 'pointer',
|
|
53
60
|
backgroundColor: isFocused ? '#f5f5f5' : '#fff'
|
|
54
|
-
}
|
|
61
|
+
};
|
|
55
62
|
},
|
|
56
63
|
control: controlCallback,
|
|
57
64
|
indicatorSeparator: noneCallback,
|
|
58
65
|
dropdownIndicator: noneCallback,
|
|
59
66
|
clearIndicator: noneCallback,
|
|
60
67
|
multiValue: provided => {
|
|
61
|
-
return
|
|
68
|
+
return {
|
|
69
|
+
...provided,
|
|
62
70
|
display: 'inline-flex',
|
|
63
71
|
alignItems: 'center',
|
|
64
72
|
background: '#eaeaea',
|
|
65
73
|
borderRadius: '10px',
|
|
66
74
|
margin: '0 10px 0 0',
|
|
67
75
|
padding: '0 0 0 2px'
|
|
68
|
-
}
|
|
76
|
+
};
|
|
69
77
|
},
|
|
70
78
|
multiValueLabel: provided => {
|
|
71
|
-
return
|
|
79
|
+
return {
|
|
80
|
+
...provided,
|
|
72
81
|
padding: '0px'
|
|
73
|
-
}
|
|
82
|
+
};
|
|
74
83
|
},
|
|
75
84
|
multiValueRemove: provided => {
|
|
76
|
-
return
|
|
85
|
+
return {
|
|
86
|
+
...provided,
|
|
77
87
|
color: '#666',
|
|
78
88
|
':hover': {
|
|
79
89
|
backgroundColor: 'transparent',
|
|
80
90
|
color: '#555555'
|
|
81
91
|
}
|
|
82
|
-
}
|
|
92
|
+
};
|
|
83
93
|
},
|
|
84
94
|
singleValue: provided => {
|
|
85
|
-
return
|
|
95
|
+
return {
|
|
96
|
+
...provided,
|
|
86
97
|
display: 'inline-flex',
|
|
87
98
|
alignItems: 'center',
|
|
88
99
|
background: '#eaeaea',
|
|
@@ -90,7 +101,7 @@ const UserSelectStyle = exports.UserSelectStyle = {
|
|
|
90
101
|
margin: '0',
|
|
91
102
|
padding: '0 2px',
|
|
92
103
|
width: 'fit-content'
|
|
93
|
-
}
|
|
104
|
+
};
|
|
94
105
|
}
|
|
95
106
|
};
|
|
96
107
|
const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
@@ -99,7 +110,8 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
|
99
110
|
isDisabled,
|
|
100
111
|
isFocused
|
|
101
112
|
} = state;
|
|
102
|
-
return
|
|
113
|
+
return {
|
|
114
|
+
...provided,
|
|
103
115
|
fontSize: '13px',
|
|
104
116
|
color: '#212529',
|
|
105
117
|
cursor: isDisabled ? 'default' : 'pointer',
|
|
@@ -113,16 +125,18 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
|
113
125
|
'.header-icon .multicolor-icon': {
|
|
114
126
|
color: '#aaa'
|
|
115
127
|
}
|
|
116
|
-
}
|
|
128
|
+
};
|
|
117
129
|
},
|
|
118
130
|
control: controlCallback,
|
|
119
|
-
menuPortal: base => (
|
|
131
|
+
menuPortal: base => ({
|
|
132
|
+
...base,
|
|
120
133
|
zIndex: 9999
|
|
121
134
|
}),
|
|
122
135
|
indicatorSeparator: noneCallback
|
|
123
136
|
};
|
|
124
137
|
const DropdownIndicator = props => {
|
|
125
|
-
return _reactSelect.components.DropdownIndicator && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.DropdownIndicator,
|
|
138
|
+
return _reactSelect.components.DropdownIndicator && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.DropdownIndicator, {
|
|
139
|
+
...props,
|
|
126
140
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
127
141
|
className: "dtable-font dtable-icon-down3",
|
|
128
142
|
style: {
|
|
@@ -130,22 +144,24 @@ const DropdownIndicator = props => {
|
|
|
130
144
|
marginLeft: '-2px'
|
|
131
145
|
}
|
|
132
146
|
})
|
|
133
|
-
})
|
|
147
|
+
});
|
|
134
148
|
};
|
|
135
149
|
exports.DropdownIndicator = DropdownIndicator;
|
|
136
150
|
const ClearIndicator = _ref => {
|
|
137
151
|
let {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
152
|
+
innerProps,
|
|
153
|
+
...props
|
|
154
|
+
} = _ref;
|
|
141
155
|
const onMouseDown = e => {
|
|
142
156
|
e.nativeEvent.stopImmediatePropagation();
|
|
143
157
|
innerProps.onMouseDown(e);
|
|
144
158
|
};
|
|
145
|
-
props.innerProps =
|
|
159
|
+
props.innerProps = {
|
|
160
|
+
...innerProps,
|
|
146
161
|
onMouseDown
|
|
147
|
-
}
|
|
148
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.ClearIndicator,
|
|
162
|
+
};
|
|
163
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.ClearIndicator, {
|
|
164
|
+
...props,
|
|
149
165
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
150
166
|
className: "dtable-font dtable-icon-fork-number",
|
|
151
167
|
style: {
|
|
@@ -153,21 +169,24 @@ const ClearIndicator = _ref => {
|
|
|
153
169
|
marginRight: '-2px'
|
|
154
170
|
}
|
|
155
171
|
})
|
|
156
|
-
})
|
|
172
|
+
});
|
|
157
173
|
};
|
|
158
174
|
exports.ClearIndicator = ClearIndicator;
|
|
159
175
|
const MenuList = props => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
160
176
|
onClick: e => e.nativeEvent.stopImmediatePropagation(),
|
|
161
177
|
onMouseDown: e => e.nativeEvent.stopImmediatePropagation(),
|
|
162
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.MenuList,
|
|
178
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.MenuList, {
|
|
179
|
+
...props,
|
|
163
180
|
children: props.children
|
|
164
|
-
})
|
|
181
|
+
})
|
|
165
182
|
});
|
|
166
183
|
exports.MenuList = MenuList;
|
|
167
184
|
const Option = props => {
|
|
168
185
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
169
186
|
style: props.data.style,
|
|
170
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.Option,
|
|
187
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.Option, {
|
|
188
|
+
...props
|
|
189
|
+
})
|
|
171
190
|
});
|
|
172
191
|
};
|
|
173
192
|
exports.Option = Option;
|
package/lib/DateEditor/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
12
11
|
var _dtableUtils = require("dtable-utils");
|
|
@@ -60,29 +59,33 @@ const DateEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
60
59
|
onCommit: handelCommit,
|
|
61
60
|
onClose: hideCalendar
|
|
62
61
|
};
|
|
63
|
-
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default,
|
|
62
|
+
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
63
|
+
...props,
|
|
64
64
|
isInModal: isInModal,
|
|
65
65
|
ref: ref
|
|
66
|
-
})
|
|
67
|
-
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default,
|
|
66
|
+
});
|
|
67
|
+
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
68
|
+
...props,
|
|
68
69
|
isReadOnly: isReadOnly,
|
|
69
70
|
column: column,
|
|
70
71
|
ref: ref
|
|
71
|
-
})
|
|
72
|
+
});
|
|
72
73
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
73
74
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
74
75
|
query: '(min-width: 768px)',
|
|
75
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default,
|
|
76
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
77
|
+
...props,
|
|
76
78
|
isInModal: isInModal,
|
|
77
79
|
ref: ref
|
|
78
|
-
})
|
|
80
|
+
})
|
|
79
81
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
80
82
|
query: '(max-width: 768px)',
|
|
81
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default,
|
|
83
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
84
|
+
...props,
|
|
82
85
|
isReadOnly: isReadOnly,
|
|
83
86
|
column: column,
|
|
84
87
|
ref: ref
|
|
85
|
-
})
|
|
88
|
+
})
|
|
86
89
|
})]
|
|
87
90
|
});
|
|
88
91
|
});
|
|
@@ -224,7 +224,7 @@ class PCDateEditor extends _react.default.Component {
|
|
|
224
224
|
} = this.state;
|
|
225
225
|
const calendar = this.getCalender();
|
|
226
226
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
227
|
-
className:
|
|
227
|
+
className: `date-picker-container ${isInModal ? 'modal-date-picker-container' : ''}`,
|
|
228
228
|
ref: ref => this.datePickerRef = ref,
|
|
229
229
|
onKeyDown: this.handleKeyDown,
|
|
230
230
|
onClick: this.onClick,
|
package/lib/DatePicker/utils.js
CHANGED
|
@@ -5,16 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.formatFn = formatFn;
|
|
7
7
|
function formatIt(date, form) {
|
|
8
|
-
const pad = n => n < 10 ?
|
|
9
|
-
const dateStr =
|
|
10
|
-
const timeStr =
|
|
8
|
+
const pad = n => n < 10 ? `0${n}` : n;
|
|
9
|
+
const dateStr = `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
10
|
+
const timeStr = `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
11
11
|
if (form === 'YYYY-MM-DD') {
|
|
12
12
|
return dateStr;
|
|
13
13
|
}
|
|
14
14
|
if (form === 'HH:mm') {
|
|
15
15
|
return timeStr;
|
|
16
16
|
}
|
|
17
|
-
return
|
|
17
|
+
return `${dateStr} ${timeStr}`;
|
|
18
18
|
}
|
|
19
19
|
function formatFn(instance, value) {
|
|
20
20
|
const formatsEnum = {
|