@defra/forms-model 3.0.11 → 3.0.13

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 (134) hide show
  1. package/dist/module/components/types.js.map +1 -1
  2. package/dist/module/conditions/condition-group.js.map +1 -1
  3. package/dist/module/conditions/condition-model.js +2 -2
  4. package/dist/module/conditions/condition-model.js.map +1 -1
  5. package/dist/module/conditions/condition-operators.js.map +1 -1
  6. package/dist/module/conditions/condition-ref.js.map +1 -1
  7. package/dist/module/conditions/condition.js +1 -1
  8. package/dist/module/conditions/condition.js.map +1 -1
  9. package/dist/module/conditions/types.js.map +1 -1
  10. package/dist/module/data-model/types.js.map +1 -1
  11. package/dist/module/migration/migration.1-2.js +2 -2
  12. package/dist/module/migration/migration.1-2.js.map +1 -1
  13. package/dist/module/migration/whichMigrations.js +0 -1
  14. package/dist/module/migration/whichMigrations.js.map +1 -1
  15. package/dist/module/schema/schema.js +1 -1
  16. package/dist/module/schema/schema.js.map +1 -1
  17. package/dist/module/utils/helpers.js.map +1 -1
  18. package/dist/types/components/types.d.ts +4 -4
  19. package/dist/types/components/types.d.ts.map +1 -1
  20. package/dist/types/conditions/condition-group-def.d.ts +1 -1
  21. package/dist/types/conditions/condition-group.d.ts +1 -1
  22. package/dist/types/conditions/condition-group.d.ts.map +1 -1
  23. package/dist/types/conditions/condition-model.d.ts +3 -3
  24. package/dist/types/conditions/condition-model.d.ts.map +1 -1
  25. package/dist/types/conditions/condition-operators.d.ts +1 -1
  26. package/dist/types/conditions/condition-operators.d.ts.map +1 -1
  27. package/dist/types/conditions/condition-ref.d.ts +1 -1
  28. package/dist/types/conditions/condition-ref.d.ts.map +1 -1
  29. package/dist/types/conditions/condition.d.ts +3 -3
  30. package/dist/types/conditions/condition.d.ts.map +1 -1
  31. package/dist/types/conditions/types.d.ts +6 -6
  32. package/dist/types/conditions/types.d.ts.map +1 -1
  33. package/dist/types/data-model/types.d.ts +28 -30
  34. package/dist/types/data-model/types.d.ts.map +1 -1
  35. package/dist/types/migration/migration.1-2.d.ts.map +1 -1
  36. package/dist/types/migration/whichMigrations.d.ts +0 -1
  37. package/dist/types/migration/whichMigrations.d.ts.map +1 -1
  38. package/dist/types/schema/schema.d.ts +1 -1
  39. package/dist/types/schema/schema.d.ts.map +1 -1
  40. package/dist/types/utils/helpers.d.ts +1 -3
  41. package/dist/types/utils/helpers.d.ts.map +1 -1
  42. package/package.json +2 -4
  43. package/src/components/types.ts +2 -2
  44. package/src/conditions/condition-group.ts +1 -1
  45. package/src/conditions/condition-model.ts +21 -22
  46. package/src/conditions/condition-operators.ts +1 -1
  47. package/src/conditions/condition-ref.ts +1 -1
  48. package/src/conditions/condition.ts +5 -5
  49. package/src/conditions/types.ts +4 -4
  50. package/src/data-model/types.ts +15 -17
  51. package/src/migration/migration.1-2.ts +6 -6
  52. package/src/migration/whichMigrations.ts +0 -1
  53. package/src/schema/schema.ts +1 -1
  54. package/src/utils/helpers.ts +1 -1
  55. package/dist/browser/components/component-types.js +0 -202
  56. package/dist/browser/components/component-types.js.map +0 -1
  57. package/dist/browser/components/conditional-component-types.js +0 -10
  58. package/dist/browser/components/conditional-component-types.js.map +0 -1
  59. package/dist/browser/components/enums.js +0 -28
  60. package/dist/browser/components/enums.js.map +0 -1
  61. package/dist/browser/components/index.js +0 -4
  62. package/dist/browser/components/index.js.map +0 -1
  63. package/dist/browser/components/types.js +0 -2
  64. package/dist/browser/components/types.js.map +0 -1
  65. package/dist/browser/conditions/condition-abstract.js +0 -44
  66. package/dist/browser/conditions/condition-abstract.js.map +0 -1
  67. package/dist/browser/conditions/condition-field.js +0 -27
  68. package/dist/browser/conditions/condition-field.js.map +0 -1
  69. package/dist/browser/conditions/condition-group-def.js +0 -26
  70. package/dist/browser/conditions/condition-group-def.js.map +0 -1
  71. package/dist/browser/conditions/condition-group.js +0 -46
  72. package/dist/browser/conditions/condition-group.js.map +0 -1
  73. package/dist/browser/conditions/condition-model.js +0 -203
  74. package/dist/browser/conditions/condition-model.js.map +0 -1
  75. package/dist/browser/conditions/condition-operators.js +0 -111
  76. package/dist/browser/conditions/condition-operators.js.map +0 -1
  77. package/dist/browser/conditions/condition-ref.js +0 -33
  78. package/dist/browser/conditions/condition-ref.js.map +0 -1
  79. package/dist/browser/conditions/condition-value-abstract.js +0 -23
  80. package/dist/browser/conditions/condition-value-abstract.js.map +0 -1
  81. package/dist/browser/conditions/condition-value-registration.js +0 -18
  82. package/dist/browser/conditions/condition-value-registration.js.map +0 -1
  83. package/dist/browser/conditions/condition-values.js +0 -107
  84. package/dist/browser/conditions/condition-values.js.map +0 -1
  85. package/dist/browser/conditions/condition.js +0 -41
  86. package/dist/browser/conditions/condition.js.map +0 -1
  87. package/dist/browser/conditions/enums.js +0 -6
  88. package/dist/browser/conditions/enums.js.map +0 -1
  89. package/dist/browser/conditions/helpers.js +0 -7
  90. package/dist/browser/conditions/helpers.js.map +0 -1
  91. package/dist/browser/conditions/index.js +0 -11
  92. package/dist/browser/conditions/index.js.map +0 -1
  93. package/dist/browser/conditions/inline-condition-model.js +0 -396
  94. package/dist/browser/conditions/inline-condition-model.js.map +0 -1
  95. package/dist/browser/conditions/inline-condition-operators.js +0 -111
  96. package/dist/browser/conditions/inline-condition-operators.js.map +0 -1
  97. package/dist/browser/conditions/inline-condition-values.js +0 -137
  98. package/dist/browser/conditions/inline-condition-values.js.map +0 -1
  99. package/dist/browser/conditions/types.js +0 -2
  100. package/dist/browser/conditions/types.js.map +0 -1
  101. package/dist/browser/data-model/conditions-wrapper.js +0 -31
  102. package/dist/browser/data-model/conditions-wrapper.js.map +0 -1
  103. package/dist/browser/data-model/enums.js +0 -7
  104. package/dist/browser/data-model/enums.js.map +0 -1
  105. package/dist/browser/data-model/index.js +0 -4
  106. package/dist/browser/data-model/index.js.map +0 -1
  107. package/dist/browser/data-model/input-wrapper.js +0 -31
  108. package/dist/browser/data-model/input-wrapper.js.map +0 -1
  109. package/dist/browser/data-model/types.js +0 -9
  110. package/dist/browser/data-model/types.js.map +0 -1
  111. package/dist/browser/form/form-configuration.js +0 -19
  112. package/dist/browser/form/form-configuration.js.map +0 -1
  113. package/dist/browser/form/index.js +0 -2
  114. package/dist/browser/form/index.js.map +0 -1
  115. package/dist/browser/index.js +0 -9
  116. package/dist/browser/index.js.map +0 -1
  117. package/dist/browser/migration/index.js +0 -2
  118. package/dist/browser/migration/index.js.map +0 -1
  119. package/dist/browser/migration/migration.0-2.js +0 -47
  120. package/dist/browser/migration/migration.0-2.js.map +0 -1
  121. package/dist/browser/migration/migration.1-2.js +0 -92
  122. package/dist/browser/migration/migration.1-2.js.map +0 -1
  123. package/dist/browser/migration/types.js +0 -2
  124. package/dist/browser/migration/types.js.map +0 -1
  125. package/dist/browser/migration/whichMigrations.js +0 -22
  126. package/dist/browser/migration/whichMigrations.js.map +0 -1
  127. package/dist/browser/schema/index.js +0 -2
  128. package/dist/browser/schema/index.js.map +0 -1
  129. package/dist/browser/schema/schema.js +0 -237
  130. package/dist/browser/schema/schema.js.map +0 -1
  131. package/dist/browser/utils/helpers.js +0 -27
  132. package/dist/browser/utils/helpers.js.map +0 -1
  133. package/dist/browser/utils/logger.js +0 -27
  134. package/dist/browser/utils/logger.js.map +0 -1
@@ -1,92 +0,0 @@
1
- const _excluded = ["values"];
2
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
3
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
8
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
- import { nanoid } from "../utils/helpers.js";
10
-
11
- /**
12
- * @private
13
- * StaticItem is a deprecated Type.
14
- * It should only be used for aiding migration scripts.
15
- */
16
-
17
- /**
18
- * @private
19
- * StaticComponentValues is a deprecated Type.
20
- * It should only be used for aiding migration scripts.
21
- */
22
-
23
- function recastItem({
24
- label,
25
- value,
26
- condition,
27
- hint
28
- }) {
29
- const item = {
30
- title: label,
31
- value
32
- };
33
- condition && (item.conditions = condition);
34
- hint && (item.hint = hint);
35
- return item;
36
- }
37
- function addListId(component) {
38
- if (!component.values) {
39
- return component;
40
- }
41
- const {
42
- values
43
- } = component;
44
- return _objectSpread(_objectSpread({}, component), {}, {
45
- list: values.type === 'listRef' ? values.list : nanoid()
46
- });
47
- }
48
- function migratePage(page) {
49
- return _objectSpread(_objectSpread({}, page), {}, {
50
- components: page.components.map(addListId)
51
- });
52
- }
53
- function removeValues(page) {
54
- return _objectSpread(_objectSpread({}, page), {}, {
55
- components: page.components.map(component => {
56
- const {
57
- values
58
- } = component,
59
- rest = _objectWithoutProperties(component, _excluded);
60
- return _objectSpread({}, rest);
61
- })
62
- });
63
- }
64
- function needsUpgrade(data) {
65
- return !!data.pages.flatMap(page => page.components).find(component => component.values);
66
- }
67
- export function migrate(data) {
68
- var _data$lists;
69
- if (!needsUpgrade(data)) {
70
- return _objectSpread(_objectSpread({}, data), {}, {
71
- version: 2
72
- });
73
- }
74
- const pages = data.pages.map(migratePage);
75
- const componentsWithList = pages.flatMap(page => page.components.filter(c => {
76
- var _c$values;
77
- return (_c$values = c.values) === null || _c$values === void 0 ? void 0 : _c$values.items;
78
- }));
79
- const valuesAsLists = componentsWithList.map(component => {
80
- return {
81
- title: component.title,
82
- name: component.list,
83
- items: component.values.items.map(item => recastItem(item))
84
- };
85
- });
86
- return _objectSpread(_objectSpread({}, data), {}, {
87
- pages: pages.map(removeValues),
88
- lists: [...((_data$lists = data.lists) !== null && _data$lists !== void 0 ? _data$lists : []), ...valuesAsLists],
89
- version: 2
90
- });
91
- }
92
- //# sourceMappingURL=migration.1-2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migration.1-2.js","names":["nanoid","recastItem","label","value","condition","hint","item","title","conditions","addListId","component","values","_objectSpread","list","type","migratePage","page","components","map","removeValues","rest","_objectWithoutProperties","_excluded","needsUpgrade","data","pages","flatMap","find","migrate","_data$lists","version","componentsWithList","filter","c","_c$values","items","valuesAsLists","name","lists"],"sources":["../../../src/migration/migration.1-2.ts"],"sourcesContent":["import { nanoid } from '~/src/utils/helpers.js'\nimport { type MigrationScript } from '~/src/migration/types.js'\n\n/**\n * @private\n * StaticItem is a deprecated Type.\n * It should only be used for aiding migration scripts.\n */\ntype StaticItem = {\n label: string\n value: string | number | boolean\n hint?: string\n condition?: string\n}\n\n/**\n * @private\n * StaticComponentValues is a deprecated Type.\n * It should only be used for aiding migration scripts.\n */\ntype StaticComponentValues = {\n list: any\n type: 'static' | 'listRef'\n valueType: string | number\n items: StaticItem[]\n}\n\ntype Item = {\n title: string\n value: any\n conditions?: any\n hint?: string\n}\n\nfunction recastItem({ label, value, condition, hint }: StaticItem) {\n const item: Item = {\n title: label,\n value\n }\n\n condition && (item.conditions = condition)\n hint && (item.hint = hint)\n return item\n}\n\nfunction addListId(component: { values: StaticComponentValues }) {\n if (!component.values) {\n return component\n }\n const { values } = component\n return {\n ...component,\n list: values.type === 'listRef' ? values.list : nanoid()\n }\n}\n\nfunction migratePage(page) {\n return {\n ...page,\n components: page.components.map(addListId)\n }\n}\n\nfunction removeValues(page) {\n return {\n ...page,\n components: page.components.map((component) => {\n const { values, ...rest } = component\n return {\n ...rest\n }\n })\n }\n}\n\nfunction needsUpgrade(data) {\n return !!data.pages\n .flatMap((page) => page.components)\n .find((component) => component.values)\n}\n\nexport function migrate(data): MigrationScript {\n if (!needsUpgrade(data)) {\n return { ...data, version: 2 }\n }\n const pages = data.pages.map(migratePage)\n const componentsWithList = pages.flatMap((page) =>\n page.components.filter((c) => c.values?.items)\n )\n\n const valuesAsLists = componentsWithList.map((component) => {\n return {\n title: component.title,\n name: component.list,\n items: component.values.items.map((item) => recastItem(item))\n }\n })\n\n return {\n ...data,\n pages: pages.map(removeValues),\n lists: [...(data.lists ?? []), ...valuesAsLists],\n version: 2\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAASA,MAAM;;AAGf;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;;AAeA,SAASC,UAAUA,CAAC;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC;AAAiB,CAAC,EAAE;EACjE,MAAMC,IAAU,GAAG;IACjBC,KAAK,EAAEL,KAAK;IACZC;EACF,CAAC;EAEDC,SAAS,KAAKE,IAAI,CAACE,UAAU,GAAGJ,SAAS,CAAC;EAC1CC,IAAI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AC9B;EACA,MAAML,KAAK,GAAGD,IAAI,CAACC,KAAK,CAACP,GAAG,CAACH,WAAW,CAAC;EACzC,MAAMgB,kBAAkB,GAAGN,KAAK,CAACC,OAAO,CAAEV,IAAI,IAC5CA,IAAI,CAACC,UAAU,CAACe,MAAM,CAAEC,CAAC;IAAA,IAAAC,SAAA;IAAA,QAAAA,SAAA,GAAKD,CAAC,CAACtB,MAAM,cAAAuB,SAAA,uBAARA,SAAA,CAAUC,KAAK;EAAA,EAC/C,CAAC;EAED,MAAMC,aAAa,GAAGL,kBAAkB,CAACb,GAAG,CAAER,SAAS,IAAK;IAC1D,OAAO;MACLH,KAAK,EAAEG,SAAS,CAACH,KAAK;MACtB8B,IAAI,EAAE3B,SAAS,CAACG,IAAI;MACpBsB,KAAK,EAAEzB,SAAS,CAACC,MAAM,CAACwB,KAAK,CAACjB,GAAG,CAAEZ,IAAI,IAAKL,UAAU,CAACK,IAAI,CAAC;IAC9D,CAAC;EACH,CAAC,CAAC;EAEF,OAAAM,aAAA,CAAAA,aAAA,KACKY,IAAI;IACPC,KAAK,EAAEA,KAAK,CAACP,GAAG,CAACC,YAAY,CAAC;IAC9BmB,KAAK,EAAE,CAAC,KAAAT,WAAA,GAAIL,IAAI,CAACc,KAAK,cAAAT,WAAA,cAAAA,WAAA,GAAI,EAAE,CAAC,EAAE,GAAGO,aAAa,CAAC;IAChDN,OAAO,EAAE;EAAC;AAEd"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/migration/types.ts"],"sourcesContent":["export type MigrationScript = (data: Object) => Object\n"],"mappings":""}
@@ -1,22 +0,0 @@
1
- import { migrate as V0_TO_V2 } from "./migration.0-2.js";
2
- import { migrate as V1_TO_V2 } from "./migration.1-2.js";
3
- /**
4
- * Returns which migrations that should be run against your Object with the given version
5
- * @param version
6
- */
7
- export function whichMigrations(version) {
8
- const migrations = new Set();
9
- switch (version) {
10
- case 0:
11
- migrations.add(V0_TO_V2);
12
- /**
13
- * we are skipping v1 entirely. If we weren't you would do migrations.add([V1_TO_V2, V2_TO_V3]) for example.
14
- */
15
- break;
16
- case 1:
17
- migrations.add(V1_TO_V2);
18
- break;
19
- }
20
- return migrations;
21
- }
22
- //# sourceMappingURL=whichMigrations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"whichMigrations.js","names":["migrate","V0_TO_V2","V1_TO_V2","whichMigrations","version","migrations","Set","add"],"sources":["../../../src/migration/whichMigrations.ts"],"sourcesContent":["import { migrate as V0_TO_V2 } from '~/src/migration/migration.0-2.js'\nimport { migrate as V1_TO_V2 } from '~/src/migration/migration.1-2.js'\nimport { type MigrationScript } from '~/src/migration/types.js'\n\n/**\n * Returns which migrations that should be run against your Object with the given version\n * @param version\n */\nexport function whichMigrations(version: number) {\n const migrations = new Set<MigrationScript>()\n switch (version) {\n case 0:\n migrations.add(V0_TO_V2)\n /**\n * we are skipping v1 entirely. If we weren't you would do migrations.add([V1_TO_V2, V2_TO_V3]) for example.\n */\n break\n case 1:\n migrations.add(V1_TO_V2)\n break\n }\n return migrations\n}\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,QAAQ;AAC5B,SAASD,OAAO,IAAIE,QAAQ;AAG5B;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAACC,OAAe,EAAE;EAC/C,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAkB,CAAC;EAC7C,QAAQF,OAAO;IACb,KAAK,CAAC;MACJC,UAAU,CAACE,GAAG,CAACN,QAAQ,CAAC;MACxB;AACN;AACA;MACM;IACF,KAAK,CAAC;MACJI,UAAU,CAACE,GAAG,CAACL,QAAQ,CAAC;MACxB;EACJ;EACA,OAAOG,UAAU;AACnB"}
@@ -1,2 +0,0 @@
1
- export { Schema, componentSchema } from "./schema.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["Schema","componentSchema"],"sources":["../../../src/schema/index.ts"],"sourcesContent":["export { Schema, componentSchema } from '~/src/schema/schema.js'\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,eAAe"}
@@ -1,237 +0,0 @@
1
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
- import joi from 'joi';
7
-
8
- /**
9
- * If an optional key is added, CURRENT_VERSION does not need to be incremented.
10
- * Only breaking changes will require an increment, as well as a migration script.
11
- */
12
- export const CURRENT_VERSION = 2;
13
- const sectionsSchema = joi.object().keys({
14
- name: joi.string().required(),
15
- title: joi.string().required(),
16
- hideTitle: joi.boolean().default(false)
17
- });
18
- const conditionFieldSchema = joi.object().keys({
19
- name: joi.string().required(),
20
- type: joi.string().required(),
21
- display: joi.string().required()
22
- });
23
- const conditionValueSchema = joi.object().keys({
24
- type: joi.string().required(),
25
- value: joi.string().required(),
26
- display: joi.string().required()
27
- });
28
- const relativeTimeValueSchema = joi.object().keys({
29
- type: joi.string().required(),
30
- timePeriod: joi.string().required(),
31
- timeUnit: joi.string().required(),
32
- direction: joi.string().required(),
33
- timeOnly: joi.boolean().required()
34
- });
35
- const conditionRefSchema = joi.object().keys({
36
- conditionName: joi.string().required(),
37
- conditionDisplayName: joi.string().required(),
38
- coordinator: joi.string().optional()
39
- });
40
- const conditionSchema = joi.object().keys({
41
- field: conditionFieldSchema,
42
- operator: joi.string().required(),
43
- value: joi.alternatives().try(conditionValueSchema, relativeTimeValueSchema),
44
- coordinator: joi.string().optional()
45
- });
46
- const conditionGroupSchema = joi.object().keys({
47
- conditions: joi.array().items(joi.alternatives().try(conditionSchema, conditionRefSchema, joi.any() /** Should be a joi.link('#conditionGroupSchema') */))
48
- });
49
- const conditionsModelSchema = joi.object().keys({
50
- name: joi.string().required(),
51
- conditions: joi.array().items(joi.alternatives().try(conditionSchema, conditionRefSchema, conditionGroupSchema))
52
- });
53
- const conditionsSchema = joi.object().keys({
54
- name: joi.string().required(),
55
- displayName: joi.string(),
56
- value: joi.alternatives().try(joi.string(), conditionsModelSchema).required()
57
- });
58
- const localisedString = joi.alternatives().try(joi.object({
59
- a: joi.any()
60
- }).unknown(), joi.string().allow(''));
61
- export const componentSchema = joi.object().keys({
62
- type: joi.string().required(),
63
- name: joi.string(),
64
- title: localisedString,
65
- hint: localisedString.optional(),
66
- options: joi.object().default({}),
67
- schema: joi.object({
68
- min: joi.number(),
69
- max: joi.number()
70
- }).unknown(true).default({}),
71
- list: joi.string().optional()
72
- }).unknown(true);
73
- const nextSchema = joi.object().keys({
74
- path: joi.string().required(),
75
- condition: joi.string().allow('').optional(),
76
- redirect: joi.string().uri().optional()
77
- });
78
-
79
- /**
80
- * `/status` is a special route for providing a user's application status.
81
- * It should not be configured via the designer.
82
- */
83
- const pageSchema = joi.object().keys({
84
- path: joi.string().required().disallow('/status'),
85
- title: localisedString,
86
- section: joi.string(),
87
- controller: joi.string(),
88
- components: joi.array().items(componentSchema),
89
- next: joi.array().items(nextSchema),
90
- repeatField: joi.string().optional(),
91
- options: joi.object().optional(),
92
- backLinkFallback: joi.string().optional()
93
- });
94
- const toggleableString = joi.alternatives().try(joi.boolean(), joi.string());
95
- const confirmationPageSchema = joi.object({
96
- customText: joi.object({
97
- title: joi.string().default('Application complete'),
98
- paymentSkipped: toggleableString.default('Someone will be in touch to make a payment.'),
99
- nextSteps: toggleableString.default('You will receive an email with details with the next steps.')
100
- }).default(),
101
- components: joi.array().items(componentSchema)
102
- });
103
- const paymentSkippedWarningPage = joi.object({
104
- customText: joi.object({
105
- title: joi.string().default('Pay for your application').optional(),
106
- caption: joi.string().default('Payment').optional(),
107
- body: joi.string().default('').optional()
108
- })
109
- });
110
- const specialPagesSchema = joi.object().keys({
111
- confirmationPage: confirmationPageSchema.optional(),
112
- paymentSkippedWarningPage: paymentSkippedWarningPage.optional()
113
- });
114
- const listItemSchema = joi.object().keys({
115
- text: localisedString,
116
- value: joi.alternatives().try(joi.number(), joi.string()),
117
- description: localisedString.optional(),
118
- conditional: joi.object().keys({
119
- components: joi.array().required().items(componentSchema.unknown(true)).unique('name')
120
- }).allow(null).optional(),
121
- condition: joi.string().allow(null, '').optional()
122
- });
123
- const listSchema = joi.object().keys({
124
- name: joi.string().required(),
125
- title: localisedString,
126
- type: joi.string().required().valid('string', 'number'),
127
- items: joi.array().items(listItemSchema)
128
- });
129
- const feeSchema = joi.object().keys({
130
- description: joi.string().required(),
131
- amount: joi.number().required(),
132
- multiplier: joi.string().optional(),
133
- condition: joi.string().optional(),
134
- prefix: joi.string().optional()
135
- });
136
- const multiApiKeySchema = joi.object({
137
- test: joi.string().optional(),
138
- production: joi.string().optional()
139
- });
140
- const replyToConfigurationSchema = joi.object({
141
- emailReplyToId: joi.string(),
142
- condition: joi.string().allow('').optional()
143
- });
144
- const notifySchema = joi.object().keys({
145
- apiKey: [joi.string().allow('').optional(), multiApiKeySchema],
146
- templateId: joi.string(),
147
- emailField: joi.string(),
148
- personalisation: joi.array().items(joi.string()),
149
- personalisationFieldCustomisation: joi.object().pattern(/./, joi.array().items(joi.string())).optional(),
150
- addReferencesToPersonalisation: joi.boolean().optional(),
151
- emailReplyToIdConfiguration: joi.array().items(replyToConfigurationSchema)
152
- });
153
- const emailSchema = joi.object().keys({
154
- emailAddress: joi.string()
155
- });
156
- const webhookSchema = joi.object().keys({
157
- url: joi.string(),
158
- allowRetry: joi.boolean().default(true)
159
- });
160
- const outputSchema = joi.object().keys({
161
- name: joi.string(),
162
- title: joi.string().optional(),
163
- type: joi.string().allow('notify', 'email', 'webhook', 'sheets'),
164
- outputConfiguration: joi.alternatives().try(notifySchema, emailSchema, webhookSchema)
165
- });
166
- const feedbackSchema = joi.object().keys({
167
- feedbackForm: joi.boolean().default(false),
168
- url: joi.when('feedbackForm', {
169
- is: joi.boolean().valid(false),
170
- then: joi.string().optional().allow('')
171
- }),
172
- emailAddress: joi.string().email({
173
- tlds: {
174
- allow: false
175
- }
176
- }).optional()
177
- });
178
- const phaseBannerSchema = joi.object().keys({
179
- phase: joi.string().valid('alpha', 'beta')
180
- });
181
- const feeOptionSchema = joi.object().keys({
182
- payApiKey: [joi.string().allow('').optional(), multiApiKeySchema],
183
- paymentReferenceFormat: [joi.string().optional()],
184
- payReturnUrl: joi.string().optional(),
185
- allowSubmissionWithoutPayment: joi.boolean().optional().default(true),
186
- maxAttempts: joi.number().optional().default(3),
187
- customPayErrorMessage: joi.string().optional(),
188
- showPaymentSkippedWarningPage: joi.when('allowSubmissionWithoutPayment', {
189
- is: true,
190
- then: joi.boolean().valid(true, false).default(false),
191
- otherwise: joi.boolean().valid(false).default(false)
192
- })
193
- }).default(({
194
- payApiKey,
195
- paymentReferenceFormat
196
- }) => {
197
- return _objectSpread(_objectSpread({}, payApiKey && {
198
- payApiKey
199
- }), paymentReferenceFormat && {
200
- paymentReferenceFormat
201
- });
202
- });
203
- export const Schema = joi.object().required().keys({
204
- name: localisedString.optional(),
205
- feedback: feedbackSchema,
206
- startPage: joi.string().required(),
207
- pages: joi.array().required().items(pageSchema).unique('path'),
208
- sections: joi.array().items(sectionsSchema).unique('name').required(),
209
- conditions: joi.array().items(conditionsSchema).unique('name'),
210
- lists: joi.array().items(listSchema).unique('name'),
211
- fees: joi.array().items(feeSchema).optional(),
212
- paymentReferenceFormat: joi.string().optional(),
213
- metadata: joi.object({
214
- a: joi.any()
215
- }).unknown().optional(),
216
- declaration: joi.string().allow('').optional(),
217
- outputs: joi.array().items(outputSchema),
218
- payApiKey: [joi.string().allow('').optional(), multiApiKeySchema],
219
- skipSummary: joi.boolean().default(false),
220
- version: joi.number().default(CURRENT_VERSION),
221
- phaseBanner: phaseBannerSchema,
222
- specialPages: specialPagesSchema.optional(),
223
- feeOptions: feeOptionSchema
224
- });
225
-
226
- /**
227
- * Schema versions:
228
- * Undefined / 0 - initial version as at 28/8/20. Conditions may be in object structure or string form.
229
- * 1 - Relevant components (radio, checkbox, select, autocomplete) now contain
230
- * options as 'values' rather than referencing a data list
231
- * 2 - Reverse v1. Values populating radio, checkboxes, select, autocomplete are defined in Lists only.
232
- * TODO:- merge fees and paymentReferenceFormat
233
- * 2 - 2023-05-04 `feeOptions` has been introduced. paymentReferenceFormat and payApiKey can be configured in top level or feeOptions. feeOptions will take precedent.
234
- * if feeOptions are empty, it will pull values from the top level keys.
235
- * WARN: Fee/GOV.UK pay configurations (apart from fees) should no longer be stored in the top level, always within feeOptions.
236
- **/
237
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","names":["joi","CURRENT_VERSION","sectionsSchema","object","keys","name","string","required","title","hideTitle","boolean","default","conditionFieldSchema","type","display","conditionValueSchema","value","relativeTimeValueSchema","timePeriod","timeUnit","direction","timeOnly","conditionRefSchema","conditionName","conditionDisplayName","coordinator","optional","conditionSchema","field","operator","alternatives","try","conditionGroupSchema","conditions","array","items","any","conditionsModelSchema","conditionsSchema","displayName","localisedString","a","unknown","allow","componentSchema","hint","options","schema","min","number","max","list","nextSchema","path","condition","redirect","uri","pageSchema","disallow","section","controller","components","next","repeatField","backLinkFallback","toggleableString","confirmationPageSchema","customText","paymentSkipped","nextSteps","paymentSkippedWarningPage","caption","body","specialPagesSchema","confirmationPage","listItemSchema","text","description","conditional","unique","listSchema","valid","feeSchema","amount","multiplier","prefix","multiApiKeySchema","test","production","replyToConfigurationSchema","emailReplyToId","notifySchema","apiKey","templateId","emailField","personalisation","personalisationFieldCustomisation","pattern","addReferencesToPersonalisation","emailReplyToIdConfiguration","emailSchema","emailAddress","webhookSchema","url","allowRetry","outputSchema","outputConfiguration","feedbackSchema","feedbackForm","when","is","then","email","tlds","phaseBannerSchema","phase","feeOptionSchema","payApiKey","paymentReferenceFormat","payReturnUrl","allowSubmissionWithoutPayment","maxAttempts","customPayErrorMessage","showPaymentSkippedWarningPage","otherwise","_objectSpread","Schema","feedback","startPage","pages","sections","lists","fees","metadata","declaration","outputs","skipSummary","version","phaseBanner","specialPages","feeOptions"],"sources":["../../../src/schema/schema.ts"],"sourcesContent":["import joi from 'joi'\n\n/**\n * If an optional key is added, CURRENT_VERSION does not need to be incremented.\n * Only breaking changes will require an increment, as well as a migration script.\n */\nexport const CURRENT_VERSION = 2\nconst sectionsSchema = joi.object().keys({\n name: joi.string().required(),\n title: joi.string().required(),\n hideTitle: joi.boolean().default(false)\n})\n\nconst conditionFieldSchema = joi.object().keys({\n name: joi.string().required(),\n type: joi.string().required(),\n display: joi.string().required()\n})\n\nconst conditionValueSchema = joi.object().keys({\n type: joi.string().required(),\n value: joi.string().required(),\n display: joi.string().required()\n})\n\nconst relativeTimeValueSchema = joi.object().keys({\n type: joi.string().required(),\n timePeriod: joi.string().required(),\n timeUnit: joi.string().required(),\n direction: joi.string().required(),\n timeOnly: joi.boolean().required()\n})\n\nconst conditionRefSchema = joi.object().keys({\n conditionName: joi.string().required(),\n conditionDisplayName: joi.string().required(),\n coordinator: joi.string().optional()\n})\n\nconst conditionSchema = joi.object().keys({\n field: conditionFieldSchema,\n operator: joi.string().required(),\n value: joi.alternatives().try(conditionValueSchema, relativeTimeValueSchema),\n coordinator: joi.string().optional()\n})\n\nconst conditionGroupSchema = joi.object().keys({\n conditions: joi\n .array()\n .items(\n joi\n .alternatives()\n .try(\n conditionSchema,\n conditionRefSchema,\n joi.any() /** Should be a joi.link('#conditionGroupSchema') */\n )\n )\n})\n\nconst conditionsModelSchema = joi.object().keys({\n name: joi.string().required(),\n conditions: joi\n .array()\n .items(\n joi\n .alternatives()\n .try(conditionSchema, conditionRefSchema, conditionGroupSchema)\n )\n})\n\nconst conditionsSchema = joi.object().keys({\n name: joi.string().required(),\n displayName: joi.string(),\n value: joi.alternatives().try(joi.string(), conditionsModelSchema).required()\n})\n\nconst localisedString = joi\n .alternatives()\n .try(joi.object({ a: joi.any() }).unknown(), joi.string().allow(''))\n\nexport const componentSchema = joi\n .object()\n .keys({\n type: joi.string().required(),\n name: joi.string(),\n title: localisedString,\n hint: localisedString.optional(),\n options: joi.object().default({}),\n schema: joi\n .object({ min: joi.number(), max: joi.number() })\n .unknown(true)\n .default({}),\n list: joi.string().optional()\n })\n .unknown(true)\n\nconst nextSchema = joi.object().keys({\n path: joi.string().required(),\n condition: joi.string().allow('').optional(),\n redirect: joi.string().uri().optional()\n})\n\n/**\n * `/status` is a special route for providing a user's application status.\n * It should not be configured via the designer.\n */\nconst pageSchema = joi.object().keys({\n path: joi.string().required().disallow('/status'),\n title: localisedString,\n section: joi.string(),\n controller: joi.string(),\n components: joi.array().items(componentSchema),\n next: joi.array().items(nextSchema),\n repeatField: joi.string().optional(),\n options: joi.object().optional(),\n backLinkFallback: joi.string().optional()\n})\n\nconst toggleableString = joi.alternatives().try(joi.boolean(), joi.string())\n\nconst confirmationPageSchema = joi.object({\n customText: joi\n .object({\n title: joi.string().default('Application complete'),\n paymentSkipped: toggleableString.default(\n 'Someone will be in touch to make a payment.'\n ),\n nextSteps: toggleableString.default(\n 'You will receive an email with details with the next steps.'\n )\n })\n .default(),\n components: joi.array().items(componentSchema)\n})\n\nconst paymentSkippedWarningPage = joi.object({\n customText: joi.object({\n title: joi.string().default('Pay for your application').optional(),\n caption: joi.string().default('Payment').optional(),\n body: joi.string().default('').optional()\n })\n})\n\nconst specialPagesSchema = joi.object().keys({\n confirmationPage: confirmationPageSchema.optional(),\n paymentSkippedWarningPage: paymentSkippedWarningPage.optional()\n})\n\nconst listItemSchema = joi.object().keys({\n text: localisedString,\n value: joi.alternatives().try(joi.number(), joi.string()),\n description: localisedString.optional(),\n conditional: joi\n .object()\n .keys({\n components: joi\n .array()\n .required()\n .items(componentSchema.unknown(true))\n .unique('name')\n })\n .allow(null)\n .optional(),\n condition: joi.string().allow(null, '').optional()\n})\n\nconst listSchema = joi.object().keys({\n name: joi.string().required(),\n title: localisedString,\n type: joi.string().required().valid('string', 'number'),\n items: joi.array().items(listItemSchema)\n})\n\nconst feeSchema = joi.object().keys({\n description: joi.string().required(),\n amount: joi.number().required(),\n multiplier: joi.string().optional(),\n condition: joi.string().optional(),\n prefix: joi.string().optional()\n})\n\nconst multiApiKeySchema = joi.object({\n test: joi.string().optional(),\n production: joi.string().optional()\n})\n\nconst replyToConfigurationSchema = joi.object({\n emailReplyToId: joi.string(),\n condition: joi.string().allow('').optional()\n})\n\nconst notifySchema = joi.object().keys({\n apiKey: [joi.string().allow('').optional(), multiApiKeySchema],\n templateId: joi.string(),\n emailField: joi.string(),\n personalisation: joi.array().items(joi.string()),\n personalisationFieldCustomisation: joi\n .object()\n .pattern(/./, joi.array().items(joi.string()))\n .optional(),\n addReferencesToPersonalisation: joi.boolean().optional(),\n emailReplyToIdConfiguration: joi.array().items(replyToConfigurationSchema)\n})\n\nconst emailSchema = joi.object().keys({\n emailAddress: joi.string()\n})\n\nconst webhookSchema = joi.object().keys({\n url: joi.string(),\n allowRetry: joi.boolean().default(true)\n})\n\nconst outputSchema = joi.object().keys({\n name: joi.string(),\n title: joi.string().optional(),\n type: joi.string().allow('notify', 'email', 'webhook', 'sheets'),\n outputConfiguration: joi\n .alternatives()\n .try(notifySchema, emailSchema, webhookSchema)\n})\n\nconst feedbackSchema = joi.object().keys({\n feedbackForm: joi.boolean().default(false),\n url: joi.when('feedbackForm', {\n is: joi.boolean().valid(false),\n then: joi.string().optional().allow('')\n }),\n emailAddress: joi\n .string()\n .email({\n tlds: {\n allow: false\n }\n })\n .optional()\n})\n\nconst phaseBannerSchema = joi.object().keys({\n phase: joi.string().valid('alpha', 'beta')\n})\n\nconst feeOptionSchema = joi\n .object()\n .keys({\n payApiKey: [joi.string().allow('').optional(), multiApiKeySchema],\n paymentReferenceFormat: [joi.string().optional()],\n payReturnUrl: joi.string().optional(),\n allowSubmissionWithoutPayment: joi.boolean().optional().default(true),\n maxAttempts: joi.number().optional().default(3),\n customPayErrorMessage: joi.string().optional(),\n showPaymentSkippedWarningPage: joi.when('allowSubmissionWithoutPayment', {\n is: true,\n then: joi.boolean().valid(true, false).default(false),\n otherwise: joi.boolean().valid(false).default(false)\n })\n })\n .default(({ payApiKey, paymentReferenceFormat }) => {\n return {\n ...(payApiKey && { payApiKey }),\n ...(paymentReferenceFormat && { paymentReferenceFormat })\n }\n })\n\nexport const Schema = joi\n .object()\n .required()\n .keys({\n name: localisedString.optional(),\n feedback: feedbackSchema,\n startPage: joi.string().required(),\n pages: joi.array().required().items(pageSchema).unique('path'),\n sections: joi.array().items(sectionsSchema).unique('name').required(),\n conditions: joi.array().items(conditionsSchema).unique('name'),\n lists: joi.array().items(listSchema).unique('name'),\n fees: joi.array().items(feeSchema).optional(),\n paymentReferenceFormat: joi.string().optional(),\n metadata: joi.object({ a: joi.any() }).unknown().optional(),\n declaration: joi.string().allow('').optional(),\n outputs: joi.array().items(outputSchema),\n payApiKey: [joi.string().allow('').optional(), multiApiKeySchema],\n skipSummary: joi.boolean().default(false),\n version: joi.number().default(CURRENT_VERSION),\n phaseBanner: phaseBannerSchema,\n specialPages: specialPagesSchema.optional(),\n feeOptions: feeOptionSchema\n })\n\n/**\n * Schema versions:\n * Undefined / 0 - initial version as at 28/8/20. Conditions may be in object structure or string form.\n * 1 - Relevant components (radio, checkbox, select, autocomplete) now contain\n * options as 'values' rather than referencing a data list\n * 2 - Reverse v1. Values populating radio, checkboxes, select, autocomplete are defined in Lists only.\n * TODO:- merge fees and paymentReferenceFormat\n * 2 - 2023-05-04 `feeOptions` has been introduced. paymentReferenceFormat and payApiKey can be configured in top level or feeOptions. feeOptions will take precedent.\n * if feeOptions are empty, it will pull values from the top level keys.\n * WARN: Fee/GOV.UK pay configurations (apart from fees) should no longer be stored in the top level, always within feeOptions.\n **/\n"],"mappings":";;;;;AAAA,OAAOA,GAAG,MAAM,KAAK;;AAErB;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAG,CAAC;AAChC,MAAMC,cAAc,GAAGF,GAAG,CAACG,MAAM,CAAC,CAAC,CAACC,IAAI,CAAC;EACvCC,IAAI,EAAEL,GAAG,CAACM,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC7BC,KAAK,EAAER,GAAG,CAACM,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC9BE,SAAS,EAAET,GAAG,CAACU,OAAO,CAAC,CAAC,CAACC,OAAO,CAAC,KAAK;AACxC,CAAC,CAAC;AAEF,MAAMC,oBAAoB,GAAGZ,GAAG,CAACG,MAAM,CAAC,CAAC,CAACC,IAAI,CAAC;EAC7CC,IAAI,EAAEL,GAAG,CAACM,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC7BM,IAAI,EAAEb,GAAG,CAACM,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC7BO,OAAO,EAAEd,GAAG,CAACM,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AACjC,CAAC,CAAC;AAEF,MAAMQ,oBAAoB,GAAGf,GAAG,CAACG,MAAM,CAAC,CAAC,CAACC,IAAI,CAAC;EAC7CS,I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Deserialise = obj => {
3
- if (typeof obj === 'object' && obj !== null) {
4
- return JSON.parse(JSON.stringify(obj));
5
- }
6
- return obj;
7
- };
8
- export const clone = obj => {
9
- if (obj) {
10
- if (typeof obj.clone === 'function') {
11
- return obj.clone();
12
- }
13
- return serialiseAndDeserialise(obj);
14
- }
15
- return obj;
16
- };
17
- export function filter(obj, predicate) {
18
- const result = {};
19
- for (const [key, value] of Object.entries(obj)) {
20
- if (value && predicate(value)) {
21
- result[key] = value;
22
- }
23
- }
24
- return result;
25
- }
26
- export const nanoid = customAlphabet('0123456789_abcdefghijklmnopqrstuvwxyz', 6);
27
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","names":["customAlphabet","serialiseAndDeserialise","obj","JSON","parse","stringify","clone","filter","predicate","result","key","value","Object","entries","nanoid"],"sources":["../../../src/utils/helpers.ts"],"sourcesContent":["import { customAlphabet } from 'nanoid'\n\nexport const serialiseAndDeserialise = <T>(obj: T): T => {\n if (typeof obj === 'object' && obj !== null) {\n return JSON.parse(JSON.stringify(obj))\n }\n\n return obj\n}\n\nexport const clone = <T>(obj: T & { clone?: () => T }): T => {\n if (obj) {\n if (typeof obj.clone === 'function') {\n return obj.clone()\n }\n\n return serialiseAndDeserialise<T>(obj)\n }\n return obj\n}\n\nexport function filter<T extends { [key: string]: unknown }>(\n obj: T,\n predicate: (value: any) => boolean\n): Partial<T> {\n const result = {}\n\n for (const [key, value] of Object.entries(obj)) {\n if (value && predicate(value)) {\n result[key] = value\n }\n }\n\n return result\n}\n\nexport const nanoid = customAlphabet('0123456789_abcdefghijklmnopqrstuvwxyz', 6)\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,QAAQ;AAEvC,OAAO,MAAMC,uBAAuB,GAAOC,GAAM,IAAQ;EACvD,IAAI,OAAOA,GAAG,KAAK,QAAQ,IAAIA,GAAG,KAAK,IAAI,EAAE;IAC3C,OAAOC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,SAAS,CAACH,GAAG,CAAC,CAAC;EACxC;EAEA,OAAOA,GAAG;AACZ,CAAC;AAED,OAAO,MAAMI,KAAK,GAAOJ,GAA4B,IAAQ;EAC3D,IAAIA,GAAG,EAAE;IACP,IAAI,OAAOA,GAAG,CAACI,KAAK,KAAK,UAAU,EAAE;MACnC,OAAOJ,GAAG,CAACI,KAAK,CAAC,CAAC;IACpB;IAEA,OAAOL,uBAAuB,CAAIC,GAAG,CAAC;EACxC;EACA,OAAOA,GAAG;AACZ,CAAC;AAED,OAAO,SAASK,MAAMA,CACpBL,GAAM,EACNM,SAAkC,EACtB;EACZ,MAAMC,MAAM,GAAG,CAAC,CAAC;EAEjB,KAAK,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACX,GAAG,CAAC,EAAE;IAC9C,IAAIS,KAAK,IAAIH,SAAS,CAACG,KAAK,CAAC,EAAE;MAC7BF,MAAM,CAACC,GAAG,CAAC,GAAGC,KAAK;IACrB;EACF;EAEA,OAAOF,MAAM;AACf;AAEA,OAAO,MAAMK,MAAM,GAAGd,cAAc,CAAC,uCAAuC,EAAE,CAAC,CAAC"}
@@ -1,27 +0,0 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
3
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
- export class Logger {
5
- constructor(server, name) {
6
- _defineProperty(this, "server", void 0);
7
- _defineProperty(this, "name", void 0);
8
- this.server = server;
9
- this.name = name;
10
- }
11
- error(message) {
12
- this.log('error', message);
13
- }
14
- warn(message) {
15
- this.log('warn', message);
16
- }
17
- info(message) {
18
- this.log('info', message);
19
- }
20
- debug(message) {
21
- this.log('debug', message);
22
- }
23
- log(level, message) {
24
- this.server.log([level, this.name], message);
25
- }
26
- }
27
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","names":["Logger","constructor","server","name","_defineProperty","error","message","log","warn","info","debug","level"],"sources":["../../../src/utils/logger.ts"],"sourcesContent":["export class Logger {\n server: any\n name: string\n\n constructor(server: any, name: string) {\n this.server = server\n this.name = name\n }\n\n error(message: string) {\n this.log('error', message)\n }\n\n warn(message: string) {\n this.log('warn', message)\n }\n\n info(message: string) {\n this.log('info', message)\n }\n\n debug(message: string) {\n this.log('debug', message)\n }\n\n log(level: string, message: string) {\n this.server.log([level, this.name], message)\n }\n}\n"],"mappings":";;;AAAA,OAAO,MAAMA,MAAM,CAAC;EAIlBC,WAAWA,CAACC,MAAW,EAAEC,IAAY,EAAE;IAAAC,eAAA;IAAAA,eAAA;IACrC,IAAI,CAACF,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,IAAI,GAAGA,IAAI;EAClB;EAEAE,KAAKA,CAACC,OAAe,EAAE;IACrB,IAAI,CAACC,GAAG,CAAC,OAAO,EAAED,OAAO,CAAC;EAC5B;EAEAE,IAAIA,CAACF,OAAe,EAAE;IACpB,IAAI,CAACC,GAAG,CAAC,MAAM,EAAED,OAAO,CAAC;EAC3B;EAEAG,IAAIA,CAACH,OAAe,EAAE;IACpB,IAAI,CAACC,GAAG,CAAC,MAAM,EAAED,OAAO,CAAC;EAC3B;EAEAI,KAAKA,CAACJ,OAAe,EAAE;IACrB,IAAI,CAACC,GAAG,CAAC,OAAO,EAAED,OAAO,CAAC;EAC5B;EAEAC,GAAGA,CAACI,KAAa,EAAEL,OAAe,EAAE;IAClC,IAAI,CAACJ,MAAM,CAACK,GAAG,CAAC,CAACI,KAAK,EAAE,IAAI,CAACR,IAAI,CAAC,EAAEG,OAAO,CAAC;EAC9C;AACF"}