dtable-ui-component 5.0.8 → 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.css +22 -0
- package/lib/CollapsibleSettingLayout/index.js +36 -0
- 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/index.js +8 -1
- 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
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
10
|
class LinkEditorOption extends _react.default.Component {
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments);
|
|
@@ -61,27 +62,31 @@ class LinkEditorOption extends _react.default.Component {
|
|
|
61
62
|
let optionStyle = this.getOptionStyle();
|
|
62
63
|
let optionNameStyle = this.getOptionNameStyle();
|
|
63
64
|
let operationStyle = this.getOperationStyle();
|
|
64
|
-
return /*#__PURE__*/
|
|
65
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
65
66
|
className: "dtable-ui link-option-item",
|
|
66
|
-
style: containerStyle
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
67
|
+
style: containerStyle,
|
|
68
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
69
|
+
className: "option-info",
|
|
70
|
+
style: optionStyle,
|
|
71
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
72
|
+
className: "option-name",
|
|
73
|
+
style: optionNameStyle,
|
|
74
|
+
title: option.name,
|
|
75
|
+
children: option.name
|
|
76
|
+
})
|
|
77
|
+
}), isShowRemoveIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
78
|
+
className: "option-remove",
|
|
79
|
+
style: operationStyle,
|
|
80
|
+
onClick: this.onDeleteOption,
|
|
81
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
82
|
+
className: "dtable-font dtable-icon-fork-number",
|
|
83
|
+
style: {
|
|
84
|
+
fontSize: '12px',
|
|
85
|
+
lineHeight: '20px'
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
85
90
|
}
|
|
86
91
|
}
|
|
87
92
|
LinkEditorOption.defaultProps = {
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _lang = require("../../lang");
|
|
10
10
|
var _MBEditorHeader = _interopRequireDefault(require("../../MBEditorHeader"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
class MBLinkEditorPopover extends _react.default.Component {
|
|
13
14
|
constructor(props) {
|
|
14
15
|
super(props);
|
|
@@ -68,18 +69,20 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
68
69
|
} = this.props;
|
|
69
70
|
return options.map((option, index) => {
|
|
70
71
|
let isSelect = value.some(item => item === option.id);
|
|
71
|
-
return /*#__PURE__*/
|
|
72
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
72
73
|
className: "mb-link-option-item",
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
onMouseDown: this.onSelectOption.bind(this, option),
|
|
75
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
76
|
+
className: "mb-option-info",
|
|
77
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
78
|
+
className: "option-name",
|
|
79
|
+
title: option.name,
|
|
80
|
+
children: option.name
|
|
81
|
+
})
|
|
82
|
+
}), isSelect && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
83
|
+
className: "mb-option-checked dtable-font dtable-icon-check-mark"
|
|
84
|
+
})]
|
|
85
|
+
}, index);
|
|
83
86
|
});
|
|
84
87
|
};
|
|
85
88
|
this.setEditorPopover = editorPopover => {
|
|
@@ -104,38 +107,47 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
104
107
|
searchVal
|
|
105
108
|
} = this.state;
|
|
106
109
|
let filterOptions = this.getFilterOptions();
|
|
107
|
-
return /*#__PURE__*/
|
|
110
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
108
111
|
ref: this.setEditorPopover,
|
|
109
112
|
className: "dtable-ui-mb-editor-popover mb-link-editor-popover",
|
|
110
|
-
onClick: this.onContainerClick
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
113
|
+
onClick: this.onContainerClick,
|
|
114
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_MBEditorHeader.default, {
|
|
115
|
+
title: column.name,
|
|
116
|
+
leftContent: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
117
|
+
className: "dtable-font dtable-icon-return"
|
|
118
|
+
}),
|
|
119
|
+
rightContent: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
120
|
+
children: (0, _lang.getLocale)('Done')
|
|
121
|
+
}),
|
|
122
|
+
onLeftClick: this.props.onClosePopover,
|
|
123
|
+
onRightClick: this.props.onClosePopover
|
|
124
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
125
|
+
className: "dtable-ui-mb-editor-body dtable-ui-mb-link-editor-body",
|
|
126
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
127
|
+
className: "mb-search-link-items",
|
|
128
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
129
|
+
className: "form-control",
|
|
130
|
+
type: "text",
|
|
131
|
+
placeholder: (0, _lang.getLocale)('Search_option'),
|
|
132
|
+
value: searchVal,
|
|
133
|
+
onChange: this.onChangeSearch,
|
|
134
|
+
onClick: this.onInputClick
|
|
135
|
+
})
|
|
136
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
137
|
+
className: "mb-link-container",
|
|
138
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
139
|
+
className: "title",
|
|
140
|
+
children: (0, _lang.getLocale)('Choose_an_option')
|
|
141
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
142
|
+
className: "content",
|
|
143
|
+
children: [filterOptions.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
144
|
+
className: "search-result-none",
|
|
145
|
+
children: (0, _lang.getLocale)('No_options_available')
|
|
146
|
+
}), filterOptions.length > 0 && this.renderFilteredOptions(filterOptions)]
|
|
147
|
+
})]
|
|
148
|
+
})]
|
|
149
|
+
})]
|
|
150
|
+
});
|
|
139
151
|
}
|
|
140
152
|
}
|
|
141
153
|
MBLinkEditorPopover.defaultProps = {
|
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _lang = require("../../lang");
|
|
10
10
|
require("./index.css");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
class PCLinkEditorPopover extends _react.default.Component {
|
|
12
13
|
constructor(props) {
|
|
13
14
|
super(props);
|
|
@@ -54,40 +55,47 @@ class PCLinkEditorPopover extends _react.default.Component {
|
|
|
54
55
|
}, {
|
|
55
56
|
position: 'absolute'
|
|
56
57
|
});
|
|
57
|
-
return /*#__PURE__*/
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
58
59
|
className: "dtable-ui-editor-popover dtable-ui-link-editor-popover",
|
|
59
|
-
style: popoverStyle
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
60
|
+
style: popoverStyle,
|
|
61
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
62
|
+
className: "link-options-search",
|
|
63
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
64
|
+
className: "form-control",
|
|
65
|
+
value: searchValue,
|
|
66
|
+
onChange: this.onValueChanged,
|
|
67
|
+
onClick: this.onInputClick,
|
|
68
|
+
placeholder: (0, _lang.getLocale)('Search_option')
|
|
69
|
+
})
|
|
70
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
71
|
+
className: "link-options-container",
|
|
72
|
+
children: [options.length > 0 && options.map((option, index) => {
|
|
73
|
+
let isSelect = selectedOptions.some(selectedOption => {
|
|
74
|
+
return selectedOption.id === option.id;
|
|
75
|
+
});
|
|
76
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
77
|
+
className: "link-option-item",
|
|
78
|
+
onClick: this.onOptionItemToggle.bind(this, option),
|
|
79
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
80
|
+
className: "option-info",
|
|
81
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
82
|
+
className: "option-name",
|
|
83
|
+
title: option.name,
|
|
84
|
+
children: option.name
|
|
85
|
+
})
|
|
86
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
87
|
+
className: "option-checked",
|
|
88
|
+
children: isSelect && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
89
|
+
className: "dtable-font dtable-icon-check-mark"
|
|
90
|
+
})
|
|
91
|
+
})]
|
|
92
|
+
}, index);
|
|
93
|
+
}), options.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
94
|
+
className: "link-option-null",
|
|
95
|
+
children: (0, _lang.getLocale)('No_options_available')
|
|
96
|
+
})]
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
91
99
|
}
|
|
92
100
|
}
|
|
93
101
|
PCLinkEditorPopover.defaultProps = {
|
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _dtableUtils = require("dtable-utils");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
// link value is get form parant's interface
|
|
12
13
|
class LinkFormatter extends _react.default.Component {
|
|
13
14
|
constructor(props) {
|
|
@@ -54,14 +55,15 @@ class LinkFormatter extends _react.default.Component {
|
|
|
54
55
|
display_column_key: displayColumnKey
|
|
55
56
|
} = column.data;
|
|
56
57
|
let displayValue = this.getDisplayValue(linkedTable, row, displayColumnKey);
|
|
57
|
-
return /*#__PURE__*/
|
|
58
|
-
key: index,
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
59
59
|
className: "link-item",
|
|
60
|
-
onClick: this.expandLinkedTableRow.bind(this, row)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
onClick: this.expandLinkedTableRow.bind(this, row),
|
|
61
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
62
|
+
className: "link-name",
|
|
63
|
+
title: displayValue,
|
|
64
|
+
children: displayValue
|
|
65
|
+
})
|
|
66
|
+
}, index);
|
|
65
67
|
});
|
|
66
68
|
return result;
|
|
67
69
|
}
|
|
@@ -114,9 +116,10 @@ class LinkFormatter extends _react.default.Component {
|
|
|
114
116
|
} = this.props;
|
|
115
117
|
const classname = (0, _classnames.default)('dtable-ui cell-formatter-container link-formatter', containerClassName);
|
|
116
118
|
let displayValues = this.getDisplayValues();
|
|
117
|
-
return /*#__PURE__*/
|
|
118
|
-
className: classname
|
|
119
|
-
|
|
119
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
120
|
+
className: classname,
|
|
121
|
+
children: displayValues
|
|
122
|
+
});
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
125
|
LinkFormatter.defaultProps = {
|
package/lib/Loading/index.js
CHANGED
|
@@ -7,8 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = Loading;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
require("./index.css");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
function Loading() {
|
|
11
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
12
13
|
className: "loading-icon loading-tip"
|
|
13
14
|
});
|
|
14
15
|
}
|
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _HtmlLongTextFormatter = _interopRequireDefault(require("../HtmlLongTextFormatter"));
|
|
10
10
|
var _SimpleLongTextFormatter = _interopRequireDefault(require("../SimpleLongTextFormatter"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function LongTextFormatter(props) {
|
|
12
13
|
const {
|
|
13
14
|
isSample,
|
|
@@ -15,12 +16,12 @@ function LongTextFormatter(props) {
|
|
|
15
16
|
containerClassName
|
|
16
17
|
} = props;
|
|
17
18
|
if (isSample) {
|
|
18
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SimpleLongTextFormatter.default, {
|
|
19
20
|
value: value,
|
|
20
21
|
containerClassName: containerClassName
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_HtmlLongTextFormatter.default, {
|
|
24
25
|
value: value,
|
|
25
26
|
containerClassName: containerClassName
|
|
26
27
|
});
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
10
|
class MBEditorHeader extends _react.default.Component {
|
|
10
11
|
render() {
|
|
11
12
|
let {
|
|
@@ -16,20 +17,24 @@ class MBEditorHeader extends _react.default.Component {
|
|
|
16
17
|
onLeftClick,
|
|
17
18
|
onRightClick
|
|
18
19
|
} = this.props;
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
-
className: "dtable-ui-mb-editor-header ".concat(titleClass ? titleClass : '')
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21
|
+
className: "dtable-ui-mb-editor-header ".concat(titleClass ? titleClass : ''),
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
23
|
+
className: "editor-header-left-content",
|
|
24
|
+
onClick: onLeftClick,
|
|
25
|
+
children: leftContent
|
|
26
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
27
|
+
className: "editor-header-title",
|
|
28
|
+
children: title
|
|
29
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
30
|
+
className: "editor-header-right-content",
|
|
31
|
+
onClick: onRightClick,
|
|
32
|
+
style: {
|
|
33
|
+
color: '#f09f3f'
|
|
34
|
+
},
|
|
35
|
+
children: rightContent
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
var _default = exports.default = MBEditorHeader;
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
class MTimeFormatter extends _react.default.Component {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
@@ -25,9 +26,10 @@ class MTimeFormatter extends _react.default.Component {
|
|
|
25
26
|
if (date) {
|
|
26
27
|
date = this.formatDate(date);
|
|
27
28
|
}
|
|
28
|
-
return /*#__PURE__*/
|
|
29
|
-
className: classname
|
|
30
|
-
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
|
+
className: classname,
|
|
31
|
+
children: date
|
|
32
|
+
});
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
MTimeFormatter.defaultProps = {
|
|
@@ -12,6 +12,7 @@ var _lang = require("../lang");
|
|
|
12
12
|
var _EditEditorButton = _interopRequireDefault(require("../EditEditorButton"));
|
|
13
13
|
var _selectEditor = require("../select-editor");
|
|
14
14
|
require("./index.css");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
class MultipleSelectEditor extends _react.default.Component {
|
|
16
17
|
constructor(props) {
|
|
17
18
|
super(props);
|
|
@@ -141,44 +142,49 @@ class MultipleSelectEditor extends _react.default.Component {
|
|
|
141
142
|
} = this.state;
|
|
142
143
|
let options = this.options;
|
|
143
144
|
let selectedOptions = this.getFormattedOptions();
|
|
144
|
-
return /*#__PURE__*/
|
|
145
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
145
146
|
ref: this.setEditorContainerRef,
|
|
146
|
-
className: "cell-editor dtable-ui-multiple-select-editor"
|
|
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
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
147
|
+
className: "cell-editor dtable-ui-multiple-select-editor",
|
|
148
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
149
|
+
ref: this.setEditorRef,
|
|
150
|
+
className: "dtable-ui-select-editor-container",
|
|
151
|
+
onClick: this.onAddOptionToggle,
|
|
152
|
+
children: [selectedOptions.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_EditEditorButton.default, {
|
|
153
|
+
text: (0, _lang.getLocale)('Add_an_option')
|
|
154
|
+
}), selectedOptions.length !== 0 && selectedOptions.map(option => {
|
|
155
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectEditor.SelectEditorOption, {
|
|
156
|
+
option: option,
|
|
157
|
+
isShowRemoveIcon: true,
|
|
158
|
+
onDeleteSelectOption: this.onDeleteOption
|
|
159
|
+
}, option.id);
|
|
160
|
+
})]
|
|
161
|
+
}), isPopoverShow && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
162
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
163
|
+
query: "(min-width: 768px)",
|
|
164
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectEditor.PCSelectEditorPopover, {
|
|
165
|
+
popoverPosition: popoverPosition,
|
|
166
|
+
options: options,
|
|
167
|
+
selectedOptions: selectedOptions,
|
|
168
|
+
onOptionItemToggle: this.onOptionItemToggle,
|
|
169
|
+
isSupportNewOption: this.props.isSupportNewOption,
|
|
170
|
+
onAddNewOption: this.onAddNewOption
|
|
171
|
+
})
|
|
172
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
173
|
+
query: "(max-width: 767.8px)",
|
|
174
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectEditor.MBSelectEditorPopover, {
|
|
175
|
+
isReadOnly: this.props.isReadOnly,
|
|
176
|
+
value: this.state.newValue,
|
|
177
|
+
column: this.props.column,
|
|
178
|
+
options: options,
|
|
179
|
+
onOptionItemToggle: this.onOptionItemToggle,
|
|
180
|
+
isShowRemoveIcon: true,
|
|
181
|
+
isSupportNewOption: this.props.isSupportNewOption,
|
|
182
|
+
onAddNewOption: this.onAddNewOption,
|
|
183
|
+
onClosePopover: this.onClosePopover
|
|
184
|
+
})
|
|
185
|
+
})]
|
|
186
|
+
})]
|
|
187
|
+
});
|
|
182
188
|
}
|
|
183
189
|
}
|
|
184
190
|
MultipleSelectEditor.defaultProps = {
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _SelectItem = _interopRequireDefault(require("../SelectItem"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
@@ -21,10 +22,9 @@ class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
|
21
22
|
let selectedOptions = options.filter(option => value.includes(option.id) || value.includes(option.name));
|
|
22
23
|
if (selectedOptions.length === 0) return [];
|
|
23
24
|
return selectedOptions.map(option => {
|
|
24
|
-
return /*#__PURE__*/
|
|
25
|
-
key: "multiple-".concat(option.id),
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectItem.default, {
|
|
26
26
|
option: option
|
|
27
|
-
});
|
|
27
|
+
}, "multiple-".concat(option.id));
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -35,14 +35,15 @@ class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
|
35
35
|
} = this.props;
|
|
36
36
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container multiple-select-formatter', containerClassName);
|
|
37
37
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
38
|
-
return /*#__PURE__*/
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
39
39
|
className: classname
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
let options = this.getOptions();
|
|
43
|
-
return /*#__PURE__*/
|
|
44
|
-
className: classname
|
|
45
|
-
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
44
|
+
className: classname,
|
|
45
|
+
children: options
|
|
46
|
+
});
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
MultipleSelectFormatter.defaultProps = {
|