@formio/angular 5.2.2 → 5.3.0-rc.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/FormioBaseComponent.d.ts +3 -0
- package/FormioBaseComponent.d.ts.map +1 -1
- package/auth/auth.component.d.ts +3 -0
- package/auth/auth.component.d.ts.map +1 -1
- package/auth/auth.config.d.ts +3 -0
- package/auth/auth.config.d.ts.map +1 -1
- package/auth/auth.module.d.ts +11 -0
- package/auth/auth.module.d.ts.map +1 -1
- package/auth/auth.service.d.ts +3 -0
- package/auth/auth.service.d.ts.map +1 -1
- package/auth/formio-angular-auth.d.ts +1 -0
- package/auth/formio-angular-auth.d.ts.map +1 -1
- package/auth/login/login.component.d.ts +3 -0
- package/auth/login/login.component.d.ts.map +1 -1
- package/auth/package.json +5 -6
- package/auth/register/register.component.d.ts +3 -0
- package/auth/register/register.component.d.ts.map +1 -1
- package/auth/resetpass/resetpass.component.d.ts +3 -0
- package/auth/resetpass/resetpass.component.d.ts.map +1 -1
- package/components/alerts/formio.alerts.component.d.ts +3 -0
- package/components/alerts/formio.alerts.component.d.ts.map +1 -1
- package/components/alerts/parse-html-content.pipe.d.ts +3 -0
- package/components/alerts/parse-html-content.pipe.d.ts.map +1 -1
- package/components/formbuilder/formbuilder.component.d.ts +3 -0
- package/components/formbuilder/formbuilder.component.d.ts.map +1 -1
- package/components/formio/formio.component.d.ts +3 -0
- package/components/formio/formio.component.d.ts.map +1 -1
- package/components/loader/formio.loader.component.d.ts +3 -0
- package/components/loader/formio.loader.component.d.ts.map +1 -1
- package/custom-component/custom-tags.service.d.ts +3 -0
- package/custom-component/custom-tags.service.d.ts.map +1 -1
- package/esm2020/FormioBaseComponent.mjs +491 -0
- package/esm2020/auth/auth.component.mjs +12 -0
- package/esm2020/auth/auth.config.mjs +15 -0
- package/esm2020/auth/auth.module.mjs +48 -0
- package/{esm2015/auth/auth.routes.js → esm2020/auth/auth.routes.mjs} +0 -0
- package/esm2020/auth/auth.service.mjs +159 -0
- package/{esm2015/auth/formio-angular-auth.js → esm2020/auth/formio-angular-auth.mjs} +0 -0
- package/{esm2015/auth/index.js → esm2020/auth/index.mjs} +0 -0
- package/esm2020/auth/login/login.component.mjs +16 -0
- package/{esm2015/auth/public_api.js → esm2020/auth/public_api.mjs} +0 -0
- package/esm2020/auth/register/register.component.mjs +16 -0
- package/esm2020/auth/resetpass/resetpass.component.mjs +16 -0
- package/esm2020/components/alerts/formio.alerts.component.mjs +29 -0
- package/{esm2015/components/alerts/formio.alerts.js → esm2020/components/alerts/formio.alerts.mjs} +0 -0
- package/esm2020/components/alerts/parse-html-content.pipe.mjs +19 -0
- package/esm2020/components/formbuilder/formbuilder.component.mjs +190 -0
- package/esm2020/components/formio/formio.component.mjs +40 -0
- package/esm2020/components/loader/formio.loader.component.mjs +14 -0
- package/{esm2015/core.js → esm2020/core.mjs} +0 -0
- package/esm2020/custom-component/create-custom-component.mjs +144 -0
- package/esm2020/custom-component/custom-tags.service.mjs +16 -0
- package/{esm2015/custom-component/register-custom-component.js → esm2020/custom-component/register-custom-component.mjs} +0 -0
- package/{esm2015/elements.common.js → esm2020/elements.common.mjs} +0 -0
- package/esm2020/formio-angular.mjs +5 -0
- package/{esm2015/formio-promise.service.js → esm2020/formio-promise.service.mjs} +0 -0
- package/{esm2015/formio.common.js → esm2020/formio.common.mjs} +0 -0
- package/esm2020/formio.config.mjs +14 -0
- package/esm2020/formio.module.mjs +60 -0
- package/{esm2015/formio.service.js → esm2020/formio.service.mjs} +0 -0
- package/{esm2015/formio.utils.js → esm2020/formio.utils.mjs} +0 -0
- package/esm2020/grid/GridBodyComponent.mjs +81 -0
- package/esm2020/grid/GridFooterComponent.mjs +36 -0
- package/esm2020/grid/GridHeaderComponent.mjs +30 -0
- package/esm2020/grid/form/FormGridBody.component.mjs +19 -0
- package/esm2020/grid/form/FormGridFooter.component.mjs +26 -0
- package/esm2020/grid/form/FormGridHeader.component.mjs +26 -0
- package/{esm2015/grid/form/index.js → esm2020/grid/form/index.mjs} +0 -0
- package/esm2020/grid/form/time-since.pipe.mjs +37 -0
- package/esm2020/grid/formio-angular-grid.mjs +5 -0
- package/esm2020/grid/grid.component.mjs +230 -0
- package/esm2020/grid/grid.module.mjs +89 -0
- package/esm2020/grid/grid.service.mjs +17 -0
- package/{esm2015/grid/index.js → esm2020/grid/index.mjs} +0 -0
- package/{esm2015/grid/public_api.js → esm2020/grid/public_api.mjs} +0 -0
- package/esm2020/grid/submission/SubmissionGridBody.component.mjs +43 -0
- package/esm2020/grid/submission/SubmissionGridFooter.component.mjs +23 -0
- package/esm2020/grid/submission/SubmissionGridHeader.component.mjs +61 -0
- package/{esm2015/grid/submission/index.js → esm2020/grid/submission/index.mjs} +0 -0
- package/{esm2015/grid/types/grid-column.js → esm2020/grid/types/grid-column.mjs} +0 -0
- package/{esm2015/grid/types/grid-footer-positions.js → esm2020/grid/types/grid-footer-positions.mjs} +0 -0
- package/{esm2015/grid/types/grid-header.js → esm2020/grid/types/grid-header.mjs} +0 -0
- package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/esm2020/manager/create/create.component.mjs +18 -0
- package/esm2020/manager/delete/delete.component.mjs +37 -0
- package/esm2020/manager/edit/edit.component.mjs +109 -0
- package/esm2020/manager/form/form.component.mjs +70 -0
- package/esm2020/manager/form-manager.config.mjs +15 -0
- package/esm2020/manager/form-manager.module.mjs +85 -0
- package/{esm2015/manager/form-manager.routes.js → esm2020/manager/form-manager.routes.mjs} +0 -0
- package/esm2020/manager/form-manager.service.mjs +178 -0
- package/{esm2015/manager/formio-angular-manager.js → esm2020/manager/formio-angular-manager.mjs} +0 -0
- package/esm2020/manager/index/index.component.mjs +84 -0
- package/{esm2015/manager/index.js → esm2020/manager/index.mjs} +0 -0
- package/{esm2015/manager/public_api.js → esm2020/manager/public_api.mjs} +0 -0
- package/esm2020/manager/submission/delete/delete.component.mjs +28 -0
- package/esm2020/manager/submission/edit/edit.component.mjs +22 -0
- package/esm2020/manager/submission/index/index.component.mjs +22 -0
- package/esm2020/manager/submission/submission/submission.component.mjs +26 -0
- package/esm2020/manager/submission/view/view.component.mjs +16 -0
- package/esm2020/manager/view/view.component.mjs +42 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/esm2020/resource/create/create.component.mjs +37 -0
- package/esm2020/resource/delete/delete.component.mjs +26 -0
- package/esm2020/resource/edit/edit.component.mjs +36 -0
- package/{esm2015/resource/formio-angular-resource.js → esm2020/resource/formio-angular-resource.mjs} +0 -0
- package/esm2020/resource/index/index.component.mjs +61 -0
- package/{esm2015/resource/index.js → esm2020/resource/index.mjs} +0 -0
- package/{esm2015/resource/public_api.js → esm2020/resource/public_api.mjs} +0 -0
- package/esm2020/resource/resource.component.mjs +46 -0
- package/esm2020/resource/resource.config.mjs +15 -0
- package/esm2020/resource/resource.module.mjs +64 -0
- package/{esm2015/resource/resource.routes.js → esm2020/resource/resource.routes.mjs} +0 -0
- package/esm2020/resource/resource.service.mjs +186 -0
- package/esm2020/resource/resources.service.mjs +22 -0
- package/esm2020/resource/view/view.component.mjs +23 -0
- package/{esm2015/types/alerts-position.js → esm2020/types/alerts-position.mjs} +0 -0
- package/{esm2015/types/formio-metadata.js → esm2020/types/formio-metadata.mjs} +0 -0
- package/{esm2015/types/formio-submission.js → esm2020/types/formio-submission.mjs} +0 -0
- package/fesm2015/formio-angular-auth.mjs +296 -0
- package/fesm2015/formio-angular-auth.mjs.map +1 -0
- package/fesm2015/formio-angular-grid.mjs +691 -0
- package/fesm2015/formio-angular-grid.mjs.map +1 -0
- package/fesm2015/formio-angular-manager.mjs +739 -0
- package/fesm2015/formio-angular-manager.mjs.map +1 -0
- package/fesm2015/formio-angular-resource.mjs +511 -0
- package/fesm2015/formio-angular-resource.mjs.map +1 -0
- package/fesm2015/formio-angular.mjs +1138 -0
- package/fesm2015/formio-angular.mjs.map +1 -0
- package/fesm2020/formio-angular-auth.mjs +296 -0
- package/fesm2020/formio-angular-auth.mjs.map +1 -0
- package/fesm2020/formio-angular-grid.mjs +690 -0
- package/fesm2020/formio-angular-grid.mjs.map +1 -0
- package/fesm2020/formio-angular-manager.mjs +739 -0
- package/fesm2020/formio-angular-manager.mjs.map +1 -0
- package/fesm2020/formio-angular-resource.mjs +509 -0
- package/fesm2020/formio-angular-resource.mjs.map +1 -0
- package/fesm2020/formio-angular.mjs +1146 -0
- package/fesm2020/formio-angular.mjs.map +1 -0
- package/formio-angular.d.ts +1 -2
- package/formio-angular.d.ts.map +1 -1
- package/formio.config.d.ts +3 -0
- package/formio.config.d.ts.map +1 -1
- package/formio.module.d.ts +11 -0
- package/formio.module.d.ts.map +1 -1
- package/grid/GridBodyComponent.d.ts +3 -0
- package/grid/GridBodyComponent.d.ts.map +1 -1
- package/grid/GridFooterComponent.d.ts +3 -0
- package/grid/GridFooterComponent.d.ts.map +1 -1
- package/grid/GridHeaderComponent.d.ts +3 -0
- package/grid/GridHeaderComponent.d.ts.map +1 -1
- package/grid/form/FormGridBody.component.d.ts +3 -0
- package/grid/form/FormGridBody.component.d.ts.map +1 -1
- package/grid/form/FormGridFooter.component.d.ts +3 -0
- package/grid/form/FormGridFooter.component.d.ts.map +1 -1
- package/grid/form/FormGridHeader.component.d.ts +3 -0
- package/grid/form/FormGridHeader.component.d.ts.map +1 -1
- package/grid/form/time-since.pipe.d.ts +3 -0
- package/grid/form/time-since.pipe.d.ts.map +1 -1
- package/grid/formio-angular-grid.d.ts +1 -1
- package/grid/formio-angular-grid.d.ts.map +1 -1
- package/grid/grid.component.d.ts +3 -0
- package/grid/grid.component.d.ts.map +1 -1
- package/grid/grid.module.d.ts +20 -0
- package/grid/grid.module.d.ts.map +1 -1
- package/grid/grid.service.d.ts +3 -0
- package/grid/grid.service.d.ts.map +1 -1
- package/grid/package.json +5 -6
- package/grid/submission/SubmissionGridBody.component.d.ts +3 -0
- package/grid/submission/SubmissionGridBody.component.d.ts.map +1 -1
- package/grid/submission/SubmissionGridFooter.component.d.ts +3 -0
- package/grid/submission/SubmissionGridFooter.component.d.ts.map +1 -1
- package/grid/submission/SubmissionGridHeader.component.d.ts +3 -0
- package/grid/submission/SubmissionGridHeader.component.d.ts.map +1 -1
- package/manager/create/create.component.d.ts +3 -0
- package/manager/create/create.component.d.ts.map +1 -1
- package/manager/delete/delete.component.d.ts +3 -0
- package/manager/delete/delete.component.d.ts.map +1 -1
- package/manager/edit/edit.component.d.ts +3 -0
- package/manager/edit/edit.component.d.ts.map +1 -1
- package/manager/form/form.component.d.ts +3 -0
- package/manager/form/form.component.d.ts.map +1 -1
- package/manager/form-manager.config.d.ts +3 -0
- package/manager/form-manager.config.d.ts.map +1 -1
- package/manager/form-manager.module.d.ts +22 -0
- package/manager/form-manager.module.d.ts.map +1 -1
- package/manager/form-manager.service.d.ts +3 -0
- package/manager/form-manager.service.d.ts.map +1 -1
- package/manager/formio-angular-manager.d.ts +1 -0
- package/manager/formio-angular-manager.d.ts.map +1 -1
- package/manager/index/index.component.d.ts +3 -0
- package/manager/index/index.component.d.ts.map +1 -1
- package/manager/package.json +5 -6
- package/manager/submission/delete/delete.component.d.ts +3 -0
- package/manager/submission/delete/delete.component.d.ts.map +1 -1
- package/manager/submission/edit/edit.component.d.ts +3 -0
- package/manager/submission/edit/edit.component.d.ts.map +1 -1
- package/manager/submission/index/index.component.d.ts +3 -0
- package/manager/submission/index/index.component.d.ts.map +1 -1
- package/manager/submission/submission/submission.component.d.ts +3 -0
- package/manager/submission/submission/submission.component.d.ts.map +1 -1
- package/manager/submission/view/view.component.d.ts +3 -0
- package/manager/submission/view/view.component.d.ts.map +1 -1
- package/manager/view/view.component.d.ts +3 -0
- package/manager/view/view.component.d.ts.map +1 -1
- package/package.json +54 -10
- package/resource/create/create.component.d.ts +3 -0
- package/resource/create/create.component.d.ts.map +1 -1
- package/resource/delete/delete.component.d.ts +3 -0
- package/resource/delete/delete.component.d.ts.map +1 -1
- package/resource/edit/edit.component.d.ts +3 -0
- package/resource/edit/edit.component.d.ts.map +1 -1
- package/resource/formio-angular-resource.d.ts +1 -0
- package/resource/formio-angular-resource.d.ts.map +1 -1
- package/resource/index/index.component.d.ts +3 -0
- package/resource/index/index.component.d.ts.map +1 -1
- package/resource/package.json +5 -6
- package/resource/resource.component.d.ts +3 -0
- package/resource/resource.component.d.ts.map +1 -1
- package/resource/resource.config.d.ts +3 -0
- package/resource/resource.config.d.ts.map +1 -1
- package/resource/resource.module.d.ts +14 -0
- package/resource/resource.module.d.ts.map +1 -1
- package/resource/resource.service.d.ts +3 -0
- package/resource/resource.service.d.ts.map +1 -1
- package/resource/resources.service.d.ts +3 -0
- package/resource/resources.service.d.ts.map +1 -1
- package/resource/view/view.component.d.ts +3 -0
- package/resource/view/view.component.d.ts.map +1 -1
- package/FormioBaseComponent.ngfactory.d.ts.map +0 -1
- package/auth/formio-angular-auth.metadata.json +0 -1
- package/bundles/formio-angular-auth.umd.js +0 -312
- package/bundles/formio-angular-auth.umd.js.map +0 -1
- package/bundles/formio-angular-grid.umd.js +0 -1010
- package/bundles/formio-angular-grid.umd.js.map +0 -1
- package/bundles/formio-angular-manager.umd.js +0 -1122
- package/bundles/formio-angular-manager.umd.js.map +0 -1
- package/bundles/formio-angular-resource.umd.js +0 -556
- package/bundles/formio-angular-resource.umd.js.map +0 -1
- package/bundles/formio-angular.umd.js +0 -1497
- package/bundles/formio-angular.umd.js.map +0 -1
- package/components/alerts/formio.alerts.component.ngfactory.d.ts.map +0 -1
- package/components/alerts/parse-html-content.pipe.ngfactory.d.ts.map +0 -1
- package/components/formbuilder/formbuilder.component.ngfactory.d.ts.map +0 -1
- package/components/formio/formio.component.ngfactory.d.ts.map +0 -1
- package/components/loader/formio.loader.component.ngfactory.d.ts.map +0 -1
- package/components/loader/formio.loader.component.scss.shim.ngstyle.d.ts.map +0 -1
- package/custom-component/custom-tags.service.ngfactory.d.ts.map +0 -1
- package/esm2015/FormioBaseComponent.js +0 -456
- package/esm2015/auth/auth.component.js +0 -9
- package/esm2015/auth/auth.config.js +0 -12
- package/esm2015/auth/auth.module.js +0 -34
- package/esm2015/auth/auth.service.js +0 -160
- package/esm2015/auth/login/login.component.js +0 -16
- package/esm2015/auth/register/register.component.js +0 -16
- package/esm2015/auth/resetpass/resetpass.component.js +0 -16
- package/esm2015/components/alerts/formio.alerts.component.js +0 -26
- package/esm2015/components/alerts/parse-html-content.pipe.js +0 -15
- package/esm2015/components/formbuilder/formbuilder.component.js +0 -185
- package/esm2015/components/formio/formio.component.js +0 -39
- package/esm2015/components/loader/formio.loader.component.js +0 -14
- package/esm2015/custom-component/create-custom-component.js +0 -130
- package/esm2015/custom-component/custom-tags.service.js +0 -13
- package/esm2015/formio-angular.js +0 -7
- package/esm2015/formio.config.js +0 -11
- package/esm2015/formio.module.js +0 -42
- package/esm2015/grid/GridBodyComponent.js +0 -76
- package/esm2015/grid/GridFooterComponent.js +0 -26
- package/esm2015/grid/GridHeaderComponent.js +0 -25
- package/esm2015/grid/form/FormGridBody.component.js +0 -16
- package/esm2015/grid/form/FormGridFooter.component.js +0 -24
- package/esm2015/grid/form/FormGridHeader.component.js +0 -24
- package/esm2015/grid/form/time-since.pipe.js +0 -33
- package/esm2015/grid/formio-angular-grid.js +0 -6
- package/esm2015/grid/grid.component.js +0 -211
- package/esm2015/grid/grid.module.js +0 -61
- package/esm2015/grid/grid.service.js +0 -16
- package/esm2015/grid/submission/SubmissionGridBody.component.js +0 -40
- package/esm2015/grid/submission/SubmissionGridFooter.component.js +0 -21
- package/esm2015/grid/submission/SubmissionGridHeader.component.js +0 -58
- package/esm2015/manager/create/create.component.js +0 -13
- package/esm2015/manager/delete/delete.component.js +0 -42
- package/esm2015/manager/edit/edit.component.js +0 -109
- package/esm2015/manager/form/form.component.js +0 -73
- package/esm2015/manager/form-manager.config.js +0 -12
- package/esm2015/manager/form-manager.module.js +0 -56
- package/esm2015/manager/form-manager.service.js +0 -180
- package/esm2015/manager/index/index.component.js +0 -86
- package/esm2015/manager/submission/delete/delete.component.js +0 -32
- package/esm2015/manager/submission/edit/edit.component.js +0 -24
- package/esm2015/manager/submission/index/index.component.js +0 -24
- package/esm2015/manager/submission/submission/submission.component.js +0 -27
- package/esm2015/manager/submission/view/view.component.js +0 -16
- package/esm2015/manager/view/view.component.js +0 -45
- package/esm2015/resource/create/create.component.js +0 -40
- package/esm2015/resource/delete/delete.component.js +0 -29
- package/esm2015/resource/edit/edit.component.js +0 -39
- package/esm2015/resource/index/index.component.js +0 -65
- package/esm2015/resource/resource.component.js +0 -48
- package/esm2015/resource/resource.config.js +0 -12
- package/esm2015/resource/resource.module.js +0 -44
- package/esm2015/resource/resource.service.js +0 -187
- package/esm2015/resource/resources.service.js +0 -22
- package/esm2015/resource/view/view.component.js +0 -24
- package/fesm2015/formio-angular-auth.js +0 -285
- package/fesm2015/formio-angular-auth.js.map +0 -1
- package/fesm2015/formio-angular-grid.js +0 -624
- package/fesm2015/formio-angular-grid.js.map +0 -1
- package/fesm2015/formio-angular-manager.js +0 -750
- package/fesm2015/formio-angular-manager.js.map +0 -1
- package/fesm2015/formio-angular-resource.js +0 -515
- package/fesm2015/formio-angular-resource.js.map +0 -1
- package/fesm2015/formio-angular.js +0 -1073
- package/fesm2015/formio-angular.js.map +0 -1
- package/formio-angular.metadata.json +0 -1
- package/formio.config.ngfactory.d.ts.map +0 -1
- package/formio.module.ngfactory.d.ts.map +0 -1
- package/grid/GridBodyComponent.ngfactory.d.ts.map +0 -1
- package/grid/GridFooterComponent.ngfactory.d.ts.map +0 -1
- package/grid/GridHeaderComponent.ngfactory.d.ts.map +0 -1
- package/grid/form/FormGridBody.component.ngfactory.d.ts.map +0 -1
- package/grid/form/FormGridBody.component.scss.shim.ngstyle.d.ts.map +0 -1
- package/grid/form/FormGridFooter.component.ngfactory.d.ts.map +0 -1
- package/grid/form/FormGridHeader.component.ngfactory.d.ts.map +0 -1
- package/grid/form/time-since.pipe.ngfactory.d.ts.map +0 -1
- package/grid/formio-angular-grid.metadata.json +0 -1
- package/grid/grid.component.ngfactory.d.ts.map +0 -1
- package/grid/grid.component.scss.shim.ngstyle.d.ts.map +0 -1
- package/grid/grid.footer.scss.ngstyle.d.ts.map +0 -1
- package/grid/grid.module.ngfactory.d.ts.map +0 -1
- package/grid/grid.service.ngfactory.d.ts.map +0 -1
- package/grid/submission/SubmissionGridBody.component.ngfactory.d.ts.map +0 -1
- package/grid/submission/SubmissionGridFooter.component.ngfactory.d.ts.map +0 -1
- package/grid/submission/SubmissionGridHeader.component.ngfactory.d.ts.map +0 -1
- package/manager/formio-angular-manager.metadata.json +0 -1
- package/resource/formio-angular-resource.metadata.json +0 -1
|
@@ -1,1073 +0,0 @@
|
|
|
1
|
-
import { Injectable, EventEmitter, Component, NgZone, Optional, Input, Output, ViewChild, ViewEncapsulation, Pipe, NgModule } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { Formio, Form, Utils, FormBuilder, Components } from 'formiojs';
|
|
4
|
-
export { Components, Formio, Utils as FormioUtils, Templates } from 'formiojs';
|
|
5
|
-
import { RouterModule } from '@angular/router';
|
|
6
|
-
import { each, assign, get, isEmpty, isArray, isNil, clone } from 'lodash';
|
|
7
|
-
import Evaluator from 'formiojs/utils/Evaluator';
|
|
8
|
-
import { fastCloneDeep } from 'formiojs/utils/utils';
|
|
9
|
-
import { CommonModule } from '@angular/common';
|
|
10
|
-
import { createCustomElement } from '@angular/elements';
|
|
11
|
-
|
|
12
|
-
class FormioAppConfig {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.appUrl = '';
|
|
15
|
-
this.apiUrl = '';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
FormioAppConfig.decorators = [
|
|
19
|
-
{ type: Injectable }
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
class FormioError {
|
|
23
|
-
constructor(message, component, silent) {
|
|
24
|
-
this.message = message;
|
|
25
|
-
this.component = component;
|
|
26
|
-
this.silent = silent;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
class FormioService {
|
|
31
|
-
constructor(url, options) {
|
|
32
|
-
this.url = url;
|
|
33
|
-
this.options = options;
|
|
34
|
-
this.formio = new Formio(this.url, this.options);
|
|
35
|
-
}
|
|
36
|
-
requestWrapper(fn) {
|
|
37
|
-
let record;
|
|
38
|
-
let called = false;
|
|
39
|
-
return Observable.create((observer) => {
|
|
40
|
-
try {
|
|
41
|
-
if (!called) {
|
|
42
|
-
called = true;
|
|
43
|
-
fn()
|
|
44
|
-
.then((_record) => {
|
|
45
|
-
record = _record;
|
|
46
|
-
observer.next(record);
|
|
47
|
-
observer.complete();
|
|
48
|
-
})
|
|
49
|
-
.catch((err) => observer.error(err));
|
|
50
|
-
}
|
|
51
|
-
else if (record) {
|
|
52
|
-
observer.next(record);
|
|
53
|
-
observer.complete();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
catch (err) {
|
|
57
|
-
observer.error(err);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
saveForm(form, options) {
|
|
62
|
-
return this.requestWrapper(() => this.formio.saveForm(form, options));
|
|
63
|
-
}
|
|
64
|
-
loadForm(query, options) {
|
|
65
|
-
return this.requestWrapper(() => this.formio.loadForm(query, options));
|
|
66
|
-
}
|
|
67
|
-
loadForms(query, options) {
|
|
68
|
-
return this.requestWrapper(() => this.formio.loadForms(query, options));
|
|
69
|
-
}
|
|
70
|
-
loadSubmission(query, options) {
|
|
71
|
-
return this.requestWrapper(() => this.formio.loadSubmission(query, options));
|
|
72
|
-
}
|
|
73
|
-
userPermissions(user, form, submission) {
|
|
74
|
-
return this.requestWrapper(() => this.formio.userPermissions(user, form, submission));
|
|
75
|
-
}
|
|
76
|
-
deleteSubmission(data, options) {
|
|
77
|
-
return this.requestWrapper(() => this.formio.deleteSubmission(data, options));
|
|
78
|
-
}
|
|
79
|
-
saveSubmission(submission, options) {
|
|
80
|
-
return this.requestWrapper(() => this.formio.saveSubmission(submission, options));
|
|
81
|
-
}
|
|
82
|
-
loadSubmissions(query, options) {
|
|
83
|
-
return this.requestWrapper(() => this.formio.loadSubmissions(query, options));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
class FormioPromiseService {
|
|
88
|
-
constructor(url, options) {
|
|
89
|
-
this.url = url;
|
|
90
|
-
this.options = options;
|
|
91
|
-
this.formioService = new FormioService(url, options);
|
|
92
|
-
}
|
|
93
|
-
saveForm(form, options) {
|
|
94
|
-
return this.formioService.saveForm(form, options).toPromise();
|
|
95
|
-
}
|
|
96
|
-
loadForm(query, options) {
|
|
97
|
-
return this.formioService.loadForm(query, options).toPromise();
|
|
98
|
-
}
|
|
99
|
-
loadSubmission(query, options) {
|
|
100
|
-
return this.formioService.loadSubmission(query, options).toPromise();
|
|
101
|
-
}
|
|
102
|
-
userPermissions(user, form, submission) {
|
|
103
|
-
return this.formioService.userPermissions(user, form, submission).toPromise();
|
|
104
|
-
}
|
|
105
|
-
deleteSubmission(data, options) {
|
|
106
|
-
return this.formioService.deleteSubmission(data, options).toPromise();
|
|
107
|
-
}
|
|
108
|
-
loadForms(query, options) {
|
|
109
|
-
return this.formioService.loadForms(query, options).toPromise();
|
|
110
|
-
}
|
|
111
|
-
saveSubmission(submission, options) {
|
|
112
|
-
return this.formioService.saveSubmission(submission, options).toPromise();
|
|
113
|
-
}
|
|
114
|
-
loadSubmissions(query, options) {
|
|
115
|
-
return this.formioService.loadSubmissions(query, options).toPromise();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function extendRouter(Class, config, ClassRoutes) {
|
|
120
|
-
each(Class.decorators, decorator => {
|
|
121
|
-
each(decorator.args, arg => {
|
|
122
|
-
if (arg.declarations) {
|
|
123
|
-
each(config, component => arg.declarations.push(component));
|
|
124
|
-
}
|
|
125
|
-
if (arg.imports) {
|
|
126
|
-
each(arg.imports, (_import, index) => {
|
|
127
|
-
if ((_import.ngModule && (_import.ngModule.name === 'RouterModule')) ||
|
|
128
|
-
(_import.name === 'RouterModule')) {
|
|
129
|
-
arg.imports[index] = RouterModule.forChild(ClassRoutes(config));
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
return Class;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
class FormioAlerts {
|
|
139
|
-
constructor() {
|
|
140
|
-
this.alerts = [];
|
|
141
|
-
}
|
|
142
|
-
setAlert(alert) {
|
|
143
|
-
this.alerts = [alert];
|
|
144
|
-
}
|
|
145
|
-
addAlert(alert) {
|
|
146
|
-
this.alerts.push(alert);
|
|
147
|
-
}
|
|
148
|
-
setAlerts(alerts) {
|
|
149
|
-
this.alerts = alerts;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
class CustomTagsService {
|
|
154
|
-
constructor() {
|
|
155
|
-
this.tags = [];
|
|
156
|
-
}
|
|
157
|
-
addCustomTag(tag) {
|
|
158
|
-
this.tags.push(tag);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
CustomTagsService.decorators = [
|
|
162
|
-
{ type: Injectable }
|
|
163
|
-
];
|
|
164
|
-
|
|
165
|
-
var AlertsPosition;
|
|
166
|
-
(function (AlertsPosition) {
|
|
167
|
-
AlertsPosition[AlertsPosition["none"] = 0] = "none";
|
|
168
|
-
AlertsPosition[AlertsPosition["top"] = 1] = "top";
|
|
169
|
-
AlertsPosition[AlertsPosition["bottom"] = 2] = "bottom";
|
|
170
|
-
AlertsPosition[AlertsPosition["both"] = 3] = "both";
|
|
171
|
-
})(AlertsPosition || (AlertsPosition = {}));
|
|
172
|
-
|
|
173
|
-
class FormioBaseComponent {
|
|
174
|
-
constructor(ngZone, config, customTags) {
|
|
175
|
-
this.ngZone = ngZone;
|
|
176
|
-
this.config = config;
|
|
177
|
-
this.customTags = customTags;
|
|
178
|
-
this.submission = {};
|
|
179
|
-
this.noeval = Evaluator.noeval;
|
|
180
|
-
this.readOnly = false;
|
|
181
|
-
this.viewOnly = false;
|
|
182
|
-
this.hooks = {};
|
|
183
|
-
this.watchSubmissionErrors = false;
|
|
184
|
-
this.render = new EventEmitter();
|
|
185
|
-
this.customEvent = new EventEmitter();
|
|
186
|
-
this.fileUploadingStatus = new EventEmitter();
|
|
187
|
-
this.submit = new EventEmitter();
|
|
188
|
-
this.prevPage = new EventEmitter();
|
|
189
|
-
this.nextPage = new EventEmitter();
|
|
190
|
-
this.beforeSubmit = new EventEmitter();
|
|
191
|
-
this.change = new EventEmitter();
|
|
192
|
-
this.invalid = new EventEmitter();
|
|
193
|
-
this.errorChange = new EventEmitter();
|
|
194
|
-
this.formLoad = new EventEmitter();
|
|
195
|
-
this.submissionLoad = new EventEmitter();
|
|
196
|
-
this.ready = new EventEmitter();
|
|
197
|
-
this.AlertsPosition = AlertsPosition;
|
|
198
|
-
this.initialized = false;
|
|
199
|
-
this.alerts = new FormioAlerts();
|
|
200
|
-
this.submitting = false;
|
|
201
|
-
this.submissionSuccess = false;
|
|
202
|
-
this.isLoading = true;
|
|
203
|
-
this.formioReady = new Promise((ready) => {
|
|
204
|
-
this.formioReadyResolve = ready;
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
getRenderer() {
|
|
208
|
-
return this.renderer;
|
|
209
|
-
}
|
|
210
|
-
getRendererOptions() {
|
|
211
|
-
const extraTags = this.customTags ? this.customTags.tags : [];
|
|
212
|
-
return assign({}, {
|
|
213
|
-
icons: get(this.config, 'icons', 'fontawesome'),
|
|
214
|
-
noAlerts: get(this.options, 'noAlerts', true),
|
|
215
|
-
readOnly: this.readOnly,
|
|
216
|
-
viewAsHtml: this.viewOnly,
|
|
217
|
-
i18n: get(this.options, 'i18n', null),
|
|
218
|
-
fileService: get(this.options, 'fileService', null),
|
|
219
|
-
hooks: this.hooks,
|
|
220
|
-
sanitizeConfig: {
|
|
221
|
-
addTags: extraTags
|
|
222
|
-
}
|
|
223
|
-
}, this.renderOptions || {});
|
|
224
|
-
}
|
|
225
|
-
createRenderer() {
|
|
226
|
-
const Renderer = this.getRenderer();
|
|
227
|
-
const form = (new Renderer(this.formioElement ? this.formioElement.nativeElement : null, this.form, this.getRendererOptions()));
|
|
228
|
-
return form.instance;
|
|
229
|
-
}
|
|
230
|
-
setForm(form) {
|
|
231
|
-
this.form = form;
|
|
232
|
-
if (this.formio) {
|
|
233
|
-
this.formio.destroy();
|
|
234
|
-
}
|
|
235
|
-
if (this.form.title) {
|
|
236
|
-
this.label = this.form.title;
|
|
237
|
-
}
|
|
238
|
-
else if (this.form.components && this.form.components[0]) {
|
|
239
|
-
this.label = this.form.components[0].label;
|
|
240
|
-
}
|
|
241
|
-
// Clear out the element to render the new form.
|
|
242
|
-
if (this.formioElement && this.formioElement.nativeElement) {
|
|
243
|
-
this.formioElement.nativeElement.innerHTML = '';
|
|
244
|
-
}
|
|
245
|
-
this.formio = this.createRenderer();
|
|
246
|
-
this.formio.submission = this.submission;
|
|
247
|
-
if (this.renderOptions && this.renderOptions.validateOnInit) {
|
|
248
|
-
this.formio.setValue(this.submission, { validateOnInit: true });
|
|
249
|
-
}
|
|
250
|
-
if (this.url) {
|
|
251
|
-
this.formio.setUrl(this.url, this.formioOptions || {});
|
|
252
|
-
}
|
|
253
|
-
if (this.src) {
|
|
254
|
-
this.formio.setUrl(this.src, this.formioOptions || {});
|
|
255
|
-
}
|
|
256
|
-
this.formio.nosubmit = true;
|
|
257
|
-
this.formio.on('prevPage', (data) => this.ngZone.run(() => this.onPrevPage(data)));
|
|
258
|
-
this.formio.on('nextPage', (data) => this.ngZone.run(() => this.onNextPage(data)));
|
|
259
|
-
this.formio.on('change', (value, flags, isModified) => this.ngZone.run(() => this.onChange(value, flags, isModified)));
|
|
260
|
-
this.formio.on('customEvent', (event) => this.ngZone.run(() => this.customEvent.emit(event)));
|
|
261
|
-
['fileUploadingStart', 'fileUploadingEnd'].forEach((eventName, index) => {
|
|
262
|
-
const status = !!index ? 'end' : 'start';
|
|
263
|
-
this.formio.on(eventName, () => this.ngZone.run(() => this.fileUploadingStatus.emit(status)));
|
|
264
|
-
});
|
|
265
|
-
this.formio.on('submit', (submission, saved) => this.ngZone.run(() => this.submitForm(submission, saved)));
|
|
266
|
-
this.formio.on('error', (err) => this.ngZone.run(() => {
|
|
267
|
-
this.submissionSuccess = false;
|
|
268
|
-
return this.onError(err);
|
|
269
|
-
}));
|
|
270
|
-
this.formio.on('render', () => this.ngZone.run(() => this.render.emit()));
|
|
271
|
-
this.formio.on('formLoad', (loadedForm) => this.ngZone.run(() => this.formLoad.emit(loadedForm)));
|
|
272
|
-
return this.formio.ready.then(() => {
|
|
273
|
-
this.ngZone.run(() => {
|
|
274
|
-
this.isLoading = false;
|
|
275
|
-
this.ready.emit(this);
|
|
276
|
-
this.formioReadyResolve(this.formio);
|
|
277
|
-
if (this.formio.submissionReady) {
|
|
278
|
-
this.formio.submissionReady.then((submission) => {
|
|
279
|
-
this.submissionLoad.emit(submission);
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
return this.formio;
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
initialize() {
|
|
287
|
-
if (this.initialized) {
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
const extraTags = this.customTags ? this.customTags.tags : [];
|
|
291
|
-
const defaultOptions = {
|
|
292
|
-
errors: {
|
|
293
|
-
message: 'Please fix the following errors before submitting.'
|
|
294
|
-
},
|
|
295
|
-
alerts: {
|
|
296
|
-
submitMessage: 'Submission Complete.'
|
|
297
|
-
},
|
|
298
|
-
disableAlerts: false,
|
|
299
|
-
hooks: {
|
|
300
|
-
beforeSubmit: null
|
|
301
|
-
},
|
|
302
|
-
sanitizeConfig: {
|
|
303
|
-
addTags: extraTags
|
|
304
|
-
},
|
|
305
|
-
alertsPosition: AlertsPosition.top,
|
|
306
|
-
};
|
|
307
|
-
this.options = Object.assign(defaultOptions, this.options);
|
|
308
|
-
if (this.options.disableAlerts) {
|
|
309
|
-
this.options.alertsPosition = AlertsPosition.none;
|
|
310
|
-
}
|
|
311
|
-
this.initialized = true;
|
|
312
|
-
}
|
|
313
|
-
ngOnInit() {
|
|
314
|
-
Evaluator.noeval = this.noeval;
|
|
315
|
-
this.initialize();
|
|
316
|
-
if (this.language) {
|
|
317
|
-
if (typeof this.language === 'string') {
|
|
318
|
-
this.formio.language = this.language;
|
|
319
|
-
}
|
|
320
|
-
else {
|
|
321
|
-
this.language.subscribe((lang) => {
|
|
322
|
-
this.formio.language = lang;
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
if (this.refresh) {
|
|
327
|
-
this.refresh.subscribe((refresh) => this.onRefresh(refresh));
|
|
328
|
-
}
|
|
329
|
-
if (this.error) {
|
|
330
|
-
this.error.subscribe((err) => this.onError(err));
|
|
331
|
-
}
|
|
332
|
-
if (this.success) {
|
|
333
|
-
this.success.subscribe((message) => {
|
|
334
|
-
this.alerts.setAlert({
|
|
335
|
-
type: 'success',
|
|
336
|
-
message: message || get(this.options, 'alerts.submitMessage')
|
|
337
|
-
});
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
if (this.src) {
|
|
341
|
-
if (!this.service) {
|
|
342
|
-
this.service = new FormioService(this.src);
|
|
343
|
-
}
|
|
344
|
-
this.isLoading = true;
|
|
345
|
-
this.service.loadForm({ params: { live: 1 } }).subscribe((form) => {
|
|
346
|
-
if (form && form.components) {
|
|
347
|
-
this.ngZone.runOutsideAngular(() => {
|
|
348
|
-
this.setForm(form);
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
// if a submission is also provided.
|
|
352
|
-
if (isEmpty(this.submission) &&
|
|
353
|
-
this.service &&
|
|
354
|
-
this.service.formio.submissionId) {
|
|
355
|
-
this.service.loadSubmission().subscribe((submission) => {
|
|
356
|
-
if (this.readOnly) {
|
|
357
|
-
this.formio.options.readOnly = true;
|
|
358
|
-
}
|
|
359
|
-
this.submission = this.formio.submission = submission;
|
|
360
|
-
}, err => this.onError(err));
|
|
361
|
-
}
|
|
362
|
-
}, err => this.onError(err));
|
|
363
|
-
}
|
|
364
|
-
if (this.url && !this.service) {
|
|
365
|
-
this.service = new FormioService(this.url);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
ngOnDestroy() {
|
|
369
|
-
if (this.formio) {
|
|
370
|
-
this.formio.destroy();
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
onRefresh(refresh) {
|
|
374
|
-
this.formioReady.then(() => {
|
|
375
|
-
if (refresh.form) {
|
|
376
|
-
this.formio.setForm(refresh.form).then(() => {
|
|
377
|
-
if (refresh.submission) {
|
|
378
|
-
this.formio.setSubmission(refresh.submission);
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
else if (refresh.submission) {
|
|
383
|
-
this.formio.setSubmission(refresh.submission);
|
|
384
|
-
}
|
|
385
|
-
else {
|
|
386
|
-
switch (refresh.property) {
|
|
387
|
-
case 'submission':
|
|
388
|
-
this.formio.submission = refresh.value;
|
|
389
|
-
break;
|
|
390
|
-
case 'form':
|
|
391
|
-
this.formio.form = refresh.value;
|
|
392
|
-
break;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
ngOnChanges(changes) {
|
|
398
|
-
Evaluator.noeval = this.noeval;
|
|
399
|
-
this.initialize();
|
|
400
|
-
if (changes.form && changes.form.currentValue) {
|
|
401
|
-
this.ngZone.runOutsideAngular(() => {
|
|
402
|
-
this.setForm(changes.form.currentValue);
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
this.formioReady.then(() => {
|
|
406
|
-
if (changes.submission && changes.submission.currentValue) {
|
|
407
|
-
this.formio.setSubmission(changes.submission.currentValue, {
|
|
408
|
-
fromSubmission: false,
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
if (changes.hideComponents && changes.hideComponents.currentValue) {
|
|
412
|
-
const hiddenComponents = changes.hideComponents.currentValue;
|
|
413
|
-
this.formio.options.hide = hiddenComponents;
|
|
414
|
-
this.formio.everyComponent((component) => {
|
|
415
|
-
component.options.hide = hiddenComponents;
|
|
416
|
-
if (hiddenComponents.includes(component.component.key)) {
|
|
417
|
-
component.visible = false;
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
onPrevPage(data) {
|
|
424
|
-
this.alerts.setAlerts([]);
|
|
425
|
-
this.prevPage.emit(data);
|
|
426
|
-
}
|
|
427
|
-
onNextPage(data) {
|
|
428
|
-
this.alerts.setAlerts([]);
|
|
429
|
-
this.nextPage.emit(data);
|
|
430
|
-
}
|
|
431
|
-
onSubmit(submission, saved, noemit) {
|
|
432
|
-
this.submitting = false;
|
|
433
|
-
this.submissionSuccess = true;
|
|
434
|
-
this.formio.setValue(fastCloneDeep(submission), {
|
|
435
|
-
noValidate: true,
|
|
436
|
-
noCheck: true
|
|
437
|
-
});
|
|
438
|
-
if (saved) {
|
|
439
|
-
this.formio.emit('submitDone', submission);
|
|
440
|
-
}
|
|
441
|
-
if (!noemit) {
|
|
442
|
-
this.submit.emit(submission);
|
|
443
|
-
}
|
|
444
|
-
if (!this.success) {
|
|
445
|
-
this.alerts.setAlert({
|
|
446
|
-
type: 'success',
|
|
447
|
-
message: get(this.options, 'alerts.submitMessage')
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
onError(err) {
|
|
452
|
-
this.alerts.setAlerts([]);
|
|
453
|
-
this.submitting = false;
|
|
454
|
-
this.isLoading = false;
|
|
455
|
-
if (!err) {
|
|
456
|
-
return;
|
|
457
|
-
}
|
|
458
|
-
// Make sure it is an array.
|
|
459
|
-
const errors = Array.isArray(err) ? err : [err];
|
|
460
|
-
// Emit these errors again.
|
|
461
|
-
this.errorChange.emit(errors);
|
|
462
|
-
if (err.silent) {
|
|
463
|
-
return;
|
|
464
|
-
}
|
|
465
|
-
if (this.formio && errors.length) {
|
|
466
|
-
this.formio.emit('submitError', errors);
|
|
467
|
-
}
|
|
468
|
-
// Iterate through each one and set the alerts array.
|
|
469
|
-
errors.forEach((error) => {
|
|
470
|
-
const { message, paths, } = error
|
|
471
|
-
? error.details
|
|
472
|
-
? {
|
|
473
|
-
message: error.details.map((detail) => detail.message),
|
|
474
|
-
paths: error.details.map((detail) => detail.path),
|
|
475
|
-
}
|
|
476
|
-
: {
|
|
477
|
-
message: error.message || error.toString(),
|
|
478
|
-
paths: error.path ? [error.path] : [],
|
|
479
|
-
}
|
|
480
|
-
: {
|
|
481
|
-
message: '',
|
|
482
|
-
paths: [],
|
|
483
|
-
};
|
|
484
|
-
let shouldErrorDisplay = true;
|
|
485
|
-
if (this.formio) {
|
|
486
|
-
paths.forEach((path, index) => {
|
|
487
|
-
const component = this.formio.getComponent(path);
|
|
488
|
-
if (component) {
|
|
489
|
-
const components = Array.isArray(component) ? component : [component];
|
|
490
|
-
const messageText = Array.isArray(message) ? message[index] : message;
|
|
491
|
-
components.forEach((comp) => comp.setCustomValidity(messageText, true));
|
|
492
|
-
this.alerts.addAlert({
|
|
493
|
-
type: 'danger',
|
|
494
|
-
message: message[index],
|
|
495
|
-
component,
|
|
496
|
-
});
|
|
497
|
-
shouldErrorDisplay = false;
|
|
498
|
-
}
|
|
499
|
-
});
|
|
500
|
-
if (window.VPAT_ENABLED) {
|
|
501
|
-
if (typeof error === 'string' && this.formio.components) {
|
|
502
|
-
this.formio.components.forEach((comp) => {
|
|
503
|
-
if (comp && comp.type !== 'button') {
|
|
504
|
-
comp.setCustomValidity(message, true);
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
if (!this.noAlerts) {
|
|
510
|
-
this.formio.showErrors();
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
if (shouldErrorDisplay) {
|
|
514
|
-
this.alerts.addAlert({
|
|
515
|
-
type: 'danger',
|
|
516
|
-
message,
|
|
517
|
-
component: error.component,
|
|
518
|
-
});
|
|
519
|
-
}
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
focusOnComponet(key) {
|
|
523
|
-
if (this.formio) {
|
|
524
|
-
this.formio.focusOnComponent(key);
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
submitExecute(submission, saved = false) {
|
|
528
|
-
if (this.service && !this.url && !saved) {
|
|
529
|
-
this.service
|
|
530
|
-
.saveSubmission(submission)
|
|
531
|
-
.subscribe((sub) => this.onSubmit(sub, true), err => this.onError(err));
|
|
532
|
-
}
|
|
533
|
-
else {
|
|
534
|
-
this.onSubmit(submission, false);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
submitForm(submission, saved = false) {
|
|
538
|
-
// Keep double submits from occurring...
|
|
539
|
-
if (this.submitting) {
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
this.formio.setMetadata(submission);
|
|
543
|
-
this.submissionSuccess = false;
|
|
544
|
-
this.submitting = true;
|
|
545
|
-
this.beforeSubmit.emit(submission);
|
|
546
|
-
// if they provide a beforeSubmit hook, then allow them to alter the submission asynchronously
|
|
547
|
-
// or even provide a custom Error method.
|
|
548
|
-
const beforeSubmit = get(this.options, 'hooks.beforeSubmit');
|
|
549
|
-
if (beforeSubmit) {
|
|
550
|
-
beforeSubmit(submission, (err, sub) => {
|
|
551
|
-
if (err) {
|
|
552
|
-
this.onError(err);
|
|
553
|
-
return;
|
|
554
|
-
}
|
|
555
|
-
this.submitExecute(sub, saved);
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
else {
|
|
559
|
-
this.submitExecute(submission, saved);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
onChange(value, flags, isModified) {
|
|
563
|
-
if (this.watchSubmissionErrors && !this.submissionSuccess) {
|
|
564
|
-
const errors = get(this, 'formio.errors', []);
|
|
565
|
-
const alerts = get(this, 'alerts.alerts', []);
|
|
566
|
-
const submitted = get(this, 'formio.submitted', false);
|
|
567
|
-
if (submitted && (errors.length || alerts.length)) {
|
|
568
|
-
this.onError(errors);
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
return this.change.emit(Object.assign(Object.assign({}, value), { flags, isModified }));
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
FormioBaseComponent.decorators = [
|
|
575
|
-
{ type: Component, args: [{
|
|
576
|
-
template: ''
|
|
577
|
-
},] }
|
|
578
|
-
];
|
|
579
|
-
FormioBaseComponent.ctorParameters = () => [
|
|
580
|
-
{ type: NgZone },
|
|
581
|
-
{ type: FormioAppConfig, decorators: [{ type: Optional }] },
|
|
582
|
-
{ type: CustomTagsService, decorators: [{ type: Optional }] }
|
|
583
|
-
];
|
|
584
|
-
FormioBaseComponent.propDecorators = {
|
|
585
|
-
form: [{ type: Input }],
|
|
586
|
-
submission: [{ type: Input }],
|
|
587
|
-
src: [{ type: Input }],
|
|
588
|
-
url: [{ type: Input }],
|
|
589
|
-
service: [{ type: Input }],
|
|
590
|
-
options: [{ type: Input }],
|
|
591
|
-
noeval: [{ type: Input }],
|
|
592
|
-
formioOptions: [{ type: Input }],
|
|
593
|
-
renderOptions: [{ type: Input }],
|
|
594
|
-
readOnly: [{ type: Input }],
|
|
595
|
-
viewOnly: [{ type: Input }],
|
|
596
|
-
hideComponents: [{ type: Input }],
|
|
597
|
-
refresh: [{ type: Input }],
|
|
598
|
-
error: [{ type: Input }],
|
|
599
|
-
success: [{ type: Input }],
|
|
600
|
-
language: [{ type: Input }],
|
|
601
|
-
hooks: [{ type: Input }],
|
|
602
|
-
renderer: [{ type: Input }],
|
|
603
|
-
watchSubmissionErrors: [{ type: Input }],
|
|
604
|
-
render: [{ type: Output }],
|
|
605
|
-
customEvent: [{ type: Output }],
|
|
606
|
-
fileUploadingStatus: [{ type: Output }],
|
|
607
|
-
submit: [{ type: Output }],
|
|
608
|
-
prevPage: [{ type: Output }],
|
|
609
|
-
nextPage: [{ type: Output }],
|
|
610
|
-
beforeSubmit: [{ type: Output }],
|
|
611
|
-
change: [{ type: Output }],
|
|
612
|
-
invalid: [{ type: Output }],
|
|
613
|
-
errorChange: [{ type: Output }],
|
|
614
|
-
formLoad: [{ type: Output }],
|
|
615
|
-
submissionLoad: [{ type: Output }],
|
|
616
|
-
ready: [{ type: Output }],
|
|
617
|
-
formioElement: [{ type: ViewChild, args: ['formio', { static: true },] }]
|
|
618
|
-
};
|
|
619
|
-
|
|
620
|
-
/* tslint:disable */
|
|
621
|
-
/* tslint:enable */
|
|
622
|
-
class FormioComponent extends FormioBaseComponent {
|
|
623
|
-
constructor(ngZone, config, customTags) {
|
|
624
|
-
super(ngZone, config, customTags);
|
|
625
|
-
this.ngZone = ngZone;
|
|
626
|
-
this.config = config;
|
|
627
|
-
this.customTags = customTags;
|
|
628
|
-
if (this.config) {
|
|
629
|
-
Formio.setBaseUrl(this.config.apiUrl);
|
|
630
|
-
Formio.setProjectUrl(this.config.appUrl);
|
|
631
|
-
}
|
|
632
|
-
else {
|
|
633
|
-
console.warn('You must provide an AppConfig within your application!');
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
getRenderer() {
|
|
637
|
-
return this.renderer || Form;
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
FormioComponent.decorators = [
|
|
641
|
-
{ type: Component, args: [{
|
|
642
|
-
selector: 'formio',
|
|
643
|
-
template: "<div role=\"form\" [attr.aria-label]=\"label\">\n <div *ngIf=\"isLoading\" style=\"position:relative;height:200px\">\n <formio-loader [isLoading]=\"isLoading\"></formio-loader>\n </div>\n <formio-alerts *ngIf=\"this.options.alertsPosition === AlertsPosition.top || this.options.alertsPosition === AlertsPosition.both\" (focusComponent)=\"focusOnComponet($event)\" [alerts]=\"alerts\"></formio-alerts>\n <div #formio></div>\n <formio-alerts *ngIf=\"this.options.alertsPosition === AlertsPosition.bottom || this.options.alertsPosition === AlertsPosition.both\" (focusComponent)=\"focusOnComponet($event)\" [alerts]=\"alerts\"></formio-alerts>\n</div>\n",
|
|
644
|
-
encapsulation: ViewEncapsulation.None,
|
|
645
|
-
styles: ["@charset \"UTF-8\";.choices{position:relative;margin-bottom:24px;font-size:16px}.choices:focus{outline:0}.choices:last-child{margin-bottom:0}.choices.is-disabled .choices__inner,.choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none}.choices.is-disabled .choices__item{cursor:not-allowed}.choices [hidden]{display:none!important}.choices[data-type*=select-one]{cursor:pointer}.choices[data-type*=select-one] .choices__inner{padding-bottom:7.5px}.choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;margin:0}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:.5}.choices[data-type*=select-one] .choices__button:focus,.choices[data-type*=select-one] .choices__button:hover{opacity:1}.choices[data-type*=select-one] .choices__button:focus{box-shadow:0 0 0 2px #00bcd4}.choices[data-type*=select-one] .choices__item[data-value=\"\"] .choices__button{display:none}.choices[data-type*=select-one]:after{content:\"\";height:0;width:0;border-style:solid;border-color:#333 transparent transparent;border-width:5px;position:absolute;right:11.5px;top:50%;margin-top:-2.5px;pointer-events:none}.choices[data-type*=select-one].is-open:after{border-color:transparent transparent #333;margin-top:-7.5px}.choices[data-type*=select-one][dir=rtl]:after{left:11.5px;right:auto}.choices[data-type*=select-one][dir=rtl] .choices__button{right:auto;left:0;margin-left:25px;margin-right:0}.choices[data-type*=select-multiple] .choices__inner,.choices[data-type*=text] .choices__inner{cursor:text}.choices[data-type*=select-multiple] .choices__button,.choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin:0 -4px 0 8px;padding-left:16px;border-left:1px solid #008fa1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:.75;border-radius:0}.choices[data-type*=select-multiple] .choices__button:focus,.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=text] .choices__button:focus,.choices[data-type*=text] .choices__button:hover{opacity:1}.choices__inner{display:inline-block;vertical-align:top;width:100%;background-color:#f9f9f9;padding:7.5px 7.5px 3.75px;border:1px solid #ddd;border-radius:2.5px;font-size:14px;min-height:44px;overflow:hidden}.is-focused .choices__inner,.is-open .choices__inner{border-color:#b7b7b7}.is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.choices__list{margin:0;padding-left:0;list-style:none}.choices__list--single{display:inline-block;padding:4px 16px 4px 4px;width:100%}[dir=rtl] .choices__list--single{padding-right:4px;padding-left:16px}.choices__list--single .choices__item{width:100%}.choices__list--multiple{display:inline}.choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#00bcd4;border:1px solid #00a5bb;color:#fff;word-break:break-all;box-sizing:border-box}.choices__list--multiple .choices__item[data-deletable]{padding-right:5px}[dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.choices__list--multiple .choices__item.is-highlighted{background-color:#00a5bb;border:1px solid #008fa1}.is-disabled .choices__list--multiple .choices__item{background-color:#aaa;border:1px solid #919191}.choices__list--dropdown{visibility:hidden;z-index:1;position:absolute;width:100%;background-color:#fff;border:1px solid #ddd;top:100%;margin-top:-1px;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;overflow:hidden;word-break:break-all;will-change:visibility}.choices__list--dropdown.is-active{visibility:visible}.is-open .choices__list--dropdown{border-color:#b7b7b7}.is-flipped .choices__list--dropdown{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:.25rem .25rem 0 0}.choices__list--dropdown .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position}.choices__list--dropdown .choices__item{position:relative;padding:10px;font-size:14px}[dir=rtl] .choices__list--dropdown .choices__item{text-align:right}@media (min-width:640px){.choices__list--dropdown .choices__item--selectable{padding-right:100px}.choices__list--dropdown .choices__item--selectable:after{content:attr(data-select-text);font-size:12px;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%)}[dir=rtl] .choices__list--dropdown .choices__item--selectable{text-align:right;padding-left:100px;padding-right:10px}[dir=rtl] .choices__list--dropdown .choices__item--selectable:after{right:auto;left:10px}}.choices__list--dropdown .choices__item--selectable.is-highlighted{background-color:#f2f2f2}.choices__list--dropdown .choices__item--selectable.is-highlighted:after{opacity:.5}.choices__item{cursor:default}.choices__item--selectable{cursor:pointer}.choices__item--disabled{cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;opacity:.5}.choices__heading{font-weight:600;font-size:12px;padding:10px;border-bottom:1px solid #f7f7f7;color:gray}.choices__button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.choices__button:focus,.choices__input:focus{outline:0}.choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:14px;margin-bottom:5px;border:0;border-radius:0;max-width:100%;padding:4px 0 4px 2px}[dir=rtl] .choices__input{padding-right:2px;padding-left:0}.choices__placeholder{opacity:.5}dialog{position:absolute;left:0;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border:solid;padding:1em;background:#fff;color:#000;display:block}dialog:not([open]){display:none}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.1)}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}dialog.fixed{position:fixed;top:50%;transform:translateY(-50%)}.formio-loader{position:relative;min-height:60px}.loader-wrapper{z-index:1000;position:absolute;top:0;left:0;bottom:0;right:0;height:120px;background-color:#0000}.loader{position:absolute;left:50%;top:50%;margin-left:-30px;margin-top:-30px;z-index:10000;display:inline-block;border:6px solid #f3f3f3;border-top:6px solid #3498db;border-radius:50%;width:60px;height:60px;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.formio-form{position:relative;min-height:80px}.formio-error-wrapper,.formio-warning-wrapper{padding:1em}.formio-error-wrapper{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.formio-warning-wrapper{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.formio-disabled-input .form-control.flatpickr-input{background-color:#eee}.builder-component.has-error .invalid-feedback,.formio-component.alert-danger .invalid-feedback,.formio-component.has-error .invalid-feedback,.formio-component.has-message .invalid-feedback{display:block;color:inherit;margin-top:4px}.formio-errors .error{color:#dc3545}.formio-errors .warning{color:#856404}.formio-errors .info{color:#004085}.formio-wysiwyg-editor{min-height:200px;background-color:#fff}.has-feedback .form-control{padding-right:10px}.has-feedback .form-control[type=hidden]{padding-right:0}.has-error.bg-danger{padding:4px}.ql-source:after{content:\"[source]\";white-space:nowrap}.quill-source-code{width:100%;margin:0;background:#1d1d1d;box-sizing:border-box;color:#ccc;font-size:15px;outline:0;padding:20px;line-height:24px;font-family:Consolas,Menlo,Monaco,\"Courier New\",monospace;position:absolute;top:0;bottom:0;border:none;display:none}.formio-component-tags tags{background-color:#fff}.field-required:after,.tab-error:after{content:\" *\";color:red}.field-required:after{position:relative;z-index:10}.glyphicon-spin{-webkit-animation:formio-spin 1s infinite linear;animation:formio-spin 1s infinite linear}@-webkit-keyframes formio-spin{0%{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes formio-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.button-icon-right{margin-left:5px}.formio-component-submit .submit-success:after{content:\"\\2713\";position:relative;right:-4px;top:1px;line-height:1}.formio-component-submit .submit-fail:after{content:\"\\2717\";position:relative;right:-4px;top:1px;line-height:1}.formio-component-submit .submit-fail[disabled]{opacity:1}.form-control.flatpickr-input{background-color:#fff}td>.form-group{margin-bottom:0}.signature-pad-body{overflow:hidden;position:relative}.signature-pad-canvas{border-radius:4px;box-shadow:0 0 5px #00000005 inset;border:1px solid #f4f4f4}.btn.signature-pad-refresh{position:absolute;left:0;top:0;z-index:1000;padding:3px;line-height:0}[dir=rtl] .btn.signature-pad-refresh{left:unset;right:0}.formio-component-multiple .choices__input{width:100%}.choices__list--dropdown .choices__item--selectable{padding-right:0}.signature-pad-refresh img{height:1.2em}.signature-pad-footer{text-align:center;color:#c3c3c3}.choices__list--dropdown{z-index:100}.choices__list--multiple .choices__item{border-radius:0;padding:2px 8px;line-height:1em;margin-bottom:6px}.choices__list--single{padding:0}.choices__item.choices__item--selectable{white-space:nowrap;overflow:hidden;padding-right:25px;text-overflow:ellipsis}.choices__input{padding:2px}.choices[dir=rtl]>*{text-align:right}.choices[dir=rtl] .choices__list--multiple .choices__item[data-deletable]{padding-left:5px;float:right}.choices[dir=rtl] .choices__list--multiple .choices__item[data-deletable] .choices__button{float:left;margin:0 8px 0 -4px;padding-left:unset;padding-right:16px;border-left:unset;border-right:1px solid #008fa1;overflow:hidden}.formio-component-file .fileSelector{position:relative;padding:15px;border:2px dashed #ddd;text-align:center}.formio-component-file .fileSelector .loader-wrapper{display:none;width:100%;height:100%;background-color:#0000001a}.formio-component-file .fileSelector .loader-wrapper .loader{height:45px;width:45px;margin-top:-23px;margin-left:-23px}.formio-component-file .fileSelector.fileDragOver{border-color:#127abe}.formio-component-file .fileSelector .fa,.formio-component-file .fileSelector .glyphicon{font-size:20px;margin-right:5px}[dir=rtl] .formio-component-file .fileSelector .fa,[dir=rtl] .formio-component-file .fileSelector .glyphicon{margin-right:unset;margin-left:5px}.formio-component-file .fileSelector .browse{cursor:pointer}@-webkit-keyframes formio-dialog-fadeout{0%{opacity:1}to{opacity:0}}@keyframes formio-dialog-fadeout{0%{opacity:1}to{opacity:0}}@-webkit-keyframes formio-dialog-fadein{0%{opacity:0}to{opacity:1}}@keyframes formio-dialog-fadein{0%{opacity:0}to{opacity:1}}.formio-dialog{box-sizing:border-box;font-size:.8em;color:#666}.formio-dialog.formio-modaledit-dialog{font-size:inherit}.formio-dialog *,.formio-dialog :after,.formio-dialog :before{box-sizing:inherit}.formio-dialog{position:fixed;overflow:auto;-webkit-overflow-scrolling:touch;z-index:10000;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.4);-webkit-animation:formio-dialog-fadein .5s;animation:formio-dialog-fadein .5s}.formio-dialog.formio-dialog-disabled-animation,.formio-dialog.formio-dialog-disabled-animation .formio-dialog-content,.formio-dialog.formio-dialog-disabled-animation .formio-dialog-overlay{-webkit-animation:none!important;animation:none!important}.formio-dialog-overlay{position:fixed;top:0;right:0;bottom:0;left:0;-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadein .5s;animation:formio-dialog-fadein .5s;margin-right:15px;background:0 0}.formio-dialog-no-overlay{pointer-events:none}.formio-dialog.formio-dialog-closing .formio-dialog-overlay{-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadeout .5s;animation:formio-dialog-fadeout .5s}.formio-dialog-content{background:#fff;-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadein .5s;animation:formio-dialog-fadein .5s;pointer-events:all;overflow:auto}.formio-component-modal-wrapper-select .formio-dialog-content{overflow:visible;overflow:initial}.formio-dialog.formio-dialog-closing .formio-dialog-content{-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadeout .5s;animation:formio-dialog-fadeout .5s}.formio-dialog-close:before{font-family:Helvetica,Arial,sans-serif;content:\"\\d7\";cursor:pointer}body.formio-dialog-open,html.formio-dialog-open{overflow:hidden}.formio-dialog .tab-content{padding-top:12px}.formio-dialog-close{z-index:1000}@-webkit-keyframes formio-dialog-flyin{0%{opacity:0;transform:translateY(-40px)}to{opacity:1;transform:translateY(0)}}@keyframes formio-dialog-flyin{0%{opacity:0;transform:translateY(-40px)}to{opacity:1;transform:translateY(0)}}@-webkit-keyframes formio-dialog-flyout{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-40px)}}@keyframes formio-dialog-flyout{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-40px)}}.formio-dialog.formio-dialog-theme-default{padding-bottom:160px;padding-top:160px}.formio-dialog.formio-dialog-theme-default.formio-dialog-closing .formio-dialog-content{-webkit-animation:formio-dialog-flyout .5s;animation:formio-dialog-flyout .5s}.formio-dialog.formio-dialog-theme-default .formio-dialog-content{-webkit-animation:formio-dialog-flyin .5s;animation:formio-dialog-flyin .5s;background:#f0f0f0;border-radius:5px;font-family:Helvetica,sans-serif;font-size:1.1em;line-height:1.5em;margin:0 auto;max-width:100%;padding:1em;position:relative;width:80%}.formio-dialog.formio-dialog-theme-default .formio-dialog-close{border:none;background:0 0;cursor:pointer;position:absolute;right:0;top:0;z-index:100}.formio-clickable{cursor:pointer}.component-settings .nav>li>a{padding:8px 10px}.formio-dialog.formio-dialog-theme-default .formio-dialog-close:before{display:block;padding:3px;background:0 0;color:#bbb;content:\"\\d7\";font-size:26px;font-weight:400;line-height:26px;text-align:center}.formio-dialog.formio-dialog-theme-default .formio-dialog-close:active:before,.formio-dialog.formio-dialog-theme-default .formio-dialog-close:hover:before{color:#777}.formio-dialog.formio-dialog-theme-default .formio-dialog-message{margin-bottom:.5em}.formio-dialog.formio-dialog-theme-default .formio-dialog-input{margin-bottom:1em}.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=email],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=password],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=text],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=url],.formio-dialog.formio-dialog-theme-default .formio-dialog-input textarea{background:#fff;border:0;border-radius:3px;font-family:inherit;font-size:inherit;font-weight:inherit;margin:0 0 .25em;min-height:2.5em;padding:.25em .67em;width:100%}.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=email]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=password]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=text]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=url]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input textarea:focus{box-shadow:inset 0 0 0 2px #8dbdf1;outline:0}.formio-dialog.formio-dialog-theme-default .formio-dialog-buttons{*zoom:1}.formio-dialog.formio-dialog-theme-default .formio-dialog-buttons:after{content:\"\";display:table;clear:both}.formio-dialog.formio-dialog-theme-default .formio-dialog-button{border:0;border-radius:3px;cursor:pointer;float:right;font-family:inherit;font-size:.8em;letter-spacing:.1em;line-height:1em;margin:0 0 0 .5em;padding:.75em 2em;text-transform:uppercase}.formio-dialog.formio-dialog-theme-default .formio-dialog-button:focus{-webkit-animation:formio-dialog-pulse 1.1s infinite;animation:formio-dialog-pulse 1.1s infinite;outline:0}@media (max-width:568px){.formio-dialog.formio-dialog-theme-default .formio-dialog-button:focus{-webkit-animation:none;animation:none}}.formio-dialog.formio-dialog-theme-default .formio-dialog-button.formio-dialog-button-primary{background:#3288e6;color:#fff}.formio-dialog.formio-dialog-theme-default .formio-dialog-button.formio-dialog-button-secondary{background:#e0e0e0;color:#777}.formio-dialog-content .panel{margin:0}.formio-placeholder{position:absolute;color:#999}.formio-dialog .formio-dialog-close{cursor:pointer}.formio-iframe{border:none;width:100%;height:1000px}.inline-form-button{margin-right:10px}.tooltip{opacity:1}.tooltip[x-placement=right] .tooltip-arrow{border-right:5px solid #000}.tooltip[x-placement=right] .tooltip-inner{margin-left:8px}.control-label--bottom{margin-bottom:0;margin-top:5px}.formio-component-label-hidden{position:relative}.formio-hidden{margin:0}.control-label--hidden{position:absolute;top:6px;right:5px;font-size:1.5em}.formio-component-datetime .control-label--hidden.field-required{right:45px;z-index:3}.formio-component-selectboxes .control-label--hidden.field-required,.formio-component-survey .control-label--hidden.field-required{top:0}.formio-component-resource .control-label--hidden.field-required,.formio-component-select .control-label--hidden.field-required{right:40px;z-index:2}.formio-component-datasource,.formio-component-hidden:not(.formio-component-checkbox){margin-bottom:0}.checkbox-inline label,.radio-inline label{font-weight:400;cursor:pointer}.editgrid-listgroup{margin-bottom:10px}.tree-listgroup{flex-direction:row}.formio-component-submit button[disabled]+.has-error{display:block}.formio-choices.form-group{margin-bottom:0}.formio-choices[data-type=select-multiple] .form-control{height:auto}.form-control.formio-multiple-mask-select{width:15%;z-index:4}.form-control.formio-multiple-mask-input{width:85%}.input-group.formio-multiple-mask-container{width:100%}.formio-component .table{margin-bottom:0}.formio-hide-label-panel-tooltip{margin-top:-10px;margin-left:-10px}.is-disabled .choices__list--multiple .choices__item{padding:5px 10px}.is-disabled .choices__list--multiple .choices__item .choices__button{display:none}.formio-collapse-icon{cursor:pointer;margin-right:4px}[dir=rtl] .formio-collapse-icon{margin-right:unset;margin-left:4px}.formio-component-dateTime .form-control[type=datetime-local]~.input-group-addon,.formio-component-datetime .form-control[type=datetime-local]~.input-group-addon{width:auto}.formio-component-datagrid .formio-datagrid-remove{position:absolute;top:0;right:0;visibility:hidden;opacity:0;transition:opacity .2s linear,visibility 0s .2s}.formio-component-datagrid .datagrid-table>tbody>tr>td:last-child{position:relative}.formio-component-datagrid .datagrid-table>tbody>tr:hover>td:last-child .formio-datagrid-remove{visibility:visible;opacity:1;transition:visibility 0s,opacity .2s linear}.formio-component-modaledit .formio-modaledit-view-container{position:relative;border:1px solid #ddd;min-height:34px;padding:6px 12px;cursor:text}td .formio-component-modaledit .formio-modaledit-view-container{padding:0;border-style:none}.formio-component-modaledit .formio-modaledit-edit{position:absolute;top:0;left:0;visibility:hidden;opacity:0;transition:opacity .2s linear,visibility 0s .2s}.formio-component-modaledit .formio-modaledit-view-container:hover .formio-modaledit-edit{visibility:visible;opacity:1;transition:visibility 0s,opacity .2s linear}.formio-modaledit-dialog .formio-modaledit-close{position:absolute;top:100%;right:0;border-radius:0}.reset-margins a,.reset-margins abbr,.reset-margins acronym,.reset-margins address,.reset-margins applet,.reset-margins article,.reset-margins aside,.reset-margins audio,.reset-margins b,.reset-margins big,.reset-margins blockquote,.reset-margins body,.reset-margins canvas,.reset-margins caption,.reset-margins center,.reset-margins cite,.reset-margins code,.reset-margins dd,.reset-margins del,.reset-margins details,.reset-margins dfn,.reset-margins div,.reset-margins dl,.reset-margins dt,.reset-margins em,.reset-margins embed,.reset-margins fieldset,.reset-margins figcaption,.reset-margins figure,.reset-margins footer,.reset-margins form,.reset-margins h1,.reset-margins h2,.reset-margins h3,.reset-margins h4,.reset-margins h5,.reset-margins h6,.reset-margins header,.reset-margins hgroup,.reset-margins html,.reset-margins i,.reset-margins iframe,.reset-margins img,.reset-margins ins,.reset-margins kbd,.reset-margins label,.reset-margins legend,.reset-margins li,.reset-margins mark,.reset-margins menu,.reset-margins nav,.reset-margins object,.reset-margins ol,.reset-margins output,.reset-margins p,.reset-margins pre,.reset-margins q,.reset-margins ruby,.reset-margins s,.reset-margins samp,.reset-margins section,.reset-margins small,.reset-margins span,.reset-margins strike,.reset-margins strong,.reset-margins sub,.reset-margins summary,.reset-margins sup,.reset-margins table,.reset-margins tbody,.reset-margins td,.reset-margins tfoot,.reset-margins th,.reset-margins thead,.reset-margins time,.reset-margins tr,.reset-margins tt,.reset-margins u,.reset-margins ul,.reset-margins var,.reset-margins video{margin:0}.ck-body .ck.ck-balloon-panel{z-index:101000}.formio-component-select select[disabled=disabled]{-webkit-appearance:none;-moz-appearance:none;text-indent:1px;text-overflow:\"\"}.formio-component-select .choices.is-disabled[data-type*=select-one]:after,.formio-component-select div[disabled=disabled] button{display:none}.datagrid-group-label.collapsed>td{display:none}.datagrid-group-header.clickable{cursor:pointer}.datagrid-group-header.clickable .datagrid-group-label:before{display:inline-block;vertical-align:middle;content:\"\\25be\";margin:0 5px}.datagrid-group-header.clickable.collapsed .datagrid-group-label:before{content:\"\\25b8\"}.formio-component.alert-danger .help-block,.formio-component.alert-warning .help-block{color:inherit}.tree__level_even{background-color:#f6f6f6}.tree__node-content{margin-bottom:10px}.tree__node-children{margin:0}.formio-select-autocomplete-input{opacity:0;position:absolute;z-index:-1}.has-error>.help-block{margin-top:5px;margin-bottom:10px}.no-top-border-table>.table>tbody>tr:first-child>td{border-top:none}.table>tbody>tr>td.cell-align-left{text-align:left}.table>tbody>tr>td.cell-align-center{text-align:center}.table>tbody>tr>td.cell-align-center>div{margin-left:auto;margin-right:auto}.table>tbody>tr>td.cell-align-right{text-align:right}.table>tbody>tr>td.cell-align-right>div{margin-left:auto}.table-responsive[ref=component]{overflow-x:visible}.formio-component-textarea .alert .ck-editor__editable{color:inherit}.formio-component-textarea .ck.ck-editor__editable .image .ck-progress-bar{height:4px}div[data-oembed-url]{width:100%}.checkbox label.label-position-bottom,.checkbox label.label-position-left,.checkbox label.label-position-top,.radio label.label-position-bottom,.radio label.label-position-left,.radio label.label-position-top{padding-left:0}.checkbox label.label-position-bottom span,.checkbox label.label-position-top span,.radio label.label-position-bottom span,.radio label.label-position-top span{display:block}.checkbox label.label-position-bottom input[type=checkbox],.checkbox label.label-position-top input[type=checkbox],.radio label.label-position-bottom input[type=radio],.radio label.label-position-top input[type=radio]{position:relative;margin-left:0}.checkbox label.label-position-top input[type=checkbox],.radio label.label-position-top input[type=radio]{margin-top:4px}.checkbox label.label-position-bottom input[type=checkbox],.radio label.label-position-bottom input[type=radio]{margin-bottom:8px}.checkbox label.label-position-left input[type=checkbox],.radio label.label-position-left input[type=radio]{margin-left:10px}.open-modal-button{width:100%;text-align:left;white-space:normal;height:auto}.formio-component-modal-wrapper-signature .open-modal-button{text-align:center;height:100%;font-size:1.4em;padding:0;margin:0}.formio-component-content .image{display:table;clear:both;text-align:center;margin:1em auto}.formio-component-content .image>img{display:block;margin:0 auto;max-width:100%;min-width:50px}.formio-component-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}.formio-component-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.formio-component-content .image.image_resized img{width:100%}.formio-component-content .image.image_resized>figcaption{display:block}.formio-component-content .media{clear:both;margin:1em 0;display:block;min-width:15em}.formio-component-content .image-style-align-center:not(.image_resized),.formio-component-content .image-style-align-left:not(.image_resized),.formio-component-content .image-style-align-right:not(.image_resized),.formio-component-content .image-style-side:not(.image_resized){max-width:50%}.formio-component-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing)}.formio-component-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.formio-component-content .image-style-align-center{margin-left:auto;margin-right:auto}.formio-component-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.formio-component-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:solid 5px #ccc}.formio-component-content[dir=rtl] blockquote{border-left:0;border-right:solid 5px #ccc}.formio-component-content .text-tiny{font-size:.7em}.formio-component-content .text-small{font-size:.85em}.formio-component-content .text-big{font-size:1.4em}.formio-component-content .text-huge{font-size:1.8em}.formio-component-address.formio-component-label-hidden>label.field-required{z-index:1}.formio-component-address.formio-component-label-hidden>label.field-required~.address-autocomplete-container .address-autocomplete-remove-value-icon{right:20px}.address-autocomplete-container{position:relative}.address-autocomplete-container .address-autocomplete-remove-value-icon{cursor:pointer;position:absolute;margin-top:-9px;right:10px;top:50%}.address-autocomplete-container .address-autocomplete-remove-value-icon--hidden{display:none}.autocomplete{background:#fff;font:14px/22px \"-apple-system\",BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;overflow:auto;box-sizing:border-box;border:1px solid rgba(50,50,50,.6);z-index:11000}.autocomplete>div{cursor:pointer;padding:6px 10px}.autocomplete>div.selected,.autocomplete>div:hover:not(.group){background:#1e90ff;color:#fff}.field-wrapper{display:flex}.field-wrapper--reverse{flex-direction:row-reverse}.field-wrapper .field-label--right{text-align:right}.formio-component-modal-wrapper{margin-bottom:10px}.formio-component-modal-wrapper .open-modal-button{height:auto}.formio-component-modal-wrapper .component-rendering-hidden{visibility:hidden}.formio-component-textarea div.formio-editor-read-only-content[ref=input]{white-space:pre-wrap}.formio-editor-read-only-content img{max-width:100%}.formio-editor-read-only-content li[data-list=bullet]{list-style-type:none}.formio-editor-read-only-content li[data-list=bullet] .ql-ui{padding-right:.5rem}.formio-editor-read-only-content li[data-list=bullet] .ql-ui:before{content:\"\\2022\"}.formio-editor-read-only-content li[data-list=ordered]{list-style-type:none;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.formio-editor-read-only-content li[data-list=ordered] .ql-ui{padding-right:.5rem}.formio-editor-read-only-content li[data-list=ordered] .ql-ui:before{content:counter(list-0,decimal) \". \"}.formio-editor-read-only-content figure.table table{border-collapse:collapse;border-spacing:0;width:100%;height:100%;border:1px double #b3b3b3}.formio-editor-read-only-content figure.table table td,.formio-editor-read-only-content figure.table table th{min-width:2em;padding:.4em;border:1px solid #bfbfbf}.formio-component-password .pull-right:not(:last-child),.formio-component-textarea .pull-right:not(:last-child),.formio-component-textfield .pull-right:not(:last-child){padding-left:12px}.formio-form>div>nav>ul.pagination{flex-flow:wrap row}.formio-form>div>nav>ul.pagination .page-link{cursor:pointer}.pac-container{z-index:11000}[ref=buttonMessageContainer].has-error{cursor:pointer}.formio-component-textarea .formio-editor-read-only-content .text-big{font-size:1.4em}.formio-component-textarea .formio-editor-read-only-content .text-huge{font-size:1.8em}.formio-component-textarea .formio-editor-read-only-content .text-small{font-size:.85em}.formio-component-textarea .formio-editor-read-only-content .text-tiny{font-size:.7em}\n"]
|
|
646
|
-
},] }
|
|
647
|
-
];
|
|
648
|
-
FormioComponent.ctorParameters = () => [
|
|
649
|
-
{ type: NgZone },
|
|
650
|
-
{ type: FormioAppConfig, decorators: [{ type: Optional }] },
|
|
651
|
-
{ type: CustomTagsService, decorators: [{ type: Optional }] }
|
|
652
|
-
];
|
|
653
|
-
|
|
654
|
-
/* tslint:disable */
|
|
655
|
-
/* tslint:enable */
|
|
656
|
-
class FormBuilderComponent {
|
|
657
|
-
constructor(ngZone, config, customTags) {
|
|
658
|
-
this.ngZone = ngZone;
|
|
659
|
-
this.config = config;
|
|
660
|
-
this.customTags = customTags;
|
|
661
|
-
this.componentAdding = false;
|
|
662
|
-
this.noeval = false;
|
|
663
|
-
if (this.config) {
|
|
664
|
-
Formio.setBaseUrl(this.config.apiUrl);
|
|
665
|
-
Formio.setProjectUrl(this.config.appUrl);
|
|
666
|
-
}
|
|
667
|
-
else {
|
|
668
|
-
console.warn('You must provide an AppConfig within your application!');
|
|
669
|
-
}
|
|
670
|
-
this.change = new EventEmitter();
|
|
671
|
-
this.ready = new Promise((resolve) => {
|
|
672
|
-
this.readyResolve = resolve;
|
|
673
|
-
});
|
|
674
|
-
}
|
|
675
|
-
ngOnInit() {
|
|
676
|
-
Utils.Evaluator.noeval = this.noeval;
|
|
677
|
-
if (this.refresh) {
|
|
678
|
-
this.refreshSubscription = this.refresh.subscribe(() => {
|
|
679
|
-
this.ngZone.runOutsideAngular(() => {
|
|
680
|
-
this.buildForm(this.form);
|
|
681
|
-
});
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
if (this.rebuild) {
|
|
685
|
-
this.rebuild.subscribe((options) => {
|
|
686
|
-
this.ngZone.runOutsideAngular(() => {
|
|
687
|
-
this.rebuildForm(this.form, options);
|
|
688
|
-
});
|
|
689
|
-
});
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
setInstance(instance) {
|
|
693
|
-
this.formio = instance;
|
|
694
|
-
instance.off('addComponent');
|
|
695
|
-
instance.off('saveComponent');
|
|
696
|
-
instance.off('updateComponent');
|
|
697
|
-
instance.off('removeComponent');
|
|
698
|
-
instance.on('addComponent', (component, parent, path, index, isNew) => {
|
|
699
|
-
this.ngZone.run(() => {
|
|
700
|
-
if (isNew) {
|
|
701
|
-
this.componentAdding = true;
|
|
702
|
-
}
|
|
703
|
-
else {
|
|
704
|
-
this.change.emit({
|
|
705
|
-
type: 'addComponent',
|
|
706
|
-
builder: instance,
|
|
707
|
-
form: instance.schema,
|
|
708
|
-
component: component,
|
|
709
|
-
parent: parent,
|
|
710
|
-
path: path,
|
|
711
|
-
index: index
|
|
712
|
-
});
|
|
713
|
-
this.componentAdding = false;
|
|
714
|
-
}
|
|
715
|
-
});
|
|
716
|
-
});
|
|
717
|
-
instance.on('saveComponent', (component, original, parent, path, index, isNew) => {
|
|
718
|
-
this.ngZone.run(() => {
|
|
719
|
-
this.change.emit({
|
|
720
|
-
type: this.componentAdding ? 'addComponent' : 'saveComponent',
|
|
721
|
-
builder: instance,
|
|
722
|
-
form: instance.schema,
|
|
723
|
-
component: component,
|
|
724
|
-
originalComponent: original,
|
|
725
|
-
parent: parent,
|
|
726
|
-
path: path,
|
|
727
|
-
index: index,
|
|
728
|
-
isNew: isNew || false
|
|
729
|
-
});
|
|
730
|
-
this.componentAdding = false;
|
|
731
|
-
});
|
|
732
|
-
});
|
|
733
|
-
instance.on('updateComponent', (component) => {
|
|
734
|
-
this.ngZone.run(() => {
|
|
735
|
-
this.change.emit({
|
|
736
|
-
type: 'updateComponent',
|
|
737
|
-
builder: instance,
|
|
738
|
-
form: instance.schema,
|
|
739
|
-
component: component
|
|
740
|
-
});
|
|
741
|
-
});
|
|
742
|
-
});
|
|
743
|
-
instance.on('removeComponent', (component, parent, path, index) => {
|
|
744
|
-
this.ngZone.run(() => {
|
|
745
|
-
this.change.emit({
|
|
746
|
-
type: 'deleteComponent',
|
|
747
|
-
builder: instance,
|
|
748
|
-
form: instance.schema,
|
|
749
|
-
component: component,
|
|
750
|
-
parent: parent,
|
|
751
|
-
path: path,
|
|
752
|
-
index: index
|
|
753
|
-
});
|
|
754
|
-
});
|
|
755
|
-
});
|
|
756
|
-
this.ngZone.run(() => {
|
|
757
|
-
this.readyResolve(instance);
|
|
758
|
-
});
|
|
759
|
-
return instance;
|
|
760
|
-
}
|
|
761
|
-
setDisplay(display, prevDisplay) {
|
|
762
|
-
if (display && display !== prevDisplay) {
|
|
763
|
-
return this.builder.setDisplay(display).then(instance => this.setInstance(instance));
|
|
764
|
-
}
|
|
765
|
-
else {
|
|
766
|
-
return Promise.resolve();
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
buildForm(form, prevForm) {
|
|
770
|
-
if (!form || !this.builderElement || !this.builderElement.nativeElement) {
|
|
771
|
-
return;
|
|
772
|
-
}
|
|
773
|
-
if (this.builder) {
|
|
774
|
-
return this.setDisplay(form.display, prevForm === null || prevForm === void 0 ? void 0 : prevForm.display).then(() => {
|
|
775
|
-
this.builder.form = form;
|
|
776
|
-
this.builder.instance.form = form;
|
|
777
|
-
return this.builder.instance;
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
return this.rebuildForm(form);
|
|
781
|
-
}
|
|
782
|
-
rebuildForm(form, options) {
|
|
783
|
-
const Builder = this.formbuilder || FormBuilder;
|
|
784
|
-
const extraTags = this.customTags ? this.customTags.tags : [];
|
|
785
|
-
this.builder = new Builder(this.builderElement.nativeElement, form, assign({
|
|
786
|
-
icons: 'fontawesome',
|
|
787
|
-
sanitizeConfig: {
|
|
788
|
-
addTags: extraTags
|
|
789
|
-
}
|
|
790
|
-
}, options || this.options || {}));
|
|
791
|
-
return this.builder.ready.then(instance => this.setInstance(instance));
|
|
792
|
-
}
|
|
793
|
-
ngOnChanges(changes) {
|
|
794
|
-
Utils.Evaluator.noeval = this.noeval;
|
|
795
|
-
if (changes.form && changes.form.currentValue) {
|
|
796
|
-
this.ngZone.runOutsideAngular(() => {
|
|
797
|
-
this.buildForm(changes.form.currentValue || { components: [] }, changes.form.previousValue);
|
|
798
|
-
});
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
ngOnDestroy() {
|
|
802
|
-
if (this.refreshSubscription) {
|
|
803
|
-
this.refreshSubscription.unsubscribe();
|
|
804
|
-
}
|
|
805
|
-
if (this.formio) {
|
|
806
|
-
this.formio.destroy();
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
FormBuilderComponent.decorators = [
|
|
811
|
-
{ type: Component, args: [{
|
|
812
|
-
selector: 'form-builder',
|
|
813
|
-
template: "<div #builder></div>\n",
|
|
814
|
-
encapsulation: ViewEncapsulation.None,
|
|
815
|
-
styles: ["@charset \"UTF-8\";.choices{position:relative;margin-bottom:24px;font-size:16px}.choices:focus{outline:0}.choices:last-child{margin-bottom:0}.choices.is-disabled .choices__inner,.choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none}.choices.is-disabled .choices__item{cursor:not-allowed}.choices [hidden]{display:none!important}.choices[data-type*=select-one]{cursor:pointer}.choices[data-type*=select-one] .choices__inner{padding-bottom:7.5px}.choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;margin:0}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:.5}.choices[data-type*=select-one] .choices__button:focus,.choices[data-type*=select-one] .choices__button:hover{opacity:1}.choices[data-type*=select-one] .choices__button:focus{box-shadow:0 0 0 2px #00bcd4}.choices[data-type*=select-one] .choices__item[data-value=\"\"] .choices__button{display:none}.choices[data-type*=select-one]:after{content:\"\";height:0;width:0;border-style:solid;border-color:#333 transparent transparent;border-width:5px;position:absolute;right:11.5px;top:50%;margin-top:-2.5px;pointer-events:none}.choices[data-type*=select-one].is-open:after{border-color:transparent transparent #333;margin-top:-7.5px}.choices[data-type*=select-one][dir=rtl]:after{left:11.5px;right:auto}.choices[data-type*=select-one][dir=rtl] .choices__button{right:auto;left:0;margin-left:25px;margin-right:0}.choices[data-type*=select-multiple] .choices__inner,.choices[data-type*=text] .choices__inner{cursor:text}.choices[data-type*=select-multiple] .choices__button,.choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin:0 -4px 0 8px;padding-left:16px;border-left:1px solid #008fa1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:.75;border-radius:0}.choices[data-type*=select-multiple] .choices__button:focus,.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=text] .choices__button:focus,.choices[data-type*=text] .choices__button:hover{opacity:1}.choices__inner{display:inline-block;vertical-align:top;width:100%;background-color:#f9f9f9;padding:7.5px 7.5px 3.75px;border:1px solid #ddd;border-radius:2.5px;font-size:14px;min-height:44px;overflow:hidden}.is-focused .choices__inner,.is-open .choices__inner{border-color:#b7b7b7}.is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.choices__list{margin:0;padding-left:0;list-style:none}.choices__list--single{display:inline-block;padding:4px 16px 4px 4px;width:100%}[dir=rtl] .choices__list--single{padding-right:4px;padding-left:16px}.choices__list--single .choices__item{width:100%}.choices__list--multiple{display:inline}.choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#00bcd4;border:1px solid #00a5bb;color:#fff;word-break:break-all;box-sizing:border-box}.choices__list--multiple .choices__item[data-deletable]{padding-right:5px}[dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.choices__list--multiple .choices__item.is-highlighted{background-color:#00a5bb;border:1px solid #008fa1}.is-disabled .choices__list--multiple .choices__item{background-color:#aaa;border:1px solid #919191}.choices__list--dropdown{visibility:hidden;z-index:1;position:absolute;width:100%;background-color:#fff;border:1px solid #ddd;top:100%;margin-top:-1px;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;overflow:hidden;word-break:break-all;will-change:visibility}.choices__list--dropdown.is-active{visibility:visible}.is-open .choices__list--dropdown{border-color:#b7b7b7}.is-flipped .choices__list--dropdown{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:.25rem .25rem 0 0}.choices__list--dropdown .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position}.choices__list--dropdown .choices__item{position:relative;padding:10px;font-size:14px}[dir=rtl] .choices__list--dropdown .choices__item{text-align:right}@media (min-width:640px){.choices__list--dropdown .choices__item--selectable{padding-right:100px}.choices__list--dropdown .choices__item--selectable:after{content:attr(data-select-text);font-size:12px;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%)}[dir=rtl] .choices__list--dropdown .choices__item--selectable{text-align:right;padding-left:100px;padding-right:10px}[dir=rtl] .choices__list--dropdown .choices__item--selectable:after{right:auto;left:10px}}.choices__list--dropdown .choices__item--selectable.is-highlighted{background-color:#f2f2f2}.choices__list--dropdown .choices__item--selectable.is-highlighted:after{opacity:.5}.choices__item{cursor:default}.choices__item--selectable{cursor:pointer}.choices__item--disabled{cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;opacity:.5}.choices__heading{font-weight:600;font-size:12px;padding:10px;border-bottom:1px solid #f7f7f7;color:gray}.choices__button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.choices__button:focus,.choices__input:focus{outline:0}.choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:14px;margin-bottom:5px;border:0;border-radius:0;max-width:100%;padding:4px 0 4px 2px}[dir=rtl] .choices__input{padding-right:2px;padding-left:0}.choices__placeholder{opacity:.5}dialog{position:absolute;left:0;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border:solid;padding:1em;background:#fff;color:#000;display:block}dialog:not([open]){display:none}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.1)}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}dialog.fixed{position:fixed;top:50%;transform:translateY(-50%)}.gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";filter:alpha(opacity=80)}.gu-hide{display:none!important}.gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.gu-transit{opacity:.2;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)\";filter:alpha(opacity=20)}.formio-loader{position:relative;min-height:60px}.loader-wrapper{z-index:1000;position:absolute;top:0;left:0;bottom:0;right:0;height:120px;background-color:#0000}.loader{position:absolute;left:50%;top:50%;margin-left:-30px;margin-top:-30px;z-index:10000;display:inline-block;border:6px solid #f3f3f3;border-top:6px solid #3498db;border-radius:50%;width:60px;height:60px;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.formio-form{position:relative;min-height:80px}.formio-error-wrapper,.formio-warning-wrapper{padding:1em}.formio-error-wrapper{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.formio-warning-wrapper{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.formio-disabled-input .form-control.flatpickr-input{background-color:#eee}.builder-component.has-error .invalid-feedback,.formio-component.alert-danger .invalid-feedback,.formio-component.has-error .invalid-feedback,.formio-component.has-message .invalid-feedback{display:block;color:inherit;margin-top:4px}.formio-errors .error{color:#dc3545}.formio-errors .warning{color:#856404}.formio-errors .info{color:#004085}.formio-wysiwyg-editor{min-height:200px;background-color:#fff}.has-feedback .form-control{padding-right:10px}.has-feedback .form-control[type=hidden]{padding-right:0}.has-error.bg-danger{padding:4px}.ql-source:after{content:\"[source]\";white-space:nowrap}.quill-source-code{width:100%;margin:0;background:#1d1d1d;box-sizing:border-box;color:#ccc;font-size:15px;outline:0;padding:20px;line-height:24px;font-family:Consolas,Menlo,Monaco,\"Courier New\",monospace;position:absolute;top:0;bottom:0;border:none;display:none}.formio-component-tags tags{background-color:#fff}.field-required:after,.tab-error:after{content:\" *\";color:red}.field-required:after{position:relative;z-index:10}.glyphicon-spin{-webkit-animation:formio-spin 1s infinite linear;animation:formio-spin 1s infinite linear}@-webkit-keyframes formio-spin{0%{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes formio-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.button-icon-right{margin-left:5px}.formio-component-submit .submit-success:after{content:\"\\2713\";position:relative;right:-4px;top:1px;line-height:1}.formio-component-submit .submit-fail:after{content:\"\\2717\";position:relative;right:-4px;top:1px;line-height:1}.formio-component-submit .submit-fail[disabled]{opacity:1}.form-control.flatpickr-input{background-color:#fff}td>.form-group{margin-bottom:0}.signature-pad-body{overflow:hidden;position:relative}.signature-pad-canvas{border-radius:4px;box-shadow:0 0 5px #00000005 inset;border:1px solid #f4f4f4}.btn.signature-pad-refresh{position:absolute;left:0;top:0;z-index:1000;padding:3px;line-height:0}[dir=rtl] .btn.signature-pad-refresh{left:unset;right:0}.formio-component-multiple .choices__input{width:100%}.choices__list--dropdown .choices__item--selectable{padding-right:0}.signature-pad-refresh img{height:1.2em}.signature-pad-footer{text-align:center;color:#c3c3c3}.choices__list--dropdown{z-index:100}.choices__list--multiple .choices__item{border-radius:0;padding:2px 8px;line-height:1em;margin-bottom:6px}.choices__list--single{padding:0}.choices__item.choices__item--selectable{white-space:nowrap;overflow:hidden;padding-right:25px;text-overflow:ellipsis}.choices__input{padding:2px}.choices[dir=rtl]>*{text-align:right}.choices[dir=rtl] .choices__list--multiple .choices__item[data-deletable]{padding-left:5px;float:right}.choices[dir=rtl] .choices__list--multiple .choices__item[data-deletable] .choices__button{float:left;margin:0 8px 0 -4px;padding-left:unset;padding-right:16px;border-left:unset;border-right:1px solid #008fa1;overflow:hidden}.formio-component-file .fileSelector{position:relative;padding:15px;border:2px dashed #ddd;text-align:center}.formio-component-file .fileSelector .loader-wrapper{display:none;width:100%;height:100%;background-color:#0000001a}.formio-component-file .fileSelector .loader-wrapper .loader{height:45px;width:45px;margin-top:-23px;margin-left:-23px}.formio-component-file .fileSelector.fileDragOver{border-color:#127abe}.formio-component-file .fileSelector .fa,.formio-component-file .fileSelector .glyphicon{font-size:20px;margin-right:5px}[dir=rtl] .formio-component-file .fileSelector .fa,[dir=rtl] .formio-component-file .fileSelector .glyphicon{margin-right:unset;margin-left:5px}.formio-component-file .fileSelector .browse{cursor:pointer}@-webkit-keyframes formio-dialog-fadeout{0%{opacity:1}to{opacity:0}}@keyframes formio-dialog-fadeout{0%{opacity:1}to{opacity:0}}@-webkit-keyframes formio-dialog-fadein{0%{opacity:0}to{opacity:1}}@keyframes formio-dialog-fadein{0%{opacity:0}to{opacity:1}}.formio-dialog{box-sizing:border-box;font-size:.8em;color:#666}.formio-dialog.formio-modaledit-dialog{font-size:inherit}.formio-dialog *,.formio-dialog :after,.formio-dialog :before{box-sizing:inherit}.formio-dialog{position:fixed;overflow:auto;-webkit-overflow-scrolling:touch;z-index:10000;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.4);-webkit-animation:formio-dialog-fadein .5s;animation:formio-dialog-fadein .5s}.formio-dialog.formio-dialog-disabled-animation,.formio-dialog.formio-dialog-disabled-animation .formio-dialog-content,.formio-dialog.formio-dialog-disabled-animation .formio-dialog-overlay{-webkit-animation:none!important;animation:none!important}.formio-dialog-overlay{position:fixed;top:0;right:0;bottom:0;left:0;-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadein .5s;animation:formio-dialog-fadein .5s;margin-right:15px;background:0 0}.formio-dialog-no-overlay{pointer-events:none}.formio-dialog.formio-dialog-closing .formio-dialog-overlay{-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadeout .5s;animation:formio-dialog-fadeout .5s}.formio-dialog-content{background:#fff;-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadein .5s;animation:formio-dialog-fadein .5s;pointer-events:all;overflow:auto}.formio-component-modal-wrapper-select .formio-dialog-content{overflow:visible;overflow:initial}.formio-dialog.formio-dialog-closing .formio-dialog-content{-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadeout .5s;animation:formio-dialog-fadeout .5s}.formio-dialog-close:before{font-family:Helvetica,Arial,sans-serif;content:\"\\d7\";cursor:pointer}body.formio-dialog-open,html.formio-dialog-open{overflow:hidden}.formio-dialog .tab-content{padding-top:12px}.formio-dialog-close{z-index:1000}@-webkit-keyframes formio-dialog-flyin{0%{opacity:0;transform:translateY(-40px)}to{opacity:1;transform:translateY(0)}}@keyframes formio-dialog-flyin{0%{opacity:0;transform:translateY(-40px)}to{opacity:1;transform:translateY(0)}}@-webkit-keyframes formio-dialog-flyout{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-40px)}}@keyframes formio-dialog-flyout{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-40px)}}.formio-dialog.formio-dialog-theme-default{padding-bottom:160px;padding-top:160px}.formio-dialog.formio-dialog-theme-default.formio-dialog-closing .formio-dialog-content{-webkit-animation:formio-dialog-flyout .5s;animation:formio-dialog-flyout .5s}.formio-dialog.formio-dialog-theme-default .formio-dialog-content{-webkit-animation:formio-dialog-flyin .5s;animation:formio-dialog-flyin .5s;background:#f0f0f0;border-radius:5px;font-family:Helvetica,sans-serif;font-size:1.1em;line-height:1.5em;margin:0 auto;max-width:100%;padding:1em;position:relative;width:80%}.formio-dialog.formio-dialog-theme-default .formio-dialog-close{border:none;background:0 0;cursor:pointer;position:absolute;right:0;top:0;z-index:100}.formio-clickable{cursor:pointer}.component-settings .nav>li>a{padding:8px 10px}.formio-dialog.formio-dialog-theme-default .formio-dialog-close:before{display:block;padding:3px;background:0 0;color:#bbb;content:\"\\d7\";font-size:26px;font-weight:400;line-height:26px;text-align:center}.formio-dialog.formio-dialog-theme-default .formio-dialog-close:active:before,.formio-dialog.formio-dialog-theme-default .formio-dialog-close:hover:before{color:#777}.formio-dialog.formio-dialog-theme-default .formio-dialog-message{margin-bottom:.5em}.formio-dialog.formio-dialog-theme-default .formio-dialog-input{margin-bottom:1em}.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=email],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=password],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=text],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=url],.formio-dialog.formio-dialog-theme-default .formio-dialog-input textarea{background:#fff;border:0;border-radius:3px;font-family:inherit;font-size:inherit;font-weight:inherit;margin:0 0 .25em;min-height:2.5em;padding:.25em .67em;width:100%}.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=email]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=password]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=text]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=url]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input textarea:focus{box-shadow:inset 0 0 0 2px #8dbdf1;outline:0}.formio-dialog.formio-dialog-theme-default .formio-dialog-buttons{*zoom:1}.formio-dialog.formio-dialog-theme-default .formio-dialog-buttons:after{content:\"\";display:table;clear:both}.formio-dialog.formio-dialog-theme-default .formio-dialog-button{border:0;border-radius:3px;cursor:pointer;float:right;font-family:inherit;font-size:.8em;letter-spacing:.1em;line-height:1em;margin:0 0 0 .5em;padding:.75em 2em;text-transform:uppercase}.formio-dialog.formio-dialog-theme-default .formio-dialog-button:focus{-webkit-animation:formio-dialog-pulse 1.1s infinite;animation:formio-dialog-pulse 1.1s infinite;outline:0}@media (max-width:568px){.formio-dialog.formio-dialog-theme-default .formio-dialog-button:focus{-webkit-animation:none;animation:none}}.formio-dialog.formio-dialog-theme-default .formio-dialog-button.formio-dialog-button-primary{background:#3288e6;color:#fff}.formio-dialog.formio-dialog-theme-default .formio-dialog-button.formio-dialog-button-secondary{background:#e0e0e0;color:#777}.formio-dialog-content .panel{margin:0}.formio-placeholder{position:absolute;color:#999}.formio-dialog .formio-dialog-close{cursor:pointer}.formio-iframe{border:none;width:100%;height:1000px}.inline-form-button{margin-right:10px}.tooltip{opacity:1}.tooltip[x-placement=right] .tooltip-arrow{border-right:5px solid #000}.tooltip[x-placement=right] .tooltip-inner{margin-left:8px}.control-label--bottom{margin-bottom:0;margin-top:5px}.formio-component-label-hidden{position:relative}.formio-hidden{margin:0}.control-label--hidden{position:absolute;top:6px;right:5px;font-size:1.5em}.formio-component-datetime .control-label--hidden.field-required{right:45px;z-index:3}.formio-component-selectboxes .control-label--hidden.field-required,.formio-component-survey .control-label--hidden.field-required{top:0}.formio-component-resource .control-label--hidden.field-required,.formio-component-select .control-label--hidden.field-required{right:40px;z-index:2}.formio-component-datasource,.formio-component-hidden:not(.formio-component-checkbox){margin-bottom:0}.checkbox-inline label,.radio-inline label{font-weight:400;cursor:pointer}.editgrid-listgroup{margin-bottom:10px}.tree-listgroup{flex-direction:row}.formio-component-submit button[disabled]+.has-error{display:block}.formio-choices.form-group{margin-bottom:0}.formio-choices[data-type=select-multiple] .form-control{height:auto}.form-control.formio-multiple-mask-select{width:15%;z-index:4}.form-control.formio-multiple-mask-input{width:85%}.input-group.formio-multiple-mask-container{width:100%}.formio-component .table{margin-bottom:0}.formio-hide-label-panel-tooltip{margin-top:-10px;margin-left:-10px}.is-disabled .choices__list--multiple .choices__item{padding:5px 10px}.is-disabled .choices__list--multiple .choices__item .choices__button{display:none}.formio-collapse-icon{cursor:pointer;margin-right:4px}[dir=rtl] .formio-collapse-icon{margin-right:unset;margin-left:4px}.formio-component-dateTime .form-control[type=datetime-local]~.input-group-addon,.formio-component-datetime .form-control[type=datetime-local]~.input-group-addon{width:auto}.formio-component-datagrid .formio-datagrid-remove{position:absolute;top:0;right:0;visibility:hidden;opacity:0;transition:opacity .2s linear,visibility 0s .2s}.formio-component-datagrid .datagrid-table>tbody>tr>td:last-child{position:relative}.formio-component-datagrid .datagrid-table>tbody>tr:hover>td:last-child .formio-datagrid-remove{visibility:visible;opacity:1;transition:visibility 0s,opacity .2s linear}.formio-component-modaledit .formio-modaledit-view-container{position:relative;border:1px solid #ddd;min-height:34px;padding:6px 12px;cursor:text}td .formio-component-modaledit .formio-modaledit-view-container{padding:0;border-style:none}.formio-component-modaledit .formio-modaledit-edit{position:absolute;top:0;left:0;visibility:hidden;opacity:0;transition:opacity .2s linear,visibility 0s .2s}.formio-component-modaledit .formio-modaledit-view-container:hover .formio-modaledit-edit{visibility:visible;opacity:1;transition:visibility 0s,opacity .2s linear}.formio-modaledit-dialog .formio-modaledit-close{position:absolute;top:100%;right:0;border-radius:0}.reset-margins a,.reset-margins abbr,.reset-margins acronym,.reset-margins address,.reset-margins applet,.reset-margins article,.reset-margins aside,.reset-margins audio,.reset-margins b,.reset-margins big,.reset-margins blockquote,.reset-margins body,.reset-margins canvas,.reset-margins caption,.reset-margins center,.reset-margins cite,.reset-margins code,.reset-margins dd,.reset-margins del,.reset-margins details,.reset-margins dfn,.reset-margins div,.reset-margins dl,.reset-margins dt,.reset-margins em,.reset-margins embed,.reset-margins fieldset,.reset-margins figcaption,.reset-margins figure,.reset-margins footer,.reset-margins form,.reset-margins h1,.reset-margins h2,.reset-margins h3,.reset-margins h4,.reset-margins h5,.reset-margins h6,.reset-margins header,.reset-margins hgroup,.reset-margins html,.reset-margins i,.reset-margins iframe,.reset-margins img,.reset-margins ins,.reset-margins kbd,.reset-margins label,.reset-margins legend,.reset-margins li,.reset-margins mark,.reset-margins menu,.reset-margins nav,.reset-margins object,.reset-margins ol,.reset-margins output,.reset-margins p,.reset-margins pre,.reset-margins q,.reset-margins ruby,.reset-margins s,.reset-margins samp,.reset-margins section,.reset-margins small,.reset-margins span,.reset-margins strike,.reset-margins strong,.reset-margins sub,.reset-margins summary,.reset-margins sup,.reset-margins table,.reset-margins tbody,.reset-margins td,.reset-margins tfoot,.reset-margins th,.reset-margins thead,.reset-margins time,.reset-margins tr,.reset-margins tt,.reset-margins u,.reset-margins ul,.reset-margins var,.reset-margins video{margin:0}.ck-body .ck.ck-balloon-panel{z-index:101000}.formio-component-select select[disabled=disabled]{-webkit-appearance:none;-moz-appearance:none;text-indent:1px;text-overflow:\"\"}.formio-component-select .choices.is-disabled[data-type*=select-one]:after,.formio-component-select div[disabled=disabled] button{display:none}.datagrid-group-label.collapsed>td{display:none}.datagrid-group-header.clickable{cursor:pointer}.datagrid-group-header.clickable .datagrid-group-label:before{display:inline-block;vertical-align:middle;content:\"\\25be\";margin:0 5px}.datagrid-group-header.clickable.collapsed .datagrid-group-label:before{content:\"\\25b8\"}.formio-component.alert-danger .help-block,.formio-component.alert-warning .help-block{color:inherit}.tree__level_even{background-color:#f6f6f6}.tree__node-content{margin-bottom:10px}.tree__node-children{margin:0}.formio-select-autocomplete-input{opacity:0;position:absolute;z-index:-1}.has-error>.help-block{margin-top:5px;margin-bottom:10px}.no-top-border-table>.table>tbody>tr:first-child>td{border-top:none}.table>tbody>tr>td.cell-align-left{text-align:left}.table>tbody>tr>td.cell-align-center{text-align:center}.table>tbody>tr>td.cell-align-center>div{margin-left:auto;margin-right:auto}.table>tbody>tr>td.cell-align-right{text-align:right}.table>tbody>tr>td.cell-align-right>div{margin-left:auto}.table-responsive[ref=component]{overflow-x:visible}.formio-component-textarea .alert .ck-editor__editable{color:inherit}.formio-component-textarea .ck.ck-editor__editable .image .ck-progress-bar{height:4px}div[data-oembed-url]{width:100%}.checkbox label.label-position-bottom,.checkbox label.label-position-left,.checkbox label.label-position-top,.radio label.label-position-bottom,.radio label.label-position-left,.radio label.label-position-top{padding-left:0}.checkbox label.label-position-bottom span,.checkbox label.label-position-top span,.radio label.label-position-bottom span,.radio label.label-position-top span{display:block}.checkbox label.label-position-bottom input[type=checkbox],.checkbox label.label-position-top input[type=checkbox],.radio label.label-position-bottom input[type=radio],.radio label.label-position-top input[type=radio]{position:relative;margin-left:0}.checkbox label.label-position-top input[type=checkbox],.radio label.label-position-top input[type=radio]{margin-top:4px}.checkbox label.label-position-bottom input[type=checkbox],.radio label.label-position-bottom input[type=radio]{margin-bottom:8px}.checkbox label.label-position-left input[type=checkbox],.radio label.label-position-left input[type=radio]{margin-left:10px}.open-modal-button{width:100%;text-align:left;white-space:normal;height:auto}.formio-component-modal-wrapper-signature .open-modal-button{text-align:center;height:100%;font-size:1.4em;padding:0;margin:0}.formio-component-content .image{display:table;clear:both;text-align:center;margin:1em auto}.formio-component-content .image>img{display:block;margin:0 auto;max-width:100%;min-width:50px}.formio-component-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}.formio-component-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.formio-component-content .image.image_resized img{width:100%}.formio-component-content .image.image_resized>figcaption{display:block}.formio-component-content .media{clear:both;margin:1em 0;display:block;min-width:15em}.formio-component-content .image-style-align-center:not(.image_resized),.formio-component-content .image-style-align-left:not(.image_resized),.formio-component-content .image-style-align-right:not(.image_resized),.formio-component-content .image-style-side:not(.image_resized){max-width:50%}.formio-component-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing)}.formio-component-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.formio-component-content .image-style-align-center{margin-left:auto;margin-right:auto}.formio-component-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.formio-component-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:solid 5px #ccc}.formio-component-content[dir=rtl] blockquote{border-left:0;border-right:solid 5px #ccc}.formio-component-content .text-tiny{font-size:.7em}.formio-component-content .text-small{font-size:.85em}.formio-component-content .text-big{font-size:1.4em}.formio-component-content .text-huge{font-size:1.8em}.formio-component-address.formio-component-label-hidden>label.field-required{z-index:1}.formio-component-address.formio-component-label-hidden>label.field-required~.address-autocomplete-container .address-autocomplete-remove-value-icon{right:20px}.address-autocomplete-container{position:relative}.address-autocomplete-container .address-autocomplete-remove-value-icon{cursor:pointer;position:absolute;margin-top:-9px;right:10px;top:50%}.address-autocomplete-container .address-autocomplete-remove-value-icon--hidden{display:none}.autocomplete{background:#fff;font:14px/22px \"-apple-system\",BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;overflow:auto;box-sizing:border-box;border:1px solid rgba(50,50,50,.6);z-index:11000}.autocomplete>div{cursor:pointer;padding:6px 10px}.autocomplete>div.selected,.autocomplete>div:hover:not(.group){background:#1e90ff;color:#fff}.field-wrapper{display:flex}.field-wrapper--reverse{flex-direction:row-reverse}.field-wrapper .field-label--right{text-align:right}.formio-component-modal-wrapper{margin-bottom:10px}.formio-component-modal-wrapper .open-modal-button{height:auto}.formio-component-modal-wrapper .component-rendering-hidden{visibility:hidden}.formio-component-textarea div.formio-editor-read-only-content[ref=input]{white-space:pre-wrap}.formio-editor-read-only-content img{max-width:100%}.formio-editor-read-only-content li[data-list=bullet]{list-style-type:none}.formio-editor-read-only-content li[data-list=bullet] .ql-ui{padding-right:.5rem}.formio-editor-read-only-content li[data-list=bullet] .ql-ui:before{content:\"\\2022\"}.formio-editor-read-only-content li[data-list=ordered]{list-style-type:none;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.formio-editor-read-only-content li[data-list=ordered] .ql-ui{padding-right:.5rem}.formio-editor-read-only-content li[data-list=ordered] .ql-ui:before{content:counter(list-0,decimal) \". \"}.formio-editor-read-only-content figure.table table{border-collapse:collapse;border-spacing:0;width:100%;height:100%;border:1px double #b3b3b3}.formio-editor-read-only-content figure.table table td,.formio-editor-read-only-content figure.table table th{min-width:2em;padding:.4em;border:1px solid #bfbfbf}.formio-component-password .pull-right:not(:last-child),.formio-component-textarea .pull-right:not(:last-child),.formio-component-textfield .pull-right:not(:last-child){padding-left:12px}.formio-form>div>nav>ul.pagination{flex-flow:wrap row}.formio-form>div>nav>ul.pagination .page-link{cursor:pointer}.pac-container{z-index:11000}[ref=buttonMessageContainer].has-error{cursor:pointer}.formio-component-textarea .formio-editor-read-only-content .text-big{font-size:1.4em}.formio-component-textarea .formio-editor-read-only-content .text-huge{font-size:1.8em}.formio-component-textarea .formio-editor-read-only-content .text-small{font-size:.85em}.formio-component-textarea .formio-editor-read-only-content .text-tiny{font-size:.7em}.formbuilder{position:relative}.drag-container{padding:10px;border:dotted 2px #e8e8e8}.drag-container:hover{cursor:move;border:dotted 2px #ccc}.drag-container.formio-builder-form,.drag-container.formio-builder-form:hover,.panel-body>.drag-container.formio-builder-components,.panel-body>.drag-container.formio-builder-components:hover,.tab-pane>.drag-container.formio-builder-components,.tab-pane>.drag-container.formio-builder-components:hover{padding:0 0 1rem;border:none}.component-btn-group{position:absolute;right:0;z-index:1000;margin-top:-2px}.builder-component{position:relative;min-height:15px}.builder-component .formio-component-htmlelement{border:dotted 2px #e8e8e8}.builder-component .formio-component-htmlelement [ref=html]:empty:before{content:\"HTML Content\";color:#aaa}.builder-component:not(:hover) .component-btn-group{display:none}.builder-group-button{background-color:transparent;white-space:normal;text-align:left}.form-builder-group-header{padding:0}.component-btn-group .component-settings-button{float:right;margin:4px 4px 0 0;z-index:1001;box-shadow:0 0 10px 1px #3071a999}.formbuilder .formio-component-content,.formbuilder .formio-component-datasource,.formbuilder .formio-component-form,.formbuilder .formio-component-hidden{border:2px dashed #ddd}.formbuilder .formio-component-datasource,.formbuilder .formio-component-form,.formbuilder .formio-component-hidden{height:3em;text-align:center;color:#aaa;padding-top:.5em}.btn-group-xxs>.btn,.btn-xxs,.component-btn-group .component-settings-button{padding:2px;font-size:10px;line-height:1.2em;border-radius:0;width:18px;height:18px}.formcomponents .formcomponent{text-align:left;padding:5px 5px 5px 8px;margin-top:.2rem;font-size:.8em;line-height:1.2;border-radius:.3em}.form-builder-panel .panel-body{padding:5px}.formio-component-tabs .ui.tabular.menu .item{padding:.8em}.formio-pdf-builder{position:relative}.formio-drop-zone{display:none;position:absolute;z-index:10;background-color:#0d87e9;opacity:.1}.formio-drop-zone.enabled{display:inherit}.component-settings .formio-dialog-content{max-height:100%}.component-btn-group .btn.component-settings-button-paste{display:none}.builder-paste-mode .component-settings-button-paste{display:inherit!important}.wizard-page-label{cursor:pointer;border-radius:0}.panel-body .drag-and-drop-alert{margin-bottom:0}.builder-sidebar_scroll{position:sticky;top:15px}.builder-sidebar_search{margin-bottom:10px;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.formio-wizard-builder-component-title{color:#6c757d;text-align:center;padding:.5rem}.formio-wizard-position{position:relative}.formio-settings-help{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc;margin-top:10px}.help-block{margin:0}.builder-sidebar .btn{white-space:normal}.component-settings{padding-top:20px!important;padding-bottom:20px!important}.component-edit-container{height:auto;overflow:hidden}.component-edit-content{height:calc(100% - 4em)}.component-edit-tabs.col-sm-6{height:100%;overflow-y:auto}.component-edit-tabs.col-sm-12{height:calc(100% - 4em);overflow-y:auto}.component-edit-tabs.col-sm-12 .editForm{height:calc(100% - 4em);overflow-y:auto}.progress.pdf-progress{height:2rem}.progress.pdf-progress .progress-bar{font-size:1rem;line-height:2rem}.builder-sidebar.disabled .formcomponent{cursor:not-allowed;opacity:.65;box-shadow:none}\n"]
|
|
816
|
-
},] }
|
|
817
|
-
];
|
|
818
|
-
FormBuilderComponent.ctorParameters = () => [
|
|
819
|
-
{ type: NgZone },
|
|
820
|
-
{ type: FormioAppConfig, decorators: [{ type: Optional }] },
|
|
821
|
-
{ type: CustomTagsService, decorators: [{ type: Optional }] }
|
|
822
|
-
];
|
|
823
|
-
FormBuilderComponent.propDecorators = {
|
|
824
|
-
form: [{ type: Input }],
|
|
825
|
-
options: [{ type: Input }],
|
|
826
|
-
formbuilder: [{ type: Input }],
|
|
827
|
-
noeval: [{ type: Input }],
|
|
828
|
-
refresh: [{ type: Input }],
|
|
829
|
-
rebuild: [{ type: Input }],
|
|
830
|
-
change: [{ type: Output }],
|
|
831
|
-
builderElement: [{ type: ViewChild, args: ['builder', { static: true },] }]
|
|
832
|
-
};
|
|
833
|
-
|
|
834
|
-
class FormioLoaderComponent {
|
|
835
|
-
}
|
|
836
|
-
FormioLoaderComponent.decorators = [
|
|
837
|
-
{ type: Component, args: [{
|
|
838
|
-
selector: 'formio-loader',
|
|
839
|
-
template: "<div class=\"formio-loader-wrapper\" *ngIf=\"isLoading\">\n <div class=\"formio-loader\"></div>\n</div>\n",
|
|
840
|
-
styles: [".formio-loader-wrapper{position:absolute;top:0px;bottom:0px;left:0px;right:0px;z-index:1000}.formio-loader{position:absolute;left:50%;top:50%;margin-left:-30px;margin-top:-30px;z-index:10000;display:inline-block;border:6px solid #f3f3f3;border-top:6px solid #3498db;border-radius:50%;width:60px;height:60px;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"]
|
|
841
|
-
},] }
|
|
842
|
-
];
|
|
843
|
-
FormioLoaderComponent.propDecorators = {
|
|
844
|
-
isLoading: [{ type: Input }]
|
|
845
|
-
};
|
|
846
|
-
|
|
847
|
-
class FormioAlertsComponent {
|
|
848
|
-
constructor() {
|
|
849
|
-
this.focusComponent = new EventEmitter();
|
|
850
|
-
}
|
|
851
|
-
ngOnInit() {
|
|
852
|
-
if (!this.alerts) {
|
|
853
|
-
this.alerts = new FormioAlerts();
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
getComponent(event, alert) {
|
|
857
|
-
this.focusComponent.emit(alert.component.key);
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
FormioAlertsComponent.decorators = [
|
|
861
|
-
{ type: Component, args: [{
|
|
862
|
-
selector: 'formio-alerts',
|
|
863
|
-
template: "<div *ngFor=\"let alert of alerts.alerts\" class=\"alert alert-{{ alert.type }}\" role=\"alert\" (click)=\"getComponent($event, alert)\">\n {{alert.message | parseHtmlContent}}\n</div>\n"
|
|
864
|
-
},] }
|
|
865
|
-
];
|
|
866
|
-
FormioAlertsComponent.propDecorators = {
|
|
867
|
-
alerts: [{ type: Input }],
|
|
868
|
-
focusComponent: [{ type: Output }]
|
|
869
|
-
};
|
|
870
|
-
|
|
871
|
-
class ParseHtmlContentPipe {
|
|
872
|
-
/*
|
|
873
|
-
Some messages that are come from formiojs have hex codes. So the main aim of this pipe is transform this messages to html.
|
|
874
|
-
And then render in template.
|
|
875
|
-
*/
|
|
876
|
-
transform(content) {
|
|
877
|
-
const parsedContent = new DOMParser().parseFromString(content, 'text/html').body.childNodes[0];
|
|
878
|
-
return parsedContent === null || parsedContent === void 0 ? void 0 : parsedContent.textContent;
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
ParseHtmlContentPipe.decorators = [
|
|
882
|
-
{ type: Pipe, args: [{ name: 'parseHtmlContent', pure: false },] }
|
|
883
|
-
];
|
|
884
|
-
|
|
885
|
-
class FormioModule {
|
|
886
|
-
}
|
|
887
|
-
FormioModule.decorators = [
|
|
888
|
-
{ type: NgModule, args: [{
|
|
889
|
-
declarations: [
|
|
890
|
-
FormioComponent,
|
|
891
|
-
FormioBaseComponent,
|
|
892
|
-
FormBuilderComponent,
|
|
893
|
-
FormioLoaderComponent,
|
|
894
|
-
FormioAlertsComponent,
|
|
895
|
-
ParseHtmlContentPipe
|
|
896
|
-
],
|
|
897
|
-
imports: [
|
|
898
|
-
CommonModule
|
|
899
|
-
],
|
|
900
|
-
exports: [
|
|
901
|
-
FormioComponent,
|
|
902
|
-
FormBuilderComponent,
|
|
903
|
-
FormioLoaderComponent,
|
|
904
|
-
FormioAlertsComponent
|
|
905
|
-
],
|
|
906
|
-
providers: [
|
|
907
|
-
FormioAlerts,
|
|
908
|
-
CustomTagsService
|
|
909
|
-
],
|
|
910
|
-
entryComponents: [
|
|
911
|
-
FormioComponent,
|
|
912
|
-
FormBuilderComponent
|
|
913
|
-
]
|
|
914
|
-
},] }
|
|
915
|
-
];
|
|
916
|
-
|
|
917
|
-
// @ts-nocheck
|
|
918
|
-
const BaseInputComponent = Components.components.input;
|
|
919
|
-
const TextfieldComponent = Components.components.textfield;
|
|
920
|
-
function createCustomFormioComponent(customComponentOptions) {
|
|
921
|
-
var _a;
|
|
922
|
-
return _a = class CustomComponent extends BaseInputComponent {
|
|
923
|
-
constructor(component, options, data) {
|
|
924
|
-
super(component, Object.assign(Object.assign({}, options), { sanitizeConfig: {
|
|
925
|
-
addTags: [customComponentOptions.selector],
|
|
926
|
-
} }), data);
|
|
927
|
-
this.component = component;
|
|
928
|
-
this.id = Utils.getRandomComponentId();
|
|
929
|
-
this.type = customComponentOptions.type;
|
|
930
|
-
if (customComponentOptions.extraValidators) {
|
|
931
|
-
this.validators = this.validators.concat(customComponentOptions.extraValidators);
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
static schema() {
|
|
935
|
-
return BaseInputComponent.schema(Object.assign(Object.assign({}, customComponentOptions.schema), { type: customComponentOptions.type }));
|
|
936
|
-
}
|
|
937
|
-
get defaultSchema() {
|
|
938
|
-
return CustomComponent.schema();
|
|
939
|
-
}
|
|
940
|
-
get emptyValue() {
|
|
941
|
-
return customComponentOptions.emptyValue || null;
|
|
942
|
-
}
|
|
943
|
-
static get builderInfo() {
|
|
944
|
-
return {
|
|
945
|
-
title: customComponentOptions.title,
|
|
946
|
-
group: customComponentOptions.group,
|
|
947
|
-
icon: customComponentOptions.icon,
|
|
948
|
-
weight: customComponentOptions.weight,
|
|
949
|
-
documentation: customComponentOptions.documentation,
|
|
950
|
-
schema: CustomComponent.schema(),
|
|
951
|
-
};
|
|
952
|
-
}
|
|
953
|
-
elementInfo() {
|
|
954
|
-
const info = super.elementInfo();
|
|
955
|
-
info.type = customComponentOptions.selector;
|
|
956
|
-
info.changeEvent = customComponentOptions.changeEvent || 'valueChange';
|
|
957
|
-
info.attr = Object.assign(Object.assign({}, info.attr), { class: info.attr.class.replace('form-control', 'form-control-custom-field') // remove the form-control class as the custom angular component may look different
|
|
958
|
-
});
|
|
959
|
-
return info;
|
|
960
|
-
}
|
|
961
|
-
get inputInfo() {
|
|
962
|
-
const info = Object.assign({ id: this.key }, this.elementInfo());
|
|
963
|
-
return info;
|
|
964
|
-
}
|
|
965
|
-
renderElement(value, index) {
|
|
966
|
-
const info = this.inputInfo;
|
|
967
|
-
return this.renderTemplate(customComponentOptions.template || 'input', {
|
|
968
|
-
input: info,
|
|
969
|
-
value,
|
|
970
|
-
index
|
|
971
|
-
});
|
|
972
|
-
}
|
|
973
|
-
attach(element) {
|
|
974
|
-
let superAttach = super.attach(element);
|
|
975
|
-
this._customAngularElement = element.querySelector(customComponentOptions.selector);
|
|
976
|
-
// Bind the custom options and the validations to the Angular component's inputs (flattened)
|
|
977
|
-
if (this._customAngularElement) {
|
|
978
|
-
// To make sure we have working input in IE...
|
|
979
|
-
// IE doesn't render it properly if it's not visible on the screen
|
|
980
|
-
// due to the whole structure applied via innerHTML to the parent
|
|
981
|
-
// so we need to use appendChild
|
|
982
|
-
if (!this._customAngularElement.getAttribute('ng-version')) {
|
|
983
|
-
this._customAngularElement.removeAttribute('ref');
|
|
984
|
-
const newCustomElement = document.createElement(customComponentOptions.selector);
|
|
985
|
-
newCustomElement.setAttribute('ref', 'input');
|
|
986
|
-
Object.keys(this.inputInfo.attr).forEach((attr) => {
|
|
987
|
-
newCustomElement.setAttribute(attr, this.inputInfo.attr[attr]);
|
|
988
|
-
});
|
|
989
|
-
this._customAngularElement.appendChild(newCustomElement);
|
|
990
|
-
this._customAngularElement = newCustomElement;
|
|
991
|
-
superAttach = super.attach(element);
|
|
992
|
-
}
|
|
993
|
-
// Bind customOptions
|
|
994
|
-
for (const key in this.component.customOptions) {
|
|
995
|
-
if (this.component.customOptions.hasOwnProperty(key)) {
|
|
996
|
-
this._customAngularElement[key] = this.component.customOptions[key];
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
// Bind validate options
|
|
1000
|
-
for (const key in this.component.validate) {
|
|
1001
|
-
if (this.component.validate.hasOwnProperty(key)) {
|
|
1002
|
-
this._customAngularElement[key] = this.component.validate[key];
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
// Bind options explicitly set
|
|
1006
|
-
const fieldOptions = customComponentOptions.fieldOptions;
|
|
1007
|
-
if (isArray(fieldOptions) && fieldOptions.length > 0) {
|
|
1008
|
-
for (const key in fieldOptions) {
|
|
1009
|
-
if (fieldOptions.hasOwnProperty(key)) {
|
|
1010
|
-
this._customAngularElement[fieldOptions[key]] = this.component[fieldOptions[key]];
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
// Attach event listener for emit event
|
|
1015
|
-
this._customAngularElement.addEventListener('formioEvent', (event) => {
|
|
1016
|
-
this.emit(event.detail.eventName, Object.assign(Object.assign({}, event.detail.data), { component: this.component }));
|
|
1017
|
-
});
|
|
1018
|
-
// Ensure we bind the value (if it isn't a multiple-value component with no wrapper)
|
|
1019
|
-
if (!this._customAngularElement.value && !this.component.disableMultiValueWrapper) {
|
|
1020
|
-
this.restoreValue();
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
return superAttach;
|
|
1024
|
-
}
|
|
1025
|
-
// Add extra option to support multiple value (e.g. datagrid) with single angular component (disableMultiValueWrapper)
|
|
1026
|
-
useWrapper() {
|
|
1027
|
-
return this.component.hasOwnProperty('multiple') && this.component.multiple && !this.component.disableMultiValueWrapper;
|
|
1028
|
-
}
|
|
1029
|
-
get defaultValue() {
|
|
1030
|
-
let defaultValue = this.emptyValue;
|
|
1031
|
-
// handle falsy default value
|
|
1032
|
-
if (!isNil(this.component.defaultValue)) {
|
|
1033
|
-
defaultValue = this.component.defaultValue;
|
|
1034
|
-
}
|
|
1035
|
-
if (this.component.customDefaultValue && !this.options.preview) {
|
|
1036
|
-
defaultValue = this.evaluate(this.component.customDefaultValue, { value: '' }, 'value');
|
|
1037
|
-
}
|
|
1038
|
-
return clone(defaultValue);
|
|
1039
|
-
}
|
|
1040
|
-
},
|
|
1041
|
-
_a.editForm = customComponentOptions.editForm || TextfieldComponent.editForm,
|
|
1042
|
-
_a;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
function registerCustomTag(tag, injector) {
|
|
1046
|
-
injector.get(CustomTagsService).addCustomTag(tag);
|
|
1047
|
-
}
|
|
1048
|
-
function registerCustomTags(tags, injector) {
|
|
1049
|
-
tags.forEach(tag => registerCustomTag(tag, injector));
|
|
1050
|
-
}
|
|
1051
|
-
function registerCustomFormioComponent(options, angularComponent, injector) {
|
|
1052
|
-
registerCustomTag(options.selector, injector);
|
|
1053
|
-
const complexCustomComponent = createCustomElement(angularComponent, { injector });
|
|
1054
|
-
customElements.define(options.selector, complexCustomComponent);
|
|
1055
|
-
Components.setComponent(options.type, createCustomFormioComponent(options));
|
|
1056
|
-
}
|
|
1057
|
-
function registerCustomFormioComponentWithClass(options, angularComponent, formioClass, injector) {
|
|
1058
|
-
registerCustomTag(options.selector, injector);
|
|
1059
|
-
const complexCustomComponent = createCustomElement(angularComponent, { injector });
|
|
1060
|
-
customElements.define(options.selector, complexCustomComponent);
|
|
1061
|
-
Components.setComponent(options.type, formioClass);
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
/*
|
|
1065
|
-
* Public API Surface of angular-formio
|
|
1066
|
-
*/
|
|
1067
|
-
|
|
1068
|
-
/**
|
|
1069
|
-
* Generated bundle index. Do not edit.
|
|
1070
|
-
*/
|
|
1071
|
-
|
|
1072
|
-
export { FormBuilderComponent, FormioAlerts, FormioAlertsComponent, FormioAppConfig, FormioBaseComponent, FormioComponent, FormioError, FormioLoaderComponent, FormioModule, FormioPromiseService, FormioService, createCustomFormioComponent, extendRouter, registerCustomFormioComponent, registerCustomFormioComponentWithClass, registerCustomTag, registerCustomTags, CustomTagsService as ɵa, ParseHtmlContentPipe as ɵb };
|
|
1073
|
-
//# sourceMappingURL=formio-angular.js.map
|