dtable-ui-component 6.0.29-beta2 → 6.0.29-beta3
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 +177 -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 +6 -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
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var _SelectedDepartments = _interopRequireDefault(require("../../../SelectedDepartments"));
|
|
12
|
+
var _DepartmentMultipleSelectEditor = _interopRequireDefault(require("../../../DepartmentMultipleSelectEditor"));
|
|
13
|
+
var _departments = require("../../../constants/departments");
|
|
14
14
|
var _commonHooks = require("../../../hooks/common-hooks");
|
|
15
15
|
var _lang = require("../../../lang");
|
|
16
16
|
function DepartmentMultipleSelectFilter(props) {
|
|
@@ -26,7 +26,7 @@ function DepartmentMultipleSelectFilter(props) {
|
|
|
26
26
|
onClickOutside: () => setIsShowSelector(false)
|
|
27
27
|
}, [selectedDepartments]);
|
|
28
28
|
function renderUserDepartmentOptions() {
|
|
29
|
-
return
|
|
29
|
+
return _departments.DEPARTMENT_SELECT_RANGE_OPTIONS.slice(0, 2).map((option, index) => {
|
|
30
30
|
const {
|
|
31
31
|
type,
|
|
32
32
|
name
|
|
@@ -78,14 +78,14 @@ function DepartmentMultipleSelectFilter(props) {
|
|
|
78
78
|
className: "selected-option"
|
|
79
79
|
}, selectedDepartments.length > 0 ? /*#__PURE__*/_react.default.createElement("span", {
|
|
80
80
|
className: "selected-option-show"
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
81
|
+
}, /*#__PURE__*/_react.default.createElement(_SelectedDepartments.default, {
|
|
82
82
|
value: selectedDepartments,
|
|
83
83
|
departments: departments
|
|
84
84
|
})) : /*#__PURE__*/_react.default.createElement("span", {
|
|
85
85
|
className: "select-placeholder"
|
|
86
86
|
}, (0, _lang.getLocale)('Select_department')), /*#__PURE__*/_react.default.createElement("span", {
|
|
87
87
|
className: "dtable-font dtable-icon-down3"
|
|
88
|
-
})), isShowSelector && /*#__PURE__*/_react.default.createElement(
|
|
88
|
+
})), isShowSelector && /*#__PURE__*/_react.default.createElement(_DepartmentMultipleSelectEditor.default, {
|
|
89
89
|
isShowSelectedDepartments: false,
|
|
90
90
|
classNamePrefix: "filter",
|
|
91
91
|
value: selectedDepartments,
|
package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js
CHANGED
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var _SelectedDepartments = _interopRequireDefault(require("../../../SelectedDepartments"));
|
|
12
|
+
var _DepartmentSingleSelectEditor = _interopRequireDefault(require("../../../DepartmentSingleSelectEditor"));
|
|
13
|
+
var _departments = require("../../../constants/departments");
|
|
14
14
|
var _commonHooks = require("../../../hooks/common-hooks");
|
|
15
15
|
var _lang = require("../../../lang");
|
|
16
16
|
function DepartmentSingleSelectFilter(props) {
|
|
@@ -31,7 +31,7 @@ function DepartmentSingleSelectFilter(props) {
|
|
|
31
31
|
}, [selectedDepartment]);
|
|
32
32
|
function renderUserDepartmentOptions(onSelect) {
|
|
33
33
|
if (!departments || departments.length === 0) return [];
|
|
34
|
-
return
|
|
34
|
+
return _departments.DEPARTMENT_SELECT_RANGE_OPTIONS.slice(0, 2).map((option, index) => {
|
|
35
35
|
const {
|
|
36
36
|
type,
|
|
37
37
|
name
|
|
@@ -76,14 +76,14 @@ function DepartmentSingleSelectFilter(props) {
|
|
|
76
76
|
className: "selected-option"
|
|
77
77
|
}, value ? /*#__PURE__*/_react.default.createElement("span", {
|
|
78
78
|
className: "selected-option-show"
|
|
79
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_SelectedDepartments.default, {
|
|
80
80
|
value: selectedDepartmentIds,
|
|
81
81
|
departments: departments
|
|
82
82
|
})) : /*#__PURE__*/_react.default.createElement("span", {
|
|
83
83
|
className: "select-placeholder"
|
|
84
84
|
}, (0, _lang.getLocale)('Select_department')), /*#__PURE__*/_react.default.createElement("span", {
|
|
85
85
|
className: "dtable-font dtable-icon-down3"
|
|
86
|
-
})), isShowSelector && /*#__PURE__*/_react.default.createElement(
|
|
86
|
+
})), isShowSelector && /*#__PURE__*/_react.default.createElement(_DepartmentSingleSelectEditor.default, {
|
|
87
87
|
enableSelectRange: false,
|
|
88
88
|
column: column,
|
|
89
89
|
value: value,
|
package/lib/DateEditor/index.js
CHANGED
|
@@ -1,109 +1,83 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
8
|
-
var _react =
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
|
+
var _dtableUtils = require("dtable-utils");
|
|
10
12
|
var _dayjs = _interopRequireDefault(require("../utils/dayjs"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
+
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
14
|
+
var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
13
15
|
require("dayjs/locale/zh-cn");
|
|
14
16
|
require("dayjs/locale/en-gb");
|
|
15
17
|
require("./index.css");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
newValue
|
|
41
|
-
dateFormat: '',
|
|
42
|
-
showHourAndMinute: false,
|
|
43
|
-
defaultCalendarValue: null
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
componentDidMount() {
|
|
47
|
-
const {
|
|
48
|
-
value,
|
|
49
|
-
lang
|
|
50
|
-
} = this.props;
|
|
51
|
-
_dayjs.default.locale(lang);
|
|
52
|
-
let dateFormat = this.getDateFormat();
|
|
53
|
-
this.setState({
|
|
54
|
-
isDateInit: true,
|
|
55
|
-
newValue: value,
|
|
56
|
-
dateFormat,
|
|
57
|
-
showHourAndMinute: dateFormat.indexOf('HH:mm') > -1
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
if (!this.state.isDateInit) {
|
|
62
|
-
return null;
|
|
18
|
+
const DateEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
|
+
let {
|
|
20
|
+
isMobile,
|
|
21
|
+
lang,
|
|
22
|
+
isReadOnly,
|
|
23
|
+
column,
|
|
24
|
+
className,
|
|
25
|
+
isInModal,
|
|
26
|
+
firstDayOfWeek,
|
|
27
|
+
size,
|
|
28
|
+
value: oldValue,
|
|
29
|
+
hideCalendar,
|
|
30
|
+
onCommit
|
|
31
|
+
} = _ref;
|
|
32
|
+
const [isDateInit, setDateInit] = (0, _react.useState)(false);
|
|
33
|
+
const [value, setValue] = (0, _react.useState)(oldValue || '');
|
|
34
|
+
const format = (0, _react.useMemo)(() => {
|
|
35
|
+
var _column$data;
|
|
36
|
+
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;
|
|
37
|
+
}, [column]);
|
|
38
|
+
const showHourAndMinute = (0, _react.useMemo)(() => format.indexOf('HH:mm') > -1, [format]);
|
|
39
|
+
const handelCommit = (0, _react.useCallback)(newValue => {
|
|
40
|
+
if (value !== newValue) {
|
|
41
|
+
setValue(newValue);
|
|
42
|
+
onCommit(newValue);
|
|
63
43
|
}
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
DateEditor.defaultProps = {
|
|
105
|
-
isReadOnly: false,
|
|
106
|
-
value: '',
|
|
107
|
-
lang: 'en'
|
|
108
|
-
};
|
|
44
|
+
}, [value, onCommit]);
|
|
45
|
+
(0, _react.useEffect)(() => {
|
|
46
|
+
_dayjs.default.locale(lang);
|
|
47
|
+
setDateInit(true);
|
|
48
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
49
|
+
}, []);
|
|
50
|
+
if (!isDateInit) return null;
|
|
51
|
+
const props = {
|
|
52
|
+
lang,
|
|
53
|
+
value,
|
|
54
|
+
dateFormat: format,
|
|
55
|
+
showHourAndMinute,
|
|
56
|
+
firstDayOfWeek,
|
|
57
|
+
className,
|
|
58
|
+
onCommit: handelCommit,
|
|
59
|
+
onClose: hideCalendar
|
|
60
|
+
};
|
|
61
|
+
if (isMobile === false) return /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
62
|
+
isInModal: isInModal,
|
|
63
|
+
ref: ref
|
|
64
|
+
}));
|
|
65
|
+
if (isMobile === true) return /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
66
|
+
isReadOnly: isReadOnly,
|
|
67
|
+
column: column,
|
|
68
|
+
ref: ref
|
|
69
|
+
}));
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
71
|
+
query: '(min-width: 768px)'
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
73
|
+
isInModal: isInModal,
|
|
74
|
+
ref: ref
|
|
75
|
+
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
76
|
+
query: '(max-width: 768px)'
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
78
|
+
isReadOnly: isReadOnly,
|
|
79
|
+
column: column,
|
|
80
|
+
ref: ref
|
|
81
|
+
}))));
|
|
82
|
+
});
|
|
109
83
|
var _default = exports.default = DateEditor;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-date {
|
|
2
|
+
width: 28px;
|
|
3
|
+
height: 30px;
|
|
4
|
+
border-radius: 50%;
|
|
5
|
+
font-size: 14px;
|
|
6
|
+
line-height: 30px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-date-panel {
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-selected-day .rc-calendar-date {
|
|
14
|
+
background-color: #FcEcD9;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-date:hover,
|
|
18
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-year-panel-year:hover,
|
|
19
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-month-panel-cell .rc-calendar-month-panel-month:hover {
|
|
20
|
+
background-color: #FcEcD9;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-selected-date .rc-calendar-date,
|
|
24
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-selected-date .rc-calendar-date:hover,
|
|
25
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-year-panel-selected-cell .rc-calendar-year-panel-year,
|
|
26
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-month-panel-selected-cell .rc-calendar-month-panel-month {
|
|
27
|
+
background-color: #f09f3f;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-next-year-btn:not([href]):not([tabindex]),
|
|
31
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-prev-year-btn:not([href]):not([tabindex]),
|
|
32
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-next-month-btn:not([href]):not([tabindex]),
|
|
33
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-prev-month-btn:not([href]):not([tabindex]) {
|
|
34
|
+
color: #999;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-next-year-btn:not([href]):not([tabindex]):hover,
|
|
38
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-prev-year-btn:not([href]):not([tabindex]):hover,
|
|
39
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-next-month-btn:not([href]):not([tabindex]):hover,
|
|
40
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-prev-month-btn:not([href]):not([tabindex]):hover {
|
|
41
|
+
color: #666;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-today .rc-calendar-date {
|
|
45
|
+
border: none;
|
|
46
|
+
position: relative;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rc-calendar-today .rc-calendar-date::after {
|
|
50
|
+
content: '';
|
|
51
|
+
background: #f09f3f;
|
|
52
|
+
position: absolute;
|
|
53
|
+
width: 4px;
|
|
54
|
+
height: 4px;
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
left: 45%;
|
|
57
|
+
bottom: 0%;
|
|
58
|
+
display: inline-block;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar .rdg-editor-container input.editor-main[readonly] {
|
|
62
|
+
background-color: #fff;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-time-picker {
|
|
66
|
+
z-index: 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-right-panel-body ul li.highlight {
|
|
70
|
+
margin: 0;
|
|
71
|
+
border: none;
|
|
72
|
+
background-color: #fff;
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar {
|
|
77
|
+
box-shadow: none;
|
|
78
|
+
border-radius: 0px;
|
|
79
|
+
border: 1px solid #e9e9e9;
|
|
80
|
+
border-left: none;
|
|
81
|
+
border-right: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-date {
|
|
85
|
+
font-size: 14px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-date-panel {
|
|
89
|
+
width: 100%;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-body {
|
|
93
|
+
height: 22rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-table tr {
|
|
97
|
+
height: 3rem;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-prev-month-btn,
|
|
101
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-next-month-btn,
|
|
102
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-prev-year-btn,
|
|
103
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-next-year-btn {
|
|
104
|
+
font-size: 30px;
|
|
105
|
+
width: 50px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-header {
|
|
109
|
+
border-bottom: none;
|
|
110
|
+
margin-top: 0.5rem;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-year-select,
|
|
114
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-month-select,
|
|
115
|
+
.dtable-ui.dtable-ui-mobile-date-editor-picker .rc-calendar-day-select {
|
|
116
|
+
font-size: 16px;
|
|
117
|
+
padding: 5px;
|
|
118
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import url('./custom-rc-calendar.css');
|
|
2
|
+
|
|
3
|
+
.dtable-ui-mobile-date-editor .dtable-ui-mobile-date-editor-input {
|
|
4
|
+
display: flex;
|
|
5
|
+
border-bottom: 1px solid #e9e9e9;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.dtable-ui-mobile-date-editor .dtable-ui-mobile-date-editor-input .date-input {
|
|
9
|
+
flex: 1;
|
|
10
|
+
background-color: #fff;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dtable-ui-mobile-date-editor .dtable-ui-mobile-date-editor-input .date-input .date-input-day {
|
|
14
|
+
background-color: #f5f5f5;
|
|
15
|
+
border: 1px solid #e9e9e9;
|
|
16
|
+
margin: 10px;
|
|
17
|
+
padding: 3px 5px;
|
|
18
|
+
border-radius: 3px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.dtable-ui-mobile-date-editor .dtable-ui.dtable-ui-mobile-date-editor-picker {
|
|
22
|
+
display: block;
|
|
23
|
+
position: relative;
|
|
24
|
+
margin-top: 20px;
|
|
25
|
+
line-height: 1.5;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dtable-ui-mobile-date-editor .dtable-ui-mobile-date-editor-clear {
|
|
30
|
+
padding: 10px 0;
|
|
31
|
+
border-bottom: 1px solid #e9e9e9;
|
|
32
|
+
text-align: center;
|
|
33
|
+
color: #d27053;
|
|
34
|
+
background-color: #fff;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dtable-ui .am-picker-popup-header .am-picker-popup-item {
|
|
38
|
+
color: #E5A252;
|
|
39
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _datePicker = _interopRequireDefault(require("antd-mobile/lib/date-picker"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
12
|
+
require("dayjs/locale/zh-cn");
|
|
13
|
+
require("dayjs/locale/en-gb");
|
|
14
|
+
var _seafileCalendar = _interopRequireDefault(require("@seafile/seafile-calendar"));
|
|
15
|
+
var _Picker = _interopRequireDefault(require("@seafile/seafile-calendar/lib/Picker"));
|
|
16
|
+
var _lang = require("../../lang");
|
|
17
|
+
var _editorUtils = require("../../utils/editor-utils");
|
|
18
|
+
var _MobileFullScreenPage = _interopRequireDefault(require("../../MobileFullScreenPage"));
|
|
19
|
+
require("@seafile/seafile-calendar/assets/index.css");
|
|
20
|
+
require("./index.css");
|
|
21
|
+
let now = (0, _dayjs.default)();
|
|
22
|
+
const {
|
|
23
|
+
Header,
|
|
24
|
+
Body
|
|
25
|
+
} = _MobileFullScreenPage.default;
|
|
26
|
+
class MBDateEditor extends _react.default.PureComponent {
|
|
27
|
+
constructor(props) {
|
|
28
|
+
super(props);
|
|
29
|
+
this.handleDateChange = date => {
|
|
30
|
+
if (this.showTime) {
|
|
31
|
+
const HM = (0, _dayjs.default)(this.state.time).format('HH:mm');
|
|
32
|
+
// In iOS, the time standard is ISO-8601, new Date("YYYY-MM-DD") will be wrong, new Date("YYYY/MM/DD") will be OK.
|
|
33
|
+
const newTime = (0, _dayjs.default)(date).format('YYYY/MM/DD') + ' ' + HM;
|
|
34
|
+
this.setState({
|
|
35
|
+
time: new Date(newTime)
|
|
36
|
+
});
|
|
37
|
+
} else {
|
|
38
|
+
this.setState({
|
|
39
|
+
time: date
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
this.handleTimeChange = time => {
|
|
44
|
+
// In iOS, the time standard is ISO-8601, new Date("YYYY-MM-DD") will be wrong, new Date("YYYY/MM/DD") will be OK.
|
|
45
|
+
const YMD = (0, _dayjs.default)(this.state.time).format('YYYY/MM/DD');
|
|
46
|
+
const newTime = YMD + ' ' + (0, _dayjs.default)(time).format('HH:mm');
|
|
47
|
+
this.setState({
|
|
48
|
+
time: new Date(newTime)
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
this.onSave = () => {
|
|
52
|
+
const value = (0, _dayjs.default)(this.state.time).format(this.format);
|
|
53
|
+
this.props.onCommit(value);
|
|
54
|
+
this.props.onClose();
|
|
55
|
+
};
|
|
56
|
+
this.deleteDate = () => {
|
|
57
|
+
this.props.onCommit(null);
|
|
58
|
+
this.props.onClose();
|
|
59
|
+
};
|
|
60
|
+
this.getCalendarContainer = () => {
|
|
61
|
+
return this.calendarContainerRef.current;
|
|
62
|
+
};
|
|
63
|
+
this.onChange = value => {
|
|
64
|
+
if (!value) return;
|
|
65
|
+
const newTime = (0, _dayjs.default)(value.format(this.format));
|
|
66
|
+
this.setState({
|
|
67
|
+
time: newTime
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
this.renderCalender = () => {
|
|
71
|
+
const {
|
|
72
|
+
lang,
|
|
73
|
+
className,
|
|
74
|
+
firstDayOfWeek
|
|
75
|
+
} = this.props;
|
|
76
|
+
const {
|
|
77
|
+
time
|
|
78
|
+
} = this.state;
|
|
79
|
+
const calendar = /*#__PURE__*/_react.default.createElement(_seafileCalendar.default, {
|
|
80
|
+
className: (0, _classnames.default)('dtable-rc-calendar', className),
|
|
81
|
+
locale: (0, _editorUtils.initDateEditorLanguage)(lang),
|
|
82
|
+
dateInputPlaceholder: (0, _lang.getLocale)('Please_input'),
|
|
83
|
+
format: this.format,
|
|
84
|
+
defaultValue: this.defaultCalendarValue,
|
|
85
|
+
showDateInput: false,
|
|
86
|
+
focusablePanel: false,
|
|
87
|
+
showToday: false,
|
|
88
|
+
showTime: false,
|
|
89
|
+
style: {
|
|
90
|
+
width: '100%',
|
|
91
|
+
fontSize: '14px'
|
|
92
|
+
},
|
|
93
|
+
firstDayOfWeek: firstDayOfWeek
|
|
94
|
+
});
|
|
95
|
+
return /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
|
96
|
+
calendar: calendar,
|
|
97
|
+
value: time,
|
|
98
|
+
onChange: this.onChange,
|
|
99
|
+
getCalendarContainer: this.getCalendarContainer,
|
|
100
|
+
open: true,
|
|
101
|
+
style: {
|
|
102
|
+
width: '100%'
|
|
103
|
+
}
|
|
104
|
+
}, _ref => {
|
|
105
|
+
let {
|
|
106
|
+
time
|
|
107
|
+
} = _ref;
|
|
108
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
109
|
+
tabIndex: "0",
|
|
110
|
+
onFocus: this.onReadOnlyFocus
|
|
111
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
112
|
+
placeholder: (0, _lang.getLocale)('please_select'),
|
|
113
|
+
readOnly: true,
|
|
114
|
+
tabIndex: "-1",
|
|
115
|
+
className: "ant-calendar-picker-input ant-input form-control",
|
|
116
|
+
value: time ? (0, _dayjs.default)(time).format(this.getFormat()) : ''
|
|
117
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
+
ref: this.calendarContainerRef,
|
|
119
|
+
style: {
|
|
120
|
+
height: '22rem'
|
|
121
|
+
}
|
|
122
|
+
}));
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
const {
|
|
126
|
+
dateFormat,
|
|
127
|
+
showHourAndMinute
|
|
128
|
+
} = props;
|
|
129
|
+
this.state = {
|
|
130
|
+
time: null
|
|
131
|
+
};
|
|
132
|
+
this.calendarContainerRef = /*#__PURE__*/_react.default.createRef();
|
|
133
|
+
this.leftFormat = dateFormat ? dateFormat.indexOf(' ') === -1 ? dateFormat : dateFormat.slice(0, dateFormat.indexOf(' ')) : 'YYYY-MM-DD';
|
|
134
|
+
this.rightFormat = 'HH:mm';
|
|
135
|
+
this.showTime = showHourAndMinute;
|
|
136
|
+
this.format = showHourAndMinute ? 'YYYY-MM-DD HH:mm' : 'YYYY-MM-DD';
|
|
137
|
+
}
|
|
138
|
+
componentDidMount() {
|
|
139
|
+
let {
|
|
140
|
+
value,
|
|
141
|
+
lang
|
|
142
|
+
} = this.props;
|
|
143
|
+
const iszhcn = lang === 'zh-cn';
|
|
144
|
+
if (iszhcn) {
|
|
145
|
+
now = now.locale('zh-cn');
|
|
146
|
+
} else {
|
|
147
|
+
now = now.locale('en-gb');
|
|
148
|
+
}
|
|
149
|
+
if (!value) {
|
|
150
|
+
value = new Date(Date.now());
|
|
151
|
+
}
|
|
152
|
+
this.defaultCalendarValue = now.clone();
|
|
153
|
+
this.setState({
|
|
154
|
+
time: iszhcn ? (0, _dayjs.default)(value).locale('zh-cn') : (0, _dayjs.default)(value).locale('en-gb')
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
render() {
|
|
158
|
+
const {
|
|
159
|
+
lang,
|
|
160
|
+
column
|
|
161
|
+
} = this.props;
|
|
162
|
+
const {
|
|
163
|
+
time
|
|
164
|
+
} = this.state;
|
|
165
|
+
return /*#__PURE__*/_react.default.createElement(_MobileFullScreenPage.default, {
|
|
166
|
+
className: "dtable-ui-mobile-date-editor",
|
|
167
|
+
onClose: this.props.onClose
|
|
168
|
+
}, /*#__PURE__*/_react.default.createElement(Header, {
|
|
169
|
+
onLeftClick: this.props.onClose,
|
|
170
|
+
onRightClick: this.onSave
|
|
171
|
+
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _lang.getLocale)('Cancel')), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, column.name), /*#__PURE__*/_react.default.createElement("span", {
|
|
172
|
+
style: {
|
|
173
|
+
color: '#f09f3f'
|
|
174
|
+
}
|
|
175
|
+
}, (0, _lang.getLocale)('Done'))), /*#__PURE__*/_react.default.createElement(Body, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
176
|
+
className: "dtable-ui-mobile-date-editor-input"
|
|
177
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
178
|
+
className: "date-input",
|
|
179
|
+
style: this.showTime ? {
|
|
180
|
+
width: '50%'
|
|
181
|
+
} : {
|
|
182
|
+
width: '100%'
|
|
183
|
+
}
|
|
184
|
+
}, /*#__PURE__*/_react.default.createElement(_datePicker.default, {
|
|
185
|
+
mode: "date",
|
|
186
|
+
minDate: _editorUtils.minDate,
|
|
187
|
+
maxDate: _editorUtils.maxDate,
|
|
188
|
+
locale: (0, _editorUtils.initDateEditorLanguage)(lang),
|
|
189
|
+
value: null,
|
|
190
|
+
onChange: this.handleDateChange
|
|
191
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
192
|
+
className: "date-input-day"
|
|
193
|
+
}, (0, _dayjs.default)(time).format(this.leftFormat)))), this.showTime && /*#__PURE__*/_react.default.createElement("div", {
|
|
194
|
+
className: "date-input",
|
|
195
|
+
style: {
|
|
196
|
+
width: '50%'
|
|
197
|
+
}
|
|
198
|
+
}, /*#__PURE__*/_react.default.createElement(_datePicker.default, {
|
|
199
|
+
mode: "time",
|
|
200
|
+
locale: (0, _editorUtils.initDateEditorLanguage)(lang),
|
|
201
|
+
value: null,
|
|
202
|
+
onChange: this.handleTimeChange
|
|
203
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
204
|
+
className: "date-input-day"
|
|
205
|
+
}, (0, _dayjs.default)(time).format(this.rightFormat))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
206
|
+
className: "dtable-ui dtable-ui-mobile-date-editor-picker"
|
|
207
|
+
}, this.renderCalender()), /*#__PURE__*/_react.default.createElement("div", {
|
|
208
|
+
className: "dtable-ui-mobile-date-editor-clear"
|
|
209
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
210
|
+
onClick: this.deleteDate,
|
|
211
|
+
className: "clear-date"
|
|
212
|
+
}, (0, _lang.getLocale)('Clear')))));
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
var _default = exports.default = MBDateEditor;
|