You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
9.1 KiB
1 lines
9.1 KiB
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[157],{46:function(n,e,r){var o=r(5893),t=r(1496),i=r(7294),l=r(5934),c=r(4825),a=r(4690),u=r(2152);function s(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}var d=(0,t.ZP)(a.Z)({justifyContent:"flex-end",width:"100%"});e.Z=function(n){var e=n.actions,r=void 0===e?[]:e,t=n.loading,a=(0,i.useMemo)((function(){return r.map((function(n){return(0,o.jsx)(c.Z,function(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})))),o.forEach((function(e){s(n,e,r[e])}))}return n}({},n,{children:n.children}),(0,l.Z)())}))}),[r]);return t?(0,o.jsx)(u.Z,{mt:0}):(0,o.jsx)(d,{row:!0,spacing:".5em",children:a})}},157:function(n,e,r){var o=r(5893),t=r(7357),i=r(7294),l=r(9308),c=r(4690),a=r(1514),u=r(7750);function s(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=n[r];return o}function d(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function f(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})))),o.forEach((function(e){d(n,e,r[e])}))}return n}function p(n){return function(n){if(Array.isArray(n))return s(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,e){if(!n)return;if("string"===typeof n)return s(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);"Object"===r&&n.constructor&&(r=n.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(n,e)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v=(0,i.forwardRef)((function(n,e){var r=n.actionCancelText,s=void 0===r?"Cancel":r,d=n.actionProceedText,v=n.children,y=n.closeOnProceed,b=void 0!==y&&y,h=n.contentContainerProps,m=n.dialogProps,g=n.disableProceed,O=n.loading,w=n.loadingAction,P=void 0!==w&&w,j=n.onActionAppend,C=n.onCancelAppend,x=n.onProceedAppend,A=n.openInitially,k=n.preActionArea,S=n.proceedButtonProps,Z=n.proceedColour,I=void 0===Z?"blue":Z,M=n.scrollContent,E=void 0!==M&&M,D=n.scrollBoxProps,N=n.showActionArea,R=void 0===N||N,T=n.showCancel,_=n.showClose,H=n.titleText,V=n.wide,z=n.content,B=void 0===z?v:z,J=(0,i.useRef)(null),U=(0,i.useMemo)((function(){return(0,a.Z)(B,u.Ac)}),[B]),W=(0,i.useMemo)((function(){return(0,i.createElement)(E?l.VZ:t.Z,D,U)}),[U,D,E]),$=(0,i.useMemo)((function(){return R&&(0,o.jsx)(l.ux,{cancelProps:{children:s,onClick:function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];var o,t;null===j||void 0===j||(o=j).call.apply(o,[null].concat(p(e))),null===C||void 0===C||(t=C).call.apply(t,[null].concat(p(e)))}},closeOnProceed:b,loading:P,proceedProps:f({background:I,children:d,disabled:g,onClick:function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];var o,t;null===j||void 0===j||(o=j).call.apply(o,[null].concat(p(e))),null===x||void 0===x||(t=x).call.apply(t,[null].concat(p(e)))}},S),showCancel:T})}),[s,d,b,g,P,j,C,x,S,I,R,T]);return(0,i.useImperativeHandle)(e,(function(){return{setOpen:function(n){var e;return null===(e=J.current)||void 0===e?void 0:e.setOpen(n)}}}),[]),(0,o.jsx)(l.Js,{dialogProps:m,header:H,loading:O,openInitially:A,ref:J,showClose:_,wide:V,children:(0,o.jsxs)(c.Z,f({},h,{children:[W,k,$]}))})}));v.displayName="ConfirmDialog",e.Z=v},9308:function(n,e,r){r.d(e,{ux:function(){return O},VZ:function(){return S},Js:function(){return I}});var o=r(5893),t=r(8262),i=r(7294),l=r(3679),c=r(2152);function a(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function u(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})))),o.forEach((function(e){a(n,e,r[e])}))}return n}function s(n,e){if(null==n)return{};var r,o,t=function(n,e){if(null==n)return{};var r,o,t={},i=Object.keys(n);for(o=0;o<i.length;o++)r=i[o],e.indexOf(r)>=0||(t[r]=n[r]);return t}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(o=0;o<i.length;o++)r=i[o],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}var d=(0,i.createContext)(void 0),f=(0,i.forwardRef)((function(n,e){var r=n.children,a=n.dialogProps,f=void 0===a?{}:a,p=n.loading,v=n.openInitially,y=void 0!==v&&v,b=n.wide,h=f.open,m=f.PaperProps,g=void 0===m?{}:m,O=s(f,["open","PaperProps"]),w=g.sx,P=s(g,["sx"]),j=(0,i.useState)(y),C=j[0],x=j[1],A=(0,i.useMemo)((function(){return null!==h&&void 0!==h?h:C}),[C,h]),k=(0,i.useMemo)((function(){return p?(0,o.jsx)(c.Z,{mt:0}):r}),[r,p]),S=(0,i.useMemo)((function(){return u({minWidth:b?{xs:"calc(100%)",md:"50em"}:null,overflow:"visible"},w)}),[w,b]);return(0,i.useImperativeHandle)(e,(function(){return{open:A,setOpen:x}}),[A]),(0,o.jsx)(t.Z,u({open:A,PaperComponent:l.s_,PaperProps:u({},P,{sx:S})},O,{children:(0,o.jsx)(d.Provider,{value:{open:A,setOpen:x},children:k})}))}));f.displayName="Dialog";var p=f,v=r(46);function y(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=n[r];return o}function b(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function h(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})))),o.forEach((function(e){b(n,e,r[e])}))}return n}function m(n){return function(n){if(Array.isArray(n))return y(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,e){if(!n)return;if("string"===typeof n)return y(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);"Object"===r&&n.constructor&&(r=n.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(n,e)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g=function(n){for(var e,r,o=n.handlers,t=o.base,i=o.origin,l=arguments.length,c=new Array(l>1?l-1:0),a=1;a<l;a++)c[a-1]=arguments[a];null===t||void 0===t||(e=t).call.apply(e,[null].concat(m(c))),null===i||void 0===i||(r=i).call.apply(r,[null].concat(m(c)))},O=function(n){var e=n.cancelProps,r=n.closeOnProceed,t=n.loading,l=void 0!==t&&t,c=n.onCancel,a=void 0===c?g:c,u=n.onProceed,s=void 0===u?g:u,f=n.proceedColour,p=n.proceedProps,y=n.showCancel,b=void 0===y||y,O=n.cancelChildren,w=void 0===O?null===e||void 0===e?void 0:e.children:O,P=n.proceedChildren,j=void 0===P?null===p||void 0===p?void 0:p.children:P,C=(0,i.useContext)(d),x=(0,i.useCallback)((function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return a.apply(void 0,[{handlers:{base:function(){null===C||void 0===C||C.setOpen(!1)},origin:null===e||void 0===e?void 0:e.onClick}}].concat(m(r)))}),[null===e||void 0===e?void 0:e.onClick,C,a]),A=(0,i.useCallback)((function(){for(var n=arguments.length,e=new Array(n),o=0;o<n;o++)e[o]=arguments[o];return s.apply(void 0,[{handlers:{base:function(){r&&(null===C||void 0===C||C.setOpen(!1))},origin:null===p||void 0===p?void 0:p.onClick}}].concat(m(e)))}),[r,C,s,null===p||void 0===p?void 0:p.onClick]);return(0,i.useMemo)((function(){var n=[h({background:f},p,{children:j,onClick:A})];return b&&n.unshift(h({},e,{children:w,onClick:x})),(0,o.jsx)(v.Z,{actions:n,loading:l})}),[w,x,e,l,j,f,A,p,b])},w=r(7971),P=r(1514),j=r(7750),C=function(n){var e=n.children,r=n.showClose,t=(0,i.useContext)(d),c=(0,i.useMemo)((function(){return(0,P.Z)(e,j.z)}),[e]),a=(0,i.useMemo)((function(){return r&&(0,o.jsx)(w.Z,{mapPreset:"close",onClick:function(){null===t||void 0===t||t.setOpen(!1)},size:"small"})}),[t,r]);return(0,o.jsxs)(l.V9,{children:[c,a]})},x=r(1496),A=r(7357),k=(0,x.ZP)(A.Z)({overflowY:"scroll",paddingRight:".4em"}),S=(0,x.ZP)(k)({maxHeight:"60vh"}),Z=(0,i.forwardRef)((function(n,e){var r=n.children,t=n.dialogProps,i=n.header,l=n.loading,c=n.openInitially,a=n.showClose,u=n.wide;return(0,o.jsxs)(p,{dialogProps:t,loading:l,openInitially:c,ref:e,wide:u,children:[(0,o.jsx)(C,{showClose:a,children:i}),r]})}));Z.displayName="DialogWithHeader";var I=Z},1514:function(n,e,r){var o=r(7294);e.Z=function(n,e){return"string"===typeof n?(0,o.createElement)(e,null,n):n}}}]); |