tocco-admin 3.11.49 → 3.11.50

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.
@@ -1 +1 @@
1
- (self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[556],{51368:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});n(5556);var i=n(11843),o=n(44523),r=n(59027),a=n(57561),c=n(1636),s=n(78240),l=n(31085),u=n(74848);const d=(0,l.S)((0,i.injectIntl)((function(e){var t=e.path,n=e.context,i=e.onSuccess,l=e.intl,d=e.locale,m=e.emitAction,f=(0,s.A)(t),y=f?[{id:"rel".concat(f.model),value:f.key}]:[],p=(0,c.A)(n,"Domain");return(0,u.jsx)(o.Ay,{entityName:"Domain",formName:p,mode:"create",defaultValues:y,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Domain/".concat(t)}]}}];i({title:l.formatMessage({id:"client.docs-browser.createDomainSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||m(e)},listApp:r.Ay,docsApp:a.default,labelPosition:"inside"})})))},28824:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});n(5556);var i=n(11843),o=n(44523),r=n(59027),a=n(57561),c=n(1636),s=n(78240),l=n(31085),u=n(74848);const d=(0,l.S)((0,i.injectIntl)((function(e){var t=e.context,n=e.path,i=e.onSuccess,l=e.intl,d=e.locale,m=e.emitAction,f=(0,s.A)(n),y=f?[{id:"rel".concat(f.model),value:f.key}]:[],p=(0,c.A)(t,"Folder");return(0,u.jsx)(o.Ay,{entityName:"Folder",formName:p,mode:"create",defaultValues:y,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Folder/".concat(t)}]}}];i({title:l.formatMessage({id:"client.docs-browser.createFolderSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||m(e)},listApp:r.Ay,docsApp:a.default,labelPosition:"inside"})})))},92259:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(64467),o=n(98179),r=n(74848);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,i.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const s=function(e){return(0,r.jsx)(o.A,c(c({},e),{},{customDeleteEndpoint:"documents/delete"}))}},62896:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var i=n(5544),o=(n(5556),n(4883)),r=(n(27772),n(44523)),a=n(59027),c=n(74547),s=(n(41085),n(57561)),l=n(1636),u=n(31085),d=n(74848);const m=(0,u.S)((function(e){var t=e.selection,n=e.onSuccess,u=e.onCancel,m=e.locale,f=e.context,y=e.emitAction,p=e.navigate,v=e.navigationStrategy,A=t.ids[0].split("/"),g=(0,i.A)(A,2),h=g[0],b=g[1];(0,o.useEffect)((function(){"Resource"===h&&(p("/docs/doc/".concat(b,"/detail")),u())}),[h,b,p,u]);var _=(0,l.A)(f,h);return(0,d.jsx)(r.Ay,{entityName:h,formName:_,entityId:b,mode:"update",locale:m,onEntityUpdated:function(){var e=[{type:"entity-update-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},onEntityDeleted:function(){var e=[{type:"entity-delete-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||y(e)},listApp:a.Ay,docsApp:s.default,labelPosition:"inside",customActions:{history:function(e,t,n,i,o,r,a){v.navigateToPath({pathname:(0,c.K0)(t),inNewTab:!0})}}})}))},19760:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>S});var i,o,r,a=n(11843),c=n(71468),s=n(9675),l=n(31085),u=n(5544),d=n(57528),m=n(2404),f=n.n(m),y=(n(5556),n(4883)),p=n(43759),v=(n(27772),n(48813)),A=n(57561),g=n(78240),h=n(74848),b=p.Ay.div.withConfig({displayName:"StyledButtonsWrapper"})(i||(i=(0,d.A)(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),v.OV),_=(0,p.Ay)(v.tQ).withConfig({displayName:"StyledLoadMask"})(o||(o=(0,d.A)(["\n height: auto;\n"]))),j=function(e,t){return null!==e?"Move_docs_list_item":null!==t?"Move_root_docs_list_item_specific":"Move_root_docs_list_item"},N={initialize:s.n_,moveElements:s.BQ};const S=(0,l.S)((0,c.Ng)((function(e){return{isWaiting:e.docs.move.isWaiting,domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,businessUnit:e.input.businessUnit,locale:e.intl.locale}}),N)((0,a.injectIntl)((function(e){var t=e.selection,n=e.onSuccess,i=e.onError,o=e.path,c=e.initialize,s=e.moveElements,l=e.isWaiting,d=e.domainTypes,m=e.rootNodes,p=e.businessUnit,N=e.locale,S=e.emitAction,k=(0,g.A)(o),O={model:"Docs_list_item",key:"".concat(k.model,"/").concat(k.key)},w=(0,y.useState)(O),x=(0,u.A)(w,2),D=x[0],E=x[1];(0,y.useEffect)((function(){c(t,n,i)}),[]);var P=function(e,t){switch(e){case"Domain":return"/docs/domain/".concat(t,"/list");case"Folder":return"/docs/folder/".concat(t,"/list");case"Resource":return;default:throw new Error("Unexpected model: ".concat(e))}};return(0,h.jsxs)(_,{required:[!l],children:[(0,h.jsx)(A.default,{routerType:"routerless",initialLocation:function(){if(null===D)return null;var e=D.key.split("/"),t=(0,u.A)(e,2),n=t[0],i=t[1];return P(n,i)}(),listLimit:10,selectionStyle:"none",searchFormType:"none",getListFormName:j,onListParentChange:E,getCustomLocation:P,navigationStrategy:{},embedded:!0,emitAction:S,noLeftPadding:!0,domainTypes:d,rootNodes:m,businessUnit:p,sortable:!1,scrollBehaviour:"none",locale:N,selectOnRowClick:!1}),(0,h.jsx)(b,{children:(0,h.jsx)(v.$n,{onClick:function(){return s(D.key,t.ids)},look:"raised",ink:"primary",disabled:null===D||f()(D,O),children:r||(r=(0,h.jsx)(a.FormattedMessage,{id:"client.actions.dms-move.button"}))})})]})}))))},1636:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i=function(e,t){return e.detailFormNames&&e.detailFormNames[t]?e.detailFormNames[t]:"Dms".concat(t)}},27185:(e,t,n)=>{var i=n(38859),o=n(15325),r=n(29905),a=n(34932),c=n(27301),s=n(19219),l=Math.min;e.exports=function(e,t,n){for(var u=n?r:o,d=e[0].length,m=e.length,f=m,y=Array(m),p=1/0,v=[];f--;){var A=e[f];f&&t&&(A=a(A,c(t))),p=l(A.length,p),y[f]=!n&&(t||d>=120&&A.length>=120)?new i(f&&A):void 0}A=e[0];var g=-1,h=y[0];e:for(;++g<d&&v.length<p;){var b=A[g],_=t?t(b):b;if(b=n||0!==b?b:0,!(h?s(h,_):u(v,_,n))){for(f=m;--f;){var j=y[f];if(!(j?s(j,_):u(e[f],_,n)))continue e}h&&h.push(_),v.push(b)}}return v}},80741:(e,t,n)=>{var i=n(83693);e.exports=function(e){return i(e)?e:[]}},5287:(e,t,n)=>{var i=n(34932),o=n(27185),r=n(69302),a=n(80741),c=r((function(e){var t=i(e,a);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=c}}]);
1
+ (self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[556],{51368:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});n(5556);var i=n(11843),o=n(44523),r=n(59027),a=n(57561),c=n(1636),s=n(78240),l=n(31085),u=n(74848);const d=(0,l.S)((0,i.injectIntl)((function(e){var t=e.path,n=e.context,i=e.onSuccess,l=e.intl,d=e.locale,m=e.emitAction,f=(0,s.A)(t),y=f?[{id:"rel".concat(f.model),value:f.key}]:[],p=(0,c.A)(n,"Domain");return(0,u.jsx)(o.Ay,{entityName:"Domain",formName:p,mode:"create",defaultValues:y,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Domain/".concat(t)}]}}];i({title:l.formatMessage({id:"client.docs-browser.createDomainSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||m(e)},listApp:r.Ay,docsApp:a.default,labelPosition:"inside"})})))},28824:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});n(5556);var i=n(11843),o=n(44523),r=n(59027),a=n(57561),c=n(1636),s=n(78240),l=n(31085),u=n(74848);const d=(0,l.S)((0,i.injectIntl)((function(e){var t=e.context,n=e.path,i=e.onSuccess,l=e.intl,d=e.locale,m=e.emitAction,f=(0,s.A)(n),y=f?[{id:"rel".concat(f.model),value:f.key}]:[],p=(0,c.A)(t,"Folder");return(0,u.jsx)(o.Ay,{entityName:"Folder",formName:p,mode:"create",defaultValues:y,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Folder/".concat(t)}]}}];i({title:l.formatMessage({id:"client.docs-browser.createFolderSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||m(e)},listApp:r.Ay,docsApp:a.default,labelPosition:"inside"})})))},92259:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(64467),o=n(98179),r=n(74848);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,i.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const s=function(e){return(0,r.jsx)(o.A,c(c({},e),{},{customDeleteEndpoint:"documents/delete"}))}},62896:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var i=n(5544),o=(n(5556),n(4883)),r=(n(27772),n(44523)),a=n(59027),c=n(74547),s=(n(41085),n(57561)),l=n(1636),u=n(31085),d=n(74848);const m=(0,u.S)((function(e){var t=e.selection,n=e.onSuccess,u=e.onCancel,m=e.locale,f=e.context,y=e.emitAction,p=e.navigate,v=e.navigationStrategy,A=t.ids[0].split("/"),g=(0,i.A)(A,2),h=g[0],b=g[1];(0,o.useEffect)((function(){"Resource"===h&&(p("/docs/doc/".concat(b,"/detail")),u())}),[h,b,p,u]);var _=(0,l.A)(f,h);return(0,d.jsx)(r.Ay,{entityName:h,formName:_,entityId:b,mode:"update",locale:m,onEntityUpdated:function(){var e=[{type:"entity-update-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},onEntityDeleted:function(){var e=[{type:"entity-delete-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||y(e)},listApp:a.Ay,docsApp:s.default,labelPosition:"inside",customActions:{history:function(e,t,n,i,o,r,a){v.navigateToPath({pathname:(0,c.K0)(t),inNewTab:!0})}}})}))},19760:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>S});var i,o,r,a=n(11843),c=n(71468),s=n(9675),l=n(31085),u=n(5544),d=n(57528),m=n(2404),f=n.n(m),y=(n(5556),n(4883)),p=n(43759),v=(n(27772),n(89367)),A=n(57561),g=n(78240),h=n(74848),b=p.Ay.div.withConfig({displayName:"StyledButtonsWrapper"})(i||(i=(0,d.A)(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),v.OV),_=(0,p.Ay)(v.tQ).withConfig({displayName:"StyledLoadMask"})(o||(o=(0,d.A)(["\n height: auto;\n"]))),j=function(e,t){return null!==e?"Move_docs_list_item":null!==t?"Move_root_docs_list_item_specific":"Move_root_docs_list_item"},N={initialize:s.n_,moveElements:s.BQ};const S=(0,l.S)((0,c.Ng)((function(e){return{isWaiting:e.docs.move.isWaiting,domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,businessUnit:e.input.businessUnit,locale:e.intl.locale}}),N)((0,a.injectIntl)((function(e){var t=e.selection,n=e.onSuccess,i=e.onError,o=e.path,c=e.initialize,s=e.moveElements,l=e.isWaiting,d=e.domainTypes,m=e.rootNodes,p=e.businessUnit,N=e.locale,S=e.emitAction,k=(0,g.A)(o),O={model:"Docs_list_item",key:"".concat(k.model,"/").concat(k.key)},w=(0,y.useState)(O),x=(0,u.A)(w,2),D=x[0],E=x[1];(0,y.useEffect)((function(){c(t,n,i)}),[]);var P=function(e,t){switch(e){case"Domain":return"/docs/domain/".concat(t,"/list");case"Folder":return"/docs/folder/".concat(t,"/list");case"Resource":return;default:throw new Error("Unexpected model: ".concat(e))}};return(0,h.jsxs)(_,{required:[!l],children:[(0,h.jsx)(A.default,{routerType:"routerless",initialLocation:function(){if(null===D)return null;var e=D.key.split("/"),t=(0,u.A)(e,2),n=t[0],i=t[1];return P(n,i)}(),listLimit:10,selectionStyle:"none",searchFormType:"none",getListFormName:j,onListParentChange:E,getCustomLocation:P,navigationStrategy:{},embedded:!0,emitAction:S,noLeftPadding:!0,domainTypes:d,rootNodes:m,businessUnit:p,sortable:!1,scrollBehaviour:"none",locale:N,selectOnRowClick:!1}),(0,h.jsx)(b,{children:(0,h.jsx)(v.$n,{onClick:function(){return s(D.key,t.ids)},look:"raised",ink:"primary",disabled:null===D||f()(D,O),children:r||(r=(0,h.jsx)(a.FormattedMessage,{id:"client.actions.dms-move.button"}))})})]})}))))},1636:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i=function(e,t){return e.detailFormNames&&e.detailFormNames[t]?e.detailFormNames[t]:"Dms".concat(t)}},27185:(e,t,n)=>{var i=n(38859),o=n(15325),r=n(29905),a=n(34932),c=n(27301),s=n(19219),l=Math.min;e.exports=function(e,t,n){for(var u=n?r:o,d=e[0].length,m=e.length,f=m,y=Array(m),p=1/0,v=[];f--;){var A=e[f];f&&t&&(A=a(A,c(t))),p=l(A.length,p),y[f]=!n&&(t||d>=120&&A.length>=120)?new i(f&&A):void 0}A=e[0];var g=-1,h=y[0];e:for(;++g<d&&v.length<p;){var b=A[g],_=t?t(b):b;if(b=n||0!==b?b:0,!(h?s(h,_):u(v,_,n))){for(f=m;--f;){var j=y[f];if(!(j?s(j,_):u(e[f],_,n)))continue e}h&&h.push(_),v.push(b)}}return v}},80741:(e,t,n)=>{var i=n(83693);e.exports=function(e){return i(e)?e:[]}},5287:(e,t,n)=>{var i=n(34932),o=n(27185),r=n(69302),a=n(80741),c=r((function(e){var t=i(e,a);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=c}}]);