@ukhomeoffice/formio-gds-template 3.0.0-alpha → 3.0.0-bravo
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.
- package/.github/workflows/build-and-test.yml +3 -3
- package/README.md +8 -0
- package/eslint.config.mjs +6 -5
- package/lib/components/datamap/GDSDataMap.d.ts +1 -0
- package/lib/components/datamap/GDSDataMap.d.ts.map +1 -0
- package/lib/components/datetime/GDSDatetimeComponent.d.ts +14 -1
- package/lib/components/datetime/GDSDatetimeComponent.d.ts.map +1 -0
- package/lib/components/datetime/GDSDatetimeComponent.js +28 -9
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +2 -0
- package/lib/components/select/GDSSelect.d.ts +143 -0
- package/lib/components/select/GDSSelect.d.ts.map +1 -0
- package/lib/components/select/GDSSelect.js +340 -0
- package/lib/components/selectboxes/GDSCheckBoxes.d.ts +1 -0
- package/lib/components/selectboxes/GDSCheckBoxes.d.ts.map +1 -0
- package/lib/components/time/GDSTimeComponent.d.ts +1 -0
- package/lib/components/time/GDSTimeComponent.d.ts.map +1 -0
- package/lib/components/time/GDSTimeComponent.js +5 -5
- package/lib/components/util/TimeHelper.d.ts +1 -0
- package/lib/components/util/TimeHelper.d.ts.map +1 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -0
- package/lib/templates/gds/button/index.d.ts +1 -0
- package/lib/templates/gds/button/index.d.ts.map +1 -0
- package/lib/templates/gds/checkbox/index.d.ts +1 -0
- package/lib/templates/gds/checkbox/index.d.ts.map +1 -0
- package/lib/templates/gds/columns/index.d.ts +1 -0
- package/lib/templates/gds/columns/index.d.ts.map +1 -0
- package/lib/templates/gds/component/index.d.ts +1 -0
- package/lib/templates/gds/component/index.d.ts.map +1 -0
- package/lib/templates/gds/container/index.d.ts +1 -0
- package/lib/templates/gds/container/index.d.ts.map +1 -0
- package/lib/templates/gds/cssClasses.d.ts +1 -0
- package/lib/templates/gds/cssClasses.d.ts.map +1 -0
- package/lib/templates/gds/datagrid/form.ejs.js +2 -2
- package/lib/templates/gds/datagrid/index.d.ts +1 -0
- package/lib/templates/gds/datagrid/index.d.ts.map +1 -0
- package/lib/templates/gds/datamap/index.d.ts +1 -0
- package/lib/templates/gds/datamap/index.d.ts.map +1 -0
- package/lib/templates/gds/datetime/index.d.ts +1 -0
- package/lib/templates/gds/datetime/index.d.ts.map +1 -0
- package/lib/templates/gds/day/index.d.ts +1 -0
- package/lib/templates/gds/day/index.d.ts.map +1 -0
- package/lib/templates/gds/editgrid/index.d.ts +1 -0
- package/lib/templates/gds/editgrid/index.d.ts.map +1 -0
- package/lib/templates/gds/field/index.d.ts +1 -0
- package/lib/templates/gds/field/index.d.ts.map +1 -0
- package/lib/templates/gds/fieldset/index.d.ts +1 -0
- package/lib/templates/gds/fieldset/index.d.ts.map +1 -0
- package/lib/templates/gds/file/index.d.ts +1 -0
- package/lib/templates/gds/file/index.d.ts.map +1 -0
- package/lib/templates/gds/iconClass.d.ts +1 -0
- package/lib/templates/gds/iconClass.d.ts.map +1 -0
- package/lib/templates/gds/index.d.ts +2 -1
- package/lib/templates/gds/index.d.ts.map +1 -0
- package/lib/templates/gds/input/index.d.ts +1 -0
- package/lib/templates/gds/input/index.d.ts.map +1 -0
- package/lib/templates/gds/label/index.d.ts +1 -0
- package/lib/templates/gds/label/index.d.ts.map +1 -0
- package/lib/templates/gds/message/index.d.ts +1 -0
- package/lib/templates/gds/message/index.d.ts.map +1 -0
- package/lib/templates/gds/panel/index.d.ts +1 -0
- package/lib/templates/gds/panel/index.d.ts.map +1 -0
- package/lib/templates/gds/radio/index.d.ts +1 -0
- package/lib/templates/gds/radio/index.d.ts.map +1 -0
- package/lib/templates/gds/select/index.d.ts +1 -0
- package/lib/templates/gds/select/index.d.ts.map +1 -0
- package/lib/templates/gds/selectOption/index.d.ts +1 -0
- package/lib/templates/gds/selectOption/index.d.ts.map +1 -0
- package/lib/templates/gds/selectboxes/index.d.ts +1 -0
- package/lib/templates/gds/selectboxes/index.d.ts.map +1 -0
- package/lib/templates/gds/survey/index.d.ts +1 -0
- package/lib/templates/gds/survey/index.d.ts.map +1 -0
- package/lib/templates/gds/tab/index.d.ts +1 -0
- package/lib/templates/gds/tab/index.d.ts.map +1 -0
- package/lib/templates/gds/table/index.d.ts +1 -0
- package/lib/templates/gds/table/index.d.ts.map +1 -0
- package/lib/templates/gds/template.css +11 -0
- package/lib/templates/gds/template.css.map +1 -1
- package/lib/templates/gds/time/index.d.ts +1 -0
- package/lib/templates/gds/time/index.d.ts.map +1 -0
- package/lib/templates/gds/warning/index.d.ts +1 -0
- package/lib/templates/gds/warning/index.d.ts.map +1 -0
- package/lib/templates/gds/wizard/index.d.ts +1 -0
- package/lib/templates/gds/wizard/index.d.ts.map +1 -0
- package/lib/templates/gds/wizardHeader/index.d.ts +1 -0
- package/lib/templates/gds/wizardHeader/index.d.ts.map +1 -0
- package/lib/templates/gds/wizardNav/index.d.ts +1 -0
- package/lib/templates/gds/wizardNav/index.d.ts.map +1 -0
- package/lib/templates/index.d.ts +2 -1
- package/lib/templates/index.d.ts.map +1 -0
- package/lib/types.d.ts +3 -2
- package/lib/types.d.ts.map +1 -0
- package/package.json +2 -1
- package/src/components/datetime/GDSDatetimeComponent.ts +28 -9
- package/src/components/index.ts +2 -0
- package/src/components/select/GDSSelect.spec.ts +538 -0
- package/src/components/select/GDSSelect.ts +418 -0
- package/src/components/time/GDSTimeComponent.ts +5 -5
- package/src/templates/gds/datagrid/form.ejs +1 -2
- package/src/templates/gds/index.ts +1 -1
- package/src/templates/gds/template.scss +18 -0
- package/src/types.ts +2 -1
- package/tsconfig.json +17 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/message/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/panel/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/radio/index.ts"],"names":[],"mappings":";;;AAEA,wBAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/select/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/selectOption/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/selectboxes/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/survey/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/tab/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/table/index.ts"],"names":[],"mappings":";;;AACA,wBAAwB"}
|
|
@@ -115,6 +115,9 @@
|
|
|
115
115
|
.govuk-details__summary {
|
|
116
116
|
font-weight: 400 !important;
|
|
117
117
|
}
|
|
118
|
+
.govuk-details__summary-text, .govuk-details__summary:hover .govuk-details__summary-text {
|
|
119
|
+
text-decoration: none;
|
|
120
|
+
}
|
|
118
121
|
|
|
119
122
|
.formio-component-datagrid > [ref=messageContainer],
|
|
120
123
|
.formio-component-editgrid > [ref=messageContainer],
|
|
@@ -125,6 +128,10 @@
|
|
|
125
128
|
display: none;
|
|
126
129
|
}
|
|
127
130
|
|
|
131
|
+
.formio-hidden {
|
|
132
|
+
display: none !important;
|
|
133
|
+
}
|
|
134
|
+
|
|
128
135
|
.small-button {
|
|
129
136
|
padding: 0.25rem 0.5rem;
|
|
130
137
|
font-size: 0.875rem;
|
|
@@ -144,6 +151,10 @@
|
|
|
144
151
|
border-top: none;
|
|
145
152
|
}
|
|
146
153
|
|
|
154
|
+
.datagrid-tbody {
|
|
155
|
+
overflow-x: hidden;
|
|
156
|
+
}
|
|
157
|
+
|
|
147
158
|
.gov-accordion-no-bottom {
|
|
148
159
|
border-bottom: none !important;
|
|
149
160
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../src/templates/gds/template.scss","../../../node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKE;EACE;EACA;EACA;;AAGF;AAAA;EAEE;EACA;EACA;;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;IACE;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;;EAGF;IACE;IACA;;EAGF;IACE;;EAEF;IACE;;;AAKJ;EACE;;AAGA;EACE;;;AAaF;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;;;
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../src/templates/gds/template.scss","../../../node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKE;EACE;EACA;EACA;;AAGF;AAAA;EAEE;EACA;EACA;;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;IACE;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;;EAGF;IACE;IACA;;EAGF;IACE;;EAEF;IACE;;;AAKJ;EACE;;AAGA;EACE;;AAGF;EAEE;;;AAaF;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;;;AAMJ;EACE;;;AAGF;EACE;EACA;EACA;;;AAIF;EACE;;AAEA;EACE;EAGA;;;AAKJ;EACE;EACA;;;AAMF;EACE;;;AAGF;EACE;;;ACgFM;ED3EJ;IACE;;;;AAMJ;EADF;IAEI;IACA;IACA;IACA;IACA;;;;AAIJ;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAQA;EACE","file":"template.css"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/time/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/warning/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/wizard/index.ts"],"names":[],"mappings":";;;AAEA,wBAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/wizardHeader/index.ts"],"names":[],"mappings":";;;AACA,wBAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/wizardNav/index.ts"],"names":[],"mappings":";;;AAEA,wBAAsB"}
|
package/lib/templates/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
gds: {
|
|
3
|
-
transform(type: string, text: string):
|
|
3
|
+
transform(type: string, text: string): string;
|
|
4
4
|
defaultIconset: string;
|
|
5
5
|
iconClass: (iconset: string, name: string, spinning: boolean) => string;
|
|
6
6
|
cssClasses: {
|
|
@@ -106,3 +106,4 @@ declare const _default: {
|
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
108
|
export default _default;
|
|
109
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBAEE"}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DayComponent, DateTimeComponent, TimeComponent as CoreTimeComponent, SelectBoxesComponent, DataMapComponent } from '@formio/core';
|
|
1
|
+
import type { DayComponent, DateTimeComponent, TimeComponent as CoreTimeComponent, SelectBoxesComponent, DataMapComponent, SelectComponent } from '@formio/core';
|
|
2
2
|
/**
|
|
3
3
|
* Minimal interface for DOM input-like elements.
|
|
4
4
|
* Used as the typed parameter in TimeHelper methods so callers can pass any
|
|
@@ -33,4 +33,5 @@ export type GDSDatetimeComponentSchema = Omit<DayComponent, 'suffix' | 'fields'>
|
|
|
33
33
|
minute?: GDSFieldDefinition;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
export type { CoreTimeComponent, SelectBoxesComponent, DataMapComponent };
|
|
36
|
+
export type { CoreTimeComponent, SelectBoxesComponent, DataMapComponent, SelectComponent };
|
|
37
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,YAAY,EACZ,iBAAiB,EACjB,aAAa,IAAI,iBAAiB,EAClC,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EAClB,MAAM,cAAc,CAAC;AAEtB;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,0BAA0B,GAKlC,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,QAAQ,CAAC,GACvC,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,aAAa,CAAC,GAAG;IACpD,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,qDAAqD;IACrD,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG;QAC7B,IAAI,CAAC,EAAE,kBAAkB,CAAC;QAC1B,MAAM,CAAC,EAAE,kBAAkB,CAAC;KAC/B,CAAC;CACL,CAAC;AAKN,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ukhomeoffice/formio-gds-template",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-bravo",
|
|
4
4
|
"description": "Gov UK design system formio templates — upgraded to @formio/js@5.x",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"types": "lib/index.d.ts",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"prepack": "npm run build",
|
|
12
|
+
"yalc:push": "npm run build && yalc push",
|
|
12
13
|
"test:coverage": "nyc --reporter=text mocha --reporter spec './{,!(node_modules)/**/}*.spec.js'",
|
|
13
14
|
"test": "mocha --require ts-node/register --reporter spec './{,!(node_modules)/**/}*.spec.ts'",
|
|
14
15
|
"build-sass": "sass src/templates/gds/template.scss lib/templates/gds/template.css",
|
|
@@ -61,7 +61,7 @@ export default class GDSDatetimeComponent extends Day {
|
|
|
61
61
|
private timeHelper: TimeHelper = new TimeHelper();
|
|
62
62
|
|
|
63
63
|
// element typed as `any` to match the base Day.attach(element: any) override signature
|
|
64
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
65
65
|
public attach(element: any): Promise<void> {
|
|
66
66
|
this.loadRefs(element, { hour: 'single', minute: 'single' });
|
|
67
67
|
|
|
@@ -108,6 +108,25 @@ export default class GDSDatetimeComponent extends Day {
|
|
|
108
108
|
return superAttach;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Override t() to remap translation keys emitted by @formio/core validators that
|
|
113
|
+
* differ from the @formio/js English translation map.
|
|
114
|
+
*
|
|
115
|
+
* @formio/core's date validator emits FieldError('invalidDate', ...) (camelCase).
|
|
116
|
+
* @formio/js translations only define 'invalid_date' (underscore). When t()
|
|
117
|
+
* cannot find 'invalidDate' it returns the raw key as the error message.
|
|
118
|
+
*
|
|
119
|
+
* We map the camelCase core keys to their underscored @formio/js equivalents so
|
|
120
|
+
* the user sees a proper human-readable message.
|
|
121
|
+
*/
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
123
|
+
public t(text: any, ...args: any[]): any {
|
|
124
|
+
const keyMap: Record<string, string> = {
|
|
125
|
+
invalidDate: 'invalid_date',
|
|
126
|
+
};
|
|
127
|
+
return super.t(keyMap[text] ?? text, ...args);
|
|
128
|
+
}
|
|
129
|
+
|
|
111
130
|
public init(): void {
|
|
112
131
|
super.init();
|
|
113
132
|
// @formio/js@5.x: this.validators is not pre-populated by the base class; guard before filtering
|
|
@@ -133,13 +152,13 @@ export default class GDSDatetimeComponent extends Day {
|
|
|
133
152
|
}
|
|
134
153
|
|
|
135
154
|
// elements typed as `any` to match the base Day.setErrorClasses(elements: any, ...) override signature
|
|
136
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
155
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
137
156
|
public setErrorClasses(elements: any, dirty: any, hasError: any): void {
|
|
138
157
|
super.setErrorClasses([this.refs.hour, this.refs.minute, ...elements], dirty, hasError);
|
|
139
158
|
}
|
|
140
159
|
|
|
141
160
|
// elements typed as `any` to match the base Component.removeInputError(elements: any) signature
|
|
142
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
161
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
143
162
|
public removeInputError(elements: any): void {
|
|
144
163
|
super.removeInputError([this.refs.hour, this.refs.minute, ...elements]);
|
|
145
164
|
}
|
|
@@ -159,7 +178,7 @@ export default class GDSDatetimeComponent extends Day {
|
|
|
159
178
|
}
|
|
160
179
|
|
|
161
180
|
// value typed as `any` to match the base Day.getDate(value: any): null | string signature
|
|
162
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
181
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
163
182
|
public getDate(value: any): string | null {
|
|
164
183
|
const defaults: Array<string | number | undefined> = [];
|
|
165
184
|
const [DAY, MONTH, YEAR, HOUR, MINUTE] = [0, 1, 2, 3, 4];
|
|
@@ -199,7 +218,7 @@ export default class GDSDatetimeComponent extends Day {
|
|
|
199
218
|
}
|
|
200
219
|
|
|
201
220
|
// name typed as `any` to match the base Day.getFieldValue(name: any): number signature
|
|
202
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
221
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
203
222
|
public getFieldValue(name: any): string | null {
|
|
204
223
|
if (this.dataValue && this.dataValue !== 'Invalid date') {
|
|
205
224
|
try {
|
|
@@ -242,8 +261,8 @@ export default class GDSDatetimeComponent extends Day {
|
|
|
242
261
|
}
|
|
243
262
|
|
|
244
263
|
// value typed as `any` to match the base Day.setValueAt(index: number, value: any) signature
|
|
245
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
246
|
-
public setValueAt(
|
|
264
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
265
|
+
public setValueAt(_index: number, value: any): void {
|
|
247
266
|
// temporary solution to avoid input reset on invalid date.
|
|
248
267
|
if (!value || value === 'Invalid date') {
|
|
249
268
|
return;
|
|
@@ -281,13 +300,13 @@ export default class GDSDatetimeComponent extends Day {
|
|
|
281
300
|
}
|
|
282
301
|
|
|
283
302
|
// value typed as `any` to match the base Component.normalizeValue(value: any): any signature
|
|
284
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
303
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
285
304
|
public normalizeValue(value: any): any {
|
|
286
305
|
return value;
|
|
287
306
|
}
|
|
288
307
|
|
|
289
308
|
// setting/value typed as `any` to match the base Day.validateRequired(setting: any, value: any) signature
|
|
290
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
309
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
291
310
|
public validateRequired(setting: any, value: any): boolean {
|
|
292
311
|
const { day, month, year, minute, hour } = this.parts;
|
|
293
312
|
|
package/src/components/index.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import datamap from './datamap/GDSDataMap';
|
|
2
2
|
import datetime from './datetime/GDSDatetimeComponent';
|
|
3
|
+
import select from './select/GDSSelect';
|
|
3
4
|
import selectboxes from './selectboxes/GDSCheckBoxes';
|
|
4
5
|
import time from './time/GDSTimeComponent';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
datamap,
|
|
8
9
|
datetime,
|
|
10
|
+
select,
|
|
9
11
|
selectboxes,
|
|
10
12
|
time,
|
|
11
13
|
};
|