carbon-addons-iot-react 2.147.0 → 2.147.3
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 +38 -0
- package/css/carbon-addons-iot-react.css +2 -0
- package/css/carbon-addons-iot-react.css.map +1 -1
- package/es/components/Header/HeaderAction/HeaderActionPanel.js +7 -1
- package/es/components/Header/HeaderActionGroup.js +1 -1
- package/es/components/SideNav/SideNav.js +5 -0
- package/es/components/SuiteHeader/SuiteHeader.js +6 -2
- package/es/components/SuiteHeader/SuiteHeaderAppSwitcher/SuiteHeaderAppSwitcher.js +24 -6
- package/es/components/Table/TableToolbar/TableToolbar.js +13 -21
- package/es/components/Table/tableUtilities.js +5 -1
- package/es/hooks/useDynamicOverflowMenuItems.js +2 -1
- package/lib/components/Header/HeaderAction/HeaderActionPanel.js +7 -1
- package/lib/components/Header/HeaderActionGroup.js +1 -1
- package/lib/components/SideNav/SideNav.js +5 -0
- package/lib/components/SuiteHeader/SuiteHeader.js +6 -2
- package/lib/components/SuiteHeader/SuiteHeaderAppSwitcher/SuiteHeaderAppSwitcher.js +24 -6
- package/lib/components/Table/TableToolbar/TableToolbar.js +13 -21
- package/lib/components/Table/tableUtilities.js +5 -1
- package/lib/css/carbon-addons-iot-react.css +2 -0
- package/lib/css/carbon-addons-iot-react.css.map +1 -1
- package/lib/hooks/useDynamicOverflowMenuItems.js +2 -1
- package/lib/scss/components/Table/TableToolbar/_table-toolbar.scss +2 -0
- package/package.json +2 -2
- package/scss/components/Table/TableToolbar/_table-toolbar.scss +2 -0
- package/umd/carbon-addons-iot-react.js +80 -51
|
@@ -69,7 +69,8 @@ var useDynamicOverflowMenuItems = function useDynamicOverflowMenuItems(_ref) {
|
|
|
69
69
|
requireTitle: !action.renderIcon,
|
|
70
70
|
disabled: isDisabled || action.disabled,
|
|
71
71
|
hasDivider: action.hasDivider,
|
|
72
|
-
isDelete: action.isDelete
|
|
72
|
+
isDelete: action.isDelete,
|
|
73
|
+
"aria-label": action.labelText
|
|
73
74
|
});
|
|
74
75
|
});
|
|
75
76
|
}, [actions, className, isDisabled, _onClick, testId]);
|
|
@@ -93,6 +93,7 @@ html[dir='rtl'] {
|
|
|
93
93
|
display: flex;
|
|
94
94
|
align-items: center;
|
|
95
95
|
text-align: left;
|
|
96
|
+
min-width: 0;
|
|
96
97
|
|
|
97
98
|
[dir='rtl'] & {
|
|
98
99
|
text-align: right;
|
|
@@ -100,6 +101,7 @@ html[dir='rtl'] {
|
|
|
100
101
|
|
|
101
102
|
svg {
|
|
102
103
|
margin-right: $spacing-03;
|
|
104
|
+
flex-shrink: 0;
|
|
103
105
|
|
|
104
106
|
[dir='rtl'] & {
|
|
105
107
|
margin-right: 0;
|
package/package.json
CHANGED
|
@@ -340,10 +340,10 @@
|
|
|
340
340
|
"whatwg-fetch": "^3.0.0"
|
|
341
341
|
},
|
|
342
342
|
"sideEffects": false,
|
|
343
|
-
"version": "2.147.
|
|
343
|
+
"version": "2.147.3",
|
|
344
344
|
"resolutions": {
|
|
345
345
|
"chokidar": "3.3.1",
|
|
346
346
|
"react-grid-layout": "1.2.2"
|
|
347
347
|
},
|
|
348
|
-
"gitHead": "
|
|
348
|
+
"gitHead": "53fa40581e33f8b87ca9baddb05563d62760170e"
|
|
349
349
|
}
|
|
@@ -93,6 +93,7 @@ html[dir='rtl'] {
|
|
|
93
93
|
display: flex;
|
|
94
94
|
align-items: center;
|
|
95
95
|
text-align: left;
|
|
96
|
+
min-width: 0;
|
|
96
97
|
|
|
97
98
|
[dir='rtl'] & {
|
|
98
99
|
text-align: right;
|
|
@@ -100,6 +101,7 @@ html[dir='rtl'] {
|
|
|
100
101
|
|
|
101
102
|
svg {
|
|
102
103
|
margin-right: $spacing-03;
|
|
104
|
+
flex-shrink: 0;
|
|
103
105
|
|
|
104
106
|
[dir='rtl'] & {
|
|
105
107
|
margin-right: 0;
|
|
@@ -11416,7 +11416,7 @@
|
|
|
11416
11416
|
module.exports = findLast;
|
|
11417
11417
|
});
|
|
11418
11418
|
|
|
11419
|
-
var prefix$
|
|
11419
|
+
var prefix$y = carbonComponents.settings.prefix;
|
|
11420
11420
|
/**
|
|
11421
11421
|
* @param {Node} node A DOM node.
|
|
11422
11422
|
* @param {string[]} selectorsFloatingMenus The CSS selectors that matches floating menus.
|
|
@@ -11427,7 +11427,7 @@
|
|
|
11427
11427
|
var selectorsFloatingMenus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
11428
11428
|
|
|
11429
11429
|
if (node && typeof node.closest === 'function') {
|
|
11430
|
-
var allSelectorsFloatingMenus = [".".concat(prefix$
|
|
11430
|
+
var allSelectorsFloatingMenus = [".".concat(prefix$y, "--overflow-menu-options"), ".".concat(prefix$y, "--tooltip"), '.flatpickr-calendar'].concat(_toConsumableArray$1(selectorsFloatingMenus));
|
|
11431
11431
|
return allSelectorsFloatingMenus.some(function (selector) {
|
|
11432
11432
|
return node.closest(selector);
|
|
11433
11433
|
});
|
|
@@ -11487,7 +11487,7 @@
|
|
|
11487
11487
|
function _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$e(); return function _createSuperInternal() { var Super = _getPrototypeOf$2(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$2(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$3(this, result); }; }
|
|
11488
11488
|
|
|
11489
11489
|
function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11490
|
-
var prefix$
|
|
11490
|
+
var prefix$x = carbonComponents.settings.prefix;
|
|
11491
11491
|
/**
|
|
11492
11492
|
* The structure for the position of floating menu.
|
|
11493
11493
|
* @typedef {object} FloatingMenu~position
|
|
@@ -11858,12 +11858,12 @@
|
|
|
11858
11858
|
ref: this.startSentinel,
|
|
11859
11859
|
tabIndex: "0",
|
|
11860
11860
|
role: "link",
|
|
11861
|
-
className: "".concat(prefix$
|
|
11861
|
+
className: "".concat(prefix$x, "--visually-hidden")
|
|
11862
11862
|
}, "Focus sentinel"), this._getChildrenWithProps(), /*#__PURE__*/React__default$1['default'].createElement("span", {
|
|
11863
11863
|
ref: this.endSentinel,
|
|
11864
11864
|
tabIndex: "0",
|
|
11865
11865
|
role: "link",
|
|
11866
|
-
className: "".concat(prefix$
|
|
11866
|
+
className: "".concat(prefix$x, "--visually-hidden")
|
|
11867
11867
|
}, "Focus sentinel")), !target ? document.body : target());
|
|
11868
11868
|
}
|
|
11869
11869
|
|
|
@@ -17721,7 +17721,7 @@
|
|
|
17721
17721
|
|
|
17722
17722
|
function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
17723
17723
|
var iotPrefix$28 = settings$1.iotPrefix,
|
|
17724
|
-
prefix$
|
|
17724
|
+
prefix$w = settings$1.prefix;
|
|
17725
17725
|
var ComposedModalPropTypes = {
|
|
17726
17726
|
/** Header Props
|
|
17727
17727
|
* label: goes on top of the dialog
|
|
@@ -17910,7 +17910,7 @@
|
|
|
17910
17910
|
buttonOnClick: onClose,
|
|
17911
17911
|
iconDescription: iconDescription
|
|
17912
17912
|
}, helpText ? /*#__PURE__*/React__default$1['default'].createElement("p", {
|
|
17913
|
-
className: "".concat(prefix$
|
|
17913
|
+
className: "".concat(prefix$w, "--modal-content__text")
|
|
17914
17914
|
}, helpText) : null), children ? /*#__PURE__*/React__default$1['default'].createElement(carbonComponentsReact.ModalBody, {
|
|
17915
17915
|
className: classnames$1(defineProperty$c({}, "".concat(iotPrefix$28, "--composed-modal__body--small-margin-bottom"), error))
|
|
17916
17916
|
}, children) : null, error ? /*#__PURE__*/React__default$1['default'].createElement(carbonComponentsReact.InlineNotification, {
|
|
@@ -24315,7 +24315,7 @@
|
|
|
24315
24315
|
React__default$1['default'].useEffect(callback, useDeepCompareMemoize(dependencies));
|
|
24316
24316
|
}
|
|
24317
24317
|
|
|
24318
|
-
var prefix$
|
|
24318
|
+
var prefix$v = settings$1.prefix,
|
|
24319
24319
|
iotPrefix$24 = settings$1.iotPrefix;
|
|
24320
24320
|
/* eslint-disable-next-line react/prop-types */
|
|
24321
24321
|
|
|
@@ -24414,7 +24414,7 @@
|
|
|
24414
24414
|
className: "".concat(iotPrefix$24, "--filtertags-overflow-menu"),
|
|
24415
24415
|
renderIcon: function renderIcon() {
|
|
24416
24416
|
return /*#__PURE__*/React__default$1['default'].createElement("div", {
|
|
24417
|
-
className: "".concat(prefix$
|
|
24417
|
+
className: "".concat(prefix$v, "--tag")
|
|
24418
24418
|
}, "More: ".concat(overflowItems.length));
|
|
24419
24419
|
},
|
|
24420
24420
|
menuOptionsClass: "".concat(iotPrefix$24, "--filtertags-overflow-items"),
|
|
@@ -33888,7 +33888,7 @@
|
|
|
33888
33888
|
|
|
33889
33889
|
function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
33890
33890
|
var iotPrefix$1$ = settings$1.iotPrefix,
|
|
33891
|
-
prefix$
|
|
33891
|
+
prefix$u = settings$1.prefix;
|
|
33892
33892
|
var TableHeader$1 = carbonComponentsReact.DataTable.TableHeader,
|
|
33893
33893
|
TableRow$5 = carbonComponentsReact.DataTable.TableRow;
|
|
33894
33894
|
|
|
@@ -33917,7 +33917,7 @@
|
|
|
33917
33917
|
|
|
33918
33918
|
defineProperty$c(assertThisInitialized(_this), "updateDropdownHeight", function () {
|
|
33919
33919
|
if (_this.rowRef.current) {
|
|
33920
|
-
var tableContainer = _this.rowRef.current.closest(".".concat(prefix$
|
|
33920
|
+
var tableContainer = _this.rowRef.current.closest(".".concat(prefix$u, "--data-table-content"));
|
|
33921
33921
|
|
|
33922
33922
|
var tableHead = _this.rowRef.current.closest("thead");
|
|
33923
33923
|
|
|
@@ -34169,7 +34169,7 @@
|
|
|
34169
34169
|
// eslint-disable-line react/destructuring-assignment
|
|
34170
34170
|
React__default$1['default'].createElement("div", {
|
|
34171
34171
|
role: "button",
|
|
34172
|
-
className: classnames$1("".concat(prefix$
|
|
34172
|
+
className: classnames$1("".concat(prefix$u, "--list-box__selection"), defineProperty$c({}, "".concat(iotPrefix$1$, "--clear-filters-button--disabled"), isDisabled)),
|
|
34173
34173
|
tabIndex: isDisabled ? '-1' : '0',
|
|
34174
34174
|
onClick: function onClick(event) {
|
|
34175
34175
|
if (!isDisabled) {
|
|
@@ -34686,7 +34686,7 @@
|
|
|
34686
34686
|
DESC: 'DESC',
|
|
34687
34687
|
ASC: 'ASC'
|
|
34688
34688
|
};
|
|
34689
|
-
var prefix$
|
|
34689
|
+
var prefix$t = settings$1.prefix,
|
|
34690
34690
|
iotPrefix$1_ = settings$1.iotPrefix;
|
|
34691
34691
|
var translationKeys = {
|
|
34692
34692
|
iconDescription: 'carbon.table.header.icon.description'
|
|
@@ -34753,12 +34753,12 @@
|
|
|
34753
34753
|
ref: ref,
|
|
34754
34754
|
style: thStyle
|
|
34755
34755
|
}), !hasTooltip ? /*#__PURE__*/React__default$1['default'].createElement("span", {
|
|
34756
|
-
className: "".concat(prefix$
|
|
34756
|
+
className: "".concat(prefix$t, "--table-header-label")
|
|
34757
34757
|
}, children) : children)
|
|
34758
34758
|
);
|
|
34759
34759
|
}
|
|
34760
34760
|
|
|
34761
|
-
var className = classnames$1(headerClassName, (_classnames2 = {}, defineProperty$c(_classnames2, "".concat(prefix$
|
|
34761
|
+
var className = classnames$1(headerClassName, (_classnames2 = {}, defineProperty$c(_classnames2, "".concat(prefix$t, "--table-sort"), true), defineProperty$c(_classnames2, "".concat(prefix$t, "--table-sort--active"), isSortHeader && sortDirection !== sortStates.NONE), defineProperty$c(_classnames2, "".concat(prefix$t, "--table-sort--ascending"), isSortHeader && sortDirection === sortStates.DESC), _classnames2));
|
|
34762
34762
|
var ariaSort = !isSortHeader ? 'none' : sortDirections[sortDirection];
|
|
34763
34763
|
var ButtonTag = hasMultiSort || hasOverflow ? "a" : "button";
|
|
34764
34764
|
var buttonProps = hasMultiSort || hasOverflow ? _objectSpread$1S({
|
|
@@ -34781,9 +34781,9 @@
|
|
|
34781
34781
|
style: thStyle,
|
|
34782
34782
|
"data-testid": testId
|
|
34783
34783
|
}, /*#__PURE__*/React__default$1['default'].createElement(ButtonTag, buttonProps, !hasTooltip ? /*#__PURE__*/React__default$1['default'].createElement("span", {
|
|
34784
|
-
className: "".concat(prefix$
|
|
34784
|
+
className: "".concat(prefix$t, "--table-header-label")
|
|
34785
34785
|
}, children) : children, /*#__PURE__*/React__default$1['default'].createElement(iconsReact.ArrowUp20, {
|
|
34786
|
-
className: "".concat(prefix$
|
|
34786
|
+
className: "".concat(prefix$t, "--table-sort__icon"),
|
|
34787
34787
|
"aria-label": t('carbon.table.header.icon.description', {
|
|
34788
34788
|
header: children,
|
|
34789
34789
|
sortDirection: sortDirection,
|
|
@@ -34791,7 +34791,7 @@
|
|
|
34791
34791
|
sortStates: sortStates
|
|
34792
34792
|
})
|
|
34793
34793
|
}), /*#__PURE__*/React__default$1['default'].createElement(iconsReact.ArrowsVertical20, {
|
|
34794
|
-
className: "".concat(prefix$
|
|
34794
|
+
className: "".concat(prefix$t, "--table-sort__icon-unsorted"),
|
|
34795
34795
|
"aria-label": t('carbon.table.header.icon.description', {
|
|
34796
34796
|
header: children,
|
|
34797
34797
|
sortDirection: sortDirection,
|
|
@@ -37561,6 +37561,7 @@
|
|
|
37561
37561
|
}
|
|
37562
37562
|
};
|
|
37563
37563
|
|
|
37564
|
+
var prefix$s = settings$1.prefix;
|
|
37564
37565
|
/**
|
|
37565
37566
|
* Use this function to traverse the tree structure of a set of table rows using Depth-first search (DFS)
|
|
37566
37567
|
* and apply some function on each row. The function is applied once the recursion starts back-tracking.
|
|
@@ -37650,7 +37651,9 @@
|
|
|
37650
37651
|
title: action.labelText
|
|
37651
37652
|
}, typeof action.renderIcon === 'string' ? renderBundledIconUsingName(action.renderIcon, action.labelText) : /*#__PURE__*/React__default$1['default'].createElement(action.renderIcon, {
|
|
37652
37653
|
description: action.labelText
|
|
37653
|
-
}),
|
|
37654
|
+
}), /*#__PURE__*/React__default$1['default'].createElement("div", {
|
|
37655
|
+
className: "".concat(prefix$s, "--overflow-menu-options__option-content")
|
|
37656
|
+
}, action.labelText)) : action.labelText;
|
|
37654
37657
|
};
|
|
37655
37658
|
renderBundledIconUsingName.__docgenInfo = {
|
|
37656
37659
|
"description": "",
|
|
@@ -37719,7 +37722,8 @@
|
|
|
37719
37722
|
requireTitle: !action.renderIcon,
|
|
37720
37723
|
disabled: isDisabled || action.disabled,
|
|
37721
37724
|
hasDivider: action.hasDivider,
|
|
37722
|
-
isDelete: action.isDelete
|
|
37725
|
+
isDelete: action.isDelete,
|
|
37726
|
+
"aria-label": action.labelText
|
|
37723
37727
|
});
|
|
37724
37728
|
});
|
|
37725
37729
|
}, [actions, className, isDisabled, _onClick, testId]);
|
|
@@ -39668,24 +39672,16 @@
|
|
|
39668
39672
|
setIsOpen = _useDynamicOverflowMe2[1],
|
|
39669
39673
|
renderToolbarOverflowActions = _useDynamicOverflowMe2[2];
|
|
39670
39674
|
|
|
39671
|
-
var
|
|
39672
|
-
|
|
39673
|
-
|
|
39674
|
-
var visibleToolbarActions = React$1.useMemo(function () {
|
|
39675
|
-
var _toolbarActions$filte;
|
|
39676
|
-
|
|
39677
|
-
if (typeof toolbarActions === 'function') {
|
|
39678
|
-
return toolbarActions().filter(function (_ref2) {
|
|
39679
|
-
var isOverflow = _ref2.isOverflow;
|
|
39680
|
-
return !isOverflow;
|
|
39681
|
-
});
|
|
39682
|
-
}
|
|
39683
|
-
|
|
39684
|
-
return (_toolbarActions$filte = toolbarActions === null || toolbarActions === void 0 ? void 0 : toolbarActions.filter(function (_ref3) {
|
|
39685
|
-
var isOverflow = _ref3.isOverflow;
|
|
39686
|
-
return !isOverflow;
|
|
39687
|
-
})) !== null && _toolbarActions$filte !== void 0 ? _toolbarActions$filte : [];
|
|
39675
|
+
var actions = React$1.useMemo(function () {
|
|
39676
|
+
var renderedActions = typeof toolbarActions === 'function' ? toolbarActions() : toolbarActions;
|
|
39677
|
+
return renderedActions !== null && renderedActions !== void 0 && renderedActions.length ? renderedActions : [];
|
|
39688
39678
|
}, [toolbarActions]);
|
|
39679
|
+
var hasToolbarOverflowActions = actions.filter(function (action) {
|
|
39680
|
+
return action.isOverflow && action.hidden !== true;
|
|
39681
|
+
}).length > 0;
|
|
39682
|
+
var visibleToolbarActions = actions.filter(function (action) {
|
|
39683
|
+
return !action.isOverflow && action.hidden !== true;
|
|
39684
|
+
});
|
|
39689
39685
|
return /*#__PURE__*/React__default$1['default'].createElement(CarbonTableToolbar // TODO: remove deprecated 'testID' in v3
|
|
39690
39686
|
, {
|
|
39691
39687
|
"data-testid": testID || testId,
|
|
@@ -39705,10 +39701,10 @@
|
|
|
39705
39701
|
|
|
39706
39702
|
return tableTranslateWithId.apply(void 0, [i18n].concat(args));
|
|
39707
39703
|
}
|
|
39708
|
-
}, batchActions.map(function (
|
|
39709
|
-
var id =
|
|
39710
|
-
labelText =
|
|
39711
|
-
others = objectWithoutProperties$1(
|
|
39704
|
+
}, batchActions.map(function (_ref2) {
|
|
39705
|
+
var id = _ref2.id,
|
|
39706
|
+
labelText = _ref2.labelText,
|
|
39707
|
+
others = objectWithoutProperties$1(_ref2, ["id", "labelText"]);
|
|
39712
39708
|
|
|
39713
39709
|
return /*#__PURE__*/React__default$1['default'].createElement(TableBatchAction, _extends_1$1({
|
|
39714
39710
|
key: id,
|
|
@@ -122321,7 +122317,13 @@
|
|
|
122321
122317
|
}, metaData, {
|
|
122322
122318
|
onClick: onClick,
|
|
122323
122319
|
onKeyDown: handleSpecificKeyDown(['Enter', ' '], onKeyDown)
|
|
122324
|
-
}),
|
|
122320
|
+
}), // if we're working with an actual react component (not an html element) pass
|
|
122321
|
+
// the isExpanded prop, so we can control tab-navigation on the closed AppSwitcher
|
|
122322
|
+
|
|
122323
|
+
/*#__PURE__*/
|
|
122324
|
+
React__default$1['default'].isValidElement(childItem.content) && typeof childItem.content.type !== 'string' ? /*#__PURE__*/React__default$1['default'].cloneElement(childItem.content, {
|
|
122325
|
+
isExpanded: isExpanded
|
|
122326
|
+
}) : childItem.content));
|
|
122325
122327
|
}))));
|
|
122326
122328
|
};
|
|
122327
122329
|
|
|
@@ -122672,7 +122674,7 @@
|
|
|
122672
122674
|
* know whether the OverflowMenu is open and adjust the icons accordingly. This double-click
|
|
122673
122675
|
* only occurs when changing the icon. If the same icon is always used it works as expected.
|
|
122674
122676
|
* My guess is this is because of the outsideClickClosing that the overflow menu does. WHen the
|
|
122675
|
-
* icon is change it is "outside" of the element for a
|
|
122677
|
+
* icon is change it is "outside" of the element for a moment and causes a close--that or a re-render that
|
|
122676
122678
|
* is triggered when the icon changes.
|
|
122677
122679
|
*/
|
|
122678
122680
|
var button = target.closest('button');
|
|
@@ -123357,6 +123359,11 @@
|
|
|
123357
123359
|
|
|
123358
123360
|
SideNav.propTypes = SideNavPropTypes;
|
|
123359
123361
|
SideNav.defaultProps = defaultProps$1f;
|
|
123362
|
+
SideNav$1.displayName = 'SideNav';
|
|
123363
|
+
SideNavItems.displayName = 'SideNavItems';
|
|
123364
|
+
SideNavLink.displayName = 'SideNavLink';
|
|
123365
|
+
SideNavMenu.displayName = 'SideNavMenu';
|
|
123366
|
+
SideNavMenuItem.displayName = 'SideNavMenuItem';
|
|
123360
123367
|
SideNav.__docgenInfo = {
|
|
123361
123368
|
"description": "Side Navigation. part of UI shell",
|
|
123362
123369
|
"methods": [],
|
|
@@ -124466,7 +124473,8 @@
|
|
|
124466
124473
|
requestAccess: 'Contact your administrator to request application access.',
|
|
124467
124474
|
learnMoreLink: 'Learn more'
|
|
124468
124475
|
},
|
|
124469
|
-
testId: 'suite-header-app-switcher'
|
|
124476
|
+
testId: 'suite-header-app-switcher',
|
|
124477
|
+
isExpanded: false
|
|
124470
124478
|
};
|
|
124471
124479
|
var propTypes$18 = {
|
|
124472
124480
|
applications: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape(SuiteHeaderApplicationPropTypes)),
|
|
@@ -124479,7 +124487,8 @@
|
|
|
124479
124487
|
requestAccess: PropTypes__default['default'].string,
|
|
124480
124488
|
learnMoreLink: PropTypes__default['default'].string
|
|
124481
124489
|
}),
|
|
124482
|
-
testId: PropTypes__default['default'].string
|
|
124490
|
+
testId: PropTypes__default['default'].string,
|
|
124491
|
+
isExpanded: PropTypes__default['default'].bool
|
|
124483
124492
|
};
|
|
124484
124493
|
|
|
124485
124494
|
var SuiteHeaderAppSwitcher = function SuiteHeaderAppSwitcher(_ref) {
|
|
@@ -124489,7 +124498,8 @@
|
|
|
124489
124498
|
noAccessLink = _ref.noAccessLink,
|
|
124490
124499
|
i18n = _ref.i18n,
|
|
124491
124500
|
onRouteChange = _ref.onRouteChange,
|
|
124492
|
-
testId = _ref.testId
|
|
124501
|
+
testId = _ref.testId,
|
|
124502
|
+
isExpanded = _ref.isExpanded;
|
|
124493
124503
|
|
|
124494
124504
|
var mergedI18n = _objectSpread$Z(_objectSpread$Z({}, defaultProps$1b.i18n), i18n);
|
|
124495
124505
|
|
|
@@ -124570,6 +124580,7 @@
|
|
|
124570
124580
|
return _ref4.apply(this, arguments);
|
|
124571
124581
|
};
|
|
124572
124582
|
}(), [allApplicationsLink, onRouteChange]);
|
|
124583
|
+
var tabIndex = isExpanded ? 0 : -1;
|
|
124573
124584
|
return /*#__PURE__*/React__default$1['default'].createElement("ul", {
|
|
124574
124585
|
"data-testid": testId,
|
|
124575
124586
|
className: baseClassName
|
|
@@ -124582,7 +124593,8 @@
|
|
|
124582
124593
|
testId: "".concat(testId, "--all-applications"),
|
|
124583
124594
|
onClick: handleAllApplicationRoute,
|
|
124584
124595
|
onKeyDown: handleSpecificKeyDown(['Enter', 'Space'], handleAllApplicationRoute),
|
|
124585
|
-
renderIcon: iconsReact.ArrowRight16
|
|
124596
|
+
renderIcon: iconsReact.ArrowRight16,
|
|
124597
|
+
tabIndex: tabIndex
|
|
124586
124598
|
}, mergedI18n.allApplicationsLink)), /*#__PURE__*/React__default$1['default'].createElement("div", {
|
|
124587
124599
|
className: "".concat(baseClassName, "--nav-link--separator")
|
|
124588
124600
|
}), mergedApplications === null ? /*#__PURE__*/React__default$1['default'].createElement("li", null, /*#__PURE__*/React__default$1['default'].createElement("div", {
|
|
@@ -124610,7 +124622,8 @@
|
|
|
124610
124622
|
kind: "ghost",
|
|
124611
124623
|
testId: "".concat(testId, "--").concat(id),
|
|
124612
124624
|
onClick: eventHandler,
|
|
124613
|
-
onKeyDown: handleSpecificKeyDown(['Enter', 'Space'], eventHandler)
|
|
124625
|
+
onKeyDown: handleSpecificKeyDown(['Enter', 'Space'], eventHandler),
|
|
124626
|
+
tabIndex: tabIndex
|
|
124614
124627
|
}, name));
|
|
124615
124628
|
}), (mergedApplications === null || mergedApplications === void 0 ? void 0 : mergedApplications.length) === 0 ? /*#__PURE__*/React__default$1['default'].createElement("div", {
|
|
124616
124629
|
className: "".concat(baseClassName, "--no-app")
|
|
@@ -124643,7 +124656,8 @@
|
|
|
124643
124656
|
}
|
|
124644
124657
|
}
|
|
124645
124658
|
}, _callee4);
|
|
124646
|
-
}))
|
|
124659
|
+
})),
|
|
124660
|
+
tabIndex: tabIndex
|
|
124647
124661
|
}, mergedI18n.learnMoreLink)) : null);
|
|
124648
124662
|
};
|
|
124649
124663
|
|
|
@@ -124744,6 +124758,17 @@
|
|
|
124744
124758
|
"required": false,
|
|
124745
124759
|
"description": ""
|
|
124746
124760
|
},
|
|
124761
|
+
"isExpanded": {
|
|
124762
|
+
"defaultValue": {
|
|
124763
|
+
"value": "false",
|
|
124764
|
+
"computed": false
|
|
124765
|
+
},
|
|
124766
|
+
"type": {
|
|
124767
|
+
"name": "bool"
|
|
124768
|
+
},
|
|
124769
|
+
"required": false,
|
|
124770
|
+
"description": ""
|
|
124771
|
+
},
|
|
124747
124772
|
"noAccessLink": {
|
|
124748
124773
|
"type": {
|
|
124749
124774
|
"name": "string"
|
|
@@ -125239,8 +125264,11 @@
|
|
|
125239
125264
|
handleSideNavButtonClick(evt);
|
|
125240
125265
|
},
|
|
125241
125266
|
headerPanel: {
|
|
125242
|
-
|
|
125267
|
+
// eslint-disable-next-line react/prop-types
|
|
125268
|
+
content: /*#__PURE__*/React__default$1['default'].forwardRef(function (_ref5, ref) {
|
|
125269
|
+
var isExpanded = _ref5.isExpanded;
|
|
125243
125270
|
return /*#__PURE__*/React__default$1['default'].createElement(SuiteHeaderAppSwitcher, {
|
|
125271
|
+
ref: ref,
|
|
125244
125272
|
applications: applications,
|
|
125245
125273
|
customApplications: customApplications,
|
|
125246
125274
|
allApplicationsLink: routes === null || routes === void 0 ? void 0 : routes.navigator,
|
|
@@ -125252,7 +125280,8 @@
|
|
|
125252
125280
|
requestAccess: mergedI18N.switcherRequestAccess,
|
|
125253
125281
|
learnMoreLink: mergedI18N.switcherLearnMoreLink
|
|
125254
125282
|
},
|
|
125255
|
-
testId: "".concat(testId, "-app-switcher")
|
|
125283
|
+
testId: "".concat(testId, "-app-switcher"),
|
|
125284
|
+
isExpanded: isExpanded
|
|
125256
125285
|
});
|
|
125257
125286
|
})
|
|
125258
125287
|
},
|