dtable-ui-component 6.0.29 → 6.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/BodyPortal/index.js +29 -0
- package/lib/CheckboxEditor/index.js +24 -116
- package/lib/CheckboxEditor/mb-editor.js +99 -0
- package/lib/CheckboxEditor/pc-editor.js +118 -0
- package/lib/CollaboratorEditor/index.js +23 -11
- package/lib/CollaboratorEditor/mb-editor/index.css +41 -0
- package/lib/CollaboratorEditor/mb-editor/index.js +88 -0
- package/lib/DTableCommonAddTool/index.js +1 -3
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +6 -6
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +6 -6
- package/lib/DateEditor/index.js +69 -95
- package/lib/DateEditor/mb-editor/custom-rc-calendar.css +118 -0
- package/lib/DateEditor/mb-editor/index.css +39 -0
- package/lib/DateEditor/mb-editor/index.js +215 -0
- package/lib/DateEditor/{pc-date-editor-popover.js → pc-editor.js} +9 -9
- package/lib/{Department-editor/department-multiple-select → DepartmentMultipleSelectEditor}/index.js +6 -6
- package/lib/DepartmentSingleSelectEditor/index.js +34 -0
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.css +4 -0
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +227 -0
- package/lib/{Department-editor → DepartmentSingleSelectEditor/pc-editor}/department-single-select.js +7 -7
- package/lib/{Department-editor → DepartmentSingleSelectEditor/pc-editor}/index.css +10 -3
- package/lib/{Department-editor → DepartmentSingleSelectEditor/pc-editor}/index.js +8 -25
- package/lib/DigitalSignEditor/index.js +24 -171
- package/lib/DigitalSignEditor/mb-editor/index.css +35 -0
- package/lib/DigitalSignEditor/mb-editor/index.js +144 -0
- package/lib/DigitalSignEditor/pc-editor/index.js +181 -0
- package/lib/FileEditor/files-previewer/index.js +26 -268
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +122 -0
- package/lib/FileEditor/files-previewer/mb-previewer/index.css +39 -0
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +64 -0
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/dropdown-menu.js +1 -1
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/file-name-editor/index.js +1 -1
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/index.css +0 -2
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/index.js +2 -2
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +276 -0
- package/lib/FileEditor/index.css +0 -5
- package/lib/FileEditor/index.js +26 -265
- package/lib/FileEditor/mb-editor/index.css +10 -0
- package/lib/FileEditor/mb-editor/index.js +136 -0
- package/lib/FileEditor/pc-editor/addition-previewer/index.css +1 -0
- package/lib/FileEditor/{addition-previewer → pc-editor/addition-previewer}/index.js +1 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.css +1 -0
- package/lib/FileEditor/{addition-previewer → pc-editor/addition-previewer}/local-file-addition/index.js +4 -4
- package/lib/FileEditor/pc-editor/index.css +5 -0
- package/lib/FileEditor/pc-editor/index.js +274 -0
- package/lib/FormulaFormatter/index.css +5 -5
- package/lib/GeolocationEditor/index.js +92 -230
- package/lib/GeolocationEditor/map-editor-utils.js +10 -4
- package/lib/GeolocationEditor/mb-editor/country-editor.js +79 -0
- package/lib/GeolocationEditor/mb-editor/index.css +11 -0
- package/lib/GeolocationEditor/mb-editor/index.js +125 -0
- package/lib/GeolocationEditor/mb-editor/location-editor.js +101 -0
- package/lib/GeolocationEditor/mb-editor/map-editor/index.css +11 -0
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +474 -0
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.css +158 -0
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +530 -0
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +77 -0
- package/lib/GeolocationEditor/mb-editor/province-editor.js +76 -0
- package/lib/GeolocationEditor/{country-editor.js → pc-editor/country-editor.js} +5 -49
- package/lib/GeolocationEditor/{index.css → pc-editor/index.css} +3 -4
- package/lib/GeolocationEditor/pc-editor/index.js +247 -0
- package/lib/GeolocationEditor/{location-editor.js → pc-editor/location-editor.js} +8 -41
- package/lib/GeolocationEditor/{map-editor → pc-editor/map-editor}/index.js +6 -6
- package/lib/GeolocationEditor/{map-editor → pc-editor/map-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/{map-selection-editor → pc-editor/map-selection-editor}/index.js +7 -7
- package/lib/GeolocationEditor/{map-selection-editor → pc-editor/map-selection-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/{province-city-editor.js → pc-editor/province-city-editor.js} +7 -38
- package/lib/GeolocationEditor/{province-editor.js → pc-editor/province-editor.js} +7 -31
- package/lib/GeolocationEditor/{selector-header-item.js → pc-editor/selector-header-item.js} +1 -1
- package/lib/ImageEditor/images-previewer/image-preview/index.js +3 -3
- package/lib/ImageEditor/images-previewer/index.js +9 -4
- package/lib/ImageEditor/index.css +17 -16
- package/lib/ImageEditor/index.js +26 -185
- package/lib/ImageEditor/mb-editor/index.css +29 -0
- package/lib/ImageEditor/mb-editor/index.js +136 -0
- package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/image-link/index.js +1 -1
- package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/index.js +1 -1
- package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/local-image-addition/index.js +4 -4
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +140 -0
- package/lib/ImageEditor/pc-editor/index.css +24 -0
- package/lib/ImageEditor/pc-editor/index.js +194 -0
- package/lib/ImageThumbnail/index.js +2 -1
- package/lib/LinkEditor/index.js +5 -5
- package/lib/LinkEditor/{mb-link-editor-popover → mb-popover}/index.css +1 -1
- package/lib/MobileFullScreenPage/body/index.css +9 -0
- package/lib/MobileFullScreenPage/body/index.js +23 -0
- package/lib/MobileFullScreenPage/header/index.css +39 -0
- package/lib/MobileFullScreenPage/header/index.js +38 -0
- package/lib/MobileFullScreenPage/index.css +13 -0
- package/lib/MobileFullScreenPage/index.js +73 -0
- package/lib/MobileModal/index.js +41 -0
- package/lib/MobileOperationSheet/index.css +27 -0
- package/lib/MobileOperationSheet/index.js +92 -0
- package/lib/MobileSelector/empty/index.css +3 -0
- package/lib/MobileSelector/empty/index.js +23 -0
- package/lib/MobileSelector/index.css +32 -0
- package/lib/MobileSelector/index.js +57 -0
- package/lib/MobileSelector/option/index.css +28 -0
- package/lib/MobileSelector/option/index.js +36 -0
- package/lib/MobileSelector/options/index.css +8 -0
- package/lib/MobileSelector/options/index.js +18 -0
- package/lib/MobileSelector/search/index.css +7 -0
- package/lib/MobileSelector/search/index.js +26 -0
- package/lib/MobileUpload/index.css +1 -0
- package/lib/MobileUpload/index.js +160 -0
- package/lib/MultipleSelectEditor/index.js +9 -14
- package/lib/RowExpand/index.js +24 -0
- package/lib/RowExpandDialog/column-content/index.js +2 -2
- package/lib/RowExpandDialog/index.js +2 -0
- package/lib/RowExpandEditor/add-btn/index.js +24 -0
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.css +3 -0
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +19 -0
- package/lib/RowExpandEditor/{RowExpandAddBtn → add-btn/pc-add-btn}/index.js +6 -4
- package/lib/RowExpandEditor/checkbox-editor/index.js +25 -0
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.css +6 -0
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +36 -0
- package/lib/RowExpandEditor/{RowExpandCheckboxEditor/index.js → checkbox-editor/pc-editor.js} +9 -13
- package/lib/RowExpandEditor/collaborator-editor/index.js +24 -0
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.css +9 -0
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +163 -0
- package/lib/RowExpandEditor/{RowExpandCollaboratorEditor → collaborator-editor/pc-editor}/index.css +1 -1
- package/lib/RowExpandEditor/{RowExpandCollaboratorEditor → collaborator-editor/pc-editor}/index.js +6 -7
- package/lib/RowExpandEditor/constants.js +34 -34
- package/lib/RowExpandEditor/date-editor/index.js +24 -0
- package/lib/RowExpandEditor/date-editor/mb-editor.js +82 -0
- package/lib/RowExpandEditor/{RowExpandDateEditor/index.js → date-editor/pc-editor.js} +2 -2
- package/lib/RowExpandEditor/department-editor/index.js +24 -0
- package/lib/RowExpandEditor/department-editor/mb-editor.js +65 -0
- package/lib/RowExpandEditor/{RowExpandDepartmentEditor/index.js → department-editor/pc-editor.js} +44 -49
- package/lib/RowExpandEditor/digital-sign-editor/index.js +24 -0
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.css +1 -0
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +130 -0
- package/lib/RowExpandEditor/{RowExpandDigitalSignEditor → digital-sign-editor/pc-editor}/index.css +1 -1
- package/lib/RowExpandEditor/{RowExpandDigitalSignEditor → digital-sign-editor/pc-editor}/index.js +11 -11
- package/lib/RowExpandEditor/duration-editor/index.js +24 -0
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +71 -0
- package/lib/RowExpandEditor/{RowExpandDurationEditor/index.js → duration-editor/pc-editor.js} +2 -2
- package/lib/RowExpandEditor/email-editor/index.js +24 -0
- package/lib/RowExpandEditor/email-editor/mb-editor/index.css +1 -0
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +84 -0
- package/lib/RowExpandEditor/email-editor/pc-editor/index.css +1 -0
- package/lib/RowExpandEditor/{RowExpandEmailEditor → email-editor/pc-editor}/index.js +3 -3
- package/lib/RowExpandEditor/file-editor/index.js +24 -0
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +114 -0
- package/lib/RowExpandEditor/file-editor/pc-editor/index.css +1 -0
- package/lib/RowExpandEditor/{RowExpandFileEditor → file-editor/pc-editor}/index.js +9 -9
- package/lib/RowExpandEditor/geolocation-editor/index.js +24 -0
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +100 -0
- package/lib/RowExpandEditor/{RowExpandGeolocationEditor → geolocation-editor/pc-editor}/index.js +17 -13
- package/lib/RowExpandEditor/image-editor/index.js +24 -0
- package/lib/RowExpandEditor/image-editor/mb-editor/index.css +30 -0
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +109 -0
- package/lib/RowExpandEditor/{RowExpandImageEditor → image-editor/pc-editor}/index.js +9 -9
- package/lib/RowExpandEditor/long-text-editor/index.js +24 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.css +10 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +80 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.css +3 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +91 -0
- package/lib/RowExpandEditor/{RowExpandLongTextEditor → long-text-editor/pc-editor}/index.js +7 -7
- package/lib/RowExpandEditor/multiple-select-editor/index.js +24 -0
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +154 -0
- package/lib/RowExpandEditor/{RowExpandMultipleSelectEditor → multiple-select-editor/pc-editor}/index.css +1 -1
- package/lib/RowExpandEditor/{RowExpandMultipleSelectEditor → multiple-select-editor/pc-editor}/index.js +6 -6
- package/lib/RowExpandEditor/number-editor/index.js +24 -0
- package/lib/RowExpandEditor/number-editor/mb-editor/index.css +3 -0
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +76 -0
- package/lib/RowExpandEditor/{RowExpandNumberEditor/index.js → number-editor/pc-editor.js} +2 -2
- package/lib/RowExpandEditor/rate-editor/index.css +34 -0
- package/lib/RowExpandEditor/rate-editor/index.js +25 -0
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +92 -0
- package/lib/RowExpandEditor/{RowExpandRateEditor/index.js → rate-editor/pc-editor.js} +2 -3
- package/lib/RowExpandEditor/right-angle/index.css +6 -0
- package/lib/RowExpandEditor/right-angle/index.js +17 -0
- package/lib/RowExpandEditor/single-select-editor/index.js +24 -0
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.css +8 -0
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +134 -0
- package/lib/RowExpandEditor/{RowExpandSingleSelectorEditor → single-select-editor/pc-editor}/index.js +17 -17
- package/lib/RowExpandEditor/text-editor/index.js +24 -0
- package/lib/RowExpandEditor/text-editor/mb-editor/index.css +14 -0
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +37 -0
- package/lib/RowExpandEditor/{RowExpandTextEditor → text-editor/pc-editor}/index.js +7 -7
- package/lib/RowExpandEditor/url-editor/index.js +24 -0
- package/lib/RowExpandEditor/url-editor/mb-editor/index.css +17 -0
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +87 -0
- package/lib/RowExpandEditor/{RowExpandUrlEditor → url-editor/pc-editor}/index.js +6 -6
- package/lib/RowExpandFormatter/constants.js +17 -17
- package/lib/RowExpandFormatter/department-formatter/index.js +19 -0
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +20 -0
- package/lib/RowExpandFormatter/{RowExpandDepartmentFormatter/index.js → department-formatter/pc-formatter.js} +2 -2
- package/lib/RowExpandFormatter/{RowExpandEmailFormatter → email-formatter}/index.css +4 -4
- package/lib/RowExpandFormatter/index.css +33 -18
- package/lib/RowExpandFormatter/index.js +1 -1
- package/lib/RowExpandFormatter/rate-formatter/index.css +5 -0
- package/lib/RowExpandView/body/index.css +173 -0
- package/lib/RowExpandView/body/index.js +111 -0
- package/lib/RowExpandView/column-content/index.css +27 -0
- package/lib/RowExpandView/column-content/index.js +25 -0
- package/lib/RowExpandView/index.css +3 -0
- package/lib/RowExpandView/index.js +178 -0
- package/lib/SelectItem/index.js +57 -33
- package/lib/{Department-editor/selected-departments → SelectedDepartments}/index.css +0 -1
- package/lib/{Department-editor/selected-departments → SelectedDepartments}/index.js +3 -3
- package/lib/SingleSelectEditor/index.js +9 -14
- package/lib/SvgIcon/index.js +2 -1
- package/lib/constants/index.js +3 -2
- package/lib/css/am.css +0 -25
- package/lib/css/mb-cell-editor.css +1 -1
- package/lib/index.js +62 -6
- package/lib/locales/de.json +3 -1
- package/lib/locales/en.json +3 -1
- package/lib/locales/es.json +3 -1
- package/lib/locales/fr.json +3 -1
- package/lib/locales/pt.json +3 -1
- package/lib/locales/ru.json +3 -1
- package/lib/locales/zh-CN.json +3 -1
- package/lib/select-editor/index.js +27 -20
- package/lib/select-editor/mb-editor/index.css +1 -0
- package/lib/select-editor/mb-editor/index.js +105 -0
- package/lib/select-editor/{pc-select-editor → pc-editor}/index.css +1 -1
- package/lib/select-editor/{pc-select-editor → pc-editor}/index.js +7 -7
- package/lib/utils/editor-utils.js +6 -2
- package/lib/utils/get-event-transfer.js +2 -1
- package/lib/utils/utils.js +11 -2
- package/package.json +5 -5
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.css +0 -85
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.js +0 -148
- package/lib/DateEditor/mb-date-editor-popover/custom-rc-calendar.css +0 -118
- package/lib/DateEditor/mb-date-editor-popover/index.css +0 -45
- package/lib/DateEditor/mb-date-editor-popover/index.js +0 -226
- package/lib/FileEditor/addition-previewer/index.css +0 -1
- package/lib/FileEditor/addition-previewer/local-file-addition/index.css +0 -1
- package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +0 -2
- package/lib/RowExpandEditor/RowExpandFileEditor/index.css +0 -1
- package/lib/RowExpandEditor/RowExpandRateEditor/index.css +0 -13
- package/lib/RowExpandFormatter/RowExpandRateFormatter/index.css +0 -5
- package/lib/select-editor/mb-select-editor/index.css +0 -127
- package/lib/select-editor/mb-select-editor/index.js +0 -197
- package/lib/select-editor/select-editor-option.js +0 -84
- /package/lib/CollaboratorEditor/{pc-collaborator-editor → pc-editor}/index.css +0 -0
- /package/lib/CollaboratorEditor/{pc-collaborator-editor → pc-editor}/index.js +0 -0
- /package/lib/{Department-editor/department-multiple-select → DepartmentMultipleSelectEditor}/index.css +0 -0
- /package/lib/DigitalSignEditor/{index.css → pc-editor/index.css} +0 -0
- /package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/file-name-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{map-editor → pc-editor/map-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{map-selection-editor → pc-editor/map-selection-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{parse-geolocation.js → pc-editor/parse-geolocation.js} +0 -0
- /package/lib/GeolocationEditor/{selector-list.js → pc-editor/selector-list.js} +0 -0
- /package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/image-link/index.css +0 -0
- /package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/index.css +0 -0
- /package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/local-image-addition/index.css +0 -0
- /package/lib/LinkEditor/{mb-link-editor-popover → mb-popover}/index.js +0 -0
- /package/lib/LinkEditor/{pc-link-editor-popover → pc-popover}/index.css +0 -0
- /package/lib/LinkEditor/{pc-link-editor-popover → pc-popover}/index.js +0 -0
- /package/lib/RowExpandEditor/{RowExpandAddBtn → add-btn/pc-add-btn}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandCheckboxEditor → checkbox-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandGeolocationEditor → geolocation-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandImageEditor → image-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandLongTextEditor → long-text-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandSingleSelectorEditor → single-select-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandTextEditor → text-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandUrlEditor → url-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandEmailFormatter → email-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFileFormatter → file-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFileFormatter → file-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFileFormatter → file-formatter}/row-expand-file-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFormulaFormatter → formula-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandImageFormatter → image-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandImageFormatter → image-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandImageFormatter → image-formatter}/row-expand-image-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/collaborator-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/value-display-utils.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandRateFormatter → rate-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandUrlFormatter → url-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandUrlFormatter → url-formatter}/index.js +0 -0
- /package/lib/{Department-editor/constants.js → constants/departments.js} +0 -0
- /package/lib/{Department-editor/utils.js → utils/departments.js} +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
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 _rightAngle = _interopRequireDefault(require("../right-angle"));
|
|
11
|
+
var _addBtn = _interopRequireDefault(require("../add-btn"));
|
|
12
|
+
var _DepartmentSingleSelectFormatter = _interopRequireDefault(require("../../DepartmentSingleSelectFormatter"));
|
|
13
|
+
var _DepartmentSingleSelectEditor = _interopRequireDefault(require("../../DepartmentSingleSelectEditor"));
|
|
14
|
+
var _lang = require("../../lang");
|
|
15
|
+
const RowExpandMBDepartmentEditor = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
row,
|
|
18
|
+
column,
|
|
19
|
+
valueKey,
|
|
20
|
+
departments,
|
|
21
|
+
userDepartmentIdsMap,
|
|
22
|
+
onCommit
|
|
23
|
+
} = _ref;
|
|
24
|
+
const [value, setValue] = (0, _react.useState)(row[column[valueKey]] || '');
|
|
25
|
+
const [showEditor, setShowEditor] = (0, _react.useState)(false);
|
|
26
|
+
const openEditor = (0, _react.useCallback)(() => {
|
|
27
|
+
setShowEditor(true);
|
|
28
|
+
}, []);
|
|
29
|
+
const closeEditor = (0, _react.useCallback)(() => {
|
|
30
|
+
setShowEditor(false);
|
|
31
|
+
}, []);
|
|
32
|
+
const onChange = (0, _react.useCallback)(newValue => {
|
|
33
|
+
if (newValue === value) return;
|
|
34
|
+
setValue(newValue);
|
|
35
|
+
onCommit && onCommit(newValue);
|
|
36
|
+
}, [value, onCommit]);
|
|
37
|
+
(0, _react.useEffect)(() => {
|
|
38
|
+
setValue(row[column[valueKey]] || '');
|
|
39
|
+
setShowEditor(false);
|
|
40
|
+
// eslint-disable-next-line
|
|
41
|
+
}, [row, column]);
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
+
className: "dtable-ui dtable-ui-mobile-row-expand-options-editor position-relative",
|
|
44
|
+
onClick: openEditor
|
|
45
|
+
}, value ? /*#__PURE__*/_react.default.createElement("div", {
|
|
46
|
+
style: {
|
|
47
|
+
height: 50,
|
|
48
|
+
padding: '14px 0'
|
|
49
|
+
}
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(_DepartmentSingleSelectFormatter.default, {
|
|
51
|
+
value: value,
|
|
52
|
+
departments: departments
|
|
53
|
+
})) : /*#__PURE__*/_react.default.createElement(_addBtn.default, {
|
|
54
|
+
text: (0, _lang.getLocale)('Choose_a_department')
|
|
55
|
+
}), /*#__PURE__*/_react.default.createElement(_rightAngle.default, null)), showEditor && /*#__PURE__*/_react.default.createElement(_DepartmentSingleSelectEditor.default, {
|
|
56
|
+
enableSelectRange: false,
|
|
57
|
+
column: column,
|
|
58
|
+
value: value,
|
|
59
|
+
onCommit: onChange,
|
|
60
|
+
userDepartmentIdsMap: userDepartmentIdsMap,
|
|
61
|
+
departments: departments,
|
|
62
|
+
onClose: closeEditor
|
|
63
|
+
}));
|
|
64
|
+
};
|
|
65
|
+
var _default = exports.default = RowExpandMBDepartmentEditor;
|
package/lib/RowExpandEditor/{RowExpandDepartmentEditor/index.js → department-editor/pc-editor.js}
RENAMED
|
@@ -8,71 +8,63 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var _hooks = require("../../hooks");
|
|
12
11
|
var _DepartmentSingleSelectFormatter = _interopRequireDefault(require("../../DepartmentSingleSelectFormatter"));
|
|
13
12
|
var _constants = require("../../constants");
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
var _DepartmentSingleSelectEditor = _interopRequireDefault(require("../../DepartmentSingleSelectEditor"));
|
|
14
|
+
const RowExpandPCDepartmentEditor = _ref => {
|
|
15
|
+
let {
|
|
17
16
|
row,
|
|
18
17
|
column,
|
|
19
18
|
valueKey,
|
|
20
19
|
departments,
|
|
21
20
|
userDepartmentIdsMap,
|
|
22
21
|
isEditorFocus,
|
|
23
|
-
columnIndex
|
|
24
|
-
|
|
22
|
+
columnIndex,
|
|
23
|
+
onCommit,
|
|
24
|
+
updateTabIndex
|
|
25
|
+
} = _ref;
|
|
25
26
|
const [value, setValue] = (0, _react.useState)(row[column[valueKey]] || '');
|
|
26
27
|
const [showEditor, setShowEditor] = (0, _react.useState)(false);
|
|
27
28
|
const departmentSelectContainer = (0, _react.useRef)(null);
|
|
28
29
|
const departmentSelectContent = (0, _react.useRef)(null);
|
|
29
|
-
(0,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const onKeyDown = (0, _react.useCallback)(event => {
|
|
31
|
+
if (event.keyCode === _constants.KeyCodes.Enter && isEditorFocus && !showEditor) {
|
|
32
|
+
setShowEditor(true);
|
|
33
|
+
} else if (event.keyCode === _constants.KeyCodes.Escape && showEditor) {
|
|
34
|
+
event.stopPropagation();
|
|
35
|
+
setShowEditor(false);
|
|
36
|
+
departmentSelectContent.current.focus();
|
|
37
|
+
}
|
|
38
|
+
}, [isEditorFocus, showEditor]);
|
|
39
|
+
const onToggleSelect = (0, _react.useCallback)(event => {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
event.stopPropagation();
|
|
42
|
+
updateTabIndex(columnIndex);
|
|
43
|
+
setShowEditor(true);
|
|
44
|
+
}, [columnIndex, updateTabIndex]);
|
|
45
|
+
const onFocus = (0, _react.useCallback)(() => {
|
|
46
|
+
updateTabIndex(columnIndex);
|
|
47
|
+
}, [columnIndex, updateTabIndex]);
|
|
48
|
+
const handleCommit = (0, _react.useCallback)(newValue => {
|
|
49
|
+
setShowEditor(false);
|
|
50
|
+
if (newValue === value) return;
|
|
51
|
+
setValue(newValue);
|
|
52
|
+
onCommit(newValue);
|
|
53
|
+
}, [value, onCommit]);
|
|
54
|
+
const closeEditor = (0, _react.useCallback)(() => {
|
|
55
|
+
setShowEditor(false);
|
|
56
|
+
}, []);
|
|
33
57
|
(0, _react.useEffect)(() => {
|
|
34
58
|
document.addEventListener('keydown', onKeyDown);
|
|
35
59
|
return () => {
|
|
36
60
|
document.removeEventListener('keydown', onKeyDown);
|
|
37
61
|
};
|
|
38
|
-
|
|
39
|
-
}, [isEditorFocus, showEditor]);
|
|
62
|
+
}, [onKeyDown]);
|
|
40
63
|
(0, _react.useEffect)(() => {
|
|
41
64
|
setValue(row[column[valueKey]] || '');
|
|
42
65
|
setShowEditor(false);
|
|
43
66
|
// eslint-disable-next-line
|
|
44
|
-
}, [row]);
|
|
45
|
-
function hideDropDownMenu(event) {
|
|
46
|
-
if (!event.target) return;
|
|
47
|
-
toggleDepartmentSelect(false);
|
|
48
|
-
}
|
|
49
|
-
function onKeyDown(e) {
|
|
50
|
-
if (e.keyCode === _constants.KeyCodes.Enter && props.isEditorFocus && !showEditor) {
|
|
51
|
-
setShowEditor(true);
|
|
52
|
-
} else if (e.keyCode === _constants.KeyCodes.Escape && showEditor) {
|
|
53
|
-
e.stopPropagation();
|
|
54
|
-
setShowEditor(false);
|
|
55
|
-
departmentSelectContent.current.focus();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function toggleDepartmentSelect(value) {
|
|
59
|
-
setShowEditor(value);
|
|
60
|
-
}
|
|
61
|
-
function onToggleSelect(e) {
|
|
62
|
-
e.preventDefault();
|
|
63
|
-
e.stopPropagation();
|
|
64
|
-
props.updateTabIndex(columnIndex);
|
|
65
|
-
toggleDepartmentSelect(true);
|
|
66
|
-
}
|
|
67
|
-
function onFocus() {
|
|
68
|
-
props.updateTabIndex(columnIndex);
|
|
69
|
-
}
|
|
70
|
-
function onCommit(newValue) {
|
|
71
|
-
toggleDepartmentSelect(false);
|
|
72
|
-
if (newValue === value) return;
|
|
73
|
-
setValue(newValue);
|
|
74
|
-
props.onCommit(newValue);
|
|
75
|
-
}
|
|
67
|
+
}, [row, column]);
|
|
76
68
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
77
69
|
className: "position-relative w-100",
|
|
78
70
|
ref: departmentSelectContainer
|
|
@@ -92,13 +84,16 @@ function RowExpandDepartmentEditor(props) {
|
|
|
92
84
|
})), /*#__PURE__*/_react.default.createElement("i", {
|
|
93
85
|
"aria-hidden": "true",
|
|
94
86
|
className: "dtable-font dtable-icon-down3"
|
|
95
|
-
}))), showEditor && /*#__PURE__*/_react.default.createElement(
|
|
87
|
+
}))), showEditor && /*#__PURE__*/_react.default.createElement(_DepartmentSingleSelectEditor.default, {
|
|
88
|
+
isInModal: true,
|
|
96
89
|
enableSelectRange: false,
|
|
90
|
+
target: departmentSelectContent.current,
|
|
97
91
|
column: column,
|
|
98
92
|
value: value,
|
|
99
|
-
onCommit:
|
|
93
|
+
onCommit: handleCommit,
|
|
100
94
|
userDepartmentIdsMap: userDepartmentIdsMap,
|
|
101
|
-
departments: departments
|
|
95
|
+
departments: departments,
|
|
96
|
+
toggleDepartmentSelect: closeEditor
|
|
102
97
|
}));
|
|
103
|
-
}
|
|
104
|
-
var _default = exports.default =
|
|
98
|
+
};
|
|
99
|
+
var _default = exports.default = RowExpandPCDepartmentEditor;
|
|
@@ -0,0 +1,24 @@
|
|
|
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 RowExpandDigitalSignEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
15
|
+
query: "(min-width: 768px)"
|
|
16
|
+
}, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
17
|
+
ref: ref
|
|
18
|
+
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
19
|
+
query: "(max-width: 768px)"
|
|
20
|
+
}, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
21
|
+
ref: ref
|
|
22
|
+
}))));
|
|
23
|
+
});
|
|
24
|
+
var _default = exports.default = RowExpandDigitalSignEditor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('../../image-editor/mb-editor/index.css');
|
|
@@ -0,0 +1,130 @@
|
|
|
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 _ImageThumbnail = _interopRequireDefault(require("../../../ImageThumbnail"));
|
|
10
|
+
var _utils = _interopRequireDefault(require("../../../DigitalSignEditor/utils"));
|
|
11
|
+
var _addBtn = _interopRequireDefault(require("../../add-btn"));
|
|
12
|
+
var _DigitalSignEditor = _interopRequireDefault(require("../../../DigitalSignEditor"));
|
|
13
|
+
var _lang = require("../../../lang");
|
|
14
|
+
var _url = require("../../../utils/url");
|
|
15
|
+
require("./index.css");
|
|
16
|
+
class RowExpandMBDigitalSignEditor extends _react.default.Component {
|
|
17
|
+
constructor(props) {
|
|
18
|
+
super(props);
|
|
19
|
+
this.toggleEditor = () => {
|
|
20
|
+
this.setState({
|
|
21
|
+
isShowEditor: !this.state.isShowEditor
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
this.onCommit = value => {
|
|
25
|
+
this.props.onCommit(value);
|
|
26
|
+
this.setState({
|
|
27
|
+
updated: value,
|
|
28
|
+
isShowEditor: false
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
this.getValue = () => {
|
|
32
|
+
const {
|
|
33
|
+
column,
|
|
34
|
+
row,
|
|
35
|
+
valueKey
|
|
36
|
+
} = this.props;
|
|
37
|
+
const {
|
|
38
|
+
updated
|
|
39
|
+
} = this.state;
|
|
40
|
+
return updated ? updated : row[column[valueKey]];
|
|
41
|
+
};
|
|
42
|
+
this.deleteImage = () => {
|
|
43
|
+
const {
|
|
44
|
+
column,
|
|
45
|
+
onCommit
|
|
46
|
+
} = this.props;
|
|
47
|
+
const updated = {
|
|
48
|
+
[column.key]: null
|
|
49
|
+
};
|
|
50
|
+
onCommit(updated, column);
|
|
51
|
+
this.setState({
|
|
52
|
+
updated: null
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
this.getSignImages = () => {
|
|
56
|
+
const {
|
|
57
|
+
config
|
|
58
|
+
} = this.props;
|
|
59
|
+
const value = this.getValue();
|
|
60
|
+
const signImageUrl = (0, _url.generateCurrentBaseImageUrl)({
|
|
61
|
+
...config,
|
|
62
|
+
partUrl: _utils.default.getSignImageUrl(value)
|
|
63
|
+
});
|
|
64
|
+
return [signImageUrl].filter(Boolean);
|
|
65
|
+
};
|
|
66
|
+
this.renderSignature = signImages => {
|
|
67
|
+
const {
|
|
68
|
+
column,
|
|
69
|
+
config
|
|
70
|
+
} = this.props;
|
|
71
|
+
const {
|
|
72
|
+
key
|
|
73
|
+
} = column;
|
|
74
|
+
return signImages.map((src, index) => {
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement(_ImageThumbnail.default, {
|
|
76
|
+
key: "sing-image-".concat(key, "-").concat(index),
|
|
77
|
+
index: index,
|
|
78
|
+
src: src,
|
|
79
|
+
className: "dtable-ui-mobile-row-expand-img-item",
|
|
80
|
+
config: config,
|
|
81
|
+
onClick: this.toggleEditor,
|
|
82
|
+
deleteImage: this.deleteImage,
|
|
83
|
+
disableImageTooltip: true
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
this.state = {
|
|
88
|
+
isShowEditor: false,
|
|
89
|
+
updated: null
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
93
|
+
const {
|
|
94
|
+
column,
|
|
95
|
+
row,
|
|
96
|
+
valueKey
|
|
97
|
+
} = nextProps;
|
|
98
|
+
if (row._id !== this.props.row._id) {
|
|
99
|
+
this.setState({
|
|
100
|
+
updated: row[column[valueKey]] || [],
|
|
101
|
+
isShowEditor: false
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
render() {
|
|
106
|
+
const {
|
|
107
|
+
config,
|
|
108
|
+
column
|
|
109
|
+
} = this.props;
|
|
110
|
+
const {
|
|
111
|
+
isShowEditor
|
|
112
|
+
} = this.state;
|
|
113
|
+
const signImages = this.getSignImages();
|
|
114
|
+
const signImageExisted = Array.isArray(signImages) && signImages.length > 0;
|
|
115
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
+
className: "dtable-ui-mobile-row-expand-image position-relative"
|
|
117
|
+
}, !signImageExisted && /*#__PURE__*/_react.default.createElement(_addBtn.default, {
|
|
118
|
+
onClick: this.toggleEditor,
|
|
119
|
+
text: (0, _lang.getLocale)('Edit_signature')
|
|
120
|
+
}), this.renderSignature(signImages)), isShowEditor && /*#__PURE__*/_react.default.createElement(_DigitalSignEditor.default, {
|
|
121
|
+
config: config,
|
|
122
|
+
value: this.getValue(),
|
|
123
|
+
column: column,
|
|
124
|
+
onCommitCancel: this.toggleEditor,
|
|
125
|
+
onCommit: this.onCommit,
|
|
126
|
+
uploadFile: this.props.uploadFile
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
var _default = exports.default = RowExpandMBDigitalSignEditor;
|
package/lib/RowExpandEditor/{RowExpandDigitalSignEditor → digital-sign-editor/pc-editor}/index.js
RENAMED
|
@@ -6,16 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _ImagePreviewerLightbox = _interopRequireDefault(require("
|
|
10
|
-
var _ImageThumbnail = _interopRequireDefault(require("
|
|
11
|
-
var _utils = _interopRequireDefault(require("
|
|
12
|
-
var _constants = require("
|
|
13
|
-
var
|
|
14
|
-
var _DigitalSignEditor = _interopRequireDefault(require("
|
|
15
|
-
var _lang = require("
|
|
16
|
-
var _url = require("
|
|
9
|
+
var _ImagePreviewerLightbox = _interopRequireDefault(require("../../../ImagePreviewerLightbox"));
|
|
10
|
+
var _ImageThumbnail = _interopRequireDefault(require("../../../ImageThumbnail"));
|
|
11
|
+
var _utils = _interopRequireDefault(require("../../../DigitalSignEditor/utils"));
|
|
12
|
+
var _constants = require("../../../constants");
|
|
13
|
+
var _addBtn = _interopRequireDefault(require("../../add-btn"));
|
|
14
|
+
var _DigitalSignEditor = _interopRequireDefault(require("../../../DigitalSignEditor"));
|
|
15
|
+
var _lang = require("../../../lang");
|
|
16
|
+
var _url = require("../../../utils/url");
|
|
17
17
|
require("./index.css");
|
|
18
|
-
class
|
|
18
|
+
class RowExpandPCDigitalSignEditor extends _react.default.Component {
|
|
19
19
|
constructor(props) {
|
|
20
20
|
super(props);
|
|
21
21
|
this.onKeyDown = e => {
|
|
@@ -176,7 +176,7 @@ class RowExpandDigitalSignEditor extends _react.default.Component {
|
|
|
176
176
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
177
177
|
className: "position-relative mt-2",
|
|
178
178
|
ref: ref => this.editorContainer = ref
|
|
179
|
-
}, !signImageExisted && /*#__PURE__*/_react.default.createElement(
|
|
179
|
+
}, !signImageExisted && /*#__PURE__*/_react.default.createElement(_addBtn.default, {
|
|
180
180
|
onClick: this.toggleEditor,
|
|
181
181
|
onFocus: this.onFocus,
|
|
182
182
|
isFocus: isEditorFocus,
|
|
@@ -205,4 +205,4 @@ class RowExpandDigitalSignEditor extends _react.default.Component {
|
|
|
205
205
|
}));
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var _default = exports.default =
|
|
208
|
+
var _default = exports.default = RowExpandPCDigitalSignEditor;
|
|
@@ -0,0 +1,24 @@
|
|
|
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 RowExpandDurationEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
15
|
+
query: "(min-width: 768px)"
|
|
16
|
+
}, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
17
|
+
ref: ref
|
|
18
|
+
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
19
|
+
query: "(max-width: 768px)"
|
|
20
|
+
}, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
21
|
+
ref: ref
|
|
22
|
+
}))));
|
|
23
|
+
});
|
|
24
|
+
var _default = exports.default = RowExpandDurationEditor;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 _DurationEditor = _interopRequireDefault(require("../../DurationEditor"));
|
|
11
|
+
class RowExpandMBDurationEditor extends _react.default.Component {
|
|
12
|
+
constructor(props) {
|
|
13
|
+
super(props);
|
|
14
|
+
this.toggleEditor = () => {
|
|
15
|
+
this.setState({
|
|
16
|
+
isShowEditor: !this.state.isShowEditor
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
this.onCommit = value => {
|
|
20
|
+
this.props.onCommit(value);
|
|
21
|
+
this.setState({
|
|
22
|
+
value,
|
|
23
|
+
isShowEditor: false
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
let {
|
|
27
|
+
row,
|
|
28
|
+
column,
|
|
29
|
+
valueKey
|
|
30
|
+
} = props;
|
|
31
|
+
this.state = {
|
|
32
|
+
isShowEditor: false,
|
|
33
|
+
value: row[column[valueKey]]
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
37
|
+
const {
|
|
38
|
+
column,
|
|
39
|
+
row,
|
|
40
|
+
valueKey
|
|
41
|
+
} = nextProps;
|
|
42
|
+
if (row._id !== this.props.row._id) {
|
|
43
|
+
this.setState({
|
|
44
|
+
value: row[column[valueKey]],
|
|
45
|
+
isShowEditor: false
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
const {
|
|
51
|
+
column
|
|
52
|
+
} = this.props;
|
|
53
|
+
const {
|
|
54
|
+
value,
|
|
55
|
+
isShowEditor
|
|
56
|
+
} = this.state;
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
className: "dtable-ui-mobile-row-expand-input-editor-container"
|
|
59
|
+
}, isShowEditor ? /*#__PURE__*/_react.default.createElement(_DurationEditor.default, {
|
|
60
|
+
isInModal: true,
|
|
61
|
+
column: column,
|
|
62
|
+
value: value,
|
|
63
|
+
toggleEditor: this.toggleEditor,
|
|
64
|
+
onCommit: this.onCommit
|
|
65
|
+
}) : /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: "w-100 h-100",
|
|
67
|
+
onClick: this.toggleEditor
|
|
68
|
+
}, (0, _dtableUtils.getDurationDisplayString)(value, column.data)));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
var _default = exports.default = RowExpandMBDurationEditor;
|
package/lib/RowExpandEditor/{RowExpandDurationEditor/index.js → duration-editor/pc-editor.js}
RENAMED
|
@@ -10,7 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _dtableUtils = require("dtable-utils");
|
|
11
11
|
var _constants = require("../../constants");
|
|
12
12
|
var _DurationEditor = _interopRequireDefault(require("../../DurationEditor"));
|
|
13
|
-
class
|
|
13
|
+
class RowExpandPCDurationEditor extends _react.default.Component {
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props);
|
|
16
16
|
this.onKeyDown = e => {
|
|
@@ -102,4 +102,4 @@ class RowExpandDurationEditor extends _react.default.Component {
|
|
|
102
102
|
}, (0, _dtableUtils.getDurationDisplayString)(value, column.data)));
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
var _default = exports.default =
|
|
105
|
+
var _default = exports.default = RowExpandPCDurationEditor;
|
|
@@ -0,0 +1,24 @@
|
|
|
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 RowExpandEmailEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
15
|
+
query: "(min-width: 768px)"
|
|
16
|
+
}, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
17
|
+
ref: ref
|
|
18
|
+
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
19
|
+
query: "(max-width: 768px)"
|
|
20
|
+
}, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
21
|
+
ref: ref
|
|
22
|
+
}))));
|
|
23
|
+
});
|
|
24
|
+
var _default = exports.default = RowExpandEmailEditor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('../../url-editor/mb-editor/index.css');
|
|
@@ -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
|
+
require("./index.css");
|
|
10
|
+
class RowExpandMBEmailEditor extends _react.default.Component {
|
|
11
|
+
constructor(props) {
|
|
12
|
+
super(props);
|
|
13
|
+
this.onBlur = () => {
|
|
14
|
+
const {
|
|
15
|
+
onCommit
|
|
16
|
+
} = this.props;
|
|
17
|
+
const updated = this.state.value.trim();
|
|
18
|
+
onCommit(updated);
|
|
19
|
+
};
|
|
20
|
+
this.onChange = e => {
|
|
21
|
+
const value = e.target.value;
|
|
22
|
+
if (value === this.state.value) return;
|
|
23
|
+
this.setState({
|
|
24
|
+
value
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
this.onCut = e => {
|
|
28
|
+
e.stopPropagation();
|
|
29
|
+
};
|
|
30
|
+
this.onPaste = e => {
|
|
31
|
+
e.stopPropagation();
|
|
32
|
+
};
|
|
33
|
+
this.onOpenEmailLink = () => {
|
|
34
|
+
const {
|
|
35
|
+
value
|
|
36
|
+
} = this.state;
|
|
37
|
+
let newValue = value.trim();
|
|
38
|
+
window.location.href = "mailto:".concat(newValue);
|
|
39
|
+
};
|
|
40
|
+
const {
|
|
41
|
+
row,
|
|
42
|
+
column,
|
|
43
|
+
valueKey
|
|
44
|
+
} = props;
|
|
45
|
+
this.state = {
|
|
46
|
+
value: row[column[valueKey]] || ''
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
50
|
+
const {
|
|
51
|
+
column,
|
|
52
|
+
row,
|
|
53
|
+
valueKey
|
|
54
|
+
} = nextProps;
|
|
55
|
+
if (row._id !== this.props.row._id) {
|
|
56
|
+
this.setState({
|
|
57
|
+
value: row[column[valueKey]] || ''
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
const {
|
|
63
|
+
value
|
|
64
|
+
} = this.state;
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: "dtable-ui-mobile-row-expand-input-editor-container position-relative dtable-ui-mobile-row-expand-url-editor-container"
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
68
|
+
type: "text",
|
|
69
|
+
onFocus: this.onFocus,
|
|
70
|
+
onBlur: this.onBlur,
|
|
71
|
+
onCut: this.onCut,
|
|
72
|
+
onPaste: this.onPaste,
|
|
73
|
+
onChange: this.onChange,
|
|
74
|
+
className: "form-control dtable-ui-mobile-row-expand-url-input",
|
|
75
|
+
value: value,
|
|
76
|
+
onKeyDown: this.onKeyDown
|
|
77
|
+
}), value && value.trim() && /*#__PURE__*/_react.default.createElement("span", {
|
|
78
|
+
"aria-hidden": "true",
|
|
79
|
+
className: "dtable-font dtable-icon-email dtable-ui-mobile-row-expand-jump-link",
|
|
80
|
+
onClick: this.onOpenEmailLink
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
var _default = exports.default = RowExpandMBEmailEditor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('../../url-editor/pc-editor/index.css');
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _constants = require("
|
|
9
|
+
var _constants = require("../../../constants");
|
|
10
10
|
require("./index.css");
|
|
11
|
-
class
|
|
11
|
+
class RowExpandPCEmailEditor extends _react.default.Component {
|
|
12
12
|
constructor(props) {
|
|
13
13
|
super(props);
|
|
14
14
|
this.focusInput = () => {
|
|
@@ -122,4 +122,4 @@ class RowExpandEmailEditor extends _react.default.Component {
|
|
|
122
122
|
}));
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
var _default = exports.default =
|
|
125
|
+
var _default = exports.default = RowExpandPCEmailEditor;
|
|
@@ -0,0 +1,24 @@
|
|
|
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 RowExpandFileEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
15
|
+
query: "(min-width: 768px)"
|
|
16
|
+
}, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
17
|
+
ref: ref
|
|
18
|
+
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
19
|
+
query: "(max-width: 768px)"
|
|
20
|
+
}, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
21
|
+
ref: ref
|
|
22
|
+
}))));
|
|
23
|
+
});
|
|
24
|
+
var _default = exports.default = RowExpandFileEditor;
|