@plesk/ui-library 3.28.0 → 3.28.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/Form/Form.js +3 -0
- package/cjs/components/FormField/FormField.js +7 -0
- package/cjs/components/FormFieldText/FormFieldText.js +13 -5
- package/cjs/components/InputFile/InputFile.js +4 -2
- package/cjs/index.js +1 -1
- package/dist/plesk-ui-library-rtl.css.map +1 -1
- package/dist/plesk-ui-library.css.map +1 -1
- package/dist/plesk-ui-library.js +27 -7
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +2 -2
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/Form/Form.js +3 -0
- package/esm/components/FormField/FormField.js +7 -0
- package/esm/components/FormFieldText/FormFieldText.js +13 -5
- package/esm/components/InputFile/InputFile.js +4 -2
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/styleguide/build/bundle.fa6ff17e.js +2 -0
- package/styleguide/build/{bundle.24d5b0eb.js.LICENSE.txt → bundle.fa6ff17e.js.LICENSE.txt} +0 -0
- package/styleguide/index.html +2 -2
- package/types/src/components/Form/Form.d.ts +4 -82
- package/types/src/components/Form/FormContext.d.ts +2 -14
- package/types/src/components/Form/types.d.ts +125 -0
- package/types/src/components/InputFile/InputFile.d.ts +6 -1
- package/types/src/components/TextArea/TextArea.d.ts +2 -2
- package/styleguide/build/bundle.24d5b0eb.js +0 -2
package/dist/plesk-ui-library.js
CHANGED
|
@@ -7967,6 +7967,9 @@ class Form extends _react.Component {
|
|
|
7967
7967
|
vertical: this.props.vertical || false,
|
|
7968
7968
|
requiredFields: [],
|
|
7969
7969
|
formContext: {
|
|
7970
|
+
getValues: () => {
|
|
7971
|
+
return this.state.values;
|
|
7972
|
+
},
|
|
7970
7973
|
getValue: (name, def) => {
|
|
7971
7974
|
if (this.state.values) {
|
|
7972
7975
|
return (0, _utils.getIn)(this.state.values, name, def);
|
|
@@ -8908,6 +8911,13 @@ class FormField extends _react.Component {
|
|
|
8908
8911
|
return null;
|
|
8909
8912
|
},
|
|
8910
8913
|
getName: () => this.props.name,
|
|
8914
|
+
getValues: () => {
|
|
8915
|
+
if (this.props.form) {
|
|
8916
|
+
return this.props.form.getValues();
|
|
8917
|
+
}
|
|
8918
|
+
|
|
8919
|
+
return null;
|
|
8920
|
+
},
|
|
8911
8921
|
getValue: def => {
|
|
8912
8922
|
if (this.props.form && this.props.name) {
|
|
8913
8923
|
return this.props.form.getValue(this.props.name, def);
|
|
@@ -10405,6 +10415,7 @@ class FormFieldText extends _react.Component {
|
|
|
10405
10415
|
autoFocus,
|
|
10406
10416
|
autoComplete,
|
|
10407
10417
|
autoheight,
|
|
10418
|
+
inputProps,
|
|
10408
10419
|
...props
|
|
10409
10420
|
} = this.props;
|
|
10410
10421
|
return /*#__PURE__*/_react.default.createElement(_FormField.default, _extends({
|
|
@@ -10417,7 +10428,7 @@ class FormFieldText extends _react.Component {
|
|
|
10417
10428
|
getValue,
|
|
10418
10429
|
setValue,
|
|
10419
10430
|
isDisabled
|
|
10420
|
-
}) => multiline ? /*#__PURE__*/_react.default.createElement(_TextArea.default, {
|
|
10431
|
+
}) => multiline ? /*#__PURE__*/_react.default.createElement(_TextArea.default, _extends({
|
|
10421
10432
|
id: getId(),
|
|
10422
10433
|
name: getName(),
|
|
10423
10434
|
value: getValue(''),
|
|
@@ -10429,7 +10440,7 @@ class FormFieldText extends _react.Component {
|
|
|
10429
10440
|
autoFocus: autoFocus,
|
|
10430
10441
|
autoComplete: autoComplete,
|
|
10431
10442
|
autoheight: autoheight
|
|
10432
|
-
}) : /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
10443
|
+
}, inputProps)) : /*#__PURE__*/_react.default.createElement(_Input.default, _extends({
|
|
10433
10444
|
id: getId(),
|
|
10434
10445
|
name: getName(),
|
|
10435
10446
|
className: `${baseClassName}__input`,
|
|
@@ -10440,7 +10451,7 @@ class FormFieldText extends _react.Component {
|
|
|
10440
10451
|
placeholder: placeholder,
|
|
10441
10452
|
autoFocus: autoFocus,
|
|
10442
10453
|
autoComplete: autoComplete
|
|
10443
|
-
}));
|
|
10454
|
+
}, inputProps)));
|
|
10444
10455
|
}
|
|
10445
10456
|
|
|
10446
10457
|
}
|
|
@@ -10511,7 +10522,13 @@ FormFieldText.propTypes = {
|
|
|
10511
10522
|
* Adjust height automatically when multiline option is set to true.
|
|
10512
10523
|
* @since 1.9.0
|
|
10513
10524
|
*/
|
|
10514
|
-
autoheight: _propTypes.default.bool
|
|
10525
|
+
autoheight: _propTypes.default.bool,
|
|
10526
|
+
|
|
10527
|
+
/**
|
|
10528
|
+
* Props of underlying input element.
|
|
10529
|
+
* @since 3.28.1
|
|
10530
|
+
*/
|
|
10531
|
+
inputProps: _propTypes.default.object
|
|
10515
10532
|
};
|
|
10516
10533
|
FormFieldText.defaultProps = {
|
|
10517
10534
|
size: undefined,
|
|
@@ -10524,7 +10541,8 @@ FormFieldText.defaultProps = {
|
|
|
10524
10541
|
multi: undefined,
|
|
10525
10542
|
className: undefined,
|
|
10526
10543
|
baseClassName: `${_constants.CLS_PREFIX}form-field-text`,
|
|
10527
|
-
autoheight: false
|
|
10544
|
+
autoheight: false,
|
|
10545
|
+
inputProps: undefined
|
|
10528
10546
|
};
|
|
10529
10547
|
var _default = FormFieldText;
|
|
10530
10548
|
exports["default"] = _default;
|
|
@@ -11878,6 +11896,7 @@ const InputFile = ({
|
|
|
11878
11896
|
disabled = false,
|
|
11879
11897
|
locale,
|
|
11880
11898
|
testId,
|
|
11899
|
+
accept,
|
|
11881
11900
|
...props
|
|
11882
11901
|
}) => {
|
|
11883
11902
|
const [file, setFile] = (0, _react.useState)();
|
|
@@ -11935,7 +11954,8 @@ const InputFile = ({
|
|
|
11935
11954
|
ref: inputRef,
|
|
11936
11955
|
"data-test": testId && `${testId}--file-input`,
|
|
11937
11956
|
onFocus: handleFocus,
|
|
11938
|
-
onBlur: handleBlur
|
|
11957
|
+
onBlur: handleBlur,
|
|
11958
|
+
accept: accept
|
|
11939
11959
|
}), /*#__PURE__*/_react.default.createElement(_Translate.default, {
|
|
11940
11960
|
namespace: "InputFile",
|
|
11941
11961
|
content: "browseButton",
|
|
@@ -92560,7 +92580,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
92560
92580
|
/***/ ((module) => {
|
|
92561
92581
|
|
|
92562
92582
|
"use strict";
|
|
92563
|
-
module.exports = JSON.parse('{"name":"@plesk/ui-library","version":"3.28.
|
|
92583
|
+
module.exports = JSON.parse('{"name":"@plesk/ui-library","version":"3.28.1","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","lint:es":"eslint --ext js,md,tsx src configs scripts styleguidist","lint:types":"tsc","lint:style":"stylelint \\"src/**/*.less\\"","styleguide":"styleguidist server --config ./configs/styleguide.config.js","styleguide:build":"styleguidist build --config ./configs/styleguide.config.js","create-component":"node scripts/create-component.js","prepublishOnly":"yarn install && yarn test && yarn build && yarn styleguide:build","storybook":"webpack serve --config ./configs/storybook.config.js --disable-host-check","postinstall":"node ./scripts/postinstall.js"},"files":["esm","cjs","dist","styleguide","types","/scripts/postinstall.js","/index.js"],"dependencies":{"@babel/runtime":"^7.15.4","@plesk/react-movable":"^2.6.0","@types/classnames":"2.2.7","@types/react":"16.8.13","@types/react-dom":"16.8.4","@types/react-measure":"2.0.8","@types/react-transition-group":"^4.4.4","@types/svg4everybody":"2.1.0","classnames":"^2.3.1","codemirror":"5.48.0","marked":"0.3.19","memoize-one":"^5.1.1","popper.js":"1.14.3","prop-types":"^15.7.2","react-measure":"2.3.0","react-sortable-hoc":"0.6.8","react-transition-group":"^4.4.2","scroll-into-view-if-needed":"^2.2.20","svg4everybody":"2.1.9","use-focus-visible":"^1.0.0"},"devDependencies":{"@babel/core":"^7.15.8","@babel/plugin-proposal-class-properties":"^7.14.5","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.15.8","@babel/preset-env":"^7.15.8","@babel/preset-react":"^7.14.5","@babel/preset-typescript":"^7.15.0","@plesk/eslint-config":"^1.1.0","@plesk/stylelint-config":"^1.0.0","@types/buble":"^0.19.2","@types/cheerio":"^0.22.30","@types/doctrine":"^0.0.3","@types/enzyme":"^3.10.9","@types/jest":"^23.3.12","@types/webpack-dev-server":"^3.10.1","@typescript-eslint/eslint-plugin":"^2.7.0","@typescript-eslint/parser":"^2.7.0","autoprefixer":"^10.3.7","babel-loader":"^8.2.3","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-transform-require-ignore":"^0.1.1","clean-webpack-plugin":"^4.0.0","cross-env":"^5.2.0","css-loader":"^6.4.0","css-minimizer-webpack-plugin":"^3.1.1","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.6","enzyme-to-json":"^3.6.2","eslint-config-prettier":"^6.11.0","eslint-plugin-markdown":"^1.0.2","eslint-plugin-prettier":"^3.1.3","expect-puppeteer":"^4.4.0","fs-extra":"^7.0.0","html-webpack-plugin":"^5.5.0","inquirer":"^3.2.1","jest":"^24.9.0","jest-dev-server":"^4.4.0","jest-image-snapshot":"^4.0.2","less":"^4.1.2","less-loader":"^10.2.0","mini-css-extract-plugin":"^2.4.3","postcss":"^8.4.6","postcss-less":"^6.0.0","postcss-loader":"^6.2.1","postcss-logical":"^5.0.3","prettier":"^2.0.5","puppeteer-core":"13.1.3","react":"^16.8.6","react-dom":"^16.8.6","react-styleguidist":"^11.1.7","react-test-renderer":"^16.8.6","rimraf":"^3.0.1","rtlcss":"^3.4.0","style-loader":"^3.3.1","stylelint":"^14.3.0","stylelint-config-prettier":"^9.0.3","stylelint-declaration-block-no-ignored-properties":"^2.5.0","stylelint-no-unsupported-browser-features":"^5.0.2","stylelint-prettier":"^2.0.0","stylelint-use-logical-spec":"^3.2.2","svg-mixer":"^2.3.14","terser-webpack-plugin":"^5.2.4","typescript":"^3.7.2","webpack":"^5.60.0","webpack-cli":"^4.9.1"},"peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"resolutions":{"@babel/types":"^7.15.6","@types/node":"^12.12.8","**/caniuse-lite":"1.0.30001307"},"browserslist":["last 2 versions",">1%","not op_mini all","not dead","not ie 11"],"author":"Plesk Developers <plesk-dev-leads@plesk.com> (https://www.plesk.com/)","license":"Apache-2.0"}');
|
|
92564
92584
|
|
|
92565
92585
|
/***/ }),
|
|
92566
92586
|
|