dtable-ui-component 0.1.75-beta → 0.1.75-beta1

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.
Files changed (115) hide show
  1. package/lib/app.css +20 -0
  2. package/lib/app.js +96 -0
  3. package/lib/assets/images/avatar/default_avatar.png +0 -0
  4. package/lib/assets/images/file/192/excel.png +0 -0
  5. package/lib/assets/images/file/192/file.png +0 -0
  6. package/lib/assets/images/file/192/music.png +0 -0
  7. package/lib/assets/images/file/192/pdf.png +0 -0
  8. package/lib/assets/images/file/192/pic.png +0 -0
  9. package/lib/assets/images/file/192/ppt.png +0 -0
  10. package/lib/assets/images/file/192/txt.png +0 -0
  11. package/lib/assets/images/file/192/video.png +0 -0
  12. package/lib/assets/images/file/192/word.png +0 -0
  13. package/lib/assets/images/file/24/excel.png +0 -0
  14. package/lib/assets/images/file/24/file.png +0 -0
  15. package/lib/assets/images/file/24/music.png +0 -0
  16. package/lib/assets/images/file/24/pdf.png +0 -0
  17. package/lib/assets/images/file/24/pic.png +0 -0
  18. package/lib/assets/images/file/24/ppt.png +0 -0
  19. package/lib/assets/images/file/24/txt.png +0 -0
  20. package/lib/assets/images/file/24/video.png +0 -0
  21. package/lib/assets/images/file/24/word.png +0 -0
  22. package/lib/assets/images/folder/folder-192.png +0 -0
  23. package/lib/assets/images/folder/folder-24.png +0 -0
  24. package/lib/components/cell-editor/checkbox-editor.js +111 -0
  25. package/lib/components/cell-editor/collaborator-editor.js +249 -0
  26. package/lib/components/cell-editor/date-editor.js +171 -0
  27. package/lib/components/cell-editor/index.js +40 -0
  28. package/lib/components/cell-editor/link-editor.js +321 -0
  29. package/lib/components/cell-editor/multiple-select-editor.js +250 -0
  30. package/lib/components/cell-editor/number-editor.js +162 -0
  31. package/lib/components/cell-editor/single-select-editor.js +216 -0
  32. package/lib/components/cell-editor/text-editor.js +129 -0
  33. package/lib/components/cell-editor-dialog/pc-file-editor-dialog.js +66 -0
  34. package/lib/components/cell-editor-dialog/pc-files-addition/index.js +1 -0
  35. package/lib/components/cell-editor-dialog/pc-files-addition/pc-file-uploaded-item.js +1 -0
  36. package/lib/components/cell-editor-dialog/pc-files-preview/index.js +1 -0
  37. package/lib/components/cell-editor-dialog/pc-files-preview/pc-file-item-preview.js +1 -0
  38. package/lib/components/cell-editor-popover/mb-collaborator-editor-popover.js +183 -0
  39. package/lib/components/cell-editor-popover/mb-date-editor-popover.js +262 -0
  40. package/lib/components/cell-editor-popover/mb-link-editor-popover.js +176 -0
  41. package/lib/components/cell-editor-popover/mb-select-editor-popover.js +243 -0
  42. package/lib/components/cell-editor-popover/pc-collaborator-editor-popover.js +124 -0
  43. package/lib/components/cell-editor-popover/pc-date-editor-popover.js +156 -0
  44. package/lib/components/cell-editor-popover/pc-link-editor-popover.js +128 -0
  45. package/lib/components/cell-editor-popover/pc-select-editor-popover.js +157 -0
  46. package/lib/components/cell-factory/cell-formatter-factory.js +28 -0
  47. package/lib/components/cell-formatter/auto-number-formatter.js +45 -0
  48. package/lib/components/cell-formatter/button-formatter.js +66 -0
  49. package/lib/components/cell-formatter/checkbox-formatter.js +56 -0
  50. package/lib/components/cell-formatter/collaborator-formatter.js +111 -0
  51. package/lib/components/cell-formatter/creator-formatter.js +105 -0
  52. package/lib/components/cell-formatter/ctime-formatter.js +70 -0
  53. package/lib/components/cell-formatter/date-formatter.js +73 -0
  54. package/lib/components/cell-formatter/duration-formatter.js +49 -0
  55. package/lib/components/cell-formatter/email-formatter.js +45 -0
  56. package/lib/components/cell-formatter/file-formatter.js +77 -0
  57. package/lib/components/cell-formatter/formatter-config.js +66 -0
  58. package/lib/components/cell-formatter/formula-formatter.js +189 -0
  59. package/lib/components/cell-formatter/geolocation-formatter.js +66 -0
  60. package/lib/components/cell-formatter/image-formatter.js +171 -0
  61. package/lib/components/cell-formatter/index.js +112 -0
  62. package/lib/components/cell-formatter/last-modifier-formatter.js +105 -0
  63. package/lib/components/cell-formatter/link-formatter.js +165 -0
  64. package/lib/components/cell-formatter/long-text-formatter.js +46 -0
  65. package/lib/components/cell-formatter/mtime-formatter.js +70 -0
  66. package/lib/components/cell-formatter/multiple-select-formatter.js +84 -0
  67. package/lib/components/cell-formatter/number-formatter.js +60 -0
  68. package/lib/components/cell-formatter/rate-formatter.js +93 -0
  69. package/lib/components/cell-formatter/single-select-formatter.js +84 -0
  70. package/lib/components/cell-formatter/text-formatter.js +67 -0
  71. package/lib/components/cell-formatter/url-formatter.js +45 -0
  72. package/lib/components/cell-formatter/widgets/file-item-formatter.js +63 -0
  73. package/lib/components/cell-formatter/widgets/image-previewer-lightbox.js +152 -0
  74. package/lib/components/cell-formatter/widgets/long-text-formatter/html-long-text-formatter.js +107 -0
  75. package/lib/components/cell-formatter/widgets/long-text-formatter/simple-long-text-formatter.js +110 -0
  76. package/lib/components/common/collaborator-item.js +79 -0
  77. package/lib/components/common/edit-editor-button.js +67 -0
  78. package/lib/components/common/images-lazy-load.js +158 -0
  79. package/lib/components/common/link-editor-option.js +121 -0
  80. package/lib/components/common/mobile/mb-editor-header.js +61 -0
  81. package/lib/components/common/modal-portal.js +51 -0
  82. package/lib/components/common/select-editor-option.js +122 -0
  83. package/lib/components/common/select-item.js +73 -0
  84. package/lib/components/file-uploader/index.js +63 -0
  85. package/lib/components/loading.js +16 -0
  86. package/lib/components/toast/alert.js +164 -0
  87. package/lib/components/toast/index.js +12 -0
  88. package/lib/components/toast/toast.js +223 -0
  89. package/lib/components/toast/toastManager.js +189 -0
  90. package/lib/components/toast/toaster.js +92 -0
  91. package/lib/constants/cell-types.js +54 -0
  92. package/lib/constants/index.js +70 -0
  93. package/lib/css/cell-editor.css +614 -0
  94. package/lib/css/cell-formatter.css +247 -0
  95. package/lib/css/custom-rc-calendar.css +118 -0
  96. package/lib/css/image-previewer-ligntbox.css +87 -0
  97. package/lib/css/loading.css +54 -0
  98. package/lib/index.js +64 -0
  99. package/lib/lang/index.js +66 -0
  100. package/lib/locals/de.js +7 -0
  101. package/lib/locals/en.js +22 -0
  102. package/lib/locals/fr.js +7 -0
  103. package/lib/locals/zh-CN.js +22 -0
  104. package/lib/utils/cell-value-validator.js +41 -0
  105. package/lib/utils/column-utils.js +15 -0
  106. package/lib/utils/editor-utils.js +81 -0
  107. package/lib/utils/markdown2html.js +68 -0
  108. package/lib/utils/normalize-long-text-value.js +74 -0
  109. package/lib/utils/number-precision.js +181 -0
  110. package/lib/utils/unified/index.js +470 -0
  111. package/lib/utils/utils.js +141 -0
  112. package/lib/utils/value-format-utils.js +545 -0
  113. package/lib/utils/vfile/core.js +172 -0
  114. package/lib/utils/vfile/index.js +48 -0
  115. package/package.json +3 -3
@@ -0,0 +1,247 @@
1
+ .dtable-ui.cell-formatter-container {
2
+ overflow: hidden;
3
+ line-height: 1;
4
+ }
5
+
6
+ /* collaborator */
7
+ .dtable-ui.collaborator-item {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ margin-right: 10px;
11
+ padding: 0 8px 0 2px;
12
+ height: 20px;
13
+ font-size: 13px;
14
+ border-radius: 10px;
15
+ background: #eaeaea;
16
+ }
17
+
18
+ .dtable-ui.collaborator-item .collaborator-avatar,
19
+ .dtable-ui.collaborator-item .collaborator-name,
20
+ .dtable-ui.collaborator-item .collaborator-remove {
21
+ height: 20px;
22
+ line-height: 20px;
23
+ }
24
+
25
+ .dtable-ui.collaborator-item .collaborator-avatar {
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ margin: 0 4px 0 2px;
30
+ }
31
+
32
+ .dtable-ui.collaborator-item .collaborator-avatar img {
33
+ width: 16px;
34
+ height: 16px;
35
+ border-radius: 50%;
36
+ }
37
+
38
+ .dtable-ui.collaborator-item .collaborator-remove {
39
+ display: inline-block;
40
+ width: 14px;
41
+ margin: 0 -2px 0 2px;
42
+ }
43
+
44
+ .dtable-ui.collaborator-item .collaborator-remove .dtable-font {
45
+ display: inline-block;
46
+ font-size: 12px;
47
+ color: #909090;
48
+ transform: scale(.8);
49
+ cursor: pointer;
50
+ }
51
+
52
+ .dtable-ui.collaborator-item .collaborator-remove .dtable-font:hover {
53
+ color: #666666;
54
+ cursor: pointer;
55
+ }
56
+
57
+ /* long-text */
58
+ .dtable-ui.long-text-formatter {
59
+ display: flex;
60
+ align-items: center;
61
+ height: 28px;
62
+ overflow: hidden;
63
+ text-overflow: ellipsis;
64
+ white-space: nowrap;
65
+ }
66
+
67
+ .dtable-ui.long-text-formatter.article {
68
+ display: block;
69
+ height: auto;
70
+ overflow: auto;
71
+ }
72
+
73
+ .dtable-ui.long-text-formatter .long-text-links,
74
+ .dtable-ui.long-text-formatter .long-text-check-list {
75
+ display: inline-block;
76
+ height: 20px;
77
+ padding: 2px;
78
+ margin: 4px;
79
+ color: #9c9c9c;
80
+ background-color: #f0f0f0;
81
+ border-radius: 3px;
82
+ line-height: 16px;
83
+ }
84
+
85
+ .dtable-ui.long-text-formatter .long-text-check-list .dtable-font,
86
+ .dtable-ui.long-text-formatter .long-text-links .dtable-font {
87
+ margin-right: 4px;
88
+ font-size: 12px;
89
+ }
90
+
91
+ .dtable-ui.long-text-formatter .long-text-check-list .long-text-check-list-completed {
92
+ color: #61BD4F;
93
+ }
94
+
95
+ .dtable-ui.long-text-formatter .long-text-images {
96
+ margin-right: -10px;
97
+ }
98
+
99
+ .dtable-ui.long-text-formatter .long-text-images img {
100
+ max-width: 28px;
101
+ max-height: 28px;
102
+ border: 1px solid #f0f0f0;
103
+ box-sizing: border-box;
104
+ border-radius: 3px;
105
+ }
106
+
107
+ .dtable-ui.long-text-formatter .long-text-images .image-number {
108
+ display: inline-block;
109
+ min-width: 14px;
110
+ padding: 0 3px;
111
+ line-height: 14px;
112
+ font-style: normal;
113
+ font-size: 12px;
114
+ border-radius: 6px;
115
+ background-color: #999;
116
+ color: #fff;
117
+ transform: translate(-50%, 9px) scale(0.8);
118
+ }
119
+
120
+ .dtable-ui.file-formatter {
121
+ display: flex;
122
+ align-items: center;
123
+ }
124
+
125
+ .dtable-ui.file-formatter .file-item-icon {
126
+ display: inline-block;
127
+ height: 28px;
128
+ width: 28px;
129
+ border: 1px solid #f0f0f0;
130
+ }
131
+
132
+ .dtable-ui.file-formatter .file-item-count {
133
+ display: inline-block;
134
+ padding: 0 3px;
135
+ min-width: 14px;
136
+ line-height: 14px;
137
+ font-size: 12px;
138
+ border-radius: 6px;
139
+ text-align: center;
140
+ text-overflow: ellipsis;
141
+ white-space: nowrap;
142
+ color: #fff;
143
+ background-color: #999;
144
+ -webkit-transform: translate(-50%, 8px) scale(.8);
145
+ transform: translate(-50%, 8px) scale(.8);
146
+ }
147
+
148
+
149
+ .dtable-ui.image-formatter {
150
+ display: flex;
151
+ align-items: center;
152
+ }
153
+
154
+ .dtable-ui.image-formatter .image-item {
155
+ display: inline-block;
156
+ height: 28px;
157
+ width: 28px;
158
+ margin-right: 4px;
159
+ border: 1px solid #f0f0f0;
160
+ }
161
+
162
+ .dtable-ui.image-formatter .image-item:hover {
163
+ border: 1px solid #c9c9c9;
164
+ }
165
+
166
+ .dtable-ui.image-formatter .image-item-count {
167
+ display: inline-block;
168
+ padding: 0 3px;
169
+ min-width: 14px;
170
+ line-height: 14px;
171
+ font-size: 12px;
172
+ border-radius: 6px;
173
+ text-align: center;
174
+ text-overflow: ellipsis;
175
+ white-space: nowrap;
176
+ color: #fff;
177
+ background-color: #999;
178
+ -webkit-transform: translate(-50%, 8px) scale(.8);
179
+ transform: translate(-50%, 8px) scale(.8);
180
+ }
181
+
182
+ .dtable-ui.link-formmatter {
183
+ display: inline-flex;
184
+ align-items: center;
185
+ overflow: hidden;
186
+ flex-wrap: nowrap;
187
+ }
188
+
189
+ .dtable-ui.link-formatter .link-item {
190
+ display: inline-flex;
191
+ height: 20px;
192
+ max-width: 230px;
193
+ padding: 0 8px 0 2px;
194
+ align-items: center;
195
+ font-size: 13px;
196
+ margin-right: 10px;
197
+ border-radius: 3px;
198
+ background: #eceff4;
199
+ cursor: pointer;
200
+ }
201
+
202
+ .dtable-ui.link-formatter .link-item .link-name {
203
+ overflow: hidden;
204
+ white-space: nowrap;
205
+ text-overflow: ellipsis;
206
+ }
207
+
208
+ /*
209
+ * url formatter
210
+ * email formatter
211
+ */
212
+
213
+ .dtable-ui.url-formatter,
214
+ .dtable-ui.email-formatter {
215
+ text-decoration: underline;
216
+ }
217
+
218
+ .dtable-ui.formula-formatter.multiple .formula-formatter-content-item {
219
+ display: inline-flex;
220
+ margin-right: 10px;
221
+ }
222
+
223
+
224
+ .dtable-ui.formula-formatter.multiple .formula-formatter-content-item.simple-cell-formatter {
225
+ height: 20px;
226
+ padding: 0 8px;
227
+ align-items: center;
228
+ background: #eceff4;
229
+ border-radius: 3px;
230
+ }
231
+
232
+ .dtable-ui.formula-formatter.multiple .formula-formatter-content-item .collaborator {
233
+ margin-right: 0;
234
+ }
235
+
236
+ /* button */
237
+ .dtable-ui.button-formatter {
238
+ height: 26px;
239
+ width: 80px;
240
+ padding: 5px 8px;
241
+ border-width: 1px;
242
+ border-style: solid;
243
+ border-radius: 3px;
244
+ overflow: hidden;
245
+ white-space: nowrap;
246
+ text-overflow: ellipsis;
247
+ }
@@ -0,0 +1,118 @@
1
+ .dtable-ui.mb-date-editor-picker .rc-calendar-date {
2
+ width: 28px;
3
+ height: 30px;
4
+ border-radius: 50%;
5
+ font-size: 14px;
6
+ line-height: 30px;
7
+ }
8
+
9
+ .dtable-ui.mb-date-editor-picker .rc-calendar-date-panel {
10
+ width: 100%;
11
+ }
12
+
13
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-selected-day .rc-calendar-date {
14
+ background-color: #FcEcD9;
15
+ }
16
+
17
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-date:hover,
18
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-year-panel-year:hover,
19
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-month-panel-cell .rc-calendar-month-panel-month:hover {
20
+ background-color: #FcEcD9;
21
+ }
22
+
23
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-selected-date .rc-calendar-date,
24
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-selected-date .rc-calendar-date:hover,
25
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-year-panel-selected-cell .rc-calendar-year-panel-year,
26
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-month-panel-selected-cell .rc-calendar-month-panel-month {
27
+ background-color: #f09f3f;
28
+ }
29
+
30
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-year-btn:not([href]):not([tabindex]),
31
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-year-btn:not([href]):not([tabindex]),
32
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-month-btn:not([href]):not([tabindex]),
33
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-month-btn:not([href]):not([tabindex]) {
34
+ color: #999;
35
+ }
36
+
37
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-year-btn:not([href]):not([tabindex]):hover,
38
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-year-btn:not([href]):not([tabindex]):hover,
39
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-month-btn:not([href]):not([tabindex]):hover,
40
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-month-btn:not([href]):not([tabindex]):hover {
41
+ color: #666;
42
+ }
43
+
44
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-today .rc-calendar-date {
45
+ border: none;
46
+ position: relative;
47
+ }
48
+
49
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-today .rc-calendar-date::after {
50
+ content: '';
51
+ background: #f09f3f;
52
+ position: absolute;
53
+ width: 4px;
54
+ height: 4px;
55
+ border-radius: 50%;
56
+ left: 45%;
57
+ bottom: 0%;
58
+ display: inline-block;
59
+ }
60
+
61
+ .dtable-ui.mb-date-editor-picker .rc-calendar .rdg-editor-container input.editor-main[readonly] {
62
+ background-color: #fff;
63
+ }
64
+
65
+ .dtable-ui.mb-date-editor-picker .rc-calendar-time-picker {
66
+ z-index: 1;
67
+ }
68
+
69
+ .dtable-ui.mb-date-editor-picker .rc-calendar-right-panel-body ul li.highlight {
70
+ margin: 0;
71
+ border: none;
72
+ background-color: #fff;
73
+ font-size: 12px;
74
+ }
75
+
76
+ .dtable-ui.mb-date-editor-picker .rc-calendar {
77
+ box-shadow: none;
78
+ border-radius: 0px;
79
+ border: 1px solid #e9e9e9;
80
+ border-left: none;
81
+ border-right: none;
82
+ }
83
+
84
+ .dtable-ui.mb-date-editor-picker .rc-calendar-date {
85
+ font-size: 14px;
86
+ }
87
+
88
+ .dtable-ui.mb-date-editor-picker .rc-calendar-date-panel {
89
+ width: 100%;
90
+ }
91
+
92
+ .dtable-ui.mb-date-editor-picker .rc-calendar-body {
93
+ height: 22rem;
94
+ }
95
+
96
+ .dtable-ui.mb-date-editor-picker .rc-calendar-table tr {
97
+ height: 3rem;
98
+ }
99
+
100
+ .dtable-ui.mb-date-editor-picker .rc-calendar-prev-month-btn,
101
+ .dtable-ui.mb-date-editor-picker .rc-calendar-next-month-btn,
102
+ .dtable-ui.mb-date-editor-picker .rc-calendar-prev-year-btn,
103
+ .dtable-ui.mb-date-editor-picker .rc-calendar-next-year-btn {
104
+ font-size: 30px;
105
+ width: 50px;
106
+ }
107
+
108
+ .dtable-ui.mb-date-editor-picker .rc-calendar-header {
109
+ border-bottom: none;
110
+ margin-top: 0.5rem;
111
+ }
112
+
113
+ .dtable-ui.mb-date-editor-picker .rc-calendar-year-select,
114
+ .dtable-ui.mb-date-editor-picker .rc-calendar-month-select,
115
+ .dtable-ui.mb-date-editor-picker .rc-calendar-day-select {
116
+ font-size: 16px;
117
+ padding: 5px;
118
+ }
@@ -0,0 +1,87 @@
1
+ .dtable-ui-component.mobile-image-previewer .ril-prev-button,
2
+ .dtable-ui-component.mobile-image-previewer .ril-next-button,
3
+ .dtable-ui-component.mobile-image-previewer .ril-caption .ril-zoom-in,
4
+ .dtable-ui-component.mobile-image-previewer .ril-caption .ril-zoom-out {
5
+ display: none;
6
+ }
7
+
8
+ .dtable-ui-component.mobile-image-previewer .ril-toolbar .ril__toolbarRightSide {
9
+ padding-right: 14px;
10
+ }
11
+
12
+ .dtable-ui-component.image-footer-choice.mobile-image-footer-choice {
13
+ height: 100px;
14
+ background-color: #000;
15
+ z-index: 1052;
16
+ padding: 0;
17
+ width: 100%;
18
+ border-radius: 2px;
19
+ border-top-right-radius: 0;
20
+ border-top-left-radius: 0;
21
+ bottom: 0;
22
+ position: absolute;
23
+ color: #fff;
24
+ background: rgba(0, 0, 0, 0.6);
25
+ display: flex;
26
+ justify-content: space-between;
27
+ align-items: center;
28
+ }
29
+
30
+ .dtable-ui-component.image-footer-choice.mobile-image-footer-choice .image-footer-icon {
31
+ width: 100%;
32
+ display: flex;
33
+ align-items: center;
34
+ justify-content: space-between;
35
+ flex-direction: row-reverse;
36
+ margin: 0 20px;
37
+ }
38
+
39
+ .dtable-ui-component.image-footer-choice.mobile-image-footer-choice .image-footer-icon .image-footer-choice-item {
40
+ height: 40px;
41
+ width: 40px;
42
+ border-radius: 5px;
43
+ background-color: #333;
44
+ cursor: pointer;
45
+ display: flex;
46
+ justify-content: center;
47
+ align-items: center;
48
+ color: #dbdbdb;
49
+ }
50
+
51
+ .dtable-ui-component.image-footer-choice.mobile-image-footer-choice .image-footer-icon .image-footer-choice-item i {
52
+ font-size: 20px;
53
+ }
54
+
55
+ .ril__outer .ril-caption button.dtable-font {
56
+ height: 50px;
57
+ font-size: 20px;
58
+ }
59
+
60
+ .ril__outer .ril-toolbar button.dtable-font {
61
+ border: none;
62
+ }
63
+
64
+ .ril__outer .ril-toolbar button.dtable-font:focus {
65
+ outline: none;
66
+ }
67
+
68
+ .ril__outer button.dtable-font {
69
+ font-size: 16px;
70
+ }
71
+
72
+ .ril__outer .ril-toolbar .ril-close {
73
+ width: 30px;
74
+ height: 53px;
75
+ }
76
+
77
+ .ril__outer .ril__toolbarItem {
78
+ height: 50px;
79
+ }
80
+
81
+ .ril__outer .ril__toolbarItem button {
82
+ opacity: 0.7;
83
+ }
84
+
85
+ .ril__outer .ril__toolbarItem button:hover {
86
+ opacity: 1;
87
+ }
@@ -0,0 +1,54 @@
1
+ /** loading **/
2
+ @-moz-keyframes loading {
3
+ 0% {
4
+ -moz-transform: rotate(0deg);
5
+ transform: rotate(0deg);
6
+ }
7
+ 100% {
8
+ -moz-transform: rotate(360deg);
9
+ transform: rotate(360deg);
10
+ }
11
+ }
12
+
13
+ @-webkit-keyframes loading {
14
+ 0% {
15
+ -webkit-transform: rotate(0deg);
16
+ transform: rotate(0deg);
17
+ }
18
+ 100% {
19
+ -webkit-transform: rotate(360deg);
20
+ transform: rotate(360deg);
21
+ }
22
+ }
23
+
24
+ @keyframes loading {
25
+ 0% {
26
+ -moz-transform: rotate(0deg);
27
+ -ms-transform: rotate(0deg);
28
+ -webkit-transform: rotate(0deg);
29
+ transform: rotate(0deg);
30
+ }
31
+ 100% {
32
+ -moz-transform: rotate(360deg);
33
+ -ms-transform: rotate(360deg);
34
+ -webkit-transform: rotate(360deg);
35
+ transform: rotate(360deg);
36
+ }
37
+ }
38
+
39
+ .loading-icon {
40
+ display: inline-block;
41
+ width: 20px;
42
+ height: 20px;
43
+ border: 2px solid #eee;
44
+ border-left-color: #aaa;
45
+ border-radius: 50%;
46
+ -moz-animation: loading 0.9s infinite linear;
47
+ -webkit-animation: loading 0.9s infinite linear;
48
+ animation: loading 0.9s infinite linear;
49
+ }
50
+
51
+ .loading-tip {
52
+ display: block;
53
+ margin: 0 auto;
54
+ }
package/lib/index.js ADDED
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ exports.__esModule = true;
6
+ exports.toaster = exports.setLocale = exports.getNumberDisplayString = exports.getDateDisplayString = exports.formatStringToNumber = exports.formatNumberString = exports.UrlFormatter = exports.TextFormatter = exports.TextEditor = exports.SingleSelectFormatter = exports.SingleSelectEditor = exports.RateFormatter = exports.NumberFormatter = exports.NumberEditor = exports.MultipleSelectFormatter = exports.MTimeFormatter = exports.LongTextFormatter = exports.Loading = exports.LinkFormatter = exports.LinkEditor = exports.LastModifierFormatter = exports.ImagePreviewerLightbox = exports.ImageFormatter = exports.GeolocationFormatter = exports.FormulaFormatter = exports.FileItemFormatter = exports.FileFormatter = exports.EmailFormatter = exports.DurationFormatter = exports.DateFormatter = exports.DateEditor = exports.CreatorFormatter = exports.CollaboratorItem = exports.CollaboratorFormatter = exports.CollaboratorEditor = exports.CheckboxFormatter = exports.CheckboxEditor = exports.CTimeFormatter = exports.ButtonFormatter = exports.AutoNumberFormatter = void 0;
7
+
8
+ var _toast = _interopRequireDefault(require("./components/toast"));
9
+
10
+ exports.toaster = _toast.default;
11
+
12
+ var _lang = require("./lang");
13
+
14
+ exports.setLocale = _lang.setLocale;
15
+
16
+ var _valueFormatUtils = require("./utils/value-format-utils");
17
+
18
+ exports.getDateDisplayString = _valueFormatUtils.getDateDisplayString;
19
+ exports.getNumberDisplayString = _valueFormatUtils.getNumberDisplayString;
20
+ exports.formatStringToNumber = _valueFormatUtils.formatStringToNumber;
21
+ exports.formatNumberString = _valueFormatUtils.formatNumberString;
22
+
23
+ var _loading = _interopRequireDefault(require("./components/loading"));
24
+
25
+ exports.Loading = _loading.default;
26
+
27
+ var _cellFormatter = require("./components/cell-formatter");
28
+
29
+ exports.TextFormatter = _cellFormatter.TextFormatter;
30
+ exports.NumberFormatter = _cellFormatter.NumberFormatter;
31
+ exports.CheckboxFormatter = _cellFormatter.CheckboxFormatter;
32
+ exports.DateFormatter = _cellFormatter.DateFormatter;
33
+ exports.SingleSelectFormatter = _cellFormatter.SingleSelectFormatter;
34
+ exports.MultipleSelectFormatter = _cellFormatter.MultipleSelectFormatter;
35
+ exports.CollaboratorFormatter = _cellFormatter.CollaboratorFormatter;
36
+ exports.ImageFormatter = _cellFormatter.ImageFormatter;
37
+ exports.FileFormatter = _cellFormatter.FileFormatter;
38
+ exports.LongTextFormatter = _cellFormatter.LongTextFormatter;
39
+ exports.GeolocationFormatter = _cellFormatter.GeolocationFormatter;
40
+ exports.LinkFormatter = _cellFormatter.LinkFormatter;
41
+ exports.FormulaFormatter = _cellFormatter.FormulaFormatter;
42
+ exports.CTimeFormatter = _cellFormatter.CTimeFormatter;
43
+ exports.CreatorFormatter = _cellFormatter.CreatorFormatter;
44
+ exports.LastModifierFormatter = _cellFormatter.LastModifierFormatter;
45
+ exports.MTimeFormatter = _cellFormatter.MTimeFormatter;
46
+ exports.AutoNumberFormatter = _cellFormatter.AutoNumberFormatter;
47
+ exports.UrlFormatter = _cellFormatter.UrlFormatter;
48
+ exports.EmailFormatter = _cellFormatter.EmailFormatter;
49
+ exports.DurationFormatter = _cellFormatter.DurationFormatter;
50
+ exports.RateFormatter = _cellFormatter.RateFormatter;
51
+ exports.ButtonFormatter = _cellFormatter.ButtonFormatter;
52
+ exports.FileItemFormatter = _cellFormatter.FileItemFormatter;
53
+ exports.ImagePreviewerLightbox = _cellFormatter.ImagePreviewerLightbox;
54
+ exports.CollaboratorItem = _cellFormatter.CollaboratorItem;
55
+
56
+ var _cellEditor = require("./components/cell-editor");
57
+
58
+ exports.TextEditor = _cellEditor.TextEditor;
59
+ exports.NumberEditor = _cellEditor.NumberEditor;
60
+ exports.CheckboxEditor = _cellEditor.CheckboxEditor;
61
+ exports.SingleSelectEditor = _cellEditor.SingleSelectEditor;
62
+ exports.CollaboratorEditor = _cellEditor.CollaboratorEditor;
63
+ exports.DateEditor = _cellEditor.DateEditor;
64
+ exports.LinkEditor = _cellEditor.LinkEditor;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
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
+
18
+ var langData = {
19
+ 'de': _de.default,
20
+ 'en': _en.default,
21
+ 'fr': _fr.default,
22
+ 'zh-cn': _zhCN.default
23
+ };
24
+ var LANGUAGE = 'en';
25
+ var LANGUAGE_MAP = {};
26
+
27
+ function setLocale(args) {
28
+ var lang = typeof args === 'string' ? args : LANGUAGE;
29
+ LANGUAGE_MAP = langData[lang] || langData[LANGUAGE];
30
+ }
31
+
32
+ function getLocale(key, def) {
33
+ if (!key) return def;
34
+
35
+ if (!LANGUAGE_MAP[key]) {
36
+ return def || key;
37
+ }
38
+
39
+ return LANGUAGE_MAP[key];
40
+ }
41
+
42
+ function substitute(str, obj) {
43
+ if (typeof str === 'string') {
44
+ if (str.indexOf('{') < 0) {
45
+ return str;
46
+ }
47
+
48
+ return str.replace(/\\?\{([^{}]+)\}/g, function (match, name) {
49
+ if (match.charAt(0) === '\\') {
50
+ return match.slice(1);
51
+ }
52
+
53
+ return obj[name] === null || obj[name] === undefined ? '' : obj[name];
54
+ });
55
+ } else if (typeof str === 'function') {
56
+ var val = str(obj);
57
+
58
+ if (val === obj && typeof val === 'object') {
59
+ val = Object.assign({}, obj);
60
+ }
61
+
62
+ return val;
63
+ }
64
+
65
+ return '';
66
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var de = {};
6
+ var _default = de;
7
+ exports.default = _default;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var en = {
6
+ Add_an_option: "Add an option",
7
+ Find_an_option: "Find a option",
8
+ No_options_available: "No options available",
9
+ Current_option: "Current option",
10
+ No_option: "No option",
11
+ Choose_an_option: "Choose an option",
12
+ Add_a_collaborator: "Add a collaborator",
13
+ Find_a_collaborator: "Find a collaborator",
14
+ No_collaborators_available: "No collaborators available",
15
+ Done: 'Done',
16
+ Choose_a_collaborator: "Choose a collaborator",
17
+ Please_input: "Please input",
18
+ Please_select: "Please select",
19
+ Clear: "Clear"
20
+ };
21
+ var _default = en;
22
+ exports.default = _default;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var fr = {};
6
+ var _default = fr;
7
+ exports.default = _default;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var zh_CN = {
6
+ Add_an_option: '添加一个选项',
7
+ Find_an_option: "查找标签",
8
+ No_options_available: "没有找到标签。",
9
+ Current_option: "当前标签",
10
+ No_option: "没有标签",
11
+ Choose_an_option: "选择一个标签",
12
+ Add_a_collaborator: "添加协作者",
13
+ Find_a_collaborator: "查找协作者",
14
+ No_collaborators_available: "没有找到协作者",
15
+ Done: '完成',
16
+ Choose_a_collaborator: "选择一个协作者",
17
+ Please_input: "请输入",
18
+ Please_select: "请选择",
19
+ Clear: "清空"
20
+ };
21
+ var _default = zh_CN;
22
+ exports.default = _default;