carbon-addons-iot-react 2.152.0-next.13 → 2.152.0-next.14
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/CHANGELOG.md +18 -0
- package/css/carbon-addons-iot-react.css +8 -3
- package/css/carbon-addons-iot-react.css.map +1 -1
- package/es/components/Card/CardTitle.js +8 -2
- package/es/components/DateTimePicker/DateTimePickerV2WithTimeSpinner.js +3 -3
- package/es/components/DateTimePicker/DateTimePickerV2WithoutTimeSpinner.js +3 -3
- package/es/components/Table/Table.js +7 -17
- package/es/components/Table/TableBody/TableBody.js +5 -16
- package/es/components/Table/TableBody/TableBodyRow/TableBodyRow.js +9 -20
- package/es/components/Table/TableBody/TableBodyRowRenderer.js +5 -16
- package/es/components/Table/TableCellRenderer/TableCellRenderer.js +6 -17
- package/es/components/Table/TableHead/TableHead.js +4 -15
- package/es/constants/SharedPropTypes.js +2 -1
- package/es/hooks/usePopoverPositioning.js +53 -11
- package/lib/components/Card/CardTitle.js +8 -2
- package/lib/components/DateTimePicker/DateTimePickerV2WithTimeSpinner.js +3 -3
- package/lib/components/DateTimePicker/DateTimePickerV2WithoutTimeSpinner.js +3 -3
- package/lib/components/Table/Table.js +7 -17
- package/lib/components/Table/TableBody/TableBody.js +5 -16
- package/lib/components/Table/TableBody/TableBodyRow/TableBodyRow.js +9 -20
- package/lib/components/Table/TableBody/TableBodyRowRenderer.js +5 -16
- package/lib/components/Table/TableCellRenderer/TableCellRenderer.js +6 -17
- package/lib/components/Table/TableHead/TableHead.js +4 -15
- package/lib/constants/SharedPropTypes.js +2 -0
- package/lib/css/carbon-addons-iot-react.css +8 -3
- package/lib/css/carbon-addons-iot-react.css.map +1 -1
- package/lib/hooks/usePopoverPositioning.js +53 -11
- package/lib/scss/components/DateTimePicker/_date-time-pickerv2.scss +4 -4
- package/lib/scss/components/Table/_table.scss +5 -0
- package/package.json +4 -3
- package/scss/components/DateTimePicker/_date-time-pickerv2.scss +4 -4
- package/scss/components/Table/_table.scss +5 -0
- package/umd/carbon-addons-iot-react.js +98 -120
|
@@ -11379,6 +11379,36 @@
|
|
|
11379
11379
|
var L = offLeft ? 'left' : '';
|
|
11380
11380
|
return [T, R, B, L].filter(Boolean).join('-');
|
|
11381
11381
|
};
|
|
11382
|
+
/**
|
|
11383
|
+
* This is used as the callback for menuOffset ONLY on Tooltips. It's needed due to
|
|
11384
|
+
* truncation that might happen on Tooltip trigger, therefore we need to consider
|
|
11385
|
+
* right position of the trigger as well. This function is used as an enhancement for
|
|
11386
|
+
* the isOffscreen method.
|
|
11387
|
+
*
|
|
11388
|
+
* @param {HTMLElement} menuBody The underlying carbon FloatingMenu element
|
|
11389
|
+
* @param {string} menuDirection The direction prop
|
|
11390
|
+
* @param {HTMLElement} menuButton The button triggering the menu
|
|
11391
|
+
* @returns {string} 'start', 'center' or 'end'
|
|
11392
|
+
*/
|
|
11393
|
+
|
|
11394
|
+
|
|
11395
|
+
var getTooltipAlignment = function getTooltipAlignment(menuBody, menuDirection, menuButton) {
|
|
11396
|
+
var buttonRect = menuButton.getBoundingClientRect();
|
|
11397
|
+
var tooltipRect = menuBody.getBoundingClientRect();
|
|
11398
|
+
var windowWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
11399
|
+
var triggerCenter = (buttonRect.left + buttonRect.right) / 2;
|
|
11400
|
+
var tooltipCenter = tooltipRect.width / 2;
|
|
11401
|
+
|
|
11402
|
+
if (triggerCenter - tooltipCenter < 0) {
|
|
11403
|
+
return 'start';
|
|
11404
|
+
}
|
|
11405
|
+
|
|
11406
|
+
if (triggerCenter + tooltipCenter > windowWidth) {
|
|
11407
|
+
return 'end';
|
|
11408
|
+
}
|
|
11409
|
+
|
|
11410
|
+
return 'center';
|
|
11411
|
+
};
|
|
11382
11412
|
/**
|
|
11383
11413
|
* Given a subset of props from the Tooltip, OverflowMenu, or FlyoutMenu. This hook returns a decorator
|
|
11384
11414
|
* function around the original menuOffset function. It determines if the element overflows using that
|
|
@@ -11396,22 +11426,29 @@
|
|
|
11396
11426
|
_ref$isOverflowMenu = _ref.isOverflowMenu,
|
|
11397
11427
|
isOverflowMenu = _ref$isOverflowMenu === void 0 ? false : _ref$isOverflowMenu,
|
|
11398
11428
|
_ref$useAutoPositioni = _ref.useAutoPositioning,
|
|
11399
|
-
useAutoPositioning = _ref$useAutoPositioni === void 0 ? true : _ref$useAutoPositioni
|
|
11429
|
+
useAutoPositioning = _ref$useAutoPositioni === void 0 ? true : _ref$useAutoPositioni,
|
|
11430
|
+
_ref$defaultAlignment = _ref.defaultAlignment,
|
|
11431
|
+
defaultAlignment = _ref$defaultAlignment === void 0 ? 'center' : _ref$defaultAlignment;
|
|
11400
11432
|
|
|
11401
11433
|
var _React$useState = React__namespace.useState(),
|
|
11402
11434
|
_React$useState2 = slicedToArray$2(_React$useState, 2),
|
|
11403
11435
|
adjustedDirection = _React$useState2[0],
|
|
11404
11436
|
setAdjustedDirection = _React$useState2[1];
|
|
11405
11437
|
|
|
11406
|
-
var _React$useState3 = React__namespace.useState(),
|
|
11438
|
+
var _React$useState3 = React__namespace.useState(defaultAlignment),
|
|
11407
11439
|
_React$useState4 = slicedToArray$2(_React$useState3, 2),
|
|
11408
|
-
|
|
11409
|
-
|
|
11440
|
+
adjustedAlignment = _React$useState4[0],
|
|
11441
|
+
setAdjustedAlignment = _React$useState4[1];
|
|
11410
11442
|
|
|
11411
|
-
var _React$useState5 = React__namespace.useState(
|
|
11443
|
+
var _React$useState5 = React__namespace.useState(),
|
|
11412
11444
|
_React$useState6 = slicedToArray$2(_React$useState5, 2),
|
|
11413
|
-
|
|
11414
|
-
|
|
11445
|
+
adjustedFlipped = _React$useState6[0],
|
|
11446
|
+
setAdjustedFlipped = _React$useState6[1];
|
|
11447
|
+
|
|
11448
|
+
var _React$useState7 = React__namespace.useState({}),
|
|
11449
|
+
_React$useState8 = slicedToArray$2(_React$useState7, 2),
|
|
11450
|
+
flyoutAlignment = _React$useState8[0].flyoutAlignment,
|
|
11451
|
+
setDirections = _React$useState8[1];
|
|
11415
11452
|
|
|
11416
11453
|
var previousDirection = React__namespace.useRef();
|
|
11417
11454
|
var langDir = useLangDirection_2();
|
|
@@ -11509,10 +11546,12 @@
|
|
|
11509
11546
|
* be adjusted to `right-start`.
|
|
11510
11547
|
*/
|
|
11511
11548
|
|
|
11512
|
-
var fixOverflow = React__namespace.useCallback(function (overflow, menuOffsetArgs) {
|
|
11549
|
+
var fixOverflow = React__namespace.useCallback(function (overflow, menuOffsetArgs, alignment) {
|
|
11513
11550
|
var _menuOffsetArgs = slicedToArray$2(menuOffsetArgs, 1),
|
|
11514
11551
|
tooltipElement = _menuOffsetArgs[0];
|
|
11515
11552
|
|
|
11553
|
+
setAdjustedAlignment(alignment);
|
|
11554
|
+
|
|
11516
11555
|
switch (overflow) {
|
|
11517
11556
|
case 'top':
|
|
11518
11557
|
if (flyoutAlignment) {
|
|
@@ -11639,7 +11678,9 @@
|
|
|
11639
11678
|
} // determine if the element is off-screen.
|
|
11640
11679
|
|
|
11641
11680
|
|
|
11642
|
-
var overflow = isOffscreen.apply(void 0, args.concat([defaultOffset])); // if
|
|
11681
|
+
var overflow = isOffscreen.apply(void 0, args.concat([defaultOffset])); // determine if the element has new alignment
|
|
11682
|
+
|
|
11683
|
+
var alignment = getTooltipAlignment.apply(void 0, args); // if it's offscreen in a direction we can fix, do so
|
|
11643
11684
|
// otherwise leave it be. ie. 'top-left' is fixable, but
|
|
11644
11685
|
// a large element with 'top-right-left' wouldn't be.
|
|
11645
11686
|
|
|
@@ -11652,7 +11693,7 @@
|
|
|
11652
11693
|
case 'right':
|
|
11653
11694
|
case 'bottom':
|
|
11654
11695
|
case 'left':
|
|
11655
|
-
return fixOverflow(overflow, [].concat(args));
|
|
11696
|
+
return fixOverflow(overflow, [].concat(args), alignment);
|
|
11656
11697
|
|
|
11657
11698
|
default:
|
|
11658
11699
|
return defaultOffset;
|
|
@@ -11666,7 +11707,8 @@
|
|
|
11666
11707
|
|
|
11667
11708
|
return [calculateMenuOffset, {
|
|
11668
11709
|
adjustedDirection: adjustedDirection,
|
|
11669
|
-
adjustedFlipped: adjustedFlipped
|
|
11710
|
+
adjustedFlipped: adjustedFlipped,
|
|
11711
|
+
adjustedAlignment: adjustedAlignment
|
|
11670
11712
|
}];
|
|
11671
11713
|
};
|
|
11672
11714
|
|
|
@@ -19842,6 +19884,7 @@
|
|
|
19842
19884
|
var HtmlElementRefProp = PropTypes__default['default'].oneOfType([PropTypes__default['default'].func, PropTypes__default['default'].shape({
|
|
19843
19885
|
current: PropTypes__default['default'].oneOfType([PropTypes__default['default'].object])
|
|
19844
19886
|
})]);
|
|
19887
|
+
var WrapCellTextPropTypes = PropTypes__default['default'].oneOf(['always', 'never', 'auto', 'alwaysTruncate', 'expand']);
|
|
19845
19888
|
|
|
19846
19889
|
var bundledIconNames = ['caretUp', 'caretDown', 'edit', 'close', 'checkmark', 'warning', 'arrowUp', 'arrowDown', 'user', 'info', 'help'];
|
|
19847
19890
|
var icons = {
|
|
@@ -24117,7 +24160,7 @@
|
|
|
24117
24160
|
var iotPrefix$2g = settings$1.iotPrefix;
|
|
24118
24161
|
var propTypes$2n = {
|
|
24119
24162
|
children: PropTypes__default['default'].oneOfType([PropTypes__default['default'].node, PropTypes__default['default'].bool, PropTypes__default['default'].object, PropTypes__default['default'].array]),
|
|
24120
|
-
wrapText:
|
|
24163
|
+
wrapText: WrapCellTextPropTypes.isRequired,
|
|
24121
24164
|
truncateCellText: PropTypes__default['default'].bool.isRequired,
|
|
24122
24165
|
allowTooltip: PropTypes__default['default'].bool,
|
|
24123
24166
|
|
|
@@ -24178,7 +24221,7 @@
|
|
|
24178
24221
|
filterFunction = _ref.filterFunction,
|
|
24179
24222
|
preserveCellWhiteSpace = _ref.preserveCellWhiteSpace;
|
|
24180
24223
|
var mySpanRef = /*#__PURE__*/React__default['default'].createRef();
|
|
24181
|
-
var myClasses = classnames$1((_classnames = {}, defineProperty$d(_classnames, "".concat(iotPrefix$2g, "--table__cell-text--truncate"), wrapText !== 'always' && truncateCellText), defineProperty$d(_classnames, "".concat(iotPrefix$2g, "--table__cell-text--no-wrap"), wrapText === 'never'), defineProperty$d(_classnames, "".concat(iotPrefix$2g, "--table__cell-text--preserve"), preserveCellWhiteSpace), _classnames));
|
|
24224
|
+
var myClasses = classnames$1((_classnames = {}, defineProperty$d(_classnames, "".concat(iotPrefix$2g, "--table__cell-text--truncate"), wrapText !== 'always' && truncateCellText), defineProperty$d(_classnames, "".concat(iotPrefix$2g, "--table__cell-text--no-wrap"), wrapText === 'never' || wrapText === 'expand'), defineProperty$d(_classnames, "".concat(iotPrefix$2g, "--table__cell-text--preserve"), preserveCellWhiteSpace), _classnames));
|
|
24182
24225
|
|
|
24183
24226
|
var _useState = React$1.useState(false),
|
|
24184
24227
|
_useState2 = slicedToArray$2(_useState, 2),
|
|
@@ -24358,22 +24401,10 @@
|
|
|
24358
24401
|
},
|
|
24359
24402
|
"wrapText": {
|
|
24360
24403
|
"type": {
|
|
24361
|
-
"name": "
|
|
24362
|
-
"
|
|
24363
|
-
"value": "'always'",
|
|
24364
|
-
"computed": false
|
|
24365
|
-
}, {
|
|
24366
|
-
"value": "'never'",
|
|
24367
|
-
"computed": false
|
|
24368
|
-
}, {
|
|
24369
|
-
"value": "'auto'",
|
|
24370
|
-
"computed": false
|
|
24371
|
-
}, {
|
|
24372
|
-
"value": "'alwaysTruncate'",
|
|
24373
|
-
"computed": false
|
|
24374
|
-
}]
|
|
24404
|
+
"name": "custom",
|
|
24405
|
+
"raw": "WrapCellTextPropTypes.isRequired"
|
|
24375
24406
|
},
|
|
24376
|
-
"required":
|
|
24407
|
+
"required": false,
|
|
24377
24408
|
"description": ""
|
|
24378
24409
|
},
|
|
24379
24410
|
"truncateCellText": {
|
|
@@ -34993,7 +35024,7 @@
|
|
|
34993
35024
|
/** If the hierarchy only has 1 nested level of children */
|
|
34994
35025
|
hasSingleNestedHierarchy: PropTypes__default['default'].bool
|
|
34995
35026
|
})]),
|
|
34996
|
-
wrapCellText:
|
|
35027
|
+
wrapCellText: WrapCellTextPropTypes.isRequired,
|
|
34997
35028
|
truncateCellText: PropTypes__default['default'].bool.isRequired,
|
|
34998
35029
|
hasMultiSort: PropTypes__default['default'].bool,
|
|
34999
35030
|
useAutoTableLayoutForResize: PropTypes__default['default'].bool,
|
|
@@ -35634,20 +35665,8 @@
|
|
|
35634
35665
|
"required": false
|
|
35635
35666
|
},
|
|
35636
35667
|
"wrapCellText": {
|
|
35637
|
-
"name": "
|
|
35638
|
-
"
|
|
35639
|
-
"value": "'always'",
|
|
35640
|
-
"computed": false
|
|
35641
|
-
}, {
|
|
35642
|
-
"value": "'never'",
|
|
35643
|
-
"computed": false
|
|
35644
|
-
}, {
|
|
35645
|
-
"value": "'auto'",
|
|
35646
|
-
"computed": false
|
|
35647
|
-
}, {
|
|
35648
|
-
"value": "'alwaysTruncate'",
|
|
35649
|
-
"computed": false
|
|
35650
|
-
}],
|
|
35668
|
+
"name": "custom",
|
|
35669
|
+
"raw": "WrapCellTextPropTypes.isRequired",
|
|
35651
35670
|
"required": true
|
|
35652
35671
|
},
|
|
35653
35672
|
"truncateCellText": {
|
|
@@ -41010,7 +41029,7 @@
|
|
|
41010
41029
|
})]),
|
|
41011
41030
|
hasRowActions: PropTypes__default['default'].bool,
|
|
41012
41031
|
shouldExpandOnRowClick: PropTypes__default['default'].bool,
|
|
41013
|
-
wrapCellText:
|
|
41032
|
+
wrapCellText: WrapCellTextPropTypes.isRequired,
|
|
41014
41033
|
truncateCellText: PropTypes__default['default'].bool.isRequired,
|
|
41015
41034
|
|
|
41016
41035
|
/** use white-space: pre; css when true */
|
|
@@ -41132,7 +41151,7 @@
|
|
|
41132
41151
|
};
|
|
41133
41152
|
|
|
41134
41153
|
var TableBodyRow = function TableBodyRow(_ref) {
|
|
41135
|
-
var
|
|
41154
|
+
var _classnames5, _classnames6, _classnames7;
|
|
41136
41155
|
|
|
41137
41156
|
var id = _ref.id,
|
|
41138
41157
|
tableId = _ref.tableId,
|
|
@@ -41258,7 +41277,7 @@
|
|
|
41258
41277
|
className: classnames$1("data-table-".concat(align), (_classnames = {}, defineProperty$d(_classnames, "".concat(iotPrefix$1$, "--table__cell--truncate"), truncateCellText), defineProperty$d(_classnames, "".concat(iotPrefix$1$, "--table__cell--sortable"), sortable), _classnames)),
|
|
41259
41278
|
width: initialColumnWidth
|
|
41260
41279
|
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
41261
|
-
className: "".concat(iotPrefix$1$, "--table__cell__offset"),
|
|
41280
|
+
className: classnames$1("".concat(iotPrefix$1$, "--table__cell__offset"), defineProperty$d({}, "".concat(iotPrefix$1$, "--table__cell__offset__expand"), wrapCellText === 'expand')),
|
|
41262
41281
|
style: {
|
|
41263
41282
|
'--row-nesting-offset': "".concat(offset, "px")
|
|
41264
41283
|
}
|
|
@@ -41346,7 +41365,7 @@
|
|
|
41346
41365
|
}, rowDetails))) : /*#__PURE__*/React__default['default'].createElement(TableExpandRow, {
|
|
41347
41366
|
key: id,
|
|
41348
41367
|
expandHeaderId: "".concat(tableId, "-expand"),
|
|
41349
|
-
className: classnames$1("".concat(iotPrefix$1$, "--expandable-tablerow"), (
|
|
41368
|
+
className: classnames$1("".concat(iotPrefix$1$, "--expandable-tablerow"), (_classnames5 = {}, defineProperty$d(_classnames5, "".concat(iotPrefix$1$, "--expandable-tablerow--parent"), hasRowNesting && (hasRowNesting === null || hasRowNesting === void 0 ? void 0 : hasRowNesting.hasSingleNestedHierarchy) && nestingChildCount > 0), defineProperty$d(_classnames5, "".concat(iotPrefix$1$, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), defineProperty$d(_classnames5, "".concat(iotPrefix$1$, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), defineProperty$d(_classnames5, "".concat(iotPrefix$1$, "--expandable-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), defineProperty$d(_classnames5, "".concat(iotPrefix$1$, "--expandable-tablerow--last-child"), isLastChild), _classnames5)),
|
|
41350
41369
|
"data-row-nesting": hasRowNesting,
|
|
41351
41370
|
"data-child-count": nestingChildCount,
|
|
41352
41371
|
"data-nesting-offset": nestingOffset,
|
|
@@ -41377,7 +41396,7 @@
|
|
|
41377
41396
|
rowId: id,
|
|
41378
41397
|
langDir: langDir
|
|
41379
41398
|
}, tableCells) : hasRowSelection === 'single' && isSelected ? /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableRow, {
|
|
41380
|
-
className: classnames$1("".concat(iotPrefix$1$, "--table__row"), (
|
|
41399
|
+
className: classnames$1("".concat(iotPrefix$1$, "--table__row"), (_classnames6 = {}, defineProperty$d(_classnames6, "".concat(iotPrefix$1$, "--table__row--singly-selected"), isSelected && !useRadioButtonSingleSelect), defineProperty$d(_classnames6, "".concat(iotPrefix$1$, "--table__row--background"), isSelected), _classnames6)),
|
|
41381
41400
|
key: id,
|
|
41382
41401
|
onClick: function onClick() {
|
|
41383
41402
|
if (isSelectable !== false) {
|
|
@@ -41389,7 +41408,7 @@
|
|
|
41389
41408
|
}
|
|
41390
41409
|
}
|
|
41391
41410
|
}, tableCells) : /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableRow, {
|
|
41392
|
-
className: classnames$1("".concat(iotPrefix$1$, "--table__row"), (
|
|
41411
|
+
className: classnames$1("".concat(iotPrefix$1$, "--table__row"), (_classnames7 = {}, defineProperty$d(_classnames7, "".concat(iotPrefix$1$, "--table__row--unselectable"), isSelectable === false), defineProperty$d(_classnames7, "".concat(iotPrefix$1$, "--table__row--selectable"), isSelectable !== false), defineProperty$d(_classnames7, "".concat(iotPrefix$1$, "--table__row--editing"), isEditMode), defineProperty$d(_classnames7, "".concat(iotPrefix$1$, "--table__row--selected"), isSelected), _classnames7)),
|
|
41393
41412
|
key: id,
|
|
41394
41413
|
onClick: function onClick() {
|
|
41395
41414
|
if (isSelectable !== false) {
|
|
@@ -41583,20 +41602,8 @@
|
|
|
41583
41602
|
"required": false
|
|
41584
41603
|
},
|
|
41585
41604
|
"wrapCellText": {
|
|
41586
|
-
"name": "
|
|
41587
|
-
"
|
|
41588
|
-
"value": "'always'",
|
|
41589
|
-
"computed": false
|
|
41590
|
-
}, {
|
|
41591
|
-
"value": "'never'",
|
|
41592
|
-
"computed": false
|
|
41593
|
-
}, {
|
|
41594
|
-
"value": "'auto'",
|
|
41595
|
-
"computed": false
|
|
41596
|
-
}, {
|
|
41597
|
-
"value": "'alwaysTruncate'",
|
|
41598
|
-
"computed": false
|
|
41599
|
-
}],
|
|
41605
|
+
"name": "custom",
|
|
41606
|
+
"raw": "WrapCellTextPropTypes.isRequired",
|
|
41600
41607
|
"required": true
|
|
41601
41608
|
},
|
|
41602
41609
|
"truncateCellText": {
|
|
@@ -42403,7 +42410,7 @@
|
|
|
42403
42410
|
hasSingleNestedHierarchy: PropTypes__default['default'].bool
|
|
42404
42411
|
})]),
|
|
42405
42412
|
hasRowActions: PropTypes__default['default'].bool,
|
|
42406
|
-
wrapCellText:
|
|
42413
|
+
wrapCellText: WrapCellTextPropTypes.isRequired,
|
|
42407
42414
|
truncateCellText: PropTypes__default['default'].bool.isRequired,
|
|
42408
42415
|
|
|
42409
42416
|
/** the current state of the row actions */
|
|
@@ -43126,22 +43133,10 @@
|
|
|
43126
43133
|
},
|
|
43127
43134
|
"wrapCellText": {
|
|
43128
43135
|
"type": {
|
|
43129
|
-
"name": "
|
|
43130
|
-
"
|
|
43131
|
-
"value": "'always'",
|
|
43132
|
-
"computed": false
|
|
43133
|
-
}, {
|
|
43134
|
-
"value": "'never'",
|
|
43135
|
-
"computed": false
|
|
43136
|
-
}, {
|
|
43137
|
-
"value": "'auto'",
|
|
43138
|
-
"computed": false
|
|
43139
|
-
}, {
|
|
43140
|
-
"value": "'alwaysTruncate'",
|
|
43141
|
-
"computed": false
|
|
43142
|
-
}]
|
|
43136
|
+
"name": "custom",
|
|
43137
|
+
"raw": "WrapCellTextPropTypes.isRequired"
|
|
43143
43138
|
},
|
|
43144
|
-
"required":
|
|
43139
|
+
"required": false,
|
|
43145
43140
|
"description": ""
|
|
43146
43141
|
},
|
|
43147
43142
|
"truncateCellText": {
|
|
@@ -43260,7 +43255,7 @@
|
|
|
43260
43255
|
hasSingleNestedHierarchy: PropTypes__default['default'].bool
|
|
43261
43256
|
})]),
|
|
43262
43257
|
hasRowActions: PropTypes__default['default'].bool,
|
|
43263
|
-
wrapCellText:
|
|
43258
|
+
wrapCellText: WrapCellTextPropTypes.isRequired,
|
|
43264
43259
|
truncateCellText: PropTypes__default['default'].bool.isRequired,
|
|
43265
43260
|
|
|
43266
43261
|
/** the current state of the row actions */
|
|
@@ -43962,22 +43957,10 @@
|
|
|
43962
43957
|
},
|
|
43963
43958
|
"wrapCellText": {
|
|
43964
43959
|
"type": {
|
|
43965
|
-
"name": "
|
|
43966
|
-
"
|
|
43967
|
-
"value": "'always'",
|
|
43968
|
-
"computed": false
|
|
43969
|
-
}, {
|
|
43970
|
-
"value": "'never'",
|
|
43971
|
-
"computed": false
|
|
43972
|
-
}, {
|
|
43973
|
-
"value": "'auto'",
|
|
43974
|
-
"computed": false
|
|
43975
|
-
}, {
|
|
43976
|
-
"value": "'alwaysTruncate'",
|
|
43977
|
-
"computed": false
|
|
43978
|
-
}]
|
|
43960
|
+
"name": "custom",
|
|
43961
|
+
"raw": "WrapCellTextPropTypes.isRequired"
|
|
43979
43962
|
},
|
|
43980
|
-
"required":
|
|
43963
|
+
"required": false,
|
|
43981
43964
|
"description": ""
|
|
43982
43965
|
},
|
|
43983
43966
|
"truncateCellText": {
|
|
@@ -45827,8 +45810,9 @@
|
|
|
45827
45810
|
* always - Wrap if needed for all table column configurations
|
|
45828
45811
|
* never - Tables with dynamic columns widths grow larger and tables with fixed or resizable columns truncate.
|
|
45829
45812
|
* alwaysTruncate - Always truncate if needed for all table column configurations
|
|
45813
|
+
* expand - Expand to fit text width (by horizontal scrollbar) for table with fixed columns
|
|
45830
45814
|
*/
|
|
45831
|
-
wrapCellText:
|
|
45815
|
+
wrapCellText: WrapCellTextPropTypes,
|
|
45832
45816
|
|
|
45833
45817
|
/** use white-space: pre; css when true */
|
|
45834
45818
|
preserveCellWhiteSpace: PropTypes__default['default'].bool
|
|
@@ -46377,7 +46361,7 @@
|
|
|
46377
46361
|
forceUpdateCellTextWidth = _useState4[1];
|
|
46378
46362
|
|
|
46379
46363
|
var useCellTextTruncate = React$1.useMemo(function () {
|
|
46380
|
-
return options ? options.wrapCellText === 'alwaysTruncate' || options.wrapCellText !== 'always' && (options.hasResize && !options.useAutoTableLayoutForResize || columns.some(function (col) {
|
|
46364
|
+
return options ? options.wrapCellText === 'alwaysTruncate' || options.wrapCellText !== 'always' && options.wrapCellText !== 'expand' && (options.hasResize && !options.useAutoTableLayoutForResize || columns.some(function (col) {
|
|
46381
46365
|
return col.hasOwnProperty('width');
|
|
46382
46366
|
})) : undefined;
|
|
46383
46367
|
}, [options, columns]);
|
|
@@ -46987,21 +46971,9 @@
|
|
|
46987
46971
|
"required": false
|
|
46988
46972
|
},
|
|
46989
46973
|
"wrapCellText": {
|
|
46990
|
-
"name": "
|
|
46991
|
-
"
|
|
46992
|
-
|
|
46993
|
-
"computed": false
|
|
46994
|
-
}, {
|
|
46995
|
-
"value": "'never'",
|
|
46996
|
-
"computed": false
|
|
46997
|
-
}, {
|
|
46998
|
-
"value": "'auto'",
|
|
46999
|
-
"computed": false
|
|
47000
|
-
}, {
|
|
47001
|
-
"value": "'alwaysTruncate'",
|
|
47002
|
-
"computed": false
|
|
47003
|
-
}],
|
|
47004
|
-
"description": "auto - Wrap for tables with dynamic columns widths and truncate for tables with fixed or resizable columns\nalways - Wrap if needed for all table column configurations\nnever - Tables with dynamic columns widths grow larger and tables with fixed or resizable columns truncate.\nalwaysTruncate - Always truncate if needed for all table column configurations",
|
|
46974
|
+
"name": "custom",
|
|
46975
|
+
"raw": "WrapCellTextPropTypes",
|
|
46976
|
+
"description": "auto - Wrap for tables with dynamic columns widths and truncate for tables with fixed or resizable columns\nalways - Wrap if needed for all table column configurations\nnever - Tables with dynamic columns widths grow larger and tables with fixed or resizable columns truncate.\nalwaysTruncate - Always truncate if needed for all table column configurations\nexpand - Expand to fit text width (by horizontal scrollbar) for table with fixed columns",
|
|
47005
46977
|
"required": false
|
|
47006
46978
|
},
|
|
47007
46979
|
"preserveCellWhiteSpace": {
|
|
@@ -104101,7 +104073,7 @@
|
|
|
104101
104073
|
};
|
|
104102
104074
|
|
|
104103
104075
|
var DateTimePicker$3 = function DateTimePicker(_ref) {
|
|
104104
|
-
var _classnames2, _classnames4;
|
|
104076
|
+
var _classnames, _classnames2, _classnames4;
|
|
104105
104077
|
|
|
104106
104078
|
var testId = _ref.testId,
|
|
104107
104079
|
defaultValue = _ref.defaultValue,
|
|
@@ -104554,7 +104526,7 @@
|
|
|
104554
104526
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
104555
104527
|
"data-testid": testId,
|
|
104556
104528
|
id: "".concat(id, "-").concat(iotPrefix$1p, "--date-time-pickerv2__wrapper"),
|
|
104557
|
-
className: classnames$1("".concat(iotPrefix$1p, "--date-time-pickerv2__wrapper"), defineProperty$d(
|
|
104529
|
+
className: classnames$1("".concat(iotPrefix$1p, "--date-time-pickerv2__wrapper"), (_classnames = {}, defineProperty$d(_classnames, "".concat(iotPrefix$1p, "--date-time-pickerv2__wrapper--disabled"), disabled), defineProperty$d(_classnames, "".concat(iotPrefix$1p, "--date-time-pickerv2__wrapper--invalid"), invalidState), _classnames)),
|
|
104558
104530
|
style: {
|
|
104559
104531
|
'--wrapper-width': hasIconOnly ? '3rem' : '20rem'
|
|
104560
104532
|
},
|
|
@@ -104576,7 +104548,7 @@
|
|
|
104576
104548
|
onMouseLeave: toggleTooltip,
|
|
104577
104549
|
tabIndex: 0
|
|
104578
104550
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
104579
|
-
className: classnames$1((_classnames2 = {}, defineProperty$d(_classnames2, "".concat(iotPrefix$1p, "--date-time-picker__box--full"), !hasIconOnly), defineProperty$d(_classnames2, "".concat(iotPrefix$1p, "--date-time-picker__box--light"), light), defineProperty$d(_classnames2, "".concat(iotPrefix$1p, "--date-time-picker__box--
|
|
104551
|
+
className: classnames$1((_classnames2 = {}, defineProperty$d(_classnames2, "".concat(iotPrefix$1p, "--date-time-picker__box--full"), !hasIconOnly), defineProperty$d(_classnames2, "".concat(iotPrefix$1p, "--date-time-picker__box--light"), light), defineProperty$d(_classnames2, "".concat(iotPrefix$1p, "--date-time-picker__box--disabled"), disabled), defineProperty$d(_classnames2, "".concat(iotPrefix$1p, "--date-time-picker__box--invalid"), invalidState), _classnames2))
|
|
104580
104552
|
}, !hasIconOnly ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
104581
104553
|
"data-testid": "".concat(testId, "__field"),
|
|
104582
104554
|
className: "".concat(iotPrefix$1p, "--date-time-picker__field")
|
|
@@ -109886,6 +109858,7 @@
|
|
|
109886
109858
|
|
|
109887
109859
|
var _usePopoverPositionin = usePopoverPositioning({
|
|
109888
109860
|
direction: 'bottom',
|
|
109861
|
+
defaultAlignment: 'center',
|
|
109889
109862
|
menuOffset: getTooltipMenuOffset,
|
|
109890
109863
|
useAutoPositioning: true,
|
|
109891
109864
|
isOverflowMenu: true // Needed to preserve default direction (bottom)
|
|
@@ -109893,7 +109866,9 @@
|
|
|
109893
109866
|
}),
|
|
109894
109867
|
_usePopoverPositionin2 = slicedToArray$2(_usePopoverPositionin, 2),
|
|
109895
109868
|
calculateMenuOffset = _usePopoverPositionin2[0],
|
|
109896
|
-
|
|
109869
|
+
_usePopoverPositionin3 = _usePopoverPositionin2[1],
|
|
109870
|
+
adjustedDirection = _usePopoverPositionin3.adjustedDirection,
|
|
109871
|
+
adjustedAlignment = _usePopoverPositionin3.adjustedAlignment;
|
|
109897
109872
|
|
|
109898
109873
|
var _useState = React$1.useState({
|
|
109899
109874
|
title: false,
|
|
@@ -109969,7 +109944,7 @@
|
|
|
109969
109944
|
var _classnames;
|
|
109970
109945
|
|
|
109971
109946
|
return hasTitleTooltipFromTruncation || hasExternalTitleTextTooltip ? /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.Tooltip, {
|
|
109972
|
-
align:
|
|
109947
|
+
align: adjustedAlignment,
|
|
109973
109948
|
menuOffset: calculateMenuOffset,
|
|
109974
109949
|
direction: adjustedDirection,
|
|
109975
109950
|
"data-testid": "".concat(testId, "-title-tooltip"),
|
|
@@ -109994,6 +109969,9 @@
|
|
|
109994
109969
|
|
|
109995
109970
|
var renderSubTitle = function renderSubTitle() {
|
|
109996
109971
|
return !subtitle ? null : hasSubTitleTooltip ? /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.Tooltip, {
|
|
109972
|
+
align: adjustedAlignment,
|
|
109973
|
+
menuOffset: calculateMenuOffset,
|
|
109974
|
+
direction: adjustedDirection,
|
|
109997
109975
|
"data-testid": "".concat(testId, "-subtitle"),
|
|
109998
109976
|
ref: subTitleRef,
|
|
109999
109977
|
showIcon: false,
|
|
@@ -116132,7 +116110,7 @@
|
|
|
116132
116110
|
};
|
|
116133
116111
|
|
|
116134
116112
|
var DateTimePicker$1 = function DateTimePicker(_ref) {
|
|
116135
|
-
var _classnames2, _classnames4, _style$zIndex;
|
|
116113
|
+
var _classnames, _classnames2, _classnames4, _style$zIndex;
|
|
116136
116114
|
|
|
116137
116115
|
var testId = _ref.testId,
|
|
116138
116116
|
defaultValue = _ref.defaultValue,
|
|
@@ -116707,7 +116685,7 @@
|
|
|
116707
116685
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
116708
116686
|
"data-testid": testId,
|
|
116709
116687
|
id: "".concat(id, "-").concat(iotPrefix$1e, "--date-time-pickerv2__wrapper"),
|
|
116710
|
-
className: classnames$1("".concat(iotPrefix$1e, "--date-time-pickerv2__wrapper"), defineProperty$d(
|
|
116688
|
+
className: classnames$1("".concat(iotPrefix$1e, "--date-time-pickerv2__wrapper"), (_classnames = {}, defineProperty$d(_classnames, "".concat(iotPrefix$1e, "--date-time-pickerv2__wrapper--disabled"), disabled), defineProperty$d(_classnames, "".concat(iotPrefix$1e, "--date-time-pickerv2__wrapper--invalid"), invalidState), _classnames)),
|
|
116711
116689
|
style: {
|
|
116712
116690
|
'--wrapper-width': hasIconOnly ? '3rem' : '20rem'
|
|
116713
116691
|
},
|
|
@@ -116729,7 +116707,7 @@
|
|
|
116729
116707
|
onMouseLeave: toggleTooltip,
|
|
116730
116708
|
tabIndex: 0
|
|
116731
116709
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
116732
|
-
className: classnames$1((_classnames2 = {}, defineProperty$d(_classnames2, "".concat(iotPrefix$1e, "--date-time-picker__box--full"), !hasIconOnly), defineProperty$d(_classnames2, "".concat(iotPrefix$1e, "--date-time-picker__box--light"), light), defineProperty$d(_classnames2, "".concat(iotPrefix$1e, "--date-time-picker__box--
|
|
116710
|
+
className: classnames$1((_classnames2 = {}, defineProperty$d(_classnames2, "".concat(iotPrefix$1e, "--date-time-picker__box--full"), !hasIconOnly), defineProperty$d(_classnames2, "".concat(iotPrefix$1e, "--date-time-picker__box--light"), light), defineProperty$d(_classnames2, "".concat(iotPrefix$1e, "--date-time-picker__box--disabled"), disabled), defineProperty$d(_classnames2, "".concat(iotPrefix$1e, "--date-time-picker__box--invalid"), invalidState), _classnames2))
|
|
116733
116711
|
}, !hasIconOnly ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
116734
116712
|
"data-testid": "".concat(testId, "__field"),
|
|
116735
116713
|
className: "".concat(iotPrefix$1e, "--date-time-picker__field")
|