@tsed/schema-formio 6.102.6 → 6.102.8-rc.3
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.
- package/lib/cjs/index.js +50 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/utils/getFormioSchema.js +13 -1
- package/lib/cjs/utils/getFormioSchema.js.map +1 -1
- package/lib/esm/components/anyToComponent.js +2 -2
- package/lib/esm/components/arrayToComponent.js +2 -2
- package/lib/esm/components/booleanToComponent.js +1 -1
- package/lib/esm/components/dateToComponent.js +1 -1
- package/lib/esm/components/defaultToComponent.js +2 -2
- package/lib/esm/components/enumToComponent.js +1 -1
- package/lib/esm/components/mapToComponent.js +1 -1
- package/lib/esm/components/nestedToComponent.js +1 -1
- package/lib/esm/components/numberToComponent.js +1 -1
- package/lib/esm/components/objectToEditGrid.js +1 -1
- package/lib/esm/components/panelToComponent.js +1 -1
- package/lib/esm/components/propertiesToComponents.js +1 -1
- package/lib/esm/components/stringToComponent.js +1 -1
- package/lib/esm/decorators/conditional.js +1 -1
- package/lib/esm/decorators/currency.js +1 -1
- package/lib/esm/decorators/customClass.js +1 -1
- package/lib/esm/decorators/customConditional.js +1 -1
- package/lib/esm/decorators/dataSourceJson.js +1 -1
- package/lib/esm/decorators/dataSourceUrl.js +1 -1
- package/lib/esm/decorators/errorLabel.js +1 -1
- package/lib/esm/decorators/errorMessage.js +1 -1
- package/lib/esm/decorators/form.js +1 -1
- package/lib/esm/decorators/hidden.js +1 -1
- package/lib/esm/decorators/inputTags.js +1 -1
- package/lib/esm/decorators/label.js +1 -1
- package/lib/esm/decorators/mask.js +1 -1
- package/lib/esm/decorators/maxWords.js +1 -1
- package/lib/esm/decorators/minWords.js +1 -1
- package/lib/esm/decorators/modalEdit.js +1 -1
- package/lib/esm/decorators/multiple.js +1 -1
- package/lib/esm/decorators/openWhenEmpty.js +1 -1
- package/lib/esm/decorators/password.js +1 -1
- package/lib/esm/decorators/placeholder.js +1 -1
- package/lib/esm/decorators/prefix.js +1 -1
- package/lib/esm/decorators/select.js +1 -1
- package/lib/esm/decorators/suffix.js +1 -1
- package/lib/esm/decorators/tableView.js +1 -1
- package/lib/esm/decorators/textCase.js +1 -1
- package/lib/esm/decorators/textarea.js +1 -1
- package/lib/esm/decorators/tooltip.js +1 -1
- package/lib/esm/decorators/validate.js +1 -1
- package/lib/esm/index.js +52 -4
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/package.json +3 -0
- package/lib/esm/utils/getFormioSchema.js +15 -3
- package/lib/esm/utils/getFormioSchema.js.map +1 -1
- package/lib/types/index.d.ts +50 -2
- package/lib/types/utils/getFormioSchema.d.ts +13 -1
- package/package.json +16 -11
- package/lib/cjs/components/index.js +0 -17
- package/lib/cjs/components/index.js.map +0 -1
- package/lib/cjs/decorators/index.js +0 -34
- package/lib/cjs/decorators/index.js.map +0 -1
- package/lib/esm/components/index.js +0 -14
- package/lib/esm/components/index.js.map +0 -1
- package/lib/esm/decorators/index.js +0 -31
- package/lib/esm/decorators/index.js.map +0 -1
- package/lib/types/components/index.d.ts +0 -13
- package/lib/types/decorators/index.d.ts +0 -30
package/lib/cjs/index.js
CHANGED
|
@@ -1,8 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file Automatically generated by barrelsby.
|
|
4
|
+
*/
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const tslib_1 = require("tslib");
|
|
4
|
-
(0, tslib_1.__exportStar)(require("./components"), exports);
|
|
5
|
-
(0, tslib_1.__exportStar)(require("./
|
|
7
|
+
(0, tslib_1.__exportStar)(require("./components/anyToComponent"), exports);
|
|
8
|
+
(0, tslib_1.__exportStar)(require("./components/arrayToComponent"), exports);
|
|
9
|
+
(0, tslib_1.__exportStar)(require("./components/booleanToComponent"), exports);
|
|
10
|
+
(0, tslib_1.__exportStar)(require("./components/dateToComponent"), exports);
|
|
11
|
+
(0, tslib_1.__exportStar)(require("./components/defaultToComponent"), exports);
|
|
12
|
+
(0, tslib_1.__exportStar)(require("./components/enumToComponent"), exports);
|
|
13
|
+
(0, tslib_1.__exportStar)(require("./components/mapToComponent"), exports);
|
|
14
|
+
(0, tslib_1.__exportStar)(require("./components/nestedToComponent"), exports);
|
|
15
|
+
(0, tslib_1.__exportStar)(require("./components/numberToComponent"), exports);
|
|
16
|
+
(0, tslib_1.__exportStar)(require("./components/objectToEditGrid"), exports);
|
|
17
|
+
(0, tslib_1.__exportStar)(require("./components/panelToComponent"), exports);
|
|
18
|
+
(0, tslib_1.__exportStar)(require("./components/propertiesToComponents"), exports);
|
|
19
|
+
(0, tslib_1.__exportStar)(require("./components/stringToComponent"), exports);
|
|
20
|
+
(0, tslib_1.__exportStar)(require("./decorators/component"), exports);
|
|
21
|
+
(0, tslib_1.__exportStar)(require("./decorators/conditional"), exports);
|
|
22
|
+
(0, tslib_1.__exportStar)(require("./decorators/currency"), exports);
|
|
23
|
+
(0, tslib_1.__exportStar)(require("./decorators/customClass"), exports);
|
|
24
|
+
(0, tslib_1.__exportStar)(require("./decorators/customConditional"), exports);
|
|
25
|
+
(0, tslib_1.__exportStar)(require("./decorators/dataSourceJson"), exports);
|
|
26
|
+
(0, tslib_1.__exportStar)(require("./decorators/dataSourceUrl"), exports);
|
|
27
|
+
(0, tslib_1.__exportStar)(require("./decorators/errorLabel"), exports);
|
|
28
|
+
(0, tslib_1.__exportStar)(require("./decorators/errorMessage"), exports);
|
|
29
|
+
(0, tslib_1.__exportStar)(require("./decorators/form"), exports);
|
|
30
|
+
(0, tslib_1.__exportStar)(require("./decorators/hidden"), exports);
|
|
31
|
+
(0, tslib_1.__exportStar)(require("./decorators/inputTags"), exports);
|
|
32
|
+
(0, tslib_1.__exportStar)(require("./decorators/label"), exports);
|
|
33
|
+
(0, tslib_1.__exportStar)(require("./decorators/mask"), exports);
|
|
34
|
+
(0, tslib_1.__exportStar)(require("./decorators/maxWords"), exports);
|
|
35
|
+
(0, tslib_1.__exportStar)(require("./decorators/minWords"), exports);
|
|
36
|
+
(0, tslib_1.__exportStar)(require("./decorators/modalEdit"), exports);
|
|
37
|
+
(0, tslib_1.__exportStar)(require("./decorators/multiple"), exports);
|
|
38
|
+
(0, tslib_1.__exportStar)(require("./decorators/openWhenEmpty"), exports);
|
|
39
|
+
(0, tslib_1.__exportStar)(require("./decorators/password"), exports);
|
|
40
|
+
(0, tslib_1.__exportStar)(require("./decorators/placeholder"), exports);
|
|
41
|
+
(0, tslib_1.__exportStar)(require("./decorators/prefix"), exports);
|
|
42
|
+
(0, tslib_1.__exportStar)(require("./decorators/select"), exports);
|
|
43
|
+
(0, tslib_1.__exportStar)(require("./decorators/suffix"), exports);
|
|
44
|
+
(0, tslib_1.__exportStar)(require("./decorators/tableView"), exports);
|
|
45
|
+
(0, tslib_1.__exportStar)(require("./decorators/tabs"), exports);
|
|
46
|
+
(0, tslib_1.__exportStar)(require("./decorators/textCase"), exports);
|
|
47
|
+
(0, tslib_1.__exportStar)(require("./decorators/textarea"), exports);
|
|
48
|
+
(0, tslib_1.__exportStar)(require("./decorators/tooltip"), exports);
|
|
49
|
+
(0, tslib_1.__exportStar)(require("./decorators/validate"), exports);
|
|
50
|
+
(0, tslib_1.__exportStar)(require("./domain/FormioDataResolver"), exports);
|
|
6
51
|
(0, tslib_1.__exportStar)(require("./registries/FormioMappersContainer"), exports);
|
|
52
|
+
(0, tslib_1.__exportStar)(require("./registries/FormsContainer"), exports);
|
|
53
|
+
(0, tslib_1.__exportStar)(require("./utils/getFormioProps"), exports);
|
|
7
54
|
(0, tslib_1.__exportStar)(require("./utils/getFormioSchema"), exports);
|
|
55
|
+
(0, tslib_1.__exportStar)(require("./utils/getRef"), exports);
|
|
8
56
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,2EAA4C;AAC5C,6EAA8C;AAC9C,+EAAgD;AAChD,4EAA6C;AAC7C,+EAAgD;AAChD,4EAA6C;AAC7C,2EAA4C;AAC5C,8EAA+C;AAC/C,8EAA+C;AAC/C,6EAA8C;AAC9C,6EAA8C;AAC9C,mFAAoD;AACpD,8EAA+C;AAC/C,sEAAuC;AACvC,wEAAyC;AACzC,qEAAsC;AACtC,wEAAyC;AACzC,8EAA+C;AAC/C,2EAA4C;AAC5C,0EAA2C;AAC3C,uEAAwC;AACxC,yEAA0C;AAC1C,iEAAkC;AAClC,mEAAoC;AACpC,sEAAuC;AACvC,kEAAmC;AACnC,iEAAkC;AAClC,qEAAsC;AACtC,qEAAsC;AACtC,sEAAuC;AACvC,qEAAsC;AACtC,0EAA2C;AAC3C,qEAAsC;AACtC,wEAAyC;AACzC,mEAAoC;AACpC,mEAAoC;AACpC,mEAAoC;AACpC,sEAAuC;AACvC,iEAAkC;AAClC,qEAAsC;AACtC,qEAAsC;AACtC,oEAAqC;AACrC,qEAAsC;AACtC,2EAA4C;AAC5C,mFAAoD;AACpD,2EAA4C;AAC5C,sEAAuC;AACvC,uEAAwC;AACxC,8DAA+B","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components/anyToComponent\";\nexport * from \"./components/arrayToComponent\";\nexport * from \"./components/booleanToComponent\";\nexport * from \"./components/dateToComponent\";\nexport * from \"./components/defaultToComponent\";\nexport * from \"./components/enumToComponent\";\nexport * from \"./components/mapToComponent\";\nexport * from \"./components/nestedToComponent\";\nexport * from \"./components/numberToComponent\";\nexport * from \"./components/objectToEditGrid\";\nexport * from \"./components/panelToComponent\";\nexport * from \"./components/propertiesToComponents\";\nexport * from \"./components/stringToComponent\";\nexport * from \"./decorators/component\";\nexport * from \"./decorators/conditional\";\nexport * from \"./decorators/currency\";\nexport * from \"./decorators/customClass\";\nexport * from \"./decorators/customConditional\";\nexport * from \"./decorators/dataSourceJson\";\nexport * from \"./decorators/dataSourceUrl\";\nexport * from \"./decorators/errorLabel\";\nexport * from \"./decorators/errorMessage\";\nexport * from \"./decorators/form\";\nexport * from \"./decorators/hidden\";\nexport * from \"./decorators/inputTags\";\nexport * from \"./decorators/label\";\nexport * from \"./decorators/mask\";\nexport * from \"./decorators/maxWords\";\nexport * from \"./decorators/minWords\";\nexport * from \"./decorators/modalEdit\";\nexport * from \"./decorators/multiple\";\nexport * from \"./decorators/openWhenEmpty\";\nexport * from \"./decorators/password\";\nexport * from \"./decorators/placeholder\";\nexport * from \"./decorators/prefix\";\nexport * from \"./decorators/select\";\nexport * from \"./decorators/suffix\";\nexport * from \"./decorators/tableView\";\nexport * from \"./decorators/tabs\";\nexport * from \"./decorators/textCase\";\nexport * from \"./decorators/textarea\";\nexport * from \"./decorators/tooltip\";\nexport * from \"./decorators/validate\";\nexport * from \"./domain/FormioDataResolver\";\nexport * from \"./registries/FormioMappersContainer\";\nexport * from \"./registries/FormsContainer\";\nexport * from \"./utils/getFormioProps\";\nexport * from \"./utils/getFormioSchema\";\nexport * from \"./utils/getRef\";\n"]}
|
|
@@ -4,9 +4,21 @@ exports.getFormioSchema = void 0;
|
|
|
4
4
|
const core_1 = require("@tsed/core");
|
|
5
5
|
const schema_1 = require("@tsed/schema");
|
|
6
6
|
const FormioMappersContainer_1 = require("../registries/FormioMappersContainer");
|
|
7
|
-
require("../components");
|
|
8
7
|
const FormsContainer_1 = require("../registries/FormsContainer");
|
|
9
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");
|
|
10
22
|
async function getFormioSchema(model, options = {}) {
|
|
11
23
|
if (!model) {
|
|
12
24
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFormioSchema.js","sourceRoot":"","sources":["../../../src/utils/getFormioSchema.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,yCAA+E;AAE/E,iFAAgE;AAChE,
|
|
1
|
+
{"version":3,"file":"getFormioSchema.js","sourceRoot":"","sources":["../../../src/utils/getFormioSchema.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,yCAA+E;AAE/E,iFAAgE;AAChE,iEAA4D;AAC5D,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,+BAAc,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,mCAAU,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","sourcesContent":["import {isString, Type} from \"@tsed/core\";\nimport {getJsonSchema, JsonEntityStore, JsonSchemaOptions} from \"@tsed/schema\";\nimport {FormioForm} from \"@tsed/formio-types\";\nimport {execMapper} from \"../registries/FormioMappersContainer\";\nimport {FormsContainer} from \"../registries/FormsContainer\";\nimport {paramCase} from \"change-case\";\nimport \"../components/anyToComponent\";\nimport \"../components/arrayToComponent\";\nimport \"../components/booleanToComponent\";\nimport \"../components/dateToComponent\";\nimport \"../components/defaultToComponent\";\nimport \"../components/enumToComponent\";\nimport \"../components/mapToComponent\";\nimport \"../components/nestedToComponent\";\nimport \"../components/numberToComponent\";\nimport \"../components/objectToEditGrid\";\nimport \"../components/panelToComponent\";\nimport \"../components/propertiesToComponents\";\nimport \"../components/stringToComponent\";\n\nexport async function getFormioSchema(\n model: string | any | undefined,\n options: JsonSchemaOptions = {}\n): Promise<Omit<FormioForm, \"components\" | \"_id\" | \"deleted\" | \"owner\"> | undefined> {\n if (!model) {\n return undefined;\n }\n\n if (isString(model)) {\n return getFormioSchema(FormsContainer.get(model) as Type<any>, options);\n }\n\n const entity = JsonEntityStore.from(model);\n const schema = getJsonSchema(entity, {\n ...options,\n customKeys: true\n });\n\n const name = entity.schema.getName();\n const machineName = paramCase(name);\n const resolvers: Promise<any>[] = [];\n const components = execMapper(\"properties\", schema, {...options, definitions: schema.definitions, resolvers});\n const form = {\n title: name,\n type: \"form\",\n display: \"form\",\n tags: [],\n access: [],\n submissionAccess: [],\n ...entity.store.get<any>(\"formio:form\", {}),\n name: machineName,\n machineName,\n components\n };\n\n await Promise.all(resolvers.map((resolver: any) => resolver(form, options)));\n\n return form as unknown as FormioForm;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
2
|
-
import { getRef } from "../utils/getRef";
|
|
1
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
2
|
+
import { getRef } from "../utils/getRef.js";
|
|
3
3
|
export function anyToComponent(schema, options) {
|
|
4
4
|
schema = getRef(schema, options);
|
|
5
5
|
switch (schema === null || schema === void 0 ? void 0 : schema.type) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cleanObject } from "@tsed/core";
|
|
2
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
3
|
-
import { getRef } from "../utils/getRef";
|
|
2
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
3
|
+
import { getRef } from "../utils/getRef.js";
|
|
4
4
|
export function arrayToComponent(schema, options) {
|
|
5
5
|
const itemSchema = schema.items.$ref ? getRef(schema.items, options) : schema.items;
|
|
6
6
|
const { type } = itemSchema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cleanObject } from "@tsed/core";
|
|
2
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
2
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
3
3
|
function booleanToComponent(schema, options) {
|
|
4
4
|
const component = execMapper("default", schema, options);
|
|
5
5
|
return cleanObject({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
1
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
2
2
|
function dateToComponent(schema, options) {
|
|
3
3
|
const component = execMapper("default", schema, options);
|
|
4
4
|
const base = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cleanObject } from "@tsed/core";
|
|
2
|
-
import { registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
3
|
-
import { getFormioProps } from "../utils/getFormioProps";
|
|
2
|
+
import { registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
3
|
+
import { getFormioProps } from "../utils/getFormioProps.js";
|
|
4
4
|
export function defaultToComponent(schema, options) {
|
|
5
5
|
const formioProps = getFormioProps(schema);
|
|
6
6
|
return cleanObject({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cleanObject } from "@tsed/core";
|
|
2
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
2
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
3
3
|
export function enumToComponent(schema, options) {
|
|
4
4
|
const component = execMapper("default", schema, options);
|
|
5
5
|
const values = schema.enum.map((value) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
1
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
2
2
|
export function mapToComponent(schema, options) {
|
|
3
3
|
return {
|
|
4
4
|
...execMapper("default", schema, options),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sentenceCase } from "change-case";
|
|
2
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
2
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
3
3
|
export function nestedToComponent(schema, options) {
|
|
4
4
|
return {
|
|
5
5
|
...execMapper("default", schema, options),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cleanObject, getValue } from "@tsed/core";
|
|
2
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
2
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
3
3
|
export function numberToComponent(schema, options) {
|
|
4
4
|
const component = execMapper("default", schema, options);
|
|
5
5
|
return cleanObject({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
1
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
2
2
|
export function objectToEditGrid(schema, options) {
|
|
3
3
|
return {
|
|
4
4
|
...execMapper("default", schema, options),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
1
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
2
2
|
export function panelToComponent(schema, options) {
|
|
3
3
|
return {
|
|
4
4
|
...execMapper("default", schema, options),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cleanObject, isFunction } from "@tsed/core";
|
|
2
2
|
import { sentenceCase } from "change-case";
|
|
3
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
3
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
4
4
|
function bindResolvers(component, options) {
|
|
5
5
|
if (component.data) {
|
|
6
6
|
const data = component.data;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cleanObject } from "@tsed/core";
|
|
2
|
-
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer";
|
|
2
|
+
import { execMapper, registerFormioMapper } from "../registries/FormioMappersContainer.js";
|
|
3
3
|
export function stringToComponent(schema, options) {
|
|
4
4
|
if (schema.format) {
|
|
5
5
|
const component = execMapper("default", schema, options);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { nameOf, StoreSet, useDecorators } from "@tsed/core";
|
|
2
2
|
import { Name } from "@tsed/schema";
|
|
3
3
|
import { paramCase } from "change-case";
|
|
4
|
-
import { FormsContainer } from "../registries/FormsContainer";
|
|
4
|
+
import { FormsContainer } from "../registries/FormsContainer.js";
|
|
5
5
|
/**
|
|
6
6
|
* Expose the model as Formio Form.
|
|
7
7
|
* @param form
|
package/lib/esm/index.js
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export * from "./
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by barrelsby.
|
|
3
|
+
*/
|
|
4
|
+
export * from "./components/anyToComponent.js";
|
|
5
|
+
export * from "./components/arrayToComponent.js";
|
|
6
|
+
export * from "./components/booleanToComponent.js";
|
|
7
|
+
export * from "./components/dateToComponent.js";
|
|
8
|
+
export * from "./components/defaultToComponent.js";
|
|
9
|
+
export * from "./components/enumToComponent.js";
|
|
10
|
+
export * from "./components/mapToComponent.js";
|
|
11
|
+
export * from "./components/nestedToComponent.js";
|
|
12
|
+
export * from "./components/numberToComponent.js";
|
|
13
|
+
export * from "./components/objectToEditGrid.js";
|
|
14
|
+
export * from "./components/panelToComponent.js";
|
|
15
|
+
export * from "./components/propertiesToComponents.js";
|
|
16
|
+
export * from "./components/stringToComponent.js";
|
|
17
|
+
export * from "./decorators/component.js";
|
|
18
|
+
export * from "./decorators/conditional.js";
|
|
19
|
+
export * from "./decorators/currency.js";
|
|
20
|
+
export * from "./decorators/customClass.js";
|
|
21
|
+
export * from "./decorators/customConditional.js";
|
|
22
|
+
export * from "./decorators/dataSourceJson.js";
|
|
23
|
+
export * from "./decorators/dataSourceUrl.js";
|
|
24
|
+
export * from "./decorators/errorLabel.js";
|
|
25
|
+
export * from "./decorators/errorMessage.js";
|
|
26
|
+
export * from "./decorators/form.js";
|
|
27
|
+
export * from "./decorators/hidden.js";
|
|
28
|
+
export * from "./decorators/inputTags.js";
|
|
29
|
+
export * from "./decorators/label.js";
|
|
30
|
+
export * from "./decorators/mask.js";
|
|
31
|
+
export * from "./decorators/maxWords.js";
|
|
32
|
+
export * from "./decorators/minWords.js";
|
|
33
|
+
export * from "./decorators/modalEdit.js";
|
|
34
|
+
export * from "./decorators/multiple.js";
|
|
35
|
+
export * from "./decorators/openWhenEmpty.js";
|
|
36
|
+
export * from "./decorators/password.js";
|
|
37
|
+
export * from "./decorators/placeholder.js";
|
|
38
|
+
export * from "./decorators/prefix.js";
|
|
39
|
+
export * from "./decorators/select.js";
|
|
40
|
+
export * from "./decorators/suffix.js";
|
|
41
|
+
export * from "./decorators/tableView.js";
|
|
42
|
+
export * from "./decorators/tabs.js";
|
|
43
|
+
export * from "./decorators/textCase.js";
|
|
44
|
+
export * from "./decorators/textarea.js";
|
|
45
|
+
export * from "./decorators/tooltip.js";
|
|
46
|
+
export * from "./decorators/validate.js";
|
|
47
|
+
export * from "./domain/FormioDataResolver.js";
|
|
48
|
+
export * from "./registries/FormioMappersContainer.js";
|
|
49
|
+
export * from "./registries/FormsContainer.js";
|
|
50
|
+
export * from "./utils/getFormioProps.js";
|
|
51
|
+
export * from "./utils/getFormioSchema.js";
|
|
52
|
+
export * from "./utils/getRef.js";
|
|
5
53
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components/anyToComponent\";\nexport * from \"./components/arrayToComponent\";\nexport * from \"./components/booleanToComponent\";\nexport * from \"./components/dateToComponent\";\nexport * from \"./components/defaultToComponent\";\nexport * from \"./components/enumToComponent\";\nexport * from \"./components/mapToComponent\";\nexport * from \"./components/nestedToComponent\";\nexport * from \"./components/numberToComponent\";\nexport * from \"./components/objectToEditGrid\";\nexport * from \"./components/panelToComponent\";\nexport * from \"./components/propertiesToComponents\";\nexport * from \"./components/stringToComponent\";\nexport * from \"./decorators/component\";\nexport * from \"./decorators/conditional\";\nexport * from \"./decorators/currency\";\nexport * from \"./decorators/customClass\";\nexport * from \"./decorators/customConditional\";\nexport * from \"./decorators/dataSourceJson\";\nexport * from \"./decorators/dataSourceUrl\";\nexport * from \"./decorators/errorLabel\";\nexport * from \"./decorators/errorMessage\";\nexport * from \"./decorators/form\";\nexport * from \"./decorators/hidden\";\nexport * from \"./decorators/inputTags\";\nexport * from \"./decorators/label\";\nexport * from \"./decorators/mask\";\nexport * from \"./decorators/maxWords\";\nexport * from \"./decorators/minWords\";\nexport * from \"./decorators/modalEdit\";\nexport * from \"./decorators/multiple\";\nexport * from \"./decorators/openWhenEmpty\";\nexport * from \"./decorators/password\";\nexport * from \"./decorators/placeholder\";\nexport * from \"./decorators/prefix\";\nexport * from \"./decorators/select\";\nexport * from \"./decorators/suffix\";\nexport * from \"./decorators/tableView\";\nexport * from \"./decorators/tabs\";\nexport * from \"./decorators/textCase\";\nexport * from \"./decorators/textarea\";\nexport * from \"./decorators/tooltip\";\nexport * from \"./decorators/validate\";\nexport * from \"./domain/FormioDataResolver\";\nexport * from \"./registries/FormioMappersContainer\";\nexport * from \"./registries/FormsContainer\";\nexport * from \"./utils/getFormioProps\";\nexport * from \"./utils/getFormioSchema\";\nexport * from \"./utils/getRef\";\n"]}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { isString } from "@tsed/core";
|
|
2
2
|
import { getJsonSchema, JsonEntityStore } from "@tsed/schema";
|
|
3
|
-
import { execMapper } from "../registries/FormioMappersContainer";
|
|
4
|
-
import "../
|
|
5
|
-
import { FormsContainer } from "../registries/FormsContainer";
|
|
3
|
+
import { execMapper } from "../registries/FormioMappersContainer.js";
|
|
4
|
+
import { FormsContainer } from "../registries/FormsContainer.js";
|
|
6
5
|
import { paramCase } from "change-case";
|
|
6
|
+
import "../components/anyToComponent.js";
|
|
7
|
+
import "../components/arrayToComponent.js";
|
|
8
|
+
import "../components/booleanToComponent.js";
|
|
9
|
+
import "../components/dateToComponent.js";
|
|
10
|
+
import "../components/defaultToComponent.js";
|
|
11
|
+
import "../components/enumToComponent.js";
|
|
12
|
+
import "../components/mapToComponent.js";
|
|
13
|
+
import "../components/nestedToComponent.js";
|
|
14
|
+
import "../components/numberToComponent.js";
|
|
15
|
+
import "../components/objectToEditGrid.js";
|
|
16
|
+
import "../components/panelToComponent.js";
|
|
17
|
+
import "../components/propertiesToComponents.js";
|
|
18
|
+
import "../components/stringToComponent.js";
|
|
7
19
|
export async function getFormioSchema(model, options = {}) {
|
|
8
20
|
if (!model) {
|
|
9
21
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFormioSchema.js","sourceRoot":"","sources":["../../../src/utils/getFormioSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAO,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAE,eAAe,EAAoB,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAC;AAChE,OAAO,
|
|
1
|
+
{"version":3,"file":"getFormioSchema.js","sourceRoot":"","sources":["../../../src/utils/getFormioSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAO,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAE,eAAe,EAAoB,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,8BAA8B,CAAC;AACtC,OAAO,gCAAgC,CAAC;AACxC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,+BAA+B,CAAC;AACvC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,+BAA+B,CAAC;AACvC,OAAO,8BAA8B,CAAC;AACtC,OAAO,iCAAiC,CAAC;AACzC,OAAO,iCAAiC,CAAC;AACzC,OAAO,gCAAgC,CAAC;AACxC,OAAO,gCAAgC,CAAC;AACxC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,iCAAiC,CAAC;AAEzC,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,KAA+B,EAC/B,UAA6B,EAAE;IAE/B,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;QACnB,OAAO,eAAe,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAc,EAAE,OAAO,CAAC,CAAC;KACzE;IAED,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,aAAa,CAAC,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,SAAS,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,SAAS,GAAmB,EAAE,CAAC;IACrC,MAAM,UAAU,GAAG,UAAU,CAAC,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","sourcesContent":["import {isString, Type} from \"@tsed/core\";\nimport {getJsonSchema, JsonEntityStore, JsonSchemaOptions} from \"@tsed/schema\";\nimport {FormioForm} from \"@tsed/formio-types\";\nimport {execMapper} from \"../registries/FormioMappersContainer\";\nimport {FormsContainer} from \"../registries/FormsContainer\";\nimport {paramCase} from \"change-case\";\nimport \"../components/anyToComponent\";\nimport \"../components/arrayToComponent\";\nimport \"../components/booleanToComponent\";\nimport \"../components/dateToComponent\";\nimport \"../components/defaultToComponent\";\nimport \"../components/enumToComponent\";\nimport \"../components/mapToComponent\";\nimport \"../components/nestedToComponent\";\nimport \"../components/numberToComponent\";\nimport \"../components/objectToEditGrid\";\nimport \"../components/panelToComponent\";\nimport \"../components/propertiesToComponents\";\nimport \"../components/stringToComponent\";\n\nexport async function getFormioSchema(\n model: string | any | undefined,\n options: JsonSchemaOptions = {}\n): Promise<Omit<FormioForm, \"components\" | \"_id\" | \"deleted\" | \"owner\"> | undefined> {\n if (!model) {\n return undefined;\n }\n\n if (isString(model)) {\n return getFormioSchema(FormsContainer.get(model) as Type<any>, options);\n }\n\n const entity = JsonEntityStore.from(model);\n const schema = getJsonSchema(entity, {\n ...options,\n customKeys: true\n });\n\n const name = entity.schema.getName();\n const machineName = paramCase(name);\n const resolvers: Promise<any>[] = [];\n const components = execMapper(\"properties\", schema, {...options, definitions: schema.definitions, resolvers});\n const form = {\n title: name,\n type: \"form\",\n display: \"form\",\n tags: [],\n access: [],\n submissionAccess: [],\n ...entity.store.get<any>(\"formio:form\", {}),\n name: machineName,\n machineName,\n components\n };\n\n await Promise.all(resolvers.map((resolver: any) => resolver(form, options)));\n\n return form as unknown as FormioForm;\n}\n"]}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,4 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by barrelsby.
|
|
3
|
+
*/
|
|
4
|
+
export * from "./components/anyToComponent";
|
|
5
|
+
export * from "./components/arrayToComponent";
|
|
6
|
+
export * from "./components/booleanToComponent";
|
|
7
|
+
export * from "./components/dateToComponent";
|
|
8
|
+
export * from "./components/defaultToComponent";
|
|
9
|
+
export * from "./components/enumToComponent";
|
|
10
|
+
export * from "./components/mapToComponent";
|
|
11
|
+
export * from "./components/nestedToComponent";
|
|
12
|
+
export * from "./components/numberToComponent";
|
|
13
|
+
export * from "./components/objectToEditGrid";
|
|
14
|
+
export * from "./components/panelToComponent";
|
|
15
|
+
export * from "./components/propertiesToComponents";
|
|
16
|
+
export * from "./components/stringToComponent";
|
|
17
|
+
export * from "./decorators/component";
|
|
18
|
+
export * from "./decorators/conditional";
|
|
19
|
+
export * from "./decorators/currency";
|
|
20
|
+
export * from "./decorators/customClass";
|
|
21
|
+
export * from "./decorators/customConditional";
|
|
22
|
+
export * from "./decorators/dataSourceJson";
|
|
23
|
+
export * from "./decorators/dataSourceUrl";
|
|
24
|
+
export * from "./decorators/errorLabel";
|
|
25
|
+
export * from "./decorators/errorMessage";
|
|
26
|
+
export * from "./decorators/form";
|
|
27
|
+
export * from "./decorators/hidden";
|
|
28
|
+
export * from "./decorators/inputTags";
|
|
29
|
+
export * from "./decorators/label";
|
|
30
|
+
export * from "./decorators/mask";
|
|
31
|
+
export * from "./decorators/maxWords";
|
|
32
|
+
export * from "./decorators/minWords";
|
|
33
|
+
export * from "./decorators/modalEdit";
|
|
34
|
+
export * from "./decorators/multiple";
|
|
35
|
+
export * from "./decorators/openWhenEmpty";
|
|
36
|
+
export * from "./decorators/password";
|
|
37
|
+
export * from "./decorators/placeholder";
|
|
38
|
+
export * from "./decorators/prefix";
|
|
39
|
+
export * from "./decorators/select";
|
|
40
|
+
export * from "./decorators/suffix";
|
|
41
|
+
export * from "./decorators/tableView";
|
|
42
|
+
export * from "./decorators/tabs";
|
|
43
|
+
export * from "./decorators/textCase";
|
|
44
|
+
export * from "./decorators/textarea";
|
|
45
|
+
export * from "./decorators/tooltip";
|
|
46
|
+
export * from "./decorators/validate";
|
|
47
|
+
export * from "./domain/FormioDataResolver";
|
|
3
48
|
export * from "./registries/FormioMappersContainer";
|
|
49
|
+
export * from "./registries/FormsContainer";
|
|
50
|
+
export * from "./utils/getFormioProps";
|
|
4
51
|
export * from "./utils/getFormioSchema";
|
|
52
|
+
export * from "./utils/getRef";
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { JsonSchemaOptions } from "@tsed/schema";
|
|
2
2
|
import { FormioForm } from "@tsed/formio-types";
|
|
3
|
-
import "../components";
|
|
3
|
+
import "../components/anyToComponent";
|
|
4
|
+
import "../components/arrayToComponent";
|
|
5
|
+
import "../components/booleanToComponent";
|
|
6
|
+
import "../components/dateToComponent";
|
|
7
|
+
import "../components/defaultToComponent";
|
|
8
|
+
import "../components/enumToComponent";
|
|
9
|
+
import "../components/mapToComponent";
|
|
10
|
+
import "../components/nestedToComponent";
|
|
11
|
+
import "../components/numberToComponent";
|
|
12
|
+
import "../components/objectToEditGrid";
|
|
13
|
+
import "../components/panelToComponent";
|
|
14
|
+
import "../components/propertiesToComponents";
|
|
15
|
+
import "../components/stringToComponent";
|
|
4
16
|
export declare function getFormioSchema(model: string | any | undefined, options?: JsonSchemaOptions): Promise<Omit<FormioForm, "components" | "_id" | "deleted" | "owner"> | undefined>;
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/schema-formio",
|
|
3
|
-
"version": "6.102.
|
|
3
|
+
"version": "6.102.8-rc.3",
|
|
4
4
|
"description": "Transform Ts.ED Schema & JsonSchema to a valid Formio schema",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/cjs/index.js",
|
|
8
|
+
"module": "./lib/esm/index.js",
|
|
8
9
|
"typings": "./lib/types/index.d.ts",
|
|
9
10
|
"exports": {
|
|
10
11
|
"types": "./lib/types/index.d.ts",
|
|
@@ -13,9 +14,10 @@
|
|
|
13
14
|
"default": "./lib/esm/index.js"
|
|
14
15
|
},
|
|
15
16
|
"scripts": {
|
|
16
|
-
"build": "yarn run build:esm && yarn run build:cjs",
|
|
17
|
+
"build": "yarn barrels && yarn run build:esm && yarn run build:cjs",
|
|
17
18
|
"build:cjs": "tsc --build tsconfig.compile.json",
|
|
18
19
|
"build:esm": "tsc --build tsconfig.compile.esm.json",
|
|
20
|
+
"barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"",
|
|
19
21
|
"test": "cross-env NODE_ENV=test jest"
|
|
20
22
|
},
|
|
21
23
|
"keywords": [
|
|
@@ -31,19 +33,19 @@
|
|
|
31
33
|
"tsed"
|
|
32
34
|
],
|
|
33
35
|
"dependencies": {
|
|
34
|
-
"@tsed/formio-types": "6.102.
|
|
36
|
+
"@tsed/formio-types": "6.102.8-rc.3",
|
|
35
37
|
"change-case": "4.1.2",
|
|
36
38
|
"tslib": "2.2.0"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
|
-
"@tsed/core": "6.102.
|
|
40
|
-
"@tsed/openspec": "6.102.
|
|
41
|
-
"@tsed/schema": "6.102.
|
|
41
|
+
"@tsed/core": "6.102.8-rc.3",
|
|
42
|
+
"@tsed/openspec": "6.102.8-rc.3",
|
|
43
|
+
"@tsed/schema": "6.102.8-rc.3"
|
|
42
44
|
},
|
|
43
45
|
"peerDependencies": {
|
|
44
|
-
"@tsed/core": "^6.102.
|
|
45
|
-
"@tsed/openspec": "^6.102.
|
|
46
|
-
"@tsed/schema": "^6.102.
|
|
46
|
+
"@tsed/core": "^6.102.8-rc.3",
|
|
47
|
+
"@tsed/openspec": "^6.102.8-rc.3",
|
|
48
|
+
"@tsed/schema": "^6.102.8-rc.3",
|
|
47
49
|
"formiojs": ">=4.0.0",
|
|
48
50
|
"lodash": ">=4.0.0",
|
|
49
51
|
"moment": ">=2.0.0"
|
|
@@ -52,7 +54,10 @@
|
|
|
52
54
|
"bugs": {
|
|
53
55
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
54
56
|
},
|
|
55
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
57
|
+
"homepage": "https://github.com/tsedio/tsed/tree/rc/packages/third-parties/schema-formio",
|
|
56
58
|
"author": "Romain Lenzotti",
|
|
57
|
-
"license": "MIT"
|
|
59
|
+
"license": "MIT",
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"tag": "rc"
|
|
62
|
+
}
|
|
58
63
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
(0, tslib_1.__exportStar)(require("./anyToComponent"), exports);
|
|
5
|
-
(0, tslib_1.__exportStar)(require("./arrayToComponent"), exports);
|
|
6
|
-
(0, tslib_1.__exportStar)(require("./booleanToComponent"), exports);
|
|
7
|
-
(0, tslib_1.__exportStar)(require("./dateToComponent"), exports);
|
|
8
|
-
(0, tslib_1.__exportStar)(require("./defaultToComponent"), exports);
|
|
9
|
-
(0, tslib_1.__exportStar)(require("./enumToComponent"), exports);
|
|
10
|
-
(0, tslib_1.__exportStar)(require("./mapToComponent"), exports);
|
|
11
|
-
(0, tslib_1.__exportStar)(require("./nestedToComponent"), exports);
|
|
12
|
-
(0, tslib_1.__exportStar)(require("./numberToComponent"), exports);
|
|
13
|
-
(0, tslib_1.__exportStar)(require("./objectToEditGrid"), exports);
|
|
14
|
-
(0, tslib_1.__exportStar)(require("./panelToComponent"), exports);
|
|
15
|
-
(0, tslib_1.__exportStar)(require("./propertiesToComponents"), exports);
|
|
16
|
-
(0, tslib_1.__exportStar)(require("./stringToComponent"), exports);
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,gEAAiC;AACjC,kEAAmC;AACnC,oEAAqC;AACrC,iEAAkC;AAClC,oEAAqC;AACrC,iEAAkC;AAClC,gEAAiC;AACjC,mEAAoC;AACpC,mEAAoC;AACpC,kEAAmC;AACnC,kEAAmC;AACnC,wEAAyC;AACzC,mEAAoC","sourcesContent":["export * from \"./anyToComponent\";\nexport * from \"./arrayToComponent\";\nexport * from \"./booleanToComponent\";\nexport * from \"./dateToComponent\";\nexport * from \"./defaultToComponent\";\nexport * from \"./enumToComponent\";\nexport * from \"./mapToComponent\";\nexport * from \"./nestedToComponent\";\nexport * from \"./numberToComponent\";\nexport * from \"./objectToEditGrid\";\nexport * from \"./panelToComponent\";\nexport * from \"./propertiesToComponents\";\nexport * from \"./stringToComponent\";\n"]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
(0, tslib_1.__exportStar)(require("./component"), exports);
|
|
5
|
-
(0, tslib_1.__exportStar)(require("./currency"), exports);
|
|
6
|
-
(0, tslib_1.__exportStar)(require("./dataSourceJson"), exports);
|
|
7
|
-
(0, tslib_1.__exportStar)(require("./dataSourceUrl"), exports);
|
|
8
|
-
(0, tslib_1.__exportStar)(require("./hidden"), exports);
|
|
9
|
-
(0, tslib_1.__exportStar)(require("./inputTags"), exports);
|
|
10
|
-
(0, tslib_1.__exportStar)(require("./multiple"), exports);
|
|
11
|
-
(0, tslib_1.__exportStar)(require("./password"), exports);
|
|
12
|
-
(0, tslib_1.__exportStar)(require("./select"), exports);
|
|
13
|
-
(0, tslib_1.__exportStar)(require("./tableView"), exports);
|
|
14
|
-
(0, tslib_1.__exportStar)(require("./textarea"), exports);
|
|
15
|
-
(0, tslib_1.__exportStar)(require("./errorMessage"), exports);
|
|
16
|
-
(0, tslib_1.__exportStar)(require("./errorLabel"), exports);
|
|
17
|
-
(0, tslib_1.__exportStar)(require("./minWords"), exports);
|
|
18
|
-
(0, tslib_1.__exportStar)(require("./maxWords"), exports);
|
|
19
|
-
(0, tslib_1.__exportStar)(require("./validate"), exports);
|
|
20
|
-
(0, tslib_1.__exportStar)(require("./form"), exports);
|
|
21
|
-
(0, tslib_1.__exportStar)(require("./tabs"), exports);
|
|
22
|
-
(0, tslib_1.__exportStar)(require("./placeholder"), exports);
|
|
23
|
-
(0, tslib_1.__exportStar)(require("./tooltip"), exports);
|
|
24
|
-
(0, tslib_1.__exportStar)(require("./label"), exports);
|
|
25
|
-
(0, tslib_1.__exportStar)(require("./customClass"), exports);
|
|
26
|
-
(0, tslib_1.__exportStar)(require("./modalEdit"), exports);
|
|
27
|
-
(0, tslib_1.__exportStar)(require("./mask"), exports);
|
|
28
|
-
(0, tslib_1.__exportStar)(require("./prefix"), exports);
|
|
29
|
-
(0, tslib_1.__exportStar)(require("./suffix"), exports);
|
|
30
|
-
(0, tslib_1.__exportStar)(require("./textCase"), exports);
|
|
31
|
-
(0, tslib_1.__exportStar)(require("./conditional"), exports);
|
|
32
|
-
(0, tslib_1.__exportStar)(require("./customConditional"), exports);
|
|
33
|
-
(0, tslib_1.__exportStar)(require("./openWhenEmpty"), exports);
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":";;;AAAA,2DAA4B;AAC5B,0DAA2B;AAC3B,gEAAiC;AACjC,+DAAgC;AAChC,wDAAyB;AACzB,2DAA4B;AAC5B,0DAA2B;AAC3B,0DAA2B;AAC3B,wDAAyB;AACzB,2DAA4B;AAC5B,0DAA2B;AAC3B,8DAA+B;AAC/B,4DAA6B;AAC7B,0DAA2B;AAC3B,0DAA2B;AAC3B,0DAA2B;AAC3B,sDAAuB;AACvB,sDAAuB;AACvB,6DAA8B;AAC9B,yDAA0B;AAC1B,uDAAwB;AACxB,6DAA8B;AAC9B,2DAA4B;AAC5B,sDAAuB;AACvB,wDAAyB;AACzB,wDAAyB;AACzB,0DAA2B;AAC3B,6DAA8B;AAC9B,mEAAoC;AACpC,+DAAgC","sourcesContent":["export * from \"./component\";\nexport * from \"./currency\";\nexport * from \"./dataSourceJson\";\nexport * from \"./dataSourceUrl\";\nexport * from \"./hidden\";\nexport * from \"./inputTags\";\nexport * from \"./multiple\";\nexport * from \"./password\";\nexport * from \"./select\";\nexport * from \"./tableView\";\nexport * from \"./textarea\";\nexport * from \"./errorMessage\";\nexport * from \"./errorLabel\";\nexport * from \"./minWords\";\nexport * from \"./maxWords\";\nexport * from \"./validate\";\nexport * from \"./form\";\nexport * from \"./tabs\";\nexport * from \"./placeholder\";\nexport * from \"./tooltip\";\nexport * from \"./label\";\nexport * from \"./customClass\";\nexport * from \"./modalEdit\";\nexport * from \"./mask\";\nexport * from \"./prefix\";\nexport * from \"./suffix\";\nexport * from \"./textCase\";\nexport * from \"./conditional\";\nexport * from \"./customConditional\";\nexport * from \"./openWhenEmpty\";\n"]}
|
|
@@ -1,14 +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";
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC","sourcesContent":["export * from \"./anyToComponent\";\nexport * from \"./arrayToComponent\";\nexport * from \"./booleanToComponent\";\nexport * from \"./dateToComponent\";\nexport * from \"./defaultToComponent\";\nexport * from \"./enumToComponent\";\nexport * from \"./mapToComponent\";\nexport * from \"./nestedToComponent\";\nexport * from \"./numberToComponent\";\nexport * from \"./objectToEditGrid\";\nexport * from \"./panelToComponent\";\nexport * from \"./propertiesToComponents\";\nexport * from \"./stringToComponent\";\n"]}
|
|
@@ -1,31 +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";
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from \"./component\";\nexport * from \"./currency\";\nexport * from \"./dataSourceJson\";\nexport * from \"./dataSourceUrl\";\nexport * from \"./hidden\";\nexport * from \"./inputTags\";\nexport * from \"./multiple\";\nexport * from \"./password\";\nexport * from \"./select\";\nexport * from \"./tableView\";\nexport * from \"./textarea\";\nexport * from \"./errorMessage\";\nexport * from \"./errorLabel\";\nexport * from \"./minWords\";\nexport * from \"./maxWords\";\nexport * from \"./validate\";\nexport * from \"./form\";\nexport * from \"./tabs\";\nexport * from \"./placeholder\";\nexport * from \"./tooltip\";\nexport * from \"./label\";\nexport * from \"./customClass\";\nexport * from \"./modalEdit\";\nexport * from \"./mask\";\nexport * from \"./prefix\";\nexport * from \"./suffix\";\nexport * from \"./textCase\";\nexport * from \"./conditional\";\nexport * from \"./customConditional\";\nexport * from \"./openWhenEmpty\";\n"]}
|
|
@@ -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,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";
|