@imperium/layout 14.3.4 → 14.5.1

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.
@@ -15,7 +15,7 @@ import styles from './styles.module.css.js';
15
15
  debug("imperium.layout.content.components.ContentComponent");
16
16
  function useDeepCompareMemoize(value) {
17
17
  const ref = useRef();
18
- if (!value && !ref.current)
18
+ if (!value)
19
19
  return ref.current;
20
20
  if (!isEqual(value, ref.current)) {
21
21
  ref.current = value;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentComponent.js","sources":["../../../../src/content/components/ContentComponent.tsx"],"sourcesContent":["import type {DefineRouteOptions} from '@imperium/router';\nimport debug from 'debug';\nimport {isEqual} from 'lodash-es';\nimport {type DependencyList, type EffectCallback, useEffect, useRef, useState} from 'react';\nimport {useDispatch} from 'react-redux';\nimport {Button} from 'semantic-ui-react';\nimport {useMediaQuery} from 'react-responsive';\nimport {DataHooks} from '../../datahooks/DataHooks';\nimport {actions} from '../../state';\nimport {sortWeightedItems} from '../../utils';\nimport {useBuildContentData} from '../hooks/useBuildContentData';\nimport type {Page, RouteParameters, SidebarItem} from '../types';\nimport {Header} from './Header';\nimport {SidebarItemWrapper} from './SidebarItemWrapper';\nimport styles from './styles.module.css';\n\nconst d = debug('imperium.layout.content.components.ContentComponent');\n\ninterface ContentComponentProps<T extends DefineRouteOptions, K extends keyof T> {\n\tpage: Page<T, K>;\n\tparams: RouteParameters<T[K]['params']>;\n}\n\nfunction useDeepCompareMemoize(value: any) {\n\tconst ref = useRef();\n\tif (!value && !ref.current) return ref.current;\n\tif (!isEqual(value, ref.current)) {\n\t\tref.current = value;\n\t}\n\treturn ref.current;\n}\n\nfunction useDeepCompareEffect(callback: EffectCallback, deps: DependencyList) {\n\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\tuseEffect(callback, deps.map(useDeepCompareMemoize));\n}\n\nexport function ContentComponent<T extends DefineRouteOptions, K extends keyof T>({page, params}: ContentComponentProps<T, K>) {\n\tconst dispatch = useDispatch();\n\tconst data = useBuildContentData({stateSelectorHook: page.stateSelectorHook, permissionSelectorHook: page.permissionSelectorHook, params});\n\tconst [visible, setVisible] = useState(true);\n\tconst isMobile = useMediaQuery({query: '(max-width: 900px)'});\n\n\tuseDeepCompareEffect(() => {\n\t\tdispatch(actions.setParams(params));\n\t}, [dispatch, params]);\n\n\tuseEffect(() => {\n\t\tif (typeof page.header === 'string') {\n\t\t\tdispatch(actions.setPageHeader(page.header));\n\t\t} else {\n\t\t\tdispatch(actions.setPageHeader(''));\n\t\t}\n\t}, [dispatch, page.header]);\n\n\tconst content = page.content(data);\n\tconst sidebarItems = sortWeightedItems(page.sidebar || []);\n\n\tconst sidebar =\n\t\tsidebarItems.length > 0 ? (\n\t\t\t<div className={`${styles.sidebar} imperiumContentSidebar`}>\n\t\t\t\t<div className={styles.sidebarButton}>\n\t\t\t\t\t<Button icon=\"angle right\" size=\"big\" onClick={() => setVisible(false)} fluid style={{paddingLeft: 0}} />\n\t\t\t\t</div>\n\t\t\t\t<div className={styles.sidebarContent}>\n\t\t\t\t\t<div className={`${styles.actionsHeader} imperiumContentSidebarHeader`}>\n\t\t\t\t\t\t<h3>Actions</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t{sidebarItems.map((sb, index) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t// eslint-disable-next-line react/no-array-index-key\n\t\t\t\t\t\t\t<div className={styles.sidebarItem} key={index}>\n\t\t\t\t\t\t\t\t<SidebarItemWrapper item={sb as SidebarItem<T, K>} params={params} data={data} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t) : null;\n\n\tconst mobileSidebar =\n\t\tsidebarItems.length > 0 ? (\n\t\t\t<div className={`${styles.sidebarMobile} imperiumContentSidebar`}>\n\t\t\t\t<div className={`${styles.actionsHeader} imperiumContentSidebarHeader`}>\n\t\t\t\t\t<h3>Actions</h3>\n\t\t\t\t</div>\n\t\t\t\t{sidebarItems.map((sb, index) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t// eslint-disable-next-line react/no-array-index-key\n\t\t\t\t\t\t<div className={styles.sidebarItem} key={index}>\n\t\t\t\t\t\t\t<SidebarItemWrapper item={sb as SidebarItem<T, K>} params={params} data={data} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t) : null;\n\n\treturn (\n\t\t<div className={`${styles.parent} imperiumContentWrapperParent`}>\n\t\t\t<div className={`${styles.wrapper} imperiumContentWrapper`}>\n\t\t\t\t<Header header={page.header} data={data} />\n\t\t\t\t<div className={`${styles.content} imperiumContent ${page.full && styles.contentFull}`}>{content}</div>\n\t\t\t</div>\n\t\t\t{isMobile && mobileSidebar}\n\t\t\t{!isMobile && (\n\t\t\t\t<>\n\t\t\t\t\t{visible && sidebar}\n\t\t\t\t\t{!visible && (\n\t\t\t\t\t\t<Button icon=\"angle left\" size=\"big\" onClick={() => setVisible(true)} className={styles.sidebarButton} style={{paddingLeft: 0}} />\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t<DataHooks dataHooks={page.dataHooks || []} />\n\t\t</div>\n\t);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAgBU,MAAM,qDAAqD,EAAA;AAOrE,SAAA,qBAAA,CAA+B,KAAY,EAAA;AAC1C,EAAA,MAAM,MAAM,MAAO,EAAA,CAAA;AACnB,EAAI,IAAA,CAAC,KAAS,IAAA,CAAC,GAAI,CAAA,OAAA;AAAS,IAAA,OAAO,GAAI,CAAA,OAAA,CAAA;AACvC,EAAA,IAAI,CAAC,OAAA,CAAQ,KAAO,EAAA,GAAA,CAAI,OAAO,CAAG,EAAA;AACjC,IAAA,GAAA,CAAI,OAAU,GAAA,KAAA,CAAA;AAAA,GACf;AACA,EAAA,OAAO,GAAI,CAAA,OAAA,CAAA;AACZ,CAAA;AAEA,S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,CAClG,CACC,EAAA,QAAA,IAAY,aACZ,EAAA,CAAC,QACD,oBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EACE,OAAW,IAAA,OAAA,EACX,CAAC,OAAA,oBACA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAO,IAAK,EAAA,YAAA;AAAA,IAAa,IAAK,EAAA,KAAA;AAAA,IAAM,OAAA,EAAS,MAAM,UAAA,CAAW,IAAI,CAAA;AAAA,IAAG,WAAW,MAAO,CAAA,aAAA;AAAA,IAAe,KAAA,EAAO,EAAC,WAAA,EAAa,CAAC,EAAA;AAAA,GAAG,CAElI,mBAEA,KAAA,CAAA,aAAA,CAAA,SAAA,EAAA;AAAA,IAAU,SAAA,EAAW,IAAK,CAAA,SAAA,IAAa,EAAC;AAAA,GAAG,CAC7C,CAAA,CAAA;AAEF;;;;"}
1
+ {"version":3,"file":"ContentComponent.js","sources":["../../../../src/content/components/ContentComponent.tsx"],"sourcesContent":["import type {DefineRouteOptions} from '@imperium/router';\nimport debug from 'debug';\nimport {isEqual} from 'lodash-es';\nimport {type DependencyList, type EffectCallback, useEffect, useRef, useState} from 'react';\nimport {useDispatch} from 'react-redux';\nimport {Button} from 'semantic-ui-react';\nimport {useMediaQuery} from 'react-responsive';\nimport {DataHooks} from '../../datahooks/DataHooks';\nimport {actions} from '../../state';\nimport {sortWeightedItems} from '../../utils';\nimport {useBuildContentData} from '../hooks/useBuildContentData';\nimport type {Page, RouteParameters, SidebarItem} from '../types';\nimport {Header} from './Header';\nimport {SidebarItemWrapper} from './SidebarItemWrapper';\nimport styles from './styles.module.css';\n\nconst d = debug('imperium.layout.content.components.ContentComponent');\n\ninterface ContentComponentProps<T extends DefineRouteOptions, K extends keyof T> {\n\tpage: Page<T, K>;\n\tparams: RouteParameters<T[K]['params']>;\n}\n\nfunction useDeepCompareMemoize(value: any) {\n\tconst ref = useRef();\n\tif (!value) return ref.current;\n\tif (!isEqual(value, ref.current)) {\n\t\tref.current = value;\n\t}\n\treturn ref.current;\n}\n\nfunction useDeepCompareEffect(callback: EffectCallback, deps: DependencyList) {\n\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\tuseEffect(callback, deps.map(useDeepCompareMemoize));\n}\n\nexport function ContentComponent<T extends DefineRouteOptions, K extends keyof T>({page, params}: ContentComponentProps<T, K>) {\n\tconst dispatch = useDispatch();\n\tconst data = useBuildContentData({stateSelectorHook: page.stateSelectorHook, permissionSelectorHook: page.permissionSelectorHook, params});\n\tconst [visible, setVisible] = useState(true);\n\tconst isMobile = useMediaQuery({query: '(max-width: 900px)'});\n\n\tuseDeepCompareEffect(() => {\n\t\tdispatch(actions.setParams(params));\n\t}, [dispatch, params]);\n\n\tuseEffect(() => {\n\t\tif (typeof page.header === 'string') {\n\t\t\tdispatch(actions.setPageHeader(page.header));\n\t\t} else {\n\t\t\tdispatch(actions.setPageHeader(''));\n\t\t}\n\t}, [dispatch, page.header]);\n\n\tconst content = page.content(data);\n\tconst sidebarItems = sortWeightedItems(page.sidebar || []);\n\n\tconst sidebar =\n\t\tsidebarItems.length > 0 ? (\n\t\t\t<div className={`${styles.sidebar} imperiumContentSidebar`}>\n\t\t\t\t<div className={styles.sidebarButton}>\n\t\t\t\t\t<Button icon=\"angle right\" size=\"big\" onClick={() => setVisible(false)} fluid style={{paddingLeft: 0}} />\n\t\t\t\t</div>\n\t\t\t\t<div className={styles.sidebarContent}>\n\t\t\t\t\t<div className={`${styles.actionsHeader} imperiumContentSidebarHeader`}>\n\t\t\t\t\t\t<h3>Actions</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t{sidebarItems.map((sb, index) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t// eslint-disable-next-line react/no-array-index-key\n\t\t\t\t\t\t\t<div className={styles.sidebarItem} key={index}>\n\t\t\t\t\t\t\t\t<SidebarItemWrapper item={sb as SidebarItem<T, K>} params={params} data={data} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t) : null;\n\n\tconst mobileSidebar =\n\t\tsidebarItems.length > 0 ? (\n\t\t\t<div className={`${styles.sidebarMobile} imperiumContentSidebar`}>\n\t\t\t\t<div className={`${styles.actionsHeader} imperiumContentSidebarHeader`}>\n\t\t\t\t\t<h3>Actions</h3>\n\t\t\t\t</div>\n\t\t\t\t{sidebarItems.map((sb, index) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t// eslint-disable-next-line react/no-array-index-key\n\t\t\t\t\t\t<div className={styles.sidebarItem} key={index}>\n\t\t\t\t\t\t\t<SidebarItemWrapper item={sb as SidebarItem<T, K>} params={params} data={data} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t) : null;\n\n\treturn (\n\t\t<div className={`${styles.parent} imperiumContentWrapperParent`}>\n\t\t\t<div className={`${styles.wrapper} imperiumContentWrapper`}>\n\t\t\t\t<Header header={page.header} data={data} />\n\t\t\t\t<div className={`${styles.content} imperiumContent ${page.full && styles.contentFull}`}>{content}</div>\n\t\t\t</div>\n\t\t\t{isMobile && mobileSidebar}\n\t\t\t{!isMobile && (\n\t\t\t\t<>\n\t\t\t\t\t{visible && sidebar}\n\t\t\t\t\t{!visible && (\n\t\t\t\t\t\t<Button icon=\"angle left\" size=\"big\" onClick={() => setVisible(true)} className={styles.sidebarButton} style={{paddingLeft: 0}} />\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t<DataHooks dataHooks={page.dataHooks || []} />\n\t\t</div>\n\t);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAgBU,MAAM,qDAAqD,EAAA;AAOrE,SAAA,qBAAA,CAA+B,KAAY,EAAA;AAC1C,EAAA,MAAM,MAAM,MAAO,EAAA,CAAA;AACnB,EAAA,IAAI,CAAC,KAAA;AAAO,IAAA,OAAO,GAAI,CAAA,OAAA,CAAA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;AAAA,GAAY,mBACxC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAI,WAAW,CAAG,EAAA,MAAA,CAAO,OAA2B,CAAA,iBAAA,EAAA,IAAA,CAAK,QAAQ,MAAO,CAAA,WAAA,CAAA,CAAA;AAAA,GAAA,EAAgB,OAAQ,CAClG,CACC,EAAA,QAAA,IAAY,aACZ,EAAA,CAAC,QACD,oBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EACE,OAAW,IAAA,OAAA,EACX,CAAC,OAAA,oBACA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAO,IAAK,EAAA,YAAA;AAAA,IAAa,IAAK,EAAA,KAAA;AAAA,IAAM,OAAA,EAAS,MAAM,UAAA,CAAW,IAAI,CAAA;AAAA,IAAG,WAAW,MAAO,CAAA,aAAA;AAAA,IAAe,KAAA,EAAO,EAAC,WAAA,EAAa,CAAC,EAAA;AAAA,GAAG,CAElI,mBAEA,KAAA,CAAA,aAAA,CAAA,SAAA,EAAA;AAAA,IAAU,SAAA,EAAW,IAAK,CAAA,SAAA,IAAa,EAAC;AAAA,GAAG,CAC7C,CAAA,CAAA;AAEF;;;;"}
@@ -22,7 +22,7 @@ function SidebarItemWrapper({ item, data: parentData, params }) {
22
22
  if (!item.visible(data))
23
23
  return null;
24
24
  } else {
25
- const q = new Query(item.visible || {});
25
+ const q = new Query(item.visible);
26
26
  if (!q.test(data))
27
27
  return null;
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarItemWrapper.js","sources":["../../../../src/content/components/SidebarItemWrapper.tsx"],"sourcesContent":["import type {DefineRouteOptions} from '@imperium/router';\nimport debug from 'debug';\nimport {Query} from 'mingo';\nimport {Divider} from 'semantic-ui-react';\nimport {useBuildContentData} from '../hooks/useBuildContentData';\nimport type {ContentData, RouteParameters, SidebarItem} from '../types';\nimport {isActionFormSidebarItem, isActionSidebarItem, isCustomSidebarItem, isDividerSidebarItem} from '../types';\nimport {ActionFormSidebarItemComponent} from './ActionFormSidebarItemComponent';\nimport {ActionSidebarItemComponent} from './ActionSidebarItemComponent';\nimport {CustomSidebarItemComponent} from './CustomSidebarItemComponent';\nimport {PlainSidebarItem} from './PlainSidebarItem';\n\nconst d = debug('imperium.layout.content.components.SidebarItemWrapper');\n\ninterface SidebarItemWrapperProps<T extends DefineRouteOptions, K extends keyof T> {\n\titem: SidebarItem<T, K>;\n\tdata?: ContentData<T, K>;\n\tparams: RouteParameters<T[K]['params']>;\n}\n\nexport function SidebarItemWrapper<T extends DefineRouteOptions, K extends keyof T>({item, data: parentData, params}: SidebarItemWrapperProps<T, K>) {\n\tconst data = useBuildContentData({\n\t\tdata: parentData,\n\t\tstateSelectorHook: item.stateSelectorHook,\n\t\tpermissionSelectorHook: item.permissionSelectorHook,\n\t\tparams,\n\t});\n\n\t// Check if visible\n\tif (item.visible) {\n\t\tif (typeof item.visible === 'function') {\n\t\t\tif (!item.visible(data)) return null;\n\t\t} else {\n\t\t\tconst q = new Query(item.visible || {});\n\t\t\tif (!q.test(data)) return null;\n\t\t}\n\t}\n\n\tif (isCustomSidebarItem(item)) {\n\t\treturn <CustomSidebarItemComponent item={item} data={data} />;\n\t}\n\n\tif (isActionSidebarItem(item)) {\n\t\t// @ts-ignore I'm not sure why this error is occurring -mk\n\t\treturn <ActionSidebarItemComponent item={item} data={data} />;\n\t}\n\n\tif (isActionFormSidebarItem(item)) {\n\t\t// @ts-ignore I'm not sure why this error is occurring -mk\n\t\treturn <ActionFormSidebarItemComponent item={item} data={data} />;\n\t}\n\n\tif (isDividerSidebarItem(item)) {\n\t\treturn <Divider />;\n\t}\n\n\t// @ts-ignore These types should work, not sure why it's not. Runtime code is fine.\n\treturn <PlainSidebarItem item={item} data={data} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAYU,MAAM,uDAAuD,EAAA;AAQhE,SAAA,kBAAA,CAA6E,EAAC,IAAA,EAAM,IAAM,EAAA,UAAA,EA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CAAQ,OAAQ,EAAA,IAAA,CAAA,CAAA;AAAA,GACjB;AAGA,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA;AAAA,IAAiB,IAAA;AAAA,IAAY,IAAA;AAAA,GAAY,CAAA,CAAA;AAClD;;;;"}
1
+ {"version":3,"file":"SidebarItemWrapper.js","sources":["../../../../src/content/components/SidebarItemWrapper.tsx"],"sourcesContent":["import type {DefineRouteOptions} from '@imperium/router';\nimport debug from 'debug';\nimport {Query} from 'mingo';\nimport {Divider} from 'semantic-ui-react';\nimport {useBuildContentData} from '../hooks/useBuildContentData';\nimport type {ContentData, RouteParameters, SidebarItem} from '../types';\nimport {isActionFormSidebarItem, isActionSidebarItem, isCustomSidebarItem, isDividerSidebarItem} from '../types';\nimport {ActionFormSidebarItemComponent} from './ActionFormSidebarItemComponent';\nimport {ActionSidebarItemComponent} from './ActionSidebarItemComponent';\nimport {CustomSidebarItemComponent} from './CustomSidebarItemComponent';\nimport {PlainSidebarItem} from './PlainSidebarItem';\n\nconst d = debug('imperium.layout.content.components.SidebarItemWrapper');\n\ninterface SidebarItemWrapperProps<T extends DefineRouteOptions, K extends keyof T> {\n\titem: SidebarItem<T, K>;\n\tdata?: ContentData<T, K>;\n\tparams: RouteParameters<T[K]['params']>;\n}\n\nexport function SidebarItemWrapper<T extends DefineRouteOptions, K extends keyof T>({item, data: parentData, params}: SidebarItemWrapperProps<T, K>) {\n\tconst data = useBuildContentData({\n\t\tdata: parentData,\n\t\tstateSelectorHook: item.stateSelectorHook,\n\t\tpermissionSelectorHook: item.permissionSelectorHook,\n\t\tparams,\n\t});\n\n\t// Check if visible\n\tif (item.visible) {\n\t\tif (typeof item.visible === 'function') {\n\t\t\tif (!item.visible(data)) return null;\n\t\t} else {\n\t\t\tconst q = new Query(item.visible);\n\t\t\tif (!q.test(data)) return null;\n\t\t}\n\t}\n\n\tif (isCustomSidebarItem(item)) {\n\t\treturn <CustomSidebarItemComponent item={item} data={data} />;\n\t}\n\n\tif (isActionSidebarItem(item)) {\n\t\t// @ts-ignore I'm not sure why this error is occurring -mk\n\t\treturn <ActionSidebarItemComponent item={item} data={data} />;\n\t}\n\n\tif (isActionFormSidebarItem(item)) {\n\t\t// @ts-ignore I'm not sure why this error is occurring -mk\n\t\treturn <ActionFormSidebarItemComponent item={item} data={data} />;\n\t}\n\n\tif (isDividerSidebarItem(item)) {\n\t\treturn <Divider />;\n\t}\n\n\t// @ts-ignore These types should work, not sure why it's not. Runtime code is fine.\n\treturn <PlainSidebarItem item={item} data={data} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAYU,MAAM,uDAAuD,EAAA;AAQhE,SAAA,kBAAA,CAA6E,EAAC,IAAA,EAAM,IAAM,EAAA,UAAA,EAAY,MAAwC,EAAA,EAAA;AACpJ,EAAA,MAAM,OAAO,mBAAoB,CAAA;AAAA,IAChC,IAAM,EAAA,UAAA;AAAA,IACN,mBAAmB,IAAK,CAAA,iBAAA;AAAA,IACxB,wBAAwB,IAAK,CAAA,sBAAA;AAAA,IAC7B,MAAA;AAAA,GACA,CAAA,CAAA;AAGD,EAAA,IAAI,KAAK,OAAS,EAAA;AACjB,IAAI,IAAA,OAAO,IAAK,CAAA,OAAA,KAAY,UAAY,EAAA;AACvC,MAAI,IAAA,CAAC,IAAK,CAAA,OAAA,CAAQ,IAAI,CAAA;AAAG,QAAO,OAAA,IAAA,CAAA;AAAA,KAC1B,MAAA;AACN,MAAA,MAAM,CAAI,GAAA,IAAI,KAAM,CAAA,IAAA,CAAK,OAAO,CAAA,CAAA;AAChC,MAAI,IAAA,CAAC,CAAE,CAAA,IAAA,CAAK,IAAI,CAAA;AAAG,QAAO,OAAA,IAAA,CAAA;AAAA,KAC3B;AAAA,GACD;AAEA,EAAI,IAAA,mBAAA,CAAoB,IAAI,CAAG,EAAA;AAC9B,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,0BAAA,EAAA;AAAA,MAA2B,IAAA;AAAA,MAAY,IAAA;AAAA,KAAY,CAAA,CAAA;AAAA,GAC5D;AAEA,EAAI,IAAA,mBAAA,CAAoB,IAAI,CAAG,EAAA;AAE9B,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,0BAAA,EAAA;AAAA,MAA2B,IAAA;AAAA,MAAY,IAAA;AAAA,KAAY,CAAA,CAAA;AAAA,GAC5D;AAEA,EAAI,IAAA,uBAAA,CAAwB,IAAI,CAAG,EAAA;AAElC,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,8BAAA,EAAA;AAAA,MAA+B,IAAA;AAAA,MAAY,IAAA;AAAA,KAAY,CAAA,CAAA;AAAA,GAChE;AAEA,EAAI,IAAA,oBAAA,CAAqB,IAAI,CAAG,EAAA;AAC/B,IAAA,2CAAQ,OAAQ,EAAA,IAAA,CAAA,CAAA;AAAA,GACjB;AAGA,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA;AAAA,IAAiB,IAAA;AAAA,IAAY,IAAA;AAAA,GAAY,CAAA,CAAA;AAClD;;;;"}
@@ -12,7 +12,7 @@ function Permissions({ permissions }) {
12
12
  useEffect(() => {
13
13
  (async function iife() {
14
14
  const permissionsWithData = permissions.map((permission) => {
15
- const data = layoutState.params && Object.keys(layoutState.params).length > 0 ? layoutState.params : void 0;
15
+ const data = Object.keys(layoutState.params).length > 0 ? layoutState.params : void 0;
16
16
  return {
17
17
  permission,
18
18
  data
@@ -1 +1 @@
1
- {"version":3,"file":"Permissions.js","sources":["../../../src/datahooks/Permissions.tsx"],"sourcesContent":["import {useAuthorization} from '@imperium/auth-client';\nimport debug from 'debug';\nimport {useEffect} from 'react';\nimport {useDispatch} from 'react-redux';\nimport {actions, useLayoutState} from '../state';\nimport type {PermissionSelector} from '../types';\n\nconst d = debug('imperium.layout.datahooks.Permissions');\n\ninterface PermissionsProps {\n\tpermissions: PermissionSelector;\n}\n\nexport function Permissions({permissions}: PermissionsProps) {\n\tconst authorization = useAuthorization();\n\tconst layoutState = useLayoutState();\n\tconst dispatch = useDispatch();\n\n\tuseEffect(() => {\n\t\t(async function iife() {\n\t\t\tconst permissionsWithData = permissions.map(permission => {\n\t\t\t\tconst data = layoutState.params && Object.keys(layoutState.params).length > 0 ? layoutState.params : undefined;\n\t\t\t\treturn {\n\t\t\t\t\tpermission,\n\t\t\t\t\tdata,\n\t\t\t\t};\n\t\t\t});\n\t\t\tpermissionsWithData.forEach(permission => {\n\t\t\t\tauthorization\n\t\t\t\t\t.can(permission)\n\t\t\t\t\t.then(result => {\n\t\t\t\t\t\tdispatch(actions.setPermission({...permission, result}));\n\t\t\t\t\t})\n\t\t\t\t\t.catch(err => d(err));\n\t\t\t});\n\t\t})().catch(err => d(err));\n\t}, [dispatch, permissions, authorization, layoutState.params]);\n\n\treturn null;\n}\n"],"names":[],"mappings":";;;;;;AAOA,MAAM,CAAA,GAAI,MAAM,uCAAuC,CAAA,CAAA;AAMhD,SAAA,WAAA,CAAqB,EAAC,WAAgC,EAAA,EAAA;AAC5D,EAAA,MAAM,gBAAgB,gBAAiB,EAAA,CAAA;AACvC,EAAA,MAAM,cAAc,cAAe,EAAA,CAAA;AACnC,EAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAE7B,EAAA,SAAA,CAAU,MAAM;AACf,IAAC,CAAsB,eAAA,IAAA,GAAA;AACtB,MAAM,MAAA,mBAAA,GAAsB,WAAY,CAAA,GAAA,CAAI,CAAc,UAAA,KAAA;AACzD,QAAM,MAAA,IAAA,GAAO,WAAY,CAAA,MAAA,IAAU,MAAO,CAAA,IAAA,CAAK,WAAY,CAAA,MAAM,CAAE,CAAA,MAAA,GAAS,CAAI,GAAA,WAAA,CAAY,MAAS,GAAA,KAAA,CAAA,CAAA;AACrG,QAAO,OAAA;AAAA,UACN,UAAA;AAAA,UACA,IAAA;AAAA,SACD,CAAA;AAAA,OACA,CAAA,CAAA;AACD,MAAA,mBAAA,CAAoB,QAAQ,CAAc,UAAA,KAAA;AACzC,QAAA,aAAA,CACE,GAAI,CAAA,UAAU,CACd,CAAA,IAAA,CAAK,CAAU,MAAA,KAAA;AACf,UAAA,QAAA,CAAS,QAAQ,aAAc,CAAA,EAAA,GAAI,UAAY,EAAA,MAAA,EAAO,CAAC,CAAA,CAAA;AAAA,SACvD,CACA,CAAA,KAAA,CAAM,CAAO,GAAA,KAAA,CAAA,CAAE,GAAG,CAAC,CAAA,CAAA;AAAA,OACrB,CAAA,CAAA;AAAA,QACG,CAAA,KAAA,CAAM,CAAO,GAAA,KAAA,CAAA,CAAE,GAAG,CAAC,CAAA,CAAA;AAAA,KACtB,CAAC,QAAA,EAAU,aAAa,aAAe,EAAA,WAAA,CAAY,MAAM,CAAC,CAAA,CAAA;AAE7D,EAAO,OAAA,IAAA,CAAA;AACR;;;;"}
1
+ {"version":3,"file":"Permissions.js","sources":["../../../src/datahooks/Permissions.tsx"],"sourcesContent":["import {useAuthorization} from '@imperium/auth-client';\nimport debug from 'debug';\nimport {useEffect} from 'react';\nimport {useDispatch} from 'react-redux';\nimport {actions, useLayoutState} from '../state';\nimport type {PermissionSelector} from '../types';\n\nconst d = debug('imperium.layout.datahooks.Permissions');\n\ninterface PermissionsProps {\n\tpermissions: PermissionSelector;\n}\n\nexport function Permissions({permissions}: PermissionsProps) {\n\tconst authorization = useAuthorization();\n\tconst layoutState = useLayoutState();\n\tconst dispatch = useDispatch();\n\n\tuseEffect(() => {\n\t\t(async function iife() {\n\t\t\tconst permissionsWithData = permissions.map(permission => {\n\t\t\t\tconst data = Object.keys(layoutState.params).length > 0 ? layoutState.params : undefined;\n\t\t\t\treturn {\n\t\t\t\t\tpermission,\n\t\t\t\t\tdata,\n\t\t\t\t};\n\t\t\t});\n\t\t\tpermissionsWithData.forEach(permission => {\n\t\t\t\tauthorization\n\t\t\t\t\t.can(permission)\n\t\t\t\t\t.then(result => {\n\t\t\t\t\t\tdispatch(actions.setPermission({...permission, result}));\n\t\t\t\t\t})\n\t\t\t\t\t.catch(err => d(err));\n\t\t\t});\n\t\t})().catch(err => d(err));\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;;"}
@@ -23,7 +23,7 @@ function LayoutItemWrapper({ item, as, vertical, data: parentData }) {
23
23
  if (!item.visible(data))
24
24
  return null;
25
25
  } else {
26
- const q = new Query(item.visible || {});
26
+ const q = new Query(item.visible);
27
27
  if (!q.test(data))
28
28
  return null;
29
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutItemWrapper.js","sources":["../../../../src/layout/components/LayoutItemWrapper.tsx"],"sourcesContent":["import debug from 'debug';\nimport {Query} from 'mingo';\nimport type {ComponentClass} from 'react';\nimport {Dropdown} from 'semantic-ui-react';\nimport {useBuildData} from '../../hooks/useBuildData';\nimport type {Data} from '../../types';\nimport {sortWeightedItems} from '../../utils';\nimport type {LayoutItem} from '../types';\nimport {isCustomLayoutItem, isDropdownLayoutItem, isMenuLayoutItem} from '../types';\nimport {CustomLayoutItemComponent} from './CustomLayoutItemComponent';\nimport {DropdownItem} from './DropdownItem';\nimport {MenuItem} from './MenuItem';\nimport {PlainItem} from './PlainItem';\n\nconst d = debug('imperium.layout.components.LayoutItemWrapper');\n\ninterface ItemWrapperProps {\n\titem: LayoutItem;\n\tas?: ComponentClass;\n\tvertical?: boolean;\n\tdata?: Data;\n}\n\n/**\n * Renders any type of Item. Gathers state, route and other data and checks for visibility.\n * @param item\n * @param as\n * @param vertical\n * @param parentData\n * @constructor\n */\nexport function LayoutItemWrapper({item, as, vertical, data: parentData}: ItemWrapperProps) {\n\tconst data = useBuildData({\n\t\tstateSelectorHook: item.stateSelectorHook,\n\t\tpermissionSelectorHook: item.permissionSelectorHook,\n\t\trouteItem: item,\n\t\tdata: parentData,\n\t});\n\n\t// Check if visible\n\tif (item.visible) {\n\t\tif (typeof item.visible === 'function') {\n\t\t\tif (!item.visible(data)) return null;\n\t\t} else {\n\t\t\tconst q = new Query(item.visible || {});\n\t\t\tif (!q.test(data)) return null;\n\t\t}\n\t}\n\n\tif (isCustomLayoutItem(item)) {\n\t\treturn <CustomLayoutItemComponent item={item} data={data} />;\n\t}\n\tif (isDropdownLayoutItem(item)) {\n\t\tconst children = sortWeightedItems(item.dropdown).map((v, index) => (\n\t\t\t// eslint-disable-next-line react/no-array-index-key\n\t\t\t<LayoutItemWrapper key={index} item={v as LayoutItem} as={Dropdown.Item} data={data} />\n\t\t));\n\t\treturn <DropdownItem item={item} children={children} vertical={vertical} data={data} />;\n\t}\n\tif (isMenuLayoutItem(item)) {\n\t\tconst children = sortWeightedItems(item.menu).map((v, index) => (\n\t\t\t// eslint-disable-next-line react/no-array-index-key\n\t\t\t<LayoutItemWrapper key={index} item={v as LayoutItem} as={Dropdown.Item} vertical={vertical} data={data} />\n\t\t));\n\t\treturn <MenuItem item={item} children={children} />;\n\t}\n\treturn <PlainItem item={item} data={data} as={as} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAcU,MAAM,8CAA8C,EAAA;AAiBvD,SAAA,iBAAA,CAA2B,EAAC,IAAA,EAAM,EAAI,EAAA,QAAA,EAAU,MAAM,UAA+B,EAAA,EAAA;AAC3F,EAAA,MAAM,OAAO,YAAa,CAAA;AAAA,IACzB,mBAAmB,IAAK,CAAA,iBAAA;AAAA,IACxB,wBAAwB,IAAK,CAAA,sBAAA;AAAA,IAC7B,SAAW,EAAA,IAAA;AAAA,IACX,IAAM,EAAA,UAAA;AAAA,GACN,CAAA,CAAA;AAGD,EAAA,IAAI,KAAK,OAAS,EAAA;AACjB,IAAI,IAAA,OAAO,IAAK,CAAA,OAAA,KAAY,UAAY,EAAA;AACvC,MAAI,IAAA,CAAC,IAAK,CAAA,OAAA,CAAQ,IAAI,CAAA;AAAG,QAAO,OAAA,IAAA,CAAA;AAAA,KAC1B,MAAA;AACN,MAAA,MAAM,IAAI,IAAI,KAAA,CAAM,IAAK,CAAA,OAAA,IAAW,EAAE,CAAA,CAAA;AACtC,MAAI,IAAA,CAAC,CAAE,CAAA,IAAA,CAAK,IAAI,CAAA;AAAG,QAAO,OAAA,IAAA,CAAA;AAAA,KAC3B;AAAA,GACD;AAEA,EAAI,IAA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,IAAA;AAAA,IAAY,IAAA;AAAA,IAAY,EAAA;AAAA,GAAQ,CAAA,CAAA;AACnD;;;;"}
1
+ {"version":3,"file":"LayoutItemWrapper.js","sources":["../../../../src/layout/components/LayoutItemWrapper.tsx"],"sourcesContent":["import debug from 'debug';\nimport {Query} from 'mingo';\nimport type {ComponentClass} from 'react';\nimport {Dropdown} from 'semantic-ui-react';\nimport {useBuildData} from '../../hooks/useBuildData';\nimport type {Data} from '../../types';\nimport {sortWeightedItems} from '../../utils';\nimport type {LayoutItem} from '../types';\nimport {isCustomLayoutItem, isDropdownLayoutItem, isMenuLayoutItem} from '../types';\nimport {CustomLayoutItemComponent} from './CustomLayoutItemComponent';\nimport {DropdownItem} from './DropdownItem';\nimport {MenuItem} from './MenuItem';\nimport {PlainItem} from './PlainItem';\n\nconst d = debug('imperium.layout.components.LayoutItemWrapper');\n\ninterface ItemWrapperProps {\n\titem: LayoutItem;\n\tas?: ComponentClass;\n\tvertical?: boolean;\n\tdata?: Data;\n}\n\n/**\n * Renders any type of Item. Gathers state, route and other data and checks for visibility.\n * @param item\n * @param as\n * @param vertical\n * @param parentData\n * @constructor\n */\nexport function LayoutItemWrapper({item, as, vertical, data: parentData}: ItemWrapperProps) {\n\tconst data = useBuildData({\n\t\tstateSelectorHook: item.stateSelectorHook,\n\t\tpermissionSelectorHook: item.permissionSelectorHook,\n\t\trouteItem: item,\n\t\tdata: parentData,\n\t});\n\n\t// Check if visible\n\tif (item.visible) {\n\t\tif (typeof item.visible === 'function') {\n\t\t\tif (!item.visible(data)) return null;\n\t\t} else {\n\t\t\tconst q = new Query(item.visible);\n\t\t\tif (!q.test(data)) return null;\n\t\t}\n\t}\n\n\tif (isCustomLayoutItem(item)) {\n\t\treturn <CustomLayoutItemComponent item={item} data={data} />;\n\t}\n\tif (isDropdownLayoutItem(item)) {\n\t\tconst children = sortWeightedItems(item.dropdown).map((v, index) => (\n\t\t\t// eslint-disable-next-line react/no-array-index-key\n\t\t\t<LayoutItemWrapper key={index} item={v as LayoutItem} as={Dropdown.Item} data={data} />\n\t\t));\n\t\treturn <DropdownItem item={item} children={children} vertical={vertical} data={data} />;\n\t}\n\tif (isMenuLayoutItem(item)) {\n\t\tconst children = sortWeightedItems(item.menu).map((v, index) => (\n\t\t\t// eslint-disable-next-line react/no-array-index-key\n\t\t\t<LayoutItemWrapper key={index} item={v as LayoutItem} as={Dropdown.Item} vertical={vertical} data={data} />\n\t\t));\n\t\treturn <MenuItem item={item} children={children} />;\n\t}\n\treturn <PlainItem item={item} data={data} as={as} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAcU,MAAM,8CAA8C,EAAA;AAiBvD,SAAA,iBAAA,CAA2B,EAAC,IAAA,EAAM,EAAI,EAAA,QAAA,EAAU,MAAM,UAA+B,EAAA,EAAA;AAC3F,EAAA,MAAM,OAAO,YAAa,CAAA;AAAA,IACzB,mBAAmB,IAAK,CAAA,iBAAA;AAAA,IACxB,wBAAwB,IAAK,CAAA,sBAAA;AAAA,IAC7B,SAAW,EAAA,IAAA;AAAA,IACX,IAAM,EAAA,UAAA;AAAA,GACN,CAAA,CAAA;AAGD,EAAA,IAAI,KAAK,OAAS,EAAA;AACjB,IAAI,IAAA,OAAO,IAAK,CAAA,OAAA,KAAY,UAAY,EAAA;AACvC,MAAI,IAAA,CAAC,IAAK,CAAA,OAAA,CAAQ,IAAI,CAAA;AAAG,QAAO,OAAA,IAAA,CAAA;AAAA,KAC1B,MAAA;AACN,MAAA,MAAM,CAAI,GAAA,IAAI,KAAM,CAAA,IAAA,CAAK,OAAO,CAAA,CAAA;AAChC,MAAI,IAAA,CAAC,CAAE,CAAA,IAAA,CAAK,IAAI,CAAA;AAAG,QAAO,OAAA,IAAA,CAAA;AAAA,KAC3B;AAAA,GACD;AAEA,EAAI,IAAA,kBAAA,CAAmB,IAAI,CAAG,EAAA;AAC7B,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,yBAAA,EAAA;AAAA,MAA0B,IAAA;AAAA,MA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  ...memo,
39
39
  {
40
40
  ...item,
41
- dropdown: [...addItems(item.dropdown, pulled), ...newItems]
41
+ dropdown: [...addItems(item.dropdown, pulled), ...newItems || []]
42
42
  }
43
43
  ];
44
44
  }
@@ -48,7 +48,7 @@ function addItems(items, pulled) {
48
48
  ...memo,
49
49
  {
50
50
  ...item,
51
- menu: [...addItems(item.menu, pulled), ...newItems]
51
+ menu: [...addItems(item.menu, pulled), ...newItems || []]
52
52
  }
53
53
  ];
54
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"moveItems.js","sources":["../../../src/layout/moveItems.ts"],"sourcesContent":["import debug from 'debug';\nimport {groupBy} from 'lodash-es';\nimport type {LayoutItem} from './types';\nimport {isDropdownLayoutItem, isMenuLayoutItem} from './types';\n\nconst d = debug('imperium.layout.moveItems');\n\nfunction pullItems(items: LayoutItem[], pulled: LayoutItem[] = []): LayoutItem[] {\n\treturn items.reduce((memo, item) => {\n\t\tif (isDropdownLayoutItem(item)) {\n\t\t\treturn [\n\t\t\t\t...memo,\n\t\t\t\t{\n\t\t\t\t\t...item,\n\t\t\t\t\tdropdown: pullItems(item.dropdown, pulled),\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\tif (isMenuLayoutItem(item)) {\n\t\t\treturn [\n\t\t\t\t...memo,\n\t\t\t\t{\n\t\t\t\t\t...item,\n\t\t\t\t\tmenu: pullItems(item.menu, pulled),\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\tif (!item.moveToKey) {\n\t\t\treturn [...memo, item];\n\t\t}\n\n\t\tpulled.push(item);\n\t\treturn memo;\n\t}, [] as LayoutItem[]);\n}\n\nfunction addItems(items: LayoutItem[], pulled: Record<string, LayoutItem[]>): LayoutItem[] {\n\treturn items.reduce((memo, item) => {\n\t\tif (isDropdownLayoutItem(item)) {\n\t\t\tconst newItems = item.key && pulled[item.key] ? pulled[item.key] : [];\n\t\t\treturn [\n\t\t\t\t...memo,\n\t\t\t\t{\n\t\t\t\t\t...item,\n\t\t\t\t\tdropdown: [...addItems(item.dropdown, pulled), ...newItems],\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\tif (isMenuLayoutItem(item) && item.key) {\n\t\t\tconst newItems = item.key && pulled[item.key] ? pulled[item.key] : [];\n\t\t\treturn [\n\t\t\t\t...memo,\n\t\t\t\t{\n\t\t\t\t\t...item,\n\t\t\t\t\tmenu: [...addItems(item.menu, pulled), ...newItems],\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn [...memo, item];\n\t}, [] as LayoutItem[]);\n}\n\nexport function moveItems(items: LayoutItem[]) {\n\tconst pulled: LayoutItem[] = [];\n\tconst itemsMinusPulled = pullItems(items, pulled);\n\treturn addItems(itemsMinusPulled, groupBy(pulled, 'moveToKey'));\n}\n"],"names":[],"mappings":";;;;AAKU,MAAM,2BAA2B,EAAA;AAE3C,SAAmB,SAAA,CAAA,KAAA,EAAqB,MAAuB,GAAA,EAAkB,EAAA;AAChF,EAAA,OAAO,KAAM,CAAA,MAAA,CAAO,CAAC,IAAA,EAAM,IAAS,KAAA;AACnC,IAAI,IAAA,oBAAA,CAAqB,IAAI,CAAG,EAAA;AAC/B,MAAO,OAAA;AAAA,QACN,GAAG,IAAA;AAAA,QACH;AAAA,UACI,GAAA,IAAA;AAAA,UACH,QAAU,EAAA,SAAA,CAAU,IAAK,CAAA,QAAA,EAAU,MAAM,CAAA;AAAA,SAC1C;AAAA,OACD,CAAA;AAAA,KACD;AAEA,IAAI,IAAA,gBAAA,CAAiB,IAAI,CAAG,EAAA;AAC3B,MAAO,OAAA;AAAA,QACN,GAAG,IAAA;AAAA,QACH;AAAA,UACI,GAAA,IAAA;AAAA,UACH,IAAM,EAAA,SAAA,CAAU,IAAK,CAAA,IAAA,EAAM,MAAM,CAAA;AAAA,SAClC;AAAA,OACD,CAAA;AAAA,KACD;AAEA,IAAI,IAAA,CAAC,KAAK,SAAW,EAAA;AACpB,MAAO,OAAA,CAAC,GAAG,IAAA,EAAM,IAAI,CAAA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mB,KAAqB,EAAA;AAC9C,EAAA,MAAM,SAAuB,EAAC,CAAA;AAC9B,EAAM,MAAA,gBAAA,GAAmB,SAAU,CAAA,KAAA,EAAO,MAAM,CAAA,CAAA;AAChD,EAAA,OAAO,QAAS,CAAA,gBAAA,EAAkB,OAAQ,CAAA,MAAA,EAAQ,WAAW,CAAC,CAAA,CAAA;AAC/D;;;;"}
1
+ {"version":3,"file":"moveItems.js","sources":["../../../src/layout/moveItems.ts"],"sourcesContent":["import debug from 'debug';\nimport {groupBy} from 'lodash-es';\nimport type {LayoutItem} from './types';\nimport {isDropdownLayoutItem, isMenuLayoutItem} from './types';\n\nconst d = debug('imperium.layout.moveItems');\n\nfunction pullItems(items: LayoutItem[], pulled: LayoutItem[] = []): LayoutItem[] {\n\treturn items.reduce((memo, item) => {\n\t\tif (isDropdownLayoutItem(item)) {\n\t\t\treturn [\n\t\t\t\t...memo,\n\t\t\t\t{\n\t\t\t\t\t...item,\n\t\t\t\t\tdropdown: pullItems(item.dropdown, pulled),\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\tif (isMenuLayoutItem(item)) {\n\t\t\treturn [\n\t\t\t\t...memo,\n\t\t\t\t{\n\t\t\t\t\t...item,\n\t\t\t\t\tmenu: pullItems(item.menu, pulled),\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\tif (!item.moveToKey) {\n\t\t\treturn [...memo, item];\n\t\t}\n\n\t\tpulled.push(item);\n\t\treturn memo;\n\t}, [] as LayoutItem[]);\n}\n\nfunction addItems(items: LayoutItem[], pulled: Record<string, LayoutItem[] | undefined>): LayoutItem[] {\n\treturn items.reduce((memo, item) => {\n\t\tif (isDropdownLayoutItem(item)) {\n\t\t\tconst newItems = item.key && pulled[item.key] ? pulled[item.key] : [];\n\t\t\treturn [\n\t\t\t\t...memo,\n\t\t\t\t{\n\t\t\t\t\t...item,\n\t\t\t\t\tdropdown: [...addItems(item.dropdown, pulled), ...(newItems || [])],\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\tif (isMenuLayoutItem(item) && item.key) {\n\t\t\tconst newItems = item.key && pulled[item.key] ? pulled[item.key] : [];\n\t\t\treturn [\n\t\t\t\t...memo,\n\t\t\t\t{\n\t\t\t\t\t...item,\n\t\t\t\t\tmenu: [...addItems(item.menu, pulled), ...(newItems || [])],\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn [...memo, item];\n\t}, [] as LayoutItem[]);\n}\n\nexport function moveItems(items: LayoutItem[]) {\n\tconst pulled: LayoutItem[] = [];\n\tconst itemsMinusPulled = pullItems(items, pulled);\n\treturn addItems(itemsMinusPulled, groupBy(pulled, 'moveToKey'));\n}\n"],"names":[],"mappings":";;;;AAKU,MAAM,2BAA2B,EAAA;AAE3C,SAAmB,SAAA,CAAA,KAAA,EAAqB,MAAuB,GAAA,EAAkB,EAAA;AAChF,EAAA,OAAO,KAAM,CAAA,MAAA,CAAO,CAAC,IAAA,EAAM,IAAS,KAAA;AACnC,IAAI,IAAA,oBAAA,CAAqB,IAAI,CAAG,EAAA;AAC/B,MAAO,OAAA;AAAA,QACN,GAAG,IAAA;AAAA,QACH;AAAA,UACI,GAAA,IAAA;AAAA,UACH,QAAU,EAAA,SAAA,CAAU,IAAK,CAAA,QAAA,EAAU,MAAM,CAAA;AAAA,SAC1C;AAAA,OACD,CAAA;AAAA,KACD;AAEA,IAAI,IAAA,gBAAA,CAAiB,IAAI,CAAG,EAAA;AAC3B,MAAO,OAAA;AAAA,QACN,GAAG,IAAA;AAAA,QACH;AAAA,UACI,GAAA,IAAA;AAAA,UACH,IAAM,EAAA,SAAA,CAAU,IAAK,CAAA,IAAA,EAAM,MAAM,CAAA;AAAA,SAClC;AAAA,OACD,CAAA;AAAA,KACD;AAEA,IAAI,IAAA,CAAC,KAAK,SAAW,EAAA;AACpB,MAAO,OAAA,CAAC,GAAG,IAAA,EAAM,IAAI,CAAA,CAAA;AAAA,KACtB;AAEA,IAAA,MAAA,CAAO,KAAK,IAAI,CAAA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A,MAAM,SAAuB,EAAC,CAAA;AAC9B,EAAM,MAAA,gBAAA,GAAmB,SAAU,CAAA,KAAA,EAAO,MAAM,CAAA,CAAA;AAChD,EAAA,OAAO,QAAS,CAAA,gBAAA,EAAkB,OAAQ,CAAA,MAAA,EAAQ,WAAW,CAAC,CAAA,CAAA;AAC/D;;;;"}
@@ -20,13 +20,13 @@ function withLayout(client) {
20
20
  const layoutModuleData = client.modules.reduce((memo, module) => {
21
21
  if (isImperiumLayoutClientModule(module)) {
22
22
  return {
23
- dataHooks: [...memo.dataHooks || [], ...module.layout.dataHooks || []],
24
- permissionSelectorHooks: [...memo.permissionSelectorHooks || [], ...module.layout.permissionSelectorHooks || []],
25
- permissions: [...memo.permissions || [], ...module.layout.permissions || []],
26
- primaryMenu: [...memo.primaryMenu || [], ...module.layout.primaryMenu || []],
27
- statusbar: [...memo.statusbar || [], ...module.layout.statusbar || []],
28
- secondaryMenu: [...memo.secondaryMenu || [], ...module.layout.secondaryMenu || []],
29
- footer: [...memo.footer || [], ...module.layout.footer || []]
23
+ dataHooks: [...memo.dataHooks, ...module.layout.dataHooks || []],
24
+ permissionSelectorHooks: [...memo.permissionSelectorHooks, ...module.layout.permissionSelectorHooks || []],
25
+ permissions: [...memo.permissions, ...module.layout.permissions || []],
26
+ primaryMenu: [...memo.primaryMenu, ...module.layout.primaryMenu || []],
27
+ statusbar: [...memo.statusbar, ...module.layout.statusbar || []],
28
+ secondaryMenu: [...memo.secondaryMenu, ...module.layout.secondaryMenu || []],
29
+ footer: [...memo.footer, ...module.layout.footer || []]
30
30
  };
31
31
  }
32
32
  return memo;
@@ -1 +1 @@
1
- {"version":3,"file":"withLayout.js","sources":["../../../src/layout/withLayout.tsx"],"sourcesContent":["import type {Hoc, ImperiumClient} from '@imperium/client';\nimport debug from 'debug';\nimport type {ComponentType} from 'react';\nimport {DataHooks} from '../datahooks/DataHooks';\nimport {PermissionHooks} from '../datahooks/PermissionHooks';\nimport {Permissions} from '../datahooks/Permissions';\nimport {isImperiumLayoutClientModule} from '../types';\nimport {Layout} from './components/Layout';\nimport type {LayoutData} from './types';\n\nconst d = debug('imperium.layout.withLayout');\n\nconst initialLayoutModuleData: Required<LayoutData> = {\n\tdataHooks: [],\n\tpermissionSelectorHooks: [],\n\tpermissions: [],\n\tprimaryMenu: [],\n\tstatusbar: [],\n\tsecondaryMenu: [],\n\tfooter: [],\n};\n\nexport function withLayout(client: ImperiumClient): Hoc {\n\tconst layoutModuleData = client.modules.reduce((memo, module) => {\n\t\tif (isImperiumLayoutClientModule(module)) {\n\t\t\treturn {\n\t\t\t\tdataHooks: [...(memo.dataHooks || []), ...(module.layout.dataHooks || [])],\n\t\t\t\tpermissionSelectorHooks: [...(memo.permissionSelectorHooks || []), ...(module.layout.permissionSelectorHooks || [])],\n\t\t\t\tpermissions: [...(memo.permissions || []), ...(module.layout.permissions || [])],\n\t\t\t\tprimaryMenu: [...(memo.primaryMenu || []), ...(module.layout.primaryMenu || [])],\n\t\t\t\tstatusbar: [...(memo.statusbar || []), ...(module.layout.statusbar || [])],\n\t\t\t\tsecondaryMenu: [...(memo.secondaryMenu || []), ...(module.layout.secondaryMenu || [])],\n\t\t\t\tfooter: [...(memo.footer || []), ...(module.layout.footer || [])],\n\t\t\t} as Required<LayoutData>;\n\t\t}\n\t\treturn memo;\n\t}, initialLayoutModuleData);\n\td('Layout items processed', layoutModuleData);\n\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treturn function layoutHoc(Wrapped: ComponentType<any>) {\n\t\tconst displayName = Wrapped.displayName || Wrapped.name || '';\n\n\t\tfunction WithLayout(props: Record<string, unknown>) {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<Layout {...layoutModuleData}>\n\t\t\t\t\t\t<Wrapped {...props} layout={layoutModuleData} />\n\t\t\t\t\t</Layout>\n\t\t\t\t\t<DataHooks dataHooks={layoutModuleData.dataHooks} />\n\t\t\t\t\t<Permissions permissions={layoutModuleData.permissions} />\n\t\t\t\t\t<PermissionHooks permissionHooks={layoutModuleData.permissionSelectorHooks} />\n\t\t\t\t</>\n\t\t\t);\n\t\t}\n\n\t\tWithLayout.displayName = `withLayout(${displayName})`;\n\n\t\treturn WithLayout;\n\t};\n}\n"],"names":[],"mappings":";;;;;;;;AAUA,MAAM,CAAA,GAAI,MAAM,4BAA4B,CAAA,CAAA;AAE5C,MAAM,uBAAgD,GAAA;AAAA,EACrD,WAAW,EAAC;AAAA,EACZ,yBAAyB,EAAC;AAAA,EAC1B,aAAa,EAAC;AAAA,EACd,aAAa,EAAC;AAAA,EACd,WAAW,EAAC;AAAA,EACZ,eAAe,EAAC;AAAA,EAChB,QAAQ,EAAC;AACV,CAAA,CAAA;AAEO,SAAA,UAAA,CAAoB,MAA6B,EAAA;AACvD,EAAA,MAAM,mBAAmB,MAAO,CAAA,OAAA,CAAQ,MAAO,CAAA,CAAC,MAAM,MAAW,KAAA;AAChE,IAAI,IAAA,4BAAA,CAA6B,MAAM,CAAG,EAAA;AACzC,MAAO,OAAA;AAAA,QACN,SAAW,EAAA,CAAC,GAAI,IAAA,CAAK,SAAa,IAAA,EAAK,EAAA,GAAI,MAAO,CAAA,MAAA,CAAO,SAAa,IAAA,EAAG,CAAA;AAAA,QACzE,uBAAyB,EAAA,CAAC,GAAI,IAAA,CAAK,uBAA2B,IAAA,EAAK,EAAA,GAAI,MAAO,CAAA,MAAA,CAAO,uBAA2B,IAAA,EAAG,CAAA;AAAA,QACnH,WAAa,EAAA,CAAC,GAAI,IAAA,CAAK,WAAe,IAAA,EAAK,EAAA,GAAI,MAAO,CAAA,MAAA,CAAO,WAAe,IAAA,EAAG,CAAA;AAAA,QAC/E,WAAa,EAAA,CAAC,GAAI,IAAA,CAAK,WAAe,IAAA,EAAK,EAAA,GAAI,MAAO,CAAA,MAAA,CAAO,WAAe,IAAA,EAAG,CAAA;AAAA,QAC/E,SAAW,EAAA,CAAC,GAAI,IAAA,CAAK,SAAa,IAAA,EAAK,EAAA,GAAI,MAAO,CAA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,IAAO,OAAA,UAAA,CAAA;AAAA,GACR,CAAA;AACD;;;;"}
1
+ {"version":3,"file":"withLayout.js","sources":["../../../src/layout/withLayout.tsx"],"sourcesContent":["import type {Hoc, ImperiumClient} from '@imperium/client';\nimport debug from 'debug';\nimport type {ComponentType} from 'react';\nimport {DataHooks} from '../datahooks/DataHooks';\nimport {PermissionHooks} from '../datahooks/PermissionHooks';\nimport {Permissions} from '../datahooks/Permissions';\nimport {isImperiumLayoutClientModule} from '../types';\nimport {Layout} from './components/Layout';\nimport type {LayoutData} from './types';\n\nconst d = debug('imperium.layout.withLayout');\n\nconst initialLayoutModuleData: Required<LayoutData> = {\n\tdataHooks: [],\n\tpermissionSelectorHooks: [],\n\tpermissions: [],\n\tprimaryMenu: [],\n\tstatusbar: [],\n\tsecondaryMenu: [],\n\tfooter: [],\n};\n\nexport function withLayout(client: ImperiumClient): Hoc {\n\tconst layoutModuleData = client.modules.reduce((memo, module) => {\n\t\tif (isImperiumLayoutClientModule(module)) {\n\t\t\treturn {\n\t\t\t\tdataHooks: [...memo.dataHooks, ...(module.layout.dataHooks || [])],\n\t\t\t\tpermissionSelectorHooks: [...memo.permissionSelectorHooks, ...(module.layout.permissionSelectorHooks || [])],\n\t\t\t\tpermissions: [...memo.permissions, ...(module.layout.permissions || [])],\n\t\t\t\tprimaryMenu: [...memo.primaryMenu, ...(module.layout.primaryMenu || [])],\n\t\t\t\tstatusbar: [...memo.statusbar, ...(module.layout.statusbar || [])],\n\t\t\t\tsecondaryMenu: [...memo.secondaryMenu, ...(module.layout.secondaryMenu || [])],\n\t\t\t\tfooter: [...memo.footer, ...(module.layout.footer || [])],\n\t\t\t} as Required<LayoutData>;\n\t\t}\n\t\treturn memo;\n\t}, initialLayoutModuleData);\n\td('Layout items processed', layoutModuleData);\n\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treturn function layoutHoc(Wrapped: ComponentType<any>) {\n\t\tconst displayName = Wrapped.displayName || Wrapped.name || '';\n\n\t\tfunction WithLayout(props: Record<string, unknown>) {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<Layout {...layoutModuleData}>\n\t\t\t\t\t\t<Wrapped {...props} layout={layoutModuleData} />\n\t\t\t\t\t</Layout>\n\t\t\t\t\t<DataHooks dataHooks={layoutModuleData.dataHooks} />\n\t\t\t\t\t<Permissions permissions={layoutModuleData.permissions} />\n\t\t\t\t\t<PermissionHooks permissionHooks={layoutModuleData.permissionSelectorHooks} />\n\t\t\t\t</>\n\t\t\t);\n\t\t}\n\n\t\tWithLayout.displayName = `withLayout(${displayName})`;\n\n\t\treturn WithLayout;\n\t};\n}\n"],"names":[],"mappings":";;;;;;;;AAUA,MAAM,CAAA,GAAI,MAAM,4BAA4B,CAAA,CAAA;AAE5C,MAAM,uBAAgD,GAAA;AAAA,EACrD,WAAW,EAAC;AAAA,EACZ,yBAAyB,EAAC;AAAA,EAC1B,aAAa,EAAC;AAAA,EACd,aAAa,EAAC;AAAA,EACd,WAAW,EAAC;AAAA,EACZ,eAAe,EAAC;AAAA,EAChB,QAAQ,EAAC;AACV,CAAA,CAAA;AAEO,SAAA,UAAA,CAAoB,MAA6B,EAAA;AACvD,EAAA,MAAM,mBAAmB,MAAO,CAAA,OAAA,CAAQ,MAAO,CAAA,CAAC,MAAM,MAAW,KAAA;AAChE,IAAI,IAAA,4BAAA,CAA6B,MAAM,CAAG,EAAA;AACzC,MAAO,OAAA;AAAA,QACN,SAAA,EAAW,CAAC,GAAG,IAAK,CAAA,SAAA,EAAW,GAAI,MAAO,CAAA,MAAA,CAAO,SAAa,IAAA,EAAG,CAAA;AAAA,QACjE,uBAAA,EAAyB,CAAC,GAAG,IAAK,CAAA,uBAAA,EAAyB,GAAI,MAAO,CAAA,MAAA,CAAO,uBAA2B,IAAA,EAAG,CAAA;AAAA,QAC3G,WAAA,EAAa,CAAC,GAAG,IAAK,CAAA,WAAA,EAAa,GAAI,MAAO,CAAA,MAAA,CAAO,WAAe,IAAA,EAAG,CAAA;A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QAAgB,iBAAiB,gBAAiB,CAAA,uBAAA;AAAA,OAAyB,CAC7E,CAAA,CAAA;AAAA,KAEF;AAEA,IAAA,UAAA,CAAW,cAAc,CAAc,WAAA,EAAA,WAAA,CAAA,CAAA,CAAA,CAAA;AAEvC,IAAO,OAAA,UAAA,CAAA;AAAA,GACR,CAAA;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../../src/types.ts"],"sourcesContent":["import type {ImperiumClientModule} from '@imperium/client';\nimport type {Location} from 'history';\nimport type {LayoutData} from './layout/types';\n\nexport type State = Record<string, any>;\n/**\n * A hook that selects from redux state.\n */\nexport type StateSelectorHook = () => State;\n\nexport type PermissionResults = Record<string, boolean>;\n\nexport type PermissionSelectorHook = (data: Data) => PermissionResults;\nexport type PermissionSelector = string[];\n\n/**\n * The visibility query can either be a mingo query or a function that returns a boolean. The data is an object with the router path merged with any state selector hook data.\n */\nexport type VisibilityQueryFn = (data: Data) => boolean;\n\nexport interface Data extends Record<string, unknown> {\n\tloc: Location;\n\troute: {\n\t\tpath: string[];\n\t\thash: string;\n\t\tsearch: Record<string, any>;\n\t};\n\tstate: State;\n\tactive: boolean;\n\tpermissions: PermissionResults;\n\tid?: string;\n}\n\nexport interface ImperiumLayoutClientModule extends ImperiumClientModule {\n\tlayout: LayoutData;\n}\n\nexport function isImperiumLayoutClientModule(module: ImperiumClientModule): module is ImperiumLayoutClientModule {\n\tconst layoutModule = module as ImperiumLayoutClientModule;\n\treturn layoutModule.layout !== undefined;\n}\n"],"names":[],"mappings":"AAqCO,SAAA,4BAAA,CAAsC,MAAoE,EAAA;AAChH,EAAA,MAAM,YAAe,GAAA,MAAA,CAAA;AACrB,EAAA,OAAO,aAAa,MAAW,KAAA,KAAA,CAAA,CAAA;AAChC;;;;"}
1
+ {"version":3,"file":"types.js","sources":["../../src/types.ts"],"sourcesContent":["import type {ImperiumClientModule} from '@imperium/client';\nimport type {Location} from 'history';\nimport type {LayoutData} from './layout/types';\n\nexport type State = Record<string, any>;\n/**\n * A hook that selects from redux state.\n */\nexport type StateSelectorHook = () => State;\n\nexport type PermissionResults = Record<string, boolean>;\n\nexport type PermissionSelectorHook = (data: Data) => PermissionResults;\nexport type PermissionSelector = string[];\n\n/**\n * The visibility query can either be a mingo query or a function that returns a boolean. The data is an object with the router path merged with any state selector hook data.\n */\nexport type VisibilityQueryFn = (data: Data) => boolean;\n\nexport interface Data extends Record<string, unknown> {\n\tloc: Location;\n\troute: {\n\t\tpath: string[];\n\t\thash: string;\n\t\tsearch: Record<string, any>;\n\t};\n\tstate: State;\n\tactive: boolean;\n\tpermissions: PermissionResults;\n\tid?: string;\n}\n\nexport interface ImperiumLayoutClientModule extends ImperiumClientModule {\n\tlayout: LayoutData;\n}\n\nexport function isImperiumLayoutClientModule(module: ImperiumClientModule): module is ImperiumLayoutClientModule {\n\tconst layoutModule = module as Partial<ImperiumLayoutClientModule>;\n\treturn layoutModule.layout !== undefined;\n}\n"],"names":[],"mappings":"AAqCO,SAAA,4BAAA,CAAsC,MAAoE,EAAA;AAChH,EAAA,MAAM,YAAe,GAAA,MAAA,CAAA;AACrB,EAAA,OAAO,aAAa,MAAW,KAAA,KAAA,CAAA,CAAA;AAChC;;;;"}
package/dist/stats.html CHANGED
@@ -2669,7 +2669,7 @@ var drawChart = (function (exports) {
2669
2669
  </script>
2670
2670
  <script>
2671
2671
  /*<!--*/
2672
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src/index.ts","uid":"4af4-1"}]},{"name":"state.js","children":[{"name":"src/state.ts","uid":"4af4-3"}]},{"name":"content/dividerSidebarItem.js","children":[{"name":"src/content/dividerSidebarItem.ts","uid":"4af4-5"}]},{"name":"layout/withLayout.js","children":[{"name":"src/layout/withLayout.tsx","uid":"4af4-7"}]},{"name":"content/createPages.js","children":[{"name":"src/content/createPages.tsx","uid":"4af4-9"}]},{"name":"types.js","children":[{"name":"src/types.ts","uid":"4af4-11"}]},{"name":"content/types.js","children":[{"name":"src/content/types.ts","uid":"4af4-13"}]},{"name":"datahooks/DataHooks.js","children":[{"name":"src/datahooks/DataHooks.tsx","uid":"4af4-15"}]},{"name":"datahooks/Permissions.js","children":[{"name":"src/datahooks/Permissions.tsx","uid":"4af4-17"}]},{"name":"datahooks/PermissionHooks.js","children":[{"name":"src/datahooks/PermissionHooks.tsx","uid":"4af4-19"}]},{"name":"content/components/ContentComponent.js","children":[{"name":"src/content/components/ContentComponent.tsx","uid":"4af4-21"}]},{"name":"layout/components/Layout.js","children":[{"name":"src/layout/components/Layout.tsx","uid":"4af4-23"}]},{"name":"datahooks/ExecuteDataHook.js","children":[{"name":"src/datahooks/ExecuteDataHook.tsx","uid":"4af4-25"}]},{"name":"datahooks/ExecutePermissionHook.js","children":[{"name":"src/datahooks/ExecutePermissionHook.tsx","uid":"4af4-27"}]},{"name":"utils.js","children":[{"name":"src/utils.ts","uid":"4af4-29"}]},{"name":"layout/moveItems.js","children":[{"name":"src/layout/moveItems.ts","uid":"4af4-31"}]},{"name":"content/components/styles.module.css.js","children":[{"name":"src/content/components/styles.module.css","uid":"4af4-33"}]},{"name":"layout/components/styles.module.css.js","children":[{"name":"src/layout/components/styles.module.css","uid":"4af4-35"}]},{"name":"content/components/Header.js","children":[{"name":"src/content/components/Header.tsx","uid":"4af4-37"}]},{"name":"content/components/SidebarItemWrapper.js","children":[{"name":"src/content/components/SidebarItemWrapper.tsx","uid":"4af4-39"}]},{"name":"layout/components/LayoutItemBar.js","children":[{"name":"src/layout/components/LayoutItemBar.tsx","uid":"4af4-41"}]},{"name":"content/hooks/useBuildContentData.js","children":[{"name":"src/content/hooks/useBuildContentData.ts","uid":"4af4-43"}]},{"name":"layout/components/SecondaryMenuToggleItem.js","children":[{"name":"src/layout/components/SecondaryMenuToggleItem.tsx","uid":"4af4-45"}]},{"name":"layout/types.js","children":[{"name":"src/layout/types.ts","uid":"4af4-47"}]},{"name":"layout/utils.js","children":[{"name":"src/layout/utils.tsx","uid":"4af4-49"}]},{"name":"hooks/useBuildData.js","children":[{"name":"src/hooks/useBuildData.ts","uid":"4af4-51"}]},{"name":"layout/components/LayoutItemWrapper.js","children":[{"name":"src/layout/components/LayoutItemWrapper.tsx","uid":"4af4-53"}]},{"name":"content/components/ActionFormSidebarItemComponent.js","children":[{"name":"src/content/components/ActionFormSidebarItemComponent.tsx","uid":"4af4-55"}]},{"name":"content/components/ActionSidebarItemComponent.js","children":[{"name":"src/content/components/ActionSidebarItemComponent.tsx","uid":"4af4-57"}]},{"name":"content/components/PlainSidebarItem.js","children":[{"name":"src/content/components/PlainSidebarItem.tsx","uid":"4af4-59"}]},{"name":"content/components/CustomSidebarItemComponent.js","children":[{"name":"src/content/components/CustomSidebarItemComponent.tsx","uid":"4af4-61"}]},{"name":"commonItems.js","children":[{"name":"src/commonItems.ts","uid":"4af4-63"}]},{"name":"hooks/useIsActiveRoute.js","children":[{"name":"src/hooks/useIsActiveRoute.ts","uid":"4af4-65"}]},{"name":"hooks/useSelectState.js","children":[{"name":"src/hooks/useSelectState.ts","uid":"4af4-67"}]},{"name":"hooks/useSelectPermission.js","children":[{"name":"src/hooks/useSelectPermission.ts","uid":"4af4-69"}]},{"name":"content/utils.js","children":[{"name":"src/content/utils.tsx","uid":"4af4-71"}]},{"name":"layout/components/CustomLayoutItemComponent.js","children":[{"name":"src/layout/components/CustomLayoutItemComponent.tsx","uid":"4af4-73"}]},{"name":"layout/components/DropdownItem.js","children":[{"name":"src/layout/components/DropdownItem.tsx","uid":"4af4-75"}]},{"name":"layout/components/MenuItem.js","children":[{"name":"src/layout/components/MenuItem.tsx","uid":"4af4-77"}]},{"name":"layout/components/PlainItem.js","children":[{"name":"src/layout/components/PlainItem.tsx","uid":"4af4-79"}]},{"name":"content/components/ActionForm.js","children":[{"name":"src/content/components/ActionForm.tsx","uid":"4af4-81"}]},{"name":"external/style-inject/dist/style-inject.es.js","children":[{"name":"home/artemis/Github/imperium/node_modules/style-inject/dist/style-inject.es.js","uid":"4af4-83"}]}],"isRoot":true},"nodeParts":{"4af4-1":{"renderedLength":144,"gzipLength":131,"brotliLength":106,"mainUid":"4af4-0"},"4af4-3":{"renderedLength":591,"gzipLength":268,"brotliLength":243,"mainUid":"4af4-2"},"4af4-5":{"renderedLength":59,"gzipLength":73,"brotliLength":63,"mainUid":"4af4-4"},"4af4-7":{"renderedLength":1955,"gzipLength":562,"brotliLength":488,"mainUid":"4af4-6"},"4af4-9":{"renderedLength":650,"gzipLength":301,"brotliLength":268,"mainUid":"4af4-8"},"4af4-11":{"renderedLength":121,"gzipLength":111,"brotliLength":90,"mainUid":"4af4-10"},"4af4-13":{"renderedLength":388,"gzipLength":167,"brotliLength":111,"mainUid":"4af4-12"},"4af4-15":{"renderedLength":1058,"gzipLength":390,"brotliLength":330,"mainUid":"4af4-14"},"4af4-17":{"renderedLength":864,"gzipLength":366,"brotliLength":318,"mainUid":"4af4-16"},"4af4-19":{"renderedLength":339,"gzipLength":202,"brotliLength":164,"mainUid":"4af4-18"},"4af4-21":{"renderedLength":3584,"gzipLength":934,"brotliLength":811,"mainUid":"4af4-20"},"4af4-23":{"renderedLength":2512,"gzipLength":751,"brotliLength":636,"mainUid":"4af4-22"},"4af4-25":{"renderedLength":123,"gzipLength":111,"brotliLength":93,"mainUid":"4af4-24"},"4af4-27":{"renderedLength":345,"gzipLength":207,"brotliLength":172,"mainUid":"4af4-26"},"4af4-29":{"renderedLength":145,"gzipLength":117,"brotliLength":116,"mainUid":"4af4-28"},"4af4-31":{"renderedLength":1401,"gzipLength":376,"brotliLength":347,"mainUid":"4af4-30"},"4af4-33":{"renderedLength":2119,"gzipLength":680,"brotliLength":565,"mainUid":"4af4-32"},"4af4-35":{"renderedLength":3176,"gzipLength":928,"brotliLength":762,"mainUid":"4af4-34"},"4af4-37":{"renderedLength":1042,"gzipLength":377,"brotliLength":323,"mainUid":"4af4-36"},"4af4-39":{"renderedLength":1189,"gzipLength":399,"brotliLength":314,"mainUid":"4af4-38"},"4af4-41":{"renderedLength":726,"gzipLength":294,"brotliLength":252,"mainUid":"4af4-40"},"4af4-43":{"renderedLength":257,"gzipLength":158,"brotliLength":122,"mainUid":"4af4-42"},"4af4-45":{"renderedLength":356,"gzipLength":233,"brotliLength":176,"mainUid":"4af4-44"},"4af4-47":{"renderedLength":191,"gzipLength":113,"brotliLength":89,"mainUid":"4af4-46"},"4af4-49":{"renderedLength":915,"gzipLength":393,"brotliLength":328,"mainUid":"4af4-48"},"4af4-51":{"renderedLength":799,"gzipLength":370,"brotliLength":330,"mainUid":"4af4-50"},"4af4-53":{"renderedLength":1503,"gzipLength":487,"brotliLength":399,"mainUid":"4af4-52"},"4af4-55":{"renderedLength":644,"gzipLength":341,"brotliLength":295,"mainUid":"4af4-54"},"4af4-57":{"renderedLength":343,"gzipLength":239,"brotliLength":181,"mainUid":"4af4-56"},"4af4-59":{"renderedLength":325,"gzipLength":230,"brotliLength":183,"mainUid":"4af4-58"},"4af4-61":{"renderedLength":83,"gzipLength":97,"brotliLength":66,"mainUid":"4af4-60"},"4af4-63":{"renderedLength":203,"gzipLength":136,"brotliLength":97,"mainUid":"4af4-62"},"4af4-65":{"renderedLength":514,"gzipLength":227,"brotliLength":187,"mainUid":"4af4-64"},"4af4-67":{"renderedLength":326,"gzipLength":176,"brotliLength":141,"mainUid":"4af4-66"},"4af4-69":{"renderedLength":294,"gzipLength":155,"brotliLength":114,"mainUid":"4af4-68"},"4af4-71":{"renderedLength":628,"gzipLength":259,"brotliLength":219,"mainUid":"4af4-70"},"4af4-73":{"renderedLength":82,"gzipLength":96,"brotliLength":66,"mainUid":"4af4-72"},"4af4-75":{"renderedLength":1179,"gzipLength":450,"brotliLength":362,"mainUid":"4af4-74"},"4af4-77":{"renderedLength":252,"gzipLength":157,"brotliLength":116,"mainUid":"4af4-76"},"4af4-79":{"renderedLength":379,"gzipLength":264,"brotliLength":224,"mainUid":"4af4-78"},"4af4-81":{"renderedLength":1667,"gzipLength":624,"brotliLength":519,"mainUid":"4af4-80"},"4af4-83":{"renderedLength":636,"gzipLength":318,"brotliLength":242,"mainUid":"4af4-82"}},"nodeMetas":{"4af4-0":{"id":"/src/index.ts","moduleParts":{"index.js":"4af4-1"},"imported":[{"uid":"4af4-6"},{"uid":"4af4-2"},{"uid":"4af4-8"},{"uid":"4af4-4"}],"importedBy":[],"isEntry":true},"4af4-2":{"id":"/src/state.ts","moduleParts":{"state.js":"4af4-3"},"imported":[{"uid":"4af4-86"},{"uid":"4af4-87"}],"importedBy":[{"uid":"4af4-0"},{"uid":"4af4-16"},{"uid":"4af4-20"},{"uid":"4af4-26"},{"uid":"4af4-50"}]},"4af4-4":{"id":"/src/content/dividerSidebarItem.ts","moduleParts":{"content/dividerSidebarItem.js":"4af4-5"},"imported":[],"importedBy":[{"uid":"4af4-0"}]},"4af4-6":{"id":"/src/layout/withLayout.tsx","moduleParts":{"layout/withLayout.js":"4af4-7"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-14"},{"uid":"4af4-18"},{"uid":"4af4-16"},{"uid":"4af4-10"},{"uid":"4af4-22"}],"importedBy":[{"uid":"4af4-0"}]},"4af4-8":{"id":"/src/content/createPages.tsx","moduleParts":{"content/createPages.js":"4af4-9"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-20"},{"uid":"4af4-12"}],"importedBy":[{"uid":"4af4-0"}]},"4af4-10":{"id":"/src/types.ts","moduleParts":{"types.js":"4af4-11"},"imported":[],"importedBy":[{"uid":"4af4-6"}]},"4af4-12":{"id":"/src/content/types.ts","moduleParts":{"content/types.js":"4af4-13"},"imported":[],"importedBy":[{"uid":"4af4-8"},{"uid":"4af4-36"},{"uid":"4af4-38"}]},"4af4-14":{"id":"/src/datahooks/DataHooks.tsx","moduleParts":{"datahooks/DataHooks.js":"4af4-15"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-88"},{"uid":"4af4-24"}],"importedBy":[{"uid":"4af4-6"},{"uid":"4af4-20"}]},"4af4-16":{"id":"/src/datahooks/Permissions.tsx","moduleParts":{"datahooks/Permissions.js":"4af4-17"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-89"},{"uid":"4af4-85"},{"uid":"4af4-90"},{"uid":"4af4-2"}],"importedBy":[{"uid":"4af4-6"}]},"4af4-18":{"id":"/src/datahooks/PermissionHooks.tsx","moduleParts":{"datahooks/PermissionHooks.js":"4af4-19"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-26"}],"importedBy":[{"uid":"4af4-6"}]},"4af4-20":{"id":"/src/content/components/ContentComponent.tsx","moduleParts":{"content/components/ContentComponent.js":"4af4-21"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-93"},{"uid":"4af4-90"},{"uid":"4af4-92"},{"uid":"4af4-91"},{"uid":"4af4-14"},{"uid":"4af4-2"},{"uid":"4af4-28"},{"uid":"4af4-42"},{"uid":"4af4-36"},{"uid":"4af4-38"},{"uid":"4af4-32"}],"importedBy":[{"uid":"4af4-8"}]},"4af4-22":{"id":"/src/layout/components/Layout.tsx","moduleParts":{"layout/components/Layout.js":"4af4-23"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-91"},{"uid":"4af4-92"},{"uid":"4af4-30"},{"uid":"4af4-40"},{"uid":"4af4-44"},{"uid":"4af4-34"}],"importedBy":[{"uid":"4af4-6"}]},"4af4-24":{"id":"/src/datahooks/ExecuteDataHook.tsx","moduleParts":{"datahooks/ExecuteDataHook.js":"4af4-25"},"imported":[{"uid":"4af4-84"}],"importedBy":[{"uid":"4af4-14"}]},"4af4-26":{"id":"/src/datahooks/ExecutePermissionHook.tsx","moduleParts":{"datahooks/ExecutePermissionHook.js":"4af4-27"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-90"},{"uid":"4af4-2"}],"importedBy":[{"uid":"4af4-18"}]},"4af4-28":{"id":"/src/utils.ts","moduleParts":{"utils.js":"4af4-29"},"imported":[{"uid":"4af4-93"}],"importedBy":[{"uid":"4af4-20"},{"uid":"4af4-40"},{"uid":"4af4-52"}]},"4af4-30":{"id":"/src/layout/moveItems.ts","moduleParts":{"layout/moveItems.js":"4af4-31"},"imported":[{"uid":"4af4-85"},{"uid":"4af4-93"},{"uid":"4af4-46"}],"importedBy":[{"uid":"4af4-22"}]},"4af4-32":{"id":"/src/content/components/styles.module.css","moduleParts":{"content/components/styles.module.css.js":"4af4-33"},"imported":[{"uid":"4af4-82"}],"importedBy":[{"uid":"4af4-20"},{"uid":"4af4-36"}]},"4af4-34":{"id":"/src/layout/components/styles.module.css","moduleParts":{"layout/components/styles.module.css.js":"4af4-35"},"imported":[{"uid":"4af4-82"}],"importedBy":[{"uid":"4af4-22"},{"uid":"4af4-44"},{"uid":"4af4-74"}]},"4af4-36":{"id":"/src/content/components/Header.tsx","moduleParts":{"content/components/Header.js":"4af4-37"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-92"},{"uid":"4af4-12"},{"uid":"4af4-32"}],"importedBy":[{"uid":"4af4-20"}]},"4af4-38":{"id":"/src/content/components/SidebarItemWrapper.tsx","moduleParts":{"content/components/SidebarItemWrapper.js":"4af4-39"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-94"},{"uid":"4af4-92"},{"uid":"4af4-42"},{"uid":"4af4-12"},{"uid":"4af4-54"},{"uid":"4af4-56"},{"uid":"4af4-60"},{"uid":"4af4-58"}],"importedBy":[{"uid":"4af4-20"}]},"4af4-40":{"id":"/src/layout/components/LayoutItemBar.tsx","moduleParts":{"layout/components/LayoutItemBar.js":"4af4-41"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-92"},{"uid":"4af4-28"},{"uid":"4af4-48"},{"uid":"4af4-52"}],"importedBy":[{"uid":"4af4-22"}]},"4af4-42":{"id":"/src/content/hooks/useBuildContentData.ts","moduleParts":{"content/hooks/useBuildContentData.js":"4af4-43"},"imported":[{"uid":"4af4-50"}],"importedBy":[{"uid":"4af4-20"},{"uid":"4af4-38"}]},"4af4-44":{"id":"/src/layout/components/SecondaryMenuToggleItem.tsx","moduleParts":{"layout/components/SecondaryMenuToggleItem.js":"4af4-45"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-92"},{"uid":"4af4-34"}],"importedBy":[{"uid":"4af4-22"}]},"4af4-46":{"id":"/src/layout/types.ts","moduleParts":{"layout/types.js":"4af4-47"},"imported":[],"importedBy":[{"uid":"4af4-30"},{"uid":"4af4-52"}]},"4af4-48":{"id":"/src/layout/utils.tsx","moduleParts":{"layout/utils.js":"4af4-49"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-88"},{"uid":"4af4-92"},{"uid":"4af4-62"}],"importedBy":[{"uid":"4af4-40"},{"uid":"4af4-74"},{"uid":"4af4-78"}]},"4af4-50":{"id":"/src/hooks/useBuildData.ts","moduleParts":{"hooks/useBuildData.js":"4af4-51"},"imported":[{"uid":"4af4-89"},{"uid":"4af4-85"},{"uid":"4af4-93"},{"uid":"4af4-88"},{"uid":"4af4-2"},{"uid":"4af4-64"},{"uid":"4af4-68"},{"uid":"4af4-66"}],"importedBy":[{"uid":"4af4-42"},{"uid":"4af4-52"}]},"4af4-52":{"id":"/src/layout/components/LayoutItemWrapper.tsx","moduleParts":{"layout/components/LayoutItemWrapper.js":"4af4-53"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-94"},{"uid":"4af4-92"},{"uid":"4af4-50"},{"uid":"4af4-28"},{"uid":"4af4-46"},{"uid":"4af4-72"},{"uid":"4af4-74"},{"uid":"4af4-76"},{"uid":"4af4-78"}],"importedBy":[{"uid":"4af4-40"}]},"4af4-54":{"id":"/src/content/components/ActionFormSidebarItemComponent.tsx","moduleParts":{"content/components/ActionFormSidebarItemComponent.js":"4af4-55"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-92"},{"uid":"4af4-70"},{"uid":"4af4-80"}],"importedBy":[{"uid":"4af4-38"}]},"4af4-56":{"id":"/src/content/components/ActionSidebarItemComponent.tsx","moduleParts":{"content/components/ActionSidebarItemComponent.js":"4af4-57"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-92"},{"uid":"4af4-70"}],"importedBy":[{"uid":"4af4-38"}]},"4af4-58":{"id":"/src/content/components/PlainSidebarItem.tsx","moduleParts":{"content/components/PlainSidebarItem.js":"4af4-59"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-88"},{"uid":"4af4-92"},{"uid":"4af4-70"}],"importedBy":[{"uid":"4af4-38"}]},"4af4-60":{"id":"/src/content/components/CustomSidebarItemComponent.tsx","moduleParts":{"content/components/CustomSidebarItemComponent.js":"4af4-61"},"imported":[{"uid":"4af4-84"}],"importedBy":[{"uid":"4af4-38"}]},"4af4-62":{"id":"/src/commonItems.ts","moduleParts":{"commonItems.js":"4af4-63"},"imported":[],"importedBy":[{"uid":"4af4-48"},{"uid":"4af4-64"}]},"4af4-64":{"id":"/src/hooks/useIsActiveRoute.ts","moduleParts":{"hooks/useIsActiveRoute.js":"4af4-65"},"imported":[{"uid":"4af4-95"},{"uid":"4af4-62"}],"importedBy":[{"uid":"4af4-50"}]},"4af4-66":{"id":"/src/hooks/useSelectState.ts","moduleParts":{"hooks/useSelectState.js":"4af4-67"},"imported":[{"uid":"4af4-93"}],"importedBy":[{"uid":"4af4-50"}]},"4af4-68":{"id":"/src/hooks/useSelectPermission.ts","moduleParts":{"hooks/useSelectPermission.js":"4af4-69"},"imported":[{"uid":"4af4-93"}],"importedBy":[{"uid":"4af4-50"}]},"4af4-70":{"id":"/src/content/utils.tsx","moduleParts":{"content/utils.js":"4af4-71"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-92"}],"importedBy":[{"uid":"4af4-54"},{"uid":"4af4-56"},{"uid":"4af4-58"}]},"4af4-72":{"id":"/src/layout/components/CustomLayoutItemComponent.tsx","moduleParts":{"layout/components/CustomLayoutItemComponent.js":"4af4-73"},"imported":[{"uid":"4af4-84"}],"importedBy":[{"uid":"4af4-52"}]},"4af4-74":{"id":"/src/layout/components/DropdownItem.tsx","moduleParts":{"layout/components/DropdownItem.js":"4af4-75"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-85"},{"uid":"4af4-92"},{"uid":"4af4-48"},{"uid":"4af4-34"}],"importedBy":[{"uid":"4af4-52"}]},"4af4-76":{"id":"/src/layout/components/MenuItem.tsx","moduleParts":{"layout/components/MenuItem.js":"4af4-77"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-92"}],"importedBy":[{"uid":"4af4-52"}]},"4af4-78":{"id":"/src/layout/components/PlainItem.tsx","moduleParts":{"layout/components/PlainItem.js":"4af4-79"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-91"},{"uid":"4af4-92"},{"uid":"4af4-48"}],"importedBy":[{"uid":"4af4-52"}]},"4af4-80":{"id":"/src/content/components/ActionForm.tsx","moduleParts":{"content/components/ActionForm.js":"4af4-81"},"imported":[{"uid":"4af4-84"},{"uid":"4af4-96"},{"uid":"4af4-85"},{"uid":"4af4-92"}],"importedBy":[{"uid":"4af4-54"}]},"4af4-82":{"id":"/home/artemis/Github/imperium/node_modules/style-inject/dist/style-inject.es.js","moduleParts":{"external/style-inject/dist/style-inject.es.js":"4af4-83"},"imported":[],"importedBy":[{"uid":"4af4-34"},{"uid":"4af4-32"}]},"4af4-84":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-6"},{"uid":"4af4-8"},{"uid":"4af4-14"},{"uid":"4af4-18"},{"uid":"4af4-16"},{"uid":"4af4-22"},{"uid":"4af4-20"},{"uid":"4af4-24"},{"uid":"4af4-26"},{"uid":"4af4-40"},{"uid":"4af4-44"},{"uid":"4af4-36"},{"uid":"4af4-38"},{"uid":"4af4-48"},{"uid":"4af4-52"},{"uid":"4af4-54"},{"uid":"4af4-56"},{"uid":"4af4-60"},{"uid":"4af4-58"},{"uid":"4af4-72"},{"uid":"4af4-74"},{"uid":"4af4-76"},{"uid":"4af4-78"},{"uid":"4af4-70"},{"uid":"4af4-80"}],"isExternal":true},"4af4-85":{"id":"debug","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-6"},{"uid":"4af4-8"},{"uid":"4af4-14"},{"uid":"4af4-18"},{"uid":"4af4-16"},{"uid":"4af4-22"},{"uid":"4af4-20"},{"uid":"4af4-30"},{"uid":"4af4-40"},{"uid":"4af4-36"},{"uid":"4af4-38"},{"uid":"4af4-52"},{"uid":"4af4-50"},{"uid":"4af4-54"},{"uid":"4af4-74"},{"uid":"4af4-80"}],"isExternal":true},"4af4-86":{"id":"@imperium/state","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-2"}],"isExternal":true},"4af4-87":{"id":"@reduxjs/toolkit","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-2"}],"isExternal":true},"4af4-88":{"id":"react-router-dom","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-14"},{"uid":"4af4-48"},{"uid":"4af4-50"},{"uid":"4af4-58"}],"isExternal":true},"4af4-89":{"id":"@imperium/auth-client","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-16"},{"uid":"4af4-50"}],"isExternal":true},"4af4-90":{"id":"react-redux","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-16"},{"uid":"4af4-20"},{"uid":"4af4-26"}],"isExternal":true},"4af4-91":{"id":"react-responsive","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-22"},{"uid":"4af4-20"},{"uid":"4af4-78"}],"isExternal":true},"4af4-92":{"id":"semantic-ui-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-22"},{"uid":"4af4-20"},{"uid":"4af4-40"},{"uid":"4af4-44"},{"uid":"4af4-36"},{"uid":"4af4-38"},{"uid":"4af4-48"},{"uid":"4af4-52"},{"uid":"4af4-54"},{"uid":"4af4-56"},{"uid":"4af4-58"},{"uid":"4af4-74"},{"uid":"4af4-76"},{"uid":"4af4-78"},{"uid":"4af4-70"},{"uid":"4af4-80"}],"isExternal":true},"4af4-93":{"id":"lodash-es","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-20"},{"uid":"4af4-30"},{"uid":"4af4-28"},{"uid":"4af4-50"},{"uid":"4af4-68"},{"uid":"4af4-66"}],"isExternal":true},"4af4-94":{"id":"mingo","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-38"},{"uid":"4af4-52"}],"isExternal":true},"4af4-95":{"id":"react-router","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-64"}],"isExternal":true},"4af4-96":{"id":"@thx/controls","moduleParts":{},"imported":[],"importedBy":[{"uid":"4af4-80"}],"isExternal":true}},"env":{"rollup":"2.79.1"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
2672
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src/index.ts","uid":"baa3-1"}]},{"name":"state.js","children":[{"name":"src/state.ts","uid":"baa3-3"}]},{"name":"content/dividerSidebarItem.js","children":[{"name":"src/content/dividerSidebarItem.ts","uid":"baa3-5"}]},{"name":"layout/withLayout.js","children":[{"name":"src/layout/withLayout.tsx","uid":"baa3-7"}]},{"name":"content/createPages.js","children":[{"name":"src/content/createPages.tsx","uid":"baa3-9"}]},{"name":"types.js","children":[{"name":"src/types.ts","uid":"baa3-11"}]},{"name":"content/types.js","children":[{"name":"src/content/types.ts","uid":"baa3-13"}]},{"name":"datahooks/DataHooks.js","children":[{"name":"src/datahooks/DataHooks.tsx","uid":"baa3-15"}]},{"name":"datahooks/Permissions.js","children":[{"name":"src/datahooks/Permissions.tsx","uid":"baa3-17"}]},{"name":"datahooks/PermissionHooks.js","children":[{"name":"src/datahooks/PermissionHooks.tsx","uid":"baa3-19"}]},{"name":"content/components/ContentComponent.js","children":[{"name":"src/content/components/ContentComponent.tsx","uid":"baa3-21"}]},{"name":"layout/components/Layout.js","children":[{"name":"src/layout/components/Layout.tsx","uid":"baa3-23"}]},{"name":"utils.js","children":[{"name":"src/utils.ts","uid":"baa3-25"}]},{"name":"datahooks/ExecuteDataHook.js","children":[{"name":"src/datahooks/ExecuteDataHook.tsx","uid":"baa3-27"}]},{"name":"datahooks/ExecutePermissionHook.js","children":[{"name":"src/datahooks/ExecutePermissionHook.tsx","uid":"baa3-29"}]},{"name":"content/components/styles.module.css.js","children":[{"name":"src/content/components/styles.module.css","uid":"baa3-31"}]},{"name":"layout/moveItems.js","children":[{"name":"src/layout/moveItems.ts","uid":"baa3-33"}]},{"name":"layout/components/styles.module.css.js","children":[{"name":"src/layout/components/styles.module.css","uid":"baa3-35"}]},{"name":"content/hooks/useBuildContentData.js","children":[{"name":"src/content/hooks/useBuildContentData.ts","uid":"baa3-37"}]},{"name":"content/components/SidebarItemWrapper.js","children":[{"name":"src/content/components/SidebarItemWrapper.tsx","uid":"baa3-39"}]},{"name":"content/components/Header.js","children":[{"name":"src/content/components/Header.tsx","uid":"baa3-41"}]},{"name":"layout/components/SecondaryMenuToggleItem.js","children":[{"name":"src/layout/components/SecondaryMenuToggleItem.tsx","uid":"baa3-43"}]},{"name":"layout/components/LayoutItemBar.js","children":[{"name":"src/layout/components/LayoutItemBar.tsx","uid":"baa3-45"}]},{"name":"layout/types.js","children":[{"name":"src/layout/types.ts","uid":"baa3-47"}]},{"name":"hooks/useBuildData.js","children":[{"name":"src/hooks/useBuildData.ts","uid":"baa3-49"}]},{"name":"layout/utils.js","children":[{"name":"src/layout/utils.tsx","uid":"baa3-51"}]},{"name":"layout/components/LayoutItemWrapper.js","children":[{"name":"src/layout/components/LayoutItemWrapper.tsx","uid":"baa3-53"}]},{"name":"content/components/CustomSidebarItemComponent.js","children":[{"name":"src/content/components/CustomSidebarItemComponent.tsx","uid":"baa3-55"}]},{"name":"content/components/ActionFormSidebarItemComponent.js","children":[{"name":"src/content/components/ActionFormSidebarItemComponent.tsx","uid":"baa3-57"}]},{"name":"content/components/ActionSidebarItemComponent.js","children":[{"name":"src/content/components/ActionSidebarItemComponent.tsx","uid":"baa3-59"}]},{"name":"content/components/PlainSidebarItem.js","children":[{"name":"src/content/components/PlainSidebarItem.tsx","uid":"baa3-61"}]},{"name":"commonItems.js","children":[{"name":"src/commonItems.ts","uid":"baa3-63"}]},{"name":"hooks/useIsActiveRoute.js","children":[{"name":"src/hooks/useIsActiveRoute.ts","uid":"baa3-65"}]},{"name":"hooks/useSelectState.js","children":[{"name":"src/hooks/useSelectState.ts","uid":"baa3-67"}]},{"name":"hooks/useSelectPermission.js","children":[{"name":"src/hooks/useSelectPermission.ts","uid":"baa3-69"}]},{"name":"content/utils.js","children":[{"name":"src/content/utils.tsx","uid":"baa3-71"}]},{"name":"layout/components/CustomLayoutItemComponent.js","children":[{"name":"src/layout/components/CustomLayoutItemComponent.tsx","uid":"baa3-73"}]},{"name":"layout/components/DropdownItem.js","children":[{"name":"src/layout/components/DropdownItem.tsx","uid":"baa3-75"}]},{"name":"layout/components/PlainItem.js","children":[{"name":"src/layout/components/PlainItem.tsx","uid":"baa3-77"}]},{"name":"layout/components/MenuItem.js","children":[{"name":"src/layout/components/MenuItem.tsx","uid":"baa3-79"}]},{"name":"content/components/ActionForm.js","children":[{"name":"src/content/components/ActionForm.tsx","uid":"baa3-81"}]},{"name":"external/style-inject/dist/style-inject.es.js","children":[{"name":"home/artemis/Github/imperium/node_modules/style-inject/dist/style-inject.es.js","uid":"baa3-83"}]}],"isRoot":true},"nodeParts":{"baa3-1":{"renderedLength":144,"gzipLength":131,"brotliLength":106,"mainUid":"baa3-0"},"baa3-3":{"renderedLength":591,"gzipLength":268,"brotliLength":243,"mainUid":"baa3-2"},"baa3-5":{"renderedLength":59,"gzipLength":73,"brotliLength":63,"mainUid":"baa3-4"},"baa3-7":{"renderedLength":1913,"gzipLength":563,"brotliLength":489,"mainUid":"baa3-6"},"baa3-9":{"renderedLength":650,"gzipLength":301,"brotliLength":268,"mainUid":"baa3-8"},"baa3-11":{"renderedLength":121,"gzipLength":111,"brotliLength":90,"mainUid":"baa3-10"},"baa3-13":{"renderedLength":388,"gzipLength":167,"brotliLength":111,"mainUid":"baa3-12"},"baa3-15":{"renderedLength":1058,"gzipLength":390,"brotliLength":330,"mainUid":"baa3-14"},"baa3-17":{"renderedLength":842,"gzipLength":361,"brotliLength":320,"mainUid":"baa3-16"},"baa3-19":{"renderedLength":339,"gzipLength":202,"brotliLength":164,"mainUid":"baa3-18"},"baa3-21":{"renderedLength":3568,"gzipLength":927,"brotliLength":804,"mainUid":"baa3-20"},"baa3-23":{"renderedLength":2512,"gzipLength":751,"brotliLength":636,"mainUid":"baa3-22"},"baa3-25":{"renderedLength":145,"gzipLength":117,"brotliLength":116,"mainUid":"baa3-24"},"baa3-27":{"renderedLength":123,"gzipLength":111,"brotliLength":93,"mainUid":"baa3-26"},"baa3-29":{"renderedLength":345,"gzipLength":207,"brotliLength":172,"mainUid":"baa3-28"},"baa3-31":{"renderedLength":2119,"gzipLength":680,"brotliLength":565,"mainUid":"baa3-30"},"baa3-33":{"renderedLength":1413,"gzipLength":381,"brotliLength":359,"mainUid":"baa3-32"},"baa3-35":{"renderedLength":3176,"gzipLength":928,"brotliLength":762,"mainUid":"baa3-34"},"baa3-37":{"renderedLength":257,"gzipLength":158,"brotliLength":122,"mainUid":"baa3-36"},"baa3-39":{"renderedLength":1183,"gzipLength":394,"brotliLength":310,"mainUid":"baa3-38"},"baa3-41":{"renderedLength":1042,"gzipLength":377,"brotliLength":323,"mainUid":"baa3-40"},"baa3-43":{"renderedLength":356,"gzipLength":233,"brotliLength":176,"mainUid":"baa3-42"},"baa3-45":{"renderedLength":726,"gzipLength":294,"brotliLength":252,"mainUid":"baa3-44"},"baa3-47":{"renderedLength":191,"gzipLength":113,"brotliLength":89,"mainUid":"baa3-46"},"baa3-49":{"renderedLength":799,"gzipLength":370,"brotliLength":330,"mainUid":"baa3-48"},"baa3-51":{"renderedLength":915,"gzipLength":393,"brotliLength":328,"mainUid":"baa3-50"},"baa3-53":{"renderedLength":1497,"gzipLength":481,"brotliLength":413,"mainUid":"baa3-52"},"baa3-55":{"renderedLength":83,"gzipLength":97,"brotliLength":66,"mainUid":"baa3-54"},"baa3-57":{"renderedLength":644,"gzipLength":341,"brotliLength":295,"mainUid":"baa3-56"},"baa3-59":{"renderedLength":343,"gzipLength":239,"brotliLength":181,"mainUid":"baa3-58"},"baa3-61":{"renderedLength":325,"gzipLength":230,"brotliLength":183,"mainUid":"baa3-60"},"baa3-63":{"renderedLength":203,"gzipLength":136,"brotliLength":97,"mainUid":"baa3-62"},"baa3-65":{"renderedLength":514,"gzipLength":227,"brotliLength":187,"mainUid":"baa3-64"},"baa3-67":{"renderedLength":326,"gzipLength":176,"brotliLength":141,"mainUid":"baa3-66"},"baa3-69":{"renderedLength":294,"gzipLength":155,"brotliLength":114,"mainUid":"baa3-68"},"baa3-71":{"renderedLength":628,"gzipLength":259,"brotliLength":219,"mainUid":"baa3-70"},"baa3-73":{"renderedLength":82,"gzipLength":96,"brotliLength":66,"mainUid":"baa3-72"},"baa3-75":{"renderedLength":1179,"gzipLength":450,"brotliLength":362,"mainUid":"baa3-74"},"baa3-77":{"renderedLength":379,"gzipLength":264,"brotliLength":224,"mainUid":"baa3-76"},"baa3-79":{"renderedLength":252,"gzipLength":157,"brotliLength":116,"mainUid":"baa3-78"},"baa3-81":{"renderedLength":1667,"gzipLength":624,"brotliLength":519,"mainUid":"baa3-80"},"baa3-83":{"renderedLength":636,"gzipLength":318,"brotliLength":242,"mainUid":"baa3-82"}},"nodeMetas":{"baa3-0":{"id":"/src/index.ts","moduleParts":{"index.js":"baa3-1"},"imported":[{"uid":"baa3-6"},{"uid":"baa3-2"},{"uid":"baa3-8"},{"uid":"baa3-4"}],"importedBy":[],"isEntry":true},"baa3-2":{"id":"/src/state.ts","moduleParts":{"state.js":"baa3-3"},"imported":[{"uid":"baa3-86"},{"uid":"baa3-87"}],"importedBy":[{"uid":"baa3-0"},{"uid":"baa3-16"},{"uid":"baa3-20"},{"uid":"baa3-28"},{"uid":"baa3-48"}]},"baa3-4":{"id":"/src/content/dividerSidebarItem.ts","moduleParts":{"content/dividerSidebarItem.js":"baa3-5"},"imported":[],"importedBy":[{"uid":"baa3-0"}]},"baa3-6":{"id":"/src/layout/withLayout.tsx","moduleParts":{"layout/withLayout.js":"baa3-7"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-14"},{"uid":"baa3-18"},{"uid":"baa3-16"},{"uid":"baa3-10"},{"uid":"baa3-22"}],"importedBy":[{"uid":"baa3-0"}]},"baa3-8":{"id":"/src/content/createPages.tsx","moduleParts":{"content/createPages.js":"baa3-9"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-20"},{"uid":"baa3-12"}],"importedBy":[{"uid":"baa3-0"}]},"baa3-10":{"id":"/src/types.ts","moduleParts":{"types.js":"baa3-11"},"imported":[],"importedBy":[{"uid":"baa3-6"}]},"baa3-12":{"id":"/src/content/types.ts","moduleParts":{"content/types.js":"baa3-13"},"imported":[],"importedBy":[{"uid":"baa3-8"},{"uid":"baa3-40"},{"uid":"baa3-38"}]},"baa3-14":{"id":"/src/datahooks/DataHooks.tsx","moduleParts":{"datahooks/DataHooks.js":"baa3-15"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-88"},{"uid":"baa3-26"}],"importedBy":[{"uid":"baa3-6"},{"uid":"baa3-20"}]},"baa3-16":{"id":"/src/datahooks/Permissions.tsx","moduleParts":{"datahooks/Permissions.js":"baa3-17"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-89"},{"uid":"baa3-85"},{"uid":"baa3-90"},{"uid":"baa3-2"}],"importedBy":[{"uid":"baa3-6"}]},"baa3-18":{"id":"/src/datahooks/PermissionHooks.tsx","moduleParts":{"datahooks/PermissionHooks.js":"baa3-19"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-28"}],"importedBy":[{"uid":"baa3-6"}]},"baa3-20":{"id":"/src/content/components/ContentComponent.tsx","moduleParts":{"content/components/ContentComponent.js":"baa3-21"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-93"},{"uid":"baa3-90"},{"uid":"baa3-92"},{"uid":"baa3-91"},{"uid":"baa3-14"},{"uid":"baa3-2"},{"uid":"baa3-24"},{"uid":"baa3-36"},{"uid":"baa3-40"},{"uid":"baa3-38"},{"uid":"baa3-30"}],"importedBy":[{"uid":"baa3-8"}]},"baa3-22":{"id":"/src/layout/components/Layout.tsx","moduleParts":{"layout/components/Layout.js":"baa3-23"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-91"},{"uid":"baa3-92"},{"uid":"baa3-32"},{"uid":"baa3-44"},{"uid":"baa3-42"},{"uid":"baa3-34"}],"importedBy":[{"uid":"baa3-6"}]},"baa3-24":{"id":"/src/utils.ts","moduleParts":{"utils.js":"baa3-25"},"imported":[{"uid":"baa3-93"}],"importedBy":[{"uid":"baa3-20"},{"uid":"baa3-44"},{"uid":"baa3-52"}]},"baa3-26":{"id":"/src/datahooks/ExecuteDataHook.tsx","moduleParts":{"datahooks/ExecuteDataHook.js":"baa3-27"},"imported":[{"uid":"baa3-84"}],"importedBy":[{"uid":"baa3-14"}]},"baa3-28":{"id":"/src/datahooks/ExecutePermissionHook.tsx","moduleParts":{"datahooks/ExecutePermissionHook.js":"baa3-29"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-90"},{"uid":"baa3-2"}],"importedBy":[{"uid":"baa3-18"}]},"baa3-30":{"id":"/src/content/components/styles.module.css","moduleParts":{"content/components/styles.module.css.js":"baa3-31"},"imported":[{"uid":"baa3-82"}],"importedBy":[{"uid":"baa3-20"},{"uid":"baa3-40"}]},"baa3-32":{"id":"/src/layout/moveItems.ts","moduleParts":{"layout/moveItems.js":"baa3-33"},"imported":[{"uid":"baa3-85"},{"uid":"baa3-93"},{"uid":"baa3-46"}],"importedBy":[{"uid":"baa3-22"}]},"baa3-34":{"id":"/src/layout/components/styles.module.css","moduleParts":{"layout/components/styles.module.css.js":"baa3-35"},"imported":[{"uid":"baa3-82"}],"importedBy":[{"uid":"baa3-22"},{"uid":"baa3-42"},{"uid":"baa3-74"}]},"baa3-36":{"id":"/src/content/hooks/useBuildContentData.ts","moduleParts":{"content/hooks/useBuildContentData.js":"baa3-37"},"imported":[{"uid":"baa3-48"}],"importedBy":[{"uid":"baa3-20"},{"uid":"baa3-38"}]},"baa3-38":{"id":"/src/content/components/SidebarItemWrapper.tsx","moduleParts":{"content/components/SidebarItemWrapper.js":"baa3-39"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-94"},{"uid":"baa3-92"},{"uid":"baa3-36"},{"uid":"baa3-12"},{"uid":"baa3-56"},{"uid":"baa3-58"},{"uid":"baa3-54"},{"uid":"baa3-60"}],"importedBy":[{"uid":"baa3-20"}]},"baa3-40":{"id":"/src/content/components/Header.tsx","moduleParts":{"content/components/Header.js":"baa3-41"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-92"},{"uid":"baa3-12"},{"uid":"baa3-30"}],"importedBy":[{"uid":"baa3-20"}]},"baa3-42":{"id":"/src/layout/components/SecondaryMenuToggleItem.tsx","moduleParts":{"layout/components/SecondaryMenuToggleItem.js":"baa3-43"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-92"},{"uid":"baa3-34"}],"importedBy":[{"uid":"baa3-22"}]},"baa3-44":{"id":"/src/layout/components/LayoutItemBar.tsx","moduleParts":{"layout/components/LayoutItemBar.js":"baa3-45"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-92"},{"uid":"baa3-24"},{"uid":"baa3-50"},{"uid":"baa3-52"}],"importedBy":[{"uid":"baa3-22"}]},"baa3-46":{"id":"/src/layout/types.ts","moduleParts":{"layout/types.js":"baa3-47"},"imported":[],"importedBy":[{"uid":"baa3-32"},{"uid":"baa3-52"}]},"baa3-48":{"id":"/src/hooks/useBuildData.ts","moduleParts":{"hooks/useBuildData.js":"baa3-49"},"imported":[{"uid":"baa3-89"},{"uid":"baa3-85"},{"uid":"baa3-93"},{"uid":"baa3-88"},{"uid":"baa3-2"},{"uid":"baa3-64"},{"uid":"baa3-68"},{"uid":"baa3-66"}],"importedBy":[{"uid":"baa3-36"},{"uid":"baa3-52"}]},"baa3-50":{"id":"/src/layout/utils.tsx","moduleParts":{"layout/utils.js":"baa3-51"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-88"},{"uid":"baa3-92"},{"uid":"baa3-62"}],"importedBy":[{"uid":"baa3-44"},{"uid":"baa3-74"},{"uid":"baa3-76"}]},"baa3-52":{"id":"/src/layout/components/LayoutItemWrapper.tsx","moduleParts":{"layout/components/LayoutItemWrapper.js":"baa3-53"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-94"},{"uid":"baa3-92"},{"uid":"baa3-48"},{"uid":"baa3-24"},{"uid":"baa3-46"},{"uid":"baa3-72"},{"uid":"baa3-74"},{"uid":"baa3-78"},{"uid":"baa3-76"}],"importedBy":[{"uid":"baa3-44"}]},"baa3-54":{"id":"/src/content/components/CustomSidebarItemComponent.tsx","moduleParts":{"content/components/CustomSidebarItemComponent.js":"baa3-55"},"imported":[{"uid":"baa3-84"}],"importedBy":[{"uid":"baa3-38"}]},"baa3-56":{"id":"/src/content/components/ActionFormSidebarItemComponent.tsx","moduleParts":{"content/components/ActionFormSidebarItemComponent.js":"baa3-57"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-92"},{"uid":"baa3-70"},{"uid":"baa3-80"}],"importedBy":[{"uid":"baa3-38"}]},"baa3-58":{"id":"/src/content/components/ActionSidebarItemComponent.tsx","moduleParts":{"content/components/ActionSidebarItemComponent.js":"baa3-59"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-92"},{"uid":"baa3-70"}],"importedBy":[{"uid":"baa3-38"}]},"baa3-60":{"id":"/src/content/components/PlainSidebarItem.tsx","moduleParts":{"content/components/PlainSidebarItem.js":"baa3-61"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-88"},{"uid":"baa3-92"},{"uid":"baa3-70"}],"importedBy":[{"uid":"baa3-38"}]},"baa3-62":{"id":"/src/commonItems.ts","moduleParts":{"commonItems.js":"baa3-63"},"imported":[],"importedBy":[{"uid":"baa3-50"},{"uid":"baa3-64"}]},"baa3-64":{"id":"/src/hooks/useIsActiveRoute.ts","moduleParts":{"hooks/useIsActiveRoute.js":"baa3-65"},"imported":[{"uid":"baa3-95"},{"uid":"baa3-62"}],"importedBy":[{"uid":"baa3-48"}]},"baa3-66":{"id":"/src/hooks/useSelectState.ts","moduleParts":{"hooks/useSelectState.js":"baa3-67"},"imported":[{"uid":"baa3-93"}],"importedBy":[{"uid":"baa3-48"}]},"baa3-68":{"id":"/src/hooks/useSelectPermission.ts","moduleParts":{"hooks/useSelectPermission.js":"baa3-69"},"imported":[{"uid":"baa3-93"}],"importedBy":[{"uid":"baa3-48"}]},"baa3-70":{"id":"/src/content/utils.tsx","moduleParts":{"content/utils.js":"baa3-71"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-92"}],"importedBy":[{"uid":"baa3-56"},{"uid":"baa3-58"},{"uid":"baa3-60"}]},"baa3-72":{"id":"/src/layout/components/CustomLayoutItemComponent.tsx","moduleParts":{"layout/components/CustomLayoutItemComponent.js":"baa3-73"},"imported":[{"uid":"baa3-84"}],"importedBy":[{"uid":"baa3-52"}]},"baa3-74":{"id":"/src/layout/components/DropdownItem.tsx","moduleParts":{"layout/components/DropdownItem.js":"baa3-75"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-85"},{"uid":"baa3-92"},{"uid":"baa3-50"},{"uid":"baa3-34"}],"importedBy":[{"uid":"baa3-52"}]},"baa3-76":{"id":"/src/layout/components/PlainItem.tsx","moduleParts":{"layout/components/PlainItem.js":"baa3-77"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-91"},{"uid":"baa3-92"},{"uid":"baa3-50"}],"importedBy":[{"uid":"baa3-52"}]},"baa3-78":{"id":"/src/layout/components/MenuItem.tsx","moduleParts":{"layout/components/MenuItem.js":"baa3-79"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-92"}],"importedBy":[{"uid":"baa3-52"}]},"baa3-80":{"id":"/src/content/components/ActionForm.tsx","moduleParts":{"content/components/ActionForm.js":"baa3-81"},"imported":[{"uid":"baa3-84"},{"uid":"baa3-96"},{"uid":"baa3-85"},{"uid":"baa3-92"}],"importedBy":[{"uid":"baa3-56"}]},"baa3-82":{"id":"/home/artemis/Github/imperium/node_modules/style-inject/dist/style-inject.es.js","moduleParts":{"external/style-inject/dist/style-inject.es.js":"baa3-83"},"imported":[],"importedBy":[{"uid":"baa3-34"},{"uid":"baa3-30"}]},"baa3-84":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-6"},{"uid":"baa3-8"},{"uid":"baa3-14"},{"uid":"baa3-18"},{"uid":"baa3-16"},{"uid":"baa3-22"},{"uid":"baa3-20"},{"uid":"baa3-26"},{"uid":"baa3-28"},{"uid":"baa3-44"},{"uid":"baa3-42"},{"uid":"baa3-40"},{"uid":"baa3-38"},{"uid":"baa3-50"},{"uid":"baa3-52"},{"uid":"baa3-56"},{"uid":"baa3-58"},{"uid":"baa3-54"},{"uid":"baa3-60"},{"uid":"baa3-72"},{"uid":"baa3-74"},{"uid":"baa3-78"},{"uid":"baa3-76"},{"uid":"baa3-70"},{"uid":"baa3-80"}],"isExternal":true},"baa3-85":{"id":"debug","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-6"},{"uid":"baa3-8"},{"uid":"baa3-14"},{"uid":"baa3-18"},{"uid":"baa3-16"},{"uid":"baa3-22"},{"uid":"baa3-20"},{"uid":"baa3-32"},{"uid":"baa3-44"},{"uid":"baa3-40"},{"uid":"baa3-38"},{"uid":"baa3-52"},{"uid":"baa3-48"},{"uid":"baa3-56"},{"uid":"baa3-74"},{"uid":"baa3-80"}],"isExternal":true},"baa3-86":{"id":"@imperium/state","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-2"}],"isExternal":true},"baa3-87":{"id":"@reduxjs/toolkit","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-2"}],"isExternal":true},"baa3-88":{"id":"react-router-dom","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-14"},{"uid":"baa3-50"},{"uid":"baa3-48"},{"uid":"baa3-60"}],"isExternal":true},"baa3-89":{"id":"@imperium/auth-client","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-16"},{"uid":"baa3-48"}],"isExternal":true},"baa3-90":{"id":"react-redux","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-16"},{"uid":"baa3-20"},{"uid":"baa3-28"}],"isExternal":true},"baa3-91":{"id":"react-responsive","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-22"},{"uid":"baa3-20"},{"uid":"baa3-76"}],"isExternal":true},"baa3-92":{"id":"semantic-ui-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-22"},{"uid":"baa3-20"},{"uid":"baa3-44"},{"uid":"baa3-42"},{"uid":"baa3-40"},{"uid":"baa3-38"},{"uid":"baa3-50"},{"uid":"baa3-52"},{"uid":"baa3-56"},{"uid":"baa3-58"},{"uid":"baa3-60"},{"uid":"baa3-74"},{"uid":"baa3-78"},{"uid":"baa3-76"},{"uid":"baa3-70"},{"uid":"baa3-80"}],"isExternal":true},"baa3-93":{"id":"lodash-es","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-20"},{"uid":"baa3-32"},{"uid":"baa3-24"},{"uid":"baa3-48"},{"uid":"baa3-68"},{"uid":"baa3-66"}],"isExternal":true},"baa3-94":{"id":"mingo","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-38"},{"uid":"baa3-52"}],"isExternal":true},"baa3-95":{"id":"react-router","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-64"}],"isExternal":true},"baa3-96":{"id":"@thx/controls","moduleParts":{},"imported":[],"importedBy":[{"uid":"baa3-80"}],"isExternal":true}},"env":{"rollup":"2.79.1"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
2673
2673
 
2674
2674
  const run = () => {
2675
2675
  const width = window.innerWidth;
package/dist/stats.txt ADDED
@@ -0,0 +1,92 @@
1
+ -----------------------------
2
+ Rollup File Analysis
3
+ -----------------------------
4
+ bundle size: 34.027 KB
5
+ original size: 53.624 KB
6
+ code reduction: 36.55 %
7
+ module count: 42
8
+
9
+ /src/content/components/ContentComponent.tsx
10
+ █████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 10.49 % (3.568 KB)
11
+ /src/layout/components/styles.module.css
12
+ ████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 9.33 % (3.176 KB)
13
+ /src/layout/components/Layout.tsx
14
+ ███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 7.38 % (2.512 KB)
15
+ /src/content/components/styles.module.css
16
+ ███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 6.23 % (2.119 KB)
17
+ /src/layout/withLayout.tsx
18
+ ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 5.62 % (1.913 KB)
19
+ /src/content/components/ActionForm.tsx
20
+ ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 4.9 % (1.667 KB)
21
+ /src/layout/components/LayoutItemWrapper.tsx
22
+ ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 4.4 % (1.497 KB)
23
+ /src/layout/moveItems.ts
24
+ ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 4.15 % (1.413 KB)
25
+ /src/content/components/SidebarItemWrapper.tsx
26
+ █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.48 % (1.183 KB)
27
+ /src/layout/components/DropdownItem.tsx
28
+ █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.46 % (1.179 KB)
29
+ /src/datahooks/DataHooks.tsx
30
+ █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.11 % (1.058 KB)
31
+ /src/content/components/Header.tsx
32
+ █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.06 % (1.042 KB)
33
+ /src/layout/utils.tsx
34
+ █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.69 % (915 Bytes)
35
+ /src/datahooks/Permissions.tsx
36
+ █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.47 % (842 Bytes)
37
+ /src/hooks/useBuildData.ts
38
+ █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.35 % (799 Bytes)
39
+ /src/layout/components/LayoutItemBar.tsx
40
+ █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.13 % (726 Bytes)
41
+ /src/content/createPages.tsx
42
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.91 % (650 Bytes)
43
+ /src/content/components/ActionFormSidebarItemComponent.tsx
44
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.89 % (644 Bytes)
45
+ /home/artemis/Github/imperium/node_modules/style-inject/dist/style-inject.es.js
46
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.87 % (636 Bytes)
47
+ /src/content/utils.tsx
48
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.85 % (628 Bytes)
49
+ /src/state.ts
50
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.74 % (591 Bytes)
51
+ /src/hooks/useIsActiveRoute.ts
52
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.51 % (514 Bytes)
53
+ /src/content/types.ts
54
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.14 % (388 Bytes)
55
+ /src/layout/components/PlainItem.tsx
56
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.11 % (379 Bytes)
57
+ /src/layout/components/SecondaryMenuToggleItem.tsx
58
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.05 % (356 Bytes)
59
+ /src/datahooks/ExecutePermissionHook.tsx
60
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.01 % (345 Bytes)
61
+ /src/content/components/ActionSidebarItemComponent.tsx
62
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.01 % (343 Bytes)
63
+ /src/datahooks/PermissionHooks.tsx
64
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1 % (339 Bytes)
65
+ /src/hooks/useSelectState.ts
66
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.96 % (326 Bytes)
67
+ /src/content/components/PlainSidebarItem.tsx
68
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.96 % (325 Bytes)
69
+ /src/hooks/useSelectPermission.ts
70
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.86 % (294 Bytes)
71
+ /src/content/hooks/useBuildContentData.ts
72
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.76 % (257 Bytes)
73
+ /src/layout/components/MenuItem.tsx
74
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.74 % (252 Bytes)
75
+ /src/commonItems.ts
76
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.6 % (203 Bytes)
77
+ /src/layout/types.ts
78
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.56 % (191 Bytes)
79
+ /src/utils.ts
80
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.43 % (145 Bytes)
81
+ /src/index.ts
82
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.42 % (144 Bytes)
83
+ /src/datahooks/ExecuteDataHook.tsx
84
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.36 % (123 Bytes)
85
+ /src/types.ts
86
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.36 % (121 Bytes)
87
+ /src/content/components/CustomSidebarItemComponent.tsx
88
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.24 % (83 Bytes)
89
+ /src/layout/components/CustomLayoutItemComponent.tsx
90
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.24 % (82 Bytes)
91
+ /src/content/dividerSidebarItem.ts
92
+ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.17 % (59 Bytes)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imperium/layout",
3
- "version": "14.3.4",
3
+ "version": "14.5.1",
4
4
  "description": "Imperium Layout package",
5
5
  "bugs": {
6
6
  "url": "https://github.com/thr-consulting/imperium/issues"
@@ -31,10 +31,10 @@
31
31
  }
32
32
  },
33
33
  "dependencies": {
34
- "@imperium/auth-client": "^14.3.4",
35
- "@imperium/client": "^14.0.0",
36
- "@imperium/router": "^14.0.0",
37
- "@imperium/state": "^14.0.0",
34
+ "@imperium/auth-client": "^14.5.1",
35
+ "@imperium/client": "^14.5.1",
36
+ "@imperium/router": "^14.5.1",
37
+ "@imperium/state": "^14.5.1",
38
38
  "@thx/controls": "^19.0.0",
39
39
  "debug": "^4.4.0",
40
40
  "history": "^5.0.1",
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "3a94952a599bd131c0d62b2cbd5a60e584dd32ca"
63
+ "gitHead": "7ef30adc3f5b2ceb0231b7fafd379be6327a07ef"
64
64
  }