dtable-ui-component 5.0.9-beta.1 → 5.0.9-beta.2
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 +5 -3
- package/lib/ButtonFormatter/index.js +9 -5
- package/lib/CTimeFormatter/index.js +5 -3
- package/lib/CheckboxEditor/index.js +15 -12
- package/lib/CheckboxFormatter/index.js +7 -5
- package/lib/CollaboratorEditor/index.js +46 -37
- package/lib/CollaboratorEditor/mb-collaborator-editor-popover/index.js +60 -47
- package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.js +37 -31
- package/lib/CollaboratorFormatter/index.js +8 -7
- package/lib/CollaboratorItem/index.js +21 -16
- package/lib/CollapsibleSettingLayout/index.js +17 -12
- package/lib/CreatorFormatter/index.js +8 -7
- package/lib/DTableCommonAddTool/index.js +10 -7
- package/lib/DTableCustomizeCollaboratorSelect/index.js +38 -32
- package/lib/DTableCustomizeSelect/index.js +51 -44
- package/lib/DTableFiltersPopover/index.js +46 -41
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +67 -51
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +64 -49
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +38 -32
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +42 -34
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +35 -31
- package/lib/DTableFiltersPopover/widgets/filter-item.js +92 -76
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +19 -17
- package/lib/DTableFiltersPopover/widgets/rate-item.js +12 -9
- package/lib/DTablePopover/index.js +9 -6
- package/lib/DTableRadio/index.js +20 -17
- package/lib/DTableSearchInput/index.js +22 -18
- package/lib/DTableSelect/dtable-select-label.js +12 -7
- package/lib/DTableSelect/index.js +2 -1
- package/lib/DTableSelect/utils.js +26 -13
- package/lib/DTableSwitch/index.js +20 -16
- package/lib/DateEditor/index.js +46 -36
- package/lib/DateEditor/mb-date-editor-popover/index.js +80 -63
- package/lib/DateEditor/pc-date-editor-popover.js +25 -22
- package/lib/DateFormatter/index.js +5 -3
- package/lib/Department-editor/department-multiple-select/index.js +49 -42
- package/lib/Department-editor/department-single-select.js +70 -54
- package/lib/Department-editor/index.js +18 -14
- package/lib/Department-editor/selected-departments/index.js +54 -44
- package/lib/DepartmentSelectFilter/index.js +8 -1
- package/lib/DepartmentSingleSelectFormatter/index.js +13 -9
- package/lib/DigitalSignFormatter/index.js +21 -17
- package/lib/DurationFormatter/index.js +7 -5
- package/lib/EditEditorButton/index.js +5 -3
- package/lib/EmailFormatter/index.js +5 -3
- package/lib/FieldDisplaySetting/field-item.js +25 -19
- package/lib/FieldDisplaySetting/index.js +47 -38
- package/lib/FileEditor/index.js +10 -7
- package/lib/FileFormatter/index.js +18 -15
- package/lib/FileItemFormatter/index.js +2 -1
- package/lib/FileUploader/index.js +2 -1
- package/lib/FormulaFormatter/index.js +21 -14
- package/lib/GeolocationFormatter/index.js +8 -6
- package/lib/HtmlLongTextFormatter/index.js +2 -1
- package/lib/ImageFormatter/images-lazy-load.js +7 -6
- package/lib/ImageFormatter/index.js +35 -29
- package/lib/ImagePreviewerLightbox/index.js +12 -8
- package/lib/LastModifierFormatter/index.js +8 -7
- package/lib/LinkEditor/index.js +38 -32
- package/lib/LinkEditor/link-editor-option.js +25 -20
- package/lib/LinkEditor/mb-link-editor-popover/index.js +53 -41
- package/lib/LinkEditor/pc-link-editor-popover/index.js +41 -33
- package/lib/LinkFormatter/index.js +13 -10
- package/lib/Loading/index.js +2 -1
- package/lib/LongTextFormatter/index.js +3 -2
- package/lib/MBEditorHeader/index.js +19 -14
- package/lib/MTimeFormatter/index.js +5 -3
- package/lib/MultipleSelectEditor/index.js +43 -37
- package/lib/MultipleSelectFormatter/index.js +8 -7
- package/lib/NotificationPopover/index.js +43 -32
- package/lib/NumberEditor/index.js +24 -20
- package/lib/NumberFormatter/index.js +5 -3
- package/lib/RateFormatter/index.js +7 -6
- package/lib/RoleStatusEditor/index.js +35 -30
- package/lib/RowExpandEmailFormatter/index.js +11 -8
- package/lib/RowExpandFileFormatter/index.js +14 -13
- package/lib/RowExpandFileFormatter/row-expand-file-item-formatter.js +43 -36
- package/lib/RowExpandFormatter/index.js +129 -112
- package/lib/RowExpandFormulaFormatter/index.js +37 -29
- package/lib/RowExpandImageFormatter/index.js +29 -26
- package/lib/RowExpandImageFormatter/row-expand-image-item-formatter.js +47 -39
- package/lib/RowExpandLinkFormatter/collaborator-item-formatter.js +2 -1
- package/lib/RowExpandLinkFormatter/index.js +70 -67
- package/lib/RowExpandRateFormatter/index.js +7 -6
- package/lib/RowExpandUrlFormatter/index.js +11 -8
- package/lib/SelectItem/index.js +5 -3
- package/lib/SelectOptionGroup/index.js +38 -31
- package/lib/SelectOptionGroup/option.js +5 -3
- package/lib/SimpleLongTextFormatter/index.js +39 -30
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +11 -8
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -2
- package/lib/SingleSelectEditor/index.js +42 -34
- package/lib/SingleSelectFormatter/index.js +6 -4
- package/lib/TextEditor/index.js +2 -1
- package/lib/TextFormatter/index.js +5 -3
- package/lib/UrlFormatter/index.js +5 -3
- package/lib/common/delete-tip.js +27 -19
- package/lib/formatterConfig/base-formatter-config.js +23 -22
- package/lib/formatterConfig/index.js +3 -2
- package/lib/select-editor/mb-select-editor-popover/index.js +84 -64
- package/lib/select-editor/pc-select-editor-popover/index.js +50 -39
- package/lib/select-editor/select-editor-option.js +24 -19
- package/lib/toaster/alert.js +25 -16
- package/lib/toaster/toast.js +28 -24
- package/lib/toaster/toastManager.js +16 -13
- package/lib/toaster/toaster.js +2 -1
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ var _dtableUtils = require("dtable-utils");
|
|
|
11
11
|
var _DTableCustomizeSelect = _interopRequireDefault(require("../../../DTableCustomizeSelect"));
|
|
12
12
|
var _lang = require("../../../lang");
|
|
13
13
|
require("./index.css");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
class CollaboratorFilter extends _react.Component {
|
|
15
16
|
constructor(props) {
|
|
16
17
|
super(props);
|
|
@@ -22,30 +23,38 @@ class CollaboratorFilter extends _react.Component {
|
|
|
22
23
|
filterIndex,
|
|
23
24
|
columnOption: collaborator
|
|
24
25
|
},
|
|
25
|
-
label: /*#__PURE__*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
26
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
|
|
27
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
28
|
+
className: "select-option-name option-collaborator",
|
|
29
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
|
+
className: "collaborator-container",
|
|
31
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
32
|
+
className: "collaborator",
|
|
33
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
34
|
+
className: "collaborator-avatar-container",
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
36
|
+
className: "collaborator-avatar",
|
|
37
|
+
alt: collaborator.name,
|
|
38
|
+
src: collaborator.avatar_url
|
|
39
|
+
})
|
|
40
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
41
|
+
className: "collaborator-name text-truncate",
|
|
42
|
+
style: {
|
|
43
|
+
maxWidth: '200px'
|
|
44
|
+
},
|
|
45
|
+
title: collaborator.name,
|
|
46
|
+
"aria-label": collaborator.name,
|
|
47
|
+
children: collaborator.name
|
|
48
|
+
})]
|
|
49
|
+
})
|
|
50
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
51
|
+
className: "collaborator-check-icon",
|
|
52
|
+
children: isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
53
|
+
className: "option-edit dtable-font dtable-icon-check-mark"
|
|
54
|
+
})
|
|
55
|
+
})]
|
|
56
|
+
})
|
|
57
|
+
})
|
|
49
58
|
};
|
|
50
59
|
});
|
|
51
60
|
};
|
|
@@ -69,35 +78,41 @@ class CollaboratorFilter extends _react.Component {
|
|
|
69
78
|
let selectedCollaborators = Array.isArray(filterTerm) && filterTerm.length > 0 && filterTerm.map(item => {
|
|
70
79
|
let collaborator = collaborators.find(c => c.email === item);
|
|
71
80
|
if (!collaborator) return null;
|
|
72
|
-
return /*#__PURE__*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
81
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
82
|
+
className: "collaborator",
|
|
83
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
84
|
+
className: "collaborator-avatar-container",
|
|
85
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
86
|
+
className: "collaborator-avatar",
|
|
87
|
+
alt: collaborator.name,
|
|
88
|
+
src: collaborator.avatar_url
|
|
89
|
+
})
|
|
90
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
91
|
+
className: "collaborator-name text-truncate",
|
|
92
|
+
title: collaborator.name,
|
|
93
|
+
"aria-label": collaborator.name,
|
|
94
|
+
children: collaborator.name
|
|
95
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
96
|
+
className: "remove-container",
|
|
97
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
98
|
+
className: "remove-icon",
|
|
99
|
+
onClick: e => {
|
|
100
|
+
this.onClick(e, collaborator);
|
|
101
|
+
},
|
|
102
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
103
|
+
className: "dtable-font dtable-icon-fork-number"
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
})]
|
|
107
|
+
}, item);
|
|
95
108
|
});
|
|
96
109
|
let value = selectedCollaborators ? {
|
|
97
|
-
label: /*#__PURE__*/
|
|
110
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
111
|
+
children: selectedCollaborators
|
|
112
|
+
})
|
|
98
113
|
} : {};
|
|
99
114
|
let options = Array.isArray(filterTerm) ? this.createCollaboratorOptions(filterIndex, collaborators, filterTerm) : [];
|
|
100
|
-
return /*#__PURE__*/
|
|
115
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSelect.default, {
|
|
101
116
|
className: "selector-collaborator",
|
|
102
117
|
value: value,
|
|
103
118
|
onSelectOption: this.props.onSelectCollaborator,
|
|
@@ -13,6 +13,7 @@ var _departmentMultipleSelect = _interopRequireDefault(require("../../../Departm
|
|
|
13
13
|
var _constants = require("../../../Department-editor/constants");
|
|
14
14
|
var _commonHooks = require("../../../hooks/common-hooks");
|
|
15
15
|
var _lang = require("../../../lang");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
function DepartmentMultipleSelectFilter(props) {
|
|
17
18
|
const {
|
|
18
19
|
value,
|
|
@@ -31,18 +32,19 @@ function DepartmentMultipleSelectFilter(props) {
|
|
|
31
32
|
type,
|
|
32
33
|
name
|
|
33
34
|
} = option;
|
|
34
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
35
36
|
className: "dropdown-item d-flex align-items-center",
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
onClick: event => selectDepartment(event, type),
|
|
38
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
39
|
+
type: "checkbox",
|
|
40
|
+
className: "vam department-select-input",
|
|
41
|
+
checked: selectedDepartments.includes(type),
|
|
42
|
+
onChange: event => selectDepartment(event, type)
|
|
43
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
44
|
+
className: "text-truncate department-name",
|
|
45
|
+
children: (0, _lang.getLocale)(name)
|
|
46
|
+
})]
|
|
47
|
+
}, index);
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
function onSelectToggle(event) {
|
|
@@ -67,31 +69,35 @@ function DepartmentMultipleSelectFilter(props) {
|
|
|
67
69
|
columnOption
|
|
68
70
|
});
|
|
69
71
|
}
|
|
70
|
-
return /*#__PURE__*/
|
|
72
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
71
73
|
ref: selectorRef,
|
|
72
74
|
className: (0, _classnames.default)('dtable-select custom-select', {
|
|
73
75
|
'focus': isShowSelector
|
|
74
76
|
}),
|
|
75
77
|
onClick: onSelectToggle,
|
|
76
|
-
id: "filter-department-editor"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
78
|
+
id: "filter-department-editor",
|
|
79
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
80
|
+
className: "selected-option",
|
|
81
|
+
children: [selectedDepartments.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
82
|
+
className: "selected-option-show",
|
|
83
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectedDepartments.default, {
|
|
84
|
+
value: selectedDepartments,
|
|
85
|
+
departments: departments
|
|
86
|
+
})
|
|
87
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
88
|
+
className: "select-placeholder",
|
|
89
|
+
children: (0, _lang.getLocale)('Select_department')
|
|
90
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
91
|
+
className: "dtable-font dtable-icon-drop-down"
|
|
92
|
+
})]
|
|
93
|
+
}), isShowSelector && /*#__PURE__*/(0, _jsxRuntime.jsx)(_departmentMultipleSelect.default, {
|
|
94
|
+
isShowSelectedDepartments: false,
|
|
95
|
+
classNamePrefix: "filter",
|
|
96
|
+
value: selectedDepartments,
|
|
97
|
+
onCommit: selectDepartment,
|
|
98
|
+
renderUserDepartmentOptions: renderUserDepartmentOptions,
|
|
99
|
+
departments: departments
|
|
100
|
+
})]
|
|
101
|
+
});
|
|
96
102
|
}
|
|
97
103
|
var _default = exports.default = DepartmentMultipleSelectFilter;
|
package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js
CHANGED
|
@@ -13,6 +13,7 @@ var _departmentSingleSelect = _interopRequireDefault(require("../../../Departmen
|
|
|
13
13
|
var _constants = require("../../../Department-editor/constants");
|
|
14
14
|
var _commonHooks = require("../../../hooks/common-hooks");
|
|
15
15
|
var _lang = require("../../../lang");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
function DepartmentSingleSelectFilter(props) {
|
|
17
18
|
const {
|
|
18
19
|
value,
|
|
@@ -36,19 +37,22 @@ function DepartmentSingleSelectFilter(props) {
|
|
|
36
37
|
type,
|
|
37
38
|
name
|
|
38
39
|
} = option;
|
|
39
|
-
return /*#__PURE__*/
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
40
41
|
className: "dropdown-item department-item d-flex align-items-center",
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
onClick: event => onSelect(event, type),
|
|
43
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
44
|
+
className: "department-item-left-content d-flex align-items-center",
|
|
45
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
46
|
+
className: "text-truncate department-name",
|
|
47
|
+
children: (0, _lang.getLocale)(name)
|
|
48
|
+
}), selectedDepartment === type && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
49
|
+
className: "department-check-icon",
|
|
50
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
51
|
+
className: "dtable-font dtable-icon-check-mark"
|
|
52
|
+
})
|
|
53
|
+
})]
|
|
54
|
+
})
|
|
55
|
+
}, index);
|
|
52
56
|
});
|
|
53
57
|
}
|
|
54
58
|
function onSelectToggle(event) {
|
|
@@ -65,32 +69,36 @@ function DepartmentSingleSelectFilter(props) {
|
|
|
65
69
|
columnOption
|
|
66
70
|
});
|
|
67
71
|
}
|
|
68
|
-
return /*#__PURE__*/
|
|
72
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
69
73
|
ref: selectorRef,
|
|
70
74
|
className: (0, _classnames.default)('dtable-select custom-select', {
|
|
71
75
|
'focus': isShowSelector
|
|
72
76
|
}),
|
|
73
77
|
onClick: onSelectToggle,
|
|
74
|
-
id: "filter-department-editor"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
78
|
+
id: "filter-department-editor",
|
|
79
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
80
|
+
className: "selected-option",
|
|
81
|
+
children: [value ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
82
|
+
className: "selected-option-show",
|
|
83
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectedDepartments.default, {
|
|
84
|
+
value: selectedDepartmentIds,
|
|
85
|
+
departments: departments
|
|
86
|
+
})
|
|
87
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
88
|
+
className: "select-placeholder",
|
|
89
|
+
children: (0, _lang.getLocale)('Select_department')
|
|
90
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
91
|
+
className: "dtable-font dtable-icon-drop-down"
|
|
92
|
+
})]
|
|
93
|
+
}), isShowSelector && /*#__PURE__*/(0, _jsxRuntime.jsx)(_departmentSingleSelect.default, {
|
|
94
|
+
enableSelectRange: false,
|
|
95
|
+
column: column,
|
|
96
|
+
value: value,
|
|
97
|
+
onCommit: onCommit,
|
|
98
|
+
userDepartmentIdsMap: userDepartmentIdsMap,
|
|
99
|
+
departments: departments,
|
|
100
|
+
renderUserDepartmentOptions: renderUserDepartmentOptions
|
|
101
|
+
})]
|
|
102
|
+
});
|
|
95
103
|
}
|
|
96
104
|
var _default = exports.default = DepartmentSingleSelectFilter;
|
|
@@ -15,6 +15,7 @@ var _Picker = _interopRequireDefault(require("@seafile/seafile-calendar/lib/Pick
|
|
|
15
15
|
var _lang = require("../../lang");
|
|
16
16
|
var _utils = require("../utils");
|
|
17
17
|
require("@seafile/seafile-calendar/assets/index.css");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
let now = (0, _dayjs.default)();
|
|
19
20
|
class FilterCalendar extends _react.Component {
|
|
20
21
|
constructor(props) {
|
|
@@ -110,7 +111,7 @@ class FilterCalendar extends _react.Component {
|
|
|
110
111
|
isReadOnly
|
|
111
112
|
} = this.props;
|
|
112
113
|
const state = this.state;
|
|
113
|
-
if (isReadOnly) return /*#__PURE__*/
|
|
114
|
+
if (isReadOnly) return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
114
115
|
className: "ant-calendar-picker-input ant-input form-control",
|
|
115
116
|
value: state.value ? state.value.format(this.columnDataFormat) : '',
|
|
116
117
|
disabled: true
|
|
@@ -127,7 +128,7 @@ class FilterCalendar extends _react.Component {
|
|
|
127
128
|
className: 'item-icon dtable-font dtable-icon-x',
|
|
128
129
|
style: clearStyle
|
|
129
130
|
});
|
|
130
|
-
const calendar = /*#__PURE__*/
|
|
131
|
+
const calendar = /*#__PURE__*/(0, _jsxRuntime.jsx)(_seafileCalendar.default, {
|
|
131
132
|
className: "dtable-rc-calendar",
|
|
132
133
|
locale: (0, _lang.translateCalendar)(),
|
|
133
134
|
style: {
|
|
@@ -141,35 +142,38 @@ class FilterCalendar extends _react.Component {
|
|
|
141
142
|
onClear: this.onClear,
|
|
142
143
|
clearIcon: clearIcon
|
|
143
144
|
});
|
|
144
|
-
return /*#__PURE__*/
|
|
145
|
-
className: "date-picker-container"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
145
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
146
|
+
className: "date-picker-container",
|
|
147
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Picker.default, {
|
|
148
|
+
calendar: calendar,
|
|
149
|
+
value: state.value,
|
|
150
|
+
onChange: this.onChange,
|
|
151
|
+
getCalendarContainer: this.getCalendarContainer,
|
|
152
|
+
onOpenChange: this.onOpenChange,
|
|
153
|
+
open: state.open,
|
|
154
|
+
style: {
|
|
155
|
+
zIndex: 1001
|
|
156
|
+
},
|
|
157
|
+
children: _ref => {
|
|
158
|
+
let {
|
|
159
|
+
value
|
|
160
|
+
} = _ref;
|
|
161
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
162
|
+
tabIndex: "0",
|
|
163
|
+
onFocus: this.onReadOnlyFocus,
|
|
164
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
165
|
+
tabIndex: "-1",
|
|
166
|
+
readOnly: true,
|
|
167
|
+
className: "ant-calendar-picker-input ant-input form-control",
|
|
168
|
+
value: value ? value.format(this.columnDataFormat) : '',
|
|
169
|
+
onMouseDown: this.handleMouseDown
|
|
170
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
171
|
+
ref: this.calendarContainerRef
|
|
172
|
+
})]
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
})
|
|
176
|
+
});
|
|
173
177
|
}
|
|
174
178
|
}
|
|
175
179
|
var _default = exports.default = FilterCalendar;
|