dtable-ui-component 0.1.75-beta3 → 0.1.75-beta4
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 +27 -38
- package/lib/ButtonFormatter/index.js +47 -59
- package/lib/CTimeFormatter/index.js +39 -53
- package/lib/CheckboxFormatter/index.js +35 -48
- package/lib/CollaboratorFormatter/index.js +42 -64
- package/lib/CollaboratorItem/index.js +44 -61
- package/lib/CreatorFormatter/index.js +42 -62
- package/lib/DateFormatter/index.js +40 -55
- package/lib/DurationFormatter/index.js +29 -42
- package/lib/EmailFormatter/index.js +27 -38
- package/lib/FileFormatter/index.js +50 -65
- package/lib/FileItemFormatter/index.js +32 -44
- package/lib/FileUploader/index.js +34 -44
- package/lib/FormulaFormatter/index.js +81 -102
- package/lib/GeolocationFormatter/index.js +35 -50
- package/lib/ImageFormatter/images-lazy-load.js +73 -81
- package/lib/ImageFormatter/index.js +90 -109
- package/lib/ImagePreviewerLightbox/index.js +27 -60
- package/lib/LastModifierFormatter/index.js +42 -62
- package/lib/LinkFormatter/index.js +59 -80
- package/lib/Loading/index.js +4 -13
- package/lib/LongTextFormatter/html-long-text-formatter.js +49 -60
- package/lib/LongTextFormatter/index.js +9 -28
- package/lib/LongTextFormatter/simple-long-text-formatter.js +52 -58
- package/lib/MTimeFormatter/index.js +39 -53
- package/lib/ModalPortal/index.js +30 -37
- package/lib/MultipleSelectFormatter/index.js +39 -55
- package/lib/NumberFormatter/index.js +35 -50
- package/lib/RateFormatter/index.js +37 -52
- package/lib/SelectItem/index.js +31 -46
- package/lib/SingleSelectFormatter/index.js +38 -54
- package/lib/TextFormatter/index.js +31 -44
- package/lib/UrlFormatter/index.js +27 -38
- package/lib/app.js +75 -80
- package/lib/cellFormatterFactory/index.js +17 -20
- package/lib/components/cell-editor/checkbox-editor.js +59 -66
- package/lib/components/cell-editor/collaborator-editor.js +113 -126
- package/lib/components/cell-editor/date-editor.js +99 -119
- package/lib/components/cell-editor/index.js +9 -40
- package/lib/components/cell-editor/link-editor.js +122 -140
- package/lib/components/cell-editor/multiple-select-editor.js +114 -127
- package/lib/components/cell-editor/number-editor.js +78 -86
- package/lib/components/cell-editor/single-select-editor.js +106 -120
- package/lib/components/cell-editor/text-editor.js +65 -72
- package/lib/components/cell-editor-dialog/pc-file-editor-dialog.js +31 -51
- package/lib/components/cell-editor-dialog/pc-files-addition/index.js +0 -1
- package/lib/components/cell-editor-dialog/pc-files-addition/pc-file-uploaded-item.js +0 -1
- package/lib/components/cell-editor-dialog/pc-files-preview/index.js +0 -1
- package/lib/components/cell-editor-dialog/pc-files-preview/pc-file-item-preview.js +0 -1
- package/lib/components/cell-editor-popover/mb-collaborator-editor-popover.js +105 -111
- package/lib/components/cell-editor-popover/mb-date-editor-popover.js +140 -157
- package/lib/components/cell-editor-popover/mb-link-editor-popover.js +103 -109
- package/lib/components/cell-editor-popover/mb-select-editor-popover.js +142 -155
- package/lib/components/cell-editor-popover/pc-collaborator-editor-popover.js +74 -89
- package/lib/components/cell-editor-popover/pc-date-editor-popover.js +88 -102
- package/lib/components/cell-editor-popover/pc-link-editor-popover.js +77 -91
- package/lib/components/cell-editor-popover/pc-select-editor-popover.js +91 -105
- package/lib/components/common/collaborator-item.js +43 -59
- package/lib/components/common/edit-editor-button.js +28 -39
- package/lib/components/common/link-editor-option.js +63 -71
- package/lib/components/common/mobile/mb-editor-header.js +39 -52
- package/lib/components/common/select-editor-option.js +58 -74
- package/lib/constants/cell-types.js +25 -54
- package/lib/constants/index.js +5 -28
- package/lib/formatterConfig/index.js +28 -59
- package/lib/index.js +31 -139
- package/lib/lang/index.js +11 -27
- package/lib/locals/de.js +1 -6
- package/lib/locals/en.js +1 -6
- package/lib/locals/fr.js +1 -6
- package/lib/locals/zh-CN.js +1 -6
- package/lib/toaster/alert.js +92 -106
- package/lib/toaster/index.js +3 -12
- package/lib/toaster/toast.js +103 -147
- package/lib/toaster/toastManager.js +78 -97
- package/lib/toaster/toaster.js +36 -52
- package/lib/utils/cell-value-validator.js +5 -9
- package/lib/utils/column-utils.js +5 -13
- package/lib/utils/editor-utils.js +3 -13
- package/lib/utils/markdown2html.js +1 -7
- package/lib/utils/normalize-long-text-value.js +1 -6
- package/lib/utils/number-precision.js +13 -31
- package/lib/utils/utils.js +8 -33
- package/lib/utils/value-format-utils.js +58 -108
- package/package.json +5 -5
- package/es/AutoNumberFormatter/index.css +0 -1
- package/es/AutoNumberFormatter/index.js +0 -36
- package/es/ButtonFormatter/index.css +0 -13
- package/es/ButtonFormatter/index.js +0 -56
- package/es/CTimeFormatter/index.css +0 -1
- package/es/CTimeFormatter/index.js +0 -58
- package/es/CheckboxFormatter/index.css +0 -1
- package/es/CheckboxFormatter/index.js +0 -45
- package/es/CollaboratorFormatter/index.css +0 -1
- package/es/CollaboratorFormatter/index.js +0 -91
- package/es/CollaboratorItem/index.css +0 -49
- package/es/CollaboratorItem/index.js +0 -64
- package/es/CreatorFormatter/index.css +0 -1
- package/es/CreatorFormatter/index.js +0 -87
- package/es/DateFormatter/index.css +0 -1
- package/es/DateFormatter/index.js +0 -60
- package/es/DurationFormatter/index.css +0 -1
- package/es/DurationFormatter/index.js +0 -38
- package/es/EmailFormatter/index.css +0 -5
- package/es/EmailFormatter/index.js +0 -36
- package/es/FileFormatter/index.css +0 -29
- package/es/FileFormatter/index.js +0 -64
- package/es/FileItemFormatter/index.js +0 -50
- package/es/FileUploader/index.js +0 -53
- package/es/FormulaFormatter/index.css +0 -19
- package/es/FormulaFormatter/index.js +0 -164
- package/es/GeolocationFormatter/index.css +0 -1
- package/es/GeolocationFormatter/index.js +0 -53
- package/es/ImageFormatter/images-lazy-load.js +0 -150
- package/es/ImageFormatter/index.css +0 -34
- package/es/ImageFormatter/index.js +0 -154
- package/es/ImagePreviewerLightbox/index.css +0 -87
- package/es/ImagePreviewerLightbox/index.js +0 -119
- package/es/LastModifierFormatter/index.css +0 -1
- package/es/LastModifierFormatter/index.js +0 -87
- package/es/LinkFormatter/index.css +0 -27
- package/es/LinkFormatter/index.js +0 -144
- package/es/Loading/index.css +0 -54
- package/es/Loading/index.js +0 -7
- package/es/LongTextFormatter/html-long-text-formatter.js +0 -96
- package/es/LongTextFormatter/index.css +0 -63
- package/es/LongTextFormatter/index.js +0 -29
- package/es/LongTextFormatter/simple-long-text-formatter.js +0 -104
- package/es/MTimeFormatter/index.css +0 -1
- package/es/MTimeFormatter/index.js +0 -58
- package/es/ModalPortal/index.js +0 -44
- package/es/MultipleSelectFormatter/index.css +0 -1
- package/es/MultipleSelectFormatter/index.js +0 -70
- package/es/NumberFormatter/index.css +0 -1
- package/es/NumberFormatter/index.js +0 -47
- package/es/RateFormatter/index.css +0 -1
- package/es/RateFormatter/index.js +0 -80
- package/es/SelectItem/index.js +0 -58
- package/es/SingleSelectFormatter/index.css +0 -1
- package/es/SingleSelectFormatter/index.js +0 -70
- package/es/TextFormatter/index.css +0 -1
- package/es/TextFormatter/index.js +0 -56
- package/es/UrlFormatter/index.css +0 -5
- package/es/UrlFormatter/index.js +0 -36
- package/es/app.css +0 -20
- package/es/app.js +0 -91
- package/es/assets/images/avatar/default_avatar.png +0 -0
- package/es/assets/images/file/192/excel.png +0 -0
- package/es/assets/images/file/192/file.png +0 -0
- package/es/assets/images/file/192/music.png +0 -0
- package/es/assets/images/file/192/pdf.png +0 -0
- package/es/assets/images/file/192/pic.png +0 -0
- package/es/assets/images/file/192/ppt.png +0 -0
- package/es/assets/images/file/192/txt.png +0 -0
- package/es/assets/images/file/192/video.png +0 -0
- package/es/assets/images/file/192/word.png +0 -0
- package/es/assets/images/file/24/excel.png +0 -0
- package/es/assets/images/file/24/file.png +0 -0
- package/es/assets/images/file/24/music.png +0 -0
- package/es/assets/images/file/24/pdf.png +0 -0
- package/es/assets/images/file/24/pic.png +0 -0
- package/es/assets/images/file/24/ppt.png +0 -0
- package/es/assets/images/file/24/txt.png +0 -0
- package/es/assets/images/file/24/video.png +0 -0
- package/es/assets/images/file/24/word.png +0 -0
- package/es/assets/images/folder/folder-192.png +0 -0
- package/es/assets/images/folder/folder-24.png +0 -0
- package/es/cellFormatterFactory/index.js +0 -25
- package/es/components/cell-editor/checkbox-editor.js +0 -104
- package/es/components/cell-editor/collaborator-editor.js +0 -236
- package/es/components/cell-editor/date-editor.js +0 -151
- package/es/components/cell-editor/index.js +0 -9
- package/es/components/cell-editor/link-editor.js +0 -303
- package/es/components/cell-editor/multiple-select-editor.js +0 -237
- package/es/components/cell-editor/number-editor.js +0 -154
- package/es/components/cell-editor/single-select-editor.js +0 -202
- package/es/components/cell-editor/text-editor.js +0 -122
- package/es/components/cell-editor-dialog/pc-file-editor-dialog.js +0 -46
- package/es/components/cell-editor-dialog/pc-files-addition/index.js +0 -0
- package/es/components/cell-editor-dialog/pc-files-addition/pc-file-uploaded-item.js +0 -0
- package/es/components/cell-editor-dialog/pc-files-preview/index.js +0 -0
- package/es/components/cell-editor-dialog/pc-files-preview/pc-file-item-preview.js +0 -0
- package/es/components/cell-editor-popover/mb-collaborator-editor-popover.js +0 -177
- package/es/components/cell-editor-popover/mb-date-editor-popover.js +0 -245
- package/es/components/cell-editor-popover/mb-link-editor-popover.js +0 -170
- package/es/components/cell-editor-popover/mb-select-editor-popover.js +0 -230
- package/es/components/cell-editor-popover/pc-collaborator-editor-popover.js +0 -109
- package/es/components/cell-editor-popover/pc-date-editor-popover.js +0 -142
- package/es/components/cell-editor-popover/pc-link-editor-popover.js +0 -114
- package/es/components/cell-editor-popover/pc-select-editor-popover.js +0 -143
- package/es/components/common/collaborator-item.js +0 -63
- package/es/components/common/edit-editor-button.js +0 -56
- package/es/components/common/link-editor-option.js +0 -113
- package/es/components/common/mobile/mb-editor-header.js +0 -48
- package/es/components/common/select-editor-option.js +0 -106
- package/es/constants/cell-types.js +0 -25
- package/es/constants/index.js +0 -49
- package/es/css/cell-editor.css +0 -614
- package/es/css/cell-formatter.css +0 -4
- package/es/css/custom-rc-calendar.css +0 -118
- package/es/formatterConfig/index.js +0 -31
- package/es/index.js +0 -31
- package/es/lang/index.js +0 -50
- package/es/locals/de.js +0 -2
- package/es/locals/en.js +0 -17
- package/es/locals/fr.js +0 -2
- package/es/locals/zh-CN.js +0 -17
- package/es/toaster/alert.js +0 -150
- package/es/toaster/index.js +0 -3
- package/es/toaster/toast.js +0 -179
- package/es/toaster/toastManager.js +0 -170
- package/es/toaster/toaster.js +0 -76
- package/es/utils/cell-value-validator.js +0 -31
- package/es/utils/column-utils.js +0 -7
- package/es/utils/editor-utils.js +0 -71
- package/es/utils/markdown2html.js +0 -62
- package/es/utils/normalize-long-text-value.js +0 -69
- package/es/utils/number-precision.js +0 -164
- package/es/utils/unified/index.js +0 -470
- package/es/utils/utils.js +0 -116
- package/es/utils/value-format-utils.js +0 -497
- package/es/utils/vfile/core.js +0 -172
- package/es/utils/vfile/index.js +0 -48
package/lib/index.js
CHANGED
|
@@ -1,139 +1,31 @@
|
|
|
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
|
-
|
|
33
|
-
exports.LongTextFormatter = _LongTextFormatter.default;
|
|
34
|
-
|
|
35
|
-
var _TextFormatter = _interopRequireDefault(require("./TextFormatter"));
|
|
36
|
-
|
|
37
|
-
exports.TextFormatter = _TextFormatter.default;
|
|
38
|
-
|
|
39
|
-
var _SingleSelectFormatter = _interopRequireDefault(require("./SingleSelectFormatter"));
|
|
40
|
-
|
|
41
|
-
exports.SingleSelectFormatter = _SingleSelectFormatter.default;
|
|
42
|
-
|
|
43
|
-
var _MultipleSelectFormatter = _interopRequireDefault(require("./MultipleSelectFormatter"));
|
|
44
|
-
|
|
45
|
-
exports.MultipleSelectFormatter = _MultipleSelectFormatter.default;
|
|
46
|
-
|
|
47
|
-
var _FileFormatter = _interopRequireDefault(require("./FileFormatter"));
|
|
48
|
-
|
|
49
|
-
exports.FileFormatter = _FileFormatter.default;
|
|
50
|
-
|
|
51
|
-
var _LinkFormatter = _interopRequireDefault(require("./LinkFormatter"));
|
|
52
|
-
|
|
53
|
-
exports.LinkFormatter = _LinkFormatter.default;
|
|
54
|
-
|
|
55
|
-
var _CollaboratorFormatter = _interopRequireDefault(require("./CollaboratorFormatter"));
|
|
56
|
-
|
|
57
|
-
exports.CollaboratorFormatter = _CollaboratorFormatter.default;
|
|
58
|
-
|
|
59
|
-
var _NumberFormatter = _interopRequireDefault(require("./NumberFormatter"));
|
|
60
|
-
|
|
61
|
-
exports.NumberFormatter = _NumberFormatter.default;
|
|
62
|
-
|
|
63
|
-
var _DateFormatter = _interopRequireDefault(require("./DateFormatter"));
|
|
64
|
-
|
|
65
|
-
exports.DateFormatter = _DateFormatter.default;
|
|
66
|
-
|
|
67
|
-
var _CreatorFormatter = _interopRequireDefault(require("./CreatorFormatter"));
|
|
68
|
-
|
|
69
|
-
exports.CreatorFormatter = _CreatorFormatter.default;
|
|
70
|
-
|
|
71
|
-
var _CTimeFormatter = _interopRequireDefault(require("./CTimeFormatter"));
|
|
72
|
-
|
|
73
|
-
exports.CTimeFormatter = _CTimeFormatter.default;
|
|
74
|
-
|
|
75
|
-
var _LastModifierFormatter = _interopRequireDefault(require("./LastModifierFormatter"));
|
|
76
|
-
|
|
77
|
-
exports.LastModifierFormatter = _LastModifierFormatter.default;
|
|
78
|
-
|
|
79
|
-
var _MTimeFormatter = _interopRequireDefault(require("./MTimeFormatter"));
|
|
80
|
-
|
|
81
|
-
exports.MTimeFormatter = _MTimeFormatter.default;
|
|
82
|
-
|
|
83
|
-
var _GeolocationFormatter = _interopRequireDefault(require("./GeolocationFormatter"));
|
|
84
|
-
|
|
85
|
-
exports.GeolocationFormatter = _GeolocationFormatter.default;
|
|
86
|
-
|
|
87
|
-
var _FormulaFormatter = _interopRequireDefault(require("./FormulaFormatter"));
|
|
88
|
-
|
|
89
|
-
exports.FormulaFormatter = _FormulaFormatter.default;
|
|
90
|
-
|
|
91
|
-
var _AutoNumberFormatter = _interopRequireDefault(require("./AutoNumberFormatter"));
|
|
92
|
-
|
|
93
|
-
exports.AutoNumberFormatter = _AutoNumberFormatter.default;
|
|
94
|
-
|
|
95
|
-
var _UrlFormatter = _interopRequireDefault(require("./UrlFormatter"));
|
|
96
|
-
|
|
97
|
-
exports.UrlFormatter = _UrlFormatter.default;
|
|
98
|
-
|
|
99
|
-
var _EmailFormatter = _interopRequireDefault(require("./EmailFormatter"));
|
|
100
|
-
|
|
101
|
-
exports.EmailFormatter = _EmailFormatter.default;
|
|
102
|
-
|
|
103
|
-
var _DurationFormatter = _interopRequireDefault(require("./DurationFormatter"));
|
|
104
|
-
|
|
105
|
-
exports.DurationFormatter = _DurationFormatter.default;
|
|
106
|
-
|
|
107
|
-
var _RateFormatter = _interopRequireDefault(require("./RateFormatter"));
|
|
108
|
-
|
|
109
|
-
exports.RateFormatter = _RateFormatter.default;
|
|
110
|
-
|
|
111
|
-
var _ButtonFormatter = _interopRequireDefault(require("./ButtonFormatter"));
|
|
112
|
-
|
|
113
|
-
exports.ButtonFormatter = _ButtonFormatter.default;
|
|
114
|
-
|
|
115
|
-
var _ImagePreviewerLightbox = _interopRequireDefault(require("./ImagePreviewerLightbox"));
|
|
116
|
-
|
|
117
|
-
exports.ImagePreviewerLightbox = _ImagePreviewerLightbox.default;
|
|
118
|
-
|
|
119
|
-
var _CollaboratorItem = _interopRequireDefault(require("./CollaboratorItem"));
|
|
120
|
-
|
|
121
|
-
exports.CollaboratorItem = _CollaboratorItem.default;
|
|
122
|
-
|
|
123
|
-
var _FileItemFormatter = _interopRequireDefault(require("./FileItemFormatter"));
|
|
124
|
-
|
|
125
|
-
exports.FileItemFormatter = _FileItemFormatter.default;
|
|
126
|
-
|
|
127
|
-
var _Loading = _interopRequireDefault(require("./Loading"));
|
|
128
|
-
|
|
129
|
-
exports.Loading = _Loading.default;
|
|
130
|
-
|
|
131
|
-
var _cellEditor = require("./components/cell-editor");
|
|
132
|
-
|
|
133
|
-
exports.TextEditor = _cellEditor.TextEditor;
|
|
134
|
-
exports.NumberEditor = _cellEditor.NumberEditor;
|
|
135
|
-
exports.CheckboxEditor = _cellEditor.CheckboxEditor;
|
|
136
|
-
exports.SingleSelectEditor = _cellEditor.SingleSelectEditor;
|
|
137
|
-
exports.CollaboratorEditor = _cellEditor.CollaboratorEditor;
|
|
138
|
-
exports.DateEditor = _cellEditor.DateEditor;
|
|
139
|
-
exports.LinkEditor = _cellEditor.LinkEditor;
|
|
1
|
+
export { default as toaster } from './toaster';
|
|
2
|
+
export { setLocale } from './lang';
|
|
3
|
+
export { getDateDisplayString, getNumberDisplayString, formatStringToNumber, formatNumberString } from './utils/value-format-utils';
|
|
4
|
+
export { default as CheckboxFormatter } from './CheckboxFormatter';
|
|
5
|
+
export { default as ImageFormatter } from './ImageFormatter';
|
|
6
|
+
export { default as LongTextFormatter } from './LongTextFormatter';
|
|
7
|
+
export { default as TextFormatter } from './TextFormatter';
|
|
8
|
+
export { default as SingleSelectFormatter } from './SingleSelectFormatter';
|
|
9
|
+
export { default as MultipleSelectFormatter } from './MultipleSelectFormatter';
|
|
10
|
+
export { default as FileFormatter } from './FileFormatter';
|
|
11
|
+
export { default as LinkFormatter } from './LinkFormatter';
|
|
12
|
+
export { default as CollaboratorFormatter } from './CollaboratorFormatter';
|
|
13
|
+
export { default as NumberFormatter } from './NumberFormatter';
|
|
14
|
+
export { default as DateFormatter } from './DateFormatter';
|
|
15
|
+
export { default as CreatorFormatter } from './CreatorFormatter';
|
|
16
|
+
export { default as CTimeFormatter } from './CTimeFormatter';
|
|
17
|
+
export { default as LastModifierFormatter } from './LastModifierFormatter';
|
|
18
|
+
export { default as MTimeFormatter } from './MTimeFormatter';
|
|
19
|
+
export { default as GeolocationFormatter } from './GeolocationFormatter';
|
|
20
|
+
export { default as FormulaFormatter } from './FormulaFormatter';
|
|
21
|
+
export { default as AutoNumberFormatter } from './AutoNumberFormatter';
|
|
22
|
+
export { default as UrlFormatter } from './UrlFormatter';
|
|
23
|
+
export { default as EmailFormatter } from './EmailFormatter';
|
|
24
|
+
export { default as DurationFormatter } from './DurationFormatter';
|
|
25
|
+
export { default as RateFormatter } from './RateFormatter';
|
|
26
|
+
export { default as ButtonFormatter } from './ButtonFormatter';
|
|
27
|
+
export { default as ImagePreviewerLightbox } from './ImagePreviewerLightbox';
|
|
28
|
+
export { default as CollaboratorItem } from './CollaboratorItem';
|
|
29
|
+
export { default as FileItemFormatter } from './FileItemFormatter';
|
|
30
|
+
export { default as Loading } from './Loading';
|
|
31
|
+
export { TextEditor, NumberEditor, CheckboxEditor, SingleSelectEditor, CollaboratorEditor, DateEditor, LinkEditor } from './components/cell-editor';
|
package/lib/lang/index.js
CHANGED
|
@@ -1,35 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.getLocale = getLocale;
|
|
7
|
-
exports.setLocale = setLocale;
|
|
8
|
-
exports.substitute = substitute;
|
|
9
|
-
|
|
10
|
-
var _de = _interopRequireDefault(require("../locals/de"));
|
|
11
|
-
|
|
12
|
-
var _en = _interopRequireDefault(require("../locals/en"));
|
|
13
|
-
|
|
14
|
-
var _fr = _interopRequireDefault(require("../locals/fr"));
|
|
15
|
-
|
|
16
|
-
var _zhCN = _interopRequireDefault(require("../locals/zh-CN"));
|
|
17
|
-
|
|
1
|
+
import de from '../locals/de';
|
|
2
|
+
import en from '../locals/en';
|
|
3
|
+
import fr from '../locals/fr';
|
|
4
|
+
import zh_CN from '../locals/zh-CN';
|
|
18
5
|
var langData = {
|
|
19
|
-
'de':
|
|
20
|
-
'en':
|
|
21
|
-
'fr':
|
|
22
|
-
'zh-cn':
|
|
6
|
+
'de': de,
|
|
7
|
+
'en': en,
|
|
8
|
+
'fr': fr,
|
|
9
|
+
'zh-cn': zh_CN
|
|
23
10
|
};
|
|
24
11
|
var LANGUAGE = 'en';
|
|
25
12
|
var LANGUAGE_MAP = {};
|
|
26
|
-
|
|
27
|
-
function setLocale(args) {
|
|
13
|
+
export function setLocale(args) {
|
|
28
14
|
var lang = typeof args === 'string' ? args : LANGUAGE;
|
|
29
15
|
LANGUAGE_MAP = langData[lang] || langData[LANGUAGE];
|
|
30
16
|
}
|
|
31
|
-
|
|
32
|
-
function getLocale(key, def) {
|
|
17
|
+
export function getLocale(key, def) {
|
|
33
18
|
if (!key) return def;
|
|
34
19
|
|
|
35
20
|
if (!LANGUAGE_MAP[key]) {
|
|
@@ -38,8 +23,7 @@ function getLocale(key, def) {
|
|
|
38
23
|
|
|
39
24
|
return LANGUAGE_MAP[key];
|
|
40
25
|
}
|
|
41
|
-
|
|
42
|
-
function substitute(str, obj) {
|
|
26
|
+
export function substitute(str, obj) {
|
|
43
27
|
if (typeof str === 'string') {
|
|
44
28
|
if (str.indexOf('{') < 0) {
|
|
45
29
|
return str;
|
package/lib/locals/de.js
CHANGED
package/lib/locals/en.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
1
|
var en = {
|
|
6
2
|
Add_an_option: "Add an option",
|
|
7
3
|
Find_an_option: "Find a option",
|
|
@@ -18,5 +14,4 @@ var en = {
|
|
|
18
14
|
Please_select: "Please select",
|
|
19
15
|
Clear: "Clear"
|
|
20
16
|
};
|
|
21
|
-
|
|
22
|
-
exports.default = _default;
|
|
17
|
+
export default en;
|
package/lib/locals/fr.js
CHANGED
package/lib/locals/zh-CN.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
1
|
var zh_CN = {
|
|
6
2
|
Add_an_option: '添加一个选项',
|
|
7
3
|
Find_an_option: "查找标签",
|
|
@@ -18,5 +14,4 @@ var zh_CN = {
|
|
|
18
14
|
Please_select: "请选择",
|
|
19
15
|
Clear: "清空"
|
|
20
16
|
};
|
|
21
|
-
|
|
22
|
-
exports.default = _default;
|
|
17
|
+
export default zh_CN;
|
package/lib/toaster/alert.js
CHANGED
|
@@ -1,36 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
|
|
10
|
-
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
|
-
var _glamor = require("glamor");
|
|
17
|
-
|
|
18
|
-
var propTypes = {
|
|
19
|
-
intent: _propTypes.default.string.isRequired,
|
|
20
|
-
title: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]).isRequired,
|
|
21
|
-
onRemove: _propTypes.default.func.isRequired,
|
|
22
|
-
children: _propTypes.default.string,
|
|
23
|
-
isRemoveable: _propTypes.default.bool
|
|
24
|
-
};
|
|
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 { css } from 'glamor';
|
|
25
7
|
|
|
26
8
|
var Alert = /*#__PURE__*/function (_React$PureComponent) {
|
|
27
|
-
(
|
|
9
|
+
_inherits(Alert, _React$PureComponent);
|
|
10
|
+
|
|
11
|
+
var _super = _createSuper(Alert);
|
|
28
12
|
|
|
29
13
|
function Alert(props) {
|
|
30
14
|
var _this;
|
|
31
15
|
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
_classCallCheck(this, Alert);
|
|
17
|
+
|
|
18
|
+
_this = _super.call(this, props);
|
|
19
|
+
_this.containerStyle = css({
|
|
34
20
|
borderRadius: '3px',
|
|
35
21
|
backgroundColor: '#fff',
|
|
36
22
|
padding: '10px 16px',
|
|
@@ -40,30 +26,30 @@ var Alert = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
40
26
|
justifyContent: 'space-between',
|
|
41
27
|
flexDirection: 'row'
|
|
42
28
|
});
|
|
43
|
-
_this.containerBorderSuccess =
|
|
29
|
+
_this.containerBorderSuccess = css({
|
|
44
30
|
borderLeft: '3px solid rgb(71, 184, 129)'
|
|
45
31
|
});
|
|
46
|
-
_this.containerBorderWarn =
|
|
32
|
+
_this.containerBorderWarn = css({
|
|
47
33
|
borderLeft: '3px solid rgb(217, 130, 43)'
|
|
48
34
|
});
|
|
49
|
-
_this.containerBorderDanger =
|
|
35
|
+
_this.containerBorderDanger = css({
|
|
50
36
|
borderLeft: '3px solid rgb(236, 76, 71)'
|
|
51
37
|
});
|
|
52
|
-
_this.containerBorderNotify =
|
|
38
|
+
_this.containerBorderNotify = css({
|
|
53
39
|
borderLeft: '3px solid rgb(16, 112, 202)'
|
|
54
40
|
});
|
|
55
|
-
_this.toastTextTitle =
|
|
41
|
+
_this.toastTextTitle = css({
|
|
56
42
|
fontWeight: '600',
|
|
57
43
|
fontSize: '14px',
|
|
58
44
|
color: '#435a6f',
|
|
59
45
|
margin: '0'
|
|
60
46
|
});
|
|
61
|
-
_this.toastTextChild =
|
|
47
|
+
_this.toastTextChild = css({
|
|
62
48
|
fontSize: '14px',
|
|
63
49
|
color: '#999',
|
|
64
50
|
margin: '0'
|
|
65
51
|
});
|
|
66
|
-
_this.toastClose =
|
|
52
|
+
_this.toastClose = css({
|
|
67
53
|
marginLeft: '15px',
|
|
68
54
|
height: '24px',
|
|
69
55
|
width: '24px',
|
|
@@ -78,7 +64,7 @@ var Alert = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
78
64
|
opacity: 1
|
|
79
65
|
}
|
|
80
66
|
});
|
|
81
|
-
_this.toastIcon =
|
|
67
|
+
_this.toastIcon = css({
|
|
82
68
|
marginRight: '10px',
|
|
83
69
|
width: '14px',
|
|
84
70
|
height: '20px',
|
|
@@ -87,78 +73,78 @@ var Alert = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
87
73
|
return _this;
|
|
88
74
|
}
|
|
89
75
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
76
|
+
_createClass(Alert, [{
|
|
77
|
+
key: "getContainerStyle",
|
|
78
|
+
value: function getContainerStyle(intent) {
|
|
79
|
+
switch (intent) {
|
|
80
|
+
case 'success':
|
|
81
|
+
return {
|
|
82
|
+
borderStyle: this.containerBorderSuccess,
|
|
83
|
+
iconColor: css({
|
|
84
|
+
color: 'rgb(71, 184, 129)'
|
|
85
|
+
}),
|
|
86
|
+
iconClass: 'dtable-font dtable-icon-check-circle'
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
case 'warning':
|
|
90
|
+
return {
|
|
91
|
+
borderStyle: this.containerBorderWarn,
|
|
92
|
+
iconColor: css({
|
|
93
|
+
color: 'rgb(217, 130, 43)'
|
|
94
|
+
}),
|
|
95
|
+
iconClass: 'dtable-font dtable-icon-exclamation-triangle'
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
case 'none':
|
|
99
|
+
return {
|
|
100
|
+
borderStyle: this.containerBorderNotify,
|
|
101
|
+
iconColor: css({
|
|
102
|
+
color: 'rgb(16, 112, 202)'
|
|
103
|
+
}),
|
|
104
|
+
iconClass: 'dtable-font dtable-icon-exclamation-circle'
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
case 'danger':
|
|
108
|
+
return {
|
|
109
|
+
borderStyle: this.containerBorderDanger,
|
|
110
|
+
iconColor: css({
|
|
111
|
+
color: 'rgb(236, 76, 71)'
|
|
112
|
+
}),
|
|
113
|
+
iconClass: 'dtable-font dtable-icon-exclamation-circle'
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
default:
|
|
117
|
+
return {
|
|
118
|
+
borderStyle: this.containerBorderSuccess,
|
|
119
|
+
iconColor: css({
|
|
120
|
+
color: 'rgb(71, 184, 129)'
|
|
121
|
+
}),
|
|
122
|
+
iconClass: 'dtable-font dtable-icon-check-circle'
|
|
123
|
+
};
|
|
124
|
+
}
|
|
138
125
|
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
126
|
+
}, {
|
|
127
|
+
key: "render",
|
|
128
|
+
value: function render() {
|
|
129
|
+
var toastStyle = this.getContainerStyle(this.props.intent);
|
|
130
|
+
return /*#__PURE__*/React.createElement("div", css(toastStyle.borderStyle, this.containerStyle), /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
className: this.toastIcon
|
|
132
|
+
}, /*#__PURE__*/React.createElement("i", Object.assign({
|
|
133
|
+
className: toastStyle.iconClass
|
|
134
|
+
}, toastStyle.iconColor))), /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
className: this.toastTextContainer
|
|
136
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
137
|
+
className: this.toastTextTitle
|
|
138
|
+
}, this.props.title), this.props.children ? /*#__PURE__*/React.createElement("p", {
|
|
139
|
+
className: this.toastTextChild
|
|
140
|
+
}, this.props.children) : null), this.props.isRemoveable && /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
onClick: this.props.onRemove,
|
|
142
|
+
className: this.toastClose
|
|
143
|
+
}, /*#__PURE__*/React.createElement("span", null, "\xD7")));
|
|
144
|
+
}
|
|
145
|
+
}]);
|
|
158
146
|
|
|
159
147
|
return Alert;
|
|
160
|
-
}(
|
|
148
|
+
}(React.PureComponent);
|
|
161
149
|
|
|
162
|
-
|
|
163
|
-
var _default = Alert;
|
|
164
|
-
exports.default = _default;
|
|
150
|
+
export default Alert;
|
package/lib/toaster/index.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _toaster = _interopRequireDefault(require("./toaster"));
|
|
9
|
-
|
|
10
|
-
var toaster = new _toaster.default();
|
|
11
|
-
var _default = toaster;
|
|
12
|
-
exports.default = _default;
|
|
1
|
+
import Toaster from './toaster';
|
|
2
|
+
var toaster = new Toaster();
|
|
3
|
+
export default toaster;
|