dtable-ui-component 0.1.75 → 0.1.76
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/README.md +20 -2
- package/lib/AutoNumberFormatter/index.css +1 -0
- package/{es/components/cell-formatter/auto-number-formatter.js → lib/AutoNumberFormatter/index.js} +1 -0
- package/lib/ButtonFormatter/index.css +13 -0
- package/{es/components/cell-formatter/button-formatter.js → lib/ButtonFormatter/index.js} +1 -0
- package/lib/CTimeFormatter/index.css +1 -0
- package/{es/components/cell-formatter/ctime-formatter.js → lib/CTimeFormatter/index.js} +1 -0
- package/lib/CheckboxEditor/index.js +104 -0
- package/lib/CheckboxFormatter/index.css +1 -0
- package/{es/components/cell-formatter/checkbox-formatter.js → lib/CheckboxFormatter/index.js} +1 -0
- package/lib/CollaboratorEditor/index.css +48 -0
- package/lib/CollaboratorEditor/index.js +237 -0
- package/lib/CollaboratorEditor/mb-collaborator-editor-popover/index.css +86 -0
- package/lib/CollaboratorEditor/mb-collaborator-editor-popover/index.js +178 -0
- package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.css +1 -0
- package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.js +110 -0
- package/lib/CollaboratorFormatter/index.css +1 -0
- package/{es/components/cell-formatter/collaborator-formatter.js → lib/CollaboratorFormatter/index.js} +3 -2
- package/lib/CollaboratorItem/index.css +49 -0
- package/{es/components/common/collaborator-item.js → lib/CollaboratorItem/index.js} +1 -0
- package/lib/CreatorFormatter/index.css +1 -0
- package/{es/components/cell-formatter/creator-formatter.js → lib/CreatorFormatter/index.js} +3 -2
- package/lib/DateEditor/index.css +4 -0
- package/lib/DateEditor/index.js +152 -0
- package/{es/css → lib/DateEditor/mb-date-editor-popover}/custom-rc-calendar.css +0 -0
- package/lib/DateEditor/mb-date-editor-popover/index.css +45 -0
- package/lib/DateEditor/mb-date-editor-popover/index.js +245 -0
- package/lib/DateEditor/pc-date-editor-popover.js +142 -0
- package/lib/DateFormatter/index.css +1 -0
- package/{es/components/cell-formatter/date-formatter.js → lib/DateFormatter/index.js} +2 -1
- package/lib/DurationFormatter/index.css +1 -0
- package/{es/components/cell-formatter/duration-formatter.js → lib/DurationFormatter/index.js} +2 -1
- package/{es/components/common/edit-editor-button.js → lib/EditEditorButton/index.js} +0 -0
- package/lib/EmailFormatter/index.css +5 -0
- package/{es/components/cell-formatter/email-formatter.js → lib/EmailFormatter/index.js} +1 -0
- package/lib/FileEditor/index.js +46 -0
- package/lib/FileEditor/pc-files-addition/index.js +0 -0
- package/lib/FileEditor/pc-files-addition/pc-file-uploaded-item.js +0 -0
- package/lib/FileEditor/pc-files-preview/index.js +0 -0
- package/lib/FileEditor/pc-files-preview/pc-file-item-preview.js +0 -0
- package/lib/FileFormatter/index.css +29 -0
- package/{es/components/cell-formatter/file-formatter.js → lib/FileFormatter/index.js} +2 -1
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/excel.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/file.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/music.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/pdf.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/pic.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/ppt.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/txt.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/video.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/word.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/excel.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/file.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/music.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/pdf.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/pic.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/ppt.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/txt.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/video.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/word.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/folder/folder-192.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/folder/folder-24.png +0 -0
- package/{es/components/cell-formatter/widgets/file-item-formatter.js → lib/FileItemFormatter/index.js} +2 -2
- package/lib/FileItemFormatter/utils.js +72 -0
- package/{es/components/file-uploader → lib/FileUploader}/index.js +0 -0
- package/{es/utils → lib/FormulaFormatter}/cell-value-validator.js +1 -2
- package/lib/FormulaFormatter/index.css +19 -0
- package/{es/components/cell-formatter/formula-formatter.js → lib/FormulaFormatter/index.js} +7 -8
- package/{es/utils/column-utils.js → lib/FormulaFormatter/utils.js} +5 -1
- package/lib/GeolocationFormatter/index.css +1 -0
- package/{es/components/cell-formatter/geolocation-formatter.js → lib/GeolocationFormatter/index.js} +2 -1
- package/lib/HtmlLongTextFormatter/index.css +63 -0
- package/{es/components/cell-formatter/widgets/long-text-formatter/html-long-text-formatter.js → lib/HtmlLongTextFormatter/index.js} +5 -2
- package/{es/utils → lib/HtmlLongTextFormatter}/markdown2html.js +0 -0
- package/{es/utils → lib/HtmlLongTextFormatter}/unified/index.js +1 -0
- package/{es/utils → lib/HtmlLongTextFormatter}/vfile/core.js +1 -0
- package/{es/utils → lib/HtmlLongTextFormatter}/vfile/index.js +0 -0
- package/{es/components/common → lib/ImageFormatter}/images-lazy-load.js +2 -2
- package/lib/ImageFormatter/index.css +34 -0
- package/{es/components/cell-formatter/image-formatter.js → lib/ImageFormatter/index.js} +4 -3
- package/lib/ImageFormatter/utils.js +7 -0
- package/{es/css/image-previewer-ligntbox.css → lib/ImagePreviewerLightbox/index.css} +0 -0
- package/{es/components/cell-formatter/widgets/image-previewer-lightbox.js → lib/ImagePreviewerLightbox/index.js} +3 -3
- package/lib/ImagePreviewerLightbox/utils.js +8 -0
- package/lib/LastModifierFormatter/index.css +1 -0
- package/{es/components/cell-formatter/last-modifier-formatter.js → lib/LastModifierFormatter/index.js} +5 -4
- package/lib/LinkEditor/index.css +9 -0
- package/lib/LinkEditor/index.js +304 -0
- package/{es/components/common → lib/LinkEditor}/link-editor-option.js +0 -0
- package/lib/LinkEditor/mb-link-editor-popover/index.css +85 -0
- package/lib/LinkEditor/mb-link-editor-popover/index.js +171 -0
- package/lib/LinkEditor/pc-link-editor-popover/index.css +63 -0
- package/lib/LinkEditor/pc-link-editor-popover/index.js +115 -0
- package/lib/LinkFormatter/index.css +27 -0
- package/{es/components/cell-formatter/link-formatter.js → lib/LinkFormatter/index.js} +2 -2
- package/{es/css/loading.css → lib/Loading/index.css} +0 -0
- package/{es/components/loading.js → lib/Loading/index.js} +1 -1
- package/{es/components/cell-formatter/long-text-formatter.js → lib/LongTextFormatter/index.js} +4 -6
- package/{es/components/common/mobile/mb-editor-header.js → lib/MBEditorHeader/index.js} +0 -0
- package/lib/MTimeFormatter/index.css +1 -0
- package/{es/components/cell-formatter/mtime-formatter.js → lib/MTimeFormatter/index.js} +1 -0
- package/{es/components/common/modal-portal.js → lib/ModalPortal/index.js} +0 -0
- package/lib/MultipleSelectEditor/index.css +9 -0
- package/lib/MultipleSelectEditor/index.js +236 -0
- package/lib/MultipleSelectFormatter/index.css +1 -0
- package/{es/components/cell-formatter/multiple-select-formatter.js → lib/MultipleSelectFormatter/index.js} +2 -1
- package/lib/NumberEditor/index.js +154 -0
- package/lib/NumberFormatter/index.css +1 -0
- package/{es/components/cell-formatter/number-formatter.js → lib/NumberFormatter/index.js} +2 -1
- package/lib/RateFormatter/index.css +1 -0
- package/{es/components/cell-formatter/rate-formatter.js → lib/RateFormatter/index.js} +1 -0
- package/{es/components/common/select-item.js → lib/SelectItem/index.js} +0 -0
- package/lib/SimpleLongTextFormatter/index.css +63 -0
- package/{es/components/cell-formatter/widgets/long-text-formatter/simple-long-text-formatter.js → lib/SimpleLongTextFormatter/index.js} +5 -2
- package/{es/utils → lib/SimpleLongTextFormatter}/normalize-long-text-value.js +3 -3
- package/lib/SingleSelectEditor/index.css +9 -0
- package/lib/SingleSelectEditor/index.js +201 -0
- package/lib/SingleSelectFormatter/index.css +1 -0
- package/{es/components/cell-formatter/single-select-formatter.js → lib/SingleSelectFormatter/index.js} +2 -1
- package/lib/TextEditor/index.js +122 -0
- package/lib/TextFormatter/index.css +1 -0
- package/{es/components/cell-formatter/text-formatter.js → lib/TextFormatter/index.js} +1 -0
- package/lib/UrlFormatter/index.css +5 -0
- package/{es/components/cell-formatter/url-formatter.js → lib/UrlFormatter/index.js} +1 -0
- package/{es → lib}/assets/images/avatar/default_avatar.png +0 -0
- package/{es/components/cell-factory/cell-formatter-factory.js → lib/cellFormatterFactory/index.js} +3 -3
- package/{es → lib}/constants/cell-types.js +0 -0
- package/lib/constants/index.js +49 -0
- package/lib/css/cell-editor.css +6 -0
- package/lib/css/cell-formatter.css +4 -0
- package/lib/css/mb-cell-editor.css +55 -0
- package/lib/formatterConfig/index.js +31 -0
- package/lib/index.js +43 -0
- package/{es → lib}/lang/index.js +0 -0
- package/{es → lib}/locals/de.js +0 -0
- package/{es → lib}/locals/en.js +0 -0
- package/{es → lib}/locals/fr.js +0 -0
- package/{es → lib}/locals/zh-CN.js +0 -0
- package/lib/select-editor/index.js +4 -0
- package/lib/select-editor/mb-select-editor-popover/index.css +127 -0
- package/lib/select-editor/mb-select-editor-popover/index.js +231 -0
- package/lib/select-editor/pc-select-editor-popover/index.css +72 -0
- package/lib/select-editor/pc-select-editor-popover/index.js +144 -0
- package/{es/components/common → lib/select-editor}/select-editor-option.js +0 -0
- package/{es/components/toast → lib/toaster}/alert.js +0 -0
- package/{es/components/toast → lib/toaster}/index.js +0 -0
- package/{es/components/toast → lib/toaster}/toast.js +0 -0
- package/{es/components/toast → lib/toaster}/toastManager.js +0 -0
- package/{es/components/toast → lib/toaster}/toaster.js +0 -0
- package/lib/utils/editor-utils.js +71 -0
- package/{es → lib}/utils/number-precision.js +1 -0
- package/lib/utils/utils.js +25 -0
- package/{es → lib}/utils/value-format-utils.js +3 -2
- package/package.json +8 -8
- package/es/app.css +0 -20
- package/es/app.js +0 -91
- package/es/components/cell-formatter/formatter-config.js +0 -31
- package/es/components/cell-formatter/index.js +0 -27
- package/es/constants/index.js +0 -48
- package/es/css/cell-editor.css +0 -614
- package/es/css/cell-formatter.css +0 -247
- package/es/index.js +0 -6
- package/es/utils/utils.js +0 -116
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
/* eslint-disable no-case-declarations */
|
|
1
2
|
import moment from 'moment';
|
|
2
3
|
import NP from './number-precision';
|
|
3
|
-
import { NUMBER_TYPES, DEFAULT_NUMBER_FORMAT, DURATION_FORMATS_MAP, DURATION_FORMATS, DURATION_ZERO_DISPLAY, DURATION_DECIMAL_DIGITS, FORMULA_RESULT_TYPE, COLLABORATOR_COLUMN_TYPES, ARRAY_FORMAL_COLUMNS_TYPES, DEFAULT_DATE_FORMAT } from '../constants';
|
|
4
|
-
import * as CellType from '../constants/cell-types';
|
|
4
|
+
import { CellType, NUMBER_TYPES, DEFAULT_NUMBER_FORMAT, DURATION_FORMATS_MAP, DURATION_FORMATS, DURATION_ZERO_DISPLAY, DURATION_DECIMAL_DIGITS, FORMULA_RESULT_TYPE, COLLABORATOR_COLUMN_TYPES, ARRAY_FORMAL_COLUMNS_TYPES, DEFAULT_DATE_FORMAT } from '../constants';
|
|
5
5
|
NP.enableBoundaryChecking(false);
|
|
6
6
|
var _separatorMap = {
|
|
7
7
|
'comma': ',',
|
|
@@ -167,6 +167,7 @@ export var getDateDisplayString = function getDateDisplayString(value, format) {
|
|
|
167
167
|
switch (format) {
|
|
168
168
|
case 'D/M/YYYY':
|
|
169
169
|
case 'DD/MM/YYYY':
|
|
170
|
+
// no-case-declarations
|
|
170
171
|
var formatValue = date.format('YYYY-MM-DD');
|
|
171
172
|
var formatValueList = formatValue.split('-');
|
|
172
173
|
return "".concat(formatValueList[2], "/").concat(formatValueList[1], "/").concat(formatValueList[0]);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"main": "./
|
|
3
|
+
"version": "0.1.76",
|
|
4
|
+
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "0.0.9",
|
|
7
7
|
"@seafile/seafile-calendar": "0.0.15",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"hast-util-to-html": "3.1.0",
|
|
17
17
|
"is-hotkey": "^0.1.6",
|
|
18
18
|
"moment": "^2.26.0",
|
|
19
|
-
"react": "
|
|
19
|
+
"react": "16.14.0",
|
|
20
20
|
"react-app-polyfill": "^1.0.6",
|
|
21
|
-
"react-dom": "
|
|
21
|
+
"react-dom": "16.14.0",
|
|
22
22
|
"react-responsive": "^8.0.3",
|
|
23
23
|
"react-transition-group": "^4.4.1",
|
|
24
24
|
"reactstrap": "^8.4.1",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"eslint": "eslint --ext .jsx,.js src --max-warnings=0",
|
|
46
46
|
"storybook": "start-storybook -p 6006",
|
|
47
47
|
"build-storybook": "build-storybook -c .storybook -o docs",
|
|
48
|
-
"pub:esm": "npm run clean:esm && export BABEL_ENV=
|
|
49
|
-
"pub:lib": "npm run clean:lib && export BABEL_ENV=
|
|
48
|
+
"pub:esm": "npm run clean:esm && export BABEL_ENV=node && ./node_modules/.bin/babel src --out-dir es --copy-files",
|
|
49
|
+
"pub:lib": "npm run clean:lib && export BABEL_ENV=production && ./node_modules/.bin/babel src --out-dir lib --copy-files",
|
|
50
50
|
"pub:umd": "npm run build",
|
|
51
|
-
"pub:optimized": "rm
|
|
52
|
-
"prepublishOnly": "npm run pub:
|
|
51
|
+
"pub:optimized": "rm lib/index.local.js && rm lib/app.js && rm lib/app.css",
|
|
52
|
+
"prepublishOnly": "npm run pub:lib && npm run pub:umd && npm run pub:optimized"
|
|
53
53
|
},
|
|
54
54
|
"files": [
|
|
55
55
|
"assets",
|
package/es/app.css
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
html, body, #root {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.app {
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.app .app-body {
|
|
14
|
-
flex: 1;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.app .app-body .collaborator-container {
|
|
18
|
-
padding: 5px;
|
|
19
|
-
border: 1px solid;
|
|
20
|
-
}
|
package/es/app.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { CollaboratorFormatter, SingleSelectFormatter } from './components/cell-formatter';
|
|
7
|
-
import './app.css';
|
|
8
|
-
|
|
9
|
-
var App = /*#__PURE__*/function (_React$Component) {
|
|
10
|
-
_inherits(App, _React$Component);
|
|
11
|
-
|
|
12
|
-
var _super = _createSuper(App);
|
|
13
|
-
|
|
14
|
-
function App() {
|
|
15
|
-
var _this;
|
|
16
|
-
|
|
17
|
-
_classCallCheck(this, App);
|
|
18
|
-
|
|
19
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
20
|
-
args[_key] = arguments[_key];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
24
|
-
|
|
25
|
-
_this.onDeleteCollaborator = function () {//
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
return _this;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
_createClass(App, [{
|
|
32
|
-
key: "render",
|
|
33
|
-
value: function render() {
|
|
34
|
-
var collaborators = [{
|
|
35
|
-
name: '小强',
|
|
36
|
-
email: '214402@qq.com',
|
|
37
|
-
avatar_url: '你好饿',
|
|
38
|
-
contact_email: 'adbd'
|
|
39
|
-
}];
|
|
40
|
-
var options = [{
|
|
41
|
-
id: '1111',
|
|
42
|
-
name: '未开始',
|
|
43
|
-
color: '#e3f9f6'
|
|
44
|
-
}, {
|
|
45
|
-
id: '2222',
|
|
46
|
-
name: '进行中',
|
|
47
|
-
color: '#ff7500'
|
|
48
|
-
}, {
|
|
49
|
-
id: '3333',
|
|
50
|
-
name: '待评审',
|
|
51
|
-
color: '#eaff56'
|
|
52
|
-
}, {
|
|
53
|
-
id: '4444',
|
|
54
|
-
name: '已评审',
|
|
55
|
-
color: '#faff72'
|
|
56
|
-
}, {
|
|
57
|
-
id: '5555',
|
|
58
|
-
name: '完成',
|
|
59
|
-
color: '#00e500'
|
|
60
|
-
}];
|
|
61
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
62
|
-
className: "app"
|
|
63
|
-
}, /*#__PURE__*/React.createElement("header", {
|
|
64
|
-
className: "app-header"
|
|
65
|
-
}, /*#__PURE__*/React.createElement("h1", {
|
|
66
|
-
className: "text-center"
|
|
67
|
-
}, 'seatable ui component test')), /*#__PURE__*/React.createElement("div", {
|
|
68
|
-
className: "app-body"
|
|
69
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h2", null, "collaborators\u6D4B\u8BD5"), /*#__PURE__*/React.createElement("div", null, "\u5355\u4E2Acollaborators\u6D4B\u8BD5"), /*#__PURE__*/React.createElement(CollaboratorFormatter, {
|
|
70
|
-
value: '123',
|
|
71
|
-
collaborators: collaborators
|
|
72
|
-
}), /*#__PURE__*/React.createElement("div", null, "\u591A\u4E2Acollaborators\u6D4B\u8BD5"), /*#__PURE__*/React.createElement(CollaboratorFormatter, {
|
|
73
|
-
value: ['123', '4567'],
|
|
74
|
-
collaborators: collaborators
|
|
75
|
-
}), /*#__PURE__*/React.createElement("div", null, "\u5E26\u5220\u9664\u6309\u94AE\u6D4B\u8BD5"), /*#__PURE__*/React.createElement(CollaboratorFormatter, {
|
|
76
|
-
containerClassName: "collaborator-container",
|
|
77
|
-
value: ['123', '4567'],
|
|
78
|
-
collaborators: collaborators,
|
|
79
|
-
enableDeleteCollaborator: true,
|
|
80
|
-
onDeleteCollaborator: this.onDeleteCollaborator
|
|
81
|
-
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h2", null, "single-select\u6D4B\u8BD5"), /*#__PURE__*/React.createElement(SingleSelectFormatter, {
|
|
82
|
-
value: '3333',
|
|
83
|
-
options: options
|
|
84
|
-
}))));
|
|
85
|
-
}
|
|
86
|
-
}]);
|
|
87
|
-
|
|
88
|
-
return App;
|
|
89
|
-
}(React.Component);
|
|
90
|
-
|
|
91
|
-
export default App;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
|
|
3
|
-
var _FormatterConfig;
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import * as CellTypes from '../../constants/cell-types';
|
|
7
|
-
import CheckboxFormatter from './checkbox-formatter';
|
|
8
|
-
import ImageFormatter from './image-formatter';
|
|
9
|
-
import LongTextFormatter from './long-text-formatter';
|
|
10
|
-
import TextCellFormatter from './text-formatter';
|
|
11
|
-
import SingleSelectFormatter from './single-select-formatter';
|
|
12
|
-
import MultipleSelectFormatter from './multiple-select-formatter';
|
|
13
|
-
import FileFormatter from './file-formatter';
|
|
14
|
-
import LinkFormatter from './link-formatter';
|
|
15
|
-
import CollaboratorFormatter from './collaborator-formatter';
|
|
16
|
-
import NumberFormatter from './number-formatter';
|
|
17
|
-
import DateFormatter from './date-formatter';
|
|
18
|
-
import CreatorFormatter from './creator-formatter';
|
|
19
|
-
import CTimeFormatter from './ctime-formatter';
|
|
20
|
-
import LastModifierFormatter from './last-modifier-formatter';
|
|
21
|
-
import MTimeFormatter from './mtime-formatter';
|
|
22
|
-
import GeolocationFormatter from './geolocation-formatter';
|
|
23
|
-
import FormulaFormatter from './formula-formatter';
|
|
24
|
-
import AutoNumberFormatter from './auto-number-formatter';
|
|
25
|
-
import UrlFormatter from './url-formatter';
|
|
26
|
-
import EmailFormatter from './email-formatter';
|
|
27
|
-
import DurationFormatter from './duration-formatter';
|
|
28
|
-
import RateFormatter from './rate-formatter';
|
|
29
|
-
import ButtonFormatter from './button-formatter';
|
|
30
|
-
var FormatterConfig = (_FormatterConfig = {}, _defineProperty(_FormatterConfig, CellTypes.DEFAULT, /*#__PURE__*/React.createElement(TextCellFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.TEXT, /*#__PURE__*/React.createElement(TextCellFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.CHECKBOX, /*#__PURE__*/React.createElement(CheckboxFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.LONG_TEXT, /*#__PURE__*/React.createElement(LongTextFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.SINGLE_SELECT, /*#__PURE__*/React.createElement(SingleSelectFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.IMAGE, /*#__PURE__*/React.createElement(ImageFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.FILE, /*#__PURE__*/React.createElement(FileFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.MULTIPLE_SELECT, /*#__PURE__*/React.createElement(MultipleSelectFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.COLLABORATOR, /*#__PURE__*/React.createElement(CollaboratorFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.NUMBER, /*#__PURE__*/React.createElement(NumberFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.DATE, /*#__PURE__*/React.createElement(DateFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.LINK, /*#__PURE__*/React.createElement(LinkFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.CREATOR, /*#__PURE__*/React.createElement(CreatorFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.CTIME, /*#__PURE__*/React.createElement(CTimeFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.LAST_MODIFIER, /*#__PURE__*/React.createElement(LastModifierFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.MTIME, /*#__PURE__*/React.createElement(MTimeFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.GEOLOCATION, /*#__PURE__*/React.createElement(GeolocationFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.FORMULA, /*#__PURE__*/React.createElement(FormulaFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.AUTO_NUMBER, /*#__PURE__*/React.createElement(AutoNumberFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.URL, /*#__PURE__*/React.createElement(UrlFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.EMAIL, /*#__PURE__*/React.createElement(EmailFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.DURATION, /*#__PURE__*/React.createElement(DurationFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.RATE, /*#__PURE__*/React.createElement(RateFormatter, null)), _defineProperty(_FormatterConfig, CellTypes.BUTTON, /*#__PURE__*/React.createElement(ButtonFormatter, null)), _FormatterConfig);
|
|
31
|
-
export default FormatterConfig;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import '../../css/cell-formatter.css';
|
|
2
|
-
export { default as TextFormatter } from './text-formatter';
|
|
3
|
-
export { default as NumberFormatter } from './number-formatter';
|
|
4
|
-
export { default as DateFormatter } from './date-formatter';
|
|
5
|
-
export { default as CheckboxFormatter } from './checkbox-formatter';
|
|
6
|
-
export { default as CollaboratorFormatter } from './collaborator-formatter';
|
|
7
|
-
export { default as SingleSelectFormatter } from './single-select-formatter';
|
|
8
|
-
export { default as MultipleSelectFormatter } from './multiple-select-formatter';
|
|
9
|
-
export { default as LongTextFormatter } from './long-text-formatter';
|
|
10
|
-
export { default as FileFormatter } from './file-formatter';
|
|
11
|
-
export { default as ImageFormatter } from './image-formatter';
|
|
12
|
-
export { default as GeolocationFormatter } from './geolocation-formatter';
|
|
13
|
-
export { default as CTimeFormatter } from './ctime-formatter';
|
|
14
|
-
export { default as CreatorFormatter } from './creator-formatter';
|
|
15
|
-
export { default as LastModifierFormatter } from './last-modifier-formatter';
|
|
16
|
-
export { default as MTimeFormatter } from './mtime-formatter';
|
|
17
|
-
export { default as FormulaFormatter } from './formula-formatter';
|
|
18
|
-
export { default as LinkFormatter } from './link-formatter';
|
|
19
|
-
export { default as AutoNumberFormatter } from './auto-number-formatter';
|
|
20
|
-
export { default as UrlFormatter } from './url-formatter';
|
|
21
|
-
export { default as EmailFormatter } from './email-formatter';
|
|
22
|
-
export { default as DurationFormatter } from './duration-formatter';
|
|
23
|
-
export { default as RateFormatter } from './rate-formatter';
|
|
24
|
-
export { default as ButtonFormatter } from './button-formatter';
|
|
25
|
-
export { default as FileItemFormatter } from './widgets/file-item-formatter';
|
|
26
|
-
export { default as ImagePreviewerLightbox } from './widgets/image-previewer-lightbox';
|
|
27
|
-
export { default as CollaboratorItem } from '../common/collaborator-item';
|
package/es/constants/index.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
|
|
3
|
-
var _DURATION_ZERO_DISPLA, _DURATION_DECIMAL_DIG;
|
|
4
|
-
|
|
5
|
-
import * as CellType from './cell-types';
|
|
6
|
-
export var NUMBER_TYPES = {
|
|
7
|
-
'NUMBER': 'number',
|
|
8
|
-
'NUMBER_WITH_COMMAS': 'number-with-commas',
|
|
9
|
-
'PERCENT': 'percent',
|
|
10
|
-
'YUAN': 'yuan',
|
|
11
|
-
'EURO': 'euro',
|
|
12
|
-
'DOLLAR': 'dollar'
|
|
13
|
-
};
|
|
14
|
-
export var DATE_TYPES = {
|
|
15
|
-
'D/M/YYYY': 'D/M/YYYY',
|
|
16
|
-
'D/M/YYYY HH:mm': 'D/M/YYYY HH:mm',
|
|
17
|
-
'M/D/YYYY': 'M/D/YY',
|
|
18
|
-
'M/D/YYYY HH:mm': 'M/D/YYYY HH:mm',
|
|
19
|
-
'YYYY-MM-DD': 'YYYY-MM-DD',
|
|
20
|
-
'YYYY-MM-DD HH:mm': 'YYYY-MM-DD HH:mm'
|
|
21
|
-
};
|
|
22
|
-
export var FORMULA_RESULT_TYPE = {
|
|
23
|
-
NUMBER: 'number',
|
|
24
|
-
STRING: 'string',
|
|
25
|
-
DATE: 'date',
|
|
26
|
-
BOOL: 'bool',
|
|
27
|
-
ARRAY: 'array'
|
|
28
|
-
};
|
|
29
|
-
export var SIMPLE_CELL_COLUMNS = [CellType.TEXT, CellType.NUMBER, CellType.DATE, CellType.CTIME, CellType.MTIME, CellType.GEOLOCATION, CellType.AUTO_NUMBER, CellType.URL, CellType.EMAIL, CellType.DURATION, CellType.CHECKBOX, CellType.RATE];
|
|
30
|
-
export var ARRAY_FORMAL_COLUMNS = [CellType.IMAGE, CellType.FILE, CellType.MULTIPLE_SELECT, CellType.COLLABORATOR];
|
|
31
|
-
export var SIMPLE_CELL_FORMULA_RESULTS = [FORMULA_RESULT_TYPE.NUMBER, FORMULA_RESULT_TYPE.STRING, FORMULA_RESULT_TYPE.DATE, FORMULA_RESULT_TYPE.BOOL];
|
|
32
|
-
export var COLLABORATOR_COLUMN_TYPES = [CellType.COLLABORATOR, CellType.CREATOR, CellType.LAST_MODIFIER];
|
|
33
|
-
export var ARRAY_FORMAL_COLUMNS_TYPES = [CellType.IMAGE, CellType.FILE, CellType.MULTIPLE_SELECT, CellType.COLLABORATOR];
|
|
34
|
-
export var DEFAULT_NUMBER_FORMAT = 'number';
|
|
35
|
-
export var DEFAULT_DATE_FORMAT = 'YYYY-MM-DD';
|
|
36
|
-
export var DURATION_FORMATS_MAP = {
|
|
37
|
-
H_MM: 'h:mm',
|
|
38
|
-
H_MM_SS: 'h:mm:ss'
|
|
39
|
-
};
|
|
40
|
-
export var DURATION_FORMATS = [{
|
|
41
|
-
name: DURATION_FORMATS_MAP.H_MM,
|
|
42
|
-
type: DURATION_FORMATS_MAP.H_MM
|
|
43
|
-
}, {
|
|
44
|
-
name: DURATION_FORMATS_MAP.H_MM_SS,
|
|
45
|
-
type: DURATION_FORMATS_MAP.H_MM_SS
|
|
46
|
-
}];
|
|
47
|
-
export var DURATION_ZERO_DISPLAY = (_DURATION_ZERO_DISPLA = {}, _defineProperty(_DURATION_ZERO_DISPLA, DURATION_FORMATS_MAP.H_MM, '0:00'), _defineProperty(_DURATION_ZERO_DISPLA, DURATION_FORMATS_MAP.H_MM_SS, '0:00'), _DURATION_ZERO_DISPLA);
|
|
48
|
-
export var DURATION_DECIMAL_DIGITS = (_DURATION_DECIMAL_DIG = {}, _defineProperty(_DURATION_DECIMAL_DIG, DURATION_FORMATS_MAP.H_MM, 0), _defineProperty(_DURATION_DECIMAL_DIG, DURATION_FORMATS_MAP.H_MM_SS, 0), _DURATION_DECIMAL_DIG);
|