@genesislcap/foundation-forms 14.179.0 → 14.180.1-GENC-376.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.
@@ -1058,6 +1058,14 @@
1058
1058
  "name": "*",
1059
1059
  "package": "./validation"
1060
1060
  }
1061
+ },
1062
+ {
1063
+ "kind": "js",
1064
+ "name": "*",
1065
+ "declaration": {
1066
+ "name": "*",
1067
+ "package": "./types"
1068
+ }
1061
1069
  }
1062
1070
  ]
1063
1071
  },
@@ -1104,6 +1112,12 @@
1104
1112
  }
1105
1113
  ]
1106
1114
  },
1115
+ {
1116
+ "kind": "javascript-module",
1117
+ "path": "src/utils/types.ts",
1118
+ "declarations": [],
1119
+ "exports": []
1120
+ },
1107
1121
  {
1108
1122
  "kind": "javascript-module",
1109
1123
  "path": "src/utils/validation.ts",
@@ -1 +1 @@
1
- {"version":3,"file":"DateControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/DateControlRenderer.ts"],"names":[],"mappings":"AAKA,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,6DAgCzD,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,GAMtC,CAAC"}
@@ -2,4 +2,5 @@ export * from './filters';
2
2
  export * from './logger';
3
3
  export * from './translation';
4
4
  export * from './validation';
5
+ export * from './types';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare enum GenesisType {
5
+ DATE = 0,
6
+ DATETIME = 1
7
+ }
8
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +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"}
@@ -7,9 +7,9 @@ const TIMESTAMP_FIELD = '#/properties/TIMESTAMP';
7
7
  const template = html `
8
8
  <template>
9
9
  ${when((x) => isDev() && !x.uischema, html `
10
- <zero-button class="clipboard-button" @click=${(x) => x.copyUISchemaToClipboard()}>
10
+ <rapid-button class="clipboard-button" @click=${(x) => x.copyUISchemaToClipboard()}>
11
11
  Copy autogenerated UI Schema
12
- </zero-button>
12
+ </rapid-button>
13
13
  `)}
14
14
  ${when((x) => x.jsonforms && x.dispatch && x.props, html `
15
15
  <dispatch-renderer
@@ -1,7 +1,12 @@
1
1
  import { mapStateToControlProps, rankWith } from '@jsonforms/core';
2
2
  import { html } from '@microsoft/fast-element';
3
+ import { GenesisType } from '../../utils';
3
4
  import { isOneOfDate } from '../testers/isDate';
4
5
  import { DATE_CONTROL_RANK } from './RenderersRanks';
6
+ /**
7
+ * @internal
8
+ */
9
+ const typeSwitch = (control) => { var _a; return ((_a = control.schema) === null || _a === void 0 ? void 0 : _a.genesisType) === GenesisType.DATETIME ? 'datetime-local' : 'date'; };
5
10
  export const DateControlRendererTemplate = (prefix = 'zero') => html `
6
11
  <template>
7
12
  <control-wrapper
@@ -19,7 +24,7 @@ export const DateControlRendererTemplate = (prefix = 'zero') => html `
19
24
  timeZone: 'UTC',
20
25
  }).format(x.control.data)}
21
26
  id=${(x) => x.control.path}
22
- type="date"
27
+ type="${(x) => typeSwitch(x.control)}"
23
28
  data-test-id=${(x) => x.control.path}
24
29
  ?required=${(x) => x.control.required}
25
30
  ?disabled=${(x) => !x.control.enabled}
@@ -2,3 +2,4 @@ export * from './filters';
2
2
  export * from './logger';
3
3
  export * from './translation';
4
4
  export * from './validation';
5
+ export * from './types';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export var GenesisType;
5
+ (function (GenesisType) {
6
+ GenesisType[GenesisType["DATE"] = 0] = "DATE";
7
+ GenesisType[GenesisType["DATETIME"] = 1] = "DATETIME";
8
+ })(GenesisType || (GenesisType = {}));
@@ -695,6 +695,14 @@ export declare const foundationFormTemplate: ViewTemplate<Form, any>;
695
695
  /** @public */
696
696
  export declare const genesisErrorTranslator: ErrorTranslator;
697
697
 
698
+ /**
699
+ * @internal
700
+ */
701
+ export declare enum GenesisType {
702
+ DATE = 0,
703
+ DATETIME = 1
704
+ }
705
+
698
706
  /** @internal */
699
707
  export declare const getPrefixedForm: (prefix: any) => ViewTemplate<Form, any>;
700
708
 
@@ -138,6 +138,16 @@ export const foundationFormTemplate: ViewTemplate<Form, any>;
138
138
  // @public (undocumented)
139
139
  export const genesisErrorTranslator: ErrorTranslator;
140
140
 
141
+ // Warning: (ae-internal-missing-underscore) The name "GenesisType" should be prefixed with an underscore because the declaration is marked as @internal
142
+ //
143
+ // @internal (undocumented)
144
+ export enum GenesisType {
145
+ // (undocumented)
146
+ DATE = 0,
147
+ // (undocumented)
148
+ DATETIME = 1
149
+ }
150
+
141
151
  // Warning: (ae-internal-missing-underscore) The name "getPrefixedForm" should be prefixed with an underscore because the declaration is marked as @internal
142
152
  //
143
153
  // @internal (undocumented)
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.179.0",
4
+ "version": "14.180.1-GENC-376.1",
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.179.0",
44
- "@genesislcap/genx": "14.179.0",
45
- "@genesislcap/rollup-builder": "14.179.0",
46
- "@genesislcap/ts-builder": "14.179.0",
47
- "@genesislcap/uvu-playwright-builder": "14.179.0",
48
- "@genesislcap/vite-builder": "14.179.0",
49
- "@genesislcap/webpack-builder": "14.179.0",
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",
50
50
  "@types/json-schema": "^7.0.11",
51
51
  "rimraf": "^3.0.2"
52
52
  },
53
53
  "dependencies": {
54
- "@genesislcap/foundation-comms": "14.179.0",
55
- "@genesislcap/foundation-criteria": "14.179.0",
56
- "@genesislcap/foundation-logger": "14.179.0",
57
- "@genesislcap/foundation-ui": "14.179.0",
58
- "@genesislcap/foundation-utils": "14.179.0",
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",
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": "fbb42975b9ecb82eac233685b37b0fa8118e2467"
79
+ "gitHead": "78e9f228c69c542cd6e3654bfad95f5ed660558d"
80
80
  }