@formio/angular 5.2.1 → 5.2.3-rc.2
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} +4 -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 +1507 -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 +466 -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 +1083 -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 -1012
- 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,624 @@
|
|
|
1
|
+
import { EventEmitter, Component, Input, Output, ViewChild, TemplateRef, Injectable, ViewEncapsulation, ComponentFactoryResolver, ChangeDetectorRef, ViewContainerRef, Pipe, NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { RouterModule } from '@angular/router';
|
|
5
|
+
import { FormioPromiseService, FormioAlerts, FormioModule } from '@formio/angular';
|
|
6
|
+
import { each, clone, get } from 'lodash';
|
|
7
|
+
import { Components, Utils, Formio } from 'formiojs';
|
|
8
|
+
import { PaginationModule } from 'ngx-bootstrap/pagination';
|
|
9
|
+
|
|
10
|
+
var GridFooterPositions;
|
|
11
|
+
(function (GridFooterPositions) {
|
|
12
|
+
GridFooterPositions[GridFooterPositions["bottom"] = 0] = "bottom";
|
|
13
|
+
GridFooterPositions[GridFooterPositions["top"] = 1] = "top";
|
|
14
|
+
GridFooterPositions[GridFooterPositions["both"] = 2] = "both";
|
|
15
|
+
})(GridFooterPositions || (GridFooterPositions = {}));
|
|
16
|
+
|
|
17
|
+
class GridHeaderComponent {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.headers = [];
|
|
20
|
+
this.sort = new EventEmitter();
|
|
21
|
+
}
|
|
22
|
+
get numHeaders() {
|
|
23
|
+
return this.headers.length;
|
|
24
|
+
}
|
|
25
|
+
load(formio, query, columns) {
|
|
26
|
+
return Promise.resolve([]);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
GridHeaderComponent.decorators = [
|
|
30
|
+
{ type: Component, args: [{
|
|
31
|
+
template: ''
|
|
32
|
+
},] }
|
|
33
|
+
];
|
|
34
|
+
GridHeaderComponent.ctorParameters = () => [];
|
|
35
|
+
GridHeaderComponent.propDecorators = {
|
|
36
|
+
actionAllowed: [{ type: Input }],
|
|
37
|
+
sort: [{ type: Output }],
|
|
38
|
+
template: [{ type: ViewChild, args: [TemplateRef, { static: true },] }]
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
var SortType;
|
|
42
|
+
(function (SortType) {
|
|
43
|
+
SortType["ASC"] = "asc";
|
|
44
|
+
SortType["DESC"] = "desc";
|
|
45
|
+
})(SortType || (SortType = {}));
|
|
46
|
+
|
|
47
|
+
class FormGridHeaderComponent extends GridHeaderComponent {
|
|
48
|
+
load(formio) {
|
|
49
|
+
this.header = {
|
|
50
|
+
label: 'Title',
|
|
51
|
+
key: 'title',
|
|
52
|
+
sort: SortType.ASC
|
|
53
|
+
};
|
|
54
|
+
this.headers = [this.header];
|
|
55
|
+
return Promise.resolve(this.headers);
|
|
56
|
+
}
|
|
57
|
+
get numHeaders() {
|
|
58
|
+
return 2;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
FormGridHeaderComponent.decorators = [
|
|
62
|
+
{ type: Component, args: [{
|
|
63
|
+
selector: 'form-grid-header',
|
|
64
|
+
template: "<ng-template>\n <thead>\n <tr>\n <th>\n <div class=\"row\">\n <div class=\"col-sm-8\">\n <a (click)=\"sort.emit(header)\">\n {{ header.label }} <span [ngClass]=\"{'glyphicon-triangle-top fa-caret-up': (header.sort === 'asc'), 'glyphicon-triangle-bottom fa-caret-down': (header.sort === 'desc')}\" class=\"glyphicon fa\" *ngIf=\"header.sort\"></span>\n </a>\n </div>\n <div class=\"col-sm-4\">\n Operations\n </div>\n </div>\n </th>\n </tr>\n </thead>\n</ng-template>\n"
|
|
65
|
+
},] }
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
class GridService {
|
|
69
|
+
constructor() { }
|
|
70
|
+
setRows(rows) {
|
|
71
|
+
this.rows = rows;
|
|
72
|
+
}
|
|
73
|
+
getFormsPerPage() {
|
|
74
|
+
var _a;
|
|
75
|
+
return (_a = this.rows) === null || _a === void 0 ? void 0 : _a.length;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
GridService.decorators = [
|
|
79
|
+
{ type: Injectable }
|
|
80
|
+
];
|
|
81
|
+
GridService.ctorParameters = () => [];
|
|
82
|
+
|
|
83
|
+
class GridBodyComponent {
|
|
84
|
+
constructor(service) {
|
|
85
|
+
this.service = service;
|
|
86
|
+
this.firstItem = 0;
|
|
87
|
+
this.lastItem = 0;
|
|
88
|
+
this.skip = 0;
|
|
89
|
+
this.limit = 0;
|
|
90
|
+
this.total = 0;
|
|
91
|
+
this.rowSelect = new EventEmitter();
|
|
92
|
+
this.rowAction = new EventEmitter();
|
|
93
|
+
this.loading = true;
|
|
94
|
+
}
|
|
95
|
+
load(formio, query) {
|
|
96
|
+
return formio.loadForm(query);
|
|
97
|
+
}
|
|
98
|
+
onRowSelect(event, row) {
|
|
99
|
+
event.preventDefault();
|
|
100
|
+
this.rowSelect.emit(row);
|
|
101
|
+
}
|
|
102
|
+
onRowAction(event, row, action) {
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
this.rowAction.emit({ row, action });
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Set the rows for this Grid body.
|
|
108
|
+
*
|
|
109
|
+
* @param query
|
|
110
|
+
* @param items
|
|
111
|
+
* @return any
|
|
112
|
+
*/
|
|
113
|
+
setRows(query, items) {
|
|
114
|
+
this.rows = [];
|
|
115
|
+
if (typeof items !== 'object') {
|
|
116
|
+
this.firstItem = 0;
|
|
117
|
+
this.lastItem = 0;
|
|
118
|
+
this.total = 0;
|
|
119
|
+
this.skip = 0;
|
|
120
|
+
this.loading = false;
|
|
121
|
+
this.service.setRows(this.rows);
|
|
122
|
+
return this.rows;
|
|
123
|
+
}
|
|
124
|
+
this.firstItem = query.skip + 1;
|
|
125
|
+
this.lastItem = this.firstItem + items.length - 1;
|
|
126
|
+
if (this.lastItem === 0) {
|
|
127
|
+
this.firstItem = 0;
|
|
128
|
+
}
|
|
129
|
+
this.total = items.serverCount;
|
|
130
|
+
this.limit = query.limit;
|
|
131
|
+
this.skip = Math.floor(items.skip / query.limit) + 1;
|
|
132
|
+
this.loading = false;
|
|
133
|
+
each(items, (item) => {
|
|
134
|
+
this.rows.push(clone(item));
|
|
135
|
+
});
|
|
136
|
+
this.service.setRows(this.rows);
|
|
137
|
+
return this.rows;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
GridBodyComponent.decorators = [
|
|
141
|
+
{ type: Component, args: [{
|
|
142
|
+
template: ''
|
|
143
|
+
},] }
|
|
144
|
+
];
|
|
145
|
+
GridBodyComponent.ctorParameters = () => [
|
|
146
|
+
{ type: GridService }
|
|
147
|
+
];
|
|
148
|
+
GridBodyComponent.propDecorators = {
|
|
149
|
+
header: [{ type: Input }],
|
|
150
|
+
actionAllowed: [{ type: Input }],
|
|
151
|
+
rowSelect: [{ type: Output }],
|
|
152
|
+
rowAction: [{ type: Output }],
|
|
153
|
+
template: [{ type: ViewChild, args: [TemplateRef, { static: true },] }]
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
class FormGridBodyComponent extends GridBodyComponent {
|
|
157
|
+
load(formio, query) {
|
|
158
|
+
query = query || {};
|
|
159
|
+
return formio.loadForms({ params: query }).then((forms) => this.setRows(query, forms));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
FormGridBodyComponent.decorators = [
|
|
163
|
+
{ type: Component, args: [{
|
|
164
|
+
selector: 'form-grid-body',
|
|
165
|
+
template: "<ng-template>\n <tbody *ngIf=\"rows\">\n <tr *ngFor=\"let form of rows\">\n <td>\n <div class=\"row\">\n <div class=\"col-sm-8\">\n <a routerLink=\"{{form._id}}/view\" (click)=\"onRowSelect($event, form)\"><h5>{{ form.title }}</h5></a>\n <div class=\"form-updated small text-muted\">\n Updated {{ form.modified | timeSince }} ago\n </div>\n </div>\n <div class=\"col-sm-4\">\n <button *ngIf=\"actionAllowed('formView')\" class=\"btn btn-outline-secondary btn-sm form-btn form-btn-use\" (click)=\"onRowAction($event, form, 'view')\"><span class=\"fa fa-pencil\"></span> Enter Data</button> \n <button *ngIf=\"actionAllowed('formSubmission')\" class=\"btn btn-outline-secondary btn-sm form-btn\" (click)=\"onRowAction($event, form, 'submission')\"><span class=\"fa fa-list-alt\"></span> View Data</button> \n <button *ngIf=\"actionAllowed('formEdit')\" class=\"btn btn-outline-secondary btn-sm form-btn\" (click)=\"onRowAction($event, form, 'edit')\"><span class=\"fa fa-edit\"></span> Edit Form</button> \n <button *ngIf=\"actionAllowed('formPermission')\" class=\"btn btn-outline-secondary btn-sm form-btn\" (click)=\"onRowAction($event, form, 'permissions')\"><span class=\"fa fa-lock\"></span> Permissions</button> \n <button *ngIf=\"actionAllowed('formDelete')\" class=\"btn btn-danger btn-sm form-btn form-btn-delete\" (click)=\"onRowAction($event, form, 'delete')\" title=\"Delete form\"><span class=\"fa fa-trash\"></span></button>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n</ng-template>\n",
|
|
166
|
+
styles: [".form-btn{font-size:.75rem;margin:2px 0}\n"]
|
|
167
|
+
},] }
|
|
168
|
+
];
|
|
169
|
+
|
|
170
|
+
class GridFooterComponent {
|
|
171
|
+
constructor() {
|
|
172
|
+
this.footerPositions = GridFooterPositions;
|
|
173
|
+
this.pageChanged = new EventEmitter();
|
|
174
|
+
this.createItem = new EventEmitter();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
GridFooterComponent.decorators = [
|
|
178
|
+
{ type: Component, args: [{
|
|
179
|
+
template: ''
|
|
180
|
+
},] }
|
|
181
|
+
];
|
|
182
|
+
GridFooterComponent.ctorParameters = () => [];
|
|
183
|
+
GridFooterComponent.propDecorators = {
|
|
184
|
+
header: [{ type: Input }],
|
|
185
|
+
body: [{ type: Input }],
|
|
186
|
+
createText: [{ type: Input }],
|
|
187
|
+
size: [{ type: Input }],
|
|
188
|
+
actionAllowed: [{ type: Input }],
|
|
189
|
+
pageChanged: [{ type: Output }],
|
|
190
|
+
createItem: [{ type: Output }],
|
|
191
|
+
template: [{ type: ViewChild, args: [TemplateRef, { static: true },] }]
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
class FormGridFooterComponent extends GridFooterComponent {
|
|
195
|
+
constructor() {
|
|
196
|
+
super();
|
|
197
|
+
}
|
|
198
|
+
ngOnInit() {
|
|
199
|
+
if (!this.createText) {
|
|
200
|
+
this.createText = 'Create Form';
|
|
201
|
+
}
|
|
202
|
+
if (!this.size) {
|
|
203
|
+
this.size = 7;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
FormGridFooterComponent.decorators = [
|
|
208
|
+
{ type: Component, args: [{
|
|
209
|
+
template: "<ng-template #footer let-position=\"position\" let-label=\"label\">\n <thead class=\"formio-grid-footer\" *ngIf=\"position === footerPositions.top\">\n <ng-container [ngTemplateOutlet]=\"defaultFooterTemplate\" [ngTemplateOutletContext]=\"{ label: label }\"></ng-container>\n </thead>\n <tfoot class=\"formio-grid-footer\" *ngIf=\"position === footerPositions.bottom\">\n <ng-container [ngTemplateOutlet]=\"defaultFooterTemplate\" [ngTemplateOutletContext]=\"{ label: label }\"></ng-container>\n </tfoot>\n</ng-template>\n\n<ng-template let-label=\"label\" #defaultFooterTemplate>\n <tr>\n <td *ngIf=\"header\" [colSpan]=\"header.numHeaders\">\n <button *ngIf=\"actionAllowed('formCreate')\" class=\"btn btn-primary form-btn-use pull-left float-left\" (click)=\"createItem.emit('form')\"><i class=\"glyphicon glyphicon-plus fa fa-plus\"></i> {{ createText }}</button>\n <span class=\"pull-right float-right item-counter\"><span class=\"page-num\">{{ body.firstItem }} - {{ body.lastItem }}</span> / {{ body.total }} total</span>\n <span [attr.aria-label]=\"label\" role=\"navigation\">\n <pagination [totalItems]=\"body.total\" [itemsPerPage]=\"body.limit\" [(ngModel)]=\"body.skip\" (pageChanged)=\"pageChanged.emit($event)\" [maxSize]=\"size\" class=\"justify-content-center pagination-sm\">\n </pagination>\n </span>\n </td>\n </tr>\n</ng-template>\n",
|
|
210
|
+
encapsulation: ViewEncapsulation.None,
|
|
211
|
+
styles: ["tfoot.formio-grid-footer td{padding:.3rem}tfoot.formio-grid-footer .page-num{font-size:1.4em}tfoot.formio-grid-footer ul.pagination{margin-top:5px;margin-bottom:0}\n"]
|
|
212
|
+
},] }
|
|
213
|
+
];
|
|
214
|
+
FormGridFooterComponent.ctorParameters = () => [];
|
|
215
|
+
|
|
216
|
+
var FormComponents = {
|
|
217
|
+
header: FormGridHeaderComponent,
|
|
218
|
+
body: FormGridBodyComponent,
|
|
219
|
+
footer: FormGridFooterComponent
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
class SubmissionGridHeaderComponent extends GridHeaderComponent {
|
|
223
|
+
load(formio, query, columns) {
|
|
224
|
+
query = query || {};
|
|
225
|
+
return formio.loadForm({ params: query }).then((form) => {
|
|
226
|
+
this.headers = [];
|
|
227
|
+
this.formComponents = new Map();
|
|
228
|
+
this.setComponents(form.components);
|
|
229
|
+
columns ? columns.forEach(column => {
|
|
230
|
+
this.setHeader(this.getHeaderForColumn(column, this.formComponents.get(column.path)));
|
|
231
|
+
}) : this.setComponentsHeaders(this.formComponents);
|
|
232
|
+
return this.headers;
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
setHeader(header) {
|
|
236
|
+
this.headers.push(header);
|
|
237
|
+
}
|
|
238
|
+
getHeaderForColumn(column, component, sort) {
|
|
239
|
+
return {
|
|
240
|
+
label: column.label,
|
|
241
|
+
key: column.path,
|
|
242
|
+
sort: sort,
|
|
243
|
+
component: component ? Components.create(component, null, null, true) : undefined,
|
|
244
|
+
renderCell: column ? column.renderCell : undefined
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
getHeaderForComponent(component, path, sort) {
|
|
248
|
+
return {
|
|
249
|
+
label: component.label,
|
|
250
|
+
key: path,
|
|
251
|
+
sort: sort,
|
|
252
|
+
component: component ? Components.create(component, null, null, true) : undefined,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
// Set headers from components in case if columns are not provided
|
|
256
|
+
setComponentsHeaders(components, sort) {
|
|
257
|
+
components.forEach((component, path) => {
|
|
258
|
+
if (component.input &&
|
|
259
|
+
(!component.hasOwnProperty('tableView') || component.tableView)) {
|
|
260
|
+
this.setHeader(this.getHeaderForComponent(component, path, sort));
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
// Map components
|
|
265
|
+
setComponents(components) {
|
|
266
|
+
Utils.eachComponent(components, (component, newPath) => {
|
|
267
|
+
this.formComponents.set(`data.${newPath}`, component);
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
SubmissionGridHeaderComponent.decorators = [
|
|
272
|
+
{ type: Component, args: [{
|
|
273
|
+
template: "<ng-template>\n <thead>\n <tr>\n <th *ngFor=\"let header of headers\">\n <a (click)=\"sort.emit(header)\">\n {{ header.label }} <span [ngClass]=\"{'glyphicon-triangle-top': (header.sort === 'asc'), 'glyphicon-triangle-bottom': (header.sort === 'desc')}\" class=\"glyphicon\" *ngIf=\"header.sort\"></span>\n </a>\n </th>\n </tr>\n </thead>\n</ng-template>\n"
|
|
274
|
+
},] }
|
|
275
|
+
];
|
|
276
|
+
|
|
277
|
+
class SubmissionGridBodyComponent extends GridBodyComponent {
|
|
278
|
+
load(formio, query) {
|
|
279
|
+
query = query || {};
|
|
280
|
+
return formio.loadSubmissions({ params: query })
|
|
281
|
+
.then((submissions) => this.setRows(query, submissions));
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Render the cell data.
|
|
285
|
+
*
|
|
286
|
+
* @param submission
|
|
287
|
+
* @param header
|
|
288
|
+
* @return any
|
|
289
|
+
*/
|
|
290
|
+
view(submission, header) {
|
|
291
|
+
const cellValue = get(submission, header.key);
|
|
292
|
+
if (header.renderCell) {
|
|
293
|
+
return header.renderCell(cellValue, header.component);
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
if (header.component) {
|
|
297
|
+
if (header.component.getView) {
|
|
298
|
+
return header.component.getView(cellValue);
|
|
299
|
+
}
|
|
300
|
+
return header.component.asString(cellValue);
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
return cellValue.toString();
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
SubmissionGridBodyComponent.decorators = [
|
|
309
|
+
{ type: Component, args: [{
|
|
310
|
+
template: "<ng-template>\n <tbody>\n <tr *ngFor=\"let row of rows\" (click)=\"onRowSelect($event, row)\">\n <td *ngFor=\"let rowHeader of header.headers\" [innerHTML]=\"view(row, rowHeader)\"></td>\n </tr>\n </tbody>\n</ng-template>\n"
|
|
311
|
+
},] }
|
|
312
|
+
];
|
|
313
|
+
|
|
314
|
+
class SubmissionGridFooterComponent extends GridFooterComponent {
|
|
315
|
+
constructor() {
|
|
316
|
+
super();
|
|
317
|
+
}
|
|
318
|
+
ngOnInit() {
|
|
319
|
+
if (!this.size) {
|
|
320
|
+
this.size = 7;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
SubmissionGridFooterComponent.decorators = [
|
|
325
|
+
{ type: Component, args: [{
|
|
326
|
+
template: "<ng-template #footer let-position=\"position\">\n <thead class=\"formio-grid-footer\" *ngIf=\"position === footerPositions.top\">\n <ng-container [ngTemplateOutlet]=\"defaultFooterTemplate\"></ng-container>\n </thead>\n <tfoot class=\"formio-grid-footer\" *ngIf=\"position === footerPositions.bottom\">\n <ng-container [ngTemplateOutlet]=\"defaultFooterTemplate\"></ng-container>\n </tfoot>\n</ng-template>\n\n<ng-template #defaultFooterTemplate>\n <tr>\n <td *ngIf=\"header\" [colSpan]=\"header.numHeaders\">\n <button *ngIf=\"actionAllowed('submissionCreate') && createText\" class=\"btn btn-primary pull-left float-left\" (click)=\"createItem.emit('form')\"><i class=\"glyphicon glyphicon-plus fa fa-plus\"></i> {{ createText }}</button>\n <span class=\"pull-right float-right item-counter\"><span class=\"page-num\">{{ body.firstItem }} - {{ body.lastItem }}</span> / {{ body.total }} total</span>\n <pagination [totalItems]=\"body.total\" [itemsPerPage]=\"body.limit\" [(ngModel)]=\"body.skip\" (pageChanged)=\"pageChanged.emit($event)\" [maxSize]=\"size\" class=\"justify-content-center pagination-sm\"></pagination>\n </td>\n </tr>\n</ng-template>\n",
|
|
327
|
+
encapsulation: ViewEncapsulation.None,
|
|
328
|
+
styles: ["tfoot.formio-grid-footer td{padding:.3rem}tfoot.formio-grid-footer .page-num{font-size:1.4em}tfoot.formio-grid-footer ul.pagination{margin-top:5px;margin-bottom:0}\n"]
|
|
329
|
+
},] }
|
|
330
|
+
];
|
|
331
|
+
SubmissionGridFooterComponent.ctorParameters = () => [];
|
|
332
|
+
|
|
333
|
+
var SubmissionComponents = {
|
|
334
|
+
header: SubmissionGridHeaderComponent,
|
|
335
|
+
body: SubmissionGridBodyComponent,
|
|
336
|
+
footer: SubmissionGridFooterComponent
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
class FormioGridComponent {
|
|
340
|
+
constructor(alerts, resolver, ref) {
|
|
341
|
+
this.alerts = alerts;
|
|
342
|
+
this.resolver = resolver;
|
|
343
|
+
this.ref = ref;
|
|
344
|
+
this.footerPosition = GridFooterPositions.bottom;
|
|
345
|
+
this.page = 0;
|
|
346
|
+
this.isLoading = false;
|
|
347
|
+
this.initialized = false;
|
|
348
|
+
this.footerPositions = GridFooterPositions;
|
|
349
|
+
this.select = this.rowSelect = new EventEmitter();
|
|
350
|
+
this.rowAction = new EventEmitter();
|
|
351
|
+
this.createItem = new EventEmitter();
|
|
352
|
+
this.error = new EventEmitter();
|
|
353
|
+
this.isLoading = true;
|
|
354
|
+
}
|
|
355
|
+
createComponent(property, component) {
|
|
356
|
+
const factory = this.resolver.resolveComponentFactory(component);
|
|
357
|
+
const componentRef = property.createComponent(factory);
|
|
358
|
+
return componentRef.instance;
|
|
359
|
+
}
|
|
360
|
+
loadGrid(src) {
|
|
361
|
+
// If no source is provided, then skip.
|
|
362
|
+
if (!src && !this.formio) {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
// Do not double load.
|
|
366
|
+
if (this.formio && this.src && (src === this.src)) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
if (src) {
|
|
370
|
+
this.src = src;
|
|
371
|
+
this.formio = new FormioPromiseService(this.src, { formOnly: true });
|
|
372
|
+
}
|
|
373
|
+
// Load the header.
|
|
374
|
+
this.header.load(this.formio, {}, this.columns)
|
|
375
|
+
.then(() => this.setPage(0))
|
|
376
|
+
.catch(error => this.onError(error));
|
|
377
|
+
}
|
|
378
|
+
ngOnInit() {
|
|
379
|
+
// Create our components.
|
|
380
|
+
const comps = this.components || ((this.gridType === 'form') ? FormComponents : SubmissionComponents);
|
|
381
|
+
this.header = this.createComponent(this.headerElement, comps.header);
|
|
382
|
+
this.header.actionAllowed = this.actionAllowed.bind(this);
|
|
383
|
+
this.header.sort.subscribe(header => this.sortColumn(header));
|
|
384
|
+
this.body = this.createComponent(this.bodyElement, comps.body);
|
|
385
|
+
this.body.header = this.header;
|
|
386
|
+
this.body.actionAllowed = this.actionAllowed.bind(this);
|
|
387
|
+
this.body.rowSelect.subscribe(row => this.rowSelect.emit(row));
|
|
388
|
+
this.body.rowAction.subscribe(action => this.rowAction.emit(action));
|
|
389
|
+
this.footer = this.createComponent(this.footerElement, comps.footer);
|
|
390
|
+
this.footer.header = this.header;
|
|
391
|
+
this.footer.body = this.body;
|
|
392
|
+
this.footer.actionAllowed = this.actionAllowed.bind(this);
|
|
393
|
+
this.footer.createText = this.createText;
|
|
394
|
+
this.footer.size = this.size;
|
|
395
|
+
this.footer.pageChanged.subscribe(page => this.pageChanged(page));
|
|
396
|
+
this.footer.createItem.subscribe(item => this.createItem.emit(item));
|
|
397
|
+
}
|
|
398
|
+
ngOnChanges(changes) {
|
|
399
|
+
if (this.initialized) {
|
|
400
|
+
if ((changes.src && changes.src.currentValue) ||
|
|
401
|
+
(changes.formio && changes.formio.currentValue)) {
|
|
402
|
+
this.loadGrid(changes.src.currentValue);
|
|
403
|
+
}
|
|
404
|
+
if (changes.items && changes.items.currentValue) {
|
|
405
|
+
this.refreshGrid();
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
if (this.footer &&
|
|
409
|
+
(changes.createText && changes.createText.currentValue)) {
|
|
410
|
+
this.footer.createText = changes.createText.currentValue;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
ngAfterViewInit() {
|
|
414
|
+
this.alerts.setAlerts([]);
|
|
415
|
+
this.query = this.query || {};
|
|
416
|
+
if (this.refresh) {
|
|
417
|
+
this.refresh.subscribe((query) => this.refreshGrid(query));
|
|
418
|
+
}
|
|
419
|
+
this.loadGrid(this.src);
|
|
420
|
+
this.initialized = true;
|
|
421
|
+
this.ref.detectChanges();
|
|
422
|
+
}
|
|
423
|
+
actionAllowed(action) {
|
|
424
|
+
if (this.isActionAllowed) {
|
|
425
|
+
return this.isActionAllowed(action);
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
return true;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
onError(error) {
|
|
432
|
+
this.isLoading = false;
|
|
433
|
+
this.error.emit(error);
|
|
434
|
+
if (typeof error === 'string' || error.message) {
|
|
435
|
+
this.alerts.setAlert({
|
|
436
|
+
type: 'danger',
|
|
437
|
+
message: error.message || error
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
refreshGrid(query) {
|
|
442
|
+
this.alerts.setAlerts([]);
|
|
443
|
+
this.query = query || this.query;
|
|
444
|
+
if (!this.query.hasOwnProperty('limit')) {
|
|
445
|
+
this.query.limit = 10;
|
|
446
|
+
}
|
|
447
|
+
if (!this.query.hasOwnProperty('skip')) {
|
|
448
|
+
this.query.skip = 0;
|
|
449
|
+
}
|
|
450
|
+
this.isLoading = true;
|
|
451
|
+
this.ref.detectChanges();
|
|
452
|
+
Formio.cache = {};
|
|
453
|
+
let loader = null;
|
|
454
|
+
if (this.items) {
|
|
455
|
+
loader = Promise.resolve(this.body.setRows(this.query, this.items));
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
loader = this.body.load(this.formio, this.query);
|
|
459
|
+
}
|
|
460
|
+
return loader.then(info => {
|
|
461
|
+
this.isLoading = false;
|
|
462
|
+
this.initialized = true;
|
|
463
|
+
this.ref.detectChanges();
|
|
464
|
+
}).catch(error => this.onError(error));
|
|
465
|
+
}
|
|
466
|
+
setPage(num = -1) {
|
|
467
|
+
this.page = num !== -1 ? num : this.page;
|
|
468
|
+
if (!this.query.hasOwnProperty('limit')) {
|
|
469
|
+
this.query.limit = 10;
|
|
470
|
+
}
|
|
471
|
+
if (!this.query.hasOwnProperty('skip')) {
|
|
472
|
+
this.query.skip = 0;
|
|
473
|
+
}
|
|
474
|
+
this.query.skip = this.page * this.query.limit;
|
|
475
|
+
this.refreshGrid();
|
|
476
|
+
}
|
|
477
|
+
sortColumn(header) {
|
|
478
|
+
// Reset all other column sorts.
|
|
479
|
+
each(this.header.headers, (col) => {
|
|
480
|
+
if (col.key !== header.key) {
|
|
481
|
+
col.sort = '';
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
switch (header.sort) {
|
|
485
|
+
case 'asc':
|
|
486
|
+
header.sort = SortType.DESC;
|
|
487
|
+
this.query.sort = '-' + header.key;
|
|
488
|
+
break;
|
|
489
|
+
case 'desc':
|
|
490
|
+
header.sort = undefined;
|
|
491
|
+
delete this.query.sort;
|
|
492
|
+
break;
|
|
493
|
+
case undefined:
|
|
494
|
+
header.sort = SortType.ASC;
|
|
495
|
+
this.query.sort = header.key;
|
|
496
|
+
break;
|
|
497
|
+
}
|
|
498
|
+
this.refreshGrid();
|
|
499
|
+
}
|
|
500
|
+
pageChanged(page) {
|
|
501
|
+
this.setPage(page.page - 1);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
FormioGridComponent.decorators = [
|
|
505
|
+
{ type: Component, args: [{
|
|
506
|
+
selector: 'formio-grid',
|
|
507
|
+
template: "<ng-template #headerTemplate></ng-template>\n<ng-template #bodyTemplate></ng-template>\n<ng-template #footerTemplate></ng-template>\n<div class=\"formio-grid\">\n <formio-alerts [alerts]=\"alerts\"></formio-alerts>\n <table class=\"table table-bordered table-striped table-hover\">\n <ng-container *ngIf=\"initialized && [footerPositions.top, footerPositions.both].indexOf(footerPosition) !== -1\"\n [ngTemplateOutlet]=\"footer.template\" [ngTemplateOutletContext]=\"{ position: footerPositions.top, label: label }\">\n </ng-container>\n <ng-container *ngIf=\"initialized\"\n [ngTemplateOutlet]=\"header.template\"></ng-container>\n <formio-loader [isLoading]=\"isLoading\"></formio-loader>\n <ng-container *ngIf=\"initialized\" [ngTemplateOutlet]=\"body.template\"></ng-container>\n <ng-container *ngIf=\"initialized && [footerPositions.bottom, footerPositions.both].indexOf(footerPosition) !== -1\"\n [ngTemplateOutlet]=\"footer.template\" [ngTemplateOutletContext]=\"{ position: footerPositions.bottom, label: label }\">\n </ng-container>\n </table>\n</div>\n",
|
|
508
|
+
styles: [".formio-grid{position:relative;width:100%}.grid-refresh{height:400px;width:100%}\n"]
|
|
509
|
+
},] }
|
|
510
|
+
];
|
|
511
|
+
FormioGridComponent.ctorParameters = () => [
|
|
512
|
+
{ type: FormioAlerts },
|
|
513
|
+
{ type: ComponentFactoryResolver },
|
|
514
|
+
{ type: ChangeDetectorRef }
|
|
515
|
+
];
|
|
516
|
+
FormioGridComponent.propDecorators = {
|
|
517
|
+
footerPosition: [{ type: Input }],
|
|
518
|
+
src: [{ type: Input }],
|
|
519
|
+
items: [{ type: Input }],
|
|
520
|
+
onForm: [{ type: Input }],
|
|
521
|
+
query: [{ type: Input }],
|
|
522
|
+
refresh: [{ type: Input }],
|
|
523
|
+
columns: [{ type: Input }],
|
|
524
|
+
gridType: [{ type: Input }],
|
|
525
|
+
size: [{ type: Input }],
|
|
526
|
+
components: [{ type: Input }],
|
|
527
|
+
formio: [{ type: Input }],
|
|
528
|
+
label: [{ type: Input }],
|
|
529
|
+
createText: [{ type: Input }],
|
|
530
|
+
isActionAllowed: [{ type: Input }],
|
|
531
|
+
select: [{ type: Output }],
|
|
532
|
+
rowSelect: [{ type: Output }],
|
|
533
|
+
rowAction: [{ type: Output }],
|
|
534
|
+
createItem: [{ type: Output }],
|
|
535
|
+
error: [{ type: Output }],
|
|
536
|
+
headerElement: [{ type: ViewChild, args: ['headerTemplate', { read: ViewContainerRef, static: true },] }],
|
|
537
|
+
bodyElement: [{ type: ViewChild, args: ['bodyTemplate', { read: ViewContainerRef, static: true },] }],
|
|
538
|
+
footerElement: [{ type: ViewChild, args: ['footerTemplate', { read: ViewContainerRef, static: true },] }]
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
class TimeSince {
|
|
542
|
+
transform(date) {
|
|
543
|
+
const elapsed = (new Date().getTime() - new Date(date).getTime()) / 1000;
|
|
544
|
+
let interval;
|
|
545
|
+
if (interval >= 1) {
|
|
546
|
+
return interval + ' year' + (interval > 1 ? 's' : '');
|
|
547
|
+
}
|
|
548
|
+
interval = Math.floor(elapsed / 2592000);
|
|
549
|
+
if (interval >= 1) {
|
|
550
|
+
return interval + ' month' + (interval > 1 ? 's' : '');
|
|
551
|
+
}
|
|
552
|
+
interval = Math.floor(elapsed / 86400);
|
|
553
|
+
if (interval >= 1) {
|
|
554
|
+
return interval + ' day' + (interval > 1 ? 's' : '');
|
|
555
|
+
}
|
|
556
|
+
interval = Math.floor(elapsed / 3600);
|
|
557
|
+
if (interval >= 1) {
|
|
558
|
+
return interval + ' hour' + (interval > 1 ? 's' : '');
|
|
559
|
+
}
|
|
560
|
+
interval = Math.floor(elapsed / 60);
|
|
561
|
+
if (interval >= 1) {
|
|
562
|
+
return interval + ' minute' + (interval > 1 ? 's' : '');
|
|
563
|
+
}
|
|
564
|
+
return Math.floor(elapsed) + ' second' + (elapsed > 1 ? 's' : '');
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
TimeSince.decorators = [
|
|
568
|
+
{ type: Pipe, args: [{
|
|
569
|
+
name: 'timeSince'
|
|
570
|
+
},] }
|
|
571
|
+
];
|
|
572
|
+
|
|
573
|
+
class FormioGrid {
|
|
574
|
+
}
|
|
575
|
+
FormioGrid.decorators = [
|
|
576
|
+
{ type: NgModule, args: [{
|
|
577
|
+
imports: [
|
|
578
|
+
CommonModule,
|
|
579
|
+
FormsModule,
|
|
580
|
+
FormioModule,
|
|
581
|
+
RouterModule,
|
|
582
|
+
PaginationModule.forRoot()
|
|
583
|
+
],
|
|
584
|
+
declarations: [
|
|
585
|
+
FormioGridComponent,
|
|
586
|
+
FormGridHeaderComponent,
|
|
587
|
+
FormGridBodyComponent,
|
|
588
|
+
FormGridFooterComponent,
|
|
589
|
+
SubmissionGridHeaderComponent,
|
|
590
|
+
SubmissionGridBodyComponent,
|
|
591
|
+
SubmissionGridFooterComponent,
|
|
592
|
+
GridHeaderComponent,
|
|
593
|
+
GridBodyComponent,
|
|
594
|
+
GridFooterComponent,
|
|
595
|
+
TimeSince
|
|
596
|
+
],
|
|
597
|
+
exports: [
|
|
598
|
+
FormioGridComponent
|
|
599
|
+
],
|
|
600
|
+
entryComponents: [
|
|
601
|
+
FormGridHeaderComponent,
|
|
602
|
+
FormGridBodyComponent,
|
|
603
|
+
FormGridFooterComponent,
|
|
604
|
+
SubmissionGridHeaderComponent,
|
|
605
|
+
SubmissionGridBodyComponent,
|
|
606
|
+
SubmissionGridFooterComponent
|
|
607
|
+
],
|
|
608
|
+
providers: [
|
|
609
|
+
FormioAlerts,
|
|
610
|
+
GridService
|
|
611
|
+
]
|
|
612
|
+
},] }
|
|
613
|
+
];
|
|
614
|
+
|
|
615
|
+
/*
|
|
616
|
+
* Public API Surface of angular-formio
|
|
617
|
+
*/
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Generated bundle index. Do not edit.
|
|
621
|
+
*/
|
|
622
|
+
|
|
623
|
+
export { FormGridBodyComponent, FormGridFooterComponent, FormGridHeaderComponent, FormioGrid, FormioGridComponent, GridBodyComponent, GridFooterComponent, GridHeaderComponent, GridService, SubmissionGridBodyComponent, SubmissionGridFooterComponent, SubmissionGridHeaderComponent, TimeSince as ɵa };
|
|
624
|
+
//# sourceMappingURL=formio-angular-grid.js.map
|