@things-factory/shell 4.0.11 → 4.0.15

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.
@@ -1,10 +1,10 @@
1
1
  import './scene-components'
2
2
 
3
- import gql from 'graphql-tag'
4
-
5
- import { create, error, ReferenceMap } from '@hatiolab/things-scene'
3
+ import { ReferenceMap, create, error } from '@hatiolab/things-scene'
6
4
  import { client, gqlContext } from '@things-factory/shell'
7
5
 
6
+ import gql from 'graphql-tag'
7
+
8
8
  export { BoardViewer } from '@operato/board'
9
9
 
10
10
  export const provider = new ReferenceMap(
@@ -9,7 +9,11 @@ exports.ScalarDate = new graphql_1.GraphQLScalarType({
9
9
  return new Date(value); // value from the client
10
10
  },
11
11
  serialize(value) {
12
- return value.getTime(); // value sent to the client
12
+ /**
13
+ * Note: Allow value to be date only like "2021-01-31" to be serialize before passing data to clientside for TypeGraphql.
14
+ * Usage: When database column datatype is "date" and data do not contain any time component.
15
+ */
16
+ return new Date(value).getTime(); // value sent to the client
13
17
  },
14
18
  parseLiteral(ast) {
15
19
  if (ast.kind === graphql_1.Kind.INT) {
@@ -1 +1 @@
1
- {"version":3,"file":"scalar-date.js","sourceRoot":"","sources":["../../../server/service/common-types/scalar-date.ts"],"names":[],"mappings":";;;AAAA,qCAAiD;AAEpC,QAAA,UAAU,GAAG,IAAI,2BAAiB,CAAC;IAC9C,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,yBAAyB;IACtC,UAAU,CAAC,KAAK;QACd,OAAO,IAAI,IAAI,CAAC,KAAwB,CAAC,CAAA,CAAC,wBAAwB;IACpE,CAAC;IACD,SAAS,CAAC,KAAW;QACnB,OAAO,KAAK,CAAC,OAAO,EAAE,CAAA,CAAC,2BAA2B;IACpD,CAAC;IACD,YAAY,CAAC,GAAG;QACd,IAAI,GAAG,CAAC,IAAI,KAAK,cAAI,CAAC,GAAG,EAAE;YACzB,OAAO,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA,CAAC,uCAAuC;SACpE;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"scalar-date.js","sourceRoot":"","sources":["../../../server/service/common-types/scalar-date.ts"],"names":[],"mappings":";;;AAAA,qCAAiD;AAEpC,QAAA,UAAU,GAAG,IAAI,2BAAiB,CAAC;IAC9C,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,yBAAyB;IACtC,UAAU,CAAC,KAAK;QACd,OAAO,IAAI,IAAI,CAAC,KAAwB,CAAC,CAAA,CAAC,wBAAwB;IACpE,CAAC;IACD,SAAS,CAAC,KAAK;QACb;;;WAGG;QACH,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAA,CAAC,2BAA2B;IAC9D,CAAC;IACD,YAAY,CAAC,GAAG;QACd,IAAI,GAAG,CAAC,IAAI,KAAK,cAAI,CAAC,GAAG,EAAE;YACzB,OAAO,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA,CAAC,uCAAuC;SACpE;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/shell",
3
- "version": "4.0.11",
3
+ "version": "4.0.15",
4
4
  "description": "Core module for framework",
5
5
  "bin": {
6
6
  "things-factory": "bin/things-factory",
@@ -35,7 +35,7 @@
35
35
  "@graphql-tools/merge": "^7.0.0",
36
36
  "@graphql-tools/schema": "^8.2.0",
37
37
  "@graphql-tools/utils": "^8.3.0",
38
- "@hatiolab/things-scene": "^2.7.21",
38
+ "@hatiolab/things-scene": "^2.7.27",
39
39
  "@koa/cors": "^3.1.0",
40
40
  "@material/mwc-button": "^0.25.3",
41
41
  "@material/mwc-fab": "^0.25.3",
@@ -43,10 +43,11 @@
43
43
  "@material/mwc-icon-button": "^0.25.3",
44
44
  "@material/mwc-slider": "^0.25.3",
45
45
  "@material/mwc-textfield": "^0.25.3",
46
- "@things-factory/ejs-remote": "^4.0.11",
47
- "@things-factory/env": "^4.0.11",
48
- "@things-factory/styles": "^4.0.11",
49
- "@things-factory/utils": "^4.0.11",
46
+ "@operato/board": "^0.2.47",
47
+ "@things-factory/ejs-remote": "^4.0.15",
48
+ "@things-factory/env": "^4.0.15",
49
+ "@things-factory/styles": "^4.0.15",
50
+ "@things-factory/utils": "^4.0.15",
50
51
  "@webcomponents/webcomponentsjs": "^2.6.0",
51
52
  "apollo-server-core": "^3.5.0",
52
53
  "apollo-server-koa": "^3.5.0",
@@ -119,5 +120,5 @@
119
120
  "resolutions": {
120
121
  "core-js": "^3.16.0"
121
122
  },
122
- "gitHead": "47745d8cdbe99f11d8d69bbcab3901c9771525a0"
123
+ "gitHead": "6271c88d67c5004b78623d6998b4ea773c76b730"
123
124
  }
@@ -6,8 +6,12 @@ export const ScalarDate = new GraphQLScalarType({
6
6
  parseValue(value) {
7
7
  return new Date(value as string | number) // value from the client
8
8
  },
9
- serialize(value: Date) {
10
- return value.getTime() // value sent to the client
9
+ serialize(value) {
10
+ /**
11
+ * Note: Allow value to be date only like "2021-01-31" to be serialize before passing data to clientside for TypeGraphql.
12
+ * Usage: When database column datatype is "date" and data do not contain any time component.
13
+ */
14
+ return new Date(value).getTime() // value sent to the client
11
15
  },
12
16
  parseLiteral(ast) {
13
17
  if (ast.kind === Kind.INT) {
package/db.test.sqlite DELETED
Binary file