dtable-ui-component 6.0.126 → 7.0.0-xia.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ActionSheet/index.js +16 -14
- package/lib/ActivityIndicator/index.js +8 -7
- package/lib/AsyncUserSelect/index.js +19 -40
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +11 -9
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +3 -1
- 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 +4 -2
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +34 -25
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +7 -9
- package/lib/Comment/body/comment.js +18 -10
- package/lib/Comment/body/index.js +4 -2
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +20 -9
- package/lib/Comment/footer/input/index.js +50 -29
- package/lib/Comment/footer/input/participant/index.js +5 -4
- 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 +24 -8
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +21 -15
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +18 -22
- package/lib/DTableColorPicker/index.js +40 -55
- package/lib/DTableColorPicker/utils.js +6 -4
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +8 -6
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeCollaboratorSelect/index.js +20 -17
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +18 -16
- package/lib/DTableDropdownMenu/index.js +10 -8
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +50 -34
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +113 -63
- 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 +56 -35
- package/lib/DTableFiltersPopover/widgets/filter-item.js +171 -108
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +161 -136
- package/lib/DTableFiltersPopover/widgets/rate-item.js +20 -15
- package/lib/DTableGroupSelect/index.js +15 -11
- package/lib/DTableGroupSelect/select-option-group.js +32 -23
- package/lib/DTableIcon/index.js +7 -6
- package/lib/DTableIcon/svg-icon.js +7 -5
- package/lib/DTableModalHeader/index.css +3 -20
- package/lib/DTableModalHeader/index.js +3 -1
- package/lib/DTablePopover/index.js +15 -11
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +17 -8
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +5 -6
- package/lib/DTableSelect/index.js +22 -21
- package/lib/DTableSelect/utils.js +15 -7
- package/lib/DTableSubDropdownMenu/index.js +10 -8
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +8 -7
- package/lib/DateEditor/index.js +15 -20
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +45 -26
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +3 -1
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +23 -25
- package/lib/DepartmentSelectFilter/index.js +8 -6
- package/lib/DepartmentSingleSelectEditor/index.js +3 -1
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +47 -48
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +58 -36
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +3 -1
- package/lib/DigitalSignEditor/mb-editor/index.js +20 -12
- package/lib/DigitalSignEditor/pc-editor/index.js +24 -17
- package/lib/DigitalSignEditor/service.js +4 -2
- package/lib/DigitalSignEditor/signature-board/index.js +8 -5
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +5 -4
- 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 +12 -12
- package/lib/FieldDisplaySetting/index.js +10 -12
- package/lib/FileEditor/files-previewer/index.js +3 -1
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +18 -10
- 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 +21 -14
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +3 -1
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +3 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +25 -11
- package/lib/FileEditor/pc-editor/index.js +27 -19
- package/lib/FileFormatter/index.js +19 -26
- package/lib/FileItemFormatter/index.js +9 -6
- package/lib/FileUploader/index.js +45 -28
- package/lib/FormulaFormatter/index.js +29 -15
- package/lib/GeolocationEditor/index.js +12 -11
- package/lib/GeolocationEditor/map-editor-utils.js +15 -17
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +6 -4
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +68 -41
- 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 +23 -10
- package/lib/GeolocationEditor/pc-editor/index.js +20 -12
- package/lib/GeolocationEditor/pc-editor/location-editor.js +31 -26
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +54 -34
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +60 -36
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +62 -35
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +65 -36
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +25 -19
- package/lib/GeolocationEditor/pc-editor/province-editor.js +13 -6
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +7 -6
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +12 -4
- package/lib/Icon/index.js +5 -3
- package/lib/IconButton/index.js +6 -4
- package/lib/ImageEditor/images-previewer/image-preview/index.js +21 -12
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +3 -1
- 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 +3 -1
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +21 -7
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +13 -11
- package/lib/ImagePreviewerLightbox/index.js +13 -15
- package/lib/ImageThumbnail/index.js +13 -10
- package/lib/InputItem/custom-input.js +46 -26
- package/lib/InputItem/custom-keyboard.js +18 -15
- package/lib/InputItem/index.js +50 -34
- package/lib/InputItem/input.js +4 -2
- 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 +10 -5
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +8 -6
- package/lib/List/list-item.js +28 -22
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +8 -7
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +5 -3
- package/lib/MobileFullScreenPage/header/index.js +6 -4
- package/lib/MobileFullScreenPage/index.js +11 -13
- package/lib/MobileModal/index.js +3 -1
- 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.js +3 -1
- package/lib/MobileSelector/search/index.js +5 -3
- package/lib/MobileUpload/index.js +5 -4
- package/lib/Modal/modal.js +15 -14
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +3 -1
- package/lib/MultipleSelectFormatter/index.js +8 -6
- 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 +4 -2
- package/lib/Picker/AbstractPicker.js +27 -23
- package/lib/Popover/index.js +4 -3
- package/lib/Popover/item.js +9 -7
- package/lib/Progress/index.js +8 -9
- package/lib/Radio/Radio.js +8 -4
- package/lib/Radio/RadioItem.js +12 -8
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.js +17 -18
- package/lib/RowExpandDialog/body/index.js +49 -32
- package/lib/RowExpandDialog/column-content/index.js +9 -5
- package/lib/RowExpandDialog/header/index.js +8 -6
- package/lib/RowExpandDialog/index.js +34 -49
- 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/mb-editor/index.js +33 -22
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
- 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/mb-editor.js +11 -16
- package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +34 -20
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +35 -21
- 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/mb-editor/index.js +19 -9
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +24 -13
- 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/mb-editor/index.js +29 -17
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +25 -15
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +23 -13
- package/lib/RowExpandEditor/index.js +8 -4
- 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/mb-editor/index.js +19 -11
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +33 -22
- 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/mb-editor.js +25 -12
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +36 -20
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +28 -17
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +34 -22
- 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/mb-editor/index.js +13 -5
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +18 -9
- 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 +7 -4
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +12 -10
- package/lib/RowExpandFormatter/formula-formatter/index.js +34 -19
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +8 -7
- package/lib/RowExpandFormatter/index.js +41 -27
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +14 -8
- package/lib/RowExpandFormatter/link-formatter/index.js +19 -11
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +12 -11
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +7 -4
- package/lib/RowExpandView/body/index.js +35 -22
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +30 -42
- package/lib/SelectItem/index.js +8 -6
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +9 -7
- package/lib/SimpleLongTextFormatter/index.js +16 -10
- 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 +3 -1
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +16 -14
- package/lib/TabBar/index.js +21 -18
- package/lib/Tabs/index.js +3 -1
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +26 -19
- package/lib/Toast/index.js +4 -3
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +3 -1
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +42 -27
- package/lib/toaster/alert.js +7 -6
- package/lib/toaster/toast.js +3 -2
- package/lib/toaster/toastManager.js +4 -2
- package/lib/utils/cell.js +11 -8
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +3 -1
- package/lib/utils/url.js +31 -24
- package/lib/utils/utils.js +6 -2
- package/package.json +1 -1
package/lib/LinkEditor/index.js
CHANGED
|
@@ -25,29 +25,36 @@ class LinkEditor extends _react.default.Component {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
this.getLinkedCellValue = () => {
|
|
28
|
-
let
|
|
29
|
-
row
|
|
30
|
-
column
|
|
31
|
-
linkMetaData
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
let {
|
|
29
|
+
row,
|
|
30
|
+
column,
|
|
31
|
+
linkMetaData
|
|
32
|
+
} = this.props;
|
|
33
|
+
let {
|
|
34
|
+
link_id,
|
|
35
|
+
table_id,
|
|
36
|
+
other_table_id
|
|
37
|
+
} = column.data || {};
|
|
36
38
|
this.linkId = link_id;
|
|
37
39
|
this.tableId = table_id;
|
|
38
40
|
this.otherTableId = other_table_id;
|
|
39
41
|
return linkMetaData.getLinkedCellValue(this.linkId, this.tableId, this.otherTableId, row._id);
|
|
40
42
|
};
|
|
41
43
|
this.formatLinkedValuesToOptions = () => {
|
|
42
|
-
let
|
|
43
|
-
column
|
|
44
|
-
linkMetaData
|
|
45
|
-
|
|
44
|
+
let {
|
|
45
|
+
column,
|
|
46
|
+
linkMetaData
|
|
47
|
+
} = this.props;
|
|
48
|
+
let {
|
|
49
|
+
newValue: rowIds
|
|
50
|
+
} = this.state;
|
|
46
51
|
if (rowIds && Array.isArray(rowIds) && rowIds.length > 0) {
|
|
47
52
|
let linkedRows = linkMetaData.getLinkedRows(this.otherTableId, rowIds);
|
|
48
53
|
let linkedTable = linkMetaData.getLinkedTable(this.otherTableId);
|
|
49
54
|
return linkedRows.map(linkedRow => {
|
|
50
|
-
let
|
|
55
|
+
let {
|
|
56
|
+
display_column_key: displayColumnKey
|
|
57
|
+
} = column.data;
|
|
51
58
|
// format value to display
|
|
52
59
|
let displayValue = this.getDisplayValue(linkedTable, linkedRow, displayColumnKey);
|
|
53
60
|
return {
|
|
@@ -61,8 +68,10 @@ class LinkEditor extends _react.default.Component {
|
|
|
61
68
|
this.getDisplayValue = (linkedTable, linkedRow, displayColumnKey) => {
|
|
62
69
|
let value = linkedRow[displayColumnKey];
|
|
63
70
|
let linkedColumn = linkedTable.columns.find(column => column.key === displayColumnKey);
|
|
64
|
-
let
|
|
65
|
-
|
|
71
|
+
let {
|
|
72
|
+
type,
|
|
73
|
+
data
|
|
74
|
+
} = linkedColumn;
|
|
66
75
|
switch (type) {
|
|
67
76
|
case _dtableUtils.CellType.NUMBER:
|
|
68
77
|
{
|
|
@@ -70,7 +79,9 @@ class LinkEditor extends _react.default.Component {
|
|
|
70
79
|
}
|
|
71
80
|
case _dtableUtils.CellType.DATE:
|
|
72
81
|
{
|
|
73
|
-
let
|
|
82
|
+
let {
|
|
83
|
+
format
|
|
84
|
+
} = data;
|
|
74
85
|
return (0, _dtableUtils.getDateDisplayString)(value, format);
|
|
75
86
|
}
|
|
76
87
|
default:
|
|
@@ -78,10 +89,13 @@ class LinkEditor extends _react.default.Component {
|
|
|
78
89
|
}
|
|
79
90
|
};
|
|
80
91
|
this.getAvailableLinkedOptions = () => {
|
|
81
|
-
let
|
|
82
|
-
column
|
|
83
|
-
linkMetaData
|
|
84
|
-
|
|
92
|
+
let {
|
|
93
|
+
column,
|
|
94
|
+
linkMetaData
|
|
95
|
+
} = this.props;
|
|
96
|
+
let {
|
|
97
|
+
display_column_key: displayColumnKey
|
|
98
|
+
} = column.data;
|
|
85
99
|
let linkedTable = linkMetaData.getLinkedTable(this.otherTableId);
|
|
86
100
|
let availableRows = linkedTable.rows.filter(row => {
|
|
87
101
|
return !!row[displayColumnKey];
|
|
@@ -118,9 +132,10 @@ class LinkEditor extends _react.default.Component {
|
|
|
118
132
|
}
|
|
119
133
|
};
|
|
120
134
|
this.onOptionItemToggle = option => {
|
|
121
|
-
let
|
|
122
|
-
row
|
|
123
|
-
linkMetaData
|
|
135
|
+
let {
|
|
136
|
+
row,
|
|
137
|
+
linkMetaData
|
|
138
|
+
} = this.props;
|
|
124
139
|
let newValue = this.state.newValue.slice();
|
|
125
140
|
let optionIndex = newValue.findIndex(option_id => option_id === option.id);
|
|
126
141
|
if (optionIndex !== -1) {
|
|
@@ -135,9 +150,10 @@ class LinkEditor extends _react.default.Component {
|
|
|
135
150
|
});
|
|
136
151
|
};
|
|
137
152
|
this.onDeleteOption = option => {
|
|
138
|
-
let
|
|
139
|
-
row
|
|
140
|
-
linkMetaData
|
|
153
|
+
let {
|
|
154
|
+
row,
|
|
155
|
+
linkMetaData
|
|
156
|
+
} = this.props;
|
|
141
157
|
let newValue = this.state.newValue.slice();
|
|
142
158
|
let optionIndex = newValue.findIndex(option_id => option_id === option.id);
|
|
143
159
|
newValue.splice(optionIndex, 1);
|
|
@@ -150,9 +166,10 @@ class LinkEditor extends _react.default.Component {
|
|
|
150
166
|
this.caculatePopoverPosition = () => {
|
|
151
167
|
const POPOVER_MAX_HEIGHT = 200;
|
|
152
168
|
let innerHeight = window.innerHeight;
|
|
153
|
-
let
|
|
154
|
-
top
|
|
155
|
-
height
|
|
169
|
+
let {
|
|
170
|
+
top,
|
|
171
|
+
height
|
|
172
|
+
} = this.editor.getClientRects()[0];
|
|
156
173
|
let isBelow = innerHeight - (top + height) > POPOVER_MAX_HEIGHT;
|
|
157
174
|
let position = {
|
|
158
175
|
top: height + 1,
|
|
@@ -194,10 +211,13 @@ class LinkEditor extends _react.default.Component {
|
|
|
194
211
|
document.removeEventListener('mousedown', this.onMouseDown);
|
|
195
212
|
}
|
|
196
213
|
render() {
|
|
197
|
-
let
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
214
|
+
let {
|
|
215
|
+
isReadOnly
|
|
216
|
+
} = this.props;
|
|
217
|
+
let {
|
|
218
|
+
isPopoverShow,
|
|
219
|
+
popoverPosition
|
|
220
|
+
} = this.state;
|
|
201
221
|
let options = this.getAvailableLinkedOptions();
|
|
202
222
|
let selectedOptions = this.formatLinkedValuesToOptions();
|
|
203
223
|
let isShowRemoveIcon = !isReadOnly;
|
|
@@ -54,9 +54,10 @@ class LinkEditorOption extends _react.default.Component {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
let
|
|
58
|
-
option
|
|
59
|
-
isShowRemoveIcon
|
|
57
|
+
let {
|
|
58
|
+
option,
|
|
59
|
+
isShowRemoveIcon
|
|
60
|
+
} = this.props;
|
|
60
61
|
let containerStyle = this.getContainerStyle();
|
|
61
62
|
let optionStyle = this.getOptionStyle();
|
|
62
63
|
let optionNameStyle = this.getOptionNameStyle();
|
|
@@ -25,7 +25,9 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
this.onChangeSearch = event => {
|
|
28
|
-
let
|
|
28
|
+
let {
|
|
29
|
+
searchVal
|
|
30
|
+
} = this.state;
|
|
29
31
|
if (searchVal === event.target.value) {
|
|
30
32
|
return;
|
|
31
33
|
}
|
|
@@ -35,9 +37,10 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
35
37
|
});
|
|
36
38
|
};
|
|
37
39
|
this.getSelectedOptions = () => {
|
|
38
|
-
let
|
|
39
|
-
value
|
|
40
|
-
options
|
|
40
|
+
let {
|
|
41
|
+
value,
|
|
42
|
+
options
|
|
43
|
+
} = this.props;
|
|
41
44
|
if (!Array.isArray(value)) {
|
|
42
45
|
return [];
|
|
43
46
|
}
|
|
@@ -46,8 +49,12 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
46
49
|
});
|
|
47
50
|
};
|
|
48
51
|
this.getFilterOptions = () => {
|
|
49
|
-
let
|
|
50
|
-
|
|
52
|
+
let {
|
|
53
|
+
options
|
|
54
|
+
} = this.props;
|
|
55
|
+
let {
|
|
56
|
+
searchVal
|
|
57
|
+
} = this.state;
|
|
51
58
|
return searchVal ? options.filter(item => item.name.indexOf(searchVal) > -1) : options;
|
|
52
59
|
};
|
|
53
60
|
this.onSelectOption = option => {
|
|
@@ -57,7 +64,9 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
57
64
|
this.props.onOptionItemToggle(option);
|
|
58
65
|
};
|
|
59
66
|
this.renderFilteredOptions = options => {
|
|
60
|
-
let
|
|
67
|
+
let {
|
|
68
|
+
value
|
|
69
|
+
} = this.props;
|
|
61
70
|
return options.map((option, index) => {
|
|
62
71
|
let isSelect = value.some(item => item === option.id);
|
|
63
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -91,8 +100,12 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
91
100
|
window.removeEventListener('popstate', this.handleHistaryBack, false);
|
|
92
101
|
}
|
|
93
102
|
render() {
|
|
94
|
-
const
|
|
95
|
-
|
|
103
|
+
const {
|
|
104
|
+
column
|
|
105
|
+
} = this.props;
|
|
106
|
+
const {
|
|
107
|
+
searchVal
|
|
108
|
+
} = this.state;
|
|
96
109
|
let filterOptions = this.getFilterOptions();
|
|
97
110
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
98
111
|
ref: this.setEditorPopover,
|
|
@@ -27,7 +27,9 @@ class PCLinkEditorPopover extends _react.default.Component {
|
|
|
27
27
|
this.props.onOptionItemToggle(item);
|
|
28
28
|
};
|
|
29
29
|
this.getFilterOptions = () => {
|
|
30
|
-
let
|
|
30
|
+
let {
|
|
31
|
+
options
|
|
32
|
+
} = this.props;
|
|
31
33
|
let filter = this.state.searchValue.toLowerCase();
|
|
32
34
|
if (!filter) {
|
|
33
35
|
return options;
|
|
@@ -42,10 +44,13 @@ class PCLinkEditorPopover extends _react.default.Component {
|
|
|
42
44
|
}
|
|
43
45
|
render() {
|
|
44
46
|
let options = this.getFilterOptions();
|
|
45
|
-
let
|
|
46
|
-
popoverPosition
|
|
47
|
-
selectedOptions
|
|
48
|
-
|
|
47
|
+
let {
|
|
48
|
+
popoverPosition,
|
|
49
|
+
selectedOptions
|
|
50
|
+
} = this.props;
|
|
51
|
+
let {
|
|
52
|
+
searchValue
|
|
53
|
+
} = this.state;
|
|
49
54
|
let popoverStyle = Object.assign({}, (0, _objectSpread2.default)({}, popoverPosition), {
|
|
50
55
|
position: 'absolute'
|
|
51
56
|
});
|
|
@@ -16,37 +16,45 @@ class LinkFormatter extends _react.default.Component {
|
|
|
16
16
|
super(props);
|
|
17
17
|
this.getLinkedCellValue = row => {
|
|
18
18
|
if (!row) return [];
|
|
19
|
-
const
|
|
20
|
-
column
|
|
21
|
-
currentTableId
|
|
22
|
-
linkMetaData
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
const {
|
|
20
|
+
column,
|
|
21
|
+
currentTableId,
|
|
22
|
+
linkMetaData
|
|
23
|
+
} = this.props;
|
|
24
|
+
const {
|
|
25
|
+
link_id,
|
|
26
|
+
table_id,
|
|
27
|
+
other_table_id
|
|
28
|
+
} = column.data || {};
|
|
27
29
|
this.linkID = link_id;
|
|
28
30
|
this.tableID = currentTableId === table_id ? table_id : other_table_id;
|
|
29
31
|
this.otherTableID = this.tableID === table_id ? other_table_id : table_id;
|
|
30
32
|
return linkMetaData.getLinkedCellValue(this.linkID, this.tableID, this.otherTableID, row._id);
|
|
31
33
|
};
|
|
32
34
|
this.expandLinkedTableRow = row => {
|
|
33
|
-
let
|
|
34
|
-
enableOpenLinkedRow
|
|
35
|
-
linkMetaData
|
|
35
|
+
let {
|
|
36
|
+
enableOpenLinkedRow,
|
|
37
|
+
linkMetaData
|
|
38
|
+
} = this.props;
|
|
36
39
|
if (enableOpenLinkedRow) {
|
|
37
40
|
linkMetaData.expandLinkedTableRow(row, this.otherTableID);
|
|
38
41
|
}
|
|
39
42
|
};
|
|
40
43
|
this.getDisplayValues = () => {
|
|
41
|
-
let
|
|
42
|
-
column
|
|
43
|
-
linkMetaData
|
|
44
|
-
|
|
44
|
+
let {
|
|
45
|
+
column,
|
|
46
|
+
linkMetaData
|
|
47
|
+
} = this.props;
|
|
48
|
+
let {
|
|
49
|
+
value: rowIds
|
|
50
|
+
} = this.state;
|
|
45
51
|
if (rowIds && Array.isArray(rowIds) && rowIds.length > 0) {
|
|
46
52
|
let linkedTable = linkMetaData.getLinkedTable(this.otherTableID);
|
|
47
53
|
let linkedRows = linkMetaData.getLinkedRows(this.otherTableID, rowIds);
|
|
48
54
|
let result = linkedRows.map((row, index) => {
|
|
49
|
-
let
|
|
55
|
+
let {
|
|
56
|
+
display_column_key: displayColumnKey
|
|
57
|
+
} = column.data;
|
|
50
58
|
let displayValue = this.getDisplayValue(linkedTable, row, displayColumnKey);
|
|
51
59
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
52
60
|
className: "link-item",
|
|
@@ -65,8 +73,10 @@ class LinkFormatter extends _react.default.Component {
|
|
|
65
73
|
this.getDisplayValue = (linkedTable, row, displayColumnKey) => {
|
|
66
74
|
let value = row[displayColumnKey];
|
|
67
75
|
let linkedColumn = linkedTable.columns.find(column => column.key === displayColumnKey);
|
|
68
|
-
let
|
|
69
|
-
|
|
76
|
+
let {
|
|
77
|
+
type,
|
|
78
|
+
data
|
|
79
|
+
} = linkedColumn;
|
|
70
80
|
// todo: improve
|
|
71
81
|
switch (type) {
|
|
72
82
|
case _dtableUtils.CellType.NUMBER:
|
|
@@ -75,7 +85,9 @@ class LinkFormatter extends _react.default.Component {
|
|
|
75
85
|
}
|
|
76
86
|
case _dtableUtils.CellType.DATE:
|
|
77
87
|
{
|
|
78
|
-
let
|
|
88
|
+
let {
|
|
89
|
+
format
|
|
90
|
+
} = data;
|
|
79
91
|
return (0, _dtableUtils.getDateDisplayString)(value, format);
|
|
80
92
|
}
|
|
81
93
|
default:
|
|
@@ -90,7 +102,9 @@ class LinkFormatter extends _react.default.Component {
|
|
|
90
102
|
};
|
|
91
103
|
}
|
|
92
104
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
93
|
-
const
|
|
105
|
+
const {
|
|
106
|
+
row: nextRow
|
|
107
|
+
} = nextProps;
|
|
94
108
|
if (nextRow._id !== this.props.row._id) {
|
|
95
109
|
this.setState({
|
|
96
110
|
value: this.getLinkedCellValue(nextRow)
|
|
@@ -98,7 +112,9 @@ class LinkFormatter extends _react.default.Component {
|
|
|
98
112
|
}
|
|
99
113
|
}
|
|
100
114
|
render() {
|
|
101
|
-
const
|
|
115
|
+
const {
|
|
116
|
+
containerClassName
|
|
117
|
+
} = this.props;
|
|
102
118
|
const classname = (0, _classnames.default)('dtable-ui cell-formatter-container link-formatter', containerClassName);
|
|
103
119
|
let displayValues = this.getDisplayValues();
|
|
104
120
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
package/lib/List/index.js
CHANGED
|
@@ -17,12 +17,14 @@ const _excluded = ["prefixCls", "children", "className", "style", "renderHeader"
|
|
|
17
17
|
class List extends React.Component {
|
|
18
18
|
render() {
|
|
19
19
|
const _this$props = this.props,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
{
|
|
21
|
+
prefixCls,
|
|
22
|
+
children,
|
|
23
|
+
className,
|
|
24
|
+
style,
|
|
25
|
+
renderHeader,
|
|
26
|
+
renderFooter
|
|
27
|
+
} = _this$props,
|
|
26
28
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
27
29
|
const wrapCls = (0, _classnames.default)(prefixCls, className);
|
|
28
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
package/lib/List/list-item.js
CHANGED
|
@@ -28,9 +28,10 @@ class ListItem extends React.Component {
|
|
|
28
28
|
constructor(props) {
|
|
29
29
|
super(props);
|
|
30
30
|
this.onClick = ev => {
|
|
31
|
-
const
|
|
32
|
-
onClick
|
|
33
|
-
platform
|
|
31
|
+
const {
|
|
32
|
+
onClick,
|
|
33
|
+
platform
|
|
34
|
+
} = this.props;
|
|
34
35
|
const isAndroid = platform === 'android';
|
|
35
36
|
if (!!onClick && isAndroid) {
|
|
36
37
|
if (this.debounceTimeout) {
|
|
@@ -80,26 +81,31 @@ class ListItem extends React.Component {
|
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
render() {
|
|
83
|
-
const _this$
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
84
|
+
const _this$props = this.props,
|
|
85
|
+
{
|
|
86
|
+
prefixCls,
|
|
87
|
+
className,
|
|
88
|
+
activeStyle,
|
|
89
|
+
error,
|
|
90
|
+
align,
|
|
91
|
+
wrap,
|
|
92
|
+
disabled,
|
|
93
|
+
children,
|
|
94
|
+
multipleLine,
|
|
95
|
+
thumb,
|
|
96
|
+
extra,
|
|
97
|
+
arrow,
|
|
98
|
+
onClick
|
|
99
|
+
} = _this$props,
|
|
100
|
+
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
101
|
+
const {
|
|
102
|
+
platform
|
|
103
|
+
} = restProps,
|
|
99
104
|
otherProps = (0, _objectWithoutProperties2.default)(restProps, _excluded2);
|
|
100
|
-
const
|
|
101
|
-
coverRippleStyle
|
|
102
|
-
RippleClicked
|
|
105
|
+
const {
|
|
106
|
+
coverRippleStyle,
|
|
107
|
+
RippleClicked
|
|
108
|
+
} = this.state;
|
|
103
109
|
const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-item"), className, {
|
|
104
110
|
["".concat(prefixCls, "-item-disabled")]: disabled,
|
|
105
111
|
["".concat(prefixCls, "-item-error")]: error,
|
|
@@ -10,10 +10,11 @@ var _HtmlLongTextFormatter = _interopRequireDefault(require("../HtmlLongTextForm
|
|
|
10
10
|
var _SimpleLongTextFormatter = _interopRequireDefault(require("../SimpleLongTextFormatter"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function LongTextFormatter(_ref) {
|
|
13
|
-
let
|
|
14
|
-
isSample =
|
|
15
|
-
value
|
|
16
|
-
containerClassName
|
|
13
|
+
let {
|
|
14
|
+
isSample = true,
|
|
15
|
+
value,
|
|
16
|
+
containerClassName
|
|
17
|
+
} = _ref;
|
|
17
18
|
if (isSample) {
|
|
18
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SimpleLongTextFormatter.default, {
|
|
19
20
|
value: value,
|
|
@@ -9,13 +9,14 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
class MBEditorHeader extends _react.default.Component {
|
|
11
11
|
render() {
|
|
12
|
-
let
|
|
13
|
-
title
|
|
14
|
-
titleClass
|
|
15
|
-
leftContent
|
|
16
|
-
rightContent
|
|
17
|
-
onLeftClick
|
|
18
|
-
onRightClick
|
|
12
|
+
let {
|
|
13
|
+
title,
|
|
14
|
+
titleClass,
|
|
15
|
+
leftContent,
|
|
16
|
+
rightContent,
|
|
17
|
+
onLeftClick,
|
|
18
|
+
onRightClick
|
|
19
|
+
} = this.props;
|
|
19
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
20
21
|
className: "dtable-ui-mb-editor-header ".concat(titleClass ? titleClass : ''),
|
|
21
22
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -18,9 +18,10 @@ class MTimeFormatter extends _react.default.Component {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
let
|
|
22
|
-
date
|
|
23
|
-
containerClassName
|
|
21
|
+
let {
|
|
22
|
+
value: date,
|
|
23
|
+
containerClassName
|
|
24
|
+
} = this.props;
|
|
24
25
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container ctime-formatter', containerClassName);
|
|
25
26
|
if (date) {
|
|
26
27
|
date = this.formatDate(date);
|
|
@@ -10,9 +10,11 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
require("./index.css");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
const Body = _ref => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
let {
|
|
14
|
+
classNamePrefix,
|
|
15
|
+
className,
|
|
16
|
+
children
|
|
17
|
+
} = _ref;
|
|
16
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
17
19
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-body', className, {
|
|
18
20
|
["".concat(classNamePrefix, "-mobile-full-screen-page-body")]: classNamePrefix
|
|
@@ -10,10 +10,12 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
require("./index.css");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
const Header = _ref => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
let {
|
|
14
|
+
classNamePrefix,
|
|
15
|
+
children,
|
|
16
|
+
onLeftClick,
|
|
17
|
+
onRightClick
|
|
18
|
+
} = _ref;
|
|
17
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
18
20
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header p-0', {
|
|
19
21
|
["".concat(classNamePrefix, "-mobile-full-screen-page-header")]: classNamePrefix
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
11
|
var _BodyPortal = _interopRequireDefault(require("../BodyPortal"));
|
|
@@ -16,17 +15,16 @@ var _utils = require("../utils/utils");
|
|
|
16
15
|
require("./index.css");
|
|
17
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
17
|
const MobileFullScreenPage = _ref => {
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
setMount = _useState2[1];
|
|
18
|
+
let {
|
|
19
|
+
classNamePrefix,
|
|
20
|
+
className,
|
|
21
|
+
style,
|
|
22
|
+
zIndex,
|
|
23
|
+
children,
|
|
24
|
+
onClose,
|
|
25
|
+
historyCallback
|
|
26
|
+
} = _ref;
|
|
27
|
+
const [isMount, setMount] = (0, _react.useState)(false);
|
|
30
28
|
const element = (0, _react.useMemo)(() => {
|
|
31
29
|
let _element = document.createElement('div');
|
|
32
30
|
_element.setAttribute('tabindex', '-1');
|
package/lib/MobileModal/index.js
CHANGED
|
@@ -28,7 +28,9 @@ class MobileModal extends _react.default.PureComponent {
|
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
30
|
const _this$props = this.props,
|
|
31
|
-
|
|
31
|
+
{
|
|
32
|
+
children
|
|
33
|
+
} = _this$props,
|
|
32
34
|
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
33
35
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
34
36
|
popup: true,
|
|
@@ -19,10 +19,11 @@ const OPERATION_TYPE = exports.OPERATION_TYPE = {
|
|
|
19
19
|
};
|
|
20
20
|
const OPERATION_TYPES = [OPERATION_TYPE.RENAME, OPERATION_TYPE.DOWNLOAD, OPERATION_TYPE.DELETE];
|
|
21
21
|
const MobileOperationSheet = _ref => {
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
operations =
|
|
22
|
+
let {
|
|
23
|
+
onChange,
|
|
24
|
+
onClose,
|
|
25
|
+
operations = OPERATION_TYPES
|
|
26
|
+
} = _ref;
|
|
26
27
|
const actionSheet = (0, _react.useRef)(_ActionSheet.default);
|
|
27
28
|
const btns = (0, _react.useMemo)(() => {
|
|
28
29
|
let _btns = [];
|
|
@@ -77,9 +78,9 @@ const MobileOperationSheet = _ref => {
|
|
|
77
78
|
maskClosable: true,
|
|
78
79
|
className: 'dtable-ui-mobile-action-sheet'
|
|
79
80
|
}, index => {
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
const {
|
|
82
|
+
value = 'close'
|
|
83
|
+
} = btns[index] || {};
|
|
83
84
|
if (value === 'close') {
|
|
84
85
|
onClose && onClose();
|
|
85
86
|
return;
|
|
@@ -11,7 +11,9 @@ var _List = _interopRequireDefault(require("../../List"));
|
|
|
11
11
|
require("./index.css");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
const Empty = _ref => {
|
|
14
|
-
let
|
|
14
|
+
let {
|
|
15
|
+
children
|
|
16
|
+
} = _ref;
|
|
15
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_List.default.Item, {
|
|
16
18
|
className: "dtable-ui-mobile-selector-no-options",
|
|
17
19
|
children: children
|
|
@@ -17,11 +17,13 @@ var _empty = _interopRequireDefault(require("./empty"));
|
|
|
17
17
|
require("./index.css");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
const MobileSelector = _ref => {
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
let {
|
|
21
|
+
className,
|
|
22
|
+
listClassName,
|
|
23
|
+
title,
|
|
24
|
+
children,
|
|
25
|
+
onClose
|
|
26
|
+
} = _ref;
|
|
25
27
|
const handleHistoryBack = (0, _react.useCallback)(event => {
|
|
26
28
|
event.preventDefault();
|
|
27
29
|
onClose && onClose();
|