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
|
@@ -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
|
@@ -1,45 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
10
|
var React = _interopRequireWildcard(require("react"));
|
|
13
11
|
var _listItem = _interopRequireDefault(require("./list-item"));
|
|
14
12
|
require("./index.css");
|
|
15
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
const _excluded = ["prefixCls", "children", "className", "style", "renderHeader", "renderFooter"];
|
|
17
14
|
class List extends React.Component {
|
|
18
15
|
render() {
|
|
19
|
-
const
|
|
20
|
-
prefixCls
|
|
21
|
-
children
|
|
22
|
-
className
|
|
23
|
-
style
|
|
24
|
-
renderHeader
|
|
25
|
-
renderFooter
|
|
26
|
-
restProps
|
|
16
|
+
const {
|
|
17
|
+
prefixCls,
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
style,
|
|
21
|
+
renderHeader,
|
|
22
|
+
renderFooter,
|
|
23
|
+
...restProps
|
|
24
|
+
} = this.props;
|
|
27
25
|
const wrapCls = (0, _classnames.default)(prefixCls, className);
|
|
28
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div",
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
29
27
|
className: wrapCls,
|
|
30
|
-
style: style
|
|
31
|
-
|
|
28
|
+
style: style,
|
|
29
|
+
...restProps,
|
|
32
30
|
children: [renderHeader ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
33
|
-
className:
|
|
31
|
+
className: `${prefixCls}-header`,
|
|
34
32
|
children: typeof renderHeader === 'function' ? renderHeader() : renderHeader
|
|
35
33
|
}) : null, children ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
36
|
-
className:
|
|
34
|
+
className: `${prefixCls}-body`,
|
|
37
35
|
children: children
|
|
38
36
|
}) : null, renderFooter ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
39
|
-
className:
|
|
37
|
+
className: `${prefixCls}-footer`,
|
|
40
38
|
children: typeof renderFooter === 'function' ? renderFooter() : renderFooter
|
|
41
39
|
}) : null]
|
|
42
|
-
})
|
|
40
|
+
});
|
|
43
41
|
}
|
|
44
42
|
}
|
|
45
43
|
List.defaultProps = {
|
package/lib/List/list-item.js
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.Brief = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
10
|
var React = _interopRequireWildcard(require("react"));
|
|
13
11
|
var _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
|
|
14
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
const _excluded = ["prefixCls", "className", "activeStyle", "error", "align", "wrap", "disabled", "children", "multipleLine", "thumb", "extra", "arrow", "onClick"],
|
|
16
|
-
_excluded2 = ["platform"];
|
|
17
13
|
/* tslint:disable:jsx-no-multiline-js */
|
|
14
|
+
|
|
18
15
|
class Brief extends React.Component {
|
|
19
16
|
render() {
|
|
20
17
|
return /*#__PURE__*/React.createElement('div', {
|
|
@@ -28,9 +25,10 @@ class ListItem extends React.Component {
|
|
|
28
25
|
constructor(props) {
|
|
29
26
|
super(props);
|
|
30
27
|
this.onClick = ev => {
|
|
31
|
-
const
|
|
32
|
-
onClick
|
|
33
|
-
platform
|
|
28
|
+
const {
|
|
29
|
+
onClick,
|
|
30
|
+
platform
|
|
31
|
+
} = this.props;
|
|
34
32
|
const isAndroid = platform === 'android';
|
|
35
33
|
if (!!onClick && isAndroid) {
|
|
36
34
|
if (this.debounceTimeout) {
|
|
@@ -43,10 +41,10 @@ class ListItem extends React.Component {
|
|
|
43
41
|
const pointX = ev.clientX - ClientRect.left - Item.offsetWidth / 2;
|
|
44
42
|
const pointY = ev.clientY - ClientRect.top - Item.offsetWidth / 2;
|
|
45
43
|
const coverRippleStyle = {
|
|
46
|
-
width:
|
|
47
|
-
height:
|
|
48
|
-
left:
|
|
49
|
-
top:
|
|
44
|
+
width: `${RippleWidth}px`,
|
|
45
|
+
height: `${RippleWidth}px`,
|
|
46
|
+
left: `${pointX}px`,
|
|
47
|
+
top: `${pointY}px`
|
|
50
48
|
};
|
|
51
49
|
this.setState({
|
|
52
50
|
coverRippleStyle,
|
|
@@ -80,52 +78,57 @@ class ListItem extends React.Component {
|
|
|
80
78
|
}
|
|
81
79
|
}
|
|
82
80
|
render() {
|
|
83
|
-
const
|
|
84
|
-
prefixCls
|
|
85
|
-
className
|
|
86
|
-
activeStyle
|
|
87
|
-
error
|
|
88
|
-
align
|
|
89
|
-
wrap
|
|
90
|
-
disabled
|
|
91
|
-
children
|
|
92
|
-
multipleLine
|
|
93
|
-
thumb
|
|
94
|
-
extra
|
|
95
|
-
arrow
|
|
96
|
-
onClick
|
|
97
|
-
restProps
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
[
|
|
81
|
+
const {
|
|
82
|
+
prefixCls,
|
|
83
|
+
className,
|
|
84
|
+
activeStyle,
|
|
85
|
+
error,
|
|
86
|
+
align,
|
|
87
|
+
wrap,
|
|
88
|
+
disabled,
|
|
89
|
+
children,
|
|
90
|
+
multipleLine,
|
|
91
|
+
thumb,
|
|
92
|
+
extra,
|
|
93
|
+
arrow,
|
|
94
|
+
onClick,
|
|
95
|
+
...restProps
|
|
96
|
+
} = this.props;
|
|
97
|
+
const {
|
|
98
|
+
platform,
|
|
99
|
+
...otherProps
|
|
100
|
+
} = restProps;
|
|
101
|
+
const {
|
|
102
|
+
coverRippleStyle,
|
|
103
|
+
RippleClicked
|
|
104
|
+
} = this.state;
|
|
105
|
+
const wrapCls = (0, _classnames.default)(`${prefixCls}-item`, className, {
|
|
106
|
+
[`${prefixCls}-item-disabled`]: disabled,
|
|
107
|
+
[`${prefixCls}-item-error`]: error,
|
|
108
|
+
[`${prefixCls}-item-top`]: align === 'top',
|
|
109
|
+
[`${prefixCls}-item-middle`]: align === 'middle',
|
|
110
|
+
[`${prefixCls}-item-bottom`]: align === 'bottom'
|
|
109
111
|
});
|
|
110
|
-
const rippleCls = (0, _classnames.default)(
|
|
111
|
-
[
|
|
112
|
+
const rippleCls = (0, _classnames.default)(`${prefixCls}-ripple`, {
|
|
113
|
+
[`${prefixCls}-ripple-animate`]: RippleClicked
|
|
112
114
|
});
|
|
113
|
-
const lineCls = (0, _classnames.default)(
|
|
114
|
-
[
|
|
115
|
-
[
|
|
115
|
+
const lineCls = (0, _classnames.default)(`${prefixCls}-line`, {
|
|
116
|
+
[`${prefixCls}-line-multiple`]: multipleLine,
|
|
117
|
+
[`${prefixCls}-line-wrap`]: wrap
|
|
116
118
|
});
|
|
117
|
-
const arrowCls = (0, _classnames.default)(
|
|
118
|
-
[
|
|
119
|
-
[
|
|
120
|
-
[
|
|
119
|
+
const arrowCls = (0, _classnames.default)(`${prefixCls}-arrow`, {
|
|
120
|
+
[`${prefixCls}-arrow-horizontal`]: arrow === 'horizontal',
|
|
121
|
+
[`${prefixCls}-arrow-vertical`]: arrow === 'down' || arrow === 'up',
|
|
122
|
+
[`${prefixCls}-arrow-vertical-up`]: arrow === 'up'
|
|
121
123
|
});
|
|
122
|
-
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div",
|
|
124
|
+
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
125
|
+
...otherProps,
|
|
123
126
|
onClick: ev => {
|
|
124
127
|
this.onClick(ev);
|
|
125
128
|
},
|
|
126
129
|
className: wrapCls,
|
|
127
130
|
children: [thumb ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
128
|
-
className:
|
|
131
|
+
className: `${prefixCls}-thumb`,
|
|
129
132
|
children: typeof thumb === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
130
133
|
src: thumb,
|
|
131
134
|
alt: ""
|
|
@@ -133,10 +136,10 @@ class ListItem extends React.Component {
|
|
|
133
136
|
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
134
137
|
className: lineCls,
|
|
135
138
|
children: [children !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
136
|
-
className:
|
|
139
|
+
className: `${prefixCls}-content`,
|
|
137
140
|
children: children
|
|
138
141
|
}), extra !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
139
|
-
className:
|
|
142
|
+
className: `${prefixCls}-extra`,
|
|
140
143
|
children: extra
|
|
141
144
|
}), arrow && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
142
145
|
className: arrowCls,
|
|
@@ -146,7 +149,7 @@ class ListItem extends React.Component {
|
|
|
146
149
|
style: coverRippleStyle,
|
|
147
150
|
className: rippleCls
|
|
148
151
|
})]
|
|
149
|
-
})
|
|
152
|
+
});
|
|
150
153
|
let touchProps = {};
|
|
151
154
|
Object.keys(otherProps).forEach(key => {
|
|
152
155
|
if (/onTouch/i.test(key)) {
|
|
@@ -154,12 +157,13 @@ class ListItem extends React.Component {
|
|
|
154
157
|
delete otherProps[key];
|
|
155
158
|
}
|
|
156
159
|
});
|
|
157
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default,
|
|
160
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
161
|
+
...touchProps,
|
|
158
162
|
disabled: disabled || !onClick,
|
|
159
163
|
activeStyle: activeStyle,
|
|
160
|
-
activeClassName:
|
|
164
|
+
activeClassName: `${prefixCls}-item-active`,
|
|
161
165
|
children: content
|
|
162
|
-
})
|
|
166
|
+
});
|
|
163
167
|
}
|
|
164
168
|
}
|
|
165
169
|
ListItem.defaultProps = {
|
|
@@ -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,15 +9,16 @@ 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
|
-
className:
|
|
21
|
+
className: `dtable-ui-mb-editor-header ${titleClass ? titleClass : ''}`,
|
|
21
22
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
22
23
|
className: "editor-header-left-content",
|
|
23
24
|
onClick: onLeftClick,
|
|
@@ -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,12 +10,14 @@ 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
|
+
[`${classNamePrefix}-mobile-full-screen-page-body`]: classNamePrefix
|
|
19
21
|
}),
|
|
20
22
|
children: children
|
|
21
23
|
});
|
|
@@ -10,28 +10,30 @@ 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
|
+
[`${classNamePrefix}-mobile-full-screen-page-header`]: classNamePrefix
|
|
20
22
|
}),
|
|
21
23
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
22
24
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-btn', {
|
|
23
|
-
[
|
|
25
|
+
[`${classNamePrefix}-mobile-full-screen-page-header-btn`]: classNamePrefix
|
|
24
26
|
}),
|
|
25
27
|
onClick: onLeftClick,
|
|
26
28
|
children: children[0]
|
|
27
29
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("h4", {
|
|
28
30
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-title', {
|
|
29
|
-
[
|
|
31
|
+
[`${classNamePrefix}-mobile-full-screen-page-header-title`]: classNamePrefix
|
|
30
32
|
}),
|
|
31
33
|
children: children[1]
|
|
32
34
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
33
35
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-btn', {
|
|
34
|
-
[
|
|
36
|
+
[`${classNamePrefix}-mobile-full-screen-page-header-btn`]: classNamePrefix
|
|
35
37
|
}),
|
|
36
38
|
onClick: onRightClick,
|
|
37
39
|
children: children[2]
|
|
@@ -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');
|
|
@@ -66,7 +64,7 @@ const MobileFullScreenPage = _ref => {
|
|
|
66
64
|
node: element,
|
|
67
65
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
68
66
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page', className, {
|
|
69
|
-
[
|
|
67
|
+
[`${classNamePrefix}-mobile-full-screen-page`]: classNamePrefix
|
|
70
68
|
}),
|
|
71
69
|
style: style,
|
|
72
70
|
children: isMount && children
|
package/lib/MobileModal/index.js
CHANGED
|
@@ -5,12 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
var _Modal = _interopRequireDefault(require("../Modal"));
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
const _excluded = ["children"];
|
|
14
11
|
class MobileModal extends _react.default.PureComponent {
|
|
15
12
|
constructor() {
|
|
16
13
|
super(...arguments);
|
|
@@ -27,13 +24,15 @@ class MobileModal extends _react.default.PureComponent {
|
|
|
27
24
|
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
28
25
|
}
|
|
29
26
|
render() {
|
|
30
|
-
const
|
|
31
|
-
children
|
|
32
|
-
props
|
|
33
|
-
|
|
27
|
+
const {
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
} = this.props;
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, {
|
|
32
|
+
...props,
|
|
34
33
|
popup: true,
|
|
35
34
|
children: children
|
|
36
|
-
})
|
|
35
|
+
});
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
MobileModal.defaultProps = {
|
|
@@ -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();
|
|
@@ -11,9 +11,11 @@ var _List = _interopRequireDefault(require("../../List"));
|
|
|
11
11
|
require("./index.css");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
const Option = _ref => {
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
let {
|
|
15
|
+
isSelected,
|
|
16
|
+
children,
|
|
17
|
+
onChange
|
|
18
|
+
} = _ref;
|
|
17
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_List.default.Item, {
|
|
18
20
|
onClick: onChange,
|
|
19
21
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|