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
|
@@ -0,0 +1,84 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
9
|
+
class SelectEditorOption extends _react.default.Component {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.onDeleteOption = event => {
|
|
13
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
14
|
+
event.stopPropagation();
|
|
15
|
+
this.props.onDeleteSelectOption(this.props.option);
|
|
16
|
+
};
|
|
17
|
+
this.getContainerStyle = () => {
|
|
18
|
+
let option = this.props.option;
|
|
19
|
+
return {
|
|
20
|
+
display: 'inline-flex',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
marginRight: '10px',
|
|
23
|
+
padding: '0px 10px',
|
|
24
|
+
height: '20px',
|
|
25
|
+
borderRadius: '10px',
|
|
26
|
+
fontSize: '13px',
|
|
27
|
+
backgroundColor: option.color
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
this.getOptionStyle = option => {
|
|
31
|
+
const textColor = option.textColor || null;
|
|
32
|
+
return {
|
|
33
|
+
flex: 1,
|
|
34
|
+
display: 'flex',
|
|
35
|
+
alignContent: 'center',
|
|
36
|
+
margin: '0 4px 0 2px',
|
|
37
|
+
color: textColor
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
this.getOperationStyle = option => {
|
|
41
|
+
const textColor = option.textColor || null;
|
|
42
|
+
return {
|
|
43
|
+
height: '20px',
|
|
44
|
+
width: '16px',
|
|
45
|
+
cursor: 'pointer',
|
|
46
|
+
color: textColor === '#FFFFFF' ? '#FFFFFF' : '#909090',
|
|
47
|
+
transform: 'scale(.8)'
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
render() {
|
|
52
|
+
let {
|
|
53
|
+
option,
|
|
54
|
+
isShowRemoveIcon
|
|
55
|
+
} = this.props;
|
|
56
|
+
let containerStyle = this.getContainerStyle();
|
|
57
|
+
let optionStyle = this.getOptionStyle(option);
|
|
58
|
+
let operationStyle = this.getOperationStyle(option);
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
className: "dtable-ui select-option-item",
|
|
61
|
+
style: containerStyle
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
63
|
+
className: "option-info",
|
|
64
|
+
style: optionStyle
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: "option-name",
|
|
67
|
+
title: option.name
|
|
68
|
+
}, option.name)), isShowRemoveIcon && /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
+
className: "option-remove",
|
|
70
|
+
style: operationStyle,
|
|
71
|
+
onClick: this.onDeleteOption
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
73
|
+
className: "dtable-font dtable-icon-fork-number",
|
|
74
|
+
style: {
|
|
75
|
+
fontSize: '12px',
|
|
76
|
+
lineHeight: '20px'
|
|
77
|
+
}
|
|
78
|
+
})));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
SelectEditorOption.defaultProps = {
|
|
82
|
+
isShowRemoveIcon: false
|
|
83
|
+
};
|
|
84
|
+
var _default = exports.default = SelectEditorOption;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.initDateEditorLanguage = exports.getTrimmedString = exports.getSelectOptionItem = void 0;
|
|
7
7
|
const zhCN = require('@seafile/seafile-calendar/lib/locale/zh_CN');
|
|
8
8
|
const zhTW = require('@seafile/seafile-calendar/lib/locale/zh_TW');
|
|
9
9
|
const enUS = require('@seafile/seafile-calendar/lib/locale/en_US');
|
|
@@ -66,8 +66,4 @@ exports.getSelectOptionItem = getSelectOptionItem;
|
|
|
66
66
|
const getTrimmedString = value => {
|
|
67
67
|
return typeof value === 'string' ? value.trim() : '';
|
|
68
68
|
};
|
|
69
|
-
|
|
70
|
-
// min date and max date for mobile date picker
|
|
71
|
-
exports.getTrimmedString = getTrimmedString;
|
|
72
|
-
const minDate = exports.minDate = new Date('1900/01/01');
|
|
73
|
-
const maxDate = exports.maxDate = new Date('2100/12/31');
|
|
69
|
+
exports.getTrimmedString = getTrimmedString;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _constants = require("../constants");
|
|
8
7
|
const HTML = 'text/html';
|
|
9
8
|
const TEXT = 'text/plain';
|
|
10
9
|
// const FILES = 'files';
|
|
@@ -37,7 +36,7 @@ function getEventTransfer(event) {
|
|
|
37
36
|
let html;
|
|
38
37
|
let text;
|
|
39
38
|
let files;
|
|
40
|
-
if (
|
|
39
|
+
if (window.isMobile) {
|
|
41
40
|
if (window.dtableTransfer) {
|
|
42
41
|
text = window.dtableTransfer['TEXT'];
|
|
43
42
|
}
|
package/lib/utils/utils.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getTrimmedString = exports.getFormulaArrayValue = exports.getEventClassName = exports.getErrorMsg = exports.downloadFiles = exports.downloadFile = exports.debounce = void 0;
|
|
7
7
|
exports.isArrayFormatColumn = isArrayFormatColumn;
|
|
8
|
-
exports.throttle = exports.openUrlLink = exports.isValidUrl = exports.isValidCellValue = exports.
|
|
8
|
+
exports.throttle = exports.openUrlLink = exports.isValidUrl = exports.isValidCellValue = exports.isMobile = exports.isMac = exports.isFunction = void 0;
|
|
9
9
|
var _constants = require("../constants");
|
|
10
10
|
var _url = require("./url");
|
|
11
11
|
const debounce = (fn, wait) => {
|
|
@@ -34,22 +34,13 @@ const throttle = (func, delay) => {
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
exports.throttle = throttle;
|
|
37
|
+
const isMobile = exports.isMobile = typeof window !== 'undefined' && (window.innerWidth < 768 || navigator.userAgent.toLowerCase().match(/(ipod|ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null);
|
|
37
38
|
const isMac = () => {
|
|
38
39
|
const platform = navigator.platform;
|
|
39
40
|
// eslint-disable-next-line eqeqeq
|
|
40
41
|
return platform == 'Mac68K' || platform == 'MacPPC' || platform == 'Macintosh' || platform == 'MacIntel';
|
|
41
42
|
};
|
|
42
43
|
exports.isMac = isMac;
|
|
43
|
-
const isQQBuiltInBrowser = () => {
|
|
44
|
-
const userAgent = navigator.userAgent.toLowerCase();
|
|
45
|
-
return userAgent.indexOf(' qq') > -1 && userAgent.indexOf('mqqbrowser') < 0;
|
|
46
|
-
};
|
|
47
|
-
exports.isQQBuiltInBrowser = isQQBuiltInBrowser;
|
|
48
|
-
const isIPhone = () => {
|
|
49
|
-
const userAgent = navigator.userAgent.toLowerCase();
|
|
50
|
-
return /iphone/gi.test(userAgent);
|
|
51
|
-
};
|
|
52
|
-
exports.isIPhone = isIPhone;
|
|
53
44
|
const downloadFile = downloadUrl => {
|
|
54
45
|
const downloadFrame = document.getElementById('dtableUiComponentDownloadFrame');
|
|
55
46
|
if (downloadFrame != null) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "6.0.29-
|
|
3
|
+
"version": "6.0.29-beta13",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "4.0.2",
|
|
7
|
-
"@seafile/seafile-calendar": "0.0.
|
|
7
|
+
"@seafile/seafile-calendar": "0.0.24",
|
|
8
8
|
"@seafile/seafile-editor": "~2.0.6",
|
|
9
9
|
"antd-mobile": "2.3.1",
|
|
10
10
|
"classnames": "2.3.2",
|
package/lib/BodyPortal/index.js
DELETED
|
@@ -1,29 +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 _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
|
-
const canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
11
|
-
class BodyPortal extends _react.default.Component {
|
|
12
|
-
componentWillUnmount() {
|
|
13
|
-
if (this.defaultNode) {
|
|
14
|
-
document.body.removeChild(this.defaultNode);
|
|
15
|
-
}
|
|
16
|
-
this.defaultNode = null;
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
if (!canUseDOM) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
if (!this.props.node && !this.defaultNode) {
|
|
23
|
-
this.defaultNode = document.createElement('div');
|
|
24
|
-
document.body.appendChild(this.defaultNode);
|
|
25
|
-
}
|
|
26
|
-
return /*#__PURE__*/_reactDom.default.createPortal(this.props.children, this.props.node || this.defaultNode);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
var _default = exports.default = BodyPortal;
|
|
@@ -1,99 +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 _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var _SvgIcon = _interopRequireDefault(require("../SvgIcon"));
|
|
12
|
-
var _constants = require("../constants");
|
|
13
|
-
class MBCheckboxEditor extends _react.Component {
|
|
14
|
-
constructor(props) {
|
|
15
|
-
super(props);
|
|
16
|
-
this.getValue = () => {
|
|
17
|
-
const {
|
|
18
|
-
value
|
|
19
|
-
} = this.state;
|
|
20
|
-
return value;
|
|
21
|
-
};
|
|
22
|
-
this.updateValue = value => {
|
|
23
|
-
if (value === this.state.value) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
this.setState({
|
|
27
|
-
value
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
this.onChangeCheckboxValue = event => {
|
|
31
|
-
if (event) {
|
|
32
|
-
event.stopPropagation();
|
|
33
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
34
|
-
event.persist();
|
|
35
|
-
}
|
|
36
|
-
const {
|
|
37
|
-
value
|
|
38
|
-
} = this.state;
|
|
39
|
-
const newValue = !value;
|
|
40
|
-
this.setState({
|
|
41
|
-
value: newValue
|
|
42
|
-
}, () => {
|
|
43
|
-
this.props.onCommit && this.props.onCommit(newValue);
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
this.renderIcon = (symbol, color) => {
|
|
47
|
-
const className = (0, _classnames.default)('dtable-ui-checkbox-check-mark', {
|
|
48
|
-
'dtable-ui-checkbox-check-svg': !(symbol !== null && symbol !== void 0 && symbol.startsWith('dtable-icon'))
|
|
49
|
-
});
|
|
50
|
-
if (symbol.startsWith('dtable-icon')) {
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
52
|
-
className: "dtable-font ".concat(symbol, " ").concat(className || ''),
|
|
53
|
-
style: {
|
|
54
|
-
color
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return /*#__PURE__*/_react.default.createElement(_SvgIcon.default, {
|
|
59
|
-
className: className,
|
|
60
|
-
symbol: symbol,
|
|
61
|
-
color: color
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
this.state = {
|
|
65
|
-
value: props.value || false
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
componentDidUpdate(prevProps) {
|
|
69
|
-
const {
|
|
70
|
-
value
|
|
71
|
-
} = this.props;
|
|
72
|
-
if (value !== prevProps.value) {
|
|
73
|
-
this.setState({
|
|
74
|
-
value
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
render() {
|
|
79
|
-
var _column$data;
|
|
80
|
-
const {
|
|
81
|
-
className,
|
|
82
|
-
style,
|
|
83
|
-
column
|
|
84
|
-
} = this.props;
|
|
85
|
-
const {
|
|
86
|
-
value
|
|
87
|
-
} = this.state;
|
|
88
|
-
let checkboxStyle = column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style;
|
|
89
|
-
if (!checkboxStyle || Object.keys(checkboxStyle).length < 2) {
|
|
90
|
-
checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
|
|
91
|
-
}
|
|
92
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
93
|
-
className: (0, _classnames.default)('dtable-ui-checkbox-editor', className),
|
|
94
|
-
style: style || {},
|
|
95
|
-
onClick: this.onChangeCheckboxValue
|
|
96
|
-
}, value && this.renderIcon(checkboxStyle.type, checkboxStyle.color));
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
var _default = exports.default = MBCheckboxEditor;
|
|
@@ -1,118 +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 _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var _SvgIcon = _interopRequireDefault(require("../SvgIcon"));
|
|
12
|
-
var _constants = require("../constants");
|
|
13
|
-
class PCCheckboxEditor extends _react.Component {
|
|
14
|
-
constructor(props) {
|
|
15
|
-
super(props);
|
|
16
|
-
this.onKeyDown = event => {
|
|
17
|
-
const {
|
|
18
|
-
isEditorShow,
|
|
19
|
-
readOnly
|
|
20
|
-
} = this.props;
|
|
21
|
-
if (event.keyCode === _constants.KeyCodes.Enter && isEditorShow && !readOnly) {
|
|
22
|
-
this.setState({
|
|
23
|
-
value: !this.state.value
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
this.getValue = () => {
|
|
28
|
-
const {
|
|
29
|
-
value
|
|
30
|
-
} = this.state;
|
|
31
|
-
return value;
|
|
32
|
-
};
|
|
33
|
-
this.updateValue = value => {
|
|
34
|
-
if (value === this.state.value) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
this.setState({
|
|
38
|
-
value
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
this.onChangeCheckboxValue = event => {
|
|
42
|
-
if (event) {
|
|
43
|
-
event.stopPropagation();
|
|
44
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
45
|
-
event.persist();
|
|
46
|
-
}
|
|
47
|
-
const {
|
|
48
|
-
value
|
|
49
|
-
} = this.state;
|
|
50
|
-
const newValue = !value;
|
|
51
|
-
this.setState({
|
|
52
|
-
value: newValue
|
|
53
|
-
}, () => {
|
|
54
|
-
if (this.props.onCommit) {
|
|
55
|
-
this.props.onCommit(newValue);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
this.renderIcon = (symbol, color) => {
|
|
60
|
-
const className = (0, _classnames.default)('dtable-ui-checkbox-check-mark', {
|
|
61
|
-
'dtable-ui-checkbox-check-svg': !(symbol !== null && symbol !== void 0 && symbol.startsWith('dtable-icon'))
|
|
62
|
-
});
|
|
63
|
-
if (symbol.startsWith('dtable-icon')) {
|
|
64
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
65
|
-
className: "dtable-font ".concat(symbol, " ").concat(className || ''),
|
|
66
|
-
style: {
|
|
67
|
-
color
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement(_SvgIcon.default, {
|
|
72
|
-
className: className,
|
|
73
|
-
symbol: symbol,
|
|
74
|
-
color: color
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
this.state = {
|
|
78
|
-
value: props.value || false
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
componentDidMount() {
|
|
82
|
-
document.addEventListener('keydown', this.onKeyDown);
|
|
83
|
-
}
|
|
84
|
-
componentWillUnmount() {
|
|
85
|
-
document.removeEventListener('keydown', this.onKeyDown);
|
|
86
|
-
}
|
|
87
|
-
componentDidUpdate(prevProps) {
|
|
88
|
-
const {
|
|
89
|
-
value
|
|
90
|
-
} = this.props;
|
|
91
|
-
if (value !== prevProps.value) {
|
|
92
|
-
this.setState({
|
|
93
|
-
value
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
render() {
|
|
98
|
-
var _column$data;
|
|
99
|
-
const {
|
|
100
|
-
className,
|
|
101
|
-
style,
|
|
102
|
-
column
|
|
103
|
-
} = this.props;
|
|
104
|
-
const {
|
|
105
|
-
value
|
|
106
|
-
} = this.state;
|
|
107
|
-
let checkboxStyle = column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style;
|
|
108
|
-
if (!checkboxStyle || Object.keys(checkboxStyle).length < 2) {
|
|
109
|
-
checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
|
|
110
|
-
}
|
|
111
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
-
className: (0, _classnames.default)('dtable-ui-checkbox-editor', className),
|
|
113
|
-
style: style || {},
|
|
114
|
-
onClick: this.onChangeCheckboxValue
|
|
115
|
-
}, value && this.renderIcon(checkboxStyle.type, checkboxStyle.color));
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
var _default = exports.default = PCCheckboxEditor;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
@import url('../../css/mb-cell-editor.css');
|
|
2
|
-
|
|
3
|
-
.dtable-ui-mobile-collaborator-editor .dtable-ui-mobile-selector-option .dtable-ui-mobile-selector-option-name {
|
|
4
|
-
height: 36px !important;
|
|
5
|
-
line-height: 36px !important;
|
|
6
|
-
margin-top: 0px !important;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.dtable-ui-mobile-selector.dtable-ui-mobile-collaborator-editor .dtable-ui-mobile-selector-option {
|
|
10
|
-
font-size: 16px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.dtable-ui-mobile-collaborator-editor .dtable-ui-mobile-selector-option .dtable-ui.collaborator-item {
|
|
14
|
-
background-color: inherit;
|
|
15
|
-
border-radius: 0;
|
|
16
|
-
height: 100%;
|
|
17
|
-
width: 100%;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.dtable-ui-mobile-collaborator-editor .dtable-ui-mobile-selector-option .dtable-ui.collaborator-item .collaborator-avatar {
|
|
21
|
-
height: 2rem;
|
|
22
|
-
margin: 2px 0;
|
|
23
|
-
vertical-align: middle;
|
|
24
|
-
width: 2rem;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.dtable-ui-mobile-collaborator-editor .dtable-ui-mobile-selector-option .dtable-ui.collaborator-item .collaborator-avatar-icon {
|
|
28
|
-
border-radius: 50%;
|
|
29
|
-
height: 2rem;
|
|
30
|
-
width: 2rem;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.dtable-ui-mobile-collaborator-editor .dtable-ui-mobile-selector-option .dtable-ui.collaborator-item .collaborator-name {
|
|
34
|
-
height: 100%;
|
|
35
|
-
font-size: 16px;
|
|
36
|
-
line-height: 36px;
|
|
37
|
-
width: 100%;
|
|
38
|
-
overflow: hidden;
|
|
39
|
-
text-overflow: ellipsis;
|
|
40
|
-
white-space: nowrap;
|
|
41
|
-
}
|
|
@@ -1,88 +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 _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _dtableUtils = require("dtable-utils");
|
|
10
|
-
var _MobileSelector = _interopRequireDefault(require("../../MobileSelector"));
|
|
11
|
-
var _lang = require("../../lang");
|
|
12
|
-
var _CollaboratorItem = _interopRequireDefault(require("../../CollaboratorItem"));
|
|
13
|
-
require("./index.css");
|
|
14
|
-
const {
|
|
15
|
-
Search,
|
|
16
|
-
Option,
|
|
17
|
-
Options,
|
|
18
|
-
Empty
|
|
19
|
-
} = _MobileSelector.default;
|
|
20
|
-
class MBCollaboratorEditor extends _react.default.Component {
|
|
21
|
-
constructor(props) {
|
|
22
|
-
super(props);
|
|
23
|
-
this.handleHistoryBack = e => {
|
|
24
|
-
e.preventDefault();
|
|
25
|
-
this.props.onClose();
|
|
26
|
-
};
|
|
27
|
-
this.onChangeSearch = newValue => {
|
|
28
|
-
let {
|
|
29
|
-
searchVal
|
|
30
|
-
} = this.state;
|
|
31
|
-
if (searchVal === newValue) return;
|
|
32
|
-
this.setState({
|
|
33
|
-
searchVal: newValue
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
this.onChange = collaborator => {
|
|
37
|
-
this.props.onCommit(collaborator);
|
|
38
|
-
};
|
|
39
|
-
this.renderCollaborators = collaborators => {
|
|
40
|
-
const {
|
|
41
|
-
value = []
|
|
42
|
-
} = this.props;
|
|
43
|
-
return collaborators.map(collaborator => {
|
|
44
|
-
const isSelected = value.includes(collaborator.email);
|
|
45
|
-
return /*#__PURE__*/_react.default.createElement(Option, {
|
|
46
|
-
key: collaborator.email,
|
|
47
|
-
isSelected: isSelected,
|
|
48
|
-
onChange: this.onChange.bind(this, collaborator)
|
|
49
|
-
}, /*#__PURE__*/_react.default.createElement(_CollaboratorItem.default, {
|
|
50
|
-
collaborator: collaborator
|
|
51
|
-
}));
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
this.state = {
|
|
55
|
-
searchVal: ''
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
componentDidMount() {
|
|
59
|
-
history.pushState(null, null, '#'); // eslint-disable-line
|
|
60
|
-
window.addEventListener('popstate', this.handleHistoryBack, false);
|
|
61
|
-
}
|
|
62
|
-
componentWillUnmount() {
|
|
63
|
-
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
64
|
-
}
|
|
65
|
-
render() {
|
|
66
|
-
const {
|
|
67
|
-
column,
|
|
68
|
-
collaborators
|
|
69
|
-
} = this.props;
|
|
70
|
-
const {
|
|
71
|
-
searchVal
|
|
72
|
-
} = this.state;
|
|
73
|
-
const displayCollaborators = searchVal ? (0, _dtableUtils.searchCollaborators)(collaborators, searchVal) : collaborators;
|
|
74
|
-
return /*#__PURE__*/_react.default.createElement(_MobileSelector.default, {
|
|
75
|
-
onClose: this.props.onClose,
|
|
76
|
-
title: column.name,
|
|
77
|
-
className: "dtable-ui-mobile-collaborator-editor"
|
|
78
|
-
}, collaborators.length > 10 && /*#__PURE__*/_react.default.createElement(Search, {
|
|
79
|
-
value: searchVal,
|
|
80
|
-
placeholder: (0, _lang.getLocale)('Search_collaborator'),
|
|
81
|
-
onChange: this.onChangeSearch
|
|
82
|
-
}), /*#__PURE__*/_react.default.createElement(Options, null, displayCollaborators.length === 0 && /*#__PURE__*/_react.default.createElement(Empty, null, (0, _lang.getLocale)('No_collaborators_available')), displayCollaborators.length > 0 && this.renderCollaborators(displayCollaborators)));
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
MBCollaboratorEditor.defaultProps = {
|
|
86
|
-
value: []
|
|
87
|
-
};
|
|
88
|
-
var _default = exports.default = MBCollaboratorEditor;
|
|
@@ -1,118 +0,0 @@
|
|
|
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
|
-
}
|