@plesk/ui-library 3.38.2 → 3.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Button/Button.js +4 -22
- package/cjs/components/Card/CardButton.js +2 -3
- package/cjs/components/CardList/CardListToolbar.js +3 -8
- package/cjs/components/Dialog/Dialog.js +5 -27
- package/cjs/components/Drawer/Drawer.js +7 -20
- package/cjs/components/Dropdown/Dropdown.js +3 -11
- package/cjs/components/FormField/FormField.js +13 -26
- package/cjs/components/Icon/constants.js +2 -2
- package/cjs/components/Icon/images/symbols.svg +9 -1
- package/cjs/components/List/List.js +1 -14
- package/cjs/components/Progress/Progress.js +6 -5
- package/cjs/components/ProgressStep/ProgressStep.js +5 -14
- package/cjs/components/ProgressStep/index.js +6 -0
- package/cjs/components/Section/Section.js +11 -19
- package/cjs/components/SplitButton/SplitButton.js +2 -3
- package/cjs/components/TextArea/TextArea.js +49 -97
- package/cjs/components/TextArea/calculateNodeHeight.js +8 -8
- package/cjs/components/Toolbar/RegistryContextBeta.js +112 -0
- package/cjs/components/Toolbar/Toolbar.js +46 -2
- package/cjs/components/Toolbar/ToolbarBetaProvider.js +23 -0
- package/cjs/components/Toolbar/ToolbarGroup.js +66 -4
- package/cjs/components/Toolbar/ToolbarItem.js +27 -12
- package/cjs/components/Toolbar/ToolbarMenu.js +2 -1
- package/cjs/components/Toolbar/index.js +8 -1
- package/cjs/components/index.js +15 -1
- package/cjs/hooks/index.js +12 -0
- package/cjs/hooks/useResizeObserver.js +29 -0
- package/cjs/hooks/useSqueeze.js +48 -0
- package/cjs/index.js +1 -1
- package/dist/images/symbols.svg +9 -1
- package/dist/plesk-ui-library-rtl.css +1 -1
- package/dist/plesk-ui-library-rtl.css.map +1 -1
- package/dist/plesk-ui-library.css +1 -1
- package/dist/plesk-ui-library.css.map +1 -1
- package/dist/plesk-ui-library.js +591 -309
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +5 -5
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/Button/Button.js +3 -21
- package/esm/components/Card/CardButton.js +2 -3
- package/esm/components/CardList/CardListToolbar.js +3 -8
- package/esm/components/Dialog/Dialog.js +5 -27
- package/esm/components/Drawer/Drawer.js +7 -20
- package/esm/components/Dropdown/Dropdown.js +3 -11
- package/esm/components/FormField/FormField.js +13 -26
- package/esm/components/Icon/constants.js +2 -2
- package/esm/components/Icon/images/symbols.svg +9 -1
- package/esm/components/List/List.js +1 -14
- package/esm/components/Progress/Progress.js +7 -6
- package/esm/components/ProgressStep/ProgressStep.js +4 -13
- package/esm/components/ProgressStep/index.js +1 -1
- package/esm/components/Section/Section.js +11 -19
- package/esm/components/SplitButton/SplitButton.js +2 -3
- package/esm/components/TextArea/TextArea.js +50 -98
- package/esm/components/TextArea/calculateNodeHeight.js +8 -8
- package/esm/components/Toolbar/RegistryContextBeta.js +103 -0
- package/esm/components/Toolbar/Toolbar.js +47 -3
- package/esm/components/Toolbar/ToolbarBetaProvider.js +16 -0
- package/esm/components/Toolbar/ToolbarGroup.js +67 -5
- package/esm/components/Toolbar/ToolbarItem.js +27 -12
- package/esm/components/Toolbar/ToolbarMenu.js +2 -1
- package/esm/components/Toolbar/index.js +2 -1
- package/esm/components/index.js +2 -2
- package/esm/hooks/index.js +3 -0
- package/esm/hooks/useResizeObserver.js +22 -0
- package/esm/hooks/useSqueeze.js +41 -0
- package/esm/index.js +1 -1
- package/package.json +13 -13
- package/styleguide/build/bundle.8f00c54c.js +2 -0
- package/styleguide/images/symbols.svg +9 -1
- package/styleguide/index.html +2 -2
- package/types/src/components/Button/Button.d.ts +1 -0
- package/types/src/components/Dialog/Dialog.d.ts +1 -25
- package/types/src/components/Drawer/Drawer.d.ts +1 -4
- package/types/src/components/FormField/FormField.d.ts +1 -23
- package/types/src/components/Icon/constants.d.ts +1 -1
- package/types/src/components/ProgressStep/ProgressStep.d.ts +2 -13
- package/types/src/components/ProgressStep/index.d.ts +1 -1
- package/types/src/components/Section/Section.d.ts +2 -32
- package/types/src/components/TextArea/TextArea.d.ts +5 -32
- package/types/src/components/TextArea/calculateNodeHeight.d.ts +2 -6
- package/types/src/components/Toolbar/RegistryContextBeta.d.ts +25 -0
- package/types/src/components/Toolbar/Toolbar.d.ts +2 -22
- package/types/src/components/Toolbar/ToolbarBetaProvider.d.ts +5 -0
- package/types/src/components/Toolbar/ToolbarGroup.d.ts +2 -5
- package/types/src/components/Toolbar/ToolbarItem.d.ts +1 -1
- package/types/src/components/Toolbar/index.d.ts +1 -0
- package/types/src/components/index.d.ts +2 -2
- package/types/src/hooks/index.d.ts +1 -0
- package/types/src/hooks/useResizeObserver.d.ts +7 -0
- package/types/src/hooks/useSqueeze.d.ts +10 -0
- package/styleguide/build/bundle.42040fbd.js +0 -2
- /package/styleguide/build/{bundle.42040fbd.js.LICENSE.txt → bundle.8f00c54c.js.LICENSE.txt} +0 -0
package/dist/plesk-ui-library.js
CHANGED
|
@@ -1299,7 +1299,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
1299
1299
|
Object.defineProperty(exports, "__esModule", ({
|
|
1300
1300
|
value: true
|
|
1301
1301
|
}));
|
|
1302
|
-
exports["default"] = void 0;
|
|
1302
|
+
exports["default"] = exports.BUTTON_PROP_NAMES = void 0;
|
|
1303
1303
|
var _react = __webpack_require__(/*! react */ "react");
|
|
1304
1304
|
var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../node_modules/classnames/index.js"));
|
|
1305
1305
|
var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
@@ -1350,6 +1350,9 @@ const renderCaret = _ref2 => {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
return caretElement;
|
|
1352
1352
|
};
|
|
1353
|
+
|
|
1354
|
+
// For ToolbarMenu backward compatibility purposes
|
|
1355
|
+
const BUTTON_PROP_NAMES = exports.BUTTON_PROP_NAMES = ['size', 'intent', 'ghost', 'selected', 'onToggle', 'state', 'disabled', 'tooltip', 'icon', 'caret', 'fill', 'children', 'component', 'className', 'baseClassName', 'arrow', 'onClick'];
|
|
1353
1356
|
const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
1354
1357
|
let {
|
|
1355
1358
|
baseClassName = `${_constants.CLS_PREFIX}button`,
|
|
@@ -1463,27 +1466,6 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
1463
1466
|
});
|
|
1464
1467
|
Button.displayName = 'Button';
|
|
1465
1468
|
|
|
1466
|
-
// For ToolbarMenu backward compatibility purposes
|
|
1467
|
-
Button.defaultProps = {
|
|
1468
|
-
size: undefined,
|
|
1469
|
-
intent: undefined,
|
|
1470
|
-
ghost: false,
|
|
1471
|
-
selected: undefined,
|
|
1472
|
-
onToggle: undefined,
|
|
1473
|
-
state: undefined,
|
|
1474
|
-
disabled: false,
|
|
1475
|
-
tooltip: undefined,
|
|
1476
|
-
icon: undefined,
|
|
1477
|
-
caret: undefined,
|
|
1478
|
-
fill: false,
|
|
1479
|
-
children: undefined,
|
|
1480
|
-
component: 'button',
|
|
1481
|
-
className: undefined,
|
|
1482
|
-
baseClassName: `${_constants.CLS_PREFIX}button`,
|
|
1483
|
-
arrow: undefined,
|
|
1484
|
-
onClick: undefined
|
|
1485
|
-
};
|
|
1486
|
-
|
|
1487
1469
|
/**
|
|
1488
1470
|
* `Button` component is used for executing actions, changing the application state, opening forms or dialog windows, and submitting data.
|
|
1489
1471
|
* As a rule, you should not use buttons for navigation between individual pages (use `Link` instead).
|
|
@@ -2135,10 +2117,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
2135
2117
|
const CardButton = _ref => {
|
|
2136
2118
|
let {
|
|
2137
2119
|
icon,
|
|
2120
|
+
baseClassName = `${_constants.CLS_PREFIX}card-button`,
|
|
2138
2121
|
...props
|
|
2139
2122
|
} = _ref;
|
|
2140
2123
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
2141
2124
|
icon: _Icon.default.create(icon),
|
|
2125
|
+
baseClassName: baseClassName,
|
|
2142
2126
|
...props
|
|
2143
2127
|
});
|
|
2144
2128
|
};
|
|
@@ -2149,9 +2133,6 @@ CardButton.propTypes = {
|
|
|
2149
2133
|
baseClassName: _propTypes.default.string,
|
|
2150
2134
|
icon: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]).isRequired
|
|
2151
2135
|
};
|
|
2152
|
-
CardButton.defaultProps = {
|
|
2153
|
-
baseClassName: `${_constants.CLS_PREFIX}card-button`
|
|
2154
|
-
};
|
|
2155
2136
|
var _default = exports["default"] = CardButton;
|
|
2156
2137
|
|
|
2157
2138
|
/***/ }),
|
|
@@ -2954,9 +2935,9 @@ const renderView = (onViewChange, currentView) => {
|
|
|
2954
2935
|
const isToolbarExpander = element => /*#__PURE__*/(0, _react.isValidElement)(element) && element.type === _Toolbar.ToolbarExpander;
|
|
2955
2936
|
const CardListToolbar = _ref2 => {
|
|
2956
2937
|
let {
|
|
2957
|
-
baseClassName
|
|
2958
|
-
selection,
|
|
2959
|
-
onViewChange,
|
|
2938
|
+
baseClassName = `${_constants.CLS_PREFIX}card-list__toolbar`,
|
|
2939
|
+
selection = null,
|
|
2940
|
+
onViewChange = null,
|
|
2960
2941
|
currentView,
|
|
2961
2942
|
groups
|
|
2962
2943
|
} = _ref2;
|
|
@@ -2987,11 +2968,6 @@ CardListToolbar.propTypes = {
|
|
|
2987
2968
|
currentView: _propTypes.default.string.isRequired,
|
|
2988
2969
|
baseClassName: _propTypes.default.string
|
|
2989
2970
|
};
|
|
2990
|
-
CardListToolbar.defaultProps = {
|
|
2991
|
-
selection: null,
|
|
2992
|
-
onViewChange: null,
|
|
2993
|
-
baseClassName: `${_constants.CLS_PREFIX}card-list__toolbar`
|
|
2994
|
-
};
|
|
2995
2971
|
var _default = exports["default"] = CardListToolbar;
|
|
2996
2972
|
|
|
2997
2973
|
/***/ }),
|
|
@@ -5154,11 +5130,14 @@ const isProps = value => value && typeof value === 'object' && ! /*#__PURE__*/(0
|
|
|
5154
5130
|
*/
|
|
5155
5131
|
const Dialog = _ref => {
|
|
5156
5132
|
let {
|
|
5157
|
-
baseClassName
|
|
5133
|
+
baseClassName = `${_constants.CLS_PREFIX}dialog`,
|
|
5134
|
+
isOpen = false,
|
|
5135
|
+
size = 'md',
|
|
5136
|
+
closable = true,
|
|
5137
|
+
canClose = true,
|
|
5158
5138
|
className,
|
|
5159
5139
|
children,
|
|
5160
5140
|
actions,
|
|
5161
|
-
isOpen,
|
|
5162
5141
|
banner,
|
|
5163
5142
|
image,
|
|
5164
5143
|
title,
|
|
@@ -5167,11 +5146,8 @@ const Dialog = _ref => {
|
|
|
5167
5146
|
cancelButton,
|
|
5168
5147
|
buttons,
|
|
5169
5148
|
form,
|
|
5170
|
-
size,
|
|
5171
|
-
closable,
|
|
5172
5149
|
onClose,
|
|
5173
5150
|
closingConfirmation,
|
|
5174
|
-
canClose,
|
|
5175
5151
|
...props
|
|
5176
5152
|
} = _ref;
|
|
5177
5153
|
const [isVisible, setIsVisible] = (0, _react.useState)(isOpen);
|
|
@@ -5331,28 +5307,6 @@ const Dialog = _ref => {
|
|
|
5331
5307
|
}), closingConfirmationDialog]
|
|
5332
5308
|
});
|
|
5333
5309
|
};
|
|
5334
|
-
Dialog.defaultProps = {
|
|
5335
|
-
isOpen: false,
|
|
5336
|
-
banner: undefined,
|
|
5337
|
-
sideBanner: undefined,
|
|
5338
|
-
sideBannerContainer: undefined,
|
|
5339
|
-
image: undefined,
|
|
5340
|
-
title: undefined,
|
|
5341
|
-
subtitle: undefined,
|
|
5342
|
-
cancelTitle: undefined,
|
|
5343
|
-
cancelButton: undefined,
|
|
5344
|
-
buttons: undefined,
|
|
5345
|
-
actions: undefined,
|
|
5346
|
-
form: undefined,
|
|
5347
|
-
size: 'md',
|
|
5348
|
-
closable: true,
|
|
5349
|
-
canClose: true,
|
|
5350
|
-
onClose: undefined,
|
|
5351
|
-
closingConfirmation: undefined,
|
|
5352
|
-
children: undefined,
|
|
5353
|
-
className: undefined,
|
|
5354
|
-
baseClassName: `${_constants.CLS_PREFIX}dialog`
|
|
5355
|
-
};
|
|
5356
5310
|
var _default = exports["default"] = Dialog;
|
|
5357
5311
|
|
|
5358
5312
|
/***/ }),
|
|
@@ -5455,24 +5409,6 @@ var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/
|
|
|
5455
5409
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5456
5410
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
5457
5411
|
|
|
5458
|
-
const defaultProps = {
|
|
5459
|
-
isOpen: false,
|
|
5460
|
-
subtitle: undefined,
|
|
5461
|
-
backButton: undefined,
|
|
5462
|
-
hideButton: undefined,
|
|
5463
|
-
tabs: undefined,
|
|
5464
|
-
placement: 'left',
|
|
5465
|
-
size: 'md',
|
|
5466
|
-
onClose: undefined,
|
|
5467
|
-
closingConfirmation: undefined,
|
|
5468
|
-
form: undefined,
|
|
5469
|
-
sideBanner: undefined,
|
|
5470
|
-
sideBannerContainer: undefined,
|
|
5471
|
-
progress: undefined,
|
|
5472
|
-
children: null,
|
|
5473
|
-
className: undefined,
|
|
5474
|
-
baseClassName: `${_constants.CLS_PREFIX}drawer`
|
|
5475
|
-
};
|
|
5476
5412
|
/**
|
|
5477
5413
|
* `Drawer` component is used for working with properties of an object (or system) without leaving the context of the object.
|
|
5478
5414
|
* [Read more when to use Drawer](#!/Drawers%2C%20pages%2C%20popovers).
|
|
@@ -5480,7 +5416,10 @@ const defaultProps = {
|
|
|
5480
5416
|
*/
|
|
5481
5417
|
const Drawer = _ref => {
|
|
5482
5418
|
let {
|
|
5483
|
-
baseClassName
|
|
5419
|
+
baseClassName = `${_constants.CLS_PREFIX}drawer`,
|
|
5420
|
+
isOpen = false,
|
|
5421
|
+
placement = 'left',
|
|
5422
|
+
size = 'md',
|
|
5484
5423
|
className,
|
|
5485
5424
|
children,
|
|
5486
5425
|
title,
|
|
@@ -5582,6 +5521,9 @@ const Drawer = _ref => {
|
|
|
5582
5521
|
}, className),
|
|
5583
5522
|
onClose: onCloseWithConfirmation,
|
|
5584
5523
|
canCloseOnBackdropClick: true,
|
|
5524
|
+
isOpen: isOpen,
|
|
5525
|
+
placement: placement,
|
|
5526
|
+
size: size,
|
|
5585
5527
|
...props,
|
|
5586
5528
|
children: [takeApart(_ref5 => {
|
|
5587
5529
|
let {
|
|
@@ -5623,7 +5565,6 @@ const Drawer = _ref => {
|
|
|
5623
5565
|
}), closingConfirmationDialog]
|
|
5624
5566
|
});
|
|
5625
5567
|
};
|
|
5626
|
-
Drawer.defaultProps = defaultProps;
|
|
5627
5568
|
var _default = exports["default"] = Drawer;
|
|
5628
5569
|
|
|
5629
5570
|
/***/ }),
|
|
@@ -6077,12 +6018,12 @@ const useEnhancedMenu = (menu, _ref2) => {
|
|
|
6077
6018
|
*/
|
|
6078
6019
|
const Dropdown = _ref3 => {
|
|
6079
6020
|
let {
|
|
6080
|
-
baseClassName
|
|
6021
|
+
baseClassName = `${_constants.CLS_PREFIX}dropdown`,
|
|
6081
6022
|
className,
|
|
6082
6023
|
children,
|
|
6083
6024
|
menu,
|
|
6084
|
-
menuPlacement,
|
|
6085
|
-
overlay,
|
|
6025
|
+
menuPlacement = 'bottom-start',
|
|
6026
|
+
overlay = false,
|
|
6086
6027
|
locale,
|
|
6087
6028
|
...props
|
|
6088
6029
|
} = _ref3;
|
|
@@ -6151,14 +6092,6 @@ const Dropdown = _ref3 => {
|
|
|
6151
6092
|
})
|
|
6152
6093
|
});
|
|
6153
6094
|
};
|
|
6154
|
-
Dropdown.defaultProps = {
|
|
6155
|
-
menuPlacement: 'bottom-start',
|
|
6156
|
-
children: undefined,
|
|
6157
|
-
overlay: false,
|
|
6158
|
-
className: undefined,
|
|
6159
|
-
baseClassName: `${_constants.CLS_PREFIX}dropdown`,
|
|
6160
|
-
locale: undefined
|
|
6161
|
-
};
|
|
6162
6095
|
var _default = exports["default"] = Dropdown;
|
|
6163
6096
|
|
|
6164
6097
|
/***/ }),
|
|
@@ -7404,28 +7337,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
7404
7337
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
7405
7338
|
const BASE_FORM_FIELD_CLASS_NAME = exports.BASE_FORM_FIELD_CLASS_NAME = `${_constants.CLS_PREFIX}form-field`;
|
|
7406
7339
|
const defaultValue = undefined;
|
|
7407
|
-
const defaultProps = {
|
|
7408
|
-
id: undefined,
|
|
7409
|
-
name: undefined,
|
|
7410
|
-
value: defaultValue,
|
|
7411
|
-
onChange: null,
|
|
7412
|
-
label: undefined,
|
|
7413
|
-
description: undefined,
|
|
7414
|
-
errors: {},
|
|
7415
|
-
required: false,
|
|
7416
|
-
children: undefined,
|
|
7417
|
-
multi: undefined,
|
|
7418
|
-
disabled: undefined,
|
|
7419
|
-
locale: undefined,
|
|
7420
|
-
addMoreValidator: undefined,
|
|
7421
|
-
onRemoveRow: null,
|
|
7422
|
-
fullDescription: undefined,
|
|
7423
|
-
className: undefined,
|
|
7424
|
-
baseClassName: BASE_FORM_FIELD_CLASS_NAME,
|
|
7425
|
-
form: undefined,
|
|
7426
|
-
vertical: undefined,
|
|
7427
|
-
scrollableElement: undefined
|
|
7428
|
-
};
|
|
7429
7340
|
|
|
7430
7341
|
/**
|
|
7431
7342
|
* Simple helper to handle situations when we're expecting only array
|
|
@@ -7831,8 +7742,14 @@ class FormField extends _react.Component {
|
|
|
7831
7742
|
* * [FormFieldSelect](#!/FormFieldSelect), [FormFieldCheckbox](#!/FormFieldCheckbox),
|
|
7832
7743
|
* [FormFieldRadioButtons](#!/FormFieldRadioButtons) for selecting options.
|
|
7833
7744
|
*/
|
|
7834
|
-
|
|
7835
|
-
|
|
7745
|
+
const FormFieldWrapper = _ref => {
|
|
7746
|
+
let {
|
|
7747
|
+
value = defaultValue,
|
|
7748
|
+
errors = {},
|
|
7749
|
+
required = false,
|
|
7750
|
+
baseClassName = BASE_FORM_FIELD_CLASS_NAME,
|
|
7751
|
+
...props
|
|
7752
|
+
} = _ref;
|
|
7836
7753
|
const form = (0, _react.useContext)(_FormContext.default);
|
|
7837
7754
|
const verticalContext = (0, _react.useContext)(_VerticalContext.default);
|
|
7838
7755
|
const vertical = props.vertical === undefined ? verticalContext : props.vertical;
|
|
@@ -7843,11 +7760,14 @@ const FormFieldWrapper = props => {
|
|
|
7843
7760
|
form: form,
|
|
7844
7761
|
vertical: vertical,
|
|
7845
7762
|
scrollableElement: scrollableElement,
|
|
7846
|
-
disabled: props.disabled || disabled
|
|
7763
|
+
disabled: props.disabled || disabled,
|
|
7764
|
+
value: value,
|
|
7765
|
+
errors: errors,
|
|
7766
|
+
required: required,
|
|
7767
|
+
baseClassName: baseClassName
|
|
7847
7768
|
});
|
|
7848
7769
|
};
|
|
7849
7770
|
FormFieldWrapper.displayName = 'FormField';
|
|
7850
|
-
FormFieldWrapper.defaultProps = defaultProps;
|
|
7851
7771
|
var _default = exports["default"] = FormFieldWrapper;
|
|
7852
7772
|
|
|
7853
7773
|
/***/ }),
|
|
@@ -9418,8 +9338,8 @@ exports.NAMES_12 = exports.NAMES = void 0;
|
|
|
9418
9338
|
/* eslint-disable max-len */
|
|
9419
9339
|
// This file is generated by create-svg-sprite. Do not edit.
|
|
9420
9340
|
|
|
9421
|
-
const NAMES_12 = exports.NAMES_12 = ['advisor', 'archive', 'arrow-back', 'arrow-diagonal-out', 'arrow-down', 'arrow-down-circle-filled', 'arrow-down-in', 'arrow-down-out', 'arrow-down-tray', 'arrow-left', 'arrow-left-circle-filled', 'arrow-right', 'arrow-right-circle-filled', 'arrow-right-in', 'arrow-right-out', 'arrow-up', 'arrow-up-circle', 'arrow-up-circle-filled', 'arrow-up-in', 'arrow-up-in-cloud', 'arrow-up-out', 'arrow-up-tray', 'arrows-four-directions', 'arrows-inward', 'arrows-loop', 'arrows-opposite', 'arrows-outward', 'backup', 'backup2', 'bar-chart-vertical', 'bar-chart-vertical-arrow-up', 'bar-chart-vertical-lock', 'bell', 'book-email', 'boundary', 'box-diagonal-bottom-in', 'box-diagonal-top-in', 'brush', 'bug', 'calendar', 'calendar-clock', 'camera', 'card', 'card-ribbon', 'card-row', 'card-tile', 'cd', 'cd-up-in-cloud', 'chain', 'chain-broken', 'chat', 'check-list', 'check-mark', 'check-mark-circle', 'check-mark-circle-filled', 'chevron-double-down', 'chevron-double-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'circle-diagonal', 'clean', 'clip', 'clock', 'clone', 'cloud', 'cloud-checkmark', 'cloud-crossed', 'cloud-graph', 'code', 'connection', 'console', 'console-filled', 'copy', 'copy-indicator', 'cpu', 'crane', 'credit-cards', 'cross-mark', 'cross-mark-circle', 'cross-mark-circle-filled', 'crown-transfer', 'dashboard', 'database', 'database-box', 'database-filled', 'database-plus', 'deploy', 'docker-filled', 'dollar', 'dollar-filled', 'dot', 'dot-big', 'emoticon-confused', 'emoticon-dead', 'emoticon-excited', 'emoticon-happy', 'emoticon-neutral', 'emoticon-sad', 'emoticon-smile', 'enter', 'exclamation-mark-circle', 'exclamation-mark-circle-filled', 'eye', 'eye-closed', 'facebook', 'facebook-filled', 'feedback', 'file', 'filter', 'filter-check-mark', 'fire', 'flag', 'flag-filled', 'flag-globe', 'floppy-disk', 'folder-closed', 'folder-key', 'folder-network', 'folder-open', 'folders-tree', 'forward-circle-filled', 'four-squares', 'gear', 'git', 'github', 'globe', 'hard-drive', 'hard-drive-key', 'hat', 'hexagons', 'home', 'info-circle', 'info-circle-filled', 'ip-addresses', 'joomla', 'kebab', 'key', 'label', 'label-plus', 'laravel', 'lifebuoy', 'lightbulb', 'limit', 'linux', 'list', 'list-check-mark', 'location', 'lock-closed', 'lock-closed-check', 'lock-closed-filled', 'lock-open', 'lock-open-cross', 'lock-open-filled', 'mail', 'mail-circle-filled', 'mail-settings', 'megaphone', 'menu', 'menu-thin', 'microsoft', 'minimize', 'minus', 'minus-circle', 'minus-circle-filled', 'monitoring', 'monitoring-off', 'my-little-admin', 'net', 'nine-dots', 'node-js', 'package', 'panel', 'panel-check', 'panel-eye', 'panel-key', 'panel-settings', 'panels', 'pause-circle', 'pencil', 'pencil-dialog', 'php', 'phpmyadmin', 'pin', 'pipette', 'plans', 'plugins', 'plus', 'plus-circle', 'plus-circle-filled', 'power', 'projects', 'puzzle', 'python', 'question-mark-circle', 'question-mark-circle-filled', 'ram', 'react-js', 'recycle', 'redirect-circle-filled', 'refresh', 'reload', 'remove', 'reset', 'resource', 'ribbon', 'rocket', 'ruby', 'sand-clock', 'scan', 'screen', 'search', 'security-check', 'send', 'server', 'servers', 'share', 'shield', 'shield-attention-filled', 'shield-chain', 'shield-filled', 'shopping-cart', 'sidebar-right-hide', 'sidebar-right-show', 'signal-light', 'site-page', 'sleep', 'sliders', 'square-with-circles', 'ssl-it', 'star', 'star-circle-filled', 'star-filled', 'star-half-filled', 'start', 'start-circle', 'start-filled', 'stop', 'stop-circle', 'storage', 'themes', 'three-dots-horizontal', 'three-dots-vertical', 'tools', 'transfer', 'triangle-exclamation-mark', 'triangle-exclamation-mark-filled', 'unarchive', 'user', 'volume', 'web', 'web-plus', 'web-settings', 'windows', 'woocommerce', 'wordpress', 'wordpress-minus', 'zero-circle-filled'];
|
|
9422
|
-
const NAMES = exports.NAMES = ['advisor', 'archive', 'arrow-back', 'arrow-diagonal-out', 'arrow-down', 'arrow-down-circle-filled', 'arrow-down-in', 'arrow-down-out', 'arrow-down-tray', 'arrow-left', 'arrow-left-circle-filled', 'arrow-right', 'arrow-right-circle-filled', 'arrow-right-in', 'arrow-right-out', 'arrow-up', 'arrow-up-circle', 'arrow-up-circle-filled', 'arrow-up-in', 'arrow-up-in-cloud', 'arrow-up-out', 'arrow-up-tray', 'arrows-four-directions', 'arrows-inward', 'arrows-loop', 'arrows-opposite', 'arrows-outward', 'backup', 'backup2', 'bar-chart-vertical', 'bar-chart-vertical-arrow-up', 'bar-chart-vertical-lock', 'bell', 'book-email', 'boundary', 'box-diagonal-bottom-in', 'box-diagonal-top-in', 'brush', 'bug', 'calendar', 'calendar-clock', 'camera', 'card', 'card-ribbon', 'card-row', 'card-tile', 'cd', 'cd-up-in-cloud', 'chain', 'chain-broken', 'chat', 'check-list', 'check-mark', 'check-mark-circle', 'check-mark-circle-filled', 'chevron-double-down', 'chevron-double-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'circle-diagonal', 'clean', 'clip', 'clock', 'clone', 'cloud', 'cloud-checkmark', 'cloud-crossed', 'cloud-graph', 'code', 'connection', 'console', 'console-filled', 'copy', 'copy-indicator', 'cpu', 'crane', 'credit-cards', 'cross-mark', 'cross-mark-circle', 'cross-mark-circle-filled', 'crown-transfer', 'dashboard', 'database', 'database-box', 'database-filled', 'database-plus', 'deploy', 'docker-filled', 'dollar', 'dollar-filled', 'dot', 'dot-big', 'emoticon-confused', 'emoticon-dead', 'emoticon-excited', 'emoticon-happy', 'emoticon-neutral', 'emoticon-sad', 'emoticon-smile', 'enter', 'exclamation-mark-circle', 'exclamation-mark-circle-filled', 'eye', 'eye-closed', 'facebook', 'facebook-filled', 'feedback', 'file', 'filter', 'filter-check-mark', 'fire', 'flag', 'flag-filled', 'flag-globe', 'floppy-disk', 'folder-closed', 'folder-key', 'folder-network', 'folder-open', 'folders-tree', 'forward-circle-filled', 'four-squares', 'gear', 'git', 'github', 'globe', 'hard-drive', 'hard-drive-key', 'hat', 'hexagons', 'home', 'info-circle', 'info-circle-filled', 'ip-addresses', 'joomla', 'kebab', 'key', 'label', 'label-plus', 'laravel', 'lifebuoy', 'lightbulb', 'limit', 'linux', 'list', 'list-check-mark', 'location', 'lock-closed', 'lock-closed-check', 'lock-closed-filled', 'lock-open', 'lock-open-cross', 'lock-open-filled', 'mail', 'mail-circle-filled', 'mail-settings', 'megaphone', 'menu', 'menu-thin', 'microsoft', 'minimize', 'minus', 'minus-circle', 'minus-circle-filled', 'monitoring', 'monitoring-off', 'my-little-admin', 'net', 'nine-dots', 'node-js', 'package', 'panel', 'panel-check', 'panel-eye', 'panel-key', 'panel-settings', 'panels', 'pause-circle', 'pencil', 'pencil-dialog', 'php', 'phpmyadmin', 'pin', 'pipette', 'plans', 'plugins', 'plus', 'plus-circle', 'plus-circle-filled', 'power', 'projects', 'puzzle', 'python', 'question-mark-circle', 'question-mark-circle-filled', 'ram', 'react-js', 'recycle', 'redirect-circle-filled', 'refresh', 'reload', 'remove', 'reset', 'resource', 'ribbon', 'rocket', 'ruby', 'sand-clock', 'scan', 'screen', 'search', 'security-check', 'send', 'server', 'servers', 'share', 'shield', 'shield-attention-filled', 'shield-chain', 'shield-filled', 'shopping-cart', 'sidebar-right-hide', 'sidebar-right-show', 'signal-light', 'site-page', 'sleep', 'sliders', 'square-with-circles', 'ssl-it', 'star', 'star-circle-filled', 'star-filled', 'star-half-filled', 'start', 'start-circle', 'start-filled', 'stop', 'stop-circle', 'storage', 'themes', 'three-dots-horizontal', 'three-dots-vertical', 'tools', 'transfer', 'triangle-exclamation-mark', 'triangle-exclamation-mark-filled', 'unarchive', 'user', 'volume', 'web', 'web-plus', 'web-settings', 'windows', 'woocommerce', 'wordpress', 'wordpress-minus', 'zero-circle-filled'];
|
|
9341
|
+
const NAMES_12 = exports.NAMES_12 = ['advisor', 'archive', 'arrow-back', 'arrow-diagonal-out', 'arrow-down', 'arrow-down-circle-filled', 'arrow-down-in', 'arrow-down-out', 'arrow-down-tray', 'arrow-left', 'arrow-left-circle-filled', 'arrow-right', 'arrow-right-circle-filled', 'arrow-right-in', 'arrow-right-out', 'arrow-up', 'arrow-up-circle', 'arrow-up-circle-filled', 'arrow-up-in', 'arrow-up-in-cloud', 'arrow-up-out', 'arrow-up-tray', 'arrows-four-directions', 'arrows-inward', 'arrows-loop', 'arrows-opposite', 'arrows-outward', 'backup', 'backup2', 'bar-chart-vertical', 'bar-chart-vertical-arrow-up', 'bar-chart-vertical-lock', 'bell', 'book-email', 'boost', 'boundary', 'box-diagonal-bottom-in', 'box-diagonal-top-in', 'brush', 'bug', 'calendar', 'calendar-clock', 'camera', 'card', 'card-ribbon', 'card-row', 'card-tile', 'cd', 'cd-up-in-cloud', 'chain', 'chain-broken', 'chat', 'check-list', 'check-mark', 'check-mark-circle', 'check-mark-circle-filled', 'chevron-double-down', 'chevron-double-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'circle-diagonal', 'clean', 'clip', 'clock', 'clone', 'cloud', 'cloud-checkmark', 'cloud-crossed', 'cloud-graph', 'code', 'connection', 'console', 'console-filled', 'copy', 'copy-indicator', 'cpu', 'crane', 'credit-cards', 'cross-mark', 'cross-mark-circle', 'cross-mark-circle-filled', 'crown-transfer', 'dashboard', 'database', 'database-box', 'database-filled', 'database-plus', 'deploy', 'docker-filled', 'dollar', 'dollar-filled', 'dot', 'dot-big', 'emoticon-confused', 'emoticon-dead', 'emoticon-excited', 'emoticon-happy', 'emoticon-neutral', 'emoticon-sad', 'emoticon-smile', 'enter', 'exclamation-mark-circle', 'exclamation-mark-circle-filled', 'eye', 'eye-closed', 'facebook', 'facebook-filled', 'feedback', 'file', 'filter', 'filter-check-mark', 'fire', 'flag', 'flag-filled', 'flag-globe', 'floppy-disk', 'folder-closed', 'folder-key', 'folder-network', 'folder-open', 'folders-tree', 'forward-circle-filled', 'four-squares', 'gear', 'git', 'github', 'globe', 'hard-drive', 'hard-drive-key', 'hat', 'hexagons', 'home', 'info-circle', 'info-circle-filled', 'ip-addresses', 'joomla', 'kebab', 'key', 'label', 'label-plus', 'laravel', 'lifebuoy', 'lightbulb', 'limit', 'linux', 'list', 'list-check-mark', 'location', 'lock-closed', 'lock-closed-check', 'lock-closed-filled', 'lock-open', 'lock-open-cross', 'lock-open-filled', 'mail', 'mail-circle-filled', 'mail-settings', 'megaphone', 'menu', 'menu-thin', 'microsoft', 'minimize', 'minus', 'minus-circle', 'minus-circle-filled', 'monitoring', 'monitoring-off', 'my-little-admin', 'net', 'nine-dots', 'node-js', 'package', 'panel', 'panel-check', 'panel-eye', 'panel-key', 'panel-settings', 'panels', 'pause-circle', 'pencil', 'pencil-dialog', 'php', 'phpmyadmin', 'pin', 'pipette', 'plans', 'plugins', 'plus', 'plus-circle', 'plus-circle-filled', 'power', 'projects', 'puzzle', 'python', 'question-mark-circle', 'question-mark-circle-filled', 'ram', 'react-js', 'recycle', 'redirect-circle-filled', 'refresh', 'reload', 'remove', 'reset', 'resource', 'ribbon', 'rocket', 'ruby', 'sand-clock', 'scan', 'screen', 'search', 'security-check', 'send', 'server', 'servers', 'share', 'shield', 'shield-attention-filled', 'shield-chain', 'shield-filled', 'shopping-cart', 'sidebar-right-hide', 'sidebar-right-show', 'signal-light', 'site-page', 'sleep', 'sliders', 'square-with-circles', 'ssl-it', 'star', 'star-circle-filled', 'star-filled', 'star-half-filled', 'start', 'start-circle', 'start-filled', 'stop', 'stop-circle', 'storage', 'themes', 'three-dots-horizontal', 'three-dots-vertical', 'tools', 'transfer', 'triangle-exclamation-mark', 'triangle-exclamation-mark-filled', 'unarchive', 'user', 'volume', 'web', 'web-plus', 'web-settings', 'windows', 'woocommerce', 'wordpress', 'wordpress-minus', 'zero-circle-filled'];
|
|
9342
|
+
const NAMES = exports.NAMES = ['advisor', 'archive', 'arrow-back', 'arrow-diagonal-out', 'arrow-down', 'arrow-down-circle-filled', 'arrow-down-in', 'arrow-down-out', 'arrow-down-tray', 'arrow-left', 'arrow-left-circle-filled', 'arrow-right', 'arrow-right-circle-filled', 'arrow-right-in', 'arrow-right-out', 'arrow-up', 'arrow-up-circle', 'arrow-up-circle-filled', 'arrow-up-in', 'arrow-up-in-cloud', 'arrow-up-out', 'arrow-up-tray', 'arrows-four-directions', 'arrows-inward', 'arrows-loop', 'arrows-opposite', 'arrows-outward', 'backup', 'backup2', 'bar-chart-vertical', 'bar-chart-vertical-arrow-up', 'bar-chart-vertical-lock', 'bell', 'book-email', 'boost', 'boundary', 'box-diagonal-bottom-in', 'box-diagonal-top-in', 'brush', 'bug', 'calendar', 'calendar-clock', 'camera', 'card', 'card-ribbon', 'card-row', 'card-tile', 'cd', 'cd-up-in-cloud', 'chain', 'chain-broken', 'chat', 'check-list', 'check-mark', 'check-mark-circle', 'check-mark-circle-filled', 'chevron-double-down', 'chevron-double-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'circle-diagonal', 'clean', 'clip', 'clock', 'clone', 'cloud', 'cloud-checkmark', 'cloud-crossed', 'cloud-graph', 'code', 'connection', 'console', 'console-filled', 'copy', 'copy-indicator', 'cpu', 'crane', 'credit-cards', 'cross-mark', 'cross-mark-circle', 'cross-mark-circle-filled', 'crown-transfer', 'dashboard', 'database', 'database-box', 'database-filled', 'database-plus', 'deploy', 'docker-filled', 'dollar', 'dollar-filled', 'dot', 'dot-big', 'emoticon-confused', 'emoticon-dead', 'emoticon-excited', 'emoticon-happy', 'emoticon-neutral', 'emoticon-sad', 'emoticon-smile', 'enter', 'exclamation-mark-circle', 'exclamation-mark-circle-filled', 'eye', 'eye-closed', 'facebook', 'facebook-filled', 'feedback', 'file', 'filter', 'filter-check-mark', 'fire', 'flag', 'flag-filled', 'flag-globe', 'floppy-disk', 'folder-closed', 'folder-key', 'folder-network', 'folder-open', 'folders-tree', 'forward-circle-filled', 'four-squares', 'gear', 'git', 'github', 'globe', 'hard-drive', 'hard-drive-key', 'hat', 'hexagons', 'home', 'info-circle', 'info-circle-filled', 'ip-addresses', 'joomla', 'kebab', 'key', 'label', 'label-plus', 'laravel', 'lifebuoy', 'lightbulb', 'limit', 'linux', 'list', 'list-check-mark', 'location', 'lock-closed', 'lock-closed-check', 'lock-closed-filled', 'lock-open', 'lock-open-cross', 'lock-open-filled', 'mail', 'mail-circle-filled', 'mail-settings', 'megaphone', 'menu', 'menu-thin', 'microsoft', 'minimize', 'minus', 'minus-circle', 'minus-circle-filled', 'monitoring', 'monitoring-off', 'my-little-admin', 'net', 'nine-dots', 'node-js', 'package', 'panel', 'panel-check', 'panel-eye', 'panel-key', 'panel-settings', 'panels', 'pause-circle', 'pencil', 'pencil-dialog', 'php', 'phpmyadmin', 'pin', 'pipette', 'plans', 'plugins', 'plus', 'plus-circle', 'plus-circle-filled', 'power', 'projects', 'puzzle', 'python', 'question-mark-circle', 'question-mark-circle-filled', 'ram', 'react-js', 'recycle', 'redirect-circle-filled', 'refresh', 'reload', 'remove', 'reset', 'resource', 'ribbon', 'rocket', 'ruby', 'sand-clock', 'scan', 'screen', 'search', 'security-check', 'send', 'server', 'servers', 'share', 'shield', 'shield-attention-filled', 'shield-chain', 'shield-filled', 'shopping-cart', 'sidebar-right-hide', 'sidebar-right-show', 'signal-light', 'site-page', 'sleep', 'sliders', 'square-with-circles', 'ssl-it', 'star', 'star-circle-filled', 'star-filled', 'star-half-filled', 'start', 'start-circle', 'start-filled', 'stop', 'stop-circle', 'storage', 'themes', 'three-dots-horizontal', 'three-dots-vertical', 'tools', 'transfer', 'triangle-exclamation-mark', 'triangle-exclamation-mark-filled', 'unarchive', 'user', 'volume', 'web', 'web-plus', 'web-settings', 'windows', 'woocommerce', 'wordpress', 'wordpress-minus', 'zero-circle-filled'];
|
|
9423
9343
|
|
|
9424
9344
|
/***/ }),
|
|
9425
9345
|
|
|
@@ -11565,7 +11485,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
11565
11485
|
}));
|
|
11566
11486
|
exports["default"] = void 0;
|
|
11567
11487
|
var _react = __webpack_require__(/*! react */ "react");
|
|
11568
|
-
var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"));
|
|
11569
11488
|
var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../node_modules/classnames/index.js"));
|
|
11570
11489
|
var _reactTransitionGroup = __webpack_require__(/*! react-transition-group */ "../node_modules/react-transition-group/esm/index.js");
|
|
11571
11490
|
var _memoizeOne = _interopRequireDefault(__webpack_require__(/*! memoize-one */ "../node_modules/memoize-one/dist/memoize-one.esm.js"));
|
|
@@ -11604,7 +11523,7 @@ function getRowKey(row, props) {
|
|
|
11604
11523
|
}
|
|
11605
11524
|
const Tbody = _ref => {
|
|
11606
11525
|
let {
|
|
11607
|
-
baseClassName
|
|
11526
|
+
baseClassName = `${_constants.CLS_PREFIX}list__wrapper`,
|
|
11608
11527
|
className,
|
|
11609
11528
|
...props
|
|
11610
11529
|
} = _ref;
|
|
@@ -11622,18 +11541,6 @@ const Tbody = _ref => {
|
|
|
11622
11541
|
})
|
|
11623
11542
|
});
|
|
11624
11543
|
};
|
|
11625
|
-
Tbody.propTypes = {
|
|
11626
|
-
onFocus: _propTypes.default.func,
|
|
11627
|
-
onBlur: _propTypes.default.func,
|
|
11628
|
-
className: _propTypes.default.string,
|
|
11629
|
-
baseClassName: _propTypes.default.string
|
|
11630
|
-
};
|
|
11631
|
-
Tbody.defaultProps = {
|
|
11632
|
-
onFocus: undefined,
|
|
11633
|
-
onBlur: undefined,
|
|
11634
|
-
className: undefined,
|
|
11635
|
-
baseClassName: `${_constants.CLS_PREFIX}list__wrapper`
|
|
11636
|
-
};
|
|
11637
11544
|
const getHumanTotalRows = _ref2 => {
|
|
11638
11545
|
let {
|
|
11639
11546
|
selectedRows,
|
|
@@ -15815,11 +15722,12 @@ class Progress extends _react.Component {
|
|
|
15815
15722
|
let isFailed = false;
|
|
15816
15723
|
if (children) {
|
|
15817
15724
|
_react.Children.forEach(children, child => {
|
|
15818
|
-
if ( /*#__PURE__*/(0, _react.isValidElement)(child)
|
|
15819
|
-
|
|
15820
|
-
|
|
15821
|
-
|
|
15822
|
-
|
|
15725
|
+
if ( /*#__PURE__*/(0, _react.isValidElement)(child)) {
|
|
15726
|
+
const status = child.props.status ?? _ProgressStep.PROGRESS_STEP_DEFAULT_STATUS;
|
|
15727
|
+
isNotStarted = isNotStarted && status === _ProgressStep.STATUS_NOT_STARTED;
|
|
15728
|
+
isFinished = isFinished && status === _ProgressStep.STATUS_DONE;
|
|
15729
|
+
isFinishedWithWarnings = isFinishedWithWarnings && [_ProgressStep.STATUS_DONE, _ProgressStep.STATUS_WARNING].includes(status);
|
|
15730
|
+
isFailed = isFailed || status === _ProgressStep.STATUS_ERROR;
|
|
15823
15731
|
}
|
|
15824
15732
|
});
|
|
15825
15733
|
}
|
|
@@ -16310,7 +16218,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16310
16218
|
Object.defineProperty(exports, "__esModule", ({
|
|
16311
16219
|
value: true
|
|
16312
16220
|
}));
|
|
16313
|
-
exports["default"] = exports.STATUS_WARNING = exports.STATUS_RUNNING = exports.STATUS_NOT_STARTED = exports.STATUS_ERROR = exports.STATUS_DONE = exports.STATUS_CANCELED = void 0;
|
|
16221
|
+
exports["default"] = exports.STATUS_WARNING = exports.STATUS_RUNNING = exports.STATUS_NOT_STARTED = exports.STATUS_ERROR = exports.STATUS_DONE = exports.STATUS_CANCELED = exports.PROGRESS_STEP_DEFAULT_STATUS = void 0;
|
|
16314
16222
|
var _react = __webpack_require__(/*! react */ "react");
|
|
16315
16223
|
var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../node_modules/classnames/index.js"));
|
|
16316
16224
|
var _Icon = _interopRequireWildcard(__webpack_require__(/*! ../Icon */ "./components/Icon/index.tsx"));
|
|
@@ -16332,6 +16240,7 @@ const STATUS_DONE = exports.STATUS_DONE = 'done';
|
|
|
16332
16240
|
const STATUS_WARNING = exports.STATUS_WARNING = 'warning';
|
|
16333
16241
|
const STATUS_ERROR = exports.STATUS_ERROR = 'error';
|
|
16334
16242
|
const STATUS_CANCELED = exports.STATUS_CANCELED = 'canceled';
|
|
16243
|
+
const PROGRESS_STEP_DEFAULT_STATUS = exports.PROGRESS_STEP_DEFAULT_STATUS = STATUS_NOT_STARTED;
|
|
16335
16244
|
/**
|
|
16336
16245
|
* `ProgressStep` is a part of the [Progress](#!/Progress) component.
|
|
16337
16246
|
* @since 1.10.0
|
|
@@ -16343,9 +16252,9 @@ const ProgressStep = _ref => {
|
|
|
16343
16252
|
icon,
|
|
16344
16253
|
title,
|
|
16345
16254
|
statusText,
|
|
16346
|
-
progress,
|
|
16347
|
-
status,
|
|
16348
|
-
baseClassName
|
|
16255
|
+
progress = -1,
|
|
16256
|
+
status = PROGRESS_STEP_DEFAULT_STATUS,
|
|
16257
|
+
baseClassName = `${_constants.CLS_PREFIX}progress-step`,
|
|
16349
16258
|
...props
|
|
16350
16259
|
} = _ref;
|
|
16351
16260
|
let intent = null;
|
|
@@ -16421,16 +16330,6 @@ const ProgressStep = _ref => {
|
|
|
16421
16330
|
})]
|
|
16422
16331
|
});
|
|
16423
16332
|
};
|
|
16424
|
-
ProgressStep.defaultProps = {
|
|
16425
|
-
icon: null,
|
|
16426
|
-
title: null,
|
|
16427
|
-
status: STATUS_NOT_STARTED,
|
|
16428
|
-
statusText: null,
|
|
16429
|
-
progress: -1,
|
|
16430
|
-
children: null,
|
|
16431
|
-
className: null,
|
|
16432
|
-
baseClassName: `${_constants.CLS_PREFIX}progress-step`
|
|
16433
|
-
};
|
|
16434
16333
|
var _default = exports["default"] = ProgressStep;
|
|
16435
16334
|
|
|
16436
16335
|
/***/ }),
|
|
@@ -16447,6 +16346,12 @@ var _default = exports["default"] = ProgressStep;
|
|
|
16447
16346
|
Object.defineProperty(exports, "__esModule", ({
|
|
16448
16347
|
value: true
|
|
16449
16348
|
}));
|
|
16349
|
+
Object.defineProperty(exports, "PROGRESS_STEP_DEFAULT_STATUS", ({
|
|
16350
|
+
enumerable: true,
|
|
16351
|
+
get: function () {
|
|
16352
|
+
return _ProgressStep.PROGRESS_STEP_DEFAULT_STATUS;
|
|
16353
|
+
}
|
|
16354
|
+
}));
|
|
16450
16355
|
Object.defineProperty(exports, "STATUS_CANCELED", ({
|
|
16451
16356
|
enumerable: true,
|
|
16452
16357
|
get: function () {
|
|
@@ -16770,21 +16675,6 @@ const getErrorsForChildren = (form, children) => {
|
|
|
16770
16675
|
return errors;
|
|
16771
16676
|
};
|
|
16772
16677
|
const SECTION_BASE_CLASS_NAME = exports.SECTION_BASE_CLASS_NAME = `${_constants.CLS_PREFIX}section`;
|
|
16773
|
-
const DEFAULT_PROPS = {
|
|
16774
|
-
title: undefined,
|
|
16775
|
-
intent: undefined,
|
|
16776
|
-
collapsible: false,
|
|
16777
|
-
collapsed: false,
|
|
16778
|
-
onTitleChange: undefined,
|
|
16779
|
-
onClose: undefined,
|
|
16780
|
-
onToggle: undefined,
|
|
16781
|
-
buttons: undefined,
|
|
16782
|
-
vertical: undefined,
|
|
16783
|
-
children: undefined,
|
|
16784
|
-
className: undefined,
|
|
16785
|
-
baseClassName: SECTION_BASE_CLASS_NAME,
|
|
16786
|
-
form: undefined
|
|
16787
|
-
};
|
|
16788
16678
|
class Section extends _react.Component {
|
|
16789
16679
|
constructor() {
|
|
16790
16680
|
super(...arguments);
|
|
@@ -16972,19 +16862,26 @@ class Section extends _react.Component {
|
|
|
16972
16862
|
* and comprehension of the presented information.
|
|
16973
16863
|
* @since 0.0.54
|
|
16974
16864
|
*/
|
|
16975
|
-
|
|
16976
|
-
|
|
16865
|
+
const SectionWrapper = _ref8 => {
|
|
16866
|
+
let {
|
|
16867
|
+
collapsible = false,
|
|
16868
|
+
collapsed = false,
|
|
16869
|
+
baseClassName = SECTION_BASE_CLASS_NAME,
|
|
16870
|
+
...props
|
|
16871
|
+
} = _ref8;
|
|
16977
16872
|
const form = (0, _react.useContext)(_FormContext.default);
|
|
16978
16873
|
const verticalContext = (0, _react.useContext)(_VerticalContext.default);
|
|
16979
16874
|
const vertical = props.vertical === undefined ? verticalContext : props.vertical;
|
|
16980
16875
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Section, {
|
|
16981
16876
|
...props,
|
|
16982
16877
|
form: form,
|
|
16983
|
-
vertical: vertical
|
|
16878
|
+
vertical: vertical,
|
|
16879
|
+
collapsible: collapsible,
|
|
16880
|
+
collapsed: collapsed,
|
|
16881
|
+
baseClassName: baseClassName
|
|
16984
16882
|
});
|
|
16985
16883
|
};
|
|
16986
16884
|
SectionWrapper.displayName = 'Section';
|
|
16987
|
-
SectionWrapper.defaultProps = DEFAULT_PROPS;
|
|
16988
16885
|
SectionWrapper.WrappedComponent = Section;
|
|
16989
16886
|
var _default = exports["default"] = SectionWrapper;
|
|
16990
16887
|
|
|
@@ -18477,7 +18374,7 @@ var _utils = __webpack_require__(/*! ../utils */ "./components/utils.tsx");
|
|
|
18477
18374
|
__webpack_require__(/*! ./SplitButton.less */ "./components/SplitButton/SplitButton.less");
|
|
18478
18375
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
18479
18376
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18480
|
-
// Copyright 1999-
|
|
18377
|
+
// Copyright 1999-2024. Plesk International GmbH. All rights reserved.
|
|
18481
18378
|
|
|
18482
18379
|
const focusStrategy = {
|
|
18483
18380
|
getNext(container, element) {
|
|
@@ -18554,8 +18451,7 @@ const SplitButton = _ref => {
|
|
|
18554
18451
|
menuPlacement: "bottom-end",
|
|
18555
18452
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
18556
18453
|
size: size,
|
|
18557
|
-
caret: true
|
|
18558
|
-
tabIndex: -1
|
|
18454
|
+
caret: true
|
|
18559
18455
|
})
|
|
18560
18456
|
})]
|
|
18561
18457
|
});
|
|
@@ -20881,9 +20777,8 @@ var _calculateNodeHeight = _interopRequireDefault(__webpack_require__(/*! ./calc
|
|
|
20881
20777
|
__webpack_require__(/*! ./TextArea.less */ "./components/TextArea/TextArea.less");
|
|
20882
20778
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
20883
20779
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20884
|
-
|
|
20885
|
-
|
|
20886
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
20780
|
+
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
20781
|
+
|
|
20887
20782
|
const getMinMax = rows => {
|
|
20888
20783
|
if (typeof rows === 'number') {
|
|
20889
20784
|
return {
|
|
@@ -20895,111 +20790,64 @@ const getMinMax = rows => {
|
|
|
20895
20790
|
maxRows: rows.max
|
|
20896
20791
|
};
|
|
20897
20792
|
}
|
|
20898
|
-
return
|
|
20793
|
+
return {};
|
|
20899
20794
|
};
|
|
20900
|
-
const AVAILABLE_SIZES = ['sm', 'md', 'lg', 'xl', 'fill'];
|
|
20795
|
+
const AVAILABLE_SIZES = new Set(['sm', 'md', 'lg', 'xl', 'fill']);
|
|
20901
20796
|
|
|
20902
20797
|
/**
|
|
20903
20798
|
* `TextArea` is used for entering long text (like email body, descriptions, comments).
|
|
20904
20799
|
* @since 1.9.0
|
|
20905
20800
|
*/
|
|
20906
|
-
|
|
20907
|
-
|
|
20908
|
-
|
|
20909
|
-
|
|
20910
|
-
|
|
20911
|
-
|
|
20912
|
-
|
|
20913
|
-
|
|
20914
|
-
|
|
20915
|
-
|
|
20916
|
-
|
|
20917
|
-
|
|
20918
|
-
|
|
20919
|
-
|
|
20920
|
-
|
|
20921
|
-
|
|
20922
|
-
|
|
20923
|
-
|
|
20924
|
-
|
|
20925
|
-
|
|
20926
|
-
|
|
20927
|
-
static getDerivedStateFromProps(_ref) {
|
|
20928
|
-
let {
|
|
20929
|
-
rows
|
|
20930
|
-
} = _ref;
|
|
20931
|
-
if (rows) {
|
|
20932
|
-
return getMinMax(rows);
|
|
20933
|
-
}
|
|
20934
|
-
return null;
|
|
20935
|
-
}
|
|
20936
|
-
componentDidMount() {
|
|
20937
|
-
this.adjustHeight();
|
|
20938
|
-
}
|
|
20939
|
-
componentDidUpdate(prevProps) {
|
|
20940
|
-
const {
|
|
20941
|
-
autoheight
|
|
20942
|
-
} = this.props;
|
|
20943
|
-
if (autoheight !== prevProps.autoheight) {
|
|
20944
|
-
this.adjustHeight();
|
|
20945
|
-
}
|
|
20946
|
-
}
|
|
20947
|
-
adjustHeight() {
|
|
20948
|
-
const {
|
|
20949
|
-
autoheight
|
|
20950
|
-
} = this.props;
|
|
20951
|
-
if (!autoheight) {
|
|
20952
|
-
this.setState({
|
|
20953
|
-
textareaStyles: null
|
|
20954
|
-
});
|
|
20801
|
+
const TextArea = _ref => {
|
|
20802
|
+
let {
|
|
20803
|
+
baseClassName = `${_constants.CLS_PREFIX}textarea`,
|
|
20804
|
+
className,
|
|
20805
|
+
rows = 4,
|
|
20806
|
+
size = 'md',
|
|
20807
|
+
autoheight = false,
|
|
20808
|
+
onChange,
|
|
20809
|
+
style,
|
|
20810
|
+
...props
|
|
20811
|
+
} = _ref;
|
|
20812
|
+
const rootRef = (0, _react.useRef)(null);
|
|
20813
|
+
const useSizeModifier = size && AVAILABLE_SIZES.has(size);
|
|
20814
|
+
const {
|
|
20815
|
+
minRows,
|
|
20816
|
+
maxRows
|
|
20817
|
+
} = getMinMax(rows);
|
|
20818
|
+
const [heightStyle, setHeightStyle] = (0, _react.useState)();
|
|
20819
|
+
const adjustHeight = (0, _react.useCallback)(() => {
|
|
20820
|
+
if (!autoheight || !rootRef.current) {
|
|
20821
|
+
setHeightStyle(undefined);
|
|
20955
20822
|
return;
|
|
20956
20823
|
}
|
|
20957
|
-
|
|
20958
|
-
|
|
20959
|
-
|
|
20960
|
-
|
|
20961
|
-
|
|
20962
|
-
|
|
20963
|
-
|
|
20964
|
-
|
|
20965
|
-
});
|
|
20824
|
+
setHeightStyle((0, _calculateNodeHeight.default)(rootRef.current, false, minRows, maxRows));
|
|
20825
|
+
}, [autoheight, maxRows, minRows]);
|
|
20826
|
+
(0, _react.useLayoutEffect)(() => {
|
|
20827
|
+
adjustHeight();
|
|
20828
|
+
}, [adjustHeight]);
|
|
20829
|
+
const handleChange = e => {
|
|
20830
|
+
if (autoheight) {
|
|
20831
|
+
adjustHeight();
|
|
20966
20832
|
}
|
|
20967
|
-
|
|
20968
|
-
|
|
20969
|
-
|
|
20970
|
-
|
|
20971
|
-
|
|
20972
|
-
|
|
20973
|
-
|
|
20974
|
-
|
|
20975
|
-
|
|
20976
|
-
|
|
20977
|
-
|
|
20978
|
-
|
|
20979
|
-
|
|
20980
|
-
|
|
20981
|
-
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
|
|
20985
|
-
[`${baseClassName}--size-${size}`]: useSizeModifier
|
|
20986
|
-
}, className),
|
|
20987
|
-
ref: this.rootRef,
|
|
20988
|
-
style: textareaStyles,
|
|
20989
|
-
onChange: this.handleChange,
|
|
20990
|
-
rows: minRows,
|
|
20991
|
-
...other
|
|
20992
|
-
});
|
|
20993
|
-
}
|
|
20994
|
-
}
|
|
20995
|
-
_defineProperty(TextArea, "defaultProps", {
|
|
20996
|
-
baseClassName: `${_constants.CLS_PREFIX}textarea`,
|
|
20997
|
-
className: null,
|
|
20998
|
-
rows: 4,
|
|
20999
|
-
size: 'md',
|
|
21000
|
-
autoheight: false,
|
|
21001
|
-
onChange: null
|
|
21002
|
-
});
|
|
20833
|
+
if (typeof onChange === 'function') {
|
|
20834
|
+
onChange(e);
|
|
20835
|
+
}
|
|
20836
|
+
};
|
|
20837
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("textarea", {
|
|
20838
|
+
ref: rootRef,
|
|
20839
|
+
className: (0, _classnames.default)(baseClassName, {
|
|
20840
|
+
[`${baseClassName}--size-${size}`]: useSizeModifier
|
|
20841
|
+
}, className),
|
|
20842
|
+
style: {
|
|
20843
|
+
...style,
|
|
20844
|
+
...heightStyle
|
|
20845
|
+
},
|
|
20846
|
+
onChange: handleChange,
|
|
20847
|
+
rows: minRows,
|
|
20848
|
+
...props
|
|
20849
|
+
});
|
|
20850
|
+
};
|
|
21003
20851
|
var _default = exports["default"] = TextArea;
|
|
21004
20852
|
|
|
21005
20853
|
/***/ }),
|
|
@@ -21060,8 +20908,8 @@ const calculateNodeStyling = function (node) {
|
|
|
21060
20908
|
// eslint-disable-next-line max-params
|
|
21061
20909
|
function calculateNodeHeight(uiTextNode) {
|
|
21062
20910
|
let useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
21063
|
-
let minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] :
|
|
21064
|
-
let maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] :
|
|
20911
|
+
let minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
20912
|
+
let maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
|
|
21065
20913
|
if (!hiddenTextarea) {
|
|
21066
20914
|
hiddenTextarea = document.createElement('textarea');
|
|
21067
20915
|
document.body.appendChild(hiddenTextarea);
|
|
@@ -21083,8 +20931,8 @@ function calculateNodeHeight(uiTextNode) {
|
|
|
21083
20931
|
// Need to have the overflow attribute to hide the scrollbar otherwise text-lines will not calculated properly as the shadow will technically be narrower for content
|
|
21084
20932
|
hiddenTextarea.setAttribute('style', `${sizingStyle};${HIDDEN_TEXTAREA_STYLE}`);
|
|
21085
20933
|
hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
|
|
21086
|
-
let minHeight =
|
|
21087
|
-
let maxHeight =
|
|
20934
|
+
let minHeight = undefined;
|
|
20935
|
+
let maxHeight = undefined;
|
|
21088
20936
|
let height = hiddenTextarea.scrollHeight;
|
|
21089
20937
|
let overflowY;
|
|
21090
20938
|
if (boxSizing === 'border-box') {
|
|
@@ -21094,23 +20942,23 @@ function calculateNodeHeight(uiTextNode) {
|
|
|
21094
20942
|
// remove padding, since height = content
|
|
21095
20943
|
height = height - paddingSize;
|
|
21096
20944
|
}
|
|
21097
|
-
if (minRows !==
|
|
20945
|
+
if (minRows !== undefined || maxRows !== undefined) {
|
|
21098
20946
|
// measure height of a textarea with a single row
|
|
21099
20947
|
hiddenTextarea.value = ' ';
|
|
21100
20948
|
const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
|
|
21101
|
-
if (minRows !==
|
|
20949
|
+
if (minRows !== undefined) {
|
|
21102
20950
|
minHeight = singleRowHeight * minRows;
|
|
21103
20951
|
if (boxSizing === 'border-box') {
|
|
21104
20952
|
minHeight = minHeight + paddingSize + borderSize;
|
|
21105
20953
|
}
|
|
21106
20954
|
height = Math.max(minHeight, height);
|
|
21107
20955
|
}
|
|
21108
|
-
if (maxRows !==
|
|
20956
|
+
if (maxRows !== undefined) {
|
|
21109
20957
|
maxHeight = singleRowHeight * maxRows;
|
|
21110
20958
|
if (boxSizing === 'border-box') {
|
|
21111
20959
|
maxHeight = maxHeight + paddingSize + borderSize;
|
|
21112
20960
|
}
|
|
21113
|
-
overflowY = height > maxHeight ?
|
|
20961
|
+
overflowY = height > maxHeight ? undefined : 'hidden';
|
|
21114
20962
|
height = Math.min(maxHeight, height);
|
|
21115
20963
|
}
|
|
21116
20964
|
}
|
|
@@ -21606,6 +21454,127 @@ exports.createRegistry = createRegistry;
|
|
|
21606
21454
|
|
|
21607
21455
|
/***/ }),
|
|
21608
21456
|
|
|
21457
|
+
/***/ "./components/Toolbar/RegistryContextBeta.tsx":
|
|
21458
|
+
/*!****************************************************!*\
|
|
21459
|
+
!*** ./components/Toolbar/RegistryContextBeta.tsx ***!
|
|
21460
|
+
\****************************************************/
|
|
21461
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
21462
|
+
|
|
21463
|
+
"use strict";
|
|
21464
|
+
|
|
21465
|
+
|
|
21466
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
21467
|
+
value: true
|
|
21468
|
+
}));
|
|
21469
|
+
exports.useRegistryItem = exports.useRegistry = exports["default"] = void 0;
|
|
21470
|
+
var _react = __webpack_require__(/*! react */ "react");
|
|
21471
|
+
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; }
|
|
21472
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
21473
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
21474
|
+
const RegistryContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
21475
|
+
RegistryContext.displayName = 'RegistryContext';
|
|
21476
|
+
const useRegistryContext = () => (0, _react.useContext)(RegistryContext);
|
|
21477
|
+
var _default = exports["default"] = RegistryContext;
|
|
21478
|
+
class Registry {
|
|
21479
|
+
constructor() {
|
|
21480
|
+
_defineProperty(this, "items", []);
|
|
21481
|
+
}
|
|
21482
|
+
register(item) {
|
|
21483
|
+
this.items.push(item);
|
|
21484
|
+
}
|
|
21485
|
+
unregister(item) {
|
|
21486
|
+
this.items = this.items.filter(i => i !== item);
|
|
21487
|
+
}
|
|
21488
|
+
compact() {
|
|
21489
|
+
let changed = false;
|
|
21490
|
+
for (const item of [...this.items].reverse()) {
|
|
21491
|
+
if (!item.isCompact) {
|
|
21492
|
+
item.compact();
|
|
21493
|
+
changed = true;
|
|
21494
|
+
break;
|
|
21495
|
+
}
|
|
21496
|
+
}
|
|
21497
|
+
return changed;
|
|
21498
|
+
}
|
|
21499
|
+
expand() {
|
|
21500
|
+
let changed = false;
|
|
21501
|
+
for (const item of this.items) {
|
|
21502
|
+
if (this.checkItemIsCompactOrHasCompactItems(item)) {
|
|
21503
|
+
item.expand();
|
|
21504
|
+
changed = true;
|
|
21505
|
+
break;
|
|
21506
|
+
}
|
|
21507
|
+
}
|
|
21508
|
+
return changed;
|
|
21509
|
+
}
|
|
21510
|
+
get isCompact() {
|
|
21511
|
+
return this.items.every(_ref => {
|
|
21512
|
+
let {
|
|
21513
|
+
isCompact
|
|
21514
|
+
} = _ref;
|
|
21515
|
+
return isCompact;
|
|
21516
|
+
});
|
|
21517
|
+
}
|
|
21518
|
+
get hasCompactItems() {
|
|
21519
|
+
return this.items.some(this.checkItemIsCompactOrHasCompactItems);
|
|
21520
|
+
}
|
|
21521
|
+
checkItemIsCompactOrHasCompactItems(item) {
|
|
21522
|
+
return item.isCompact || 'hasCompactItems' in item && item.hasCompactItems;
|
|
21523
|
+
}
|
|
21524
|
+
}
|
|
21525
|
+
class RegistryItem {
|
|
21526
|
+
constructor(_ref2) {
|
|
21527
|
+
let {
|
|
21528
|
+
onCompactStateChange
|
|
21529
|
+
} = _ref2;
|
|
21530
|
+
_defineProperty(this, "_isCompact", false);
|
|
21531
|
+
_defineProperty(this, "onCompactStateChange", void 0);
|
|
21532
|
+
this.onCompactStateChange = onCompactStateChange;
|
|
21533
|
+
}
|
|
21534
|
+
compact() {
|
|
21535
|
+
this._isCompact = true;
|
|
21536
|
+
this.onCompactStateChange(true);
|
|
21537
|
+
}
|
|
21538
|
+
expand() {
|
|
21539
|
+
this._isCompact = false;
|
|
21540
|
+
this.onCompactStateChange(false);
|
|
21541
|
+
}
|
|
21542
|
+
get isCompact() {
|
|
21543
|
+
return this._isCompact;
|
|
21544
|
+
}
|
|
21545
|
+
}
|
|
21546
|
+
const useRegistry = () => {
|
|
21547
|
+
const parentRegistry = useRegistryContext();
|
|
21548
|
+
const [registry] = (0, _react.useState)(() => new Registry());
|
|
21549
|
+
(0, _react.useLayoutEffect)(() => {
|
|
21550
|
+
if (!parentRegistry) return undefined;
|
|
21551
|
+
parentRegistry.register(registry);
|
|
21552
|
+
return () => {
|
|
21553
|
+
parentRegistry.unregister(registry);
|
|
21554
|
+
};
|
|
21555
|
+
}, [parentRegistry, registry]);
|
|
21556
|
+
return registry;
|
|
21557
|
+
};
|
|
21558
|
+
exports.useRegistry = useRegistry;
|
|
21559
|
+
const useRegistryItem = () => {
|
|
21560
|
+
const registry = useRegistryContext();
|
|
21561
|
+
const [isCompact, setIsCompact] = (0, _react.useState)(false);
|
|
21562
|
+
const [registryItem] = (0, _react.useState)(() => new RegistryItem({
|
|
21563
|
+
onCompactStateChange: setIsCompact
|
|
21564
|
+
}));
|
|
21565
|
+
(0, _react.useLayoutEffect)(() => {
|
|
21566
|
+
if (!registry) return undefined;
|
|
21567
|
+
registry.register(registryItem);
|
|
21568
|
+
return () => {
|
|
21569
|
+
registry.unregister(registryItem);
|
|
21570
|
+
};
|
|
21571
|
+
}, [registry, registryItem]);
|
|
21572
|
+
return [isCompact];
|
|
21573
|
+
};
|
|
21574
|
+
exports.useRegistryItem = useRegistryItem;
|
|
21575
|
+
|
|
21576
|
+
/***/ }),
|
|
21577
|
+
|
|
21609
21578
|
/***/ "./components/Toolbar/Toolbar.tsx":
|
|
21610
21579
|
/*!****************************************!*\
|
|
21611
21580
|
!*** ./components/Toolbar/Toolbar.tsx ***!
|
|
@@ -21623,9 +21592,12 @@ var _react = __webpack_require__(/*! react */ "react");
|
|
|
21623
21592
|
var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../node_modules/classnames/index.js"));
|
|
21624
21593
|
var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
21625
21594
|
var _RegistryContext = _interopRequireWildcard(__webpack_require__(/*! ./RegistryContext */ "./components/Toolbar/RegistryContext.tsx"));
|
|
21595
|
+
var _RegistryContextBeta = _interopRequireWildcard(__webpack_require__(/*! ./RegistryContextBeta */ "./components/Toolbar/RegistryContextBeta.tsx"));
|
|
21626
21596
|
var _DistractionFreeModeContext = _interopRequireDefault(__webpack_require__(/*! ../DistractionFreeModeContext */ "./components/DistractionFreeModeContext/index.tsx"));
|
|
21627
21597
|
var _ToolbarItem = __webpack_require__(/*! ./ToolbarItem */ "./components/Toolbar/ToolbarItem.tsx");
|
|
21628
21598
|
var _Squeezer = _interopRequireDefault(__webpack_require__(/*! ../Squeezer */ "./components/Squeezer/index.tsx"));
|
|
21599
|
+
var _hooks = __webpack_require__(/*! ../../hooks */ "./hooks/index.tsx");
|
|
21600
|
+
var _ToolbarBetaProvider = __webpack_require__(/*! ./ToolbarBetaProvider */ "./components/Toolbar/ToolbarBetaProvider.tsx");
|
|
21629
21601
|
__webpack_require__(/*! ../../helpers/base.less */ "./helpers/base.less");
|
|
21630
21602
|
__webpack_require__(/*! ./Toolbar.less */ "./components/Toolbar/Toolbar.less");
|
|
21631
21603
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
@@ -21642,7 +21614,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
21642
21614
|
* and controls for changing the way the content block looks.
|
|
21643
21615
|
* @since 0.0.57
|
|
21644
21616
|
*/
|
|
21645
|
-
class
|
|
21617
|
+
class ToolbarClassComponent extends _react.Component {
|
|
21646
21618
|
constructor(props) {
|
|
21647
21619
|
super(props);
|
|
21648
21620
|
_defineProperty(this, "state", {
|
|
@@ -21699,15 +21671,89 @@ class Toolbar extends _react.Component {
|
|
|
21699
21671
|
});
|
|
21700
21672
|
}
|
|
21701
21673
|
}
|
|
21702
|
-
_defineProperty(
|
|
21674
|
+
_defineProperty(ToolbarClassComponent, "defaultProps", {
|
|
21703
21675
|
children: null,
|
|
21704
21676
|
className: null,
|
|
21705
21677
|
baseClassName: `${_constants.CLS_PREFIX}toolbar`
|
|
21706
21678
|
});
|
|
21679
|
+
const ToolbarBeta = _ref2 => {
|
|
21680
|
+
let {
|
|
21681
|
+
children,
|
|
21682
|
+
className,
|
|
21683
|
+
baseClassName = `${_constants.CLS_PREFIX}toolbar`,
|
|
21684
|
+
...props
|
|
21685
|
+
} = _ref2;
|
|
21686
|
+
const containerRef = (0, _react.useRef)(null);
|
|
21687
|
+
const [isDistractionFreeModeEnabled, setIsDistractionFreeModeEnabled] = (0, _react.useState)(false);
|
|
21688
|
+
const distractionFreeModeContextValue = (0, _react.useMemo)(() => ({
|
|
21689
|
+
enabled: isDistractionFreeModeEnabled,
|
|
21690
|
+
toggle: () => setIsDistractionFreeModeEnabled(current => !current)
|
|
21691
|
+
}), [isDistractionFreeModeEnabled]);
|
|
21692
|
+
const registry = (0, _RegistryContextBeta.useRegistry)();
|
|
21693
|
+
(0, _hooks.useSqueeze)({
|
|
21694
|
+
ref: containerRef,
|
|
21695
|
+
compact: () => registry.compact(),
|
|
21696
|
+
expand: () => registry.expand()
|
|
21697
|
+
});
|
|
21698
|
+
const toolbarItems = (0, _ToolbarItem.toToolbarItems)(children, true);
|
|
21699
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21700
|
+
ref: containerRef,
|
|
21701
|
+
className: (0, _classnames.default)(baseClassName, className),
|
|
21702
|
+
...props,
|
|
21703
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RegistryContextBeta.default.Provider, {
|
|
21704
|
+
value: registry,
|
|
21705
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DistractionFreeModeContext.default.Provider, {
|
|
21706
|
+
value: distractionFreeModeContextValue,
|
|
21707
|
+
children: toolbarItems
|
|
21708
|
+
})
|
|
21709
|
+
})
|
|
21710
|
+
});
|
|
21711
|
+
};
|
|
21712
|
+
const Toolbar = props => {
|
|
21713
|
+
const isToolbarBeta = (0, _ToolbarBetaProvider.useToolbarBetaContext)();
|
|
21714
|
+
return isToolbarBeta ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarBeta, {
|
|
21715
|
+
...props
|
|
21716
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarClassComponent, {
|
|
21717
|
+
...props
|
|
21718
|
+
});
|
|
21719
|
+
};
|
|
21707
21720
|
var _default = exports["default"] = Toolbar;
|
|
21708
21721
|
|
|
21709
21722
|
/***/ }),
|
|
21710
21723
|
|
|
21724
|
+
/***/ "./components/Toolbar/ToolbarBetaProvider.tsx":
|
|
21725
|
+
/*!****************************************************!*\
|
|
21726
|
+
!*** ./components/Toolbar/ToolbarBetaProvider.tsx ***!
|
|
21727
|
+
\****************************************************/
|
|
21728
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
21729
|
+
|
|
21730
|
+
"use strict";
|
|
21731
|
+
|
|
21732
|
+
|
|
21733
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
21734
|
+
value: true
|
|
21735
|
+
}));
|
|
21736
|
+
exports.useToolbarBetaContext = exports["default"] = void 0;
|
|
21737
|
+
var _react = __webpack_require__(/*! react */ "react");
|
|
21738
|
+
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
21739
|
+
// Copyright 1999-2024. Plesk International GmbH. All rights reserved.
|
|
21740
|
+
|
|
21741
|
+
const ToolbarBetaContext = /*#__PURE__*/(0, _react.createContext)(false);
|
|
21742
|
+
const useToolbarBetaContext = () => (0, _react.useContext)(ToolbarBetaContext);
|
|
21743
|
+
exports.useToolbarBetaContext = useToolbarBetaContext;
|
|
21744
|
+
const ToolbarBetaProvider = _ref => {
|
|
21745
|
+
let {
|
|
21746
|
+
children
|
|
21747
|
+
} = _ref;
|
|
21748
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarBetaContext.Provider, {
|
|
21749
|
+
value: true,
|
|
21750
|
+
children: children
|
|
21751
|
+
});
|
|
21752
|
+
};
|
|
21753
|
+
var _default = exports["default"] = ToolbarBetaProvider;
|
|
21754
|
+
|
|
21755
|
+
/***/ }),
|
|
21756
|
+
|
|
21711
21757
|
/***/ "./components/Toolbar/ToolbarExpander.tsx":
|
|
21712
21758
|
/*!************************************************!*\
|
|
21713
21759
|
!*** ./components/Toolbar/ToolbarExpander.tsx ***!
|
|
@@ -21775,9 +21821,11 @@ var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
|
21775
21821
|
var _Dropdown = _interopRequireDefault(__webpack_require__(/*! ../Dropdown */ "./components/Dropdown/index.tsx"));
|
|
21776
21822
|
var _ToolbarMenu = _interopRequireDefault(__webpack_require__(/*! ./ToolbarMenu */ "./components/Toolbar/ToolbarMenu.tsx"));
|
|
21777
21823
|
var _RegistryContext = _interopRequireWildcard(__webpack_require__(/*! ./RegistryContext */ "./components/Toolbar/RegistryContext.tsx"));
|
|
21824
|
+
var _RegistryContextBeta = _interopRequireWildcard(__webpack_require__(/*! ./RegistryContextBeta */ "./components/Toolbar/RegistryContextBeta.tsx"));
|
|
21778
21825
|
var _DistractionFreeModeContext = _interopRequireDefault(__webpack_require__(/*! ../DistractionFreeModeContext */ "./components/DistractionFreeModeContext/index.tsx"));
|
|
21779
21826
|
var _ToolbarItem = __webpack_require__(/*! ./ToolbarItem */ "./components/Toolbar/ToolbarItem.tsx");
|
|
21780
21827
|
var _ToolbarExpander = _interopRequireDefault(__webpack_require__(/*! ./ToolbarExpander */ "./components/Toolbar/ToolbarExpander.tsx"));
|
|
21828
|
+
var _ToolbarBetaProvider = __webpack_require__(/*! ./ToolbarBetaProvider */ "./components/Toolbar/ToolbarBetaProvider.tsx");
|
|
21781
21829
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
21782
21830
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21783
21831
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -21790,7 +21838,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
21790
21838
|
* It is used for grouping several toolbar controls together.
|
|
21791
21839
|
* @since 0.0.57
|
|
21792
21840
|
*/
|
|
21793
|
-
class
|
|
21841
|
+
class ToolbarGroupClassComponent extends _react.Component {
|
|
21794
21842
|
constructor(props) {
|
|
21795
21843
|
super(props);
|
|
21796
21844
|
_defineProperty(this, "state", {
|
|
@@ -21910,7 +21958,7 @@ class ToolbarGroup extends _react.Component {
|
|
|
21910
21958
|
});
|
|
21911
21959
|
}
|
|
21912
21960
|
}
|
|
21913
|
-
_defineProperty(
|
|
21961
|
+
_defineProperty(ToolbarGroupClassComponent, "defaultProps", {
|
|
21914
21962
|
registry: undefined,
|
|
21915
21963
|
distractionFreeMode: undefined
|
|
21916
21964
|
});
|
|
@@ -21922,7 +21970,7 @@ const ToolbarGroupWrapper = _ref => {
|
|
|
21922
21970
|
} = _ref;
|
|
21923
21971
|
const registry = (0, _react.useContext)(_RegistryContext.default);
|
|
21924
21972
|
const distractionFreeMode = (0, _react.useContext)(_DistractionFreeModeContext.default);
|
|
21925
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
21973
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarGroupClassComponent, {
|
|
21926
21974
|
groupable: groupable,
|
|
21927
21975
|
baseClassName: baseClassName,
|
|
21928
21976
|
...props,
|
|
@@ -21931,7 +21979,67 @@ const ToolbarGroupWrapper = _ref => {
|
|
|
21931
21979
|
});
|
|
21932
21980
|
};
|
|
21933
21981
|
ToolbarGroupWrapper.displayName = 'ToolbarGroup';
|
|
21934
|
-
|
|
21982
|
+
const ToolbarGroupBeta = _ref2 => {
|
|
21983
|
+
let {
|
|
21984
|
+
baseClassName = `${_constants.CLS_PREFIX}toolbar__group`,
|
|
21985
|
+
className,
|
|
21986
|
+
title,
|
|
21987
|
+
children,
|
|
21988
|
+
groupable = true,
|
|
21989
|
+
...props
|
|
21990
|
+
} = _ref2;
|
|
21991
|
+
const [compact] = (0, _RegistryContextBeta.useRegistryItem)();
|
|
21992
|
+
const registry = (0, _RegistryContextBeta.useRegistry)();
|
|
21993
|
+
const [availableInDistractionFreeMode, setAvailableInDistractionFreeMode] = (0, _react.useState)(false);
|
|
21994
|
+
const distractionFreeMode = (0, _react.useContext)(_DistractionFreeModeContext.default);
|
|
21995
|
+
const distractionFreeModeContextValue = {
|
|
21996
|
+
enabled: distractionFreeMode?.enabled ?? false,
|
|
21997
|
+
toggle: () => {
|
|
21998
|
+
if (distractionFreeMode) {
|
|
21999
|
+
distractionFreeMode.toggle();
|
|
22000
|
+
setAvailableInDistractionFreeMode(current => !current);
|
|
22001
|
+
}
|
|
22002
|
+
}
|
|
22003
|
+
};
|
|
22004
|
+
let hasExpander = _react.Children.toArray(children).some(child => /*#__PURE__*/(0, _react.isValidElement)(child) && child.type === _ToolbarExpander.default);
|
|
22005
|
+
if (groupable && compact && _react.Children.count(children) > 1) {
|
|
22006
|
+
hasExpander = false;
|
|
22007
|
+
children = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.default, {
|
|
22008
|
+
menu: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToolbarMenu.default, {
|
|
22009
|
+
onItemClick: () => {},
|
|
22010
|
+
children: children
|
|
22011
|
+
}),
|
|
22012
|
+
children: title
|
|
22013
|
+
});
|
|
22014
|
+
} else {
|
|
22015
|
+
children = /*#__PURE__*/(0, _jsxRuntime.jsx)(_RegistryContextBeta.default.Provider, {
|
|
22016
|
+
value: registry,
|
|
22017
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DistractionFreeModeContext.default.Provider, {
|
|
22018
|
+
value: distractionFreeModeContextValue,
|
|
22019
|
+
children: (0, _ToolbarItem.toToolbarItems)(children, true)
|
|
22020
|
+
})
|
|
22021
|
+
});
|
|
22022
|
+
}
|
|
22023
|
+
if (distractionFreeModeContextValue.enabled && !availableInDistractionFreeMode) {
|
|
22024
|
+
return null;
|
|
22025
|
+
}
|
|
22026
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
22027
|
+
className: (0, _classnames.default)(baseClassName, className, {
|
|
22028
|
+
[`${baseClassName}--grow`]: hasExpander || distractionFreeModeContextValue.enabled && availableInDistractionFreeMode
|
|
22029
|
+
}),
|
|
22030
|
+
...props,
|
|
22031
|
+
children: children
|
|
22032
|
+
});
|
|
22033
|
+
};
|
|
22034
|
+
const ToolbarGroup = props => {
|
|
22035
|
+
const isToolbarBeta = (0, _ToolbarBetaProvider.useToolbarBetaContext)();
|
|
22036
|
+
return isToolbarBeta ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarGroupBeta, {
|
|
22037
|
+
...props
|
|
22038
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarGroupWrapper, {
|
|
22039
|
+
...props
|
|
22040
|
+
});
|
|
22041
|
+
};
|
|
22042
|
+
var _default = exports["default"] = ToolbarGroup;
|
|
21935
22043
|
|
|
21936
22044
|
/***/ }),
|
|
21937
22045
|
|
|
@@ -21955,6 +22063,7 @@ var _ResponsiveContext = _interopRequireDefault(__webpack_require__(/*! ../Respo
|
|
|
21955
22063
|
var _RegistryContext = _interopRequireDefault(__webpack_require__(/*! ./RegistryContext */ "./components/Toolbar/RegistryContext.tsx"));
|
|
21956
22064
|
var _ToolbarGroup = _interopRequireDefault(__webpack_require__(/*! ./ToolbarGroup */ "./components/Toolbar/ToolbarGroup.tsx"));
|
|
21957
22065
|
var _ToolbarExpander = _interopRequireDefault(__webpack_require__(/*! ./ToolbarExpander */ "./components/Toolbar/ToolbarExpander.tsx"));
|
|
22066
|
+
var _RegistryContextBeta = __webpack_require__(/*! ./RegistryContextBeta */ "./components/Toolbar/RegistryContextBeta.tsx");
|
|
21958
22067
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
21959
22068
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21960
22069
|
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; }
|
|
@@ -21998,19 +22107,33 @@ class ToolbarItem extends _react.Component {
|
|
|
21998
22107
|
}
|
|
21999
22108
|
}
|
|
22000
22109
|
ToolbarItem.contextType = _RegistryContext.default;
|
|
22001
|
-
const
|
|
22002
|
-
|
|
22003
|
-
|
|
22004
|
-
}
|
|
22005
|
-
|
|
22006
|
-
|
|
22007
|
-
|
|
22008
|
-
|
|
22009
|
-
children: /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
22010
|
-
className: (0, _classnames.default)(child.props.className, `${_constants.CLS_PREFIX}toolbar__group-item`)
|
|
22011
|
-
})
|
|
22110
|
+
const ToolbarItemBeta = _ref => {
|
|
22111
|
+
let {
|
|
22112
|
+
children
|
|
22113
|
+
} = _ref;
|
|
22114
|
+
const [isCompact] = (0, _RegistryContextBeta.useRegistryItem)();
|
|
22115
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ResponsiveContext.default.Provider, {
|
|
22116
|
+
value: isCompact,
|
|
22117
|
+
children: children
|
|
22012
22118
|
});
|
|
22013
|
-
}
|
|
22119
|
+
};
|
|
22120
|
+
const toToolbarItems = function (children) {
|
|
22121
|
+
let isBeta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
22122
|
+
return _react.Children.map(children, child => {
|
|
22123
|
+
if (! /*#__PURE__*/(0, _react.isValidElement)(child)) {
|
|
22124
|
+
return child;
|
|
22125
|
+
}
|
|
22126
|
+
if (child.type === _ToolbarGroup.default || child.type === _ToolbarExpander.default) {
|
|
22127
|
+
return child;
|
|
22128
|
+
}
|
|
22129
|
+
const Component = isBeta ? ToolbarItemBeta : ToolbarItem;
|
|
22130
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
22131
|
+
children: /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
22132
|
+
className: (0, _classnames.default)(child.props.className, `${_constants.CLS_PREFIX}toolbar__group-item`)
|
|
22133
|
+
})
|
|
22134
|
+
});
|
|
22135
|
+
});
|
|
22136
|
+
};
|
|
22014
22137
|
exports.toToolbarItems = toToolbarItems;
|
|
22015
22138
|
|
|
22016
22139
|
/***/ }),
|
|
@@ -22036,6 +22159,7 @@ var _Button = _interopRequireDefault(__webpack_require__(/*! ../Button */ "./com
|
|
|
22036
22159
|
var _Dropdown = _interopRequireDefault(__webpack_require__(/*! ../Dropdown */ "./components/Dropdown/index.tsx"));
|
|
22037
22160
|
var _List = __webpack_require__(/*! ../List */ "./components/List/index.tsx");
|
|
22038
22161
|
var _utils = __webpack_require__(/*! ../utils */ "./components/utils.tsx");
|
|
22162
|
+
var _Button2 = __webpack_require__(/*! ../Button/Button */ "./components/Button/Button.tsx");
|
|
22039
22163
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
22040
22164
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22041
22165
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -22057,7 +22181,7 @@ const toMenuItem = (child, isLast, onItemClick) => {
|
|
|
22057
22181
|
} = child.props);
|
|
22058
22182
|
props.onClick = (0, _utils.wrapFunction)(props.onClick, onItemClick);
|
|
22059
22183
|
Object.keys(other).forEach(k => {
|
|
22060
|
-
if (!
|
|
22184
|
+
if (!_Button2.BUTTON_PROP_NAMES.includes(k)) {
|
|
22061
22185
|
props[k] = other[k];
|
|
22062
22186
|
}
|
|
22063
22187
|
});
|
|
@@ -22160,6 +22284,12 @@ var _default = exports["default"] = ToolbarMenu;
|
|
|
22160
22284
|
Object.defineProperty(exports, "__esModule", ({
|
|
22161
22285
|
value: true
|
|
22162
22286
|
}));
|
|
22287
|
+
Object.defineProperty(exports, "ToolbarBetaProvider", ({
|
|
22288
|
+
enumerable: true,
|
|
22289
|
+
get: function () {
|
|
22290
|
+
return _ToolbarBetaProvider.default;
|
|
22291
|
+
}
|
|
22292
|
+
}));
|
|
22163
22293
|
Object.defineProperty(exports, "ToolbarExpander", ({
|
|
22164
22294
|
enumerable: true,
|
|
22165
22295
|
get: function () {
|
|
@@ -22181,6 +22311,7 @@ Object.defineProperty(exports, "default", ({
|
|
|
22181
22311
|
var _Toolbar = _interopRequireDefault(__webpack_require__(/*! ./Toolbar */ "./components/Toolbar/Toolbar.tsx"));
|
|
22182
22312
|
var _ToolbarGroup = _interopRequireDefault(__webpack_require__(/*! ./ToolbarGroup */ "./components/Toolbar/ToolbarGroup.tsx"));
|
|
22183
22313
|
var _ToolbarExpander = _interopRequireDefault(__webpack_require__(/*! ./ToolbarExpander */ "./components/Toolbar/ToolbarExpander.tsx"));
|
|
22314
|
+
var _ToolbarBetaProvider = _interopRequireDefault(__webpack_require__(/*! ./ToolbarBetaProvider */ "./components/Toolbar/ToolbarBetaProvider.tsx"));
|
|
22184
22315
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22185
22316
|
|
|
22186
22317
|
/***/ }),
|
|
@@ -22790,6 +22921,7 @@ var _exportNames = {
|
|
|
22790
22921
|
ProgressDialog: true,
|
|
22791
22922
|
ProgressDialogStep: true,
|
|
22792
22923
|
ProgressStep: true,
|
|
22924
|
+
PROGRESS_STEP_DEFAULT_STATUS: true,
|
|
22793
22925
|
Rating: true,
|
|
22794
22926
|
Section: true,
|
|
22795
22927
|
SegmentedControl: true,
|
|
@@ -22811,6 +22943,7 @@ var _exportNames = {
|
|
|
22811
22943
|
Toolbar: true,
|
|
22812
22944
|
ToolbarGroup: true,
|
|
22813
22945
|
ToolbarExpander: true,
|
|
22946
|
+
ToolbarBetaProvider: true,
|
|
22814
22947
|
Tooltip: true,
|
|
22815
22948
|
Tour: true,
|
|
22816
22949
|
Translate: true,
|
|
@@ -23204,6 +23337,12 @@ Object.defineProperty(exports, "Overlay", ({
|
|
|
23204
23337
|
return _Overlay.default;
|
|
23205
23338
|
}
|
|
23206
23339
|
}));
|
|
23340
|
+
Object.defineProperty(exports, "PROGRESS_STEP_DEFAULT_STATUS", ({
|
|
23341
|
+
enumerable: true,
|
|
23342
|
+
get: function () {
|
|
23343
|
+
return _ProgressStep.PROGRESS_STEP_DEFAULT_STATUS;
|
|
23344
|
+
}
|
|
23345
|
+
}));
|
|
23207
23346
|
Object.defineProperty(exports, "PageHeader", ({
|
|
23208
23347
|
enumerable: true,
|
|
23209
23348
|
get: function () {
|
|
@@ -23426,6 +23565,12 @@ Object.defineProperty(exports, "Toolbar", ({
|
|
|
23426
23565
|
return _Toolbar.default;
|
|
23427
23566
|
}
|
|
23428
23567
|
}));
|
|
23568
|
+
Object.defineProperty(exports, "ToolbarBetaProvider", ({
|
|
23569
|
+
enumerable: true,
|
|
23570
|
+
get: function () {
|
|
23571
|
+
return _Toolbar.ToolbarBetaProvider;
|
|
23572
|
+
}
|
|
23573
|
+
}));
|
|
23429
23574
|
Object.defineProperty(exports, "ToolbarExpander", ({
|
|
23430
23575
|
enumerable: true,
|
|
23431
23576
|
get: function () {
|
|
@@ -23585,7 +23730,7 @@ var _Progress = _interopRequireDefault(__webpack_require__(/*! ./Progress */ "./
|
|
|
23585
23730
|
var _ProgressBar = _interopRequireDefault(__webpack_require__(/*! ./ProgressBar */ "./components/ProgressBar/index.tsx"));
|
|
23586
23731
|
var _ProgressDialog = _interopRequireDefault(__webpack_require__(/*! ./ProgressDialog */ "./components/ProgressDialog/index.tsx"));
|
|
23587
23732
|
var _ProgressDialogStep = _interopRequireDefault(__webpack_require__(/*! ./ProgressDialogStep */ "./components/ProgressDialogStep/index.js"));
|
|
23588
|
-
var _ProgressStep =
|
|
23733
|
+
var _ProgressStep = _interopRequireWildcard(__webpack_require__(/*! ./ProgressStep */ "./components/ProgressStep/index.tsx"));
|
|
23589
23734
|
var _Rating = _interopRequireDefault(__webpack_require__(/*! ./Rating */ "./components/Rating/index.tsx"));
|
|
23590
23735
|
var _Section = _interopRequireWildcard(__webpack_require__(/*! ./Section */ "./components/Section/index.tsx"));
|
|
23591
23736
|
Object.keys(_Section).forEach(function (key) {
|
|
@@ -23899,6 +24044,125 @@ module.exports = {
|
|
|
23899
24044
|
|
|
23900
24045
|
/***/ }),
|
|
23901
24046
|
|
|
24047
|
+
/***/ "./hooks/index.tsx":
|
|
24048
|
+
/*!*************************!*\
|
|
24049
|
+
!*** ./hooks/index.tsx ***!
|
|
24050
|
+
\*************************/
|
|
24051
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
24052
|
+
|
|
24053
|
+
"use strict";
|
|
24054
|
+
|
|
24055
|
+
|
|
24056
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
24057
|
+
value: true
|
|
24058
|
+
}));
|
|
24059
|
+
Object.defineProperty(exports, "useSqueeze", ({
|
|
24060
|
+
enumerable: true,
|
|
24061
|
+
get: function () {
|
|
24062
|
+
return _useSqueeze.useSqueeze;
|
|
24063
|
+
}
|
|
24064
|
+
}));
|
|
24065
|
+
var _useSqueeze = __webpack_require__(/*! ./useSqueeze */ "./hooks/useSqueeze.tsx");
|
|
24066
|
+
|
|
24067
|
+
/***/ }),
|
|
24068
|
+
|
|
24069
|
+
/***/ "./hooks/useResizeObserver.tsx":
|
|
24070
|
+
/*!*************************************!*\
|
|
24071
|
+
!*** ./hooks/useResizeObserver.tsx ***!
|
|
24072
|
+
\*************************************/
|
|
24073
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
24074
|
+
|
|
24075
|
+
"use strict";
|
|
24076
|
+
|
|
24077
|
+
|
|
24078
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
24079
|
+
value: true
|
|
24080
|
+
}));
|
|
24081
|
+
exports.useResizeObserver = void 0;
|
|
24082
|
+
var _react = __webpack_require__(/*! react */ "react");
|
|
24083
|
+
// Copyright 1999-2024. Plesk International GmbH. All rights reserved.
|
|
24084
|
+
|
|
24085
|
+
const useResizeObserver = _ref => {
|
|
24086
|
+
let {
|
|
24087
|
+
ref,
|
|
24088
|
+
onResize
|
|
24089
|
+
} = _ref;
|
|
24090
|
+
const onResizeRef = (0, _react.useRef)(undefined);
|
|
24091
|
+
onResizeRef.current = onResize;
|
|
24092
|
+
(0, _react.useEffect)(() => {
|
|
24093
|
+
if (!ref.current) return undefined;
|
|
24094
|
+
if (typeof window === 'undefined' || !('ResizeObserver' in window)) return undefined;
|
|
24095
|
+
const observer = new ResizeObserver(() => {
|
|
24096
|
+
onResizeRef.current?.();
|
|
24097
|
+
});
|
|
24098
|
+
observer.observe(ref.current);
|
|
24099
|
+
return () => {
|
|
24100
|
+
observer.disconnect();
|
|
24101
|
+
};
|
|
24102
|
+
}, [ref]);
|
|
24103
|
+
};
|
|
24104
|
+
exports.useResizeObserver = useResizeObserver;
|
|
24105
|
+
|
|
24106
|
+
/***/ }),
|
|
24107
|
+
|
|
24108
|
+
/***/ "./hooks/useSqueeze.tsx":
|
|
24109
|
+
/*!******************************!*\
|
|
24110
|
+
!*** ./hooks/useSqueeze.tsx ***!
|
|
24111
|
+
\******************************/
|
|
24112
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
24113
|
+
|
|
24114
|
+
"use strict";
|
|
24115
|
+
|
|
24116
|
+
|
|
24117
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
24118
|
+
value: true
|
|
24119
|
+
}));
|
|
24120
|
+
exports.useSqueeze = void 0;
|
|
24121
|
+
var _react = __webpack_require__(/*! react */ "react");
|
|
24122
|
+
var _useResizeObserver = __webpack_require__(/*! ./useResizeObserver */ "./hooks/useResizeObserver.tsx");
|
|
24123
|
+
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
24124
|
+
|
|
24125
|
+
const useSqueeze = _ref => {
|
|
24126
|
+
let {
|
|
24127
|
+
ref,
|
|
24128
|
+
compact,
|
|
24129
|
+
expand
|
|
24130
|
+
} = _ref;
|
|
24131
|
+
const minWidth = (0, _react.useRef)(0);
|
|
24132
|
+
const lastAction = (0, _react.useRef)(null);
|
|
24133
|
+
const [recheck, setRecheck] = (0, _react.useState)(false);
|
|
24134
|
+
const checkRef = (0, _react.useRef)();
|
|
24135
|
+
const check = () => {
|
|
24136
|
+
if (!ref.current) return;
|
|
24137
|
+
const root = ref.current;
|
|
24138
|
+
const width = Math.ceil(root.getBoundingClientRect().width);
|
|
24139
|
+
const scrollWidth = Math.floor(root.scrollWidth);
|
|
24140
|
+
let isCompactChanged = false;
|
|
24141
|
+
if (scrollWidth > width) {
|
|
24142
|
+
isCompactChanged = compact();
|
|
24143
|
+
minWidth.current = scrollWidth;
|
|
24144
|
+
lastAction.current = 'compact';
|
|
24145
|
+
} else if (minWidth.current && width > minWidth.current || lastAction.current === 'expand') {
|
|
24146
|
+
isCompactChanged = expand();
|
|
24147
|
+
lastAction.current = 'expand';
|
|
24148
|
+
}
|
|
24149
|
+
if (isCompactChanged) {
|
|
24150
|
+
setRecheck(c => !c);
|
|
24151
|
+
}
|
|
24152
|
+
};
|
|
24153
|
+
checkRef.current = check;
|
|
24154
|
+
(0, _react.useLayoutEffect)(() => {
|
|
24155
|
+
checkRef.current?.();
|
|
24156
|
+
}, [recheck]);
|
|
24157
|
+
(0, _useResizeObserver.useResizeObserver)({
|
|
24158
|
+
ref,
|
|
24159
|
+
onResize: check
|
|
24160
|
+
});
|
|
24161
|
+
};
|
|
24162
|
+
exports.useSqueeze = useSqueeze;
|
|
24163
|
+
|
|
24164
|
+
/***/ }),
|
|
24165
|
+
|
|
23902
24166
|
/***/ "./index.tsx":
|
|
23903
24167
|
/*!*******************!*\
|
|
23904
24168
|
!*** ./index.tsx ***!
|
|
@@ -83257,6 +83521,7 @@ function validateFragmentProps(fragment) {
|
|
|
83257
83521
|
}
|
|
83258
83522
|
}
|
|
83259
83523
|
|
|
83524
|
+
var didWarnAboutKeySpread = {};
|
|
83260
83525
|
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
83261
83526
|
{
|
|
83262
83527
|
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
@@ -83327,6 +83592,24 @@ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
|
83327
83592
|
}
|
|
83328
83593
|
}
|
|
83329
83594
|
|
|
83595
|
+
{
|
|
83596
|
+
if (hasOwnProperty.call(props, 'key')) {
|
|
83597
|
+
var componentName = getComponentNameFromType(type);
|
|
83598
|
+
var keys = Object.keys(props).filter(function (k) {
|
|
83599
|
+
return k !== 'key';
|
|
83600
|
+
});
|
|
83601
|
+
var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
|
|
83602
|
+
|
|
83603
|
+
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
|
83604
|
+
var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
|
|
83605
|
+
|
|
83606
|
+
error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
|
|
83607
|
+
|
|
83608
|
+
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
|
83609
|
+
}
|
|
83610
|
+
}
|
|
83611
|
+
}
|
|
83612
|
+
|
|
83330
83613
|
if (type === REACT_FRAGMENT_TYPE) {
|
|
83331
83614
|
validateFragmentProps(element);
|
|
83332
83615
|
} else {
|
|
@@ -84667,7 +84950,7 @@ module.exports = __webpack_require__.p + "images/no-image.svg?2f8dd4286fb9a8bd9a
|
|
|
84667
84950
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
84668
84951
|
|
|
84669
84952
|
"use strict";
|
|
84670
|
-
module.exports = __webpack_require__.p + "images/symbols.svg?
|
|
84953
|
+
module.exports = __webpack_require__.p + "images/symbols.svg?c93dbf4e8547363db109";
|
|
84671
84954
|
|
|
84672
84955
|
/***/ }),
|
|
84673
84956
|
|
|
@@ -87618,12 +87901,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
87618
87901
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
87619
87902
|
if (source == null) return {};
|
|
87620
87903
|
var target = {};
|
|
87621
|
-
var
|
|
87622
|
-
|
|
87623
|
-
|
|
87624
|
-
|
|
87625
|
-
|
|
87626
|
-
target[key] = source[key];
|
|
87904
|
+
for (var key in source) {
|
|
87905
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
87906
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
87907
|
+
target[key] = source[key];
|
|
87908
|
+
}
|
|
87627
87909
|
}
|
|
87628
87910
|
return target;
|
|
87629
87911
|
}
|
|
@@ -87658,7 +87940,7 @@ function _setPrototypeOf(o, p) {
|
|
|
87658
87940
|
/***/ ((module) => {
|
|
87659
87941
|
|
|
87660
87942
|
"use strict";
|
|
87661
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@plesk/ui-library","version":"3.
|
|
87943
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@plesk/ui-library","version":"3.40.0","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.24.5","@plesk/react-movable":"^2.7.1","classnames":"^2.5.1","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.24.5","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.24.3","@babel/preset-env":"^7.24.5","@babel/preset-react":"^7.24.1","@babel/preset-typescript":"^7.24.1","@babel/types":"^7.24.5","@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.4","@testing-library/jest-dom":"^6.4.5","@testing-library/react":"^14.3.1","@testing-library/user-event":"^14.5.2","@types/buble":"^0.20.5","@types/classnames":"2.3.1","@types/codemirror":"^5.60.15","@types/doctrine":"^0.0.5","@types/jest":"^29.5.12","@types/jest-image-snapshot":"^6.4.0","@types/marked":"^4.3.2","@types/node":"^16.18.96","@types/react":"^18.3.1","@types/react-dom":"^18.3.0","@types/react-measure":"2.0.9","@types/react-transition-group":"^4.4.10","@types/svg4everybody":"2.1.2","@types/webpack-env":"^1.18.4","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0","autoprefixer":"^10.4.19","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.11.0","css-minimizer-webpack-plugin":"^5.0.1","eslint":"^8.57.0","eslint-config-prettier":"^8.10.0","eslint-plugin-markdown":"^3.0.1","html-webpack-plugin":"^5.6.0","jest":"^29.7.0","jest-dev-server":"^9.0.2","jest-environment-jsdom":"^29.7.0","jest-image-snapshot":"^6.4.0","less":"^4.2.0","less-loader":"^11.1.4","mini-css-extract-plugin":"^2.9.0","postcss":"^8.4.38","postcss-less":"^6.0.0","postcss-loader":"^7.3.4","postcss-logical":"^6.2.0","prettier":"^2.8.8","puppeteer-core":"21.7.0","react":"^18.3.1","react-docgen-typescript":"^2.2.2","react-dom":"^18.3.1","react-styleguidist":"^13.1.2","rimraf":"^5.0.5","rtlcss":"^4.1.1","style-loader":"^3.3.4","stylelint":"^15.11.0","stylelint-declaration-block-no-ignored-properties":"^2.8.0","stylelint-no-unsupported-browser-features":"^6.1.0","stylelint-prettier":"^3.0.0","stylelint-use-logical-spec":"^5.0.1","svg-mixer":"^2.3.14","terser-webpack-plugin":"^5.3.10","typescript":"5.2.2","webpack":"^5.91.0","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"}');
|
|
87662
87944
|
|
|
87663
87945
|
/***/ }),
|
|
87664
87946
|
|