@valtimo/object 10.5.1 → 10.6.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.
@@ -8,14 +8,14 @@ import { RouterModule } from '@angular/router';
8
8
  import * as i6$1 from '@angular/common';
9
9
  import { CommonModule, AsyncPipe } from '@angular/common';
10
10
  import { AuthGuardService } from '@valtimo/security';
11
- import { map, BehaviorSubject, combineLatest, distinctUntilChanged, of, startWith, throwError, Subject } from 'rxjs';
12
- import { switchMap, tap, take, catchError, finalize } from 'rxjs/operators';
11
+ import { map, BehaviorSubject, combineLatest, distinctUntilChanged, of, startWith, filter, throwError, Subject } from 'rxjs';
12
+ import { switchMap, catchError, tap, take, finalize } from 'rxjs/operators';
13
13
  import * as i2$1 from '@valtimo/object-management';
14
14
  import * as i4 from '@ngx-translate/core';
15
15
  import { TranslateModule } from '@ngx-translate/core';
16
16
  import * as i6 from 'ngx-toastr';
17
17
  import * as i8 from '@valtimo/components';
18
- import { WidgetModule, ListModule, SpinnerModule, FormIoModule, ConfirmationModalModule, SearchFieldsModule } from '@valtimo/components';
18
+ import { WidgetModule, ListModule, SpinnerModule, FormIoModule, ConfirmationModalModule, SearchFieldsModule, ValtimoIbmModalDirectiveModule } from '@valtimo/components';
19
19
  import * as i9 from 'carbon-components-angular';
20
20
  import { ButtonModule, IconModule, LoadingModule, ModalModule, InputModule } from 'carbon-components-angular';
21
21
  import { ReactiveFormsModule } from '@angular/forms';
@@ -205,26 +205,36 @@ class ObjectListComponent {
205
205
  this.translateService.stream('key'),
206
206
  this.refreshObjectList$,
207
207
  ]).pipe(switchMap(([objectManagementId, currentPage, columnType, searchFieldValues]) => {
208
+ const handleError = () => {
209
+ this.disableInput();
210
+ return of(null);
211
+ };
208
212
  if (columnType === ColumnType.CUSTOM) {
209
- return this.objectService.postObjectsByObjectManagementId(objectManagementId, {
213
+ return this.objectService
214
+ .postObjectsByObjectManagementId(objectManagementId, {
210
215
  page: currentPage.page,
211
216
  size: currentPage.size,
212
217
  }, Object.keys(searchFieldValues).length > 0
213
218
  ? { otherFilters: this.mapSearchValuesToFilters(searchFieldValues) }
214
- : {});
219
+ : {})
220
+ .pipe(catchError(() => handleError()));
215
221
  }
216
222
  else {
217
- return this.objectService.getObjectsByObjectManagementId(objectManagementId, {
223
+ return this.objectService
224
+ .getObjectsByObjectManagementId(objectManagementId, {
218
225
  page: currentPage.page,
219
226
  size: currentPage.size,
220
- });
227
+ })
228
+ .pipe(catchError(() => handleError()));
221
229
  }
222
230
  }), tap(instanceRes => {
223
- this.pageSizes$.pipe(take(1)).subscribe(sizes => {
224
- // @ts-ignore
225
- this.pageSizes$.next({ ...sizes, collectionSize: instanceRes.totalElements });
226
- });
227
- }), map(res => res.content.map(record => record?.items?.reduce((obj, item) => Object.assign(obj, { objectId: record.id }, { [item.key]: item.value }), {}))), tap(() => this.loading$.next(false)));
231
+ if (instanceRes != null) {
232
+ this.pageSizes$.pipe(take(1)).subscribe(sizes => {
233
+ // @ts-ignore
234
+ this.pageSizes$.next({ ...sizes, collectionSize: instanceRes.totalElements });
235
+ });
236
+ }
237
+ }), map(res => res?.content?.map(record => record?.items?.reduce((obj, item) => Object.assign(obj, { objectId: record.id }, { [item.key]: item.value }), {}))), tap(() => this.loading$.next(false)));
228
238
  this.formDefinition$ = combineLatest([
229
239
  this.objectManagementId$,
230
240
  this.clearForm$,
@@ -258,6 +268,7 @@ class ObjectListComponent {
258
268
  sortable: column.sortable,
259
269
  ...(column.viewType && { viewType: column.viewType }),
260
270
  ...(column.enum && { enum: column.enum }),
271
+ ...(column.format && { format: column.format }),
261
272
  };
262
273
  }),
263
274
  ];
@@ -296,22 +307,21 @@ class ObjectListComponent {
296
307
  addObject() {
297
308
  this.disableInput();
298
309
  combineLatest([this.objectManagementId$, this.submission$, this.formValid$])
299
- .pipe(take(1))
300
- .subscribe(([objectManagementId, submission, formValid]) => {
301
- if (formValid) {
302
- submission = this.objectService.removeEmptyStringValuesFromSubmission(submission);
303
- this.objectService
304
- .createObject({ objectManagementId }, { ...submission })
305
- .pipe(take(1), catchError((error) => this.handleCreateObjectError(error)), finalize(() => {
306
- this.enableInput();
307
- }))
308
- .subscribe(() => {
309
- this.closeModal();
310
- this.refreshObjectList();
311
- this.clearForm$.next(true);
312
- this.toastr.success(this.translate.instant('object.messages.objectCreated'));
313
- });
314
- }
310
+ .pipe(take(1), filter(([objectManagementId, submission, formValid]) => formValid), switchMap(([objectManagementId, submission]) => this.objectService
311
+ .createObject({ objectManagementId }, { ...this.objectService.removeEmptyStringValuesFromSubmission(submission) })
312
+ .pipe(take(1), catchError((error) => {
313
+ this.handleCreateObjectError(error);
314
+ return throwError(error);
315
+ }))), finalize(() => {
316
+ this.enableInput();
317
+ }))
318
+ .subscribe({
319
+ next: () => {
320
+ this.closeModal();
321
+ this.refreshObjectList();
322
+ this.clearForm$.next(true);
323
+ this.toastr.success(this.translate.instant('object.messages.objectCreated'));
324
+ },
315
325
  });
316
326
  }
317
327
  redirectToDetails(record) {
@@ -346,7 +356,6 @@ class ObjectListComponent {
346
356
  return throwError(error);
347
357
  }
348
358
  handleCreateObjectError(error) {
349
- this.closeModal();
350
359
  this.toastr.error(this.translate.instant('object.messages.objectCreationError'));
351
360
  return throwError(error);
352
361
  }
@@ -362,17 +371,17 @@ class ObjectListComponent {
362
371
  }
363
372
  else {
364
373
  // @ts-ignore
365
- filters.push({ key: valueKey, values: [{ value: searchValue }] });
374
+ filters.push({ key: valueKey, values: [searchValue] });
366
375
  }
367
376
  });
368
377
  return filters;
369
378
  }
370
379
  }
371
380
  ObjectListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectListComponent, deps: [{ token: ObjectService }, { token: ObjectColumnService }, { token: i2$1.ObjectManagementService }, { token: i4.TranslateService }, { token: i3.Router }, { token: i3.ActivatedRoute }, { token: i6.ToastrService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
372
- ObjectListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectListComponent, selector: "valtimo-object-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n pagination: pagination$ | async,\n disableInput: disableInput$ | async,\n fields: fields$ | async,\n objectConfiguration: objectConfiguration$ | async\n } as obs\"\n>\n <div class=\"main-content pt-0\">\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-0\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngTemplateOutlet=\"searchFields; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createNewModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button\n (click)=\"openModal()\"\n ibmButton=\"primary\"\n size=\"md\"\n class=\"ml-3\"\n [disabled]=\"obs.disableInput || obs.loading\"\n >\n {{ 'object.createObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #searchFields let-obs=\"obs\">\n <div class=\"mb-3\">\n <valtimo-search-fields\n [loading]=\"obs.loading\"\n [searchFields]=\"objectSearchFields$ | async\"\n (doSearch)=\"search($event)\"\n [documentDefinitionName]=\"objectManagementId$ | async\"\n [setValuesSubject$]=\"null\"\n ></valtimo-search-fields>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.objectConfiguration\"\n [fields]=\"obs.fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"objectConfigurationList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'object.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n obs.objectConfiguration?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #createNewModal>\n <ibm-modal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n formDefinition: formDefinition$ | async,\n disableInput: disableInput$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{ 'object.createObject' | translate }}\n </h3>\n </ibm-modal-header>\n <section ibmModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </ibm-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formDefinition\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <ibm-modal-footer>\n <ng-container>\n <button\n ibmButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"addObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><ibm-loading></ibm-loading></div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.loading-icon{display:flex;justify-content:center}\n"], dependencies: [{ kind: "directive", type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i8.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i8.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "directive", type: i9.Button, selector: "[ibmButton]", inputs: ["ibmButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i9.IconDirective, selector: "[ibmIcon]", inputs: ["ibmIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i9.Loading, selector: "ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i8.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i9.Modal, selector: "ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i9.ModalHeader, selector: "ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i9.ModalFooter, selector: "ibm-modal-footer" }, { kind: "directive", type: i9.ModalContent, selector: "[ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i9.ModalHeaderHeading, selector: "[ibmModalHeaderHeading]" }, { kind: "component", type: i8.SearchFieldsComponent, selector: "valtimo-search-fields", inputs: ["loading", "searchFields", "documentDefinitionName", "setValuesSubject$"], outputs: ["doSearch"] }, { kind: "pipe", type: i6$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
381
+ ObjectListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectListComponent, selector: "valtimo-object-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n pagination: pagination$ | async,\n disableInput: disableInput$ | async,\n fields: fields$ | async,\n objectConfiguration: objectConfiguration$ | async\n } as obs\"\n>\n <div class=\"main-content pt-0\">\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-0\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngTemplateOutlet=\"searchFields; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createNewModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button\n (click)=\"openModal()\"\n ibmButton=\"primary\"\n size=\"md\"\n class=\"ml-3\"\n [disabled]=\"obs.disableInput || obs.loading\"\n >\n {{ 'object.createObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #searchFields let-obs=\"obs\">\n <div class=\"mb-3\">\n <valtimo-search-fields\n [loading]=\"obs.loading\"\n [searchFields]=\"objectSearchFields$ | async\"\n (doSearch)=\"search($event)\"\n [documentDefinitionName]=\"objectManagementId$ | async\"\n [setValuesSubject$]=\"null\"\n ></valtimo-search-fields>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.objectConfiguration\"\n [fields]=\"obs.fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"objectConfigurationList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'object.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n obs.objectConfiguration?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #createNewModal>\n <ibm-modal\n valtimoIbmModal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n formDefinition: formDefinition$ | async,\n disableInput: disableInput$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{ 'object.createObject' | translate }}\n </h3>\n </ibm-modal-header>\n <section ibmModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </ibm-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formDefinition\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <ibm-modal-footer>\n <ng-container>\n <button\n ibmButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"addObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><ibm-loading></ibm-loading></div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.loading-icon{display:flex;justify-content:center}\n"], dependencies: [{ kind: "directive", type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i8.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i8.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "directive", type: i9.Button, selector: "[ibmButton]", inputs: ["ibmButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i9.IconDirective, selector: "[ibmIcon]", inputs: ["ibmIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i9.Loading, selector: "ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i8.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i9.Modal, selector: "ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i9.ModalHeader, selector: "ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i9.ModalFooter, selector: "ibm-modal-footer" }, { kind: "directive", type: i9.ModalContent, selector: "[ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i9.ModalHeaderHeading, selector: "[ibmModalHeaderHeading]" }, { kind: "component", type: i8.SearchFieldsComponent, selector: "valtimo-search-fields", inputs: ["loading", "searchFields", "documentDefinitionName", "setValuesSubject$", "defaultValues"], outputs: ["doSearch"] }, { kind: "directive", type: i8.ValtimoIbmModalDirective, selector: "[valtimoIbmModal]" }, { kind: "pipe", type: i6$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
373
382
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectListComponent, decorators: [{
374
383
  type: Component,
375
- args: [{ selector: 'valtimo-object-list', template: "<!--\n ~ Copyright 2015-2020 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<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n pagination: pagination$ | async,\n disableInput: disableInput$ | async,\n fields: fields$ | async,\n objectConfiguration: objectConfiguration$ | async\n } as obs\"\n>\n <div class=\"main-content pt-0\">\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-0\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngTemplateOutlet=\"searchFields; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createNewModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button\n (click)=\"openModal()\"\n ibmButton=\"primary\"\n size=\"md\"\n class=\"ml-3\"\n [disabled]=\"obs.disableInput || obs.loading\"\n >\n {{ 'object.createObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #searchFields let-obs=\"obs\">\n <div class=\"mb-3\">\n <valtimo-search-fields\n [loading]=\"obs.loading\"\n [searchFields]=\"objectSearchFields$ | async\"\n (doSearch)=\"search($event)\"\n [documentDefinitionName]=\"objectManagementId$ | async\"\n [setValuesSubject$]=\"null\"\n ></valtimo-search-fields>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.objectConfiguration\"\n [fields]=\"obs.fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"objectConfigurationList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'object.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n obs.objectConfiguration?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #createNewModal>\n <ibm-modal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n formDefinition: formDefinition$ | async,\n disableInput: disableInput$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{ 'object.createObject' | translate }}\n </h3>\n </ibm-modal-header>\n <section ibmModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </ibm-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formDefinition\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <ibm-modal-footer>\n <ng-container>\n <button\n ibmButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"addObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><ibm-loading></ibm-loading></div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.loading-icon{display:flex;justify-content:center}\n"] }]
384
+ args: [{ selector: 'valtimo-object-list', template: "<!--\n ~ Copyright 2015-2020 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<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n pagination: pagination$ | async,\n disableInput: disableInput$ | async,\n fields: fields$ | async,\n objectConfiguration: objectConfiguration$ | async\n } as obs\"\n>\n <div class=\"main-content pt-0\">\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-0\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngTemplateOutlet=\"searchFields; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createNewModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button\n (click)=\"openModal()\"\n ibmButton=\"primary\"\n size=\"md\"\n class=\"ml-3\"\n [disabled]=\"obs.disableInput || obs.loading\"\n >\n {{ 'object.createObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #searchFields let-obs=\"obs\">\n <div class=\"mb-3\">\n <valtimo-search-fields\n [loading]=\"obs.loading\"\n [searchFields]=\"objectSearchFields$ | async\"\n (doSearch)=\"search($event)\"\n [documentDefinitionName]=\"objectManagementId$ | async\"\n [setValuesSubject$]=\"null\"\n ></valtimo-search-fields>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.objectConfiguration\"\n [fields]=\"obs.fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"objectConfigurationList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'object.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n obs.objectConfiguration?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #createNewModal>\n <ibm-modal\n valtimoIbmModal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n formDefinition: formDefinition$ | async,\n disableInput: disableInput$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{ 'object.createObject' | translate }}\n </h3>\n </ibm-modal-header>\n <section ibmModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </ibm-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formDefinition\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <ibm-modal-footer>\n <ng-container>\n <button\n ibmButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"addObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><ibm-loading></ibm-loading></div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.loading-icon{display:flex;justify-content:center}\n"] }]
376
385
  }], ctorParameters: function () { return [{ type: ObjectService }, { type: ObjectColumnService }, { type: i2$1.ObjectManagementService }, { type: i4.TranslateService }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: i6.ToastrService }, { type: i4.TranslateService }]; } });
377
386
 
378
387
  /*
@@ -536,7 +545,10 @@ class ObjectDetailComponent {
536
545
  objectId,
537
546
  formType: FormType.EDITFORM,
538
547
  })
539
- .pipe(catchError(() => this.handleRetrievingFormError()))), map(res => res?.formDefinition), tap(() => this.loading$.next(false)));
548
+ .pipe(catchError(() => {
549
+ this.disableInput();
550
+ return this.handleRetrievingFormError();
551
+ }))), map(res => res?.formDefinition), tap(() => this.loading$.next(false)));
540
552
  }
541
553
  saveObject() {
542
554
  this.disableInput();
@@ -621,10 +633,10 @@ class ObjectDetailComponent {
621
633
  }
622
634
  }
623
635
  ObjectDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectDetailComponent, deps: [{ token: ObjectService }, { token: ObjectStateService }, { token: i3.ActivatedRoute }, { token: i3.Router }, { token: i4.TranslateService }, { token: i6.ToastrService }], target: i0.ɵɵFactoryTarget.Component });
624
- ObjectDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectDetailComponent, selector: "valtimo-object-detail", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<ng-container\n *ngIf=\"{\n formioFormSummary: formioFormSummary$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"text-right\">\n <div class=\"btn-group mb-1\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <div class=\"col-12\">\n <ng-container *ngTemplateOutlet=\"widget; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button (click)=\"openModal()\" ibmButton=\"primary\" size=\"md\">\n {{ 'object.editObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n\n <button (click)=\"deleteObject()\" ibmButton=\"danger\" size=\"md\" class=\"ml-3\">\n {{ 'object.deleteObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #widget let-obs=\"obs\">\n <valtimo-form-io [form]=\"obs.formioFormSummary\" [readOnly]=\"true\"></valtimo-form-io>\n</ng-template>\n\n<ng-template #createEditModal>\n <ibm-modal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n disableInput: disableInput$ | async,\n formioFormEdit: formioFormEdit$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{ 'object.editObject' | translate }}\n </h3>\n </ibm-modal-header>\n <section ibmModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </ibm-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formioFormEdit\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <ibm-modal-footer>\n <ng-container>\n <button\n ibmButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"saveObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><ibm-loading></ibm-loading></div>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteObjectUrl$ | async\"\n (confirmEvent)=\"deleteObjectConfirmation()\"\n confirmButtonTextTranslationKey=\"object.deleteObject\"\n titleTranslationKey=\"object.deleteObject\"\n contentTranslationKey=\"object.deleteObjectConfirmation\"\n ></valtimo-confirmation-modal>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.row{margin:0}.object-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{border:none}\n"], dependencies: [{ kind: "directive", type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i9.Button, selector: "[ibmButton]", inputs: ["ibmButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i9.IconDirective, selector: "[ibmIcon]", inputs: ["ibmIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i9.Loading, selector: "ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i8.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i9.Modal, selector: "ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i9.ModalHeader, selector: "ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i9.ModalFooter, selector: "ibm-modal-footer" }, { kind: "directive", type: i9.ModalContent, selector: "[ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i9.ModalHeaderHeading, selector: "[ibmModalHeaderHeading]" }, { kind: "component", type: i8.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "cancelButtonText", "cancelButtonTextTranslationKey", "showModalSubject$", "outputOnConfirm"], outputs: ["confirmEvent"] }, { kind: "pipe", type: i6$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
636
+ ObjectDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectDetailComponent, selector: "valtimo-object-detail", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<ng-container\n *ngIf=\"{\n formioFormSummary: formioFormSummary$ | async,\n disableInput: disableInput$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"text-right\">\n <div class=\"btn-group mb-1\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <div class=\"col-12\">\n <ng-container *ngTemplateOutlet=\"widget; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button [disabled]=\"obs.disableInput\" (click)=\"openModal()\" ibmButton=\"primary\" size=\"md\">\n {{ 'object.editObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n\n <button (click)=\"deleteObject()\" ibmButton=\"danger\" size=\"md\" class=\"ml-3\">\n {{ 'object.deleteObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #widget let-obs=\"obs\">\n <valtimo-form-io\n *ngIf=\"obs.formioFormSummary\"\n [form]=\"obs.formioFormSummary\"\n [readOnly]=\"true\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #createEditModal>\n <ibm-modal\n valtimoIbmModal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n disableInput: disableInput$ | async,\n formioFormEdit: formioFormEdit$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{ 'object.editObject' | translate }}\n </h3>\n </ibm-modal-header>\n <section ibmModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </ibm-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formioFormEdit\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <ibm-modal-footer>\n <ng-container>\n <button\n ibmButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"saveObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><ibm-loading></ibm-loading></div>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteObjectUrl$ | async\"\n (confirmEvent)=\"deleteObjectConfirmation()\"\n confirmButtonTextTranslationKey=\"object.deleteObject\"\n titleTranslationKey=\"object.deleteObject\"\n contentTranslationKey=\"object.deleteObjectConfirmation\"\n ></valtimo-confirmation-modal>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.row{margin:0}.object-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{border:none}\n"], dependencies: [{ kind: "directive", type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i9.Button, selector: "[ibmButton]", inputs: ["ibmButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i9.IconDirective, selector: "[ibmIcon]", inputs: ["ibmIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i9.Loading, selector: "ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i8.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i9.Modal, selector: "ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i9.ModalHeader, selector: "ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i9.ModalFooter, selector: "ibm-modal-footer" }, { kind: "directive", type: i9.ModalContent, selector: "[ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i9.ModalHeaderHeading, selector: "[ibmModalHeaderHeading]" }, { kind: "component", type: i8.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "cancelButtonText", "cancelButtonTextTranslationKey", "showModalSubject$", "outputOnConfirm"], outputs: ["confirmEvent"] }, { kind: "directive", type: i8.ValtimoIbmModalDirective, selector: "[valtimoIbmModal]" }, { kind: "pipe", type: i6$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
625
637
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectDetailComponent, decorators: [{
626
638
  type: Component,
627
- args: [{ selector: 'valtimo-object-detail', template: "<!--\n ~ Copyright 2015-2020 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<ng-container\n *ngIf=\"{\n formioFormSummary: formioFormSummary$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"text-right\">\n <div class=\"btn-group mb-1\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <div class=\"col-12\">\n <ng-container *ngTemplateOutlet=\"widget; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button (click)=\"openModal()\" ibmButton=\"primary\" size=\"md\">\n {{ 'object.editObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n\n <button (click)=\"deleteObject()\" ibmButton=\"danger\" size=\"md\" class=\"ml-3\">\n {{ 'object.deleteObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #widget let-obs=\"obs\">\n <valtimo-form-io [form]=\"obs.formioFormSummary\" [readOnly]=\"true\"></valtimo-form-io>\n</ng-template>\n\n<ng-template #createEditModal>\n <ibm-modal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n disableInput: disableInput$ | async,\n formioFormEdit: formioFormEdit$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{ 'object.editObject' | translate }}\n </h3>\n </ibm-modal-header>\n <section ibmModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </ibm-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formioFormEdit\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <ibm-modal-footer>\n <ng-container>\n <button\n ibmButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"saveObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><ibm-loading></ibm-loading></div>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteObjectUrl$ | async\"\n (confirmEvent)=\"deleteObjectConfirmation()\"\n confirmButtonTextTranslationKey=\"object.deleteObject\"\n titleTranslationKey=\"object.deleteObject\"\n contentTranslationKey=\"object.deleteObjectConfirmation\"\n ></valtimo-confirmation-modal>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.row{margin:0}.object-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{border:none}\n"] }]
639
+ args: [{ selector: 'valtimo-object-detail', template: "<!--\n ~ Copyright 2015-2020 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<ng-container\n *ngIf=\"{\n formioFormSummary: formioFormSummary$ | async,\n disableInput: disableInput$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"text-right\">\n <div class=\"btn-group mb-1\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <div class=\"col-12\">\n <ng-container *ngTemplateOutlet=\"widget; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button [disabled]=\"obs.disableInput\" (click)=\"openModal()\" ibmButton=\"primary\" size=\"md\">\n {{ 'object.editObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n\n <button (click)=\"deleteObject()\" ibmButton=\"danger\" size=\"md\" class=\"ml-3\">\n {{ 'object.deleteObject' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #widget let-obs=\"obs\">\n <valtimo-form-io\n *ngIf=\"obs.formioFormSummary\"\n [form]=\"obs.formioFormSummary\"\n [readOnly]=\"true\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #createEditModal>\n <ibm-modal\n valtimoIbmModal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n disableInput: disableInput$ | async,\n formioFormEdit: formioFormEdit$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{ 'object.editObject' | translate }}\n </h3>\n </ibm-modal-header>\n <section ibmModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </ibm-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formioFormEdit\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <ibm-modal-footer>\n <ng-container>\n <button\n ibmButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"saveObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><ibm-loading></ibm-loading></div>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteObjectUrl$ | async\"\n (confirmEvent)=\"deleteObjectConfirmation()\"\n confirmButtonTextTranslationKey=\"object.deleteObject\"\n titleTranslationKey=\"object.deleteObject\"\n contentTranslationKey=\"object.deleteObjectConfirmation\"\n ></valtimo-confirmation-modal>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.row{margin:0}.object-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{border:none}\n"] }]
628
640
  }], ctorParameters: function () { return [{ type: ObjectService }, { type: ObjectStateService }, { type: i3.ActivatedRoute }, { type: i3.Router }, { type: i4.TranslateService }, { type: i6.ToastrService }]; } });
629
641
 
630
642
  /*
@@ -751,7 +763,8 @@ ObjectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
751
763
  InputModule,
752
764
  TooltipIconModule,
753
765
  ConfirmationModalModule,
754
- SearchFieldsModule] });
766
+ SearchFieldsModule,
767
+ ValtimoIbmModalDirectiveModule] });
755
768
  ObjectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectModule, imports: [CommonModule,
756
769
  ObjectRoutingModule,
757
770
  TranslateModule,
@@ -767,7 +780,8 @@ ObjectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
767
780
  InputModule,
768
781
  TooltipIconModule,
769
782
  ConfirmationModalModule,
770
- SearchFieldsModule] });
783
+ SearchFieldsModule,
784
+ ValtimoIbmModalDirectiveModule] });
771
785
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectModule, decorators: [{
772
786
  type: NgModule,
773
787
  args: [{
@@ -790,6 +804,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
790
804
  TooltipIconModule,
791
805
  ConfirmationModalModule,
792
806
  SearchFieldsModule,
807
+ ValtimoIbmModalDirectiveModule,
793
808
  ],
794
809
  exports: [],
795
810
  }]