@valtimo/form-view-model 12.7.0 → 12.9.0

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.
@@ -13,8 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Injectable } from '@angular/core';
17
16
  import { HttpHeaders } from '@angular/common/http';
17
+ import { Injectable } from '@angular/core';
18
18
  import { BaseApiService } from '@valtimo/config';
19
19
  import { InterceptorSkip } from '@valtimo/security';
20
20
  import * as i0 from "@angular/core";
@@ -56,33 +56,36 @@ export class ViewModelService extends BaseApiService {
56
56
  headers: new HttpHeaders().set(InterceptorSkip, '400'),
57
57
  });
58
58
  }
59
- getViewModelForStartForm(formName, processDefinitionKey) {
59
+ getViewModelForStartForm(formName, processDefinitionKey, documentId = null) {
60
60
  return this.httpClient.get(this.getApiUrl('/v1/form/view-model/start-form'), {
61
61
  params: {
62
62
  formName,
63
63
  processDefinitionKey,
64
+ ...(!!documentId && { documentId }),
64
65
  },
65
66
  headers: new HttpHeaders().set(InterceptorSkip, '400'),
66
67
  });
67
68
  }
68
- updateViewModelForStartForm(formName, processDefinitionKey, viewModel, page, isWizard) {
69
+ updateViewModelForStartForm(formName, processDefinitionKey, documentId, viewModel, page, isWizard) {
69
70
  const params = {
70
71
  formName,
71
72
  processDefinitionKey,
72
73
  isWizard,
73
74
  ...(!isNaN(page) && { page }),
75
+ ...(!!documentId && { documentId }),
74
76
  };
75
77
  return this.httpClient.post(this.getApiUrl(`/v1/form/view-model/start-form`), viewModel, {
76
78
  params,
77
79
  headers: new HttpHeaders().set(InterceptorSkip, '400'),
78
80
  });
79
81
  }
80
- submitViewModelForStartForm(formName, processDefinitionKey, documentDefinitionName, viewModel) {
82
+ submitViewModelForStartForm(formName, processDefinitionKey, documentId, documentDefinitionName, viewModel) {
81
83
  return this.httpClient.post(this.getApiUrl(`/v1/form/view-model/submit/start-form`), viewModel, {
82
84
  params: {
83
85
  formName,
84
86
  processDefinitionKey,
85
87
  documentDefinitionName,
88
+ ...(!!documentId && { documentId }),
86
89
  },
87
90
  headers: new HttpHeaders().set(InterceptorSkip, '400'),
88
91
  });
@@ -94,4 +97,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
94
97
  type: Injectable,
95
98
  args: [{ providedIn: 'root' }]
96
99
  }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
97
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlldy1tb2RlbC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdmFsdGltby9mb3JtLXZpZXctbW9kZWwvc3JjL2xpYi9zZXJ2aWNlcy92aWV3LW1vZGVsLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7O0dBY0c7QUFFSCxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBYSxXQUFXLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQztBQUU3RCxPQUFPLEVBQUMsY0FBYyxFQUFnQixNQUFNLGlCQUFpQixDQUFDO0FBQzlELE9BQU8sRUFBQyxlQUFlLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQzs7OztBQUdsRCxNQUFNLE9BQU8sZ0JBQWlCLFNBQVEsY0FBYztJQUNsRCxZQUNxQixVQUFzQixFQUN0QixhQUE0QjtRQUUvQyxLQUFLLENBQUMsVUFBVSxFQUFFLGFBQWEsQ0FBQyxDQUFDO1FBSGQsZUFBVSxHQUFWLFVBQVUsQ0FBWTtRQUN0QixrQkFBYSxHQUFiLGFBQWEsQ0FBZTtJQUdqRCxDQUFDO0lBRU0sWUFBWSxDQUFDLFFBQWdCLEVBQUUsY0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ICAgICB0aGlzLmdldEFwaVVybChgL3YxL2Zvcm0vdmlldy1tb2RlbC9zdWJtaXQvc3RhcnQtZm9ybWApLFxuICAgICAgdmlld01vZGVsLFxuICAgICAge1xuICAgICAgICBwYXJhbXM6IHtcbiAgICAgICAgICBmb3JtTmFtZSxcbiAgICAgICAgICBwcm9jZXNzRGVmaW5pdGlvbktleSxcbiAgICAgICAgICBkb2N1bWVudERlZmluaXRpb25OYW1lLFxuICAgICAgICAgIC4uLighIWRvY3VtZW50SWQgJiYge2RvY3VtZW50SWR9KSxcbiAgICAgICAgfSxcbiAgICAgICAgaGVhZGVyczogbmV3IEh0dHBIZWFkZXJzKCkuc2V0KEludGVyY2VwdG9yU2tpcCwgJzQwMCcpLFxuICAgICAgfVxuICAgICk7XG4gIH1cbn1cbiJdfQ==
@@ -1,16 +1,17 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Component, ViewChild, Input, Output, NgModule } from '@angular/core';
2
+ import { Injectable, EventEmitter, Output, Input, ViewChild, Component, NgModule } from '@angular/core';
3
3
  import moment from 'moment';
4
- import { BehaviorSubject, Subject, combineLatest, withLatestFrom, take, filter, debounceTime, switchMap, of, catchError, EMPTY, tap } from 'rxjs';
4
+ import { BehaviorSubject, Subject, combineLatest, filter, take, switchMap, tap } from 'rxjs';
5
5
  import * as i5 from '@formio/angular';
6
6
  import { FormioModule } from '@formio/angular';
7
7
  import { map, distinctUntilChanged } from 'rxjs/operators';
8
8
  import { deepmerge } from 'deepmerge-ts';
9
+ import * as i1 from '@angular/common/http';
10
+ import { HttpHeaders, HttpErrorResponse } from '@angular/common/http';
9
11
  import * as i4 from '@angular/common';
10
12
  import { CommonModule } from '@angular/common';
11
- import { isEqual } from 'lodash';
12
- import * as i1 from '@angular/common/http';
13
- import { HttpHeaders } from '@angular/common/http';
13
+ import * as i6 from 'carbon-components-angular';
14
+ import { LayerModule } from 'carbon-components-angular';
14
15
  import * as i2 from '@valtimo/config';
15
16
  import { BaseApiService, FORM_VIEW_MODEL_TOKEN } from '@valtimo/config';
16
17
  import { InterceptorSkip } from '@valtimo/security';
@@ -68,33 +69,36 @@ class ViewModelService extends BaseApiService {
68
69
  headers: new HttpHeaders().set(InterceptorSkip, '400'),
69
70
  });
70
71
  }
71
- getViewModelForStartForm(formName, processDefinitionKey) {
72
+ getViewModelForStartForm(formName, processDefinitionKey, documentId = null) {
72
73
  return this.httpClient.get(this.getApiUrl('/v1/form/view-model/start-form'), {
73
74
  params: {
74
75
  formName,
75
76
  processDefinitionKey,
77
+ ...(!!documentId && { documentId }),
76
78
  },
77
79
  headers: new HttpHeaders().set(InterceptorSkip, '400'),
78
80
  });
79
81
  }
80
- updateViewModelForStartForm(formName, processDefinitionKey, viewModel, page, isWizard) {
82
+ updateViewModelForStartForm(formName, processDefinitionKey, documentId, viewModel, page, isWizard) {
81
83
  const params = {
82
84
  formName,
83
85
  processDefinitionKey,
84
86
  isWizard,
85
87
  ...(!isNaN(page) && { page }),
88
+ ...(!!documentId && { documentId }),
86
89
  };
87
90
  return this.httpClient.post(this.getApiUrl(`/v1/form/view-model/start-form`), viewModel, {
88
91
  params,
89
92
  headers: new HttpHeaders().set(InterceptorSkip, '400'),
90
93
  });
91
94
  }
92
- submitViewModelForStartForm(formName, processDefinitionKey, documentDefinitionName, viewModel) {
95
+ submitViewModelForStartForm(formName, processDefinitionKey, documentId, documentDefinitionName, viewModel) {
93
96
  return this.httpClient.post(this.getApiUrl(`/v1/form/view-model/submit/start-form`), viewModel, {
94
97
  params: {
95
98
  formName,
96
99
  processDefinitionKey,
97
100
  documentDefinitionName,
101
+ ...(!!documentId && { documentId }),
98
102
  },
99
103
  headers: new HttpHeaders().set(InterceptorSkip, '400'),
100
104
  });
@@ -151,6 +155,8 @@ class FormViewModelComponent {
151
155
  const form = {
152
156
  loadInitialViewModel: () => instance.loadInitialViewModel(),
153
157
  updateViewModel: () => instance.updateViewModel(),
158
+ loadInitialStartFormViewModel: () => instance.loadInitialViewModelForStartForm(),
159
+ updateViewStartFormModel: () => instance.updateViewModelForStartForm(),
154
160
  ...formValue,
155
161
  };
156
162
  this.form$.next(form);
@@ -164,6 +170,9 @@ class FormViewModelComponent {
164
170
  set isStartForm(isStartFormValue) {
165
171
  this.isStartForm$.next(isStartFormValue);
166
172
  }
173
+ set documentId(documentId) {
174
+ this.documentId$.next(documentId);
175
+ }
167
176
  set processDefinitionKey(processDefinitionKeyValue) {
168
177
  this.processDefinitionKey$.next(processDefinitionKeyValue);
169
178
  }
@@ -175,14 +184,15 @@ class FormViewModelComponent {
175
184
  this.translateService = translateService;
176
185
  this.stateService = stateService;
177
186
  this.formSubmit = new EventEmitter();
178
- this.errors = [];
179
187
  this.refreshForm = new EventEmitter();
180
188
  this._preventNextPage = false;
181
189
  this._preventPreviousPage = false;
182
190
  this._isWizard = false;
191
+ this.pendingUpdateSubscription = null;
183
192
  this.submission$ = new BehaviorSubject({});
184
193
  this.form$ = new BehaviorSubject(undefined);
185
194
  this.formName$ = new BehaviorSubject(undefined);
195
+ this.formErrors$ = new BehaviorSubject([]);
186
196
  this.options$ = new BehaviorSubject(undefined);
187
197
  this.taskInstanceId$ = new BehaviorSubject(undefined);
188
198
  this.tokenSetInLocalStorage$ = new BehaviorSubject(false);
@@ -191,6 +201,7 @@ class FormViewModelComponent {
191
201
  this.focus$ = new BehaviorSubject(null);
192
202
  this.loading$ = new BehaviorSubject(true);
193
203
  this.isStartForm$ = new BehaviorSubject(false);
204
+ this.documentId$ = new BehaviorSubject(null);
194
205
  this.processDefinitionKey$ = new BehaviorSubject(undefined);
195
206
  this.documentDefinitionName$ = new BehaviorSubject(undefined);
196
207
  this.updateForm = new Subject();
@@ -201,13 +212,14 @@ class FormViewModelComponent {
201
212
  },
202
213
  });
203
214
  this.formioOptions$ = combineLatest([
204
- this.currentLanguage$,
205
215
  this.options$,
206
216
  this._overrideOptions$,
207
- ]).pipe(map(([language, options, overrideOptions]) => {
217
+ ]).pipe(map(([options, overrideOptions]) => {
218
+ return deepmerge(options, overrideOptions);
219
+ }));
220
+ this.renderOptions$ = combineLatest([this.currentLanguage$]).pipe(map(([language]) => {
208
221
  const formioTranslations = this.translateService.instant('formioTranslations');
209
- const defaultOptions = {
210
- ...options,
222
+ return {
211
223
  language,
212
224
  ...(typeof formioTranslations === 'object'
213
225
  ? {
@@ -218,7 +230,6 @@ class FormViewModelComponent {
218
230
  }
219
231
  : {}),
220
232
  };
221
- return deepmerge(defaultOptions, overrideOptions);
222
233
  }));
223
234
  }
224
235
  ngOnInit() {
@@ -229,20 +240,26 @@ class FormViewModelComponent {
229
240
  this.loadInitialViewModel();
230
241
  }
231
242
  this.focusSubscription = this.focus$
232
- .pipe(withLatestFrom(this.change$))
233
- .subscribe(data => {
234
- const dataAtFocus = !!data[1] && !!data[1].data ? JSON.parse(JSON.stringify(data[1].data)) : null;
235
- this.blur$
236
- .pipe(take(1))
237
- .pipe(withLatestFrom(this.change$))
238
- .subscribe(dataBlur => {
239
- const dataEqual = isEqual(dataAtFocus, dataBlur[1]?.data);
240
- if (!dataEqual) {
241
- this.updateForm.next(true);
242
- }
243
+ .pipe(filter(e => {
244
+ // We only want to handle blur events after entering an input
245
+ return !!e && e.target instanceof HTMLInputElement;
246
+ }))
247
+ .subscribe(() => {
248
+ this.pendingUpdateSubscription?.unsubscribe();
249
+ this.blurSubscription?.unsubscribe();
250
+ this.blurSubscription = this.blur$
251
+ .pipe(filter(e => {
252
+ // Filter out events where relatedTarget is not null.
253
+ // The relatedTarget will be null when no new input is focused.
254
+ return !e.relatedTarget;
255
+ }))
256
+ .subscribe(() => {
257
+ this.blurSubscription?.unsubscribe();
258
+ this.setWaitCursor(true);
259
+ this.updateForm.next(true);
243
260
  });
244
261
  });
245
- this.updateSubscription = this.updateForm.pipe(filter(it => it), debounceTime(500)).subscribe(() => {
262
+ this.updateSubscription = this.updateForm.subscribe(() => {
246
263
  if (this.isStartForm$.value) {
247
264
  this.updateViewModelForStartForm();
248
265
  }
@@ -252,64 +269,69 @@ class FormViewModelComponent {
252
269
  });
253
270
  }
254
271
  ngOnDestroy() {
255
- this.focusSubscription.unsubscribe();
256
- this.updateSubscription.unsubscribe();
272
+ this.blurSubscription?.unsubscribe();
273
+ this.focusSubscription?.unsubscribe();
274
+ this.updateSubscription?.unsubscribe();
275
+ this.pendingUpdateSubscription?.unsubscribe();
276
+ this.setWaitCursor(false);
257
277
  }
258
278
  beforeSubmitHook(instance) {
259
279
  return (submission, callback) => instance.beforeSubmit(submission, callback);
260
280
  }
261
281
  beforeSubmit(submission, callback) {
282
+ this.pendingUpdateSubscription?.unsubscribe();
283
+ this.setWaitCursor(false);
262
284
  combineLatest([
263
285
  this.formName$,
264
286
  this.taskInstanceId$,
265
287
  this.processDefinitionKey$,
266
288
  this.documentDefinitionName$,
267
289
  this.isStartForm$,
290
+ this.documentId$,
268
291
  ])
269
- .pipe(take(1), switchMap(([formName, taskInstanceId, processDefinitionKey, documentDefinitionName, isStartForm,]) => isStartForm
270
- ? this.viewModelService
271
- .submitViewModelForStartForm(formName, processDefinitionKey, documentDefinitionName, submission.data)
272
- .pipe(take(1), switchMap(response => {
273
- callback(null, submission);
274
- return of(response);
275
- }), catchError(error => {
276
- this.handleFormError(error);
277
- callback({ message: ' ', component: null }, null);
278
- return EMPTY; // return an empty observable to complete the stream
279
- }))
280
- : this.viewModelService
281
- .submitViewModel(formName, taskInstanceId, submission.data)
282
- .pipe(take(1), switchMap(response => {
292
+ .pipe(take(1), switchMap(([formName, taskInstanceId, processDefinitionKey, documentDefinitionName, isStartForm, documentId,]) => isStartForm
293
+ ? this.viewModelService.submitViewModelForStartForm(formName, processDefinitionKey, documentId, documentDefinitionName, submission.data)
294
+ : this.viewModelService.submitViewModel(formName, taskInstanceId, submission.data)))
295
+ .subscribe({
296
+ next: _ => {
283
297
  callback(null, submission);
284
- return of(response);
285
- }), catchError(error => {
286
- this.handleFormError(error);
287
- callback({ message: ' ', component: null }, null);
288
- return EMPTY; // return an empty observable to complete the stream
289
- }))))
290
- .subscribe();
298
+ },
299
+ error: err => {
300
+ this.handleSubmissionError(err, callback);
301
+ },
302
+ });
303
+ }
304
+ handleSubmissionError(error, callback) {
305
+ callback({ message: '', component: null, silent: true }, null);
306
+ if (error instanceof HttpErrorResponse) {
307
+ this.handleFormError(error);
308
+ }
291
309
  }
292
310
  handleFormError(error) {
293
311
  const formInstance = this.formio.formio;
294
- this.errors = [];
295
- if (error.error.componentErrors) {
312
+ this.formErrors$.next([]);
313
+ if (error.error?.componentErrors) {
314
+ const errors = [];
296
315
  error.error.componentErrors.forEach(componentError => {
297
316
  const component = formInstance.getComponent(componentError.component);
298
317
  if (component == null) {
299
- this.errors.push(componentError.message);
318
+ errors.push(componentError.message);
300
319
  }
301
320
  else {
302
- component?.setCustomValidity(componentError.message);
321
+ // `true` makes the error dirty, setting the css class properly
322
+ component.setCustomValidity(componentError.message, true);
303
323
  }
304
324
  });
325
+ this.formErrors$.next(errors);
305
326
  }
306
- else {
327
+ else if (error.error?.error) {
307
328
  const component = formInstance.getComponent(error.error?.component);
308
329
  if (component == null) {
309
- this.errors.push(error.error.error);
330
+ this.formErrors$.next([error.error.error]);
310
331
  }
311
332
  else {
312
- component?.setCustomValidity(error.error.error);
333
+ // `true` makes the error dirty, setting the css class properly
334
+ component.setCustomValidity(error.error.error, true);
313
335
  }
314
336
  }
315
337
  }
@@ -358,36 +380,11 @@ class FormViewModelComponent {
358
380
  }))))
359
381
  .subscribe();
360
382
  }
361
- updateViewModel() {
362
- this.loading$
363
- .pipe(take(1), switchMap(updating => {
364
- if (!updating) {
365
- this.loading$.next(true);
366
- return combineLatest([this.formName$, this.taskInstanceId$, this.change$]).pipe(take(1), switchMap(([formName, taskInstanceId, change]) => this.viewModelService
367
- .updateViewModel(formName, taskInstanceId, change.data, this.formio.formio.page, this._isWizard)
368
- .pipe(tap({
369
- next: viewModel => {
370
- const submission = this.submission$.value;
371
- submission.data = viewModel;
372
- this.submission$.next(submission);
373
- this.handlePageChange();
374
- this.refreshForm.emit({ submission: submission });
375
- this.loading$.next(false);
376
- this.errors = [];
377
- },
378
- error: error => {
379
- this.loading$.next(false);
380
- this.handleFormError(error);
381
- },
382
- }))));
383
- }
384
- return of(null); // Fallback to return an observable if updating is true
385
- }))
386
- .subscribe();
387
- }
388
383
  loadInitialViewModelForStartForm() {
389
- combineLatest([this.formName$, this.processDefinitionKey$])
390
- .pipe(take(1), switchMap(([formName, processDefinitionKey]) => this.viewModelService.getViewModelForStartForm(formName, processDefinitionKey).pipe(tap(viewModel => {
384
+ combineLatest([this.formName$, this.processDefinitionKey$, this.documentId$])
385
+ .pipe(take(1), switchMap(([formName, processDefinitionKey, documentId]) => this.viewModelService
386
+ .getViewModelForStartForm(formName, processDefinitionKey, documentId)
387
+ .pipe(tap(viewModel => {
391
388
  this.submission$.next({ data: viewModel });
392
389
  this.change$.pipe(take(1)).subscribe(() => {
393
390
  this.loading$.next(false);
@@ -396,39 +393,63 @@ class FormViewModelComponent {
396
393
  }))))
397
394
  .subscribe();
398
395
  }
396
+ updateViewModel() {
397
+ this.pendingUpdateSubscription?.unsubscribe();
398
+ this.pendingUpdateSubscription = combineLatest([
399
+ this.formName$,
400
+ this.taskInstanceId$,
401
+ this.change$,
402
+ ])
403
+ .pipe(take(1), switchMap(([formName, taskInstanceId, change]) => this.viewModelService
404
+ .updateViewModel(formName, taskInstanceId, change.data, this.formio.formio.page, this._isWizard)
405
+ .pipe(tap({
406
+ next: viewModel => this.handleViewModelUpdate(viewModel),
407
+ error: error => this.handleViewModelUpdateError(error),
408
+ }))))
409
+ .subscribe();
410
+ }
399
411
  updateViewModelForStartForm() {
400
- this.loading$
401
- .pipe(take(1), switchMap(updating => {
402
- if (!updating) {
403
- this.loading$.next(true);
404
- return combineLatest([this.formName$, this.processDefinitionKey$, this.change$]).pipe(take(1), switchMap(([formName, processDefinitionKey, change]) => this.viewModelService
405
- .updateViewModelForStartForm(formName, processDefinitionKey, change.data, this.formio.formio.page, this._isWizard)
406
- .pipe(tap({
407
- next: viewModel => {
408
- const submission = this.submission$.value;
409
- submission.data = viewModel;
410
- this.submission$.next(submission);
411
- this.handlePageChange();
412
- this.refreshForm.emit({ submission: submission });
413
- this.loading$.next(false);
414
- this.errors = [];
415
- },
416
- error: error => {
417
- this.loading$.next(false);
418
- this.handleFormError(error);
419
- },
420
- }))));
421
- }
422
- return of(null); // Fallback to return an observable if updating is true
423
- }))
412
+ this.pendingUpdateSubscription?.unsubscribe();
413
+ this.pendingUpdateSubscription = combineLatest([
414
+ this.formName$,
415
+ this.processDefinitionKey$,
416
+ this.change$,
417
+ this.documentId$,
418
+ ])
419
+ .pipe(take(1), switchMap(([formName, processDefinitionKey, change, documentId]) => this.viewModelService
420
+ .updateViewModelForStartForm(formName, processDefinitionKey, documentId, change.data, this.formio.formio.page, this._isWizard)
421
+ .pipe(tap({
422
+ next: viewModel => this.handleViewModelUpdate(viewModel),
423
+ error: error => this.handleViewModelUpdateError(error),
424
+ }))))
424
425
  .subscribe();
425
426
  }
427
+ handleViewModelUpdate(viewModel) {
428
+ const submission = this.submission$.value;
429
+ submission.data = viewModel;
430
+ this.submission$.next(submission);
431
+ this.handlePageChange();
432
+ this.refreshForm.emit({ submission });
433
+ this.pendingUpdateSubscription?.unsubscribe();
434
+ this.pendingUpdateSubscription = null;
435
+ this.formErrors$.next([]);
436
+ this.setWaitCursor(false);
437
+ }
438
+ handleViewModelUpdateError(error) {
439
+ this.pendingUpdateSubscription?.unsubscribe();
440
+ this.pendingUpdateSubscription = null;
441
+ this.handleFormError(error);
442
+ this.setWaitCursor(false);
443
+ }
444
+ setWaitCursor(enabled) {
445
+ document.body.style.cursor = enabled ? 'wait' : 'auto';
446
+ }
426
447
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormViewModelComponent, deps: [{ token: ViewModelService }, { token: i2$1.TranslateService }, { token: i3.FormIoStateService }], target: i0.ɵɵFactoryTarget.Component }); }
427
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FormViewModelComponent, isStandalone: true, selector: "valtimo-form-view-model", inputs: { options: "options", submission: "submission", form: "form", formName: "formName", taskInstanceId: "taskInstanceId", isStartForm: "isStartForm", processDefinitionKey: "processDefinitionKey", documentDefinitionName: "documentDefinitionName" }, outputs: { formSubmit: "formSubmit" }, viewQueries: [{ propertyName: "formio", first: true, predicate: ["formio"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"form-container formio-carbon\"\n *ngIf=\"{\n submission: submission$ | async,\n form: form$ | async,\n tokenSetInLocalStorage: tokenSetInLocalStorage$ | async,\n formioOptions: formioOptions$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <div *ngIf=\"obs.loading\" class=\"overlay\">\n <div class=\"spinner\">\n <i class=\"fa fa-spinner fa-spin\"></i>\n </div>\n </div>\n\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\" class=\"pl-2\">\n {{ error }}\n </li>\n </ol>\n </div>\n\n <formio\n #formio\n [submission]=\"obs.submission\"\n [form]=\"obs.form\"\n [options]=\"obs.formioOptions\"\n [refresh]=\"refreshForm\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n (focusin)=\"onFocus($event)\"\n (focusout)=\"onBlur($event)\"\n (nextPage)=\"onNextPage()\"\n (prevPage)=\"onPreviousPage()\"\n ></formio>\n</div>\n", styles: [".form-container{position:relative}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#fffc;z-index:1000;display:flex;justify-content:center;align-items:center;pointer-events:all}.spinner{font-size:3rem;color:#007bff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormioModule }, { kind: "component", type: i5.FormioComponent, selector: "formio" }] }); }
448
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FormViewModelComponent, isStandalone: true, selector: "valtimo-form-view-model", inputs: { options: "options", submission: "submission", form: "form", formName: "formName", taskInstanceId: "taskInstanceId", isStartForm: "isStartForm", documentId: "documentId", processDefinitionKey: "processDefinitionKey", documentDefinitionName: "documentDefinitionName" }, outputs: { formSubmit: "formSubmit" }, viewQueries: [{ propertyName: "formio", first: true, predicate: ["formio"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"form-container formio-carbon\"\n cdsLayer=\"1.0\"\n *ngIf=\"{\n submission: submission$ | async,\n form: form$ | async,\n tokenSetInLocalStorage: tokenSetInLocalStorage$ | async,\n formioOptions: formioOptions$ | async,\n loading: loading$ | async,\n errors: formErrors$ | async,\n renderOptions: renderOptions$ | async,\n } as obs\"\n>\n <div *ngIf=\"obs.loading\" class=\"overlay\">\n <div class=\"spinner\">\n <i class=\"fa fa-spinner fa-spin\"></i>\n </div>\n </div>\n\n <div *ngIf=\"obs.errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of obs.errors\" class=\"pl-2\">\n {{ error }}\n </li>\n </ol>\n </div>\n\n <formio\n #formio\n [submission]=\"obs.submission\"\n [form]=\"obs.form\"\n [options]=\"obs.formioOptions\"\n [renderOptions]=\"obs.renderOptions\"\n [refresh]=\"refreshForm\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n (focusin)=\"onFocus($event)\"\n (focusout)=\"onBlur($event)\"\n (nextPage)=\"onNextPage()\"\n (prevPage)=\"onPreviousPage()\"\n ></formio>\n</div>\n", styles: [".form-container{position:relative}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#fffc;z-index:1000;display:flex;justify-content:center;align-items:center;pointer-events:all}.spinner{font-size:3rem;color:#007bff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormioModule }, { kind: "component", type: i5.FormioComponent, selector: "formio" }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i6.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }] }); }
428
449
  }
429
450
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormViewModelComponent, decorators: [{
430
451
  type: Component,
431
- args: [{ selector: 'valtimo-form-view-model', standalone: true, imports: [CommonModule, FormioModule], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"form-container formio-carbon\"\n *ngIf=\"{\n submission: submission$ | async,\n form: form$ | async,\n tokenSetInLocalStorage: tokenSetInLocalStorage$ | async,\n formioOptions: formioOptions$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <div *ngIf=\"obs.loading\" class=\"overlay\">\n <div class=\"spinner\">\n <i class=\"fa fa-spinner fa-spin\"></i>\n </div>\n </div>\n\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\" class=\"pl-2\">\n {{ error }}\n </li>\n </ol>\n </div>\n\n <formio\n #formio\n [submission]=\"obs.submission\"\n [form]=\"obs.form\"\n [options]=\"obs.formioOptions\"\n [refresh]=\"refreshForm\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n (focusin)=\"onFocus($event)\"\n (focusout)=\"onBlur($event)\"\n (nextPage)=\"onNextPage()\"\n (prevPage)=\"onPreviousPage()\"\n ></formio>\n</div>\n", styles: [".form-container{position:relative}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#fffc;z-index:1000;display:flex;justify-content:center;align-items:center;pointer-events:all}.spinner{font-size:3rem;color:#007bff}\n"] }]
452
+ args: [{ selector: 'valtimo-form-view-model', standalone: true, imports: [CommonModule, FormioModule, LayerModule], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"form-container formio-carbon\"\n cdsLayer=\"1.0\"\n *ngIf=\"{\n submission: submission$ | async,\n form: form$ | async,\n tokenSetInLocalStorage: tokenSetInLocalStorage$ | async,\n formioOptions: formioOptions$ | async,\n loading: loading$ | async,\n errors: formErrors$ | async,\n renderOptions: renderOptions$ | async,\n } as obs\"\n>\n <div *ngIf=\"obs.loading\" class=\"overlay\">\n <div class=\"spinner\">\n <i class=\"fa fa-spinner fa-spin\"></i>\n </div>\n </div>\n\n <div *ngIf=\"obs.errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of obs.errors\" class=\"pl-2\">\n {{ error }}\n </li>\n </ol>\n </div>\n\n <formio\n #formio\n [submission]=\"obs.submission\"\n [form]=\"obs.form\"\n [options]=\"obs.formioOptions\"\n [renderOptions]=\"obs.renderOptions\"\n [refresh]=\"refreshForm\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n (focusin)=\"onFocus($event)\"\n (focusout)=\"onBlur($event)\"\n (nextPage)=\"onNextPage()\"\n (prevPage)=\"onPreviousPage()\"\n ></formio>\n</div>\n", styles: [".form-container{position:relative}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#fffc;z-index:1000;display:flex;justify-content:center;align-items:center;pointer-events:all}.spinner{font-size:3rem;color:#007bff}\n"] }]
432
453
  }], ctorParameters: () => [{ type: ViewModelService }, { type: i2$1.TranslateService }, { type: i3.FormIoStateService }], propDecorators: { formio: [{
433
454
  type: ViewChild,
434
455
  args: ['formio']
@@ -444,6 +465,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
444
465
  type: Input
445
466
  }], isStartForm: [{
446
467
  type: Input
468
+ }], documentId: [{
469
+ type: Input
447
470
  }], processDefinitionKey: [{
448
471
  type: Input
449
472
  }], documentDefinitionName: [{