@tsed/schema-formio 6.84.0 → 6.86.1
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/decorators/index.d.ts +1 -0
- package/lib/index.js +17 -2
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +17 -3
- package/lib/index.modern.js.map +1 -1
- package/package.json +8 -8
package/lib/index.js
CHANGED
|
@@ -31,7 +31,7 @@ function anyToComponent(schema, options) {
|
|
|
31
31
|
|
|
32
32
|
switch (schema.type) {
|
|
33
33
|
case "object":
|
|
34
|
-
if (schema.
|
|
34
|
+
if (!schema.properties && !schema.$ref) {
|
|
35
35
|
return execMapper("map", schema, options);
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -229,7 +229,7 @@ function mapToComponent(schema, options) {
|
|
|
229
229
|
type: "datamap",
|
|
230
230
|
tableView: false,
|
|
231
231
|
input: true,
|
|
232
|
-
valueComponent: _extends({}, execMapper("any", schema.additionalProperties, options), {
|
|
232
|
+
valueComponent: _extends({}, schema.additionalProperties ? execMapper("any", schema.additionalProperties, options) : {}, {
|
|
233
233
|
hideLabel: true,
|
|
234
234
|
tableView: true
|
|
235
235
|
})
|
|
@@ -967,6 +967,20 @@ function CustomConditional(customConditional) {
|
|
|
967
967
|
});
|
|
968
968
|
}
|
|
969
969
|
|
|
970
|
+
/**
|
|
971
|
+
* Open automatically the editgrid when the list is empty.
|
|
972
|
+
* @decorator
|
|
973
|
+
* @formio
|
|
974
|
+
* @property
|
|
975
|
+
* @schema
|
|
976
|
+
*/
|
|
977
|
+
|
|
978
|
+
function OpenWhenEmpty(openWhenEmpty = true) {
|
|
979
|
+
return Component({
|
|
980
|
+
openWhenEmpty
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
|
|
970
984
|
async function getFormioSchema(model, options = {}) {
|
|
971
985
|
if (!model) {
|
|
972
986
|
return undefined;
|
|
@@ -1025,6 +1039,7 @@ exports.MaxWords = MaxWords;
|
|
|
1025
1039
|
exports.MinWords = MinWords;
|
|
1026
1040
|
exports.ModalEdit = ModalEdit;
|
|
1027
1041
|
exports.Multiple = Multiple;
|
|
1042
|
+
exports.OpenWhenEmpty = OpenWhenEmpty;
|
|
1028
1043
|
exports.Password = Password;
|
|
1029
1044
|
exports.Placeholder = Placeholder;
|
|
1030
1045
|
exports.Prefix = Prefix;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/registries/FormioMappersContainer.ts","../src/utils/getRef.ts","../src/components/anyToComponent.ts","../src/components/arrayToComponent.ts","../src/components/booleanToComponent.ts","../src/components/dateToComponent.ts","../src/utils/getFormioProps.ts","../src/components/defaultToComponent.ts","../src/components/enumToComponent.ts","../src/components/mapToComponent.ts","../src/components/nestedToComponent.ts","../src/components/numberToComponent.ts","../src/components/objectToEditGrid.ts","../src/components/panelToComponent.ts","../src/components/propertiesToComponents.ts","../src/components/stringToComponent.ts","../src/decorators/component.ts","../src/decorators/currency.ts","../src/decorators/dataSourceJson.ts","../src/decorators/dataSourceUrl.ts","../src/decorators/hidden.ts","../src/decorators/inputTags.ts","../src/decorators/multiple.ts","../src/decorators/password.ts","../src/decorators/select.ts","../src/decorators/tableView.ts","../src/decorators/textarea.ts","../src/decorators/validate.ts","../src/decorators/errorMessage.ts","../src/decorators/errorLabel.ts","../src/decorators/minWords.ts","../src/decorators/maxWords.ts","../src/registries/FormsContainer.ts","../src/decorators/form.ts","../src/decorators/tabs.ts","../src/decorators/placeholder.ts","../src/decorators/tooltip.ts","../src/decorators/label.ts","../src/decorators/customClass.ts","../src/decorators/modalEdit.ts","../src/decorators/mask.ts","../src/decorators/prefix.ts","../src/decorators/suffix.ts","../src/decorators/textCase.ts","../src/decorators/conditional.ts","../src/decorators/customConditional.ts","../src/utils/getFormioSchema.ts"],"sourcesContent":["export interface FormioMapper {\n (schema: any, options: any): any;\n}\n\nconst FormioMappersContainer: Map<string, FormioMapper> = new Map();\n\nexport function registerFormioMapper(type: string, mapper: FormioMapper) {\n return FormioMappersContainer.set(type, mapper);\n}\n\nexport function getFormioMapper(type: string): FormioMapper {\n // istanbul ignore next\n if (!FormioMappersContainer.has(type)) {\n throw new Error(`Formio ${type} mapper doesn't exists`);\n }\n return FormioMappersContainer.get(type)!;\n}\n\nexport function execMapper(type: string, schema: any, options: any): any {\n return getFormioMapper(type)(schema, options);\n}\n","import {getValue} from \"@tsed/core\";\n\nexport function getRef(schema: any, options: any) {\n if (schema.$ref) {\n return getValue(options, schema.$ref.replace(\"#/\", \"\").replace(/\\//g, \".\"));\n }\n return schema;\n}\n","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.additionalProperties) {\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 // default:\n // return execMapper(\"default\", schema, options);\n }\n}\n\nregisterFormioMapper(\"any\", anyToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getRef} from \"../utils/getRef\";\n\nexport function arrayToComponent(schema: any, options: any) {\n const itemSchema = schema.items.$ref ? getRef(schema.items, options) : schema.items;\n\n const {type} = itemSchema;\n\n switch (type) {\n case \"object\": // editgrid\n return {\n ...execMapper(\"default\", schema, options),\n ...execMapper(\"editgrid\", itemSchema, options)\n };\n case \"string\": // tag or enum?\n if (itemSchema.enum) {\n const component = execMapper(\"enum\", itemSchema, options);\n\n return {\n ...component,\n inline: false,\n type: \"selectboxes\"\n };\n }\n\n const component = execMapper(type, itemSchema, options);\n\n return cleanObject({\n ...component,\n multiple: component.type === \"tags\" ? undefined : true\n });\n default:\n case \"number\":\n return {\n ...execMapper(type, itemSchema, options),\n multiple: true\n };\n }\n}\n\nregisterFormioMapper(\"array\", arrayToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction booleanToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n return cleanObject({\n ...component,\n input: true,\n type: component.type || \"checkbox\"\n });\n}\n\nregisterFormioMapper(\"boolean\", booleanToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction dateToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n const base = {\n ...component,\n enableMinDateInput: false,\n datePicker: {\n disableWeekends: false,\n disableWeekdays: false\n },\n enableMaxDateInput: false,\n enableTime: false,\n type: \"datetime\",\n input: true,\n widget: {\n type: \"calendar\",\n displayInTimezone: \"viewer\",\n locale: \"en\",\n useLocaleSettings: false,\n allowInput: true,\n mode: \"single\",\n noCalendar: false,\n hourIncrement: 1,\n minuteIncrement: 1,\n minDate: null,\n disableWeekends: false,\n disableWeekdays: false,\n maxDate: null\n }\n };\n\n if (schema.format === \"date\") {\n return {\n ...base,\n format: \"yyyy-MM-dd\",\n enableTime: false,\n widget: {\n ...base.widget,\n enableTime: false,\n format: \"yyyy-MM-dd\"\n }\n };\n }\n\n return {\n ...base,\n timePicker: {\n showMeridian: false\n },\n widget: {\n enableTime: true,\n time_24hr: true\n }\n };\n}\n\nregisterFormioMapper(\"date\", dateToComponent);\n","export function getFormioProps(schema: any) {\n const formioProps: any = Object.entries(schema).reduce((props, [key, value]) => {\n if (key.startsWith(\"x-formio-\")) {\n return {\n ...props,\n [key.replace(\"x-formio-\", \"\")]: value\n };\n }\n return props;\n }, {});\n return formioProps;\n}\n","import {cleanObject} from \"@tsed/core\";\nimport {registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getFormioProps} from \"../utils/getFormioProps\";\n\nexport function defaultToComponent(schema: any, options: any): any {\n const formioProps = getFormioProps(schema);\n\n return cleanObject({\n ...formioProps,\n disabled: !!schema.readOnly,\n description: schema.description,\n defaultValue: schema.default\n });\n}\n\nregisterFormioMapper(\"default\", defaultToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {sentenceCase} from \"change-case\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function enumToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n const values = schema.enum.map((value: any) => {\n return {\n label: sentenceCase(value),\n value\n };\n });\n\n if (component.type === \"select\") {\n return cleanObject({\n ...component,\n data: {\n json: JSON.stringify(values)\n },\n dataSrc: \"json\",\n idPath: \"value\",\n valueProperty: \"value\",\n template: \"<span>{{ item.label }}</span>\"\n });\n }\n\n return cleanObject({\n ...component,\n values: schema[\"x-values\"] || values.map((value: any) => ({...value, shortcut: \"\"}))\n });\n}\n\nregisterFormioMapper(\"enum\", enumToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function mapToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n type: \"datamap\",\n tableView: false,\n input: true,\n valueComponent: {\n ...execMapper(\"any\", schema.additionalProperties, options),\n hideLabel: true,\n tableView: true\n }\n };\n}\n\nregisterFormioMapper(\"map\", mapToComponent);\n","import {sentenceCase} from \"change-case\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function nestedToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n label: false,\n tableView: false,\n type: \"form\",\n display: \"form\",\n input: true,\n components: [\n {\n key: \"panel\",\n label: options.parentKey && sentenceCase(options.parentKey),\n ...execMapper(\"panel\", schema, options)\n }\n ]\n };\n}\n\nregisterFormioMapper(\"nested\", nestedToComponent);\n","import {cleanObject, getValue} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function numberToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n return cleanObject({\n ...component,\n input: true,\n delimiter: getValue(component, \"delimiter\", false),\n inputFormat: getValue(component, \"inputFormat\", \"plain\"),\n mask: getValue(component, \"mask\", false),\n requireDecimal: false,\n type: \"number\"\n });\n}\n\nregisterFormioMapper(\"number\", numberToComponent);\nregisterFormioMapper(\"integer\", numberToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function objectToEditGrid(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n rowDrafts: false,\n type: \"editgrid\",\n input: true,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"editgrid\", objectToEditGrid);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function panelToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n collapsible: false,\n input: false,\n tableView: false,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"panel\", panelToComponent);\n","import {cleanObject, isFunction} from \"@tsed/core\";\nimport {sentenceCase} from \"change-case\";\nimport {FormioComponent, FormioForm} from \"@tsed/formio-types\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction bindResolvers(component: FormioComponent, options: any) {\n if (component.data) {\n const data = component.data;\n\n Object.entries(data).forEach(([key, resolver]) => {\n if (isFunction(resolver)) {\n options.resolvers.push(async (form: FormioForm) => {\n data[key] = await resolver({...options, component, form});\n });\n }\n });\n }\n}\n\nfunction mapValidation(key: string, base: FormioComponent, schema: any, propSchema: any) {\n const required = (schema.required || []).includes(key);\n const validate = {\n ...(base.validate || {}),\n required,\n pattern: propSchema.pattern,\n minLength: !required || (required && propSchema.minLength > 1) ? propSchema.minLength : undefined,\n maxLength: propSchema.maxLength,\n min: propSchema.minimum,\n max: propSchema.maximum\n };\n\n switch (propSchema.type) {\n case \"string\":\n if (propSchema.minLength === 0 && validate.required) {\n validate.minLength = undefined;\n validate.required = false;\n }\n break;\n case \"boolean\":\n validate.required = false;\n break;\n }\n\n return cleanObject(validate);\n}\n\nexport function propertiesToComponents(schema: any, options: any): any[] {\n const tabs = {\n label: \"Tabs\",\n key: \"tabs\",\n type: \"tabs\",\n input: false,\n tableView: false,\n components: new Map<string, any>(),\n pushed: false\n };\n\n const components: any[] = [];\n\n Object.entries(schema.properties).forEach(([key, propSchema]: [string, any]) => {\n const tabsOptions = propSchema[\"x-formiotabs\"];\n const base = execMapper(\"any\", propSchema, {parentKey: key, ...options});\n\n const component = cleanObject({\n key,\n ...base,\n label: base.label == false ? undefined : base.label || propSchema.title || sentenceCase(key),\n validate: mapValidation(key, base, schema, propSchema)\n });\n\n bindResolvers(component, options);\n\n if (tabsOptions) {\n if (!tabs.pushed) {\n components.push(tabs);\n tabs.pushed = true;\n }\n\n if (!tabs.components.has(tabsOptions.key)) {\n tabs.components.set(tabsOptions.key, {\n ...tabsOptions,\n components: []\n });\n }\n\n tabs.components.get(tabsOptions.key).components.push(component);\n } else {\n components.push(component);\n }\n });\n\n if (tabs.components.size) {\n tabs.components = [...tabs.components.values()] as any;\n }\n\n return components;\n}\n\nregisterFormioMapper(\"properties\", propertiesToComponents);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function stringToComponent(schema: any, options: any) {\n if (schema.format) {\n const component = execMapper(\"default\", schema, options);\n switch (schema.format) {\n case \"date\":\n case \"date-time\":\n return execMapper(\"date\", schema, options);\n case \"uri\":\n return cleanObject({\n input: true,\n ...component,\n type: component.type || \"url\"\n });\n default:\n return cleanObject({\n input: true,\n ...component,\n type: component.type || schema.format\n });\n }\n }\n\n if (schema.enum) {\n const component = execMapper(\"enum\", schema, options);\n\n return {\n ...component,\n type: component.type || \"radio\"\n };\n }\n\n const component = execMapper(\"default\", schema, options);\n return cleanObject({\n input: true,\n type: component.type || \"textfield\",\n ...component\n });\n}\n\nregisterFormioMapper(\"string\", stringToComponent);\n","import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\n\n/**\n * Declare a formio Component schema on the decorated propertyKey.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Component(component: Record<string, any>): PropertyDecorator {\n component = Object.entries(component).reduce((component: Record<string, any>, [key, value]) => {\n if (key === \"validate\") {\n component[\"x-formio-validate\"] = {\n ...(component[\"x-formio-validate\"] || {}),\n ...value\n };\n }\n\n return {\n ...component,\n [`x-formio-${key}`]: value\n };\n }, {});\n\n return JsonEntityFn((store: JsonEntityStore) => {\n Object.entries(component).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n\n if (store.isCollection) {\n store.schema.customKey(key, value);\n }\n });\n });\n}\n","import {Component} from \"./component\";\n/**\n * Configure the property as Currency component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Currency(props: Record<string, any> = {}): PropertyDecorator {\n return Component({\n currency: \"USD\",\n inputFormat: \"plain\",\n mask: false,\n spellcheck: true,\n delimiter: true,\n ...props,\n type: \"currency\"\n });\n}\n","import {Component} from \"./component\";\nimport {FormioDataResolver, FormioDataResolverCtx} from \"../domain/FormioDataResolver\";\nimport {isFunction} from \"@tsed/core\";\n\nconst wrap = (resolver: FormioDataResolver) => async (opts: FormioDataResolverCtx) => {\n const result = await resolver(opts);\n return JSON.stringify(result);\n};\n\n/**\n * Set custom json data source\n * @param data\n * @param props\n * @constructor\n */\nexport function DataSourceJson(data: any | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"json\",\n data: {\n ...props.data,\n json: isFunction(data) ? wrap(data) : JSON.stringify(data)\n }\n });\n}\n","import {Component} from \"./component\";\nimport {FormioDataResolver} from \"../domain/FormioDataResolver\";\n\n/**\n * Set URL data on the current component.\n * @param url\n * @param props\n * @constructor\n */\nexport function DataSourceUrl(url: string | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"url\",\n data: {\n ...props.data,\n url\n }\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Set hidden field.\n *\n * A hidden field is still a part of the form, but is hidden from view.\n *\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Hidden(bool: boolean = true): PropertyDecorator {\n return Component({\n hidden: bool\n });\n}\n","import {useDecorators} from \"@tsed/core\";\nimport {CollectionOf} from \"@tsed/schema\";\nimport {Component} from \"./component\";\n/**\n * Configure the property as Tags component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function InputTags(props: Record<string, any> = {}): PropertyDecorator {\n return useDecorators(\n CollectionOf(String),\n Component({\n ...props,\n tableView: false,\n storeas: \"array\",\n type: \"tags\"\n })\n );\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the multiple value on the decorated property.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Multiple(multiple = false): PropertyDecorator {\n return Component({\n multiple\n });\n}\n","import {Component} from \"./component\";\n\nexport interface PasswordOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n/**\n * Configure the property as Password component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Password(props: PasswordOpts = {}): PropertyDecorator {\n return Component({\n ...props,\n type: \"password\",\n protected: true\n });\n}\n","import {Component} from \"./component\";\n\nexport interface SelectOpts extends Record<string, any> {\n idPath?: string;\n valueProperty?: string;\n template?: string;\n multiple?: boolean;\n}\n\n/**\n * Configure the property as Select component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Select(props: SelectOpts = {}): PropertyDecorator {\n return Component({\n selectThreshold: 0.3,\n input: true,\n widget: \"choicesjs\",\n ...props,\n type: \"select\"\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the visibility of the current property on a table.\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function TableView(bool: boolean): PropertyDecorator {\n return Component({\n tableView: bool\n });\n}\n","import {Component} from \"./component\";\n\nexport interface TextareaOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n\n/**\n * Configure the property as Textarea component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Textarea(props: TextareaOpts = {}): PropertyDecorator {\n return Component({\n autoExpand: false,\n ...props,\n type: \"textarea\"\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add validation rules.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param key\n * @param value\n */\nexport function Validate(key: string, value: any) {\n return Component({\n validate: {\n [key]: value\n }\n });\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add error message when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param message\n */\nexport function ErrorMessage(message: string) {\n return Validate(\"customMessage\", message);\n}\n","import {Component} from \"./component\";\n\n/**\n * Set the error label when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ErrorLabel(message: string) {\n return Component({\n errorLabel: message\n });\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add the maximum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MinWords(value: number) {\n return Validate(\"minWords\", value);\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add the minimum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MaxWords(value: number) {\n return Validate(\"maxWords\", value);\n}\n","import {Type} from \"@tsed/core\";\n\n// tslint:disable-next-line:variable-name\nexport const FormsContainer: Map<string, Type> = new Map();\n","import {nameOf, StoreSet, useDecorators} from \"@tsed/core\";\nimport {Name} from \"@tsed/schema\";\nimport {FormioForm} from \"@tsed/formio-types\";\nimport {paramCase} from \"change-case\";\nimport {FormsContainer} from \"../registries/FormsContainer\";\n\n/**\n * Expose the model as Formio Form.\n * @param form\n */\nexport function Form(form: Partial<Omit<FormioForm, \"components\" | \"_id\">> = {}): ClassDecorator {\n return useDecorators(\n (target: any) => {\n const name = form.name || nameOf(target);\n const machineName = paramCase(name);\n FormsContainer.set(name, target as any);\n FormsContainer.set(machineName, target as any);\n },\n form.name && Name(form.name),\n form && StoreSet(\"formio:form\", form)\n );\n}\n","import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\nimport {camelCase} from \"change-case\";\n\n/**\n * Group the current property in tabs components.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Tabs(label: string) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.customKey(\"x-formiotabs\", {\n key: camelCase(label),\n label\n });\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * The placeholder text that will appear when this field is empty.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param placeholder\n */\nexport function Placeholder(placeholder: string) {\n return Component({\n placeholder\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Adds a tooltip to the side of this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param tooltip\n */\nexport function Tooltip(tooltip: string) {\n return Component({\n tooltip\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the label field\n * @decorator\n * @formio\n * @property\n * @schema\n * @param label\n */\nexport function Label(label: string) {\n return Component({\n label\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add a custom css class.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function CustomClass(customClass: string) {\n return Component({\n customClass\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Opens up a modal to edit the value of this component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ModalEdit(modalEdit = true) {\n return Component({\n modalEdit\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Mask(inputMask: string, inputMaskPlaceholderChar: string = \"\") {\n return Component({\n inputMask,\n inputMaskPlaceholderChar\n });\n}\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Masks(...inputMasks: {label: string; mask: string}[]) {\n return Component({\n inputMasks\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add prefix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Prefix(prefix: string) {\n return Component({\n prefix\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add suffix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Suffix(suffix: string) {\n return Component({\n suffix\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Force the output of this field to be sanitized in a specific format.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param textCase\n */\nexport function TextCase(textCase: \"uppercase\" | \"lowercase\") {\n return Component({\n case: textCase\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param conditional\n */\nexport function Conditional(conditional: {show: boolean; when: string; eq: any}) {\n return Component({\n conditional\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function ShowWhen(property: string, eq: any) {\n return Conditional({\n show: true,\n when: property,\n eq\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function HideWhen(property: string, eq: any) {\n return Conditional({\n show: false,\n when: property,\n eq\n });\n}\n","import {FormioComponent, FormioForm, FormioSubmission} from \"@tsed/formio-types\";\nimport type {Moment} from \"moment\";\nimport type {LoDashStatic} from \"lodash\";\nimport type {Utils} from \"formiojs\";\nimport {Component} from \"./component\";\nimport {isArrowFn} from \"@tsed/core\";\n\nexport interface CustomConditionalCtx<Value = any, Data = any, Row = any> {\n /**\n * The complete submission object.\n */\n form: FormioForm;\n /**\n * The complete submission object.\n */\n submission: FormioSubmission<Data>;\n /**\n * The complete submission data object.\n */\n data: Data;\n /**\n * Contextual \"row\" data, used within DataGrid, EditGrid, and Container components\n */\n row: Row;\n /**\n * The current component JSON\n */\n component: FormioComponent;\n /**\n * The current component instance.\n */\n instance: any;\n /**\n * The current value of the component.\n */\n value: Value;\n /**\n * The moment.js library for date manipulation.\n */\n moment: Moment;\n /**\n * An instance of Lodash.\n */\n _: LoDashStatic;\n /**\n * An instance of the FormioUtils object.\n */\n utils: typeof Utils;\n /**\n * An alias for \"utils\".\n */\n util: typeof Utils;\n}\n\nfunction sanitize(customConditional: Function) {\n const str = customConditional.toString();\n\n const [signature, ...fn] = str.split(\"=>\");\n let content = fn.join(\"=>\");\n\n if (!signature.includes(\"{\")) {\n const reg = `${signature.trim()}\\.`;\n\n content = content.replace(new RegExp(reg, \"gi\"), \"\");\n }\n\n return `show = ${content.trim()}`;\n}\n\n/**\n * Adds custom conditional rule to display or not the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param customConditional\n */\nexport function CustomConditional(customConditional: string | ((ctx: CustomConditionalCtx) => any)) {\n if (isArrowFn(customConditional)) {\n customConditional = sanitize(customConditional);\n }\n\n return Component({\n customConditional\n });\n}\n","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 \"../components\";\nimport {FormsContainer} from \"../registries/FormsContainer\";\nimport {paramCase} from \"change-case\";\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"],"names":["FormioMappersContainer","Map","registerFormioMapper","type","mapper","set","getFormioMapper","has","Error","get","execMapper","schema","options","getRef","$ref","getValue","replace","anyToComponent","additionalProperties","arrayToComponent","itemSchema","items","enum","component","inline","cleanObject","multiple","undefined","booleanToComponent","input","dateToComponent","base","enableMinDateInput","datePicker","disableWeekends","disableWeekdays","enableMaxDateInput","enableTime","widget","displayInTimezone","locale","useLocaleSettings","allowInput","mode","noCalendar","hourIncrement","minuteIncrement","minDate","maxDate","format","timePicker","showMeridian","time_24hr","getFormioProps","formioProps","Object","entries","reduce","props","key","value","startsWith","defaultToComponent","disabled","readOnly","description","defaultValue","default","enumToComponent","values","map","label","sentenceCase","data","json","JSON","stringify","dataSrc","idPath","valueProperty","template","shortcut","mapToComponent","tableView","valueComponent","hideLabel","nestedToComponent","display","components","parentKey","numberToComponent","delimiter","inputFormat","mask","requireDecimal","objectToEditGrid","rowDrafts","panelToComponent","collapsible","bindResolvers","forEach","resolver","isFunction","resolvers","push","form","mapValidation","propSchema","required","includes","validate","pattern","minLength","maxLength","min","minimum","max","maximum","propertiesToComponents","tabs","pushed","properties","tabsOptions","title","size","stringToComponent","Component","JsonEntityFn","store","customKey","isCollection","Currency","currency","spellcheck","wrap","opts","result","DataSourceJson","DataSourceUrl","url","Hidden","bool","hidden","InputTags","useDecorators","CollectionOf","String","storeas","Multiple","Password","protected","Select","selectThreshold","TableView","Textarea","autoExpand","Validate","ErrorMessage","message","ErrorLabel","errorLabel","MinWords","MaxWords","FormsContainer","Form","target","name","nameOf","machineName","paramCase","Name","StoreSet","Tabs","camelCase","Placeholder","placeholder","Tooltip","tooltip","Label","CustomClass","customClass","ModalEdit","modalEdit","Mask","inputMask","inputMaskPlaceholderChar","Masks","inputMasks","Prefix","prefix","Suffix","suffix","TextCase","textCase","case","Conditional","conditional","ShowWhen","property","eq","show","when","HideWhen","sanitize","customConditional","str","toString","signature","fn","split","content","join","reg","trim","RegExp","CustomConditional","isArrowFn","getFormioSchema","model","isString","entity","JsonEntityStore","from","getJsonSchema","customKeys","getName","definitions","tags","access","submissionAccess","Promise","all"],"mappings":";;;;AAIA,MAAMA,sBAAsB,GAA8B,IAAIC,GAAJ,EAA1D;SAEgBC,qBAAqBC,MAAcC;AACjD,SAAOJ,sBAAsB,CAACK,GAAvB,CAA2BF,IAA3B,EAAiCC,MAAjC,CAAP;AACD;SAEeE,gBAAgBH;AAC9B;AACA,MAAI,CAACH,sBAAsB,CAACO,GAAvB,CAA2BJ,IAA3B,CAAL,EAAuC;AACrC,UAAM,IAAIK,KAAJ,WAAoBL,4BAApB,CAAN;AACD;;AACD,SAAOH,sBAAsB,CAACS,GAAvB,CAA2BN,IAA3B,CAAP;AACD;SAEeO,WAAWP,MAAcQ,QAAaC;AACpD,SAAON,eAAe,CAACH,IAAD,CAAf,CAAsBQ,MAAtB,EAA8BC,OAA9B,CAAP;AACD;;SClBeC,OAAOF,QAAaC;AAClC,MAAID,MAAM,CAACG,IAAX,EAAiB;AACf,WAAOC,aAAQ,CAACH,OAAD,EAAUD,MAAM,CAACG,IAAP,CAAYE,OAAZ,CAAoB,IAApB,EAA0B,EAA1B,EAA8BA,OAA9B,CAAsC,KAAtC,EAA6C,GAA7C,CAAV,CAAf;AACD;;AACD,SAAOL,MAAP;AACD;;SCJeM,eAAeN,QAAaC;AAC1CD,EAAAA,MAAM,GAAGE,MAAM,CAAC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AAf,CAAmBiN,KAAnB,CAAD,EAAyC9M,OAAzC,CAAtB;AACD;;AAED,QAAMgN,MAAM,GAAGC,sBAAe,CAACC,IAAhB,CAAqBJ,KAArB,CAAf;AACA,QAAM/M,QAAM,GAAGoN,oBAAa,CAACH,MAAD,eACvBhN,OADuB;AAE1BoN,IAAAA,UAAU,EAAE;AAFc,KAA5B;AAKA,QAAM1D,IAAI,GAAGsD,MAAM,CAACjN,MAAP,CAAcsN,OAAd,EAAb;AACA,QAAMzD,WAAW,GAAGC,oBAAS,CAACH,IAAD,CAA7B;AACA,QAAM/D,SAAS,GAAmB,EAAlC;AACA,QAAMf,UAAU,GAAG9E,UAAU,CAAC,YAAD,EAAeC,QAAf,eAA2BC,OAA3B;AAAoCsN,IAAAA,WAAW,EAAEvN,QAAM,CAACuN,WAAxD;AAAqE3H,IAAAA;AAArE,KAA7B;;AACA,QAAME,IAAI;AACRkB,IAAAA,KAAK,EAAE2C,IADC;AAERnK,IAAAA,IAAI,EAAE,MAFE;AAGRoF,IAAAA,OAAO,EAAE,MAHD;AAIR4I,IAAAA,IAAI,EAAE,EAJE;AAKRC,IAAAA,MAAM,EAAE,EALA;AAMRC,IAAAA,gBAAgB,EAAE;AANV,KAOLT,MAAM,CAAC5F,KAAP,CAAavH,GAAb,CAAsB,aAAtB,EAAqC,EAArC,CAPK;AAQR6J,IAAAA,IAAI,EAAEE,WARE;AASRA,IAAAA,WATQ;AAURhF,IAAAA;AAVQ,IAAV;;AAaA,QAAM8I,OAAO,CAACC,GAAR,CAAYhI,SAAS,CAACjC,GAAV,CAAe+B,QAAD,IAAmBA,QAAQ,CAACI,IAAD,EAAO7F,OAAP,CAAzC,CAAZ,CAAN;AAEA,SAAQ6F,IAAR;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/registries/FormioMappersContainer.ts","../src/utils/getRef.ts","../src/components/anyToComponent.ts","../src/components/arrayToComponent.ts","../src/components/booleanToComponent.ts","../src/components/dateToComponent.ts","../src/utils/getFormioProps.ts","../src/components/defaultToComponent.ts","../src/components/enumToComponent.ts","../src/components/mapToComponent.ts","../src/components/nestedToComponent.ts","../src/components/numberToComponent.ts","../src/components/objectToEditGrid.ts","../src/components/panelToComponent.ts","../src/components/propertiesToComponents.ts","../src/components/stringToComponent.ts","../src/decorators/component.ts","../src/decorators/currency.ts","../src/decorators/dataSourceJson.ts","../src/decorators/dataSourceUrl.ts","../src/decorators/hidden.ts","../src/decorators/inputTags.ts","../src/decorators/multiple.ts","../src/decorators/password.ts","../src/decorators/select.ts","../src/decorators/tableView.ts","../src/decorators/textarea.ts","../src/decorators/validate.ts","../src/decorators/errorMessage.ts","../src/decorators/errorLabel.ts","../src/decorators/minWords.ts","../src/decorators/maxWords.ts","../src/registries/FormsContainer.ts","../src/decorators/form.ts","../src/decorators/tabs.ts","../src/decorators/placeholder.ts","../src/decorators/tooltip.ts","../src/decorators/label.ts","../src/decorators/customClass.ts","../src/decorators/modalEdit.ts","../src/decorators/mask.ts","../src/decorators/prefix.ts","../src/decorators/suffix.ts","../src/decorators/textCase.ts","../src/decorators/conditional.ts","../src/decorators/customConditional.ts","../src/decorators/openWhenEmpty.ts","../src/utils/getFormioSchema.ts"],"sourcesContent":["export interface FormioMapper {\n (schema: any, options: any): any;\n}\n\nconst FormioMappersContainer: Map<string, FormioMapper> = new Map();\n\nexport function registerFormioMapper(type: string, mapper: FormioMapper) {\n return FormioMappersContainer.set(type, mapper);\n}\n\nexport function getFormioMapper(type: string): FormioMapper {\n // istanbul ignore next\n if (!FormioMappersContainer.has(type)) {\n throw new Error(`Formio ${type} mapper doesn't exists`);\n }\n return FormioMappersContainer.get(type)!;\n}\n\nexport function execMapper(type: string, schema: any, options: any): any {\n return getFormioMapper(type)(schema, options);\n}\n","import {getValue} from \"@tsed/core\";\n\nexport function getRef(schema: any, options: any) {\n if (schema.$ref) {\n return getValue(options, schema.$ref.replace(\"#/\", \"\").replace(/\\//g, \".\"));\n }\n return schema;\n}\n","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 // default:\n // return execMapper(\"default\", schema, options);\n }\n}\n\nregisterFormioMapper(\"any\", anyToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getRef} from \"../utils/getRef\";\n\nexport function arrayToComponent(schema: any, options: any) {\n const itemSchema = schema.items.$ref ? getRef(schema.items, options) : schema.items;\n\n const {type} = itemSchema;\n\n switch (type) {\n case \"object\": // editgrid\n return {\n ...execMapper(\"default\", schema, options),\n ...execMapper(\"editgrid\", itemSchema, options)\n };\n case \"string\": // tag or enum?\n if (itemSchema.enum) {\n const component = execMapper(\"enum\", itemSchema, options);\n\n return {\n ...component,\n inline: false,\n type: \"selectboxes\"\n };\n }\n\n const component = execMapper(type, itemSchema, options);\n\n return cleanObject({\n ...component,\n multiple: component.type === \"tags\" ? undefined : true\n });\n default:\n case \"number\":\n return {\n ...execMapper(type, itemSchema, options),\n multiple: true\n };\n }\n}\n\nregisterFormioMapper(\"array\", arrayToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction booleanToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n return cleanObject({\n ...component,\n input: true,\n type: component.type || \"checkbox\"\n });\n}\n\nregisterFormioMapper(\"boolean\", booleanToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction dateToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n const base = {\n ...component,\n enableMinDateInput: false,\n datePicker: {\n disableWeekends: false,\n disableWeekdays: false\n },\n enableMaxDateInput: false,\n enableTime: false,\n type: \"datetime\",\n input: true,\n widget: {\n type: \"calendar\",\n displayInTimezone: \"viewer\",\n locale: \"en\",\n useLocaleSettings: false,\n allowInput: true,\n mode: \"single\",\n noCalendar: false,\n hourIncrement: 1,\n minuteIncrement: 1,\n minDate: null,\n disableWeekends: false,\n disableWeekdays: false,\n maxDate: null\n }\n };\n\n if (schema.format === \"date\") {\n return {\n ...base,\n format: \"yyyy-MM-dd\",\n enableTime: false,\n widget: {\n ...base.widget,\n enableTime: false,\n format: \"yyyy-MM-dd\"\n }\n };\n }\n\n return {\n ...base,\n timePicker: {\n showMeridian: false\n },\n widget: {\n enableTime: true,\n time_24hr: true\n }\n };\n}\n\nregisterFormioMapper(\"date\", dateToComponent);\n","export function getFormioProps(schema: any) {\n const formioProps: any = Object.entries(schema).reduce((props, [key, value]) => {\n if (key.startsWith(\"x-formio-\")) {\n return {\n ...props,\n [key.replace(\"x-formio-\", \"\")]: value\n };\n }\n return props;\n }, {});\n return formioProps;\n}\n","import {cleanObject} from \"@tsed/core\";\nimport {registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getFormioProps} from \"../utils/getFormioProps\";\n\nexport function defaultToComponent(schema: any, options: any): any {\n const formioProps = getFormioProps(schema);\n\n return cleanObject({\n ...formioProps,\n disabled: !!schema.readOnly,\n description: schema.description,\n defaultValue: schema.default\n });\n}\n\nregisterFormioMapper(\"default\", defaultToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {sentenceCase} from \"change-case\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function enumToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n const values = schema.enum.map((value: any) => {\n return {\n label: sentenceCase(value),\n value\n };\n });\n\n if (component.type === \"select\") {\n return cleanObject({\n ...component,\n data: {\n json: JSON.stringify(values)\n },\n dataSrc: \"json\",\n idPath: \"value\",\n valueProperty: \"value\",\n template: \"<span>{{ item.label }}</span>\"\n });\n }\n\n return cleanObject({\n ...component,\n values: schema[\"x-values\"] || values.map((value: any) => ({...value, shortcut: \"\"}))\n });\n}\n\nregisterFormioMapper(\"enum\", enumToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function mapToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n type: \"datamap\",\n tableView: false,\n input: true,\n valueComponent: {\n ...(schema.additionalProperties ? execMapper(\"any\", schema.additionalProperties, options) : {}),\n hideLabel: true,\n tableView: true\n }\n };\n}\n\nregisterFormioMapper(\"map\", mapToComponent);\n","import {sentenceCase} from \"change-case\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function nestedToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n label: false,\n tableView: false,\n type: \"form\",\n display: \"form\",\n input: true,\n components: [\n {\n key: \"panel\",\n label: options.parentKey && sentenceCase(options.parentKey),\n ...execMapper(\"panel\", schema, options)\n }\n ]\n };\n}\n\nregisterFormioMapper(\"nested\", nestedToComponent);\n","import {cleanObject, getValue} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function numberToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n return cleanObject({\n ...component,\n input: true,\n delimiter: getValue(component, \"delimiter\", false),\n inputFormat: getValue(component, \"inputFormat\", \"plain\"),\n mask: getValue(component, \"mask\", false),\n requireDecimal: false,\n type: \"number\"\n });\n}\n\nregisterFormioMapper(\"number\", numberToComponent);\nregisterFormioMapper(\"integer\", numberToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function objectToEditGrid(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n rowDrafts: false,\n type: \"editgrid\",\n input: true,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"editgrid\", objectToEditGrid);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function panelToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n collapsible: false,\n input: false,\n tableView: false,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"panel\", panelToComponent);\n","import {cleanObject, isFunction} from \"@tsed/core\";\nimport {sentenceCase} from \"change-case\";\nimport {FormioComponent, FormioForm} from \"@tsed/formio-types\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction bindResolvers(component: FormioComponent, options: any) {\n if (component.data) {\n const data = component.data;\n\n Object.entries(data).forEach(([key, resolver]) => {\n if (isFunction(resolver)) {\n options.resolvers.push(async (form: FormioForm) => {\n data[key] = await resolver({...options, component, form});\n });\n }\n });\n }\n}\n\nfunction mapValidation(key: string, base: FormioComponent, schema: any, propSchema: any) {\n const required = (schema.required || []).includes(key);\n const validate = {\n ...(base.validate || {}),\n required,\n pattern: propSchema.pattern,\n minLength: !required || (required && propSchema.minLength > 1) ? propSchema.minLength : undefined,\n maxLength: propSchema.maxLength,\n min: propSchema.minimum,\n max: propSchema.maximum\n };\n\n switch (propSchema.type) {\n case \"string\":\n if (propSchema.minLength === 0 && validate.required) {\n validate.minLength = undefined;\n validate.required = false;\n }\n break;\n case \"boolean\":\n validate.required = false;\n break;\n }\n\n return cleanObject(validate);\n}\n\nexport function propertiesToComponents(schema: any, options: any): any[] {\n const tabs = {\n label: \"Tabs\",\n key: \"tabs\",\n type: \"tabs\",\n input: false,\n tableView: false,\n components: new Map<string, any>(),\n pushed: false\n };\n const components: any[] = [];\n\n Object.entries(schema.properties).forEach(([key, propSchema]: [string, any]) => {\n const tabsOptions = propSchema[\"x-formiotabs\"];\n const base = execMapper(\"any\", propSchema, {parentKey: key, ...options});\n\n const component = cleanObject({\n key,\n ...base,\n label: base.label == false ? undefined : base.label || propSchema.title || sentenceCase(key),\n validate: mapValidation(key, base, schema, propSchema)\n });\n\n bindResolvers(component, options);\n\n if (tabsOptions) {\n if (!tabs.pushed) {\n components.push(tabs);\n tabs.pushed = true;\n }\n\n if (!tabs.components.has(tabsOptions.key)) {\n tabs.components.set(tabsOptions.key, {\n ...tabsOptions,\n components: []\n });\n }\n\n tabs.components.get(tabsOptions.key).components.push(component);\n } else {\n components.push(component);\n }\n });\n\n if (tabs.components.size) {\n tabs.components = [...tabs.components.values()] as any;\n }\n\n return components;\n}\n\nregisterFormioMapper(\"properties\", propertiesToComponents);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function stringToComponent(schema: any, options: any) {\n if (schema.format) {\n const component = execMapper(\"default\", schema, options);\n switch (schema.format) {\n case \"date\":\n case \"date-time\":\n return execMapper(\"date\", schema, options);\n case \"uri\":\n return cleanObject({\n input: true,\n ...component,\n type: component.type || \"url\"\n });\n default:\n return cleanObject({\n input: true,\n ...component,\n type: component.type || schema.format\n });\n }\n }\n\n if (schema.enum) {\n const component = execMapper(\"enum\", schema, options);\n\n return {\n ...component,\n type: component.type || \"radio\"\n };\n }\n\n const component = execMapper(\"default\", schema, options);\n return cleanObject({\n input: true,\n type: component.type || \"textfield\",\n ...component\n });\n}\n\nregisterFormioMapper(\"string\", stringToComponent);\n","import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\n\n/**\n * Declare a formio Component schema on the decorated propertyKey.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Component(component: Record<string, any>): PropertyDecorator {\n component = Object.entries(component).reduce((component: Record<string, any>, [key, value]) => {\n if (key === \"validate\") {\n component[\"x-formio-validate\"] = {\n ...(component[\"x-formio-validate\"] || {}),\n ...value\n };\n }\n\n return {\n ...component,\n [`x-formio-${key}`]: value\n };\n }, {});\n\n return JsonEntityFn((store: JsonEntityStore) => {\n Object.entries(component).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n\n if (store.isCollection) {\n store.schema.customKey(key, value);\n }\n });\n });\n}\n","import {Component} from \"./component\";\n/**\n * Configure the property as Currency component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Currency(props: Record<string, any> = {}): PropertyDecorator {\n return Component({\n currency: \"USD\",\n inputFormat: \"plain\",\n mask: false,\n spellcheck: true,\n delimiter: true,\n ...props,\n type: \"currency\"\n });\n}\n","import {Component} from \"./component\";\nimport {FormioDataResolver, FormioDataResolverCtx} from \"../domain/FormioDataResolver\";\nimport {isFunction} from \"@tsed/core\";\n\nconst wrap = (resolver: FormioDataResolver) => async (opts: FormioDataResolverCtx) => {\n const result = await resolver(opts);\n return JSON.stringify(result);\n};\n\n/**\n * Set custom json data source\n * @param data\n * @param props\n * @constructor\n */\nexport function DataSourceJson(data: any | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"json\",\n data: {\n ...props.data,\n json: isFunction(data) ? wrap(data) : JSON.stringify(data)\n }\n });\n}\n","import {Component} from \"./component\";\nimport {FormioDataResolver} from \"../domain/FormioDataResolver\";\n\n/**\n * Set URL data on the current component.\n * @param url\n * @param props\n * @constructor\n */\nexport function DataSourceUrl(url: string | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"url\",\n data: {\n ...props.data,\n url\n }\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Set hidden field.\n *\n * A hidden field is still a part of the form, but is hidden from view.\n *\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Hidden(bool: boolean = true): PropertyDecorator {\n return Component({\n hidden: bool\n });\n}\n","import {useDecorators} from \"@tsed/core\";\nimport {CollectionOf} from \"@tsed/schema\";\nimport {Component} from \"./component\";\n/**\n * Configure the property as Tags component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function InputTags(props: Record<string, any> = {}): PropertyDecorator {\n return useDecorators(\n CollectionOf(String),\n Component({\n ...props,\n tableView: false,\n storeas: \"array\",\n type: \"tags\"\n })\n );\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the multiple value on the decorated property.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Multiple(multiple = false): PropertyDecorator {\n return Component({\n multiple\n });\n}\n","import {Component} from \"./component\";\n\nexport interface PasswordOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n/**\n * Configure the property as Password component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Password(props: PasswordOpts = {}): PropertyDecorator {\n return Component({\n ...props,\n type: \"password\",\n protected: true\n });\n}\n","import {Component} from \"./component\";\n\nexport interface SelectOpts extends Record<string, any> {\n idPath?: string;\n valueProperty?: string;\n template?: string;\n multiple?: boolean;\n}\n\n/**\n * Configure the property as Select component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Select(props: SelectOpts = {}): PropertyDecorator {\n return Component({\n selectThreshold: 0.3,\n input: true,\n widget: \"choicesjs\",\n ...props,\n type: \"select\"\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the visibility of the current property on a table.\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function TableView(bool: boolean): PropertyDecorator {\n return Component({\n tableView: bool\n });\n}\n","import {Component} from \"./component\";\n\nexport interface TextareaOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n\n/**\n * Configure the property as Textarea component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Textarea(props: TextareaOpts = {}): PropertyDecorator {\n return Component({\n autoExpand: false,\n ...props,\n type: \"textarea\"\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add validation rules.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param key\n * @param value\n */\nexport function Validate(key: string, value: any) {\n return Component({\n validate: {\n [key]: value\n }\n });\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add error message when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param message\n */\nexport function ErrorMessage(message: string) {\n return Validate(\"customMessage\", message);\n}\n","import {Component} from \"./component\";\n\n/**\n * Set the error label when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ErrorLabel(message: string) {\n return Component({\n errorLabel: message\n });\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add the maximum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MinWords(value: number) {\n return Validate(\"minWords\", value);\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add the minimum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MaxWords(value: number) {\n return Validate(\"maxWords\", value);\n}\n","import {Type} from \"@tsed/core\";\n\n// tslint:disable-next-line:variable-name\nexport const FormsContainer: Map<string, Type> = new Map();\n","import {nameOf, StoreSet, useDecorators} from \"@tsed/core\";\nimport {Name} from \"@tsed/schema\";\nimport {FormioForm} from \"@tsed/formio-types\";\nimport {paramCase} from \"change-case\";\nimport {FormsContainer} from \"../registries/FormsContainer\";\n\n/**\n * Expose the model as Formio Form.\n * @param form\n */\nexport function Form(form: Partial<Omit<FormioForm, \"components\" | \"_id\">> = {}): ClassDecorator {\n return useDecorators(\n (target: any) => {\n const name = form.name || nameOf(target);\n const machineName = paramCase(name);\n FormsContainer.set(name, target as any);\n FormsContainer.set(machineName, target as any);\n },\n form.name && Name(form.name),\n form && StoreSet(\"formio:form\", form)\n );\n}\n","import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\nimport {camelCase} from \"change-case\";\n\n/**\n * Group the current property in tabs components.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Tabs(label: string) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.customKey(\"x-formiotabs\", {\n key: camelCase(label),\n label\n });\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * The placeholder text that will appear when this field is empty.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param placeholder\n */\nexport function Placeholder(placeholder: string) {\n return Component({\n placeholder\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Adds a tooltip to the side of this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param tooltip\n */\nexport function Tooltip(tooltip: string) {\n return Component({\n tooltip\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the label field\n * @decorator\n * @formio\n * @property\n * @schema\n * @param label\n */\nexport function Label(label: string) {\n return Component({\n label\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add a custom css class.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function CustomClass(customClass: string) {\n return Component({\n customClass\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Opens up a modal to edit the value of this component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ModalEdit(modalEdit = true) {\n return Component({\n modalEdit\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Mask(inputMask: string, inputMaskPlaceholderChar: string = \"\") {\n return Component({\n inputMask,\n inputMaskPlaceholderChar\n });\n}\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Masks(...inputMasks: {label: string; mask: string}[]) {\n return Component({\n inputMasks\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add prefix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Prefix(prefix: string) {\n return Component({\n prefix\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add suffix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Suffix(suffix: string) {\n return Component({\n suffix\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Force the output of this field to be sanitized in a specific format.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param textCase\n */\nexport function TextCase(textCase: \"uppercase\" | \"lowercase\") {\n return Component({\n case: textCase\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param conditional\n */\nexport function Conditional(conditional: {show: boolean; when: string; eq: any}) {\n return Component({\n conditional\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function ShowWhen(property: string, eq: any) {\n return Conditional({\n show: true,\n when: property,\n eq\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function HideWhen(property: string, eq: any) {\n return Conditional({\n show: false,\n when: property,\n eq\n });\n}\n","import {FormioComponent, FormioForm, FormioSubmission} from \"@tsed/formio-types\";\nimport type {Moment} from \"moment\";\nimport type {LoDashStatic} from \"lodash\";\nimport type {Utils} from \"formiojs\";\nimport {Component} from \"./component\";\nimport {isArrowFn} from \"@tsed/core\";\n\nexport interface CustomConditionalCtx<Value = any, Data = any, Row = any> {\n /**\n * The complete submission object.\n */\n form: FormioForm;\n /**\n * The complete submission object.\n */\n submission: FormioSubmission<Data>;\n /**\n * The complete submission data object.\n */\n data: Data;\n /**\n * Contextual \"row\" data, used within DataGrid, EditGrid, and Container components\n */\n row: Row;\n /**\n * The current component JSON\n */\n component: FormioComponent;\n /**\n * The current component instance.\n */\n instance: any;\n /**\n * The current value of the component.\n */\n value: Value;\n /**\n * The moment.js library for date manipulation.\n */\n moment: Moment;\n /**\n * An instance of Lodash.\n */\n _: LoDashStatic;\n /**\n * An instance of the FormioUtils object.\n */\n utils: typeof Utils;\n /**\n * An alias for \"utils\".\n */\n util: typeof Utils;\n}\n\nfunction sanitize(customConditional: Function) {\n const str = customConditional.toString();\n\n const [signature, ...fn] = str.split(\"=>\");\n let content = fn.join(\"=>\");\n\n if (!signature.includes(\"{\")) {\n const reg = `${signature.trim()}\\.`;\n\n content = content.replace(new RegExp(reg, \"gi\"), \"\");\n }\n\n return `show = ${content.trim()}`;\n}\n\n/**\n * Adds custom conditional rule to display or not the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param customConditional\n */\nexport function CustomConditional(customConditional: string | ((ctx: CustomConditionalCtx) => any)) {\n if (isArrowFn(customConditional)) {\n customConditional = sanitize(customConditional);\n }\n\n return Component({\n customConditional\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Open automatically the editgrid when the list is empty.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function OpenWhenEmpty(openWhenEmpty = true): PropertyDecorator {\n return Component({\n openWhenEmpty\n });\n}\n","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 \"../components\";\nimport {FormsContainer} from \"../registries/FormsContainer\";\nimport {paramCase} from \"change-case\";\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"],"names":["FormioMappersContainer","Map","registerFormioMapper","type","mapper","set","getFormioMapper","has","Error","get","execMapper","schema","options","getRef","$ref","getValue","replace","anyToComponent","properties","arrayToComponent","itemSchema","items","enum","component","inline","cleanObject","multiple","undefined","booleanToComponent","input","dateToComponent","base","enableMinDateInput","datePicker","disableWeekends","disableWeekdays","enableMaxDateInput","enableTime","widget","displayInTimezone","locale","useLocaleSettings","allowInput","mode","noCalendar","hourIncrement","minuteIncrement","minDate","maxDate","format","timePicker","showMeridian","time_24hr","getFormioProps","formioProps","Object","entries","reduce","props","key","value","startsWith","defaultToComponent","disabled","readOnly","description","defaultValue","default","enumToComponent","values","map","label","sentenceCase","data","json","JSON","stringify","dataSrc","idPath","valueProperty","template","shortcut","mapToComponent","tableView","valueComponent","additionalProperties","hideLabel","nestedToComponent","display","components","parentKey","numberToComponent","delimiter","inputFormat","mask","requireDecimal","objectToEditGrid","rowDrafts","panelToComponent","collapsible","bindResolvers","forEach","resolver","isFunction","resolvers","push","form","mapValidation","propSchema","required","includes","validate","pattern","minLength","maxLength","min","minimum","max","maximum","propertiesToComponents","tabs","pushed","tabsOptions","title","size","stringToComponent","Component","JsonEntityFn","store","customKey","isCollection","Currency","currency","spellcheck","wrap","opts","result","DataSourceJson","DataSourceUrl","url","Hidden","bool","hidden","InputTags","useDecorators","CollectionOf","String","storeas","Multiple","Password","protected","Select","selectThreshold","TableView","Textarea","autoExpand","Validate","ErrorMessage","message","ErrorLabel","errorLabel","MinWords","MaxWords","FormsContainer","Form","target","name","nameOf","machineName","paramCase","Name","StoreSet","Tabs","camelCase","Placeholder","placeholder","Tooltip","tooltip","Label","CustomClass","customClass","ModalEdit","modalEdit","Mask","inputMask","inputMaskPlaceholderChar","Masks","inputMasks","Prefix","prefix","Suffix","suffix","TextCase","textCase","case","Conditional","conditional","ShowWhen","property","eq","show","when","HideWhen","sanitize","customConditional","str","toString","signature","fn","split","content","join","reg","trim","RegExp","CustomConditional","isArrowFn","OpenWhenEmpty","openWhenEmpty","getFormioSchema","model","isString","entity","JsonEntityStore","from","getJsonSchema","customKeys","getName","definitions","tags","access","submissionAccess","Promise","all"],"mappings":";;;;AAIA,MAAMA,sBAAsB,GAA8B,IAAIC,GAAJ,EAA1D;SAEgBC,qBAAqBC,MAAcC;AACjD,SAAOJ,sBAAsB,CAACK,GAAvB,CAA2BF,IAA3B,EAAiCC,MAAjC,CAAP;AACD;SAEeE,gBAAgBH;AAC9B;AACA,MAAI,CAACH,sBAAsB,CAACO,GAAvB,CAA2BJ,IAA3B,CAAL,EAAuC;AACrC,UAAM,IAAIK,KAAJ,WAAoBL,4BAApB,CAAN;AACD;;AACD,SAAOH,sBAAsB,CAACS,GAAvB,CAA2BN,IAA3B,CAAP;AACD;SAEeO,WAAWP,MAAcQ,QAAaC;AACpD,SAAON,eAAe,CAACH,IAAD,CAAf,CAAsBQ,MAAtB,EAA8BC,OAA9B,CAAP;AACD;;SClBeC,OAAOF,QAAaC;AAClC,MAAID,MAAM,CAACG,IAAX,EAAiB;AACf,WAAOC,aAAQ,CAACH,OAAD,EAAUD,MAAM,CAACG,IAAP,CAAYE,OAAZ,CAAoB,IAApB,EAA0B,EAA1B,EAA8BA,OAA9B,CAAsC,KAAtC,EAA6C,GAA7C,CAAV,CAAf;AACD;;AACD,SAAOL,MAAP;AACD;;SCJeM,eAAeN,QAAaC;AAC1CD,EAAAA,MAAM,GAAGE,MAAM,CAACF,MAAD,EAASC,OAAT,CAAf;;AAEA,UAAQD,MAAM,CAACR,IAAf;AACE,SAAK,QAAL;AACE,UAAI,CAACQ,MAAM,CAACO,UAAR,IAAsB,CAACP,MAAM,CAACG,IAAlC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@ function anyToComponent(schema, options) {
|
|
|
31
31
|
|
|
32
32
|
switch (schema.type) {
|
|
33
33
|
case "object":
|
|
34
|
-
if (schema.
|
|
34
|
+
if (!schema.properties && !schema.$ref) {
|
|
35
35
|
return execMapper("map", schema, options);
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -230,7 +230,7 @@ function mapToComponent(schema, options) {
|
|
|
230
230
|
type: "datamap",
|
|
231
231
|
tableView: false,
|
|
232
232
|
input: true,
|
|
233
|
-
valueComponent: _extends({}, execMapper("any", schema.additionalProperties, options), {
|
|
233
|
+
valueComponent: _extends({}, schema.additionalProperties ? execMapper("any", schema.additionalProperties, options) : {}, {
|
|
234
234
|
hideLabel: true,
|
|
235
235
|
tableView: true
|
|
236
236
|
})
|
|
@@ -969,6 +969,20 @@ function CustomConditional(customConditional) {
|
|
|
969
969
|
});
|
|
970
970
|
}
|
|
971
971
|
|
|
972
|
+
/**
|
|
973
|
+
* Open automatically the editgrid when the list is empty.
|
|
974
|
+
* @decorator
|
|
975
|
+
* @formio
|
|
976
|
+
* @property
|
|
977
|
+
* @schema
|
|
978
|
+
*/
|
|
979
|
+
|
|
980
|
+
function OpenWhenEmpty(openWhenEmpty = true) {
|
|
981
|
+
return Component({
|
|
982
|
+
openWhenEmpty
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
|
|
972
986
|
async function getFormioSchema(model, options = {}) {
|
|
973
987
|
if (!model) {
|
|
974
988
|
return undefined;
|
|
@@ -1007,5 +1021,5 @@ async function getFormioSchema(model, options = {}) {
|
|
|
1007
1021
|
return form;
|
|
1008
1022
|
}
|
|
1009
1023
|
|
|
1010
|
-
export { Component, Conditional, Currency, CustomClass, CustomConditional, DataSourceJson, DataSourceUrl, ErrorLabel, ErrorMessage, Form, Hidden, HideWhen, InputTags, Label, Mask, Masks, MaxWords, MinWords, ModalEdit, Multiple, Password, Placeholder, Prefix, Select, ShowWhen, Suffix, TableView, Tabs, TextCase, Textarea, Tooltip, Validate, anyToComponent, arrayToComponent, defaultToComponent, enumToComponent, execMapper, getFormioMapper, getFormioSchema, mapToComponent, nestedToComponent, numberToComponent, objectToEditGrid, panelToComponent, propertiesToComponents, registerFormioMapper, stringToComponent };
|
|
1024
|
+
export { Component, Conditional, Currency, CustomClass, CustomConditional, DataSourceJson, DataSourceUrl, ErrorLabel, ErrorMessage, Form, Hidden, HideWhen, InputTags, Label, Mask, Masks, MaxWords, MinWords, ModalEdit, Multiple, OpenWhenEmpty, Password, Placeholder, Prefix, Select, ShowWhen, Suffix, TableView, Tabs, TextCase, Textarea, Tooltip, Validate, anyToComponent, arrayToComponent, defaultToComponent, enumToComponent, execMapper, getFormioMapper, getFormioSchema, mapToComponent, nestedToComponent, numberToComponent, objectToEditGrid, panelToComponent, propertiesToComponents, registerFormioMapper, stringToComponent };
|
|
1011
1025
|
//# sourceMappingURL=index.modern.js.map
|
package/lib/index.modern.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.modern.js","sources":["../src/registries/FormioMappersContainer.ts","../src/utils/getRef.ts","../src/components/anyToComponent.ts","../src/components/arrayToComponent.ts","../src/components/booleanToComponent.ts","../src/components/dateToComponent.ts","../src/utils/getFormioProps.ts","../src/components/defaultToComponent.ts","../src/components/enumToComponent.ts","../src/components/mapToComponent.ts","../src/components/nestedToComponent.ts","../src/components/numberToComponent.ts","../src/components/objectToEditGrid.ts","../src/components/panelToComponent.ts","../src/components/propertiesToComponents.ts","../src/components/stringToComponent.ts","../src/decorators/component.ts","../src/decorators/currency.ts","../src/decorators/dataSourceJson.ts","../src/decorators/dataSourceUrl.ts","../src/decorators/hidden.ts","../src/decorators/inputTags.ts","../src/decorators/multiple.ts","../src/decorators/password.ts","../src/decorators/select.ts","../src/decorators/tableView.ts","../src/decorators/textarea.ts","../src/decorators/validate.ts","../src/decorators/errorMessage.ts","../src/decorators/errorLabel.ts","../src/decorators/minWords.ts","../src/decorators/maxWords.ts","../src/registries/FormsContainer.ts","../src/decorators/form.ts","../src/decorators/tabs.ts","../src/decorators/placeholder.ts","../src/decorators/tooltip.ts","../src/decorators/label.ts","../src/decorators/customClass.ts","../src/decorators/modalEdit.ts","../src/decorators/mask.ts","../src/decorators/prefix.ts","../src/decorators/suffix.ts","../src/decorators/textCase.ts","../src/decorators/conditional.ts","../src/decorators/customConditional.ts","../src/utils/getFormioSchema.ts"],"sourcesContent":["export interface FormioMapper {\n (schema: any, options: any): any;\n}\n\nconst FormioMappersContainer: Map<string, FormioMapper> = new Map();\n\nexport function registerFormioMapper(type: string, mapper: FormioMapper) {\n return FormioMappersContainer.set(type, mapper);\n}\n\nexport function getFormioMapper(type: string): FormioMapper {\n // istanbul ignore next\n if (!FormioMappersContainer.has(type)) {\n throw new Error(`Formio ${type} mapper doesn't exists`);\n }\n return FormioMappersContainer.get(type)!;\n}\n\nexport function execMapper(type: string, schema: any, options: any): any {\n return getFormioMapper(type)(schema, options);\n}\n","import {getValue} from \"@tsed/core\";\n\nexport function getRef(schema: any, options: any) {\n if (schema.$ref) {\n return getValue(options, schema.$ref.replace(\"#/\", \"\").replace(/\\//g, \".\"));\n }\n return schema;\n}\n","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.additionalProperties) {\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 // default:\n // return execMapper(\"default\", schema, options);\n }\n}\n\nregisterFormioMapper(\"any\", anyToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getRef} from \"../utils/getRef\";\n\nexport function arrayToComponent(schema: any, options: any) {\n const itemSchema = schema.items.$ref ? getRef(schema.items, options) : schema.items;\n\n const {type} = itemSchema;\n\n switch (type) {\n case \"object\": // editgrid\n return {\n ...execMapper(\"default\", schema, options),\n ...execMapper(\"editgrid\", itemSchema, options)\n };\n case \"string\": // tag or enum?\n if (itemSchema.enum) {\n const component = execMapper(\"enum\", itemSchema, options);\n\n return {\n ...component,\n inline: false,\n type: \"selectboxes\"\n };\n }\n\n const component = execMapper(type, itemSchema, options);\n\n return cleanObject({\n ...component,\n multiple: component.type === \"tags\" ? undefined : true\n });\n default:\n case \"number\":\n return {\n ...execMapper(type, itemSchema, options),\n multiple: true\n };\n }\n}\n\nregisterFormioMapper(\"array\", arrayToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction booleanToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n return cleanObject({\n ...component,\n input: true,\n type: component.type || \"checkbox\"\n });\n}\n\nregisterFormioMapper(\"boolean\", booleanToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction dateToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n const base = {\n ...component,\n enableMinDateInput: false,\n datePicker: {\n disableWeekends: false,\n disableWeekdays: false\n },\n enableMaxDateInput: false,\n enableTime: false,\n type: \"datetime\",\n input: true,\n widget: {\n type: \"calendar\",\n displayInTimezone: \"viewer\",\n locale: \"en\",\n useLocaleSettings: false,\n allowInput: true,\n mode: \"single\",\n noCalendar: false,\n hourIncrement: 1,\n minuteIncrement: 1,\n minDate: null,\n disableWeekends: false,\n disableWeekdays: false,\n maxDate: null\n }\n };\n\n if (schema.format === \"date\") {\n return {\n ...base,\n format: \"yyyy-MM-dd\",\n enableTime: false,\n widget: {\n ...base.widget,\n enableTime: false,\n format: \"yyyy-MM-dd\"\n }\n };\n }\n\n return {\n ...base,\n timePicker: {\n showMeridian: false\n },\n widget: {\n enableTime: true,\n time_24hr: true\n }\n };\n}\n\nregisterFormioMapper(\"date\", dateToComponent);\n","export function getFormioProps(schema: any) {\n const formioProps: any = Object.entries(schema).reduce((props, [key, value]) => {\n if (key.startsWith(\"x-formio-\")) {\n return {\n ...props,\n [key.replace(\"x-formio-\", \"\")]: value\n };\n }\n return props;\n }, {});\n return formioProps;\n}\n","import {cleanObject} from \"@tsed/core\";\nimport {registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getFormioProps} from \"../utils/getFormioProps\";\n\nexport function defaultToComponent(schema: any, options: any): any {\n const formioProps = getFormioProps(schema);\n\n return cleanObject({\n ...formioProps,\n disabled: !!schema.readOnly,\n description: schema.description,\n defaultValue: schema.default\n });\n}\n\nregisterFormioMapper(\"default\", defaultToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {sentenceCase} from \"change-case\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function enumToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n const values = schema.enum.map((value: any) => {\n return {\n label: sentenceCase(value),\n value\n };\n });\n\n if (component.type === \"select\") {\n return cleanObject({\n ...component,\n data: {\n json: JSON.stringify(values)\n },\n dataSrc: \"json\",\n idPath: \"value\",\n valueProperty: \"value\",\n template: \"<span>{{ item.label }}</span>\"\n });\n }\n\n return cleanObject({\n ...component,\n values: schema[\"x-values\"] || values.map((value: any) => ({...value, shortcut: \"\"}))\n });\n}\n\nregisterFormioMapper(\"enum\", enumToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function mapToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n type: \"datamap\",\n tableView: false,\n input: true,\n valueComponent: {\n ...execMapper(\"any\", schema.additionalProperties, options),\n hideLabel: true,\n tableView: true\n }\n };\n}\n\nregisterFormioMapper(\"map\", mapToComponent);\n","import {sentenceCase} from \"change-case\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function nestedToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n label: false,\n tableView: false,\n type: \"form\",\n display: \"form\",\n input: true,\n components: [\n {\n key: \"panel\",\n label: options.parentKey && sentenceCase(options.parentKey),\n ...execMapper(\"panel\", schema, options)\n }\n ]\n };\n}\n\nregisterFormioMapper(\"nested\", nestedToComponent);\n","import {cleanObject, getValue} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function numberToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n return cleanObject({\n ...component,\n input: true,\n delimiter: getValue(component, \"delimiter\", false),\n inputFormat: getValue(component, \"inputFormat\", \"plain\"),\n mask: getValue(component, \"mask\", false),\n requireDecimal: false,\n type: \"number\"\n });\n}\n\nregisterFormioMapper(\"number\", numberToComponent);\nregisterFormioMapper(\"integer\", numberToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function objectToEditGrid(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n rowDrafts: false,\n type: \"editgrid\",\n input: true,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"editgrid\", objectToEditGrid);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function panelToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n collapsible: false,\n input: false,\n tableView: false,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"panel\", panelToComponent);\n","import {cleanObject, isFunction} from \"@tsed/core\";\nimport {sentenceCase} from \"change-case\";\nimport {FormioComponent, FormioForm} from \"@tsed/formio-types\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction bindResolvers(component: FormioComponent, options: any) {\n if (component.data) {\n const data = component.data;\n\n Object.entries(data).forEach(([key, resolver]) => {\n if (isFunction(resolver)) {\n options.resolvers.push(async (form: FormioForm) => {\n data[key] = await resolver({...options, component, form});\n });\n }\n });\n }\n}\n\nfunction mapValidation(key: string, base: FormioComponent, schema: any, propSchema: any) {\n const required = (schema.required || []).includes(key);\n const validate = {\n ...(base.validate || {}),\n required,\n pattern: propSchema.pattern,\n minLength: !required || (required && propSchema.minLength > 1) ? propSchema.minLength : undefined,\n maxLength: propSchema.maxLength,\n min: propSchema.minimum,\n max: propSchema.maximum\n };\n\n switch (propSchema.type) {\n case \"string\":\n if (propSchema.minLength === 0 && validate.required) {\n validate.minLength = undefined;\n validate.required = false;\n }\n break;\n case \"boolean\":\n validate.required = false;\n break;\n }\n\n return cleanObject(validate);\n}\n\nexport function propertiesToComponents(schema: any, options: any): any[] {\n const tabs = {\n label: \"Tabs\",\n key: \"tabs\",\n type: \"tabs\",\n input: false,\n tableView: false,\n components: new Map<string, any>(),\n pushed: false\n };\n\n const components: any[] = [];\n\n Object.entries(schema.properties).forEach(([key, propSchema]: [string, any]) => {\n const tabsOptions = propSchema[\"x-formiotabs\"];\n const base = execMapper(\"any\", propSchema, {parentKey: key, ...options});\n\n const component = cleanObject({\n key,\n ...base,\n label: base.label == false ? undefined : base.label || propSchema.title || sentenceCase(key),\n validate: mapValidation(key, base, schema, propSchema)\n });\n\n bindResolvers(component, options);\n\n if (tabsOptions) {\n if (!tabs.pushed) {\n components.push(tabs);\n tabs.pushed = true;\n }\n\n if (!tabs.components.has(tabsOptions.key)) {\n tabs.components.set(tabsOptions.key, {\n ...tabsOptions,\n components: []\n });\n }\n\n tabs.components.get(tabsOptions.key).components.push(component);\n } else {\n components.push(component);\n }\n });\n\n if (tabs.components.size) {\n tabs.components = [...tabs.components.values()] as any;\n }\n\n return components;\n}\n\nregisterFormioMapper(\"properties\", propertiesToComponents);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function stringToComponent(schema: any, options: any) {\n if (schema.format) {\n const component = execMapper(\"default\", schema, options);\n switch (schema.format) {\n case \"date\":\n case \"date-time\":\n return execMapper(\"date\", schema, options);\n case \"uri\":\n return cleanObject({\n input: true,\n ...component,\n type: component.type || \"url\"\n });\n default:\n return cleanObject({\n input: true,\n ...component,\n type: component.type || schema.format\n });\n }\n }\n\n if (schema.enum) {\n const component = execMapper(\"enum\", schema, options);\n\n return {\n ...component,\n type: component.type || \"radio\"\n };\n }\n\n const component = execMapper(\"default\", schema, options);\n return cleanObject({\n input: true,\n type: component.type || \"textfield\",\n ...component\n });\n}\n\nregisterFormioMapper(\"string\", stringToComponent);\n","import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\n\n/**\n * Declare a formio Component schema on the decorated propertyKey.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Component(component: Record<string, any>): PropertyDecorator {\n component = Object.entries(component).reduce((component: Record<string, any>, [key, value]) => {\n if (key === \"validate\") {\n component[\"x-formio-validate\"] = {\n ...(component[\"x-formio-validate\"] || {}),\n ...value\n };\n }\n\n return {\n ...component,\n [`x-formio-${key}`]: value\n };\n }, {});\n\n return JsonEntityFn((store: JsonEntityStore) => {\n Object.entries(component).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n\n if (store.isCollection) {\n store.schema.customKey(key, value);\n }\n });\n });\n}\n","import {Component} from \"./component\";\n/**\n * Configure the property as Currency component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Currency(props: Record<string, any> = {}): PropertyDecorator {\n return Component({\n currency: \"USD\",\n inputFormat: \"plain\",\n mask: false,\n spellcheck: true,\n delimiter: true,\n ...props,\n type: \"currency\"\n });\n}\n","import {Component} from \"./component\";\nimport {FormioDataResolver, FormioDataResolverCtx} from \"../domain/FormioDataResolver\";\nimport {isFunction} from \"@tsed/core\";\n\nconst wrap = (resolver: FormioDataResolver) => async (opts: FormioDataResolverCtx) => {\n const result = await resolver(opts);\n return JSON.stringify(result);\n};\n\n/**\n * Set custom json data source\n * @param data\n * @param props\n * @constructor\n */\nexport function DataSourceJson(data: any | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"json\",\n data: {\n ...props.data,\n json: isFunction(data) ? wrap(data) : JSON.stringify(data)\n }\n });\n}\n","import {Component} from \"./component\";\nimport {FormioDataResolver} from \"../domain/FormioDataResolver\";\n\n/**\n * Set URL data on the current component.\n * @param url\n * @param props\n * @constructor\n */\nexport function DataSourceUrl(url: string | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"url\",\n data: {\n ...props.data,\n url\n }\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Set hidden field.\n *\n * A hidden field is still a part of the form, but is hidden from view.\n *\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Hidden(bool: boolean = true): PropertyDecorator {\n return Component({\n hidden: bool\n });\n}\n","import {useDecorators} from \"@tsed/core\";\nimport {CollectionOf} from \"@tsed/schema\";\nimport {Component} from \"./component\";\n/**\n * Configure the property as Tags component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function InputTags(props: Record<string, any> = {}): PropertyDecorator {\n return useDecorators(\n CollectionOf(String),\n Component({\n ...props,\n tableView: false,\n storeas: \"array\",\n type: \"tags\"\n })\n );\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the multiple value on the decorated property.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Multiple(multiple = false): PropertyDecorator {\n return Component({\n multiple\n });\n}\n","import {Component} from \"./component\";\n\nexport interface PasswordOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n/**\n * Configure the property as Password component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Password(props: PasswordOpts = {}): PropertyDecorator {\n return Component({\n ...props,\n type: \"password\",\n protected: true\n });\n}\n","import {Component} from \"./component\";\n\nexport interface SelectOpts extends Record<string, any> {\n idPath?: string;\n valueProperty?: string;\n template?: string;\n multiple?: boolean;\n}\n\n/**\n * Configure the property as Select component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Select(props: SelectOpts = {}): PropertyDecorator {\n return Component({\n selectThreshold: 0.3,\n input: true,\n widget: \"choicesjs\",\n ...props,\n type: \"select\"\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the visibility of the current property on a table.\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function TableView(bool: boolean): PropertyDecorator {\n return Component({\n tableView: bool\n });\n}\n","import {Component} from \"./component\";\n\nexport interface TextareaOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n\n/**\n * Configure the property as Textarea component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Textarea(props: TextareaOpts = {}): PropertyDecorator {\n return Component({\n autoExpand: false,\n ...props,\n type: \"textarea\"\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add validation rules.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param key\n * @param value\n */\nexport function Validate(key: string, value: any) {\n return Component({\n validate: {\n [key]: value\n }\n });\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add error message when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param message\n */\nexport function ErrorMessage(message: string) {\n return Validate(\"customMessage\", message);\n}\n","import {Component} from \"./component\";\n\n/**\n * Set the error label when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ErrorLabel(message: string) {\n return Component({\n errorLabel: message\n });\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add the maximum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MinWords(value: number) {\n return Validate(\"minWords\", value);\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add the minimum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MaxWords(value: number) {\n return Validate(\"maxWords\", value);\n}\n","import {Type} from \"@tsed/core\";\n\n// tslint:disable-next-line:variable-name\nexport const FormsContainer: Map<string, Type> = new Map();\n","import {nameOf, StoreSet, useDecorators} from \"@tsed/core\";\nimport {Name} from \"@tsed/schema\";\nimport {FormioForm} from \"@tsed/formio-types\";\nimport {paramCase} from \"change-case\";\nimport {FormsContainer} from \"../registries/FormsContainer\";\n\n/**\n * Expose the model as Formio Form.\n * @param form\n */\nexport function Form(form: Partial<Omit<FormioForm, \"components\" | \"_id\">> = {}): ClassDecorator {\n return useDecorators(\n (target: any) => {\n const name = form.name || nameOf(target);\n const machineName = paramCase(name);\n FormsContainer.set(name, target as any);\n FormsContainer.set(machineName, target as any);\n },\n form.name && Name(form.name),\n form && StoreSet(\"formio:form\", form)\n );\n}\n","import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\nimport {camelCase} from \"change-case\";\n\n/**\n * Group the current property in tabs components.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Tabs(label: string) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.customKey(\"x-formiotabs\", {\n key: camelCase(label),\n label\n });\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * The placeholder text that will appear when this field is empty.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param placeholder\n */\nexport function Placeholder(placeholder: string) {\n return Component({\n placeholder\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Adds a tooltip to the side of this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param tooltip\n */\nexport function Tooltip(tooltip: string) {\n return Component({\n tooltip\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the label field\n * @decorator\n * @formio\n * @property\n * @schema\n * @param label\n */\nexport function Label(label: string) {\n return Component({\n label\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add a custom css class.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function CustomClass(customClass: string) {\n return Component({\n customClass\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Opens up a modal to edit the value of this component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ModalEdit(modalEdit = true) {\n return Component({\n modalEdit\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Mask(inputMask: string, inputMaskPlaceholderChar: string = \"\") {\n return Component({\n inputMask,\n inputMaskPlaceholderChar\n });\n}\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Masks(...inputMasks: {label: string; mask: string}[]) {\n return Component({\n inputMasks\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add prefix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Prefix(prefix: string) {\n return Component({\n prefix\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add suffix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Suffix(suffix: string) {\n return Component({\n suffix\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Force the output of this field to be sanitized in a specific format.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param textCase\n */\nexport function TextCase(textCase: \"uppercase\" | \"lowercase\") {\n return Component({\n case: textCase\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param conditional\n */\nexport function Conditional(conditional: {show: boolean; when: string; eq: any}) {\n return Component({\n conditional\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function ShowWhen(property: string, eq: any) {\n return Conditional({\n show: true,\n when: property,\n eq\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function HideWhen(property: string, eq: any) {\n return Conditional({\n show: false,\n when: property,\n eq\n });\n}\n","import {FormioComponent, FormioForm, FormioSubmission} from \"@tsed/formio-types\";\nimport type {Moment} from \"moment\";\nimport type {LoDashStatic} from \"lodash\";\nimport type {Utils} from \"formiojs\";\nimport {Component} from \"./component\";\nimport {isArrowFn} from \"@tsed/core\";\n\nexport interface CustomConditionalCtx<Value = any, Data = any, Row = any> {\n /**\n * The complete submission object.\n */\n form: FormioForm;\n /**\n * The complete submission object.\n */\n submission: FormioSubmission<Data>;\n /**\n * The complete submission data object.\n */\n data: Data;\n /**\n * Contextual \"row\" data, used within DataGrid, EditGrid, and Container components\n */\n row: Row;\n /**\n * The current component JSON\n */\n component: FormioComponent;\n /**\n * The current component instance.\n */\n instance: any;\n /**\n * The current value of the component.\n */\n value: Value;\n /**\n * The moment.js library for date manipulation.\n */\n moment: Moment;\n /**\n * An instance of Lodash.\n */\n _: LoDashStatic;\n /**\n * An instance of the FormioUtils object.\n */\n utils: typeof Utils;\n /**\n * An alias for \"utils\".\n */\n util: typeof Utils;\n}\n\nfunction sanitize(customConditional: Function) {\n const str = customConditional.toString();\n\n const [signature, ...fn] = str.split(\"=>\");\n let content = fn.join(\"=>\");\n\n if (!signature.includes(\"{\")) {\n const reg = `${signature.trim()}\\.`;\n\n content = content.replace(new RegExp(reg, \"gi\"), \"\");\n }\n\n return `show = ${content.trim()}`;\n}\n\n/**\n * Adds custom conditional rule to display or not the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param customConditional\n */\nexport function CustomConditional(customConditional: string | ((ctx: CustomConditionalCtx) => any)) {\n if (isArrowFn(customConditional)) {\n customConditional = sanitize(customConditional);\n }\n\n return Component({\n customConditional\n });\n}\n","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 \"../components\";\nimport {FormsContainer} from \"../registries/FormsContainer\";\nimport {paramCase} from \"change-case\";\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"],"names":["FormioMappersContainer","Map","registerFormioMapper","type","mapper","set","getFormioMapper","has","Error","get","execMapper","schema","options","getRef","$ref","getValue","replace","anyToComponent","additionalProperties","arrayToComponent","itemSchema","items","enum","component","inline","cleanObject","multiple","undefined","booleanToComponent","input","dateToComponent","base","enableMinDateInput","datePicker","disableWeekends","disableWeekdays","enableMaxDateInput","enableTime","widget","displayInTimezone","locale","useLocaleSettings","allowInput","mode","noCalendar","hourIncrement","minuteIncrement","minDate","maxDate","format","timePicker","showMeridian","time_24hr","getFormioProps","formioProps","Object","entries","reduce","props","key","value","startsWith","defaultToComponent","disabled","readOnly","description","defaultValue","default","enumToComponent","values","map","label","sentenceCase","data","json","JSON","stringify","dataSrc","idPath","valueProperty","template","shortcut","mapToComponent","tableView","valueComponent","hideLabel","nestedToComponent","display","components","parentKey","numberToComponent","delimiter","inputFormat","mask","requireDecimal","objectToEditGrid","rowDrafts","panelToComponent","collapsible","bindResolvers","forEach","resolver","isFunction","resolvers","push","form","mapValidation","propSchema","required","includes","validate","pattern","minLength","maxLength","min","minimum","max","maximum","propertiesToComponents","tabs","pushed","properties","tabsOptions","title","size","stringToComponent","Component","JsonEntityFn","store","customKey","isCollection","Currency","currency","spellcheck","wrap","opts","result","DataSourceJson","DataSourceUrl","url","Hidden","bool","hidden","InputTags","useDecorators","CollectionOf","String","storeas","Multiple","Password","protected","Select","selectThreshold","TableView","Textarea","autoExpand","Validate","ErrorMessage","message","ErrorLabel","errorLabel","MinWords","MaxWords","FormsContainer","Form","target","name","nameOf","machineName","paramCase","Name","StoreSet","Tabs","camelCase","Placeholder","placeholder","Tooltip","tooltip","Label","CustomClass","customClass","ModalEdit","modalEdit","Mask","inputMask","inputMaskPlaceholderChar","Masks","inputMasks","Prefix","prefix","Suffix","suffix","TextCase","textCase","case","Conditional","conditional","ShowWhen","property","eq","show","when","HideWhen","sanitize","customConditional","str","toString","signature","fn","split","content","join","reg","trim","RegExp","CustomConditional","isArrowFn","getFormioSchema","model","isString","entity","JsonEntityStore","from","getJsonSchema","customKeys","getName","definitions","tags","access","submissionAccess","Promise","all"],"mappings":";;;;AAIA,MAAMA,sBAAsB,GAA8B,IAAIC,GAAJ,EAA1D;SAEgBC,qBAAqBC,MAAcC;AACjD,SAAOJ,sBAAsB,CAACK,GAAvB,CAA2BF,IAA3B,EAAiCC,MAAjC,CAAP;AACD;SAEeE,gBAAgBH;AAC9B;AACA,MAAI,CAACH,sBAAsB,CAACO,GAAvB,CAA2BJ,IAA3B,CAAL,EAAuC;AACrC,UAAM,IAAIK,KAAJ,WAAoBL,4BAApB,CAAN;AACD;;AACD,SAAOH,sBAAsB,CAACS,GAAvB,CAA2BN,IAA3B,CAAP;AACD;SAEeO,WAAWP,MAAcQ,QAAaC;AACpD,SAAON,eAAe,CAACH,IAAD,CAAf,CAAsBQ,MAAtB,EAA8BC,OAA9B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AAR,CAAYhI,SAAS,CAACjC,GAAV,CAAe+B,QAAD,IAAmBA,QAAQ,CAACI,IAAD,EAAO7F,OAAP,CAAzC,CAAZ,CAAN;AAEA,SAAQ6F,IAAR;AACD;;;;"}
|
|
1
|
+
{"version":3,"file":"index.modern.js","sources":["../src/registries/FormioMappersContainer.ts","../src/utils/getRef.ts","../src/components/anyToComponent.ts","../src/components/arrayToComponent.ts","../src/components/booleanToComponent.ts","../src/components/dateToComponent.ts","../src/utils/getFormioProps.ts","../src/components/defaultToComponent.ts","../src/components/enumToComponent.ts","../src/components/mapToComponent.ts","../src/components/nestedToComponent.ts","../src/components/numberToComponent.ts","../src/components/objectToEditGrid.ts","../src/components/panelToComponent.ts","../src/components/propertiesToComponents.ts","../src/components/stringToComponent.ts","../src/decorators/component.ts","../src/decorators/currency.ts","../src/decorators/dataSourceJson.ts","../src/decorators/dataSourceUrl.ts","../src/decorators/hidden.ts","../src/decorators/inputTags.ts","../src/decorators/multiple.ts","../src/decorators/password.ts","../src/decorators/select.ts","../src/decorators/tableView.ts","../src/decorators/textarea.ts","../src/decorators/validate.ts","../src/decorators/errorMessage.ts","../src/decorators/errorLabel.ts","../src/decorators/minWords.ts","../src/decorators/maxWords.ts","../src/registries/FormsContainer.ts","../src/decorators/form.ts","../src/decorators/tabs.ts","../src/decorators/placeholder.ts","../src/decorators/tooltip.ts","../src/decorators/label.ts","../src/decorators/customClass.ts","../src/decorators/modalEdit.ts","../src/decorators/mask.ts","../src/decorators/prefix.ts","../src/decorators/suffix.ts","../src/decorators/textCase.ts","../src/decorators/conditional.ts","../src/decorators/customConditional.ts","../src/decorators/openWhenEmpty.ts","../src/utils/getFormioSchema.ts"],"sourcesContent":["export interface FormioMapper {\n (schema: any, options: any): any;\n}\n\nconst FormioMappersContainer: Map<string, FormioMapper> = new Map();\n\nexport function registerFormioMapper(type: string, mapper: FormioMapper) {\n return FormioMappersContainer.set(type, mapper);\n}\n\nexport function getFormioMapper(type: string): FormioMapper {\n // istanbul ignore next\n if (!FormioMappersContainer.has(type)) {\n throw new Error(`Formio ${type} mapper doesn't exists`);\n }\n return FormioMappersContainer.get(type)!;\n}\n\nexport function execMapper(type: string, schema: any, options: any): any {\n return getFormioMapper(type)(schema, options);\n}\n","import {getValue} from \"@tsed/core\";\n\nexport function getRef(schema: any, options: any) {\n if (schema.$ref) {\n return getValue(options, schema.$ref.replace(\"#/\", \"\").replace(/\\//g, \".\"));\n }\n return schema;\n}\n","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 // default:\n // return execMapper(\"default\", schema, options);\n }\n}\n\nregisterFormioMapper(\"any\", anyToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getRef} from \"../utils/getRef\";\n\nexport function arrayToComponent(schema: any, options: any) {\n const itemSchema = schema.items.$ref ? getRef(schema.items, options) : schema.items;\n\n const {type} = itemSchema;\n\n switch (type) {\n case \"object\": // editgrid\n return {\n ...execMapper(\"default\", schema, options),\n ...execMapper(\"editgrid\", itemSchema, options)\n };\n case \"string\": // tag or enum?\n if (itemSchema.enum) {\n const component = execMapper(\"enum\", itemSchema, options);\n\n return {\n ...component,\n inline: false,\n type: \"selectboxes\"\n };\n }\n\n const component = execMapper(type, itemSchema, options);\n\n return cleanObject({\n ...component,\n multiple: component.type === \"tags\" ? undefined : true\n });\n default:\n case \"number\":\n return {\n ...execMapper(type, itemSchema, options),\n multiple: true\n };\n }\n}\n\nregisterFormioMapper(\"array\", arrayToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction booleanToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n return cleanObject({\n ...component,\n input: true,\n type: component.type || \"checkbox\"\n });\n}\n\nregisterFormioMapper(\"boolean\", booleanToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction dateToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n const base = {\n ...component,\n enableMinDateInput: false,\n datePicker: {\n disableWeekends: false,\n disableWeekdays: false\n },\n enableMaxDateInput: false,\n enableTime: false,\n type: \"datetime\",\n input: true,\n widget: {\n type: \"calendar\",\n displayInTimezone: \"viewer\",\n locale: \"en\",\n useLocaleSettings: false,\n allowInput: true,\n mode: \"single\",\n noCalendar: false,\n hourIncrement: 1,\n minuteIncrement: 1,\n minDate: null,\n disableWeekends: false,\n disableWeekdays: false,\n maxDate: null\n }\n };\n\n if (schema.format === \"date\") {\n return {\n ...base,\n format: \"yyyy-MM-dd\",\n enableTime: false,\n widget: {\n ...base.widget,\n enableTime: false,\n format: \"yyyy-MM-dd\"\n }\n };\n }\n\n return {\n ...base,\n timePicker: {\n showMeridian: false\n },\n widget: {\n enableTime: true,\n time_24hr: true\n }\n };\n}\n\nregisterFormioMapper(\"date\", dateToComponent);\n","export function getFormioProps(schema: any) {\n const formioProps: any = Object.entries(schema).reduce((props, [key, value]) => {\n if (key.startsWith(\"x-formio-\")) {\n return {\n ...props,\n [key.replace(\"x-formio-\", \"\")]: value\n };\n }\n return props;\n }, {});\n return formioProps;\n}\n","import {cleanObject} from \"@tsed/core\";\nimport {registerFormioMapper} from \"../registries/FormioMappersContainer\";\nimport {getFormioProps} from \"../utils/getFormioProps\";\n\nexport function defaultToComponent(schema: any, options: any): any {\n const formioProps = getFormioProps(schema);\n\n return cleanObject({\n ...formioProps,\n disabled: !!schema.readOnly,\n description: schema.description,\n defaultValue: schema.default\n });\n}\n\nregisterFormioMapper(\"default\", defaultToComponent);\n","import {cleanObject} from \"@tsed/core\";\nimport {sentenceCase} from \"change-case\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function enumToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n const values = schema.enum.map((value: any) => {\n return {\n label: sentenceCase(value),\n value\n };\n });\n\n if (component.type === \"select\") {\n return cleanObject({\n ...component,\n data: {\n json: JSON.stringify(values)\n },\n dataSrc: \"json\",\n idPath: \"value\",\n valueProperty: \"value\",\n template: \"<span>{{ item.label }}</span>\"\n });\n }\n\n return cleanObject({\n ...component,\n values: schema[\"x-values\"] || values.map((value: any) => ({...value, shortcut: \"\"}))\n });\n}\n\nregisterFormioMapper(\"enum\", enumToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function mapToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n type: \"datamap\",\n tableView: false,\n input: true,\n valueComponent: {\n ...(schema.additionalProperties ? execMapper(\"any\", schema.additionalProperties, options) : {}),\n hideLabel: true,\n tableView: true\n }\n };\n}\n\nregisterFormioMapper(\"map\", mapToComponent);\n","import {sentenceCase} from \"change-case\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function nestedToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n label: false,\n tableView: false,\n type: \"form\",\n display: \"form\",\n input: true,\n components: [\n {\n key: \"panel\",\n label: options.parentKey && sentenceCase(options.parentKey),\n ...execMapper(\"panel\", schema, options)\n }\n ]\n };\n}\n\nregisterFormioMapper(\"nested\", nestedToComponent);\n","import {cleanObject, getValue} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function numberToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n return cleanObject({\n ...component,\n input: true,\n delimiter: getValue(component, \"delimiter\", false),\n inputFormat: getValue(component, \"inputFormat\", \"plain\"),\n mask: getValue(component, \"mask\", false),\n requireDecimal: false,\n type: \"number\"\n });\n}\n\nregisterFormioMapper(\"number\", numberToComponent);\nregisterFormioMapper(\"integer\", numberToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function objectToEditGrid(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n rowDrafts: false,\n type: \"editgrid\",\n input: true,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"editgrid\", objectToEditGrid);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function panelToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n collapsible: false,\n input: false,\n tableView: false,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"panel\", panelToComponent);\n","import {cleanObject, isFunction} from \"@tsed/core\";\nimport {sentenceCase} from \"change-case\";\nimport {FormioComponent, FormioForm} from \"@tsed/formio-types\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nfunction bindResolvers(component: FormioComponent, options: any) {\n if (component.data) {\n const data = component.data;\n\n Object.entries(data).forEach(([key, resolver]) => {\n if (isFunction(resolver)) {\n options.resolvers.push(async (form: FormioForm) => {\n data[key] = await resolver({...options, component, form});\n });\n }\n });\n }\n}\n\nfunction mapValidation(key: string, base: FormioComponent, schema: any, propSchema: any) {\n const required = (schema.required || []).includes(key);\n const validate = {\n ...(base.validate || {}),\n required,\n pattern: propSchema.pattern,\n minLength: !required || (required && propSchema.minLength > 1) ? propSchema.minLength : undefined,\n maxLength: propSchema.maxLength,\n min: propSchema.minimum,\n max: propSchema.maximum\n };\n\n switch (propSchema.type) {\n case \"string\":\n if (propSchema.minLength === 0 && validate.required) {\n validate.minLength = undefined;\n validate.required = false;\n }\n break;\n case \"boolean\":\n validate.required = false;\n break;\n }\n\n return cleanObject(validate);\n}\n\nexport function propertiesToComponents(schema: any, options: any): any[] {\n const tabs = {\n label: \"Tabs\",\n key: \"tabs\",\n type: \"tabs\",\n input: false,\n tableView: false,\n components: new Map<string, any>(),\n pushed: false\n };\n const components: any[] = [];\n\n Object.entries(schema.properties).forEach(([key, propSchema]: [string, any]) => {\n const tabsOptions = propSchema[\"x-formiotabs\"];\n const base = execMapper(\"any\", propSchema, {parentKey: key, ...options});\n\n const component = cleanObject({\n key,\n ...base,\n label: base.label == false ? undefined : base.label || propSchema.title || sentenceCase(key),\n validate: mapValidation(key, base, schema, propSchema)\n });\n\n bindResolvers(component, options);\n\n if (tabsOptions) {\n if (!tabs.pushed) {\n components.push(tabs);\n tabs.pushed = true;\n }\n\n if (!tabs.components.has(tabsOptions.key)) {\n tabs.components.set(tabsOptions.key, {\n ...tabsOptions,\n components: []\n });\n }\n\n tabs.components.get(tabsOptions.key).components.push(component);\n } else {\n components.push(component);\n }\n });\n\n if (tabs.components.size) {\n tabs.components = [...tabs.components.values()] as any;\n }\n\n return components;\n}\n\nregisterFormioMapper(\"properties\", propertiesToComponents);\n","import {cleanObject} from \"@tsed/core\";\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer\";\n\nexport function stringToComponent(schema: any, options: any) {\n if (schema.format) {\n const component = execMapper(\"default\", schema, options);\n switch (schema.format) {\n case \"date\":\n case \"date-time\":\n return execMapper(\"date\", schema, options);\n case \"uri\":\n return cleanObject({\n input: true,\n ...component,\n type: component.type || \"url\"\n });\n default:\n return cleanObject({\n input: true,\n ...component,\n type: component.type || schema.format\n });\n }\n }\n\n if (schema.enum) {\n const component = execMapper(\"enum\", schema, options);\n\n return {\n ...component,\n type: component.type || \"radio\"\n };\n }\n\n const component = execMapper(\"default\", schema, options);\n return cleanObject({\n input: true,\n type: component.type || \"textfield\",\n ...component\n });\n}\n\nregisterFormioMapper(\"string\", stringToComponent);\n","import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\n\n/**\n * Declare a formio Component schema on the decorated propertyKey.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Component(component: Record<string, any>): PropertyDecorator {\n component = Object.entries(component).reduce((component: Record<string, any>, [key, value]) => {\n if (key === \"validate\") {\n component[\"x-formio-validate\"] = {\n ...(component[\"x-formio-validate\"] || {}),\n ...value\n };\n }\n\n return {\n ...component,\n [`x-formio-${key}`]: value\n };\n }, {});\n\n return JsonEntityFn((store: JsonEntityStore) => {\n Object.entries(component).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n\n if (store.isCollection) {\n store.schema.customKey(key, value);\n }\n });\n });\n}\n","import {Component} from \"./component\";\n/**\n * Configure the property as Currency component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Currency(props: Record<string, any> = {}): PropertyDecorator {\n return Component({\n currency: \"USD\",\n inputFormat: \"plain\",\n mask: false,\n spellcheck: true,\n delimiter: true,\n ...props,\n type: \"currency\"\n });\n}\n","import {Component} from \"./component\";\nimport {FormioDataResolver, FormioDataResolverCtx} from \"../domain/FormioDataResolver\";\nimport {isFunction} from \"@tsed/core\";\n\nconst wrap = (resolver: FormioDataResolver) => async (opts: FormioDataResolverCtx) => {\n const result = await resolver(opts);\n return JSON.stringify(result);\n};\n\n/**\n * Set custom json data source\n * @param data\n * @param props\n * @constructor\n */\nexport function DataSourceJson(data: any | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"json\",\n data: {\n ...props.data,\n json: isFunction(data) ? wrap(data) : JSON.stringify(data)\n }\n });\n}\n","import {Component} from \"./component\";\nimport {FormioDataResolver} from \"../domain/FormioDataResolver\";\n\n/**\n * Set URL data on the current component.\n * @param url\n * @param props\n * @constructor\n */\nexport function DataSourceUrl(url: string | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"url\",\n data: {\n ...props.data,\n url\n }\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Set hidden field.\n *\n * A hidden field is still a part of the form, but is hidden from view.\n *\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Hidden(bool: boolean = true): PropertyDecorator {\n return Component({\n hidden: bool\n });\n}\n","import {useDecorators} from \"@tsed/core\";\nimport {CollectionOf} from \"@tsed/schema\";\nimport {Component} from \"./component\";\n/**\n * Configure the property as Tags component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function InputTags(props: Record<string, any> = {}): PropertyDecorator {\n return useDecorators(\n CollectionOf(String),\n Component({\n ...props,\n tableView: false,\n storeas: \"array\",\n type: \"tags\"\n })\n );\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the multiple value on the decorated property.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Multiple(multiple = false): PropertyDecorator {\n return Component({\n multiple\n });\n}\n","import {Component} from \"./component\";\n\nexport interface PasswordOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n/**\n * Configure the property as Password component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Password(props: PasswordOpts = {}): PropertyDecorator {\n return Component({\n ...props,\n type: \"password\",\n protected: true\n });\n}\n","import {Component} from \"./component\";\n\nexport interface SelectOpts extends Record<string, any> {\n idPath?: string;\n valueProperty?: string;\n template?: string;\n multiple?: boolean;\n}\n\n/**\n * Configure the property as Select component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Select(props: SelectOpts = {}): PropertyDecorator {\n return Component({\n selectThreshold: 0.3,\n input: true,\n widget: \"choicesjs\",\n ...props,\n type: \"select\"\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the visibility of the current property on a table.\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function TableView(bool: boolean): PropertyDecorator {\n return Component({\n tableView: bool\n });\n}\n","import {Component} from \"./component\";\n\nexport interface TextareaOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n\n/**\n * Configure the property as Textarea component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Textarea(props: TextareaOpts = {}): PropertyDecorator {\n return Component({\n autoExpand: false,\n ...props,\n type: \"textarea\"\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add validation rules.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param key\n * @param value\n */\nexport function Validate(key: string, value: any) {\n return Component({\n validate: {\n [key]: value\n }\n });\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add error message when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param message\n */\nexport function ErrorMessage(message: string) {\n return Validate(\"customMessage\", message);\n}\n","import {Component} from \"./component\";\n\n/**\n * Set the error label when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ErrorLabel(message: string) {\n return Component({\n errorLabel: message\n });\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add the maximum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MinWords(value: number) {\n return Validate(\"minWords\", value);\n}\n","import {Validate} from \"./validate\";\n\n/**\n * Add the minimum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MaxWords(value: number) {\n return Validate(\"maxWords\", value);\n}\n","import {Type} from \"@tsed/core\";\n\n// tslint:disable-next-line:variable-name\nexport const FormsContainer: Map<string, Type> = new Map();\n","import {nameOf, StoreSet, useDecorators} from \"@tsed/core\";\nimport {Name} from \"@tsed/schema\";\nimport {FormioForm} from \"@tsed/formio-types\";\nimport {paramCase} from \"change-case\";\nimport {FormsContainer} from \"../registries/FormsContainer\";\n\n/**\n * Expose the model as Formio Form.\n * @param form\n */\nexport function Form(form: Partial<Omit<FormioForm, \"components\" | \"_id\">> = {}): ClassDecorator {\n return useDecorators(\n (target: any) => {\n const name = form.name || nameOf(target);\n const machineName = paramCase(name);\n FormsContainer.set(name, target as any);\n FormsContainer.set(machineName, target as any);\n },\n form.name && Name(form.name),\n form && StoreSet(\"formio:form\", form)\n );\n}\n","import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\nimport {camelCase} from \"change-case\";\n\n/**\n * Group the current property in tabs components.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Tabs(label: string) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.customKey(\"x-formiotabs\", {\n key: camelCase(label),\n label\n });\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * The placeholder text that will appear when this field is empty.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param placeholder\n */\nexport function Placeholder(placeholder: string) {\n return Component({\n placeholder\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Adds a tooltip to the side of this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param tooltip\n */\nexport function Tooltip(tooltip: string) {\n return Component({\n tooltip\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Change the label field\n * @decorator\n * @formio\n * @property\n * @schema\n * @param label\n */\nexport function Label(label: string) {\n return Component({\n label\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add a custom css class.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function CustomClass(customClass: string) {\n return Component({\n customClass\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Opens up a modal to edit the value of this component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ModalEdit(modalEdit = true) {\n return Component({\n modalEdit\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Mask(inputMask: string, inputMaskPlaceholderChar: string = \"\") {\n return Component({\n inputMask,\n inputMaskPlaceholderChar\n });\n}\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Masks(...inputMasks: {label: string; mask: string}[]) {\n return Component({\n inputMasks\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add prefix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Prefix(prefix: string) {\n return Component({\n prefix\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Add suffix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Suffix(suffix: string) {\n return Component({\n suffix\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Force the output of this field to be sanitized in a specific format.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param textCase\n */\nexport function TextCase(textCase: \"uppercase\" | \"lowercase\") {\n return Component({\n case: textCase\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param conditional\n */\nexport function Conditional(conditional: {show: boolean; when: string; eq: any}) {\n return Component({\n conditional\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function ShowWhen(property: string, eq: any) {\n return Conditional({\n show: true,\n when: property,\n eq\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function HideWhen(property: string, eq: any) {\n return Conditional({\n show: false,\n when: property,\n eq\n });\n}\n","import {FormioComponent, FormioForm, FormioSubmission} from \"@tsed/formio-types\";\nimport type {Moment} from \"moment\";\nimport type {LoDashStatic} from \"lodash\";\nimport type {Utils} from \"formiojs\";\nimport {Component} from \"./component\";\nimport {isArrowFn} from \"@tsed/core\";\n\nexport interface CustomConditionalCtx<Value = any, Data = any, Row = any> {\n /**\n * The complete submission object.\n */\n form: FormioForm;\n /**\n * The complete submission object.\n */\n submission: FormioSubmission<Data>;\n /**\n * The complete submission data object.\n */\n data: Data;\n /**\n * Contextual \"row\" data, used within DataGrid, EditGrid, and Container components\n */\n row: Row;\n /**\n * The current component JSON\n */\n component: FormioComponent;\n /**\n * The current component instance.\n */\n instance: any;\n /**\n * The current value of the component.\n */\n value: Value;\n /**\n * The moment.js library for date manipulation.\n */\n moment: Moment;\n /**\n * An instance of Lodash.\n */\n _: LoDashStatic;\n /**\n * An instance of the FormioUtils object.\n */\n utils: typeof Utils;\n /**\n * An alias for \"utils\".\n */\n util: typeof Utils;\n}\n\nfunction sanitize(customConditional: Function) {\n const str = customConditional.toString();\n\n const [signature, ...fn] = str.split(\"=>\");\n let content = fn.join(\"=>\");\n\n if (!signature.includes(\"{\")) {\n const reg = `${signature.trim()}\\.`;\n\n content = content.replace(new RegExp(reg, \"gi\"), \"\");\n }\n\n return `show = ${content.trim()}`;\n}\n\n/**\n * Adds custom conditional rule to display or not the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param customConditional\n */\nexport function CustomConditional(customConditional: string | ((ctx: CustomConditionalCtx) => any)) {\n if (isArrowFn(customConditional)) {\n customConditional = sanitize(customConditional);\n }\n\n return Component({\n customConditional\n });\n}\n","import {Component} from \"./component\";\n\n/**\n * Open automatically the editgrid when the list is empty.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function OpenWhenEmpty(openWhenEmpty = true): PropertyDecorator {\n return Component({\n openWhenEmpty\n });\n}\n","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 \"../components\";\nimport {FormsContainer} from \"../registries/FormsContainer\";\nimport {paramCase} from \"change-case\";\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"],"names":["FormioMappersContainer","Map","registerFormioMapper","type","mapper","set","getFormioMapper","has","Error","get","execMapper","schema","options","getRef","$ref","getValue","replace","anyToComponent","properties","arrayToComponent","itemSchema","items","enum","component","inline","cleanObject","multiple","undefined","booleanToComponent","input","dateToComponent","base","enableMinDateInput","datePicker","disableWeekends","disableWeekdays","enableMaxDateInput","enableTime","widget","displayInTimezone","locale","useLocaleSettings","allowInput","mode","noCalendar","hourIncrement","minuteIncrement","minDate","maxDate","format","timePicker","showMeridian","time_24hr","getFormioProps","formioProps","Object","entries","reduce","props","key","value","startsWith","defaultToComponent","disabled","readOnly","description","defaultValue","default","enumToComponent","values","map","label","sentenceCase","data","json","JSON","stringify","dataSrc","idPath","valueProperty","template","shortcut","mapToComponent","tableView","valueComponent","additionalProperties","hideLabel","nestedToComponent","display","components","parentKey","numberToComponent","delimiter","inputFormat","mask","requireDecimal","objectToEditGrid","rowDrafts","panelToComponent","collapsible","bindResolvers","forEach","resolver","isFunction","resolvers","push","form","mapValidation","propSchema","required","includes","validate","pattern","minLength","maxLength","min","minimum","max","maximum","propertiesToComponents","tabs","pushed","tabsOptions","title","size","stringToComponent","Component","JsonEntityFn","store","customKey","isCollection","Currency","currency","spellcheck","wrap","opts","result","DataSourceJson","DataSourceUrl","url","Hidden","bool","hidden","InputTags","useDecorators","CollectionOf","String","storeas","Multiple","Password","protected","Select","selectThreshold","TableView","Textarea","autoExpand","Validate","ErrorMessage","message","ErrorLabel","errorLabel","MinWords","MaxWords","FormsContainer","Form","target","name","nameOf","machineName","paramCase","Name","StoreSet","Tabs","camelCase","Placeholder","placeholder","Tooltip","tooltip","Label","CustomClass","customClass","ModalEdit","modalEdit","Mask","inputMask","inputMaskPlaceholderChar","Masks","inputMasks","Prefix","prefix","Suffix","suffix","TextCase","textCase","case","Conditional","conditional","ShowWhen","property","eq","show","when","HideWhen","sanitize","customConditional","str","toString","signature","fn","split","content","join","reg","trim","RegExp","CustomConditional","isArrowFn","OpenWhenEmpty","openWhenEmpty","getFormioSchema","model","isString","entity","JsonEntityStore","from","getJsonSchema","customKeys","getName","definitions","tags","access","submissionAccess","Promise","all"],"mappings":";;;;AAIA,MAAMA,sBAAsB,GAA8B,IAAIC,GAAJ,EAA1D;SAEgBC,qBAAqBC,MAAcC;AACjD,SAAOJ,sBAAsB,CAACK,GAAvB,CAA2BF,IAA3B,EAAiCC,MAAjC,CAAP;AACD;SAEeE,gBAAgBH;AAC9B;AACA,MAAI,CAACH,sBAAsB,CAACO,GAAvB,CAA2BJ,IAA3B,CAAL,EAAuC;AACrC,UAAM,IAAIK,KAAJ,WAAoBL,4BAApB,CAAN;AACD;;AACD,SAAOH,sBAAsB,CAACS,GAAvB,CAA2BN,IAA3B,CAAP;AACD;SAEeO,WAAWP,MAAcQ,QAAaC;AACpD,SAAON,eAAe,CAACH,IAAD,CAAf,CAAsBQ,MAAtB,EAA8BC,OAA9B,CAAP;AACD;;SClBeC,OAAOF,QAAaC;AAClC,MAAID,MAAM,CAACG,IAAX,EAAiB;AACf,WAAOC,QAAQ,CAACH,OAAD,EAAUD,MAAM,CAACG,IAAP,CAAYE,OAAZ,CAAoB,IAApB,EAA0B,EAA1B,EAA8BA,OAA9B,CAAsC,KAAtC,EAA6C,GAA7C,CAAV,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AV,CAAegC,QAAD,IAAmBA,QAAQ,CAACI,IAAD,EAAO9F,OAAP,CAAzC,CAAZ,CAAN;AAEA,SAAQ8F,IAAR;AACD;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/schema-formio",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.86.1",
|
|
4
4
|
"description": "Transform Ts.ED Schema & JsonSchema to a valid Formio schema",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"test": "cross-env NODE_ENV=test jest"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tsed/formio-types": "6.
|
|
30
|
+
"@tsed/formio-types": "6.86.1",
|
|
31
31
|
"change-case": "4.1.2",
|
|
32
32
|
"tslib": "2.2.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@tsed/core": "6.
|
|
36
|
-
"@tsed/openspec": "6.
|
|
37
|
-
"@tsed/schema": "6.
|
|
35
|
+
"@tsed/core": "6.86.1",
|
|
36
|
+
"@tsed/openspec": "6.86.1",
|
|
37
|
+
"@tsed/schema": "6.86.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@tsed/core": "^6.
|
|
41
|
-
"@tsed/openspec": "^6.
|
|
42
|
-
"@tsed/schema": "^6.
|
|
40
|
+
"@tsed/core": "^6.86.1",
|
|
41
|
+
"@tsed/openspec": "^6.86.1",
|
|
42
|
+
"@tsed/schema": "^6.86.1",
|
|
43
43
|
"formiojs": ">=4.0.0",
|
|
44
44
|
"lodash": ">=4.0.0",
|
|
45
45
|
"moment": ">=2.0.0"
|