dtable-ui-component 6.0.126 → 7.0.0-xia.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ActionSheet/index.js +16 -14
- package/lib/ActivityIndicator/index.js +8 -7
- package/lib/AsyncUserSelect/index.js +19 -40
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +11 -9
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +3 -1
- package/lib/CheckboxEditor/mb-editor.js +20 -9
- package/lib/CheckboxEditor/pc-editor.js +24 -12
- package/lib/CheckboxFormatter/index.js +5 -4
- package/lib/CollaboratorEditor/index.js +4 -2
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +34 -25
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +7 -9
- package/lib/Comment/body/comment.js +18 -10
- package/lib/Comment/body/index.js +4 -2
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +20 -9
- package/lib/Comment/footer/input/index.js +50 -29
- package/lib/Comment/footer/input/participant/index.js +5 -4
- package/lib/Comment/footer/participants/index.js +5 -4
- package/lib/Comment/footer/participants/participant/index.js +3 -1
- package/lib/Comment/footer/participants/participant-select/index.js +24 -8
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +21 -15
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +18 -22
- package/lib/DTableColorPicker/index.js +40 -55
- package/lib/DTableColorPicker/utils.js +6 -4
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +8 -6
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeCollaboratorSelect/index.js +20 -17
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +18 -16
- package/lib/DTableDropdownMenu/index.js +10 -8
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +50 -34
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +113 -63
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -8
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +13 -16
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +15 -18
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +14 -8
- package/lib/DTableFiltersPopover/widgets/filter-group.js +56 -35
- package/lib/DTableFiltersPopover/widgets/filter-item.js +171 -108
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +161 -136
- package/lib/DTableFiltersPopover/widgets/rate-item.js +20 -15
- package/lib/DTableGroupSelect/index.js +15 -11
- package/lib/DTableGroupSelect/select-option-group.js +32 -23
- package/lib/DTableIcon/index.js +7 -6
- package/lib/DTableIcon/svg-icon.js +7 -5
- package/lib/DTableModalHeader/index.css +3 -20
- package/lib/DTableModalHeader/index.js +3 -1
- package/lib/DTablePopover/index.js +15 -11
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +17 -8
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +5 -6
- package/lib/DTableSelect/index.js +22 -21
- package/lib/DTableSelect/utils.js +15 -7
- package/lib/DTableSubDropdownMenu/index.js +10 -8
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +8 -7
- package/lib/DateEditor/index.js +15 -20
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +45 -26
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +3 -1
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +23 -25
- package/lib/DepartmentSelectFilter/index.js +8 -6
- package/lib/DepartmentSingleSelectEditor/index.js +3 -1
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +47 -48
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +58 -36
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +3 -1
- package/lib/DigitalSignEditor/mb-editor/index.js +20 -12
- package/lib/DigitalSignEditor/pc-editor/index.js +24 -17
- package/lib/DigitalSignEditor/service.js +4 -2
- package/lib/DigitalSignEditor/signature-board/index.js +8 -5
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +5 -4
- package/lib/DurationEditor/index.js +31 -21
- package/lib/DurationFormatter/index.js +5 -4
- package/lib/EditEditorButton/index.js +3 -1
- package/lib/EmailFormatter/index.js +4 -3
- package/lib/FieldDisplaySetting/field-item.js +12 -12
- package/lib/FieldDisplaySetting/index.js +10 -12
- package/lib/FileEditor/files-previewer/index.js +3 -1
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +18 -10
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +21 -14
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +3 -1
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +3 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +25 -11
- package/lib/FileEditor/pc-editor/index.js +27 -19
- package/lib/FileFormatter/index.js +19 -26
- package/lib/FileItemFormatter/index.js +9 -6
- package/lib/FileUploader/index.js +45 -28
- package/lib/FormulaFormatter/index.js +29 -15
- package/lib/GeolocationEditor/index.js +12 -11
- package/lib/GeolocationEditor/map-editor-utils.js +15 -17
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +6 -4
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +68 -41
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
- package/lib/GeolocationEditor/pc-editor/country-editor.js +23 -10
- package/lib/GeolocationEditor/pc-editor/index.js +20 -12
- package/lib/GeolocationEditor/pc-editor/location-editor.js +31 -26
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +54 -34
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +60 -36
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +62 -35
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +65 -36
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +25 -19
- package/lib/GeolocationEditor/pc-editor/province-editor.js +13 -6
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +7 -6
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +12 -4
- package/lib/Icon/index.js +5 -3
- package/lib/IconButton/index.js +6 -4
- package/lib/ImageEditor/images-previewer/image-preview/index.js +21 -12
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +3 -1
- package/lib/ImageEditor/mb-editor/index.js +20 -28
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +3 -1
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +21 -7
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +13 -11
- package/lib/ImagePreviewerLightbox/index.js +13 -15
- package/lib/ImageThumbnail/index.js +13 -10
- package/lib/InputItem/custom-input.js +46 -26
- package/lib/InputItem/custom-keyboard.js +18 -15
- package/lib/InputItem/index.js +50 -34
- package/lib/InputItem/input.js +4 -2
- package/lib/LastModifierFormatter/index.js +8 -6
- package/lib/LinkEditor/index.js +53 -33
- package/lib/LinkEditor/link-editor-option.js +4 -3
- package/lib/LinkEditor/mb-popover/index.js +22 -9
- package/lib/LinkEditor/pc-popover/index.js +10 -5
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +8 -6
- package/lib/List/list-item.js +28 -22
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +8 -7
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +5 -3
- package/lib/MobileFullScreenPage/header/index.js +6 -4
- package/lib/MobileFullScreenPage/index.js +11 -13
- package/lib/MobileModal/index.js +3 -1
- package/lib/MobileOperationSheet/index.js +8 -7
- package/lib/MobileSelector/empty/index.js +3 -1
- package/lib/MobileSelector/index.js +7 -5
- package/lib/MobileSelector/option/index.js +5 -3
- package/lib/MobileSelector/options/index.js +3 -1
- package/lib/MobileSelector/search/index.js +5 -3
- package/lib/MobileUpload/index.js +5 -4
- package/lib/Modal/modal.js +15 -14
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +3 -1
- package/lib/MultipleSelectFormatter/index.js +8 -6
- package/lib/NotificationPopover/index.js +5 -4
- package/lib/NumberEditor/index.js +21 -12
- package/lib/NumberFormatter/index.js +5 -4
- package/lib/PhoneNumberLink/index.js +4 -2
- package/lib/Picker/AbstractPicker.js +27 -23
- package/lib/Popover/index.js +4 -3
- package/lib/Popover/item.js +9 -7
- package/lib/Progress/index.js +8 -9
- package/lib/Radio/Radio.js +8 -4
- package/lib/Radio/RadioItem.js +12 -8
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.js +17 -18
- package/lib/RowExpandDialog/body/index.js +49 -32
- package/lib/RowExpandDialog/column-content/index.js +9 -5
- package/lib/RowExpandDialog/header/index.js +8 -6
- package/lib/RowExpandDialog/index.js +34 -49
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
- package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
- package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
- package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
- package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +34 -20
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +35 -21
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +19 -9
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +24 -13
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +25 -15
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +23 -13
- package/lib/RowExpandEditor/index.js +8 -4
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +19 -11
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +33 -22
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
- package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +25 -12
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +36 -20
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +28 -17
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +34 -22
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +13 -5
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +18 -9
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
- package/lib/RowExpandFormatter/email-formatter/index.js +7 -4
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +12 -10
- package/lib/RowExpandFormatter/formula-formatter/index.js +34 -19
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +8 -7
- package/lib/RowExpandFormatter/index.js +41 -27
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +14 -8
- package/lib/RowExpandFormatter/link-formatter/index.js +19 -11
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +12 -11
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +7 -4
- package/lib/RowExpandView/body/index.js +35 -22
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +30 -42
- package/lib/SelectItem/index.js +8 -6
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +9 -7
- package/lib/SimpleLongTextFormatter/index.js +16 -10
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
- package/lib/SingleSelectEditor/index.js +3 -1
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +16 -14
- package/lib/TabBar/index.js +21 -18
- package/lib/Tabs/index.js +3 -1
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +26 -19
- package/lib/Toast/index.js +4 -3
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +3 -1
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +42 -27
- package/lib/toaster/alert.js +7 -6
- package/lib/toaster/toast.js +3 -2
- package/lib/toaster/toastManager.js +4 -2
- package/lib/utils/cell.js +11 -8
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +3 -1
- package/lib/utils/url.js +31 -24
- package/lib/utils/utils.js +6 -2
- package/package.json +1 -1
|
@@ -18,9 +18,10 @@ class DTablePopover extends _react.default.Component {
|
|
|
18
18
|
this.props.hideDTablePopover(e);
|
|
19
19
|
};
|
|
20
20
|
this.onKeyDown = e => {
|
|
21
|
-
const
|
|
22
|
-
canHideDTablePopover
|
|
23
|
-
hideDTablePopoverWithEsc
|
|
21
|
+
const {
|
|
22
|
+
canHideDTablePopover,
|
|
23
|
+
hideDTablePopoverWithEsc
|
|
24
|
+
} = this.props;
|
|
24
25
|
if (e.keyCode === 27 && typeof hideDTablePopoverWithEsc === 'function') {
|
|
25
26
|
e.preventDefault();
|
|
26
27
|
hideDTablePopoverWithEsc();
|
|
@@ -31,7 +32,9 @@ class DTablePopover extends _react.default.Component {
|
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
34
|
this.onMousedown = e => {
|
|
34
|
-
const
|
|
35
|
+
const {
|
|
36
|
+
canHideDTablePopover
|
|
37
|
+
} = this.props;
|
|
35
38
|
if (!canHideDTablePopover) return;
|
|
36
39
|
if (this.dtablePopoverRef && e && (0, _utils.getEventClassName)(e).indexOf('popover') === -1 && !this.dtablePopoverRef.contains(e.target)) {
|
|
37
40
|
this.props.hideDTablePopover(e);
|
|
@@ -52,13 +55,14 @@ class DTablePopover extends _react.default.Component {
|
|
|
52
55
|
window.removeEventListener('popstate', this.onHistoryState);
|
|
53
56
|
}
|
|
54
57
|
render() {
|
|
55
|
-
const
|
|
56
|
-
target
|
|
57
|
-
innerClassName
|
|
58
|
-
popoverClassName
|
|
59
|
-
hideArrow
|
|
60
|
-
modifiers
|
|
61
|
-
placement
|
|
58
|
+
const {
|
|
59
|
+
target,
|
|
60
|
+
innerClassName,
|
|
61
|
+
popoverClassName,
|
|
62
|
+
hideArrow,
|
|
63
|
+
modifiers,
|
|
64
|
+
placement
|
|
65
|
+
} = this.props;
|
|
62
66
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
|
|
63
67
|
placement: placement,
|
|
64
68
|
isOpen: true,
|
package/lib/DTableRadio/index.js
CHANGED
|
@@ -10,16 +10,15 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
require("./index.css");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function DTableRadio(_ref) {
|
|
13
|
-
let
|
|
14
|
-
disabled =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
label = _ref.label;
|
|
13
|
+
let {
|
|
14
|
+
disabled = false,
|
|
15
|
+
name = 'dtable-radio-input',
|
|
16
|
+
onCheckedChange = () => {},
|
|
17
|
+
className,
|
|
18
|
+
isChecked,
|
|
19
|
+
value,
|
|
20
|
+
label
|
|
21
|
+
} = _ref;
|
|
23
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
|
24
23
|
className: (0, _classnames.default)('dtable-radio w-100 align-items-center position-relative', {
|
|
25
24
|
'dtable-radio-disable': disabled,
|
|
@@ -28,7 +28,9 @@ class DTableRadioGroup extends _react.default.Component {
|
|
|
28
28
|
this.setTransitionTimer = null;
|
|
29
29
|
};
|
|
30
30
|
this.onSelectChanged = event => {
|
|
31
|
-
const
|
|
31
|
+
const {
|
|
32
|
+
option
|
|
33
|
+
} = event.target.dataset;
|
|
32
34
|
if (option === this.state.activeOption) return;
|
|
33
35
|
this.setState({
|
|
34
36
|
activeOption: option
|
|
@@ -43,13 +45,17 @@ class DTableRadioGroup extends _react.default.Component {
|
|
|
43
45
|
this.setTransitionTimer = null;
|
|
44
46
|
}
|
|
45
47
|
componentDidMount() {
|
|
46
|
-
const
|
|
48
|
+
const {
|
|
49
|
+
options
|
|
50
|
+
} = this.props;
|
|
47
51
|
if (!this.btn || !this.slider || !Array.isArray(options)) return;
|
|
48
52
|
this.slider.style.width = "".concat(100 / options.length, "%");
|
|
49
53
|
this.setSliderTransition();
|
|
50
54
|
}
|
|
51
55
|
componentDidUpdate(prevProps) {
|
|
52
|
-
const
|
|
56
|
+
const {
|
|
57
|
+
activeOption
|
|
58
|
+
} = this.props;
|
|
53
59
|
if (activeOption !== prevProps.activeOption && activeOption !== this.state.activeOption) {
|
|
54
60
|
this.setState({
|
|
55
61
|
activeOption
|
|
@@ -60,11 +66,14 @@ class DTableRadioGroup extends _react.default.Component {
|
|
|
60
66
|
this.clearTransitionTimer();
|
|
61
67
|
}
|
|
62
68
|
render() {
|
|
63
|
-
const
|
|
64
|
-
options
|
|
65
|
-
optionsDisplay
|
|
66
|
-
readOnly
|
|
67
|
-
|
|
69
|
+
const {
|
|
70
|
+
options,
|
|
71
|
+
optionsDisplay,
|
|
72
|
+
readOnly
|
|
73
|
+
} = this.props;
|
|
74
|
+
const {
|
|
75
|
+
activeOption
|
|
76
|
+
} = this.state;
|
|
68
77
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
69
78
|
className: "radio-group-wrapper",
|
|
70
79
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -18,9 +18,10 @@ class DtableSearchInput extends _react.Component {
|
|
|
18
18
|
};
|
|
19
19
|
this.onChange = e => {
|
|
20
20
|
this.timer && clearTimeout(this.timer);
|
|
21
|
-
const
|
|
22
|
-
onChange
|
|
23
|
-
wait
|
|
21
|
+
const {
|
|
22
|
+
onChange,
|
|
23
|
+
wait
|
|
24
|
+
} = this.props;
|
|
24
25
|
let text = e.target.value;
|
|
25
26
|
this.setState({
|
|
26
27
|
searchValue: text || ''
|
|
@@ -36,7 +37,9 @@ class DtableSearchInput extends _react.Component {
|
|
|
36
37
|
this.onChange(e);
|
|
37
38
|
};
|
|
38
39
|
this.clearSearch = () => {
|
|
39
|
-
const
|
|
40
|
+
const {
|
|
41
|
+
clearValue
|
|
42
|
+
} = this.props;
|
|
40
43
|
this.setState({
|
|
41
44
|
searchValue: ''
|
|
42
45
|
}, () => {
|
|
@@ -52,14 +55,18 @@ class DtableSearchInput extends _react.Component {
|
|
|
52
55
|
}
|
|
53
56
|
};
|
|
54
57
|
this.renderClear = () => {
|
|
55
|
-
const
|
|
56
|
-
isClearable
|
|
57
|
-
clearClassName
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const
|
|
58
|
+
const {
|
|
59
|
+
isClearable,
|
|
60
|
+
clearClassName,
|
|
61
|
+
components = {}
|
|
62
|
+
} = this.props;
|
|
63
|
+
const {
|
|
64
|
+
searchValue
|
|
65
|
+
} = this.state;
|
|
61
66
|
if (!isClearable || !searchValue) return null;
|
|
62
|
-
const
|
|
67
|
+
const {
|
|
68
|
+
ClearIndicator
|
|
69
|
+
} = components;
|
|
63
70
|
if (/*#__PURE__*/_react.default.isValidElement(ClearIndicator)) {
|
|
64
71
|
return /*#__PURE__*/_react.default.cloneElement(ClearIndicator, {
|
|
65
72
|
clearValue: this.clearSearch
|
|
@@ -95,14 +102,17 @@ class DtableSearchInput extends _react.Component {
|
|
|
95
102
|
this.inputRef = null;
|
|
96
103
|
}
|
|
97
104
|
render() {
|
|
98
|
-
const
|
|
99
|
-
placeholder
|
|
100
|
-
autoFocus
|
|
101
|
-
className
|
|
102
|
-
onKeyDown
|
|
103
|
-
disabled
|
|
104
|
-
style
|
|
105
|
-
|
|
105
|
+
const {
|
|
106
|
+
placeholder,
|
|
107
|
+
autoFocus,
|
|
108
|
+
className,
|
|
109
|
+
onKeyDown,
|
|
110
|
+
disabled,
|
|
111
|
+
style
|
|
112
|
+
} = this.props;
|
|
113
|
+
const {
|
|
114
|
+
searchValue
|
|
115
|
+
} = this.state;
|
|
106
116
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
107
117
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
108
118
|
ref: ref => this.inputRef = ref,
|
|
@@ -9,12 +9,11 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
require("./dtable-select-label.css");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
function DTableSelectLabel(_ref) {
|
|
12
|
-
let
|
|
13
|
-
classname =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
isSelect = _ref$isSelect === void 0 ? false : _ref$isSelect;
|
|
12
|
+
let {
|
|
13
|
+
classname = '',
|
|
14
|
+
name = '',
|
|
15
|
+
isSelect = false
|
|
16
|
+
} = _ref;
|
|
18
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
19
18
|
className: "".concat(classname, " w-100 d-flex justify-content-between"),
|
|
20
19
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -12,27 +12,28 @@ var _utils = require("./utils");
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
class DTableSelect extends _react.default.Component {
|
|
14
14
|
render() {
|
|
15
|
-
const
|
|
16
|
-
options
|
|
17
|
-
onChange
|
|
18
|
-
value
|
|
19
|
-
isSearchable
|
|
20
|
-
placeholder
|
|
21
|
-
isMulti
|
|
22
|
-
menuPosition
|
|
23
|
-
isClearable
|
|
24
|
-
noOptionsMessage
|
|
25
|
-
classNamePrefix
|
|
26
|
-
style
|
|
27
|
-
innerRef
|
|
28
|
-
isDisabled
|
|
29
|
-
form
|
|
30
|
-
customFilterOption
|
|
31
|
-
autoFocus
|
|
32
|
-
className
|
|
33
|
-
closeMenuOnSelect
|
|
34
|
-
onMenuClose
|
|
35
|
-
userComponents
|
|
15
|
+
const {
|
|
16
|
+
options,
|
|
17
|
+
onChange,
|
|
18
|
+
value,
|
|
19
|
+
isSearchable,
|
|
20
|
+
placeholder,
|
|
21
|
+
isMulti,
|
|
22
|
+
menuPosition,
|
|
23
|
+
isClearable,
|
|
24
|
+
noOptionsMessage,
|
|
25
|
+
classNamePrefix,
|
|
26
|
+
style,
|
|
27
|
+
innerRef,
|
|
28
|
+
isDisabled,
|
|
29
|
+
form,
|
|
30
|
+
customFilterOption,
|
|
31
|
+
autoFocus,
|
|
32
|
+
className,
|
|
33
|
+
closeMenuOnSelect,
|
|
34
|
+
onMenuClose,
|
|
35
|
+
components: userComponents
|
|
36
|
+
} = this.props;
|
|
36
37
|
const mergedComponents = (0, _objectSpread2.default)({
|
|
37
38
|
Option: _utils.Option,
|
|
38
39
|
DropdownIndicator: _utils.DropdownIndicator,
|
|
@@ -25,8 +25,10 @@ const noneCallback = () => ({
|
|
|
25
25
|
display: 'none'
|
|
26
26
|
});
|
|
27
27
|
const controlCallback = (provided, state) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const {
|
|
29
|
+
isDisabled,
|
|
30
|
+
isFocused
|
|
31
|
+
} = state;
|
|
30
32
|
if (isFocused && !isDisabled) {
|
|
31
33
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), FOCUS_CONTROL_STYLE), {}, {
|
|
32
34
|
'&:hover': (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), FOCUS_CONTROL_STYLE)
|
|
@@ -42,8 +44,10 @@ const controlCallback = (provided, state) => {
|
|
|
42
44
|
};
|
|
43
45
|
const UserSelectStyle = exports.UserSelectStyle = {
|
|
44
46
|
option: (provided, state) => {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
+
const {
|
|
48
|
+
isDisabled,
|
|
49
|
+
isFocused
|
|
50
|
+
} = state;
|
|
47
51
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
|
|
48
52
|
cursor: isDisabled ? 'default' : 'pointer',
|
|
49
53
|
backgroundColor: isFocused ? '#f5f5f5' : '#fff'
|
|
@@ -91,8 +95,10 @@ const UserSelectStyle = exports.UserSelectStyle = {
|
|
|
91
95
|
};
|
|
92
96
|
const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
93
97
|
option: (provided, state) => {
|
|
94
|
-
const
|
|
95
|
-
|
|
98
|
+
const {
|
|
99
|
+
isDisabled,
|
|
100
|
+
isFocused
|
|
101
|
+
} = state;
|
|
96
102
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
|
|
97
103
|
fontSize: '13px',
|
|
98
104
|
color: '#212529',
|
|
@@ -128,7 +134,9 @@ const DropdownIndicator = props => {
|
|
|
128
134
|
};
|
|
129
135
|
exports.DropdownIndicator = DropdownIndicator;
|
|
130
136
|
const ClearIndicator = _ref => {
|
|
131
|
-
let
|
|
137
|
+
let {
|
|
138
|
+
innerProps
|
|
139
|
+
} = _ref,
|
|
132
140
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
133
141
|
const onMouseDown = e => {
|
|
134
142
|
e.nativeEvent.stopImmediatePropagation();
|
|
@@ -10,14 +10,16 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
var _DTableDropdownMenu = _interopRequireDefault(require("../DTableDropdownMenu"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
const DTableSubDropdownMenu = _ref => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
let {
|
|
14
|
+
id,
|
|
15
|
+
className,
|
|
16
|
+
container,
|
|
17
|
+
modifiers,
|
|
18
|
+
flip,
|
|
19
|
+
style,
|
|
20
|
+
menuProps,
|
|
21
|
+
children
|
|
22
|
+
} = _ref;
|
|
21
23
|
let customMenuProps = (0, _objectSpread2.default)({}, menuProps);
|
|
22
24
|
if (container) {
|
|
23
25
|
customMenuProps.container = container;
|
|
@@ -12,18 +12,18 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
12
12
|
var _lang = require("../lang");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
const DTableSubDropdownToggle = _ref => {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
hideArrow =
|
|
22
|
-
title
|
|
23
|
-
ariaLabel
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
let {
|
|
16
|
+
className,
|
|
17
|
+
id,
|
|
18
|
+
text,
|
|
19
|
+
icon,
|
|
20
|
+
disabled,
|
|
21
|
+
hideArrow = false,
|
|
22
|
+
title,
|
|
23
|
+
ariaLabel,
|
|
24
|
+
ariaExpanded = false,
|
|
25
|
+
toggleProps
|
|
26
|
+
} = _ref;
|
|
27
27
|
const renderedIcon = () => {
|
|
28
28
|
if (!icon || ! /*#__PURE__*/_react.default.isValidElement(icon)) return null;
|
|
29
29
|
return /*#__PURE__*/_react.default.cloneElement(icon, {
|
|
@@ -11,18 +11,17 @@ var _dtableUtils = require("dtable-utils");
|
|
|
11
11
|
require("./index.css");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
function DTableSwitch(_ref) {
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
checked =
|
|
17
|
-
placeholder
|
|
18
|
-
disabled
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
inputId = _ref.inputId;
|
|
14
|
+
let {
|
|
15
|
+
onChange,
|
|
16
|
+
checked = false,
|
|
17
|
+
placeholder,
|
|
18
|
+
disabled,
|
|
19
|
+
size = 'sm',
|
|
20
|
+
switchPosition = 'right',
|
|
21
|
+
switchClassName,
|
|
22
|
+
innerClassName,
|
|
23
|
+
inputId
|
|
24
|
+
} = _ref;
|
|
26
25
|
const switchNode = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
27
26
|
className: "custom-switch-indicator"
|
|
28
27
|
});
|
|
@@ -11,13 +11,14 @@ var _reactstrap = require("reactstrap");
|
|
|
11
11
|
require("./index.css");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
const DTableToolTip = _ref => {
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
placement =
|
|
17
|
-
className
|
|
18
|
-
children
|
|
19
|
-
shortcut
|
|
20
|
-
modifiers
|
|
14
|
+
let {
|
|
15
|
+
target,
|
|
16
|
+
placement = 'bottom',
|
|
17
|
+
className,
|
|
18
|
+
children,
|
|
19
|
+
shortcut,
|
|
20
|
+
modifiers
|
|
21
|
+
} = _ref;
|
|
21
22
|
const hasShortcut = Boolean(shortcut);
|
|
22
23
|
const renderContent = () => {
|
|
23
24
|
if (hasShortcut) {
|
package/lib/DateEditor/index.js
CHANGED
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
11
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
13
12
|
var _dtableUtils = require("dtable-utils");
|
|
@@ -19,25 +18,21 @@ require("dayjs/locale/en-gb");
|
|
|
19
18
|
require("./index.css");
|
|
20
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
20
|
const DateEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const _useState3 = (0, _react.useState)(oldValue || ''),
|
|
38
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
39
|
-
value = _useState4[0],
|
|
40
|
-
setValue = _useState4[1];
|
|
21
|
+
let {
|
|
22
|
+
isMobile,
|
|
23
|
+
lang,
|
|
24
|
+
isReadOnly,
|
|
25
|
+
column,
|
|
26
|
+
className,
|
|
27
|
+
isInModal,
|
|
28
|
+
firstDayOfWeek,
|
|
29
|
+
size,
|
|
30
|
+
value: oldValue,
|
|
31
|
+
hideCalendar,
|
|
32
|
+
onCommit
|
|
33
|
+
} = _ref;
|
|
34
|
+
const [isDateInit, setDateInit] = (0, _react.useState)(false);
|
|
35
|
+
const [value, setValue] = (0, _react.useState)(oldValue || '');
|
|
41
36
|
const format = (0, _react.useMemo)(() => {
|
|
42
37
|
var _column$data;
|
|
43
38
|
return (column === null || column === void 0 ? void 0 : column.data) && (column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.format) || _dtableUtils.DEFAULT_DATE_FORMAT;
|
|
@@ -20,8 +20,10 @@ require("@seafile/seafile-calendar/assets/index.css");
|
|
|
20
20
|
require("./index.css");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
let now = (0, _dayjs.default)();
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const {
|
|
24
|
+
Header,
|
|
25
|
+
Body
|
|
26
|
+
} = _MobileFullScreenPage.default;
|
|
25
27
|
class MBDateEditor extends _react.default.PureComponent {
|
|
26
28
|
constructor(props) {
|
|
27
29
|
super(props);
|
|
@@ -67,11 +69,14 @@ class MBDateEditor extends _react.default.PureComponent {
|
|
|
67
69
|
});
|
|
68
70
|
};
|
|
69
71
|
this.renderCalender = () => {
|
|
70
|
-
const
|
|
71
|
-
lang
|
|
72
|
-
className
|
|
73
|
-
firstDayOfWeek
|
|
74
|
-
|
|
72
|
+
const {
|
|
73
|
+
lang,
|
|
74
|
+
className,
|
|
75
|
+
firstDayOfWeek
|
|
76
|
+
} = this.props;
|
|
77
|
+
const {
|
|
78
|
+
time
|
|
79
|
+
} = this.state;
|
|
75
80
|
const calendar = /*#__PURE__*/(0, _jsxRuntime.jsx)(_seafileCalendar.default, {
|
|
76
81
|
className: (0, _classnames.default)('dtable-rc-calendar', className),
|
|
77
82
|
locale: (0, _editorUtils.initDateEditorLanguage)(lang),
|
|
@@ -97,7 +102,9 @@ class MBDateEditor extends _react.default.PureComponent {
|
|
|
97
102
|
width: '100%'
|
|
98
103
|
},
|
|
99
104
|
children: _ref => {
|
|
100
|
-
let
|
|
105
|
+
let {
|
|
106
|
+
time
|
|
107
|
+
} = _ref;
|
|
101
108
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
102
109
|
tabIndex: "0",
|
|
103
110
|
onFocus: this.onReadOnlyFocus,
|
|
@@ -117,8 +124,10 @@ class MBDateEditor extends _react.default.PureComponent {
|
|
|
117
124
|
}
|
|
118
125
|
});
|
|
119
126
|
};
|
|
120
|
-
const
|
|
121
|
-
|
|
127
|
+
const {
|
|
128
|
+
dateFormat,
|
|
129
|
+
showHourAndMinute
|
|
130
|
+
} = props;
|
|
122
131
|
this.state = {
|
|
123
132
|
time: null
|
|
124
133
|
};
|
|
@@ -128,9 +137,10 @@ class MBDateEditor extends _react.default.PureComponent {
|
|
|
128
137
|
this.format = showHourAndMinute ? 'YYYY-MM-DD HH:mm' : 'YYYY-MM-DD';
|
|
129
138
|
}
|
|
130
139
|
componentDidMount() {
|
|
131
|
-
let
|
|
132
|
-
value
|
|
133
|
-
lang
|
|
140
|
+
let {
|
|
141
|
+
value,
|
|
142
|
+
lang
|
|
143
|
+
} = this.props;
|
|
134
144
|
const iszhcn = lang === 'zh-cn';
|
|
135
145
|
if (iszhcn) {
|
|
136
146
|
now = now.locale('zh-cn');
|
|
@@ -146,11 +156,14 @@ class MBDateEditor extends _react.default.PureComponent {
|
|
|
146
156
|
});
|
|
147
157
|
}
|
|
148
158
|
render() {
|
|
149
|
-
const
|
|
150
|
-
lang
|
|
151
|
-
column
|
|
152
|
-
showHourAndMinute
|
|
153
|
-
|
|
159
|
+
const {
|
|
160
|
+
lang,
|
|
161
|
+
column,
|
|
162
|
+
showHourAndMinute
|
|
163
|
+
} = this.props;
|
|
164
|
+
const {
|
|
165
|
+
time
|
|
166
|
+
} = this.state;
|
|
154
167
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MobileFullScreenPage.default, {
|
|
155
168
|
className: "dtable-ui-mobile-date-editor",
|
|
156
169
|
onClose: this.props.onClose,
|