@formio/angular 5.2.1-rc.2 → 5.2.1-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/angular-formio/FormioBaseComponent.d.ts → FormioBaseComponent.d.ts} +0 -3
- package/FormioBaseComponent.d.ts.map +1 -0
- package/FormioBaseComponent.ngfactory.d.ts.map +1 -0
- package/README.md +13 -170
- package/auth/auth.component.d.ts +3 -0
- package/{dist/angular-formio/auth → auth}/auth.component.d.ts.map +1 -1
- package/{dist/angular-formio/auth → auth}/auth.config.d.ts +0 -3
- package/auth/auth.config.d.ts.map +1 -0
- package/auth/auth.module.d.ts +6 -0
- package/auth/auth.module.d.ts.map +1 -0
- package/{dist/angular-formio/auth → auth}/auth.routes.d.ts +0 -0
- package/{dist/angular-formio/auth → auth}/auth.routes.d.ts.map +0 -0
- package/{dist/angular-formio/auth → auth}/auth.service.d.ts +0 -3
- package/auth/auth.service.d.ts.map +1 -0
- package/auth/formio-angular-auth.d.ts +5 -0
- package/{dist/angular-formio/auth → auth}/formio-angular-auth.d.ts.map +1 -1
- package/auth/formio-angular-auth.metadata.json +1 -0
- package/{dist/angular-formio/auth → auth}/index.d.ts +0 -0
- package/{dist/angular-formio/auth → auth}/index.d.ts.map +0 -0
- package/auth/login/login.component.d.ts +6 -0
- package/{dist/angular-formio/auth → auth}/login/login.component.d.ts.map +1 -1
- package/{dist/angular-formio/auth → auth}/package.json +1 -0
- package/{dist/angular-formio/auth → auth}/public_api.d.ts +0 -0
- package/{dist/angular-formio/auth → auth}/public_api.d.ts.map +0 -0
- package/auth/register/register.component.d.ts +6 -0
- package/{dist/angular-formio/auth → auth}/register/register.component.d.ts.map +1 -1
- package/auth/resetpass/resetpass.component.d.ts +6 -0
- package/{dist/angular-formio/auth → auth}/resetpass/resetpass.component.d.ts.map +1 -1
- package/bundles/formio-angular-auth.umd.js +312 -0
- package/bundles/formio-angular-auth.umd.js.map +1 -0
- package/bundles/formio-angular-grid.umd.js +1010 -0
- package/bundles/formio-angular-grid.umd.js.map +1 -0
- package/bundles/formio-angular-manager.umd.js +1122 -0
- package/bundles/formio-angular-manager.umd.js.map +1 -0
- package/bundles/formio-angular-resource.umd.js +556 -0
- package/bundles/formio-angular-resource.umd.js.map +1 -0
- package/bundles/formio-angular.umd.js +1497 -0
- package/bundles/formio-angular.umd.js.map +1 -0
- package/components/alerts/formio.alerts.component.d.ts +9 -0
- package/{dist/angular-formio/components → components}/alerts/formio.alerts.component.d.ts.map +1 -1
- package/components/alerts/formio.alerts.component.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/components → components}/alerts/formio.alerts.d.ts +0 -0
- package/{dist/angular-formio/components → components}/alerts/formio.alerts.d.ts.map +0 -0
- package/components/alerts/parse-html-content.pipe.d.ts +5 -0
- package/{dist/angular-formio/components → components}/alerts/parse-html-content.pipe.d.ts.map +1 -1
- package/components/alerts/parse-html-content.pipe.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/components → components}/formbuilder/formbuilder.component.d.ts +0 -3
- package/components/formbuilder/formbuilder.component.d.ts.map +1 -0
- package/components/formbuilder/formbuilder.component.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/components → components}/formio/formio.component.d.ts +0 -3
- package/{dist/angular-formio/components → components}/formio/formio.component.d.ts.map +1 -1
- package/components/formio/formio.component.ngfactory.d.ts.map +1 -0
- package/components/loader/formio.loader.component.d.ts +4 -0
- package/components/loader/formio.loader.component.d.ts.map +1 -0
- package/components/loader/formio.loader.component.ngfactory.d.ts.map +1 -0
- package/components/loader/formio.loader.component.scss.shim.ngstyle.d.ts.map +1 -0
- package/{dist/angular-formio/core.d.ts → core.d.ts} +0 -0
- package/{dist/angular-formio/core.d.ts.map → core.d.ts.map} +0 -0
- package/{dist/angular-formio/custom-component → custom-component}/create-custom-component.d.ts +0 -0
- package/{dist/angular-formio/custom-component → custom-component}/create-custom-component.d.ts.map +0 -0
- package/custom-component/custom-tags.service.d.ts +5 -0
- package/custom-component/custom-tags.service.d.ts.map +1 -0
- package/custom-component/custom-tags.service.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/custom-component → custom-component}/register-custom-component.d.ts +0 -0
- package/{dist/angular-formio/custom-component → custom-component}/register-custom-component.d.ts.map +0 -0
- package/{dist/angular-formio/elements.common.d.ts → elements.common.d.ts} +0 -0
- package/{dist/angular-formio/elements.common.d.ts.map → elements.common.d.ts.map} +0 -0
- package/esm2015/FormioBaseComponent.js +456 -0
- package/esm2015/auth/auth.component.js +9 -0
- package/esm2015/auth/auth.config.js +12 -0
- package/esm2015/auth/auth.module.js +34 -0
- package/{dist/angular-formio/esm2015 → esm2015}/auth/auth.routes.js +0 -0
- package/esm2015/auth/auth.service.js +160 -0
- package/{dist/angular-formio/esm2015 → esm2015}/auth/formio-angular-auth.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/auth/index.js +0 -0
- package/esm2015/auth/login/login.component.js +16 -0
- package/{dist/angular-formio/esm2015 → esm2015}/auth/public_api.js +0 -0
- package/esm2015/auth/register/register.component.js +16 -0
- package/esm2015/auth/resetpass/resetpass.component.js +16 -0
- package/esm2015/components/alerts/formio.alerts.component.js +26 -0
- package/{dist/angular-formio/esm2015 → esm2015}/components/alerts/formio.alerts.js +0 -0
- package/esm2015/components/alerts/parse-html-content.pipe.js +15 -0
- package/esm2015/components/formbuilder/formbuilder.component.js +185 -0
- package/esm2015/components/formio/formio.component.js +39 -0
- package/esm2015/components/loader/formio.loader.component.js +14 -0
- package/{dist/angular-formio/esm2015 → esm2015}/core.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/custom-component/create-custom-component.js +0 -0
- package/esm2015/custom-component/custom-tags.service.js +13 -0
- package/{dist/angular-formio/esm2015 → esm2015}/custom-component/register-custom-component.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/elements.common.js +0 -0
- package/esm2015/formio-angular.js +7 -0
- package/{dist/angular-formio/esm2015 → esm2015}/formio-promise.service.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/formio.common.js +0 -0
- package/esm2015/formio.config.js +11 -0
- package/esm2015/formio.module.js +42 -0
- package/{dist/angular-formio/esm2015 → esm2015}/formio.service.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/formio.utils.js +0 -0
- package/esm2015/grid/GridBodyComponent.js +76 -0
- package/esm2015/grid/GridFooterComponent.js +26 -0
- package/esm2015/grid/GridHeaderComponent.js +25 -0
- package/esm2015/grid/form/FormGridBody.component.js +16 -0
- package/esm2015/grid/form/FormGridFooter.component.js +24 -0
- package/esm2015/grid/form/FormGridHeader.component.js +24 -0
- package/{dist/angular-formio/esm2015 → esm2015}/grid/form/index.js +0 -0
- package/esm2015/grid/form/time-since.pipe.js +33 -0
- package/esm2015/grid/formio-angular-grid.js +6 -0
- package/esm2015/grid/grid.component.js +211 -0
- package/esm2015/grid/grid.module.js +61 -0
- package/esm2015/grid/grid.service.js +16 -0
- package/{dist/angular-formio/esm2015 → esm2015}/grid/index.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/grid/public_api.js +0 -0
- package/esm2015/grid/submission/SubmissionGridBody.component.js +40 -0
- package/esm2015/grid/submission/SubmissionGridFooter.component.js +21 -0
- package/esm2015/grid/submission/SubmissionGridHeader.component.js +58 -0
- package/{dist/angular-formio/esm2015 → esm2015}/grid/submission/index.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/grid/types/grid-column.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/grid/types/grid-footer-positions.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/grid/types/grid-header.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/index.js +0 -0
- package/esm2015/manager/create/create.component.js +13 -0
- package/esm2015/manager/delete/delete.component.js +42 -0
- package/esm2015/manager/edit/edit.component.js +109 -0
- package/esm2015/manager/form/form.component.js +73 -0
- package/esm2015/manager/form-manager.config.js +12 -0
- package/esm2015/manager/form-manager.module.js +56 -0
- package/{dist/angular-formio/esm2015 → esm2015}/manager/form-manager.routes.js +0 -0
- package/esm2015/manager/form-manager.service.js +180 -0
- package/{dist/angular-formio/esm2015 → esm2015}/manager/formio-angular-manager.js +0 -0
- package/esm2015/manager/index/index.component.js +86 -0
- package/{dist/angular-formio/esm2015 → esm2015}/manager/index.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/manager/public_api.js +0 -0
- package/esm2015/manager/submission/delete/delete.component.js +32 -0
- package/esm2015/manager/submission/edit/edit.component.js +24 -0
- package/esm2015/manager/submission/index/index.component.js +24 -0
- package/esm2015/manager/submission/submission/submission.component.js +27 -0
- package/esm2015/manager/submission/view/view.component.js +16 -0
- package/esm2015/manager/view/view.component.js +45 -0
- package/{dist/angular-formio/esm2015 → esm2015}/public-api.js +0 -0
- package/esm2015/resource/create/create.component.js +40 -0
- package/esm2015/resource/delete/delete.component.js +29 -0
- package/esm2015/resource/edit/edit.component.js +39 -0
- package/{dist/angular-formio/esm2015 → esm2015}/resource/formio-angular-resource.js +0 -0
- package/esm2015/resource/index/index.component.js +65 -0
- package/{dist/angular-formio/esm2015 → esm2015}/resource/index.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/resource/public_api.js +0 -0
- package/esm2015/resource/resource.component.js +48 -0
- package/esm2015/resource/resource.config.js +12 -0
- package/esm2015/resource/resource.module.js +44 -0
- package/{dist/angular-formio/esm2015 → esm2015}/resource/resource.routes.js +0 -0
- package/esm2015/resource/resource.service.js +187 -0
- package/esm2015/resource/resources.service.js +22 -0
- package/esm2015/resource/view/view.component.js +24 -0
- package/{dist/angular-formio/esm2015 → esm2015}/types/alerts-position.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/types/formio-metadata.js +0 -0
- package/{dist/angular-formio/esm2015 → esm2015}/types/formio-submission.js +0 -0
- package/{dist/angular-formio/fesm2015 → fesm2015}/formio-angular-auth.js +45 -108
- package/fesm2015/formio-angular-auth.js.map +1 -0
- package/fesm2015/formio-angular-grid.js +624 -0
- package/fesm2015/formio-angular-grid.js.map +1 -0
- package/fesm2015/formio-angular-manager.js +750 -0
- package/fesm2015/formio-angular-manager.js.map +1 -0
- package/fesm2015/formio-angular-resource.js +515 -0
- package/fesm2015/formio-angular-resource.js.map +1 -0
- package/fesm2015/formio-angular.js +1073 -0
- package/fesm2015/formio-angular.js.map +1 -0
- package/formio-angular.d.ts +7 -0
- package/formio-angular.d.ts.map +1 -0
- package/formio-angular.metadata.json +1 -0
- package/{dist/angular-formio/formio-promise.service.d.ts → formio-promise.service.d.ts} +0 -0
- package/{dist/angular-formio/formio-promise.service.d.ts.map → formio-promise.service.d.ts.map} +0 -0
- package/{dist/angular-formio/formio.common.d.ts → formio.common.d.ts} +0 -0
- package/{dist/angular-formio/formio.common.d.ts.map → formio.common.d.ts.map} +0 -0
- package/formio.config.d.ts +7 -0
- package/formio.config.d.ts.map +1 -0
- package/formio.config.ngfactory.d.ts.map +1 -0
- package/formio.module.d.ts +3 -0
- package/{dist/angular-formio/formio.module.d.ts.map → formio.module.d.ts.map} +1 -1
- package/formio.module.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/formio.service.d.ts → formio.service.d.ts} +0 -0
- package/{dist/angular-formio/formio.service.d.ts.map → formio.service.d.ts.map} +0 -0
- package/{dist/angular-formio/formio.utils.d.ts → formio.utils.d.ts} +0 -0
- package/{dist/angular-formio/formio.utils.d.ts.map → formio.utils.d.ts.map} +0 -0
- package/{dist/angular-formio/grid → grid}/GridBodyComponent.d.ts +0 -3
- package/grid/GridBodyComponent.d.ts.map +1 -0
- package/grid/GridBodyComponent.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/grid → grid}/GridFooterComponent.d.ts +0 -3
- package/grid/GridFooterComponent.d.ts.map +1 -0
- package/grid/GridFooterComponent.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/grid → grid}/GridHeaderComponent.d.ts +0 -3
- package/grid/GridHeaderComponent.d.ts.map +1 -0
- package/grid/GridHeaderComponent.ngfactory.d.ts.map +1 -0
- package/grid/form/FormGridBody.component.d.ts +6 -0
- package/{dist/angular-formio/grid → grid}/form/FormGridBody.component.d.ts.map +1 -1
- package/grid/form/FormGridBody.component.ngfactory.d.ts.map +1 -0
- package/grid/form/FormGridBody.component.scss.shim.ngstyle.d.ts.map +1 -0
- package/grid/form/FormGridFooter.component.d.ts +7 -0
- package/{dist/angular-formio/grid → grid}/form/FormGridFooter.component.d.ts.map +1 -1
- package/grid/form/FormGridFooter.component.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/grid → grid}/form/FormGridHeader.component.d.ts +0 -3
- package/{dist/angular-formio/grid → grid}/form/FormGridHeader.component.d.ts.map +1 -1
- package/grid/form/FormGridHeader.component.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/grid → grid}/form/index.d.ts +0 -0
- package/{dist/angular-formio/grid → grid}/form/index.d.ts.map +0 -0
- package/grid/form/time-since.pipe.d.ts +5 -0
- package/{dist/angular-formio/grid → grid}/form/time-since.pipe.d.ts.map +1 -1
- package/grid/form/time-since.pipe.ngfactory.d.ts.map +1 -0
- package/grid/formio-angular-grid.d.ts +6 -0
- package/{dist/angular-formio/grid → grid}/formio-angular-grid.d.ts.map +1 -1
- package/grid/formio-angular-grid.metadata.json +1 -0
- package/{dist/angular-formio/grid → grid}/grid.component.d.ts +0 -3
- package/grid/grid.component.d.ts.map +1 -0
- package/grid/grid.component.ngfactory.d.ts.map +1 -0
- package/grid/grid.component.scss.shim.ngstyle.d.ts.map +1 -0
- package/grid/grid.footer.scss.ngstyle.d.ts.map +1 -0
- package/grid/grid.module.d.ts +3 -0
- package/{dist/angular-formio/grid → grid}/grid.module.d.ts.map +1 -1
- package/grid/grid.module.ngfactory.d.ts.map +1 -0
- package/grid/grid.service.d.ts +7 -0
- package/grid/grid.service.d.ts.map +1 -0
- package/grid/grid.service.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/grid → grid}/index.d.ts +0 -0
- package/{dist/angular-formio/grid → grid}/index.d.ts.map +0 -0
- package/{dist/angular-formio/grid → grid}/package.json +1 -0
- package/{dist/angular-formio/grid → grid}/public_api.d.ts +0 -0
- package/{dist/angular-formio/grid → grid}/public_api.d.ts.map +0 -0
- package/{dist/angular-formio/grid → grid}/submission/SubmissionGridBody.component.d.ts +0 -3
- package/{dist/angular-formio/grid → grid}/submission/SubmissionGridBody.component.d.ts.map +1 -1
- package/grid/submission/SubmissionGridBody.component.ngfactory.d.ts.map +1 -0
- package/grid/submission/SubmissionGridFooter.component.d.ts +7 -0
- package/{dist/angular-formio/grid → grid}/submission/SubmissionGridFooter.component.d.ts.map +1 -1
- package/grid/submission/SubmissionGridFooter.component.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/grid → grid}/submission/SubmissionGridHeader.component.d.ts +0 -3
- package/grid/submission/SubmissionGridHeader.component.d.ts.map +1 -0
- package/grid/submission/SubmissionGridHeader.component.ngfactory.d.ts.map +1 -0
- package/{dist/angular-formio/grid → grid}/submission/index.d.ts +0 -0
- package/{dist/angular-formio/grid → grid}/submission/index.d.ts.map +0 -0
- package/{dist/angular-formio/grid → grid}/types/grid-column.d.ts +0 -0
- package/{dist/angular-formio/grid → grid}/types/grid-column.d.ts.map +0 -0
- package/{dist/angular-formio/grid → grid}/types/grid-footer-positions.d.ts +0 -0
- package/{dist/angular-formio/grid → grid}/types/grid-footer-positions.d.ts.map +0 -0
- package/{dist/angular-formio/grid → grid}/types/grid-header.d.ts +0 -0
- package/{dist/angular-formio/grid → grid}/types/grid-header.d.ts.map +0 -0
- package/{dist/angular-formio/index.d.ts → index.d.ts} +0 -0
- package/{dist/angular-formio/index.d.ts.map → index.d.ts.map} +0 -0
- package/manager/create/create.component.d.ts +6 -0
- package/{dist/angular-formio/manager → manager}/create/create.component.d.ts.map +1 -1
- package/{dist/angular-formio/manager → manager}/delete/delete.component.d.ts +0 -3
- package/manager/delete/delete.component.d.ts.map +1 -0
- package/{dist/angular-formio/manager → manager}/edit/edit.component.d.ts +0 -3
- package/manager/edit/edit.component.d.ts.map +1 -0
- package/{dist/angular-formio/manager → manager}/form/form.component.d.ts +0 -3
- package/manager/form/form.component.d.ts.map +1 -0
- package/{dist/angular-formio/manager → manager}/form-manager.config.d.ts +0 -3
- package/manager/form-manager.config.d.ts.map +1 -0
- package/manager/form-manager.module.d.ts +6 -0
- package/manager/form-manager.module.d.ts.map +1 -0
- package/{dist/angular-formio/manager → manager}/form-manager.routes.d.ts +0 -0
- package/{dist/angular-formio/manager → manager}/form-manager.routes.d.ts.map +0 -0
- package/{dist/angular-formio/manager → manager}/form-manager.service.d.ts +0 -3
- package/manager/form-manager.service.d.ts.map +1 -0
- package/manager/formio-angular-manager.d.ts +5 -0
- package/{dist/angular-formio/manager → manager}/formio-angular-manager.d.ts.map +1 -1
- package/manager/formio-angular-manager.metadata.json +1 -0
- package/{dist/angular-formio/manager → manager}/index/index.component.d.ts +0 -3
- package/manager/index/index.component.d.ts.map +1 -0
- package/{dist/angular-formio/manager → manager}/index.d.ts +0 -0
- package/{dist/angular-formio/manager → manager}/index.d.ts.map +0 -0
- package/{dist/angular-formio/manager → manager}/package.json +1 -0
- package/{dist/angular-formio/manager → manager}/public_api.d.ts +0 -0
- package/{dist/angular-formio/manager → manager}/public_api.d.ts.map +0 -0
- package/{dist/angular-formio/manager → manager}/submission/delete/delete.component.d.ts +0 -3
- package/{dist/angular-formio/manager → manager}/submission/delete/delete.component.d.ts.map +1 -1
- package/{dist/angular-formio/manager → manager}/submission/edit/edit.component.d.ts +0 -3
- package/{dist/angular-formio/manager → manager}/submission/edit/edit.component.d.ts.map +1 -1
- package/{dist/angular-formio/manager → manager}/submission/index/index.component.d.ts +0 -3
- package/{dist/angular-formio/manager → manager}/submission/index/index.component.d.ts.map +1 -1
- package/{dist/angular-formio/manager → manager}/submission/submission/submission.component.d.ts +0 -3
- package/{dist/angular-formio/manager → manager}/submission/submission/submission.component.d.ts.map +1 -1
- package/manager/submission/view/view.component.d.ts +6 -0
- package/{dist/angular-formio/manager → manager}/submission/view/view.component.d.ts.map +1 -1
- package/{dist/angular-formio/manager → manager}/view/view.component.d.ts +0 -3
- package/manager/view/view.component.d.ts.map +1 -0
- package/package.json +27 -51
- package/{dist/angular-formio/public-api.d.ts → public-api.d.ts} +0 -0
- package/{dist/angular-formio/public-api.d.ts.map → public-api.d.ts.map} +0 -0
- package/{dist/angular-formio/resource → resource}/create/create.component.d.ts +0 -3
- package/resource/create/create.component.d.ts.map +1 -0
- package/{dist/angular-formio/resource → resource}/delete/delete.component.d.ts +0 -3
- package/{dist/angular-formio/resource → resource}/delete/delete.component.d.ts.map +1 -1
- package/{dist/angular-formio/resource → resource}/edit/edit.component.d.ts +0 -3
- package/resource/edit/edit.component.d.ts.map +1 -0
- package/resource/formio-angular-resource.d.ts +5 -0
- package/{dist/angular-formio/resource → resource}/formio-angular-resource.d.ts.map +1 -1
- package/resource/formio-angular-resource.metadata.json +1 -0
- package/{dist/angular-formio/resource → resource}/index/index.component.d.ts +0 -3
- package/resource/index/index.component.d.ts.map +1 -0
- package/{dist/angular-formio/resource → resource}/index.d.ts +0 -0
- package/{dist/angular-formio/resource → resource}/index.d.ts.map +0 -0
- package/{dist/angular-formio/resource → resource}/package.json +1 -0
- package/{dist/angular-formio/resource → resource}/public_api.d.ts +0 -0
- package/{dist/angular-formio/resource → resource}/public_api.d.ts.map +0 -0
- package/{dist/angular-formio/resource → resource}/resource.component.d.ts +0 -3
- package/{dist/angular-formio/resource → resource}/resource.component.d.ts.map +1 -1
- package/{dist/angular-formio/resource → resource}/resource.config.d.ts +0 -3
- package/resource/resource.config.d.ts.map +1 -0
- package/resource/resource.module.d.ts +6 -0
- package/resource/resource.module.d.ts.map +1 -0
- package/{dist/angular-formio/resource → resource}/resource.routes.d.ts +0 -0
- package/{dist/angular-formio/resource → resource}/resource.routes.d.ts.map +0 -0
- package/{dist/angular-formio/resource → resource}/resource.service.d.ts +0 -3
- package/resource/resource.service.d.ts.map +1 -0
- package/{dist/angular-formio/resource → resource}/resources.service.d.ts +0 -3
- package/resource/resources.service.d.ts.map +1 -0
- package/{dist/angular-formio/resource → resource}/view/view.component.d.ts +0 -3
- package/{dist/angular-formio/resource → resource}/view/view.component.d.ts.map +1 -1
- package/{dist/angular-formio/types → types}/alerts-position.d.ts +0 -0
- package/{dist/angular-formio/types → types}/alerts-position.d.ts.map +0 -0
- package/{dist/angular-formio/types → types}/formio-metadata.d.ts +0 -0
- package/{dist/angular-formio/types → types}/formio-metadata.d.ts.map +0 -0
- package/{dist/angular-formio/types → types}/formio-submission.d.ts +0 -0
- package/{dist/angular-formio/types → types}/formio-submission.d.ts.map +0 -0
- package/.dockerignore +0 -5
- package/.editorconfig +0 -13
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- package/.github/ISSUE_TEMPLATE/custom-components-support-request.md +0 -15
- package/.github/ISSUE_TEMPLATE/question.md +0 -8
- package/.travis.yml +0 -4
- package/.yo-rc.json +0 -7
- package/CHANGELOG.md +0 -1008
- package/Dockerfile +0 -20
- package/LICENSE +0 -21
- package/angular.json +0 -51
- package/bs-config.json +0 -11
- package/dist/angular-formio/FormioBaseComponent.d.ts.map +0 -1
- package/dist/angular-formio/README.md +0 -24
- package/dist/angular-formio/auth/auth.component.d.ts +0 -6
- package/dist/angular-formio/auth/auth.config.d.ts.map +0 -1
- package/dist/angular-formio/auth/auth.module.d.ts +0 -17
- package/dist/angular-formio/auth/auth.module.d.ts.map +0 -1
- package/dist/angular-formio/auth/auth.service.d.ts.map +0 -1
- package/dist/angular-formio/auth/formio-angular-auth.d.ts +0 -6
- package/dist/angular-formio/auth/login/login.component.d.ts +0 -9
- package/dist/angular-formio/auth/register/register.component.d.ts +0 -9
- package/dist/angular-formio/auth/resetpass/resetpass.component.d.ts +0 -9
- package/dist/angular-formio/bundles/formio-angular-auth.umd.js +0 -421
- package/dist/angular-formio/bundles/formio-angular-auth.umd.js.map +0 -1
- package/dist/angular-formio/bundles/formio-angular-grid.umd.js +0 -1725
- package/dist/angular-formio/bundles/formio-angular-grid.umd.js.map +0 -1
- package/dist/angular-formio/bundles/formio-angular-manager.umd.js +0 -1648
- package/dist/angular-formio/bundles/formio-angular-manager.umd.js.map +0 -1
- package/dist/angular-formio/bundles/formio-angular-resource.umd.js +0 -720
- package/dist/angular-formio/bundles/formio-angular-resource.umd.js.map +0 -1
- package/dist/angular-formio/bundles/formio-angular.umd.js +0 -1729
- package/dist/angular-formio/bundles/formio-angular.umd.js.map +0 -1
- package/dist/angular-formio/components/alerts/formio.alerts.component.d.ts +0 -12
- package/dist/angular-formio/components/alerts/parse-html-content.pipe.d.ts +0 -8
- package/dist/angular-formio/components/formbuilder/formbuilder.component.d.ts.map +0 -1
- package/dist/angular-formio/components/loader/formio.loader.component.d.ts +0 -7
- package/dist/angular-formio/components/loader/formio.loader.component.d.ts.map +0 -1
- package/dist/angular-formio/custom-component/custom-tags.service.d.ts +0 -8
- package/dist/angular-formio/custom-component/custom-tags.service.d.ts.map +0 -1
- package/dist/angular-formio/esm2015/FormioBaseComponent.js +0 -497
- package/dist/angular-formio/esm2015/auth/auth.component.js +0 -39
- package/dist/angular-formio/esm2015/auth/auth.config.js +0 -15
- package/dist/angular-formio/esm2015/auth/auth.module.js +0 -49
- package/dist/angular-formio/esm2015/auth/auth.service.js +0 -159
- package/dist/angular-formio/esm2015/auth/login/login.component.js +0 -24
- package/dist/angular-formio/esm2015/auth/register/register.component.js +0 -24
- package/dist/angular-formio/esm2015/auth/resetpass/resetpass.component.js +0 -24
- package/dist/angular-formio/esm2015/components/alerts/formio.alerts.component.js +0 -49
- package/dist/angular-formio/esm2015/components/alerts/parse-html-content.pipe.js +0 -19
- package/dist/angular-formio/esm2015/components/formbuilder/formbuilder.component.js +0 -203
- package/dist/angular-formio/esm2015/components/formio/formio.component.js +0 -87
- package/dist/angular-formio/esm2015/components/loader/formio.loader.component.js +0 -27
- package/dist/angular-formio/esm2015/custom-component/custom-tags.service.js +0 -16
- package/dist/angular-formio/esm2015/formio-angular.js +0 -5
- package/dist/angular-formio/esm2015/formio.config.js +0 -14
- package/dist/angular-formio/esm2015/formio.module.js +0 -61
- package/dist/angular-formio/esm2015/grid/GridBodyComponent.js +0 -86
- package/dist/angular-formio/esm2015/grid/GridFooterComponent.js +0 -41
- package/dist/angular-formio/esm2015/grid/GridHeaderComponent.js +0 -35
- package/dist/angular-formio/esm2015/grid/form/FormGridBody.component.js +0 -130
- package/dist/angular-formio/esm2015/grid/form/FormGridFooter.component.js +0 -118
- package/dist/angular-formio/esm2015/grid/form/FormGridHeader.component.js +0 -65
- package/dist/angular-formio/esm2015/grid/form/time-since.pipe.js +0 -37
- package/dist/angular-formio/esm2015/grid/formio-angular-grid.js +0 -5
- package/dist/angular-formio/esm2015/grid/grid.component.js +0 -302
- package/dist/angular-formio/esm2015/grid/grid.module.js +0 -90
- package/dist/angular-formio/esm2015/grid/grid.service.js +0 -18
- package/dist/angular-formio/esm2015/grid/submission/SubmissionGridBody.component.js +0 -75
- package/dist/angular-formio/esm2015/grid/submission/SubmissionGridFooter.component.js +0 -107
- package/dist/angular-formio/esm2015/grid/submission/SubmissionGridHeader.component.js +0 -99
- package/dist/angular-formio/esm2015/manager/create/create.component.js +0 -68
- package/dist/angular-formio/esm2015/manager/delete/delete.component.js +0 -56
- package/dist/angular-formio/esm2015/manager/edit/edit.component.js +0 -170
- package/dist/angular-formio/esm2015/manager/form/form.component.js +0 -192
- package/dist/angular-formio/esm2015/manager/form-manager.config.js +0 -15
- package/dist/angular-formio/esm2015/manager/form-manager.module.js +0 -86
- package/dist/angular-formio/esm2015/manager/form-manager.service.js +0 -178
- package/dist/angular-formio/esm2015/manager/index/index.component.js +0 -130
- package/dist/angular-formio/esm2015/manager/submission/delete/delete.component.js +0 -47
- package/dist/angular-formio/esm2015/manager/submission/edit/edit.component.js +0 -30
- package/dist/angular-formio/esm2015/manager/submission/index/index.component.js +0 -30
- package/dist/angular-formio/esm2015/manager/submission/submission/submission.component.js +0 -75
- package/dist/angular-formio/esm2015/manager/submission/view/view.component.js +0 -24
- package/dist/angular-formio/esm2015/manager/view/view.component.js +0 -57
- package/dist/angular-formio/esm2015/resource/create/create.component.js +0 -61
- package/dist/angular-formio/esm2015/resource/delete/delete.component.js +0 -42
- package/dist/angular-formio/esm2015/resource/edit/edit.component.js +0 -44
- package/dist/angular-formio/esm2015/resource/index/index.component.js +0 -72
- package/dist/angular-formio/esm2015/resource/resource.component.js +0 -83
- package/dist/angular-formio/esm2015/resource/resource.config.js +0 -15
- package/dist/angular-formio/esm2015/resource/resource.module.js +0 -65
- package/dist/angular-formio/esm2015/resource/resource.service.js +0 -186
- package/dist/angular-formio/esm2015/resource/resources.service.js +0 -22
- package/dist/angular-formio/esm2015/resource/view/view.component.js +0 -29
- package/dist/angular-formio/fesm2015/formio-angular-auth.js.map +0 -1
- package/dist/angular-formio/fesm2015/formio-angular-grid.js +0 -1175
- package/dist/angular-formio/fesm2015/formio-angular-grid.js.map +0 -1
- package/dist/angular-formio/fesm2015/formio-angular-manager.js +0 -1145
- package/dist/angular-formio/fesm2015/formio-angular-manager.js.map +0 -1
- package/dist/angular-formio/fesm2015/formio-angular-resource.js +0 -612
- package/dist/angular-formio/fesm2015/formio-angular-resource.js.map +0 -1
- package/dist/angular-formio/fesm2015/formio-angular.js +0 -1232
- package/dist/angular-formio/fesm2015/formio-angular.js.map +0 -1
- package/dist/angular-formio/formio-angular.d.ts +0 -6
- package/dist/angular-formio/formio-angular.d.ts.map +0 -1
- package/dist/angular-formio/formio.config.d.ts +0 -10
- package/dist/angular-formio/formio.config.d.ts.map +0 -1
- package/dist/angular-formio/formio.module.d.ts +0 -14
- package/dist/angular-formio/grid/GridBodyComponent.d.ts.map +0 -1
- package/dist/angular-formio/grid/GridFooterComponent.d.ts.map +0 -1
- package/dist/angular-formio/grid/GridHeaderComponent.d.ts.map +0 -1
- package/dist/angular-formio/grid/form/FormGridBody.component.d.ts +0 -9
- package/dist/angular-formio/grid/form/FormGridFooter.component.d.ts +0 -10
- package/dist/angular-formio/grid/form/time-since.pipe.d.ts +0 -8
- package/dist/angular-formio/grid/formio-angular-grid.d.ts +0 -6
- package/dist/angular-formio/grid/grid.component.d.ts.map +0 -1
- package/dist/angular-formio/grid/grid.module.d.ts +0 -23
- package/dist/angular-formio/grid/grid.service.d.ts +0 -10
- package/dist/angular-formio/grid/grid.service.d.ts.map +0 -1
- package/dist/angular-formio/grid/submission/SubmissionGridFooter.component.d.ts +0 -10
- package/dist/angular-formio/grid/submission/SubmissionGridHeader.component.d.ts.map +0 -1
- package/dist/angular-formio/manager/create/create.component.d.ts +0 -9
- package/dist/angular-formio/manager/delete/delete.component.d.ts.map +0 -1
- package/dist/angular-formio/manager/edit/edit.component.d.ts.map +0 -1
- package/dist/angular-formio/manager/form/form.component.d.ts.map +0 -1
- package/dist/angular-formio/manager/form-manager.config.d.ts.map +0 -1
- package/dist/angular-formio/manager/form-manager.module.d.ts +0 -28
- package/dist/angular-formio/manager/form-manager.module.d.ts.map +0 -1
- package/dist/angular-formio/manager/form-manager.service.d.ts.map +0 -1
- package/dist/angular-formio/manager/formio-angular-manager.d.ts +0 -6
- package/dist/angular-formio/manager/index/index.component.d.ts.map +0 -1
- package/dist/angular-formio/manager/submission/view/view.component.d.ts +0 -9
- package/dist/angular-formio/manager/view/view.component.d.ts.map +0 -1
- package/dist/angular-formio/package.json +0 -49
- package/dist/angular-formio/resource/create/create.component.d.ts.map +0 -1
- package/dist/angular-formio/resource/edit/edit.component.d.ts.map +0 -1
- package/dist/angular-formio/resource/formio-angular-resource.d.ts +0 -6
- package/dist/angular-formio/resource/index/index.component.d.ts.map +0 -1
- package/dist/angular-formio/resource/resource.config.d.ts.map +0 -1
- package/dist/angular-formio/resource/resource.module.d.ts +0 -20
- package/dist/angular-formio/resource/resource.module.d.ts.map +0 -1
- package/dist/angular-formio/resource/resource.service.d.ts.map +0 -1
- package/dist/angular-formio/resource/resources.service.d.ts.map +0 -1
- package/projects/angular-formio/README.md +0 -24
- package/projects/angular-formio/auth/package.json +0 -10
- package/projects/angular-formio/auth/src/auth.component.html +0 -12
- package/projects/angular-formio/auth/src/auth.component.ts +0 -5
- package/projects/angular-formio/auth/src/auth.config.ts +0 -72
- package/projects/angular-formio/auth/src/auth.module.ts +0 -33
- package/projects/angular-formio/auth/src/auth.routes.ts +0 -34
- package/projects/angular-formio/auth/src/auth.service.ts +0 -201
- package/projects/angular-formio/auth/src/index.ts +0 -8
- package/projects/angular-formio/auth/src/login/login.component.html +0 -1
- package/projects/angular-formio/auth/src/login/login.component.ts +0 -8
- package/projects/angular-formio/auth/src/public_api.ts +0 -5
- package/projects/angular-formio/auth/src/register/register.component.html +0 -1
- package/projects/angular-formio/auth/src/register/register.component.ts +0 -8
- package/projects/angular-formio/auth/src/resetpass/resetpass.component.html +0 -1
- package/projects/angular-formio/auth/src/resetpass/resetpass.component.ts +0 -8
- package/projects/angular-formio/grid/package.json +0 -11
- package/projects/angular-formio/grid/src/GridBodyComponent.ts +0 -80
- package/projects/angular-formio/grid/src/GridFooterComponent.ts +0 -25
- package/projects/angular-formio/grid/src/GridHeaderComponent.ts +0 -25
- package/projects/angular-formio/grid/src/form/FormGridBody.component.html +0 -23
- package/projects/angular-formio/grid/src/form/FormGridBody.component.scss +0 -4
- package/projects/angular-formio/grid/src/form/FormGridBody.component.ts +0 -15
- package/projects/angular-formio/grid/src/form/FormGridFooter.component.html +0 -21
- package/projects/angular-formio/grid/src/form/FormGridFooter.component.ts +0 -23
- package/projects/angular-formio/grid/src/form/FormGridHeader.component.html +0 -18
- package/projects/angular-formio/grid/src/form/FormGridHeader.component.ts +0 -24
- package/projects/angular-formio/grid/src/form/index.ts +0 -8
- package/projects/angular-formio/grid/src/form/time-since.pipe.ts +0 -31
- package/projects/angular-formio/grid/src/grid.component.html +0 -18
- package/projects/angular-formio/grid/src/grid.component.scss +0 -9
- package/projects/angular-formio/grid/src/grid.component.ts +0 -242
- package/projects/angular-formio/grid/src/grid.footer.scss +0 -14
- package/projects/angular-formio/grid/src/grid.module.ts +0 -57
- package/projects/angular-formio/grid/src/grid.service.ts +0 -16
- package/projects/angular-formio/grid/src/index.ts +0 -12
- package/projects/angular-formio/grid/src/public_api.ts +0 -5
- package/projects/angular-formio/grid/src/submission/SubmissionGridBody.component.html +0 -7
- package/projects/angular-formio/grid/src/submission/SubmissionGridBody.component.ts +0 -39
- package/projects/angular-formio/grid/src/submission/SubmissionGridFooter.component.html +0 -18
- package/projects/angular-formio/grid/src/submission/SubmissionGridFooter.component.ts +0 -20
- package/projects/angular-formio/grid/src/submission/SubmissionGridHeader.component.html +0 -11
- package/projects/angular-formio/grid/src/submission/SubmissionGridHeader.component.ts +0 -72
- package/projects/angular-formio/grid/src/submission/index.ts +0 -8
- package/projects/angular-formio/grid/src/types/grid-column.ts +0 -7
- package/projects/angular-formio/grid/src/types/grid-footer-positions.ts +0 -5
- package/projects/angular-formio/grid/src/types/grid-header.ts +0 -14
- package/projects/angular-formio/karma.conf.js +0 -32
- package/projects/angular-formio/manager/package.json +0 -15
- package/projects/angular-formio/manager/src/create/create.component.ts +0 -11
- package/projects/angular-formio/manager/src/delete/delete.component.html +0 -6
- package/projects/angular-formio/manager/src/delete/delete.component.ts +0 -37
- package/projects/angular-formio/manager/src/edit/edit.component.html +0 -19
- package/projects/angular-formio/manager/src/edit/edit.component.ts +0 -107
- package/projects/angular-formio/manager/src/form/form.component.html +0 -32
- package/projects/angular-formio/manager/src/form/form.component.ts +0 -73
- package/projects/angular-formio/manager/src/form-manager.config.ts +0 -26
- package/projects/angular-formio/manager/src/form-manager.module.ts +0 -54
- package/projects/angular-formio/manager/src/form-manager.routes.ts +0 -75
- package/projects/angular-formio/manager/src/form-manager.service.ts +0 -195
- package/projects/angular-formio/manager/src/index/index.component.html +0 -14
- package/projects/angular-formio/manager/src/index/index.component.scss +0 -22
- package/projects/angular-formio/manager/src/index/index.component.ts +0 -84
- package/projects/angular-formio/manager/src/index.ts +0 -16
- package/projects/angular-formio/manager/src/public_api.ts +0 -5
- package/projects/angular-formio/manager/src/submission/delete/delete.component.html +0 -6
- package/projects/angular-formio/manager/src/submission/delete/delete.component.ts +0 -26
- package/projects/angular-formio/manager/src/submission/edit/edit.component.html +0 -7
- package/projects/angular-formio/manager/src/submission/edit/edit.component.ts +0 -18
- package/projects/angular-formio/manager/src/submission/index/index.component.html +0 -1
- package/projects/angular-formio/manager/src/submission/index/index.component.ts +0 -18
- package/projects/angular-formio/manager/src/submission/submission/submission.component.html +0 -8
- package/projects/angular-formio/manager/src/submission/submission/submission.component.ts +0 -24
- package/projects/angular-formio/manager/src/submission/view/view.component.html +0 -7
- package/projects/angular-formio/manager/src/submission/view/view.component.ts +0 -9
- package/projects/angular-formio/manager/src/view/view.component.html +0 -10
- package/projects/angular-formio/manager/src/view/view.component.ts +0 -41
- package/projects/angular-formio/ng-package.json +0 -14
- package/projects/angular-formio/package.json +0 -39
- package/projects/angular-formio/resource/package.json +0 -11
- package/projects/angular-formio/resource/src/create/create.component.html +0 -13
- package/projects/angular-formio/resource/src/create/create.component.scss +0 -3
- package/projects/angular-formio/resource/src/create/create.component.ts +0 -37
- package/projects/angular-formio/resource/src/delete/delete.component.html +0 -5
- package/projects/angular-formio/resource/src/delete/delete.component.ts +0 -24
- package/projects/angular-formio/resource/src/edit/edit.component.html +0 -6
- package/projects/angular-formio/resource/src/edit/edit.component.ts +0 -33
- package/projects/angular-formio/resource/src/index/index.component.html +0 -10
- package/projects/angular-formio/resource/src/index/index.component.ts +0 -66
- package/projects/angular-formio/resource/src/index.js +0 -24
- package/projects/angular-formio/resource/src/index.ts +0 -11
- package/projects/angular-formio/resource/src/public_api.ts +0 -5
- package/projects/angular-formio/resource/src/resource.component.html +0 -7
- package/projects/angular-formio/resource/src/resource.component.ts +0 -48
- package/projects/angular-formio/resource/src/resource.config.ts +0 -17
- package/projects/angular-formio/resource/src/resource.module.ts +0 -43
- package/projects/angular-formio/resource/src/resource.routes.ts +0 -43
- package/projects/angular-formio/resource/src/resource.service.ts +0 -232
- package/projects/angular-formio/resource/src/resources.service.ts +0 -24
- package/projects/angular-formio/resource/src/view/view.component.html +0 -6
- package/projects/angular-formio/resource/src/view/view.component.ts +0 -19
- package/projects/angular-formio/src/FormioBaseComponent.ts +0 -507
- package/projects/angular-formio/src/components/alerts/formio.alerts.component.html +0 -3
- package/projects/angular-formio/src/components/alerts/formio.alerts.component.ts +0 -19
- package/projects/angular-formio/src/components/alerts/formio.alerts.ts +0 -21
- package/projects/angular-formio/src/components/alerts/parse-html-content.pipe.ts +0 -15
- package/projects/angular-formio/src/components/formbuilder/formbuilder.component.html +0 -1
- package/projects/angular-formio/src/components/formbuilder/formbuilder.component.ts +0 -216
- package/projects/angular-formio/src/components/formio/formio.component.html +0 -8
- package/projects/angular-formio/src/components/formio/formio.component.ts +0 -33
- package/projects/angular-formio/src/components/loader/formio.loader.component.html +0 -3
- package/projects/angular-formio/src/components/loader/formio.loader.component.scss +0 -26
- package/projects/angular-formio/src/components/loader/formio.loader.component.ts +0 -10
- package/projects/angular-formio/src/core.ts +0 -21
- package/projects/angular-formio/src/custom-component/create-custom-component.ts +0 -173
- package/projects/angular-formio/src/custom-component/custom-tags.service.ts +0 -10
- package/projects/angular-formio/src/custom-component/register-custom-component.ts +0 -41
- package/projects/angular-formio/src/elements.common.ts +0 -31
- package/projects/angular-formio/src/formio-promise.service.ts +0 -36
- package/projects/angular-formio/src/formio.common.ts +0 -81
- package/projects/angular-formio/src/formio.config.ts +0 -9
- package/projects/angular-formio/src/formio.module.ts +0 -39
- package/projects/angular-formio/src/formio.service.ts +0 -57
- package/projects/angular-formio/src/formio.utils.ts +0 -23
- package/projects/angular-formio/src/index.ts +0 -5
- package/projects/angular-formio/src/public-api.ts +0 -5
- package/projects/angular-formio/src/test.ts +0 -26
- package/projects/angular-formio/src/types/alerts-position.ts +0 -6
- package/projects/angular-formio/src/types/formio-metadata.ts +0 -10
- package/projects/angular-formio/src/types/formio-submission.ts +0 -20
- package/projects/angular-formio/tsconfig.lib.json +0 -27
- package/projects/angular-formio/tsconfig.lib.prod.json +0 -8
- package/projects/angular-formio/tsconfig.spec.json +0 -17
- package/projects/angular-formio/tslint.json +0 -17
- package/tsconfig.json +0 -28
- package/tslint.json +0 -140
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { ApplicationRef, EventEmitter, Injectable, Optional } from '@angular/core';
|
|
2
|
+
import { FormioResourceConfig } from './resource.config';
|
|
3
|
+
import { FormioResources } from './resources.service';
|
|
4
|
+
import { FormioPromiseService } from '@formio/angular';
|
|
5
|
+
import { FormioAlerts } from '@formio/angular';
|
|
6
|
+
import { FormioAppConfig } from '@formio/angular';
|
|
7
|
+
import Promise from 'native-promise-only';
|
|
8
|
+
import { Formio, Utils } from 'formiojs';
|
|
9
|
+
import _ from 'lodash';
|
|
10
|
+
export class FormioResourceService {
|
|
11
|
+
constructor(appConfig, config, resourcesService, appRef) {
|
|
12
|
+
this.appConfig = appConfig;
|
|
13
|
+
this.config = config;
|
|
14
|
+
this.resourcesService = resourcesService;
|
|
15
|
+
this.appRef = appRef;
|
|
16
|
+
this.initialized = false;
|
|
17
|
+
this.isLoading = true;
|
|
18
|
+
this.alerts = new FormioAlerts();
|
|
19
|
+
this.refresh = new EventEmitter();
|
|
20
|
+
this.formLoaded = new Promise((resolve, reject) => {
|
|
21
|
+
this.formResolve = resolve;
|
|
22
|
+
this.formReject = reject;
|
|
23
|
+
});
|
|
24
|
+
this.init();
|
|
25
|
+
}
|
|
26
|
+
initialize() {
|
|
27
|
+
console.warn('FormioResourceService.initialize() has been deprecated.');
|
|
28
|
+
}
|
|
29
|
+
init() {
|
|
30
|
+
if (this.initialized) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.initialized = true;
|
|
34
|
+
if (this.appConfig && this.appConfig.appUrl) {
|
|
35
|
+
Formio.setBaseUrl(this.appConfig.apiUrl);
|
|
36
|
+
Formio.setProjectUrl(this.appConfig.appUrl);
|
|
37
|
+
Formio.formOnly = this.appConfig.formOnly;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
console.error('You must provide an AppConfig within your application!');
|
|
41
|
+
}
|
|
42
|
+
// Create the form url and load the resources.
|
|
43
|
+
this.formUrl = this.appConfig.appUrl + '/' + this.config.form;
|
|
44
|
+
this.resource = { data: {} };
|
|
45
|
+
// Add this resource service to the list of all resources in context.
|
|
46
|
+
if (this.resourcesService) {
|
|
47
|
+
this.resources = this.resourcesService.resources;
|
|
48
|
+
this.resources[this.config.name] = this;
|
|
49
|
+
}
|
|
50
|
+
return this.loadForm();
|
|
51
|
+
}
|
|
52
|
+
onError(error) {
|
|
53
|
+
this.alerts.setAlert({
|
|
54
|
+
type: 'danger',
|
|
55
|
+
message: error.message || error
|
|
56
|
+
});
|
|
57
|
+
if (this.resourcesService) {
|
|
58
|
+
this.resourcesService.error.emit(error);
|
|
59
|
+
}
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
onFormError(err) {
|
|
63
|
+
this.formReject(err);
|
|
64
|
+
this.onError(err);
|
|
65
|
+
}
|
|
66
|
+
setContext(route) {
|
|
67
|
+
this.resourceId = route.snapshot.params['id'];
|
|
68
|
+
this.resource = { data: {} };
|
|
69
|
+
this.resourceUrl = this.appConfig.appUrl + '/' + this.config.form;
|
|
70
|
+
if (this.resourceId) {
|
|
71
|
+
this.resourceUrl += '/submission/' + this.resourceId;
|
|
72
|
+
}
|
|
73
|
+
this.formio = new FormioPromiseService(this.resourceUrl);
|
|
74
|
+
if (this.resourcesService) {
|
|
75
|
+
this.resources[this.config.name] = this;
|
|
76
|
+
}
|
|
77
|
+
this.loadParents();
|
|
78
|
+
}
|
|
79
|
+
loadForm() {
|
|
80
|
+
this.formFormio = new FormioPromiseService(this.formUrl);
|
|
81
|
+
this.isLoading = true;
|
|
82
|
+
this.formLoading = this.formFormio
|
|
83
|
+
.loadForm()
|
|
84
|
+
.then((form) => {
|
|
85
|
+
this.form = form;
|
|
86
|
+
this.formResolve(form);
|
|
87
|
+
this.isLoading = false;
|
|
88
|
+
this.loadParents();
|
|
89
|
+
return form;
|
|
90
|
+
}, (err) => this.onFormError(err))
|
|
91
|
+
.catch((err) => this.onFormError(err));
|
|
92
|
+
return this.formLoading;
|
|
93
|
+
}
|
|
94
|
+
loadParents() {
|
|
95
|
+
if (!this.config.parents || !this.config.parents.length) {
|
|
96
|
+
return Promise.resolve([]);
|
|
97
|
+
}
|
|
98
|
+
if (!this.resourcesService) {
|
|
99
|
+
console.warn('You must provide the FormioResources within your application to use nested resources.');
|
|
100
|
+
return Promise.resolve([]);
|
|
101
|
+
}
|
|
102
|
+
return this.formLoading.then((form) => {
|
|
103
|
+
// Iterate through the list of parents.
|
|
104
|
+
const _parentsLoaded = [];
|
|
105
|
+
this.config.parents.forEach((parent) => {
|
|
106
|
+
const resourceName = parent.resource || parent;
|
|
107
|
+
const resourceField = parent.field || parent;
|
|
108
|
+
const filterResource = parent.hasOwnProperty('filter') ? parent.filter : true;
|
|
109
|
+
if (this.resources.hasOwnProperty(resourceName) && this.resources[resourceName].resourceLoaded) {
|
|
110
|
+
_parentsLoaded.push(this.resources[resourceName].resourceLoaded.then((resource) => {
|
|
111
|
+
let parentPath = '';
|
|
112
|
+
Utils.eachComponent(form.components, (component, path) => {
|
|
113
|
+
if (component.key === resourceField) {
|
|
114
|
+
component.hidden = true;
|
|
115
|
+
component.clearOnHide = false;
|
|
116
|
+
_.set(this.resource.data, path, resource);
|
|
117
|
+
parentPath = path;
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
return {
|
|
122
|
+
name: parentPath,
|
|
123
|
+
filter: filterResource,
|
|
124
|
+
resource
|
|
125
|
+
};
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
// When all the parents have loaded, emit that to the onParents emitter.
|
|
130
|
+
return Promise.all(_parentsLoaded).then((parents) => {
|
|
131
|
+
this.refresh.emit({
|
|
132
|
+
form: form,
|
|
133
|
+
submission: this.resource
|
|
134
|
+
});
|
|
135
|
+
return parents;
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
onSubmissionError(err) {
|
|
140
|
+
this.onError(err);
|
|
141
|
+
}
|
|
142
|
+
loadResource(route) {
|
|
143
|
+
this.setContext(route);
|
|
144
|
+
this.isLoading = true;
|
|
145
|
+
this.resourceLoading = this.resourceLoaded = this.formio
|
|
146
|
+
.loadSubmission(null, { ignoreCache: true })
|
|
147
|
+
.then((resource) => {
|
|
148
|
+
this.resource = resource;
|
|
149
|
+
this.isLoading = false;
|
|
150
|
+
this.refresh.emit({
|
|
151
|
+
property: 'submission',
|
|
152
|
+
value: this.resource
|
|
153
|
+
});
|
|
154
|
+
return resource;
|
|
155
|
+
}, (err) => this.onSubmissionError(err))
|
|
156
|
+
.catch((err) => this.onSubmissionError(err));
|
|
157
|
+
return this.resourceLoading;
|
|
158
|
+
}
|
|
159
|
+
save(resource) {
|
|
160
|
+
const formio = resource._id ? this.formio : this.formFormio;
|
|
161
|
+
return formio
|
|
162
|
+
.saveSubmission(resource)
|
|
163
|
+
.then((saved) => {
|
|
164
|
+
this.resource = saved;
|
|
165
|
+
return saved;
|
|
166
|
+
}, (err) => this.onError(err))
|
|
167
|
+
.catch((err) => this.onError(err));
|
|
168
|
+
}
|
|
169
|
+
remove() {
|
|
170
|
+
return this.formio
|
|
171
|
+
.deleteSubmission()
|
|
172
|
+
.then(() => {
|
|
173
|
+
this.resource = null;
|
|
174
|
+
}, (err) => this.onError(err))
|
|
175
|
+
.catch((err) => this.onError(err));
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
FormioResourceService.decorators = [
|
|
179
|
+
{ type: Injectable }
|
|
180
|
+
];
|
|
181
|
+
FormioResourceService.ctorParameters = () => [
|
|
182
|
+
{ type: FormioAppConfig },
|
|
183
|
+
{ type: FormioResourceConfig },
|
|
184
|
+
{ type: FormioResources, decorators: [{ type: Optional }] },
|
|
185
|
+
{ type: ApplicationRef }
|
|
186
|
+
];
|
|
187
|
+
//# sourceMappingURL=data:application/json;base64,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udDtcbiAgICAgICAgY29uc3QgcmVzb3VyY2VGaWVsZCA9IHBhcmVudC5maWVsZCB8fCBwYXJlbnQ7XG4gICAgICAgIGNvbnN0IGZpbHRlclJlc291cmNlID0gcGFyZW50Lmhhc093blByb3BlcnR5KCdmaWx0ZXInKSA/IHBhcmVudC5maWx0ZXIgOiB0cnVlO1xuICAgICAgICBpZiAodGhpcy5yZXNvdXJjZXMuaGFzT3duUHJvcGVydHkocmVzb3VyY2VOYW1lKSAmJiB0aGlzLnJlc291cmNlc1tyZXNvdXJjZU5hbWVdLnJlc291cmNlTG9hZGVkKSB7XG4gICAgICAgICAgX3BhcmVudHNMb2FkZWQucHVzaChcbiAgICAgICAgICAgIHRoaXMucmVzb3VyY2VzW3Jlc291cmNlTmFtZV0ucmVzb3VyY2VMb2FkZWQudGhlbigocmVzb3VyY2U6IGFueSkgPT4ge1xuICAgICAgICAgICAgICBsZXQgcGFyZW50UGF0aCA9ICcnO1xuICAgICAgICAgICAgICBVdGlscy5lYWNoQ29tcG9uZW50KGZvcm0uY29tcG9uZW50cywgKGNvbXBvbmVudCwgcGF0aCkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChjb21wb25lbnQua2V5ID09PSByZXNvdXJjZUZpZWxkKSB7XG4gICAgICAgICAgICAgICAgICBjb21wb25lbnQuaGlkZGVuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgIGNvbXBvbmVudC5jbGVhck9uSGlkZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgXy5zZXQodGhpcy5yZXNvdXJjZS5kYXRhLCBwYXRoLCByZXNvdXJjZSk7XG4gICAgICAgICAgICAgICAgICBwYXJlbnRQYXRoID0gcGF0aDtcbiAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgbmFtZTogcGFyZW50UGF0aCxcbiAgICAgICAgICAgICAgICBmaWx0ZXI6IGZpbHRlclJlc291cmNlLFxuICAgICAgICAgICAgICAgIHJlc291cmNlXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICAvLyBXaGVuIGFsbCB0aGUgcGFyZW50cyBoYXZlIGxvYWRlZCwgZW1pdCB0aGF0IHRvIHRoZSBvblBhcmVudHMgZW1pdHRlci5cbiAgICAgIHJldHVybiBQcm9taXNlLmFsbChfcGFyZW50c0xvYWRlZCkudGhlbigocGFyZW50czogYW55KSA9PiB7XG4gICAgICAgIHRoaXMucmVmcmVzaC5lbWl0KHtcbiAgICAgICAgICBmb3JtOiBmb3JtLFxuICAgICAgICAgIHN1Ym1pc3Npb246IHRoaXMucmVzb3VyY2VcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiBwYXJlbnRzO1xuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICBvblN1Ym1pc3Npb25FcnJvcihlcnI6IGFueSkge1xuICAgIHRoaXMub25FcnJvcihlcnIpO1xuICB9XG5cbiAgbG9hZFJlc291cmNlKHJvdXRlOiBBY3RpdmF0ZWRSb3V0ZSkge1xuICAgIHRoaXMuc2V0Q29udGV4dChyb3V0ZSk7XG4gICAgdGhpcy5pc0xvYWRpbmcgPSB0cnVlO1xuICAgIHRoaXMucmVzb3VyY2VMb2FkaW5nID0gdGhpcy5yZXNvdXJjZUxvYWRlZCA9IHRoaXMuZm9ybWlvXG4gICAgICAubG9hZFN1Ym1pc3Npb24obnVsbCwge2lnbm9yZUNhY2hlOiB0cnVlfSlcbiAgICAgIC50aGVuKFxuICAgICAgICAocmVzb3VyY2U6IGFueSkgPT4ge1xuICAgICAgICAgIHRoaXMucmVzb3VyY2UgPSByZXNvdXJjZTtcbiAgICAgICAgICB0aGlzLmlzTG9hZGluZyA9IGZhbHNlO1xuICAgICAgICAgIHRoaXMucmVmcmVzaC5lbWl0KHtcbiAgICAgICAgICAgIHByb3BlcnR5OiAnc3VibWlzc2lvbicsXG4gICAgICAgICAgICB2YWx1ZTogdGhpcy5yZXNvdXJjZVxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiByZXNvdXJjZTtcbiAgICAgICAgfSxcbiAgICAgICAgKGVycjogYW55KSA9PiB0aGlzLm9uU3VibWlzc2lvbkVycm9yKGVycilcbiAgICAgIClcbiAgICAgIC5jYXRjaCgoZXJyOiBhbnkpID0+IHRoaXMub25TdWJtaXNzaW9uRXJyb3IoZXJyKSk7XG4gICAgcmV0dXJuIHRoaXMucmVzb3VyY2VMb2FkaW5nO1xuICB9XG5cbiAgc2F2ZShyZXNvdXJjZTogYW55KSB7XG4gICAgY29uc3QgZm9ybWlvID0gcmVzb3VyY2UuX2lkID8gdGhpcy5mb3JtaW8gOiB0aGlzLmZvcm1Gb3JtaW87XG4gICAgcmV0dXJuIGZvcm1pb1xuICAgICAgLnNhdmVTdWJtaXNzaW9uKHJlc291cmNlKVxuICAgICAgLnRoZW4oXG4gICAgICAgIChzYXZlZDogYW55KSA9PiB7XG4gICAgICAgICAgdGhpcy5yZXNvdXJjZSA9IHNhdmVkO1xuICAgICAgICAgIHJldHVybiBzYXZlZDtcbiAgICAgICAgfSxcbiAgICAgICAgKGVycjogYW55KSA9PiB0aGlzLm9uRXJyb3IoZXJyKVxuICAgICAgKVxuICAgICAgLmNhdGNoKChlcnI6IGFueSkgPT4gdGhpcy5vbkVycm9yKGVycikpO1xuICB9XG5cbiAgcmVtb3ZlKCkge1xuICAgIHJldHVybiB0aGlzLmZvcm1pb1xuICAgICAgLmRlbGV0ZVN1Ym1pc3Npb24oKVxuICAgICAgLnRoZW4oXG4gICAgICAgICgpID0+IHtcbiAgICAgICAgICB0aGlzLnJlc291cmNlID0gbnVsbDtcbiAgICAgICAgfSxcbiAgICAgICAgKGVycjogYW55KSA9PiB0aGlzLm9uRXJyb3IoZXJyKVxuICAgICAgKVxuICAgICAgLmNhdGNoKChlcnI6IGFueSkgPT4gdGhpcy5vbkVycm9yKGVycikpO1xuICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Injectable, EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormioAuthService } from '@formio/angular/auth';
|
|
3
|
+
export class FormioResources {
|
|
4
|
+
constructor(auth) {
|
|
5
|
+
this.auth = auth;
|
|
6
|
+
this.resources = {};
|
|
7
|
+
this.error = new EventEmitter();
|
|
8
|
+
this.onError = this.error;
|
|
9
|
+
this.resources = {
|
|
10
|
+
currentUser: {
|
|
11
|
+
resourceLoaded: this.auth.userReady
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
FormioResources.decorators = [
|
|
17
|
+
{ type: Injectable }
|
|
18
|
+
];
|
|
19
|
+
FormioResources.ctorParameters = () => [
|
|
20
|
+
{ type: FormioAuthService }
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb3VyY2VzLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWZvcm1pby9yZXNvdXJjZS9zcmMvcmVzb3VyY2VzLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxZQUFZLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekQsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFPekQsTUFBTSxPQUFPLGVBQWU7SUFJMUIsWUFDUyxJQUF3QjtRQUF4QixTQUFJLEdBQUosSUFBSSxDQUFvQjtRQUpqQyxjQUFTLEdBQXNCLEVBQUUsQ0FBQztRQU1oQyxJQUFJLENBQUMsS0FBSyxHQUFHLElBQUksWUFBWSxFQ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component } from '@angular/core';
|
|
2
|
+
import { FormioResourceService } from '../resource.service';
|
|
3
|
+
import { FormioResourceConfig } from '../resource.config';
|
|
4
|
+
import { Formio } from 'formiojs';
|
|
5
|
+
export class FormioResourceViewComponent {
|
|
6
|
+
constructor(service, config) {
|
|
7
|
+
this.service = service;
|
|
8
|
+
this.config = config;
|
|
9
|
+
this.submission = { data: {} };
|
|
10
|
+
}
|
|
11
|
+
ngOnDestroy() {
|
|
12
|
+
Formio.clearCache();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
FormioResourceViewComponent.decorators = [
|
|
16
|
+
{ type: Component, args: [{
|
|
17
|
+
template: "<formio\n [form]=\"service.form\"\n [submission]=\"service.resource\"\n [hideComponents]=\"config.parents\"\n [readOnly]=\"true\"\n></formio>\n"
|
|
18
|
+
},] }
|
|
19
|
+
];
|
|
20
|
+
FormioResourceViewComponent.ctorParameters = () => [
|
|
21
|
+
{ type: FormioResourceService },
|
|
22
|
+
{ type: FormioResourceConfig }
|
|
23
|
+
];
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlldy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWZvcm1pby9yZXNvdXJjZS9zcmMvdmlldy92aWV3LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFZLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzVELE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQzFELE9BQU8sRUFBQyxNQUFNLEVBQUMsTUFBTSxVQUFVLENBQUM7QUFLaEMsTUFBTSxPQUFPLDJCQUEyQjtJQ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==
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
1
|
import { Injectable, EventEmitter, Component, NgModule } from '@angular/core';
|
|
2
|
+
import { FormioAppConfig, extendRouter, FormioModule } from '@formio/angular';
|
|
3
3
|
import { get, each } from 'lodash';
|
|
4
4
|
import { Formio } from 'formiojs';
|
|
5
|
-
import * as i2 from '@formio/angular';
|
|
6
|
-
import { extendRouter, FormioModule } from '@formio/angular';
|
|
7
|
-
import * as i1 from '@angular/router';
|
|
8
|
-
import { RouterModule } from '@angular/router';
|
|
9
5
|
import { CommonModule } from '@angular/common';
|
|
6
|
+
import { RouterModule } from '@angular/router';
|
|
10
7
|
|
|
11
8
|
class FormioAuthConfig {
|
|
12
9
|
}
|
|
13
|
-
FormioAuthConfig
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type: Injectable
|
|
17
|
-
}], null, null); })();
|
|
10
|
+
FormioAuthConfig.decorators = [
|
|
11
|
+
{ type: Injectable }
|
|
12
|
+
];
|
|
18
13
|
var FormioOauthType;
|
|
19
14
|
(function (FormioOauthType) {
|
|
20
15
|
FormioOauthType["okta"] = "okta";
|
|
@@ -168,107 +163,63 @@ class FormioAuthService {
|
|
|
168
163
|
.catch(() => this.logoutError());
|
|
169
164
|
}
|
|
170
165
|
}
|
|
171
|
-
FormioAuthService
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
166
|
+
FormioAuthService.decorators = [
|
|
167
|
+
{ type: Injectable }
|
|
168
|
+
];
|
|
169
|
+
FormioAuthService.ctorParameters = () => [
|
|
170
|
+
{ type: FormioAppConfig },
|
|
171
|
+
{ type: FormioAuthConfig }
|
|
172
|
+
];
|
|
176
173
|
|
|
177
174
|
class FormioAuthComponent {
|
|
178
175
|
}
|
|
179
|
-
FormioAuthComponent
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
i0.ɵɵelementStart(3, "li", 3);
|
|
185
|
-
i0.ɵɵelementStart(4, "a", 4);
|
|
186
|
-
i0.ɵɵtext(5, "Login");
|
|
187
|
-
i0.ɵɵelementEnd();
|
|
188
|
-
i0.ɵɵelementEnd();
|
|
189
|
-
i0.ɵɵelementStart(6, "li", 3);
|
|
190
|
-
i0.ɵɵelementStart(7, "a", 5);
|
|
191
|
-
i0.ɵɵtext(8, "Register");
|
|
192
|
-
i0.ɵɵelementEnd();
|
|
193
|
-
i0.ɵɵelementEnd();
|
|
194
|
-
i0.ɵɵelementStart(9, "li", 3);
|
|
195
|
-
i0.ɵɵelementStart(10, "a", 6);
|
|
196
|
-
i0.ɵɵtext(11, "Reset Password");
|
|
197
|
-
i0.ɵɵelementEnd();
|
|
198
|
-
i0.ɵɵelementEnd();
|
|
199
|
-
i0.ɵɵelementEnd();
|
|
200
|
-
i0.ɵɵelementEnd();
|
|
201
|
-
i0.ɵɵelementStart(12, "div", 7);
|
|
202
|
-
i0.ɵɵelement(13, "router-outlet");
|
|
203
|
-
i0.ɵɵelementEnd();
|
|
204
|
-
i0.ɵɵelementEnd();
|
|
205
|
-
} }, directives: [i1.RouterLinkActive, i1.RouterLinkWithHref, i1.RouterOutlet], encapsulation: 2 });
|
|
206
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormioAuthComponent, [{
|
|
207
|
-
type: Component,
|
|
208
|
-
args: [{
|
|
209
|
-
templateUrl: './auth.component.html'
|
|
210
|
-
}]
|
|
211
|
-
}], null, null); })();
|
|
176
|
+
FormioAuthComponent.decorators = [
|
|
177
|
+
{ type: Component, args: [{
|
|
178
|
+
template: "<div class=\"card card-primary panel panel-default\">\n <div class=\"card-header panel-heading\">\n <ul class=\"nav nav-tabs card-header-tabs\">\n <li class=\"nav-item\" role=\"presentation\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"login\" routerLinkActive=\"active\">Login</a></li>\n <li class=\"nav-item\" role=\"presentation\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"register\" routerLinkActive=\"active\">Register</a></li>\n <li class=\"nav-item\" role=\"presentation\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"resetpass\" routerLinkActive=\"active\">Reset Password</a></li>\n </ul>\n </div>\n <div class=\"card-body panel-body\">\n <router-outlet></router-outlet>\n </div>\n</div>\n"
|
|
179
|
+
},] }
|
|
180
|
+
];
|
|
212
181
|
|
|
213
182
|
class FormioAuthLoginComponent {
|
|
214
183
|
constructor(service) {
|
|
215
184
|
this.service = service;
|
|
216
185
|
}
|
|
217
186
|
}
|
|
218
|
-
FormioAuthLoginComponent
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormioAuthLoginComponent, [{
|
|
227
|
-
type: Component,
|
|
228
|
-
args: [{
|
|
229
|
-
templateUrl: './login.component.html'
|
|
230
|
-
}]
|
|
231
|
-
}], function () { return [{ type: FormioAuthService }]; }, null); })();
|
|
187
|
+
FormioAuthLoginComponent.decorators = [
|
|
188
|
+
{ type: Component, args: [{
|
|
189
|
+
template: "<formio [src]=\"service.loginForm\" (submit)=\"service.onLoginSubmit($event)\"></formio>\n"
|
|
190
|
+
},] }
|
|
191
|
+
];
|
|
192
|
+
FormioAuthLoginComponent.ctorParameters = () => [
|
|
193
|
+
{ type: FormioAuthService }
|
|
194
|
+
];
|
|
232
195
|
|
|
233
196
|
class FormioAuthRegisterComponent {
|
|
234
197
|
constructor(service) {
|
|
235
198
|
this.service = service;
|
|
236
199
|
}
|
|
237
200
|
}
|
|
238
|
-
FormioAuthRegisterComponent
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormioAuthRegisterComponent, [{
|
|
247
|
-
type: Component,
|
|
248
|
-
args: [{
|
|
249
|
-
templateUrl: './register.component.html'
|
|
250
|
-
}]
|
|
251
|
-
}], function () { return [{ type: FormioAuthService }]; }, null); })();
|
|
201
|
+
FormioAuthRegisterComponent.decorators = [
|
|
202
|
+
{ type: Component, args: [{
|
|
203
|
+
template: "<formio [src]=\"service.registerForm\" (submit)=\"service.onRegisterSubmit($event)\"></formio>\n"
|
|
204
|
+
},] }
|
|
205
|
+
];
|
|
206
|
+
FormioAuthRegisterComponent.ctorParameters = () => [
|
|
207
|
+
{ type: FormioAuthService }
|
|
208
|
+
];
|
|
252
209
|
|
|
253
210
|
class FormioResetPassComponent {
|
|
254
211
|
constructor(service) {
|
|
255
212
|
this.service = service;
|
|
256
213
|
}
|
|
257
214
|
}
|
|
258
|
-
FormioResetPassComponent
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormioResetPassComponent, [{
|
|
267
|
-
type: Component,
|
|
268
|
-
args: [{
|
|
269
|
-
templateUrl: './resetpass.component.html'
|
|
270
|
-
}]
|
|
271
|
-
}], function () { return [{ type: FormioAuthService }]; }, null); })();
|
|
215
|
+
FormioResetPassComponent.decorators = [
|
|
216
|
+
{ type: Component, args: [{
|
|
217
|
+
template: "<formio [src]=\"service.resetPassForm\" (submit)=\"service.onResetPassSubmit($event)\"></formio>\n"
|
|
218
|
+
},] }
|
|
219
|
+
];
|
|
220
|
+
FormioResetPassComponent.ctorParameters = () => [
|
|
221
|
+
{ type: FormioAuthService }
|
|
222
|
+
];
|
|
272
223
|
|
|
273
224
|
function FormioAuthRoutes(config) {
|
|
274
225
|
return [
|
|
@@ -306,16 +257,8 @@ class FormioAuth {
|
|
|
306
257
|
return extendRouter(FormioAuth, config, FormioAuthRoutes);
|
|
307
258
|
}
|
|
308
259
|
}
|
|
309
|
-
FormioAuth
|
|
310
|
-
|
|
311
|
-
FormioAuth.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
|
|
312
|
-
CommonModule,
|
|
313
|
-
FormioModule,
|
|
314
|
-
RouterModule
|
|
315
|
-
]] });
|
|
316
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormioAuth, [{
|
|
317
|
-
type: NgModule,
|
|
318
|
-
args: [{
|
|
260
|
+
FormioAuth.decorators = [
|
|
261
|
+
{ type: NgModule, args: [{
|
|
319
262
|
imports: [
|
|
320
263
|
CommonModule,
|
|
321
264
|
FormioModule,
|
|
@@ -327,14 +270,8 @@ FormioAuth.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
|
|
|
327
270
|
FormioAuthRegisterComponent,
|
|
328
271
|
FormioResetPassComponent
|
|
329
272
|
]
|
|
330
|
-
}]
|
|
331
|
-
|
|
332
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(FormioAuth, { declarations: [FormioAuthComponent,
|
|
333
|
-
FormioAuthLoginComponent,
|
|
334
|
-
FormioAuthRegisterComponent,
|
|
335
|
-
FormioResetPassComponent], imports: [CommonModule,
|
|
336
|
-
FormioModule,
|
|
337
|
-
RouterModule] }); })();
|
|
273
|
+
},] }
|
|
274
|
+
];
|
|
338
275
|
|
|
339
276
|
/*
|
|
340
277
|
* Public API Surface of angular-formio
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formio-angular-auth.js","sources":["../../../projects/angular-formio/auth/src/auth.config.ts","../../../projects/angular-formio/auth/src/auth.service.ts","../../../projects/angular-formio/auth/src/auth.component.ts","../../../projects/angular-formio/auth/src/login/login.component.ts","../../../projects/angular-formio/auth/src/register/register.component.ts","../../../projects/angular-formio/auth/src/resetpass/resetpass.component.ts","../../../projects/angular-formio/auth/src/auth.routes.ts","../../../projects/angular-formio/auth/src/auth.module.ts","../../../projects/angular-formio/auth/src/public_api.ts","../../../projects/angular-formio/auth/src/formio-angular-auth.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nexport interface FormioAuthFormConfig {\n path?: string;\n form?: string;\n component?: any;\n}\n\nexport interface FormioAuthRouteConfig {\n auth?: any;\n login?: any;\n register?: any;\n resetpass?: any;\n}\n\n@Injectable()\nexport class FormioAuthConfig {\n component?: any;\n delayAuth?: any;\n login?: FormioAuthFormConfig;\n register?: FormioAuthFormConfig;\n resetpass?: FormioAuthFormConfig;\n oauth?: FormioOAuthConfig;\n}\n\n\nexport interface FormioOAuthConfig {\n type: FormioOauthType;\n options: FormioOktaConfig | FormioSamlConfig;\n}\n\nexport enum FormioOauthType {\n okta = 'okta',\n saml = 'saml',\n}\n\nexport interface FormioOktaConfig extends OktaConfig {\n formio?: any;\n}\n\nexport interface FormioSamlConfig {\n relay: string;\n}\n\n// for more details about Okta configuration options see https://github.com/okta/okta-auth-js#configuration-reference\nexport interface OktaConfig {\n url?: string;\n tokenManager?: OktaTokenManagerConfig;\n issuer?: string;\n clientId?: string;\n redirectUri?: string;\n postLogoutRedirectUri?: string;\n pkce?: boolean;\n authorizeUrl?: string;\n userinfoUrl?: string;\n tokenUrl?: string;\n ignoreSignature?: boolean;\n maxClockSkew?: number;\n scopes?: string[];\n httpRequestClient?: Function;\n}\n\nexport interface OktaTokenManagerConfig {\n storage?: string | {\n getItem?: Function;\n setItem?: Function;\n };\n secure?: boolean;\n autoRenew?: boolean;\n expireEarlySeconds?: number;\n storageKey?: string;\n}\n","import { EventEmitter, Injectable, Inject } from '@angular/core';\nimport { FormioAuthConfig } from './auth.config';\nimport { FormioAppConfig } from '@formio/angular';\nimport { get, each } from 'lodash';\nimport { Formio } from 'formiojs';\n\n@Injectable()\nexport class FormioAuthService {\n public user: any;\n public authenticated = false;\n\n public loginForm: string;\n public onLogin: EventEmitter<object>;\n public onLogout: EventEmitter<object>;\n\n public registerForm: string;\n public onRegister: EventEmitter<object>;\n public onUser: EventEmitter<object>;\n public onError: EventEmitter<any>;\n\n public resetPassForm: string;\n public onResetPass: EventEmitter<object>;\n\n public ready: Promise<boolean>;\n public readyResolve: any;\n public readyReject: any;\n\n public projectReady?: Promise<any>;\n public accessReady?: Promise<any>;\n public userReady?: Promise<any>;\n public formAccess: any = {};\n public submissionAccess: any = {};\n public roles: any;\n public is: any = {};\n\n constructor(\n public appConfig: FormioAppConfig,\n public config: FormioAuthConfig\n ) {\n this.user = null;\n\n if (this.appConfig && this.appConfig.appUrl) {\n Formio.setBaseUrl(this.appConfig.apiUrl);\n Formio.setProjectUrl(this.appConfig.appUrl);\n Formio.formOnly = !!this.appConfig.formOnly;\n } else {\n console.error('You must provide an AppConfig within your application!');\n }\n\n this.loginForm =\n this.appConfig.appUrl +\n '/' +\n get(this.config, 'login.form', 'user/login');\n this.registerForm =\n this.appConfig.appUrl +\n '/' +\n get(this.config, 'register.form', 'user/register');\n this.resetPassForm =\n this.appConfig.appUrl +\n '/' +\n get(this.config, 'register.form', 'resetpass');\n this.onLogin = new EventEmitter();\n this.onLogout = new EventEmitter();\n this.onRegister = new EventEmitter();\n this.onUser = new EventEmitter();\n this.onError = new EventEmitter();\n\n this.ready = new Promise((resolve: any, reject: any) => {\n this.readyResolve = resolve;\n this.readyReject = reject;\n });\n\n // Register for the core events.\n Formio.events.on('formio.badToken', () => this.logoutError());\n Formio.events.on('formio.sessionExpired', () => this.logoutError());\n if (!this.config.delayAuth) {\n this.init();\n }\n }\n\n onLoginSubmit(submission: object) {\n this.setUser(submission);\n this.onLogin.emit(submission);\n }\n\n onRegisterSubmit(submission: object) {\n this.setUser(submission);\n this.onRegister.emit(submission);\n }\n\n onResetPassSubmit(submission: object) {\n this.onResetPass.emit(submission);\n }\n\n init() {\n this.projectReady = Formio.makeStaticRequest(this.appConfig.appUrl).then(\n (project: any) => {\n each(project.access, (access: any) => {\n this.formAccess[access.type] = access.roles;\n });\n },\n (): any => {\n this.formAccess = {};\n return null;\n }\n );\n\n // Get the access for this project.\n this.accessReady = Formio.makeStaticRequest(\n this.appConfig.appUrl + '/access'\n ).then(\n (access: any) => {\n each(access.forms, (form: any) => {\n this.submissionAccess[form.name] = {};\n form.submissionAccess.forEach((subAccess: any) => {\n this.submissionAccess[form.name][subAccess.type] = subAccess.roles;\n });\n });\n this.roles = access.roles;\n return access;\n },\n (): any => {\n this.roles = {};\n return null;\n }\n );\n\n let currentUserPromise: Promise<any>;\n if (this.config.oauth) {\n // Make a fix to the hash to remove starting \"/\" that angular might put there.\n if (window.location.hash && window.location.hash.match(/^#\\/access_token/)) {\n history.pushState(null, null, window.location.hash.replace(/^#\\/access_token/, '#access_token'));\n }\n\n // Initiate the SSO if they provide oauth settings.\n currentUserPromise = Formio.ssoInit(this.config.oauth.type, this.config.oauth.options);\n } else {\n currentUserPromise = Formio.currentUser();\n }\n\n this.userReady = currentUserPromise.then((user: any) => {\n this.setUser(user);\n return user;\n });\n\n // Trigger we are redy when all promises have resolved.\n if (this.accessReady) {\n this.accessReady\n .then(() => this.projectReady)\n .then(() => this.userReady)\n .then(() => this.readyResolve(true))\n .catch((err: any) => this.readyReject(err));\n }\n }\n\n setUser(user: any) {\n const namespace = Formio.namespace || 'formio';\n if (user) {\n this.user = user;\n localStorage.setItem(`${namespace}AppUser`, JSON.stringify(user));\n this.setUserRoles();\n } else {\n this.user = null;\n this.is = {};\n localStorage.removeItem(`${namespace}AppUser`);\n Formio.clearCache();\n Formio.setUser(null);\n }\n\n this.authenticated = !!Formio.getToken();\n this.onUser.emit(this.user);\n }\n\n setUserRoles() {\n if (this.accessReady) {\n this.accessReady.then(() => {\n each(this.roles, (role: any, roleName: string) => {\n if (this.user.roles.indexOf(role._id) !== -1) {\n this.is[roleName] = true;\n }\n });\n });\n }\n }\n\n logoutError() {\n this.setUser(null);\n const namespace = Formio.namespace || 'formio';\n localStorage.removeItem(`${namespace}Token`);\n this.onError.emit();\n }\n\n logout() {\n this.setUser(null);\n const namespace = Formio.namespace || 'formio';\n localStorage.removeItem(`${namespace}Token`);\n Formio.logout()\n .then(() => this.onLogout.emit())\n .catch(() => this.logoutError());\n }\n}\n","import { Component } from '@angular/core';\n@Component({\n templateUrl: './auth.component.html'\n})\nexport class FormioAuthComponent {}\n","import { Component } from '@angular/core';\nimport { FormioAuthService } from '../auth.service';\n@Component({\n templateUrl: './login.component.html'\n})\nexport class FormioAuthLoginComponent {\n constructor(public service: FormioAuthService) {}\n}\n","import { Component } from '@angular/core';\nimport { FormioAuthService } from '../auth.service';\n@Component({\n templateUrl: './register.component.html'\n})\nexport class FormioAuthRegisterComponent {\n constructor(public service: FormioAuthService) {}\n}\n","import { Component } from '@angular/core';\nimport { FormioAuthService } from '../auth.service';\n@Component({\n templateUrl: './resetpass.component.html'\n})\nexport class FormioResetPassComponent {\n constructor(public service: FormioAuthService) {}\n}\n","import { Routes } from '@angular/router';\nimport { FormioAuthRouteConfig } from './auth.config';\nimport { FormioAuthComponent } from './auth.component';\nimport { FormioAuthLoginComponent } from './login/login.component';\nimport { FormioAuthRegisterComponent } from './register/register.component';\nimport { FormioResetPassComponent } from './resetpass/resetpass.component';\n\nexport function FormioAuthRoutes(config?: FormioAuthRouteConfig): Routes {\n return [\n {\n path: '',\n component: config && config.auth ? config.auth : FormioAuthComponent,\n children: [\n {\n path: '',\n redirectTo: 'login',\n pathMatch: 'full'\n },\n {\n path: 'login',\n component: config && config.login ? config.login : FormioAuthLoginComponent\n },\n {\n path: 'register',\n component: config && config.register ? config.register : FormioAuthRegisterComponent\n },\n {\n path: 'resetpass',\n component: config && config.resetpass ? config.resetpass : FormioResetPassComponent\n }\n ]\n }\n ];\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { FormioModule } from '@formio/angular';\nimport { FormioAuthComponent } from './auth.component';\nimport { FormioAuthLoginComponent } from './login/login.component';\nimport { FormioAuthRegisterComponent } from './register/register.component';\nimport { FormioResetPassComponent } from './resetpass/resetpass.component';\nimport { FormioAuthRouteConfig } from './auth.config';\nimport { FormioAuthRoutes } from './auth.routes';\nimport { extendRouter } from '@formio/angular';\n\n@NgModule({\n imports: [\n CommonModule,\n FormioModule,\n RouterModule\n ],\n declarations: [\n FormioAuthComponent,\n FormioAuthLoginComponent,\n FormioAuthRegisterComponent,\n FormioResetPassComponent\n ]\n})\nexport class FormioAuth {\n static forRoot(config?: FormioAuthRouteConfig): any {\n return extendRouter(FormioAuth, config, FormioAuthRoutes);\n }\n static forChild(config?: FormioAuthRouteConfig): any {\n return extendRouter(FormioAuth, config, FormioAuthRoutes);\n }\n}\n","/*\n * Public API Surface of angular-formio\n */\n\nexport * from './index';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAgBa,gBAAgB;;;YAD5B,UAAU;;AAgBX,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,gCAAa,CAAA;AACf,CAAC,EAHW,eAAe,KAAf,eAAe;;MCxBd,iBAAiB;IA4B5B,YACS,SAA0B,EAC1B,MAAwB;QADxB,cAAS,GAAT,SAAS,CAAiB;QAC1B,WAAM,GAAN,MAAM,CAAkB;QA5B1B,kBAAa,GAAG,KAAK,CAAC;QAqBtB,eAAU,GAAQ,EAAE,CAAC;QACrB,qBAAgB,GAAQ,EAAE,CAAC;QAE3B,OAAE,GAAQ,EAAE,CAAC;QAMlB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;YAC3C,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACzC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAC5C,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CA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