@sis-cc/dotstatsuite-visions 12.46.0 → 12.48.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/AdvancedFilterDialog/AdvancedFilterDialog.js +2 -1
- package/es/CollapseButtons/CollapseButtons.js +53 -93
- package/es/HierarchicalFilter/HierarchicalFilter.js +2 -1
- package/lib/AdvancedFilterDialog/AdvancedFilterDialog.js +2 -1
- package/lib/CollapseButtons/CollapseButtons.js +52 -95
- package/lib/HierarchicalFilter/HierarchicalFilter.js +2 -1
- package/package.json +1 -1
- package/umd/@sis-cc/dotstatsuite-visions.js +93 -131
- package/umd/@sis-cc/dotstatsuite-visions.min.js +12 -12
- package/umd/@sis-cc/dotstatsuite-visions.min.js.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @sis-cc/dotstatsuite-visions v12.
|
|
2
|
+
* @sis-cc/dotstatsuite-visions v12.48.0 - https://visions-qa.siscc.org/#o
|
|
3
3
|
* MIT Licensed
|
|
4
4
|
*/
|
|
5
5
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -8865,7 +8865,7 @@ if (true) {
|
|
|
8865
8865
|
/* 158 */
|
|
8866
8866
|
/***/ (function(module) {
|
|
8867
8867
|
|
|
8868
|
-
module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"12.
|
|
8868
|
+
module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"12.48.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/prop-types":"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"}};
|
|
8869
8869
|
|
|
8870
8870
|
/***/ }),
|
|
8871
8871
|
/* 159 */
|
|
@@ -52606,41 +52606,6 @@ DeleteChip_DeleteChip.propTypes = {
|
|
|
52606
52606
|
|
|
52607
52607
|
|
|
52608
52608
|
|
|
52609
|
-
// CONCATENATED MODULE: ./node_modules/ramda/es/compose.js
|
|
52610
|
-
|
|
52611
|
-
|
|
52612
|
-
/**
|
|
52613
|
-
* Performs right-to-left function composition. The last argument may have
|
|
52614
|
-
* any arity; the remaining arguments must be unary.
|
|
52615
|
-
*
|
|
52616
|
-
* **Note:** The result of compose is not automatically curried.
|
|
52617
|
-
*
|
|
52618
|
-
* @func
|
|
52619
|
-
* @memberOf R
|
|
52620
|
-
* @since v0.1.0
|
|
52621
|
-
* @category Function
|
|
52622
|
-
* @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z)
|
|
52623
|
-
* @param {...Function} ...functions The functions to compose
|
|
52624
|
-
* @return {Function}
|
|
52625
|
-
* @see R.pipe
|
|
52626
|
-
* @example
|
|
52627
|
-
*
|
|
52628
|
-
* const classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName
|
|
52629
|
-
* const yellGreeting = R.compose(R.toUpper, classyGreeting);
|
|
52630
|
-
* yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND"
|
|
52631
|
-
*
|
|
52632
|
-
* R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7
|
|
52633
|
-
*
|
|
52634
|
-
* @symb R.compose(f, g, h)(a, b) = f(g(h(a, b)))
|
|
52635
|
-
*/
|
|
52636
|
-
|
|
52637
|
-
function compose() {
|
|
52638
|
-
if (arguments.length === 0) {
|
|
52639
|
-
throw new Error('compose requires at least one argument');
|
|
52640
|
-
}
|
|
52641
|
-
|
|
52642
|
-
return pipe.apply(this, es_reverse(arguments));
|
|
52643
|
-
}
|
|
52644
52609
|
// CONCATENATED MODULE: ./node_modules/@mui/system/esm/useMediaQuery/useMediaQuery.js
|
|
52645
52610
|
'use client';
|
|
52646
52611
|
|
|
@@ -53510,7 +53475,6 @@ var CollapseButtons_extends = Object.assign || function (target) { for (var i =
|
|
|
53510
53475
|
|
|
53511
53476
|
|
|
53512
53477
|
|
|
53513
|
-
|
|
53514
53478
|
var MAX_COLUMNS = 12;
|
|
53515
53479
|
var COLUMNS = [12, 12, 6, 4, 3, 3, 2, 2, 2, 2, 2, 2, 1];
|
|
53516
53480
|
|
|
@@ -53559,30 +53523,47 @@ var CollapseButtons_CollapseButtons = function CollapseButtons(props) {
|
|
|
53559
53523
|
var classes = CollapseButtons_useStyles();
|
|
53560
53524
|
var isMobileView = useMediaQuery(breakpoint);
|
|
53561
53525
|
|
|
53562
|
-
var _useState = Object(react["useState"])(),
|
|
53526
|
+
var _useState = Object(react["useState"])(props.selectedItemId),
|
|
53563
53527
|
toggleId = _useState[0],
|
|
53564
53528
|
setIsOpen = _useState[1];
|
|
53565
53529
|
|
|
53566
|
-
|
|
53567
|
-
var
|
|
53568
|
-
|
|
53569
|
-
|
|
53570
|
-
|
|
53571
|
-
|
|
53572
|
-
|
|
53573
|
-
|
|
53574
|
-
|
|
53575
|
-
|
|
53576
|
-
|
|
53577
|
-
|
|
53578
|
-
|
|
53579
|
-
|
|
53580
|
-
|
|
53581
|
-
|
|
53582
|
-
|
|
53583
|
-
|
|
53584
|
-
|
|
53530
|
+
var collapseFactory = function collapseFactory(_ref) {
|
|
53531
|
+
var action = _ref.action,
|
|
53532
|
+
isSecondLevelClikable = _ref.isSecondLevelClikable,
|
|
53533
|
+
labelAccessor = _ref.labelAccessor,
|
|
53534
|
+
testId = _ref.testId;
|
|
53535
|
+
return function (_ref2) {
|
|
53536
|
+
var toggleId = _ref2.toggleId,
|
|
53537
|
+
id = _ref2.id,
|
|
53538
|
+
values = _ref2.values,
|
|
53539
|
+
isMobileView = _ref2.isMobileView;
|
|
53540
|
+
return react_default.a.createElement(
|
|
53541
|
+
material_Collapse_Collapse,
|
|
53542
|
+
{
|
|
53543
|
+
'in': toggleId === id,
|
|
53544
|
+
timeout: 'auto',
|
|
53545
|
+
unmountOnExit: true,
|
|
53546
|
+
className: classes.collapseContainer
|
|
53547
|
+
},
|
|
53548
|
+
react_default.a.createElement(
|
|
53549
|
+
CollapseButtons_Paper,
|
|
53550
|
+
{ elevation: 10, isMobileView: isMobileView },
|
|
53551
|
+
es_map(function (item) {
|
|
53552
|
+
return react_default.a.createElement(CollapseButtons_Item, {
|
|
53553
|
+
key: es_prop('id')(item),
|
|
53554
|
+
testId: testId + '_' + id + '_value_' + es_prop('id')(item),
|
|
53555
|
+
parentId: id,
|
|
53556
|
+
item: item,
|
|
53557
|
+
action: action,
|
|
53558
|
+
isSecondLevelClikable: isSecondLevelClikable,
|
|
53559
|
+
labelAccessor: labelAccessor
|
|
53560
|
+
});
|
|
53561
|
+
}, values)
|
|
53562
|
+
)
|
|
53563
|
+
);
|
|
53564
|
+
};
|
|
53585
53565
|
};
|
|
53566
|
+
var collapse = collapseFactory({ action: action, isSecondLevelClikable: isSecondLevelClikable, labelAccessor: labelAccessor, testId: testId });
|
|
53586
53567
|
|
|
53587
53568
|
return react_default.a.createElement(
|
|
53588
53569
|
material_Grid_Grid,
|
|
@@ -53594,11 +53575,11 @@ var CollapseButtons_CollapseButtons = function CollapseButtons(props) {
|
|
|
53594
53575
|
className: classnames_default()((_cx = {}, _cx[classes.container] = accessibility, _cx)),
|
|
53595
53576
|
tabIndex: 0
|
|
53596
53577
|
},
|
|
53597
|
-
es_map(function (
|
|
53598
|
-
var id =
|
|
53599
|
-
label =
|
|
53600
|
-
|
|
53601
|
-
values =
|
|
53578
|
+
es_map(function (_ref3) {
|
|
53579
|
+
var id = _ref3.id,
|
|
53580
|
+
label = _ref3.label,
|
|
53581
|
+
_ref3$values = _ref3.values,
|
|
53582
|
+
values = _ref3$values === undefined ? [] : _ref3$values;
|
|
53602
53583
|
return react_default.a.createElement(
|
|
53603
53584
|
material_Grid_Grid,
|
|
53604
53585
|
CollapseButtons_extends({ item: true, xs: 12, sm: 12, md: es_nth(nbColumns)(COLUMNS) }, gridButtonsProps, { key: id }),
|
|
@@ -53608,83 +53589,27 @@ var CollapseButtons_CollapseButtons = function CollapseButtons(props) {
|
|
|
53608
53589
|
react_default.a.createElement(src_ToggleButton_ToggleButton, {
|
|
53609
53590
|
textTransform: textTransform,
|
|
53610
53591
|
label: label,
|
|
53611
|
-
tabIndex:
|
|
53612
|
-
isOpen:
|
|
53592
|
+
tabIndex: toggleId ? 1 : 0,
|
|
53593
|
+
isOpen: toggleId === id,
|
|
53613
53594
|
toggle: function toggle() {
|
|
53614
|
-
|
|
53615
|
-
|
|
53616
|
-
return setIsOpen((_setIsOpen2 = {}, _setIsOpen2[id] = !es_prop(id)(toggleId), _setIsOpen2));
|
|
53595
|
+
return setIsOpen(id === toggleId ? null : id);
|
|
53617
53596
|
},
|
|
53618
53597
|
testId: testId + '_' + id,
|
|
53619
53598
|
id: id
|
|
53620
53599
|
}),
|
|
53621
|
-
isMobileView &&
|
|
53622
|
-
material_Collapse_Collapse,
|
|
53623
|
-
{
|
|
53624
|
-
'in': es_prop(id)(toggleId),
|
|
53625
|
-
timeout: 'auto',
|
|
53626
|
-
unmountOnExit: true,
|
|
53627
|
-
className: classes.collapseContainer
|
|
53628
|
-
},
|
|
53629
|
-
react_default.a.createElement(
|
|
53630
|
-
CollapseButtons_Paper,
|
|
53631
|
-
{ elevation: 10, isMobileView: isMobileView },
|
|
53632
|
-
getValues(id)(values)
|
|
53633
|
-
)
|
|
53634
|
-
)
|
|
53600
|
+
isMobileView && collapse({ toggleId: toggleId, id: id, values: values, isMobileView: isMobileView })
|
|
53635
53601
|
)
|
|
53636
53602
|
);
|
|
53637
53603
|
})(items),
|
|
53638
|
-
!isMobileView && es_map(function (
|
|
53639
|
-
var id =
|
|
53640
|
-
|
|
53641
|
-
values =
|
|
53642
|
-
return
|
|
53643
|
-
|
|
53644
|
-
{
|
|
53645
|
-
'in': es_prop(id)(toggleId),
|
|
53646
|
-
timeout: 'auto',
|
|
53647
|
-
unmountOnExit: true,
|
|
53648
|
-
key: id,
|
|
53649
|
-
className: classes.collapseContainer
|
|
53650
|
-
},
|
|
53651
|
-
react_default.a.createElement(
|
|
53652
|
-
CollapseButtons_Paper,
|
|
53653
|
-
{ elevation: 10 },
|
|
53654
|
-
getValues(id)(values)
|
|
53655
|
-
)
|
|
53656
|
-
);
|
|
53657
|
-
})(items)
|
|
53604
|
+
!isMobileView && es_map(function (_ref4) {
|
|
53605
|
+
var id = _ref4.id,
|
|
53606
|
+
_ref4$values = _ref4.values,
|
|
53607
|
+
values = _ref4$values === undefined ? [] : _ref4$values;
|
|
53608
|
+
return collapse({ toggleId: toggleId, id: id, values: values, isMobileView: isMobileView });
|
|
53609
|
+
}, items)
|
|
53658
53610
|
);
|
|
53659
53611
|
};
|
|
53660
53612
|
|
|
53661
|
-
CollapseButtons_CollapseButtons.propTypes = {
|
|
53662
|
-
testId: prop_types_default.a.string,
|
|
53663
|
-
selectedItemId: prop_types_default.a.string,
|
|
53664
|
-
items: prop_types_default.a.arrayOf(prop_types_default.a.shape({
|
|
53665
|
-
id: prop_types_default.a.string.isRequired,
|
|
53666
|
-
label: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.element]),
|
|
53667
|
-
svgPath: prop_types_default.a.string,
|
|
53668
|
-
values: prop_types_default.a.arrayOf(prop_types_default.a.shape({
|
|
53669
|
-
id: prop_types_default.a.string.isRequired,
|
|
53670
|
-
label: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.element]),
|
|
53671
|
-
subtopics: prop_types_default.a.arrayOf(prop_types_default.a.oneOfType([prop_types_default.a.shape({
|
|
53672
|
-
id: prop_types_default.a.string.isRequired,
|
|
53673
|
-
label: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.element])
|
|
53674
|
-
}), prop_types_default.a.string]))
|
|
53675
|
-
}))
|
|
53676
|
-
})),
|
|
53677
|
-
action: prop_types_default.a.func,
|
|
53678
|
-
nbColumns: prop_types_default.a.number,
|
|
53679
|
-
isSecondLevelClikable: prop_types_default.a.bool,
|
|
53680
|
-
breakpoint: prop_types_default.a.func,
|
|
53681
|
-
gridButtonsProps: prop_types_default.a.object,
|
|
53682
|
-
justify: prop_types_default.a.string,
|
|
53683
|
-
textTransform: prop_types_default.a.string,
|
|
53684
|
-
labelAccessor: prop_types_default.a.func,
|
|
53685
|
-
accessibility: prop_types_default.a.bool
|
|
53686
|
-
};
|
|
53687
|
-
|
|
53688
53613
|
/* harmony default export */ var src_CollapseButtons_CollapseButtons = (CollapseButtons_CollapseButtons);
|
|
53689
53614
|
// CONCATENATED MODULE: ./src/CollapseButtons/index.js
|
|
53690
53615
|
/**
|
|
@@ -67502,6 +67427,41 @@ const Table_Table = /*#__PURE__*/react["forwardRef"](function Table(inProps, ref
|
|
|
67502
67427
|
});
|
|
67503
67428
|
false ? undefined : void 0;
|
|
67504
67429
|
/* harmony default export */ var material_Table_Table = (Table_Table);
|
|
67430
|
+
// CONCATENATED MODULE: ./node_modules/ramda/es/compose.js
|
|
67431
|
+
|
|
67432
|
+
|
|
67433
|
+
/**
|
|
67434
|
+
* Performs right-to-left function composition. The last argument may have
|
|
67435
|
+
* any arity; the remaining arguments must be unary.
|
|
67436
|
+
*
|
|
67437
|
+
* **Note:** The result of compose is not automatically curried.
|
|
67438
|
+
*
|
|
67439
|
+
* @func
|
|
67440
|
+
* @memberOf R
|
|
67441
|
+
* @since v0.1.0
|
|
67442
|
+
* @category Function
|
|
67443
|
+
* @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z)
|
|
67444
|
+
* @param {...Function} ...functions The functions to compose
|
|
67445
|
+
* @return {Function}
|
|
67446
|
+
* @see R.pipe
|
|
67447
|
+
* @example
|
|
67448
|
+
*
|
|
67449
|
+
* const classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName
|
|
67450
|
+
* const yellGreeting = R.compose(R.toUpper, classyGreeting);
|
|
67451
|
+
* yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND"
|
|
67452
|
+
*
|
|
67453
|
+
* R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7
|
|
67454
|
+
*
|
|
67455
|
+
* @symb R.compose(f, g, h)(a, b) = f(g(h(a, b)))
|
|
67456
|
+
*/
|
|
67457
|
+
|
|
67458
|
+
function compose() {
|
|
67459
|
+
if (arguments.length === 0) {
|
|
67460
|
+
throw new Error('compose requires at least one argument');
|
|
67461
|
+
}
|
|
67462
|
+
|
|
67463
|
+
return pipe.apply(this, es_reverse(arguments));
|
|
67464
|
+
}
|
|
67505
67465
|
// CONCATENATED MODULE: ./node_modules/@mui/material/Table/Tablelvl2Context.js
|
|
67506
67466
|
|
|
67507
67467
|
|
|
@@ -83836,7 +83796,8 @@ var AdvancedFilterDialog_AdvancedFilterDialog = function AdvancedFilterDialog(pr
|
|
|
83836
83796
|
term: spotlight.term,
|
|
83837
83797
|
hasCommit: false,
|
|
83838
83798
|
spotlight: { fields: {} },
|
|
83839
|
-
action: setSpotlight
|
|
83799
|
+
action: setSpotlight,
|
|
83800
|
+
labels: labels
|
|
83840
83801
|
})
|
|
83841
83802
|
),
|
|
83842
83803
|
react_default.a.createElement(
|
|
@@ -84102,7 +84063,8 @@ var HierarchicalFilter_HierarchicalFilter = function HierarchicalFilter(props) {
|
|
|
84102
84063
|
term: spotlight.term,
|
|
84103
84064
|
hasCommit: false,
|
|
84104
84065
|
spotlight: { fields: {} },
|
|
84105
|
-
action: setSpotlight
|
|
84066
|
+
action: setSpotlight,
|
|
84067
|
+
labels: labels
|
|
84106
84068
|
}),
|
|
84107
84069
|
es_is(Function, toggleBulk) && hasSpotlight && react_default.a.createElement(
|
|
84108
84070
|
src_Tooltip_Tooltip,
|