sea-chart 0.0.56 → 0.0.57
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/dist/assets/css/react-data-grid-header.css +515 -0
- package/dist/components/cell-factory/FormatterConfig.js +57 -0
- package/dist/components/cell-factory/SimpleCellFormatter.js +32 -0
- package/dist/components/cell-factory/SingleSelectOption.js +53 -0
- package/dist/components/cell-factory/cell-editor-factory.js +12 -0
- package/dist/components/cell-factory/cell-formatter-factory.js +11 -0
- package/dist/components/cell-factory/link-content.js +121 -0
- package/dist/components/draggable/Draggable.js +77 -0
- package/dist/components/dtable-search-input/index.js +127 -0
- package/dist/{settings/trend-settings/general-font-setting.js → components/font-settings/index.js} +2 -2
- package/dist/components/highlighter/highlighter.js +25 -0
- package/dist/components/resize-handle/ResizeHandle.js +30 -0
- package/dist/components/row-card/row-card-header-cell.js +116 -0
- package/dist/components/row-card/row-card-header.js +135 -0
- package/dist/components/row-card/row-card-item.js +213 -0
- package/dist/components/row-card/row-card.css +323 -0
- package/dist/components/row-card/row-card.js +242 -0
- package/dist/components/statistic-record-dialog/index.css +120 -0
- package/dist/components/statistic-record-dialog/index.js +343 -0
- package/dist/constants/common-constants.js +10 -5
- package/dist/constants/index.js +1 -1
- package/dist/context.js +5 -0
- package/dist/locale/lang/en.js +7 -6
- package/dist/locale/lang/zh_CN.js +7 -6
- package/dist/model/basic-number-card.js +8 -4
- package/dist/model/generic-model.js +3 -0
- package/dist/settings/basic-number-card/style-settings.js +63 -73
- package/dist/settings/trend-settings/style-setting.js +1 -1
- package/dist/settings/widgets/select-view/index.js +4 -4
- package/dist/settings/widgets/title-settings/index.js +5 -4
- package/dist/utils/chart-utils/original-data-utils/compare-bar-chart-calculator.js +12 -2
- package/dist/utils/chart-utils/original-data-utils/completeness-calculator.js +22 -10
- package/dist/utils/chart-utils/original-data-utils/mirror-calculator.js +4 -3
- package/dist/utils/column-utils.js +7 -1
- package/dist/utils/common-utils.js +193 -0
- package/dist/utils/digital-sign-utils.js +22 -0
- package/dist/utils/row-record-utils.js +479 -0
- package/dist/utils/search.js +66 -0
- package/dist/utils/sql/chart-data-sql.js +94 -0
- package/dist/utils/sql/column-2-sql-column.js +236 -0
- package/dist/view/index.css +7 -11
- package/dist/view/index.js +24 -3
- package/dist/view/wrapper/area.js +1 -1
- package/dist/view/wrapper/bar-group.js +0 -16
- package/dist/view/wrapper/bar.js +1 -1
- package/dist/view/wrapper/basic-number-card.js +93 -48
- package/dist/view/wrapper/combination.js +5 -2
- package/dist/view/wrapper/dashboard.js +3 -0
- package/dist/view/wrapper/heat-map.js +1 -1
- package/dist/view/wrapper/horizontal-bar-group.js +0 -16
- package/dist/view/wrapper/index.js +260 -233
- package/dist/view/wrapper/line-group.js +3 -3
- package/dist/view/wrapper/line.js +3 -3
- package/dist/view/wrapper/map.js +15 -5
- package/dist/view/wrapper/mirror.js +1 -1
- package/dist/view/wrapper/pie.js +4 -8
- package/dist/view/wrapper/ring.js +1 -5
- package/dist/view/wrapper/scatter.js +1 -1
- package/dist/view/wrapper/table/index.js +5 -5
- package/dist/view/wrapper/table/one-dimension-table-no-numeric-columns.js +16 -10
- package/dist/view/wrapper/table/one-dimension-table-with-numeric-columns.js +17 -7
- package/dist/view/wrapper/table/two-dimension-table.js +37 -23
- package/dist/view/wrapper/treemap.js +3 -0
- package/dist/view/wrapper/trend.js +0 -2
- package/dist/view/wrapper/world-map.js +2 -4
- package/package.json +4 -3
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
.react-grid-Header {
|
|
2
|
+
background: #f9f9f9;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.react-grid-Header--resizing {
|
|
6
|
+
cursor: ew-resize;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.react-grid-HeaderRow {
|
|
10
|
+
-webkit-user-select: none;
|
|
11
|
+
-moz-user-select: none;
|
|
12
|
+
-ms-user-select: none;
|
|
13
|
+
user-select: none;
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dtable-header-setting {
|
|
19
|
+
height: 100%;
|
|
20
|
+
width: 30px;
|
|
21
|
+
float: right;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
color: #888;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dtable-header-setting::after {
|
|
28
|
+
content: '';
|
|
29
|
+
display: block;
|
|
30
|
+
clear: both;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dtable-header-setting:hover {
|
|
34
|
+
color: #444;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.dtable-header-setting-submenu .dtable-dropdown-menu {
|
|
39
|
+
top: -12px !important;
|
|
40
|
+
left: -10px !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.dtable-dropdown-menu .dtable-header-setting-submenu:hover .dtable-dropdown-menu .item-icon {
|
|
44
|
+
color: #8c8c8c;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dtable-dropdown-menu .dtable-header-setting-submenu:hover .dropdown-item:hover .item-icon {
|
|
48
|
+
color: #fff;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.react-grid-HeaderCell {
|
|
52
|
+
-webkit-user-select: none;
|
|
53
|
+
-moz-user-select: none;
|
|
54
|
+
-ms-user-select: none;
|
|
55
|
+
user-select: none;
|
|
56
|
+
background: #f9f9f9;
|
|
57
|
+
padding: 8px;
|
|
58
|
+
font-weight: normal;
|
|
59
|
+
border-right: 1px solid #dddddd;
|
|
60
|
+
border-bottom: 1px solid #dddddd;
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.react-grid-HeaderCell.rdg-row-actions-cell {
|
|
65
|
+
z-index: 3;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.react-grid-HeaderCell__value {
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
position: relative;
|
|
73
|
+
top: 50%;
|
|
74
|
+
transform: translateY(-50%);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.react-grid-HeaderCell__resizeHandle {
|
|
78
|
+
cursor: ew-resize;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.react-grid-HeaderCell__resizeHandle:hover {
|
|
82
|
+
background: #dddddd;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.react-grid-HeaderCell--frozen:last-of-type {
|
|
86
|
+
box-shadow: 2px 0 5px -2px rgba(136, 136, 136, 0.3);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.react-grid-HeaderCell--resizing .react-grid-HeaderCell__resizeHandle {
|
|
90
|
+
background: #dddddd;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.react-grid-HeaderCell__draggable {
|
|
94
|
+
cursor: col-resize;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.react-grid-HeaderCell__draggable:hover {
|
|
98
|
+
background-color: #2d7ff9;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.rdg-can-drop > .react-grid-HeaderCell {
|
|
102
|
+
background: #ececec;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.react-grid-HeaderCell .Select {
|
|
106
|
+
max-height: 30px;
|
|
107
|
+
font-size: 12px;
|
|
108
|
+
font-weight: normal;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.react-grid-HeaderCell .Select-control {
|
|
112
|
+
max-height: 30px;
|
|
113
|
+
border: 1px solid #cccccc;
|
|
114
|
+
color: #555;
|
|
115
|
+
border-radius: 3px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.react-grid-HeaderCell .is-focused:not(.is-open) > .Select-control {
|
|
119
|
+
border-color: #66afe9;
|
|
120
|
+
outline: 0;
|
|
121
|
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
|
122
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.react-grid-HeaderCell .Select-control .Select-placeholder {
|
|
126
|
+
line-height: 20px;
|
|
127
|
+
color: #999;
|
|
128
|
+
padding: 4px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.react-grid-HeaderCell .Select-control .Select-input {
|
|
132
|
+
max-height: 28px;
|
|
133
|
+
padding: 4px;
|
|
134
|
+
margin-left: 0px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.react-grid-HeaderCell .Select-control .Select-input input {
|
|
138
|
+
padding: 0px;
|
|
139
|
+
height: 100%;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.react-grid-HeaderCell .Select-control .Select-arrow-zone .Select-arrow {
|
|
143
|
+
border-color: gray transparent transparent;
|
|
144
|
+
border-width: 4px 4px 2.5px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.react-grid-HeaderCell .Select-control .Select-value {
|
|
148
|
+
padding: 4px;
|
|
149
|
+
line-height: 20px !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.react-grid-HeaderCell .Select--multi .Select-control .Select-value {
|
|
153
|
+
padding: 0px;
|
|
154
|
+
line-height: 16px !important;
|
|
155
|
+
max-height: 20px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.react-grid-HeaderCell .Select--multi .Select-control .Select-value .Select-value-icon {
|
|
159
|
+
max-height: 20px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.react-grid-HeaderCell .Select--multi .Select-control .Select-value .Select-value-label {
|
|
163
|
+
max-height: 20px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.react-grid-HeaderCell .Select-control .Select-value .Select-value-label {
|
|
167
|
+
color: #555555 !important;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.react-grid-HeaderCell .Select-menu-outer {
|
|
171
|
+
z-index: 2;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.react-grid-HeaderCell .Select-menu-outer .Select-option {
|
|
175
|
+
padding: 4px;
|
|
176
|
+
line-height: 20px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.react-grid-HeaderCell .Select-menu-outer .Select-menu .Select-option.is-selected {
|
|
180
|
+
color: #555555;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.react-grid-HeaderCell .Select-menu-outer .Select-menu .Select-option.is-focused {
|
|
184
|
+
color: #555555;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* custom */
|
|
188
|
+
.header-cell-container {
|
|
189
|
+
width: 100%;
|
|
190
|
+
height: 100%;
|
|
191
|
+
display: flex;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.header-cell-container > div {
|
|
195
|
+
display: flex;
|
|
196
|
+
flex: 1;
|
|
197
|
+
align-items: center;
|
|
198
|
+
justify-content: space-between;
|
|
199
|
+
width: 100%;
|
|
200
|
+
min-width: 30px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.header-cell-container .header-cell-left {
|
|
204
|
+
width: calc(100% - 20px);
|
|
205
|
+
display: flex;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.header-cell-container .header-uneditable-cell-left {
|
|
209
|
+
width: calc(100% - 34px);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.header-cell-container .header-uneditable-description-cell-left {
|
|
213
|
+
width: calc(100% - 50px);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.header-cell-container .dtable-dropdown-menu {
|
|
217
|
+
width: 20px;
|
|
218
|
+
padding: 0 5px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.header-icon {
|
|
222
|
+
display: inline-block;
|
|
223
|
+
padding: 0 0.3125rem;
|
|
224
|
+
margin-left: -0.3125rem;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.header-cell-container .header-icon {
|
|
228
|
+
display: flex;
|
|
229
|
+
align-items: center;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.header-icon:hover {
|
|
233
|
+
cursor: default;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.header-icon .dtable-font {
|
|
237
|
+
font-size: 14px;
|
|
238
|
+
color: #aaa;
|
|
239
|
+
cursor: default;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.header-icon .dtable-font.dtable-icon-use-help {
|
|
243
|
+
color: #bdbdbd;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.header-icon .dtable-font.dtable-icon-use-help:hover {
|
|
247
|
+
color: #888;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.bs-tooltip-bottom .arrow::before,
|
|
251
|
+
.bs-tooltip-auto[x-placement^='bottom'] .arrow::before {
|
|
252
|
+
border-bottom-color: #303133;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.bs-tooltip-auto[x-placement^='right'] .arrow::before {
|
|
256
|
+
border-right-color: #303133;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.bs-tooltip-auto[x-placement^='left'] .arrow::before {
|
|
260
|
+
border-left-color: #303133;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.tooltip-inner {
|
|
264
|
+
max-width: 242px;
|
|
265
|
+
font-weight: lighter;
|
|
266
|
+
text-align: start;
|
|
267
|
+
background-color: #303133;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.help-icon-tooltip-inner {
|
|
271
|
+
position: relative;
|
|
272
|
+
overflow: hidden;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.help-icon-tooltip-btn {
|
|
276
|
+
float: right;
|
|
277
|
+
cursor: pointer;
|
|
278
|
+
color: rgba(255, 255, 255, 0.6);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.help-icon-tooltip-btn:hover {
|
|
282
|
+
color: rgba(255, 255, 255, 1);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.expand-row-icon {
|
|
286
|
+
display: inline-block;
|
|
287
|
+
margin-right: 0.5rem;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.expand-row-icon .dtable-font {
|
|
291
|
+
font-size: 14px;
|
|
292
|
+
color: #535354;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.header-name {
|
|
296
|
+
margin-left: 3px;
|
|
297
|
+
overflow: hidden;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.header-cell-container .header-name {
|
|
301
|
+
align-items: center;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.header-dropdown {
|
|
305
|
+
position: unset;
|
|
306
|
+
display: inline-block;
|
|
307
|
+
margin-left: auto;
|
|
308
|
+
z-index: 1;
|
|
309
|
+
cursor: pointer !important;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.header-dropdown:hover {
|
|
313
|
+
cursor: pointer;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.header-dropdown > span {
|
|
317
|
+
display: inline-block;
|
|
318
|
+
padding: 0 6px;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.header-dropdown .dtable-icon-drop-down {
|
|
322
|
+
display: inline-block;
|
|
323
|
+
font-size: 12px;
|
|
324
|
+
color: #999;
|
|
325
|
+
transform: scale(0.8);
|
|
326
|
+
transition: all 0.1s;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.header-dropdown:hover .dtable-icon-drop-down {
|
|
330
|
+
color: #aaa;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.header-dropdown .dropdown-item:hover {
|
|
334
|
+
background-color: #20a0ff;
|
|
335
|
+
color: #fff;
|
|
336
|
+
cursor: pointer;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.header-dropdown .grid-header-dropdown-item {
|
|
340
|
+
padding: 0 12px !important;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.header-dropdown .grid-header-dropdown-item .item-icon {
|
|
344
|
+
line-height: 32px;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.dtable-dropdown-menu .grid-header-dropdown-item.formula-date-format-item {
|
|
348
|
+
padding-left: 15px;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.react-grid-HeaderCell.add-column-icon {
|
|
352
|
+
display: flex;
|
|
353
|
+
justify-content: center;
|
|
354
|
+
align-items: center;
|
|
355
|
+
padding: 0;
|
|
356
|
+
position: absolute;
|
|
357
|
+
cursor: pointer;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.react-grid-HeaderCell.add-column-icon .dtable-font {
|
|
361
|
+
font-size: 15px;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.dtable-io-dialog {
|
|
365
|
+
width: 560px;
|
|
366
|
+
max-width: 560px;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.dtable-io-dialog .modal-body {
|
|
370
|
+
padding: 0;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.dtable-io-dialog .download-files-header {
|
|
374
|
+
padding: 16px;
|
|
375
|
+
padding-bottom: 0;
|
|
376
|
+
color: #999;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.dtable-io-dialog .download-files-header .select-columns {
|
|
380
|
+
color: #eb8205;
|
|
381
|
+
cursor: pointer;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.dtable-io-dialog .download-files-body {
|
|
385
|
+
display: flex;
|
|
386
|
+
flex-wrap: wrap;
|
|
387
|
+
justify-content: space-between;
|
|
388
|
+
padding: 0 16px 16px;
|
|
389
|
+
height: 317px;
|
|
390
|
+
overflow: auto;
|
|
391
|
+
align-content: flex-start;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.dtable-io-dialog .download-files-item {
|
|
395
|
+
width: 255px;
|
|
396
|
+
height: 60px;
|
|
397
|
+
border: 1px solid #eeeeee;
|
|
398
|
+
margin-top: 16px;
|
|
399
|
+
box-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
|
|
400
|
+
display: flex;
|
|
401
|
+
align-items: center;
|
|
402
|
+
padding: 10px;
|
|
403
|
+
padding-left: 0;
|
|
404
|
+
border-radius: 4px;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.dtable-io-dialog .download-files-item:hover {
|
|
408
|
+
box-shadow: 0 1px 10px 2px rgba(0, 0, 0, 0.1);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.dtable-io-dialog .download-files-item .download-file-container {
|
|
412
|
+
flex: 1;
|
|
413
|
+
display: flex;
|
|
414
|
+
justify-content: space-between;
|
|
415
|
+
flex-direction: column;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.dtable-io-dialog .download-files-item .download-file-content {
|
|
419
|
+
display: flex;
|
|
420
|
+
justify-content: space-between;
|
|
421
|
+
flex: 1;
|
|
422
|
+
padding-left: 10px;
|
|
423
|
+
align-items: center;
|
|
424
|
+
font-size: 14px;
|
|
425
|
+
min-height: 24px;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.download-file-content .download-file-count {
|
|
429
|
+
color: #999999;
|
|
430
|
+
font-size: 14px;
|
|
431
|
+
margin-left: 5px;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.download-files-item .download-file-btn {
|
|
435
|
+
width: 24px;
|
|
436
|
+
height: 24px;
|
|
437
|
+
display: flex;
|
|
438
|
+
align-items: center;
|
|
439
|
+
justify-content: center;
|
|
440
|
+
color: #999;
|
|
441
|
+
cursor: pointer;
|
|
442
|
+
align-self: flex-start;
|
|
443
|
+
font-size: 14px;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.download-files-item .download-file-btn:hover {
|
|
447
|
+
color: #333;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.download-files-item .item-dropdown-menu .item-dropdown-more {
|
|
451
|
+
color: #999;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.download-files-item .dtable-icon-check-circle {
|
|
455
|
+
font-size: 12px;
|
|
456
|
+
margin-left: 4px;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.download-file-container .download-file-status {
|
|
460
|
+
display: flex;
|
|
461
|
+
justify-content: space-between;
|
|
462
|
+
flex: 1;
|
|
463
|
+
padding-left: 10px;
|
|
464
|
+
align-items: center;
|
|
465
|
+
font-size: 12px;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.download-file-status .download-file-tip {
|
|
469
|
+
color: #999;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.download-file-status .transfer-file-tip {
|
|
473
|
+
color: green;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.download-file-status .download-file-cancel {
|
|
477
|
+
color: #f0a033;
|
|
478
|
+
cursor: pointer;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.download-file-status .download-file-error {
|
|
482
|
+
color: red;
|
|
483
|
+
display: flex;
|
|
484
|
+
align-items: center;
|
|
485
|
+
cursor: pointer;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.download-file-status .download-file-error .download-file-again {
|
|
489
|
+
margin-left: 5px;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.react-grid-HeaderCell-default .header-cell-container .widget-HeaderCell__value {
|
|
493
|
+
line-height: 24px;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.react-grid-HeaderCell-default .header-name .header-name-text {
|
|
497
|
+
overflow: hidden;
|
|
498
|
+
text-overflow: ellipsis;
|
|
499
|
+
white-space: nowrap;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.react-grid-HeaderCell-double .header-cell-container .header-cell-left {
|
|
503
|
+
height: 100%;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.react-grid-HeaderCell-double .header-name .header-name-text {
|
|
507
|
+
display: -webkit-box;
|
|
508
|
+
-webkit-line-clamp: 2;
|
|
509
|
+
-webkit-box-orient: vertical;
|
|
510
|
+
overflow: hidden;
|
|
511
|
+
text-overflow: ellipsis;
|
|
512
|
+
white-space: initial;
|
|
513
|
+
max-height: 46px;
|
|
514
|
+
height: fit-content;
|
|
515
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import _DepartmentSingleSelectFormatter from "dtable-ui-component/lib/DepartmentSingleSelectFormatter";
|
|
2
|
+
import _DigitalSignFormatter from "dtable-ui-component/lib/DigitalSignFormatter";
|
|
3
|
+
import _RateFormatter from "dtable-ui-component/lib/RateFormatter";
|
|
4
|
+
import _ButtonFormatter from "dtable-ui-component/lib/ButtonFormatter";
|
|
5
|
+
import _DurationFormatter from "dtable-ui-component/lib/DurationFormatter";
|
|
6
|
+
import _EmailFormatter from "dtable-ui-component/lib/EmailFormatter";
|
|
7
|
+
import _UrlFormatter from "dtable-ui-component/lib/UrlFormatter";
|
|
8
|
+
import _AutoNumberFormatter from "dtable-ui-component/lib/AutoNumberFormatter";
|
|
9
|
+
import _FormulaFormatter from "dtable-ui-component/lib/FormulaFormatter";
|
|
10
|
+
import _GeolocationFormatter from "dtable-ui-component/lib/GeolocationFormatter";
|
|
11
|
+
import _MTimeFormatter from "dtable-ui-component/lib/MTimeFormatter";
|
|
12
|
+
import _LastModifierFormatter from "dtable-ui-component/lib/LastModifierFormatter";
|
|
13
|
+
import _CTimeFormatter from "dtable-ui-component/lib/CTimeFormatter";
|
|
14
|
+
import _CreatorFormatter from "dtable-ui-component/lib/CreatorFormatter";
|
|
15
|
+
import _LinkFormatter from "dtable-ui-component/lib/LinkFormatter";
|
|
16
|
+
import _DateFormatter from "dtable-ui-component/lib/DateFormatter";
|
|
17
|
+
import _NumberFormatter from "dtable-ui-component/lib/NumberFormatter";
|
|
18
|
+
import _CollaboratorFormatter from "dtable-ui-component/lib/CollaboratorFormatter";
|
|
19
|
+
import _MultipleSelectFormatter from "dtable-ui-component/lib/MultipleSelectFormatter";
|
|
20
|
+
import _FileFormatter from "dtable-ui-component/lib/FileFormatter";
|
|
21
|
+
import _ImageFormatter from "dtable-ui-component/lib/ImageFormatter";
|
|
22
|
+
import _SingleSelectFormatter from "dtable-ui-component/lib/SingleSelectFormatter";
|
|
23
|
+
import _LongTextFormatter from "dtable-ui-component/lib/LongTextFormatter";
|
|
24
|
+
import _CheckboxFormatter from "dtable-ui-component/lib/CheckboxFormatter";
|
|
25
|
+
import React from 'react';
|
|
26
|
+
import { CellType } from 'dtable-utils';
|
|
27
|
+
import SimpleCellFormatter from '../cell-factory/SimpleCellFormatter';
|
|
28
|
+
const FormatterConfig = {
|
|
29
|
+
[CellType.DEFAULT]: /*#__PURE__*/React.createElement(SimpleCellFormatter, null),
|
|
30
|
+
[CellType.TEXT]: /*#__PURE__*/React.createElement(SimpleCellFormatter, null),
|
|
31
|
+
[CellType.CHECKBOX]: /*#__PURE__*/React.createElement(_CheckboxFormatter, null),
|
|
32
|
+
[CellType.LONG_TEXT]: /*#__PURE__*/React.createElement(_LongTextFormatter, null),
|
|
33
|
+
[CellType.SINGLE_SELECT]: /*#__PURE__*/React.createElement(_SingleSelectFormatter, null),
|
|
34
|
+
[CellType.IMAGE]: /*#__PURE__*/React.createElement(_ImageFormatter, null),
|
|
35
|
+
[CellType.FILE]: /*#__PURE__*/React.createElement(_FileFormatter, null),
|
|
36
|
+
[CellType.MULTIPLE_SELECT]: /*#__PURE__*/React.createElement(_MultipleSelectFormatter, null),
|
|
37
|
+
[CellType.COLLABORATOR]: /*#__PURE__*/React.createElement(_CollaboratorFormatter, null),
|
|
38
|
+
[CellType.NUMBER]: /*#__PURE__*/React.createElement(_NumberFormatter, null),
|
|
39
|
+
[CellType.DATE]: /*#__PURE__*/React.createElement(_DateFormatter, null),
|
|
40
|
+
[CellType.LINK]: /*#__PURE__*/React.createElement(_LinkFormatter, null),
|
|
41
|
+
[CellType.CREATOR]: /*#__PURE__*/React.createElement(_CreatorFormatter, null),
|
|
42
|
+
[CellType.CTIME]: /*#__PURE__*/React.createElement(_CTimeFormatter, null),
|
|
43
|
+
[CellType.LAST_MODIFIER]: /*#__PURE__*/React.createElement(_LastModifierFormatter, null),
|
|
44
|
+
[CellType.MTIME]: /*#__PURE__*/React.createElement(_MTimeFormatter, null),
|
|
45
|
+
[CellType.GEOLOCATION]: /*#__PURE__*/React.createElement(_GeolocationFormatter, null),
|
|
46
|
+
[CellType.FORMULA]: /*#__PURE__*/React.createElement(_FormulaFormatter, null),
|
|
47
|
+
[CellType.AUTO_NUMBER]: /*#__PURE__*/React.createElement(_AutoNumberFormatter, null),
|
|
48
|
+
[CellType.URL]: /*#__PURE__*/React.createElement(_UrlFormatter, null),
|
|
49
|
+
[CellType.EMAIL]: /*#__PURE__*/React.createElement(_EmailFormatter, null),
|
|
50
|
+
[CellType.DURATION]: /*#__PURE__*/React.createElement(_DurationFormatter, null),
|
|
51
|
+
[CellType.BUTTON]: /*#__PURE__*/React.createElement(_ButtonFormatter, null),
|
|
52
|
+
[CellType.LINK_FORMULA]: /*#__PURE__*/React.createElement(_FormulaFormatter, null),
|
|
53
|
+
[CellType.RATE]: /*#__PURE__*/React.createElement(_RateFormatter, null),
|
|
54
|
+
[CellType.DIGITAL_SIGN]: /*#__PURE__*/React.createElement(_DigitalSignFormatter, null),
|
|
55
|
+
[CellType.DEPARTMENT_SINGLE_SELECT]: /*#__PURE__*/React.createElement(_DepartmentSingleSelectFormatter, null)
|
|
56
|
+
};
|
|
57
|
+
export default FormatterConfig;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
class SimpleCellFormatter extends React.Component {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.getFormattedValue = val => {
|
|
6
|
+
let formattedValue = val;
|
|
7
|
+
if (Object.prototype.toString.call(val) === '[object Boolean]') {
|
|
8
|
+
formattedValue += '';
|
|
9
|
+
}
|
|
10
|
+
return formattedValue;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
shouldComponentUpdate(nextProps) {
|
|
14
|
+
return nextProps.value !== this.props.value;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
const {
|
|
18
|
+
value
|
|
19
|
+
} = this.props;
|
|
20
|
+
if (typeof value === 'object') {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const gridCellClassName = this.props.type ? "grid-cell-type-".concat(this.props.type) : 'grid-cell-type-default';
|
|
24
|
+
let formattedValue = this.getFormattedValue(value);
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: gridCellClassName,
|
|
27
|
+
title: formattedValue,
|
|
28
|
+
"aria-label": formattedValue
|
|
29
|
+
}, formattedValue);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export default SimpleCellFormatter;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import intl from '../../intl';
|
|
3
|
+
import { getSelectColumnOptions } from '../../utils/column-utils';
|
|
4
|
+
import { DELETED_OPTION_BACKGROUND_COLOR, DELETED_OPTION_TIPS } from '../../constants/common-constants';
|
|
5
|
+
class SingleSelectOption extends React.Component {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.getCurrentOption = () => {
|
|
9
|
+
let {
|
|
10
|
+
value,
|
|
11
|
+
column
|
|
12
|
+
} = this.props;
|
|
13
|
+
let options = getSelectColumnOptions(column);
|
|
14
|
+
return options.find(item => item.id === value);
|
|
15
|
+
};
|
|
16
|
+
this.getStyle = option => {
|
|
17
|
+
let style = {
|
|
18
|
+
display: 'inline-block',
|
|
19
|
+
padding: '0px 10px',
|
|
20
|
+
height: '20px',
|
|
21
|
+
lineHeight: '20px',
|
|
22
|
+
textAlign: 'center',
|
|
23
|
+
borderRadius: '10px',
|
|
24
|
+
fontSize: '13px'
|
|
25
|
+
};
|
|
26
|
+
if (option) {
|
|
27
|
+
style.backgroundColor = option.color;
|
|
28
|
+
style.color = option.textColor || null;
|
|
29
|
+
} else {
|
|
30
|
+
style.backgroundColor = DELETED_OPTION_BACKGROUND_COLOR;
|
|
31
|
+
}
|
|
32
|
+
return style;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
const {
|
|
37
|
+
value,
|
|
38
|
+
column
|
|
39
|
+
} = this.props;
|
|
40
|
+
if (!value) {
|
|
41
|
+
return /*#__PURE__*/React.createElement("div", null);
|
|
42
|
+
}
|
|
43
|
+
const currentOption = this.getCurrentOption();
|
|
44
|
+
const name = currentOption ? currentOption.name : intl.get(DELETED_OPTION_TIPS);
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
// If parent node is FormulaFormatter, column is {data: array_data}, so column.type is undefined
|
|
47
|
+
className: 'grid_cell_type_' + (column.type || ''),
|
|
48
|
+
style: this.getStyle(currentOption),
|
|
49
|
+
title: name
|
|
50
|
+
}, name);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export default SingleSelectOption;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import EditorConfig from '../cell-editors/EditorConfig';
|
|
2
|
+
const DEFAULT = 'default';
|
|
3
|
+
class CellEditorFactory {
|
|
4
|
+
createEditor(editorType) {
|
|
5
|
+
if (EditorConfig[editorType]) {
|
|
6
|
+
return EditorConfig[editorType];
|
|
7
|
+
}
|
|
8
|
+
return EditorConfig[DEFAULT];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
let cellEditorFactory = new CellEditorFactory();
|
|
12
|
+
export default cellEditorFactory;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import FormatterConfig from './/FormatterConfig';
|
|
2
|
+
class CellFormatterFactory {
|
|
3
|
+
createFormatter(formatterType) {
|
|
4
|
+
if (FormatterConfig[formatterType]) {
|
|
5
|
+
return FormatterConfig[formatterType];
|
|
6
|
+
}
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const cellFormatterFactory = new CellFormatterFactory();
|
|
11
|
+
export default cellFormatterFactory;
|