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
8.9 KiB
1 lines
8.9 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 d(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}var s=(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){d(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)(s,{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 d(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 s(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){s(n,e,r[e])}))}return n}function p(n){return function(n){if(Array.isArray(n))return d(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 d(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 d(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,d=void 0===r?"Cancel":r,s=n.actionProceedText,v=n.children,y=n.closeOnProceed,b=void 0!==y&&y,m=n.contentContainerProps,g=n.dialogProps,h=n.disableProceed,O=n.loading,P=n.loadingAction,w=void 0!==P&&P,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,E=n.scrollContent,M=void 0!==E&&E,D=n.scrollBoxProps,N=n.showClose,R=n.titleText,T=n.wide,_=n.content,H=void 0===_?v:_,V=(0,i.useRef)(null),z=(0,i.useMemo)((function(){return(0,a.Z)(H,u.Ac)}),[H]),B=(0,i.useMemo)((function(){return(0,i.createElement)(M?l.VZ:t.Z,D,z)}),[z,D,M]);return(0,i.useImperativeHandle)(e,(function(){return{setOpen:function(n){var e;return null===(e=V.current)||void 0===e?void 0:e.setOpen(n)}}}),[]),(0,o.jsx)(l.Js,{dialogProps:g,header:R,loading:O,openInitially:A,ref:V,showClose:N,wide:T,children:(0,o.jsxs)(c.Z,f({},m,{children:[B,k,(0,o.jsx)(l.ux,{cancelProps:{children:d,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:w,proceedProps:f({background:I,children:s,disabled:h,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)})]}))})}));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 d(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 s=(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,m=f.open,g=f.PaperProps,h=void 0===g?{}:g,O=d(f,["open","PaperProps"]),P=h.sx,w=d(h,["sx"]),j=(0,i.useState)(y),C=j[0],x=j[1],A=(0,i.useMemo)((function(){return null!==m&&void 0!==m?m:C}),[C,m]),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"},P)}),[P,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({},w,{sx:S})},O,{children:(0,o.jsx)(s.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 m(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 g(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 h=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(g(c))),null===i||void 0===i||(r=i).call.apply(r,[null].concat(g(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?h:c,u=n.onProceed,d=void 0===u?h:u,f=n.proceedColour,p=n.proceedProps,y=n.cancelChildren,b=void 0===y?null===e||void 0===e?void 0:e.children:y,O=n.proceedChildren,P=void 0===O?null===p||void 0===p?void 0:p.children:O,w=(0,i.useContext)(s),j=(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===w||void 0===w||w.setOpen(!1)},origin:null===e||void 0===e?void 0:e.onClick}}].concat(g(r)))}),[null===e||void 0===e?void 0:e.onClick,w,a]),C=(0,i.useCallback)((function(){for(var n=arguments.length,e=new Array(n),o=0;o<n;o++)e[o]=arguments[o];return d.apply(void 0,[{handlers:{base:function(){r&&(null===w||void 0===w||w.setOpen(!1))},origin:null===p||void 0===p?void 0:p.onClick}}].concat(g(e)))}),[r,w,d,null===p||void 0===p?void 0:p.onClick]);return(0,i.useMemo)((function(){return(0,o.jsx)(v.Z,{actions:[m({},e,{children:b,onClick:j}),m({background:f},p,{children:P,onClick:C})],loading:l})}),[b,j,e,l,P,f,C,p])},P=r(1706),w=r(1514),j=r(7750),C=function(n){var e=n.children,r=n.showClose,t=(0,i.useContext)(s),c=(0,i.useMemo)((function(){return(0,w.Z)(e,j.z)}),[e]),a=(0,i.useMemo)((function(){return r&&(0,o.jsx)(P.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}}}]); |