@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,1010 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/router'), require('@formio/angular'), require('lodash'), require('formiojs'), require('ngx-bootstrap/pagination')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@formio/angular/grid', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/router', '@formio/angular', 'lodash', 'formiojs', 'ngx-bootstrap/pagination'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.formio = global.formio || {}, global.formio.angular = global.formio.angular || {}, global.formio.angular.grid = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.router, global.formio.angular, global._, global.formiojs, global["ngx-bootstrap/pagination"]));
|
|
5
|
+
})(this, (function (exports, core, common, forms, router, angular, lodash, formiojs, pagination) { 'use strict';
|
|
6
|
+
|
|
7
|
+
var GridFooterPositions;
|
|
8
|
+
(function (GridFooterPositions) {
|
|
9
|
+
GridFooterPositions[GridFooterPositions["bottom"] = 0] = "bottom";
|
|
10
|
+
GridFooterPositions[GridFooterPositions["top"] = 1] = "top";
|
|
11
|
+
GridFooterPositions[GridFooterPositions["both"] = 2] = "both";
|
|
12
|
+
})(GridFooterPositions || (GridFooterPositions = {}));
|
|
13
|
+
|
|
14
|
+
/*! *****************************************************************************
|
|
15
|
+
Copyright (c) Microsoft Corporation.
|
|
16
|
+
|
|
17
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
18
|
+
purpose with or without fee is hereby granted.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
21
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
22
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
23
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
24
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
25
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
26
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
27
|
+
***************************************************************************** */
|
|
28
|
+
/* global Reflect, Promise */
|
|
29
|
+
var extendStatics = function (d, b) {
|
|
30
|
+
extendStatics = Object.setPrototypeOf ||
|
|
31
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
32
|
+
function (d, b) { for (var p in b)
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
34
|
+
d[p] = b[p]; };
|
|
35
|
+
return extendStatics(d, b);
|
|
36
|
+
};
|
|
37
|
+
function __extends(d, b) {
|
|
38
|
+
if (typeof b !== "function" && b !== null)
|
|
39
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
40
|
+
extendStatics(d, b);
|
|
41
|
+
function __() { this.constructor = d; }
|
|
42
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
43
|
+
}
|
|
44
|
+
var __assign = function () {
|
|
45
|
+
__assign = Object.assign || function __assign(t) {
|
|
46
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
47
|
+
s = arguments[i];
|
|
48
|
+
for (var p in s)
|
|
49
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
50
|
+
t[p] = s[p];
|
|
51
|
+
}
|
|
52
|
+
return t;
|
|
53
|
+
};
|
|
54
|
+
return __assign.apply(this, arguments);
|
|
55
|
+
};
|
|
56
|
+
function __rest(s, e) {
|
|
57
|
+
var t = {};
|
|
58
|
+
for (var p in s)
|
|
59
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
60
|
+
t[p] = s[p];
|
|
61
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
62
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
63
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
64
|
+
t[p[i]] = s[p[i]];
|
|
65
|
+
}
|
|
66
|
+
return t;
|
|
67
|
+
}
|
|
68
|
+
function __decorate(decorators, target, key, desc) {
|
|
69
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
70
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
71
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
72
|
+
else
|
|
73
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
74
|
+
if (d = decorators[i])
|
|
75
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
76
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
77
|
+
}
|
|
78
|
+
function __param(paramIndex, decorator) {
|
|
79
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
80
|
+
}
|
|
81
|
+
function __metadata(metadataKey, metadataValue) {
|
|
82
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
83
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
84
|
+
}
|
|
85
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
86
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
87
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
88
|
+
function fulfilled(value) { try {
|
|
89
|
+
step(generator.next(value));
|
|
90
|
+
}
|
|
91
|
+
catch (e) {
|
|
92
|
+
reject(e);
|
|
93
|
+
} }
|
|
94
|
+
function rejected(value) { try {
|
|
95
|
+
step(generator["throw"](value));
|
|
96
|
+
}
|
|
97
|
+
catch (e) {
|
|
98
|
+
reject(e);
|
|
99
|
+
} }
|
|
100
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
101
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function __generator(thisArg, body) {
|
|
105
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
106
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
107
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
108
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
109
|
+
function step(op) {
|
|
110
|
+
if (f)
|
|
111
|
+
throw new TypeError("Generator is already executing.");
|
|
112
|
+
while (_)
|
|
113
|
+
try {
|
|
114
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
115
|
+
return t;
|
|
116
|
+
if (y = 0, t)
|
|
117
|
+
op = [op[0] & 2, t.value];
|
|
118
|
+
switch (op[0]) {
|
|
119
|
+
case 0:
|
|
120
|
+
case 1:
|
|
121
|
+
t = op;
|
|
122
|
+
break;
|
|
123
|
+
case 4:
|
|
124
|
+
_.label++;
|
|
125
|
+
return { value: op[1], done: false };
|
|
126
|
+
case 5:
|
|
127
|
+
_.label++;
|
|
128
|
+
y = op[1];
|
|
129
|
+
op = [0];
|
|
130
|
+
continue;
|
|
131
|
+
case 7:
|
|
132
|
+
op = _.ops.pop();
|
|
133
|
+
_.trys.pop();
|
|
134
|
+
continue;
|
|
135
|
+
default:
|
|
136
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
137
|
+
_ = 0;
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
141
|
+
_.label = op[1];
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
145
|
+
_.label = t[1];
|
|
146
|
+
t = op;
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
if (t && _.label < t[2]) {
|
|
150
|
+
_.label = t[2];
|
|
151
|
+
_.ops.push(op);
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
if (t[2])
|
|
155
|
+
_.ops.pop();
|
|
156
|
+
_.trys.pop();
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
op = body.call(thisArg, _);
|
|
160
|
+
}
|
|
161
|
+
catch (e) {
|
|
162
|
+
op = [6, e];
|
|
163
|
+
y = 0;
|
|
164
|
+
}
|
|
165
|
+
finally {
|
|
166
|
+
f = t = 0;
|
|
167
|
+
}
|
|
168
|
+
if (op[0] & 5)
|
|
169
|
+
throw op[1];
|
|
170
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
174
|
+
if (k2 === undefined)
|
|
175
|
+
k2 = k;
|
|
176
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
177
|
+
}) : (function (o, m, k, k2) {
|
|
178
|
+
if (k2 === undefined)
|
|
179
|
+
k2 = k;
|
|
180
|
+
o[k2] = m[k];
|
|
181
|
+
});
|
|
182
|
+
function __exportStar(m, o) {
|
|
183
|
+
for (var p in m)
|
|
184
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
185
|
+
__createBinding(o, m, p);
|
|
186
|
+
}
|
|
187
|
+
function __values(o) {
|
|
188
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
189
|
+
if (m)
|
|
190
|
+
return m.call(o);
|
|
191
|
+
if (o && typeof o.length === "number")
|
|
192
|
+
return {
|
|
193
|
+
next: function () {
|
|
194
|
+
if (o && i >= o.length)
|
|
195
|
+
o = void 0;
|
|
196
|
+
return { value: o && o[i++], done: !o };
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
200
|
+
}
|
|
201
|
+
function __read(o, n) {
|
|
202
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
203
|
+
if (!m)
|
|
204
|
+
return o;
|
|
205
|
+
var i = m.call(o), r, ar = [], e;
|
|
206
|
+
try {
|
|
207
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
208
|
+
ar.push(r.value);
|
|
209
|
+
}
|
|
210
|
+
catch (error) {
|
|
211
|
+
e = { error: error };
|
|
212
|
+
}
|
|
213
|
+
finally {
|
|
214
|
+
try {
|
|
215
|
+
if (r && !r.done && (m = i["return"]))
|
|
216
|
+
m.call(i);
|
|
217
|
+
}
|
|
218
|
+
finally {
|
|
219
|
+
if (e)
|
|
220
|
+
throw e.error;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return ar;
|
|
224
|
+
}
|
|
225
|
+
/** @deprecated */
|
|
226
|
+
function __spread() {
|
|
227
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
228
|
+
ar = ar.concat(__read(arguments[i]));
|
|
229
|
+
return ar;
|
|
230
|
+
}
|
|
231
|
+
/** @deprecated */
|
|
232
|
+
function __spreadArrays() {
|
|
233
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
234
|
+
s += arguments[i].length;
|
|
235
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
236
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
237
|
+
r[k] = a[j];
|
|
238
|
+
return r;
|
|
239
|
+
}
|
|
240
|
+
function __spreadArray(to, from, pack) {
|
|
241
|
+
if (pack || arguments.length === 2)
|
|
242
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
243
|
+
if (ar || !(i in from)) {
|
|
244
|
+
if (!ar)
|
|
245
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
246
|
+
ar[i] = from[i];
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
250
|
+
}
|
|
251
|
+
function __await(v) {
|
|
252
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
253
|
+
}
|
|
254
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
255
|
+
if (!Symbol.asyncIterator)
|
|
256
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
257
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
258
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
259
|
+
function verb(n) { if (g[n])
|
|
260
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
261
|
+
function resume(n, v) { try {
|
|
262
|
+
step(g[n](v));
|
|
263
|
+
}
|
|
264
|
+
catch (e) {
|
|
265
|
+
settle(q[0][3], e);
|
|
266
|
+
} }
|
|
267
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
268
|
+
function fulfill(value) { resume("next", value); }
|
|
269
|
+
function reject(value) { resume("throw", value); }
|
|
270
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
271
|
+
resume(q[0][0], q[0][1]); }
|
|
272
|
+
}
|
|
273
|
+
function __asyncDelegator(o) {
|
|
274
|
+
var i, p;
|
|
275
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
276
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
277
|
+
}
|
|
278
|
+
function __asyncValues(o) {
|
|
279
|
+
if (!Symbol.asyncIterator)
|
|
280
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
281
|
+
var m = o[Symbol.asyncIterator], i;
|
|
282
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
283
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
284
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
285
|
+
}
|
|
286
|
+
function __makeTemplateObject(cooked, raw) {
|
|
287
|
+
if (Object.defineProperty) {
|
|
288
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
cooked.raw = raw;
|
|
292
|
+
}
|
|
293
|
+
return cooked;
|
|
294
|
+
}
|
|
295
|
+
;
|
|
296
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
297
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
298
|
+
}) : function (o, v) {
|
|
299
|
+
o["default"] = v;
|
|
300
|
+
};
|
|
301
|
+
function __importStar(mod) {
|
|
302
|
+
if (mod && mod.__esModule)
|
|
303
|
+
return mod;
|
|
304
|
+
var result = {};
|
|
305
|
+
if (mod != null)
|
|
306
|
+
for (var k in mod)
|
|
307
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
308
|
+
__createBinding(result, mod, k);
|
|
309
|
+
__setModuleDefault(result, mod);
|
|
310
|
+
return result;
|
|
311
|
+
}
|
|
312
|
+
function __importDefault(mod) {
|
|
313
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
314
|
+
}
|
|
315
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
316
|
+
if (kind === "a" && !f)
|
|
317
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
318
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
319
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
320
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
321
|
+
}
|
|
322
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
323
|
+
if (kind === "m")
|
|
324
|
+
throw new TypeError("Private method is not writable");
|
|
325
|
+
if (kind === "a" && !f)
|
|
326
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
327
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
328
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
329
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
var GridHeaderComponent = /** @class */ (function () {
|
|
333
|
+
function GridHeaderComponent() {
|
|
334
|
+
this.headers = [];
|
|
335
|
+
this.sort = new core.EventEmitter();
|
|
336
|
+
}
|
|
337
|
+
Object.defineProperty(GridHeaderComponent.prototype, "numHeaders", {
|
|
338
|
+
get: function () {
|
|
339
|
+
return this.headers.length;
|
|
340
|
+
},
|
|
341
|
+
enumerable: false,
|
|
342
|
+
configurable: true
|
|
343
|
+
});
|
|
344
|
+
GridHeaderComponent.prototype.load = function (formio, query, columns) {
|
|
345
|
+
return Promise.resolve([]);
|
|
346
|
+
};
|
|
347
|
+
return GridHeaderComponent;
|
|
348
|
+
}());
|
|
349
|
+
GridHeaderComponent.decorators = [
|
|
350
|
+
{ type: core.Component, args: [{
|
|
351
|
+
template: ''
|
|
352
|
+
},] }
|
|
353
|
+
];
|
|
354
|
+
GridHeaderComponent.ctorParameters = function () { return []; };
|
|
355
|
+
GridHeaderComponent.propDecorators = {
|
|
356
|
+
actionAllowed: [{ type: core.Input }],
|
|
357
|
+
sort: [{ type: core.Output }],
|
|
358
|
+
template: [{ type: core.ViewChild, args: [core.TemplateRef, { static: true },] }]
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
var SortType;
|
|
362
|
+
(function (SortType) {
|
|
363
|
+
SortType["ASC"] = "asc";
|
|
364
|
+
SortType["DESC"] = "desc";
|
|
365
|
+
})(SortType || (SortType = {}));
|
|
366
|
+
|
|
367
|
+
var FormGridHeaderComponent = /** @class */ (function (_super) {
|
|
368
|
+
__extends(FormGridHeaderComponent, _super);
|
|
369
|
+
function FormGridHeaderComponent() {
|
|
370
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
371
|
+
}
|
|
372
|
+
FormGridHeaderComponent.prototype.load = function (formio) {
|
|
373
|
+
this.header = {
|
|
374
|
+
label: 'Title',
|
|
375
|
+
key: 'title',
|
|
376
|
+
sort: SortType.ASC
|
|
377
|
+
};
|
|
378
|
+
this.headers = [this.header];
|
|
379
|
+
return Promise.resolve(this.headers);
|
|
380
|
+
};
|
|
381
|
+
Object.defineProperty(FormGridHeaderComponent.prototype, "numHeaders", {
|
|
382
|
+
get: function () {
|
|
383
|
+
return 2;
|
|
384
|
+
},
|
|
385
|
+
enumerable: false,
|
|
386
|
+
configurable: true
|
|
387
|
+
});
|
|
388
|
+
return FormGridHeaderComponent;
|
|
389
|
+
}(GridHeaderComponent));
|
|
390
|
+
FormGridHeaderComponent.decorators = [
|
|
391
|
+
{ type: core.Component, args: [{
|
|
392
|
+
selector: 'form-grid-header',
|
|
393
|
+
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"
|
|
394
|
+
},] }
|
|
395
|
+
];
|
|
396
|
+
|
|
397
|
+
var GridService = /** @class */ (function () {
|
|
398
|
+
function GridService() {
|
|
399
|
+
}
|
|
400
|
+
GridService.prototype.setRows = function (rows) {
|
|
401
|
+
this.rows = rows;
|
|
402
|
+
};
|
|
403
|
+
GridService.prototype.getFormsPerPage = function () {
|
|
404
|
+
var _a;
|
|
405
|
+
return (_a = this.rows) === null || _a === void 0 ? void 0 : _a.length;
|
|
406
|
+
};
|
|
407
|
+
return GridService;
|
|
408
|
+
}());
|
|
409
|
+
GridService.decorators = [
|
|
410
|
+
{ type: core.Injectable }
|
|
411
|
+
];
|
|
412
|
+
GridService.ctorParameters = function () { return []; };
|
|
413
|
+
|
|
414
|
+
var GridBodyComponent = /** @class */ (function () {
|
|
415
|
+
function GridBodyComponent(service) {
|
|
416
|
+
this.service = service;
|
|
417
|
+
this.firstItem = 0;
|
|
418
|
+
this.lastItem = 0;
|
|
419
|
+
this.skip = 0;
|
|
420
|
+
this.limit = 0;
|
|
421
|
+
this.total = 0;
|
|
422
|
+
this.rowSelect = new core.EventEmitter();
|
|
423
|
+
this.rowAction = new core.EventEmitter();
|
|
424
|
+
this.loading = true;
|
|
425
|
+
}
|
|
426
|
+
GridBodyComponent.prototype.load = function (formio, query) {
|
|
427
|
+
return formio.loadForm(query);
|
|
428
|
+
};
|
|
429
|
+
GridBodyComponent.prototype.onRowSelect = function (event, row) {
|
|
430
|
+
event.preventDefault();
|
|
431
|
+
this.rowSelect.emit(row);
|
|
432
|
+
};
|
|
433
|
+
GridBodyComponent.prototype.onRowAction = function (event, row, action) {
|
|
434
|
+
event.preventDefault();
|
|
435
|
+
this.rowAction.emit({ row: row, action: action });
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* Set the rows for this Grid body.
|
|
439
|
+
*
|
|
440
|
+
* @param query
|
|
441
|
+
* @param items
|
|
442
|
+
* @return any
|
|
443
|
+
*/
|
|
444
|
+
GridBodyComponent.prototype.setRows = function (query, items) {
|
|
445
|
+
var _this = this;
|
|
446
|
+
this.rows = [];
|
|
447
|
+
if (typeof items !== 'object') {
|
|
448
|
+
this.firstItem = 0;
|
|
449
|
+
this.lastItem = 0;
|
|
450
|
+
this.total = 0;
|
|
451
|
+
this.skip = 0;
|
|
452
|
+
this.loading = false;
|
|
453
|
+
this.service.setRows(this.rows);
|
|
454
|
+
return this.rows;
|
|
455
|
+
}
|
|
456
|
+
this.firstItem = query.skip + 1;
|
|
457
|
+
this.lastItem = this.firstItem + items.length - 1;
|
|
458
|
+
if (this.lastItem === 0) {
|
|
459
|
+
this.firstItem = 0;
|
|
460
|
+
}
|
|
461
|
+
this.total = items.serverCount;
|
|
462
|
+
this.limit = query.limit;
|
|
463
|
+
this.skip = Math.floor(items.skip / query.limit) + 1;
|
|
464
|
+
this.loading = false;
|
|
465
|
+
lodash.each(items, function (item) {
|
|
466
|
+
_this.rows.push(lodash.clone(item));
|
|
467
|
+
});
|
|
468
|
+
this.service.setRows(this.rows);
|
|
469
|
+
return this.rows;
|
|
470
|
+
};
|
|
471
|
+
return GridBodyComponent;
|
|
472
|
+
}());
|
|
473
|
+
GridBodyComponent.decorators = [
|
|
474
|
+
{ type: core.Component, args: [{
|
|
475
|
+
template: ''
|
|
476
|
+
},] }
|
|
477
|
+
];
|
|
478
|
+
GridBodyComponent.ctorParameters = function () { return [
|
|
479
|
+
{ type: GridService }
|
|
480
|
+
]; };
|
|
481
|
+
GridBodyComponent.propDecorators = {
|
|
482
|
+
header: [{ type: core.Input }],
|
|
483
|
+
actionAllowed: [{ type: core.Input }],
|
|
484
|
+
rowSelect: [{ type: core.Output }],
|
|
485
|
+
rowAction: [{ type: core.Output }],
|
|
486
|
+
template: [{ type: core.ViewChild, args: [core.TemplateRef, { static: true },] }]
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
var FormGridBodyComponent = /** @class */ (function (_super) {
|
|
490
|
+
__extends(FormGridBodyComponent, _super);
|
|
491
|
+
function FormGridBodyComponent() {
|
|
492
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
493
|
+
}
|
|
494
|
+
FormGridBodyComponent.prototype.load = function (formio, query) {
|
|
495
|
+
var _this = this;
|
|
496
|
+
query = query || {};
|
|
497
|
+
return formio.loadForms({ params: query }).then(function (forms) { return _this.setRows(query, forms); });
|
|
498
|
+
};
|
|
499
|
+
return FormGridBodyComponent;
|
|
500
|
+
}(GridBodyComponent));
|
|
501
|
+
FormGridBodyComponent.decorators = [
|
|
502
|
+
{ type: core.Component, args: [{
|
|
503
|
+
selector: 'form-grid-body',
|
|
504
|
+
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",
|
|
505
|
+
styles: [".form-btn{font-size:.75rem;margin:2px 0}\n"]
|
|
506
|
+
},] }
|
|
507
|
+
];
|
|
508
|
+
|
|
509
|
+
var GridFooterComponent = /** @class */ (function () {
|
|
510
|
+
function GridFooterComponent() {
|
|
511
|
+
this.footerPositions = GridFooterPositions;
|
|
512
|
+
this.pageChanged = new core.EventEmitter();
|
|
513
|
+
this.createItem = new core.EventEmitter();
|
|
514
|
+
}
|
|
515
|
+
return GridFooterComponent;
|
|
516
|
+
}());
|
|
517
|
+
GridFooterComponent.decorators = [
|
|
518
|
+
{ type: core.Component, args: [{
|
|
519
|
+
template: ''
|
|
520
|
+
},] }
|
|
521
|
+
];
|
|
522
|
+
GridFooterComponent.ctorParameters = function () { return []; };
|
|
523
|
+
GridFooterComponent.propDecorators = {
|
|
524
|
+
header: [{ type: core.Input }],
|
|
525
|
+
body: [{ type: core.Input }],
|
|
526
|
+
createText: [{ type: core.Input }],
|
|
527
|
+
size: [{ type: core.Input }],
|
|
528
|
+
actionAllowed: [{ type: core.Input }],
|
|
529
|
+
pageChanged: [{ type: core.Output }],
|
|
530
|
+
createItem: [{ type: core.Output }],
|
|
531
|
+
template: [{ type: core.ViewChild, args: [core.TemplateRef, { static: true },] }]
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
var FormGridFooterComponent = /** @class */ (function (_super) {
|
|
535
|
+
__extends(FormGridFooterComponent, _super);
|
|
536
|
+
function FormGridFooterComponent() {
|
|
537
|
+
return _super.call(this) || this;
|
|
538
|
+
}
|
|
539
|
+
FormGridFooterComponent.prototype.ngOnInit = function () {
|
|
540
|
+
if (!this.createText) {
|
|
541
|
+
this.createText = 'Create Form';
|
|
542
|
+
}
|
|
543
|
+
if (!this.size) {
|
|
544
|
+
this.size = 7;
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
return FormGridFooterComponent;
|
|
548
|
+
}(GridFooterComponent));
|
|
549
|
+
FormGridFooterComponent.decorators = [
|
|
550
|
+
{ type: core.Component, args: [{
|
|
551
|
+
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",
|
|
552
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
553
|
+
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"]
|
|
554
|
+
},] }
|
|
555
|
+
];
|
|
556
|
+
FormGridFooterComponent.ctorParameters = function () { return []; };
|
|
557
|
+
|
|
558
|
+
var FormComponents = {
|
|
559
|
+
header: FormGridHeaderComponent,
|
|
560
|
+
body: FormGridBodyComponent,
|
|
561
|
+
footer: FormGridFooterComponent
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
var SubmissionGridHeaderComponent = /** @class */ (function (_super) {
|
|
565
|
+
__extends(SubmissionGridHeaderComponent, _super);
|
|
566
|
+
function SubmissionGridHeaderComponent() {
|
|
567
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
568
|
+
}
|
|
569
|
+
SubmissionGridHeaderComponent.prototype.load = function (formio, query, columns) {
|
|
570
|
+
var _this = this;
|
|
571
|
+
query = query || {};
|
|
572
|
+
return formio.loadForm({ params: query }).then(function (form) {
|
|
573
|
+
_this.headers = [];
|
|
574
|
+
_this.formComponents = new Map();
|
|
575
|
+
_this.setComponents(form.components);
|
|
576
|
+
columns ? columns.forEach(function (column) {
|
|
577
|
+
_this.setHeader(_this.getHeaderForColumn(column, _this.formComponents.get(column.path)));
|
|
578
|
+
}) : _this.setComponentsHeaders(_this.formComponents);
|
|
579
|
+
return _this.headers;
|
|
580
|
+
});
|
|
581
|
+
};
|
|
582
|
+
SubmissionGridHeaderComponent.prototype.setHeader = function (header) {
|
|
583
|
+
this.headers.push(header);
|
|
584
|
+
};
|
|
585
|
+
SubmissionGridHeaderComponent.prototype.getHeaderForColumn = function (column, component, sort) {
|
|
586
|
+
return {
|
|
587
|
+
label: column.label,
|
|
588
|
+
key: column.path,
|
|
589
|
+
sort: sort,
|
|
590
|
+
component: component ? formiojs.Components.create(component, null, null, true) : undefined,
|
|
591
|
+
renderCell: column ? column.renderCell : undefined
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
SubmissionGridHeaderComponent.prototype.getHeaderForComponent = function (component, path, sort) {
|
|
595
|
+
return {
|
|
596
|
+
label: component.label,
|
|
597
|
+
key: path,
|
|
598
|
+
sort: sort,
|
|
599
|
+
component: component ? formiojs.Components.create(component, null, null, true) : undefined,
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
// Set headers from components in case if columns are not provided
|
|
603
|
+
SubmissionGridHeaderComponent.prototype.setComponentsHeaders = function (components, sort) {
|
|
604
|
+
var _this = this;
|
|
605
|
+
components.forEach(function (component, path) {
|
|
606
|
+
if (component.input &&
|
|
607
|
+
(!component.hasOwnProperty('tableView') || component.tableView)) {
|
|
608
|
+
_this.setHeader(_this.getHeaderForComponent(component, path, sort));
|
|
609
|
+
}
|
|
610
|
+
});
|
|
611
|
+
};
|
|
612
|
+
// Map components
|
|
613
|
+
SubmissionGridHeaderComponent.prototype.setComponents = function (components) {
|
|
614
|
+
var _this = this;
|
|
615
|
+
formiojs.Utils.eachComponent(components, function (component, newPath) {
|
|
616
|
+
_this.formComponents.set("data." + newPath, component);
|
|
617
|
+
});
|
|
618
|
+
};
|
|
619
|
+
return SubmissionGridHeaderComponent;
|
|
620
|
+
}(GridHeaderComponent));
|
|
621
|
+
SubmissionGridHeaderComponent.decorators = [
|
|
622
|
+
{ type: core.Component, args: [{
|
|
623
|
+
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"
|
|
624
|
+
},] }
|
|
625
|
+
];
|
|
626
|
+
|
|
627
|
+
var SubmissionGridBodyComponent = /** @class */ (function (_super) {
|
|
628
|
+
__extends(SubmissionGridBodyComponent, _super);
|
|
629
|
+
function SubmissionGridBodyComponent() {
|
|
630
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
631
|
+
}
|
|
632
|
+
SubmissionGridBodyComponent.prototype.load = function (formio, query) {
|
|
633
|
+
var _this = this;
|
|
634
|
+
query = query || {};
|
|
635
|
+
return formio.loadSubmissions({ params: query })
|
|
636
|
+
.then(function (submissions) { return _this.setRows(query, submissions); });
|
|
637
|
+
};
|
|
638
|
+
/**
|
|
639
|
+
* Render the cell data.
|
|
640
|
+
*
|
|
641
|
+
* @param submission
|
|
642
|
+
* @param header
|
|
643
|
+
* @return any
|
|
644
|
+
*/
|
|
645
|
+
SubmissionGridBodyComponent.prototype.view = function (submission, header) {
|
|
646
|
+
var cellValue = lodash.get(submission, header.key);
|
|
647
|
+
if (header.renderCell) {
|
|
648
|
+
return header.renderCell(cellValue, header.component);
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
if (header.component) {
|
|
652
|
+
if (header.component.getView) {
|
|
653
|
+
return header.component.getView(cellValue);
|
|
654
|
+
}
|
|
655
|
+
return header.component.asString(cellValue);
|
|
656
|
+
}
|
|
657
|
+
else {
|
|
658
|
+
return cellValue.toString();
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
};
|
|
662
|
+
return SubmissionGridBodyComponent;
|
|
663
|
+
}(GridBodyComponent));
|
|
664
|
+
SubmissionGridBodyComponent.decorators = [
|
|
665
|
+
{ type: core.Component, args: [{
|
|
666
|
+
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"
|
|
667
|
+
},] }
|
|
668
|
+
];
|
|
669
|
+
|
|
670
|
+
var SubmissionGridFooterComponent = /** @class */ (function (_super) {
|
|
671
|
+
__extends(SubmissionGridFooterComponent, _super);
|
|
672
|
+
function SubmissionGridFooterComponent() {
|
|
673
|
+
return _super.call(this) || this;
|
|
674
|
+
}
|
|
675
|
+
SubmissionGridFooterComponent.prototype.ngOnInit = function () {
|
|
676
|
+
if (!this.size) {
|
|
677
|
+
this.size = 7;
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
return SubmissionGridFooterComponent;
|
|
681
|
+
}(GridFooterComponent));
|
|
682
|
+
SubmissionGridFooterComponent.decorators = [
|
|
683
|
+
{ type: core.Component, args: [{
|
|
684
|
+
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",
|
|
685
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
686
|
+
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"]
|
|
687
|
+
},] }
|
|
688
|
+
];
|
|
689
|
+
SubmissionGridFooterComponent.ctorParameters = function () { return []; };
|
|
690
|
+
|
|
691
|
+
var SubmissionComponents = {
|
|
692
|
+
header: SubmissionGridHeaderComponent,
|
|
693
|
+
body: SubmissionGridBodyComponent,
|
|
694
|
+
footer: SubmissionGridFooterComponent
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
var FormioGridComponent = /** @class */ (function () {
|
|
698
|
+
function FormioGridComponent(alerts, resolver, ref) {
|
|
699
|
+
this.alerts = alerts;
|
|
700
|
+
this.resolver = resolver;
|
|
701
|
+
this.ref = ref;
|
|
702
|
+
this.footerPosition = GridFooterPositions.bottom;
|
|
703
|
+
this.page = 0;
|
|
704
|
+
this.isLoading = false;
|
|
705
|
+
this.initialized = false;
|
|
706
|
+
this.footerPositions = GridFooterPositions;
|
|
707
|
+
this.select = this.rowSelect = new core.EventEmitter();
|
|
708
|
+
this.rowAction = new core.EventEmitter();
|
|
709
|
+
this.createItem = new core.EventEmitter();
|
|
710
|
+
this.error = new core.EventEmitter();
|
|
711
|
+
this.isLoading = true;
|
|
712
|
+
}
|
|
713
|
+
FormioGridComponent.prototype.createComponent = function (property, component) {
|
|
714
|
+
var factory = this.resolver.resolveComponentFactory(component);
|
|
715
|
+
var componentRef = property.createComponent(factory);
|
|
716
|
+
return componentRef.instance;
|
|
717
|
+
};
|
|
718
|
+
FormioGridComponent.prototype.loadGrid = function (src) {
|
|
719
|
+
var _this = this;
|
|
720
|
+
// If no source is provided, then skip.
|
|
721
|
+
if (!src && !this.formio) {
|
|
722
|
+
return;
|
|
723
|
+
}
|
|
724
|
+
// Do not double load.
|
|
725
|
+
if (this.formio && this.src && (src === this.src)) {
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
728
|
+
if (src) {
|
|
729
|
+
this.src = src;
|
|
730
|
+
this.formio = new angular.FormioPromiseService(this.src, { formOnly: true });
|
|
731
|
+
}
|
|
732
|
+
// Load the header.
|
|
733
|
+
this.header.load(this.formio, {}, this.columns)
|
|
734
|
+
.then(function () { return _this.setPage(0); })
|
|
735
|
+
.catch(function (error) { return _this.onError(error); });
|
|
736
|
+
};
|
|
737
|
+
FormioGridComponent.prototype.ngOnInit = function () {
|
|
738
|
+
var _this = this;
|
|
739
|
+
// Create our components.
|
|
740
|
+
var comps = this.components || ((this.gridType === 'form') ? FormComponents : SubmissionComponents);
|
|
741
|
+
this.header = this.createComponent(this.headerElement, comps.header);
|
|
742
|
+
this.header.actionAllowed = this.actionAllowed.bind(this);
|
|
743
|
+
this.header.sort.subscribe(function (header) { return _this.sortColumn(header); });
|
|
744
|
+
this.body = this.createComponent(this.bodyElement, comps.body);
|
|
745
|
+
this.body.header = this.header;
|
|
746
|
+
this.body.actionAllowed = this.actionAllowed.bind(this);
|
|
747
|
+
this.body.rowSelect.subscribe(function (row) { return _this.rowSelect.emit(row); });
|
|
748
|
+
this.body.rowAction.subscribe(function (action) { return _this.rowAction.emit(action); });
|
|
749
|
+
this.footer = this.createComponent(this.footerElement, comps.footer);
|
|
750
|
+
this.footer.header = this.header;
|
|
751
|
+
this.footer.body = this.body;
|
|
752
|
+
this.footer.actionAllowed = this.actionAllowed.bind(this);
|
|
753
|
+
this.footer.createText = this.createText;
|
|
754
|
+
this.footer.size = this.size;
|
|
755
|
+
this.footer.pageChanged.subscribe(function (page) { return _this.pageChanged(page); });
|
|
756
|
+
this.footer.createItem.subscribe(function (item) { return _this.createItem.emit(item); });
|
|
757
|
+
};
|
|
758
|
+
FormioGridComponent.prototype.ngOnChanges = function (changes) {
|
|
759
|
+
if (this.initialized) {
|
|
760
|
+
if ((changes.src && changes.src.currentValue) ||
|
|
761
|
+
(changes.formio && changes.formio.currentValue)) {
|
|
762
|
+
this.loadGrid(changes.src.currentValue);
|
|
763
|
+
}
|
|
764
|
+
if (changes.items && changes.items.currentValue) {
|
|
765
|
+
this.refreshGrid();
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
if (this.footer &&
|
|
769
|
+
(changes.createText && changes.createText.currentValue)) {
|
|
770
|
+
this.footer.createText = changes.createText.currentValue;
|
|
771
|
+
}
|
|
772
|
+
};
|
|
773
|
+
FormioGridComponent.prototype.ngAfterViewInit = function () {
|
|
774
|
+
var _this = this;
|
|
775
|
+
this.alerts.setAlerts([]);
|
|
776
|
+
this.query = this.query || {};
|
|
777
|
+
if (this.refresh) {
|
|
778
|
+
this.refresh.subscribe(function (query) { return _this.refreshGrid(query); });
|
|
779
|
+
}
|
|
780
|
+
this.loadGrid(this.src);
|
|
781
|
+
this.initialized = true;
|
|
782
|
+
this.ref.detectChanges();
|
|
783
|
+
};
|
|
784
|
+
FormioGridComponent.prototype.actionAllowed = function (action) {
|
|
785
|
+
if (this.isActionAllowed) {
|
|
786
|
+
return this.isActionAllowed(action);
|
|
787
|
+
}
|
|
788
|
+
else {
|
|
789
|
+
return true;
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
FormioGridComponent.prototype.onError = function (error) {
|
|
793
|
+
this.isLoading = false;
|
|
794
|
+
this.error.emit(error);
|
|
795
|
+
if (typeof error === 'string' || error.message) {
|
|
796
|
+
this.alerts.setAlert({
|
|
797
|
+
type: 'danger',
|
|
798
|
+
message: error.message || error
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
FormioGridComponent.prototype.refreshGrid = function (query) {
|
|
803
|
+
var _this = this;
|
|
804
|
+
this.alerts.setAlerts([]);
|
|
805
|
+
this.query = query || this.query;
|
|
806
|
+
if (!this.query.hasOwnProperty('limit')) {
|
|
807
|
+
this.query.limit = 10;
|
|
808
|
+
}
|
|
809
|
+
if (!this.query.hasOwnProperty('skip')) {
|
|
810
|
+
this.query.skip = 0;
|
|
811
|
+
}
|
|
812
|
+
this.isLoading = true;
|
|
813
|
+
this.ref.detectChanges();
|
|
814
|
+
formiojs.Formio.cache = {};
|
|
815
|
+
var loader = null;
|
|
816
|
+
if (this.items) {
|
|
817
|
+
loader = Promise.resolve(this.body.setRows(this.query, this.items));
|
|
818
|
+
}
|
|
819
|
+
else {
|
|
820
|
+
loader = this.body.load(this.formio, this.query);
|
|
821
|
+
}
|
|
822
|
+
return loader.then(function (info) {
|
|
823
|
+
_this.isLoading = false;
|
|
824
|
+
_this.initialized = true;
|
|
825
|
+
_this.ref.detectChanges();
|
|
826
|
+
}).catch(function (error) { return _this.onError(error); });
|
|
827
|
+
};
|
|
828
|
+
FormioGridComponent.prototype.setPage = function (num) {
|
|
829
|
+
if (num === void 0) { num = -1; }
|
|
830
|
+
this.page = num !== -1 ? num : this.page;
|
|
831
|
+
if (!this.query.hasOwnProperty('limit')) {
|
|
832
|
+
this.query.limit = 10;
|
|
833
|
+
}
|
|
834
|
+
if (!this.query.hasOwnProperty('skip')) {
|
|
835
|
+
this.query.skip = 0;
|
|
836
|
+
}
|
|
837
|
+
this.query.skip = this.page * this.query.limit;
|
|
838
|
+
this.refreshGrid();
|
|
839
|
+
};
|
|
840
|
+
FormioGridComponent.prototype.sortColumn = function (header) {
|
|
841
|
+
// Reset all other column sorts.
|
|
842
|
+
lodash.each(this.header.headers, function (col) {
|
|
843
|
+
if (col.key !== header.key) {
|
|
844
|
+
col.sort = '';
|
|
845
|
+
}
|
|
846
|
+
});
|
|
847
|
+
switch (header.sort) {
|
|
848
|
+
case 'asc':
|
|
849
|
+
header.sort = SortType.DESC;
|
|
850
|
+
this.query.sort = '-' + header.key;
|
|
851
|
+
break;
|
|
852
|
+
case 'desc':
|
|
853
|
+
header.sort = undefined;
|
|
854
|
+
delete this.query.sort;
|
|
855
|
+
break;
|
|
856
|
+
case undefined:
|
|
857
|
+
header.sort = SortType.ASC;
|
|
858
|
+
this.query.sort = header.key;
|
|
859
|
+
break;
|
|
860
|
+
}
|
|
861
|
+
this.refreshGrid();
|
|
862
|
+
};
|
|
863
|
+
FormioGridComponent.prototype.pageChanged = function (page) {
|
|
864
|
+
this.setPage(page.page - 1);
|
|
865
|
+
};
|
|
866
|
+
return FormioGridComponent;
|
|
867
|
+
}());
|
|
868
|
+
FormioGridComponent.decorators = [
|
|
869
|
+
{ type: core.Component, args: [{
|
|
870
|
+
selector: 'formio-grid',
|
|
871
|
+
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",
|
|
872
|
+
styles: [".formio-grid{position:relative;width:100%}.grid-refresh{height:400px;width:100%}\n"]
|
|
873
|
+
},] }
|
|
874
|
+
];
|
|
875
|
+
FormioGridComponent.ctorParameters = function () { return [
|
|
876
|
+
{ type: angular.FormioAlerts },
|
|
877
|
+
{ type: core.ComponentFactoryResolver },
|
|
878
|
+
{ type: core.ChangeDetectorRef }
|
|
879
|
+
]; };
|
|
880
|
+
FormioGridComponent.propDecorators = {
|
|
881
|
+
footerPosition: [{ type: core.Input }],
|
|
882
|
+
src: [{ type: core.Input }],
|
|
883
|
+
items: [{ type: core.Input }],
|
|
884
|
+
onForm: [{ type: core.Input }],
|
|
885
|
+
query: [{ type: core.Input }],
|
|
886
|
+
refresh: [{ type: core.Input }],
|
|
887
|
+
columns: [{ type: core.Input }],
|
|
888
|
+
gridType: [{ type: core.Input }],
|
|
889
|
+
size: [{ type: core.Input }],
|
|
890
|
+
components: [{ type: core.Input }],
|
|
891
|
+
formio: [{ type: core.Input }],
|
|
892
|
+
label: [{ type: core.Input }],
|
|
893
|
+
createText: [{ type: core.Input }],
|
|
894
|
+
isActionAllowed: [{ type: core.Input }],
|
|
895
|
+
select: [{ type: core.Output }],
|
|
896
|
+
rowSelect: [{ type: core.Output }],
|
|
897
|
+
rowAction: [{ type: core.Output }],
|
|
898
|
+
createItem: [{ type: core.Output }],
|
|
899
|
+
error: [{ type: core.Output }],
|
|
900
|
+
headerElement: [{ type: core.ViewChild, args: ['headerTemplate', { read: core.ViewContainerRef, static: true },] }],
|
|
901
|
+
bodyElement: [{ type: core.ViewChild, args: ['bodyTemplate', { read: core.ViewContainerRef, static: true },] }],
|
|
902
|
+
footerElement: [{ type: core.ViewChild, args: ['footerTemplate', { read: core.ViewContainerRef, static: true },] }]
|
|
903
|
+
};
|
|
904
|
+
|
|
905
|
+
var TimeSince = /** @class */ (function () {
|
|
906
|
+
function TimeSince() {
|
|
907
|
+
}
|
|
908
|
+
TimeSince.prototype.transform = function (date) {
|
|
909
|
+
var elapsed = (new Date().getTime() - new Date(date).getTime()) / 1000;
|
|
910
|
+
var interval;
|
|
911
|
+
if (interval >= 1) {
|
|
912
|
+
return interval + ' year' + (interval > 1 ? 's' : '');
|
|
913
|
+
}
|
|
914
|
+
interval = Math.floor(elapsed / 2592000);
|
|
915
|
+
if (interval >= 1) {
|
|
916
|
+
return interval + ' month' + (interval > 1 ? 's' : '');
|
|
917
|
+
}
|
|
918
|
+
interval = Math.floor(elapsed / 86400);
|
|
919
|
+
if (interval >= 1) {
|
|
920
|
+
return interval + ' day' + (interval > 1 ? 's' : '');
|
|
921
|
+
}
|
|
922
|
+
interval = Math.floor(elapsed / 3600);
|
|
923
|
+
if (interval >= 1) {
|
|
924
|
+
return interval + ' hour' + (interval > 1 ? 's' : '');
|
|
925
|
+
}
|
|
926
|
+
interval = Math.floor(elapsed / 60);
|
|
927
|
+
if (interval >= 1) {
|
|
928
|
+
return interval + ' minute' + (interval > 1 ? 's' : '');
|
|
929
|
+
}
|
|
930
|
+
return Math.floor(elapsed) + ' second' + (elapsed > 1 ? 's' : '');
|
|
931
|
+
};
|
|
932
|
+
return TimeSince;
|
|
933
|
+
}());
|
|
934
|
+
TimeSince.decorators = [
|
|
935
|
+
{ type: core.Pipe, args: [{
|
|
936
|
+
name: 'timeSince'
|
|
937
|
+
},] }
|
|
938
|
+
];
|
|
939
|
+
|
|
940
|
+
var FormioGrid = /** @class */ (function () {
|
|
941
|
+
function FormioGrid() {
|
|
942
|
+
}
|
|
943
|
+
return FormioGrid;
|
|
944
|
+
}());
|
|
945
|
+
FormioGrid.decorators = [
|
|
946
|
+
{ type: core.NgModule, args: [{
|
|
947
|
+
imports: [
|
|
948
|
+
common.CommonModule,
|
|
949
|
+
forms.FormsModule,
|
|
950
|
+
angular.FormioModule,
|
|
951
|
+
router.RouterModule,
|
|
952
|
+
pagination.PaginationModule.forRoot()
|
|
953
|
+
],
|
|
954
|
+
declarations: [
|
|
955
|
+
FormioGridComponent,
|
|
956
|
+
FormGridHeaderComponent,
|
|
957
|
+
FormGridBodyComponent,
|
|
958
|
+
FormGridFooterComponent,
|
|
959
|
+
SubmissionGridHeaderComponent,
|
|
960
|
+
SubmissionGridBodyComponent,
|
|
961
|
+
SubmissionGridFooterComponent,
|
|
962
|
+
GridHeaderComponent,
|
|
963
|
+
GridBodyComponent,
|
|
964
|
+
GridFooterComponent,
|
|
965
|
+
TimeSince
|
|
966
|
+
],
|
|
967
|
+
exports: [
|
|
968
|
+
FormioGridComponent
|
|
969
|
+
],
|
|
970
|
+
entryComponents: [
|
|
971
|
+
FormGridHeaderComponent,
|
|
972
|
+
FormGridBodyComponent,
|
|
973
|
+
FormGridFooterComponent,
|
|
974
|
+
SubmissionGridHeaderComponent,
|
|
975
|
+
SubmissionGridBodyComponent,
|
|
976
|
+
SubmissionGridFooterComponent
|
|
977
|
+
],
|
|
978
|
+
providers: [
|
|
979
|
+
angular.FormioAlerts,
|
|
980
|
+
GridService
|
|
981
|
+
]
|
|
982
|
+
},] }
|
|
983
|
+
];
|
|
984
|
+
|
|
985
|
+
/*
|
|
986
|
+
* Public API Surface of angular-formio
|
|
987
|
+
*/
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* Generated bundle index. Do not edit.
|
|
991
|
+
*/
|
|
992
|
+
|
|
993
|
+
exports.FormGridBodyComponent = FormGridBodyComponent;
|
|
994
|
+
exports.FormGridFooterComponent = FormGridFooterComponent;
|
|
995
|
+
exports.FormGridHeaderComponent = FormGridHeaderComponent;
|
|
996
|
+
exports.FormioGrid = FormioGrid;
|
|
997
|
+
exports.FormioGridComponent = FormioGridComponent;
|
|
998
|
+
exports.GridBodyComponent = GridBodyComponent;
|
|
999
|
+
exports.GridFooterComponent = GridFooterComponent;
|
|
1000
|
+
exports.GridHeaderComponent = GridHeaderComponent;
|
|
1001
|
+
exports.GridService = GridService;
|
|
1002
|
+
exports.SubmissionGridBodyComponent = SubmissionGridBodyComponent;
|
|
1003
|
+
exports.SubmissionGridFooterComponent = SubmissionGridFooterComponent;
|
|
1004
|
+
exports.SubmissionGridHeaderComponent = SubmissionGridHeaderComponent;
|
|
1005
|
+
exports["ɵa"] = TimeSince;
|
|
1006
|
+
|
|
1007
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1008
|
+
|
|
1009
|
+
}));
|
|
1010
|
+
//# sourceMappingURL=formio-angular-grid.umd.js.map
|