@para-ui/core 1.1.15 → 1.1.19
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/Accordion/index.d.ts +9 -0
- package/AutoBox/index.d.ts +26 -0
- package/AutoBox/index.js +16 -1
- package/AutoTips/index.d.ts +16 -0
- package/AutoTips/index.js +16 -1
- package/Breadcrumbs/index.d.ts +30 -0
- package/Breadcrumbs/index.js +16 -1
- package/Breadcrumbs/theme.d.ts +42 -0
- package/Button/index.d.ts +33 -0
- package/Button/index.js +16 -1
- package/Button/theme.d.ts +216 -0
- package/ButtonGroup/SplitButton.d.ts +17 -0
- package/ButtonGroup/index.d.ts +36 -0
- package/ButtonGroup/index.js +16 -1
- package/Checkbox/iconMapping.d.ts +2 -0
- package/Checkbox/index.d.ts +19 -0
- package/Checkbox/index.js +16 -1
- package/CheckboxGroup/index.d.ts +38 -0
- package/CheckboxGroup/index.js +16 -1
- package/ColorPicker/index.d.ts +4 -0
- package/ComboSelect/WithTabsCombo/index.d.ts +10 -0
- package/ComboSelect/WithTabsCombo/interface.d.ts +134 -0
- package/ComboSelect/index.d.ts +10 -0
- package/ComboSelect/index.js +14 -1
- package/ComboSelect/interface.d.ts +96 -0
- package/ComboSelect/styles.d.ts +6 -0
- package/Container/index.d.ts +77 -0
- package/Container/index.js +15 -1
- package/DatePicker/PickerButton.d.ts +3 -0
- package/DatePicker/PickerTag.d.ts +3 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -0
- package/DatePicker/generatePicker/index.d.ts +64 -0
- package/DatePicker/index.d.ts +17 -0
- package/DatePicker/index.js +14 -1
- package/DatePicker/locale/en_US.d.ts +3 -0
- package/DatePicker/locale/zh_CN.d.ts +3 -0
- package/DatePicker/util.d.ts +12 -0
- package/Desktop/index.d.ts +55 -0
- package/Desktop/index.js +14 -1
- package/Drawer/index.d.ts +5 -0
- package/Form/index.d.ts +134 -0
- package/Form/index.js +16 -1
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -0
- package/FormItem/compoments/formFile/index.d.ts +37 -0
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -0
- package/FormItem/compoments/formSelect/index.d.ts +18 -0
- package/FormItem/errorTips.d.ts +10 -0
- package/FormItem/index.d.ts +104 -0
- package/FormItem/index.js +16 -1
- package/FormItem/itemType.d.ts +42 -0
- package/FormItem/validateFunction.d.ts +15 -0
- package/FunctionModal/dialog.d.ts +58 -0
- package/FunctionModal/index.d.ts +8 -0
- package/FunctionModal/index.js +14 -1
- package/FunctionModal/modalContext.d.ts +14 -0
- package/Help/index.d.ts +17 -0
- package/Help/index.js +16 -1
- package/IconList/index.d.ts +10 -0
- package/IconList/index.js +15 -1
- package/InputLang/index.d.ts +41 -0
- package/InputLang/index.js +16 -1
- package/InputNumber/index.d.ts +50 -0
- package/InputNumber/index.js +16 -1
- package/Menu/footerExpansion.d.ts +9 -0
- package/Menu/horizontalMenu.d.ts +9 -0
- package/Menu/horizontalMeunList.d.ts +9 -0
- package/Menu/horizontalMeunRight.d.ts +9 -0
- package/Menu/index.d.ts +9 -0
- package/Menu/index.js +16 -1
- package/Menu/interface.d.ts +242 -0
- package/Menu/logo.d.ts +9 -0
- package/Menu/verticalFooter.d.ts +9 -0
- package/Menu/verticalMenu.d.ts +9 -0
- package/Menu/verticalMenuList.d.ts +14 -0
- package/Message/index.d.ts +36 -0
- package/Message/index.js +15 -1
- package/Modal/Confirm/index.d.ts +60 -0
- package/Modal/index.d.ts +51 -0
- package/Modal/index.js +16 -1
- package/MultiBox/index.d.ts +44 -0
- package/MultiBox/index.js +16 -1
- package/Pagination/index.d.ts +14 -0
- package/Pagination/index.js +16 -1
- package/ParauiProvider/index.d.ts +10 -0
- package/ParauiProvider/index.js +16 -1
- package/ParauiProvider/theme/paraTheme.d.ts +3 -0
- package/ParauiProvider/theme/styleConfig.d.ts +74 -0
- package/PopConfirm/index.d.ts +39 -0
- package/PopConfirm/index.js +16 -1
- package/Popover/index.d.ts +13 -0
- package/Popover/index.js +16 -1
- package/Radio/iconMapping.d.ts +2 -0
- package/Radio/index.d.ts +19 -0
- package/Radio/index.js +16 -1
- package/RadioGroup/index.d.ts +38 -0
- package/RadioGroup/index.js +16 -1
- package/Search/index.d.ts +45 -0
- package/Search/index.js +16 -1
- package/Select/index.d.ts +59 -0
- package/Select/index.js +16 -1
- package/SingleBox/index.d.ts +30 -0
- package/SingleBox/index.js +16 -1
- package/Slider/index.d.ts +3 -0
- package/Split/index.d.ts +7 -0
- package/Split/index.js +15 -1
- package/Stepper/icons.d.ts +5 -0
- package/Stepper/index.d.ts +38 -0
- package/Stepper/index.js +16 -1
- package/Stepper/theme.d.ts +56 -0
- package/Styles/index.d.ts +1 -0
- package/Switch/index.d.ts +19 -0
- package/Switch/index.js +16 -1
- package/Table/index.d.ts +9 -0
- package/Table/index.js +16 -1
- package/Table/interface.d.ts +159 -0
- package/Table/tableBody.d.ts +9 -0
- package/Table/tableBodyInterface.d.ts +54 -0
- package/Table/tableHead.d.ts +9 -0
- package/Table/tableHeadInterface.d.ts +32 -0
- package/Table/tablePagination.d.ts +9 -0
- package/Table/tablePaginationInterFace.d.ts +20 -0
- package/Tabs/index.d.ts +38 -0
- package/Tabs/index.js +16 -1
- package/Tabs/theme.d.ts +53 -0
- package/TextField/index.d.ts +83 -0
- package/TextField/index.js +16 -1
- package/TimePicker/index.d.ts +21 -0
- package/TimePicker/index.js +14 -1
- package/TimePicker/locale/en_US.d.ts +3 -0
- package/TimePicker/locale/zh_CN.d.ts +3 -0
- package/TimePicker/style/index.d.ts +1 -0
- package/Timeline/index.d.ts +19 -0
- package/Timeline/index.js +16 -1
- package/ToolTip/index.d.ts +10 -0
- package/ToolTip/index.js +16 -1
- package/Tree/OperateBar/index.d.ts +4 -0
- package/Tree/Tree.d.ts +148 -0
- package/Tree/index.d.ts +4 -0
- package/Tree/index.js +14 -1
- package/Tree/utils/tools.d.ts +17 -0
- package/Tree/utils/treeUtil.d.ts +15 -0
- package/Upload/ImageUpload/index.d.ts +8 -0
- package/Upload/UploadList/index.d.ts +4 -0
- package/Upload/index.d.ts +11 -0
- package/Upload/index.js +16 -1
- package/Upload/interface.d.ts +122 -0
- package/index.d.ts +46 -0
- package/index.js +14 -1
- package/package.json +13 -5
- package/Styles/fonts/SourceHanSansCN-Normal.css +0 -8
- package/Styles/fonts/SourceHanSansCN-Normal.otf +0 -0
package/IconList/index.js
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@para-ui/icons"),require("@material-ui/core"),require("react-dom"),require("@para-ui/icons/WarningCircle"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("@material-ui/core/styles")):"function"==typeof define&&define.amd?define(["react","@para-ui/icons","@material-ui/core","react-dom","@para-ui/icons/WarningCircle","@para-ui/icons/CheckCircleF","@para-ui/icons/Close","@para-ui/icons/CloseCircleF","@material-ui/core/styles"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("@para-ui/icons"),require("@material-ui/core"),require("react-dom"),require("@para-ui/icons/WarningCircle"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("@material-ui/core/styles")):e.ParaUI=r(e.react,e["@para-ui/icons"],e["@material-ui/core"],e["react-dom"],e["@para-ui/icons/WarningCircle"],e["@para-ui/icons/CheckCircleF"],e["@para-ui/icons/Close"],e["@para-ui/icons/CloseCircleF"],e["@material-ui/core/styles"])}(self,(function(e,r,t,n,o,i,a,c,s){return function(){var u={3425:function(e,r,t){(r=t(9937)(!1)).push([e.id,".para-message-box{position:fixed;top:3%;left:0;z-index:10005;text-align:center;width:100%;pointer-events:none}.para-message-box .msg-item{pointer-events:none}.para-message-box .msg-item .msg-wrapper{display:inline-flex;align-items:center;position:relative;margin:10px auto;padding:10px 50px 10px 20px;border-radius:4px;font-size:14px;box-shadow:4px 4px 6px rgba(70,75,105,0.2),-4px -4px 6px rgba(0,0,0,0.06)}.para-message-box .msg-item .msg-icon{display:inline-flex;margin-right:10px}.para-message-box .msg-item .msg-icon svg{color:currentColor}.para-message-box .msg-item .msg-text{display:table-cell;max-width:60vw;word-wrap:break-word;word-break:normal;font-size:12px}.para-message-box .msg-item .msg-close{position:absolute;right:20px;top:12px;cursor:pointer;pointer-events:auto}.para-message-box .msg-item .msg-close svg{color:currentColor}.para-message-box .msg-info{background-color:#eaeeff;color:#3D66F8}.para-message-box .msg-info .msg-close{color:#3D66F8}.para-message-box .msg-warn{background-color:#fff5ed;color:#FFA150}.para-message-box .msg-warn .msg-close{color:#FFA150}.para-message-box .msg-error{background-color:#fff0ed;color:#F46B53}.para-message-box .msg-error .msg-close{color:#F46B53}.para-message-box .msg-success{background-color:#e7fced;color:#41D658}.para-message-box .msg-success .msg-close{color:#41D658}.para-message-box .para-message-fadeInDown{animation-duration:.5s;animation-name:para-message-fadeInDown}@keyframes para-message-fadeInDown{from{opacity:0;transform:translate(0, -50px)}to{opacity:1;transform:translate(0, 0)}}\n",""]),e.exports=r},9937:function(e){"use strict";e.exports=function(e){var r=[];return r.toString=function(){return this.map((function(r){var t=function(e,r){var t=e[1]||"",n=e[3];if(!n)return t;if(r&&"function"==typeof btoa){var o=(a=n,c=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(s," */")),i=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(i).concat([o]).join("\n")}var a,c,s;return[t].join("\n")}(r,e);return r[2]?"@media ".concat(r[2]," {").concat(t,"}"):t})).join("")},r.i=function(e,t,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var c=0;c<e.length;c++){var s=[].concat(e[c]);n&&o[s[0]]||(t&&(s[2]?s[2]="".concat(t," and ").concat(s[2]):s[2]=t),r.push(s))}},r}},8598:function(e,r,t){var n=t(2387),o=t(3425);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};n(o,i);e.exports=o.locals||{}},2387:function(e,r,t){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var e={};return function(r){if(void 0===e[r]){var t=document.querySelector(r);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[r]=t}return e[r]}}(),a=[];function c(e){for(var r=-1,t=0;t<a.length;t++)if(a[t].identifier===e){r=t;break}return r}function s(e,r){for(var t={},n=[],o=0;o<e.length;o++){var i=e[o],s=r.base?i[0]+r.base:i[0],u=t[s]||0,l="".concat(s," ").concat(u);t[s]=u+1;var p=c(l),d={css:i[1],media:i[2],sourceMap:i[3]};-1!==p?(a[p].references++,a[p].updater(d)):a.push({identifier:l,updater:v(d,r),references:1}),n.push(l)}return n}function u(e){var r=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=t.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){r.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(r);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(r)}return r}var l,p=(l=[],function(e,r){return l[e]=r,l.filter(Boolean).join("\n")});function d(e,r,t,n){var o=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=p(r,o);else{var i=document.createTextNode(o),a=e.childNodes;a[r]&&e.removeChild(a[r]),a.length?e.insertBefore(i,a[r]):e.appendChild(i)}}function f(e,r,t){var n=t.css,o=t.media,i=t.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var m=null,g=0;function v(e,r){var t,n,o;if(r.singleton){var i=g++;t=m||(m=u(r)),n=d.bind(null,t,i,!1),o=d.bind(null,t,i,!0)}else t=u(r),n=f.bind(null,t,r),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;n(e=r)}else o()}}e.exports=function(e,r){(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=o());var t=s(e=e||[],r);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var o=c(t[n]);a[o].references--}for(var i=s(e,r),u=0;u<t.length;u++){var l=c(t[u]);0===a[l].references&&(a[l].updater(),a.splice(l,1))}t=i}}}},551:function(e,r,t){"use strict";t.d(r,{Message:function(){return h}});var n=t(9297),o=t.n(n),i=t(2268),a=t.n(i),c=t(6897),s=t.n(c),u=t(3285),l=t.n(u),p=t(19),d=t.n(p),f=t(20),m=t.n(f),g=(t(8598),{info:o().createElement(s(),null),warn:o().createElement(s(),null),error:o().createElement(m(),null),success:o().createElement(l(),null)}),v="msgbox_"+String(1e5*Math.random()|0+(new Date).getTime());var x=function(e,r,t,n){var i=r.icon,c=r.text,s=r.id,u=function(e){var r=e.icon,t=e.text,n=e.id,o=e.type,i=e.html,a=e.close,c=document.createElement("div");c.className="msg-item",c.id=n,c.innerHTML='<div class="msg-wrapper para-message-fadeInDown msg-'.concat(o,'">\n ').concat(r?'<div class="msg-icon"></div>':"",'\n <div class="msg-text"></div>\n ').concat(a?'<div class="msg-close"></div>':"","\n </div>\n ");var s=c.querySelector(".msg-text");if(!s)return c;i?s.innerHTML=t:s.innerText=t;var u=c.querySelector(".msg-close");return u&&u.addEventListener("click",(function(){var e;document.querySelector("#".concat(n))&&(null==c||null===(e=c.parentNode)||void 0===e||e.removeChild(c),c=null)})),c}({id:s,text:c,icon:i,type:r.type,html:r.html,close:r.close});null==e||e.appendChild(u);var l=document.querySelector("#".concat(s," .msg-icon"));l&&i&&a().render(i,l);var p=document.querySelector("#".concat(s," .msg-close"));p&&a().render(o().createElement(d(),null),p),n&&setTimeout((function(){document.querySelector("#".concat(u.id))&&(null==e||e.removeChild(u))}),t)},y=function(e,r,t,n){var o,i=g[t],a="",c=!1,s=1/0,u=!isNaN(r)&&r>0;"string"==typeof e?a=e:"object"==typeof e&&(a=e.text||"",i=e.icon||g[t],c=e.html||!1,e.maxCount>0&&(s=e.maxCount||1/0)),o="object"==typeof e&&"boolean"==typeof e.close?e.close:!u;var l=document.getElementById(n);l||((l=document.createElement("div")).id=n,l.className="para-message-box",document.body.appendChild(l));var p="msgitem_"+String(1e5*Math.random()|0+(new Date).getTime());x(l,{id:p,text:a,icon:i,type:t,html:c,close:o},r,u),b(l,s)},b=function(e,r){if(e&&(null===(i=e.children)||void 0===i?void 0:i.length)){var t=e.children,n=t.length;if(n>r)for(var o=0;o<n;o++){var i;if(o<r&&t[o])null===(i=t[o].parentNode)||void 0===i||i.removeChild(t[o])}}},h={info:function(e,r){return y(e,void 0===r?2e3:r,"info",v)},warn:function(e,r){return y(e,void 0===r?2e3:r,"warn",v)},error:function(e,r){return y(e,void 0===r?2e3:r,"error",v)},success:function(e,r){return y(e,void 0===r?2e3:r,"success",v)},clear:function(){return function(e){var r=document.getElementById(e);r&&(r.innerHTML="")}(v)}}},1731:function(e){"use strict";e.exports=t},8604:function(e){"use strict";e.exports=s},1609:function(e){"use strict";e.exports=r},3285:function(e){"use strict";e.exports=i},19:function(e){"use strict";e.exports=a},20:function(e){"use strict";e.exports=c},6897:function(e){"use strict";e.exports=o},9297:function(r){"use strict";r.exports=e},2268:function(e){"use strict";e.exports=n}},l={};function p(e){var r=l[e];if(void 0!==r)return r.exports;var t=l[e]={id:e,exports:{}};return u[e](t,t.exports,p),t.exports}p.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(r,{a:r}),r},p.d=function(e,r){for(var t in r)p.o(r,t)&&!p.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},p.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},p.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(){"use strict";p.r(d),p.d(d,{IconList:function(){return s}});var e=p(9297),r=p.n(e),t=p(1609),n=p(1731),o=p(551),i=p(8604);function a(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=[],n=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done)&&(t.push(a.value),!r||t.length!==r);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return t}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var c=(0,i.makeStyles)((function(){return(0,i.createStyles)({"icon-list":{position:"relative","& > div":{display:"inline-block",margin:"5px",cursor:"pointer"},"& > .icon-list-input":{position:"absolute",zIndex:-1,opacity:0}}})})),s=function(i){var s=c(),u=a((0,e.useState)(t||{}),1)[0],l=(0,e.useRef)(),p=function(e){return function(){var r,t;r="import ".concat(e,' from "@para-ui/icons/').concat(e,'";'),(t=l&&l.current).setAttribute("value",r),t.select(),document.execCommand("copy"),o.Message.success({text:"复制成功,请前往粘贴"})}};return r().createElement("div",{className:s["icon-list"]},Object.keys(u).map((function(e,t){return r().createElement(n.Tooltip,{title:e,key:t},r().createElement("div",{onClick:p(e)},u[e]()))})),r().createElement("input",{type:"text",className:"icon-list-input",ref:l}))};d.default=s}(),d}()}));
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@para-ui/icons"),require("@material-ui/core"),require("react-dom"),require("@para-ui/icons/WarningCircle"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("@material-ui/core/styles")):"function"==typeof define&&define.amd?define(["react","@para-ui/icons","@material-ui/core","react-dom","@para-ui/icons/WarningCircle","@para-ui/icons/CheckCircleF","@para-ui/icons/Close","@para-ui/icons/CloseCircleF","@material-ui/core/styles"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("@para-ui/icons"),require("@material-ui/core"),require("react-dom"),require("@para-ui/icons/WarningCircle"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("@material-ui/core/styles")):e.ParaUI=r(e.react,e["@para-ui/icons"],e["@material-ui/core"],e["react-dom"],e["@para-ui/icons/WarningCircle"],e["@para-ui/icons/CheckCircleF"],e["@para-ui/icons/Close"],e["@para-ui/icons/CloseCircleF"],e["@material-ui/core/styles"])}(self,(function(e,r,t,n,o,i,a,s,c){return function(){var u={3425:function(e,r,t){(r=t(9937)(!1)).push([e.id,".para-message-box{position:fixed;top:3%;left:0;z-index:10005;text-align:center;width:100%;pointer-events:none}.para-message-box .msg-item{pointer-events:none}.para-message-box .msg-item .msg-wrapper{display:inline-flex;align-items:center;position:relative;margin:10px auto;padding:10px 50px 10px 20px;border-radius:4px;font-size:14px;box-shadow:4px 4px 6px rgba(70,75,105,0.2),-4px -4px 6px rgba(0,0,0,0.06)}.para-message-box .msg-item .msg-icon{display:inline-flex;margin-right:10px}.para-message-box .msg-item .msg-icon svg{color:currentColor}.para-message-box .msg-item .msg-text{display:table-cell;max-width:60vw;word-wrap:break-word;word-break:normal;font-size:12px}.para-message-box .msg-item .msg-close{position:absolute;right:20px;top:12px;cursor:pointer;pointer-events:auto}.para-message-box .msg-item .msg-close svg{color:currentColor}.para-message-box .msg-info{background-color:#eaeeff;color:#3D66F8}.para-message-box .msg-info .msg-close{color:#3D66F8}.para-message-box .msg-warn{background-color:#fff5ed;color:#FFA150}.para-message-box .msg-warn .msg-close{color:#FFA150}.para-message-box .msg-error{background-color:#fff0ed;color:#F46B53}.para-message-box .msg-error .msg-close{color:#F46B53}.para-message-box .msg-success{background-color:#e7fced;color:#41D658}.para-message-box .msg-success .msg-close{color:#41D658}.para-message-box .para-message-fadeInDown{animation-duration:.5s;animation-name:para-message-fadeInDown}@keyframes para-message-fadeInDown{from{opacity:0;transform:translate(0, -50px)}to{opacity:1;transform:translate(0, 0)}}\n",""]),e.exports=r},9937:function(e){"use strict";e.exports=function(e){var r=[];return r.toString=function(){return this.map((function(r){var t=function(e,r){var t=e[1]||"",n=e[3];if(!n)return t;if(r&&"function"==typeof btoa){var o=(a=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),i=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(i).concat([o]).join("\n")}var a,s,c;return[t].join("\n")}(r,e);return r[2]?"@media ".concat(r[2]," {").concat(t,"}"):t})).join("")},r.i=function(e,t,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);n&&o[c[0]]||(t&&(c[2]?c[2]="".concat(t," and ").concat(c[2]):c[2]=t),r.push(c))}},r}},4126:function(e){"use strict";
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/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,s,c=o(e),u=1;u<arguments.length;u++){for(var l in a=Object(arguments[u]))t.call(a,l)&&(c[l]=a[l]);if(r){s=r(a);for(var p=0;p<s.length;p++)n.call(a,s[p])&&(c[s[p]]=a[s[p]])}}return c}},9524:function(e,r,t){"use strict";
|
|
7
|
+
/** @license React v17.0.2
|
|
8
|
+
* react-jsx-runtime.production.min.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
t(4126);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,s=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,r,t){var n,i={},u=null,l=null;for(n in void 0!==t&&(u=""+t),void 0!==r.key&&(u=""+r.key),void 0!==r.ref&&(l=r.ref),r)s.call(r,n)&&!c.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:u,ref:l,props:i,_owner:a.current}}r.jsx=u,r.jsxs=u},7712:function(e,r,t){"use strict";e.exports=t(9524)},8598:function(e,r,t){var n=t(2387),o=t(3425);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};n(o,i);e.exports=o.locals||{}},2387:function(e,r,t){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var e={};return function(r){if(void 0===e[r]){var t=document.querySelector(r);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[r]=t}return e[r]}}(),a=[];function s(e){for(var r=-1,t=0;t<a.length;t++)if(a[t].identifier===e){r=t;break}return r}function c(e,r){for(var t={},n=[],o=0;o<e.length;o++){var i=e[o],c=r.base?i[0]+r.base:i[0],u=t[c]||0,l="".concat(c," ").concat(u);t[c]=u+1;var p=s(l),f={css:i[1],media:i[2],sourceMap:i[3]};-1!==p?(a[p].references++,a[p].updater(f)):a.push({identifier:l,updater:v(f,r),references:1}),n.push(l)}return n}function u(e){var r=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=t.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){r.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(r);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(r)}return r}var l,p=(l=[],function(e,r){return l[e]=r,l.filter(Boolean).join("\n")});function f(e,r,t,n){var o=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=p(r,o);else{var i=document.createTextNode(o),a=e.childNodes;a[r]&&e.removeChild(a[r]),a.length?e.insertBefore(i,a[r]):e.appendChild(i)}}function d(e,r,t){var n=t.css,o=t.media,i=t.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var m=null,g=0;function v(e,r){var t,n,o;if(r.singleton){var i=g++;t=m||(m=u(r)),n=f.bind(null,t,i,!1),o=f.bind(null,t,i,!0)}else t=u(r),n=d.bind(null,t,r),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;n(e=r)}else o()}}e.exports=function(e,r){(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=o());var t=c(e=e||[],r);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var o=s(t[n]);a[o].references--}for(var i=c(e,r),u=0;u<t.length;u++){var l=s(t[u]);0===a[l].references&&(a[l].updater(),a.splice(l,1))}t=i}}}},6620:function(e,r,t){"use strict";t.d(r,{Message:function(){return y}});var n=t(7712),o=t(2268),i=t.n(o),a=t(6897),s=t.n(a),c=t(3285),u=t.n(c),l=t(19),p=t.n(l),f=t(20),d=t.n(f),m=(t(8598),{info:(0,n.jsx)(s(),{},void 0),warn:(0,n.jsx)(s(),{},void 0),error:(0,n.jsx)(d(),{},void 0),success:(0,n.jsx)(u(),{},void 0)}),g="msgbox_"+String(1e5*Math.random()|0+(new Date).getTime()),v=function(e,r,t,o){var a=r.icon,s=r.text,c=r.id,u=function(e){var r=e.icon,t=e.text,n=e.id,o=e.type,i=e.html,a=e.close,s=document.createElement("div");s.className="msg-item",s.id=n,s.innerHTML='<div class="msg-wrapper para-message-fadeInDown msg-'+o+'">\n '+(r?'<div class="msg-icon"></div>':"")+'\n <div class="msg-text"></div>\n '+(a?'<div class="msg-close"></div>':"")+"\n </div>\n ";var c=s.querySelector(".msg-text");if(!c)return s;i?c.innerHTML=t:c.innerText=t;var u=s.querySelector(".msg-close");return u&&u.addEventListener("click",(function(){var e;document.querySelector("#"+n)&&(null===(e=null==s?void 0:s.parentNode)||void 0===e||e.removeChild(s),s=null)})),s}({id:c,text:s,icon:a,type:r.type,html:r.html,close:r.close});null==e||e.appendChild(u);var l=document.querySelector("#"+c+" .msg-icon");l&&a&&i().render(a,l);var f=document.querySelector("#"+c+" .msg-close");f&&i().render((0,n.jsx)(p(),{},void 0),f),o&&setTimeout((function(){document.querySelector("#"+u.id)&&(null==e||e.removeChild(u))}),t)},x=function(e,r,t,n){var o,i=m[t],a="",s=!1,c=1/0,u=!isNaN(r)&&r>0;"string"==typeof e?a=e:"object"==typeof e&&(a=e.text||"",i=e.icon||m[t],s=e.html||!1,e.maxCount>0&&(c=e.maxCount||1/0)),o="object"==typeof e&&"boolean"==typeof e.close?e.close:!u;var l=document.getElementById(n);l||((l=document.createElement("div")).id=n,l.className="para-message-box",document.body.appendChild(l));var p="msgitem_"+String(1e5*Math.random()|0+(new Date).getTime());v(l,{id:p,text:a,icon:i,type:t,html:s,close:o},r,u),b(l,c)},b=function(e,r){var t,n;if(e&&(null===(t=e.children)||void 0===t?void 0:t.length)){var o=e.children,i=o.length;if(i>r)for(var a=0;a<i;a++)a<r&&o[a]&&(null===(n=o[a].parentNode)||void 0===n||n.removeChild(o[a]))}},y={info:function(e,r){return void 0===r&&(r=2e3),x(e,r,"info",g)},warn:function(e,r){return void 0===r&&(r=2e3),x(e,r,"warn",g)},error:function(e,r){return void 0===r&&(r=2e3),x(e,r,"error",g)},success:function(e,r){return void 0===r&&(r=2e3),x(e,r,"success",g)},clear:function(){return function(e){var r=document.getElementById(e);r&&(r.innerHTML="")}(g)}}},1731:function(e){"use strict";e.exports=t},8604:function(e){"use strict";e.exports=c},1609:function(e){"use strict";e.exports=r},3285:function(e){"use strict";e.exports=i},19:function(e){"use strict";e.exports=a},20:function(e){"use strict";e.exports=s},6897:function(e){"use strict";e.exports=o},9297:function(r){"use strict";r.exports=e},2268:function(e){"use strict";e.exports=n}},l={};function p(e){var r=l[e];if(void 0!==r)return r.exports;var t=l[e]={id:e,exports:{}};return u[e](t,t.exports,p),t.exports}p.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(r,{a:r}),r},p.d=function(e,r){for(var t in r)p.o(r,t)&&!p.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},p.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var f={};return function(){"use strict";p.r(f),p.d(f,{IconList:function(){return c}});var e=p(7712),r=p(9297),t=p(1609),n=p(1731),o=p(6620),i=p(8604),a=function(){return a=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},a.apply(this,arguments)},s=(0,i.makeStyles)((function(){return(0,i.createStyles)({"icon-list":{position:"relative","& > div":{display:"inline-block",margin:"5px",cursor:"pointer"},"& > .icon-list-input":{position:"absolute",zIndex:-1,opacity:0}}})})),c=function(i){var c=s(),u=(0,r.useState)(t||{})[0],l=(0,r.useRef)(),p=function(e){return function(){var r,t;r="import "+e+' from "@para-ui/icons/'+e+'";',(t=l&&l.current).setAttribute("value",r),t.select(),document.execCommand("copy"),o.Message.success({text:"复制成功,请前往粘贴"})}};return(0,e.jsxs)("div",a({className:c["icon-list"]},{children:[Object.keys(u).map((function(r,t){return(0,e.jsx)(n.Tooltip,a({title:r},{children:(0,e.jsx)("div",a({onClick:p(r)},{children:u[r]()}),void 0)}),t)})),(0,e.jsx)("input",{type:"text",className:"icon-list-input",ref:l},void 0)]}),void 0)};f.default=c}(),f}()}));
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/30 16:00
|
|
4
|
+
* @description 国际化输入框
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
interface valueProps {
|
|
8
|
+
[name: string]: string;
|
|
9
|
+
}
|
|
10
|
+
export interface InputLangProps {
|
|
11
|
+
/** 样式class */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** 大小 */
|
|
14
|
+
size?: 'small' | 'medium' | 'large';
|
|
15
|
+
/** 标题 */
|
|
16
|
+
label?: ReactNode;
|
|
17
|
+
/** 提示语 */
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/** 提示语key */
|
|
20
|
+
placeholderKey?: string;
|
|
21
|
+
/** 提示语value */
|
|
22
|
+
placeholderValue?: string;
|
|
23
|
+
/** 是否禁用 */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** 是否错误模式 */
|
|
26
|
+
error?: boolean;
|
|
27
|
+
/** 错误文本 */
|
|
28
|
+
helperText?: ReactNode;
|
|
29
|
+
/** 是否必填 */
|
|
30
|
+
required?: boolean;
|
|
31
|
+
/** 弹出框样式class */
|
|
32
|
+
popoverClassName?: string;
|
|
33
|
+
/** 值 */
|
|
34
|
+
value?: valueProps;
|
|
35
|
+
/** 改变值 */
|
|
36
|
+
onChange?: (val: valueProps) => void;
|
|
37
|
+
/** 搜索提示语 */
|
|
38
|
+
langList?: string[];
|
|
39
|
+
}
|
|
40
|
+
export declare const InputLang: FunctionComponent<InputLangProps>;
|
|
41
|
+
export default InputLang;
|
package/InputLang/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@material-ui/core/styles"),require("@material-ui/core"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/LoadingF"),require("para-lib"),require("@para-ui/icons/Plus"),require("@para-ui/icons/Delete"),require("@para-ui/icons/Application")):"function"==typeof define&&define.amd?define(["react","@material-ui/core/styles","@material-ui/core","@para-ui/icons/PreviewOpen","@para-ui/icons/PreviewClose","@para-ui/icons/LoadingF","para-lib","@para-ui/icons/Plus","@para-ui/icons/Delete","@para-ui/icons/Application"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("@material-ui/core/styles"),require("@material-ui/core"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/LoadingF"),require("para-lib"),require("@para-ui/icons/Plus"),require("@para-ui/icons/Delete"),require("@para-ui/icons/Application")):e.ParaUI=t(e.react,e["@material-ui/core/styles"],e["@material-ui/core"],e["@para-ui/icons/PreviewOpen"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/LoadingF"],e["para-lib"],e["@para-ui/icons/Plus"],e["@para-ui/icons/Delete"],e["@para-ui/icons/Application"])}(self,(function(e,t,r,n,o,i,l,a,c,d){return function(){"use strict";var u={4861:function(e,t,r){var n=r(9297),o=r.n(n),i=r(1731),l=r(8604);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(n=(l=a.next()).done)&&(r.push(l.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(0,r(9177).Z)();var c=(0,l.makeStyles)((function(e){return(0,l.createStyles)({"auto-tips":{maxWidth:"100%",display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > .auto-tips-content":{display:"inline",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})}));t.default=function(e){var t=e.children,r=e.placement,l=void 0===r?"bottom-start":r,d=e.tips,u=void 0===d?"":d,s=e.className,f=void 0===s?"":s,p=(0,n.useRef)(),x=c(),m=a((0,n.useState)(""),2),g=m[0],h=m[1];(0,n.useEffect)((function(){h(u)}),[u]);var v;return o().createElement("div",{ref:function(e){e&&(p.current=e)},className:(v=x["auto-tips"],v+=" paraui-auto-tips",f&&(v+=" "+f),v),onMouseOver:function(){p.current.scrollWidth>p.current.offsetWidth?h(g||p.current.innerText):h("")}},o().createElement(i.Tooltip,{title:g,placement:l},o().createElement("div",{className:"auto-tips-content"},t)))}},6644:function(e,t,r){var n=r(9297),o=r.n(n),i=r(8604),l=r(4923),a=r(5191),c=r.n(a),d=r(6243),u=r.n(d);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(n=(l=a.next()).done)&&(r.push(l.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function p(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var x=(0,r(9177).Z)(),m=(0,i.makeStyles)((function(){return(0,i.createStyles)({"multi-box":{"&.multi-box":{display:"inline-block",width:"100%","& > .multi-box-label":{color:x.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& > .multi-box-content":{lineHeight:"0","& > .multi-box-content-item":{paddingBottom:"15px",display:"flex","& > .multi-box-content-item-input":{width:"calc(100% - 30px)",display:"flex","& > .text-field":{paddingBottom:"0px"},"& > span":{width:"30px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"17px"}},"& > .single-box-content-item-svg":{display:"flex",alignItems:"center",justifyContent:"center",width:"30px",cursor:"pointer"}}},"& > .multi-box-add":{textAlign:"center",border:"1px dashed "+x.textColor.thirdary,color:x.textColor.secondary,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:x.borderRadius,"& > svg":{fontSize:"24px"},"&:hover":{border:"1px dashed "+x.thmemColor.primary,color:x.thmemColor.primary}},"& > .multi-box-error":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"&.multi-box-small":{"& > .multi-box-add":{height:"26px"}},"&.multi-box-medium":{"& > .multi-box-add":{height:"34px"}},"&.multi-box-large":{"& > .multi-box-add":{height:"40px"}},"&.multi-box-error":{"& > .multi-box-error-text":{color:x.stateColor.error+"!important"}},"&.multi-box-disabled":{"& > .multi-box-content":{"& > .multi-box-content-item":{"& > .single-box-content-item-svg":{cursor:"not-allowed","& > svg":{color:x.textColor.thirdary}}}},"& > .multi-box-add":{border:"1px dashed "+x.textColor.thirdary,color:x.textColor.thirdary,cursor:"not-allowed",backgroundColor:x.bgBorderColor.bg3,"& > svg":{color:x.textColor.thirdary},"&:hover":{border:"1px dashed "+x.textColor.thirdary,color:x.textColor.thirdary}}}}}})}));t.default=function(e){var t=m(e),r=e.className,i=e.size,a=void 0===i?"small":i,d=e.placeholderKey,x=void 0===d?"":d,g=e.placeholderValue,h=void 0===g?"":g,v=e.label,b=void 0===v?"":v,y=e.disabled,w=void 0!==y&&y,C=e.required,S=void 0!==C&&C,E=e.error,F=void 0!==E&&E,k=e.helperText,O=void 0===k?"":k,A=e.value,z=e.replaceFields,N=e.onChange,j=e.fetchSuggestionsKey,D=e.fetchSuggestionsValue,q=f((0,n.useState)([]),2),P=q[0],B=q[1],L=f((0,n.useState)({key:"label",value:"value"}),2),T=L[0],I=L[1];(0,n.useEffect)((function(){A&&B(A)}),[A]),(0,n.useEffect)((function(){if(z){var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}({},T,z);I(e)}}),[z]);var R,H=function(e){return function(){w||(P.splice(e,1),B(p(P)),N&&N(P))}},M=function(e,t){return function(r){P[t][e]=r.target.value,B(p(P)),N&&N(P)}},W=function(e){return function(t,r){"key"===e?j&&j(t,r):D&&D(t,r)}},K=function(e,t){return function(r){P[t][e]=r.value,B(p(P)),N&&N(P)}};return o().createElement("div",{className:(R=t["multi-box"],R+=" multi-box",r&&(R+=" "+r),a&&(R+=" multi-box-"+a),F&&(R+=" multi-box-error"),w&&(R+=" multi-box-disabled"),R)},b?o().createElement("label",{className:"multi-box-label"},b,S&&o().createElement("span",null,"(必填)")):null,o().createElement("div",{className:"multi-box-content"},P.map((function(e,t){return o().createElement("div",{className:"multi-box-content-item",key:t},o().createElement("div",{className:"multi-box-content-item-input"},o().createElement(l.default,{size:a,disabled:w,placeholder:x,value:e[T.key||""],onChange:M(T.key||"",t),fetchSuggestions:j?W("key"):void 0,onSelect:K(T.key||"",t)}),o().createElement("span",null,":"),o().createElement(l.default,{size:a,disabled:w,placeholder:h,value:e[T.value||""],onChange:M(T.value||"",t),fetchSuggestions:D?W("value"):void 0,onSelect:K(T.value||"",t)})),o().createElement("span",{className:"single-box-content-item-svg"},o().createElement(u(),{onClick:H(t)})))}))),o().createElement("div",{className:"multi-box-add",onClick:function(){w||(P.push({}),B(p(P)),N&&N(P))}},o().createElement(c(),null)),O&&o().createElement("p",{className:"multi-box-error-text"},O))}},9177:function(e,t){var r={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};t.Z=function(){return r}},4923:function(e,t,r){var n=r(9297),o=r.n(n),i=r(1731),l=r(4861),a=r(8528),c=r.n(a),d=r(6570),u=r.n(d),s=r(1102),f=r.n(s),p=r(8604),x=r(9177),m=r(3475);function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function h(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(n=(l=a.next()).done)&&(r.push(l.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var b=(0,x.Z)(),y=(0,p.makeStyles)((function(){return(0,p.createStyles)({"@keyframes rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"text-field":{fontFamily:b.fontFamily.zh,display:"inline-block",fontSize:b.standardFont.standardFont1.fontSize,width:"100%",paddingBottom:"20px","& fieldset":{border:0},"& .text-field-error-text":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"& .text-field-label":{color:b.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& .text-field-content":{border:"1px solid",borderColor:b.textColor.thirdary,borderRadius:b.borderRadius,position:"relative",display:"table",width:"100%",boxSizing:"border-box","&:hover":{borderColor:b.thmemColor.primary},"& > div":{display:"table-cell",height:"100%",verticalAlign:"top"},"& .text-field-content-before":{color:b.textColor.primary,padding:"0 10px",borderRight:"1px solid "+b.textColor.thirdary,backgroundColor:b.bgBorderColor.bg2,borderBottomLeftRadius:b.borderRadius,borderTopLeftRadius:b.borderRadius,whiteSpace:"nowrap","& svg":{fontSize:"20px",verticalAlign:"top",position:"relative"}},"& .text-field-content-within":{position:"relative",width:"100%","& > *":{display:"table-cell",verticalAlign:"top"},"& svg":{fontSize:"20px",color:b.textColor.secondary,cursor:"pointer"},"& .right-icon":{zIndex:"1",position:"relative",whiteSpace:"nowrap","& > svg":{marginRight:"10px"}},"& .length-limit":{zIndex:"1",position:"relative",paddingRight:"10px",color:b.textColor.secondary},"& .text-field-content-within-input":{width:"100vw","& > div":{width:"100%"},"& input":{height:"100%"},"& input,textarea":{fontSize:b.standardFont.standardFont1.fontSize,color:b.textColor.primary,"&:-ms-clear":{display:"none"},"&:-ms-reveal":{display:"none"}},"& .text-field-label-placeholder":{width:"100%",position:"absolute",left:"0",height:"100%",padding:"0 10px",boxSizing:"border-box",color:b.textColor.thirdary,cursor:"text",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},"& .text-field-content-after":{color:b.textColor.primary,padding:"0 10px",borderLeft:"1px solid",borderColor:b.textColor.thirdary,backgroundColor:b.bgBorderColor.bg2,borderBottomRightRadius:b.borderRadius,borderTopRightRadius:b.borderRadius,whiteSpace:"nowrap","& svg":{fontSize:"20px",verticalAlign:"top",position:"relative"}}},"& .identification-label":{marginLeft:"3px"},"&.text-field-multiline":{"& .text-field-content":{"& .text-field-content-within":{"& > *":{display:"inline-block"},"& .length-limit":{width:"100%",boxSizing:"border-box",textAlign:"right",paddingBottom:"5px"},"& .text-field-content-within-input":{width:"100%","& > div:first-child":{width:"100%","& > div:first-child":{padding:"10px"}},"& .text-field-label-placeholder":{paddingTop:"10px"}}}}},"&.text-field-disabled":{"& .text-field-content":{backgroundColor:b.bgBorderColor.bg3,"&:hover":{borderColor:b.textColor.thirdary},"& .text-field-content-within":{"& .text-field-content-within-input":{"& .text-field-label-placeholder":{cursor:"not-allowed"},"& input":{cursor:"not-allowed",color:b.textColor.thirdary}}}}},"&.text-field-error":{"& .text-field-error-text":{color:b.stateColor.error},"& .text-field-content":{borderColor:b.stateColor.error,"&:hover":{borderColor:b.stateColor.error},"& .text-field-content-before":{borderColor:b.stateColor.error},"& .text-field-content-after":{borderColor:b.stateColor.error}}},"&.text-field-focus":{"& .text-field-content":{borderColor:b.thmemColor.primary,"& .text-field-content-before":{borderColor:b.thmemColor.primary},"& .text-field-content-after":{borderColor:b.thmemColor.primary}}},"&.text-field-small":{"& .text-field-content":{height:"28px","& .text-field-content-before":{lineHeight:"26px","& svg":{top:"3px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"26px","& > div":{height:"100%"}}},"& input":{padding:"5px 10px"},"& .text-field-label-placeholder":{lineHeight:"26px"},"& .right-icon":{paddingTop:"3px"},"& .length-limit":{lineHeight:"26px"}},"& .text-field-content-after":{lineHeight:"26px","& svg":{top:"3px"}}}},"&.text-field-medium":{"& .text-field-content":{height:"34px","& .text-field-content-before":{lineHeight:"32px","& svg":{top:"6px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"32px","& > div":{height:"100%"}}},"& input":{padding:"8px 10px"},"& .text-field-label-placeholder":{lineHeight:"32px"},"& .right-icon":{paddingTop:"7px"},"& .length-limit":{lineHeight:"32px","& svg":{top:"6px"}}},"& .text-field-content-after":{lineHeight:"32px","& svg":{top:"6px"}}}},"&.text-field-large":{"& .text-field-content":{height:"40px","& .text-field-content-before":{lineHeight:"38px","& svg":{top:"9px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"38px","& > div":{height:"100%"}}},"& input":{padding:"11px 10px"},"& .text-field-label-placeholder":{lineHeight:"38px"},"& .right-icon":{paddingTop:"10px"},"& .length-limit":{lineHeight:"38px"}},"& .text-field-content-after":{lineHeight:"38px","& svg":{top:"9px"}}}}},"text-field-select":{"& > div":{maxWidth:"none",padding:"0",backgroundColor:b.textColor.white,boxShadow:b.boxShadow,borderRadius:b.borderRadius,"& > span":{color:b.textColor.white},"& .text-field-select-content":{maxHeight:"300px",overflow:"auto","& > .text-field-select-content-item":{display:"flex",padding:"7px 10px",cursor:"pointer",lineHeight:"16px",color:b.textColor.secondary,"&:hover":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary},"&.text-field-select-content-item-keydown":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary}},"&.text-field-select-content-loading":{height:"100px",position:"relative",overflow:"hidden","& > .loading-box":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",backgroundColor:"white",display:"flex",justifyContent:"center",alignItems:"center","& > svg":{transition:"all .3s ease-in-out",animation:"$rotate 1s infinite linear",fontSzie:"20px"}}}}}}})}));t.default=function(e){var t=e.className,r=e.size,a=void 0===r?"small":r,d=e.labelMode,s=void 0===d?"outside":d,p=e.placeholder,x=void 0===p?"":p,b=e.label,w=void 0===b?"":b,C=e.disabled,S=void 0!==C&&C,E=e.multiline,F=void 0!==E&&E,k=e.required,O=void 0!==k&&k,A=e.showLabelSign,z=void 0===A||A,N=e.labelSign,j=e.rows,D=void 0===j?2:j,q=e.error,P=void 0!==q&&q,B=e.helperText,L=void 0===B?"":B,T=e.addonBefore,I=void 0===T?"":T,R=e.addonAfter,H=void 0===R?"":R,M=e.value,W=e.controlled,K=void 0!==W&&W,U=e.autoFocus,Z=void 0!==U&&U,V=e.type,_=void 0===V?"text":V,J=e.onClickIcon,Y=e.rightIcon,G=e.showRightIcon,$=void 0===G||G,Q=e.limitLength,X=e.fetchSuggestions,ee=e.selectPopoverClass,te=e.renderSelectItem,re=e.showSelectName,ne=void 0===re?"value":re,oe=e.onBlur,ie=e.onFocus,le=e.onChange,ae=e.onKeydown,ce=e.onKeyUp,de=e.onEnter,ue=e.onClickAddonBefore,se=e.onClickAddonAfter,fe=e.onSelect,pe=h(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","showLabelSign","labelSign","rows","error","helperText","addonBefore","addonAfter","value","controlled","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),xe=y(e),me=v((0,n.useState)("text-field-select-content-"+(0,m.UUID)()),1)[0],ge=v((0,n.useState)(!0),2),he=ge[0],ve=ge[1],be=v((0,n.useState)(),2),ye=be[0],we=be[1],Ce=v((0,n.useState)(!1),2),Se=Ce[0],Ee=Ce[1],Fe=v((0,n.useState)(0),2),ke=Fe[0],Oe=Fe[1],Ae=v((0,n.useState)("text"),2),ze=Ae[0],Ne=Ae[1],je=v((0,n.useState)(!1),2),De=je[0],qe=je[1],Pe=v((0,n.useState)(!1),2),Be=Pe[0],Le=Pe[1],Te=v((0,n.useState)([]),2),Ie=Te[0],Re=Te[1],He=(v((0,n.useState)({}),1)[0],(0,n.useRef)(null)),Me=(0,n.useRef)(null),We=(0,n.useRef)(null);(0,n.useEffect)((function(){He&&He.current&&Oe(He.current.offsetWidth)}),[]),(0,n.useEffect)((function(){_!==ze&&Ne(_)}),[_]),(0,n.useEffect)((function(){we(M)}),[M]),(0,n.useEffect)((function(){ve(""===ye||void 0===ye)}),[ye]),(0,n.useEffect)((function(){X&&qe(Se)}),[Se,X]),(0,n.useEffect)((function(){return De?window.addEventListener("keydown",_e):window.removeEventListener("keydown",_e),function(){window.removeEventListener("keydown",_e)}}),[De]);var Ke,Ue=function(){S||(ve(!1),(Me&&Me.current&&Me.current.querySelector(F?"textarea":"input")).focus())},Ze=function(e){var t=e.selectDom,r=e.keyCode,n=e.currentDom,o="nextSibling",i=".text-field-select-content-item";38===r&&(o="previousSibling",i=".text-field-select-content-item:last-child"),n?(n=n[o])||(n=t.querySelector(i)):n=t.querySelector(".text-field-select-content-item"),n&&(n.classList.add("text-field-select-content-item-keydown"),Ve(n,t))},Ve=function(e,t){var r=t.clientHeight,n=e.offsetTop+e.clientHeight-r;t.scrollTop=n>0?n:0},_e=function(e){var t=document.querySelector("."+me),r=null,n=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&n){var o=n.dataset.val;rt(JSON.parse(o))(e),(Me&&Me.current&&Me.current.querySelector(F?"textarea":"input")).blur()}n&&(r=n,n.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Ze({selectDom:t,keyCode:e.keyCode,currentDom:r}),38===e.keyCode&&Ze({selectDom:t,keyCode:e.keyCode,currentDom:r})},Je=function(e){Ee(!1),""===e.target.value&&ve(!0),oe&&oe(e)},Ye=function(e){Le(!0),X&&X(e,(function(e){Re(e||[]),Le(!1)}))},Ge=function(e){Ee(!0),ie&&ie(e),Ye(e.target.value)},$e=function(e){var t=e.target.value;Q&&void 0!==t&&""!==t&&t.toString().length>Q||(K||we(t),le&&le(e),Ye(e.target.value))},Qe=function(e){13===e.keyCode&&de&&de(e),ae&&ae(e)},Xe=function(e){ce&&ce(e)},et=function(e){"password"===_&&("text"===ze&&Ne("password"),"password"===ze&&Ne("text")),J&&J(e)},tt=function(){qe(!1)},rt=function(e){return function(t){fe&&fe(e)}},nt=(0,n.useMemo)((function(){return o().createElement(o().Fragment,null,void 0!==Q&&o().createElement("span",{className:"length-limit"},(ye?ye.toString().length:0)+"/"+Q))}),[Q,ye]),ot=(0,n.useMemo)((function(){return o().createElement(o().Fragment,null,$&&o().createElement("span",{className:"right-icon",onClick:et},Y||("password"===_?"password"===ze?o().createElement(c(),null):o().createElement(u(),null):null)))}),[$,Y,_,ze]),it=(0,n.useMemo)((function(){return o().createElement("div",{className:"text-field-content-within",ref:We},o().createElement("div",{className:"text-field-content-within-input"},o().createElement(i.TextField,g({size:"small",variant:"outlined",autoFocus:Z,ref:Me,type:ze,value:ye||"",disabled:S,multiline:F,rows:D,onBlur:Je,onFocus:Ge,onChange:$e,onKeyDown:Qe,onKeyUp:Xe},pe)),he&&o().createElement("span",{className:"text-field-label-placeholder",onClick:Ue},"outside"===s?x:o().createElement(o().Fragment,null,w||x,z&&o().createElement("span",{className:"identification-label"},N||o().createElement(o().Fragment,null,O?"(必填)":""))))),nt,ot)}),[he,Z,ze,ye,nt,ot,s,x,w,S,F,D,pe,le,X]),lt=(0,n.useMemo)((function(){var e;return o().createElement("div",{className:(e="text-field-select-content",Be&&(e+=" text-field-select-content-loading"),me&&(e+=" "+me),e),style:{width:(We&&We.current?We.current.offsetWidth:0)+"px"}},Ie&&Ie.map((function(e,t){return o().createElement("div",{className:"text-field-select-content-item",key:t,onMouseDown:rt(e),"data-val":JSON.stringify(e)},te?te(e):o().createElement(l.default,null,e[ne]))})),Be&&o().createElement("div",{className:"loading-box"},o().createElement(f(),null)))}),[We,De,Ie,te,ne,fe,Be,me]),at=(0,n.useMemo)((function(){return o().createElement(i.Tooltip,{open:De,title:lt,onClose:tt,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e=xe["text-field-select"],ee&&(e+=" "+ee),e)}},it);var e}),[he,Z,ze,ye,nt,ot,s,x,w,S,F,D,pe,le,X,fe,We,De,ee]),ct=(0,n.useMemo)((function(){var e=Boolean(z&&(N||O));if("outside"===s&&(w||e))return o().createElement("label",{className:"text-field-label"},w,z&&o().createElement("span",{className:"identification-label"},N||o().createElement(o().Fragment,null,O?"(必填)":"")))}),[s,w,z,N,O]);return o().createElement("div",{className:(Ke=xe["text-field"],Ke+=" text-field",a&&!F&&(Ke+=" text-field-"+a),t&&(Ke+=" "+t),P&&(Ke+=" text-field-error"),Se&&(Ke+=" text-field-focus"),S&&(Ke+=" text-field-disabled"),F&&(Ke+=" text-field-multiline"),Ke)},ct,o().createElement("div",{className:"text-field-content"},I&&o().createElement("div",{className:"text-field-content-before",ref:He,onClick:function(e){ue&&ue(e)}},I),X?at:it,H&&o().createElement("div",{className:"text-field-content-after",onClick:function(e){se&&se(e)}},H)),L&&o().createElement("p",{className:"text-field-error-text",style:{marginLeft:ke+"px"}},L))}},1731:function(e){e.exports=r},8604:function(e){e.exports=t},770:function(e){e.exports=d},6243:function(e){e.exports=c},1102:function(e){e.exports=i},5191:function(e){e.exports=a},6570:function(e){e.exports=o},8528:function(e){e.exports=n},3475:function(e){e.exports=l},9297:function(t){t.exports=e}},s={};function f(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return u[e](r,r.exports,f),r.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 r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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,{InputLang:function(){return v}});var e=f(9297),t=f.n(e),r=f(8604),n=f(4923),o=f(6644),i=f(9177),l=f(770),a=f.n(l),c=f(1731),d=f(3475);function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){u(e,t,r[t])}))}return e}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(n=(l=a.next()).done)&&(r.push(l.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function m(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var g=(0,i.Z)(),h=(0,r.makeStyles)((function(){return(0,r.createStyles)({"input-lang":{fontFamily:g.fontFamily.zh,display:"inline-block",fontSize:g.standardFont.standardFont1.fontSize,position:"relative","& .text-field-content-after":{cursor:"pointer"}},"input-lang-popover":{"& > .input-lang-popover-box":{marginTop:"8px","& > .input-lang-list":{padding:"10px",width:"300px",lineHeight:"0"}}}})})),v=function(r){var i=r.className,l=void 0===i?"":i,u=r.label,f=void 0===u?"":u,p=r.size,g=void 0===p?"small":p,v=r.placeholder,b=void 0===v?"":v,y=r.placeholderKey,w=void 0===y?"":y,C=r.placeholderValue,S=void 0===C?"":C,E=r.error,F=void 0!==E&&E,k=r.helperText,O=void 0===k?"":k,A=r.required,z=void 0!==A&&A,N=r.popoverClassName,j=r.value,D=r.onChange,q=r.langList,P=void 0===q?["zh","en"]:q,B=r.disabled,L=void 0!==B&&B,T=h(r),I=x((0,e.useState)(!1),2),R=I[0],H=I[1],M=x((0,e.useState)(null),2),W=M[0],K=M[1],U=x((0,e.useState)("input-lang-"+(0,d.UUID)()),1)[0],Z=x((0,e.useState)(""),2),V=Z[0],_=Z[1],J=x((0,e.useState)({}),2),Y=J[0],G=J[1],$=x((0,e.useState)([]),2),Q=$[0],X=$[1];(0,e.useEffect)((function(){var e=(0,d.GetLanguage)()||"zh";_(e)}),[]),(0,e.useEffect)((function(){if(j){var e=s({},j);void 0===e[V]&&(e[V]="");for(var t=Object.keys(e),r=[],n=0,o=t.length;n<o;n++){var i=t[n],l=e[i];i!==V&&r.push({label:i,value:l})}X(r),G(e)}}),[j,V]);var ee,te=function(e){X(m(e))},re=function(e,t){for(var r=[],n=(0,d.ArrayToObject)("label",Q),o=0,i=P.length;o<i;o++){var l=P[o];n[l]||l===V||r.push({label:l,value:l})}t(r)},ne=function(){K(null),H(!1);var e={};e[V]=Y[V];for(var t=0,r=Q.length;t<r;t++){var n=Q[t];n.label&&(e[n.label]=n.value||"")}G(s({},e)),D&&D(s({},e))},oe=(0,e.useMemo)((function(){return t().createElement("div",null,V)}),[V]),ie=(0,e.useMemo)((function(){return t().createElement("div",{className:"lang-list-icon"},t().createElement(a(),null))}),[]),le=(0,e.useMemo)((function(){return t().createElement(c.Popover,{open:R,anchorEl:W,onClose:ne,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:(e=T["input-lang-popover"],N&&(e+=" "+N),e),classes:{paper:"input-lang-popover-box"}},t().createElement("div",{className:"input-lang-list"},t().createElement(o.default,{size:g,disabled:L,value:Q,onChange:te,fetchSuggestionsKey:re,placeholderKey:w,placeholderValue:S})));var e}),[R,N,Q,w,S,V,P,g,L]);return t().createElement("div",{className:(ee=T["input-lang"],ee+=" input-lang",ee+=" "+U,g&&(ee+=" input-lang-"+g),l&&(ee+=" "+l),ee)},t().createElement(n.default,{size:g,error:F,disabled:L,required:z,helperText:O,label:f,placeholder:b,value:Y[V],addonAfter:ie,addonBefore:oe,onClickAddonAfter:function(){var e=document.querySelector("."+U+" .text-field-content-after");K(e),H(!0)},onChange:function(e){Y[V]=e.target.value;var t=s({},Y);G(t),D&&D(t)}}),le)};p.default=v}(),p}()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@material-ui/core/styles"),require("@material-ui/core"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/LoadingF"),require("para-lib"),require("@para-ui/icons/Plus"),require("@para-ui/icons/Delete"),require("@para-ui/icons/Application")):"function"==typeof define&&define.amd?define(["react","@material-ui/core/styles","@material-ui/core","@para-ui/icons/PreviewOpen","@para-ui/icons/PreviewClose","@para-ui/icons/LoadingF","para-lib","@para-ui/icons/Plus","@para-ui/icons/Delete","@para-ui/icons/Application"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("@material-ui/core/styles"),require("@material-ui/core"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/LoadingF"),require("para-lib"),require("@para-ui/icons/Plus"),require("@para-ui/icons/Delete"),require("@para-ui/icons/Application")):e.ParaUI=t(e.react,e["@material-ui/core/styles"],e["@material-ui/core"],e["@para-ui/icons/PreviewOpen"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/LoadingF"],e["para-lib"],e["@para-ui/icons/Plus"],e["@para-ui/icons/Delete"],e["@para-ui/icons/Application"])}(self,(function(e,t,o,i,r,n,l,a,d,s){return function(){"use strict";var c={4126:function(e){
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/
|
|
7
|
+
var t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=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={},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 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,n){for(var l,a,d=r(e),s=1;s<arguments.length;s++){for(var c in l=Object(arguments[s]))o.call(l,c)&&(d[c]=l[c]);if(t){a=t(l);for(var u=0;u<a.length;u++)i.call(l,a[u])&&(d[a[u]]=l[a[u]])}}return d}},9524:function(e,t,o){
|
|
8
|
+
/** @license React v17.0.2
|
|
9
|
+
* react-jsx-runtime.production.min.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
o(4126);var i=o(9297),r=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;r=n("react.element"),t.Fragment=n("react.fragment")}var l=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,d={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,o){var i,n={},s=null,c=null;for(i in void 0!==o&&(s=""+o),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(c=t.ref),t)a.call(t,i)&&!d.hasOwnProperty(i)&&(n[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===n[i]&&(n[i]=t[i]);return{$$typeof:r,type:e,key:s,ref:c,props:n,_owner:l.current}}t.jsx=s,t.jsxs=s},7712:function(e,t,o){e.exports=o(9524)},115:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(8604),a=o(853),d=function(){return d=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)},s=((0,a.Z)(),(0,l.makeStyles)((function(e){return(0,l.createStyles)({"auto-tips":{maxWidth:"100%",display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > .auto-tips-content":{display:"inline",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})})));t.default=function(e){var t=e.children,o=e.placement,l=void 0===o?"bottom-start":o,a=e.tips,c=void 0===a?"":a,u=e.className,p=void 0===u?"":u,f=(0,r.useRef)(),x=s(),h=(0,r.useState)(""),v=h[0],g=h[1];(0,r.useEffect)((function(){g(c)}),[c]);var m;return(0,i.jsx)("div",d({ref:function(e){e&&(f.current=e)},className:(m=x["auto-tips"],m+=" paraui-auto-tips",p&&(m+=" "+p),m),onMouseOver:function(){f.current.scrollWidth>f.current.offsetWidth?g(v||f.current.innerText):g("")}},{children:(0,i.jsx)(n.Tooltip,d({title:v,placement:l},{children:(0,i.jsx)("div",d({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},1418:function(e,t,o){var i=o(7712),r=o(9297),n=o(8604),l=o(4661),a=o(5191),d=o.n(a),s=o(6243),c=o.n(s),u=o(853),p=function(){return p=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)},f=function(e,t,o){if(o||2===arguments.length)for(var i,r=0,n=t.length;r<n;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},x=(0,u.Z)(),h=(0,n.makeStyles)((function(){return(0,n.createStyles)({"multi-box":{"&.multi-box":{display:"inline-block",width:"100%","& > .multi-box-label":{color:x.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& > .multi-box-content":{lineHeight:"0","& > .multi-box-content-item":{paddingBottom:"15px",display:"flex","& > .multi-box-content-item-input":{width:"calc(100% - 30px)",display:"flex","& > .text-field":{paddingBottom:"0px"},"& > span":{width:"30px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"17px"}},"& > .single-box-content-item-svg":{display:"flex",alignItems:"center",justifyContent:"center",width:"30px",cursor:"pointer"}}},"& > .multi-box-add":{textAlign:"center",border:"1px dashed "+x.textColor.thirdary,color:x.textColor.secondary,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:x.borderRadius,"& > svg":{fontSize:"24px"},"&:hover":{border:"1px dashed "+x.thmemColor.primary,color:x.thmemColor.primary}},"& > .multi-box-error":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"&.multi-box-small":{"& > .multi-box-add":{height:"26px"}},"&.multi-box-medium":{"& > .multi-box-add":{height:"34px"}},"&.multi-box-large":{"& > .multi-box-add":{height:"40px"}},"&.multi-box-error":{"& > .multi-box-error-text":{color:x.stateColor.error+"!important"}},"&.multi-box-disabled":{"& > .multi-box-content":{"& > .multi-box-content-item":{"& > .single-box-content-item-svg":{cursor:"not-allowed","& > svg":{color:x.textColor.thirdary}}}},"& > .multi-box-add":{border:"1px dashed "+x.textColor.thirdary,color:x.textColor.thirdary,cursor:"not-allowed",backgroundColor:x.bgBorderColor.bg3,"& > svg":{color:x.textColor.thirdary},"&:hover":{border:"1px dashed "+x.textColor.thirdary,color:x.textColor.thirdary}}}}}})}));t.default=function(e){var t=h(e),o=e.className,n=e.size,a=void 0===n?"small":n,s=e.placeholderKey,u=void 0===s?"":s,x=e.placeholderValue,v=void 0===x?"":x,g=e.label,m=void 0===g?"":g,b=e.disabled,y=void 0!==b&&b,w=e.required,C=void 0!==w&&w,S=e.error,j=void 0!==S&&S,F=e.helperText,O=void 0===F?"":F,k=e.value,N=e.replaceFields,z=e.onChange,E=e.fetchSuggestionsKey,P=e.fetchSuggestionsValue,q=(0,r.useState)([]),D=q[0],B=q[1],L=(0,r.useState)({key:"label",value:"value"}),R=L[0],A=L[1];(0,r.useEffect)((function(){k&&B(k)}),[k]),(0,r.useEffect)((function(){if(N){var e=p(p({},R),N);A(e)}}),[N]);var T,I=function(e){return function(){y||(D.splice(e,1),B(f([],D,!0)),z&&z(D))}},H=function(e,t){return function(o){D[t][e]=o.target.value,B(f([],D,!0)),z&&z(D)}},_=function(e){return function(t,o){"key"===e?E&&E(t,o):P&&P(t,o)}},M=function(e,t){return function(o){D[t][e]=o.value,B(f([],D,!0)),z&&z(D)}};return(0,i.jsxs)("div",p({className:(T=t["multi-box"],T+=" multi-box",o&&(T+=" "+o),a&&(T+=" multi-box-"+a),j&&(T+=" multi-box-error"),y&&(T+=" multi-box-disabled"),T)},{children:[m?(0,i.jsxs)("label",p({className:"multi-box-label"},{children:[m,C&&(0,i.jsx)("span",{children:"(必填)"},void 0)]}),void 0):null,(0,i.jsx)("div",p({className:"multi-box-content"},{children:D.map((function(e,t){return(0,i.jsxs)("div",p({className:"multi-box-content-item"},{children:[(0,i.jsxs)("div",p({className:"multi-box-content-item-input"},{children:[(0,i.jsx)(l.default,{size:a,disabled:y,placeholder:u,value:e[R.key||""],onChange:H(R.key||"",t),fetchSuggestions:E?_("key"):void 0,onSelect:M(R.key||"",t)},void 0),(0,i.jsx)("span",{children:":"},void 0),(0,i.jsx)(l.default,{size:a,disabled:y,placeholder:v,value:e[R.value||""],onChange:H(R.value||"",t),fetchSuggestions:P?_("value"):void 0,onSelect:M(R.value||"",t)},void 0)]}),void 0),(0,i.jsx)("span",p({className:"single-box-content-item-svg"},{children:(0,i.jsx)(c(),{onClick:I(t)},void 0)}),void 0)]}),t)}))}),void 0),(0,i.jsx)("div",p({className:"multi-box-add",onClick:function(){y||(D.push({}),B(f([],D,!0)),z&&z(D))}},{children:(0,i.jsx)(d(),{},void 0)}),void 0),O&&(0,i.jsx)("p",p({className:"multi-box-error-text"},{children:O}),void 0)]}),void 0)}},853:function(e,t){var o={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};t.Z=function(){return o}},4661:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(115),a=o(8528),d=o.n(a),s=o(6570),c=o.n(s),u=o(1102),p=o.n(u),f=o(8604),x=o(853),h=o(3475),v=function(){return v=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},v.apply(this,arguments)},g=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},m=(0,x.Z)(),b=(0,f.makeStyles)((function(){return(0,f.createStyles)({"@keyframes rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"text-field":{fontFamily:m.fontFamily.zh,display:"inline-block",fontSize:m.standardFont.standardFont1.fontSize,width:"100%",paddingBottom:"20px","& fieldset":{border:0},"& .text-field-error-text":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"& .text-field-label":{color:m.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& .text-field-content":{border:"1px solid",borderColor:m.textColor.thirdary,borderRadius:m.borderRadius,position:"relative",display:"table",width:"100%",boxSizing:"border-box","&:hover":{borderColor:m.thmemColor.primary},"& > div":{display:"table-cell",height:"100%",verticalAlign:"top"},"& .text-field-content-before":{color:m.textColor.primary,padding:"0 10px",borderRight:"1px solid "+m.textColor.thirdary,backgroundColor:m.bgBorderColor.bg2,borderBottomLeftRadius:m.borderRadius,borderTopLeftRadius:m.borderRadius,whiteSpace:"nowrap","& svg":{fontSize:"20px",verticalAlign:"top",position:"relative"}},"& .text-field-content-within":{position:"relative",width:"100%","& > *":{display:"table-cell",verticalAlign:"top"},"& svg":{fontSize:"20px",color:m.textColor.secondary,cursor:"pointer"},"& .right-icon":{zIndex:"1",position:"relative",whiteSpace:"nowrap","& > svg":{marginRight:"10px"}},"& .length-limit":{zIndex:"1",position:"relative",paddingRight:"10px",color:m.textColor.secondary},"& .text-field-content-within-input":{width:"100vw","& > div":{width:"100%"},"& input":{height:"100%"},"& input,textarea":{fontSize:m.standardFont.standardFont1.fontSize,color:m.textColor.primary,"&:-ms-clear":{display:"none"},"&:-ms-reveal":{display:"none"}},"& .text-field-label-placeholder":{width:"100%",position:"absolute",left:"0",height:"100%",padding:"0 10px",boxSizing:"border-box",color:m.textColor.thirdary,cursor:"text",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},"& .text-field-content-after":{color:m.textColor.primary,padding:"0 10px",borderLeft:"1px solid",borderColor:m.textColor.thirdary,backgroundColor:m.bgBorderColor.bg2,borderBottomRightRadius:m.borderRadius,borderTopRightRadius:m.borderRadius,whiteSpace:"nowrap","& svg":{fontSize:"20px",verticalAlign:"top",position:"relative"}}},"& .identification-label":{marginLeft:"3px"},"&.text-field-multiline":{"& .text-field-content":{"& .text-field-content-within":{"& > *":{display:"inline-block"},"& .length-limit":{width:"100%",boxSizing:"border-box",textAlign:"right",paddingBottom:"5px"},"& .text-field-content-within-input":{width:"100%","& > div:first-child":{width:"100%","& > div:first-child":{padding:"10px"}},"& .text-field-label-placeholder":{paddingTop:"10px"}}}}},"&.text-field-disabled":{"& .text-field-content":{backgroundColor:m.bgBorderColor.bg3,"&:hover":{borderColor:m.textColor.thirdary},"& .text-field-content-within":{"& .text-field-content-within-input":{"& .text-field-label-placeholder":{cursor:"not-allowed"},"& input":{cursor:"not-allowed",color:m.textColor.thirdary}}}}},"&.text-field-error":{"& .text-field-error-text":{color:m.stateColor.error},"& .text-field-content":{borderColor:m.stateColor.error,"&:hover":{borderColor:m.stateColor.error},"& .text-field-content-before":{borderColor:m.stateColor.error},"& .text-field-content-after":{borderColor:m.stateColor.error}}},"&.text-field-focus":{"& .text-field-content":{borderColor:m.thmemColor.primary,"& .text-field-content-before":{borderColor:m.thmemColor.primary},"& .text-field-content-after":{borderColor:m.thmemColor.primary}}},"&.text-field-small":{"& .text-field-content":{height:"28px","& .text-field-content-before":{lineHeight:"26px","& svg":{top:"3px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"26px","& > div":{height:"100%"}}},"& input":{padding:"5px 10px"},"& .text-field-label-placeholder":{lineHeight:"26px"},"& .right-icon":{paddingTop:"3px"},"& .length-limit":{lineHeight:"26px"}},"& .text-field-content-after":{lineHeight:"26px","& svg":{top:"3px"}}}},"&.text-field-medium":{"& .text-field-content":{height:"34px","& .text-field-content-before":{lineHeight:"32px","& svg":{top:"6px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"32px","& > div":{height:"100%"}}},"& input":{padding:"8px 10px"},"& .text-field-label-placeholder":{lineHeight:"32px"},"& .right-icon":{paddingTop:"7px"},"& .length-limit":{lineHeight:"32px","& svg":{top:"6px"}}},"& .text-field-content-after":{lineHeight:"32px","& svg":{top:"6px"}}}},"&.text-field-large":{"& .text-field-content":{height:"40px","& .text-field-content-before":{lineHeight:"38px","& svg":{top:"9px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"38px","& > div":{height:"100%"}}},"& input":{padding:"11px 10px"},"& .text-field-label-placeholder":{lineHeight:"38px"},"& .right-icon":{paddingTop:"10px"},"& .length-limit":{lineHeight:"38px"}},"& .text-field-content-after":{lineHeight:"38px","& svg":{top:"9px"}}}}},"text-field-select":{"& > div":{maxWidth:"none",padding:"0",backgroundColor:m.textColor.white,boxShadow:m.boxShadow,borderRadius:m.borderRadius,"& > span":{color:m.textColor.white},"& .text-field-select-content":{maxHeight:"300px",overflow:"auto","& > .text-field-select-content-item":{display:"flex",padding:"7px 10px",cursor:"pointer",lineHeight:"16px",color:m.textColor.secondary,"&:hover":{backgroundColor:m.bgBorderColor.bg2,color:m.thmemColor.primary},"&.text-field-select-content-item-keydown":{backgroundColor:m.bgBorderColor.bg2,color:m.thmemColor.primary}},"&.text-field-select-content-loading":{height:"100px",position:"relative",overflow:"hidden","& > .loading-box":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",backgroundColor:"white",display:"flex",justifyContent:"center",alignItems:"center","& > svg":{transition:"all .3s ease-in-out",animation:"$rotate 1s infinite linear",fontSzie:"20px"}}}}}}})}));t.default=function(e){var t=e.className,o=e.size,a=void 0===o?"small":o,s=e.labelMode,u=void 0===s?"outside":s,f=e.placeholder,x=void 0===f?"":f,m=e.label,y=void 0===m?"":m,w=e.disabled,C=void 0!==w&&w,S=e.multiline,j=void 0!==S&&S,F=e.required,O=void 0!==F&&F,k=e.showLabelSign,N=void 0===k||k,z=e.labelSign,E=e.rows,P=void 0===E?2:E,q=e.error,D=void 0!==q&&q,B=e.helperText,L=void 0===B?"":B,R=e.addonBefore,A=void 0===R?"":R,T=e.addonAfter,I=void 0===T?"":T,H=e.value,_=e.controlled,M=void 0!==_&&_,W=e.autoFocus,K=void 0!==W&&W,U=e.type,Z=void 0===U?"text":U,V=e.onClickIcon,Y=e.rightIcon,$=e.showRightIcon,J=void 0===$||$,G=e.limitLength,Q=e.fetchSuggestions,X=e.selectPopoverClass,ee=e.renderSelectItem,te=e.showSelectName,oe=void 0===te?"value":te,ie=e.onBlur,re=e.onFocus,ne=e.onChange,le=e.onKeydown,ae=e.onKeyUp,de=e.onEnter,se=e.onClickAddonBefore,ce=e.onClickAddonAfter,ue=e.onSelect,pe=g(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","showLabelSign","labelSign","rows","error","helperText","addonBefore","addonAfter","value","controlled","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),fe=b(e),xe=(0,r.useState)("text-field-select-content-"+(0,h.UUID)())[0],he=(0,r.useState)(!0),ve=he[0],ge=he[1],me=(0,r.useState)(),be=me[0],ye=me[1],we=(0,r.useState)(!1),Ce=we[0],Se=we[1],je=(0,r.useState)(0),Fe=je[0],Oe=je[1],ke=(0,r.useState)("text"),Ne=ke[0],ze=ke[1],Ee=(0,r.useState)(!1),Pe=Ee[0],qe=Ee[1],De=(0,r.useState)(!1),Be=De[0],Le=De[1],Re=(0,r.useState)([]),Ae=Re[0],Te=Re[1],Ie=((0,r.useState)({})[0],(0,r.useRef)(null)),He=(0,r.useRef)(null),_e=(0,r.useRef)(null);(0,r.useEffect)((function(){Ie&&Ie.current&&Oe(Ie.current.offsetWidth)}),[]),(0,r.useEffect)((function(){Z!==Ne&&ze(Z)}),[Z]),(0,r.useEffect)((function(){ye(H)}),[H]),(0,r.useEffect)((function(){ge(""===be||void 0===be)}),[be]),(0,r.useEffect)((function(){Q&&qe(Ce)}),[Ce,Q]),(0,r.useEffect)((function(){return Pe?window.addEventListener("keydown",Ze):window.removeEventListener("keydown",Ze),function(){window.removeEventListener("keydown",Ze)}}),[Pe]);var Me,We=function(){C||(ge(!1),(He&&He.current&&He.current.querySelector(j?"textarea":"input")).focus())},Ke=function(e){var t=e.selectDom,o=e.keyCode,i=e.currentDom,r="nextSibling",n=".text-field-select-content-item";38===o&&(r="previousSibling",n=".text-field-select-content-item:last-child"),i?(i=i[r])||(i=t.querySelector(n)):i=t.querySelector(".text-field-select-content-item"),i&&(i.classList.add("text-field-select-content-item-keydown"),Ue(i,t))},Ue=function(e,t){var o=t.clientHeight,i=e.offsetTop+e.clientHeight-o;t.scrollTop=i>0?i:0},Ze=function(e){var t=document.querySelector("."+xe),o=null,i=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&i){var r=i.dataset.val;tt(JSON.parse(r))(e),(He&&He.current&&He.current.querySelector(j?"textarea":"input")).blur()}i&&(o=i,i.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Ke({selectDom:t,keyCode:e.keyCode,currentDom:o}),38===e.keyCode&&Ke({selectDom:t,keyCode:e.keyCode,currentDom:o})},Ve=function(e){Se(!1),""===e.target.value&&ge(!0),ie&&ie(e)},Ye=function(e){Le(!0),Q&&Q(e,(function(e){Te(e||[]),Le(!1)}))},$e=function(e){Se(!0),re&&re(e),Ye(e.target.value)},Je=function(e){var t=e.target.value;G&&void 0!==t&&""!==t&&t.toString().length>G||(M||ye(t),ne&&ne(e),Ye(e.target.value))},Ge=function(e){13===e.keyCode&&de&&de(e),le&&le(e)},Qe=function(e){ae&&ae(e)},Xe=function(e){"password"===Z&&("text"===Ne&&ze("password"),"password"===Ne&&ze("text")),V&&V(e)},et=function(){qe(!1)},tt=function(e){return function(t){ue&&ue(e)}},ot=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:void 0!==G&&(0,i.jsx)("span",v({className:"length-limit"},{children:(be?be.toString().length:0)+"/"+G}),void 0)},void 0)}),[G,be]),it=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:J&&(0,i.jsx)("span",v({className:"right-icon",onClick:Xe},{children:Y||("password"===Z?"password"===Ne?(0,i.jsx)(d(),{},void 0):(0,i.jsx)(c(),{},void 0):null)}),void 0)},void 0)}),[J,Y,Z,Ne]),rt=(0,r.useMemo)((function(){return(0,i.jsxs)("div",v({className:"text-field-content-within",ref:_e},{children:[(0,i.jsxs)("div",v({className:"text-field-content-within-input"},{children:[(0,i.jsx)(n.TextField,v({size:"small",variant:"outlined",autoFocus:K,ref:He,type:Ne,value:be||"",disabled:C,multiline:j,rows:P,onBlur:Ve,onFocus:$e,onChange:Je,onKeyDown:Ge,onKeyUp:Qe},pe),void 0),ve&&(0,i.jsx)("span",v({className:"text-field-label-placeholder",onClick:We},{children:"outside"===u?x:(0,i.jsxs)(i.Fragment,{children:[y||x,N&&(0,i.jsx)("span",v({className:"identification-label"},{children:z||(0,i.jsx)(i.Fragment,{children:O?"(必填)":""},void 0)}),void 0)]},void 0)}),void 0)]}),void 0),ot,it]}),void 0)}),[ve,K,Ne,be,ot,it,u,x,y,C,j,P,pe,ne,Q]),nt=(0,r.useMemo)((function(){var e;return(0,i.jsxs)("div",v({className:(e="text-field-select-content",Be&&(e+=" text-field-select-content-loading"),xe&&(e+=" "+xe),e),style:{width:(_e&&_e.current?_e.current.offsetWidth:0)+"px"}},{children:[Ae&&Ae.map((function(e,t){return(0,i.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:tt(e),"data-val":JSON.stringify(e)},{children:ee?ee(e):(0,i.jsx)(l.default,{children:e[oe]},void 0)}),t)})),Be&&(0,i.jsx)("div",v({className:"loading-box"},{children:(0,i.jsx)(p(),{},void 0)}),void 0)]}),void 0)}),[_e,Pe,Ae,ee,oe,ue,Be,xe]),lt=(0,r.useMemo)((function(){return(0,i.jsx)(n.Tooltip,v({open:Pe,title:nt,onClose:et,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e=fe["text-field-select"],X&&(e+=" "+X),e)}},{children:rt}),void 0);var e}),[ve,K,Ne,be,ot,it,u,x,y,C,j,P,pe,ne,Q,ue,_e,Pe,X]),at=(0,r.useMemo)((function(){var e=Boolean(N&&(z||O));if("outside"===u&&(y||e))return(0,i.jsxs)("label",v({className:"text-field-label"},{children:[y,N&&(0,i.jsx)("span",v({className:"identification-label"},{children:z||(0,i.jsx)(i.Fragment,{children:O?"(必填)":""},void 0)}),void 0)]}),void 0)}),[u,y,N,z,O]);return(0,i.jsxs)("div",v({className:(Me=fe["text-field"],Me+=" text-field",a&&!j&&(Me+=" text-field-"+a),t&&(Me+=" "+t),D&&(Me+=" text-field-error"),Ce&&(Me+=" text-field-focus"),C&&(Me+=" text-field-disabled"),j&&(Me+=" text-field-multiline"),Me)},{children:[at,(0,i.jsxs)("div",v({className:"text-field-content"},{children:[A&&(0,i.jsx)("div",v({className:"text-field-content-before",ref:Ie,onClick:function(e){se&&se(e)}},{children:A}),void 0),Q?lt:rt,I&&(0,i.jsx)("div",v({className:"text-field-content-after",onClick:function(e){ce&&ce(e)}},{children:I}),void 0)]}),void 0),L&&(0,i.jsx)("p",v({className:"text-field-error-text",style:{marginLeft:Fe+"px"}},{children:L}),void 0)]}),void 0)}},1731:function(e){e.exports=o},8604:function(e){e.exports=t},770:function(e){e.exports=s},6243:function(e){e.exports=d},1102:function(e){e.exports=n},5191:function(e){e.exports=a},6570:function(e){e.exports=r},8528:function(e){e.exports=i},3475:function(e){e.exports=l},9297:function(t){t.exports=e}},u={};function p(e){var t=u[e];if(void 0!==t)return t.exports;var o=u[e]={exports:{}};return c[e](o,o.exports,p),o.exports}p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},p.d=function(e,t){for(var o in t)p.o(t,o)&&!p.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var f={};return function(){p.r(f),p.d(f,{InputLang:function(){return v}});var e=p(7712),t=p(9297),o=p(8604),i=p(4661),r=p(1418),n=p(853),l=p(770),a=p.n(l),d=p(1731),s=p(3475),c=function(){return c=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},u=function(e,t,o){if(o||2===arguments.length)for(var i,r=0,n=t.length;r<n;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},x=(0,n.Z)(),h=(0,o.makeStyles)((function(){return(0,o.createStyles)({"input-lang":{fontFamily:x.fontFamily.zh,display:"inline-block",fontSize:x.standardFont.standardFont1.fontSize,position:"relative","& .text-field-content-after":{cursor:"pointer"}},"input-lang-popover":{"& > .input-lang-popover-box":{marginTop:"8px","& > .input-lang-list":{padding:"10px",width:"300px",lineHeight:"0"}}}})})),v=function(o){var n=o.className,l=void 0===n?"":n,p=o.label,f=void 0===p?"":p,x=o.size,v=void 0===x?"small":x,g=o.placeholder,m=void 0===g?"":g,b=o.placeholderKey,y=void 0===b?"":b,w=o.placeholderValue,C=void 0===w?"":w,S=o.error,j=void 0!==S&&S,F=o.helperText,O=void 0===F?"":F,k=o.required,N=void 0!==k&&k,z=o.popoverClassName,E=o.value,P=o.onChange,q=o.langList,D=void 0===q?["zh","en"]:q,B=o.disabled,L=void 0!==B&&B,R=h(o),A=(0,t.useState)(!1),T=A[0],I=A[1],H=(0,t.useState)(null),_=H[0],M=H[1],W=(0,t.useState)("input-lang-"+(0,s.UUID)())[0],K=(0,t.useState)(""),U=K[0],Z=K[1],V=(0,t.useState)({}),Y=V[0],$=V[1],J=(0,t.useState)([]),G=J[0],Q=J[1];(0,t.useEffect)((function(){var e=(0,s.GetLanguage)()||"zh";Z(e)}),[]),(0,t.useEffect)((function(){if(E){var e=c({},E);void 0===e[U]&&(e[U]="");for(var t=Object.keys(e),o=[],i=0,r=t.length;i<r;i++){var n=t[i],l=e[n];n!==U&&o.push({label:n,value:l})}Q(o),$(e)}}),[E,U]);var X,ee=function(e){Q(u([],e,!0))},te=function(e,t){for(var o=[],i=(0,s.ArrayToObject)("label",G),r=0,n=D.length;r<n;r++){var l=D[r];i[l]||l===U||o.push({label:l,value:l})}t(o)},oe=function(){M(null),I(!1);var e={};e[U]=Y[U];for(var t=0,o=G.length;t<o;t++){var i=G[t];i.label&&(e[i.label]=i.value||"")}$(c({},e)),P&&P(c({},e))},ie=(0,t.useMemo)((function(){return(0,e.jsx)("div",{children:U},void 0)}),[U]),re=(0,t.useMemo)((function(){return(0,e.jsx)("div",c({className:"lang-list-icon"},{children:(0,e.jsx)(a(),{},void 0)}),void 0)}),[]),ne=(0,t.useMemo)((function(){return(0,e.jsx)(d.Popover,c({open:T,anchorEl:_,onClose:oe,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:(t=R["input-lang-popover"],z&&(t+=" "+z),t),classes:{paper:"input-lang-popover-box"}},{children:(0,e.jsx)("div",c({className:"input-lang-list"},{children:(0,e.jsx)(r.default,{size:v,disabled:L,value:G,onChange:ee,fetchSuggestionsKey:te,placeholderKey:y,placeholderValue:C},void 0)}),void 0)}),void 0);var t}),[T,z,G,y,C,U,D,v,L]);return(0,e.jsxs)("div",c({className:(X=R["input-lang"],X+=" input-lang",X+=" "+W,v&&(X+=" input-lang-"+v),l&&(X+=" "+l),X)},{children:[(0,e.jsx)(i.default,{size:v,error:j,disabled:L,required:N,helperText:O,label:f,placeholder:m,value:Y[U],addonAfter:re,addonBefore:ie,onClickAddonAfter:function(){var e=document.querySelector("."+W+" .text-field-content-after");M(e),I(!0)},onChange:function(e){Y[U]=e.target.value;var t=c({},Y);$(t),P&&P(t)}},void 0),ne]}),void 0)};f.default=v}(),f}()}));
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/11 13:53
|
|
4
|
+
* @description 数字输入框
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
export interface InputNumberProps {
|
|
8
|
+
/** 样式class */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** 尺寸 小/中/大 */
|
|
11
|
+
size?: 'small' | 'medium' | 'large';
|
|
12
|
+
/** 标题在外,还是在内 */
|
|
13
|
+
labelMode?: 'outside' | 'inside';
|
|
14
|
+
/** 按钮模式 左右/上下 */
|
|
15
|
+
btnMode?: 'lr' | 'tb';
|
|
16
|
+
/** 输入框placeholder */
|
|
17
|
+
placeholder?: ReactNode;
|
|
18
|
+
/** 输入框值 */
|
|
19
|
+
value?: number;
|
|
20
|
+
/** 标题 */
|
|
21
|
+
label?: ReactNode;
|
|
22
|
+
/** 禁用 */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** 禁用加 */
|
|
25
|
+
disabledAdd?: boolean;
|
|
26
|
+
/** 禁用减 */
|
|
27
|
+
disabledReduce?: boolean;
|
|
28
|
+
/** 必填 */
|
|
29
|
+
required?: boolean;
|
|
30
|
+
/** 错误 */
|
|
31
|
+
error?: boolean;
|
|
32
|
+
/** 错误内容 */
|
|
33
|
+
helperText?: ReactNode;
|
|
34
|
+
/** 自动获取焦点 */
|
|
35
|
+
autoFocus?: boolean;
|
|
36
|
+
/** 失去焦点 */
|
|
37
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
38
|
+
/** 得到焦点 */
|
|
39
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
40
|
+
/** 改变值 */
|
|
41
|
+
onChange?: (val: any, event: any) => void;
|
|
42
|
+
/** 键盘按下 */
|
|
43
|
+
onKeydown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
44
|
+
/** 键盘抬起 */
|
|
45
|
+
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
46
|
+
/** 回车事件 */
|
|
47
|
+
onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
48
|
+
}
|
|
49
|
+
export declare const InputNumber: FunctionComponent<InputNumberProps>;
|
|
50
|
+
export default InputNumber;
|
package/InputNumber/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@material-ui/core"),require("@para-ui/icons/Up"),require("@para-ui/icons/Down"),require("@para-ui/icons/Minus"),require("@para-ui/icons/Plus"),require("@material-ui/core/styles")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","@para-ui/icons/Up","@para-ui/icons/Down","@para-ui/icons/Minus","@para-ui/icons/Plus","@material-ui/core/styles"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("@material-ui/core"),require("@para-ui/icons/Up"),require("@para-ui/icons/Down"),require("@para-ui/icons/Minus"),require("@para-ui/icons/Plus"),require("@material-ui/core/styles")):e.ParaUI=t(e.react,e["@material-ui/core"],e["@para-ui/icons/Up"],e["@para-ui/icons/Down"],e["@para-ui/icons/Minus"],e["@para-ui/icons/Plus"],e["@material-ui/core/styles"])}(self,(function(e,t,r,n,o,i,a){return function(){"use strict";var l={9177:function(e,t){var r={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};t.Z=function(){return r}},1731:function(e){e.exports=t},8604:function(e){e.exports=a},6028:function(e){e.exports=n},3277:function(e){e.exports=o},5191:function(e){e.exports=i},3616:function(e){e.exports=r},9297:function(t){t.exports=e}},u={};function d(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return l[e](r,r.exports,d),r.exports}d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},d.d=function(e,t){for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return function(){d.r(s),d.d(s,{InputNumber:function(){return x}});var e=d(9297),t=d.n(e),r=d(1731),n=d(3616),o=d.n(n),i=d(6028),a=d.n(i),l=d(3277),u=d.n(l),c=d(5191),p=d.n(c),b=d(8604);function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw i}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var f=(0,d(9177).Z)(),h=(0,b.makeStyles)((function(){return(0,b.createStyles)({"input-number":{fontFamily:f.fontFamily.zh,display:"inline-block",fontSize:f.standardFont.standardFont1.fontSize,paddingBottom:"20px",position:"relative","& input::-webkit-outer-spin-button,& input::-webkit-inner-spin-button":{appearance:"none !important"},"& input":{"-moz-appearance":"textfield"},"& fieldset":{border:0},"& > label":{color:f.textColor.secondary,marginBottom:"10px",display:"inline-block","& > span":{marginLeft:"3px"}},"& > .input-number-content":{border:"1px solid",borderColor:f.textColor.thirdary,borderRadius:f.borderRadius,position:"relative",width:"100%",display:"flex",overflow:"hidden","&:hover":{borderColor:f.thmemColor.primary},"& > .inside-label":{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",padding:"0 10px",cursor:"text","& > .inside-label-placeholder":{color:f.textColor.thirdary},"& > .inside-label-label":{color:f.textColor.thirdary,"& > span":{marginLeft:"3px"}}},"& > div":{width:"100%","& > div":{width:"100%",height:"100%","& input":{width:"100%",height:"100%",padding:"0 10px",fontSize:f.standardFont.standardFont1.fontSize,color:f.textColor.primary}}},"& > .tb-btn":{display:"flex",flexDirection:"column",alignItems:"center",width:"30px",backgroundColor:f.bgBorderColor.bg2,overflow:"hidden",borderLeft:"1px solid ",borderColor:f.textColor.thirdary,zIndex:"1","& > span":{lineHeight:"0",height:"50%",width:"100%",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{"& > svg":{color:f.thmemColor.primary}},"& > svg":{color:f.textColor.secondary,transform:"scale(0.8)"},"&:last-child":{borderTop:"1px solid ",borderColor:f.textColor.thirdary}}},"& > .reduce-btn, & > .add-btn":{width:"34px",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:f.bgBorderColor.bg2,"&:hover":{"& > svg":{color:f.thmemColor.primary}},"& > svg":{color:f.textColor.secondary}},"& > .reduce-btn":{borderRight:"1px solid "+f.textColor.thirdary},"& > .add-btn":{borderLeft:"1px solid",borderColor:f.textColor.thirdary}},"& > .input-number-error-text":{margin:0,height:"20px",lineHeight:"20px",position:"absolute",left:"10px",bottom:"0"},"&.input-number-small":{"& > .input-number-content":{height:"28px","& > .inside-label":{"& > .inside-label-placeholder":{lineHeight:"26px"},"& > .inside-label-label":{lineHeight:"26px"}},"& > div":{height:"26px"},"& input":{padding:"5px 10px"}}},"&.input-number-medium":{"& > .input-number-content":{height:"34px","& > .inside-label":{"& > .inside-label-placeholder":{lineHeight:"32px"},"& > .inside-label-label":{lineHeight:"32px"}},"& > div":{height:"32px"},"& input":{padding:"8px 10px"}}},"&.input-number-large":{"& > .input-number-content":{height:"40px","& > .inside-label":{"& > .inside-label-placeholder":{lineHeight:"38px"},"& > .inside-label-label":{lineHeight:"38px"}},"& > div":{height:"38px"},"& input":{padding:"11px 10px"}}},"&.input-number-disabled":{"& > .input-number-content":{"&:hover":{borderColor:f.textColor.thirdary},"& > .input-number-input":{backgroundColor:f.bgBorderColor.bg2,"& > div":{"& input":{color:f.textColor.secondary}}},"& > .inside-label, & > .reduce-btn, & > .add-btn, & > .tb-btn > span, & input":{cursor:"not-allowed"},"& > .reduce-btn, & > .add-btn":{"&:hover":{"& > svg":{color:f.textColor.thirdary}},"& > svg":{color:f.textColor.thirdary}},"& > .tb-btn":{"& > span":{"&:hover":{"& > svg":{color:f.textColor.thirdary,transform:"scale(0.8)"}},"& > svg":{color:f.textColor.thirdary}}}}},"&.input-number-disabled-add":{"& > .input-number-content":{"& > .add-btn":{cursor:"not-allowed","&:hover":{"& > svg":{color:f.textColor.thirdary}},"& > svg":{color:f.textColor.thirdary}},"& > .tb-btn":{"& > .tb-btn-top":{cursor:"not-allowed","&:hover":{"& > svg":{color:f.textColor.thirdary,transform:"scale(0.8)"}},"& > svg":{color:f.textColor.thirdary}}}}},"&.input-number-disabled-reduce":{"& > .input-number-content":{"& > .reduce-btn":{cursor:"not-allowed","&:hover":{"& > svg":{color:f.textColor.thirdary}},"& > svg":{color:f.textColor.thirdary}},"& > .tb-btn":{"& > .tb-btn-bottom":{cursor:"not-allowed","&:hover":{"& > svg":{color:f.textColor.thirdary,transform:"scale(0.8)"}},"& > svg":{color:f.textColor.thirdary}}}}},"&.input-number-error":{"& > .input-number-error-text":{color:f.stateColor.error},"& > .input-number-content":{borderColor:f.stateColor.error,"&:hover":{borderColor:f.stateColor.error}}},"&.input-number-focus":{"& > .input-number-content":{borderColor:f.thmemColor.primary}},"&.input-number-lr":{width:"166px","& > .input-number-content":{"& > .input-number-input":{width:"calc(100% - 68px)","& input":{textAlign:"center"}},"& > .inside-label":{width:"calc(100% - 68px)",left:"34px"}}},"&.input-number-tb":{width:"100px","& > .input-number-content":{"& > .input-number-input":{width:"calc(100% - 30px)"},"& > .inside-label":{paddingRight:"30px"}}}}})})),x=function(n){var i=n.className,l=n.size,d=void 0===l?"small":l,s=n.labelMode,c=void 0===s?"outside":s,b=n.btnMode,f=void 0===b?"tb":b,x=n.placeholder,g=void 0===x?"":x,v=n.label,y=void 0===v?"":v,C=n.disabled,F=void 0!==C&&C,E=n.disabledAdd,w=void 0!==E&&E,S=n.disabledReduce,D=void 0!==S&&S,z=n.required,N=void 0!==z&&z,q=n.error,k=void 0!==q&&q,B=n.helperText,M=void 0===B?"":B,H=n.value,P=n.autoFocus,j=void 0!==P&&P,I=n.onBlur,U=n.onFocus,A=n.onChange,L=n.onKeydown,R=n.onKeyUp,T=n.onEnter,W=h(n),O=m((0,e.useState)(),2),K=O[0],_=O[1],Y=m((0,e.useState)(!0),2),Z=Y[0],G=Y[1],J=m((0,e.useState)(!1),2),Q=J[0],V=J[1],X=(0,e.useRef)(null);(0,e.useEffect)((function(){void 0!==H&&_(H)}),[H]),(0,e.useEffect)((function(){void 0!==K&&G(!1)}),[K]);var $,ee=function(e){if(!F&&!w){var t=Number(K||"")+1;_(t),A&&A(t,e)}},te=function(e){if(!F&&!D){var t=Number(K||"")-1;_(t),A&&A(t,e)}},re=function(){F||(G(!1),(X&&X.current&&X.current.querySelector("input")).focus())},ne=(0,e.useMemo)((function(){if("outside"===c)return y||N?t().createElement("label",null,y,N&&t().createElement("span",null,"(必填)")):null}),[c,N,y]),oe=(0,e.useMemo)((function(){return Z?"inside"===c&&(y||N)?t().createElement("div",{className:"inside-label",onClick:re},t().createElement("span",{className:"inside-label-label"},y,N&&t().createElement("span",null,"(必填)"))):t().createElement("div",{className:"inside-label",onClick:re},t().createElement("span",{className:"inside-label-placeholder"},g)):null}),[c,N,y,g,Z,F]);return t().createElement("div",{className:($=W["input-number"],$+=" paraui-input-number",i&&($+=" "+i),d&&($+=" input-number-"+d),F&&($+=" input-number-disabled"),w&&($+=" input-number-disabled-add"),D&&($+=" input-number-disabled-reduce"),k&&($+=" input-number-error"),Q&&($+=" input-number-focus"),f&&($+=" input-number-"+f),$)},ne,t().createElement("div",{className:"input-number-content"},"lr"===f&&t().createElement("span",{className:"reduce-btn",onClick:te},t().createElement(u(),null)),t().createElement(r.TextField,{className:"input-number-input",size:"small",variant:"outlined",type:"number",value:void 0===K?"":K,autoFocus:j,disabled:F,ref:X,onBlur:function(e){V(!1),""===e.target.value&&G(!0),I&&I(e)},onFocus:function(e){V(!0),U&&U(e)},onChange:function(e){var t=e.target.value;_(t),A&&A(t,e)},onKeyDown:function(e){13===e.keyCode&&T&&T(e),L&&L(e)},onKeyUp:function(e){R&&R(e)}}),"lr"===f&&t().createElement("span",{className:"add-btn",onClick:ee},t().createElement(p(),null)),oe,"tb"===f&&t().createElement("div",{className:"tb-btn"},t().createElement("span",{className:"tb-btn-top",onClick:ee},t().createElement(o(),null)),t().createElement("span",{className:"tb-btn-bottom",onClick:te},t().createElement(a(),null)))),M&&t().createElement("p",{className:"input-number-error-text"},M))};s.default=x}(),s}()}));
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@material-ui/core"),require("@para-ui/icons/Up"),require("@para-ui/icons/Down"),require("@para-ui/icons/Minus"),require("@para-ui/icons/Plus"),require("@material-ui/core/styles")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","@para-ui/icons/Up","@para-ui/icons/Down","@para-ui/icons/Minus","@para-ui/icons/Plus","@material-ui/core/styles"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("@material-ui/core"),require("@para-ui/icons/Up"),require("@para-ui/icons/Down"),require("@para-ui/icons/Minus"),require("@para-ui/icons/Plus"),require("@material-ui/core/styles")):e.ParaUI=r(e.react,e["@material-ui/core"],e["@para-ui/icons/Up"],e["@para-ui/icons/Down"],e["@para-ui/icons/Minus"],e["@para-ui/icons/Plus"],e["@material-ui/core/styles"])}(self,(function(e,r,t,o,n,i,a){return function(){"use strict";var l={4126:function(e){
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/
|
|
7
|
+
var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=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={},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 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,u=n(e),d=1;d<arguments.length;d++){for(var s in a=Object(arguments[d]))t.call(a,s)&&(u[s]=a[s]);if(r){l=r(a);for(var c=0;c<l.length;c++)o.call(a,l[c])&&(u[l[c]]=a[l[c]])}}return u}},9524:function(e,r,t){
|
|
8
|
+
/** @license React v17.0.2
|
|
9
|
+
* react-jsx-runtime.production.min.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
t(4126);var o=t(9297),n=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;n=i("react.element"),i("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function d(e,r,t){var o,i={},d=null,s=null;for(o in void 0!==t&&(d=""+t),void 0!==r.key&&(d=""+r.key),void 0!==r.ref&&(s=r.ref),r)l.call(r,o)&&!u.hasOwnProperty(o)&&(i[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===i[o]&&(i[o]=r[o]);return{$$typeof:n,type:e,key:d,ref:s,props:i,_owner:a.current}}r.jsx=d,r.jsxs=d},7712:function(e,r,t){e.exports=t(9524)},853:function(e,r){var t={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};r.Z=function(){return t}},1731:function(e){e.exports=r},8604:function(e){e.exports=a},6028:function(e){e.exports=o},3277:function(e){e.exports=n},5191:function(e){e.exports=i},3616:function(e){e.exports=t},9297:function(r){r.exports=e}},u={};function d(e){var r=u[e];if(void 0!==r)return r.exports;var t=u[e]={exports:{}};return l[e](t,t.exports,d),t.exports}d.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(r,{a:r}),r},d.d=function(e,r){for(var t in r)d.o(r,t)&&!d.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},d.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return function(){d.r(s),d.d(s,{InputNumber:function(){return v}});var e=d(7712),r=d(9297),t=d(1731),o=d(3616),n=d.n(o),i=d(6028),a=d.n(i),l=d(3277),u=d.n(l),c=d(5191),p=d.n(c),b=d(8604),f=d(853),h=function(){return h=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},h.apply(this,arguments)},x=(0,f.Z)(),m=(0,b.makeStyles)((function(){return(0,b.createStyles)({"input-number":{fontFamily:x.fontFamily.zh,display:"inline-block",fontSize:x.standardFont.standardFont1.fontSize,paddingBottom:"20px",position:"relative","& input::-webkit-outer-spin-button,& input::-webkit-inner-spin-button":{appearance:"none !important"},"& input":{"-moz-appearance":"textfield"},"& fieldset":{border:0},"& > label":{color:x.textColor.secondary,marginBottom:"10px",display:"inline-block","& > span":{marginLeft:"3px"}},"& > .input-number-content":{border:"1px solid",borderColor:x.textColor.thirdary,borderRadius:x.borderRadius,position:"relative",width:"100%",display:"flex",overflow:"hidden","&:hover":{borderColor:x.thmemColor.primary},"& > .inside-label":{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",padding:"0 10px",cursor:"text","& > .inside-label-placeholder":{color:x.textColor.thirdary},"& > .inside-label-label":{color:x.textColor.thirdary,"& > span":{marginLeft:"3px"}}},"& > div":{width:"100%","& > div":{width:"100%",height:"100%","& input":{width:"100%",height:"100%",padding:"0 10px",fontSize:x.standardFont.standardFont1.fontSize,color:x.textColor.primary}}},"& > .tb-btn":{display:"flex",flexDirection:"column",alignItems:"center",width:"30px",backgroundColor:x.bgBorderColor.bg2,overflow:"hidden",borderLeft:"1px solid ",borderColor:x.textColor.thirdary,zIndex:"1","& > span":{lineHeight:"0",height:"50%",width:"100%",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{"& > svg":{color:x.thmemColor.primary}},"& > svg":{color:x.textColor.secondary,transform:"scale(0.8)"},"&:last-child":{borderTop:"1px solid ",borderColor:x.textColor.thirdary}}},"& > .reduce-btn, & > .add-btn":{width:"34px",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:x.bgBorderColor.bg2,"&:hover":{"& > svg":{color:x.thmemColor.primary}},"& > svg":{color:x.textColor.secondary}},"& > .reduce-btn":{borderRight:"1px solid "+x.textColor.thirdary},"& > .add-btn":{borderLeft:"1px solid",borderColor:x.textColor.thirdary}},"& > .input-number-error-text":{margin:0,height:"20px",lineHeight:"20px",position:"absolute",left:"10px",bottom:"0"},"&.input-number-small":{"& > .input-number-content":{height:"28px","& > .inside-label":{"& > .inside-label-placeholder":{lineHeight:"26px"},"& > .inside-label-label":{lineHeight:"26px"}},"& > div":{height:"26px"},"& input":{padding:"5px 10px"}}},"&.input-number-medium":{"& > .input-number-content":{height:"34px","& > .inside-label":{"& > .inside-label-placeholder":{lineHeight:"32px"},"& > .inside-label-label":{lineHeight:"32px"}},"& > div":{height:"32px"},"& input":{padding:"8px 10px"}}},"&.input-number-large":{"& > .input-number-content":{height:"40px","& > .inside-label":{"& > .inside-label-placeholder":{lineHeight:"38px"},"& > .inside-label-label":{lineHeight:"38px"}},"& > div":{height:"38px"},"& input":{padding:"11px 10px"}}},"&.input-number-disabled":{"& > .input-number-content":{"&:hover":{borderColor:x.textColor.thirdary},"& > .input-number-input":{backgroundColor:x.bgBorderColor.bg2,"& > div":{"& input":{color:x.textColor.secondary}}},"& > .inside-label, & > .reduce-btn, & > .add-btn, & > .tb-btn > span, & input":{cursor:"not-allowed"},"& > .reduce-btn, & > .add-btn":{"&:hover":{"& > svg":{color:x.textColor.thirdary}},"& > svg":{color:x.textColor.thirdary}},"& > .tb-btn":{"& > span":{"&:hover":{"& > svg":{color:x.textColor.thirdary,transform:"scale(0.8)"}},"& > svg":{color:x.textColor.thirdary}}}}},"&.input-number-disabled-add":{"& > .input-number-content":{"& > .add-btn":{cursor:"not-allowed","&:hover":{"& > svg":{color:x.textColor.thirdary}},"& > svg":{color:x.textColor.thirdary}},"& > .tb-btn":{"& > .tb-btn-top":{cursor:"not-allowed","&:hover":{"& > svg":{color:x.textColor.thirdary,transform:"scale(0.8)"}},"& > svg":{color:x.textColor.thirdary}}}}},"&.input-number-disabled-reduce":{"& > .input-number-content":{"& > .reduce-btn":{cursor:"not-allowed","&:hover":{"& > svg":{color:x.textColor.thirdary}},"& > svg":{color:x.textColor.thirdary}},"& > .tb-btn":{"& > .tb-btn-bottom":{cursor:"not-allowed","&:hover":{"& > svg":{color:x.textColor.thirdary,transform:"scale(0.8)"}},"& > svg":{color:x.textColor.thirdary}}}}},"&.input-number-error":{"& > .input-number-error-text":{color:x.stateColor.error},"& > .input-number-content":{borderColor:x.stateColor.error,"&:hover":{borderColor:x.stateColor.error}}},"&.input-number-focus":{"& > .input-number-content":{borderColor:x.thmemColor.primary}},"&.input-number-lr":{width:"166px","& > .input-number-content":{"& > .input-number-input":{width:"calc(100% - 68px)","& input":{textAlign:"center"}},"& > .inside-label":{width:"calc(100% - 68px)",left:"34px"}}},"&.input-number-tb":{width:"100px","& > .input-number-content":{"& > .input-number-input":{width:"calc(100% - 30px)"},"& > .inside-label":{paddingRight:"30px"}}}}})})),v=function(o){var i=o.className,l=o.size,d=void 0===l?"small":l,s=o.labelMode,c=void 0===s?"outside":s,b=o.btnMode,f=void 0===b?"tb":b,x=o.placeholder,v=void 0===x?"":x,g=o.label,y=void 0===g?"":g,C=o.disabled,F=void 0!==C&&C,j=o.disabledAdd,w=void 0!==j&&j,S=o.disabledReduce,O=void 0!==S&&S,D=o.required,E=void 0!==D&&D,k=o.error,N=void 0!==k&&k,_=o.helperText,P=void 0===_?"":_,q=o.value,z=o.autoFocus,B=void 0!==z&&z,M=o.onBlur,R=o.onFocus,I=o.onChange,H=o.onKeydown,L=o.onKeyUp,U=o.onEnter,T=m(o),W=(0,r.useState)(),A=W[0],K=W[1],Y=(0,r.useState)(!0),Z=Y[0],$=Y[1],G=(0,r.useState)(!1),J=G[0],Q=G[1],V=(0,r.useRef)(null);(0,r.useEffect)((function(){void 0!==q&&K(q)}),[q]),(0,r.useEffect)((function(){void 0!==A&&$(!1)}),[A]);var X,ee=function(e){if(!F&&!w){var r=Number(A||"")+1;K(r),I&&I(r,e)}},re=function(e){if(!F&&!O){var r=Number(A||"")-1;K(r),I&&I(r,e)}},te=function(){F||($(!1),(V&&V.current&&V.current.querySelector("input")).focus())},oe=(0,r.useMemo)((function(){if("outside"===c)return y||E?(0,e.jsxs)("label",{children:[y,E&&(0,e.jsx)("span",{children:"(必填)"},void 0)]},void 0):null}),[c,E,y]),ne=(0,r.useMemo)((function(){return Z?"inside"===c&&(y||E)?(0,e.jsx)("div",h({className:"inside-label",onClick:te},{children:(0,e.jsxs)("span",h({className:"inside-label-label"},{children:[y,E&&(0,e.jsx)("span",{children:"(必填)"},void 0)]}),void 0)}),void 0):(0,e.jsx)("div",h({className:"inside-label",onClick:te},{children:(0,e.jsx)("span",h({className:"inside-label-placeholder"},{children:v}),void 0)}),void 0):null}),[c,E,y,v,Z,F]);return(0,e.jsxs)("div",h({className:(X=T["input-number"],X+=" paraui-input-number",i&&(X+=" "+i),d&&(X+=" input-number-"+d),F&&(X+=" input-number-disabled"),w&&(X+=" input-number-disabled-add"),O&&(X+=" input-number-disabled-reduce"),N&&(X+=" input-number-error"),J&&(X+=" input-number-focus"),f&&(X+=" input-number-"+f),X)},{children:[oe,(0,e.jsxs)("div",h({className:"input-number-content"},{children:["lr"===f&&(0,e.jsx)("span",h({className:"reduce-btn",onClick:re},{children:(0,e.jsx)(u(),{},void 0)}),void 0),(0,e.jsx)(t.TextField,{className:"input-number-input",size:"small",variant:"outlined",type:"number",value:void 0===A?"":A,autoFocus:B,disabled:F,ref:V,onBlur:function(e){Q(!1),""===e.target.value&&$(!0),M&&M(e)},onFocus:function(e){Q(!0),R&&R(e)},onChange:function(e){var r=e.target.value;K(r),I&&I(r,e)},onKeyDown:function(e){13===e.keyCode&&U&&U(e),H&&H(e)},onKeyUp:function(e){L&&L(e)}},void 0),"lr"===f&&(0,e.jsx)("span",h({className:"add-btn",onClick:ee},{children:(0,e.jsx)(p(),{},void 0)}),void 0),ne,"tb"===f&&(0,e.jsxs)("div",h({className:"tb-btn"},{children:[(0,e.jsx)("span",h({className:"tb-btn-top",onClick:ee},{children:(0,e.jsx)(n(),{},void 0)}),void 0),(0,e.jsx)("span",h({className:"tb-btn-bottom",onClick:re},{children:(0,e.jsx)(a(),{},void 0)}),void 0)]}),void 0)]}),void 0),P&&(0,e.jsx)("p",h({className:"input-number-error-text"},{children:P}),void 0)]}),void 0)};s.default=v}(),s}()}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/10 15:26
|
|
4
|
+
* @description 尾部展开
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { FooterExpansionProps } from './interface';
|
|
8
|
+
export declare const FooterExpansion: FunctionComponent<FooterExpansionProps>;
|
|
9
|
+
export default FooterExpansion;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/10 15:31
|
|
4
|
+
* @description 横向菜单
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { MenuProps } from './interface';
|
|
8
|
+
export declare const HorizontalMenu: FunctionComponent<MenuProps>;
|
|
9
|
+
export default HorizontalMenu;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/10 15:34
|
|
4
|
+
* @description 横向菜单详情list
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { MenuListProps } from './interface';
|
|
8
|
+
export declare const HorizontalMenuList: FunctionComponent<MenuListProps>;
|
|
9
|
+
export default HorizontalMenuList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/10 16:16
|
|
4
|
+
* @description 横向菜单右侧
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { FooterProps } from './interface';
|
|
8
|
+
export declare const HorizontalMeunRight: FunctionComponent<FooterProps>;
|
|
9
|
+
export default HorizontalMeunRight;
|
package/Menu/index.d.ts
ADDED
package/Menu/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@material-ui/core/styles"),require("react-dom"),require("@material-ui/core"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Down"),require("@para-ui/icons"),require("@para-ui/icons/More"),require("para-lib"),require("@para-ui/icons/IndentRightFill"),require("@para-ui/icons/IndentLeftFill")):"function"==typeof define&&define.amd?define(["react","@material-ui/core/styles","react-dom","@material-ui/core","@para-ui/icons/LoadingF","@para-ui/icons/Down","@para-ui/icons","@para-ui/icons/More","para-lib","@para-ui/icons/IndentRightFill","@para-ui/icons/IndentLeftFill"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("@material-ui/core/styles"),require("react-dom"),require("@material-ui/core"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Down"),require("@para-ui/icons"),require("@para-ui/icons/More"),require("para-lib"),require("@para-ui/icons/IndentRightFill"),require("@para-ui/icons/IndentLeftFill")):e.ParaUI=t(e.react,e["@material-ui/core/styles"],e["react-dom"],e["@material-ui/core"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/Down"],e["@para-ui/icons"],e["@para-ui/icons/More"],e["para-lib"],e["@para-ui/icons/IndentRightFill"],e["@para-ui/icons/IndentLeftFill"])}(self,(function(e,t,n,r,o,i,a,l,c,u,m){return function(){"use strict";var s={4927:function(e,t,n){function r(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=r(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=r(e))&&(o&&(o+=" "),o+=t);return o}n.d(t,{Z:function(){return o}})},8955:function(e,t,n){var r=n(9297),o=n.n(r),i=n(1731),a=n(8604),l=n(4927),c=n(1102),u=n.n(c);function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var g=(0,n(9177).Z)(),f=(0,a.makeStyles)((function(e){return(0,a.createStyles)({"@keyframes loadingCircle":{"100%":{transform:"rotate(1turn)"}},radius:{borderRadius:15},btnIcon:{"& .btn-icon":{display:"inline-flex",alignItems:"center"},"& .btn-icon svg":{color:"currentColor"}},outlinedBtn:{"& .btn-icon svg":{color:g.thmemColor.primary},"&:disabled":{"& .btn-icon svg":{color:"currentColor"}}},iconButtonToolTip:{display:"inline-block",cursor:"not-allowed","& .iconButton-disabled":{cursor:"not-allowed",pointerEvents:"none"}},loadingBtn:{position:"relative",pointerEvents:"none","&:before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:1,transition:"opacity .2s",pointerEvents:"none"},"& .loading-icon":{animation:"$loadingCircle 1s infinite linear"}}})})),d=(0,a.withStyles)((function(e){return{tooltip:{margin:"6px 0",backgroundColor:g.bgBorderColor.bg4}}}))(i.Tooltip),h=function(e){var t=f(),n=e.radius,a=e.className,c=e.disabled,g=void 0!==c&&c,d=e.children,h=e.startIcon,v=e.endIcon,x=e.loading,b=void 0!==x&&x,y=s(e,["radius","className","disabled","children","startIcon","endIcon","loading"]);"text"===y.variant&&(y.disableRipple=!0);var E=p((0,r.useState)(!1),2),C=E[0],w=E[1];return(0,r.useEffect)((function(){w(!!b)}),[b]),o().createElement(i.Button,m({disabled:g,className:(0,l.Z)("paraui-button",a,t.btnIcon,n&&t.radius,"outlined"===y.variant&&t.outlinedBtn,C&&t.loadingBtn),startIcon:function(){if(!C)return o().createElement("span",{className:"btn-icon"},h);if("object"==typeof b){var e=b.delay||0;setTimeout((function(){return w(!1)}),e)}return o().createElement("span",{className:"btn-icon loading-icon"},o().createElement(u(),null))}(),endIcon:o().createElement("span",{className:"btn-icon"},v)},y),d)};h.IconButton=function(e){var t=f(),n=e.showToolTip,a=void 0===n||n,c=e.toolTipTitle,g=void 0===c?"":c,h=e.children,v=e.className,x=e.disabled,b=void 0!==x&&x,y=e.loading,E=void 0!==y&&y,C=e.TooltipProps,w=s(e,["showToolTip","toolTipTitle","children","className","disabled","loading","TooltipProps"]),S=p((0,r.useState)(!1),2),k=S[0],N=S[1],z=o().createElement(i.IconButton,m({},w,{disabled:b,disableRipple:!0,className:(0,l.Z)("paraui-icon-button",v,a&&b&&"iconButton-disabled",k&&t.loadingBtn)}),function(){if(!k)return h;if("object"==typeof E){var e=E.delay||0;setTimeout((function(){return N(!1)}),e)}return o().createElement("span",{className:"loading-icon"},o().createElement(u(),null))}());return(0,r.useEffect)((function(){N(!!E)}),[E]),a?o().createElement(d,m({title:g},C),o().createElement("span",{className:(0,l.Z)(b&&t.iconButtonToolTip)},z)):z},t.default=h},9177:function(e,t){var n={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};t.Z=function(){return n}},1731:function(e){e.exports=r},8604:function(e){e.exports=t},1609:function(e){e.exports=a},6028:function(e){e.exports=i},9387:function(e){e.exports=m},5295:function(e){e.exports=u},1102:function(e){e.exports=o},6090:function(e){e.exports=l},3475:function(e){e.exports=c},9297:function(t){t.exports=e},2268:function(e){e.exports=n}},p={};function g(e){var t=p[e];if(void 0!==t)return t.exports;var n=p[e]={exports:{}};return s[e](n,n.exports,g),n.exports}g.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return g.d(t,{a:t}),t},g.d=function(e,t){for(var n in t)g.o(t,n)&&!g.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},g.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},g.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var f={};return function(){g.r(f),g.d(f,{Menu:function(){return de},default:function(){return he}});var e=g(9297),t=g.n(e),n=g(8604),r=g(9177),o=(0,r.Z)(),i=(0,n.makeStyles)((function(){return(0,n.createStyles)({logo:{width:"100%",display:"inline-block","& > .logo-content":{display:"inline-block",textAlign:"center",whiteSpace:"nowrap",width:"100%","& > img":{marginRight:"10px",width:"auto",verticalAlign:"top"},"& > span":{whiteSpace:"nowrap",fontWeight:"700",fontSize:"18px",color:"white",verticalAlign:"top",display:"inline-block"}},"&.logo-split":{padding:"12px 20px 0 20px","& > .logo-content":{backgroundColor:o.thmemColor.primary,borderRadius:o.borderRadius,padding:"7px 10px","& > img":{height:"24px"},"& > span":{height:"24px",lineHeight:"24px"}}},"&.logo-full":{"& > .logo-content":{backgroundColor:o.thmemColor.primary,padding:"10px 0","& > img":{height:"30px"},"& > span":{height:"30px",lineHeight:"30px"}}},"&.logo-shrink":{"&.logo-split":{padding:"0","& > .logo-content":{padding:"13px 0",borderRadius:"0","& > img":{marginRight:"0"}}},"&.logo-full":{"& > .logo-content":{"& > img":{marginRight:"0"}}}}}})})),a=function(e){var n,r=e.mode,o=void 0===r?"split":r,a=e.expansion,l=void 0===a||a,c=e.img,u=e.title,m=e.customizeContent,s=e.className,p=i(e);return t().createElement("div",{className:(n=p.logo,n+=" logo",s&&(n+=" "+s),o&&(n+=" logo-"+o),l||(n+=" logo-shrink"),n)},m||t().createElement("div",{className:"logo-content"},c&&t().createElement("img",{src:c}),l&&u&&t().createElement("span",null,u)))},l=g(2268),c=g(8955),u=g(1731);function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var p=(0,r.Z)(),d=(0,n.makeStyles)((function(){return(0,n.createStyles)({"horizontal-meun-right":{height:"100%",display:"flex","& > .back-btn":{padding:"0 15px",height:"100%",display:"flex",alignItems:"center","& > button":{width:"100%",whiteSpace:"nowrap",boxShadow:"none",padding:"0 10px 0 14px","& svg":{color:"white"}}},"& > .language":{height:"100%","& .language-item":{display:"flex",padding:"0 15px",cursor:"pointer",alignItems:"center",height:"100%",position:"relative","&:after":{position:"absolute",left:"0",top:"0",content:'""',zIndex:1},"&:hover":{backgroundColor:p.bgBorderColor.line1,"& > .language-item-icon":{"& > svg":{color:p.thmemColor.primary}},"& > .language-item-label":{color:p.thmemColor.primary},"& > .language-item-arrow":{"& > svg":{color:p.thmemColor.primary}}},"& > .language-item-icon":{width:"16px",marginRight:"5px","& > svg":{fontSize:"16px",color:p.textColor.primary,verticalAlign:"top",position:"relative"},"& > .opacity-pos-svg":{opacity:"0"}},"& > .language-item-label":{fontSize:"12px",color:p.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap"}},"& > .li-collapse":{"& .language-item":{paddingLeft:"30px","&.language-item-select":{"& > .language-item-icon":{"& > svg":{color:p.thmemColor.primary}},"& > .language-item-label":{color:p.thmemColor.primary},"& > .language-item-arrow":{"& > svg":{color:p.thmemColor.primary}}}}},"&.language-select":{"& .language-item":{backgroundColor:p.bgBorderColor.line1,"& > .language-item-icon":{"& > svg":{color:p.thmemColor.primary}},"& > .language-item-label":{color:p.thmemColor.primary}}}},"& > .btn-list":{display:"flex",height:"100%","& > .btn-list-item":{display:"flex",padding:"0 15px",cursor:"pointer",alignItems:"center","&:hover":{backgroundColor:p.bgBorderColor.line1,"& > .btn-list-item-icon":{"& > svg":{color:p.thmemColor.primary}},"& > .btn-list-item-label":{color:p.thmemColor.primary}},"& > .btn-list-item-icon":{width:"16px",marginRight:"5px","& > svg":{fontSize:"16px",color:p.textColor.primary,verticalAlign:"top",position:"relative","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}}},"& > .btn-list-item-label":{fontSize:"12px",color:p.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap"}}},"& > .logo":{display:"flex",padding:"0 15px",alignItems:"center",height:"100%","& > img":{height:"30px",width:"auto"},"& > span":{fontSize:"12px",color:p.textColor.primary,width:"100%",fontWeight:"700",whiteSpace:"nowrap",marginLeft:"10px"}}},"menu-popover":{paddingTop:"5px",zIndex:10,"& > .menu-popover-box":{boxShadow:p.boxShadow,borderRadius:p.borderRadius,backgroundColor:"white",color:p.textColor.primary,"& > .menu-popover-item":{width:"140px",height:"30px",padding:"0 10px",display:"flex",alignItems:"center",cursor:"pointer","&:hover":{backgroundColor:p.bgBorderColor.line1,"& > .icon":{"& > svg":{color:p.thmemColor.primary}},"& > .label":{color:p.thmemColor.primary}},"& > .icon":{marginRight:"10px","& > svg":{fontSize:"16px",color:p.textColor.primary,verticalAlign:"top",position:"relative"}},"& > .label":{fontSize:"12px",color:p.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap",textAlign:"left"},"&.menu-popover-item-select":{"& > .icon":{"& > svg":{color:p.thmemColor.primary}},"& > .label":{color:p.thmemColor.primary}}}}}})})),h=function(e){var n,r=e.backSelfcare,o=void 0===r?{}:r,i=e.customize,a=e.onClick,l=e.className,u=function(e){a&&a(e)};return t().createElement(t().Fragment,null,i||t().createElement("div",{className:(n="back-btn",l&&(n+=" "+l),n)},t().createElement(c.default,{startIcon:o.icon,variant:"contained",onClick:u},o.label)))},v=function(n){var r=d(n),o=n.language,i=void 0===o?[]:o,a=n.selectLang,c=void 0===a?"":a,m=n.onClick,p=n.expansion,g=void 0===p||p,f=n.className,h=n.customize,v=s((0,e.useState)(!1),2),x=v[0],b=v[1],y=s((0,e.useState)({}),2),E=y[0],C=y[1],w=s((0,e.useState)({}),2),S=w[0],k=w[1],N=s((0,e.useState)(!1),2),z=N[0],M=N[1],F=s((0,e.useState)(null),2),T=F[0],I=F[1],L=s((0,e.useState)({}),1)[0];(0,e.useEffect)((function(){var e=E[c]||{};k(e)}),[c,E]),(0,e.useEffect)((function(){for(var e={},t=0,n=i.length;t<n;t++){var r=i[t];r.value&&(e[r.value]=r)}C(e)}),[i]);var A,O=function(e){return function(){m&&m(e.value,e),b(!1),M(!1)}},P=function(e){L.timer=setTimeout((function(){M(!1),I(null)}),100)},B=function(e){return function(t){clearTimeout(L.timer),M(!0),e&&I(t.target)}},R=(0,e.useMemo)((function(){return t().createElement("div",{className:"language-item",onMouseLeave:P,onMouseEnter:B(!0)},t().createElement(t().Fragment,null,S.icon&&t().createElement("span",{className:"language-item-icon"},S.icon),t().createElement("span",{className:"language-item-label"},S.label)))}),[g,S,i,x,L]),j=(0,e.useMemo)((function(){var e=function(e){var t="menu-popover-item";return e.value===S.value&&(t+=" menu-popover-item-select"),t},n=function(){return t().createElement(u.Popper,{open:z,anchorEl:T,disablePortal:!0,placement:"bottom-end",onMouseLeave:P,onMouseEnter:B(!1),className:(n=r["menu-popover"],n+=" menu-popover")},t().createElement("div",{className:"menu-popover-box"},i.map((function(n,r){return t().createElement("div",{className:e(n),key:r,onClick:O(n)},n.icon&&t().createElement("span",{className:"icon"},n.icon),t().createElement("span",{className:"label"},n.label))}))));var n};return(0,l.createPortal)(t().createElement(n,null),document.getElementsByTagName("body")[0])}),[i,S,r,z,T,L,m]);return t().createElement(t().Fragment,null,h||t().createElement("div",{className:(A="language",f&&(A+=" "+f),z&&(A+=" language-select"),A)},R,z&&j))},x=function(n){var r,o=n.list,i=void 0===o?[]:o,a=n.expansion,l=void 0===a||a,c=n.customize,u=n.className,m=n.onClick,s=function(e){return function(t){m&&m(e,t)}},p=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,i.map((function(e,n){return t().createElement("div",{className:"btn-list-item",key:n,onClick:s(e)},function(e){return l?t().createElement(t().Fragment,null,e.icon&&t().createElement("span",{className:"btn-list-item-icon"},e.icon),t().createElement("span",{className:"btn-list-item-label"},e.label)):e.icon?t().createElement("span",{className:"btn-list-item-icon"},e.icon):e.label?"string"==typeof e.label?t().createElement("span",{className:"btn-list-item-icon"},e.label[0]):t().createElement("span",{className:"btn-list-item-label"},e.label):void 0}(e))})))}),[i,l]);return t().createElement(t().Fragment,null,c||t().createElement("div",{className:(r="btn-list",u&&(r+=" "+u),l||(r+=" btn-list-shrink"),r)},p))},b=function(e){var n,r=e.user,o=void 0===r?{}:r,i=e.customize,a=e.className,l=e.onClick;return t().createElement(t().Fragment,null,i||t().createElement("div",{className:(n="logo",a&&(n+=" "+a),n),onClick:function(e){l&&l(e)}},t().createElement(t().Fragment,null,o.img&&t().createElement("img",{src:o.img,alt:""}),o.label&&t().createElement("span",null,o.label))))},y=function(n){var r,o=d(n),i=n.className,a=void 0===i?"":i,l=n.expansion,c=void 0===l||l,u=n.backSelfcareProps,s=n.languageProps,p=n.btnListProps,g=n.userProps,f=n.customize,y=(0,e.useMemo)((function(){return u&&t().createElement(h,m({},u,{expansion:c}))}),[u,c]),E=(0,e.useMemo)((function(){return s&&t().createElement(v,m({},s,{expansion:c}))}),[s,c]),C=(0,e.useMemo)((function(){return p&&t().createElement(x,m({},p,{expansion:c}))}),[p,c]),w=(0,e.useMemo)((function(){return g&&t().createElement(b,m({},g,{expansion:c}))}),[g,c]);return t().createElement(t().Fragment,null,f||t().createElement("div",{className:(r=o["horizontal-meun-right"],a&&(r+=" "+a),r)},y,E,C,w))},E=g(6028),C=g.n(E),w=g(1609),S=g(6090),k=g.n(S),N=g(3475);function z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function M(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var F=(0,r.Z)(),T=(0,n.makeStyles)((function(){return(0,n.createStyles)({"horizontal-menu-list":{height:"100%",width:"100%",lineHeight:"0",overflow:"hidden","& > .horizontal-menu-list-item":{padding:"0 20px",height:"100%",display:"flex",alignItems:"center",cursor:"pointer",position:"relative",whiteSpace:"nowrap",float:"left","&:after":{position:"absolute",left:"0",top:"0",content:'""',zIndex:1},"&:hover":{backgroundColor:F.bgBorderColor.line1,"& > .menu-item-icon":{"& > svg":{color:F.thmemColor.primary}},"& > .menu-item-label":{color:F.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:F.thmemColor.primary}}},"& > .menu-item-icon":{"& > svg":{fontSize:"16px",color:F.textColor.primary,marginRight:"5px"}},"& > .menu-item-label":{fontSize:"12px",color:F.textColor.primary,whiteSpace:"nowarp"},"& > .menu-item-arrow":{"& > svg":{fontSize:"16px",transition:"all .3s",color:F.textColor.primary,marginLeft:"2px"}},"&.horizontal-menu-list-item-select":{"& > .menu-item-icon":{"& > svg":{color:F.thmemColor.primary}},"& > .menu-item-label":{color:F.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:F.thmemColor.primary}}},"&.horizontal-menu-list-item-hover":{backgroundColor:F.bgBorderColor.line1,"& > .menu-item-icon":{"& > svg":{color:F.thmemColor.primary}},"& > .menu-item-label":{color:F.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:F.thmemColor.primary}}}}},"menu-item-popper":{paddingTop:"5px","& > .menu-item-popper-content":{"& > .menu-item-popper-content-item":{"&:first-child:after":{width:"100%",height:"100%",content:'""',position:"absolute",left:"0",top:"-5px",zIndex:-1}}},"& .menu-item-popper, &.menu-item-popper":{zIndex:10,"& > .menu-item-popper-content":{boxShadow:F.boxShadow,borderRadius:F.borderRadius,backgroundColor:"white",color:F.textColor.primary,"& > .menu-item-popper-content-item":{position:"relative","& > .menu-item-popper-content-item-content":{width:"140px",height:"30px",padding:"0 10px",display:"flex",cursor:"pointer",alignItems:"center","&:hover":{backgroundColor:F.bgBorderColor.line1,"& > .menu-item-icon":{"& > svg":{color:F.thmemColor.primary}},"& > .menu-item-label":{color:F.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:F.thmemColor.primary}}},"& > .menu-item-icon":{width:"16px",marginRight:"10px","& > svg":{fontSize:"16px",color:F.textColor.primary,verticalAlign:"top",position:"relative","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}},"& > .opacity-pos-svg":{opacity:"0"}},"& > .menu-item-label":{fontSize:"12px",color:F.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap",textAlign:"left"},"& > .menu-item-arrow":{width:"16px","& > svg":{fontSize:"16px",transition:"all .3s",color:F.textColor.primary,verticalAlign:"top",position:"relative",transform:"rotate(270deg)","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}},"& > .opacity-pos-svg":{opacity:"0"}},"& > .menu-item-popper":{paddingLeft:"5px"}},"&.menu-item-popper-content-item-select":{"& > .menu-item-popper-content-item-content":{"& > .menu-item-icon":{"& > svg":{color:F.thmemColor.primary}},"& > .menu-item-label":{color:F.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:F.thmemColor.primary}}}}}},"& .menu-item-popper":{position:"absolute",transform:"none !important",left:"100% !important",top:"0"}}}})})),I=function(n){var r=n.open,o=void 0!==r&&r,i=n.anchorEl,a=n.idMenuLast,c=n.selectMenu,m=void 0===c?"":c,s=n.onClickMenu,p=n.list,g=void 0===p?[]:p,f=n.onMouseEnter,d=n.onMouseLeave,h=n.level,v=void 0===h?1:h,x=n.className,b=z((0,e.useState)(null),2),y=b[0],E=b[1],S=z((0,e.useState)(null),2),k=S[0],N=S[1],M=z((0,e.useState)([]),2),F=M[0],T=M[1],L=z((0,e.useState)({}),1)[0],A=function(e,t){return function(n){var r;r=n,clearTimeout(L.leaveTimer),L.leaveTimer=setTimeout((function(){1===v&&f&&f();var n=[e];e.children&&e.children.length>0&&(n=e.children);var o=r.target;N(o),T(n),E(t)}),50)}},O=function(e){return function(t){e.children&&e.children.length>0||(s&&s(e),d&&d())}},P=function(e){var t="menu-item-popper-content-item",n=a&&a[m];return n&&-1!==n.indexOf(e.path)&&(t+=" menu-item-popper-content-item-select"),t},B=function(){var e="menu-item-popper";return x&&(e+=" "+x),e},R=(0,e.useCallback)((function(e,n){return t().createElement(t().Fragment,null,e.children&&e.children.length>0&&y===n&&t().createElement(I,{open:y===n,anchorEl:k,list:F,idMenuLast:a,selectMenu:m,onClickMenu:s,onMouseEnter:f,onMouseLeave:d,level:v+1}))}),[y,k,F,a,m,s,f,d,v]),j=(0,e.useMemo)((function(){return t().createElement("div",{className:"menu-item-popper-content"},g.map((function(e,n){var r=function(e){var t=e.icon;if(t){var n=w[t];return n?n():t}}(e),o=function(e){var n=e.children;if(n&&n.length>0)return t().createElement(C(),null)}(e);return t().createElement("div",{className:P(e),onMouseLeave:function(e){clearTimeout(L.leaveTimer),L.leaveTimer=setTimeout((function(){1===v&&d&&d(),E(null),N(null),T([])}))},onMouseEnter:A(e,n),key:n},t().createElement("div",{className:"menu-item-popper-content-item-content",onClick:O(e)},r&&t().createElement("span",{className:"menu-item-icon"},r),t().createElement("span",{className:"menu-item-label"},e.label),o&&t().createElement("span",{className:"menu-item-arrow"},o),R(e,n)))})))}),[g,s,y,k,F,a,m,s,f,d,v]),D=function(){return 1!==v?t().createElement("div",{className:B()},j):t().createElement(u.Popper,{open:o,anchorEl:i,disablePortal:!0,placement:"bottom-start",className:B()},j)};return t().createElement(t().Fragment,null,1===v?(0,l.createPortal)(t().createElement(D,null),document.getElementsByTagName("body")[0]):t().createElement(D,null))},L=function(n){var r=n.list,o=void 0===r?[]:r,i=n.selectMenu,a=void 0===i?"":i,l=n.onClickMenu,c=n.className,u=n.moreCustomize,m=T(n),s=z((0,e.useState)(!1),2),p=s[0],g=s[1],f=z((0,e.useState)(null),2),d=f[0],h=f[1],v=z((0,e.useState)(null),2),x=v[0],b=v[1],y=z((0,e.useState)([]),2),E=y[0],S=y[1],F=z((0,e.useState)(""),2),L=F[0],A=F[1],O=z((0,e.useState)({}),2),P=O[0],B=O[1],R=z((0,e.useState)({}),2),j=R[0],D=R[1],q=z((0,e.useState)("horizontal-menu-list-"+(0,N.UUID)()),1)[0],W=z((0,e.useState)(null),2),H=W[0],Z=W[1],U=z((0,e.useState)({}),1)[0];(0,e.useEffect)((function(){a!==L&&A(a)}),[a]),(0,e.useEffect)((function(){return J(o),Y(),window.addEventListener("resize",Y),function(){window.removeEventListener("resize",Y)}}),[o]);var _,Y=function(){clearTimeout(U.timerResize),G(),U.timerResize=setTimeout((function(){Z(o.length),$()}),100)},$=function(e){if(null!==e&&0!==e){void 0===e&&(e=o.length);var t=document.querySelector("."+q);if(t)if(t.scrollHeight>t.clientHeight){var n=Number(e)-1;Z(n),$(n)}else o.length<=e&&G()}},G=function(){},J=function(e){var t={},n={},r={},o={},i=function(e,a,l){for(var c=0,u=e.length;c<u;c++){var m=e[c],s=m.path;t[s]=m;var p=void 0===l?c:l;if(a){var g=(0,N.DeepClone)(n[a.path]||[]);g.push(s),n[s]=M(g)}else n[s]=[s];m.children&&m.children.length>0?i(m.children,m,p):(r[s]=n[s],o[s]=p)}};i(e),D(o),B(r)},K=function(e,t){return function(n){clearTimeout(U.leaveTimer);var r=[];e.children&&e.children.length>0&&(r=e.children),h(t),b(n.target),S(r),g(!0)}},Q=function(){g(!1),b(null),S([]),h(null)},V=function(){clearTimeout(U.leaveTimer)},X=function(){Q()},ee=function(e){l&&l(e)},te=function(e,t){var n=" horizontal-menu-list-item",r=P[L];return r&&-1!==r.indexOf(e.path)&&(n+=" horizontal-menu-list-item-select"),d===t&&(n+=" horizontal-menu-list-item-hover"),n},ne=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,p&&t().createElement(I,{open:p,anchorEl:x,list:E,idMenuLast:P,selectMenu:L,onClickMenu:ee,onMouseEnter:V,onMouseLeave:X,className:m["menu-item-popper"],level:1}))}),[p,x,E,P,L,l,U]),re=function(e){clearTimeout(U.leaveTimer);for(var t=[],n=Number(H),r=o.length;n<r;n++)t.push(o[n]);h(H),b(e.target),S(t),g(!0)},oe=function(){clearTimeout(U.leaveTimer),U.leaveTimer=setTimeout((function(){Q()}),100)},ie=function(){var e=" horizontal-menu-list-item",t=j[L];return null!==H&&H<=t&&(e+=" horizontal-menu-list-item-select"),d===H&&(e+=" horizontal-menu-list-item-hover"),e};return t().createElement("div",{className:(_=m["horizontal-menu-list"],_+=" horizontal-menu-list",c&&(_+=" "+c),q&&(_+=" "+q),_)},o.map((function(e,n){if(null!==H&&H<=n)return null;var r=function(e){var t=e.icon;if(t){var n=w[t];return n?n():t}}(e),o=function(e){var n=e.children;if(n&&n.length>0)return t().createElement(C(),null)}(e);return t().createElement("div",{key:n,onClick:function(){ee(e)},onMouseEnter:K(e,n),onMouseLeave:function(e){clearTimeout(U.leaveTimer),U.leaveTimer=setTimeout((function(){Q()}),100)},className:te(e,n)},r&&t().createElement("span",{className:"menu-item-icon"},r),t().createElement("span",{className:"menu-item-label"},e.label),o&&t().createElement("span",{className:"menu-item-arrow"},o))})),function(){if(null!==H&&o.length>H)return t().createElement("div",{onMouseEnter:re,onMouseLeave:oe,className:ie()},u||t().createElement("span",{className:"menu-item-icon"},t().createElement(k(),null)))}(),ne)},A=g(5295),O=g.n(A),P=g(9387),B=g.n(P);function R(){return(R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var D=(0,r.Z)(),q=(0,n.makeStyles)((function(){return(0,n.createStyles)({"horizontal-menu":{height:"50px",width:"100%",display:"flex",justifyContent:"space-between",boxShadow:D.boxShadow,"& > .horizontal-menu-left":{display:"flex",width:"100%","& > .logo":{width:"200px","&.logo-split":{paddingTop:"6px",paddingRight:"15px"},"&.logo-full":{marginRight:"15px"}},"& > .horizontal-expansion":{display:"flex",alignItems:"center",cursor:"pointer"},"& > .horizontal-menu-list-box":{width:"calc(100% - 200px)"}},"& > .horizontal-menu-right":{},"&.horizontal-menu-shrink":{"& > .horizontal-menu-left":{"& > .logo":{"&.logo-split":{padding:"0"}}},"&.horizontal-menu-logo-expansion":{"& > .horizontal-menu-left":{"& > .logo":{"&.logo-split":{padding:"6px 15px 0 20px"}}}}},"&.horizontal-menu-no-logo":{"& > .horizontal-menu-left":{"& > .horizontal-menu-list-box":{width:"100%"}}},"&.horizontal-menu-show-expansion":{"& > .horizontal-menu-left":{"& > .horizontal-menu-list-box":{width:"calc(100% - 215px)"}}},"&.horizontal-menu-logo-full":{"& > .horizontal-menu-left":{"& > .horizontal-menu-list-box":{width:"calc(100% - 215px)"}},"&.horizontal-menu-show-expansion":{"& > .horizontal-menu-left":{"& > .horizontal-menu-list-box":{width:"calc(100% - 230px)"}}}}}})})),W=function(n){var r=n.logoProps,o=n.menuListProps,i=n.footerProps,l=n.expansion,c=void 0===l||l,u=n.onClickExpansion,m=n.selectMenu,s=n.onClickMenu,p=n.showExpansion,g=void 0!==p&&p,f=n.footerExpansionProps,d=n.className,h=q(n),v=j((0,e.useState)(!0),2),x=v[0],b=v[1];(0,e.useEffect)((function(){c!==x&&b(c)}),[c]);var E,C=function(){u&&u(!x)},w=(0,e.useMemo)((function(){return n.logoProps&&r&&void 0===n.logoProps.expansion&&(r.expansion=!0),n.logoProps&&t().createElement(a,R({expansion:x},r))}),[x,r]),S=(0,e.useMemo)((function(){if(!g)return null;var e=f||{},n=e.customizeContent,r=e.expandIcon,o=e.shrinkIcon,i=e.className;if(n)return n;var a;return t().createElement("div",{className:(a="horizontal-expansion",i&&(a+=" "+i),a)},x?r||t().createElement(O(),{onClick:C}):o||t().createElement(B(),{onClick:C}))}),[x,u,g,f]),k=(0,e.useMemo)((function(){return n.menuListProps&&t().createElement("div",{className:"horizontal-menu-list-box"},t().createElement(L,R({},o,{expansion:x,selectMenu:m,onClickMenu:s})))}),[o,x,m,s]),N=(0,e.useMemo)((function(){return n.footerProps&&t().createElement(y,R({},i,{expansion:x}))}),[i,x]);return t().createElement("div",{className:(E=h["horizontal-menu"],E+=" paraui-horizontal-menu",d&&(E+=" "+d),x||(E+=" horizontal-menu-shrink"),r||(E+=" horizontal-menu-no-logo"),r&&r.expansion&&(E+=" horizontal-menu-logo-expansion"),r&&"full"===r.mode&&(E+=" horizontal-menu-logo-full"),g&&(E+=" horizontal-menu-show-expansion"),E)},t().createElement("div",{className:"horizontal-menu-left"},w,S,k),t().createElement("div",{className:"horizontal-menu-right"},N))};function H(){return(H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function U(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var _=(0,r.Z)(),Y=(0,n.makeStyles)((function(){return(0,n.createStyles)({"vertical-menu-list":{overflow:"hidden",height:"100%",padding:"30px 0",position:"relative","& > .scroll-top":{position:"absolute",top:"0",left:"0",width:"100%",height:"30px",textAlign:"center","& > svg":{color:_.textColor.primary,cursor:"pointer",verticalAlign:"top",marginTop:"7px",transform:"rotate(180deg)","&:hover":{color:_.thmemColor.primary}}},"& > .vertical-menu-list-box":{height:"100%",overflow:"hidden","& > .vertical-menu-list-box-srcoll":{transition:"all .3s","& .vertical-menu-list-item":{"& > .vertical-menu-list-item-content":{height:"40px",lineHeight:"40px",cursor:"pointer",display:"flex","&:hover":{backgroundColor:_.bgBorderColor.line1,"& > .menu-item-icon":{"& > svg":{color:_.thmemColor.primary}},"& > .menu-item-label":{color:_.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:_.thmemColor.primary}}},"& > .menu-item-icon":{width:"16px",marginRight:"10px","& > svg":{fontSize:"16px",color:_.textColor.primary,verticalAlign:"top",position:"relative",top:"12px"},"& > .opacity-pos-svg":{opacity:"0"}},"& > .menu-item-label":{fontSize:"12px",color:_.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap"},"& > .menu-item-arrow":{width:"16px","& > svg":{fontSize:"16px",transition:"all .3s",color:_.textColor.primary,verticalAlign:"top",position:"relative",top:"12px"},"& > .opacity-pos-svg":{opacity:"0"}}},"&.vertical-menu-list-item-open":{backgroundColor:_.bgBorderColor.bg2,"& > .vertical-menu-list-item-content":{"& > .menu-item-arrow":{"& > svg":{transform:"rotate(180deg)"}}}},"&.vertical-menu-list-item-select":{"& > .vertical-menu-list-item-content":{"& > .menu-item-icon":{"& > svg":{color:_.thmemColor.primary}},"& > .menu-item-label":{color:_.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:_.thmemColor.primary}}}}},"& .vertical-menu-list-item-shrink":{height:"40px",lineHeight:"40px","&:hover":{"& > span":{color:_.thmemColor.primary,backgroundColor:_.bgBorderColor.line1,"& > svg":{color:_.thmemColor.primary}}},"& > span":{display:"inline-block",width:"100%",height:"100%",color:_.textColor.primary,textAlign:"center",fontSize:"12px",cursor:"pointer",position:"relative","&:after":{content:'""',position:"absolute",width:"100%",height:"100%",left:"0",top:"0",zIndex:1},"& > svg":{verticalAlign:"top",position:"relative",top:"12px",fontSize:"16px",color:_.textColor.primary}},"&.vertical-menu-list-item-shrink-select":{"& > span":{color:_.thmemColor.primary,"& > svg":{color:_.thmemColor.primary}}},"&.vertical-menu-list-item-shrink-hover":{"& > span":{color:_.thmemColor.primary,backgroundColor:_.bgBorderColor.line1,"& > svg":{color:_.thmemColor.primary}}}}}},"& > .scroll-bottom":{position:"absolute",bottom:"0",left:"0",width:"100%",height:"30px",textAlign:"center","& > svg":{color:_.textColor.primary,cursor:"pointer",verticalAlign:"top",marginTop:"7px","&:hover":{color:_.thmemColor.primary}}}},"vertical-menu-item-popper":{"& .vertical-menu-item-popper, &.vertical-menu-item-popper":{paddingLeft:"5px",zIndex:10,"& > .menu-item-popper-content":{boxShadow:_.boxShadow,borderRadius:_.borderRadius,backgroundColor:"white",color:_.textColor.primary,"& > .menu-item-popper-content-item":{position:"relative","&:after":{position:"absolute",left:"-5px",top:"0",width:"100%",height:"40px",zIndex:-1,content:'""'},"& > .menu-item-popper-content-item-content":{width:"200px",height:"40px",padding:"0 10px",display:"flex",cursor:"pointer","&:hover":{backgroundColor:_.bgBorderColor.line1,"& > .menu-item-icon":{"& > svg":{color:_.thmemColor.primary}},"& > .menu-item-label":{color:_.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:_.thmemColor.primary}}},"& > .menu-item-icon":{width:"16px",marginRight:"10px","& > svg":{fontSize:"16px",color:_.textColor.primary,verticalAlign:"top",position:"relative",top:"12px","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}},"& > .opacity-pos-svg":{opacity:"0"}},"& > .menu-item-label":{fontSize:"12px",color:_.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap",textAlign:"left",lineHeight:"40px"},"& > .menu-item-arrow":{width:"16px","& > svg":{fontSize:"16px",transition:"all .3s",color:_.textColor.primary,verticalAlign:"top",position:"relative",top:"12px",transform:"rotate(270deg)","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}},"& > .opacity-pos-svg":{opacity:"0"}}},"&.menu-item-popper-content-item-select":{"& > .menu-item-popper-content-item-content":{"& > .menu-item-icon":{"& > svg":{color:_.thmemColor.primary}},"& > .menu-item-label":{color:_.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:_.thmemColor.primary}}}}}},"& .vertical-menu-item-popper":{position:"absolute",transform:"none !important",left:"100% !important",top:"0"}}}})})),$=function(n){var r=n.label,o=(n.type,n.path),i=n.icon,a=n.children,l=n.className,c=n.level,m=void 0===c?1:c,s=n.selectMenu,p=void 0===s?"":s,g=n.idMenuLast,f=n.onClickMenu,d=n.shrinkOthers,h=void 0===d||d,v=Z((0,e.useState)(!1),2),x=v[0],b=v[1];(0,e.useEffect)((function(){var e=g[p];e&&-1!==e.indexOf(o)&&e.length>1?b(!0):h&&b(!1)}),[g,p,o]);var y=function(){if(a&&a.length>0)return f&&f(!1),b(!x);f&&f(n)},E=(0,e.useMemo)((function(){return t().createElement("div",{onClick:y,className:"vertical-menu-list-item-content",style:{paddingLeft:15*m+"px",paddingRight:"15px"}},t().createElement("span",{className:"menu-item-icon"},function(){if(i){var e=w[i];return e?e():i}return t().createElement(C(),{className:"opacity-pos-svg"})}()),t().createElement("span",{className:"menu-item-label"},r),t().createElement("span",{className:"menu-item-arrow"},a&&a.length>0?t().createElement(C(),null):t().createElement(C(),{className:"opacity-pos-svg"})))}),[a,f,x,m,i,r]),S=(0,e.useMemo)((function(){return t().createElement(u.Collapse,{in:x,className:"li-collapse",timeout:"auto"},a&&a.length>0&&a.map((function(e,n){return t().createElement($,H({key:n},e,{level:m+1,idMenuLast:g,selectMenu:p,onClickMenu:f,shrinkOthers:h}))})))}),[x,a,m,g,p,f,h]);return t().createElement("div",{className:function(){var e="vertical-menu-list-item";x&&(e+=" vertical-menu-list-item-open"),l&&(e+=" "+l);var t=g[p];return t&&-1!==t.indexOf(o)&&(e+=" vertical-menu-list-item-select"),e}()},E,S)},G=function(n){var r=n.open,o=void 0!==r&&r,i=n.anchorEl,a=n.idMenuLast,c=n.selectMenu,m=void 0===c?"":c,s=n.onClickMenu,p=n.list,g=void 0===p?[]:p,f=n.onMouseEnter,d=n.onMouseLeave,h=n.level,v=void 0===h?1:h,x=n.className,b=Z((0,e.useState)(null),2),y=b[0],E=b[1],S=Z((0,e.useState)(null),2),k=S[0],N=S[1],z=Z((0,e.useState)([]),2),M=z[0],F=z[1],T=Z((0,e.useState)({}),1)[0],I=function(e,t){return function(n){var r;r=n,clearTimeout(T.leaveTimer),T.leaveTimer=setTimeout((function(){1===v&&f&&f();var n=[e];e.children&&e.children.length>0&&(n=e.children);var o=r.target;N(o),F(n),E(t)}),50)}},L=function(e){return function(t){e.children&&e.children.length>0||(s&&s(e),d&&d())}},A=function(e){var t="menu-item-popper-content-item",n=a&&a[m];return n&&-1!==n.indexOf(e.path)&&(t+=" menu-item-popper-content-item-select"),t},O=function(){var e="vertical-menu-item-popper";return x&&(e+=" "+x),e},P=(0,e.useCallback)((function(e,n){return t().createElement(t().Fragment,null,e.children&&e.children.length>0&&y===n&&t().createElement(G,{open:y===n,anchorEl:k,list:M,idMenuLast:a,selectMenu:m,onClickMenu:s,onMouseEnter:f,onMouseLeave:d,level:v+1}))}),[y,k,M,a,m,s,f,d,v]),B=(0,e.useMemo)((function(){return t().createElement("div",{className:"menu-item-popper-content"},g.map((function(e,n){return t().createElement("div",{className:A(e),onMouseLeave:function(e){clearTimeout(T.leaveTimer),T.leaveTimer=setTimeout((function(){1===v&&d&&d(),E(null),N(null),F([])}))},onMouseEnter:I(e,n),key:n},t().createElement("div",{className:"menu-item-popper-content-item-content",onClick:L(e)},t().createElement("span",{className:"menu-item-icon"},function(e){if(e){var n=w[e];return n?n():e}return t().createElement(C(),{className:"opacity-pos-svg"})}(e.icon)),t().createElement("span",{className:"menu-item-label"},e.label),t().createElement("span",{className:"menu-item-arrow"},(r=e.children)&&r.length>0?t().createElement(C(),null):t().createElement(C(),{className:"opacity-pos-svg"})),P(e,n)));var r})))}),[g,s,y,k,M,a,m,s,f,d,v]),R=function(){return 1!==v?t().createElement("div",{className:O()},B):t().createElement(u.Popper,{open:o,anchorEl:i,disablePortal:!0,placement:"right-start",className:O()},B)};return t().createElement(t().Fragment,null,1===v?(0,l.createPortal)(t().createElement(R,null),document.getElementsByTagName("body")[0]):t().createElement(R,null))},J=function(e){if(!e)return 0;try{var t=e.match(/translate3d\((.*)px, (.*)px, (.*)px\)/);return Number(t&&t[2])}catch(e){}return 0},K=function(n){var r=n.list,o=void 0===r?[]:r,i=n.expansion,a=void 0===i||i,l=n.selectMenu,c=void 0===l?"":l,u=n.onClickMenu,m=n.className,s=n.shrinkOthers,p=void 0===s||s,g=Y(n),f=Z((0,e.useState)(!1),2),d=f[0],h=f[1],v=Z((0,e.useState)(null),2),x=v[0],b=v[1],y=Z((0,e.useState)(null),2),E=y[0],S=y[1],k=Z((0,e.useState)([]),2),z=k[0],M=k[1],F=Z((0,e.useState)(""),2),T=F[0],I=F[1],L=Z((0,e.useState)({}),2),A=L[0],O=L[1],P=Z((0,e.useState)({prev:!1,next:!1}),2),B=P[0],R=P[1],j=Z((0,e.useState)({}),1)[0],D=t().useRef();(0,e.useEffect)((function(){c!==T&&I(c),W()}),[c]),(0,e.useEffect)((function(){V(o),W()}),[o]);var q,W=function(){var e=Q(),t=e.min,n=e.max,r=J(D.current.style.transform);R({prev:r!==t,next:r>n})},_=function(e){return function(){var t=J(D.current.style.transform);switch(e){case"next":t-=100;break;case"prev":t+=100}K(t)}},K=function(e){var t=Q(),n=t.min,r=t.max;e>n&&(e=n),e<r&&(e=r),R({prev:e!==n,next:e>r}),D.current.style.transform="translate3d(0, ".concat(e,"px, 0)")},Q=function(){var e=D.current.parentNode.getBoundingClientRect().height,t=-(D.current.getBoundingClientRect().height-e);return e>D.current.getBoundingClientRect().height&&(t=0),{min:0,max:t}},V=function(e){var t={},n={},r={},o=function(e,i){for(var a=0,l=e.length;a<l;a++){var c=e[a],u=c.path;if(t[u]=c,i){var m=(0,N.DeepClone)(n[i.path]||[]);m.push(u),n[u]=U(m)}else n[u]=[u];c.children&&c.children.length>0?o(c.children,c):r[u]=n[u]}};o(e),O(r)},X=function(e,t){return function(n){clearTimeout(j.leaveTimer);var r=[e];e.children&&e.children.length>0&&(r=e.children),b(t),S(n.target),M(r),h(!0)}},ee=function(){h(!1),S(null),M([]),b(null)},te=function(){clearTimeout(j.leaveTimer)},ne=function(){ee()},re=function(e){if(!1===e)return setTimeout((function(){W()}),300);u&&u(e)},oe=function(e,t){var n="vertical-menu-list-item-shrink",r=A[T];return r&&-1!==r.indexOf(e.path)&&(n+=" vertical-menu-list-item-shrink-select"),x===t&&(n+=" vertical-menu-list-item-shrink-hover"),n},ie=(0,e.useMemo)((function(){if(a)return o.map((function(e,n){return t().createElement($,H({},e,{key:n,level:1,idMenuLast:A,selectMenu:T,onClickMenu:re,shrinkOthers:p}))}))}),[a,o,A,T,u,p]),ae=(0,e.useMemo)((function(){return a?null:o.map((function(e,n){return t().createElement("div",{className:oe(e,n),onMouseEnter:X(e,n),onMouseLeave:function(e){clearTimeout(j.leaveTimer),j.leaveTimer=setTimeout((function(){ee()}),100)},key:n},t().createElement("span",null,function(e){var t=e.icon,n=e.label;if(t){var r=w[t];return r?r():t}if(n)return n[0]}(e)))}))}),[a,o,A,T,x]),le=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,B.prev&&t().createElement("span",{className:"scroll-top"},t().createElement(C(),{onClick:_("prev")})))}),[B]),ce=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,B.next&&t().createElement("span",{className:"scroll-bottom"},t().createElement(C(),{onClick:_("next")})))}),[B]),ue=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,d&&t().createElement(G,{open:d,anchorEl:E,list:z,idMenuLast:A,selectMenu:T,onClickMenu:re,onMouseEnter:te,onMouseLeave:ne,className:g["vertical-menu-item-popper"],level:1}))}),[d,E,z,A,T,u,j]);return t().createElement(t().Fragment,null,t().createElement("div",{className:(q=g["vertical-menu-list"],q+=" vertical-menu-list",m&&(q+=" "+m),q),onWheel:function(e){return function(e){var t=e.deltaY,n=J(D.current.style.transform);K(n-=t)}(e)}},le,t().createElement("div",{className:"vertical-menu-list-box"},t().createElement("div",{className:"vertical-menu-list-box-srcoll",ref:D},ie,ae)),ce),ue)};function Q(){return(Q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var X=(0,r.Z)(),ee=(0,n.makeStyles)((function(){return(0,n.createStyles)({"vertical-footer":{paddingBottom:"20px","& > .line":{width:"calc(100% - 30px)",borderTop:"1px solid "+X.bgBorderColor.line1,paddingBottom:"20px",margin:"0 auto"},"& > .back-btn":{padding:"0 15px",marginBottom:"10px","& > button":{width:"100%",whiteSpace:"nowrap",boxShadow:"none","& svg":{color:"white"}},"&.back-btn-shrink":{padding:"0","& > button":{minWidth:"inherit",borderRadius:"0","& > span":{"& > span":{margin:"0"}}}}},"& > .language":{"& .language-item":{height:"40px",lineHeight:"40px",display:"flex",padding:"0 15px",cursor:"pointer","&:hover":{backgroundColor:X.bgBorderColor.line1,"& > .language-item-icon":{"& > svg":{color:X.thmemColor.primary}},"& > .language-item-label":{color:X.thmemColor.primary},"& > .language-item-arrow":{"& > svg":{color:X.thmemColor.primary}}},"& > .language-item-icon":{width:"16px",marginRight:"10px","& > svg":{fontSize:"16px",color:X.textColor.primary,verticalAlign:"top",position:"relative",top:"12px"},"& > .opacity-pos-svg":{opacity:"0"}},"& > .language-item-label":{fontSize:"12px",color:X.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap"},"& > .language-item-arrow":{width:"16px","& > svg":{fontSize:"16px",transition:"all .3s",color:X.textColor.primary,verticalAlign:"top",position:"relative",top:"12px"},"& > .opacity-pos-svg":{opacity:"0"}}},"& > .li-collapse":{"& .language-item":{paddingLeft:"30px","&.language-item-select":{"& > .language-item-icon":{"& > svg":{color:X.thmemColor.primary}},"& > .language-item-label":{color:X.thmemColor.primary},"& > .language-item-arrow":{"& > svg":{color:X.thmemColor.primary}}}}},"&.language-shrink":{"& .language-item":{justifyContent:"center",padding:"0",textAlign:"center","& > .language-item-icon":{marginRight:"0",width:"100%",position:"relative","&:after":{content:'""',position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:10}}}},"&.language-select":{"& .language-item":{backgroundColor:X.bgBorderColor.line1,"& > .language-item-icon":{"& > svg":{color:X.thmemColor.primary}},"& > .language-item-label":{color:X.thmemColor.primary}}}},"& > .btn-list":{"& > .btn-list-item":{height:"40px",lineHeight:"40px",display:"flex",padding:"0 15px",cursor:"pointer","&:hover":{backgroundColor:X.bgBorderColor.line1,"& > .btn-list-item-icon":{"& > svg":{color:X.thmemColor.primary}},"& > .btn-list-item-label":{color:X.thmemColor.primary}},"& > .btn-list-item-icon":{width:"16px",marginRight:"10px","& > svg":{fontSize:"16px",color:X.textColor.primary,verticalAlign:"top",position:"relative",top:"12px","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}},"& > .opacity-pos-svg":{opacity:"0"}},"& > .btn-list-item-label":{fontSize:"12px",color:X.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap"},"&.btn-list-item-select":{backgroundColor:X.bgBorderColor.line1,"& > .btn-list-item-icon":{"& > svg":{color:X.thmemColor.primary}},"& > .btn-list-item-label":{color:X.thmemColor.primary}}},"&.btn-list-shrink":{"& .btn-list-item":{justifyContent:"center",padding:"0",textAlign:"center","& > .btn-list-item-icon":{marginRight:"0",width:"100%",position:"relative","&:after":{content:'""',position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:10}}}}},"& > .logo":{display:"flex",padding:"0 15px",alignItems:"center",height:"40px",lineHeight:"40px","& > img":{height:"30px",width:"auto"},"& > span":{fontSize:"12px",color:X.textColor.primary,width:"100%",fontWeight:"700",whiteSpace:"nowrap",marginLeft:"10px"},"&.logo-shrink":{padding:0,justifyContent:"center","& > span":{marginLeft:"0",textAlign:"center"}}},"&.vertical-footer-shrink":{"& > .line":{width:"calc(100% - 15px)"}}},"menu-popover":{paddingLeft:"5px",zIndex:10,"& > .menu-popover-box":{boxShadow:X.boxShadow,borderRadius:X.borderRadius,backgroundColor:"white",color:X.textColor.primary,"& > .menu-popover-item":{width:"200px",height:"40px",padding:"0 10px",display:"flex",cursor:"pointer","&:hover":{backgroundColor:X.bgBorderColor.line1,"& > .icon":{"& > svg":{color:X.thmemColor.primary}},"& > .label":{color:X.thmemColor.primary}},"& > .icon":{marginRight:"10px","& > svg":{fontSize:"16px",color:X.textColor.primary,verticalAlign:"top",position:"relative",top:"12px"}},"& > .label":{fontSize:"12px",color:X.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap",textAlign:"left",lineHeight:"40px"},"&.menu-popover-item-select":{"& > .icon":{"& > svg":{color:X.thmemColor.primary}},"& > .label":{color:X.thmemColor.primary}}}}}})})),te=function(e){var n,r=e.backSelfcare,o=void 0===r?{}:r,i=e.expansion,a=void 0===i||i,l=e.customize,u=e.className,m=e.onClick,s=function(e){m&&m(e)};return t().createElement(t().Fragment,null,l||t().createElement("div",{className:(n="back-btn",u&&(n+=" "+u),a||(n+=" back-btn-shrink"),n)},function(){if(a)return t().createElement(c.default,{startIcon:o.icon,variant:"contained",onClick:s},o.label);if(o.icon)return t().createElement(c.default,{startIcon:o.icon,variant:"contained",onClick:s});if(o.label){var e=o.label;return"string"==typeof e&&(e=e[0]),t().createElement(c.default,{variant:"contained",onClick:s},e)}}()))},ne=function(n){var r=ee(n),o=n.language,i=void 0===o?[]:o,a=n.selectLang,c=void 0===a?"":a,m=n.onClick,s=n.expansion,p=void 0===s||s,g=n.className,f=n.customize,d=V((0,e.useState)(!1),2),h=d[0],v=d[1],x=V((0,e.useState)({}),2),b=x[0],y=x[1],E=V((0,e.useState)({}),2),w=E[0],S=E[1],k=V((0,e.useState)(!1),2),N=k[0],z=k[1],M=V((0,e.useState)(null),2),F=M[0],T=M[1],I=V((0,e.useState)({}),1)[0];(0,e.useEffect)((function(){var e=b[c]||{};S(e)}),[c,b]),(0,e.useEffect)((function(){for(var e={},t=0,n=i.length;t<n;t++){var r=i[t];r.value&&(e[r.value]=r)}y(e)}),[i]);var L,A=function(){p&&v(!h)},O=function(e){return function(){m&&m(e.value,e),v(!1),z(!1)}},P=function(e){var t="language-item";return e.value===c&&(t+=" language-item-select"),t},B=(0,e.useMemo)((function(){return t().createElement(u.Collapse,{in:h&&p,className:"li-collapse",timeout:"auto"},i.map((function(e,n){return t().createElement("div",{className:P(e),key:n,onClick:O(e)},e.icon&&t().createElement("span",{className:"language-item-icon"},e.icon),t().createElement("span",{className:"language-item-label"},e.label))})))}),[h,i,p,m]),R=function(e){p||(I.timer=setTimeout((function(){z(!1),T(null)}),100))},j=function(e){return function(t){p||(clearTimeout(I.timer),z(!0),e&&T(t.target))}},D=(0,e.useMemo)((function(){return t().createElement("div",{className:"language-item",onClick:A,onMouseLeave:R,onMouseEnter:j(!0)},p?t().createElement(t().Fragment,null,w.icon&&t().createElement("span",{className:"language-item-icon"},w.icon),t().createElement("span",{className:"language-item-label"},w.label),i.length>1&&t().createElement("span",{className:"language-item-arrow"},t().createElement(C(),null))):w.icon?t().createElement("span",{className:"language-item-icon"},w.icon):w.label?"string"==typeof w.label?t().createElement("span",{className:"language-item-label"},w.label[0]):t().createElement("span",{className:"language-item-label"},w.label):void 0)}),[p,w,i,h,I]),q=(0,e.useMemo)((function(){var e=function(e){var t="menu-popover-item";return e.value===w.value&&(t+=" menu-popover-item-select"),t},n=function(){return t().createElement(u.Popper,{open:N,anchorEl:F,disablePortal:!0,placement:"right-start",onMouseLeave:R,onMouseEnter:j(!1),className:(n=r["menu-popover"],n+=" menu-popover")},t().createElement("div",{className:"menu-popover-box"},i.map((function(n,r){return t().createElement("div",{className:e(n),key:r,onClick:O(n)},n.icon&&t().createElement("span",{className:"icon"},n.icon),t().createElement("span",{className:"label"},n.label))}))));var n};return(0,l.createPortal)(t().createElement(n,null),document.getElementsByTagName("body")[0])}),[i,w,r,N,F,I,m]);return t().createElement(t().Fragment,null,f||t().createElement("div",{className:(L="language",g&&(L+=" "+g),p||(L+=" language-shrink"),N&&(L+=" language-select"),L)},D,B,N&&q))},re=function(n){var r,o=ee(n),i=n.list,a=void 0===i?[]:i,c=n.expansion,m=void 0===c||c,s=n.customize,p=n.className,g=n.onClick,f=V((0,e.useState)({}),2),d=f[0],h=f[1],v=V((0,e.useState)(!1),2),x=v[0],b=v[1],y=V((0,e.useState)(null),2),E=y[0],C=y[1],w=V((0,e.useState)({}),1)[0],S=function(e){m||(w.timer=setTimeout((function(){b(!1),C(null),h({})}),50))},k=function(e){return function(t){m||(clearTimeout(w.timer),b(!0),e&&(C(t.target),h(e)))}},N=function(e){return function(t){g&&g(e,t)}},z=(0,e.useMemo)((function(){var e=function(){return t().createElement(u.Popper,{open:x,anchorEl:E,disablePortal:!0,placement:"right-start",onMouseLeave:S,onMouseEnter:k(),className:(e=o["menu-popover"],e+=" menu-popover")},t().createElement("div",{className:"menu-popover-box"},t().createElement("div",{className:"menu-popover-item",onClick:N(d)},d.icon&&t().createElement("span",{className:"icon"},d.icon),t().createElement("span",{className:"label"},d.label))));var e};return(0,l.createPortal)(t().createElement(e,null),document.getElementsByTagName("body")[0])}),[a,o,x,E,w,d]),M=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,a.map((function(e,n){var r="btn-list-item";return e.label&&e.label===d.label&&(r+=" btn-list-item-select"),t().createElement("div",{className:r,key:n,onClick:N(e),onMouseLeave:S,onMouseEnter:k(e)},function(e){return m?t().createElement(t().Fragment,null,e.icon&&t().createElement("span",{className:"btn-list-item-icon"},e.icon),t().createElement("span",{className:"btn-list-item-label"},e.label)):e.icon?t().createElement("span",{className:"btn-list-item-icon"},e.icon):e.label?"string"==typeof e.label?t().createElement("span",{className:"btn-list-item-icon"},e.label[0]):t().createElement("span",{className:"btn-list-item-label"},e.label):void 0}(e))})))}),[a,m,d]);return t().createElement(t().Fragment,null,s||t().createElement("div",{className:(r="btn-list",p&&(r+=" "+p),m||(r+=" btn-list-shrink"),r)},M,x&&z))},oe=function(e){var n,r=e.user,o=void 0===r?{}:r,i=e.expansion,a=void 0===i||i,l=e.customize,c=e.className,u=e.onClick;return t().createElement(t().Fragment,null,l||t().createElement("div",{className:(n="logo",c&&(n+=" "+c),a||(n+=" logo-shrink"),n),onClick:function(e){u&&u(e)}},function(){if(a)return t().createElement(t().Fragment,null,o.img&&t().createElement("img",{src:o.img,alt:""}),o.label&&t().createElement("span",null,o.label));if(o.img)return t().createElement("img",{src:o.img,alt:""});if(o.label){if("string"==typeof o.label)return t().createElement("span",null,o.label[0]);o.label}}()))},ie=function(n){var r,o=ee(n),i=n.className,a=void 0===i?"":i,l=n.expansion,c=void 0===l||l,u=n.backSelfcareProps,m=n.languageProps,s=n.btnListProps,p=n.userProps,g=n.customize,f=(0,e.useMemo)((function(){return u&&t().createElement(te,Q({},u,{expansion:c}))}),[u,c]),d=(0,e.useMemo)((function(){return m&&t().createElement(ne,Q({},m,{expansion:c}))}),[m,c]),h=(0,e.useMemo)((function(){return s&&t().createElement(re,Q({},s,{expansion:c}))}),[s,c]),v=(0,e.useMemo)((function(){return p&&t().createElement(oe,Q({},p,{expansion:c}))}),[p,c]);return t().createElement(t().Fragment,null,g||t().createElement("div",{className:(r=o["vertical-footer"],a&&(r+=" "+a),c||(r+=" vertical-footer-shrink"),r)},t().createElement("div",{className:"line"}),f,d,h,v))},ae=(0,r.Z)(),le=(0,n.makeStyles)((function(){return(0,n.createStyles)({"footer-expansion":{"&.footer-expansion":{display:"flex",alignItems:"center",backgroundColor:ae.bgBorderColor.bg2,padding:"5px 0",whiteSpace:"nowrap",height:"30px",lineHeight:"30px","& > svg":{fontSize:"20px",color:ae.textColor.secondary,cursor:"pointer",marginLeft:"15px","&:hover":{color:ae.thmemColor.primary}},"& > .line":{borderRight:"1px solid"+ae.bgBorderColor.bg1,display:"inline-block",height:"16px",marginLeft:"15px"},"& > .version":{marginLeft:"10px",fontSize:"12px",color:ae.textColor.secondary},"&.footer-expansion-shrink":{justifyContent:"center","& > svg":{margin:"0"},"& > .line":{display:"none"},"& > .version":{}}}}})})),ce=function(e){var n=e.expansion,r=void 0===n||n,o=e.expandIcon,i=e.shrinkIcon,a=e.customizeContent,l=e.clickExpansion,c=e.version,u=e.className,m=le(e),s=function(){l&&l(!r)},p=function(){var e=m["footer-expansion"];return e+=" footer-expansion",u&&(e+=" "+u),r||(e+=" footer-expansion-shrink"),e};return t().createElement("div",{className:p()},function(){if(a)return a;return t().createElement("div",{className:p()},r?o||t().createElement(O(),{onClick:s}):i||t().createElement(B(),{onClick:s}),t().createElement("span",{className:"line"}),r&&c&&t().createElement("span",{className:"version"},c))}())};function ue(){return(ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function me(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(0,r.Z)();var se=(0,n.makeStyles)((function(){return(0,n.createStyles)({"vertical-menu":{width:"100%",height:"100%",display:"flex",flexDirection:"column"}})})),pe=function(n){var r=n.logoProps,o=n.menuListProps,i=n.footerProps,l=n.expansion,c=void 0===l||l,u=n.onClickExpansion,m=n.selectMenu,s=n.onClickMenu,p=n.className,g=n.shrinkOthers,f=void 0===g||g,d=n.footerExpansionProps,h=n.showExpansion,v=void 0===h||h,x=se(n),b=me((0,e.useState)(!0),2),y=b[0],E=b[1];(0,e.useEffect)((function(){c!==y&&E(c)}),[c]);var C,w=function(){u&&u(!y)},S=(0,e.useMemo)((function(){return n.logoProps&&t().createElement(a,ue({},r,{expansion:y}))}),[r,y]),k=(0,e.useMemo)((function(){return n.menuListProps&&t().createElement(K,ue({},o,{expansion:y,selectMenu:m,onClickMenu:s,shrinkOthers:f}))}),[o,y,m,s]),N=(0,e.useMemo)((function(){return n.footerProps&&t().createElement(ie,ue({},i,{expansion:y}))}),[i,y]),z=(0,e.useMemo)((function(){return v?t().createElement(ce,ue({clickExpansion:w},d,{expansion:y})):null}),[y,u,d,u,v]);return t().createElement("div",{className:(C=x["vertical-menu"],C+=" vertical-menu paraui-vertical-menu",p&&(C+=" "+p),c||(C+=" vertical-menu-shrink"),C)},S,k,N,z)};function ge(){return(ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function fe(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var de=function(e){var n=e.mode,r=void 0===n?"vertical":n,o=fe(e,["mode"]);return t().createElement(t().Fragment,null,"vertical"===r?t().createElement(pe,ge({},o)):t().createElement(W,ge({},o)))},he=de}(),f}()}));
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(require("react"),require("@material-ui/core/styles"),require("react-dom"),require("@material-ui/core"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Down"),require("@para-ui/icons"),require("@para-ui/icons/More"),require("para-lib"),require("@para-ui/icons/IndentRightFill"),require("@para-ui/icons/IndentLeftFill")):"function"==typeof define&&define.amd?define(["react","@material-ui/core/styles","react-dom","@material-ui/core","@para-ui/icons/LoadingF","@para-ui/icons/Down","@para-ui/icons","@para-ui/icons/More","para-lib","@para-ui/icons/IndentRightFill","@para-ui/icons/IndentLeftFill"],o):"object"==typeof exports?exports.ParaUI=o(require("react"),require("@material-ui/core/styles"),require("react-dom"),require("@material-ui/core"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Down"),require("@para-ui/icons"),require("@para-ui/icons/More"),require("para-lib"),require("@para-ui/icons/IndentRightFill"),require("@para-ui/icons/IndentLeftFill")):e.ParaUI=o(e.react,e["@material-ui/core/styles"],e["react-dom"],e["@material-ui/core"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/Down"],e["@para-ui/icons"],e["@para-ui/icons/More"],e["para-lib"],e["@para-ui/icons/IndentRightFill"],e["@para-ui/icons/IndentLeftFill"])}(self,(function(e,o,n,t,i,r,a,l,s,c,u){return function(){"use strict";var p={4927:function(e,o,n){function t(e){var o,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(o=0;o<e.length;o++)e[o]&&(n=t(e[o]))&&(i&&(i+=" "),i+=n);else for(o in e)e[o]&&(i&&(i+=" "),i+=o);return i}function i(){for(var e,o,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(o=t(e))&&(i&&(i+=" "),i+=o);return i}n.d(o,{Z:function(){return i}})},4126:function(e){
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/
|
|
7
|
+
var o=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function i(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 o={},n=0;n<10;n++)o["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(o).map((function(e){return o[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,r){for(var a,l,s=i(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))n.call(a,u)&&(s[u]=a[u]);if(o){l=o(a);for(var p=0;p<l.length;p++)t.call(a,l[p])&&(s[l[p]]=a[l[p]])}}return s}},9524:function(e,o,n){
|
|
8
|
+
/** @license React v17.0.2
|
|
9
|
+
* react-jsx-runtime.production.min.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
n(4126);var t=n(9297),i=60103;if(o.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;i=r("react.element"),o.Fragment=r("react.fragment")}var a=t.__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,o,n){var t,r={},c=null,u=null;for(t in void 0!==n&&(c=""+n),void 0!==o.key&&(c=""+o.key),void 0!==o.ref&&(u=o.ref),o)l.call(o,t)&&!s.hasOwnProperty(t)&&(r[t]=o[t]);if(e&&e.defaultProps)for(t in o=e.defaultProps)void 0===r[t]&&(r[t]=o[t]);return{$$typeof:i,type:e,key:c,ref:u,props:r,_owner:a.current}}o.jsx=c,o.jsxs=c},7712:function(e,o,n){e.exports=n(9524)},5794:function(e,o,n){var t=n(7712),i=n(9297),r=n(1731),a=n(8604),l=n(4927),s=n(1102),c=n.n(s),u=n(853),p=function(){return p=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},p.apply(this,arguments)},m=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)o.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(n[t[i]]=e[t[i]])}return n},d=(0,u.Z)(),v=(0,a.makeStyles)((function(e){return(0,a.createStyles)({"@keyframes loadingCircle":{"100%":{transform:"rotate(1turn)"}},radius:{borderRadius:15},btnIcon:{"& .btn-icon":{display:"inline-flex",alignItems:"center"},"& .btn-icon svg":{color:"currentColor"}},outlinedBtn:{"& .btn-icon svg":{color:d.thmemColor.primary},"&:disabled":{"& .btn-icon svg":{color:"currentColor"}}},iconButtonToolTip:{display:"inline-block",cursor:"not-allowed","& .iconButton-disabled":{cursor:"not-allowed",pointerEvents:"none"}},loadingBtn:{position:"relative",pointerEvents:"none","&:before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:1,transition:"opacity .2s",pointerEvents:"none"},"& .loading-icon":{animation:"$loadingCircle 1s infinite linear"}}})})),h=(0,a.withStyles)((function(e){return{tooltip:{margin:"6px 0",backgroundColor:d.bgBorderColor.bg4}}}))(r.Tooltip),g=function(e){var o=v(),n=e.radius,a=e.className,s=e.disabled,u=void 0!==s&&s,d=e.children,h=e.startIcon,g=e.endIcon,f=e.loading,x=void 0!==f&&f,b=m(e,["radius","className","disabled","children","startIcon","endIcon","loading"]);"text"===b.variant&&(b.disableRipple=!0);var y=(0,i.useState)(!1),j=y[0],C=y[1];return(0,i.useEffect)((function(){C(!!x)}),[x]),(0,t.jsx)(r.Button,p({disabled:u,className:(0,l.Z)("paraui-button",a,o.btnIcon,n&&o.radius,"outlined"===b.variant&&o.outlinedBtn,j&&o.loadingBtn),startIcon:function(){if(!j)return(0,t.jsx)("span",p({className:"btn-icon"},{children:h}),void 0);if("object"==typeof x){var e=x.delay||0;setTimeout((function(){return C(!1)}),e)}return(0,t.jsx)("span",p({className:"btn-icon loading-icon"},{children:(0,t.jsx)(c(),{},void 0)}),void 0)}(),endIcon:(0,t.jsx)("span",p({className:"btn-icon"},{children:g}),void 0)},b,{children:d}),void 0)};g.IconButton=function(e){var o=v(),n=e.showToolTip,a=void 0===n||n,s=e.toolTipTitle,u=void 0===s?"":s,d=e.children,g=e.className,f=e.disabled,x=void 0!==f&&f,b=e.loading,y=void 0!==b&&b,j=e.TooltipProps,C=m(e,["showToolTip","toolTipTitle","children","className","disabled","loading","TooltipProps"]),w=(0,i.useState)(!1),S=w[0],N=w[1],k=(0,t.jsx)(r.IconButton,p({},C,{disabled:x,disableRipple:!0,className:(0,l.Z)("paraui-icon-button",g,a&&x&&"iconButton-disabled",S&&o.loadingBtn)},{children:function(){if(!S)return d;if("object"==typeof y){var e=y.delay||0;setTimeout((function(){return N(!1)}),e)}return(0,t.jsx)("span",p({className:"loading-icon"},{children:(0,t.jsx)(c(),{},void 0)}),void 0)}()}),void 0);return(0,i.useEffect)((function(){N(!!y)}),[y]),a?(0,t.jsx)(h,p({title:u},j,{children:(0,t.jsx)("span",p({className:(0,l.Z)(x&&o.iconButtonToolTip)},{children:k}),void 0)}),void 0):k},o.default=g},853:function(e,o){var n={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};o.Z=function(){return n}},1731:function(e){e.exports=t},8604:function(e){e.exports=o},1609:function(e){e.exports=a},6028:function(e){e.exports=r},9387:function(e){e.exports=u},5295:function(e){e.exports=c},1102:function(e){e.exports=i},6090:function(e){e.exports=l},3475:function(e){e.exports=s},9297:function(o){o.exports=e},2268:function(e){e.exports=n}},m={};function d(e){var o=m[e];if(void 0!==o)return o.exports;var n=m[e]={exports:{}};return p[e](n,n.exports,d),n.exports}d.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(o,{a:o}),o},d.d=function(e,o){for(var n in o)d.o(o,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},d.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var v={};return function(){d.r(v),d.d(v,{Menu:function(){return de},default:function(){return ve}});var e=d(7712),o=d(9297),n=d.n(o),t=d(8604),i=d(853),r=function(){return r=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},r.apply(this,arguments)},a=(0,i.Z)(),l=(0,t.makeStyles)((function(){return(0,t.createStyles)({logo:{width:"100%",display:"inline-block","& > .logo-content":{display:"inline-block",textAlign:"center",whiteSpace:"nowrap",width:"100%","& > img":{marginRight:"10px",width:"auto",verticalAlign:"top"},"& > span":{whiteSpace:"nowrap",fontWeight:"700",fontSize:"18px",color:"white",verticalAlign:"top",display:"inline-block"}},"&.logo-split":{padding:"12px 20px 0 20px","& > .logo-content":{backgroundColor:a.thmemColor.primary,borderRadius:a.borderRadius,padding:"7px 10px","& > img":{height:"24px"},"& > span":{height:"24px",lineHeight:"24px"}}},"&.logo-full":{"& > .logo-content":{backgroundColor:a.thmemColor.primary,padding:"10px 0","& > img":{height:"30px"},"& > span":{height:"30px",lineHeight:"30px"}}},"&.logo-shrink":{"&.logo-split":{padding:"0","& > .logo-content":{padding:"13px 0",borderRadius:"0","& > img":{marginRight:"0"}}},"&.logo-full":{"& > .logo-content":{"& > img":{marginRight:"0"}}}}}})})),s=function(o){var n,t=o.mode,i=void 0===t?"split":t,a=o.expansion,s=void 0===a||a,c=o.img,u=o.title,p=o.customizeContent,m=o.className,d=l(o);return(0,e.jsx)("div",r({className:(n=d.logo,n+=" logo",m&&(n+=" "+m),i&&(n+=" logo-"+i),s||(n+=" logo-shrink"),n)},{children:p||(0,e.jsxs)("div",r({className:"logo-content"},{children:[c&&(0,e.jsx)("img",{src:c},void 0),s&&u&&(0,e.jsx)("span",{children:u},void 0)]}),void 0)}),void 0)},c=d(2268),u=d(5794),p=d(1731),m=function(){return m=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},m.apply(this,arguments)},h=(0,i.Z)(),g=(0,t.makeStyles)((function(){return(0,t.createStyles)({"horizontal-meun-right":{height:"100%",display:"flex","& > .back-btn":{padding:"0 15px",height:"100%",display:"flex",alignItems:"center","& > button":{width:"100%",whiteSpace:"nowrap",boxShadow:"none",padding:"0 10px 0 14px","& svg":{color:"white"}}},"& > .language":{height:"100%","& .language-item":{display:"flex",padding:"0 15px",cursor:"pointer",alignItems:"center",height:"100%",position:"relative","&:after":{position:"absolute",left:"0",top:"0",content:'""',zIndex:1},"&:hover":{backgroundColor:h.bgBorderColor.line1,"& > .language-item-icon":{"& > svg":{color:h.thmemColor.primary}},"& > .language-item-label":{color:h.thmemColor.primary},"& > .language-item-arrow":{"& > svg":{color:h.thmemColor.primary}}},"& > .language-item-icon":{width:"16px",marginRight:"5px","& > svg":{fontSize:"16px",color:h.textColor.primary,verticalAlign:"top",position:"relative"},"& > .opacity-pos-svg":{opacity:"0"}},"& > .language-item-label":{fontSize:"12px",color:h.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap"}},"& > .li-collapse":{"& .language-item":{paddingLeft:"30px","&.language-item-select":{"& > .language-item-icon":{"& > svg":{color:h.thmemColor.primary}},"& > .language-item-label":{color:h.thmemColor.primary},"& > .language-item-arrow":{"& > svg":{color:h.thmemColor.primary}}}}},"&.language-select":{"& .language-item":{backgroundColor:h.bgBorderColor.line1,"& > .language-item-icon":{"& > svg":{color:h.thmemColor.primary}},"& > .language-item-label":{color:h.thmemColor.primary}}}},"& > .btn-list":{display:"flex",height:"100%","& > .btn-list-item":{display:"flex",padding:"0 15px",cursor:"pointer",alignItems:"center","&:hover":{backgroundColor:h.bgBorderColor.line1,"& > .btn-list-item-icon":{"& > svg":{color:h.thmemColor.primary}},"& > .btn-list-item-label":{color:h.thmemColor.primary}},"& > .btn-list-item-icon":{width:"16px",marginRight:"5px","& > svg":{fontSize:"16px",color:h.textColor.primary,verticalAlign:"top",position:"relative","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}}},"& > .btn-list-item-label":{fontSize:"12px",color:h.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap"}}},"& > .logo":{display:"flex",padding:"0 15px",alignItems:"center",height:"100%","& > img":{height:"30px",width:"auto"},"& > span":{fontSize:"12px",color:h.textColor.primary,width:"100%",fontWeight:"700",whiteSpace:"nowrap",marginLeft:"10px"}}},"menu-popover":{paddingTop:"5px",zIndex:10,"& > .menu-popover-box":{boxShadow:h.boxShadow,borderRadius:h.borderRadius,backgroundColor:"white",color:h.textColor.primary,"& > .menu-popover-item":{width:"140px",height:"30px",padding:"0 10px",display:"flex",alignItems:"center",cursor:"pointer","&:hover":{backgroundColor:h.bgBorderColor.line1,"& > .icon":{"& > svg":{color:h.thmemColor.primary}},"& > .label":{color:h.thmemColor.primary}},"& > .icon":{marginRight:"10px","& > svg":{fontSize:"16px",color:h.textColor.primary,verticalAlign:"top",position:"relative"}},"& > .label":{fontSize:"12px",color:h.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap",textAlign:"left"},"&.menu-popover-item-select":{"& > .icon":{"& > svg":{color:h.thmemColor.primary}},"& > .label":{color:h.thmemColor.primary}}}}}})})),f=function(o){var n,t=o.backSelfcare,i=void 0===t?{}:t,r=o.customize,a=o.onClick,l=o.className,s=function(e){a&&a(e)};return(0,e.jsx)(e.Fragment,{children:r||(0,e.jsx)("div",m({className:(n="back-btn",l&&(n+=" "+l),n)},{children:(0,e.jsx)(u.default,m({startIcon:i.icon,variant:"contained",onClick:s},{children:i.label}),void 0)}),void 0)},void 0)},x=function(n){var t=g(n),i=n.language,r=void 0===i?[]:i,a=n.selectLang,l=void 0===a?"":a,s=n.onClick,u=n.expansion,d=void 0===u||u,v=n.className,h=n.customize,f=(0,o.useState)(!1),x=f[0],b=f[1],y=(0,o.useState)({}),j=y[0],C=y[1],w=(0,o.useState)({}),S=w[0],N=w[1],k=(0,o.useState)(!1),z=k[0],M=k[1],F=(0,o.useState)(null),O=F[0],E=F[1],T=(0,o.useState)({})[0];(0,o.useEffect)((function(){var e=j[l]||{};N(e)}),[l,j]),(0,o.useEffect)((function(){for(var e={},o=0,n=r.length;o<n;o++){var t=r[o];t.value&&(e[t.value]=t)}C(e)}),[r]);var P,I=function(e){return function(){s&&s(e.value,e),b(!1),M(!1)}},L=function(e){T.timer=setTimeout((function(){M(!1),E(null)}),100)},B=function(e){return function(o){clearTimeout(T.timer),M(!0),e&&E(o.target)}},R=(0,o.useMemo)((function(){return(0,e.jsx)("div",m({className:"language-item",onMouseLeave:L,onMouseEnter:B(!0)},{children:(0,e.jsxs)(e.Fragment,{children:[S.icon&&(0,e.jsx)("span",m({className:"language-item-icon"},{children:S.icon}),void 0),(0,e.jsx)("span",m({className:"language-item-label"},{children:S.label}),void 0)]},void 0)}),void 0)}),[d,S,r,x,T]),A=(0,o.useMemo)((function(){var o=function(e){var o="menu-popover-item";return e.value===S.value&&(o+=" menu-popover-item-select"),o};return(0,c.createPortal)((0,e.jsx)((function(){return(0,e.jsx)(p.Popper,m({open:z,anchorEl:O,disablePortal:!0,placement:"bottom-end",onMouseLeave:L,onMouseEnter:B(!1),className:(n=t["menu-popover"],n+=" menu-popover")},{children:(0,e.jsx)("div",m({className:"menu-popover-box"},{children:r.map((function(n,t){return(0,e.jsxs)("div",m({className:o(n),onClick:I(n)},{children:[n.icon&&(0,e.jsx)("span",m({className:"icon"},{children:n.icon}),void 0),(0,e.jsx)("span",m({className:"label"},{children:n.label}),void 0)]}),t)}))}),void 0)}),void 0);var n}),{},void 0),document.getElementsByTagName("body")[0])}),[r,S,t,z,O,T,s]);return(0,e.jsx)(e.Fragment,{children:h||(0,e.jsxs)("div",m({className:(P="language",v&&(P+=" "+v),z&&(P+=" language-select"),P)},{children:[R,z&&A]}),void 0)},void 0)},b=function(n){var t,i=n.list,r=void 0===i?[]:i,a=n.expansion,l=void 0===a||a,s=n.customize,c=n.className,u=n.onClick,p=function(e){return function(o){u&&u(e,o)}},d=(0,o.useMemo)((function(){var o=function(o){return l?(0,e.jsxs)(e.Fragment,{children:[o.icon&&(0,e.jsx)("span",m({className:"btn-list-item-icon"},{children:o.icon}),void 0),(0,e.jsx)("span",m({className:"btn-list-item-label"},{children:o.label}),void 0)]},void 0):o.icon?(0,e.jsx)("span",m({className:"btn-list-item-icon"},{children:o.icon}),void 0):o.label?"string"==typeof o.label?(0,e.jsx)("span",m({className:"btn-list-item-icon"},{children:o.label[0]}),void 0):(0,e.jsx)("span",m({className:"btn-list-item-label"},{children:o.label}),void 0):void 0};return(0,e.jsx)(e.Fragment,{children:r.map((function(n,t){return(0,e.jsx)("div",m({className:"btn-list-item",onClick:p(n)},{children:o(n)}),t)}))},void 0)}),[r,l]);return(0,e.jsx)(e.Fragment,{children:s||(0,e.jsx)("div",m({className:(t="btn-list",c&&(t+=" "+c),l||(t+=" btn-list-shrink"),t)},{children:d}),void 0)},void 0)},y=function(o){var n,t=o.user,i=void 0===t?{}:t,r=o.customize,a=o.className,l=o.onClick;return(0,e.jsx)(e.Fragment,{children:r||(0,e.jsx)("div",m({className:(n="logo",a&&(n+=" "+a),n),onClick:function(e){l&&l(e)}},{children:(0,e.jsxs)(e.Fragment,{children:[i.img&&(0,e.jsx)("img",{src:i.img,alt:""},void 0),i.label&&(0,e.jsx)("span",{children:i.label},void 0)]},void 0)}),void 0)},void 0)},j=function(n){var t,i=g(n),r=n.className,a=void 0===r?"":r,l=n.expansion,s=void 0===l||l,c=n.backSelfcareProps,u=n.languageProps,p=n.btnListProps,d=n.userProps,v=n.customize,h=(0,o.useMemo)((function(){return c&&(0,e.jsx)(f,m({},c,{expansion:s}),void 0)}),[c,s]),j=(0,o.useMemo)((function(){return u&&(0,e.jsx)(x,m({},u,{expansion:s}),void 0)}),[u,s]),C=(0,o.useMemo)((function(){return p&&(0,e.jsx)(b,m({},p,{expansion:s}),void 0)}),[p,s]),w=(0,o.useMemo)((function(){return d&&(0,e.jsx)(y,m({},d,{expansion:s}),void 0)}),[d,s]);return(0,e.jsx)(e.Fragment,{children:v||(0,e.jsxs)("div",m({className:(t=i["horizontal-meun-right"],a&&(t+=" "+a),t)},{children:[h,j,C,w]}),void 0)},void 0)},C=d(6028),w=d.n(C),S=d(1609),N=d(6090),k=d.n(N),z=d(3475),M=function(){return M=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},M.apply(this,arguments)},F=function(e,o,n){if(n||2===arguments.length)for(var t,i=0,r=o.length;i<r;i++)!t&&i in o||(t||(t=Array.prototype.slice.call(o,0,i)),t[i]=o[i]);return e.concat(t||Array.prototype.slice.call(o))},O=(0,i.Z)(),E=(0,t.makeStyles)((function(){return(0,t.createStyles)({"horizontal-menu-list":{height:"100%",width:"100%",lineHeight:"0",overflow:"hidden","& > .horizontal-menu-list-item":{padding:"0 20px",height:"100%",display:"flex",alignItems:"center",cursor:"pointer",position:"relative",whiteSpace:"nowrap",float:"left","&:after":{position:"absolute",left:"0",top:"0",content:'""',zIndex:1},"&:hover":{backgroundColor:O.bgBorderColor.line1,"& > .menu-item-icon":{"& > svg":{color:O.thmemColor.primary}},"& > .menu-item-label":{color:O.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:O.thmemColor.primary}}},"& > .menu-item-icon":{"& > svg":{fontSize:"16px",color:O.textColor.primary,marginRight:"5px"}},"& > .menu-item-label":{fontSize:"12px",color:O.textColor.primary,whiteSpace:"nowarp"},"& > .menu-item-arrow":{"& > svg":{fontSize:"16px",transition:"all .3s",color:O.textColor.primary,marginLeft:"2px"}},"&.horizontal-menu-list-item-select":{"& > .menu-item-icon":{"& > svg":{color:O.thmemColor.primary}},"& > .menu-item-label":{color:O.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:O.thmemColor.primary}}},"&.horizontal-menu-list-item-hover":{backgroundColor:O.bgBorderColor.line1,"& > .menu-item-icon":{"& > svg":{color:O.thmemColor.primary}},"& > .menu-item-label":{color:O.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:O.thmemColor.primary}}}}},"menu-item-popper":{paddingTop:"5px","& > .menu-item-popper-content":{"& > .menu-item-popper-content-item":{"&:first-child:after":{width:"100%",height:"100%",content:'""',position:"absolute",left:"0",top:"-5px",zIndex:-1}}},"& .menu-item-popper, &.menu-item-popper":{zIndex:10,"& > .menu-item-popper-content":{boxShadow:O.boxShadow,borderRadius:O.borderRadius,backgroundColor:"white",color:O.textColor.primary,"& > .menu-item-popper-content-item":{position:"relative","& > .menu-item-popper-content-item-content":{width:"140px",height:"30px",padding:"0 10px",display:"flex",cursor:"pointer",alignItems:"center","&:hover":{backgroundColor:O.bgBorderColor.line1,"& > .menu-item-icon":{"& > svg":{color:O.thmemColor.primary}},"& > .menu-item-label":{color:O.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:O.thmemColor.primary}}},"& > .menu-item-icon":{width:"16px",marginRight:"10px","& > svg":{fontSize:"16px",color:O.textColor.primary,verticalAlign:"top",position:"relative","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}},"& > .opacity-pos-svg":{opacity:"0"}},"& > .menu-item-label":{fontSize:"12px",color:O.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap",textAlign:"left"},"& > .menu-item-arrow":{width:"16px","& > svg":{fontSize:"16px",transition:"all .3s",color:O.textColor.primary,verticalAlign:"top",position:"relative",transform:"rotate(270deg)","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}},"& > .opacity-pos-svg":{opacity:"0"}},"& > .menu-item-popper":{paddingLeft:"5px"}},"&.menu-item-popper-content-item-select":{"& > .menu-item-popper-content-item-content":{"& > .menu-item-icon":{"& > svg":{color:O.thmemColor.primary}},"& > .menu-item-label":{color:O.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:O.thmemColor.primary}}}}}},"& .menu-item-popper":{position:"absolute",transform:"none !important",left:"100% !important",top:"0"}}}})})),T=function(n){var t=n.open,i=void 0!==t&&t,r=n.anchorEl,a=n.idMenuLast,l=n.selectMenu,s=void 0===l?"":l,u=n.onClickMenu,m=n.list,d=void 0===m?[]:m,v=n.onMouseEnter,h=n.onMouseLeave,g=n.level,f=void 0===g?1:g,x=n.className,b=(0,o.useState)(null),y=b[0],j=b[1],C=(0,o.useState)(null),N=C[0],k=C[1],z=(0,o.useState)([]),F=z[0],O=z[1],E=(0,o.useState)({})[0],P=function(e,o){return function(n){var t;t=n,clearTimeout(E.leaveTimer),E.leaveTimer=setTimeout((function(){1===f&&v&&v();var n=[e];e.children&&e.children.length>0&&(n=e.children);var i=t.target;k(i),O(n),j(o)}),50)}},I=function(e){return function(o){e.children&&e.children.length>0||(u&&u(e),h&&h())}},L=function(e){var o="menu-item-popper-content-item",n=a&&a[s];return n&&-1!==n.indexOf(e.path)&&(o+=" menu-item-popper-content-item-select"),o},B=function(){var e="menu-item-popper";return x&&(e+=" "+x),e},R=(0,o.useCallback)((function(o,n){return(0,e.jsx)(e.Fragment,{children:o.children&&o.children.length>0&&y===n&&(0,e.jsx)(T,{open:y===n,anchorEl:N,list:F,idMenuLast:a,selectMenu:s,onClickMenu:u,onMouseEnter:v,onMouseLeave:h,level:f+1},void 0)},void 0)}),[y,N,F,a,s,u,v,h,f]),A=(0,o.useMemo)((function(){return(0,e.jsx)("div",M({className:"menu-item-popper-content"},{children:d.map((function(o,n){var t=function(e){var o=e.icon;if(o){var n=S[o];return n?n():o}}(o),i=function(o){var n=o.children;if(n&&n.length>0)return(0,e.jsx)(w(),{},void 0)}(o);return(0,e.jsx)("div",M({className:L(o),onMouseLeave:function(e){clearTimeout(E.leaveTimer),E.leaveTimer=setTimeout((function(){1===f&&h&&h(),j(null),k(null),O([])}))},onMouseEnter:P(o,n)},{children:(0,e.jsxs)("div",M({className:"menu-item-popper-content-item-content",onClick:I(o)},{children:[t&&(0,e.jsx)("span",M({className:"menu-item-icon"},{children:t}),void 0),(0,e.jsx)("span",M({className:"menu-item-label"},{children:o.label}),void 0),i&&(0,e.jsx)("span",M({className:"menu-item-arrow"},{children:i}),void 0),R(o,n)]}),void 0)}),n)}))}),void 0)}),[d,u,y,N,F,a,s,u,v,h,f]),D=function(){return 1!==f?(0,e.jsx)("div",M({className:B()},{children:A}),void 0):(0,e.jsx)(p.Popper,M({open:i,anchorEl:r,disablePortal:!0,placement:"bottom-start",className:B()},{children:A}),void 0)};return(0,e.jsx)(e.Fragment,{children:1===f?(0,c.createPortal)((0,e.jsx)(D,{},void 0),document.getElementsByTagName("body")[0]):(0,e.jsx)(D,{},void 0)},void 0)},P=function(n){var t=n.list,i=void 0===t?[]:t,r=n.selectMenu,a=void 0===r?"":r,l=n.onClickMenu,s=n.className,c=n.moreCustomize,u=E(n),p=(0,o.useState)(!1),m=p[0],d=p[1],v=(0,o.useState)(null),h=v[0],g=v[1],f=(0,o.useState)(null),x=f[0],b=f[1],y=(0,o.useState)([]),j=y[0],C=y[1],N=(0,o.useState)(""),O=N[0],P=N[1],I=(0,o.useState)({}),L=I[0],B=I[1],R=(0,o.useState)({}),A=R[0],D=R[1],q=(0,o.useState)("horizontal-menu-list-"+(0,z.UUID)())[0],W=(0,o.useState)(null),_=W[0],H=W[1],Z=(0,o.useState)({})[0];(0,o.useEffect)((function(){a!==O&&P(a)}),[a]),(0,o.useEffect)((function(){return J(i),Y(),window.addEventListener("resize",Y),function(){window.removeEventListener("resize",Y)}}),[i]);var U,Y=function(){clearTimeout(Z.timerResize),G(),Z.timerResize=setTimeout((function(){H(i.length),$()}),100)},$=function(e){if(null!==e&&0!==e){void 0===e&&(e=i.length);var o=document.querySelector("."+q);if(o)if(o.scrollHeight>o.clientHeight){var n=Number(e)-1;H(n),$(n)}else i.length<=e&&G()}},G=function(){},J=function(e){var o={},n={},t={},i={},r=function(e,a,l){for(var s=0,c=e.length;s<c;s++){var u=e[s],p=u.path;o[p]=u;var m=void 0===l?s:l;if(a){var d=(0,z.DeepClone)(n[a.path]||[]);d.push(p),n[p]=F([],d,!0)}else n[p]=[p];u.children&&u.children.length>0?r(u.children,u,m):(t[p]=n[p],i[p]=m)}};r(e),D(i),B(t)},K=function(e,o){return function(n){clearTimeout(Z.leaveTimer);var t=[];e.children&&e.children.length>0&&(t=e.children),g(o),b(n.target),C(t),d(!0)}},Q=function(){d(!1),b(null),C([]),g(null)},V=function(){clearTimeout(Z.leaveTimer)},X=function(){Q()},ee=function(e){l&&l(e)},oe=function(e,o){var n=" horizontal-menu-list-item",t=L[O];return t&&-1!==t.indexOf(e.path)&&(n+=" horizontal-menu-list-item-select"),h===o&&(n+=" horizontal-menu-list-item-hover"),n},ne=(0,o.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:m&&(0,e.jsx)(T,{open:m,anchorEl:x,list:j,idMenuLast:L,selectMenu:O,onClickMenu:ee,onMouseEnter:V,onMouseLeave:X,className:u["menu-item-popper"],level:1},void 0)},void 0)}),[m,x,j,L,O,l,Z]),te=function(e){clearTimeout(Z.leaveTimer);for(var o=[],n=Number(_),t=i.length;n<t;n++)o.push(i[n]);g(_),b(e.target),C(o),d(!0)},ie=function(){clearTimeout(Z.leaveTimer),Z.leaveTimer=setTimeout((function(){Q()}),100)},re=function(){var e=" horizontal-menu-list-item",o=A[O];return null!==_&&_<=o&&(e+=" horizontal-menu-list-item-select"),h===_&&(e+=" horizontal-menu-list-item-hover"),e};return(0,e.jsxs)("div",M({className:(U=u["horizontal-menu-list"],U+=" horizontal-menu-list",s&&(U+=" "+s),q&&(U+=" "+q),U)},{children:[i.map((function(o,n){if(null!==_&&_<=n)return null;var t=function(e){var o=e.icon;if(o){var n=S[o];return n?n():o}}(o),i=function(o){var n=o.children;if(n&&n.length>0)return(0,e.jsx)(w(),{},void 0)}(o);return(0,e.jsxs)("div",M({onClick:function(){ee(o)},onMouseEnter:K(o,n),onMouseLeave:function(e){clearTimeout(Z.leaveTimer),Z.leaveTimer=setTimeout((function(){Q()}),100)},className:oe(o,n)},{children:[t&&(0,e.jsx)("span",M({className:"menu-item-icon"},{children:t}),void 0),(0,e.jsx)("span",M({className:"menu-item-label"},{children:o.label}),void 0),i&&(0,e.jsx)("span",M({className:"menu-item-arrow"},{children:i}),void 0)]}),n)})),function(){if(null!==_&&i.length>_)return(0,e.jsx)("div",M({onMouseEnter:te,onMouseLeave:ie,className:re()},{children:c||(0,e.jsx)("span",M({className:"menu-item-icon"},{children:(0,e.jsx)(k(),{},void 0)}),void 0)}),void 0)}(),ne]}),void 0)},I=d(5295),L=d.n(I),B=d(9387),R=d.n(B),A=function(){return A=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},A.apply(this,arguments)},D=(0,i.Z)(),q=(0,t.makeStyles)((function(){return(0,t.createStyles)({"horizontal-menu":{height:"50px",width:"100%",display:"flex",justifyContent:"space-between",boxShadow:D.boxShadow,"& > .horizontal-menu-left":{display:"flex",width:"100%","& > .logo":{width:"200px","&.logo-split":{paddingTop:"6px",paddingRight:"15px"},"&.logo-full":{marginRight:"15px"}},"& > .horizontal-expansion":{display:"flex",alignItems:"center",cursor:"pointer"},"& > .horizontal-menu-list-box":{width:"calc(100% - 200px)"}},"& > .horizontal-menu-right":{},"&.horizontal-menu-shrink":{"& > .horizontal-menu-left":{"& > .logo":{"&.logo-split":{padding:"0"}}},"&.horizontal-menu-logo-expansion":{"& > .horizontal-menu-left":{"& > .logo":{"&.logo-split":{padding:"6px 15px 0 20px"}}}}},"&.horizontal-menu-no-logo":{"& > .horizontal-menu-left":{"& > .horizontal-menu-list-box":{width:"100%"}}},"&.horizontal-menu-show-expansion":{"& > .horizontal-menu-left":{"& > .horizontal-menu-list-box":{width:"calc(100% - 215px)"}}},"&.horizontal-menu-logo-full":{"& > .horizontal-menu-left":{"& > .horizontal-menu-list-box":{width:"calc(100% - 215px)"}},"&.horizontal-menu-show-expansion":{"& > .horizontal-menu-left":{"& > .horizontal-menu-list-box":{width:"calc(100% - 230px)"}}}}}})})),W=function(n){var t=n.logoProps,i=n.menuListProps,r=n.footerProps,a=n.expansion,l=void 0===a||a,c=n.onClickExpansion,u=n.selectMenu,p=n.onClickMenu,m=n.showExpansion,d=void 0!==m&&m,v=n.footerExpansionProps,h=n.className,g=q(n),f=(0,o.useState)(!0),x=f[0],b=f[1];(0,o.useEffect)((function(){l!==x&&b(l)}),[l]);var y,C=function(){c&&c(!x)},w=(0,o.useMemo)((function(){return n.logoProps&&t&&void 0===n.logoProps.expansion&&(t.expansion=!0),n.logoProps&&(0,e.jsx)(s,A({expansion:x},t),void 0)}),[x,t]),S=(0,o.useMemo)((function(){if(!d)return null;var o=v||{},n=o.customizeContent,t=o.expandIcon,i=o.shrinkIcon,r=o.className;if(n)return n;var a;return(0,e.jsx)("div",A({className:(a="horizontal-expansion",r&&(a+=" "+r),a)},{children:x?t||(0,e.jsx)(L(),{onClick:C},void 0):i||(0,e.jsx)(R(),{onClick:C},void 0)}),void 0)}),[x,c,d,v]),N=(0,o.useMemo)((function(){return n.menuListProps&&(0,e.jsx)("div",A({className:"horizontal-menu-list-box"},{children:(0,e.jsx)(P,A({},i,{expansion:x,selectMenu:u,onClickMenu:p}),void 0)}),void 0)}),[i,x,u,p]),k=(0,o.useMemo)((function(){return n.footerProps&&(0,e.jsx)(j,A({},r,{expansion:x}),void 0)}),[r,x]);return(0,e.jsxs)("div",A({className:(y=g["horizontal-menu"],y+=" paraui-horizontal-menu",h&&(y+=" "+h),x||(y+=" horizontal-menu-shrink"),t||(y+=" horizontal-menu-no-logo"),t&&t.expansion&&(y+=" horizontal-menu-logo-expansion"),t&&"full"===t.mode&&(y+=" horizontal-menu-logo-full"),d&&(y+=" horizontal-menu-show-expansion"),y)},{children:[(0,e.jsxs)("div",A({className:"horizontal-menu-left"},{children:[w,S,N]}),void 0),(0,e.jsx)("div",A({className:"horizontal-menu-right"},{children:k}),void 0)]}),void 0)},_=function(){return _=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},_.apply(this,arguments)},H=function(e,o,n){if(n||2===arguments.length)for(var t,i=0,r=o.length;i<r;i++)!t&&i in o||(t||(t=Array.prototype.slice.call(o,0,i)),t[i]=o[i]);return e.concat(t||Array.prototype.slice.call(o))},Z=(0,i.Z)(),U=(0,t.makeStyles)((function(){return(0,t.createStyles)({"vertical-menu-list":{overflow:"hidden",height:"100%",padding:"30px 0",position:"relative","& > .scroll-top":{position:"absolute",top:"0",left:"0",width:"100%",height:"30px",textAlign:"center","& > svg":{color:Z.textColor.primary,cursor:"pointer",verticalAlign:"top",marginTop:"7px",transform:"rotate(180deg)","&:hover":{color:Z.thmemColor.primary}}},"& > .vertical-menu-list-box":{height:"100%",overflow:"hidden","& > .vertical-menu-list-box-srcoll":{transition:"all .3s","& .vertical-menu-list-item":{"& > .vertical-menu-list-item-content":{height:"40px",lineHeight:"40px",cursor:"pointer",display:"flex","&:hover":{backgroundColor:Z.bgBorderColor.line1,"& > .menu-item-icon":{"& > svg":{color:Z.thmemColor.primary}},"& > .menu-item-label":{color:Z.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:Z.thmemColor.primary}}},"& > .menu-item-icon":{width:"16px",marginRight:"10px","& > svg":{fontSize:"16px",color:Z.textColor.primary,verticalAlign:"top",position:"relative",top:"12px"},"& > .opacity-pos-svg":{opacity:"0"}},"& > .menu-item-label":{fontSize:"12px",color:Z.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap"},"& > .menu-item-arrow":{width:"16px","& > svg":{fontSize:"16px",transition:"all .3s",color:Z.textColor.primary,verticalAlign:"top",position:"relative",top:"12px"},"& > .opacity-pos-svg":{opacity:"0"}}},"&.vertical-menu-list-item-open":{backgroundColor:Z.bgBorderColor.bg2,"& > .vertical-menu-list-item-content":{"& > .menu-item-arrow":{"& > svg":{transform:"rotate(180deg)"}}}},"&.vertical-menu-list-item-select":{"& > .vertical-menu-list-item-content":{"& > .menu-item-icon":{"& > svg":{color:Z.thmemColor.primary}},"& > .menu-item-label":{color:Z.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:Z.thmemColor.primary}}}}},"& .vertical-menu-list-item-shrink":{height:"40px",lineHeight:"40px","&:hover":{"& > span":{color:Z.thmemColor.primary,backgroundColor:Z.bgBorderColor.line1,"& > svg":{color:Z.thmemColor.primary}}},"& > span":{display:"inline-block",width:"100%",height:"100%",color:Z.textColor.primary,textAlign:"center",fontSize:"12px",cursor:"pointer",position:"relative","&:after":{content:'""',position:"absolute",width:"100%",height:"100%",left:"0",top:"0",zIndex:1},"& > svg":{verticalAlign:"top",position:"relative",top:"12px",fontSize:"16px",color:Z.textColor.primary}},"&.vertical-menu-list-item-shrink-select":{"& > span":{color:Z.thmemColor.primary,"& > svg":{color:Z.thmemColor.primary}}},"&.vertical-menu-list-item-shrink-hover":{"& > span":{color:Z.thmemColor.primary,backgroundColor:Z.bgBorderColor.line1,"& > svg":{color:Z.thmemColor.primary}}}}}},"& > .scroll-bottom":{position:"absolute",bottom:"0",left:"0",width:"100%",height:"30px",textAlign:"center","& > svg":{color:Z.textColor.primary,cursor:"pointer",verticalAlign:"top",marginTop:"7px","&:hover":{color:Z.thmemColor.primary}}}},"vertical-menu-item-popper":{"& .vertical-menu-item-popper, &.vertical-menu-item-popper":{paddingLeft:"5px",zIndex:10,"& > .menu-item-popper-content":{boxShadow:Z.boxShadow,borderRadius:Z.borderRadius,backgroundColor:"white",color:Z.textColor.primary,"& > .menu-item-popper-content-item":{position:"relative","&:after":{position:"absolute",left:"-5px",top:"0",width:"100%",height:"40px",zIndex:-1,content:'""'},"& > .menu-item-popper-content-item-content":{width:"200px",height:"40px",padding:"0 10px",display:"flex",cursor:"pointer","&:hover":{backgroundColor:Z.bgBorderColor.line1,"& > .menu-item-icon":{"& > svg":{color:Z.thmemColor.primary}},"& > .menu-item-label":{color:Z.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:Z.thmemColor.primary}}},"& > .menu-item-icon":{width:"16px",marginRight:"10px","& > svg":{fontSize:"16px",color:Z.textColor.primary,verticalAlign:"top",position:"relative",top:"12px","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}},"& > .opacity-pos-svg":{opacity:"0"}},"& > .menu-item-label":{fontSize:"12px",color:Z.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap",textAlign:"left",lineHeight:"40px"},"& > .menu-item-arrow":{width:"16px","& > svg":{fontSize:"16px",transition:"all .3s",color:Z.textColor.primary,verticalAlign:"top",position:"relative",top:"12px",transform:"rotate(270deg)","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}},"& > .opacity-pos-svg":{opacity:"0"}}},"&.menu-item-popper-content-item-select":{"& > .menu-item-popper-content-item-content":{"& > .menu-item-icon":{"& > svg":{color:Z.thmemColor.primary}},"& > .menu-item-label":{color:Z.thmemColor.primary},"& > .menu-item-arrow":{"& > svg":{color:Z.thmemColor.primary}}}}}},"& .vertical-menu-item-popper":{position:"absolute",transform:"none !important",left:"100% !important",top:"0"}}}})})),Y=function(n){var t=n.label,i=(n.type,n.path),r=n.icon,a=n.children,l=n.className,s=n.level,c=void 0===s?1:s,u=n.selectMenu,m=void 0===u?"":u,d=n.idMenuLast,v=n.onClickMenu,h=n.shrinkOthers,g=void 0===h||h,f=(0,o.useState)(!1),x=f[0],b=f[1];(0,o.useEffect)((function(){var e=d[m];e&&-1!==e.indexOf(i)&&e.length>1?b(!0):g&&b(!1)}),[d,m,i]);var y=function(){if(a&&a.length>0)return v&&v(!1),b(!x);v&&v(n)},j=function(){if(r){var o=S[r];return o?o():r}return(0,e.jsx)(w(),{className:"opacity-pos-svg"},void 0)},C=(0,o.useMemo)((function(){return(0,e.jsxs)("div",_({onClick:y,className:"vertical-menu-list-item-content",style:{paddingLeft:15*c+"px",paddingRight:"15px"}},{children:[(0,e.jsx)("span",_({className:"menu-item-icon"},{children:j()}),void 0),(0,e.jsx)("span",_({className:"menu-item-label"},{children:t}),void 0),(0,e.jsx)("span",_({className:"menu-item-arrow"},{children:a&&a.length>0?(0,e.jsx)(w(),{},void 0):(0,e.jsx)(w(),{className:"opacity-pos-svg"},void 0)}),void 0)]}),void 0)}),[a,v,x,c,r,t]),N=(0,o.useMemo)((function(){return(0,e.jsx)(p.Collapse,_({in:x,className:"li-collapse",timeout:"auto"},{children:a&&a.length>0&&a.map((function(o,n){return(0,e.jsx)(Y,_({},o,{level:c+1,idMenuLast:d,selectMenu:m,onClickMenu:v,shrinkOthers:g}),n)}))}),void 0)}),[x,a,c,d,m,v,g]);return(0,e.jsxs)("div",_({className:function(){var e="vertical-menu-list-item";x&&(e+=" vertical-menu-list-item-open"),l&&(e+=" "+l);var o=d[m];return o&&-1!==o.indexOf(i)&&(e+=" vertical-menu-list-item-select"),e}()},{children:[C,N]}),void 0)},$=function(n){var t=n.open,i=void 0!==t&&t,r=n.anchorEl,a=n.idMenuLast,l=n.selectMenu,s=void 0===l?"":l,u=n.onClickMenu,m=n.list,d=void 0===m?[]:m,v=n.onMouseEnter,h=n.onMouseLeave,g=n.level,f=void 0===g?1:g,x=n.className,b=(0,o.useState)(null),y=b[0],j=b[1],C=(0,o.useState)(null),N=C[0],k=C[1],z=(0,o.useState)([]),M=z[0],F=z[1],O=(0,o.useState)({})[0],E=function(e,o){return function(n){var t;t=n,clearTimeout(O.leaveTimer),O.leaveTimer=setTimeout((function(){1===f&&v&&v();var n=[e];e.children&&e.children.length>0&&(n=e.children);var i=t.target;k(i),F(n),j(o)}),50)}},T=function(e){return function(o){e.children&&e.children.length>0||(u&&u(e),h&&h())}},P=function(o){if(o){var n=S[o];return n?n():o}return(0,e.jsx)(w(),{className:"opacity-pos-svg"},void 0)},I=function(e){var o="menu-item-popper-content-item",n=a&&a[s];return n&&-1!==n.indexOf(e.path)&&(o+=" menu-item-popper-content-item-select"),o},L=function(){var e="vertical-menu-item-popper";return x&&(e+=" "+x),e},B=(0,o.useCallback)((function(o,n){return(0,e.jsx)(e.Fragment,{children:o.children&&o.children.length>0&&y===n&&(0,e.jsx)($,{open:y===n,anchorEl:N,list:M,idMenuLast:a,selectMenu:s,onClickMenu:u,onMouseEnter:v,onMouseLeave:h,level:f+1},void 0)},void 0)}),[y,N,M,a,s,u,v,h,f]),R=(0,o.useMemo)((function(){return(0,e.jsx)("div",_({className:"menu-item-popper-content"},{children:d.map((function(o,n){return(0,e.jsx)("div",_({className:I(o),onMouseLeave:function(e){clearTimeout(O.leaveTimer),O.leaveTimer=setTimeout((function(){1===f&&h&&h(),j(null),k(null),F([])}))},onMouseEnter:E(o,n)},{children:(0,e.jsxs)("div",_({className:"menu-item-popper-content-item-content",onClick:T(o)},{children:[(0,e.jsx)("span",_({className:"menu-item-icon"},{children:P(o.icon)}),void 0),(0,e.jsx)("span",_({className:"menu-item-label"},{children:o.label}),void 0),(0,e.jsx)("span",_({className:"menu-item-arrow"},{children:(t=o.children,t&&t.length>0?(0,e.jsx)(w(),{},void 0):(0,e.jsx)(w(),{className:"opacity-pos-svg"},void 0))}),void 0),B(o,n)]}),void 0)}),n);var t}))}),void 0)}),[d,u,y,N,M,a,s,u,v,h,f]),A=function(){return 1!==f?(0,e.jsx)("div",_({className:L()},{children:R}),void 0):(0,e.jsx)(p.Popper,_({open:i,anchorEl:r,disablePortal:!0,placement:"right-start",className:L()},{children:R}),void 0)};return(0,e.jsx)(e.Fragment,{children:1===f?(0,c.createPortal)((0,e.jsx)(A,{},void 0),document.getElementsByTagName("body")[0]):(0,e.jsx)(A,{},void 0)},void 0)},G=function(e){if(!e)return 0;try{var o=e.match(/translate3d\((.*)px, (.*)px, (.*)px\)/);return Number(o&&o[2])}catch(e){}return 0},J=function(t){var i=t.list,r=void 0===i?[]:i,a=t.expansion,l=void 0===a||a,s=t.selectMenu,c=void 0===s?"":s,u=t.onClickMenu,p=t.className,m=t.shrinkOthers,d=void 0===m||m,v=U(t),h=(0,o.useState)(!1),g=h[0],f=h[1],x=(0,o.useState)(null),b=x[0],y=x[1],j=(0,o.useState)(null),C=j[0],N=j[1],k=(0,o.useState)([]),M=k[0],F=k[1],O=(0,o.useState)(""),E=O[0],T=O[1],P=(0,o.useState)({}),I=P[0],L=P[1],B=(0,o.useState)({prev:!1,next:!1}),R=B[0],A=B[1],D=(0,o.useState)({})[0],q=n().useRef();(0,o.useEffect)((function(){c!==E&&T(c),Z()}),[c]),(0,o.useEffect)((function(){V(r),Z()}),[r]);var W,Z=function(){var e=Q(),o=e.min,n=e.max,t=G(q.current.style.transform);A({prev:t!==o,next:t>n})},J=function(e){return function(){var o=G(q.current.style.transform);switch(e){case"next":o-=100;break;case"prev":o+=100}K(o)}},K=function(e){var o=Q(),n=o.min,t=o.max;e>n&&(e=n),e<t&&(e=t),A({prev:e!==n,next:e>t}),q.current.style.transform="translate3d(0, "+e+"px, 0)"},Q=function(){var e=q.current.parentNode.getBoundingClientRect().height,o=-(q.current.getBoundingClientRect().height-e);return e>q.current.getBoundingClientRect().height&&(o=0),{min:0,max:o}},V=function(e){var o={},n={},t={},i=function(e,r){for(var a=0,l=e.length;a<l;a++){var s=e[a],c=s.path;if(o[c]=s,r){var u=(0,z.DeepClone)(n[r.path]||[]);u.push(c),n[c]=H([],u,!0)}else n[c]=[c];s.children&&s.children.length>0?i(s.children,s):t[c]=n[c]}};i(e),L(t)},X=function(e,o){return function(n){clearTimeout(D.leaveTimer);var t=[e];e.children&&e.children.length>0&&(t=e.children),y(o),N(n.target),F(t),f(!0)}},ee=function(){f(!1),N(null),F([]),y(null)},oe=function(){clearTimeout(D.leaveTimer)},ne=function(){ee()},te=function(e){var o=e.icon,n=e.label;if(o){var t=S[o];return t?t():o}if(n)return n[0]},ie=function(e){if(!1===e)return setTimeout((function(){Z()}),300);u&&u(e)},re=function(e,o){var n="vertical-menu-list-item-shrink",t=I[E];return t&&-1!==t.indexOf(e.path)&&(n+=" vertical-menu-list-item-shrink-select"),b===o&&(n+=" vertical-menu-list-item-shrink-hover"),n},ae=(0,o.useMemo)((function(){if(l)return r.map((function(e,n){return(0,o.createElement)(Y,_({},e,{key:n,level:1,idMenuLast:I,selectMenu:E,onClickMenu:ie,shrinkOthers:d}))}))}),[l,r,I,E,u,d]),le=(0,o.useMemo)((function(){return l?null:r.map((function(o,n){return(0,e.jsx)("div",_({className:re(o,n),onMouseEnter:X(o,n),onMouseLeave:function(e){clearTimeout(D.leaveTimer),D.leaveTimer=setTimeout((function(){ee()}),100)}},{children:(0,e.jsx)("span",{children:te(o)},void 0)}),n)}))}),[l,r,I,E,b]),se=(0,o.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:R.prev&&(0,e.jsx)("span",_({className:"scroll-top"},{children:(0,e.jsx)(w(),{onClick:J("prev")},void 0)}),void 0)},void 0)}),[R]),ce=(0,o.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:R.next&&(0,e.jsx)("span",_({className:"scroll-bottom"},{children:(0,e.jsx)(w(),{onClick:J("next")},void 0)}),void 0)},void 0)}),[R]),ue=(0,o.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:g&&(0,e.jsx)($,{open:g,anchorEl:C,list:M,idMenuLast:I,selectMenu:E,onClickMenu:ie,onMouseEnter:oe,onMouseLeave:ne,className:v["vertical-menu-item-popper"],level:1},void 0)},void 0)}),[g,C,M,I,E,u,D]);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",_({className:(W=v["vertical-menu-list"],W+=" vertical-menu-list",p&&(W+=" "+p),W),onWheel:function(e){return function(e){var o=e.deltaY,n=G(q.current.style.transform);K(n-=o)}(e)}},{children:[se,(0,e.jsx)("div",_({className:"vertical-menu-list-box"},{children:(0,e.jsxs)("div",_({className:"vertical-menu-list-box-srcoll",ref:q},{children:[ae,le]}),void 0)}),void 0),ce]}),void 0),ue]},void 0)},K=function(){return K=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},K.apply(this,arguments)},Q=(0,i.Z)(),V=(0,t.makeStyles)((function(){return(0,t.createStyles)({"vertical-footer":{paddingBottom:"20px","& > .line":{width:"calc(100% - 30px)",borderTop:"1px solid "+Q.bgBorderColor.line1,paddingBottom:"20px",margin:"0 auto"},"& > .back-btn":{padding:"0 15px",marginBottom:"10px","& > button":{width:"100%",whiteSpace:"nowrap",boxShadow:"none","& svg":{color:"white"}},"&.back-btn-shrink":{padding:"0","& > button":{minWidth:"inherit",borderRadius:"0","& > span":{"& > span":{margin:"0"}}}}},"& > .language":{"& .language-item":{height:"40px",lineHeight:"40px",display:"flex",padding:"0 15px",cursor:"pointer","&:hover":{backgroundColor:Q.bgBorderColor.line1,"& > .language-item-icon":{"& > svg":{color:Q.thmemColor.primary}},"& > .language-item-label":{color:Q.thmemColor.primary},"& > .language-item-arrow":{"& > svg":{color:Q.thmemColor.primary}}},"& > .language-item-icon":{width:"16px",marginRight:"10px","& > svg":{fontSize:"16px",color:Q.textColor.primary,verticalAlign:"top",position:"relative",top:"12px"},"& > .opacity-pos-svg":{opacity:"0"}},"& > .language-item-label":{fontSize:"12px",color:Q.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap"},"& > .language-item-arrow":{width:"16px","& > svg":{fontSize:"16px",transition:"all .3s",color:Q.textColor.primary,verticalAlign:"top",position:"relative",top:"12px"},"& > .opacity-pos-svg":{opacity:"0"}}},"& > .li-collapse":{"& .language-item":{paddingLeft:"30px","&.language-item-select":{"& > .language-item-icon":{"& > svg":{color:Q.thmemColor.primary}},"& > .language-item-label":{color:Q.thmemColor.primary},"& > .language-item-arrow":{"& > svg":{color:Q.thmemColor.primary}}}}},"&.language-shrink":{"& .language-item":{justifyContent:"center",padding:"0",textAlign:"center","& > .language-item-icon":{marginRight:"0",width:"100%",position:"relative","&:after":{content:'""',position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:10}}}},"&.language-select":{"& .language-item":{backgroundColor:Q.bgBorderColor.line1,"& > .language-item-icon":{"& > svg":{color:Q.thmemColor.primary}},"& > .language-item-label":{color:Q.thmemColor.primary}}}},"& > .btn-list":{"& > .btn-list-item":{height:"40px",lineHeight:"40px",display:"flex",padding:"0 15px",cursor:"pointer","&:hover":{backgroundColor:Q.bgBorderColor.line1,"& > .btn-list-item-icon":{"& > svg":{color:Q.thmemColor.primary}},"& > .btn-list-item-label":{color:Q.thmemColor.primary}},"& > .btn-list-item-icon":{width:"16px",marginRight:"10px","& > svg":{fontSize:"16px",color:Q.textColor.primary,verticalAlign:"top",position:"relative",top:"12px","&:after":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",content:'""',zIndex:1}},"& > .opacity-pos-svg":{opacity:"0"}},"& > .btn-list-item-label":{fontSize:"12px",color:Q.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap"},"&.btn-list-item-select":{backgroundColor:Q.bgBorderColor.line1,"& > .btn-list-item-icon":{"& > svg":{color:Q.thmemColor.primary}},"& > .btn-list-item-label":{color:Q.thmemColor.primary}}},"&.btn-list-shrink":{"& .btn-list-item":{justifyContent:"center",padding:"0",textAlign:"center","& > .btn-list-item-icon":{marginRight:"0",width:"100%",position:"relative","&:after":{content:'""',position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:10}}}}},"& > .logo":{display:"flex",padding:"0 15px",alignItems:"center",height:"40px",lineHeight:"40px","& > img":{height:"30px",width:"auto"},"& > span":{fontSize:"12px",color:Q.textColor.primary,width:"100%",fontWeight:"700",whiteSpace:"nowrap",marginLeft:"10px"},"&.logo-shrink":{padding:0,justifyContent:"center","& > span":{marginLeft:"0",textAlign:"center"}}},"&.vertical-footer-shrink":{"& > .line":{width:"calc(100% - 15px)"}}},"menu-popover":{paddingLeft:"5px",zIndex:10,"& > .menu-popover-box":{boxShadow:Q.boxShadow,borderRadius:Q.borderRadius,backgroundColor:"white",color:Q.textColor.primary,"& > .menu-popover-item":{width:"200px",height:"40px",padding:"0 10px",display:"flex",cursor:"pointer","&:hover":{backgroundColor:Q.bgBorderColor.line1,"& > .icon":{"& > svg":{color:Q.thmemColor.primary}},"& > .label":{color:Q.thmemColor.primary}},"& > .icon":{marginRight:"10px","& > svg":{fontSize:"16px",color:Q.textColor.primary,verticalAlign:"top",position:"relative",top:"12px"}},"& > .label":{fontSize:"12px",color:Q.textColor.primary,width:"100%",fontWeight:"400",whiteSpace:"nowrap",textAlign:"left",lineHeight:"40px"},"&.menu-popover-item-select":{"& > .icon":{"& > svg":{color:Q.thmemColor.primary}},"& > .label":{color:Q.thmemColor.primary}}}}}})})),X=function(o){var n,t=o.backSelfcare,i=void 0===t?{}:t,r=o.expansion,a=void 0===r||r,l=o.customize,s=o.className,c=o.onClick,p=function(e){c&&c(e)};return(0,e.jsx)(e.Fragment,{children:l||(0,e.jsx)("div",K({className:(n="back-btn",s&&(n+=" "+s),a||(n+=" back-btn-shrink"),n)},{children:function(){if(a)return(0,e.jsx)(u.default,K({startIcon:i.icon,variant:"contained",onClick:p},{children:i.label}),void 0);if(i.icon)return(0,e.jsx)(u.default,{startIcon:i.icon,variant:"contained",onClick:p},void 0);if(i.label){var o=i.label;return"string"==typeof o&&(o=o[0]),(0,e.jsx)(u.default,K({variant:"contained",onClick:p},{children:o}),void 0)}}()}),void 0)},void 0)},ee=function(n){var t=V(n),i=n.language,r=void 0===i?[]:i,a=n.selectLang,l=void 0===a?"":a,s=n.onClick,u=n.expansion,m=void 0===u||u,d=n.className,v=n.customize,h=(0,o.useState)(!1),g=h[0],f=h[1],x=(0,o.useState)({}),b=x[0],y=x[1],j=(0,o.useState)({}),C=j[0],S=j[1],N=(0,o.useState)(!1),k=N[0],z=N[1],M=(0,o.useState)(null),F=M[0],O=M[1],E=(0,o.useState)({})[0];(0,o.useEffect)((function(){var e=b[l]||{};S(e)}),[l,b]),(0,o.useEffect)((function(){for(var e={},o=0,n=r.length;o<n;o++){var t=r[o];t.value&&(e[t.value]=t)}y(e)}),[r]);var T,P=function(){m&&f(!g)},I=function(e){return function(){s&&s(e.value,e),f(!1),z(!1)}},L=function(e){var o="language-item";return e.value===l&&(o+=" language-item-select"),o},B=(0,o.useMemo)((function(){return(0,e.jsx)(p.Collapse,K({in:g&&m,className:"li-collapse",timeout:"auto"},{children:r.map((function(o,n){return(0,e.jsxs)("div",K({className:L(o),onClick:I(o)},{children:[o.icon&&(0,e.jsx)("span",K({className:"language-item-icon"},{children:o.icon}),void 0),(0,e.jsx)("span",K({className:"language-item-label"},{children:o.label}),void 0)]}),n)}))}),void 0)}),[g,r,m,s]),R=function(e){m||(E.timer=setTimeout((function(){z(!1),O(null)}),100))},A=function(e){return function(o){m||(clearTimeout(E.timer),z(!0),e&&O(o.target))}},D=(0,o.useMemo)((function(){return(0,e.jsx)("div",K({className:"language-item",onClick:P,onMouseLeave:R,onMouseEnter:A(!0)},{children:m?(0,e.jsxs)(e.Fragment,{children:[C.icon&&(0,e.jsx)("span",K({className:"language-item-icon"},{children:C.icon}),void 0),(0,e.jsx)("span",K({className:"language-item-label"},{children:C.label}),void 0),r.length>1&&(0,e.jsx)("span",K({className:"language-item-arrow"},{children:(0,e.jsx)(w(),{},void 0)}),void 0)]},void 0):C.icon?(0,e.jsx)("span",K({className:"language-item-icon"},{children:C.icon}),void 0):C.label?"string"==typeof C.label?(0,e.jsx)("span",K({className:"language-item-label"},{children:C.label[0]}),void 0):(0,e.jsx)("span",K({className:"language-item-label"},{children:C.label}),void 0):void 0}),void 0)}),[m,C,r,g,E]),q=(0,o.useMemo)((function(){var o=function(e){var o="menu-popover-item";return e.value===C.value&&(o+=" menu-popover-item-select"),o};return(0,c.createPortal)((0,e.jsx)((function(){return(0,e.jsx)(p.Popper,K({open:k,anchorEl:F,disablePortal:!0,placement:"right-start",onMouseLeave:R,onMouseEnter:A(!1),className:(n=t["menu-popover"],n+=" menu-popover")},{children:(0,e.jsx)("div",K({className:"menu-popover-box"},{children:r.map((function(n,t){return(0,e.jsxs)("div",K({className:o(n),onClick:I(n)},{children:[n.icon&&(0,e.jsx)("span",K({className:"icon"},{children:n.icon}),void 0),(0,e.jsx)("span",K({className:"label"},{children:n.label}),void 0)]}),t)}))}),void 0)}),void 0);var n}),{},void 0),document.getElementsByTagName("body")[0])}),[r,C,t,k,F,E,s]);return(0,e.jsx)(e.Fragment,{children:v||(0,e.jsxs)("div",K({className:(T="language",d&&(T+=" "+d),m||(T+=" language-shrink"),k&&(T+=" language-select"),T)},{children:[D,B,k&&q]}),void 0)},void 0)},oe=function(n){var t,i=V(n),r=n.list,a=void 0===r?[]:r,l=n.expansion,s=void 0===l||l,u=n.customize,m=n.className,d=n.onClick,v=(0,o.useState)({}),h=v[0],g=v[1],f=(0,o.useState)(!1),x=f[0],b=f[1],y=(0,o.useState)(null),j=y[0],C=y[1],w=(0,o.useState)({})[0],S=function(e){s||(w.timer=setTimeout((function(){b(!1),C(null),g({})}),50))},N=function(e){return function(o){s||(clearTimeout(w.timer),b(!0),e&&(C(o.target),g(e)))}},k=function(e){return function(o){d&&d(e,o)}},z=(0,o.useMemo)((function(){return(0,c.createPortal)((0,e.jsx)((function(){return(0,e.jsx)(p.Popper,K({open:x,anchorEl:j,disablePortal:!0,placement:"right-start",onMouseLeave:S,onMouseEnter:N(),className:(o=i["menu-popover"],o+=" menu-popover")},{children:(0,e.jsx)("div",K({className:"menu-popover-box"},{children:(0,e.jsxs)("div",K({className:"menu-popover-item",onClick:k(h)},{children:[h.icon&&(0,e.jsx)("span",K({className:"icon"},{children:h.icon}),void 0),(0,e.jsx)("span",K({className:"label"},{children:h.label}),void 0)]}),void 0)}),void 0)}),void 0);var o}),{},void 0),document.getElementsByTagName("body")[0])}),[a,i,x,j,w,h]),M=(0,o.useMemo)((function(){var o=function(o){return s?(0,e.jsxs)(e.Fragment,{children:[o.icon&&(0,e.jsx)("span",K({className:"btn-list-item-icon"},{children:o.icon}),void 0),(0,e.jsx)("span",K({className:"btn-list-item-label"},{children:o.label}),void 0)]},void 0):o.icon?(0,e.jsx)("span",K({className:"btn-list-item-icon"},{children:o.icon}),void 0):o.label?"string"==typeof o.label?(0,e.jsx)("span",K({className:"btn-list-item-icon"},{children:o.label[0]}),void 0):(0,e.jsx)("span",K({className:"btn-list-item-label"},{children:o.label}),void 0):void 0};return(0,e.jsx)(e.Fragment,{children:a.map((function(n,t){var i="btn-list-item";return n.label&&n.label===h.label&&(i+=" btn-list-item-select"),(0,e.jsx)("div",K({className:i,onClick:k(n),onMouseLeave:S,onMouseEnter:N(n)},{children:o(n)}),t)}))},void 0)}),[a,s,h]);return(0,e.jsx)(e.Fragment,{children:u||(0,e.jsxs)("div",K({className:(t="btn-list",m&&(t+=" "+m),s||(t+=" btn-list-shrink"),t)},{children:[M,x&&z]}),void 0)},void 0)},ne=function(o){var n,t=o.user,i=void 0===t?{}:t,r=o.expansion,a=void 0===r||r,l=o.customize,s=o.className,c=o.onClick;return(0,e.jsx)(e.Fragment,{children:l||(0,e.jsx)("div",K({className:(n="logo",s&&(n+=" "+s),a||(n+=" logo-shrink"),n),onClick:function(e){c&&c(e)}},{children:function(){if(a)return(0,e.jsxs)(e.Fragment,{children:[i.img&&(0,e.jsx)("img",{src:i.img,alt:""},void 0),i.label&&(0,e.jsx)("span",{children:i.label},void 0)]},void 0);if(i.img)return(0,e.jsx)("img",{src:i.img,alt:""},void 0);if(i.label){if("string"==typeof i.label)return(0,e.jsx)("span",{children:i.label[0]},void 0);(0,e.jsx)("span",{children:i.label},void 0)}}()}),void 0)},void 0)},te=function(n){var t,i=V(n),r=n.className,a=void 0===r?"":r,l=n.expansion,s=void 0===l||l,c=n.backSelfcareProps,u=n.languageProps,p=n.btnListProps,m=n.userProps,d=n.customize,v=(0,o.useMemo)((function(){return c&&(0,e.jsx)(X,K({},c,{expansion:s}),void 0)}),[c,s]),h=(0,o.useMemo)((function(){return u&&(0,e.jsx)(ee,K({},u,{expansion:s}),void 0)}),[u,s]),g=(0,o.useMemo)((function(){return p&&(0,e.jsx)(oe,K({},p,{expansion:s}),void 0)}),[p,s]),f=(0,o.useMemo)((function(){return m&&(0,e.jsx)(ne,K({},m,{expansion:s}),void 0)}),[m,s]);return(0,e.jsx)(e.Fragment,{children:d||(0,e.jsxs)("div",K({className:(t=i["vertical-footer"],a&&(t+=" "+a),s||(t+=" vertical-footer-shrink"),t)},{children:[(0,e.jsx)("div",{className:"line"},void 0),v,h,g,f]}),void 0)},void 0)},ie=function(){return ie=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},ie.apply(this,arguments)},re=(0,i.Z)(),ae=(0,t.makeStyles)((function(){return(0,t.createStyles)({"footer-expansion":{"&.footer-expansion":{display:"flex",alignItems:"center",backgroundColor:re.bgBorderColor.bg2,padding:"5px 0",whiteSpace:"nowrap",height:"30px",lineHeight:"30px","& > svg":{fontSize:"20px",color:re.textColor.secondary,cursor:"pointer",marginLeft:"15px","&:hover":{color:re.thmemColor.primary}},"& > .line":{borderRight:"1px solid"+re.bgBorderColor.bg1,display:"inline-block",height:"16px",marginLeft:"15px"},"& > .version":{marginLeft:"10px",fontSize:"12px",color:re.textColor.secondary},"&.footer-expansion-shrink":{justifyContent:"center","& > svg":{margin:"0"},"& > .line":{display:"none"},"& > .version":{}}}}})})),le=function(o){var n=o.expansion,t=void 0===n||n,i=o.expandIcon,r=o.shrinkIcon,a=o.customizeContent,l=o.clickExpansion,s=o.version,c=o.className,u=ae(o),p=function(){l&&l(!t)},m=function(){var e=u["footer-expansion"];return e+=" footer-expansion",c&&(e+=" "+c),t||(e+=" footer-expansion-shrink"),e};return(0,e.jsx)("div",ie({className:m()},{children:function(){if(a)return a;return(0,e.jsxs)("div",ie({className:m()},{children:[t?i||(0,e.jsx)(L(),{onClick:p},void 0):r||(0,e.jsx)(R(),{onClick:p},void 0),(0,e.jsx)("span",{className:"line"},void 0),t&&s&&(0,e.jsx)("span",ie({className:"version"},{children:s}),void 0)]}),void 0)}()}),void 0)},se=function(){return se=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},se.apply(this,arguments)},ce=((0,i.Z)(),(0,t.makeStyles)((function(){return(0,t.createStyles)({"vertical-menu":{width:"100%",height:"100%",display:"flex",flexDirection:"column"}})}))),ue=function(n){var t=n.logoProps,i=n.menuListProps,r=n.footerProps,a=n.expansion,l=void 0===a||a,c=n.onClickExpansion,u=n.selectMenu,p=n.onClickMenu,m=n.className,d=n.shrinkOthers,v=void 0===d||d,h=n.footerExpansionProps,g=n.showExpansion,f=void 0===g||g,x=ce(n),b=(0,o.useState)(!0),y=b[0],j=b[1];(0,o.useEffect)((function(){l!==y&&j(l)}),[l]);var C,w=function(){c&&c(!y)},S=(0,o.useMemo)((function(){return n.logoProps&&(0,e.jsx)(s,se({},t,{expansion:y}),void 0)}),[t,y]),N=(0,o.useMemo)((function(){return n.menuListProps&&(0,e.jsx)(J,se({},i,{expansion:y,selectMenu:u,onClickMenu:p,shrinkOthers:v}),void 0)}),[i,y,u,p]),k=(0,o.useMemo)((function(){return n.footerProps&&(0,e.jsx)(te,se({},r,{expansion:y}),void 0)}),[r,y]),z=(0,o.useMemo)((function(){return f?(0,e.jsx)(le,se({clickExpansion:w},h,{expansion:y}),void 0):null}),[y,c,h,c,f]);return(0,e.jsxs)("div",se({className:(C=x["vertical-menu"],C+=" vertical-menu paraui-vertical-menu",m&&(C+=" "+m),l||(C+=" vertical-menu-shrink"),C)},{children:[S,N,k,z]}),void 0)},pe=function(){return pe=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},pe.apply(this,arguments)},me=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)o.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(n[t[i]]=e[t[i]])}return n},de=function(o){var n=o.mode,t=void 0===n?"vertical":n,i=me(o,["mode"]);return(0,e.jsx)(e.Fragment,{children:"vertical"===t?(0,e.jsx)(ue,pe({},i),void 0):(0,e.jsx)(W,pe({},i),void 0)},void 0)},ve=de}(),v}()}));
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/10 14:24
|
|
4
|
+
* @description 菜单参数
|
|
5
|
+
*/
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
/** logo参数 */
|
|
8
|
+
export interface LogoProps {
|
|
9
|
+
/** 模式 split分离 full铺满 */
|
|
10
|
+
mode?: 'split' | 'full';
|
|
11
|
+
/** 展开 / 收起 */
|
|
12
|
+
expansion?: boolean;
|
|
13
|
+
/** logo地址 */
|
|
14
|
+
img?: string;
|
|
15
|
+
/** 标题 */
|
|
16
|
+
title?: string;
|
|
17
|
+
/** 自定义内容 */
|
|
18
|
+
customizeContent?: ReactNode;
|
|
19
|
+
/** 样式class */
|
|
20
|
+
className?: string;
|
|
21
|
+
[name: string]: any;
|
|
22
|
+
}
|
|
23
|
+
/** 菜单模式: vertical竖向 horizontal横向 */
|
|
24
|
+
export declare type MenuModeType = 'vertical' | 'horizontal';
|
|
25
|
+
/** 菜单类型 */
|
|
26
|
+
export declare type MenuListTypeType = 'redirect' | 'router' | "iframe" | "snack" | "snackPage";
|
|
27
|
+
/** 菜单列表项参数 */
|
|
28
|
+
export interface MenuChildrenProps {
|
|
29
|
+
/** 样式class */
|
|
30
|
+
className?: string;
|
|
31
|
+
/** 菜单名 */
|
|
32
|
+
label?: string;
|
|
33
|
+
/** 菜单类型 */
|
|
34
|
+
type?: MenuListTypeType;
|
|
35
|
+
/** 菜单路径 */
|
|
36
|
+
path?: string;
|
|
37
|
+
/** 菜单图标 */
|
|
38
|
+
icon?: ReactNode;
|
|
39
|
+
/** 菜单组件 */
|
|
40
|
+
component?: any;
|
|
41
|
+
/** 子菜单 */
|
|
42
|
+
children?: MenuChildrenProps[];
|
|
43
|
+
/** 菜单最后一层所有上下级 一条线 */
|
|
44
|
+
idMenuLast?: any;
|
|
45
|
+
/** 当前选中菜单 */
|
|
46
|
+
selectMenu?: string;
|
|
47
|
+
/** 点击菜单 */
|
|
48
|
+
onClickMenu?: (item: MenuChildrenProps | false) => void;
|
|
49
|
+
/** 选中菜单,是否收起其他展开项 */
|
|
50
|
+
shrinkOthers?: boolean;
|
|
51
|
+
[name: string]: any;
|
|
52
|
+
}
|
|
53
|
+
/** 菜单列表参数 */
|
|
54
|
+
export interface MenuListProps {
|
|
55
|
+
/** 菜单模式 vertical竖向 horizontal横向 */
|
|
56
|
+
mode?: MenuModeType;
|
|
57
|
+
/** 展开 / 收起 */
|
|
58
|
+
expansion?: boolean;
|
|
59
|
+
/** 菜单列表参数 */
|
|
60
|
+
list?: MenuChildrenProps[];
|
|
61
|
+
/** 当前选中菜单 */
|
|
62
|
+
selectMenu?: string;
|
|
63
|
+
/** 点击菜单 */
|
|
64
|
+
onClickMenu?: (item: MenuChildrenProps | false) => void;
|
|
65
|
+
/** 样式class */
|
|
66
|
+
className?: string;
|
|
67
|
+
/** 选中菜单,是否收起其他展开项 */
|
|
68
|
+
shrinkOthers?: boolean;
|
|
69
|
+
/** 自定义更多内容 */
|
|
70
|
+
moreCustomize?: ReactNode;
|
|
71
|
+
[name: string]: any;
|
|
72
|
+
}
|
|
73
|
+
/** 弹出菜单 */
|
|
74
|
+
export interface MenuItemPopoverProps {
|
|
75
|
+
/** 打开 */
|
|
76
|
+
open?: boolean;
|
|
77
|
+
/** 定位元素 */
|
|
78
|
+
anchorEl?: any;
|
|
79
|
+
/** 菜单列表 */
|
|
80
|
+
list?: MenuChildrenProps[];
|
|
81
|
+
/** 菜单最后一层所有上下级 一条线 */
|
|
82
|
+
idMenuLast?: any;
|
|
83
|
+
/** 当前选中菜单 */
|
|
84
|
+
selectMenu?: string;
|
|
85
|
+
/** 点击菜单 */
|
|
86
|
+
onClickMenu?: (item: MenuChildrenProps | false) => void;
|
|
87
|
+
/** 层级 */
|
|
88
|
+
level?: number;
|
|
89
|
+
/** 鼠标移入 */
|
|
90
|
+
onMouseEnter?: Function;
|
|
91
|
+
/** 鼠标移出 */
|
|
92
|
+
onMouseLeave: Function;
|
|
93
|
+
className?: string;
|
|
94
|
+
[name: string]: any;
|
|
95
|
+
}
|
|
96
|
+
/** 语言 */
|
|
97
|
+
export interface LanguageItemProps {
|
|
98
|
+
/** 图标 */
|
|
99
|
+
icon?: ReactNode;
|
|
100
|
+
/** 文字 */
|
|
101
|
+
label?: ReactNode;
|
|
102
|
+
/** 值 */
|
|
103
|
+
value?: string;
|
|
104
|
+
[name: string]: any;
|
|
105
|
+
}
|
|
106
|
+
/** 语言 */
|
|
107
|
+
export interface LanguageProps {
|
|
108
|
+
/** 样式class */
|
|
109
|
+
className?: string;
|
|
110
|
+
/** 是否展开 */
|
|
111
|
+
expansion?: boolean;
|
|
112
|
+
/** 当前选中的语言 */
|
|
113
|
+
selectLang?: string;
|
|
114
|
+
/** 语言列表 */
|
|
115
|
+
language?: LanguageItemProps[];
|
|
116
|
+
/** 点击下拉语言 */
|
|
117
|
+
onClick?: (val: any, item: LanguageItemProps) => void;
|
|
118
|
+
/** 自定义 */
|
|
119
|
+
customize?: ReactNode;
|
|
120
|
+
}
|
|
121
|
+
export interface BackSelfcareProps {
|
|
122
|
+
/** 返回自助服务 */
|
|
123
|
+
backSelfcare?: {
|
|
124
|
+
/** 图标 */
|
|
125
|
+
icon?: ReactNode;
|
|
126
|
+
/** 标题 */
|
|
127
|
+
label?: ReactNode;
|
|
128
|
+
[name: string]: any;
|
|
129
|
+
};
|
|
130
|
+
/** 是否展开 */
|
|
131
|
+
expansion?: boolean;
|
|
132
|
+
/** 自定义 */
|
|
133
|
+
customize?: ReactNode;
|
|
134
|
+
/** 样式class */
|
|
135
|
+
className?: string;
|
|
136
|
+
/** 点击事件 */
|
|
137
|
+
onClick?: (e: any) => void;
|
|
138
|
+
}
|
|
139
|
+
/** 按钮listItem */
|
|
140
|
+
export interface BtnListItemProps {
|
|
141
|
+
/** 图标 */
|
|
142
|
+
icon?: ReactNode;
|
|
143
|
+
/** 标题 */
|
|
144
|
+
label?: ReactNode;
|
|
145
|
+
/** 值 */
|
|
146
|
+
value?: string;
|
|
147
|
+
[name: string]: any;
|
|
148
|
+
}
|
|
149
|
+
/** 按钮列表 */
|
|
150
|
+
export interface BtnListProps {
|
|
151
|
+
/** 按钮list */
|
|
152
|
+
list?: BtnListItemProps[];
|
|
153
|
+
/** 是否展开 */
|
|
154
|
+
expansion?: boolean;
|
|
155
|
+
/** 自定义 */
|
|
156
|
+
customize?: ReactNode;
|
|
157
|
+
/** 样式class */
|
|
158
|
+
className?: string;
|
|
159
|
+
/** 点击事件 */
|
|
160
|
+
onClick?: (item: BtnListItemProps, e: any) => void;
|
|
161
|
+
}
|
|
162
|
+
/** 用户信息 */
|
|
163
|
+
export interface UserProps {
|
|
164
|
+
/** 用户信息 */
|
|
165
|
+
user?: {
|
|
166
|
+
/** 图片地址 */
|
|
167
|
+
img?: string;
|
|
168
|
+
/** 显示名 */
|
|
169
|
+
label?: ReactNode;
|
|
170
|
+
[name: string]: any;
|
|
171
|
+
};
|
|
172
|
+
/** 是否展开 */
|
|
173
|
+
expansion?: boolean;
|
|
174
|
+
/** 自定义 */
|
|
175
|
+
customize?: ReactNode;
|
|
176
|
+
/** 样式class */
|
|
177
|
+
className?: string;
|
|
178
|
+
/** 点击用户 */
|
|
179
|
+
onClick?: (e: any) => void;
|
|
180
|
+
}
|
|
181
|
+
/** 尾部导航 */
|
|
182
|
+
export interface FooterProps {
|
|
183
|
+
/** 样式class */
|
|
184
|
+
className?: string;
|
|
185
|
+
/** 是否展开 */
|
|
186
|
+
expansion?: boolean;
|
|
187
|
+
/** 返回自助参数 */
|
|
188
|
+
backSelfcareProps?: BackSelfcareProps;
|
|
189
|
+
/** 语言采纳数 */
|
|
190
|
+
languageProps?: LanguageProps;
|
|
191
|
+
/** 按钮list */
|
|
192
|
+
btnListProps?: BtnListProps;
|
|
193
|
+
/** 用户参数 */
|
|
194
|
+
userProps?: UserProps;
|
|
195
|
+
/** 自定义 */
|
|
196
|
+
customize?: ReactNode;
|
|
197
|
+
}
|
|
198
|
+
/** 尾部展开 */
|
|
199
|
+
export interface FooterExpansionProps {
|
|
200
|
+
/** 是否展开 */
|
|
201
|
+
expansion?: boolean;
|
|
202
|
+
/** 展开图标 */
|
|
203
|
+
expandIcon?: ReactNode;
|
|
204
|
+
/** 收起图标 */
|
|
205
|
+
shrinkIcon?: ReactNode;
|
|
206
|
+
/** 自定义 */
|
|
207
|
+
customizeContent?: ReactNode;
|
|
208
|
+
/** 样式class */
|
|
209
|
+
className?: string;
|
|
210
|
+
/** 展开事件 */
|
|
211
|
+
clickExpansion?: (bol: boolean) => void;
|
|
212
|
+
/** 版本号 */
|
|
213
|
+
version?: ReactNode;
|
|
214
|
+
[name: string]: any;
|
|
215
|
+
}
|
|
216
|
+
/** 菜单参数 */
|
|
217
|
+
export interface MenuProps {
|
|
218
|
+
/** 样式class */
|
|
219
|
+
className?: string;
|
|
220
|
+
/** 菜单模式 vertical竖向 horizontal横向 */
|
|
221
|
+
mode?: MenuModeType;
|
|
222
|
+
/** 展开 / 收起 */
|
|
223
|
+
expansion?: boolean;
|
|
224
|
+
/** 当前选中菜单 */
|
|
225
|
+
selectMenu?: string;
|
|
226
|
+
/** 选中菜单,是否收起其他展开项 */
|
|
227
|
+
shrinkOthers?: boolean;
|
|
228
|
+
/** 显示收缩按钮 */
|
|
229
|
+
showExpansion?: boolean;
|
|
230
|
+
/** logo配置 */
|
|
231
|
+
logoProps?: LogoProps;
|
|
232
|
+
/** 菜单配置 */
|
|
233
|
+
menuListProps?: MenuListProps;
|
|
234
|
+
/** 尾部参数 */
|
|
235
|
+
footerProps?: FooterProps;
|
|
236
|
+
/** 尾部展开参数 */
|
|
237
|
+
footerExpansionProps?: FooterExpansionProps;
|
|
238
|
+
/** 展开事件 */
|
|
239
|
+
onClickExpansion?: (bol: boolean) => void;
|
|
240
|
+
/** 点击菜单 */
|
|
241
|
+
onClickMenu?: (item: MenuChildrenProps | false) => void;
|
|
242
|
+
}
|