@dssp/dcsp 1.0.0-alpha.23 → 1.0.0-alpha.25

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,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,246 @@
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: 'dcsp-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('dcsp-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;">CSP</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
+ /* set auth management menus into more-panel */
108
+ setAuthManagementMenus();
109
+ if (await hasPrivilege({
110
+ privilege: 'mutation',
111
+ category: 'user',
112
+ domainOwnerGranted: true,
113
+ superUserGranted: true
114
+ })) {
115
+ store.dispatch({
116
+ type: ADD_MORENDA,
117
+ morenda: {
118
+ icon: html ` <md-icon>vpn_key</md-icon> `,
119
+ name: html ` <ox-i18n msgid="text.oauth2-clients"></ox-i18n> `,
120
+ action: () => {
121
+ navigate('oauth2-clients');
122
+ }
123
+ }
124
+ });
125
+ }
126
+ if (await hasPrivilege({
127
+ privilege: 'mutation',
128
+ category: 'board',
129
+ domainOwnerGranted: true,
130
+ superUserGranted: true
131
+ })) {
132
+ store.dispatch({
133
+ type: ADD_MORENDA,
134
+ morenda: {
135
+ icon: html ` <md-icon>font_download</md-icon> `,
136
+ name: html ` <ox-i18n msgid="menu.fonts"></ox-i18n> `,
137
+ action: () => {
138
+ navigate('font-list');
139
+ }
140
+ }
141
+ });
142
+ store.dispatch({
143
+ type: ADD_MORENDA,
144
+ morenda: {
145
+ icon: html ` <md-icon>dvr</md-icon> `,
146
+ name: html ` <ox-i18n msgid="menu.board-list"></ox-i18n> `,
147
+ action: () => {
148
+ navigate('board-list');
149
+ }
150
+ }
151
+ });
152
+ }
153
+ if (await hasPrivilege({
154
+ privilege: 'query',
155
+ category: 'attachment',
156
+ domainOwnerGranted: true,
157
+ superUserGranted: true
158
+ })) {
159
+ store.dispatch({
160
+ type: ADD_MORENDA,
161
+ morenda: {
162
+ icon: html ` <md-icon>attachment</md-icon> `,
163
+ name: html ` <ox-i18n msgid="menu.attachments"></ox-i18n> `,
164
+ action: () => {
165
+ navigate('attachment-list');
166
+ }
167
+ }
168
+ });
169
+ }
170
+ if (await hasPrivilege({ privilege: 'mutation', category: 'scenario', domainOwnerGranted: true })) {
171
+ store.dispatch({
172
+ type: ADD_MORENDA,
173
+ morenda: {
174
+ icon: html ` <md-icon>dashboard</md-icon> `,
175
+ name: html ` <ox-i18n msgid="menu.board-template"></ox-i18n> `,
176
+ action: () => {
177
+ navigate('board-template-list');
178
+ }
179
+ }
180
+ });
181
+ }
182
+ if (await hasPrivilege({
183
+ privilege: 'mutation',
184
+ category: 'scenario',
185
+ domainOwnerGranted: true,
186
+ superUserGranted: true
187
+ })) {
188
+ store.dispatch({
189
+ type: ADD_MORENDA,
190
+ morenda: {
191
+ icon: html ` <md-icon>device_hub</md-icon> `,
192
+ name: html ` <ox-i18n msgid="text.connection"></ox-i18n> `,
193
+ action: () => {
194
+ navigate('connection');
195
+ }
196
+ }
197
+ });
198
+ store.dispatch({
199
+ type: ADD_MORENDA,
200
+ morenda: {
201
+ icon: html ` <md-icon>format_list_numbered</md-icon> `,
202
+ name: html ` <ox-i18n msgid="text.scenario"></ox-i18n> `,
203
+ action: () => {
204
+ navigate('scenario');
205
+ }
206
+ }
207
+ });
208
+ store.dispatch({
209
+ type: ADD_MORENDA,
210
+ morenda: {
211
+ icon: html ` <md-icon>hub</md-icon> `,
212
+ name: html ` <ox-i18n msgid="text.integration analysis"></ox-i18n>&nbsp;(beta)`,
213
+ action: () => {
214
+ navigate('integration-analysis');
215
+ }
216
+ }
217
+ });
218
+ }
219
+ if (await hasPrivilege({ privilege: 'mutation', category: 'state-register', domainOwnerGranted: true })) {
220
+ store.dispatch({
221
+ type: ADD_MORENDA,
222
+ morenda: {
223
+ icon: html ` <md-icon>app_registration</md-icon> `,
224
+ name: html ` <ox-i18n msgid="title.state-register"></ox-i18n> `,
225
+ action: () => {
226
+ navigate('state-register-page');
227
+ }
228
+ }
229
+ });
230
+ }
231
+ store.dispatch({
232
+ type: ADD_SETTING,
233
+ setting: {
234
+ seq: 10,
235
+ template: html ` <theme-mode-setting-let></theme-mode-setting-let> `
236
+ }
237
+ });
238
+ store.dispatch({
239
+ type: ADD_SETTING,
240
+ setting: {
241
+ seq: 20,
242
+ template: html ` <notification-setting-let></notification-setting-let> `
243
+ }
244
+ });
245
+ }
246
+ //# 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;AAE/B,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;AAEhD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACjI,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAA;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAA;AAEtE,OAAO,CAAC,GAAG,CACT;;;;;;CAMD,EACC,kCAAkC,CACnC,C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gBACpC,IAAI,EAAE,IAAI,CAAA,oEAAoE;gBAC9E,MAAM,EAAE,GAAG,EAAE;oBACX,QAAQ,CAAC,sBAAsB,CAAC,CAAA;gBAClC,CAAC;aACF;SACF,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,MAAM,YAAY,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,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: 'dcsp-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('dcsp-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;\">CSP</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 /* 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\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 (await hasPrivilege({ privilege: 'mutation', category: 'scenario', domainOwnerGranted: true })) {\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 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>&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` <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":"home.js","sourceRoot":"","sources":["../../../client/entries/public/home.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAG1C,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IA+DtC,MAAM;QACJ,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,eAAe,CAAA;QAEjD,OAAO,IAAI,CAAA;;kBAEG,KAAK;UACb,WAAW;;;;;;+BAMU,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,cAAc,CAAC;KACtE,CAAA;IACH,CAAC;IAED,IAAI,eAAe;QACjB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC3B,IAAI,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,8BAA8B,CAAoB,CAAA;YACxF,IAAI,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,+BAA+B,CAAoB,CAAA;YAC1F,IAAI,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,sCAAsC,CAAoB,CAAA;YAEvG,IAAI,CAAC,gBAAgB,GAAG;gBACtB,IAAI,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI;gBACpB,KAAK,EAAE,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,KAAI,gBAAgB;gBAC7C,WAAW,EAAE,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,OAAO,KAAI,sBAAsB;aAChE,CAAA;QACH,CAAC;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAA;IAC9B,CAAC;;AA5FM,eAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,5 @@
1
+ export declare const ICONS_PROGRESS: string[];
2
+ export declare const ICONS_COMPLETED: string[];
3
+ export declare const ICONS_STATUS: string[];
4
+ export declare const ICONS_OPERATING: string[];
5
+ export declare const ICONS_SETTING: string[];
@@ -0,0 +1,84 @@
1
+ const ICON_PROGRESS = `
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_COMPLETED = `
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_OPERATING = `
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_PROGRESS = icons(ICON_PROGRESS);
80
+ export const ICONS_COMPLETED = icons(ICON_COMPLETED);
81
+ export const ICONS_STATUS = icons(ICON_STATUS);
82
+ export const ICONS_OPERATING = icons(ICON_OPERATING);
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,aAAa,GAAG;;;;;;;;;;;;;;CAcrB,CAAA;AAED,MAAM,cAAc,GAAG;;;;;;;;;;;;;;CActB,CAAA;AAED,MAAM,WAAW,GAAG;;;;;;;;;;;;;;CAcnB,CAAA;AAED,MAAM,cAAc,GAAG;;;;;;;;;;;;;;CActB,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,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,CAAA;AAClD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,CAAA;AACpD,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAA;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,CAAA;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,YAAY,CAAC,CAAA","sourcesContent":["const ICON_PROGRESS = `\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_COMPLETED = `\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_OPERATING = `\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_PROGRESS = icons(ICON_PROGRESS)\nexport const ICONS_COMPLETED = icons(ICON_COMPLETED)\nexport const ICONS_STATUS = icons(ICON_STATUS)\nexport const ICONS_OPERATING = icons(ICON_OPERATING)\nexport const ICONS_SETTING = icons(ICON_SETTING)\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 @@
1
+ export declare function getMenuTemplate(): Promise<never[]>;
@@ -0,0 +1,4 @@
1
+ export async function getMenuTemplate() {
2
+ return [].filter(Boolean);
3
+ }
4
+ //# sourceMappingURL=menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.js","sourceRoot":"","sources":["../client/menu.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,OAAO,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;AAC3B,CAAC","sourcesContent":["export async function getMenuTemplate() {\n return [].filter(Boolean)\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import '@material/web/icon/icon.js';
2
+ import '@things-factory/component-ui';
3
+ import '@things-factory/auth-ui/dist-client/components/ownership-transfer-popup';
4
+ import '@things-factory/auth-ui/dist-client/components/user-role-editor';
5
+ import '@things-factory/auth-ui/dist-client/components/create-user';