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
package/lib/DTableRadio/index.js
CHANGED
|
@@ -10,16 +10,15 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
require("./index.css");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function DTableRadio(_ref) {
|
|
13
|
-
let
|
|
14
|
-
disabled =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
label = _ref.label;
|
|
13
|
+
let {
|
|
14
|
+
disabled = false,
|
|
15
|
+
name = 'dtable-radio-input',
|
|
16
|
+
onCheckedChange = () => {},
|
|
17
|
+
className,
|
|
18
|
+
isChecked,
|
|
19
|
+
value,
|
|
20
|
+
label
|
|
21
|
+
} = _ref;
|
|
23
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
|
24
23
|
className: (0, _classnames.default)('dtable-radio w-100 align-items-center position-relative', {
|
|
25
24
|
'dtable-radio-disable': disabled,
|
|
@@ -28,7 +28,9 @@ class DTableRadioGroup extends _react.default.Component {
|
|
|
28
28
|
this.setTransitionTimer = null;
|
|
29
29
|
};
|
|
30
30
|
this.onSelectChanged = event => {
|
|
31
|
-
const
|
|
31
|
+
const {
|
|
32
|
+
option
|
|
33
|
+
} = event.target.dataset;
|
|
32
34
|
if (option === this.state.activeOption) return;
|
|
33
35
|
this.setState({
|
|
34
36
|
activeOption: option
|
|
@@ -43,13 +45,17 @@ class DTableRadioGroup extends _react.default.Component {
|
|
|
43
45
|
this.setTransitionTimer = null;
|
|
44
46
|
}
|
|
45
47
|
componentDidMount() {
|
|
46
|
-
const
|
|
48
|
+
const {
|
|
49
|
+
options
|
|
50
|
+
} = this.props;
|
|
47
51
|
if (!this.btn || !this.slider || !Array.isArray(options)) return;
|
|
48
|
-
this.slider.style.width =
|
|
52
|
+
this.slider.style.width = `${100 / options.length}%`;
|
|
49
53
|
this.setSliderTransition();
|
|
50
54
|
}
|
|
51
55
|
componentDidUpdate(prevProps) {
|
|
52
|
-
const
|
|
56
|
+
const {
|
|
57
|
+
activeOption
|
|
58
|
+
} = this.props;
|
|
53
59
|
if (activeOption !== prevProps.activeOption && activeOption !== this.state.activeOption) {
|
|
54
60
|
this.setState({
|
|
55
61
|
activeOption
|
|
@@ -60,21 +66,24 @@ class DTableRadioGroup extends _react.default.Component {
|
|
|
60
66
|
this.clearTransitionTimer();
|
|
61
67
|
}
|
|
62
68
|
render() {
|
|
63
|
-
const
|
|
64
|
-
options
|
|
65
|
-
optionsDisplay
|
|
66
|
-
readOnly
|
|
67
|
-
|
|
69
|
+
const {
|
|
70
|
+
options,
|
|
71
|
+
optionsDisplay,
|
|
72
|
+
readOnly
|
|
73
|
+
} = this.props;
|
|
74
|
+
const {
|
|
75
|
+
activeOption
|
|
76
|
+
} = this.state;
|
|
68
77
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
69
78
|
className: "radio-group-wrapper",
|
|
70
79
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
71
|
-
className:
|
|
80
|
+
className: `radio-group-options ${readOnly ? 'read-only' : ''}`,
|
|
72
81
|
children: [options.map(option => {
|
|
73
82
|
const isActive = activeOption === option ? true : false;
|
|
74
83
|
const displayOption = optionsDisplay && optionsDisplay[option] || '';
|
|
75
84
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
76
85
|
ref: ref => this.btn = ref,
|
|
77
|
-
className:
|
|
86
|
+
className: `radio-group-button ${isActive ? 'active' : ''}`,
|
|
78
87
|
"data-option": option,
|
|
79
88
|
onClick: this.onSelectChanged,
|
|
80
89
|
children: displayOption
|
|
@@ -18,9 +18,10 @@ class DtableSearchInput extends _react.Component {
|
|
|
18
18
|
};
|
|
19
19
|
this.onChange = e => {
|
|
20
20
|
this.timer && clearTimeout(this.timer);
|
|
21
|
-
const
|
|
22
|
-
onChange
|
|
23
|
-
wait
|
|
21
|
+
const {
|
|
22
|
+
onChange,
|
|
23
|
+
wait
|
|
24
|
+
} = this.props;
|
|
24
25
|
let text = e.target.value;
|
|
25
26
|
this.setState({
|
|
26
27
|
searchValue: text || ''
|
|
@@ -36,7 +37,9 @@ class DtableSearchInput extends _react.Component {
|
|
|
36
37
|
this.onChange(e);
|
|
37
38
|
};
|
|
38
39
|
this.clearSearch = () => {
|
|
39
|
-
const
|
|
40
|
+
const {
|
|
41
|
+
clearValue
|
|
42
|
+
} = this.props;
|
|
40
43
|
this.setState({
|
|
41
44
|
searchValue: ''
|
|
42
45
|
}, () => {
|
|
@@ -52,14 +55,18 @@ class DtableSearchInput extends _react.Component {
|
|
|
52
55
|
}
|
|
53
56
|
};
|
|
54
57
|
this.renderClear = () => {
|
|
55
|
-
const
|
|
56
|
-
isClearable
|
|
57
|
-
clearClassName
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const
|
|
58
|
+
const {
|
|
59
|
+
isClearable,
|
|
60
|
+
clearClassName,
|
|
61
|
+
components = {}
|
|
62
|
+
} = this.props;
|
|
63
|
+
const {
|
|
64
|
+
searchValue
|
|
65
|
+
} = this.state;
|
|
61
66
|
if (!isClearable || !searchValue) return null;
|
|
62
|
-
const
|
|
67
|
+
const {
|
|
68
|
+
ClearIndicator
|
|
69
|
+
} = components;
|
|
63
70
|
if (/*#__PURE__*/_react.default.isValidElement(ClearIndicator)) {
|
|
64
71
|
return /*#__PURE__*/_react.default.cloneElement(ClearIndicator, {
|
|
65
72
|
clearValue: this.clearSearch
|
|
@@ -95,14 +102,17 @@ class DtableSearchInput extends _react.Component {
|
|
|
95
102
|
this.inputRef = null;
|
|
96
103
|
}
|
|
97
104
|
render() {
|
|
98
|
-
const
|
|
99
|
-
placeholder
|
|
100
|
-
autoFocus
|
|
101
|
-
className
|
|
102
|
-
onKeyDown
|
|
103
|
-
disabled
|
|
104
|
-
style
|
|
105
|
-
|
|
105
|
+
const {
|
|
106
|
+
placeholder,
|
|
107
|
+
autoFocus,
|
|
108
|
+
className,
|
|
109
|
+
onKeyDown,
|
|
110
|
+
disabled,
|
|
111
|
+
style
|
|
112
|
+
} = this.props;
|
|
113
|
+
const {
|
|
114
|
+
searchValue
|
|
115
|
+
} = this.state;
|
|
106
116
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
107
117
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
108
118
|
ref: ref => this.inputRef = ref,
|
|
@@ -9,14 +9,13 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
require("./dtable-select-label.css");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
function DTableSelectLabel(_ref) {
|
|
12
|
-
let
|
|
13
|
-
classname =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
isSelect = _ref$isSelect === void 0 ? false : _ref$isSelect;
|
|
12
|
+
let {
|
|
13
|
+
classname = '',
|
|
14
|
+
name = '',
|
|
15
|
+
isSelect = false
|
|
16
|
+
} = _ref;
|
|
18
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
19
|
-
className:
|
|
18
|
+
className: `${classname} w-100 d-flex justify-content-between`,
|
|
20
19
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
21
20
|
children: name
|
|
22
21
|
}), isSelect && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -5,40 +5,41 @@ 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");
|
|
12
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
12
|
class DTableSelect extends _react.default.Component {
|
|
14
13
|
render() {
|
|
15
|
-
const
|
|
16
|
-
options
|
|
17
|
-
onChange
|
|
18
|
-
value
|
|
19
|
-
isSearchable
|
|
20
|
-
placeholder
|
|
21
|
-
isMulti
|
|
22
|
-
menuPosition
|
|
23
|
-
isClearable
|
|
24
|
-
noOptionsMessage
|
|
25
|
-
classNamePrefix
|
|
26
|
-
style
|
|
27
|
-
innerRef
|
|
28
|
-
isDisabled
|
|
29
|
-
form
|
|
30
|
-
customFilterOption
|
|
31
|
-
autoFocus
|
|
32
|
-
className
|
|
33
|
-
closeMenuOnSelect
|
|
34
|
-
onMenuClose
|
|
35
|
-
userComponents
|
|
36
|
-
|
|
14
|
+
const {
|
|
15
|
+
options,
|
|
16
|
+
onChange,
|
|
17
|
+
value,
|
|
18
|
+
isSearchable,
|
|
19
|
+
placeholder,
|
|
20
|
+
isMulti,
|
|
21
|
+
menuPosition,
|
|
22
|
+
isClearable,
|
|
23
|
+
noOptionsMessage,
|
|
24
|
+
classNamePrefix,
|
|
25
|
+
style,
|
|
26
|
+
innerRef,
|
|
27
|
+
isDisabled,
|
|
28
|
+
form,
|
|
29
|
+
customFilterOption,
|
|
30
|
+
autoFocus,
|
|
31
|
+
className,
|
|
32
|
+
closeMenuOnSelect,
|
|
33
|
+
onMenuClose,
|
|
34
|
+
components: userComponents
|
|
35
|
+
} = this.props;
|
|
36
|
+
const mergedComponents = {
|
|
37
37
|
Option: _utils.Option,
|
|
38
38
|
DropdownIndicator: _utils.DropdownIndicator,
|
|
39
39
|
MenuList: _utils.MenuList,
|
|
40
|
-
ClearIndicator: _utils.ClearIndicator
|
|
41
|
-
|
|
40
|
+
ClearIndicator: _utils.ClearIndicator,
|
|
41
|
+
...userComponents
|
|
42
|
+
};
|
|
42
43
|
const processedOptions = (0, _utils.processOptionsWithClear)(options, isClearable);
|
|
43
44
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.default, {
|
|
44
45
|
value: value,
|
|
@@ -10,7 +10,9 @@ var _DTableIcon = _interopRequireDefault(require("../../DTableIcon"));
|
|
|
10
10
|
require("./index.css");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
const SelectDropdownIndicator = _ref => {
|
|
13
|
-
let
|
|
13
|
+
let {
|
|
14
|
+
isDisabled
|
|
15
|
+
} = _ref;
|
|
14
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
15
17
|
className: "select-dropdown-indicator d-flex align-items-center",
|
|
16
18
|
"aria-hidden": "true",
|
|
@@ -5,13 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.processOptionsWithClear = exports.handleSelectChange = exports.createHandleChange = exports.Option = exports.MenuSelectStyle = exports.MenuList = exports.DropdownIndicator = exports.ClearIndicator = void 0;
|
|
8
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
var _reactSelect = require("react-select");
|
|
12
10
|
require("./dtable-select-label.css");
|
|
13
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
|
|
12
|
+
// DtableSelect is based on seatable-ui.css, so use the following content to override the default react-select style
|
|
15
13
|
const DEFAULT_CONTROL_STYLE = {
|
|
16
14
|
fontSize: '14px',
|
|
17
15
|
padding: '0 4px 0 8px',
|
|
@@ -46,8 +44,10 @@ const HEADER_ICON_STYLE = {
|
|
|
46
44
|
padding: 0
|
|
47
45
|
};
|
|
48
46
|
const controlCallback = (provided, state) => {
|
|
49
|
-
const
|
|
50
|
-
|
|
47
|
+
const {
|
|
48
|
+
isDisabled,
|
|
49
|
+
isFocused
|
|
50
|
+
} = state;
|
|
51
51
|
const headerIconStyle = {
|
|
52
52
|
'.header-icon': HEADER_ICON_STYLE,
|
|
53
53
|
'.header-icon .dtable-font': {
|
|
@@ -55,38 +55,53 @@ const controlCallback = (provided, state) => {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
if (isDisabled) {
|
|
58
|
-
return
|
|
58
|
+
return {
|
|
59
|
+
...provided,
|
|
60
|
+
...DISABLED_CONTROL_STYLE,
|
|
59
61
|
':active': {
|
|
60
62
|
border: '1px solid var(--bs-bg-border-color)'
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
+
},
|
|
64
|
+
...headerIconStyle
|
|
65
|
+
};
|
|
63
66
|
}
|
|
64
67
|
if (isFocused) {
|
|
65
|
-
return
|
|
68
|
+
return {
|
|
69
|
+
...provided,
|
|
70
|
+
...FOCUS_CONTROL_STYLE,
|
|
71
|
+
...headerIconStyle
|
|
72
|
+
};
|
|
66
73
|
}
|
|
67
|
-
return
|
|
74
|
+
return {
|
|
75
|
+
...provided,
|
|
68
76
|
fontSize: '14px',
|
|
69
77
|
lineHeight: '1.5',
|
|
70
|
-
cursor: 'pointer'
|
|
71
|
-
|
|
78
|
+
cursor: 'pointer',
|
|
79
|
+
...DEFAULT_CONTROL_STYLE,
|
|
80
|
+
...headerIconStyle
|
|
81
|
+
};
|
|
72
82
|
};
|
|
73
83
|
const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
74
84
|
menu: base => {
|
|
75
|
-
return
|
|
85
|
+
return {
|
|
86
|
+
...base,
|
|
76
87
|
backgroundColor: 'var(--bs-popover-bg)',
|
|
77
88
|
border: '1px solid var(--bs-border-secondary-color)',
|
|
78
89
|
borderRadius: '4px',
|
|
79
90
|
boxShadow: 'var(--bs-border-secondary-shadow)',
|
|
80
91
|
marginTop: '4px',
|
|
81
92
|
marginBottom: 0
|
|
82
|
-
}
|
|
93
|
+
};
|
|
83
94
|
},
|
|
84
|
-
menuList: provided => (
|
|
95
|
+
menuList: provided => ({
|
|
96
|
+
...provided,
|
|
85
97
|
padding: '8px'
|
|
86
98
|
}),
|
|
87
99
|
option: (provided, state) => {
|
|
88
|
-
const
|
|
89
|
-
|
|
100
|
+
const {
|
|
101
|
+
isDisabled
|
|
102
|
+
} = state;
|
|
103
|
+
return {
|
|
104
|
+
...provided,
|
|
90
105
|
color: 'var(--bs-body-color)',
|
|
91
106
|
borderRadius: '4px',
|
|
92
107
|
minHeight: '32px',
|
|
@@ -100,28 +115,32 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
|
100
115
|
backgroundColor: 'var(--bs-btn-background-hover)'
|
|
101
116
|
},
|
|
102
117
|
'.header-icon': HEADER_ICON_STYLE
|
|
103
|
-
}
|
|
118
|
+
};
|
|
104
119
|
},
|
|
105
120
|
control: controlCallback,
|
|
106
|
-
menuPortal: base => (
|
|
121
|
+
menuPortal: base => ({
|
|
122
|
+
...base,
|
|
107
123
|
zIndex: 9999,
|
|
108
124
|
backgroundColor: 'var(--bs-popover-bg)',
|
|
109
125
|
color: 'var(--bs-body-color)',
|
|
110
126
|
borderColor: 'var(--bs-border-secondary-color)'
|
|
111
127
|
}),
|
|
112
128
|
singleValue: provided => {
|
|
113
|
-
return
|
|
129
|
+
return {
|
|
130
|
+
...provided,
|
|
114
131
|
color: 'var(--bs-body-color)',
|
|
115
132
|
margin: 0
|
|
116
|
-
}
|
|
133
|
+
};
|
|
117
134
|
},
|
|
118
135
|
multiValue: provided => {
|
|
119
|
-
return
|
|
136
|
+
return {
|
|
137
|
+
...provided,
|
|
120
138
|
color: 'var(--bs-body-color)',
|
|
121
139
|
margin: 0
|
|
122
|
-
}
|
|
140
|
+
};
|
|
123
141
|
},
|
|
124
|
-
multiValueRemove: styles => (
|
|
142
|
+
multiValueRemove: styles => ({
|
|
143
|
+
...styles,
|
|
125
144
|
'.dtable-font': {
|
|
126
145
|
color: 'var(--bs-icon-color)'
|
|
127
146
|
},
|
|
@@ -130,16 +149,20 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
|
130
149
|
color: 'var(--bs-icon-color)'
|
|
131
150
|
}
|
|
132
151
|
}),
|
|
133
|
-
input: styles => (
|
|
152
|
+
input: styles => ({
|
|
153
|
+
...styles,
|
|
134
154
|
color: 'var(--bs-body-color)'
|
|
135
155
|
}),
|
|
136
156
|
placeholder: (provided, state) => {
|
|
137
|
-
const
|
|
138
|
-
|
|
157
|
+
const {
|
|
158
|
+
isDisabled
|
|
159
|
+
} = state;
|
|
160
|
+
return {
|
|
161
|
+
...provided,
|
|
139
162
|
color: 'var(--bs-bg-placeholder-color)',
|
|
140
163
|
opacity: isDisabled ? 0.65 : 1,
|
|
141
164
|
margin: 0
|
|
142
|
-
}
|
|
165
|
+
};
|
|
143
166
|
},
|
|
144
167
|
indicatorSeparator: (styles, state) => {
|
|
145
168
|
return {
|
|
@@ -147,18 +170,22 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
|
147
170
|
};
|
|
148
171
|
},
|
|
149
172
|
dropdownIndicator: (provided, state) => {
|
|
150
|
-
const
|
|
151
|
-
|
|
173
|
+
const {
|
|
174
|
+
isDisabled
|
|
175
|
+
} = state;
|
|
176
|
+
return {
|
|
177
|
+
...provided,
|
|
152
178
|
paddingRight: '12px',
|
|
153
179
|
'.dtable-font': {
|
|
154
180
|
color: 'var(--bs-icon-color) !important',
|
|
155
181
|
opacity: isDisabled ? 0.65 : 1
|
|
156
182
|
}
|
|
157
|
-
}
|
|
183
|
+
};
|
|
158
184
|
}
|
|
159
185
|
};
|
|
160
186
|
const DropdownIndicator = props => {
|
|
161
|
-
return _reactSelect.components.DropdownIndicator && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.DropdownIndicator,
|
|
187
|
+
return _reactSelect.components.DropdownIndicator && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.DropdownIndicator, {
|
|
188
|
+
...props,
|
|
162
189
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
163
190
|
className: "dtable-font dtable-icon-down3",
|
|
164
191
|
style: {
|
|
@@ -168,20 +195,24 @@ const DropdownIndicator = props => {
|
|
|
168
195
|
paddingRight: 0
|
|
169
196
|
}
|
|
170
197
|
})
|
|
171
|
-
})
|
|
198
|
+
});
|
|
172
199
|
};
|
|
173
200
|
exports.DropdownIndicator = DropdownIndicator;
|
|
174
201
|
const ClearIndicator = _ref => {
|
|
175
|
-
let
|
|
176
|
-
|
|
202
|
+
let {
|
|
203
|
+
innerProps,
|
|
204
|
+
...props
|
|
205
|
+
} = _ref;
|
|
177
206
|
const onMouseDown = e => {
|
|
178
207
|
e.nativeEvent.stopImmediatePropagation();
|
|
179
208
|
innerProps.onMouseDown(e);
|
|
180
209
|
};
|
|
181
|
-
props.innerProps =
|
|
210
|
+
props.innerProps = {
|
|
211
|
+
...innerProps,
|
|
182
212
|
onMouseDown
|
|
183
|
-
}
|
|
184
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.ClearIndicator,
|
|
213
|
+
};
|
|
214
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.ClearIndicator, {
|
|
215
|
+
...props,
|
|
185
216
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
186
217
|
className: "dtable-font dtable-icon-fork-number",
|
|
187
218
|
style: {
|
|
@@ -190,21 +221,25 @@ const ClearIndicator = _ref => {
|
|
|
190
221
|
color: 'var(--bs-icon-color)'
|
|
191
222
|
}
|
|
192
223
|
})
|
|
193
|
-
})
|
|
224
|
+
});
|
|
194
225
|
};
|
|
195
226
|
exports.ClearIndicator = ClearIndicator;
|
|
196
227
|
const MenuList = props => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
197
228
|
onClick: e => e.nativeEvent.stopImmediatePropagation(),
|
|
198
229
|
onMouseDown: e => e.nativeEvent.stopImmediatePropagation(),
|
|
199
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.MenuList,
|
|
230
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.MenuList, {
|
|
231
|
+
...props,
|
|
200
232
|
children: props.children
|
|
201
|
-
})
|
|
233
|
+
})
|
|
202
234
|
});
|
|
203
235
|
exports.MenuList = MenuList;
|
|
204
236
|
const Option = props => {
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
237
|
+
const {
|
|
238
|
+
isSelected,
|
|
239
|
+
label
|
|
240
|
+
} = props;
|
|
241
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.Option, {
|
|
242
|
+
...props,
|
|
208
243
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
209
244
|
style: {
|
|
210
245
|
display: 'flex',
|
|
@@ -225,7 +260,7 @@ const Option = props => {
|
|
|
225
260
|
}
|
|
226
261
|
})]
|
|
227
262
|
})
|
|
228
|
-
})
|
|
263
|
+
});
|
|
229
264
|
};
|
|
230
265
|
exports.Option = Option;
|
|
231
266
|
const processOptionsWithClear = (options, isClearable) => {
|
|
@@ -240,9 +275,10 @@ const processOptionsWithClear = (options, isClearable) => {
|
|
|
240
275
|
exports.processOptionsWithClear = processOptionsWithClear;
|
|
241
276
|
const handleSelectChange = (selectedOption, actionMeta, onChangeCallback) => {
|
|
242
277
|
if (selectedOption && selectedOption.value === '__clear__') {
|
|
243
|
-
onChangeCallback(null,
|
|
278
|
+
onChangeCallback(null, {
|
|
279
|
+
...actionMeta,
|
|
244
280
|
action: 'clear'
|
|
245
|
-
})
|
|
281
|
+
});
|
|
246
282
|
} else {
|
|
247
283
|
onChangeCallback(selectedOption, actionMeta);
|
|
248
284
|
}
|
|
@@ -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 _classnames = _interopRequireDefault(require("classnames"));
|
|
10
9
|
var _DTableDropdownMenu = _interopRequireDefault(require("../DTableDropdownMenu"));
|
|
11
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
11
|
const DTableSubDropdownMenu = _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
|
if (container) {
|
|
23
26
|
customMenuProps.container = container;
|
|
24
27
|
}
|
|
@@ -34,14 +37,15 @@ const DTableSubDropdownMenu = _ref => {
|
|
|
34
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableDropdownMenu.default, {
|
|
35
38
|
id: id,
|
|
36
39
|
className: (0, _classnames.default)('dtable-sub-dropdown-menu', className),
|
|
37
|
-
menuProps:
|
|
40
|
+
menuProps: {
|
|
41
|
+
...customMenuProps,
|
|
38
42
|
modifiers: [{
|
|
39
43
|
name: 'offset',
|
|
40
44
|
options: {
|
|
41
45
|
offset: [-8, -1]
|
|
42
46
|
}
|
|
43
47
|
}, ...((customMenuProps === null || customMenuProps === void 0 ? void 0 : customMenuProps.modifiers) || [])]
|
|
44
|
-
}
|
|
48
|
+
},
|
|
45
49
|
children: children
|
|
46
50
|
});
|
|
47
51
|
};
|
|
@@ -5,25 +5,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _reactstrap = require("reactstrap");
|
|
11
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
11
|
var _lang = require("../lang");
|
|
13
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
13
|
const DTableSubDropdownToggle = _ref => {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
hideArrow =
|
|
22
|
-
title
|
|
23
|
-
ariaLabel
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
let {
|
|
15
|
+
className,
|
|
16
|
+
id,
|
|
17
|
+
text,
|
|
18
|
+
icon,
|
|
19
|
+
disabled,
|
|
20
|
+
hideArrow = false,
|
|
21
|
+
title,
|
|
22
|
+
ariaLabel,
|
|
23
|
+
ariaExpanded = false,
|
|
24
|
+
toggleProps
|
|
25
|
+
} = _ref;
|
|
27
26
|
const renderedIcon = () => {
|
|
28
27
|
if (!icon || ! /*#__PURE__*/_react.default.isValidElement(icon)) return null;
|
|
29
28
|
return /*#__PURE__*/_react.default.cloneElement(icon, {
|
|
@@ -31,7 +30,7 @@ const DTableSubDropdownToggle = _ref => {
|
|
|
31
30
|
'aria-hidden': 'true'
|
|
32
31
|
});
|
|
33
32
|
};
|
|
34
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownToggle,
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownToggle, {
|
|
35
34
|
id: id,
|
|
36
35
|
className: (0, _classnames.default)('dtable-sub-dropdown-toggle dropdown-item', className),
|
|
37
36
|
role: "button",
|
|
@@ -40,8 +39,8 @@ const DTableSubDropdownToggle = _ref => {
|
|
|
40
39
|
title: title || (0, _lang.getLocale)('More_operations'),
|
|
41
40
|
"aria-label": ariaLabel || (0, _lang.getLocale)('More_operations'),
|
|
42
41
|
"aria-expanded": ariaExpanded,
|
|
43
|
-
disabled: disabled
|
|
44
|
-
|
|
42
|
+
disabled: disabled,
|
|
43
|
+
...toggleProps,
|
|
45
44
|
children: [renderedIcon(), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
46
45
|
className: "item-text",
|
|
47
46
|
children: text
|
|
@@ -49,6 +48,6 @@ const DTableSubDropdownToggle = _ref => {
|
|
|
49
48
|
className: "item-icon dtable-font dtable-icon-down3 rotate-270 mr-0",
|
|
50
49
|
"aria-hidden": "true"
|
|
51
50
|
})]
|
|
52
|
-
})
|
|
51
|
+
});
|
|
53
52
|
};
|
|
54
53
|
var _default = exports.default = DTableSubDropdownToggle;
|