@formio/angular 5.5.0-rc.8 → 6.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/FormioBaseComponent.d.ts +2 -1
  2. package/FormioBaseComponent.d.ts.map +1 -1
  3. package/auth/auth.service.d.ts.map +1 -1
  4. package/components/alerts/formio.alerts.component.d.ts +1 -1
  5. package/components/formbuilder/formbuilder.component.d.ts +3 -3
  6. package/components/formbuilder/formbuilder.component.d.ts.map +1 -1
  7. package/components/loader/formio.loader.component.d.ts +1 -1
  8. package/core.d.ts +1 -1
  9. package/core.d.ts.map +1 -1
  10. package/custom-component/create-custom-component.d.ts +11 -11
  11. package/custom-component/create-custom-component.d.ts.map +1 -1
  12. package/elements.common.d.ts +2 -2
  13. package/elements.common.d.ts.map +1 -1
  14. package/esm2022/FormioBaseComponent.mjs +561 -0
  15. package/esm2022/auth/auth.component.mjs +13 -0
  16. package/esm2022/auth/auth.config.mjs +22 -0
  17. package/esm2022/auth/auth.module.mjs +47 -0
  18. package/esm2022/auth/auth.service.mjs +191 -0
  19. package/esm2022/auth/login/login.component.mjs +18 -0
  20. package/esm2022/auth/register/register.component.mjs +18 -0
  21. package/esm2022/auth/resetpass/resetpass.component.mjs +18 -0
  22. package/esm2022/components/alerts/formio.alerts.component.mjs +29 -0
  23. package/esm2022/components/alerts/formio.alerts.mjs +13 -0
  24. package/esm2022/components/alerts/parse-html-content.pipe.mjs +20 -0
  25. package/esm2022/components/formbuilder/formbuilder.component.mjs +202 -0
  26. package/esm2022/components/formio/formio.component.mjs +43 -0
  27. package/esm2022/components/loader/formio.loader.component.mjs +16 -0
  28. package/{esm2020 → esm2022}/core.mjs +2 -2
  29. package/esm2022/custom-component/create-custom-component.mjs +144 -0
  30. package/esm2022/custom-component/custom-tags.service.mjs +15 -0
  31. package/{esm2020 → esm2022}/custom-component/register-custom-component.mjs +2 -2
  32. package/esm2022/elements.common.mjs +2 -0
  33. package/esm2022/formio-promise.service.mjs +36 -0
  34. package/esm2022/formio.common.mjs +11 -0
  35. package/esm2022/formio.config.mjs +15 -0
  36. package/esm2022/formio.module.mjs +55 -0
  37. package/esm2022/formio.service.mjs +62 -0
  38. package/esm2022/grid/GridBodyComponent.mjs +90 -0
  39. package/esm2022/grid/GridFooterComponent.mjs +45 -0
  40. package/esm2022/grid/GridHeaderComponent.mjs +35 -0
  41. package/esm2022/grid/form/FormGridBody.component.mjs +20 -0
  42. package/esm2022/grid/form/FormGridFooter.component.mjs +27 -0
  43. package/esm2022/grid/form/FormGridHeader.component.mjs +28 -0
  44. package/esm2022/grid/form/time-since.pipe.mjs +38 -0
  45. package/esm2022/grid/grid.component.mjs +258 -0
  46. package/esm2022/grid/grid.module.mjs +80 -0
  47. package/esm2022/grid/grid.service.mjs +19 -0
  48. package/esm2022/grid/submission/SubmissionGridBody.component.mjs +44 -0
  49. package/esm2022/grid/submission/SubmissionGridFooter.component.mjs +24 -0
  50. package/esm2022/grid/submission/SubmissionGridHeader.component.mjs +64 -0
  51. package/esm2022/manager/create/create.component.mjs +19 -0
  52. package/esm2022/manager/delete/delete.component.mjs +43 -0
  53. package/esm2022/manager/edit/edit.component.mjs +123 -0
  54. package/esm2022/manager/form/form.component.mjs +81 -0
  55. package/esm2022/manager/form-manager.config.mjs +19 -0
  56. package/esm2022/manager/form-manager.module.mjs +84 -0
  57. package/esm2022/manager/form-manager.service.mjs +189 -0
  58. package/{esm2020 → esm2022}/manager/index/index.component.mjs +13 -6
  59. package/esm2022/manager/submission/delete/delete.component.mjs +33 -0
  60. package/esm2022/manager/submission/edit/edit.component.mjs +26 -0
  61. package/esm2022/manager/submission/index/index.component.mjs +26 -0
  62. package/esm2022/manager/submission/submission/submission.component.mjs +30 -0
  63. package/esm2022/manager/submission/view/view.component.mjs +18 -0
  64. package/esm2022/manager/view/view.component.mjs +52 -0
  65. package/esm2022/resource/create/create.component.mjs +44 -0
  66. package/esm2022/resource/delete/delete.component.mjs +30 -0
  67. package/esm2022/resource/edit/edit.component.mjs +43 -0
  68. package/esm2022/resource/index/index.component.mjs +71 -0
  69. package/esm2022/resource/resource.component.mjs +51 -0
  70. package/esm2022/resource/resource.config.mjs +14 -0
  71. package/esm2022/resource/resource.module.mjs +63 -0
  72. package/{esm2020 → esm2022}/resource/resource.service.mjs +29 -7
  73. package/esm2022/resource/resources.service.mjs +26 -0
  74. package/esm2022/resource/view/view.component.mjs +26 -0
  75. package/{fesm2020 → fesm2022}/formio-angular-auth.mjs +68 -36
  76. package/fesm2022/formio-angular-auth.mjs.map +1 -0
  77. package/{fesm2020 → fesm2022}/formio-angular-grid.mjs +123 -73
  78. package/fesm2022/formio-angular-grid.mjs.map +1 -0
  79. package/{fesm2020 → fesm2022}/formio-angular-manager.mjs +147 -80
  80. package/fesm2022/formio-angular-manager.mjs.map +1 -0
  81. package/{fesm2020 → fesm2022}/formio-angular-resource.mjs +109 -58
  82. package/fesm2022/formio-angular-resource.mjs.map +1 -0
  83. package/fesm2022/formio-angular.mjs +1222 -0
  84. package/fesm2022/formio-angular.mjs.map +1 -0
  85. package/formio.common.d.ts +5 -5
  86. package/formio.common.d.ts.map +1 -1
  87. package/grid/GridBodyComponent.d.ts +1 -1
  88. package/grid/GridFooterComponent.d.ts +1 -1
  89. package/grid/GridHeaderComponent.d.ts +1 -1
  90. package/grid/grid.component.d.ts +1 -1
  91. package/grid/submission/SubmissionGridHeader.component.d.ts +1 -1
  92. package/grid/submission/SubmissionGridHeader.component.d.ts.map +1 -1
  93. package/manager/form-manager.service.d.ts +1 -1
  94. package/manager/form-manager.service.d.ts.map +1 -1
  95. package/manager/view/view.component.d.ts +1 -0
  96. package/manager/view/view.component.d.ts.map +1 -1
  97. package/package.json +21 -35
  98. package/resource/edit/edit.component.d.ts +1 -0
  99. package/resource/edit/edit.component.d.ts.map +1 -1
  100. package/esm2020/FormioBaseComponent.mjs +0 -527
  101. package/esm2020/auth/auth.component.mjs +0 -12
  102. package/esm2020/auth/auth.config.mjs +0 -15
  103. package/esm2020/auth/auth.module.mjs +0 -46
  104. package/esm2020/auth/auth.service.mjs +0 -166
  105. package/esm2020/auth/login/login.component.mjs +0 -16
  106. package/esm2020/auth/register/register.component.mjs +0 -16
  107. package/esm2020/auth/resetpass/resetpass.component.mjs +0 -16
  108. package/esm2020/components/alerts/formio.alerts.component.mjs +0 -29
  109. package/esm2020/components/alerts/formio.alerts.mjs +0 -15
  110. package/esm2020/components/alerts/parse-html-content.pipe.mjs +0 -19
  111. package/esm2020/components/formbuilder/formbuilder.component.mjs +0 -187
  112. package/esm2020/components/formio/formio.component.mjs +0 -40
  113. package/esm2020/components/loader/formio.loader.component.mjs +0 -14
  114. package/esm2020/custom-component/create-custom-component.mjs +0 -144
  115. package/esm2020/custom-component/custom-tags.service.mjs +0 -16
  116. package/esm2020/elements.common.mjs +0 -2
  117. package/esm2020/formio-promise.service.mjs +0 -33
  118. package/esm2020/formio.common.mjs +0 -8
  119. package/esm2020/formio.config.mjs +0 -14
  120. package/esm2020/formio.module.mjs +0 -54
  121. package/esm2020/formio.service.mjs +0 -59
  122. package/esm2020/grid/GridBodyComponent.mjs +0 -81
  123. package/esm2020/grid/GridFooterComponent.mjs +0 -36
  124. package/esm2020/grid/GridHeaderComponent.mjs +0 -30
  125. package/esm2020/grid/form/FormGridBody.component.mjs +0 -19
  126. package/esm2020/grid/form/FormGridFooter.component.mjs +0 -26
  127. package/esm2020/grid/form/FormGridHeader.component.mjs +0 -26
  128. package/esm2020/grid/form/time-since.pipe.mjs +0 -37
  129. package/esm2020/grid/grid.component.mjs +0 -230
  130. package/esm2020/grid/grid.module.mjs +0 -79
  131. package/esm2020/grid/grid.service.mjs +0 -17
  132. package/esm2020/grid/submission/SubmissionGridBody.component.mjs +0 -43
  133. package/esm2020/grid/submission/SubmissionGridFooter.component.mjs +0 -23
  134. package/esm2020/grid/submission/SubmissionGridHeader.component.mjs +0 -61
  135. package/esm2020/manager/create/create.component.mjs +0 -18
  136. package/esm2020/manager/delete/delete.component.mjs +0 -37
  137. package/esm2020/manager/edit/edit.component.mjs +0 -109
  138. package/esm2020/manager/form/form.component.mjs +0 -70
  139. package/esm2020/manager/form-manager.config.mjs +0 -17
  140. package/esm2020/manager/form-manager.module.mjs +0 -83
  141. package/esm2020/manager/form-manager.service.mjs +0 -178
  142. package/esm2020/manager/submission/delete/delete.component.mjs +0 -28
  143. package/esm2020/manager/submission/edit/edit.component.mjs +0 -22
  144. package/esm2020/manager/submission/index/index.component.mjs +0 -22
  145. package/esm2020/manager/submission/submission/submission.component.mjs +0 -26
  146. package/esm2020/manager/submission/view/view.component.mjs +0 -16
  147. package/esm2020/manager/view/view.component.mjs +0 -42
  148. package/esm2020/resource/create/create.component.mjs +0 -37
  149. package/esm2020/resource/delete/delete.component.mjs +0 -26
  150. package/esm2020/resource/edit/edit.component.mjs +0 -36
  151. package/esm2020/resource/index/index.component.mjs +0 -61
  152. package/esm2020/resource/resource.component.mjs +0 -46
  153. package/esm2020/resource/resource.config.mjs +0 -15
  154. package/esm2020/resource/resource.module.mjs +0 -62
  155. package/esm2020/resource/resources.service.mjs +0 -22
  156. package/esm2020/resource/view/view.component.mjs +0 -23
  157. package/fesm2015/formio-angular-auth.mjs +0 -298
  158. package/fesm2015/formio-angular-auth.mjs.map +0 -1
  159. package/fesm2015/formio-angular-grid.mjs +0 -678
  160. package/fesm2015/formio-angular-grid.mjs.map +0 -1
  161. package/fesm2015/formio-angular-manager.mjs +0 -746
  162. package/fesm2015/formio-angular-manager.mjs.map +0 -1
  163. package/fesm2015/formio-angular-resource.mjs +0 -506
  164. package/fesm2015/formio-angular-resource.mjs.map +0 -1
  165. package/fesm2015/formio-angular.mjs +0 -1151
  166. package/fesm2015/formio-angular.mjs.map +0 -1
  167. package/fesm2020/formio-angular-auth.mjs.map +0 -1
  168. package/fesm2020/formio-angular-grid.mjs.map +0 -1
  169. package/fesm2020/formio-angular-manager.mjs.map +0 -1
  170. package/fesm2020/formio-angular-resource.mjs.map +0 -1
  171. package/fesm2020/formio-angular.mjs +0 -1170
  172. package/fesm2020/formio-angular.mjs.map +0 -1
  173. /package/{esm2020 → esm2022}/auth/auth.routes.mjs +0 -0
  174. /package/{esm2020 → esm2022}/auth/formio-angular-auth.mjs +0 -0
  175. /package/{esm2020 → esm2022}/auth/index.mjs +0 -0
  176. /package/{esm2020 → esm2022}/formio-angular.mjs +0 -0
  177. /package/{esm2020 → esm2022}/formio.utils.mjs +0 -0
  178. /package/{esm2020 → esm2022}/grid/form/index.mjs +0 -0
  179. /package/{esm2020 → esm2022}/grid/formio-angular-grid.mjs +0 -0
  180. /package/{esm2020 → esm2022}/grid/index.mjs +0 -0
  181. /package/{esm2020 → esm2022}/grid/submission/index.mjs +0 -0
  182. /package/{esm2020 → esm2022}/grid/types/grid-column.mjs +0 -0
  183. /package/{esm2020 → esm2022}/grid/types/grid-footer-positions.mjs +0 -0
  184. /package/{esm2020 → esm2022}/grid/types/grid-header.mjs +0 -0
  185. /package/{esm2020 → esm2022}/index.mjs +0 -0
  186. /package/{esm2020 → esm2022}/manager/form-manager.routes.mjs +0 -0
  187. /package/{esm2020 → esm2022}/manager/formio-angular-manager.mjs +0 -0
  188. /package/{esm2020 → esm2022}/manager/index.mjs +0 -0
  189. /package/{esm2020 → esm2022}/resource/formio-angular-resource.mjs +0 -0
  190. /package/{esm2020 → esm2022}/resource/index.mjs +0 -0
  191. /package/{esm2020 → esm2022}/resource/resource.routes.mjs +0 -0
  192. /package/{esm2020 → esm2022}/types/alerts-position.mjs +0 -0
  193. /package/{esm2020 → esm2022}/types/formio-metadata.mjs +0 -0
  194. /package/{esm2020 → esm2022}/types/formio-submission.mjs +0 -0
@@ -1,506 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Optional, Component, NgModule } from '@angular/core';
3
- import * as i1 from '@formio/angular/auth';
4
- import * as i1$1 from '@formio/angular';
5
- import { FormioAlerts, FormioPromiseService, extendRouter, FormioModule } from '@formio/angular';
6
- import Promise$1 from 'native-promise-only';
7
- import { Formio, Utils } from 'formiojs';
8
- import _, { each } from 'lodash';
9
- import * as i2 from '@angular/router';
10
- import { RouterModule } from '@angular/router';
11
- import * as i4 from '@angular/common';
12
- import { CommonModule } from '@angular/common';
13
- import * as i5 from '@formio/angular/grid';
14
- import { FormioGrid } from '@formio/angular/grid';
15
-
16
- class FormioResourceConfig {
17
- constructor() {
18
- this.name = '';
19
- this.form = '';
20
- this.parents = [];
21
- }
22
- }
23
- FormioResourceConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
24
- FormioResourceConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceConfig });
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceConfig, decorators: [{
26
- type: Injectable
27
- }] });
28
-
29
- class FormioResources {
30
- constructor(auth) {
31
- this.auth = auth;
32
- this.resources = {};
33
- this.error = new EventEmitter();
34
- this.onError = this.error;
35
- this.resources = {
36
- currentUser: {
37
- resourceLoaded: this.auth.userReady
38
- }
39
- };
40
- }
41
- }
42
- FormioResources.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResources, deps: [{ token: i1.FormioAuthService }], target: i0.ɵɵFactoryTarget.Injectable });
43
- FormioResources.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResources });
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResources, decorators: [{
45
- type: Injectable
46
- }], ctorParameters: function () { return [{ type: i1.FormioAuthService }]; } });
47
-
48
- class FormioResourceService {
49
- constructor(appConfig, config, resourcesService, appRef) {
50
- this.appConfig = appConfig;
51
- this.config = config;
52
- this.resourcesService = resourcesService;
53
- this.appRef = appRef;
54
- this.initialized = false;
55
- this.isLoading = true;
56
- this.alerts = new FormioAlerts();
57
- this.refresh = new EventEmitter();
58
- this.formLoaded = new Promise$1((resolve, reject) => {
59
- this.formResolve = resolve;
60
- this.formReject = reject;
61
- });
62
- this.init();
63
- }
64
- initialize() {
65
- console.warn('FormioResourceService.initialize() has been deprecated.');
66
- }
67
- init() {
68
- if (this.initialized) {
69
- return;
70
- }
71
- this.initialized = true;
72
- if (this.appConfig && this.appConfig.appUrl) {
73
- Formio.setBaseUrl(this.appConfig.apiUrl);
74
- Formio.setProjectUrl(this.appConfig.appUrl);
75
- Formio.formOnly = this.appConfig.formOnly;
76
- }
77
- else {
78
- console.error('You must provide an AppConfig within your application!');
79
- }
80
- // Create the form url and load the resources.
81
- this.formUrl = this.appConfig.appUrl + '/' + this.config.form;
82
- this.resource = { data: {} };
83
- // Add this resource service to the list of all resources in context.
84
- if (this.resourcesService) {
85
- this.resources = this.resourcesService.resources;
86
- this.resources[this.config.name] = this;
87
- }
88
- return this.loadForm();
89
- }
90
- onError(error) {
91
- this.alerts.setAlert({
92
- type: 'danger',
93
- message: error.message || error
94
- });
95
- if (this.resourcesService) {
96
- this.resourcesService.error.emit(error);
97
- }
98
- throw error;
99
- }
100
- onFormError(err) {
101
- this.formReject(err);
102
- this.onError(err);
103
- }
104
- setContext(route) {
105
- this.resourceId = route.snapshot.params['id'];
106
- this.resource = { data: {} };
107
- this.resourceUrl = this.appConfig.appUrl + '/' + this.config.form;
108
- if (this.resourceId) {
109
- this.resourceUrl += '/submission/' + this.resourceId;
110
- }
111
- this.formio = new FormioPromiseService(this.resourceUrl);
112
- if (this.resourcesService) {
113
- this.resources[this.config.name] = this;
114
- }
115
- this.loadParents();
116
- }
117
- loadForm() {
118
- this.formFormio = new FormioPromiseService(this.formUrl);
119
- this.isLoading = true;
120
- this.formLoading = this.formFormio
121
- .loadForm()
122
- .then((form) => {
123
- this.form = form;
124
- this.formResolve(form);
125
- this.isLoading = false;
126
- this.loadParents();
127
- return form;
128
- }, (err) => this.onFormError(err))
129
- .catch((err) => this.onFormError(err));
130
- return this.formLoading;
131
- }
132
- loadParents() {
133
- if (!this.config.parents || !this.config.parents.length) {
134
- return Promise$1.resolve([]);
135
- }
136
- if (!this.resourcesService) {
137
- console.warn('You must provide the FormioResources within your application to use nested resources.');
138
- return Promise$1.resolve([]);
139
- }
140
- return this.formLoading.then((form) => {
141
- // Iterate through the list of parents.
142
- const _parentsLoaded = [];
143
- this.config.parents.forEach((parent) => {
144
- const resourceName = parent.resource || parent;
145
- const resourceField = parent.field || parent;
146
- const filterResource = parent.hasOwnProperty('filter') ? parent.filter : true;
147
- if (this.resources.hasOwnProperty(resourceName) && this.resources[resourceName].resourceLoaded) {
148
- _parentsLoaded.push(this.resources[resourceName].resourceLoaded.then((resource) => {
149
- let parentPath = '';
150
- Utils.eachComponent(form.components, (component, path) => {
151
- if (component.key === resourceField) {
152
- component.hidden = true;
153
- component.clearOnHide = false;
154
- _.set(this.resource.data, path, resource);
155
- parentPath = path;
156
- return true;
157
- }
158
- });
159
- return {
160
- name: parentPath,
161
- filter: filterResource,
162
- resource
163
- };
164
- }));
165
- }
166
- });
167
- // When all the parents have loaded, emit that to the onParents emitter.
168
- return Promise$1.all(_parentsLoaded).then((parents) => {
169
- this.refresh.emit({
170
- form: form,
171
- submission: this.resource
172
- });
173
- return parents;
174
- });
175
- });
176
- }
177
- onSubmissionError(err) {
178
- this.onError(err);
179
- }
180
- loadResource(route) {
181
- this.setContext(route);
182
- this.isLoading = true;
183
- this.resourceLoading = this.resourceLoaded = this.formio
184
- .loadSubmission(null, { ignoreCache: true })
185
- .then((resource) => {
186
- this.resource = resource;
187
- this.isLoading = false;
188
- this.refresh.emit({
189
- property: 'submission',
190
- value: this.resource
191
- });
192
- return resource;
193
- }, (err) => this.onSubmissionError(err))
194
- .catch((err) => this.onSubmissionError(err));
195
- return this.resourceLoading;
196
- }
197
- save(resource) {
198
- const formio = resource._id ? this.formio : this.formFormio;
199
- return formio
200
- .saveSubmission(resource)
201
- .then((saved) => {
202
- this.resource = saved;
203
- return saved;
204
- }, (err) => this.onError(err))
205
- .catch((err) => this.onError(err));
206
- }
207
- remove() {
208
- return this.formio
209
- .deleteSubmission()
210
- .then(() => {
211
- this.resource = null;
212
- }, (err) => this.onError(err))
213
- .catch((err) => this.onError(err));
214
- }
215
- }
216
- FormioResourceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceService, deps: [{ token: i1$1.FormioAppConfig }, { token: FormioResourceConfig }, { token: FormioResources, optional: true }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
217
- FormioResourceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceService });
218
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceService, decorators: [{
219
- type: Injectable
220
- }], ctorParameters: function () {
221
- return [{ type: i1$1.FormioAppConfig }, { type: FormioResourceConfig }, { type: FormioResources, decorators: [{
222
- type: Optional
223
- }] }, { type: i0.ApplicationRef }];
224
- } });
225
-
226
- class FormioResourceComponent {
227
- constructor(service, route, auth) {
228
- this.service = service;
229
- this.route = route;
230
- this.auth = auth;
231
- this.perms = { delete: false, edit: false };
232
- // subscribe to the route param changes, so that we could re-load the submission if navigation happens from one submission to another
233
- this.paramsSubscription = this.route.params.subscribe((params) => {
234
- this.init();
235
- });
236
- }
237
- ngOnInit() {
238
- this.init();
239
- }
240
- init() {
241
- this.service.loadResource(this.route);
242
- this.service.formLoaded.then((form) => {
243
- this.auth.ready.then(() => {
244
- this.service.resourceLoaded.then((resource) => {
245
- this.service.formFormio.userPermissions(this.auth.user, form, resource).then((perms) => {
246
- this.perms.delete = perms.delete;
247
- this.perms.edit = perms.edit;
248
- });
249
- });
250
- });
251
- });
252
- }
253
- ngOnDestroy() {
254
- if (this.paramsSubscription) {
255
- this.paramsSubscription.unsubscribe();
256
- }
257
- }
258
- }
259
- FormioResourceComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceComponent, deps: [{ token: FormioResourceService }, { token: i2.ActivatedRoute }, { token: i1.FormioAuthService }], target: i0.ɵɵFactoryTarget.Component });
260
- FormioResourceComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: FormioResourceComponent, selector: "ng-component", ngImport: i0, template: "<ul class=\"nav nav-tabs\" style=\"margin-bottom: 10px\">\n <li class=\"nav-item\"><a class=\"nav-link\" routerLink=\"../\"><em class=\"fa fa-chevron-left glyphicon glyphicon-chevron-left bi bi-chevron-left\"></em></a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"view\" routerLinkActive=\"active\">View</a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\" *ngIf=\"perms.edit\"><a class=\"nav-link\" routerLink=\"edit\" routerLinkActive=\"active\">Edit</a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\" *ngIf=\"perms.delete\"><a class=\"nav-link\" routerLink=\"delete\" routerLinkActive=\"active\"><span class=\"fa fa-trash glyphicon glyphicon-trash bi bi-trash\"></span></a></li>\n</ul>\n<router-outlet></router-outlet>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceComponent, decorators: [{
262
- type: Component,
263
- args: [{ template: "<ul class=\"nav nav-tabs\" style=\"margin-bottom: 10px\">\n <li class=\"nav-item\"><a class=\"nav-link\" routerLink=\"../\"><em class=\"fa fa-chevron-left glyphicon glyphicon-chevron-left bi bi-chevron-left\"></em></a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"view\" routerLinkActive=\"active\">View</a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\" *ngIf=\"perms.edit\"><a class=\"nav-link\" routerLink=\"edit\" routerLinkActive=\"active\">Edit</a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\" *ngIf=\"perms.delete\"><a class=\"nav-link\" routerLink=\"delete\" routerLinkActive=\"active\"><span class=\"fa fa-trash glyphicon glyphicon-trash bi bi-trash\"></span></a></li>\n</ul>\n<router-outlet></router-outlet>\n" }]
264
- }], ctorParameters: function () { return [{ type: FormioResourceService }, { type: i2.ActivatedRoute }, { type: i1.FormioAuthService }]; } });
265
-
266
- class FormioResourceViewComponent {
267
- constructor(service, config) {
268
- this.service = service;
269
- this.config = config;
270
- this.submission = { data: {} };
271
- }
272
- ngOnDestroy() {
273
- Formio.clearCache();
274
- }
275
- }
276
- FormioResourceViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceViewComponent, deps: [{ token: FormioResourceService }, { token: FormioResourceConfig }], target: i0.ɵɵFactoryTarget.Component });
277
- FormioResourceViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: FormioResourceViewComponent, selector: "ng-component", ngImport: i0, template: "<formio\n [form]=\"service.form\"\n [submission]=\"service.resource\"\n [hideComponents]=\"config.parents\"\n [readOnly]=\"true\"\n></formio>\n", dependencies: [{ kind: "component", type: i1$1.FormioComponent, selector: "formio" }] });
278
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceViewComponent, decorators: [{
279
- type: Component,
280
- args: [{ template: "<formio\n [form]=\"service.form\"\n [submission]=\"service.resource\"\n [hideComponents]=\"config.parents\"\n [readOnly]=\"true\"\n></formio>\n" }]
281
- }], ctorParameters: function () { return [{ type: FormioResourceService }, { type: FormioResourceConfig }]; } });
282
-
283
- class FormioResourceEditComponent {
284
- constructor(service, route, router, config) {
285
- this.service = service;
286
- this.route = route;
287
- this.router = router;
288
- this.config = config;
289
- this.triggerError = new EventEmitter();
290
- this.submission = { data: {} };
291
- }
292
- onSubmit(submission) {
293
- const edit = this.service.resource;
294
- edit.data = submission.data;
295
- this.service.save(edit)
296
- .then(() => {
297
- this.router.navigate(['../', 'view'], { relativeTo: this.route });
298
- })
299
- .catch((err) => this.triggerError.emit(err));
300
- }
301
- ngOnDestroy() {
302
- Formio.clearCache();
303
- }
304
- }
305
- FormioResourceEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceEditComponent, deps: [{ token: FormioResourceService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: FormioResourceConfig }], target: i0.ɵɵFactoryTarget.Component });
306
- FormioResourceEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: FormioResourceEditComponent, selector: "ng-component", ngImport: i0, template: "<formio\n [form]=\"service.form\"\n [submission]=\"service.resource\"\n [error]=\"triggerError\"\n (submit)=\"onSubmit($event)\"\n></formio>\n", dependencies: [{ kind: "component", type: i1$1.FormioComponent, selector: "formio" }] });
307
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceEditComponent, decorators: [{
308
- type: Component,
309
- args: [{ template: "<formio\n [form]=\"service.form\"\n [submission]=\"service.resource\"\n [error]=\"triggerError\"\n (submit)=\"onSubmit($event)\"\n></formio>\n" }]
310
- }], ctorParameters: function () { return [{ type: FormioResourceService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: FormioResourceConfig }]; } });
311
-
312
- class FormioResourceDeleteComponent {
313
- constructor(service, route, router) {
314
- this.service = service;
315
- this.route = route;
316
- this.router = router;
317
- }
318
- onDelete() {
319
- this.service.remove().then(() => {
320
- this.router.navigate(['../../'], { relativeTo: this.route });
321
- });
322
- }
323
- onCancel() {
324
- this.router.navigate(['../', 'view'], { relativeTo: this.route });
325
- }
326
- }
327
- FormioResourceDeleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceDeleteComponent, deps: [{ token: FormioResourceService }, { token: i2.ActivatedRoute }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
328
- FormioResourceDeleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: FormioResourceDeleteComponent, selector: "ng-component", ngImport: i0, template: "<h3>Are you sure you wish to delete this record?</h3>\n<div class=\"btn-toolbar\">\n <button type=\"button\" (click)=\"onDelete()\" class=\"btn btn-danger\" style=\"margin-right: 10px;\">Yes</button>\n <button type=\"button\" (click)=\"onCancel()\" class=\"btn btn-danger\">No</button>\n</div>\n" });
329
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceDeleteComponent, decorators: [{
330
- type: Component,
331
- args: [{ template: "<h3>Are you sure you wish to delete this record?</h3>\n<div class=\"btn-toolbar\">\n <button type=\"button\" (click)=\"onDelete()\" class=\"btn btn-danger\" style=\"margin-right: 10px;\">Yes</button>\n <button type=\"button\" (click)=\"onCancel()\" class=\"btn btn-danger\">No</button>\n</div>\n" }]
332
- }], ctorParameters: function () { return [{ type: FormioResourceService }, { type: i2.ActivatedRoute }, { type: i2.Router }]; } });
333
-
334
- class FormioResourceCreateComponent {
335
- constructor(service, route, router, config) {
336
- this.service = service;
337
- this.route = route;
338
- this.router = router;
339
- this.config = config;
340
- this.onError = new EventEmitter();
341
- this.onSuccess = new EventEmitter();
342
- }
343
- ngOnInit() {
344
- this.service.setContext(this.route);
345
- }
346
- onSubmit(submission) {
347
- this.service
348
- .save(submission)
349
- .then(() => {
350
- this.router.navigate(['../', this.service.resource._id, 'view'], {
351
- relativeTo: this.route
352
- });
353
- })
354
- .catch((err) => this.onError.emit(err));
355
- }
356
- }
357
- FormioResourceCreateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceCreateComponent, deps: [{ token: FormioResourceService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: FormioResourceConfig }], target: i0.ɵɵFactoryTarget.Component });
358
- FormioResourceCreateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: FormioResourceCreateComponent, selector: "ng-component", ngImport: i0, template: "<h3 *ngIf=\"service.form\" style=\"margin-top:0;\">\n <a routerLink=\"../\" class=\"back-button\">\n <em class=\"fa fa-chevron-left glyphicon glyphicon-chevron-left bi bi-chevron-left\"></em>\n </a> | New {{ service.form.title }}\n</h3>\n<formio\n [form]=\"service.form\"\n [submission]=\"service.resource\"\n [refresh]=\"service.refresh\"\n [error]=\"onError\"\n [success]=\"onSuccess\"\n (submit)=\"onSubmit($event)\"\n></formio>\n", styles: [".back-button{font-size:.8em}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.FormioComponent, selector: "formio" }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
359
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceCreateComponent, decorators: [{
360
- type: Component,
361
- args: [{ template: "<h3 *ngIf=\"service.form\" style=\"margin-top:0;\">\n <a routerLink=\"../\" class=\"back-button\">\n <em class=\"fa fa-chevron-left glyphicon glyphicon-chevron-left bi bi-chevron-left\"></em>\n </a> | New {{ service.form.title }}\n</h3>\n<formio\n [form]=\"service.form\"\n [submission]=\"service.resource\"\n [refresh]=\"service.refresh\"\n [error]=\"onError\"\n [success]=\"onSuccess\"\n (submit)=\"onSubmit($event)\"\n></formio>\n", styles: [".back-button{font-size:.8em}\n"] }]
362
- }], ctorParameters: function () { return [{ type: FormioResourceService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: FormioResourceConfig }]; } });
363
-
364
- class FormioResourceIndexComponent {
365
- constructor(service, route, router, config, cdr, ngZone) {
366
- this.service = service;
367
- this.route = route;
368
- this.router = router;
369
- this.config = config;
370
- this.cdr = cdr;
371
- this.ngZone = ngZone;
372
- }
373
- ngOnInit() {
374
- this.gridQuery = {};
375
- this.service.setContext(this.route);
376
- this.service.formLoaded.then(() => {
377
- if (this.service &&
378
- this.config.parents &&
379
- this.config.parents.length) {
380
- this.service.loadParents().then((parents) => {
381
- each(parents, (parent) => {
382
- if (parent && parent.filter) {
383
- this.gridQuery['data.' + parent.name + '._id'] =
384
- parent.resource._id;
385
- }
386
- });
387
- // Set the source to load the grid.
388
- this.gridSrc = this.service.formUrl;
389
- this.createText = `New ${this.service.form.title}`;
390
- });
391
- }
392
- else if (this.service.formUrl) {
393
- this.gridSrc = this.service.formUrl;
394
- this.createText = `New ${this.service.form.title}`;
395
- }
396
- this.cdr.detectChanges();
397
- });
398
- }
399
- onSelect(row) {
400
- this.ngZone.run(() => {
401
- this.router.navigate([row._id, 'view'], { relativeTo: this.route });
402
- });
403
- }
404
- onCreateItem() {
405
- this.ngZone.run(() => {
406
- this.router.navigate(['new'], { relativeTo: this.route });
407
- });
408
- }
409
- }
410
- FormioResourceIndexComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceIndexComponent, deps: [{ token: FormioResourceService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: FormioResourceConfig }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
411
- FormioResourceIndexComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: FormioResourceIndexComponent, selector: "ng-component", ngImport: i0, template: "<formio-alerts [alerts]=\"service.alerts\"></formio-alerts>\n<formio-grid\n [src]=\"gridSrc\"\n [query]=\"gridQuery\"\n [onForm]=\"service.formLoaded\"\n (rowSelect)=\"onSelect($event)\"\n (error)=\"service.onError($event)\"\n (createItem)=\"onCreateItem()\"\n [createText]=\"createText\"\n></formio-grid>\n", dependencies: [{ kind: "component", type: i1$1.FormioAlertsComponent, selector: "formio-alerts", inputs: ["alerts"], outputs: ["focusComponent"] }, { kind: "component", type: i5.FormioGridComponent, selector: "formio-grid", inputs: ["footerPosition", "src", "items", "onForm", "query", "refresh", "columns", "gridType", "size", "components", "formio", "label", "createText", "isActionAllowed"], outputs: ["select", "rowSelect", "rowAction", "createItem", "error"] }] });
412
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResourceIndexComponent, decorators: [{
413
- type: Component,
414
- args: [{ template: "<formio-alerts [alerts]=\"service.alerts\"></formio-alerts>\n<formio-grid\n [src]=\"gridSrc\"\n [query]=\"gridQuery\"\n [onForm]=\"service.formLoaded\"\n (rowSelect)=\"onSelect($event)\"\n (error)=\"service.onError($event)\"\n (createItem)=\"onCreateItem()\"\n [createText]=\"createText\"\n></formio-grid>\n" }]
415
- }], ctorParameters: function () { return [{ type: FormioResourceService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: FormioResourceConfig }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; } });
416
-
417
- function FormioResourceRoutes(config) {
418
- return [
419
- {
420
- path: '',
421
- component: config && config.index ? config.index : FormioResourceIndexComponent
422
- },
423
- {
424
- path: 'new',
425
- component: config && config.create ? config.create : FormioResourceCreateComponent
426
- },
427
- {
428
- path: ':id',
429
- component: config && config.resource ? config.resource : FormioResourceComponent,
430
- children: [
431
- {
432
- path: '',
433
- redirectTo: 'view',
434
- pathMatch: 'full'
435
- },
436
- {
437
- path: 'view',
438
- component: config && config.view ? config.view : FormioResourceViewComponent
439
- },
440
- {
441
- path: 'edit',
442
- component: config && config.edit ? config.edit : FormioResourceEditComponent
443
- },
444
- {
445
- path: 'delete',
446
- component: config && config.delete ? config.delete : FormioResourceDeleteComponent
447
- }
448
- ]
449
- }
450
- ];
451
- }
452
-
453
- class FormioResource {
454
- static forChild(config) {
455
- return extendRouter(FormioResource, config, FormioResourceRoutes);
456
- }
457
- static forRoot(config) {
458
- return extendRouter(FormioResource, config, FormioResourceRoutes);
459
- }
460
- }
461
- FormioResource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResource, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
462
- FormioResource.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.1", ngImport: i0, type: FormioResource, declarations: [FormioResourceComponent,
463
- FormioResourceCreateComponent,
464
- FormioResourceIndexComponent,
465
- FormioResourceViewComponent,
466
- FormioResourceEditComponent,
467
- FormioResourceDeleteComponent], imports: [CommonModule,
468
- FormioModule,
469
- FormioGrid,
470
- RouterModule] });
471
- FormioResource.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResource, providers: [
472
- FormioAlerts
473
- ], imports: [CommonModule,
474
- FormioModule,
475
- FormioGrid,
476
- RouterModule] });
477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FormioResource, decorators: [{
478
- type: NgModule,
479
- args: [{
480
- imports: [
481
- CommonModule,
482
- FormioModule,
483
- FormioGrid,
484
- RouterModule
485
- ],
486
- declarations: [
487
- FormioResourceComponent,
488
- FormioResourceCreateComponent,
489
- FormioResourceIndexComponent,
490
- FormioResourceViewComponent,
491
- FormioResourceEditComponent,
492
- FormioResourceDeleteComponent
493
- ],
494
- providers: [
495
- FormioAlerts
496
- ]
497
- }]
498
- }] });
499
-
500
- /**
501
- * Generated bundle index. Do not edit.
502
- */
503
-
504
- export { FormioResource, FormioResourceComponent, FormioResourceConfig, FormioResourceCreateComponent, FormioResourceDeleteComponent, FormioResourceEditComponent, FormioResourceIndexComponent, FormioResourceRoutes, FormioResourceService, FormioResourceViewComponent, FormioResources };
505
- //# sourceMappingURL=formio-angular-resource.mjs.map
506
- //# sourceMappingURL=formio-angular-resource.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formio-angular-resource.mjs","sources":["../../../projects/angular-formio/resource/src/resource.config.ts","../../../projects/angular-formio/resource/src/resources.service.ts","../../../projects/angular-formio/resource/src/resource.service.ts","../../../projects/angular-formio/resource/src/resource.component.ts","../../../projects/angular-formio/resource/src/resource.component.html","../../../projects/angular-formio/resource/src/view/view.component.ts","../../../projects/angular-formio/resource/src/view/view.component.html","../../../projects/angular-formio/resource/src/edit/edit.component.ts","../../../projects/angular-formio/resource/src/edit/edit.component.html","../../../projects/angular-formio/resource/src/delete/delete.component.ts","../../../projects/angular-formio/resource/src/delete/delete.component.html","../../../projects/angular-formio/resource/src/create/create.component.ts","../../../projects/angular-formio/resource/src/create/create.component.html","../../../projects/angular-formio/resource/src/index/index.component.ts","../../../projects/angular-formio/resource/src/index/index.component.html","../../../projects/angular-formio/resource/src/resource.routes.ts","../../../projects/angular-formio/resource/src/resource.module.ts","../../../projects/angular-formio/resource/src/formio-angular-resource.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nexport interface FormioResourceRouteConfig {\n index?: any;\n create?: any;\n resource?: any;\n view?: any;\n edit?: any;\n delete?: any;\n}\n\n@Injectable()\nexport class FormioResourceConfig {\n name = '';\n form = '';\n parents: any[] = [];\n}\n","import { Injectable, EventEmitter } from '@angular/core';\nimport { FormioAuthService } from '@formio/angular/auth';\n\nexport interface FormioResourceMap {\n [name: string]: any;\n}\n\n@Injectable()\nexport class FormioResources {\n resources: FormioResourceMap = {};\n error: EventEmitter<any>;\n onError: EventEmitter<any>;\n constructor(\n public auth?: FormioAuthService\n ) {\n this.error = new EventEmitter();\n this.onError = this.error;\n this.resources = {\n currentUser: {\n resourceLoaded: this.auth.userReady\n }\n };\n }\n}\n","import { ApplicationRef, EventEmitter, Injectable, Optional } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { FormioResourceConfig } from './resource.config';\nimport { FormioResources } from './resources.service';\nimport { FormioPromiseService } from '@formio/angular';\nimport { FormioAlerts } from '@formio/angular';\nimport { FormioAppConfig } from '@formio/angular';\nimport { FormioRefreshValue } from '@formio/angular';\nimport Promise from 'native-promise-only';\nimport { Formio, Utils } from 'formiojs';\nimport _ from 'lodash';\n\n@Injectable()\nexport class FormioResourceService {\n public initialized = false;\n public form: any;\n public alerts: FormioAlerts;\n public resource: any;\n public resourceUrl?: string;\n public formUrl: string;\n public formFormio: FormioPromiseService;\n public formio: FormioPromiseService;\n public refresh: EventEmitter<FormioRefreshValue>;\n\n public resourceLoading?: Promise<any>;\n public resourceLoaded?: Promise<any>;\n public resourceId?: string;\n public resources: any;\n\n public formLoading?: Promise<any>;\n public formLoaded: Promise<any>;\n public formResolve: any;\n public formReject: any;\n public isLoading: boolean;\n\n constructor(\n public appConfig: FormioAppConfig,\n public config: FormioResourceConfig,\n @Optional() public resourcesService: FormioResources,\n public appRef: ApplicationRef,\n ) {\n this.isLoading = true;\n this.alerts = new FormioAlerts();\n this.refresh = new EventEmitter();\n this.formLoaded = new Promise((resolve: any, reject: any) => {\n this.formResolve = resolve;\n this.formReject = reject;\n });\n this.init();\n }\n\n initialize() {\n console.warn('FormioResourceService.initialize() has been deprecated.');\n }\n\n init() {\n if (this.initialized) {\n return;\n }\n this.initialized = true;\n if (this.appConfig && this.appConfig.appUrl) {\n Formio.setBaseUrl(this.appConfig.apiUrl);\n Formio.setProjectUrl(this.appConfig.appUrl);\n Formio.formOnly = this.appConfig.formOnly;\n } else {\n console.error('You must provide an AppConfig within your application!');\n }\n\n // Create the form url and load the resources.\n this.formUrl = this.appConfig.appUrl + '/' + this.config.form;\n this.resource = { data: {} };\n\n // Add this resource service to the list of all resources in context.\n if (this.resourcesService) {\n this.resources = this.resourcesService.resources;\n this.resources[this.config.name] = this;\n }\n\n return this.loadForm();\n }\n\n onError(error: any) {\n this.alerts.setAlert({\n type: 'danger',\n message: error.message || error\n });\n if (this.resourcesService) {\n this.resourcesService.error.emit(error);\n }\n throw error;\n }\n\n onFormError(err: any) {\n this.formReject(err);\n this.onError(err);\n }\n\n setContext(route: ActivatedRoute) {\n this.resourceId = route.snapshot.params['id'];\n this.resource = { data: {} };\n this.resourceUrl = this.appConfig.appUrl + '/' + this.config.form;\n if (this.resourceId) {\n this.resourceUrl += '/submission/' + this.resourceId;\n }\n this.formio = new FormioPromiseService(this.resourceUrl);\n if (this.resourcesService) {\n this.resources[this.config.name] = this;\n }\n this.loadParents();\n }\n\n loadForm() {\n this.formFormio = new FormioPromiseService(this.formUrl);\n this.isLoading = true;\n this.formLoading = this.formFormio\n .loadForm()\n .then(\n (form: any) => {\n this.form = form;\n this.formResolve(form);\n this.isLoading = false;\n this.loadParents();\n return form;\n },\n (err: any) => this.onFormError(err)\n )\n .catch((err: any) => this.onFormError(err));\n return this.formLoading;\n }\n\n loadParents() {\n if (!this.config.parents || !this.config.parents.length) {\n return Promise.resolve([]);\n }\n if (!this.resourcesService) {\n console.warn(\n 'You must provide the FormioResources within your application to use nested resources.'\n );\n return Promise.resolve([]);\n }\n return this.formLoading.then((form) => {\n // Iterate through the list of parents.\n const _parentsLoaded: Array<Promise<any>> = [];\n this.config.parents.forEach((parent: any) => {\n const resourceName = parent.resource || parent;\n const resourceField = parent.field || parent;\n const filterResource = parent.hasOwnProperty('filter') ? parent.filter : true;\n if (this.resources.hasOwnProperty(resourceName) && this.resources[resourceName].resourceLoaded) {\n _parentsLoaded.push(\n this.resources[resourceName].resourceLoaded.then((resource: any) => {\n let parentPath = '';\n Utils.eachComponent(form.components, (component, path) => {\n if (component.key === resourceField) {\n component.hidden = true;\n component.clearOnHide = false;\n _.set(this.resource.data, path, resource);\n parentPath = path;\n return true;\n }\n });\n return {\n name: parentPath,\n filter: filterResource,\n resource\n };\n })\n );\n }\n });\n\n // When all the parents have loaded, emit that to the onParents emitter.\n return Promise.all(_parentsLoaded).then((parents: any) => {\n this.refresh.emit({\n form: form,\n submission: this.resource\n });\n return parents;\n });\n });\n }\n\n onSubmissionError(err: any) {\n this.onError(err);\n }\n\n loadResource(route: ActivatedRoute) {\n this.setContext(route);\n this.isLoading = true;\n this.resourceLoading = this.resourceLoaded = this.formio\n .loadSubmission(null, {ignoreCache: true})\n .then(\n (resource: any) => {\n this.resource = resource;\n this.isLoading = false;\n this.refresh.emit({\n property: 'submission',\n value: this.resource\n });\n return resource;\n },\n (err: any) => this.onSubmissionError(err)\n )\n .catch((err: any) => this.onSubmissionError(err));\n return this.resourceLoading;\n }\n\n save(resource: any) {\n const formio = resource._id ? this.formio : this.formFormio;\n return formio\n .saveSubmission(resource)\n .then(\n (saved: any) => {\n this.resource = saved;\n return saved;\n },\n (err: any) => this.onError(err)\n )\n .catch((err: any) => this.onError(err));\n }\n\n remove() {\n return this.formio\n .deleteSubmission()\n .then(\n () => {\n this.resource = null;\n },\n (err: any) => this.onError(err)\n )\n .catch((err: any) => this.onError(err));\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\nimport { FormioAuthService } from '@formio/angular/auth';\nimport { FormioResourceService } from './resource.service';\nimport { Subscription } from 'rxjs';\n\n@Component({\n templateUrl: './resource.component.html'\n})\nexport class FormioResourceComponent implements OnInit, OnDestroy {\n private paramsSubscription: Subscription;\n public perms = {delete: false, edit: false};\n\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public auth: FormioAuthService,\n ) {\n // subscribe to the route param changes, so that we could re-load the submission if navigation happens from one submission to another\n this.paramsSubscription = this.route.params.subscribe((params) => {\n this.init();\n });\n }\n\n ngOnInit() {\n this.init();\n }\n\n init() {\n this.service.loadResource(this.route);\n this.service.formLoaded.then((form) => {\n this.auth.ready.then(() => {\n this.service.resourceLoaded.then((resource) => {\n this.service.formFormio.userPermissions(this.auth.user, form, resource).then((perms) => {\n this.perms.delete = perms.delete;\n this.perms.edit = perms.edit;\n });\n });\n });\n });\n }\n\n ngOnDestroy() {\n if (this.paramsSubscription) {\n this.paramsSubscription.unsubscribe();\n }\n }\n}\n","<ul class=\"nav nav-tabs\" style=\"margin-bottom: 10px\">\n <li class=\"nav-item\"><a class=\"nav-link\" routerLink=\"../\"><em class=\"fa fa-chevron-left glyphicon glyphicon-chevron-left bi bi-chevron-left\"></em></a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"view\" routerLinkActive=\"active\">View</a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\" *ngIf=\"perms.edit\"><a class=\"nav-link\" routerLink=\"edit\" routerLinkActive=\"active\">Edit</a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\" *ngIf=\"perms.delete\"><a class=\"nav-link\" routerLink=\"delete\" routerLinkActive=\"active\"><span class=\"fa fa-trash glyphicon glyphicon-trash bi bi-trash\"></span></a></li>\n</ul>\n<router-outlet></router-outlet>\n","import {Component, OnDestroy} from '@angular/core';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\nimport {Formio} from 'formiojs';\n\n@Component({\n templateUrl: './view.component.html'\n})\nexport class FormioResourceViewComponent implements OnDestroy{\n constructor(\n public service: FormioResourceService,\n public config: FormioResourceConfig\n ) {}\n public submission = {data: {}};\n\n ngOnDestroy() {\n Formio.clearCache();\n }\n}\n","<formio\n [form]=\"service.form\"\n [submission]=\"service.resource\"\n [hideComponents]=\"config.parents\"\n [readOnly]=\"true\"\n></formio>\n","import {Component, EventEmitter, OnDestroy} from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\nimport { Formio } from 'formiojs';\n\n@Component({\n templateUrl: './edit.component.html'\n})\nexport class FormioResourceEditComponent implements OnDestroy {\n public triggerError: EventEmitter<any> = new EventEmitter();\n public submission = {data: {}};\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormioResourceConfig\n ) {}\n\n onSubmit(submission: any) {\n const edit = this.service.resource;\n edit.data = submission.data;\n this.service.save(edit)\n .then(() => {\n this.router.navigate(['../', 'view'], { relativeTo: this.route });\n })\n .catch((err) => this.triggerError.emit(err));\n }\n\n ngOnDestroy() {\n Formio.clearCache();\n }\n}\n","<formio\n [form]=\"service.form\"\n [submission]=\"service.resource\"\n [error]=\"triggerError\"\n (submit)=\"onSubmit($event)\"\n></formio>\n","import { Component } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\n\n@Component({\n templateUrl: './delete.component.html'\n})\nexport class FormioResourceDeleteComponent {\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router\n ) {}\n\n onDelete() {\n this.service.remove().then(() => {\n this.router.navigate(['../../'], { relativeTo: this.route });\n });\n }\n\n onCancel() {\n this.router.navigate(['../', 'view'], { relativeTo: this.route });\n }\n}\n","<h3>Are you sure you wish to delete this record?</h3>\n<div class=\"btn-toolbar\">\n <button type=\"button\" (click)=\"onDelete()\" class=\"btn btn-danger\" style=\"margin-right: 10px;\">Yes</button>\n <button type=\"button\" (click)=\"onCancel()\" class=\"btn btn-danger\">No</button>\n</div>\n","import { Component, EventEmitter, OnInit } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\n\n@Component({\n styleUrls: ['./create.component.scss'],\n templateUrl: './create.component.html'\n})\nexport class FormioResourceCreateComponent implements OnInit {\n public onError: EventEmitter<any>;\n public onSuccess: EventEmitter<any>;\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormioResourceConfig\n ) {\n this.onError = new EventEmitter();\n this.onSuccess = new EventEmitter();\n }\n\n ngOnInit() {\n this.service.setContext(this.route);\n }\n\n onSubmit(submission: any) {\n this.service\n .save(submission)\n .then(() => {\n this.router.navigate(['../', this.service.resource._id, 'view'], {\n relativeTo: this.route\n });\n })\n .catch((err: any) => this.onError.emit(err));\n }\n}\n","<h3 *ngIf=\"service.form\" style=\"margin-top:0;\">\n <a routerLink=\"../\" class=\"back-button\">\n <em class=\"fa fa-chevron-left glyphicon glyphicon-chevron-left bi bi-chevron-left\"></em>\n </a> | New {{ service.form.title }}\n</h3>\n<formio\n [form]=\"service.form\"\n [submission]=\"service.resource\"\n [refresh]=\"service.refresh\"\n [error]=\"onError\"\n [success]=\"onSuccess\"\n (submit)=\"onSubmit($event)\"\n></formio>\n","import { Component, OnInit, ChangeDetectorRef, NgZone } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\nimport { each } from 'lodash';\n\n@Component({\n templateUrl: './index.component.html'\n})\nexport class FormioResourceIndexComponent implements OnInit {\n public gridSrc?: string;\n public gridQuery: any;\n public createText: String;\n\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormioResourceConfig,\n public cdr: ChangeDetectorRef,\n public ngZone: NgZone,\n ) {\n }\n\n ngOnInit() {\n this.gridQuery = {};\n this.service.setContext(this.route);\n this.service.formLoaded.then(() => {\n if (\n this.service &&\n this.config.parents &&\n this.config.parents.length\n ) {\n this.service.loadParents().then((parents: any) => {\n each(parents, (parent: any) => {\n if (parent && parent.filter) {\n this.gridQuery['data.' + parent.name + '._id'] =\n parent.resource._id;\n }\n });\n\n // Set the source to load the grid.\n this.gridSrc = this.service.formUrl;\n this.createText = `New ${this.service.form.title}`;\n });\n } else if (this.service.formUrl) {\n this.gridSrc = this.service.formUrl;\n this.createText = `New ${this.service.form.title}`;\n }\n\n this.cdr.detectChanges();\n });\n }\n\n onSelect(row: any) {\n this.ngZone.run(() => {\n this.router.navigate([row._id, 'view'], { relativeTo: this.route });\n });\n }\n\n onCreateItem() {\n this.ngZone.run(() => {\n this.router.navigate(['new'], { relativeTo: this.route });\n });\n }\n}\n","<formio-alerts [alerts]=\"service.alerts\"></formio-alerts>\n<formio-grid\n [src]=\"gridSrc\"\n [query]=\"gridQuery\"\n [onForm]=\"service.formLoaded\"\n (rowSelect)=\"onSelect($event)\"\n (error)=\"service.onError($event)\"\n (createItem)=\"onCreateItem()\"\n [createText]=\"createText\"\n></formio-grid>\n","import { Routes } from '@angular/router';\nimport { FormioResourceComponent } from './resource.component';\nimport { FormioResourceViewComponent } from './view/view.component';\nimport { FormioResourceEditComponent } from './edit/edit.component';\nimport { FormioResourceDeleteComponent } from './delete/delete.component';\nimport { FormioResourceCreateComponent } from './create/create.component';\nimport { FormioResourceIndexComponent } from './index/index.component';\nimport { FormioResourceRouteConfig } from './resource.config';\nexport function FormioResourceRoutes(config?: FormioResourceRouteConfig): Routes {\n return [\n {\n path: '',\n component: config && config.index ? config.index : FormioResourceIndexComponent\n },\n {\n path: 'new',\n component: config && config.create ? config.create : FormioResourceCreateComponent\n },\n {\n path: ':id',\n component: config && config.resource ? config.resource : FormioResourceComponent,\n children: [\n {\n path: '',\n redirectTo: 'view',\n pathMatch: 'full'\n },\n {\n path: 'view',\n component: config && config.view ? config.view : FormioResourceViewComponent\n },\n {\n path: 'edit',\n component: config && config.edit ? config.edit : FormioResourceEditComponent\n },\n {\n path: 'delete',\n component: config && config.delete ? config.delete : FormioResourceDeleteComponent\n }\n ]\n }\n ];\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { CommonModule } from '@angular/common';\nimport { FormioModule } from '@formio/angular';\nimport { FormioAlerts } from '@formio/angular';\nimport { FormioGrid } from '@formio/angular/grid';\nimport { FormioResourceComponent } from './resource.component';\nimport { FormioResourceViewComponent } from './view/view.component';\nimport { FormioResourceEditComponent } from './edit/edit.component';\nimport { FormioResourceDeleteComponent } from './delete/delete.component';\nimport { FormioResourceCreateComponent } from './create/create.component';\nimport { FormioResourceIndexComponent } from './index/index.component';\nimport { FormioResourceRouteConfig } from './resource.config';\nimport { FormioResourceRoutes } from './resource.routes';\nimport { extendRouter } from '@formio/angular';\n\n@NgModule({\n imports: [\n CommonModule,\n FormioModule,\n FormioGrid,\n RouterModule\n ],\n declarations: [\n FormioResourceComponent,\n FormioResourceCreateComponent,\n FormioResourceIndexComponent,\n FormioResourceViewComponent,\n FormioResourceEditComponent,\n FormioResourceDeleteComponent\n ],\n providers: [\n FormioAlerts\n ]\n})\nexport class FormioResource {\n static forChild(config?: FormioResourceRouteConfig): any {\n return extendRouter(FormioResource, config, FormioResourceRoutes);\n }\n static forRoot(config?: FormioResourceRouteConfig): any {\n return extendRouter(FormioResource, config, FormioResourceRoutes);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Promise","i1","i2.FormioResourceConfig","i3.FormioResources","i1.FormioResourceService","i3","i3.FormioResourceConfig","i4","i5"],"mappings":";;;;;;;;;;;;;;;MAYa,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;AACV,QAAA,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;AACV,QAAA,IAAO,CAAA,OAAA,GAAU,EAAE,CAAC;KACrB;;iHAJY,oBAAoB,EAAA,IAAA,EAAA,EAAA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