dtable-ui-component 6.0.29-beta2 → 6.0.29-beta4
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/BodyPortal/index.js +29 -0
- package/lib/CheckboxEditor/index.js +24 -118
- package/lib/CheckboxEditor/mb-editor.js +101 -0
- package/lib/CheckboxEditor/pc-editor.js +118 -0
- package/lib/CheckboxFormatter/index.css +1 -1
- package/lib/CheckboxFormatter/index.js +10 -25
- package/lib/CollaboratorEditor/index.js +23 -11
- package/lib/CollaboratorEditor/mb-editor/index.css +41 -0
- package/lib/CollaboratorEditor/mb-editor/index.js +88 -0
- package/lib/DTableCommonAddTool/index.js +1 -3
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +6 -6
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +6 -6
- package/lib/DateEditor/index.js +69 -95
- package/lib/DateEditor/mb-editor/custom-rc-calendar.css +118 -0
- package/lib/DateEditor/mb-editor/index.css +39 -0
- package/lib/DateEditor/mb-editor/index.js +215 -0
- package/lib/DateEditor/{pc-date-editor-popover.js → pc-editor.js} +9 -9
- package/lib/{Department-editor/department-multiple-select → DepartmentMultipleSelectEditor}/index.js +6 -6
- package/lib/DepartmentSingleSelectEditor/index.js +34 -0
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.css +4 -0
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +230 -0
- package/lib/{Department-editor → DepartmentSingleSelectEditor/pc-editor}/department-single-select.js +6 -6
- package/lib/{Department-editor → DepartmentSingleSelectEditor/pc-editor}/index.css +8 -3
- package/lib/{Department-editor → DepartmentSingleSelectEditor/pc-editor}/index.js +8 -25
- package/lib/DigitalSignEditor/index.js +24 -171
- package/lib/DigitalSignEditor/mb-editor/index.css +35 -0
- package/lib/DigitalSignEditor/mb-editor/index.js +144 -0
- package/lib/DigitalSignEditor/pc-editor/index.js +181 -0
- package/lib/FileEditor/files-previewer/index.js +26 -268
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +122 -0
- package/lib/FileEditor/files-previewer/mb-previewer/index.css +39 -0
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +64 -0
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/dropdown-menu.js +1 -1
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/file-name-editor/index.js +1 -1
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/index.css +0 -2
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/index.js +2 -2
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +276 -0
- package/lib/FileEditor/index.css +0 -5
- package/lib/FileEditor/index.js +26 -265
- package/lib/FileEditor/mb-editor/index.css +10 -0
- package/lib/FileEditor/mb-editor/index.js +136 -0
- package/lib/FileEditor/pc-editor/addition-previewer/index.css +1 -0
- package/lib/FileEditor/{addition-previewer → pc-editor/addition-previewer}/index.js +1 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.css +1 -0
- package/lib/FileEditor/{addition-previewer → pc-editor/addition-previewer}/local-file-addition/index.js +4 -4
- package/lib/FileEditor/pc-editor/index.css +5 -0
- package/lib/FileEditor/pc-editor/index.js +274 -0
- package/lib/FormulaFormatter/index.css +5 -5
- package/lib/GeolocationEditor/index.js +90 -230
- package/lib/GeolocationEditor/map-editor-utils.js +6 -2
- package/lib/GeolocationEditor/mb-editor/country-editor.js +79 -0
- package/lib/GeolocationEditor/mb-editor/index.css +11 -0
- package/lib/GeolocationEditor/mb-editor/index.js +125 -0
- package/lib/GeolocationEditor/mb-editor/location-editor.js +101 -0
- package/lib/GeolocationEditor/mb-editor/map-editor/index.css +11 -0
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +474 -0
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.css +158 -0
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +530 -0
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +77 -0
- package/lib/GeolocationEditor/mb-editor/province-editor.js +76 -0
- package/lib/GeolocationEditor/{country-editor.js → pc-editor/country-editor.js} +5 -50
- package/lib/GeolocationEditor/{index.css → pc-editor/index.css} +3 -4
- package/lib/GeolocationEditor/pc-editor/index.js +247 -0
- package/lib/GeolocationEditor/{location-editor.js → pc-editor/location-editor.js} +8 -41
- package/lib/GeolocationEditor/{map-editor → pc-editor/map-editor}/index.js +6 -6
- package/lib/GeolocationEditor/{map-editor → pc-editor/map-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/{map-selection-editor → pc-editor/map-selection-editor}/index.js +7 -7
- package/lib/GeolocationEditor/{map-selection-editor → pc-editor/map-selection-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/{province-city-editor.js → pc-editor/province-city-editor.js} +7 -38
- package/lib/GeolocationEditor/{province-editor.js → pc-editor/province-editor.js} +7 -31
- package/lib/GeolocationEditor/{selector-header-item.js → pc-editor/selector-header-item.js} +1 -1
- package/lib/ImageEditor/images-previewer/image-preview/index.js +3 -3
- package/lib/ImageEditor/images-previewer/index.js +9 -4
- package/lib/ImageEditor/index.css +17 -16
- package/lib/ImageEditor/index.js +26 -185
- package/lib/ImageEditor/mb-editor/index.css +29 -0
- package/lib/ImageEditor/mb-editor/index.js +136 -0
- package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/image-link/index.js +1 -1
- package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/index.js +1 -1
- package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/local-image-addition/index.js +4 -4
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +140 -0
- package/lib/ImageEditor/pc-editor/index.css +24 -0
- package/lib/ImageEditor/pc-editor/index.js +194 -0
- package/lib/ImageThumbnail/index.js +2 -1
- package/lib/LinkEditor/index.js +5 -5
- package/lib/LinkEditor/{mb-link-editor-popover → mb-popover}/index.css +1 -1
- package/lib/MobileFullScreenPage/body/index.css +9 -0
- package/lib/MobileFullScreenPage/body/index.js +23 -0
- package/lib/MobileFullScreenPage/header/index.css +39 -0
- package/lib/MobileFullScreenPage/header/index.js +38 -0
- package/lib/MobileFullScreenPage/index.css +13 -0
- package/lib/MobileFullScreenPage/index.js +81 -0
- package/lib/MobileModal/index.js +41 -0
- package/lib/MobileOperationSheet/index.css +27 -0
- package/lib/MobileOperationSheet/index.js +92 -0
- package/lib/MobileSelector/empty/index.css +3 -0
- package/lib/MobileSelector/empty/index.js +23 -0
- package/lib/MobileSelector/index.css +32 -0
- package/lib/MobileSelector/index.js +57 -0
- package/lib/MobileSelector/option/index.css +28 -0
- package/lib/MobileSelector/option/index.js +36 -0
- package/lib/MobileSelector/options/index.css +8 -0
- package/lib/MobileSelector/options/index.js +18 -0
- package/lib/MobileSelector/search/index.css +7 -0
- package/lib/MobileSelector/search/index.js +26 -0
- package/lib/MobileUpload/index.css +1 -0
- package/lib/MobileUpload/index.js +160 -0
- package/lib/MultipleSelectEditor/index.js +9 -14
- package/lib/RowExpand/index.js +24 -0
- package/lib/RowExpand/mb-expand/body/index.css +173 -0
- package/lib/RowExpand/mb-expand/body/index.js +111 -0
- package/lib/RowExpand/mb-expand/column-content/index.css +27 -0
- package/lib/RowExpand/mb-expand/column-content/index.js +25 -0
- package/lib/RowExpand/mb-expand/index.css +0 -0
- package/lib/RowExpand/mb-expand/index.js +178 -0
- package/lib/{RowExpandDialog → RowExpand/pc-expand}/body/index.js +4 -4
- package/lib/{RowExpandDialog → RowExpand/pc-expand}/column-content/index.js +2 -2
- package/lib/{RowExpandDialog → RowExpand/pc-expand}/header/index.js +3 -3
- package/lib/{RowExpandDialog → RowExpand/pc-expand}/index.js +8 -6
- package/lib/RowExpandEditor/add-btn/index.js +24 -0
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.css +3 -0
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +19 -0
- package/lib/RowExpandEditor/{RowExpandAddBtn → add-btn/pc-add-btn}/index.js +6 -4
- package/lib/RowExpandEditor/checkbox-editor/index.js +25 -0
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.css +6 -0
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +39 -0
- package/lib/RowExpandEditor/{RowExpandCheckboxEditor/index.js → checkbox-editor/pc-editor.js} +2 -3
- package/lib/RowExpandEditor/collaborator-editor/index.js +24 -0
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.css +9 -0
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +163 -0
- package/lib/RowExpandEditor/{RowExpandCollaboratorEditor → collaborator-editor/pc-editor}/index.css +1 -1
- package/lib/RowExpandEditor/{RowExpandCollaboratorEditor → collaborator-editor/pc-editor}/index.js +6 -7
- package/lib/RowExpandEditor/constants.js +34 -34
- package/lib/RowExpandEditor/date-editor/index.js +24 -0
- package/lib/RowExpandEditor/date-editor/mb-editor.js +82 -0
- package/lib/RowExpandEditor/{RowExpandDateEditor/index.js → date-editor/pc-editor.js} +2 -2
- package/lib/RowExpandEditor/department-editor/index.js +24 -0
- package/lib/RowExpandEditor/department-editor/mb-editor.js +65 -0
- package/lib/RowExpandEditor/{RowExpandDepartmentEditor/index.js → department-editor/pc-editor.js} +11 -14
- package/lib/RowExpandEditor/digital-sign-editor/index.js +24 -0
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.css +1 -0
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +130 -0
- package/lib/RowExpandEditor/{RowExpandDigitalSignEditor → digital-sign-editor/pc-editor}/index.css +1 -1
- package/lib/RowExpandEditor/{RowExpandDigitalSignEditor → digital-sign-editor/pc-editor}/index.js +11 -11
- package/lib/RowExpandEditor/duration-editor/index.js +24 -0
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +71 -0
- package/lib/RowExpandEditor/{RowExpandDurationEditor/index.js → duration-editor/pc-editor.js} +2 -2
- package/lib/RowExpandEditor/email-editor/index.js +24 -0
- package/lib/RowExpandEditor/email-editor/mb-editor/index.css +1 -0
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +84 -0
- package/lib/RowExpandEditor/email-editor/pc-editor/index.css +1 -0
- package/lib/RowExpandEditor/{RowExpandEmailEditor → email-editor/pc-editor}/index.js +3 -3
- package/lib/RowExpandEditor/file-editor/index.js +24 -0
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +114 -0
- package/lib/RowExpandEditor/file-editor/pc-editor/index.css +1 -0
- package/lib/RowExpandEditor/{RowExpandFileEditor → file-editor/pc-editor}/index.js +9 -9
- package/lib/RowExpandEditor/geolocation-editor/index.js +24 -0
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +100 -0
- package/lib/RowExpandEditor/{RowExpandGeolocationEditor → geolocation-editor/pc-editor}/index.js +10 -11
- package/lib/RowExpandEditor/image-editor/index.js +24 -0
- package/lib/RowExpandEditor/image-editor/mb-editor/index.css +30 -0
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +109 -0
- package/lib/RowExpandEditor/{RowExpandImageEditor → image-editor/pc-editor}/index.js +9 -9
- package/lib/RowExpandEditor/long-text-editor/index.js +24 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.css +10 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +80 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.css +3 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +91 -0
- package/lib/RowExpandEditor/{RowExpandLongTextEditor → long-text-editor/pc-editor}/index.js +7 -7
- package/lib/RowExpandEditor/multiple-select-editor/index.js +24 -0
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +154 -0
- package/lib/RowExpandEditor/{RowExpandMultipleSelectEditor → multiple-select-editor/pc-editor}/index.css +1 -1
- package/lib/RowExpandEditor/{RowExpandMultipleSelectEditor → multiple-select-editor/pc-editor}/index.js +6 -6
- package/lib/RowExpandEditor/number-editor/index.js +24 -0
- package/lib/RowExpandEditor/number-editor/mb-editor/index.css +3 -0
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +76 -0
- package/lib/RowExpandEditor/{RowExpandNumberEditor/index.js → number-editor/pc-editor.js} +2 -2
- package/lib/RowExpandEditor/rate-editor/index.css +34 -0
- package/lib/RowExpandEditor/rate-editor/index.js +25 -0
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +92 -0
- package/lib/RowExpandEditor/{RowExpandRateEditor/index.js → rate-editor/pc-editor.js} +2 -3
- package/lib/RowExpandEditor/right-angle/index.css +6 -0
- package/lib/RowExpandEditor/right-angle/index.js +17 -0
- package/lib/RowExpandEditor/single-select-editor/index.js +24 -0
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.css +8 -0
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +134 -0
- package/lib/RowExpandEditor/{RowExpandSingleSelectorEditor → single-select-editor/pc-editor}/index.js +17 -17
- package/lib/RowExpandEditor/text-editor/index.js +24 -0
- package/lib/RowExpandEditor/text-editor/mb-editor/index.css +14 -0
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +37 -0
- package/lib/RowExpandEditor/{RowExpandTextEditor → text-editor/pc-editor}/index.js +7 -7
- package/lib/RowExpandEditor/url-editor/index.js +24 -0
- package/lib/RowExpandEditor/url-editor/mb-editor/index.css +17 -0
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +87 -0
- package/lib/RowExpandEditor/{RowExpandUrlEditor → url-editor/pc-editor}/index.js +6 -6
- package/lib/RowExpandFormatter/constants.js +17 -17
- package/lib/RowExpandFormatter/department-formatter/index.js +19 -0
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +20 -0
- package/lib/RowExpandFormatter/{RowExpandDepartmentFormatter/index.js → department-formatter/pc-formatter.js} +2 -2
- package/lib/RowExpandFormatter/{RowExpandEmailFormatter → email-formatter}/index.css +4 -4
- package/lib/RowExpandFormatter/index.css +33 -18
- package/lib/RowExpandFormatter/index.js +1 -1
- package/lib/RowExpandFormatter/rate-formatter/index.css +5 -0
- package/lib/SelectItem/index.js +57 -33
- package/lib/{Department-editor/selected-departments → SelectedDepartments}/index.css +0 -1
- package/lib/{Department-editor/selected-departments → SelectedDepartments}/index.js +3 -3
- package/lib/SingleSelectEditor/index.js +9 -14
- package/lib/SvgIcon/index.js +15 -20
- package/lib/constants/index.js +3 -2
- package/lib/css/mb-cell-editor.css +1 -1
- package/lib/index.js +71 -8
- package/lib/locales/de.json +3 -1
- package/lib/locales/en.json +3 -1
- package/lib/locales/es.json +3 -1
- package/lib/locales/fr.json +3 -1
- package/lib/locales/pt.json +3 -1
- package/lib/locales/ru.json +3 -1
- package/lib/locales/zh-CN.json +3 -1
- package/lib/select-editor/index.js +27 -20
- package/lib/select-editor/mb-editor/index.css +1 -0
- package/lib/select-editor/mb-editor/index.js +105 -0
- package/lib/select-editor/{pc-select-editor → pc-editor}/index.css +1 -1
- package/lib/select-editor/{pc-select-editor → pc-editor}/index.js +7 -7
- package/lib/utils/editor-utils.js +6 -2
- package/lib/utils/get-event-transfer.js +2 -1
- package/lib/utils/utils.js +11 -2
- package/package.json +2 -2
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.css +0 -85
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.js +0 -148
- package/lib/DateEditor/mb-date-editor-popover/custom-rc-calendar.css +0 -118
- package/lib/DateEditor/mb-date-editor-popover/index.css +0 -45
- package/lib/DateEditor/mb-date-editor-popover/index.js +0 -226
- package/lib/FileEditor/addition-previewer/index.css +0 -1
- package/lib/FileEditor/addition-previewer/local-file-addition/index.css +0 -1
- package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +0 -2
- package/lib/RowExpandEditor/RowExpandFileEditor/index.css +0 -1
- package/lib/RowExpandEditor/RowExpandRateEditor/index.css +0 -13
- package/lib/RowExpandFormatter/RowExpandRateFormatter/index.css +0 -5
- package/lib/assets/icons/check.svg +0 -12
- package/lib/assets/icons/cross.svg +0 -13
- package/lib/assets/icons/dot.svg +0 -9
- package/lib/select-editor/mb-select-editor/index.css +0 -127
- package/lib/select-editor/mb-select-editor/index.js +0 -197
- package/lib/select-editor/select-editor-option.js +0 -84
- /package/lib/CollaboratorEditor/{pc-collaborator-editor → pc-editor}/index.css +0 -0
- /package/lib/CollaboratorEditor/{pc-collaborator-editor → pc-editor}/index.js +0 -0
- /package/lib/{Department-editor/department-multiple-select → DepartmentMultipleSelectEditor}/index.css +0 -0
- /package/lib/DigitalSignEditor/{index.css → pc-editor/index.css} +0 -0
- /package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/file-name-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{map-editor → pc-editor/map-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{map-selection-editor → pc-editor/map-selection-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{parse-geolocation.js → pc-editor/parse-geolocation.js} +0 -0
- /package/lib/GeolocationEditor/{selector-list.js → pc-editor/selector-list.js} +0 -0
- /package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/image-link/index.css +0 -0
- /package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/index.css +0 -0
- /package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/local-image-addition/index.css +0 -0
- /package/lib/LinkEditor/{mb-link-editor-popover → mb-popover}/index.js +0 -0
- /package/lib/LinkEditor/{pc-link-editor-popover → pc-popover}/index.css +0 -0
- /package/lib/LinkEditor/{pc-link-editor-popover → pc-popover}/index.js +0 -0
- /package/lib/{RowExpandDialog → RowExpand/pc-expand}/body/index.css +0 -0
- /package/lib/{RowExpandDialog → RowExpand/pc-expand}/column-content/index.css +0 -0
- /package/lib/{RowExpandDialog → RowExpand/pc-expand}/header/index.css +0 -0
- /package/lib/{RowExpandDialog → RowExpand/pc-expand}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandAddBtn → add-btn/pc-add-btn}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandCheckboxEditor → checkbox-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandGeolocationEditor → geolocation-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandImageEditor → image-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandLongTextEditor → long-text-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandSingleSelectorEditor → single-select-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandTextEditor → text-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandUrlEditor → url-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandEmailFormatter → email-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFileFormatter → file-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFileFormatter → file-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFileFormatter → file-formatter}/row-expand-file-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFormulaFormatter → formula-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandImageFormatter → image-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandImageFormatter → image-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandImageFormatter → image-formatter}/row-expand-image-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/collaborator-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/value-display-utils.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandRateFormatter → rate-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandUrlFormatter → url-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandUrlFormatter → url-formatter}/index.js +0 -0
- /package/lib/{Department-editor/constants.js → constants/departments.js} +0 -0
- /package/lib/{Department-editor/utils.js → utils/departments.js} +0 -0
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _datePicker = _interopRequireDefault(require("antd-mobile/lib/date-picker"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
-
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
13
|
-
var _seafileCalendar = _interopRequireDefault(require("@seafile/seafile-calendar"));
|
|
14
|
-
var SeaDatePicker = _interopRequireWildcard(require("@seafile/seafile-calendar/lib/Picker"));
|
|
15
|
-
var _lang = require("../../lang");
|
|
16
|
-
var _editorUtils = require("../../utils/editor-utils");
|
|
17
|
-
var _MBEditorHeader = _interopRequireDefault(require("../../MBEditorHeader"));
|
|
18
|
-
require("@seafile/seafile-calendar/assets/index.css");
|
|
19
|
-
require("./index.css");
|
|
20
|
-
class DateEditorPopover extends _react.default.PureComponent {
|
|
21
|
-
constructor(props) {
|
|
22
|
-
super(props);
|
|
23
|
-
this.handleHistaryBack = e => {
|
|
24
|
-
e.preventDefault();
|
|
25
|
-
this.closePopover();
|
|
26
|
-
};
|
|
27
|
-
this.handleDateChange = date => {
|
|
28
|
-
let {
|
|
29
|
-
dateFormat,
|
|
30
|
-
showHourAndMinute
|
|
31
|
-
} = this.props;
|
|
32
|
-
let newValue = (0, _dayjs.default)(date);
|
|
33
|
-
if (showHourAndMinute) {
|
|
34
|
-
const {
|
|
35
|
-
datePickerValue
|
|
36
|
-
} = this.state;
|
|
37
|
-
const HM = datePickerValue.format('HH:mm');
|
|
38
|
-
const format = dateFormat.split(' ')[0]; // 'YYYY-MM-DD HH:mm'
|
|
39
|
-
const newDate = (0, _dayjs.default)(date).format(format) + ' ' + HM;
|
|
40
|
-
newValue = (0, _dayjs.default)(newDate);
|
|
41
|
-
}
|
|
42
|
-
this.setState({
|
|
43
|
-
datePickerValue: (0, _dayjs.default)(date)
|
|
44
|
-
});
|
|
45
|
-
this.props.onValueChanged(newValue.format(dateFormat));
|
|
46
|
-
};
|
|
47
|
-
this.handleTimeChange = time => {
|
|
48
|
-
const {
|
|
49
|
-
datePickerValue
|
|
50
|
-
} = this.state;
|
|
51
|
-
const {
|
|
52
|
-
dateFormat
|
|
53
|
-
} = this.props;
|
|
54
|
-
const format = dateFormat.split(' ')[0]; // 'YYYY-MM-DD HH:mm'
|
|
55
|
-
const YMD = datePickerValue.format(format);
|
|
56
|
-
const newDate = YMD + ' ' + (0, _dayjs.default)(time).format('HH:mm');
|
|
57
|
-
const newValue = (0, _dayjs.default)(newDate);
|
|
58
|
-
this.setState({
|
|
59
|
-
datePickerValue: newValue
|
|
60
|
-
});
|
|
61
|
-
this.props.onValueChanged(datePickerValue.format(dateFormat));
|
|
62
|
-
};
|
|
63
|
-
this.closePopover = () => {
|
|
64
|
-
this.props.onClosePopover();
|
|
65
|
-
};
|
|
66
|
-
this.deleteDate = () => {
|
|
67
|
-
this.props.onValueChanged('');
|
|
68
|
-
this.closePopover();
|
|
69
|
-
};
|
|
70
|
-
this.onChange = value => {
|
|
71
|
-
if (!value) return;
|
|
72
|
-
let {
|
|
73
|
-
dateFormat
|
|
74
|
-
} = this.props;
|
|
75
|
-
this.setState({
|
|
76
|
-
datePickerValue: value
|
|
77
|
-
});
|
|
78
|
-
this.props.onValueChanged(value.format(dateFormat));
|
|
79
|
-
};
|
|
80
|
-
this.onContainerClick = event => {
|
|
81
|
-
if (this.editorPopover && this.editorPopover.contains(event.target)) {
|
|
82
|
-
event.stopPropagation();
|
|
83
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
this.setEditorPopover = editorPopover => {
|
|
88
|
-
this.editorPopover = editorPopover;
|
|
89
|
-
};
|
|
90
|
-
this.getCalendarContainer = () => {
|
|
91
|
-
return this.calendarContainerRef.current;
|
|
92
|
-
};
|
|
93
|
-
this.getCalender = () => {
|
|
94
|
-
let {
|
|
95
|
-
dateFormat,
|
|
96
|
-
lang,
|
|
97
|
-
className,
|
|
98
|
-
firstDayOfWeek
|
|
99
|
-
} = this.props;
|
|
100
|
-
let defaultValue = (0, _dayjs.default)().clone();
|
|
101
|
-
return /*#__PURE__*/_react.default.createElement(_seafileCalendar.default, {
|
|
102
|
-
className: (0, _classnames.default)('dtable-rc-calendar', className),
|
|
103
|
-
locale: (0, _editorUtils.initDateEditorLanguage)(lang),
|
|
104
|
-
format: dateFormat,
|
|
105
|
-
defaultValue: defaultValue,
|
|
106
|
-
dateInputPlaceholder: (0, _lang.getLocale)('Please_input'),
|
|
107
|
-
showDateInput: false,
|
|
108
|
-
focusablePanel: false,
|
|
109
|
-
showToday: false,
|
|
110
|
-
showTime: false,
|
|
111
|
-
style: {
|
|
112
|
-
width: '100%',
|
|
113
|
-
fontSize: '14px'
|
|
114
|
-
},
|
|
115
|
-
firstDayOfWeek: firstDayOfWeek
|
|
116
|
-
});
|
|
117
|
-
};
|
|
118
|
-
this.renderDataPicker = () => {
|
|
119
|
-
let {
|
|
120
|
-
dateFormat
|
|
121
|
-
} = this.props;
|
|
122
|
-
let {
|
|
123
|
-
datePickerValue
|
|
124
|
-
} = this.state;
|
|
125
|
-
let calendar = this.getCalender();
|
|
126
|
-
return /*#__PURE__*/_react.default.createElement(SeaDatePicker, {
|
|
127
|
-
open: true,
|
|
128
|
-
style: {
|
|
129
|
-
width: '100%'
|
|
130
|
-
},
|
|
131
|
-
calendar: calendar,
|
|
132
|
-
value: datePickerValue,
|
|
133
|
-
getCalendarContainer: this.getCalendarContainer,
|
|
134
|
-
onChange: this.onChange
|
|
135
|
-
}, _ref => {
|
|
136
|
-
let {
|
|
137
|
-
value
|
|
138
|
-
} = _ref;
|
|
139
|
-
value = value && value.format(dateFormat);
|
|
140
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
-
tabIndex: "0",
|
|
142
|
-
onFocus: this.onReadOnlyFocus
|
|
143
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
144
|
-
placeholder: (0, _lang.getLocale)('Please_select'),
|
|
145
|
-
readOnly: true,
|
|
146
|
-
tabIndex: "-1",
|
|
147
|
-
className: "form-control",
|
|
148
|
-
value: value || ''
|
|
149
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
-
ref: this.calendarContainerRef,
|
|
151
|
-
style: {
|
|
152
|
-
height: '22rem'
|
|
153
|
-
}
|
|
154
|
-
}));
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
this.state = {
|
|
158
|
-
open: true,
|
|
159
|
-
datePickerValue: props.value ? (0, _dayjs.default)(props.value) : (0, _dayjs.default)().clone()
|
|
160
|
-
};
|
|
161
|
-
this.calendarContainerRef = /*#__PURE__*/_react.default.createRef();
|
|
162
|
-
}
|
|
163
|
-
componentDidMount() {
|
|
164
|
-
history.pushState(null, null, '#'); // eslint-disable-line
|
|
165
|
-
window.addEventListener('popstate', this.handleHistaryBack, false);
|
|
166
|
-
}
|
|
167
|
-
componentWillUnmount() {
|
|
168
|
-
window.removeEventListener('popstate', this.handleHistaryBack, false);
|
|
169
|
-
}
|
|
170
|
-
render() {
|
|
171
|
-
const {
|
|
172
|
-
lang,
|
|
173
|
-
column,
|
|
174
|
-
dateFormat,
|
|
175
|
-
showHourAndMinute
|
|
176
|
-
} = this.props;
|
|
177
|
-
const leftFormat = dateFormat.split(' ')[0];
|
|
178
|
-
const rightFormat = dateFormat.split(' ')[1];
|
|
179
|
-
const {
|
|
180
|
-
datePickerValue
|
|
181
|
-
} = this.state;
|
|
182
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
183
|
-
ref: this.setEditorPopover,
|
|
184
|
-
className: "dtable-ui-mb-editor-popover mb-date-editor-popover",
|
|
185
|
-
onClick: this.onContainerClick
|
|
186
|
-
}, /*#__PURE__*/_react.default.createElement(_MBEditorHeader.default, {
|
|
187
|
-
title: column.name,
|
|
188
|
-
leftContent: /*#__PURE__*/_react.default.createElement("i", {
|
|
189
|
-
className: "dtable-font dtable-icon-return"
|
|
190
|
-
}),
|
|
191
|
-
rightContent: /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Done')),
|
|
192
|
-
onLeftClick: this.props.onClosePopover,
|
|
193
|
-
onRightClick: this.props.onClosePopover
|
|
194
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
195
|
-
className: "dtable-ui-mb-editor-body dtable-ui-mb-date-editor-body"
|
|
196
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
197
|
-
className: "mb-date-editor-input"
|
|
198
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
199
|
-
className: "date-input"
|
|
200
|
-
}, /*#__PURE__*/_react.default.createElement(_datePicker.default, {
|
|
201
|
-
mode: "date",
|
|
202
|
-
locale: (0, _editorUtils.initDateEditorLanguage)(lang),
|
|
203
|
-
value: this.state.value,
|
|
204
|
-
onChange: this.handleDateChange
|
|
205
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
206
|
-
className: "date-input-day"
|
|
207
|
-
}, datePickerValue && datePickerValue.format(leftFormat)))), showHourAndMinute && /*#__PURE__*/_react.default.createElement("div", {
|
|
208
|
-
className: "date-input"
|
|
209
|
-
}, /*#__PURE__*/_react.default.createElement(_datePicker.default, {
|
|
210
|
-
mode: "time",
|
|
211
|
-
locale: (0, _editorUtils.initDateEditorLanguage)(lang),
|
|
212
|
-
value: this.state.value,
|
|
213
|
-
onChange: this.handleTimeChange
|
|
214
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
215
|
-
className: "date-input-day"
|
|
216
|
-
}, datePickerValue && datePickerValue.format(rightFormat))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
217
|
-
className: "dtable-ui mb-date-editor-picker"
|
|
218
|
-
}, this.renderDataPicker()), /*#__PURE__*/_react.default.createElement("div", {
|
|
219
|
-
className: "mb-date-editor-clear"
|
|
220
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
221
|
-
onClick: this.deleteDate,
|
|
222
|
-
className: "clear-date"
|
|
223
|
-
}, (0, _lang.getLocale)('Clear')))));
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
var _default = exports.default = DateEditorPopover;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import url('../../ImageEditor/addition-previewer/index.css');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import url('../../../ImageEditor/addition-previewer/local-image-addition/index.css');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import url('../RowExpandImageEditor/index.css');
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
.dtable-ui.dtable-ui-row-expand-rate-editor {
|
|
2
|
-
display: flex;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.dtable-ui.dtable-ui-row-expand-rate-editor > div {
|
|
6
|
-
padding-right: 5px;
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
line-height: 1.5;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.dtable-ui.dtable-ui-row-expand-rate-editor .rate-item-active {
|
|
12
|
-
opacity: 1 !important;
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
-
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
-
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
|
|
5
|
-
<title>check</title>
|
|
6
|
-
<g id="check">
|
|
7
|
-
<g id="路径" transform="translate(0.020249, 4.178564)">
|
|
8
|
-
<path d="M27.9,0.7L12,18.1L4.1,8.9C3.2,7.9,1.8,7.6,0.7,8.6c-1,0.8-0.9,2.5,0,3.6c6.5,7.3,9.8,11,9.8,11
|
|
9
|
-
c1,0.9,1.9,1,2.8,0l17.9-19c1-1,1-2.5,0.2-3.4C30.4-0.4,28.8-0.2,27.9,0.7z"/>
|
|
10
|
-
</g>
|
|
11
|
-
</g>
|
|
12
|
-
</svg>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
-
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
-
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
|
|
5
|
-
<title>x-check-box</title>
|
|
6
|
-
<g id="x-check-box">
|
|
7
|
-
<g id="fork-number">
|
|
8
|
-
<path id="路径" d="M18.8,16l8.5-8.5c0.8-0.8,0.8-2.1,0-2.8s-2.1-0.8-2.8,0L16,13.2L7.5,4.6c-0.8-0.8-2.1-0.8-2.8,0
|
|
9
|
-
s-0.8,2.1,0,2.8l8.5,8.5l-8.5,8.5c-0.8,0.8-0.8,2.1,0,2.8c0.8,0.7,2.1,0.8,2.8,0l8.5-8.5l8.5,8.5c0.8,0.8,2.1,0.8,2.8,0
|
|
10
|
-
c0.8-0.8,0.8-2.1,0-2.8l0,0L18.8,16z"/>
|
|
11
|
-
</g>
|
|
12
|
-
</g>
|
|
13
|
-
</svg>
|
package/lib/assets/icons/dot.svg
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
-
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
-
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
|
|
5
|
-
<title>dot</title>
|
|
6
|
-
<g id="dot">
|
|
7
|
-
<circle id="椭圆形" cx="16" cy="16" r="9"/>
|
|
8
|
-
</g>
|
|
9
|
-
</svg>
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
@import url('../../css/mb-cell-editor.css');
|
|
2
|
-
|
|
3
|
-
@media screen and (max-width: 767.8px) {
|
|
4
|
-
.dtable-ui-mb-select-editor-body .mb-selected-item {
|
|
5
|
-
margin-top: 10px;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.dtable-ui-mb-select-editor-body .mb-selected-item .title {
|
|
11
|
-
padding: 6px 16px;
|
|
12
|
-
border-bottom: 1px solid #e9e9e9;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.dtable-ui-mb-select-editor-body .mb-selected-item .content {
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-wrap: wrap;
|
|
18
|
-
align-items: center;
|
|
19
|
-
min-height: 50px;
|
|
20
|
-
padding: 8px 16px;
|
|
21
|
-
border-bottom: 1px solid #e9e9e9;
|
|
22
|
-
overflow: auto;
|
|
23
|
-
background-color: #fff;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.dtable-ui-mb-select-editor-body .mb-selected-item .content .select-option-item {
|
|
27
|
-
margin: 3px 10px 3px 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.dtable-ui-mb-select-editor-body .mb-search-select-items {
|
|
31
|
-
padding: 8px 16px;
|
|
32
|
-
margin-top: 20px;
|
|
33
|
-
border-top: 1px solid #e9e9e9;
|
|
34
|
-
border-bottom: 1px solid #e9e9e9;
|
|
35
|
-
background-color: #fff;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.dtable-ui-mb-select-editor-body .mb-search-select-items > input {
|
|
39
|
-
outline: none;
|
|
40
|
-
height: 30px;
|
|
41
|
-
padding: 0;
|
|
42
|
-
line-height: 30px;
|
|
43
|
-
border: none;
|
|
44
|
-
}
|
|
45
|
-
.dtable-ui-mb-select-editor-body .mb-search-select-items > input:focus,
|
|
46
|
-
.dtable-ui-mb-select-editor-body .mb-search-select-items > input:active {
|
|
47
|
-
outline: none;
|
|
48
|
-
box-shadow: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.dtable-ui-mb-select-editor-body .mb-select-options-container {
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
margin-top: 10px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.dtable-ui-mb-select-editor-body .mb-select-options-container .title {
|
|
58
|
-
padding: 6px 16px;
|
|
59
|
-
border-bottom: 1px solid #e9e9e9;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.dtable-ui-mb-select-editor-body .mb-select-options-container .content {
|
|
63
|
-
display: flex;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
border-bottom: 1px solid #e9e9e9;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.dtable-ui-mb-select-editor-body .mb-select-options-container .search-result-none {
|
|
69
|
-
padding: 16px 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.dtable-ui-mb-select-editor-body .mb-select-options-container .mb-select-option-item {
|
|
73
|
-
display: flex;
|
|
74
|
-
align-items: center;
|
|
75
|
-
justify-content: space-between;
|
|
76
|
-
height: 50px;
|
|
77
|
-
padding: 10px 10px 10px 16px;
|
|
78
|
-
font-size: 13px;
|
|
79
|
-
background-color: #fff;
|
|
80
|
-
color: #212529;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.dtable-ui-mb-select-editor-body .mb-select-options-container .mb-select-option-item + .mb-select-option-item {
|
|
84
|
-
border-top: 1px solid #e9e9e9;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.dtable-ui-mb-select-editor-body .mb-select-options-container .mb-select-option-item .item-name {
|
|
88
|
-
display: inline-block;
|
|
89
|
-
padding: 0 10px;
|
|
90
|
-
margin-top: 5px;
|
|
91
|
-
height: 20px;
|
|
92
|
-
line-height: 20px;
|
|
93
|
-
text-align: center;
|
|
94
|
-
text-overflow: ellipsis;
|
|
95
|
-
border-radius: 10px;
|
|
96
|
-
overflow: hidden;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.dtable-ui-mb-select-editor-body .mb-select-options-container .mb-select-option-item .dtable-font {
|
|
100
|
-
font-size: 12px;
|
|
101
|
-
color: #798d99;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.dtable-ui-mb-select-editor-body .mb-create-select-item {
|
|
105
|
-
display: flex;
|
|
106
|
-
align-items: center;
|
|
107
|
-
height: 50px;
|
|
108
|
-
padding: 0 10px;
|
|
109
|
-
margin-top: 20px;
|
|
110
|
-
border-top: 1px solid #dedede;
|
|
111
|
-
border-bottom: 1px solid #e9e9e9;
|
|
112
|
-
background-color: #fff;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.dtable-ui-mb-select-editor-body .mb-create-select-item .dtable-font {
|
|
116
|
-
margin-right: 10px;
|
|
117
|
-
font-size: 12px;
|
|
118
|
-
font-weight: 600px;
|
|
119
|
-
transition: translateY(1px);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.dtable-ui-mb-select-editor-body .mb-create-select-item .dtable-ui-add-new-option {
|
|
123
|
-
font-size: 14px;
|
|
124
|
-
font-weight: 500px;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
}
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _lang = require("../../lang");
|
|
11
|
-
var _selectEditorOption = _interopRequireDefault(require("../select-editor-option"));
|
|
12
|
-
var _MBEditorHeader = _interopRequireDefault(require("../../MBEditorHeader"));
|
|
13
|
-
require("./index.css");
|
|
14
|
-
class MBSelectEditorPopover extends _react.default.Component {
|
|
15
|
-
constructor(props) {
|
|
16
|
-
super(props);
|
|
17
|
-
this.handleHistoryBack = e => {
|
|
18
|
-
e.preventDefault();
|
|
19
|
-
this.props.onClosePopover();
|
|
20
|
-
};
|
|
21
|
-
this.onContainerClick = event => {
|
|
22
|
-
if (this.editorPopover && this.editorPopover.contains(event.target)) {
|
|
23
|
-
event.stopPropagation();
|
|
24
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
this.onChangeSearch = event => {
|
|
29
|
-
let {
|
|
30
|
-
searchVal
|
|
31
|
-
} = this.state;
|
|
32
|
-
if (searchVal === event.target.value) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
searchVal = event.target.value;
|
|
36
|
-
this.setState({
|
|
37
|
-
searchVal
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
this.getSelectedOptions = () => {
|
|
41
|
-
let {
|
|
42
|
-
value,
|
|
43
|
-
options
|
|
44
|
-
} = this.props;
|
|
45
|
-
if (!Array.isArray(value)) {
|
|
46
|
-
return [];
|
|
47
|
-
}
|
|
48
|
-
return options.filter(option => {
|
|
49
|
-
return value.indexOf(option.id) > -1;
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
this.getFilteredOptions = () => {
|
|
53
|
-
let {
|
|
54
|
-
options
|
|
55
|
-
} = this.props;
|
|
56
|
-
let {
|
|
57
|
-
searchVal
|
|
58
|
-
} = this.state;
|
|
59
|
-
return searchVal ? options.filter(item => item.name.indexOf(searchVal) > -1) : options;
|
|
60
|
-
};
|
|
61
|
-
this.onSelectOption = option => {
|
|
62
|
-
this.props.onOptionItemToggle(option);
|
|
63
|
-
};
|
|
64
|
-
this.onAddNewOption = event => {
|
|
65
|
-
event.stopPropagation();
|
|
66
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
67
|
-
let newOption = this.state.searchVal.trim();
|
|
68
|
-
if (newOption) {
|
|
69
|
-
this.props.onAddNewOption(newOption);
|
|
70
|
-
this.props.onClosePopover();
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
this.onRemoveOption = option => {
|
|
74
|
-
this.props.onOptionItemToggle(option);
|
|
75
|
-
};
|
|
76
|
-
this.renderSelectOptions = options => {
|
|
77
|
-
let {
|
|
78
|
-
value
|
|
79
|
-
} = this.props;
|
|
80
|
-
return options.map((option, index) => {
|
|
81
|
-
let isSelect = value.some(item => item === option.id);
|
|
82
|
-
let style = {
|
|
83
|
-
backgroundColor: option.color,
|
|
84
|
-
color: option.textColor || null
|
|
85
|
-
};
|
|
86
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
87
|
-
className: "mb-select-option-item",
|
|
88
|
-
key: index,
|
|
89
|
-
onMouseDown: this.onSelectOption.bind(this, option)
|
|
90
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
91
|
-
className: "mb-select-item"
|
|
92
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
93
|
-
className: "item-name",
|
|
94
|
-
style: style,
|
|
95
|
-
title: option.name
|
|
96
|
-
}, option.name)), /*#__PURE__*/_react.default.createElement("span", {
|
|
97
|
-
className: "mb-item-checked"
|
|
98
|
-
}, isSelect && /*#__PURE__*/_react.default.createElement("i", {
|
|
99
|
-
className: "dtable-font dtable-icon-check-mark"
|
|
100
|
-
})));
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
this.setEditorPopover = editorPopover => {
|
|
104
|
-
this.editorPopover = editorPopover;
|
|
105
|
-
};
|
|
106
|
-
this.state = {
|
|
107
|
-
searchVal: ''
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
componentDidMount() {
|
|
111
|
-
history.pushState(null, null, '#'); // eslint-disable-line
|
|
112
|
-
window.addEventListener('popstate', this.handleHistoryBack, false);
|
|
113
|
-
}
|
|
114
|
-
componentWillUnmount() {
|
|
115
|
-
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
116
|
-
}
|
|
117
|
-
render() {
|
|
118
|
-
const {
|
|
119
|
-
isReadOnly,
|
|
120
|
-
column,
|
|
121
|
-
isSupportNewOption,
|
|
122
|
-
isShowRemoveIcon
|
|
123
|
-
} = this.props;
|
|
124
|
-
const {
|
|
125
|
-
searchVal
|
|
126
|
-
} = this.state;
|
|
127
|
-
const selectedOptions = this.getSelectedOptions();
|
|
128
|
-
const filteredOptions = this.getFilteredOptions();
|
|
129
|
-
let isShowRemoveBtn = !isReadOnly && isShowRemoveIcon;
|
|
130
|
-
let isShowCreateBtn = !isReadOnly && isSupportNewOption && !!searchVal;
|
|
131
|
-
if (isShowCreateBtn) {
|
|
132
|
-
isShowCreateBtn = filteredOptions.length === 0;
|
|
133
|
-
}
|
|
134
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
135
|
-
ref: this.setEditorPopover,
|
|
136
|
-
className: "dtable-ui-mb-editor-popover mb-select-editor-popover",
|
|
137
|
-
style: {
|
|
138
|
-
zIndex: 99
|
|
139
|
-
},
|
|
140
|
-
onClick: this.onContainerClick
|
|
141
|
-
}, /*#__PURE__*/_react.default.createElement(_MBEditorHeader.default, {
|
|
142
|
-
title: column.name,
|
|
143
|
-
leftContent: /*#__PURE__*/_react.default.createElement("i", {
|
|
144
|
-
className: "dtable-font dtable-icon-return"
|
|
145
|
-
}),
|
|
146
|
-
onLeftClick: this.props.onClosePopover
|
|
147
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
148
|
-
className: "dtable-ui-mb-editor-body dtable-ui-mb-select-editor-body"
|
|
149
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
-
className: "mb-selected-item"
|
|
151
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
152
|
-
className: "title"
|
|
153
|
-
}, (0, _lang.getLocale)('Current_option')), /*#__PURE__*/_react.default.createElement("div", {
|
|
154
|
-
className: "content"
|
|
155
|
-
}, selectedOptions.length === 0 && /*#__PURE__*/_react.default.createElement("span", {
|
|
156
|
-
className: "empty-placeholder"
|
|
157
|
-
}, (0, _lang.getLocale)('No_option')), selectedOptions.length > 0 && selectedOptions.map(selectedOption => {
|
|
158
|
-
return /*#__PURE__*/_react.default.createElement(_selectEditorOption.default, {
|
|
159
|
-
key: selectedOption.id,
|
|
160
|
-
option: selectedOption,
|
|
161
|
-
isShowRemoveIcon: isShowRemoveBtn,
|
|
162
|
-
onDeleteSelectOption: this.onRemoveOption
|
|
163
|
-
});
|
|
164
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
165
|
-
className: "mb-search-select-items"
|
|
166
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
167
|
-
className: "form-control",
|
|
168
|
-
type: "text",
|
|
169
|
-
placeholder: (0, _lang.getLocale)('Search_option'),
|
|
170
|
-
value: searchVal,
|
|
171
|
-
onChange: this.onChangeSearch,
|
|
172
|
-
onClick: this.onInputClick
|
|
173
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
174
|
-
className: "mb-select-options-container"
|
|
175
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
176
|
-
className: "title"
|
|
177
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Choose_an_option'))), /*#__PURE__*/_react.default.createElement("div", {
|
|
178
|
-
className: "content"
|
|
179
|
-
}, /*#__PURE__*/_react.default.createElement(_react.Fragment, null, filteredOptions.length === 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
180
|
-
className: "search-result-none"
|
|
181
|
-
}, (0, _lang.getLocale)('No_options_available')), filteredOptions.length > 0 && this.renderSelectOptions(filteredOptions)))), isShowCreateBtn && /*#__PURE__*/_react.default.createElement("div", {
|
|
182
|
-
className: "mb-create-select-item",
|
|
183
|
-
onClick: this.onAddNewOption
|
|
184
|
-
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
185
|
-
className: "dtable-font dtable-icon-add-table"
|
|
186
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
187
|
-
className: "dtable-ui-add-new-option"
|
|
188
|
-
}, "".concat((0, _lang.getLocale)('Add_an_option'), " ").concat(searchVal)))));
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
MBSelectEditorPopover.defaultProps = {
|
|
192
|
-
isReadOnly: false,
|
|
193
|
-
isShowRemoveIcon: false,
|
|
194
|
-
isSupportNewOption: false,
|
|
195
|
-
value: []
|
|
196
|
-
};
|
|
197
|
-
var _default = exports.default = MBSelectEditorPopover;
|