@things-factory/shell 7.0.0-alpha.8 → 7.0.0
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/_index.html +8 -3
- package/client/entries/public/home.js +5 -6
- package/client/index.js +1 -6
- package/client/route.js +11 -0
- package/client/serviceworker/sw-src.js +2 -2
- package/client/store.js +3 -3
- package/client/themes/app-theme.css +53 -60
- package/client/themes/calendar-theme.css +59 -0
- package/client/themes/dark.css +51 -0
- package/client/themes/grist-theme.css +175 -0
- package/client/themes/layout-theme.css +15 -13
- package/client/themes/light.css +51 -0
- package/client/themes/material-theme.css +23 -0
- package/client/themes/md-typescale-styles.css +100 -0
- package/client/themes/oops-theme.css +6 -6
- package/client/themes/report-theme.css +47 -0
- package/client/themes/spacing.css +23 -0
- package/client/themes/state-color.css +6 -0
- package/config/config.development.js +2 -1
- package/config/license.json +5 -5
- package/dist-server/graphql-local-client.js +3 -3
- package/dist-server/graphql-local-client.js.map +1 -1
- package/dist-server/index.d.ts +1 -0
- package/dist-server/index.js +1 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/initializers/database.js +6 -6
- package/dist-server/initializers/database.js.map +1 -1
- package/dist-server/middlewares/domain-middleware.js +1 -2
- package/dist-server/middlewares/domain-middleware.js.map +1 -1
- package/dist-server/middlewares/index.js +1 -2
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/pubsub.js +1 -2
- package/dist-server/pubsub.js.map +1 -1
- package/dist-server/routers/global-router.js.map +1 -1
- package/dist-server/schema.js +1 -2
- package/dist-server/schema.js.map +1 -1
- package/dist-server/server-dev.js +3 -7
- package/dist-server/server-dev.js.map +1 -1
- package/dist-server/server.js +2 -1
- package/dist-server/server.js.map +1 -1
- package/dist-server/service/attribute-set/attribute-set-item-type.js +5 -5
- package/dist-server/service/attribute-set/attribute-set-item-type.js.map +1 -1
- package/dist-server/service/attribute-set/attribute-set-mutation.js +2 -2
- package/dist-server/service/attribute-set/attribute-set-mutation.js.map +1 -1
- package/dist-server/service/attribute-set/attribute-set-query.js +3 -3
- package/dist-server/service/attribute-set/attribute-set-query.js.map +1 -1
- package/dist-server/service/attribute-set/attribute-set-type.js +6 -6
- package/dist-server/service/attribute-set/attribute-set-type.js.map +1 -1
- package/dist-server/service/attribute-set/attribute-set.js +2 -2
- package/dist-server/service/attribute-set/attribute-set.js.map +1 -1
- package/dist-server/service/common-types/list-param.js +9 -9
- package/dist-server/service/common-types/list-param.js.map +1 -1
- package/dist-server/service/common-types/log.js +2 -2
- package/dist-server/service/common-types/log.js.map +1 -1
- package/dist-server/service/common-types/object-ref.js +2 -2
- package/dist-server/service/common-types/object-ref.js.map +1 -1
- package/dist-server/service/common-types/scalar-any.js.map +1 -1
- package/dist-server/service/common-types/scalar-date.js.map +1 -1
- package/dist-server/service/directive-transaction/transaction.js.map +1 -1
- package/dist-server/service/domain/{domain-Mutation.js → domain-mutation.js} +3 -3
- package/dist-server/service/domain/domain-mutation.js.map +1 -0
- package/dist-server/service/domain/domain-query.js +3 -3
- package/dist-server/service/domain/domain-query.js.map +1 -1
- package/dist-server/service/domain/domain-types.js +6 -6
- package/dist-server/service/domain/domain-types.js.map +1 -1
- package/dist-server/service/domain/domain.js +6 -7
- package/dist-server/service/domain/domain.js.map +1 -1
- package/dist-server/service/domain/index.d.ts +1 -1
- package/dist-server/service/domain/index.js +2 -2
- package/dist-server/service/domain/index.js.map +1 -1
- package/dist-server/service/index.d.ts +1 -1
- package/dist-server/service/subscription-data/data-resolver.js +2 -2
- package/dist-server/service/subscription-data/data-resolver.js.map +1 -1
- package/dist-server/service/subscription-data/data-types.js +2 -2
- package/dist-server/service/subscription-data/data-types.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/dist-server/typeorm/encrypt-transform.js +1 -1
- package/dist-server/typeorm/encrypt-transform.js.map +1 -1
- package/dist-server/typeorm/get-data-encryption-key.js.map +1 -1
- package/dist-server/typeorm/json5-transform.js.map +1 -1
- package/dist-server/typeorm/round-transform.d.ts +5 -0
- package/dist-server/typeorm/round-transform.js +21 -0
- package/dist-server/typeorm/round-transform.js.map +1 -0
- package/dist-server/utils/condition-builder.js.map +1 -1
- package/dist-server/utils/get-domain.d.ts +0 -1
- package/dist-server/utils/get-domain.js +7 -8
- package/dist-server/utils/get-domain.js.map +1 -1
- package/dist-server/utils/get-query-builder-from-list-params.js +1 -2
- package/dist-server/utils/get-query-builder-from-list-params.js.map +1 -1
- package/dist-server/utils/get-times-for-period.js +2 -3
- package/dist-server/utils/get-times-for-period.js.map +1 -1
- package/dist-server/utils/list-param-adjuster.js +1 -2
- package/dist-server/utils/list-param-adjuster.js.map +1 -1
- package/dist-server/utils/list-params-converter.js +1 -2
- package/dist-server/utils/list-params-converter.js.map +1 -1
- package/dist-server/utils/list-query-builder.js.map +1 -1
- package/dist-server/utils/publish-progress.js +1 -2
- package/dist-server/utils/publish-progress.js.map +1 -1
- package/helps/config/fileUpload.ja.md +24 -0
- package/helps/config/fileUpload.ko.md +22 -0
- package/helps/config/fileUpload.md +24 -0
- package/helps/config/fileUpload.ms.md +24 -0
- package/helps/config/fileUpload.zh.md +21 -0
- package/package.json +27 -27
- package/server/graphql-local-client.ts +4 -4
- package/server/index.ts +2 -0
- package/server/pubsub.ts +1 -1
- package/server/server-dev.ts +10 -11
- package/server/server.ts +9 -2
- package/server/service/attribute-set/attribute-set-query.ts +1 -1
- package/server/service/domain/domain-query.ts +1 -1
- package/server/service/domain/index.ts +1 -1
- package/server/typeorm/round-transform.ts +20 -0
- package/translations/en.json +2 -1
- package/translations/ja.json +2 -1
- package/translations/ko.json +2 -1
- package/translations/ms.json +2 -1
- package/translations/zh.json +2 -1
- package/views/public/home.html +6 -3
- package/views/template.html +2 -2
- package/client/elements/custom-alert.js +0 -120
- package/client/elements/index.js +0 -4
- package/client/elements/oops-note.js +0 -49
- package/client/elements/oops-progress.js +0 -81
- package/client/elements/oops-spinner.js +0 -31
- package/dist-server/service/domain/domain-Mutation.js.map +0 -1
- package/helps/components/oops-progress.md +0 -73
- /package/dist-server/service/domain/{domain-Mutation.d.ts → domain-mutation.d.ts} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"publish-progress.js","sourceRoot":"","sources":["../../server/utils/publish-progress.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"publish-progress.js","sourceRoot":"","sources":["../../server/utils/publish-progress.ts"],"names":[],"mappings":";;AAWA,0CAWC;AAtBD,sCAAkC;AAElC;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE;IAChE,eAAM,CAAC,OAAO,CAAC,MAAM,EAAE;QACrB,IAAI,EAAE;YACJ,MAAM;YACN,GAAG;YACH,IAAI,EAAE;gBACJ,QAAQ;gBACR,OAAO;aACR;SACF;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { pubsub } from '../pubsub'\n\n/**\n * Publishes a progress update message to the 'data' channel in the Pub/Sub system.\n *\n * @param {Object} param - The progress update parameters.\n * @param {string} param.domain - The domain or category of the progress update.\n * @param {string} param.tag - The tag or identifier for the progress update.\n * @param {number} param.progress - The progress value indicating the completion percentage.\n * @param {string} param.message - A message or description of the progress update.\n */\nexport function publishProgress({ domain, tag, progress, message }) {\n pubsub.publish('data', {\n data: {\n domain,\n tag,\n data: {\n progress,\n message\n }\n }\n })\n}\n"]}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
### Japanese
|
3
|
+
```markdown
|
4
|
+
# ファイルアップロード
|
5
|
+
|
6
|
+
ファイルアップロードに関する設定
|
7
|
+
|
8
|
+
* maxFileSize: ファイルアップロードが可能なファイルの最大サイズ
|
9
|
+
* maxFiles: 同時にアップロードできるファイルの最大数
|
10
|
+
* mimeTypes: 添付ファイルとしてアップロードできるファイルの種類(mimetype)
|
11
|
+
- ['image/png', 'image/jpeg', 'application/pdf']
|
12
|
+
- ['image/*', 'application/pdf']
|
13
|
+
- ['*/*'] または [] /* すべての種類のファイル */
|
14
|
+
|
15
|
+
## デフォルト
|
16
|
+
|
17
|
+
```json
|
18
|
+
module.exports = {
|
19
|
+
fileUpload: {
|
20
|
+
maxFileSize: '100mb',
|
21
|
+
maxFiles: 10,
|
22
|
+
mimeTypes: []
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# fileUpload
|
2
|
+
|
3
|
+
파일업로드와 관련한 설정
|
4
|
+
|
5
|
+
* maxFileSize: 파일업로드가 가능한 파일의 최대 크기
|
6
|
+
* maxFiles: 동시에 업로드할 수 있는 파일의 최대 개수
|
7
|
+
* mimeTypes: 첨부파일로 업로드 할 수 있는 파일의 종류(mimetype)
|
8
|
+
- ['image/png', 'image/jpeg', 'application/pdf']
|
9
|
+
- ['image/*', 'application/pdf']
|
10
|
+
- ['*/*'] 또는 [] /* 모든 종류 파일 */
|
11
|
+
|
12
|
+
## default
|
13
|
+
|
14
|
+
```
|
15
|
+
module.exports = {
|
16
|
+
fileUpload: {
|
17
|
+
maxFileSize: '100mb',
|
18
|
+
maxFiles: 10,
|
19
|
+
mimeTypes: []
|
20
|
+
}
|
21
|
+
}
|
22
|
+
```
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
### English
|
3
|
+
```markdown
|
4
|
+
# fileUpload
|
5
|
+
|
6
|
+
settings related to file upload
|
7
|
+
|
8
|
+
* maxFileSize: maximum size of the file that can be uploaded
|
9
|
+
* maxFiles: maximum number of files that can be uploaded at the same time
|
10
|
+
* mimeTypes: types of files that can be uploaded as attachments (mimetype)
|
11
|
+
- ['image/png', 'image/jpeg', 'application/pdf']
|
12
|
+
- ['image/*', 'application/pdf']
|
13
|
+
- ['*/*'] or [] /* all types of files */
|
14
|
+
|
15
|
+
## default
|
16
|
+
|
17
|
+
```json
|
18
|
+
module.exports = {
|
19
|
+
fileUpload: {
|
20
|
+
maxFileSize: '100mb',
|
21
|
+
maxFiles: 10,
|
22
|
+
mimeTypes: []
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
### Malay
|
3
|
+
```markdown
|
4
|
+
# muatNaikFail
|
5
|
+
|
6
|
+
tetapan berkaitan muat naik fail
|
7
|
+
|
8
|
+
* maxFileSize: saiz fail maksimum yang boleh dimuat naik
|
9
|
+
* maxFiles: bilangan maksimum fail yang boleh dimuat naik serentak
|
10
|
+
* mimeTypes: jenis fail yang boleh dimuat naik sebagai fail lampiran (mimetype)
|
11
|
+
- ['image/png', 'image/jpeg', 'application/pdf']
|
12
|
+
- ['image/*', 'application/pdf']
|
13
|
+
- ['*/*'] atau [] /* semua jenis fail */
|
14
|
+
|
15
|
+
## lalai
|
16
|
+
|
17
|
+
```json
|
18
|
+
module.exports = {
|
19
|
+
fileUpload: {
|
20
|
+
maxFileSize: '100mb',
|
21
|
+
maxFiles: 10,
|
22
|
+
mimeTypes: []
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# 文件上传
|
2
|
+
|
3
|
+
文件上传相关设置
|
4
|
+
|
5
|
+
* maxFileSize: 文件上传的最大文件大小
|
6
|
+
* maxFiles: 一次可以上传的最大文件数量
|
7
|
+
* mimeTypes: 可以作为附件上传的文件类型(mimetype)
|
8
|
+
- ['image/png', 'image/jpeg', 'application/pdf']
|
9
|
+
- ['image/*', 'application/pdf']
|
10
|
+
- ['*/*'] 或 [] /* 所有类型的文件 */
|
11
|
+
|
12
|
+
## 默认
|
13
|
+
|
14
|
+
```json
|
15
|
+
module.exports = {
|
16
|
+
fileUpload: {
|
17
|
+
maxFileSize: '100mb',
|
18
|
+
maxFiles: 10,
|
19
|
+
mimeTypes: []
|
20
|
+
}
|
21
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/shell",
|
3
|
-
"version": "7.0.0
|
3
|
+
"version": "7.0.0",
|
4
4
|
"description": "Core module for framework",
|
5
5
|
"bin": {
|
6
6
|
"things-factory": "bin/things-factory",
|
@@ -35,36 +35,37 @@
|
|
35
35
|
"@apollo/server": "^4.5.0",
|
36
36
|
"@as-integrations/koa": "^0.3.0",
|
37
37
|
"@fontsource/roboto": "^5.0.3",
|
38
|
-
"@graphql-codegen/cli": "^
|
39
|
-
"@graphql-codegen/typescript": "^
|
40
|
-
"@graphql-codegen/typescript-resolvers": "^
|
41
|
-
"@graphql-tools/merge": "^
|
38
|
+
"@graphql-codegen/cli": "^5.0.2",
|
39
|
+
"@graphql-codegen/typescript": "^4.0.6",
|
40
|
+
"@graphql-codegen/typescript-resolvers": "^4.0.6",
|
41
|
+
"@graphql-tools/merge": "^9.0.3",
|
42
42
|
"@graphql-tools/schema": "^8.5.0",
|
43
|
-
"@graphql-tools/utils": "^
|
44
|
-
"@hatiolab/koa-webpack": "^7.0.
|
43
|
+
"@graphql-tools/utils": "^10.1.2",
|
44
|
+
"@hatiolab/koa-webpack": "^7.0.9",
|
45
45
|
"@hatiolab/things-scene": "^3.2.0",
|
46
|
-
"@koa/cors": "^
|
46
|
+
"@koa/cors": "^5.0.0",
|
47
47
|
"@material-design-icons/font": "^0.14.9",
|
48
48
|
"@material/mwc-button": "^0.27.0",
|
49
|
-
"@material/mwc-fab": "^0.27.0",
|
50
49
|
"@material/mwc-icon": "^0.27.0",
|
51
50
|
"@material/mwc-icon-button": "^0.27.0",
|
52
51
|
"@material/mwc-slider": "^0.27.0",
|
53
52
|
"@material/mwc-textfield": "^0.27.0",
|
54
|
-
"@material/web": "^1.
|
53
|
+
"@material/web": "^1.5.0",
|
55
54
|
"@open-wc/scoped-elements": "^2.1.3",
|
56
|
-
"@operato/board": "^
|
57
|
-
"@operato/graphql": "^
|
58
|
-
"@operato/help": "^
|
59
|
-
"@operato/layout": "^
|
60
|
-
"@operato/shell": "^
|
61
|
-
"@operato/typeorm-history": "^
|
62
|
-
"@operato/utils": "^
|
63
|
-
"@
|
64
|
-
"@things-factory/
|
55
|
+
"@operato/board": "^7.0.0",
|
56
|
+
"@operato/graphql": "^7.0.0",
|
57
|
+
"@operato/help": "^7.0.0",
|
58
|
+
"@operato/layout": "^7.0.0",
|
59
|
+
"@operato/shell": "^7.0.0",
|
60
|
+
"@operato/typeorm-history": "^7.0.0",
|
61
|
+
"@operato/utils": "^7.0.0",
|
62
|
+
"@reduxjs/toolkit": "^2.2.5",
|
63
|
+
"@things-factory/ejs-remote": "^7.0.0",
|
64
|
+
"@things-factory/env": "^7.0.0",
|
65
65
|
"@things-factory/operato-license-checker": "^4.0.4",
|
66
|
-
"@things-factory/styles": "^7.0.0
|
67
|
-
"@things-factory/utils": "^7.0.0
|
66
|
+
"@things-factory/styles": "^7.0.0",
|
67
|
+
"@things-factory/utils": "^7.0.0",
|
68
|
+
"@webcomponents/scoped-custom-element-registry": "^0.0.9",
|
68
69
|
"@webcomponents/webcomponentsjs": "^2.6.0",
|
69
70
|
"args": "^5.0.0",
|
70
71
|
"broadcastchannel-polyfill": "^1.0.1",
|
@@ -97,10 +98,11 @@
|
|
97
98
|
"koa-send": "^5.0.0",
|
98
99
|
"koa-static": "^5.0.0",
|
99
100
|
"koa2-connect-history-api-fallback": "^0.1.2",
|
100
|
-
"lit": "^
|
101
|
+
"lit": "^3.1.2",
|
101
102
|
"loader-utils": "^2.0.0",
|
102
103
|
"lodash": "^4.17.21",
|
103
104
|
"lodash-es": "^4.17.21",
|
105
|
+
"material-symbols": "^0.17.2",
|
104
106
|
"mkdirp": "^1.0.4",
|
105
107
|
"moment-timezone": "^0.5.43",
|
106
108
|
"mqtt": "^4.3.4",
|
@@ -112,16 +114,14 @@
|
|
112
114
|
"pwa-helpers": "^0.9.1",
|
113
115
|
"react": "^18.2.0",
|
114
116
|
"react-dom": "^18.2.0",
|
115
|
-
"redux": "^4.0.0",
|
116
117
|
"redux-thunk": "^2.3.0",
|
117
118
|
"regenerator-runtime": "^0.13.2",
|
118
119
|
"reselect": "^4.0.0",
|
119
120
|
"sass": "^1.50.1",
|
120
121
|
"scrollbooster": "^3.0.2",
|
121
|
-
"
|
122
|
-
"type-graphql": "^2.0.0-beta.6",
|
122
|
+
"type-graphql": "^2.0.0-rc.1",
|
123
123
|
"typeorm": "^0.3.19",
|
124
|
-
"uuid": "^
|
124
|
+
"uuid": "^10.0.0",
|
125
125
|
"web-animations-js": "^2.3.2",
|
126
126
|
"web-push": "^3.5.0",
|
127
127
|
"ws": "^8.8.1"
|
@@ -134,5 +134,5 @@
|
|
134
134
|
"pg": "^8.7.3",
|
135
135
|
"sqlite3": "^5.0.8"
|
136
136
|
},
|
137
|
-
"gitHead": "
|
137
|
+
"gitHead": "00f3917ca132679e3571f3f4fd16f4caf84f488e"
|
138
138
|
}
|
@@ -19,10 +19,6 @@ const defaultOptions: any = {
|
|
19
19
|
}
|
20
20
|
}
|
21
21
|
|
22
|
-
const cache = new InMemoryCache({
|
23
|
-
addTypename: false
|
24
|
-
})
|
25
|
-
|
26
22
|
/**
|
27
23
|
* GraphqlLocalClient is a utility class for initializing an Apollo Client for a local GraphQL schema.
|
28
24
|
* It provides a static `init` method for setting up the client with a schema and an app context.
|
@@ -42,6 +38,10 @@ export class GraphqlLocalClient {
|
|
42
38
|
* @param {object} app - The application context to be passed in as part of the execution context.
|
43
39
|
*/
|
44
40
|
static init(schema, app) {
|
41
|
+
const cache = new InMemoryCache({
|
42
|
+
addTypename: false
|
43
|
+
})
|
44
|
+
|
45
45
|
GraphqlLocalClient.client = new ApolloClient({
|
46
46
|
defaultOptions,
|
47
47
|
cache,
|
package/server/index.ts
CHANGED
@@ -7,5 +7,7 @@ export * from './pubsub-log-transport'
|
|
7
7
|
export * from './middlewares'
|
8
8
|
export * from './graphql-local-client'
|
9
9
|
export * from './service'
|
10
|
+
|
10
11
|
export * from './typeorm/encrypt-transform'
|
11
12
|
export * from './typeorm/json5-transform'
|
13
|
+
export * from './typeorm/round-transform'
|
package/server/pubsub.ts
CHANGED
@@ -66,7 +66,7 @@ switch (middleware) {
|
|
66
66
|
...options
|
67
67
|
})
|
68
68
|
} catch (e) {
|
69
|
-
logger.error('graphql-kafka-subscriptions module is not installed, so application can not go further.')
|
69
|
+
logger.error('graphql-kafka-subscriptions module is not installed, so application can not go further.', e)
|
70
70
|
throw e
|
71
71
|
}
|
72
72
|
break
|
package/server/server-dev.ts
CHANGED
@@ -20,7 +20,6 @@ import { useServer } from 'graphql-ws/lib/use/ws'
|
|
20
20
|
import { createServer } from 'http'
|
21
21
|
import Koa from 'koa'
|
22
22
|
import koaBodyParser from 'koa-bodyparser'
|
23
|
-
import koaStatic from 'koa-static'
|
24
23
|
import compose from 'koa-compose'
|
25
24
|
import { historyApiFallback } from 'koa2-connect-history-api-fallback'
|
26
25
|
import { WebSocketServer } from 'ws'
|
@@ -34,14 +33,20 @@ import { initLicense, checkValidity } from '@things-factory/operato-license-chec
|
|
34
33
|
|
35
34
|
import { GraphqlLocalClient } from './graphql-local-client'
|
36
35
|
import { databaseInitializer } from './initializers/database'
|
37
|
-
import {
|
36
|
+
import {
|
37
|
+
domainPrivateRouter,
|
38
|
+
domainPublicRouter,
|
39
|
+
globalPrivateRouter,
|
40
|
+
globalPublicRouter,
|
41
|
+
graphqlRouter
|
42
|
+
} from './routers'
|
38
43
|
import { schema } from './schema'
|
39
44
|
import { Domain } from './service'
|
40
45
|
import { EntityManager } from 'typeorm'
|
41
46
|
import { domainMiddleware } from './middlewares'
|
42
47
|
|
43
48
|
process.on('uncaughtException', error => {
|
44
|
-
logger.error('uncaughtException: ', error
|
49
|
+
logger.error('uncaughtException: ', error)
|
45
50
|
|
46
51
|
//process.exit(1)
|
47
52
|
})
|
@@ -59,7 +64,6 @@ args.option('webpack', 'webpack configuration file', config.get('webpack'))
|
|
59
64
|
|
60
65
|
const flags = args.parse(process.argv)
|
61
66
|
|
62
|
-
const path = require('path')
|
63
67
|
const webpack = require('webpack')
|
64
68
|
const webpackConfig = require(flags.webpack || '@things-factory/builder/webpack.config.dev.js')
|
65
69
|
|
@@ -99,6 +103,7 @@ const bootstrap = async () => {
|
|
99
103
|
await databaseInitializer()
|
100
104
|
|
101
105
|
const app = new Koa<ICustomAppState, ICustomAppContext>() as any
|
106
|
+
app.proxy = true
|
102
107
|
|
103
108
|
app.use(
|
104
109
|
cors({
|
@@ -269,17 +274,11 @@ const bootstrap = async () => {
|
|
269
274
|
app.use(graphqlRouter.routes())
|
270
275
|
app.use(graphqlRouter.allowedMethods())
|
271
276
|
|
272
|
-
/* should follow this order : history-fallback => webpack-middleware
|
277
|
+
/* should follow this order : history-fallback => webpack-middleware */
|
273
278
|
app.use(historyApiFallback({ whiteList: [] }))
|
274
279
|
|
275
280
|
app.use(middleware)
|
276
281
|
|
277
|
-
app.use(
|
278
|
-
koaStatic(compiler.outputPath, {
|
279
|
-
index: false
|
280
|
-
})
|
281
|
-
)
|
282
|
-
|
283
282
|
httpServer.listen({ port: PORT }, () => {
|
284
283
|
logger.info(`🚀 Server ready at http://0.0.0.0:${PORT}/graphql`)
|
285
284
|
logger.info(`🚀 Subscriptions ready at ws://0.0.0.0:${PORT}/graphql`)
|
package/server/server.ts
CHANGED
@@ -33,12 +33,18 @@ import { initLicense, checkValidity } from '@things-factory/operato-license-chec
|
|
33
33
|
|
34
34
|
import { GraphqlLocalClient } from './graphql-local-client'
|
35
35
|
import { databaseInitializer } from './initializers/database'
|
36
|
-
import {
|
36
|
+
import {
|
37
|
+
domainPrivateRouter,
|
38
|
+
domainPublicRouter,
|
39
|
+
globalPrivateRouter,
|
40
|
+
globalPublicRouter,
|
41
|
+
graphqlRouter
|
42
|
+
} from './routers'
|
37
43
|
import { schema } from './schema'
|
38
44
|
import { domainMiddleware } from './middlewares'
|
39
45
|
|
40
46
|
process.on('uncaughtException', error => {
|
41
|
-
logger.error('uncaughtException: ', error
|
47
|
+
logger.error('uncaughtException: ', error)
|
42
48
|
|
43
49
|
//process.exit(1)
|
44
50
|
})
|
@@ -74,6 +80,7 @@ const bootstrap = async () => {
|
|
74
80
|
await databaseInitializer()
|
75
81
|
|
76
82
|
const app = new Koa() as any
|
83
|
+
app.proxy = true
|
77
84
|
|
78
85
|
app.use(
|
79
86
|
cors({
|
@@ -22,7 +22,7 @@ export class AttributeSetQuery {
|
|
22
22
|
}
|
23
23
|
|
24
24
|
@Query(returns => AttributeSetList, { description: 'To fetch multiple AttributeSets' })
|
25
|
-
async attributeSets(@Args() params: ListParam, @Ctx() context: any): Promise<AttributeSetList> {
|
25
|
+
async attributeSets(@Args(type => ListParam) params: ListParam, @Ctx() context: any): Promise<AttributeSetList> {
|
26
26
|
const queryBuilder = getQueryBuilderFromListParams({
|
27
27
|
params,
|
28
28
|
repository: await getRepository(AttributeSet),
|
@@ -21,7 +21,7 @@ export class DomainQuery {
|
|
21
21
|
|
22
22
|
@Directive('@privilege(superUserGranted: true)')
|
23
23
|
@Query(returns => DomainList, { description: 'To fetch all domains (Only superuser is granted this privilege.)' })
|
24
|
-
async domains(@Args() params: ListParam, @Ctx() context: any): Promise<DomainList> {
|
24
|
+
async domains(@Args(type => ListParam) params: ListParam, @Ctx() context: any): Promise<DomainList> {
|
25
25
|
const queryBuilder = await getQueryBuilderFromListParams({
|
26
26
|
repository: getRepository(Domain),
|
27
27
|
alias: 'ContactPoint',
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Domain } from './domain'
|
2
2
|
import { DomainQuery } from './domain-query'
|
3
|
-
import { DomainMutation } from './domain-
|
3
|
+
import { DomainMutation } from './domain-mutation'
|
4
4
|
|
5
5
|
export const entities = [Domain]
|
6
6
|
export const resolvers = [DomainQuery, DomainMutation]
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { ValueTransformer } from 'typeorm'
|
2
|
+
|
3
|
+
/**
|
4
|
+
* ValueTransformer object for rounding floating point values.
|
5
|
+
*/
|
6
|
+
export const roundTransformer: ValueTransformer = {
|
7
|
+
/**
|
8
|
+
* Rounds the entity field value before storing it in the database.
|
9
|
+
* @param {number | null} value - Floating point value to round or null
|
10
|
+
* @returns {number | null} - Rounded number or null
|
11
|
+
*/
|
12
|
+
to: (value: number | null) => (value !== null && !isNaN(value) ? Math.round(value * 10000) / 10000 : undefined),
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Returns the entity field value as it is without any transformation when reading from the database.
|
16
|
+
* @param {number} value - Number value read from the database
|
17
|
+
* @returns {number} - The number value as is
|
18
|
+
*/
|
19
|
+
from: (value: number) => value
|
20
|
+
}
|
package/translations/en.json
CHANGED
@@ -29,5 +29,6 @@
|
|
29
29
|
"text.nothing_changed": "nothing changed",
|
30
30
|
"text.nothing_selected": "nothing selected",
|
31
31
|
"text.there_is_nothing_to_delete": "there is nothing to delete",
|
32
|
-
"text.there_is_nothing_to_save": "there is nothing to save"
|
32
|
+
"text.there_is_nothing_to_save": "there is nothing to save",
|
33
|
+
"text.column visibility setting": "column visibility"
|
33
34
|
}
|
package/translations/ja.json
CHANGED
@@ -28,5 +28,6 @@
|
|
28
28
|
"text.nothing_changed": "変更なし",
|
29
29
|
"text.nothing_selected": "選択されていない",
|
30
30
|
"text.there_is_nothing_to_delete": "削除するデータがありません.",
|
31
|
-
"text.there_is_nothing_to_save": "保存するデータがありません."
|
31
|
+
"text.there_is_nothing_to_save": "保存するデータがありません.",
|
32
|
+
"text.column visibility setting": "カラムの表示設定"
|
32
33
|
}
|
package/translations/ko.json
CHANGED
@@ -28,5 +28,6 @@
|
|
28
28
|
"text.nothing_changed": "변경사항 없음",
|
29
29
|
"text.nothing_selected": "선택되지 않음",
|
30
30
|
"text.there_is_nothing_to_delete": "삭제할 데이터가 없습니다.",
|
31
|
-
"text.there_is_nothing_to_save": "저장할 데이터가 없습니다."
|
31
|
+
"text.there_is_nothing_to_save": "저장할 데이터가 없습니다.",
|
32
|
+
"text.column visibility setting": "컬럼 보이기"
|
32
33
|
}
|
package/translations/ms.json
CHANGED
@@ -28,5 +28,6 @@
|
|
28
28
|
"text.nothing_changed": "nothing changed",
|
29
29
|
"text.nothing_selected": "nothing selected",
|
30
30
|
"text.there_is_nothing_to_delete": "there is nothing to delete",
|
31
|
-
"text.there_is_nothing_to_save": "there is nothing to save"
|
31
|
+
"text.there_is_nothing_to_save": "there is nothing to save",
|
32
|
+
"text.column visibility setting": "tetapan kebolehlihatan kolum"
|
32
33
|
}
|
package/translations/zh.json
CHANGED
@@ -28,5 +28,6 @@
|
|
28
28
|
"text.nothing_changed": "无更改",
|
29
29
|
"text.nothing_selected": "未选择",
|
30
30
|
"text.there_is_nothing_to_delete": "没有要删除的数据。",
|
31
|
-
"text.there_is_nothing_to_save": "没有要保存的数据。"
|
31
|
+
"text.there_is_nothing_to_save": "没有要保存的数据。",
|
32
|
+
"text.column visibility setting": "列显示"
|
32
33
|
}
|
package/views/public/home.html
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
<!
|
1
|
+
<!doctype html>
|
2
2
|
<html lang="en">
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
@@ -52,6 +52,8 @@
|
|
52
52
|
<!-- Performance tip: hint to the browser to start the handshake for the fonts site -->
|
53
53
|
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />
|
54
54
|
<link href="/node_modules/@material-design-icons/font/index.css" rel="stylesheet" />
|
55
|
+
<link href="/node_modules/material-symbols/index.css" rel="stylesheet" />
|
56
|
+
<link href="/node_modules/@fontsource/roboto/index.css" rel="stylesheet" />
|
55
57
|
<link rel="stylesheet" href="/theme.css" />
|
56
58
|
|
57
59
|
<style>
|
@@ -65,7 +67,8 @@
|
|
65
67
|
line-height: 1.5;
|
66
68
|
-webkit-font-smoothing: antialiased;
|
67
69
|
|
68
|
-
accent-color: var(--
|
70
|
+
accent-color: var(--md-sys-color-primary);
|
71
|
+
background-color: var(--md-sys-color-background);
|
69
72
|
}
|
70
73
|
</style>
|
71
74
|
|
@@ -81,7 +84,7 @@
|
|
81
84
|
<link rel="prefetch" href="/public/home.js" />
|
82
85
|
</head>
|
83
86
|
|
84
|
-
<body>
|
87
|
+
<body class="light">
|
85
88
|
<home-page id="page"></home-page>
|
86
89
|
<noscript> Please enable JavaScript to view this website. </noscript>
|
87
90
|
<!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
|
package/views/template.html
CHANGED
@@ -1,120 +0,0 @@
|
|
1
|
-
import Swal from 'sweetalert2'
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Custom Alert utilized sweetalert2 to produce a simple pop-up message box.
|
5
|
-
* *Side note: Did not fully utilize sweet alert capability, just added some common usage.
|
6
|
-
* @param {string} type - ['success', 'error', 'warning', 'info', 'question']
|
7
|
-
* @param {string} icon - ['success', 'error', 'warning', 'info', 'question']
|
8
|
-
* @param {string} title - Title for the message box.
|
9
|
-
* @param {string} text - Description for the message box. Input can be in html format.
|
10
|
-
* @param {string} footer - Footer message. Input can be in html format
|
11
|
-
* @param {string} [position = 'center'] - Position of the message box. ['top', 'top-start', 'top-end', 'center', 'center-start', 'center-end', 'bottom', 'bottom-start', 'bottom-end']
|
12
|
-
* @param {boolean} toast - Set to 'True' to display as toast.
|
13
|
-
* @param {object} confirmButton - Confirm button is an object type. The text and color of the button can be changed by adding 'text' or 'color' property into the object.
|
14
|
-
* text is the required field of the object. When the object is populated, the confirm button will automatically shown.
|
15
|
-
* @param {object} cancelButton - Cancel button is an object type. The text and color of the button can be changed by adding 'text' or 'color' property into the object.
|
16
|
-
* text is the required field of the object. When the object is populated, the cancel button will automatically shown.
|
17
|
-
* @param {boolean} [invertButton = false] - Invert button to swap the position of the buttons.
|
18
|
-
* eg. Confirm button on the right, Cancel button on the left.
|
19
|
-
* @param {function} callback - Accepts a function with an input parameter. Will invoked after swal.fire. It is a promise chaining function.
|
20
|
-
* @param {function} onBeforeOpen - Accepts a function with no parameter. Function to run when modal built, but not shown yet. Provides modal DOM element as the first argument.
|
21
|
-
* @param {function} onOpen - Accepts a function with no parameter. Function to run when modal opens, provides modal DOM element as the first argument.
|
22
|
-
* @param {function} onRender - Accepts a function with no parameter. Function to run after modal DOM has been updated. eg. After Swal.fire() or Swal.update()
|
23
|
-
* @param {function} onClose - Accepts a function with no parameter. Function to run when modal closes, provides modal DOM element as the first argument.
|
24
|
-
* @param {function} onAfterClose - Accepts a function with no parameter. Function to run after modal has been disposed.
|
25
|
-
* @param {boolean} [debug = false] - Check all parameters are set properly. When set to 'true', simple checking will be done on the input parameters to verify the type.
|
26
|
-
*/
|
27
|
-
|
28
|
-
export async function CustomAlert({
|
29
|
-
type = 'info',
|
30
|
-
icon,
|
31
|
-
title,
|
32
|
-
text,
|
33
|
-
allowOutsideClick = true,
|
34
|
-
allowEscapeKey = true,
|
35
|
-
footer,
|
36
|
-
position = 'center',
|
37
|
-
toast,
|
38
|
-
timer,
|
39
|
-
confirmButton = {},
|
40
|
-
cancelButton = {},
|
41
|
-
invertButton = false,
|
42
|
-
callback,
|
43
|
-
onBeforeOpen,
|
44
|
-
onOpen,
|
45
|
-
onRender,
|
46
|
-
onClose,
|
47
|
-
onAfterClose,
|
48
|
-
debug = false
|
49
|
-
}) {
|
50
|
-
try {
|
51
|
-
if (debug) {
|
52
|
-
let arrTypes = ['success', 'error', 'warning', 'info', 'question']
|
53
|
-
let err = ''
|
54
|
-
if (!arrTypes.includes(type)) {
|
55
|
-
err = err + 'Invalid Alert Type.\n'
|
56
|
-
}
|
57
|
-
|
58
|
-
if (title && typeof title !== 'string') err = err + 'Invalid Title.\n'
|
59
|
-
if (text && typeof text !== 'string') err = err + 'Invalid Text.\n'
|
60
|
-
if (footer && typeof text !== 'string') err = err + 'Invalid Footer.\n'
|
61
|
-
if (typeof position !== 'string') err = err + 'Invalid Position.\n'
|
62
|
-
if (toast && typeof toast !== 'boolean') err = err + 'Invalid Footer.\n'
|
63
|
-
if (
|
64
|
-
Object.keys(confirmButton).length > 0 &&
|
65
|
-
(typeof confirmButton !== 'object' || !confirmButton.hasOwnProperty('text'))
|
66
|
-
)
|
67
|
-
err = err + 'Invalid Confirm Button.\n'
|
68
|
-
if (
|
69
|
-
Object.keys(cancelButton).length > 0 &&
|
70
|
-
(typeof cancelButton !== 'object' || !cancelButton.hasOwnProperty('text'))
|
71
|
-
)
|
72
|
-
err = err + 'Invalid Cancel Button.\n'
|
73
|
-
|
74
|
-
if (err !== '') throw new Error(err)
|
75
|
-
}
|
76
|
-
|
77
|
-
const result = await Swal.fire({
|
78
|
-
icon: icon || type,
|
79
|
-
title: title,
|
80
|
-
text: text,
|
81
|
-
timer: timer ? timer:0,
|
82
|
-
timerProgressBar: timer ? true : 0,
|
83
|
-
allowOutsideClick: allowOutsideClick,
|
84
|
-
allowEscapeKey: allowEscapeKey,
|
85
|
-
footer: footer,
|
86
|
-
position: position,
|
87
|
-
showConfirmButton: Object.keys(confirmButton).length > 0 ? true : false,
|
88
|
-
showCancelButton: Object.keys(cancelButton).length > 0 ? true : false,
|
89
|
-
confirmButtonText: confirmButton.hasOwnProperty('text') ? confirmButton.text : 'confirm',
|
90
|
-
cancelButtonText: cancelButton.hasOwnProperty('text') ? cancelButton.text : 'cancel',
|
91
|
-
confirmButtonColor: confirmButton.hasOwnProperty('color') ? confirmButton.color : '#22a6a7',
|
92
|
-
cancelButtonColor: cancelButton.hasOwnProperty('color') ? cancelButton.color : '#cfcfcf',
|
93
|
-
toast: toast,
|
94
|
-
reverseButtons: invertButton,
|
95
|
-
willOpen: () => {
|
96
|
-
onBeforeOpen ? onBeforeOpen() : undefined
|
97
|
-
},
|
98
|
-
didOpen: () => {
|
99
|
-
onOpen ? onOpen() : undefined
|
100
|
-
},
|
101
|
-
didRender: () => {
|
102
|
-
onRender ? onRender() : undefined
|
103
|
-
},
|
104
|
-
willClose: () => {
|
105
|
-
onClose ? onClose() : undefined
|
106
|
-
},
|
107
|
-
didClose: () => {
|
108
|
-
onAfterClose ? onAfterClose() : undefined
|
109
|
-
}
|
110
|
-
})
|
111
|
-
|
112
|
-
if (callback && typeof callback === 'function') {
|
113
|
-
callback(result)
|
114
|
-
} else {
|
115
|
-
return Promise.resolve(result)
|
116
|
-
}
|
117
|
-
} catch (error) {
|
118
|
-
console.log('%c(Custom-Alert)\n' + error, 'color:Red')
|
119
|
-
}
|
120
|
-
}
|
package/client/elements/index.js
DELETED