@genesislcap/foundation-forms 14.180.1-GENC-376.2 → 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"}
@@ -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}
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.2",
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.2",
44
- "@genesislcap/genx": "14.180.1-GENC-376.2",
45
- "@genesislcap/rollup-builder": "14.180.1-GENC-376.2",
46
- "@genesislcap/ts-builder": "14.180.1-GENC-376.2",
47
- "@genesislcap/uvu-playwright-builder": "14.180.1-GENC-376.2",
48
- "@genesislcap/vite-builder": "14.180.1-GENC-376.2",
49
- "@genesislcap/webpack-builder": "14.180.1-GENC-376.2",
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.2",
55
- "@genesislcap/foundation-criteria": "14.180.1-GENC-376.2",
56
- "@genesislcap/foundation-logger": "14.180.1-GENC-376.2",
57
- "@genesislcap/foundation-ui": "14.180.1-GENC-376.2",
58
- "@genesislcap/foundation-utils": "14.180.1-GENC-376.2",
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": "9a16760046ba934e43aad6ad82df253fc2e92eb6"
79
+ "gitHead": "e01bcab47eed83d9bd8a1eadce6835fbb3002d5c"
80
80
  }