@tsed/schema-formio 8.9.5 → 8.10.0-rc.2

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 (116) hide show
  1. package/lib/browser/components/anyToComponent.js +23 -0
  2. package/lib/browser/components/anyToComponent.js.map +1 -0
  3. package/lib/browser/components/arrayToComponent.js +36 -0
  4. package/lib/browser/components/arrayToComponent.js.map +1 -0
  5. package/lib/browser/components/booleanToComponent.js +12 -0
  6. package/lib/browser/components/booleanToComponent.js.map +1 -0
  7. package/lib/browser/components/dateToComponent.js +57 -0
  8. package/lib/browser/components/dateToComponent.js.map +1 -0
  9. package/lib/browser/components/defaultToComponent.js +17 -0
  10. package/lib/browser/components/defaultToComponent.js.map +1 -0
  11. package/lib/browser/components/enumToComponent.js +27 -0
  12. package/lib/browser/components/enumToComponent.js.map +1 -0
  13. package/lib/browser/components/mapToComponent.js +19 -0
  14. package/lib/browser/components/mapToComponent.js.map +1 -0
  15. package/lib/browser/components/nestedToComponent.js +24 -0
  16. package/lib/browser/components/nestedToComponent.js.map +1 -0
  17. package/lib/browser/components/numberToComponent.js +20 -0
  18. package/lib/browser/components/numberToComponent.js.map +1 -0
  19. package/lib/browser/components/objectToEditGrid.js +15 -0
  20. package/lib/browser/components/objectToEditGrid.js.map +1 -0
  21. package/lib/browser/components/panelToComponent.js +15 -0
  22. package/lib/browser/components/panelToComponent.js.map +1 -0
  23. package/lib/browser/components/propertiesToComponents.js +66 -0
  24. package/lib/browser/components/propertiesToComponents.js.map +1 -0
  25. package/lib/browser/components/stringToComponent.js +42 -0
  26. package/lib/browser/components/stringToComponent.js.map +1 -0
  27. package/lib/browser/decorators/component.js +18 -0
  28. package/lib/browser/decorators/component.js.map +1 -0
  29. package/lib/browser/decorators/conditional.js +26 -0
  30. package/lib/browser/decorators/conditional.js.map +1 -0
  31. package/lib/browser/decorators/currency.js +16 -0
  32. package/lib/browser/decorators/currency.js.map +1 -0
  33. package/lib/browser/decorators/customClass.js +10 -0
  34. package/lib/browser/decorators/customClass.js.map +1 -0
  35. package/lib/browser/decorators/customConditional.js +16 -0
  36. package/lib/browser/decorators/customConditional.js.map +1 -0
  37. package/lib/browser/decorators/dataSourceJson.js +20 -0
  38. package/lib/browser/decorators/dataSourceJson.js.map +1 -0
  39. package/lib/browser/decorators/dataSourceUrl.js +15 -0
  40. package/lib/browser/decorators/dataSourceUrl.js.map +1 -0
  41. package/lib/browser/decorators/errorLabel.js +10 -0
  42. package/lib/browser/decorators/errorLabel.js.map +1 -0
  43. package/lib/browser/decorators/errorMessage.js +8 -0
  44. package/lib/browser/decorators/errorMessage.js.map +1 -0
  45. package/lib/browser/decorators/form.js +20 -0
  46. package/lib/browser/decorators/form.js.map +1 -0
  47. package/lib/browser/decorators/hidden.js +10 -0
  48. package/lib/browser/decorators/hidden.js.map +1 -0
  49. package/lib/browser/decorators/inputTags.js +18 -0
  50. package/lib/browser/decorators/inputTags.js.map +1 -0
  51. package/lib/browser/decorators/label.js +11 -0
  52. package/lib/browser/decorators/label.js.map +1 -0
  53. package/lib/browser/decorators/mask.js +17 -0
  54. package/lib/browser/decorators/mask.js.map +1 -0
  55. package/lib/browser/decorators/maxWords.js +8 -0
  56. package/lib/browser/decorators/maxWords.js.map +1 -0
  57. package/lib/browser/decorators/minWords.js +8 -0
  58. package/lib/browser/decorators/minWords.js.map +1 -0
  59. package/lib/browser/decorators/modalEdit.js +10 -0
  60. package/lib/browser/decorators/modalEdit.js.map +1 -0
  61. package/lib/browser/decorators/multiple.js +10 -0
  62. package/lib/browser/decorators/multiple.js.map +1 -0
  63. package/lib/browser/decorators/openWhenEmpty.js +10 -0
  64. package/lib/browser/decorators/openWhenEmpty.js.map +1 -0
  65. package/lib/browser/decorators/password.js +12 -0
  66. package/lib/browser/decorators/password.js.map +1 -0
  67. package/lib/browser/decorators/placeholder.js +10 -0
  68. package/lib/browser/decorators/placeholder.js.map +1 -0
  69. package/lib/browser/decorators/prefix.js +10 -0
  70. package/lib/browser/decorators/prefix.js.map +1 -0
  71. package/lib/browser/decorators/select.js +14 -0
  72. package/lib/browser/decorators/select.js.map +1 -0
  73. package/lib/browser/decorators/suffix.js +10 -0
  74. package/lib/browser/decorators/suffix.js.map +1 -0
  75. package/lib/browser/decorators/tableView.js +10 -0
  76. package/lib/browser/decorators/tableView.js.map +1 -0
  77. package/lib/browser/decorators/tabs.js +14 -0
  78. package/lib/browser/decorators/tabs.js.map +1 -0
  79. package/lib/browser/decorators/textCase.js +10 -0
  80. package/lib/browser/decorators/textCase.js.map +1 -0
  81. package/lib/browser/decorators/textarea.js +12 -0
  82. package/lib/browser/decorators/textarea.js.map +1 -0
  83. package/lib/browser/decorators/tooltip.js +10 -0
  84. package/lib/browser/decorators/tooltip.js.map +1 -0
  85. package/lib/browser/decorators/validate.js +12 -0
  86. package/lib/browser/decorators/validate.js.map +1 -0
  87. package/lib/browser/index.js +102 -0
  88. package/lib/browser/index.js.map +1 -0
  89. package/lib/browser/registries/FormioMappersContainer.js +18 -0
  90. package/lib/browser/registries/FormioMappersContainer.js.map +1 -0
  91. package/lib/browser/registries/FormsContainer.js +5 -0
  92. package/lib/browser/registries/FormsContainer.js.map +1 -0
  93. package/lib/browser/utils/getFormioProps.js +10 -0
  94. package/lib/browser/utils/getFormioProps.js.map +1 -0
  95. package/lib/browser/utils/getFormioSchema.js +45 -0
  96. package/lib/browser/utils/getFormioSchema.js.map +1 -0
  97. package/lib/browser/utils/getRef.js +8 -0
  98. package/lib/browser/utils/getRef.js.map +1 -0
  99. package/lib/esm/index.js +1 -1
  100. package/lib/esm/index.js.map +1 -1
  101. package/lib/esm/interfaces/FormioDataResolver.js.map +1 -0
  102. package/lib/types/decorators/dataSourceJson.d.ts +1 -1
  103. package/lib/types/decorators/dataSourceUrl.d.ts +1 -1
  104. package/lib/types/index.d.ts +1 -1
  105. package/package.json +18 -14
  106. package/src/decorators/dataSourceJson.ts +1 -1
  107. package/src/decorators/dataSourceUrl.ts +1 -1
  108. package/src/index.ts +1 -1
  109. package/vite.config.mts +45 -0
  110. package/lib/browser/schema-formio.umd.min.js +0 -2
  111. package/lib/browser/schema-formio.umd.min.js.map +0 -1
  112. package/lib/esm/domain/FormioDataResolver.js.map +0 -1
  113. package/webpack.config.cjs +0 -12
  114. /package/lib/esm/{domain → interfaces}/FormioDataResolver.js +0 -0
  115. /package/lib/types/{domain → interfaces}/FormioDataResolver.d.ts +0 -0
  116. /package/src/{domain → interfaces}/FormioDataResolver.ts +0 -0
@@ -0,0 +1,15 @@
1
+ import { Component as r } from "./component.js";
2
+ function n(a, t = {}) {
3
+ return r({
4
+ ...t,
5
+ dataSrc: "url",
6
+ data: {
7
+ ...t.data,
8
+ url: a
9
+ }
10
+ });
11
+ }
12
+ export {
13
+ n as DataSourceUrl
14
+ };
15
+ //# sourceMappingURL=dataSourceUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataSourceUrl.js","sources":["../../../src/decorators/dataSourceUrl.ts"],"sourcesContent":["import {FormioDataResolver} from \"../interfaces/FormioDataResolver.js\";\nimport {Component} from \"./component.js\";\n\n/**\n * Set URL data on the current component.\n * @param url\n * @param props\n * @constructor\n */\nexport function DataSourceUrl(url: string | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"url\",\n data: {\n ...props.data,\n url\n }\n });\n}\n"],"names":["DataSourceUrl","url","props","Component"],"mappings":";AASO,SAASA,EAAcC,GAAkCC,IAA6B,IAAI;AAC/F,SAAOC,EAAU;AAAA,IACf,GAAGD;AAAA,IACH,SAAS;AAAA,IACT,MAAM;AAAA,MACJ,GAAGA,EAAM;AAAA,MACT,KAAAD;AAAA,IAAA;AAAA,EACF,CACD;AACH;"}
@@ -0,0 +1,10 @@
1
+ import { Component as o } from "./component.js";
2
+ function n(r) {
3
+ return o({
4
+ errorLabel: r
5
+ });
6
+ }
7
+ export {
8
+ n as ErrorLabel
9
+ };
10
+ //# sourceMappingURL=errorLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorLabel.js","sources":["../../../src/decorators/errorLabel.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Set the error label when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ErrorLabel(message: string) {\n return Component({\n errorLabel: message\n });\n}\n"],"names":["ErrorLabel","message","Component"],"mappings":";AASO,SAASA,EAAWC,GAAiB;AAC1C,SAAOC,EAAU;AAAA,IACf,YAAYD;AAAA,EAAA,CACb;AACH;"}
@@ -0,0 +1,8 @@
1
+ import { Validate as e } from "./validate.js";
2
+ function t(r) {
3
+ return e("customMessage", r);
4
+ }
5
+ export {
6
+ t as ErrorMessage
7
+ };
8
+ //# sourceMappingURL=errorMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorMessage.js","sources":["../../../src/decorators/errorMessage.ts"],"sourcesContent":["import {Validate} from \"./validate.js\";\n\n/**\n * Add error message when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param message\n */\nexport function ErrorMessage(message: string) {\n return Validate(\"customMessage\", message);\n}\n"],"names":["ErrorMessage","message","Validate"],"mappings":";AAUO,SAASA,EAAaC,GAAiB;AACrC,SAAAC,EAAS,iBAAiBD,CAAO;AAC1C;"}
@@ -0,0 +1,20 @@
1
+ import { useDecorators as r, nameOf as t, StoreSet as i } from "@tsed/core";
2
+ import { Name as s } from "@tsed/schema";
3
+ import { kebabCase as p } from "/home/runner/work/tsed/tsed/node_modules/change-case/dist/index.js";
4
+ import { FormsContainer as a } from "../registries/FormsContainer.js";
5
+ import { Label as b } from "./label.js";
6
+ function F(e = {}) {
7
+ return r(
8
+ (o) => {
9
+ const m = e.name || t(o), n = p(m);
10
+ a.set(m, o), a.set(n, o);
11
+ },
12
+ e.name && s(e.name),
13
+ e.label && b(e.label),
14
+ e && i("formio:form", e)
15
+ );
16
+ }
17
+ export {
18
+ F as Form
19
+ };
20
+ //# sourceMappingURL=form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.js","sources":["../../../src/decorators/form.ts"],"sourcesContent":["import {nameOf, StoreSet, useDecorators} from \"@tsed/core\";\nimport {FormioForm} from \"@tsed/formio-types\";\nimport {Name} from \"@tsed/schema\";\nimport {kebabCase} from \"change-case\";\n\nimport {FormsContainer} from \"../registries/FormsContainer.js\";\nimport {Label} from \"./label.js\";\n\n/**\n * Expose the model as Formio Form.\n * @param form\n */\nexport function Form(form: Partial<Omit<FormioForm, \"components\" | \"_id\">> = {}): ClassDecorator {\n return useDecorators(\n (target: any) => {\n const name = form.name || nameOf(target);\n const machineName = kebabCase(name);\n FormsContainer.set(name, target as any);\n FormsContainer.set(machineName, target as any);\n },\n form.name && Name(form.name),\n form.label && Label(form.label),\n form && StoreSet(\"formio:form\", form)\n );\n}\n"],"names":["Form","form","useDecorators","target","name","nameOf","machineName","kebabCase","FormsContainer","Name","Label","StoreSet"],"mappings":";;;;;AAYgB,SAAAA,EAAKC,IAAwD,IAAoB;AACxF,SAAAC;AAAA,IACL,CAACC,MAAgB;AACf,YAAMC,IAAOH,EAAK,QAAQI,EAAOF,CAAM,GACjCG,IAAcC,EAAUH,CAAI;AACnB,MAAAI,EAAA,IAAIJ,GAAMD,CAAa,GACvBK,EAAA,IAAIF,GAAaH,CAAa;AAAA,IAC/C;AAAA,IACAF,EAAK,QAAQQ,EAAKR,EAAK,IAAI;AAAA,IAC3BA,EAAK,SAASS,EAAMT,EAAK,KAAK;AAAA,IAC9BA,KAAQU,EAAS,eAAeV,CAAI;AAAA,EACtC;AACF;"}
@@ -0,0 +1,10 @@
1
+ import { Component as e } from "./component.js";
2
+ function r(n = !0) {
3
+ return e({
4
+ hidden: n
5
+ });
6
+ }
7
+ export {
8
+ r as Hidden
9
+ };
10
+ //# sourceMappingURL=hidden.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hidden.js","sources":["../../../src/decorators/hidden.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Set hidden field.\n *\n * A hidden field is still a part of the form, but is hidden from view.\n *\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Hidden(bool: boolean = true): PropertyDecorator {\n return Component({\n hidden: bool\n });\n}\n"],"names":["Hidden","bool","Component"],"mappings":";AAagB,SAAAA,EAAOC,IAAgB,IAAyB;AAC9D,SAAOC,EAAU;AAAA,IACf,QAAQD;AAAA,EAAA,CACT;AACH;"}
@@ -0,0 +1,18 @@
1
+ import { useDecorators as r } from "@tsed/core";
2
+ import { CollectionOf as t } from "@tsed/schema";
3
+ import { Component as e } from "./component.js";
4
+ function m(o = {}) {
5
+ return r(
6
+ t(String),
7
+ e({
8
+ ...o,
9
+ tableView: !1,
10
+ storeas: "array",
11
+ type: "tags"
12
+ })
13
+ );
14
+ }
15
+ export {
16
+ m as InputTags
17
+ };
18
+ //# sourceMappingURL=inputTags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputTags.js","sources":["../../../src/decorators/inputTags.ts"],"sourcesContent":["import {useDecorators} from \"@tsed/core\";\nimport {CollectionOf} from \"@tsed/schema\";\n\nimport {Component} from \"./component.js\";\n/**\n * Configure the property as Tags component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function InputTags(props: Record<string, any> = {}): PropertyDecorator {\n return useDecorators(\n CollectionOf(String),\n Component({\n ...props,\n tableView: false,\n storeas: \"array\",\n type: \"tags\"\n })\n );\n}\n"],"names":["InputTags","props","useDecorators","CollectionOf","Component"],"mappings":";;;AAWgB,SAAAA,EAAUC,IAA6B,IAAuB;AACrE,SAAAC;AAAA,IACLC,EAAa,MAAM;AAAA,IACnBC,EAAU;AAAA,MACR,GAAGH;AAAA,MACH,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,IACP,CAAA;AAAA,EACH;AACF;"}
@@ -0,0 +1,11 @@
1
+ import { JsonEntityFn as t, CustomKey as e } from "@tsed/schema";
2
+ import { Component as n } from "./component.js";
3
+ function i(o) {
4
+ return t((r) => r.decoratorType === "property" ? n({
5
+ label: o
6
+ }) : e("x-formio-label", o));
7
+ }
8
+ export {
9
+ i as Label
10
+ };
11
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.js","sources":["../../../src/decorators/label.ts"],"sourcesContent":["import {CustomKey, JsonEntityFn} from \"@tsed/schema\";\n\nimport {Component} from \"./component.js\";\n\n/**\n * Change the label field\n * @decorator\n * @formio\n * @property\n * @schema\n * @param label\n */\nexport function Label(label: string) {\n return JsonEntityFn((entity) => {\n return entity.decoratorType === \"property\"\n ? Component({\n label\n })\n : CustomKey(\"x-formio-label\", label);\n });\n}\n"],"names":["Label","label","JsonEntityFn","entity","Component","CustomKey"],"mappings":";;AAYO,SAASA,EAAMC,GAAe;AAC5B,SAAAC,EAAa,CAACC,MACZA,EAAO,kBAAkB,aAC5BC,EAAU;AAAA,IACR,OAAAH;AAAA,EAAA,CACD,IACDI,EAAU,kBAAkBJ,CAAK,CACtC;AACH;"}
@@ -0,0 +1,17 @@
1
+ import { Component as o } from "./component.js";
2
+ function e(n, r = "") {
3
+ return o({
4
+ inputMask: n,
5
+ inputMaskPlaceholderChar: r
6
+ });
7
+ }
8
+ function u(...n) {
9
+ return o({
10
+ inputMasks: n
11
+ });
12
+ }
13
+ export {
14
+ e as Mask,
15
+ u as Masks
16
+ };
17
+ //# sourceMappingURL=mask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mask.js","sources":["../../../src/decorators/mask.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Mask(inputMask: string, inputMaskPlaceholderChar: string = \"\") {\n return Component({\n inputMask,\n inputMaskPlaceholderChar\n });\n}\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Masks(...inputMasks: {label: string; mask: string}[]) {\n return Component({\n inputMasks\n });\n}\n"],"names":["Mask","inputMask","inputMaskPlaceholderChar","Component","Masks","inputMasks"],"mappings":";AAkBgB,SAAAA,EAAKC,GAAmBC,IAAmC,IAAI;AAC7E,SAAOC,EAAU;AAAA,IACf,WAAAF;AAAA,IACA,0BAAAC;AAAA,EAAA,CACD;AACH;AAkBO,SAASE,KAASC,GAA6C;AACpE,SAAOF,EAAU;AAAA,IACf,YAAAE;AAAA,EAAA,CACD;AACH;"}
@@ -0,0 +1,8 @@
1
+ import { Validate as o } from "./validate.js";
2
+ function a(r) {
3
+ return o("maxWords", r);
4
+ }
5
+ export {
6
+ a as MaxWords
7
+ };
8
+ //# sourceMappingURL=maxWords.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maxWords.js","sources":["../../../src/decorators/maxWords.ts"],"sourcesContent":["import {Validate} from \"./validate.js\";\n\n/**\n * Add the minimum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MaxWords(value: number) {\n return Validate(\"maxWords\", value);\n}\n"],"names":["MaxWords","value","Validate"],"mappings":";AAUO,SAASA,EAASC,GAAe;AAC/B,SAAAC,EAAS,YAAYD,CAAK;AACnC;"}
@@ -0,0 +1,8 @@
1
+ import { Validate as o } from "./validate.js";
2
+ function n(r) {
3
+ return o("minWords", r);
4
+ }
5
+ export {
6
+ n as MinWords
7
+ };
8
+ //# sourceMappingURL=minWords.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minWords.js","sources":["../../../src/decorators/minWords.ts"],"sourcesContent":["import {Validate} from \"./validate.js\";\n\n/**\n * Add the maximum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MinWords(value: number) {\n return Validate(\"minWords\", value);\n}\n"],"names":["MinWords","value","Validate"],"mappings":";AAUO,SAASA,EAASC,GAAe;AAC/B,SAAAC,EAAS,YAAYD,CAAK;AACnC;"}
@@ -0,0 +1,10 @@
1
+ import { Component as t } from "./component.js";
2
+ function n(o = !0) {
3
+ return t({
4
+ modalEdit: o
5
+ });
6
+ }
7
+ export {
8
+ n as ModalEdit
9
+ };
10
+ //# sourceMappingURL=modalEdit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modalEdit.js","sources":["../../../src/decorators/modalEdit.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Opens up a modal to edit the value of this component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ModalEdit(modalEdit = true) {\n return Component({\n modalEdit\n });\n}\n"],"names":["ModalEdit","modalEdit","Component"],"mappings":";AASgB,SAAAA,EAAUC,IAAY,IAAM;AAC1C,SAAOC,EAAU;AAAA,IACf,WAAAD;AAAA,EAAA,CACD;AACH;"}
@@ -0,0 +1,10 @@
1
+ import { Component as t } from "./component.js";
2
+ function n(o = !1) {
3
+ return t({
4
+ multiple: o
5
+ });
6
+ }
7
+ export {
8
+ n as Multiple
9
+ };
10
+ //# sourceMappingURL=multiple.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiple.js","sources":["../../../src/decorators/multiple.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Change the multiple value on the decorated property.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Multiple(multiple = false): PropertyDecorator {\n return Component({\n multiple\n });\n}\n"],"names":["Multiple","multiple","Component"],"mappings":";AASgB,SAAAA,EAASC,IAAW,IAA0B;AAC5D,SAAOC,EAAU;AAAA,IACf,UAAAD;AAAA,EAAA,CACD;AACH;"}
@@ -0,0 +1,10 @@
1
+ import { Component as t } from "./component.js";
2
+ function o(n = !0) {
3
+ return t({
4
+ openWhenEmpty: n
5
+ });
6
+ }
7
+ export {
8
+ o as OpenWhenEmpty
9
+ };
10
+ //# sourceMappingURL=openWhenEmpty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openWhenEmpty.js","sources":["../../../src/decorators/openWhenEmpty.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Open automatically the editgrid when the list is empty.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function OpenWhenEmpty(openWhenEmpty = true): PropertyDecorator {\n return Component({\n openWhenEmpty\n });\n}\n"],"names":["OpenWhenEmpty","openWhenEmpty","Component"],"mappings":";AASgB,SAAAA,EAAcC,IAAgB,IAAyB;AACrE,SAAOC,EAAU;AAAA,IACf,eAAAD;AAAA,EAAA,CACD;AACH;"}
@@ -0,0 +1,12 @@
1
+ import { Component as r } from "./component.js";
2
+ function e(o = {}) {
3
+ return r({
4
+ ...o,
5
+ type: "password",
6
+ protected: !0
7
+ });
8
+ }
9
+ export {
10
+ e as Password
11
+ };
12
+ //# sourceMappingURL=password.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password.js","sources":["../../../src/decorators/password.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\nexport interface PasswordOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n/**\n * Configure the property as Password component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Password(props: PasswordOpts = {}): PropertyDecorator {\n return Component({\n ...props,\n type: \"password\",\n protected: true\n });\n}\n"],"names":["Password","props","Component"],"mappings":";AAagB,SAAAA,EAASC,IAAsB,IAAuB;AACpE,SAAOC,EAAU;AAAA,IACf,GAAGD;AAAA,IACH,MAAM;AAAA,IACN,WAAW;AAAA,EAAA,CACZ;AACH;"}
@@ -0,0 +1,10 @@
1
+ import { Component as r } from "./component.js";
2
+ function n(o) {
3
+ return r({
4
+ placeholder: o
5
+ });
6
+ }
7
+ export {
8
+ n as Placeholder
9
+ };
10
+ //# sourceMappingURL=placeholder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeholder.js","sources":["../../../src/decorators/placeholder.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * The placeholder text that will appear when this field is empty.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param placeholder\n */\nexport function Placeholder(placeholder: string) {\n return Component({\n placeholder\n });\n}\n"],"names":["Placeholder","placeholder","Component"],"mappings":";AAUO,SAASA,EAAYC,GAAqB;AAC/C,SAAOC,EAAU;AAAA,IACf,aAAAD;AAAA,EAAA,CACD;AACH;"}
@@ -0,0 +1,10 @@
1
+ import { Component as r } from "./component.js";
2
+ function t(o) {
3
+ return r({
4
+ prefix: o
5
+ });
6
+ }
7
+ export {
8
+ t as Prefix
9
+ };
10
+ //# sourceMappingURL=prefix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefix.js","sources":["../../../src/decorators/prefix.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Add prefix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Prefix(prefix: string) {\n return Component({\n prefix\n });\n}\n"],"names":["Prefix","prefix","Component"],"mappings":";AASO,SAASA,EAAOC,GAAgB;AACrC,SAAOC,EAAU;AAAA,IACf,QAAAD;AAAA,EAAA,CACD;AACH;"}
@@ -0,0 +1,14 @@
1
+ import { Component as t } from "./component.js";
2
+ function r(e = {}) {
3
+ return t({
4
+ selectThreshold: 0.3,
5
+ input: !0,
6
+ widget: "choicesjs",
7
+ ...e,
8
+ type: "select"
9
+ });
10
+ }
11
+ export {
12
+ r as Select
13
+ };
14
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","sources":["../../../src/decorators/select.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\nexport interface SelectOpts extends Record<string, any> {\n idPath?: string;\n valueProperty?: string;\n template?: string;\n multiple?: boolean;\n}\n\n/**\n * Configure the property as Select component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Select(props: SelectOpts = {}): PropertyDecorator {\n return Component({\n selectThreshold: 0.3,\n input: true,\n widget: \"choicesjs\",\n ...props,\n type: \"select\"\n });\n}\n"],"names":["Select","props","Component"],"mappings":";AAgBgB,SAAAA,EAAOC,IAAoB,IAAuB;AAChE,SAAOC,EAAU;AAAA,IACf,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,GAAGD;AAAA,IACH,MAAM;AAAA,EAAA,CACP;AACH;"}
@@ -0,0 +1,10 @@
1
+ import { Component as n } from "./component.js";
2
+ function t(o) {
3
+ return n({
4
+ suffix: o
5
+ });
6
+ }
7
+ export {
8
+ t as Suffix
9
+ };
10
+ //# sourceMappingURL=suffix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suffix.js","sources":["../../../src/decorators/suffix.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Add suffix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Suffix(suffix: string) {\n return Component({\n suffix\n });\n}\n"],"names":["Suffix","suffix","Component"],"mappings":";AASO,SAASA,EAAOC,GAAgB;AACrC,SAAOC,EAAU;AAAA,IACf,QAAAD;AAAA,EAAA,CACD;AACH;"}
@@ -0,0 +1,10 @@
1
+ import { Component as o } from "./component.js";
2
+ function n(e) {
3
+ return o({
4
+ tableView: e
5
+ });
6
+ }
7
+ export {
8
+ n as TableView
9
+ };
10
+ //# sourceMappingURL=tableView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tableView.js","sources":["../../../src/decorators/tableView.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Change the visibility of the current property on a table.\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function TableView(bool: boolean): PropertyDecorator {\n return Component({\n tableView: bool\n });\n}\n"],"names":["TableView","bool","Component"],"mappings":";AAUO,SAASA,EAAUC,GAAkC;AAC1D,SAAOC,EAAU;AAAA,IACf,WAAWD;AAAA,EAAA,CACZ;AACH;"}
@@ -0,0 +1,14 @@
1
+ import { JsonEntityFn as m } from "@tsed/schema";
2
+ import { camelCase as r } from "/home/runner/work/tsed/tsed/node_modules/change-case/dist/index.js";
3
+ function s(o) {
4
+ return m((t) => {
5
+ t.schema.customKey("x-formiotabs", {
6
+ key: r(o),
7
+ label: o
8
+ });
9
+ });
10
+ }
11
+ export {
12
+ s as Tabs
13
+ };
14
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sources":["../../../src/decorators/tabs.ts"],"sourcesContent":["import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\nimport {camelCase} from \"change-case\";\n\n/**\n * Group the current property in tabs components.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Tabs(label: string) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.customKey(\"x-formiotabs\", {\n key: camelCase(label),\n label\n });\n });\n}\n"],"names":["Tabs","label","JsonEntityFn","store","camelCase"],"mappings":";;AAUO,SAASA,EAAKC,GAAe;AAC3B,SAAAC,EAAa,CAACC,MAA2B;AACxC,IAAAA,EAAA,OAAO,UAAU,gBAAgB;AAAA,MACrC,KAAKC,EAAUH,CAAK;AAAA,MACpB,OAAAA;AAAA,IAAA,CACD;AAAA,EAAA,CACF;AACH;"}
@@ -0,0 +1,10 @@
1
+ import { Component as o } from "./component.js";
2
+ function n(e) {
3
+ return o({
4
+ case: e
5
+ });
6
+ }
7
+ export {
8
+ n as TextCase
9
+ };
10
+ //# sourceMappingURL=textCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textCase.js","sources":["../../../src/decorators/textCase.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Force the output of this field to be sanitized in a specific format.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param textCase\n */\nexport function TextCase(textCase: \"uppercase\" | \"lowercase\") {\n return Component({\n case: textCase\n });\n}\n"],"names":["TextCase","textCase","Component"],"mappings":";AAUO,SAASA,EAASC,GAAqC;AAC5D,SAAOC,EAAU;AAAA,IACf,MAAMD;AAAA,EAAA,CACP;AACH;"}
@@ -0,0 +1,12 @@
1
+ import { Component as e } from "./component.js";
2
+ function o(t = {}) {
3
+ return e({
4
+ autoExpand: !1,
5
+ ...t,
6
+ type: "textarea"
7
+ });
8
+ }
9
+ export {
10
+ o as Textarea
11
+ };
12
+ //# sourceMappingURL=textarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.js","sources":["../../../src/decorators/textarea.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\nexport interface TextareaOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n\n/**\n * Configure the property as Textarea component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Textarea(props: TextareaOpts = {}): PropertyDecorator {\n return Component({\n autoExpand: false,\n ...props,\n type: \"textarea\"\n });\n}\n"],"names":["Textarea","props","Component"],"mappings":";AAcgB,SAAAA,EAASC,IAAsB,IAAuB;AACpE,SAAOC,EAAU;AAAA,IACf,YAAY;AAAA,IACZ,GAAGD;AAAA,IACH,MAAM;AAAA,EAAA,CACP;AACH;"}
@@ -0,0 +1,10 @@
1
+ import { Component as t } from "./component.js";
2
+ function r(o) {
3
+ return t({
4
+ tooltip: o
5
+ });
6
+ }
7
+ export {
8
+ r as Tooltip
9
+ };
10
+ //# sourceMappingURL=tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.js","sources":["../../../src/decorators/tooltip.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Adds a tooltip to the side of this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param tooltip\n */\nexport function Tooltip(tooltip: string) {\n return Component({\n tooltip\n });\n}\n"],"names":["Tooltip","tooltip","Component"],"mappings":";AAUO,SAASA,EAAQC,GAAiB;AACvC,SAAOC,EAAU;AAAA,IACf,SAAAD;AAAA,EAAA,CACD;AACH;"}
@@ -0,0 +1,12 @@
1
+ import { Component as e } from "./component.js";
2
+ function r(t, o) {
3
+ return e({
4
+ validate: {
5
+ [t]: o
6
+ }
7
+ });
8
+ }
9
+ export {
10
+ r as Validate
11
+ };
12
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.js","sources":["../../../src/decorators/validate.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Add validation rules.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param key\n * @param value\n */\nexport function Validate(key: string, value: any) {\n return Component({\n validate: {\n [key]: value\n }\n });\n}\n"],"names":["Validate","key","value","Component"],"mappings":";AAWgB,SAAAA,EAASC,GAAaC,GAAY;AAChD,SAAOC,EAAU;AAAA,IACf,UAAU;AAAA,MACR,CAACF,CAAG,GAAGC;AAAA,IAAA;AAAA,EACT,CACD;AACH;"}
@@ -0,0 +1,102 @@
1
+ import { anyToComponent as p } from "./components/anyToComponent.js";
2
+ import { arrayToComponent as x } from "./components/arrayToComponent.js";
3
+ import "./components/booleanToComponent.js";
4
+ import "./components/dateToComponent.js";
5
+ import { defaultToComponent as n } from "./components/defaultToComponent.js";
6
+ import { enumToComponent as i } from "./components/enumToComponent.js";
7
+ import { mapToComponent as C } from "./components/mapToComponent.js";
8
+ import { nestedToComponent as T } from "./components/nestedToComponent.js";
9
+ import { numberToComponent as u } from "./components/numberToComponent.js";
10
+ import { objectToEditGrid as c } from "./components/objectToEditGrid.js";
11
+ import { panelToComponent as b } from "./components/panelToComponent.js";
12
+ import { propertiesToComponents as F } from "./components/propertiesToComponents.js";
13
+ import { stringToComponent as E } from "./components/stringToComponent.js";
14
+ import { Component as y } from "./decorators/component.js";
15
+ import { Conditional as w, HideWhen as k, ShowWhen as D } from "./decorators/conditional.js";
16
+ import { Currency as L } from "./decorators/currency.js";
17
+ import { CustomClass as j } from "./decorators/customClass.js";
18
+ import { CustomConditional as I } from "./decorators/customConditional.js";
19
+ import { DataSourceJson as O } from "./decorators/dataSourceJson.js";
20
+ import { DataSourceUrl as U } from "./decorators/dataSourceUrl.js";
21
+ import { ErrorLabel as v } from "./decorators/errorLabel.js";
22
+ import { ErrorMessage as A } from "./decorators/errorMessage.js";
23
+ import { Form as K } from "./decorators/form.js";
24
+ import { Hidden as Q } from "./decorators/hidden.js";
25
+ import { InputTags as Y } from "./decorators/inputTags.js";
26
+ import { Label as _ } from "./decorators/label.js";
27
+ import { Mask as oo, Masks as ro } from "./decorators/mask.js";
28
+ import { MaxWords as to } from "./decorators/maxWords.js";
29
+ import { MinWords as mo } from "./decorators/minWords.js";
30
+ import { ModalEdit as fo } from "./decorators/modalEdit.js";
31
+ import { Multiple as ao } from "./decorators/multiple.js";
32
+ import { OpenWhenEmpty as so } from "./decorators/openWhenEmpty.js";
33
+ import { Password as lo } from "./decorators/password.js";
34
+ import { Placeholder as uo } from "./decorators/placeholder.js";
35
+ import { Prefix as co } from "./decorators/prefix.js";
36
+ import { Select as bo } from "./decorators/select.js";
37
+ import { Suffix as Fo } from "./decorators/suffix.js";
38
+ import { TableView as Eo } from "./decorators/tableView.js";
39
+ import { Tabs as yo } from "./decorators/tabs.js";
40
+ import { Textarea as wo } from "./decorators/textarea.js";
41
+ import { TextCase as Do } from "./decorators/textCase.js";
42
+ import { Tooltip as Lo } from "./decorators/tooltip.js";
43
+ import { Validate as jo } from "./decorators/validate.js";
44
+ import { execMapper as Io, getFormioMapper as Jo, registerFormioMapper as Oo } from "./registries/FormioMappersContainer.js";
45
+ import { FormsContainer as Uo } from "./registries/FormsContainer.js";
46
+ import { getFormioProps as vo } from "./utils/getFormioProps.js";
47
+ import { getFormioSchema as Ao } from "./utils/getFormioSchema.js";
48
+ import { getRef as Ko } from "./utils/getRef.js";
49
+ export {
50
+ y as Component,
51
+ w as Conditional,
52
+ L as Currency,
53
+ j as CustomClass,
54
+ I as CustomConditional,
55
+ O as DataSourceJson,
56
+ U as DataSourceUrl,
57
+ v as ErrorLabel,
58
+ A as ErrorMessage,
59
+ K as Form,
60
+ Uo as FormsContainer,
61
+ Q as Hidden,
62
+ k as HideWhen,
63
+ Y as InputTags,
64
+ _ as Label,
65
+ oo as Mask,
66
+ ro as Masks,
67
+ to as MaxWords,
68
+ mo as MinWords,
69
+ fo as ModalEdit,
70
+ ao as Multiple,
71
+ so as OpenWhenEmpty,
72
+ lo as Password,
73
+ uo as Placeholder,
74
+ co as Prefix,
75
+ bo as Select,
76
+ D as ShowWhen,
77
+ Fo as Suffix,
78
+ Eo as TableView,
79
+ yo as Tabs,
80
+ Do as TextCase,
81
+ wo as Textarea,
82
+ Lo as Tooltip,
83
+ jo as Validate,
84
+ p as anyToComponent,
85
+ x as arrayToComponent,
86
+ n as defaultToComponent,
87
+ i as enumToComponent,
88
+ Io as execMapper,
89
+ Jo as getFormioMapper,
90
+ vo as getFormioProps,
91
+ Ao as getFormioSchema,
92
+ Ko as getRef,
93
+ C as mapToComponent,
94
+ T as nestedToComponent,
95
+ u as numberToComponent,
96
+ c as objectToEditGrid,
97
+ b as panelToComponent,
98
+ F as propertiesToComponents,
99
+ Oo as registerFormioMapper,
100
+ E as stringToComponent
101
+ };
102
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,18 @@
1
+ const o = /* @__PURE__ */ new Map();
2
+ function i(r, e) {
3
+ return o.set(r, e);
4
+ }
5
+ function t(r) {
6
+ if (!o.has(r))
7
+ throw new Error(`Formio ${r} mapper doesn't exists`);
8
+ return o.get(r);
9
+ }
10
+ function p(r, e, n) {
11
+ return t(r)(e, n);
12
+ }
13
+ export {
14
+ p as execMapper,
15
+ t as getFormioMapper,
16
+ i as registerFormioMapper
17
+ };
18
+ //# sourceMappingURL=FormioMappersContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioMappersContainer.js","sources":["../../../src/registries/FormioMappersContainer.ts"],"sourcesContent":["export interface FormioMapper {\n (schema: any, options: any): any;\n}\n\nconst FormioMappersContainer: Map<string, FormioMapper> = new Map();\n\nexport function registerFormioMapper(type: string, mapper: FormioMapper) {\n return FormioMappersContainer.set(type, mapper);\n}\n\nexport function getFormioMapper(type: string): FormioMapper {\n // istanbul ignore next\n if (!FormioMappersContainer.has(type)) {\n throw new Error(`Formio ${type} mapper doesn't exists`);\n }\n return FormioMappersContainer.get(type)!;\n}\n\nexport function execMapper(type: string, schema: any, options: any): any {\n return getFormioMapper(type)(schema, options);\n}\n"],"names":["FormioMappersContainer","registerFormioMapper","type","mapper","getFormioMapper","execMapper","schema","options"],"mappings":"AAIA,MAAMA,wBAAwD,IAAI;AAElD,SAAAC,EAAqBC,GAAcC,GAAsB;AAChE,SAAAH,EAAuB,IAAIE,GAAMC,CAAM;AAChD;AAEO,SAASC,EAAgBF,GAA4B;AAE1D,MAAI,CAACF,EAAuB,IAAIE,CAAI;AAClC,UAAM,IAAI,MAAM,UAAUA,CAAI,wBAAwB;AAEjD,SAAAF,EAAuB,IAAIE,CAAI;AACxC;AAEgB,SAAAG,EAAWH,GAAcI,GAAaC,GAAmB;AACvE,SAAOH,EAAgBF,CAAI,EAAEI,GAAQC,CAAO;AAC9C;"}
@@ -0,0 +1,5 @@
1
+ const n = /* @__PURE__ */ new Map();
2
+ export {
3
+ n as FormsContainer
4
+ };
5
+ //# sourceMappingURL=FormsContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormsContainer.js","sources":["../../../src/registries/FormsContainer.ts"],"sourcesContent":["import {Type} from \"@tsed/core\";\n\n// tslint:disable-next-line:variable-name\nexport const FormsContainer: Map<string, Type> = new Map();\n"],"names":["FormsContainer"],"mappings":"AAGa,MAAAA,wBAAwC,IAAI;"}
@@ -0,0 +1,10 @@
1
+ function n(t) {
2
+ return Object.entries(t).reduce((r, [o, e]) => o.startsWith("x-formio-") ? {
3
+ ...r,
4
+ [o.replace("x-formio-", "")]: e
5
+ } : r, {});
6
+ }
7
+ export {
8
+ n as getFormioProps
9
+ };
10
+ //# sourceMappingURL=getFormioProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFormioProps.js","sources":["../../../src/utils/getFormioProps.ts"],"sourcesContent":["export function getFormioProps(schema: any) {\n const formioProps: any = Object.entries(schema).reduce((props, [key, value]) => {\n if (key.startsWith(\"x-formio-\")) {\n return {\n ...props,\n [key.replace(\"x-formio-\", \"\")]: value\n };\n }\n return props;\n }, {});\n return formioProps;\n}\n"],"names":["getFormioProps","schema","props","key","value"],"mappings":"AAAO,SAASA,EAAeC,GAAa;AAUnC,SATkB,OAAO,QAAQA,CAAM,EAAE,OAAO,CAACC,GAAO,CAACC,GAAKC,CAAK,MACpED,EAAI,WAAW,WAAW,IACrB;AAAA,IACL,GAAGD;AAAA,IACH,CAACC,EAAI,QAAQ,aAAa,EAAE,CAAC,GAAGC;AAAA,EAClC,IAEKF,GACN,EAAE;AAEP;"}