@valtimo/task 12.6.0 → 12.7.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/task-detail-content/task-detail-content.component.mjs +77 -29
- package/fesm2022/valtimo-task.mjs +76 -28
- package/fesm2022/valtimo-task.mjs.map +1 -1
- package/lib/components/task-detail-content/task-detail-content.component.d.ts +18 -10
- package/lib/components/task-detail-content/task-detail-content.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ import * as i1$2 from '@angular/router';
|
|
|
18
18
|
import { RouterModule } from '@angular/router';
|
|
19
19
|
import { RecentlyViewed16 } from '@carbon/icons';
|
|
20
20
|
import * as i7 from '@valtimo/process-link';
|
|
21
|
-
import { ProcessLinkModule, formSizeToCarbonModalSizeMap } from '@valtimo/process-link';
|
|
21
|
+
import { FORM_CUSTOM_COMPONENT_TOKEN, ProcessLinkModule, formSizeToCarbonModalSizeMap } from '@valtimo/process-link';
|
|
22
22
|
import * as i2 from '@valtimo/document';
|
|
23
23
|
import * as i12 from 'carbon-components-angular';
|
|
24
24
|
import { ButtonModule, IconModule, ModalModule, LinkModule, TabsModule, ContentSwitcherModule, DropdownModule, TooltipModule as TooltipModule$1 } from 'carbon-components-angular';
|
|
@@ -948,7 +948,10 @@ class TaskDetailContentComponent {
|
|
|
948
948
|
if (this.formFlow)
|
|
949
949
|
this.formFlow.saveData();
|
|
950
950
|
}
|
|
951
|
-
|
|
951
|
+
get viewInitialized$() {
|
|
952
|
+
return this._viewInitialized$.pipe(filter(initialized => initialized));
|
|
953
|
+
}
|
|
954
|
+
constructor(configService, documentService, iconService, logger, modalService, permissionService, processLinkService, router, stateService, taskIntermediateSaveService, taskService, toastr, translateService, formViewModel, formCustomComponentConfig, urlResolverService) {
|
|
952
955
|
this.configService = configService;
|
|
953
956
|
this.documentService = documentService;
|
|
954
957
|
this.iconService = iconService;
|
|
@@ -963,6 +966,7 @@ class TaskDetailContentComponent {
|
|
|
963
966
|
this.toastr = toastr;
|
|
964
967
|
this.translateService = translateService;
|
|
965
968
|
this.formViewModel = formViewModel;
|
|
969
|
+
this.formCustomComponentConfig = formCustomComponentConfig;
|
|
966
970
|
this.urlResolverService = urlResolverService;
|
|
967
971
|
this.closeModalEvent = new EventEmitter();
|
|
968
972
|
this.formSubmit = new EventEmitter();
|
|
@@ -985,13 +989,17 @@ class TaskDetailContentComponent {
|
|
|
985
989
|
this.processLinkIsForm$ = this._taskProcessLinkType$.pipe(map$1((type) => type === 'form'));
|
|
986
990
|
this.processLinkIsFormViewModel$ = this._taskProcessLinkType$.pipe(map$1((type) => type === 'form-view-model'));
|
|
987
991
|
this.processLinkIsFormFlow$ = this._taskProcessLinkType$.pipe(map$1((type) => type === 'form-flow'));
|
|
992
|
+
this.processLinkIsUiComponent$ = this._taskProcessLinkType$.pipe(map$1((type) => type === 'ui-component'));
|
|
988
993
|
this._processLinkId$ = new BehaviorSubject(null);
|
|
989
994
|
this._subscriptions = new Subscription();
|
|
995
|
+
this._formCustomComponentConfig$ = new BehaviorSubject({});
|
|
996
|
+
this._viewInitialized$ = new BehaviorSubject(false);
|
|
990
997
|
this.intermediateSaveEnabled = !!this.configService.featureToggles?.enableIntermediateSave;
|
|
991
998
|
this.iconService.registerAll([RecentlyViewed16]);
|
|
992
999
|
const options = new FormioOptionsImpl();
|
|
993
1000
|
options.disableAlerts = true;
|
|
994
1001
|
this.formioOptions$.next(options);
|
|
1002
|
+
this._formCustomComponentConfig$.next(formCustomComponentConfig);
|
|
995
1003
|
}
|
|
996
1004
|
ngOnInit() {
|
|
997
1005
|
this.openPermissionSubscription();
|
|
@@ -999,6 +1007,10 @@ class TaskDetailContentComponent {
|
|
|
999
1007
|
ngOnDestroy() {
|
|
1000
1008
|
this._subscriptions.unsubscribe();
|
|
1001
1009
|
this.taskIntermediateSaveService.setSubmission({});
|
|
1010
|
+
this._viewInitialized$.next(false);
|
|
1011
|
+
}
|
|
1012
|
+
ngAfterViewInit() {
|
|
1013
|
+
this._viewInitialized$.next(true);
|
|
1002
1014
|
}
|
|
1003
1015
|
onSubmit(submission) {
|
|
1004
1016
|
if (submission.data) {
|
|
@@ -1129,6 +1141,13 @@ class TaskDetailContentComponent {
|
|
|
1129
1141
|
});
|
|
1130
1142
|
});
|
|
1131
1143
|
break;
|
|
1144
|
+
case 'ui-component':
|
|
1145
|
+
this._taskProcessLinkType$.next('ui-component');
|
|
1146
|
+
this._processLinkId$.next(processLinkResult.processLinkId);
|
|
1147
|
+
this.formDefinition$.next(null);
|
|
1148
|
+
this.formName$.next('');
|
|
1149
|
+
this.setFormCustomComponent(processLinkResult.properties.componentKey);
|
|
1150
|
+
break;
|
|
1132
1151
|
}
|
|
1133
1152
|
this.loading$.next(false);
|
|
1134
1153
|
}
|
|
@@ -1157,30 +1176,51 @@ class TaskDetailContentComponent {
|
|
|
1157
1176
|
this.formDefinition$.next(formDefinition);
|
|
1158
1177
|
}
|
|
1159
1178
|
setFormViewModelComponent() {
|
|
1160
|
-
this.
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
this.
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1179
|
+
this._viewInitialized$.subscribe((viewInitialized) => {
|
|
1180
|
+
if (viewInitialized) {
|
|
1181
|
+
this.formViewModelDynamicContainer.clear();
|
|
1182
|
+
if (!this.formViewModel)
|
|
1183
|
+
return;
|
|
1184
|
+
const formViewModelComponent = this.formViewModelDynamicContainer.createComponent(this.formViewModel.component);
|
|
1185
|
+
formViewModelComponent.instance.form = this.formDefinition$.getValue();
|
|
1186
|
+
formViewModelComponent.instance.formName = this.formName$.getValue();
|
|
1187
|
+
formViewModelComponent.instance.taskInstanceId = this.taskInstanceId$.getValue();
|
|
1188
|
+
formViewModelComponent.instance.isStartForm = false;
|
|
1189
|
+
formViewModelComponent.instance.formSubmit
|
|
1190
|
+
.pipe(take$1(1), switchMap(() => this.task$))
|
|
1191
|
+
.subscribe((task) => {
|
|
1192
|
+
this.completeTask(task);
|
|
1193
|
+
});
|
|
1194
|
+
if (this.intermediateSaveEnabled) {
|
|
1195
|
+
this._subscriptions.add(formViewModelComponent.instance.submission$.subscribe(submission => {
|
|
1196
|
+
this.taskIntermediateSaveService.setSubmission(submission);
|
|
1197
|
+
}));
|
|
1198
|
+
this._subscriptions.add(this.submission$.pipe(distinctUntilChanged()).subscribe((submission) => {
|
|
1199
|
+
if (submission?.data && Object.keys(submission.data).length === 0) {
|
|
1200
|
+
formViewModelComponent.instance.submission = { data: {} };
|
|
1201
|
+
}
|
|
1202
|
+
}));
|
|
1203
|
+
this.getCurrentProgress(formViewModelComponent);
|
|
1180
1204
|
}
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
|
|
1205
|
+
}
|
|
1206
|
+
});
|
|
1207
|
+
}
|
|
1208
|
+
setFormCustomComponent(formCustomComponentKey) {
|
|
1209
|
+
this._viewInitialized$.subscribe((viewInitialized) => {
|
|
1210
|
+
if (viewInitialized) {
|
|
1211
|
+
this.formCustomComponentDynamicContainer.clear();
|
|
1212
|
+
if (!this.formCustomComponentConfig)
|
|
1213
|
+
return;
|
|
1214
|
+
this._subscriptions.add(this._formCustomComponentConfig$.subscribe((formCustomComponentConfig) => {
|
|
1215
|
+
const customComponent = formCustomComponentConfig[formCustomComponentKey];
|
|
1216
|
+
const renderedComponent = this.formCustomComponentDynamicContainer.createComponent(customComponent);
|
|
1217
|
+
renderedComponent.instance.taskInstanceId = this.taskInstanceId$.value;
|
|
1218
|
+
renderedComponent.instance.submitEvent.subscribe(() => {
|
|
1219
|
+
this.closeModalEvent.emit();
|
|
1220
|
+
});
|
|
1221
|
+
}));
|
|
1222
|
+
}
|
|
1223
|
+
});
|
|
1184
1224
|
}
|
|
1185
1225
|
resetFormDefinition() {
|
|
1186
1226
|
this.formDefinition$.next(null);
|
|
@@ -1199,17 +1239,22 @@ class TaskDetailContentComponent {
|
|
|
1199
1239
|
this.stateService.setDocumentDefinitionName(documentDefinitionName);
|
|
1200
1240
|
});
|
|
1201
1241
|
}
|
|
1202
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TaskDetailContentComponent, deps: [{ token: i1$1.ConfigService }, { token: i2.DocumentService }, { token: i12.IconService }, { token: i4.NGXLogger }, { token: i9.ValtimoModalService }, { token: i3$1.PermissionService }, { token: i7.ProcessLinkService }, { token: i1$2.Router }, { token: i9.FormIoStateService }, { token: TaskIntermediateSaveService }, { token: TaskService }, { token: i10.ToastrService }, { token: i3.TranslateService }, { token: FORM_VIEW_MODEL_TOKEN, optional: true }, { token: i7.UrlResolverService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1203
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TaskDetailContentComponent, isStandalone: true, selector: "valtimo-task-detail-content", inputs: { task: "task", taskAndProcessLink: "taskAndProcessLink", modalClosed: "modalClosed" }, outputs: { closeModalEvent: "closeModalEvent", formSubmit: "formSubmit", activeChange: "activeChange" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "formViewModelDynamicContainer", first: true, predicate: ["formViewModelComponent"], descendants: true, read: ViewContainerRef }, { propertyName: "formFlow", first: true, predicate: ["formFlow"], 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<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n taskId: taskInstanceId$ | async,\n formDefinition: formDefinition$ | async,\n formDefinitionId: formDefinitionId$ | async,\n formName: formName$ | async,\n formIoFormData: formIoFormData$ | async,\n submission: submission$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n processLinkIsFormViewModel: processLinkIsFormViewModel$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async,\n canAssignUserToTask: canAssignUserToTask$ | async,\n } as obs\"\n>\n <valtimo-form-io\n #form\n *ngIf=\"obs.formDefinition && obs.processLinkIsForm\"\n [form]=\"obs.formDefinition\"\n [submission]=\"obs.submission\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n\n <valtimo-form-flow\n #formFlow\n *ngIf=\"obs.processLinkIsFormFlow\"\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask(obs.task)\"\n (formFlowChange)=\"onFormFlowChangeEvent()\"\n ></valtimo-form-flow>\n\n <div *ngIf=\"obs.loading\" class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n\n <div\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage\n \"\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n >\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n\n <div *ngIf=\"obs.errorMessage\" class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n\n <div class=\"m-2\">\n <ng-template #formViewModelComponent></ng-template>\n </div>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormIoModule }, { kind: "component", type: i9.FormioComponent, selector: "valtimo-form-io", inputs: ["options", "submission", "form", "readOnly", "formRefresh$"], outputs: ["submit", "change", "event"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ProcessLinkModule }, { kind: "component", type: i7.FormFlowComponent, selector: "valtimo-form-flow", inputs: ["formIoFormData", "formFlowInstanceId"], outputs: ["formFlowComplete", "formFlowChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1242
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TaskDetailContentComponent, deps: [{ token: i1$1.ConfigService }, { token: i2.DocumentService }, { token: i12.IconService }, { token: i4.NGXLogger }, { token: i9.ValtimoModalService }, { token: i3$1.PermissionService }, { token: i7.ProcessLinkService }, { token: i1$2.Router }, { token: i9.FormIoStateService }, { token: TaskIntermediateSaveService }, { token: TaskService }, { token: i10.ToastrService }, { token: i3.TranslateService }, { token: FORM_VIEW_MODEL_TOKEN, optional: true }, { token: FORM_CUSTOM_COMPONENT_TOKEN, optional: true }, { token: i7.UrlResolverService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1243
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TaskDetailContentComponent, isStandalone: true, selector: "valtimo-task-detail-content", inputs: { task: "task", taskAndProcessLink: "taskAndProcessLink", modalClosed: "modalClosed" }, outputs: { closeModalEvent: "closeModalEvent", formSubmit: "formSubmit", activeChange: "activeChange" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "formViewModelDynamicContainer", first: true, predicate: ["formViewModelComponent"], descendants: true, read: ViewContainerRef }, { propertyName: "formFlow", first: true, predicate: ["formFlow"], descendants: true }, { propertyName: "formCustomComponentDynamicContainer", first: true, predicate: ["formCustomComponent"], descendants: true, read: ViewContainerRef }], 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<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n taskId: taskInstanceId$ | async,\n formDefinition: formDefinition$ | async,\n formDefinitionId: formDefinitionId$ | async,\n formName: formName$ | async,\n formIoFormData: formIoFormData$ | async,\n submission: submission$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n processLinkIsFormViewModel: processLinkIsFormViewModel$ | async,\n processLinkIsUiComponent: processLinkIsUiComponent$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async,\n canAssignUserToTask: canAssignUserToTask$ | async,\n } as obs\"\n>\n <valtimo-form-io\n #form\n *ngIf=\"obs.formDefinition && obs.processLinkIsForm\"\n [form]=\"obs.formDefinition\"\n [submission]=\"obs.submission\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n\n <valtimo-form-flow\n #formFlow\n *ngIf=\"obs.processLinkIsFormFlow\"\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask(obs.task)\"\n (formFlowChange)=\"onFormFlowChangeEvent()\"\n ></valtimo-form-flow>\n\n <div *ngIf=\"obs.loading\" class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n\n <div\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage && !obs.processLinkIsUiComponent\n \"\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n >\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n\n <div *ngIf=\"obs.errorMessage\" class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n\n <div class=\"m-2\">\n <ng-template #formViewModelComponent></ng-template>\n <ng-template #formCustomComponent></ng-template>\n </div>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormIoModule }, { kind: "component", type: i9.FormioComponent, selector: "valtimo-form-io", inputs: ["options", "submission", "form", "readOnly", "formRefresh$"], outputs: ["submit", "change", "event"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ProcessLinkModule }, { kind: "component", type: i7.FormFlowComponent, selector: "valtimo-form-flow", inputs: ["formIoFormData", "formFlowInstanceId"], outputs: ["formFlowComplete", "formFlowChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1204
1244
|
}
|
|
1205
1245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TaskDetailContentComponent, decorators: [{
|
|
1206
1246
|
type: Component,
|
|
1207
|
-
args: [{ selector: 'valtimo-task-detail-content', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormIoModule, TranslateModule, ProcessLinkModule], 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<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n taskId: taskInstanceId$ | async,\n formDefinition: formDefinition$ | async,\n formDefinitionId: formDefinitionId$ | async,\n formName: formName$ | async,\n formIoFormData: formIoFormData$ | async,\n submission: submission$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n processLinkIsFormViewModel: processLinkIsFormViewModel$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async,\n canAssignUserToTask: canAssignUserToTask$ | async,\n } as obs\"\n>\n <valtimo-form-io\n #form\n *ngIf=\"obs.formDefinition && obs.processLinkIsForm\"\n [form]=\"obs.formDefinition\"\n [submission]=\"obs.submission\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n\n <valtimo-form-flow\n #formFlow\n *ngIf=\"obs.processLinkIsFormFlow\"\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask(obs.task)\"\n (formFlowChange)=\"onFormFlowChangeEvent()\"\n ></valtimo-form-flow>\n\n <div *ngIf=\"obs.loading\" class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n\n <div\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage\n \"\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n >\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n\n <div *ngIf=\"obs.errorMessage\" class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n\n <div class=\"m-2\">\n <ng-template #formViewModelComponent></ng-template>\n </div>\n</ng-container>\n" }]
|
|
1247
|
+
args: [{ selector: 'valtimo-task-detail-content', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormIoModule, TranslateModule, ProcessLinkModule], 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<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n taskId: taskInstanceId$ | async,\n formDefinition: formDefinition$ | async,\n formDefinitionId: formDefinitionId$ | async,\n formName: formName$ | async,\n formIoFormData: formIoFormData$ | async,\n submission: submission$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n processLinkIsFormViewModel: processLinkIsFormViewModel$ | async,\n processLinkIsUiComponent: processLinkIsUiComponent$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async,\n canAssignUserToTask: canAssignUserToTask$ | async,\n } as obs\"\n>\n <valtimo-form-io\n #form\n *ngIf=\"obs.formDefinition && obs.processLinkIsForm\"\n [form]=\"obs.formDefinition\"\n [submission]=\"obs.submission\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n\n <valtimo-form-flow\n #formFlow\n *ngIf=\"obs.processLinkIsFormFlow\"\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask(obs.task)\"\n (formFlowChange)=\"onFormFlowChangeEvent()\"\n ></valtimo-form-flow>\n\n <div *ngIf=\"obs.loading\" class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n\n <div\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage && !obs.processLinkIsUiComponent\n \"\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n >\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n\n <div *ngIf=\"obs.errorMessage\" class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n\n <div class=\"m-2\">\n <ng-template #formViewModelComponent></ng-template>\n <ng-template #formCustomComponent></ng-template>\n </div>\n</ng-container>\n" }]
|
|
1208
1248
|
}], ctorParameters: () => [{ type: i1$1.ConfigService }, { type: i2.DocumentService }, { type: i12.IconService }, { type: i4.NGXLogger }, { type: i9.ValtimoModalService }, { type: i3$1.PermissionService }, { type: i7.ProcessLinkService }, { type: i1$2.Router }, { type: i9.FormIoStateService }, { type: TaskIntermediateSaveService }, { type: TaskService }, { type: i10.ToastrService }, { type: i3.TranslateService }, { type: undefined, decorators: [{
|
|
1209
1249
|
type: Optional
|
|
1210
1250
|
}, {
|
|
1211
1251
|
type: Inject,
|
|
1212
1252
|
args: [FORM_VIEW_MODEL_TOKEN]
|
|
1253
|
+
}] }, { type: undefined, decorators: [{
|
|
1254
|
+
type: Optional
|
|
1255
|
+
}, {
|
|
1256
|
+
type: Inject,
|
|
1257
|
+
args: [FORM_CUSTOM_COMPONENT_TOKEN]
|
|
1213
1258
|
}] }, { type: i7.UrlResolverService }], propDecorators: { form: [{
|
|
1214
1259
|
type: ViewChild,
|
|
1215
1260
|
args: ['form']
|
|
@@ -1219,6 +1264,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1219
1264
|
}], formFlow: [{
|
|
1220
1265
|
type: ViewChild,
|
|
1221
1266
|
args: ['formFlow']
|
|
1267
|
+
}], formCustomComponentDynamicContainer: [{
|
|
1268
|
+
type: ViewChild,
|
|
1269
|
+
args: ['formCustomComponent', { static: false, read: ViewContainerRef }]
|
|
1222
1270
|
}], task: [{
|
|
1223
1271
|
type: Input
|
|
1224
1272
|
}], taskAndProcessLink: [{
|