jamespot-react-core 1.2.57 → 1.2.58

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([[541],{541:(e,t,i)=>{i.r(t),i.d(t,{AIModal:()=>A,AddReportModal:()=>Z,Audience:()=>L,Avatar:()=>x,CalendarToolbar:()=>jo,CalendarWrapper:()=>wo,CommentsBloc:()=>Xn,DisplayForm:()=>R,Editor:()=>nl,EditorsPortal:()=>Ml,Empty:()=>Tl,FullPageLayout:()=>Il,JRCInputTinyMCEWithExt:()=>Vl,JRCInputTinyMCEWithExtRaw:()=>Fl,MarkdownModal:()=>bt,ModalAudience:()=>Hl,ModalSchedule:()=>Xl,TwoColLayout:()=>is,WidgetList:()=>xe,WidgetWrapperCore:()=>Bn});var n=i(576),o=i(594),l=i(196),s=i.n(l),a=i(493),r=i(6),d=i(358),c=i(71),u=i(389);const g=u.j.getLazyComponent("Icon"),m=u.j.getLazyComponent("JRCAvatar"),p=s().span`
1
+ "use strict";(self.webpackChunkReactCore=self.webpackChunkReactCore||[]).push([[541],{541:(e,t,i)=>{i.r(t),i.d(t,{AIModal:()=>A,AddReportModal:()=>Z,Audience:()=>L,Avatar:()=>x,CalendarToolbar:()=>jo,CalendarWrapper:()=>wo,CommentsBloc:()=>Xn,DisplayForm:()=>R,Editor:()=>nl,EditorsPortal:()=>Ml,Empty:()=>Tl,FullPageLayout:()=>Il,JRCInputTinyMCEWithExt:()=>Vl,JRCInputTinyMCEWithExtRaw:()=>Fl,MarkdownModal:()=>bt,ModalAudience:()=>Hl,ModalSchedule:()=>Xl,TwoColLayout:()=>is,WidgetList:()=>xe,WidgetWrapperCore:()=>Bn});var n=i(576),o=i(594),l=i(196),s=i.n(l),a=i(493),r=i(505),d=i(359),c=i(71),u=i(389);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;
@@ -682,4 +682,4 @@
682
682
  `,Ml=()=>{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)(_l,{className:"editor-portal-wrapper",children:t.map(e=>(0,n.jsx)(Lo,{isActive:!1,children:(0,n.jsx)(Sl,{children:"left"===e.position?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(kl,{uniqid:e.uniqid,position:e.position}),(0,n.jsx)(Wl,{isActive:void 0!==e.popup,children:(0,n.jsx)(Vo,{uniqid:e.uniqid})}),(0,n.jsx)(ql,{})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ql,{}),(0,n.jsx)(Wl,{isActive:void 0!==e.popup,children:(0,n.jsx)(Vo,{uniqid:e.uniqid})}),(0,n.jsx)(kl,{uniqid:e.uniqid,position:e.position})]})})},e.uniqid))})},Tl=()=>(0,n.jsx)(n.Fragment,{}),Al=u.j.getLazyComponent("Container"),Il=()=>(0,n.jsx)(o.Suspense,{fallback:(0,n.jsx)(n.Fragment,{}),children:(0,n.jsx)(Al,{backgroundColor:"white",mode:"fluid",flexDirection:"column",children:(0,n.jsx)(ee.Outlet,{})})});var zl=i(622);const Gl=()=>{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}},Dl=u.j.getLazyComponent("InputTinyMCE"),Vl=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}=Gl(),{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)(()=>zl.p9,[]);return(0,n.jsxs)(n.Fragment,{children:[v&&(0,n.jsx)(Dl,{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})]})},$l=u.j.getLazyComponent("InputTinyMCERaw"),Fl=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}=Gl(),{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)(()=>zl.p9,[]);return(0,n.jsxs)(n.Fragment,{children:[v&&(0,n.jsx)($l,{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})]})},Rl=u.j.getLazyComponent("InputAudience"),Ol=u.j.getLazyComponent("Message"),Bl=u.j.getLazyComponent("Modal"),Hl=({open:e,closeHandler:t,title:i,control:o,warningMessage:l,onSubmit:s,name:r="publishTo"})=>{const d=(0,a.useIntl)();return(0,n.jsxs)(Bl,{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)(Ol,{variant:"warning",message:l??d.formatMessage({id:"FORM_Audience_Empty"})}),(0,n.jsx)(Rl,{asyncPromise:e=>k().audience.autocomplete(e),searchable:!0,control:o,multiple:!0,placeholder:d.formatMessage({id:"GLOBAL_Audience"}),name:r})]})};var Ul=i(97);const Nl=u.j.getLazyComponent("ModalForm"),Pl=u.j.getLazyComponent("InputDateTime"),Yl=u.j.getLazyComponent("InputTextRaw"),Jl=u.j.getLazyComponent("FlexBox"),Ql=u.j.getLazyComponent("IconButton"),Kl=s().div`
683
683
  margin-bottom: ${({theme:e})=>e.space.xs}px;
684
684
  `,Xl=({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,Ul.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)(Nl,{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)(Pl,{rules:{required:!0},label:"GLOBAL_Scheduled_Date",control:g.control,name:"scheduleDate"}),(0,n.jsxs)(Jl,{y:"flex-end",children:[(0,n.jsx)(Yl,{label:l.formatMessage({id:"GLOBAL_Permalink"}),value:x,onChange:()=>null,margin:"0",width:"100%"}),(0,n.jsx)(Kl,{children:(0,n.jsx)(Ql,{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"})}))})}})})]})]})},Zl=u.j.getLazyComponent("Container"),es=u.j.getLazyComponent("AppColumn"),ts=u.j.getLazyComponent("MainColumn");function is({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)(Zl,{mode:l,children:[(0,n.jsx)(es,{mode:l,description:i,tabs:m,activeTab:u||""}),(0,n.jsx)(ts,{mode:l,flex:!0,...s,children:(0,n.jsx)(ee.Outlet,{})})]})})}}}]);
685
- //# sourceMappingURL=541.f36879fda62072178a72.chunk.js.map
685
+ //# sourceMappingURL=541.6d2817510478bc6cf3e5.chunk.js.map