jamespot-react-core 1.1.113 → 1.1.115
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/build/{706.bundle.js → 155.bundle.js} +2 -2
- package/build/155.bundle.js.map +1 -0
- package/build/app.bundle.js +438 -435
- package/build/app.bundle.js.map +1 -1
- package/build/src/displayer/DisplayForm.component.d.ts +19 -20
- package/build/src/displayer/components/DisplayRender.d.ts +7 -7
- package/build/src/displayer/components/inputs/Date.d.ts +3 -2
- package/build/src/displayer/components/inputs/DefaultInput.d.ts +2 -1
- package/build/src/displayer/components/inputs/InputEmail.d.ts +2 -1
- package/build/src/displayer/components/inputs/InputRichText.d.ts +2 -1
- package/build/src/displayer/components/inputs/InputSelect.d.ts +2 -1
- package/build/src/displayer/components/inputs/InputTaxonomy.d.ts +15 -4
- package/build/src/displayer/components/inputs/InputTextarea.d.ts +2 -1
- package/build/src/displayer/components/inputs/OrientedLink.d.ts +2 -1
- package/build/src/displayer/components/inputs/Radio.d.ts +2 -1
- package/build/src/displayer/formatter.d.ts +15 -162
- package/build/src/displayer/types.d.ts +34 -34
- package/build/src/displayer/useDisplay.d.ts +8 -8
- package/build/src/redux/slice/Article.slice.d.ts +12 -2
- package/build/src/redux/slice/User.slice.d.ts +12 -2
- package/build/src/redux/store.d.ts +24 -4
- package/build/src/registry/coreComponents.d.ts +1 -1
- package/package.json +4 -4
- package/build/706.bundle.js.map +0 -1
- /package/build/src/{displayer → components}/Empty.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkReactCore=self.webpackChunkReactCore||[]).push([[
|
|
1
|
+
"use strict";(self.webpackChunkReactCore=self.webpackChunkReactCore||[]).push([[155],{1155:(e,t,n)=>{n.r(t),n.d(t,{DisplayForm:()=>u,EditorsPortal:()=>Ge,Empty:()=>m,TwoColLayout:()=>h,WidgetList:()=>ee,WidgetWrapperCore:()=>J});var i=n(7363),l=n.n(i),o=n(3230),a=n(7375),r=n(6754),c=n.n(r);const s=c().form`
|
|
2
2
|
${e=>e.stretch&&"\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n "}
|
|
3
3
|
`,d=c().div`
|
|
4
4
|
${e=>e.stretch&&"\n flex: 1;\n"}
|
|
@@ -195,4 +195,4 @@
|
|
|
195
195
|
width: ${440}px;
|
|
196
196
|
pointer-events: none;
|
|
197
197
|
`,Ge=()=>{const e=(0,w.useSelector)(x.Wq.selectors.selectEditors);return l().createElement(Ae,null,e.map(((e,t)=>"left"===e.position?l().createElement(ne,{on:!1,key:t},l().createElement(Fe,null,l().createElement(ke,{uniqid:e.uniqid}),l().createElement(De,{on:void 0!==e.popup},l().createElement(ge,{uniqid:e.uniqid})),l().createElement(Re,null))):l().createElement(ne,{on:!1,key:t},l().createElement(Fe,null,l().createElement(Re,null),l().createElement(De,{on:void 0!==e.popup},l().createElement(ge,{uniqid:e.uniqid})),l().createElement(ke,{uniqid:e.uniqid}))))))}}}]);
|
|
198
|
-
//# sourceMappingURL=
|
|
198
|
+
//# sourceMappingURL=155.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"155.bundle.js","mappings":"mSAMA,MAAMA,EAAU,QAAkC;MAC3CC,GACCA,EAAMC,SACN;EAQFC,EAAkB,OAAiC;MAClDF,GACCA,EAAMC,SACN;EAyEKE,EAAc,cAhDN,CACjBH,EACAI,KAEA,MAAMC,EAAU,SAA8B,OAEvCC,EAAeC,IAAiB,EAAAC,EAAA,IAAeR,EAAMS,OAAQT,EAAMU,OAEpE,aAAEC,EAAY,QAAEC,EAAO,MAAEC,IAAU,IAAAC,SAAQ,CAC7CP,cAAe,OAAF,wBACNA,GACAP,EAAMO,eAEbQ,aAAc,QAgBlB,OAbA,sBACIX,GACA,KAAM,CACFS,MAAO,K,MAEa,QAAhB,EAAAR,MAAAA,OAAO,EAAPA,EAASW,eAAO,SAAEC,SAAS,EAAG,GAE9BJ,QAGR,IAI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L,EAAOnL,SAC9B,kBAACoO,GAA2B,CAAChE,QAAqB5K,IAAjB2L,EAAOC,OACpC,kBAACF,GAAW,CAAClL,OAAQmL,EAAOnL,UAEhC,kBAACsO,GAAwB,QAOrC,kBAACnE,GAAe,CAACC,IAAI,EAAO5M,IAAKgI,GAC7B,kBAAC6I,GAAkB,KACf,kBAACC,GAAwB,MACzB,kBAACF,GAA2B,CAAChE,QAAqB5K,IAAjB2L,EAAOC,OACpC,kBAACF,GAAW,CAAClL,OAAQmL,EAAOnL,UAEhC,kBAACwN,GAAa,CAACxN,OAAQmL,EAAOnL","sources":["webpack://ReactCore/./src/displayer/DisplayForm.component.tsx","webpack://ReactCore/./src/components/Empty.tsx","webpack://ReactCore/./src/components/TwoColLayout.tsx","webpack://ReactCore/./src/components/widgets/WidgetState.tsx","webpack://ReactCore/./src/components/widgets/Widget.tsx","webpack://ReactCore/./src/components/widgets/const.ts","webpack://ReactCore/./src/components/widgets/WidgetInplace/WidgetInplaceUpload.tsx","webpack://ReactCore/./src/components/widgets/WidgetInplace/WidgetInplaceWrapper.tsx","webpack://ReactCore/./src/components/widgets/WidgetLayer/WidgetLayer.style.tsx","webpack://ReactCore/./src/components/widgets/WidgetLayer/WidgetLayer.tsx","webpack://ReactCore/./src/components/widgets/WidgetWrapperCore.tsx","webpack://ReactCore/./src/components/widgets/WidgetList/WidgetList.style.tsx","webpack://ReactCore/./src/components/widgets/WidgetList/WidgetList.tsx","webpack://ReactCore/./src/components/widgets/namespace.ts","webpack://ReactCore/./src/components/editors/style.tsx","webpack://ReactCore/./src/components/editors/const.ts","webpack://ReactCore/./src/components/editors/EditorPopup.tsx","webpack://ReactCore/./src/components/editors/Editor.tsx","webpack://ReactCore/./src/components/editors/EditorTabWidgets.tsx","webpack://ReactCore/./src/components/editors/EditorTabWrapper.tsx","webpack://ReactCore/./src/components/editors/EditorWrapper.tsx","webpack://ReactCore/./src/components/editors/EditorsPortal.tsx"],"sourcesContent":["import * as React from 'react';\nimport { DisplayFormRef, FieldsWith } from './types';\nimport { useForm, Control, FieldValues } from 'react-hook-form';\nimport { useDisplayForm } from './useDisplay';\nimport styled from 'styled-components';\n\nconst FormElm = styled.form<{ stretch?: boolean }>`\n ${(props) =>\n props.stretch &&\n `\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n `}\n`;\n\nconst FieldsetWrapper = styled.div<{ stretch?: boolean }>`\n ${(props) =>\n props.stretch &&\n `\n flex: 1;\n`}\n`;\n\nexport type DisplayFormProps<TFieldValues extends FieldValues> = {\n type: string;\n fields: FieldsWith<'input', TFieldValues>;\n extraInputs?: (control: Control<TFieldValues>) => React.ReactNode;\n defaultValues?: any;\n onSubmit: any;\n buttons: React.ReactNode;\n readOnly?: boolean;\n dataCy?: string;\n stretch?: boolean;\n children?: React.ReactNode;\n};\n\n/****\n * The jamespot model depend on the platform\n * For example a user can have the size attribute only for a given platform\n * The model specifics of a platform are stored in J.model\n *\n * This component display an array of attributes only if this attribute is activated on the platform\n */\nconst _DisplayForm = <TFieldValues extends FieldValues>(\n props: DisplayFormProps<TFieldValues>,\n ref: React.ForwardedRef<DisplayFormRef>,\n) => {\n const formRef = React.useRef<HTMLFormElement>(null);\n\n const [configuration, defaultValues] = useDisplayForm(props.fields, props.type);\n\n const { handleSubmit, control, reset } = useForm({\n defaultValues: {\n ...defaultValues,\n ...props.defaultValues,\n },\n criteriaMode: 'all',\n });\n\n React.useImperativeHandle(\n ref,\n () => ({\n reset: () => {\n // in case the form is scrollable\n formRef?.current?.scrollTo(0, 0);\n // reset react-hook-form form\n reset();\n },\n }),\n [],\n );\n\n return (\n <FormElm stretch={props.stretch} onSubmit={handleSubmit(props.onSubmit)} ref={formRef}>\n <FieldsetWrapper stretch={props.stretch}>\n {configuration.map(({ Input, ...conf }) => (\n <Input\n key={conf.name}\n control={control}\n {...conf}\n dataCy={`${props.dataCy}-${conf.name}`}\n readOnly={props.readOnly}\n />\n ))}\n {props.extraInputs && props.extraInputs(control)}\n </FieldsetWrapper>\n {props.buttons}\n </FormElm>\n );\n};\n\nexport const DisplayForm = React.forwardRef<DisplayFormRef>(_DisplayForm as any) as <TFieldValues extends FieldValues>(\n props: DisplayFormProps<TFieldValues> & {\n ref?: React.ForwardedRef<DisplayFormRef>;\n },\n) => ReturnType<typeof _DisplayForm>;\n","import * as React from 'react';\n\n// FIXME move to j-react-components + display error if dev mode\nexport const Empty = () => <></>;\n","import * as React from 'react';\nimport { Outlet } from 'react-router-dom';\nimport { useIntl } from 'react-intl';\nimport type { JRCAppColumnProps } from 'jamespot-react-components';\nimport JRCore from 'App';\nimport { useLocation } from 'react-router-dom';\nimport { LayoutMode } from 'jamespot-react-components';\n\nconst Container = JRCore.registry.getLazyComponent('Container');\nconst AppColumn = JRCore.registry.getLazyComponent('AppColumn');\nconst MainColumn = JRCore.registry.getLazyComponent('MainColumn');\n\nexport type TwoColLayoutRoute = {\n path: string;\n key: string;\n icon: string;\n label: string;\n group?: string;\n};\n\nexport type TwoColLayoutRoutes<T extends TwoColLayoutRoute = TwoColLayoutRoute> = Record<string, T>;\n\nexport type TwoColLayoutProps = {\n extensionRoute: string;\n routes: TwoColLayoutRoutes;\n mode?: LayoutMode;\n description: JRCAppColumnProps['description'];\n};\n\nexport function TwoColLayout({ extensionRoute, routes, description, mode = 'center' }: TwoColLayoutProps) {\n const intl = useIntl();\n const { pathname } = useLocation();\n\n const ROUTES_ARRAY = Object.values(routes);\n const [activeTab, setActiveTab] = React.useState(ROUTES_ARRAY?.[0]?.key);\n\n const tabs = ROUTES_ARRAY.map((tab) => ({\n ...tab,\n label: intl.formatMessage({ id: tab.label }),\n href: `/ng/rr/${extensionRoute}/${tab.path}`,\n group: tab.group ? intl.formatMessage({ id: tab.group }) : undefined,\n }));\n\n React.useEffect(() => {\n const activeRoute = ROUTES_ARRAY.find((route) => pathname === `/ng/rr/${extensionRoute}/${route.path}`);\n if (activeRoute) setActiveTab(activeRoute.key);\n }, [pathname]);\n\n return (\n <React.Suspense fallback={<></>}>\n <Container mode={mode}>\n <AppColumn mode={mode} description={description} tabs={tabs} activeTab={activeTab || ''} />\n <MainColumn mode={mode}>\n <Outlet />\n </MainColumn>\n </Container>\n </React.Suspense>\n );\n}\n","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nimport JRCore from 'App';\n\nconst JRCLoader = JRCore.registry.getLazyComponent('Loader');\n\nimport { WidgetKeys, WidgetsRootState } from 'jamespot-user-api';\nimport { Widget } from 'jamespot-front-business';\n\n/*\n Widget state\n*/\n\nexport const WidgetState = ({ name, uniqid, inplace }: { name: WidgetKeys; uniqid: string; inplace: boolean }) => {\n const state = useSelector((state: WidgetsRootState) => Widget.selectors.selectWidgetState(state, uniqid));\n const def = Widget.definition(name);\n\n if (state?.loading) {\n return (\n <div\n style={{\n position: 'absolute',\n inset: 0,\n backgroundColor: 'rgba(255,255,255,.7)',\n display: 'flex',\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n }}>\n <JRCLoader />\n </div>\n );\n }\n\n if (state?.hover) {\n return (\n <div\n style={{\n position: 'absolute',\n inset: 0,\n backgroundColor: 'rgba(255,255,255,.7)',\n display: 'flex',\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n }}></div>\n );\n }\n\n if (!state?.initialized && inplace) {\n return <></>;\n }\n\n if (!state?.initialized && !inplace) {\n return (\n <div\n style={{\n position: 'absolute',\n inset: 0,\n backgroundColor: 'rgba(255,255,255,1)',\n display: 'flex',\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n }}>\n <img src={def.img} />\n </div>\n );\n }\n\n return <></>;\n};\n","import React from 'react';\n\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { CombinedWidgetContent, CombinedWidgetType, WidgetDisplayMode, WidgetStateProps } from 'jamespot-user-api';\n\nimport JRCore from 'App';\nimport { Widget } from 'jamespot-front-business';\n\nconst JRCWidgetArticleButton = JRCore.registry.getLazyComponent('WidgetArticleButton');\nconst JRCWidgetArticleGallery = JRCore.registry.getLazyComponent('WidgetArticleGallery');\nconst JRCWidgetArticleAttachment = JRCore.registry.getLazyComponent('WidgetArticleAttachment');\nconst JRCWidgetArticleImage = JRCore.registry.getLazyComponent('WidgetArticleImage');\nconst JRCWidgetArticleTitle = JRCore.registry.getLazyComponent('WidgetArticleTitle');\nconst JRCWidgetArticleText = JRCore.registry.getLazyComponent('WidgetArticleText');\n/*\n Widget Factory (jamespot-react-core)\n*/\nexport const DisplayWidget = ({\n widget,\n width,\n inplace = false,\n isComponentVisible = false,\n mode = 'view',\n onClick,\n}: {\n widget: CombinedWidgetType;\n width?: number | undefined;\n inplace: boolean;\n isComponentVisible: boolean | undefined;\n mode: WidgetDisplayMode;\n onClick: () => void;\n}) => {\n const dispatch = useDispatch();\n const { name, uniqid } = widget;\n const token = useSelector(Widget.selectors.selectToken);\n\n const onChange = (content: CombinedWidgetContent, override?: boolean) =>\n dispatch(Widget.slice.actions.updateWidget({ uniqid, content, override }));\n\n const onStateChange = (states: WidgetStateProps) =>\n dispatch(Widget.slice.actions.setWidgetState({ uniqid, ...states }));\n\n switch (name) {\n default:\n return <>cannot display widget ({name})</>;\n case Widget.const.WIDGET_ARTICLE_BUTTON:\n return (\n <JRCWidgetArticleButton\n isComponentVisible={isComponentVisible}\n content={widget.content}\n inplace={inplace}\n mode={mode}\n onChange={onChange}\n onClick={onClick}\n onStateChange={onStateChange}\n />\n );\n case Widget.const.WIDGET_ARTICLE_GALLERY:\n return (\n <JRCWidgetArticleGallery\n width={width}\n token={token}\n isComponentVisible={isComponentVisible}\n content={widget.content}\n inplace={inplace}\n mode={mode}\n onChange={onChange}\n onStateChange={onStateChange}\n />\n );\n case Widget.const.WIDGET_ARTICLE_ATTACHMENT:\n return (\n <JRCWidgetArticleAttachment\n token={token}\n content={widget.content}\n isComponentVisible={isComponentVisible}\n inplace={inplace}\n mode={mode}\n onChange={onChange}\n onStateChange={onStateChange}\n />\n );\n case Widget.const.WIDGET_ARTICLE_IMAGE:\n return (\n <JRCWidgetArticleImage\n width={width ?? 800}\n token={token}\n content={widget.content}\n isComponentVisible={isComponentVisible}\n inplace={inplace}\n mode={mode}\n onChange={onChange}\n onClick={onClick}\n onStateChange={onStateChange}\n />\n );\n case Widget.const.WIDGET_ARTICLE_TITLE:\n return (\n <JRCWidgetArticleTitle\n isComponentVisible={isComponentVisible}\n content={widget.content}\n inplace={inplace}\n mode={mode}\n onChange={onChange}\n onStateChange={onStateChange}\n />\n );\n case Widget.const.WIDGET_ARTICLE_TEXT:\n return (\n <JRCWidgetArticleText\n content={widget.content}\n isComponentVisible={isComponentVisible}\n inplace={inplace}\n mode={mode}\n onChange={onChange}\n onStateChange={onStateChange}\n />\n );\n }\n};\n","export const Uploader: Record<string, { accept: string; label: string; description: string; multiple: boolean }> = {\n 'widget-article-image': {\n accept: 'image/png, image/jpeg, image/jpg',\n multiple: false,\n label: 'WIDGET_Article_Image_Empty_Label',\n description: 'WIDGET_Article_Image_Empty_Description',\n },\n 'widget-article-gallery': {\n accept: 'image/png, image/jpeg, image/jpg',\n multiple: true,\n label: 'WIDGET_Article_Gallery_Empty_Label',\n description: 'WIDGET_Article_Attachment_Empty_Description',\n },\n 'widget-article-attachment': {\n accept: '*',\n multiple: true,\n label: 'WIDGET_Article_Attachment_Empty_Label',\n description: 'WIDGET_Article_Attachment_Empty_Description',\n },\n};\n","import React from 'react';\nimport { shallowEqual, useDispatch, useSelector } from 'react-redux';\n\nimport JRCore from 'App';\nconst JRCFormFile = JRCore.registry.getLazyComponent('DEPRECATEDFormInputFile');\n\nimport { apiFileToWidgetFile, FileResponse, WidgetFileType, WidgetsRootState } from 'jamespot-user-api';\nimport { Widget } from 'jamespot-front-business';\n\nimport { JRCWidgetEmptyInplace } from 'jamespot-react-components';\n\ntype WidgetInplaceUploadProps = {\n uniqid: string;\n initialFiles: WidgetFileType[];\n accept: string;\n label: string;\n description: string;\n multiple: boolean;\n token: string;\n allowAutoOpening: boolean;\n onChange: (files: WidgetFileType[]) => void;\n};\n\nexport const WidgetInplaceUpload = ({\n uniqid,\n initialFiles,\n accept,\n label,\n description,\n multiple,\n token,\n allowAutoOpening,\n onChange,\n}: WidgetInplaceUploadProps) => {\n const dispatch = useDispatch();\n const isActive = useSelector(\n (state: WidgetsRootState) => state.widgets.currentEditableWidgetId === uniqid,\n shallowEqual,\n );\n const uploadRef = React.useRef<HTMLInputElement>(null);\n const [fileUploadStep, setFileUploadStep] = React.useState<number>(0);\n const [fileCount, setFileCount] = React.useState<number>(0);\n const [fileResponses, setFileResponses] = React.useState<WidgetFileType[]>(initialFiles ?? []);\n\n const onUploadStart = () => {\n dispatch(Widget.slice.actions.setWidgetState({ uniqid, loading: true }));\n };\n\n React.useEffect(() => {\n if (fileUploadStep === fileCount) {\n dispatch(Widget.slice.actions.setWidgetState({ uniqid, loading: false }));\n }\n }, [fileUploadStep]);\n\n React.useEffect(() => {\n onChange(fileResponses.map((fileResponse) => fileResponse));\n }, [fileResponses]);\n\n React.useEffect(() => {\n if (isActive && allowAutoOpening) {\n uploadRef.current?.click();\n dispatch(Widget.slice.actions.setWidgetState({ uniqid, mounted: true }));\n }\n }, [isActive]);\n\n return (\n <>\n <JRCWidgetEmptyInplace\n url={'widget-article-image-placeholder.png'}\n label={label}\n description={description}\n onClick={() => {\n if (isActive) {\n uploadRef.current?.click();\n }\n }}\n />\n <div style={{ height: 0, width: 0, overflow: 'hidden' }}>\n <JRCFormFile\n ref={uploadRef}\n id=\"widget-upload-file\"\n name=\"editorFiles\"\n content={''}\n accept={accept as any}\n multiple={multiple}\n token={token}\n onUploadStart={(count) => {\n if (count !== undefined) {\n setFileCount((prevCount) => prevCount + count);\n }\n onUploadStart();\n }}\n onUploadSuccess={(fileResponse: FileResponse | undefined) => {\n setFileUploadStep((prevStep) => prevStep + 1);\n if (fileResponse !== undefined) {\n setFileResponses((prevFileResponses) => [\n ...prevFileResponses,\n apiFileToWidgetFile(fileResponse),\n ]);\n }\n if (!multiple) {\n dispatch(Widget.slice.actions.setWidgetState({ uniqid, loading: false }));\n }\n }}\n />\n </div>\n </>\n );\n};\n","import React from 'react';\nimport { shallowEqual, useDispatch, useSelector } from 'react-redux';\n\nimport styled from 'styled-components';\n\nimport { WidgetDisplayMode, WidgetsRootState } from 'jamespot-user-api';\nimport { Widget, WidgetEditor } from 'jamespot-front-business';\n\nimport { Uploader } from '../const';\nimport { WidgetInplaceUpload } from './WidgetInplaceUpload';\n\nexport const CSSUploadFileWrapper = styled.div`\n position: relative;\n inset: 0;\n display: flex;\n flex: 1;\n min-height: 180px;\n`;\n\nexport const WidgetInplaceWrapper = ({ uniqid, mode }: { uniqid: string; mode: WidgetDisplayMode }) => {\n const dispatch = useDispatch();\n const widgetWrapper = useSelector((state: WidgetsRootState) => Widget.selectors.selectWidget(state, uniqid));\n const isActive = useSelector(\n (state: WidgetsRootState) => state.widgets.currentEditableWidgetId === uniqid,\n shallowEqual,\n );\n const token = useSelector(Widget.selectors.selectToken);\n\n React.useEffect(() => {\n if (isActive && widgetWrapper?.widget.name) {\n dispatch(WidgetEditor.slice.actions.flushAllEditor());\n dispatch(WidgetEditor.slice.actions.registerEditor({ uniqid, name: widgetWrapper?.widget.name }));\n }\n }, [isActive]);\n\n if (widgetWrapper === undefined) {\n return <></>;\n }\n\n const label = Uploader && Uploader[widgetWrapper?.widget.name] ? Uploader[widgetWrapper?.widget.name].label : '';\n const description =\n Uploader && Uploader[widgetWrapper?.widget.name] ? Uploader[widgetWrapper?.widget.name].description : '';\n const accept = Uploader && Uploader[widgetWrapper?.widget.name] ? Uploader[widgetWrapper?.widget.name].accept : '';\n const multiple =\n Uploader && Uploader[widgetWrapper?.widget.name] ? Uploader[widgetWrapper?.widget.name].multiple : false;\n\n switch (widgetWrapper?.widget.name) {\n case 'widget-article-gallery':\n const galleryFiles = widgetWrapper.widget.content.files;\n return token !== undefined && mode === 'edit' ? (\n <div style={{ marginTop: galleryFiles?.length ? 24 : 0 }}>\n <CSSUploadFileWrapper>\n <WidgetInplaceUpload\n label={label}\n description={description}\n initialFiles={[]}\n accept={accept}\n multiple={multiple}\n uniqid={uniqid}\n token={token}\n allowAutoOpening={!galleryFiles?.length}\n onChange={(fs) => {\n if (Array.isArray(fs)) {\n fs.forEach((file) => {\n dispatch(\n Widget.slice.actions.updateWidget({\n uniqid,\n content: { files: galleryFiles ? [...galleryFiles, file] : [file] },\n }),\n );\n });\n }\n }}\n />\n </CSSUploadFileWrapper>\n </div>\n ) : (\n <></>\n );\n case 'widget-article-attachment':\n const files = widgetWrapper.widget.content.files;\n return token !== undefined && mode === 'edit' ? (\n <div style={{ marginTop: files?.length ? 24 : 0 }}>\n <CSSUploadFileWrapper>\n <WidgetInplaceUpload\n label={label}\n description={description}\n initialFiles={files ?? []}\n accept={accept}\n multiple={multiple}\n uniqid={uniqid}\n token={token}\n allowAutoOpening={!files?.length}\n onChange={(fs) => {\n if (Array.isArray(fs)) {\n dispatch(\n Widget.slice.actions.updateWidget({\n uniqid,\n content: { files: fs },\n }),\n );\n }\n }}\n />\n </CSSUploadFileWrapper>\n </div>\n ) : (\n <></>\n );\n case 'widget-article-image':\n return token !== undefined && mode === 'edit' && !widgetWrapper.widget.content.file ? (\n <>\n <CSSUploadFileWrapper>\n <WidgetInplaceUpload\n label={label}\n description={description}\n initialFiles={widgetWrapper.widget.content.file ?? []}\n accept={accept}\n multiple={false}\n uniqid={uniqid}\n token={token}\n allowAutoOpening={!widgetWrapper.widget.content.file}\n onChange={(fs) => {\n if (fs && fs[0]) {\n dispatch(Widget.slice.actions.updateWidget({ uniqid, content: { file: fs[0] } }));\n }\n }}\n />\n </CSSUploadFileWrapper>\n </>\n ) : (\n <div\n style={{ position: 'absolute', inset: 0 }}\n onClick={() => {\n dispatch(WidgetEditor.slice.actions.flushAllEditor());\n dispatch(\n WidgetEditor.slice.actions.registerEditor({ uniqid, name: widgetWrapper?.widget.name }),\n );\n }}></div>\n );\n }\n\n return <></>;\n};\n","import styled from 'styled-components';\n\nexport const CSSWidgetLayer = styled.div<{ opacity: number; backgroundColor: string; pointerEvents: string }>`\n position: absolute;\n inset: 0;\n opacity: ${(props) => props.opacity};\n background-color: ${(props) => props.backgroundColor};\n pointer-events: ${(props) => props.pointerEvents};\n`;\n","import React from 'react';\n\nimport { shallowEqual, useDispatch, useSelector } from 'react-redux';\n\nimport { WidgetVector, WidgetsRootState, WidgetDisplayMode, WidgetKeys } from 'jamespot-user-api';\n\nimport { WidgetEditor, Widget } from 'jamespot-front-business';\nimport WidgetWrapperCore from '../WidgetWrapperCore';\nimport { CSSWidgetLayer } from './WidgetLayer.style';\nimport { BETA_JRCDoubleClick } from 'jamespot-react-components';\n\n/*\n Widget layering\n*/\n\nexport const WidgetLayer = ({ uniqid, mode }: { uniqid: string; mode: WidgetDisplayMode }) => {\n const layers = useSelector((state: WidgetsRootState) => state.widgets.ids[uniqid].widget.layers, shallowEqual);\n return (\n <>\n {layers?.map((layer, index) => {\n if (mode === 'edit') {\n return <Layer uniqid={layer} key={index} mode={'edit'} />;\n }\n\n return <Layer uniqid={layer} key={index} mode={'edit'} />;\n })}\n </>\n );\n};\n\nconst Layer = ({ uniqid, mode }: { uniqid: string; mode: WidgetDisplayMode }) => {\n const layer = useSelector((state: WidgetsRootState) => state.widgets.layers[uniqid]);\n if (mode === 'view') {\n return (\n <CSSWidgetLayer opacity={1} backgroundColor={'transparent'} pointerEvents={'none'}>\n {layer.widgets.map((widgetWrapper, index) => {\n return (\n <LayerWidget\n key={index}\n layerId={layer.uniqid}\n uniqid={widgetWrapper.widget.uniqid}\n mode={'view'}\n />\n );\n })}\n </CSSWidgetLayer>\n );\n }\n\n return (\n <CSSWidgetLayer\n opacity={layer.visible ? 1 : 0}\n backgroundColor={layer.visible ? 'rgba(255,255,255,.1)' : 'transparent'}\n pointerEvents={layer.locked ? 'none' : 'all'}>\n {layer.widgets.map((widgetWrapper, index) => {\n return (\n <LayerWidget\n key={index}\n layerId={layer.uniqid}\n uniqid={widgetWrapper.widget.uniqid}\n mode={'edit'}\n />\n );\n })}\n </CSSWidgetLayer>\n );\n};\n\n/*\n Widget from the layer\n*/\nconst LayerWidget = ({ uniqid, layerId, mode }: { uniqid: string; layerId: string; mode: WidgetDisplayMode }) => {\n const dispatch = useDispatch();\n const widgetWrapper = useSelector((state: WidgetsRootState) => state.widgets.ids[uniqid], shallowEqual);\n const layer = useSelector((state: WidgetsRootState) => state.widgets.layers[layerId]);\n\n if (!widgetWrapper) {\n return <></>;\n }\n\n if (!layer) {\n return <></>;\n }\n\n if (!layer.position) {\n return <></>;\n }\n\n const onDoubleTap = (uniqid: string, name: WidgetKeys) => {\n /*\n Open editor\n */\n dispatch(WidgetEditor.slice.actions.registerEditor({ uniqid, name }));\n };\n\n const onMouseUp = (position: WidgetVector) => {\n dispatch(Widget.slice.actions.updateLayer({ uniqid: layerId, props: { position } }));\n };\n\n if (mode === 'view') {\n return (\n <div style={{ position: 'absolute', top: layer.position.y, left: layer.position.x }}>\n <WidgetWrapperCore uniqid={uniqid} widget={widgetWrapper} mode={mode} inplace={true} />\n </div>\n );\n }\n\n return (\n <DraggableHandler\n position={{ x: layer.position.x, y: layer.position.y }}\n onMouseUp={(position: WidgetVector) => {\n if (\n (layer.position && layer.position.x !== position.x) ||\n (layer.position && layer.position.y !== position.y)\n ) {\n onMouseUp(position);\n }\n }}>\n <BETA_JRCDoubleClick\n onDoubleTap={() => onDoubleTap(widgetWrapper.widget.uniqid, widgetWrapper.widget.name)}>\n <WidgetWrapperCore uniqid={uniqid} widget={widgetWrapper} mode={mode} inplace={true} />\n </BETA_JRCDoubleClick>\n </DraggableHandler>\n );\n};\n\nexport type Vector = {\n x: number;\n y: number;\n};\n\n// TODO: COMBINE WITH THE ONE USED ON COLOR PICKER\n// TODO: COMBINE WITH THE ONE USED ON COLOR PICKER\n// TODO: COMBINE WITH THE ONE USED ON COLOR PICKER\nexport const DraggableHandler = ({\n position,\n children,\n onMouseUp,\n}: {\n position: Vector;\n children: React.ReactElement;\n onMouseUp: (position: Vector) => void;\n}) => {\n const [mouseIsDown, setMouseDown] = React.useState<boolean>(false);\n const [mouse, setMouse] = React.useState<Vector>({ x: 0, y: 0 });\n const [start, setStart] = React.useState<Vector>({ x: 0, y: 0 });\n const [child, setChild] = React.useState<Vector>({ x: position.x, y: position.y });\n\n const ref = React.useRef<HTMLDivElement>(null);\n\n const handleMouseDown = (event: any) => {\n setMouseDown(true);\n if (ref.current) {\n setMouse({ x: event.nativeEvent.clientX, y: event.nativeEvent.clientY });\n setStart({ x: child.x, y: child.y });\n }\n };\n\n const handleMouseMove = React.useCallback(\n (event: any) => {\n if (mouseIsDown && ref.current) {\n const dx = start.x + (event.clientX - mouse.x);\n const dy = start.y + (event.clientY - mouse.y);\n\n setChild({ x: dx, y: dy });\n }\n },\n [mouseIsDown],\n );\n\n const handleMouseUp = () => {\n setMouseDown(false);\n onMouseUp({ x: child.x, y: child.y });\n };\n\n React.useEffect(() => {\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n return () => {\n document.removeEventListener('mousemove', handleMouseMove);\n document.removeEventListener('mouseup', handleMouseUp);\n };\n }, [handleMouseMove]);\n\n return (\n <div style={{ position: 'absolute', top: child.y, left: child.x }} ref={ref} onMouseDown={handleMouseDown}>\n {children}\n </div>\n );\n};\n","import React from 'react';\nimport { useSelector, useDispatch, shallowEqual } from 'react-redux';\n\nimport { WidgetDisplayMode, WidgetsRootState, WidgetWrapperProps } from 'jamespot-user-api';\nimport { WidgetState } from './WidgetState';\nimport { DisplayWidget } from './Widget';\nimport { Widget, WidgetEditor } from 'jamespot-front-business';\nimport { useComponentVisible } from './hooks';\nimport { WidgetInplaceWrapper } from './WidgetInplace/WidgetInplaceWrapper';\nimport { WidgetLayer } from './WidgetLayer/WidgetLayer';\n\n/*\n This is a widget wrapper\n*/\nexport const WidgetWrapperCore = ({\n uniqid,\n widget,\n inplace = true,\n mode,\n width,\n}: {\n uniqid: string;\n widget: WidgetWrapperProps;\n inplace?: boolean;\n mode: WidgetDisplayMode;\n width?: number | undefined;\n}) => {\n const dispatch = useDispatch();\n const widgetWrapper = useSelector((state: WidgetsRootState) => Widget.selectors.selectWidget(state, uniqid));\n const isBusy = useSelector(\n (state: WidgetsRootState) => Widget.selectors.selectWidgetState(state, uniqid)?.busy,\n shallowEqual,\n );\n const indexOrder = useSelector((state: WidgetsRootState) => state.widgets.editableMap[uniqid], shallowEqual);\n const currentEditableWidgetId = useSelector(\n (state: WidgetsRootState) => state.widgets.currentEditableWidgetId,\n shallowEqual,\n );\n const isActive = useSelector(\n (state: WidgetsRootState) => state.widgets.currentEditableWidgetId === uniqid,\n shallowEqual,\n );\n const { ref, isComponentVisible, setIsComponentVisible } = useComponentVisible(false);\n\n React.useEffect(() => {\n if (widget) {\n /*\n Register widget\n */\n dispatch(Widget.slice.actions.registerWidget({ uniqid, widget }));\n }\n }, []);\n\n React.useEffect(() => {\n if (!isComponentVisible) {\n if (uniqid === currentEditableWidgetId) {\n dispatch(Widget.slice.actions.setEditableWidgetId({ uniqid: undefined }));\n }\n }\n }, [isComponentVisible]);\n\n React.useEffect(() => {\n if (isComponentVisible !== isActive) {\n setIsComponentVisible(isActive);\n }\n }, [isActive]);\n\n if (widgetWrapper === undefined) {\n return <>This widget cannot be desplayed</>;\n }\n\n const onClick = () => {\n if (mode === 'edit') {\n registerEditor();\n } else {\n if (widgetWrapper.widget.name === 'widget-article-button') {\n switch (widgetWrapper.widget.content.openingType) {\n case 'link':\n if (widgetWrapper.widget.content.openingTypeLink) {\n window.open(\n widgetWrapper.widget.content.openingTypeLink.url,\n widgetWrapper.widget.content.openingTypeLink.target,\n );\n }\n break;\n }\n }\n }\n };\n\n const registerEditor = () => {\n if (mode === 'view') {\n return;\n }\n /*\n Register editor\n */\n const { widget } = widgetWrapper;\n dispatch(\n WidgetEditor.slice.actions.registerEditor({\n uniqid: widget.uniqid,\n name: widget.name,\n }),\n );\n };\n\n if (inplace && mode !== 'view') {\n return (\n <div\n style={{ minWidth: width !== undefined ? width : '100%' }}\n ref={ref}\n onClick={() => {\n setIsComponentVisible(true);\n if (indexOrder) {\n dispatch(Widget.slice.actions.setEditableIndex({ index: indexOrder.index }));\n dispatch(Widget.slice.actions.setEditableWidgetId({ uniqid }));\n }\n }}>\n <DisplayWidget\n width={width}\n widget={widgetWrapper.widget}\n inplace={inplace}\n isComponentVisible={isComponentVisible || isBusy || isActive ? true : false}\n mode={mode}\n onClick={onClick}\n />\n <WidgetInplaceWrapper uniqid={uniqid} mode={mode} />\n <WidgetLayer uniqid={uniqid} mode={mode} />\n <WidgetState name={widgetWrapper.widget.name} uniqid={widgetWrapper.widget.uniqid} inplace={inplace} />\n </div>\n );\n }\n\n return (\n <div\n style={{ flex: 1, display: 'flex', minWidth: width !== undefined ? width : '100%' }}\n onClick={registerEditor}>\n <DisplayWidget\n widget={widgetWrapper.widget}\n isComponentVisible={false}\n inplace={inplace}\n mode={mode}\n width={width}\n onClick={onClick}\n />\n <WidgetLayer uniqid={uniqid} mode={mode} />\n <WidgetState name={widgetWrapper.widget.name} uniqid={widgetWrapper.widget.uniqid} inplace={inplace} />\n </div>\n );\n};\n\nexport default WidgetWrapperCore;\n","import styled from 'styled-components';\n\nexport const CSSSquareWidgetWrapper = styled.div`\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 10px;\n justify-content: center;\n`;\n\nexport const CSSSquareWidget = styled.div<{ available: boolean }>`\n border: 1px solid ${(props) => props.theme.color.grey2};\n border-radius: 8px;\n cursor: pointer;\n padding: 12px;\n position: relative;\n opacity: ${(props) => (props.available ? '1' : '.4')};\n pointer-events: ${(props) => (props.available ? 'all' : 'none')};\n\n .show-on-hover {\n position: absolute;\n inset: 0;\n border-radius: 8px;\n justify-content: center;\n align-items: center;\n display: flex;\n opacity: 0;\n background-color: #ffffffe6;\n }\n\n &:hover {\n .show-on-hover {\n opacity: 1;\n }\n }\n`;\n\nexport const CSSWidgetButton = styled.div<{ open: boolean }>`\n border: 2px solid ${(props) => props.theme.color.primary};\n height: ${(props) => (props.open ? '320' : '54')}px;\n border-radius: 8px;\n display: flex;\n justify-content: top;\n flex-direction: column;\n transition: height 0.4s;\n overflow: hidden;\n flex-direction: column;\n`;\n\nexport const CSSWrapWidgetWrapper = styled.div`\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: center;\n gap: 10px;\n`;\n\nexport const CSSWrapTitle = styled.div`\n min-height: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n color: ${(props) => props.theme.color.primary};\n`;\n\nexport const CSSWrapWidget = styled.button<{ open: boolean; index: number }>`\n height: 72px;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 40%;\n border: 1px solid ${(props) => props.theme.color.grey2};\n border-radius: 8px;\n transition: opacity 0.4s ease ${(props) => props.index * 40}ms;\n opacity: ${(props) => (props.open ? 1 : 0)};\n`;\n","import React from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { WidgetDefinitionProps, WidgetKeys, WidgetWrapperProps } from 'jamespot-user-api';\n\nimport JRCore from 'App';\nimport { JRCModalProps } from 'jamespot-react-components';\nimport { Widget } from 'jamespot-front-business';\nimport { getBuilderWidgets } from '../namespace';\nimport {\n CSSSquareWidget,\n CSSSquareWidgetWrapper,\n CSSWidgetButton,\n CSSWrapTitle,\n CSSWrapWidget,\n CSSWrapWidgetWrapper,\n} from './WidgetList.style';\n\nconst JRCButton = JRCore.registry.getLazyComponent('Button');\nconst JRCModal = JRCore.registry.getLazyComponent('Modal');\n\ntype WidgetListMode = 'button' | 'list' | 'gallery' | 'custom' | 'article';\n\n/*\n Widget Builder\n*/\nexport const WidgetList = ({\n mode,\n children,\n namespace = 'default',\n onChange,\n}: {\n mode?: WidgetListMode;\n children?: any;\n namespace?: string;\n onChange: (widget: WidgetWrapperProps) => void;\n}) => {\n const [isOpen, setOpen] = React.useState<boolean>(false);\n const widgets = getBuilderWidgets(namespace);\n const intl = useIntl();\n\n const args: JRCModalProps = {\n open: isOpen,\n title: 'widget builder',\n showIconClose: true,\n portalId: 'react-modal',\n isFullHeight: true,\n closeHandler: () => setOpen(false),\n };\n\n const onClick = (name: WidgetKeys) => {\n onChange(Widget.factory(name));\n setOpen(false);\n };\n\n return (\n <>\n <JRCModal {...args}>\n <CSSSquareWidgetWrapper>\n {widgets.map((widget, index: number) => {\n return (\n <CSSSquareWidget\n key={index}\n onClick={() => onClick(widget.name)}\n available={widget.available}>\n <img src={widget.img} />\n <div className=\"show-on-hover\">{intl.formatMessage({ id: widget.label })}</div>\n </CSSSquareWidget>\n );\n })}\n </CSSSquareWidgetWrapper>\n </JRCModal>\n {mode === 'custom' && children ? <div onClick={() => setOpen(true)}>{children}</div> : <></>}\n {mode === 'button' ? (\n <JRCButton onClick={() => setOpen(true)} variant={'outlined'} minWidth={'100%'}>\n {intl.formatMessage({ id: 'WIDGET_Add_Widget' })}\n </JRCButton>\n ) : (\n <></>\n )}\n {mode === 'gallery' ? (\n <CSSSquareWidgetWrapper>\n {widgets.map((widget, index: number) => {\n return (\n <CSSSquareWidget\n key={index}\n onClick={() => onClick(widget.name)}\n available={widget.available}>\n <img src={widget.img} />\n <div className=\"show-on-hover\">{intl.formatMessage({ id: widget.label })}</div>\n </CSSSquareWidget>\n );\n })}\n </CSSSquareWidgetWrapper>\n ) : (\n <></>\n )}\n {mode === 'article' ? <WidgetModeArticle widgets={widgets} onClick={onClick} /> : <></>}\n </>\n );\n};\n\nconst WidgetModeArticle = ({\n widgets,\n onClick,\n}: {\n widgets: WidgetDefinitionProps[];\n onClick: (name: WidgetKeys) => void;\n}) => {\n const [open, isOpen] = React.useState(false);\n const intl = useIntl();\n return (\n <>\n <CSSWidgetButton open={open}>\n <CSSWrapTitle onClick={() => isOpen(!open)}>\n {intl.formatMessage({ id: 'WIDGET_Add_Widget' })}\n </CSSWrapTitle>\n <CSSWrapWidgetWrapper>\n {widgets.map((widget, index) => {\n return (\n <CSSWrapWidget\n key={widget.name}\n open={open}\n index={index}\n onClick={() => onClick(widget.name)}>\n {intl.formatMessage({ id: widget.label })}\n </CSSWrapWidget>\n );\n })}\n </CSSWrapWidgetWrapper>\n </CSSWidgetButton>\n </>\n );\n};\n","import { Widget } from 'jamespot-front-business';\nimport { WidgetDefinitionProps } from 'jamespot-user-api';\n\nexport function getBuilderWidgets(namespace: string): WidgetDefinitionProps[] {\n switch (namespace) {\n case 'widget-article-image':\n return [\n Widget.definition(Widget.const.WIDGET_ARTICLE_TITLE),\n Widget.definition(Widget.const.WIDGET_ARTICLE_BUTTON),\n ];\n default:\n return [\n Widget.definition(Widget.const.WIDGET_ARTICLE_TITLE),\n Widget.definition(Widget.const.WIDGET_ARTICLE_TEXT),\n Widget.definition(Widget.const.WIDGET_ARTICLE_IMAGE),\n Widget.definition(Widget.const.WIDGET_ARTICLE_BUTTON),\n Widget.definition(Widget.const.WIDGET_ARTICLE_GALLERY),\n Widget.definition(Widget.const.WIDGET_ARTICLE_ATTACHMENT),\n ];\n }\n}\n","import styled from 'styled-components';\nimport { EDITOR_MENU_WIDTH, EDITOR_WIDTH } from './const';\n\nconst INPUT_HEIGHT = 50;\nconst RADIUS = 8;\n\nexport const CSSEditorComponentWrapper = styled.div`\n margin-bottom: 24px;\n`;\n\nexport const CSSEditorComponentLabel = styled.div`\n margin-bottom: 4px;\n`;\n\nexport const CSSEditorPortal = styled.div<{ on: boolean }>`\n position: absolute;\n background-color: ${(props) => (props.on ? 'rgba(0,0,0,.1)' : 'transparent')};\n inset: 0;\n pointer-events: ${(props) => (props.on ? 'all' : 'none')};\n flex: 1;\n display: flex;\n overflow: hidden;\n`;\n\nexport const CSSEditorHeader = styled.div`\n flex-direction: row;\n display: flex;\n min-height: 60px;\n border-bottom: 1px solid ${(props) => props.theme.color.grey2};\n`;\n\nexport const CSSEditorAction = styled.div`\n width: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const CSSEditorLabel = styled.div`\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const CSSEditor = styled.div<{ visible: boolean }>`\n position: absolute;\n top: 90px;\n right: ${(props) => (props.visible ? '0' : '-1000')}px;\n width: ${EDITOR_WIDTH}px;\n bottom: 0;\n display: flex;\n background-color: ${(props) => props.theme.color.white};\n flex-direction: row;\n transition: all 0.4s;\n box-shadow: -1px 1px 10px 0px rgb(0 0 0 / 20%);\n`;\n\nexport const CSSEditorContent = styled.div`\n flex: 1;\n display: flex;\n flex-direction: row;\n padding: 12px;\n overflow: auto;\n`;\n\nexport const CSSEditorMenu = styled.div`\n width: ${EDITOR_MENU_WIDTH}px;\n padding-top: 60px;\n display: flex;\n flex-direction: column;\n border-right: 1px solid ${(props) => props.theme.color.grey2};\n`;\n\nexport const CSSEditorMenuButton = styled.button<{ on?: boolean }>`\n border-radius: 4px;\n cursor: pointer;\n height: 42px;\n margin: 4px;\n width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ${(props) => (props.on ? props.theme.color.grey1 : props.theme.color.white)};\n &:hover {\n background-color: ${(props) => props.theme.color.grey1};\n }\n`;\n\nexport const CSSInputWrapper = styled.div`\n display: flex;\n border: 1px solid ${(props) => props.theme.color.grey1};\n border-radius: ${RADIUS}px;\n margin-bottom: 24px;\n input {\n width: 100%;\n border: 0;\n height: ${INPUT_HEIGHT}px;\n margin: 0;\n }\n`;\n\nexport const CSSEditorWidget = styled.div`\n display: flex;\n flex-direction: row;\n padding: 12px;\n background-color: ${(props) => props.theme.color.grey0};\n border-radius: 8px;\n margin-bottom: 4px;\n`;\n\nexport const CSSEditorWidgetLabel = styled.div`\n display: flex;\n flex: 1;\n align-items: center;\n`;\n\nexport const CSSEditorWidgetOption = styled.div`\n width: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nexport const CSSEditorLayer = styled.div`\n flex-direction: row;\n display: flex;\n align-items: center;\n`;\n\nexport const CSSEditorLayerTitle = styled.div`\n flex: 1;\n display: flex;\n align-items: center;\n`;\n","export const EDITOR_TOP = 90;\nexport const EDITOR_WIDTH = 440;\nexport const EDITOR_MENU_WIDTH = 50;\n","import React from 'react';\n\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { JRCButton, JRCIcon } from 'jamespot-react-components';\n\nimport { CSSEditorAction, CSSEditorHeader, CSSEditorLabel, CSSEditorMenuButton } from './style';\nimport { WidgetEditor, EditorsRootState } from 'jamespot-front-business';\n\n/*\n Editor popup (center part)\n*/\nexport const EditorPopup = ({ uniqid }: { uniqid: string }) => {\n const dispatch = useDispatch();\n const editor = useSelector((state: EditorsRootState) => WidgetEditor.selectors.selectEditor(state, uniqid));\n\n const onClick = () => {\n dispatch(WidgetEditor.slice.actions.flushEditorPopup({ uniqid }));\n };\n\n const onSave = () => {\n dispatch(WidgetEditor.slice.actions.flushEditorPopup({ uniqid }));\n };\n\n if (editor && editor.popup && editor.view) {\n return (\n <div style={{ flex: 1, display: 'flex', flexDirection: 'column', backgroundColor: 'white', marginTop: 90 }}>\n <CSSEditorHeader>\n <CSSEditorAction />\n <CSSEditorLabel>Popup</CSSEditorLabel>\n <CSSEditorAction>\n <CSSEditorMenuButton onClick={onClick}>\n <JRCIcon name=\"icon-times\" color=\"grey2\" />\n </CSSEditorMenuButton>\n </CSSEditorAction>\n </CSSEditorHeader>\n <div style={{ flex: 1, display: 'flex' }}>{editor.view}</div>\n <CSSEditorHeader>\n <JRCButton onClick={onSave}>Save</JRCButton>\n </CSSEditorHeader>\n </div>\n );\n }\n\n return <></>;\n};\n","import React from 'react';\n\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { WidgetEditor, Widget } from 'jamespot-front-business';\n\nimport JRCore from 'App';\n\nimport { CombinedWidgetContent, WidgetsRootState, WidgetStateProps } from 'jamespot-user-api';\n\nconst JRCWidgetArticleTitleEditor = JRCore.registry.getLazyComponent('WidgetArticleTitleEditor');\nconst JRCWidgetArticleImageEditor = JRCore.registry.getLazyComponent('WidgetArticleImageEditor');\nconst JRCWidgetArticleTextEditor = JRCore.registry.getLazyComponent('WidgetArticleTextEditor');\nconst JRCWidgetArticleGalleryEditor = JRCore.registry.getLazyComponent('WidgetArticleGalleryEditor');\nconst JRCWidgetArticleButtonEditor = JRCore.registry.getLazyComponent('WidgetArticleButtonEditor');\nconst JRCWidgetArticleAttachmentEditor = JRCore.registry.getLazyComponent('WidgetArticleAttachmentEditor');\n\n/*\n Editor Factory\n*/\nexport const Editor = ({ uniqid }: { uniqid: string }) => {\n const dispatch = useDispatch();\n const token = useSelector(Widget.selectors.selectToken);\n const widgetWrapper = useSelector((state: WidgetsRootState) => Widget.selectors.selectWidget(state, uniqid));\n\n const onSave = (content: CombinedWidgetContent) => {\n /*\n Update widget & Flush editor\n */\n if (widgetWrapper) {\n dispatch(Widget.slice.actions.updateWidget({ uniqid, content }));\n }\n\n dispatch(WidgetEditor.slice.actions.flushEditor({ uniqid }));\n };\n\n const onChange = (content: CombinedWidgetContent, override?: boolean) =>\n dispatch(Widget.slice.actions.updateWidget({ uniqid, content, override }));\n\n const onStateChange = (states: WidgetStateProps, id?: string) => {\n /*\n Set widget state (busy, loading, initialized)\n */\n if (id !== undefined) {\n dispatch(Widget.slice.actions.setWidgetState({ uniqid: id, ...states }));\n } else {\n dispatch(Widget.slice.actions.setWidgetState({ uniqid, ...states }));\n }\n };\n\n const onOpen = (view: React.ReactElement) => {\n /*\n Register popup (central)\n */\n dispatch(WidgetEditor.slice.actions.registerEditorPopup({ uniqid, view }));\n };\n\n switch (widgetWrapper?.widget.name) {\n default:\n return <>cannot display editor</>;\n case Widget.const.WIDGET_ARTICLE_BUTTON:\n return (\n <JRCWidgetArticleButtonEditor\n content={widgetWrapper.widget.content}\n onChange={onChange}\n onSave={onSave}\n onStateChange={onStateChange}\n />\n );\n case Widget.const.WIDGET_ARTICLE_ATTACHMENT:\n return (\n <JRCWidgetArticleAttachmentEditor\n token={token}\n content={widgetWrapper.widget.content}\n onChange={onChange}\n onSave={onSave}\n onStateChange={onStateChange}\n onOpen={onOpen}\n />\n );\n case Widget.const.WIDGET_ARTICLE_GALLERY:\n return (\n <JRCWidgetArticleGalleryEditor\n token={token}\n content={widgetWrapper.widget.content}\n onChange={onChange}\n onSave={onSave}\n onStateChange={onStateChange}\n />\n );\n case Widget.const.WIDGET_ARTICLE_TEXT:\n return (\n <JRCWidgetArticleTextEditor\n onChange={onChange}\n onSave={onSave}\n content={widgetWrapper.widget.content}\n />\n );\n case Widget.const.WIDGET_ARTICLE_IMAGE:\n return (\n <JRCWidgetArticleImageEditor\n content={widgetWrapper.widget.content}\n token={token}\n onChange={onChange}\n onSave={onSave}\n onStateChange={onStateChange}\n />\n );\n case Widget.const.WIDGET_ARTICLE_TITLE:\n return (\n <JRCWidgetArticleTitleEditor\n onChange={onChange}\n onSave={onSave}\n content={widgetWrapper.widget.content}\n onOpen={onOpen}\n />\n );\n }\n};\n","import React from 'react';\n\nimport { shallowEqual, useDispatch, useSelector } from 'react-redux';\n\nimport { WidgetEditor, Widget } from 'jamespot-front-business';\n\nimport { WidgetKeys, WidgetsRootState } from 'jamespot-user-api';\nimport { useIntl } from 'react-intl';\nimport { CSSEditorWidget, CSSEditorWidgetLabel, CSSEditorWidgetOption } from './style';\nimport { BETA_JRCDragAndDrop, JRCIcon } from 'jamespot-react-components';\nimport { WidgetList } from 'registry/coreComponents';\n\n/*\n Editor widgets (widgets)\n*/\nexport const EditorTabWidgets = ({ uniqid }: { uniqid: string; namespace: string }) => {\n const dispatch = useDispatch();\n const intl = useIntl();\n const content = useSelector((state: WidgetsRootState) => Widget.selectors.selectWidgetContent(state, uniqid));\n\n const onClick = (uniqid: string, name: WidgetKeys) => {\n /*\n Register Editor\n */\n dispatch(WidgetEditor.slice.actions.registerEditor({ uniqid, name }));\n };\n\n return (\n <div style={{ flex: 1 }}>\n <Layers uniqid={uniqid} />\n {content && content.widgets ? (\n content.widgets.map((widgetWrapper, index: number) => {\n const def = Widget.definition(widgetWrapper.widget.name);\n return (\n <div key={index}>\n <CSSEditorWidget>\n <CSSEditorWidgetLabel\n onClick={() => onClick(widgetWrapper.widget.uniqid, widgetWrapper.widget.name)}>\n {intl.formatMessage({ id: def.label })}\n </CSSEditorWidgetLabel>\n <CSSEditorWidgetOption\n onClick={() => {\n if (content.widgets) {\n dispatch(\n Widget.slice.actions.updateWidget({\n uniqid,\n content: {\n ...content,\n widgets: [\n ...content.widgets.filter((_, n: number) => n !== index),\n ],\n },\n }),\n );\n }\n }}>\n <JRCIcon name={'icon-trash'} />\n </CSSEditorWidgetOption>\n </CSSEditorWidget>\n </div>\n );\n })\n ) : (\n <></>\n )}\n </div>\n );\n};\n\nconst Layers = ({ uniqid }: { uniqid: string }) => {\n const dispatch = useDispatch();\n const layers = useSelector((state: WidgetsRootState) => state.widgets.ids[uniqid].widget.layers, shallowEqual);\n\n //const flushEditor = () => dispatch(WidgetEditor.slice.actions.flushEditor({ uniqid }));\n\n return (\n <>\n <BETA_JRCDragAndDrop\n onDrag={() => {\n //console.log(dragIndex, hoverIndex)\n }}\n renderEl={(layer, index) => {\n return <EditorWidgetLayer uniqid={layer} key={index} />;\n }}\n elms={layers ? layers : []}\n />\n <WidgetList\n namespace={'default'}\n onChange={(widget) => {\n dispatch(Widget.slice.actions.registerLayer({ uniqid, widget }));\n }}\n mode={'button'}\n />\n </>\n );\n};\n\nconst EditorWidgetLayerLock = ({ uniqid }: { uniqid: string }) => {\n const dispatch = useDispatch();\n const layer = useSelector((state: WidgetsRootState) => state.widgets.layers[uniqid]);\n return (\n <div\n onClick={() => {\n dispatch(Widget.slice.actions.updateLayer({ uniqid, props: { locked: !layer.locked } }));\n }}>\n <JRCIcon name={layer.locked ? 'icon-lock' : 'icon-unlock'} />\n </div>\n );\n};\n\nconst EditorWidgetLayerVisibility = ({ uniqid }: { uniqid: string }) => {\n const dispatch = useDispatch();\n const layer = useSelector((state: WidgetsRootState) => state.widgets.layers[uniqid]);\n return (\n <div\n onClick={() => {\n dispatch(Widget.slice.actions.updateLayer({ uniqid, props: { visible: !layer.visible } }));\n }}>\n <JRCIcon name={layer.visible ? 'icon-eye' : 'icon-eye-slash'} />\n </div>\n );\n};\n\nconst EditorWidgetLayerFlush = ({ uniqid, layerId }: { uniqid: string; layerId: string }) => {\n const dispatch = useDispatch();\n return (\n <div\n onClick={() => {\n dispatch(Widget.slice.actions.flushLayer({ uniqid, layerId }));\n }}>\n <JRCIcon name={'icon-trash'} />\n </div>\n );\n};\n\nconst EditorWidgetLayer = ({ uniqid }: { uniqid: string }) => {\n const layer = useSelector((state: WidgetsRootState) => state.widgets.layers[uniqid]);\n return (\n <>\n {layer.title}\n {layer.widgets.map((widget, index) => {\n const def = Widget.definition(widget.widget.name);\n\n return (\n <div style={{ flexDirection: 'row', display: 'flex' }} key={index}>\n <div style={{ flex: 1, alignItems: 'center' }}>{def.label}</div>\n <EditorWidgetLayerLock uniqid={uniqid} />\n <EditorWidgetLayerVisibility uniqid={uniqid} />\n <EditorWidgetLayerFlush uniqid={widget.widget.uniqid} layerId={layer.uniqid} />\n </div>\n );\n })}\n </>\n );\n};\n","import React from 'react';\n\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport JRCore from 'App';\n\nconst JRCButton = JRCore.registry.getLazyComponent('Button');\n\nimport { useIntl } from 'react-intl';\nimport { WidgetEditor, Widget } from 'jamespot-front-business';\nimport { useForm } from 'react-hook-form';\nimport { JRCInputText } from 'jamespot-react-components';\nimport { WidgetsRootState } from 'jamespot-user-api';\n\n/*\n Editor tab wrapper (this is all the properties available on a widget wrapper)\n*/\nexport const EditorTabWrapper = ({ uniqid }: { uniqid: string }) => {\n const intl = useIntl();\n const dispatch = useDispatch();\n const wrapper = useSelector((state: WidgetsRootState) => Widget.selectors.selectWidget(state, uniqid));\n const [title, setTitle] = React.useState<string | undefined>(wrapper?.title);\n\n const onClick = () => {\n if (title !== undefined) {\n /*\n Update editor\n */\n dispatch(Widget.slice.actions.updateWidgetWrapper({ uniqid, title }));\n /*\n Flush editor\n */\n dispatch(WidgetEditor.slice.actions.flushEditor({ uniqid }));\n }\n };\n\n const { control, watch } = useForm({\n defaultValues: { text: title ?? '' },\n criteriaMode: 'all',\n });\n\n React.useEffect(() => {\n const subscription = watch((data: any) => {\n setTitle(data.text);\n });\n return () => subscription.unsubscribe();\n }, [watch]);\n\n return wrapper ? (\n <div style={{ flex: 1, display: 'flex', flexDirection: 'column' }}>\n <JRCInputText\n name={'text'}\n control={control}\n placeholder={intl.formatMessage({ id: 'EDITOR_Widget_Wrapper_Title' })}></JRCInputText>\n <JRCButton onClick={onClick} variant={'outlined'} minWidth={'100%'}>\n {intl.formatMessage({ id: 'EDITOR_Save_Widget' })}\n </JRCButton>\n </div>\n ) : (\n <>No wrapper</>\n );\n};\n","import React from 'react';\n\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { Editor } from './Editor';\n\nimport JRCore from 'App';\n\nconst JRCIcon = JRCore.registry.getLazyComponent('Icon');\n\nimport {\n CSSEditor,\n CSSEditorAction,\n CSSEditorContent,\n CSSEditorHeader,\n CSSEditorLabel,\n CSSEditorMenu,\n CSSEditorMenuButton,\n} from './style';\nimport { EDITOR_WIDTH } from './const';\n\nimport { useIntl } from 'react-intl';\nimport { WidgetEditor, EditorsRootState, Widget } from 'jamespot-front-business';\nimport { EditorTabWidgets } from './EditorTabWidgets';\nimport { EditorTabWrapper } from './EditorTabWrapper';\nimport { WidgetsRootState } from 'jamespot-user-api';\n\n/*\n Editor wrapper (right part)\n*/\nexport const EditorWrapper = ({ uniqid }: { uniqid: string }) => {\n const intl = useIntl();\n const dispatch = useDispatch();\n const editor = useSelector((state: EditorsRootState) => WidgetEditor.selectors.selectEditor(state, uniqid));\n\n const def = Widget.definition(editor?.name);\n\n const [visible, isVisibile] = React.useState<boolean>(false);\n const [tab, setTab] = React.useState<string>('default');\n\n const onClose = () => {\n dispatch(WidgetEditor.slice.actions.flushEditor({ uniqid }));\n };\n\n React.useEffect(() => {\n setTimeout(() => {\n isVisibile(true);\n }, 0);\n });\n\n return editor ? (\n <div style={{ width: EDITOR_WIDTH, position: 'relative' }}>\n <CSSEditor visible={visible}>\n <CSSEditorMenu>\n {def.panel.useWrapper ? (\n <CSSEditorMenuButton on={tab === 'wrapper'} onClick={() => setTab('wrapper')}>\n <JRCIcon name=\"icon-font\" color=\"grey2\" />\n </CSSEditorMenuButton>\n ) : (\n <></>\n )}\n {def.panel.useEditor ? (\n <CSSEditorMenuButton on={tab === 'default'} onClick={() => setTab('default')}>\n <JRCIcon name=\"icon-pen\" color=\"grey2\" />\n </CSSEditorMenuButton>\n ) : (\n <></>\n )}\n {def.panel.useWidgets ? (\n <EditorConditonalTab uniqid={uniqid}>\n <CSSEditorMenuButton on={tab === 'widgets'} onClick={() => setTab('widgets')}>\n <JRCIcon name=\"icon-sliders\" color=\"grey2\" />\n </CSSEditorMenuButton>\n </EditorConditonalTab>\n ) : (\n <></>\n )}\n </CSSEditorMenu>\n <div style={{ flex: 1, display: 'flex', flexDirection: 'column' }}>\n <CSSEditorHeader>\n <EditorPositionOption uniqid={uniqid} position={editor.position}></EditorPositionOption>\n <CSSEditorLabel>{intl.formatMessage({ id: def.label })}</CSSEditorLabel>\n <CSSEditorAction>\n <CSSEditorMenuButton onClick={onClose}>\n <JRCIcon name=\"icon-times\" color=\"grey2\" />\n </CSSEditorMenuButton>\n </CSSEditorAction>\n </CSSEditorHeader>\n <CSSEditorContent>\n {tab === 'default' && def.panel.useEditor ? <Editor uniqid={editor.uniqid} /> : <></>}\n {tab === 'wrapper' && def.panel.useWrapper ? (\n <EditorTabWrapper uniqid={editor.uniqid} />\n ) : (\n <></>\n )}\n {tab === 'widgets' && def.panel.useWidgets ? (\n <EditorTabWidgets uniqid={uniqid} namespace={def.name} />\n ) : (\n <></>\n )}\n </CSSEditorContent>\n </div>\n </CSSEditor>\n {editor?.popup ? (\n <div style={{ position: 'absolute', inset: 0, backgroundColor: '#000', opacity: '.7' }}></div>\n ) : (\n <></>\n )}\n </div>\n ) : (\n <></>\n );\n};\n\nconst EditorPositionOption = ({ uniqid, position }: { uniqid: string; position: 'left' | 'right' }) => {\n const dispatch = useDispatch();\n\n const onClick = () => {\n dispatch(\n WidgetEditor.slice.actions.setEditorPosition({ uniqid, position: position === 'left' ? 'right' : 'left' }),\n );\n };\n\n return (\n <CSSEditorAction>\n <CSSEditorMenuButton onClick={onClick}>\n <JRCIcon name={position === 'left' ? 'icon-angle-right' : 'icon-angle-left'} color=\"grey2\" />\n </CSSEditorMenuButton>\n </CSSEditorAction>\n );\n};\n\nconst EditorConditonalTab = ({ uniqid, children }: { uniqid: string; children: React.ReactElement }) => {\n const widgetState = useSelector((state: WidgetsRootState) => Widget.selectors.selectWidgetState(state, uniqid));\n\n if (widgetState?.initialized) {\n return children;\n }\n\n return <></>;\n};\n","import React from 'react';\n\nimport { useSelector } from 'react-redux';\n\nimport { EDITOR_TOP, EDITOR_WIDTH } from './const';\nimport { EditorPopup } from './EditorPopup';\nimport { EditorWrapper } from './EditorWrapper';\nimport { CSSEditorPortal } from './style';\nimport { WidgetEditor } from 'jamespot-front-business';\n\nimport styled from 'styled-components';\n\nexport const CSSEditorPortalWrapper = styled.div`\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 100;\n`;\n\nexport const CSSEditorPortalPopupWrapper = styled.div<{ on: boolean }>`\n flex: 1;\n display: flex;\n margintop: ${EDITOR_TOP}px;\n pointer-events: ${(props) => (props.on ? 'all' : 'none')};\n`;\n\nexport const CSSEditorPortalRow = styled.div`\n flex: 1;\n display: flex;\n flex-direction: row;\n pointer-events: none;\n`;\n\nexport const CSSEditorPortalFreeSpace = styled.div`\n width: ${EDITOR_WIDTH}px;\n pointer-events: none;\n`;\n\n/*\n Editors wrapper (tamplate)\n*/\nexport const EditorsPortal = () => {\n const editors = useSelector(WidgetEditor.selectors.selectEditors);\n return (\n <CSSEditorPortalWrapper>\n {editors.map((editor, index: number) => {\n if (editor.position === 'left') {\n return (\n <CSSEditorPortal on={false} key={index}>\n <CSSEditorPortalRow>\n <EditorWrapper uniqid={editor.uniqid}></EditorWrapper>\n <CSSEditorPortalPopupWrapper on={editor.popup !== undefined}>\n <EditorPopup uniqid={editor.uniqid} />\n </CSSEditorPortalPopupWrapper>\n <CSSEditorPortalFreeSpace />\n </CSSEditorPortalRow>\n </CSSEditorPortal>\n );\n }\n\n return (\n <CSSEditorPortal on={false} key={index}>\n <CSSEditorPortalRow>\n <CSSEditorPortalFreeSpace />\n <CSSEditorPortalPopupWrapper on={editor.popup !== undefined}>\n <EditorPopup uniqid={editor.uniqid} />\n </CSSEditorPortalPopupWrapper>\n <EditorWrapper uniqid={editor.uniqid}></EditorWrapper>\n </CSSEditorPortalRow>\n </CSSEditorPortal>\n );\n })}\n </CSSEditorPortalWrapper>\n );\n};\n"],"names":["FormElm","props","stretch","FieldsetWrapper","DisplayForm","ref","formRef","configuration","defaultValues","useDisplay","fields","type","handleSubmit","control","reset","useForm","criteriaMode","current","scrollTo","onSubmit","map","Input","conf","key","name","dataCy","readOnly","extraInputs","buttons","Empty","Container","AppColumn","MainColumn","TwoColLayout","extensionRoute","routes","description","mode","intl","useIntl","pathname","useLocation","ROUTES_ARRAY","Object","values","activeTab","setActiveTab","tabs","tab","label","formatMessage","id","href","path","group","undefined","activeRoute","find","route","fallback","Outlet","JRCLoader","WidgetState","uniqid","inplace","state","useSelector","def","loading","style","position","inset","backgroundColor","display","flex","justifyContent","alignItems","hover","initialized","src","img","JRCWidgetArticleButton","JRCWidgetArticleGallery","JRCWidgetArticleAttachment","JRCWidgetArticleImage","JRCWidgetArticleTitle","JRCWidgetArticleText","DisplayWidget","widget","width","isComponentVisible","onClick","dispatch","useDispatch","token","onChange","content","override","onStateChange","states","Uploader","accept","multiple","JRCFormFile","WidgetInplaceUpload","initialFiles","allowAutoOpening","isActive","widgets","currentEditableWidgetId","shallowEqual","uploadRef","fileUploadStep","setFileUploadStep","fileCount","setFileCount","fileResponses","setFileResponses","fileResponse","click","mounted","JRCWidgetEmptyInplace","url","height","overflow","onUploadStart","count","prevCount","onUploadSuccess","prevStep","prevFileResponses","apiFileToWidgetFile","CSSUploadFileWrapper","WidgetInplaceWrapper","widgetWrapper","galleryFiles","files","marginTop","length","fs","Array","isArray","forEach","file","CSSWidgetLayer","opacity","pointerEvents","WidgetLayer","layers","ids","layer","index","Layer","LayerWidget","layerId","visible","locked","top","y","left","x","DraggableHandler","onMouseUp","BETA_JRCDoubleClick","onDoubleTap","children","mouseIsDown","setMouseDown","mouse","setMouse","start","setStart","child","setChild","handleMouseMove","event","dx","clientX","dy","clientY","handleMouseUp","document","addEventListener","removeEventListener","onMouseDown","nativeEvent","WidgetWrapperCore","isBusy","busy","indexOrder","editableMap","setIsComponentVisible","registerEditor","openingType","openingTypeLink","window","open","target","minWidth","CSSSquareWidgetWrapper","CSSSquareWidget","theme","color","grey2","available","CSSWidgetButton","primary","CSSWrapWidgetWrapper","CSSWrapTitle","CSSWrapWidget","JRCButton","JRCModal","WidgetList","namespace","isOpen","setOpen","getBuilderWidgets","args","title","showIconClose","portalId","isFullHeight","closeHandler","className","variant","WidgetModeArticle","CSSEditorPortal","on","CSSEditorHeader","CSSEditorAction","CSSEditorLabel","CSSEditor","white","CSSEditorContent","CSSEditorMenu","CSSEditorMenuButton","grey1","CSSEditorWidget","grey0","CSSEditorWidgetLabel","CSSEditorWidgetOption","EditorPopup","editor","popup","view","flexDirection","JRCIcon","JRCWidgetArticleTitleEditor","JRCWidgetArticleImageEditor","JRCWidgetArticleTextEditor","JRCWidgetArticleGalleryEditor","JRCWidgetArticleButtonEditor","JRCWidgetArticleAttachmentEditor","Editor","onSave","onOpen","EditorTabWidgets","Layers","filter","_","n","BETA_JRCDragAndDrop","onDrag","renderEl","EditorWidgetLayer","elms","EditorWidgetLayerLock","EditorWidgetLayerVisibility","EditorWidgetLayerFlush","EditorTabWrapper","wrapper","setTitle","watch","text","subscription","data","unsubscribe","JRCInputText","placeholder","EditorWrapper","isVisibile","setTab","setTimeout","panel","useWrapper","useEditor","useWidgets","EditorConditonalTab","EditorPositionOption","widgetState","CSSEditorPortalWrapper","CSSEditorPortalPopupWrapper","CSSEditorPortalRow","CSSEditorPortalFreeSpace","EditorsPortal","editors"],"sourceRoot":""}
|