@things-factory/meta-ui 6.2.125 → 6.2.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
- import"../viewparts/dynamic-menu-part";import"@material/mwc-icon";import gql from"graphql-tag";import{html}from"lit";import{client}from"@operato/graphql";import{appendViewpart,toggleOverlay,TOOL_POSITION,VIEWPART_POSITION}from"@operato/layout";import{store}from"@operato/shell";import{isMobileDevice}from"@operato/utils";import{APPEND_APP_TOOL,REMOVE_APP_TOOL}from"@things-factory/apptool-base";import{clientSettingStore}from"@things-factory/shell";export const UPDATE_META_UI="UPDATE_META_UI";export const UPDATE_META_MENU_TEMPLATE="UPDATE_META_MENU_TEMPLATE";var HAMBURGER;export async function setupMenuPart(e){var{hovering:t=!!isMobileDevice(),slotTemplate:a,portraitSlotTemplate:i,landscapeSlotTemplate:o,position:r=VIEWPART_POSITION.NAVBAR}=e||{};const{hovering:n}=(await clientSettingStore.get("dynamic-menu"))?.value||{};void 0!==n&&(t=n);const p=r==VIEWPART_POSITION.HEADERBAR?"landscape":"portrait",l=("landscape"==p?o:i)||a||html``;appendViewpart({name:"dynamic-menu-part",viewpart:{show:!t,resizable:!0,hovering:!!isMobileDevice()||t,template:html`<dynamic-menu-part .orientation=${p}>${l}</dynamic-menu-part>`},position:r}),t&&"portrait"==p?HAMBURGER||(HAMBURGER={name:"hamburger",template:html`
1
+ import"../viewparts/dynamic-menu-part";import"@material/mwc-icon";import gql from"graphql-tag";import{html}from"lit";import{client}from"@operato/graphql";import{appendViewpart,toggleOverlay,TOOL_POSITION,VIEWPART_POSITION}from"@operato/layout";import{store}from"@operato/shell";import{isMobileDevice}from"@operato/utils";import{APPEND_APP_TOOL,REMOVE_APP_TOOL}from"@things-factory/apptool-base";import{clientSettingStore}from"@things-factory/shell";export const UPDATE_META_UI="UPDATE_META_UI";export const UPDATE_META_MENU_TEMPLATE="UPDATE_META_MENU_TEMPLATE";var HAMBURGER;export async function setupMenuPart(e){var{hovering:t=!!isMobileDevice(),slotTemplate:a,portraitSlotTemplate:i,landscapeSlotTemplate:o,position:r=VIEWPART_POSITION.NAVBAR}=e||{};const{hovering:n}=(await clientSettingStore.get("dynamic-menu"))?.value||{};void 0!==n&&(t=n);const p=r==VIEWPART_POSITION.HEADERBAR?"landscape":"portrait",l=("landscape"==p?o:i)||a||html``;appendViewpart({name:"dynamic-menu-part",viewpart:{show:!t,resizable:!0,hovering:!!isMobileDevice()||t,template:html`<dynamic-menu-part .orientation=${p}>${l}</dynamic-menu-part>`},position:r}),(t||isMobileDevice())&&"portrait"==p?HAMBURGER||(HAMBURGER={name:"hamburger",template:html`
2
2
  <mwc-icon @click=${e=>toggleOverlay("dynamic-menu-part",{backdrop:!0})}
3
- >view_headline</mwc-icon>
3
+ >view_headline</mwc-icon>
4
4
  `,position:TOOL_POSITION.FRONT_END},store.dispatch({type:APPEND_APP_TOOL,tool:HAMBURGER})):HAMBURGER&&(store.dispatch({type:REMOVE_APP_TOOL,name:"hamburger"}),HAMBURGER=null)}export async function updateMenuTemplate(e){var t=document.querySelector('meta[name="application-name"]')?.content,a=(await client.query({query:gql`
5
- query ($filters: [Filter!], $sortings: [Sorting!]) {
6
- liteMenus: liteMenus(filters: $filters
7
- sortings: $sortings) {
8
- items {
9
- id
10
- name
11
- description
12
- appName
13
- parent
14
- rank
15
- active
16
- type
17
- value
18
- icon
19
- }
20
- total
5
+ query ($filters: [Filter!], $sortings: [Sorting!]) {
6
+ liteMenus: liteMenus(filters: $filters
7
+ sortings: $sortings) {
8
+ items {
9
+ id
10
+ name
11
+ description
12
+ appName
13
+ parent
14
+ rank
15
+ active
16
+ type
17
+ value
18
+ icon
21
19
  }
20
+ total
22
21
  }
23
- `,variables:{filters:[{name:"active",operator:"eq",value:!0},{name:"appName",operator:"in",value:["",t]}],sortings:[{name:"rank",desc:!1}]}})).data.liteMenus.items;store.dispatch({type:UPDATE_META_MENU_TEMPLATE,addon:a.filter((e=>!e.appName||e.appName===t)),template:e})}
22
+ }
23
+ `,variables:{filters:[{name:"active",operator:"eq",value:!0},{name:"appName",operator:"in",value:["",t]}],sortings:[{name:"rank",desc:!1}]}})).data.liteMenus.items;store.dispatch({type:UPDATE_META_MENU_TEMPLATE,addon:a.filter((e=>!e.appName||e.appName===t)),template:e})}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/meta-ui",
3
- "version": "6.2.125",
3
+ "version": "6.2.127",
4
4
  "main": "server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,10 +24,10 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@things-factory/lite-menu": "^6.2.122",
28
- "@things-factory/menu-base": "^6.2.122",
27
+ "@things-factory/lite-menu": "^6.2.126",
28
+ "@things-factory/menu-base": "^6.2.126",
29
29
  "@things-factory/operato-license-checker": "^4.0.4",
30
- "@things-factory/shell": "^6.2.122"
30
+ "@things-factory/shell": "^6.2.126"
31
31
  },
32
- "gitHead": "7d694035e7e886593088face69dfefe70b8c0486"
32
+ "gitHead": "42912d556785333808ccb5db0ee534408a01ea33"
33
33
  }