jamespot-react-core 1.2.52 → 1.2.54

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,4 +1,4 @@
1
- "use strict";(self.webpackChunkReactCore=self.webpackChunkReactCore||[]).push([[368],{368:(e,t,i)=>{i.r(t),i.d(t,{AIModal:()=>A,AddReportModal:()=>Z,Audience:()=>L,Avatar:()=>x,CalendarToolbar:()=>ho,CalendarWrapper:()=>Co,CommentsBloc:()=>Jn,DisplayForm:()=>R,Editor:()=>el,EditorsPortal:()=>Wl,Empty:()=>Sl,FullPageLayout:()=>Ml,JRCInputTinyMCEWithExt:()=>zl,JRCInputTinyMCEWithExtRaw:()=>Dl,MarkdownModal:()=>bt,ModalAudience:()=>Rl,ModalSchedule:()=>Ql,TwoColLayout:()=>Zl,WidgetList:()=>xe,WidgetWrapperCore:()=>Rn});var n=i(567),o=i(594),l=i(196),s=i.n(l),a=i(493),r=i(432),d=i(512),c=i(573),u=i(422);const g=u.j.getLazyComponent("Icon"),m=u.j.getLazyComponent("JRCAvatar"),p=s().span`
1
+ "use strict";(self.webpackChunkReactCore=self.webpackChunkReactCore||[]).push([[368],{368:(e,t,i)=>{i.r(t),i.d(t,{AIModal:()=>A,AddReportModal:()=>Z,Audience:()=>L,Avatar:()=>x,CalendarToolbar:()=>ho,CalendarWrapper:()=>Co,CommentsBloc:()=>Jn,DisplayForm:()=>R,Editor:()=>el,EditorsPortal:()=>Wl,Empty:()=>Sl,FullPageLayout:()=>Ml,JRCInputTinyMCEWithExt:()=>zl,JRCInputTinyMCEWithExtRaw:()=>Dl,MarkdownModal:()=>bt,ModalAudience:()=>Rl,ModalSchedule:()=>Ql,TwoColLayout:()=>Zl,WidgetList:()=>xe,WidgetWrapperCore:()=>Rn});var n=i(567),o=i(594),l=i(196),s=i.n(l),a=i(493),r=i(183),d=i(434),c=i(573),u=i(422);const g=u.j.getLazyComponent("Icon"),m=u.j.getLazyComponent("JRCAvatar"),p=s().span`
2
2
  ${r.SROnly}
3
3
  `,x=e=>{const t=(0,l.useTheme)(),i=(0,a.useIntl)(),o=(0,c.GV)(d.Bx.selectors.selectNetworkPublic);return e.uri===o?.uri?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g,{name:"icon-fs-wall",size:8*(e.size??3),color:t.color.primary,variant:"circle"}),(0,n.jsx)(p,{children:i.formatMessage({id:"NETWORK_Public"})})]}):(0,n.jsx)(m,{...e})},h=u.j.getLazyComponent("FlexBox"),f=u.j.getLazyComponent("ModalContent"),j=u.j.getLazyComponent("ModalLayout"),y=u.j.getLazyComponent("StyledHref"),b=u.j.getLazyComponent("Tooltip"),C=u.j.getLazyComponent("Typography"),v=s().div`
4
4
  display: flex;
@@ -513,7 +513,7 @@
513
513
  align-items: center;
514
514
  `,xo=s().div`
515
515
  padding: 0 ${({theme:e})=>e.space.md}px;
516
- `,ho=({label:e,view:t,viewsOptions:i,calendarApi:l,isLoading:s,navigateWithQuery:r,setView:u,setCreationType:g,setExportModalOpen:m})=>{const p=(0,a.useIntl)(),x=(0,c.jL)(),{types:h}=(0,c.GV)(d.Vv.selectors.selectCalendarEvents),f=(0,c.GV)(e=>d.lg.selectors.selectById(e,"AnimatedMeetingHook")),j=(0,c.GV)(e=>d.qn.selectors.selectHook(e,"AnimatedMeetingHook")),y=(0,c.GV)(e=>d.lg.selectors.selectById(e,"MeetingHook")),b=(0,c.GV)(e=>d.lg.selectors.selectById(e,"BoardcardHook")),C=(0,o.useMemo)(()=>[{label:p.formatMessage({id:"CALENDAR_Create_SocialEvent"}),onClick:()=>{g("socialEvent")}},...y?[{label:p.formatMessage({id:"CALENDAR_Create_Meeting"}),onClick:()=>{g("meeting")}}]:[],...f&&j?.create?[{label:p.formatMessage({id:"CALENDAR_Create_AnimatedMeeting"}),href:"/?action=spotlight-edit&type=animatedMeeting"}]:[]],[f,j?.create,p,y,g]),v=(0,o.useMemo)(()=>[{label:(0,n.jsx)(a.FormattedMessage,{id:"CALENDAR_SocialEvents"}),value:"socialEvent"},...y?[{label:(0,n.jsx)(a.FormattedMessage,{id:"CALENDAR_Meetings"}),value:"meeting"}]:[],...f?[{label:(0,n.jsx)(a.FormattedMessage,{id:"CALENDAR_AnimatedMeetings"}),value:"animatedMeeting"}]:[],...b?[{label:(0,n.jsx)(a.FormattedMessage,{id:"CALENDAR_BoardCards"}),value:"boardCard"}]:[]],[f,b,y]);return(0,n.jsxs)(lo,{y:"center",children:["list"!==t.value&&(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(mo,{size:"l",weight:"medium",children:e}),(0,n.jsxs)(lo,{children:[(0,n.jsx)(ro,{icon:"icon-chevron-left",onClick:()=>l?.prev(),color:"grey5"}),(0,n.jsx)(ro,{icon:"icon-chevron-right",onClick:()=>l?.next(),color:"grey5"})]}),(0,n.jsx)(ro,{icon:"icon-calendar",onClick:()=>l?.today(),tooltip:{description:"CALENDAR_Today",position:"bottom"},color:"grey5"})]}),(0,n.jsx)(po,{children:(0,n.jsx)(co,{onChange:u,value:t,name:"selectView",options:i,getLabel:e=>e.label,getValue:e=>e.value,required:!0,minWidth:!1,loading:s,noMargin:!0})}),(0,n.jsx)(so,{noMargin:!0,color:"primary",icon:"icon-plus",label:p.formatMessage({id:"GLOBAL_Add"}),options:C}),(0,n.jsx)(ao,{trigger:(0,n.jsx)(ro,{"aria-label":p.formatMessage({id:"GLOBAL_Filter"}),colorVariant:"light",icon:"icon-filter",badgeNumber:h.length}),dropdown:()=>(0,n.jsx)(xo,{children:(0,n.jsxs)(lo,{direction:"column",children:[(0,n.jsx)(oo,{weight:"medium",color:"primary",children:p.formatMessage({id:"GLOBAL_Filter"})}),(0,n.jsx)(uo,{labelPosition:"before",checkboxMode:"checkbox",direction:"column",onChange:e=>{x(d.Vv.actions.setTypes(e)),r({types:e})},options:v,value:h,name:"0"}),(0,n.jsx)(go,{onClick:()=>{x(d.Vv.actions.setTypes([])),r({types:[]})},as:"button",color:"cancel",disabled:0===h.length,children:p.formatMessage({id:"GLOBAL_Reset"})})]})}),withBorder:!0,align:"right"}),(0,n.jsx)(so,{noMargin:!0,small:!0,smallOpenDirection:"left",color:"primary",variant:"outlined",icon:"icon-ellipsis-v",label:p.formatMessage({id:"GLOBAL_Options"}),options:[{label:p.formatMessage({id:"EVENT_Export_Calendar_ICalendar_Format"}),onClick:()=>m(!0)}]})]})},fo=u.j.getLazyComponent("Calendar"),jo=s().div`
516
+ `,ho=({label:e,view:t,viewsOptions:i,calendarApi:l,isLoading:s,navigateWithQuery:r,setView:u,setCreationType:g,setExportModalOpen:m})=>{const p=(0,a.useIntl)(),x=(0,c.jL)(),{types:h}=(0,c.GV)(d.Vv.selectors.selectCalendarEvents),f=(0,c.GV)(e=>d.lg.selectors.selectById(e,"AnimatedMeetingHook")),j=(0,c.GV)(e=>d.qn.selectors.selectHook(e,"AnimatedMeetingHook")),y=(0,c.GV)(e=>d.lg.selectors.selectById(e,"MeetingHook")),b=(0,c.GV)(e=>d.lg.selectors.selectById(e,"BoardcardHook")),C=(0,o.useMemo)(()=>[{label:p.formatMessage({id:"CALENDAR_Create_SocialEvent"}),onClick:()=>{g("socialEvent")}},...y?[{label:p.formatMessage({id:"CALENDAR_Create_Meeting"}),onClick:()=>{g("meeting")}}]:[],...f&&j?.create?[{label:p.formatMessage({id:"CALENDAR_Create_AnimatedMeeting"}),href:"/?action=spotlight-edit&type=animatedMeeting"}]:[]],[f,j?.create,p,y,g]),v=(0,o.useMemo)(()=>[{label:(0,n.jsx)(a.FormattedMessage,{id:"CALENDAR_SocialEvents"}),value:"socialEvent"},...y?[{label:(0,n.jsx)(a.FormattedMessage,{id:"CALENDAR_Meetings"}),value:"meeting"}]:[],...f?[{label:(0,n.jsx)(a.FormattedMessage,{id:"CALENDAR_AnimatedMeetings"}),value:"animatedMeeting"}]:[],...b?[{label:(0,n.jsx)(a.FormattedMessage,{id:"CALENDAR_BoardCards"}),value:"boardCard"}]:[]],[f,b,y]);return(0,n.jsxs)(lo,{y:"center",children:["list"!==t.value&&(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(mo,{size:"l",weight:"medium",children:e}),(0,n.jsxs)(lo,{children:[(0,n.jsx)(ro,{icon:"icon-chevron-left",onClick:()=>l?.prev(),color:"grey5"}),(0,n.jsx)(ro,{icon:"icon-chevron-right",onClick:()=>l?.next(),color:"grey5"})]}),(0,n.jsx)(ro,{icon:"icon-calendar",onClick:()=>l?.today(),tooltip:{description:"CALENDAR_Today",position:"bottom"},color:"grey5"})]}),(0,n.jsx)(po,{children:(0,n.jsx)(co,{onChange:u,value:t,name:"selectView",options:i,getLabel:e=>e.label,getValue:e=>e.value,required:!0,minWidth:!1,loading:s,noMargin:!0})}),(0,n.jsx)(so,{noMargin:!0,color:"primary",icon:"icon-plus",label:p.formatMessage({id:"GLOBAL_Add"}),options:C,dataCy:"calendar-create-dropdown"}),(0,n.jsx)(ao,{trigger:(0,n.jsx)(ro,{"aria-label":p.formatMessage({id:"GLOBAL_Filter"}),colorVariant:"light",icon:"icon-filter",badgeNumber:h.length}),dropdown:()=>(0,n.jsx)(xo,{children:(0,n.jsxs)(lo,{direction:"column",children:[(0,n.jsx)(oo,{weight:"medium",color:"primary",children:p.formatMessage({id:"GLOBAL_Filter"})}),(0,n.jsx)(uo,{labelPosition:"before",checkboxMode:"checkbox",direction:"column",onChange:e=>{x(d.Vv.actions.setTypes(e)),r({types:e})},options:v,value:h,name:"0"}),(0,n.jsx)(go,{onClick:()=>{x(d.Vv.actions.setTypes([])),r({types:[]})},as:"button",color:"cancel",disabled:0===h.length,children:p.formatMessage({id:"GLOBAL_Reset"})})]})}),withBorder:!0,align:"right"}),(0,n.jsx)(so,{noMargin:!0,small:!0,smallOpenDirection:"left",color:"primary",variant:"outlined",icon:"icon-ellipsis-v",label:p.formatMessage({id:"GLOBAL_Options"}),options:[{label:p.formatMessage({id:"EVENT_Export_Calendar_ICalendar_Format"}),onClick:()=>m(!0)}]})]})},fo=u.j.getLazyComponent("Calendar"),jo=s().div`
517
517
  margin-bottom: ${({theme:e})=>e.space.md}px;
518
518
  `,yo=s().div`
519
519
  height: 54px;
@@ -522,7 +522,7 @@
522
522
  justify-content: space-between;
523
523
  ${({view:e,theme:t})=>"list"===e&&`border-bottom: 1px solid ${t.color.grey2};`}
524
524
  padding: 0 ${({theme:e})=>e.space.md}px;
525
- `,bo=[{label:"CALENDAR_dayGridMonth",value:"dayGridMonth"},{label:"CALENDAR_timeGridWeek",value:"timeGridWeek"},{label:"CALENDAR_timeGridDay",value:"timeGridDay"},{label:"CALENDAR_listWeek",value:"list"}],Co=({views:e=["dayGridMonth","list","timeGridDay","timeGridWeek"],mode:t="full",withPadding:i=!0,withHeader:l=!0,withToolbar:s=!0,fluid:u,children:g})=>{const m=(0,a.useIntl)(),p=(0,c.jL)(),x=(0,ee.useNavigate)();(()=>{const e=(0,c.jL)(),t=(0,o.useMemo)(()=>ie.A,[]),i=(0,o.useMemo)(()=>d.Vv.getCalendarRTHandlers(e,k()),[e]);(0,o.useEffect)(()=>(i.forEach(e=>{t.onMessage(e.namespace,e.function,e.handler)}),()=>{i.forEach(e=>{t.offMessage(e.namespace,e.function,e.handler)})}),[i,t])})();const[h,f]=(0,o.useState)(),{dates:j,loading:y,list:b,pendingStatusChanges:C}=(0,c.GV)(d.Vv.selectors.selectCalendarEvents),[v,w]=(0,o.useState)(),[L,E]=(0,o.useState)(null),[_,W]=(0,o.useState)(!1),S=(0,c.GV)(e=>d.qn.selectors.selectHook(e,"calendarHook"))?.defaultView,q=(0,o.useMemo)(()=>{const e=new URLSearchParams(window.location.search).get("view");switch(e){case"dayGridMonth":case"timeGridDay":case"timeGridWeek":case"list":return e;default:return"calendar"===S?"dayGridMonth":"list"}},[S]),M=(0,o.useMemo)(()=>bo.filter(t=>e.includes(t.value)).map(e=>({label:m.formatMessage({id:e.label}),value:e.value})),[e,m]),[T,A]=(0,o.useState)(M.find(e=>e.value===q)??M[0]),I=(0,o.useCallback)(e=>{const t=new URLSearchParams(window.location.search);void 0!==e.types&&(e.types.length>0?t.set("types",e.types.join(",")):t.delete("types")),void 0!==e.view&&(e.view?t.set("view",e.view):t.delete("view")),x(`?${t.toString()}`,{replace:!0})},[x]),z=(0,o.useCallback)(e=>{p(d.y8.actions.error({label:e??m.formatMessage({id:"GLOBAL_Error"})}))},[p,m]),G=(0,o.useCallback)(e=>{p(d.y8.actions.success({label:e}))},[p]),D=(0,o.useCallback)(e=>{A(e),I({view:e.value})},[I]),V=(0,o.useCallback)((e,t)=>{const i={start:r.Utils.date.formatDate(e),end:r.Utils.date.formatDate(t)};p(d.Vv.actions.setDates(i))},[p]),[$,F]=(0,o.useState)(null);return(0,o.useEffect)(()=>{p(d.Vv.actions.setTypes(new URLSearchParams(window.location.search).get("types")?.split(",").filter(e=>["socialEvent","meeting","animatedMeeting","boardCard"].includes(e))??[]))},[p]),(0,n.jsxs)(o.Fragment,{children:[g&&g({dates:j,eventToUpdate:L,creationType:$,isExportModalOpen:_,setEventToUpdate:E,setCreationType:F,setExportModalOpen:W}),(l||s)&&(0,n.jsxs)(yo,{view:T.value,children:[l&&(0,n.jsx)(no,{}),s&&(0,n.jsx)(ho,{label:h,isLoading:"pending"===y,view:T,calendarApi:v,viewsOptions:M,navigateWithQuery:I,setView:A,setCreationType:F,setExportModalOpen:W})]}),(0,n.jsx)(fo,{fluid:u,mode:t,fullScreen:!0,withPadding:i,events:b,loading:"pending"===y,handler:{global:k().global,calendar:k().calendar,article:k().article},defaultView:T.value,eventModalExtraComponent:({id:e,uri:t,_right:i})=>(0,n.jsx)(jo,{children:(0,n.jsx)(Jn,{articleId:e,articleUri:t,canComment:i.comment})}),deportedToolbar:{onChangeLabel:f,onCalendarApiInit:w,view:T},onChangeDates:V,onError:z,onSuccess:G,onChangeView:D,onDeleteEvent:()=>{p(d.y8.actions.success({label:m.formatMessage({id:"GLOBAL_Successfully_Deleted"})}))},onClickUpdateEvent:E,onUpdateStatus:e=>p(d.Vv.actions.changeResponse(e)),isUpdateStatusLoading:e=>C.some(t=>t.eventId===e)})]})},vo=(s().div`
525
+ `,bo=[{label:"CALENDAR_dayGridMonth",value:"dayGridMonth"},{label:"CALENDAR_timeGridWeek",value:"timeGridWeek"},{label:"CALENDAR_timeGridDay",value:"timeGridDay"},{label:"CALENDAR_listWeek",value:"list"}],Co=({views:e=["dayGridMonth","list","timeGridDay","timeGridWeek"],mode:t="full",withPadding:i=!0,withHeader:l=!0,withToolbar:s=!0,fluid:u,children:g,onSelect:m})=>{const p=(0,a.useIntl)(),x=(0,c.jL)(),h=(0,ee.useNavigate)();(()=>{const e=(0,c.jL)(),t=(0,o.useMemo)(()=>ie.A,[]),i=(0,o.useMemo)(()=>d.Vv.getCalendarRTHandlers(e,k()),[e]);(0,o.useEffect)(()=>(i.forEach(e=>{t.onMessage(e.namespace,e.function,e.handler)}),()=>{i.forEach(e=>{t.offMessage(e.namespace,e.function,e.handler)})}),[i,t])})();const[f,j]=(0,o.useState)(),{dates:y,loading:b,list:C,pendingStatusChanges:v}=(0,c.GV)(d.Vv.selectors.selectCalendarEvents),[w,L]=(0,o.useState)(),[E,_]=(0,o.useState)(null),[W,S]=(0,o.useState)(!1),q=(0,c.GV)(e=>d.qn.selectors.selectHook(e,"calendarHook"))?.defaultView,M=(0,o.useMemo)(()=>{const e=new URLSearchParams(window.location.search).get("view");switch(e){case"dayGridMonth":case"timeGridDay":case"timeGridWeek":case"list":return e;default:return"calendar"===q?"dayGridMonth":"list"}},[q]),T=(0,o.useMemo)(()=>bo.filter(t=>e.includes(t.value)).map(e=>({label:p.formatMessage({id:e.label}),value:e.value})),[e,p]),[A,I]=(0,o.useState)(T.find(e=>e.value===M)??T[0]),z=(0,o.useCallback)(e=>{const t=new URLSearchParams(window.location.search);void 0!==e.types&&(e.types.length>0?t.set("types",e.types.join(",")):t.delete("types")),void 0!==e.view&&(e.view?t.set("view",e.view):t.delete("view")),h(`?${t.toString()}`,{replace:!0})},[h]),G=(0,o.useCallback)(e=>{x(d.y8.actions.error({label:e??p.formatMessage({id:"GLOBAL_Error"})}))},[x,p]),D=(0,o.useCallback)(e=>{x(d.y8.actions.success({label:e}))},[x]),V=(0,o.useCallback)(e=>{I(e),z({view:e.value})},[z]),$=(0,o.useCallback)((e,t)=>{const i={start:r.Utils.date.formatDate(e),end:r.Utils.date.formatDate(t)};x(d.Vv.actions.setDates(i))},[x]),[F,R]=(0,o.useState)(null);return(0,o.useEffect)(()=>{x(d.Vv.actions.setTypes(new URLSearchParams(window.location.search).get("types")?.split(",").filter(e=>["socialEvent","meeting","animatedMeeting","boardCard"].includes(e))??[]))},[x]),(0,n.jsxs)(o.Fragment,{children:[g&&g({dates:y,eventToUpdate:E,creationType:F,isExportModalOpen:W,setEventToUpdate:_,setCreationType:R,setExportModalOpen:S}),(l||s)&&(0,n.jsxs)(yo,{view:A.value,children:[l&&(0,n.jsx)(no,{}),s&&(0,n.jsx)(ho,{label:f,isLoading:"pending"===b,view:A,calendarApi:w,viewsOptions:T,navigateWithQuery:z,setView:I,setCreationType:R,setExportModalOpen:S})]}),(0,n.jsx)(fo,{fluid:u,mode:t,fullScreen:!0,withPadding:i,events:C,loading:"pending"===b,handler:{global:k().global,calendar:k().calendar,article:k().article},defaultView:A.value,eventModalExtraComponent:({id:e,uri:t,_right:i})=>(0,n.jsx)(jo,{children:(0,n.jsx)(Jn,{articleId:e,articleUri:t,canComment:i.comment})}),deportedToolbar:{onChangeLabel:j,onCalendarApiInit:L,view:A},onChangeDates:$,onError:G,onSuccess:D,onChangeView:V,onDeleteEvent:()=>{x(d.y8.actions.success({label:p.formatMessage({id:"GLOBAL_Successfully_Deleted"})}))},onClickUpdateEvent:_,onUpdateStatus:e=>x(d.Vv.actions.changeResponse(e)),isUpdateStatusLoading:e=>v.some(t=>t.eventId===e),onSelect:m})]})},vo=(s().div`
526
526
  margin-bottom: 24px;
527
527
  `,s().div`
528
528
  margin-bottom: 4px;
@@ -679,7 +679,7 @@
679
679
  `,_l=s().div`
680
680
  width: ${440}px;
681
681
  pointer-events: none;
682
- `,Wl=()=>{const e=(0,c.jL)();(0,o.useEffect)(()=>{const t=()=>{e(d.cr.slice.actions.flushAllEditor())};return window.addEventListener("NGWidgetEditorFlushAll",t),()=>{window.removeEventListener("NGWidgetEditorFlushAll",t)}},[e]);const t=(0,c.GV)(d.cr.selectors.selectEditors,be.shallowEqual);return(0,n.jsx)(Ll,{className:"editor-portal-wrapper",children:t.map(e=>(0,n.jsx)(vo,{isActive:!1,children:(0,n.jsx)(kl,{children:"left"===e.position?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(wl,{uniqid:e.uniqid,position:e.position}),(0,n.jsx)(El,{isActive:void 0!==e.popup,children:(0,n.jsx)(Go,{uniqid:e.uniqid})}),(0,n.jsx)(_l,{})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_l,{}),(0,n.jsx)(El,{isActive:void 0!==e.popup,children:(0,n.jsx)(Go,{uniqid:e.uniqid})}),(0,n.jsx)(wl,{uniqid:e.uniqid,position:e.position})]})})},e.uniqid))})},Sl=()=>(0,n.jsx)(n.Fragment,{}),ql=u.j.getLazyComponent("Container"),Ml=()=>(0,n.jsx)(o.Suspense,{fallback:(0,n.jsx)(n.Fragment,{}),children:(0,n.jsx)(ql,{backgroundColor:"white",mode:"fluid",flexDirection:"column",children:(0,n.jsx)(ee.Outlet,{})})});var Tl=i(185);const Al=()=>{const[e,t]=(0,o.useState)(),i=(0,a.useIntl)(),n=(0,o.useMemo)(()=>J.hooks?.MagicWandHook?.isActive&&J.hooks?.MagicWandHook?.menuItems&&J.hooks.MagicWandHook.menuItems.length,[]),l=(0,o.useCallback)(e=>{t({...e,reject:i=>{e.reject(i),t(void 0)},resolve:i=>{e.resolve(i),t(void 0)}})},[]),s=(0,o.useCallback)((e,t)=>new Promise((i,n)=>{l({reject:n,resolve:i,text:e,capability:t})}),[l]),d=(0,o.useMemo)(()=>({develop:e=>s(e,"develop"),summarize:e=>s(e,"summarize"),tldr:e=>s(e,"tldr"),en:e=>s(e,"en"),es:e=>s(e,"es"),formal:e=>s(e,"formal"),funny:e=>s(e,"funny")}),[s]);return{query:e,ext:(0,o.useMemo)(()=>r.JTinyMCEExtensionsBuilders.jia(d,i),[i,d]),isActive:n}},Il=u.j.getLazyComponent("InputTinyMCE"),zl=e=>{const t=(0,a.useIntl)(),i=(0,c.jL)(),s=(0,l.useTheme)(),r=(0,c.GV)(d.Kx.selectors.selectAll),{query:u,ext:g,isActive:m}=Al(),{open:p,onInsert:x,close:h,ext:f,isActive:j}=je(),y=(0,o.useMemo)(()=>[...j?[f]:[],...m?[g]:[]],[g,f,m,j]),b=(0,o.useCallback)(e=>{i(d.y8.actions.error({label:e??t.formatMessage({id:"GLOBAL_Error"})}))},[i,t]),C=(0,o.useMemo)(()=>(0,ye.X)(r,s,b),[r,b,s]),v=(0,o.useMemo)(()=>Tl.p9,[]);return(0,n.jsxs)(n.Fragment,{children:[v&&(0,n.jsx)(Il,{commonOptions:v,additionalExtensions:y,mentionsQueries:C,...e}),m&&(0,n.jsx)(A,{query:u}),j&&(0,n.jsx)(bt,{onInsert:x,open:p,close:h})]})},Gl=u.j.getLazyComponent("InputTinyMCERaw"),Dl=e=>{const t=(0,a.useIntl)(),i=(0,c.jL)(),s=(0,l.useTheme)(),r=(0,c.GV)(d.Kx.selectors.selectAll),{query:u,ext:g,isActive:m}=Al(),{open:p,onInsert:x,close:h,ext:f,isActive:j}=je(),y=(0,o.useMemo)(()=>[...j?[f]:[],...m?[g]:[]],[g,f,m,j]),b=(0,o.useCallback)(e=>{i(d.y8.actions.error({label:e??t.formatMessage({id:"GLOBAL_Error"})}))},[i,t]),C=(0,o.useMemo)(()=>(0,ye.X)(r,s,b),[r,b,s]),v=(0,o.useMemo)(()=>Tl.p9,[]);return(0,n.jsxs)(n.Fragment,{children:[v&&(0,n.jsx)(Gl,{commonOptions:v,additionalExtensions:y,mentionsQueries:C,...e}),m&&(0,n.jsx)(A,{query:u}),j&&(0,n.jsx)(bt,{onInsert:x,open:p,close:h})]})},Vl=u.j.getLazyComponent("InputAudience"),$l=u.j.getLazyComponent("Message"),Fl=u.j.getLazyComponent("Modal"),Rl=({open:e,closeHandler:t,title:i,control:o,warningMessage:l,onSubmit:s,name:r="publishTo"})=>{const d=(0,a.useIntl)();return(0,n.jsxs)(Fl,{open:e,closeHandler:t,title:i??d.formatMessage({id:"GLOBAL_Audience"}),buttons:[{children:(0,n.jsx)(a.FormattedMessage,{id:"GLOBAL_Cancel"}),color:"cancel",clickHandler:()=>t()},{children:(0,n.jsx)(a.FormattedMessage,{id:"GLOBAL_Continue"}),color:"danger",clickHandler:()=>{t(),s()}}],children:[(0,n.jsx)($l,{variant:"warning",message:l??d.formatMessage({id:"FORM_Audience_Empty"})}),(0,n.jsx)(Vl,{asyncPromise:e=>k().audience.autocomplete(e),searchable:!0,control:o,multiple:!0,placeholder:d.formatMessage({id:"GLOBAL_Audience"}),name:r})]})};var Ol=i(98);const Bl=u.j.getLazyComponent("ModalForm"),Hl=u.j.getLazyComponent("InputDateTime"),Ul=u.j.getLazyComponent("InputTextRaw"),Nl=u.j.getLazyComponent("FlexBox"),Pl=u.j.getLazyComponent("IconButton"),Yl=s().div`
682
+ `,Wl=()=>{const e=(0,c.jL)();(0,o.useEffect)(()=>{const t=()=>{e(d.cr.slice.actions.flushAllEditor())};return window.addEventListener("NGWidgetEditorFlushAll",t),()=>{window.removeEventListener("NGWidgetEditorFlushAll",t)}},[e]);const t=(0,c.GV)(d.cr.selectors.selectEditors,be.shallowEqual);return(0,n.jsx)(Ll,{className:"editor-portal-wrapper",children:t.map(e=>(0,n.jsx)(vo,{isActive:!1,children:(0,n.jsx)(kl,{children:"left"===e.position?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(wl,{uniqid:e.uniqid,position:e.position}),(0,n.jsx)(El,{isActive:void 0!==e.popup,children:(0,n.jsx)(Go,{uniqid:e.uniqid})}),(0,n.jsx)(_l,{})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_l,{}),(0,n.jsx)(El,{isActive:void 0!==e.popup,children:(0,n.jsx)(Go,{uniqid:e.uniqid})}),(0,n.jsx)(wl,{uniqid:e.uniqid,position:e.position})]})})},e.uniqid))})},Sl=()=>(0,n.jsx)(n.Fragment,{}),ql=u.j.getLazyComponent("Container"),Ml=()=>(0,n.jsx)(o.Suspense,{fallback:(0,n.jsx)(n.Fragment,{}),children:(0,n.jsx)(ql,{backgroundColor:"white",mode:"fluid",flexDirection:"column",children:(0,n.jsx)(ee.Outlet,{})})});var Tl=i(185);const Al=()=>{const[e,t]=(0,o.useState)(),i=(0,a.useIntl)(),n=(0,o.useMemo)(()=>J.hooks?.MagicWandHook?.isActive&&J.hooks?.MagicWandHook?.menuItems&&J.hooks.MagicWandHook.menuItems.length,[]),l=(0,o.useCallback)(e=>{t({...e,reject:i=>{e.reject(i),t(void 0)},resolve:i=>{e.resolve(i),t(void 0)}})},[]),s=(0,o.useCallback)((e,t)=>new Promise((i,n)=>{l({reject:n,resolve:i,text:e,capability:t})}),[l]),d=(0,o.useMemo)(()=>({develop:e=>s(e,"develop"),summarize:e=>s(e,"summarize"),tldr:e=>s(e,"tldr"),en:e=>s(e,"en"),es:e=>s(e,"es"),formal:e=>s(e,"formal"),funny:e=>s(e,"funny")}),[s]);return{query:e,ext:(0,o.useMemo)(()=>r.JTinyMCEExtensionsBuilders.jia(d,i),[i,d]),isActive:n}},Il=u.j.getLazyComponent("InputTinyMCE"),zl=e=>{const t=(0,a.useIntl)(),i=(0,c.jL)(),s=(0,l.useTheme)(),r=(0,c.GV)(d.Kx.selectors.selectAll),{query:u,ext:g,isActive:m}=Al(),{open:p,onInsert:x,close:h,ext:f,isActive:j}=je(),y=(0,o.useMemo)(()=>[...j?[f]:[],...m?[g]:[]],[g,f,m,j]),b=(0,o.useCallback)(e=>{i(d.y8.actions.error({label:e??t.formatMessage({id:"GLOBAL_Error"})}))},[i,t]),C=(0,o.useMemo)(()=>(0,ye.X)(r,s,b),[r,b,s]),v=(0,o.useMemo)(()=>Tl.p9,[]);return(0,n.jsxs)(n.Fragment,{children:[v&&(0,n.jsx)(Il,{commonOptions:v,additionalExtensions:y,mentionsQueries:C,...e}),m&&(0,n.jsx)(A,{query:u}),j&&(0,n.jsx)(bt,{onInsert:x,open:p,close:h})]})},Gl=u.j.getLazyComponent("InputTinyMCERaw"),Dl=e=>{const t=(0,a.useIntl)(),i=(0,c.jL)(),s=(0,l.useTheme)(),r=(0,c.GV)(d.Kx.selectors.selectAll),{query:u,ext:g,isActive:m}=Al(),{open:p,onInsert:x,close:h,ext:f,isActive:j}=je(),y=(0,o.useMemo)(()=>[...j?[f]:[],...m?[g]:[]],[g,f,m,j]),b=(0,o.useCallback)(e=>{i(d.y8.actions.error({label:e??t.formatMessage({id:"GLOBAL_Error"})}))},[i,t]),C=(0,o.useMemo)(()=>(0,ye.X)(r,s,b),[r,b,s]),v=(0,o.useMemo)(()=>Tl.p9,[]);return(0,n.jsxs)(n.Fragment,{children:[v&&(0,n.jsx)(Gl,{commonOptions:v,additionalExtensions:y,mentionsQueries:C,...e}),m&&(0,n.jsx)(A,{query:u}),j&&(0,n.jsx)(bt,{onInsert:x,open:p,close:h})]})},Vl=u.j.getLazyComponent("InputAudience"),$l=u.j.getLazyComponent("Message"),Fl=u.j.getLazyComponent("Modal"),Rl=({open:e,closeHandler:t,title:i,control:o,warningMessage:l,onSubmit:s,name:r="publishTo"})=>{const d=(0,a.useIntl)();return(0,n.jsxs)(Fl,{open:e,closeHandler:t,title:i??d.formatMessage({id:"GLOBAL_Audience"}),buttons:[{children:(0,n.jsx)(a.FormattedMessage,{id:"GLOBAL_Cancel"}),color:"cancel",clickHandler:()=>t()},{dataCy:"no-audience-continue",children:(0,n.jsx)(a.FormattedMessage,{id:"GLOBAL_Continue"}),color:"danger",clickHandler:()=>{t(),s()}}],children:[(0,n.jsx)($l,{variant:"warning",message:l??d.formatMessage({id:"FORM_Audience_Empty"})}),(0,n.jsx)(Vl,{asyncPromise:e=>k().audience.autocomplete(e),searchable:!0,control:o,multiple:!0,placeholder:d.formatMessage({id:"GLOBAL_Audience"}),name:r})]})};var Ol=i(98);const Bl=u.j.getLazyComponent("ModalForm"),Hl=u.j.getLazyComponent("InputDateTime"),Ul=u.j.getLazyComponent("InputTextRaw"),Nl=u.j.getLazyComponent("FlexBox"),Pl=u.j.getLazyComponent("IconButton"),Yl=s().div`
683
683
  margin-bottom: ${({theme:e})=>e.space.xs}px;
684
684
  `,Ql=({open:e,closeHandler:t,onSubmit:i})=>{const l=(0,a.useIntl)(),s=(0,c.jL)(),u=(0,c.GV)(d.OD.selectors.selectUrlBase),g=(0,I.useForm)({defaultValues:async()=>{const e=new Date;return{scheduleDate:`${r.Utils.date.formatDate(e)} ${(0,E.padStartTwoDigits)(e.getHours())}:${(0,E.padStartTwoDigits)(e.getMinutes())}`,permalinkId:(0,Ol.A)()}}}),m=g.handleSubmit(e=>{i(e)});(0,o.useEffect)(()=>{e&&g.reset()},[g,e]);const p=(0,I.useWatch)({control:g.control,name:"permalinkId"}),x=(0,o.useMemo)(()=>`${u}permalink/${p}`,[p,u]);return(0,n.jsxs)(Bl,{open:e,closeHandler:t,onSubmit:m,maxHeight:"620px",title:l.formatMessage({id:"GLOBAL_Schedule"}),buttons:[{children:(0,n.jsx)(a.FormattedMessage,{id:"GLOBAL_Cancel"}),color:"cancel",clickHandler:()=>t()},{children:(0,n.jsx)(a.FormattedMessage,{id:"GLOBAL_Schedule"}),color:"valid",clickHandler:()=>{t(),m()},disabled:!g.watch("scheduleDate")}],children:[(0,n.jsx)(Hl,{rules:{required:!0},label:"GLOBAL_Scheduled_Date",control:g.control,name:"scheduleDate"}),(0,n.jsxs)(Nl,{y:"flex-end",children:[(0,n.jsx)(Ul,{label:l.formatMessage({id:"GLOBAL_Permalink"}),value:x,onChange:()=>null,margin:"0",width:"100%"}),(0,n.jsx)(Yl,{children:(0,n.jsx)(Pl,{srOnly:"GLOBAL_Copy_Link",icon:"icon-copy",colorVariant:"primary",onClick:()=>{navigator.clipboard.writeText(x).then(()=>{s(d.y8.actions.success({label:l.formatMessage({id:"CLIPBOARD_Copy_Success"})}))})}})})]})]})},Jl=u.j.getLazyComponent("Container"),Kl=u.j.getLazyComponent("AppColumn"),Xl=u.j.getLazyComponent("MainColumn");function Zl({extensionRoute:e,routes:t,description:i,mode:l="center",mainColumnProps:s}){const r=(0,a.useIntl)(),{pathname:d}=(0,ee.useLocation)(),c=(0,o.useMemo)(()=>Object.values(t),[t]),[u,g]=(0,o.useState)(c?.[0]?.key),m=c.map(t=>({...t,label:r.formatMessage({id:t.label}),href:t.absolutePath?t.path:`/ng/rr/${e}/${t.path}`,group:t.group?r.formatMessage({id:t.group}):void 0}));return(0,o.useEffect)(()=>{const t=c.find(t=>`/ng/rr/${e}/${t.path}`===d||t.paths?.reduce((t,i)=>{const n=`/ng/rr/${e}/${i}`,o=null!==(0,ee.matchPath)(n,d);return t||o},!1));t&&g(t.key)},[d,c,e]),(0,n.jsx)(o.Suspense,{fallback:(0,n.jsx)(n.Fragment,{}),children:(0,n.jsxs)(Jl,{mode:l,children:[(0,n.jsx)(Kl,{mode:l,description:i,tabs:m,activeTab:u||""}),(0,n.jsx)(Xl,{mode:l,flex:!0,...s,children:(0,n.jsx)(ee.Outlet,{})})]})})}}}]);
685
- //# sourceMappingURL=368.559abd1344669a973077.chunk.js.map
685
+ //# sourceMappingURL=368.92b8c8d28b2398ebc986.chunk.js.map