dtable-ui-component 7.0.13 → 7.0.15
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 +58 -49
- package/lib/ActivityIndicator/index.js +17 -16
- package/lib/AsyncUserSelect/index.js +20 -46
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +27 -29
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +16 -13
- package/lib/CheckboxEditor/mb-editor.js +20 -9
- package/lib/CheckboxEditor/pc-editor.js +24 -12
- package/lib/CheckboxFormatter/index.js +5 -4
- package/lib/CollaboratorEditor/index.js +17 -14
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +35 -26
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +8 -10
- package/lib/Comment/body/comment.js +19 -11
- package/lib/Comment/body/index.js +8 -8
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +21 -10
- package/lib/Comment/footer/input/index.js +55 -34
- package/lib/Comment/footer/input/participant/index.js +6 -5
- package/lib/Comment/footer/participants/index.js +5 -4
- package/lib/Comment/footer/participants/participant/index.js +3 -1
- package/lib/Comment/footer/participants/participant-select/index.js +26 -10
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +22 -16
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +26 -28
- package/lib/DTableColorPicker/index.js +53 -67
- package/lib/DTableColorPicker/utils.js +7 -5
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +10 -8
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeSearchInput/index.js +41 -26
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +28 -24
- package/lib/DTableDropdownMenu/index.js +17 -14
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +42 -27
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +114 -64
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -8
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +13 -16
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +15 -18
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +14 -8
- package/lib/DTableFiltersPopover/widgets/filter-group.js +57 -36
- package/lib/DTableFiltersPopover/widgets/filter-item.js +165 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +162 -137
- package/lib/DTableFiltersPopover/widgets/rate-item.js +25 -20
- package/lib/DTableIcon/index.js +11 -10
- package/lib/DTableIcon/svg-icon.js +11 -9
- package/lib/DTableModalHeader/index.js +7 -7
- package/lib/DTablePopover/index.js +16 -12
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +20 -11
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +6 -7
- package/lib/DTableSelect/index.js +26 -25
- package/lib/DTableSelect/select-dropdown-indicator/index.js +3 -1
- package/lib/DTableSelect/utils.js +83 -47
- package/lib/DTableSubDropdownMenu/index.js +16 -12
- package/lib/DTableSubDropdownToggle/index.js +16 -17
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +12 -11
- package/lib/DateEditor/index.js +28 -30
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +46 -27
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +7 -5
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +26 -28
- package/lib/DepartmentSelectFilter/index.js +13 -8
- package/lib/DepartmentSingleSelectEditor/index.js +16 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +49 -50
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +64 -42
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +16 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +24 -16
- package/lib/DigitalSignEditor/pc-editor/index.js +31 -23
- package/lib/DigitalSignEditor/service.js +5 -3
- package/lib/DigitalSignEditor/signature-board/index.js +10 -7
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +6 -5
- package/lib/Drawer/index.js +3 -2
- package/lib/DurationEditor/index.js +31 -21
- package/lib/DurationFormatter/index.js +5 -4
- package/lib/EditEditorButton/index.js +3 -1
- package/lib/EmailFormatter/index.js +4 -3
- package/lib/FieldDisplaySetting/field-item.js +13 -13
- package/lib/FieldDisplaySetting/index.js +20 -20
- package/lib/FileEditor/files-previewer/index.js +16 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +20 -12
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +24 -17
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +16 -13
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +4 -2
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +31 -17
- package/lib/FileEditor/pc-editor/index.js +30 -22
- package/lib/FileFormatter/index.js +20 -27
- package/lib/FileItemFormatter/index.js +10 -7
- package/lib/FileUploader/index.js +46 -29
- package/lib/FormulaFormatter/index.js +44 -24
- package/lib/GeolocationEditor/index.js +32 -27
- package/lib/GeolocationEditor/map-editor-utils.js +23 -21
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +28 -22
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +77 -47
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
- package/lib/GeolocationEditor/pc-editor/country-editor.js +25 -12
- package/lib/GeolocationEditor/pc-editor/index.js +41 -27
- package/lib/GeolocationEditor/pc-editor/location-editor.js +33 -28
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +67 -43
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +69 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +86 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +85 -39
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +26 -20
- package/lib/GeolocationEditor/pc-editor/province-editor.js +15 -8
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +8 -7
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +13 -5
- package/lib/Icon/index.js +13 -15
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +12 -13
- package/lib/ImageEditor/images-previewer/image-preview/index.js +22 -13
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +16 -13
- package/lib/ImageEditor/mb-editor/index.js +20 -28
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +5 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +26 -12
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +10 -4
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +14 -12
- package/lib/ImagePreviewerLightbox/index.js +15 -19
- package/lib/ImageThumbnail/index.js +15 -12
- package/lib/InputItem/custom-input.js +55 -35
- package/lib/InputItem/custom-keyboard.js +42 -42
- package/lib/InputItem/index.js +82 -63
- package/lib/InputItem/input.js +9 -11
- package/lib/LastModifierFormatter/index.js +8 -6
- package/lib/LinkEditor/index.js +53 -33
- package/lib/LinkEditor/link-editor-option.js +4 -3
- package/lib/LinkEditor/mb-popover/index.js +22 -9
- package/lib/LinkEditor/pc-popover/index.js +13 -7
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +17 -19
- package/lib/List/list-item.js +59 -55
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +9 -8
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +6 -4
- package/lib/MobileFullScreenPage/header/index.js +10 -8
- package/lib/MobileFullScreenPage/index.js +12 -14
- package/lib/MobileModal/index.js +7 -8
- package/lib/MobileOperationSheet/index.js +8 -7
- package/lib/MobileSelector/empty/index.js +3 -1
- package/lib/MobileSelector/index.js +7 -5
- package/lib/MobileSelector/option/index.js +5 -3
- package/lib/MobileSelector/options/index.css +0 -4
- package/lib/MobileSelector/options/index.js +3 -1
- package/lib/MobileSelector/search/index.js +5 -3
- package/lib/MobileUpload/index.js +5 -4
- package/lib/Modal/alert.js +2 -2
- package/lib/Modal/modal.js +28 -30
- package/lib/Modal/prompt.js +14 -14
- package/lib/MultipleSelectEditor/index.js +7 -7
- package/lib/MultipleSelectFormatter/index.js +9 -7
- package/lib/NotificationPopover/index.js +5 -4
- package/lib/NumberEditor/index.js +21 -12
- package/lib/NumberFormatter/index.js +5 -4
- package/lib/PhoneNumberLink/index.js +5 -3
- package/lib/Picker/AbstractPicker.js +35 -33
- package/lib/Popover/index.js +9 -11
- package/lib/Popover/item.js +22 -24
- package/lib/Progress/index.js +18 -17
- package/lib/Radio/Radio.js +17 -15
- package/lib/Radio/RadioItem.js +23 -19
- package/lib/RateFormatter/index.js +15 -15
- package/lib/RoleStatusEditor/index.js +18 -19
- package/lib/RowExpand/index.js +7 -6
- package/lib/RowExpandDialog/body/index.js +57 -40
- package/lib/RowExpandDialog/column-content/index.js +10 -6
- package/lib/RowExpandDialog/header/index.js +12 -9
- package/lib/RowExpandDialog/index.js +59 -63
- package/lib/RowExpandEditor/add-btn/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
- package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
- package/lib/RowExpandEditor/date-editor/index.js +7 -6
- package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
- package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
- package/lib/RowExpandEditor/department-editor/index.js +7 -6
- package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
- package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
- package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +38 -24
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +39 -25
- package/lib/RowExpandEditor/duration-editor/index.js +7 -6
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
- package/lib/RowExpandEditor/email-editor/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -10
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +25 -14
- package/lib/RowExpandEditor/file-editor/index.js +7 -6
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
- package/lib/RowExpandEditor/image-editor/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +26 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +24 -14
- package/lib/RowExpandEditor/index.js +16 -11
- package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +20 -12
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +38 -27
- package/lib/RowExpandEditor/number-editor/index.js +7 -6
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
- package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
- package/lib/RowExpandEditor/rate-editor/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +26 -13
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +41 -25
- package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +32 -21
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +37 -25
- package/lib/RowExpandEditor/text-editor/index.js +7 -6
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
- package/lib/RowExpandEditor/url-editor/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +15 -7
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -11
- package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
- package/lib/RowExpandFormatter/email-formatter/index.js +8 -5
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +14 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +51 -30
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +10 -9
- package/lib/RowExpandFormatter/index.js +52 -34
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +15 -9
- package/lib/RowExpandFormatter/link-formatter/index.js +25 -17
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +14 -13
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +9 -6
- package/lib/RowExpandView/body/index.js +43 -32
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +52 -53
- package/lib/SelectItem/index.js +7 -5
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +12 -10
- package/lib/SimpleLongTextFormatter/index.js +18 -12
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
- package/lib/SingleSelectEditor/index.js +7 -7
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +26 -24
- package/lib/TabBar/index.js +28 -24
- package/lib/Tabs/index.js +13 -10
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +53 -48
- package/lib/Toast/index.js +9 -8
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/formatterConfig/index.js +3 -3
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +16 -13
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +47 -32
- package/lib/toaster/alert.js +8 -7
- package/lib/toaster/toast.js +4 -3
- package/lib/toaster/toastManager.js +13 -13
- package/lib/toaster/toaster.js +12 -9
- package/lib/utils/cell.js +11 -8
- package/lib/utils/class.js +3 -3
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +6 -5
- package/lib/utils/getLocale.js +11 -5
- package/lib/utils/object-utils.js +5 -4
- package/lib/utils/url.js +29 -22
- package/lib/utils/utils.js +6 -2
- package/package.json +2 -2
|
@@ -1,13 +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
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
10
|
var _reactstrap = require("reactstrap");
|
|
13
11
|
var _reactColor = require("react-color");
|
|
@@ -30,46 +28,25 @@ const RGB_COLORS_MAP = {
|
|
|
30
28
|
};
|
|
31
29
|
const LOCAL_STORAGE_KEY = 'dtable-color-picker';
|
|
32
30
|
const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
color =
|
|
37
|
-
defaultColors
|
|
38
|
-
useProtal
|
|
39
|
-
target
|
|
40
|
-
scrollContainerId
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
let {
|
|
32
|
+
onToggle,
|
|
33
|
+
popoverStyle,
|
|
34
|
+
color = '#ffffff',
|
|
35
|
+
defaultColors,
|
|
36
|
+
useProtal,
|
|
37
|
+
target,
|
|
38
|
+
scrollContainerId,
|
|
39
|
+
throttleDelay = 20,
|
|
40
|
+
onSubmit
|
|
41
|
+
} = _ref;
|
|
44
42
|
const initialRgbaColor = (0, _utils.hexToRgba)(color);
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
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
|
|
43
|
+
const [value, setValue] = (0, _react.useState)(initialRgbaColor);
|
|
44
|
+
const [hexVal, setHexVal] = (0, _react.useState)((0, _utils.getInitialHexVal)(color));
|
|
45
|
+
const [alphaVal, setAlphaVal] = (0, _react.useState)((0, _utils.toPercentage)(initialRgbaColor.a));
|
|
46
|
+
const [redVal, setRedVal] = (0, _react.useState)(initialRgbaColor.r);
|
|
47
|
+
const [greenVal, setGreenVal] = (0, _react.useState)(initialRgbaColor.g);
|
|
48
|
+
const [blueVal, setBlueVal] = (0, _react.useState)(initialRgbaColor.b);
|
|
49
|
+
const [colorMode, setColorMode] = (0, _react.useState)(COLOR_PICKER_MODE.HEX); // hex or rgb
|
|
73
50
|
const colorPickerRef = (0, _react.useRef)(null);
|
|
74
51
|
let currentUsedColors = [];
|
|
75
52
|
const currentUsedColorsStr = window.localStorage.getItem(LOCAL_STORAGE_KEY);
|
|
@@ -92,10 +69,12 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
92
69
|
rgba.a = Math.round(rgba.a * 100) / 100;
|
|
93
70
|
const transferedHex = (0, _utils.rgbaToHex)(rgba);
|
|
94
71
|
const hexVal = transferedHex.substring(1, 7);
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
72
|
+
const {
|
|
73
|
+
r,
|
|
74
|
+
g,
|
|
75
|
+
b,
|
|
76
|
+
a
|
|
77
|
+
} = rgba;
|
|
99
78
|
setAlphaVal((0, _utils.toPercentage)(a));
|
|
100
79
|
updateValue(rgba);
|
|
101
80
|
if (colorMode === COLOR_PICKER_MODE.HEX) {
|
|
@@ -111,9 +90,11 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
111
90
|
if (colorMode === COLOR_PICKER_MODE.HEX) {
|
|
112
91
|
newMode = COLOR_PICKER_MODE.RGBA;
|
|
113
92
|
const rgba = (0, _utils.hexToRgba)(color);
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
93
|
+
const {
|
|
94
|
+
r,
|
|
95
|
+
g,
|
|
96
|
+
b
|
|
97
|
+
} = rgba;
|
|
117
98
|
setRedVal(r);
|
|
118
99
|
setGreenVal(g);
|
|
119
100
|
setBlueVal(b);
|
|
@@ -140,10 +121,11 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
140
121
|
newHexVal = newHexVal.split('').map(char => char + char).join('');
|
|
141
122
|
}
|
|
142
123
|
setHexVal(newHexVal);
|
|
143
|
-
const
|
|
144
|
-
r
|
|
145
|
-
g
|
|
146
|
-
b
|
|
124
|
+
const {
|
|
125
|
+
r,
|
|
126
|
+
g,
|
|
127
|
+
b
|
|
128
|
+
} = (0, _utils.hexToRgba)(newHexVal);
|
|
147
129
|
const newValue = {
|
|
148
130
|
r,
|
|
149
131
|
g,
|
|
@@ -197,9 +179,10 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
197
179
|
setSpecColor(value[specColor]);
|
|
198
180
|
return;
|
|
199
181
|
}
|
|
200
|
-
const newValue =
|
|
182
|
+
const newValue = {
|
|
183
|
+
...value,
|
|
201
184
|
[specColor]: val
|
|
202
|
-
}
|
|
185
|
+
};
|
|
203
186
|
updateValue(newValue);
|
|
204
187
|
};
|
|
205
188
|
const updateValue = newValue => {
|
|
@@ -212,9 +195,10 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
212
195
|
setAlphaVal((0, _utils.toPercentage)(value.a));
|
|
213
196
|
return;
|
|
214
197
|
}
|
|
215
|
-
const newValue =
|
|
198
|
+
const newValue = {
|
|
199
|
+
...value,
|
|
216
200
|
a: parseFloat(alphaVal) / 100
|
|
217
|
-
}
|
|
201
|
+
};
|
|
218
202
|
updateValue(newValue);
|
|
219
203
|
};
|
|
220
204
|
const onKeyDown = (event, callBack) => {
|
|
@@ -226,10 +210,12 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
226
210
|
};
|
|
227
211
|
const onSelectDefaultColor = color => {
|
|
228
212
|
const rgba = (0, _utils.hexToRgba)(color);
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
213
|
+
const {
|
|
214
|
+
r,
|
|
215
|
+
g,
|
|
216
|
+
b,
|
|
217
|
+
a
|
|
218
|
+
} = rgba;
|
|
233
219
|
const alphaVal = (0, _utils.toPercentage)(a);
|
|
234
220
|
if (colorMode === COLOR_PICKER_MODE.RGBA) {
|
|
235
221
|
setRedVal(r);
|
|
@@ -260,18 +246,18 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
260
246
|
children: colors.map((color, index) => {
|
|
261
247
|
const isLight = (0, _utils.isLightColor)(color);
|
|
262
248
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
263
|
-
className:
|
|
249
|
+
className: `color-item mr-2 ${isLight ? '' : 'dark'}`,
|
|
264
250
|
onClick: () => onSelectDefaultColor(color),
|
|
265
251
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
266
252
|
className: "colorinput-color d-flex align-items-center justify-content-center",
|
|
267
253
|
style: {
|
|
268
254
|
backgroundColor: color
|
|
269
255
|
},
|
|
270
|
-
children: color ===
|
|
256
|
+
children: color === `${(0, _utils.rgbaToHex)(value)}` && alphaVal === 100 && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
271
257
|
className: "dtable-icon-color-check dtable-font dtable-icon-check-mark"
|
|
272
258
|
})
|
|
273
259
|
})
|
|
274
|
-
},
|
|
260
|
+
}, `default-color-${index}`);
|
|
275
261
|
})
|
|
276
262
|
})]
|
|
277
263
|
});
|
|
@@ -285,7 +271,7 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
285
271
|
color: value,
|
|
286
272
|
onChange: onChangeChromePicker
|
|
287
273
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
288
|
-
className:
|
|
274
|
+
className: `color-setting d-flex align-items-center ${colorMode}`,
|
|
289
275
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
290
276
|
className: "mode-btn d-flex",
|
|
291
277
|
onClick: onChangeMode,
|
|
@@ -359,7 +345,7 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
359
345
|
children: currentUsedColors.map((color, index) => {
|
|
360
346
|
const isLight = (0, _utils.isLightColor)(color);
|
|
361
347
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
362
|
-
className:
|
|
348
|
+
className: `color-item mr-2 ${isLight ? '' : 'dark'}`,
|
|
363
349
|
onClick: () => onSelectDefaultColor(color),
|
|
364
350
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
365
351
|
className: "colorinput-color d-flex align-items-center justify-content-center",
|
|
@@ -367,7 +353,7 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
367
353
|
backgroundColor: color
|
|
368
354
|
}
|
|
369
355
|
})
|
|
370
|
-
},
|
|
356
|
+
}, `default-color-${index}`);
|
|
371
357
|
})
|
|
372
358
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
373
359
|
className: "blank-placeholder d-flex align-items-center justify-content-center",
|
|
@@ -43,16 +43,18 @@ 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
|
-
|
|
46
|
+
const {
|
|
47
|
+
r,
|
|
48
|
+
g,
|
|
49
|
+
b,
|
|
50
|
+
a
|
|
51
|
+
} = color;
|
|
50
52
|
const toHex = value => {
|
|
51
53
|
const hex = value.toString(16);
|
|
52
54
|
return hex.length === 1 ? '0' + hex : hex;
|
|
53
55
|
};
|
|
54
56
|
const alpha = a !== undefined && a !== 1 ? toHex(Math.round(a * 255)) : '';
|
|
55
|
-
return
|
|
57
|
+
return `${isNeedPrefix ? '#' : ''}${toHex(r)}${toHex(g)}${toHex(b)}${isNeedAlpha ? alpha : ''}`;
|
|
56
58
|
};
|
|
57
59
|
exports.rgbaToHex = rgbaToHex;
|
|
58
60
|
const isLightColor = color => {
|
|
@@ -45,12 +45,13 @@ const COLUMN_DISPLAY_TYPE_ICON_CONFIG = {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
const DTableColumnIcon = _ref => {
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
ariaHidden =
|
|
53
|
-
getSvg
|
|
48
|
+
let {
|
|
49
|
+
column,
|
|
50
|
+
color,
|
|
51
|
+
className,
|
|
52
|
+
ariaHidden = false,
|
|
53
|
+
getSvg
|
|
54
|
+
} = _ref;
|
|
54
55
|
const columnType = column === null || column === void 0 ? void 0 : column.type;
|
|
55
56
|
if (!columnType) return null;
|
|
56
57
|
const columnDisplayType = (0, _dtableUtils.getColumnDisplayType)(column);
|
|
@@ -9,18 +9,20 @@ 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
|
-
|
|
12
|
+
let {
|
|
13
|
+
callBack,
|
|
14
|
+
footerName,
|
|
15
|
+
className,
|
|
16
|
+
addIconClassName,
|
|
17
|
+
hideIcon,
|
|
18
|
+
style
|
|
19
|
+
} = _ref;
|
|
18
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
19
|
-
className:
|
|
21
|
+
className: `dtable-ui add-item-btn ${className ? className : ''}`,
|
|
20
22
|
style: style,
|
|
21
23
|
onClick: e => callBack(e),
|
|
22
24
|
children: [!hideIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
23
|
-
className:
|
|
25
|
+
className: `dtable-font dtable-icon-add-table ${addIconClassName || ''}`
|
|
24
26
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
25
27
|
className: "add-new-option text-truncate",
|
|
26
28
|
children: footerName
|
|
@@ -10,7 +10,9 @@ 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
|
|
13
|
+
let {
|
|
14
|
+
children
|
|
15
|
+
} = _ref;
|
|
14
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
15
17
|
className: "dtable-custom-footer",
|
|
16
18
|
children: children
|
|
@@ -9,6 +9,8 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _DTableIcon = _interopRequireDefault(require("../DTableIcon"));
|
|
12
|
+
var _lang = require("../lang");
|
|
13
|
+
var _DTableToolTip = _interopRequireDefault(require("../DTableToolTip"));
|
|
12
14
|
require("./index.css");
|
|
13
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
16
|
class DTableCustomizeSearchInput extends _react.Component {
|
|
@@ -23,10 +25,10 @@ class DTableCustomizeSearchInput extends _react.Component {
|
|
|
23
25
|
this.timer = null;
|
|
24
26
|
};
|
|
25
27
|
this.scheduleSearchChange = searchValue => {
|
|
26
|
-
const
|
|
27
|
-
onChange
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
const {
|
|
29
|
+
onChange,
|
|
30
|
+
wait = 100
|
|
31
|
+
} = this.props;
|
|
30
32
|
this.timer = setTimeout(() => {
|
|
31
33
|
this.timer = null;
|
|
32
34
|
onChange(searchValue.trim());
|
|
@@ -47,7 +49,9 @@ class DTableCustomizeSearchInput extends _react.Component {
|
|
|
47
49
|
};
|
|
48
50
|
this.clearSearch = event => {
|
|
49
51
|
event && event.stopPropagation && event.stopPropagation();
|
|
50
|
-
const
|
|
52
|
+
const {
|
|
53
|
+
clearValue
|
|
54
|
+
} = this.props;
|
|
51
55
|
this.clearChangeTimer();
|
|
52
56
|
this.setState({
|
|
53
57
|
searchValue: ''
|
|
@@ -64,18 +68,28 @@ class DTableCustomizeSearchInput extends _react.Component {
|
|
|
64
68
|
}
|
|
65
69
|
};
|
|
66
70
|
this.renderClear = () => {
|
|
67
|
-
const
|
|
68
|
-
isClearable
|
|
69
|
-
clearClassName
|
|
70
|
-
|
|
71
|
+
const {
|
|
72
|
+
isClearable,
|
|
73
|
+
clearClassName
|
|
74
|
+
} = this.props;
|
|
75
|
+
const {
|
|
76
|
+
searchValue
|
|
77
|
+
} = this.state;
|
|
71
78
|
if (!isClearable || !searchValue) return null;
|
|
72
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
80
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
81
|
+
className: (0, _classnames.default)('clear-icon-x', clearClassName),
|
|
82
|
+
onClick: this.clearSearch,
|
|
83
|
+
id: "customize-search-clear",
|
|
84
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableIcon.default, {
|
|
85
|
+
symbol: "close",
|
|
86
|
+
color: "var(--bs-icon-color)"
|
|
87
|
+
})
|
|
88
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableToolTip.default, {
|
|
89
|
+
placement: "bottom",
|
|
90
|
+
target: "customize-search-clear",
|
|
91
|
+
children: (0, _lang.getLocale)('Clear')
|
|
92
|
+
})]
|
|
79
93
|
});
|
|
80
94
|
};
|
|
81
95
|
this.state = {
|
|
@@ -105,16 +119,17 @@ class DTableCustomizeSearchInput extends _react.Component {
|
|
|
105
119
|
this.inputRef = null;
|
|
106
120
|
}
|
|
107
121
|
render() {
|
|
108
|
-
const
|
|
109
|
-
placeholder
|
|
110
|
-
autoFocus
|
|
111
|
-
className
|
|
112
|
-
onKeyDown
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
122
|
+
const {
|
|
123
|
+
placeholder,
|
|
124
|
+
autoFocus,
|
|
125
|
+
className,
|
|
126
|
+
onKeyDown,
|
|
127
|
+
disabled = false,
|
|
128
|
+
style = {}
|
|
129
|
+
} = this.props;
|
|
130
|
+
const {
|
|
131
|
+
searchValue
|
|
132
|
+
} = this.state;
|
|
118
133
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
119
134
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
120
135
|
type: "text",
|
|
@@ -54,20 +54,24 @@ class DTableCustomizeSelect extends _react.Component {
|
|
|
54
54
|
};
|
|
55
55
|
this.getSelectedOptionTop = () => {
|
|
56
56
|
if (!this.selector) return 38;
|
|
57
|
-
const
|
|
58
|
-
height
|
|
57
|
+
const {
|
|
58
|
+
height
|
|
59
|
+
} = this.selector.getBoundingClientRect();
|
|
59
60
|
return height;
|
|
60
61
|
};
|
|
61
62
|
this.getFilterOptions = searchValue => {
|
|
62
|
-
const
|
|
63
|
-
options
|
|
64
|
-
searchable
|
|
63
|
+
const {
|
|
64
|
+
options,
|
|
65
|
+
searchable
|
|
66
|
+
} = this.props;
|
|
65
67
|
if (!searchable) return options || [];
|
|
66
68
|
const validSearchVal = searchValue.trim().toLowerCase();
|
|
67
69
|
if (!validSearchVal) return options || [];
|
|
68
70
|
return options.filter(option => {
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
+
const {
|
|
72
|
+
value,
|
|
73
|
+
name
|
|
74
|
+
} = option;
|
|
71
75
|
if (typeof name === 'string') {
|
|
72
76
|
return name.toLowerCase().indexOf(validSearchVal) > -1;
|
|
73
77
|
}
|
|
@@ -94,18 +98,19 @@ class DTableCustomizeSelect extends _react.Component {
|
|
|
94
98
|
document.removeEventListener('mousedown', this.handleDocumentMouseDown, true);
|
|
95
99
|
}
|
|
96
100
|
render() {
|
|
97
|
-
let
|
|
98
|
-
className
|
|
99
|
-
value
|
|
100
|
-
options
|
|
101
|
-
placeholder
|
|
102
|
-
searchable
|
|
103
|
-
searchPlaceholder
|
|
104
|
-
noOptionsPlaceholder
|
|
105
|
-
isLocked
|
|
106
|
-
isInModal
|
|
107
|
-
addOptionAble
|
|
108
|
-
component
|
|
101
|
+
let {
|
|
102
|
+
className,
|
|
103
|
+
value,
|
|
104
|
+
options,
|
|
105
|
+
placeholder,
|
|
106
|
+
searchable,
|
|
107
|
+
searchPlaceholder,
|
|
108
|
+
noOptionsPlaceholder,
|
|
109
|
+
isLocked,
|
|
110
|
+
isInModal,
|
|
111
|
+
addOptionAble,
|
|
112
|
+
component
|
|
113
|
+
} = this.props;
|
|
109
114
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
110
115
|
ref: node => this.selector = node,
|
|
111
116
|
className: (0, _classnames.default)('seatable-customize-select custom-select', {
|
|
@@ -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");
|
|
@@ -13,27 +12,30 @@ var _DTableToolTip = _interopRequireDefault(require("../DTableToolTip"));
|
|
|
13
12
|
var _svgIcon = _interopRequireDefault(require("../DTableIcon/svg-icon"));
|
|
14
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
14
|
const DTableDropdownItem = _ref => {
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
15
|
+
let {
|
|
16
|
+
className,
|
|
17
|
+
divider,
|
|
18
|
+
id,
|
|
19
|
+
toggle,
|
|
20
|
+
disabled,
|
|
21
|
+
tooltip,
|
|
22
|
+
itemProps,
|
|
23
|
+
showChecked,
|
|
24
|
+
checked,
|
|
25
|
+
leftSlotContent,
|
|
26
|
+
rightSlotContent,
|
|
27
|
+
icon,
|
|
28
|
+
content,
|
|
29
|
+
onClick,
|
|
30
|
+
style,
|
|
31
|
+
tabIndex
|
|
32
|
+
} = _ref;
|
|
32
33
|
if (divider) {
|
|
33
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownItem,
|
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownItem, {
|
|
35
|
+
...itemProps,
|
|
34
36
|
divider: true,
|
|
35
37
|
className: className
|
|
36
|
-
})
|
|
38
|
+
});
|
|
37
39
|
}
|
|
38
40
|
const renderedIcon = () => {
|
|
39
41
|
if (!icon || ! /*#__PURE__*/_react.default.isValidElement(icon)) return null;
|
|
@@ -42,7 +44,9 @@ const DTableDropdownItem = _ref => {
|
|
|
42
44
|
'aria-hidden': 'true'
|
|
43
45
|
});
|
|
44
46
|
};
|
|
45
|
-
let customItemProps =
|
|
47
|
+
let customItemProps = {
|
|
48
|
+
...itemProps
|
|
49
|
+
};
|
|
46
50
|
if (typeof onClick === 'function') {
|
|
47
51
|
customItemProps.onClick = onClick;
|
|
48
52
|
}
|
|
@@ -55,11 +59,11 @@ const DTableDropdownItem = _ref => {
|
|
|
55
59
|
if (typeof tabIndex === 'number') {
|
|
56
60
|
customItemProps.tabIndex = tabIndex;
|
|
57
61
|
}
|
|
58
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownItem,
|
|
62
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownItem, {
|
|
59
63
|
className: className,
|
|
60
64
|
disabled: disabled,
|
|
61
|
-
id: id
|
|
62
|
-
|
|
65
|
+
id: id,
|
|
66
|
+
...customItemProps,
|
|
63
67
|
children: [(leftSlotContent || showChecked) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
64
68
|
className: "dtable-dropdown-item-left-slot",
|
|
65
69
|
children: [checked && /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgIcon.default, {
|
|
@@ -85,6 +89,6 @@ const DTableDropdownItem = _ref => {
|
|
|
85
89
|
}],
|
|
86
90
|
children: tooltip
|
|
87
91
|
})]
|
|
88
|
-
})
|
|
92
|
+
});
|
|
89
93
|
};
|
|
90
94
|
var _default = exports.default = DTableDropdownItem;
|
|
@@ -5,20 +5,23 @@ 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");
|
|
12
11
|
const DTableDropdownMenu = _ref => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
let {
|
|
13
|
+
id,
|
|
14
|
+
className,
|
|
15
|
+
container,
|
|
16
|
+
modifiers,
|
|
17
|
+
flip,
|
|
18
|
+
style,
|
|
19
|
+
menuProps,
|
|
20
|
+
children
|
|
21
|
+
} = _ref;
|
|
22
|
+
let customMenuProps = {
|
|
23
|
+
...menuProps
|
|
24
|
+
};
|
|
22
25
|
customMenuProps.modifiers = [{
|
|
23
26
|
name: 'preventOverflow',
|
|
24
27
|
options: {
|
|
@@ -37,11 +40,11 @@ const DTableDropdownMenu = _ref => {
|
|
|
37
40
|
if (typeof flip === 'boolean') {
|
|
38
41
|
customMenuProps.flip = flip;
|
|
39
42
|
}
|
|
40
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownMenu,
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownMenu, {
|
|
41
44
|
id: id,
|
|
42
|
-
className: (0, _classnames.default)('dtable-dropdown-menu', className)
|
|
43
|
-
|
|
45
|
+
className: (0, _classnames.default)('dtable-dropdown-menu', className),
|
|
46
|
+
...customMenuProps,
|
|
44
47
|
children: children
|
|
45
|
-
})
|
|
48
|
+
});
|
|
46
49
|
};
|
|
47
50
|
var _default = exports.default = DTableDropdownMenu;
|
|
@@ -10,10 +10,11 @@ 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
|
|
13
|
+
const {
|
|
14
|
+
text,
|
|
15
|
+
title,
|
|
16
|
+
type
|
|
17
|
+
} = this.props;
|
|
17
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
18
19
|
className: "empty-tip",
|
|
19
20
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|