dtable-ui-component 7.0.16 → 7.0.18
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 +2 -2
- 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/DTableDropdownItem/index.js +10 -8
- package/lib/DTableDropdownMenu/index.js +7 -6
- 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/DTableIcon/index.js +4 -4
- package/lib/DTableIcon/svg-icon.js +4 -4
- package/lib/DTableModalHeader/index.js +6 -8
- package/lib/DTablePopover/index.js +1 -1
- package/lib/DTableRadioGroup/index.js +3 -3
- package/lib/DTableSearchInput/index.js +15 -1
- package/lib/DTableSelect/dtable-select-label.js +1 -1
- package/lib/DTableSelect/index.js +4 -4
- package/lib/DTableSelect/utils.js +65 -41
- package/lib/DTableSubDropdownMenu/index.js +6 -4
- package/lib/DTableSubDropdownToggle/index.js +4 -5
- package/lib/DTableToolTip/index.js +4 -4
- 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 +1 -1
- 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/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/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 +1 -1
|
@@ -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
|
|
@@ -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 _classnames = _interopRequireDefault(require("classnames"));
|
|
11
10
|
var _reactstrap = require("reactstrap");
|
|
@@ -32,10 +31,11 @@ const DTableDropdownItem = _ref => {
|
|
|
32
31
|
tabIndex
|
|
33
32
|
} = _ref;
|
|
34
33
|
if (divider) {
|
|
35
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownItem,
|
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownItem, {
|
|
35
|
+
...itemProps,
|
|
36
36
|
divider: true,
|
|
37
37
|
className: className
|
|
38
|
-
})
|
|
38
|
+
});
|
|
39
39
|
}
|
|
40
40
|
const renderedIcon = () => {
|
|
41
41
|
if (!icon || ! /*#__PURE__*/_react.default.isValidElement(icon)) return null;
|
|
@@ -44,7 +44,9 @@ const DTableDropdownItem = _ref => {
|
|
|
44
44
|
'aria-hidden': 'true'
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
-
let customItemProps =
|
|
47
|
+
let customItemProps = {
|
|
48
|
+
...itemProps
|
|
49
|
+
};
|
|
48
50
|
if (typeof onClick === 'function') {
|
|
49
51
|
customItemProps.onClick = onClick;
|
|
50
52
|
}
|
|
@@ -57,11 +59,11 @@ const DTableDropdownItem = _ref => {
|
|
|
57
59
|
if (typeof tabIndex === 'number') {
|
|
58
60
|
customItemProps.tabIndex = tabIndex;
|
|
59
61
|
}
|
|
60
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownItem,
|
|
62
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownItem, {
|
|
61
63
|
className: className,
|
|
62
64
|
disabled: disabled,
|
|
63
|
-
id: id
|
|
64
|
-
|
|
65
|
+
id: id,
|
|
66
|
+
...customItemProps,
|
|
65
67
|
children: [(leftSlotContent || showChecked) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
66
68
|
className: "dtable-dropdown-item-left-slot",
|
|
67
69
|
children: [checked && /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgIcon.default, {
|
|
@@ -87,6 +89,6 @@ const DTableDropdownItem = _ref => {
|
|
|
87
89
|
}],
|
|
88
90
|
children: tooltip
|
|
89
91
|
})]
|
|
90
|
-
})
|
|
92
|
+
});
|
|
91
93
|
};
|
|
92
94
|
var _default = exports.default = DTableDropdownItem;
|
|
@@ -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 _reactstrap = require("reactstrap");
|
|
10
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -20,7 +19,9 @@ const DTableDropdownMenu = _ref => {
|
|
|
20
19
|
menuProps,
|
|
21
20
|
children
|
|
22
21
|
} = _ref;
|
|
23
|
-
let customMenuProps =
|
|
22
|
+
let customMenuProps = {
|
|
23
|
+
...menuProps
|
|
24
|
+
};
|
|
24
25
|
customMenuProps.modifiers = [{
|
|
25
26
|
name: 'preventOverflow',
|
|
26
27
|
options: {
|
|
@@ -39,11 +40,11 @@ const DTableDropdownMenu = _ref => {
|
|
|
39
40
|
if (typeof flip === 'boolean') {
|
|
40
41
|
customMenuProps.flip = flip;
|
|
41
42
|
}
|
|
42
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownMenu,
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownMenu, {
|
|
43
44
|
id: id,
|
|
44
|
-
className: (0, _classnames.default)('dtable-dropdown-menu', className)
|
|
45
|
-
|
|
45
|
+
className: (0, _classnames.default)('dtable-dropdown-menu', className),
|
|
46
|
+
...customMenuProps,
|
|
46
47
|
children: children
|
|
47
|
-
})
|
|
48
|
+
});
|
|
48
49
|
};
|
|
49
50
|
var _default = exports.default = DTableDropdownMenu;
|
|
@@ -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 seatable-icon-btn",
|
|
163
163
|
onClick: this.deleteFilterGroup,
|
|
@@ -794,7 +794,7 @@ class FilterItem extends _react.default.Component {
|
|
|
794
794
|
isLocked: readOnly
|
|
795
795
|
})
|
|
796
796
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
797
|
-
className:
|
|
797
|
+
className: `filter-predicate ml-2 ${_isCheckboxColumn ? 'filter-checkbox-predicate' : ''}`,
|
|
798
798
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSelect.default, {
|
|
799
799
|
value: activePredicate,
|
|
800
800
|
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 _DTableToolTip = _interopRequireDefault(require("../../DTableToolTip"));
|
|
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)(_DTableToolTip.default, {
|
|
75
75
|
placement: "bottom",
|
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,28 +5,26 @@ 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)(_IconButton.default, {
|
|
22
19
|
icon: "x",
|
|
23
20
|
"aria-label": "Close",
|
|
24
21
|
onClick: props.toggle,
|
|
25
22
|
className: "modal-close-btn"
|
|
26
23
|
});
|
|
27
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalHeader,
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalHeader, {
|
|
25
|
+
...props,
|
|
28
26
|
close: customCloseBtn,
|
|
29
27
|
children: children
|
|
30
|
-
})
|
|
28
|
+
});
|
|
31
29
|
};
|
|
32
30
|
var _default = exports.default = DTableModalHeader;
|
|
@@ -70,7 +70,7 @@ class DTablePopover extends _react.default.Component {
|
|
|
70
70
|
fade: false,
|
|
71
71
|
hideArrow: hideArrow,
|
|
72
72
|
innerClassName: innerClassName,
|
|
73
|
-
className:
|
|
73
|
+
className: `dtable-popove ${popoverClassName}`,
|
|
74
74
|
modifiers: modifiers,
|
|
75
75
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
76
76
|
ref: ref => this.dtablePopoverRef = ref,
|
|
@@ -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
|
|
@@ -82,6 +82,20 @@ class DtableSearchInput extends _react.Component {
|
|
|
82
82
|
children: "\xD7"
|
|
83
83
|
});
|
|
84
84
|
};
|
|
85
|
+
this.renderExactMatch = () => {
|
|
86
|
+
const {
|
|
87
|
+
components = {}
|
|
88
|
+
} = this.props;
|
|
89
|
+
const {
|
|
90
|
+
ExactMatchIndicator
|
|
91
|
+
} = components;
|
|
92
|
+
if (/*#__PURE__*/_react.default.isValidElement(ExactMatchIndicator)) {
|
|
93
|
+
return ExactMatchIndicator;
|
|
94
|
+
} else if ((0, _utils.isFunction)(ExactMatchIndicator)) {
|
|
95
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ExactMatchIndicator, {});
|
|
96
|
+
}
|
|
97
|
+
return null;
|
|
98
|
+
};
|
|
85
99
|
this.state = {
|
|
86
100
|
searchValue: props.value
|
|
87
101
|
};
|
|
@@ -127,7 +141,7 @@ class DtableSearchInput extends _react.Component {
|
|
|
127
141
|
onKeyDown: onKeyDown,
|
|
128
142
|
disabled: disabled,
|
|
129
143
|
style: style
|
|
130
|
-
}), this.renderClear()]
|
|
144
|
+
}), this.renderClear(), this.renderExactMatch()]
|
|
131
145
|
});
|
|
132
146
|
}
|
|
133
147
|
}
|
|
@@ -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,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 _reactSelect = _interopRequireDefault(require("react-select"));
|
|
11
10
|
var _utils = require("./utils");
|
|
@@ -34,12 +33,13 @@ class DTableSelect extends _react.default.Component {
|
|
|
34
33
|
onMenuClose,
|
|
35
34
|
components: userComponents
|
|
36
35
|
} = this.props;
|
|
37
|
-
const mergedComponents =
|
|
36
|
+
const mergedComponents = {
|
|
38
37
|
Option: _utils.Option,
|
|
39
38
|
DropdownIndicator: _utils.DropdownIndicator,
|
|
40
39
|
MenuList: _utils.MenuList,
|
|
41
|
-
ClearIndicator: _utils.ClearIndicator
|
|
42
|
-
|
|
40
|
+
ClearIndicator: _utils.ClearIndicator,
|
|
41
|
+
...userComponents
|
|
42
|
+
};
|
|
43
43
|
const processedOptions = (0, _utils.processOptionsWithClear)(options, isClearable);
|
|
44
44
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.default, {
|
|
45
45
|
value: value,
|