@things-factory/lite-menu 6.2.101 → 6.2.102
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/package.json +3 -3
- package/dist-client/actions/lite-menu.d.ts +0 -7
- package/dist-client/actions/lite-menu.js +0 -114
- package/dist-client/actions/lite-menu.js.map +0 -1
- package/dist-client/bootstrap.d.ts +0 -4
- package/dist-client/bootstrap.js +0 -14
- package/dist-client/bootstrap.js.map +0 -1
- package/dist-client/index.d.ts +0 -4
- package/dist-client/index.js +0 -5
- package/dist-client/index.js.map +0 -1
- package/dist-client/lite-menu-setting-let.d.ts +0 -13
- package/dist-client/lite-menu-setting-let.js +0 -83
- package/dist-client/lite-menu-setting-let.js.map +0 -1
- package/dist-client/pages/addon-menu-setting.d.ts +0 -7
- package/dist-client/pages/addon-menu-setting.js +0 -480
- package/dist-client/pages/addon-menu-setting.js.map +0 -1
- package/dist-client/reducers/lite-menu.d.ts +0 -14
- package/dist-client/reducers/lite-menu.js +0 -60
- package/dist-client/reducers/lite-menu.js.map +0 -1
- package/dist-client/route.d.ts +0 -1
- package/dist-client/route.js +0 -8
- package/dist-client/route.js.map +0 -1
- package/dist-client/tsconfig.tsbuildinfo +0 -1
- package/dist-client/viewparts/lite-menu-landscape-styles.d.ts +0 -1
- package/dist-client/viewparts/lite-menu-landscape-styles.js +0 -149
- package/dist-client/viewparts/lite-menu-landscape-styles.js.map +0 -1
- package/dist-client/viewparts/lite-menu-landscape.d.ts +0 -20
- package/dist-client/viewparts/lite-menu-landscape.js +0 -103
- package/dist-client/viewparts/lite-menu-landscape.js.map +0 -1
- package/dist-client/viewparts/lite-menu-part.d.ts +0 -28
- package/dist-client/viewparts/lite-menu-part.js +0 -143
- package/dist-client/viewparts/lite-menu-part.js.map +0 -1
- package/dist-client/viewparts/lite-menu-portrait-styles.d.ts +0 -1
- package/dist-client/viewparts/lite-menu-portrait-styles.js +0 -147
- package/dist-client/viewparts/lite-menu-portrait-styles.js.map +0 -1
- package/dist-client/viewparts/lite-menu-portrait.d.ts +0 -12
- package/dist-client/viewparts/lite-menu-portrait.js +0 -89
- package/dist-client/viewparts/lite-menu-portrait.js.map +0 -1
- package/dist-client/viewparts/top-menu-bar.d.ts +0 -22
- package/dist-client/viewparts/top-menu-bar.js +0 -150
- package/dist-client/viewparts/top-menu-bar.js.map +0 -1
- package/dist-server/index.js +0 -5
- package/dist-server/index.js.map +0 -1
- package/dist-server/service/index.js +0 -19
- package/dist-server/service/index.js.map +0 -1
- package/dist-server/service/lite-menu/index.js +0 -9
- package/dist-server/service/lite-menu/index.js.map +0 -1
- package/dist-server/service/lite-menu/lite-menu-mutation.js +0 -60
- package/dist-server/service/lite-menu/lite-menu-mutation.js.map +0 -1
- package/dist-server/service/lite-menu/lite-menu-query.js +0 -121
- package/dist-server/service/lite-menu/lite-menu-query.js.map +0 -1
- package/dist-server/service/lite-menu/lite-menu-type.js +0 -114
- package/dist-server/service/lite-menu/lite-menu-type.js.map +0 -1
- package/dist-server/service/lite-menu/lite-menu.js +0 -140
- package/dist-server/service/lite-menu/lite-menu.js.map +0 -1
- package/dist-server/tsconfig.tsbuildinfo +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/lite-menu",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.102",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"@things-factory/apptool-base": "^6.2.101",
|
|
41
41
|
"@things-factory/auth-base": "^6.2.101",
|
|
42
42
|
"@things-factory/board-service": "^6.2.101",
|
|
43
|
-
"@things-factory/board-ui": "^6.2.
|
|
43
|
+
"@things-factory/board-ui": "^6.2.102",
|
|
44
44
|
"@things-factory/more-base": "^6.2.101",
|
|
45
45
|
"@things-factory/setting-base": "^6.2.101",
|
|
46
46
|
"@things-factory/utils": "^6.2.96"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "de7dc909722996bd44373ef2a8ad2e6f5a0b88d6"
|
|
49
49
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import '../viewparts/lite-menu-part';
|
|
2
|
-
import '@material/mwc-icon';
|
|
3
|
-
export declare const UPDATE_ADDON_MENUS = "UPDATE_ADDON_MENUS";
|
|
4
|
-
export declare const UPDATE_MENU_TEMPLATE = "UPDATE_MENU_TEMPLATE";
|
|
5
|
-
export declare function setupMenuPart(options: any): Promise<void>;
|
|
6
|
-
export declare function updateMenuTemplate(template: any): void;
|
|
7
|
-
export declare function fetchAddonMenus(): Promise<void>;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import '../viewparts/lite-menu-part';
|
|
2
|
-
import '@material/mwc-icon';
|
|
3
|
-
import gql from 'graphql-tag';
|
|
4
|
-
import { html } from 'lit';
|
|
5
|
-
import { client } from '@operato/graphql';
|
|
6
|
-
import { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout';
|
|
7
|
-
import { store, InheritedValueType } from '@operato/shell';
|
|
8
|
-
import { isMobileDevice } from '@operato/utils';
|
|
9
|
-
import { clientSettingStore } from '@operato/shell';
|
|
10
|
-
import { APPEND_APP_TOOL, REMOVE_APP_TOOL } from '@things-factory/apptool-base';
|
|
11
|
-
export const UPDATE_ADDON_MENUS = 'UPDATE_ADDON_MENUS';
|
|
12
|
-
export const UPDATE_MENU_TEMPLATE = 'UPDATE_MENU_TEMPLATE';
|
|
13
|
-
var HAMBURGER;
|
|
14
|
-
export async function setupMenuPart(options) {
|
|
15
|
-
var _a;
|
|
16
|
-
var { hovering = isMobileDevice() ? true : false, slotTemplate, portraitSlotTemplate, landscapeSlotTemplate, position = VIEWPART_POSITION.NAVBAR } = options || {};
|
|
17
|
-
const { hovering: hoveringSetting } = ((_a = (await clientSettingStore.get('lite-menu'))) === null || _a === void 0 ? void 0 : _a.value) || {};
|
|
18
|
-
if (hoveringSetting !== undefined) {
|
|
19
|
-
hovering = hoveringSetting;
|
|
20
|
-
}
|
|
21
|
-
const orientation = position == VIEWPART_POSITION.HEADERBAR ? 'landscape' : 'portrait';
|
|
22
|
-
const orientatedSlotTemplate = (orientation == 'landscape' ? landscapeSlotTemplate : portraitSlotTemplate) || slotTemplate || html ``;
|
|
23
|
-
appendViewpart({
|
|
24
|
-
name: 'lite-menu-part',
|
|
25
|
-
viewpart: {
|
|
26
|
-
show: !hovering,
|
|
27
|
-
resizable: true,
|
|
28
|
-
hovering: isMobileDevice() ? true : hovering,
|
|
29
|
-
template: html ` <lite-menu-part .orientation=${orientation}>${orientatedSlotTemplate}</lite-menu-part> `
|
|
30
|
-
},
|
|
31
|
-
position
|
|
32
|
-
});
|
|
33
|
-
if (hovering && orientation == 'portrait') {
|
|
34
|
-
if (!HAMBURGER) {
|
|
35
|
-
HAMBURGER = {
|
|
36
|
-
name: 'hamburger',
|
|
37
|
-
template: html `
|
|
38
|
-
<mwc-icon
|
|
39
|
-
@click=${e => toggleOverlay('lite-menu-part', {
|
|
40
|
-
backdrop: true
|
|
41
|
-
})}
|
|
42
|
-
>view_headline</mwc-icon
|
|
43
|
-
>
|
|
44
|
-
`,
|
|
45
|
-
position: TOOL_POSITION.FRONT_END
|
|
46
|
-
};
|
|
47
|
-
store.dispatch({
|
|
48
|
-
/* incase of mobile : add hamburger tool */
|
|
49
|
-
type: APPEND_APP_TOOL,
|
|
50
|
-
tool: HAMBURGER
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
if (HAMBURGER) {
|
|
56
|
-
store.dispatch({
|
|
57
|
-
type: REMOVE_APP_TOOL,
|
|
58
|
-
name: 'hamburger'
|
|
59
|
-
});
|
|
60
|
-
HAMBURGER = null;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
export function updateMenuTemplate(template) {
|
|
65
|
-
store.dispatch({
|
|
66
|
-
type: UPDATE_MENU_TEMPLATE,
|
|
67
|
-
template
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
export async function fetchAddonMenus() {
|
|
71
|
-
var _a;
|
|
72
|
-
var applicationName = (_a = document.querySelector('meta[name="application-name"]')) === null || _a === void 0 ? void 0 : _a.content;
|
|
73
|
-
var liteMenus = (await client.query({
|
|
74
|
-
query: gql `
|
|
75
|
-
query ($filters: [Filter!], $inherited: InheritedValueType) {
|
|
76
|
-
liteMenus: myLiteMenus(filters: $filters, inherited: $inherited) {
|
|
77
|
-
items {
|
|
78
|
-
id
|
|
79
|
-
name
|
|
80
|
-
description
|
|
81
|
-
appName
|
|
82
|
-
parent
|
|
83
|
-
rank
|
|
84
|
-
active
|
|
85
|
-
type
|
|
86
|
-
value
|
|
87
|
-
icon
|
|
88
|
-
}
|
|
89
|
-
total
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
`,
|
|
93
|
-
variables: {
|
|
94
|
-
filters: [
|
|
95
|
-
{
|
|
96
|
-
name: 'active',
|
|
97
|
-
operator: 'eq',
|
|
98
|
-
value: true
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: 'appName',
|
|
102
|
-
operator: 'in',
|
|
103
|
-
value: ['', applicationName]
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
inherited: InheritedValueType.Include
|
|
107
|
-
}
|
|
108
|
-
})).data.liteMenus.items;
|
|
109
|
-
store.dispatch({
|
|
110
|
-
type: UPDATE_ADDON_MENUS,
|
|
111
|
-
addon: liteMenus.filter(menu => !menu.appName || menu.appName === applicationName)
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
//# sourceMappingURL=lite-menu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lite-menu.js","sourceRoot":"","sources":["../../client/actions/lite-menu.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,C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AI,eAAe,GAAG,MAAC,QAAQ,CAAC,aAAa,CAAC,+BAA+B,CAAqB,0CAAE,OAAO,CAAA;IAE3G,IAAI,SAAS,GAAG,CACd,MAAM,MAAM,CAAC,KAAK,CAAC;QACjB,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;OAkBT;QACD,SAAS,EAAE;YACT,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;oBACd,KAAK,EAAE,IAAI;iBACZ;gBACD;oBACE,IAAI,EAAE,SAAS;oBACf,QAAQ,EAAE,IAAI;oBACd,KAAK,EAAE,CAAC,EAAE,EAAE,eAAe,CAAC;iBAC7B;aACF;YACD,SAAS,EAAE,kBAAkB,CAAC,OAAO;SACtC;KACF,CAAC,CACH,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAA;IAEtB,KAAK,CAAC,QAAQ,CAAC;QACb,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,KAAK,eAAe,CAAC;KACnF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import '../viewparts/lite-menu-part'\nimport '@material/mwc-icon'\n\nimport gql from 'graphql-tag'\nimport { html } from 'lit'\n\nimport { client } from '@operato/graphql'\nimport { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'\nimport { store, InheritedValueType } from '@operato/shell'\nimport { isMobileDevice } from '@operato/utils'\nimport { clientSettingStore } from '@operato/shell'\nimport { APPEND_APP_TOOL, REMOVE_APP_TOOL } from '@things-factory/apptool-base'\n\nexport const UPDATE_ADDON_MENUS = 'UPDATE_ADDON_MENUS'\nexport const UPDATE_MENU_TEMPLATE = 'UPDATE_MENU_TEMPLATE'\n\nvar HAMBURGER\n\nexport async function setupMenuPart(options) {\n var {\n hovering = isMobileDevice() ? true : false,\n slotTemplate,\n portraitSlotTemplate,\n landscapeSlotTemplate,\n position = VIEWPART_POSITION.NAVBAR\n } = options || {}\n\n const { hovering: hoveringSetting } = (await clientSettingStore.get('lite-menu'))?.value || {}\n if (hoveringSetting !== undefined) {\n hovering = hoveringSetting\n }\n\n const orientation = position == VIEWPART_POSITION.HEADERBAR ? 'landscape' : 'portrait'\n const orientatedSlotTemplate =\n (orientation == 'landscape' ? landscapeSlotTemplate : portraitSlotTemplate) || slotTemplate || html``\n\n appendViewpart({\n name: 'lite-menu-part',\n viewpart: {\n show: !hovering,\n resizable: true,\n hovering: isMobileDevice() ? true : hovering,\n template: html` <lite-menu-part .orientation=${orientation}>${orientatedSlotTemplate}</lite-menu-part> `\n },\n position\n })\n\n if (hovering && orientation == 'portrait') {\n if (!HAMBURGER) {\n HAMBURGER = {\n name: 'hamburger',\n template: html`\n <mwc-icon\n @click=${e =>\n toggleOverlay('lite-menu-part', {\n backdrop: true\n })}\n >view_headline</mwc-icon\n >\n `,\n position: TOOL_POSITION.FRONT_END\n }\n\n store.dispatch({\n /* incase of mobile : add hamburger tool */\n type: APPEND_APP_TOOL,\n tool: HAMBURGER\n })\n }\n } else {\n if (HAMBURGER) {\n store.dispatch({\n type: REMOVE_APP_TOOL,\n name: 'hamburger'\n })\n\n HAMBURGER = null\n }\n }\n}\n\nexport function updateMenuTemplate(template) {\n store.dispatch({\n type: UPDATE_MENU_TEMPLATE,\n template\n })\n}\n\nexport async function fetchAddonMenus() {\n var applicationName = (document.querySelector('meta[name=\"application-name\"]') as HTMLMetaElement)?.content\n\n var liteMenus = (\n await client.query({\n query: gql`\n query ($filters: [Filter!], $inherited: InheritedValueType) {\n liteMenus: myLiteMenus(filters: $filters, inherited: $inherited) {\n items {\n id\n name\n description\n appName\n parent\n rank\n active\n type\n value\n icon\n }\n total\n }\n }\n `,\n variables: {\n filters: [\n {\n name: 'active',\n operator: 'eq',\n value: true\n },\n {\n name: 'appName',\n operator: 'in',\n value: ['', applicationName]\n }\n ],\n inherited: InheritedValueType.Include\n }\n })\n ).data.liteMenus.items\n\n store.dispatch({\n type: UPDATE_ADDON_MENUS,\n addon: liteMenus.filter(menu => !menu.appName || menu.appName === applicationName)\n })\n}\n"]}
|
package/dist-client/bootstrap.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import '@material/mwc-icon';
|
|
2
|
-
import '@operato/i18n/ox-i18n.js';
|
|
3
|
-
import './route';
|
|
4
|
-
import { store } from '@operato/shell';
|
|
5
|
-
import { auth } from '@things-factory/auth-base/dist-client';
|
|
6
|
-
import { fetchAddonMenus } from './actions/lite-menu';
|
|
7
|
-
import liteMenu from './reducers/lite-menu';
|
|
8
|
-
export default function bootstrap() {
|
|
9
|
-
store.addReducers({ liteMenu });
|
|
10
|
-
auth.on('profile', async () => {
|
|
11
|
-
fetchAddonMenus();
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,0BAA0B,CAAA;AACjC,OAAO,SAAS,CAAA;AAIhB,OAAO,EAAY,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAA;AAG5D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,QAAQ,MAAM,sBAAsB,CAAA;AAE3C,MAAM,CAAC,OAAO,UAAU,SAAS;IAC/B,KAAK,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;IAE/B,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QAC5B,eAAe,EAAE,CAAA;IACnB,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import '@material/mwc-icon'\nimport '@operato/i18n/ox-i18n.js'\nimport './route'\n\nimport { html } from 'lit'\n\nimport { navigate, store } from '@operato/shell'\nimport { auth } from '@things-factory/auth-base/dist-client'\nimport { ADD_MORENDA } from '@things-factory/more-base'\n\nimport { fetchAddonMenus } from './actions/lite-menu'\nimport liteMenu from './reducers/lite-menu'\n\nexport default function bootstrap() {\n store.addReducers({ liteMenu })\n\n auth.on('profile', async () => {\n fetchAddonMenus()\n })\n}\n"]}
|
package/dist-client/index.d.ts
DELETED
package/dist-client/index.js
DELETED
package/dist-client/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../client/index.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AAEjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA","sourcesContent":["import './viewparts/lite-menu-part'\nimport './viewparts/top-menu-bar'\n\nexport * from './actions/lite-menu'\nexport * from './lite-menu-setting-let'\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import '@material/mwc-formfield';
|
|
2
|
-
import '@material/mwc-checkbox';
|
|
3
|
-
import '@operato/i18n/ox-i18n.js';
|
|
4
|
-
import { LitElement } from 'lit';
|
|
5
|
-
declare const LiteMenuSettingLet_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
6
|
-
export declare class LiteMenuSettingLet extends LiteMenuSettingLet_base {
|
|
7
|
-
static styles: import("lit").CSSResult[];
|
|
8
|
-
hovering?: boolean;
|
|
9
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
-
firstUpdated(): Promise<void>;
|
|
11
|
-
onChange(e: Event): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import '@material/mwc-formfield';
|
|
3
|
-
import '@material/mwc-checkbox';
|
|
4
|
-
import '@operato/i18n/ox-i18n.js';
|
|
5
|
-
import { css, html, LitElement } from 'lit';
|
|
6
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
7
|
-
import { clientSettingStore } from '@operato/shell';
|
|
8
|
-
import { i18next, localize } from '@operato/i18n';
|
|
9
|
-
import { setupMenuPart } from './actions/lite-menu';
|
|
10
|
-
let LiteMenuSettingLet = class LiteMenuSettingLet extends localize(i18next)(LitElement) {
|
|
11
|
-
render() {
|
|
12
|
-
const checked = this.hovering === true;
|
|
13
|
-
const indeterminate = this.hovering === undefined;
|
|
14
|
-
return html `
|
|
15
|
-
<setting-let>
|
|
16
|
-
<ox-i18n slot="title" msgid="title.lite-menu-setting"></ox-i18n>
|
|
17
|
-
|
|
18
|
-
<div slot="content">
|
|
19
|
-
<mwc-formfield label="hovering">
|
|
20
|
-
<mwc-checkbox
|
|
21
|
-
id="hovering"
|
|
22
|
-
@change=${e => this.onChange(e)}
|
|
23
|
-
?checked=${checked}
|
|
24
|
-
?indeterminate=${indeterminate}
|
|
25
|
-
></mwc-checkbox>
|
|
26
|
-
</mwc-formfield>
|
|
27
|
-
</div>
|
|
28
|
-
</setting-let>
|
|
29
|
-
`;
|
|
30
|
-
}
|
|
31
|
-
async firstUpdated() {
|
|
32
|
-
var _a;
|
|
33
|
-
this.hovering = (((_a = (await clientSettingStore.get('lite-menu'))) === null || _a === void 0 ? void 0 : _a.value) || {}).hovering;
|
|
34
|
-
}
|
|
35
|
-
async onChange(e) {
|
|
36
|
-
var _a;
|
|
37
|
-
if (this.hovering === true) {
|
|
38
|
-
this.hovering = false;
|
|
39
|
-
}
|
|
40
|
-
else if (this.hovering === false) {
|
|
41
|
-
this.hovering = undefined;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this.hovering = true;
|
|
45
|
-
}
|
|
46
|
-
const { hovering: valueFromStore } = ((_a = (await clientSettingStore.get('lite-menu'))) === null || _a === void 0 ? void 0 : _a.value) || {};
|
|
47
|
-
if (this.hovering === valueFromStore) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
try {
|
|
51
|
-
await clientSettingStore.put({
|
|
52
|
-
key: 'lite-menu',
|
|
53
|
-
value: {
|
|
54
|
-
hovering: this.hovering
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
catch (e) {
|
|
59
|
-
console.error(e);
|
|
60
|
-
}
|
|
61
|
-
setupMenuPart({
|
|
62
|
-
hovering: this.hovering
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
LiteMenuSettingLet.styles = [
|
|
67
|
-
css `
|
|
68
|
-
label {
|
|
69
|
-
font: var(--label-font);
|
|
70
|
-
color: var(--label-color);
|
|
71
|
-
text-transform: var(--label-text-transform);
|
|
72
|
-
}
|
|
73
|
-
`
|
|
74
|
-
];
|
|
75
|
-
__decorate([
|
|
76
|
-
property({ type: Boolean }),
|
|
77
|
-
__metadata("design:type", Boolean)
|
|
78
|
-
], LiteMenuSettingLet.prototype, "hovering", void 0);
|
|
79
|
-
LiteMenuSettingLet = __decorate([
|
|
80
|
-
customElement('lite-menu-setting-let')
|
|
81
|
-
], LiteMenuSettingLet);
|
|
82
|
-
export { LiteMenuSettingLet };
|
|
83
|
-
//# sourceMappingURL=lite-menu-setting-let.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lite-menu-setting-let.js","sourceRoot":"","sources":["../client/lite-menu-setting-let.ts"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAA;AAChC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAS,QAAQ,EAAS,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM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KAAK,EAAE;oBACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;iBACxB;aACF,CAAC,CAAA;SACH;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;SACjB;QAED,aAAa,CAAC;YACZ,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAA;IACJ,CAAC;;AAlEM,yBAAM,GAAG;IACd,GAAG,CAAA;;;;;;KAMF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;oDAAmB;AAXpC,kBAAkB;IAD9B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,kBAAkB,CAoE9B;SApEY,kBAAkB","sourcesContent":["import '@material/mwc-formfield'\nimport '@material/mwc-checkbox'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, query, property, state } from 'lit/decorators.js'\n\nimport { clientSettingStore } from '@operato/shell'\nimport { i18next, localize } from '@operato/i18n'\n\nimport { setupMenuPart } from './actions/lite-menu'\n\n@customElement('lite-menu-setting-let')\nexport class LiteMenuSettingLet extends localize(i18next)(LitElement) {\n static styles = [\n css`\n label {\n font: var(--label-font);\n color: var(--label-color);\n text-transform: var(--label-text-transform);\n }\n `\n ]\n\n @property({ type: Boolean }) hovering?: boolean\n\n render() {\n const checked = this.hovering === true\n const indeterminate = this.hovering === undefined\n\n return html`\n <setting-let>\n <ox-i18n slot=\"title\" msgid=\"title.lite-menu-setting\"></ox-i18n>\n\n <div slot=\"content\">\n <mwc-formfield label=\"hovering\">\n <mwc-checkbox\n id=\"hovering\"\n @change=${e => this.onChange(e)}\n ?checked=${checked}\n ?indeterminate=${indeterminate}\n ></mwc-checkbox>\n </mwc-formfield>\n </div>\n </setting-let>\n `\n }\n\n async firstUpdated() {\n this.hovering = ((await clientSettingStore.get('lite-menu'))?.value || {}).hovering\n }\n\n async onChange(e: Event) {\n if (this.hovering === true) {\n this.hovering = false\n } else if (this.hovering === false) {\n this.hovering = undefined\n } else {\n this.hovering = true\n }\n\n const { hovering: valueFromStore } = (await clientSettingStore.get('lite-menu'))?.value || {}\n if (this.hovering === valueFromStore) {\n return\n }\n\n try {\n await clientSettingStore.put({\n key: 'lite-menu',\n value: {\n hovering: this.hovering\n }\n })\n } catch (e) {\n console.error(e)\n }\n\n setupMenuPart({\n hovering: this.hovering\n })\n }\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import '@operato/data-grist/ox-grist.js';
|
|
2
|
-
import '@operato/data-grist/ox-filters-form.js';
|
|
3
|
-
import '@operato/data-grist/ox-sorters-control.js';
|
|
4
|
-
import '@operato/data-grist/ox-record-creator.js';
|
|
5
|
-
import '@operato/popup/ox-popup.js';
|
|
6
|
-
import '@operato/context/ox-context-page-toolbar.js';
|
|
7
|
-
import '@material/mwc-icon';
|