dtable-ui-component 6.0.103 → 6.0.105-beta.1
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 +35 -42
- package/lib/ActivityIndicator/index.js +9 -9
- package/lib/AsyncUserSelect/index.js +3 -3
- package/lib/Badge/index.js +31 -27
- package/lib/CheckboxEditor/index.js +14 -15
- package/lib/CollaboratorEditor/index.js +15 -16
- 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 +9 -7
- 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 +6 -8
- package/lib/DTableColorPicker/index.js +12 -13
- 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 +5 -5
- package/lib/DTableModalHeader/index.js +8 -6
- package/lib/DTableRadioGroup/index.js +3 -3
- package/lib/DTableSelect/dtable-select-label.js +1 -1
- package/lib/DTableSelect/utils.js +36 -55
- package/lib/DateEditor/index.js +10 -13
- 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 +2 -5
- package/lib/DepartmentSingleSelectEditor/index.js +14 -15
- 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 +14 -15
- package/lib/DigitalSignEditor/mb-editor/index.js +4 -4
- package/lib/DigitalSignEditor/pc-editor/index.js +6 -7
- 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 +2 -3
- package/lib/FieldDisplaySetting/field-item.js +1 -1
- package/lib/FieldDisplaySetting/index.js +9 -11
- package/lib/FileEditor/files-previewer/index.js +14 -15
- 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 +14 -15
- 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 +2 -1
- package/lib/FileItemFormatter/index.js +1 -1
- package/lib/FileUploader/index.js +1 -1
- package/lib/FormulaFormatter/index.js +9 -15
- package/lib/GeolocationEditor/index.js +19 -23
- package/lib/GeolocationEditor/map-editor-utils.js +6 -10
- package/lib/GeolocationEditor/mb-editor/index.js +24 -27
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +6 -9
- package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/index.js +15 -21
- package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +9 -13
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +6 -9
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +7 -24
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +3 -20
- 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 +17 -13
- package/lib/Icon/load-sprite.js +2 -13
- package/lib/IconButton/index.js +14 -11
- package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
- package/lib/ImageEditor/index.js +14 -15
- 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/ImageThumbnail/index.js +2 -2
- package/lib/InputItem/custom-input.js +9 -9
- package/lib/InputItem/custom-keyboard.js +37 -34
- package/lib/InputItem/index.js +49 -52
- package/lib/InputItem/input.js +13 -9
- package/lib/LinkEditor/pc-popover/index.js +2 -3
- package/lib/List/index.js +21 -17
- package/lib/List/list-item.js +52 -50
- 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 +10 -7
- package/lib/Modal/alert.js +2 -2
- package/lib/Modal/modal.js +31 -28
- package/lib/Modal/prompt.js +10 -10
- package/lib/MultipleSelectEditor/index.js +8 -6
- package/lib/MultipleSelectFormatter/index.js +1 -1
- package/lib/PhoneNumberLink/index.js +1 -1
- package/lib/Picker/AbstractPicker.js +28 -26
- package/lib/Popover/index.js +12 -9
- package/lib/Popover/item.js +26 -22
- package/lib/Progress/index.js +8 -10
- package/lib/Radio/Radio.js +15 -13
- 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 +6 -7
- package/lib/RowExpandDialog/body/index.js +14 -14
- package/lib/RowExpandDialog/column-content/index.js +1 -1
- package/lib/RowExpandDialog/header/index.js +3 -4
- package/lib/RowExpandDialog/index.js +32 -43
- package/lib/RowExpandEditor/add-btn/index.js +6 -7
- package/lib/RowExpandEditor/checkbox-editor/index.js +6 -7
- package/lib/RowExpandEditor/collaborator-editor/index.js +6 -7
- package/lib/RowExpandEditor/date-editor/index.js +6 -7
- package/lib/RowExpandEditor/department-editor/index.js +6 -7
- package/lib/RowExpandEditor/digital-sign-editor/index.js +6 -7
- 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 +6 -7
- package/lib/RowExpandEditor/email-editor/index.js +6 -7
- 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 +6 -7
- package/lib/RowExpandEditor/geolocation-editor/index.js +6 -7
- package/lib/RowExpandEditor/image-editor/index.js +6 -7
- 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 +10 -11
- package/lib/RowExpandEditor/long-text-editor/index.js +6 -7
- package/lib/RowExpandEditor/multiple-select-editor/index.js +6 -7
- 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 +6 -7
- package/lib/RowExpandEditor/rate-editor/index.js +6 -7
- 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 +6 -7
- 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 +6 -7
- package/lib/RowExpandEditor/url-editor/index.js +6 -7
- 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 +3 -6
- 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 +11 -17
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/index.js +7 -11
- 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 +15 -13
- package/lib/RowExpandView/index.js +28 -39
- 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 +8 -6
- package/lib/TabBar/Tab.js +10 -10
- package/lib/TabBar/index.js +6 -7
- package/lib/Tabs/index.js +9 -10
- package/lib/TextareaItem/index.js +45 -43
- package/lib/Toast/index.js +5 -5
- package/lib/formatterConfig/index.js +3 -3
- package/lib/select-editor/index.js +14 -15
- 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 +15 -12
- package/lib/toaster/toaster.js +9 -12
- package/lib/utils/class.js +3 -3
- package/lib/utils/departments.js +4 -3
- package/lib/utils/getLocale.js +5 -11
- package/lib/utils/object-utils.js +5 -5
- package/lib/utils/url.js +4 -4
- package/package.json +3 -4
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").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"));
|
|
9
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _reactstrap = require("reactstrap");
|
|
11
12
|
var _reactColor = require("react-color");
|
|
@@ -179,10 +180,9 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
179
180
|
setSpecColor(value[specColor]);
|
|
180
181
|
return;
|
|
181
182
|
}
|
|
182
|
-
const newValue = {
|
|
183
|
-
...value,
|
|
183
|
+
const newValue = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, value), {}, {
|
|
184
184
|
[specColor]: val
|
|
185
|
-
};
|
|
185
|
+
});
|
|
186
186
|
updateValue(newValue);
|
|
187
187
|
};
|
|
188
188
|
const updateValue = newValue => {
|
|
@@ -195,10 +195,9 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
195
195
|
setAlphaVal((0, _utils.toPercentage)(value.a));
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
const newValue = {
|
|
199
|
-
...value,
|
|
198
|
+
const newValue = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, value), {}, {
|
|
200
199
|
a: parseFloat(alphaVal) / 100
|
|
201
|
-
};
|
|
200
|
+
});
|
|
202
201
|
updateValue(newValue);
|
|
203
202
|
};
|
|
204
203
|
const onKeyDown = (event, callBack) => {
|
|
@@ -246,18 +245,18 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
246
245
|
children: colors.map((color, index) => {
|
|
247
246
|
const isLight = (0, _utils.isLightColor)(color);
|
|
248
247
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
249
|
-
className:
|
|
248
|
+
className: "color-item mr-2 ".concat(isLight ? '' : 'dark'),
|
|
250
249
|
onClick: () => onSelectDefaultColor(color),
|
|
251
250
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
252
251
|
className: "colorinput-color d-flex align-items-center justify-content-center",
|
|
253
252
|
style: {
|
|
254
253
|
backgroundColor: color
|
|
255
254
|
},
|
|
256
|
-
children: color ===
|
|
255
|
+
children: color === "".concat((0, _utils.rgbaToHex)(value)) && alphaVal === 100 && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
257
256
|
className: "dtable-icon-color-check dtable-font dtable-icon-check-mark"
|
|
258
257
|
})
|
|
259
258
|
})
|
|
260
|
-
},
|
|
259
|
+
}, "default-color-".concat(index));
|
|
261
260
|
})
|
|
262
261
|
})]
|
|
263
262
|
});
|
|
@@ -271,7 +270,7 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
271
270
|
color: value,
|
|
272
271
|
onChange: onChangeChromePicker
|
|
273
272
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
274
|
-
className:
|
|
273
|
+
className: "color-setting d-flex align-items-center ".concat(colorMode),
|
|
275
274
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
276
275
|
className: "mode-btn d-flex",
|
|
277
276
|
onClick: onChangeMode,
|
|
@@ -345,7 +344,7 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
345
344
|
children: currentUsedColors.map((color, index) => {
|
|
346
345
|
const isLight = (0, _utils.isLightColor)(color);
|
|
347
346
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
348
|
-
className:
|
|
347
|
+
className: "color-item mr-2 ".concat(isLight ? '' : 'dark'),
|
|
349
348
|
onClick: () => onSelectDefaultColor(color),
|
|
350
349
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
351
350
|
className: "colorinput-color d-flex align-items-center justify-content-center",
|
|
@@ -353,7 +352,7 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
353
352
|
backgroundColor: color
|
|
354
353
|
}
|
|
355
354
|
})
|
|
356
|
-
},
|
|
355
|
+
}, "default-color-".concat(index));
|
|
357
356
|
})
|
|
358
357
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
359
358
|
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 "".concat(isNeedPrefix ? '#' : '').concat(toHex(r)).concat(toHex(g)).concat(toHex(b)).concat(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 ".concat(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 ".concat(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 ".concat(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 = "".concat(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-".concat(groupIndex, "-").concat(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-".concat(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 ".concat(_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-".concat(index));
|
|
265
265
|
}
|
|
266
266
|
const {
|
|
267
267
|
error_message
|
|
@@ -5,6 +5,7 @@ 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"));
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
var _reactstrap = require("reactstrap");
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -56,20 +57,19 @@ class RateItem extends _react.default.Component {
|
|
|
56
57
|
};
|
|
57
58
|
let style = itemStyle;
|
|
58
59
|
if (enterRateItemIndex >= rateItemIndex) {
|
|
59
|
-
style = {
|
|
60
|
-
...itemStyle,
|
|
60
|
+
style = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, 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 ".concat(value >= rateItemIndex ? 'rate-item-active' : ''),
|
|
71
71
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
72
|
-
className:
|
|
72
|
+
className: "dtable-font ".concat(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
|
+
}, "".concat(option.id, "-").concat(index));
|
|
158
158
|
});
|
|
159
159
|
};
|
|
160
160
|
this.state = {
|
package/lib/DTableIcon/index.js
CHANGED
|
@@ -5,6 +5,7 @@ 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"));
|
|
8
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
10
|
var _svgIcon = _interopRequireDefault(require("./svg-icon"));
|
|
10
11
|
require("./index.css");
|
|
@@ -23,15 +24,14 @@ const DTableIcon = _ref => {
|
|
|
23
24
|
if (ariaHidden) {
|
|
24
25
|
customProps['aria-hidden'] = ariaHidden;
|
|
25
26
|
}
|
|
26
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", (0, _objectSpread2.default)({
|
|
27
28
|
className: (0, _classnames.default)(symbol, className, {
|
|
28
29
|
'dtable-font': !symbol.includes('dtable-font')
|
|
29
30
|
}),
|
|
30
31
|
style: {
|
|
31
32
|
color
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
});
|
|
33
|
+
}
|
|
34
|
+
}, customProps));
|
|
35
35
|
}
|
|
36
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgIcon.default, {
|
|
37
37
|
symbol: symbol,
|
|
@@ -5,6 +5,7 @@ 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"));
|
|
8
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
let svgIconComponents = null;
|
|
@@ -35,7 +36,7 @@ const SvgIcon = _ref => {
|
|
|
35
36
|
if (!symbol) return null;
|
|
36
37
|
let props = {
|
|
37
38
|
style: {
|
|
38
|
-
|
|
39
|
+
color
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
42
|
if (ariaHidden) {
|
|
@@ -48,9 +49,8 @@ const SvgIcon = _ref => {
|
|
|
48
49
|
IconComponent = getSvg(symbol);
|
|
49
50
|
}
|
|
50
51
|
if (!IconComponent) return null;
|
|
51
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
|
|
52
|
-
className: (0, _classnames.default)('multicolor-icon', className,
|
|
53
|
-
|
|
54
|
-
});
|
|
52
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, (0, _objectSpread2.default)({
|
|
53
|
+
className: (0, _classnames.default)('multicolor-icon', className, "multicolor-icon-".concat(symbol))
|
|
54
|
+
}, props));
|
|
55
55
|
};
|
|
56
56
|
var _default = exports.default = SvgIcon;
|
|
@@ -5,16 +5,19 @@ 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"));
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
9
11
|
var _reactstrap = require("reactstrap");
|
|
10
12
|
var _IconButton = _interopRequireDefault(require("../IconButton"));
|
|
11
13
|
require("./index.css");
|
|
12
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
const _excluded = ["children"];
|
|
13
16
|
const DTableModalHeader = _ref => {
|
|
14
17
|
let {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
children
|
|
19
|
+
} = _ref,
|
|
20
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
18
21
|
const customCloseBtn = /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
19
22
|
type: "button",
|
|
20
23
|
className: "close dtable-modal-close",
|
|
@@ -26,10 +29,9 @@ const DTableModalHeader = _ref => {
|
|
|
26
29
|
className: "dtable-modal-close-inner"
|
|
27
30
|
})
|
|
28
31
|
});
|
|
29
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalHeader, {
|
|
30
|
-
...props,
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalHeader, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
31
33
|
close: customCloseBtn,
|
|
32
34
|
children: children
|
|
33
|
-
});
|
|
35
|
+
}));
|
|
34
36
|
};
|
|
35
37
|
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 = "".concat(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 ".concat(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 ".concat(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: "".concat(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,10 +5,12 @@ 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"));
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
9
11
|
var _reactSelect = require("react-select");
|
|
10
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
// DtableSelect is based on seatable-ui.css, so use the following content to override the default react-select style
|
|
13
|
+
const _excluded = ["innerProps"]; // DtableSelect is based on seatable-ui.css, so use the following content to override the default react-select style
|
|
12
14
|
const DEFAULT_CONTROL_STYLE = {
|
|
13
15
|
border: '1px solid rgba(0, 40, 100, 0.12) !important'
|
|
14
16
|
};
|
|
@@ -28,25 +30,17 @@ const controlCallback = (provided, state) => {
|
|
|
28
30
|
isFocused
|
|
29
31
|
} = state;
|
|
30
32
|
if (isFocused && !isDisabled) {
|
|
31
|
-
return {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
'&:hover': {
|
|
35
|
-
...provided,
|
|
36
|
-
...FOCUS_CONTROL_STYLE
|
|
37
|
-
}
|
|
38
|
-
};
|
|
33
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), FOCUS_CONTROL_STYLE), {}, {
|
|
34
|
+
'&:hover': (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), FOCUS_CONTROL_STYLE)
|
|
35
|
+
});
|
|
39
36
|
}
|
|
40
|
-
return {
|
|
41
|
-
...provided,
|
|
37
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
|
|
42
38
|
fontSize: '14px',
|
|
43
39
|
lineHeight: '1.5',
|
|
44
|
-
cursor: 'pointer'
|
|
45
|
-
|
|
46
|
-
'&:hover': {
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
};
|
|
40
|
+
cursor: 'pointer'
|
|
41
|
+
}, DEFAULT_CONTROL_STYLE), {}, {
|
|
42
|
+
'&:hover': (0, _objectSpread2.default)({}, DEFAULT_CONTROL_STYLE)
|
|
43
|
+
});
|
|
50
44
|
};
|
|
51
45
|
const UserSelectStyle = exports.UserSelectStyle = {
|
|
52
46
|
option: (provided, state) => {
|
|
@@ -54,46 +48,41 @@ const UserSelectStyle = exports.UserSelectStyle = {
|
|
|
54
48
|
isDisabled,
|
|
55
49
|
isFocused
|
|
56
50
|
} = state;
|
|
57
|
-
return {
|
|
58
|
-
...provided,
|
|
51
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
|
|
59
52
|
cursor: isDisabled ? 'default' : 'pointer',
|
|
60
53
|
backgroundColor: isFocused ? '#f5f5f5' : '#fff'
|
|
61
|
-
};
|
|
54
|
+
});
|
|
62
55
|
},
|
|
63
56
|
control: controlCallback,
|
|
64
57
|
indicatorSeparator: noneCallback,
|
|
65
58
|
dropdownIndicator: noneCallback,
|
|
66
59
|
clearIndicator: noneCallback,
|
|
67
60
|
multiValue: provided => {
|
|
68
|
-
return {
|
|
69
|
-
...provided,
|
|
61
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
|
|
70
62
|
display: 'inline-flex',
|
|
71
63
|
alignItems: 'center',
|
|
72
64
|
background: '#eaeaea',
|
|
73
65
|
borderRadius: '10px',
|
|
74
66
|
margin: '0 10px 0 0',
|
|
75
67
|
padding: '0 0 0 2px'
|
|
76
|
-
};
|
|
68
|
+
});
|
|
77
69
|
},
|
|
78
70
|
multiValueLabel: provided => {
|
|
79
|
-
return {
|
|
80
|
-
...provided,
|
|
71
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
|
|
81
72
|
padding: '0px'
|
|
82
|
-
};
|
|
73
|
+
});
|
|
83
74
|
},
|
|
84
75
|
multiValueRemove: provided => {
|
|
85
|
-
return {
|
|
86
|
-
...provided,
|
|
76
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
|
|
87
77
|
color: '#666',
|
|
88
78
|
':hover': {
|
|
89
79
|
backgroundColor: 'transparent',
|
|
90
80
|
color: '#555555'
|
|
91
81
|
}
|
|
92
|
-
};
|
|
82
|
+
});
|
|
93
83
|
},
|
|
94
84
|
singleValue: provided => {
|
|
95
|
-
return {
|
|
96
|
-
...provided,
|
|
85
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
|
|
97
86
|
display: 'inline-flex',
|
|
98
87
|
alignItems: 'center',
|
|
99
88
|
background: '#eaeaea',
|
|
@@ -101,7 +90,7 @@ const UserSelectStyle = exports.UserSelectStyle = {
|
|
|
101
90
|
margin: '0',
|
|
102
91
|
padding: '0 2px',
|
|
103
92
|
width: 'fit-content'
|
|
104
|
-
};
|
|
93
|
+
});
|
|
105
94
|
}
|
|
106
95
|
};
|
|
107
96
|
const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
@@ -110,8 +99,7 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
|
110
99
|
isDisabled,
|
|
111
100
|
isFocused
|
|
112
101
|
} = state;
|
|
113
|
-
return {
|
|
114
|
-
...provided,
|
|
102
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
|
|
115
103
|
fontSize: '13px',
|
|
116
104
|
color: '#212529',
|
|
117
105
|
cursor: isDisabled ? 'default' : 'pointer',
|
|
@@ -125,18 +113,16 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
|
125
113
|
'.header-icon .multicolor-icon': {
|
|
126
114
|
color: '#aaa'
|
|
127
115
|
}
|
|
128
|
-
};
|
|
116
|
+
});
|
|
129
117
|
},
|
|
130
118
|
control: controlCallback,
|
|
131
|
-
menuPortal: base => ({
|
|
132
|
-
...base,
|
|
119
|
+
menuPortal: base => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, base), {}, {
|
|
133
120
|
zIndex: 9999
|
|
134
121
|
}),
|
|
135
122
|
indicatorSeparator: noneCallback
|
|
136
123
|
};
|
|
137
124
|
const DropdownIndicator = props => {
|
|
138
|
-
return _reactSelect.components.DropdownIndicator && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.DropdownIndicator, {
|
|
139
|
-
...props,
|
|
125
|
+
return _reactSelect.components.DropdownIndicator && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.DropdownIndicator, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
140
126
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
141
127
|
className: "dtable-font dtable-icon-down3",
|
|
142
128
|
style: {
|
|
@@ -144,24 +130,22 @@ const DropdownIndicator = props => {
|
|
|
144
130
|
marginLeft: '-2px'
|
|
145
131
|
}
|
|
146
132
|
})
|
|
147
|
-
});
|
|
133
|
+
}));
|
|
148
134
|
};
|
|
149
135
|
exports.DropdownIndicator = DropdownIndicator;
|
|
150
136
|
const ClearIndicator = _ref => {
|
|
151
137
|
let {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
138
|
+
innerProps
|
|
139
|
+
} = _ref,
|
|
140
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
155
141
|
const onMouseDown = e => {
|
|
156
142
|
e.nativeEvent.stopImmediatePropagation();
|
|
157
143
|
innerProps.onMouseDown(e);
|
|
158
144
|
};
|
|
159
|
-
props.innerProps = {
|
|
160
|
-
...innerProps,
|
|
145
|
+
props.innerProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, innerProps), {}, {
|
|
161
146
|
onMouseDown
|
|
162
|
-
};
|
|
163
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.ClearIndicator, {
|
|
164
|
-
...props,
|
|
147
|
+
});
|
|
148
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.ClearIndicator, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
165
149
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
166
150
|
className: "dtable-font dtable-icon-fork-number",
|
|
167
151
|
style: {
|
|
@@ -169,24 +153,21 @@ const ClearIndicator = _ref => {
|
|
|
169
153
|
marginRight: '-2px'
|
|
170
154
|
}
|
|
171
155
|
})
|
|
172
|
-
});
|
|
156
|
+
}));
|
|
173
157
|
};
|
|
174
158
|
exports.ClearIndicator = ClearIndicator;
|
|
175
159
|
const MenuList = props => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
176
160
|
onClick: e => e.nativeEvent.stopImmediatePropagation(),
|
|
177
161
|
onMouseDown: e => e.nativeEvent.stopImmediatePropagation(),
|
|
178
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.MenuList, {
|
|
179
|
-
...props,
|
|
162
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.MenuList, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
180
163
|
children: props.children
|
|
181
|
-
})
|
|
164
|
+
}))
|
|
182
165
|
});
|
|
183
166
|
exports.MenuList = MenuList;
|
|
184
167
|
const Option = props => {
|
|
185
168
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
186
169
|
style: props.data.style,
|
|
187
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.Option, {
|
|
188
|
-
...props
|
|
189
|
-
})
|
|
170
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.Option, (0, _objectSpread2.default)({}, props))
|
|
190
171
|
});
|
|
191
172
|
};
|
|
192
173
|
exports.Option = Option;
|
package/lib/DateEditor/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").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"));
|
|
9
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
12
|
var _dtableUtils = require("dtable-utils");
|
|
@@ -59,33 +60,29 @@ const DateEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
59
60
|
onCommit: handelCommit,
|
|
60
61
|
onClose: hideCalendar
|
|
61
62
|
};
|
|
62
|
-
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
63
|
-
...props,
|
|
63
|
+
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
64
64
|
isInModal: isInModal,
|
|
65
65
|
ref: ref
|
|
66
|
-
});
|
|
67
|
-
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
68
|
-
...props,
|
|
66
|
+
}));
|
|
67
|
+
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
69
68
|
isReadOnly: isReadOnly,
|
|
70
69
|
column: column,
|
|
71
70
|
ref: ref
|
|
72
|
-
});
|
|
71
|
+
}));
|
|
73
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
74
73
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
75
74
|
query: '(min-width: 768px)',
|
|
76
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
77
|
-
...props,
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
78
76
|
isInModal: isInModal,
|
|
79
77
|
ref: ref
|
|
80
|
-
})
|
|
78
|
+
}))
|
|
81
79
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
82
80
|
query: '(max-width: 768px)',
|
|
83
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
84
|
-
...props,
|
|
81
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
85
82
|
isReadOnly: isReadOnly,
|
|
86
83
|
column: column,
|
|
87
84
|
ref: ref
|
|
88
|
-
})
|
|
85
|
+
}))
|
|
89
86
|
})]
|
|
90
87
|
});
|
|
91
88
|
});
|
|
@@ -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 ".concat(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".concat(n) : n;
|
|
9
|
+
const dateStr = "".concat(date.getFullYear(), "-").concat(pad(date.getMonth() + 1), "-").concat(pad(date.getDate()));
|
|
10
|
+
const timeStr = "".concat(pad(date.getHours()), ":").concat(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 "".concat(dateStr, " ").concat(timeStr);
|
|
18
18
|
}
|
|
19
19
|
function formatFn(instance, value) {
|
|
20
20
|
const formatsEnum = {
|