@things-factory/lite-menu 7.0.1-alpha.9 → 7.0.1-alpha.92
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/client/actions/lite-menu.ts +16 -7
- package/client/bootstrap.ts +6 -7
- package/client/lite-menu-setting-let.ts +9 -5
- package/client/pages/addon-menu-setting.ts +43 -10
- package/client/reducers/lite-menu.ts +5 -3
- package/dist-client/actions/lite-menu.d.ts +2 -2
- package/dist-client/actions/lite-menu.js +14 -7
- package/dist-client/actions/lite-menu.js.map +1 -1
- package/dist-client/bootstrap.d.ts +1 -1
- package/dist-client/bootstrap.js +4 -6
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/lite-menu-setting-let.d.ts +1 -2
- package/dist-client/lite-menu-setting-let.js +9 -5
- package/dist-client/lite-menu-setting-let.js.map +1 -1
- package/dist-client/pages/addon-menu-setting.d.ts +0 -1
- package/dist-client/pages/addon-menu-setting.js +40 -10
- package/dist-client/pages/addon-menu-setting.js.map +1 -1
- package/dist-client/reducers/lite-menu.js +5 -3
- package/dist-client/reducers/lite-menu.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/lite-menu/lite-menu-query.js +13 -0
- package/dist-server/service/lite-menu/lite-menu-query.js.map +1 -1
- package/dist-server/service/lite-menu/lite-menu-type.js +9 -0
- package/dist-server/service/lite-menu/lite-menu-type.js.map +1 -1
- package/dist-server/service/lite-menu/lite-menu.js +6 -1
- package/dist-server/service/lite-menu/lite-menu.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -10
- package/server/service/lite-menu/lite-menu-query.ts +9 -1
- package/server/service/lite-menu/lite-menu-type.ts +8 -0
- package/server/service/lite-menu/lite-menu.ts +6 -2
- package/translations/en.json +3 -1
- package/translations/ja.json +3 -1
- package/translations/ko.json +3 -1
- package/translations/ms.json +2 -0
- package/translations/zh.json +3 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/menu/ox-menu-part.js'
|
|
2
|
-
import '@material/mwc-icon'
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { html } from 'lit'
|
|
6
6
|
|
|
7
|
+
import { store, InheritedValueType, clientSettingStore } from '@operato/shell'
|
|
7
8
|
import { client } from '@operato/graphql'
|
|
8
9
|
import { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'
|
|
9
|
-
import { store, InheritedValueType } from '@operato/shell'
|
|
10
10
|
import { isMobileDevice } from '@operato/utils'
|
|
11
|
-
|
|
12
|
-
import { APPEND_APP_TOOL, REMOVE_APP_TOOL } from '@things-factory/apptool-base'
|
|
11
|
+
|
|
12
|
+
import { APPEND_APP_TOOL, REMOVE_APP_TOOL } from '@things-factory/apptool-base/client'
|
|
13
13
|
|
|
14
14
|
export const UPDATE_ADDON_MENUS = 'UPDATE_ADDON_MENUS'
|
|
15
15
|
export const UPDATE_MENU_TEMPLATE = 'UPDATE_MENU_TEMPLATE'
|
|
@@ -44,12 +44,12 @@ export async function setupMenuPart(options) {
|
|
|
44
44
|
HAMBURGER = {
|
|
45
45
|
name: 'hamburger',
|
|
46
46
|
template: html`
|
|
47
|
-
<
|
|
47
|
+
<md-icon
|
|
48
48
|
@click=${e =>
|
|
49
49
|
toggleOverlay('ox-menu-part', {
|
|
50
50
|
backdrop: true
|
|
51
51
|
})}
|
|
52
|
-
>view_headline</
|
|
52
|
+
>view_headline</md-icon
|
|
53
53
|
>
|
|
54
54
|
`,
|
|
55
55
|
position: TOOL_POSITION.FRONT_END
|
|
@@ -73,7 +73,9 @@ export async function setupMenuPart(options) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
export function updateMenuTemplate(template) {
|
|
76
|
+
export async function updateMenuTemplate(template) {
|
|
77
|
+
await fetchAddonMenus()
|
|
78
|
+
|
|
77
79
|
store.dispatch({
|
|
78
80
|
type: UPDATE_MENU_TEMPLATE,
|
|
79
81
|
template
|
|
@@ -91,6 +93,7 @@ export async function fetchAddonMenus() {
|
|
|
91
93
|
items {
|
|
92
94
|
id
|
|
93
95
|
name
|
|
96
|
+
label
|
|
94
97
|
description
|
|
95
98
|
appName
|
|
96
99
|
parent
|
|
@@ -117,6 +120,12 @@ export async function fetchAddonMenus() {
|
|
|
117
120
|
value: ['', applicationName]
|
|
118
121
|
}
|
|
119
122
|
],
|
|
123
|
+
sortings: [
|
|
124
|
+
{
|
|
125
|
+
name: 'rank',
|
|
126
|
+
desc: false
|
|
127
|
+
}
|
|
128
|
+
],
|
|
120
129
|
inherited: InheritedValueType.Include
|
|
121
130
|
}
|
|
122
131
|
})
|
package/client/bootstrap.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
import '@operato/i18n/ox-i18n.js'
|
|
3
3
|
import './route'
|
|
4
4
|
|
|
5
5
|
import { store } from '@operato/shell'
|
|
6
|
-
import { auth } from '@things-factory/auth-base/dist-client'
|
|
7
6
|
|
|
8
|
-
import {
|
|
7
|
+
import { registerEditor as registerGristEditor } from '@operato/data-grist'
|
|
8
|
+
import { OxGristEditorI18nLabel } from '@operato/grist-editor/ox-grist-editor-i18n-label.js'
|
|
9
|
+
|
|
9
10
|
import liteMenu from './reducers/lite-menu'
|
|
10
11
|
|
|
11
12
|
export default function bootstrap() {
|
|
12
|
-
|
|
13
|
+
registerGristEditor('i18n-label', OxGristEditorI18nLabel)
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
fetchAddonMenus()
|
|
16
|
-
})
|
|
15
|
+
store.addReducers({ liteMenu })
|
|
17
16
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import '@material/mwc-formfield'
|
|
2
|
-
import '@material/mwc-checkbox'
|
|
3
1
|
import '@operato/i18n/ox-i18n.js'
|
|
2
|
+
import '@material/web/checkbox/checkbox.js'
|
|
4
3
|
|
|
5
4
|
import { css, html, LitElement } from 'lit'
|
|
6
5
|
import { customElement, query, property, state } from 'lit/decorators.js'
|
|
@@ -15,6 +14,10 @@ export class LiteMenuSettingLet extends localize(i18next)(LitElement) {
|
|
|
15
14
|
static styles = [
|
|
16
15
|
css`
|
|
17
16
|
label {
|
|
17
|
+
display: flex;
|
|
18
|
+
gap: 10px;
|
|
19
|
+
align-items: center;
|
|
20
|
+
|
|
18
21
|
font: var(--label-font);
|
|
19
22
|
color: var(--label-color);
|
|
20
23
|
text-transform: var(--label-text-transform);
|
|
@@ -33,9 +36,10 @@ export class LiteMenuSettingLet extends localize(i18next)(LitElement) {
|
|
|
33
36
|
<ox-i18n slot="title" msgid="title.lite-menu-setting"></ox-i18n>
|
|
34
37
|
|
|
35
38
|
<div slot="content">
|
|
36
|
-
<
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
+
<label>
|
|
40
|
+
<md-checkbox id="hovering" @change=${e => this.onChange(e)} ?checked=${checked} ?indeterminate=${indeterminate}></md-checkbox>
|
|
41
|
+
hovering
|
|
42
|
+
</label>
|
|
39
43
|
</div>
|
|
40
44
|
</setting-let>
|
|
41
45
|
`
|
|
@@ -4,7 +4,6 @@ import '@operato/data-grist/ox-sorters-control.js'
|
|
|
4
4
|
import '@operato/data-grist/ox-record-creator.js'
|
|
5
5
|
import '@operato/popup/ox-popup.js'
|
|
6
6
|
import '@operato/context/ox-context-page-toolbar.js'
|
|
7
|
-
import '@material/mwc-icon'
|
|
8
7
|
|
|
9
8
|
import gql from 'graphql-tag'
|
|
10
9
|
import { css, html } from 'lit'
|
|
@@ -15,17 +14,21 @@ import { DataGrist, getEditor, getRenderer } from '@operato/data-grist'
|
|
|
15
14
|
import { client } from '@operato/graphql'
|
|
16
15
|
import { i18next, localize } from '@operato/i18n'
|
|
17
16
|
import { PageView, store } from '@operato/shell'
|
|
18
|
-
import { ScrollbarStyles, CommonHeaderStyles } from '@operato/styles'
|
|
17
|
+
import { CommonGristStyles, ScrollbarStyles, CommonHeaderStyles } from '@operato/styles'
|
|
19
18
|
import { isMobileDevice } from '@operato/utils'
|
|
20
19
|
|
|
20
|
+
import { getLanguages } from '@things-factory/auth-base/dist-client'
|
|
21
|
+
import { p13n } from '@operato/p13n'
|
|
22
|
+
|
|
21
23
|
import { fetchAddonMenus } from '../actions/lite-menu'
|
|
22
24
|
|
|
23
25
|
const applicationName = (document.querySelector('meta[name="application-name"]') as HTMLMetaElement)?.content
|
|
24
26
|
|
|
25
27
|
@customElement('addon-menu-setting')
|
|
26
|
-
class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
|
|
28
|
+
class AddonMenuSetting extends connect(store)(p13n(localize(i18next)(PageView))) {
|
|
27
29
|
static styles = [
|
|
28
30
|
ScrollbarStyles,
|
|
31
|
+
CommonGristStyles,
|
|
29
32
|
CommonHeaderStyles,
|
|
30
33
|
css`
|
|
31
34
|
:host {
|
|
@@ -45,6 +48,7 @@ class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
|
|
|
45
48
|
|
|
46
49
|
@state() config: any
|
|
47
50
|
@state() mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'
|
|
51
|
+
|
|
48
52
|
@state() menus: any[] = []
|
|
49
53
|
|
|
50
54
|
@query('ox-grist') private grist!: DataGrist
|
|
@@ -65,7 +69,10 @@ class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
|
|
|
65
69
|
action: () => {
|
|
66
70
|
this.onDelete()
|
|
67
71
|
},
|
|
68
|
-
icon: 'delete'
|
|
72
|
+
icon: 'delete',
|
|
73
|
+
emphasis: {
|
|
74
|
+
danger: true
|
|
75
|
+
}
|
|
69
76
|
},
|
|
70
77
|
{
|
|
71
78
|
title: i18next.t('button.save'),
|
|
@@ -88,12 +95,14 @@ class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
|
|
|
88
95
|
|
|
89
96
|
render() {
|
|
90
97
|
return html`
|
|
91
|
-
<ox-grist
|
|
98
|
+
<ox-grist
|
|
99
|
+
.mode=${this.mode}
|
|
100
|
+
.config=${this.config}
|
|
101
|
+
.fetchHandler=${this.fetchHandler}
|
|
102
|
+
.personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')}
|
|
103
|
+
>
|
|
92
104
|
<div slot="headroom" class="header">
|
|
93
|
-
<div class="title">
|
|
94
|
-
<mwc-icon>summarize</mwc-icon>
|
|
95
|
-
${i18next.t('text.addon-menu management')}
|
|
96
|
-
</div>
|
|
105
|
+
<div class="title">${i18next.t('text.addon-menu management')}</div>
|
|
97
106
|
|
|
98
107
|
<div class="filters">
|
|
99
108
|
<ox-filters-form autofocus without-search></ox-filters-form>
|
|
@@ -101,6 +110,8 @@ class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
|
|
|
101
110
|
|
|
102
111
|
<ox-context-page-toolbar class="actions" .context=${this.context}> </ox-context-page-toolbar>
|
|
103
112
|
</div>
|
|
113
|
+
|
|
114
|
+
<ox-grist-personalizer slot="setting"></ox-grist-personalizer>
|
|
104
115
|
</ox-grist>
|
|
105
116
|
`
|
|
106
117
|
}
|
|
@@ -126,6 +137,7 @@ class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
|
|
|
126
137
|
rank: record.rank,
|
|
127
138
|
active: record.active,
|
|
128
139
|
privilege: record.privilege,
|
|
140
|
+
labels: record.labels,
|
|
129
141
|
type: record.type,
|
|
130
142
|
value: record.value,
|
|
131
143
|
icon: record.icon
|
|
@@ -220,7 +232,7 @@ class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
|
|
|
220
232
|
fetchAddonMenus() /* update menu-system */
|
|
221
233
|
}
|
|
222
234
|
|
|
223
|
-
async pageInitialized() {
|
|
235
|
+
async pageInitialized(lifecycle) {
|
|
224
236
|
this.config = {
|
|
225
237
|
list: {
|
|
226
238
|
thumbnail: 'value',
|
|
@@ -261,6 +273,25 @@ class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
|
|
|
261
273
|
sortable: true,
|
|
262
274
|
width: 120
|
|
263
275
|
},
|
|
276
|
+
{
|
|
277
|
+
type: 'i18n-label',
|
|
278
|
+
name: 'labels',
|
|
279
|
+
record: {
|
|
280
|
+
align: 'left',
|
|
281
|
+
editable: true,
|
|
282
|
+
renderer: (value, column, record, rowIndex, field) =>
|
|
283
|
+
html`<span>${value && typeof value == 'object' ? value[i18next.language] : record['name']}</span>`,
|
|
284
|
+
options: {
|
|
285
|
+
objectified: true,
|
|
286
|
+
languages: await getLanguages(),
|
|
287
|
+
displayColumn: 'label'
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
header: i18next.t('field.i18n-label'),
|
|
291
|
+
sortable: true,
|
|
292
|
+
filter: 'search',
|
|
293
|
+
width: 120
|
|
294
|
+
},
|
|
264
295
|
{
|
|
265
296
|
type: 'string',
|
|
266
297
|
name: 'description',
|
|
@@ -436,6 +467,7 @@ class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
|
|
|
436
467
|
items {
|
|
437
468
|
id
|
|
438
469
|
name
|
|
470
|
+
label
|
|
439
471
|
description
|
|
440
472
|
appName
|
|
441
473
|
parent
|
|
@@ -456,6 +488,7 @@ class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
|
|
|
456
488
|
owner
|
|
457
489
|
super
|
|
458
490
|
}
|
|
491
|
+
labels
|
|
459
492
|
createdAt
|
|
460
493
|
updatedAt
|
|
461
494
|
creator {
|
|
@@ -30,7 +30,7 @@ function buildMenus(template, addon) {
|
|
|
30
30
|
/* iterate group to put menu into parent menu */
|
|
31
31
|
groups.forEach(group => {
|
|
32
32
|
group.forEach(menu => {
|
|
33
|
-
const { parent, name, rank, type, value, icon } = menu
|
|
33
|
+
const { parent, name, rank, label, type, value, icon } = menu
|
|
34
34
|
|
|
35
35
|
const parentMenu = parent && menus.find(m => m.name === parent)
|
|
36
36
|
if (parentMenu && !parentMenu.menus) {
|
|
@@ -39,14 +39,16 @@ function buildMenus(template, addon) {
|
|
|
39
39
|
const children = parentMenu ? parentMenu.menus : menus
|
|
40
40
|
children.push({
|
|
41
41
|
name,
|
|
42
|
+
label,
|
|
43
|
+
rank,
|
|
42
44
|
type,
|
|
43
45
|
path:
|
|
44
46
|
type === 'page'
|
|
45
47
|
? value
|
|
46
48
|
: type === 'board'
|
|
47
|
-
? `board-viewer/${value}?title=${name}`
|
|
49
|
+
? `board-viewer/${value}?title=${label || name}`
|
|
48
50
|
: type === 'interactive-board'
|
|
49
|
-
? `board-viewer/${value}?interactive=true&title=${name}`
|
|
51
|
+
? `board-viewer/${value}?interactive=true&title=${label || name}`
|
|
50
52
|
: '',
|
|
51
53
|
icon: icon || (type === 'page' ? 'menu' : type === 'board' || type === 'interactive-board' ? 'dashboard' : '')
|
|
52
54
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
1
2
|
import '@operato/menu/ox-menu-part.js';
|
|
2
|
-
import '@material/mwc-icon';
|
|
3
3
|
export declare const UPDATE_ADDON_MENUS = "UPDATE_ADDON_MENUS";
|
|
4
4
|
export declare const UPDATE_MENU_TEMPLATE = "UPDATE_MENU_TEMPLATE";
|
|
5
5
|
export declare function setupMenuPart(options: any): Promise<void>;
|
|
6
|
-
export declare function updateMenuTemplate(template: any): void
|
|
6
|
+
export declare function updateMenuTemplate(template: any): Promise<void>;
|
|
7
7
|
export declare function fetchAddonMenus(): Promise<void>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
1
2
|
import '@operato/menu/ox-menu-part.js';
|
|
2
|
-
import '@material/mwc-icon';
|
|
3
3
|
import gql from 'graphql-tag';
|
|
4
4
|
import { html } from 'lit';
|
|
5
|
+
import { store, InheritedValueType, clientSettingStore } from '@operato/shell';
|
|
5
6
|
import { client } from '@operato/graphql';
|
|
6
7
|
import { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout';
|
|
7
|
-
import { store, InheritedValueType } from '@operato/shell';
|
|
8
8
|
import { isMobileDevice } from '@operato/utils';
|
|
9
|
-
import {
|
|
10
|
-
import { APPEND_APP_TOOL, REMOVE_APP_TOOL } from '@things-factory/apptool-base';
|
|
9
|
+
import { APPEND_APP_TOOL, REMOVE_APP_TOOL } from '@things-factory/apptool-base/client';
|
|
11
10
|
export const UPDATE_ADDON_MENUS = 'UPDATE_ADDON_MENUS';
|
|
12
11
|
export const UPDATE_MENU_TEMPLATE = 'UPDATE_MENU_TEMPLATE';
|
|
13
12
|
var HAMBURGER;
|
|
@@ -36,11 +35,11 @@ export async function setupMenuPart(options) {
|
|
|
36
35
|
HAMBURGER = {
|
|
37
36
|
name: 'hamburger',
|
|
38
37
|
template: html `
|
|
39
|
-
<
|
|
38
|
+
<md-icon
|
|
40
39
|
@click=${e => toggleOverlay('ox-menu-part', {
|
|
41
40
|
backdrop: true
|
|
42
41
|
})}
|
|
43
|
-
>view_headline</
|
|
42
|
+
>view_headline</md-icon
|
|
44
43
|
>
|
|
45
44
|
`,
|
|
46
45
|
position: TOOL_POSITION.FRONT_END
|
|
@@ -62,7 +61,8 @@ export async function setupMenuPart(options) {
|
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
|
-
export function updateMenuTemplate(template) {
|
|
64
|
+
export async function updateMenuTemplate(template) {
|
|
65
|
+
await fetchAddonMenus();
|
|
66
66
|
store.dispatch({
|
|
67
67
|
type: UPDATE_MENU_TEMPLATE,
|
|
68
68
|
template
|
|
@@ -78,6 +78,7 @@ export async function fetchAddonMenus() {
|
|
|
78
78
|
items {
|
|
79
79
|
id
|
|
80
80
|
name
|
|
81
|
+
label
|
|
81
82
|
description
|
|
82
83
|
appName
|
|
83
84
|
parent
|
|
@@ -104,6 +105,12 @@ export async function fetchAddonMenus() {
|
|
|
104
105
|
value: ['', applicationName]
|
|
105
106
|
}
|
|
106
107
|
],
|
|
108
|
+
sortings: [
|
|
109
|
+
{
|
|
110
|
+
name: 'rank',
|
|
111
|
+
desc: false
|
|
112
|
+
}
|
|
113
|
+
],
|
|
107
114
|
inherited: InheritedValueType.Include
|
|
108
115
|
}
|
|
109
116
|
})).data.liteMenus.items;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lite-menu.js","sourceRoot":"","sources":["../../client/actions/lite-menu.ts"],"names":[],"mappings":"AAAA,OAAO
|
|
1
|
+
{"version":3,"file":"lite-menu.js","sourceRoot":"","sources":["../../client/actions/lite-menu.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,+BAA+B,CAAA;AAEtC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE1B,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAEtF,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAA;AACtD,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAA;AAE1D,IAAI,SAAS,CAAA;AAEb,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAO;;IACzC,IAAI,EAAE,QAAQ,GAAG,cAAc,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,QAAQ,GAAG,iBAAiB,CAAC,MAAM,EAAE,GAAG,OAAO,IAAI,EAAE,CAAA;IAElK,MAAM,EAAE,QAA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,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/menu/ox-menu-part.js'\n\nimport gql from 'graphql-tag'\nimport { html } from 'lit'\n\nimport { store, InheritedValueType, clientSettingStore } from '@operato/shell'\nimport { client } from '@operato/graphql'\nimport { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { APPEND_APP_TOOL, REMOVE_APP_TOOL } from '@things-factory/apptool-base/client'\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 { hovering = isMobileDevice() ? true : false, slotTemplate, portraitSlotTemplate, landscapeSlotTemplate, position = VIEWPART_POSITION.NAVBAR } = 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 = (orientation == 'landscape' ? landscapeSlotTemplate : portraitSlotTemplate) || slotTemplate || html``\n\n appendViewpart({\n name: 'ox-menu-part',\n viewpart: {\n show: !hovering,\n resizable: true,\n hovering: isMobileDevice() ? true : hovering,\n template: html` <ox-menu-part .orientation=${orientation}>${orientatedSlotTemplate}</ox-menu-part> `\n },\n position\n })\n\n // hovering이 true거나 모바일 일때는 계속 햄버거 버튼 표시\n if ((hovering || isMobileDevice()) && orientation == 'portrait') {\n if (!HAMBURGER) {\n HAMBURGER = {\n name: 'hamburger',\n template: html`\n <md-icon\n @click=${e =>\n toggleOverlay('ox-menu-part', {\n backdrop: true\n })}\n >view_headline</md-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 async function updateMenuTemplate(template) {\n await fetchAddonMenus()\n\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 label\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 sortings: [\n {\n name: 'rank',\n desc: false\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
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
2
|
import '@operato/i18n/ox-i18n.js';
|
|
3
3
|
import './route';
|
|
4
4
|
import { store } from '@operato/shell';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { registerEditor as registerGristEditor } from '@operato/data-grist';
|
|
6
|
+
import { OxGristEditorI18nLabel } from '@operato/grist-editor/ox-grist-editor-i18n-label.js';
|
|
7
7
|
import liteMenu from './reducers/lite-menu';
|
|
8
8
|
export default function bootstrap() {
|
|
9
|
+
registerGristEditor('i18n-label', OxGristEditorI18nLabel);
|
|
9
10
|
store.addReducers({ liteMenu });
|
|
10
|
-
auth.on('profile', async () => {
|
|
11
|
-
fetchAddonMenus();
|
|
12
|
-
});
|
|
13
11
|
}
|
|
14
12
|
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,SAAS,CAAA;AAEhB,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEtC,OAAO,EAAE,cAAc,IAAI,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAA;AAE5F,OAAO,QAAQ,MAAM,sBAAsB,CAAA;AAE3C,MAAM,CAAC,OAAO,UAAU,SAAS;IAC/B,mBAAmB,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAA;IAEzD,KAAK,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;AACjC,CAAC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/i18n/ox-i18n.js'\nimport './route'\n\nimport { store } from '@operato/shell'\n\nimport { registerEditor as registerGristEditor } from '@operato/data-grist'\nimport { OxGristEditorI18nLabel } from '@operato/grist-editor/ox-grist-editor-i18n-label.js'\n\nimport liteMenu from './reducers/lite-menu'\n\nexport default function bootstrap() {\n registerGristEditor('i18n-label', OxGristEditorI18nLabel)\n\n store.addReducers({ liteMenu })\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import '@material/mwc-formfield';
|
|
2
|
-
import '@material/mwc-checkbox';
|
|
3
1
|
import '@operato/i18n/ox-i18n.js';
|
|
2
|
+
import '@material/web/checkbox/checkbox.js';
|
|
4
3
|
import { LitElement } from 'lit';
|
|
5
4
|
declare const LiteMenuSettingLet_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
6
5
|
export declare class LiteMenuSettingLet extends LiteMenuSettingLet_base {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import '@material/mwc-formfield';
|
|
3
|
-
import '@material/mwc-checkbox';
|
|
4
2
|
import '@operato/i18n/ox-i18n.js';
|
|
3
|
+
import '@material/web/checkbox/checkbox.js';
|
|
5
4
|
import { css, html, LitElement } from 'lit';
|
|
6
5
|
import { customElement, property } from 'lit/decorators.js';
|
|
7
6
|
import { clientSettingStore } from '@operato/shell';
|
|
@@ -16,9 +15,10 @@ let LiteMenuSettingLet = class LiteMenuSettingLet extends localize(i18next)(LitE
|
|
|
16
15
|
<ox-i18n slot="title" msgid="title.lite-menu-setting"></ox-i18n>
|
|
17
16
|
|
|
18
17
|
<div slot="content">
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
18
|
+
<label>
|
|
19
|
+
<md-checkbox id="hovering" @change=${e => this.onChange(e)} ?checked=${checked} ?indeterminate=${indeterminate}></md-checkbox>
|
|
20
|
+
hovering
|
|
21
|
+
</label>
|
|
22
22
|
</div>
|
|
23
23
|
</setting-let>
|
|
24
24
|
`;
|
|
@@ -61,6 +61,10 @@ let LiteMenuSettingLet = class LiteMenuSettingLet extends localize(i18next)(LitE
|
|
|
61
61
|
LiteMenuSettingLet.styles = [
|
|
62
62
|
css `
|
|
63
63
|
label {
|
|
64
|
+
display: flex;
|
|
65
|
+
gap: 10px;
|
|
66
|
+
align-items: center;
|
|
67
|
+
|
|
64
68
|
font: var(--label-font);
|
|
65
69
|
color: var(--label-color);
|
|
66
70
|
text-transform: var(--label-text-transform);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lite-menu-setting-let.js","sourceRoot":"","sources":["../client/lite-menu-setting-let.ts"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"lite-menu-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1B;aAAM;YACL,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;SACrB;QAED,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAA,MAAA,CAAC,MAAM,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,0CAAE,KAAK,KAAI,EAAE,CAAA;QAC7F,IAAI,IAAI,CAAC,QAAQ,KAAK,cAAc,EAAE;YACpC,OAAM;SACP;QAED,IAAI;YACF,MAAM,kBAAkB,CAAC,GAAG,CAAC;gBAC3B,GAAG,EAAE,WAAW;gBAChB,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;;;;;;;;;;KAUF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;oDAAmB;AAfpC,kBAAkB;IAD9B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,kBAAkB,CAoE9B;SApEY,kBAAkB","sourcesContent":["import '@operato/i18n/ox-i18n.js'\nimport '@material/web/checkbox/checkbox.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 display: flex;\n gap: 10px;\n align-items: center;\n\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 <label>\n <md-checkbox id=\"hovering\" @change=${e => this.onChange(e)} ?checked=${checked} ?indeterminate=${indeterminate}></md-checkbox>\n hovering\n </label>\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"]}
|
|
@@ -6,7 +6,6 @@ import '@operato/data-grist/ox-sorters-control.js';
|
|
|
6
6
|
import '@operato/data-grist/ox-record-creator.js';
|
|
7
7
|
import '@operato/popup/ox-popup.js';
|
|
8
8
|
import '@operato/context/ox-context-page-toolbar.js';
|
|
9
|
-
import '@material/mwc-icon';
|
|
10
9
|
import gql from 'graphql-tag';
|
|
11
10
|
import { css, html } from 'lit';
|
|
12
11
|
import { customElement, query, state } from 'lit/decorators.js';
|
|
@@ -15,11 +14,13 @@ import { DataGrist, getEditor, getRenderer } from '@operato/data-grist';
|
|
|
15
14
|
import { client } from '@operato/graphql';
|
|
16
15
|
import { i18next, localize } from '@operato/i18n';
|
|
17
16
|
import { PageView, store } from '@operato/shell';
|
|
18
|
-
import { ScrollbarStyles, CommonHeaderStyles } from '@operato/styles';
|
|
17
|
+
import { CommonGristStyles, ScrollbarStyles, CommonHeaderStyles } from '@operato/styles';
|
|
19
18
|
import { isMobileDevice } from '@operato/utils';
|
|
19
|
+
import { getLanguages } from '@things-factory/auth-base/dist-client';
|
|
20
|
+
import { p13n } from '@operato/p13n';
|
|
20
21
|
import { fetchAddonMenus } from '../actions/lite-menu';
|
|
21
22
|
const applicationName = (_a = document.querySelector('meta[name="application-name"]')) === null || _a === void 0 ? void 0 : _a.content;
|
|
22
|
-
let AddonMenuSetting = class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
|
|
23
|
+
let AddonMenuSetting = class AddonMenuSetting extends connect(store)(p13n(localize(i18next)(PageView))) {
|
|
23
24
|
constructor() {
|
|
24
25
|
super(...arguments);
|
|
25
26
|
this.mode = isMobileDevice() ? 'CARD' : 'GRID';
|
|
@@ -41,7 +42,10 @@ let AddonMenuSetting = class AddonMenuSetting extends connect(store)(localize(i1
|
|
|
41
42
|
action: () => {
|
|
42
43
|
this.onDelete();
|
|
43
44
|
},
|
|
44
|
-
icon: 'delete'
|
|
45
|
+
icon: 'delete',
|
|
46
|
+
emphasis: {
|
|
47
|
+
danger: true
|
|
48
|
+
}
|
|
45
49
|
},
|
|
46
50
|
{
|
|
47
51
|
title: i18next.t('button.save'),
|
|
@@ -63,12 +67,14 @@ let AddonMenuSetting = class AddonMenuSetting extends connect(store)(localize(i1
|
|
|
63
67
|
}
|
|
64
68
|
render() {
|
|
65
69
|
return html `
|
|
66
|
-
<ox-grist
|
|
70
|
+
<ox-grist
|
|
71
|
+
.mode=${this.mode}
|
|
72
|
+
.config=${this.config}
|
|
73
|
+
.fetchHandler=${this.fetchHandler}
|
|
74
|
+
.personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')}
|
|
75
|
+
>
|
|
67
76
|
<div slot="headroom" class="header">
|
|
68
|
-
<div class="title">
|
|
69
|
-
<mwc-icon>summarize</mwc-icon>
|
|
70
|
-
${i18next.t('text.addon-menu management')}
|
|
71
|
-
</div>
|
|
77
|
+
<div class="title">${i18next.t('text.addon-menu management')}</div>
|
|
72
78
|
|
|
73
79
|
<div class="filters">
|
|
74
80
|
<ox-filters-form autofocus without-search></ox-filters-form>
|
|
@@ -76,6 +82,8 @@ let AddonMenuSetting = class AddonMenuSetting extends connect(store)(localize(i1
|
|
|
76
82
|
|
|
77
83
|
<ox-context-page-toolbar class="actions" .context=${this.context}> </ox-context-page-toolbar>
|
|
78
84
|
</div>
|
|
85
|
+
|
|
86
|
+
<ox-grist-personalizer slot="setting"></ox-grist-personalizer>
|
|
79
87
|
</ox-grist>
|
|
80
88
|
`;
|
|
81
89
|
}
|
|
@@ -97,6 +105,7 @@ let AddonMenuSetting = class AddonMenuSetting extends connect(store)(localize(i1
|
|
|
97
105
|
rank: record.rank,
|
|
98
106
|
active: record.active,
|
|
99
107
|
privilege: record.privilege,
|
|
108
|
+
labels: record.labels,
|
|
100
109
|
type: record.type,
|
|
101
110
|
value: record.value,
|
|
102
111
|
icon: record.icon
|
|
@@ -171,7 +180,7 @@ let AddonMenuSetting = class AddonMenuSetting extends connect(store)(localize(i1
|
|
|
171
180
|
grist.fetch();
|
|
172
181
|
fetchAddonMenus(); /* update menu-system */
|
|
173
182
|
}
|
|
174
|
-
async pageInitialized() {
|
|
183
|
+
async pageInitialized(lifecycle) {
|
|
175
184
|
this.config = {
|
|
176
185
|
list: {
|
|
177
186
|
thumbnail: 'value',
|
|
@@ -212,6 +221,24 @@ let AddonMenuSetting = class AddonMenuSetting extends connect(store)(localize(i1
|
|
|
212
221
|
sortable: true,
|
|
213
222
|
width: 120
|
|
214
223
|
},
|
|
224
|
+
{
|
|
225
|
+
type: 'i18n-label',
|
|
226
|
+
name: 'labels',
|
|
227
|
+
record: {
|
|
228
|
+
align: 'left',
|
|
229
|
+
editable: true,
|
|
230
|
+
renderer: (value, column, record, rowIndex, field) => html `<span>${value && typeof value == 'object' ? value[i18next.language] : record['name']}</span>`,
|
|
231
|
+
options: {
|
|
232
|
+
objectified: true,
|
|
233
|
+
languages: await getLanguages(),
|
|
234
|
+
displayColumn: 'label'
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
header: i18next.t('field.i18n-label'),
|
|
238
|
+
sortable: true,
|
|
239
|
+
filter: 'search',
|
|
240
|
+
width: 120
|
|
241
|
+
},
|
|
215
242
|
{
|
|
216
243
|
type: 'string',
|
|
217
244
|
name: 'description',
|
|
@@ -383,6 +410,7 @@ let AddonMenuSetting = class AddonMenuSetting extends connect(store)(localize(i1
|
|
|
383
410
|
items {
|
|
384
411
|
id
|
|
385
412
|
name
|
|
413
|
+
label
|
|
386
414
|
description
|
|
387
415
|
appName
|
|
388
416
|
parent
|
|
@@ -403,6 +431,7 @@ let AddonMenuSetting = class AddonMenuSetting extends connect(store)(localize(i1
|
|
|
403
431
|
owner
|
|
404
432
|
super
|
|
405
433
|
}
|
|
434
|
+
labels
|
|
406
435
|
createdAt
|
|
407
436
|
updatedAt
|
|
408
437
|
creator {
|
|
@@ -442,6 +471,7 @@ let AddonMenuSetting = class AddonMenuSetting extends connect(store)(localize(i1
|
|
|
442
471
|
};
|
|
443
472
|
AddonMenuSetting.styles = [
|
|
444
473
|
ScrollbarStyles,
|
|
474
|
+
CommonGristStyles,
|
|
445
475
|
CommonHeaderStyles,
|
|
446
476
|
css `
|
|
447
477
|
:host {
|