dtable-ui-component 4.4.3-2 → 4.4.3-alpha1
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/AutoNumberFormatter/index.js +7 -14
- package/lib/ButtonFormatter/index.js +9 -16
- package/lib/CTimeFormatter/index.js +9 -16
- package/lib/CheckboxEditor/index.js +8 -15
- package/lib/CheckboxFormatter/index.js +8 -15
- package/lib/CollaboratorEditor/index.js +21 -29
- package/lib/CollaboratorEditor/mb-collaborator-editor-popover/index.js +25 -32
- package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.js +18 -25
- package/lib/CollaboratorFormatter/index.js +12 -19
- package/lib/CollaboratorItem/index.js +10 -17
- package/lib/CreatorFormatter/index.js +12 -19
- package/lib/DTableCommonAddTool/index.js +6 -13
- package/lib/DTableCustomizeCollaboratorSelect/index.js +18 -26
- package/lib/DTableCustomizeSelect/index.js +15 -23
- package/lib/DTableFiltersPopover/constants/index.js +33 -38
- package/lib/DTableFiltersPopover/index.js +31 -38
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +46 -53
- package/lib/DTableFiltersPopover/utils/index.js +99 -128
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +26 -34
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +25 -33
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +26 -34
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +26 -34
- package/lib/DTableFiltersPopover/widgets/filter-item.js +120 -128
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +18 -26
- package/lib/DTableFiltersPopover/widgets/rate-item.js +8 -15
- package/lib/DTablePopover/index.js +8 -15
- package/lib/DTablePopover/utils.js +2 -9
- package/lib/DTableRadio/index.js +10 -17
- package/lib/DTableSearchInput/index.js +13 -21
- package/lib/DTableSearchInput/utils.js +2 -9
- package/lib/DTableSelect/dtable-select-label.js +6 -13
- package/lib/DTableSelect/index.js +10 -18
- package/lib/DTableSelect/utils.js +10 -20
- package/lib/DTableSwitch/index.js +7 -14
- package/lib/DateEditor/index.js +22 -30
- package/lib/DateEditor/mb-date-editor-popover/index.js +47 -55
- package/lib/DateEditor/pc-date-editor-popover.js +20 -27
- package/lib/DateFormatter/index.js +9 -16
- package/lib/Department-editor/constants.js +1 -7
- package/lib/Department-editor/department-multiple-select/index.js +24 -32
- package/lib/Department-editor/department-single-select.js +33 -41
- package/lib/Department-editor/index.js +14 -22
- package/lib/Department-editor/selected-departments/index.js +25 -32
- package/lib/Department-editor/utils.js +3 -11
- package/lib/DepartmentSingleSelectFormatter/index.js +9 -16
- package/lib/DigitalSignFormatter/index.js +15 -23
- package/lib/DigitalSignFormatter/utils.js +3 -11
- package/lib/DurationFormatter/index.js +9 -16
- package/lib/EditEditorButton/index.js +5 -12
- package/lib/EmailFormatter/index.js +7 -14
- package/lib/FieldDisplaySetting/field-item.js +14 -21
- package/lib/FieldDisplaySetting/index.js +19 -27
- package/lib/FileEditor/index.js +8 -15
- package/lib/FileEditor/pc-files-addition/index.js +0 -1
- package/lib/FileEditor/pc-files-addition/pc-file-uploaded-item.js +0 -1
- package/lib/FileEditor/pc-files-preview/index.js +0 -1
- package/lib/FileEditor/pc-files-preview/pc-file-item-preview.js +0 -1
- package/lib/FileFormatter/index.js +11 -19
- package/lib/FileItemFormatter/index.js +6 -14
- package/lib/FileItemFormatter/utils.js +2 -9
- package/lib/FileUploader/index.js +4 -11
- package/lib/FormulaFormatter/cell-value-validator.js +18 -24
- package/lib/FormulaFormatter/index.js +32 -39
- package/lib/FormulaFormatter/utils.js +13 -29
- package/lib/GeolocationFormatter/index.js +9 -16
- package/lib/HtmlLongTextFormatter/index.js +9 -17
- package/lib/HtmlLongTextFormatter/markdown2html.js +47 -0
- package/lib/HtmlLongTextFormatter/unified/index.js +400 -0
- package/lib/HtmlLongTextFormatter/vfile/core.js +155 -0
- package/lib/HtmlLongTextFormatter/vfile/index.js +40 -0
- package/lib/ImageFormatter/images-lazy-load.js +9 -16
- package/lib/ImageFormatter/index.js +16 -24
- package/lib/ImageFormatter/utils.js +2 -9
- package/lib/ImagePreviewerLightbox/index.js +12 -19
- package/lib/ImagePreviewerLightbox/utils.js +3 -11
- package/lib/LastModifierFormatter/index.js +12 -19
- package/lib/LinkEditor/index.js +25 -33
- package/lib/LinkEditor/link-editor-option.js +8 -15
- package/lib/LinkEditor/mb-link-editor-popover/index.js +23 -30
- package/lib/LinkEditor/pc-link-editor-popover/index.js +17 -24
- package/lib/LinkFormatter/index.js +13 -20
- package/lib/Loading/index.js +4 -11
- package/lib/LongTextFormatter/index.js +6 -13
- package/lib/MBEditorHeader/index.js +7 -14
- package/lib/MTimeFormatter/index.js +9 -16
- package/lib/ModalPortal/index.js +5 -12
- package/lib/MultipleSelectEditor/index.js +17 -25
- package/lib/MultipleSelectFormatter/index.js +10 -17
- package/lib/NotificationPopover/index.js +16 -24
- package/lib/NumberEditor/index.js +18 -25
- package/lib/NumberFormatter/index.js +9 -16
- package/lib/RateFormatter/index.js +8 -15
- package/lib/RoleStatusEditor/index.js +14 -22
- package/lib/RowExpandEmailFormatter/index.js +10 -17
- package/lib/RowExpandFileFormatter/index.js +8 -16
- package/lib/RowExpandFileFormatter/row-expand-file-item-formatter.js +18 -27
- package/lib/RowExpandFormatter/index.js +78 -86
- package/lib/RowExpandFormulaFormatter/index.js +34 -42
- package/lib/RowExpandImageFormatter/index.js +10 -19
- package/lib/RowExpandImageFormatter/row-expand-image-item-formatter.js +18 -27
- package/lib/RowExpandImageFormatter/utils.js +2 -9
- package/lib/RowExpandLinkFormatter/collaborator-item-formatter.js +7 -16
- package/lib/RowExpandLinkFormatter/index.js +37 -46
- package/lib/RowExpandLinkFormatter/utils.js +6 -17
- package/lib/RowExpandLinkFormatter/value-display-utils.js +5 -12
- package/lib/RowExpandRateFormatter/index.js +8 -15
- package/lib/RowExpandUrlFormatter/index.js +14 -21
- package/lib/SelectItem/index.js +4 -12
- package/lib/SelectOptionGroup/KeyCodes.js +1 -7
- package/lib/SelectOptionGroup/index.js +33 -32
- package/lib/SelectOptionGroup/option.js +4 -19
- package/lib/SimpleLongTextFormatter/index.js +20 -27
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +1 -7
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +8 -15
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +7 -14
- package/lib/SingleSelectEditor/index.js +18 -26
- package/lib/SingleSelectFormatter/index.js +9 -16
- package/lib/TextEditor/index.js +7 -14
- package/lib/TextFormatter/index.js +7 -14
- package/lib/UrlFormatter/index.js +7 -14
- package/lib/cellFormatterFactory/index.js +4 -11
- package/lib/common/ClickOutside.js +4 -12
- package/lib/common/delete-tip.js +12 -20
- package/lib/common/modal-portal.js +5 -13
- package/lib/constants/index.js +9 -28
- package/lib/data/dtable-value.js +6 -11
- package/lib/formatterConfig/base-formatter-config.js +46 -53
- package/lib/formatterConfig/index.js +9 -16
- package/lib/hooks/common-hooks.js +4 -11
- package/lib/index.js +75 -432
- package/lib/lang/index.js +13 -24
- package/lib/locals/de.js +1 -7
- package/lib/locals/en.js +1 -7
- package/lib/locals/fr.js +1 -7
- package/lib/locals/zh-CN.js +1 -7
- package/lib/select-editor/index.js +4 -27
- package/lib/select-editor/mb-select-editor-popover/index.js +33 -41
- package/lib/select-editor/pc-select-editor-popover/index.js +19 -26
- package/lib/select-editor/select-editor-option.js +8 -15
- package/lib/toaster/alert.js +11 -18
- package/lib/toaster/index.js +3 -10
- package/lib/toaster/toast.js +8 -16
- package/lib/toaster/toastManager.js +5 -13
- package/lib/toaster/toaster.js +7 -15
- package/lib/utils/dayjs.js +4 -11
- package/lib/utils/editor-utils.js +5 -15
- package/lib/utils/event-bus.js +1 -7
- package/lib/utils/utils.js +6 -17
- package/package.json +77 -63
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _dtableUtils = require("dtable-utils");
|
|
10
|
-
var _lang = require("../../lang");
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
|
+
import { COLUMNS_ICON_CONFIG } from 'dtable-utils';
|
|
3
|
+
import { getLocale } from '../../lang';
|
|
11
4
|
class FilterItemUtils {
|
|
12
5
|
static generatorColumnOption(column) {
|
|
13
6
|
if (!column) return null;
|
|
@@ -19,11 +12,11 @@ class FilterItemUtils {
|
|
|
19
12
|
value: {
|
|
20
13
|
column
|
|
21
14
|
},
|
|
22
|
-
label: /*#__PURE__*/
|
|
15
|
+
label: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
23
16
|
className: "filter-header-icon"
|
|
24
|
-
}, /*#__PURE__*/
|
|
25
|
-
className:
|
|
26
|
-
})), /*#__PURE__*/
|
|
17
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
18
|
+
className: COLUMNS_ICON_CONFIG[type]
|
|
19
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
27
20
|
className: "select-option-name"
|
|
28
21
|
}, name))
|
|
29
22
|
};
|
|
@@ -33,40 +26,40 @@ class FilterItemUtils {
|
|
|
33
26
|
value: {
|
|
34
27
|
filterPredicate
|
|
35
28
|
},
|
|
36
|
-
label: /*#__PURE__*/
|
|
29
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
37
30
|
className: "select-option-name"
|
|
38
|
-
},
|
|
31
|
+
}, getLocale(filterPredicate))
|
|
39
32
|
};
|
|
40
33
|
}
|
|
41
34
|
static generatorTermModifierOption(filterTermModifier) {
|
|
42
35
|
const FILTER_TERM_MODIFIER_SHOW = {
|
|
43
|
-
'today':
|
|
44
|
-
'tomorrow':
|
|
45
|
-
'yesterday':
|
|
46
|
-
'one_week_ago':
|
|
47
|
-
'one_week_from_now':
|
|
48
|
-
'one_month_ago':
|
|
49
|
-
'one_month_from_now':
|
|
50
|
-
'number_of_days_ago':
|
|
51
|
-
'number_of_days_from_now':
|
|
52
|
-
'exact_date':
|
|
53
|
-
'the_past_week':
|
|
54
|
-
'the_past_month':
|
|
55
|
-
'the_past_year':
|
|
56
|
-
'the_next_week':
|
|
57
|
-
'the_next_month':
|
|
58
|
-
'the_next_year':
|
|
59
|
-
'the_next_numbers_of_days':
|
|
60
|
-
'the_past_numbers_of_days':
|
|
61
|
-
'this_week':
|
|
62
|
-
'this_month':
|
|
63
|
-
'this_year':
|
|
36
|
+
'today': getLocale('today'),
|
|
37
|
+
'tomorrow': getLocale('tomorrow'),
|
|
38
|
+
'yesterday': getLocale('yesterday'),
|
|
39
|
+
'one_week_ago': getLocale('one_week_ago'),
|
|
40
|
+
'one_week_from_now': getLocale('one_week_from_now'),
|
|
41
|
+
'one_month_ago': getLocale('one_month_ago'),
|
|
42
|
+
'one_month_from_now': getLocale('one_month_from_now'),
|
|
43
|
+
'number_of_days_ago': getLocale('number_of_days_ago'),
|
|
44
|
+
'number_of_days_from_now': getLocale('number_of_days_from_now'),
|
|
45
|
+
'exact_date': getLocale('exact_date'),
|
|
46
|
+
'the_past_week': getLocale('last_week'),
|
|
47
|
+
'the_past_month': getLocale('last_month'),
|
|
48
|
+
'the_past_year': getLocale('last_year'),
|
|
49
|
+
'the_next_week': getLocale('the_next_week'),
|
|
50
|
+
'the_next_month': getLocale('the_next_month'),
|
|
51
|
+
'the_next_year': getLocale('the_next_year'),
|
|
52
|
+
'the_next_numbers_of_days': getLocale('the_next_numbers_of_days'),
|
|
53
|
+
'the_past_numbers_of_days': getLocale('the_past_numbers_of_days'),
|
|
54
|
+
'this_week': getLocale('this_week'),
|
|
55
|
+
'this_month': getLocale('this_month'),
|
|
56
|
+
'this_year': getLocale('this_year')
|
|
64
57
|
};
|
|
65
58
|
return {
|
|
66
59
|
value: {
|
|
67
60
|
filterTermModifier
|
|
68
61
|
},
|
|
69
|
-
label: /*#__PURE__*/
|
|
62
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
70
63
|
className: "select-option-name"
|
|
71
64
|
}, FILTER_TERM_MODIFIER_SHOW[filterTermModifier])
|
|
72
65
|
};
|
|
@@ -76,9 +69,9 @@ class FilterItemUtils {
|
|
|
76
69
|
value: {
|
|
77
70
|
columnOption: option
|
|
78
71
|
},
|
|
79
|
-
label: /*#__PURE__*/
|
|
72
|
+
label: /*#__PURE__*/React.createElement("div", {
|
|
80
73
|
className: "select-option-name"
|
|
81
|
-
}, /*#__PURE__*/
|
|
74
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
82
75
|
className: "single-select-option",
|
|
83
76
|
style: {
|
|
84
77
|
background: option.color,
|
|
@@ -94,9 +87,9 @@ class FilterItemUtils {
|
|
|
94
87
|
value: {
|
|
95
88
|
columnOption: option
|
|
96
89
|
},
|
|
97
|
-
label: /*#__PURE__*/
|
|
90
|
+
label: /*#__PURE__*/React.createElement("div", {
|
|
98
91
|
className: "select-option-name multiple-option-name"
|
|
99
|
-
}, /*#__PURE__*/
|
|
92
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
100
93
|
className: "multiple-select-option",
|
|
101
94
|
style: {
|
|
102
95
|
background: option.color,
|
|
@@ -104,9 +97,9 @@ class FilterItemUtils {
|
|
|
104
97
|
},
|
|
105
98
|
title: option.name,
|
|
106
99
|
"aria-label": option.name
|
|
107
|
-
}, option.name), /*#__PURE__*/
|
|
100
|
+
}, option.name), /*#__PURE__*/React.createElement("div", {
|
|
108
101
|
className: "multiple-check-icon"
|
|
109
|
-
}, filterTerm.indexOf(option.id) > -1 && /*#__PURE__*/
|
|
102
|
+
}, filterTerm.indexOf(option.id) > -1 && /*#__PURE__*/React.createElement("i", {
|
|
110
103
|
className: "option-edit dtable-font dtable-icon-check-mark"
|
|
111
104
|
})))
|
|
112
105
|
};
|
|
@@ -116,16 +109,16 @@ class FilterItemUtils {
|
|
|
116
109
|
value: {
|
|
117
110
|
filterConjunction: 'And'
|
|
118
111
|
},
|
|
119
|
-
label: /*#__PURE__*/
|
|
112
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
120
113
|
className: "select-option-name"
|
|
121
|
-
},
|
|
114
|
+
}, getLocale('And'))
|
|
122
115
|
}, {
|
|
123
116
|
value: {
|
|
124
117
|
filterConjunction: 'Or'
|
|
125
118
|
},
|
|
126
|
-
label: /*#__PURE__*/
|
|
119
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
127
120
|
className: "select-option-name"
|
|
128
|
-
},
|
|
121
|
+
}, getLocale('Or'))
|
|
129
122
|
}];
|
|
130
123
|
}
|
|
131
124
|
static getActiveConjunctionOption(conjunction) {
|
|
@@ -134,19 +127,19 @@ class FilterItemUtils {
|
|
|
134
127
|
value: {
|
|
135
128
|
filterConjunction: 'And'
|
|
136
129
|
},
|
|
137
|
-
label: /*#__PURE__*/
|
|
130
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
138
131
|
className: "select-option-name"
|
|
139
|
-
},
|
|
132
|
+
}, getLocale('And'))
|
|
140
133
|
};
|
|
141
134
|
}
|
|
142
135
|
return {
|
|
143
136
|
value: {
|
|
144
137
|
filterConjunction: 'Or'
|
|
145
138
|
},
|
|
146
|
-
label: /*#__PURE__*/
|
|
139
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
147
140
|
className: "select-option-name"
|
|
148
|
-
},
|
|
141
|
+
}, getLocale('Or'))
|
|
149
142
|
};
|
|
150
143
|
}
|
|
151
144
|
}
|
|
152
|
-
|
|
145
|
+
export default FilterItemUtils;
|