@para-ui/core 2.0.16 → 2.0.17
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/AutoBox/index.js +3 -3
- package/AutoTips/index.js +3 -3
- package/Breadcrumbs/index.js +3 -3
- package/Button/index.js +3 -3
- package/ButtonGroup/index.js +3 -3
- package/Cascader/index.js +3 -3
- package/Checkbox/index.js +3 -3
- package/CheckboxGroup/index.js +3 -3
- package/ComboSelect/index.js +3 -3
- package/Container/index.js +3 -3
- package/DatePicker/index.js +3 -3
- package/Desktop/index.js +3 -3
- package/Drawer/index.js +3 -3
- package/Form/index.css +1 -1
- package/Form/index.d.ts +9 -1
- package/Form/index.js +3 -3
- package/FormItem/index.css +1 -1
- package/FormItem/index.d.ts +9 -1
- package/FormItem/index.js +3 -3
- package/FunctionModal/index.js +3 -3
- package/Help/index.js +3 -3
- package/IconList/index.js +3 -3
- package/InputLang/index.js +3 -3
- package/InputNumber/index.js +3 -3
- package/Loading/index.js +3 -3
- package/Menu/index.js +3 -3
- package/Message/index.js +3 -3
- package/Modal/index.js +3 -3
- package/MultiBox/index.js +3 -3
- package/PageHeader/index.js +3 -3
- package/Pagination/index.js +3 -3
- package/ParauiProvider/index.js +3 -3
- package/PopConfirm/index.js +3 -3
- package/Popover/index.js +3 -3
- package/Popper/index.js +3 -3
- package/Radio/index.js +3 -3
- package/RadioGroup/index.js +3 -3
- package/Search/index.js +3 -3
- package/Select/index.js +3 -3
- package/SingleBox/index.js +3 -3
- package/Slider/index.js +3 -3
- package/Split/index.js +3 -3
- package/Stepper/index.js +3 -3
- package/Switch/index.js +3 -3
- package/Table/index.js +3 -3
- package/Tabs/index.js +3 -3
- package/TextField/index.js +3 -3
- package/TimePicker/index.js +3 -3
- package/Timeline/index.js +3 -3
- package/ToggleButton/index.js +3 -3
- package/Tooltip/index.js +3 -3
- package/Transfer/index.js +3 -3
- package/Tree/index.js +3 -3
- package/Upload/index.js +3 -3
- package/index.js +3 -3
- package/package.json +1 -1
- package/style.css +1 -1
package/Popover/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@material-ui/core"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","react"],r):"object"==typeof exports?exports.ParaUI=r(require("@material-ui/core"),require("react")):e.ParaUI=r(e["@material-ui/core"],e.react)}(self,(function(e,r){return function(){"use strict";var t={
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@material-ui/core"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","react"],r):"object"==typeof exports?exports.ParaUI=r(require("@material-ui/core"),require("react")):e.ParaUI=r(e["@material-ui/core"],e.react)}(self,(function(e,r){return function(){"use strict";var t={7418:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var i,c,u=o(e),f=1;f<arguments.length;f++){for(var l in i=Object(arguments[f]))t.call(i,l)&&(u[l]=i[l]);if(r){c=r(i);for(var p=0;p<c.length;p++)n.call(i,c[p])&&(u[c[p]]=i[c[p]])}}return u}},
|
|
7
|
+
var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var i,c,u=o(e),f=1;f<arguments.length;f++){for(var l in i=Object(arguments[f]))t.call(i,l)&&(u[l]=i[l]);if(r){c=r(i);for(var p=0;p<c.length;p++)n.call(i,c[p])&&(u[c[p]]=i[c[p]])}}return u}},5251:function(e,r,t){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
t(
|
|
16
|
+
t(7418);var n=t(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;o=a("react.element"),a("react.fragment")}var i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function f(e,r,t){var n,a={},f=null,l=null;for(n in void 0!==t&&(f=""+t),void 0!==r.key&&(f=""+r.key),void 0!==r.ref&&(l=r.ref),r)c.call(r,n)&&!u.hasOwnProperty(n)&&(a[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===a[n]&&(a[n]=r[n]);return{$$typeof:o,type:e,key:f,ref:l,props:a,_owner:i.current}}r.jsx=f},5893:function(e,r,t){e.exports=t(5251)},1731:function(r){r.exports=e},9297:function(e){e.exports=r}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,{a:r}),r},o.d=function(e,r){for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){o.r(a),o.d(a,{Popover:function(){return i}});var e=o(5893),r=o(1731),t=function(){return t=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},t.apply(this,arguments)},n=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},i=function(o){var a,i=o.className,c=o.children,u=n(o,["className","children"]);return(0,e.jsx)(r.Popover,t({className:(a="paraui-popover",i&&(a+=" "+i),a)},u,{children:c}),void 0)};a.default=i}(),a}()}));
|
package/Popper/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@material-ui/core"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","react"],r):"object"==typeof exports?exports.ParaUI=r(require("@material-ui/core"),require("react")):e.ParaUI=r(e["@material-ui/core"],e.react)}(self,(function(e,r){return function(){"use strict";var t={
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@material-ui/core"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","react"],r):"object"==typeof exports?exports.ParaUI=r(require("@material-ui/core"),require("react")):e.ParaUI=r(e["@material-ui/core"],e.react)}(self,(function(e,r){return function(){"use strict";var t={7418:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var i,c,u=o(e),f=1;f<arguments.length;f++){for(var p in i=Object(arguments[f]))t.call(i,p)&&(u[p]=i[p]);if(r){c=r(i);for(var l=0;l<c.length;l++)n.call(i,c[l])&&(u[c[l]]=i[c[l]])}}return u}},
|
|
7
|
+
var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var i,c,u=o(e),f=1;f<arguments.length;f++){for(var p in i=Object(arguments[f]))t.call(i,p)&&(u[p]=i[p]);if(r){c=r(i);for(var l=0;l<c.length;l++)n.call(i,c[l])&&(u[c[l]]=i[c[l]])}}return u}},5251:function(e,r,t){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
t(
|
|
16
|
+
t(7418);var n=t(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;o=a("react.element"),a("react.fragment")}var i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function f(e,r,t){var n,a={},f=null,p=null;for(n in void 0!==t&&(f=""+t),void 0!==r.key&&(f=""+r.key),void 0!==r.ref&&(p=r.ref),r)c.call(r,n)&&!u.hasOwnProperty(n)&&(a[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===a[n]&&(a[n]=r[n]);return{$$typeof:o,type:e,key:f,ref:p,props:a,_owner:i.current}}r.jsx=f},5893:function(e,r,t){e.exports=t(5251)},1731:function(r){r.exports=e},9297:function(e){e.exports=r}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,{a:r}),r},o.d=function(e,r){for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){o.r(a),o.d(a,{Popper:function(){return i}});var e=o(5893),r=o(1731),t=function(){return t=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},t.apply(this,arguments)},n=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},i=function(o){var a,i=o.className,c=o.children,u=n(o,["className","children"]);return(0,e.jsx)(r.Popper,t({className:(a="paraui-popper",i&&(a+=" "+i),a)},u,{children:c}),void 0)};a.default=i}(),a}()}));
|
package/Radio/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.ParaUI=r(require("react")):e.ParaUI=r(e.react)}(self,(function(e){return function(){"use strict";var r={
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.ParaUI=r(require("react")):e.ParaUI=r(e.react)}(self,(function(e){return function(){"use strict";var r={7418:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var i,c,u=o(e),f=1;f<arguments.length;f++){for(var s in i=Object(arguments[f]))t.call(i,s)&&(u[s]=i[s]);if(r){c=r(i);for(var l=0;l<c.length;l++)n.call(i,c[l])&&(u[c[l]]=i[c[l]])}}return u}},
|
|
7
|
+
var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var i,c,u=o(e),f=1;f<arguments.length;f++){for(var s in i=Object(arguments[f]))t.call(i,s)&&(u[s]=i[s]);if(r){c=r(i);for(var l=0;l<c.length;l++)n.call(i,c[l])&&(u[c[l]]=i[c[l]])}}return u}},5251:function(e,r,t){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
t(
|
|
16
|
+
t(7418);var n=t(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;o=a("react.element"),a("react.fragment")}var i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function f(e,r,t){var n,a={},f=null,s=null;for(n in void 0!==t&&(f=""+t),void 0!==r.key&&(f=""+r.key),void 0!==r.ref&&(s=r.ref),r)c.call(r,n)&&!u.hasOwnProperty(n)&&(a[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===a[n]&&(a[n]=r[n]);return{$$typeof:o,type:e,key:f,ref:s,props:a,_owner:i.current}}r.jsx=f,r.jsxs=f},5893:function(e,r,t){e.exports=t(5251)},9297:function(r){r.exports=e}},t={};function n(e){var o=t[e];if(void 0!==o)return o.exports;var a=t[e]={exports:{}};return r[e](a,a.exports,n),a.exports}n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,{a:r}),r},n.d=function(e,r){for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){n.r(o),n.d(o,{Radio:function(){return a}});var e=n(5893),r=n(9297),t=function(){return t=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},t.apply(this,arguments)},a=function(n){var o=n.className,a=void 0===o?"":o,i=n.label,c=void 0===i?"":i,u=n.size,f=void 0===u?"large":u,s=n.disabled,l=void 0!==s&&s,d=n.onChange,p=(0,r.useState)(!1),v=p[0],b=p[1];(0,r.useEffect)((function(){void 0!==n.defaultChecked&&b(n.defaultChecked)}),[]),(0,r.useEffect)((function(){void 0!==n.checked&&b(n.checked)}),[n.checked]);var y;return(0,e.jsxs)("label",t({className:(y="paraui-radio",a&&(y+=" "+a),f&&(y+=" radio-"+f),l&&(y+=" radio-disabled"),v&&(y+=" radio-checked"),y),onClick:function(e){e.preventDefault(),l||(void 0===n.checked&&b(!v),e.target.checked=!v,d&&d(e,!v))}},{children:[(0,e.jsxs)("span",t({className:"paraui-radio-box"},{children:[(0,e.jsx)("input",t({type:"radio",value:v},n.inputProps),void 0),(0,e.jsx)("span",{className:"paraui-radio-box-inner"},void 0)]}),void 0),c&&(0,e.jsx)("span",t({className:"paraui-radio-label"},{children:c}),void 0)]}),void 0)};o.default=a}(),o}()}));
|
package/RadioGroup/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.ParaUI=r(require("react")):e.ParaUI=r(e.react)}(self,(function(e){return function(){"use strict";var r={
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.ParaUI=r(require("react")):e.ParaUI=r(e.react)}(self,(function(e){return function(){"use strict";var r={7418:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},o=0;o<10;o++)r["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},t)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var i,c,u=n(e),d=1;d<arguments.length;d++){for(var l in i=Object(arguments[d]))o.call(i,l)&&(u[l]=i[l]);if(r){c=r(i);for(var s=0;s<c.length;s++)t.call(i,c[s])&&(u[c[s]]=i[c[s]])}}return u}},
|
|
7
|
+
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},o=0;o<10;o++)r["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},t)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var i,c,u=n(e),d=1;d<arguments.length;d++){for(var l in i=Object(arguments[d]))o.call(i,l)&&(u[l]=i[l]);if(r){c=r(i);for(var s=0;s<c.length;s++)t.call(i,c[s])&&(u[c[s]]=i[c[s]])}}return u}},5251:function(e,r,o){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,t=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
o(
|
|
16
|
+
o(7418);var t=o(9297),n=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;n=a("react.element"),a("react.fragment")}var i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function d(e,r,o){var t,a={},d=null,l=null;for(t in void 0!==o&&(d=""+o),void 0!==r.key&&(d=""+r.key),void 0!==r.ref&&(l=r.ref),r)c.call(r,t)&&!u.hasOwnProperty(t)&&(a[t]=r[t]);if(e&&e.defaultProps)for(t in r=e.defaultProps)void 0===a[t]&&(a[t]=r[t]);return{$$typeof:n,type:e,key:d,ref:l,props:a,_owner:i.current}}r.jsx=d,r.jsxs=d},5893:function(e,r,o){e.exports=o(5251)},3877:function(e,r,o){var t=o(5893),n=o(9297),a=function(){return a=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},a.apply(this,arguments)};r.default=function(e){var r=e.className,o=void 0===r?"":r,i=e.label,c=void 0===i?"":i,u=e.size,d=void 0===u?"large":u,l=e.disabled,s=void 0!==l&&l,f=e.onChange,p=(0,n.useState)(!1),v=p[0],b=p[1];(0,n.useEffect)((function(){void 0!==e.defaultChecked&&b(e.defaultChecked)}),[]),(0,n.useEffect)((function(){void 0!==e.checked&&b(e.checked)}),[e.checked]);var y;return(0,t.jsxs)("label",a({className:(y="paraui-radio",o&&(y+=" "+o),d&&(y+=" radio-"+d),s&&(y+=" radio-disabled"),v&&(y+=" radio-checked"),y),onClick:function(r){r.preventDefault(),s||(void 0===e.checked&&b(!v),r.target.checked=!v,f&&f(r,!v))}},{children:[(0,t.jsxs)("span",a({className:"paraui-radio-box"},{children:[(0,t.jsx)("input",a({type:"radio",value:v},e.inputProps),void 0),(0,t.jsx)("span",{className:"paraui-radio-box-inner"},void 0)]}),void 0),c&&(0,t.jsx)("span",a({className:"paraui-radio-label"},{children:c}),void 0)]}),void 0)}},9297:function(r){r.exports=e}},o={};function t(e){var n=o[e];if(void 0!==n)return n.exports;var a=o[e]={exports:{}};return r[e](a,a.exports,t),a.exports}t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},t.d=function(e,r){for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){t.r(n),t.d(n,{RadioGroup:function(){return i}});var e=t(9297),r=t(5893),o=t(3877),a=function(){return a=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},a.apply(this,arguments)},i=function(t){var n=t.className,i=void 0===n?"":n,c=t.label,u=void 0===c?"":c,d=t.size,l=void 0===d?"large":d,s=t.row,f=void 0===s||s,p=t.disabled,v=void 0!==p&&p,b=t.required,y=void 0!==b&&b,h=t.error,j=void 0!==h&&h,g=t.helperText,O=void 0===g?"":g,m=t.id,x=void 0===m?"name":m,_=t.value,k=t.list,w=t.onChange,P=(0,e.useState)(),N=P[0],S=P[1];(0,e.useEffect)((function(){void 0!==t.defaultValue&&S(t.defaultValue)}),[]),(0,e.useEffect)((function(){void 0!==_&&S(_)}),[_]);var E,C=function(e){return function(){var r=e[x];_!==r&&(void 0===t.value&&S(r),w&&w(r,e))}};return(0,r.jsxs)("div",a({className:(E="paraui-radio-group",i&&(E+=" "+i),l&&(E+=" radio-group-"+l),j&&(E+=" radio-group-error"),v&&(E+=" radio-group-disabled"),f&&(E+=" radio-group-row"),E)},{children:[(0,r.jsxs)("label",a({className:"radio-group-label"},{children:[u,y&&(0,r.jsx)("span",a({className:"required-char"},{children:"*"}),void 0)]}),void 0),(0,r.jsx)("div",a({className:"radio-group-content"},{children:k.map((function(r,t){return(0,e.createElement)(o.default,a({},r,{checked:N===r[x],size:l,disabled:Boolean(v||r.disabled),key:t,onChange:C(r)}))}))}),void 0),O&&(0,r.jsx)("p",a({className:"radio-group-error-text"},{children:O}),void 0)]}),void 0)};n.default=i}(),n}()}));
|
package/Search/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/CloseCircle"),require("@para-ui/icons/Down"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/CloseCircle","@para-ui/icons/Down","@para-ui/icons/Forbid","@para-ui/icons/LoadingF","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","@para-ui/icons/Search","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/CloseCircle"),require("@para-ui/icons/Down"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/CloseCircle"],e["@para-ui/icons/Down"],e["@para-ui/icons/Forbid"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["@para-ui/icons/Search"],e["para-lib"],e.react)}(self,(function(e,t,n,i,o,r,a,l,c,s){return function(){"use strict";var u={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/CloseCircle"),require("@para-ui/icons/Down"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/CloseCircle","@para-ui/icons/Down","@para-ui/icons/Forbid","@para-ui/icons/LoadingF","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","@para-ui/icons/Search","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/CloseCircle"),require("@para-ui/icons/Down"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/CloseCircle"],e["@para-ui/icons/Down"],e["@para-ui/icons/Forbid"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["@para-ui/icons/Search"],e["para-lib"],e.react)}(self,(function(e,t,n,i,o,r,a,l,c,s){return function(){"use strict";var u={6010:function(e,t,n){function i(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=i(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function o(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=i(e))&&(o&&(o+=" "),o+=t);return o}n.d(t,{Z:function(){return o}})},7418:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var a,l,c=o(e),s=1;s<arguments.length;s++){for(var u in a=Object(arguments[s]))n.call(a,u)&&(c[u]=a[u]);if(t){l=t(a);for(var d=0;d<l.length;d++)i.call(a,l[d])&&(c[l[d]]=a[l[d]])}}return c}},
|
|
7
|
+
var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var a,l,c=o(e),s=1;s<arguments.length;s++){for(var u in a=Object(arguments[s]))n.call(a,u)&&(c[u]=a[u]);if(t){l=t(a);for(var d=0;d<l.length;d++)i.call(a,l[d])&&(c[l[d]]=a[l[d]])}}return c}},5251:function(e,t,n){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
n(4126);var i=n(9297),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;o=r("react.element"),t.Fragment=r("react.fragment")}var a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var i,r={},s=null,u=null;for(i in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,i)&&!c.hasOwnProperty(i)&&(r[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===r[i]&&(r[i]=t[i]);return{$$typeof:o,type:e,key:s,ref:u,props:r,_owner:a.current}}t.jsx=s,t.jsxs=s},7712:function(e,t,n){e.exports=n(9524)},3094:function(e,t,n){var i=n(7712),o=n(9297),r=n(6885),a=function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};t.default=function(e){var t=e.children,n=e.placement,l=void 0===n?"bottom-start":n,c=e.tips,s=void 0===c?"":c,u=e.className,d=void 0===u?"":u,f=(0,o.useRef)(),p=(0,o.useState)(""),v=p[0],h=p[1];(0,o.useEffect)((function(){h(s)}),[s]);var m;return(0,i.jsx)("div",a({ref:f,className:(m="paraui-auto-tips",d&&(m+=" "+d),m),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?h(s||f.current.innerText):h("")}},{children:(0,i.jsx)(r.default,a({title:v,placement:l},{children:(0,i.jsx)("div",a({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},2990:function(e,t,n){n.d(t,{default:function(){return b}});var i=n(7712),o=n(9297),r=n(1731),a=n(4927),l=n(1102),c=n.n(l),s=n(2749),u=n.n(s),d=n(6885),f=n(6028),p=n.n(f),v=function(){return v=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)};var h=function(){return h=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)},m=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n},x=function(e){var t=e.variant,n=void 0===t?"contained":t,l=e.size,s=void 0===l?"large":l,f=e.className,p=e.disabled,v=void 0!==p&&p,x=e.children,b=e.startIcon,g=e.endIcon,y=e.loading,j=void 0!==y&&y,w=e.toolTipTitle,O=void 0===w?"":w,S=e.danger,C=void 0!==S&&S,N=m(e,["variant","size","className","disabled","children","startIcon","endIcon","loading","toolTipTitle","danger"]),k=(0,o.useState)(!1),P=k[0],E=k[1],I=function(e){if(!P)return"start"===e&&b?(0,i.jsx)("span",h({className:(0,a.Z)("btn-icon","start-icon")},{children:b}),void 0):"end"===e&&g?(0,i.jsx)("span",h({className:(0,a.Z)("btn-icon","end-icon")},{children:g}),void 0):null;if("object"==typeof j){var t=j.delay||0;setTimeout((function(){return E(!1)}),t)}return"start"===e?(0,i.jsx)("span",h({className:"btn-icon loading-icon"},{children:(0,i.jsx)(c(),{},void 0)}),void 0):null},T=(0,i.jsx)(r.Button,h({},N,{color:"default",variant:"contained",disabled:v,disableRipple:!0,disableElevation:!0,className:(0,a.Z)("paraui-button",f,"paraui-button-".concat(n),"paraui-button-".concat(s),P&&"paraui-button-loading",C&&!v&&"paraui-button-dangerous"),startIcon:I("start"),endIcon:I("end")},{children:x}),void 0);return(0,o.useEffect)((function(){E(!!j)}),[j]),v&&O?(0,i.jsx)(d.default,h({title:function(){if(v&&O){return(0,i.jsxs)("span",{children:[(0,i.jsx)(u(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),O]},void 0)}return O}()},{children:(0,i.jsx)("span",h({className:"paraui-button--disabled"},{children:T}),void 0)}),void 0):T};x.IconButton=function(e){var t=e.variant,n=void 0===t?"contained":t,l=e.size,s=void 0===l?"large":l,f=e.toolTipTitle,p=void 0===f?"":f,v=e.children,x=e.className,b=e.disabled,g=void 0!==b&&b,y=e.loading,j=void 0!==y&&y,w=e.TooltipProps,O=e.danger,S=void 0!==O&&O,C=m(e,["variant","size","toolTipTitle","children","className","disabled","loading","TooltipProps","danger"]),N=(0,o.useState)(!1),k=N[0],P=N[1],E=(0,i.jsx)(r.IconButton,h({},C,{disabled:g,disableRipple:!0,className:(0,a.Z)("paraui-icon-button",x,"paraui-icon-button-".concat(n),"paraui-icon-button-".concat(s),k&&"paraui-icon-button-loading",S&&!g&&"paraui-icon-button-dangerous")},{children:function(){if(!k)return v;if("object"==typeof j){var e=j.delay||0;setTimeout((function(){return P(!1)}),e)}return(0,i.jsx)("span",h({className:"loading-icon"},{children:(0,i.jsx)(c(),{},void 0)}),void 0)}()}),void 0);return(0,o.useEffect)((function(){P(!!j)}),[j]),p?(0,i.jsx)(d.default,h({},w,{title:function(){if(g&&p){return(0,i.jsxs)("span",{children:[(0,i.jsx)(u(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),p]},void 0)}return p}()},{children:g?(0,i.jsx)("span",h({className:"paraui-button--disabled"},{children:E}),void 0):E}),void 0):E},x.SplitButton=function(e){var t=e.buttonText,n=e.options,l=void 0===n?[]:n,c=e.className,s=e.disabled,u=void 0!==s&&s,d=e.onClick,f=e.optionRender,h=(0,o.useState)(!1),m=h[0],x=h[1],g=(0,o.useRef)(null),y=(0,o.useRef)(),j=(0,o.useState)(0),w=j[0],O=j[1],S=function(e,t,n){var i;O(t),x(!1),null===(i=y.current)||void 0===i||i.classList.remove("paraui-button-split--active"),null==d||d(e,n)},C=function(e){var t,n;(null===(t=g.current)||void 0===t?void 0:t.contains(e.target))||(x(!1),null===(n=y.current)||void 0===n||n.classList.remove("paraui-button-split--active"))},N=function(){return(0,i.jsx)("div",v({className:"paraui-button-split-list"},{children:(0,i.jsx)("ul",{children:l.map((function(e,t){return Array.isArray(e)?function(e,t){return(0,i.jsx)("li",v({className:"split-li-group"},{children:e.map((function(e,n){var o="".concat(t,"-").concat(n);return(0,i.jsx)("div",v({className:(0,a.Z)("split-li",o===w&&"split-li--active"),onClick:function(t){return S(e,o,t)}},{children:(null==f?void 0:f(e))||e.label}),o)}))}),t)}(e,t):(0,i.jsx)("li",v({className:(0,a.Z)("split-li",t===w&&"split-li--active"),onClick:function(n){return S(e,t,n)}},{children:(null==f?void 0:f(e))||e.label}),t)}))},void 0)}),void 0)};return(0,i.jsxs)("div",v({className:(0,a.Z)("paraui-button-split",c),ref:g,onMouseLeave:function(e){var t;e.stopPropagation(),null===(t=e.currentTarget.firstElementChild)||void 0===t||t.classList.remove("paraui-button-split--active"),x(!1)}},{children:[(0,i.jsx)(b,v({variant:"outlined",onMouseEnter:function(e){e.stopPropagation();var t=e.currentTarget;y.current=t,t.classList.add("paraui-button-split--active"),x(!0)},startIcon:(0,i.jsx)(p(),{},void 0),disabled:u},{children:null!=t?t:"更多操作"}),void 0),(0,i.jsx)(r.Popper,v({open:m,anchorEl:g.current,transition:!0,placement:"bottom-end"},{children:function(e){var t=e.TransitionProps;e.placement;return(0,i.jsx)(r.Grow,v({},t,{children:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(r.ClickAwayListener,v({onClickAway:C},{children:N()}),void 0)},void 0)}),void 0)}}),void 0)]}),void 0)};var b=x},9011:function(e,t,n){var i=n(7712),o=n(9297),r=n(1102),a=n.n(r),l=function(){return l=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};t.default=function(e){var t=e.className,n=e.style,r=e.opacity,c=void 0===r?.7:r,s=(0,o.useRef)(null);(0,o.useEffect)((function(){s&&s.current&&s.current.parentNode&&((getComputedStyle(s.current.parentNode)||{}).position||(s.current.parentNode.style.position="relative"))}),[]);var u;return(0,i.jsxs)("div",l({className:(u="paraui-loading",t&&(u+=" "+t),u),style:n,ref:s},{children:[(0,i.jsx)("div",l({className:"paraui-loading-box"},{children:(0,i.jsx)(a(),{},void 0)}),void 0),(0,i.jsx)("div",{className:"paraui-loading-mask",style:{opacity:c}},void 0)]}),void 0)}},3672:function(e,t,n){var i=n(7712),o=n(9297),r=n(1731),a=n(3094),l=n(9011),c=n(8528),s=n.n(c),u=n(6570),d=n.n(u),f=n(3475),p=function(){return p=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n};t.default=function(e){var t=e.className,n=e.size,c=void 0===n?"large":n,u=e.labelMode,h=void 0===u?"outside":u,m=e.placeholder,x=void 0===m?"":m,b=e.label,g=void 0===b?"":b,y=e.disabled,j=void 0!==y&&y,w=e.multiline,O=void 0!==w&&w,S=e.required,C=void 0!==S&&S,N=e.labelSign,k=e.rows,P=void 0===k?2:k,E=e.error,I=void 0!==E&&E,T=e.helperText,q=void 0===T?"":T,L=e.addonBefore,F=void 0===L?"":L,_=e.addonAfter,R=void 0===_?"":_,B=(e.defaultValue,e.value),A=e.autoFocus,D=void 0!==A&&A,M=e.type,z=void 0===M?"text":M,K=e.onClickIcon,U=e.rightIcon,Z=e.showRightIcon,V=void 0===Z||Z,W=e.limitLength,H=e.fetchSuggestions,J=e.selectPopoverClass,$=e.renderSelectItem,G=e.showSelectName,Y=void 0===G?"value":G,Q=e.onBlur,X=e.onFocus,ee=e.onChange,te=e.onKeydown,ne=e.onKeyUp,ie=e.onEnter,oe=e.onClickAddonBefore,re=e.onClickAddonAfter,ae=e.onSelect,le=v(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),ce=(0,o.useState)("text-field-select-content-"+(0,f.UUID)())[0],se=(0,o.useState)(!0),ue=se[0],de=se[1],fe=(0,o.useState)(""),pe=fe[0],ve=fe[1],he=(0,o.useState)(!1),me=he[0],xe=he[1],be=(0,o.useState)("text"),ge=be[0],ye=be[1],je=(0,o.useState)(!1),we=je[0],Oe=je[1],Se=(0,o.useState)(!1),Ce=Se[0],Ne=Se[1],ke=(0,o.useState)([]),Pe=ke[0],Ee=ke[1],Ie=((0,o.useState)({isCompositions:!0})[0],(0,o.useRef)(null)),Te=(0,o.useRef)(null);(0,o.useEffect)((function(){void 0!==e.defaultValue&&(ve(e.defaultValue),Fe(e.defaultValue))}),[]),(0,o.useEffect)((function(){z!==ge&&ye(z)}),[z]),(0,o.useEffect)((function(){void 0!==B&&(ve(B),Fe(B))}),[B]),(0,o.useEffect)((function(){de(""===pe||void 0===pe)}),[pe]),(0,o.useEffect)((function(){H&&Oe(me)}),[me,H]),(0,o.useEffect)((function(){return we?window.addEventListener("keydown",Ae):window.removeEventListener("keydown",Ae),function(){window.removeEventListener("keydown",Ae)}}),[we]),(0,o.useEffect)((function(){if(!me&&pe){var t=Le(pe);if(t!==pe){var n={};n.target=Ie.current,n.target.value=t,e.onChange&&e.onChange(n)}}}),[pe,me]);var qe,Le=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},Fe=function(e){Ie&&Ie.current&&(Ie.current.value=e,Ie.current.setAttribute("value",e))},_e=function(){j||(de(!1),(Ie&&Ie.current).focus())},Re=function(e){var t=e.selectDom,n=e.keyCode,i=e.currentDom,o="nextSibling",r=".text-field-select-content-item";38===n&&(o="previousSibling",r=".text-field-select-content-item:last-child"),i?(i=i[o])||(i=t.querySelector(r)):i=t.querySelector(".text-field-select-content-item"),i&&(i.classList.add("text-field-select-content-item-keydown"),Be(i,t))},Be=function(e,t){var n=t.clientHeight,i=e.offsetTop+e.clientHeight-n;t.scrollTop=i>0?i:0},Ae=function(e){var t=document.querySelector("."+ce),n=null,i=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&i){var o=i.dataset.val;He(JSON.parse(o))(e),(Ie&&Ie.current).blur()}i&&(n=i,i.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Re({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&Re({selectDom:t,keyCode:e.keyCode,currentDom:n})},De=function(e){xe(!1),""===e.target.value&&de(!0),Q&&Q(e)},Me=function(e){Ne(!0),H&&H(e,(function(e){Ee(e||[]),Ne(!1)}))},ze=function(e){xe(!0),X&&X(e),Me(e.target.value)},Ke=function(t){var n=t.target.value;n&&de(!1),void 0===e.value&&(ve(n),Fe(n)),ee&&ee(t),Me(t.target.value)},Ue=function(e){13===e.keyCode&&ie&&ie(e),te&&te(e)},Ze=function(e){ne&&ne(e)},Ve=function(e){"password"===z&&("text"===ge&&ye("password"),"password"===ge&&ye("text")),K&&K(e)},We=function(){Oe(!1)},He=function(e){return function(t){ae&&ae(e)}},Je=(0,o.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:void 0!==W&&(0,i.jsx)("span",p({className:"length-limit"},{children:(pe?pe.toString().length:0)+"/"+W}),void 0)},void 0)}),[W,pe]),$e=(0,o.useMemo)((function(){var e=U||("password"===z?"password"===ge?(0,i.jsx)(d(),{},void 0):(0,i.jsx)(s(),{},void 0):null);return(0,i.jsx)(i.Fragment,{children:V&&e&&(0,i.jsx)("span",p({className:"right-icon",onClick:Ve},{children:e}),void 0)},void 0)}),[V,U,z,ge]),Ge=(0,o.useMemo)((function(){return(0,i.jsxs)("div",p({className:"text-field-content-within",ref:Te},{children:[(0,i.jsxs)("div",p({className:"text-field-content-within-input"},{children:[O?(0,i.jsx)("textarea",p({ref:Ie,rows:P,onBlur:De,onFocus:ze,onChange:Ke,onKeyDown:Ue,onKeyUp:Ze,disabled:j},le),void 0):(0,i.jsx)("input",p({ref:Ie,type:ge,onBlur:De,onFocus:ze,onChange:Ke,onKeyDown:Ue,onKeyUp:Ze,disabled:j},le),void 0),ue&&!me&&(0,i.jsx)("span",p({className:"text-field-label-placeholder",onClick:_e},{children:"outside"===h?x:(0,i.jsxs)(i.Fragment,{children:[g||x,C&&(0,i.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),N&&(0,i.jsx)("span",{children:N},void 0)]},void 0)}),void 0)]}),void 0),Je,$e]}),void 0)}),[ue,me,D,ge,pe,Je,$e,h,x,g,j,O,P,le,ee,H]),Ye=(0,o.useMemo)((function(){var e;return(0,i.jsxs)("div",p({className:(e="text-field-select-content",Ce&&(e+=" text-field-select-content-loading"),ce&&(e+=" "+ce),e),style:{width:(Te&&Te.current?Te.current.offsetWidth:0)+"px"}},{children:[Pe&&Pe.map((function(e,t){return(0,i.jsx)("div",p({className:"text-field-select-content-item",onMouseDown:He(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,i.jsx)(a.default,{children:e[Y]},void 0)}),t)})),Ce&&(0,i.jsx)(l.default,{},void 0)]}),void 0)}),[Te,we,Pe,$,Y,ae,Ce,ce]),Qe=(0,o.useMemo)((function(){return(0,i.jsx)(r.Tooltip,p({open:we,title:Ye,onClose:We,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",c&&(e+=" paraui-text-field-select-"+c),J&&(e+=" "+J),e)}},{children:Ge}),void 0);var e}),[ue,me,D,ge,pe,Je,$e,h,x,g,j,O,P,le,ee,H,ae,Te,we,J,c]),Xe=(0,o.useMemo)((function(){var e=Boolean(C||N||g);return(0,i.jsx)(i.Fragment,{children:"outside"===h&&e&&(0,i.jsxs)("label",p({className:"text-field-label"},{children:[g,C&&(0,i.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),N&&(0,i.jsx)("span",{children:N},void 0)]}),void 0)},void 0)}),[h,g,N,C]);return(0,i.jsxs)("div",p({className:(qe="paraui-text-field",qe+=" text-field",c&&!O&&(qe+=" text-field-"+c),t&&(qe+=" "+t),I&&(qe+=" text-field-error"),me&&(qe+=" text-field-focus"),j&&(qe+=" text-field-disabled"),O&&(qe+=" text-field-multiline"),e.limitLength&&pe&&pe.toString().length>e.limitLength&&(qe+=" text-field-limit"),qe)},{children:[Xe,(0,i.jsxs)("div",p({className:"text-field-content"},{children:[F&&(0,i.jsx)("div",p({className:"text-field-content-before",onClick:function(e){oe&&oe(e)}},{children:F}),void 0),H?Qe:Ge,R&&(0,i.jsx)("div",p({className:"text-field-content-after",onClick:function(e){re&&re(e)}},{children:R}),void 0)]}),void 0),q&&(0,i.jsx)("p",p({className:"text-field-error-text"},{children:q}),void 0)]}),void 0)}},6885:function(e,t,n){var i=n(7712),o=n(1731),r=n(4927),a=function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};t.default=function(e){var t,n=e.placement,l=void 0===n?"bottom":n,c=a(a({},e.classes),{popper:(0,r.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,i.jsx)(o.Tooltip,a({},e,{classes:c}),void 0)}},1731:function(t){t.exports=e},6088:function(e){e.exports=t},6028:function(e){e.exports=n},2749:function(e){e.exports=i},1102:function(e){e.exports=o},6570:function(e){e.exports=r},8528:function(e){e.exports=a},4115:function(e){e.exports=l},3475:function(e){e.exports=c},9297:function(e){e.exports=s}},d={};function f(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return u[e](n,n.exports,f),n.exports}f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};return function(){f.r(p),f.d(p,{Search:function(){return s}});var e=f(7712),t=f(9297),n=f(3672),i=f(2990),o=f(6088),r=f.n(o),a=f(4115),l=f.n(a),c=function(){return c=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)},s=function(o){var a=o.className,s=void 0===a?"":a,u=o.size,d=void 0===u?"large":u,f=o.btnType,p=void 0===f?"outside":f,v=o.showBtn,h=void 0===v||v,m=o.btnIcon,x=o.btnText,b=void 0===x?"":x,g=o.placeholder,y=void 0===g?"":g,j=(o.defaultValue,o.value),w=o.rightIcon,O=o.showRightIcon,S=void 0===O||O,C=o.onChange,N=o.onBlur,k=o.onFocus,P=o.onKeydown,E=o.onKeyUp,I=o.onClickBtn,T=o.onClickRightIcon,q=o.onEnter,L=(0,t.useState)(""),F=L[0],_=L[1];(0,t.useEffect)((function(){void 0!==o.defaultValue&&_(o.defaultValue)}),[]),(0,t.useEffect)((function(){void 0!==j&&_(j)}),[j]);var R,B=function(){return m||(0,e.jsx)(l(),{},void 0)},A=function(){I&&I(F)};return(0,e.jsxs)("div",c({className:(R="paraui-search",s&&(R+=" "+s),d&&(R+=" search-"+d),p&&(R+=" search-"+p),h&&(R+=" search-showbtn"),b&&(R+=" search-btntext"),R)},{children:[(0,e.jsx)(n.default,{size:d,placeholder:y,value:F,rightIcon:S?w||(0,e.jsx)(r(),{},void 0):"",onClickIcon:function(){T&&T(F)},onChange:function(e){var t=e.target.value;void 0===o.value&&_(t),C&&C(t,e)},onBlur:N,onFocus:k,onKeydown:P,onKeyUp:E,onEnter:q,addonAfter:function(){if(h&&"inside"===p)return(0,e.jsx)(i.default,c({size:d,startIcon:B(),variant:"outlined",onClick:A},{children:b}),void 0)}()},void 0),h&&"outside"===p&&(0,e.jsx)(i.default,c({size:d,startIcon:B(),variant:"contained",onClick:A},{children:b}),void 0)]}),void 0)};p.default=s}(),p}()}));
|
|
16
|
+
n(7418);var i=n(9297),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;o=r("react.element"),t.Fragment=r("react.fragment")}var a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var i,r={},s=null,u=null;for(i in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,i)&&!c.hasOwnProperty(i)&&(r[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===r[i]&&(r[i]=t[i]);return{$$typeof:o,type:e,key:s,ref:u,props:r,_owner:a.current}}t.jsx=s,t.jsxs=s},5893:function(e,t,n){e.exports=n(5251)},7839:function(e,t,n){var i=n(5893),o=n(9297),r=n(7371),a=function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};t.default=function(e){var t=e.children,n=e.placement,l=void 0===n?"bottom-start":n,c=e.tips,s=void 0===c?"":c,u=e.className,d=void 0===u?"":u,f=(0,o.useRef)(),p=(0,o.useState)(""),v=p[0],h=p[1];(0,o.useEffect)((function(){h(s)}),[s]);var m;return(0,i.jsx)("div",a({ref:f,className:(m="paraui-auto-tips",d&&(m+=" "+d),m),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?h(s||f.current.innerText):h("")}},{children:(0,i.jsx)(r.default,a({title:v,placement:l},{children:(0,i.jsx)("div",a({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},8595:function(e,t,n){n.d(t,{default:function(){return b}});var i=n(5893),o=n(9297),r=n(1731),a=n(6010),l=n(1102),c=n.n(l),s=n(2749),u=n.n(s),d=n(7371),f=n(6028),p=n.n(f),v=function(){return v=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)};var h=function(){return h=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)},m=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n},x=function(e){var t=e.variant,n=void 0===t?"contained":t,l=e.size,s=void 0===l?"large":l,f=e.className,p=e.disabled,v=void 0!==p&&p,x=e.children,b=e.startIcon,g=e.endIcon,y=e.loading,j=void 0!==y&&y,w=e.toolTipTitle,O=void 0===w?"":w,S=e.danger,C=void 0!==S&&S,N=m(e,["variant","size","className","disabled","children","startIcon","endIcon","loading","toolTipTitle","danger"]),k=(0,o.useState)(!1),P=k[0],E=k[1],I=function(e){if(!P)return"start"===e&&b?(0,i.jsx)("span",h({className:(0,a.Z)("btn-icon","start-icon")},{children:b}),void 0):"end"===e&&g?(0,i.jsx)("span",h({className:(0,a.Z)("btn-icon","end-icon")},{children:g}),void 0):null;if("object"==typeof j){var t=j.delay||0;setTimeout((function(){return E(!1)}),t)}return"start"===e?(0,i.jsx)("span",h({className:"btn-icon loading-icon"},{children:(0,i.jsx)(c(),{},void 0)}),void 0):null},T=(0,i.jsx)(r.Button,h({},N,{color:"default",variant:"contained",disabled:v,disableRipple:!0,disableElevation:!0,className:(0,a.Z)("paraui-button",f,"paraui-button-".concat(n),"paraui-button-".concat(s),P&&"paraui-button-loading",C&&!v&&"paraui-button-dangerous"),startIcon:I("start"),endIcon:I("end")},{children:x}),void 0);return(0,o.useEffect)((function(){E(!!j)}),[j]),v&&O?(0,i.jsx)(d.default,h({title:function(){if(v&&O){return(0,i.jsxs)("span",{children:[(0,i.jsx)(u(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),O]},void 0)}return O}()},{children:(0,i.jsx)("span",h({className:"paraui-button--disabled"},{children:T}),void 0)}),void 0):T};x.IconButton=function(e){var t=e.variant,n=void 0===t?"contained":t,l=e.size,s=void 0===l?"large":l,f=e.toolTipTitle,p=void 0===f?"":f,v=e.children,x=e.className,b=e.disabled,g=void 0!==b&&b,y=e.loading,j=void 0!==y&&y,w=e.TooltipProps,O=e.danger,S=void 0!==O&&O,C=m(e,["variant","size","toolTipTitle","children","className","disabled","loading","TooltipProps","danger"]),N=(0,o.useState)(!1),k=N[0],P=N[1],E=(0,i.jsx)(r.IconButton,h({},C,{disabled:g,disableRipple:!0,className:(0,a.Z)("paraui-icon-button",x,"paraui-icon-button-".concat(n),"paraui-icon-button-".concat(s),k&&"paraui-icon-button-loading",S&&!g&&"paraui-icon-button-dangerous")},{children:function(){if(!k)return v;if("object"==typeof j){var e=j.delay||0;setTimeout((function(){return P(!1)}),e)}return(0,i.jsx)("span",h({className:"loading-icon"},{children:(0,i.jsx)(c(),{},void 0)}),void 0)}()}),void 0);return(0,o.useEffect)((function(){P(!!j)}),[j]),p?(0,i.jsx)(d.default,h({},w,{title:function(){if(g&&p){return(0,i.jsxs)("span",{children:[(0,i.jsx)(u(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),p]},void 0)}return p}()},{children:g?(0,i.jsx)("span",h({className:"paraui-button--disabled"},{children:E}),void 0):E}),void 0):E},x.SplitButton=function(e){var t=e.buttonText,n=e.options,l=void 0===n?[]:n,c=e.className,s=e.disabled,u=void 0!==s&&s,d=e.onClick,f=e.optionRender,h=(0,o.useState)(!1),m=h[0],x=h[1],g=(0,o.useRef)(null),y=(0,o.useRef)(),j=(0,o.useState)(0),w=j[0],O=j[1],S=function(e,t,n){var i;O(t),x(!1),null===(i=y.current)||void 0===i||i.classList.remove("paraui-button-split--active"),null==d||d(e,n)},C=function(e){var t,n;(null===(t=g.current)||void 0===t?void 0:t.contains(e.target))||(x(!1),null===(n=y.current)||void 0===n||n.classList.remove("paraui-button-split--active"))},N=function(){return(0,i.jsx)("div",v({className:"paraui-button-split-list"},{children:(0,i.jsx)("ul",{children:l.map((function(e,t){return Array.isArray(e)?function(e,t){return(0,i.jsx)("li",v({className:"split-li-group"},{children:e.map((function(e,n){var o="".concat(t,"-").concat(n);return(0,i.jsx)("div",v({className:(0,a.Z)("split-li",o===w&&"split-li--active"),onClick:function(t){return S(e,o,t)}},{children:(null==f?void 0:f(e))||e.label}),o)}))}),t)}(e,t):(0,i.jsx)("li",v({className:(0,a.Z)("split-li",t===w&&"split-li--active"),onClick:function(n){return S(e,t,n)}},{children:(null==f?void 0:f(e))||e.label}),t)}))},void 0)}),void 0)};return(0,i.jsxs)("div",v({className:(0,a.Z)("paraui-button-split",c),ref:g,onMouseLeave:function(e){var t;e.stopPropagation(),null===(t=e.currentTarget.firstElementChild)||void 0===t||t.classList.remove("paraui-button-split--active"),x(!1)}},{children:[(0,i.jsx)(b,v({variant:"outlined",onMouseEnter:function(e){e.stopPropagation();var t=e.currentTarget;y.current=t,t.classList.add("paraui-button-split--active"),x(!0)},startIcon:(0,i.jsx)(p(),{},void 0),disabled:u},{children:null!=t?t:"更多操作"}),void 0),(0,i.jsx)(r.Popper,v({open:m,anchorEl:g.current,transition:!0,placement:"bottom-end"},{children:function(e){var t=e.TransitionProps;e.placement;return(0,i.jsx)(r.Grow,v({},t,{children:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(r.ClickAwayListener,v({onClickAway:C},{children:N()}),void 0)},void 0)}),void 0)}}),void 0)]}),void 0)};var b=x},7502:function(e,t,n){var i=n(5893),o=n(9297),r=n(1102),a=n.n(r),l=function(){return l=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};t.default=function(e){var t=e.className,n=e.style,r=e.opacity,c=void 0===r?.7:r,s=(0,o.useRef)(null);(0,o.useEffect)((function(){s&&s.current&&s.current.parentNode&&((getComputedStyle(s.current.parentNode)||{}).position||(s.current.parentNode.style.position="relative"))}),[]);var u;return(0,i.jsxs)("div",l({className:(u="paraui-loading",t&&(u+=" "+t),u),style:n,ref:s},{children:[(0,i.jsx)("div",l({className:"paraui-loading-box"},{children:(0,i.jsx)(a(),{},void 0)}),void 0),(0,i.jsx)("div",{className:"paraui-loading-mask",style:{opacity:c}},void 0)]}),void 0)}},7320:function(e,t,n){var i=n(5893),o=n(9297),r=n(1731),a=n(7839),l=n(7502),c=n(8528),s=n.n(c),u=n(6570),d=n.n(u),f=n(3475),p=function(){return p=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n};t.default=function(e){var t=e.className,n=e.size,c=void 0===n?"large":n,u=e.labelMode,h=void 0===u?"outside":u,m=e.placeholder,x=void 0===m?"":m,b=e.label,g=void 0===b?"":b,y=e.disabled,j=void 0!==y&&y,w=e.multiline,O=void 0!==w&&w,S=e.required,C=void 0!==S&&S,N=e.labelSign,k=e.rows,P=void 0===k?2:k,E=e.error,I=void 0!==E&&E,T=e.helperText,q=void 0===T?"":T,L=e.addonBefore,F=void 0===L?"":L,_=e.addonAfter,R=void 0===_?"":_,B=(e.defaultValue,e.value),A=e.autoFocus,D=void 0!==A&&A,M=e.type,z=void 0===M?"text":M,K=e.onClickIcon,U=e.rightIcon,Z=e.showRightIcon,V=void 0===Z||Z,W=e.limitLength,H=e.fetchSuggestions,J=e.selectPopoverClass,$=e.renderSelectItem,G=e.showSelectName,Y=void 0===G?"value":G,Q=e.onBlur,X=e.onFocus,ee=e.onChange,te=e.onKeydown,ne=e.onKeyUp,ie=e.onEnter,oe=e.onClickAddonBefore,re=e.onClickAddonAfter,ae=e.onSelect,le=v(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),ce=(0,o.useState)("text-field-select-content-"+(0,f.UUID)())[0],se=(0,o.useState)(!0),ue=se[0],de=se[1],fe=(0,o.useState)(""),pe=fe[0],ve=fe[1],he=(0,o.useState)(!1),me=he[0],xe=he[1],be=(0,o.useState)("text"),ge=be[0],ye=be[1],je=(0,o.useState)(!1),we=je[0],Oe=je[1],Se=(0,o.useState)(!1),Ce=Se[0],Ne=Se[1],ke=(0,o.useState)([]),Pe=ke[0],Ee=ke[1],Ie=((0,o.useState)({isCompositions:!0})[0],(0,o.useRef)(null)),Te=(0,o.useRef)(null);(0,o.useEffect)((function(){void 0!==e.defaultValue&&(ve(e.defaultValue),Fe(e.defaultValue))}),[]),(0,o.useEffect)((function(){z!==ge&&ye(z)}),[z]),(0,o.useEffect)((function(){void 0!==B&&(ve(B),Fe(B))}),[B]),(0,o.useEffect)((function(){de(""===pe||void 0===pe)}),[pe]),(0,o.useEffect)((function(){H&&Oe(me)}),[me,H]),(0,o.useEffect)((function(){return we?window.addEventListener("keydown",Ae):window.removeEventListener("keydown",Ae),function(){window.removeEventListener("keydown",Ae)}}),[we]),(0,o.useEffect)((function(){if(!me&&pe){var t=Le(pe);if(t!==pe){var n={};n.target=Ie.current,n.target.value=t,e.onChange&&e.onChange(n)}}}),[pe,me]);var qe,Le=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},Fe=function(e){Ie&&Ie.current&&(Ie.current.value=e,Ie.current.setAttribute("value",e))},_e=function(){j||(de(!1),(Ie&&Ie.current).focus())},Re=function(e){var t=e.selectDom,n=e.keyCode,i=e.currentDom,o="nextSibling",r=".text-field-select-content-item";38===n&&(o="previousSibling",r=".text-field-select-content-item:last-child"),i?(i=i[o])||(i=t.querySelector(r)):i=t.querySelector(".text-field-select-content-item"),i&&(i.classList.add("text-field-select-content-item-keydown"),Be(i,t))},Be=function(e,t){var n=t.clientHeight,i=e.offsetTop+e.clientHeight-n;t.scrollTop=i>0?i:0},Ae=function(e){var t=document.querySelector("."+ce),n=null,i=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&i){var o=i.dataset.val;He(JSON.parse(o))(e),(Ie&&Ie.current).blur()}i&&(n=i,i.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Re({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&Re({selectDom:t,keyCode:e.keyCode,currentDom:n})},De=function(e){xe(!1),""===e.target.value&&de(!0),Q&&Q(e)},Me=function(e){Ne(!0),H&&H(e,(function(e){Ee(e||[]),Ne(!1)}))},ze=function(e){xe(!0),X&&X(e),Me(e.target.value)},Ke=function(t){var n=t.target.value;n&&de(!1),void 0===e.value&&(ve(n),Fe(n)),ee&&ee(t),Me(t.target.value)},Ue=function(e){13===e.keyCode&&ie&&ie(e),te&&te(e)},Ze=function(e){ne&&ne(e)},Ve=function(e){"password"===z&&("text"===ge&&ye("password"),"password"===ge&&ye("text")),K&&K(e)},We=function(){Oe(!1)},He=function(e){return function(t){ae&&ae(e)}},Je=(0,o.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:void 0!==W&&(0,i.jsx)("span",p({className:"length-limit"},{children:(pe?pe.toString().length:0)+"/"+W}),void 0)},void 0)}),[W,pe]),$e=(0,o.useMemo)((function(){var e=U||("password"===z?"password"===ge?(0,i.jsx)(d(),{},void 0):(0,i.jsx)(s(),{},void 0):null);return(0,i.jsx)(i.Fragment,{children:V&&e&&(0,i.jsx)("span",p({className:"right-icon",onClick:Ve},{children:e}),void 0)},void 0)}),[V,U,z,ge]),Ge=(0,o.useMemo)((function(){return(0,i.jsxs)("div",p({className:"text-field-content-within",ref:Te},{children:[(0,i.jsxs)("div",p({className:"text-field-content-within-input"},{children:[O?(0,i.jsx)("textarea",p({ref:Ie,rows:P,onBlur:De,onFocus:ze,onChange:Ke,onKeyDown:Ue,onKeyUp:Ze,disabled:j},le),void 0):(0,i.jsx)("input",p({ref:Ie,type:ge,onBlur:De,onFocus:ze,onChange:Ke,onKeyDown:Ue,onKeyUp:Ze,disabled:j},le),void 0),ue&&!me&&(0,i.jsx)("span",p({className:"text-field-label-placeholder",onClick:_e},{children:"outside"===h?x:(0,i.jsxs)(i.Fragment,{children:[g||x,C&&(0,i.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),N&&(0,i.jsx)("span",{children:N},void 0)]},void 0)}),void 0)]}),void 0),Je,$e]}),void 0)}),[ue,me,D,ge,pe,Je,$e,h,x,g,j,O,P,le,ee,H]),Ye=(0,o.useMemo)((function(){var e;return(0,i.jsxs)("div",p({className:(e="text-field-select-content",Ce&&(e+=" text-field-select-content-loading"),ce&&(e+=" "+ce),e),style:{width:(Te&&Te.current?Te.current.offsetWidth:0)+"px"}},{children:[Pe&&Pe.map((function(e,t){return(0,i.jsx)("div",p({className:"text-field-select-content-item",onMouseDown:He(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,i.jsx)(a.default,{children:e[Y]},void 0)}),t)})),Ce&&(0,i.jsx)(l.default,{},void 0)]}),void 0)}),[Te,we,Pe,$,Y,ae,Ce,ce]),Qe=(0,o.useMemo)((function(){return(0,i.jsx)(r.Tooltip,p({open:we,title:Ye,onClose:We,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",c&&(e+=" paraui-text-field-select-"+c),J&&(e+=" "+J),e)}},{children:Ge}),void 0);var e}),[ue,me,D,ge,pe,Je,$e,h,x,g,j,O,P,le,ee,H,ae,Te,we,J,c]),Xe=(0,o.useMemo)((function(){var e=Boolean(C||N||g);return(0,i.jsx)(i.Fragment,{children:"outside"===h&&e&&(0,i.jsxs)("label",p({className:"text-field-label"},{children:[g,C&&(0,i.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),N&&(0,i.jsx)("span",{children:N},void 0)]}),void 0)},void 0)}),[h,g,N,C]);return(0,i.jsxs)("div",p({className:(qe="paraui-text-field",qe+=" text-field",c&&!O&&(qe+=" text-field-"+c),t&&(qe+=" "+t),I&&(qe+=" text-field-error"),me&&(qe+=" text-field-focus"),j&&(qe+=" text-field-disabled"),O&&(qe+=" text-field-multiline"),e.limitLength&&pe&&pe.toString().length>e.limitLength&&(qe+=" text-field-limit"),qe)},{children:[Xe,(0,i.jsxs)("div",p({className:"text-field-content"},{children:[F&&(0,i.jsx)("div",p({className:"text-field-content-before",onClick:function(e){oe&&oe(e)}},{children:F}),void 0),H?Qe:Ge,R&&(0,i.jsx)("div",p({className:"text-field-content-after",onClick:function(e){re&&re(e)}},{children:R}),void 0)]}),void 0),q&&(0,i.jsx)("p",p({className:"text-field-error-text"},{children:q}),void 0)]}),void 0)}},7371:function(e,t,n){var i=n(5893),o=n(1731),r=n(6010),a=function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};t.default=function(e){var t,n=e.placement,l=void 0===n?"bottom":n,c=a(a({},e.classes),{popper:(0,r.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,i.jsx)(o.Tooltip,a({},e,{classes:c}),void 0)}},1731:function(t){t.exports=e},6088:function(e){e.exports=t},6028:function(e){e.exports=n},2749:function(e){e.exports=i},1102:function(e){e.exports=o},6570:function(e){e.exports=r},8528:function(e){e.exports=a},4115:function(e){e.exports=l},3475:function(e){e.exports=c},9297:function(e){e.exports=s}},d={};function f(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return u[e](n,n.exports,f),n.exports}f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};return function(){f.r(p),f.d(p,{Search:function(){return s}});var e=f(5893),t=f(9297),n=f(7320),i=f(8595),o=f(6088),r=f.n(o),a=f(4115),l=f.n(a),c=function(){return c=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)},s=function(o){var a=o.className,s=void 0===a?"":a,u=o.size,d=void 0===u?"large":u,f=o.btnType,p=void 0===f?"outside":f,v=o.showBtn,h=void 0===v||v,m=o.btnIcon,x=o.btnText,b=void 0===x?"":x,g=o.placeholder,y=void 0===g?"":g,j=(o.defaultValue,o.value),w=o.rightIcon,O=o.showRightIcon,S=void 0===O||O,C=o.onChange,N=o.onBlur,k=o.onFocus,P=o.onKeydown,E=o.onKeyUp,I=o.onClickBtn,T=o.onClickRightIcon,q=o.onEnter,L=(0,t.useState)(""),F=L[0],_=L[1];(0,t.useEffect)((function(){void 0!==o.defaultValue&&_(o.defaultValue)}),[]),(0,t.useEffect)((function(){void 0!==j&&_(j)}),[j]);var R,B=function(){return m||(0,e.jsx)(l(),{},void 0)},A=function(){I&&I(F)};return(0,e.jsxs)("div",c({className:(R="paraui-search",s&&(R+=" "+s),d&&(R+=" search-"+d),p&&(R+=" search-"+p),h&&(R+=" search-showbtn"),b&&(R+=" search-btntext"),R)},{children:[(0,e.jsx)(n.default,{size:d,placeholder:y,value:F,rightIcon:S?w||(0,e.jsx)(r(),{},void 0):"",onClickIcon:function(){T&&T(F)},onChange:function(e){var t=e.target.value;void 0===o.value&&_(t),C&&C(t,e)},onBlur:N,onFocus:k,onKeydown:P,onKeyUp:E,onEnter:q,addonAfter:function(){if(h&&"inside"===p)return(0,e.jsx)(i.default,c({size:d,startIcon:B(),variant:"outlined",onClick:A},{children:b}),void 0)}()},void 0),h&&"outside"===p&&(0,e.jsx)(i.default,c({size:d,startIcon:B(),variant:"contained",onClick:A},{children:b}),void 0)]}),void 0)};p.default=s}(),p}()}));
|
package/Select/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close"),require("@para-ui/icons/Down"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Check","@para-ui/icons/Close","@para-ui/icons/Down","@para-ui/icons/Search","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close"),require("@para-ui/icons/Down"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Check"],e["@para-ui/icons/Close"],e["@para-ui/icons/Down"],e["@para-ui/icons/Search"],e["para-lib"],e.react)}(self,(function(e,t,o,r,n,i,s){return function(){"use strict";var l={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close"),require("@para-ui/icons/Down"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Check","@para-ui/icons/Close","@para-ui/icons/Down","@para-ui/icons/Search","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close"),require("@para-ui/icons/Down"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Check"],e["@para-ui/icons/Close"],e["@para-ui/icons/Down"],e["@para-ui/icons/Search"],e["para-lib"],e.react)}(self,(function(e,t,o,r,n,i,s){return function(){"use strict";var l={6010:function(e,t,o){function r(e){var t,o,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(o=r(e[t]))&&(n&&(n+=" "),n+=o);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function n(){for(var e,t,o=0,n="";o<arguments.length;)(e=arguments[o++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}o.d(t,{Z:function(){return n}})},7418:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var s,l,c=n(e),a=1;a<arguments.length;a++){for(var u in s=Object(arguments[a]))o.call(s,u)&&(c[u]=s[u]);if(t){l=t(s);for(var d=0;d<l.length;d++)r.call(s,l[d])&&(c[l[d]]=s[l[d]])}}return c}},
|
|
7
|
+
var t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var s,l,c=n(e),a=1;a<arguments.length;a++){for(var u in s=Object(arguments[a]))o.call(s,u)&&(c[u]=s[u]);if(t){l=t(s);for(var d=0;d<l.length;d++)r.call(s,l[d])&&(c[l[d]]=s[l[d]])}}return c}},5251:function(e,t,o){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
o(4126);var r=o(9297),n=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;n=i("react.element"),t.Fragment=i("react.fragment")}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,o){var r,i={},a=null,u=null;for(r in void 0!==o&&(a=""+o),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:n,type:e,key:a,ref:u,props:i,_owner:s.current}}t.jsx=a,t.jsxs=a},7712:function(e,t,o){e.exports=o(9524)},3094:function(e,t,o){var r=o(7712),n=o(9297),i=o(6885),s=function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};t.default=function(e){var t=e.children,o=e.placement,l=void 0===o?"bottom-start":o,c=e.tips,a=void 0===c?"":c,u=e.className,d=void 0===u?"":u,p=(0,n.useRef)(),v=(0,n.useState)(""),f=v[0],m=v[1];(0,n.useEffect)((function(){m(a)}),[a]);var h;return(0,r.jsx)("div",s({ref:p,className:(h="paraui-auto-tips",d&&(h+=" "+d),h),onMouseOver:function(e){p.current&&p.current.scrollWidth>p.current.offsetWidth?m(a||p.current.innerText):m("")}},{children:(0,r.jsx)(i.default,s({title:f,placement:l},{children:(0,r.jsx)("div",s({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},6885:function(e,t,o){var r=o(7712),n=o(1731),i=o(4927),s=function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};t.default=function(e){var t,o=e.placement,l=void 0===o?"bottom":o,c=s(s({},e.classes),{popper:(0,i.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,r.jsx)(n.Tooltip,s({},e,{classes:c}),void 0)}},1731:function(t){t.exports=e},6110:function(e){e.exports=t},19:function(e){e.exports=o},6028:function(e){e.exports=r},4115:function(e){e.exports=n},3475:function(e){e.exports=i},9297:function(e){e.exports=s}},c={};function a(e){var t=c[e];if(void 0!==t)return t.exports;var o=c[e]={exports:{}};return l[e](o,o.exports,a),o.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return function(){a.r(u),a.d(u,{Select:function(){return y}});var e=a(7712),t=a(9297),o=a(1731),r=a(6028),n=a.n(r),i=a(4115),s=a.n(i),l=a(6110),c=a.n(l),d=a(19),p=a.n(d),v=a(3094),f=a(3475),m=function(){return m=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},m.apply(this,arguments)},h=function(e,t,o){if(o||2===arguments.length)for(var r,n=0,i=t.length;n<i;n++)!r&&n in t||(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return e.concat(r||Array.prototype.slice.call(t))},y=function(r){var i=r.className,l=r.size,a=void 0===l?"large":l,u=r.labelMode,d=void 0===u?"outside":u,y=r.placeholder,x=void 0===y?"":y,g=r.searchPlaceholder,j=void 0===g?"请输入搜索名":g,b=r.label,w=void 0===b?"":b,S=r.disabled,N=void 0!==S&&S,O=r.multiple,k=void 0!==O&&O,C=r.required,E=void 0!==C&&C,q=r.labelSign,T=r.error,L=void 0!==T&&T,P=r.helperText,M=void 0===P?"":P,_=r.list,D=r.showName,F=void 0===D?"label":D,I=r.showValue,z=void 0===I?"value":I,R=r.childrenName,U=void 0===R?"children":R,H=r.value,A=r.onChange,V=r.overLine,W=void 0!==V&&V,B=r.search,K=void 0!==B&&B,Z=r.searchModel,$=void 0===Z?"inside":Z,Y=r.selectPopoverClassName,G=r.morePopoverClassName,J=r.onEnter,Q=(0,t.useRef)(null),X=(0,t.useState)("select-"+(0,f.UUID)())[0],ee=(0,t.useState)("select-popover-"+(0,f.UUID)())[0],te=(0,t.useState)(!1),oe=te[0],re=te[1],ne=(0,t.useState)(!1),ie=ne[0],se=ne[1],le=(0,t.useState)([]),ce=le[0],ae=le[1],ue=(0,t.useState)([]),de=ue[0],pe=ue[1],ve=(0,t.useState)({}),fe=ve[0],me=ve[1],he=(0,t.useState)(null),ye=he[0],xe=he[1],ge=(0,t.useState)({})[0],je=(0,t.useState)(!1),be=je[0],we=je[1],Se=(0,t.useState)(""),Ne=Se[0],Oe=Se[1],ke=(0,t.useState)(!1),Ce=ke[0],Ee=ke[1],qe=(0,t.useRef)(null);(0,t.useEffect)((function(){void 0!==r.defaultValue&&(r.multiple?ae((0,f.DeepClone)(r.defaultValue||[])):ae(""===r.defaultValue?[]:[r.defaultValue]))}),[]),(0,t.useEffect)((function(){void 0!==H&&ae(k?(0,f.DeepClone)(H||[]):""===H?[]:[H])}),[H,k]),(0,t.useEffect)((function(){if(K&&"outside"===$)return Ee(!!k);Ee(W)}),[W,K,$,k]),(0,t.useEffect)((function(){for(var e={},t=0,o=_.length;t<o;t++){var r=_[t];if(r[U]&&r[U].length>0)for(var n=r[U],i=0,s=n.length;i<s;i++){var l=n[i];e[l[z]]=l}else e[r[z]]=r}me(e)}),[_]),(0,t.useEffect)((function(){k&&(Ce||xe(ce.length))}),[Ce,k,ce]),(0,t.useEffect)((function(){return Ce?xe(ce.length):(setTimeout((function(){De(ce.length)})),window.addEventListener("resize",Fe)),function(){window.removeEventListener("resize",Fe)}}),[ce,Ce]),(0,t.useEffect)((function(){ce&&ce.length>0?se(!0):(se(!1),K&&"outside"===$&&se(""!==Ne))}),[K,Ne,$,ce]),(0,t.useEffect)((function(){clearTimeout(ge.searchTimer),K&&""!==Ne.trim()?ge.searchTimer=setTimeout((function(){for(var e=[],t=(0,f.DeepClone)(_),o=0,r=t.length;o<r;o++){var n=t[o];if(n[U]&&n[U].length>0){for(var i=n[U],s=[],l=0,c=i.length;l<c;l++){var a=i[l];_e(a)&&s.push(a)}s.length>0&&(n[U]=s,e.push(n))}else{_e(n)&&e.push(n)}}pe(e)}),100):pe((0,f.DeepClone)(_))}),[K,Ne,_]),(0,t.useEffect)((function(){return oe?setTimeout((function(){Le(),window.addEventListener("click",Me),window.addEventListener("keydown",Ze)})):(Oe(""),window.removeEventListener("click",Me),window.removeEventListener("keydown",Ze)),function(){window.removeEventListener("click",Me),window.removeEventListener("keydown",Ze)}}),[oe]),(0,t.useEffect)((function(){Ne&&re(!0)}),[Ne]),(0,t.useEffect)((function(){k&&"outside"===$&&!0!==N&&We(Ne)}),[Ne,k,N,$]);var Te,Le=function(){var e=qe&&qe.current;e&&e.focus()},Pe=function(e,t){for(var o=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!o.call(e,t);)e=e.parentElement;return e},Me=function(e){Pe(e.target,"."+ee)||re(!1)},_e=function(e){var t=!0,o=e[F];return o&&"string"==typeof o&&-1===o.indexOf(Ne)&&(t=!1),t},De=function(e){if(null!==e&&0!==e){void 0===e&&(e=ce.length);var t=document.querySelector("."+X+" > .select-content > .check-select-content");if(t)if(t.scrollHeight>t.clientHeight){var o=Number(e)-1;xe(o),De(o)}else ce.length<=e&&Ue()}},Fe=function(){clearTimeout(ge.timer),ge.timer=setTimeout((function(){xe(ce.length),De()}),100)},Ie=function(){!0!==N&&re(!0)},ze=function(){re(!1)},Re=function(e){we(!0),re(!1),e.stopPropagation()},Ue=function(){we(!1)},He=function(e,t){return function(o){var n=e[z];if("object"!=typeof N||-1===N.indexOf(n))if(k){var i=ce.indexOf(n);-1!==i?ce.splice(i,1):ce.push(n),void 0===r.value&&ae(h([],ce,!0)),A&&A(h([],ce,!0),o),t&&J&&J(h([],ce,!0)),Le()}else void 0===r.value&&ae([n]),A&&A(n,o),t&&J&&J(n),ze(),Oe("")}},Ae=function(e,t){return function(o){var r;e||((r={})[z]=t,e=r),He(e)(o),o.stopPropagation()}},Ve=function(e){Oe(e.target.value)},We=function(e){var t=qe&&qe.current;if(!t)return null;var o=window.getComputedStyle(t),r=o.fontFamily,n=function(e,t,o){var r=document.createElement("span");r.id="referenceSpan";var n={};n.width=r.offsetWidth,n.height=r.offsetHeight,r.style.visibility="hidden",r.style.fontSize=e,r.style.fontFamily=t,r.style.display="inline-block";var i=document.getElementById("referenceSpan");return i&&document.body.removeChild(i),document.body.appendChild(r),void 0!==r.textContent?r.textContent=o:r.innerText=o,n.width=parseFloat(window.getComputedStyle(r).width)-n.width,n.height=parseFloat(window.getComputedStyle(r).height)-n.height,document.body.removeChild(r),n}(o.fontSize,r,e),i=n.width;i<10&&(i=10),t.style.width=i+"px"},Be=function(e){var t=e.selectDom,o=e.keyCode,r=e.currentKeydownDom,n=null,i="nextSibling",s=".select-popover-list > div",l=".select-popover-list-item";if(38===o&&(i="previousSibling",s=".select-popover-list > div:last-child",l=".select-popover-list-item:last-child"),r)if(n=r[i])-1!==n.className.indexOf("select-popover-list-group-label")&&((n=(n=r.parentNode)[i])||(n=t.querySelector(s)));else{var c=r.parentNode;c&&c.className&&-1!==c.className.indexOf("select-popover-list-group")&&(n=(n=r.parentNode)[i])||(n=t.querySelector(s))}else n=t.querySelector(s);if(n)if(-1!==n.className.indexOf("select-popover-list-group")){var a=n.querySelector(l);a&&(a.classList.add("select-popover-list-item-keydown"),Ke(a,t))}else n.classList.add("select-popover-list-item-keydown"),Ke(n,t)},Ke=function(e,t){clearTimeout(ge.scrollTimer);var o=t.clientHeight,r=e.offsetTop+e.clientHeight-o;ge.scroll=!0,t.scrollTop=r>0?r:0,ge.scrollTimer=setTimeout((function(){ge.scroll=!1}),100)},Ze=function(e){var t=document.querySelector("."+ee+" .select-popover-list");if(t){var o=t.querySelector(".select-popover-list-item-select"),r=t.querySelector(".select-popover-list-item-hover"),n=t.querySelector(".select-popover-list-item-keydown"),i=o;if(r&&(i=r),13===e.keyCode){var s=n||r;if(s){var l=s.dataset.val;He(fe[l],!0)({target:n})}else J&&J(H)}n&&(i=n,n.classList.remove("select-popover-list-item-keydown")),40===e.keyCode&&Be({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i}),38===e.keyCode&&Be({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i})}},$e=function(e){if(!ge.scroll){var t=Pe(e.target,".select-popover-list-item");if(t){t.classList.add("select-popover-list-item-hover");var o=document.querySelector("."+ee).querySelector(".select-popover-list-item-keydown");o&&o.classList.remove("select-popover-list-item-keydown")}}},Ye=function(e){var t=Pe(e.target,".select-popover-list-item");t&&t.classList.remove("select-popover-list-item-hover")},Ge=(0,t.useMemo)((function(){var t=Boolean(w||E||q);return(0,e.jsx)(e.Fragment,{children:"outside"===d&&t&&(0,e.jsxs)("label",m({className:"select-label"},{children:[w,E&&(0,e.jsx)("span",m({className:"select-required"},{children:"*"}),void 0),q&&(0,e.jsx)("span",{children:q},void 0)]}),void 0)},void 0)}),[d,w,q,E]),Je=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:!ie&&(0,e.jsx)("span",m({className:"select-label-placeholder"},{children:"outside"===d?x:(0,e.jsxs)(e.Fragment,{children:[w||x,E&&(0,e.jsx)("span",m({className:"select-required"},{children:"*"}),void 0),q&&(0,e.jsx)("span",{children:q},void 0)]},void 0)}),void 0)},void 0)}),[ie,d,x,w,q,E]),Qe=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:!k&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",m({className:"radio-select-content"},{children:function(){if(""!==Ne&&"outside"===$)return null;var t=fe[ce[0]]&&fe[ce[0]][F]||ce[0];return Ce?t:(0,e.jsx)(v.default,{children:t},void 0)}()}),void 0),K&&"outside"===$&&!0!==N&&(0,e.jsx)("input",{className:"radio-search-outside",value:Ne,onChange:Ve,ref:qe},void 0)]},void 0)},void 0)}),[k,ie,Ce,fe,ce,F,K,$,Ne,N]),Xe=(0,t.useMemo)((function(){var t=function(e){return fe[ce[e]]&&fe[ce[e]][F]||ce[e]};return(0,e.jsx)(e.Fragment,{children:k&&(0,e.jsxs)("div",m({className:"check-select-content"},{children:[ce&&ce.map((function(o,r){if(null!==ye&&ye<=r)return null;var n=!0;return(!0===N||"object"==typeof N&&-1!==N.indexOf(ce[r]))&&(n=!1),(0,e.jsxs)("div",m({className:n?"check-select-content-item":"check-select-content-item check-select-content-item-noclose"},{children:[(0,e.jsx)("span",{children:t(r)},void 0),n&&(0,e.jsx)(p(),{onClick:Ae(fe[ce[r]],ce[r])},void 0)]}),r)})),function(){if(null!==ye&&ce.length>ye)return(0,e.jsx)("div",m({className:"check-select-content-item check-select-content-item-more",onClick:Re},{children:(0,e.jsxs)("span",{children:["+",ce.length-ye]},void 0)}),void 0)}(),K&&"outside"===$&&!0!==N&&(0,e.jsx)("input",{className:"check-search-outside",value:Ne,onChange:Ve,ref:qe},void 0)]}),void 0)},void 0)}),[k,ie,ce,ye,fe,N,A,Ne,K,$]),et=(0,t.useMemo)((function(){return(0,e.jsxs)("div",m({className:"select-content",onClick:Ie,ref:Q},{children:[Je,(0,e.jsx)("span",m({className:"select-svg"},{children:(0,e.jsx)(n(),{},void 0)}),void 0),Qe,Xe]}),void 0)}),[Q,ie,d,x,w,q,E,Ce,fe,ce,F,k,ye,N,A,Ne,$]),tt=(0,t.useMemo)((function(){return(0,e.jsx)("div",m({className:"select-popover-list"},{children:de&&de.length>0?(0,e.jsx)(e.Fragment,{children:de.map((function(t,o){if(t[U]&&t[U].length>0){var r=t[U];return(0,e.jsxs)("div",m({className:"select-popover-list-group"},{children:[(0,e.jsx)("span",m({className:"select-popover-list-group-label"},{children:t[F]||t[z]}),void 0),r.map((function(t,o){var r=t[z],n="select-popover-list-item";return-1!==ce.indexOf(r)&&(n+=" select-popover-list-item-select"),"object"==typeof N&&-1!==N.indexOf(r)&&(n+=" select-popover-list-item-disabled"),(0,e.jsxs)("div",m({onClick:He(t),className:n,onMouseEnter:$e,onMouseLeave:Ye,"data-val":r},{children:[(0,e.jsx)("span",m({className:"select-popover-list-item-label"},{children:(0,e.jsx)(v.default,{children:t[F]||t[z]},void 0)}),void 0),k&&(0,e.jsx)("span",m({className:"select-popover-list-item-svg"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),o)}))]}),o)}var n=t[z],i="select-popover-list-item";return-1!==ce.indexOf(n)&&(i+=" select-popover-list-item-select"),"object"==typeof N&&-1!==N.indexOf(n)&&(i+=" select-popover-list-item-disabled"),(0,e.jsxs)("div",m({onClick:He(t),className:i,onMouseEnter:$e,onMouseLeave:Ye,"data-val":n},{children:[(0,e.jsx)("span",m({className:"select-popover-list-item-label"},{children:(0,e.jsx)(v.default,{children:t[F]||t[z]},void 0)}),void 0),k&&(0,e.jsx)("span",m({className:"select-popover-list-item-svg"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),o)}))},void 0):(0,e.jsx)("div",m({className:"select-nodata"},{children:"暂无选项"}),void 0)}),void 0)}),[de,F,z,ce,A,k]),ot=(0,t.useMemo)((function(){return(0,e.jsxs)("div",m({style:{width:(Q&&Q.current?Q.current.offsetWidth:0)+"px"},className:"select-popover-content "+ee},{children:[K&&"inside"===$&&(0,e.jsxs)("div",m({className:"select-popover-search"},{children:[(0,e.jsx)("input",{placeholder:j,value:Ne,onChange:Ve,ref:qe},void 0),(0,e.jsx)(s(),{},void 0)]}),void 0),tt]}),void 0)}),[oe,Q,de,U,z,F,ce,Ne,K,ee,$,k,j]),rt=(0,t.useMemo)((function(){var t,r=function(e){return fe[ce[e]]&&fe[ce[e]][F]||ce[e]};return(0,e.jsx)(o.Popover,m({open:be,anchorEl:Q&&Q.current,onClose:Ue,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},className:(t="paraui-select-more-popover",a&&(t+=" paraui-select-more-popover-"+a),G&&(t+=" "+G),t)},{children:(0,e.jsxs)("div",m({className:"select-more"},{children:[(0,e.jsxs)("div",m({className:"select-more-title"},{children:[(0,e.jsx)("span",{children:"已选中"},void 0),(0,e.jsxs)("span",{children:["(",ce.length-Number(ye),")"]},void 0)]}),void 0),(0,e.jsx)("div",m({className:"select-more-content"},{children:ce&&ce.map((function(t,o){if(null!==ye&&ye>o)return null;var n=!0;return(!0===N||"object"==typeof N&&-1!==N.indexOf(ce[o]))&&(n=!1),(0,e.jsxs)("div",m({className:"select-more-content-item"},{children:[(0,e.jsx)("span",{children:(0,e.jsx)(v.default,{children:r(o)},void 0)},void 0),n&&(0,e.jsx)(p(),{onClick:Ae(fe[ce[o]],ce[o])},void 0)]}),o)}))}),void 0)]}),void 0)}),void 0)}),[be,ce,ye,fe,N,F,G,a]);return(0,e.jsxs)("div",m({className:(Te="paraui-select select",k&&!Ce&&(Te+=" "+X),i&&(Te+=" "+i),a&&(Te+=" select-"+a),L&&(Te+=" select-error"),!0===N&&(Te+=" select-disabled"),oe&&(Te+=" select-open"),k&&(Te+=" select-multiple"),Ce&&(Te+=" select-over-line"),Te)},{children:[Ge,(0,e.jsx)(o.Tooltip,m({open:oe,title:ot,onClose:ze,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:function(){var e="paraui-select-popover";return a&&(e+=" paraui-select-popover-"+a),e+=k?" paraui-select-popover-multiple":" paraui-select-popover-radio",Y&&(e+=" "+Y),e}()},placement:"bottom-start"},{children:et}),void 0),M&&(0,e.jsx)("p",m({className:"select-error-text"},{children:M}),void 0),rt]}),void 0)};u.default=y}(),u}()}));
|
|
16
|
+
o(7418);var r=o(9297),n=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;n=i("react.element"),t.Fragment=i("react.fragment")}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,o){var r,i={},a=null,u=null;for(r in void 0!==o&&(a=""+o),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:n,type:e,key:a,ref:u,props:i,_owner:s.current}}t.jsx=a,t.jsxs=a},5893:function(e,t,o){e.exports=o(5251)},7839:function(e,t,o){var r=o(5893),n=o(9297),i=o(7371),s=function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};t.default=function(e){var t=e.children,o=e.placement,l=void 0===o?"bottom-start":o,c=e.tips,a=void 0===c?"":c,u=e.className,d=void 0===u?"":u,p=(0,n.useRef)(),v=(0,n.useState)(""),f=v[0],m=v[1];(0,n.useEffect)((function(){m(a)}),[a]);var h;return(0,r.jsx)("div",s({ref:p,className:(h="paraui-auto-tips",d&&(h+=" "+d),h),onMouseOver:function(e){p.current&&p.current.scrollWidth>p.current.offsetWidth?m(a||p.current.innerText):m("")}},{children:(0,r.jsx)(i.default,s({title:f,placement:l},{children:(0,r.jsx)("div",s({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},7371:function(e,t,o){var r=o(5893),n=o(1731),i=o(6010),s=function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};t.default=function(e){var t,o=e.placement,l=void 0===o?"bottom":o,c=s(s({},e.classes),{popper:(0,i.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,r.jsx)(n.Tooltip,s({},e,{classes:c}),void 0)}},1731:function(t){t.exports=e},6110:function(e){e.exports=t},19:function(e){e.exports=o},6028:function(e){e.exports=r},4115:function(e){e.exports=n},3475:function(e){e.exports=i},9297:function(e){e.exports=s}},c={};function a(e){var t=c[e];if(void 0!==t)return t.exports;var o=c[e]={exports:{}};return l[e](o,o.exports,a),o.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return function(){a.r(u),a.d(u,{Select:function(){return y}});var e=a(5893),t=a(9297),o=a(1731),r=a(6028),n=a.n(r),i=a(4115),s=a.n(i),l=a(6110),c=a.n(l),d=a(19),p=a.n(d),v=a(7839),f=a(3475),m=function(){return m=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},m.apply(this,arguments)},h=function(e,t,o){if(o||2===arguments.length)for(var r,n=0,i=t.length;n<i;n++)!r&&n in t||(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return e.concat(r||Array.prototype.slice.call(t))},y=function(r){var i=r.className,l=r.size,a=void 0===l?"large":l,u=r.labelMode,d=void 0===u?"outside":u,y=r.placeholder,x=void 0===y?"":y,g=r.searchPlaceholder,j=void 0===g?"请输入搜索名":g,b=r.label,w=void 0===b?"":b,S=r.disabled,N=void 0!==S&&S,O=r.multiple,k=void 0!==O&&O,C=r.required,E=void 0!==C&&C,q=r.labelSign,T=r.error,L=void 0!==T&&T,P=r.helperText,M=void 0===P?"":P,_=r.list,D=r.showName,F=void 0===D?"label":D,I=r.showValue,z=void 0===I?"value":I,R=r.childrenName,U=void 0===R?"children":R,H=r.value,A=r.onChange,V=r.overLine,W=void 0!==V&&V,B=r.search,K=void 0!==B&&B,Z=r.searchModel,$=void 0===Z?"inside":Z,Y=r.selectPopoverClassName,G=r.morePopoverClassName,J=r.onEnter,Q=(0,t.useRef)(null),X=(0,t.useState)("select-"+(0,f.UUID)())[0],ee=(0,t.useState)("select-popover-"+(0,f.UUID)())[0],te=(0,t.useState)(!1),oe=te[0],re=te[1],ne=(0,t.useState)(!1),ie=ne[0],se=ne[1],le=(0,t.useState)([]),ce=le[0],ae=le[1],ue=(0,t.useState)([]),de=ue[0],pe=ue[1],ve=(0,t.useState)({}),fe=ve[0],me=ve[1],he=(0,t.useState)(null),ye=he[0],xe=he[1],ge=(0,t.useState)({})[0],je=(0,t.useState)(!1),be=je[0],we=je[1],Se=(0,t.useState)(""),Ne=Se[0],Oe=Se[1],ke=(0,t.useState)(!1),Ce=ke[0],Ee=ke[1],qe=(0,t.useRef)(null);(0,t.useEffect)((function(){void 0!==r.defaultValue&&(r.multiple?ae((0,f.DeepClone)(r.defaultValue||[])):ae(""===r.defaultValue?[]:[r.defaultValue]))}),[]),(0,t.useEffect)((function(){void 0!==H&&ae(k?(0,f.DeepClone)(H||[]):""===H?[]:[H])}),[H,k]),(0,t.useEffect)((function(){if(K&&"outside"===$)return Ee(!!k);Ee(W)}),[W,K,$,k]),(0,t.useEffect)((function(){for(var e={},t=0,o=_.length;t<o;t++){var r=_[t];if(r[U]&&r[U].length>0)for(var n=r[U],i=0,s=n.length;i<s;i++){var l=n[i];e[l[z]]=l}else e[r[z]]=r}me(e)}),[_]),(0,t.useEffect)((function(){k&&(Ce||xe(ce.length))}),[Ce,k,ce]),(0,t.useEffect)((function(){return Ce?xe(ce.length):(setTimeout((function(){De(ce.length)})),window.addEventListener("resize",Fe)),function(){window.removeEventListener("resize",Fe)}}),[ce,Ce]),(0,t.useEffect)((function(){ce&&ce.length>0?se(!0):(se(!1),K&&"outside"===$&&se(""!==Ne))}),[K,Ne,$,ce]),(0,t.useEffect)((function(){clearTimeout(ge.searchTimer),K&&""!==Ne.trim()?ge.searchTimer=setTimeout((function(){for(var e=[],t=(0,f.DeepClone)(_),o=0,r=t.length;o<r;o++){var n=t[o];if(n[U]&&n[U].length>0){for(var i=n[U],s=[],l=0,c=i.length;l<c;l++){var a=i[l];_e(a)&&s.push(a)}s.length>0&&(n[U]=s,e.push(n))}else{_e(n)&&e.push(n)}}pe(e)}),100):pe((0,f.DeepClone)(_))}),[K,Ne,_]),(0,t.useEffect)((function(){return oe?setTimeout((function(){Le(),window.addEventListener("click",Me),window.addEventListener("keydown",Ze)})):(Oe(""),window.removeEventListener("click",Me),window.removeEventListener("keydown",Ze)),function(){window.removeEventListener("click",Me),window.removeEventListener("keydown",Ze)}}),[oe]),(0,t.useEffect)((function(){Ne&&re(!0)}),[Ne]),(0,t.useEffect)((function(){k&&"outside"===$&&!0!==N&&We(Ne)}),[Ne,k,N,$]);var Te,Le=function(){var e=qe&&qe.current;e&&e.focus()},Pe=function(e,t){for(var o=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!o.call(e,t);)e=e.parentElement;return e},Me=function(e){Pe(e.target,"."+ee)||re(!1)},_e=function(e){var t=!0,o=e[F];return o&&"string"==typeof o&&-1===o.indexOf(Ne)&&(t=!1),t},De=function(e){if(null!==e&&0!==e){void 0===e&&(e=ce.length);var t=document.querySelector("."+X+" > .select-content > .check-select-content");if(t)if(t.scrollHeight>t.clientHeight){var o=Number(e)-1;xe(o),De(o)}else ce.length<=e&&Ue()}},Fe=function(){clearTimeout(ge.timer),ge.timer=setTimeout((function(){xe(ce.length),De()}),100)},Ie=function(){!0!==N&&re(!0)},ze=function(){re(!1)},Re=function(e){we(!0),re(!1),e.stopPropagation()},Ue=function(){we(!1)},He=function(e,t){return function(o){var n=e[z];if("object"!=typeof N||-1===N.indexOf(n))if(k){var i=ce.indexOf(n);-1!==i?ce.splice(i,1):ce.push(n),void 0===r.value&&ae(h([],ce,!0)),A&&A(h([],ce,!0),o),t&&J&&J(h([],ce,!0)),Le()}else void 0===r.value&&ae([n]),A&&A(n,o),t&&J&&J(n),ze(),Oe("")}},Ae=function(e,t){return function(o){var r;e||((r={})[z]=t,e=r),He(e)(o),o.stopPropagation()}},Ve=function(e){Oe(e.target.value)},We=function(e){var t=qe&&qe.current;if(!t)return null;var o=window.getComputedStyle(t),r=o.fontFamily,n=function(e,t,o){var r=document.createElement("span");r.id="referenceSpan";var n={};n.width=r.offsetWidth,n.height=r.offsetHeight,r.style.visibility="hidden",r.style.fontSize=e,r.style.fontFamily=t,r.style.display="inline-block";var i=document.getElementById("referenceSpan");return i&&document.body.removeChild(i),document.body.appendChild(r),void 0!==r.textContent?r.textContent=o:r.innerText=o,n.width=parseFloat(window.getComputedStyle(r).width)-n.width,n.height=parseFloat(window.getComputedStyle(r).height)-n.height,document.body.removeChild(r),n}(o.fontSize,r,e),i=n.width;i<10&&(i=10),t.style.width=i+"px"},Be=function(e){var t=e.selectDom,o=e.keyCode,r=e.currentKeydownDom,n=null,i="nextSibling",s=".select-popover-list > div",l=".select-popover-list-item";if(38===o&&(i="previousSibling",s=".select-popover-list > div:last-child",l=".select-popover-list-item:last-child"),r)if(n=r[i])-1!==n.className.indexOf("select-popover-list-group-label")&&((n=(n=r.parentNode)[i])||(n=t.querySelector(s)));else{var c=r.parentNode;c&&c.className&&-1!==c.className.indexOf("select-popover-list-group")&&(n=(n=r.parentNode)[i])||(n=t.querySelector(s))}else n=t.querySelector(s);if(n)if(-1!==n.className.indexOf("select-popover-list-group")){var a=n.querySelector(l);a&&(a.classList.add("select-popover-list-item-keydown"),Ke(a,t))}else n.classList.add("select-popover-list-item-keydown"),Ke(n,t)},Ke=function(e,t){clearTimeout(ge.scrollTimer);var o=t.clientHeight,r=e.offsetTop+e.clientHeight-o;ge.scroll=!0,t.scrollTop=r>0?r:0,ge.scrollTimer=setTimeout((function(){ge.scroll=!1}),100)},Ze=function(e){var t=document.querySelector("."+ee+" .select-popover-list");if(t){var o=t.querySelector(".select-popover-list-item-select"),r=t.querySelector(".select-popover-list-item-hover"),n=t.querySelector(".select-popover-list-item-keydown"),i=o;if(r&&(i=r),13===e.keyCode){var s=n||r;if(s){var l=s.dataset.val;He(fe[l],!0)({target:n})}else J&&J(H)}n&&(i=n,n.classList.remove("select-popover-list-item-keydown")),40===e.keyCode&&Be({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i}),38===e.keyCode&&Be({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i})}},$e=function(e){if(!ge.scroll){var t=Pe(e.target,".select-popover-list-item");if(t){t.classList.add("select-popover-list-item-hover");var o=document.querySelector("."+ee).querySelector(".select-popover-list-item-keydown");o&&o.classList.remove("select-popover-list-item-keydown")}}},Ye=function(e){var t=Pe(e.target,".select-popover-list-item");t&&t.classList.remove("select-popover-list-item-hover")},Ge=(0,t.useMemo)((function(){var t=Boolean(w||E||q);return(0,e.jsx)(e.Fragment,{children:"outside"===d&&t&&(0,e.jsxs)("label",m({className:"select-label"},{children:[w,E&&(0,e.jsx)("span",m({className:"select-required"},{children:"*"}),void 0),q&&(0,e.jsx)("span",{children:q},void 0)]}),void 0)},void 0)}),[d,w,q,E]),Je=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:!ie&&(0,e.jsx)("span",m({className:"select-label-placeholder"},{children:"outside"===d?x:(0,e.jsxs)(e.Fragment,{children:[w||x,E&&(0,e.jsx)("span",m({className:"select-required"},{children:"*"}),void 0),q&&(0,e.jsx)("span",{children:q},void 0)]},void 0)}),void 0)},void 0)}),[ie,d,x,w,q,E]),Qe=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:!k&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",m({className:"radio-select-content"},{children:function(){if(""!==Ne&&"outside"===$)return null;var t=fe[ce[0]]&&fe[ce[0]][F]||ce[0];return Ce?t:(0,e.jsx)(v.default,{children:t},void 0)}()}),void 0),K&&"outside"===$&&!0!==N&&(0,e.jsx)("input",{className:"radio-search-outside",value:Ne,onChange:Ve,ref:qe},void 0)]},void 0)},void 0)}),[k,ie,Ce,fe,ce,F,K,$,Ne,N]),Xe=(0,t.useMemo)((function(){var t=function(e){return fe[ce[e]]&&fe[ce[e]][F]||ce[e]};return(0,e.jsx)(e.Fragment,{children:k&&(0,e.jsxs)("div",m({className:"check-select-content"},{children:[ce&&ce.map((function(o,r){if(null!==ye&&ye<=r)return null;var n=!0;return(!0===N||"object"==typeof N&&-1!==N.indexOf(ce[r]))&&(n=!1),(0,e.jsxs)("div",m({className:n?"check-select-content-item":"check-select-content-item check-select-content-item-noclose"},{children:[(0,e.jsx)("span",{children:t(r)},void 0),n&&(0,e.jsx)(p(),{onClick:Ae(fe[ce[r]],ce[r])},void 0)]}),r)})),function(){if(null!==ye&&ce.length>ye)return(0,e.jsx)("div",m({className:"check-select-content-item check-select-content-item-more",onClick:Re},{children:(0,e.jsxs)("span",{children:["+",ce.length-ye]},void 0)}),void 0)}(),K&&"outside"===$&&!0!==N&&(0,e.jsx)("input",{className:"check-search-outside",value:Ne,onChange:Ve,ref:qe},void 0)]}),void 0)},void 0)}),[k,ie,ce,ye,fe,N,A,Ne,K,$]),et=(0,t.useMemo)((function(){return(0,e.jsxs)("div",m({className:"select-content",onClick:Ie,ref:Q},{children:[Je,(0,e.jsx)("span",m({className:"select-svg"},{children:(0,e.jsx)(n(),{},void 0)}),void 0),Qe,Xe]}),void 0)}),[Q,ie,d,x,w,q,E,Ce,fe,ce,F,k,ye,N,A,Ne,$]),tt=(0,t.useMemo)((function(){return(0,e.jsx)("div",m({className:"select-popover-list"},{children:de&&de.length>0?(0,e.jsx)(e.Fragment,{children:de.map((function(t,o){if(t[U]&&t[U].length>0){var r=t[U];return(0,e.jsxs)("div",m({className:"select-popover-list-group"},{children:[(0,e.jsx)("span",m({className:"select-popover-list-group-label"},{children:t[F]||t[z]}),void 0),r.map((function(t,o){var r=t[z],n="select-popover-list-item";return-1!==ce.indexOf(r)&&(n+=" select-popover-list-item-select"),"object"==typeof N&&-1!==N.indexOf(r)&&(n+=" select-popover-list-item-disabled"),(0,e.jsxs)("div",m({onClick:He(t),className:n,onMouseEnter:$e,onMouseLeave:Ye,"data-val":r},{children:[(0,e.jsx)("span",m({className:"select-popover-list-item-label"},{children:(0,e.jsx)(v.default,{children:t[F]||t[z]},void 0)}),void 0),k&&(0,e.jsx)("span",m({className:"select-popover-list-item-svg"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),o)}))]}),o)}var n=t[z],i="select-popover-list-item";return-1!==ce.indexOf(n)&&(i+=" select-popover-list-item-select"),"object"==typeof N&&-1!==N.indexOf(n)&&(i+=" select-popover-list-item-disabled"),(0,e.jsxs)("div",m({onClick:He(t),className:i,onMouseEnter:$e,onMouseLeave:Ye,"data-val":n},{children:[(0,e.jsx)("span",m({className:"select-popover-list-item-label"},{children:(0,e.jsx)(v.default,{children:t[F]||t[z]},void 0)}),void 0),k&&(0,e.jsx)("span",m({className:"select-popover-list-item-svg"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),o)}))},void 0):(0,e.jsx)("div",m({className:"select-nodata"},{children:"暂无选项"}),void 0)}),void 0)}),[de,F,z,ce,A,k]),ot=(0,t.useMemo)((function(){return(0,e.jsxs)("div",m({style:{width:(Q&&Q.current?Q.current.offsetWidth:0)+"px"},className:"select-popover-content "+ee},{children:[K&&"inside"===$&&(0,e.jsxs)("div",m({className:"select-popover-search"},{children:[(0,e.jsx)("input",{placeholder:j,value:Ne,onChange:Ve,ref:qe},void 0),(0,e.jsx)(s(),{},void 0)]}),void 0),tt]}),void 0)}),[oe,Q,de,U,z,F,ce,Ne,K,ee,$,k,j]),rt=(0,t.useMemo)((function(){var t,r=function(e){return fe[ce[e]]&&fe[ce[e]][F]||ce[e]};return(0,e.jsx)(o.Popover,m({open:be,anchorEl:Q&&Q.current,onClose:Ue,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},className:(t="paraui-select-more-popover",a&&(t+=" paraui-select-more-popover-"+a),G&&(t+=" "+G),t)},{children:(0,e.jsxs)("div",m({className:"select-more"},{children:[(0,e.jsxs)("div",m({className:"select-more-title"},{children:[(0,e.jsx)("span",{children:"已选中"},void 0),(0,e.jsxs)("span",{children:["(",ce.length-Number(ye),")"]},void 0)]}),void 0),(0,e.jsx)("div",m({className:"select-more-content"},{children:ce&&ce.map((function(t,o){if(null!==ye&&ye>o)return null;var n=!0;return(!0===N||"object"==typeof N&&-1!==N.indexOf(ce[o]))&&(n=!1),(0,e.jsxs)("div",m({className:"select-more-content-item"},{children:[(0,e.jsx)("span",{children:(0,e.jsx)(v.default,{children:r(o)},void 0)},void 0),n&&(0,e.jsx)(p(),{onClick:Ae(fe[ce[o]],ce[o])},void 0)]}),o)}))}),void 0)]}),void 0)}),void 0)}),[be,ce,ye,fe,N,F,G,a]);return(0,e.jsxs)("div",m({className:(Te="paraui-select select",k&&!Ce&&(Te+=" "+X),i&&(Te+=" "+i),a&&(Te+=" select-"+a),L&&(Te+=" select-error"),!0===N&&(Te+=" select-disabled"),oe&&(Te+=" select-open"),k&&(Te+=" select-multiple"),Ce&&(Te+=" select-over-line"),Te)},{children:[Ge,(0,e.jsx)(o.Tooltip,m({open:oe,title:ot,onClose:ze,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:function(){var e="paraui-select-popover";return a&&(e+=" paraui-select-popover-"+a),e+=k?" paraui-select-popover-multiple":" paraui-select-popover-radio",Y&&(e+=" "+Y),e}()},placement:"bottom-start"},{children:et}),void 0),M&&(0,e.jsx)("p",m({className:"select-error-text"},{children:M}),void 0),rt]}),void 0)};u.default=y}(),u}()}));
|
package/SingleBox/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Delete","@para-ui/icons/LoadingF","@para-ui/icons/Plus","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Delete"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/Plus"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["para-lib"],e.react)}(self,(function(e,t,n,o,r,i,a,l){return function(){"use strict";var s={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Delete","@para-ui/icons/LoadingF","@para-ui/icons/Plus","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Delete"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/Plus"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["para-lib"],e.react)}(self,(function(e,t,n,o,r,i,a,l){return function(){"use strict";var s={6010:function(e,t,n){function o(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=o(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function r(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=o(e))&&(r&&(r+=" "),r+=t);return r}n.d(t,{Z:function(){return r}})},7418:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,l,s=r(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))n.call(a,u)&&(s[u]=a[u]);if(t){l=t(a);for(var d=0;d<l.length;d++)o.call(a,l[d])&&(s[l[d]]=a[l[d]])}}return s}},
|
|
7
|
+
var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,l,s=r(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))n.call(a,u)&&(s[u]=a[u]);if(t){l=t(a);for(var d=0;d<l.length;d++)o.call(a,l[d])&&(s[l[d]]=a[l[d]])}}return s}},5251:function(e,t,n){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
n(4126);var o=n(9297),r=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;r=i("react.element"),t.Fragment=i("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var o,i={},c=null,u=null;for(o in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,o)&&!s.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:r,type:e,key:c,ref:u,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},7712:function(e,t,n){e.exports=n(9524)},3094:function(e,t,n){var o=n(7712),r=n(9297),i=n(6885),a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};t.default=function(e){var t=e.children,n=e.placement,l=void 0===n?"bottom-start":n,s=e.tips,c=void 0===s?"":s,u=e.className,d=void 0===u?"":u,f=(0,r.useRef)(),v=(0,r.useState)(""),p=v[0],x=v[1];(0,r.useEffect)((function(){x(c)}),[c]);var h;return(0,o.jsx)("div",a({ref:f,className:(h="paraui-auto-tips",d&&(h+=" "+d),h),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?x(c||f.current.innerText):x("")}},{children:(0,o.jsx)(i.default,a({title:p,placement:l},{children:(0,o.jsx)("div",a({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},9011:function(e,t,n){var o=n(7712),r=n(9297),i=n(1102),a=n.n(i),l=function(){return l=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(this,arguments)};t.default=function(e){var t=e.className,n=e.style,i=e.opacity,s=void 0===i?.7:i,c=(0,r.useRef)(null);(0,r.useEffect)((function(){c&&c.current&&c.current.parentNode&&((getComputedStyle(c.current.parentNode)||{}).position||(c.current.parentNode.style.position="relative"))}),[]);var u;return(0,o.jsxs)("div",l({className:(u="paraui-loading",t&&(u+=" "+t),u),style:n,ref:c},{children:[(0,o.jsx)("div",l({className:"paraui-loading-box"},{children:(0,o.jsx)(a(),{},void 0)}),void 0),(0,o.jsx)("div",{className:"paraui-loading-mask",style:{opacity:s}},void 0)]}),void 0)}},3672:function(e,t,n){var o=n(7712),r=n(9297),i=n(1731),a=n(3094),l=n(9011),s=n(8528),c=n.n(s),u=n(6570),d=n.n(u),f=n(3475),v=function(){return v=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},v.apply(this,arguments)},p=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};t.default=function(e){var t=e.className,n=e.size,s=void 0===n?"large":n,u=e.labelMode,x=void 0===u?"outside":u,h=e.placeholder,m=void 0===h?"":h,g=e.label,y=void 0===g?"":g,b=e.disabled,j=void 0!==b&&b,w=e.multiline,O=void 0!==w&&w,S=e.required,N=void 0!==S&&S,C=e.labelSign,P=e.rows,k=void 0===P?2:P,q=e.error,E=void 0!==q&&q,L=e.helperText,_=void 0===L?"":L,F=e.addonBefore,D=void 0===F?"":F,I=e.addonAfter,T=void 0===I?"":I,A=(e.defaultValue,e.value),M=e.autoFocus,B=void 0!==M&&M,R=e.type,U=void 0===R?"text":R,K=e.onClickIcon,V=e.rightIcon,z=e.showRightIcon,W=void 0===z||z,H=e.limitLength,J=e.fetchSuggestions,Z=e.selectPopoverClass,$=e.renderSelectItem,Y=e.showSelectName,G=void 0===Y?"value":Y,Q=e.onBlur,X=e.onFocus,ee=e.onChange,te=e.onKeydown,ne=e.onKeyUp,oe=e.onEnter,re=e.onClickAddonBefore,ie=e.onClickAddonAfter,ae=e.onSelect,le=p(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),se=(0,r.useState)("text-field-select-content-"+(0,f.UUID)())[0],ce=(0,r.useState)(!0),ue=ce[0],de=ce[1],fe=(0,r.useState)(""),ve=fe[0],pe=fe[1],xe=(0,r.useState)(!1),he=xe[0],me=xe[1],ge=(0,r.useState)("text"),ye=ge[0],be=ge[1],je=(0,r.useState)(!1),we=je[0],Oe=je[1],Se=(0,r.useState)(!1),Ne=Se[0],Ce=Se[1],Pe=(0,r.useState)([]),ke=Pe[0],qe=Pe[1],Ee=((0,r.useState)({isCompositions:!0})[0],(0,r.useRef)(null)),Le=(0,r.useRef)(null);(0,r.useEffect)((function(){void 0!==e.defaultValue&&(pe(e.defaultValue),De(e.defaultValue))}),[]),(0,r.useEffect)((function(){U!==ye&&be(U)}),[U]),(0,r.useEffect)((function(){void 0!==A&&(pe(A),De(A))}),[A]),(0,r.useEffect)((function(){de(""===ve||void 0===ve)}),[ve]),(0,r.useEffect)((function(){J&&Oe(he)}),[he,J]),(0,r.useEffect)((function(){return we?window.addEventListener("keydown",Me):window.removeEventListener("keydown",Me),function(){window.removeEventListener("keydown",Me)}}),[we]),(0,r.useEffect)((function(){if(!he&&ve){var t=Fe(ve);if(t!==ve){var n={};n.target=Ee.current,n.target.value=t,e.onChange&&e.onChange(n)}}}),[ve,he]);var _e,Fe=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},De=function(e){Ee&&Ee.current&&(Ee.current.value=e,Ee.current.setAttribute("value",e))},Ie=function(){j||(de(!1),(Ee&&Ee.current).focus())},Te=function(e){var t=e.selectDom,n=e.keyCode,o=e.currentDom,r="nextSibling",i=".text-field-select-content-item";38===n&&(r="previousSibling",i=".text-field-select-content-item:last-child"),o?(o=o[r])||(o=t.querySelector(i)):o=t.querySelector(".text-field-select-content-item"),o&&(o.classList.add("text-field-select-content-item-keydown"),Ae(o,t))},Ae=function(e,t){var n=t.clientHeight,o=e.offsetTop+e.clientHeight-n;t.scrollTop=o>0?o:0},Me=function(e){var t=document.querySelector("."+se),n=null,o=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&o){var r=o.dataset.val;Je(JSON.parse(r))(e),(Ee&&Ee.current).blur()}o&&(n=o,o.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Te({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&Te({selectDom:t,keyCode:e.keyCode,currentDom:n})},Be=function(e){me(!1),""===e.target.value&&de(!0),Q&&Q(e)},Re=function(e){Ce(!0),J&&J(e,(function(e){qe(e||[]),Ce(!1)}))},Ue=function(e){me(!0),X&&X(e),Re(e.target.value)},Ke=function(t){var n=t.target.value;n&&de(!1),void 0===e.value&&(pe(n),De(n)),ee&&ee(t),Re(t.target.value)},Ve=function(e){13===e.keyCode&&oe&&oe(e),te&&te(e)},ze=function(e){ne&&ne(e)},We=function(e){"password"===U&&("text"===ye&&be("password"),"password"===ye&&be("text")),K&&K(e)},He=function(){Oe(!1)},Je=function(e){return function(t){ae&&ae(e)}},Ze=(0,r.useMemo)((function(){return(0,o.jsx)(o.Fragment,{children:void 0!==H&&(0,o.jsx)("span",v({className:"length-limit"},{children:(ve?ve.toString().length:0)+"/"+H}),void 0)},void 0)}),[H,ve]),$e=(0,r.useMemo)((function(){var e=V||("password"===U?"password"===ye?(0,o.jsx)(d(),{},void 0):(0,o.jsx)(c(),{},void 0):null);return(0,o.jsx)(o.Fragment,{children:W&&e&&(0,o.jsx)("span",v({className:"right-icon",onClick:We},{children:e}),void 0)},void 0)}),[W,V,U,ye]),Ye=(0,r.useMemo)((function(){return(0,o.jsxs)("div",v({className:"text-field-content-within",ref:Le},{children:[(0,o.jsxs)("div",v({className:"text-field-content-within-input"},{children:[O?(0,o.jsx)("textarea",v({ref:Ee,rows:k,onBlur:Be,onFocus:Ue,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},le),void 0):(0,o.jsx)("input",v({ref:Ee,type:ye,onBlur:Be,onFocus:Ue,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},le),void 0),ue&&!he&&(0,o.jsx)("span",v({className:"text-field-label-placeholder",onClick:Ie},{children:"outside"===x?m:(0,o.jsxs)(o.Fragment,{children:[y||m,N&&(0,o.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),C&&(0,o.jsx)("span",{children:C},void 0)]},void 0)}),void 0)]}),void 0),Ze,$e]}),void 0)}),[ue,he,B,ye,ve,Ze,$e,x,m,y,j,O,k,le,ee,J]),Ge=(0,r.useMemo)((function(){var e;return(0,o.jsxs)("div",v({className:(e="text-field-select-content",Ne&&(e+=" text-field-select-content-loading"),se&&(e+=" "+se),e),style:{width:(Le&&Le.current?Le.current.offsetWidth:0)+"px"}},{children:[ke&&ke.map((function(e,t){return(0,o.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:Je(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,o.jsx)(a.default,{children:e[G]},void 0)}),t)})),Ne&&(0,o.jsx)(l.default,{},void 0)]}),void 0)}),[Le,we,ke,$,G,ae,Ne,se]),Qe=(0,r.useMemo)((function(){return(0,o.jsx)(i.Tooltip,v({open:we,title:Ge,onClose:He,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",s&&(e+=" paraui-text-field-select-"+s),Z&&(e+=" "+Z),e)}},{children:Ye}),void 0);var e}),[ue,he,B,ye,ve,Ze,$e,x,m,y,j,O,k,le,ee,J,ae,Le,we,Z,s]),Xe=(0,r.useMemo)((function(){var e=Boolean(N||C||y);return(0,o.jsx)(o.Fragment,{children:"outside"===x&&e&&(0,o.jsxs)("label",v({className:"text-field-label"},{children:[y,N&&(0,o.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),C&&(0,o.jsx)("span",{children:C},void 0)]}),void 0)},void 0)}),[x,y,C,N]);return(0,o.jsxs)("div",v({className:(_e="paraui-text-field",_e+=" text-field",s&&!O&&(_e+=" text-field-"+s),t&&(_e+=" "+t),E&&(_e+=" text-field-error"),he&&(_e+=" text-field-focus"),j&&(_e+=" text-field-disabled"),O&&(_e+=" text-field-multiline"),e.limitLength&&ve&&ve.toString().length>e.limitLength&&(_e+=" text-field-limit"),_e)},{children:[Xe,(0,o.jsxs)("div",v({className:"text-field-content"},{children:[D&&(0,o.jsx)("div",v({className:"text-field-content-before",onClick:function(e){re&&re(e)}},{children:D}),void 0),J?Qe:Ye,T&&(0,o.jsx)("div",v({className:"text-field-content-after",onClick:function(e){ie&&ie(e)}},{children:T}),void 0)]}),void 0),_&&(0,o.jsx)("p",v({className:"text-field-error-text"},{children:_}),void 0)]}),void 0)}},6885:function(e,t,n){var o=n(7712),r=n(1731),i=n(4927),a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};t.default=function(e){var t,n=e.placement,l=void 0===n?"bottom":n,s=a(a({},e.classes),{popper:(0,i.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,o.jsx)(r.Tooltip,a({},e,{classes:s}),void 0)}},1731:function(t){t.exports=e},6243:function(e){e.exports=t},1102:function(e){e.exports=n},5191:function(e){e.exports=o},6570:function(e){e.exports=r},8528:function(e){e.exports=i},3475:function(e){e.exports=a},9297:function(e){e.exports=l}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return s[e](n,n.exports,u),n.exports}u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return function(){u.r(d),u.d(d,{SingleBox:function(){return c}});var e=u(7712),t=u(9297),n=u(3672),o=u(5191),r=u.n(o),i=u(6243),a=u.n(i),l=function(){return l=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(this,arguments)},s=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},c=function(o){var i=o.className,c=o.size,u=void 0===c?"large":c,d=o.placeholder,f=void 0===d?"":d,v=o.label,p=void 0===v?"":v,x=o.labelSign,h=o.disabled,m=void 0!==h&&h,g=o.required,y=void 0!==g&&g,b=o.error,j=void 0!==b&&b,w=o.helperText,O=void 0===w?"":w,S=o.value,N=o.onChange,C=(0,t.useState)([]),P=C[0],k=C[1];(0,t.useEffect)((function(){void 0!==o.defaultValue&&k(s([],o.defaultValue,!0))}),[]),(0,t.useEffect)((function(){void 0!==S&&k(s([],S,!0))}),[S]);var q,E=function(e){return function(){m||(P.splice(e,1),void 0===o.value&&k(s([],P,!0)),N&&N(P))}},L=function(e){return function(t){P[e]=t.target.value,void 0===o.value&&k(s([],P,!0)),N&&N(P)}};return(0,e.jsxs)("div",l({className:(q="paraui-single-box single-box",i&&(q+=" "+i),u&&(q+=" single-box-"+u),j&&(q+=" single-box-error"),m&&(q+=" single-box-disabled"),q)},{children:[p?(0,e.jsxs)("label",l({className:"single-box-label"},{children:[p,y&&(0,e.jsx)("span",l({className:"single-box-label-required"},{children:"*"}),void 0),x&&(0,e.jsx)("span",{children:x},void 0)]}),void 0):null,(0,e.jsx)("div",l({className:"single-box-content"},{children:P.map((function(t,o){return(0,e.jsxs)("div",l({className:"single-box-content-item"},{children:[(0,e.jsx)(n.default,{disabled:m,value:t,placeholder:f,size:u,onChange:L(o)},void 0),(0,e.jsx)("span",l({className:"single-box-content-item-svg"},{children:(0,e.jsx)(a(),{onClick:E(o)},void 0)}),void 0)]}),o)}))}),void 0),(0,e.jsx)("div",l({className:"single-box-add",onClick:function(){m||(P.push(""),void 0===o.value&&k(s([],P,!0)),N&&N(P))}},{children:(0,e.jsx)(r(),{},void 0)}),void 0),O&&(0,e.jsx)("p",l({className:"single-box-error"},{children:O}),void 0)]}),void 0)};d.default=c}(),d}()}));
|
|
16
|
+
n(7418);var o=n(9297),r=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;r=i("react.element"),t.Fragment=i("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var o,i={},c=null,u=null;for(o in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,o)&&!s.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:r,type:e,key:c,ref:u,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},5893:function(e,t,n){e.exports=n(5251)},7839:function(e,t,n){var o=n(5893),r=n(9297),i=n(7371),a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};t.default=function(e){var t=e.children,n=e.placement,l=void 0===n?"bottom-start":n,s=e.tips,c=void 0===s?"":s,u=e.className,d=void 0===u?"":u,f=(0,r.useRef)(),v=(0,r.useState)(""),p=v[0],x=v[1];(0,r.useEffect)((function(){x(c)}),[c]);var h;return(0,o.jsx)("div",a({ref:f,className:(h="paraui-auto-tips",d&&(h+=" "+d),h),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?x(c||f.current.innerText):x("")}},{children:(0,o.jsx)(i.default,a({title:p,placement:l},{children:(0,o.jsx)("div",a({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},7502:function(e,t,n){var o=n(5893),r=n(9297),i=n(1102),a=n.n(i),l=function(){return l=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(this,arguments)};t.default=function(e){var t=e.className,n=e.style,i=e.opacity,s=void 0===i?.7:i,c=(0,r.useRef)(null);(0,r.useEffect)((function(){c&&c.current&&c.current.parentNode&&((getComputedStyle(c.current.parentNode)||{}).position||(c.current.parentNode.style.position="relative"))}),[]);var u;return(0,o.jsxs)("div",l({className:(u="paraui-loading",t&&(u+=" "+t),u),style:n,ref:c},{children:[(0,o.jsx)("div",l({className:"paraui-loading-box"},{children:(0,o.jsx)(a(),{},void 0)}),void 0),(0,o.jsx)("div",{className:"paraui-loading-mask",style:{opacity:s}},void 0)]}),void 0)}},7320:function(e,t,n){var o=n(5893),r=n(9297),i=n(1731),a=n(7839),l=n(7502),s=n(8528),c=n.n(s),u=n(6570),d=n.n(u),f=n(3475),v=function(){return v=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},v.apply(this,arguments)},p=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};t.default=function(e){var t=e.className,n=e.size,s=void 0===n?"large":n,u=e.labelMode,x=void 0===u?"outside":u,h=e.placeholder,m=void 0===h?"":h,g=e.label,y=void 0===g?"":g,b=e.disabled,j=void 0!==b&&b,w=e.multiline,O=void 0!==w&&w,S=e.required,N=void 0!==S&&S,C=e.labelSign,P=e.rows,k=void 0===P?2:P,q=e.error,E=void 0!==q&&q,L=e.helperText,_=void 0===L?"":L,F=e.addonBefore,D=void 0===F?"":F,I=e.addonAfter,T=void 0===I?"":I,A=(e.defaultValue,e.value),M=e.autoFocus,B=void 0!==M&&M,R=e.type,U=void 0===R?"text":R,K=e.onClickIcon,V=e.rightIcon,z=e.showRightIcon,W=void 0===z||z,H=e.limitLength,J=e.fetchSuggestions,Z=e.selectPopoverClass,$=e.renderSelectItem,Y=e.showSelectName,G=void 0===Y?"value":Y,Q=e.onBlur,X=e.onFocus,ee=e.onChange,te=e.onKeydown,ne=e.onKeyUp,oe=e.onEnter,re=e.onClickAddonBefore,ie=e.onClickAddonAfter,ae=e.onSelect,le=p(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),se=(0,r.useState)("text-field-select-content-"+(0,f.UUID)())[0],ce=(0,r.useState)(!0),ue=ce[0],de=ce[1],fe=(0,r.useState)(""),ve=fe[0],pe=fe[1],xe=(0,r.useState)(!1),he=xe[0],me=xe[1],ge=(0,r.useState)("text"),ye=ge[0],be=ge[1],je=(0,r.useState)(!1),we=je[0],Oe=je[1],Se=(0,r.useState)(!1),Ne=Se[0],Ce=Se[1],Pe=(0,r.useState)([]),ke=Pe[0],qe=Pe[1],Ee=((0,r.useState)({isCompositions:!0})[0],(0,r.useRef)(null)),Le=(0,r.useRef)(null);(0,r.useEffect)((function(){void 0!==e.defaultValue&&(pe(e.defaultValue),De(e.defaultValue))}),[]),(0,r.useEffect)((function(){U!==ye&&be(U)}),[U]),(0,r.useEffect)((function(){void 0!==A&&(pe(A),De(A))}),[A]),(0,r.useEffect)((function(){de(""===ve||void 0===ve)}),[ve]),(0,r.useEffect)((function(){J&&Oe(he)}),[he,J]),(0,r.useEffect)((function(){return we?window.addEventListener("keydown",Me):window.removeEventListener("keydown",Me),function(){window.removeEventListener("keydown",Me)}}),[we]),(0,r.useEffect)((function(){if(!he&&ve){var t=Fe(ve);if(t!==ve){var n={};n.target=Ee.current,n.target.value=t,e.onChange&&e.onChange(n)}}}),[ve,he]);var _e,Fe=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},De=function(e){Ee&&Ee.current&&(Ee.current.value=e,Ee.current.setAttribute("value",e))},Ie=function(){j||(de(!1),(Ee&&Ee.current).focus())},Te=function(e){var t=e.selectDom,n=e.keyCode,o=e.currentDom,r="nextSibling",i=".text-field-select-content-item";38===n&&(r="previousSibling",i=".text-field-select-content-item:last-child"),o?(o=o[r])||(o=t.querySelector(i)):o=t.querySelector(".text-field-select-content-item"),o&&(o.classList.add("text-field-select-content-item-keydown"),Ae(o,t))},Ae=function(e,t){var n=t.clientHeight,o=e.offsetTop+e.clientHeight-n;t.scrollTop=o>0?o:0},Me=function(e){var t=document.querySelector("."+se),n=null,o=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&o){var r=o.dataset.val;Je(JSON.parse(r))(e),(Ee&&Ee.current).blur()}o&&(n=o,o.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Te({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&Te({selectDom:t,keyCode:e.keyCode,currentDom:n})},Be=function(e){me(!1),""===e.target.value&&de(!0),Q&&Q(e)},Re=function(e){Ce(!0),J&&J(e,(function(e){qe(e||[]),Ce(!1)}))},Ue=function(e){me(!0),X&&X(e),Re(e.target.value)},Ke=function(t){var n=t.target.value;n&&de(!1),void 0===e.value&&(pe(n),De(n)),ee&&ee(t),Re(t.target.value)},Ve=function(e){13===e.keyCode&&oe&&oe(e),te&&te(e)},ze=function(e){ne&&ne(e)},We=function(e){"password"===U&&("text"===ye&&be("password"),"password"===ye&&be("text")),K&&K(e)},He=function(){Oe(!1)},Je=function(e){return function(t){ae&&ae(e)}},Ze=(0,r.useMemo)((function(){return(0,o.jsx)(o.Fragment,{children:void 0!==H&&(0,o.jsx)("span",v({className:"length-limit"},{children:(ve?ve.toString().length:0)+"/"+H}),void 0)},void 0)}),[H,ve]),$e=(0,r.useMemo)((function(){var e=V||("password"===U?"password"===ye?(0,o.jsx)(d(),{},void 0):(0,o.jsx)(c(),{},void 0):null);return(0,o.jsx)(o.Fragment,{children:W&&e&&(0,o.jsx)("span",v({className:"right-icon",onClick:We},{children:e}),void 0)},void 0)}),[W,V,U,ye]),Ye=(0,r.useMemo)((function(){return(0,o.jsxs)("div",v({className:"text-field-content-within",ref:Le},{children:[(0,o.jsxs)("div",v({className:"text-field-content-within-input"},{children:[O?(0,o.jsx)("textarea",v({ref:Ee,rows:k,onBlur:Be,onFocus:Ue,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},le),void 0):(0,o.jsx)("input",v({ref:Ee,type:ye,onBlur:Be,onFocus:Ue,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},le),void 0),ue&&!he&&(0,o.jsx)("span",v({className:"text-field-label-placeholder",onClick:Ie},{children:"outside"===x?m:(0,o.jsxs)(o.Fragment,{children:[y||m,N&&(0,o.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),C&&(0,o.jsx)("span",{children:C},void 0)]},void 0)}),void 0)]}),void 0),Ze,$e]}),void 0)}),[ue,he,B,ye,ve,Ze,$e,x,m,y,j,O,k,le,ee,J]),Ge=(0,r.useMemo)((function(){var e;return(0,o.jsxs)("div",v({className:(e="text-field-select-content",Ne&&(e+=" text-field-select-content-loading"),se&&(e+=" "+se),e),style:{width:(Le&&Le.current?Le.current.offsetWidth:0)+"px"}},{children:[ke&&ke.map((function(e,t){return(0,o.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:Je(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,o.jsx)(a.default,{children:e[G]},void 0)}),t)})),Ne&&(0,o.jsx)(l.default,{},void 0)]}),void 0)}),[Le,we,ke,$,G,ae,Ne,se]),Qe=(0,r.useMemo)((function(){return(0,o.jsx)(i.Tooltip,v({open:we,title:Ge,onClose:He,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",s&&(e+=" paraui-text-field-select-"+s),Z&&(e+=" "+Z),e)}},{children:Ye}),void 0);var e}),[ue,he,B,ye,ve,Ze,$e,x,m,y,j,O,k,le,ee,J,ae,Le,we,Z,s]),Xe=(0,r.useMemo)((function(){var e=Boolean(N||C||y);return(0,o.jsx)(o.Fragment,{children:"outside"===x&&e&&(0,o.jsxs)("label",v({className:"text-field-label"},{children:[y,N&&(0,o.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),C&&(0,o.jsx)("span",{children:C},void 0)]}),void 0)},void 0)}),[x,y,C,N]);return(0,o.jsxs)("div",v({className:(_e="paraui-text-field",_e+=" text-field",s&&!O&&(_e+=" text-field-"+s),t&&(_e+=" "+t),E&&(_e+=" text-field-error"),he&&(_e+=" text-field-focus"),j&&(_e+=" text-field-disabled"),O&&(_e+=" text-field-multiline"),e.limitLength&&ve&&ve.toString().length>e.limitLength&&(_e+=" text-field-limit"),_e)},{children:[Xe,(0,o.jsxs)("div",v({className:"text-field-content"},{children:[D&&(0,o.jsx)("div",v({className:"text-field-content-before",onClick:function(e){re&&re(e)}},{children:D}),void 0),J?Qe:Ye,T&&(0,o.jsx)("div",v({className:"text-field-content-after",onClick:function(e){ie&&ie(e)}},{children:T}),void 0)]}),void 0),_&&(0,o.jsx)("p",v({className:"text-field-error-text"},{children:_}),void 0)]}),void 0)}},7371:function(e,t,n){var o=n(5893),r=n(1731),i=n(6010),a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};t.default=function(e){var t,n=e.placement,l=void 0===n?"bottom":n,s=a(a({},e.classes),{popper:(0,i.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,o.jsx)(r.Tooltip,a({},e,{classes:s}),void 0)}},1731:function(t){t.exports=e},6243:function(e){e.exports=t},1102:function(e){e.exports=n},5191:function(e){e.exports=o},6570:function(e){e.exports=r},8528:function(e){e.exports=i},3475:function(e){e.exports=a},9297:function(e){e.exports=l}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return s[e](n,n.exports,u),n.exports}u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return function(){u.r(d),u.d(d,{SingleBox:function(){return c}});var e=u(5893),t=u(9297),n=u(7320),o=u(5191),r=u.n(o),i=u(6243),a=u.n(i),l=function(){return l=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(this,arguments)},s=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},c=function(o){var i=o.className,c=o.size,u=void 0===c?"large":c,d=o.placeholder,f=void 0===d?"":d,v=o.label,p=void 0===v?"":v,x=o.labelSign,h=o.disabled,m=void 0!==h&&h,g=o.required,y=void 0!==g&&g,b=o.error,j=void 0!==b&&b,w=o.helperText,O=void 0===w?"":w,S=o.value,N=o.onChange,C=(0,t.useState)([]),P=C[0],k=C[1];(0,t.useEffect)((function(){void 0!==o.defaultValue&&k(s([],o.defaultValue,!0))}),[]),(0,t.useEffect)((function(){void 0!==S&&k(s([],S,!0))}),[S]);var q,E=function(e){return function(){m||(P.splice(e,1),void 0===o.value&&k(s([],P,!0)),N&&N(P))}},L=function(e){return function(t){P[e]=t.target.value,void 0===o.value&&k(s([],P,!0)),N&&N(P)}};return(0,e.jsxs)("div",l({className:(q="paraui-single-box single-box",i&&(q+=" "+i),u&&(q+=" single-box-"+u),j&&(q+=" single-box-error"),m&&(q+=" single-box-disabled"),q)},{children:[p?(0,e.jsxs)("label",l({className:"single-box-label"},{children:[p,y&&(0,e.jsx)("span",l({className:"single-box-label-required"},{children:"*"}),void 0),x&&(0,e.jsx)("span",{children:x},void 0)]}),void 0):null,(0,e.jsx)("div",l({className:"single-box-content"},{children:P.map((function(t,o){return(0,e.jsxs)("div",l({className:"single-box-content-item"},{children:[(0,e.jsx)(n.default,{disabled:m,value:t,placeholder:f,size:u,onChange:L(o)},void 0),(0,e.jsx)("span",l({className:"single-box-content-item-svg"},{children:(0,e.jsx)(a(),{onClick:E(o)},void 0)}),void 0)]}),o)}))}),void 0),(0,e.jsx)("div",l({className:"single-box-add",onClick:function(){m||(P.push(""),void 0===o.value&&k(s([],P,!0)),N&&N(P))}},{children:(0,e.jsx)(r(),{},void 0)}),void 0),O&&(0,e.jsx)("p",l({className:"single-box-error"},{children:O}),void 0)]}),void 0)};d.default=c}(),d}()}));
|
package/Slider/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("rc-slider"),require("react")):"function"==typeof define&&define.amd?define(["rc-slider","react"],r):"object"==typeof exports?exports.ParaUI=r(require("rc-slider"),require("react")):e.ParaUI=r(e["rc-slider"],e.react)}(self,(function(e,r){return function(){"use strict";var t={
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("rc-slider"),require("react")):"function"==typeof define&&define.amd?define(["rc-slider","react"],r):"object"==typeof exports?exports.ParaUI=r(require("rc-slider"),require("react")):e.ParaUI=r(e["rc-slider"],e.react)}(self,(function(e,r){return function(){"use strict";var t={7418:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,f=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))t.call(a,l)&&(f[l]=a[l]);if(r){u=r(a);for(var p=0;p<u.length;p++)n.call(a,u[p])&&(f[u[p]]=a[u[p]])}}return f}},
|
|
7
|
+
var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,f=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))t.call(a,l)&&(f[l]=a[l]);if(r){u=r(a);for(var p=0;p<u.length;p++)n.call(a,u[p])&&(f[u[p]]=a[u[p]])}}return f}},5251:function(e,r,t){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
t(
|
|
16
|
+
t(7418);var n=t(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,f={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,t){var n,i={},c=null,l=null;for(n in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(l=r.ref),r)u.call(r,n)&&!f.hasOwnProperty(n)&&(i[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===i[n]&&(i[n]=r[n]);return{$$typeof:o,type:e,key:c,ref:l,props:i,_owner:a.current}}r.jsx=c},5893:function(e,r,t){e.exports=t(5251)},4500:function(r){r.exports=e},9297:function(e){e.exports=r}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,{a:r}),r},o.d=function(e,r){for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){o.r(i),o.d(i,{Slider:function(){return c}});var e=o(5893),r=o(9297),t=o.n(r),n=o(4500),a=o.n(n),u=function(){return u=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},u.apply(this,arguments)},f=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},c=function(r){var o,i=r.range,c=r.step,l=f(r,["range","step"]),p="paraui-slider",s="paraui-slider-tooltip";"object"==typeof i&&(o=i.draggableTrack);var d=t().useState({}),y=d[0],b=d[1],v=function(e,r){b((function(t){var n;return u(u({},t),((n={})[e]=r,n))}))},O=function(e,r){return e||(r?"right":"top")},g=function(e){return"number"==typeof e?e.toString():""},j=function(t){var o=t.tooltipPrefixCls,i=t.info,a=i.value,c=i.index,l=i.dragging,p=f(i,["value","index","dragging"]),s=r.tipFormatter,d=void 0===s?g:s,b=r.tooltipVisible,j=r.tooltipPlacement,m=r.getTooltipPopupContainer,x=void 0===m?function(e){return e}:m,h=r.vertical,P=!!d&&(y[c]||l),_=b||void 0===b&&P;return(0,e.jsx)(n.SliderTooltip,u({prefixCls:o,overlay:d?d(a):"",visible:_,placement:O(j,h),getTooltipContainer:x,destroyTooltipOnHide:!0},{children:(0,e.jsx)(n.Handle,u({},p,{value:a,onMouseEnter:function(){return v(c,!0)},onMouseLeave:function(){return v(c,!1)}}),void 0)}),c)};return i?(0,e.jsx)(n.Range,u({},l,{step:c,pushable:l.pushable,draggableTrack:o,handle:function(e){return j({tooltipPrefixCls:s,info:e})},prefixCls:p}),void 0):(0,e.jsx)(a(),u({},l,{step:c,handle:function(e){return j({tooltipPrefixCls:s,info:e})},prefixCls:p}),void 0)};i.default=c}(),i}()}));
|