@things-factory/routing-base 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.
Files changed (74) hide show
  1. package/dist-server/index.d.ts +1 -0
  2. package/dist-server/index.js +0 -3
  3. package/dist-server/index.js.map +1 -1
  4. package/dist-server/service/index.d.ts +16 -0
  5. package/dist-server/service/operation/index.d.ts +7 -0
  6. package/dist-server/service/operation/operation-mutation.d.ts +9 -0
  7. package/dist-server/service/operation/operation-mutation.js +2 -2
  8. package/dist-server/service/operation/operation-mutation.js.map +1 -1
  9. package/dist-server/service/operation/operation-query.d.ts +12 -0
  10. package/dist-server/service/operation/operation-query.js +3 -3
  11. package/dist-server/service/operation/operation-query.js.map +1 -1
  12. package/dist-server/service/operation/operation-type.d.ts +26 -0
  13. package/dist-server/service/operation/operation-type.js +6 -6
  14. package/dist-server/service/operation/operation-type.js.map +1 -1
  15. package/dist-server/service/operation/operation.d.ts +30 -0
  16. package/dist-server/service/operation/operation.js +3 -3
  17. package/dist-server/service/operation/operation.js.map +1 -1
  18. package/dist-server/service/routing/index.d.ts +7 -0
  19. package/dist-server/service/routing/routing-mutation.d.ts +9 -0
  20. package/dist-server/service/routing/routing-mutation.js +2 -2
  21. package/dist-server/service/routing/routing-mutation.js.map +1 -1
  22. package/dist-server/service/routing/routing-query.d.ts +16 -0
  23. package/dist-server/service/routing/routing-query.js +8 -8
  24. package/dist-server/service/routing/routing-query.js.map +1 -1
  25. package/dist-server/service/routing/routing-type.d.ts +19 -0
  26. package/dist-server/service/routing/routing-type.js +6 -6
  27. package/dist-server/service/routing/routing-type.js.map +1 -1
  28. package/dist-server/service/routing/routing.d.ts +21 -0
  29. package/dist-server/service/routing/routing.js +5 -5
  30. package/dist-server/service/routing/routing.js.map +1 -1
  31. package/dist-server/service/routing-item/index.d.ts +7 -0
  32. package/dist-server/service/routing-item/routing-item-mutation.d.ts +9 -0
  33. package/dist-server/service/routing-item/routing-item-mutation.js +2 -2
  34. package/dist-server/service/routing-item/routing-item-mutation.js.map +1 -1
  35. package/dist-server/service/routing-item/routing-item-query.d.ts +14 -0
  36. package/dist-server/service/routing-item/routing-item-query.js +3 -3
  37. package/dist-server/service/routing-item/routing-item-query.js.map +1 -1
  38. package/dist-server/service/routing-item/routing-item-type.d.ts +26 -0
  39. package/dist-server/service/routing-item/routing-item-type.js +6 -6
  40. package/dist-server/service/routing-item/routing-item-type.js.map +1 -1
  41. package/dist-server/service/routing-item/routing-item.d.ts +28 -0
  42. package/dist-server/service/routing-item/routing-item.js +5 -5
  43. package/dist-server/service/routing-item/routing-item.js.map +1 -1
  44. package/dist-server/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +5 -6
  46. package/server/index.ts +0 -4
  47. package/server/service/operation/operation-query.ts +4 -1
  48. package/server/service/routing/routing-query.ts +1 -1
  49. package/server/service/routing/routing.ts +2 -2
  50. package/server/service/routing-item/routing-item-query.ts +4 -1
  51. package/server/service/routing-item/routing-item.ts +2 -2
  52. package/things-factory.config.js +1 -5
  53. package/client/actions/main.js +0 -1
  54. package/client/bootstrap.js +0 -8
  55. package/client/index.js +0 -1
  56. package/client/reducers/main.js +0 -17
  57. package/client/themes/app-theme.css +0 -59
  58. package/dist-server/controllers/index.js +0 -1
  59. package/dist-server/controllers/index.js.map +0 -1
  60. package/dist-server/middlewares/index.js +0 -8
  61. package/dist-server/middlewares/index.js.map +0 -1
  62. package/dist-server/migrations/index.js +0 -12
  63. package/dist-server/migrations/index.js.map +0 -1
  64. package/dist-server/routes.js +0 -24
  65. package/dist-server/routes.js.map +0 -1
  66. package/server/controllers/index.ts +0 -0
  67. package/server/middlewares/index.ts +0 -3
  68. package/server/migrations/index.ts +0 -9
  69. package/server/routes.ts +0 -26
  70. package/translations/en.json +0 -1
  71. package/translations/ja.json +0 -1
  72. package/translations/ko.json +0 -1
  73. package/translations/ms.json +0 -1
  74. package/translations/zh.json +0 -1
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@things-factory/routing-base",
3
- "version": "7.0.0-alpha.8",
3
+ "version": "7.0.0",
4
4
  "main": "dist-server/index.js",
5
- "browser": "client/index.js",
6
5
  "things-factory": true,
7
6
  "author": "",
8
7
  "description": "Server module that handles Routing",
@@ -24,9 +23,9 @@
24
23
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
24
  },
26
25
  "dependencies": {
27
- "@things-factory/attachment-base": "^7.0.0-alpha.8",
28
- "@things-factory/auth-base": "^7.0.0-alpha.8",
29
- "@things-factory/shell": "^7.0.0-alpha.8"
26
+ "@things-factory/attachment-base": "^7.0.0",
27
+ "@things-factory/auth-base": "^7.0.0",
28
+ "@things-factory/shell": "^7.0.0"
30
29
  },
31
- "gitHead": "b4981ea2721e7eaf4dbd618b6c77316ebc000ee5"
30
+ "gitHead": "00f3917ca132679e3571f3f4fd16f4caf84f488e"
32
31
  }
package/server/index.ts CHANGED
@@ -1,5 +1 @@
1
- import './routes'
2
-
3
- export * from './migrations'
4
- export * from './middlewares'
5
1
  export * from './service'
@@ -19,7 +19,10 @@ export class OperationQuery {
19
19
  }
20
20
 
21
21
  @Query(returns => OperationList, { description: 'To fetch multiple Operations' })
22
- async operations(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<OperationList> {
22
+ async operations(
23
+ @Args(type => ListParam) params: ListParam,
24
+ @Ctx() context: ResolverContext
25
+ ): Promise<OperationList> {
23
26
  const { domain } = context.state
24
27
 
25
28
  const queryBuilder = getQueryBuilderFromListParams({
@@ -19,7 +19,7 @@ export class RoutingQuery {
19
19
  }
20
20
 
21
21
  @Query(returns => RoutingList, { description: 'To fetch multiple Routings' })
22
- async routings(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<RoutingList> {
22
+ async routings(@Args(type => ListParam) params: ListParam, @Ctx() context: ResolverContext): Promise<RoutingList> {
23
23
  const { domain } = context.state
24
24
 
25
25
  const queryBuilder = getQueryBuilderFromListParams({
@@ -71,7 +71,7 @@ export class Routing {
71
71
  @ManyToOne(type => User, {
72
72
  nullable: true
73
73
  })
74
- @Field({ nullable: true })
74
+ @Field(type => User, { nullable: true })
75
75
  creator?: User
76
76
 
77
77
  @RelationId((routing: Routing) => routing.creator)
@@ -80,7 +80,7 @@ export class Routing {
80
80
  @ManyToOne(type => User, {
81
81
  nullable: true
82
82
  })
83
- @Field({ nullable: true })
83
+ @Field(type => User, { nullable: true })
84
84
  updater?: User
85
85
 
86
86
  @RelationId((routing: Routing) => routing.updater)
@@ -11,7 +11,10 @@ import { RoutingItemList } from './routing-item-type'
11
11
  @Resolver(RoutingItem)
12
12
  export class RoutingItemQuery {
13
13
  @Query(returns => RoutingItemList, { description: 'To fetch multiple RoutingItems' })
14
- async routingItems(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<RoutingItemList> {
14
+ async routingItems(
15
+ @Args(type => ListParam) params: ListParam,
16
+ @Ctx() context: ResolverContext
17
+ ): Promise<RoutingItemList> {
15
18
  const { domain } = context.state
16
19
 
17
20
  const queryBuilder = getQueryBuilderFromListParams({
@@ -100,7 +100,7 @@ export class RoutingItem {
100
100
  @ManyToOne(type => User, {
101
101
  nullable: true
102
102
  })
103
- @Field({ nullable: true })
103
+ @Field(type => User, { nullable: true })
104
104
  creator?: User
105
105
 
106
106
  @RelationId((routingItem: RoutingItem) => routingItem.creator)
@@ -109,7 +109,7 @@ export class RoutingItem {
109
109
  @ManyToOne(type => User, {
110
110
  nullable: true
111
111
  })
112
- @Field({ nullable: true })
112
+ @Field(type => User, { nullable: true })
113
113
  updater?: User
114
114
 
115
115
  @RelationId((routingItem: RoutingItem) => routingItem.updater)
@@ -1,5 +1 @@
1
- import bootstrap from './client/bootstrap'
2
-
3
- export default {
4
- bootstrap
5
- }
1
+ export default {}
@@ -1 +0,0 @@
1
- export const UPDATE_ROUTING_BASE = 'UPDATE_ROUTING_BASE'
@@ -1,8 +0,0 @@
1
- import { store } from '@things-factory/shell'
2
- import routingBase from './reducers/main'
3
-
4
- export default function bootstrap() {
5
- store.addReducers({
6
- routingBase
7
- })
8
- }
package/client/index.js DELETED
@@ -1 +0,0 @@
1
- export * from './actions/main'
@@ -1,17 +0,0 @@
1
- import { UPDATE_ROUTING_BASE } from '../actions/main'
2
-
3
- const INITIAL_STATE = {
4
- routingBase: 'ABC'
5
- }
6
-
7
- const routingBase = (state = INITIAL_STATE, action) => {
8
- switch (action.type) {
9
- case UPDATE_ROUTING_BASE:
10
- return { ...state }
11
-
12
- default:
13
- return state
14
- }
15
- }
16
-
17
- export default routingBase
@@ -1,59 +0,0 @@
1
- body {
2
- /* theme color */
3
- --primary-color: #22a6a7;
4
- --secondary-color: #394e64;
5
- --focus-color: #fff;
6
- --primary-background-color: var(--secondary-color);
7
- --secondary-background-color: #283644;
8
- --main-section-background-color: #f4f7fb;
9
-
10
- --focus-background-color: var(--primary-color);
11
- --primary-text-color: #111;
12
- --secondary-text-color: #017e7f;
13
-
14
- --opacity-dark-color: rgba(0, 0, 0, 0.4);
15
- --opacity-light-color: rgba(255, 255, 255, 0.8);
16
-
17
- /* status color */
18
- --status-success-color: #35a24a;
19
- --status-warning-color: #ee8d03;
20
- --status-danger-color: #d14946;
21
- --status-info-color: #398ace;
22
-
23
- /* common style */
24
- --border-radius: 4px;
25
- --border-dark-color: 1px solid rgba(0, 0, 0, 0.15);
26
- --border-light-color: 1px solid rgba(255, 255, 255, 0.3);
27
-
28
- --box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.1);
29
-
30
- --theme-font: 'Noto', Helvetica;
31
-
32
- --margin-default: 9px;
33
- --margin-narrow: 4px;
34
- --margin-wide: 15px;
35
-
36
- --scrollbar-thumb-color: rgba(57, 78, 100, 0.5);
37
- --scrollbar-thumb-hover-color: var(--primary-color);
38
-
39
- /* app layout style */
40
- --app-grid-template-area: 'header header header' 'nav main aside' 'nav footer aside';
41
-
42
- /* subtitle style */
43
- --subtitle-padding: 12px 5px 3px 5px;
44
- --subtitle-font: bold 14px/18px var(--theme-font);
45
- --subtitle-text-color: var(--primary-color);
46
- --subtitle-border-bottom: 1px solid var(--primary-color);
47
-
48
- /* icon style */
49
- --icon-tiny-size: 24px;
50
- --icon-default-size: 36px;
51
- --icon-big-size: 48px;
52
- --icon-default-color: #fff;
53
-
54
- /* material design component themes */
55
- --mdc-theme-on-primary: white;
56
- --mdc-theme-primary: var(--primary-color);
57
- --mdc-theme-on-secondary: white;
58
- --mdc-theme-secondary: var(--primary-color);
59
- }
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initMiddlewares = void 0;
4
- function initMiddlewares(app) {
5
- /* can add middlewares into app */
6
- }
7
- exports.initMiddlewares = initMiddlewares;
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,GAAG;IACjC,kCAAkC;AACpC,CAAC;AAFD,0CAEC","sourcesContent":["export function initMiddlewares(app) {\n /* can add middlewares into app */\n}\n"]}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrations = void 0;
4
- const glob = require('glob');
5
- const path = require('path');
6
- exports.migrations = [];
7
- glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function (file) {
8
- if (file.indexOf('index.js') !== -1)
9
- return;
10
- exports.migrations = exports.migrations.concat(Object.values(require(path.resolve(file))) || []);
11
- });
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA","sourcesContent":["const glob = require('glob')\nconst path = require('path')\n\nexport var migrations = []\n\nglob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {\n if (file.indexOf('index.js') !== -1) return\n migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])\n})\n"]}
@@ -1,24 +0,0 @@
1
- process.on('bootstrap-module-global-public-route', (app, globalPublicRouter) => {
2
- /*
3
- * can add global public routes to application (auth not required, tenancy not required)
4
- *
5
- * ex) routes.get('/path', async(context, next) => {})
6
- * ex) routes.post('/path', async(context, next) => {})
7
- */
8
- });
9
- process.on('bootstrap-module-global-private-route', (app, globalPrivateRouter) => {
10
- /*
11
- * can add global private routes to application (auth required, tenancy not required)
12
- */
13
- });
14
- process.on('bootstrap-module-domain-public-route', (app, domainPublicRouter) => {
15
- /*
16
- * can add domain public routes to application (auth not required, tenancy required)
17
- */
18
- });
19
- process.on('bootstrap-module-domain-private-route', (app, domainPrivateRouter) => {
20
- /*
21
- * can add domain private routes to application (auth required, tenancy required)
22
- */
23
- });
24
- //# sourceMappingURL=routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;;;;OAKG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA","sourcesContent":["process.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {\n /*\n * can add global public routes to application (auth not required, tenancy not required)\n *\n * ex) routes.get('/path', async(context, next) => {})\n * ex) routes.post('/path', async(context, next) => {})\n */\n})\n\nprocess.on('bootstrap-module-global-private-route' as any, (app, globalPrivateRouter) => {\n /*\n * can add global private routes to application (auth required, tenancy not required)\n */\n})\n\nprocess.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {\n /*\n * can add domain public routes to application (auth not required, tenancy required)\n */\n})\n\nprocess.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {\n /*\n * can add domain private routes to application (auth required, tenancy required)\n */\n})\n"]}
File without changes
@@ -1,3 +0,0 @@
1
- export function initMiddlewares(app) {
2
- /* can add middlewares into app */
3
- }
@@ -1,9 +0,0 @@
1
- const glob = require('glob')
2
- const path = require('path')
3
-
4
- export var migrations = []
5
-
6
- glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {
7
- if (file.indexOf('index.js') !== -1) return
8
- migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])
9
- })
package/server/routes.ts DELETED
@@ -1,26 +0,0 @@
1
- process.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {
2
- /*
3
- * can add global public routes to application (auth not required, tenancy not required)
4
- *
5
- * ex) routes.get('/path', async(context, next) => {})
6
- * ex) routes.post('/path', async(context, next) => {})
7
- */
8
- })
9
-
10
- process.on('bootstrap-module-global-private-route' as any, (app, globalPrivateRouter) => {
11
- /*
12
- * can add global private routes to application (auth required, tenancy not required)
13
- */
14
- })
15
-
16
- process.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {
17
- /*
18
- * can add domain public routes to application (auth not required, tenancy required)
19
- */
20
- })
21
-
22
- process.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {
23
- /*
24
- * can add domain private routes to application (auth required, tenancy required)
25
- */
26
- })
@@ -1 +0,0 @@
1
- {}
@@ -1 +0,0 @@
1
- {}
@@ -1 +0,0 @@
1
- {}
@@ -1 +0,0 @@
1
- {}
@@ -1 +0,0 @@
1
- {}