@genesislcap/foundation-forms 14.101.0 → 14.101.1

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.
@@ -1363,7 +1363,7 @@
1363
1363
  "type": {
1364
1364
  "text": "any"
1365
1365
  },
1366
- "default": "{\n renderer: html`\n ${(x) => DateControlRendererTemplate(x.prefix)}\n `,\n tester: rankWith(DATE_CONTROL_RANK, isDate),\n mapper: mapStateToControlProps, // TODO: change mapper to handle dates instead of doing it in the template\n}"
1366
+ "default": "{\n renderer: html`\n ${(x) => DateControlRendererTemplate(x.prefix)}\n `,\n tester: rankWith(DATE_CONTROL_RANK, isOneOfDate),\n mapper: mapStateToControlProps, // TODO: change mapper to handle dates instead of doing it in the template\n}"
1367
1367
  }
1368
1368
  ],
1369
1369
  "exports": [
@@ -1484,7 +1484,7 @@
1484
1484
  "type": {
1485
1485
  "text": "any"
1486
1486
  },
1487
- "default": "{\n renderer: html`\n ${(x) => DateControlRendererTemplate(x.prefix)}\n `,\n tester: rankWith(DATE_CONTROL_RANK, isDate),\n mapper: mapStateToControlProps, // TODO: change mapper to handle dates instead of doing it in the template\n}"
1487
+ "default": "{\n renderer: html`\n ${(x) => DateControlRendererTemplate(x.prefix)}\n `,\n tester: rankWith(DATE_CONTROL_RANK, isOneOfDate),\n mapper: mapStateToControlProps, // TODO: change mapper to handle dates instead of doing it in the template\n}"
1488
1488
  }
1489
1489
  ],
1490
1490
  "exports": [
@@ -2227,15 +2227,15 @@
2227
2227
  "declarations": [
2228
2228
  {
2229
2229
  "kind": "variable",
2230
- "name": "isDate"
2230
+ "name": "isOneOfDate"
2231
2231
  }
2232
2232
  ],
2233
2233
  "exports": [
2234
2234
  {
2235
2235
  "kind": "js",
2236
- "name": "isDate",
2236
+ "name": "isOneOfDate",
2237
2237
  "declaration": {
2238
- "name": "isDate",
2238
+ "name": "isOneOfDate",
2239
2239
  "module": "src/jsonforms/testers/isDate.ts"
2240
2240
  }
2241
2241
  }
@@ -1,2 +1,2 @@
1
- export declare const isDate: import("@jsonforms/core").Tester;
1
+ export declare const isOneOfDate: import("@jsonforms/core").Tester;
2
2
  //# sourceMappingURL=isDate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isDate.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/testers/isDate.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,kCAA6E,CAAC"}
1
+ {"version":3,"file":"isDate.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/testers/isDate.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,kCAOvB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { mapStateToControlProps, rankWith } from '@jsonforms/core';
2
2
  import { html } from '@microsoft/fast-element';
3
- import { isDate } from '../testers/isDate';
3
+ import { isOneOfDate } from '../testers/isDate';
4
4
  import { DATE_CONTROL_RANK } from './RenderersRanks';
5
5
  export const DateControlRendererTemplate = (prefix = 'zero') => html `
6
6
  <template>
@@ -37,6 +37,6 @@ export const DateControlRendererEntry = {
37
37
  renderer: html `
38
38
  ${(x) => DateControlRendererTemplate(x.prefix)}
39
39
  `,
40
- tester: rankWith(DATE_CONTROL_RANK, isDate),
40
+ tester: rankWith(DATE_CONTROL_RANK, isOneOfDate),
41
41
  mapper: mapStateToControlProps, // TODO: change mapper to handle dates instead of doing it in the template
42
42
  };
@@ -1,6 +1,6 @@
1
1
  import { mapStateToControlProps, rankWith } from '@jsonforms/core';
2
2
  import { html } from '@microsoft/fast-element';
3
- import { isDate } from '../testers/isDate';
3
+ import { isOneOfDate } from '../testers/isDate';
4
4
  import { DATE_CONTROL_RANK } from './RenderersRanks';
5
5
  export const DateControlRendererTemplate = (prefix = 'zero') => html `
6
6
  <template>
@@ -66,6 +66,6 @@ export const FilterDateControlRendererEntry = {
66
66
  renderer: html `
67
67
  ${(x) => DateControlRendererTemplate(x.prefix)}
68
68
  `,
69
- tester: rankWith(DATE_CONTROL_RANK, isDate),
69
+ tester: rankWith(DATE_CONTROL_RANK, isOneOfDate),
70
70
  mapper: mapStateToControlProps, // TODO: change mapper to handle dates instead of doing it in the template
71
71
  };
@@ -1,2 +1,5 @@
1
- import { schemaMatches } from '@jsonforms/core';
2
- export const isDate = schemaMatches((schema) => schema.description === 'org.joda.time.DateTime');
1
+ import { or, schemaMatches } from '@jsonforms/core';
2
+ const isDateDescription = (s) => s.description === 'org.joda.time.DateTime';
3
+ const isDate = schemaMatches(isDateDescription);
4
+ export const isOneOfDate = or(isDate, schemaMatches((schema) => schema.hasOwnProperty('oneOf') &&
5
+ schema.oneOf.some((s) => s.description === 'org.joda.time.DateTime')));
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.101.0",
4
+ "version": "14.101.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -40,16 +40,16 @@
40
40
  "test:debug": "genx test --debug"
41
41
  },
42
42
  "devDependencies": {
43
- "@genesislcap/foundation-testing": "14.101.0",
44
- "@genesislcap/genx": "14.101.0",
43
+ "@genesislcap/foundation-testing": "14.101.1",
44
+ "@genesislcap/genx": "14.101.1",
45
45
  "@types/json-schema": "^7.0.11",
46
46
  "rimraf": "^3.0.2"
47
47
  },
48
48
  "dependencies": {
49
- "@genesislcap/foundation-comms": "14.101.0",
50
- "@genesislcap/foundation-criteria": "14.101.0",
51
- "@genesislcap/foundation-logger": "14.101.0",
52
- "@genesislcap/foundation-ui": "14.101.0",
49
+ "@genesislcap/foundation-comms": "14.101.1",
50
+ "@genesislcap/foundation-criteria": "14.101.1",
51
+ "@genesislcap/foundation-logger": "14.101.1",
52
+ "@genesislcap/foundation-ui": "14.101.1",
53
53
  "@jsonforms/core": "^3.0.0",
54
54
  "@microsoft/fast-components": "^2.21.3",
55
55
  "@microsoft/fast-element": "^1.7.0",
@@ -69,5 +69,5 @@
69
69
  "access": "public"
70
70
  },
71
71
  "customElements": "dist/custom-elements.json",
72
- "gitHead": "b07dc2fc0eb20a1b496b8945a9e0ebbc770291c2"
72
+ "gitHead": "103f9b840d36e413d1aec9d321e50606b045e65a"
73
73
  }