tocco-admin 1.0.102 → 1.0.104
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/changelog.md +7 -0
- package/dist/{chunk-684.6d5674aea946e1b3a5e0.js → chunk-684.28badd84beaa6bc3297d.js} +1 -1
- package/dist/chunk-code-editor.7ca2f8f77166ba37c344.js +1 -0
- package/dist/chunk-vendor-icons.51ef97edd5000882a3fc.js +1 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-code-editor.4ad8779cf69c3c6e7ed3.js +0 -1
- package/dist/chunk-vendor-icons.f63a6a08c4b21db9b73b.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[85],{57387:(e,t,n)=>{n.r(t),n.d(t,{default:()=>x});var r=n(27361),o=n.n(r),a=n(74806),i=n(50558),c=n(29785),s=n(59713),l=n.n(s),u=(n(9230),n(17563)),p=n(73183),d=n(6699),f=n(90169),m=n(85893);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=function(e){var t=e.entityName,n=e.entityKeys,r=e.children,o=n.map((function(e){return{entityName:t,key:e}}));return(0,m.jsx)(d.Z,{to:"/docs?rootNodes=".concat(JSON.stringify(o)),target:"_blank",children:r})};const v=function(e){var t=u.parse(e.history.location.search);return(0,m.jsx)(p.default,y(y(y({},e),{},{routerType:"inherit",navigationStrategy:{ListLink:g,DetailLink:f.z2}},t.rootNodes&&{rootNodes:JSON.parse(t.rootNodes)}),{},{searchFormCollapsed:e.searchFormCollapsed,onSearchFormCollapsedChange:function(t){var n=t.collapsed;e.saveUserPreferences({"admin.list.searchFormCollapsed":n})},scrollBehaviour:"inline"}))};var b={saveUserPreferences:c.RK};const x={container:(0,i.connect)((function(e,t){return{searchFormCollapsed:o()(e.preferences.userPreferences,"admin.list.searchFormCollapsed",null)}}),b)((0,a.ZP)(v))}},23847:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Wn});var r=n(15857),o=n(74806),a=n(50558),i="path/SET_CURRENT_VIEW_INFO",c="path/LOAD_CURRENT_ROUTE",s="path/SET_BREADCRUMBS_INFO",l="path/UPDATE_BREADCRUMBS_INFO",u="path/SET_RELATIONS",p="path/SET_CURRENT_VIEW_TITLE",d="path/SET_RELATIONS_INFO",f="path/PROPAGATE_REFRESH",m="path/INVALIDATE_LAST_BREADCRUMB",h="path/SELECT_RELATION",y=function(e,t){return{type:i,payload:{location:e,currentViewInfo:t}}},g=function(e,t){return{type:l,payload:{path:e,breadcrumbsInfo:t}}},v=function(e){return{type:u,payload:{relations:e}}},b=function(e){return{type:d,payload:{relationsInfo:e}}},x=function(e){return{type:h,payload:{selectedRelation:e}}},w=(n(9230),n(1024)),k=n.n(w),j=n(80467),Z=n(19743),P=n(98235),O=n(27361),R=n.n(O),_=n(70696),N=n(75354),C=n(87467),E=n(90169),D=n(96801),S=function(e){var t=D.Z.extractParamsFromPath("/e/:entity/:key?/:relation*/:view(list|detail|edit|create|relations|action)/:actionId?",e),n=D.Z.extractParamsFromPath("/e/action/:actionId",e);return t||n},I=n(44448),T={"widget-code-copy":(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,99294))})),"user-qr-action":(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,83754))})),"input-edit":(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,34259))})),resourcescheduler:(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,773))})),"show-output-jobs-action":(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,79191))})),delete:(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,74259))})),merge:(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,55393))})),copy:(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,20995))})),"entity-report":(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,85904))})),documents:(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,62902))})),"password-update":(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,58538))})),"widget-config-edit":(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,24818))})),"connect-principal":(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,95751))})),export:(0,w.lazy)((function(){return Promise.all([n.e(18),n.e(802),n.e(107)]).then(n.bind(n,17715))}))};const V=I.Z.actionFactory(T);var L=n(85893),A=function(e){var t=e.history,n=e.match,r=e.setCurrentViewTitle,o=e.currentViewInfo,a=e.intl,i=t.location;if((0,w.useEffect)((function(){return o&&r(a.formatMessage({id:"client.actions.".concat(o.actionId,".title")})),function(){r(null)}}),[o,r,a]),!o)return null;var c=N.Z.fromQueryString(i.search),s=R()(i,"state.selection",c.actionProperties),l=R()(i,"state.definition.properties",c.actionProperties),u=function(){var e=S(n.url).key?(0,C.H)(n.url):(0,C.H)(n.url,2);t.replace(e)};return(0,L.jsx)(V,{history:t,match:n,appId:o.actionId,selection:s,actionProperties:l,navigationStrategy:(0,E.ZP)(t,n),onSuccess:u,onError:u,onCancel:u})},F=function(e,t){return 0===Object.keys(_.Z.difference(e,t)).length};const M=k().memo(A,F);var z={setCurrentViewTitle:function(e){return{type:p,payload:{currentViewTitle:e}}}};const B=(0,a.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),z)((0,o.ZP)(M));var W,$=n(50600),U=n(91073),q=n(319),H=n.n(q),K=n(63038),G=n.n(K),Y=n(28655),J=n.n(Y),X=n(58804),Q=n(12274),ee=n(88601),te=n(7281),ne=X.ZP.div.withConfig({displayName:"StyledEntityDetailAppWrapper"})(W||(W=J()(["\n margin: 0;\n background-color: ",";\n padding: 0 0 0 ",";\n overflow: hidden;\n height: 100%;\n"])),ee.Z.color("paper"),te.Z.space(0));const re=function(e){var t=e.currentViewInfo,n=e.history,r=e.match,o=e.intl,a=e.chooseDocument,i=e.dispatchEmittedAction,c=n.location,s=R()(c,"state.defaultValues",[]),l=(0,w.useState)(!1),u=G()(l,2),p=u[0],d=u[1];if(!t)return null;var f,m=t.model,h=t.reverseRelation,y=t.parentKey,g=m.name,v=R()(m,"paths.".concat(h,".multi"),!1),b=[].concat(H()(h&&y?[{id:h,value:v?[y]:y}]:[]),H()(s));return(0,L.jsxs)(ne,{children:[(0,L.jsx)(j.NL,{when:p,message:(f="client.entity-browser.detail.confirmTouchedFormLeave",o.formatMessage({id:f}))}),(0,L.jsx)(Q.ZP,{entityName:g,formName:g,mode:"create",defaultValues:b,emitAction:function(e){i(e)},navigationStrategy:(0,E.ZP)(n,r),chooseDocument:a,onEntityCreated:function(e){var t=e.id;d(!1),n.push(r.url.replace(/create$/,t))},onTouchedChange:function(e){var t=e.touched;return d(t)}})]})};var oe={chooseDocument:U.Z.actions.chooseDocument,dispatchEmittedAction:$.Z.dispatchEmittedAction};const ae=(0,a.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),oe)((0,o.ZP)(re));var ie=n(29785),ce=n(59713),se=n.n(ce),le=n(17563),ue=n(24720),pe=n(29441),de=n(48926),fe=n.n(de),me=n(87757),he=n.n(me),ye=n(63094),ge=n(73183);function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){se()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const xe=function(e){var t=e.entityName,n=e.entityKey,r=e.showActions,o=e.noLeftPadding,a=e.openResource,i=e.initialLocation,c=e.sortable,s=(0,w.useState)(null),l=G()(s,2),u=l[0],p=l[1],d=(0,w.useCallback)(fe()(he().mark((function e(){return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ye.Z.simpleRequest("entities/2.0/"+t+"/"+n+"/entitydocs/folder").then((function(e){p(e.body.key)}));case 1:case"end":return e.stop()}}),e)}))),[t,n]);return(0,w.useEffect)((function(){d()}),[d]),u&&(0,L.jsx)(ge.default,be(be(be({routerType:"routerless",initialLocation:i,noLeftPadding:o,sortable:c,searchFormType:"none",rootNodes:[{key:u,entityName:"Folder"}],embedded:!0,showActions:r},!1===r?{selectionStyle:"none"}:{}),{},{disableViewPersistor:!0},a?{openResource:a}:{}),{},{scrollBehaviour:"inline"}))};const we=function(e){var t=e.currentViewInfo,n=e.initialLocation;return(0,L.jsx)(xe,{noLeftPadding:!1,entityName:t.parentModel.name,entityKey:t.parentKey,showActions:!0,initialLocation:n})};function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){se()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ze=function(e){var t=e.match,n=e.history,r=e.currentViewInfo,o=e.emitAction,a=e.searchFormCollapsed,i=e.saveUserPreferences;if(!r)return null;var c=le.parse(n.location.search),s=n.location.hash?n.location.hash.substring(1):null;return"Resource"===r.model.name?(0,L.jsx)(we,{currentViewInfo:r,initialLocation:s}):(0,L.jsx)(ue.ZP,je(je({emitAction:o,limit:25,id:"".concat(r.model.name,"_list"),entityName:r.model.name,formName:c.formName||r.model.name,onRowClick:function(e){var r=e.id;n.push(t.url.replace(/list$/,"")+r)}},r.reverseRelation&&{parent:{key:r.parentKey,reverseRelationName:r.reverseRelation,model:r.parentModel.name}}),{},{showLink:!0,navigationStrategy:(0,E.ZP)(n,t),searchFormPosition:"left",searchFormType:"admin",scrollBehaviour:"inline",store:pe.Z.viewInfoSelector(n.location.pathname).store,onStoreCreate:function(e){pe.Z.persistViewInfo(n.location.pathname,{store:e},r.level)},actionAppComponent:V,tql:c.tql,searchFormCollapsed:a,onSearchFormCollapsedChange:function(e){var t=e.collapsed;i({"admin.list.searchFormCollapsed":t})}}))};var Pe={emitAction:function(e){return $.Z.dispatchEmittedAction(e)},saveUserPreferences:ie.RK};const Oe=(0,a.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],searchFormCollapsed:R()(e.preferences.userPreferences,"admin.list.searchFormCollapsed",!1)}}),Pe)((0,o.ZP)(Ze));var Re;function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){se()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ce=X.ZP.div.withConfig({displayName:"StyledEntityDetailAppWrapper"})(Re||(Re=J()(["\n margin: 0;\n background-color: ",";\n padding: 0 0 0 ",";\n overflow: hidden;\n height: 100%;\n"])),ee.Z.color("paper"),te.Z.space(0));const Ee=function(e){var t=e.currentViewInfo,n=e.history,r=e.match,o=e.intl,a=e.chooseDocument,i=e.emitAction,c=e.propagateRefresh,s=e.invalidateLastBreadcrumb,l=(0,w.useState)(!1),u=G()(l,2),p=u[0],d=u[1];if(!t||t.pathname!==n.location.pathname)return null;var f=le.parse(location.search).formName,m=t.model.name;return(0,L.jsxs)(Ce,{children:[(0,L.jsx)(j.NL,{when:p,message:function(e){return n.location.pathname!==e.pathname&&(t="client.entity-browser.detail.confirmTouchedFormLeave",o.formatMessage({id:t}));var t}}),(0,L.jsx)(Q.ZP,{entityName:m,entityId:t.key,formName:f||m,mode:"update",emitAction:i,onTouchedChange:function(e){var t=e.touched;d(t)},navigationStrategy:Ne(Ne({},(0,E.ZP)(n,r)),{},{navigateToCreateRelative:function(e,t){if(e){var o=(0,C.H)(r.url,1);n.push({pathname:"".concat(o,"/").concat(e,"/create"),state:t})}else{var a=(0,C.H)(r.url,2);n.push({pathname:a+"/create",state:t})}}}),chooseDocument:a,onEntityDeleted:function(){var e=(0,C.H)(r.url,2);n.push(e)},onEntityUpdated:function(){var e=n.location;s(e)},onRefresh:function(){var e=n.location;c(e)},actionAppComponent:V,onSubGridRowClick:function(e){var t=e.id,o=e.relationName,a=(0,C.H)(r.url);n.push("".concat(a,"/").concat(o,"/").concat(t))}})]})};var De={chooseDocument:U.Z.actions.chooseDocument,emitAction:function(e){return $.Z.dispatchEmittedAction(e)},propagateRefresh:function(e){return{type:f,payload:{location:e}}},invalidateLastBreadcrumb:function(e){return{type:m,payload:{location:e}}}};const Se=(0,a.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),De)((0,o.ZP)(Ee));var Ie=n(34206),Te=n(88162),Ve={};const Le=function(e){var t=e.currentViewInfo,n=e.history,r=e.selectedRelation,o=e.sortable;return(0,L.jsx)(xe,{entityName:t.model.name,entityKey:t.key,showActions:!1,noLeftPadding:!0,history:n,openResource:function(e){n.push("".concat(r.relationName,"/list#").concat(e))},sortable:o})};var Ae=function(e){var t=e.selectedRelation,n=e.currentViewInfo,r=e.match,o=e.history,a=e.emitAction,i="".concat(t.reverseRelationName).concat(t.relationName);return(0,L.jsx)(ue.ZP,{id:"preview"+t.reverseRelationName+t.targetEntity,entityName:t.targetEntity,formName:t.targetEntity,parent:{key:n.key,reverseRelationName:t.reverseRelationName,model:n.model.name,relationName:t.relationName},showLink:!0,navigationStrategy:(0,E.ZP)(o,r),onRowClick:function(e){var n=e.id,a=r.url.replace(/detail$/,"");o.push("".concat(a).concat(t.relationName,"/").concat(n))},onNavigateToCreate:function(){var e=(0,C.H)(r.url);o.push(e+"/"+t.relationName+"/create")},searchFormType:"fulltext",selectionStyle:"none",store:pe.Z.viewInfoSelector(o.location.pathname)["store-".concat(i)],onStoreCreate:function(e){pe.Z.persistViewInfo(n.pathname,se()({},"store-".concat(i),e),n.level)},showActions:!1,limit:15,emitAction:a,scrollBehaviour:"inline"},t.reverseRelationName+t.targetEntity)};const Fe=k().memo(Ae);var Me,ze,Be,We,$e,Ue,qe,He,Ke,Ge,Ye,Je,Xe,Qe=n(6699),et=n(65035),tt=n(11347),nt=n(86491),rt=n(69829),ot=n(30759),at=X.ZP.div.withConfig({displayName:"StyledRelationsViewWrapper"})(Me||(Me=J()(["\n display: ",";\n height: 100%;\n flex-direction: column;\n"])),(function(e){return e.isRightPaneCollapsed?"none":"flex"})),it=X.ZP.div.withConfig({displayName:"StyledPlaceHolder"})(ze||(ze=J()(["\n display: ",";\n flex: 1;\n height: 100%;\n width: 25px;\n background: ",";\n padding-top: ",";\n padding-left: ",";\n align-items: flex-start;\n\n &:hover {\n cursor: pointer;\n }\n"])),(function(e){return e.isRightPaneCollapsed?"flex":"none"}),ee.Z.color("paper"),te.Z.space(-1.5),te.Z.space(-2.5)),ct=X.ZP.div.withConfig({displayName:"StyledToggleCollapse"})(Be||(Be=J()(["\n display: flex;\n background-color: ",";\n padding-top: ",";\n padding-bottom: ",";\n"])),ee.Z.color("paper"),te.Z.space(-1.5),te.Z.space(-1.5)),st=(0,X.ZP)(et.Z).withConfig({displayName:"StyledToggleCollapseButton"})(We||(We=J()(["\n font-size: ",";\n padding: 0;\n margin-left: auto;\n\n &:hover,\n ",":hover & {\n background-color: transparent;\n color: ",";\n }\n"])),te.Z.font(0),it,ee.Z.color("secondaryLight")),lt=X.ZP.div.withConfig({displayName:"StyledPreviewBox"})($e||($e=J()(["\n background-color: ",";\n padding: ",";\n margin-top: 3px;\n display: flex;\n flex-direction: column;\n flex: 1;\n"])),ee.Z.color("paper"),te.Z.space(-1)),ut=X.ZP.div.withConfig({displayName:"StyledRelationBoxes"})(Ue||(Ue=J()(["\n background-color: ",";\n padding: ",";\n display: grid;\n grid-template-columns: repeat(auto-fit, 170px);\n grid-gap: ",";\n justify-content: space-between;\n overflow-y: auto;\n align-content: flex-start;\n height: fit-content;\n min-height: 150px;\n max-height: 20%;\n ","\n"])),ee.Z.color("paper"),te.Z.space(-1),te.Z.space(-2),tt.C),pt=(0,X.ZP)(Qe.Z).withConfig({displayName:"StyledPreviewLink"})(qe||(qe=J()(["\n padding-left: ",";\n\n &:nth-child(2) {\n padding-left: 0;\n }\n"])),te.Z.space(-.5)),dt=X.ZP.div.withConfig({displayName:"StyledRelationLinks"})(He||(He=J()(["\n display: none;\n margin-left: auto;\n\n * {\n color: ",";\n padding-left: ",";\n }\n"])),ee.Z.color("text"),te.Z.space(-4.5)),ft=X.ZP.div.withConfig({displayName:"StyledRelationBox"})(Ke||(Ke=J()(["\n border-radius: ",";\n padding: "," ",";\n display: flex;\n background-color: ",";\n height: fit-content;\n\n &&& {\n * {\n color: ",";\n box-sizing: initial;\n }\n }\n ",";\n\n /* allow hover styles only on non-touch devices */\n ","\n"])),ee.Z.radii("large"),te.Z.space(-2.7),te.Z.space(-1),(function(e){return e.selected&&ee.Z.color("secondary")}),(function(e){return e.selected&&ee.Z.color("paper")}),(function(e){return e.selected&&"\n ".concat(dt," {\n display: flex;\n }\n ")}),(0,nt.k)("\n &:hover ".concat(dt," {\n display: flex;\n }\n\n && {\n :hover {\n background-color: ").concat(ee.Z.color("secondaryLight"),";\n\n * {\n color: ").concat(ee.Z.color("paper"),";\n }\n cursor: pointer;\n }\n }\n\n ").concat(Qe.Z,":hover * {\n color: ").concat(ee.Z.color("secondary"),";\n }\n "))),mt=(0,X.ZP)(rt.Fe).withConfig({displayName:"StyledRelationLabel"})(Ge||(Ge=J()(["\n && {\n max-width: 110px;\n }\n"]))),ht=X.ZP.span.withConfig({displayName:"StyledCountLabel"})(Ye||(Ye=J()(["\n ","\n"])),(0,ot.Z)());const yt=function(e){var t,n,r=e.relation,o=e.history,a=e.match,i=e.relationsInfo,c=e.selectRelation,s=e.selectedRelation,l=e.intl,u=e.entityName,p=r.relationName,d=r.targetEntity,f=r.relationDisplay,m=function(e){return l.formatMessage({id:e})},h=a.url.replace(/(relations|detail)$/,p),y=a.url.replace(/(relations|detail)$/,p)+"/create";return(0,L.jsxs)(ft,{selected:(null==s?void 0:s.relationName)===p,onClick:function(){c(r),o.replace({search:"?relation=".concat(p)}),function(e,t){Ve[e]=t}(u,p)},children:[(0,L.jsx)(mt,{title:f.label,children:f.label}),(null===(n=i[p])||void 0===n?void 0:n.count)>0?(0,L.jsxs)(ht,{children:[" (",i[p].count,")"]}):null,(0,L.jsxs)(dt,{children:[(0,L.jsx)(Qe.Z,{"aria-label":m("client.admin.entities.relationsView.relationLinkView"),to:h,children:Je||(Je=(0,L.jsx)(Te.Z,{icon:"arrow-right"}))}),(null===(t=i[p])||void 0===t?void 0:t.createPermission)&&"Resource"!==d&&(0,L.jsx)(Qe.Z,{"aria-label":m("client.admin.entities.relationsView.relationLinkCreate"),to:y,children:Xe||(Xe=(0,L.jsx)(Te.Z,{icon:"plus"}))})]})]})};var gt,vt,bt;function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var wt=function(e){var t=e.history,n=e.match,r=e.currentViewInfo,o=e.relations,a=e.relationsInfo,i=e.emitAction,c=e.intl,s=e.isRightPaneCollapsed,l=e.toggleCollapse,u=e.selectedRelation,p=e.selectRelation,d=R()(r,"model.name"),f=(0,w.useCallback)((function(){if((null==o?void 0:o.length)>0){var e=le.parse(t.location.search).relation;if(e)p(o.find((function(t){return t.relationName===e})));else{var n=Ve[d];p(n?o.find((function(e){return e.relationName===n})):o[0])}}}),[o,d,t.location.search,p]);if((0,w.useEffect)(f,[f]),(0,w.useEffect)((function(){return u?null:f()}),[u,f]),!o||0===o.length||!r)return null;var m,h,y=function(e){return c.formatMessage({id:e})},g=u?"Resource"===u.targetEntity?Le:Fe:function(){return gt||(gt=(0,L.jsx)(k().Fragment,{}))},v=o.map((function(t){return(0,L.jsx)(yt,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(n),!0).forEach((function(t){se()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({relation:t,entityName:d},e),"relation-".concat(t.relationName))}));return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(at,{isRightPaneCollapsed:s,children:[(0,L.jsx)(ct,{children:(0,L.jsx)(st,{icon:"chevron-right",onClick:l})}),(0,L.jsx)(ut,{children:v}),u&&(0,L.jsxs)(lt,{children:[(0,L.jsxs)(Ie.ZP.H4,{children:[u.relationDisplay.label,(0,L.jsx)(pt,{"aria-label":y("client.admin.entities.relationsView.relationLinkView"),to:n.url.replace(/(relations|detail)$/,u.relationName),children:vt||(vt=(0,L.jsx)(Te.Z,{icon:"arrow-right"}))}),(m=u.relationName,(null===(h=a[m])||void 0===h?void 0:h.createPermission)&&"Resource"!==u.targetEntity&&(0,L.jsx)(pt,{"aria-label":y("client.admin.entities.relationsView.relationLinkCreate"),to:n.url.replace(/(relations|detail)$/,u.relationName)+"/create",children:bt||(bt=(0,L.jsx)(Te.Z,{icon:"plus"}))}))]}),(0,L.jsx)(g,{selectedRelation:u,match:n,history:t,currentViewInfo:r,emitAction:i,sortable:!0})]})]}),(0,L.jsx)(it,{onClick:l,isRightPaneCollapsed:s,children:(0,L.jsx)(st,{icon:"chevron-left",isRightPaneCollapsed:s})})]})},kt=function(e,t){return 0===Object.keys(_.Z.difference(e,t)).length};const jt=k().memo(wt,kt);var Zt={emitAction:function(e){return $.Z.dispatchEmittedAction(e)},selectRelation:x};const Pt=(0,a.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],relations:e.entities.path.relations,relationsInfo:e.entities.path.relationsInfo,selectedRelation:e.entities.path.selectedRelation}}),Zt)((0,o.ZP)(jt));var Ot,Rt,_t,Nt=X.ZP.div.withConfig({displayName:"StyledDetailViewContainer"})(Ot||(Ot=J()(["\n display: flex;\n flex-direction: row;\n height: 100%;\n\n .react-bs-container-body {\n height: auto !important;\n }\n"]))),Ct=X.ZP.div.withConfig({displayName:"StyledDetailViewLeft"})(Rt||(Rt=J()(["\n flex: 1;\n margin-right: 1rem;\n /* Only show one panel at a time on screens <= 500px */\n display: ",";\n"])),(function(e){var t=e.windowWidth,n=e.isRightPaneCollapsed;return t<=500&&!n&&"none"})),Et=X.ZP.div.withConfig({displayName:"StyledDetailViewRight"})(_t||(_t=J()(["\n flex: ",";\n"])),(function(e){return e.isRightPaneCollapsed?"0":"1"}));const Dt=function(e){var t=e.match,n=e.history,r=(e.currentViewInfo,e.relationViewCollapsed),o=e.saveUserPreferences,a=(0,w.useState)(!1),i=G()(a,2),c=i[0],s=i[1],l=function(){return window.innerWidth},u=(0,w.useState)(l()),p=G()(u,2),d=p[0],f=p[1];(0,w.useEffect)((function(){var e=function(){f(l())};return s(d<768||r),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[d]);return(0,L.jsxs)(Nt,{children:[(0,L.jsx)(Ct,{isRightPaneCollapsed:c,windowWidth:l(),children:(0,L.jsx)(Z.Z.ErrorBoundary,{children:(0,L.jsx)(Se,{match:t,history:n})})}),(0,L.jsx)(Et,{isRightPaneCollapsed:c,children:(0,L.jsx)(Z.Z.ErrorBoundary,{children:(0,L.jsx)(Pt,{match:t,history:n,isRightPaneCollapsed:c,toggleCollapse:function(){s(!c),o({"admin.detail.relationViewCollapsed":!c})}})})})]})};var St={saveUserPreferences:ie.RK};const It=(0,a.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],relationViewCollapsed:R()(e.preferences.userPreferences,"admin.detail.relationViewCollapsed",!1)}}),St)((0,o.ZP)(Dt));const Tt=function(e){var t,n,r=e.match,o=(t=r.path,n=":relation",t.split(n).length-1);return(0,L.jsxs)(j.rs,{children:[(0,L.jsx)(j.AW,{exact:!0,path:"".concat(r.url),render:function(e){var t=e.match;return(0,L.jsx)(j.l_,{to:"".concat(t.url.replace(/\/$/,""),"/detail")})}}),(0,L.jsx)(j.AW,{path:"".concat(r.path,"/detail"),component:It}),(0,L.jsx)(j.AW,{path:"".concat(r.path,"/edit"),component:Se}),(0,L.jsx)(j.AW,{path:"".concat(r.path,"/relations"),component:Pt}),(0,L.jsx)(j.AW,{path:"".concat(r.path,"/action"),component:B}),(0,L.jsx)(j.AW,{path:"".concat(r.path,"/:relation_").concat(o),component:Vt})]})};const Vt=function(e){var t=e.match;return(0,L.jsxs)(j.rs,{children:[(0,L.jsx)(j.AW,{exact:!0,path:t.url,render:function(e){var t=e.match;return(0,L.jsx)(j.l_,{to:"".concat(t.url.replace(/\/$/,""),"/list")})}}),(0,L.jsx)(j.AW,{path:"".concat(t.path,"/action/:id"),component:B}),(0,L.jsx)(j.AW,{path:"".concat(t.path,"/list"),component:Oe}),(0,L.jsx)(j.AW,{path:"".concat(t.path,"/create"),component:ae}),(0,L.jsx)(j.AW,{path:"".concat(t.path,"/:key"),component:Tt})]})};var Lt=n(2977);const At=(0,a.connect)((function(e,t){return{pathPrefix:"/e",breadcrumbsInfo:e.entities.path.breadcrumbsInfo,currentView:e.entities.path.currentViewTitle?{display:e.entities.path.currentViewTitle,title:e.entities.path.currentViewTitle}:null}}),{})((0,o.ZP)(Lt.Z));var Ft=n(44012),Mt=n(39233);const zt=function(e){var t=e.currentViewInfo,n="client.admin.entity.errorView.",r="detail"===t.type?"detailTitle":"defaultTitle",o="listDescription";return"detail"===t.type?o="detailDescription":"list"===t.type&&t.error.relationName&&(o="relationDescription"),(0,L.jsx)(Mt.Z,{title:(0,L.jsx)(Ft.Z,{id:n+r}),message:(0,L.jsx)(Ft.Z,{id:n+o,values:t.error})})};const Bt=(0,a.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}))((0,o.ZP)(zt));var Wt,$t,Ut,qt,Ht=X.ZP.div.withConfig({displayName:"StyledWrapper"})(Wt||(Wt=J()(["\n display: grid;\n grid-template-rows: auto 1fr;\n grid-template-areas:\n 'breadcrumbs'\n 'content';\n height: 100%;\n width: 100%;\n"]))),Kt=X.ZP.div.withConfig({displayName:"StyledContent"})($t||($t=J()(["\n grid-area: content;\n overflow: hidden;\n"]))),Gt=X.ZP.div.withConfig({displayName:"StyledBreadcrumbs"})(Ut||(Ut=J()(["\n grid-area: breadcrumbs;\n"])));const Yt=function(e){var t=e.match,n=e.history,r=e.loadCurrentRoute,o=e.currentViewInfo,a=n.location;(0,w.useEffect)((function(){r(a)}),[a,r]);var i=null!=o&&o.error?(0,L.jsx)(Bt,{history:n}):(0,L.jsxs)(j.rs,{children:[(0,L.jsx)(j.AW,{path:"".concat(t.url,"/action/:actionId"),component:B}),(0,L.jsx)(j.AW,{path:"".concat(t.url,"/:entity"),component:Vt}),(0,L.jsx)(j.AW,{exact:!0,path:t.url,component:P.Z})]});return(0,L.jsxs)(Ht,{children:[qt||(qt=(0,L.jsx)(Z.Z.ErrorBoundary,{children:(0,L.jsx)(Gt,{children:(0,L.jsx)(At,{})})})),(0,L.jsx)(Kt,{children:i})]})};var Jt={loadCurrentRoute:function(e){return{type:c,payload:{location:e}}}};const Xt=(0,a.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),Jt)((0,o.ZP)(Yt));var Qt,en=n(34857),tn=n(81770);function nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(n),!0).forEach((function(t){se()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var on=(Qt={},se()(Qt,i,(function(e,t){var n=t.payload,r=n.location,o=n.currentViewInfo;return rn(rn({},e),{},{currentViewInfos:rn(rn({},e.currentViewInfos),{},se()({},r,rn(rn({},e.currentViewInfos[r]),o)))})})),se()(Qt,s,tn.Z.singleTransferReducer("breadcrumbsInfo")),se()(Qt,l,(function(e,t){var n=t.payload,r=n.path,o=n.breadcrumbsInfo;return rn(rn({},e),{},{breadcrumbsInfo:e.breadcrumbsInfo.map((function(e){return e.path===r?rn(rn({},e),o):e}))})})),se()(Qt,u,tn.Z.singleTransferReducer("relations")),se()(Qt,d,tn.Z.singleTransferReducer("relationsInfo")),se()(Qt,p,tn.Z.singleTransferReducer("currentViewTitle")),se()(Qt,h,tn.Z.singleTransferReducer("selectedRelation")),Qt),an={currentViewInfos:{},breadcrumbsInfo:[],relations:null,relationsInfo:{},selectedRelation:null};var cn=n(57557),sn=n.n(cn),ln=n(78718),un=n.n(ln),pn=n(35937),dn=n.n(pn),fn=n(44759);function mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){se()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yn=he().mark(Nn),gn=he().mark(Cn),vn=he().mark(En),bn=he().mark(Dn),xn=he().mark(Sn),wn=he().mark(Vn),kn=he().mark(Ln),jn=he().mark(An),Zn=he().mark(Fn),Pn=he().mark(Mn),On=he().mark(zn),Rn=function(e){return e.entities.path},_n=/[^/]+\/?[^/]+/g;function Nn(){return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,en.$6)([(0,en.Fm)(c,Cn),(0,en.Fm)(f,Ln),(0,en.Fm)(m,An)]);case 2:case"end":return e.stop()}}),yn)}function Cn(e){var t,n,r,o;return he().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.payload.location,n=t.pathname,a.next=4,(0,en.RE)(Sn,n);case 4:if(!((r=a.sent).length>0)){a.next=16;break}return a.next=8,(0,en.RE)(En,n,r);case 8:return o=a.sent,a.next=11,(0,en.RE)(Dn,r);case 11:if("detail"!==o.type||o.error){a.next=14;break}return a.next=14,(0,en.Cs)(Vn,o.model,o.key);case 14:return a.next=16,(0,en.RE)(pe.Z.clearPersistedViews,o.level+1);case 16:case"end":return a.stop()}}),gn)}function En(e,t){var n;return he().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,en.RE)(In,e,t);case 2:return n=r.sent,r.next=5,(0,en.gz)(y(e,n));case 5:return r.abrupt("return",n);case 6:case"end":return r.stop()}}),vn)}function Dn(e){var t;return he().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,en.RE)(Tn,e);case 2:return t=n.sent,n.next=5,(0,en.gz)({type:s,payload:{breadcrumbsInfo:t}});case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),bn)}function Sn(e){var t,n,r,o,a,i,c,s,l,u,p,d,f,m,h,y,g;return he().wrap((function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(0,en.RE)(S,e);case 2:if(t=v.sent,n=[],null!==t){v.next=6;break}return v.abrupt("return",n);case 6:if(!t.entity){v.next=70;break}return v.prev=7,v.next=10,(0,en.RE)(ye.Z.fetchModel,t.entity);case 10:r=v.sent,n.push({type:"list",model:r}),v.next=18;break;case 14:return v.prev=14,v.t0=v.catch(7),n.push({type:"list",error:{entityName:t.entity}}),v.abrupt("return",n);case 18:if(!t.key){v.next=67;break}return v.next=21,(0,en.RE)(ye.Z.entityExists,r.name,t.key);case 21:if(!v.sent){v.next=29;break}return v.next=25,(0,en.RE)(ye.Z.fetchDisplay,r.name,t.key);case 25:o=v.sent,n.push({type:"detail",key:t.key,model:r,display:o}),v.next=31;break;case 29:return n.push({type:"detail",error:{entityName:r.label,key:t.key}}),v.abrupt("return",n);case 31:if(!t.relation){v.next=67;break}a=t.relation.split("/"),i=0;case 34:if(!(i<a.length)){v.next=67;break}if(c=a[i],s=n[n.length-1],i%2!=0){v.next=50;break}if(l=c,u=s.model.paths[l]){v.next=43;break}return n.push({type:"list",error:{relationName:l,entityName:s.model.name}}),v.abrupt("return",n);case 43:return p=u.targetEntity,v.next=46,(0,en.RE)(ye.Z.fetchModel,p);case 46:d=v.sent,n.push({type:"list",model:d,relationName:l,parent:s}),v.next=64;break;case 50:return f=c,m=s.model,v.next=54,(0,en.RE)(ye.Z.entityExists,m.name,f);case 54:if(!v.sent){v.next=62;break}return v.next=58,(0,en.RE)(ye.Z.fetchDisplay,m.name,f);case 58:h=v.sent,n.push({type:"detail",model:m,key:f,display:h,relationName:s.relationName,parent:s.parent}),v.next=64;break;case 62:return n.push({type:"detail",error:{entityName:m.name,key:f}}),v.abrupt("return",n);case 64:i++,v.next=34;break;case 67:"create"===t.view?(y=n[n.length-1],g=n[n.length-2],n.push({type:"create",model:y.model,parent:g,relationName:y.relationName})):t.actionId&&n.push({type:"action",actionId:t.actionId}),v.next=71;break;case 70:t.actionId&&n.push({type:"action",actionId:t.actionId});case 71:return v.abrupt("return",n);case 72:case"end":return v.stop()}}),xn,null,[[7,14]])}var In=function(e,t){var n=t[t.length-1],r=n.parent;return hn(hn({},sn()(n,["parent"])),{},{pathname:e,level:t.length-1},r&&n.relationName&&{parentKey:r.key,reverseRelation:r.model.paths[n.relationName].reverseRelationName,parentModel:r.model})},Tn=function(e){var t="";return e.map((function(e){return e.error?{type:"error"}:"action"===e.type?null:(t=(t?t+"/":"")+(e.key?e.key:e.relationName||e.model.name),{type:e.type,display:e.display||e.model.label,path:t+"/"+e.type})})).filter((function(e){return e}))};function Vn(e,t){var n,r;return he().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return n=dn()(e.paths,(function(e,t){return e.relationDisplay&&e.relationDisplay.show})),r=Object.keys(n).map((function(e){return un()(n[e],["relationName","reverseRelationName","targetEntity","relationDisplay.label","relationDisplay.order"])})).sort((function(e,t){return e.relationDisplay.order>t.relationDisplay.order?1:-1})),o.next=4,(0,en.gz)(x(null));case 4:return o.next=6,(0,en.gz)(v(r));case 6:return o.next=8,(0,en.RE)(zn,e.name,t);case 8:case"end":return o.stop()}}),wn)}function Ln(e){var t,n,r,o,a;return he().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.payload.location,n=t.pathname,i.next=4,(0,en.Ys)(Rn);case 4:if(r=i.sent,o=r.currentViewInfos,"detail"!==(a=o[n]).type||a.error){i.next=12;break}return i.next=10,(0,en.Cs)(zn,a.model.name,a.key);case 10:return i.next=12,(0,en.gz)(x(null));case 12:case"end":return i.stop()}}),kn)}function An(e){var t,n,r,o,a,i,c,s;return he().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.payload.location,n=t.pathname,l.next=4,(0,en.RE)(S,n);case 4:if(null==(r=l.sent)||!r.entity||null==r||!r.key){l.next=29;break}return l.prev=6,l.next=9,(0,en.RE)(Mn,r);case 9:if(!(o=l.sent)){l.next=24;break}return a=o.entityName,i=o.key,l.next=14,(0,en.RE)(ye.Z.invalidateDisplay,a,i);case 14:return l.next=16,(0,en.RE)(ye.Z.fetchDisplay,a,i);case 16:return c=l.sent,l.next=19,(0,en.gz)(y(n,{display:c}));case 19:return l.next=21,(0,en.RE)(Fn,n);case 21:return s=l.sent,l.next=24,(0,en.gz)(g(s,{display:c}));case 24:l.next=29;break;case 26:l.prev=26,l.t0=l.catch(6),fn.Z.logError("breadcrumbs invalidation failed",l.t0);case 29:case"end":return l.stop()}}),jn,null,[[6,26]])}function Fn(e){var t;return he().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,en.RE)(S,e);case 2:if(null!==(t=n.sent)&&t.entity){n.next=5;break}return n.abrupt("return","");case 5:return n.abrupt("return",[t.entity,t.key,t.relation,t.view].filter(Boolean).join("/"));case 6:case"end":return n.stop()}}),Zn)}function Mn(e){var t,n,r,o,a,i,c,s,l,u;return he().wrap((function(p){for(;;)switch(p.prev=p.next){case 0:if(e&&e.entity&&e.key&&"action"!==e.view){p.next=2;break}return p.abrupt("return",null);case 2:return p.next=4,(0,en.RE)(ye.Z.fetchModel,e.entity);case 4:if(t=p.sent,e.relation){p.next=7;break}return p.abrupt("return",{entityName:t.name,key:e.key});case 7:if(!((n=e.relation.match(_n)).length<1)){p.next=10;break}return p.abrupt("return",null);case 10:r=t,o=null,a=0;case 13:if(!(a<n.length)){p.next=25;break}if(i=n[a].split("/"),c=G()(i,2),s=c[0],l=c[1],(u=r.paths[s])&&l){p.next=18;break}return p.abrupt("return",null);case 18:return p.next=20,(0,en.RE)(ye.Z.fetchModel,u.targetEntity);case 20:r=p.sent,o={entityName:r.name,key:l};case 22:a++,p.next=13;break;case 25:return p.abrupt("return",o);case 26:case"end":return p.stop()}}),Pn)}function zn(e,t){var n,r,o;return he().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n="client/entities/".concat(e,"/").concat(t,"/relations"),a.next=3,(0,en.RE)(ye.Z.requestSaga,n);case 3:return r=a.sent,o=r.body.relations,a.next=7,(0,en.gz)(b(o));case 7:case"end":return a.stop()}}),On)}const Bn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:an,t=arguments.length>1?arguments[1]:void 0,n=on[t.type];return n?n(e,t):e},Wn={container:Xt,reducers:{entities:(0,r.UY)({path:Bn})},sagas:[Nn]}},24295:(e,t,n)=>{n.r(t),n.d(t,{default:()=>xe});var r=n(68957),o=n(91411),a=n(86249),i=n.n(a),c=(n(58900),n(78634)),s=n(84100),l=n(60131),u=n(48230),p=n(64952),d=n(469),f=n(81896),m=n(46940),h=n(27361),y=n.n(h),g=n(14293),v=n.n(g),b=n(13218),x=n.n(b),w=n(47037),k=n.n(w),j=n(1024),Z=n(58804),P=(n(39335),n(28212),n(6488),n(32510),n(79657),n(20844),n(41030),n(98827),n(37363),n(53299),n(54159)),O=function(e){return P.Z.executeRequest("rest/".concat(e))},R=function(e){return 200===e.status?e.json():null},_=n(44822),N=n(11259),C=n(32208),E=n(99357),D=n(19241),S=(n(70646),n(1469)),I=n.n(S),T=n(30236),V=n.n(T),L=["==","!=","<=",">=","<",">","~="],A=["true","false","null"],F=["string","long","serial","bool","boolean","double","float","time","timestamp","char","varchar","date","datetime"],M=["now_date","yesterday_date","tomorrow_date","today_date","now_start","yesterday_start","tomorrow_start","today_start","now","yesterday","tomorrow","today","currentUsername","currentUser","currentBu"],z=["in","dateadd","datetimeadd","duedate","birthdayin","fulltext","likeall","distance","inboundingbox"];function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,D.Z)(e);if(t){var o=(0,D.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,E.Z)(this,n)}}const W=function(e){return function(t){(0,C.Z)(r,t);var n=B(r);function r(){var t;(0,N.Z)(this,r),t=n.call(this);var o=[{token:"keyword.operator.conjunction",regex:/(\s*)(and|or|not)($|\s+)/,caseInsensitive:!0},{token:"support.class.relation",regex:/rel/,push:"model"},{token:"keyword.exists",regex:/exists\s*/,push:"exists",caseInsensitive:!0},{token:"keyword.count",regex:/count\s*/,push:"count",caseInsensitive:!0},{token:["keyword.function.nice_function","paren.lparen.function_arguments","text.function_arguments","paren.rparen","text.whitespace"],regex:"((?:".concat(z.join("|"),")\\s*)(\\()(.*?)(\\))($|\\s+)"),caseInsensitive:!0},{token:"keyword.other.chaining",regex:/\./},{token:"support.function.field",regex:/([a-z_]+)($|\s+)/,push:"comparison"}],a={start:e?[{token:"keyword.where",regex:/\s*/,next:"rootwhere",caseInsensitive:!0}]:[{token:"keyword.find",regex:/find($|\s+)/,push:"model",caseInsensitive:!0},{token:"keyword.where",regex:/where($|\s+)/,next:"rootwhere",caseInsensitive:!0}],model:[{token:"support.class.model",regex:/[A-Z][a-z_0-9]*\s*/,next:"pop"}],rootwhere:[{token:"keyword.order_by",regex:/order by($|\s+)/,next:"order",caseInsensitive:!0}].concat(o),comparison:[{token:"keyword.operator.comparison",regex:"(".concat(L.join("|"),")\\s*"),next:"value"}],value:[{token:"string",regex:/".*?"\s*/,next:"pop"},{token:"constant.numeric",regex:/\d+(.\d+)?\s*/,next:"pop"},{token:"constant.language.tocco_placeholder",regex:"\\:(".concat(M.join("|"),")\\s*"),next:"pop",caseInsensitive:!0},{token:"constant.language",regex:"(".concat(A.join("|"),")\\s*"),next:"pop",caseInsensitive:!0},{token:"support.type",regex:"(".concat(F.join("|"),"):\\s*"),caseInsensitive:!0}],exists:[{token:"paren.lparen",regex:/\(\s*/},{token:"support.class.relation",regex:/rel/,push:"model"},{token:"keyword.other.chaining",regex:/\./},{token:"keyword.where",regex:/where($|\s+)/,next:"existswhere",caseInsensitive:!0},{token:"paren.rparen",regex:/\)\s*/,next:"pop"}],existswhere:[].concat(o,[{token:"paren.rparen",regex:/\)\s*/,next:"pop"}]),count:[{token:"paren.lparen",regex:/\(\s*/},{token:"support.class.relation",regex:/rel/,push:"model"},{token:"keyword.other.chaining",regex:/\./},{token:"keyword.where",regex:/where($|\s+)/,next:"countwhere",caseInsensitive:!0},{token:"paren.rparen",regex:/\)\s*/,next:"comparison"}],countwhere:[].concat(o,[{token:"paren.rparen",regex:/\)\s*/,next:"comparison"}]),order:[{token:"support.class.relation",regex:/rel/,push:"model"},{token:"keyword.other.chaining",regex:/\./},{token:["support.function.field","keyword.direction","separator"],regex:/([a-z_]+\s*)(asc|desc)?($|,|\s+)/}]};return t.$rules=V()(t.$rules,a,(function(e,t){return I()(e)?e.concat(t):void 0})),t.normalizeRules(),t}return(0,_.Z)(r)}(i().require("ace/mode/text_highlight_rules").TextHighlightRules)};function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,D.Z)(e);if(t){var o=(0,D.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,E.Z)(this,n)}}var U=function(e){(0,C.Z)(n,e);var t=$(n);function n(){var e;(0,N.Z)(this,n);return(e=t.call(this)).$rules={start:[{token:"constant.character.entity",regex:/&[^;]+;/},{token:"support.function",regex:"\\?(\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|upper_case|word_list|xhtml|xmlc|round|floor|ceilingiso_[a-z_]+first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunkkeys|valueschildren|parent|root|ancestors|node_name|node_type|node_namespacebyte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|eval|has_content|interpret|is_[a-z_]+|namespacenew)"},{token:"support.function.deprecated",regex:"\\?(default|exists|if_exists|web_safe)"},{token:"language.variable",regex:"\\.(?:data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|now|output_encoding|template_name|url_escaping_charset|vars|version)"},{token:"constant.language",regex:"\\b(true|false)\\b"},{token:"keyword.operator",regex:"\\b(?:gt|gte|lt|lte|as|in|using)\\b"},{token:"entity.other.attribute-name",regex:"encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|attributes"},{token:"string",regex:/['"]/,next:"qstring"},{token:function(e){return e.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")?"constant.numeric":"variable"},regex:/[\w.+-]+/},{token:"keyword.operator",regex:"!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qstring:[{token:"constant.character.escape",regex:'\\\\[nrtvef\\\\"$]'},{token:"string",regex:/['"]/,next:"start"},{defaultToken:"string"}]},e}return(0,_.Z)(n)}(i().require("ace/mode/text_highlight_rules").TextHighlightRules),q=function(e){(0,C.Z)(n,e);var t=$(n);function n(){var e;(0,N.Z)(this,n),e=t.call(this);var r=["query","queryCount"],o=[{token:"keyword.function",regex:"\\[@(".concat(r.join("|"),").*?]"),push:"tql-start"},{token:"comment",regex:"\\[#--",next:"ftl-dcomment"},{token:"string.interpolated",regex:"\\${",push:"ftl-start"},{token:"keyword.function",regex:"\\[/?#(assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|setting|stop|switch|t|visit)",push:"ftl-start"},{token:"keyword.other",regex:"\\[/?@[a-zA-Z\\.]+",push:"ftl-start"}];for(var a in e.$rules)e.$rules[a].unshift.apply(e.$rules[a],o);e.embedRules(U,"ftl-",[{token:"keyword",regex:"/?\\]",next:"pop"},{token:"string.interpolated",regex:"}",next:"pop"}],["start"]),e.addRules({"ftl-dcomment":[{token:"comment",regex:"--\\]",next:"pop"},{defaultToken:"comment"}]});var i=[{token:"keyword.function",regex:"\\[/@(".concat(r.join("|"),")]"),next:"pop"}];e.embedRules(W(),"tql-",i,["start"]);var c={"tql-rootwhere":[{token:"keyword.function",regex:"\\[/@(".concat(r.join("|"),")]"),next:"pop"}],"tql-order":[{token:"keyword.function",regex:"\\[/@(".concat(r.join("|"),")]"),next:"pop"}]};return e.$rules=V()(e.$rules,c,(function(e,t){return I()(e)?e.concat(t):void 0})),e.normalizeRules(),e}return(0,_.Z)(n)}(i().require("ace/mode/html_highlight_rules").HtmlHighlightRules),H=n(52902),K=n(45915),G=i().require("ace/token_iterator").TokenIterator,Y=function(e){return e?e.type.substring(e.type.lastIndexOf(".")+1):null},J=function(e,t){return Y(e.getCurrentToken())===t},X=function(e){if(J(e,"model")&&e.stepBackward(),(J(e,"field")||J(e,"relation"))&&e.stepBackward(),!J(e,"chaining"))return null;if(e.stepBackward(),J(e,"model")){var t=e.getCurrentToken();return e.stepBackward(),e.stepBackward(),t?t.value.trim():null}return null},Q=function(e,t){for(;!J(e,t);)if(!e.stepBackward())return!1;return!0},ee=function(e,t){return J(e,"rparen")?1:t>0&&J(e,"lparen")?(e.stepBackward(),-1):0},te=function(e){for(var t=0;e.getCurrentToken();){if(0===t&&J(e,"where")){var n=e.stepBackward();return n?[n.value.trim()].concat((0,K.Z)(re(e))):[]}if(J(e,"order_by")){if(Q(e,"find")){var r=e.stepForward();return r?r.value.trim():[]}return[]}if(t+=ee(e,t),!e.stepBackward())return null}return null},ne=function(e,t){for(var n=[],r=t(e);r;)Array.isArray(r)?r.forEach((function(e){return n.unshift(e)})):n.unshift(r),r=t(e);return n},re=function(e){return ne(e,X)},oe=function(e){return ne(e,te)},ae=1e3,ie=function(e,t,n){var r=function(e,t){if(t){var n=oe(e());return{baseModel:t,modelScope:(0,H.Z)(n).slice(0)}}var r=oe(e()),o=(0,H.Z)(r);return{baseModel:o[0],modelScope:o.slice(1)}}(e,n),o=r.baseModel,a=r.modelScope;if(o){var i=re(e()),c=[].concat((0,K.Z)(a),(0,K.Z)(i)).map((function(e){return"rel".concat(e)}));(function(e){var t=(0,H.Z)(e),n=t[0],r=t.slice(1);return O(function(e,t){var n=t.length>0?"/resolve?path="+t.join("."):"";return"entities/".concat(e,"/model").concat(n)}(n,r)).then(R).then((function(e){if(!e)return[];var t=e.fields||[],n=e.relations||[];return[].concat((0,K.Z)(t.map((function(e){return{label:(t=e,t.label?"".concat(t.fieldName," (").concat(t.label,")"):t.fieldName),value:e.fieldName,meta:e.type};var t}))),(0,K.Z)(n.map((function(e){return{label:(t=e,t.label?"".concat(t.relationName," (").concat(t.label,")"):t.relationName),value:e.relationName,meta:e.targetEntity};var t}))))}))})([o].concat((0,K.Z)(c))).then((function(e){var n=e.map((function(e){return{caption:e.label,value:e.value,meta:e.meta,score:ae}}));t(null,n)})).catch((function(e){return t(e)}))}},ce=function(e,t){return t?"".concat(e," (").concat(t,")"):e},se=function(e){return O("entities").then(R).then((function(e){return e?e.entities:{}})).then((function(e){return e?Object.values(e):[]})).then((function(e){return e.map((function(e){return e.metaData}))})).then((function(t){var n=t.map((function(e){var t=e.modelName,n=e.label;return{caption:ce(t,n),value:t,score:ae}}));e(null,n)})).catch((function(t){return e(t)}))},le=function(){return z.map((function(e){return e.toUpperCase()})).map((function(e){return{caption:e,value:"".concat(e,"()"),meta:"function",score:970}}))};const ue=function(e){return{getCompletions:function(t,n,r,o,a){var i=function(){return new G(n,r.row,r.column)},c=i(),s=c.getCurrentToken(),l=c.stepBackward()?c.getCurrentToken():null;switch(Y(s)){case"chaining":case"relation":case"separator":case"order_by":case"count":case"exists":case"field":case"function_arguments":ie(i,a,e);break;case"where":case"conjunction":ie(i,a,e),a(null,le());break;case"nice_function":a(null,le());break;case"find":se(a);break;case"type":case"tocco_placeholder":case"comparison":a(null,F.map((function(e){return{caption:e,value:"".concat(e,":"),meta:"type",score:980}}))),a(null,M.map((function(e){return{caption:e,value:":".concat(e),meta:"placeholder",score:990}})));break;case"model":ie(i,a,e),l&&"relation"!==Y(l)&&se(a);break;case null:e&&ie(i,a,e),a(null,le())}}}};function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,D.Z)(e);if(t){var o=(0,D.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,E.Z)(this,n)}}var de=function(e){(0,C.Z)(n,e);var t=pe(n);function n(){var e;return(0,N.Z)(this,n),(e=t.call(this)).HighlightRules=q,e.completer=ue(),e}return(0,_.Z)(n)}(i().require("ace/mode/ftl").Mode);function fe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,D.Z)(e);if(t){var o=(0,D.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,E.Z)(this,n)}}var me,he=function(e){(0,C.Z)(n,e);var t=fe(n);function n(e){var r,o=e.implicitModelName;return(0,N.Z)(this,n),(r=t.call(this)).HighlightRules=W(o),r.completer=ue(o),r.snippedIdField=null,r}return(0,_.Z)(n)}(i().require("ace/mode/text").Mode),ye=n(85893),ge=Z.ZP.div.withConfig({displayName:"StyledEditor"})(me||(me=(0,o.Z)(["\n width: 100%;\n z-index: 0; /* gutter lays over menu otherwise */\n"]))),ve={groovy:function(){return new s.Mode},html:function(){return new l.Mode},xml:function(){return new m.Mode},properties:function(){return new d.Mode},json:function(){return new u.Mode},htmlmixed:function(){return new de},freemarkermixed:function(){return new de},ftl:function(){return new de},tql:function(e){return new he(e)},less:function(){return new p.Mode},drools:function(){return new c.Mode},text:function(){return new f.Mode}},be=function(e,t){var n=t.mode,o=t.theme,a=t.showGutter,i=t.editorOptions,c=void 0===i?{}:i;(function(e){return k()(e)?Promise.resolve(e):x()(e)?O("entities/2.0/".concat(e.entityModel,"/").concat(e.key,"?_paths=").concat(e.field)).then(R).then((function(e){return y()(e,["paths","entity_name","value"],null)})):Promise.resolve(null)})(t.implicitModel).then((function(e){return function(e,t){return y()(ve,e,e)(t)}(n,{implicitModelName:e})})).then((function(t){return e.getSession().setMode(t)})),e.setTheme("ace/theme/".concat(o)),Object.entries(c).forEach((function(t){var n=(0,r.Z)(t,2),o=n[0],a=n[1];e.setOption(o,a)})),e.renderer.setShowGutter(a),e.resize()};const xe=function(e){var t=e.mode,n=e.theme,r=void 0===n?"textmate":n,o=e.value,a=e.onChange,c=e.showGutter,s=void 0===c||c,l=e.editorOptions,u=void 0===l?{}:l,p=e.implicitModel,d=(0,j.useRef)(null),f=(0,j.useRef)(null),m=(0,j.useMemo)((function(){return{mode:t,theme:r,showGutter:s,editorOptions:u,implicitModel:p}}),[t,r,s,u,p]);return(0,j.useEffect)((function(){var e=i().edit(d.current);return e.getSession().setValue(o||""),e.on("change",(function(){return a(e.getValue())})),be(e,m),f.current=e,function(){return e.destroy()}}),[]),(0,j.useEffect)((function(){f.current&&be(f.current,m)}),[m]),(0,j.useEffect)((function(){f.current&&!v()(o)&&o!==f.current.getValue()&&f.current.getSession().setValue(o)}),[o]),(0,ye.jsx)(ge,{ref:d})}},38421:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m});var r,o=n(68957),a=(n(44661),n(1024)),i=n(12520),c=n.n(i),s=n(74806),l=n(58804),u=n(91411),p=l.ZP.span.withConfig({displayName:"StyledChildrenWrapper"})(r||(r=(0,u.Z)(["\n cursor: pointer;\n user-select: none;\n"]))),d=n(85893);const f=function(e){var t=e.children,n=e.onOpen;return(0,d.jsx)(p,{onClick:n,children:t})};(0,n(77281).X)();const m=(0,l.Zz)((0,s.ZP)((function(e){var t,n=e.children,r=e.value,i=e.onChange,s=e.intl,l=s.locale,u=(0,a.useRef)(null),p=(0,a.useState)(!1),m=(0,o.Z)(p,2),h=m[0],y=m[1],g=function(e){var t,n;(y(e),null!==(t=u.current)&&void 0!==t&&t.setPreSelection)&&(null===(n=u.current)||void 0===n||n.setPreSelection(r))};return(0,d.jsx)(c(),{ref:u,selected:r,preSelection:null,onChange:i,showTimeInput:!1,dateFormat:"P",showMonthDropdown:!0,showYearDropdown:!0,scrollableYearDropdown:!0,fixedHeight:!0,showPopperArrow:!1,open:h,onFocus:function(){g(!0)},onClickOutside:function(){g(!1)},locale:l,enableTabLoop:!1,customInput:(0,d.jsx)(f,{onOpen:function(){g(!0)},children:n}),todayButton:(t="client.component.datePicker.todayLabel",s.formatMessage({id:t}))})})))},77281:(e,t,n)=>{n.d(t,{X:()=>i,k:()=>c});n(44661);var r=n(5429),o=n(12520),a=n(82022),i=function(){(0,o.registerLocale)("en",a.Z.getDateFnsLocale("en")),(0,o.registerLocale)("en-US",a.Z.getDateFnsLocale("en")),(0,o.registerLocale)("de-CH",a.Z.getDateFnsLocale("de-CH")),(0,o.registerLocale)("de",a.Z.getDateFnsLocale("de")),(0,o.registerLocale)("fr",a.Z.getDateFnsLocale("fr")),(0,o.registerLocale)("fr-CH",a.Z.getDateFnsLocale("fr")),(0,o.registerLocale)("it",a.Z.getDateFnsLocale("it")),(0,o.registerLocale)("it-CH",a.Z.getDateFnsLocale("it")),(0,o.setDefaultLocale)("de")},c=function(e){var t=(0,r.default)(e);return isNaN(t)?null:t}},64820:(e,t,n)=>{n.r(t),n.d(t,{default:()=>N});var r,o,a,i=n(68957),c=(n(44661),n(75502)),s=n(65809),l=n(94712),u=n(1024),p=n(12520),d=n.n(p),f=n(74806),m=n(58804),h=n(82022),y=n(2091),g=n(65035),v=n(77281),b=n(91411),x=n(30759),w=n(51032),k=m.ZP.div.withConfig({displayName:"StyledDatePickerOuterWrapper"})(r||(r=(0,b.Z)(["\n outline: ",";\n"])),(function(e){return e.immutable?0:"initial"})),j=m.ZP.div.withConfig({displayName:"StyledDatePickerWrapper"})(o||(o=(0,b.Z)(["\n && {\n ","\n\n & .react-datepicker__input-container {\n & input {\n ","\n width: calc(100% - 5px);\n }\n }\n\n & .react-datepicker {\n & .react-datepicker__today-button {\n ","\n }\n }\n }\n"])),w.yP,w.k9,(function(e){return e.hasTime&&"border-bottom: 1px solid #aeaeae;"})),Z=m.ZP.input.withConfig({displayName:"StyledTimeInput"})(a||(a=(0,b.Z)(["\n ","\n border: none;\n outline: none;\n min-height: 2.6rem;\n"])),(0,x.Z)()),P=n(85893);(0,v.X)();var O="react-datepicker-time__input",R=function(e){var t=e.onChange,n=e.label;return(0,P.jsx)(g.Z,{onMouseDown:function(e){e.preventDefault(),t(null)},children:n})},_=function(e){var t=e.value,n=e.onChange,r=e.onKeyDown;return(0,P.jsx)(Z,{type:"time",className:O,required:!0,value:t,onKeyDown:r,onChange:function(e){n&&n(e.target.value)},onClick:function(e){e.target.focus()}})};const N=(0,m.Zz)((0,f.ZP)((function(e){var t=e.immutable,n=e.id,r=e.value,o=e.minDate,a=e.maxDate,p=e.onChange,f=e.intl,m=e.placeholder,g=e.hasTime,b=e.dateFormat,x=f.locale,w=function(e){return f.formatMessage({id:e})},Z=(0,u.useRef)(null),N=(0,u.useRef)(null),C=(0,u.useState)(!1),E=(0,i.Z)(C,2),D=E[0],S=E[1],I=Boolean(r),T=(0,v.k)(r),V=o?(0,v.k)(o):void 0,L=a?(0,v.k)(a):void 0,A=function(e){var t,n;(S(e),null!==(t=N.current)&&void 0!==t&&t.setPreSelection)&&(null===(n=N.current)||void 0===n||n.setPreSelection(T))},F=function(e){"Tab"!==e.key||e.shiftKey||(e.target.classList.contains("react-datepicker__day")?g?function(e){var t=e.querySelector("input.".concat(O));t&&t.focus()}(Z.current):A(!1):function(e){return e.classList.contains(O)}(e.target)&&A(!1)),function(e){return e.classList.contains("react-datepicker-ignore-onclickoutside")}(e.target)&&"Tab"===e.key&&e.shiftKey&&A(!1),"Enter"===e.key&&(A(!1),e.preventDefault(),e.stopPropagation())},M=!t&&I;return(0,P.jsx)(k,{immutable:t,id:n,tabIndex:"-1",children:(0,P.jsxs)(j,{immutable:t,ref:Z,hasTime:g,children:[(0,P.jsx)(d(),{ref:N,selected:T,onChange:function(e){if(e){var t=!r&&e,n=(0,c.default)(e),o=(0,s.default)(e)!==(0,s.default)(n)||(0,l.default)(e)!==(0,l.default)(n);t&&g&&!o&&(e=h.Z.setCurrentTime(e)),p(e.toISOString())}},disabled:t,showTimeInput:g,dateFormat:b,placeholderText:m,showMonthDropdown:!0,showYearDropdown:!0,scrollableYearDropdown:!1,fixedHeight:!0,showPopperArrow:!1,closeOnScroll:function(){return A(!1),!0},open:D,onFocus:function(){A(!0)},onClickOutside:function(){A(!1)},locale:x,onKeyDown:F,customTimeInput:(0,P.jsx)(_,{onKeyDown:F}),enableTabLoop:!1,timeInputLabel:"",minDate:V,maxDate:L,popperProps:{strategy:"fixed"},todayButton:(0,P.jsx)(R,{onChange:p,label:w("client.component.datePicker.todayLabel")})}),M&&(0,P.jsx)(y.Z,{icon:"times",tabIndex:-1,"aria-label":w("client.component.datePicker.clearDateLabel"),onMouseDown:function(e){e.preventDefault(),p(null)}}),!t&&(0,P.jsx)(y.Z,{icon:"calendar",tabIndex:-1,onMouseDown:function(e){e.preventDefault(),e.stopPropagation(),A(!D)}})]})})})))},48078:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var r=n(52817),o=n(41609),a=n.n(o),i=n(41291),c=n(85893);const s=function(e){var t=e.value,n=e.breakWords,o=(0,r._)(t),s=a()(o)?t:o.formatInternational();return(0,c.jsx)(i.Z,{href:"tel:".concat(t),target:"_blank",onClick:function(e){return e.stopPropagation()},label:s,breakWords:n})}},81251:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(46927),o=n(70457),a=n(30963),i=n(85893);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const l=function(e){var t=e.size,n=e.style;return(0,i.jsx)(a.G,s(s({},n),{},{style:{fontSize:t},spin:!0,icon:o.IJ7}))}},67210:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(74806),o=n(12274),a=n(25660),i=n(80722),c=n(20247),s=n(85893);const l=(0,c.U)((0,r.ZP)((function(e){var t=e.path,n=e.context,r=e.onSuccess,c=e.intl,l=e.locale,u=e.emitAction,p=(0,i.Z)(t),d=p?[{id:"rel".concat(p.model),value:p.key}]:[],f=(0,a.Z)(n,"Domain");return(0,s.jsx)(o.ZP,{entityName:"Domain",formName:f,mode:"create",defaultValues:d,locale:l,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Domain/".concat(t)}]}}];r({title:c.formatMessage({id:"client.docs-browser.createDomainSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||u(e)}})})))},36340:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(74806),o=n(12274),a=n(25660),i=n(80722),c=n(20247),s=n(85893);const l=(0,c.U)((0,r.ZP)((function(e){var t=e.context,n=e.path,r=e.onSuccess,c=e.intl,l=e.locale,u=e.emitAction,p=(0,i.Z)(n),d=p?[{id:"rel".concat(p.model),value:p.key}]:[],f=(0,a.Z)(t,"Folder");return(0,s.jsx)(o.ZP,{entityName:"Folder",formName:f,mode:"create",defaultValues:d,locale:l,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Folder/".concat(t)}]}}];r({title:c.formatMessage({id:"client.docs-browser.createFolderSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||u(e)}})})))},96954:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(59713),o=n.n(r),a=n(8156),i=n(85893);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const l=function(e){return(0,i.jsx)(a.Z,s(s({},e),{},{customDeleteEndpoint:"documents/delete"}))}},90100:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(63038),o=n.n(r),a=n(12274),i=n(25660),c=n(20247),s=n(85893);const l=(0,c.U)((function(e){var t=e.selection,n=e.onSuccess,r=e.onCancel,c=e.locale,l=e.context,u=e.emitAction,p=e.navigate,d=t.ids[0].split("/"),f=o()(d,2),m=f[0],h=f[1];"Resource"===m&&(p("/docs/doc/".concat(h,"/detail")),r());var y=(0,i.Z)(l,m);return(0,s.jsx)(a.ZP,{entityName:m,formName:y,entityId:h,mode:"update",locale:c,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,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||u(e)}})}))},4505:(e,t,n)=>{n.r(t),n.d(t,{default:()=>N});var r,o,a,i=n(74806),c=n(50558),s=n(30081),l=n(20247),u=n(63038),p=n.n(u),d=n(28655),f=n.n(d),m=n(18446),h=n.n(m),y=n(1024),g=n(44012),v=n(58804),b=n(36589),x=n(50258),w=n(65035),k=n(73183),j=n(80722),Z=n(85893),P=v.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(r||(r=f()(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),b.Z),O=(0,v.ZP)(x.Z).withConfig({displayName:"StyledLoadMask"})(o||(o=f()(["\n height: auto;\n"]))),R=function(e){return null===e?"Move_root_docs_list_item":"Move_docs_list_item"},_={initialize:s.j2,moveElements:s.w6};const N=(0,l.U)((0,c.connect)((function(e){return{isWaiting:e.docs.move.isWaiting,domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,businessUnit:e.input.businessUnit,locale:e.intl.locale}}),_)((0,i.ZP)((function(e){var t=e.selection,n=e.onSuccess,r=e.onError,o=e.path,i=e.initialize,c=e.moveElements,s=e.isWaiting,l=e.domainTypes,u=e.rootNodes,d=e.businessUnit,f=e.locale,m=e.emitAction,v=(0,j.Z)(o),b={model:"Docs_list_item",key:"".concat(v.model,"/").concat(v.key)},x=(0,y.useState)(b),_=p()(x,2),N=_[0],C=_[1];(0,y.useEffect)((function(){i(t,n,r)}),[]);var E=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,Z.jsxs)(O,{required:[!s],children:[(0,Z.jsx)(k.default,{routerType:"routerless",initialLocation:function(){if(null===N)return null;var e=N.key.split("/"),t=p()(e,2),n=t[0],r=t[1];return E(n,r)}(),listLimit:10,selectionStyle:"none",searchFormType:"none",disableViewPersistor:!0,getListFormName:R,onListParentChange:C,getCustomLocation:E,navigationStrategy:{},embedded:!0,emitAction:m,noLeftPadding:!0,domainTypes:l,rootNodes:u,businessUnit:d,sortable:!1,scrollBehaviour:"none",locale:f}),(0,Z.jsx)(P,{children:(0,Z.jsx)(w.Z,{onClick:function(){return c(N.key,t.ids)},look:"raised",ink:"primary",disabled:null===N||h()(N,b),children:a||(a=(0,Z.jsx)(g.Z,{id:"client.actions.dms-move.button"}))})})]})}))))},77840:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r.ZP});var r=n(24720)},82445:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r.ZP});var r=n(12274)},25660:(e,t,n)=>{n.d(t,{Z:()=>r});const r=function(e,t){return e.detailFormNames&&e.detailFormNames[t]?e.detailFormNames[t]:"Dms".concat(t)}}}]);
|