@ukhomeoffice/formio-gds-template 2.0.2 → 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/LICENCE.md +21 -0
- package/README.md +8 -0
- package/eslint.config.mjs +59 -0
- package/lib/components/datamap/GDSDataMap.d.ts +5 -14
- package/lib/components/datamap/GDSDataMap.d.ts.map +1 -0
- package/lib/components/datamap/GDSDataMap.js +9 -29
- package/lib/components/datetime/GDSDatetimeComponent.d.ts +43 -22
- package/lib/components/datetime/GDSDatetimeComponent.d.ts.map +1 -0
- package/lib/components/datetime/GDSDatetimeComponent.js +167 -178
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +6 -4
- 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 +5 -2
- package/lib/components/selectboxes/GDSCheckBoxes.d.ts.map +1 -0
- package/lib/components/selectboxes/GDSCheckBoxes.js +7 -33
- package/lib/components/time/GDSTimeComponent.d.ts +13 -10
- package/lib/components/time/GDSTimeComponent.d.ts.map +1 -0
- package/lib/components/time/GDSTimeComponent.js +59 -84
- package/lib/components/util/TimeHelper.d.ts +6 -4
- package/lib/components/util/TimeHelper.d.ts.map +1 -0
- package/lib/components/util/TimeHelper.js +13 -16
- package/lib/index.d.ts +4 -2
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -2
- 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/button/index.js +1 -1
- 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/checkbox/index.js +1 -1
- 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/columns/index.js +1 -1
- 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/component/index.js +1 -1
- 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/container/index.js +1 -1
- 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/datagrid/index.js +1 -1
- 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/datamap/index.js +1 -1
- 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/datetime/index.js +1 -1
- 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/day/index.js +1 -1
- 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/editgrid/index.js +1 -1
- 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/field/index.js +1 -1
- 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/fieldset/index.js +1 -1
- 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/file/index.js +1 -1
- package/lib/templates/gds/iconClass.d.ts +2 -1
- package/lib/templates/gds/iconClass.d.ts.map +1 -0
- package/lib/templates/gds/iconClass.js +3 -3
- package/lib/templates/gds/index.d.ts +3 -2
- package/lib/templates/gds/index.d.ts.map +1 -0
- package/lib/templates/gds/index.js +72 -64
- 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/input/index.js +1 -1
- 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/label/index.js +1 -1
- 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/message/index.js +1 -1
- 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/panel/index.js +1 -1
- 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/radio/index.js +1 -1
- 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/select/index.js +1 -1
- 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/selectOption/index.js +1 -1
- 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/selectboxes/index.js +1 -1
- 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/survey/index.js +1 -1
- 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/tab/index.js +1 -1
- 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/table/index.js +1 -1
- package/lib/templates/gds/template.css +27 -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/time/index.js +1 -1
- 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/warning/index.js +1 -1
- 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/wizard/index.js +1 -1
- 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/wizardHeader/index.js +1 -1
- package/lib/templates/gds/wizardNav/index.d.ts +1 -0
- package/lib/templates/gds/wizardNav/index.d.ts.map +1 -0
- package/lib/templates/gds/wizardNav/index.js +1 -1
- package/lib/templates/index.d.ts +3 -2
- package/lib/templates/index.d.ts.map +1 -0
- package/lib/templates/index.js +1 -1
- package/lib/types.d.ts +37 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +2 -0
- package/package.json +14 -7
- package/src/components/datamap/GDSDataMap.ts +5 -14
- package/src/components/datetime/GDSDatetimeComponent.ts +128 -91
- 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/selectboxes/GDSCheckBoxes.ts +7 -8
- package/src/components/time/GDSTimeComponent.ts +37 -27
- package/src/components/util/TimeHelper.ts +6 -5
- package/src/css.d.ts +4 -0
- package/src/templates/gds/datagrid/form.ejs +1 -2
- package/src/templates/gds/iconClass.ts +1 -1
- package/src/templates/gds/index.ts +43 -33
- package/src/templates/gds/template.scss +48 -1
- package/src/types.ts +56 -0
- package/tsconfig.json +21 -5
- package/webpack.config.js +1 -1
- package/tslint.json +0 -22
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
TimeHelper.prototype.checkAndValidateMinutes = function (element) {
|
|
3
|
+
class TimeHelper {
|
|
4
|
+
checkAndValidateMinutes(element) {
|
|
7
5
|
if (element.value) {
|
|
8
6
|
if (element.value.length > TimeHelper.MAX_LENGTH) {
|
|
9
7
|
element.value = element.value.slice(0, 2);
|
|
10
8
|
}
|
|
11
|
-
|
|
9
|
+
const minuteAsNumber = parseInt(element.value, 10);
|
|
12
10
|
if (minuteAsNumber > 59) {
|
|
13
11
|
element.value = '59';
|
|
14
12
|
}
|
|
@@ -16,13 +14,13 @@ var TimeHelper = /** @class */ (function () {
|
|
|
16
14
|
element.value = '00';
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
|
-
}
|
|
20
|
-
|
|
17
|
+
}
|
|
18
|
+
checkAndValidateHour(element) {
|
|
21
19
|
if (element.value) {
|
|
22
20
|
if (element.value.length > TimeHelper.MAX_LENGTH) {
|
|
23
21
|
element.value = element.value.slice(0, 2);
|
|
24
22
|
}
|
|
25
|
-
|
|
23
|
+
const hourAsNumber = parseInt(element.value, 10);
|
|
26
24
|
if (hourAsNumber > 23) {
|
|
27
25
|
element.value = '23';
|
|
28
26
|
}
|
|
@@ -30,18 +28,17 @@ var TimeHelper = /** @class */ (function () {
|
|
|
30
28
|
element.value = '00';
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
|
-
}
|
|
34
|
-
|
|
31
|
+
}
|
|
32
|
+
preventNonNumericKeyPress(evt) {
|
|
35
33
|
if (evt.which !== 8 && evt.which !== 0 && evt.which < 48 || evt.which > 57) {
|
|
36
34
|
evt.preventDefault();
|
|
37
35
|
}
|
|
38
|
-
}
|
|
39
|
-
|
|
36
|
+
}
|
|
37
|
+
validateDateInput(element, length) {
|
|
40
38
|
if (element.value && element.value.length > length) {
|
|
41
39
|
element.value = element.value.slice(0, length);
|
|
42
40
|
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}());
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
TimeHelper.MAX_LENGTH = 2;
|
|
47
44
|
exports.default = TimeHelper;
|
package/lib/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ declare const _default: {
|
|
|
2
2
|
framework: string;
|
|
3
3
|
templates: {
|
|
4
4
|
gds: {
|
|
5
|
-
transform(type:
|
|
5
|
+
transform(type: string, text: string): string;
|
|
6
6
|
defaultIconset: string;
|
|
7
|
-
iconClass: (iconset:
|
|
7
|
+
iconClass: (iconset: string, name: string, spinning: boolean) => string;
|
|
8
8
|
cssClasses: {
|
|
9
9
|
'has-error': string;
|
|
10
10
|
'formio-tab-link-container-active': string;
|
|
@@ -110,8 +110,10 @@ declare const _default: {
|
|
|
110
110
|
components: {
|
|
111
111
|
datamap: typeof import("./components/datamap/GDSDataMap").default;
|
|
112
112
|
datetime: typeof import("./components/datetime/GDSDatetimeComponent").default;
|
|
113
|
+
select: typeof import("./components/select/GDSSelect").default;
|
|
113
114
|
selectboxes: typeof import("./components/selectboxes/GDSCheckBoxes").default;
|
|
114
115
|
time: typeof import("./components/time/GDSTimeComponent").default;
|
|
115
116
|
};
|
|
116
117
|
};
|
|
117
118
|
export default _default;
|
|
119
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAIE"}
|
package/lib/index.js
CHANGED
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const components_1 = __importDefault(require("./components"));
|
|
7
|
+
const templates_1 = __importDefault(require("./templates"));
|
|
8
8
|
exports.default = {
|
|
9
9
|
framework: 'gds',
|
|
10
10
|
templates: templates_1.default,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/button/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/checkbox/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/columns/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/component/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/container/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssClasses.d.ts","sourceRoot":"","sources":["../../../src/templates/gds/cssClasses.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,wBAYE"}
|
|
@@ -29,7 +29,7 @@ console.warn('Unknown column width for converting to GDS column width: ' + colu
|
|
|
29
29
|
columnWidth = 'govuk-grid-column-full';
|
|
30
30
|
}
|
|
31
31
|
;
|
|
32
|
-
__p += '\n\n<div class="' +
|
|
32
|
+
__p += '\n\n<div class="datagrid-tbody ' +
|
|
33
33
|
((__t = (ctx.component.customClass)) == null ? '' : __t) +
|
|
34
34
|
'" ref="' +
|
|
35
35
|
((__t = (ctx.datagridKey)) == null ? '' : __t) +
|
|
@@ -99,6 +99,6 @@ __p += '\n <button class="govuk-button govuk-button--secondary"\n
|
|
|
99
99
|
((__t = (ctx.t(ctx.component.addAnother || 'Add Another'))) == null ? '' : __t) +
|
|
100
100
|
'\n </button>\n ';
|
|
101
101
|
} ;
|
|
102
|
-
__p += '\n</div>\n
|
|
102
|
+
__p += '\n</div>\n';
|
|
103
103
|
return __p
|
|
104
104
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/datagrid/index.ts"],"names":[],"mappings":";;;AACA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/datamap/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/datetime/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/day/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/editgrid/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/field/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/fieldset/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/file/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iconClass.d.ts","sourceRoot":"","sources":["../../../src/templates/gds/iconClass.ts"],"names":[],"mappings":"kCAAyB,MAAM,QAAQ,MAAM,YAAY,OAAO,KAAG,MAAM;AAAzE,wBA4BE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = (
|
|
3
|
+
exports.default = (iconset, name, spinning) => {
|
|
4
4
|
if (iconset === 'fa') {
|
|
5
5
|
switch (name) {
|
|
6
6
|
case 'save':
|
|
@@ -26,5 +26,5 @@ exports.default = (function (iconset, name, spinning) {
|
|
|
26
26
|
break;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
return spinning ?
|
|
30
|
-
}
|
|
29
|
+
return spinning ? `${iconset} ${iconset}-${name} ${iconset}-spin` : `${iconset} ${iconset}-${name}`;
|
|
30
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './template.css';
|
|
2
2
|
declare const _default: {
|
|
3
|
-
transform(type:
|
|
3
|
+
transform(type: string, text: string): string;
|
|
4
4
|
defaultIconset: string;
|
|
5
|
-
iconClass: (iconset:
|
|
5
|
+
iconClass: (iconset: string, name: string, spinning: boolean) => string;
|
|
6
6
|
cssClasses: {
|
|
7
7
|
'has-error': string;
|
|
8
8
|
'formio-tab-link-container-active': string;
|
|
@@ -105,3 +105,4 @@ declare const _default: {
|
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
107
|
export default _default;
|
|
108
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/gds/index.ts"],"names":[],"mappings":"AA0BA,OAAO,gBAAgB,CAAC;;oBAeJ,MAAM,QAAQ,MAAM,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AADjD,wBA6CE"}
|
|
@@ -3,78 +3,86 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
6
|
+
const button_1 = __importDefault(require("./button"));
|
|
7
|
+
const checkbox_1 = __importDefault(require("./checkbox"));
|
|
8
|
+
const columns_1 = __importDefault(require("./columns"));
|
|
9
|
+
const component_1 = __importDefault(require("./component"));
|
|
10
|
+
const container_1 = __importDefault(require("./container"));
|
|
11
|
+
const cssClasses_1 = __importDefault(require("./cssClasses"));
|
|
12
|
+
const datagrid_1 = __importDefault(require("./datagrid"));
|
|
13
|
+
const datamap_1 = __importDefault(require("./datamap"));
|
|
14
|
+
const datetime_1 = __importDefault(require("./datetime"));
|
|
15
|
+
const day_1 = __importDefault(require("./day"));
|
|
16
|
+
const editgrid_1 = __importDefault(require("./editgrid"));
|
|
17
|
+
const field_1 = __importDefault(require("./field"));
|
|
18
|
+
const file_1 = __importDefault(require("./file"));
|
|
19
|
+
const fieldset_1 = __importDefault(require("./fieldset"));
|
|
20
|
+
const iconClass_1 = __importDefault(require("./iconClass"));
|
|
21
|
+
const input_1 = __importDefault(require("./input"));
|
|
22
|
+
const label_1 = __importDefault(require("./label"));
|
|
23
|
+
const message_1 = __importDefault(require("./message"));
|
|
24
|
+
const panel_1 = __importDefault(require("./panel"));
|
|
25
|
+
const radio_1 = __importDefault(require("./radio"));
|
|
26
|
+
const select_1 = __importDefault(require("./select"));
|
|
27
|
+
const selectboxes_1 = __importDefault(require("./selectboxes"));
|
|
28
|
+
const selectOption_1 = __importDefault(require("./selectOption"));
|
|
29
|
+
const survey_1 = __importDefault(require("./survey"));
|
|
30
|
+
const tab_1 = __importDefault(require("./tab"));
|
|
31
|
+
const table_1 = __importDefault(require("./table"));
|
|
32
32
|
require("./template.css");
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
const time_1 = __importDefault(require("./time"));
|
|
34
|
+
const warning_1 = __importDefault(require("./warning"));
|
|
35
|
+
const wizard_1 = __importDefault(require("./wizard"));
|
|
36
|
+
const wizardHeader_1 = __importDefault(require("./wizardHeader"));
|
|
37
|
+
const wizardNav_1 = __importDefault(require("./wizardNav"));
|
|
38
|
+
// Unwrap CJS default exports to handle ESM/CJS interop in Vite.
|
|
39
|
+
// Uses a generic so the return type matches the input type — no `any` needed.
|
|
40
|
+
const unwrap = (mod) => (mod !== null && typeof mod === 'object' && 'default' in mod)
|
|
41
|
+
? mod.default
|
|
42
|
+
: mod;
|
|
38
43
|
exports.default = {
|
|
39
|
-
transform
|
|
44
|
+
transform(type, text) {
|
|
40
45
|
if (!text) {
|
|
41
46
|
return text;
|
|
42
47
|
}
|
|
43
48
|
if (type === 'class') {
|
|
44
|
-
|
|
49
|
+
const key = text.toString();
|
|
50
|
+
return Object.prototype.hasOwnProperty.call(this.cssClasses, key)
|
|
51
|
+
? this.cssClasses[key]
|
|
52
|
+
: text;
|
|
45
53
|
}
|
|
46
54
|
return text;
|
|
47
55
|
},
|
|
48
56
|
defaultIconset: 'fa',
|
|
49
|
-
iconClass: iconClass_1.default,
|
|
50
|
-
cssClasses: cssClasses_1.default,
|
|
51
|
-
button: button_1.default,
|
|
52
|
-
checkbox: checkbox_1.default,
|
|
53
|
-
columns: columns_1.default,
|
|
54
|
-
component: component_1.default,
|
|
55
|
-
container: container_1.default,
|
|
56
|
-
datetime: datetime_1.default,
|
|
57
|
-
day: day_1.default,
|
|
58
|
-
datagrid: datagrid_1.default,
|
|
59
|
-
datamap: datamap_1.default,
|
|
60
|
-
input: input_1.default,
|
|
61
|
-
editgrid: editgrid_1.default,
|
|
62
|
-
field: field_1.default,
|
|
63
|
-
file: file_1.default,
|
|
64
|
-
fieldset: fieldset_1.default,
|
|
65
|
-
label: label_1.default,
|
|
66
|
-
message: message_1.default,
|
|
67
|
-
panel: panel_1.default,
|
|
68
|
-
radio: radio_1.default,
|
|
69
|
-
select: select_1.default,
|
|
70
|
-
selectboxes: selectboxes_1.default,
|
|
71
|
-
selectOption: selectOption_1.default,
|
|
72
|
-
survey: survey_1.default,
|
|
73
|
-
table: table_1.default,
|
|
74
|
-
tab: tab_1.default,
|
|
75
|
-
time: time_1.default,
|
|
76
|
-
warning: warning_1.default,
|
|
77
|
-
wizard: wizard_1.default,
|
|
78
|
-
wizardHeader: wizardHeader_1.default,
|
|
79
|
-
wizardNav: wizardNav_1.default,
|
|
57
|
+
iconClass: unwrap(iconClass_1.default),
|
|
58
|
+
cssClasses: unwrap(cssClasses_1.default),
|
|
59
|
+
button: unwrap(button_1.default),
|
|
60
|
+
checkbox: unwrap(checkbox_1.default),
|
|
61
|
+
columns: unwrap(columns_1.default),
|
|
62
|
+
component: unwrap(component_1.default),
|
|
63
|
+
container: unwrap(container_1.default),
|
|
64
|
+
datetime: unwrap(datetime_1.default),
|
|
65
|
+
day: unwrap(day_1.default),
|
|
66
|
+
datagrid: unwrap(datagrid_1.default),
|
|
67
|
+
datamap: unwrap(datamap_1.default),
|
|
68
|
+
input: unwrap(input_1.default),
|
|
69
|
+
editgrid: unwrap(editgrid_1.default),
|
|
70
|
+
field: unwrap(field_1.default),
|
|
71
|
+
file: unwrap(file_1.default),
|
|
72
|
+
fieldset: unwrap(fieldset_1.default),
|
|
73
|
+
label: unwrap(label_1.default),
|
|
74
|
+
message: unwrap(message_1.default),
|
|
75
|
+
panel: unwrap(panel_1.default),
|
|
76
|
+
radio: unwrap(radio_1.default),
|
|
77
|
+
select: unwrap(select_1.default),
|
|
78
|
+
selectboxes: unwrap(selectboxes_1.default),
|
|
79
|
+
selectOption: unwrap(selectOption_1.default),
|
|
80
|
+
survey: unwrap(survey_1.default),
|
|
81
|
+
table: unwrap(table_1.default),
|
|
82
|
+
tab: unwrap(tab_1.default),
|
|
83
|
+
time: unwrap(time_1.default),
|
|
84
|
+
warning: unwrap(warning_1.default),
|
|
85
|
+
wizard: unwrap(wizard_1.default),
|
|
86
|
+
wizardHeader: unwrap(wizardHeader_1.default),
|
|
87
|
+
wizardNav: unwrap(wizardNav_1.default),
|
|
80
88
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/input/index.ts"],"names":[],"mappings":";;;AACA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/label/index.ts"],"names":[],"mappings":";;;AACA,wBAAwB"}
|
|
@@ -3,5 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
7
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/message/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}
|