@things-factory/operato-gangsters 6.2.102 → 6.2.104

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.
@@ -0,0 +1,6 @@
1
+ import '@operato/i18n/ox-i18n.js';
2
+ import '@things-factory/notification';
3
+ import '@things-factory/board-ui';
4
+ import '@things-factory/auth-ui/dist-client';
5
+ import '@things-factory/setting-ui';
6
+ export default function bootstrap(): Promise<void>;
@@ -0,0 +1,258 @@
1
+ import '@operato/i18n/ox-i18n.js';
2
+ import '@things-factory/notification';
3
+ import '@things-factory/board-ui';
4
+ import '@things-factory/auth-ui/dist-client'; /* for domain-switch */
5
+ import '@things-factory/setting-ui'; /* secure-iplist-setting-let */
6
+ import { html } from 'lit-html';
7
+ import { registerDefaultGroups } from '@operato/board';
8
+ import { navigate, store } from '@operato/shell';
9
+ import { APPEND_APP_TOOL } from '@things-factory/apptool-base';
10
+ import { setupAppToolPart } from '@things-factory/apptool-ui';
11
+ import { auth, hasPrivilege } from '@things-factory/auth-base/dist-client';
12
+ import { setAuthManagementMenus } from '@things-factory/auth-ui';
13
+ import { setupContextUIPart } from '@things-factory/context-ui';
14
+ import { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout';
15
+ import { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu';
16
+ import { ADD_MORENDA } from '@things-factory/more-base';
17
+ import { ADD_SETTING } from '@things-factory/setting-base';
18
+ import { isMobileDevice } from '@operato/utils';
19
+ import { getMenuTemplate } from './menu';
20
+ import { queryActivities } from './query-activities';
21
+ console.log(`%c
22
+ ▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄ ▄▄▄ ▄▄ ▄▄▄▄ ▄▄ ▄ ▄ ▄▄▄▄ ▄▄▄
23
+ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓▓ ▓ ▓ ▓ ▀
24
+ ▓ ▓ ▓▀▀ ▓▀▀ ▓▀▀▄ ▓▀▀▓ ▓ ▓ ▓ ▀▀ ▓ ▄▄ ▓▀▀▓ ▓ ▓ ▓ ▓ ▄▄ ▀▀▄▄
25
+ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓▓ ▓ ▓ ▄ ▓
26
+ ▀▀ ▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀ ▀▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀▀▀ ▀▀▀
27
+ `, 'background: #222; color: #bada55');
28
+ export default async function bootstrap() {
29
+ /*
30
+ set board-modeller group and default templates - should be called befor BoardModeller open
31
+ */
32
+ registerDefaultGroups();
33
+ const mobile = isMobileDevice();
34
+ await setupAppToolPart({
35
+ toolbar: true,
36
+ busybar: true,
37
+ mdibar: mobile ? false : true,
38
+ pageToolbar: true
39
+ });
40
+ await setupContextUIPart({
41
+ titlebar: mobile ? 'header' : 'page-header',
42
+ contextToolbar: 'page-footer'
43
+ });
44
+ await setupMenuPart({
45
+ slotTemplate: html ` <domain-switch slot="tail"></domain-switch> `,
46
+ hovering: true
47
+ });
48
+ /* add addon-menu management page morenda */
49
+ if (await hasPrivilege({ privilege: 'mutation', category: 'menu', domainOwnerGranted: true, superUserGranted: true })) {
50
+ store.dispatch({
51
+ type: ADD_MORENDA,
52
+ morenda: {
53
+ icon: html ` <mwc-icon>view_list</mwc-icon> `,
54
+ name: html ` <ox-i18n msgid="text.addon-menu management"></ox-i18n> `,
55
+ action: () => {
56
+ navigate('addon-menu-setting');
57
+ }
58
+ }
59
+ });
60
+ }
61
+ /* add setting morenda */
62
+ store.dispatch({
63
+ type: ADD_MORENDA,
64
+ morenda: {
65
+ icon: html ` <mwc-icon>settings</mwc-icon> `,
66
+ name: html ` <ox-i18n msgid="label.setting"></ox-i18n> `,
67
+ action: () => {
68
+ navigate('setting');
69
+ }
70
+ }
71
+ });
72
+ /* set auth management menus into more-panel */
73
+ setAuthManagementMenus();
74
+ if (await hasPrivilege({ privilege: 'mutation', category: 'user', domainOwnerGranted: true, superUserGranted: true })) {
75
+ store.dispatch({
76
+ type: ADD_MORENDA,
77
+ morenda: {
78
+ icon: html ` <mwc-icon>vpn_key</mwc-icon> `,
79
+ name: html ` <ox-i18n msgid="text.oauth2-clients"></ox-i18n> `,
80
+ action: () => {
81
+ navigate('oauth2-clients');
82
+ }
83
+ }
84
+ });
85
+ }
86
+ if (await hasPrivilege({ privilege: 'mutation', category: 'board', domainOwnerGranted: true })) {
87
+ store.dispatch({
88
+ type: ADD_MORENDA,
89
+ morenda: {
90
+ icon: html ` <mwc-icon>font_download</mwc-icon> `,
91
+ name: html ` <ox-i18n msgid="menu.fonts"></ox-i18n> `,
92
+ action: () => {
93
+ navigate('font-list');
94
+ }
95
+ }
96
+ });
97
+ store.dispatch({
98
+ type: ADD_MORENDA,
99
+ morenda: {
100
+ icon: html ` <mwc-icon>attachment</mwc-icon> `,
101
+ name: html ` <ox-i18n msgid="menu.attachments"></ox-i18n> `,
102
+ action: () => {
103
+ navigate('attachment-list');
104
+ }
105
+ }
106
+ });
107
+ store.dispatch({
108
+ type: ADD_MORENDA,
109
+ morenda: {
110
+ icon: html ` <mwc-icon>dvr</mwc-icon> `,
111
+ name: html ` <ox-i18n msgid="menu.board-list"></ox-i18n> `,
112
+ action: () => {
113
+ navigate('board-list');
114
+ }
115
+ }
116
+ });
117
+ store.dispatch({
118
+ type: ADD_MORENDA,
119
+ morenda: {
120
+ icon: html ` <mwc-icon>airplay</mwc-icon> `,
121
+ name: html ` <ox-i18n msgid="menu.play-groups"></ox-i18n> `,
122
+ action: () => {
123
+ navigate('play-list');
124
+ }
125
+ }
126
+ });
127
+ }
128
+ if (await hasPrivilege({ privilege: 'mutation', category: 'scenario', domainOwnerGranted: true })) {
129
+ store.dispatch({
130
+ type: ADD_MORENDA,
131
+ morenda: {
132
+ icon: html ` <mwc-icon>device_hub</mwc-icon> `,
133
+ name: html ` <ox-i18n msgid="text.connection"></ox-i18n> `,
134
+ action: () => {
135
+ navigate('connection');
136
+ }
137
+ }
138
+ });
139
+ store.dispatch({
140
+ type: ADD_MORENDA,
141
+ morenda: {
142
+ icon: html ` <mwc-icon>format_list_numbered</mwc-icon> `,
143
+ name: html ` <ox-i18n msgid="text.scenario"></ox-i18n> `,
144
+ action: () => {
145
+ navigate('scenario');
146
+ }
147
+ }
148
+ });
149
+ store.dispatch({
150
+ type: ADD_MORENDA,
151
+ morenda: {
152
+ icon: html ` <mwc-icon>hub</mwc-icon> `,
153
+ name: html ` <ox-i18n msgid="text.integration analysis"></ox-i18n>&nbsp;(beta)`,
154
+ action: () => {
155
+ navigate('integration-analysis');
156
+ }
157
+ }
158
+ });
159
+ }
160
+ if (await hasPrivilege({ privilege: 'mutation', category: 'state-register', domainOwnerGranted: true })) {
161
+ store.dispatch({
162
+ type: ADD_MORENDA,
163
+ morenda: {
164
+ icon: html ` <mwc-icon>app_registration</mwc-icon> `,
165
+ name: html ` <ox-i18n msgid="title.state-register"></ox-i18n> `,
166
+ action: () => {
167
+ navigate('state-register-page');
168
+ }
169
+ }
170
+ });
171
+ }
172
+ auth.on('profile', async ({ credential }) => {
173
+ updateMenuTemplate(getMenuTemplate(credential.owner, await queryActivities()));
174
+ if (credential.owner) {
175
+ store.dispatch({
176
+ type: ADD_MORENDA,
177
+ morenda: {
178
+ icon: html ` <mwc-icon>device_hub</mwc-icon> `,
179
+ name: html ` <ox-i18n msgid="text.installable-activities"></ox-i18n> `,
180
+ action: () => {
181
+ navigate('installable-activity-list');
182
+ }
183
+ }
184
+ });
185
+ }
186
+ store.dispatch({
187
+ type: ADD_MORENDA,
188
+ morenda: {
189
+ icon: html ` <mwc-icon>extension</mwc-icon> `,
190
+ name: html ` <ox-i18n msgid="text.api-sandbox"></ox-i18n> `,
191
+ action: () => {
192
+ navigate('api-swagger');
193
+ }
194
+ }
195
+ });
196
+ // store.dispatch({
197
+ // type: ADD_MORENDA,
198
+ // morenda: {
199
+ // icon: html` <mwc-icon>help</mwc-icon> `,
200
+ // name: html` <ox-i18n msgid="text.help"></ox-i18n> `,
201
+ // action: () => {
202
+ // navigate('help')
203
+ // }
204
+ // }
205
+ // })
206
+ /* setting app-tools */
207
+ store.dispatch({
208
+ type: APPEND_APP_TOOL,
209
+ tool: {
210
+ name: 'notification-badge',
211
+ template: html `
212
+ <notification-badge
213
+ @click=${e => {
214
+ toggleOverlay('notification', {
215
+ backdrop: true
216
+ });
217
+ }}
218
+ >
219
+ </notification-badge>
220
+ `,
221
+ position: TOOL_POSITION.REAR
222
+ }
223
+ });
224
+ appendViewpart({
225
+ name: 'notification',
226
+ viewpart: {
227
+ show: false,
228
+ hovering: 'edge',
229
+ template: html ` <notification-list style="min-width: 300px;"></notification-list> `
230
+ },
231
+ position: VIEWPART_POSITION.ASIDEBAR
232
+ });
233
+ store.dispatch({
234
+ type: ADD_SETTING,
235
+ setting: {
236
+ seq: 20,
237
+ template: html ` <notification-setting-let></notification-setting-let> `
238
+ }
239
+ });
240
+ store.dispatch({
241
+ type: ADD_SETTING,
242
+ setting: {
243
+ seq: 21,
244
+ template: html ` <lite-menu-setting-let></lite-menu-setting-let> `
245
+ }
246
+ });
247
+ });
248
+ if (await hasPrivilege({ privilege: 'mutation', category: 'security' })) {
249
+ store.dispatch({
250
+ type: ADD_SETTING,
251
+ setting: {
252
+ seq: 31,
253
+ template: html ` <secure-iplist-setting-let></secure-iplist-setting-let> `
254
+ }
255
+ });
256
+ }
257
+ }
258
+ //# sourceMappingURL=bootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AACjC,OAAO,8BAA8B,CAAA;AACrC,OAAO,0BAA0B,CAAA;AACjC,OAAO,qCAAqC,CAAA,CAAC,uBAAuB;AACpE,OAAO,4BAA4B,CAAA,CAAC,+BAA+B;AAEnE,OAAO,EAAE,IAA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A;gBACJ,CAAC;;;SAGJ;gBACD,QAAQ,EAAE,aAAa,CAAC,IAAI;aAC7B;SACF,CAAC,CAAA;QAEF,cAAc,CAAC;YACb,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE;gBACR,IAAI,EAAE,KAAK;gBACX,QAAQ,EAAE,MAAM;gBAChB,QAAQ,EAAE,IAAI,CAAA,qEAAqE;aACpF;YACD,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;SACrC,CAAC,CAAA;QAEF,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE;gBACP,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,IAAI,CAAA,yDAAyD;aACxE;SACF,CAAC,CAAA;QAEF,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE;gBACP,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,IAAI,CAAA,mDAAmD;aAClE;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,IAAI,MAAM,YAAY,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,EAAE;QACvE,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE;gBACP,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,IAAI,CAAA,2DAA2D;aAC1E;SACF,CAAC,CAAA;KACH;AACH,CAAC","sourcesContent":["import '@operato/i18n/ox-i18n.js'\nimport '@things-factory/notification'\nimport '@things-factory/board-ui'\nimport '@things-factory/auth-ui/dist-client' /* for domain-switch */\nimport '@things-factory/setting-ui' /* secure-iplist-setting-let */\n\nimport { html } from 'lit-html'\n\nimport { registerDefaultGroups } from '@operato/board'\nimport { navigate, store } from '@operato/shell'\nimport { APPEND_APP_TOOL } from '@things-factory/apptool-base'\nimport { setupAppToolPart } from '@things-factory/apptool-ui'\nimport { auth, hasPrivilege } from '@things-factory/auth-base/dist-client'\nimport { setAuthManagementMenus } from '@things-factory/auth-ui'\nimport { setupContextUIPart } from '@things-factory/context-ui'\nimport { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'\nimport { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu'\nimport { ADD_MORENDA } from '@things-factory/more-base'\nimport { ADD_SETTING } from '@things-factory/setting-base'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { getMenuTemplate } from './menu'\nimport { queryActivities } from './query-activities'\n\nconsole.log(\n `%c\n ▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄ ▄▄▄ ▄▄ ▄▄▄▄ ▄▄ ▄ ▄ ▄▄▄▄ ▄▄▄ \n ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓▓ ▓ ▓ ▓ ▀ \n ▓ ▓ ▓▀▀ ▓▀▀ ▓▀▀▄ ▓▀▀▓ ▓ ▓ ▓ ▀▀ ▓ ▄▄ ▓▀▀▓ ▓ ▓ ▓ ▓ ▄▄ ▀▀▄▄ \n ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓▓ ▓ ▓ ▄ ▓ \n ▀▀ ▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀ ▀▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀▀▀ ▀▀▀ \n`,\n 'background: #222; color: #bada55'\n)\n\nexport default async function bootstrap() {\n /* \n set board-modeller group and default templates - should be called befor BoardModeller open \n */\n registerDefaultGroups()\n\n const mobile = isMobileDevice()\n\n await setupAppToolPart({\n toolbar: true,\n busybar: true,\n mdibar: mobile ? false : true,\n pageToolbar: true\n })\n\n await setupContextUIPart({\n titlebar: mobile ? 'header' : 'page-header',\n contextToolbar: 'page-footer'\n })\n\n await setupMenuPart({\n slotTemplate: html` <domain-switch slot=\"tail\"></domain-switch> `,\n hovering: true\n })\n\n /* add addon-menu management page morenda */\n if (\n await hasPrivilege({ privilege: 'mutation', category: 'menu', domainOwnerGranted: true, superUserGranted: true })\n ) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>view_list</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.addon-menu management\"></ox-i18n> `,\n action: () => {\n navigate('addon-menu-setting')\n }\n }\n })\n }\n\n /* add setting morenda */\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>settings</mwc-icon> `,\n name: html` <ox-i18n msgid=\"label.setting\"></ox-i18n> `,\n action: () => {\n navigate('setting')\n }\n }\n })\n\n /* set auth management menus into more-panel */\n setAuthManagementMenus()\n\n if (\n await hasPrivilege({ privilege: 'mutation', category: 'user', domainOwnerGranted: true, superUserGranted: true })\n ) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>vpn_key</mwc-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 (await hasPrivilege({ privilege: 'mutation', category: 'board', domainOwnerGranted: true })) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>font_download</mwc-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` <mwc-icon>attachment</mwc-icon> `,\n name: html` <ox-i18n msgid=\"menu.attachments\"></ox-i18n> `,\n action: () => {\n navigate('attachment-list')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>dvr</mwc-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` <mwc-icon>airplay</mwc-icon> `,\n name: html` <ox-i18n msgid=\"menu.play-groups\"></ox-i18n> `,\n action: () => {\n navigate('play-list')\n }\n }\n })\n }\n\n if (await hasPrivilege({ privilege: 'mutation', category: 'scenario', domainOwnerGranted: true })) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>device_hub</mwc-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` <mwc-icon>format_list_numbered</mwc-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` <mwc-icon>hub</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.integration analysis\"></ox-i18n>&nbsp;(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` <mwc-icon>app_registration</mwc-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 auth.on('profile', async ({ credential }) => {\n updateMenuTemplate(getMenuTemplate(credential.owner, await queryActivities()))\n\n if (credential.owner) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>device_hub</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.installable-activities\"></ox-i18n> `,\n action: () => {\n navigate('installable-activity-list')\n }\n }\n })\n }\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>extension</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.api-sandbox\"></ox-i18n> `,\n action: () => {\n navigate('api-swagger')\n }\n }\n })\n\n // store.dispatch({\n // type: ADD_MORENDA,\n // morenda: {\n // icon: html` <mwc-icon>help</mwc-icon> `,\n // name: html` <ox-i18n msgid=\"text.help\"></ox-i18n> `,\n // action: () => {\n // navigate('help')\n // }\n // }\n // })\n\n /* setting app-tools */\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 store.dispatch({\n type: ADD_SETTING,\n setting: {\n seq: 20,\n template: html` <notification-setting-let></notification-setting-let> `\n }\n })\n\n store.dispatch({\n type: ADD_SETTING,\n setting: {\n seq: 21,\n template: html` <lite-menu-setting-let></lite-menu-setting-let> `\n }\n })\n })\n\n if (await hasPrivilege({ privilege: 'mutation', category: 'security' })) {\n store.dispatch({\n type: ADD_SETTING,\n setting: {\n seq: 31,\n template: html` <secure-iplist-setting-let></secure-iplist-setting-let> `\n }\n })\n }\n}\n"]}
File without changes
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../client/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -0,0 +1,90 @@
1
+ export declare function getMenuTemplate(owner: boolean | undefined, activities: any[]): (false | {
2
+ name: string;
3
+ icon: string;
4
+ path: string;
5
+ badge: () => import("lit-html/directive").DirectiveResult<typeof import("lit-html/directives/async-replace").AsyncReplaceDirective>;
6
+ active: ({ path }: {
7
+ path: any;
8
+ }) => boolean;
9
+ menus?: undefined;
10
+ description?: undefined;
11
+ type?: undefined;
12
+ } | {
13
+ name: string;
14
+ icon: string;
15
+ path: string;
16
+ badge: () => import("lit-html/directive").DirectiveResult<typeof import("lit-html/directives/async-replace").AsyncReplaceDirective>;
17
+ active?: undefined;
18
+ menus?: undefined;
19
+ description?: undefined;
20
+ type?: undefined;
21
+ } | {
22
+ name: string;
23
+ icon: string;
24
+ path: string;
25
+ badge?: undefined;
26
+ active?: undefined;
27
+ menus?: undefined;
28
+ description?: undefined;
29
+ type?: undefined;
30
+ } | {
31
+ name: string;
32
+ icon: string;
33
+ path: string;
34
+ menus: {
35
+ name: any;
36
+ icon: string;
37
+ path: string;
38
+ }[];
39
+ badge?: undefined;
40
+ active?: undefined;
41
+ description?: undefined;
42
+ type?: undefined;
43
+ } | {
44
+ name: string;
45
+ icon: string;
46
+ path: string;
47
+ description: string;
48
+ menus: {
49
+ name: string;
50
+ icon: string;
51
+ path: string;
52
+ }[];
53
+ badge?: undefined;
54
+ active?: undefined;
55
+ type?: undefined;
56
+ } | {
57
+ name: string;
58
+ icon: string;
59
+ description: string;
60
+ menus: {
61
+ name: string;
62
+ icon: string;
63
+ path: string;
64
+ }[];
65
+ path?: undefined;
66
+ badge?: undefined;
67
+ active?: undefined;
68
+ type?: undefined;
69
+ } | {
70
+ name: string;
71
+ type: string;
72
+ icon?: undefined;
73
+ path?: undefined;
74
+ badge?: undefined;
75
+ active?: undefined;
76
+ menus?: undefined;
77
+ description?: undefined;
78
+ } | {
79
+ name: string;
80
+ icon: string;
81
+ description: string;
82
+ menus: {
83
+ name: string;
84
+ path: string;
85
+ }[];
86
+ path?: undefined;
87
+ badge?: undefined;
88
+ active?: undefined;
89
+ type?: undefined;
90
+ })[];
@@ -0,0 +1,149 @@
1
+ import { asyncReplace } from 'lit/directives/async-replace.js';
2
+ import i18next from 'i18next';
3
+ import { generateActivitySummary, startSubscribeActivitySummary } from '@things-factory/worklist';
4
+ startSubscribeActivitySummary();
5
+ export function getMenuTemplate(owner = false, activities) {
6
+ return [
7
+ {
8
+ name: i18next.t('title.todo list'),
9
+ icon: 'format_list_bulleted',
10
+ path: 'todo-list',
11
+ badge: () => asyncReplace(generateActivitySummary('numberOfToDos')),
12
+ active: ({ path }) => /^activity\//.test(path)
13
+ },
14
+ {
15
+ name: i18next.t('title.approval pending list'),
16
+ icon: 'approval',
17
+ path: 'approval-pending-list',
18
+ badge: () => asyncReplace(generateActivitySummary('numberOfApprovalPendings')),
19
+ active: ({ path }) => /^approval\//.test(path)
20
+ },
21
+ {
22
+ name: i18next.t('title.activity shopping'),
23
+ icon: 'shop',
24
+ path: 'pickable-list',
25
+ badge: () => asyncReplace(generateActivitySummary('numberOfPicks'))
26
+ },
27
+ {
28
+ name: i18next.t('title.draft list'),
29
+ icon: 'drive_file_rename_outline',
30
+ path: 'draft-list',
31
+ active: ({ path }) => /^activity-instance-start\//.test(path),
32
+ badge: () => asyncReplace(generateActivitySummary('numberOfDrafts'))
33
+ },
34
+ {
35
+ name: i18next.t('title.activity starter list'),
36
+ icon: 'rocket_launch',
37
+ path: 'starter-list'
38
+ },
39
+ {
40
+ name: i18next.t('title.activity reporter list'),
41
+ icon: 'content_paste_search',
42
+ path: 'reporter-list',
43
+ menus: activities.map(item => {
44
+ return {
45
+ name: item.name,
46
+ icon: 'checklist',
47
+ path: `activity-instance-search/${item.id}`
48
+ };
49
+ }) || []
50
+ },
51
+ {
52
+ name: i18next.t('title.done list calendar'),
53
+ icon: 'calendar_month',
54
+ path: 'done-list-calendar',
55
+ description: '업무와 관련된 수행 또는 결재 이력을 캘린더에서 조회할 수 있습니다.',
56
+ menus: [
57
+ {
58
+ name: i18next.t('title.done list'),
59
+ icon: 'history',
60
+ path: 'done-list'
61
+ },
62
+ {
63
+ name: i18next.t('title.approval done list'),
64
+ icon: 'history',
65
+ path: 'approval-done-list'
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ name: i18next.t('title.tax invoice'),
71
+ icon: 'history',
72
+ description: '세금계산서',
73
+ menus: [
74
+ {
75
+ name: i18next.t('title.tax invoice list'),
76
+ icon: 'history',
77
+ path: 'tax-invoice-list'
78
+ },
79
+ {
80
+ name: i18next.t('title.tax invoice send'),
81
+ icon: 'history',
82
+ path: 'tax-invoice-send'
83
+ },
84
+ {
85
+ name: i18next.t('title.tax invoice company list'),
86
+ icon: 'history',
87
+ path: 'tax-invoice-company-list'
88
+ },
89
+ {
90
+ name: i18next.t('title.tax invoice api'),
91
+ icon: 'history',
92
+ path: 'tax-invoice-api'
93
+ }
94
+ ]
95
+ },
96
+ owner && {
97
+ name: i18next.t('title.activity list'),
98
+ icon: 'app_registration',
99
+ path: 'activity-list'
100
+ },
101
+ // owner && {
102
+ // name: i18next.t('title.activity template list'),
103
+ // icon: 'dashboard_customize',
104
+ // path: 'activity-template-list'
105
+ // },
106
+ // owner && {
107
+ // name: i18next.t('title.activity store'),
108
+ // icon: 'store',
109
+ // path: 'activity-store'
110
+ // },
111
+ owner && {
112
+ name: i18next.t('title.activity summary'),
113
+ icon: 'dashboard',
114
+ path: 'worklist-dashboard'
115
+ },
116
+ owner && {
117
+ name: i18next.t('title.organization'),
118
+ type: 'group'
119
+ },
120
+ owner && {
121
+ name: i18next.t('title.organization'),
122
+ icon: 'account_tree',
123
+ description: '조직 구성과 결재선 관리를 위한 메뉴 구성입니다.',
124
+ menus: [
125
+ {
126
+ name: i18next.t('title.contact list'),
127
+ path: 'contact-list'
128
+ },
129
+ {
130
+ name: i18next.t('title.employee list'),
131
+ path: 'employee-list'
132
+ },
133
+ {
134
+ name: i18next.t('title.department list'),
135
+ path: 'department-list'
136
+ },
137
+ {
138
+ name: i18next.t('title.my-approval-line template list'),
139
+ path: 'my-approval-line-templates-page'
140
+ },
141
+ {
142
+ name: i18next.t('title.common-approval-line template list'),
143
+ path: 'common-approval-line-templates-page'
144
+ }
145
+ ]
146
+ }
147
+ ].filter(Boolean);
148
+ }
149
+ //# sourceMappingURL=menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.js","sourceRoot":"","sources":["../client/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MA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BACxC,IAAI,EAAE,iBAAiB;iBACxB;gBACD;oBACE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,sCAAsC,CAAC;oBACvD,IAAI,EAAE,iCAAiC;iBACxC;gBACD;oBACE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,0CAA0C,CAAC;oBAC3D,IAAI,EAAE,qCAAqC;iBAC5C;aACF;SACF;KACF,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;AACnB,CAAC","sourcesContent":["import { asyncReplace } from 'lit/directives/async-replace.js'\nimport i18next from 'i18next'\nimport { generateActivitySummary, startSubscribeActivitySummary } from '@things-factory/worklist'\n\nstartSubscribeActivitySummary()\n\nexport function getMenuTemplate(owner: boolean = false, activities: any[]) {\n return [\n {\n name: i18next.t('title.todo list'),\n icon: 'format_list_bulleted',\n path: 'todo-list',\n badge: () => asyncReplace(generateActivitySummary('numberOfToDos')),\n active: ({ path }) => /^activity\\//.test(path)\n },\n {\n name: i18next.t('title.approval pending list'),\n icon: 'approval',\n path: 'approval-pending-list',\n badge: () => asyncReplace(generateActivitySummary('numberOfApprovalPendings')),\n active: ({ path }) => /^approval\\//.test(path)\n },\n {\n name: i18next.t('title.activity shopping'),\n icon: 'shop',\n path: 'pickable-list',\n badge: () => asyncReplace(generateActivitySummary('numberOfPicks'))\n },\n {\n name: i18next.t('title.draft list'),\n icon: 'drive_file_rename_outline',\n path: 'draft-list',\n active: ({ path }) => /^activity-instance-start\\//.test(path),\n badge: () => asyncReplace(generateActivitySummary('numberOfDrafts'))\n },\n {\n name: i18next.t('title.activity starter list'),\n icon: 'rocket_launch',\n path: 'starter-list'\n },\n {\n name: i18next.t('title.activity reporter list'),\n icon: 'content_paste_search',\n path: 'reporter-list',\n menus:\n activities.map(item => {\n return {\n name: item.name,\n icon: 'checklist',\n path: `activity-instance-search/${item.id}`\n }\n }) || []\n },\n {\n name: i18next.t('title.done list calendar'),\n icon: 'calendar_month',\n path: 'done-list-calendar',\n description: '업무와 관련된 수행 또는 결재 이력을 캘린더에서 조회할 수 있습니다.',\n menus: [\n {\n name: i18next.t('title.done list'),\n icon: 'history',\n path: 'done-list'\n },\n {\n name: i18next.t('title.approval done list'),\n icon: 'history',\n path: 'approval-done-list'\n }\n ]\n },\n {\n name: i18next.t('title.tax invoice'),\n icon: 'history',\n description: '세금계산서',\n menus: [\n {\n name: i18next.t('title.tax invoice list'),\n icon: 'history',\n path: 'tax-invoice-list'\n },\n {\n name: i18next.t('title.tax invoice send'),\n icon: 'history',\n path: 'tax-invoice-send'\n },\n {\n name: i18next.t('title.tax invoice company list'),\n icon: 'history',\n path: 'tax-invoice-company-list'\n },\n {\n name: i18next.t('title.tax invoice api'),\n icon: 'history',\n path: 'tax-invoice-api'\n }\n ]\n },\n owner && {\n name: i18next.t('title.activity list'),\n icon: 'app_registration',\n path: 'activity-list'\n },\n // owner && {\n // name: i18next.t('title.activity template list'),\n // icon: 'dashboard_customize',\n // path: 'activity-template-list'\n // },\n // owner && {\n // name: i18next.t('title.activity store'),\n // icon: 'store',\n // path: 'activity-store'\n // },\n owner && {\n name: i18next.t('title.activity summary'),\n icon: 'dashboard',\n path: 'worklist-dashboard'\n },\n owner && {\n name: i18next.t('title.organization'),\n type: 'group'\n },\n owner && {\n name: i18next.t('title.organization'),\n icon: 'account_tree',\n description: '조직 구성과 결재선 관리를 위한 메뉴 구성입니다.',\n menus: [\n {\n name: i18next.t('title.contact list'),\n path: 'contact-list'\n },\n {\n name: i18next.t('title.employee list'),\n path: 'employee-list'\n },\n {\n name: i18next.t('title.department list'),\n path: 'department-list'\n },\n {\n name: i18next.t('title.my-approval-line template list'),\n path: 'my-approval-line-templates-page'\n },\n {\n name: i18next.t('title.common-approval-line template list'),\n path: 'common-approval-line-templates-page'\n }\n ]\n }\n ].filter(Boolean)\n}\n"]}
@@ -0,0 +1,6 @@
1
+ export declare function queryActivities(): Promise<{
2
+ id: string;
3
+ name: string;
4
+ description: string;
5
+ active: boolean;
6
+ }[]>;
@@ -0,0 +1,32 @@
1
+ import gql from 'graphql-tag';
2
+ import { client } from '@operato/graphql';
3
+ export async function queryActivities() {
4
+ const response = await client.query({
5
+ query: gql `
6
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
7
+ responses: activities(filters: $filters, pagination: $pagination, sortings: $sortings) {
8
+ items {
9
+ id
10
+ name
11
+ description
12
+ state
13
+ }
14
+ total
15
+ }
16
+ }
17
+ `,
18
+ variables: {
19
+ filters: [
20
+ {
21
+ name: 'state',
22
+ operator: 'eq',
23
+ value: 'released'
24
+ }
25
+ ],
26
+ pagination: {},
27
+ sortings: []
28
+ }
29
+ });
30
+ return response.data.responses.items;
31
+ }
32
+ //# sourceMappingURL=query-activities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-activities.js","sourceRoot":"","sources":["../client/query-activities.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;QAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;KAYT;QACD,SAAS,EAAE;YACT,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,OAAO;oBACb,QAAQ,EAAE,IAAI;oBACd,KAAK,EAAE,UAAU;iBAClB;aACF;YACD,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAE;SACb;KACF,CAAC,CAAA;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAA;AACtC,CAAC","sourcesContent":["import gql from 'graphql-tag'\nimport { client } from '@operato/graphql'\n\nexport async function queryActivities(): Promise<{ id: string; name: string; description: string; active: boolean }[]> {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: activities(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n state\n }\n total\n }\n }\n `,\n variables: {\n filters: [\n {\n name: 'state',\n operator: 'eq',\n value: 'released'\n }\n ],\n pagination: {},\n sortings: []\n }\n })\n\n return response.data.responses.items\n}\n"]}
@@ -0,0 +1 @@
1
+ export default function route(page: string): "/todo-list" | undefined;
@@ -0,0 +1,7 @@
1
+ export default function route(page) {
2
+ switch (page) {
3
+ case '':
4
+ return '/todo-list';
5
+ }
6
+ }
7
+ //# sourceMappingURL=route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAY;IACxC,QAAQ,IAAI,EAAE;QACZ,KAAK,EAAE;YACL,OAAO,YAAY,CAAA;KACtB;AACH,CAAC","sourcesContent":["export default function route(page: string) {\n switch (page) {\n case '':\n return '/todo-list'\n }\n}\n"]}