@valtimo/form-view-model 12.1.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.
- package/esm2022/lib/components/form-view-model/form-view-model.component.mjs +282 -0
- package/esm2022/lib/components/form-view-model/index.mjs +17 -0
- package/esm2022/lib/form-view-model.module.mjs +41 -0
- package/esm2022/lib/services/index.mjs +17 -0
- package/esm2022/lib/services/view-model.service.mjs +91 -0
- package/esm2022/public_api.mjs +22 -0
- package/esm2022/valtimo-form-view-model.mjs +5 -0
- package/fesm2022/valtimo-form-view-model.mjs +465 -0
- package/fesm2022/valtimo-form-view-model.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/components/form-view-model/form-view-model.component.d.ts +57 -0
- package/lib/components/form-view-model/form-view-model.component.d.ts.map +1 -0
- package/lib/components/form-view-model/index.d.ts +2 -0
- package/lib/components/form-view-model/index.d.ts.map +1 -0
- package/lib/form-view-model.module.d.ts +7 -0
- package/lib/form-view-model.module.d.ts.map +1 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/view-model.service.d.ts +18 -0
- package/lib/services/view-model.service.d.ts.map +1 -0
- package/package.json +28 -0
- package/public_api.d.ts +4 -0
- package/public_api.d.ts.map +1 -0
- package/valtimo-form-view-model.d.ts.map +1 -0
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, EventEmitter, Component, ViewChild, Input, Output, NgModule } from '@angular/core';
|
|
3
|
+
import moment from 'moment';
|
|
4
|
+
import { BehaviorSubject, combineLatest, take, switchMap, of, catchError, EMPTY, tap, pairwise, debounceTime, filter } from 'rxjs';
|
|
5
|
+
import * as i5 from '@formio/angular';
|
|
6
|
+
import { FormioModule } from '@formio/angular';
|
|
7
|
+
import { map, distinctUntilChanged } from 'rxjs/operators';
|
|
8
|
+
import { deepmerge } from 'deepmerge-ts';
|
|
9
|
+
import * as i4 from '@angular/common';
|
|
10
|
+
import { CommonModule } from '@angular/common';
|
|
11
|
+
import * as i1 from '@angular/common/http';
|
|
12
|
+
import { HttpHeaders } from '@angular/common/http';
|
|
13
|
+
import * as i2 from '@valtimo/config';
|
|
14
|
+
import { BaseApiService, FORM_VIEW_MODEL_TOKEN } from '@valtimo/config';
|
|
15
|
+
import { InterceptorSkip } from '@valtimo/security';
|
|
16
|
+
import * as i2$1 from '@ngx-translate/core';
|
|
17
|
+
import * as i3 from '@valtimo/components';
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
21
|
+
*
|
|
22
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
23
|
+
* you may not use this file except in compliance with the License.
|
|
24
|
+
* You may obtain a copy of the License at
|
|
25
|
+
*
|
|
26
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
27
|
+
*
|
|
28
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
29
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
30
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
31
|
+
* See the License for the specific language governing permissions and
|
|
32
|
+
* limitations under the License.
|
|
33
|
+
*/
|
|
34
|
+
class ViewModelService extends BaseApiService {
|
|
35
|
+
constructor(httpClient, configService) {
|
|
36
|
+
super(httpClient, configService);
|
|
37
|
+
this.httpClient = httpClient;
|
|
38
|
+
this.configService = configService;
|
|
39
|
+
}
|
|
40
|
+
getViewModel(formName, taskInstanceId) {
|
|
41
|
+
return this.httpClient.get(this.getApiUrl('/v1/form/view-model/user-task'), {
|
|
42
|
+
params: {
|
|
43
|
+
formName,
|
|
44
|
+
taskInstanceId,
|
|
45
|
+
},
|
|
46
|
+
headers: new HttpHeaders().set(InterceptorSkip, '400'),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
updateViewModel(formName, taskInstanceId, viewModel) {
|
|
50
|
+
return this.httpClient.post(this.getApiUrl(`/v1/form/view-model/user-task`), viewModel, {
|
|
51
|
+
params: {
|
|
52
|
+
formName,
|
|
53
|
+
taskInstanceId,
|
|
54
|
+
},
|
|
55
|
+
headers: new HttpHeaders().set(InterceptorSkip, '400'),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
submitViewModel(formName, taskInstanceId, viewModel) {
|
|
59
|
+
return this.httpClient.post(this.getApiUrl(`/v1/form/view-model/submit/user-task`), viewModel, {
|
|
60
|
+
params: {
|
|
61
|
+
formName,
|
|
62
|
+
taskInstanceId,
|
|
63
|
+
},
|
|
64
|
+
headers: new HttpHeaders().set(InterceptorSkip, '400'),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
getViewModelForStartForm(formName, processDefinitionKey) {
|
|
68
|
+
return this.httpClient.get(this.getApiUrl('/v1/form/view-model/start-form'), {
|
|
69
|
+
params: {
|
|
70
|
+
formName,
|
|
71
|
+
processDefinitionKey,
|
|
72
|
+
},
|
|
73
|
+
headers: new HttpHeaders().set(InterceptorSkip, '400'),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
updateViewModelForStartForm(formName, processDefinitionKey, viewModel) {
|
|
77
|
+
return this.httpClient.post(this.getApiUrl(`/v1/form/view-model/start-form`), viewModel, {
|
|
78
|
+
params: {
|
|
79
|
+
formName,
|
|
80
|
+
processDefinitionKey,
|
|
81
|
+
},
|
|
82
|
+
headers: new HttpHeaders().set(InterceptorSkip, '400'),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
submitViewModelForStartForm(formName, processDefinitionKey, documentDefinitionName, viewModel) {
|
|
86
|
+
return this.httpClient.post(this.getApiUrl(`/v1/form/view-model/submit/start-form`), viewModel, {
|
|
87
|
+
params: {
|
|
88
|
+
formName,
|
|
89
|
+
processDefinitionKey,
|
|
90
|
+
documentDefinitionName,
|
|
91
|
+
},
|
|
92
|
+
headers: new HttpHeaders().set(InterceptorSkip, '400'),
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ViewModelService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
96
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ViewModelService, providedIn: 'root' }); }
|
|
97
|
+
}
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ViewModelService, decorators: [{
|
|
99
|
+
type: Injectable,
|
|
100
|
+
args: [{ providedIn: 'root' }]
|
|
101
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
|
|
102
|
+
|
|
103
|
+
/*
|
|
104
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
105
|
+
*
|
|
106
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
107
|
+
* you may not use this file except in compliance with the License.
|
|
108
|
+
* You may obtain a copy of the License at
|
|
109
|
+
*
|
|
110
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
111
|
+
*
|
|
112
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
113
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
114
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
115
|
+
* See the License for the specific language governing permissions and
|
|
116
|
+
* limitations under the License.
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
/*
|
|
120
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
121
|
+
*
|
|
122
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
123
|
+
* you may not use this file except in compliance with the License.
|
|
124
|
+
* You may obtain a copy of the License at
|
|
125
|
+
*
|
|
126
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
127
|
+
*
|
|
128
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
129
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
130
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
131
|
+
* See the License for the specific language governing permissions and
|
|
132
|
+
* limitations under the License.
|
|
133
|
+
*/
|
|
134
|
+
moment.defaultFormat = 'DD MMM YYYY HH:mm';
|
|
135
|
+
class FormViewModelComponent {
|
|
136
|
+
set options(optionsValue) {
|
|
137
|
+
this.options$.next(optionsValue);
|
|
138
|
+
}
|
|
139
|
+
set submission(submissionValue) {
|
|
140
|
+
this.submission$.next(submissionValue);
|
|
141
|
+
}
|
|
142
|
+
set form(formValue) {
|
|
143
|
+
const instance = this;
|
|
144
|
+
const form = {
|
|
145
|
+
loadInitialViewModel: () => instance.loadInitialViewModel(),
|
|
146
|
+
updateViewModel: () => instance.updateViewModel(),
|
|
147
|
+
...formValue,
|
|
148
|
+
};
|
|
149
|
+
this.form$.next(form);
|
|
150
|
+
}
|
|
151
|
+
set formName(formName) {
|
|
152
|
+
this.formName$.next(formName);
|
|
153
|
+
}
|
|
154
|
+
set taskInstanceId(taskInstanceId) {
|
|
155
|
+
this.taskInstanceId$.next(taskInstanceId);
|
|
156
|
+
}
|
|
157
|
+
set readOnly(readOnlyValue) {
|
|
158
|
+
this.readOnly$.next(readOnlyValue);
|
|
159
|
+
}
|
|
160
|
+
set isStartForm(isStartFormValue) {
|
|
161
|
+
this.isStartForm$.next(isStartFormValue);
|
|
162
|
+
}
|
|
163
|
+
set processDefinitionKey(processDefinitionKeyValue) {
|
|
164
|
+
this.processDefinitionKey$.next(processDefinitionKeyValue);
|
|
165
|
+
}
|
|
166
|
+
set documentDefinitionName(documentDefinitionNameValue) {
|
|
167
|
+
this.documentDefinitionName$.next(documentDefinitionNameValue);
|
|
168
|
+
}
|
|
169
|
+
constructor(viewModelService, translateService, stateService) {
|
|
170
|
+
this.viewModelService = viewModelService;
|
|
171
|
+
this.translateService = translateService;
|
|
172
|
+
this.stateService = stateService;
|
|
173
|
+
this.formSubmit = new EventEmitter();
|
|
174
|
+
this.refreshForm = new EventEmitter();
|
|
175
|
+
this.submission$ = new BehaviorSubject({});
|
|
176
|
+
this.form$ = new BehaviorSubject(undefined);
|
|
177
|
+
this.formName$ = new BehaviorSubject(undefined);
|
|
178
|
+
this.options$ = new BehaviorSubject(undefined);
|
|
179
|
+
this.taskInstanceId$ = new BehaviorSubject(undefined);
|
|
180
|
+
this.readOnly$ = new BehaviorSubject(false);
|
|
181
|
+
this.tokenSetInLocalStorage$ = new BehaviorSubject(false);
|
|
182
|
+
this.change$ = new BehaviorSubject(null);
|
|
183
|
+
this.errors$ = new BehaviorSubject([]);
|
|
184
|
+
this.loading$ = new BehaviorSubject(true);
|
|
185
|
+
this.isStartForm$ = new BehaviorSubject(false);
|
|
186
|
+
this.processDefinitionKey$ = new BehaviorSubject(undefined);
|
|
187
|
+
this.documentDefinitionName$ = new BehaviorSubject(undefined);
|
|
188
|
+
this.currentLanguage$ = this.translateService.stream('key').pipe(map(() => this.translateService.currentLang), distinctUntilChanged());
|
|
189
|
+
this._overrideOptions$ = new BehaviorSubject({
|
|
190
|
+
hooks: {
|
|
191
|
+
beforeSubmit: this.beforeSubmitHook(this),
|
|
192
|
+
},
|
|
193
|
+
});
|
|
194
|
+
this.formioOptions$ = combineLatest([
|
|
195
|
+
this.currentLanguage$,
|
|
196
|
+
this.options$,
|
|
197
|
+
this._overrideOptions$,
|
|
198
|
+
]).pipe(map(([language, options, overrideOptions]) => {
|
|
199
|
+
const formioTranslations = this.translateService.instant('formioTranslations');
|
|
200
|
+
const defaultOptions = {
|
|
201
|
+
...options,
|
|
202
|
+
language,
|
|
203
|
+
...(formioTranslations === 'object' && {
|
|
204
|
+
i18n: {
|
|
205
|
+
[language]: this.stateService.flattenTranslationsObject(formioTranslations),
|
|
206
|
+
},
|
|
207
|
+
}),
|
|
208
|
+
};
|
|
209
|
+
return deepmerge(defaultOptions, overrideOptions);
|
|
210
|
+
}));
|
|
211
|
+
}
|
|
212
|
+
ngOnInit() {
|
|
213
|
+
if (this.isStartForm$.value) {
|
|
214
|
+
this.loadInitialViewModelForStartForm();
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
this.loadInitialViewModel();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
beforeSubmitHook(instance) {
|
|
221
|
+
return (submission, callback) => instance.beforeSubmit(submission, callback);
|
|
222
|
+
}
|
|
223
|
+
beforeSubmit(submission, callback) {
|
|
224
|
+
combineLatest([
|
|
225
|
+
this.formName$,
|
|
226
|
+
this.taskInstanceId$,
|
|
227
|
+
this.processDefinitionKey$,
|
|
228
|
+
this.documentDefinitionName$,
|
|
229
|
+
this.isStartForm$,
|
|
230
|
+
])
|
|
231
|
+
.pipe(take(1), switchMap(([formName, taskInstanceId, processDefinitionKey, documentDefinitionName, isStartForm,]) => isStartForm
|
|
232
|
+
? this.viewModelService
|
|
233
|
+
.submitViewModelForStartForm(formName, processDefinitionKey, documentDefinitionName, submission.data)
|
|
234
|
+
.pipe(take(1), switchMap(response => {
|
|
235
|
+
callback(null, submission);
|
|
236
|
+
return of(response);
|
|
237
|
+
}), catchError(error => {
|
|
238
|
+
this.handleFormError(error);
|
|
239
|
+
callback({ message: error.error.error, component: null }, null);
|
|
240
|
+
return EMPTY; // return an empty observable to complete the stream
|
|
241
|
+
}))
|
|
242
|
+
: this.viewModelService
|
|
243
|
+
.submitViewModel(formName, taskInstanceId, submission.data)
|
|
244
|
+
.pipe(take(1), switchMap(response => {
|
|
245
|
+
callback(null, submission);
|
|
246
|
+
return of(response);
|
|
247
|
+
}), catchError(error => {
|
|
248
|
+
this.handleFormError(error);
|
|
249
|
+
callback({ message: error.error.error, component: null }, null);
|
|
250
|
+
return EMPTY; // return an empty observable to complete the stream
|
|
251
|
+
}))))
|
|
252
|
+
.subscribe();
|
|
253
|
+
}
|
|
254
|
+
handleFormError(error) {
|
|
255
|
+
const formInstance = this.formio.formio;
|
|
256
|
+
const component = formInstance.getComponent(error.error?.component);
|
|
257
|
+
const submitComponent = formInstance.getComponent('submit');
|
|
258
|
+
if (component == null) {
|
|
259
|
+
this.errors$.next([error.error.error]);
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
component?.setCustomValidity(error.error.error);
|
|
263
|
+
submitComponent.disabled = true;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
onSubmit(submission) {
|
|
267
|
+
this.formSubmit.next(submission);
|
|
268
|
+
}
|
|
269
|
+
onChange(object) {
|
|
270
|
+
if (object.data) {
|
|
271
|
+
this.change$.next(object);
|
|
272
|
+
}
|
|
273
|
+
if (object.changed) {
|
|
274
|
+
this.handleChanges();
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
loadInitialViewModel() {
|
|
278
|
+
combineLatest([this.formName$, this.taskInstanceId$])
|
|
279
|
+
.pipe(take(1), switchMap(([formName, taskInstanceId]) => this.viewModelService.getViewModel(formName, taskInstanceId).pipe(tap(viewModel => {
|
|
280
|
+
this.submission$.next({ data: viewModel });
|
|
281
|
+
this.change$.pipe(take(1)).subscribe(() => {
|
|
282
|
+
this.loading$.next(false);
|
|
283
|
+
});
|
|
284
|
+
}))))
|
|
285
|
+
.subscribe();
|
|
286
|
+
}
|
|
287
|
+
updateViewModel() {
|
|
288
|
+
this.loading$
|
|
289
|
+
.pipe(take(1), switchMap(updating => {
|
|
290
|
+
if (!updating) {
|
|
291
|
+
this.loading$.next(true);
|
|
292
|
+
return combineLatest([this.formName$, this.taskInstanceId$, this.change$]).pipe(take(1), switchMap(([formName, taskInstanceId, change]) => this.viewModelService.updateViewModel(formName, taskInstanceId, change.data).pipe(tap({
|
|
293
|
+
next: viewModel => {
|
|
294
|
+
this.submission$.next({ data: viewModel });
|
|
295
|
+
this.loading$.next(false);
|
|
296
|
+
this.errors$.next([]);
|
|
297
|
+
},
|
|
298
|
+
error: error => {
|
|
299
|
+
this.loading$.next(false);
|
|
300
|
+
this.handleFormError(error);
|
|
301
|
+
},
|
|
302
|
+
}))));
|
|
303
|
+
}
|
|
304
|
+
return of(null); // Fallback to return an observable if updating is true
|
|
305
|
+
}))
|
|
306
|
+
.subscribe();
|
|
307
|
+
}
|
|
308
|
+
loadInitialViewModelForStartForm() {
|
|
309
|
+
combineLatest([this.formName$, this.processDefinitionKey$])
|
|
310
|
+
.pipe(take(1), switchMap(([formName, processDefinitionKey]) => this.viewModelService.getViewModelForStartForm(formName, processDefinitionKey).pipe(tap(viewModel => {
|
|
311
|
+
this.submission$.next({ data: viewModel });
|
|
312
|
+
this.change$.pipe(take(1)).subscribe(() => {
|
|
313
|
+
this.loading$.next(false);
|
|
314
|
+
});
|
|
315
|
+
}))))
|
|
316
|
+
.subscribe();
|
|
317
|
+
}
|
|
318
|
+
updateViewModelForStartForm() {
|
|
319
|
+
this.loading$
|
|
320
|
+
.pipe(take(1), switchMap(updating => {
|
|
321
|
+
if (!updating) {
|
|
322
|
+
this.loading$.next(true);
|
|
323
|
+
return combineLatest([this.formName$, this.processDefinitionKey$, this.change$]).pipe(take(1), switchMap(([formName, processDefinitionKey, change]) => this.viewModelService
|
|
324
|
+
.updateViewModelForStartForm(formName, processDefinitionKey, change.data)
|
|
325
|
+
.pipe(tap({
|
|
326
|
+
next: viewModel => {
|
|
327
|
+
this.submission$.next({ data: viewModel });
|
|
328
|
+
this.loading$.next(false);
|
|
329
|
+
this.errors$.next([]);
|
|
330
|
+
},
|
|
331
|
+
error: error => {
|
|
332
|
+
this.loading$.next(false);
|
|
333
|
+
this.handleFormError(error);
|
|
334
|
+
},
|
|
335
|
+
}))));
|
|
336
|
+
}
|
|
337
|
+
return of(null); // Fallback to return an observable if updating is true
|
|
338
|
+
}))
|
|
339
|
+
.subscribe();
|
|
340
|
+
}
|
|
341
|
+
handleChanges() {
|
|
342
|
+
this.change$
|
|
343
|
+
.pipe(pairwise(), debounceTime(500), filter(([prevChange, currentChange]) => prevChange?.changed?.value !== undefined &&
|
|
344
|
+
currentChange?.changed?.value !== undefined &&
|
|
345
|
+
prevChange.changed.value !== currentChange.changed.value))
|
|
346
|
+
.subscribe(() => {
|
|
347
|
+
if (this.isStartForm$.value) {
|
|
348
|
+
this.updateViewModelForStartForm();
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
this.updateViewModel();
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormViewModelComponent, deps: [{ token: ViewModelService }, { token: i2$1.TranslateService }, { token: i3.FormIoStateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
356
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: FormViewModelComponent, isStandalone: true, selector: "valtimo-form-view-model", inputs: { options: "options", submission: "submission", form: "form", formName: "formName", taskInstanceId: "taskInstanceId", readOnly: "readOnly", isStartForm: "isStartForm", processDefinitionKey: "processDefinitionKey", documentDefinitionName: "documentDefinitionName", formRefresh$: "formRefresh$" }, 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\"\n *ngIf=\"{\n submission: submission$ | async,\n readOnly: readOnly$ | async,\n form: form$ | async,\n tokenSetInLocalStorage: tokenSetInLocalStorage$ | async,\n formioOptions: formioOptions$ | async,\n loading: loading$ | async,\n errors: errors$ | async\n } as obs\"\n>\n <div *ngIf=\"obs.loading\" class=\"loading-icon\">\n <i class=\"fa fa-spinner fa-spin\"></i>\n </div>\n <div *ngIf=\"obs.errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n @for (error of obs.errors; track error) {\n <li class=\"pl-2\">\n {{ error }}\n </li>\n }\n </ol>\n </div>\n <formio\n #formio\n [submission]=\"obs.submission\"\n [form]=\"obs.form\"\n [refresh]=\"refreshForm\"\n [readOnly]=\"obs.readOnly\"\n [options]=\"obs.formioOptions\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n ></formio>\n</div>\n", styles: [".form-container{position:relative}.loading-icon{position:absolute;top:10px;right:10px;font-size:1.5em;color:#000}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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" }] }); }
|
|
357
|
+
}
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormViewModelComponent, decorators: [{
|
|
359
|
+
type: Component,
|
|
360
|
+
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\"\n *ngIf=\"{\n submission: submission$ | async,\n readOnly: readOnly$ | async,\n form: form$ | async,\n tokenSetInLocalStorage: tokenSetInLocalStorage$ | async,\n formioOptions: formioOptions$ | async,\n loading: loading$ | async,\n errors: errors$ | async\n } as obs\"\n>\n <div *ngIf=\"obs.loading\" class=\"loading-icon\">\n <i class=\"fa fa-spinner fa-spin\"></i>\n </div>\n <div *ngIf=\"obs.errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n @for (error of obs.errors; track error) {\n <li class=\"pl-2\">\n {{ error }}\n </li>\n }\n </ol>\n </div>\n <formio\n #formio\n [submission]=\"obs.submission\"\n [form]=\"obs.form\"\n [refresh]=\"refreshForm\"\n [readOnly]=\"obs.readOnly\"\n [options]=\"obs.formioOptions\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n ></formio>\n</div>\n", styles: [".form-container{position:relative}.loading-icon{position:absolute;top:10px;right:10px;font-size:1.5em;color:#000}\n"] }]
|
|
361
|
+
}], ctorParameters: () => [{ type: ViewModelService }, { type: i2$1.TranslateService }, { type: i3.FormIoStateService }], propDecorators: { formio: [{
|
|
362
|
+
type: ViewChild,
|
|
363
|
+
args: ['formio']
|
|
364
|
+
}], options: [{
|
|
365
|
+
type: Input
|
|
366
|
+
}], submission: [{
|
|
367
|
+
type: Input
|
|
368
|
+
}], form: [{
|
|
369
|
+
type: Input
|
|
370
|
+
}], formName: [{
|
|
371
|
+
type: Input
|
|
372
|
+
}], taskInstanceId: [{
|
|
373
|
+
type: Input
|
|
374
|
+
}], readOnly: [{
|
|
375
|
+
type: Input
|
|
376
|
+
}], isStartForm: [{
|
|
377
|
+
type: Input
|
|
378
|
+
}], processDefinitionKey: [{
|
|
379
|
+
type: Input
|
|
380
|
+
}], documentDefinitionName: [{
|
|
381
|
+
type: Input
|
|
382
|
+
}], formRefresh$: [{
|
|
383
|
+
type: Input
|
|
384
|
+
}], formSubmit: [{
|
|
385
|
+
type: Output
|
|
386
|
+
}] } });
|
|
387
|
+
|
|
388
|
+
/*
|
|
389
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
390
|
+
*
|
|
391
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
392
|
+
* you may not use this file except in compliance with the License.
|
|
393
|
+
* You may obtain a copy of the License at
|
|
394
|
+
*
|
|
395
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
396
|
+
*
|
|
397
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
398
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
399
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
400
|
+
* See the License for the specific language governing permissions and
|
|
401
|
+
* limitations under the License.
|
|
402
|
+
*/
|
|
403
|
+
|
|
404
|
+
/*
|
|
405
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
406
|
+
*
|
|
407
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
408
|
+
* you may not use this file except in compliance with the License.
|
|
409
|
+
* You may obtain a copy of the License at
|
|
410
|
+
*
|
|
411
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
412
|
+
*
|
|
413
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
414
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
415
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
416
|
+
* See the License for the specific language governing permissions and
|
|
417
|
+
* limitations under the License.
|
|
418
|
+
*/
|
|
419
|
+
class FormViewModelModule {
|
|
420
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormViewModelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
421
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: FormViewModelModule }); }
|
|
422
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormViewModelModule, providers: [
|
|
423
|
+
{
|
|
424
|
+
provide: FORM_VIEW_MODEL_TOKEN,
|
|
425
|
+
useValue: { component: FormViewModelComponent },
|
|
426
|
+
},
|
|
427
|
+
] }); }
|
|
428
|
+
}
|
|
429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormViewModelModule, decorators: [{
|
|
430
|
+
type: NgModule,
|
|
431
|
+
args: [{
|
|
432
|
+
providers: [
|
|
433
|
+
{
|
|
434
|
+
provide: FORM_VIEW_MODEL_TOKEN,
|
|
435
|
+
useValue: { component: FormViewModelComponent },
|
|
436
|
+
},
|
|
437
|
+
],
|
|
438
|
+
}]
|
|
439
|
+
}] });
|
|
440
|
+
|
|
441
|
+
/*
|
|
442
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
443
|
+
*
|
|
444
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
445
|
+
* you may not use this file except in compliance with the License.
|
|
446
|
+
* You may obtain a copy of the License at
|
|
447
|
+
*
|
|
448
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
449
|
+
*
|
|
450
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
451
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
452
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
453
|
+
* See the License for the specific language governing permissions and
|
|
454
|
+
* limitations under the License.
|
|
455
|
+
*/
|
|
456
|
+
/*
|
|
457
|
+
* Public API Surface of form view model
|
|
458
|
+
*/
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Generated bundle index. Do not edit.
|
|
462
|
+
*/
|
|
463
|
+
|
|
464
|
+
export { FormViewModelComponent, FormViewModelModule, ViewModelService };
|
|
465
|
+
//# sourceMappingURL=valtimo-form-view-model.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valtimo-form-view-model.mjs","sources":["../../../../projects/valtimo/form-view-model/src/lib/services/view-model.service.ts","../../../../projects/valtimo/form-view-model/src/lib/services/index.ts","../../../../projects/valtimo/form-view-model/src/lib/components/form-view-model/form-view-model.component.ts","../../../../projects/valtimo/form-view-model/src/lib/components/form-view-model/form-view-model.component.html","../../../../projects/valtimo/form-view-model/src/lib/components/form-view-model/index.ts","../../../../projects/valtimo/form-view-model/src/lib/form-view-model.module.ts","../../../../projects/valtimo/form-view-model/src/public_api.ts","../../../../projects/valtimo/form-view-model/src/valtimo-form-view-model.ts"],"sourcesContent":["/*\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\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders, HttpParams, HttpResponse} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {BaseApiService, ConfigService} from '@valtimo/config';\nimport {InterceptorSkip} from '@valtimo/security';\n\n@Injectable({providedIn: 'root'})\nexport class ViewModelService extends BaseApiService {\n constructor(\n protected readonly httpClient: HttpClient,\n protected readonly configService: ConfigService\n ) {\n super(httpClient, configService);\n }\n\n public getViewModel(formName: string, taskInstanceId: string): Observable<object> {\n return this.httpClient.get<any>(this.getApiUrl('/v1/form/view-model/user-task'), {\n params: {\n formName,\n taskInstanceId,\n },\n headers: new HttpHeaders().set(InterceptorSkip, '400'),\n });\n }\n\n public updateViewModel(\n formName: string,\n taskInstanceId: string,\n viewModel: object\n ): Observable<object> {\n return this.httpClient.post(this.getApiUrl(`/v1/form/view-model/user-task`), viewModel, {\n params: {\n formName,\n taskInstanceId,\n },\n headers: new HttpHeaders().set(InterceptorSkip, '400'),\n });\n }\n\n public submitViewModel(\n formName: string,\n taskInstanceId: string,\n viewModel: object\n ): Observable<object> {\n return this.httpClient.post(this.getApiUrl(`/v1/form/view-model/submit/user-task`), viewModel, {\n params: {\n formName,\n taskInstanceId,\n },\n headers: new HttpHeaders().set(InterceptorSkip, '400'),\n });\n }\n\n public getViewModelForStartForm(\n formName: string,\n processDefinitionKey: string\n ): Observable<object> {\n return this.httpClient.get<any>(this.getApiUrl('/v1/form/view-model/start-form'), {\n params: {\n formName,\n processDefinitionKey,\n },\n headers: new HttpHeaders().set(InterceptorSkip, '400'),\n });\n }\n\n public updateViewModelForStartForm(\n formName: string,\n processDefinitionKey: string,\n viewModel: object\n ): Observable<object> {\n return this.httpClient.post(this.getApiUrl(`/v1/form/view-model/start-form`), viewModel, {\n params: {\n formName,\n processDefinitionKey,\n },\n headers: new HttpHeaders().set(InterceptorSkip, '400'),\n });\n }\n\n public submitViewModelForStartForm(\n formName: string,\n processDefinitionKey: string,\n documentDefinitionName: string,\n viewModel: object\n ): Observable<object> {\n return this.httpClient.post(\n this.getApiUrl(`/v1/form/view-model/submit/start-form`),\n viewModel,\n {\n params: {\n formName,\n processDefinitionKey,\n documentDefinitionName,\n },\n headers: new HttpHeaders().set(InterceptorSkip, '400'),\n }\n );\n }\n}\n","/*\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\nexport * from './view-model.service';\n","/*\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 */\nimport {Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport moment from 'moment';\nimport {\n BehaviorSubject,\n catchError,\n combineLatest,\n debounceTime,\n EMPTY,\n filter,\n Observable,\n of,\n pairwise,\n Subject,\n switchMap,\n take,\n tap,\n} from 'rxjs';\nimport {\n FormioComponent,\n FormioModule,\n FormioOptions,\n FormioSubmission,\n FormioSubmissionCallback,\n} from '@formio/angular';\nimport {FormioRefreshValue} from '@formio/angular/formio.common';\nimport {ViewModelService} from '../../services';\nimport {distinctUntilChanged, map} from 'rxjs/operators';\nimport {deepmerge} from 'deepmerge-ts';\nimport {FormIoStateService, ValtimoFormioOptions} from '@valtimo/components';\nimport {TranslateService} from '@ngx-translate/core';\nimport {HttpErrorResponse} from '@angular/common/http';\nimport {CommonModule} from '@angular/common';\n\nmoment.defaultFormat = 'DD MMM YYYY HH:mm';\n\n@Component({\n selector: 'valtimo-form-view-model',\n templateUrl: './form-view-model.component.html',\n styleUrls: ['./form-view-model.component.css'],\n standalone: true,\n imports: [CommonModule, FormioModule],\n})\nexport class FormViewModelComponent implements OnInit {\n @ViewChild('formio') formio: FormioComponent;\n\n @Input() set options(optionsValue: any) {\n this.options$.next(optionsValue);\n }\n\n @Input() set submission(submissionValue: FormioSubmission) {\n this.submission$.next(submissionValue);\n }\n\n @Input() set form(formValue: object) {\n const instance = this;\n const form = {\n loadInitialViewModel: () => instance.loadInitialViewModel(),\n updateViewModel: () => instance.updateViewModel(),\n ...formValue,\n };\n this.form$.next(form);\n }\n\n @Input() set formName(formName: string) {\n this.formName$.next(formName);\n }\n\n @Input() set taskInstanceId(taskInstanceId: string) {\n this.taskInstanceId$.next(taskInstanceId);\n }\n\n @Input() set readOnly(readOnlyValue: boolean) {\n this.readOnly$.next(readOnlyValue);\n }\n\n @Input() set isStartForm(isStartFormValue: boolean) {\n this.isStartForm$.next(isStartFormValue);\n }\n\n @Input() set processDefinitionKey(processDefinitionKeyValue: string) {\n this.processDefinitionKey$.next(processDefinitionKeyValue);\n }\n\n @Input() set documentDefinitionName(documentDefinitionNameValue: string) {\n this.documentDefinitionName$.next(documentDefinitionNameValue);\n }\n\n @Input() formRefresh$!: Subject<FormioRefreshValue>;\n @Output() formSubmit = new EventEmitter<any>();\n\n public refreshForm = new EventEmitter<FormioRefreshValue>();\n\n public readonly submission$ = new BehaviorSubject<any>({});\n public readonly form$ = new BehaviorSubject<object>(undefined);\n public readonly formName$ = new BehaviorSubject<string>(undefined);\n public readonly options$ = new BehaviorSubject<ValtimoFormioOptions>(undefined);\n public readonly taskInstanceId$ = new BehaviorSubject<string>(undefined);\n public readonly readOnly$ = new BehaviorSubject<boolean>(false);\n public readonly tokenSetInLocalStorage$ = new BehaviorSubject<boolean>(false);\n public readonly change$ = new BehaviorSubject<any>(null);\n public readonly errors$ = new BehaviorSubject<Array<string>>([]);\n public readonly loading$ = new BehaviorSubject<boolean>(true);\n public readonly isStartForm$ = new BehaviorSubject<boolean>(false);\n public readonly processDefinitionKey$ = new BehaviorSubject<string>(undefined);\n public readonly documentDefinitionName$ = new BehaviorSubject<string>(undefined);\n\n public readonly currentLanguage$ = this.translateService.stream('key').pipe(\n map(() => this.translateService.currentLang),\n distinctUntilChanged()\n );\n\n private readonly _overrideOptions$ = new BehaviorSubject<FormioOptions>({\n hooks: {\n beforeSubmit: this.beforeSubmitHook(this),\n },\n });\n\n public readonly formioOptions$: Observable<ValtimoFormioOptions | FormioOptions> = combineLatest([\n this.currentLanguage$,\n this.options$,\n this._overrideOptions$,\n ]).pipe(\n map(([language, options, overrideOptions]) => {\n const formioTranslations = this.translateService.instant('formioTranslations');\n\n const defaultOptions = {\n ...options,\n language,\n ...(formioTranslations === 'object' && {\n i18n: {\n [language]: this.stateService.flattenTranslationsObject(formioTranslations),\n },\n }),\n };\n\n return deepmerge(defaultOptions, overrideOptions);\n })\n );\n\n constructor(\n private readonly viewModelService: ViewModelService,\n private readonly translateService: TranslateService,\n private readonly stateService: FormIoStateService\n ) {}\n\n public ngOnInit(): void {\n if (this.isStartForm$.value) {\n this.loadInitialViewModelForStartForm();\n } else {\n this.loadInitialViewModel();\n }\n }\n\n public beforeSubmitHook(instance: FormViewModelComponent): (submission, callback) => void {\n return (submission, callback) => instance.beforeSubmit(submission, callback);\n }\n\n public beforeSubmit(submission: any, callback: FormioSubmissionCallback): void {\n combineLatest([\n this.formName$,\n this.taskInstanceId$,\n this.processDefinitionKey$,\n this.documentDefinitionName$,\n this.isStartForm$,\n ])\n .pipe(\n take(1),\n switchMap(\n ([\n formName,\n taskInstanceId,\n processDefinitionKey,\n documentDefinitionName,\n isStartForm,\n ]) =>\n isStartForm\n ? this.viewModelService\n .submitViewModelForStartForm(\n formName,\n processDefinitionKey,\n documentDefinitionName,\n submission.data\n )\n .pipe(\n take(1),\n switchMap(response => {\n callback(null, submission);\n return of(response);\n }),\n catchError(error => {\n this.handleFormError(error);\n callback({message: error.error.error, component: null}, null);\n return EMPTY; // return an empty observable to complete the stream\n })\n )\n : this.viewModelService\n .submitViewModel(formName, taskInstanceId, submission.data)\n .pipe(\n take(1),\n switchMap(response => {\n callback(null, submission);\n return of(response);\n }),\n catchError(error => {\n this.handleFormError(error);\n callback({message: error.error.error, component: null}, null);\n return EMPTY; // return an empty observable to complete the stream\n })\n )\n )\n )\n .subscribe();\n }\n\n private handleFormError(error: HttpErrorResponse): void {\n const formInstance = this.formio.formio;\n const component = formInstance.getComponent(error.error?.component);\n const submitComponent = formInstance.getComponent('submit');\n if (component == null) {\n this.errors$.next([error.error.error]);\n } else {\n component?.setCustomValidity(error.error.error);\n submitComponent.disabled = true;\n }\n }\n\n public onSubmit(submission: FormioSubmission): void {\n this.formSubmit.next(submission);\n }\n\n public onChange(object: any): void {\n if (object.data) {\n this.change$.next(object);\n }\n\n if (object.changed) {\n this.handleChanges();\n }\n }\n\n public loadInitialViewModel(): void {\n combineLatest([this.formName$, this.taskInstanceId$])\n .pipe(\n take(1),\n switchMap(([formName, taskInstanceId]) =>\n this.viewModelService.getViewModel(formName, taskInstanceId).pipe(\n tap(viewModel => {\n this.submission$.next({data: viewModel});\n this.change$.pipe(take(1)).subscribe(() => {\n this.loading$.next(false);\n });\n })\n )\n )\n )\n .subscribe();\n }\n\n public updateViewModel(): void {\n this.loading$\n .pipe(\n take(1),\n switchMap(updating => {\n if (!updating) {\n this.loading$.next(true);\n return combineLatest([this.formName$, this.taskInstanceId$, this.change$]).pipe(\n take(1),\n switchMap(([formName, taskInstanceId, change]) =>\n this.viewModelService.updateViewModel(formName, taskInstanceId, change.data).pipe(\n tap({\n next: viewModel => {\n this.submission$.next({data: viewModel});\n this.loading$.next(false);\n this.errors$.next([]);\n },\n error: error => {\n this.loading$.next(false);\n this.handleFormError(error);\n },\n })\n )\n )\n );\n }\n return of(null); // Fallback to return an observable if updating is true\n })\n )\n .subscribe();\n }\n\n public loadInitialViewModelForStartForm(): void {\n combineLatest([this.formName$, this.processDefinitionKey$])\n .pipe(\n take(1),\n switchMap(([formName, processDefinitionKey]) =>\n this.viewModelService.getViewModelForStartForm(formName, processDefinitionKey).pipe(\n tap(viewModel => {\n this.submission$.next({data: viewModel});\n this.change$.pipe(take(1)).subscribe(() => {\n this.loading$.next(false);\n });\n })\n )\n )\n )\n .subscribe();\n }\n\n public updateViewModelForStartForm(): void {\n this.loading$\n .pipe(\n take(1),\n switchMap(updating => {\n if (!updating) {\n this.loading$.next(true);\n return combineLatest([this.formName$, this.processDefinitionKey$, this.change$]).pipe(\n take(1),\n switchMap(([formName, processDefinitionKey, change]) =>\n this.viewModelService\n .updateViewModelForStartForm(formName, processDefinitionKey, change.data)\n .pipe(\n tap({\n next: viewModel => {\n this.submission$.next({data: viewModel});\n this.loading$.next(false);\n this.errors$.next([]);\n },\n error: error => {\n this.loading$.next(false);\n this.handleFormError(error);\n },\n })\n )\n )\n );\n }\n return of(null); // Fallback to return an observable if updating is true\n })\n )\n .subscribe();\n }\n\n private handleChanges(): void {\n this.change$\n .pipe(\n pairwise(),\n debounceTime(500),\n filter(\n ([prevChange, currentChange]) =>\n prevChange?.changed?.value !== undefined &&\n currentChange?.changed?.value !== undefined &&\n prevChange.changed.value !== currentChange.changed.value\n )\n )\n .subscribe(() => {\n if (this.isStartForm$.value) {\n this.updateViewModelForStartForm();\n } else {\n this.updateViewModel();\n }\n });\n }\n}\n","<!--\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\"\n *ngIf=\"{\n submission: submission$ | async,\n readOnly: readOnly$ | async,\n form: form$ | async,\n tokenSetInLocalStorage: tokenSetInLocalStorage$ | async,\n formioOptions: formioOptions$ | async,\n loading: loading$ | async,\n errors: errors$ | async\n } as obs\"\n>\n <div *ngIf=\"obs.loading\" class=\"loading-icon\">\n <i class=\"fa fa-spinner fa-spin\"></i>\n </div>\n <div *ngIf=\"obs.errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n @for (error of obs.errors; track error) {\n <li class=\"pl-2\">\n {{ error }}\n </li>\n }\n </ol>\n </div>\n <formio\n #formio\n [submission]=\"obs.submission\"\n [form]=\"obs.form\"\n [refresh]=\"refreshForm\"\n [readOnly]=\"obs.readOnly\"\n [options]=\"obs.formioOptions\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n ></formio>\n</div>\n","/*\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\nexport * from './form-view-model.component';\n","/*\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 */\nimport {NgModule} from '@angular/core';\nimport {FORM_VIEW_MODEL_TOKEN} from '@valtimo/config';\nimport {FormViewModelComponent} from './components/form-view-model';\n\n@NgModule({\n providers: [\n {\n provide: FORM_VIEW_MODEL_TOKEN,\n useValue: {component: FormViewModelComponent},\n },\n ],\n})\nexport class FormViewModelModule {}\n","/*\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/*\n * Public API Surface of form view model\n */\n\nexport * from './lib/components/form-view-model/form-view-model.component';\nexport * from './lib/services';\nexport * from './lib/form-view-model.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.ViewModelService","i2"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;AASG,MAAO,gBAAiB,SAAQ,cAAc,CAAA;IAClD,WACqB,CAAA,UAAsB,EACtB,aAA4B,EAAA;AAE/C,QAAA,KAAK,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;QAHd,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QACtB,IAAa,CAAA,aAAA,GAAb,aAAa,CAAe;KAGhD;IAEM,YAAY,CAAC,QAAgB,EAAE,cAAsB,EAAA;AAC1D,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAM,IAAI,CAAC,SAAS,CAAC,+BAA+B,CAAC,EAAE;AAC/E,YAAA,MAAM,EAAE;gBACN,QAAQ;gBACR,cAAc;AACf,aAAA;YACD,OAAO,EAAE,IAAI,WAAW,EAAE,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,CAAC;AACvD,SAAA,CAAC,CAAC;KACJ;AAEM,IAAA,eAAe,CACpB,QAAgB,EAChB,cAAsB,EACtB,SAAiB,EAAA;AAEjB,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA,6BAAA,CAA+B,CAAC,EAAE,SAAS,EAAE;AACtF,YAAA,MAAM,EAAE;gBACN,QAAQ;gBACR,cAAc;AACf,aAAA;YACD,OAAO,EAAE,IAAI,WAAW,EAAE,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,CAAC;AACvD,SAAA,CAAC,CAAC;KACJ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A,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,EAPnB,SAAA,EAAA;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,qBAAqB;AAC9B,gBAAA,QAAQ,EAAE,EAAC,SAAS,EAAE,sBAAsB,EAAC;AAC9C,aAAA;AACF,SAAA,EAAA,CAAA,CAAA,EAAA;;2FAEU,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAR/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,qBAAqB;AAC9B,4BAAA,QAAQ,EAAE,EAAC,SAAS,EAAE,sBAAsB,EAAC;AAC9C,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;AC1BD;;;;;;;;;;;;;;AAcG;AAEH;;AAEG;;AClBH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
3
|
+
import { FormioComponent, FormioOptions, FormioSubmission, FormioSubmissionCallback } from '@formio/angular';
|
|
4
|
+
import { FormioRefreshValue } from '@formio/angular/formio.common';
|
|
5
|
+
import { ViewModelService } from '../../services';
|
|
6
|
+
import { FormIoStateService, ValtimoFormioOptions } from '@valtimo/components';
|
|
7
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class FormViewModelComponent implements OnInit {
|
|
10
|
+
private readonly viewModelService;
|
|
11
|
+
private readonly translateService;
|
|
12
|
+
private readonly stateService;
|
|
13
|
+
formio: FormioComponent;
|
|
14
|
+
set options(optionsValue: any);
|
|
15
|
+
set submission(submissionValue: FormioSubmission);
|
|
16
|
+
set form(formValue: object);
|
|
17
|
+
set formName(formName: string);
|
|
18
|
+
set taskInstanceId(taskInstanceId: string);
|
|
19
|
+
set readOnly(readOnlyValue: boolean);
|
|
20
|
+
set isStartForm(isStartFormValue: boolean);
|
|
21
|
+
set processDefinitionKey(processDefinitionKeyValue: string);
|
|
22
|
+
set documentDefinitionName(documentDefinitionNameValue: string);
|
|
23
|
+
formRefresh$: Subject<FormioRefreshValue>;
|
|
24
|
+
formSubmit: EventEmitter<any>;
|
|
25
|
+
refreshForm: EventEmitter<FormioRefreshValue>;
|
|
26
|
+
readonly submission$: BehaviorSubject<any>;
|
|
27
|
+
readonly form$: BehaviorSubject<object>;
|
|
28
|
+
readonly formName$: BehaviorSubject<string>;
|
|
29
|
+
readonly options$: BehaviorSubject<ValtimoFormioOptions>;
|
|
30
|
+
readonly taskInstanceId$: BehaviorSubject<string>;
|
|
31
|
+
readonly readOnly$: BehaviorSubject<boolean>;
|
|
32
|
+
readonly tokenSetInLocalStorage$: BehaviorSubject<boolean>;
|
|
33
|
+
readonly change$: BehaviorSubject<any>;
|
|
34
|
+
readonly errors$: BehaviorSubject<string[]>;
|
|
35
|
+
readonly loading$: BehaviorSubject<boolean>;
|
|
36
|
+
readonly isStartForm$: BehaviorSubject<boolean>;
|
|
37
|
+
readonly processDefinitionKey$: BehaviorSubject<string>;
|
|
38
|
+
readonly documentDefinitionName$: BehaviorSubject<string>;
|
|
39
|
+
readonly currentLanguage$: Observable<string>;
|
|
40
|
+
private readonly _overrideOptions$;
|
|
41
|
+
readonly formioOptions$: Observable<ValtimoFormioOptions | FormioOptions>;
|
|
42
|
+
constructor(viewModelService: ViewModelService, translateService: TranslateService, stateService: FormIoStateService);
|
|
43
|
+
ngOnInit(): void;
|
|
44
|
+
beforeSubmitHook(instance: FormViewModelComponent): (submission: any, callback: any) => void;
|
|
45
|
+
beforeSubmit(submission: any, callback: FormioSubmissionCallback): void;
|
|
46
|
+
private handleFormError;
|
|
47
|
+
onSubmit(submission: FormioSubmission): void;
|
|
48
|
+
onChange(object: any): void;
|
|
49
|
+
loadInitialViewModel(): void;
|
|
50
|
+
updateViewModel(): void;
|
|
51
|
+
loadInitialViewModelForStartForm(): void;
|
|
52
|
+
updateViewModelForStartForm(): void;
|
|
53
|
+
private handleChanges;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormViewModelComponent, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormViewModelComponent, "valtimo-form-view-model", never, { "options": { "alias": "options"; "required": false; }; "submission": { "alias": "submission"; "required": false; }; "form": { "alias": "form"; "required": false; }; "formName": { "alias": "formName"; "required": false; }; "taskInstanceId": { "alias": "taskInstanceId"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "isStartForm": { "alias": "isStartForm"; "required": false; }; "processDefinitionKey": { "alias": "processDefinitionKey"; "required": false; }; "documentDefinitionName": { "alias": "documentDefinitionName"; "required": false; }; "formRefresh$": { "alias": "formRefresh$"; "required": false; }; }, { "formSubmit": "formSubmit"; }, never, never, true, never>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=form-view-model.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-view-model.component.d.ts","sourceRoot":"","sources":["../../../../../../projects/valtimo/form-view-model/src/lib/components/form-view-model/form-view-model.component.ts"],"names":[],"mappings":"AAeA,OAAO,EAAY,YAAY,EAAS,MAAM,EAAoB,MAAM,eAAe,CAAC;AAExF,OAAO,EACL,eAAe,EAMf,UAAU,EAGV,OAAO,EAIR,MAAM,MAAM,CAAC;AACd,OAAO,EACL,eAAe,EAEf,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAC,kBAAkB,EAAE,oBAAoB,EAAC,MAAM,qBAAqB,CAAC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CAI/B;IAEH,SAAgB,cAAc,EAAE,UAAU,CAAC,oBAAoB,GAAG,aAAa,CAAC,CAoB9E;gBAGiB,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,kBAAkB;IAG5C,QAAQ,IAAI,IAAI;IAQhB,gBAAgB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,CAAC,UAAU,KAAA,EAAE,QAAQ,KAAA,KAAK,IAAI;IAIlF,YAAY,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,wBAAwB,GAAG,IAAI;IAyD9E,OAAO,CAAC,eAAe;IAYhB,QAAQ,CAAC,UAAU,EAAE,gBAAgB,GAAG,IAAI;IAI5C,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI;IAU3B,oBAAoB,IAAI,IAAI;IAkB5B,eAAe,IAAI,IAAI;IAgCvB,gCAAgC,IAAI,IAAI;IAkBxC,2BAA2B,IAAI,IAAI;IAkC1C,OAAO,CAAC,aAAa;yCA5SV,sBAAsB;2CAAtB,sBAAsB;CAgUlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../projects/valtimo/form-view-model/src/lib/components/form-view-model/index.ts"],"names":[],"mappings":"AAgBA,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class FormViewModelModule {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormViewModelModule, never>;
|
|
4
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormViewModelModule, never, never, never>;
|
|
5
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FormViewModelModule>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=form-view-model.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-view-model.module.d.ts","sourceRoot":"","sources":["../../../../projects/valtimo/form-view-model/src/lib/form-view-model.module.ts"],"names":[],"mappings":";AAmBA,qBAQa,mBAAmB;yCAAnB,mBAAmB;0CAAnB,mBAAmB;0CAAnB,mBAAmB;CAAG"}
|