dtable-ui-component 6.0.29-beta11 → 6.0.29-beta13
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/CheckboxEditor/index.js +116 -24
- package/lib/CollaboratorEditor/index.js +11 -23
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.css +85 -0
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.js +148 -0
- package/lib/DTableCommonAddTool/index.js +3 -1
- 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 +95 -69
- package/lib/DateEditor/mb-date-editor-popover/custom-rc-calendar.css +118 -0
- package/lib/DateEditor/mb-date-editor-popover/index.css +45 -0
- package/lib/DateEditor/mb-date-editor-popover/index.js +226 -0
- package/lib/DateEditor/{pc-editor.js → pc-date-editor-popover.js} +9 -9
- package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.js +6 -6
- package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/department-single-select.js +7 -7
- package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.css +3 -10
- package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.js +25 -8
- package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.css +1 -0
- package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.js +3 -3
- package/lib/DigitalSignEditor/index.js +171 -24
- package/lib/FileEditor/addition-previewer/index.css +1 -0
- package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
- package/lib/FileEditor/addition-previewer/local-file-addition/index.css +1 -0
- package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/local-file-addition/index.js +4 -4
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/dropdown-menu.js +1 -1
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.js +1 -1
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.css +2 -0
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.js +2 -2
- package/lib/FileEditor/files-previewer/index.js +268 -26
- package/lib/FileEditor/index.css +5 -0
- package/lib/FileEditor/index.js +265 -26
- package/lib/FormulaFormatter/index.css +5 -5
- package/lib/GeolocationEditor/{pc-editor/country-editor.js → country-editor.js} +51 -5
- package/lib/GeolocationEditor/{pc-editor/index.css → index.css} +4 -3
- package/lib/GeolocationEditor/index.js +233 -90
- package/lib/GeolocationEditor/{pc-editor/location-editor.js → location-editor.js} +49 -8
- package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/index.js +7 -7
- package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.js +8 -8
- package/lib/GeolocationEditor/map-editor-utils.js +2 -6
- package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/index.js +7 -7
- package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/{pc-editor/province-city-editor.js → province-city-editor.js} +46 -7
- package/lib/GeolocationEditor/{pc-editor/province-editor.js → province-editor.js} +39 -7
- package/lib/GeolocationEditor/{pc-editor/selector-header-item.js → selector-header-item.js} +1 -1
- package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.js +1 -1
- package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
- package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.js +4 -4
- package/lib/ImageEditor/images-previewer/image-preview/index.js +3 -3
- package/lib/ImageEditor/images-previewer/index.js +4 -9
- package/lib/ImageEditor/index.css +16 -17
- package/lib/ImageEditor/index.js +185 -26
- package/lib/ImageThumbnail/index.js +1 -2
- package/lib/LinkEditor/index.js +5 -5
- package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.css +1 -1
- package/lib/MultipleSelectEditor/index.js +14 -9
- package/lib/RowExpandDialog/column-content/index.js +2 -2
- package/lib/RowExpandDialog/index.js +0 -2
- package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.js +4 -6
- package/lib/RowExpandEditor/{checkbox-editor/pc-editor.js → RowExpandCheckboxEditor/index.js} +13 -9
- package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.css +1 -1
- package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.js +7 -6
- package/lib/RowExpandEditor/{date-editor/pc-editor.js → RowExpandDateEditor/index.js} +2 -2
- package/lib/RowExpandEditor/{department-editor/pc-editor.js → RowExpandDepartmentEditor/index.js} +49 -44
- package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.css +1 -1
- package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.js +11 -11
- package/lib/RowExpandEditor/{duration-editor/pc-editor.js → RowExpandDurationEditor/index.js} +2 -2
- package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +2 -0
- package/lib/RowExpandEditor/{email-editor/pc-editor → RowExpandEmailEditor}/index.js +3 -3
- package/lib/RowExpandEditor/RowExpandFileEditor/index.css +1 -0
- package/lib/RowExpandEditor/{file-editor/pc-editor → RowExpandFileEditor}/index.js +9 -9
- package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.js +12 -9
- package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.js +9 -9
- package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.js +7 -7
- package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.css +1 -1
- package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.js +6 -6
- package/lib/RowExpandEditor/{number-editor/pc-editor.js → RowExpandNumberEditor/index.js} +2 -2
- package/lib/RowExpandEditor/RowExpandRateEditor/index.css +13 -0
- package/lib/RowExpandEditor/{rate-editor/pc-editor.js → RowExpandRateEditor/index.js} +3 -2
- package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.js +17 -17
- package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.js +7 -7
- package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.js +6 -6
- package/lib/RowExpandEditor/constants.js +34 -34
- package/lib/RowExpandFormatter/{department-formatter/pc-formatter.js → RowExpandDepartmentFormatter/index.js} +2 -2
- package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.css +4 -4
- package/lib/RowExpandFormatter/RowExpandRateFormatter/index.css +5 -0
- package/lib/RowExpandFormatter/constants.js +17 -17
- package/lib/RowExpandFormatter/index.css +18 -33
- package/lib/RowExpandFormatter/index.js +1 -1
- package/lib/SelectItem/index.js +33 -57
- package/lib/SingleSelectEditor/index.js +14 -9
- package/lib/SvgIcon/index.js +1 -2
- package/lib/constants/index.js +2 -3
- package/lib/css/mb-cell-editor.css +1 -1
- package/lib/index.js +6 -62
- package/lib/locales/de.json +1 -3
- package/lib/locales/en.json +1 -3
- package/lib/locales/es.json +1 -3
- package/lib/locales/fr.json +1 -3
- package/lib/locales/pt.json +1 -3
- package/lib/locales/ru.json +1 -3
- package/lib/locales/zh-CN.json +1 -3
- package/lib/select-editor/index.js +20 -27
- package/lib/select-editor/mb-select-editor/index.css +127 -0
- package/lib/select-editor/mb-select-editor/index.js +197 -0
- package/lib/select-editor/{pc-editor → pc-select-editor}/index.css +1 -1
- package/lib/select-editor/{pc-editor → pc-select-editor}/index.js +7 -7
- package/lib/select-editor/select-editor-option.js +84 -0
- package/lib/utils/editor-utils.js +2 -6
- package/lib/utils/get-event-transfer.js +1 -2
- package/lib/utils/utils.js +2 -11
- package/package.json +2 -2
- package/lib/BodyPortal/index.js +0 -29
- package/lib/CheckboxEditor/mb-editor.js +0 -99
- package/lib/CheckboxEditor/pc-editor.js +0 -118
- package/lib/CollaboratorEditor/mb-editor/index.css +0 -41
- package/lib/CollaboratorEditor/mb-editor/index.js +0 -88
- package/lib/DateEditor/mb-editor/custom-rc-calendar.css +0 -118
- package/lib/DateEditor/mb-editor/index.css +0 -39
- package/lib/DateEditor/mb-editor/index.js +0 -215
- package/lib/DepartmentSingleSelectEditor/index.js +0 -34
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.css +0 -4
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +0 -227
- package/lib/DigitalSignEditor/mb-editor/index.css +0 -35
- package/lib/DigitalSignEditor/mb-editor/index.js +0 -144
- package/lib/DigitalSignEditor/pc-editor/index.js +0 -181
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +0 -122
- package/lib/FileEditor/files-previewer/mb-previewer/index.css +0 -39
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +0 -64
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +0 -276
- package/lib/FileEditor/mb-editor/index.css +0 -10
- package/lib/FileEditor/mb-editor/index.js +0 -136
- package/lib/FileEditor/pc-editor/addition-previewer/index.css +0 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.css +0 -1
- package/lib/FileEditor/pc-editor/index.css +0 -5
- package/lib/FileEditor/pc-editor/index.js +0 -274
- package/lib/GeolocationEditor/mb-editor/country-editor.js +0 -79
- package/lib/GeolocationEditor/mb-editor/index.css +0 -11
- package/lib/GeolocationEditor/mb-editor/index.js +0 -125
- package/lib/GeolocationEditor/mb-editor/location-editor.js +0 -101
- package/lib/GeolocationEditor/mb-editor/map-editor/index.css +0 -11
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +0 -474
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.css +0 -158
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +0 -530
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +0 -77
- package/lib/GeolocationEditor/mb-editor/province-editor.js +0 -76
- package/lib/GeolocationEditor/pc-editor/index.js +0 -247
- package/lib/ImageEditor/mb-editor/index.css +0 -29
- package/lib/ImageEditor/mb-editor/index.js +0 -136
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +0 -140
- package/lib/ImageEditor/pc-editor/index.css +0 -24
- package/lib/ImageEditor/pc-editor/index.js +0 -194
- package/lib/MobileFullScreenPage/body/index.css +0 -9
- package/lib/MobileFullScreenPage/body/index.js +0 -23
- package/lib/MobileFullScreenPage/header/index.css +0 -39
- package/lib/MobileFullScreenPage/header/index.js +0 -38
- package/lib/MobileFullScreenPage/index.css +0 -13
- package/lib/MobileFullScreenPage/index.js +0 -73
- package/lib/MobileModal/index.js +0 -41
- package/lib/MobileOperationSheet/index.css +0 -27
- package/lib/MobileOperationSheet/index.js +0 -92
- package/lib/MobileSelector/empty/index.css +0 -3
- package/lib/MobileSelector/empty/index.js +0 -23
- package/lib/MobileSelector/index.css +0 -32
- package/lib/MobileSelector/index.js +0 -57
- package/lib/MobileSelector/option/index.css +0 -28
- package/lib/MobileSelector/option/index.js +0 -36
- package/lib/MobileSelector/options/index.css +0 -8
- package/lib/MobileSelector/options/index.js +0 -18
- package/lib/MobileSelector/search/index.css +0 -7
- package/lib/MobileSelector/search/index.js +0 -26
- package/lib/MobileUpload/index.css +0 -1
- package/lib/MobileUpload/index.js +0 -160
- package/lib/RowExpand/index.js +0 -24
- package/lib/RowExpandEditor/add-btn/index.js +0 -24
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.css +0 -3
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +0 -19
- package/lib/RowExpandEditor/checkbox-editor/index.js +0 -25
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.css +0 -6
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +0 -36
- package/lib/RowExpandEditor/collaborator-editor/index.js +0 -24
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.css +0 -9
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +0 -163
- package/lib/RowExpandEditor/date-editor/index.js +0 -24
- package/lib/RowExpandEditor/date-editor/mb-editor.js +0 -82
- package/lib/RowExpandEditor/department-editor/index.js +0 -24
- package/lib/RowExpandEditor/department-editor/mb-editor.js +0 -65
- package/lib/RowExpandEditor/digital-sign-editor/index.js +0 -24
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.css +0 -1
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +0 -130
- package/lib/RowExpandEditor/duration-editor/index.js +0 -24
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +0 -71
- package/lib/RowExpandEditor/email-editor/index.js +0 -24
- package/lib/RowExpandEditor/email-editor/mb-editor/index.css +0 -1
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +0 -84
- package/lib/RowExpandEditor/email-editor/pc-editor/index.css +0 -1
- package/lib/RowExpandEditor/file-editor/index.js +0 -24
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +0 -114
- package/lib/RowExpandEditor/file-editor/pc-editor/index.css +0 -1
- package/lib/RowExpandEditor/geolocation-editor/index.js +0 -24
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +0 -100
- package/lib/RowExpandEditor/image-editor/index.js +0 -24
- package/lib/RowExpandEditor/image-editor/mb-editor/index.css +0 -30
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +0 -109
- package/lib/RowExpandEditor/long-text-editor/index.js +0 -24
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.css +0 -10
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +0 -80
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.css +0 -3
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +0 -91
- package/lib/RowExpandEditor/multiple-select-editor/index.js +0 -24
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +0 -154
- package/lib/RowExpandEditor/number-editor/index.js +0 -24
- package/lib/RowExpandEditor/number-editor/mb-editor/index.css +0 -3
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +0 -76
- package/lib/RowExpandEditor/rate-editor/index.css +0 -34
- package/lib/RowExpandEditor/rate-editor/index.js +0 -25
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +0 -92
- package/lib/RowExpandEditor/right-angle/index.css +0 -6
- package/lib/RowExpandEditor/right-angle/index.js +0 -17
- package/lib/RowExpandEditor/single-select-editor/index.js +0 -24
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.css +0 -8
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +0 -134
- package/lib/RowExpandEditor/text-editor/index.js +0 -24
- package/lib/RowExpandEditor/text-editor/mb-editor/index.css +0 -14
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +0 -37
- package/lib/RowExpandEditor/url-editor/index.js +0 -24
- package/lib/RowExpandEditor/url-editor/mb-editor/index.css +0 -17
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +0 -87
- package/lib/RowExpandFormatter/department-formatter/index.js +0 -19
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +0 -20
- package/lib/RowExpandFormatter/rate-formatter/index.css +0 -5
- package/lib/RowExpandView/body/index.css +0 -173
- package/lib/RowExpandView/body/index.js +0 -111
- package/lib/RowExpandView/column-content/index.css +0 -27
- package/lib/RowExpandView/column-content/index.js +0 -25
- package/lib/RowExpandView/index.css +0 -3
- package/lib/RowExpandView/index.js +0 -178
- package/lib/select-editor/mb-editor/index.css +0 -1
- package/lib/select-editor/mb-editor/index.js +0 -105
- /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.css +0 -0
- /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.js +0 -0
- /package/lib/{constants/departments.js → Department-editor/constants.js} +0 -0
- /package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.css +0 -0
- /package/lib/{utils/departments.js → Department-editor/utils.js} +0 -0
- /package/lib/DigitalSignEditor/{pc-editor/index.css → index.css} +0 -0
- /package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{pc-editor/parse-geolocation.js → parse-geolocation.js} +0 -0
- /package/lib/GeolocationEditor/{pc-editor/selector-list.js → selector-list.js} +0 -0
- /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.css +0 -0
- /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.css +0 -0
- /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.css +0 -0
- /package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.js +0 -0
- /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.css +0 -0
- /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.js +0 -0
- /package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.css +0 -0
- /package/lib/RowExpandEditor/{checkbox-editor → RowExpandCheckboxEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.css +0 -0
- /package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/row-expand-file-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{formula-formatter → RowExpandFormulaFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/row-expand-image-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/collaborator-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/value-display-utils.js +0 -0
- /package/lib/RowExpandFormatter/{rate-formatter → RowExpandRateFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.js +0 -0
|
@@ -1,39 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,215 +0,0 @@
|
|
|
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;
|
|
@@ -1,34 +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 _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
|
-
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
12
|
-
var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
13
|
-
const DepartmentSingleSelectEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
14
|
-
let {
|
|
15
|
-
isMobile,
|
|
16
|
-
...props
|
|
17
|
-
} = _ref;
|
|
18
|
-
if (isMobile === false) return /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
19
|
-
ref: ref
|
|
20
|
-
}));
|
|
21
|
-
if (isMobile === true) return /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
22
|
-
ref: ref
|
|
23
|
-
}));
|
|
24
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
25
|
-
query: '(min-width: 768px)'
|
|
26
|
-
}, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
27
|
-
ref: ref
|
|
28
|
-
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
29
|
-
query: '(max-width: 768px)'
|
|
30
|
-
}, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
31
|
-
ref: ref
|
|
32
|
-
}))));
|
|
33
|
-
});
|
|
34
|
-
var _default = exports.default = DepartmentSingleSelectEditor;
|
|
@@ -1,227 +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 _list = _interopRequireDefault(require("antd-mobile/lib/list"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _dtableUtils = require("dtable-utils");
|
|
12
|
-
var _DTableRadio = _interopRequireDefault(require("../../DTableRadio"));
|
|
13
|
-
var _MobileFullScreenPage = _interopRequireDefault(require("../../MobileFullScreenPage"));
|
|
14
|
-
var _departments = require("../../utils/departments");
|
|
15
|
-
var _departments2 = require("../../constants/departments");
|
|
16
|
-
var _lang = require("../../lang");
|
|
17
|
-
require("./index.css");
|
|
18
|
-
const Item = _list.default.Item;
|
|
19
|
-
const {
|
|
20
|
-
Header,
|
|
21
|
-
Body
|
|
22
|
-
} = _MobileFullScreenPage.default;
|
|
23
|
-
const MBDepartmentSingleSelectEditor = _ref => {
|
|
24
|
-
let {
|
|
25
|
-
value: oldValue,
|
|
26
|
-
column,
|
|
27
|
-
isSupportMultiple = false,
|
|
28
|
-
isFilterEditor = false,
|
|
29
|
-
userDepartmentIdsMap = {},
|
|
30
|
-
departments: initialDepartments = [],
|
|
31
|
-
onCommit,
|
|
32
|
-
onClose
|
|
33
|
-
} = _ref;
|
|
34
|
-
const [value, setValue] = (0, _react.useState)(oldValue ? oldValue : isSupportMultiple ? [] : '');
|
|
35
|
-
const [departments, setDepartments] = (0, _react.useState)([]);
|
|
36
|
-
const [parentId, setParentId] = (0, _react.useState)('');
|
|
37
|
-
const [topParentIds, setTopParentIds] = (0, _react.useState)([]);
|
|
38
|
-
const initColumnData = (0, _react.useMemo)(() => {
|
|
39
|
-
const data = column.data || {};
|
|
40
|
-
const enableSelectRange = data.enable_select_range || false;
|
|
41
|
-
const selectedRange = data.selected_range || '';
|
|
42
|
-
const specificDepartments = data.specific_departments || [];
|
|
43
|
-
return {
|
|
44
|
-
enableSelectRange,
|
|
45
|
-
selectedRange,
|
|
46
|
-
specificDepartments
|
|
47
|
-
};
|
|
48
|
-
}, [column]);
|
|
49
|
-
const onSave = (0, _react.useCallback)(() => {
|
|
50
|
-
!isFilterEditor && onCommit && onCommit(value);
|
|
51
|
-
onClose && onClose();
|
|
52
|
-
}, [isFilterEditor, value, onCommit, onClose]);
|
|
53
|
-
const onDepartmentClick = (0, _react.useCallback)((event, department) => {
|
|
54
|
-
event.preventDefault();
|
|
55
|
-
const {
|
|
56
|
-
id,
|
|
57
|
-
hasChild
|
|
58
|
-
} = department;
|
|
59
|
-
if (event.target && event.target.className.indexOf('am-list-arrow') > -1) {
|
|
60
|
-
if (!hasChild) return;
|
|
61
|
-
setParentId(id);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
let newValue;
|
|
65
|
-
if (isSupportMultiple) {
|
|
66
|
-
newValue = value.slice(0);
|
|
67
|
-
const index = newValue.indexOf(id);
|
|
68
|
-
index === -1 ? newValue.push(id) : newValue.splice(index);
|
|
69
|
-
} else {
|
|
70
|
-
newValue = id === value ? '' : id;
|
|
71
|
-
}
|
|
72
|
-
if (isFilterEditor) {
|
|
73
|
-
onCommit && onCommit({
|
|
74
|
-
id
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
setValue(newValue);
|
|
78
|
-
}, [isSupportMultiple, isFilterEditor, value, onCommit]);
|
|
79
|
-
const onParentDepartmentClick = (0, _react.useCallback)((event, type) => {
|
|
80
|
-
event.preventDefault();
|
|
81
|
-
let newValue;
|
|
82
|
-
if (isSupportMultiple) {
|
|
83
|
-
newValue = value.slice(0);
|
|
84
|
-
const index = newValue.indexOf(type);
|
|
85
|
-
index === -1 ? newValue.push(type) : newValue.splice(index);
|
|
86
|
-
} else {
|
|
87
|
-
newValue = type === value ? '' : type;
|
|
88
|
-
}
|
|
89
|
-
if (isFilterEditor) {
|
|
90
|
-
onCommit && onCommit({
|
|
91
|
-
id: type
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
setValue(newValue);
|
|
95
|
-
}, [value, isFilterEditor, isSupportMultiple, onCommit]);
|
|
96
|
-
const onLeftClick = (0, _react.useCallback)(() => {
|
|
97
|
-
const parentDepartment = departments.find(item => item.id === parentId);
|
|
98
|
-
if (!parentDepartment) {
|
|
99
|
-
onClose && onClose();
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
const {
|
|
103
|
-
enableSelectRange
|
|
104
|
-
} = initColumnData;
|
|
105
|
-
if (topParentIds.includes(parentId) && enableSelectRange) {
|
|
106
|
-
setParentId('');
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
const upperLevelDepartmentParentId = parentDepartment.parent_id;
|
|
110
|
-
setParentId(upperLevelDepartmentParentId);
|
|
111
|
-
}, [initColumnData, departments, parentId, topParentIds, onClose]);
|
|
112
|
-
const renderLeftContent = (0, _react.useCallback)(() => {
|
|
113
|
-
const parentDepartment = departments.find(item => item.id === parentId);
|
|
114
|
-
if (!parentDepartment && !isFilterEditor) return (0, _lang.getLocale)('Cancel');
|
|
115
|
-
return /*#__PURE__*/_react.default.createElement("i", {
|
|
116
|
-
"aria-hidden": "true",
|
|
117
|
-
className: "dtable-font dtable-icon-return"
|
|
118
|
-
});
|
|
119
|
-
}, [isFilterEditor, departments, parentId]);
|
|
120
|
-
const renderDepartments = (0, _react.useCallback)(() => {
|
|
121
|
-
const {
|
|
122
|
-
enableSelectRange
|
|
123
|
-
} = initColumnData;
|
|
124
|
-
let currentDepartments = [];
|
|
125
|
-
if (enableSelectRange && !parentId && !isFilterEditor) {
|
|
126
|
-
currentDepartments = departments.filter(department => topParentIds.includes(department.id));
|
|
127
|
-
} else {
|
|
128
|
-
currentDepartments = departments.filter(department => department.parent_id === parentId);
|
|
129
|
-
}
|
|
130
|
-
if (currentDepartments.length === 0) {
|
|
131
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
132
|
-
className: "d-flex justify-content-center seatable-tip-default h-100 w-100 align-items-center"
|
|
133
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('No_departments_available')));
|
|
134
|
-
}
|
|
135
|
-
return /*#__PURE__*/_react.default.createElement(_list.default, {
|
|
136
|
-
className: "my-list dtable-ui-mobile-department-editor-departments",
|
|
137
|
-
renderHeader: () => (0, _lang.getLocale)('Select_department')
|
|
138
|
-
}, isFilterEditor && parentId === -1 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, _departments2.DEPARTMENT_SELECT_RANGE_OPTIONS.slice(0, 2).map((option, index) => {
|
|
139
|
-
const {
|
|
140
|
-
type,
|
|
141
|
-
name
|
|
142
|
-
} = option;
|
|
143
|
-
const isChecked = isSupportMultiple ? value.includes(type) : value === type;
|
|
144
|
-
return /*#__PURE__*/_react.default.createElement(Item, {
|
|
145
|
-
key: "department-range-item-".concat(index),
|
|
146
|
-
multipleLine: true,
|
|
147
|
-
onClick: event => onParentDepartmentClick(event, type),
|
|
148
|
-
className: "dtable-ui-mobile-department-editor-department-item"
|
|
149
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
-
className: "d-flex"
|
|
151
|
-
}, /*#__PURE__*/_react.default.createElement(_DTableRadio.default, {
|
|
152
|
-
isChecked: isChecked,
|
|
153
|
-
onCheckedChange: event => onParentDepartmentClick(event, type),
|
|
154
|
-
label: (0, _lang.getLocale)(name)
|
|
155
|
-
})));
|
|
156
|
-
})), currentDepartments.map((department, index) => {
|
|
157
|
-
const {
|
|
158
|
-
hasChild,
|
|
159
|
-
name,
|
|
160
|
-
id
|
|
161
|
-
} = department;
|
|
162
|
-
const isChecked = isSupportMultiple ? value.includes(id) : value === id;
|
|
163
|
-
return /*#__PURE__*/_react.default.createElement(Item, {
|
|
164
|
-
arrow: hasChild ? 'horizontal' : '',
|
|
165
|
-
key: "department-item-".concat(index),
|
|
166
|
-
multipleLine: true,
|
|
167
|
-
onClick: event => onDepartmentClick(event, department),
|
|
168
|
-
className: "dtable-ui-mobile-department-editor-department-item"
|
|
169
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
170
|
-
className: "d-flex"
|
|
171
|
-
}, /*#__PURE__*/_react.default.createElement(_DTableRadio.default, {
|
|
172
|
-
isChecked: isChecked,
|
|
173
|
-
onCheckedChange: event => onParentDepartmentClick(event, department),
|
|
174
|
-
label: name
|
|
175
|
-
})));
|
|
176
|
-
}));
|
|
177
|
-
}, [initColumnData, parentId, isFilterEditor, isSupportMultiple, departments, value, topParentIds, onParentDepartmentClick, onDepartmentClick]);
|
|
178
|
-
(0, _react.useEffect)(() => {
|
|
179
|
-
const {
|
|
180
|
-
enableSelectRange,
|
|
181
|
-
selectedRange,
|
|
182
|
-
specificDepartments
|
|
183
|
-
} = initColumnData;
|
|
184
|
-
if (enableSelectRange && !isFilterEditor) {
|
|
185
|
-
const {
|
|
186
|
-
current_user_department_ids = [],
|
|
187
|
-
current_user_department_and_sub_ids = []
|
|
188
|
-
} = userDepartmentIdsMap;
|
|
189
|
-
let targetDepartments = [];
|
|
190
|
-
let topParentIds = [];
|
|
191
|
-
let canExpand = true;
|
|
192
|
-
if (selectedRange === _dtableUtils.DEPARTMENT_SELECT_RANGE_MAP.CURRENT_USER_DEPARTMENT) {
|
|
193
|
-
canExpand = false;
|
|
194
|
-
topParentIds = current_user_department_ids;
|
|
195
|
-
targetDepartments = initialDepartments.filter(department => current_user_department_ids.includes(department.id));
|
|
196
|
-
} else if (selectedRange === _dtableUtils.DEPARTMENT_SELECT_RANGE_MAP.CURRENT_USER_DEPARTMENT_AND_SUB) {
|
|
197
|
-
const currentUserDepartments = initialDepartments.filter(department => current_user_department_ids.includes(department.id));
|
|
198
|
-
topParentIds = currentUserDepartments.filter(department => !current_user_department_ids.includes(department.parent_id)).map(department => department.id);
|
|
199
|
-
targetDepartments = initialDepartments.filter(department => current_user_department_and_sub_ids.includes(department.id));
|
|
200
|
-
} else {
|
|
201
|
-
canExpand = false;
|
|
202
|
-
topParentIds = specificDepartments;
|
|
203
|
-
targetDepartments = initialDepartments.filter(department => specificDepartments.includes(department.id));
|
|
204
|
-
}
|
|
205
|
-
const departments = (0, _departments.getNormalizedDepartments)(targetDepartments, canExpand);
|
|
206
|
-
setDepartments(departments);
|
|
207
|
-
setTopParentIds(topParentIds);
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
const departments = (0, _departments.getNormalizedDepartments)(initialDepartments);
|
|
211
|
-
setDepartments(departments);
|
|
212
|
-
setParentId(-1);
|
|
213
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
214
|
-
}, []);
|
|
215
|
-
return /*#__PURE__*/_react.default.createElement(_MobileFullScreenPage.default, {
|
|
216
|
-
className: "dtable-ui-mobile-department-editor",
|
|
217
|
-
onClose: onClose
|
|
218
|
-
}, /*#__PURE__*/_react.default.createElement(Header, {
|
|
219
|
-
onLeftClick: onLeftClick,
|
|
220
|
-
onRightClick: onSave
|
|
221
|
-
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderLeftContent()), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, column.name), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isFilterEditor ? null : /*#__PURE__*/_react.default.createElement("span", {
|
|
222
|
-
style: {
|
|
223
|
-
color: '#f09f3f'
|
|
224
|
-
}
|
|
225
|
-
}, (0, _lang.getLocale)('Submit')))), /*#__PURE__*/_react.default.createElement(Body, null, renderDepartments()));
|
|
226
|
-
};
|
|
227
|
-
var _default = exports.default = MBDepartmentSingleSelectEditor;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
.dtable-ui-mobile-digital-sign-editor .dtable-ui-mobile-full-screen-page-body {
|
|
2
|
-
position: relative;
|
|
3
|
-
flex: 1;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.dtable-ui-mobile-digital-sign-editor .dtable-ui-digital-sign-panel {
|
|
7
|
-
margin-top: 20px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.dtable-ui-mobile-digital-sign-editor .dtable-ui-digital-sign-editor-operations {
|
|
11
|
-
z-index: 3;
|
|
12
|
-
top: 10px;
|
|
13
|
-
right: 16px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.dtable-ui-mobile-digital-sign-editor .dtable-ui-digital-sign-editor-operations .btn-clear-dtable-ui-digital-sign {
|
|
17
|
-
color: rgb(240, 159, 63);
|
|
18
|
-
background-color: unset;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.dtable-ui-mobile-digital-sign-editor .dtable-ui-digital-sign-panel-mask {
|
|
22
|
-
top: 0;
|
|
23
|
-
left: 0;
|
|
24
|
-
z-index: 4;
|
|
25
|
-
height: 100%;
|
|
26
|
-
width: 100%;
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
justify-content: center;
|
|
30
|
-
background-color: rgba(0, 0, 0, .4);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.dtable-ui-mobile-digital-sign-editor .dtable-ui-digital-sign-panel-mask .dtable-ui-digital-sign-panel-mask-container {
|
|
34
|
-
color: #fff;
|
|
35
|
-
}
|