@tsed/schema-formio 6.87.2 → 6.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{components → cjs/components}/anyToComponent.d.ts +0 -0
- package/lib/cjs/components/anyToComponent.js +29 -0
- package/lib/cjs/components/anyToComponent.js.map +1 -0
- package/lib/{components → cjs/components}/arrayToComponent.d.ts +0 -0
- package/lib/cjs/components/arrayToComponent.js +40 -0
- package/lib/cjs/components/arrayToComponent.js.map +1 -0
- package/lib/{components → cjs/components}/booleanToComponent.d.ts +0 -0
- package/lib/cjs/components/booleanToComponent.js +14 -0
- package/lib/cjs/components/booleanToComponent.js.map +1 -0
- package/lib/{components → cjs/components}/dateToComponent.d.ts +0 -0
- package/lib/cjs/components/dateToComponent.js +57 -0
- package/lib/cjs/components/dateToComponent.js.map +1 -0
- package/lib/{components → cjs/components}/defaultToComponent.d.ts +0 -0
- package/lib/cjs/components/defaultToComponent.js +18 -0
- package/lib/cjs/components/defaultToComponent.js.map +1 -0
- package/lib/{components → cjs/components}/enumToComponent.d.ts +0 -0
- package/lib/cjs/components/enumToComponent.js +34 -0
- package/lib/cjs/components/enumToComponent.js.map +1 -0
- package/lib/{components → cjs/components}/index.d.ts +0 -0
- package/lib/cjs/components/index.js +17 -0
- package/lib/cjs/components/index.js.map +1 -0
- package/lib/{components → cjs/components}/mapToComponent.d.ts +0 -0
- package/lib/cjs/components/mapToComponent.js +20 -0
- package/lib/cjs/components/mapToComponent.js.map +1 -0
- package/lib/{components → cjs/components}/nestedToComponent.d.ts +0 -0
- package/lib/cjs/components/nestedToComponent.js +25 -0
- package/lib/cjs/components/nestedToComponent.js.map +1 -0
- package/lib/{components → cjs/components}/numberToComponent.d.ts +0 -0
- package/lib/cjs/components/numberToComponent.js +21 -0
- package/lib/cjs/components/numberToComponent.js.map +1 -0
- package/lib/{components → cjs/components}/objectToEditGrid.d.ts +0 -0
- package/lib/cjs/components/objectToEditGrid.js +16 -0
- package/lib/cjs/components/objectToEditGrid.js.map +1 -0
- package/lib/{components → cjs/components}/panelToComponent.d.ts +0 -0
- package/lib/cjs/components/panelToComponent.js +16 -0
- package/lib/cjs/components/panelToComponent.js.map +1 -0
- package/lib/{components → cjs/components}/propertiesToComponents.d.ts +0 -0
- package/lib/cjs/components/propertiesToComponents.js +88 -0
- package/lib/cjs/components/propertiesToComponents.js.map +1 -0
- package/lib/{components → cjs/components}/stringToComponent.d.ts +0 -0
- package/lib/cjs/components/stringToComponent.js +43 -0
- package/lib/cjs/components/stringToComponent.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/component.d.ts +0 -0
- package/lib/cjs/decorators/component.js +35 -0
- package/lib/cjs/decorators/component.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/conditional.d.ts +0 -0
- package/lib/cjs/decorators/conditional.js +53 -0
- package/lib/cjs/decorators/conditional.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/currency.d.ts +0 -0
- package/lib/cjs/decorators/currency.js +24 -0
- package/lib/cjs/decorators/currency.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/customClass.d.ts +0 -0
- package/lib/cjs/decorators/customClass.js +18 -0
- package/lib/cjs/decorators/customClass.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/customConditional.d.ts +0 -0
- package/lib/cjs/decorators/customConditional.js +33 -0
- package/lib/cjs/decorators/customConditional.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/dataSourceJson.d.ts +0 -0
- package/lib/cjs/decorators/dataSourceJson.js +27 -0
- package/lib/cjs/decorators/dataSourceJson.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/dataSourceUrl.d.ts +0 -0
- package/lib/cjs/decorators/dataSourceUrl.js +22 -0
- package/lib/cjs/decorators/dataSourceUrl.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/errorLabel.d.ts +0 -0
- package/lib/cjs/decorators/errorLabel.js +18 -0
- package/lib/cjs/decorators/errorLabel.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/errorMessage.d.ts +0 -0
- package/lib/cjs/decorators/errorMessage.js +17 -0
- package/lib/cjs/decorators/errorMessage.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/form.d.ts +0 -0
- package/lib/cjs/decorators/form.js +21 -0
- package/lib/cjs/decorators/form.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/hidden.d.ts +0 -0
- package/lib/cjs/decorators/hidden.js +22 -0
- package/lib/cjs/decorators/hidden.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/index.d.ts +0 -0
- package/lib/cjs/decorators/index.js +34 -0
- package/lib/cjs/decorators/index.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/inputTags.d.ts +0 -0
- package/lib/cjs/decorators/inputTags.js +23 -0
- package/lib/cjs/decorators/inputTags.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/label.d.ts +0 -0
- package/lib/cjs/decorators/label.js +19 -0
- package/lib/cjs/decorators/label.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/mask.d.ts +0 -0
- package/lib/cjs/decorators/mask.js +50 -0
- package/lib/cjs/decorators/mask.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/maxWords.d.ts +0 -0
- package/lib/cjs/decorators/maxWords.js +17 -0
- package/lib/cjs/decorators/maxWords.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/minWords.d.ts +0 -0
- package/lib/cjs/decorators/minWords.js +17 -0
- package/lib/cjs/decorators/minWords.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/modalEdit.d.ts +0 -0
- package/lib/cjs/decorators/modalEdit.js +18 -0
- package/lib/cjs/decorators/modalEdit.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/multiple.d.ts +0 -0
- package/lib/cjs/decorators/multiple.js +18 -0
- package/lib/cjs/decorators/multiple.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/openWhenEmpty.d.ts +0 -0
- package/lib/cjs/decorators/openWhenEmpty.js +18 -0
- package/lib/cjs/decorators/openWhenEmpty.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/password.d.ts +0 -0
- package/lib/cjs/decorators/password.js +20 -0
- package/lib/cjs/decorators/password.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/placeholder.d.ts +0 -0
- package/lib/cjs/decorators/placeholder.js +19 -0
- package/lib/cjs/decorators/placeholder.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/prefix.d.ts +0 -0
- package/lib/cjs/decorators/prefix.js +18 -0
- package/lib/cjs/decorators/prefix.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/select.d.ts +0 -0
- package/lib/cjs/decorators/select.js +22 -0
- package/lib/cjs/decorators/select.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/suffix.d.ts +0 -0
- package/lib/cjs/decorators/suffix.js +18 -0
- package/lib/cjs/decorators/suffix.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/tableView.d.ts +0 -0
- package/lib/cjs/decorators/tableView.js +19 -0
- package/lib/cjs/decorators/tableView.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/tabs.d.ts +0 -0
- package/lib/cjs/decorators/tabs.js +22 -0
- package/lib/cjs/decorators/tabs.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/textCase.d.ts +0 -0
- package/lib/cjs/decorators/textCase.js +19 -0
- package/lib/cjs/decorators/textCase.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/textarea.d.ts +0 -0
- package/lib/cjs/decorators/textarea.js +20 -0
- package/lib/cjs/decorators/textarea.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/tooltip.d.ts +0 -0
- package/lib/cjs/decorators/tooltip.js +19 -0
- package/lib/cjs/decorators/tooltip.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/validate.d.ts +0 -0
- package/lib/cjs/decorators/validate.js +22 -0
- package/lib/cjs/decorators/validate.js.map +1 -0
- package/lib/{domain → cjs/domain}/FormioDataResolver.d.ts +0 -0
- package/lib/cjs/domain/FormioDataResolver.js +3 -0
- package/lib/cjs/domain/FormioDataResolver.js.map +1 -0
- package/lib/{index.d.ts → cjs/index.d.ts} +0 -0
- package/lib/cjs/index.js +8 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/{registries → cjs/registries}/FormioMappersContainer.d.ts +0 -0
- package/lib/cjs/registries/FormioMappersContainer.js +21 -0
- package/lib/cjs/registries/FormioMappersContainer.js.map +1 -0
- package/lib/{registries → cjs/registries}/FormsContainer.d.ts +0 -0
- package/lib/cjs/registries/FormsContainer.js +6 -0
- package/lib/cjs/registries/FormsContainer.js.map +1 -0
- package/lib/{utils → cjs/utils}/getFormioProps.d.ts +0 -0
- package/lib/cjs/utils/getFormioProps.js +17 -0
- package/lib/cjs/utils/getFormioProps.js.map +1 -0
- package/lib/{utils → cjs/utils}/getFormioSchema.d.ts +0 -0
- package/lib/cjs/utils/getFormioSchema.js +42 -0
- package/lib/cjs/utils/getFormioSchema.js.map +1 -0
- package/lib/{utils → cjs/utils}/getRef.d.ts +0 -0
- package/lib/cjs/utils/getRef.js +12 -0
- package/lib/cjs/utils/getRef.js.map +1 -0
- package/lib/esm/components/anyToComponent.js +25 -0
- package/lib/esm/components/anyToComponent.js.map +1 -0
- package/lib/esm/components/arrayToComponent.js +36 -0
- package/lib/esm/components/arrayToComponent.js.map +1 -0
- package/lib/esm/components/booleanToComponent.js +12 -0
- package/lib/esm/components/booleanToComponent.js.map +1 -0
- package/lib/esm/components/dateToComponent.js +55 -0
- package/lib/esm/components/dateToComponent.js.map +1 -0
- package/lib/esm/components/defaultToComponent.js +14 -0
- package/lib/esm/components/defaultToComponent.js.map +1 -0
- package/lib/esm/components/enumToComponent.js +30 -0
- package/lib/esm/components/enumToComponent.js.map +1 -0
- package/lib/esm/components/index.js +14 -0
- package/lib/esm/components/index.js.map +1 -0
- package/lib/esm/components/mapToComponent.js +16 -0
- package/lib/esm/components/mapToComponent.js.map +1 -0
- package/lib/esm/components/nestedToComponent.js +21 -0
- package/lib/esm/components/nestedToComponent.js.map +1 -0
- package/lib/esm/components/numberToComponent.js +17 -0
- package/lib/esm/components/numberToComponent.js.map +1 -0
- package/lib/esm/components/objectToEditGrid.js +12 -0
- package/lib/esm/components/objectToEditGrid.js.map +1 -0
- package/lib/esm/components/panelToComponent.js +12 -0
- package/lib/esm/components/panelToComponent.js.map +1 -0
- package/lib/esm/components/propertiesToComponents.js +84 -0
- package/lib/esm/components/propertiesToComponents.js.map +1 -0
- package/lib/esm/components/stringToComponent.js +39 -0
- package/lib/esm/components/stringToComponent.js.map +1 -0
- package/lib/esm/decorators/component.js +31 -0
- package/lib/esm/decorators/component.js.map +1 -0
- package/lib/esm/decorators/conditional.js +47 -0
- package/lib/esm/decorators/conditional.js.map +1 -0
- package/lib/esm/decorators/currency.js +20 -0
- package/lib/esm/decorators/currency.js.map +1 -0
- package/lib/esm/decorators/customClass.js +14 -0
- package/lib/esm/decorators/customClass.js.map +1 -0
- package/lib/esm/decorators/customConditional.js +29 -0
- package/lib/esm/decorators/customConditional.js.map +1 -0
- package/lib/esm/decorators/dataSourceJson.js +23 -0
- package/lib/esm/decorators/dataSourceJson.js.map +1 -0
- package/lib/esm/decorators/dataSourceUrl.js +18 -0
- package/lib/esm/decorators/dataSourceUrl.js.map +1 -0
- package/lib/esm/decorators/errorLabel.js +14 -0
- package/lib/esm/decorators/errorLabel.js.map +1 -0
- package/lib/esm/decorators/errorMessage.js +13 -0
- package/lib/esm/decorators/errorMessage.js.map +1 -0
- package/lib/esm/decorators/form.js +17 -0
- package/lib/esm/decorators/form.js.map +1 -0
- package/lib/esm/decorators/hidden.js +18 -0
- package/lib/esm/decorators/hidden.js.map +1 -0
- package/lib/esm/decorators/index.js +31 -0
- package/lib/esm/decorators/index.js.map +1 -0
- package/lib/esm/decorators/inputTags.js +19 -0
- package/lib/esm/decorators/inputTags.js.map +1 -0
- package/lib/esm/decorators/label.js +15 -0
- package/lib/esm/decorators/label.js.map +1 -0
- package/lib/esm/decorators/mask.js +45 -0
- package/lib/esm/decorators/mask.js.map +1 -0
- package/lib/esm/decorators/maxWords.js +13 -0
- package/lib/esm/decorators/maxWords.js.map +1 -0
- package/lib/esm/decorators/minWords.js +13 -0
- package/lib/esm/decorators/minWords.js.map +1 -0
- package/lib/esm/decorators/modalEdit.js +14 -0
- package/lib/esm/decorators/modalEdit.js.map +1 -0
- package/lib/esm/decorators/multiple.js +14 -0
- package/lib/esm/decorators/multiple.js.map +1 -0
- package/lib/esm/decorators/openWhenEmpty.js +14 -0
- package/lib/esm/decorators/openWhenEmpty.js.map +1 -0
- package/lib/esm/decorators/password.js +16 -0
- package/lib/esm/decorators/password.js.map +1 -0
- package/lib/esm/decorators/placeholder.js +15 -0
- package/lib/esm/decorators/placeholder.js.map +1 -0
- package/lib/esm/decorators/prefix.js +14 -0
- package/lib/esm/decorators/prefix.js.map +1 -0
- package/lib/esm/decorators/select.js +18 -0
- package/lib/esm/decorators/select.js.map +1 -0
- package/lib/esm/decorators/suffix.js +14 -0
- package/lib/esm/decorators/suffix.js.map +1 -0
- package/lib/esm/decorators/tableView.js +15 -0
- package/lib/esm/decorators/tableView.js.map +1 -0
- package/lib/esm/decorators/tabs.js +18 -0
- package/lib/esm/decorators/tabs.js.map +1 -0
- package/lib/esm/decorators/textCase.js +15 -0
- package/lib/esm/decorators/textCase.js.map +1 -0
- package/lib/esm/decorators/textarea.js +16 -0
- package/lib/esm/decorators/textarea.js.map +1 -0
- package/lib/esm/decorators/tooltip.js +15 -0
- package/lib/esm/decorators/tooltip.js.map +1 -0
- package/lib/esm/decorators/validate.js +18 -0
- package/lib/esm/decorators/validate.js.map +1 -0
- package/lib/esm/domain/FormioDataResolver.js +2 -0
- package/lib/esm/domain/FormioDataResolver.js.map +1 -0
- package/lib/esm/index.js +5 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/registries/FormioMappersContainer.js +15 -0
- package/lib/esm/registries/FormioMappersContainer.js.map +1 -0
- package/lib/esm/registries/FormsContainer.js +3 -0
- package/lib/esm/registries/FormsContainer.js.map +1 -0
- package/lib/esm/utils/getFormioProps.js +13 -0
- package/lib/esm/utils/getFormioProps.js.map +1 -0
- package/lib/esm/utils/getFormioSchema.js +38 -0
- package/lib/esm/utils/getFormioSchema.js.map +1 -0
- package/lib/esm/utils/getRef.js +8 -0
- package/lib/esm/utils/getRef.js.map +1 -0
- package/lib/types/components/anyToComponent.d.ts +1 -0
- package/lib/types/components/arrayToComponent.d.ts +1 -0
- package/lib/types/components/booleanToComponent.d.ts +1 -0
- package/lib/types/components/dateToComponent.d.ts +1 -0
- package/lib/types/components/defaultToComponent.d.ts +1 -0
- package/lib/types/components/enumToComponent.d.ts +1 -0
- package/lib/types/components/index.d.ts +13 -0
- package/lib/types/components/mapToComponent.d.ts +1 -0
- package/lib/types/components/nestedToComponent.d.ts +1 -0
- package/lib/types/components/numberToComponent.d.ts +1 -0
- package/lib/types/components/objectToEditGrid.d.ts +1 -0
- package/lib/types/components/panelToComponent.d.ts +1 -0
- package/lib/types/components/propertiesToComponents.d.ts +1 -0
- package/lib/types/components/stringToComponent.d.ts +1 -0
- package/lib/types/decorators/component.d.ts +8 -0
- package/lib/types/decorators/conditional.d.ts +33 -0
- package/lib/types/decorators/currency.d.ts +8 -0
- package/lib/types/decorators/customClass.d.ts +8 -0
- package/lib/types/decorators/customConditional.d.ts +59 -0
- package/lib/types/decorators/dataSourceJson.d.ts +8 -0
- package/lib/types/decorators/dataSourceUrl.d.ts +8 -0
- package/lib/types/decorators/errorLabel.d.ts +8 -0
- package/lib/types/decorators/errorMessage.d.ts +9 -0
- package/lib/types/decorators/form.d.ts +6 -0
- package/lib/types/decorators/hidden.d.ts +12 -0
- package/lib/types/decorators/index.d.ts +30 -0
- package/lib/types/decorators/inputTags.d.ts +8 -0
- package/lib/types/decorators/label.d.ts +9 -0
- package/lib/types/decorators/mask.d.ts +37 -0
- package/lib/types/decorators/maxWords.d.ts +9 -0
- package/lib/types/decorators/minWords.d.ts +9 -0
- package/lib/types/decorators/modalEdit.d.ts +8 -0
- package/lib/types/decorators/multiple.d.ts +8 -0
- package/lib/types/decorators/openWhenEmpty.d.ts +8 -0
- package/lib/types/decorators/password.d.ts +12 -0
- package/lib/types/decorators/placeholder.d.ts +9 -0
- package/lib/types/decorators/prefix.d.ts +8 -0
- package/lib/types/decorators/select.d.ts +14 -0
- package/lib/types/decorators/suffix.d.ts +8 -0
- package/lib/types/decorators/tableView.d.ts +9 -0
- package/lib/types/decorators/tabs.d.ts +8 -0
- package/lib/types/decorators/textCase.d.ts +9 -0
- package/lib/types/decorators/textarea.d.ts +12 -0
- package/lib/types/decorators/tooltip.d.ts +9 -0
- package/lib/types/decorators/validate.d.ts +10 -0
- package/lib/types/domain/FormioDataResolver.d.ts +7 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/registries/FormioMappersContainer.d.ts +6 -0
- package/lib/types/registries/FormsContainer.d.ts +2 -0
- package/lib/types/utils/getFormioProps.d.ts +1 -0
- package/lib/types/utils/getFormioSchema.d.ts +4 -0
- package/lib/types/utils/getRef.d.ts +1 -0
- package/package.json +20 -16
- package/tsconfig.compile.esm.json +23 -0
- package/lib/index.js +0 -1070
- package/lib/index.js.map +0 -1
- package/lib/index.modern.js +0 -1025
- package/lib/index.modern.js.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Set the error label when an error occur.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
*/
|
|
9
|
+
export function ErrorLabel(message) {
|
|
10
|
+
return Component({
|
|
11
|
+
errorLabel: message
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=errorLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorLabel.js","sourceRoot":"","sources":["../../../src/decorators/errorLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,OAAO,SAAS,CAAC;QACf,UAAU,EAAE,OAAO;KACpB,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Validate } from "./validate";
|
|
2
|
+
/**
|
|
3
|
+
* Add error message when an error occur.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
* @param message
|
|
9
|
+
*/
|
|
10
|
+
export function ErrorMessage(message) {
|
|
11
|
+
return Validate("customMessage", message);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=errorMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorMessage.js","sourceRoot":"","sources":["../../../src/decorators/errorMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,OAAO,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { nameOf, StoreSet, useDecorators } from "@tsed/core";
|
|
2
|
+
import { Name } from "@tsed/schema";
|
|
3
|
+
import { paramCase } from "change-case";
|
|
4
|
+
import { FormsContainer } from "../registries/FormsContainer";
|
|
5
|
+
/**
|
|
6
|
+
* Expose the model as Formio Form.
|
|
7
|
+
* @param form
|
|
8
|
+
*/
|
|
9
|
+
export function Form(form = {}) {
|
|
10
|
+
return useDecorators((target) => {
|
|
11
|
+
const name = form.name || nameOf(target);
|
|
12
|
+
const machineName = paramCase(name);
|
|
13
|
+
FormsContainer.set(name, target);
|
|
14
|
+
FormsContainer.set(machineName, target);
|
|
15
|
+
}, form.name && Name(form.name), form && StoreSet("formio:form", form));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../src/decorators/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAC,IAAI,EAAC,MAAM,cAAc,CAAC;AAElC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAE5D;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,OAAwD,EAAE;IAC7E,OAAO,aAAa,CAClB,CAAC,MAAW,EAAE,EAAE;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;QACzC,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QACpC,cAAc,CAAC,GAAG,CAAC,IAAI,EAAE,MAAa,CAAC,CAAC;QACxC,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,MAAa,CAAC,CAAC;IACjD,CAAC,EACD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAC5B,IAAI,IAAI,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,CACtC,CAAC;AACJ,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Set hidden field.
|
|
4
|
+
*
|
|
5
|
+
* A hidden field is still a part of the form, but is hidden from view.
|
|
6
|
+
*
|
|
7
|
+
* @param bool
|
|
8
|
+
* @decorator
|
|
9
|
+
* @formio
|
|
10
|
+
* @property
|
|
11
|
+
* @schema
|
|
12
|
+
*/
|
|
13
|
+
export function Hidden(bool = true) {
|
|
14
|
+
return Component({
|
|
15
|
+
hidden: bool
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=hidden.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hidden.js","sourceRoot":"","sources":["../../../src/decorators/hidden.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,MAAM,CAAC,OAAgB,IAAI;IACzC,OAAO,SAAS,CAAC;QACf,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from "./component";
|
|
2
|
+
export * from "./currency";
|
|
3
|
+
export * from "./dataSourceJson";
|
|
4
|
+
export * from "./dataSourceUrl";
|
|
5
|
+
export * from "./hidden";
|
|
6
|
+
export * from "./inputTags";
|
|
7
|
+
export * from "./multiple";
|
|
8
|
+
export * from "./password";
|
|
9
|
+
export * from "./select";
|
|
10
|
+
export * from "./tableView";
|
|
11
|
+
export * from "./textarea";
|
|
12
|
+
export * from "./errorMessage";
|
|
13
|
+
export * from "./errorLabel";
|
|
14
|
+
export * from "./minWords";
|
|
15
|
+
export * from "./maxWords";
|
|
16
|
+
export * from "./validate";
|
|
17
|
+
export * from "./form";
|
|
18
|
+
export * from "./tabs";
|
|
19
|
+
export * from "./placeholder";
|
|
20
|
+
export * from "./tooltip";
|
|
21
|
+
export * from "./label";
|
|
22
|
+
export * from "./customClass";
|
|
23
|
+
export * from "./modalEdit";
|
|
24
|
+
export * from "./mask";
|
|
25
|
+
export * from "./prefix";
|
|
26
|
+
export * from "./suffix";
|
|
27
|
+
export * from "./textCase";
|
|
28
|
+
export * from "./conditional";
|
|
29
|
+
export * from "./customConditional";
|
|
30
|
+
export * from "./openWhenEmpty";
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from \"./component\";\nexport * from \"./currency\";\nexport * from \"./dataSourceJson\";\nexport * from \"./dataSourceUrl\";\nexport * from \"./hidden\";\nexport * from \"./inputTags\";\nexport * from \"./multiple\";\nexport * from \"./password\";\nexport * from \"./select\";\nexport * from \"./tableView\";\nexport * from \"./textarea\";\nexport * from \"./errorMessage\";\nexport * from \"./errorLabel\";\nexport * from \"./minWords\";\nexport * from \"./maxWords\";\nexport * from \"./validate\";\nexport * from \"./form\";\nexport * from \"./tabs\";\nexport * from \"./placeholder\";\nexport * from \"./tooltip\";\nexport * from \"./label\";\nexport * from \"./customClass\";\nexport * from \"./modalEdit\";\nexport * from \"./mask\";\nexport * from \"./prefix\";\nexport * from \"./suffix\";\nexport * from \"./textCase\";\nexport * from \"./conditional\";\nexport * from \"./customConditional\";\nexport * from \"./openWhenEmpty\";\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useDecorators } from "@tsed/core";
|
|
2
|
+
import { CollectionOf } from "@tsed/schema";
|
|
3
|
+
import { Component } from "./component";
|
|
4
|
+
/**
|
|
5
|
+
* Configure the property as Tags component.
|
|
6
|
+
* @decorator
|
|
7
|
+
* @formio
|
|
8
|
+
* @property
|
|
9
|
+
* @schema
|
|
10
|
+
*/
|
|
11
|
+
export function InputTags(props = {}) {
|
|
12
|
+
return useDecorators(CollectionOf(String), Component({
|
|
13
|
+
...props,
|
|
14
|
+
tableView: false,
|
|
15
|
+
storeas: "array",
|
|
16
|
+
type: "tags"
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=inputTags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputTags.js","sourceRoot":"","sources":["../../../src/decorators/inputTags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,QAA6B,EAAE;IACvD,OAAO,aAAa,CAClB,YAAY,CAAC,MAAM,CAAC,EACpB,SAAS,CAAC;QACR,GAAG,KAAK;QACR,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,MAAM;KACb,CAAC,CACH,CAAC;AACJ,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Change the label field
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
* @param label
|
|
9
|
+
*/
|
|
10
|
+
export function Label(label) {
|
|
11
|
+
return Component({
|
|
12
|
+
label
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../src/decorators/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,SAAS,CAAC;QACf,KAAK;KACN,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* An input mask helps the user with input by ensuring a predefined format.
|
|
4
|
+
*
|
|
5
|
+
* - 9: numeric
|
|
6
|
+
* - a: alphabetical
|
|
7
|
+
* - *: alphanumeric
|
|
8
|
+
*
|
|
9
|
+
* Example telephone mask: (999) 999-9999
|
|
10
|
+
*
|
|
11
|
+
* See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.
|
|
12
|
+
*
|
|
13
|
+
* @decorator
|
|
14
|
+
* @formio
|
|
15
|
+
* @property
|
|
16
|
+
* @schema
|
|
17
|
+
*/
|
|
18
|
+
export function Mask(inputMask, inputMaskPlaceholderChar = "") {
|
|
19
|
+
return Component({
|
|
20
|
+
inputMask,
|
|
21
|
+
inputMaskPlaceholderChar
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* An input mask helps the user with input by ensuring a predefined format.
|
|
26
|
+
*
|
|
27
|
+
* - 9: numeric
|
|
28
|
+
* - a: alphabetical
|
|
29
|
+
* - *: alphanumeric
|
|
30
|
+
*
|
|
31
|
+
* Example telephone mask: (999) 999-9999
|
|
32
|
+
*
|
|
33
|
+
* See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.
|
|
34
|
+
*
|
|
35
|
+
* @decorator
|
|
36
|
+
* @formio
|
|
37
|
+
* @property
|
|
38
|
+
* @schema
|
|
39
|
+
*/
|
|
40
|
+
export function Masks(...inputMasks) {
|
|
41
|
+
return Component({
|
|
42
|
+
inputMasks
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=mask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mask.js","sourceRoot":"","sources":["../../../src/decorators/mask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,IAAI,CAAC,SAAiB,EAAE,2BAAmC,EAAE;IAC3E,OAAO,SAAS,CAAC;QACf,SAAS;QACT,wBAAwB;KACzB,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,UAA2C;IAClE,OAAO,SAAS,CAAC;QACf,UAAU;KACX,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Validate } from "./validate";
|
|
2
|
+
/**
|
|
3
|
+
* Add the minimum amount of words that can be added to this field.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
* @param value
|
|
9
|
+
*/
|
|
10
|
+
export function MaxWords(value) {
|
|
11
|
+
return Validate("maxWords", value);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=maxWords.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maxWords.js","sourceRoot":"","sources":["../../../src/decorators/maxWords.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAa;IACpC,OAAO,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AACrC,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Validate } from "./validate";
|
|
2
|
+
/**
|
|
3
|
+
* Add the maximum amount of words that can be added to this field.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
* @param value
|
|
9
|
+
*/
|
|
10
|
+
export function MinWords(value) {
|
|
11
|
+
return Validate("minWords", value);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=minWords.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minWords.js","sourceRoot":"","sources":["../../../src/decorators/minWords.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAa;IACpC,OAAO,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AACrC,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Opens up a modal to edit the value of this component.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
*/
|
|
9
|
+
export function ModalEdit(modalEdit = true) {
|
|
10
|
+
return Component({
|
|
11
|
+
modalEdit
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=modalEdit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modalEdit.js","sourceRoot":"","sources":["../../../src/decorators/modalEdit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,SAAS,GAAG,IAAI;IACxC,OAAO,SAAS,CAAC;QACf,SAAS;KACV,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Change the multiple value on the decorated property.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
*/
|
|
9
|
+
export function Multiple(multiple = false) {
|
|
10
|
+
return Component({
|
|
11
|
+
multiple
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=multiple.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiple.js","sourceRoot":"","sources":["../../../src/decorators/multiple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAQ,GAAG,KAAK;IACvC,OAAO,SAAS,CAAC;QACf,QAAQ;KACT,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Open automatically the editgrid when the list is empty.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
*/
|
|
9
|
+
export function OpenWhenEmpty(openWhenEmpty = true) {
|
|
10
|
+
return Component({
|
|
11
|
+
openWhenEmpty
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=openWhenEmpty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openWhenEmpty.js","sourceRoot":"","sources":["../../../src/decorators/openWhenEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,aAAa,GAAG,IAAI;IAChD,OAAO,SAAS,CAAC;QACf,aAAa;KACd,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Configure the property as Password component.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
*/
|
|
9
|
+
export function Password(props = {}) {
|
|
10
|
+
return Component({
|
|
11
|
+
...props,
|
|
12
|
+
type: "password",
|
|
13
|
+
protected: true
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=password.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.js","sourceRoot":"","sources":["../../../src/decorators/password.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAMtC;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAsB,EAAE;IAC/C,OAAO,SAAS,CAAC;QACf,GAAG,KAAK;QACR,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* The placeholder text that will appear when this field is empty.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
* @param placeholder
|
|
9
|
+
*/
|
|
10
|
+
export function Placeholder(placeholder) {
|
|
11
|
+
return Component({
|
|
12
|
+
placeholder
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=placeholder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholder.js","sourceRoot":"","sources":["../../../src/decorators/placeholder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7C,OAAO,SAAS,CAAC;QACf,WAAW;KACZ,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Add prefix word on the decorated field.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
*/
|
|
9
|
+
export function Prefix(prefix) {
|
|
10
|
+
return Component({
|
|
11
|
+
prefix
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=prefix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefix.js","sourceRoot":"","sources":["../../../src/decorators/prefix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,MAAM,CAAC,MAAc;IACnC,OAAO,SAAS,CAAC;QACf,MAAM;KACP,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Configure the property as Select component.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
*/
|
|
9
|
+
export function Select(props = {}) {
|
|
10
|
+
return Component({
|
|
11
|
+
selectThreshold: 0.3,
|
|
12
|
+
input: true,
|
|
13
|
+
widget: "choicesjs",
|
|
14
|
+
...props,
|
|
15
|
+
type: "select"
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/decorators/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAStC;;;;;;GAMG;AACH,MAAM,UAAU,MAAM,CAAC,QAAoB,EAAE;IAC3C,OAAO,SAAS,CAAC;QACf,eAAe,EAAE,GAAG;QACpB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,WAAW;QACnB,GAAG,KAAK;QACR,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Add suffix word on the decorated field.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
*/
|
|
9
|
+
export function Suffix(suffix) {
|
|
10
|
+
return Component({
|
|
11
|
+
suffix
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=suffix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suffix.js","sourceRoot":"","sources":["../../../src/decorators/suffix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,MAAM,CAAC,MAAc;IACnC,OAAO,SAAS,CAAC;QACf,MAAM;KACP,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Change the visibility of the current property on a table.
|
|
4
|
+
* @param bool
|
|
5
|
+
* @decorator
|
|
6
|
+
* @formio
|
|
7
|
+
* @property
|
|
8
|
+
* @schema
|
|
9
|
+
*/
|
|
10
|
+
export function TableView(bool) {
|
|
11
|
+
return Component({
|
|
12
|
+
tableView: bool
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=tableView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableView.js","sourceRoot":"","sources":["../../../src/decorators/tableView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,IAAa;IACrC,OAAO,SAAS,CAAC;QACf,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JsonEntityFn } from "@tsed/schema";
|
|
2
|
+
import { camelCase } from "change-case";
|
|
3
|
+
/**
|
|
4
|
+
* Group the current property in tabs components.
|
|
5
|
+
* @decorator
|
|
6
|
+
* @formio
|
|
7
|
+
* @property
|
|
8
|
+
* @schema
|
|
9
|
+
*/
|
|
10
|
+
export function Tabs(label) {
|
|
11
|
+
return JsonEntityFn((store) => {
|
|
12
|
+
store.schema.customKey("x-formiotabs", {
|
|
13
|
+
key: camelCase(label),
|
|
14
|
+
label
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/decorators/tabs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAkB,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,IAAI,CAAC,KAAa;IAChC,OAAO,YAAY,CAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,EAAE;YACrC,GAAG,EAAE,SAAS,CAAC,KAAK,CAAC;YACrB,KAAK;SACN,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\nimport {camelCase} from \"change-case\";\n\n/**\n * Group the current property in tabs components.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Tabs(label: string) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.customKey(\"x-formiotabs\", {\n key: camelCase(label),\n label\n });\n });\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Force the output of this field to be sanitized in a specific format.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
* @param textCase
|
|
9
|
+
*/
|
|
10
|
+
export function TextCase(textCase) {
|
|
11
|
+
return Component({
|
|
12
|
+
case: textCase
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=textCase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textCase.js","sourceRoot":"","sources":["../../../src/decorators/textCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAmC;IAC1D,OAAO,SAAS,CAAC;QACf,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Configure the property as Textarea component.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
*/
|
|
9
|
+
export function Textarea(props = {}) {
|
|
10
|
+
return Component({
|
|
11
|
+
autoExpand: false,
|
|
12
|
+
...props,
|
|
13
|
+
type: "textarea"
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/decorators/textarea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAOtC;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAsB,EAAE;IAC/C,OAAO,SAAS,CAAC;QACf,UAAU,EAAE,KAAK;QACjB,GAAG,KAAK;QACR,IAAI,EAAE,UAAU;KACjB,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Adds a tooltip to the side of this field.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
* @param tooltip
|
|
9
|
+
*/
|
|
10
|
+
export function Tooltip(tooltip) {
|
|
11
|
+
return Component({
|
|
12
|
+
tooltip
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/decorators/tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,UAAU,OAAO,CAAC,OAAe;IACrC,OAAO,SAAS,CAAC;QACf,OAAO;KACR,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* Add validation rules.
|
|
4
|
+
* @decorator
|
|
5
|
+
* @formio
|
|
6
|
+
* @property
|
|
7
|
+
* @schema
|
|
8
|
+
* @param key
|
|
9
|
+
* @param value
|
|
10
|
+
*/
|
|
11
|
+
export function Validate(key, value) {
|
|
12
|
+
return Component({
|
|
13
|
+
validate: {
|
|
14
|
+
[key]: value
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/decorators/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW,EAAE,KAAU;IAC9C,OAAO,SAAS,CAAC;QACf,QAAQ,EAAE;YACR,CAAC,GAAG,CAAC,EAAE,KAAK;SACb;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormioDataResolver.js","sourceRoot":"","sources":["../../../src/domain/FormioDataResolver.ts"],"names":[],"mappings":"","sourcesContent":["import {FormioComponent, FormioForm} from \"@tsed/formio-types\";\nimport {JsonSchemaOptions} from \"@tsed/schema\";\n\nexport type FormioDataResolverCtx = {component: FormioComponent; form: FormioForm} & JsonSchemaOptions;\nexport type FormioDataResolver = (ctx: FormioDataResolverCtx) => Promise<any> | any;\n"]}
|
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC","sourcesContent":["export * from \"./components\";\nexport * from \"./decorators\";\nexport * from \"./registries/FormioMappersContainer\";\nexport * from \"./utils/getFormioSchema\";\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const FormioMappersContainer = new Map();
|
|
2
|
+
export function registerFormioMapper(type, mapper) {
|
|
3
|
+
return FormioMappersContainer.set(type, mapper);
|
|
4
|
+
}
|
|
5
|
+
export function getFormioMapper(type) {
|
|
6
|
+
// istanbul ignore next
|
|
7
|
+
if (!FormioMappersContainer.has(type)) {
|
|
8
|
+
throw new Error(`Formio ${type} mapper doesn't exists`);
|
|
9
|
+
}
|
|
10
|
+
return FormioMappersContainer.get(type);
|
|
11
|
+
}
|
|
12
|
+
export function execMapper(type, schema, options) {
|
|
13
|
+
return getFormioMapper(type)(schema, options);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=FormioMappersContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormioMappersContainer.js","sourceRoot":"","sources":["../../../src/registries/FormioMappersContainer.ts"],"names":[],"mappings":"AAIA,MAAM,sBAAsB,GAA8B,IAAI,GAAG,EAAE,CAAC;AAEpE,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,MAAoB;IACrE,OAAO,sBAAsB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,uBAAuB;IACvB,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACrC,MAAM,IAAI,KAAK,CAAC,UAAU,IAAI,wBAAwB,CAAC,CAAC;KACzD;IACD,OAAO,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,MAAW,EAAE,OAAY;IAChE,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC","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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormsContainer.js","sourceRoot":"","sources":["../../../src/registries/FormsContainer.ts"],"names":[],"mappings":"AAEA,yCAAyC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAsB,IAAI,GAAG,EAAE,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\n\n// tslint:disable-next-line:variable-name\nexport const FormsContainer: Map<string, Type> = new Map();\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function getFormioProps(schema) {
|
|
2
|
+
const formioProps = Object.entries(schema).reduce((props, [key, value]) => {
|
|
3
|
+
if (key.startsWith("x-formio-")) {
|
|
4
|
+
return {
|
|
5
|
+
...props,
|
|
6
|
+
[key.replace("x-formio-", "")]: value
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
return props;
|
|
10
|
+
}, {});
|
|
11
|
+
return formioProps;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=getFormioProps.js.map
|