@things-factory/operato-dataset 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/dist-client/bootstrap.js +47 -32
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -6
- package/schema.graphql +170 -2
package/dist-client/bootstrap.js
CHANGED
|
@@ -12,6 +12,7 @@ import { OxPropertyEditor } from '@operato/property-editor';
|
|
|
12
12
|
import { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout';
|
|
13
13
|
import { APPEND_APP_TOOL } from '@things-factory/apptool-base';
|
|
14
14
|
import { auth } from '@things-factory/auth-base/dist-client';
|
|
15
|
+
import { hasPrivilege } from '@things-factory/auth-base/dist-client';
|
|
15
16
|
import { setAuthManagementMenus } from '@things-factory/auth-ui';
|
|
16
17
|
import { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu';
|
|
17
18
|
import { setupAppToolPart } from '@things-factory/apptool-ui';
|
|
@@ -47,10 +48,54 @@ export default async function bootstrap() {
|
|
|
47
48
|
'ccp-limits': 'ox-property-editor-ccp-limits',
|
|
48
49
|
'qc-limits': 'ox-property-editor-qc-limits'
|
|
49
50
|
});
|
|
51
|
+
/* set auth management menus into more-panel */
|
|
52
|
+
setAuthManagementMenus();
|
|
53
|
+
if (await hasPrivilege({ name: 'mutation', category: 'user', domainOwnerGranted: true, superUserGranted: true })) {
|
|
54
|
+
store.dispatch({
|
|
55
|
+
type: ADD_MORENDA,
|
|
56
|
+
morenda: {
|
|
57
|
+
icon: html ` <mwc-icon>vpn_key</mwc-icon> `,
|
|
58
|
+
name: html ` <ox-i18n msgid="text.oauth2-clients"></ox-i18n> `,
|
|
59
|
+
action: () => {
|
|
60
|
+
navigate('oauth2-clients');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (await hasPrivilege({ name: 'mutation', category: 'scenario', domainOwnerGranted: true, superUserGranted: true })) {
|
|
66
|
+
store.dispatch({
|
|
67
|
+
type: ADD_MORENDA,
|
|
68
|
+
morenda: {
|
|
69
|
+
icon: html ` <mwc-icon>device_hub</mwc-icon> `,
|
|
70
|
+
name: html ` <ox-i18n msgid="text.connection"></ox-i18n> `,
|
|
71
|
+
action: () => {
|
|
72
|
+
navigate('connection');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
store.dispatch({
|
|
77
|
+
type: ADD_MORENDA,
|
|
78
|
+
morenda: {
|
|
79
|
+
icon: html ` <mwc-icon>format_list_numbered</mwc-icon> `,
|
|
80
|
+
name: html ` <ox-i18n msgid="text.scenario"></ox-i18n> `,
|
|
81
|
+
action: () => {
|
|
82
|
+
navigate('scenario');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
store.dispatch({
|
|
87
|
+
type: ADD_MORENDA,
|
|
88
|
+
morenda: {
|
|
89
|
+
icon: html ` <mwc-icon>hub</mwc-icon> `,
|
|
90
|
+
name: html ` <ox-i18n msgid="text.integration analysis"></ox-i18n> (beta)`,
|
|
91
|
+
action: () => {
|
|
92
|
+
navigate('integration-analysis');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
50
97
|
auth.on('profile', async ({ credential }) => {
|
|
51
98
|
updateMenuTemplate(getMenuTemplate(credential.owner, await queryDataSets()));
|
|
52
|
-
/* set auth management menus into more-panel */
|
|
53
|
-
setAuthManagementMenus(credential);
|
|
54
99
|
if (credential.owner) {
|
|
55
100
|
store.dispatch({
|
|
56
101
|
type: ADD_MORENDA,
|
|
@@ -62,36 +107,6 @@ export default async function bootstrap() {
|
|
|
62
107
|
}
|
|
63
108
|
}
|
|
64
109
|
});
|
|
65
|
-
store.dispatch({
|
|
66
|
-
type: ADD_MORENDA,
|
|
67
|
-
morenda: {
|
|
68
|
-
icon: html ` <mwc-icon>device_hub</mwc-icon> `,
|
|
69
|
-
name: html ` <ox-i18n msgid="text.connection"></ox-i18n> `,
|
|
70
|
-
action: () => {
|
|
71
|
-
navigate('connection');
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
store.dispatch({
|
|
76
|
-
type: ADD_MORENDA,
|
|
77
|
-
morenda: {
|
|
78
|
-
icon: html ` <mwc-icon>format_list_numbered</mwc-icon> `,
|
|
79
|
-
name: html ` <ox-i18n msgid="text.scenario"></ox-i18n> `,
|
|
80
|
-
action: () => {
|
|
81
|
-
navigate('scenario');
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
store.dispatch({
|
|
86
|
-
type: ADD_MORENDA,
|
|
87
|
-
morenda: {
|
|
88
|
-
icon: html ` <mwc-icon>vpn_key</mwc-icon> `,
|
|
89
|
-
name: html ` <ox-i18n msgid="text.oauth2-clients"></ox-i18n> `,
|
|
90
|
-
action: () => {
|
|
91
|
-
navigate('oauth2-clients');
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
110
|
store.dispatch({
|
|
96
111
|
type: ADD_MORENDA,
|
|
97
112
|
morenda: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AACjC,OAAO,8BAA8B,CAAA;AACrC,OAAO,qCAAqC,CAAA,CAAC,uBAAuB;AAEpE,OAAO,8BAA8B,CAAA;AACrC,OAAO,6BAA6B,CAAA;AACpC,OAAO,mDAAmD,CAAA;AAC1D,OAAO,kDAAkD,CAAA;AAEzD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EA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D,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;AACJ,CAAC","sourcesContent":["import '@operato/i18n/ox-i18n.js'\nimport '@things-factory/notification'\nimport '@things-factory/auth-ui/dist-client' /* for domain-switch */\n\nimport '@operato/dataset/usecase/ccp'\nimport '@operato/dataset/usecase/qc'\nimport '@operato/dataset/ox-property-editor-ccp-limits.js'\nimport '@operato/dataset/ox-property-editor-qc-limits.js'\n\nimport { html } from 'lit-html'\n\nimport { registerDefaultGroups } from '@operato/board'\nimport { navigate, store } from '@operato/shell'\nimport { OxPropertyEditor } from '@operato/property-editor'\n\nimport { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'\nimport { APPEND_APP_TOOL } from '@things-factory/apptool-base'\nimport { auth } from '@things-factory/auth-base/dist-client'\nimport { setAuthManagementMenus } from '@things-factory/auth-ui'\nimport { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu'\nimport { setupAppToolPart } from '@things-factory/apptool-ui'\nimport { setupContextUIPart } from '@things-factory/context-ui'\nimport { ADD_MORENDA } from '@things-factory/more-base'\nimport { ADD_SETTING } from '@things-factory/setting-base'\n\nimport { getMenuTemplate } from './menu'\nimport { queryDataSets, queryDataKeySets } from './query-data-sets'\n\nconsole.log(\n `%c\n ▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄ ▄▄▄ ▄▄ ▄ ▄ ▄▄ ▄▄▄ ▄▄▄ ▄▄▄ \n ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓\n ▓ ▓ ▓▀▀ ▓▀▀ ▓▀▀▄ ▓▀▀▓ ▓ ▓ ▓ ▀▀ ▓▀▀▓ ▓▀▀▓ ▓ ▓ ▓▀▀ \n ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ \n ▀▀ ▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀ ▀▀ ▀ ▀ ▀ ▀ ▀▀▀ ▀▀▀ ▀ \n`,\n 'background: #222; color: #bada55'\n)\n\nexport default async function bootstrap() {\n await setupAppToolPart({\n toolbar: true,\n busybar: true,\n mdibar: true\n })\n\n await setupContextUIPart({\n titlebar: '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 /* set board-modeller group and default templates */\n registerDefaultGroups()\n\n OxPropertyEditor.register({\n 'ccp-limits': 'ox-property-editor-ccp-limits',\n 'qc-limits': 'ox-property-editor-qc-limits'\n })\n\n auth.on('profile', async ({ credential }) => {\n updateMenuTemplate(getMenuTemplate(credential.owner, await queryDataSets()))\n\n /* set auth management menus into more-panel */\n setAuthManagementMenus(credential)\n\n if (credential.owner) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>pending_actions</mwc-icon> `,\n name: html` <i18n-msg msgid=\"title.work-shift\"></i18n-msg> `,\n action: () => {\n navigate('work-shift')\n }\n }\n })\n\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>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 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"]}
|
|
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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;AACJ,CAAC","sourcesContent":["import '@operato/i18n/ox-i18n.js'\nimport '@things-factory/notification'\nimport '@things-factory/auth-ui/dist-client' /* for domain-switch */\n\nimport '@operato/dataset/usecase/ccp'\nimport '@operato/dataset/usecase/qc'\nimport '@operato/dataset/ox-property-editor-ccp-limits.js'\nimport '@operato/dataset/ox-property-editor-qc-limits.js'\n\nimport { html } from 'lit-html'\n\nimport { registerDefaultGroups } from '@operato/board'\nimport { navigate, store } from '@operato/shell'\nimport { OxPropertyEditor } from '@operato/property-editor'\n\nimport { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'\n\nimport { APPEND_APP_TOOL } from '@things-factory/apptool-base'\nimport { auth } from '@things-factory/auth-base/dist-client'\nimport { hasPrivilege } from '@things-factory/auth-base/dist-client'\nimport { setAuthManagementMenus } from '@things-factory/auth-ui'\nimport { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu'\nimport { setupAppToolPart } from '@things-factory/apptool-ui'\nimport { setupContextUIPart } from '@things-factory/context-ui'\nimport { ADD_MORENDA } from '@things-factory/more-base'\nimport { ADD_SETTING } from '@things-factory/setting-base'\n\nimport { getMenuTemplate } from './menu'\nimport { queryDataSets, queryDataKeySets } from './query-data-sets'\n\nconsole.log(\n `%c\n ▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄ ▄▄▄ ▄▄ ▄ ▄ ▄▄ ▄▄▄ ▄▄▄ ▄▄▄ \n ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓\n ▓ ▓ ▓▀▀ ▓▀▀ ▓▀▀▄ ▓▀▀▓ ▓ ▓ ▓ ▀▀ ▓▀▀▓ ▓▀▀▓ ▓ ▓ ▓▀▀ \n ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ \n ▀▀ ▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀ ▀▀ ▀ ▀ ▀ ▀ ▀▀▀ ▀▀▀ ▀ \n`,\n 'background: #222; color: #bada55'\n)\n\nexport default async function bootstrap() {\n await setupAppToolPart({\n toolbar: true,\n busybar: true,\n mdibar: true\n })\n\n await setupContextUIPart({\n titlebar: '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 /* set board-modeller group and default templates */\n registerDefaultGroups()\n\n OxPropertyEditor.register({\n 'ccp-limits': 'ox-property-editor-ccp-limits',\n 'qc-limits': 'ox-property-editor-qc-limits'\n })\n\n /* set auth management menus into more-panel */\n setAuthManagementMenus()\n\n if (await hasPrivilege({ name: 'mutation', category: 'user', domainOwnerGranted: true, superUserGranted: true })) {\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 (\n await hasPrivilege({ name: 'mutation', category: 'scenario', domainOwnerGranted: true, superUserGranted: true })\n ) {\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> (beta)`,\n action: () => {\n navigate('integration-analysis')\n }\n }\n })\n }\n\n auth.on('profile', async ({ credential }) => {\n updateMenuTemplate(getMenuTemplate(credential.owner, await queryDataSets()))\n\n if (credential.owner) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>pending_actions</mwc-icon> `,\n name: html` <i18n-msg msgid=\"title.work-shift\"></i18n-msg> `,\n action: () => {\n navigate('work-shift')\n }\n }\n })\n\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"]}
|