@genesislcap/foundation-forms 14.180.1-GENC-376.1 → 14.180.1-GENC-376.4

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 +1 @@
1
- {"version":3,"file":"DateControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/DateControlRenderer.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,2BAA2B,YAAY,MAAM,6DAgCzD,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,GAMtC,CAAC"}
1
+ {"version":3,"file":"DateControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/DateControlRenderer.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,2BAA2B,YAAY,MAAM,6DAuCzD,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,GAMtC,CAAC"}
@@ -1,8 +1,19 @@
1
1
  /**
2
2
  * @internal
3
+ * Needed to explicitly set as string as we don't want to let typescript set them as ascending numbers
4
+ * at runtime as we want to compare with the literal string values from the server
3
5
  */
4
6
  export declare enum GenesisType {
5
- DATE = 0,
6
- DATETIME = 1
7
+ STRING = "STRING",
8
+ ENUM = "ENUM",
9
+ INT = "INT",
10
+ SHORT = "SHORT",
11
+ DOUBLE = "DOUBLE",
12
+ LONG = "LONG",
13
+ BOOLEAN = "BOOLEAN",
14
+ BIGDECIMAL = "BIGDECIMAL",
15
+ DATE = "DATE",
16
+ DATETIME = "DATETIME",
17
+ RAW = "RAW"
7
18
  }
8
19
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,WAAW;IACrB,IAAI,IAAA;IACJ,QAAQ,IAAA;CACT"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,GAAG,QAAQ;CACZ"}
@@ -15,14 +15,22 @@ export const DateControlRendererTemplate = (prefix = 'zero') => html `
15
15
  ?submitted=${(x) => x.submitted}
16
16
  >
17
17
  <${prefix}-text-field
18
- :value=${(x) => x.control.data === undefined || x.control.data === null
19
- ? ''
20
- : new Intl.DateTimeFormat('fr-CA', {
18
+ :value=${(x) => {
19
+ const type = typeSwitch(x.control);
20
+ const formats = {
21
21
  year: 'numeric',
22
22
  month: '2-digit',
23
23
  day: '2-digit',
24
24
  timeZone: 'UTC',
25
- }).format(x.control.data)}
25
+ };
26
+ if (type === 'datetime-local') {
27
+ formats.hour = '2-digit:'; // need the : otherwise the format is invalid
28
+ formats.minute = '2-digit';
29
+ }
30
+ return x.control.data === undefined || x.control.data === null
31
+ ? ''
32
+ : new Intl.DateTimeFormat('fr-CA', formats).format(x.control.data);
33
+ }}
26
34
  id=${(x) => x.control.path}
27
35
  type="${(x) => typeSwitch(x.control)}"
28
36
  data-test-id=${(x) => x.control.path}
@@ -1,8 +1,19 @@
1
1
  /**
2
2
  * @internal
3
+ * Needed to explicitly set as string as we don't want to let typescript set them as ascending numbers
4
+ * at runtime as we want to compare with the literal string values from the server
3
5
  */
4
6
  export var GenesisType;
5
7
  (function (GenesisType) {
6
- GenesisType[GenesisType["DATE"] = 0] = "DATE";
7
- GenesisType[GenesisType["DATETIME"] = 1] = "DATETIME";
8
+ GenesisType["STRING"] = "STRING";
9
+ GenesisType["ENUM"] = "ENUM";
10
+ GenesisType["INT"] = "INT";
11
+ GenesisType["SHORT"] = "SHORT";
12
+ GenesisType["DOUBLE"] = "DOUBLE";
13
+ GenesisType["LONG"] = "LONG";
14
+ GenesisType["BOOLEAN"] = "BOOLEAN";
15
+ GenesisType["BIGDECIMAL"] = "BIGDECIMAL";
16
+ GenesisType["DATE"] = "DATE";
17
+ GenesisType["DATETIME"] = "DATETIME";
18
+ GenesisType["RAW"] = "RAW";
8
19
  })(GenesisType || (GenesisType = {}));
@@ -697,10 +697,21 @@ export declare const genesisErrorTranslator: ErrorTranslator;
697
697
 
698
698
  /**
699
699
  * @internal
700
+ * Needed to explicitly set as string as we don't want to let typescript set them as ascending numbers
701
+ * at runtime as we want to compare with the literal string values from the server
700
702
  */
701
703
  export declare enum GenesisType {
702
- DATE = 0,
703
- DATETIME = 1
704
+ STRING = "STRING",
705
+ ENUM = "ENUM",
706
+ INT = "INT",
707
+ SHORT = "SHORT",
708
+ DOUBLE = "DOUBLE",
709
+ LONG = "LONG",
710
+ BOOLEAN = "BOOLEAN",
711
+ BIGDECIMAL = "BIGDECIMAL",
712
+ DATE = "DATE",
713
+ DATETIME = "DATETIME",
714
+ RAW = "RAW"
704
715
  }
705
716
 
706
717
  /** @internal */
@@ -140,12 +140,30 @@ export const genesisErrorTranslator: ErrorTranslator;
140
140
 
141
141
  // Warning: (ae-internal-missing-underscore) The name "GenesisType" should be prefixed with an underscore because the declaration is marked as @internal
142
142
  //
143
- // @internal (undocumented)
143
+ // @internal
144
144
  export enum GenesisType {
145
145
  // (undocumented)
146
- DATE = 0,
146
+ BIGDECIMAL = "BIGDECIMAL",
147
+ // (undocumented)
148
+ BOOLEAN = "BOOLEAN",
149
+ // (undocumented)
150
+ DATE = "DATE",
151
+ // (undocumented)
152
+ DATETIME = "DATETIME",
153
+ // (undocumented)
154
+ DOUBLE = "DOUBLE",
155
+ // (undocumented)
156
+ ENUM = "ENUM",
157
+ // (undocumented)
158
+ INT = "INT",
159
+ // (undocumented)
160
+ LONG = "LONG",
161
+ // (undocumented)
162
+ RAW = "RAW",
163
+ // (undocumented)
164
+ SHORT = "SHORT",
147
165
  // (undocumented)
148
- DATETIME = 1
166
+ STRING = "STRING"
149
167
  }
150
168
 
151
169
  // Warning: (ae-internal-missing-underscore) The name "getPrefixedForm" should be prefixed with an underscore because the declaration is marked as @internal
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-forms",
3
3
  "description": "Genesis Foundation Forms",
4
- "version": "14.180.1-GENC-376.1",
4
+ "version": "14.180.1-GENC-376.4",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -40,22 +40,22 @@
40
40
  "test:debug": "genx test --debug"
41
41
  },
42
42
  "devDependencies": {
43
- "@genesislcap/foundation-testing": "14.180.1-GENC-376.1",
44
- "@genesislcap/genx": "14.180.1-GENC-376.1",
45
- "@genesislcap/rollup-builder": "14.180.1-GENC-376.1",
46
- "@genesislcap/ts-builder": "14.180.1-GENC-376.1",
47
- "@genesislcap/uvu-playwright-builder": "14.180.1-GENC-376.1",
48
- "@genesislcap/vite-builder": "14.180.1-GENC-376.1",
49
- "@genesislcap/webpack-builder": "14.180.1-GENC-376.1",
43
+ "@genesislcap/foundation-testing": "14.180.1-GENC-376.4",
44
+ "@genesislcap/genx": "14.180.1-GENC-376.4",
45
+ "@genesislcap/rollup-builder": "14.180.1-GENC-376.4",
46
+ "@genesislcap/ts-builder": "14.180.1-GENC-376.4",
47
+ "@genesislcap/uvu-playwright-builder": "14.180.1-GENC-376.4",
48
+ "@genesislcap/vite-builder": "14.180.1-GENC-376.4",
49
+ "@genesislcap/webpack-builder": "14.180.1-GENC-376.4",
50
50
  "@types/json-schema": "^7.0.11",
51
51
  "rimraf": "^3.0.2"
52
52
  },
53
53
  "dependencies": {
54
- "@genesislcap/foundation-comms": "14.180.1-GENC-376.1",
55
- "@genesislcap/foundation-criteria": "14.180.1-GENC-376.1",
56
- "@genesislcap/foundation-logger": "14.180.1-GENC-376.1",
57
- "@genesislcap/foundation-ui": "14.180.1-GENC-376.1",
58
- "@genesislcap/foundation-utils": "14.180.1-GENC-376.1",
54
+ "@genesislcap/foundation-comms": "14.180.1-GENC-376.4",
55
+ "@genesislcap/foundation-criteria": "14.180.1-GENC-376.4",
56
+ "@genesislcap/foundation-logger": "14.180.1-GENC-376.4",
57
+ "@genesislcap/foundation-ui": "14.180.1-GENC-376.4",
58
+ "@genesislcap/foundation-utils": "14.180.1-GENC-376.4",
59
59
  "@json-schema-tools/dereferencer": "^1.6.1",
60
60
  "@jsonforms/core": "^3.2.1",
61
61
  "@microsoft/fast-components": "^2.30.6",
@@ -76,5 +76,5 @@
76
76
  "access": "public"
77
77
  },
78
78
  "customElements": "dist/custom-elements.json",
79
- "gitHead": "78e9f228c69c542cd6e3654bfad95f5ed660558d"
79
+ "gitHead": "e01bcab47eed83d9bd8a1eadce6835fbb3002d5c"
80
80
  }