dtable-ui-component 6.0.38-alpha.2 → 6.0.38
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/CheckboxEditor/index.css +7 -6
- package/lib/DTableFiltersPopover/constants/index.js +2 -30
- package/lib/DTableFiltersPopover/index.css +14 -50
- package/lib/DTableFiltersPopover/index.js +136 -118
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +4 -10
- package/lib/DTableFiltersPopover/utils/index.js +82 -358
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.css +0 -0
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +4 -6
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +2 -13
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +6 -20
- package/lib/DTableFiltersPopover/widgets/filter-item.js +53 -138
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +10 -119
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +39 -226
- package/lib/GeolocationEditor/mb-editor/map-editor/index.css +5 -2
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +93 -51
- package/lib/GeolocationEditor/pc-editor/index.css +6 -15
- package/lib/GeolocationEditor/pc-editor/index.js +4 -1
- package/lib/GeolocationEditor/pc-editor/map-editor/index.css +33 -0
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +143 -99
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.css +13 -11
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +100 -70
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +20 -11
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +2 -2
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +19 -5
- package/lib/locales/de.json +5 -3
- package/lib/locales/en.json +5 -8
- package/lib/locales/es.json +5 -3
- package/lib/locales/fr.json +5 -3
- package/lib/locales/pt.json +5 -3
- package/lib/locales/ru.json +5 -3
- package/lib/locales/zh-CN.json +5 -8
- package/lib/utils/column-utils.js +2 -21
- package/package.json +2 -2
- package/lib/DTableFiltersPopover/widgets/filter-group.js +0 -185
|
@@ -19,87 +19,6 @@
|
|
|
19
19
|
color: #666666;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
/* ---- filter group start ---- */
|
|
23
|
-
.filters-list .filter-group {
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
padding: 0.25rem 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.filters-list .filter-group .filter-group-wrapper {
|
|
30
|
-
flex: 1;
|
|
31
|
-
display: flex;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.filters-list .filter-group .delete-filter,
|
|
35
|
-
.filters-list .filter-group .filter-conjunction {
|
|
36
|
-
align-self: flex-start;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.filters-list .filter-group .delete-filter,
|
|
40
|
-
.filters-list .filter-group .filter-conjunction.conjunction-text {
|
|
41
|
-
margin-top: 8px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.filters-list .filter-group .filter-group-container {
|
|
45
|
-
width: calc(100% - 72px);
|
|
46
|
-
min-height: 38px;
|
|
47
|
-
margin-left: .5rem;
|
|
48
|
-
padding: 4px 10px;
|
|
49
|
-
border: 1px solid rgba(0, 40, 100, .12);
|
|
50
|
-
border-radius: 3px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.filters-list .filter-group.draggable .filter-group-container {
|
|
54
|
-
/* 94: conjunction width(72) + drag icon width(16) + drag icon margin left(8) */
|
|
55
|
-
width: calc(100% - 96px);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.filters-list .filter-group.readonly .filter-group-container {
|
|
59
|
-
width: calc(100% - 52px);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.filters-list .filter-group.level-1 .filter-group-container {
|
|
63
|
-
background-color: #f7f7f7;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.filters-list .filter-group-container .group-filter-add-tool {
|
|
67
|
-
border-top: unset;
|
|
68
|
-
background-color: #f7f7f7;
|
|
69
|
-
margin-top: 2px;
|
|
70
|
-
padding: 0;
|
|
71
|
-
height: 30px;
|
|
72
|
-
line-height: 30px;
|
|
73
|
-
font-weight: 400;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.filters-list .filter-group-container .group-filter-add-tool .dtable-icon-add-table,
|
|
77
|
-
.filters-list .filter-group-container .group-filter-add-tool .add-new-option {
|
|
78
|
-
color: #999;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.filters-list .filter-group-container .group-filter-add-tool:hover .dtable-icon-add-table,
|
|
82
|
-
.filters-list .filter-group-container .group-filter-add-tool:hover .add-new-option {
|
|
83
|
-
color: #555;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.filters-list .dtable-filter-group-drag {
|
|
87
|
-
display: flex;
|
|
88
|
-
margin-left: .5rem;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.filters-list .drag-filter-handle,
|
|
92
|
-
.filters-list .drag-filter-group-handle {
|
|
93
|
-
color: #949494;
|
|
94
|
-
cursor: grab;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.filters-list .dragging-filter-wrapper .group-filter-add-tool,
|
|
98
|
-
.filters-list .dragging-filter-wrapper .delete-filter {
|
|
99
|
-
display: none;
|
|
100
|
-
}
|
|
101
|
-
/* ---- filter group end ---- */
|
|
102
|
-
|
|
103
22
|
.filters-list .filter-item {
|
|
104
23
|
display: flex;
|
|
105
24
|
align-items: center;
|
|
@@ -121,7 +40,7 @@
|
|
|
121
40
|
margin-left: 0;
|
|
122
41
|
}
|
|
123
42
|
|
|
124
|
-
.filters-list .filter-item .filter-term {
|
|
43
|
+
.filters-list .filter-item .filter-term .selector-collaborator {
|
|
125
44
|
max-width: 300px;
|
|
126
45
|
min-width: 70px;
|
|
127
46
|
}
|
|
@@ -147,10 +66,6 @@
|
|
|
147
66
|
width: calc(100% - 20px);
|
|
148
67
|
}
|
|
149
68
|
|
|
150
|
-
.filters-list .dtable-select.collaborator-select .selected-option-show {
|
|
151
|
-
height: auto;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
69
|
.filters-list .dtable-select .selected-option {
|
|
155
70
|
width: auto;
|
|
156
71
|
overflow-x: auto;
|
|
@@ -162,7 +77,7 @@
|
|
|
162
77
|
|
|
163
78
|
.filters-list .selected-conjunction-show {
|
|
164
79
|
padding: 0 10px;
|
|
165
|
-
color: #
|
|
80
|
+
color: #666;
|
|
166
81
|
}
|
|
167
82
|
|
|
168
83
|
.filters-list .filter-column {
|
|
@@ -201,14 +116,14 @@
|
|
|
201
116
|
|
|
202
117
|
.filters-list .selector-multiple-select .option:hover,
|
|
203
118
|
.filters-list .selector-multiple-select .option.option-active,
|
|
204
|
-
.
|
|
205
|
-
.
|
|
119
|
+
.filters-list .selector-collaborator .option:hover,
|
|
120
|
+
.filters-list .selector-collaborator .option.option-active {
|
|
206
121
|
color: #212529;
|
|
207
122
|
background-color: #f7f7f7;
|
|
208
123
|
}
|
|
209
124
|
|
|
210
125
|
.filters-list .selector-multiple-select .option.option-active .select-option-name,
|
|
211
|
-
.
|
|
126
|
+
.filters-list .selector-collaborator .option.option-active .select-option-name {
|
|
212
127
|
color: #212529;
|
|
213
128
|
}
|
|
214
129
|
|
|
@@ -256,17 +171,6 @@
|
|
|
256
171
|
outline: 0;
|
|
257
172
|
}
|
|
258
173
|
|
|
259
|
-
.filters-list .filter-term .rc-calendar-input {
|
|
260
|
-
border: 1px solid transparent;
|
|
261
|
-
color: #666;
|
|
262
|
-
cursor: text;
|
|
263
|
-
height: 22px;
|
|
264
|
-
font-size: 12px;
|
|
265
|
-
line-height: 1.5;
|
|
266
|
-
outline: 0;
|
|
267
|
-
width: 100%;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
174
|
.filters-list .filter-term .date-picker-container table tr {
|
|
271
175
|
height: 30px;
|
|
272
176
|
}
|
|
@@ -310,8 +214,7 @@
|
|
|
310
214
|
}
|
|
311
215
|
|
|
312
216
|
.filters-list .multiple-check-icon,
|
|
313
|
-
.filters-list .collaborator-check-icon
|
|
314
|
-
.option-group-selector-collaborator .collaborator-check-icon {
|
|
217
|
+
.filters-list .collaborator-check-icon {
|
|
315
218
|
display: inline-flex;
|
|
316
219
|
width: 20px;
|
|
317
220
|
height: 20px;
|
|
@@ -320,8 +223,7 @@
|
|
|
320
223
|
}
|
|
321
224
|
|
|
322
225
|
.filters-list .multiple-check-icon .dtable-icon-check-mark,
|
|
323
|
-
.filters-list .collaborator-check-icon .dtable-icon-check-mark
|
|
324
|
-
.option-group-selector-collaborator .collaborator-check-icon .dtable-icon-check-mark {
|
|
226
|
+
.filters-list .collaborator-check-icon .dtable-icon-check-mark {
|
|
325
227
|
font-size: 12px;
|
|
326
228
|
color: #798d99;
|
|
327
229
|
}
|
|
@@ -338,17 +240,14 @@
|
|
|
338
240
|
background: #eaeaea;
|
|
339
241
|
}
|
|
340
242
|
|
|
341
|
-
.option-group-selector-collaborator .collaborator-show
|
|
342
243
|
.filters-list .collaborator-show {
|
|
343
244
|
flex: 1;
|
|
344
245
|
}
|
|
345
246
|
|
|
346
|
-
.option-group-selector-collaborator .collaborator-avatar-container,
|
|
347
247
|
.filters-list .collaborator-avatar-container {
|
|
348
248
|
width: 16px;
|
|
349
249
|
}
|
|
350
250
|
|
|
351
|
-
.option-group-selector-collaborator .collaborator-avatar,
|
|
352
251
|
.filters-list .collaborator-avatar {
|
|
353
252
|
width: 16px;
|
|
354
253
|
height: 16px;
|
|
@@ -356,23 +255,19 @@
|
|
|
356
255
|
border-radius: 50%;
|
|
357
256
|
}
|
|
358
257
|
|
|
359
|
-
.option-group-selector-collaborator .option .collaborator-avatar,
|
|
360
258
|
.filters-list .option .collaborator-avatar {
|
|
361
259
|
transform: translateY(-2px);
|
|
362
260
|
}
|
|
363
261
|
|
|
364
|
-
.option-group-selector-collaborator .collaborator-name,
|
|
365
262
|
.filters-list .collaborator-name {
|
|
366
263
|
margin-left: 5px;
|
|
367
264
|
max-width: 200px;
|
|
368
265
|
}
|
|
369
266
|
|
|
370
|
-
.option-group-selector-collaborator .option-collaborator,
|
|
371
267
|
.filters-list .option-collaborator {
|
|
372
268
|
display: flex;
|
|
373
269
|
}
|
|
374
270
|
|
|
375
|
-
.option-group-selector-collaborator .collaborator-container,
|
|
376
271
|
.filters-list .collaborator-container {
|
|
377
272
|
flex: 1;
|
|
378
273
|
}
|
|
@@ -392,7 +287,7 @@
|
|
|
392
287
|
}
|
|
393
288
|
|
|
394
289
|
.filters-list .filter-item .dtable-icon-fork-number:hover {
|
|
395
|
-
color: #
|
|
290
|
+
color: #555;
|
|
396
291
|
}
|
|
397
292
|
|
|
398
293
|
.filters-list .filter-container-readonly .dtable-select .selected-option-show,
|
|
@@ -404,9 +299,7 @@
|
|
|
404
299
|
width: 100%;
|
|
405
300
|
}
|
|
406
301
|
|
|
407
|
-
.
|
|
408
|
-
.filters-list .option-group-content .collaborator,
|
|
409
|
-
.option-group-selector-collaborator .option-group-content .collaborator {
|
|
302
|
+
.filters-list .option-group .option-group-content .collaborator {
|
|
410
303
|
background-color: unset;
|
|
411
304
|
}
|
|
412
305
|
|
|
@@ -431,9 +324,7 @@
|
|
|
431
324
|
}
|
|
432
325
|
|
|
433
326
|
.filters-list .single-select-option,
|
|
434
|
-
.filters-list .multiple-select-option
|
|
435
|
-
.option-group-selector-single-select .single-select-option,
|
|
436
|
-
.option-group-selector-multiple-select .multiple-select-option {
|
|
327
|
+
.filters-list .multiple-select-option {
|
|
437
328
|
display: block;
|
|
438
329
|
text-align: left;
|
|
439
330
|
width: min-content;
|
|
@@ -9,227 +9,62 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _dtableUtils = require("dtable-utils");
|
|
12
|
-
var _filterItemUtils = _interopRequireDefault(require("../../utils/filter-item-utils"));
|
|
13
12
|
var _filterItem = _interopRequireDefault(require("../filter-item"));
|
|
14
13
|
var _utils = require("../../utils");
|
|
15
|
-
var _constants = require("../../constants");
|
|
16
|
-
var _filterGroup = _interopRequireDefault(require("../filter-group"));
|
|
17
14
|
require("./index.css");
|
|
18
15
|
class FiltersList extends _react.Component {
|
|
19
16
|
constructor(props) {
|
|
20
17
|
super(props);
|
|
21
|
-
this.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
filters
|
|
25
|
-
} = this.props;
|
|
26
|
-
const {
|
|
27
|
-
filter_conjunction: next_filter_conjunction,
|
|
28
|
-
filters: next_filters
|
|
29
|
-
} = (0, _utils.applyFilterOperation)({
|
|
30
|
-
type: _constants.FILTER_OPERATION_TYPE.MODIFY_CONJUNCTION,
|
|
31
|
-
filter_conjunction,
|
|
32
|
-
filters,
|
|
33
|
-
payload: {
|
|
34
|
-
new_filter_conjunction
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
this.props.updateFilters({
|
|
38
|
-
filter_conjunction: next_filter_conjunction,
|
|
39
|
-
filters: next_filters
|
|
40
|
-
});
|
|
18
|
+
this.updateFilter = (filterIndex, updatedFilter) => {
|
|
19
|
+
if (!updatedFilter) return;
|
|
20
|
+
this.props.updateFilter(filterIndex, updatedFilter);
|
|
41
21
|
};
|
|
42
|
-
this.
|
|
43
|
-
if (!new_filter) return;
|
|
22
|
+
this.deleteFilter = index => {
|
|
44
23
|
const {
|
|
45
|
-
|
|
46
|
-
filters
|
|
24
|
+
scheduleUpdate
|
|
47
25
|
} = this.props;
|
|
48
|
-
|
|
49
|
-
filter_conjunction: next_filter_conjunction,
|
|
50
|
-
filters: next_filters
|
|
51
|
-
} = (0, _utils.applyFilterOperation)({
|
|
52
|
-
type: _constants.FILTER_OPERATION_TYPE.UPDATE_FILTER,
|
|
53
|
-
filter_conjunction,
|
|
54
|
-
filters,
|
|
55
|
-
payload: {
|
|
56
|
-
filter_index,
|
|
57
|
-
new_filter
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
this.props.updateFilters({
|
|
61
|
-
filter_conjunction: next_filter_conjunction,
|
|
62
|
-
filters: next_filters
|
|
63
|
-
});
|
|
26
|
+
this.props.deleteFilter(index, scheduleUpdate);
|
|
64
27
|
};
|
|
65
|
-
this.
|
|
66
|
-
|
|
67
|
-
filterConjunction: filter_conjunction,
|
|
68
|
-
filters
|
|
69
|
-
} = this.props;
|
|
70
|
-
const {
|
|
71
|
-
filter_conjunction: next_filter_conjunction,
|
|
72
|
-
filters: next_filters
|
|
73
|
-
} = (0, _utils.applyFilterOperation)({
|
|
74
|
-
type: _constants.FILTER_OPERATION_TYPE.DELETE_FILTER,
|
|
75
|
-
filter_conjunction,
|
|
76
|
-
filters,
|
|
77
|
-
payload: {
|
|
78
|
-
filter_index
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
this.props.updateFilters({
|
|
82
|
-
filter_conjunction: next_filter_conjunction,
|
|
83
|
-
filters: next_filters
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
this.moveFilter = _ref => {
|
|
87
|
-
let {
|
|
88
|
-
source_filter_index,
|
|
89
|
-
target_filter_index,
|
|
90
|
-
source_group_index,
|
|
91
|
-
target_group_index
|
|
92
|
-
} = _ref;
|
|
93
|
-
if (source_filter_index === target_filter_index && source_group_index === target_group_index) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
const {
|
|
97
|
-
filterConjunction: filter_conjunction,
|
|
98
|
-
filters
|
|
99
|
-
} = this.props;
|
|
100
|
-
const {
|
|
101
|
-
filter_conjunction: next_filter_conjunction,
|
|
102
|
-
filters: next_filters
|
|
103
|
-
} = (0, _utils.applyFilterOperation)({
|
|
104
|
-
type: _constants.FILTER_OPERATION_TYPE.MOVE_FILTER,
|
|
105
|
-
filter_conjunction,
|
|
106
|
-
filters,
|
|
107
|
-
payload: {
|
|
108
|
-
source_filter_index,
|
|
109
|
-
target_filter_index,
|
|
110
|
-
source_group_index,
|
|
111
|
-
target_group_index
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
this.props.updateFilters({
|
|
115
|
-
filter_conjunction: next_filter_conjunction,
|
|
116
|
-
filters: next_filters
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
this.modifyConjunctionInGroup = (group_index, new_filter_conjunction) => {
|
|
120
|
-
const {
|
|
121
|
-
filterConjunction: filter_conjunction,
|
|
122
|
-
filters
|
|
123
|
-
} = this.props;
|
|
124
|
-
const {
|
|
125
|
-
filter_conjunction: next_filter_conjunction,
|
|
126
|
-
filters: next_filters
|
|
127
|
-
} = (0, _utils.applyFilterOperation)({
|
|
128
|
-
type: _constants.FILTER_OPERATION_TYPE.MODIFY_CONJUNCTION_IN_GROUP,
|
|
129
|
-
filter_conjunction,
|
|
130
|
-
filters,
|
|
131
|
-
payload: {
|
|
132
|
-
group_index,
|
|
133
|
-
new_filter_conjunction
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
this.props.updateFilters({
|
|
137
|
-
filter_conjunction: next_filter_conjunction,
|
|
138
|
-
filters: next_filters
|
|
139
|
-
});
|
|
140
|
-
};
|
|
141
|
-
this.addFilterIntoGroup = (group_index, filter) => {
|
|
142
|
-
if (!filter) return;
|
|
143
|
-
const {
|
|
144
|
-
filterConjunction: filter_conjunction,
|
|
145
|
-
filters
|
|
146
|
-
} = this.props;
|
|
147
|
-
const {
|
|
148
|
-
filter_conjunction: next_filter_conjunction,
|
|
149
|
-
filters: next_filters
|
|
150
|
-
} = (0, _utils.applyFilterOperation)({
|
|
151
|
-
type: _constants.FILTER_OPERATION_TYPE.ADD_FILTER_INTO_GROUP,
|
|
152
|
-
filter_conjunction,
|
|
153
|
-
filters,
|
|
154
|
-
payload: {
|
|
155
|
-
group_index,
|
|
156
|
-
filter
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
this.props.updateFilters({
|
|
160
|
-
filter_conjunction: next_filter_conjunction,
|
|
161
|
-
filters: next_filters
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
this.deleteFilterInGroup = (group_index, filter_index) => {
|
|
165
|
-
const {
|
|
166
|
-
filterConjunction: filter_conjunction,
|
|
167
|
-
filters
|
|
168
|
-
} = this.props;
|
|
169
|
-
const {
|
|
170
|
-
filter_conjunction: next_filter_conjunction,
|
|
171
|
-
filters: next_filters
|
|
172
|
-
} = (0, _utils.applyFilterOperation)({
|
|
173
|
-
type: _constants.FILTER_OPERATION_TYPE.DELETE_FILTER_IN_GROUP,
|
|
174
|
-
filter_conjunction,
|
|
175
|
-
filters,
|
|
176
|
-
payload: {
|
|
177
|
-
group_index,
|
|
178
|
-
filter_index
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
this.props.updateFilters({
|
|
182
|
-
filter_conjunction: next_filter_conjunction,
|
|
183
|
-
filters: next_filters
|
|
184
|
-
});
|
|
185
|
-
};
|
|
186
|
-
this.updateFilterInGroup = (group_index, filter_index, new_filter) => {
|
|
187
|
-
if (!new_filter) return;
|
|
188
|
-
const {
|
|
189
|
-
filterConjunction: filter_conjunction,
|
|
190
|
-
filters
|
|
191
|
-
} = this.props;
|
|
192
|
-
const {
|
|
193
|
-
filter_conjunction: next_filter_conjunction,
|
|
194
|
-
filters: next_filters
|
|
195
|
-
} = (0, _utils.applyFilterOperation)({
|
|
196
|
-
type: _constants.FILTER_OPERATION_TYPE.UPDATE_FILTER_IN_GROUP,
|
|
197
|
-
filter_conjunction,
|
|
198
|
-
filters,
|
|
199
|
-
payload: {
|
|
200
|
-
group_index,
|
|
201
|
-
filter_index,
|
|
202
|
-
new_filter
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
this.props.updateFilters({
|
|
206
|
-
filter_conjunction: next_filter_conjunction,
|
|
207
|
-
filters: next_filters
|
|
208
|
-
});
|
|
28
|
+
this.updateConjunction = filterConjunction => {
|
|
29
|
+
this.props.updateFilterConjunction(filterConjunction);
|
|
209
30
|
};
|
|
210
31
|
this.getConjunctionOptions = () => {
|
|
211
32
|
if (!this.conjunctionOptions) {
|
|
212
|
-
this.conjunctionOptions =
|
|
33
|
+
this.conjunctionOptions = _utils.FilterItemUtils.generatorConjunctionOptions();
|
|
213
34
|
}
|
|
214
35
|
return this.conjunctionOptions;
|
|
215
36
|
};
|
|
216
|
-
this.
|
|
37
|
+
this.getFilterColumns = () => {
|
|
217
38
|
const {
|
|
218
39
|
columns
|
|
219
40
|
} = this.props;
|
|
41
|
+
return columns.filter(column => {
|
|
42
|
+
const {
|
|
43
|
+
data
|
|
44
|
+
} = column;
|
|
45
|
+
let {
|
|
46
|
+
type
|
|
47
|
+
} = column;
|
|
48
|
+
if (data && (type === _dtableUtils.CellType.LINK || _dtableUtils.FORMULA_COLUMN_TYPES_MAP[type] && data.result_type === _dtableUtils.FORMULA_RESULT_TYPE.ARRAY)) {
|
|
49
|
+
type = data.array_type;
|
|
50
|
+
}
|
|
51
|
+
return Object.prototype.hasOwnProperty.call(_dtableUtils.FILTER_COLUMN_OPTIONS, type);
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
this.getColumnOptions = () => {
|
|
220
55
|
if (!this.columnOptions) {
|
|
221
|
-
const filterColumns =
|
|
56
|
+
const filterColumns = this.getFilterColumns();
|
|
222
57
|
this.columnOptions = filterColumns.map(column => {
|
|
223
|
-
return
|
|
58
|
+
return _utils.FilterItemUtils.generatorColumnOption(column);
|
|
224
59
|
});
|
|
225
60
|
}
|
|
226
61
|
return this.columnOptions;
|
|
227
62
|
};
|
|
228
|
-
this.
|
|
63
|
+
this.renderFilterItem = (filter, index, errMsg, filterColumn) => {
|
|
229
64
|
const {
|
|
230
65
|
filterConjunction,
|
|
231
|
-
|
|
232
|
-
|
|
66
|
+
value,
|
|
67
|
+
isLocked,
|
|
233
68
|
collaborators,
|
|
234
69
|
userDepartmentIdsMap,
|
|
235
70
|
departments,
|
|
@@ -238,49 +73,24 @@ class FiltersList extends _react.Component {
|
|
|
238
73
|
} = this.props;
|
|
239
74
|
const conjunctionOptions = this.getConjunctionOptions();
|
|
240
75
|
const columnOptions = this.getColumnOptions();
|
|
241
|
-
if ((0, _dtableUtils.checkIsFilterGroup)(filter)) {
|
|
242
|
-
return /*#__PURE__*/_react.default.createElement(_filterGroup.default, {
|
|
243
|
-
key: "filter-group-".concat(index),
|
|
244
|
-
isInModal: isInModal,
|
|
245
|
-
lang: lang,
|
|
246
|
-
columns: columns,
|
|
247
|
-
index: index,
|
|
248
|
-
filterConjunction: filterConjunction,
|
|
249
|
-
filter: filter,
|
|
250
|
-
conjunctionOptions: conjunctionOptions,
|
|
251
|
-
columnOptions: columnOptions,
|
|
252
|
-
collaborators: collaborators,
|
|
253
|
-
userDepartmentIdsMap: userDepartmentIdsMap,
|
|
254
|
-
departments: departments,
|
|
255
|
-
firstDayOfWeek: firstDayOfWeek,
|
|
256
|
-
modifyFilterConjunction: this.modifyFilterConjunction,
|
|
257
|
-
deleteFilterGroup: this.deleteFilter,
|
|
258
|
-
addFilterIntoGroup: this.addFilterIntoGroup,
|
|
259
|
-
modifyConjunctionInGroup: this.modifyConjunctionInGroup,
|
|
260
|
-
deleteFilterInGroup: this.deleteFilterInGroup,
|
|
261
|
-
updateFilterInGroup: this.updateFilterInGroup
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
const {
|
|
265
|
-
error_message
|
|
266
|
-
} = _dtableUtils.ValidateFilter.validate(filter, columns);
|
|
267
76
|
return /*#__PURE__*/_react.default.createElement(_filterItem.default, {
|
|
268
77
|
key: index,
|
|
269
|
-
|
|
270
|
-
lang: lang,
|
|
78
|
+
isLocked: isLocked,
|
|
271
79
|
index: index,
|
|
272
80
|
filter: filter,
|
|
273
|
-
errMsg:
|
|
81
|
+
errMsg: errMsg,
|
|
274
82
|
filterColumn: filterColumn,
|
|
275
83
|
filterConjunction: filterConjunction,
|
|
276
84
|
conjunctionOptions: conjunctionOptions,
|
|
277
85
|
filterColumnOptions: columnOptions,
|
|
86
|
+
value: value,
|
|
278
87
|
collaborators: collaborators,
|
|
279
88
|
userDepartmentIdsMap: userDepartmentIdsMap,
|
|
280
89
|
departments: departments,
|
|
90
|
+
lang: lang,
|
|
281
91
|
deleteFilter: this.deleteFilter,
|
|
282
92
|
updateFilter: this.updateFilter,
|
|
283
|
-
updateConjunction: this.
|
|
93
|
+
updateConjunction: this.updateConjunction,
|
|
284
94
|
firstDayOfWeek: firstDayOfWeek
|
|
285
95
|
});
|
|
286
96
|
};
|
|
@@ -312,8 +122,11 @@ class FiltersList extends _react.Component {
|
|
|
312
122
|
const {
|
|
313
123
|
column_key
|
|
314
124
|
} = filter;
|
|
315
|
-
const
|
|
316
|
-
|
|
125
|
+
const {
|
|
126
|
+
error_message
|
|
127
|
+
} = _dtableUtils.ValidateFilter.validateColumn(column_key, columns);
|
|
128
|
+
const filterColumn = (0, _utils.getColumnByKey)(columns, column_key) || {};
|
|
129
|
+
return this.renderFilterItem(filter, index, error_message, filterColumn);
|
|
317
130
|
}));
|
|
318
131
|
}
|
|
319
132
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
.dtable-ui-mobile-geolocation-map-editor .dtable-ui-mobile-geolocation-map-editor-input-container {
|
|
2
|
-
height:
|
|
3
|
-
padding-top: 16px;
|
|
2
|
+
height: auto;
|
|
4
3
|
width: 100%;
|
|
5
4
|
}
|
|
6
5
|
|
|
6
|
+
.dtable-ui-mobile-geolocation-map-editor .dtable-ui-mobile-geolocation-map-editor-input-container .view-subtitle:first-child {
|
|
7
|
+
border-top: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
7
10
|
.dtable-ui-mobile-geolocation-map-editor .dtable-ui-mobile-geolocation-map-editor-map {
|
|
8
11
|
flex: 1;
|
|
9
12
|
overflow: hidden;
|