@sis-cc/dotstatsuite-visions 10.8.0 → 10.9.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/TableHtml5/TableHtml5.js +11 -6
- package/es/TableHtml5/header.js +3 -3
- package/es/TableHtml5/section.js +9 -7
- package/lib/TableHtml5/TableHtml5.js +11 -6
- package/lib/TableHtml5/header.js +3 -3
- package/lib/TableHtml5/section.js +9 -7
- package/package.json +1 -1
- package/umd/@sis-cc/dotstatsuite-visions.js +27 -20
- package/umd/@sis-cc/dotstatsuite-visions.min.js +3 -3
- package/umd/@sis-cc/dotstatsuite-visions.min.js.map +1 -1
|
@@ -38,12 +38,13 @@ var useStyles = makeStyles(function (theme) {
|
|
|
38
38
|
var mapIndexed = R.addIndex(R.map);
|
|
39
39
|
|
|
40
40
|
export var getEnhancedValuesHeaderData = function getEnhancedValuesHeaderData(data) {
|
|
41
|
-
var colLength = R.pipe(R.
|
|
41
|
+
var colLength = R.pipe(R.last, R.propOr([], 'data'), R.length)(data);
|
|
42
42
|
return R.pipe(R.pluck('data'),
|
|
43
43
|
// mix merge and transpose for performance
|
|
44
44
|
R.reduce(function (acc, cells) {
|
|
45
|
-
R.addIndex(R.forEach)(function (
|
|
46
|
-
var
|
|
45
|
+
R.addIndex(R.forEach)(function (_, rowIndex) {
|
|
46
|
+
var cell = R.nth(rowIndex, cells) || {};
|
|
47
|
+
var cellId = R.has('values', cell) ? R.pipe(R.prop('values'), R.pluck('id'), R.join(','))(cell) : R.pathOr('missing' + rowIndex, ['value', 'id'], cell);
|
|
47
48
|
var topCell = rowIndex > 0 ? R.pipe(R.nth(rowIndex - 1), R.last)(acc) : null;
|
|
48
49
|
var cellKey = R.isNil(topCell) ? cellId : topCell.key + '-' + cellId;
|
|
49
50
|
|
|
@@ -51,9 +52,13 @@ export var getEnhancedValuesHeaderData = function getEnhancedValuesHeaderData(da
|
|
|
51
52
|
if (R.prop('key', leftCell) === cellKey && rowIndex !== colLength - 1) {
|
|
52
53
|
acc = R.over(R.lensIndex(rowIndex), R.over(R.lensIndex(-1), R.evolve({ spanCount: R.add(1) })))(acc);
|
|
53
54
|
} else {
|
|
54
|
-
acc = R.over(R.lensIndex(rowIndex), R.append(_extends({}, R.pick(['value', 'values'], cell), {
|
|
55
|
+
acc = R.over(R.lensIndex(rowIndex), R.append(_extends({}, R.pick(['value', 'values'], cell), {
|
|
56
|
+
key: cellKey,
|
|
57
|
+
spanCount: 1,
|
|
58
|
+
isEmpty: R.isEmpty(cell)
|
|
59
|
+
})))(acc);
|
|
55
60
|
}
|
|
56
|
-
})(
|
|
61
|
+
})(acc);
|
|
57
62
|
return acc;
|
|
58
63
|
}, R.times(R.always([]), colLength)))(data);
|
|
59
64
|
};
|
|
@@ -118,7 +123,7 @@ var TableHtml5 = function TableHtml5(_ref) {
|
|
|
118
123
|
};
|
|
119
124
|
}, []);
|
|
120
125
|
|
|
121
|
-
var xLayoutData = R.pathOr([], [0, 1,
|
|
126
|
+
var xLayoutData = R.pathOr([], [0, 1, -1, 'data'], sectionsData);
|
|
122
127
|
var xLayoutDataLength = R.length(xLayoutData);
|
|
123
128
|
|
|
124
129
|
var _useMemo = useMemo(function () {
|
package/es/TableHtml5/header.js
CHANGED
|
@@ -93,7 +93,7 @@ var Header = function Header(_ref) {
|
|
|
93
93
|
React.createElement(
|
|
94
94
|
Typography,
|
|
95
95
|
{ variant: 'body1', className: classes.cellLabelHeader },
|
|
96
|
-
R.pipe(R.path([
|
|
96
|
+
R.pipe(R.path([-1, 'data', index, 'dimension']), labelAccessor)(headerData),
|
|
97
97
|
React.createElement(Flags, {
|
|
98
98
|
HTMLRenderer: HTMLRenderer,
|
|
99
99
|
flags: flags,
|
|
@@ -106,7 +106,7 @@ var Header = function Header(_ref) {
|
|
|
106
106
|
mapIndexed(function (headerItem, idx) {
|
|
107
107
|
var _cx;
|
|
108
108
|
|
|
109
|
-
var value = getValue(labelAccessor)(headerItem);
|
|
109
|
+
var value = headerItem.isEmpty ? { label: '' } : getValue(labelAccessor)(headerItem);
|
|
110
110
|
var flags = R.propOr([], 'flags', value);
|
|
111
111
|
var hierarchySpace = R.pipe(R.propOr([], 'parents'), R.length, R.times(function () {
|
|
112
112
|
return '·';
|
|
@@ -154,7 +154,7 @@ var Header = function Header(_ref) {
|
|
|
154
154
|
);
|
|
155
155
|
}, R.nth(index, valuesHeaderData))
|
|
156
156
|
);
|
|
157
|
-
}, R.compose(R.length, R.pathOr([], [
|
|
157
|
+
}, R.compose(R.length, R.pathOr([], [-1, 'data']))(headerData));
|
|
158
158
|
};
|
|
159
159
|
|
|
160
160
|
Header.propTypes = process.env.NODE_ENV !== "production" ? {
|
package/es/TableHtml5/section.js
CHANGED
|
@@ -105,7 +105,7 @@ var Section = function Section(_ref) {
|
|
|
105
105
|
HTMLRenderer: HTMLRenderer,
|
|
106
106
|
labelAccessor: labelAccessor
|
|
107
107
|
}),
|
|
108
|
-
|
|
108
|
+
mapIndexed(function (sectionbody, rowIndex) {
|
|
109
109
|
var _cx2;
|
|
110
110
|
|
|
111
111
|
var rowId = sectionbody.key + '_' + sectionIndex + '_' + rowIndex;
|
|
@@ -115,11 +115,12 @@ var Section = function Section(_ref) {
|
|
|
115
115
|
return React.createElement(
|
|
116
116
|
TableRow,
|
|
117
117
|
{ key: rowId },
|
|
118
|
-
|
|
118
|
+
R.times(function (index) {
|
|
119
119
|
var _cx;
|
|
120
120
|
|
|
121
|
-
var
|
|
122
|
-
var
|
|
121
|
+
var cell = R.path(['data', index], sectionbody);
|
|
122
|
+
var value = R.isNil(cell) ? { label: '' } : getValue(labelAccessor)(cell);
|
|
123
|
+
var flags = R.propOr([], 'flags', value);
|
|
123
124
|
var id = rowIndex + '_' + rowId + '_' + index;
|
|
124
125
|
|
|
125
126
|
// special space is used for hierarchy U+2007    
|
|
@@ -133,7 +134,7 @@ var Section = function Section(_ref) {
|
|
|
133
134
|
TableCell,
|
|
134
135
|
{
|
|
135
136
|
key: id,
|
|
136
|
-
className: cx(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.highlight] = R.prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = R.is(Function, isNoWrap) && isNoWrap(R.
|
|
137
|
+
className: cx(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.highlight] = R.prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = R.is(Function, isNoWrap) && isNoWrap(R.propOr({}, 'dimension', cell)), _cx)),
|
|
137
138
|
id: id,
|
|
138
139
|
headers: 'subHeader_' + index + ' ' + currentSection,
|
|
139
140
|
component: 'th',
|
|
@@ -159,7 +160,7 @@ var Section = function Section(_ref) {
|
|
|
159
160
|
)
|
|
160
161
|
)
|
|
161
162
|
);
|
|
162
|
-
}, R.prop('data', sectionbody)),
|
|
163
|
+
}, xLayoutDataLength /*R.prop('data', sectionbody)*/),
|
|
163
164
|
React.createElement(
|
|
164
165
|
TableCell,
|
|
165
166
|
{
|
|
@@ -185,8 +186,9 @@ var Section = function Section(_ref) {
|
|
|
185
186
|
|
|
186
187
|
var intersectionCellId = rowId + '/' + columnIndex;
|
|
187
188
|
var isActive = R.pipe(R.propOr({}, 'intersectionCellId'), R.equals(intersectionCellId))(activeCellIds);
|
|
189
|
+
var missingValLabel = item.isEmpty || sectionbody.isEmpty ? '' : '..';
|
|
188
190
|
return React.createElement(Cell, _extends({}, R.pipe(R.pathOr({ value: null }, [item.key, currentSection, sectionbody.key, 0]), R.over(R.lensProp('value'), function (val) {
|
|
189
|
-
return R.isNil(val) ?
|
|
191
|
+
return R.isNil(val) ? missingValLabel : cellValueAccessor(val);
|
|
190
192
|
}))(cells), {
|
|
191
193
|
key: intersectionCellId,
|
|
192
194
|
headers: rowIds + ' ' + columnIds + ' ' + currentSection,
|
|
@@ -72,12 +72,13 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
72
72
|
var mapIndexed = R.addIndex(R.map);
|
|
73
73
|
|
|
74
74
|
var getEnhancedValuesHeaderData = exports.getEnhancedValuesHeaderData = function getEnhancedValuesHeaderData(data) {
|
|
75
|
-
var colLength = R.pipe(R.
|
|
75
|
+
var colLength = R.pipe(R.last, R.propOr([], 'data'), R.length)(data);
|
|
76
76
|
return R.pipe(R.pluck('data'),
|
|
77
77
|
// mix merge and transpose for performance
|
|
78
78
|
R.reduce(function (acc, cells) {
|
|
79
|
-
R.addIndex(R.forEach)(function (
|
|
80
|
-
var
|
|
79
|
+
R.addIndex(R.forEach)(function (_, rowIndex) {
|
|
80
|
+
var cell = R.nth(rowIndex, cells) || {};
|
|
81
|
+
var cellId = R.has('values', cell) ? R.pipe(R.prop('values'), R.pluck('id'), R.join(','))(cell) : R.pathOr('missing' + rowIndex, ['value', 'id'], cell);
|
|
81
82
|
var topCell = rowIndex > 0 ? R.pipe(R.nth(rowIndex - 1), R.last)(acc) : null;
|
|
82
83
|
var cellKey = R.isNil(topCell) ? cellId : topCell.key + '-' + cellId;
|
|
83
84
|
|
|
@@ -85,9 +86,13 @@ var getEnhancedValuesHeaderData = exports.getEnhancedValuesHeaderData = function
|
|
|
85
86
|
if (R.prop('key', leftCell) === cellKey && rowIndex !== colLength - 1) {
|
|
86
87
|
acc = R.over(R.lensIndex(rowIndex), R.over(R.lensIndex(-1), R.evolve({ spanCount: R.add(1) })))(acc);
|
|
87
88
|
} else {
|
|
88
|
-
acc = R.over(R.lensIndex(rowIndex), R.append(_extends({}, R.pick(['value', 'values'], cell), {
|
|
89
|
+
acc = R.over(R.lensIndex(rowIndex), R.append(_extends({}, R.pick(['value', 'values'], cell), {
|
|
90
|
+
key: cellKey,
|
|
91
|
+
spanCount: 1,
|
|
92
|
+
isEmpty: R.isEmpty(cell)
|
|
93
|
+
})))(acc);
|
|
89
94
|
}
|
|
90
|
-
})(
|
|
95
|
+
})(acc);
|
|
91
96
|
return acc;
|
|
92
97
|
}, R.times(R.always([]), colLength)))(data);
|
|
93
98
|
};
|
|
@@ -152,7 +157,7 @@ var TableHtml5 = function TableHtml5(_ref) {
|
|
|
152
157
|
};
|
|
153
158
|
}, []);
|
|
154
159
|
|
|
155
|
-
var xLayoutData = R.pathOr([], [0, 1,
|
|
160
|
+
var xLayoutData = R.pathOr([], [0, 1, -1, 'data'], sectionsData);
|
|
156
161
|
var xLayoutDataLength = R.length(xLayoutData);
|
|
157
162
|
|
|
158
163
|
var _useMemo = (0, _react.useMemo)(function () {
|
package/lib/TableHtml5/header.js
CHANGED
|
@@ -127,7 +127,7 @@ var Header = function Header(_ref) {
|
|
|
127
127
|
_react2.default.createElement(
|
|
128
128
|
_Typography2.default,
|
|
129
129
|
{ variant: 'body1', className: classes.cellLabelHeader },
|
|
130
|
-
R.pipe(R.path([
|
|
130
|
+
R.pipe(R.path([-1, 'data', index, 'dimension']), labelAccessor)(headerData),
|
|
131
131
|
_react2.default.createElement(_flags2.default, {
|
|
132
132
|
HTMLRenderer: HTMLRenderer,
|
|
133
133
|
flags: flags,
|
|
@@ -140,7 +140,7 @@ var Header = function Header(_ref) {
|
|
|
140
140
|
mapIndexed(function (headerItem, idx) {
|
|
141
141
|
var _cx;
|
|
142
142
|
|
|
143
|
-
var value = (0, _utils2.getValue)(labelAccessor)(headerItem);
|
|
143
|
+
var value = headerItem.isEmpty ? { label: '' } : (0, _utils2.getValue)(labelAccessor)(headerItem);
|
|
144
144
|
var flags = R.propOr([], 'flags', value);
|
|
145
145
|
var hierarchySpace = R.pipe(R.propOr([], 'parents'), R.length, R.times(function () {
|
|
146
146
|
return '·';
|
|
@@ -188,7 +188,7 @@ var Header = function Header(_ref) {
|
|
|
188
188
|
);
|
|
189
189
|
}, R.nth(index, valuesHeaderData))
|
|
190
190
|
);
|
|
191
|
-
}, R.compose(R.length, R.pathOr([], [
|
|
191
|
+
}, R.compose(R.length, R.pathOr([], [-1, 'data']))(headerData));
|
|
192
192
|
};
|
|
193
193
|
|
|
194
194
|
Header.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -147,7 +147,7 @@ var Section = function Section(_ref) {
|
|
|
147
147
|
HTMLRenderer: HTMLRenderer,
|
|
148
148
|
labelAccessor: labelAccessor
|
|
149
149
|
}),
|
|
150
|
-
|
|
150
|
+
mapIndexed(function (sectionbody, rowIndex) {
|
|
151
151
|
var _cx2;
|
|
152
152
|
|
|
153
153
|
var rowId = sectionbody.key + '_' + sectionIndex + '_' + rowIndex;
|
|
@@ -157,11 +157,12 @@ var Section = function Section(_ref) {
|
|
|
157
157
|
return _react2.default.createElement(
|
|
158
158
|
_TableRow2.default,
|
|
159
159
|
{ key: rowId },
|
|
160
|
-
|
|
160
|
+
R.times(function (index) {
|
|
161
161
|
var _cx;
|
|
162
162
|
|
|
163
|
-
var
|
|
164
|
-
var
|
|
163
|
+
var cell = R.path(['data', index], sectionbody);
|
|
164
|
+
var value = R.isNil(cell) ? { label: '' } : (0, _utils2.getValue)(labelAccessor)(cell);
|
|
165
|
+
var flags = R.propOr([], 'flags', value);
|
|
165
166
|
var id = rowIndex + '_' + rowId + '_' + index;
|
|
166
167
|
|
|
167
168
|
// special space is used for hierarchy U+2007    
|
|
@@ -175,7 +176,7 @@ var Section = function Section(_ref) {
|
|
|
175
176
|
_TableCell2.default,
|
|
176
177
|
{
|
|
177
178
|
key: id,
|
|
178
|
-
className: (0, _classnames2.default)(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.highlight] = R.prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = R.is(Function, isNoWrap) && isNoWrap(R.
|
|
179
|
+
className: (0, _classnames2.default)(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.highlight] = R.prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = R.is(Function, isNoWrap) && isNoWrap(R.propOr({}, 'dimension', cell)), _cx)),
|
|
179
180
|
id: id,
|
|
180
181
|
headers: 'subHeader_' + index + ' ' + currentSection,
|
|
181
182
|
component: 'th',
|
|
@@ -201,7 +202,7 @@ var Section = function Section(_ref) {
|
|
|
201
202
|
)
|
|
202
203
|
)
|
|
203
204
|
);
|
|
204
|
-
}, R.prop('data', sectionbody)),
|
|
205
|
+
}, xLayoutDataLength /*R.prop('data', sectionbody)*/),
|
|
205
206
|
_react2.default.createElement(
|
|
206
207
|
_TableCell2.default,
|
|
207
208
|
{
|
|
@@ -227,8 +228,9 @@ var Section = function Section(_ref) {
|
|
|
227
228
|
|
|
228
229
|
var intersectionCellId = rowId + '/' + columnIndex;
|
|
229
230
|
var isActive = R.pipe(R.propOr({}, 'intersectionCellId'), R.equals(intersectionCellId))(activeCellIds);
|
|
231
|
+
var missingValLabel = item.isEmpty || sectionbody.isEmpty ? '' : '..';
|
|
230
232
|
return _react2.default.createElement(_cell2.default, _extends({}, R.pipe(R.pathOr({ value: null }, [item.key, currentSection, sectionbody.key, 0]), R.over(R.lensProp('value'), function (val) {
|
|
231
|
-
return R.isNil(val) ?
|
|
233
|
+
return R.isNil(val) ? missingValLabel : cellValueAccessor(val);
|
|
232
234
|
}))(cells), {
|
|
233
235
|
key: intersectionCellId,
|
|
234
236
|
headers: rowIds + ' ' + columnIds + ' ' + currentSection,
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @sis-cc/dotstatsuite-visions v10.
|
|
2
|
+
* @sis-cc/dotstatsuite-visions v10.9.0 - https://visions-qa.siscc.org/#o
|
|
3
3
|
* MIT Licensed
|
|
4
4
|
*/
|
|
5
5
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -6699,7 +6699,7 @@ function removeClassName(el
|
|
|
6699
6699
|
/* 121 */
|
|
6700
6700
|
/***/ (function(module) {
|
|
6701
6701
|
|
|
6702
|
-
module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"10.
|
|
6702
|
+
module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"10.9.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":">=14"},"files":["css","es","lib","umd"],"scripts":{"build":"nwb build-react-component --copy-files --no-demo && node scripts/doc && nwb build-demo","build:dev":"nwb build-react-component --copy-files --no-demo","clean":"nwb clean-module && nwb clean-demo","prepublishOnly":"npm run build","start":"nwb serve-react-demo","test":"jest","test:watch":"jest --watch --no-cache","lint":"eslint src/ --color","precommit":"lint-staged"},"dependencies":{"@react-hook/size":"^2.1.1","classnames":"^2.2.6","date-fns":"^1.30.1","isemail":"^3.2.0","numeral":"^2.0.6","prop-types":"^15.7.2","ramda":"^0.27.0","react-beautiful-dnd":"^13.0.0","react-draggable":"^4.4.5","react-error-boundary":"^4.0.10","react-virtualized":"^9.21.2"},"peerDependencies":{"@material-ui/core":"^4","@material-ui/icons":"^4","@sis-cc/dotstatsuite-sdmxjs":"^8.x","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","@material-ui/core":"^4","@material-ui/icons":"^4","@sis-cc/dotstatsuite-sdmxjs":"*","@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","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","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":"^18","react-a11y":"^1.1.0","react-dom":"^18","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"}};
|
|
6703
6703
|
|
|
6704
6704
|
/***/ }),
|
|
6705
6705
|
/* 122 */
|
|
@@ -50119,7 +50119,7 @@ _curry1(function lensIndex(n) {
|
|
|
50119
50119
|
* const greet = R.replace('{name}', R.__, 'Hello, {name}!');
|
|
50120
50120
|
* greet('Alice'); //=> 'Hello, Alice!'
|
|
50121
50121
|
*/
|
|
50122
|
-
/* harmony default export */ var
|
|
50122
|
+
/* harmony default export */ var es_ = ({
|
|
50123
50123
|
'@@functional/placeholder': true
|
|
50124
50124
|
});
|
|
50125
50125
|
// CONCATENATED MODULE: ./node_modules/ramda/es/times.js
|
|
@@ -51446,7 +51446,7 @@ var PeriodPicker_Period = function Period(_ref) {
|
|
|
51446
51446
|
var fn = es_prop(getter)({ start: es_head, end: es_last });
|
|
51447
51447
|
var lensIndex = es_prop(getter)({ start: es_lensIndex(0), end: es_lensIndex(1) });
|
|
51448
51448
|
var dateValue = getPeriodValue(fn(destructuringDates));
|
|
51449
|
-
var selectedValue = es_ifElse(isValidNumber, es_assoc(id,
|
|
51449
|
+
var selectedValue = es_ifElse(isValidNumber, es_assoc(id, es_, {}), es_always(undefined))(Number(value));
|
|
51450
51450
|
var newDate = lib_getDate(frequency, dateValue, selectedValue, getter === 'end');
|
|
51451
51451
|
if (es_is(Function, changePeriod)) {
|
|
51452
51452
|
return changePeriod(pipe(es_set(lensIndex, newDate), function (_ref2) {
|
|
@@ -53722,7 +53722,7 @@ var header_Header = function Header(_ref) {
|
|
|
53722
53722
|
react_default.a.createElement(
|
|
53723
53723
|
esm_Typography_Typography,
|
|
53724
53724
|
{ variant: 'body1', className: classes.cellLabelHeader },
|
|
53725
|
-
pipe(es_path([
|
|
53725
|
+
pipe(es_path([-1, 'data', index, 'dimension']), labelAccessor)(headerData),
|
|
53726
53726
|
react_default.a.createElement(TableHtml5_flags, {
|
|
53727
53727
|
HTMLRenderer: HTMLRenderer,
|
|
53728
53728
|
flags: flags,
|
|
@@ -53735,7 +53735,7 @@ var header_Header = function Header(_ref) {
|
|
|
53735
53735
|
header_mapIndexed(function (headerItem, idx) {
|
|
53736
53736
|
var _cx;
|
|
53737
53737
|
|
|
53738
|
-
var value = TableHtml5_utils_getValue(labelAccessor)(headerItem);
|
|
53738
|
+
var value = headerItem.isEmpty ? { label: '' } : TableHtml5_utils_getValue(labelAccessor)(headerItem);
|
|
53739
53739
|
var flags = es_propOr([], 'flags', value);
|
|
53740
53740
|
var hierarchySpace = pipe(es_propOr([], 'parents'), es_length, es_times(function () {
|
|
53741
53741
|
return '·';
|
|
@@ -53783,7 +53783,7 @@ var header_Header = function Header(_ref) {
|
|
|
53783
53783
|
);
|
|
53784
53784
|
}, es_nth(index, valuesHeaderData))
|
|
53785
53785
|
);
|
|
53786
|
-
}, compose(es_length, es_pathOr([], [
|
|
53786
|
+
}, compose(es_length, es_pathOr([], [-1, 'data']))(headerData));
|
|
53787
53787
|
};
|
|
53788
53788
|
|
|
53789
53789
|
header_Header.propTypes = {
|
|
@@ -54397,7 +54397,7 @@ var section_Section = function Section(_ref) {
|
|
|
54397
54397
|
HTMLRenderer: HTMLRenderer,
|
|
54398
54398
|
labelAccessor: labelAccessor
|
|
54399
54399
|
}),
|
|
54400
|
-
|
|
54400
|
+
section_mapIndexed(function (sectionbody, rowIndex) {
|
|
54401
54401
|
var _cx2;
|
|
54402
54402
|
|
|
54403
54403
|
var rowId = sectionbody.key + '_' + sectionIndex + '_' + rowIndex;
|
|
@@ -54407,11 +54407,12 @@ var section_Section = function Section(_ref) {
|
|
|
54407
54407
|
return react_default.a.createElement(
|
|
54408
54408
|
esm_TableRow_TableRow,
|
|
54409
54409
|
{ key: rowId },
|
|
54410
|
-
|
|
54410
|
+
es_times(function (index) {
|
|
54411
54411
|
var _cx;
|
|
54412
54412
|
|
|
54413
|
-
var
|
|
54414
|
-
var
|
|
54413
|
+
var cell = es_path(['data', index], sectionbody);
|
|
54414
|
+
var value = es_isNil(cell) ? { label: '' } : TableHtml5_utils_getValue(labelAccessor)(cell);
|
|
54415
|
+
var flags = es_propOr([], 'flags', value);
|
|
54415
54416
|
var id = rowIndex + '_' + rowId + '_' + index;
|
|
54416
54417
|
|
|
54417
54418
|
// special space is used for hierarchy U+2007    
|
|
@@ -54425,7 +54426,7 @@ var section_Section = function Section(_ref) {
|
|
|
54425
54426
|
esm_TableCell_TableCell,
|
|
54426
54427
|
{
|
|
54427
54428
|
key: id,
|
|
54428
|
-
className: classnames_default()(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.highlight] = es_prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = es_is(Function, isNoWrap) && isNoWrap(
|
|
54429
|
+
className: classnames_default()(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.highlight] = es_prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = es_is(Function, isNoWrap) && isNoWrap(es_propOr({}, 'dimension', cell)), _cx)),
|
|
54429
54430
|
id: id,
|
|
54430
54431
|
headers: 'subHeader_' + index + ' ' + currentSection,
|
|
54431
54432
|
component: 'th',
|
|
@@ -54451,7 +54452,7 @@ var section_Section = function Section(_ref) {
|
|
|
54451
54452
|
)
|
|
54452
54453
|
)
|
|
54453
54454
|
);
|
|
54454
|
-
},
|
|
54455
|
+
}, xLayoutDataLength /*R.prop('data', sectionbody)*/),
|
|
54455
54456
|
react_default.a.createElement(
|
|
54456
54457
|
esm_TableCell_TableCell,
|
|
54457
54458
|
{
|
|
@@ -54477,8 +54478,9 @@ var section_Section = function Section(_ref) {
|
|
|
54477
54478
|
|
|
54478
54479
|
var intersectionCellId = rowId + '/' + columnIndex;
|
|
54479
54480
|
var isActive = pipe(es_propOr({}, 'intersectionCellId'), es_equals(intersectionCellId))(activeCellIds);
|
|
54481
|
+
var missingValLabel = item.isEmpty || sectionbody.isEmpty ? '' : '..';
|
|
54480
54482
|
return react_default.a.createElement(TableHtml5_cell, section_extends({}, pipe(es_pathOr({ value: null }, [item.key, currentSection, sectionbody.key, 0]), es_over(es_lensProp('value'), function (val) {
|
|
54481
|
-
return es_isNil(val) ?
|
|
54483
|
+
return es_isNil(val) ? missingValLabel : cellValueAccessor(val);
|
|
54482
54484
|
}))(cells), {
|
|
54483
54485
|
key: intersectionCellId,
|
|
54484
54486
|
headers: rowIds + ' ' + columnIds + ' ' + currentSection,
|
|
@@ -54565,12 +54567,13 @@ var TableHtml5_useStyles = styles_makeStyles(function (theme) {
|
|
|
54565
54567
|
var TableHtml5_mapIndexed = es_addIndex(es_map);
|
|
54566
54568
|
|
|
54567
54569
|
var TableHtml5_getEnhancedValuesHeaderData = function getEnhancedValuesHeaderData(data) {
|
|
54568
|
-
var colLength = pipe(
|
|
54570
|
+
var colLength = pipe(es_last, es_propOr([], 'data'), es_length)(data);
|
|
54569
54571
|
return pipe(es_pluck('data'),
|
|
54570
54572
|
// mix merge and transpose for performance
|
|
54571
54573
|
es_reduce(function (acc, cells) {
|
|
54572
|
-
es_addIndex(es_forEach)(function (
|
|
54573
|
-
var
|
|
54574
|
+
es_addIndex(es_forEach)(function (_, rowIndex) {
|
|
54575
|
+
var cell = es_nth(rowIndex, cells) || {};
|
|
54576
|
+
var cellId = es_has('values', cell) ? pipe(es_prop('values'), es_pluck('id'), es_join(','))(cell) : es_pathOr('missing' + rowIndex, ['value', 'id'], cell);
|
|
54574
54577
|
var topCell = rowIndex > 0 ? pipe(es_nth(rowIndex - 1), es_last)(acc) : null;
|
|
54575
54578
|
var cellKey = es_isNil(topCell) ? cellId : topCell.key + '-' + cellId;
|
|
54576
54579
|
|
|
@@ -54578,9 +54581,13 @@ var TableHtml5_getEnhancedValuesHeaderData = function getEnhancedValuesHeaderDat
|
|
|
54578
54581
|
if (es_prop('key', leftCell) === cellKey && rowIndex !== colLength - 1) {
|
|
54579
54582
|
acc = es_over(es_lensIndex(rowIndex), es_over(es_lensIndex(-1), es_evolve({ spanCount: es_add(1) })))(acc);
|
|
54580
54583
|
} else {
|
|
54581
|
-
acc = es_over(es_lensIndex(rowIndex), es_append(TableHtml5_extends({}, es_pick(['value', 'values'], cell), {
|
|
54584
|
+
acc = es_over(es_lensIndex(rowIndex), es_append(TableHtml5_extends({}, es_pick(['value', 'values'], cell), {
|
|
54585
|
+
key: cellKey,
|
|
54586
|
+
spanCount: 1,
|
|
54587
|
+
isEmpty: es_isEmpty(cell)
|
|
54588
|
+
})))(acc);
|
|
54582
54589
|
}
|
|
54583
|
-
})(
|
|
54590
|
+
})(acc);
|
|
54584
54591
|
return acc;
|
|
54585
54592
|
}, es_times(es_always([]), colLength)))(data);
|
|
54586
54593
|
};
|
|
@@ -54645,7 +54652,7 @@ var TableHtml5_TableHtml5 = function TableHtml5(_ref) {
|
|
|
54645
54652
|
};
|
|
54646
54653
|
}, []);
|
|
54647
54654
|
|
|
54648
|
-
var xLayoutData = es_pathOr([], [0, 1,
|
|
54655
|
+
var xLayoutData = es_pathOr([], [0, 1, -1, 'data'], sectionsData);
|
|
54649
54656
|
var xLayoutDataLength = es_length(xLayoutData);
|
|
54650
54657
|
|
|
54651
54658
|
var _useMemo = Object(react["useMemo"])(function () {
|