@plesk/ui-library 3.40.5 → 3.40.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/Badge/Badge.js +2 -2
- package/cjs/components/Carousel/Carousel.js +0 -14
- package/cjs/components/LocaleProvider/LocaleProvider.js +17 -1
- package/cjs/components/SegmentedControl/SegmentedControl.js +12 -10
- package/cjs/components/StatusMessage/StatusMessage.js +1 -0
- package/cjs/components/Subnav/Subnav.js +1 -1
- package/cjs/components/Tabs/SearchBar.js +12 -13
- package/cjs/components/Toolbar/RegistryContext.js +90 -31
- package/cjs/components/Toolbar/Toolbar.js +5 -80
- package/cjs/components/Toolbar/ToolbarGroup.js +6 -159
- package/cjs/components/Toolbar/ToolbarItem.js +15 -59
- package/cjs/components/index.js +21 -11
- package/cjs/hooks/useSqueeze.js +3 -1
- package/cjs/index.js +1 -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 +103 -420
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +6 -6
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/Badge/Badge.js +2 -2
- package/esm/components/Carousel/Carousel.js +0 -14
- package/esm/components/LocaleProvider/LocaleProvider.js +16 -1
- package/esm/components/SegmentedControl/SegmentedControl.js +12 -10
- package/esm/components/StatusMessage/StatusMessage.js +1 -0
- package/esm/components/Subnav/Subnav.js +1 -1
- package/esm/components/Tabs/SearchBar.js +12 -13
- package/esm/components/Toolbar/RegistryContext.js +87 -30
- package/esm/components/Toolbar/Toolbar.js +7 -82
- package/esm/components/Toolbar/ToolbarGroup.js +7 -160
- package/esm/components/Toolbar/ToolbarItem.js +15 -59
- package/esm/components/index.js +1 -2
- package/esm/hooks/useSqueeze.js +3 -1
- package/esm/index.js +1 -1
- package/package.json +23 -25
- package/styleguide/build/bundle.52d1d9a1.js +2 -0
- package/styleguide/index.html +2 -2
- package/types/src/components/LocaleProvider/LocaleProvider.d.ts +1 -0
- package/types/src/components/Toolbar/RegistryContext.d.ts +22 -13
- package/types/src/components/Toolbar/Toolbar.d.ts +8 -8
- package/types/src/components/Toolbar/ToolbarGroup.d.ts +6 -16
- package/types/src/components/Toolbar/ToolbarItem.d.ts +1 -1
- package/types/src/components/index.d.ts +2 -2
- package/cjs/components/Toolbar/RegistryContextBeta.js +0 -112
- package/esm/components/Toolbar/RegistryContextBeta.js +0 -103
- package/styleguide/build/bundle.f0d21187.js +0 -2
- package/types/src/components/Toolbar/RegistryContextBeta.d.ts +0 -25
- /package/styleguide/build/{bundle.f0d21187.js.LICENSE.txt → bundle.52d1d9a1.js.LICENSE.txt} +0 -0
package/dist/plesk-ui-library.js
CHANGED
|
@@ -1150,7 +1150,7 @@ const Badge = _ref => {
|
|
|
1150
1150
|
hidden,
|
|
1151
1151
|
...props
|
|
1152
1152
|
} = _ref;
|
|
1153
|
-
const
|
|
1153
|
+
const isEmpty = !label && label !== 0;
|
|
1154
1154
|
if (_react.Children.toArray(children).length && !hidden) {
|
|
1155
1155
|
if (! /*#__PURE__*/(0, _react.isValidElement)(label)) {
|
|
1156
1156
|
label = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Label.default, {
|
|
@@ -1161,7 +1161,7 @@ const Badge = _ref => {
|
|
|
1161
1161
|
if ( /*#__PURE__*/(0, _react.isValidElement)(label)) {
|
|
1162
1162
|
const cloneProps = {
|
|
1163
1163
|
className: (0, _classnames.default)(`${baseClassName}__value`, {
|
|
1164
|
-
[`${baseClassName}__value--dot`]:
|
|
1164
|
+
[`${baseClassName}__value--dot`]: isEmpty
|
|
1165
1165
|
}, label.props.className)
|
|
1166
1166
|
};
|
|
1167
1167
|
if (intent && (label.type === _Label.default || label.type === _Icon.default)) {
|
|
@@ -3204,20 +3204,6 @@ class Carousel extends _react.Component {
|
|
|
3204
3204
|
if (prevProps.autoplay !== this.props.autoplay) {
|
|
3205
3205
|
this.props.autoplay ? this.play() : this.stop();
|
|
3206
3206
|
}
|
|
3207
|
-
const {
|
|
3208
|
-
width
|
|
3209
|
-
} = this.rootRef.current.getBoundingClientRect();
|
|
3210
|
-
const {
|
|
3211
|
-
slideWidths,
|
|
3212
|
-
totalWidth
|
|
3213
|
-
} = calcWidths(this.genuineRef.current);
|
|
3214
|
-
if (this.state.totalWidth !== totalWidth) {
|
|
3215
|
-
this.setState({
|
|
3216
|
-
slideWidths,
|
|
3217
|
-
totalWidth,
|
|
3218
|
-
showControls: width < totalWidth
|
|
3219
|
-
});
|
|
3220
|
-
}
|
|
3221
3207
|
}
|
|
3222
3208
|
componentWillUnmount() {
|
|
3223
3209
|
this.stop();
|
|
@@ -13375,7 +13361,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
13375
13361
|
Object.defineProperty(exports, "__esModule", ({
|
|
13376
13362
|
value: true
|
|
13377
13363
|
}));
|
|
13378
|
-
exports.useTranslate = exports["default"] = exports.LocaleContext = void 0;
|
|
13364
|
+
exports.useTranslate = exports["default"] = exports.LocaleContext = exports.LocaleBetaProvider = void 0;
|
|
13379
13365
|
var _react = __webpack_require__(/*! react */ "react");
|
|
13380
13366
|
var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"));
|
|
13381
13367
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
@@ -13451,6 +13437,22 @@ const useTranslate = namespace => {
|
|
|
13451
13437
|
}, [context, namespace]);
|
|
13452
13438
|
};
|
|
13453
13439
|
exports.useTranslate = useTranslate;
|
|
13440
|
+
const LocaleBetaProvider = _ref => {
|
|
13441
|
+
let {
|
|
13442
|
+
messages,
|
|
13443
|
+
children
|
|
13444
|
+
} = _ref;
|
|
13445
|
+
const value = (0, _react.useMemo)(() => ({
|
|
13446
|
+
locale: {
|
|
13447
|
+
lmsg: createTranslate(messages)
|
|
13448
|
+
}
|
|
13449
|
+
}), [messages]);
|
|
13450
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(LocaleContext.Provider, {
|
|
13451
|
+
value: value,
|
|
13452
|
+
children: children
|
|
13453
|
+
});
|
|
13454
|
+
};
|
|
13455
|
+
exports.LocaleBetaProvider = LocaleBetaProvider;
|
|
13454
13456
|
/**
|
|
13455
13457
|
* LocaleProvider provides a uniform localization support for built-in text of components.
|
|
13456
13458
|
* @since 0.0.42
|
|
@@ -17068,26 +17070,28 @@ class SegmentedControl extends _react.Component {
|
|
|
17068
17070
|
const {
|
|
17069
17071
|
selected
|
|
17070
17072
|
} = this.state;
|
|
17073
|
+
let prevSelected = selected;
|
|
17071
17074
|
let newSelected;
|
|
17072
17075
|
if (multiple) {
|
|
17073
|
-
|
|
17074
|
-
|
|
17076
|
+
const isSelectedArray = Array.isArray(selected);
|
|
17077
|
+
newSelected = isSelectedArray ? [...selected] : [];
|
|
17078
|
+
if (!isSelectedArray || selected.indexOf(value) === -1) {
|
|
17075
17079
|
newSelected.push(value);
|
|
17076
17080
|
} else {
|
|
17077
17081
|
newSelected.splice(selected.indexOf(value), 1);
|
|
17078
17082
|
}
|
|
17079
17083
|
newSelected.sort(alphaSort);
|
|
17080
|
-
|
|
17081
|
-
selected
|
|
17082
|
-
});
|
|
17083
|
-
if (JSON.stringify(newSelected) !== JSON.stringify(selected)) {
|
|
17084
|
-
onChange?.(newSelected);
|
|
17084
|
+
if (isSelectedArray) {
|
|
17085
|
+
prevSelected = [...selected].sort(alphaSort);
|
|
17085
17086
|
}
|
|
17086
17087
|
} else {
|
|
17087
17088
|
newSelected = value;
|
|
17088
|
-
|
|
17089
|
-
|
|
17090
|
-
|
|
17089
|
+
}
|
|
17090
|
+
if (JSON.stringify(prevSelected) !== JSON.stringify(newSelected)) {
|
|
17091
|
+
this.setState({
|
|
17092
|
+
selected: newSelected
|
|
17093
|
+
});
|
|
17094
|
+
onChange?.(newSelected);
|
|
17091
17095
|
}
|
|
17092
17096
|
});
|
|
17093
17097
|
_defineProperty(this, "compact", () => {
|
|
@@ -19088,6 +19092,7 @@ const StatusMessage = _ref => {
|
|
|
19088
19092
|
...props,
|
|
19089
19093
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
19090
19094
|
name: _intentIconMap.intentIconMap[intent],
|
|
19095
|
+
intent: intent,
|
|
19091
19096
|
className: `${baseClassName}__icon`
|
|
19092
19097
|
}), children]
|
|
19093
19098
|
});
|
|
@@ -19234,7 +19239,7 @@ const SubnavItem = _ref2 => {
|
|
|
19234
19239
|
} = _ref2;
|
|
19235
19240
|
return /*#__PURE__*/(0, _react.cloneElement)(children, {
|
|
19236
19241
|
className: (0, _classnames.default)(baseClassName, active && `${baseClassName}--active`, className),
|
|
19237
|
-
tabIndex:
|
|
19242
|
+
tabIndex: 0,
|
|
19238
19243
|
...props
|
|
19239
19244
|
});
|
|
19240
19245
|
};
|
|
@@ -19569,7 +19574,6 @@ var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
|
19569
19574
|
var _utils = __webpack_require__(/*! ../../utils */ "./utils.tsx");
|
|
19570
19575
|
var _Badge = _interopRequireDefault(__webpack_require__(/*! ../Badge */ "./components/Badge/index.tsx"));
|
|
19571
19576
|
var _Button = _interopRequireDefault(__webpack_require__(/*! ../Button */ "./components/Button/index.tsx"));
|
|
19572
|
-
var _ButtonGroup = _interopRequireDefault(__webpack_require__(/*! ../ButtonGroup */ "./components/ButtonGroup/index.tsx"));
|
|
19573
19577
|
var _DistractionFreeModeContext = _interopRequireDefault(__webpack_require__(/*! ../DistractionFreeModeContext */ "./components/DistractionFreeModeContext/index.tsx"));
|
|
19574
19578
|
var _Input = _interopRequireDefault(__webpack_require__(/*! ../Input */ "./components/Input/index.tsx"));
|
|
19575
19579
|
var _Menu = _interopRequireWildcard(__webpack_require__(/*! ../Menu */ "./components/Menu/index.tsx"));
|
|
@@ -19908,7 +19912,7 @@ class SearchBar extends _react.Component {
|
|
|
19908
19912
|
} = this.state;
|
|
19909
19913
|
const isCollapsed = this.isResponsive();
|
|
19910
19914
|
const distractionFreeModeEnabled = Boolean(distractionFreeMode && distractionFreeMode.enabled);
|
|
19911
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
19915
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
19912
19916
|
className: (0, _classnames.default)(baseClassName, {
|
|
19913
19917
|
[`${baseClassName}--focused`]: focused
|
|
19914
19918
|
}, className),
|
|
@@ -19917,16 +19921,16 @@ class SearchBar extends _react.Component {
|
|
|
19917
19921
|
minWidth
|
|
19918
19922
|
},
|
|
19919
19923
|
...props,
|
|
19920
|
-
children:
|
|
19924
|
+
children: isCollapsed && (collapsable || !distractionFreeModeEnabled) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
|
|
19925
|
+
intent: "info",
|
|
19926
|
+
hidden: !value,
|
|
19927
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
19928
|
+
icon: "search",
|
|
19929
|
+
onClick: this.handleExpand
|
|
19930
|
+
})
|
|
19931
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
19921
19932
|
className: `${baseClassName}__group`,
|
|
19922
|
-
children:
|
|
19923
|
-
intent: "info",
|
|
19924
|
-
hidden: !value,
|
|
19925
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
19926
|
-
icon: "search",
|
|
19927
|
-
onClick: this.handleExpand
|
|
19928
|
-
})
|
|
19929
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default, {
|
|
19933
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default, {
|
|
19930
19934
|
innerRef: ref => this.search = ref,
|
|
19931
19935
|
className: `${baseClassName}__input`,
|
|
19932
19936
|
size: "fill",
|
|
@@ -19956,8 +19960,8 @@ class SearchBar extends _react.Component {
|
|
|
19956
19960
|
ghost: true
|
|
19957
19961
|
})]
|
|
19958
19962
|
})
|
|
19959
|
-
})
|
|
19960
|
-
})
|
|
19963
|
+
}), Array.isArray(results) && this.renderResults(results), results && !Array.isArray(results) && results.type === _Menu.default && this.renderResultsMenu(results)]
|
|
19964
|
+
})
|
|
19961
19965
|
});
|
|
19962
19966
|
}
|
|
19963
19967
|
}
|
|
@@ -21377,69 +21381,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
21377
21381
|
"use strict";
|
|
21378
21382
|
|
|
21379
21383
|
|
|
21380
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
21381
|
-
value: true
|
|
21382
|
-
}));
|
|
21383
|
-
exports["default"] = exports.createRegistry = void 0;
|
|
21384
|
-
var _react = __webpack_require__(/*! react */ "react");
|
|
21385
|
-
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
21386
|
-
|
|
21387
|
-
const RegistryContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
21388
|
-
RegistryContext.displayName = 'RegistryContext';
|
|
21389
|
-
var _default = exports["default"] = RegistryContext;
|
|
21390
|
-
const createRegistry = () => ({
|
|
21391
|
-
stack: [],
|
|
21392
|
-
register(item) {
|
|
21393
|
-
this.stack.push(item);
|
|
21394
|
-
},
|
|
21395
|
-
unregister(item) {
|
|
21396
|
-
this.stack = this.stack.filter(i => i !== item);
|
|
21397
|
-
},
|
|
21398
|
-
uncompact() {
|
|
21399
|
-
let changed = false;
|
|
21400
|
-
this.stack.every(item => {
|
|
21401
|
-
if (item.isCompact(true)) {
|
|
21402
|
-
item.setCompact(false);
|
|
21403
|
-
changed = true;
|
|
21404
|
-
return false;
|
|
21405
|
-
}
|
|
21406
|
-
return true;
|
|
21407
|
-
});
|
|
21408
|
-
return changed;
|
|
21409
|
-
},
|
|
21410
|
-
compact() {
|
|
21411
|
-
let changed = false;
|
|
21412
|
-
[...this.stack].reverse().every(item => {
|
|
21413
|
-
if (!item.isCompact(false)) {
|
|
21414
|
-
item.setCompact(true);
|
|
21415
|
-
changed = true;
|
|
21416
|
-
return false;
|
|
21417
|
-
}
|
|
21418
|
-
return true;
|
|
21419
|
-
});
|
|
21420
|
-
return changed;
|
|
21421
|
-
},
|
|
21422
|
-
isCompact() {
|
|
21423
|
-
let one = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
21424
|
-
if (one) {
|
|
21425
|
-
return this.stack.some(item => item.isCompact(one));
|
|
21426
|
-
}
|
|
21427
|
-
return this.stack.every(item => item.isCompact(one));
|
|
21428
|
-
}
|
|
21429
|
-
});
|
|
21430
|
-
exports.createRegistry = createRegistry;
|
|
21431
|
-
|
|
21432
|
-
/***/ }),
|
|
21433
|
-
|
|
21434
|
-
/***/ "./components/Toolbar/RegistryContextBeta.tsx":
|
|
21435
|
-
/*!****************************************************!*\
|
|
21436
|
-
!*** ./components/Toolbar/RegistryContextBeta.tsx ***!
|
|
21437
|
-
\****************************************************/
|
|
21438
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
21439
|
-
|
|
21440
|
-
"use strict";
|
|
21441
|
-
|
|
21442
|
-
|
|
21443
21384
|
Object.defineProperty(exports, "__esModule", ({
|
|
21444
21385
|
value: true
|
|
21445
21386
|
}));
|
|
@@ -21569,21 +21510,17 @@ var _react = __webpack_require__(/*! react */ "react");
|
|
|
21569
21510
|
var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../node_modules/classnames/index.js"));
|
|
21570
21511
|
var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
21571
21512
|
var _RegistryContext = _interopRequireWildcard(__webpack_require__(/*! ./RegistryContext */ "./components/Toolbar/RegistryContext.tsx"));
|
|
21572
|
-
var _RegistryContextBeta = _interopRequireWildcard(__webpack_require__(/*! ./RegistryContextBeta */ "./components/Toolbar/RegistryContextBeta.tsx"));
|
|
21573
21513
|
var _DistractionFreeModeContext = _interopRequireDefault(__webpack_require__(/*! ../DistractionFreeModeContext */ "./components/DistractionFreeModeContext/index.tsx"));
|
|
21574
21514
|
var _ToolbarItem = __webpack_require__(/*! ./ToolbarItem */ "./components/Toolbar/ToolbarItem.tsx");
|
|
21575
|
-
var _Squeezer = _interopRequireDefault(__webpack_require__(/*! ../Squeezer */ "./components/Squeezer/index.tsx"));
|
|
21576
21515
|
var _hooks = __webpack_require__(/*! ../../hooks */ "./hooks/index.tsx");
|
|
21577
|
-
var _ToolbarBetaProvider = __webpack_require__(/*! ./ToolbarBetaProvider */ "./components/Toolbar/ToolbarBetaProvider.tsx");
|
|
21578
21516
|
__webpack_require__(/*! ../../helpers/base.less */ "./helpers/base.less");
|
|
21579
21517
|
__webpack_require__(/*! ./Toolbar.less */ "./components/Toolbar/Toolbar.less");
|
|
21580
21518
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
21581
21519
|
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); }
|
|
21582
21520
|
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; }
|
|
21583
21521
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21584
|
-
|
|
21585
|
-
|
|
21586
|
-
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.
|
|
21522
|
+
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
21523
|
+
|
|
21587
21524
|
/**
|
|
21588
21525
|
* `Toolbar` component is a panel containing various instruments used for managing the contents of a large content block.
|
|
21589
21526
|
* Toolbar is located on top of the managed content block.
|
|
@@ -21591,93 +21528,31 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
21591
21528
|
* and controls for changing the way the content block looks.
|
|
21592
21529
|
* @since 0.0.57
|
|
21593
21530
|
*/
|
|
21594
|
-
|
|
21595
|
-
constructor(props) {
|
|
21596
|
-
super(props);
|
|
21597
|
-
_defineProperty(this, "state", {
|
|
21598
|
-
distractionFreeMode: {
|
|
21599
|
-
enabled: false,
|
|
21600
|
-
toggle: () => {
|
|
21601
|
-
this.setState(prevState => ({
|
|
21602
|
-
distractionFreeMode: {
|
|
21603
|
-
...prevState.distractionFreeMode,
|
|
21604
|
-
enabled: !prevState.distractionFreeMode.enabled
|
|
21605
|
-
}
|
|
21606
|
-
}), () => {
|
|
21607
|
-
this.measure();
|
|
21608
|
-
});
|
|
21609
|
-
}
|
|
21610
|
-
}
|
|
21611
|
-
});
|
|
21612
|
-
_defineProperty(this, "registry", void 0);
|
|
21613
|
-
_defineProperty(this, "measure", void 0);
|
|
21614
|
-
this.registry = (0, _RegistryContext.createRegistry)();
|
|
21615
|
-
this.measure = () => {};
|
|
21616
|
-
}
|
|
21617
|
-
render() {
|
|
21618
|
-
const {
|
|
21619
|
-
baseClassName,
|
|
21620
|
-
className,
|
|
21621
|
-
children,
|
|
21622
|
-
...props
|
|
21623
|
-
} = this.props;
|
|
21624
|
-
const toolbarItems = (0, _ToolbarItem.toToolbarItems)(children);
|
|
21625
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Squeezer.default, {
|
|
21626
|
-
compact: () => this.registry.compact(),
|
|
21627
|
-
uncompact: () => this.registry.uncompact(),
|
|
21628
|
-
innerMeasure: measure => {
|
|
21629
|
-
this.measure = measure;
|
|
21630
|
-
},
|
|
21631
|
-
children: _ref => {
|
|
21632
|
-
let {
|
|
21633
|
-
ref
|
|
21634
|
-
} = _ref;
|
|
21635
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21636
|
-
ref: ref,
|
|
21637
|
-
className: (0, _classnames.default)(baseClassName, className),
|
|
21638
|
-
...props,
|
|
21639
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RegistryContext.default.Provider, {
|
|
21640
|
-
value: this.registry,
|
|
21641
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DistractionFreeModeContext.default.Provider, {
|
|
21642
|
-
value: this.state.distractionFreeMode,
|
|
21643
|
-
children: toolbarItems
|
|
21644
|
-
})
|
|
21645
|
-
})
|
|
21646
|
-
});
|
|
21647
|
-
}
|
|
21648
|
-
});
|
|
21649
|
-
}
|
|
21650
|
-
}
|
|
21651
|
-
_defineProperty(ToolbarClassComponent, "defaultProps", {
|
|
21652
|
-
children: null,
|
|
21653
|
-
className: null,
|
|
21654
|
-
baseClassName: `${_constants.CLS_PREFIX}toolbar`
|
|
21655
|
-
});
|
|
21656
|
-
const ToolbarBeta = _ref2 => {
|
|
21531
|
+
const Toolbar = _ref => {
|
|
21657
21532
|
let {
|
|
21658
21533
|
children,
|
|
21659
21534
|
className,
|
|
21660
21535
|
baseClassName = `${_constants.CLS_PREFIX}toolbar`,
|
|
21661
21536
|
...props
|
|
21662
|
-
} =
|
|
21537
|
+
} = _ref;
|
|
21663
21538
|
const containerRef = (0, _react.useRef)(null);
|
|
21664
21539
|
const [isDistractionFreeModeEnabled, setIsDistractionFreeModeEnabled] = (0, _react.useState)(false);
|
|
21665
21540
|
const distractionFreeModeContextValue = (0, _react.useMemo)(() => ({
|
|
21666
21541
|
enabled: isDistractionFreeModeEnabled,
|
|
21667
21542
|
toggle: () => setIsDistractionFreeModeEnabled(current => !current)
|
|
21668
21543
|
}), [isDistractionFreeModeEnabled]);
|
|
21669
|
-
const registry = (0,
|
|
21544
|
+
const registry = (0, _RegistryContext.useRegistry)();
|
|
21670
21545
|
(0, _hooks.useSqueeze)({
|
|
21671
21546
|
ref: containerRef,
|
|
21672
21547
|
compact: () => registry.compact(),
|
|
21673
21548
|
expand: () => registry.expand()
|
|
21674
21549
|
});
|
|
21675
|
-
const toolbarItems = (0, _ToolbarItem.toToolbarItems)(children
|
|
21550
|
+
const toolbarItems = (0, _ToolbarItem.toToolbarItems)(children);
|
|
21676
21551
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21677
21552
|
ref: containerRef,
|
|
21678
21553
|
className: (0, _classnames.default)(baseClassName, className),
|
|
21679
21554
|
...props,
|
|
21680
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
21555
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RegistryContext.default.Provider, {
|
|
21681
21556
|
value: registry,
|
|
21682
21557
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DistractionFreeModeContext.default.Provider, {
|
|
21683
21558
|
value: distractionFreeModeContextValue,
|
|
@@ -21686,14 +21561,6 @@ const ToolbarBeta = _ref2 => {
|
|
|
21686
21561
|
})
|
|
21687
21562
|
});
|
|
21688
21563
|
};
|
|
21689
|
-
const Toolbar = props => {
|
|
21690
|
-
const isToolbarBeta = (0, _ToolbarBetaProvider.useToolbarBetaContext)();
|
|
21691
|
-
return isToolbarBeta ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarBeta, {
|
|
21692
|
-
...props
|
|
21693
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarClassComponent, {
|
|
21694
|
-
...props
|
|
21695
|
-
});
|
|
21696
|
-
};
|
|
21697
21564
|
var _default = exports["default"] = Toolbar;
|
|
21698
21565
|
|
|
21699
21566
|
/***/ }),
|
|
@@ -21798,165 +21665,21 @@ var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
|
21798
21665
|
var _Dropdown = _interopRequireDefault(__webpack_require__(/*! ../Dropdown */ "./components/Dropdown/index.tsx"));
|
|
21799
21666
|
var _ToolbarMenu = _interopRequireDefault(__webpack_require__(/*! ./ToolbarMenu */ "./components/Toolbar/ToolbarMenu.tsx"));
|
|
21800
21667
|
var _RegistryContext = _interopRequireWildcard(__webpack_require__(/*! ./RegistryContext */ "./components/Toolbar/RegistryContext.tsx"));
|
|
21801
|
-
var _RegistryContextBeta = _interopRequireWildcard(__webpack_require__(/*! ./RegistryContextBeta */ "./components/Toolbar/RegistryContextBeta.tsx"));
|
|
21802
21668
|
var _DistractionFreeModeContext = _interopRequireDefault(__webpack_require__(/*! ../DistractionFreeModeContext */ "./components/DistractionFreeModeContext/index.tsx"));
|
|
21803
21669
|
var _ToolbarItem = __webpack_require__(/*! ./ToolbarItem */ "./components/Toolbar/ToolbarItem.tsx");
|
|
21804
21670
|
var _ToolbarExpander = _interopRequireDefault(__webpack_require__(/*! ./ToolbarExpander */ "./components/Toolbar/ToolbarExpander.tsx"));
|
|
21805
|
-
var _ToolbarBetaProvider = __webpack_require__(/*! ./ToolbarBetaProvider */ "./components/Toolbar/ToolbarBetaProvider.tsx");
|
|
21806
21671
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
21807
21672
|
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); }
|
|
21808
21673
|
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; }
|
|
21809
21674
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21810
|
-
|
|
21811
|
-
|
|
21812
|
-
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.
|
|
21675
|
+
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
21676
|
+
|
|
21813
21677
|
/**
|
|
21814
21678
|
* `ToolbarGroup` is a part of [Toolbar](#!/Toolbar) component.
|
|
21815
21679
|
* It is used for grouping several toolbar controls together.
|
|
21816
21680
|
* @since 0.0.57
|
|
21817
21681
|
*/
|
|
21818
|
-
|
|
21819
|
-
constructor(props) {
|
|
21820
|
-
super(props);
|
|
21821
|
-
_defineProperty(this, "state", {
|
|
21822
|
-
compact: false,
|
|
21823
|
-
availableInDistractionFreeMode: false,
|
|
21824
|
-
distractionFreeMode: {
|
|
21825
|
-
enabled: false,
|
|
21826
|
-
toggle: () => {
|
|
21827
|
-
if (this.props.distractionFreeMode) {
|
|
21828
|
-
this.props.distractionFreeMode.toggle();
|
|
21829
|
-
this.setState({
|
|
21830
|
-
availableInDistractionFreeMode: !this.props.distractionFreeMode.enabled
|
|
21831
|
-
});
|
|
21832
|
-
}
|
|
21833
|
-
}
|
|
21834
|
-
}
|
|
21835
|
-
});
|
|
21836
|
-
_defineProperty(this, "registry", void 0);
|
|
21837
|
-
_defineProperty(this, "selfApi", void 0);
|
|
21838
|
-
_defineProperty(this, "childrenApi", void 0);
|
|
21839
|
-
this.registry = (0, _RegistryContext.createRegistry)();
|
|
21840
|
-
this.selfApi = {
|
|
21841
|
-
isCompact: () => this.state.compact,
|
|
21842
|
-
setCompact: compact => {
|
|
21843
|
-
this.setState({
|
|
21844
|
-
compact
|
|
21845
|
-
});
|
|
21846
|
-
}
|
|
21847
|
-
};
|
|
21848
|
-
this.childrenApi = {
|
|
21849
|
-
isCompact: one => this.registry.isCompact(one),
|
|
21850
|
-
setCompact: compact => {
|
|
21851
|
-
if (compact) {
|
|
21852
|
-
this.registry.compact();
|
|
21853
|
-
} else {
|
|
21854
|
-
this.registry.uncompact();
|
|
21855
|
-
}
|
|
21856
|
-
}
|
|
21857
|
-
};
|
|
21858
|
-
}
|
|
21859
|
-
static getDerivedStateFromProps(props, state) {
|
|
21860
|
-
if (props.distractionFreeMode) {
|
|
21861
|
-
return {
|
|
21862
|
-
distractionFreeMode: {
|
|
21863
|
-
...state.distractionFreeMode,
|
|
21864
|
-
enabled: props.distractionFreeMode.enabled
|
|
21865
|
-
}
|
|
21866
|
-
};
|
|
21867
|
-
}
|
|
21868
|
-
return null;
|
|
21869
|
-
}
|
|
21870
|
-
componentDidMount() {
|
|
21871
|
-
const {
|
|
21872
|
-
registry
|
|
21873
|
-
} = this.props;
|
|
21874
|
-
if (registry) {
|
|
21875
|
-
registry.register(this.selfApi);
|
|
21876
|
-
registry.register(this.childrenApi);
|
|
21877
|
-
}
|
|
21878
|
-
}
|
|
21879
|
-
componentWillUnmount() {
|
|
21880
|
-
const {
|
|
21881
|
-
registry
|
|
21882
|
-
} = this.props;
|
|
21883
|
-
if (registry) {
|
|
21884
|
-
registry.unregister(this.selfApi);
|
|
21885
|
-
registry.unregister(this.childrenApi);
|
|
21886
|
-
}
|
|
21887
|
-
}
|
|
21888
|
-
render() {
|
|
21889
|
-
const {
|
|
21890
|
-
baseClassName,
|
|
21891
|
-
className,
|
|
21892
|
-
title,
|
|
21893
|
-
children: childrenProp,
|
|
21894
|
-
distractionFreeMode: distractionFreeModeProp,
|
|
21895
|
-
registry,
|
|
21896
|
-
groupable,
|
|
21897
|
-
...props
|
|
21898
|
-
} = this.props;
|
|
21899
|
-
let {
|
|
21900
|
-
children
|
|
21901
|
-
} = this.props;
|
|
21902
|
-
const {
|
|
21903
|
-
compact,
|
|
21904
|
-
distractionFreeMode,
|
|
21905
|
-
availableInDistractionFreeMode
|
|
21906
|
-
} = this.state;
|
|
21907
|
-
let hasExpander = _react.Children.toArray(children).some(child => /*#__PURE__*/(0, _react.isValidElement)(child) && child.type === _ToolbarExpander.default);
|
|
21908
|
-
if (groupable && compact && _react.Children.count(children) > 1) {
|
|
21909
|
-
hasExpander = false;
|
|
21910
|
-
children = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.default, {
|
|
21911
|
-
menu: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToolbarMenu.default, {
|
|
21912
|
-
onItemClick: () => {},
|
|
21913
|
-
children: children
|
|
21914
|
-
}),
|
|
21915
|
-
children: title
|
|
21916
|
-
});
|
|
21917
|
-
} else {
|
|
21918
|
-
children = /*#__PURE__*/(0, _jsxRuntime.jsx)(_RegistryContext.default.Provider, {
|
|
21919
|
-
value: this.registry,
|
|
21920
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DistractionFreeModeContext.default.Provider, {
|
|
21921
|
-
value: distractionFreeMode,
|
|
21922
|
-
children: (0, _ToolbarItem.toToolbarItems)(children)
|
|
21923
|
-
})
|
|
21924
|
-
});
|
|
21925
|
-
}
|
|
21926
|
-
if (distractionFreeMode.enabled && !availableInDistractionFreeMode) {
|
|
21927
|
-
return null;
|
|
21928
|
-
}
|
|
21929
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21930
|
-
className: (0, _classnames.default)(baseClassName, className, {
|
|
21931
|
-
[`${baseClassName}--grow`]: hasExpander || distractionFreeMode.enabled && availableInDistractionFreeMode
|
|
21932
|
-
}),
|
|
21933
|
-
...props,
|
|
21934
|
-
children: children
|
|
21935
|
-
});
|
|
21936
|
-
}
|
|
21937
|
-
}
|
|
21938
|
-
_defineProperty(ToolbarGroupClassComponent, "defaultProps", {
|
|
21939
|
-
registry: undefined,
|
|
21940
|
-
distractionFreeMode: undefined
|
|
21941
|
-
});
|
|
21942
|
-
const ToolbarGroupWrapper = _ref => {
|
|
21943
|
-
let {
|
|
21944
|
-
groupable = true,
|
|
21945
|
-
baseClassName = `${_constants.CLS_PREFIX}toolbar__group`,
|
|
21946
|
-
...props
|
|
21947
|
-
} = _ref;
|
|
21948
|
-
const registry = (0, _react.useContext)(_RegistryContext.default);
|
|
21949
|
-
const distractionFreeMode = (0, _react.useContext)(_DistractionFreeModeContext.default);
|
|
21950
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarGroupClassComponent, {
|
|
21951
|
-
groupable: groupable,
|
|
21952
|
-
baseClassName: baseClassName,
|
|
21953
|
-
...props,
|
|
21954
|
-
registry: registry,
|
|
21955
|
-
distractionFreeMode: distractionFreeMode
|
|
21956
|
-
});
|
|
21957
|
-
};
|
|
21958
|
-
ToolbarGroupWrapper.displayName = 'ToolbarGroup';
|
|
21959
|
-
const ToolbarGroupBeta = _ref2 => {
|
|
21682
|
+
const ToolbarGroup = _ref => {
|
|
21960
21683
|
let {
|
|
21961
21684
|
baseClassName = `${_constants.CLS_PREFIX}toolbar__group`,
|
|
21962
21685
|
className,
|
|
@@ -21964,9 +21687,9 @@ const ToolbarGroupBeta = _ref2 => {
|
|
|
21964
21687
|
children,
|
|
21965
21688
|
groupable = true,
|
|
21966
21689
|
...props
|
|
21967
|
-
} =
|
|
21968
|
-
const [compact] = (0,
|
|
21969
|
-
const registry = (0,
|
|
21690
|
+
} = _ref;
|
|
21691
|
+
const [compact] = (0, _RegistryContext.useRegistryItem)();
|
|
21692
|
+
const registry = (0, _RegistryContext.useRegistry)();
|
|
21970
21693
|
const [availableInDistractionFreeMode, setAvailableInDistractionFreeMode] = (0, _react.useState)(false);
|
|
21971
21694
|
const distractionFreeMode = (0, _react.useContext)(_DistractionFreeModeContext.default);
|
|
21972
21695
|
const distractionFreeModeContextValue = {
|
|
@@ -21989,11 +21712,11 @@ const ToolbarGroupBeta = _ref2 => {
|
|
|
21989
21712
|
children: title
|
|
21990
21713
|
});
|
|
21991
21714
|
} else {
|
|
21992
|
-
children = /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
21715
|
+
children = /*#__PURE__*/(0, _jsxRuntime.jsx)(_RegistryContext.default.Provider, {
|
|
21993
21716
|
value: registry,
|
|
21994
21717
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DistractionFreeModeContext.default.Provider, {
|
|
21995
21718
|
value: distractionFreeModeContextValue,
|
|
21996
|
-
children: (0, _ToolbarItem.toToolbarItems)(children
|
|
21719
|
+
children: (0, _ToolbarItem.toToolbarItems)(children)
|
|
21997
21720
|
})
|
|
21998
21721
|
});
|
|
21999
21722
|
}
|
|
@@ -22008,14 +21731,6 @@ const ToolbarGroupBeta = _ref2 => {
|
|
|
22008
21731
|
children: children
|
|
22009
21732
|
});
|
|
22010
21733
|
};
|
|
22011
|
-
const ToolbarGroup = props => {
|
|
22012
|
-
const isToolbarBeta = (0, _ToolbarBetaProvider.useToolbarBetaContext)();
|
|
22013
|
-
return isToolbarBeta ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarGroupBeta, {
|
|
22014
|
-
...props
|
|
22015
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarGroupWrapper, {
|
|
22016
|
-
...props
|
|
22017
|
-
});
|
|
22018
|
-
};
|
|
22019
21734
|
var _default = exports["default"] = ToolbarGroup;
|
|
22020
21735
|
|
|
22021
21736
|
/***/ }),
|
|
@@ -22037,80 +21752,36 @@ var _react = __webpack_require__(/*! react */ "react");
|
|
|
22037
21752
|
var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../node_modules/classnames/index.js"));
|
|
22038
21753
|
var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
22039
21754
|
var _ResponsiveContext = _interopRequireDefault(__webpack_require__(/*! ../ResponsiveContext */ "./components/ResponsiveContext/index.tsx"));
|
|
22040
|
-
var _RegistryContext = _interopRequireDefault(__webpack_require__(/*! ./RegistryContext */ "./components/Toolbar/RegistryContext.tsx"));
|
|
22041
21755
|
var _ToolbarGroup = _interopRequireDefault(__webpack_require__(/*! ./ToolbarGroup */ "./components/Toolbar/ToolbarGroup.tsx"));
|
|
22042
21756
|
var _ToolbarExpander = _interopRequireDefault(__webpack_require__(/*! ./ToolbarExpander */ "./components/Toolbar/ToolbarExpander.tsx"));
|
|
22043
|
-
var
|
|
21757
|
+
var _RegistryContext = __webpack_require__(/*! ./RegistryContext */ "./components/Toolbar/RegistryContext.tsx");
|
|
22044
21758
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
22045
21759
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22046
|
-
|
|
22047
|
-
|
|
22048
|
-
|
|
22049
|
-
class ToolbarItem extends _react.Component {
|
|
22050
|
-
constructor() {
|
|
22051
|
-
super(...arguments);
|
|
22052
|
-
_defineProperty(this, "state", {
|
|
22053
|
-
compact: false
|
|
22054
|
-
});
|
|
22055
|
-
_defineProperty(this, "context", void 0);
|
|
22056
|
-
}
|
|
22057
|
-
componentDidMount() {
|
|
22058
|
-
const registry = this.context;
|
|
22059
|
-
registry.register(this);
|
|
22060
|
-
}
|
|
22061
|
-
componentWillUnmount() {
|
|
22062
|
-
const registry = this.context;
|
|
22063
|
-
registry.unregister(this);
|
|
22064
|
-
}
|
|
22065
|
-
isCompact() {
|
|
22066
|
-
return this.state.compact;
|
|
22067
|
-
}
|
|
22068
|
-
setCompact(compact) {
|
|
22069
|
-
this.setState({
|
|
22070
|
-
compact
|
|
22071
|
-
});
|
|
22072
|
-
}
|
|
22073
|
-
render() {
|
|
22074
|
-
const {
|
|
22075
|
-
children
|
|
22076
|
-
} = this.props;
|
|
22077
|
-
const {
|
|
22078
|
-
compact
|
|
22079
|
-
} = this.state;
|
|
22080
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ResponsiveContext.default.Provider, {
|
|
22081
|
-
value: compact,
|
|
22082
|
-
children: children
|
|
22083
|
-
});
|
|
22084
|
-
}
|
|
22085
|
-
}
|
|
22086
|
-
ToolbarItem.contextType = _RegistryContext.default;
|
|
22087
|
-
const ToolbarItemBeta = _ref => {
|
|
21760
|
+
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
21761
|
+
|
|
21762
|
+
const ToolbarItem = _ref => {
|
|
22088
21763
|
let {
|
|
22089
21764
|
children
|
|
22090
21765
|
} = _ref;
|
|
22091
|
-
const [isCompact] = (0,
|
|
21766
|
+
const [isCompact] = (0, _RegistryContext.useRegistryItem)();
|
|
22092
21767
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ResponsiveContext.default.Provider, {
|
|
22093
21768
|
value: isCompact,
|
|
22094
21769
|
children: children
|
|
22095
21770
|
});
|
|
22096
21771
|
};
|
|
22097
|
-
const toToolbarItems =
|
|
22098
|
-
|
|
22099
|
-
|
|
22100
|
-
|
|
22101
|
-
|
|
22102
|
-
|
|
22103
|
-
|
|
22104
|
-
|
|
22105
|
-
|
|
22106
|
-
|
|
22107
|
-
|
|
22108
|
-
children: /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
22109
|
-
className: (0, _classnames.default)(child.props.className, `${_constants.CLS_PREFIX}toolbar__group-item`)
|
|
22110
|
-
})
|
|
22111
|
-
});
|
|
21772
|
+
const toToolbarItems = children => _react.Children.map(children, child => {
|
|
21773
|
+
if (! /*#__PURE__*/(0, _react.isValidElement)(child)) {
|
|
21774
|
+
return child;
|
|
21775
|
+
}
|
|
21776
|
+
if (child.type === _ToolbarGroup.default || child.type === _ToolbarExpander.default) {
|
|
21777
|
+
return child;
|
|
21778
|
+
}
|
|
21779
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolbarItem, {
|
|
21780
|
+
children: /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
21781
|
+
className: (0, _classnames.default)(child.props.className, `${_constants.CLS_PREFIX}toolbar__group-item`)
|
|
21782
|
+
})
|
|
22112
21783
|
});
|
|
22113
|
-
};
|
|
21784
|
+
});
|
|
22114
21785
|
exports.toToolbarItems = toToolbarItems;
|
|
22115
21786
|
|
|
22116
21787
|
/***/ }),
|
|
@@ -22877,6 +22548,9 @@ var _exportNames = {
|
|
|
22877
22548
|
ListEmptyView: true,
|
|
22878
22549
|
ListActionsDivider: true,
|
|
22879
22550
|
LocaleProvider: true,
|
|
22551
|
+
useTranslate: true,
|
|
22552
|
+
LocaleContext: true,
|
|
22553
|
+
LocaleBetaProvider: true,
|
|
22880
22554
|
Markdown: true,
|
|
22881
22555
|
Media: true,
|
|
22882
22556
|
MediaSection: true,
|
|
@@ -23248,6 +22922,18 @@ Object.defineProperty(exports, "ListOperation", ({
|
|
|
23248
22922
|
return _List.ListOperation;
|
|
23249
22923
|
}
|
|
23250
22924
|
}));
|
|
22925
|
+
Object.defineProperty(exports, "LocaleBetaProvider", ({
|
|
22926
|
+
enumerable: true,
|
|
22927
|
+
get: function () {
|
|
22928
|
+
return _LocaleProvider.LocaleBetaProvider;
|
|
22929
|
+
}
|
|
22930
|
+
}));
|
|
22931
|
+
Object.defineProperty(exports, "LocaleContext", ({
|
|
22932
|
+
enumerable: true,
|
|
22933
|
+
get: function () {
|
|
22934
|
+
return _LocaleProvider.LocaleContext;
|
|
22935
|
+
}
|
|
22936
|
+
}));
|
|
23251
22937
|
Object.defineProperty(exports, "LocaleProvider", ({
|
|
23252
22938
|
enumerable: true,
|
|
23253
22939
|
get: function () {
|
|
@@ -23578,6 +23264,12 @@ Object.defineProperty(exports, "Translate", ({
|
|
|
23578
23264
|
return _Translate.default;
|
|
23579
23265
|
}
|
|
23580
23266
|
}));
|
|
23267
|
+
Object.defineProperty(exports, "useTranslate", ({
|
|
23268
|
+
enumerable: true,
|
|
23269
|
+
get: function () {
|
|
23270
|
+
return _LocaleProvider.useTranslate;
|
|
23271
|
+
}
|
|
23272
|
+
}));
|
|
23581
23273
|
var _Action = _interopRequireDefault(__webpack_require__(/*! ./Action */ "./components/Action/index.tsx"));
|
|
23582
23274
|
var _Alert = _interopRequireDefault(__webpack_require__(/*! ./Alert */ "./components/Alert/index.tsx"));
|
|
23583
23275
|
var _AutoClosable = _interopRequireDefault(__webpack_require__(/*! ./AutoClosable */ "./components/AutoClosable/index.tsx"));
|
|
@@ -23682,17 +23374,6 @@ var _Label = _interopRequireDefault(__webpack_require__(/*! ./Label */ "./compon
|
|
|
23682
23374
|
var _Layout = _interopRequireDefault(__webpack_require__(/*! ./Layout */ "./components/Layout/index.tsx"));
|
|
23683
23375
|
var _List = _interopRequireWildcard(__webpack_require__(/*! ./List */ "./components/List/index.tsx"));
|
|
23684
23376
|
var _LocaleProvider = _interopRequireWildcard(__webpack_require__(/*! ./LocaleProvider */ "./components/LocaleProvider/index.tsx"));
|
|
23685
|
-
Object.keys(_LocaleProvider).forEach(function (key) {
|
|
23686
|
-
if (key === "default" || key === "__esModule") return;
|
|
23687
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
23688
|
-
if (key in exports && exports[key] === _LocaleProvider[key]) return;
|
|
23689
|
-
Object.defineProperty(exports, key, {
|
|
23690
|
-
enumerable: true,
|
|
23691
|
-
get: function () {
|
|
23692
|
-
return _LocaleProvider[key];
|
|
23693
|
-
}
|
|
23694
|
-
});
|
|
23695
|
-
});
|
|
23696
23377
|
var _Markdown = _interopRequireDefault(__webpack_require__(/*! ./Markdown */ "./components/Markdown/index.tsx"));
|
|
23697
23378
|
var _Media = _interopRequireWildcard(__webpack_require__(/*! ./Media */ "./components/Media/index.tsx"));
|
|
23698
23379
|
var _Menu = _interopRequireWildcard(__webpack_require__(/*! ./Menu */ "./components/Menu/index.tsx"));
|
|
@@ -24158,7 +23839,9 @@ const useSqueeze = _ref => {
|
|
|
24158
23839
|
if (!ref.current) return;
|
|
24159
23840
|
const root = ref.current;
|
|
24160
23841
|
const width = Math.ceil(root.getBoundingClientRect().width);
|
|
24161
|
-
const
|
|
23842
|
+
const {
|
|
23843
|
+
scrollWidth
|
|
23844
|
+
} = root;
|
|
24162
23845
|
let isCompactChanged = false;
|
|
24163
23846
|
if (scrollWidth > width) {
|
|
24164
23847
|
isCompactChanged = compact();
|
|
@@ -87923,7 +87606,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
87923
87606
|
if (null == r) return {};
|
|
87924
87607
|
var t = {};
|
|
87925
87608
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
87926
|
-
if (e.
|
|
87609
|
+
if (e.includes(n)) continue;
|
|
87927
87610
|
t[n] = r[n];
|
|
87928
87611
|
}
|
|
87929
87612
|
return t;
|
|
@@ -87959,7 +87642,7 @@ function _setPrototypeOf(t, e) {
|
|
|
87959
87642
|
/***/ ((module) => {
|
|
87960
87643
|
|
|
87961
87644
|
"use strict";
|
|
87962
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@plesk/ui-library","version":"3.40.
|
|
87645
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@plesk/ui-library","version":"3.40.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":"rimraf ./styleguide && 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.25.0","@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.9","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.24.7","@babel/preset-env":"^7.25.0","@babel/preset-react":"^7.24.7","@babel/preset-typescript":"^7.24.7","@babel/types":"^7.25.0","@csstools/postcss-logical-float-and-clear":"^2.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.8","@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":"^22.1.0","@types/react":"^18.3.3","@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.5","@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","cross-env":"^7.0.3","css-loader":"^7.1.2","css-minimizer-webpack-plugin":"^7.0.0","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":"^10.0.0","jest-environment-jsdom":"^29.7.0","jest-image-snapshot":"^6.4.0","less":"^4.2.0","less-loader":"^12.2.0","mini-css-extract-plugin":"^2.9.0","postcss":"^8.4.40","postcss-less":"^6.0.0","postcss-loader":"^8.1.1","postcss-logical":"^7.0.1","prettier":"^2.8.8","puppeteer-core":"22.8.2","react":"^18.3.1","react-docgen-typescript":"^2.2.2","react-dom":"^18.3.1","react-styleguidist":"^13.1.3","rimraf":"^6.0.1","rtlcss":"^4.2.0","style-loader":"^4.0.0","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.93.0","webpack-cli":"^5.1.4"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"resolutions":{"trim":">=0.0.3"},"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"}');
|
|
87963
87646
|
|
|
87964
87647
|
/***/ }),
|
|
87965
87648
|
|