@tsed/schema-formio 8.0.0-alpha.4 → 8.0.0-alpha.6

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 (157) hide show
  1. package/lib/browser/schema-formio.umd.min.js.map +1 -1
  2. package/lib/esm/utils/getFormioSchema.js.map +1 -1
  3. package/lib/types/utils/getFormioSchema.d.ts +13 -13
  4. package/package.json +12 -13
  5. package/lib/cjs/components/anyToComponent.js +0 -28
  6. package/lib/cjs/components/anyToComponent.js.map +0 -1
  7. package/lib/cjs/components/arrayToComponent.js +0 -40
  8. package/lib/cjs/components/arrayToComponent.js.map +0 -1
  9. package/lib/cjs/components/booleanToComponent.js +0 -14
  10. package/lib/cjs/components/booleanToComponent.js.map +0 -1
  11. package/lib/cjs/components/dateToComponent.js +0 -63
  12. package/lib/cjs/components/dateToComponent.js.map +0 -1
  13. package/lib/cjs/components/defaultToComponent.js +0 -18
  14. package/lib/cjs/components/defaultToComponent.js.map +0 -1
  15. package/lib/cjs/components/enumToComponent.js +0 -33
  16. package/lib/cjs/components/enumToComponent.js.map +0 -1
  17. package/lib/cjs/components/mapToComponent.js +0 -20
  18. package/lib/cjs/components/mapToComponent.js.map +0 -1
  19. package/lib/cjs/components/nestedToComponent.js +0 -25
  20. package/lib/cjs/components/nestedToComponent.js.map +0 -1
  21. package/lib/cjs/components/numberToComponent.js +0 -21
  22. package/lib/cjs/components/numberToComponent.js.map +0 -1
  23. package/lib/cjs/components/objectToEditGrid.js +0 -16
  24. package/lib/cjs/components/objectToEditGrid.js.map +0 -1
  25. package/lib/cjs/components/panelToComponent.js +0 -16
  26. package/lib/cjs/components/panelToComponent.js.map +0 -1
  27. package/lib/cjs/components/propertiesToComponents.js +0 -93
  28. package/lib/cjs/components/propertiesToComponents.js.map +0 -1
  29. package/lib/cjs/components/stringToComponent.js +0 -43
  30. package/lib/cjs/components/stringToComponent.js.map +0 -1
  31. package/lib/cjs/decorators/component.js +0 -35
  32. package/lib/cjs/decorators/component.js.map +0 -1
  33. package/lib/cjs/decorators/conditional.js +0 -53
  34. package/lib/cjs/decorators/conditional.js.map +0 -1
  35. package/lib/cjs/decorators/currency.js +0 -24
  36. package/lib/cjs/decorators/currency.js.map +0 -1
  37. package/lib/cjs/decorators/customClass.js +0 -18
  38. package/lib/cjs/decorators/customClass.js.map +0 -1
  39. package/lib/cjs/decorators/customConditional.js +0 -32
  40. package/lib/cjs/decorators/customConditional.js.map +0 -1
  41. package/lib/cjs/decorators/dataSourceJson.js +0 -27
  42. package/lib/cjs/decorators/dataSourceJson.js.map +0 -1
  43. package/lib/cjs/decorators/dataSourceUrl.js +0 -22
  44. package/lib/cjs/decorators/dataSourceUrl.js.map +0 -1
  45. package/lib/cjs/decorators/errorLabel.js +0 -18
  46. package/lib/cjs/decorators/errorLabel.js.map +0 -1
  47. package/lib/cjs/decorators/errorMessage.js +0 -17
  48. package/lib/cjs/decorators/errorMessage.js.map +0 -1
  49. package/lib/cjs/decorators/form.js +0 -22
  50. package/lib/cjs/decorators/form.js.map +0 -1
  51. package/lib/cjs/decorators/hidden.js +0 -22
  52. package/lib/cjs/decorators/hidden.js.map +0 -1
  53. package/lib/cjs/decorators/inputTags.js +0 -23
  54. package/lib/cjs/decorators/inputTags.js.map +0 -1
  55. package/lib/cjs/decorators/label.js +0 -24
  56. package/lib/cjs/decorators/label.js.map +0 -1
  57. package/lib/cjs/decorators/mask.js +0 -50
  58. package/lib/cjs/decorators/mask.js.map +0 -1
  59. package/lib/cjs/decorators/maxWords.js +0 -17
  60. package/lib/cjs/decorators/maxWords.js.map +0 -1
  61. package/lib/cjs/decorators/minWords.js +0 -17
  62. package/lib/cjs/decorators/minWords.js.map +0 -1
  63. package/lib/cjs/decorators/modalEdit.js +0 -18
  64. package/lib/cjs/decorators/modalEdit.js.map +0 -1
  65. package/lib/cjs/decorators/multiple.js +0 -18
  66. package/lib/cjs/decorators/multiple.js.map +0 -1
  67. package/lib/cjs/decorators/openWhenEmpty.js +0 -18
  68. package/lib/cjs/decorators/openWhenEmpty.js.map +0 -1
  69. package/lib/cjs/decorators/password.js +0 -20
  70. package/lib/cjs/decorators/password.js.map +0 -1
  71. package/lib/cjs/decorators/placeholder.js +0 -19
  72. package/lib/cjs/decorators/placeholder.js.map +0 -1
  73. package/lib/cjs/decorators/prefix.js +0 -18
  74. package/lib/cjs/decorators/prefix.js.map +0 -1
  75. package/lib/cjs/decorators/select.js +0 -22
  76. package/lib/cjs/decorators/select.js.map +0 -1
  77. package/lib/cjs/decorators/suffix.js +0 -18
  78. package/lib/cjs/decorators/suffix.js.map +0 -1
  79. package/lib/cjs/decorators/tableView.js +0 -19
  80. package/lib/cjs/decorators/tableView.js.map +0 -1
  81. package/lib/cjs/decorators/tabs.js +0 -22
  82. package/lib/cjs/decorators/tabs.js.map +0 -1
  83. package/lib/cjs/decorators/textCase.js +0 -19
  84. package/lib/cjs/decorators/textCase.js.map +0 -1
  85. package/lib/cjs/decorators/textarea.js +0 -20
  86. package/lib/cjs/decorators/textarea.js.map +0 -1
  87. package/lib/cjs/decorators/tooltip.js +0 -19
  88. package/lib/cjs/decorators/tooltip.js.map +0 -1
  89. package/lib/cjs/decorators/validate.js +0 -22
  90. package/lib/cjs/decorators/validate.js.map +0 -1
  91. package/lib/cjs/domain/FormioDataResolver.js +0 -3
  92. package/lib/cjs/domain/FormioDataResolver.js.map +0 -1
  93. package/lib/cjs/index.js +0 -56
  94. package/lib/cjs/index.js.map +0 -1
  95. package/lib/cjs/package.json +0 -3
  96. package/lib/cjs/registries/FormioMappersContainer.js +0 -21
  97. package/lib/cjs/registries/FormioMappersContainer.js.map +0 -1
  98. package/lib/cjs/registries/FormsContainer.js +0 -6
  99. package/lib/cjs/registries/FormsContainer.js.map +0 -1
  100. package/lib/cjs/utils/getFormioProps.js +0 -17
  101. package/lib/cjs/utils/getFormioProps.js.map +0 -1
  102. package/lib/cjs/utils/getFormioSchema.js +0 -54
  103. package/lib/cjs/utils/getFormioSchema.js.map +0 -1
  104. package/lib/cjs/utils/getRef.js +0 -12
  105. package/lib/cjs/utils/getRef.js.map +0 -1
  106. package/lib/esm/package.json +0 -3
  107. package/lib/types-esm/components/anyToComponent.d.ts +0 -1
  108. package/lib/types-esm/components/arrayToComponent.d.ts +0 -1
  109. package/lib/types-esm/components/booleanToComponent.d.ts +0 -1
  110. package/lib/types-esm/components/dateToComponent.d.ts +0 -1
  111. package/lib/types-esm/components/defaultToComponent.d.ts +0 -1
  112. package/lib/types-esm/components/enumToComponent.d.ts +0 -1
  113. package/lib/types-esm/components/mapToComponent.d.ts +0 -1
  114. package/lib/types-esm/components/nestedToComponent.d.ts +0 -1
  115. package/lib/types-esm/components/numberToComponent.d.ts +0 -1
  116. package/lib/types-esm/components/objectToEditGrid.d.ts +0 -1
  117. package/lib/types-esm/components/panelToComponent.d.ts +0 -1
  118. package/lib/types-esm/components/propertiesToComponents.d.ts +0 -1
  119. package/lib/types-esm/components/stringToComponent.d.ts +0 -1
  120. package/lib/types-esm/decorators/component.d.ts +0 -8
  121. package/lib/types-esm/decorators/conditional.d.ts +0 -33
  122. package/lib/types-esm/decorators/currency.d.ts +0 -8
  123. package/lib/types-esm/decorators/customClass.d.ts +0 -8
  124. package/lib/types-esm/decorators/customConditional.d.ts +0 -59
  125. package/lib/types-esm/decorators/dataSourceJson.d.ts +0 -8
  126. package/lib/types-esm/decorators/dataSourceUrl.d.ts +0 -8
  127. package/lib/types-esm/decorators/errorLabel.d.ts +0 -8
  128. package/lib/types-esm/decorators/errorMessage.d.ts +0 -9
  129. package/lib/types-esm/decorators/form.d.ts +0 -6
  130. package/lib/types-esm/decorators/hidden.d.ts +0 -12
  131. package/lib/types-esm/decorators/inputTags.d.ts +0 -8
  132. package/lib/types-esm/decorators/label.d.ts +0 -9
  133. package/lib/types-esm/decorators/mask.d.ts +0 -37
  134. package/lib/types-esm/decorators/maxWords.d.ts +0 -9
  135. package/lib/types-esm/decorators/minWords.d.ts +0 -9
  136. package/lib/types-esm/decorators/modalEdit.d.ts +0 -8
  137. package/lib/types-esm/decorators/multiple.d.ts +0 -8
  138. package/lib/types-esm/decorators/openWhenEmpty.d.ts +0 -8
  139. package/lib/types-esm/decorators/password.d.ts +0 -12
  140. package/lib/types-esm/decorators/placeholder.d.ts +0 -9
  141. package/lib/types-esm/decorators/prefix.d.ts +0 -8
  142. package/lib/types-esm/decorators/select.d.ts +0 -14
  143. package/lib/types-esm/decorators/suffix.d.ts +0 -8
  144. package/lib/types-esm/decorators/tableView.d.ts +0 -9
  145. package/lib/types-esm/decorators/tabs.d.ts +0 -8
  146. package/lib/types-esm/decorators/textCase.d.ts +0 -9
  147. package/lib/types-esm/decorators/textarea.d.ts +0 -12
  148. package/lib/types-esm/decorators/tooltip.d.ts +0 -9
  149. package/lib/types-esm/decorators/validate.d.ts +0 -10
  150. package/lib/types-esm/domain/FormioDataResolver.d.ts +0 -7
  151. package/lib/types-esm/index.d.ts +0 -52
  152. package/lib/types-esm/registries/FormioMappersContainer.d.ts +0 -6
  153. package/lib/types-esm/registries/FormsContainer.d.ts +0 -2
  154. package/lib/types-esm/utils/getFormioProps.d.ts +0 -1
  155. package/lib/types-esm/utils/getFormioSchema.d.ts +0 -16
  156. package/lib/types-esm/utils/getRef.d.ts +0 -1
  157. /package/{webpack.config.js → webpack.config.cjs} +0 -0
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Select = void 0;
4
- const component_js_1 = require("./component.js");
5
- /**
6
- * Configure the property as Select component.
7
- * @decorator
8
- * @formio
9
- * @property
10
- * @schema
11
- */
12
- function Select(props = {}) {
13
- return (0, component_js_1.Component)({
14
- selectThreshold: 0.3,
15
- input: true,
16
- widget: "choicesjs",
17
- ...props,
18
- type: "select"
19
- });
20
- }
21
- exports.Select = Select;
22
- //# sourceMappingURL=select.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/decorators/select.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AASzC;;;;;;GAMG;AACH,SAAgB,MAAM,CAAC,QAAoB,EAAE;IAC3C,OAAO,IAAA,wBAAS,EAAC;QACf,eAAe,EAAE,GAAG;QACpB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,WAAW;QACnB,GAAG,KAAK;QACR,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC;AACL,CAAC;AARD,wBAQC"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Suffix = void 0;
4
- const component_js_1 = require("./component.js");
5
- /**
6
- * Add suffix word on the decorated field.
7
- * @decorator
8
- * @formio
9
- * @property
10
- * @schema
11
- */
12
- function Suffix(suffix) {
13
- return (0, component_js_1.Component)({
14
- suffix
15
- });
16
- }
17
- exports.Suffix = Suffix;
18
- //# sourceMappingURL=suffix.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"suffix.js","sourceRoot":"","sources":["../../../src/decorators/suffix.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AAEzC;;;;;;GAMG;AACH,SAAgB,MAAM,CAAC,MAAc;IACnC,OAAO,IAAA,wBAAS,EAAC;QACf,MAAM;KACP,CAAC,CAAC;AACL,CAAC;AAJD,wBAIC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TableView = void 0;
4
- const component_js_1 = require("./component.js");
5
- /**
6
- * Change the visibility of the current property on a table.
7
- * @param bool
8
- * @decorator
9
- * @formio
10
- * @property
11
- * @schema
12
- */
13
- function TableView(bool) {
14
- return (0, component_js_1.Component)({
15
- tableView: bool
16
- });
17
- }
18
- exports.TableView = TableView;
19
- //# sourceMappingURL=tableView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tableView.js","sourceRoot":"","sources":["../../../src/decorators/tableView.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AAEzC;;;;;;;GAOG;AACH,SAAgB,SAAS,CAAC,IAAa;IACrC,OAAO,IAAA,wBAAS,EAAC;QACf,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;AACL,CAAC;AAJD,8BAIC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Tabs = void 0;
4
- const schema_1 = require("@tsed/schema");
5
- const change_case_1 = require("change-case");
6
- /**
7
- * Group the current property in tabs components.
8
- * @decorator
9
- * @formio
10
- * @property
11
- * @schema
12
- */
13
- function Tabs(label) {
14
- return (0, schema_1.JsonEntityFn)((store) => {
15
- store.schema.customKey("x-formiotabs", {
16
- key: (0, change_case_1.camelCase)(label),
17
- label
18
- });
19
- });
20
- }
21
- exports.Tabs = Tabs;
22
- //# sourceMappingURL=tabs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/decorators/tabs.ts"],"names":[],"mappings":";;;AAAA,yCAA2D;AAC3D,6CAAsC;AAEtC;;;;;;GAMG;AACH,SAAgB,IAAI,CAAC,KAAa;IAChC,OAAO,IAAA,qBAAY,EAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,EAAE;YACrC,GAAG,EAAE,IAAA,uBAAS,EAAC,KAAK,CAAC;YACrB,KAAK;SACN,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,oBAOC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TextCase = void 0;
4
- const component_js_1 = require("./component.js");
5
- /**
6
- * Force the output of this field to be sanitized in a specific format.
7
- * @decorator
8
- * @formio
9
- * @property
10
- * @schema
11
- * @param textCase
12
- */
13
- function TextCase(textCase) {
14
- return (0, component_js_1.Component)({
15
- case: textCase
16
- });
17
- }
18
- exports.TextCase = TextCase;
19
- //# sourceMappingURL=textCase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"textCase.js","sourceRoot":"","sources":["../../../src/decorators/textCase.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AAEzC;;;;;;;GAOG;AACH,SAAgB,QAAQ,CAAC,QAAmC;IAC1D,OAAO,IAAA,wBAAS,EAAC;QACf,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC;AACL,CAAC;AAJD,4BAIC"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Textarea = void 0;
4
- const component_js_1 = require("./component.js");
5
- /**
6
- * Configure the property as Textarea component.
7
- * @decorator
8
- * @formio
9
- * @property
10
- * @schema
11
- */
12
- function Textarea(props = {}) {
13
- return (0, component_js_1.Component)({
14
- autoExpand: false,
15
- ...props,
16
- type: "textarea"
17
- });
18
- }
19
- exports.Textarea = Textarea;
20
- //# sourceMappingURL=textarea.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/decorators/textarea.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AAOzC;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,QAAsB,EAAE;IAC/C,OAAO,IAAA,wBAAS,EAAC;QACf,UAAU,EAAE,KAAK;QACjB,GAAG,KAAK;QACR,IAAI,EAAE,UAAU;KACjB,CAAC,CAAC;AACL,CAAC;AAND,4BAMC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Tooltip = void 0;
4
- const component_js_1 = require("./component.js");
5
- /**
6
- * Adds a tooltip to the side of this field.
7
- * @decorator
8
- * @formio
9
- * @property
10
- * @schema
11
- * @param tooltip
12
- */
13
- function Tooltip(tooltip) {
14
- return (0, component_js_1.Component)({
15
- tooltip
16
- });
17
- }
18
- exports.Tooltip = Tooltip;
19
- //# sourceMappingURL=tooltip.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/decorators/tooltip.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AAEzC;;;;;;;GAOG;AACH,SAAgB,OAAO,CAAC,OAAe;IACrC,OAAO,IAAA,wBAAS,EAAC;QACf,OAAO;KACR,CAAC,CAAC;AACL,CAAC;AAJD,0BAIC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Validate = void 0;
4
- const component_js_1 = require("./component.js");
5
- /**
6
- * Add validation rules.
7
- * @decorator
8
- * @formio
9
- * @property
10
- * @schema
11
- * @param key
12
- * @param value
13
- */
14
- function Validate(key, value) {
15
- return (0, component_js_1.Component)({
16
- validate: {
17
- [key]: value
18
- }
19
- });
20
- }
21
- exports.Validate = Validate;
22
- //# sourceMappingURL=validate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/decorators/validate.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AAEzC;;;;;;;;GAQG;AACH,SAAgB,QAAQ,CAAC,GAAW,EAAE,KAAU;IAC9C,OAAO,IAAA,wBAAS,EAAC;QACf,QAAQ,EAAE;YACR,CAAC,GAAG,CAAC,EAAE,KAAK;SACb;KACF,CAAC,CAAC;AACL,CAAC;AAND,4BAMC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=FormioDataResolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioDataResolver.js","sourceRoot":"","sources":["../../../src/domain/FormioDataResolver.ts"],"names":[],"mappings":""}
package/lib/cjs/index.js DELETED
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- /**
5
- * @file Automatically generated by @tsed/barrels.
6
- */
7
- tslib_1.__exportStar(require("./components/anyToComponent.js"), exports);
8
- tslib_1.__exportStar(require("./components/arrayToComponent.js"), exports);
9
- tslib_1.__exportStar(require("./components/booleanToComponent.js"), exports);
10
- tslib_1.__exportStar(require("./components/dateToComponent.js"), exports);
11
- tslib_1.__exportStar(require("./components/defaultToComponent.js"), exports);
12
- tslib_1.__exportStar(require("./components/enumToComponent.js"), exports);
13
- tslib_1.__exportStar(require("./components/mapToComponent.js"), exports);
14
- tslib_1.__exportStar(require("./components/nestedToComponent.js"), exports);
15
- tslib_1.__exportStar(require("./components/numberToComponent.js"), exports);
16
- tslib_1.__exportStar(require("./components/objectToEditGrid.js"), exports);
17
- tslib_1.__exportStar(require("./components/panelToComponent.js"), exports);
18
- tslib_1.__exportStar(require("./components/propertiesToComponents.js"), exports);
19
- tslib_1.__exportStar(require("./components/stringToComponent.js"), exports);
20
- tslib_1.__exportStar(require("./decorators/component.js"), exports);
21
- tslib_1.__exportStar(require("./decorators/conditional.js"), exports);
22
- tslib_1.__exportStar(require("./decorators/currency.js"), exports);
23
- tslib_1.__exportStar(require("./decorators/customClass.js"), exports);
24
- tslib_1.__exportStar(require("./decorators/customConditional.js"), exports);
25
- tslib_1.__exportStar(require("./decorators/dataSourceJson.js"), exports);
26
- tslib_1.__exportStar(require("./decorators/dataSourceUrl.js"), exports);
27
- tslib_1.__exportStar(require("./decorators/errorLabel.js"), exports);
28
- tslib_1.__exportStar(require("./decorators/errorMessage.js"), exports);
29
- tslib_1.__exportStar(require("./decorators/form.js"), exports);
30
- tslib_1.__exportStar(require("./decorators/hidden.js"), exports);
31
- tslib_1.__exportStar(require("./decorators/inputTags.js"), exports);
32
- tslib_1.__exportStar(require("./decorators/label.js"), exports);
33
- tslib_1.__exportStar(require("./decorators/mask.js"), exports);
34
- tslib_1.__exportStar(require("./decorators/maxWords.js"), exports);
35
- tslib_1.__exportStar(require("./decorators/minWords.js"), exports);
36
- tslib_1.__exportStar(require("./decorators/modalEdit.js"), exports);
37
- tslib_1.__exportStar(require("./decorators/multiple.js"), exports);
38
- tslib_1.__exportStar(require("./decorators/openWhenEmpty.js"), exports);
39
- tslib_1.__exportStar(require("./decorators/password.js"), exports);
40
- tslib_1.__exportStar(require("./decorators/placeholder.js"), exports);
41
- tslib_1.__exportStar(require("./decorators/prefix.js"), exports);
42
- tslib_1.__exportStar(require("./decorators/select.js"), exports);
43
- tslib_1.__exportStar(require("./decorators/suffix.js"), exports);
44
- tslib_1.__exportStar(require("./decorators/tableView.js"), exports);
45
- tslib_1.__exportStar(require("./decorators/tabs.js"), exports);
46
- tslib_1.__exportStar(require("./decorators/textarea.js"), exports);
47
- tslib_1.__exportStar(require("./decorators/textCase.js"), exports);
48
- tslib_1.__exportStar(require("./decorators/tooltip.js"), exports);
49
- tslib_1.__exportStar(require("./decorators/validate.js"), exports);
50
- tslib_1.__exportStar(require("./domain/FormioDataResolver.js"), exports);
51
- tslib_1.__exportStar(require("./registries/FormioMappersContainer.js"), exports);
52
- tslib_1.__exportStar(require("./registries/FormsContainer.js"), exports);
53
- tslib_1.__exportStar(require("./utils/getFormioProps.js"), exports);
54
- tslib_1.__exportStar(require("./utils/getFormioSchema.js"), exports);
55
- tslib_1.__exportStar(require("./utils/getRef.js"), exports);
56
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,yEAA+C;AAC/C,2EAAiD;AACjD,6EAAmD;AACnD,0EAAgD;AAChD,6EAAmD;AACnD,0EAAgD;AAChD,yEAA+C;AAC/C,4EAAkD;AAClD,4EAAkD;AAClD,2EAAiD;AACjD,2EAAiD;AACjD,iFAAuD;AACvD,4EAAkD;AAClD,oEAA0C;AAC1C,sEAA4C;AAC5C,mEAAyC;AACzC,sEAA4C;AAC5C,4EAAkD;AAClD,yEAA+C;AAC/C,wEAA8C;AAC9C,qEAA2C;AAC3C,uEAA6C;AAC7C,+DAAqC;AACrC,iEAAuC;AACvC,oEAA0C;AAC1C,gEAAsC;AACtC,+DAAqC;AACrC,mEAAyC;AACzC,mEAAyC;AACzC,oEAA0C;AAC1C,mEAAyC;AACzC,wEAA8C;AAC9C,mEAAyC;AACzC,sEAA4C;AAC5C,iEAAuC;AACvC,iEAAuC;AACvC,iEAAuC;AACvC,oEAA0C;AAC1C,+DAAqC;AACrC,mEAAyC;AACzC,mEAAyC;AACzC,kEAAwC;AACxC,mEAAyC;AACzC,yEAA+C;AAC/C,iFAAuD;AACvD,yEAA+C;AAC/C,oEAA0C;AAC1C,qEAA2C;AAC3C,4DAAkC"}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.execMapper = exports.getFormioMapper = exports.registerFormioMapper = void 0;
4
- const FormioMappersContainer = new Map();
5
- function registerFormioMapper(type, mapper) {
6
- return FormioMappersContainer.set(type, mapper);
7
- }
8
- exports.registerFormioMapper = registerFormioMapper;
9
- function getFormioMapper(type) {
10
- // istanbul ignore next
11
- if (!FormioMappersContainer.has(type)) {
12
- throw new Error(`Formio ${type} mapper doesn't exists`);
13
- }
14
- return FormioMappersContainer.get(type);
15
- }
16
- exports.getFormioMapper = getFormioMapper;
17
- function execMapper(type, schema, options) {
18
- return getFormioMapper(type)(schema, options);
19
- }
20
- exports.execMapper = execMapper;
21
- //# sourceMappingURL=FormioMappersContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioMappersContainer.js","sourceRoot":"","sources":["../../../src/registries/FormioMappersContainer.ts"],"names":[],"mappings":";;;AAIA,MAAM,sBAAsB,GAA8B,IAAI,GAAG,EAAE,CAAC;AAEpE,SAAgB,oBAAoB,CAAC,IAAY,EAAE,MAAoB;IACrE,OAAO,sBAAsB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAFD,oDAEC;AAED,SAAgB,eAAe,CAAC,IAAY;IAC1C,uBAAuB;IACvB,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACrC,MAAM,IAAI,KAAK,CAAC,UAAU,IAAI,wBAAwB,CAAC,CAAC;KACzD;IACD,OAAO,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;AAC3C,CAAC;AAND,0CAMC;AAED,SAAgB,UAAU,CAAC,IAAY,EAAE,MAAW,EAAE,OAAY;IAChE,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC;AAFD,gCAEC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FormsContainer = void 0;
4
- // tslint:disable-next-line:variable-name
5
- exports.FormsContainer = new Map();
6
- //# sourceMappingURL=FormsContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormsContainer.js","sourceRoot":"","sources":["../../../src/registries/FormsContainer.ts"],"names":[],"mappings":";;;AAEA,yCAAyC;AAC5B,QAAA,cAAc,GAAsB,IAAI,GAAG,EAAE,CAAC"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFormioProps = void 0;
4
- function getFormioProps(schema) {
5
- const formioProps = Object.entries(schema).reduce((props, [key, value]) => {
6
- if (key.startsWith("x-formio-")) {
7
- return {
8
- ...props,
9
- [key.replace("x-formio-", "")]: value
10
- };
11
- }
12
- return props;
13
- }, {});
14
- return formioProps;
15
- }
16
- exports.getFormioProps = getFormioProps;
17
- //# sourceMappingURL=getFormioProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getFormioProps.js","sourceRoot":"","sources":["../../../src/utils/getFormioProps.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc,CAAC,MAAW;IACxC,MAAM,WAAW,GAAQ,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC7E,IAAI,GAAG,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE;YAC/B,OAAO;gBACL,GAAG,KAAK;gBACR,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK;aACtC,CAAC;SACH;QACD,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,WAAW,CAAC;AACrB,CAAC;AAXD,wCAWC"}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFormioSchema = void 0;
4
- const core_1 = require("@tsed/core");
5
- const schema_1 = require("@tsed/schema");
6
- const FormioMappersContainer_js_1 = require("../registries/FormioMappersContainer.js");
7
- const FormsContainer_js_1 = require("../registries/FormsContainer.js");
8
- const change_case_1 = require("change-case");
9
- require("../components/anyToComponent");
10
- require("../components/arrayToComponent");
11
- require("../components/booleanToComponent");
12
- require("../components/dateToComponent");
13
- require("../components/defaultToComponent");
14
- require("../components/enumToComponent");
15
- require("../components/mapToComponent");
16
- require("../components/nestedToComponent");
17
- require("../components/numberToComponent");
18
- require("../components/objectToEditGrid");
19
- require("../components/panelToComponent");
20
- require("../components/propertiesToComponents");
21
- require("../components/stringToComponent");
22
- async function getFormioSchema(model, options = {}) {
23
- if (!model) {
24
- return undefined;
25
- }
26
- if ((0, core_1.isString)(model)) {
27
- return getFormioSchema(FormsContainer_js_1.FormsContainer.get(model), options);
28
- }
29
- const entity = schema_1.JsonEntityStore.from(model);
30
- const schema = (0, schema_1.getJsonSchema)(entity, {
31
- ...options,
32
- customKeys: true
33
- });
34
- const name = entity.schema.getName();
35
- const machineName = (0, change_case_1.paramCase)(name);
36
- const resolvers = [];
37
- const components = (0, FormioMappersContainer_js_1.execMapper)("properties", schema, { ...options, definitions: schema.definitions, resolvers });
38
- const form = {
39
- title: name,
40
- type: "form",
41
- display: "form",
42
- tags: [],
43
- access: [],
44
- submissionAccess: [],
45
- ...entity.store.get("formio:form", {}),
46
- name: machineName,
47
- machineName,
48
- components
49
- };
50
- await Promise.all(resolvers.map((resolver) => resolver(form, options)));
51
- return form;
52
- }
53
- exports.getFormioSchema = getFormioSchema;
54
- //# sourceMappingURL=getFormioSchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getFormioSchema.js","sourceRoot":"","sources":["../../../src/utils/getFormioSchema.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,yCAA+E;AAE/E,uFAAmE;AACnE,uEAA+D;AAC/D,6CAAsC;AACtC,wCAAsC;AACtC,0CAAwC;AACxC,4CAA0C;AAC1C,yCAAuC;AACvC,4CAA0C;AAC1C,yCAAuC;AACvC,wCAAsC;AACtC,2CAAyC;AACzC,2CAAyC;AACzC,0CAAwC;AACxC,0CAAwC;AACxC,gDAA8C;AAC9C,2CAAyC;AAElC,KAAK,UAAU,eAAe,CACnC,KAA+B,EAC/B,UAA6B,EAAE;IAE/B,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,IAAA,eAAQ,EAAC,KAAK,CAAC,EAAE;QACnB,OAAO,eAAe,CAAC,kCAAc,CAAC,GAAG,CAAC,KAAK,CAAc,EAAE,OAAO,CAAC,CAAC;KACzE;IAED,MAAM,MAAM,GAAG,wBAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAA,sBAAa,EAAC,MAAM,EAAE;QACnC,GAAG,OAAO;QACV,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;IACrC,MAAM,WAAW,GAAG,IAAA,uBAAS,EAAC,IAAI,CAAC,CAAC;IACpC,MAAM,SAAS,GAAmB,EAAE,CAAC;IACrC,MAAM,UAAU,GAAG,IAAA,sCAAU,EAAC,YAAY,EAAE,MAAM,EAAE,EAAC,GAAG,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,SAAS,EAAC,CAAC,CAAC;IAC9G,MAAM,IAAI,GAAG;QACX,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,EAAE;QACV,gBAAgB,EAAE,EAAE;QACpB,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAM,aAAa,EAAE,EAAE,CAAC;QAC3C,IAAI,EAAE,WAAW;QACjB,WAAW;QACX,UAAU;KACX,CAAC;IAEF,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAa,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAE7E,OAAO,IAA6B,CAAC;AACvC,CAAC;AAtCD,0CAsCC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRef = void 0;
4
- const core_1 = require("@tsed/core");
5
- function getRef(schema, options) {
6
- if (schema.$ref) {
7
- return (0, core_1.getValue)(options, schema.$ref.replace("#/", "").replace(/\//g, "."));
8
- }
9
- return schema;
10
- }
11
- exports.getRef = getRef;
12
- //# sourceMappingURL=getRef.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getRef.js","sourceRoot":"","sources":["../../../src/utils/getRef.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAEpC,SAAgB,MAAM,CAAC,MAAW,EAAE,OAAY;IAC9C,IAAI,MAAM,CAAC,IAAI,EAAE;QACf,OAAO,IAAA,eAAQ,EAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;KAC7E;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AALD,wBAKC"}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
@@ -1 +0,0 @@
1
- export declare function anyToComponent(schema: any, options: any): any;
@@ -1 +0,0 @@
1
- export declare function arrayToComponent(schema: any, options: any): any;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export declare function defaultToComponent(schema: any, options: any): any;
@@ -1 +0,0 @@
1
- export declare function enumToComponent(schema: any, options: any): any;
@@ -1 +0,0 @@
1
- export declare function mapToComponent(schema: any, options: any): any;
@@ -1 +0,0 @@
1
- export declare function nestedToComponent(schema: any, options: any): any;
@@ -1 +0,0 @@
1
- export declare function numberToComponent(schema: any, options: any): any;
@@ -1 +0,0 @@
1
- export declare function objectToEditGrid(schema: any, options: any): any;
@@ -1 +0,0 @@
1
- export declare function panelToComponent(schema: any, options: any): any;
@@ -1 +0,0 @@
1
- export declare function propertiesToComponents(schema: any, options: any): any[];
@@ -1 +0,0 @@
1
- export declare function stringToComponent(schema: any, options: any): any;
@@ -1,8 +0,0 @@
1
- /**
2
- * Declare a formio Component schema on the decorated propertyKey.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- */
8
- export declare function Component(component: Record<string, any>): PropertyDecorator;
@@ -1,33 +0,0 @@
1
- /**
2
- * Adds a conditional display rule on the input form.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- * @param conditional
8
- */
9
- export declare function Conditional(conditional: {
10
- show: boolean;
11
- when: string;
12
- eq: any;
13
- }): PropertyDecorator;
14
- /**
15
- * Adds a conditional display rule on the input form.
16
- * @decorator
17
- * @formio
18
- * @property
19
- * @schema
20
- * @param property
21
- * @param eq
22
- */
23
- export declare function ShowWhen(property: string, eq: any): PropertyDecorator;
24
- /**
25
- * Adds a conditional display rule on the input form.
26
- * @decorator
27
- * @formio
28
- * @property
29
- * @schema
30
- * @param property
31
- * @param eq
32
- */
33
- export declare function HideWhen(property: string, eq: any): PropertyDecorator;
@@ -1,8 +0,0 @@
1
- /**
2
- * Configure the property as Currency component.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- */
8
- export declare function Currency(props?: Record<string, any>): PropertyDecorator;
@@ -1,8 +0,0 @@
1
- /**
2
- * Add a custom css class.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- */
8
- export declare function CustomClass(customClass: string): PropertyDecorator;
@@ -1,59 +0,0 @@
1
- import { FormioComponent, FormioForm, FormioSubmission } from "@tsed/formio-types";
2
- import type { Moment } from "moment";
3
- import type { LoDashStatic } from "lodash";
4
- import type { Utils } from "formiojs";
5
- export interface CustomConditionalCtx<Value = any, Data = any, Row = any> {
6
- /**
7
- * The complete submission object.
8
- */
9
- form: FormioForm;
10
- /**
11
- * The complete submission object.
12
- */
13
- submission: FormioSubmission<Data>;
14
- /**
15
- * The complete submission data object.
16
- */
17
- data: Data;
18
- /**
19
- * Contextual "row" data, used within DataGrid, EditGrid, and Container components
20
- */
21
- row: Row;
22
- /**
23
- * The current component JSON
24
- */
25
- component: FormioComponent;
26
- /**
27
- * The current component instance.
28
- */
29
- instance: any;
30
- /**
31
- * The current value of the component.
32
- */
33
- value: Value;
34
- /**
35
- * The moment.js library for date manipulation.
36
- */
37
- moment: Moment;
38
- /**
39
- * An instance of Lodash.
40
- */
41
- _: LoDashStatic;
42
- /**
43
- * An instance of the FormioUtils object.
44
- */
45
- utils: typeof Utils;
46
- /**
47
- * An alias for "utils".
48
- */
49
- util: typeof Utils;
50
- }
51
- /**
52
- * Adds custom conditional rule to display or not the input form.
53
- * @decorator
54
- * @formio
55
- * @property
56
- * @schema
57
- * @param customConditional
58
- */
59
- export declare function CustomConditional(customConditional: string | ((ctx: CustomConditionalCtx) => any)): PropertyDecorator;
@@ -1,8 +0,0 @@
1
- import { FormioDataResolver } from "../domain/FormioDataResolver.js";
2
- /**
3
- * Set custom json data source
4
- * @param data
5
- * @param props
6
- * @constructor
7
- */
8
- export declare function DataSourceJson(data: any | FormioDataResolver, props?: Record<string, any>): PropertyDecorator;
@@ -1,8 +0,0 @@
1
- import { FormioDataResolver } from "../domain/FormioDataResolver.js";
2
- /**
3
- * Set URL data on the current component.
4
- * @param url
5
- * @param props
6
- * @constructor
7
- */
8
- export declare function DataSourceUrl(url: string | FormioDataResolver, props?: Record<string, any>): PropertyDecorator;
@@ -1,8 +0,0 @@
1
- /**
2
- * Set the error label when an error occur.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- */
8
- export declare function ErrorLabel(message: string): PropertyDecorator;
@@ -1,9 +0,0 @@
1
- /**
2
- * Add error message when an error occur.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- * @param message
8
- */
9
- export declare function ErrorMessage(message: string): PropertyDecorator;
@@ -1,6 +0,0 @@
1
- import { FormioForm } from "@tsed/formio-types";
2
- /**
3
- * Expose the model as Formio Form.
4
- * @param form
5
- */
6
- export declare function Form(form?: Partial<Omit<FormioForm, "components" | "_id">>): ClassDecorator;