@majoo-ui/react 1.59.3-rc.8 → 1.59.4-rc.1
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/components/table/Table.d.ts +4 -0
- package/index.esm.js +22 -9
- package/index.umd.js +23 -9
- package/package.json +2 -2
|
@@ -1323,6 +1323,10 @@ export interface TableColumnProps {
|
|
|
1323
1323
|
* If true, the column will be rendered on the expanded row.
|
|
1324
1324
|
*/
|
|
1325
1325
|
isSubRow?: boolean;
|
|
1326
|
+
/**
|
|
1327
|
+
* If true, the subrow column will be custom rendered.
|
|
1328
|
+
*/
|
|
1329
|
+
isCustomSubRow?: boolean;
|
|
1326
1330
|
/**
|
|
1327
1331
|
* If false, the column will be sortable.
|
|
1328
1332
|
*/
|
package/index.esm.js
CHANGED
|
@@ -9977,7 +9977,7 @@ var NumberFormat = /*@__PURE__*/function (superclass) {
|
|
|
9977
9977
|
}(React__default.Component);
|
|
9978
9978
|
NumberFormat.defaultProps = defaultProps;
|
|
9979
9979
|
|
|
9980
|
-
const _excluded$i = ["placeholder", "value", "size", "isInvalid", "readOnly", "disabled", "control", "name"];
|
|
9980
|
+
const _excluded$i = ["placeholder", "value", "size", "isInvalid", "readOnly", "disabled", "control", "name", "maxValueLength", "maxLength", "thousandSeparator"];
|
|
9981
9981
|
var _jsxFileName$G = "/home/alfiantryp/Projects/majoo-ui/packages/react/src/components/form/components/InputNumber/InputNumber.js";
|
|
9982
9982
|
const StyledInput = styled(NumberFormat, {
|
|
9983
9983
|
// Reset
|
|
@@ -10151,6 +10151,14 @@ const StyledInput = styled(NumberFormat, {
|
|
|
10151
10151
|
size: 'lg'
|
|
10152
10152
|
}
|
|
10153
10153
|
});
|
|
10154
|
+
function countThousandSeparatorsByLength(numberLength) {
|
|
10155
|
+
const separatorCount = Math.floor((numberLength - 1) / 3);
|
|
10156
|
+
return separatorCount;
|
|
10157
|
+
}
|
|
10158
|
+
function getMaxValueLength(maxValue, prefix = '', suffix = '', thousandSeparator) {
|
|
10159
|
+
const tsLength = thousandSeparator ? countThousandSeparatorsByLength(maxValue) : 0;
|
|
10160
|
+
return maxValue + (prefix == null ? void 0 : prefix.length) + (suffix == null ? void 0 : suffix.length) + tsLength;
|
|
10161
|
+
}
|
|
10154
10162
|
const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
10155
10163
|
let {
|
|
10156
10164
|
placeholder,
|
|
@@ -10160,7 +10168,10 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
10160
10168
|
readOnly,
|
|
10161
10169
|
disabled,
|
|
10162
10170
|
control,
|
|
10163
|
-
name
|
|
10171
|
+
name,
|
|
10172
|
+
maxValueLength,
|
|
10173
|
+
maxLength,
|
|
10174
|
+
thousandSeparator
|
|
10164
10175
|
} = _ref,
|
|
10165
10176
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
10166
10177
|
return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
|
|
@@ -10181,14 +10192,14 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
10181
10192
|
__self: undefined,
|
|
10182
10193
|
__source: {
|
|
10183
10194
|
fileName: _jsxFileName$G,
|
|
10184
|
-
lineNumber:
|
|
10195
|
+
lineNumber: 225,
|
|
10185
10196
|
columnNumber: 9
|
|
10186
10197
|
}
|
|
10187
10198
|
}),
|
|
10188
10199
|
__self: undefined,
|
|
10189
10200
|
__source: {
|
|
10190
10201
|
fileName: _jsxFileName$G,
|
|
10191
|
-
lineNumber:
|
|
10202
|
+
lineNumber: 222,
|
|
10192
10203
|
columnNumber: 5
|
|
10193
10204
|
}
|
|
10194
10205
|
}, /*#__PURE__*/React__default.createElement(StyledInput, _extends({
|
|
@@ -10199,12 +10210,14 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
10199
10210
|
isInvalid: isInvalid,
|
|
10200
10211
|
readOnly: readOnly,
|
|
10201
10212
|
isReadOnly: readOnly && !(props != null && props.inputGroup) && !(props != null && props.asChild),
|
|
10202
|
-
disabled: disabled
|
|
10213
|
+
disabled: disabled,
|
|
10214
|
+
maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props == null ? void 0 : props.prefix, props == null ? void 0 : props.suffix, thousandSeparator) : maxLength,
|
|
10215
|
+
thousandSeparator: thousandSeparator
|
|
10203
10216
|
}, props, {
|
|
10204
10217
|
__self: undefined,
|
|
10205
10218
|
__source: {
|
|
10206
10219
|
fileName: _jsxFileName$G,
|
|
10207
|
-
lineNumber:
|
|
10220
|
+
lineNumber: 234,
|
|
10208
10221
|
columnNumber: 7
|
|
10209
10222
|
}
|
|
10210
10223
|
})));
|
|
@@ -23402,7 +23415,7 @@ function Table({
|
|
|
23402
23415
|
}), void 0)
|
|
23403
23416
|
}), void 0);
|
|
23404
23417
|
})
|
|
23405
|
-
}), void 0), row.isExpanded ? subRowCells.map((cell, index) => jsxs(TableRow$3, Object.assign({
|
|
23418
|
+
}), void 0), row.isExpanded ? subRowCells.map((cell, index) => !cell.column.isCustomSubRow ? jsxs(TableRow$3, Object.assign({
|
|
23406
23419
|
subRow: true
|
|
23407
23420
|
}, {
|
|
23408
23421
|
children: [leftAddOnCells.map((_, index) => jsx("td", {
|
|
@@ -23440,7 +23453,7 @@ function Table({
|
|
|
23440
23453
|
}), void 0)
|
|
23441
23454
|
}), void 0)]
|
|
23442
23455
|
}, cell.column.id)]
|
|
23443
|
-
}), cell.column.id)) : null, ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row, {
|
|
23456
|
+
}), cell.column.id) : cell.render('Cell')) : null, ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row, {
|
|
23444
23457
|
getCellProps: cellProps => ({
|
|
23445
23458
|
css: Object.assign(Object.assign(Object.assign({}, stickyPositionStyling({
|
|
23446
23459
|
sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
|
|
@@ -23552,7 +23565,7 @@ function Table({
|
|
|
23552
23565
|
}
|
|
23553
23566
|
//Dummy component for mdx docs purpose only
|
|
23554
23567
|
const TableColumn = _a => {
|
|
23555
|
-
__rest(_a, ["id", "Header", "Cell", "isMobileHeader", "isSubRow", "unsortable", "isAction"]);
|
|
23568
|
+
__rest(_a, ["id", "Header", "Cell", "isMobileHeader", "isSubRow", "isCustomSubRow", "unsortable", "isAction"]);
|
|
23556
23569
|
return jsx("div", {}, void 0);
|
|
23557
23570
|
};
|
|
23558
23571
|
|
package/index.umd.js
CHANGED
|
@@ -10057,7 +10057,7 @@
|
|
|
10057
10057
|
}(React__default["default"].Component);
|
|
10058
10058
|
NumberFormat.defaultProps = defaultProps;
|
|
10059
10059
|
|
|
10060
|
-
const _excluded$i = ["placeholder", "value", "size", "isInvalid", "readOnly", "disabled", "control", "name"];
|
|
10060
|
+
const _excluded$i = ["placeholder", "value", "size", "isInvalid", "readOnly", "disabled", "control", "name", "maxValueLength", "maxLength", "thousandSeparator"];
|
|
10061
10061
|
var _jsxFileName$G = "/home/alfiantryp/Projects/majoo-ui/packages/react/src/components/form/components/InputNumber/InputNumber.js";
|
|
10062
10062
|
const StyledInput = styled(NumberFormat, {
|
|
10063
10063
|
// Reset
|
|
@@ -10231,6 +10231,14 @@
|
|
|
10231
10231
|
size: 'lg'
|
|
10232
10232
|
}
|
|
10233
10233
|
});
|
|
10234
|
+
function countThousandSeparatorsByLength(numberLength) {
|
|
10235
|
+
const separatorCount = Math.floor((numberLength - 1) / 3);
|
|
10236
|
+
return separatorCount;
|
|
10237
|
+
}
|
|
10238
|
+
function getMaxValueLength(maxValue, prefix = '', suffix = '', thousandSeparator) {
|
|
10239
|
+
const tsLength = thousandSeparator ? countThousandSeparatorsByLength(maxValue) : 0;
|
|
10240
|
+
return maxValue + (prefix == null ? void 0 : prefix.length) + (suffix == null ? void 0 : suffix.length) + tsLength;
|
|
10241
|
+
}
|
|
10234
10242
|
const InputNumber = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
10235
10243
|
let {
|
|
10236
10244
|
placeholder,
|
|
@@ -10240,7 +10248,10 @@
|
|
|
10240
10248
|
readOnly,
|
|
10241
10249
|
disabled,
|
|
10242
10250
|
control,
|
|
10243
|
-
name
|
|
10251
|
+
name,
|
|
10252
|
+
maxValueLength,
|
|
10253
|
+
maxLength,
|
|
10254
|
+
thousandSeparator
|
|
10244
10255
|
} = _ref,
|
|
10245
10256
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
10246
10257
|
return /*#__PURE__*/React__default["default"].createElement(ConditionalWrapper, {
|
|
@@ -10261,14 +10272,14 @@
|
|
|
10261
10272
|
__self: undefined,
|
|
10262
10273
|
__source: {
|
|
10263
10274
|
fileName: _jsxFileName$G,
|
|
10264
|
-
lineNumber:
|
|
10275
|
+
lineNumber: 225,
|
|
10265
10276
|
columnNumber: 9
|
|
10266
10277
|
}
|
|
10267
10278
|
}),
|
|
10268
10279
|
__self: undefined,
|
|
10269
10280
|
__source: {
|
|
10270
10281
|
fileName: _jsxFileName$G,
|
|
10271
|
-
lineNumber:
|
|
10282
|
+
lineNumber: 222,
|
|
10272
10283
|
columnNumber: 5
|
|
10273
10284
|
}
|
|
10274
10285
|
}, /*#__PURE__*/React__default["default"].createElement(StyledInput, _extends({
|
|
@@ -10279,12 +10290,14 @@
|
|
|
10279
10290
|
isInvalid: isInvalid,
|
|
10280
10291
|
readOnly: readOnly,
|
|
10281
10292
|
isReadOnly: readOnly && !(props != null && props.inputGroup) && !(props != null && props.asChild),
|
|
10282
|
-
disabled: disabled
|
|
10293
|
+
disabled: disabled,
|
|
10294
|
+
maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props == null ? void 0 : props.prefix, props == null ? void 0 : props.suffix, thousandSeparator) : maxLength,
|
|
10295
|
+
thousandSeparator: thousandSeparator
|
|
10283
10296
|
}, props, {
|
|
10284
10297
|
__self: undefined,
|
|
10285
10298
|
__source: {
|
|
10286
10299
|
fileName: _jsxFileName$G,
|
|
10287
|
-
lineNumber:
|
|
10300
|
+
lineNumber: 234,
|
|
10288
10301
|
columnNumber: 7
|
|
10289
10302
|
}
|
|
10290
10303
|
})));
|
|
@@ -23832,7 +23845,7 @@
|
|
|
23832
23845
|
}), void 0);
|
|
23833
23846
|
})
|
|
23834
23847
|
}), void 0), row.isExpanded ? subRowCells.map(function (cell, index) {
|
|
23835
|
-
return jsxRuntime.jsxs(TableRow$3, __assign({
|
|
23848
|
+
return !cell.column.isCustomSubRow ? jsxRuntime.jsxs(TableRow$3, __assign({
|
|
23836
23849
|
subRow: true
|
|
23837
23850
|
}, {
|
|
23838
23851
|
children: [leftAddOnCells.map(function (_, index) {
|
|
@@ -23872,7 +23885,7 @@
|
|
|
23872
23885
|
}), void 0)
|
|
23873
23886
|
}), void 0)]
|
|
23874
23887
|
}, cell.column.id)]
|
|
23875
|
-
}), cell.column.id);
|
|
23888
|
+
}), cell.column.id) : cell.render('Cell');
|
|
23876
23889
|
}) : null, ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row, {
|
|
23877
23890
|
getCellProps: function (cellProps) {
|
|
23878
23891
|
return {
|
|
@@ -23994,9 +24007,10 @@
|
|
|
23994
24007
|
_a.Cell;
|
|
23995
24008
|
_a.isMobileHeader;
|
|
23996
24009
|
_a.isSubRow;
|
|
24010
|
+
_a.isCustomSubRow;
|
|
23997
24011
|
_a.unsortable;
|
|
23998
24012
|
_a.isAction;
|
|
23999
|
-
__rest(_a, ["id", "Header", "Cell", "isMobileHeader", "isSubRow", "unsortable", "isAction"]);
|
|
24013
|
+
__rest(_a, ["id", "Header", "Cell", "isMobileHeader", "isSubRow", "isCustomSubRow", "unsortable", "isAction"]);
|
|
24000
24014
|
return jsxRuntime.jsx("div", {}, void 0);
|
|
24001
24015
|
};
|
|
24002
24016
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@majoo-ui/react",
|
|
3
|
-
"version": "1.59.
|
|
3
|
+
"version": "1.59.4-rc.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@majoo-ui/core": "^1.31.3",
|
|
6
6
|
"@majoo-ui/helpers": "^1.30.5",
|
|
7
|
-
"@majoo-ui/icons": "
|
|
7
|
+
"@majoo-ui/icons": "1.38.23",
|
|
8
8
|
"@stitches/react": "^1.2.8",
|
|
9
9
|
"@radix-ui/react-alert-dialog": "^1.0.0",
|
|
10
10
|
"@radix-ui/react-avatar": "^1.0.0",
|