jamespot-react-core 1.2.48 → 1.2.49
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([[664],{664:(e,t,i)=>{i.r(t),i.d(t,{AIModal:()=>T,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(211),o=i(594),l=i(196),s=i.n(l),a=i(493),r=i(
|
|
1
|
+
"use strict";(self.webpackChunkReactCore=self.webpackChunkReactCore||[]).push([[664],{664:(e,t,i)=>{i.r(t),i.d(t,{AIModal:()=>T,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(211),o=i(594),l=i(196),s=i.n(l),a=i(493),r=i(688),d=i(616),c=i(815),u=i(423);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
|
`,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 Al=i(910);const Tl=()=>{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}=Tl(),{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)(()=>Al.p9,[]);return(0,n.jsxs)(n.Fragment,{children:[v&&(0,n.jsx)(Il,{commonOptions:v,additionalExtensions:y,mentionsQueries:C,...e}),m&&(0,n.jsx)(T,{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}=Tl(),{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)(()=>Al.p9,[]);return(0,n.jsxs)(n.Fragment,{children:[v&&(0,n.jsx)(Gl,{commonOptions:v,additionalExtensions:y,mentionsQueries:C,...e}),m&&(0,n.jsx)(T,{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(831);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=664.
|
|
685
|
+
//# sourceMappingURL=664.676eb1085a2af9e136da.chunk.js.map
|