@things-factory/reference-app 6.2.0 → 6.2.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/client/bootstrap.js +97 -34
- package/package.json +6 -6
package/client/bootstrap.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@things-factory/auth-ui' /* for domain-switch */
|
|
2
2
|
import '@things-factory/barcode-base' /* for <default-label-printer-setting-let> */
|
|
3
3
|
import '@things-factory/notification' /* for notification-badge */
|
|
4
|
+
import '@things-factory/board-ui'
|
|
4
5
|
import './components/ocr-viewpart'
|
|
5
6
|
import '@operato/dataset/usecase/ccp'
|
|
6
7
|
import '@operato/dataset/usecase/qc'
|
|
@@ -19,6 +20,7 @@ import { isMobileDevice } from '@operato/utils'
|
|
|
19
20
|
import { APPEND_APP_TOOL } from '@things-factory/apptool-base'
|
|
20
21
|
import { setupAppToolPart } from '@things-factory/apptool-ui'
|
|
21
22
|
import { auth } from '@things-factory/auth-base'
|
|
23
|
+
import { hasPrivilege } from '@things-factory/auth-base/dist-client'
|
|
22
24
|
import { setAuthManagementMenus } from '@things-factory/auth-ui'
|
|
23
25
|
import { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu'
|
|
24
26
|
import { setupContextUIPart } from '@things-factory/context-ui'
|
|
@@ -94,51 +96,112 @@ export default async function bootstrap() {
|
|
|
94
96
|
// }
|
|
95
97
|
// })
|
|
96
98
|
|
|
97
|
-
auth
|
|
98
|
-
|
|
99
|
-
setAuthManagementMenus(credential)
|
|
99
|
+
/* set auth management menus into more-panel */
|
|
100
|
+
setAuthManagementMenus()
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
102
|
+
if (await hasPrivilege({ name: 'mutation', category: 'user', domainOwnerGranted: true, superUserGranted: true })) {
|
|
103
|
+
store.dispatch({
|
|
104
|
+
type: ADD_MORENDA,
|
|
105
|
+
morenda: {
|
|
106
|
+
icon: html` <mwc-icon>vpn_key</mwc-icon> `,
|
|
107
|
+
name: html` <ox-i18n msgid="text.oauth2-clients"></ox-i18n> `,
|
|
108
|
+
action: () => {
|
|
109
|
+
navigate('oauth2-clients')
|
|
110
110
|
}
|
|
111
|
-
}
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
}
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
115
|
+
if (await hasPrivilege({ name: 'mutation', category: 'board', domainOwnerGranted: true })) {
|
|
116
|
+
store.dispatch({
|
|
117
|
+
type: ADD_MORENDA,
|
|
118
|
+
morenda: {
|
|
119
|
+
icon: html` <mwc-icon>font_download</mwc-icon> `,
|
|
120
|
+
name: html` <ox-i18n msgid="menu.fonts"></ox-i18n> `,
|
|
121
|
+
action: () => {
|
|
122
|
+
navigate('font-list')
|
|
121
123
|
}
|
|
122
|
-
}
|
|
124
|
+
}
|
|
125
|
+
})
|
|
123
126
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
127
|
+
store.dispatch({
|
|
128
|
+
type: ADD_MORENDA,
|
|
129
|
+
morenda: {
|
|
130
|
+
icon: html` <mwc-icon>attachment</mwc-icon> `,
|
|
131
|
+
name: html` <ox-i18n msgid="menu.attachments"></ox-i18n> `,
|
|
132
|
+
action: () => {
|
|
133
|
+
navigate('attachment-list')
|
|
132
134
|
}
|
|
133
|
-
}
|
|
135
|
+
}
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
store.dispatch({
|
|
139
|
+
type: ADD_MORENDA,
|
|
140
|
+
morenda: {
|
|
141
|
+
icon: html` <mwc-icon>dvr</mwc-icon> `,
|
|
142
|
+
name: html` <ox-i18n msgid="menu.board-list"></ox-i18n> `,
|
|
143
|
+
action: () => {
|
|
144
|
+
navigate('board-list')
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
store.dispatch({
|
|
150
|
+
type: ADD_MORENDA,
|
|
151
|
+
morenda: {
|
|
152
|
+
icon: html` <mwc-icon>airplay</mwc-icon> `,
|
|
153
|
+
name: html` <ox-i18n msgid="menu.play-groups"></ox-i18n> `,
|
|
154
|
+
action: () => {
|
|
155
|
+
navigate('play-list')
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
})
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (await hasPrivilege({ name: 'mutation', category: 'scenario', domainOwnerGranted: true })) {
|
|
162
|
+
store.dispatch({
|
|
163
|
+
type: ADD_MORENDA,
|
|
164
|
+
morenda: {
|
|
165
|
+
icon: html` <mwc-icon>device_hub</mwc-icon> `,
|
|
166
|
+
name: html` <ox-i18n msgid="text.connection"></ox-i18n> `,
|
|
167
|
+
action: () => {
|
|
168
|
+
navigate('connection')
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
})
|
|
134
172
|
|
|
173
|
+
store.dispatch({
|
|
174
|
+
type: ADD_MORENDA,
|
|
175
|
+
morenda: {
|
|
176
|
+
icon: html` <mwc-icon>format_list_numbered</mwc-icon> `,
|
|
177
|
+
name: html` <ox-i18n msgid="text.scenario"></ox-i18n> `,
|
|
178
|
+
action: () => {
|
|
179
|
+
navigate('scenario')
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
store.dispatch({
|
|
185
|
+
type: ADD_MORENDA,
|
|
186
|
+
morenda: {
|
|
187
|
+
icon: html` <mwc-icon>hub</mwc-icon> `,
|
|
188
|
+
name: html` <ox-i18n msgid="text.integration analysis"></ox-i18n> (beta)`,
|
|
189
|
+
action: () => {
|
|
190
|
+
navigate('integration-analysis')
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
})
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
auth.on('profile', async ({ credential }) => {
|
|
197
|
+
if (credential.owner) {
|
|
135
198
|
store.dispatch({
|
|
136
199
|
type: ADD_MORENDA,
|
|
137
200
|
morenda: {
|
|
138
|
-
icon: html` <mwc-icon>
|
|
139
|
-
name: html` <ox-i18n msgid="
|
|
201
|
+
icon: html` <mwc-icon>pending_actions</mwc-icon> `,
|
|
202
|
+
name: html` <ox-i18n msgid="title.work-shift"></ox-i18n> `,
|
|
140
203
|
action: () => {
|
|
141
|
-
navigate('
|
|
204
|
+
navigate('work-shift')
|
|
142
205
|
}
|
|
143
206
|
}
|
|
144
207
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/reference-app",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.2",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@things-factory/api": "^6.2.0",
|
|
71
71
|
"@things-factory/apptool-ui": "^6.2.0",
|
|
72
72
|
"@things-factory/attachment-base": "^6.2.0",
|
|
73
|
-
"@things-factory/auth-ui": "^6.2.
|
|
73
|
+
"@things-factory/auth-ui": "^6.2.1",
|
|
74
74
|
"@things-factory/board-service": "^6.2.0",
|
|
75
75
|
"@things-factory/board-ui": "^6.2.0",
|
|
76
76
|
"@things-factory/ccp": "^6.2.0",
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
"@things-factory/integration-ui": "^6.2.0",
|
|
85
85
|
"@things-factory/lite-menu": "^6.2.0",
|
|
86
86
|
"@things-factory/more-ui": "^6.2.0",
|
|
87
|
-
"@things-factory/notification": "^6.2.
|
|
87
|
+
"@things-factory/notification": "^6.2.1",
|
|
88
88
|
"@things-factory/oauth2-client": "^6.2.0",
|
|
89
89
|
"@things-factory/organization": "^6.2.0",
|
|
90
90
|
"@things-factory/print-ui": "^6.2.0",
|
|
91
91
|
"@things-factory/product-base": "^6.2.0",
|
|
92
92
|
"@things-factory/qc": "^6.2.0",
|
|
93
|
-
"@things-factory/resource-ui": "^6.2.
|
|
93
|
+
"@things-factory/resource-ui": "^6.2.1",
|
|
94
94
|
"@things-factory/routing-base": "^6.2.0",
|
|
95
95
|
"@things-factory/setting-base": "^6.2.0",
|
|
96
96
|
"@things-factory/setting-ui": "^6.2.0",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"random-words": "^1.2.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@things-factory/builder": "^6.2.
|
|
105
|
+
"@things-factory/builder": "^6.2.2"
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "6876e3c31d769ea706cf587b5cba2d7b10607618"
|
|
108
108
|
}
|