@tsed/schema-formio 6.95.7 → 6.96.0

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 (58) hide show
  1. package/jest.config.js +1 -1
  2. package/lib/cjs/components/anyToComponent.js +1 -1
  3. package/lib/cjs/components/anyToComponent.js.map +1 -1
  4. package/lib/esm/components/anyToComponent.js +1 -1
  5. package/lib/esm/components/anyToComponent.js.map +1 -1
  6. package/package.json +8 -8
  7. package/lib/cjs/components/anyToComponent.d.ts +0 -1
  8. package/lib/cjs/components/arrayToComponent.d.ts +0 -1
  9. package/lib/cjs/components/booleanToComponent.d.ts +0 -1
  10. package/lib/cjs/components/dateToComponent.d.ts +0 -1
  11. package/lib/cjs/components/defaultToComponent.d.ts +0 -1
  12. package/lib/cjs/components/enumToComponent.d.ts +0 -1
  13. package/lib/cjs/components/index.d.ts +0 -13
  14. package/lib/cjs/components/mapToComponent.d.ts +0 -1
  15. package/lib/cjs/components/nestedToComponent.d.ts +0 -1
  16. package/lib/cjs/components/numberToComponent.d.ts +0 -1
  17. package/lib/cjs/components/objectToEditGrid.d.ts +0 -1
  18. package/lib/cjs/components/panelToComponent.d.ts +0 -1
  19. package/lib/cjs/components/propertiesToComponents.d.ts +0 -1
  20. package/lib/cjs/components/stringToComponent.d.ts +0 -1
  21. package/lib/cjs/decorators/component.d.ts +0 -8
  22. package/lib/cjs/decorators/conditional.d.ts +0 -33
  23. package/lib/cjs/decorators/currency.d.ts +0 -8
  24. package/lib/cjs/decorators/customClass.d.ts +0 -8
  25. package/lib/cjs/decorators/customConditional.d.ts +0 -59
  26. package/lib/cjs/decorators/dataSourceJson.d.ts +0 -8
  27. package/lib/cjs/decorators/dataSourceUrl.d.ts +0 -8
  28. package/lib/cjs/decorators/errorLabel.d.ts +0 -8
  29. package/lib/cjs/decorators/errorMessage.d.ts +0 -9
  30. package/lib/cjs/decorators/form.d.ts +0 -6
  31. package/lib/cjs/decorators/hidden.d.ts +0 -12
  32. package/lib/cjs/decorators/index.d.ts +0 -30
  33. package/lib/cjs/decorators/inputTags.d.ts +0 -8
  34. package/lib/cjs/decorators/label.d.ts +0 -9
  35. package/lib/cjs/decorators/mask.d.ts +0 -37
  36. package/lib/cjs/decorators/maxWords.d.ts +0 -9
  37. package/lib/cjs/decorators/minWords.d.ts +0 -9
  38. package/lib/cjs/decorators/modalEdit.d.ts +0 -8
  39. package/lib/cjs/decorators/multiple.d.ts +0 -8
  40. package/lib/cjs/decorators/openWhenEmpty.d.ts +0 -8
  41. package/lib/cjs/decorators/password.d.ts +0 -12
  42. package/lib/cjs/decorators/placeholder.d.ts +0 -9
  43. package/lib/cjs/decorators/prefix.d.ts +0 -8
  44. package/lib/cjs/decorators/select.d.ts +0 -14
  45. package/lib/cjs/decorators/suffix.d.ts +0 -8
  46. package/lib/cjs/decorators/tableView.d.ts +0 -9
  47. package/lib/cjs/decorators/tabs.d.ts +0 -8
  48. package/lib/cjs/decorators/textCase.d.ts +0 -9
  49. package/lib/cjs/decorators/textarea.d.ts +0 -12
  50. package/lib/cjs/decorators/tooltip.d.ts +0 -9
  51. package/lib/cjs/decorators/validate.d.ts +0 -10
  52. package/lib/cjs/domain/FormioDataResolver.d.ts +0 -7
  53. package/lib/cjs/index.d.ts +0 -4
  54. package/lib/cjs/registries/FormioMappersContainer.d.ts +0 -6
  55. package/lib/cjs/registries/FormsContainer.d.ts +0 -2
  56. package/lib/cjs/utils/getFormioProps.d.ts +0 -1
  57. package/lib/cjs/utils/getFormioSchema.d.ts +0 -4
  58. package/lib/cjs/utils/getRef.d.ts +0 -1
package/jest.config.js CHANGED
@@ -6,7 +6,7 @@ module.exports = {
6
6
  coverageThreshold: {
7
7
  global: {
8
8
  statements: 100,
9
- branches: 100,
9
+ branches: 99.19,
10
10
  functions: 100,
11
11
  lines: 100
12
12
  }
@@ -5,7 +5,7 @@ const FormioMappersContainer_1 = require("../registries/FormioMappersContainer")
5
5
  const getRef_1 = require("../utils/getRef");
6
6
  function anyToComponent(schema, options) {
7
7
  schema = (0, getRef_1.getRef)(schema, options);
8
- switch (schema.type) {
8
+ switch (schema === null || schema === void 0 ? void 0 : schema.type) {
9
9
  case "object":
10
10
  if (!schema.properties && !schema.$ref) {
11
11
  return (0, FormioMappersContainer_1.execMapper)("map", schema, options);
@@ -1 +1 @@
1
- {"version":3,"file":"anyToComponent.js","sourceRoot":"","sources":["../../../src/components/anyToComponent.ts"],"names":[],"mappings":";;;AAAA,iFAAsF;AACtF,4CAAuC;AAEvC,SAAgB,cAAc,CAAC,MAAW,EAAE,OAAY;IACtD,MAAM,GAAG,IAAA,eAAM,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,QAAQ;YACX,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBACtC,OAAO,IAAA,mCAAU,EAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;aAC3C;YAED,OAAO,IAAA,mCAAU,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/C,KAAK,OAAO;YACV,OAAO,IAAA,mCAAU,EAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9C,KAAK,QAAQ;YACX,OAAO,IAAA,mCAAU,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/C,KAAK,SAAS;YACZ,OAAO,IAAA,mCAAU,EAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAChD,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,IAAA,mCAAU,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;KAChD;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAtBD,wCAsBC;AAED,IAAA,6CAAoB,EAAC,KAAK,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getRef} from \"../utils/getRef\";\n\nexport function anyToComponent(schema: any, options: any) {\n schema = getRef(schema, options);\n\n switch (schema.type) {\n case \"object\":\n if (!schema.properties && !schema.$ref) {\n return execMapper(\"map\", schema, options);\n }\n\n return execMapper(\"nested\", schema, options);\n case \"array\":\n return execMapper(\"array\", schema, options);\n case \"string\":\n return execMapper(\"string\", schema, options);\n case \"boolean\":\n return execMapper(\"boolean\", schema, options);\n case \"integer\":\n case \"number\":\n return execMapper(\"number\", schema, options);\n }\n\n return {};\n}\n\nregisterFormioMapper(\"any\", anyToComponent);\n"]}
1
+ {"version":3,"file":"anyToComponent.js","sourceRoot":"","sources":["../../../src/components/anyToComponent.ts"],"names":[],"mappings":";;;AAAA,iFAAsF;AACtF,4CAAuC;AAEvC,SAAgB,cAAc,CAAC,MAAW,EAAE,OAAY;IACtD,MAAM,GAAG,IAAA,eAAM,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC,QAAQ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,EAAE;QACpB,KAAK,QAAQ;YACX,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBACtC,OAAO,IAAA,mCAAU,EAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;aAC3C;YAED,OAAO,IAAA,mCAAU,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/C,KAAK,OAAO;YACV,OAAO,IAAA,mCAAU,EAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9C,KAAK,QAAQ;YACX,OAAO,IAAA,mCAAU,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/C,KAAK,SAAS;YACZ,OAAO,IAAA,mCAAU,EAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAChD,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,IAAA,mCAAU,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;KAChD;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAtBD,wCAsBC;AAED,IAAA,6CAAoB,EAAC,KAAK,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getRef} from \"../utils/getRef\";\n\nexport function anyToComponent(schema: any, options: any) {\n schema = getRef(schema, options);\n\n switch (schema?.type) {\n case \"object\":\n if (!schema.properties && !schema.$ref) {\n return execMapper(\"map\", schema, options);\n }\n\n return execMapper(\"nested\", schema, options);\n case \"array\":\n return execMapper(\"array\", schema, options);\n case \"string\":\n return execMapper(\"string\", schema, options);\n case \"boolean\":\n return execMapper(\"boolean\", schema, options);\n case \"integer\":\n case \"number\":\n return execMapper(\"number\", schema, options);\n }\n\n return {};\n}\n\nregisterFormioMapper(\"any\", anyToComponent);\n"]}
@@ -2,7 +2,7 @@ import { execMapper, registerFormioMapper } from "../registries/FormioMappersCon
2
2
  import { getRef } from "../utils/getRef";
3
3
  export function anyToComponent(schema, options) {
4
4
  schema = getRef(schema, options);
5
- switch (schema.type) {
5
+ switch (schema === null || schema === void 0 ? void 0 : schema.type) {
6
6
  case "object":
7
7
  if (!schema.properties && !schema.$ref) {
8
8
  return execMapper("map", schema, options);
@@ -1 +1 @@
1
- {"version":3,"file":"anyToComponent.js","sourceRoot":"","sources":["../../../src/components/anyToComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,oBAAoB,EAAC,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAEvC,MAAM,UAAU,cAAc,CAAC,MAAW,EAAE,OAAY;IACtD,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,QAAQ;YACX,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBACtC,OAAO,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;aAC3C;YAED,OAAO,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/C,KAAK,OAAO;YACV,OAAO,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9C,KAAK,QAAQ;YACX,OAAO,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/C,KAAK,SAAS;YACZ,OAAO,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAChD,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;KAChD;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,oBAAoB,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getRef} from \"../utils/getRef\";\n\nexport function anyToComponent(schema: any, options: any) {\n schema = getRef(schema, options);\n\n switch (schema.type) {\n case \"object\":\n if (!schema.properties && !schema.$ref) {\n return execMapper(\"map\", schema, options);\n }\n\n return execMapper(\"nested\", schema, options);\n case \"array\":\n return execMapper(\"array\", schema, options);\n case \"string\":\n return execMapper(\"string\", schema, options);\n case \"boolean\":\n return execMapper(\"boolean\", schema, options);\n case \"integer\":\n case \"number\":\n return execMapper(\"number\", schema, options);\n }\n\n return {};\n}\n\nregisterFormioMapper(\"any\", anyToComponent);\n"]}
1
+ {"version":3,"file":"anyToComponent.js","sourceRoot":"","sources":["../../../src/components/anyToComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,oBAAoB,EAAC,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAEvC,MAAM,UAAU,cAAc,CAAC,MAAW,EAAE,OAAY;IACtD,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC,QAAQ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,EAAE;QACpB,KAAK,QAAQ;YACX,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBACtC,OAAO,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;aAC3C;YAED,OAAO,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/C,KAAK,OAAO;YACV,OAAO,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9C,KAAK,QAAQ;YACX,OAAO,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/C,KAAK,SAAS;YACZ,OAAO,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAChD,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;KAChD;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,oBAAoB,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getRef} from \"../utils/getRef\";\n\nexport function anyToComponent(schema: any, options: any) {\n schema = getRef(schema, options);\n\n switch (schema?.type) {\n case \"object\":\n if (!schema.properties && !schema.$ref) {\n return execMapper(\"map\", schema, options);\n }\n\n return execMapper(\"nested\", schema, options);\n case \"array\":\n return execMapper(\"array\", schema, options);\n case \"string\":\n return execMapper(\"string\", schema, options);\n case \"boolean\":\n return execMapper(\"boolean\", schema, options);\n case \"integer\":\n case \"number\":\n return execMapper(\"number\", schema, options);\n }\n\n return {};\n}\n\nregisterFormioMapper(\"any\", anyToComponent);\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/schema-formio",
3
- "version": "6.95.7",
3
+ "version": "6.96.0",
4
4
  "description": "Transform Ts.ED Schema & JsonSchema to a valid Formio schema",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
@@ -31,19 +31,19 @@
31
31
  "tsed"
32
32
  ],
33
33
  "dependencies": {
34
- "@tsed/formio-types": "6.95.7",
34
+ "@tsed/formio-types": "6.96.0",
35
35
  "change-case": "4.1.2",
36
36
  "tslib": "2.2.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@tsed/core": "6.95.7",
40
- "@tsed/openspec": "6.95.7",
41
- "@tsed/schema": "6.95.7"
39
+ "@tsed/core": "6.96.0",
40
+ "@tsed/openspec": "6.96.0",
41
+ "@tsed/schema": "6.96.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "@tsed/core": "^6.95.7",
45
- "@tsed/openspec": "^6.95.7",
46
- "@tsed/schema": "^6.95.7",
44
+ "@tsed/core": "^6.96.0",
45
+ "@tsed/openspec": "^6.96.0",
46
+ "@tsed/schema": "^6.96.0",
47
47
  "formiojs": ">=4.0.0",
48
48
  "lodash": ">=4.0.0",
49
49
  "moment": ">=2.0.0"
@@ -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,13 +0,0 @@
1
- export * from "./anyToComponent";
2
- export * from "./arrayToComponent";
3
- export * from "./booleanToComponent";
4
- export * from "./dateToComponent";
5
- export * from "./defaultToComponent";
6
- export * from "./enumToComponent";
7
- export * from "./mapToComponent";
8
- export * from "./nestedToComponent";
9
- export * from "./numberToComponent";
10
- export * from "./objectToEditGrid";
11
- export * from "./panelToComponent";
12
- export * from "./propertiesToComponents";
13
- export * from "./stringToComponent";
@@ -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";
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";
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;
@@ -1,12 +0,0 @@
1
- /**
2
- * Set hidden field.
3
- *
4
- * A hidden field is still a part of the form, but is hidden from view.
5
- *
6
- * @param bool
7
- * @decorator
8
- * @formio
9
- * @property
10
- * @schema
11
- */
12
- export declare function Hidden(bool?: boolean): PropertyDecorator;
@@ -1,30 +0,0 @@
1
- export * from "./component";
2
- export * from "./currency";
3
- export * from "./dataSourceJson";
4
- export * from "./dataSourceUrl";
5
- export * from "./hidden";
6
- export * from "./inputTags";
7
- export * from "./multiple";
8
- export * from "./password";
9
- export * from "./select";
10
- export * from "./tableView";
11
- export * from "./textarea";
12
- export * from "./errorMessage";
13
- export * from "./errorLabel";
14
- export * from "./minWords";
15
- export * from "./maxWords";
16
- export * from "./validate";
17
- export * from "./form";
18
- export * from "./tabs";
19
- export * from "./placeholder";
20
- export * from "./tooltip";
21
- export * from "./label";
22
- export * from "./customClass";
23
- export * from "./modalEdit";
24
- export * from "./mask";
25
- export * from "./prefix";
26
- export * from "./suffix";
27
- export * from "./textCase";
28
- export * from "./conditional";
29
- export * from "./customConditional";
30
- export * from "./openWhenEmpty";
@@ -1,8 +0,0 @@
1
- /**
2
- * Configure the property as Tags component.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- */
8
- export declare function InputTags(props?: Record<string, any>): PropertyDecorator;
@@ -1,9 +0,0 @@
1
- /**
2
- * Change the label field
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- * @param label
8
- */
9
- export declare function Label(label: string): PropertyDecorator;
@@ -1,37 +0,0 @@
1
- /**
2
- * An input mask helps the user with input by ensuring a predefined format.
3
- *
4
- * - 9: numeric
5
- * - a: alphabetical
6
- * - *: alphanumeric
7
- *
8
- * Example telephone mask: (999) 999-9999
9
- *
10
- * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.
11
- *
12
- * @decorator
13
- * @formio
14
- * @property
15
- * @schema
16
- */
17
- export declare function Mask(inputMask: string, inputMaskPlaceholderChar?: string): PropertyDecorator;
18
- /**
19
- * An input mask helps the user with input by ensuring a predefined format.
20
- *
21
- * - 9: numeric
22
- * - a: alphabetical
23
- * - *: alphanumeric
24
- *
25
- * Example telephone mask: (999) 999-9999
26
- *
27
- * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.
28
- *
29
- * @decorator
30
- * @formio
31
- * @property
32
- * @schema
33
- */
34
- export declare function Masks(...inputMasks: {
35
- label: string;
36
- mask: string;
37
- }[]): PropertyDecorator;
@@ -1,9 +0,0 @@
1
- /**
2
- * Add the minimum amount of words that can be added to this field.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- * @param value
8
- */
9
- export declare function MaxWords(value: number): PropertyDecorator;
@@ -1,9 +0,0 @@
1
- /**
2
- * Add the maximum amount of words that can be added to this field.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- * @param value
8
- */
9
- export declare function MinWords(value: number): PropertyDecorator;
@@ -1,8 +0,0 @@
1
- /**
2
- * Opens up a modal to edit the value of this component.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- */
8
- export declare function ModalEdit(modalEdit?: boolean): PropertyDecorator;
@@ -1,8 +0,0 @@
1
- /**
2
- * Change the multiple value on the decorated property.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- */
8
- export declare function Multiple(multiple?: boolean): PropertyDecorator;
@@ -1,8 +0,0 @@
1
- /**
2
- * Open automatically the editgrid when the list is empty.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- */
8
- export declare function OpenWhenEmpty(openWhenEmpty?: boolean): PropertyDecorator;
@@ -1,12 +0,0 @@
1
- export interface PasswordOpts extends Record<string, any> {
2
- showCharCount?: boolean;
3
- showWordCount?: boolean;
4
- }
5
- /**
6
- * Configure the property as Password component.
7
- * @decorator
8
- * @formio
9
- * @property
10
- * @schema
11
- */
12
- export declare function Password(props?: PasswordOpts): PropertyDecorator;
@@ -1,9 +0,0 @@
1
- /**
2
- * The placeholder text that will appear when this field is empty.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- * @param placeholder
8
- */
9
- export declare function Placeholder(placeholder: string): PropertyDecorator;
@@ -1,8 +0,0 @@
1
- /**
2
- * Add prefix word on the decorated field.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- */
8
- export declare function Prefix(prefix: string): PropertyDecorator;
@@ -1,14 +0,0 @@
1
- export interface SelectOpts extends Record<string, any> {
2
- idPath?: string;
3
- valueProperty?: string;
4
- template?: string;
5
- multiple?: boolean;
6
- }
7
- /**
8
- * Configure the property as Select component.
9
- * @decorator
10
- * @formio
11
- * @property
12
- * @schema
13
- */
14
- export declare function Select(props?: SelectOpts): PropertyDecorator;
@@ -1,8 +0,0 @@
1
- /**
2
- * Add suffix word on the decorated field.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- */
8
- export declare function Suffix(suffix: string): PropertyDecorator;
@@ -1,9 +0,0 @@
1
- /**
2
- * Change the visibility of the current property on a table.
3
- * @param bool
4
- * @decorator
5
- * @formio
6
- * @property
7
- * @schema
8
- */
9
- export declare function TableView(bool: boolean): PropertyDecorator;
@@ -1,8 +0,0 @@
1
- /**
2
- * Group the current property in tabs components.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- */
8
- export declare function Tabs(label: string): (...args: any[]) => any;
@@ -1,9 +0,0 @@
1
- /**
2
- * Force the output of this field to be sanitized in a specific format.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- * @param textCase
8
- */
9
- export declare function TextCase(textCase: "uppercase" | "lowercase"): PropertyDecorator;
@@ -1,12 +0,0 @@
1
- export interface TextareaOpts extends Record<string, any> {
2
- showCharCount?: boolean;
3
- showWordCount?: boolean;
4
- }
5
- /**
6
- * Configure the property as Textarea component.
7
- * @decorator
8
- * @formio
9
- * @property
10
- * @schema
11
- */
12
- export declare function Textarea(props?: TextareaOpts): PropertyDecorator;
@@ -1,9 +0,0 @@
1
- /**
2
- * Adds a tooltip to the side of this field.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- * @param tooltip
8
- */
9
- export declare function Tooltip(tooltip: string): PropertyDecorator;
@@ -1,10 +0,0 @@
1
- /**
2
- * Add validation rules.
3
- * @decorator
4
- * @formio
5
- * @property
6
- * @schema
7
- * @param key
8
- * @param value
9
- */
10
- export declare function Validate(key: string, value: any): PropertyDecorator;
@@ -1,7 +0,0 @@
1
- import { FormioComponent, FormioForm } from "@tsed/formio-types";
2
- import { JsonSchemaOptions } from "@tsed/schema";
3
- export declare type FormioDataResolverCtx = {
4
- component: FormioComponent;
5
- form: FormioForm;
6
- } & JsonSchemaOptions;
7
- export declare type FormioDataResolver = (ctx: FormioDataResolverCtx) => Promise<any> | any;
@@ -1,4 +0,0 @@
1
- export * from "./components";
2
- export * from "./decorators";
3
- export * from "./registries/FormioMappersContainer";
4
- export * from "./utils/getFormioSchema";
@@ -1,6 +0,0 @@
1
- export interface FormioMapper {
2
- (schema: any, options: any): any;
3
- }
4
- export declare function registerFormioMapper(type: string, mapper: FormioMapper): Map<string, FormioMapper>;
5
- export declare function getFormioMapper(type: string): FormioMapper;
6
- export declare function execMapper(type: string, schema: any, options: any): any;
@@ -1,2 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- export declare const FormsContainer: Map<string, Type>;
@@ -1 +0,0 @@
1
- export declare function getFormioProps(schema: any): any;
@@ -1,4 +0,0 @@
1
- import { JsonSchemaOptions } from "@tsed/schema";
2
- import { FormioForm } from "@tsed/formio-types";
3
- import "../components";
4
- export declare function getFormioSchema(model: string | any | undefined, options?: JsonSchemaOptions): Promise<Omit<FormioForm, "components" | "_id" | "deleted" | "owner"> | undefined>;
@@ -1 +0,0 @@
1
- export declare function getRef(schema: any, options: any): any;