@imperium/layout 13.0.4-alpha.0 → 13.0.4-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +1 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layout/components/Layout.js +9 -10
- package/dist/esm/layout/components/Layout.js.map +1 -1
- package/dist/esm/layout/components/LayoutItemWrapper.js.map +1 -1
- package/dist/esm/layout/components/PlainItem.js +4 -1
- package/dist/esm/layout/components/PlainItem.js.map +1 -1
- package/dist/esm/layout/components/SecondaryMenuToggleItem.js +2 -1
- package/dist/esm/layout/components/SecondaryMenuToggleItem.js.map +1 -1
- package/dist/esm/layout/types.js.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types/layout/types.d.ts +1 -1
- package/dist/types/layout/utils.d.ts +1 -1
- package/package.json +7 -7
- package/dist/esm/layout/hooks/useMobileLayout.js +0 -21
- package/dist/esm/layout/hooks/useMobileLayout.js.map +0 -1
- package/dist/types/layout/hooks/useMobileLayout.d.ts +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useMobileLayout } from './layout/hooks/useMobileLayout.js';
|
|
2
1
|
import { withLayout } from './layout/withLayout.js';
|
|
3
2
|
import { state } from './state.js';
|
|
4
3
|
export { actions as layoutActions, useLayoutState } from './state.js';
|
|
@@ -11,9 +10,7 @@ function layoutClientModule() {
|
|
|
11
10
|
order: 30,
|
|
12
11
|
hocs: [withLayout],
|
|
13
12
|
state,
|
|
14
|
-
layout: {
|
|
15
|
-
dataHooks: [useMobileLayout]
|
|
16
|
-
}
|
|
13
|
+
layout: {}
|
|
17
14
|
};
|
|
18
15
|
}
|
|
19
16
|
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import type {ImperiumStateClientModule} from '@imperium/state';\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import type {ImperiumStateClientModule} from '@imperium/state';\nimport {withLayout} from './layout/withLayout';\nimport {state} from './state';\nimport type {ImperiumLayoutClientModule} from './types';\n\nexport function layoutClientModule(): ImperiumStateClientModule & ImperiumLayoutClientModule {\n\treturn {\n\t\tname: '@imperium/layout',\n\t\torder: 30,\n\t\thocs: [withLayout],\n\t\tstate,\n\t\tlayout: {},\n\t};\n}\n\nexport type {LayoutData} from './layout/types';\nexport {useLayoutState, actions as layoutActions} from './state';\nexport {createPages} from './content/createPages';\nexport type {ImperiumLayoutClientModule} from './types';\nexport type {DataHookParams} from './datahooks/types';\nexport {dividerSidebarItem} from './content/dividerSidebarItem';\n"],"names":[],"mappings":";;;;;;AAK6F,SAAA,kBAAA,GAAA;AAC5F,EAAO,OAAA;AAAA,IACN,IAAM,EAAA,kBAAA;AAAA,IACN,KAAO,EAAA,EAAA;AAAA,IACP,IAAA,EAAM,CAAC,UAAU,CAAA;AAAA,IACjB,KAAA;AAAA,IACA,QAAQ,EAAC;AAAA,GACV,CAAA;AACD;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import debug from 'debug';
|
|
3
|
+
import { useMediaQuery } from 'react-responsive';
|
|
3
4
|
import { Segment } from 'semantic-ui-react';
|
|
4
|
-
import { useLayoutState } from '../../state.js';
|
|
5
5
|
import { moveItems } from '../moveItems.js';
|
|
6
6
|
import { LayoutItemBar } from './LayoutItemBar.js';
|
|
7
7
|
import { SecondaryMenuToggleItem } from './SecondaryMenuToggleItem.js';
|
|
@@ -9,7 +9,7 @@ import styles from './styles.module.css.js';
|
|
|
9
9
|
|
|
10
10
|
debug("imperium.layout.components.Layout");
|
|
11
11
|
function Layout({ footer, primaryMenu, statusbar, secondaryMenu, children }) {
|
|
12
|
-
const
|
|
12
|
+
const isMobile = useMediaQuery({ query: "(max-width: 900px)" });
|
|
13
13
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
14
14
|
const primaryMenuToggle = {
|
|
15
15
|
stickOnMobile: true,
|
|
@@ -23,14 +23,13 @@ function Layout({ footer, primaryMenu, statusbar, secondaryMenu, children }) {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const primaryMenuItems = moveItems(isMobile ? [
|
|
27
|
-
|
|
28
|
-
...
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
] : secondaryMenu);
|
|
26
|
+
const primaryMenuItems = moveItems(isMobile ? [
|
|
27
|
+
primaryMenuToggle,
|
|
28
|
+
...primaryMenu.map((p) => {
|
|
29
|
+
return { ...p, text: void 0 };
|
|
30
|
+
})
|
|
31
|
+
] : primaryMenu);
|
|
32
|
+
const secondaryMenuItems = moveItems(secondaryMenu);
|
|
34
33
|
const secondaryMenuComp = secondaryMenuItems.length > 0 ? /* @__PURE__ */ React.createElement("div", {
|
|
35
34
|
className: "imperiumSecondaryMenuWrapper noPrint"
|
|
36
35
|
}, /* @__PURE__ */ React.createElement(LayoutItemBar, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","sources":["../../../../src/layout/components/Layout.tsx"],"sourcesContent":["import debug from 'debug';\nimport {ReactNode, useState} from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"Layout.js","sources":["../../../../src/layout/components/Layout.tsx"],"sourcesContent":["import debug from 'debug';\nimport {ReactNode, useState} from 'react';\nimport {useMediaQuery} from 'react-responsive';\nimport {Segment} from 'semantic-ui-react';\nimport {moveItems} from '../moveItems';\nimport type {LayoutData} from '../types';\nimport {LayoutItemBar} from './LayoutItemBar';\nimport {SecondaryMenuToggleItem} from './SecondaryMenuToggleItem';\nimport styles from './styles.module.css';\n\nconst d = debug('imperium.layout.components.Layout');\n\ninterface LayoutProps extends Required<LayoutData> {\n\tchildren?: ReactNode;\n}\n\n/**\n * Renders the main layout.\n * Hides/shows/collapses things as need for mobile layout.\n * Tracks state to whether the side menu is open or not.\n * @param footer\n * @param menubar\n * @param statusbar\n * @param children\n * @constructor\n */\nexport function Layout({footer, primaryMenu, statusbar, secondaryMenu, children}: LayoutProps) {\n\tconst isMobile = useMediaQuery({query: '(max-width: 900px)'});\n\tconst [menuOpen, setMenuOpen] = useState(false);\n\n\tconst primaryMenuToggle = {\n\t\tstickOnMobile: true,\n\t\tweight: -19999,\n\t\trender: () => {\n\t\t\tif (!isMobile) return null;\n\t\t\treturn <SecondaryMenuToggleItem menuOpen={menuOpen} setMenuOpen={setMenuOpen} />;\n\t\t},\n\t};\n\n\t// Determine menubar items\n\tconst primaryMenuItems = moveItems(\n\t\tisMobile\n\t\t\t? [\n\t\t\t\t\tprimaryMenuToggle,\n\t\t\t\t\t...primaryMenu.map(p => {\n\t\t\t\t\t\treturn {...p, text: undefined};\n\t\t\t\t\t}),\n\t\t\t ]\n\t\t\t: primaryMenu,\n\t);\n\n\t// Determine sidebar items\n\tconst secondaryMenuItems = moveItems(secondaryMenu);\n\n\tconst secondaryMenuComp =\n\t\tsecondaryMenuItems.length > 0 ? (\n\t\t\t<div className=\"imperiumSecondaryMenuWrapper noPrint\">\n\t\t\t\t<LayoutItemBar\n\t\t\t\t\titems={secondaryMenuItems}\n\t\t\t\t\tinverted\n\t\t\t\t\tvertical\n\t\t\t\t\tclassName={\n\t\t\t\t\t\tisMobile && !menuOpen\n\t\t\t\t\t\t\t? `${styles.secondaryMenu} ${styles.secondaryMenuHidden} imperiumSecondaryMenu`\n\t\t\t\t\t\t\t: `${styles.secondaryMenu} imperiumSecondaryMenu`\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t) : null;\n\n\t// Determine footer items\n\tconst footerItems = moveItems(footer);\n\tconst footerComp =\n\t\tfooterItems.length > 0 ? (\n\t\t\t<LayoutItemBar name=\"footer\" items={footerItems} className={`${styles.footer} imperiumFooter`} inverted borderless />\n\t\t) : null;\n\n\t// Determine status bar items\n\tconst statusbarItems = moveItems(statusbar);\n\tconst statusbarComp =\n\t\tstatusbarItems.length > 0 ? <LayoutItemBar items={statusbarItems} inverted className={`${styles.statusbar} imperiumStatusbar`} /> : null;\n\n\treturn (\n\t\t<div className={`${styles.parent} imperiumLayout ${isMobile ? 'imperiumMobile' : 'imperiumNotMobile'}`}>\n\t\t\t<div className=\"imperiumPrimaryMenuWrapper\">\n\t\t\t\t<LayoutItemBar items={primaryMenuItems} inverted borderless className={`${styles.menubar} imperiumPrimaryMenu`} />\n\t\t\t\t{statusbarComp}\n\t\t\t</div>\n\t\t\t<Segment attached className={`${styles.contentWrapper} imperiumLayoutContentWrapper`}>\n\t\t\t\t{secondaryMenuComp}\n\t\t\t\t<div className={`${styles.content} imperiumLayoutContent`}>{children}</div>\n\t\t\t</Segment>\n\t\t\t{footerComp}\n\t\t</div>\n\t);\n}\n"],"names":[],"mappings":";;;;;;;;;AAUU,MAAM,mCAAmC,EAAA;AAgB5C,SAAA,MAAA,CAAgB,EAAC,MAAA,EAAQ,WAAa,EAAA,SAAA,EAAW,eAAe,QAAwB,EAAA,EAAA;AAC9F,EAAA,MAAM,QAAW,GAAA,aAAA,CAAc,EAAC,KAAA,EAAO,sBAAqB,CAAA,CAAA;AAC5D,EAAA,MAAM,CAAC,QAAA,EAAU,WAAe,CAAA,GAAA,QAAA,CAAS,KAAK,CAAA,CAAA;AAE9C,EAAA,MAAM,iBAAoB,GAAA;AAAA,IACzB,aAAe,EAAA,IAAA;AAAA,IACf,MAAQ,EAAA,CAAA,KAAA;AAAA,IACR,QAAQ,MAAM;AACb,MAAA,IAAI,CAAC,QAAA;AAAU,QAAO,OAAA,IAAA,CAAA;AACtB,MAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,uBAAA,EAAA;AAAA,QAAwB,QAAA;AAAA,QAAoB,WAAA;AAAA,OAA0B,CAAA,CAAA;AAAA,KAC/E;AAAA,GACD,CAAA;AAGA,EAAM,MAAA,gBAAA,GAAmB,UACxB,QACG,GAAA;AAAA,IACA,iBAAA;AAAA,IACA,GAAG,WAAY,CAAA,GAAA,CAAI,CAAK,CAAA,KAAA;AACvB,MAAO,OAAA,EAAA,GAAI,CAAG,EAAA,IAAA,EAAM,KAAS,CAAA,EAAA,CAAA;AAAA,KAC7B,CAAA;AAAA,MAED,WACJ,CAAA,CAAA;AAGA,EAAM,MAAA,kBAAA,GAAqB,UAAU,aAAa,CAAA,CAAA;AAElD,EAAA,MAAM,iBACL,GAAA,kBAAA,CAAmB,MAAS,GAAA,CAAA,mBAC1B,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAI,SAAU,EAAA,sCAAA;AAAA,GAAA,kBACb,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA;AAAA,IACA,KAAO,EAAA,kBAAA;AAAA,IACP,QAAQ,EAAA,IAAA;AAAA,IACR,QAAQ,EAAA,IAAA;AAAA,IACR,SAAA,EACC,QAAY,IAAA,CAAC,QACV,GAAA,CAAA,EAAG,OAAO,aAAiB,CAAA,CAAA,EAAA,MAAA,CAAO,mBAClC,CAAA,sBAAA,CAAA,GAAA,CAAA,EAAG,MAAO,CAAA,aAAA,CAAA,sBAAA,CAAA;AAAA,GAEf,CACD,CACG,GAAA,IAAA,CAAA;AAGL,EAAM,MAAA,WAAA,GAAc,UAAU,MAAM,CAAA,CAAA;AACpC,EAAA,MAAM,UACL,GAAA,WAAA,CAAY,MAAS,GAAA,CAAA,mBACnB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA;AAAA,IAAc,IAAK,EAAA,QAAA;AAAA,IAAS,KAAO,EAAA,WAAA;AAAA,IAAa,SAAA,EAAW,GAAG,MAAO,CAAA,MAAA,CAAA,eAAA,CAAA;AAAA,IAAyB,QAAQ,EAAA,IAAA;AAAA,IAAC,UAAU,EAAA,IAAA;AAAA,GAAC,CAChH,GAAA,IAAA,CAAA;AAGL,EAAM,MAAA,cAAA,GAAiB,UAAU,SAAS,CAAA,CAAA;AAC1C,EAAA,MAAM,aACL,GAAA,cAAA,CAAe,MAAS,GAAA,CAAA,mBAAK,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA;AAAA,IAAc,KAAO,EAAA,cAAA;AAAA,IAAgB,QAAQ,EAAA,IAAA;AAAA,IAAC,SAAA,EAAW,GAAG,MAAO,CAAA,SAAA,CAAA,kBAAA,CAAA;AAAA,GAA+B,CAAK,GAAA,IAAA,CAAA;AAErI,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAI,SAAW,EAAA,CAAA,EAAG,MAAO,CAAA,MAAA,CAAA,gBAAA,EAAyB,WAAW,gBAAmB,GAAA,mBAAA,CAAA,CAAA;AAAA,GAAA,kBAC/E,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAI,SAAU,EAAA,4BAAA;AAAA,GAAA,kBACb,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA;AAAA,IAAc,KAAO,EAAA,gBAAA;AAAA,IAAkB,QAAQ,EAAA,IAAA;AAAA,IAAC,UAAU,EAAA,IAAA;AAAA,IAAC,SAAA,EAAW,GAAG,MAAO,CAAA,OAAA,CAAA,oBAAA,CAAA;AAAA,GAA+B,CAAA,EAC/G,aACF,CAAA,kBACC,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA;AAAA,IAAQ,QAAQ,EAAA,IAAA;AAAA,IAAC,SAAA,EAAW,GAAG,MAAO,CAAA,cAAA,CAAA,6BAAA,CAAA;AAAA,GAAA,EACrC,mCACA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAI,SAAA,EAAW,GAAG,MAAO,CAAA,OAAA,CAAA,sBAAA,CAAA;AAAA,GAAkC,EAAA,QAAS,CACtE,CAAA,EACC,UACF,CAAA,CAAA;AAEF;;;;"}
|
|
@@ -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\
|
|
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,IAAA,kBAAA,CAAmB,IAAI,CAAG,EAAA;AAC7B,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,yBAAA,EAAA;AAAA,MAA0B,IAAA;AAAA,MAAY,IAAA;AAAA,KAAY,CAAA,CAAA;AAAA,GAC3D;AACA,EAAI,IAAA,oBAAA,CAAqB,IAAI,CAAG,EAAA;AAC/B,IAAM,MAAA,QAAA,GAAW,kBAAkB,IAAK,CAAA,QAAQ,EAAE,GAAI,CAAA,CAAC,CAAG,EAAA,KAAA,qBAExD,KAAA,CAAA,aAAA,CAAA,iBAAA,EAAA;AAAA,MAAkB,GAAK,EAAA,KAAA;AAAA,MAAO,IAAM,EAAA,CAAA;AAAA,MAAiB,IAAI,QAAS,CAAA,IAAA;AAAA,MAAM,IAAA;AAAA,KAAY,CACrF,CAAA,CAAA;AACD,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA;AAAA,MAAa,IAAA;AAAA,MAAY,QAAA;AAAA,MAAoB,QAAA;AAAA,MAAoB,IAAA;AAAA,KAAY,CAAA,CAAA;AAAA,GACtF;AACA,EAAI,IAAA,gBAAA,CAAiB,IAAI,CAAG,EAAA;AAC3B,IAAM,MAAA,QAAA,GAAW,kBAAkB,IAAK,CAAA,IAAI,EAAE,GAAI,CAAA,CAAC,CAAG,EAAA,KAAA,qBAEpD,KAAA,CAAA,aAAA,CAAA,iBAAA,EAAA;AAAA,MAAkB,GAAK,EAAA,KAAA;AAAA,MAAO,IAAM,EAAA,CAAA;AAAA,MAAiB,IAAI,QAAS,CAAA,IAAA;AAAA,MAAM,QAAA;AAAA,MAAoB,IAAA;AAAA,KAAY,CACzG,CAAA,CAAA;AACD,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,MAAS,IAAA;AAAA,MAAY,QAAA;AAAA,KAAoB,CAAA,CAAA;AAAA,GAClD;AACA,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,SAAA,EAAA;AAAA,IAAU,IAAA;AAAA,IAAY,IAAA;AAAA,IAAY,EAAA;AAAA,GAAQ,CAAA,CAAA;AACnD;;;;"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useMediaQuery } from 'react-responsive';
|
|
2
3
|
import { Menu } from 'semantic-ui-react';
|
|
3
4
|
import { linkParameters, getIcon, getText } from '../utils.js';
|
|
4
5
|
|
|
5
6
|
function PlainItem({ item, data, as }) {
|
|
7
|
+
const isMobile = useMediaQuery({ query: "(max-width: 900px)" });
|
|
6
8
|
const linkParams = linkParameters(item, data);
|
|
7
9
|
const ItemX = as || Menu.Item;
|
|
8
10
|
return /* @__PURE__ */ React.createElement(ItemX, {
|
|
9
|
-
...linkParams
|
|
11
|
+
...linkParams,
|
|
12
|
+
style: isMobile ? { paddingLeft: 8, paddingRight: 4 } : void 0
|
|
10
13
|
}, getIcon(item, data), getText(item, data));
|
|
11
14
|
}
|
|
12
15
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlainItem.js","sources":["../../../../src/layout/components/PlainItem.tsx"],"sourcesContent":["import type {ComponentClass} from 'react';\nimport {Menu} from 'semantic-ui-react';\nimport type {Data} from '../../types';\nimport type {CustomLayoutItem, DropdownLayoutItem, LayoutItem, MenuLayoutItem} from '../types';\nimport {getIcon, getText, linkParameters} from '../utils';\n\ninterface PlainItemProps {\n\titem: Exclude<LayoutItem, MenuLayoutItem | DropdownLayoutItem | CustomLayoutItem>;\n\tdata: Data;\n\tas?: ComponentClass;\n}\n\nexport function PlainItem({item, data, as}: PlainItemProps) {\n\tconst linkParams = linkParameters(item, data);\n\n\tconst ItemX = as || Menu.Item;\n\n\treturn (\n\t\t<ItemX {...linkParams}>\n\t\t\t{getIcon(item, data)}\n\t\t\t{getText(item, data)}\n\t\t</ItemX>\n\t);\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlainItem.js","sources":["../../../../src/layout/components/PlainItem.tsx"],"sourcesContent":["import type {ComponentClass} from 'react';\nimport {useMediaQuery} from 'react-responsive';\nimport {Menu} from 'semantic-ui-react';\nimport type {Data} from '../../types';\nimport type {CustomLayoutItem, DropdownLayoutItem, LayoutItem, MenuLayoutItem} from '../types';\nimport {getIcon, getText, linkParameters} from '../utils';\n\ninterface PlainItemProps {\n\titem: Exclude<LayoutItem, MenuLayoutItem | DropdownLayoutItem | CustomLayoutItem>;\n\tdata: Data;\n\tas?: ComponentClass;\n}\n\nexport function PlainItem({item, data, as}: PlainItemProps) {\n\tconst isMobile = useMediaQuery({query: '(max-width: 900px)'});\n\tconst linkParams = linkParameters(item, data);\n\n\tconst ItemX = as || Menu.Item;\n\n\treturn (\n\t\t<ItemX {...linkParams} style={isMobile ? {paddingLeft: 8, paddingRight: 4} : undefined}>\n\t\t\t{getIcon(item, data)}\n\t\t\t{getText(item, data)}\n\t\t</ItemX>\n\t);\n}\n"],"names":[],"mappings":";;;;;AAa0B,SAAA,SAAA,CAAA,EAAC,IAAM,EAAA,IAAA,EAAM,EAAqB,EAAA,EAAA;AAC3D,EAAA,MAAM,QAAW,GAAA,aAAA,CAAc,EAAC,KAAA,EAAO,sBAAqB,CAAA,CAAA;AAC5D,EAAM,MAAA,UAAA,GAAa,cAAe,CAAA,IAAA,EAAM,IAAI,CAAA,CAAA;AAE5C,EAAM,MAAA,KAAA,GAAQ,MAAM,IAAK,CAAA,IAAA,CAAA;AAEzB,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAU,GAAA,UAAA;AAAA,IAAY,OAAO,QAAW,GAAA,EAAC,aAAa,CAAG,EAAA,YAAA,EAAc,GAAK,GAAA,KAAA,CAAA;AAAA,GAAA,EAC3E,QAAQ,IAAM,EAAA,IAAI,GAClB,OAAQ,CAAA,IAAA,EAAM,IAAI,CACpB,CAAA,CAAA;AAEF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecondaryMenuToggleItem.js","sources":["../../../../src/layout/components/SecondaryMenuToggleItem.tsx"],"sourcesContent":["import {Icon, Menu} from 'semantic-ui-react';\nimport styles from './styles.module.css';\n\ninterface SecondaryMenuToggleItemProps {\n\tmenuOpen: boolean;\n\tsetMenuOpen: (open: boolean) => void;\n}\n\nexport function SecondaryMenuToggleItem({menuOpen, setMenuOpen}: SecondaryMenuToggleItemProps) {\n\treturn (\n\t\t<Menu.Item>\n\t\t\t<Icon\n\t\t\t\tclassName={menuOpen ? styles.iconRotated : styles.icon}\n\t\t\t\tname={menuOpen ? 'close' : 'sidebar'}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tsetMenuOpen(!menuOpen);\n\t\t\t\t}}\n\t\t\t/>\n\t\t</Menu.Item>\n\t);\n}\n"],"names":[],"mappings":";;;;AAQwC,SAAA,uBAAA,CAAA,EAAC,UAAU,WAA4C,EAAA,EAAA;AAC9F,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,IAAA,CAAK,IAAL,EAAA,IAAA,kBACC,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IACA,SAAW,EAAA,QAAA,GAAW,MAAO,CAAA,WAAA,GAAc,MAAO,CAAA,IAAA;AAAA,IAClD,IAAA,EAAM,WAAW,OAAU,GAAA,SAAA;AAAA,IAC3B,SAAS,MAAM;AACd,MAAA,WAAA,CAAY,CAAC,QAAQ,CAAA,CAAA;AAAA,KACtB;AAAA,
|
|
1
|
+
{"version":3,"file":"SecondaryMenuToggleItem.js","sources":["../../../../src/layout/components/SecondaryMenuToggleItem.tsx"],"sourcesContent":["import {Icon, Menu} from 'semantic-ui-react';\nimport styles from './styles.module.css';\n\ninterface SecondaryMenuToggleItemProps {\n\tmenuOpen: boolean;\n\tsetMenuOpen: (open: boolean) => void;\n}\n\nexport function SecondaryMenuToggleItem({menuOpen, setMenuOpen}: SecondaryMenuToggleItemProps) {\n\treturn (\n\t\t<Menu.Item>\n\t\t\t<Icon\n\t\t\t\tclassName={menuOpen ? styles.iconRotated : styles.icon}\n\t\t\t\tname={menuOpen ? 'close' : 'sidebar'}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tsetMenuOpen(!menuOpen);\n\t\t\t\t}}\n\t\t\t\tcolor=\"orange\"\n\t\t\t/>\n\t\t</Menu.Item>\n\t);\n}\n"],"names":[],"mappings":";;;;AAQwC,SAAA,uBAAA,CAAA,EAAC,UAAU,WAA4C,EAAA,EAAA;AAC9F,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,IAAA,CAAK,IAAL,EAAA,IAAA,kBACC,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IACA,SAAW,EAAA,QAAA,GAAW,MAAO,CAAA,WAAA,GAAc,MAAO,CAAA,IAAA;AAAA,IAClD,IAAA,EAAM,WAAW,OAAU,GAAA,SAAA;AAAA,IAC3B,SAAS,MAAM;AACd,MAAA,WAAA,CAAY,CAAC,QAAQ,CAAA,CAAA;AAAA,KACtB;AAAA,IACA,KAAM,EAAA,QAAA;AAAA,GACP,CACD,CAAA,CAAA;AAEF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/layout/types.ts"],"sourcesContent":["import type {SemanticICONS} from 'semantic-ui-react';\nimport type {HorizontalPositionedItem, RouteItem, VisibilityItem, WeightedItem} from '../commonItems';\nimport type {DataHookItem} from '../datahooks/types';\nimport type {Data, PermissionSelector, PermissionSelectorHook} from '../types';\n\n/**\n * Describes a basic weighted, possibly visible item\n */\nexport interface BaseLayoutItem extends WeightedItem, VisibilityItem {\n\ttext
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/layout/types.ts"],"sourcesContent":["import type {SemanticICONS} from 'semantic-ui-react';\nimport type {HorizontalPositionedItem, RouteItem, VisibilityItem, WeightedItem} from '../commonItems';\nimport type {DataHookItem} from '../datahooks/types';\nimport type {Data, PermissionSelector, PermissionSelectorHook} from '../types';\n\n/**\n * Describes a basic weighted, possibly visible item\n */\nexport interface BaseLayoutItem extends WeightedItem, VisibilityItem {\n\ttext?: string | ((data: Data) => string);\n\ticon?: SemanticICONS | ((data: Data) => SemanticICONS);\n\tmoveToKey?: string;\n}\n\nexport interface CustomLayoutItem extends WeightedItem, VisibilityItem {\n\trender: (data: Data) => JSX.Element | null;\n\tmoveToKey?: string;\n}\n\n/**\n * Describes a menu that displays a dropdown list of items\n */\nexport interface DropdownLayoutItem extends BaseLayoutItem {\n\tdropdown: ((BaseLayoutItem & RouteItem<Data>) | CustomLayoutItem)[];\n\tkey?: string;\n}\n\n/**\n * Describes a menu that displays a sub menu (not a dropdown list)\n */\nexport interface MenuLayoutItem extends BaseLayoutItem {\n\tmenu: ((BaseLayoutItem & RouteItem<Data>) | CustomLayoutItem)[];\n\tkey?: string;\n}\n\n/**\n * Describes a horizontal menu item which is either a route item or dropdown menu\n */\nexport type LayoutItem = (BaseLayoutItem & RouteItem<Data>) | DropdownLayoutItem | MenuLayoutItem | CustomLayoutItem;\n\nexport interface LayoutData {\n\tpermissionSelectorHooks?: PermissionSelectorHook[];\n\tpermissions?: PermissionSelector;\n\tdataHooks?: DataHookItem[];\n\tprimaryMenu?: (LayoutItem & HorizontalPositionedItem)[]; // primary menu\n\tstatusbar?: (LayoutItem & HorizontalPositionedItem)[];\n\tsecondaryMenu?: LayoutItem[]; // secondary menu\n\tfooter?: (LayoutItem & HorizontalPositionedItem)[]; // footer\n}\n\nexport function isCustomLayoutItem(value: any): value is CustomLayoutItem {\n\treturn !!(value as CustomLayoutItem).render;\n}\n\nexport function isDropdownLayoutItem(value: any): value is DropdownLayoutItem {\n\treturn !!(value as DropdownLayoutItem).dropdown;\n}\n\nexport function isMenuLayoutItem(value: any): value is MenuLayoutItem {\n\treturn !!(value as MenuLayoutItem).menu;\n}\n"],"names":[],"mappings":"AAkDO,SAAA,kBAAA,CAA4B,KAAuC,EAAA;AACzE,EAAO,OAAA,CAAC,CAAE,KAA2B,CAAA,MAAA,CAAA;AACtC,CAAA;AAEO,SAAA,oBAAA,CAA8B,KAAyC,EAAA;AAC7E,EAAO,OAAA,CAAC,CAAE,KAA6B,CAAA,QAAA,CAAA;AACxC,CAAA;AAEO,SAAA,gBAAA,CAA0B,KAAqC,EAAA;AACrE,EAAO,OAAA,CAAC,CAAE,KAAyB,CAAA,IAAA,CAAA;AACpC;;;;"}
|
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":"868d-1"}]},{"name":"state.js","children":[{"name":"src/state.ts","uid":"868d-3"}]},{"name":"content/dividerSidebarItem.js","children":[{"name":"src/content/dividerSidebarItem.ts","uid":"868d-5"}]},{"name":"layout/withLayout.js","children":[{"name":"src/layout/withLayout.tsx","uid":"868d-7"}]},{"name":"content/createPages.js","children":[{"name":"src/content/createPages.tsx","uid":"868d-9"}]},{"name":"layout/hooks/useMobileLayout.js","children":[{"name":"src/layout/hooks/useMobileLayout.ts","uid":"868d-11"}]},{"name":"types.js","children":[{"name":"src/types.ts","uid":"868d-13"}]},{"name":"content/types.js","children":[{"name":"src/content/types.ts","uid":"868d-15"}]},{"name":"datahooks/DataHooks.js","children":[{"name":"src/datahooks/DataHooks.tsx","uid":"868d-17"}]},{"name":"datahooks/PermissionHooks.js","children":[{"name":"src/datahooks/PermissionHooks.tsx","uid":"868d-19"}]},{"name":"datahooks/Permissions.js","children":[{"name":"src/datahooks/Permissions.tsx","uid":"868d-21"}]},{"name":"content/components/ContentComponent.js","children":[{"name":"src/content/components/ContentComponent.tsx","uid":"868d-23"}]},{"name":"layout/components/Layout.js","children":[{"name":"src/layout/components/Layout.tsx","uid":"868d-25"}]},{"name":"datahooks/ExecuteDataHook.js","children":[{"name":"src/datahooks/ExecuteDataHook.tsx","uid":"868d-27"}]},{"name":"datahooks/ExecutePermissionHook.js","children":[{"name":"src/datahooks/ExecutePermissionHook.tsx","uid":"868d-29"}]},{"name":"utils.js","children":[{"name":"src/utils.ts","uid":"868d-31"}]},{"name":"layout/moveItems.js","children":[{"name":"src/layout/moveItems.ts","uid":"868d-33"}]},{"name":"layout/components/styles.module.css.js","children":[{"name":"src/layout/components/styles.module.css","uid":"868d-35"}]},{"name":"content/components/styles.module.css.js","children":[{"name":"src/content/components/styles.module.css","uid":"868d-37"}]},{"name":"layout/components/LayoutItemBar.js","children":[{"name":"src/layout/components/LayoutItemBar.tsx","uid":"868d-39"}]},{"name":"layout/components/SecondaryMenuToggleItem.js","children":[{"name":"src/layout/components/SecondaryMenuToggleItem.tsx","uid":"868d-41"}]},{"name":"content/hooks/useBuildContentData.js","children":[{"name":"src/content/hooks/useBuildContentData.ts","uid":"868d-43"}]},{"name":"content/components/Header.js","children":[{"name":"src/content/components/Header.tsx","uid":"868d-45"}]},{"name":"content/components/SidebarItemWrapper.js","children":[{"name":"src/content/components/SidebarItemWrapper.tsx","uid":"868d-47"}]},{"name":"layout/types.js","children":[{"name":"src/layout/types.ts","uid":"868d-49"}]},{"name":"layout/utils.js","children":[{"name":"src/layout/utils.tsx","uid":"868d-51"}]},{"name":"hooks/useBuildData.js","children":[{"name":"src/hooks/useBuildData.ts","uid":"868d-53"}]},{"name":"layout/components/LayoutItemWrapper.js","children":[{"name":"src/layout/components/LayoutItemWrapper.tsx","uid":"868d-55"}]},{"name":"content/components/ActionFormSidebarItemComponent.js","children":[{"name":"src/content/components/ActionFormSidebarItemComponent.tsx","uid":"868d-57"}]},{"name":"content/components/ActionSidebarItemComponent.js","children":[{"name":"src/content/components/ActionSidebarItemComponent.tsx","uid":"868d-59"}]},{"name":"content/components/CustomSidebarItemComponent.js","children":[{"name":"src/content/components/CustomSidebarItemComponent.tsx","uid":"868d-61"}]},{"name":"content/components/PlainSidebarItem.js","children":[{"name":"src/content/components/PlainSidebarItem.tsx","uid":"868d-63"}]},{"name":"commonItems.js","children":[{"name":"src/commonItems.ts","uid":"868d-65"}]},{"name":"hooks/useIsActiveRoute.js","children":[{"name":"src/hooks/useIsActiveRoute.ts","uid":"868d-67"}]},{"name":"hooks/useSelectState.js","children":[{"name":"src/hooks/useSelectState.ts","uid":"868d-69"}]},{"name":"hooks/useSelectPermission.js","children":[{"name":"src/hooks/useSelectPermission.ts","uid":"868d-71"}]},{"name":"content/utils.js","children":[{"name":"src/content/utils.tsx","uid":"868d-73"}]},{"name":"layout/components/CustomLayoutItemComponent.js","children":[{"name":"src/layout/components/CustomLayoutItemComponent.tsx","uid":"868d-75"}]},{"name":"layout/components/DropdownItem.js","children":[{"name":"src/layout/components/DropdownItem.tsx","uid":"868d-77"}]},{"name":"layout/components/MenuItem.js","children":[{"name":"src/layout/components/MenuItem.tsx","uid":"868d-79"}]},{"name":"layout/components/PlainItem.js","children":[{"name":"src/layout/components/PlainItem.tsx","uid":"868d-81"}]},{"name":"content/components/ActionForm.js","children":[{"name":"src/content/components/ActionForm.tsx","uid":"868d-83"}]},{"name":"external/style-inject/dist/style-inject.es.js","children":[{"name":"home/runner/work/imperium/imperium/node_modules/style-inject/dist/style-inject.es.js","uid":"868d-85"}]}],"isRoot":true},"nodeParts":{"868d-1":{"renderedLength":184,"gzipLength":150,"brotliLength":131,"mainUid":"868d-0"},"868d-3":{"renderedLength":489,"gzipLength":250,"brotliLength":217,"mainUid":"868d-2"},"868d-5":{"renderedLength":59,"gzipLength":73,"brotliLength":63,"mainUid":"868d-4"},"868d-7":{"renderedLength":1955,"gzipLength":562,"brotliLength":488,"mainUid":"868d-6"},"868d-9":{"renderedLength":650,"gzipLength":301,"brotliLength":268,"mainUid":"868d-8"},"868d-11":{"renderedLength":445,"gzipLength":265,"brotliLength":229,"mainUid":"868d-10"},"868d-13":{"renderedLength":121,"gzipLength":111,"brotliLength":90,"mainUid":"868d-12"},"868d-15":{"renderedLength":388,"gzipLength":167,"brotliLength":111,"mainUid":"868d-14"},"868d-17":{"renderedLength":1058,"gzipLength":390,"brotliLength":330,"mainUid":"868d-16"},"868d-19":{"renderedLength":339,"gzipLength":202,"brotliLength":164,"mainUid":"868d-18"},"868d-21":{"renderedLength":808,"gzipLength":351,"brotliLength":306,"mainUid":"868d-20"},"868d-23":{"renderedLength":1970,"gzipLength":653,"brotliLength":565,"mainUid":"868d-22"},"868d-25":{"renderedLength":2638,"gzipLength":748,"brotliLength":635,"mainUid":"868d-24"},"868d-27":{"renderedLength":123,"gzipLength":111,"brotliLength":93,"mainUid":"868d-26"},"868d-29":{"renderedLength":345,"gzipLength":207,"brotliLength":172,"mainUid":"868d-28"},"868d-31":{"renderedLength":145,"gzipLength":117,"brotliLength":116,"mainUid":"868d-30"},"868d-33":{"renderedLength":1401,"gzipLength":376,"brotliLength":347,"mainUid":"868d-32"},"868d-35":{"renderedLength":3176,"gzipLength":928,"brotliLength":762,"mainUid":"868d-34"},"868d-37":{"renderedLength":1639,"gzipLength":581,"brotliLength":473,"mainUid":"868d-36"},"868d-39":{"renderedLength":726,"gzipLength":294,"brotliLength":252,"mainUid":"868d-38"},"868d-41":{"renderedLength":335,"gzipLength":222,"brotliLength":169,"mainUid":"868d-40"},"868d-43":{"renderedLength":257,"gzipLength":158,"brotliLength":122,"mainUid":"868d-42"},"868d-45":{"renderedLength":1042,"gzipLength":377,"brotliLength":323,"mainUid":"868d-44"},"868d-47":{"renderedLength":1189,"gzipLength":399,"brotliLength":314,"mainUid":"868d-46"},"868d-49":{"renderedLength":191,"gzipLength":113,"brotliLength":89,"mainUid":"868d-48"},"868d-51":{"renderedLength":915,"gzipLength":393,"brotliLength":328,"mainUid":"868d-50"},"868d-53":{"renderedLength":799,"gzipLength":370,"brotliLength":330,"mainUid":"868d-52"},"868d-55":{"renderedLength":1503,"gzipLength":487,"brotliLength":399,"mainUid":"868d-54"},"868d-57":{"renderedLength":663,"gzipLength":346,"brotliLength":277,"mainUid":"868d-56"},"868d-59":{"renderedLength":362,"gzipLength":246,"brotliLength":185,"mainUid":"868d-58"},"868d-61":{"renderedLength":83,"gzipLength":97,"brotliLength":66,"mainUid":"868d-60"},"868d-63":{"renderedLength":344,"gzipLength":236,"brotliLength":186,"mainUid":"868d-62"},"868d-65":{"renderedLength":203,"gzipLength":136,"brotliLength":97,"mainUid":"868d-64"},"868d-67":{"renderedLength":514,"gzipLength":227,"brotliLength":187,"mainUid":"868d-66"},"868d-69":{"renderedLength":326,"gzipLength":176,"brotliLength":141,"mainUid":"868d-68"},"868d-71":{"renderedLength":294,"gzipLength":155,"brotliLength":114,"mainUid":"868d-70"},"868d-73":{"renderedLength":628,"gzipLength":259,"brotliLength":219,"mainUid":"868d-72"},"868d-75":{"renderedLength":82,"gzipLength":96,"brotliLength":66,"mainUid":"868d-74"},"868d-77":{"renderedLength":1179,"gzipLength":450,"brotliLength":362,"mainUid":"868d-76"},"868d-79":{"renderedLength":252,"gzipLength":157,"brotliLength":116,"mainUid":"868d-78"},"868d-81":{"renderedLength":244,"gzipLength":177,"brotliLength":145,"mainUid":"868d-80"},"868d-83":{"renderedLength":1667,"gzipLength":624,"brotliLength":519,"mainUid":"868d-82"},"868d-85":{"renderedLength":636,"gzipLength":318,"brotliLength":242,"mainUid":"868d-84"}},"nodeMetas":{"868d-0":{"id":"/src/index.ts","moduleParts":{"index.js":"868d-1"},"imported":[{"uid":"868d-10"},{"uid":"868d-6"},{"uid":"868d-2"},{"uid":"868d-8"},{"uid":"868d-4"}],"importedBy":[],"isEntry":true},"868d-2":{"id":"/src/state.ts","moduleParts":{"state.js":"868d-3"},"imported":[{"uid":"868d-90"},{"uid":"868d-91"}],"importedBy":[{"uid":"868d-0"},{"uid":"868d-10"},{"uid":"868d-20"},{"uid":"868d-24"},{"uid":"868d-22"},{"uid":"868d-28"},{"uid":"868d-52"}]},"868d-4":{"id":"/src/content/dividerSidebarItem.ts","moduleParts":{"content/dividerSidebarItem.js":"868d-5"},"imported":[],"importedBy":[{"uid":"868d-0"}]},"868d-6":{"id":"/src/layout/withLayout.tsx","moduleParts":{"layout/withLayout.js":"868d-7"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-16"},{"uid":"868d-18"},{"uid":"868d-20"},{"uid":"868d-12"},{"uid":"868d-24"}],"importedBy":[{"uid":"868d-0"}]},"868d-8":{"id":"/src/content/createPages.tsx","moduleParts":{"content/createPages.js":"868d-9"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-22"},{"uid":"868d-14"}],"importedBy":[{"uid":"868d-0"}]},"868d-10":{"id":"/src/layout/hooks/useMobileLayout.ts","moduleParts":{"layout/hooks/useMobileLayout.js":"868d-11"},"imported":[{"uid":"868d-86"},{"uid":"868d-87"},{"uid":"868d-88"},{"uid":"868d-89"},{"uid":"868d-2"}],"importedBy":[{"uid":"868d-0"}]},"868d-12":{"id":"/src/types.ts","moduleParts":{"types.js":"868d-13"},"imported":[],"importedBy":[{"uid":"868d-6"}]},"868d-14":{"id":"/src/content/types.ts","moduleParts":{"content/types.js":"868d-15"},"imported":[],"importedBy":[{"uid":"868d-8"},{"uid":"868d-44"},{"uid":"868d-46"}]},"868d-16":{"id":"/src/datahooks/DataHooks.tsx","moduleParts":{"datahooks/DataHooks.js":"868d-17"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-92"},{"uid":"868d-26"}],"importedBy":[{"uid":"868d-6"},{"uid":"868d-22"}]},"868d-18":{"id":"/src/datahooks/PermissionHooks.tsx","moduleParts":{"datahooks/PermissionHooks.js":"868d-19"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-28"}],"importedBy":[{"uid":"868d-6"}]},"868d-20":{"id":"/src/datahooks/Permissions.tsx","moduleParts":{"datahooks/Permissions.js":"868d-21"},"imported":[{"uid":"868d-87"},{"uid":"868d-93"},{"uid":"868d-86"},{"uid":"868d-88"},{"uid":"868d-2"}],"importedBy":[{"uid":"868d-6"}]},"868d-22":{"id":"/src/content/components/ContentComponent.tsx","moduleParts":{"content/components/ContentComponent.js":"868d-23"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-95"},{"uid":"868d-88"},{"uid":"868d-16"},{"uid":"868d-2"},{"uid":"868d-30"},{"uid":"868d-42"},{"uid":"868d-44"},{"uid":"868d-46"},{"uid":"868d-36"}],"importedBy":[{"uid":"868d-8"}]},"868d-24":{"id":"/src/layout/components/Layout.tsx","moduleParts":{"layout/components/Layout.js":"868d-25"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-94"},{"uid":"868d-2"},{"uid":"868d-32"},{"uid":"868d-38"},{"uid":"868d-40"},{"uid":"868d-34"}],"importedBy":[{"uid":"868d-6"}]},"868d-26":{"id":"/src/datahooks/ExecuteDataHook.tsx","moduleParts":{"datahooks/ExecuteDataHook.js":"868d-27"},"imported":[{"uid":"868d-87"}],"importedBy":[{"uid":"868d-16"}]},"868d-28":{"id":"/src/datahooks/ExecutePermissionHook.tsx","moduleParts":{"datahooks/ExecutePermissionHook.js":"868d-29"},"imported":[{"uid":"868d-87"},{"uid":"868d-88"},{"uid":"868d-2"}],"importedBy":[{"uid":"868d-18"}]},"868d-30":{"id":"/src/utils.ts","moduleParts":{"utils.js":"868d-31"},"imported":[{"uid":"868d-95"}],"importedBy":[{"uid":"868d-22"},{"uid":"868d-38"},{"uid":"868d-54"}]},"868d-32":{"id":"/src/layout/moveItems.ts","moduleParts":{"layout/moveItems.js":"868d-33"},"imported":[{"uid":"868d-86"},{"uid":"868d-95"},{"uid":"868d-48"}],"importedBy":[{"uid":"868d-24"}]},"868d-34":{"id":"/src/layout/components/styles.module.css","moduleParts":{"layout/components/styles.module.css.js":"868d-35"},"imported":[{"uid":"868d-84"}],"importedBy":[{"uid":"868d-24"},{"uid":"868d-40"},{"uid":"868d-76"}]},"868d-36":{"id":"/src/content/components/styles.module.css","moduleParts":{"content/components/styles.module.css.js":"868d-37"},"imported":[{"uid":"868d-84"}],"importedBy":[{"uid":"868d-22"},{"uid":"868d-44"}]},"868d-38":{"id":"/src/layout/components/LayoutItemBar.tsx","moduleParts":{"layout/components/LayoutItemBar.js":"868d-39"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-94"},{"uid":"868d-30"},{"uid":"868d-50"},{"uid":"868d-54"}],"importedBy":[{"uid":"868d-24"}]},"868d-40":{"id":"/src/layout/components/SecondaryMenuToggleItem.tsx","moduleParts":{"layout/components/SecondaryMenuToggleItem.js":"868d-41"},"imported":[{"uid":"868d-87"},{"uid":"868d-94"},{"uid":"868d-34"}],"importedBy":[{"uid":"868d-24"}]},"868d-42":{"id":"/src/content/hooks/useBuildContentData.ts","moduleParts":{"content/hooks/useBuildContentData.js":"868d-43"},"imported":[{"uid":"868d-52"}],"importedBy":[{"uid":"868d-22"},{"uid":"868d-46"}]},"868d-44":{"id":"/src/content/components/Header.tsx","moduleParts":{"content/components/Header.js":"868d-45"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-94"},{"uid":"868d-14"},{"uid":"868d-36"}],"importedBy":[{"uid":"868d-22"}]},"868d-46":{"id":"/src/content/components/SidebarItemWrapper.tsx","moduleParts":{"content/components/SidebarItemWrapper.js":"868d-47"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-96"},{"uid":"868d-94"},{"uid":"868d-42"},{"uid":"868d-14"},{"uid":"868d-56"},{"uid":"868d-58"},{"uid":"868d-60"},{"uid":"868d-62"}],"importedBy":[{"uid":"868d-22"}]},"868d-48":{"id":"/src/layout/types.ts","moduleParts":{"layout/types.js":"868d-49"},"imported":[],"importedBy":[{"uid":"868d-32"},{"uid":"868d-54"}]},"868d-50":{"id":"/src/layout/utils.tsx","moduleParts":{"layout/utils.js":"868d-51"},"imported":[{"uid":"868d-87"},{"uid":"868d-92"},{"uid":"868d-94"},{"uid":"868d-64"}],"importedBy":[{"uid":"868d-38"},{"uid":"868d-76"},{"uid":"868d-80"}]},"868d-52":{"id":"/src/hooks/useBuildData.ts","moduleParts":{"hooks/useBuildData.js":"868d-53"},"imported":[{"uid":"868d-93"},{"uid":"868d-86"},{"uid":"868d-95"},{"uid":"868d-92"},{"uid":"868d-2"},{"uid":"868d-66"},{"uid":"868d-70"},{"uid":"868d-68"}],"importedBy":[{"uid":"868d-42"},{"uid":"868d-54"}]},"868d-54":{"id":"/src/layout/components/LayoutItemWrapper.tsx","moduleParts":{"layout/components/LayoutItemWrapper.js":"868d-55"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-96"},{"uid":"868d-94"},{"uid":"868d-52"},{"uid":"868d-30"},{"uid":"868d-48"},{"uid":"868d-74"},{"uid":"868d-76"},{"uid":"868d-78"},{"uid":"868d-80"}],"importedBy":[{"uid":"868d-38"}]},"868d-56":{"id":"/src/content/components/ActionFormSidebarItemComponent.tsx","moduleParts":{"content/components/ActionFormSidebarItemComponent.js":"868d-57"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-94"},{"uid":"868d-72"},{"uid":"868d-82"}],"importedBy":[{"uid":"868d-46"}]},"868d-58":{"id":"/src/content/components/ActionSidebarItemComponent.tsx","moduleParts":{"content/components/ActionSidebarItemComponent.js":"868d-59"},"imported":[{"uid":"868d-87"},{"uid":"868d-94"},{"uid":"868d-72"}],"importedBy":[{"uid":"868d-46"}]},"868d-60":{"id":"/src/content/components/CustomSidebarItemComponent.tsx","moduleParts":{"content/components/CustomSidebarItemComponent.js":"868d-61"},"imported":[{"uid":"868d-87"}],"importedBy":[{"uid":"868d-46"}]},"868d-62":{"id":"/src/content/components/PlainSidebarItem.tsx","moduleParts":{"content/components/PlainSidebarItem.js":"868d-63"},"imported":[{"uid":"868d-87"},{"uid":"868d-92"},{"uid":"868d-94"},{"uid":"868d-72"}],"importedBy":[{"uid":"868d-46"}]},"868d-64":{"id":"/src/commonItems.ts","moduleParts":{"commonItems.js":"868d-65"},"imported":[],"importedBy":[{"uid":"868d-50"},{"uid":"868d-66"}]},"868d-66":{"id":"/src/hooks/useIsActiveRoute.ts","moduleParts":{"hooks/useIsActiveRoute.js":"868d-67"},"imported":[{"uid":"868d-97"},{"uid":"868d-64"}],"importedBy":[{"uid":"868d-52"}]},"868d-68":{"id":"/src/hooks/useSelectState.ts","moduleParts":{"hooks/useSelectState.js":"868d-69"},"imported":[{"uid":"868d-95"}],"importedBy":[{"uid":"868d-52"}]},"868d-70":{"id":"/src/hooks/useSelectPermission.ts","moduleParts":{"hooks/useSelectPermission.js":"868d-71"},"imported":[{"uid":"868d-95"}],"importedBy":[{"uid":"868d-52"}]},"868d-72":{"id":"/src/content/utils.tsx","moduleParts":{"content/utils.js":"868d-73"},"imported":[{"uid":"868d-87"},{"uid":"868d-94"}],"importedBy":[{"uid":"868d-56"},{"uid":"868d-58"},{"uid":"868d-62"}]},"868d-74":{"id":"/src/layout/components/CustomLayoutItemComponent.tsx","moduleParts":{"layout/components/CustomLayoutItemComponent.js":"868d-75"},"imported":[{"uid":"868d-87"}],"importedBy":[{"uid":"868d-54"}]},"868d-76":{"id":"/src/layout/components/DropdownItem.tsx","moduleParts":{"layout/components/DropdownItem.js":"868d-77"},"imported":[{"uid":"868d-87"},{"uid":"868d-86"},{"uid":"868d-94"},{"uid":"868d-50"},{"uid":"868d-34"}],"importedBy":[{"uid":"868d-54"}]},"868d-78":{"id":"/src/layout/components/MenuItem.tsx","moduleParts":{"layout/components/MenuItem.js":"868d-79"},"imported":[{"uid":"868d-87"},{"uid":"868d-94"}],"importedBy":[{"uid":"868d-54"}]},"868d-80":{"id":"/src/layout/components/PlainItem.tsx","moduleParts":{"layout/components/PlainItem.js":"868d-81"},"imported":[{"uid":"868d-87"},{"uid":"868d-94"},{"uid":"868d-50"}],"importedBy":[{"uid":"868d-54"}]},"868d-82":{"id":"/src/content/components/ActionForm.tsx","moduleParts":{"content/components/ActionForm.js":"868d-83"},"imported":[{"uid":"868d-87"},{"uid":"868d-98"},{"uid":"868d-86"},{"uid":"868d-94"}],"importedBy":[{"uid":"868d-56"}]},"868d-84":{"id":"/home/runner/work/imperium/imperium/node_modules/style-inject/dist/style-inject.es.js","moduleParts":{"external/style-inject/dist/style-inject.es.js":"868d-85"},"imported":[],"importedBy":[{"uid":"868d-34"},{"uid":"868d-36"}]},"868d-86":{"id":"debug","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-10"},{"uid":"868d-6"},{"uid":"868d-8"},{"uid":"868d-16"},{"uid":"868d-18"},{"uid":"868d-20"},{"uid":"868d-24"},{"uid":"868d-22"},{"uid":"868d-32"},{"uid":"868d-38"},{"uid":"868d-44"},{"uid":"868d-46"},{"uid":"868d-54"},{"uid":"868d-52"},{"uid":"868d-56"},{"uid":"868d-76"},{"uid":"868d-82"}],"isExternal":true},"868d-87":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-10"},{"uid":"868d-6"},{"uid":"868d-8"},{"uid":"868d-16"},{"uid":"868d-18"},{"uid":"868d-20"},{"uid":"868d-24"},{"uid":"868d-22"},{"uid":"868d-26"},{"uid":"868d-28"},{"uid":"868d-38"},{"uid":"868d-40"},{"uid":"868d-44"},{"uid":"868d-46"},{"uid":"868d-50"},{"uid":"868d-54"},{"uid":"868d-56"},{"uid":"868d-58"},{"uid":"868d-60"},{"uid":"868d-62"},{"uid":"868d-74"},{"uid":"868d-76"},{"uid":"868d-78"},{"uid":"868d-80"},{"uid":"868d-72"},{"uid":"868d-82"}],"isExternal":true},"868d-88":{"id":"react-redux","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-10"},{"uid":"868d-20"},{"uid":"868d-22"},{"uid":"868d-28"}],"isExternal":true},"868d-89":{"id":"react-responsive","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-10"}],"isExternal":true},"868d-90":{"id":"@imperium/state","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-2"}],"isExternal":true},"868d-91":{"id":"@reduxjs/toolkit","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-2"}],"isExternal":true},"868d-92":{"id":"react-router-dom","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-16"},{"uid":"868d-50"},{"uid":"868d-52"},{"uid":"868d-62"}],"isExternal":true},"868d-93":{"id":"@imperium/auth-client","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-20"},{"uid":"868d-52"}],"isExternal":true},"868d-94":{"id":"semantic-ui-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-24"},{"uid":"868d-38"},{"uid":"868d-40"},{"uid":"868d-44"},{"uid":"868d-46"},{"uid":"868d-50"},{"uid":"868d-54"},{"uid":"868d-56"},{"uid":"868d-58"},{"uid":"868d-62"},{"uid":"868d-76"},{"uid":"868d-78"},{"uid":"868d-80"},{"uid":"868d-72"},{"uid":"868d-82"}],"isExternal":true},"868d-95":{"id":"lodash-es","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-22"},{"uid":"868d-32"},{"uid":"868d-30"},{"uid":"868d-52"},{"uid":"868d-70"},{"uid":"868d-68"}],"isExternal":true},"868d-96":{"id":"mingo","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-46"},{"uid":"868d-54"}],"isExternal":true},"868d-97":{"id":"react-router","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-66"}],"isExternal":true},"868d-98":{"id":"@thx/controls","moduleParts":{},"imported":[],"importedBy":[{"uid":"868d-82"}],"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":"7875-1"}]},{"name":"state.js","children":[{"name":"src/state.ts","uid":"7875-3"}]},{"name":"content/dividerSidebarItem.js","children":[{"name":"src/content/dividerSidebarItem.ts","uid":"7875-5"}]},{"name":"content/createPages.js","children":[{"name":"src/content/createPages.tsx","uid":"7875-7"}]},{"name":"layout/withLayout.js","children":[{"name":"src/layout/withLayout.tsx","uid":"7875-9"}]},{"name":"content/types.js","children":[{"name":"src/content/types.ts","uid":"7875-11"}]},{"name":"content/components/ContentComponent.js","children":[{"name":"src/content/components/ContentComponent.tsx","uid":"7875-13"}]},{"name":"types.js","children":[{"name":"src/types.ts","uid":"7875-15"}]},{"name":"datahooks/DataHooks.js","children":[{"name":"src/datahooks/DataHooks.tsx","uid":"7875-17"}]},{"name":"datahooks/Permissions.js","children":[{"name":"src/datahooks/Permissions.tsx","uid":"7875-19"}]},{"name":"datahooks/PermissionHooks.js","children":[{"name":"src/datahooks/PermissionHooks.tsx","uid":"7875-21"}]},{"name":"layout/components/Layout.js","children":[{"name":"src/layout/components/Layout.tsx","uid":"7875-23"}]},{"name":"utils.js","children":[{"name":"src/utils.ts","uid":"7875-25"}]},{"name":"content/components/styles.module.css.js","children":[{"name":"src/content/components/styles.module.css","uid":"7875-27"}]},{"name":"content/components/Header.js","children":[{"name":"src/content/components/Header.tsx","uid":"7875-29"}]},{"name":"content/components/SidebarItemWrapper.js","children":[{"name":"src/content/components/SidebarItemWrapper.tsx","uid":"7875-31"}]},{"name":"content/hooks/useBuildContentData.js","children":[{"name":"src/content/hooks/useBuildContentData.ts","uid":"7875-33"}]},{"name":"datahooks/ExecuteDataHook.js","children":[{"name":"src/datahooks/ExecuteDataHook.tsx","uid":"7875-35"}]},{"name":"datahooks/ExecutePermissionHook.js","children":[{"name":"src/datahooks/ExecutePermissionHook.tsx","uid":"7875-37"}]},{"name":"layout/moveItems.js","children":[{"name":"src/layout/moveItems.ts","uid":"7875-39"}]},{"name":"layout/components/styles.module.css.js","children":[{"name":"src/layout/components/styles.module.css","uid":"7875-41"}]},{"name":"layout/components/LayoutItemBar.js","children":[{"name":"src/layout/components/LayoutItemBar.tsx","uid":"7875-43"}]},{"name":"layout/components/SecondaryMenuToggleItem.js","children":[{"name":"src/layout/components/SecondaryMenuToggleItem.tsx","uid":"7875-45"}]},{"name":"hooks/useBuildData.js","children":[{"name":"src/hooks/useBuildData.ts","uid":"7875-47"}]},{"name":"content/components/ActionSidebarItemComponent.js","children":[{"name":"src/content/components/ActionSidebarItemComponent.tsx","uid":"7875-49"}]},{"name":"content/components/PlainSidebarItem.js","children":[{"name":"src/content/components/PlainSidebarItem.tsx","uid":"7875-51"}]},{"name":"content/components/ActionFormSidebarItemComponent.js","children":[{"name":"src/content/components/ActionFormSidebarItemComponent.tsx","uid":"7875-53"}]},{"name":"content/components/CustomSidebarItemComponent.js","children":[{"name":"src/content/components/CustomSidebarItemComponent.tsx","uid":"7875-55"}]},{"name":"layout/types.js","children":[{"name":"src/layout/types.ts","uid":"7875-57"}]},{"name":"layout/utils.js","children":[{"name":"src/layout/utils.tsx","uid":"7875-59"}]},{"name":"layout/components/LayoutItemWrapper.js","children":[{"name":"src/layout/components/LayoutItemWrapper.tsx","uid":"7875-61"}]},{"name":"hooks/useSelectPermission.js","children":[{"name":"src/hooks/useSelectPermission.ts","uid":"7875-63"}]},{"name":"hooks/useSelectState.js","children":[{"name":"src/hooks/useSelectState.ts","uid":"7875-65"}]},{"name":"hooks/useIsActiveRoute.js","children":[{"name":"src/hooks/useIsActiveRoute.ts","uid":"7875-67"}]},{"name":"content/utils.js","children":[{"name":"src/content/utils.tsx","uid":"7875-69"}]},{"name":"content/components/ActionForm.js","children":[{"name":"src/content/components/ActionForm.tsx","uid":"7875-71"}]},{"name":"commonItems.js","children":[{"name":"src/commonItems.ts","uid":"7875-73"}]},{"name":"layout/components/CustomLayoutItemComponent.js","children":[{"name":"src/layout/components/CustomLayoutItemComponent.tsx","uid":"7875-75"}]},{"name":"layout/components/PlainItem.js","children":[{"name":"src/layout/components/PlainItem.tsx","uid":"7875-77"}]},{"name":"layout/components/DropdownItem.js","children":[{"name":"src/layout/components/DropdownItem.tsx","uid":"7875-79"}]},{"name":"layout/components/MenuItem.js","children":[{"name":"src/layout/components/MenuItem.tsx","uid":"7875-81"}]},{"name":"external/style-inject/dist/style-inject.es.js","children":[{"name":"home/runner/work/imperium/imperium/node_modules/style-inject/dist/style-inject.es.js","uid":"7875-83"}]}],"isRoot":true},"nodeParts":{"7875-1":{"renderedLength":144,"gzipLength":131,"brotliLength":106,"mainUid":"7875-0"},"7875-3":{"renderedLength":489,"gzipLength":250,"brotliLength":217,"mainUid":"7875-2"},"7875-5":{"renderedLength":59,"gzipLength":73,"brotliLength":63,"mainUid":"7875-4"},"7875-7":{"renderedLength":650,"gzipLength":301,"brotliLength":268,"mainUid":"7875-6"},"7875-9":{"renderedLength":1955,"gzipLength":562,"brotliLength":488,"mainUid":"7875-8"},"7875-11":{"renderedLength":388,"gzipLength":167,"brotliLength":111,"mainUid":"7875-10"},"7875-13":{"renderedLength":1970,"gzipLength":653,"brotliLength":565,"mainUid":"7875-12"},"7875-15":{"renderedLength":121,"gzipLength":111,"brotliLength":90,"mainUid":"7875-14"},"7875-17":{"renderedLength":1058,"gzipLength":390,"brotliLength":330,"mainUid":"7875-16"},"7875-19":{"renderedLength":808,"gzipLength":351,"brotliLength":306,"mainUid":"7875-18"},"7875-21":{"renderedLength":339,"gzipLength":202,"brotliLength":164,"mainUid":"7875-20"},"7875-23":{"renderedLength":2512,"gzipLength":751,"brotliLength":636,"mainUid":"7875-22"},"7875-25":{"renderedLength":145,"gzipLength":117,"brotliLength":116,"mainUid":"7875-24"},"7875-27":{"renderedLength":1639,"gzipLength":581,"brotliLength":473,"mainUid":"7875-26"},"7875-29":{"renderedLength":1042,"gzipLength":377,"brotliLength":323,"mainUid":"7875-28"},"7875-31":{"renderedLength":1189,"gzipLength":399,"brotliLength":314,"mainUid":"7875-30"},"7875-33":{"renderedLength":257,"gzipLength":158,"brotliLength":122,"mainUid":"7875-32"},"7875-35":{"renderedLength":123,"gzipLength":111,"brotliLength":93,"mainUid":"7875-34"},"7875-37":{"renderedLength":345,"gzipLength":207,"brotliLength":172,"mainUid":"7875-36"},"7875-39":{"renderedLength":1401,"gzipLength":376,"brotliLength":347,"mainUid":"7875-38"},"7875-41":{"renderedLength":3176,"gzipLength":928,"brotliLength":762,"mainUid":"7875-40"},"7875-43":{"renderedLength":726,"gzipLength":294,"brotliLength":252,"mainUid":"7875-42"},"7875-45":{"renderedLength":356,"gzipLength":233,"brotliLength":176,"mainUid":"7875-44"},"7875-47":{"renderedLength":799,"gzipLength":370,"brotliLength":330,"mainUid":"7875-46"},"7875-49":{"renderedLength":362,"gzipLength":246,"brotliLength":185,"mainUid":"7875-48"},"7875-51":{"renderedLength":344,"gzipLength":236,"brotliLength":186,"mainUid":"7875-50"},"7875-53":{"renderedLength":663,"gzipLength":346,"brotliLength":277,"mainUid":"7875-52"},"7875-55":{"renderedLength":83,"gzipLength":97,"brotliLength":66,"mainUid":"7875-54"},"7875-57":{"renderedLength":191,"gzipLength":113,"brotliLength":89,"mainUid":"7875-56"},"7875-59":{"renderedLength":915,"gzipLength":393,"brotliLength":328,"mainUid":"7875-58"},"7875-61":{"renderedLength":1503,"gzipLength":487,"brotliLength":399,"mainUid":"7875-60"},"7875-63":{"renderedLength":294,"gzipLength":155,"brotliLength":114,"mainUid":"7875-62"},"7875-65":{"renderedLength":326,"gzipLength":176,"brotliLength":141,"mainUid":"7875-64"},"7875-67":{"renderedLength":514,"gzipLength":227,"brotliLength":187,"mainUid":"7875-66"},"7875-69":{"renderedLength":628,"gzipLength":259,"brotliLength":219,"mainUid":"7875-68"},"7875-71":{"renderedLength":1667,"gzipLength":624,"brotliLength":519,"mainUid":"7875-70"},"7875-73":{"renderedLength":203,"gzipLength":136,"brotliLength":97,"mainUid":"7875-72"},"7875-75":{"renderedLength":82,"gzipLength":96,"brotliLength":66,"mainUid":"7875-74"},"7875-77":{"renderedLength":379,"gzipLength":264,"brotliLength":224,"mainUid":"7875-76"},"7875-79":{"renderedLength":1179,"gzipLength":450,"brotliLength":362,"mainUid":"7875-78"},"7875-81":{"renderedLength":252,"gzipLength":157,"brotliLength":116,"mainUid":"7875-80"},"7875-83":{"renderedLength":636,"gzipLength":318,"brotliLength":242,"mainUid":"7875-82"}},"nodeMetas":{"7875-0":{"id":"/src/index.ts","moduleParts":{"index.js":"7875-1"},"imported":[{"uid":"7875-8"},{"uid":"7875-2"},{"uid":"7875-6"},{"uid":"7875-4"}],"importedBy":[],"isEntry":true},"7875-2":{"id":"/src/state.ts","moduleParts":{"state.js":"7875-3"},"imported":[{"uid":"7875-86"},{"uid":"7875-87"}],"importedBy":[{"uid":"7875-0"},{"uid":"7875-18"},{"uid":"7875-12"},{"uid":"7875-36"},{"uid":"7875-46"}]},"7875-4":{"id":"/src/content/dividerSidebarItem.ts","moduleParts":{"content/dividerSidebarItem.js":"7875-5"},"imported":[],"importedBy":[{"uid":"7875-0"}]},"7875-6":{"id":"/src/content/createPages.tsx","moduleParts":{"content/createPages.js":"7875-7"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-12"},{"uid":"7875-10"}],"importedBy":[{"uid":"7875-0"}]},"7875-8":{"id":"/src/layout/withLayout.tsx","moduleParts":{"layout/withLayout.js":"7875-9"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-16"},{"uid":"7875-20"},{"uid":"7875-18"},{"uid":"7875-14"},{"uid":"7875-22"}],"importedBy":[{"uid":"7875-0"}]},"7875-10":{"id":"/src/content/types.ts","moduleParts":{"content/types.js":"7875-11"},"imported":[],"importedBy":[{"uid":"7875-6"},{"uid":"7875-28"},{"uid":"7875-30"}]},"7875-12":{"id":"/src/content/components/ContentComponent.tsx","moduleParts":{"content/components/ContentComponent.js":"7875-13"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-93"},{"uid":"7875-90"},{"uid":"7875-16"},{"uid":"7875-2"},{"uid":"7875-24"},{"uid":"7875-32"},{"uid":"7875-28"},{"uid":"7875-30"},{"uid":"7875-26"}],"importedBy":[{"uid":"7875-6"}]},"7875-14":{"id":"/src/types.ts","moduleParts":{"types.js":"7875-15"},"imported":[],"importedBy":[{"uid":"7875-8"}]},"7875-16":{"id":"/src/datahooks/DataHooks.tsx","moduleParts":{"datahooks/DataHooks.js":"7875-17"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-88"},{"uid":"7875-34"}],"importedBy":[{"uid":"7875-8"},{"uid":"7875-12"}]},"7875-18":{"id":"/src/datahooks/Permissions.tsx","moduleParts":{"datahooks/Permissions.js":"7875-19"},"imported":[{"uid":"7875-84"},{"uid":"7875-89"},{"uid":"7875-85"},{"uid":"7875-90"},{"uid":"7875-2"}],"importedBy":[{"uid":"7875-8"}]},"7875-20":{"id":"/src/datahooks/PermissionHooks.tsx","moduleParts":{"datahooks/PermissionHooks.js":"7875-21"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-36"}],"importedBy":[{"uid":"7875-8"}]},"7875-22":{"id":"/src/layout/components/Layout.tsx","moduleParts":{"layout/components/Layout.js":"7875-23"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-91"},{"uid":"7875-92"},{"uid":"7875-38"},{"uid":"7875-42"},{"uid":"7875-44"},{"uid":"7875-40"}],"importedBy":[{"uid":"7875-8"}]},"7875-24":{"id":"/src/utils.ts","moduleParts":{"utils.js":"7875-25"},"imported":[{"uid":"7875-93"}],"importedBy":[{"uid":"7875-12"},{"uid":"7875-42"},{"uid":"7875-60"}]},"7875-26":{"id":"/src/content/components/styles.module.css","moduleParts":{"content/components/styles.module.css.js":"7875-27"},"imported":[{"uid":"7875-82"}],"importedBy":[{"uid":"7875-12"},{"uid":"7875-28"}]},"7875-28":{"id":"/src/content/components/Header.tsx","moduleParts":{"content/components/Header.js":"7875-29"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-92"},{"uid":"7875-10"},{"uid":"7875-26"}],"importedBy":[{"uid":"7875-12"}]},"7875-30":{"id":"/src/content/components/SidebarItemWrapper.tsx","moduleParts":{"content/components/SidebarItemWrapper.js":"7875-31"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-94"},{"uid":"7875-92"},{"uid":"7875-32"},{"uid":"7875-10"},{"uid":"7875-52"},{"uid":"7875-48"},{"uid":"7875-54"},{"uid":"7875-50"}],"importedBy":[{"uid":"7875-12"}]},"7875-32":{"id":"/src/content/hooks/useBuildContentData.ts","moduleParts":{"content/hooks/useBuildContentData.js":"7875-33"},"imported":[{"uid":"7875-46"}],"importedBy":[{"uid":"7875-12"},{"uid":"7875-30"}]},"7875-34":{"id":"/src/datahooks/ExecuteDataHook.tsx","moduleParts":{"datahooks/ExecuteDataHook.js":"7875-35"},"imported":[{"uid":"7875-84"}],"importedBy":[{"uid":"7875-16"}]},"7875-36":{"id":"/src/datahooks/ExecutePermissionHook.tsx","moduleParts":{"datahooks/ExecutePermissionHook.js":"7875-37"},"imported":[{"uid":"7875-84"},{"uid":"7875-90"},{"uid":"7875-2"}],"importedBy":[{"uid":"7875-20"}]},"7875-38":{"id":"/src/layout/moveItems.ts","moduleParts":{"layout/moveItems.js":"7875-39"},"imported":[{"uid":"7875-85"},{"uid":"7875-93"},{"uid":"7875-56"}],"importedBy":[{"uid":"7875-22"}]},"7875-40":{"id":"/src/layout/components/styles.module.css","moduleParts":{"layout/components/styles.module.css.js":"7875-41"},"imported":[{"uid":"7875-82"}],"importedBy":[{"uid":"7875-22"},{"uid":"7875-44"},{"uid":"7875-78"}]},"7875-42":{"id":"/src/layout/components/LayoutItemBar.tsx","moduleParts":{"layout/components/LayoutItemBar.js":"7875-43"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-92"},{"uid":"7875-24"},{"uid":"7875-58"},{"uid":"7875-60"}],"importedBy":[{"uid":"7875-22"}]},"7875-44":{"id":"/src/layout/components/SecondaryMenuToggleItem.tsx","moduleParts":{"layout/components/SecondaryMenuToggleItem.js":"7875-45"},"imported":[{"uid":"7875-84"},{"uid":"7875-92"},{"uid":"7875-40"}],"importedBy":[{"uid":"7875-22"}]},"7875-46":{"id":"/src/hooks/useBuildData.ts","moduleParts":{"hooks/useBuildData.js":"7875-47"},"imported":[{"uid":"7875-89"},{"uid":"7875-85"},{"uid":"7875-93"},{"uid":"7875-88"},{"uid":"7875-2"},{"uid":"7875-66"},{"uid":"7875-62"},{"uid":"7875-64"}],"importedBy":[{"uid":"7875-32"},{"uid":"7875-60"}]},"7875-48":{"id":"/src/content/components/ActionSidebarItemComponent.tsx","moduleParts":{"content/components/ActionSidebarItemComponent.js":"7875-49"},"imported":[{"uid":"7875-84"},{"uid":"7875-92"},{"uid":"7875-68"}],"importedBy":[{"uid":"7875-30"}]},"7875-50":{"id":"/src/content/components/PlainSidebarItem.tsx","moduleParts":{"content/components/PlainSidebarItem.js":"7875-51"},"imported":[{"uid":"7875-84"},{"uid":"7875-88"},{"uid":"7875-92"},{"uid":"7875-68"}],"importedBy":[{"uid":"7875-30"}]},"7875-52":{"id":"/src/content/components/ActionFormSidebarItemComponent.tsx","moduleParts":{"content/components/ActionFormSidebarItemComponent.js":"7875-53"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-92"},{"uid":"7875-68"},{"uid":"7875-70"}],"importedBy":[{"uid":"7875-30"}]},"7875-54":{"id":"/src/content/components/CustomSidebarItemComponent.tsx","moduleParts":{"content/components/CustomSidebarItemComponent.js":"7875-55"},"imported":[{"uid":"7875-84"}],"importedBy":[{"uid":"7875-30"}]},"7875-56":{"id":"/src/layout/types.ts","moduleParts":{"layout/types.js":"7875-57"},"imported":[],"importedBy":[{"uid":"7875-38"},{"uid":"7875-60"}]},"7875-58":{"id":"/src/layout/utils.tsx","moduleParts":{"layout/utils.js":"7875-59"},"imported":[{"uid":"7875-84"},{"uid":"7875-88"},{"uid":"7875-92"},{"uid":"7875-72"}],"importedBy":[{"uid":"7875-42"},{"uid":"7875-78"},{"uid":"7875-76"}]},"7875-60":{"id":"/src/layout/components/LayoutItemWrapper.tsx","moduleParts":{"layout/components/LayoutItemWrapper.js":"7875-61"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-94"},{"uid":"7875-92"},{"uid":"7875-46"},{"uid":"7875-24"},{"uid":"7875-56"},{"uid":"7875-74"},{"uid":"7875-78"},{"uid":"7875-80"},{"uid":"7875-76"}],"importedBy":[{"uid":"7875-42"}]},"7875-62":{"id":"/src/hooks/useSelectPermission.ts","moduleParts":{"hooks/useSelectPermission.js":"7875-63"},"imported":[{"uid":"7875-93"}],"importedBy":[{"uid":"7875-46"}]},"7875-64":{"id":"/src/hooks/useSelectState.ts","moduleParts":{"hooks/useSelectState.js":"7875-65"},"imported":[{"uid":"7875-93"}],"importedBy":[{"uid":"7875-46"}]},"7875-66":{"id":"/src/hooks/useIsActiveRoute.ts","moduleParts":{"hooks/useIsActiveRoute.js":"7875-67"},"imported":[{"uid":"7875-95"},{"uid":"7875-72"}],"importedBy":[{"uid":"7875-46"}]},"7875-68":{"id":"/src/content/utils.tsx","moduleParts":{"content/utils.js":"7875-69"},"imported":[{"uid":"7875-84"},{"uid":"7875-92"}],"importedBy":[{"uid":"7875-52"},{"uid":"7875-48"},{"uid":"7875-50"}]},"7875-70":{"id":"/src/content/components/ActionForm.tsx","moduleParts":{"content/components/ActionForm.js":"7875-71"},"imported":[{"uid":"7875-84"},{"uid":"7875-96"},{"uid":"7875-85"},{"uid":"7875-92"}],"importedBy":[{"uid":"7875-52"}]},"7875-72":{"id":"/src/commonItems.ts","moduleParts":{"commonItems.js":"7875-73"},"imported":[],"importedBy":[{"uid":"7875-58"},{"uid":"7875-66"}]},"7875-74":{"id":"/src/layout/components/CustomLayoutItemComponent.tsx","moduleParts":{"layout/components/CustomLayoutItemComponent.js":"7875-75"},"imported":[{"uid":"7875-84"}],"importedBy":[{"uid":"7875-60"}]},"7875-76":{"id":"/src/layout/components/PlainItem.tsx","moduleParts":{"layout/components/PlainItem.js":"7875-77"},"imported":[{"uid":"7875-84"},{"uid":"7875-91"},{"uid":"7875-92"},{"uid":"7875-58"}],"importedBy":[{"uid":"7875-60"}]},"7875-78":{"id":"/src/layout/components/DropdownItem.tsx","moduleParts":{"layout/components/DropdownItem.js":"7875-79"},"imported":[{"uid":"7875-84"},{"uid":"7875-85"},{"uid":"7875-92"},{"uid":"7875-58"},{"uid":"7875-40"}],"importedBy":[{"uid":"7875-60"}]},"7875-80":{"id":"/src/layout/components/MenuItem.tsx","moduleParts":{"layout/components/MenuItem.js":"7875-81"},"imported":[{"uid":"7875-84"},{"uid":"7875-92"}],"importedBy":[{"uid":"7875-60"}]},"7875-82":{"id":"/home/runner/work/imperium/imperium/node_modules/style-inject/dist/style-inject.es.js","moduleParts":{"external/style-inject/dist/style-inject.es.js":"7875-83"},"imported":[],"importedBy":[{"uid":"7875-40"},{"uid":"7875-26"}]},"7875-84":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-8"},{"uid":"7875-6"},{"uid":"7875-16"},{"uid":"7875-20"},{"uid":"7875-18"},{"uid":"7875-22"},{"uid":"7875-12"},{"uid":"7875-34"},{"uid":"7875-36"},{"uid":"7875-42"},{"uid":"7875-44"},{"uid":"7875-28"},{"uid":"7875-30"},{"uid":"7875-58"},{"uid":"7875-60"},{"uid":"7875-52"},{"uid":"7875-48"},{"uid":"7875-54"},{"uid":"7875-50"},{"uid":"7875-74"},{"uid":"7875-78"},{"uid":"7875-80"},{"uid":"7875-76"},{"uid":"7875-68"},{"uid":"7875-70"}],"isExternal":true},"7875-85":{"id":"debug","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-8"},{"uid":"7875-6"},{"uid":"7875-16"},{"uid":"7875-20"},{"uid":"7875-18"},{"uid":"7875-22"},{"uid":"7875-12"},{"uid":"7875-38"},{"uid":"7875-42"},{"uid":"7875-28"},{"uid":"7875-30"},{"uid":"7875-60"},{"uid":"7875-46"},{"uid":"7875-52"},{"uid":"7875-78"},{"uid":"7875-70"}],"isExternal":true},"7875-86":{"id":"@imperium/state","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-2"}],"isExternal":true},"7875-87":{"id":"@reduxjs/toolkit","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-2"}],"isExternal":true},"7875-88":{"id":"react-router-dom","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-16"},{"uid":"7875-58"},{"uid":"7875-46"},{"uid":"7875-50"}],"isExternal":true},"7875-89":{"id":"@imperium/auth-client","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-18"},{"uid":"7875-46"}],"isExternal":true},"7875-90":{"id":"react-redux","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-18"},{"uid":"7875-12"},{"uid":"7875-36"}],"isExternal":true},"7875-91":{"id":"react-responsive","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-22"},{"uid":"7875-76"}],"isExternal":true},"7875-92":{"id":"semantic-ui-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-22"},{"uid":"7875-42"},{"uid":"7875-44"},{"uid":"7875-28"},{"uid":"7875-30"},{"uid":"7875-58"},{"uid":"7875-60"},{"uid":"7875-52"},{"uid":"7875-48"},{"uid":"7875-50"},{"uid":"7875-78"},{"uid":"7875-80"},{"uid":"7875-76"},{"uid":"7875-68"},{"uid":"7875-70"}],"isExternal":true},"7875-93":{"id":"lodash-es","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-12"},{"uid":"7875-38"},{"uid":"7875-24"},{"uid":"7875-46"},{"uid":"7875-62"},{"uid":"7875-64"}],"isExternal":true},"7875-94":{"id":"mingo","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-30"},{"uid":"7875-60"}],"isExternal":true},"7875-95":{"id":"react-router","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-66"}],"isExternal":true},"7875-96":{"id":"@thx/controls","moduleParts":{},"imported":[],"importedBy":[{"uid":"7875-70"}],"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;
|
|
@@ -7,7 +7,7 @@ import type { Data, PermissionSelector, PermissionSelectorHook } from '../types'
|
|
|
7
7
|
* Describes a basic weighted, possibly visible item
|
|
8
8
|
*/
|
|
9
9
|
export interface BaseLayoutItem extends WeightedItem, VisibilityItem {
|
|
10
|
-
text
|
|
10
|
+
text?: string | ((data: Data) => string);
|
|
11
11
|
icon?: SemanticICONS | ((data: Data) => SemanticICONS);
|
|
12
12
|
moveToKey?: string;
|
|
13
13
|
}
|
|
@@ -20,5 +20,5 @@ export declare function linkParameters(item: BaseLayoutItem & RouteItem<Data>, d
|
|
|
20
20
|
active?: undefined;
|
|
21
21
|
to?: undefined;
|
|
22
22
|
};
|
|
23
|
-
export declare function getText(item: BaseLayoutItem, data: Data): string;
|
|
23
|
+
export declare function getText(item: BaseLayoutItem, data: Data): string | undefined;
|
|
24
24
|
export declare function getIcon(item: BaseLayoutItem, data: Data): JSX.Element | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imperium/layout",
|
|
3
|
-
"version": "13.0.4-alpha.
|
|
3
|
+
"version": "13.0.4-alpha.2+56b3d2b",
|
|
4
4
|
"description": "Imperium Layout package",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/darkadept/imperium/issues"
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@imperium/auth-client": "^13.0.
|
|
35
|
-
"@imperium/client": "^13.0.
|
|
36
|
-
"@imperium/router": "^13.0.
|
|
37
|
-
"@imperium/state": "^13.0.
|
|
34
|
+
"@imperium/auth-client": "^13.0.3",
|
|
35
|
+
"@imperium/client": "^13.0.0",
|
|
36
|
+
"@imperium/router": "^13.0.2",
|
|
37
|
+
"@imperium/state": "^13.0.0",
|
|
38
38
|
"@thx/controls": "^17.0.1",
|
|
39
39
|
"debug": "^4.4.0",
|
|
40
40
|
"history": "^5.0.1",
|
|
41
41
|
"lodash-es": "^4.17.21",
|
|
42
|
-
"react-responsive": "^
|
|
42
|
+
"react-responsive": "^9.0.2",
|
|
43
43
|
"react-router": "^5.2.1",
|
|
44
44
|
"react-router-dom": "^5.3.0",
|
|
45
45
|
"semantic-ui-react": "^2.1.2"
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "56b3d2b05f429bfabc4eee87dc21d2644c6c71a5"
|
|
64
64
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import debug from 'debug';
|
|
2
|
-
import { useEffect } from 'react';
|
|
3
|
-
import { useDispatch } from 'react-redux';
|
|
4
|
-
import { useMediaQuery } from 'react-responsive';
|
|
5
|
-
import { useLayoutState, actions } from '../../state.js';
|
|
6
|
-
|
|
7
|
-
const d = debug("imperium.layout.hooks.useMobileLayout");
|
|
8
|
-
function useMobileLayout() {
|
|
9
|
-
const dispatch = useDispatch();
|
|
10
|
-
const { isMobile } = useLayoutState();
|
|
11
|
-
const isMobileX = useMediaQuery({ query: "(max-width: 900px)" });
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
if (isMobile !== isMobileX) {
|
|
14
|
-
d(`Media query change detected: ${isMobile} -> ${isMobileX}`);
|
|
15
|
-
dispatch(actions.setMobile(isMobileX));
|
|
16
|
-
}
|
|
17
|
-
}, [dispatch, isMobile, isMobileX]);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { useMobileLayout };
|
|
21
|
-
//# sourceMappingURL=useMobileLayout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMobileLayout.js","sources":["../../../../src/layout/hooks/useMobileLayout.ts"],"sourcesContent":["import debug from 'debug';\nimport {useEffect} from 'react';\nimport {useDispatch} from 'react-redux';\nimport {useMediaQuery} from 'react-responsive';\nimport {actions, useLayoutState} from '../../state';\n\nconst d = debug('imperium.layout.hooks.useMobileLayout');\n\nexport function useMobileLayout() {\n\tconst dispatch = useDispatch();\n\tconst {isMobile} = useLayoutState();\n\tconst isMobileX = useMediaQuery({query: '(max-width: 900px)'});\n\tuseEffect(() => {\n\t\tif (isMobile !== isMobileX) {\n\t\t\td(`Media query change detected: ${isMobile} -> ${isMobileX}`);\n\t\t\tdispatch(actions.setMobile(isMobileX));\n\t\t}\n\t}, [dispatch, isMobile, isMobileX]);\n}\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,CAAA,GAAI,MAAM,uCAAuC,CAAA,CAAA;AAErB,SAAA,eAAA,GAAA;AACjC,EAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,EAAM,MAAA,EAAC,aAAY,cAAe,EAAA,CAAA;AAClC,EAAA,MAAM,SAAY,GAAA,aAAA,CAAc,EAAC,KAAA,EAAO,sBAAqB,CAAA,CAAA;AAC7D,EAAA,SAAA,CAAU,MAAM;AACf,IAAA,IAAI,aAAa,SAAW,EAAA;AAC3B,MAAE,CAAA,CAAA,CAAA,6BAAA,EAAgC,eAAe,SAAW,CAAA,CAAA,CAAA,CAAA;AAC5D,MAAS,QAAA,CAAA,OAAA,CAAQ,SAAU,CAAA,SAAS,CAAC,CAAA,CAAA;AAAA,KACtC;AAAA,GACE,EAAA,CAAC,QAAU,EAAA,QAAA,EAAU,SAAS,CAAC,CAAA,CAAA;AACnC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useMobileLayout(): void;
|