@dssp/dkpi 1.0.0-alpha.23 → 1.0.0-alpha.24
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-client/bootstrap.d.ts +8 -0
- package/dist-client/bootstrap.js +257 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/entries/public/home.d.ts +8 -0
- package/dist-client/entries/public/home.js +97 -0
- package/dist-client/entries/public/home.js.map +1 -0
- package/dist-client/icons/menu-icons.d.ts +5 -0
- package/dist-client/icons/menu-icons.js +84 -0
- package/dist-client/icons/menu-icons.js.map +1 -0
- package/dist-client/index.d.ts +0 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/menu.d.ts +23 -0
- package/dist-client/menu.js +59 -0
- package/dist-client/menu.js.map +1 -0
- package/dist-client/pages/sv-project-completed-list.d.ts +18 -0
- package/dist-client/pages/sv-project-completed-list.js +293 -0
- package/dist-client/pages/sv-project-completed-list.js.map +1 -0
- package/dist-client/pages/sv-project-list.d.ts +144 -0
- package/dist-client/pages/sv-project-list.js +339 -0
- package/dist-client/pages/sv-project-list.js.map +1 -0
- package/dist-client/pages/sv-user-management.d.ts +5 -0
- package/dist-client/pages/sv-user-management.js +219 -0
- package/dist-client/pages/sv-user-management.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +16 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/themes/dark.css +51 -0
- package/dist-client/themes/light.css +51 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/viewparts/menu-tools.d.ts +54 -0
- package/dist-client/viewparts/menu-tools.js +508 -0
- package/dist-client/viewparts/menu-tools.js.map +1 -0
- package/dist-client/viewparts/user-circle.d.ts +5 -0
- package/dist-client/viewparts/user-circle.js +26 -0
- package/dist-client/viewparts/user-circle.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import '@things-factory/notification/dist-client';
|
|
2
|
+
import '@things-factory/setting-ui/dist-client';
|
|
3
|
+
import '@material/web/icon/icon.js';
|
|
4
|
+
import '@operato/i18n/ox-i18n.js';
|
|
5
|
+
import '@things-factory/notification';
|
|
6
|
+
import './viewparts/user-circle';
|
|
7
|
+
import './viewparts/menu-tools';
|
|
8
|
+
export default function bootstrap(): Promise<void>;
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import '@things-factory/notification/dist-client'; /* for notification-setting-let */
|
|
2
|
+
import '@things-factory/setting-ui/dist-client'; /* for theme-mode-setting-let */
|
|
3
|
+
import '@material/web/icon/icon.js';
|
|
4
|
+
import '@operato/i18n/ox-i18n.js';
|
|
5
|
+
import '@things-factory/notification';
|
|
6
|
+
import './viewparts/user-circle';
|
|
7
|
+
import './viewparts/menu-tools';
|
|
8
|
+
import { html } from 'lit-html';
|
|
9
|
+
import { registerDefaultGroups } from '@operato/board';
|
|
10
|
+
import { navigate, store } from '@operato/shell';
|
|
11
|
+
import { appendViewpart, updateViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION, VIEWPART_LEVEL } from '@operato/layout';
|
|
12
|
+
import { APPEND_APP_TOOL } from '@things-factory/apptool-base/client';
|
|
13
|
+
import { setupAppToolPart } from '@things-factory/apptool-ui/dist-client';
|
|
14
|
+
import { setupContextUIPart } from '@things-factory/context-ui/dist-client';
|
|
15
|
+
import { hasPrivilege } from '@things-factory/auth-base/dist-client';
|
|
16
|
+
import { setAuthManagementMenus } from '@things-factory/auth-ui/dist-client';
|
|
17
|
+
import { ADD_MORENDA } from '@things-factory/more-base/client';
|
|
18
|
+
import { ADD_SETTING } from '@things-factory/setting-base/dist-client';
|
|
19
|
+
console.log(`%c
|
|
20
|
+
▄▄▄ ▄ ▄▄ ▄▄▄ ▄
|
|
21
|
+
▓ ▓ ▓ ▓ ▓ ▓ ▀
|
|
22
|
+
▓ ▓ ▓▓ ▓▀▀ ▓
|
|
23
|
+
▓ ▓ ▓ ▓ ▓ ▓
|
|
24
|
+
▀▀▀ ▀ ▀▀ ▀ ▀
|
|
25
|
+
`, 'background: #222; color: #bada55');
|
|
26
|
+
export default async function bootstrap() {
|
|
27
|
+
var _a;
|
|
28
|
+
/* set board-modeller group and default templates */
|
|
29
|
+
registerDefaultGroups();
|
|
30
|
+
await setupAppToolPart({
|
|
31
|
+
toolbar: true,
|
|
32
|
+
busybar: true,
|
|
33
|
+
mdibar: false
|
|
34
|
+
});
|
|
35
|
+
await setupContextUIPart({
|
|
36
|
+
titlebar: 'header',
|
|
37
|
+
contextToolbar: 'page-footer'
|
|
38
|
+
});
|
|
39
|
+
/* append top-menu to layout */
|
|
40
|
+
var state = store.getState();
|
|
41
|
+
var width = ((_a = state.layout) === null || _a === void 0 ? void 0 : _a.width) || 'WIDE';
|
|
42
|
+
appendViewpart({
|
|
43
|
+
name: 'dkpi-topmenu',
|
|
44
|
+
viewpart: {
|
|
45
|
+
show: true,
|
|
46
|
+
template: html ` <menu-tools></menu-tools> `
|
|
47
|
+
},
|
|
48
|
+
position: width == 'WIDE' ? VIEWPART_POSITION.NAVBAR : VIEWPART_POSITION.FOOTERBAR
|
|
49
|
+
});
|
|
50
|
+
store.subscribe(async () => {
|
|
51
|
+
var state = store.getState();
|
|
52
|
+
if (state.layout.width == width) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
width = state.layout.width;
|
|
56
|
+
updateViewpart('dkpi-topmenu', {
|
|
57
|
+
position: width == 'WIDE' ? VIEWPART_POSITION.NAVBAR : VIEWPART_POSITION.FOOTERBAR,
|
|
58
|
+
level: VIEWPART_LEVEL.TOPMOST
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
/* setting app-tools */
|
|
62
|
+
store.dispatch({
|
|
63
|
+
type: APPEND_APP_TOOL,
|
|
64
|
+
tool: {
|
|
65
|
+
name: 'app-brand',
|
|
66
|
+
template: html ` <span style="font-size: 1.2em;">KPI</span> `,
|
|
67
|
+
position: TOOL_POSITION.FRONT
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
store.dispatch({
|
|
71
|
+
type: APPEND_APP_TOOL,
|
|
72
|
+
tool: {
|
|
73
|
+
name: 'notification-badge',
|
|
74
|
+
template: html `
|
|
75
|
+
<notification-badge
|
|
76
|
+
@click=${e => {
|
|
77
|
+
toggleOverlay('notification', {
|
|
78
|
+
backdrop: true
|
|
79
|
+
});
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
</notification-badge>
|
|
83
|
+
`,
|
|
84
|
+
position: TOOL_POSITION.REAR
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
appendViewpart({
|
|
88
|
+
name: 'notification',
|
|
89
|
+
viewpart: {
|
|
90
|
+
show: false,
|
|
91
|
+
hovering: 'edge',
|
|
92
|
+
template: html ` <notification-list style="min-width: 300px;"></notification-list> `
|
|
93
|
+
},
|
|
94
|
+
position: VIEWPART_POSITION.ASIDEBAR
|
|
95
|
+
});
|
|
96
|
+
/* add setting morenda */
|
|
97
|
+
store.dispatch({
|
|
98
|
+
type: ADD_MORENDA,
|
|
99
|
+
morenda: {
|
|
100
|
+
icon: html ` <md-icon>settings</md-icon> `,
|
|
101
|
+
name: html ` <ox-i18n msgid="label.setting"></ox-i18n> `,
|
|
102
|
+
action: () => {
|
|
103
|
+
navigate('setting');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
/* add env-var morenda */
|
|
108
|
+
if (await hasPrivilege({ privilege: 'mutation', category: 'env-var', domainOwnerGranted: true, superUserGranted: true })) {
|
|
109
|
+
store.dispatch({
|
|
110
|
+
type: ADD_MORENDA,
|
|
111
|
+
morenda: {
|
|
112
|
+
icon: html ` <md-icon>variables</md-icon> `,
|
|
113
|
+
name: html ` <ox-i18n msgid="label.env-var"></ox-i18n> `,
|
|
114
|
+
action: () => {
|
|
115
|
+
navigate('env-vars');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/* set auth management menus into more-panel */
|
|
121
|
+
setAuthManagementMenus();
|
|
122
|
+
if (await hasPrivilege({
|
|
123
|
+
privilege: 'mutation',
|
|
124
|
+
category: 'user',
|
|
125
|
+
domainOwnerGranted: true,
|
|
126
|
+
superUserGranted: true
|
|
127
|
+
})) {
|
|
128
|
+
store.dispatch({
|
|
129
|
+
type: ADD_MORENDA,
|
|
130
|
+
morenda: {
|
|
131
|
+
icon: html ` <md-icon>vpn_key</md-icon> `,
|
|
132
|
+
name: html ` <ox-i18n msgid="text.oauth2-clients"></ox-i18n> `,
|
|
133
|
+
action: () => {
|
|
134
|
+
navigate('oauth2-clients');
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
if (await hasPrivilege({
|
|
140
|
+
privilege: 'mutation',
|
|
141
|
+
category: 'board',
|
|
142
|
+
domainOwnerGranted: true,
|
|
143
|
+
superUserGranted: true
|
|
144
|
+
})) {
|
|
145
|
+
store.dispatch({
|
|
146
|
+
type: ADD_MORENDA,
|
|
147
|
+
morenda: {
|
|
148
|
+
icon: html ` <md-icon>font_download</md-icon> `,
|
|
149
|
+
name: html ` <ox-i18n msgid="menu.fonts"></ox-i18n> `,
|
|
150
|
+
action: () => {
|
|
151
|
+
navigate('font-list');
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
store.dispatch({
|
|
156
|
+
type: ADD_MORENDA,
|
|
157
|
+
morenda: {
|
|
158
|
+
icon: html ` <md-icon>dvr</md-icon> `,
|
|
159
|
+
name: html ` <ox-i18n msgid="menu.board-list"></ox-i18n> `,
|
|
160
|
+
action: () => {
|
|
161
|
+
navigate('board-list');
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
store.dispatch({
|
|
166
|
+
type: ADD_MORENDA,
|
|
167
|
+
morenda: {
|
|
168
|
+
icon: html ` <md-icon>dashboard</md-icon> `,
|
|
169
|
+
name: html ` <ox-i18n msgid="menu.board-template"></ox-i18n> `,
|
|
170
|
+
action: () => {
|
|
171
|
+
navigate('board-template-list');
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (await hasPrivilege({
|
|
177
|
+
privilege: 'query',
|
|
178
|
+
category: 'attachment',
|
|
179
|
+
domainOwnerGranted: true,
|
|
180
|
+
superUserGranted: true
|
|
181
|
+
})) {
|
|
182
|
+
store.dispatch({
|
|
183
|
+
type: ADD_MORENDA,
|
|
184
|
+
morenda: {
|
|
185
|
+
icon: html ` <md-icon>attachment</md-icon> `,
|
|
186
|
+
name: html ` <ox-i18n msgid="menu.attachments"></ox-i18n> `,
|
|
187
|
+
action: () => {
|
|
188
|
+
navigate('attachment-list');
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
if (await hasPrivilege({
|
|
194
|
+
privilege: 'mutation',
|
|
195
|
+
category: 'scenario',
|
|
196
|
+
domainOwnerGranted: true,
|
|
197
|
+
superUserGranted: true
|
|
198
|
+
})) {
|
|
199
|
+
store.dispatch({
|
|
200
|
+
type: ADD_MORENDA,
|
|
201
|
+
morenda: {
|
|
202
|
+
icon: html ` <md-icon>device_hub</md-icon> `,
|
|
203
|
+
name: html ` <ox-i18n msgid="text.connection"></ox-i18n> `,
|
|
204
|
+
action: () => {
|
|
205
|
+
navigate('connection');
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
store.dispatch({
|
|
210
|
+
type: ADD_MORENDA,
|
|
211
|
+
morenda: {
|
|
212
|
+
icon: html ` <md-icon>format_list_numbered</md-icon> `,
|
|
213
|
+
name: html ` <ox-i18n msgid="text.scenario"></ox-i18n> `,
|
|
214
|
+
action: () => {
|
|
215
|
+
navigate('scenario');
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
store.dispatch({
|
|
220
|
+
type: ADD_MORENDA,
|
|
221
|
+
morenda: {
|
|
222
|
+
icon: html ` <md-icon>hub</md-icon> `,
|
|
223
|
+
name: html ` <ox-i18n msgid="text.integration analysis"></ox-i18n> (beta)`,
|
|
224
|
+
action: () => {
|
|
225
|
+
navigate('integration-analysis');
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
if (await hasPrivilege({ privilege: 'mutation', category: 'state-register', domainOwnerGranted: true })) {
|
|
231
|
+
store.dispatch({
|
|
232
|
+
type: ADD_MORENDA,
|
|
233
|
+
morenda: {
|
|
234
|
+
icon: html ` <md-icon>app_registration</md-icon> `,
|
|
235
|
+
name: html ` <ox-i18n msgid="title.state-register"></ox-i18n> `,
|
|
236
|
+
action: () => {
|
|
237
|
+
navigate('state-register-page');
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
store.dispatch({
|
|
243
|
+
type: ADD_SETTING,
|
|
244
|
+
setting: {
|
|
245
|
+
seq: 10,
|
|
246
|
+
template: html ` <theme-mode-setting-let></theme-mode-setting-let> `
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
store.dispatch({
|
|
250
|
+
type: ADD_SETTING,
|
|
251
|
+
setting: {
|
|
252
|
+
seq: 20,
|
|
253
|
+
template: html ` <notification-setting-let></notification-setting-let> `
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,0CAA0C,CAAA,CAAC,kCAAkC;AACpF,OAAO,wCAAwC,CAAA,CAAC,gCAAgC;AAEhF,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,8BAA8B,CAAA;AACrC,OAAO,yBAAyB,CAAA;AAChC,OAAO,wBAAwB,CAAA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AAE,gBAAgB,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QACxG,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE;gBACP,IAAI,EAAE,IAAI,CAAA,uCAAuC;gBACjD,IAAI,EAAE,IAAI,CAAA,oDAAoD;gBAC9D,MAAM,EAAE,GAAG,EAAE;oBACX,QAAQ,CAAC,qBAAqB,CAAC,CAAA;gBACjC,CAAC;aACF;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC;QACb,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE;YACP,GAAG,EAAE,EAAE;YACP,QAAQ,EAAE,IAAI,CAAA,qDAAqD;SACpE;KACF,CAAC,CAAA;IAEF,KAAK,CAAC,QAAQ,CAAC;QACb,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE;YACP,GAAG,EAAE,EAAE;YACP,QAAQ,EAAE,IAAI,CAAA,yDAAyD;SACxE;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import '@things-factory/notification/dist-client' /* for notification-setting-let */\nimport '@things-factory/setting-ui/dist-client' /* for theme-mode-setting-let */\n\nimport '@material/web/icon/icon.js'\nimport '@operato/i18n/ox-i18n.js'\nimport '@things-factory/notification'\nimport './viewparts/user-circle'\nimport './viewparts/menu-tools'\n\nimport { html } from 'lit-html'\n\nimport { registerDefaultGroups } from '@operato/board'\nimport { navigate, store } from '@operato/shell'\n\nimport { appendViewpart, updateViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION, VIEWPART_LEVEL } from '@operato/layout'\nimport { APPEND_APP_TOOL } from '@things-factory/apptool-base/client'\nimport { setupAppToolPart } from '@things-factory/apptool-ui/dist-client'\nimport { setupContextUIPart } from '@things-factory/context-ui/dist-client'\nimport { hasPrivilege } from '@things-factory/auth-base/dist-client'\nimport { setAuthManagementMenus } from '@things-factory/auth-ui/dist-client'\nimport { ADD_MORENDA } from '@things-factory/more-base/client'\nimport { ADD_SETTING } from '@things-factory/setting-base/dist-client'\n\nconsole.log(\n `%c\n▄▄▄ ▄ ▄▄ ▄▄▄ ▄\n▓ ▓ ▓ ▓ ▓ ▓ ▀\n▓ ▓ ▓▓ ▓▀▀ ▓\n▓ ▓ ▓ ▓ ▓ ▓\n▀▀▀ ▀ ▀▀ ▀ ▀\n`,\n 'background: #222; color: #bada55'\n)\n\nexport default async function bootstrap() {\n /* set board-modeller group and default templates */\n registerDefaultGroups()\n\n await setupAppToolPart({\n toolbar: true,\n busybar: true,\n mdibar: false\n })\n\n await setupContextUIPart({\n titlebar: 'header',\n contextToolbar: 'page-footer'\n })\n\n /* append top-menu to layout */\n var state = store.getState() as any\n var width = state.layout?.width || 'WIDE'\n\n appendViewpart({\n name: 'dkpi-topmenu',\n viewpart: {\n show: true,\n template: html` <menu-tools></menu-tools> `\n },\n position: width == 'WIDE' ? VIEWPART_POSITION.NAVBAR : VIEWPART_POSITION.FOOTERBAR\n })\n\n store.subscribe(async () => {\n var state = store.getState() as any\n\n if (state.layout.width == width) {\n return\n }\n\n width = state.layout.width\n\n updateViewpart('dkpi-topmenu', {\n position: width == 'WIDE' ? VIEWPART_POSITION.NAVBAR : VIEWPART_POSITION.FOOTERBAR,\n level: VIEWPART_LEVEL.TOPMOST\n })\n })\n\n /* setting app-tools */\n store.dispatch({\n type: APPEND_APP_TOOL,\n tool: {\n name: 'app-brand',\n template: html` <span style=\"font-size: 1.2em;\">KPI</span> `,\n position: TOOL_POSITION.FRONT\n }\n })\n\n store.dispatch({\n type: APPEND_APP_TOOL,\n tool: {\n name: 'notification-badge',\n template: html`\n <notification-badge\n @click=${e => {\n toggleOverlay('notification', {\n backdrop: true\n })\n }}\n >\n </notification-badge>\n `,\n position: TOOL_POSITION.REAR\n }\n })\n\n appendViewpart({\n name: 'notification',\n viewpart: {\n show: false,\n hovering: 'edge',\n template: html` <notification-list style=\"min-width: 300px;\"></notification-list> `\n },\n position: VIEWPART_POSITION.ASIDEBAR\n })\n\n /* add setting morenda */\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>settings</md-icon> `,\n name: html` <ox-i18n msgid=\"label.setting\"></ox-i18n> `,\n action: () => {\n navigate('setting')\n }\n }\n })\n\n /* add env-var morenda */\n if (await hasPrivilege({ privilege: 'mutation', category: 'env-var', domainOwnerGranted: true, superUserGranted: true })) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>variables</md-icon> `,\n name: html` <ox-i18n msgid=\"label.env-var\"></ox-i18n> `,\n action: () => {\n navigate('env-vars')\n }\n }\n })\n }\n\n /* set auth management menus into more-panel */\n setAuthManagementMenus()\n\n if (\n await hasPrivilege({\n privilege: 'mutation',\n category: 'user',\n domainOwnerGranted: true,\n superUserGranted: true\n })\n ) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>vpn_key</md-icon> `,\n name: html` <ox-i18n msgid=\"text.oauth2-clients\"></ox-i18n> `,\n action: () => {\n navigate('oauth2-clients')\n }\n }\n })\n }\n\n if (\n await hasPrivilege({\n privilege: 'mutation',\n category: 'board',\n domainOwnerGranted: true,\n superUserGranted: true\n })\n ) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>font_download</md-icon> `,\n name: html` <ox-i18n msgid=\"menu.fonts\"></ox-i18n> `,\n action: () => {\n navigate('font-list')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>dvr</md-icon> `,\n name: html` <ox-i18n msgid=\"menu.board-list\"></ox-i18n> `,\n action: () => {\n navigate('board-list')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>dashboard</md-icon> `,\n name: html` <ox-i18n msgid=\"menu.board-template\"></ox-i18n> `,\n action: () => {\n navigate('board-template-list')\n }\n }\n })\n }\n\n if (\n await hasPrivilege({\n privilege: 'query',\n category: 'attachment',\n domainOwnerGranted: true,\n superUserGranted: true\n })\n ) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>attachment</md-icon> `,\n name: html` <ox-i18n msgid=\"menu.attachments\"></ox-i18n> `,\n action: () => {\n navigate('attachment-list')\n }\n }\n })\n }\n\n if (\n await hasPrivilege({\n privilege: 'mutation',\n category: 'scenario',\n domainOwnerGranted: true,\n superUserGranted: true\n })\n ) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>device_hub</md-icon> `,\n name: html` <ox-i18n msgid=\"text.connection\"></ox-i18n> `,\n action: () => {\n navigate('connection')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>format_list_numbered</md-icon> `,\n name: html` <ox-i18n msgid=\"text.scenario\"></ox-i18n> `,\n action: () => {\n navigate('scenario')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>hub</md-icon> `,\n name: html` <ox-i18n msgid=\"text.integration analysis\"></ox-i18n> (beta)`,\n action: () => {\n navigate('integration-analysis')\n }\n }\n })\n }\n\n if (await hasPrivilege({ privilege: 'mutation', category: 'state-register', domainOwnerGranted: true })) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>app_registration</md-icon> `,\n name: html` <ox-i18n msgid=\"title.state-register\"></ox-i18n> `,\n action: () => {\n navigate('state-register-page')\n }\n }\n })\n }\n\n store.dispatch({\n type: ADD_SETTING,\n setting: {\n seq: 10,\n template: html` <theme-mode-setting-let></theme-mode-setting-let> `\n }\n })\n\n store.dispatch({\n type: ADD_SETTING,\n setting: {\n seq: 20,\n template: html` <notification-setting-let></notification-setting-let> `\n }\n })\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
export declare class HomePage extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
private _applicationMeta;
|
|
6
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
7
|
+
get applicationMeta(): any;
|
|
8
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import { css, html, LitElement } from 'lit';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
let HomePage = class HomePage extends LitElement {
|
|
6
|
+
render() {
|
|
7
|
+
var { title, description } = this.applicationMeta;
|
|
8
|
+
return html `
|
|
9
|
+
<div message>
|
|
10
|
+
<strong>${title}</strong>
|
|
11
|
+
${description}
|
|
12
|
+
<video autoplay muted playsinline loop>
|
|
13
|
+
<source src="/assets/videos/intro.mp4" type="video/mp4" />
|
|
14
|
+
</video>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<md-icon signin @click=${e => (window.location.href = '/auth/signin')}>login</md-icon>
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
get applicationMeta() {
|
|
21
|
+
if (!this._applicationMeta) {
|
|
22
|
+
var iconLink = document.querySelector('link[rel="application-icon"]');
|
|
23
|
+
var titleMeta = document.querySelector('meta[name="application-name"]');
|
|
24
|
+
var descriptionMeta = document.querySelector('meta[name="application-description"]');
|
|
25
|
+
this._applicationMeta = {
|
|
26
|
+
icon: iconLink === null || iconLink === void 0 ? void 0 : iconLink.href,
|
|
27
|
+
title: (titleMeta === null || titleMeta === void 0 ? void 0 : titleMeta.content) || 'Things Factory',
|
|
28
|
+
description: (descriptionMeta === null || descriptionMeta === void 0 ? void 0 : descriptionMeta.content) || 'Reimagining Software'
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return this._applicationMeta;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
HomePage.styles = [
|
|
35
|
+
css `
|
|
36
|
+
:host {
|
|
37
|
+
background-color: var(--md-sys-color-background);
|
|
38
|
+
|
|
39
|
+
display: block;
|
|
40
|
+
position: relative;
|
|
41
|
+
|
|
42
|
+
max-width: 100vw;
|
|
43
|
+
width: 100vw;
|
|
44
|
+
height: 100vh;
|
|
45
|
+
height: 100dvh;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[signin] {
|
|
49
|
+
position: absolute;
|
|
50
|
+
right: 20px;
|
|
51
|
+
top: 20px;
|
|
52
|
+
font-size: 2em;
|
|
53
|
+
color: white;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[message] {
|
|
57
|
+
background-color: rgba(50, 66, 97, 0.8);
|
|
58
|
+
padding: 60px 50px 0 50px;
|
|
59
|
+
color: #fff;
|
|
60
|
+
text-align: center;
|
|
61
|
+
font-size: 20px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[message] strong {
|
|
65
|
+
display: block;
|
|
66
|
+
font-size: 2.5rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
video {
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 50%;
|
|
72
|
+
left: 50%;
|
|
73
|
+
width: 100vw;
|
|
74
|
+
height: 100vh;
|
|
75
|
+
object-fit: cover;
|
|
76
|
+
transform: translate(-50%, -50%);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@media screen and (max-width: 480px) {
|
|
80
|
+
[message] {
|
|
81
|
+
padding: 60px 30px 0 30px;
|
|
82
|
+
color: #fff;
|
|
83
|
+
text-align: center;
|
|
84
|
+
font-size: 15px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
[message] strong {
|
|
88
|
+
font-size: 1.6rem;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
`
|
|
92
|
+
];
|
|
93
|
+
HomePage = __decorate([
|
|
94
|
+
customElement('home-page')
|
|
95
|
+
], HomePage);
|
|
96
|
+
export { HomePage };
|
|
97
|
+
//# sourceMappingURL=home.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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;;;;KAwDF;CACF,AA1DY,CA0DZ;AA3DU,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CA8FpB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('home-page')\nexport class HomePage extends LitElement {\n static styles = [\n css`\n :host {\n background-color: var(--md-sys-color-background);\n\n display: block;\n position: relative;\n\n max-width: 100vw;\n width: 100vw;\n height: 100vh;\n height: 100dvh;\n }\n\n [signin] {\n position: absolute;\n right: 20px;\n top: 20px;\n font-size: 2em;\n color: white;\n }\n\n [message] {\n background-color: rgba(50, 66, 97, 0.8);\n padding: 60px 50px 0 50px;\n color: #fff;\n text-align: center;\n font-size: 20px;\n }\n\n [message] strong {\n display: block;\n font-size: 2.5rem;\n }\n\n video {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100vw;\n height: 100vh;\n object-fit: cover;\n transform: translate(-50%, -50%);\n }\n\n @media screen and (max-width: 480px) {\n [message] {\n padding: 60px 30px 0 30px;\n color: #fff;\n text-align: center;\n font-size: 15px;\n }\n\n [message] strong {\n font-size: 1.6rem;\n }\n }\n `\n ]\n\n private _applicationMeta\n\n render() {\n var { title, description } = this.applicationMeta\n\n return html`\n <div message>\n <strong>${title}</strong>\n ${description}\n <video autoplay muted playsinline loop>\n <source src=\"/assets/videos/intro.mp4\" type=\"video/mp4\" />\n </video>\n </div>\n\n <md-icon signin @click=${e => (window.location.href = '/auth/signin')}>login</md-icon>\n `\n }\n\n get applicationMeta() {\n if (!this._applicationMeta) {\n var iconLink = document.querySelector('link[rel=\"application-icon\"]') as HTMLLinkElement\n var titleMeta = document.querySelector('meta[name=\"application-name\"]') as HTMLMetaElement\n var descriptionMeta = document.querySelector('meta[name=\"application-description\"]') as HTMLMetaElement\n\n this._applicationMeta = {\n icon: iconLink?.href,\n title: titleMeta?.content || 'Things Factory',\n description: descriptionMeta?.content || 'Reimagining Software'\n }\n }\n\n return this._applicationMeta\n }\n}\n"]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const ICON_HOME = `
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 40 40">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>
|
|
5
|
+
.menu-svg {
|
|
6
|
+
fill: #fff;
|
|
7
|
+
stroke: {{strokecolor}};
|
|
8
|
+
stroke-width: 0px;
|
|
9
|
+
}
|
|
10
|
+
</style>
|
|
11
|
+
</defs>
|
|
12
|
+
|
|
13
|
+
<path class="menu-svg" d="M31,36.5c-.2,0-.4,0-.6,0-.2,0-.3-.2-.5-.3l-8.3-8.3c-.2-.2-.3-.3-.3-.5,0-.2,0-.4,0-.6s0-.4,0-.6c0-.2.2-.3.3-.5l3.1-3.1c.2-.2.3-.3.5-.3.2,0,.4,0,.6,0s.4,0,.6,0c.2,0,.3.2.5.3l8.3,8.3c.2.2.3.3.3.5,0,.2,0,.4,0,.6s0,.4,0,.6c0,.2-.2.3-.3.5l-3.1,3.1c-.2.2-.3.3-.5.3-.2,0-.4,0-.6,0ZM31,33.6l1.8-1.8-6.9-6.9-1.8,1.8,6.9,6.9ZM8.9,36.5c-.2,0-.4,0-.6-.1-.2,0-.3-.2-.5-.3l-3.1-3.1c-.2-.2-.3-.3-.3-.5,0-.2-.1-.4-.1-.6s0-.4.1-.6c0-.2.2-.3.3-.5l8.6-8.6h3.5l1.3-1.3-6.9-6.9h-2.4l-4.6-4.6,4.1-4.1,4.6,4.6v2.4l6.9,6.9,4.9-4.9-2.4-2.4,2.1-2.1h-4.2l-.9-.9,5.3-5.3.9.9v4.2l2.1-2.1,6.2,6.2c.4.4.8.9,1,1.5.2.5.3,1.1.3,1.7s0,1-.3,1.5c-.2.5-.5.9-.8,1.4l-3.5-3.5-2.3,2.3-1.8-1.8-8,8v3.5l-8.6,8.6c-.2.2-.3.3-.5.3-.2,0-.4.1-.6.1ZM8.9,33.6l7.6-7.6v-1.8h-1.8l-7.6,7.6,1.8,1.8ZM8.9,33.6l-1.8-1.8.9.9.9.9ZM31,33.6l1.8-1.8-1.8,1.8Z"/>
|
|
14
|
+
</svg>
|
|
15
|
+
`;
|
|
16
|
+
const ICON_KPIS = `
|
|
17
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 40 40">
|
|
18
|
+
<defs>
|
|
19
|
+
<style>
|
|
20
|
+
.menu-svg {
|
|
21
|
+
fill: #fff;
|
|
22
|
+
stroke: {{strokecolor}};
|
|
23
|
+
stroke-width: 0px;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
26
|
+
</defs>
|
|
27
|
+
|
|
28
|
+
<path class="menu-svg" d="M27.9,15.1h2.7v-2.8h-2.7v2.8ZM27.9,21.4h2.7v-2.8h-2.7v2.8ZM27.9,27.7h2.7v-2.8h-2.7v2.8ZM26.9,33.3v-2.4h6.9V9h-14.2v2.8l-2.3-1.7v-3.5h18.7v26.7s-9.1,0-9.1,0ZM4,33.3v-14.5l9.9-7.3,9.9,7.3v14.5h-8.1v-7.5h-3.5v7.5H4ZM6.3,31h3.6v-7.5h8v7.5h3.6v-11l-7.7-5.5-7.7,5.5v11h0ZM18,31v-7.5h-8v7.5-7.5h8v7.5Z"/>
|
|
29
|
+
</svg>
|
|
30
|
+
`;
|
|
31
|
+
const ICON_STATUS = `
|
|
32
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 40 40">
|
|
33
|
+
<defs>
|
|
34
|
+
<style>
|
|
35
|
+
.menu-svg {
|
|
36
|
+
fill: #fff;
|
|
37
|
+
stroke: {{strokecolor}};
|
|
38
|
+
stroke-width: 0px;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
</defs>
|
|
42
|
+
|
|
43
|
+
<path class="menu-svg" d="M7.4,33.9c-.8,0-1.5-.3-2.1-.8-.6-.6-.8-1.3-.8-2.1V9c0-.8.3-1.5.8-2.1.6-.6,1.3-.8,2.1-.8h25.2c.8,0,1.5.3,2.1.8s.8,1.3.8,2.1v21.9c0,.8-.3,1.5-.8,2.1s-1.3.8-2.1.8H7.4ZM7.4,31.4h25.2c0,0,.3,0,.4-.2,0,0,.2-.2.2-.4V9c0,0,0-.3-.2-.4,0,0-.2-.2-.4-.2H7.4c0,0-.3,0-.4.2,0,0-.2.2-.2.4v21.9c0,0,0,.3.2.4,0,0,.2.2.4.2h0ZM8.9,27.7h7.3v-2.4h-7.3v2.4ZM24.2,24.3l7.5-7.5-1.8-1.8-5.7,5.8-2.4-2.4-1.7,1.8s4.1,4.1,4.1,4.1ZM8.9,21.2h7.3v-2.4h-7.3v2.4ZM8.9,14.6h7.3v-2.4h-7.3s0,2.4,0,2.4ZM6.9,31.4V8.5v22.9Z"/>
|
|
44
|
+
</svg>
|
|
45
|
+
`;
|
|
46
|
+
const ICON_INTEGRATION = `
|
|
47
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 40 40">
|
|
48
|
+
<defs>
|
|
49
|
+
<style>
|
|
50
|
+
.menu-svg {
|
|
51
|
+
fill: #fff;
|
|
52
|
+
stroke: {{strokecolor}};
|
|
53
|
+
stroke-width: 0px;
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
56
|
+
</defs>
|
|
57
|
+
|
|
58
|
+
<path class="menu-svg" d="M9.1,35.5c-.8,0-1.5-.3-2.1-.8-.6-.6-.8-1.2-.8-2.1V10.9c0-.8.3-1.5.8-2.1.6-.6,1.2-.8,2.1-.8h2.3v-3.5h2.5v3.5h12.3v-3.5h2.4v3.5h2.3c.8,0,1.5.3,2.1.8.6.6.8,1.2.8,2.1v21.7c0,.8-.3,1.5-.8,2.1s-1.2.8-2.1.8c0,0-21.8,0-21.8,0ZM9.1,33.1h21.7c0,0,.3,0,.4-.2,0,0,.2-.2.2-.4v-15.2H8.5v15.2c0,0,0,.3.2.4,0,0,.2.2.4.2ZM8.5,14.9h22.7v-4c0,0,0-.3-.2-.4,0,0-.2-.2-.4-.2H9.1c0,0-.3,0-.4.2,0,0-.2.2-.2.4,0,0,0,4,0,4ZM8.5,14.9v-4.5,4.5ZM12.2,22.9v-2.4h15.4v2.4s-15.4,0-15.4,0ZM12.2,29.4v-2.4h10.5v2.4h-10.5Z"/>
|
|
59
|
+
</svg>
|
|
60
|
+
`;
|
|
61
|
+
const ICON_SETTING = `
|
|
62
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 40 40">
|
|
63
|
+
<defs>
|
|
64
|
+
<style>
|
|
65
|
+
.menu-svg {
|
|
66
|
+
fill: #fff;
|
|
67
|
+
stroke: {{strokecolor}};
|
|
68
|
+
stroke-width: 0px;
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
71
|
+
</defs>
|
|
72
|
+
|
|
73
|
+
<path class="menu-svg" d="M13.1,24.2h2v-5.7h-2v1.9h-2.4v2h2.4v1.9h0ZM16.7,22.3h12.8v-2h-12.8v2ZM25,18.1h2v-1.9h2.4v-2h-2.4v-1.9h-2v5.7h0ZM10.6,16.2h12.8v-2h-12.8v2ZM14.3,34v-3.3h-6.9c-.8,0-1.5-.3-2.1-.8s-.8-1.3-.8-2.1V8.9c0-.8.3-1.6.8-2.1.6-.5,1.3-.8,2.1-.8h25.2c.8,0,1.5.3,2.1.8s.8,1.3.8,2.1v18.8c0,.8-.3,1.6-.8,2.1-.6.5-1.3.8-2.1.8h-6.9v3.3h-11.5,0ZM7.5,28.2h25.2c0,0,.3,0,.4-.2,0,0,.2-.2.2-.4V8.9c0,0,0-.3-.2-.4,0,0-.2-.2-.4-.2H7.5c0,0-.3,0-.4.2,0,0-.2.2-.2.4v18.8c0,0,0,.3.2.4,0,0,.2.2.4.2h0ZM6.9,28.2V8.4v19.8Z"/>
|
|
74
|
+
</svg>
|
|
75
|
+
`;
|
|
76
|
+
function icons(template) {
|
|
77
|
+
return ['#ffffff', '#64A3D9'].map(color => 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(template.replace(/{{strokecolor}}/g, color)));
|
|
78
|
+
}
|
|
79
|
+
export const ICONS_HOME = icons(ICON_HOME);
|
|
80
|
+
export const ICONS_KPIS = icons(ICON_KPIS);
|
|
81
|
+
export const ICONS_STATUS = icons(ICON_STATUS);
|
|
82
|
+
export const ICONS_INTEGRATION = icons(ICON_INTEGRATION);
|
|
83
|
+
export const ICONS_SETTING = icons(ICON_SETTING);
|
|
84
|
+
//# sourceMappingURL=menu-icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-icons.js","sourceRoot":"","sources":["../../client/icons/menu-icons.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG;;;;;;;;;;;;;;CAcjB,CAAA;AAED,MAAM,SAAS,GAAG;;;;;;;;;;;;;;CAcjB,CAAA;AAED,MAAM,WAAW,GAAG;;;;;;;;;;;;;;CAcnB,CAAA;AAED,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;CAcxB,CAAA;AAED,MAAM,YAAY,GAAG;;;;;;;;;;;;;;CAcpB,CAAA;AAED,SAAS,KAAK,CAAC,QAAQ;IACrB,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,GAAG,CAC/B,KAAK,CAAC,EAAE,CAAC,0CAA0C,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC,CACxG,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,CAAA;AAC1C,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,CAAA;AAC1C,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAA;AAC9C,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAA;AACxD,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,YAAY,CAAC,CAAA","sourcesContent":["const ICON_HOME = `\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 40 40\">\n <defs>\n <style>\n .menu-svg {\n fill: #fff;\n\t\t\t\tstroke: {{strokecolor}};\n stroke-width: 0px;\n }\n </style>\n </defs>\n \n <path class=\"menu-svg\" d=\"M31,36.5c-.2,0-.4,0-.6,0-.2,0-.3-.2-.5-.3l-8.3-8.3c-.2-.2-.3-.3-.3-.5,0-.2,0-.4,0-.6s0-.4,0-.6c0-.2.2-.3.3-.5l3.1-3.1c.2-.2.3-.3.5-.3.2,0,.4,0,.6,0s.4,0,.6,0c.2,0,.3.2.5.3l8.3,8.3c.2.2.3.3.3.5,0,.2,0,.4,0,.6s0,.4,0,.6c0,.2-.2.3-.3.5l-3.1,3.1c-.2.2-.3.3-.5.3-.2,0-.4,0-.6,0ZM31,33.6l1.8-1.8-6.9-6.9-1.8,1.8,6.9,6.9ZM8.9,36.5c-.2,0-.4,0-.6-.1-.2,0-.3-.2-.5-.3l-3.1-3.1c-.2-.2-.3-.3-.3-.5,0-.2-.1-.4-.1-.6s0-.4.1-.6c0-.2.2-.3.3-.5l8.6-8.6h3.5l1.3-1.3-6.9-6.9h-2.4l-4.6-4.6,4.1-4.1,4.6,4.6v2.4l6.9,6.9,4.9-4.9-2.4-2.4,2.1-2.1h-4.2l-.9-.9,5.3-5.3.9.9v4.2l2.1-2.1,6.2,6.2c.4.4.8.9,1,1.5.2.5.3,1.1.3,1.7s0,1-.3,1.5c-.2.5-.5.9-.8,1.4l-3.5-3.5-2.3,2.3-1.8-1.8-8,8v3.5l-8.6,8.6c-.2.2-.3.3-.5.3-.2,0-.4.1-.6.1ZM8.9,33.6l7.6-7.6v-1.8h-1.8l-7.6,7.6,1.8,1.8ZM8.9,33.6l-1.8-1.8.9.9.9.9ZM31,33.6l1.8-1.8-1.8,1.8Z\"/>\n</svg>\n`\n\nconst ICON_KPIS = `\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 40 40\">\n <defs>\n <style>\n .menu-svg {\n fill: #fff;\n\t\t\t\tstroke: {{strokecolor}};\n stroke-width: 0px;\n }\n </style>\n </defs>\n \n <path class=\"menu-svg\" d=\"M27.9,15.1h2.7v-2.8h-2.7v2.8ZM27.9,21.4h2.7v-2.8h-2.7v2.8ZM27.9,27.7h2.7v-2.8h-2.7v2.8ZM26.9,33.3v-2.4h6.9V9h-14.2v2.8l-2.3-1.7v-3.5h18.7v26.7s-9.1,0-9.1,0ZM4,33.3v-14.5l9.9-7.3,9.9,7.3v14.5h-8.1v-7.5h-3.5v7.5H4ZM6.3,31h3.6v-7.5h8v7.5h3.6v-11l-7.7-5.5-7.7,5.5v11h0ZM18,31v-7.5h-8v7.5-7.5h8v7.5Z\"/>\n</svg>\n`\n\nconst ICON_STATUS = `\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 40 40\">\n <defs>\n <style>\n .menu-svg {\n fill: #fff;\n\t\t\t\tstroke: {{strokecolor}};\n stroke-width: 0px;\n }\n </style>\n </defs>\n\n <path class=\"menu-svg\" d=\"M7.4,33.9c-.8,0-1.5-.3-2.1-.8-.6-.6-.8-1.3-.8-2.1V9c0-.8.3-1.5.8-2.1.6-.6,1.3-.8,2.1-.8h25.2c.8,0,1.5.3,2.1.8s.8,1.3.8,2.1v21.9c0,.8-.3,1.5-.8,2.1s-1.3.8-2.1.8H7.4ZM7.4,31.4h25.2c0,0,.3,0,.4-.2,0,0,.2-.2.2-.4V9c0,0,0-.3-.2-.4,0,0-.2-.2-.4-.2H7.4c0,0-.3,0-.4.2,0,0-.2.2-.2.4v21.9c0,0,0,.3.2.4,0,0,.2.2.4.2h0ZM8.9,27.7h7.3v-2.4h-7.3v2.4ZM24.2,24.3l7.5-7.5-1.8-1.8-5.7,5.8-2.4-2.4-1.7,1.8s4.1,4.1,4.1,4.1ZM8.9,21.2h7.3v-2.4h-7.3v2.4ZM8.9,14.6h7.3v-2.4h-7.3s0,2.4,0,2.4ZM6.9,31.4V8.5v22.9Z\"/>\n</svg>\n`\n\nconst ICON_INTEGRATION = `\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 40 40\">\n <defs>\n <style>\n .menu-svg {\n fill: #fff;\n\t\t\t\tstroke: {{strokecolor}};\n stroke-width: 0px;\n }\n </style>\n </defs>\n \n <path class=\"menu-svg\" d=\"M9.1,35.5c-.8,0-1.5-.3-2.1-.8-.6-.6-.8-1.2-.8-2.1V10.9c0-.8.3-1.5.8-2.1.6-.6,1.2-.8,2.1-.8h2.3v-3.5h2.5v3.5h12.3v-3.5h2.4v3.5h2.3c.8,0,1.5.3,2.1.8.6.6.8,1.2.8,2.1v21.7c0,.8-.3,1.5-.8,2.1s-1.2.8-2.1.8c0,0-21.8,0-21.8,0ZM9.1,33.1h21.7c0,0,.3,0,.4-.2,0,0,.2-.2.2-.4v-15.2H8.5v15.2c0,0,0,.3.2.4,0,0,.2.2.4.2ZM8.5,14.9h22.7v-4c0,0,0-.3-.2-.4,0,0-.2-.2-.4-.2H9.1c0,0-.3,0-.4.2,0,0-.2.2-.2.4,0,0,0,4,0,4ZM8.5,14.9v-4.5,4.5ZM12.2,22.9v-2.4h15.4v2.4s-15.4,0-15.4,0ZM12.2,29.4v-2.4h10.5v2.4h-10.5Z\"/>\n</svg>\n`\n\nconst ICON_SETTING = `\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 40 40\">\n <defs>\n <style>\n .menu-svg {\n fill: #fff;\n\t\t\t\tstroke: {{strokecolor}};\n stroke-width: 0px;\n }\n </style>\n </defs>\n \n <path class=\"menu-svg\" d=\"M13.1,24.2h2v-5.7h-2v1.9h-2.4v2h2.4v1.9h0ZM16.7,22.3h12.8v-2h-12.8v2ZM25,18.1h2v-1.9h2.4v-2h-2.4v-1.9h-2v5.7h0ZM10.6,16.2h12.8v-2h-12.8v2ZM14.3,34v-3.3h-6.9c-.8,0-1.5-.3-2.1-.8s-.8-1.3-.8-2.1V8.9c0-.8.3-1.6.8-2.1.6-.5,1.3-.8,2.1-.8h25.2c.8,0,1.5.3,2.1.8s.8,1.3.8,2.1v18.8c0,.8-.3,1.6-.8,2.1-.6.5-1.3.8-2.1.8h-6.9v3.3h-11.5,0ZM7.5,28.2h25.2c0,0,.3,0,.4-.2,0,0,.2-.2.2-.4V8.9c0,0,0-.3-.2-.4,0,0-.2-.2-.4-.2H7.5c0,0-.3,0-.4.2,0,0-.2.2-.2.4v18.8c0,0,0,.3.2.4,0,0,.2.2.4.2h0ZM6.9,28.2V8.4v19.8Z\"/>\n</svg>\n`\n\nfunction icons(template) {\n return ['#ffffff', '#64A3D9'].map(\n color => 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(template.replace(/{{strokecolor}}/g, color))\n )\n}\n\nexport const ICONS_HOME = icons(ICON_HOME)\nexport const ICONS_KPIS = icons(ICON_KPIS)\nexport const ICONS_STATUS = icons(ICON_STATUS)\nexport const ICONS_INTEGRATION = icons(ICON_INTEGRATION)\nexport const ICONS_SETTING = icons(ICON_SETTING)\n"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../client/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare function getMenuTemplate(owner: boolean | undefined, dataSets: any[]): (false | {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
icon?: undefined;
|
|
5
|
+
path?: undefined;
|
|
6
|
+
menus?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
name: string;
|
|
9
|
+
icon: string;
|
|
10
|
+
path: string;
|
|
11
|
+
type?: undefined;
|
|
12
|
+
menus?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
name: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
path: string;
|
|
17
|
+
menus: {
|
|
18
|
+
name: any;
|
|
19
|
+
icon: string;
|
|
20
|
+
path: string;
|
|
21
|
+
}[];
|
|
22
|
+
type?: undefined;
|
|
23
|
+
})[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import i18next from 'i18next';
|
|
2
|
+
export function getMenuTemplate(owner = false, dataSets) {
|
|
3
|
+
return [
|
|
4
|
+
owner && {
|
|
5
|
+
name: 'DATASET',
|
|
6
|
+
type: 'group'
|
|
7
|
+
},
|
|
8
|
+
owner && {
|
|
9
|
+
name: i18next.t('title.data-set list'),
|
|
10
|
+
icon: 'dataset',
|
|
11
|
+
path: 'data-set-list'
|
|
12
|
+
},
|
|
13
|
+
owner && {
|
|
14
|
+
name: i18next.t('title.data-key-set list'),
|
|
15
|
+
icon: 'dataset_linked',
|
|
16
|
+
path: 'data-key-set-list'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'DATA ENTRY',
|
|
20
|
+
type: 'group'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
icon: 'edit_square',
|
|
24
|
+
name: i18next.t('title.data-entry list'),
|
|
25
|
+
path: 'data-entry-list'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'DATA REPORT',
|
|
29
|
+
type: 'group'
|
|
30
|
+
},
|
|
31
|
+
owner && {
|
|
32
|
+
name: i18next.t('title.data-sample list'),
|
|
33
|
+
icon: 'rule',
|
|
34
|
+
path: 'data-sample-list',
|
|
35
|
+
menus: dataSets.map(item => {
|
|
36
|
+
return {
|
|
37
|
+
name: item.name,
|
|
38
|
+
icon: 'checklist_rtl',
|
|
39
|
+
path: `data-sample-search/${item.id}`
|
|
40
|
+
};
|
|
41
|
+
}) || []
|
|
42
|
+
},
|
|
43
|
+
owner && {
|
|
44
|
+
name: i18next.t('title.data-summary list'),
|
|
45
|
+
icon: 'functions',
|
|
46
|
+
path: 'data-summary-list',
|
|
47
|
+
menus: dataSets
|
|
48
|
+
.filter(item => item.active && item.summaryPeriod)
|
|
49
|
+
.map(item => {
|
|
50
|
+
return {
|
|
51
|
+
name: item.name,
|
|
52
|
+
icon: 'checklist',
|
|
53
|
+
path: `data-summary-period/${item.id}`
|
|
54
|
+
};
|
|
55
|
+
}) || []
|
|
56
|
+
}
|
|
57
|
+
].filter(Boolean);
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../client/menu.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,MAAM,UAAU,eAAe,CAAC,QAAiB,KAAK,EAAE,QAAe;IACrE,OAAO;QACL,KAAK,IAAI;YACP,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,OAAO;SACd;QACD,KAAK,IAAI;YACP,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC;YACtC,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,eAAe;SACtB;QACD,KAAK,IAAI;YACP,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC;YAC1C,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,mBAAmB;SAC1B;QACD;YACE,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,OAAO;SACd;QACD;YACE,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC;YACxC,IAAI,EAAE,iBAAiB;SACxB;QACD;YACE,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,OAAO;SACd;QACD,KAAK,IAAI;YACP,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;YACzC,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,kBAAkB;YACxB,KAAK,EACH,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gBAClB,OAAO;oBACL,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,IAAI,EAAE,eAAe;oBACrB,IAAI,EAAE,sBAAsB,IAAI,CAAC,EAAE,EAAE;iBACtC,CAAA;YACH,CAAC,CAAC,IAAI,EAAE;SACX;QACD,KAAK,IAAI;YACP,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC;YAC1C,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EACH,QAAQ;iBACL,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa,CAAC;iBACjD,GAAG,CAAC,IAAI,CAAC,EAAE;gBACV,OAAO;oBACL,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,uBAAuB,IAAI,CAAC,EAAE,EAAE;iBACvC,CAAA;YACH,CAAC,CAAC,IAAI,EAAE;SACb;KACF,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;AACnB,CAAC","sourcesContent":["import i18next from 'i18next'\n\nexport function getMenuTemplate(owner: boolean = false, dataSets: any[]) {\n return [\n owner && {\n name: 'DATASET',\n type: 'group'\n },\n owner && {\n name: i18next.t('title.data-set list'),\n icon: 'dataset',\n path: 'data-set-list'\n },\n owner && {\n name: i18next.t('title.data-key-set list'),\n icon: 'dataset_linked',\n path: 'data-key-set-list'\n },\n {\n name: 'DATA ENTRY',\n type: 'group'\n },\n {\n icon: 'edit_square',\n name: i18next.t('title.data-entry list'),\n path: 'data-entry-list'\n },\n {\n name: 'DATA REPORT',\n type: 'group'\n },\n owner && {\n name: i18next.t('title.data-sample list'),\n icon: 'rule',\n path: 'data-sample-list',\n menus:\n dataSets.map(item => {\n return {\n name: item.name,\n icon: 'checklist_rtl',\n path: `data-sample-search/${item.id}`\n }\n }) || []\n },\n owner && {\n name: i18next.t('title.data-summary list'),\n icon: 'functions',\n path: 'data-summary-list',\n menus:\n dataSets\n .filter(item => item.active && item.summaryPeriod)\n .map(item => {\n return {\n name: item.name,\n icon: 'checklist',\n path: `data-summary-period/${item.id}`\n }\n }) || []\n }\n ].filter(Boolean)\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import { PageView } from '@operato/shell';
|
|
3
|
+
declare const SvProjectCompletedListPage_base: typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
|
|
4
|
+
export declare class SvProjectCompletedListPage extends SvProjectCompletedListPage_base {
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
get context(): {
|
|
7
|
+
title: string;
|
|
8
|
+
};
|
|
9
|
+
private projectName;
|
|
10
|
+
private projectList;
|
|
11
|
+
private projectCount;
|
|
12
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
13
|
+
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
14
|
+
getProjectList(): Promise<void>;
|
|
15
|
+
private _onInputChange;
|
|
16
|
+
private _onKeypress;
|
|
17
|
+
}
|
|
18
|
+
export {};
|