@plesk/ui-library 3.46.0 → 3.46.2
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/FormFieldPassword.js +0 -1
- 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 +17 -7
- 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 +38 -16
- 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/FormFieldPassword.js +0 -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 +17 -7
- package/esm/components/Markdown/Markdown.js +2 -1
- package/esm/index.js +1 -1
- package/package.json +2 -2
- package/styleguide/build/bundle.1a395777.js +2 -0
- package/styleguide/index.html +2 -2
- package/types/components/FormFieldPassword/FormFieldPassword.d.ts +1 -17
- package/types/components/FormFieldPassword/PasswordMeter.d.ts +3 -1
- package/types/components/FormFieldPassword/index.d.ts +1 -0
- package/types/components/Markdown/Markdown.d.ts +7 -1
- package/styleguide/build/bundle.1db50e1a.js +0 -2
- /package/styleguide/build/{bundle.1db50e1a.js.LICENSE.txt → bundle.1a395777.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,
|
|
@@ -54,6 +54,7 @@ class Layout extends _react.Component {
|
|
|
54
54
|
});
|
|
55
55
|
(0, _defineProperty2.default)(this, "headerRef", /*#__PURE__*/(0, _react.createRef)());
|
|
56
56
|
(0, _defineProperty2.default)(this, "sidebarRef", /*#__PURE__*/(0, _react.createRef)());
|
|
57
|
+
(0, _defineProperty2.default)(this, "rightSidebarRef", /*#__PURE__*/(0, _react.createRef)());
|
|
57
58
|
(0, _defineProperty2.default)(this, "responsiveSidebarTogglerRef", /*#__PURE__*/(0, _react.createRef)());
|
|
58
59
|
(0, _defineProperty2.default)(this, "unsubscribeMatchMedia", void 0);
|
|
59
60
|
(0, _defineProperty2.default)(this, "unsubscribeClickOutside", void 0);
|
|
@@ -308,6 +309,8 @@ class Layout extends _react.Component {
|
|
|
308
309
|
const {
|
|
309
310
|
baseClassName
|
|
310
311
|
} = this.props;
|
|
312
|
+
const isMobile = window.matchMedia('(max-width: 768px)').matches;
|
|
313
|
+
const sidebarOffsetTop = this.headerRef.current?.getBoundingClientRect().height || 0;
|
|
311
314
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
312
315
|
in: !rightSidebarVisible,
|
|
313
316
|
timeout: 300,
|
|
@@ -320,7 +323,14 @@ class Layout extends _react.Component {
|
|
|
320
323
|
exitDone: `${baseClassName}__right-sidebar--off`
|
|
321
324
|
},
|
|
322
325
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("aside", {
|
|
323
|
-
|
|
326
|
+
ref: this.rightSidebarRef,
|
|
327
|
+
className: (0, _classnames.default)(`${baseClassName}__right-sidebar`, {
|
|
328
|
+
[`${baseClassName}__right-sidebar--on`]: rightSidebarVisible,
|
|
329
|
+
[`${baseClassName}__right-sidebar--off`]: !rightSidebarVisible
|
|
330
|
+
}),
|
|
331
|
+
style: {
|
|
332
|
+
height: isMobile ? '100vh' : `calc(100vh - ${sidebarOffsetTop}px)`
|
|
333
|
+
},
|
|
324
334
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
325
335
|
className: `${baseClassName}__right-sidebar-inner`,
|
|
326
336
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -419,9 +429,9 @@ class Layout extends _react.Component {
|
|
|
419
429
|
className: `${baseClassName}__container`,
|
|
420
430
|
children: [this.renderSidebar({
|
|
421
431
|
sidebar
|
|
422
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
432
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
423
433
|
className: `${baseClassName}__content-wrapper`,
|
|
424
|
-
children:
|
|
434
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
425
435
|
className: `${baseClassName}__content`,
|
|
426
436
|
children: [this.renderContentAddon({
|
|
427
437
|
contentAddon
|
|
@@ -432,10 +442,10 @@ class Layout extends _react.Component {
|
|
|
432
442
|
}), this.renderFooter({
|
|
433
443
|
footer
|
|
434
444
|
})]
|
|
435
|
-
})
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
445
|
+
})
|
|
446
|
+
}), this.renderRightSidebar({
|
|
447
|
+
rightSidebar,
|
|
448
|
+
rightSidebarVisible
|
|
439
449
|
})]
|
|
440
450
|
})]
|
|
441
451
|
})
|
|
@@ -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.46.
|
|
49
|
+
const version = exports.version = "3.46.2";
|
|
50
50
|
(0, _svg4everybody.default)();
|