@things-factory/operato-ecs 7.0.1 → 7.0.3

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.
Files changed (33) hide show
  1. package/assets/javascript/wellstek-gantt.js +19758 -0
  2. package/dist-client/bootstrap.d.ts +6 -0
  3. package/dist-client/bootstrap.js +255 -0
  4. package/dist-client/bootstrap.js.map +1 -0
  5. package/dist-client/index.js +2 -0
  6. package/dist-client/index.js.map +1 -0
  7. package/dist-client/pages/api/api-sandbox.d.ts +1 -0
  8. package/dist-client/pages/api/api-sandbox.js +42 -0
  9. package/dist-client/pages/api/api-sandbox.js.map +1 -0
  10. package/dist-client/pages/resource-gantt/data.d.ts +2477 -0
  11. package/dist-client/pages/resource-gantt/data.js +207030 -0
  12. package/dist-client/pages/resource-gantt/data.js.map +1 -0
  13. package/dist-client/pages/resource-gantt/resource-gantt.d.ts +29 -0
  14. package/dist-client/pages/resource-gantt/resource-gantt.js +192 -0
  15. package/dist-client/pages/resource-gantt/resource-gantt.js.map +1 -0
  16. package/dist-client/route.d.ts +1 -0
  17. package/dist-client/route.js +13 -0
  18. package/dist-client/route.js.map +1 -0
  19. package/dist-client/tsconfig.tsbuildinfo +1 -0
  20. package/package.json +40 -36
  21. package/schema.graphql +1 -1
  22. package/things-factory.config.js +5 -10
  23. package/translations/en.json +4 -1
  24. package/translations/ja.json +4 -1
  25. package/translations/ko.json +4 -1
  26. package/translations/ms.json +4 -1
  27. package/translations/zh.json +4 -1
  28. package/client/bootstrap.js +0 -286
  29. package/client/pages/api/api-sandbox.js +0 -45
  30. package/client/route.js +0 -10
  31. /package/{client/index.js → dist-client/index.d.ts} +0 -0
  32. /package/{client → dist-client}/themes/dark.css +0 -0
  33. /package/{client → dist-client}/themes/light.css +0 -0
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@things-factory/operato-ecs",
3
- "version": "7.0.1",
3
+ "version": "7.0.3",
4
4
  "main": "dist-server/index.js",
5
- "browser": "client/index.js",
5
+ "browser": "dist-client/index.js",
6
6
  "things-factory": true,
7
7
  "author": "heartyoh <heartyoh@hatiolab.com>",
8
8
  "description": "Application for equipment control system",
@@ -18,24 +18,28 @@
18
18
  },
19
19
  "scripts": {
20
20
  "serve": "things-factory operato-ecs",
21
- "serve:dev": "npm run build:server && things-factory-dev operato-ecs",
22
- "build": "npm run build:server",
21
+ "serve:dev": "npm run build:server && concurrently -k -r \"npm run build:client:watch\" \"things-factory-dev operato-ecs\"",
22
+ "copy:files": "copyfiles -e \"./client/**/*.{ts,js,json}\" -u 1 \"./client/**/*\" dist-client",
23
+ "build": "npm run build:server && npm run build:client",
24
+ "build:client": "npm run clean:client && npm run copy:files && tsc --p ./client/tsconfig.json",
25
+ "build:client:watch": "npm run copy:files && tsc --p ./client/tsconfig.json --watch --preserveWatchOutput",
23
26
  "build:server": "npm run clean:server && tsc --p ./server/tsconfig.json",
24
27
  "build:app": "npm run clean:app && webpack --config ../builder/webpack.config.js",
25
28
  "clean:server": "rm -rf dist-server",
29
+ "clean:client": "rm -rf dist-client",
26
30
  "clean:app": "rm -rf dist-app",
27
- "clean": "npm run clean:server",
28
- "migration": "things-factory-migration",
29
- "migration:privileges": "things-factory-migration-privileges",
31
+ "clean": "npm run clean:server && npm run clean:client",
32
+ "migration": "npm run build:server && things-factory-migration",
33
+ "migration:privileges": "npm run build:server && things-factory-migration-privileges",
30
34
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations",
31
35
  "migration:generate": "node ../../node_modules/typeorm/cli.js migration:generate",
32
36
  "migration:run": "node ../../node_modules/typeorm/cli.js migration:run",
33
37
  "migration:revert": "node ../../node_modules/typeorm/cli.js migration:revert",
34
38
  "stop:dev": "kill $(lsof -t -i:3000,3001)",
35
39
  "stop": "things-factory-stop operato-ecs",
36
- "docker": "npm run build:app && things-factory-dockerize hatiolab/operato-ecs:latest hatiolab/operato-ecs:$npm_package_version linux/amd64",
37
- "docker:push": "docker image push hatiolab/operato-ecs:latest && docker image push hatiolab/operato-ecs:$npm_package_version",
38
- "docker:run": "docker run --platform linux/amd64 -p 4000:3000 hatiolab/operato-ecs:latest"
40
+ "docker": "npm run build:app && things-factory-dockerize hatiolab/operato-ecs:latest hatiolab/operato-ecs:$npm_package_version linux/amd64",
41
+ "docker:run": "docker run --platform linux/amd64 -p 4000:3000 hatiolab/operato-ecs:latest",
42
+ "docker:push": "docker image push hatiolab/operato-ecs:latest && docker image push hatiolab/operato-ecs:$npm_package_version"
39
43
  },
40
44
  "dependencies": {
41
45
  "@operato/data-grist": "^7.0.0",
@@ -59,34 +63,34 @@
59
63
  "@operato/scene-switch": "^7.0.0",
60
64
  "@operato/scene-table": "^7.0.0",
61
65
  "@operato/scene-timer": "^7.0.0",
62
- "@things-factory/api": "^7.0.0",
63
- "@things-factory/apptool-ui": "^7.0.0",
64
- "@things-factory/auth-ui": "^7.0.0",
65
- "@things-factory/board-service": "^7.0.1",
66
- "@things-factory/board-ui": "^7.0.0",
67
- "@things-factory/context-ui": "^7.0.0",
68
- "@things-factory/dashboard": "^7.0.1",
69
- "@things-factory/export-ui": "^7.0.0",
70
- "@things-factory/help": "^7.0.0",
71
- "@things-factory/i18n-base": "^7.0.0",
72
- "@things-factory/integration-influxdb": "^7.0.1",
73
- "@things-factory/integration-melsec": "^7.0.1",
74
- "@things-factory/integration-modbus": "^7.0.1",
75
- "@things-factory/integration-opc": "^7.0.1",
76
- "@things-factory/integration-ui": "^7.0.1",
77
- "@things-factory/lite-menu": "^7.0.1",
78
- "@things-factory/more-ui": "^7.0.0",
79
- "@things-factory/notification": "^7.0.1",
80
- "@things-factory/oauth2-client": "^7.0.0",
81
- "@things-factory/print-ui": "^7.0.0",
82
- "@things-factory/resource-ui": "^7.0.0",
83
- "@things-factory/setting-base": "^7.0.0",
84
- "@things-factory/setting-ui": "^7.0.0",
85
- "@things-factory/shell": "^7.0.0",
86
- "@things-factory/system": "^7.0.0"
66
+ "@things-factory/api": "^7.0.2",
67
+ "@things-factory/apptool-ui": "^7.0.2",
68
+ "@things-factory/auth-ui": "^7.0.2",
69
+ "@things-factory/board-service": "^7.0.2",
70
+ "@things-factory/board-ui": "^7.0.2",
71
+ "@things-factory/context-ui": "^7.0.2",
72
+ "@things-factory/dashboard": "^7.0.2",
73
+ "@things-factory/export-ui": "^7.0.2",
74
+ "@things-factory/help": "^7.0.2",
75
+ "@things-factory/i18n-base": "^7.0.2",
76
+ "@things-factory/integration-influxdb": "^7.0.2",
77
+ "@things-factory/integration-melsec": "^7.0.2",
78
+ "@things-factory/integration-modbus": "^7.0.2",
79
+ "@things-factory/integration-opc": "^7.0.2",
80
+ "@things-factory/integration-ui": "^7.0.2",
81
+ "@things-factory/lite-menu": "^7.0.2",
82
+ "@things-factory/more-ui": "^7.0.2",
83
+ "@things-factory/notification": "^7.0.2",
84
+ "@things-factory/oauth2-client": "^7.0.2",
85
+ "@things-factory/print-ui": "^7.0.2",
86
+ "@things-factory/resource-ui": "^7.0.2",
87
+ "@things-factory/setting-base": "^7.0.2",
88
+ "@things-factory/setting-ui": "^7.0.2",
89
+ "@things-factory/shell": "^7.0.2",
90
+ "@things-factory/system": "^7.0.2"
87
91
  },
88
92
  "devDependencies": {
89
93
  "@things-factory/builder": "^7.0.0"
90
94
  },
91
- "gitHead": "02f50498ba92589813db2d13907894d2b9220d8c"
95
+ "gitHead": "b641bc1712d12f4881a96b58f97888d9b36651b8"
92
96
  }
package/schema.graphql CHANGED
@@ -1711,7 +1711,7 @@ type Mutation {
1711
1711
  """To delete multiple ApprovalLines"""
1712
1712
  deleteApprovalLines(ids: [String!]!): Boolean!
1713
1713
  deleteAttachment(id: String!): Boolean!
1714
- deleteAttachmentsByRef(refBys: [String!]!): Boolean!
1714
+ deleteAttachmentsByRef(refBys: [String!]!, refType: String): Boolean!
1715
1715
 
1716
1716
  """To delete AttributeSet"""
1717
1717
  deleteAttributeSet(id: String!): Boolean!
@@ -1,17 +1,12 @@
1
- import bootstrap from './client/bootstrap'
2
- import route from './client/route'
1
+ import bootstrap from './dist-client/bootstrap'
2
+ import route from './dist-client/route'
3
3
 
4
4
  export default {
5
5
  bootstrap,
6
6
  routes: [
7
- {
8
- tagname: 'api-sandbox',
9
- page: 'api-sandbox'
10
- },
11
- {
12
- tagname: 'printable-board-viewer-page',
13
- page: 'printable-board-viewer'
14
- }
7
+ { tagname: 'api-sandbox', page: 'api-sandbox' },
8
+ { tagname: 'printable-board-viewer-page', page: 'printable-board-viewer' },
9
+ { tagname: 'resource-gantt', page: 'resource-gantt' }
15
10
  ],
16
11
  route
17
12
  }
@@ -1 +1,4 @@
1
- {}
1
+ {
2
+ "button.back": "back",
3
+ "title.resource-gantt": "resource gantt chart"
4
+ }
@@ -1 +1,4 @@
1
- {}
1
+ {
2
+ "button.back": "戻る",
3
+ "title.resource-gantt": "リソース ガント チャート"
4
+ }
@@ -1 +1,4 @@
1
- {}
1
+ {
2
+ "button.back": "뒤로",
3
+ "title.resource-gantt": "간트 차트"
4
+ }
@@ -1 +1,4 @@
1
- {}
1
+ {
2
+ "button.back": "kembali",
3
+ "title.resource-gantt": "carta gantt sumber"
4
+ }
@@ -1 +1,4 @@
1
- {}
1
+ {
2
+ "button.back": "返回",
3
+ "title.resource-gantt": "资源甘特图"
4
+ }
@@ -1,286 +0,0 @@
1
- import '@things-factory/notification'
2
- import '@things-factory/board-ui'
3
- import '@operato/i18n/ox-i18n.js'
4
- import '@things-factory/auth-ui/dist-client' /* for domain-switch */
5
- import '@things-factory/setting-ui/dist-client' /* secure-iplist-setting-let, theme-mode-setting-let */
6
-
7
- import { html } from 'lit-html'
8
-
9
- import { navigate, store } from '@operato/shell'
10
- import { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'
11
- import { registerDefaultGroups } from '@operato/board/register-default-groups.js'
12
- import { isMobileDevice } from '@operato/utils'
13
-
14
- import { hasPrivilege } from '@things-factory/auth-base/dist-client'
15
- import { setAuthManagementMenus } from '@things-factory/auth-ui/dist-client'
16
- import { APPEND_APP_TOOL } from '@things-factory/apptool-base/client'
17
- import { setupAppToolPart } from '@things-factory/apptool-ui/dist-client'
18
- import { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu/dist-client'
19
- import { setupContextUIPart } from '@things-factory/context-ui/dist-client'
20
- import { ADD_MORENDA } from '@things-factory/more-base/client'
21
- import { ADD_SETTING } from '@things-factory/setting-base/dist-client'
22
-
23
- console.log(
24
- `%c
25
- ▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄ ▄▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄ ▄▄▄
26
- ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▀
27
- ▓ ▓ ▓▀▀ ▓▀▀ ▓▀▀▄ ▓▀▀▓ ▓ ▓ ▓ ▀▀ ▓▀▀▀ ▓ ▀▀▄▄
28
- ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▄ ▓
29
- ▀▀ ▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀ ▀▀ ▀▀▀▀▀ ▀▀▀ ▀▀▀
30
- `,
31
- 'background: #222; color: #bada55'
32
- )
33
-
34
- export default async function bootstrap() {
35
- /*
36
- set board-modeller group and default templates - should be called befor BoardModeller open
37
- */
38
- registerDefaultGroups()
39
-
40
- await setupAppToolPart({
41
- toolbar: true,
42
- busybar: true,
43
- mdibar: false
44
- })
45
-
46
- await setupContextUIPart({
47
- titlebar: 'header',
48
- contextToolbar: 'page-footer'
49
- })
50
-
51
- await setupMenuPart({
52
- hovering: isMobileDevice(),
53
- position: VIEWPART_POSITION.NAVBAR,
54
- portraitSlotTemplate: html` <domain-switch attrname="description" slot="head"></domain-switch> `
55
- })
56
- updateMenuTemplate([])
57
-
58
- /* add addon-menu management page morenda */
59
- if (await hasPrivilege({ privilege: 'mutation', category: 'menu' })) {
60
- store.dispatch({
61
- type: ADD_MORENDA,
62
- morenda: {
63
- icon: html` <md-icon>view_list</md-icon> `,
64
- name: html` <ox-i18n msgid="text.addon-menu management"></ox-i18n> `,
65
- action: () => {
66
- navigate('addon-menu-setting')
67
- }
68
- }
69
- })
70
- }
71
-
72
- /* add setting morenda */
73
- store.dispatch({
74
- type: ADD_MORENDA,
75
- morenda: {
76
- icon: html` <md-icon>settings</md-icon> `,
77
- name: html` <ox-i18n msgid="label.setting"></ox-i18n> `,
78
- action: () => {
79
- navigate('setting')
80
- }
81
- }
82
- })
83
-
84
- /* set auth management menus into more-panel */
85
- setAuthManagementMenus()
86
-
87
- if (await hasPrivilege({ privilege: 'mutation', category: 'user' })) {
88
- store.dispatch({
89
- type: ADD_MORENDA,
90
- morenda: {
91
- icon: html` <md-icon>vpn_key</md-icon> `,
92
- name: html` <ox-i18n msgid="text.oauth2-clients"></ox-i18n> `,
93
- action: () => {
94
- navigate('oauth2-clients')
95
- }
96
- }
97
- })
98
- }
99
-
100
- if (await hasPrivilege({ privilege: 'mutation', category: 'board' })) {
101
- store.dispatch({
102
- type: ADD_MORENDA,
103
- morenda: {
104
- icon: html` <md-icon>font_download</md-icon> `,
105
- name: html` <ox-i18n msgid="menu.fonts"></ox-i18n> `,
106
- action: () => {
107
- navigate('font-list')
108
- }
109
- }
110
- })
111
-
112
- store.dispatch({
113
- type: ADD_MORENDA,
114
- morenda: {
115
- icon: html` <md-icon>attachment</md-icon> `,
116
- name: html` <ox-i18n msgid="menu.attachments"></ox-i18n> `,
117
- action: () => {
118
- navigate('attachment-list')
119
- }
120
- }
121
- })
122
-
123
- store.dispatch({
124
- type: ADD_MORENDA,
125
- morenda: {
126
- icon: html` <md-icon>dvr</md-icon> `,
127
- name: html` <ox-i18n msgid="menu.board-list"></ox-i18n> `,
128
- action: () => {
129
- navigate('board-list')
130
- }
131
- }
132
- })
133
-
134
- store.dispatch({
135
- type: ADD_MORENDA,
136
- morenda: {
137
- icon: html` <md-icon>airplay</md-icon> `,
138
- name: html` <ox-i18n msgid="menu.play-groups"></ox-i18n> `,
139
- action: () => {
140
- navigate('play-list')
141
- }
142
- }
143
- })
144
- }
145
-
146
- if (await hasPrivilege({ privilege: 'mutation', category: 'scenario' })) {
147
- store.dispatch({
148
- type: ADD_MORENDA,
149
- morenda: {
150
- icon: html` <md-icon>device_hub</md-icon> `,
151
- name: html` <ox-i18n msgid="text.connection"></ox-i18n> `,
152
- action: () => {
153
- navigate('connection')
154
- }
155
- }
156
- })
157
-
158
- store.dispatch({
159
- type: ADD_MORENDA,
160
- morenda: {
161
- icon: html` <md-icon>format_list_numbered</md-icon> `,
162
- name: html` <ox-i18n msgid="text.scenario"></ox-i18n> `,
163
- action: () => {
164
- navigate('scenario')
165
- }
166
- }
167
- })
168
-
169
- store.dispatch({
170
- type: ADD_MORENDA,
171
- morenda: {
172
- icon: html` <md-icon>hub</md-icon> `,
173
- name: html` <ox-i18n msgid="text.integration analysis"></ox-i18n>&nbsp;(beta)`,
174
- action: () => {
175
- navigate('integration-analysis')
176
- }
177
- }
178
- })
179
- }
180
-
181
- if (await hasPrivilege({ privilege: 'mutation', category: 'state-register' })) {
182
- store.dispatch({
183
- type: ADD_MORENDA,
184
- morenda: {
185
- icon: html` <md-icon>app_registration</md-icon> `,
186
- name: html` <ox-i18n msgid="title.state-register"></ox-i18n> `,
187
- action: () => {
188
- navigate('state-register-page')
189
- }
190
- }
191
- })
192
- }
193
-
194
- store.dispatch({
195
- type: ADD_MORENDA,
196
- morenda: {
197
- icon: html` <md-icon>extension</md-icon> `,
198
- name: html` <ox-i18n msgid="text.api-sandbox"></ox-i18n> `,
199
- action: () => {
200
- navigate('api-swagger')
201
- }
202
- }
203
- })
204
-
205
- // store.dispatch({
206
- // type: ADD_MORENDA,
207
- // morenda: {
208
- // icon: html` <md-icon>help</md-icon> `,
209
- // name: html` <ox-i18n msgid="text.help"></ox-i18n> `,
210
- // action: () => {
211
- // navigate('help')
212
- // }
213
- // }
214
- // })
215
-
216
- store.dispatch({
217
- type: ADD_SETTING,
218
- setting: {
219
- seq: 10,
220
- template: html` <theme-mode-setting-let></theme-mode-setting-let> `
221
- }
222
- })
223
-
224
- store.dispatch({
225
- type: ADD_SETTING,
226
- setting: {
227
- seq: 21,
228
- template: html` <lite-menu-setting-let></lite-menu-setting-let> `
229
- }
230
- })
231
-
232
- /* setting app-tools */
233
- store.dispatch({
234
- type: APPEND_APP_TOOL,
235
- tool: {
236
- name: 'notification-badge',
237
- template: html`
238
- <notification-badge
239
- @click=${e => {
240
- toggleOverlay('notification', {
241
- backdrop: true
242
- })
243
- }}
244
- >
245
- </notification-badge>
246
- `,
247
- position: TOOL_POSITION.REAR
248
- }
249
- })
250
-
251
- appendViewpart({
252
- name: 'notification',
253
- viewpart: {
254
- show: false,
255
- hovering: 'edge',
256
- template: html` <notification-list style="min-width: 300px;"></notification-list> `
257
- },
258
- position: VIEWPART_POSITION.ASIDEBAR
259
- })
260
-
261
- store.dispatch({
262
- type: ADD_SETTING,
263
- setting: {
264
- seq: 20,
265
- template: html` <notification-setting-let></notification-setting-let> `
266
- }
267
- })
268
-
269
- store.dispatch({
270
- type: ADD_SETTING,
271
- setting: {
272
- seq: 21,
273
- template: html` <board-view-setting-let></board-view-setting-let> `
274
- }
275
- })
276
-
277
- if (await hasPrivilege({ privilege: 'mutation', category: 'security' })) {
278
- store.dispatch({
279
- type: ADD_SETTING,
280
- setting: {
281
- seq: 31,
282
- template: html` <secure-iplist-setting-let></secure-iplist-setting-let> `
283
- }
284
- })
285
- }
286
- }
@@ -1,45 +0,0 @@
1
- import { APIPageTemplate } from '@things-factory/api'
2
-
3
- const APIS = [
4
- {
5
- name: 'scenario',
6
- path: 'scenario/:id',
7
- method: 'get',
8
- parameters: [],
9
- description: 'get scenario information'
10
- },
11
- {
12
- name: 'scenarios',
13
- path: 'scenario',
14
- method: 'get',
15
- parameters: [
16
- {
17
- name: 'page'
18
- },
19
- {
20
- name: 'limit'
21
- }
22
- ],
23
- description: 'get scenario information'
24
- }
25
- ]
26
-
27
- class APISandbox extends APIPageTemplate {
28
- constructor() {
29
- super()
30
- }
31
-
32
- get APIS() {
33
- return APIS
34
- }
35
-
36
- get context() {
37
- return {
38
- title: 'API Sandbox',
39
- apiCategory: 'Integration',
40
- description: 'Scenario control, connection control, ...'
41
- }
42
- }
43
- }
44
-
45
- window.customElements.define('api-sandbox', APISandbox)
package/client/route.js DELETED
@@ -1,10 +0,0 @@
1
- export default function route(page) {
2
- switch (page) {
3
- case '':
4
- return '/dashboard'
5
-
6
- case 'api-sandbox':
7
- import('./pages/api/api-sandbox')
8
- return page
9
- }
10
- }
File without changes
File without changes
File without changes