@sis-cc/dotstatsuite-visions 7.9.0 → 7.11.0
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/es/Dataflow/Dataflow.js +23 -16
- package/es/Dataflow/index.js +1 -0
- package/es/ScopeList/Item.js +5 -3
- package/es/ScopeList/with-scope-list.js +9 -4
- package/es/TableHtml5/section.js +6 -7
- package/lib/Dataflow/Dataflow.js +23 -16
- package/lib/ScopeList/Item.js +5 -3
- package/lib/ScopeList/with-scope-list.js +9 -4
- package/lib/TableHtml5/section.js +6 -7
- package/package.json +1 -1
package/es/Dataflow/Dataflow.js
CHANGED
|
@@ -142,6 +142,8 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
142
142
|
handleUrl = _ref2.handleUrl,
|
|
143
143
|
label = _ref2.label,
|
|
144
144
|
labels = _ref2.labels,
|
|
145
|
+
_ref2$dimensions = _ref2.dimensions,
|
|
146
|
+
dimensions = _ref2$dimensions === undefined ? [] : _ref2$dimensions,
|
|
145
147
|
_ref2$highlights = _ref2.highlights,
|
|
146
148
|
highlights = _ref2$highlights === undefined ? [] : _ref2$highlights,
|
|
147
149
|
_ref2$categories = _ref2.categories,
|
|
@@ -175,12 +177,7 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
175
177
|
{ className: classes.header, 'data-testid': testId + '_title' },
|
|
176
178
|
React.createElement(
|
|
177
179
|
Typography,
|
|
178
|
-
{
|
|
179
|
-
variant: 'h6',
|
|
180
|
-
color: 'primary',
|
|
181
|
-
display: 'inline',
|
|
182
|
-
className: classes.container
|
|
183
|
-
},
|
|
180
|
+
{ variant: 'h6', color: 'primary', display: 'inline' },
|
|
184
181
|
React.createElement(
|
|
185
182
|
Link,
|
|
186
183
|
{
|
|
@@ -234,6 +231,21 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
234
231
|
React.createElement(
|
|
235
232
|
CardContent,
|
|
236
233
|
{ className: classes.cardContent },
|
|
234
|
+
!R.isEmpty(dimensions) && React.createElement(
|
|
235
|
+
Typography,
|
|
236
|
+
{
|
|
237
|
+
variant: 'body2',
|
|
238
|
+
color: 'textSecondary',
|
|
239
|
+
'data-testid': testId + '_dimensions'
|
|
240
|
+
},
|
|
241
|
+
React.createElement(
|
|
242
|
+
'strong',
|
|
243
|
+
null,
|
|
244
|
+
R.prop('dimensions')(labels),
|
|
245
|
+
':\xA0'
|
|
246
|
+
),
|
|
247
|
+
React.createElement(HTMLRenderer, { html: R.join(', ', dimensions) })
|
|
248
|
+
),
|
|
237
249
|
R.map(function (_ref3) {
|
|
238
250
|
var field = _ref3[0],
|
|
239
251
|
fieldHighlights = _ref3[1];
|
|
@@ -243,7 +255,6 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
243
255
|
variant: 'body2',
|
|
244
256
|
key: field,
|
|
245
257
|
color: 'textSecondary',
|
|
246
|
-
className: classes.container,
|
|
247
258
|
'data-testid': testId + '_highlight_' + field
|
|
248
259
|
},
|
|
249
260
|
React.createElement(
|
|
@@ -266,12 +277,7 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
266
277
|
categorie = _ref4[1];
|
|
267
278
|
return React.createElement(
|
|
268
279
|
Typography,
|
|
269
|
-
{
|
|
270
|
-
variant: 'body2',
|
|
271
|
-
key: field,
|
|
272
|
-
color: 'textSecondary',
|
|
273
|
-
className: classes.container
|
|
274
|
-
},
|
|
280
|
+
{ variant: 'body2', key: field, color: 'textSecondary' },
|
|
275
281
|
React.createElement(
|
|
276
282
|
'strong',
|
|
277
283
|
null,
|
|
@@ -289,7 +295,7 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
289
295
|
R.not(R.isEmpty(categories)) && React.createElement(Divider, { className: classes.divider }),
|
|
290
296
|
label && React.createElement(
|
|
291
297
|
Typography,
|
|
292
|
-
{ variant: 'body2', color: 'textSecondary'
|
|
298
|
+
{ variant: 'body2', color: 'textSecondary' },
|
|
293
299
|
React.createElement(
|
|
294
300
|
'strong',
|
|
295
301
|
null,
|
|
@@ -305,7 +311,7 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
305
311
|
{ className: classes.footer, disableSpacing: true },
|
|
306
312
|
React.createElement(
|
|
307
313
|
Typography,
|
|
308
|
-
{ variant: 'caption', color: 'textSecondary'
|
|
314
|
+
{ variant: 'caption', color: 'textSecondary' },
|
|
309
315
|
React.createElement(
|
|
310
316
|
'strong',
|
|
311
317
|
null,
|
|
@@ -321,7 +327,7 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
321
327
|
),
|
|
322
328
|
React.createElement(
|
|
323
329
|
Typography,
|
|
324
|
-
{ variant: 'caption', color: 'textSecondary'
|
|
330
|
+
{ variant: 'caption', color: 'textSecondary' },
|
|
325
331
|
R.prop('note')(labels)
|
|
326
332
|
)
|
|
327
333
|
)
|
|
@@ -374,6 +380,7 @@ Dataflow.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
374
380
|
date: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
|
|
375
381
|
}),
|
|
376
382
|
highlights: PropTypes.array,
|
|
383
|
+
dimensions: PropTypes.array,
|
|
377
384
|
categories: PropTypes.array,
|
|
378
385
|
children: PropTypes.node,
|
|
379
386
|
HTMLRenderer: PropTypes.func
|
package/es/Dataflow/index.js
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
* note: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
28
28
|
* date: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
29
29
|
* }),
|
|
30
|
+
* dimensions: PropTypes.array,
|
|
30
31
|
* highlights: PropTypes.array,
|
|
31
32
|
* categories: PropTypes.array,
|
|
32
33
|
* HTMLRenderer: PropTypes.func,
|
package/es/ScopeList/Item.js
CHANGED
|
@@ -54,7 +54,8 @@ var Item = function Item(_ref) {
|
|
|
54
54
|
accessibility = _ref.accessibility,
|
|
55
55
|
index = _ref.index,
|
|
56
56
|
labelRenderer = _ref.labelRenderer,
|
|
57
|
-
HTMLRenderer = _ref.HTMLRenderer
|
|
57
|
+
HTMLRenderer = _ref.HTMLRenderer,
|
|
58
|
+
hierarchicalId = _ref.hierarchicalId;
|
|
58
59
|
|
|
59
60
|
var _React$useState = React.useState(false),
|
|
60
61
|
isTooltipShown = _React$useState[0],
|
|
@@ -171,7 +172,7 @@ var Item = function Item(_ref) {
|
|
|
171
172
|
className: classes.containerArrow,
|
|
172
173
|
tabIndex: 0,
|
|
173
174
|
onClick: function onClick() {
|
|
174
|
-
return changeList(id);
|
|
175
|
+
return changeList(hierarchicalId || id);
|
|
175
176
|
},
|
|
176
177
|
onKeyPress: function onKeyPress(e) {
|
|
177
178
|
if (e.key === 'Enter') {
|
|
@@ -232,7 +233,8 @@ Item.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
232
233
|
accessibility: PropTypes.bool,
|
|
233
234
|
index: PropTypes.number,
|
|
234
235
|
labelRenderer: PropTypes.func,
|
|
235
|
-
HTMLRenderer: PropTypes.func
|
|
236
|
+
HTMLRenderer: PropTypes.func,
|
|
237
|
+
hierarchicalId: PropTypes.string
|
|
236
238
|
} : {};
|
|
237
239
|
|
|
238
240
|
export default Item;
|
|
@@ -85,7 +85,7 @@ export var getPlaceholder = function getPlaceholder(_ref2) {
|
|
|
85
85
|
//----------------------------------------------------------------------------------------------List
|
|
86
86
|
export var withHasChild = function withHasChild(itemsByParentId) {
|
|
87
87
|
return function (item) {
|
|
88
|
-
return R.assoc('hasChild', R.pipe(R.prop(item.id), R.isNil, R.not)(itemsByParentId))(item);
|
|
88
|
+
return R.assoc('hasChild', R.pipe(R.prop(item.hierarchicalId || item.id), R.isNil, R.not)(itemsByParentId))(item);
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
export var getCurrentList = function getCurrentList(_ref3) {
|
|
@@ -110,7 +110,7 @@ export var getList = function getList(_ref4) {
|
|
|
110
110
|
hasPath = _ref4.hasPath,
|
|
111
111
|
displayAccessor = _ref4.displayAccessor;
|
|
112
112
|
|
|
113
|
-
var currentItemId = currentItem ?
|
|
113
|
+
var currentItemId = currentItem ? currentItem.hierarchicalId || currentItem.id : null;
|
|
114
114
|
if (R.or(R.isEmpty(term), R.isNil(R.prop('defaultSpotlight')(topElementProps)))) {
|
|
115
115
|
var itemsByParentIdDisplayed = getItemsIndexedByParentId(displayAccessor)(items);
|
|
116
116
|
if (R.isNil(currentItemId)) return R.pipe(getMainList, R.map(function (item) {
|
|
@@ -270,7 +270,7 @@ export var withScopeList = function withScopeList(Component) {
|
|
|
270
270
|
isMousePreSelection: false,
|
|
271
271
|
applyToShiftSelected: R.identity
|
|
272
272
|
}, _this.changeList = function (id) {
|
|
273
|
-
return _this.setState({ currentItem: R.prop(id)(_this.state.
|
|
273
|
+
return _this.setState({ currentItem: R.prop(id)(_this.state.itemsByHierarchicalId), term: '' });
|
|
274
274
|
}, _this.changeSelection = function (panelId) {
|
|
275
275
|
return function (id) {
|
|
276
276
|
return function (event) {
|
|
@@ -416,6 +416,7 @@ export var withScopeList = function withScopeList(Component) {
|
|
|
416
416
|
term = _this$state.term,
|
|
417
417
|
itemsByParentId = _this$state.itemsByParentId,
|
|
418
418
|
itemsById = _this$state.itemsById,
|
|
419
|
+
itemsByHierarchicalId = _this$state.itemsByHierarchicalId,
|
|
419
420
|
shiftSelection = _this$state.shiftSelection,
|
|
420
421
|
ctrlSelection = _this$state.ctrlSelection,
|
|
421
422
|
mouseSelection = _this$state.mouseSelection,
|
|
@@ -426,6 +427,7 @@ export var withScopeList = function withScopeList(Component) {
|
|
|
426
427
|
items: items,
|
|
427
428
|
itemsByParentId: itemsByParentId,
|
|
428
429
|
itemsById: itemsById,
|
|
430
|
+
itemsByHierarchicalId: itemsByHierarchicalId,
|
|
429
431
|
topElementProps: topElementProps,
|
|
430
432
|
currentItem: currentItem,
|
|
431
433
|
term: term,
|
|
@@ -445,7 +447,7 @@ export var withScopeList = function withScopeList(Component) {
|
|
|
445
447
|
isActivePanel: isActivePanel,
|
|
446
448
|
currentItem: currentItem,
|
|
447
449
|
items: items,
|
|
448
|
-
itemsById:
|
|
450
|
+
itemsById: itemsByHierarchicalId,
|
|
449
451
|
hasPath: hasPath
|
|
450
452
|
}),
|
|
451
453
|
action: _this.changeSpotlight,
|
|
@@ -480,6 +482,9 @@ export var withScopeList = function withScopeList(Component) {
|
|
|
480
482
|
}(React.Component), _class.getDerivedStateFromProps = function (props, state) {
|
|
481
483
|
return _extends({}, state, {
|
|
482
484
|
itemsById: R.indexBy(R.prop('id'), props.items),
|
|
485
|
+
itemsByHierarchicalId: R.indexBy(function (item) {
|
|
486
|
+
return item.hierarchicalId || item.id;
|
|
487
|
+
}, props.items),
|
|
483
488
|
itemsByParentId: getItemsIndexedByParentId(props.displayAccessor)(props.items) // only use for hasChild, same keys are overide
|
|
484
489
|
});
|
|
485
490
|
}, _temp2;
|
package/es/TableHtml5/section.js
CHANGED
|
@@ -94,21 +94,21 @@ var Section = function Section(_ref) {
|
|
|
94
94
|
SideIcon: SideIcon,
|
|
95
95
|
HTMLRenderer: HTMLRenderer
|
|
96
96
|
}),
|
|
97
|
-
R.map(function (sectionbody) {
|
|
97
|
+
R.addIndex(R.map)(function (sectionbody, rowIndex) {
|
|
98
98
|
var _cx2;
|
|
99
99
|
|
|
100
|
-
var rowId = sectionbody.key + '_' + sectionIndex;
|
|
100
|
+
var rowId = sectionbody.key + '_' + sectionIndex + '_' + rowIndex;
|
|
101
101
|
var rowIds = R.pipe(R.map(function (index) {
|
|
102
102
|
return sectionbody.key + '_' + sectionIndex + '_' + index;
|
|
103
103
|
}), R.join(' '))(R.times(R.identity, R.length(R.prop('data', sectionbody))));
|
|
104
104
|
return React.createElement(
|
|
105
105
|
TableRow,
|
|
106
|
-
{ key:
|
|
106
|
+
{ key: rowId },
|
|
107
107
|
mapIndexed(function (cell, index) {
|
|
108
108
|
var _cx;
|
|
109
109
|
|
|
110
110
|
var flags = R.path(['value', 'flags'], cell);
|
|
111
|
-
var id = rowId + '_' + index;
|
|
111
|
+
var id = rowIndex + '_' + rowId + '_' + index;
|
|
112
112
|
|
|
113
113
|
// special space is used for hierarchy U+2007    
|
|
114
114
|
var hierarchySpace = R.pipe(R.pathOr([], ['value', 'parents']), R.when(R.isNil, R.always([])), R.length,
|
|
@@ -165,9 +165,8 @@ var Section = function Section(_ref) {
|
|
|
165
165
|
|
|
166
166
|
var intersectionCellId = rowId + '/' + columnIndex;
|
|
167
167
|
var isActive = R.pipe(R.propOr({}, 'intersectionCellId'), R.equals(intersectionCellId))(activeCellIds);
|
|
168
|
-
return React.createElement(Cell, _extends({
|
|
169
|
-
key: intersectionCellId
|
|
170
|
-
}, R.pathOr({ value: '..' }, [item.key, currentSection, sectionbody.key, 0], cells), {
|
|
168
|
+
return React.createElement(Cell, _extends({}, R.pathOr({ value: '..' }, [item.key, currentSection, sectionbody.key, 0], cells), {
|
|
169
|
+
key: intersectionCellId,
|
|
171
170
|
headers: rowIds + ' ' + columnIds + ' ' + currentSection,
|
|
172
171
|
cellHandler: cellHandler,
|
|
173
172
|
HTMLRenderer: HTMLRenderer,
|
package/lib/Dataflow/Dataflow.js
CHANGED
|
@@ -196,6 +196,8 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
196
196
|
handleUrl = _ref2.handleUrl,
|
|
197
197
|
label = _ref2.label,
|
|
198
198
|
labels = _ref2.labels,
|
|
199
|
+
_ref2$dimensions = _ref2.dimensions,
|
|
200
|
+
dimensions = _ref2$dimensions === undefined ? [] : _ref2$dimensions,
|
|
199
201
|
_ref2$highlights = _ref2.highlights,
|
|
200
202
|
highlights = _ref2$highlights === undefined ? [] : _ref2$highlights,
|
|
201
203
|
_ref2$categories = _ref2.categories,
|
|
@@ -229,12 +231,7 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
229
231
|
{ className: classes.header, 'data-testid': testId + '_title' },
|
|
230
232
|
_react2.default.createElement(
|
|
231
233
|
_Typography2.default,
|
|
232
|
-
{
|
|
233
|
-
variant: 'h6',
|
|
234
|
-
color: 'primary',
|
|
235
|
-
display: 'inline',
|
|
236
|
-
className: classes.container
|
|
237
|
-
},
|
|
234
|
+
{ variant: 'h6', color: 'primary', display: 'inline' },
|
|
238
235
|
_react2.default.createElement(
|
|
239
236
|
_Link2.default,
|
|
240
237
|
{
|
|
@@ -288,6 +285,21 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
288
285
|
_react2.default.createElement(
|
|
289
286
|
_CardContent2.default,
|
|
290
287
|
{ className: classes.cardContent },
|
|
288
|
+
!R.isEmpty(dimensions) && _react2.default.createElement(
|
|
289
|
+
_Typography2.default,
|
|
290
|
+
{
|
|
291
|
+
variant: 'body2',
|
|
292
|
+
color: 'textSecondary',
|
|
293
|
+
'data-testid': testId + '_dimensions'
|
|
294
|
+
},
|
|
295
|
+
_react2.default.createElement(
|
|
296
|
+
'strong',
|
|
297
|
+
null,
|
|
298
|
+
R.prop('dimensions')(labels),
|
|
299
|
+
':\xA0'
|
|
300
|
+
),
|
|
301
|
+
_react2.default.createElement(HTMLRenderer, { html: R.join(', ', dimensions) })
|
|
302
|
+
),
|
|
291
303
|
R.map(function (_ref3) {
|
|
292
304
|
var field = _ref3[0],
|
|
293
305
|
fieldHighlights = _ref3[1];
|
|
@@ -297,7 +309,6 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
297
309
|
variant: 'body2',
|
|
298
310
|
key: field,
|
|
299
311
|
color: 'textSecondary',
|
|
300
|
-
className: classes.container,
|
|
301
312
|
'data-testid': testId + '_highlight_' + field
|
|
302
313
|
},
|
|
303
314
|
_react2.default.createElement(
|
|
@@ -320,12 +331,7 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
320
331
|
categorie = _ref4[1];
|
|
321
332
|
return _react2.default.createElement(
|
|
322
333
|
_Typography2.default,
|
|
323
|
-
{
|
|
324
|
-
variant: 'body2',
|
|
325
|
-
key: field,
|
|
326
|
-
color: 'textSecondary',
|
|
327
|
-
className: classes.container
|
|
328
|
-
},
|
|
334
|
+
{ variant: 'body2', key: field, color: 'textSecondary' },
|
|
329
335
|
_react2.default.createElement(
|
|
330
336
|
'strong',
|
|
331
337
|
null,
|
|
@@ -343,7 +349,7 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
343
349
|
R.not(R.isEmpty(categories)) && _react2.default.createElement(_Divider2.default, { className: classes.divider }),
|
|
344
350
|
label && _react2.default.createElement(
|
|
345
351
|
_Typography2.default,
|
|
346
|
-
{ variant: 'body2', color: 'textSecondary'
|
|
352
|
+
{ variant: 'body2', color: 'textSecondary' },
|
|
347
353
|
_react2.default.createElement(
|
|
348
354
|
'strong',
|
|
349
355
|
null,
|
|
@@ -359,7 +365,7 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
359
365
|
{ className: classes.footer, disableSpacing: true },
|
|
360
366
|
_react2.default.createElement(
|
|
361
367
|
_Typography2.default,
|
|
362
|
-
{ variant: 'caption', color: 'textSecondary'
|
|
368
|
+
{ variant: 'caption', color: 'textSecondary' },
|
|
363
369
|
_react2.default.createElement(
|
|
364
370
|
'strong',
|
|
365
371
|
null,
|
|
@@ -375,7 +381,7 @@ var Dataflow = function Dataflow(_ref2) {
|
|
|
375
381
|
),
|
|
376
382
|
_react2.default.createElement(
|
|
377
383
|
_Typography2.default,
|
|
378
|
-
{ variant: 'caption', color: 'textSecondary'
|
|
384
|
+
{ variant: 'caption', color: 'textSecondary' },
|
|
379
385
|
R.prop('note')(labels)
|
|
380
386
|
)
|
|
381
387
|
)
|
|
@@ -428,6 +434,7 @@ Dataflow.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
428
434
|
date: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element])
|
|
429
435
|
}),
|
|
430
436
|
highlights: _propTypes2.default.array,
|
|
437
|
+
dimensions: _propTypes2.default.array,
|
|
431
438
|
categories: _propTypes2.default.array,
|
|
432
439
|
children: _propTypes2.default.node,
|
|
433
440
|
HTMLRenderer: _propTypes2.default.func
|
package/lib/ScopeList/Item.js
CHANGED
|
@@ -92,7 +92,8 @@ var Item = function Item(_ref) {
|
|
|
92
92
|
accessibility = _ref.accessibility,
|
|
93
93
|
index = _ref.index,
|
|
94
94
|
labelRenderer = _ref.labelRenderer,
|
|
95
|
-
HTMLRenderer = _ref.HTMLRenderer
|
|
95
|
+
HTMLRenderer = _ref.HTMLRenderer,
|
|
96
|
+
hierarchicalId = _ref.hierarchicalId;
|
|
96
97
|
|
|
97
98
|
var _React$useState = _react2.default.useState(false),
|
|
98
99
|
isTooltipShown = _React$useState[0],
|
|
@@ -209,7 +210,7 @@ var Item = function Item(_ref) {
|
|
|
209
210
|
className: classes.containerArrow,
|
|
210
211
|
tabIndex: 0,
|
|
211
212
|
onClick: function onClick() {
|
|
212
|
-
return changeList(id);
|
|
213
|
+
return changeList(hierarchicalId || id);
|
|
213
214
|
},
|
|
214
215
|
onKeyPress: function onKeyPress(e) {
|
|
215
216
|
if (e.key === 'Enter') {
|
|
@@ -270,7 +271,8 @@ Item.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
270
271
|
accessibility: _propTypes2.default.bool,
|
|
271
272
|
index: _propTypes2.default.number,
|
|
272
273
|
labelRenderer: _propTypes2.default.func,
|
|
273
|
-
HTMLRenderer: _propTypes2.default.func
|
|
274
|
+
HTMLRenderer: _propTypes2.default.func,
|
|
275
|
+
hierarchicalId: _propTypes2.default.string
|
|
274
276
|
} : {};
|
|
275
277
|
|
|
276
278
|
exports.default = Item;
|
|
@@ -100,7 +100,7 @@ var getPlaceholder = exports.getPlaceholder = function getPlaceholder(_ref2) {
|
|
|
100
100
|
//----------------------------------------------------------------------------------------------List
|
|
101
101
|
var withHasChild = exports.withHasChild = function withHasChild(itemsByParentId) {
|
|
102
102
|
return function (item) {
|
|
103
|
-
return R.assoc('hasChild', R.pipe(R.prop(item.id), R.isNil, R.not)(itemsByParentId))(item);
|
|
103
|
+
return R.assoc('hasChild', R.pipe(R.prop(item.hierarchicalId || item.id), R.isNil, R.not)(itemsByParentId))(item);
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
106
|
var getCurrentList = exports.getCurrentList = function getCurrentList(_ref3) {
|
|
@@ -125,7 +125,7 @@ var getList = exports.getList = function getList(_ref4) {
|
|
|
125
125
|
hasPath = _ref4.hasPath,
|
|
126
126
|
displayAccessor = _ref4.displayAccessor;
|
|
127
127
|
|
|
128
|
-
var currentItemId = currentItem ?
|
|
128
|
+
var currentItemId = currentItem ? currentItem.hierarchicalId || currentItem.id : null;
|
|
129
129
|
if (R.or(R.isEmpty(term), R.isNil(R.prop('defaultSpotlight')(topElementProps)))) {
|
|
130
130
|
var itemsByParentIdDisplayed = getItemsIndexedByParentId(displayAccessor)(items);
|
|
131
131
|
if (R.isNil(currentItemId)) return R.pipe(getMainList, R.map(function (item) {
|
|
@@ -285,7 +285,7 @@ var withScopeList = exports.withScopeList = function withScopeList(Component) {
|
|
|
285
285
|
isMousePreSelection: false,
|
|
286
286
|
applyToShiftSelected: R.identity
|
|
287
287
|
}, _this.changeList = function (id) {
|
|
288
|
-
return _this.setState({ currentItem: R.prop(id)(_this.state.
|
|
288
|
+
return _this.setState({ currentItem: R.prop(id)(_this.state.itemsByHierarchicalId), term: '' });
|
|
289
289
|
}, _this.changeSelection = function (panelId) {
|
|
290
290
|
return function (id) {
|
|
291
291
|
return function (event) {
|
|
@@ -431,6 +431,7 @@ var withScopeList = exports.withScopeList = function withScopeList(Component) {
|
|
|
431
431
|
term = _this$state.term,
|
|
432
432
|
itemsByParentId = _this$state.itemsByParentId,
|
|
433
433
|
itemsById = _this$state.itemsById,
|
|
434
|
+
itemsByHierarchicalId = _this$state.itemsByHierarchicalId,
|
|
434
435
|
shiftSelection = _this$state.shiftSelection,
|
|
435
436
|
ctrlSelection = _this$state.ctrlSelection,
|
|
436
437
|
mouseSelection = _this$state.mouseSelection,
|
|
@@ -441,6 +442,7 @@ var withScopeList = exports.withScopeList = function withScopeList(Component) {
|
|
|
441
442
|
items: items,
|
|
442
443
|
itemsByParentId: itemsByParentId,
|
|
443
444
|
itemsById: itemsById,
|
|
445
|
+
itemsByHierarchicalId: itemsByHierarchicalId,
|
|
444
446
|
topElementProps: topElementProps,
|
|
445
447
|
currentItem: currentItem,
|
|
446
448
|
term: term,
|
|
@@ -460,7 +462,7 @@ var withScopeList = exports.withScopeList = function withScopeList(Component) {
|
|
|
460
462
|
isActivePanel: isActivePanel,
|
|
461
463
|
currentItem: currentItem,
|
|
462
464
|
items: items,
|
|
463
|
-
itemsById:
|
|
465
|
+
itemsById: itemsByHierarchicalId,
|
|
464
466
|
hasPath: hasPath
|
|
465
467
|
}),
|
|
466
468
|
action: _this.changeSpotlight,
|
|
@@ -495,6 +497,9 @@ var withScopeList = exports.withScopeList = function withScopeList(Component) {
|
|
|
495
497
|
}(_react2.default.Component), _class.getDerivedStateFromProps = function (props, state) {
|
|
496
498
|
return _extends({}, state, {
|
|
497
499
|
itemsById: R.indexBy(R.prop('id'), props.items),
|
|
500
|
+
itemsByHierarchicalId: R.indexBy(function (item) {
|
|
501
|
+
return item.hierarchicalId || item.id;
|
|
502
|
+
}, props.items),
|
|
498
503
|
itemsByParentId: getItemsIndexedByParentId(props.displayAccessor)(props.items) // only use for hasChild, same keys are overide
|
|
499
504
|
});
|
|
500
505
|
}, _temp2;
|
|
@@ -136,21 +136,21 @@ var Section = function Section(_ref) {
|
|
|
136
136
|
SideIcon: SideIcon,
|
|
137
137
|
HTMLRenderer: HTMLRenderer
|
|
138
138
|
}),
|
|
139
|
-
R.map(function (sectionbody) {
|
|
139
|
+
R.addIndex(R.map)(function (sectionbody, rowIndex) {
|
|
140
140
|
var _cx2;
|
|
141
141
|
|
|
142
|
-
var rowId = sectionbody.key + '_' + sectionIndex;
|
|
142
|
+
var rowId = sectionbody.key + '_' + sectionIndex + '_' + rowIndex;
|
|
143
143
|
var rowIds = R.pipe(R.map(function (index) {
|
|
144
144
|
return sectionbody.key + '_' + sectionIndex + '_' + index;
|
|
145
145
|
}), R.join(' '))(R.times(R.identity, R.length(R.prop('data', sectionbody))));
|
|
146
146
|
return _react2.default.createElement(
|
|
147
147
|
_TableRow2.default,
|
|
148
|
-
{ key:
|
|
148
|
+
{ key: rowId },
|
|
149
149
|
mapIndexed(function (cell, index) {
|
|
150
150
|
var _cx;
|
|
151
151
|
|
|
152
152
|
var flags = R.path(['value', 'flags'], cell);
|
|
153
|
-
var id = rowId + '_' + index;
|
|
153
|
+
var id = rowIndex + '_' + rowId + '_' + index;
|
|
154
154
|
|
|
155
155
|
// special space is used for hierarchy U+2007    
|
|
156
156
|
var hierarchySpace = R.pipe(R.pathOr([], ['value', 'parents']), R.when(R.isNil, R.always([])), R.length,
|
|
@@ -207,9 +207,8 @@ var Section = function Section(_ref) {
|
|
|
207
207
|
|
|
208
208
|
var intersectionCellId = rowId + '/' + columnIndex;
|
|
209
209
|
var isActive = R.pipe(R.propOr({}, 'intersectionCellId'), R.equals(intersectionCellId))(activeCellIds);
|
|
210
|
-
return _react2.default.createElement(_cell2.default, _extends({
|
|
211
|
-
key: intersectionCellId
|
|
212
|
-
}, R.pathOr({ value: '..' }, [item.key, currentSection, sectionbody.key, 0], cells), {
|
|
210
|
+
return _react2.default.createElement(_cell2.default, _extends({}, R.pathOr({ value: '..' }, [item.key, currentSection, sectionbody.key, 0], cells), {
|
|
211
|
+
key: intersectionCellId,
|
|
213
212
|
headers: rowIds + ' ' + columnIds + ' ' + currentSection,
|
|
214
213
|
cellHandler: cellHandler,
|
|
215
214
|
HTMLRenderer: HTMLRenderer,
|