@sis-cc/dotstatsuite-visions 12.32.0 → 12.33.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.
|
@@ -49,6 +49,21 @@ var useStyles = makeStyles(function (theme) {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
});
|
|
52
|
+
var getCounter = function getCounter(items, tagAccessor) {
|
|
53
|
+
var selectedItemsIds = R.reduce(function (acc, item) {
|
|
54
|
+
if (R.prop('isSelected', item)) {
|
|
55
|
+
return R.append(item.id, acc);
|
|
56
|
+
}
|
|
57
|
+
return acc;
|
|
58
|
+
}, [], items);
|
|
59
|
+
var itemsIds = R.pluck('id', items);
|
|
60
|
+
var count = R.pipe(R.uniq, R.length)(selectedItemsIds);
|
|
61
|
+
var total = R.pipe(R.uniq, R.length)(itemsIds);
|
|
62
|
+
if (R.is(Function, tagAccessor)) {
|
|
63
|
+
return tagAccessor(count, total);
|
|
64
|
+
}
|
|
65
|
+
return count + '/' + total;
|
|
66
|
+
};
|
|
52
67
|
|
|
53
68
|
var TabPanel = function TabPanel(props) {
|
|
54
69
|
var children = props.children,
|
|
@@ -61,18 +76,19 @@ var TabPanel = function TabPanel(props) {
|
|
|
61
76
|
setOpen = props.setOpen,
|
|
62
77
|
labelRenderer = props.labelRenderer,
|
|
63
78
|
_props$styles = props.styles,
|
|
64
|
-
styles = _props$styles === undefined ? {} : _props$styles
|
|
79
|
+
styles = _props$styles === undefined ? {} : _props$styles,
|
|
80
|
+
other = _objectWithoutProperties(props, ['children', 'open', 'item', 'classes', 'labels', 'onClose', 'isNarrow', 'setOpen', 'labelRenderer', 'styles']);
|
|
65
81
|
|
|
66
82
|
return React.createElement(
|
|
67
83
|
'div',
|
|
68
|
-
{
|
|
84
|
+
_extends({
|
|
69
85
|
role: 'tabpanel',
|
|
70
86
|
hidden: !open,
|
|
71
87
|
id: 'vertical-tabpanel-' + item.index,
|
|
72
88
|
'aria-labelledby': 'vertical-tab-' + item.index,
|
|
73
89
|
className: isNarrow ? classes.tabPanelNarrow : classes.tabPanel,
|
|
74
90
|
style: styles
|
|
75
|
-
},
|
|
91
|
+
}, other),
|
|
76
92
|
open && React.createElement(
|
|
77
93
|
Box,
|
|
78
94
|
{ sx: { p: 3 } },
|
|
@@ -152,13 +168,21 @@ TabPanel.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
152
168
|
styles: PropTypes.object
|
|
153
169
|
} : {};
|
|
154
170
|
|
|
155
|
-
var PaperComponent = function
|
|
171
|
+
var PaperComponent = React.forwardRef(function (_ref, ref) {
|
|
156
172
|
var _cx;
|
|
157
173
|
|
|
174
|
+
var label = _ref.label,
|
|
175
|
+
selected = _ref.selected,
|
|
176
|
+
item = _ref.item,
|
|
177
|
+
tagAccessor = _ref.tagAccessor,
|
|
178
|
+
tagValueLabel = _ref.tagValueLabel,
|
|
179
|
+
rest = _objectWithoutProperties(_ref, ['label', 'selected', 'item', 'tagAccessor', 'tagValueLabel']);
|
|
180
|
+
|
|
181
|
+
var Chip = R.isNil(item.tag) ? InternalTag : item.tag;
|
|
158
182
|
var classes = useStyles();
|
|
159
183
|
return React.createElement(
|
|
160
184
|
Paper,
|
|
161
|
-
|
|
185
|
+
_extends({}, rest, { ref: ref }),
|
|
162
186
|
React.createElement(
|
|
163
187
|
Box,
|
|
164
188
|
{ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } },
|
|
@@ -167,19 +191,25 @@ var PaperComponent = function PaperComponent(props) {
|
|
|
167
191
|
{
|
|
168
192
|
noWrap: true,
|
|
169
193
|
variant: 'body2',
|
|
170
|
-
title:
|
|
171
|
-
className: cx(classes.label, (_cx = {}, _cx[classes.labelSelected] =
|
|
194
|
+
title: label,
|
|
195
|
+
className: cx(classes.label, (_cx = {}, _cx[classes.labelSelected] = selected, _cx))
|
|
172
196
|
},
|
|
173
|
-
|
|
197
|
+
label
|
|
174
198
|
),
|
|
175
|
-
|
|
199
|
+
R.isNil(item.tag) ? React.createElement(
|
|
200
|
+
Chip,
|
|
201
|
+
{ items: item.values, tagValueLabel: tagValueLabel },
|
|
202
|
+
getCounter(item.values, tagAccessor)
|
|
203
|
+
) : item.tag
|
|
176
204
|
)
|
|
177
205
|
);
|
|
178
|
-
};
|
|
206
|
+
});
|
|
179
207
|
PaperComponent.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
180
208
|
label: PropTypes.string,
|
|
181
|
-
|
|
182
|
-
|
|
209
|
+
selected: PropTypes.bool,
|
|
210
|
+
item: PropTypes.object,
|
|
211
|
+
tagAccessor: PropTypes.func,
|
|
212
|
+
tagValueLabel: PropTypes.func
|
|
183
213
|
} : {};
|
|
184
214
|
|
|
185
215
|
var DynamicDrawer = function DynamicDrawer(props) {
|
|
@@ -201,22 +231,6 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
201
231
|
allSelection = _useState4[0],
|
|
202
232
|
setAllSelection = _useState4[1];
|
|
203
233
|
|
|
204
|
-
var getCounter = function getCounter(items, tagAccessor) {
|
|
205
|
-
var selectedItemsIds = R.reduce(function (acc, item) {
|
|
206
|
-
if (R.prop('isSelected', item)) {
|
|
207
|
-
return R.append(item.id, acc);
|
|
208
|
-
}
|
|
209
|
-
return acc;
|
|
210
|
-
}, [], items);
|
|
211
|
-
var itemsIds = R.pluck('id', items);
|
|
212
|
-
var count = R.pipe(R.uniq, R.length)(selectedItemsIds);
|
|
213
|
-
var total = R.pipe(R.uniq, R.length)(itemsIds);
|
|
214
|
-
if (R.is(Function, tagAccessor)) {
|
|
215
|
-
return tagAccessor(count, total);
|
|
216
|
-
}
|
|
217
|
-
return count + '/' + total;
|
|
218
|
-
};
|
|
219
|
-
|
|
220
234
|
var list = props.list,
|
|
221
235
|
labelRenderer = props.labelRenderer,
|
|
222
236
|
onClick = props.onClick,
|
|
@@ -328,24 +342,23 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
328
342
|
R.map(function (item) {
|
|
329
343
|
var _cx2;
|
|
330
344
|
|
|
331
|
-
var Chip = R.isNil(item.tag) ? InternalTag : item.tag;
|
|
332
345
|
var tagValueLabel = R.isNil(item.tag) && getCounter(item.values, tagAriaLabel);
|
|
333
346
|
|
|
334
347
|
return React.createElement(Tab, {
|
|
335
348
|
key: item.id,
|
|
336
349
|
id: filter.id,
|
|
337
350
|
'data-testid': item.id + '-tab',
|
|
338
|
-
component: function
|
|
339
|
-
return PaperComponent
|
|
351
|
+
component: React.forwardRef(function TabPaper(tabProps, ref) {
|
|
352
|
+
return React.createElement(PaperComponent, _extends({
|
|
353
|
+
ref: ref
|
|
354
|
+
}, tabProps, {
|
|
340
355
|
label: labelRenderer(item),
|
|
341
356
|
selected: selectedId === item.id,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}, props));
|
|
348
|
-
},
|
|
357
|
+
item: item,
|
|
358
|
+
tagAccessor: tagAccessor,
|
|
359
|
+
tagValueLabel: tagValueLabel
|
|
360
|
+
}));
|
|
361
|
+
}),
|
|
349
362
|
label: labelRenderer(item),
|
|
350
363
|
'aria-label': labelRenderer(item),
|
|
351
364
|
value: item,
|
|
@@ -430,7 +443,7 @@ DynamicDrawer.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
430
443
|
tagAriaLabel: PropTypes.func,
|
|
431
444
|
handleChangePanel: PropTypes.func,
|
|
432
445
|
onClosePanel: PropTypes.func,
|
|
433
|
-
displayChildren: PropTypes.
|
|
446
|
+
displayChildren: PropTypes.bool,
|
|
434
447
|
labels: PropTypes.shape({
|
|
435
448
|
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
436
449
|
disableItemLabel: PropTypes.string,
|
|
@@ -99,6 +99,21 @@ var useStyles = (0, _makeStyles2.default)(function (theme) {
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
});
|
|
102
|
+
var getCounter = function getCounter(items, tagAccessor) {
|
|
103
|
+
var selectedItemsIds = R.reduce(function (acc, item) {
|
|
104
|
+
if (R.prop('isSelected', item)) {
|
|
105
|
+
return R.append(item.id, acc);
|
|
106
|
+
}
|
|
107
|
+
return acc;
|
|
108
|
+
}, [], items);
|
|
109
|
+
var itemsIds = R.pluck('id', items);
|
|
110
|
+
var count = R.pipe(R.uniq, R.length)(selectedItemsIds);
|
|
111
|
+
var total = R.pipe(R.uniq, R.length)(itemsIds);
|
|
112
|
+
if (R.is(Function, tagAccessor)) {
|
|
113
|
+
return tagAccessor(count, total);
|
|
114
|
+
}
|
|
115
|
+
return count + '/' + total;
|
|
116
|
+
};
|
|
102
117
|
|
|
103
118
|
var TabPanel = function TabPanel(props) {
|
|
104
119
|
var children = props.children,
|
|
@@ -111,18 +126,19 @@ var TabPanel = function TabPanel(props) {
|
|
|
111
126
|
setOpen = props.setOpen,
|
|
112
127
|
labelRenderer = props.labelRenderer,
|
|
113
128
|
_props$styles = props.styles,
|
|
114
|
-
styles = _props$styles === undefined ? {} : _props$styles
|
|
129
|
+
styles = _props$styles === undefined ? {} : _props$styles,
|
|
130
|
+
other = _objectWithoutProperties(props, ['children', 'open', 'item', 'classes', 'labels', 'onClose', 'isNarrow', 'setOpen', 'labelRenderer', 'styles']);
|
|
115
131
|
|
|
116
132
|
return _react2.default.createElement(
|
|
117
133
|
'div',
|
|
118
|
-
{
|
|
134
|
+
_extends({
|
|
119
135
|
role: 'tabpanel',
|
|
120
136
|
hidden: !open,
|
|
121
137
|
id: 'vertical-tabpanel-' + item.index,
|
|
122
138
|
'aria-labelledby': 'vertical-tab-' + item.index,
|
|
123
139
|
className: isNarrow ? classes.tabPanelNarrow : classes.tabPanel,
|
|
124
140
|
style: styles
|
|
125
|
-
},
|
|
141
|
+
}, other),
|
|
126
142
|
open && _react2.default.createElement(
|
|
127
143
|
_Box2.default,
|
|
128
144
|
{ sx: { p: 3 } },
|
|
@@ -202,13 +218,21 @@ TabPanel.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
202
218
|
styles: _propTypes2.default.object
|
|
203
219
|
} : {};
|
|
204
220
|
|
|
205
|
-
var PaperComponent = function
|
|
221
|
+
var PaperComponent = _react2.default.forwardRef(function (_ref, ref) {
|
|
206
222
|
var _cx;
|
|
207
223
|
|
|
224
|
+
var label = _ref.label,
|
|
225
|
+
selected = _ref.selected,
|
|
226
|
+
item = _ref.item,
|
|
227
|
+
tagAccessor = _ref.tagAccessor,
|
|
228
|
+
tagValueLabel = _ref.tagValueLabel,
|
|
229
|
+
rest = _objectWithoutProperties(_ref, ['label', 'selected', 'item', 'tagAccessor', 'tagValueLabel']);
|
|
230
|
+
|
|
231
|
+
var Chip = R.isNil(item.tag) ? _.Tag : item.tag;
|
|
208
232
|
var classes = useStyles();
|
|
209
233
|
return _react2.default.createElement(
|
|
210
234
|
_Paper2.default,
|
|
211
|
-
|
|
235
|
+
_extends({}, rest, { ref: ref }),
|
|
212
236
|
_react2.default.createElement(
|
|
213
237
|
_Box2.default,
|
|
214
238
|
{ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } },
|
|
@@ -217,19 +241,25 @@ var PaperComponent = function PaperComponent(props) {
|
|
|
217
241
|
{
|
|
218
242
|
noWrap: true,
|
|
219
243
|
variant: 'body2',
|
|
220
|
-
title:
|
|
221
|
-
className: (0, _classnames2.default)(classes.label, (_cx = {}, _cx[classes.labelSelected] =
|
|
244
|
+
title: label,
|
|
245
|
+
className: (0, _classnames2.default)(classes.label, (_cx = {}, _cx[classes.labelSelected] = selected, _cx))
|
|
222
246
|
},
|
|
223
|
-
|
|
247
|
+
label
|
|
224
248
|
),
|
|
225
|
-
|
|
249
|
+
R.isNil(item.tag) ? _react2.default.createElement(
|
|
250
|
+
Chip,
|
|
251
|
+
{ items: item.values, tagValueLabel: tagValueLabel },
|
|
252
|
+
getCounter(item.values, tagAccessor)
|
|
253
|
+
) : item.tag
|
|
226
254
|
)
|
|
227
255
|
);
|
|
228
|
-
};
|
|
256
|
+
});
|
|
229
257
|
PaperComponent.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
230
258
|
label: _propTypes2.default.string,
|
|
231
|
-
|
|
232
|
-
|
|
259
|
+
selected: _propTypes2.default.bool,
|
|
260
|
+
item: _propTypes2.default.object,
|
|
261
|
+
tagAccessor: _propTypes2.default.func,
|
|
262
|
+
tagValueLabel: _propTypes2.default.func
|
|
233
263
|
} : {};
|
|
234
264
|
|
|
235
265
|
var DynamicDrawer = function DynamicDrawer(props) {
|
|
@@ -251,22 +281,6 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
251
281
|
allSelection = _useState4[0],
|
|
252
282
|
setAllSelection = _useState4[1];
|
|
253
283
|
|
|
254
|
-
var getCounter = function getCounter(items, tagAccessor) {
|
|
255
|
-
var selectedItemsIds = R.reduce(function (acc, item) {
|
|
256
|
-
if (R.prop('isSelected', item)) {
|
|
257
|
-
return R.append(item.id, acc);
|
|
258
|
-
}
|
|
259
|
-
return acc;
|
|
260
|
-
}, [], items);
|
|
261
|
-
var itemsIds = R.pluck('id', items);
|
|
262
|
-
var count = R.pipe(R.uniq, R.length)(selectedItemsIds);
|
|
263
|
-
var total = R.pipe(R.uniq, R.length)(itemsIds);
|
|
264
|
-
if (R.is(Function, tagAccessor)) {
|
|
265
|
-
return tagAccessor(count, total);
|
|
266
|
-
}
|
|
267
|
-
return count + '/' + total;
|
|
268
|
-
};
|
|
269
|
-
|
|
270
284
|
var list = props.list,
|
|
271
285
|
labelRenderer = props.labelRenderer,
|
|
272
286
|
onClick = props.onClick,
|
|
@@ -378,24 +392,23 @@ var DynamicDrawer = function DynamicDrawer(props) {
|
|
|
378
392
|
R.map(function (item) {
|
|
379
393
|
var _cx2;
|
|
380
394
|
|
|
381
|
-
var Chip = R.isNil(item.tag) ? _.Tag : item.tag;
|
|
382
395
|
var tagValueLabel = R.isNil(item.tag) && getCounter(item.values, tagAriaLabel);
|
|
383
396
|
|
|
384
397
|
return _react2.default.createElement(_Tab2.default, {
|
|
385
398
|
key: item.id,
|
|
386
399
|
id: filter.id,
|
|
387
400
|
'data-testid': item.id + '-tab',
|
|
388
|
-
component: function
|
|
389
|
-
return PaperComponent
|
|
401
|
+
component: _react2.default.forwardRef(function TabPaper(tabProps, ref) {
|
|
402
|
+
return _react2.default.createElement(PaperComponent, _extends({
|
|
403
|
+
ref: ref
|
|
404
|
+
}, tabProps, {
|
|
390
405
|
label: labelRenderer(item),
|
|
391
406
|
selected: selectedId === item.id,
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}, props));
|
|
398
|
-
},
|
|
407
|
+
item: item,
|
|
408
|
+
tagAccessor: tagAccessor,
|
|
409
|
+
tagValueLabel: tagValueLabel
|
|
410
|
+
}));
|
|
411
|
+
}),
|
|
399
412
|
label: labelRenderer(item),
|
|
400
413
|
'aria-label': labelRenderer(item),
|
|
401
414
|
value: item,
|
|
@@ -480,7 +493,7 @@ DynamicDrawer.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
480
493
|
tagAriaLabel: _propTypes2.default.func,
|
|
481
494
|
handleChangePanel: _propTypes2.default.func,
|
|
482
495
|
onClosePanel: _propTypes2.default.func,
|
|
483
|
-
displayChildren: _propTypes2.default.
|
|
496
|
+
displayChildren: _propTypes2.default.bool,
|
|
484
497
|
labels: _propTypes2.default.shape({
|
|
485
498
|
placeholder: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]),
|
|
486
499
|
disableItemLabel: _propTypes2.default.string,
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @sis-cc/dotstatsuite-visions v12.
|
|
2
|
+
* @sis-cc/dotstatsuite-visions v12.33.0 - https://visions-qa.siscc.org/#o
|
|
3
3
|
* MIT Licensed
|
|
4
4
|
*/
|
|
5
5
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -8876,7 +8876,7 @@ if (true) {
|
|
|
8876
8876
|
/* 157 */
|
|
8877
8877
|
/***/ (function(module) {
|
|
8878
8878
|
|
|
8879
|
-
module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"12.
|
|
8879
|
+
module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"12.33.0","description":"Library of visual components","author":"OECD","homepage":"https://visions-qa.siscc.org/#o","license":"MIT","repository":"https://gitlab.com/sis-cc/.stat-suite/dotstatsuite-visions","main":"lib/index.js","module":"es/index.js","engines":{"node":">=18"},"files":["css","es","lib","umd"],"scripts":{"peers":"install-peers --force-run","build":"cross-env NODE_OPTIONS=--openssl-legacy-provider nwb build-react-component --copy-files --no-demo && node scripts/doc && cross-env NODE_OPTIONS=--openssl-legacy-provider nwb build-demo","build:dev":"cross-env NODE_OPTIONS=--openssl-legacy-provider nwb build-react-component --copy-files --no-demo","clean":"nwb clean-module && nwb clean-demo","prepublishOnly":"npm run build","start":"cross-env NODE_OPTIONS=--openssl-legacy-provider nwb serve-react-demo","test":"jest","test:watch":"jest --watch --no-cache","lint":"eslint src/ --color","precommit":"lint-staged","transform":"npx jscodeshift -t scripts/transform-mui-imports.js demo/"},"dependencies":{"@hello-pangea/dnd":"^16.6.0","@react-hook/size":"^2.1.1","classnames":"^2.2.6","diacritics":"^1.3.0","isemail":"^3.2.0","prop-types":"^15.7.2","ramda":"^0.27.0","react-draggable":"4.4.5","react-error-boundary":"^4.0.10","react-virtualized":"^9.21.2"},"peerDependencies":{"@emotion/react":"^11","@emotion/styled":"^11","@mui/icons-material":"^5","@mui/material":"^5","@mui/styles":"^5","date-fns":"^1.30.1","numeral":"^2.0.6","react":"^18","react-dom":"^18"},"devDependencies":{"@babel/eslint-parser":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@cfaester/enzyme-adapter-react-18":"^0.7.0","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^14.0.0","babel-jest":"^24.8.0","babel-preset-react-app":"^9.0.0","cross-env":"^7.0.3","dox":"^0.9.0","eslint":"^8.39.0","eslint-plugin-import":"^2.27.5","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.32.2","eslint-plugin-react-hooks":"^4.6.0","husky":"^2.7.0","identity-obj-proxy":"^3.0.0","install-peers-cli":"^2.2.0","jest":"^24.8.0","jss":"^10.10.0","jss-rtl":"^0.2.3","lint-staged":"^8.2.1","mutationobserver-shim":"^0.3.7","nwb":"0.23.0","prettier":"^2.8.8","pretty-quick":"^3.1.3","react-a11y":"^1.1.0","react-helmet":"^5.2.1","react-scrollable-anchor":"^0.6.1","react-syntax-highlighter":"^10.2.1","sanitize-html":"2.7.0","webpack":"^5.68.0","webpack-cli":"^4.9.2","webpack-dev-server":"^4.7.4"},"jest":{"verbose":true,"coverageDirectory":"coverage","collectCoverageFrom":["src/**/*.{js,jsx,ts,tsx}","!src/ScopeList/*.{js,jsx,ts,tsx}","!src/**/*.d.ts"],"setupFilesAfterEnv":["<rootDir>/tests/setup.js"],"testMatch":["**/tests/**/*.{spec,test}.{js,jsx,ts,tsx}","!**/tests/ScopeList.test.js"],"testEnvironment":"jsdom","transform":{"^.+\\.(js|jsx|ts|tsx)$":"<rootDir>/node_modules/babel-jest"},"transformIgnorePatterns":["[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$","^.+\\.module\\.(css|sass|scss)$"],"modulePaths":[],"moduleNameMapper":{"^react-native$":"react-native-web","^.+\\.module\\.(css|sass|scss)$":"identity-obj-proxy","\\.(jpg|jpeg|png)$":"identity-obj-proxy"},"moduleFileExtensions":["web.js","js","web.ts","ts","web.tsx","tsx","json","web.jsx","jsx","node"]},"babel":{"presets":["react-app"],"plugins":["@babel/plugin-syntax-dynamic-import"]},"eslintConfig":{"env":{"browser":true,"jest":true,"node":true,"es6":true},"extends":["eslint:recommended","plugin:react/recommended","plugin:jsx-a11y/recommended"],"parser":"@babel/eslint-parser","parserOptions":{"babelOptions":{"presets":[["babel-preset-react-app",false],"babel-preset-react-app/test"]},"ecmaFeatures":{"experimentalObjectRestSpread":true,"jsx":true},"sourceType":"module"},"plugins":["prettier","react","import","react-hooks","jsx-a11y"],"rules":{"no-console":"warn","no-unused-vars":"error","react/display-name":"off","react-hooks/rules-of-hooks":"error","react-hooks/exhaustive-deps":"warn","no-use-before-define":"error"}},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"src/**/*.{js,css}":["prettier --write","git add","yarn lint"]},"prettier":{"endOfLine":"lf","useTabs":false,"printWidth":100,"tabWidth":2,"singleQuote":true,"trailingComma":"all","bracketSameLine":false,"bracketSpacing":true,"parser":"babel","semi":true,"arrowParens":"avoid"}};
|
|
8880
8880
|
|
|
8881
8881
|
/***/ }),
|
|
8882
8882
|
/* 158 */
|
|
@@ -61412,6 +61412,21 @@ var DynamicDrawer_useStyles = makeStyles(function (theme) {
|
|
|
61412
61412
|
}
|
|
61413
61413
|
};
|
|
61414
61414
|
});
|
|
61415
|
+
var DynamicDrawer_getCounter = function getCounter(items, tagAccessor) {
|
|
61416
|
+
var selectedItemsIds = es_reduce(function (acc, item) {
|
|
61417
|
+
if (es_prop('isSelected', item)) {
|
|
61418
|
+
return es_append(item.id, acc);
|
|
61419
|
+
}
|
|
61420
|
+
return acc;
|
|
61421
|
+
}, [], items);
|
|
61422
|
+
var itemsIds = es_pluck('id', items);
|
|
61423
|
+
var count = pipe(es_uniq, es_length)(selectedItemsIds);
|
|
61424
|
+
var total = pipe(es_uniq, es_length)(itemsIds);
|
|
61425
|
+
if (es_is(Function, tagAccessor)) {
|
|
61426
|
+
return tagAccessor(count, total);
|
|
61427
|
+
}
|
|
61428
|
+
return count + '/' + total;
|
|
61429
|
+
};
|
|
61415
61430
|
|
|
61416
61431
|
var DynamicDrawer_TabPanel = function TabPanel(props) {
|
|
61417
61432
|
var children = props.children,
|
|
@@ -61424,18 +61439,19 @@ var DynamicDrawer_TabPanel = function TabPanel(props) {
|
|
|
61424
61439
|
setOpen = props.setOpen,
|
|
61425
61440
|
labelRenderer = props.labelRenderer,
|
|
61426
61441
|
_props$styles = props.styles,
|
|
61427
|
-
styles = _props$styles === undefined ? {} : _props$styles
|
|
61442
|
+
styles = _props$styles === undefined ? {} : _props$styles,
|
|
61443
|
+
other = DynamicDrawer_objectWithoutProperties(props, ['children', 'open', 'item', 'classes', 'labels', 'onClose', 'isNarrow', 'setOpen', 'labelRenderer', 'styles']);
|
|
61428
61444
|
|
|
61429
61445
|
return react_default.a.createElement(
|
|
61430
61446
|
'div',
|
|
61431
|
-
{
|
|
61447
|
+
DynamicDrawer_extends({
|
|
61432
61448
|
role: 'tabpanel',
|
|
61433
61449
|
hidden: !open,
|
|
61434
61450
|
id: 'vertical-tabpanel-' + item.index,
|
|
61435
61451
|
'aria-labelledby': 'vertical-tab-' + item.index,
|
|
61436
61452
|
className: isNarrow ? classes.tabPanelNarrow : classes.tabPanel,
|
|
61437
61453
|
style: styles
|
|
61438
|
-
},
|
|
61454
|
+
}, other),
|
|
61439
61455
|
open && react_default.a.createElement(
|
|
61440
61456
|
material_Box_Box,
|
|
61441
61457
|
{ sx: { p: 3 } },
|
|
@@ -61515,13 +61531,21 @@ DynamicDrawer_TabPanel.propTypes = {
|
|
|
61515
61531
|
styles: prop_types_default.a.object
|
|
61516
61532
|
};
|
|
61517
61533
|
|
|
61518
|
-
var DynamicDrawer_PaperComponent = function
|
|
61534
|
+
var DynamicDrawer_PaperComponent = react_default.a.forwardRef(function (_ref, ref) {
|
|
61519
61535
|
var _cx;
|
|
61520
61536
|
|
|
61537
|
+
var label = _ref.label,
|
|
61538
|
+
selected = _ref.selected,
|
|
61539
|
+
item = _ref.item,
|
|
61540
|
+
tagAccessor = _ref.tagAccessor,
|
|
61541
|
+
tagValueLabel = _ref.tagValueLabel,
|
|
61542
|
+
rest = DynamicDrawer_objectWithoutProperties(_ref, ['label', 'selected', 'item', 'tagAccessor', 'tagValueLabel']);
|
|
61543
|
+
|
|
61544
|
+
var Chip = es_isNil(item.tag) ? src_Tag_Tag : item.tag;
|
|
61521
61545
|
var classes = DynamicDrawer_useStyles();
|
|
61522
61546
|
return react_default.a.createElement(
|
|
61523
61547
|
material_Paper_Paper,
|
|
61524
|
-
|
|
61548
|
+
DynamicDrawer_extends({}, rest, { ref: ref }),
|
|
61525
61549
|
react_default.a.createElement(
|
|
61526
61550
|
material_Box_Box,
|
|
61527
61551
|
{ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } },
|
|
@@ -61530,19 +61554,25 @@ var DynamicDrawer_PaperComponent = function PaperComponent(props) {
|
|
|
61530
61554
|
{
|
|
61531
61555
|
noWrap: true,
|
|
61532
61556
|
variant: 'body2',
|
|
61533
|
-
title:
|
|
61534
|
-
className: classnames_default()(classes.label, (_cx = {}, _cx[classes.labelSelected] =
|
|
61557
|
+
title: label,
|
|
61558
|
+
className: classnames_default()(classes.label, (_cx = {}, _cx[classes.labelSelected] = selected, _cx))
|
|
61535
61559
|
},
|
|
61536
|
-
|
|
61560
|
+
label
|
|
61537
61561
|
),
|
|
61538
|
-
|
|
61562
|
+
es_isNil(item.tag) ? react_default.a.createElement(
|
|
61563
|
+
Chip,
|
|
61564
|
+
{ items: item.values, tagValueLabel: tagValueLabel },
|
|
61565
|
+
DynamicDrawer_getCounter(item.values, tagAccessor)
|
|
61566
|
+
) : item.tag
|
|
61539
61567
|
)
|
|
61540
61568
|
);
|
|
61541
|
-
};
|
|
61569
|
+
});
|
|
61542
61570
|
DynamicDrawer_PaperComponent.propTypes = {
|
|
61543
61571
|
label: prop_types_default.a.string,
|
|
61544
|
-
|
|
61545
|
-
|
|
61572
|
+
selected: prop_types_default.a.bool,
|
|
61573
|
+
item: prop_types_default.a.object,
|
|
61574
|
+
tagAccessor: prop_types_default.a.func,
|
|
61575
|
+
tagValueLabel: prop_types_default.a.func
|
|
61546
61576
|
};
|
|
61547
61577
|
|
|
61548
61578
|
var DynamicDrawer_DynamicDrawer = function DynamicDrawer(props) {
|
|
@@ -61564,22 +61594,6 @@ var DynamicDrawer_DynamicDrawer = function DynamicDrawer(props) {
|
|
|
61564
61594
|
allSelection = _useState4[0],
|
|
61565
61595
|
setAllSelection = _useState4[1];
|
|
61566
61596
|
|
|
61567
|
-
var getCounter = function getCounter(items, tagAccessor) {
|
|
61568
|
-
var selectedItemsIds = es_reduce(function (acc, item) {
|
|
61569
|
-
if (es_prop('isSelected', item)) {
|
|
61570
|
-
return es_append(item.id, acc);
|
|
61571
|
-
}
|
|
61572
|
-
return acc;
|
|
61573
|
-
}, [], items);
|
|
61574
|
-
var itemsIds = es_pluck('id', items);
|
|
61575
|
-
var count = pipe(es_uniq, es_length)(selectedItemsIds);
|
|
61576
|
-
var total = pipe(es_uniq, es_length)(itemsIds);
|
|
61577
|
-
if (es_is(Function, tagAccessor)) {
|
|
61578
|
-
return tagAccessor(count, total);
|
|
61579
|
-
}
|
|
61580
|
-
return count + '/' + total;
|
|
61581
|
-
};
|
|
61582
|
-
|
|
61583
61597
|
var list = props.list,
|
|
61584
61598
|
labelRenderer = props.labelRenderer,
|
|
61585
61599
|
onClick = props.onClick,
|
|
@@ -61691,24 +61705,23 @@ var DynamicDrawer_DynamicDrawer = function DynamicDrawer(props) {
|
|
|
61691
61705
|
es_map(function (item) {
|
|
61692
61706
|
var _cx2;
|
|
61693
61707
|
|
|
61694
|
-
var
|
|
61695
|
-
var tagValueLabel = es_isNil(item.tag) && getCounter(item.values, tagAriaLabel);
|
|
61708
|
+
var tagValueLabel = es_isNil(item.tag) && DynamicDrawer_getCounter(item.values, tagAriaLabel);
|
|
61696
61709
|
|
|
61697
61710
|
return react_default.a.createElement(material_Tab_Tab, {
|
|
61698
61711
|
key: item.id,
|
|
61699
61712
|
id: filter.id,
|
|
61700
61713
|
'data-testid': item.id + '-tab',
|
|
61701
|
-
component: function
|
|
61702
|
-
return DynamicDrawer_PaperComponent
|
|
61714
|
+
component: react_default.a.forwardRef(function TabPaper(tabProps, ref) {
|
|
61715
|
+
return react_default.a.createElement(DynamicDrawer_PaperComponent, DynamicDrawer_extends({
|
|
61716
|
+
ref: ref
|
|
61717
|
+
}, tabProps, {
|
|
61703
61718
|
label: labelRenderer(item),
|
|
61704
61719
|
selected: selectedId === item.id,
|
|
61705
|
-
|
|
61706
|
-
|
|
61707
|
-
|
|
61708
|
-
|
|
61709
|
-
|
|
61710
|
-
}, props));
|
|
61711
|
-
},
|
|
61720
|
+
item: item,
|
|
61721
|
+
tagAccessor: tagAccessor,
|
|
61722
|
+
tagValueLabel: tagValueLabel
|
|
61723
|
+
}));
|
|
61724
|
+
}),
|
|
61712
61725
|
label: labelRenderer(item),
|
|
61713
61726
|
'aria-label': labelRenderer(item),
|
|
61714
61727
|
value: item,
|
|
@@ -61793,7 +61806,7 @@ DynamicDrawer_DynamicDrawer.propTypes = {
|
|
|
61793
61806
|
tagAriaLabel: prop_types_default.a.func,
|
|
61794
61807
|
handleChangePanel: prop_types_default.a.func,
|
|
61795
61808
|
onClosePanel: prop_types_default.a.func,
|
|
61796
|
-
displayChildren: prop_types_default.a.
|
|
61809
|
+
displayChildren: prop_types_default.a.bool,
|
|
61797
61810
|
labels: prop_types_default.a.shape({
|
|
61798
61811
|
placeholder: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.func]),
|
|
61799
61812
|
disableItemLabel: prop_types_default.a.string,
|