@plesk/ui-library 3.35.6 → 3.35.7
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/cjs/components/AutoClosable/AutoClosable.js +1 -0
- package/cjs/components/InputNumber/InputNumber.js +2 -2
- package/cjs/components/Item/Item.js +64 -153
- package/cjs/components/Overlay/Overlay.js +29 -27
- package/cjs/components/Popover/Popover.js +1 -1
- package/cjs/components/SegmentedControl/SegmentedControl.js +1 -0
- package/cjs/components/Tabs/SearchBar.js +40 -147
- package/cjs/components/Tabs/Tab.js +2 -49
- package/cjs/components/Tabs/Tabs.js +48 -99
- package/cjs/components/Toolbar/ToolbarItem.js +1 -0
- package/cjs/components/index.js +14 -11
- package/cjs/index.js +1 -1
- package/dist/plesk-ui-library.js +435 -628
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +8 -12
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/AutoClosable/AutoClosable.js +1 -0
- package/esm/components/InputNumber/InputNumber.js +2 -2
- package/esm/components/Item/Item.js +64 -153
- package/esm/components/Overlay/Overlay.js +29 -27
- package/esm/components/Popover/Popover.js +1 -1
- package/esm/components/SegmentedControl/SegmentedControl.js +1 -0
- package/esm/components/Tabs/SearchBar.js +40 -147
- package/esm/components/Tabs/Tab.js +1 -49
- package/esm/components/Tabs/Tabs.js +49 -99
- package/esm/components/Toolbar/ToolbarItem.js +1 -0
- package/esm/components/index.js +1 -2
- package/esm/index.js +1 -1
- package/package.json +28 -33
- package/styleguide/build/bundle.a2d3190d.js +2 -0
- package/styleguide/build/{bundle.8a07b2dd.js.LICENSE.txt → bundle.a2d3190d.js.LICENSE.txt} +27 -23
- package/styleguide/index.html +2 -2
- package/types/src/components/Action/Action.d.ts +1 -1
- package/types/src/components/Alert/Alert.d.ts +1 -1
- package/types/src/components/AutoClosable/AutoClosable.d.ts +23 -21
- package/types/src/components/AuxiliaryActions/AuxiliaryActions.d.ts +1 -1
- package/types/src/components/Badge/Badge.d.ts +1 -1
- package/types/src/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/types/src/components/Button/Button.d.ts +2 -2
- package/types/src/components/Button/ButtonContext.d.ts +1 -1
- package/types/src/components/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/types/src/components/Card/PreviewPanel.d.ts +2 -2
- package/types/src/components/Carousel/Carousel.d.ts +1 -1
- package/types/src/components/Checkbox/Checkbox.d.ts +1 -1
- package/types/src/components/ClosingConfirmation/useClosingConfirmation.d.ts +1 -1
- package/types/src/components/ComboBox/ComboBox.d.ts +2 -2
- package/types/src/components/ComboBox/ComboBoxOption.d.ts +1 -1
- package/types/src/components/ComboBoxDropdown/ComboBoxDropdown.d.ts +5 -5
- package/types/src/components/ConsoleOutput/ConsoleOutput.d.ts +2 -2
- package/types/src/components/ContentLoader/ContentLoader.d.ts +2 -2
- package/types/src/components/ContentLoader/IconsLoader.d.ts +2 -2
- package/types/src/components/Cuttable/Cuttable.d.ts +3 -3
- package/types/src/components/Dialog/Dialog.d.ts +3 -3
- package/types/src/components/DistractionFreeModeContext/DistractionFreeModeContext.d.ts +1 -1
- package/types/src/components/Drawer/Drawer.d.ts +1 -1
- package/types/src/components/Drawer/DrawerProgress.d.ts +4 -4
- package/types/src/components/Drawer/Header.d.ts +1 -1
- package/types/src/components/Dropdown/Dropdown.d.ts +1 -1
- package/types/src/components/ExtendedStatusMessage/ExtendedStatusMessage.d.ts +1 -1
- package/types/src/components/ExtendedStatusMessage/ExtendedStatusMessageActions.d.ts +1 -1
- package/types/src/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.d.ts +1 -1
- package/types/src/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.d.ts +1 -1
- package/types/src/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.d.ts +1 -1
- package/types/src/components/Figure/Figure.d.ts +1 -1
- package/types/src/components/Form/Form.d.ts +2 -2
- package/types/src/components/Form/types.d.ts +7 -7
- package/types/src/components/Form/utils.d.ts +3 -3
- package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.d.ts +1 -1
- package/types/src/components/FormFieldPassword/FormFieldPassword.d.ts +4 -4
- package/types/src/components/FormFieldPassword/PasswordMeter.d.ts +1 -1
- package/types/src/components/FormFieldPassword/estimatePassword.d.ts +2 -2
- package/types/src/components/FormFieldSelect/FormFieldSelect.d.ts +2 -2
- package/types/src/components/FormFieldText/FormFieldText.d.ts +4 -4
- package/types/src/components/Grid/Grid.d.ts +4 -4
- package/types/src/components/GridCol/GridCol.d.ts +2 -2
- package/types/src/components/Heading/Heading.d.ts +1 -1
- package/types/src/components/Hint/Hint.d.ts +1 -1
- package/types/src/components/Icon/Icon.d.ts +3 -3
- package/types/src/components/Icon/constants.d.ts +1 -1
- package/types/src/components/InPlaceEdit/InPlaceEdit.d.ts +2 -2
- package/types/src/components/Input/Input.d.ts +4 -3
- package/types/src/components/InputFile/InputFile.d.ts +1 -1
- package/types/src/components/Item/Item.d.ts +79 -0
- package/types/src/components/Item/index.d.ts +2 -0
- package/types/src/components/ItemLink/ItemLink.d.ts +1 -1
- package/types/src/components/ItemList/ItemList.d.ts +7 -7
- package/types/src/components/Label/Label.d.ts +3 -3
- package/types/src/components/Layer/Layer.d.ts +1 -1
- package/types/src/components/Layout/Layout.d.ts +9 -9
- package/types/src/components/Link/Link.d.ts +3 -3
- package/types/src/components/List/ListAction.d.ts +3 -3
- package/types/src/components/List/ListActions.d.ts +2 -2
- package/types/src/components/List/ListActionsDivider.d.ts +2 -2
- package/types/src/components/List/ListEmptyView.d.ts +1 -1
- package/types/src/components/List/ListOperation.d.ts +9 -5
- package/types/src/components/List/ListOperationContext.d.ts +1 -1
- package/types/src/components/LocaleProvider/LocaleProvider.d.ts +5 -5
- package/types/src/components/Markdown/Markdown.d.ts +2 -2
- package/types/src/components/Media/Media.d.ts +1 -1
- package/types/src/components/Media/MediaSection.d.ts +1 -1
- package/types/src/components/Menu/Menu.d.ts +1 -1
- package/types/src/components/Menu/MenuBaseItem.d.ts +3 -3
- package/types/src/components/Menu/MenuDivider.d.ts +1 -1
- package/types/src/components/Menu/MenuHeader.d.ts +1 -1
- package/types/src/components/Menu/MenuItem.d.ts +2 -2
- package/types/src/components/Menu/MenuSelectableItem.d.ts +2 -2
- package/types/src/components/Overlay/Overlay.d.ts +2 -2
- package/types/src/components/PageHeader/PageHeader.d.ts +1 -1
- package/types/src/components/Pagination/Pagination.d.ts +2 -2
- package/types/src/components/Panel/Panel.d.ts +3 -3
- package/types/src/components/Paragraph/Paragraph.d.ts +1 -1
- package/types/src/components/Plaintext/Plaintext.d.ts +1 -1
- package/types/src/components/Popover/Popover.d.ts +5 -3
- package/types/src/components/Popper/Popper.d.ts +2 -2
- package/types/src/components/Progress/Progress.d.ts +2 -2
- package/types/src/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/types/src/components/ProgressBar/ProgressIndicator.d.ts +1 -1
- package/types/src/components/ProgressDialog/ProgressDialog.d.ts +2 -2
- package/types/src/components/ProgressStep/ProgressStep.d.ts +2 -2
- package/types/src/components/Radio/Radio.d.ts +1 -1
- package/types/src/components/Rating/Rating.d.ts +1 -1
- package/types/src/components/Section/Section.d.ts +5 -5
- package/types/src/components/Section/SectionItem.d.ts +1 -1
- package/types/src/components/SegmentedControl/SegmentedControl.d.ts +16 -12
- package/types/src/components/Select/MultiValue.d.ts +1 -1
- package/types/src/components/Select/Select.d.ts +1 -1
- package/types/src/components/Select/SelectControl.d.ts +1 -1
- package/types/src/components/Select/SelectOption.d.ts +1 -1
- package/types/src/components/Select/SelectOptionGroup.d.ts +1 -1
- package/types/src/components/Select/structures.d.ts +3 -3
- package/types/src/components/Skeleton/Skeleton.d.ts +1 -1
- package/types/src/components/Spinner/Spinner.d.ts +1 -1
- package/types/src/components/SplitButton/SplitButton.d.ts +1 -1
- package/types/src/components/Spot/Spot.d.ts +1 -1
- package/types/src/components/Spot/SpotPopup.d.ts +5 -3
- package/types/src/components/Squeezer/Squeezer.d.ts +2 -2
- package/types/src/components/Status/Status.d.ts +3 -3
- package/types/src/components/StatusMessage/StatusMessage.d.ts +1 -1
- package/types/src/components/Subnav/Subnav.d.ts +1 -1
- package/types/src/components/Switch/Switch.d.ts +3 -2
- package/types/src/components/SwitchesPanel/SwitchesPanel.d.ts +1 -1
- package/types/src/components/SwitchesPanelItem/SwitchesPanelItem.d.ts +1 -1
- package/types/src/components/Tabs/SearchBar.d.ts +107 -0
- package/types/src/components/Tabs/Tab.d.ts +62 -0
- package/types/src/components/Tabs/Tabs.d.ts +111 -0
- package/types/src/components/Tabs/index.d.ts +6 -0
- package/types/src/components/Text/Text.d.ts +1 -1
- package/types/src/components/TextArea/TextArea.d.ts +4 -4
- package/types/src/components/Toast/Toast.d.ts +2 -2
- package/types/src/components/Toaster/Toaster.d.ts +4 -4
- package/types/src/components/Toolbar/RegistryContext.d.ts +2 -2
- package/types/src/components/Toolbar/Toolbar.d.ts +2 -2
- package/types/src/components/Toolbar/ToolbarExpander.d.ts +2 -2
- package/types/src/components/Toolbar/ToolbarGroup.d.ts +1 -1
- package/types/src/components/Toolbar/ToolbarItem.d.ts +1 -1
- package/types/src/components/Toolbar/ToolbarMenu.d.ts +1 -1
- package/types/src/components/Tooltip/Tooltip.d.ts +2 -2
- package/types/src/components/Tour/Tour.d.ts +2 -2
- package/types/src/components/Translate/Translate.d.ts +5 -3
- package/types/src/components/index.d.ts +3 -2
- package/types/src/components/utils.d.ts +5 -5
- package/types/src/utils/types/PolymorphicComponent.d.ts +5 -5
- package/styleguide/build/bundle.8a07b2dd.js +0 -2
package/dist/plesk-ui-library.js
CHANGED
|
@@ -945,6 +945,7 @@ const AutoClosableContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
|
945
945
|
class AutoClosable extends _react.Component {
|
|
946
946
|
constructor() {
|
|
947
947
|
super(...arguments);
|
|
948
|
+
_defineProperty(this, "context", void 0);
|
|
948
949
|
_defineProperty(this, "children", []);
|
|
949
950
|
_defineProperty(this, "addChild", child => {
|
|
950
951
|
this.children.push(child);
|
|
@@ -10179,8 +10180,8 @@ const toNumber = value => {
|
|
|
10179
10180
|
}
|
|
10180
10181
|
return value;
|
|
10181
10182
|
};
|
|
10182
|
-
const isMinDisabled = (value, min) => min !== undefined && value !== '' && value <= min;
|
|
10183
|
-
const isMaxDisabled = (value, max) => max !== undefined && value !== '' && value >= max;
|
|
10183
|
+
const isMinDisabled = (value, min) => min !== undefined && value !== '' && +value <= min;
|
|
10184
|
+
const isMaxDisabled = (value, max) => max !== undefined && value !== '' && +value >= max;
|
|
10184
10185
|
|
|
10185
10186
|
/**
|
|
10186
10187
|
* `InputNumber` component is used for entering integer numbers.
|
|
@@ -10329,10 +10330,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
10329
10330
|
|
|
10330
10331
|
/***/ }),
|
|
10331
10332
|
|
|
10332
|
-
/***/ "./components/Item/Item.
|
|
10333
|
-
|
|
10334
|
-
!*** ./components/Item/Item.
|
|
10335
|
-
|
|
10333
|
+
/***/ "./components/Item/Item.tsx":
|
|
10334
|
+
/*!**********************************!*\
|
|
10335
|
+
!*** ./components/Item/Item.tsx ***!
|
|
10336
|
+
\**********************************/
|
|
10336
10337
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
10337
10338
|
|
|
10338
10339
|
"use strict";
|
|
@@ -10342,8 +10343,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
10342
10343
|
value: true
|
|
10343
10344
|
}));
|
|
10344
10345
|
exports["default"] = void 0;
|
|
10345
|
-
var _react =
|
|
10346
|
-
var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"));
|
|
10346
|
+
var _react = __webpack_require__(/*! react */ "react");
|
|
10347
10347
|
var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../node_modules/classnames/index.js"));
|
|
10348
10348
|
var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
10349
10349
|
var _Icon = _interopRequireWildcard(__webpack_require__(/*! ../Icon */ "./components/Icon/index.tsx"));
|
|
@@ -10353,28 +10353,38 @@ var _Tooltip = _interopRequireDefault(__webpack_require__(/*! ../Tooltip */ "./c
|
|
|
10353
10353
|
var _utils = __webpack_require__(/*! ../utils */ "./components/utils.tsx");
|
|
10354
10354
|
__webpack_require__(/*! ./Item.less */ "./components/Item/Item.less");
|
|
10355
10355
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
10356
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10357
10356
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10358
10357
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10358
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10359
10359
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
10360
10360
|
|
|
10361
|
-
const VIEW_SIMPLE = 'simple';
|
|
10362
|
-
const VIEW_CARD = 'card';
|
|
10363
|
-
|
|
10364
10361
|
/**
|
|
10365
10362
|
* `Item` component is element of [ItemList](#!/ItemList) and it is presented as
|
|
10366
10363
|
* a combination of icon, text title and content (similar to [Media](#!/Media)).
|
|
10367
10364
|
* @since 0.0.48
|
|
10368
10365
|
*/
|
|
10369
|
-
|
|
10370
|
-
|
|
10366
|
+
const Item = _ref => {
|
|
10367
|
+
let {
|
|
10368
|
+
children,
|
|
10369
|
+
baseClassName = `${_constants.CLS_PREFIX}item`,
|
|
10370
|
+
component,
|
|
10371
|
+
view = 'simple',
|
|
10372
|
+
className,
|
|
10373
|
+
icon,
|
|
10374
|
+
title,
|
|
10375
|
+
description,
|
|
10376
|
+
footer,
|
|
10377
|
+
value,
|
|
10378
|
+
tooltip,
|
|
10379
|
+
disabled,
|
|
10380
|
+
hoverable,
|
|
10381
|
+
...props
|
|
10382
|
+
} = _ref;
|
|
10383
|
+
const Tag = component || 'div';
|
|
10384
|
+
const renderTitle = () => {
|
|
10371
10385
|
if (!title) {
|
|
10372
10386
|
return null;
|
|
10373
10387
|
}
|
|
10374
|
-
const {
|
|
10375
|
-
baseClassName,
|
|
10376
|
-
view
|
|
10377
|
-
} = this.props;
|
|
10378
10388
|
let wrappable = false;
|
|
10379
10389
|
if (typeof title === 'string') {
|
|
10380
10390
|
title = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -10399,8 +10409,8 @@ class Item extends _react.Component {
|
|
|
10399
10409
|
});
|
|
10400
10410
|
}
|
|
10401
10411
|
return title;
|
|
10402
|
-
}
|
|
10403
|
-
renderIcon(
|
|
10412
|
+
};
|
|
10413
|
+
const renderIcon = () => {
|
|
10404
10414
|
if (!icon) {
|
|
10405
10415
|
return null;
|
|
10406
10416
|
}
|
|
@@ -10413,157 +10423,59 @@ class Item extends _react.Component {
|
|
|
10413
10423
|
return _Icon.default.create(icon, {
|
|
10414
10424
|
size: _Icon.ICON_SIZE_32
|
|
10415
10425
|
});
|
|
10416
|
-
}
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
value,
|
|
10429
|
-
tooltip,
|
|
10430
|
-
disabled,
|
|
10431
|
-
hoverable,
|
|
10432
|
-
...props
|
|
10433
|
-
} = this.props;
|
|
10434
|
-
if (props.onClick) {
|
|
10435
|
-
if (disabled) {
|
|
10436
|
-
props.onClick = e => e.preventDefault();
|
|
10437
|
-
} else {
|
|
10438
|
-
props.tabIndex = 0;
|
|
10439
|
-
props.onKeyDown = (0, _utils.wrapFunction)(props.onKeyDown, e => {
|
|
10440
|
-
if (e.key === 'Enter') {
|
|
10441
|
-
e.preventDefault();
|
|
10442
|
-
e.currentTarget.click();
|
|
10443
|
-
}
|
|
10444
|
-
});
|
|
10445
|
-
}
|
|
10446
|
-
}
|
|
10447
|
-
const item = /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tag, {
|
|
10448
|
-
className: (0, _classnames.default)(baseClassName, {
|
|
10449
|
-
[`${baseClassName}--card`]: view === 'card',
|
|
10450
|
-
[`${baseClassName}--disabled`]: disabled,
|
|
10451
|
-
[`${baseClassName}--hoverable`]: hoverable
|
|
10452
|
-
}, className),
|
|
10453
|
-
...props,
|
|
10454
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Media.default, {
|
|
10455
|
-
image: this.renderIcon(icon),
|
|
10456
|
-
title: this.renderTitle(title),
|
|
10457
|
-
className: `${baseClassName}__media`,
|
|
10458
|
-
children: [description && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
10459
|
-
className: `${baseClassName}__description`,
|
|
10460
|
-
children: description
|
|
10461
|
-
}), _react.Children.toArray(children).length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
10462
|
-
className: `${baseClassName}__content`,
|
|
10463
|
-
children: children
|
|
10464
|
-
}) : null]
|
|
10465
|
-
}), footer && /*#__PURE__*/(0, _jsxRuntime.jsx)("footer", {
|
|
10466
|
-
className: `${baseClassName}__footer`,
|
|
10467
|
-
children: footer
|
|
10468
|
-
})]
|
|
10469
|
-
});
|
|
10470
|
-
if (tooltip) {
|
|
10471
|
-
return (0, _utils.createProxyProps)(props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
10472
|
-
title: tooltip,
|
|
10473
|
-
children: /*#__PURE__*/(0, _react.cloneElement)(item, props)
|
|
10474
|
-
}));
|
|
10426
|
+
};
|
|
10427
|
+
if (props.onClick) {
|
|
10428
|
+
if (disabled) {
|
|
10429
|
+
props.onClick = e => e.preventDefault();
|
|
10430
|
+
} else {
|
|
10431
|
+
props.tabIndex = 0;
|
|
10432
|
+
props.onKeyDown = (0, _utils.wrapFunction)(props.onKeyDown, e => {
|
|
10433
|
+
if (e.key === 'Enter') {
|
|
10434
|
+
e.preventDefault();
|
|
10435
|
+
e.currentTarget.click();
|
|
10436
|
+
}
|
|
10437
|
+
});
|
|
10475
10438
|
}
|
|
10476
|
-
return item;
|
|
10477
10439
|
}
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
*/
|
|
10509
|
-
description: _propTypes.default.node,
|
|
10510
|
-
/**
|
|
10511
|
-
* Content of the `Item`.
|
|
10512
|
-
* @since 0.0.48
|
|
10513
|
-
*/
|
|
10514
|
-
children: _propTypes.default.node,
|
|
10515
|
-
/**
|
|
10516
|
-
* An unique value. It needs only in ItemList with selectable view.
|
|
10517
|
-
* @since 2.3.0
|
|
10518
|
-
*/
|
|
10519
|
-
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
10520
|
-
/**
|
|
10521
|
-
* Tooltip for component.
|
|
10522
|
-
* @since 2.5.1
|
|
10523
|
-
*/
|
|
10524
|
-
tooltip: _propTypes.default.node,
|
|
10525
|
-
/**
|
|
10526
|
-
* @ignore
|
|
10527
|
-
*/
|
|
10528
|
-
className: _propTypes.default.string,
|
|
10529
|
-
/**
|
|
10530
|
-
* @ignore
|
|
10531
|
-
*/
|
|
10532
|
-
baseClassName: _propTypes.default.string,
|
|
10533
|
-
/**
|
|
10534
|
-
* Whether disabled or not.
|
|
10535
|
-
* @since 3.15.0
|
|
10536
|
-
*/
|
|
10537
|
-
disabled: _propTypes.default.bool,
|
|
10538
|
-
/**
|
|
10539
|
-
* Add hover shadow and pointer cursor.
|
|
10540
|
-
* @since 3.26.0
|
|
10541
|
-
*/
|
|
10542
|
-
hoverable: _propTypes.default.bool
|
|
10543
|
-
};
|
|
10544
|
-
Item.defaultProps = {
|
|
10545
|
-
component: 'div',
|
|
10546
|
-
view: VIEW_SIMPLE,
|
|
10547
|
-
hoverable: undefined,
|
|
10548
|
-
title: undefined,
|
|
10549
|
-
description: undefined,
|
|
10550
|
-
icon: undefined,
|
|
10551
|
-
footer: undefined,
|
|
10552
|
-
children: undefined,
|
|
10553
|
-
value: undefined,
|
|
10554
|
-
tooltip: undefined,
|
|
10555
|
-
className: undefined,
|
|
10556
|
-
disabled: undefined,
|
|
10557
|
-
baseClassName: `${_constants.CLS_PREFIX}item`
|
|
10440
|
+
const item = /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tag, {
|
|
10441
|
+
className: (0, _classnames.default)(baseClassName, {
|
|
10442
|
+
[`${baseClassName}--card`]: view === 'card',
|
|
10443
|
+
[`${baseClassName}--disabled`]: disabled,
|
|
10444
|
+
[`${baseClassName}--hoverable`]: hoverable
|
|
10445
|
+
}, className),
|
|
10446
|
+
...props,
|
|
10447
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Media.default, {
|
|
10448
|
+
image: renderIcon(),
|
|
10449
|
+
title: renderTitle(),
|
|
10450
|
+
className: `${baseClassName}__media`,
|
|
10451
|
+
children: [description && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
10452
|
+
className: `${baseClassName}__description`,
|
|
10453
|
+
children: description
|
|
10454
|
+
}), _react.Children.toArray(children).length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
10455
|
+
className: `${baseClassName}__content`,
|
|
10456
|
+
children: children
|
|
10457
|
+
}) : null]
|
|
10458
|
+
}), footer && /*#__PURE__*/(0, _jsxRuntime.jsx)("footer", {
|
|
10459
|
+
className: `${baseClassName}__footer`,
|
|
10460
|
+
children: footer
|
|
10461
|
+
})]
|
|
10462
|
+
});
|
|
10463
|
+
if (tooltip) {
|
|
10464
|
+
return (0, _utils.createProxyProps)(props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
10465
|
+
title: tooltip,
|
|
10466
|
+
children: /*#__PURE__*/(0, _react.cloneElement)(item, props)
|
|
10467
|
+
}));
|
|
10468
|
+
}
|
|
10469
|
+
return item;
|
|
10558
10470
|
};
|
|
10559
10471
|
var _default = exports["default"] = Item;
|
|
10560
10472
|
|
|
10561
10473
|
/***/ }),
|
|
10562
10474
|
|
|
10563
|
-
/***/ "./components/Item/index.
|
|
10564
|
-
|
|
10565
|
-
!*** ./components/Item/index.
|
|
10566
|
-
|
|
10475
|
+
/***/ "./components/Item/index.tsx":
|
|
10476
|
+
/*!***********************************!*\
|
|
10477
|
+
!*** ./components/Item/index.tsx ***!
|
|
10478
|
+
\***********************************/
|
|
10567
10479
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
10568
10480
|
|
|
10569
10481
|
"use strict";
|
|
@@ -10578,7 +10490,7 @@ Object.defineProperty(exports, "default", ({
|
|
|
10578
10490
|
return _Item.default;
|
|
10579
10491
|
}
|
|
10580
10492
|
}));
|
|
10581
|
-
var _Item = _interopRequireDefault(__webpack_require__(/*! ./Item */ "./components/Item/Item.
|
|
10493
|
+
var _Item = _interopRequireDefault(__webpack_require__(/*! ./Item */ "./components/Item/Item.tsx"));
|
|
10582
10494
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10583
10495
|
|
|
10584
10496
|
/***/ }),
|
|
@@ -14824,6 +14736,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
14824
14736
|
exports["default"] = void 0;
|
|
14825
14737
|
var _utils = __webpack_require__(/*! ../../utils */ "./utils.tsx");
|
|
14826
14738
|
var _react = __webpack_require__(/*! react */ "react");
|
|
14739
|
+
var _reactTransitionGroup = __webpack_require__(/*! react-transition-group */ "../node_modules/react-transition-group/esm/index.js");
|
|
14827
14740
|
var _utils2 = __webpack_require__(/*! ../utils */ "./components/utils.tsx");
|
|
14828
14741
|
var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../node_modules/classnames/index.js"));
|
|
14829
14742
|
var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
@@ -14855,18 +14768,8 @@ const OverlayCore = _ref => {
|
|
|
14855
14768
|
onAnimationExited,
|
|
14856
14769
|
...props
|
|
14857
14770
|
} = _ref;
|
|
14858
|
-
const
|
|
14771
|
+
const overlayRef = (0, _react.useRef)(null);
|
|
14859
14772
|
const contentRef = (0, _react.useRef)(null);
|
|
14860
|
-
const prevIsOpen = (0, _react.useRef)(externalIsOpen);
|
|
14861
|
-
if (prevIsOpen.current !== externalIsOpen) {
|
|
14862
|
-
prevIsOpen.current = externalIsOpen;
|
|
14863
|
-
if (externalIsOpen) {
|
|
14864
|
-
clearTimeout(animationTimeoutRef.current);
|
|
14865
|
-
} else {
|
|
14866
|
-
animationTimeoutRef.current = window.setTimeout(onAnimationExited, 300);
|
|
14867
|
-
}
|
|
14868
|
-
}
|
|
14869
|
-
(0, _react.useEffect)(() => () => clearTimeout(animationTimeoutRef.current), []);
|
|
14870
14773
|
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
14871
14774
|
(0, _react.useEffect)(() => setIsOpen(externalIsOpen), [externalIsOpen]);
|
|
14872
14775
|
const focus = () => {
|
|
@@ -14923,28 +14826,39 @@ const OverlayCore = _ref => {
|
|
|
14923
14826
|
};
|
|
14924
14827
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layer.default, {
|
|
14925
14828
|
level: _constants.Z_INDEX_OVERLAY,
|
|
14926
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
14927
|
-
|
|
14829
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
14830
|
+
in: isOpen,
|
|
14831
|
+
timeout: 300,
|
|
14832
|
+
classNames: {
|
|
14833
|
+
enterActive: `${baseClassName}--open`,
|
|
14834
|
+
enterDone: `${baseClassName}--open`
|
|
14835
|
+
},
|
|
14836
|
+
onExited: onAnimationExited,
|
|
14837
|
+
nodeRef: overlayRef,
|
|
14928
14838
|
style: {
|
|
14929
14839
|
'--overlay-side-banner-background': sideBannerContainer?.background,
|
|
14930
14840
|
'--overlay-side-banner-align': sideBannerContainer?.align,
|
|
14931
14841
|
...style
|
|
14932
14842
|
},
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
className: `${baseClassName}
|
|
14936
|
-
|
|
14937
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FocusTrap.default, {
|
|
14938
|
-
className: `${baseClassName}__content`,
|
|
14939
|
-
onKeyUp: canCloseOnEscapePress ? handleContentKeyUp : undefined,
|
|
14940
|
-
ref: contentRef,
|
|
14941
|
-
role: "dialog",
|
|
14942
|
-
"aria-modal": "true",
|
|
14843
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
14844
|
+
ref: overlayRef,
|
|
14845
|
+
className: (0, _classnames.default)(baseClassName, `${baseClassName}--${placement}`, `${baseClassName}--${size}`, sideBanner && `${baseClassName}--side`, className),
|
|
14846
|
+
...props,
|
|
14943
14847
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
14944
|
-
className: `${baseClassName}
|
|
14945
|
-
|
|
14946
|
-
}),
|
|
14947
|
-
|
|
14848
|
+
className: `${baseClassName}__backdrop`,
|
|
14849
|
+
onClick: handleBackdropClick
|
|
14850
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FocusTrap.default, {
|
|
14851
|
+
className: `${baseClassName}__content`,
|
|
14852
|
+
onKeyUp: canCloseOnEscapePress ? handleContentKeyUp : undefined,
|
|
14853
|
+
ref: contentRef,
|
|
14854
|
+
role: "dialog",
|
|
14855
|
+
"aria-modal": "true",
|
|
14856
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
14857
|
+
className: `${baseClassName}__body`,
|
|
14858
|
+
children: children
|
|
14859
|
+
}), sideBanner && renderImage(sideBanner)]
|
|
14860
|
+
})]
|
|
14861
|
+
})
|
|
14948
14862
|
})
|
|
14949
14863
|
});
|
|
14950
14864
|
};
|
|
@@ -15801,7 +15715,7 @@ class Popover extends _react.Component {
|
|
|
15801
15715
|
ghost: true,
|
|
15802
15716
|
icon: {
|
|
15803
15717
|
name: 'cross-mark',
|
|
15804
|
-
size: title ? 16 : 12
|
|
15718
|
+
size: title ? '16' : '12'
|
|
15805
15719
|
}
|
|
15806
15720
|
});
|
|
15807
15721
|
const heading = title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactMeasure.default, {
|
|
@@ -17541,6 +17455,7 @@ class SegmentedControl extends _react.Component {
|
|
|
17541
17455
|
selected: this.props.selected,
|
|
17542
17456
|
monoWidth: 0
|
|
17543
17457
|
});
|
|
17458
|
+
_defineProperty(this, "context", void 0);
|
|
17544
17459
|
_defineProperty(this, "isCompact", false);
|
|
17545
17460
|
_defineProperty(this, "rootRef", /*#__PURE__*/(0, _react.createRef)());
|
|
17546
17461
|
_defineProperty(this, "adjustMonospaced", () => {
|
|
@@ -20075,10 +19990,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20075
19990
|
|
|
20076
19991
|
/***/ }),
|
|
20077
19992
|
|
|
20078
|
-
/***/ "./components/Tabs/SearchBar.
|
|
20079
|
-
|
|
20080
|
-
!*** ./components/Tabs/SearchBar.
|
|
20081
|
-
|
|
19993
|
+
/***/ "./components/Tabs/SearchBar.tsx":
|
|
19994
|
+
/*!***************************************!*\
|
|
19995
|
+
!*** ./components/Tabs/SearchBar.tsx ***!
|
|
19996
|
+
\***************************************/
|
|
20082
19997
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
20083
19998
|
|
|
20084
19999
|
"use strict";
|
|
@@ -20088,24 +20003,23 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
20088
20003
|
value: true
|
|
20089
20004
|
}));
|
|
20090
20005
|
exports["default"] = void 0;
|
|
20091
|
-
var _utils = __webpack_require__(/*! ../../utils */ "./utils.tsx");
|
|
20092
|
-
var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
|
|
20093
|
-
var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"));
|
|
20094
20006
|
var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../node_modules/classnames/index.js"));
|
|
20007
|
+
var _react = __webpack_require__(/*! react */ "react");
|
|
20095
20008
|
var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
20009
|
+
var _utils = __webpack_require__(/*! ../../utils */ "./utils.tsx");
|
|
20010
|
+
var _Badge = _interopRequireDefault(__webpack_require__(/*! ../Badge */ "./components/Badge/index.tsx"));
|
|
20011
|
+
var _Button = _interopRequireDefault(__webpack_require__(/*! ../Button */ "./components/Button/index.tsx"));
|
|
20096
20012
|
var _ButtonGroup = _interopRequireDefault(__webpack_require__(/*! ../ButtonGroup */ "./components/ButtonGroup/index.tsx"));
|
|
20013
|
+
var _DistractionFreeModeContext = _interopRequireDefault(__webpack_require__(/*! ../DistractionFreeModeContext */ "./components/DistractionFreeModeContext/index.tsx"));
|
|
20097
20014
|
var _Input = _interopRequireDefault(__webpack_require__(/*! ../Input */ "./components/Input/index.tsx"));
|
|
20098
|
-
var _Button = _interopRequireDefault(__webpack_require__(/*! ../Button */ "./components/Button/index.tsx"));
|
|
20099
|
-
var _Badge = _interopRequireDefault(__webpack_require__(/*! ../Badge */ "./components/Badge/index.tsx"));
|
|
20100
20015
|
var _Menu = _interopRequireWildcard(__webpack_require__(/*! ../Menu */ "./components/Menu/index.tsx"));
|
|
20101
20016
|
var _ResponsiveContext = _interopRequireDefault(__webpack_require__(/*! ../ResponsiveContext */ "./components/ResponsiveContext/index.tsx"));
|
|
20102
|
-
var _DistractionFreeModeContext = _interopRequireDefault(__webpack_require__(/*! ../DistractionFreeModeContext */ "./components/DistractionFreeModeContext/index.tsx"));
|
|
20103
20017
|
var _utils2 = __webpack_require__(/*! ../utils */ "./components/utils.tsx");
|
|
20104
20018
|
__webpack_require__(/*! ./SearchBar.less */ "./components/Tabs/SearchBar.less");
|
|
20105
20019
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
20106
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20107
20020
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20108
20021
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20022
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20109
20023
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20110
20024
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
20111
20025
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
@@ -20119,10 +20033,11 @@ class SearchBar extends _react.Component {
|
|
|
20119
20033
|
_defineProperty(this, "state", {
|
|
20120
20034
|
focused: false,
|
|
20121
20035
|
overMenu: false,
|
|
20122
|
-
value: this.props.inputProps
|
|
20036
|
+
value: `${this.props.inputProps?.value || ''}`,
|
|
20123
20037
|
highlightedValue: null
|
|
20124
20038
|
});
|
|
20125
20039
|
_defineProperty(this, "isFocusScheduled", false);
|
|
20040
|
+
_defineProperty(this, "search", void 0);
|
|
20126
20041
|
_defineProperty(this, "keyboardNavigation", key => {
|
|
20127
20042
|
const {
|
|
20128
20043
|
onItemSelect,
|
|
@@ -20137,7 +20052,7 @@ class SearchBar extends _react.Component {
|
|
|
20137
20052
|
let nextIndex;
|
|
20138
20053
|
if (key === 'ArrowUp') {
|
|
20139
20054
|
nextIndex = Math.max(currentIndex - 1, 0);
|
|
20140
|
-
} else
|
|
20055
|
+
} else {
|
|
20141
20056
|
nextIndex = Math.min(currentIndex + 1, res.length - 1);
|
|
20142
20057
|
}
|
|
20143
20058
|
this.setState({
|
|
@@ -20172,7 +20087,7 @@ class SearchBar extends _react.Component {
|
|
|
20172
20087
|
} = this.props;
|
|
20173
20088
|
const {
|
|
20174
20089
|
value
|
|
20175
|
-
} = e.
|
|
20090
|
+
} = e.currentTarget;
|
|
20176
20091
|
if (['Enter', 'Escape', 'ArrowUp', 'ArrowDown'].indexOf(e.key) !== -1) {
|
|
20177
20092
|
this.checkKeys(e.key);
|
|
20178
20093
|
return;
|
|
@@ -20251,7 +20166,7 @@ class SearchBar extends _react.Component {
|
|
|
20251
20166
|
} = state;
|
|
20252
20167
|
const nextState = {};
|
|
20253
20168
|
if (inputPropsValue !== prevInputPropsValue) {
|
|
20254
|
-
nextState.value = inputPropsValue;
|
|
20169
|
+
nextState.value = inputPropsValue ?? '';
|
|
20255
20170
|
}
|
|
20256
20171
|
nextState.prevInputProps = props.inputProps;
|
|
20257
20172
|
return nextState;
|
|
@@ -20265,34 +20180,41 @@ class SearchBar extends _react.Component {
|
|
|
20265
20180
|
isResponsive() {
|
|
20266
20181
|
return this.props.responsive;
|
|
20267
20182
|
}
|
|
20268
|
-
getResults() {
|
|
20269
|
-
let innerResults = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
20183
|
+
getResults(innerResults) {
|
|
20270
20184
|
const {
|
|
20271
20185
|
results
|
|
20272
20186
|
} = this.props;
|
|
20273
20187
|
if (!results) {
|
|
20274
20188
|
return [];
|
|
20275
20189
|
}
|
|
20276
|
-
if (results.type === _Menu.default || innerResults) {
|
|
20190
|
+
if ('type' in results && results.type === _Menu.default || innerResults) {
|
|
20277
20191
|
let res = [];
|
|
20278
20192
|
const children = innerResults || results.props.children;
|
|
20193
|
+
if (!Array.isArray(children)) {
|
|
20194
|
+
return res;
|
|
20195
|
+
}
|
|
20279
20196
|
for (let i = 0; i < children.length; i++) {
|
|
20280
20197
|
const child = children[i];
|
|
20281
20198
|
if (!child) {
|
|
20282
20199
|
continue;
|
|
20283
20200
|
}
|
|
20284
|
-
if (child
|
|
20201
|
+
if (_react.Children.count(child) > 1) {
|
|
20285
20202
|
res = res.concat(this.getResults(child));
|
|
20286
|
-
} else if (child.type === _Menu.MenuItem || child.type === _Menu.MenuSelectableItem) {
|
|
20287
|
-
res.push(child.key);
|
|
20203
|
+
} else if ((child.type === _Menu.MenuItem || child.type === _Menu.MenuSelectableItem) && child.key) {
|
|
20204
|
+
res.push(child.key.toString());
|
|
20288
20205
|
}
|
|
20289
20206
|
}
|
|
20290
20207
|
return res;
|
|
20291
20208
|
}
|
|
20292
|
-
return results.map(
|
|
20209
|
+
return results.map(_ref => {
|
|
20210
|
+
let {
|
|
20211
|
+
value
|
|
20212
|
+
} = _ref;
|
|
20213
|
+
return value;
|
|
20214
|
+
});
|
|
20293
20215
|
}
|
|
20294
20216
|
getHighlightedValue() {
|
|
20295
|
-
return this.state.highlightedValue || this.getResults()[0];
|
|
20217
|
+
return (this.state.highlightedValue || this.getResults()[0]) ?? null;
|
|
20296
20218
|
}
|
|
20297
20219
|
searchAction() {
|
|
20298
20220
|
const {
|
|
@@ -20333,12 +20255,15 @@ class SearchBar extends _react.Component {
|
|
|
20333
20255
|
}
|
|
20334
20256
|
elementsIndexToKeyMapping(elements) {
|
|
20335
20257
|
let result = [];
|
|
20258
|
+
if (!Array.isArray(elements)) {
|
|
20259
|
+
return result;
|
|
20260
|
+
}
|
|
20336
20261
|
for (let i = 0; i < elements.length; i++) {
|
|
20337
20262
|
const element = elements[i];
|
|
20338
20263
|
if (!element) {
|
|
20339
20264
|
continue;
|
|
20340
20265
|
}
|
|
20341
|
-
if (element
|
|
20266
|
+
if (Array.isArray(element)) {
|
|
20342
20267
|
result = result.concat(this.elementsIndexToKeyMapping(element));
|
|
20343
20268
|
} else {
|
|
20344
20269
|
result.push(element.key);
|
|
@@ -20346,19 +20271,15 @@ class SearchBar extends _react.Component {
|
|
|
20346
20271
|
}
|
|
20347
20272
|
return result;
|
|
20348
20273
|
}
|
|
20349
|
-
renderResults() {
|
|
20274
|
+
renderResults(results) {
|
|
20350
20275
|
const {
|
|
20351
|
-
baseClassName
|
|
20352
|
-
results
|
|
20276
|
+
baseClassName
|
|
20353
20277
|
} = this.props;
|
|
20354
20278
|
const {
|
|
20355
20279
|
focused,
|
|
20356
20280
|
overMenu
|
|
20357
20281
|
} = this.state;
|
|
20358
20282
|
const highlightedValue = this.getHighlightedValue();
|
|
20359
|
-
if (!results || results.length === 0) {
|
|
20360
|
-
return null;
|
|
20361
|
-
}
|
|
20362
20283
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Menu.default, {
|
|
20363
20284
|
className: (0, _classnames.default)(`${baseClassName}__results`, {
|
|
20364
20285
|
[`${baseClassName}__results--hidden`]: !focused && !overMenu
|
|
@@ -20372,10 +20293,9 @@ class SearchBar extends _react.Component {
|
|
|
20372
20293
|
}, item.value))
|
|
20373
20294
|
});
|
|
20374
20295
|
}
|
|
20375
|
-
renderResultsMenu() {
|
|
20296
|
+
renderResultsMenu(results) {
|
|
20376
20297
|
const {
|
|
20377
20298
|
baseClassName,
|
|
20378
|
-
results,
|
|
20379
20299
|
onItemSelect
|
|
20380
20300
|
} = this.props;
|
|
20381
20301
|
const {
|
|
@@ -20383,21 +20303,18 @@ class SearchBar extends _react.Component {
|
|
|
20383
20303
|
overMenu
|
|
20384
20304
|
} = this.state;
|
|
20385
20305
|
const highlightedValue = this.getHighlightedValue();
|
|
20386
|
-
if (!results) {
|
|
20387
|
-
return null;
|
|
20388
|
-
}
|
|
20389
20306
|
return /*#__PURE__*/(0, _react.cloneElement)(results, {
|
|
20390
20307
|
className: (0, _classnames.default)(`${baseClassName}__results`, {
|
|
20391
20308
|
[`${baseClassName}__results--hidden`]: !focused && !overMenu
|
|
20392
|
-
}, results.className),
|
|
20309
|
+
}, results.props.className),
|
|
20393
20310
|
onMouseOver: this.handleMenuMouseOver,
|
|
20394
20311
|
onMouseOut: this.handleMenuMouseOut,
|
|
20395
|
-
onItemClick: (
|
|
20312
|
+
onItemClick: (_item, index) => {
|
|
20396
20313
|
const indexMap = this.elementsIndexToKeyMapping(results.props.children);
|
|
20397
20314
|
this.handleSelect(indexMap[index])();
|
|
20398
20315
|
},
|
|
20399
20316
|
children: _react.Children.map(results.props.children, child => {
|
|
20400
|
-
if (onItemSelect && child && (child.type === _Menu.MenuItem || child.type === _Menu.MenuSelectableItem)) {
|
|
20317
|
+
if (onItemSelect && child && typeof child === 'object' && 'type' in child && (child.type === _Menu.MenuItem || child.type === _Menu.MenuSelectableItem)) {
|
|
20401
20318
|
return /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
20402
20319
|
active: child.key === highlightedValue
|
|
20403
20320
|
});
|
|
@@ -20435,7 +20352,7 @@ class SearchBar extends _react.Component {
|
|
|
20435
20352
|
className: (0, _classnames.default)(baseClassName, {
|
|
20436
20353
|
[`${baseClassName}--focused`]: focused
|
|
20437
20354
|
}, className),
|
|
20438
|
-
style: isCollapsed || distractionFreeModeEnabled ?
|
|
20355
|
+
style: isCollapsed || distractionFreeModeEnabled ? undefined : {
|
|
20439
20356
|
maxWidth,
|
|
20440
20357
|
minWidth
|
|
20441
20358
|
},
|
|
@@ -20475,128 +20392,21 @@ class SearchBar extends _react.Component {
|
|
|
20475
20392
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
20476
20393
|
icon: "search",
|
|
20477
20394
|
onClick: this.handleSearch,
|
|
20478
|
-
state: loading ? 'loading' :
|
|
20395
|
+
state: loading ? 'loading' : undefined,
|
|
20479
20396
|
ghost: true
|
|
20480
20397
|
})]
|
|
20481
20398
|
})
|
|
20482
20399
|
})
|
|
20483
|
-
}), results && results.type === _Menu.default
|
|
20400
|
+
}), Array.isArray(results) && this.renderResults(results), results && !Array.isArray(results) && results.type === _Menu.default && this.renderResultsMenu(results)]
|
|
20484
20401
|
});
|
|
20485
20402
|
}
|
|
20486
20403
|
}
|
|
20487
|
-
|
|
20488
|
-
/**
|
|
20489
|
-
* @ignore
|
|
20490
|
-
*/
|
|
20491
|
-
className: _propTypes.default.string,
|
|
20492
|
-
/**
|
|
20493
|
-
* @ignore
|
|
20494
|
-
*/
|
|
20495
|
-
baseClassName: _propTypes.default.string,
|
|
20496
|
-
/**
|
|
20497
|
-
* Maximum width of SearchBar
|
|
20498
|
-
* @since 0.1.0
|
|
20499
|
-
*/
|
|
20500
|
-
maxWidth: _propTypes.default.number,
|
|
20501
|
-
/**
|
|
20502
|
-
* Minimum width of SearchBar
|
|
20503
|
-
* @since 0.1.0
|
|
20504
|
-
*/
|
|
20505
|
-
minWidth: _propTypes.default.number,
|
|
20506
|
-
/**
|
|
20507
|
-
* Should disable input and show spinner or not.
|
|
20508
|
-
* @since 0.1.0
|
|
20509
|
-
*/
|
|
20510
|
-
loading: _propTypes.default.bool,
|
|
20511
|
-
/**
|
|
20512
|
-
* Should collapse input or not. Used for control in independence of context.
|
|
20513
|
-
* @since 0.1.0
|
|
20514
|
-
*/
|
|
20515
|
-
responsive: _propTypes.default.bool,
|
|
20516
|
-
/**
|
|
20517
|
-
* Callback for pressing 'Enter' key or 'Search' button.
|
|
20518
|
-
*
|
|
20519
|
-
* arguments:
|
|
20520
|
-
* * value - search value
|
|
20521
|
-
* * clearHandler - function that clears input value
|
|
20522
|
-
* @since 0.1.0
|
|
20523
|
-
*/
|
|
20524
|
-
onSearch: _propTypes.default.func,
|
|
20525
|
-
/**
|
|
20526
|
-
* Callback for pressing any key in input. Used for a live search.
|
|
20527
|
-
*
|
|
20528
|
-
* arguments:
|
|
20529
|
-
* * value - search value
|
|
20530
|
-
* * clearHandler - function that clears input value
|
|
20531
|
-
* @since 0.1.0
|
|
20532
|
-
*/
|
|
20533
|
-
onTyping: _propTypes.default.func,
|
|
20534
|
-
/**
|
|
20535
|
-
* Callback for selecting menu item with mouse click or key pressing.
|
|
20536
|
-
*
|
|
20537
|
-
* arguments:
|
|
20538
|
-
* * value - selected value
|
|
20539
|
-
* * clearHandler - function that clears input value
|
|
20540
|
-
* @since 0.1.0
|
|
20541
|
-
*/
|
|
20542
|
-
onItemSelect: _propTypes.default.func,
|
|
20543
|
-
/**
|
|
20544
|
-
* Should render toggle button or not.
|
|
20545
|
-
* @since 2.2.0
|
|
20546
|
-
*/
|
|
20547
|
-
collapsable: _propTypes.default.bool,
|
|
20548
|
-
/**
|
|
20549
|
-
* Callback for pressing toggle button (in normal mode).
|
|
20550
|
-
* @since 2.2.0
|
|
20551
|
-
*/
|
|
20552
|
-
onCollapse: _propTypes.default.func,
|
|
20553
|
-
/**
|
|
20554
|
-
* Callback for pressing toggle button (in collapsed mode).
|
|
20555
|
-
* @since 2.2.0
|
|
20556
|
-
*/
|
|
20557
|
-
onExpand: _propTypes.default.func,
|
|
20558
|
-
/**
|
|
20559
|
-
* Results to display.
|
|
20560
|
-
* Could be specified by array of objects with "value" and "title" properties or by Menu component.
|
|
20561
|
-
* If Menu component is used then key property of MenuItem will be treated as value.
|
|
20562
|
-
* @since 0.1.0
|
|
20563
|
-
*/
|
|
20564
|
-
results: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.shape({
|
|
20565
|
-
value: _propTypes.default.string.isRequired,
|
|
20566
|
-
title: _propTypes.default.string.isRequired
|
|
20567
|
-
})), _propTypes.default.element]),
|
|
20568
|
-
/**
|
|
20569
|
-
* Props of underlying input element.
|
|
20570
|
-
* @since 0.4.1
|
|
20571
|
-
*/
|
|
20572
|
-
inputProps: _propTypes.default.object
|
|
20573
|
-
};
|
|
20574
|
-
const defaultProps = {
|
|
20575
|
-
className: undefined,
|
|
20404
|
+
_defineProperty(SearchBar, "defaultProps", {
|
|
20576
20405
|
baseClassName: `${_constants.CLS_PREFIX}search-bar`,
|
|
20577
20406
|
maxWidth: 500,
|
|
20578
20407
|
minWidth: 270,
|
|
20579
|
-
loading: false,
|
|
20580
|
-
responsive: undefined,
|
|
20581
|
-
onSearch: undefined,
|
|
20582
|
-
onTyping: undefined,
|
|
20583
|
-
onItemSelect: undefined,
|
|
20584
|
-
collapsable: false,
|
|
20585
|
-
onCollapse: undefined,
|
|
20586
|
-
onExpand: undefined,
|
|
20587
|
-
results: undefined,
|
|
20588
20408
|
inputProps: {}
|
|
20589
|
-
};
|
|
20590
|
-
SearchBar.propTypes = {
|
|
20591
|
-
...propTypes,
|
|
20592
|
-
distractionFreeMode: _propTypes.default.shape({
|
|
20593
|
-
enabled: _propTypes.default.bool.isRequired,
|
|
20594
|
-
toggle: _propTypes.default.func.isRequired
|
|
20595
|
-
})
|
|
20596
|
-
};
|
|
20597
|
-
SearchBar.defaultProps = {
|
|
20598
|
-
distractionFreeMode: undefined
|
|
20599
|
-
};
|
|
20409
|
+
});
|
|
20600
20410
|
const SearchBarWrapper = props => {
|
|
20601
20411
|
const distractionFreeMode = (0, _react.useContext)(_DistractionFreeModeContext.default);
|
|
20602
20412
|
let responsive = (0, _react.useContext)(_ResponsiveContext.default);
|
|
@@ -20608,16 +20418,14 @@ const SearchBarWrapper = props => {
|
|
|
20608
20418
|
});
|
|
20609
20419
|
};
|
|
20610
20420
|
SearchBarWrapper.displayName = 'SearchBar';
|
|
20611
|
-
SearchBarWrapper.propTypes = propTypes;
|
|
20612
|
-
SearchBarWrapper.defaultProps = defaultProps;
|
|
20613
20421
|
var _default = exports["default"] = SearchBarWrapper;
|
|
20614
20422
|
|
|
20615
20423
|
/***/ }),
|
|
20616
20424
|
|
|
20617
|
-
/***/ "./components/Tabs/Tab.
|
|
20618
|
-
|
|
20619
|
-
!*** ./components/Tabs/Tab.
|
|
20620
|
-
|
|
20425
|
+
/***/ "./components/Tabs/Tab.tsx":
|
|
20426
|
+
/*!*********************************!*\
|
|
20427
|
+
!*** ./components/Tabs/Tab.tsx ***!
|
|
20428
|
+
\*********************************/
|
|
20621
20429
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
20622
20430
|
|
|
20623
20431
|
"use strict";
|
|
@@ -20627,10 +20435,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
20627
20435
|
value: true
|
|
20628
20436
|
}));
|
|
20629
20437
|
exports["default"] = void 0;
|
|
20630
|
-
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
|
|
20631
|
-
var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"));
|
|
20632
20438
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
20633
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20634
20439
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
20635
20440
|
/* eslint-disable react/no-unused-prop-types */
|
|
20636
20441
|
|
|
@@ -20641,7 +20446,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20641
20446
|
* It can also display a [Label](#!/Label) next to the tab name for showing additional information about its content.
|
|
20642
20447
|
* You can make `Tabs` closeable, for example, if you are using them for opening and displaying files.
|
|
20643
20448
|
* @since 0.0.35
|
|
20644
|
-
*/
|
|
20449
|
+
*/
|
|
20450
|
+
const Tab = _ref => {
|
|
20645
20451
|
let {
|
|
20646
20452
|
children
|
|
20647
20453
|
} = _ref;
|
|
@@ -20649,59 +20455,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20649
20455
|
children: children
|
|
20650
20456
|
});
|
|
20651
20457
|
};
|
|
20652
|
-
Tab.propTypes = {
|
|
20653
|
-
/**
|
|
20654
|
-
* Tab title
|
|
20655
|
-
* @since 0.0.35
|
|
20656
|
-
*/
|
|
20657
|
-
title: _propTypes.default.node.isRequired,
|
|
20658
|
-
/**
|
|
20659
|
-
* Label in tab title
|
|
20660
|
-
* @since 0.0.42
|
|
20661
|
-
*/
|
|
20662
|
-
label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.element]),
|
|
20663
|
-
/**
|
|
20664
|
-
* Name of icon or Icon component for tab
|
|
20665
|
-
* @since 0.0.42
|
|
20666
|
-
*/
|
|
20667
|
-
icon: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]),
|
|
20668
|
-
/**
|
|
20669
|
-
* Activate callback.
|
|
20670
|
-
* @since 0.0.43
|
|
20671
|
-
*/
|
|
20672
|
-
onActivate: _propTypes.default.func,
|
|
20673
|
-
/**
|
|
20674
|
-
* Close callback
|
|
20675
|
-
* @since 0.0.58
|
|
20676
|
-
*/
|
|
20677
|
-
onClose: _propTypes.default.func,
|
|
20678
|
-
/**
|
|
20679
|
-
* Component to render as the root element.
|
|
20680
|
-
* @since 2.5.1
|
|
20681
|
-
*/
|
|
20682
|
-
component: _propTypes.default.elementType,
|
|
20683
|
-
/**
|
|
20684
|
-
* Tab content
|
|
20685
|
-
* @since 0.0.47
|
|
20686
|
-
*/
|
|
20687
|
-
children: _propTypes.default.node
|
|
20688
|
-
};
|
|
20689
|
-
Tab.defaultProps = {
|
|
20690
|
-
label: undefined,
|
|
20691
|
-
icon: undefined,
|
|
20692
|
-
onActivate: undefined,
|
|
20693
|
-
onClose: undefined,
|
|
20694
|
-
children: undefined,
|
|
20695
|
-
component: undefined
|
|
20696
|
-
};
|
|
20697
20458
|
var _default = exports["default"] = Tab;
|
|
20698
20459
|
|
|
20699
20460
|
/***/ }),
|
|
20700
20461
|
|
|
20701
|
-
/***/ "./components/Tabs/Tabs.
|
|
20702
|
-
|
|
20703
|
-
!*** ./components/Tabs/Tabs.
|
|
20704
|
-
|
|
20462
|
+
/***/ "./components/Tabs/Tabs.tsx":
|
|
20463
|
+
/*!**********************************!*\
|
|
20464
|
+
!*** ./components/Tabs/Tabs.tsx ***!
|
|
20465
|
+
\**********************************/
|
|
20705
20466
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
20706
20467
|
|
|
20707
20468
|
"use strict";
|
|
@@ -20711,31 +20472,29 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
20711
20472
|
value: true
|
|
20712
20473
|
}));
|
|
20713
20474
|
exports["default"] = void 0;
|
|
20714
|
-
var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
|
|
20715
|
-
var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"));
|
|
20716
20475
|
var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../node_modules/classnames/index.js"));
|
|
20476
|
+
var _react = __webpack_require__(/*! react */ "react");
|
|
20717
20477
|
var _reactMeasure = _interopRequireDefault(__webpack_require__(/*! react-measure */ "../node_modules/react-measure/dist/index.esm.js"));
|
|
20718
20478
|
var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
20479
|
+
var _Dropdown = _interopRequireDefault(__webpack_require__(/*! ../Dropdown */ "./components/Dropdown/index.tsx"));
|
|
20719
20480
|
var _Icon = _interopRequireWildcard(__webpack_require__(/*! ../Icon */ "./components/Icon/index.tsx"));
|
|
20720
20481
|
var _Label = _interopRequireDefault(__webpack_require__(/*! ../Label */ "./components/Label/index.tsx"));
|
|
20721
|
-
var _Dropdown = _interopRequireDefault(__webpack_require__(/*! ../Dropdown */ "./components/Dropdown/index.tsx"));
|
|
20722
20482
|
var _Menu = _interopRequireWildcard(__webpack_require__(/*! ../Menu */ "./components/Menu/index.tsx"));
|
|
20723
|
-
var _Tab = _interopRequireDefault(__webpack_require__(/*! ./Tab */ "./components/Tabs/Tab.js"));
|
|
20724
20483
|
var _ResponsiveContext = _interopRequireDefault(__webpack_require__(/*! ../ResponsiveContext */ "./components/ResponsiveContext/index.tsx"));
|
|
20725
20484
|
var _utils = __webpack_require__(/*! ../utils */ "./components/utils.tsx");
|
|
20485
|
+
var _Tab = _interopRequireDefault(__webpack_require__(/*! ./Tab */ "./components/Tabs/Tab.tsx"));
|
|
20726
20486
|
__webpack_require__(/*! ../../helpers/base.less */ "./helpers/base.less");
|
|
20727
20487
|
__webpack_require__(/*! ./Tabs.less */ "./components/Tabs/Tabs.less");
|
|
20728
20488
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
20729
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20730
20489
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20731
20490
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20491
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20732
20492
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20733
20493
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
20734
20494
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
20735
20495
|
const ADDON_LEFT_PADDING = 5;
|
|
20736
20496
|
const MIN_ADDON_WIDTH_DEFAULT = 150;
|
|
20737
20497
|
const COLLAPSED_SEARCH_WIDTH = 60;
|
|
20738
|
-
|
|
20739
20498
|
/**
|
|
20740
20499
|
* `Tabs` component is a content area with a group of individual [Tab](#!/Tab) elements, each displaying different content
|
|
20741
20500
|
* in the same screen area. `Tabs` are used when you have too much content to display in one place at the same time, so
|
|
@@ -20751,9 +20510,12 @@ class Tabs extends _react.Component {
|
|
|
20751
20510
|
collapsedLength: 0,
|
|
20752
20511
|
compact: false,
|
|
20753
20512
|
searching: false,
|
|
20754
|
-
monospacedWidth:
|
|
20513
|
+
monospacedWidth: 0
|
|
20755
20514
|
});
|
|
20756
|
-
_defineProperty(this, "widths",
|
|
20515
|
+
_defineProperty(this, "widths", void 0);
|
|
20516
|
+
_defineProperty(this, "addon", void 0);
|
|
20517
|
+
_defineProperty(this, "tabsnavRef", void 0);
|
|
20518
|
+
_defineProperty(this, "moreTabsRef", null);
|
|
20757
20519
|
_defineProperty(this, "checkAdaptive", () => {
|
|
20758
20520
|
let {
|
|
20759
20521
|
compact,
|
|
@@ -20769,12 +20531,12 @@ class Tabs extends _react.Component {
|
|
|
20769
20531
|
widths,
|
|
20770
20532
|
addon
|
|
20771
20533
|
} = this;
|
|
20772
|
-
let monospacedWidth =
|
|
20534
|
+
let monospacedWidth = 0;
|
|
20773
20535
|
const getMonospacedWidth = () => monospacedWidth;
|
|
20774
20536
|
if (!widths) {
|
|
20775
20537
|
return;
|
|
20776
20538
|
}
|
|
20777
|
-
const addonMinWidth = ADDON_LEFT_PADDING + (addonMinWidthProp || (search
|
|
20539
|
+
const addonMinWidth = ADDON_LEFT_PADDING + (addonMinWidthProp || (search?.props.minWidth ?? MIN_ADDON_WIDTH_DEFAULT));
|
|
20778
20540
|
const searchWidth = compact && search ? COLLAPSED_SEARCH_WIDTH + ADDON_LEFT_PADDING : 0;
|
|
20779
20541
|
const {
|
|
20780
20542
|
more,
|
|
@@ -20785,7 +20547,7 @@ class Tabs extends _react.Component {
|
|
|
20785
20547
|
const tabsNumber = tabs.length;
|
|
20786
20548
|
let lastTabIndex = tabsNumber - 1 - collapsedLength;
|
|
20787
20549
|
if (monospaced) {
|
|
20788
|
-
monospacedWidth = tabs.slice(0, lastTabIndex + 1)
|
|
20550
|
+
monospacedWidth = Math.max(...tabs.slice(0, lastTabIndex + 1));
|
|
20789
20551
|
tabs = tabs.map(getMonospacedWidth);
|
|
20790
20552
|
}
|
|
20791
20553
|
const getListWidth = () => {
|
|
@@ -20857,9 +20619,7 @@ class Tabs extends _react.Component {
|
|
|
20857
20619
|
collapsedLength,
|
|
20858
20620
|
monospacedWidth
|
|
20859
20621
|
};
|
|
20860
|
-
const
|
|
20861
|
-
for (let i = 0; i < keys.length; i++) {
|
|
20862
|
-
const key = keys[i];
|
|
20622
|
+
for (const key of Object.keys(newState)) {
|
|
20863
20623
|
if (JSON.stringify(newState[key]) === JSON.stringify(this.state[key])) {
|
|
20864
20624
|
delete newState[key];
|
|
20865
20625
|
}
|
|
@@ -20894,7 +20654,7 @@ class Tabs extends _react.Component {
|
|
|
20894
20654
|
tabs,
|
|
20895
20655
|
more: more.offsetWidth,
|
|
20896
20656
|
container: this.tabsnavRef.offsetWidth,
|
|
20897
|
-
margin: more.offsetWidth - more.querySelector(`.${baseClassName}__link`)
|
|
20657
|
+
margin: more.offsetWidth - (more.querySelector(`.${baseClassName}__link`)?.offsetWidth ?? 0)
|
|
20898
20658
|
};
|
|
20899
20659
|
}
|
|
20900
20660
|
this.checkAdaptive();
|
|
@@ -20958,9 +20718,9 @@ class Tabs extends _react.Component {
|
|
|
20958
20718
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tag, {
|
|
20959
20719
|
className: `${baseClassName}__link`,
|
|
20960
20720
|
role: "tab",
|
|
20961
|
-
"aria-selected": selected ||
|
|
20721
|
+
"aria-selected": selected || undefined,
|
|
20962
20722
|
style: {
|
|
20963
|
-
width: monospacedWidth
|
|
20723
|
+
width: monospacedWidth || undefined
|
|
20964
20724
|
},
|
|
20965
20725
|
onClick: handleClick,
|
|
20966
20726
|
...tabProps,
|
|
@@ -20987,21 +20747,16 @@ class Tabs extends _react.Component {
|
|
|
20987
20747
|
return nextState;
|
|
20988
20748
|
}
|
|
20989
20749
|
componentDidUpdate() {
|
|
20990
|
-
if (!this.widths || this.props.children
|
|
20991
|
-
setTimeout(() => this.handleResize()
|
|
20750
|
+
if (!this.widths || _react.Children.count(this.props.children) !== this.widths.tabs.length) {
|
|
20751
|
+
setTimeout(() => this.handleResize());
|
|
20992
20752
|
}
|
|
20993
20753
|
}
|
|
20994
20754
|
onClick(active) {
|
|
20995
20755
|
this.setState({
|
|
20996
20756
|
active
|
|
20997
20757
|
});
|
|
20998
|
-
const tab = this.props.children[active - 1];
|
|
20999
|
-
|
|
21000
|
-
onActivate
|
|
21001
|
-
} = tab.props;
|
|
21002
|
-
if (onActivate) {
|
|
21003
|
-
onActivate();
|
|
21004
|
-
}
|
|
20758
|
+
const tab = Array.isArray(this.props.children) ? this.props.children[active - 1] : this.props.children;
|
|
20759
|
+
tab?.props?.onActivate?.();
|
|
21005
20760
|
}
|
|
21006
20761
|
renderTabLabel(tabMode, label) {
|
|
21007
20762
|
const {
|
|
@@ -21048,7 +20803,7 @@ class Tabs extends _react.Component {
|
|
|
21048
20803
|
children
|
|
21049
20804
|
} = this.props;
|
|
21050
20805
|
const childrenCount = _react.Children.count(children);
|
|
21051
|
-
if (!childrenCount) {
|
|
20806
|
+
if (!childrenCount || !children) {
|
|
21052
20807
|
return null;
|
|
21053
20808
|
}
|
|
21054
20809
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", {
|
|
@@ -21074,19 +20829,19 @@ class Tabs extends _react.Component {
|
|
|
21074
20829
|
className: (0, _classnames.default)(`${baseClassName}__tab`, closeBlock && `${baseClassName}__tab--closable`),
|
|
21075
20830
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("a", {
|
|
21076
20831
|
className: `${baseClassName}__link`,
|
|
21077
|
-
tabIndex:
|
|
20832
|
+
tabIndex: -1,
|
|
21078
20833
|
style: tabProps.style,
|
|
21079
20834
|
children: [iconBlock, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
21080
20835
|
className: `${baseClassName}__tab-title`,
|
|
21081
20836
|
children: title
|
|
21082
20837
|
}), this.renderTabLabel('tab', label)]
|
|
21083
20838
|
}), closeBlock]
|
|
21084
|
-
}, title);
|
|
20839
|
+
}, `${title}`);
|
|
21085
20840
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
21086
20841
|
className: (0, _classnames.default)(`${baseClassName}__tab`, `${baseClassName}__tab--more`),
|
|
21087
20842
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
21088
20843
|
className: `${baseClassName}__link`,
|
|
21089
|
-
tabIndex:
|
|
20844
|
+
tabIndex: -1,
|
|
21090
20845
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
21091
20846
|
name: "three-dots-horizontal"
|
|
21092
20847
|
})
|
|
@@ -21107,7 +20862,10 @@ class Tabs extends _react.Component {
|
|
|
21107
20862
|
_react.Children.forEach(children, (child, index) => {
|
|
21108
20863
|
const hidden = index > lastTabIndex;
|
|
21109
20864
|
const tabMode = hidden ? 'menu-item' : 'tab';
|
|
21110
|
-
|
|
20865
|
+
const renderedTab = this.renderTabItem(child, index, tabMode);
|
|
20866
|
+
if (renderedTab) {
|
|
20867
|
+
(hidden ? hiddenItems : visibleItems).push(renderedTab);
|
|
20868
|
+
}
|
|
21111
20869
|
});
|
|
21112
20870
|
return {
|
|
21113
20871
|
visibleItems,
|
|
@@ -21137,7 +20895,7 @@ class Tabs extends _react.Component {
|
|
|
21137
20895
|
ref: ref => this.moreTabsRef = ref,
|
|
21138
20896
|
className: (0, _classnames.default)(`${baseClassName}__tab`, moreSelected && `${baseClassName}__tab--selected`, `${baseClassName}__tab--more`),
|
|
21139
20897
|
role: "presentation",
|
|
21140
|
-
"aria-selected": moreSelected ||
|
|
20898
|
+
"aria-selected": moreSelected || undefined,
|
|
21141
20899
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.default, {
|
|
21142
20900
|
className: `${baseClassName}__dropdown`,
|
|
21143
20901
|
menu: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Menu.default, {
|
|
@@ -21147,8 +20905,8 @@ class Tabs extends _react.Component {
|
|
|
21147
20905
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
21148
20906
|
className: `${baseClassName}__link`,
|
|
21149
20907
|
role: "tab",
|
|
21150
|
-
tabIndex:
|
|
21151
|
-
"aria-selected": moreSelected ||
|
|
20908
|
+
tabIndex: 0,
|
|
20909
|
+
"aria-selected": moreSelected || undefined,
|
|
21152
20910
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
21153
20911
|
name: "three-dots-horizontal"
|
|
21154
20912
|
})
|
|
@@ -21162,6 +20920,9 @@ class Tabs extends _react.Component {
|
|
|
21162
20920
|
baseClassName,
|
|
21163
20921
|
search
|
|
21164
20922
|
} = this.props;
|
|
20923
|
+
if (!search) {
|
|
20924
|
+
return null;
|
|
20925
|
+
}
|
|
21165
20926
|
const {
|
|
21166
20927
|
compact
|
|
21167
20928
|
} = this.state;
|
|
@@ -21195,7 +20956,8 @@ class Tabs extends _react.Component {
|
|
|
21195
20956
|
if (!childrenCount) {
|
|
21196
20957
|
return null;
|
|
21197
20958
|
}
|
|
21198
|
-
|
|
20959
|
+
const addonElement = addon || placeholder;
|
|
20960
|
+
let addonBlock = addonElement;
|
|
21199
20961
|
const addonProps = {};
|
|
21200
20962
|
let searchBlock = null;
|
|
21201
20963
|
if (search) {
|
|
@@ -21206,19 +20968,21 @@ class Tabs extends _react.Component {
|
|
|
21206
20968
|
};
|
|
21207
20969
|
if (compact) {
|
|
21208
20970
|
if (searching) {
|
|
21209
|
-
searchProps.maxWidth =
|
|
21210
|
-
searchProps.minWidth =
|
|
20971
|
+
searchProps.maxWidth = undefined;
|
|
20972
|
+
searchProps.minWidth = undefined;
|
|
21211
20973
|
searchProps.autoFocus = true;
|
|
21212
20974
|
searchProps.responsive = false;
|
|
21213
20975
|
} else {
|
|
21214
20976
|
searchProps.onSearch = this.handleStartSearching;
|
|
21215
20977
|
}
|
|
21216
20978
|
searchBlock = this.renderSearchBar(searchProps);
|
|
21217
|
-
} else if (
|
|
20979
|
+
} else if (addonElement) {
|
|
21218
20980
|
searchProps.key = 1;
|
|
21219
|
-
addonBlock =
|
|
21220
|
-
|
|
21221
|
-
|
|
20981
|
+
addonBlock = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
20982
|
+
children: [this.renderSearchBar(searchProps), /*#__PURE__*/(0, _react.cloneElement)(addonElement, {
|
|
20983
|
+
key: 2
|
|
20984
|
+
})]
|
|
20985
|
+
});
|
|
21222
20986
|
} else {
|
|
21223
20987
|
addonProps.style = {
|
|
21224
20988
|
maxWidth: search.props.maxWidth
|
|
@@ -21247,9 +21011,10 @@ class Tabs extends _react.Component {
|
|
|
21247
21011
|
let {
|
|
21248
21012
|
measureRef: ref
|
|
21249
21013
|
} = _ref2;
|
|
21250
|
-
|
|
21014
|
+
const fakeTabs = this.renderFakeTabs();
|
|
21015
|
+
return fakeTabs ? /*#__PURE__*/(0, _react.cloneElement)(fakeTabs, {
|
|
21251
21016
|
ref
|
|
21252
|
-
});
|
|
21017
|
+
}) : null;
|
|
21253
21018
|
}
|
|
21254
21019
|
}), searchBlock, addonBlock && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactMeasure.default, {
|
|
21255
21020
|
onResize: this.handleAddonResize,
|
|
@@ -21277,72 +21042,17 @@ class Tabs extends _react.Component {
|
|
|
21277
21042
|
});
|
|
21278
21043
|
}
|
|
21279
21044
|
}
|
|
21280
|
-
Tabs
|
|
21281
|
-
/**
|
|
21282
|
-
* Number of active tab
|
|
21283
|
-
* @since 0.0.35
|
|
21284
|
-
*/
|
|
21285
|
-
active: _propTypes.default.number,
|
|
21286
|
-
/**
|
|
21287
|
-
* Addon for search bar, dropdown etc.
|
|
21288
|
-
* @since 0.0.58
|
|
21289
|
-
*/
|
|
21290
|
-
addon: _propTypes.default.element,
|
|
21291
|
-
/**
|
|
21292
|
-
* Placeholder for search bar, dropdown etc.
|
|
21293
|
-
*
|
|
21294
|
-
* @deprecated Do not use! Use `addon` instead!
|
|
21295
|
-
* @since 0.0.42
|
|
21296
|
-
*/
|
|
21297
|
-
placeholder: _propTypes.default.element,
|
|
21298
|
-
/**
|
|
21299
|
-
* Minimum add-on width in pixels
|
|
21300
|
-
* @since 0.0.58
|
|
21301
|
-
*/
|
|
21302
|
-
addonMinWidth: _propTypes.default.number,
|
|
21303
|
-
/**
|
|
21304
|
-
* Monospaced version of tabs (all visible tabs as wide as widest of them)
|
|
21305
|
-
* @since 0.0.58
|
|
21306
|
-
*/
|
|
21307
|
-
monospaced: _propTypes.default.bool,
|
|
21308
|
-
/**
|
|
21309
|
-
* [SearchBar](#!/SearchBar) element
|
|
21310
|
-
* @since 0.0.58
|
|
21311
|
-
*/
|
|
21312
|
-
search: _propTypes.default.element,
|
|
21313
|
-
/**
|
|
21314
|
-
* [Tabs](#!/Tab)
|
|
21315
|
-
* @since 0.0.47
|
|
21316
|
-
*/
|
|
21317
|
-
children: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.element), _propTypes.default.element]),
|
|
21318
|
-
/**
|
|
21319
|
-
* @ignore
|
|
21320
|
-
*/
|
|
21321
|
-
className: _propTypes.default.string,
|
|
21322
|
-
/**
|
|
21323
|
-
* @ignore
|
|
21324
|
-
*/
|
|
21325
|
-
baseClassName: _propTypes.default.string
|
|
21326
|
-
};
|
|
21327
|
-
Tabs.defaultProps = {
|
|
21328
|
-
active: null,
|
|
21329
|
-
addon: null,
|
|
21330
|
-
placeholder: null,
|
|
21331
|
-
addonMinWidth: null,
|
|
21332
|
-
monospaced: null,
|
|
21333
|
-
search: null,
|
|
21334
|
-
children: null,
|
|
21335
|
-
className: null,
|
|
21045
|
+
_defineProperty(Tabs, "defaultProps", {
|
|
21336
21046
|
baseClassName: `${_constants.CLS_PREFIX}tabs`
|
|
21337
|
-
};
|
|
21047
|
+
});
|
|
21338
21048
|
var _default = exports["default"] = Tabs;
|
|
21339
21049
|
|
|
21340
21050
|
/***/ }),
|
|
21341
21051
|
|
|
21342
|
-
/***/ "./components/Tabs/index.
|
|
21343
|
-
|
|
21344
|
-
!*** ./components/Tabs/index.
|
|
21345
|
-
|
|
21052
|
+
/***/ "./components/Tabs/index.tsx":
|
|
21053
|
+
/*!***********************************!*\
|
|
21054
|
+
!*** ./components/Tabs/index.tsx ***!
|
|
21055
|
+
\***********************************/
|
|
21346
21056
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
21347
21057
|
|
|
21348
21058
|
"use strict";
|
|
@@ -21369,9 +21079,9 @@ Object.defineProperty(exports, "default", ({
|
|
|
21369
21079
|
return _Tabs.default;
|
|
21370
21080
|
}
|
|
21371
21081
|
}));
|
|
21372
|
-
var _Tabs = _interopRequireDefault(__webpack_require__(/*! ./Tabs */ "./components/Tabs/Tabs.
|
|
21373
|
-
var _Tab = _interopRequireDefault(__webpack_require__(/*! ./Tab */ "./components/Tabs/Tab.
|
|
21374
|
-
var _SearchBar = _interopRequireDefault(__webpack_require__(/*! ./SearchBar */ "./components/Tabs/SearchBar.
|
|
21082
|
+
var _Tabs = _interopRequireDefault(__webpack_require__(/*! ./Tabs */ "./components/Tabs/Tabs.tsx"));
|
|
21083
|
+
var _Tab = _interopRequireDefault(__webpack_require__(/*! ./Tab */ "./components/Tabs/Tab.tsx"));
|
|
21084
|
+
var _SearchBar = _interopRequireDefault(__webpack_require__(/*! ./SearchBar */ "./components/Tabs/SearchBar.tsx"));
|
|
21375
21085
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21376
21086
|
|
|
21377
21087
|
/***/ }),
|
|
@@ -22569,6 +22279,7 @@ class ToolbarItem extends _react.Component {
|
|
|
22569
22279
|
_defineProperty(this, "state", {
|
|
22570
22280
|
compact: false
|
|
22571
22281
|
});
|
|
22282
|
+
_defineProperty(this, "context", void 0);
|
|
22572
22283
|
}
|
|
22573
22284
|
componentDidMount() {
|
|
22574
22285
|
const registry = this.context;
|
|
@@ -23401,6 +23112,8 @@ var _exportNames = {
|
|
|
23401
23112
|
SwitchesPanel: true,
|
|
23402
23113
|
SwitchesPanelItem: true,
|
|
23403
23114
|
Tabs: true,
|
|
23115
|
+
Tab: true,
|
|
23116
|
+
SearchBar: true,
|
|
23404
23117
|
Text: true,
|
|
23405
23118
|
Toaster: true,
|
|
23406
23119
|
Toolbar: true,
|
|
@@ -23853,6 +23566,12 @@ Object.defineProperty(exports, "SEGMENTED_CONTROL_BASE_CLASS_NAME", ({
|
|
|
23853
23566
|
return _SegmentedControl.SEGMENTED_CONTROL_BASE_CLASS_NAME;
|
|
23854
23567
|
}
|
|
23855
23568
|
}));
|
|
23569
|
+
Object.defineProperty(exports, "SearchBar", ({
|
|
23570
|
+
enumerable: true,
|
|
23571
|
+
get: function () {
|
|
23572
|
+
return _Tabs.SearchBar;
|
|
23573
|
+
}
|
|
23574
|
+
}));
|
|
23856
23575
|
Object.defineProperty(exports, "Section", ({
|
|
23857
23576
|
enumerable: true,
|
|
23858
23577
|
get: function () {
|
|
@@ -23943,6 +23662,12 @@ Object.defineProperty(exports, "SwitchesPanelItem", ({
|
|
|
23943
23662
|
return _SwitchesPanelItem.default;
|
|
23944
23663
|
}
|
|
23945
23664
|
}));
|
|
23665
|
+
Object.defineProperty(exports, "Tab", ({
|
|
23666
|
+
enumerable: true,
|
|
23667
|
+
get: function () {
|
|
23668
|
+
return _Tabs.Tab;
|
|
23669
|
+
}
|
|
23670
|
+
}));
|
|
23946
23671
|
Object.defineProperty(exports, "Tabs", ({
|
|
23947
23672
|
enumerable: true,
|
|
23948
23673
|
get: function () {
|
|
@@ -24111,7 +23836,7 @@ Object.keys(_Select).forEach(function (key) {
|
|
|
24111
23836
|
}
|
|
24112
23837
|
});
|
|
24113
23838
|
});
|
|
24114
|
-
var _Item = _interopRequireDefault(__webpack_require__(/*! ./Item */ "./components/Item/index.
|
|
23839
|
+
var _Item = _interopRequireDefault(__webpack_require__(/*! ./Item */ "./components/Item/index.tsx"));
|
|
24115
23840
|
var _ItemLink = _interopRequireDefault(__webpack_require__(/*! ./ItemLink */ "./components/ItemLink/index.tsx"));
|
|
24116
23841
|
var _ItemList = _interopRequireDefault(__webpack_require__(/*! ./ItemList */ "./components/ItemList/index.tsx"));
|
|
24117
23842
|
var _Label = _interopRequireDefault(__webpack_require__(/*! ./Label */ "./components/Label/index.tsx"));
|
|
@@ -24177,18 +23902,7 @@ var _Subnav = _interopRequireWildcard(__webpack_require__(/*! ./Subnav */ "./com
|
|
|
24177
23902
|
var _Switch = _interopRequireDefault(__webpack_require__(/*! ./Switch */ "./components/Switch/index.tsx"));
|
|
24178
23903
|
var _SwitchesPanel = _interopRequireDefault(__webpack_require__(/*! ./SwitchesPanel */ "./components/SwitchesPanel/index.tsx"));
|
|
24179
23904
|
var _SwitchesPanelItem = _interopRequireDefault(__webpack_require__(/*! ./SwitchesPanelItem */ "./components/SwitchesPanelItem/index.tsx"));
|
|
24180
|
-
var _Tabs = _interopRequireWildcard(__webpack_require__(/*! ./Tabs */ "./components/Tabs/index.
|
|
24181
|
-
Object.keys(_Tabs).forEach(function (key) {
|
|
24182
|
-
if (key === "default" || key === "__esModule") return;
|
|
24183
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
24184
|
-
if (key in exports && exports[key] === _Tabs[key]) return;
|
|
24185
|
-
Object.defineProperty(exports, key, {
|
|
24186
|
-
enumerable: true,
|
|
24187
|
-
get: function () {
|
|
24188
|
-
return _Tabs[key];
|
|
24189
|
-
}
|
|
24190
|
-
});
|
|
24191
|
-
});
|
|
23905
|
+
var _Tabs = _interopRequireWildcard(__webpack_require__(/*! ./Tabs */ "./components/Tabs/index.tsx"));
|
|
24192
23906
|
var _Text = _interopRequireDefault(__webpack_require__(/*! ./Text */ "./components/Text/index.tsx"));
|
|
24193
23907
|
var _Toaster = _interopRequireDefault(__webpack_require__(/*! ./Toaster */ "./components/Toaster/index.tsx"));
|
|
24194
23908
|
var _Toolbar = _interopRequireWildcard(__webpack_require__(/*! ./Toolbar */ "./components/Toolbar/index.tsx"));
|
|
@@ -78273,7 +77987,7 @@ module.exports = checkPropTypes;
|
|
|
78273
77987
|
|
|
78274
77988
|
|
|
78275
77989
|
|
|
78276
|
-
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/
|
|
77990
|
+
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/react-is/index.js");
|
|
78277
77991
|
var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
|
|
78278
77992
|
|
|
78279
77993
|
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
|
@@ -78892,7 +78606,7 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
|
78892
78606
|
*/
|
|
78893
78607
|
|
|
78894
78608
|
if (true) {
|
|
78895
|
-
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/
|
|
78609
|
+
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/react-is/index.js");
|
|
78896
78610
|
|
|
78897
78611
|
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
78898
78612
|
// http://fb.me/prop-types-in-prod
|
|
@@ -78937,10 +78651,10 @@ module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
|
78937
78651
|
|
|
78938
78652
|
/***/ }),
|
|
78939
78653
|
|
|
78940
|
-
/***/ "../node_modules/
|
|
78941
|
-
|
|
78942
|
-
!*** ../node_modules/
|
|
78943
|
-
|
|
78654
|
+
/***/ "../node_modules/react-is/cjs/react-is.development.js":
|
|
78655
|
+
/*!************************************************************!*\
|
|
78656
|
+
!*** ../node_modules/react-is/cjs/react-is.development.js ***!
|
|
78657
|
+
\************************************************************/
|
|
78944
78658
|
/***/ ((__unused_webpack_module, exports) => {
|
|
78945
78659
|
|
|
78946
78660
|
"use strict";
|
|
@@ -79129,17 +78843,17 @@ exports.typeOf = typeOf;
|
|
|
79129
78843
|
|
|
79130
78844
|
/***/ }),
|
|
79131
78845
|
|
|
79132
|
-
/***/ "../node_modules/
|
|
79133
|
-
|
|
79134
|
-
!*** ../node_modules/
|
|
79135
|
-
|
|
78846
|
+
/***/ "../node_modules/react-is/index.js":
|
|
78847
|
+
/*!*****************************************!*\
|
|
78848
|
+
!*** ../node_modules/react-is/index.js ***!
|
|
78849
|
+
\*****************************************/
|
|
79136
78850
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
79137
78851
|
|
|
79138
78852
|
"use strict";
|
|
79139
78853
|
|
|
79140
78854
|
|
|
79141
78855
|
if (false) {} else {
|
|
79142
|
-
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/
|
|
78856
|
+
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/react-is/cjs/react-is.development.js");
|
|
79143
78857
|
}
|
|
79144
78858
|
|
|
79145
78859
|
|
|
@@ -82696,7 +82410,8 @@ var forceReflow = function forceReflow(node) {
|
|
|
82696
82410
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
82697
82411
|
|
|
82698
82412
|
"use strict";
|
|
82699
|
-
/**
|
|
82413
|
+
/**
|
|
82414
|
+
* @license React
|
|
82700
82415
|
* react-jsx-runtime.development.js
|
|
82701
82416
|
*
|
|
82702
82417
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -82712,59 +82427,25 @@ if (true) {
|
|
|
82712
82427
|
'use strict';
|
|
82713
82428
|
|
|
82714
82429
|
var React = __webpack_require__(/*! react */ "react");
|
|
82715
|
-
var _assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
|
|
82716
82430
|
|
|
82717
82431
|
// ATTENTION
|
|
82718
82432
|
// When adding new symbols to this file,
|
|
82719
82433
|
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
82720
|
-
// The Symbol used to tag the ReactElement-like types.
|
|
82721
|
-
|
|
82722
|
-
var
|
|
82723
|
-
var
|
|
82724
|
-
|
|
82725
|
-
var
|
|
82726
|
-
var
|
|
82727
|
-
var
|
|
82728
|
-
var
|
|
82729
|
-
var
|
|
82730
|
-
var
|
|
82731
|
-
var
|
|
82732
|
-
var
|
|
82733
|
-
var
|
|
82734
|
-
var
|
|
82735
|
-
var REACT_SERVER_BLOCK_TYPE = 0xeada;
|
|
82736
|
-
var REACT_FUNDAMENTAL_TYPE = 0xead5;
|
|
82737
|
-
var REACT_SCOPE_TYPE = 0xead7;
|
|
82738
|
-
var REACT_OPAQUE_ID_TYPE = 0xeae0;
|
|
82739
|
-
var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
|
|
82740
|
-
var REACT_OFFSCREEN_TYPE = 0xeae2;
|
|
82741
|
-
var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
|
|
82742
|
-
|
|
82743
|
-
if (typeof Symbol === 'function' && Symbol.for) {
|
|
82744
|
-
var symbolFor = Symbol.for;
|
|
82745
|
-
REACT_ELEMENT_TYPE = symbolFor('react.element');
|
|
82746
|
-
REACT_PORTAL_TYPE = symbolFor('react.portal');
|
|
82747
|
-
exports.Fragment = symbolFor('react.fragment');
|
|
82748
|
-
REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
|
|
82749
|
-
REACT_PROFILER_TYPE = symbolFor('react.profiler');
|
|
82750
|
-
REACT_PROVIDER_TYPE = symbolFor('react.provider');
|
|
82751
|
-
REACT_CONTEXT_TYPE = symbolFor('react.context');
|
|
82752
|
-
REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
|
|
82753
|
-
REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
|
|
82754
|
-
REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
|
|
82755
|
-
REACT_MEMO_TYPE = symbolFor('react.memo');
|
|
82756
|
-
REACT_LAZY_TYPE = symbolFor('react.lazy');
|
|
82757
|
-
REACT_BLOCK_TYPE = symbolFor('react.block');
|
|
82758
|
-
REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
|
|
82759
|
-
REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
|
|
82760
|
-
REACT_SCOPE_TYPE = symbolFor('react.scope');
|
|
82761
|
-
REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
|
|
82762
|
-
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
|
|
82763
|
-
REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
|
|
82764
|
-
REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
|
|
82765
|
-
}
|
|
82766
|
-
|
|
82767
|
-
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
82434
|
+
// The Symbol used to tag the ReactElement-like types.
|
|
82435
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
82436
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
82437
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
82438
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
82439
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
82440
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
82441
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
82442
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
82443
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
82444
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
82445
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
82446
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
82447
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
82448
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
82768
82449
|
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
82769
82450
|
function getIteratorFn(maybeIterable) {
|
|
82770
82451
|
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
@@ -82784,11 +82465,13 @@ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FI
|
|
|
82784
82465
|
|
|
82785
82466
|
function error(format) {
|
|
82786
82467
|
{
|
|
82787
|
-
|
|
82788
|
-
args
|
|
82789
|
-
|
|
82468
|
+
{
|
|
82469
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
82470
|
+
args[_key2 - 1] = arguments[_key2];
|
|
82471
|
+
}
|
|
82790
82472
|
|
|
82791
|
-
|
|
82473
|
+
printWarning('error', format, args);
|
|
82474
|
+
}
|
|
82792
82475
|
}
|
|
82793
82476
|
}
|
|
82794
82477
|
|
|
@@ -82802,10 +82485,11 @@ function printWarning(level, format, args) {
|
|
|
82802
82485
|
if (stack !== '') {
|
|
82803
82486
|
format += '%s';
|
|
82804
82487
|
args = args.concat([stack]);
|
|
82805
|
-
}
|
|
82488
|
+
} // eslint-disable-next-line react-internal/safe-string-coercion
|
|
82489
|
+
|
|
82806
82490
|
|
|
82807
82491
|
var argsWithFormat = args.map(function (item) {
|
|
82808
|
-
return
|
|
82492
|
+
return String(item);
|
|
82809
82493
|
}); // Careful: RN currently depends on this prefix
|
|
82810
82494
|
|
|
82811
82495
|
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
@@ -82816,9 +82500,23 @@ function printWarning(level, format, args) {
|
|
|
82816
82500
|
}
|
|
82817
82501
|
}
|
|
82818
82502
|
|
|
82819
|
-
//
|
|
82503
|
+
// -----------------------------------------------------------------------------
|
|
82820
82504
|
|
|
82821
82505
|
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
82506
|
+
var enableCacheElement = false;
|
|
82507
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
82508
|
+
|
|
82509
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
82510
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
82511
|
+
// issues in DEV builds.
|
|
82512
|
+
|
|
82513
|
+
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
82514
|
+
|
|
82515
|
+
var REACT_MODULE_REFERENCE;
|
|
82516
|
+
|
|
82517
|
+
{
|
|
82518
|
+
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
82519
|
+
}
|
|
82822
82520
|
|
|
82823
82521
|
function isValidElementType(type) {
|
|
82824
82522
|
if (typeof type === 'string' || typeof type === 'function') {
|
|
@@ -82826,12 +82524,16 @@ function isValidElementType(type) {
|
|
|
82826
82524
|
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
82827
82525
|
|
|
82828
82526
|
|
|
82829
|
-
if (type ===
|
|
82527
|
+
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
|
|
82830
82528
|
return true;
|
|
82831
82529
|
}
|
|
82832
82530
|
|
|
82833
82531
|
if (typeof type === 'object' && type !== null) {
|
|
82834
|
-
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
|
82532
|
+
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
82533
|
+
// types supported by any Flight configuration anywhere since
|
|
82534
|
+
// we don't know which Flight build this will end up being used
|
|
82535
|
+
// with.
|
|
82536
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
82835
82537
|
return true;
|
|
82836
82538
|
}
|
|
82837
82539
|
}
|
|
@@ -82840,15 +82542,23 @@ function isValidElementType(type) {
|
|
|
82840
82542
|
}
|
|
82841
82543
|
|
|
82842
82544
|
function getWrappedName(outerType, innerType, wrapperName) {
|
|
82545
|
+
var displayName = outerType.displayName;
|
|
82546
|
+
|
|
82547
|
+
if (displayName) {
|
|
82548
|
+
return displayName;
|
|
82549
|
+
}
|
|
82550
|
+
|
|
82843
82551
|
var functionName = innerType.displayName || innerType.name || '';
|
|
82844
|
-
return
|
|
82845
|
-
}
|
|
82552
|
+
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
82553
|
+
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
|
82554
|
+
|
|
82846
82555
|
|
|
82847
82556
|
function getContextName(type) {
|
|
82848
82557
|
return type.displayName || 'Context';
|
|
82849
|
-
}
|
|
82558
|
+
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
|
|
82559
|
+
|
|
82850
82560
|
|
|
82851
|
-
function
|
|
82561
|
+
function getComponentNameFromType(type) {
|
|
82852
82562
|
if (type == null) {
|
|
82853
82563
|
// Host root, text node or just invalid type.
|
|
82854
82564
|
return null;
|
|
@@ -82856,7 +82566,7 @@ function getComponentName(type) {
|
|
|
82856
82566
|
|
|
82857
82567
|
{
|
|
82858
82568
|
if (typeof type.tag === 'number') {
|
|
82859
|
-
error('Received an unexpected object in
|
|
82569
|
+
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
82860
82570
|
}
|
|
82861
82571
|
}
|
|
82862
82572
|
|
|
@@ -82869,7 +82579,7 @@ function getComponentName(type) {
|
|
|
82869
82579
|
}
|
|
82870
82580
|
|
|
82871
82581
|
switch (type) {
|
|
82872
|
-
case
|
|
82582
|
+
case REACT_FRAGMENT_TYPE:
|
|
82873
82583
|
return 'Fragment';
|
|
82874
82584
|
|
|
82875
82585
|
case REACT_PORTAL_TYPE:
|
|
@@ -82886,6 +82596,7 @@ function getComponentName(type) {
|
|
|
82886
82596
|
|
|
82887
82597
|
case REACT_SUSPENSE_LIST_TYPE:
|
|
82888
82598
|
return 'SuspenseList';
|
|
82599
|
+
|
|
82889
82600
|
}
|
|
82890
82601
|
|
|
82891
82602
|
if (typeof type === 'object') {
|
|
@@ -82902,10 +82613,13 @@ function getComponentName(type) {
|
|
|
82902
82613
|
return getWrappedName(type, type.render, 'ForwardRef');
|
|
82903
82614
|
|
|
82904
82615
|
case REACT_MEMO_TYPE:
|
|
82905
|
-
|
|
82616
|
+
var outerName = type.displayName || null;
|
|
82906
82617
|
|
|
82907
|
-
|
|
82908
|
-
|
|
82618
|
+
if (outerName !== null) {
|
|
82619
|
+
return outerName;
|
|
82620
|
+
}
|
|
82621
|
+
|
|
82622
|
+
return getComponentNameFromType(type.type) || 'Memo';
|
|
82909
82623
|
|
|
82910
82624
|
case REACT_LAZY_TYPE:
|
|
82911
82625
|
{
|
|
@@ -82914,17 +82628,21 @@ function getComponentName(type) {
|
|
|
82914
82628
|
var init = lazyComponent._init;
|
|
82915
82629
|
|
|
82916
82630
|
try {
|
|
82917
|
-
return
|
|
82631
|
+
return getComponentNameFromType(init(payload));
|
|
82918
82632
|
} catch (x) {
|
|
82919
82633
|
return null;
|
|
82920
82634
|
}
|
|
82921
82635
|
}
|
|
82636
|
+
|
|
82637
|
+
// eslint-disable-next-line no-fallthrough
|
|
82922
82638
|
}
|
|
82923
82639
|
}
|
|
82924
82640
|
|
|
82925
82641
|
return null;
|
|
82926
82642
|
}
|
|
82927
82643
|
|
|
82644
|
+
var assign = Object.assign;
|
|
82645
|
+
|
|
82928
82646
|
// Helpers to patch console.logs to avoid logging during side-effect free
|
|
82929
82647
|
// replaying on render function. This currently only patches the object
|
|
82930
82648
|
// lazily which won't cover if the log function was extracted eagerly.
|
|
@@ -82988,25 +82706,25 @@ function reenableLogs() {
|
|
|
82988
82706
|
}; // $FlowFixMe Flow thinks console is immutable.
|
|
82989
82707
|
|
|
82990
82708
|
Object.defineProperties(console, {
|
|
82991
|
-
log:
|
|
82709
|
+
log: assign({}, props, {
|
|
82992
82710
|
value: prevLog
|
|
82993
82711
|
}),
|
|
82994
|
-
info:
|
|
82712
|
+
info: assign({}, props, {
|
|
82995
82713
|
value: prevInfo
|
|
82996
82714
|
}),
|
|
82997
|
-
warn:
|
|
82715
|
+
warn: assign({}, props, {
|
|
82998
82716
|
value: prevWarn
|
|
82999
82717
|
}),
|
|
83000
|
-
error:
|
|
82718
|
+
error: assign({}, props, {
|
|
83001
82719
|
value: prevError
|
|
83002
82720
|
}),
|
|
83003
|
-
group:
|
|
82721
|
+
group: assign({}, props, {
|
|
83004
82722
|
value: prevGroup
|
|
83005
82723
|
}),
|
|
83006
|
-
groupCollapsed:
|
|
82724
|
+
groupCollapsed: assign({}, props, {
|
|
83007
82725
|
value: prevGroupCollapsed
|
|
83008
82726
|
}),
|
|
83009
|
-
groupEnd:
|
|
82727
|
+
groupEnd: assign({}, props, {
|
|
83010
82728
|
value: prevGroupEnd
|
|
83011
82729
|
})
|
|
83012
82730
|
});
|
|
@@ -83047,7 +82765,7 @@ var componentFrameCache;
|
|
|
83047
82765
|
|
|
83048
82766
|
function describeNativeComponentFrame(fn, construct) {
|
|
83049
82767
|
// If something asked for a stack inside a fake render, it should get ignored.
|
|
83050
|
-
if (!fn || reentry) {
|
|
82768
|
+
if ( !fn || reentry) {
|
|
83051
82769
|
return '';
|
|
83052
82770
|
}
|
|
83053
82771
|
|
|
@@ -83156,7 +82874,14 @@ function describeNativeComponentFrame(fn, construct) {
|
|
|
83156
82874
|
|
|
83157
82875
|
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
83158
82876
|
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
83159
|
-
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
|
|
82877
|
+
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
|
|
82878
|
+
// but we have a user-provided "displayName"
|
|
82879
|
+
// splice it in to make the stack more readable.
|
|
82880
|
+
|
|
82881
|
+
|
|
82882
|
+
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
82883
|
+
_frame = _frame.replace('<anonymous>', fn.displayName);
|
|
82884
|
+
}
|
|
83160
82885
|
|
|
83161
82886
|
{
|
|
83162
82887
|
if (typeof fn === 'function') {
|
|
@@ -83241,9 +82966,6 @@ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
|
83241
82966
|
// Memo may contain any component type so we recursively resolve it.
|
|
83242
82967
|
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
83243
82968
|
|
|
83244
|
-
case REACT_BLOCK_TYPE:
|
|
83245
|
-
return describeFunctionComponentFrame(type._render);
|
|
83246
|
-
|
|
83247
82969
|
case REACT_LAZY_TYPE:
|
|
83248
82970
|
{
|
|
83249
82971
|
var lazyComponent = type;
|
|
@@ -83261,6 +82983,8 @@ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
|
83261
82983
|
return '';
|
|
83262
82984
|
}
|
|
83263
82985
|
|
|
82986
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
82987
|
+
|
|
83264
82988
|
var loggedTypeFailures = {};
|
|
83265
82989
|
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
83266
82990
|
|
|
@@ -83279,7 +83003,7 @@ function setCurrentlyValidatingElement(element) {
|
|
|
83279
83003
|
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
83280
83004
|
{
|
|
83281
83005
|
// $FlowFixMe This is okay but Flow doesn't know it.
|
|
83282
|
-
var has = Function.call.bind(
|
|
83006
|
+
var has = Function.call.bind(hasOwnProperty);
|
|
83283
83007
|
|
|
83284
83008
|
for (var typeSpecName in typeSpecs) {
|
|
83285
83009
|
if (has(typeSpecs, typeSpecName)) {
|
|
@@ -83291,6 +83015,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
|
83291
83015
|
// This is intentionally an invariant that gets caught. It's the same
|
|
83292
83016
|
// behavior as without this statement except with a better message.
|
|
83293
83017
|
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
83018
|
+
// eslint-disable-next-line react-internal/prod-error-codes
|
|
83294
83019
|
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
|
|
83295
83020
|
err.name = 'Invariant Violation';
|
|
83296
83021
|
throw err;
|
|
@@ -83324,8 +83049,80 @@ function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
|
83324
83049
|
}
|
|
83325
83050
|
}
|
|
83326
83051
|
|
|
83052
|
+
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
|
83053
|
+
|
|
83054
|
+
function isArray(a) {
|
|
83055
|
+
return isArrayImpl(a);
|
|
83056
|
+
}
|
|
83057
|
+
|
|
83058
|
+
/*
|
|
83059
|
+
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
|
|
83060
|
+
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
|
|
83061
|
+
*
|
|
83062
|
+
* The functions in this module will throw an easier-to-understand,
|
|
83063
|
+
* easier-to-debug exception with a clear errors message message explaining the
|
|
83064
|
+
* problem. (Instead of a confusing exception thrown inside the implementation
|
|
83065
|
+
* of the `value` object).
|
|
83066
|
+
*/
|
|
83067
|
+
// $FlowFixMe only called in DEV, so void return is not possible.
|
|
83068
|
+
function typeName(value) {
|
|
83069
|
+
{
|
|
83070
|
+
// toStringTag is needed for namespaced types like Temporal.Instant
|
|
83071
|
+
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
|
83072
|
+
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
|
83073
|
+
return type;
|
|
83074
|
+
}
|
|
83075
|
+
} // $FlowFixMe only called in DEV, so void return is not possible.
|
|
83076
|
+
|
|
83077
|
+
|
|
83078
|
+
function willCoercionThrow(value) {
|
|
83079
|
+
{
|
|
83080
|
+
try {
|
|
83081
|
+
testStringCoercion(value);
|
|
83082
|
+
return false;
|
|
83083
|
+
} catch (e) {
|
|
83084
|
+
return true;
|
|
83085
|
+
}
|
|
83086
|
+
}
|
|
83087
|
+
}
|
|
83088
|
+
|
|
83089
|
+
function testStringCoercion(value) {
|
|
83090
|
+
// If you ended up here by following an exception call stack, here's what's
|
|
83091
|
+
// happened: you supplied an object or symbol value to React (as a prop, key,
|
|
83092
|
+
// DOM attribute, CSS property, string ref, etc.) and when React tried to
|
|
83093
|
+
// coerce it to a string using `'' + value`, an exception was thrown.
|
|
83094
|
+
//
|
|
83095
|
+
// The most common types that will cause this exception are `Symbol` instances
|
|
83096
|
+
// and Temporal objects like `Temporal.Instant`. But any object that has a
|
|
83097
|
+
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
|
|
83098
|
+
// exception. (Library authors do this to prevent users from using built-in
|
|
83099
|
+
// numeric operators like `+` or comparison operators like `>=` because custom
|
|
83100
|
+
// methods are needed to perform accurate arithmetic or comparison.)
|
|
83101
|
+
//
|
|
83102
|
+
// To fix the problem, coerce this object or symbol value to a string before
|
|
83103
|
+
// passing it to React. The most reliable way is usually `String(value)`.
|
|
83104
|
+
//
|
|
83105
|
+
// To find which value is throwing, check the browser or debugger console.
|
|
83106
|
+
// Before this exception was thrown, there should be `console.error` output
|
|
83107
|
+
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
|
|
83108
|
+
// problem and how that type was used: key, atrribute, input value prop, etc.
|
|
83109
|
+
// In most cases, this console output also shows the component and its
|
|
83110
|
+
// ancestor components where the exception happened.
|
|
83111
|
+
//
|
|
83112
|
+
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
83113
|
+
return '' + value;
|
|
83114
|
+
}
|
|
83115
|
+
function checkKeyStringCoercion(value) {
|
|
83116
|
+
{
|
|
83117
|
+
if (willCoercionThrow(value)) {
|
|
83118
|
+
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
|
|
83119
|
+
|
|
83120
|
+
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
|
|
83121
|
+
}
|
|
83122
|
+
}
|
|
83123
|
+
}
|
|
83124
|
+
|
|
83327
83125
|
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
83328
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
83329
83126
|
var RESERVED_PROPS = {
|
|
83330
83127
|
key: true,
|
|
83331
83128
|
ref: true,
|
|
@@ -83371,10 +83168,10 @@ function hasValidKey(config) {
|
|
|
83371
83168
|
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
83372
83169
|
{
|
|
83373
83170
|
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
|
83374
|
-
var componentName =
|
|
83171
|
+
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
83375
83172
|
|
|
83376
83173
|
if (!didWarnAboutStringRefs[componentName]) {
|
|
83377
|
-
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref',
|
|
83174
|
+
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
|
83378
83175
|
|
|
83379
83176
|
didWarnAboutStringRefs[componentName] = true;
|
|
83380
83177
|
}
|
|
@@ -83513,10 +83310,18 @@ function jsxDEV(type, config, maybeKey, source, self) {
|
|
|
83513
83310
|
// key is explicitly declared to be undefined or not.
|
|
83514
83311
|
|
|
83515
83312
|
if (maybeKey !== undefined) {
|
|
83313
|
+
{
|
|
83314
|
+
checkKeyStringCoercion(maybeKey);
|
|
83315
|
+
}
|
|
83316
|
+
|
|
83516
83317
|
key = '' + maybeKey;
|
|
83517
83318
|
}
|
|
83518
83319
|
|
|
83519
83320
|
if (hasValidKey(config)) {
|
|
83321
|
+
{
|
|
83322
|
+
checkKeyStringCoercion(config.key);
|
|
83323
|
+
}
|
|
83324
|
+
|
|
83520
83325
|
key = '' + config.key;
|
|
83521
83326
|
}
|
|
83522
83327
|
|
|
@@ -83587,6 +83392,7 @@ var propTypesMisspellWarningShown;
|
|
|
83587
83392
|
* @final
|
|
83588
83393
|
*/
|
|
83589
83394
|
|
|
83395
|
+
|
|
83590
83396
|
function isValidElement(object) {
|
|
83591
83397
|
{
|
|
83592
83398
|
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
@@ -83596,7 +83402,7 @@ function isValidElement(object) {
|
|
|
83596
83402
|
function getDeclarationErrorAddendum() {
|
|
83597
83403
|
{
|
|
83598
83404
|
if (ReactCurrentOwner$1.current) {
|
|
83599
|
-
var name =
|
|
83405
|
+
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
83600
83406
|
|
|
83601
83407
|
if (name) {
|
|
83602
83408
|
return '\n\nCheck the render method of `' + name + '`.';
|
|
@@ -83676,7 +83482,7 @@ function validateExplicitKey(element, parentType) {
|
|
|
83676
83482
|
|
|
83677
83483
|
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
83678
83484
|
// Give the component that originally created this child.
|
|
83679
|
-
childOwner = " It was passed a child from " +
|
|
83485
|
+
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
83680
83486
|
}
|
|
83681
83487
|
|
|
83682
83488
|
setCurrentlyValidatingElement$1(element);
|
|
@@ -83703,7 +83509,7 @@ function validateChildKeys(node, parentType) {
|
|
|
83703
83509
|
return;
|
|
83704
83510
|
}
|
|
83705
83511
|
|
|
83706
|
-
if (
|
|
83512
|
+
if (isArray(node)) {
|
|
83707
83513
|
for (var i = 0; i < node.length; i++) {
|
|
83708
83514
|
var child = node[i];
|
|
83709
83515
|
|
|
@@ -83766,12 +83572,12 @@ function validatePropTypes(element) {
|
|
|
83766
83572
|
|
|
83767
83573
|
if (propTypes) {
|
|
83768
83574
|
// Intentionally inside to avoid triggering lazy initializers:
|
|
83769
|
-
var name =
|
|
83575
|
+
var name = getComponentNameFromType(type);
|
|
83770
83576
|
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
|
83771
83577
|
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
83772
83578
|
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
|
83773
83579
|
|
|
83774
|
-
var _name =
|
|
83580
|
+
var _name = getComponentNameFromType(type);
|
|
83775
83581
|
|
|
83776
83582
|
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
|
83777
83583
|
}
|
|
@@ -83838,10 +83644,10 @@ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
|
83838
83644
|
|
|
83839
83645
|
if (type === null) {
|
|
83840
83646
|
typeString = 'null';
|
|
83841
|
-
} else if (
|
|
83647
|
+
} else if (isArray(type)) {
|
|
83842
83648
|
typeString = 'array';
|
|
83843
83649
|
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
83844
|
-
typeString = "<" + (
|
|
83650
|
+
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
|
83845
83651
|
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
83846
83652
|
} else {
|
|
83847
83653
|
typeString = typeof type;
|
|
@@ -83867,7 +83673,7 @@ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
|
83867
83673
|
|
|
83868
83674
|
if (children !== undefined) {
|
|
83869
83675
|
if (isStaticChildren) {
|
|
83870
|
-
if (
|
|
83676
|
+
if (isArray(children)) {
|
|
83871
83677
|
for (var i = 0; i < children.length; i++) {
|
|
83872
83678
|
validateChildKeys(children[i], type);
|
|
83873
83679
|
}
|
|
@@ -83884,7 +83690,7 @@ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
|
83884
83690
|
}
|
|
83885
83691
|
}
|
|
83886
83692
|
|
|
83887
|
-
if (type ===
|
|
83693
|
+
if (type === REACT_FRAGMENT_TYPE) {
|
|
83888
83694
|
validateFragmentProps(element);
|
|
83889
83695
|
} else {
|
|
83890
83696
|
validatePropTypes(element);
|
|
@@ -83913,6 +83719,7 @@ var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs intern
|
|
|
83913
83719
|
|
|
83914
83720
|
var jsxs = jsxWithValidationStatic ;
|
|
83915
83721
|
|
|
83722
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
83916
83723
|
exports.jsx = jsx;
|
|
83917
83724
|
exports.jsxs = jsxs;
|
|
83918
83725
|
})();
|
|
@@ -88128,7 +87935,7 @@ function _setPrototypeOf(o, p) {
|
|
|
88128
87935
|
/***/ ((module) => {
|
|
88129
87936
|
|
|
88130
87937
|
"use strict";
|
|
88131
|
-
module.exports = JSON.parse('{"name":"@plesk/ui-library","version":"3.35.
|
|
87938
|
+
module.exports = JSON.parse('{"name":"@plesk/ui-library","version":"3.35.7","description":"Plesk UI Library","main":"index.js","module":"esm/index.js","types":"./types/src","sideEffects":["cjs/index.js","esm/index.js","dist/*.js","dist/*.css"],"scripts":{"pretest":"yarn lint","test":"jest --ci --coverage --coverageReporters text-summary","test:vr":"cross-env VISUAL_REGRESSION=true jest","build":"yarn build:types && yarn build:umd && yarn build:esm && yarn build:cjs","build:umd":"webpack --config ./configs/build.config.js","build:esm":"cross-env NODE_ENV=esm node ./scripts/build.js","build:cjs":"cross-env NODE_ENV=cjs node ./scripts/build.js","build:types":"rimraf ./types && tsc --project ./configs/types-generator.config.json","create-svg-sprite":"node ./scripts/create-svg-sprite.js","lint":"yarn lint:es && yarn lint:types && yarn lint:style && yarn format:check","lint:es":"eslint --ext js,md,tsx src configs scripts styleguidist","lint:types":"tsc","lint:style":"stylelint \\"{src,styleguidist}/**/*.less\\"","format:check":"prettier --check src","format":"prettier --write src","styleguide":"styleguidist server --config ./configs/styleguide.config.js","styleguide:build":"styleguidist build --config ./configs/styleguide.config.js","prepublishOnly":"yarn install && yarn test && yarn build && yarn styleguide:build","storybook":"webpack serve --config ./configs/storybook.config.js --allowed-hosts all","postinstall":"node ./scripts/postinstall.js"},"files":["esm","cjs","dist","styleguide","types","/scripts/postinstall.js","/index.js"],"dependencies":{"@babel/runtime":"^7.23.1","@plesk/react-movable":"^2.7.1","classnames":"^2.3.2","codemirror":"5.58.2","marked":"4.2.12","memoize-one":"^5.2.1","popper.js":"1.16.1","prop-types":"^15.8.1","react-measure":"2.5.2","react-sortable-hoc":"0.6.8","react-transition-group":"^4.4.5","scroll-into-view-if-needed":"^2.2.31","svg4everybody":"2.1.9","use-focus-visible":"^1.0.2"},"devDependencies":{"@babel/core":"^7.23.0","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.22.15","@babel/preset-env":"^7.22.20","@babel/preset-react":"^7.22.15","@babel/preset-typescript":"^7.23.0","@babel/types":"^7.23.0","@csstools/postcss-logical-float-and-clear":"^1.0.1","@plesk/eslint-config":"^3.0.0","@plesk/stylelint-config":"^2.0.0","@testing-library/dom":"^9.3.3","@testing-library/jest-dom":"^6.1.3","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.5.1","@types/buble":"^0.20.2","@types/classnames":"2.3.1","@types/doctrine":"^0.0.5","@types/jest":"^29.5.5","@types/jest-image-snapshot":"^6.2.1","@types/marked":"^4.3.2","@types/node":"^16.18.58","@types/react":"^18.2.25","@types/react-dom":"^18.2.11","@types/react-measure":"2.0.9","@types/react-transition-group":"^4.4.7","@types/svg4everybody":"2.1.2","@typescript-eslint/eslint-plugin":"^6.7.4","@typescript-eslint/parser":"^6.7.4","autoprefixer":"^10.4.16","babel-loader":"^8.3.0","babel-plugin-transform-require-ignore":"^0.1.1","clean-webpack-plugin":"^4.0.0","cross-env":"^7.0.3","css-loader":"^6.8.1","css-minimizer-webpack-plugin":"^5.0.1","eslint":"^8.51.0","eslint-config-prettier":"^8.10.0","eslint-plugin-markdown":"^3.0.1","html-webpack-plugin":"^5.5.3","jest":"^29.7.0","jest-dev-server":"^9.0.1","jest-environment-jsdom":"^29.7.0","jest-image-snapshot":"^6.2.0","less":"^4.2.0","less-loader":"^11.1.3","mini-css-extract-plugin":"^2.7.6","postcss":"^8.4.31","postcss-less":"^6.0.0","postcss-loader":"^7.3.3","postcss-logical":"^6.2.0","prettier":"^2.8.8","puppeteer-core":"20.4.0","react":"^18.2.0","react-docgen-typescript":"^2.2.2","react-dom":"^18.2.0","react-styleguidist":"^13.1.1","rimraf":"^5.0.5","rtlcss":"^4.1.1","style-loader":"^3.3.3","stylelint":"^15.10.3","stylelint-declaration-block-no-ignored-properties":"^2.7.0","stylelint-no-unsupported-browser-features":"^6.1.0","stylelint-prettier":"^3.0.0","stylelint-use-logical-spec":"^5.0.0","svg-mixer":"^2.3.14","terser-webpack-plugin":"^5.3.9","typescript":"5.2.2","webpack":"^5.88.2","webpack-cli":"^5.1.4"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"resolutions":{"trim":">=0.0.3","postcss":"^8.4.23"},"browserslist":["defaults","not op_mini all","not kaios > 0"],"author":"Plesk Developers <plesk-dev-leads@plesk.com> (https://www.plesk.com/)","license":"Apache-2.0"}');
|
|
88132
87939
|
|
|
88133
87940
|
/***/ }),
|
|
88134
87941
|
|