@sis-cc/dotstatsuite-visions 8.6.0 → 8.7.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.
|
@@ -79,6 +79,7 @@ var TableHtml5 = function TableHtml5(_ref) {
|
|
|
79
79
|
cellValueAccessor = _ref$cellValueAccesso === undefined ? R.identity : _ref$cellValueAccesso,
|
|
80
80
|
_ref$labelAccessor = _ref.labelAccessor,
|
|
81
81
|
labelAccessor = _ref$labelAccessor === undefined ? defaultLabelAccessor : _ref$labelAccessor,
|
|
82
|
+
textAlign = _ref.textAlign,
|
|
82
83
|
_ref$isNoWrap = _ref.isNoWrap,
|
|
83
84
|
isNoWrap = _ref$isNoWrap === undefined ? R.always(false) : _ref$isNoWrap;
|
|
84
85
|
|
|
@@ -134,7 +135,8 @@ var TableHtml5 = function TableHtml5(_ref) {
|
|
|
134
135
|
labelAccessor: labelAccessor
|
|
135
136
|
}, R.pathOr({}, ['', '', '', 0], cells), {
|
|
136
137
|
cellHandler: cellHandler,
|
|
137
|
-
isOne: true
|
|
138
|
+
isOne: true,
|
|
139
|
+
textAlign: textAlign
|
|
138
140
|
}));
|
|
139
141
|
|
|
140
142
|
return React.createElement(
|
|
@@ -180,7 +182,8 @@ var TableHtml5 = function TableHtml5(_ref) {
|
|
|
180
182
|
HTMLRenderer: HTMLRenderer,
|
|
181
183
|
cellValueAccessor: cellValueAccessorHandler,
|
|
182
184
|
labelAccessor: labelAccessor,
|
|
183
|
-
isNoWrap: isNoWrap
|
|
185
|
+
isNoWrap: isNoWrap,
|
|
186
|
+
textAlign: textAlign
|
|
184
187
|
});
|
|
185
188
|
}, sectionsData)
|
|
186
189
|
);
|
|
@@ -198,7 +201,8 @@ TableHtml5.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
198
201
|
HTMLRenderer: PropTypes.func,
|
|
199
202
|
labelAccessor: PropTypes.func,
|
|
200
203
|
cellValueAccessor: PropTypes.func,
|
|
201
|
-
isNoWrap: PropTypes.func
|
|
204
|
+
isNoWrap: PropTypes.func,
|
|
205
|
+
textAlign: PropTypes.string
|
|
202
206
|
} : {};
|
|
203
207
|
|
|
204
208
|
export default TableHtml5;
|
package/es/TableHtml5/cell.js
CHANGED
|
@@ -63,7 +63,8 @@ var Cell = function Cell(_ref) {
|
|
|
63
63
|
sideProps = _ref.sideProps,
|
|
64
64
|
SideIcon = _ref.SideIcon,
|
|
65
65
|
HTMLRenderer = _ref.HTMLRenderer,
|
|
66
|
-
labelAccessor = _ref.labelAccessor
|
|
66
|
+
labelAccessor = _ref.labelAccessor,
|
|
67
|
+
textAlign = _ref.textAlign;
|
|
67
68
|
|
|
68
69
|
var classes = useStyles();
|
|
69
70
|
var isRtl = getIsRtl(useTheme());
|
|
@@ -86,12 +87,13 @@ var Cell = function Cell(_ref) {
|
|
|
86
87
|
return React.createElement(
|
|
87
88
|
TableCell,
|
|
88
89
|
{
|
|
89
|
-
align: isValidNumber(intValue) ? 'right' :
|
|
90
|
+
align: isValidNumber(intValue) ? 'right' : textAlign,
|
|
90
91
|
component: isOne ? 'div' : undefined,
|
|
91
|
-
className: cx(classes.cell, (_cx = {}, _cx[classes.oneCell] = isOne, _cx[classes.active] = isActive, _cx[classes.highlight] = isHighlight, _cx[classes.rightAlign] = isRtl, _cx)),
|
|
92
|
+
className: cx(classes.cell, (_cx = {}, _cx[classes.oneCell] = isOne, _cx[classes.active] = isActive, _cx[classes.highlight] = isHighlight, _cx[classes.rightAlign] = isRtl && R.isNil(textAlign), _cx)),
|
|
92
93
|
headers: headers,
|
|
93
94
|
onClick: activeCellHandler,
|
|
94
|
-
tabIndex: 0
|
|
95
|
+
tabIndex: 0,
|
|
96
|
+
style: { textAlign: textAlign }
|
|
95
97
|
},
|
|
96
98
|
!R.isNil(SideIcon) && React.createElement(SideIcon, { sideProps: sideProps, className: classes.value }),
|
|
97
99
|
hasFlag && React.createElement(Flags, { HTMLRenderer: HTMLRenderer, flags: flags, labelAccessor: labelAccessor }),
|
|
@@ -113,7 +115,8 @@ Cell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
113
115
|
sideProps: PropTypes.object,
|
|
114
116
|
SideIcon: PropTypes.func,
|
|
115
117
|
HTMLRenderer: PropTypes.func,
|
|
116
|
-
labelAccessor: PropTypes.func
|
|
118
|
+
labelAccessor: PropTypes.func,
|
|
119
|
+
textAlign: PropTypes.string
|
|
117
120
|
} : {};
|
|
118
121
|
|
|
119
122
|
export default Cell;
|
package/es/TableHtml5/section.js
CHANGED
|
@@ -81,7 +81,8 @@ var Section = function Section(_ref) {
|
|
|
81
81
|
HTMLRenderer = _ref.HTMLRenderer,
|
|
82
82
|
labelAccessor = _ref.labelAccessor,
|
|
83
83
|
cellValueAccessor = _ref.cellValueAccessor,
|
|
84
|
-
isNoWrap = _ref.isNoWrap
|
|
84
|
+
isNoWrap = _ref.isNoWrap,
|
|
85
|
+
textAlign = _ref.textAlign;
|
|
85
86
|
|
|
86
87
|
var classes = useStyles();
|
|
87
88
|
var currentSection = R.path([0, 'key'], section);
|
|
@@ -131,7 +132,7 @@ var Section = function Section(_ref) {
|
|
|
131
132
|
TableCell,
|
|
132
133
|
{
|
|
133
134
|
key: id,
|
|
134
|
-
className: cx(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.topCell] = R.not(R.isEmpty(flags)), _cx[classes.highlight] = R.prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = isNoWrap(R.prop('dimension', cell)), _cx)),
|
|
135
|
+
className: cx(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.topCell] = R.not(R.isEmpty(flags)), _cx[classes.highlight] = R.prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = R.is(Function, isNoWrap) && isNoWrap(R.prop('dimension', cell)), _cx)),
|
|
135
136
|
id: id,
|
|
136
137
|
headers: 'subHeader_' + index + ' ' + currentSection,
|
|
137
138
|
component: 'th',
|
|
@@ -193,6 +194,7 @@ var Section = function Section(_ref) {
|
|
|
193
194
|
labelAccessor: labelAccessor,
|
|
194
195
|
SideIcon: SideIcon,
|
|
195
196
|
isActive: isActive,
|
|
197
|
+
textAlign: textAlign,
|
|
196
198
|
isHighlight: R.any(R.identity)([R.prop(rowId)(activeCellIds), R.prop(columnIndex)(activeCellIds)]),
|
|
197
199
|
activeCellHandler: R.is(Function)(activeCellHandler) ? function () {
|
|
198
200
|
var _activeCellHandler;
|
|
@@ -224,7 +226,8 @@ Section.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
224
226
|
HTMLRenderer: PropTypes.func,
|
|
225
227
|
labelAccessor: PropTypes.func,
|
|
226
228
|
cellValueAccessor: PropTypes.func,
|
|
227
|
-
isNoWrap: PropTypes.func
|
|
229
|
+
isNoWrap: PropTypes.func,
|
|
230
|
+
textAlign: PropTypes.string
|
|
228
231
|
} : {};
|
|
229
232
|
|
|
230
233
|
export default memo(Section);
|
|
@@ -113,6 +113,7 @@ var TableHtml5 = function TableHtml5(_ref) {
|
|
|
113
113
|
cellValueAccessor = _ref$cellValueAccesso === undefined ? R.identity : _ref$cellValueAccesso,
|
|
114
114
|
_ref$labelAccessor = _ref.labelAccessor,
|
|
115
115
|
labelAccessor = _ref$labelAccessor === undefined ? _utils.defaultLabelAccessor : _ref$labelAccessor,
|
|
116
|
+
textAlign = _ref.textAlign,
|
|
116
117
|
_ref$isNoWrap = _ref.isNoWrap,
|
|
117
118
|
isNoWrap = _ref$isNoWrap === undefined ? R.always(false) : _ref$isNoWrap;
|
|
118
119
|
|
|
@@ -168,7 +169,8 @@ var TableHtml5 = function TableHtml5(_ref) {
|
|
|
168
169
|
labelAccessor: labelAccessor
|
|
169
170
|
}, R.pathOr({}, ['', '', '', 0], cells), {
|
|
170
171
|
cellHandler: cellHandler,
|
|
171
|
-
isOne: true
|
|
172
|
+
isOne: true,
|
|
173
|
+
textAlign: textAlign
|
|
172
174
|
}));
|
|
173
175
|
|
|
174
176
|
return _react2.default.createElement(
|
|
@@ -214,7 +216,8 @@ var TableHtml5 = function TableHtml5(_ref) {
|
|
|
214
216
|
HTMLRenderer: HTMLRenderer,
|
|
215
217
|
cellValueAccessor: cellValueAccessorHandler,
|
|
216
218
|
labelAccessor: labelAccessor,
|
|
217
|
-
isNoWrap: isNoWrap
|
|
219
|
+
isNoWrap: isNoWrap,
|
|
220
|
+
textAlign: textAlign
|
|
218
221
|
});
|
|
219
222
|
}, sectionsData)
|
|
220
223
|
);
|
|
@@ -232,7 +235,8 @@ TableHtml5.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
232
235
|
HTMLRenderer: _propTypes2.default.func,
|
|
233
236
|
labelAccessor: _propTypes2.default.func,
|
|
234
237
|
cellValueAccessor: _propTypes2.default.func,
|
|
235
|
-
isNoWrap: _propTypes2.default.func
|
|
238
|
+
isNoWrap: _propTypes2.default.func,
|
|
239
|
+
textAlign: _propTypes2.default.string
|
|
236
240
|
} : {};
|
|
237
241
|
|
|
238
242
|
exports.default = TableHtml5;
|
package/lib/TableHtml5/cell.js
CHANGED
|
@@ -93,7 +93,8 @@ var Cell = function Cell(_ref) {
|
|
|
93
93
|
sideProps = _ref.sideProps,
|
|
94
94
|
SideIcon = _ref.SideIcon,
|
|
95
95
|
HTMLRenderer = _ref.HTMLRenderer,
|
|
96
|
-
labelAccessor = _ref.labelAccessor
|
|
96
|
+
labelAccessor = _ref.labelAccessor,
|
|
97
|
+
textAlign = _ref.textAlign;
|
|
97
98
|
|
|
98
99
|
var classes = useStyles();
|
|
99
100
|
var isRtl = (0, _utils.getIsRtl)((0, _styles.useTheme)());
|
|
@@ -116,12 +117,13 @@ var Cell = function Cell(_ref) {
|
|
|
116
117
|
return _react2.default.createElement(
|
|
117
118
|
_TableCell2.default,
|
|
118
119
|
{
|
|
119
|
-
align: isValidNumber(intValue) ? 'right' :
|
|
120
|
+
align: isValidNumber(intValue) ? 'right' : textAlign,
|
|
120
121
|
component: isOne ? 'div' : undefined,
|
|
121
|
-
className: (0, _classnames2.default)(classes.cell, (_cx = {}, _cx[classes.oneCell] = isOne, _cx[classes.active] = isActive, _cx[classes.highlight] = isHighlight, _cx[classes.rightAlign] = isRtl, _cx)),
|
|
122
|
+
className: (0, _classnames2.default)(classes.cell, (_cx = {}, _cx[classes.oneCell] = isOne, _cx[classes.active] = isActive, _cx[classes.highlight] = isHighlight, _cx[classes.rightAlign] = isRtl && R.isNil(textAlign), _cx)),
|
|
122
123
|
headers: headers,
|
|
123
124
|
onClick: activeCellHandler,
|
|
124
|
-
tabIndex: 0
|
|
125
|
+
tabIndex: 0,
|
|
126
|
+
style: { textAlign: textAlign }
|
|
125
127
|
},
|
|
126
128
|
!R.isNil(SideIcon) && _react2.default.createElement(SideIcon, { sideProps: sideProps, className: classes.value }),
|
|
127
129
|
hasFlag && _react2.default.createElement(_flags2.default, { HTMLRenderer: HTMLRenderer, flags: flags, labelAccessor: labelAccessor }),
|
|
@@ -143,7 +145,8 @@ Cell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
143
145
|
sideProps: _propTypes2.default.object,
|
|
144
146
|
SideIcon: _propTypes2.default.func,
|
|
145
147
|
HTMLRenderer: _propTypes2.default.func,
|
|
146
|
-
labelAccessor: _propTypes2.default.func
|
|
148
|
+
labelAccessor: _propTypes2.default.func,
|
|
149
|
+
textAlign: _propTypes2.default.string
|
|
147
150
|
} : {};
|
|
148
151
|
|
|
149
152
|
exports.default = Cell;
|
|
@@ -123,7 +123,8 @@ var Section = function Section(_ref) {
|
|
|
123
123
|
HTMLRenderer = _ref.HTMLRenderer,
|
|
124
124
|
labelAccessor = _ref.labelAccessor,
|
|
125
125
|
cellValueAccessor = _ref.cellValueAccessor,
|
|
126
|
-
isNoWrap = _ref.isNoWrap
|
|
126
|
+
isNoWrap = _ref.isNoWrap,
|
|
127
|
+
textAlign = _ref.textAlign;
|
|
127
128
|
|
|
128
129
|
var classes = useStyles();
|
|
129
130
|
var currentSection = R.path([0, 'key'], section);
|
|
@@ -173,7 +174,7 @@ var Section = function Section(_ref) {
|
|
|
173
174
|
_TableCell2.default,
|
|
174
175
|
{
|
|
175
176
|
key: id,
|
|
176
|
-
className: (0, _classnames2.default)(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.topCell] = R.not(R.isEmpty(flags)), _cx[classes.highlight] = R.prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = isNoWrap(R.prop('dimension', cell)), _cx)),
|
|
177
|
+
className: (0, _classnames2.default)(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.topCell] = R.not(R.isEmpty(flags)), _cx[classes.highlight] = R.prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = R.is(Function, isNoWrap) && isNoWrap(R.prop('dimension', cell)), _cx)),
|
|
177
178
|
id: id,
|
|
178
179
|
headers: 'subHeader_' + index + ' ' + currentSection,
|
|
179
180
|
component: 'th',
|
|
@@ -235,6 +236,7 @@ var Section = function Section(_ref) {
|
|
|
235
236
|
labelAccessor: labelAccessor,
|
|
236
237
|
SideIcon: SideIcon,
|
|
237
238
|
isActive: isActive,
|
|
239
|
+
textAlign: textAlign,
|
|
238
240
|
isHighlight: R.any(R.identity)([R.prop(rowId)(activeCellIds), R.prop(columnIndex)(activeCellIds)]),
|
|
239
241
|
activeCellHandler: R.is(Function)(activeCellHandler) ? function () {
|
|
240
242
|
var _activeCellHandler;
|
|
@@ -266,7 +268,8 @@ Section.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
266
268
|
HTMLRenderer: _propTypes2.default.func,
|
|
267
269
|
labelAccessor: _propTypes2.default.func,
|
|
268
270
|
cellValueAccessor: _propTypes2.default.func,
|
|
269
|
-
isNoWrap: _propTypes2.default.func
|
|
271
|
+
isNoWrap: _propTypes2.default.func,
|
|
272
|
+
textAlign: _propTypes2.default.string
|
|
270
273
|
} : {};
|
|
271
274
|
|
|
272
275
|
exports.default = (0, _react.memo)(Section);
|