dtable-ui-component 4.4.4 → 4.4.6
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/AutoNumberFormatter/index.js +14 -7
- package/lib/ButtonFormatter/index.js +16 -9
- package/lib/CTimeFormatter/index.js +16 -9
- package/lib/CheckboxEditor/index.js +15 -8
- package/lib/CheckboxFormatter/index.js +15 -8
- package/lib/CollaboratorEditor/index.js +29 -21
- package/lib/CollaboratorEditor/mb-collaborator-editor-popover/index.js +32 -25
- package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.js +25 -18
- package/lib/CollaboratorFormatter/index.js +19 -12
- package/lib/CollaboratorItem/index.js +17 -10
- package/lib/CreatorFormatter/index.js +19 -12
- package/lib/DTableCommonAddTool/index.js +13 -6
- package/lib/DTableCustomizeCollaboratorSelect/index.js +26 -18
- package/lib/DTableCustomizeSelect/index.js +23 -15
- package/lib/DTableFiltersPopover/constants/index.js +38 -33
- package/lib/DTableFiltersPopover/index.js +38 -31
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +53 -46
- package/lib/DTableFiltersPopover/utils/index.js +128 -99
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +34 -26
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +33 -25
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +34 -26
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +34 -26
- package/lib/DTableFiltersPopover/widgets/filter-item.js +128 -120
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +26 -18
- package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -8
- package/lib/DTablePopover/index.js +15 -8
- package/lib/DTablePopover/utils.js +9 -2
- package/lib/DTableRadio/index.js +17 -10
- package/lib/DTableSearchInput/index.js +21 -13
- package/lib/DTableSearchInput/utils.js +9 -2
- package/lib/DTableSelect/dtable-select-label.js +13 -6
- package/lib/DTableSelect/index.js +18 -10
- package/lib/DTableSelect/utils.js +20 -10
- package/lib/DTableSwitch/index.js +14 -7
- package/lib/DateEditor/index.js +30 -22
- package/lib/DateEditor/mb-date-editor-popover/index.js +55 -47
- package/lib/DateEditor/pc-date-editor-popover.js +27 -20
- package/lib/DateFormatter/index.js +16 -9
- package/lib/Department-editor/constants.js +7 -1
- package/lib/Department-editor/department-multiple-select/index.js +32 -24
- package/lib/Department-editor/department-single-select.js +41 -33
- package/lib/Department-editor/index.js +22 -14
- package/lib/Department-editor/selected-departments/index.js +32 -25
- package/lib/Department-editor/utils.js +11 -3
- package/lib/DepartmentSingleSelectFormatter/index.js +16 -9
- package/lib/DigitalSignFormatter/index.js +23 -15
- package/lib/DigitalSignFormatter/utils.js +11 -3
- package/lib/DurationFormatter/index.js +16 -9
- package/lib/EditEditorButton/index.js +12 -5
- package/lib/EmailFormatter/index.js +14 -7
- package/lib/FieldDisplaySetting/field-item.js +21 -14
- package/lib/FieldDisplaySetting/index.js +27 -19
- package/lib/FileEditor/index.js +15 -8
- package/lib/FileEditor/pc-files-addition/index.js +1 -0
- package/lib/FileEditor/pc-files-addition/pc-file-uploaded-item.js +1 -0
- package/lib/FileEditor/pc-files-preview/index.js +1 -0
- package/lib/FileEditor/pc-files-preview/pc-file-item-preview.js +1 -0
- package/lib/FileFormatter/index.js +19 -11
- package/lib/FileItemFormatter/index.js +14 -6
- package/lib/FileItemFormatter/utils.js +9 -2
- package/lib/FileUploader/index.js +11 -4
- package/lib/FormulaFormatter/cell-value-validator.js +24 -18
- package/lib/FormulaFormatter/index.js +39 -32
- package/lib/FormulaFormatter/utils.js +29 -13
- package/lib/GeolocationFormatter/index.js +16 -9
- package/lib/HtmlLongTextFormatter/index.js +17 -9
- package/lib/ImageFormatter/images-lazy-load.js +16 -9
- package/lib/ImageFormatter/index.js +24 -16
- package/lib/ImageFormatter/utils.js +9 -2
- package/lib/ImagePreviewerLightbox/index.js +19 -12
- package/lib/ImagePreviewerLightbox/utils.js +11 -3
- package/lib/LastModifierFormatter/index.js +19 -12
- package/lib/LinkEditor/index.js +33 -25
- package/lib/LinkEditor/link-editor-option.js +15 -8
- package/lib/LinkEditor/mb-link-editor-popover/index.js +30 -23
- package/lib/LinkEditor/pc-link-editor-popover/index.js +24 -17
- package/lib/LinkFormatter/index.js +20 -13
- package/lib/Loading/index.js +11 -4
- package/lib/LongTextFormatter/index.js +13 -6
- package/lib/MBEditorHeader/index.js +14 -7
- package/lib/MTimeFormatter/index.js +16 -9
- package/lib/ModalPortal/index.js +12 -5
- package/lib/MultipleSelectEditor/index.js +25 -17
- package/lib/MultipleSelectFormatter/index.js +17 -10
- package/lib/NotificationPopover/index.js +24 -16
- package/lib/NumberEditor/index.js +25 -18
- package/lib/NumberFormatter/index.js +16 -9
- package/lib/RateFormatter/index.js +15 -8
- package/lib/RoleStatusEditor/index.js +22 -14
- package/lib/RowExpandEmailFormatter/index.js +17 -10
- package/lib/RowExpandFileFormatter/index.js +16 -8
- package/lib/RowExpandFileFormatter/row-expand-file-item-formatter.js +27 -18
- package/lib/RowExpandFormatter/index.js +86 -78
- package/lib/RowExpandFormulaFormatter/index.js +42 -34
- package/lib/RowExpandImageFormatter/index.js +19 -10
- package/lib/RowExpandImageFormatter/row-expand-image-item-formatter.js +27 -18
- package/lib/RowExpandImageFormatter/utils.js +9 -2
- package/lib/RowExpandLinkFormatter/collaborator-item-formatter.js +16 -7
- package/lib/RowExpandLinkFormatter/index.js +46 -37
- package/lib/RowExpandLinkFormatter/utils.js +17 -6
- package/lib/RowExpandLinkFormatter/value-display-utils.js +12 -5
- package/lib/RowExpandRateFormatter/index.js +15 -8
- package/lib/RowExpandUrlFormatter/index.js +21 -14
- package/lib/SelectItem/index.js +12 -4
- package/lib/SelectOptionGroup/KeyCodes.js +7 -1
- package/lib/SelectOptionGroup/index.js +28 -20
- package/lib/SelectOptionGroup/option.js +11 -4
- package/lib/SimpleLongTextFormatter/index.js +27 -20
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +7 -1
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +15 -8
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +14 -7
- package/lib/SingleSelectEditor/index.js +26 -18
- package/lib/SingleSelectFormatter/index.js +16 -9
- package/lib/TextEditor/index.js +14 -7
- package/lib/TextFormatter/index.js +14 -7
- package/lib/UrlFormatter/index.js +14 -7
- package/lib/cellFormatterFactory/index.js +11 -4
- package/lib/common/ClickOutside.js +12 -4
- package/lib/common/delete-tip.js +20 -12
- package/lib/common/modal-portal.js +13 -5
- package/lib/constants/index.js +28 -9
- package/lib/css/mb-cell-editor.css +1 -1
- package/lib/data/dtable-value.js +11 -6
- package/lib/formatterConfig/base-formatter-config.js +53 -46
- package/lib/formatterConfig/index.js +16 -9
- package/lib/hooks/common-hooks.js +11 -4
- package/lib/index.js +432 -75
- package/lib/lang/index.js +24 -13
- package/lib/locals/de.js +7 -1
- package/lib/locals/en.js +7 -1
- package/lib/locals/fr.js +7 -1
- package/lib/locals/zh-CN.js +7 -1
- package/lib/select-editor/index.js +27 -4
- package/lib/select-editor/mb-select-editor-popover/index.js +41 -33
- package/lib/select-editor/pc-select-editor-popover/index.js +26 -19
- package/lib/select-editor/select-editor-option.js +15 -8
- package/lib/toaster/alert.js +18 -11
- package/lib/toaster/index.js +10 -3
- package/lib/toaster/toast.js +16 -8
- package/lib/toaster/toastManager.js +13 -5
- package/lib/toaster/toaster.js +15 -7
- package/lib/utils/dayjs.js +11 -4
- package/lib/utils/editor-utils.js +15 -5
- package/lib/utils/event-bus.js +7 -1
- package/lib/utils/utils.js +17 -6
- package/package.json +80 -68
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
require("./index.css");
|
|
11
|
+
class UrlFormatter extends _react.default.Component {
|
|
5
12
|
render() {
|
|
6
13
|
const {
|
|
7
14
|
containerClassName,
|
|
8
15
|
value
|
|
9
16
|
} = this.props;
|
|
10
|
-
let classname =
|
|
11
|
-
return /*#__PURE__*/
|
|
17
|
+
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container url-formatter', containerClassName);
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
12
19
|
className: classname
|
|
13
20
|
}, value);
|
|
14
21
|
}
|
|
15
22
|
}
|
|
16
|
-
|
|
23
|
+
var _default = exports.default = UrlFormatter;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
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 _formatterConfig = _interopRequireDefault(require("../formatterConfig"));
|
|
2
9
|
class CellFormatterFactory {
|
|
3
10
|
createFormatter(formatterType) {
|
|
4
|
-
if (
|
|
5
|
-
return
|
|
11
|
+
if (_formatterConfig.default[formatterType]) {
|
|
12
|
+
return _formatterConfig.default[formatterType];
|
|
6
13
|
}
|
|
7
14
|
return null;
|
|
8
15
|
}
|
|
9
16
|
}
|
|
10
17
|
const cellFormatterFactory = new CellFormatterFactory();
|
|
11
|
-
|
|
18
|
+
var _default = exports.default = cellFormatterFactory;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 ClickOutside extends _react.default.Component {
|
|
3
10
|
constructor() {
|
|
4
11
|
super(...arguments);
|
|
5
12
|
this.isClickedInside = false;
|
|
@@ -21,8 +28,9 @@ export default class ClickOutside extends React.Component {
|
|
|
21
28
|
document.removeEventListener('mousedown', this.handleDocumentClick);
|
|
22
29
|
}
|
|
23
30
|
render() {
|
|
24
|
-
return
|
|
31
|
+
return /*#__PURE__*/_react.default.cloneElement(_react.default.Children.only(this.props.children), {
|
|
25
32
|
onMouseDownCapture: this.handleMouseDown
|
|
26
33
|
});
|
|
27
34
|
}
|
|
28
|
-
}
|
|
35
|
+
}
|
|
36
|
+
exports.default = ClickOutside;
|
package/lib/common/delete-tip.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 _modalPortal = _interopRequireDefault(require("./modal-portal"));
|
|
10
|
+
var _lang = require("../lang");
|
|
11
|
+
require("./delete-tip.css");
|
|
12
|
+
class DeleteTip extends _react.default.Component {
|
|
6
13
|
constructor() {
|
|
7
14
|
super(...arguments);
|
|
8
15
|
this.onMouseDown = e => {
|
|
@@ -24,7 +31,7 @@ export default class DeleteTip extends React.Component {
|
|
|
24
31
|
position,
|
|
25
32
|
deleteTip
|
|
26
33
|
} = this.props;
|
|
27
|
-
return /*#__PURE__*/
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(_modalPortal.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
28
35
|
ref: node => this.tipContainer = node,
|
|
29
36
|
className: "dtable-tip tip-container",
|
|
30
37
|
style: {
|
|
@@ -32,16 +39,17 @@ export default class DeleteTip extends React.Component {
|
|
|
32
39
|
left: position.left
|
|
33
40
|
},
|
|
34
41
|
onClick: e => e.stopPropagation()
|
|
35
|
-
}, /*#__PURE__*/
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement("b", {
|
|
36
43
|
className: "mb-4"
|
|
37
|
-
}, deleteTip), /*#__PURE__*/
|
|
44
|
+
}, deleteTip), /*#__PURE__*/_react.default.createElement("div", {
|
|
38
45
|
className: "d-flex justify-content-end"
|
|
39
|
-
}, /*#__PURE__*/
|
|
46
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
40
47
|
className: "btn btn-secondary mr-2",
|
|
41
48
|
onClick: toggle
|
|
42
|
-
}, getLocale('Cancel')), /*#__PURE__*/
|
|
49
|
+
}, (0, _lang.getLocale)('Cancel')), /*#__PURE__*/_react.default.createElement("button", {
|
|
43
50
|
className: "btn btn-primary",
|
|
44
51
|
onClick: onDelete
|
|
45
|
-
}, getLocale('Delete')))));
|
|
52
|
+
}, (0, _lang.getLocale)('Delete')))));
|
|
46
53
|
}
|
|
47
|
-
}
|
|
54
|
+
}
|
|
55
|
+
exports.default = DeleteTip;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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"));
|
|
3
10
|
const modalRoot = document.getElementById('modal-wrapper');
|
|
4
|
-
|
|
11
|
+
class ModalPortal extends _react.default.Component {
|
|
5
12
|
constructor(props) {
|
|
6
13
|
super(props);
|
|
7
14
|
this.el = document.createElement('div');
|
|
@@ -13,6 +20,7 @@ export default class ModalPortal extends React.Component {
|
|
|
13
20
|
modalRoot.removeChild(this.el);
|
|
14
21
|
}
|
|
15
22
|
render() {
|
|
16
|
-
return
|
|
23
|
+
return /*#__PURE__*/_reactDom.default.createPortal(this.props.children, this.el);
|
|
17
24
|
}
|
|
18
|
-
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = ModalPortal;
|
package/lib/constants/index.js
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ARRAY_FORMAT_COLUMNS = void 0;
|
|
7
|
+
Object.defineProperty(exports, "CellType", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _dtableUtils.CellType;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
exports.EVENT_BUS_TYPE = exports.DATE_TYPES = void 0;
|
|
14
|
+
Object.defineProperty(exports, "FORMULA_RESULT_TYPE", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return _dtableUtils.FORMULA_RESULT_TYPE;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
exports.SIMPLE_CELL_FORMULA_RESULTS = exports.SIMPLE_CELL_COLUMNS = exports.NUMBER_TYPES = void 0;
|
|
21
|
+
var _dtableUtils = require("dtable-utils");
|
|
22
|
+
const NUMBER_TYPES = exports.NUMBER_TYPES = {
|
|
3
23
|
'NUMBER': 'number',
|
|
4
24
|
'NUMBER_WITH_COMMAS': 'number-with-commas',
|
|
5
25
|
'PERCENT': 'percent',
|
|
@@ -8,7 +28,7 @@ const NUMBER_TYPES = {
|
|
|
8
28
|
'DOLLAR': 'dollar',
|
|
9
29
|
'CUSTOM_CURRENCY': 'custom_currency'
|
|
10
30
|
};
|
|
11
|
-
const DATE_TYPES = {
|
|
31
|
+
const DATE_TYPES = exports.DATE_TYPES = {
|
|
12
32
|
'D/M/YYYY': 'D/M/YYYY',
|
|
13
33
|
'D/M/YYYY HH:mm': 'D/M/YYYY HH:mm',
|
|
14
34
|
'M/D/YYYY': 'M/D/YY',
|
|
@@ -16,10 +36,9 @@ const DATE_TYPES = {
|
|
|
16
36
|
'YYYY-MM-DD': 'YYYY-MM-DD',
|
|
17
37
|
'YYYY-MM-DD HH:mm': 'YYYY-MM-DD HH:mm'
|
|
18
38
|
};
|
|
19
|
-
const SIMPLE_CELL_COLUMNS = [CellType.TEXT, CellType.NUMBER, CellType.DATE, CellType.CTIME, CellType.MTIME, CellType.AUTO_NUMBER, CellType.URL, CellType.EMAIL, CellType.DURATION, CellType.CHECKBOX, CellType.RATE];
|
|
20
|
-
const ARRAY_FORMAT_COLUMNS = [CellType.IMAGE, CellType.FILE, CellType.MULTIPLE_SELECT, CellType.COLLABORATOR];
|
|
21
|
-
const SIMPLE_CELL_FORMULA_RESULTS = [FORMULA_RESULT_TYPE.NUMBER, FORMULA_RESULT_TYPE.STRING, FORMULA_RESULT_TYPE.DATE, FORMULA_RESULT_TYPE.BOOL];
|
|
22
|
-
const EVENT_BUS_TYPE = {
|
|
39
|
+
const SIMPLE_CELL_COLUMNS = exports.SIMPLE_CELL_COLUMNS = [_dtableUtils.CellType.TEXT, _dtableUtils.CellType.NUMBER, _dtableUtils.CellType.DATE, _dtableUtils.CellType.CTIME, _dtableUtils.CellType.MTIME, _dtableUtils.CellType.AUTO_NUMBER, _dtableUtils.CellType.URL, _dtableUtils.CellType.EMAIL, _dtableUtils.CellType.DURATION, _dtableUtils.CellType.CHECKBOX, _dtableUtils.CellType.RATE];
|
|
40
|
+
const ARRAY_FORMAT_COLUMNS = exports.ARRAY_FORMAT_COLUMNS = [_dtableUtils.CellType.IMAGE, _dtableUtils.CellType.FILE, _dtableUtils.CellType.MULTIPLE_SELECT, _dtableUtils.CellType.COLLABORATOR];
|
|
41
|
+
const SIMPLE_CELL_FORMULA_RESULTS = exports.SIMPLE_CELL_FORMULA_RESULTS = [_dtableUtils.FORMULA_RESULT_TYPE.NUMBER, _dtableUtils.FORMULA_RESULT_TYPE.STRING, _dtableUtils.FORMULA_RESULT_TYPE.DATE, _dtableUtils.FORMULA_RESULT_TYPE.BOOL];
|
|
42
|
+
const EVENT_BUS_TYPE = exports.EVENT_BUS_TYPE = {
|
|
23
43
|
OPEN_SELECT: 'open-select'
|
|
24
|
-
};
|
|
25
|
-
export { CellType, NUMBER_TYPES, DATE_TYPES, FORMULA_RESULT_TYPE, SIMPLE_CELL_COLUMNS, ARRAY_FORMAT_COLUMNS, SIMPLE_CELL_FORMULA_RESULTS, EVENT_BUS_TYPE };
|
|
44
|
+
};
|
package/lib/data/dtable-value.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SIGN_CONFIG = exports.DTABLE_VALUE = exports.DEPARTMENTS = exports.COLLABORATORS = void 0;
|
|
7
|
+
const DTABLE_VALUE = exports.DTABLE_VALUE = {
|
|
2
8
|
'tables': [{
|
|
3
9
|
'_id': '0000',
|
|
4
10
|
'name': 'Table1',
|
|
@@ -2709,7 +2715,7 @@ const DTABLE_VALUE = {
|
|
|
2709
2715
|
'header_settings': {}
|
|
2710
2716
|
}]
|
|
2711
2717
|
};
|
|
2712
|
-
const DEPARTMENTS = [{
|
|
2718
|
+
const DEPARTMENTS = exports.DEPARTMENTS = [{
|
|
2713
2719
|
id: 1,
|
|
2714
2720
|
id_in_org: 1,
|
|
2715
2721
|
name: '海文互知',
|
|
@@ -2728,7 +2734,7 @@ const DEPARTMENTS = [{
|
|
|
2728
2734
|
org_id: -1,
|
|
2729
2735
|
parent_id: 1
|
|
2730
2736
|
}];
|
|
2731
|
-
const COLLABORATORS = [{
|
|
2737
|
+
const COLLABORATORS = exports.COLLABORATORS = [{
|
|
2732
2738
|
'avatar_url': 'https://dev.seatable.cn/image-view/avatars/0/0/916e1e9e7c6184061cb7d96a680292/resized/80/de58ef113a311d390934b06ceafd77cf.png',
|
|
2733
2739
|
'contact_email': '',
|
|
2734
2740
|
'email': 'anbing@1.com',
|
|
@@ -2757,9 +2763,8 @@ const COLLABORATORS = [{
|
|
|
2757
2763
|
'name_pinyin': 'an\'bing',
|
|
2758
2764
|
'id': 'W-00009'
|
|
2759
2765
|
}];
|
|
2760
|
-
const SIGN_CONFIG = {
|
|
2766
|
+
const SIGN_CONFIG = exports.SIGN_CONFIG = {
|
|
2761
2767
|
server: 'https://dev.seatable.cn',
|
|
2762
2768
|
workspaceID: 3,
|
|
2763
2769
|
dtableUuid: '8327efbf-c9ff-4a14-9010-00e801a7e295'
|
|
2764
|
-
};
|
|
2765
|
-
export { DTABLE_VALUE, COLLABORATORS, DEPARTMENTS, SIGN_CONFIG };
|
|
2770
|
+
};
|
|
@@ -1,47 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
[CellType.
|
|
33
|
-
[CellType.
|
|
34
|
-
[CellType.
|
|
35
|
-
[CellType.
|
|
36
|
-
[CellType.
|
|
37
|
-
[CellType.
|
|
38
|
-
[CellType.
|
|
39
|
-
[CellType.
|
|
40
|
-
[CellType.
|
|
41
|
-
[CellType.
|
|
42
|
-
[CellType.
|
|
43
|
-
[CellType.
|
|
44
|
-
[CellType.
|
|
45
|
-
[CellType.
|
|
46
|
-
[CellType.
|
|
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 _constants = require("../constants");
|
|
10
|
+
var _CheckboxFormatter = _interopRequireDefault(require("../CheckboxFormatter"));
|
|
11
|
+
var _ImageFormatter = _interopRequireDefault(require("../ImageFormatter"));
|
|
12
|
+
var _SimpleLongTextFormatter = _interopRequireDefault(require("../SimpleLongTextFormatter"));
|
|
13
|
+
var _TextFormatter = _interopRequireDefault(require("../TextFormatter"));
|
|
14
|
+
var _SingleSelectFormatter = _interopRequireDefault(require("../SingleSelectFormatter"));
|
|
15
|
+
var _MultipleSelectFormatter = _interopRequireDefault(require("../MultipleSelectFormatter"));
|
|
16
|
+
var _FileFormatter = _interopRequireDefault(require("../FileFormatter"));
|
|
17
|
+
var _CollaboratorFormatter = _interopRequireDefault(require("../CollaboratorFormatter"));
|
|
18
|
+
var _NumberFormatter = _interopRequireDefault(require("../NumberFormatter"));
|
|
19
|
+
var _DateFormatter = _interopRequireDefault(require("../DateFormatter"));
|
|
20
|
+
var _CreatorFormatter = _interopRequireDefault(require("../CreatorFormatter"));
|
|
21
|
+
var _CTimeFormatter = _interopRequireDefault(require("../CTimeFormatter"));
|
|
22
|
+
var _LastModifierFormatter = _interopRequireDefault(require("../LastModifierFormatter"));
|
|
23
|
+
var _MTimeFormatter = _interopRequireDefault(require("../MTimeFormatter"));
|
|
24
|
+
var _GeolocationFormatter = _interopRequireDefault(require("../GeolocationFormatter"));
|
|
25
|
+
var _AutoNumberFormatter = _interopRequireDefault(require("../AutoNumberFormatter"));
|
|
26
|
+
var _UrlFormatter = _interopRequireDefault(require("../UrlFormatter"));
|
|
27
|
+
var _EmailFormatter = _interopRequireDefault(require("../EmailFormatter"));
|
|
28
|
+
var _DurationFormatter = _interopRequireDefault(require("../DurationFormatter"));
|
|
29
|
+
var _RateFormatter = _interopRequireDefault(require("../RateFormatter"));
|
|
30
|
+
var _ButtonFormatter = _interopRequireDefault(require("../ButtonFormatter"));
|
|
31
|
+
var _default = exports.default = {
|
|
32
|
+
[_constants.CellType.DEFAULT]: /*#__PURE__*/_react.default.createElement(_TextFormatter.default, null),
|
|
33
|
+
[_constants.CellType.TEXT]: /*#__PURE__*/_react.default.createElement(_TextFormatter.default, null),
|
|
34
|
+
[_constants.CellType.CHECKBOX]: /*#__PURE__*/_react.default.createElement(_CheckboxFormatter.default, null),
|
|
35
|
+
[_constants.CellType.LONG_TEXT]: /*#__PURE__*/_react.default.createElement(_SimpleLongTextFormatter.default, null),
|
|
36
|
+
[_constants.CellType.SINGLE_SELECT]: /*#__PURE__*/_react.default.createElement(_SingleSelectFormatter.default, null),
|
|
37
|
+
[_constants.CellType.IMAGE]: /*#__PURE__*/_react.default.createElement(_ImageFormatter.default, null),
|
|
38
|
+
[_constants.CellType.FILE]: /*#__PURE__*/_react.default.createElement(_FileFormatter.default, null),
|
|
39
|
+
[_constants.CellType.MULTIPLE_SELECT]: /*#__PURE__*/_react.default.createElement(_MultipleSelectFormatter.default, null),
|
|
40
|
+
[_constants.CellType.COLLABORATOR]: /*#__PURE__*/_react.default.createElement(_CollaboratorFormatter.default, null),
|
|
41
|
+
[_constants.CellType.NUMBER]: /*#__PURE__*/_react.default.createElement(_NumberFormatter.default, null),
|
|
42
|
+
[_constants.CellType.DATE]: /*#__PURE__*/_react.default.createElement(_DateFormatter.default, null),
|
|
43
|
+
[_constants.CellType.CREATOR]: /*#__PURE__*/_react.default.createElement(_CreatorFormatter.default, null),
|
|
44
|
+
[_constants.CellType.CTIME]: /*#__PURE__*/_react.default.createElement(_CTimeFormatter.default, null),
|
|
45
|
+
[_constants.CellType.LAST_MODIFIER]: /*#__PURE__*/_react.default.createElement(_LastModifierFormatter.default, null),
|
|
46
|
+
[_constants.CellType.MTIME]: /*#__PURE__*/_react.default.createElement(_MTimeFormatter.default, null),
|
|
47
|
+
[_constants.CellType.GEOLOCATION]: /*#__PURE__*/_react.default.createElement(_GeolocationFormatter.default, null),
|
|
48
|
+
[_constants.CellType.AUTO_NUMBER]: /*#__PURE__*/_react.default.createElement(_AutoNumberFormatter.default, null),
|
|
49
|
+
[_constants.CellType.URL]: /*#__PURE__*/_react.default.createElement(_UrlFormatter.default, null),
|
|
50
|
+
[_constants.CellType.EMAIL]: /*#__PURE__*/_react.default.createElement(_EmailFormatter.default, null),
|
|
51
|
+
[_constants.CellType.DURATION]: /*#__PURE__*/_react.default.createElement(_DurationFormatter.default, null),
|
|
52
|
+
[_constants.CellType.RATE]: /*#__PURE__*/_react.default.createElement(_RateFormatter.default, null),
|
|
53
|
+
[_constants.CellType.BUTTON]: /*#__PURE__*/_react.default.createElement(_ButtonFormatter.default, null)
|
|
47
54
|
};
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 _constants = require("../constants");
|
|
10
|
+
var _baseFormatterConfig = _interopRequireDefault(require("./base-formatter-config"));
|
|
11
|
+
var _LinkFormatter = _interopRequireDefault(require("../LinkFormatter"));
|
|
12
|
+
var _FormulaFormatter = _interopRequireDefault(require("../FormulaFormatter"));
|
|
6
13
|
const FormatterConfig = {
|
|
7
|
-
...
|
|
8
|
-
[CellType.FORMULA]: /*#__PURE__*/
|
|
9
|
-
[CellType.LINK]: /*#__PURE__*/
|
|
14
|
+
..._baseFormatterConfig.default,
|
|
15
|
+
[_constants.CellType.FORMULA]: /*#__PURE__*/_react.default.createElement(_FormulaFormatter.default, null),
|
|
16
|
+
[_constants.CellType.LINK]: /*#__PURE__*/_react.default.createElement(_LinkFormatter.default, null)
|
|
10
17
|
};
|
|
11
|
-
|
|
18
|
+
var _default = exports.default = FormatterConfig;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useClickOutside = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
const useClickOutside = (_ref, deps) => {
|
|
3
9
|
let {
|
|
4
10
|
currDOM,
|
|
5
11
|
onClickOutside
|
|
6
12
|
} = _ref;
|
|
7
|
-
useEffect(() => {
|
|
13
|
+
(0, _react.useEffect)(() => {
|
|
8
14
|
const onMousedown = event => {
|
|
9
15
|
if (currDOM && event && currDOM.contains(event.target)) {
|
|
10
16
|
return;
|
|
@@ -18,4 +24,5 @@ export const useClickOutside = (_ref, deps) => {
|
|
|
18
24
|
|
|
19
25
|
// eslint-disable-next-line
|
|
20
26
|
}, deps || []);
|
|
21
|
-
};
|
|
27
|
+
};
|
|
28
|
+
exports.useClickOutside = useClickOutside;
|