@plesk/ui-library 3.45.1 → 3.46.1
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/FormFieldPassword/PasswordMeter.js +8 -2
- package/cjs/components/FormFieldPassword/index.js +8 -1
- package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +2 -3
- package/cjs/components/Layout/Layout.js +66 -9
- package/cjs/components/Markdown/Markdown.js +2 -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 +87 -17
- 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/FormFieldPassword/PasswordMeter.js +6 -1
- package/esm/components/FormFieldPassword/index.js +2 -1
- package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +2 -3
- package/esm/components/Layout/Layout.js +66 -9
- package/esm/components/Markdown/Markdown.js +2 -1
- package/esm/index.js +1 -1
- package/package.json +2 -2
- package/styleguide/build/bundle.19f0a6f2.js +2 -0
- package/styleguide/index.html +2 -2
- package/types/components/FormFieldPassword/PasswordMeter.d.ts +3 -1
- package/types/components/FormFieldPassword/index.d.ts +1 -0
- package/types/components/Layout/Layout.d.ts +10 -0
- package/types/components/Markdown/Markdown.d.ts +7 -1
- package/styleguide/build/bundle.a9dbfec3.js +0 -2
- /package/styleguide/build/{bundle.a9dbfec3.js.LICENSE.txt → bundle.19f0a6f2.js.LICENSE.txt} +0 -0
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = void 0;
|
|
7
|
+
exports.setDefaultPasswordEstimateFunction = exports.default = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _Popover = _interopRequireDefault(require("../Popover"));
|
|
10
10
|
var _Translate = require("../Translate");
|
|
@@ -13,6 +13,11 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
13
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
14
|
// Copyright 1999-2025. WebPros International GmbH. All rights reserved.
|
|
15
15
|
|
|
16
|
+
let defaultEstimateFunction = null;
|
|
17
|
+
const setDefaultPasswordEstimateFunction = fn => {
|
|
18
|
+
defaultEstimateFunction = fn;
|
|
19
|
+
};
|
|
20
|
+
exports.setDefaultPasswordEstimateFunction = setDefaultPasswordEstimateFunction;
|
|
16
21
|
const strengthIntents = {
|
|
17
22
|
VeryWeak: 'danger',
|
|
18
23
|
Weak: 'danger',
|
|
@@ -32,7 +37,8 @@ const PasswordMeter = ({
|
|
|
32
37
|
if (!visible) {
|
|
33
38
|
return;
|
|
34
39
|
}
|
|
35
|
-
|
|
40
|
+
const estimateFunction = onEstimate ?? defaultEstimateFunction;
|
|
41
|
+
Promise.resolve(estimateFunction ? estimateFunction(value, _estimatePassword.default, _estimatePassword.DEFAULT_RULES) : (0, _estimatePassword.default)(value)).then(result => {
|
|
36
42
|
setResult(result);
|
|
37
43
|
});
|
|
38
44
|
}, [visible, value, onEstimate]);
|
|
@@ -16,5 +16,12 @@ Object.defineProperty(exports, "generatePassword", {
|
|
|
16
16
|
return _generatePassword.default;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
+
Object.defineProperty(exports, "setDefaultPasswordEstimateFunction", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _PasswordMeter.setDefaultPasswordEstimateFunction;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
19
25
|
var _FormFieldPassword = _interopRequireDefault(require("./FormFieldPassword"));
|
|
20
|
-
var _generatePassword = _interopRequireDefault(require("./generatePassword"));
|
|
26
|
+
var _generatePassword = _interopRequireDefault(require("./generatePassword"));
|
|
27
|
+
var _PasswordMeter = require("./PasswordMeter");
|
|
@@ -24,7 +24,6 @@ const FormFieldRadioButtons = ({
|
|
|
24
24
|
className,
|
|
25
25
|
options,
|
|
26
26
|
autoFocus,
|
|
27
|
-
label,
|
|
28
27
|
...props
|
|
29
28
|
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormField.default, {
|
|
30
29
|
className: (0, _classnames.default)(baseClassName, className),
|
|
@@ -41,9 +40,9 @@ const FormFieldRadioButtons = ({
|
|
|
41
40
|
"aria-invalid": !!Object.keys(getErrors() ?? {}).length,
|
|
42
41
|
"aria-describedby": getDescriptionLabelId(),
|
|
43
42
|
className: `${baseClassName}__fieldset`,
|
|
44
|
-
children: [label && /*#__PURE__*/(0, _jsxRuntime.jsx)("legend", {
|
|
43
|
+
children: [props.label && /*#__PURE__*/(0, _jsxRuntime.jsx)("legend", {
|
|
45
44
|
className: `${baseClassName}__legend`,
|
|
46
|
-
children: label
|
|
45
|
+
children: props.label
|
|
47
46
|
}), options.map(({
|
|
48
47
|
value,
|
|
49
48
|
label,
|
|
@@ -12,6 +12,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
12
12
|
var _reactTransitionGroup = require("react-transition-group");
|
|
13
13
|
var _LocaleProvider = require("../LocaleProvider");
|
|
14
14
|
var _constants = require("../../constants");
|
|
15
|
+
var _utils = require("../../utils");
|
|
15
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
// Copyright 1999-2025. WebPros International GmbH. All rights reserved.
|
|
17
18
|
|
|
@@ -128,6 +129,17 @@ class Layout extends _react.Component {
|
|
|
128
129
|
this.unsubscribeMatchMedia = subscribeMatchMedia('(max-width: 1022px)', this.handleMatchMedia);
|
|
129
130
|
this.unsubscribeClickOutside = subscribeClickOutside([this.sidebarRef, this.responsiveSidebarTogglerRef], this.handleClickOutside);
|
|
130
131
|
}
|
|
132
|
+
componentDidUpdate(prevProps) {
|
|
133
|
+
const isRightSidebarOpen = this.props.rightSidebar && this.props.rightSidebarVisible;
|
|
134
|
+
const wasRightSidebarOpen = prevProps.rightSidebar && prevProps.rightSidebarVisible;
|
|
135
|
+
const isMobile = window.matchMedia('(max-width: 780px)').matches;
|
|
136
|
+
if (!wasRightSidebarOpen && isRightSidebarOpen && isMobile) {
|
|
137
|
+
(0, _utils.disableDocumentScroll)();
|
|
138
|
+
}
|
|
139
|
+
if (wasRightSidebarOpen && !isRightSidebarOpen) {
|
|
140
|
+
(0, _utils.enableDocumentScroll)();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
131
143
|
componentWillUnmount() {
|
|
132
144
|
this.unsubscribeMatchMedia?.();
|
|
133
145
|
this.unsubscribeClickOutside?.();
|
|
@@ -286,6 +298,42 @@ class Layout extends _react.Component {
|
|
|
286
298
|
})
|
|
287
299
|
});
|
|
288
300
|
}
|
|
301
|
+
renderRightSidebar({
|
|
302
|
+
rightSidebar,
|
|
303
|
+
rightSidebarVisible
|
|
304
|
+
}) {
|
|
305
|
+
if (!rightSidebar) {
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
const {
|
|
309
|
+
baseClassName
|
|
310
|
+
} = this.props;
|
|
311
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
312
|
+
in: !rightSidebarVisible,
|
|
313
|
+
timeout: 300,
|
|
314
|
+
classNames: {
|
|
315
|
+
enter: `${baseClassName}__right-sidebar--enter`,
|
|
316
|
+
enterActive: `${baseClassName}__right-sidebar--active-enter`,
|
|
317
|
+
enterDone: `${baseClassName}__right-sidebar--on`,
|
|
318
|
+
exit: `${baseClassName}__right-sidebar--exit`,
|
|
319
|
+
exitActive: `${baseClassName}__right-sidebar--active-exit`,
|
|
320
|
+
exitDone: `${baseClassName}__right-sidebar--off`
|
|
321
|
+
},
|
|
322
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("aside", {
|
|
323
|
+
className: `${baseClassName}__right-sidebar`,
|
|
324
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
325
|
+
className: `${baseClassName}__right-sidebar-inner`,
|
|
326
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
327
|
+
className: `${baseClassName}__right-sidebar-content`,
|
|
328
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
329
|
+
className: `${baseClassName}__right-sidebar-content-inner`,
|
|
330
|
+
children: rightSidebar
|
|
331
|
+
})
|
|
332
|
+
})
|
|
333
|
+
})
|
|
334
|
+
})
|
|
335
|
+
});
|
|
336
|
+
}
|
|
289
337
|
renderMainContent({
|
|
290
338
|
children
|
|
291
339
|
}) {
|
|
@@ -330,6 +378,8 @@ class Layout extends _react.Component {
|
|
|
330
378
|
sidebarType,
|
|
331
379
|
sidebarCollapsible,
|
|
332
380
|
sidebarCollapsed,
|
|
381
|
+
rightSidebar,
|
|
382
|
+
rightSidebarVisible,
|
|
333
383
|
translate,
|
|
334
384
|
onSidebarToggle,
|
|
335
385
|
contentAddon,
|
|
@@ -357,6 +407,7 @@ class Layout extends _react.Component {
|
|
|
357
407
|
[`${baseClassName}--sidebar`]: sidebar,
|
|
358
408
|
[`${baseClassName}--sidebar-type-${sidebarType}`]: sidebarType && sidebar,
|
|
359
409
|
[`${baseClassName}--sidebar-collapsed`]: sidebarType === 'collapsed' && isSidebarClosed,
|
|
410
|
+
[`${baseClassName}--right-sidebar-collapsed`]: !rightSidebar || !rightSidebarVisible,
|
|
360
411
|
[`${baseClassName}--sidebar-folded`]: sidebarType === 'folded' && isSidebarClosed
|
|
361
412
|
}, className),
|
|
362
413
|
...props,
|
|
@@ -369,15 +420,21 @@ class Layout extends _react.Component {
|
|
|
369
420
|
children: [this.renderSidebar({
|
|
370
421
|
sidebar
|
|
371
422
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
372
|
-
className: `${baseClassName}__content`,
|
|
373
|
-
children: [
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
423
|
+
className: `${baseClassName}__content-wrapper`,
|
|
424
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
425
|
+
className: `${baseClassName}__content`,
|
|
426
|
+
children: [this.renderContentAddon({
|
|
427
|
+
contentAddon
|
|
428
|
+
}), this.renderContentHeader({
|
|
429
|
+
contentHeader
|
|
430
|
+
}), this.renderMainContent({
|
|
431
|
+
children
|
|
432
|
+
}), this.renderFooter({
|
|
433
|
+
footer
|
|
434
|
+
})]
|
|
435
|
+
}), this.renderRightSidebar({
|
|
436
|
+
rightSidebar,
|
|
437
|
+
rightSidebarVisible
|
|
381
438
|
})]
|
|
382
439
|
})]
|
|
383
440
|
})]
|
|
@@ -22,13 +22,14 @@ const Markdown = ({
|
|
|
22
22
|
className,
|
|
23
23
|
compact = false,
|
|
24
24
|
children,
|
|
25
|
+
parserOptions,
|
|
25
26
|
...props
|
|
26
27
|
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
27
28
|
className: (0, _classnames.default)(baseClassName, {
|
|
28
29
|
[`${baseClassName}--compact`]: compact
|
|
29
30
|
}, className),
|
|
30
31
|
dangerouslySetInnerHTML: {
|
|
31
|
-
__html: (0, _marked.marked)(children)
|
|
32
|
+
__html: (0, _marked.marked)(children, parserOptions)
|
|
32
33
|
},
|
|
33
34
|
...props
|
|
34
35
|
});
|
package/cjs/index.js
CHANGED
|
@@ -46,5 +46,5 @@ Object.keys(_components).forEach(function (key) {
|
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
// Copyright 1999-2025. WebPros International GmbH. All rights reserved.
|
|
49
|
-
const version = exports.version = "3.
|
|
49
|
+
const version = exports.version = "3.46.1";
|
|
50
50
|
(0, _svg4everybody.default)();
|