@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.
Files changed (150) hide show
  1. package/.github/workflows/build-and-test.yml +3 -3
  2. package/LICENCE.md +21 -0
  3. package/README.md +8 -0
  4. package/eslint.config.mjs +59 -0
  5. package/lib/components/datamap/GDSDataMap.d.ts +5 -14
  6. package/lib/components/datamap/GDSDataMap.d.ts.map +1 -0
  7. package/lib/components/datamap/GDSDataMap.js +9 -29
  8. package/lib/components/datetime/GDSDatetimeComponent.d.ts +43 -22
  9. package/lib/components/datetime/GDSDatetimeComponent.d.ts.map +1 -0
  10. package/lib/components/datetime/GDSDatetimeComponent.js +167 -178
  11. package/lib/components/index.d.ts +3 -0
  12. package/lib/components/index.d.ts.map +1 -0
  13. package/lib/components/index.js +6 -4
  14. package/lib/components/select/GDSSelect.d.ts +143 -0
  15. package/lib/components/select/GDSSelect.d.ts.map +1 -0
  16. package/lib/components/select/GDSSelect.js +340 -0
  17. package/lib/components/selectboxes/GDSCheckBoxes.d.ts +5 -2
  18. package/lib/components/selectboxes/GDSCheckBoxes.d.ts.map +1 -0
  19. package/lib/components/selectboxes/GDSCheckBoxes.js +7 -33
  20. package/lib/components/time/GDSTimeComponent.d.ts +13 -10
  21. package/lib/components/time/GDSTimeComponent.d.ts.map +1 -0
  22. package/lib/components/time/GDSTimeComponent.js +59 -84
  23. package/lib/components/util/TimeHelper.d.ts +6 -4
  24. package/lib/components/util/TimeHelper.d.ts.map +1 -0
  25. package/lib/components/util/TimeHelper.js +13 -16
  26. package/lib/index.d.ts +4 -2
  27. package/lib/index.d.ts.map +1 -0
  28. package/lib/index.js +2 -2
  29. package/lib/templates/gds/button/index.d.ts +1 -0
  30. package/lib/templates/gds/button/index.d.ts.map +1 -0
  31. package/lib/templates/gds/button/index.js +1 -1
  32. package/lib/templates/gds/checkbox/index.d.ts +1 -0
  33. package/lib/templates/gds/checkbox/index.d.ts.map +1 -0
  34. package/lib/templates/gds/checkbox/index.js +1 -1
  35. package/lib/templates/gds/columns/index.d.ts +1 -0
  36. package/lib/templates/gds/columns/index.d.ts.map +1 -0
  37. package/lib/templates/gds/columns/index.js +1 -1
  38. package/lib/templates/gds/component/index.d.ts +1 -0
  39. package/lib/templates/gds/component/index.d.ts.map +1 -0
  40. package/lib/templates/gds/component/index.js +1 -1
  41. package/lib/templates/gds/container/index.d.ts +1 -0
  42. package/lib/templates/gds/container/index.d.ts.map +1 -0
  43. package/lib/templates/gds/container/index.js +1 -1
  44. package/lib/templates/gds/cssClasses.d.ts +1 -0
  45. package/lib/templates/gds/cssClasses.d.ts.map +1 -0
  46. package/lib/templates/gds/datagrid/form.ejs.js +2 -2
  47. package/lib/templates/gds/datagrid/index.d.ts +1 -0
  48. package/lib/templates/gds/datagrid/index.d.ts.map +1 -0
  49. package/lib/templates/gds/datagrid/index.js +1 -1
  50. package/lib/templates/gds/datamap/index.d.ts +1 -0
  51. package/lib/templates/gds/datamap/index.d.ts.map +1 -0
  52. package/lib/templates/gds/datamap/index.js +1 -1
  53. package/lib/templates/gds/datetime/index.d.ts +1 -0
  54. package/lib/templates/gds/datetime/index.d.ts.map +1 -0
  55. package/lib/templates/gds/datetime/index.js +1 -1
  56. package/lib/templates/gds/day/index.d.ts +1 -0
  57. package/lib/templates/gds/day/index.d.ts.map +1 -0
  58. package/lib/templates/gds/day/index.js +1 -1
  59. package/lib/templates/gds/editgrid/index.d.ts +1 -0
  60. package/lib/templates/gds/editgrid/index.d.ts.map +1 -0
  61. package/lib/templates/gds/editgrid/index.js +1 -1
  62. package/lib/templates/gds/field/index.d.ts +1 -0
  63. package/lib/templates/gds/field/index.d.ts.map +1 -0
  64. package/lib/templates/gds/field/index.js +1 -1
  65. package/lib/templates/gds/fieldset/index.d.ts +1 -0
  66. package/lib/templates/gds/fieldset/index.d.ts.map +1 -0
  67. package/lib/templates/gds/fieldset/index.js +1 -1
  68. package/lib/templates/gds/file/index.d.ts +1 -0
  69. package/lib/templates/gds/file/index.d.ts.map +1 -0
  70. package/lib/templates/gds/file/index.js +1 -1
  71. package/lib/templates/gds/iconClass.d.ts +2 -1
  72. package/lib/templates/gds/iconClass.d.ts.map +1 -0
  73. package/lib/templates/gds/iconClass.js +3 -3
  74. package/lib/templates/gds/index.d.ts +3 -2
  75. package/lib/templates/gds/index.d.ts.map +1 -0
  76. package/lib/templates/gds/index.js +72 -64
  77. package/lib/templates/gds/input/index.d.ts +1 -0
  78. package/lib/templates/gds/input/index.d.ts.map +1 -0
  79. package/lib/templates/gds/input/index.js +1 -1
  80. package/lib/templates/gds/label/index.d.ts +1 -0
  81. package/lib/templates/gds/label/index.d.ts.map +1 -0
  82. package/lib/templates/gds/label/index.js +1 -1
  83. package/lib/templates/gds/message/index.d.ts +1 -0
  84. package/lib/templates/gds/message/index.d.ts.map +1 -0
  85. package/lib/templates/gds/message/index.js +1 -1
  86. package/lib/templates/gds/panel/index.d.ts +1 -0
  87. package/lib/templates/gds/panel/index.d.ts.map +1 -0
  88. package/lib/templates/gds/panel/index.js +1 -1
  89. package/lib/templates/gds/radio/index.d.ts +1 -0
  90. package/lib/templates/gds/radio/index.d.ts.map +1 -0
  91. package/lib/templates/gds/radio/index.js +1 -1
  92. package/lib/templates/gds/select/index.d.ts +1 -0
  93. package/lib/templates/gds/select/index.d.ts.map +1 -0
  94. package/lib/templates/gds/select/index.js +1 -1
  95. package/lib/templates/gds/selectOption/index.d.ts +1 -0
  96. package/lib/templates/gds/selectOption/index.d.ts.map +1 -0
  97. package/lib/templates/gds/selectOption/index.js +1 -1
  98. package/lib/templates/gds/selectboxes/index.d.ts +1 -0
  99. package/lib/templates/gds/selectboxes/index.d.ts.map +1 -0
  100. package/lib/templates/gds/selectboxes/index.js +1 -1
  101. package/lib/templates/gds/survey/index.d.ts +1 -0
  102. package/lib/templates/gds/survey/index.d.ts.map +1 -0
  103. package/lib/templates/gds/survey/index.js +1 -1
  104. package/lib/templates/gds/tab/index.d.ts +1 -0
  105. package/lib/templates/gds/tab/index.d.ts.map +1 -0
  106. package/lib/templates/gds/tab/index.js +1 -1
  107. package/lib/templates/gds/table/index.d.ts +1 -0
  108. package/lib/templates/gds/table/index.d.ts.map +1 -0
  109. package/lib/templates/gds/table/index.js +1 -1
  110. package/lib/templates/gds/template.css +27 -0
  111. package/lib/templates/gds/template.css.map +1 -1
  112. package/lib/templates/gds/time/index.d.ts +1 -0
  113. package/lib/templates/gds/time/index.d.ts.map +1 -0
  114. package/lib/templates/gds/time/index.js +1 -1
  115. package/lib/templates/gds/warning/index.d.ts +1 -0
  116. package/lib/templates/gds/warning/index.d.ts.map +1 -0
  117. package/lib/templates/gds/warning/index.js +1 -1
  118. package/lib/templates/gds/wizard/index.d.ts +1 -0
  119. package/lib/templates/gds/wizard/index.d.ts.map +1 -0
  120. package/lib/templates/gds/wizard/index.js +1 -1
  121. package/lib/templates/gds/wizardHeader/index.d.ts +1 -0
  122. package/lib/templates/gds/wizardHeader/index.d.ts.map +1 -0
  123. package/lib/templates/gds/wizardHeader/index.js +1 -1
  124. package/lib/templates/gds/wizardNav/index.d.ts +1 -0
  125. package/lib/templates/gds/wizardNav/index.d.ts.map +1 -0
  126. package/lib/templates/gds/wizardNav/index.js +1 -1
  127. package/lib/templates/index.d.ts +3 -2
  128. package/lib/templates/index.d.ts.map +1 -0
  129. package/lib/templates/index.js +1 -1
  130. package/lib/types.d.ts +37 -0
  131. package/lib/types.d.ts.map +1 -0
  132. package/lib/types.js +2 -0
  133. package/package.json +14 -7
  134. package/src/components/datamap/GDSDataMap.ts +5 -14
  135. package/src/components/datetime/GDSDatetimeComponent.ts +128 -91
  136. package/src/components/index.ts +2 -0
  137. package/src/components/select/GDSSelect.spec.ts +538 -0
  138. package/src/components/select/GDSSelect.ts +418 -0
  139. package/src/components/selectboxes/GDSCheckBoxes.ts +7 -8
  140. package/src/components/time/GDSTimeComponent.ts +37 -27
  141. package/src/components/util/TimeHelper.ts +6 -5
  142. package/src/css.d.ts +4 -0
  143. package/src/templates/gds/datagrid/form.ejs +1 -2
  144. package/src/templates/gds/iconClass.ts +1 -1
  145. package/src/templates/gds/index.ts +43 -33
  146. package/src/templates/gds/template.scss +48 -1
  147. package/src/types.ts +56 -0
  148. package/tsconfig.json +21 -5
  149. package/webpack.config.js +1 -1
  150. package/tslint.json +0 -22
@@ -1,14 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var TimeHelper = /** @class */ (function () {
4
- function TimeHelper() {
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
- var minuteAsNumber = parseInt(element.value, 10);
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
- TimeHelper.prototype.checkAndValidateHour = function (element) {
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
- var hourAsNumber = parseInt(element.value, 10);
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
- TimeHelper.prototype.preventNonNumericKeyPress = function (evt) {
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
- TimeHelper.prototype.validateDateInput = function (element, length) {
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
- TimeHelper.MAX_LENGTH = 2;
45
- return TimeHelper;
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: any, text: any): any;
5
+ transform(type: string, text: string): string;
6
6
  defaultIconset: string;
7
- iconClass: (iconset: any, name: any, spinning: any) => string;
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
- var components_1 = __importDefault(require("./components"));
7
- var templates_1 = __importDefault(require("./templates"));
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,
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -12,3 +12,4 @@ declare const _default: {
12
12
  'formio-day-component-minute': string;
13
13
  };
14
14
  export default _default;
15
+ //# sourceMappingURL=cssClasses.d.ts.map
@@ -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\n';
102
+ __p += '\n</div>\n';
103
103
  return __p
104
104
  }
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -1,2 +1,3 @@
1
- declare const _default: (iconset: any, name: any, spinning: any) => string;
1
+ declare const _default: (iconset: string, name: string, spinning: boolean) => string;
2
2
  export default _default;
3
+ //# sourceMappingURL=iconClass.d.ts.map
@@ -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 = (function (iconset, name, spinning) {
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 ? "".concat(iconset, " ").concat(iconset, "-").concat(name, " ").concat(iconset, "-spin") : "".concat(iconset, " ").concat(iconset, "-").concat(name);
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: any, text: any): any;
3
+ transform(type: string, text: string): string;
4
4
  defaultIconset: string;
5
- iconClass: (iconset: any, name: any, spinning: any) => string;
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
- var button_1 = __importDefault(require("./button"));
7
- var checkbox_1 = __importDefault(require("./checkbox"));
8
- var columns_1 = __importDefault(require("./columns"));
9
- var component_1 = __importDefault(require("./component"));
10
- var container_1 = __importDefault(require("./container"));
11
- var cssClasses_1 = __importDefault(require("./cssClasses"));
12
- var datagrid_1 = __importDefault(require("./datagrid"));
13
- var datamap_1 = __importDefault(require("./datamap"));
14
- var datetime_1 = __importDefault(require("./datetime"));
15
- var day_1 = __importDefault(require("./day"));
16
- var editgrid_1 = __importDefault(require("./editgrid"));
17
- var field_1 = __importDefault(require("./field"));
18
- var file_1 = __importDefault(require("./file"));
19
- var fieldset_1 = __importDefault(require("./fieldset"));
20
- var iconClass_1 = __importDefault(require("./iconClass"));
21
- var input_1 = __importDefault(require("./input"));
22
- var label_1 = __importDefault(require("./label"));
23
- var message_1 = __importDefault(require("./message"));
24
- var panel_1 = __importDefault(require("./panel"));
25
- var radio_1 = __importDefault(require("./radio"));
26
- var select_1 = __importDefault(require("./select"));
27
- var selectboxes_1 = __importDefault(require("./selectboxes"));
28
- var selectOption_1 = __importDefault(require("./selectOption"));
29
- var survey_1 = __importDefault(require("./survey"));
30
- var tab_1 = __importDefault(require("./tab"));
31
- var table_1 = __importDefault(require("./table"));
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
- var time_1 = __importDefault(require("./time"));
34
- var warning_1 = __importDefault(require("./warning"));
35
- var wizard_1 = __importDefault(require("./wizard"));
36
- var wizardHeader_1 = __importDefault(require("./wizardHeader"));
37
- var wizardNav_1 = __importDefault(require("./wizardNav"));
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: function (type, text) {
44
+ transform(type, text) {
40
45
  if (!text) {
41
46
  return text;
42
47
  }
43
48
  if (type === 'class') {
44
- return this.cssClasses.hasOwnProperty(text.toString()) ? this.cssClasses[text.toString()] : text;
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
  };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var form_ejs_1 = __importDefault(require("./form.ejs"));
6
+ const form_ejs_1 = __importDefault(require("./form.ejs"));
7
7
  exports.default = { form: form_ejs_1.default };
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  form: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/gds/message/index.ts"],"names":[],"mappings":";;;AAEA,wBAAwB"}