dtable-ui-component 7.0.0-xia.1 → 7.0.0-xia.2
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 +14 -16
- package/lib/ActivityIndicator/index.js +7 -8
- package/lib/AsyncUserSelect/index.js +40 -19
- package/lib/AsyncUserSelect/user-item.js +5 -6
- package/lib/AutoNumberFormatter/index.js +3 -4
- package/lib/Badge/index.js +9 -11
- package/lib/ButtonFormatter/index.js +6 -8
- package/lib/CTimeFormatter/index.js +3 -4
- package/lib/CheckboxEditor/index.js +1 -3
- package/lib/CheckboxEditor/mb-editor.js +9 -20
- package/lib/CheckboxEditor/pc-editor.js +12 -24
- package/lib/CheckboxFormatter/index.js +4 -5
- package/lib/CollaboratorEditor/index.js +2 -4
- package/lib/CollaboratorEditor/mb-editor/index.js +11 -19
- package/lib/CollaboratorEditor/pc-editor/index.js +25 -34
- package/lib/CollaboratorFormatter/index.js +8 -10
- package/lib/CollaboratorItem/index.js +4 -5
- package/lib/CollapsibleSettingLayout/index.js +9 -7
- package/lib/Comment/body/comment.js +10 -18
- package/lib/Comment/body/index.js +2 -4
- package/lib/Comment/footer/btns/index.js +4 -7
- package/lib/Comment/footer/index.js +9 -20
- package/lib/Comment/footer/input/index.js +29 -50
- package/lib/Comment/footer/input/participant/index.js +4 -5
- package/lib/Comment/footer/participants/index.js +4 -5
- package/lib/Comment/footer/participants/participant/index.js +1 -3
- package/lib/Comment/footer/participants/participant-select/index.js +8 -24
- package/lib/Comment/index.js +39 -57
- package/lib/Comment/utils/utilities.js +15 -21
- package/lib/CreatorFormatter/index.js +6 -8
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +22 -18
- package/lib/DTableColorPicker/index.js +55 -40
- package/lib/DTableColorPicker/utils.js +4 -6
- package/lib/DTableColumnIcon/index.js +6 -7
- package/lib/DTableCommonAddTool/index.js +6 -8
- package/lib/DTableCustomFooter/index.js +1 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
- package/lib/DTableCustomizeSelect/index.js +19 -24
- package/lib/DTableDropdownItem/index.js +16 -18
- package/lib/DTableDropdownMenu/index.js +8 -10
- package/lib/DTableEmptyTip/index.js +4 -5
- package/lib/DTableFiltersPopover/index.js +26 -41
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +1 -3
- package/lib/DTableFiltersPopover/utils/index.js +63 -113
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +8 -9
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
- package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
- package/lib/DTableFiltersPopover/widgets/filter-item.js +107 -170
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
- package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
- package/lib/DTableGroupSelect/index.js +11 -15
- package/lib/DTableGroupSelect/select-option-group.js +23 -32
- package/lib/DTableIcon/index.js +6 -7
- package/lib/DTableIcon/svg-icon.js +5 -7
- package/lib/DTableModalHeader/index.js +4 -13
- package/lib/DTablePopover/index.js +11 -15
- package/lib/DTableRadio/index.js +10 -9
- package/lib/DTableRadioGroup/index.js +8 -17
- package/lib/DTableSearchInput/index.js +19 -29
- package/lib/DTableSelect/dtable-select-label.js +6 -5
- package/lib/DTableSelect/index.js +21 -22
- package/lib/DTableSelect/utils.js +7 -15
- package/lib/DTableSubDropdownMenu/index.js +8 -10
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.js +12 -11
- package/lib/DTableToolTip/index.js +7 -8
- package/lib/DateEditor/index.js +20 -15
- package/lib/DateEditor/mb-editor/index.js +18 -31
- package/lib/DateEditor/pc-editor.js +26 -45
- package/lib/DateFormatter/index.js +4 -5
- package/lib/DatePicker/index.js +9 -15
- package/lib/DatePicker/utils.js +1 -3
- package/lib/DeleteTip/index.js +5 -6
- package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
- package/lib/DepartmentSelectFilter/index.js +6 -8
- package/lib/DepartmentSingleSelectEditor/index.js +1 -3
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
- package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
- package/lib/DigitalSignEditor/index.js +1 -3
- package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
- package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
- package/lib/DigitalSignEditor/service.js +2 -4
- package/lib/DigitalSignEditor/signature-board/index.js +5 -8
- package/lib/DigitalSignEditor/utils.js +2 -4
- package/lib/DigitalSignFormatter/index.js +12 -15
- package/lib/DigitalSignFormatter/utils.js +4 -5
- package/lib/DurationEditor/index.js +21 -31
- package/lib/DurationFormatter/index.js +4 -5
- package/lib/EditEditorButton/index.js +1 -3
- package/lib/EmailFormatter/index.js +3 -4
- package/lib/FieldDisplaySetting/field-item.js +12 -12
- package/lib/FieldDisplaySetting/index.js +11 -9
- package/lib/FileEditor/files-previewer/index.js +1 -3
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +3 -4
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +14 -21
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
- package/lib/FileEditor/index.js +1 -3
- package/lib/FileEditor/mb-editor/index.js +28 -20
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +11 -25
- package/lib/FileEditor/pc-editor/index.js +19 -27
- package/lib/FileFormatter/index.js +26 -19
- package/lib/FileItemFormatter/index.js +6 -9
- package/lib/FileUploader/index.js +28 -45
- package/lib/FormulaFormatter/index.js +15 -29
- package/lib/GeolocationEditor/index.js +11 -12
- package/lib/GeolocationEditor/map-editor-utils.js +17 -15
- package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/index.js +4 -6
- package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
- package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
- package/lib/GeolocationEditor/pc-editor/index.js +12 -20
- package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
- package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
- package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
- package/lib/GeolocationFormatter/index.js +4 -5
- package/lib/HtmlLongTextFormatter/index.js +4 -12
- package/lib/Icon/index.js +3 -5
- package/lib/IconButton/index.js +4 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +12 -21
- package/lib/ImageEditor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/index.js +1 -3
- package/lib/ImageEditor/mb-editor/index.js +28 -20
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/pc-editor/index.js +11 -16
- package/lib/ImageFormatter/images-lazy-load.js +19 -11
- package/lib/ImageFormatter/index.js +11 -13
- package/lib/ImagePreviewerLightbox/index.js +15 -13
- package/lib/ImageThumbnail/index.js +10 -13
- package/lib/InputItem/custom-input.js +26 -46
- package/lib/InputItem/custom-keyboard.js +15 -18
- package/lib/InputItem/index.js +34 -50
- package/lib/InputItem/input.js +2 -4
- package/lib/LastModifierFormatter/index.js +6 -8
- package/lib/LinkEditor/index.js +33 -53
- package/lib/LinkEditor/link-editor-option.js +3 -4
- package/lib/LinkEditor/mb-popover/index.js +9 -22
- package/lib/LinkEditor/pc-popover/index.js +5 -10
- package/lib/LinkFormatter/index.js +21 -37
- package/lib/List/index.js +6 -8
- package/lib/List/list-item.js +22 -28
- package/lib/LongTextFormatter/index.js +4 -5
- package/lib/MBEditorHeader/index.js +7 -8
- package/lib/MTimeFormatter/index.js +3 -4
- package/lib/MobileFullScreenPage/body/index.js +3 -5
- package/lib/MobileFullScreenPage/header/index.js +4 -6
- package/lib/MobileFullScreenPage/index.js +13 -11
- package/lib/MobileModal/index.js +1 -3
- package/lib/MobileOperationSheet/index.js +7 -8
- package/lib/MobileSelector/empty/index.js +1 -3
- package/lib/MobileSelector/index.js +5 -7
- package/lib/MobileSelector/option/index.js +3 -5
- package/lib/MobileSelector/options/index.js +1 -3
- package/lib/MobileSelector/search/index.js +3 -5
- package/lib/MobileUpload/index.js +4 -5
- package/lib/Modal/modal.js +14 -15
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +1 -3
- package/lib/MultipleSelectFormatter/index.js +6 -8
- package/lib/NotificationPopover/index.js +4 -5
- package/lib/NumberEditor/index.js +12 -21
- package/lib/NumberFormatter/index.js +4 -5
- package/lib/PhoneNumberLink/index.js +2 -4
- package/lib/Picker/AbstractPicker.js +23 -27
- package/lib/Popover/index.js +3 -4
- package/lib/Popover/item.js +7 -9
- package/lib/Progress/index.js +9 -8
- package/lib/Radio/Radio.js +4 -8
- package/lib/Radio/RadioItem.js +8 -12
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.js +18 -17
- package/lib/RowExpandDialog/body/index.js +32 -49
- package/lib/RowExpandDialog/column-content/index.js +5 -9
- package/lib/RowExpandDialog/header/index.js +6 -8
- package/lib/RowExpandDialog/index.js +49 -34
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
- package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
- package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
- package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
- package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
- package/lib/RowExpandEditor/index.js +4 -8
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
- package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
- package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
- package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +10 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
- package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +7 -8
- package/lib/RowExpandFormatter/index.js +27 -41
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
- package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
- package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
- package/lib/RowExpandFormatter/text/index.js +4 -5
- package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
- package/lib/RowExpandView/body/index.js +22 -35
- package/lib/RowExpandView/column-content/index.js +3 -7
- package/lib/RowExpandView/index.js +42 -30
- package/lib/SelectItem/index.js +5 -7
- package/lib/SelectOptionGroup/index.js +30 -40
- package/lib/SelectedDepartments/index.js +7 -9
- package/lib/SimpleLongTextFormatter/index.js +10 -16
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
- package/lib/SingleSelectEditor/index.js +1 -3
- package/lib/SingleSelectFormatter/index.js +8 -9
- package/lib/TabBar/Tab.js +14 -16
- package/lib/TabBar/index.js +18 -21
- package/lib/Tabs/index.js +1 -3
- package/lib/TextEditor/index.js +14 -23
- package/lib/TextFormatter/index.js +3 -4
- package/lib/TextareaItem/index.js +19 -26
- package/lib/Toast/index.js +3 -4
- package/lib/UrlFormatter/index.js +3 -4
- package/lib/common/editor-base.js +7 -12
- package/lib/hooks/common-hooks.js +2 -4
- package/lib/select-editor/index.js +1 -3
- package/lib/select-editor/mb-editor/index.js +17 -28
- package/lib/select-editor/pc-editor/index.js +27 -42
- package/lib/toaster/alert.js +6 -7
- package/lib/toaster/toast.js +2 -3
- package/lib/toaster/toastManager.js +2 -4
- package/lib/utils/cell.js +8 -11
- package/lib/utils/column-utils.js +8 -14
- package/lib/utils/departments.js +1 -3
- package/lib/utils/url.js +24 -31
- package/lib/utils/utils.js +2 -6
- package/package.json +1 -1
- package/lib/DTableModalHeader/index.css +0 -5
|
@@ -20,10 +20,9 @@ class CreatorFormatter extends _react.default.PureComponent {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
22
|
this.getCollaborators = () => {
|
|
23
|
-
let
|
|
24
|
-
value,
|
|
25
|
-
collaborators
|
|
26
|
-
} = this.props;
|
|
23
|
+
let _this$props = this.props,
|
|
24
|
+
value = _this$props.value,
|
|
25
|
+
collaborators = _this$props.collaborators;
|
|
27
26
|
if (!Array.isArray(value)) {
|
|
28
27
|
value = [value];
|
|
29
28
|
}
|
|
@@ -43,10 +42,9 @@ class CreatorFormatter extends _react.default.PureComponent {
|
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
44
|
render() {
|
|
46
|
-
const
|
|
47
|
-
containerClassName,
|
|
48
|
-
value
|
|
49
|
-
} = this.props;
|
|
45
|
+
const _this$props2 = this.props,
|
|
46
|
+
containerClassName = _this$props2.containerClassName,
|
|
47
|
+
value = _this$props2.value;
|
|
50
48
|
const classname = (0, _classnames.default)('dtable-ui cell-formatter-container creator-formatter', containerClassName);
|
|
51
49
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
52
50
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -7,33 +7,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = ColorPickerPortal;
|
|
9
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
12
13
|
var _utils = require("../../utils/utils");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
function ColorPickerPortal(_ref) {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
throttleDelay = 16,
|
|
19
|
-
children
|
|
20
|
-
} = _ref;
|
|
16
|
+
let target = _ref.target,
|
|
17
|
+
scrollContainerId = _ref.scrollContainerId,
|
|
18
|
+
_ref$throttleDelay = _ref.throttleDelay,
|
|
19
|
+
throttleDelay = _ref$throttleDelay === void 0 ? 16 : _ref$throttleDelay,
|
|
20
|
+
children = _ref.children;
|
|
21
21
|
const containerRef = (0, _react.useRef)(null);
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
const _useState = (0, _react.useState)(false),
|
|
23
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
24
|
+
isPositioned = _useState2[0],
|
|
25
|
+
setIsPositioned = _useState2[1];
|
|
26
|
+
const _useState3 = (0, _react.useState)(() => {
|
|
27
|
+
return {
|
|
28
|
+
top: '-9999px',
|
|
29
|
+
left: '-9999px',
|
|
30
|
+
visibility: 'hidden'
|
|
31
|
+
};
|
|
32
|
+
}),
|
|
33
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
34
|
+
position = _useState4[0],
|
|
35
|
+
setPosition = _useState4[1];
|
|
30
36
|
const updatePosition = (0, _react.useCallback)(() => {
|
|
31
37
|
if (!target || !containerRef.current) return;
|
|
32
38
|
const targetRect = target.getBoundingClientRect();
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
left
|
|
36
|
-
} = targetRect;
|
|
39
|
+
const spaceAbove = targetRect.top,
|
|
40
|
+
left = targetRect.left;
|
|
37
41
|
const portalRectHeight = containerRef.current.clientHeight;
|
|
38
42
|
const newPosition = {
|
|
39
43
|
left: "".concat(left + 1, "px"),
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _reactstrap = require("reactstrap");
|
|
12
13
|
var _reactColor = require("react-color");
|
|
@@ -29,25 +30,46 @@ const RGB_COLORS_MAP = {
|
|
|
29
30
|
};
|
|
30
31
|
const LOCAL_STORAGE_KEY = 'dtable-color-picker';
|
|
31
32
|
const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
color = '#ffffff',
|
|
36
|
-
defaultColors,
|
|
37
|
-
useProtal,
|
|
38
|
-
target,
|
|
39
|
-
scrollContainerId,
|
|
40
|
-
throttleDelay =
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
let onToggle = _ref.onToggle,
|
|
34
|
+
popoverStyle = _ref.popoverStyle,
|
|
35
|
+
_ref$color = _ref.color,
|
|
36
|
+
color = _ref$color === void 0 ? '#ffffff' : _ref$color,
|
|
37
|
+
defaultColors = _ref.defaultColors,
|
|
38
|
+
useProtal = _ref.useProtal,
|
|
39
|
+
target = _ref.target,
|
|
40
|
+
scrollContainerId = _ref.scrollContainerId,
|
|
41
|
+
_ref$throttleDelay = _ref.throttleDelay,
|
|
42
|
+
throttleDelay = _ref$throttleDelay === void 0 ? 20 : _ref$throttleDelay,
|
|
43
|
+
onSubmit = _ref.onSubmit;
|
|
43
44
|
const initialRgbaColor = (0, _utils.hexToRgba)(color);
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
const _useState = (0, _react.useState)(initialRgbaColor),
|
|
46
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
47
|
+
value = _useState2[0],
|
|
48
|
+
setValue = _useState2[1];
|
|
49
|
+
const _useState3 = (0, _react.useState)((0, _utils.getInitialHexVal)(color)),
|
|
50
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
51
|
+
hexVal = _useState4[0],
|
|
52
|
+
setHexVal = _useState4[1];
|
|
53
|
+
const _useState5 = (0, _react.useState)((0, _utils.toPercentage)(initialRgbaColor.a)),
|
|
54
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
55
|
+
alphaVal = _useState6[0],
|
|
56
|
+
setAlphaVal = _useState6[1];
|
|
57
|
+
const _useState7 = (0, _react.useState)(initialRgbaColor.r),
|
|
58
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
59
|
+
redVal = _useState8[0],
|
|
60
|
+
setRedVal = _useState8[1];
|
|
61
|
+
const _useState9 = (0, _react.useState)(initialRgbaColor.g),
|
|
62
|
+
_useState0 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
63
|
+
greenVal = _useState0[0],
|
|
64
|
+
setGreenVal = _useState0[1];
|
|
65
|
+
const _useState1 = (0, _react.useState)(initialRgbaColor.b),
|
|
66
|
+
_useState10 = (0, _slicedToArray2.default)(_useState1, 2),
|
|
67
|
+
blueVal = _useState10[0],
|
|
68
|
+
setBlueVal = _useState10[1];
|
|
69
|
+
const _useState11 = (0, _react.useState)(COLOR_PICKER_MODE.HEX),
|
|
70
|
+
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
71
|
+
colorMode = _useState12[0],
|
|
72
|
+
setColorMode = _useState12[1]; // hex or rgb
|
|
51
73
|
const colorPickerRef = (0, _react.useRef)(null);
|
|
52
74
|
let currentUsedColors = [];
|
|
53
75
|
const currentUsedColorsStr = window.localStorage.getItem(LOCAL_STORAGE_KEY);
|
|
@@ -70,12 +92,10 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
70
92
|
rgba.a = Math.round(rgba.a * 100) / 100;
|
|
71
93
|
const transferedHex = (0, _utils.rgbaToHex)(rgba);
|
|
72
94
|
const hexVal = transferedHex.substring(1, 7);
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
a
|
|
78
|
-
} = rgba;
|
|
95
|
+
const r = rgba.r,
|
|
96
|
+
g = rgba.g,
|
|
97
|
+
b = rgba.b,
|
|
98
|
+
a = rgba.a;
|
|
79
99
|
setAlphaVal((0, _utils.toPercentage)(a));
|
|
80
100
|
updateValue(rgba);
|
|
81
101
|
if (colorMode === COLOR_PICKER_MODE.HEX) {
|
|
@@ -91,11 +111,9 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
91
111
|
if (colorMode === COLOR_PICKER_MODE.HEX) {
|
|
92
112
|
newMode = COLOR_PICKER_MODE.RGBA;
|
|
93
113
|
const rgba = (0, _utils.hexToRgba)(color);
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
b
|
|
98
|
-
} = rgba;
|
|
114
|
+
const r = rgba.r,
|
|
115
|
+
g = rgba.g,
|
|
116
|
+
b = rgba.b;
|
|
99
117
|
setRedVal(r);
|
|
100
118
|
setGreenVal(g);
|
|
101
119
|
setBlueVal(b);
|
|
@@ -122,11 +140,10 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
122
140
|
newHexVal = newHexVal.split('').map(char => char + char).join('');
|
|
123
141
|
}
|
|
124
142
|
setHexVal(newHexVal);
|
|
125
|
-
const
|
|
126
|
-
r,
|
|
127
|
-
g,
|
|
128
|
-
b
|
|
129
|
-
} = (0, _utils.hexToRgba)(newHexVal);
|
|
143
|
+
const _hexToRgba = (0, _utils.hexToRgba)(newHexVal),
|
|
144
|
+
r = _hexToRgba.r,
|
|
145
|
+
g = _hexToRgba.g,
|
|
146
|
+
b = _hexToRgba.b;
|
|
130
147
|
const newValue = {
|
|
131
148
|
r,
|
|
132
149
|
g,
|
|
@@ -209,12 +226,10 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
209
226
|
};
|
|
210
227
|
const onSelectDefaultColor = color => {
|
|
211
228
|
const rgba = (0, _utils.hexToRgba)(color);
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
a
|
|
217
|
-
} = rgba;
|
|
229
|
+
const r = rgba.r,
|
|
230
|
+
g = rgba.g,
|
|
231
|
+
b = rgba.b,
|
|
232
|
+
a = rgba.a;
|
|
218
233
|
const alphaVal = (0, _utils.toPercentage)(a);
|
|
219
234
|
if (colorMode === COLOR_PICKER_MODE.RGBA) {
|
|
220
235
|
setRedVal(r);
|
|
@@ -43,12 +43,10 @@ const rgbaToHex = function (color) {
|
|
|
43
43
|
let isNeedPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
44
44
|
let isNeedAlpha = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
45
45
|
if (hexRegex.test(color)) return color;
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
a
|
|
51
|
-
} = color;
|
|
46
|
+
const r = color.r,
|
|
47
|
+
g = color.g,
|
|
48
|
+
b = color.b,
|
|
49
|
+
a = color.a;
|
|
52
50
|
const toHex = value => {
|
|
53
51
|
const hex = value.toString(16);
|
|
54
52
|
return hex.length === 1 ? '0' + hex : hex;
|
|
@@ -45,13 +45,12 @@ const COLUMN_DISPLAY_TYPE_ICON_CONFIG = {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
const DTableColumnIcon = _ref => {
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
ariaHidden = false,
|
|
53
|
-
getSvg
|
|
54
|
-
} = _ref;
|
|
48
|
+
let column = _ref.column,
|
|
49
|
+
color = _ref.color,
|
|
50
|
+
className = _ref.className,
|
|
51
|
+
_ref$ariaHidden = _ref.ariaHidden,
|
|
52
|
+
ariaHidden = _ref$ariaHidden === void 0 ? false : _ref$ariaHidden,
|
|
53
|
+
getSvg = _ref.getSvg;
|
|
55
54
|
const columnType = column === null || column === void 0 ? void 0 : column.type;
|
|
56
55
|
if (!columnType) return null;
|
|
57
56
|
const columnDisplayType = (0, _dtableUtils.getColumnDisplayType)(column);
|
|
@@ -9,14 +9,12 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
require("./index.css");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
function DTableCommonAddTool(_ref) {
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
style
|
|
19
|
-
} = _ref;
|
|
12
|
+
let callBack = _ref.callBack,
|
|
13
|
+
footerName = _ref.footerName,
|
|
14
|
+
className = _ref.className,
|
|
15
|
+
addIconClassName = _ref.addIconClassName,
|
|
16
|
+
hideIcon = _ref.hideIcon,
|
|
17
|
+
style = _ref.style;
|
|
20
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21
19
|
className: "dtable-ui add-item-btn ".concat(className ? className : ''),
|
|
22
20
|
style: style,
|
|
@@ -10,9 +10,7 @@ require("./index.css");
|
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
// DTableCustomFooter is used in geolocation editor and digital sign editor
|
|
12
12
|
const DTableCustomFooter = _ref => {
|
|
13
|
-
let
|
|
14
|
-
children
|
|
15
|
-
} = _ref;
|
|
13
|
+
let children = _ref.children;
|
|
16
14
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
17
15
|
className: "dtable-custom-footer",
|
|
18
16
|
children: children
|
|
@@ -47,24 +47,22 @@ class CollaboratorSelect extends _react.Component {
|
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
49
|
this.getFilterOptions = searchValue => {
|
|
50
|
-
const
|
|
51
|
-
options,
|
|
52
|
-
searchable
|
|
53
|
-
} = this.props;
|
|
50
|
+
const _this$props = this.props,
|
|
51
|
+
options = _this$props.options,
|
|
52
|
+
searchable = _this$props.searchable;
|
|
54
53
|
if (!searchable) return options || [];
|
|
55
54
|
return (0, _dtableUtils.searchCollaborators)(options, searchValue);
|
|
56
55
|
};
|
|
57
56
|
this.renderOptionGroup = () => {
|
|
58
|
-
const
|
|
59
|
-
value,
|
|
60
|
-
options,
|
|
61
|
-
searchable,
|
|
62
|
-
searchPlaceholder,
|
|
63
|
-
noOptionsPlaceholder,
|
|
64
|
-
top,
|
|
65
|
-
left,
|
|
66
|
-
isUsePopover
|
|
67
|
-
} = this.props;
|
|
57
|
+
const _this$props2 = this.props,
|
|
58
|
+
value = _this$props2.value,
|
|
59
|
+
options = _this$props2.options,
|
|
60
|
+
searchable = _this$props2.searchable,
|
|
61
|
+
searchPlaceholder = _this$props2.searchPlaceholder,
|
|
62
|
+
noOptionsPlaceholder = _this$props2.noOptionsPlaceholder,
|
|
63
|
+
top = _this$props2.top,
|
|
64
|
+
left = _this$props2.left,
|
|
65
|
+
isUsePopover = _this$props2.isUsePopover;
|
|
68
66
|
if (!isUsePopover) {
|
|
69
67
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectOptionGroup.default, {
|
|
70
68
|
value: value,
|
|
@@ -123,12 +121,11 @@ class CollaboratorSelect extends _react.Component {
|
|
|
123
121
|
document.removeEventListener('mousedown', this.onMousedown);
|
|
124
122
|
}
|
|
125
123
|
render() {
|
|
126
|
-
let
|
|
127
|
-
className,
|
|
128
|
-
value,
|
|
129
|
-
placeholder,
|
|
130
|
-
isLocked
|
|
131
|
-
} = this.props;
|
|
124
|
+
let _this$props3 = this.props,
|
|
125
|
+
className = _this$props3.className,
|
|
126
|
+
value = _this$props3.value,
|
|
127
|
+
placeholder = _this$props3.placeholder,
|
|
128
|
+
isLocked = _this$props3.isLocked;
|
|
132
129
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
133
130
|
ref: node => this.selector = node,
|
|
134
131
|
className: (0, _classnames.default)('dtable-select custom-select collaborator-select', {
|
|
@@ -45,24 +45,20 @@ class DTableCustomizeSelect extends _react.Component {
|
|
|
45
45
|
};
|
|
46
46
|
this.getSelectedOptionTop = () => {
|
|
47
47
|
if (!this.selector) return 38;
|
|
48
|
-
const
|
|
49
|
-
height
|
|
50
|
-
} = this.selector.getBoundingClientRect();
|
|
48
|
+
const _this$selector$getBou = this.selector.getBoundingClientRect(),
|
|
49
|
+
height = _this$selector$getBou.height;
|
|
51
50
|
return height;
|
|
52
51
|
};
|
|
53
52
|
this.getFilterOptions = searchValue => {
|
|
54
|
-
const
|
|
55
|
-
options,
|
|
56
|
-
searchable
|
|
57
|
-
} = this.props;
|
|
53
|
+
const _this$props = this.props,
|
|
54
|
+
options = _this$props.options,
|
|
55
|
+
searchable = _this$props.searchable;
|
|
58
56
|
if (!searchable) return options || [];
|
|
59
57
|
const validSearchVal = searchValue.trim().toLowerCase();
|
|
60
58
|
if (!validSearchVal) return options || [];
|
|
61
59
|
return options.filter(option => {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
name
|
|
65
|
-
} = option;
|
|
60
|
+
const value = option.value,
|
|
61
|
+
name = option.name;
|
|
66
62
|
if (typeof name === 'string') {
|
|
67
63
|
return name.toLowerCase().indexOf(validSearchVal) > -1;
|
|
68
64
|
}
|
|
@@ -83,19 +79,18 @@ class DTableCustomizeSelect extends _react.Component {
|
|
|
83
79
|
};
|
|
84
80
|
}
|
|
85
81
|
render() {
|
|
86
|
-
let
|
|
87
|
-
className,
|
|
88
|
-
value,
|
|
89
|
-
options,
|
|
90
|
-
placeholder,
|
|
91
|
-
searchable,
|
|
92
|
-
searchPlaceholder,
|
|
93
|
-
noOptionsPlaceholder,
|
|
94
|
-
isLocked,
|
|
95
|
-
isInModal,
|
|
96
|
-
addOptionAble,
|
|
97
|
-
component
|
|
98
|
-
} = this.props;
|
|
82
|
+
let _this$props2 = this.props,
|
|
83
|
+
className = _this$props2.className,
|
|
84
|
+
value = _this$props2.value,
|
|
85
|
+
options = _this$props2.options,
|
|
86
|
+
placeholder = _this$props2.placeholder,
|
|
87
|
+
searchable = _this$props2.searchable,
|
|
88
|
+
searchPlaceholder = _this$props2.searchPlaceholder,
|
|
89
|
+
noOptionsPlaceholder = _this$props2.noOptionsPlaceholder,
|
|
90
|
+
isLocked = _this$props2.isLocked,
|
|
91
|
+
isInModal = _this$props2.isInModal,
|
|
92
|
+
addOptionAble = _this$props2.addOptionAble,
|
|
93
|
+
component = _this$props2.component;
|
|
99
94
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
100
95
|
ref: node => this.selector = node,
|
|
101
96
|
className: (0, _classnames.default)('dtable-select custom-select', {
|
|
@@ -13,24 +13,22 @@ var _DTableToolTip = _interopRequireDefault(require("../DTableToolTip"));
|
|
|
13
13
|
var _svgIcon = _interopRequireDefault(require("../DTableIcon/svg-icon"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
const DTableDropdownItem = _ref => {
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
tabIndex
|
|
33
|
-
} = _ref;
|
|
16
|
+
let className = _ref.className,
|
|
17
|
+
divider = _ref.divider,
|
|
18
|
+
id = _ref.id,
|
|
19
|
+
toggle = _ref.toggle,
|
|
20
|
+
disabled = _ref.disabled,
|
|
21
|
+
tooltip = _ref.tooltip,
|
|
22
|
+
itemProps = _ref.itemProps,
|
|
23
|
+
showChecked = _ref.showChecked,
|
|
24
|
+
checked = _ref.checked,
|
|
25
|
+
leftSlotContent = _ref.leftSlotContent,
|
|
26
|
+
rightSlotContent = _ref.rightSlotContent,
|
|
27
|
+
icon = _ref.icon,
|
|
28
|
+
content = _ref.content,
|
|
29
|
+
onClick = _ref.onClick,
|
|
30
|
+
style = _ref.style,
|
|
31
|
+
tabIndex = _ref.tabIndex;
|
|
34
32
|
if (divider) {
|
|
35
33
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownItem, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, itemProps), {}, {
|
|
36
34
|
divider: true,
|
|
@@ -10,16 +10,14 @@ var _reactstrap = require("reactstrap");
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
const DTableDropdownMenu = _ref => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
children
|
|
22
|
-
} = _ref;
|
|
13
|
+
let id = _ref.id,
|
|
14
|
+
className = _ref.className,
|
|
15
|
+
container = _ref.container,
|
|
16
|
+
modifiers = _ref.modifiers,
|
|
17
|
+
flip = _ref.flip,
|
|
18
|
+
style = _ref.style,
|
|
19
|
+
menuProps = _ref.menuProps,
|
|
20
|
+
children = _ref.children;
|
|
23
21
|
let customMenuProps = (0, _objectSpread2.default)({}, menuProps);
|
|
24
22
|
customMenuProps.modifiers = [{
|
|
25
23
|
name: 'preventOverflow',
|
|
@@ -10,11 +10,10 @@ require("./index.css");
|
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
class DTableEmptyTip extends _react.default.Component {
|
|
12
12
|
render() {
|
|
13
|
-
const
|
|
14
|
-
text,
|
|
15
|
-
title,
|
|
16
|
-
type
|
|
17
|
-
} = this.props;
|
|
13
|
+
const _this$props = this.props,
|
|
14
|
+
text = _this$props.text,
|
|
15
|
+
title = _this$props.title,
|
|
16
|
+
type = _this$props.type;
|
|
18
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
19
18
|
className: "empty-tip",
|
|
20
19
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
@@ -29,10 +29,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
29
29
|
constructor(props) {
|
|
30
30
|
super(props);
|
|
31
31
|
this.updateFilters = _ref => {
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
filters
|
|
35
|
-
} = _ref;
|
|
32
|
+
let filter_conjunction = _ref.filter_conjunction,
|
|
33
|
+
filters = _ref.filters;
|
|
36
34
|
const filterConjunction = filter_conjunction || this.state.filterConjunction;
|
|
37
35
|
if (this.isNeedSubmit) {
|
|
38
36
|
const isSubmitDisabled = false;
|
|
@@ -54,12 +52,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
54
52
|
});
|
|
55
53
|
};
|
|
56
54
|
this.addFilter = () => {
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
} = this.props;
|
|
60
|
-
const {
|
|
61
|
-
filters
|
|
62
|
-
} = this.state;
|
|
55
|
+
const columns = this.props.columns;
|
|
56
|
+
const filters = this.state.filters;
|
|
63
57
|
const newFilter = (0, _utils.getDefaultFilter)(columns);
|
|
64
58
|
if (!newFilter) {
|
|
65
59
|
return;
|
|
@@ -69,12 +63,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
69
63
|
});
|
|
70
64
|
};
|
|
71
65
|
this.addFilterGroup = () => {
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
} = this.props;
|
|
75
|
-
const {
|
|
76
|
-
filters
|
|
77
|
-
} = this.state;
|
|
66
|
+
const columns = this.props.columns;
|
|
67
|
+
const filters = this.state.filters;
|
|
78
68
|
const newFilterGroup = (0, _utils.getDefaultFilterGroup)(columns);
|
|
79
69
|
if (!newFilterGroup) {
|
|
80
70
|
return;
|
|
@@ -87,10 +77,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
87
77
|
this.props.hidePopover();
|
|
88
78
|
};
|
|
89
79
|
this.onSubmitFilters = () => {
|
|
90
|
-
const
|
|
91
|
-
filters,
|
|
92
|
-
filterConjunction
|
|
93
|
-
} = this.state;
|
|
80
|
+
const _this$state = this.state,
|
|
81
|
+
filters = _this$state.filters,
|
|
82
|
+
filterConjunction = _this$state.filterConjunction;
|
|
94
83
|
const update = {
|
|
95
84
|
filters,
|
|
96
85
|
filter_conjunction: filterConjunction
|
|
@@ -101,12 +90,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
101
90
|
this.onPopoverInsideClick = e => {
|
|
102
91
|
e.stopPropagation();
|
|
103
92
|
};
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
isNeedSubmit
|
|
109
|
-
} = props;
|
|
93
|
+
const _filterConjunction = props.filterConjunction,
|
|
94
|
+
_filters = props.filters,
|
|
95
|
+
_columns = props.columns,
|
|
96
|
+
isNeedSubmit = props.isNeedSubmit;
|
|
110
97
|
this.state = {
|
|
111
98
|
filters: (0, _dtableUtils.getValidFilters)(_filters, _columns),
|
|
112
99
|
filterConjunction: _constants.SUPPORT_CONJUNCTIONS.includes(_filterConjunction) ? _filterConjunction : _dtableUtils.FILTER_CONJUNCTION_TYPE.AND,
|
|
@@ -115,21 +102,19 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
115
102
|
this.isNeedSubmit = isNeedSubmit;
|
|
116
103
|
}
|
|
117
104
|
render() {
|
|
118
|
-
const
|
|
119
|
-
target,
|
|
120
|
-
columns,
|
|
121
|
-
placement,
|
|
122
|
-
isSupportAdvanced,
|
|
123
|
-
departments,
|
|
124
|
-
lang,
|
|
125
|
-
readOnly,
|
|
126
|
-
userDepartmentIdsMap,
|
|
127
|
-
firstDayOfWeek
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
filterConjunction
|
|
132
|
-
} = this.state;
|
|
105
|
+
const _this$props = this.props,
|
|
106
|
+
target = _this$props.target,
|
|
107
|
+
columns = _this$props.columns,
|
|
108
|
+
placement = _this$props.placement,
|
|
109
|
+
isSupportAdvanced = _this$props.isSupportAdvanced,
|
|
110
|
+
departments = _this$props.departments,
|
|
111
|
+
lang = _this$props.lang,
|
|
112
|
+
readOnly = _this$props.readOnly,
|
|
113
|
+
userDepartmentIdsMap = _this$props.userDepartmentIdsMap,
|
|
114
|
+
firstDayOfWeek = _this$props.firstDayOfWeek;
|
|
115
|
+
const _this$state2 = this.state,
|
|
116
|
+
filters = _this$state2.filters,
|
|
117
|
+
filterConjunction = _this$state2.filterConjunction;
|
|
133
118
|
const canAddFilter = columns.length > 0;
|
|
134
119
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTablePopover.default, {
|
|
135
120
|
target: target,
|