@valtimo/object-management 10.2.1 → 10.4.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.
Files changed (28) hide show
  1. package/README.md +16 -7
  2. package/esm2020/lib/components/object-management-detail-container/object-management-detail-container.component.mjs +6 -5
  3. package/esm2020/lib/components/object-management-detail-container/tabs/object-management-detail/object-management-detail.component.mjs +13 -7
  4. package/esm2020/lib/components/object-management-detail-container/tabs/object-management-list-columns/object-management-list-columns.component.mjs +434 -0
  5. package/esm2020/lib/components/object-management-detail-container/tabs/object-management-list-search-fields/object-management-list-search-fields.component.mjs +325 -0
  6. package/esm2020/lib/components/object-management-list/object-management-list.component.mjs +8 -5
  7. package/esm2020/lib/components/object-management-modal/object-management-modal.component.mjs +14 -11
  8. package/esm2020/lib/components/object-management-upload-modal/object-management-upload-modal.component.mjs +16 -7
  9. package/esm2020/lib/models/object-management.model.mjs +1 -1
  10. package/esm2020/lib/object-management-routing.module.mjs +2 -2
  11. package/esm2020/lib/object-management.module.mjs +65 -15
  12. package/esm2020/lib/services/object-management.service.mjs +29 -2
  13. package/esm2020/lib/services/tab.enum.mjs +2 -1
  14. package/esm2020/public-api.mjs +1 -1
  15. package/fesm2015/valtimo-object-management.mjs +826 -63
  16. package/fesm2015/valtimo-object-management.mjs.map +1 -1
  17. package/fesm2020/valtimo-object-management.mjs +864 -63
  18. package/fesm2020/valtimo-object-management.mjs.map +1 -1
  19. package/lib/components/object-management-detail-container/tabs/object-management-detail/object-management-detail.component.d.ts +2 -1
  20. package/lib/components/object-management-detail-container/tabs/object-management-list-columns/object-management-list-columns.component.d.ts +91 -0
  21. package/lib/components/object-management-detail-container/tabs/object-management-list-search-fields/object-management-list-search-fields.component.d.ts +76 -0
  22. package/lib/models/object-management.model.d.ts +29 -0
  23. package/lib/object-management.module.d.ts +10 -7
  24. package/lib/services/object-management.service.d.ts +10 -2
  25. package/lib/services/tab.enum.d.ts +2 -1
  26. package/package.json +1 -1
  27. package/esm2020/lib/components/object-management-detail-container/tabs/object-management-list-tab/object-management-list-tab.component.mjs +0 -30
  28. package/lib/components/object-management-detail-container/tabs/object-management-list-tab/object-management-list-tab.component.d.ts +0 -9
@@ -1,23 +1,28 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Component, ViewChild, Input, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common/http';
4
- import * as i2 from '@valtimo/config';
4
+ import * as i4 from '@valtimo/config';
5
5
  import { ROLE_ADMIN } from '@valtimo/config';
6
- import * as i3$1 from '@angular/router';
6
+ import * as i2 from '@angular/router';
7
7
  import { RouterModule } from '@angular/router';
8
8
  import * as i6 from '@angular/common';
9
9
  import { CommonModule } from '@angular/common';
10
10
  import { AuthGuardService } from '@valtimo/security';
11
- import { Subject, BehaviorSubject, map, combineLatest, filter, switchMap } from 'rxjs';
12
- import * as i6$2 from '@valtimo/components';
13
- import { DropzoneModule, WidgetModule, ListModule } from '@valtimo/components';
14
- import { take, tap, switchMap as switchMap$1 } from 'rxjs/operators';
11
+ import { Subject, BehaviorSubject, map, combineLatest, delay, filter, switchMap, tap, startWith, of } from 'rxjs';
12
+ import * as i7 from '@valtimo/components';
13
+ import { DropzoneModule, WidgetModule, ListModule, CarbonMultiInputModule, ConfirmationModalModule, SpinnerModule, ModalModule as ModalModule$2 } from '@valtimo/components';
14
+ import * as i8 from 'carbon-components-angular';
15
+ import { InputModule as InputModule$1, ButtonModule as ButtonModule$1, ModalModule as ModalModule$1, NotificationModule, LoadingModule, DropdownModule, CheckboxModule, LinkModule, IconModule } from 'carbon-components-angular';
16
+ import { take, catchError, tap as tap$1, switchMap as switchMap$1 } from 'rxjs/operators';
15
17
  import * as i3 from '@valtimo/form-management';
16
- import * as i4 from '@valtimo/plugin';
18
+ import * as i4$1 from '@valtimo/plugin';
17
19
  import * as i5 from '@valtimo/user-interface';
18
- import { ModalModule, TitleModule, ButtonModule, FormModule, InputModule, SelectModule } from '@valtimo/user-interface';
19
- import * as i6$1 from '@ngx-translate/core';
20
+ import { ModalModule, TitleModule, ButtonModule, FormModule, InputModule, SelectModule, TooltipIconModule } from '@valtimo/user-interface';
21
+ import * as i3$1 from '@ngx-translate/core';
20
22
  import { TranslateModule } from '@ngx-translate/core';
23
+ import * as i10 from '@angular/forms';
24
+ import { FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
25
+ import * as i5$1 from '@angular/platform-browser';
21
26
 
22
27
  /*
23
28
  * Copyright 2015-2020 Ritense BV, the Netherlands.
@@ -51,20 +56,45 @@ class ObjectManagementService {
51
56
  editObject(payload) {
52
57
  return this.http.put(`${this.valtimoEndpointUri}v1/object/management/configuration`, payload);
53
58
  }
59
+ getSearchList(ownerId) {
60
+ return this.http.get(`${this.valtimoEndpointUri}v1/search/list-column/${ownerId}`);
61
+ }
62
+ postSearchList(ownerId, request) {
63
+ return this.http.post(`${this.valtimoEndpointUri}v1/search/list-column/${ownerId}`, Object.assign(Object.assign({}, request), { ownerId }));
64
+ }
65
+ putSearchList(ownerId, columnKey, request) {
66
+ return this.http.put(`${this.valtimoEndpointUri}v1/search/list-column/${ownerId}/${columnKey}`, Object.assign(Object.assign({}, request), { ownerId }));
67
+ }
68
+ deleteSearchList(ownerId, columnKey) {
69
+ return this.http.delete(`${this.valtimoEndpointUri}v1/search/list-column/${ownerId}/${columnKey}`);
70
+ }
71
+ getSearchField(ownerId) {
72
+ return this.http.get(`${this.valtimoEndpointUri}v1/search/field/${ownerId}`);
73
+ }
74
+ postSearchField(ownerId, request) {
75
+ return this.http.post(`${this.valtimoEndpointUri}v1/search/field/${ownerId}`, Object.assign(Object.assign({}, request), { ownerId }));
76
+ }
77
+ putSearchField(ownerId, key, request) {
78
+ return this.http.put(`${this.valtimoEndpointUri}v1/search/field/${ownerId}/${key}`, Object.assign(Object.assign({}, request), { ownerId }));
79
+ }
80
+ deleteSearchField(ownerId, key) {
81
+ return this.http.delete(`${this.valtimoEndpointUri}v1/search/field/${ownerId}/${key}`);
82
+ }
54
83
  }
55
- ObjectManagementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
84
+ ObjectManagementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementService, deps: [{ token: i1.HttpClient }, { token: i4.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
56
85
  ObjectManagementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementService, providedIn: 'root' });
57
86
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementService, decorators: [{
58
87
  type: Injectable,
59
88
  args: [{
60
- providedIn: 'root'
89
+ providedIn: 'root',
61
90
  }]
62
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.ConfigService }]; } });
91
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i4.ConfigService }]; } });
63
92
 
64
93
  var TabEnum;
65
94
  (function (TabEnum) {
66
95
  TabEnum["GENERAL"] = "general";
67
96
  TabEnum["LIST"] = "list";
97
+ TabEnum["SEARCH"] = "search";
68
98
  })(TabEnum || (TabEnum = {}));
69
99
 
70
100
  /*
@@ -185,27 +215,29 @@ class ObjectManagementModalComponent {
185
215
  this.modalType$ = this.objectManagementState.modalType$;
186
216
  this.formData$ = new BehaviorSubject(null);
187
217
  this.selectedObjecttype$ = new BehaviorSubject(null);
188
- this.formDefinitions$ = this.formManagementService.queryFormDefinitions().pipe(map((results) => {
218
+ this.formDefinitions$ = this.formManagementService.queryFormDefinitions().pipe(map(results => {
189
219
  var _a;
190
220
  return (_a = results === null || results === void 0 ? void 0 : results.body) === null || _a === void 0 ? void 0 : _a.content.map(configuration => ({
191
221
  id: configuration.id,
192
- text: configuration.name
222
+ text: configuration.name,
193
223
  }));
194
224
  }));
195
- this.configurationInstances$ = this.pluginManagementService.getAllPluginConfigurations().pipe(map((configurations) => configurations));
196
- this.objectsApiConfigurations$ = this.configurationInstances$.pipe(map((configurations) => {
225
+ this.configurationInstances$ = this.pluginManagementService
226
+ .getAllPluginConfigurations()
227
+ .pipe(map(configurations => configurations));
228
+ this.objectsApiConfigurations$ = this.configurationInstances$.pipe(map(configurations => {
197
229
  const filteredObjectsApiConfigurations = configurations.filter(configuration => { var _a; return ((_a = configuration === null || configuration === void 0 ? void 0 : configuration.pluginDefinition) === null || _a === void 0 ? void 0 : _a.key) === 'objectenapi'; });
198
230
  return filteredObjectsApiConfigurations.map(configuration => ({
199
231
  id: configuration.id,
200
232
  text: configuration.title,
201
233
  }));
202
234
  }));
203
- this.objecttypesApiConfigurations$ = this.configurationInstances$.pipe(map((configurations) => {
235
+ this.objecttypesApiConfigurations$ = this.configurationInstances$.pipe(map(configurations => {
204
236
  const filteredObjecttypesApiConfigurations = configurations.filter(configuration => { var _a; return ((_a = configuration === null || configuration === void 0 ? void 0 : configuration.pluginDefinition) === null || _a === void 0 ? void 0 : _a.key) === 'objecttypenapi'; });
205
237
  return filteredObjecttypesApiConfigurations.map(configuration => ({
206
238
  id: configuration.id,
207
239
  text: configuration.title,
208
- properties: configuration.properties
240
+ properties: configuration.properties,
209
241
  }));
210
242
  }));
211
243
  }
@@ -274,18 +306,19 @@ class ObjectManagementModalComponent {
274
306
  this.valid$.next(!!(data.title &&
275
307
  data.objectenApiPluginConfigurationId &&
276
308
  data.objecttypenApiPluginConfigurationId &&
277
- data.objecttypeId));
309
+ data.objecttypeId,
310
+ data.objecttypeVersion));
278
311
  }
279
312
  selectObjectType(objecttype) {
280
313
  this.selectedObjecttype$.next(objecttype);
281
314
  }
282
315
  }
283
- ObjectManagementModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModalComponent, deps: [{ token: ObjectManagementStateService }, { token: ObjectManagementService }, { token: i3.FormManagementService }, { token: i4.PluginManagementService }, { token: i5.ModalService }], target: i0.ɵɵFactoryTarget.Component });
284
- ObjectManagementModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementModalComponent, selector: "valtimo-object-management-modal", inputs: { prefillObject$: "prefillObject$" }, viewQueries: [{ propertyName: "objectManagementModal", first: true, predicate: ["objectManagementModal"], descendants: true }], 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\n<v-modal #objectManagementModal *ngIf=\"{\n disabled: disabled$ | async,\n valid: valid$ | async,\n modalType: modalType$ | async,\n prefillObject: prefillObject$ | async\n } as obs\">\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{ (obs.modalType === 'add' ? 'objectManagement.createObjecttype' : 'objectManagement.editObjecttype') | translate }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"form; context: {prefillObject: obs.prefillObject, modalType: obs.modalType}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button (clickEvent)=\"save()\" [disabled]=\"obs.disabled || !obs.valid\" mdiIcon=\"plus\" type=\"success\">\n {{ (obs.modalType === 'add' ? 'objectManagement.add' : 'objectManagement.edit') | translate }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #form let-prefillObject=\"prefillObject\" let-modalType=\"modalType\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input *ngIf=\"modalType === 'edit'\"\n hidden\n [disabled]=\"true\"\n [defaultValue]=\"prefillObject?.id\"\n name=\"id\"\n ></v-input>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.title' | translate\"\n [tooltip]=\"'objectManagement.tooltips.title' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.title\"\n name=\"title\"\n ></v-input>\n\n <ng-container *ngIf=\"{\n connectionInstances: configurationInstances$ | async,\n objectsApiConfigurations: objectsApiConfigurations$ | async,\n objecttypesApiConfigurations: objecttypesApiConfigurations$ | async\n } as objectObs\"\n >\n <v-select\n [items]=\"objectObs.objectsApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objectenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objects' | translate\"\n [defaultSelectionId]=\"prefillObject?.objectenApiPluginConfigurationId\"\n [required]=\"true\"\n ></v-select>\n\n <v-select\n [items]=\"objectObs.objecttypesApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objecttypenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objecttypes' | translate\"\n [defaultSelectionId]=\"prefillObject?.objecttypenApiPluginConfigurationId\"\n [required]=\"true\"\n (selectedChange)=\"selectObjectType($event)\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.objecttypeId' | translate\"\n [tooltip]=\"'objectManagement.tooltips.objecttypeId' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.objecttypeId\"\n name=\"objecttypeId\"\n ></v-input>\n\n <ng-container *ngIf=\"{formDefinitions: formDefinitions$ | async} as formObs\">\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionView\"\n [title]=\"'objectManagement.labels.formDefinitionView' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionView' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionView\"\n ></v-select>\n\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionEdit\"\n [title]=\"'objectManagement.labels.formDefinitionEdit' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionEdit' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionEdit\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n type=\"checkbox\"\n [title]=\"'objectManagement.labels.showInDataMenu' | translate\"\n [tooltip]=\"'objectManagement.tooltips.showInDataMenu' | translate\"\n name=\"showInDataMenu\"\n [defaultValue]=\"prefillObject?.showInDataMenu\"\n ></v-input>\n </v-form>\n </ng-container>\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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "component", type: i5.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "component", type: i5.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { kind: "component", type: i5.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i5.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$"], outputs: ["valueChange"] }, { kind: "component", type: i5.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "clearable", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder"], outputs: ["selectedChange", "clear"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslatePipe, name: "translate" }] });
316
+ ObjectManagementModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModalComponent, deps: [{ token: ObjectManagementStateService }, { token: ObjectManagementService }, { token: i3.FormManagementService }, { token: i4$1.PluginManagementService }, { token: i5.ModalService }], target: i0.ɵɵFactoryTarget.Component });
317
+ ObjectManagementModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementModalComponent, selector: "valtimo-object-management-modal", inputs: { prefillObject$: "prefillObject$" }, viewQueries: [{ propertyName: "objectManagementModal", first: true, predicate: ["objectManagementModal"], descendants: true }], 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\n<v-modal\n #objectManagementModal\n *ngIf=\"{\n disabled: disabled$ | async,\n valid: valid$ | async,\n modalType: modalType$ | async,\n prefillObject: prefillObject$ | async\n } as obs\"\n>\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{\n (obs.modalType === 'add'\n ? 'objectManagement.createObjecttype'\n : 'objectManagement.editObjecttype'\n ) | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container\n *ngTemplateOutlet=\"\n form;\n context: {prefillObject: obs.prefillObject, modalType: obs.modalType}\n \"\n ></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"plus\"\n type=\"success\"\n >\n {{\n (obs.modalType === 'add' ? 'objectManagement.add' : 'objectManagement.edit') | translate\n }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #form let-prefillObject=\"prefillObject\" let-modalType=\"modalType\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n *ngIf=\"modalType === 'edit'\"\n hidden\n [disabled]=\"true\"\n [defaultValue]=\"prefillObject?.id\"\n name=\"id\"\n ></v-input>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.title' | translate\"\n [tooltip]=\"'objectManagement.tooltips.title' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.title\"\n name=\"title\"\n ></v-input>\n\n <ng-container\n *ngIf=\"{\n connectionInstances: configurationInstances$ | async,\n objectsApiConfigurations: objectsApiConfigurations$ | async,\n objecttypesApiConfigurations: objecttypesApiConfigurations$ | async\n } as objectObs\"\n >\n <v-select\n [items]=\"objectObs.objectsApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objectenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objects' | translate\"\n [defaultSelectionId]=\"prefillObject?.objectenApiPluginConfigurationId\"\n [required]=\"true\"\n ></v-select>\n\n <v-select\n [items]=\"objectObs.objecttypesApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objecttypenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objecttypes' | translate\"\n [defaultSelectionId]=\"prefillObject?.objecttypenApiPluginConfigurationId\"\n [required]=\"true\"\n (selectedChange)=\"selectObjectType($event)\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.objecttypeId' | translate\"\n [tooltip]=\"'objectManagement.tooltips.objecttypeId' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.objecttypeId\"\n name=\"objecttypeId\"\n ></v-input>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.objecttypeVersion' | translate\"\n [tooltip]=\"'objectManagement.tooltips.objecttypeVersion' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.objecttypeVersion\"\n [min]=\"1\"\n type=\"number\"\n name=\"objecttypeVersion\"\n ></v-input>\n\n <ng-container *ngIf=\"{formDefinitions: formDefinitions$ | async} as formObs\">\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionView\"\n [title]=\"'objectManagement.labels.formDefinitionView' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionView' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionView\"\n ></v-select>\n\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionEdit\"\n [title]=\"'objectManagement.labels.formDefinitionEdit' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionEdit' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionEdit\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n type=\"checkbox\"\n [title]=\"'objectManagement.labels.showInDataMenu' | translate\"\n [tooltip]=\"'objectManagement.tooltips.showInDataMenu' | translate\"\n name=\"showInDataMenu\"\n [defaultValue]=\"prefillObject?.showInDataMenu\"\n ></v-input>\n </v-form>\n </ng-container>\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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "component", type: i5.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "component", type: i5.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { kind: "component", type: i5.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i5.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$"], outputs: ["valueChange"] }, { kind: "component", type: i5.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "clearable", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder"], outputs: ["selectedChange", "clear"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
285
318
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModalComponent, decorators: [{
286
319
  type: Component,
287
- args: [{ selector: 'valtimo-object-management-modal', 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\n<v-modal #objectManagementModal *ngIf=\"{\n disabled: disabled$ | async,\n valid: valid$ | async,\n modalType: modalType$ | async,\n prefillObject: prefillObject$ | async\n } as obs\">\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{ (obs.modalType === 'add' ? 'objectManagement.createObjecttype' : 'objectManagement.editObjecttype') | translate }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"form; context: {prefillObject: obs.prefillObject, modalType: obs.modalType}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button (clickEvent)=\"save()\" [disabled]=\"obs.disabled || !obs.valid\" mdiIcon=\"plus\" type=\"success\">\n {{ (obs.modalType === 'add' ? 'objectManagement.add' : 'objectManagement.edit') | translate }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #form let-prefillObject=\"prefillObject\" let-modalType=\"modalType\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input *ngIf=\"modalType === 'edit'\"\n hidden\n [disabled]=\"true\"\n [defaultValue]=\"prefillObject?.id\"\n name=\"id\"\n ></v-input>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.title' | translate\"\n [tooltip]=\"'objectManagement.tooltips.title' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.title\"\n name=\"title\"\n ></v-input>\n\n <ng-container *ngIf=\"{\n connectionInstances: configurationInstances$ | async,\n objectsApiConfigurations: objectsApiConfigurations$ | async,\n objecttypesApiConfigurations: objecttypesApiConfigurations$ | async\n } as objectObs\"\n >\n <v-select\n [items]=\"objectObs.objectsApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objectenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objects' | translate\"\n [defaultSelectionId]=\"prefillObject?.objectenApiPluginConfigurationId\"\n [required]=\"true\"\n ></v-select>\n\n <v-select\n [items]=\"objectObs.objecttypesApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objecttypenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objecttypes' | translate\"\n [defaultSelectionId]=\"prefillObject?.objecttypenApiPluginConfigurationId\"\n [required]=\"true\"\n (selectedChange)=\"selectObjectType($event)\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.objecttypeId' | translate\"\n [tooltip]=\"'objectManagement.tooltips.objecttypeId' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.objecttypeId\"\n name=\"objecttypeId\"\n ></v-input>\n\n <ng-container *ngIf=\"{formDefinitions: formDefinitions$ | async} as formObs\">\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionView\"\n [title]=\"'objectManagement.labels.formDefinitionView' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionView' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionView\"\n ></v-select>\n\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionEdit\"\n [title]=\"'objectManagement.labels.formDefinitionEdit' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionEdit' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionEdit\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n type=\"checkbox\"\n [title]=\"'objectManagement.labels.showInDataMenu' | translate\"\n [tooltip]=\"'objectManagement.tooltips.showInDataMenu' | translate\"\n name=\"showInDataMenu\"\n [defaultValue]=\"prefillObject?.showInDataMenu\"\n ></v-input>\n </v-form>\n </ng-container>\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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"] }]
288
- }], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i3.FormManagementService }, { type: i4.PluginManagementService }, { type: i5.ModalService }]; }, propDecorators: { objectManagementModal: [{
320
+ args: [{ selector: 'valtimo-object-management-modal', 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\n<v-modal\n #objectManagementModal\n *ngIf=\"{\n disabled: disabled$ | async,\n valid: valid$ | async,\n modalType: modalType$ | async,\n prefillObject: prefillObject$ | async\n } as obs\"\n>\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{\n (obs.modalType === 'add'\n ? 'objectManagement.createObjecttype'\n : 'objectManagement.editObjecttype'\n ) | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container\n *ngTemplateOutlet=\"\n form;\n context: {prefillObject: obs.prefillObject, modalType: obs.modalType}\n \"\n ></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"plus\"\n type=\"success\"\n >\n {{\n (obs.modalType === 'add' ? 'objectManagement.add' : 'objectManagement.edit') | translate\n }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #form let-prefillObject=\"prefillObject\" let-modalType=\"modalType\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n *ngIf=\"modalType === 'edit'\"\n hidden\n [disabled]=\"true\"\n [defaultValue]=\"prefillObject?.id\"\n name=\"id\"\n ></v-input>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.title' | translate\"\n [tooltip]=\"'objectManagement.tooltips.title' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.title\"\n name=\"title\"\n ></v-input>\n\n <ng-container\n *ngIf=\"{\n connectionInstances: configurationInstances$ | async,\n objectsApiConfigurations: objectsApiConfigurations$ | async,\n objecttypesApiConfigurations: objecttypesApiConfigurations$ | async\n } as objectObs\"\n >\n <v-select\n [items]=\"objectObs.objectsApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objectenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objects' | translate\"\n [defaultSelectionId]=\"prefillObject?.objectenApiPluginConfigurationId\"\n [required]=\"true\"\n ></v-select>\n\n <v-select\n [items]=\"objectObs.objecttypesApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objecttypenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objecttypes' | translate\"\n [defaultSelectionId]=\"prefillObject?.objecttypenApiPluginConfigurationId\"\n [required]=\"true\"\n (selectedChange)=\"selectObjectType($event)\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.objecttypeId' | translate\"\n [tooltip]=\"'objectManagement.tooltips.objecttypeId' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.objecttypeId\"\n name=\"objecttypeId\"\n ></v-input>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.objecttypeVersion' | translate\"\n [tooltip]=\"'objectManagement.tooltips.objecttypeVersion' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.objecttypeVersion\"\n [min]=\"1\"\n type=\"number\"\n name=\"objecttypeVersion\"\n ></v-input>\n\n <ng-container *ngIf=\"{formDefinitions: formDefinitions$ | async} as formObs\">\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionView\"\n [title]=\"'objectManagement.labels.formDefinitionView' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionView' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionView\"\n ></v-select>\n\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionEdit\"\n [title]=\"'objectManagement.labels.formDefinitionEdit' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionEdit' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionEdit\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n type=\"checkbox\"\n [title]=\"'objectManagement.labels.showInDataMenu' | translate\"\n [tooltip]=\"'objectManagement.tooltips.showInDataMenu' | translate\"\n name=\"showInDataMenu\"\n [defaultValue]=\"prefillObject?.showInDataMenu\"\n ></v-input>\n </v-form>\n </ng-container>\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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"] }]
321
+ }], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i3.FormManagementService }, { type: i4$1.PluginManagementService }, { type: i5.ModalService }]; }, propDecorators: { objectManagementModal: [{
289
322
  type: ViewChild,
290
323
  args: ['objectManagementModal']
291
324
  }], prefillObject$: [{
@@ -311,26 +344,30 @@ class ObjectManagementDetailComponent {
311
344
  constructor(objectManagementService, objectManagementState) {
312
345
  this.objectManagementService = objectManagementService;
313
346
  this.objectManagementState = objectManagementState;
347
+ this.loading$ = new BehaviorSubject(false);
314
348
  }
315
349
  downloadDefinition(object) {
316
- const dataString = 'data:text/json;charset=utf-8,' +
317
- encodeURIComponent(JSON.stringify(object, null, 2));
350
+ this.loading$.next(true);
351
+ const dataString = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(object, null, 2));
318
352
  console.log(dataString);
319
353
  const downloadAnchorElement = document.getElementById('downloadAnchorElement');
320
354
  downloadAnchorElement.setAttribute('href', dataString);
321
355
  downloadAnchorElement.setAttribute('download', `${object.id}.json`);
322
356
  downloadAnchorElement.click();
357
+ this.loading$.next(false);
323
358
  }
324
359
  showEditModal() {
360
+ this.loading$.next(true);
325
361
  this.objectManagementState.setModalType('edit');
326
362
  this.objectManagementState.showModal();
363
+ this.loading$.next(false);
327
364
  }
328
365
  }
329
366
  ObjectManagementDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementDetailComponent, deps: [{ token: ObjectManagementService }, { token: ObjectManagementStateService }], target: i0.ɵɵFactoryTarget.Component });
330
- ObjectManagementDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementDetailComponent, selector: "valtimo-object-management-detail", inputs: { object$: "object$" }, 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<div id=\"object-datail-content\" class=\"pt-0\" *ngIf=\"{\n object: object$ | async\n} as obs\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {object: obs.object}\"></ng-container>\n <div class=\"clearfix\"></div>\n <ng-container *ngTemplateOutlet=\"widget ; context: {object: obs.object}\"></ng-container>\n</div>\n\n<ng-template #buttons let-object=\"object\">\n <div class=\"btn-group mt-m3px mb-3 pr-2 float-right\">\n <button (click)=\"downloadDefinition(object)\" class=\"btn btn-primary btn-space\">\n <i class=\"icon mdi mdi-download mr-1\"></i>\n {{ 'objectManagement.download' | translate }}\n </button>\n <a id=\"downloadAnchorElement\" class=\"d-none\"></a>\n <button (click)=\"showEditModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-pencil mr-1\"></i>\n {{ 'objectManagement.editObjecttype' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #widget let-object=\"object\">\n <valtimo-widget>\n <div class=\"row bg-white mt-5 mb-2 pl-2 pr-2\">\n <div class=\"col-5 bg-red\">\n <textarea class=\"w-100 object-schema\" disabled rows=\"25\">{{ object | json }}</textarea>\n </div>\n </div>\n </valtimo-widget>\n</ng-template>\n\n<valtimo-object-management-modal [prefillObject$]=\"object$\"></valtimo-object-management-modal>\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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: ObjectManagementModalComponent, selector: "valtimo-object-management-modal", inputs: ["prefillObject$"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.JsonPipe, name: "json" }, { kind: "pipe", type: i6$1.TranslatePipe, name: "translate" }] });
367
+ ObjectManagementDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementDetailComponent, selector: "valtimo-object-management-detail", inputs: { object$: "object$" }, 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<div\n id=\"object-datail-content\"\n class=\"pt-0\"\n *ngIf=\"{\n object: object$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <ng-container\n *ngTemplateOutlet=\"buttons; context: {object: obs.object, loading: obs.loading}\"\n ></ng-container>\n <div class=\"clearfix\"></div>\n <ng-container\n *ngTemplateOutlet=\"widget; context: {object: obs.object, loading: obs.loading}\"\n ></ng-container>\n</div>\n\n<ng-template #buttons let-object=\"object\" let-loading=\"loading\">\n <div class=\"btn-group mt-m3px mb-3 pr-2 float-right\">\n <button\n (click)=\"downloadDefinition(object)\"\n ibmButton=\"secondary\"\n size=\"md\"\n [disabled]=\"loading\"\n class=\"ml-3\"\n >\n {{ 'objectManagement.download' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"download\" size=\"16\"></svg>\n </button>\n <a id=\"downloadAnchorElement\" class=\"d-none\"></a>\n <button\n (click)=\"showEditModal()\"\n ibmButton=\"primary\"\n size=\"md\"\n [disabled]=\"loading\"\n class=\"ml-3\"\n >\n {{ 'objectManagement.editObjecttype' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"edit\" size=\"16\"></svg>\n </button>\n </div>\n</ng-template>\n\n<ng-template #widget let-object=\"object\">\n <valtimo-widget>\n <div class=\"row bg-white mt-5 mb-2 pl-2 pr-2\">\n <div class=\"col-5 bg-red\">\n <textarea class=\"w-100 object-schema\" disabled rows=\"25\">{{ object | json }}</textarea>\n </div>\n </div>\n </valtimo-widget>\n</ng-template>\n\n<valtimo-object-management-modal [prefillObject$]=\"object$\"></valtimo-object-management-modal>\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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i7.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "directive", type: i8.Button, selector: "[ibmButton]", inputs: ["ibmButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i8.IconDirective, selector: "[ibmIcon]", inputs: ["ibmIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: ObjectManagementModalComponent, selector: "valtimo-object-management-modal", inputs: ["prefillObject$"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.JsonPipe, name: "json" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
331
368
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementDetailComponent, decorators: [{
332
369
  type: Component,
333
- args: [{ selector: 'valtimo-object-management-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<div id=\"object-datail-content\" class=\"pt-0\" *ngIf=\"{\n object: object$ | async\n} as obs\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {object: obs.object}\"></ng-container>\n <div class=\"clearfix\"></div>\n <ng-container *ngTemplateOutlet=\"widget ; context: {object: obs.object}\"></ng-container>\n</div>\n\n<ng-template #buttons let-object=\"object\">\n <div class=\"btn-group mt-m3px mb-3 pr-2 float-right\">\n <button (click)=\"downloadDefinition(object)\" class=\"btn btn-primary btn-space\">\n <i class=\"icon mdi mdi-download mr-1\"></i>\n {{ 'objectManagement.download' | translate }}\n </button>\n <a id=\"downloadAnchorElement\" class=\"d-none\"></a>\n <button (click)=\"showEditModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-pencil mr-1\"></i>\n {{ 'objectManagement.editObjecttype' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #widget let-object=\"object\">\n <valtimo-widget>\n <div class=\"row bg-white mt-5 mb-2 pl-2 pr-2\">\n <div class=\"col-5 bg-red\">\n <textarea class=\"w-100 object-schema\" disabled rows=\"25\">{{ object | json }}</textarea>\n </div>\n </div>\n </valtimo-widget>\n</ng-template>\n\n<valtimo-object-management-modal [prefillObject$]=\"object$\"></valtimo-object-management-modal>\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"] }]
370
+ args: [{ selector: 'valtimo-object-management-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<div\n id=\"object-datail-content\"\n class=\"pt-0\"\n *ngIf=\"{\n object: object$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <ng-container\n *ngTemplateOutlet=\"buttons; context: {object: obs.object, loading: obs.loading}\"\n ></ng-container>\n <div class=\"clearfix\"></div>\n <ng-container\n *ngTemplateOutlet=\"widget; context: {object: obs.object, loading: obs.loading}\"\n ></ng-container>\n</div>\n\n<ng-template #buttons let-object=\"object\" let-loading=\"loading\">\n <div class=\"btn-group mt-m3px mb-3 pr-2 float-right\">\n <button\n (click)=\"downloadDefinition(object)\"\n ibmButton=\"secondary\"\n size=\"md\"\n [disabled]=\"loading\"\n class=\"ml-3\"\n >\n {{ 'objectManagement.download' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"download\" size=\"16\"></svg>\n </button>\n <a id=\"downloadAnchorElement\" class=\"d-none\"></a>\n <button\n (click)=\"showEditModal()\"\n ibmButton=\"primary\"\n size=\"md\"\n [disabled]=\"loading\"\n class=\"ml-3\"\n >\n {{ 'objectManagement.editObjecttype' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"edit\" size=\"16\"></svg>\n </button>\n </div>\n</ng-template>\n\n<ng-template #widget let-object=\"object\">\n <valtimo-widget>\n <div class=\"row bg-white mt-5 mb-2 pl-2 pr-2\">\n <div class=\"col-5 bg-red\">\n <textarea class=\"w-100 object-schema\" disabled rows=\"25\">{{ object | json }}</textarea>\n </div>\n </div>\n </valtimo-widget>\n</ng-template>\n\n<valtimo-object-management-modal [prefillObject$]=\"object$\"></valtimo-object-management-modal>\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"] }]
334
371
  }], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: ObjectManagementStateService }]; }, propDecorators: { object$: [{
335
372
  type: Input
336
373
  }] } });
@@ -350,16 +387,683 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
350
387
  * See the License for the specific language governing permissions and
351
388
  * limitations under the License.
352
389
  */
353
- class ObjectManagementListTabComponent {
354
- constructor() { }
390
+ class ObjectManagementListColumnsComponent {
391
+ constructor(objectManagementService, route, translateService, configService, sanitizer) {
392
+ this.objectManagementService = objectManagementService;
393
+ this.route = route;
394
+ this.translateService = translateService;
395
+ this.configService = configService;
396
+ this.sanitizer = sanitizer;
397
+ this.downloadName$ = new BehaviorSubject('');
398
+ this.downloadUrl$ = new BehaviorSubject(undefined);
399
+ this.loading$ = new BehaviorSubject(true);
400
+ this.currentModalType$ = new BehaviorSubject('create');
401
+ this.showModal$ = new BehaviorSubject(false);
402
+ this.modalShowing$ = this.showModal$.pipe(delay(250));
403
+ this.disableInput$ = new BehaviorSubject(false);
404
+ this.showDeleteModal$ = new Subject();
405
+ this.deleteRowIndex$ = new BehaviorSubject(0);
406
+ this.defaultEnumValues$ = new BehaviorSubject(undefined);
407
+ this.INVALID_KEY = 'invalid';
408
+ this.formGroup = new FormGroup({
409
+ title: new FormControl(''),
410
+ key: new FormControl('', Validators.required),
411
+ path: new FormControl('', Validators.required),
412
+ dateFormat: new FormControl(''),
413
+ displayType: new FormControl({
414
+ key: this.INVALID_KEY,
415
+ }),
416
+ sortable: new FormControl(false),
417
+ defaultSort: new FormControl({
418
+ key: this.INVALID_KEY,
419
+ }),
420
+ enum: new FormControl([]),
421
+ });
422
+ this.DISPLAY_TYPES = [
423
+ 'string',
424
+ 'date',
425
+ 'boolean',
426
+ 'enum',
427
+ 'arrayCount',
428
+ 'underscoresToSpaces',
429
+ ];
430
+ this.COLUMNS = [
431
+ {
432
+ viewType: 'string',
433
+ sortable: false,
434
+ propertyName: 'title',
435
+ translationKey: 'title',
436
+ },
437
+ {
438
+ viewType: 'string',
439
+ sortable: false,
440
+ propertyName: 'key',
441
+ translationKey: 'key',
442
+ },
443
+ {
444
+ viewType: 'string',
445
+ sortable: false,
446
+ propertyName: 'path',
447
+ translationKey: 'path',
448
+ },
449
+ {
450
+ viewType: 'string',
451
+ sortable: false,
452
+ propertyName: 'displayType',
453
+ translationKey: 'displayType',
454
+ },
455
+ {
456
+ viewType: 'string',
457
+ sortable: false,
458
+ propertyName: 'displayTypeParameters',
459
+ translationKey: 'displayTypeParameters',
460
+ },
461
+ {
462
+ viewType: 'string',
463
+ sortable: false,
464
+ propertyName: 'sortable',
465
+ translationKey: 'sortable',
466
+ },
467
+ {
468
+ viewType: 'string',
469
+ sortable: false,
470
+ propertyName: 'defaultSort',
471
+ translationKey: 'defaultSort',
472
+ },
473
+ ];
474
+ this.cachedObjectManagementListColumns = [];
475
+ this.refreshObjectManagementListColumns$ = new BehaviorSubject(null);
476
+ this.objectManagementFields$ = this.translateService
477
+ .stream('key')
478
+ .pipe(map(() => this.COLUMNS.map(column => (Object.assign(Object.assign({ key: column.propertyName, label: this.translateService.instant(`listColumn.${column.translationKey}`), sortable: column.sortable }, (column.viewType && { viewType: column.viewType })), (column.enum && { enum: column.enum }))))));
479
+ this.objectId$ = this.route.params.pipe(map(params => params.id || ''), filter(objectId => !!objectId));
480
+ this.objectManagementListColumns$ = combineLatest([
481
+ this.objectId$,
482
+ this.refreshObjectManagementListColumns$,
483
+ ]).pipe(switchMap(([objectId]) => this.objectManagementService.getSearchList(objectId)), tap(objectManagementListColumns => {
484
+ this.objectId$.pipe(take(1)).subscribe(objectId => {
485
+ if (objectManagementListColumns &&
486
+ Array.isArray(objectManagementListColumns) &&
487
+ objectManagementListColumns.length > 0) {
488
+ this.setDownload(objectId, objectManagementListColumns);
489
+ }
490
+ });
491
+ }), tap(objectManagementListColumns => {
492
+ this.cachedObjectManagementListColumns = objectManagementListColumns;
493
+ this.loading$.next(false);
494
+ this.enableInput();
495
+ }));
496
+ this.translatedObjectManagementListColumns$ = combineLatest([this.objectManagementListColumns$, this.translateService.stream('key')]).pipe(map(([columns]) => columns.map(column => {
497
+ var _a;
498
+ return (Object.assign(Object.assign({}, column), { title: column.title || '-', sortable: column.sortable
499
+ ? this.translateService.instant('listColumn.sortableYes')
500
+ : this.translateService.instant('listColumn.sortableNo'), defaultSort: (column.defaultSort === 'ASC' &&
501
+ this.translateService.instant('listColumn.sortableAsc')) ||
502
+ (column.defaultSort === 'DESC' &&
503
+ this.translateService.instant('listColumn.sortableDesc')) ||
504
+ '-', displayType: this.translateService.instant(`listColumnDisplayType.${(_a = column === null || column === void 0 ? void 0 : column.displayType) === null || _a === void 0 ? void 0 : _a.type}`), displayTypeParameters: this.getDisplayTypeParametersView(column.displayType.displayTypeParameters) }));
505
+ })));
506
+ this.disableDefaultSort$ = combineLatest([
507
+ this.currentModalType$,
508
+ this.formGroup.valueChanges,
509
+ ]).pipe(map(([currentModalType]) => currentModalType === 'create' &&
510
+ this.cachedObjectManagementListColumns.find(column => !!column.defaultSort)), startWith(false));
511
+ this.showDateFormat$ = this.formGroup.valueChanges.pipe(map(formValues => { var _a; return ((_a = formValues.displayType) === null || _a === void 0 ? void 0 : _a.key) === this.DISPLAY_TYPES[1]; }), tap(showDateFormat => {
512
+ if (showDateFormat === false && !!this.formGroup.value.dateFormat) {
513
+ this.formGroup.patchValue({ dateFormat: '' });
514
+ }
515
+ }), startWith(false));
516
+ this.showEnum$ = this.formGroup.valueChanges.pipe(map(formValues => {
517
+ var _a, _b;
518
+ return !!(((_a = formValues.displayType) === null || _a === void 0 ? void 0 : _a.key) === this.DISPLAY_TYPES[3] ||
519
+ ((_b = formValues.displayType) === null || _b === void 0 ? void 0 : _b.key) === this.DISPLAY_TYPES[2]);
520
+ }), tap(showEnum => {
521
+ const enumValue = this.formGroup.value.enum;
522
+ if (showEnum === false && Array.isArray(enumValue) && enumValue.length > 0) {
523
+ this.formGroup.patchValue({ enum: [] });
524
+ }
525
+ }), startWith(false));
526
+ this.isYesNo$ = this.formGroup.valueChanges.pipe(map(formValues => { var _a; return ((_a = formValues.displayType) === null || _a === void 0 ? void 0 : _a.key) === this.DISPLAY_TYPES[2]; }));
527
+ this.selectedViewTypeItemIndex$ = new BehaviorSubject(0);
528
+ this.viewTypeItems$ = combineLatest([
529
+ this.selectedViewTypeItemIndex$,
530
+ this.translateService.stream('key'),
531
+ ]).pipe(map(([selectedViewTypeItemIndex]) => [
532
+ {
533
+ content: this.translateService.instant(`listColumnDisplayType.select`),
534
+ key: this.INVALID_KEY,
535
+ },
536
+ ...this.DISPLAY_TYPES.map(type => ({
537
+ content: this.translateService.instant(`listColumnDisplayType.${type}`),
538
+ key: type,
539
+ })),
540
+ ].map((item, index) => (Object.assign(Object.assign({}, item), { selected: index === selectedViewTypeItemIndex })))));
541
+ this.selectedSortItemIndex$ = new BehaviorSubject(0);
542
+ this.sortItems$ = combineLatest([
543
+ this.selectedSortItemIndex$,
544
+ this.translateService.stream('key'),
545
+ ]).pipe(map(([selectedSortItemIndex]) => [
546
+ {
547
+ content: this.translateService.instant(`listColumn.selectDefaultSort`),
548
+ key: this.INVALID_KEY,
549
+ },
550
+ {
551
+ content: this.translateService.instant(`listColumn.sortableAsc`),
552
+ key: 'ASC',
553
+ },
554
+ {
555
+ content: this.translateService.instant(`listColumn.sortableDesc`),
556
+ key: 'DESC',
557
+ },
558
+ ].map((item, index) => (Object.assign(Object.assign({}, item), { selected: index === selectedSortItemIndex })))));
559
+ this.validKey$ = combineLatest([this.formGroup.valueChanges, this.currentModalType$]).pipe(map(([formValues, currentModalType]) => {
560
+ const existingKeys = this.cachedObjectManagementListColumns.map(column => column.key);
561
+ return currentModalType === 'create' ? !existingKeys.includes(formValues.key) : true;
562
+ }), startWith(false));
563
+ this.valid$ = combineLatest([this.formGroup.valueChanges, this.validKey$]).pipe(map(([formValues, validKey]) => {
564
+ var _a, _b;
565
+ return !!(((_a = formValues.displayType) === null || _a === void 0 ? void 0 : _a.key) !== this.INVALID_KEY &&
566
+ formValues.path &&
567
+ validKey &&
568
+ (formValues.displayType.key === 'enum' ? ((_b = formValues.enum) === null || _b === void 0 ? void 0 : _b.length) > 0 : true));
569
+ }), startWith(false));
570
+ }
571
+ openModal(modalType) {
572
+ this.showModal$.next(true);
573
+ this.currentModalType$.next(modalType);
574
+ if (modalType === 'create') {
575
+ this.formGroup.controls['key'].enable();
576
+ this.resetFormGroup();
577
+ }
578
+ else if (modalType === 'edit') {
579
+ this.formGroup.controls['key'].disable();
580
+ }
581
+ }
582
+ closeModal() {
583
+ this.showModal$.next(false);
584
+ }
585
+ deleteRow(searchListColumnRowIndex, clickEvent) {
586
+ clickEvent.stopPropagation();
587
+ this.showDeleteModal$.next(true);
588
+ this.deleteRowIndex$.next(searchListColumnRowIndex);
589
+ }
590
+ deleteRowConfirmation(searchListColumnRowIndex) {
591
+ const columnKey = this.getColumnKey(searchListColumnRowIndex);
592
+ if (columnKey) {
593
+ this.disableInput();
594
+ this.objectId$
595
+ .pipe(take(1), switchMap(objectId => this.objectManagementService.deleteSearchList(objectId, columnKey)), tap(() => this.refreshObjectManagementListColumns()), catchError(() => {
596
+ this.enableInput();
597
+ return of(null);
598
+ }))
599
+ .subscribe();
600
+ }
601
+ }
602
+ getColumnKey(searchListColumnRowIndex) {
603
+ var _a;
604
+ return (_a = this.cachedObjectManagementListColumns[searchListColumnRowIndex]) === null || _a === void 0 ? void 0 : _a.key;
605
+ }
606
+ moveRow(searchListColumnRowIndex, moveUp, clickEvent, objectId) {
607
+ const objectManagementListColumns = [...this.cachedObjectManagementListColumns];
608
+ const searchListColumnRow = objectManagementListColumns[searchListColumnRowIndex];
609
+ clickEvent.stopPropagation();
610
+ // TODO:
611
+ }
612
+ saveCasListColumns() {
613
+ this.disableInput();
614
+ this.currentModalType$.pipe(take(1)).subscribe(currentModalType => {
615
+ if (currentModalType === 'create') {
616
+ this.addColumn();
617
+ }
618
+ else {
619
+ this.updateColumn();
620
+ }
621
+ });
622
+ }
623
+ enumValueChange(value) {
624
+ this.formGroup.patchValue({ enum: value });
625
+ }
626
+ columnRowClicked(row) {
627
+ this.resetFormGroup();
628
+ combineLatest([this.viewTypeItems$, this.sortItems$])
629
+ .pipe(take(1))
630
+ .subscribe(([viewTypeItems, sortItems]) => {
631
+ var _a, _b, _c, _d;
632
+ const column = this.cachedObjectManagementListColumns.find(cachedColumn => cachedColumn.key === row.key);
633
+ const viewTypeItem = viewTypeItems.find(item => item.key === column.displayType.type);
634
+ const viewTypeItemIndex = viewTypeItems.findIndex(item => item.key === column.displayType.type);
635
+ const sortItem = sortItems.find(item => item.key === column.defaultSort);
636
+ const sortItemIndex = sortItems.findIndex(item => item.key === column.defaultSort);
637
+ const enumValues = (_b = (_a = column === null || column === void 0 ? void 0 : column.displayType) === null || _a === void 0 ? void 0 : _a.displayTypeParameters) === null || _b === void 0 ? void 0 : _b.enum;
638
+ const mappedEnumValues = [];
639
+ const columnDateFormat = (_d = (_c = column === null || column === void 0 ? void 0 : column.displayType) === null || _c === void 0 ? void 0 : _c.displayTypeParameters) === null || _d === void 0 ? void 0 : _d.dateFormat;
640
+ this.selectedViewTypeItemIndex$.next(viewTypeItemIndex);
641
+ if (sortItem) {
642
+ this.selectedSortItemIndex$.next(sortItemIndex);
643
+ }
644
+ if (enumValues) {
645
+ Object.keys(enumValues).forEach(key => {
646
+ mappedEnumValues.push({ key, value: enumValues[key] });
647
+ });
648
+ this.defaultEnumValues$.next(mappedEnumValues);
649
+ }
650
+ else {
651
+ this.defaultEnumValues$.next([{ key: '', value: '' }]);
652
+ }
653
+ this.formGroup.patchValue(Object.assign({ key: column.key, title: column.title, path: column.path, sortable: column.sortable,
654
+ // @ts-ignore
655
+ displayType: Object.assign({}, viewTypeItem),
656
+ // @ts-ignore
657
+ defaultSort: sortItem ? Object.assign({}, sortItem) : Object.assign({}, sortItems[0]) }, (columnDateFormat && {
658
+ dateFormat: columnDateFormat,
659
+ })));
660
+ this.openModal('edit');
661
+ });
662
+ }
663
+ updateObjectManagementListColumn(objectId, listColumn) {
664
+ this.disableInput();
665
+ this.objectManagementService
666
+ .putSearchList(objectId, this.formGroup.value.key, listColumn)
667
+ .pipe(tap(() => {
668
+ this.refreshObjectManagementListColumns();
669
+ localStorage.setItem(`list-search-${objectId}`, null);
670
+ }), catchError(() => {
671
+ this.enableInput();
672
+ return of(null);
673
+ }))
674
+ .subscribe();
675
+ }
676
+ addColumn() {
677
+ const formValue = this.formGroup.value;
678
+ this.objectId$
679
+ .pipe(take(1), switchMap(objectId => this.objectManagementService.postSearchList(objectId, this.mapFormValuesToColumn(formValue))), tap(() => {
680
+ this.closeModal();
681
+ this.refreshObjectManagementListColumns();
682
+ }), catchError(() => {
683
+ this.enableInput();
684
+ return of(null);
685
+ }))
686
+ .subscribe();
687
+ }
688
+ getDisplayTypeParametersView(displayTypeParameters) {
689
+ if (displayTypeParameters === null || displayTypeParameters === void 0 ? void 0 : displayTypeParameters.dateFormat) {
690
+ return displayTypeParameters.dateFormat;
691
+ }
692
+ else if (displayTypeParameters === null || displayTypeParameters === void 0 ? void 0 : displayTypeParameters.enum) {
693
+ return Object.keys(displayTypeParameters.enum).reduce((acc, curr) => {
694
+ const keyValuePairString = `${curr}: ${displayTypeParameters.enum[curr]}`;
695
+ if (!acc) {
696
+ return `${keyValuePairString}`;
697
+ }
698
+ else {
699
+ return `${acc}, ${keyValuePairString}`;
700
+ }
701
+ }, '');
702
+ }
703
+ else {
704
+ return '-';
705
+ }
706
+ }
707
+ updateColumn() {
708
+ this.objectId$
709
+ .pipe(take(1), switchMap(objectId => this.objectManagementService.putSearchList(objectId, this.formGroup.value.key, this.mapFormValuesToColumn(this.formGroup.value))), tap(() => {
710
+ this.closeModal();
711
+ this.refreshObjectManagementListColumns();
712
+ }), catchError(() => {
713
+ this.enableInput();
714
+ return of(null);
715
+ }))
716
+ .subscribe();
717
+ }
718
+ setDownload(objectId, ObjectManagementListColumns) {
719
+ this.downloadName$.next(`${objectId}.json`);
720
+ this.downloadUrl$.next(this.sanitizer.bypassSecurityTrustUrl('data:text/json;charset=UTF-8,' +
721
+ encodeURIComponent(JSON.stringify(ObjectManagementListColumns, null, 2))));
722
+ }
723
+ disableInput() {
724
+ this.disableInput$.next(true);
725
+ this.formGroup.disable();
726
+ }
727
+ enableInput() {
728
+ this.disableInput$.next(false);
729
+ this.formGroup.enable();
730
+ }
731
+ refreshObjectManagementListColumns() {
732
+ this.refreshObjectManagementListColumns$.next(null);
733
+ }
734
+ resetFormGroup() {
735
+ this.formGroup.reset();
736
+ combineLatest([this.sortItems$, this.viewTypeItems$])
737
+ .pipe(take(1))
738
+ .subscribe(([sortItems, viewTypeItems]) => {
739
+ this.defaultEnumValues$.next([{ key: '', value: '' }]);
740
+ this.selectedViewTypeItemIndex$.next(0);
741
+ // @ts-ignore
742
+ this.formGroup.patchValue({ displayType: viewTypeItems[0] });
743
+ this.selectedSortItemIndex$.next(0);
744
+ // @ts-ignore
745
+ this.formGroup.patchValue({ defaultSort: sortItems[0] });
746
+ });
747
+ }
748
+ mapFormValuesToColumn(formValue) {
749
+ var _a, _b, _c;
750
+ return Object.assign(Object.assign({ key: formValue.key, sortable: formValue.sortable }, (((_a = formValue.defaultSort) === null || _a === void 0 ? void 0 : _a.key) !== this.INVALID_KEY && {
751
+ defaultSort: (_b = formValue.defaultSort) === null || _b === void 0 ? void 0 : _b.key,
752
+ })), { title: formValue.title || '', path: formValue.path, displayType: {
753
+ type: (_c = formValue.displayType) === null || _c === void 0 ? void 0 : _c.key,
754
+ displayTypeParameters: Object.assign(Object.assign({}, (formValue.dateFormat && { dateFormat: formValue.dateFormat })), (Array.isArray(formValue.enum) &&
755
+ formValue.enum.length > 0 && {
756
+ enum: formValue.enum.reduce((acc, curr) => (Object.assign(Object.assign({}, acc), { [curr.key]: curr.value })), {}),
757
+ })),
758
+ } });
759
+ }
355
760
  }
356
- ObjectManagementListTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
357
- ObjectManagementListTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementListTabComponent, selector: "valtimo-object-management-list-tab", inputs: { object$: "object$" }, 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<div id=\"object-list-tab-content\" class=\"pt-0\">\n <ng-container *ngTemplateOutlet=\"widget\"></ng-container>\n</div>\n\n<ng-template #widget></ng-template>\n\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 */\n"], dependencies: [{ kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListTabComponent, decorators: [{
761
+ ObjectManagementListColumnsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListColumnsComponent, deps: [{ token: ObjectManagementService }, { token: i2.ActivatedRoute }, { token: i3$1.TranslateService }, { token: i4.ConfigService }, { token: i5$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
762
+ ObjectManagementListColumnsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementListColumnsComponent, selector: "valtimo-object-management-list-columns", viewQueries: [{ propertyName: "moveRowButtonsTemplateRef", first: true, predicate: ["moveRowButtons"], descendants: true }], 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 listColumn: translatedObjectManagementListColumns$ | async,\n fields: objectManagementFields$ | async,\n objectId: objectId$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-2\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"!obs.loading; else loading\">\n <ng-container *ngIf=\"obs.listColumn?.length > 0; else noConfigWarning\">\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <a\n ibmLink\n class=\"center-link\"\n [href]=\"obs.downloadUrl\"\n [download]=\"obs.downloadName\"\n [disabled]=\"\n !obs.downloadUrl ||\n !obs.downloadName ||\n obs.listColumn?.length < 1 ||\n obs.disableInput ||\n obs.loading\n \"\n >\n {{ 'listColumn.downloadButtonText' | translate }}\n </a>\n <button\n (click)=\"openModal('create')\"\n ibmButton=\"primary\"\n size=\"md\"\n [disabled]=\"obs.loading\"\n class=\"ml-3\"\n >\n {{ 'listColumn.addButtonText' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #moveRowButtons let-index=\"index\" let-length=\"length\">\n <div\n class=\"move-row-buttons\"\n *ngIf=\"{\n disableInput: disableInput$ | async,\n objectId: objectId$ | async\n } as obs\"\n >\n <i\n class=\"mdi mdi-delete btn btn-outline-danger mr-1\"\n (click)=\"deleteRow(index, $event)\"\n [ngClass]=\"{'disabled disabled-move-row-button': obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-up-bold btn btn-outline-primary mr-1\"\n (click)=\"moveRow(index, true, $event, obs.objectId)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === 0 || obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-down-bold btn btn-outline-secondary\"\n (click)=\"moveRow(index, false, $event, obs.objectId)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === length - 1 || obs.disableInput}\"\n ></i>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-list\n [items]=\"obs.listColumn\"\n [fields]=\"obs.fields\"\n [viewMode]=\"false\"\n [header]=\"false\"\n *ngIf=\"obs.listColumn; else loading\"\n [lastColumnTemplate]=\"moveRowButtonsTemplateRef\"\n (rowClicked)=\"columnRowClicked($event)\"\n >\n </valtimo-list>\n</ng-template>\n\n<ng-template #createEditModal>\n <ibm-modal\n *ngIf=\"{\n type: currentModalType$ | async,\n show: showModal$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async,\n validKey: validKey$ | async,\n disableDefaultSort: disableDefaultSort$ | async,\n showEnum: showEnum$ | async,\n isYesNo: isYesNo$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{\n modalObs.type === 'create'\n ? ('listColumn.addButtonText' | translate)\n : ('listColumn.editColumnTitle' | translate)\n }}\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 <form [formGroup]=\"formGroup\" class=\"list-column-form\">\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.titleTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.titleTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"title\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label\n [disabled]=\"modalObs.disableInput || modalObs.type === 'edit'\"\n [invalid]=\"modalObs.validKey === false\"\n [invalidText]=\"'listColumn.uniqueKeyWarning' | translate\"\n >\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.key' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.keyTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"key\" [invalid]=\"modalObs.validKey === false\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.path' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.pathTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"path\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.displayType' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.displayTypeTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <ibm-dropdown formControlName=\"displayType\" [disabled]=\"modalObs.disableInput\">\n <ibm-dropdown-list [items]=\"viewTypeItems$ | async\"></ibm-dropdown-list>\n </ibm-dropdown>\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\" *ngIf=\"showDateFormat$ | async\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.dateFormat' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.dateFormatTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"dateFormat\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\" *ngIf=\"modalObs.showEnum || modalObs.isYesNo\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{\n modalObs.isYesNo\n ? ('listColumn.enumTitleOptional' | translate)\n : ('listColumn.enumTitle' | translate)\n }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.enumTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <valtimo-carbon-multi-input\n *ngIf=\"(showModal$ | async) || (modalShowing$ | async)\"\n type=\"keyValue\"\n (valueChange)=\"enumValueChange($event)\"\n [defaultValues]=\"defaultEnumValues$ | async\"\n ></valtimo-carbon-multi-input>\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-checkbox formControlName=\"sortable\"\n >{{ 'listColumn.sortable' | translate }}\n </ibm-checkbox>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.defaultSortTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.defaultSortTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <ibm-dropdown\n formControlName=\"defaultSort\"\n [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\"\n >\n <ibm-dropdown-list [items]=\"sortItems$ | async\"></ibm-dropdown-list>\n </ibm-dropdown>\n </ibm-label>\n </div>\n </form>\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 {{ 'listColumn.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n [disabled]=\"modalObs.valid === false\"\n (click)=\"saveCasListColumns()\"\n [disabled]=\"\n modalObs.disableInput || modalObs.valid === false || modalObs.validKey === false\n \"\n >\n {{ 'listColumn.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteRowIndex$ | async\"\n (confirmEvent)=\"deleteRowConfirmation($event)\"\n confirmButtonTextTranslationKey=\"listColumn.deleteColumn\"\n titleTranslationKey=\"listColumn.deleteColumn\"\n contentTranslationKey=\"listColumn.deleteColumnConfirmation\"\n ></valtimo-confirmation-modal>\n</ng-template>\n\n<ng-template #noConfigWarning>\n <div class=\"pl-2 pr-2 pb-2\">\n <ibm-notification\n [notificationObj]=\"{\n type: 'info',\n title: 'listColumn.noConfigWarningTitle' | translate,\n showClose: false\n }\"\n >\n </ibm-notification>\n </div>\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 */::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--inline-notification{max-width:100%}.label-with-tooltip{display:flex;align-items:center}.cds--text-input__field-wrapper:not(:last-child){margin-bottom:1rem}.display-type-dropdown{width:300px}.list-column-form{margin-bottom:3rem}.select-label{padding-bottom:.5rem;width:250px}.loading-icon{width:100%;display:flex;align-items:center;justify-content:center}.center-link{display:flex;align-items:center}::ng-deep .move-row-buttons{display:flex;flex-direction:row;justify-content:flex-end;padding-right:13px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i7.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: i8.Label, selector: "ibm-label", inputs: ["labelInputID", "disabled", "labelState", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i8.TextInput, selector: "[ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "directive", type: i8.Button, selector: "[ibmButton]", inputs: ["ibmButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: i5.TooltipIconComponent, selector: "v-tooltip-icon", inputs: ["tooltip", "disabled"] }, { kind: "component", type: i7.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required"], outputs: ["valueChange"] }, { kind: "component", type: i8.Modal, selector: "ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i8.ModalHeader, selector: "ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i8.ModalFooter, selector: "ibm-modal-footer" }, { kind: "directive", type: i8.ModalContent, selector: "[ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i8.ModalHeaderHeading, selector: "[ibmModalHeaderHeading]" }, { kind: "component", type: i8.Notification, selector: "ibm-notification,ibm-inline-notification", inputs: ["notificationObj"] }, { kind: "component", type: i8.Loading, selector: "ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i8.Dropdown, selector: "ibm-dropdown", inputs: ["id", "label", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i8.DropdownList, selector: "ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i8.Checkbox, selector: "ibm-checkbox", inputs: ["disabled", "skeleton", "hideLabel", "name", "id", "required", "value", "ariaLabel", "ariaLabelledby", "indeterminate", "checked"], outputs: ["click", "checkedChange", "indeterminateChange"] }, { kind: "directive", type: i8.Link, selector: "[ibmLink]", inputs: ["inline", "disabled"] }, { kind: "directive", type: i8.IconDirective, selector: "[ibmIcon]", inputs: ["ibmIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "directive", type: i10.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i10.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i10.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i10.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i10.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "cancelButtonText", "cancelButtonTextTranslationKey", "showModalSubject$", "outputOnConfirm"], outputs: ["confirmEvent"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
763
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListColumnsComponent, decorators: [{
359
764
  type: Component,
360
- args: [{ selector: 'valtimo-object-management-list-tab', 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<div id=\"object-list-tab-content\" class=\"pt-0\">\n <ng-container *ngTemplateOutlet=\"widget\"></ng-container>\n</div>\n\n<ng-template #widget></ng-template>\n\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 */\n"] }]
361
- }], ctorParameters: function () { return []; }, propDecorators: { object$: [{
362
- type: Input
765
+ args: [{ selector: 'valtimo-object-management-list-columns', 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 listColumn: translatedObjectManagementListColumns$ | async,\n fields: objectManagementFields$ | async,\n objectId: objectId$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-2\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"!obs.loading; else loading\">\n <ng-container *ngIf=\"obs.listColumn?.length > 0; else noConfigWarning\">\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <a\n ibmLink\n class=\"center-link\"\n [href]=\"obs.downloadUrl\"\n [download]=\"obs.downloadName\"\n [disabled]=\"\n !obs.downloadUrl ||\n !obs.downloadName ||\n obs.listColumn?.length < 1 ||\n obs.disableInput ||\n obs.loading\n \"\n >\n {{ 'listColumn.downloadButtonText' | translate }}\n </a>\n <button\n (click)=\"openModal('create')\"\n ibmButton=\"primary\"\n size=\"md\"\n [disabled]=\"obs.loading\"\n class=\"ml-3\"\n >\n {{ 'listColumn.addButtonText' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #moveRowButtons let-index=\"index\" let-length=\"length\">\n <div\n class=\"move-row-buttons\"\n *ngIf=\"{\n disableInput: disableInput$ | async,\n objectId: objectId$ | async\n } as obs\"\n >\n <i\n class=\"mdi mdi-delete btn btn-outline-danger mr-1\"\n (click)=\"deleteRow(index, $event)\"\n [ngClass]=\"{'disabled disabled-move-row-button': obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-up-bold btn btn-outline-primary mr-1\"\n (click)=\"moveRow(index, true, $event, obs.objectId)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === 0 || obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-down-bold btn btn-outline-secondary\"\n (click)=\"moveRow(index, false, $event, obs.objectId)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === length - 1 || obs.disableInput}\"\n ></i>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-list\n [items]=\"obs.listColumn\"\n [fields]=\"obs.fields\"\n [viewMode]=\"false\"\n [header]=\"false\"\n *ngIf=\"obs.listColumn; else loading\"\n [lastColumnTemplate]=\"moveRowButtonsTemplateRef\"\n (rowClicked)=\"columnRowClicked($event)\"\n >\n </valtimo-list>\n</ng-template>\n\n<ng-template #createEditModal>\n <ibm-modal\n *ngIf=\"{\n type: currentModalType$ | async,\n show: showModal$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async,\n validKey: validKey$ | async,\n disableDefaultSort: disableDefaultSort$ | async,\n showEnum: showEnum$ | async,\n isYesNo: isYesNo$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{\n modalObs.type === 'create'\n ? ('listColumn.addButtonText' | translate)\n : ('listColumn.editColumnTitle' | translate)\n }}\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 <form [formGroup]=\"formGroup\" class=\"list-column-form\">\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.titleTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.titleTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"title\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label\n [disabled]=\"modalObs.disableInput || modalObs.type === 'edit'\"\n [invalid]=\"modalObs.validKey === false\"\n [invalidText]=\"'listColumn.uniqueKeyWarning' | translate\"\n >\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.key' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.keyTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"key\" [invalid]=\"modalObs.validKey === false\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.path' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.pathTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"path\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.displayType' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.displayTypeTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <ibm-dropdown formControlName=\"displayType\" [disabled]=\"modalObs.disableInput\">\n <ibm-dropdown-list [items]=\"viewTypeItems$ | async\"></ibm-dropdown-list>\n </ibm-dropdown>\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\" *ngIf=\"showDateFormat$ | async\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.dateFormat' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.dateFormatTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"dateFormat\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\" *ngIf=\"modalObs.showEnum || modalObs.isYesNo\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{\n modalObs.isYesNo\n ? ('listColumn.enumTitleOptional' | translate)\n : ('listColumn.enumTitle' | translate)\n }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.enumTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <valtimo-carbon-multi-input\n *ngIf=\"(showModal$ | async) || (modalShowing$ | async)\"\n type=\"keyValue\"\n (valueChange)=\"enumValueChange($event)\"\n [defaultValues]=\"defaultEnumValues$ | async\"\n ></valtimo-carbon-multi-input>\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-checkbox formControlName=\"sortable\"\n >{{ 'listColumn.sortable' | translate }}\n </ibm-checkbox>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.defaultSortTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.defaultSortTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <ibm-dropdown\n formControlName=\"defaultSort\"\n [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\"\n >\n <ibm-dropdown-list [items]=\"sortItems$ | async\"></ibm-dropdown-list>\n </ibm-dropdown>\n </ibm-label>\n </div>\n </form>\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 {{ 'listColumn.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n [disabled]=\"modalObs.valid === false\"\n (click)=\"saveCasListColumns()\"\n [disabled]=\"\n modalObs.disableInput || modalObs.valid === false || modalObs.validKey === false\n \"\n >\n {{ 'listColumn.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteRowIndex$ | async\"\n (confirmEvent)=\"deleteRowConfirmation($event)\"\n confirmButtonTextTranslationKey=\"listColumn.deleteColumn\"\n titleTranslationKey=\"listColumn.deleteColumn\"\n contentTranslationKey=\"listColumn.deleteColumnConfirmation\"\n ></valtimo-confirmation-modal>\n</ng-template>\n\n<ng-template #noConfigWarning>\n <div class=\"pl-2 pr-2 pb-2\">\n <ibm-notification\n [notificationObj]=\"{\n type: 'info',\n title: 'listColumn.noConfigWarningTitle' | translate,\n showClose: false\n }\"\n >\n </ibm-notification>\n </div>\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 */::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--inline-notification{max-width:100%}.label-with-tooltip{display:flex;align-items:center}.cds--text-input__field-wrapper:not(:last-child){margin-bottom:1rem}.display-type-dropdown{width:300px}.list-column-form{margin-bottom:3rem}.select-label{padding-bottom:.5rem;width:250px}.loading-icon{width:100%;display:flex;align-items:center;justify-content:center}.center-link{display:flex;align-items:center}::ng-deep .move-row-buttons{display:flex;flex-direction:row;justify-content:flex-end;padding-right:13px}\n"] }]
766
+ }], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: i2.ActivatedRoute }, { type: i3$1.TranslateService }, { type: i4.ConfigService }, { type: i5$1.DomSanitizer }]; }, propDecorators: { moveRowButtonsTemplateRef: [{
767
+ type: ViewChild,
768
+ args: ['moveRowButtons']
769
+ }] } });
770
+
771
+ /*
772
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
773
+ *
774
+ * Licensed under EUPL, Version 1.2 (the "License");
775
+ * you may not use this file except in compliance with the License.
776
+ * You may obtain a copy of the License at
777
+ *
778
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
779
+ *
780
+ * Unless required by applicable law or agreed to in writing, software
781
+ * distributed under the License is distributed on an "AS IS" basis,
782
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
783
+ * See the License for the specific language governing permissions and
784
+ * limitations under the License.
785
+ */
786
+ class ObjectManagementListSearchFieldsComponent {
787
+ constructor(objectManagementService, route, translateService, configService, sanitizer) {
788
+ this.objectManagementService = objectManagementService;
789
+ this.route = route;
790
+ this.translateService = translateService;
791
+ this.configService = configService;
792
+ this.sanitizer = sanitizer;
793
+ this.downloadName$ = new BehaviorSubject('');
794
+ this.downloadUrl$ = new BehaviorSubject(undefined);
795
+ this.loading$ = new BehaviorSubject(true);
796
+ this.currentModalType$ = new BehaviorSubject('create');
797
+ this.showModal$ = new BehaviorSubject(false);
798
+ this.disableInput$ = new BehaviorSubject(false);
799
+ this.showDeleteModal$ = new Subject();
800
+ this.deleteRowIndex$ = new BehaviorSubject(0);
801
+ this.INVALID_KEY = 'invalid';
802
+ this.formGroup = new FormGroup({
803
+ title: new FormControl(''),
804
+ key: new FormControl('', Validators.required),
805
+ path: new FormControl('', Validators.required),
806
+ dataType: new FormControl({
807
+ key: this.INVALID_KEY,
808
+ }),
809
+ fieldType: new FormControl({
810
+ key: this.INVALID_KEY,
811
+ }),
812
+ });
813
+ this.COLUMNS = [
814
+ {
815
+ viewType: 'string',
816
+ sortable: false,
817
+ propertyName: 'title',
818
+ translationKey: 'title',
819
+ },
820
+ {
821
+ viewType: 'string',
822
+ sortable: false,
823
+ propertyName: 'key',
824
+ translationKey: 'key',
825
+ },
826
+ {
827
+ viewType: 'string',
828
+ sortable: false,
829
+ propertyName: 'path',
830
+ translationKey: 'path',
831
+ },
832
+ {
833
+ viewType: 'string',
834
+ sortable: false,
835
+ propertyName: 'dataType',
836
+ translationKey: 'dataType',
837
+ },
838
+ {
839
+ viewType: 'string',
840
+ sortable: false,
841
+ propertyName: 'fieldType',
842
+ translationKey: 'fieldType',
843
+ },
844
+ ];
845
+ this.DATA_TYPES = [
846
+ 'text',
847
+ 'number',
848
+ 'date',
849
+ 'datetime',
850
+ 'boolean',
851
+ ];
852
+ this.FIELD_TYPES = ['single', 'range'];
853
+ this.cachedObjectManagementListSearchFields = [];
854
+ this.refreshObjectManagementListSearchFields$ = new BehaviorSubject(null);
855
+ this.objectManagementFields$ = this.translateService
856
+ .stream('key')
857
+ .pipe(map(() => this.COLUMNS.map(column => (Object.assign({ key: column.propertyName, label: this.translateService.instant(`searchFieldsOverview.${column.translationKey}`), sortable: column.sortable }, (column.viewType && { viewType: column.viewType }))))));
858
+ this.objectId$ = this.route.params.pipe(map(params => params.id || ''), filter(objectId => !!objectId));
859
+ this.objectManagementListSearchFields$ = combineLatest([
860
+ this.objectId$,
861
+ this.refreshObjectManagementListSearchFields$,
862
+ ]).pipe(switchMap(([objectId]) => this.objectManagementService.getSearchField(objectId)), tap(objectManagementListSearchFields => {
863
+ this.objectId$.pipe(take(1)).subscribe(objectId => {
864
+ if (objectManagementListSearchFields &&
865
+ Array.isArray(objectManagementListSearchFields) &&
866
+ objectManagementListSearchFields.length > 0) {
867
+ this.setDownload(objectId, objectManagementListSearchFields);
868
+ }
869
+ });
870
+ }), tap(objectManagementListSearchFields => {
871
+ this.cachedObjectManagementListSearchFields = objectManagementListSearchFields;
872
+ this.loading$.next(false);
873
+ this.enableInput();
874
+ }));
875
+ this.translatedObjectManagementListSearchFields$ = combineLatest([
876
+ this.objectManagementListSearchFields$,
877
+ this.translateService.stream('key'),
878
+ ]).pipe(map(([columns]) => columns.map(column => {
879
+ var _a, _b;
880
+ return (Object.assign(Object.assign({}, column), { title: column.title || '-', dataType: this.translateService.instant(`searchFields.${(_a = column === null || column === void 0 ? void 0 : column.dataType) === null || _a === void 0 ? void 0 : _a.toLowerCase()}`), fieldType: this.translateService.instant(`searchFieldsOverview.${(_b = column === null || column === void 0 ? void 0 : column.fieldType) === null || _b === void 0 ? void 0 : _b.toLowerCase()}`) }));
881
+ })));
882
+ this.selectedDataTypeItemIndex$ = new BehaviorSubject(0);
883
+ this.dataTypeItems$ = combineLatest([
884
+ this.selectedDataTypeItemIndex$,
885
+ this.translateService.stream('key'),
886
+ ]).pipe(map(([selectedDataTypeItemIndex]) => [
887
+ {
888
+ content: this.translateService.instant(`searchFieldDataType.select`),
889
+ key: this.INVALID_KEY,
890
+ },
891
+ ...this.DATA_TYPES.map(type => ({
892
+ content: this.translateService.instant(`searchFields.${type}`),
893
+ key: type.toUpperCase(),
894
+ })),
895
+ ].map((item, index) => (Object.assign(Object.assign({}, item), { selected: index === selectedDataTypeItemIndex })))));
896
+ this.selectedFieldTypeItemIndex$ = new BehaviorSubject(0);
897
+ this.fieldTypeItems$ = combineLatest([
898
+ this.selectedFieldTypeItemIndex$,
899
+ this.translateService.stream('key'),
900
+ ]).pipe(map(([selectedFieldTypeItemIndex]) => [
901
+ {
902
+ content: this.translateService.instant(`searchFieldFieldType.select`),
903
+ key: this.INVALID_KEY,
904
+ },
905
+ ...this.FIELD_TYPES.map(type => ({
906
+ content: this.translateService.instant(`searchFieldsOverview.${type}`),
907
+ key: type.toUpperCase(),
908
+ })),
909
+ ].map((item, index) => (Object.assign(Object.assign({}, item), { selected: index === selectedFieldTypeItemIndex })))));
910
+ this.validKey$ = combineLatest([this.formGroup.valueChanges, this.currentModalType$]).pipe(map(([formValues, currentModalType]) => {
911
+ const existingKeys = this.cachedObjectManagementListSearchFields.map(column => column.key);
912
+ return currentModalType === 'create' ? !existingKeys.includes(formValues.key) : true;
913
+ }), startWith(false));
914
+ this.valid$ = combineLatest([this.formGroup.valueChanges, this.validKey$]).pipe(map(([formValues, validKey]) => !!(formValues.path && validKey)), startWith(false));
915
+ }
916
+ openModal(modalType) {
917
+ this.showModal$.next(true);
918
+ this.currentModalType$.next(modalType);
919
+ if (modalType === 'create') {
920
+ this.formGroup.controls['key'].enable();
921
+ this.resetFormGroup();
922
+ }
923
+ else if (modalType === 'edit') {
924
+ this.formGroup.controls['key'].disable();
925
+ }
926
+ }
927
+ closeModal() {
928
+ this.showModal$.next(false);
929
+ }
930
+ deleteRow(listSearchFieldRowIndex, clickEvent) {
931
+ clickEvent.stopPropagation();
932
+ this.showDeleteModal$.next(true);
933
+ this.deleteRowIndex$.next(listSearchFieldRowIndex);
934
+ }
935
+ deleteRowConfirmation(listSearchFieldRowIndex) {
936
+ const columnKey = this.getColumnKey(listSearchFieldRowIndex);
937
+ if (columnKey) {
938
+ this.disableInput();
939
+ this.objectId$
940
+ .pipe(take(1), switchMap(objectId => this.objectManagementService.deleteSearchField(objectId, columnKey)), tap(() => this.refreshObjectManagementListSearchFields()), catchError(() => {
941
+ this.enableInput();
942
+ return of(null);
943
+ }))
944
+ .subscribe();
945
+ }
946
+ }
947
+ getColumnKey(listSearchFieldRowIndex) {
948
+ var _a;
949
+ return (_a = this.cachedObjectManagementListSearchFields[listSearchFieldRowIndex]) === null || _a === void 0 ? void 0 : _a.key;
950
+ }
951
+ moveRow(listSearchFieldRowIndex, moveUp, clickEvent, objectId) {
952
+ const objectManagementListSearchFields = [...this.cachedObjectManagementListSearchFields];
953
+ const listSearchFieldRow = objectManagementListSearchFields[listSearchFieldRowIndex];
954
+ clickEvent.stopPropagation();
955
+ }
956
+ saveListSearchFields() {
957
+ this.disableInput();
958
+ this.currentModalType$.pipe(take(1)).subscribe(currentModalType => {
959
+ if (currentModalType === 'create') {
960
+ this.addSearchField();
961
+ }
962
+ else {
963
+ this.updateSearchField();
964
+ }
965
+ });
966
+ }
967
+ columnRowClicked(row) {
968
+ this.resetFormGroup();
969
+ combineLatest([this.dataTypeItems$, this.fieldTypeItems$])
970
+ .pipe(take(1))
971
+ .subscribe(([dataTypeItems, fieldTypeItems]) => {
972
+ const column = this.cachedObjectManagementListSearchFields.find(cachedColumn => cachedColumn.key === row.key);
973
+ console.log(dataTypeItems);
974
+ const dataTypeItem = dataTypeItems.find(item => item.key === column.dataType);
975
+ const dataTypeItemIndex = dataTypeItems.findIndex(item => item.key === column.dataType);
976
+ const fieldTypeItem = fieldTypeItems.find(item => item.key === column.fieldType);
977
+ const fieldTypeItemIndex = fieldTypeItems.findIndex(item => item.key === column.fieldType);
978
+ this.selectedDataTypeItemIndex$.next(dataTypeItemIndex);
979
+ this.selectedFieldTypeItemIndex$.next(fieldTypeItemIndex);
980
+ this.formGroup.patchValue({
981
+ key: column.key,
982
+ title: column.title,
983
+ path: column.path,
984
+ // @ts-ignore
985
+ dataType: Object.assign({}, dataTypeItem),
986
+ // @ts-ignore
987
+ fieldType: Object.assign({}, fieldTypeItem),
988
+ });
989
+ this.openModal('edit');
990
+ });
991
+ }
992
+ updateObjectManagementListSearchField(objectId, searchField) {
993
+ this.disableInput();
994
+ this.objectManagementService
995
+ .putSearchField(objectId, this.formGroup.value.key, searchField)
996
+ .pipe(tap(() => {
997
+ this.refreshObjectManagementListSearchFields();
998
+ localStorage.setItem(`list-search-fields${objectId}`, null);
999
+ }), catchError(() => {
1000
+ this.enableInput();
1001
+ return of(null);
1002
+ }))
1003
+ .subscribe();
1004
+ }
1005
+ addSearchField() {
1006
+ const formValue = this.formGroup.value;
1007
+ this.objectId$
1008
+ .pipe(take(1), switchMap(objectId => this.objectManagementService.postSearchField(objectId, this.mapFormValuesToColumn(formValue))), tap(() => {
1009
+ this.closeModal();
1010
+ this.refreshObjectManagementListSearchFields();
1011
+ }), catchError(() => {
1012
+ this.enableInput();
1013
+ return of(null);
1014
+ }))
1015
+ .subscribe();
1016
+ }
1017
+ updateSearchField() {
1018
+ this.objectId$
1019
+ .pipe(take(1), switchMap(objectId => this.objectManagementService.putSearchField(objectId, this.formGroup.value.key, this.mapFormValuesToColumn(this.formGroup.value))), tap(() => {
1020
+ this.closeModal();
1021
+ this.refreshObjectManagementListSearchFields();
1022
+ }), catchError(() => {
1023
+ this.enableInput();
1024
+ return of(null);
1025
+ }))
1026
+ .subscribe();
1027
+ }
1028
+ setDownload(objectId, ObjectManagementSearchFields) {
1029
+ this.downloadName$.next(`${objectId}.json`);
1030
+ this.downloadUrl$.next(this.sanitizer.bypassSecurityTrustUrl('data:text/json;charset=UTF-8,' +
1031
+ encodeURIComponent(JSON.stringify(ObjectManagementSearchFields, null, 2))));
1032
+ }
1033
+ disableInput() {
1034
+ this.disableInput$.next(true);
1035
+ this.formGroup.disable();
1036
+ }
1037
+ enableInput() {
1038
+ this.disableInput$.next(false);
1039
+ this.formGroup.enable();
1040
+ }
1041
+ refreshObjectManagementListSearchFields() {
1042
+ this.refreshObjectManagementListSearchFields$.next(null);
1043
+ }
1044
+ resetFormGroup() {
1045
+ this.formGroup.reset();
1046
+ this.selectedDataTypeItemIndex$.next(0);
1047
+ this.selectedFieldTypeItemIndex$.next(0);
1048
+ }
1049
+ mapFormValuesToColumn(formValue) {
1050
+ return {
1051
+ key: formValue.key,
1052
+ title: formValue.title || '',
1053
+ path: formValue.path,
1054
+ dataType: formValue.dataType.key,
1055
+ fieldType: formValue.fieldType.key,
1056
+ };
1057
+ }
1058
+ }
1059
+ ObjectManagementListSearchFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListSearchFieldsComponent, deps: [{ token: ObjectManagementService }, { token: i2.ActivatedRoute }, { token: i3$1.TranslateService }, { token: i4.ConfigService }, { token: i5$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
1060
+ ObjectManagementListSearchFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementListSearchFieldsComponent, selector: "valtimo-object-management-list-search-fields", viewQueries: [{ propertyName: "moveRowButtonsTemplateRef", first: true, predicate: ["moveRowButtons"], descendants: true }], 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 searchFields: translatedObjectManagementListSearchFields$ | async,\n fields: objectManagementFields$ | async,\n objectId: objectId$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-2\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"!obs.loading; else loading\">\n <ng-container *ngIf=\"obs.searchFields?.length > 0; else noConfigWarning\">\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <a\n ibmLink\n class=\"center-link\"\n [href]=\"obs.downloadUrl\"\n [download]=\"obs.downloadName\"\n [disabled]=\"\n !obs.downloadUrl ||\n !obs.downloadName ||\n obs.searchFields?.length < 1 ||\n obs.disableInput ||\n obs.loading\n \"\n >\n {{ 'searchFieldsOverview.download' | translate }}\n </a>\n <button\n (click)=\"openModal('create')\"\n ibmButton=\"primary\"\n size=\"md\"\n [disabled]=\"obs.loading\"\n class=\"ml-3\"\n >\n {{ 'searchFieldsOverview.add' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #moveRowButtons let-index=\"index\" let-length=\"length\">\n <div\n class=\"move-row-buttons\"\n *ngIf=\"{\n disableInput: disableInput$ | async,\n objectId: objectId$ | async\n } as obs\"\n >\n <i\n class=\"mdi mdi-delete btn btn-outline-danger mr-1\"\n (click)=\"deleteRow(index, $event)\"\n [ngClass]=\"{'disabled disabled-move-row-button': obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-up-bold btn btn-outline-primary mr-1\"\n (click)=\"moveRow(index, true, $event, obs.objectId)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === 0 || obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-down-bold btn btn-outline-secondary\"\n (click)=\"moveRow(index, false, $event, obs.objectId)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === length - 1 || obs.disableInput}\"\n ></i>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-list\n [items]=\"obs.searchFields\"\n [fields]=\"obs.fields\"\n [viewMode]=\"false\"\n [header]=\"false\"\n *ngIf=\"obs.searchFields; else loading\"\n [lastColumnTemplate]=\"moveRowButtonsTemplateRef\"\n (rowClicked)=\"columnRowClicked($event)\"\n >\n </valtimo-list>\n</ng-template>\n\n<ng-template #createEditModal>\n <ibm-modal\n *ngIf=\"{\n type: currentModalType$ | async,\n show: showModal$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async,\n validKey: validKey$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{\n modalObs.type === 'create'\n ? ('searchFieldsOverview.add' | translate)\n : ('searchFieldsOverview.edit' | translate)\n }}\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 <form [formGroup]=\"formGroup\" class=\"list-column-form\">\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'searchFieldsOverview.title' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'searchFieldsOverviewTooltips.title' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"title\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label\n [disabled]=\"modalObs.disableInput || modalObs.type === 'edit'\"\n [invalid]=\"modalObs.validKey === false\"\n [invalidText]=\"'searchFieldsOverview.uniqueKeyWarning' | translate\"\n >\n <span class=\"label-with-tooltip\">\n {{ 'searchFieldsOverview.key' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'searchFieldsOverviewTooltips.key' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"key\" [invalid]=\"modalObs.validKey === false\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'searchFieldsOverview.path' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'searchFieldsOverviewTooltips.path' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"path\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'searchFieldsOverview.dataType' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'searchFieldsOverviewTooltips.dataType' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <ibm-dropdown formControlName=\"dataType\" [disabled]=\"modalObs.disableInput\">\n <ibm-dropdown-list [items]=\"dataTypeItems$ | async\"></ibm-dropdown-list>\n </ibm-dropdown>\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'searchFieldsOverview.fieldType' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'searchFieldsOverviewTooltips.fieldType' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <ibm-dropdown formControlName=\"fieldType\" [disabled]=\"modalObs.disableInput\">\n <ibm-dropdown-list [items]=\"fieldTypeItems$ | async\"></ibm-dropdown-list>\n </ibm-dropdown>\n </ibm-label>\n </div>\n </form>\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 {{ 'searchFieldsOverview.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n [disabled]=\"modalObs.valid === false\"\n (click)=\"saveListSearchFields()\"\n [disabled]=\"\n modalObs.disableInput || modalObs.valid === false || modalObs.validKey === false\n \"\n >\n {{ 'searchFieldsOverview.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteRowIndex$ | async\"\n (confirmEvent)=\"deleteRowConfirmation($event)\"\n confirmButtonTextTranslationKey=\"searchFieldsOverview.deleteSearchField\"\n titleTranslationKey=\"searchFieldsOverview.searchField\"\n contentTranslationKey=\"searchFieldsOverview.deleteSearchFieldConfirmation\"\n ></valtimo-confirmation-modal>\n</ng-template>\n\n<ng-template #noConfigWarning>\n <div class=\"pl-2 pr-2 pb-2\">\n <ibm-notification\n [notificationObj]=\"{\n type: 'info',\n title: 'searchFieldsOverview.noSearchFieldsConfiguredWarningTitle' | translate,\n showClose: false\n }\"\n >\n </ibm-notification>\n </div>\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 */::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--inline-notification{max-width:100%}.label-with-tooltip{display:flex;align-items:center}.cds--text-input__field-wrapper:not(:last-child){margin-bottom:1rem}.display-type-dropdown{width:300px}.list-column-form{margin-bottom:3rem}.select-label{padding-bottom:.5rem;width:250px}.loading-icon{width:100%;display:flex;align-items:center;justify-content:center}.center-link{display:flex;align-items:center}::ng-deep .move-row-buttons{display:flex;flex-direction:row;justify-content:flex-end;padding-right:13px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i7.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: i8.Label, selector: "ibm-label", inputs: ["labelInputID", "disabled", "labelState", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i8.TextInput, selector: "[ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "directive", type: i8.Button, selector: "[ibmButton]", inputs: ["ibmButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: i5.TooltipIconComponent, selector: "v-tooltip-icon", inputs: ["tooltip", "disabled"] }, { kind: "component", type: i8.Modal, selector: "ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i8.ModalHeader, selector: "ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i8.ModalFooter, selector: "ibm-modal-footer" }, { kind: "directive", type: i8.ModalContent, selector: "[ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i8.ModalHeaderHeading, selector: "[ibmModalHeaderHeading]" }, { kind: "component", type: i8.Notification, selector: "ibm-notification,ibm-inline-notification", inputs: ["notificationObj"] }, { kind: "component", type: i8.Loading, selector: "ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i8.Dropdown, selector: "ibm-dropdown", inputs: ["id", "label", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i8.DropdownList, selector: "ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "directive", type: i8.Link, selector: "[ibmLink]", inputs: ["inline", "disabled"] }, { kind: "directive", type: i8.IconDirective, selector: "[ibmIcon]", inputs: ["ibmIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "directive", type: i10.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i10.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i10.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i10.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i10.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "cancelButtonText", "cancelButtonTextTranslationKey", "showModalSubject$", "outputOnConfirm"], outputs: ["confirmEvent"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
1061
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListSearchFieldsComponent, decorators: [{
1062
+ type: Component,
1063
+ args: [{ selector: 'valtimo-object-management-list-search-fields', 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 searchFields: translatedObjectManagementListSearchFields$ | async,\n fields: objectManagementFields$ | async,\n objectId: objectId$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-2\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"!obs.loading; else loading\">\n <ng-container *ngIf=\"obs.searchFields?.length > 0; else noConfigWarning\">\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <a\n ibmLink\n class=\"center-link\"\n [href]=\"obs.downloadUrl\"\n [download]=\"obs.downloadName\"\n [disabled]=\"\n !obs.downloadUrl ||\n !obs.downloadName ||\n obs.searchFields?.length < 1 ||\n obs.disableInput ||\n obs.loading\n \"\n >\n {{ 'searchFieldsOverview.download' | translate }}\n </a>\n <button\n (click)=\"openModal('create')\"\n ibmButton=\"primary\"\n size=\"md\"\n [disabled]=\"obs.loading\"\n class=\"ml-3\"\n >\n {{ 'searchFieldsOverview.add' | translate }}\n <svg class=\"cds--btn__icon\" ibmIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #moveRowButtons let-index=\"index\" let-length=\"length\">\n <div\n class=\"move-row-buttons\"\n *ngIf=\"{\n disableInput: disableInput$ | async,\n objectId: objectId$ | async\n } as obs\"\n >\n <i\n class=\"mdi mdi-delete btn btn-outline-danger mr-1\"\n (click)=\"deleteRow(index, $event)\"\n [ngClass]=\"{'disabled disabled-move-row-button': obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-up-bold btn btn-outline-primary mr-1\"\n (click)=\"moveRow(index, true, $event, obs.objectId)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === 0 || obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-down-bold btn btn-outline-secondary\"\n (click)=\"moveRow(index, false, $event, obs.objectId)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === length - 1 || obs.disableInput}\"\n ></i>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-list\n [items]=\"obs.searchFields\"\n [fields]=\"obs.fields\"\n [viewMode]=\"false\"\n [header]=\"false\"\n *ngIf=\"obs.searchFields; else loading\"\n [lastColumnTemplate]=\"moveRowButtonsTemplateRef\"\n (rowClicked)=\"columnRowClicked($event)\"\n >\n </valtimo-list>\n</ng-template>\n\n<ng-template #createEditModal>\n <ibm-modal\n *ngIf=\"{\n type: currentModalType$ | async,\n show: showModal$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async,\n validKey: validKey$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <ibm-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>\n {{\n modalObs.type === 'create'\n ? ('searchFieldsOverview.add' | translate)\n : ('searchFieldsOverview.edit' | translate)\n }}\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 <form [formGroup]=\"formGroup\" class=\"list-column-form\">\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'searchFieldsOverview.title' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'searchFieldsOverviewTooltips.title' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"title\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label\n [disabled]=\"modalObs.disableInput || modalObs.type === 'edit'\"\n [invalid]=\"modalObs.validKey === false\"\n [invalidText]=\"'searchFieldsOverview.uniqueKeyWarning' | translate\"\n >\n <span class=\"label-with-tooltip\">\n {{ 'searchFieldsOverview.key' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'searchFieldsOverviewTooltips.key' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"key\" [invalid]=\"modalObs.validKey === false\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'searchFieldsOverview.path' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'searchFieldsOverviewTooltips.path' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input ibmText formControlName=\"path\" />\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'searchFieldsOverview.dataType' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'searchFieldsOverviewTooltips.dataType' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <ibm-dropdown formControlName=\"dataType\" [disabled]=\"modalObs.disableInput\">\n <ibm-dropdown-list [items]=\"dataTypeItems$ | async\"></ibm-dropdown-list>\n </ibm-dropdown>\n </ibm-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <ibm-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'searchFieldsOverview.fieldType' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'searchFieldsOverviewTooltips.fieldType' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <ibm-dropdown formControlName=\"fieldType\" [disabled]=\"modalObs.disableInput\">\n <ibm-dropdown-list [items]=\"fieldTypeItems$ | async\"></ibm-dropdown-list>\n </ibm-dropdown>\n </ibm-label>\n </div>\n </form>\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 {{ 'searchFieldsOverview.close' | translate }}\n </button>\n <button\n ibmButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n [disabled]=\"modalObs.valid === false\"\n (click)=\"saveListSearchFields()\"\n [disabled]=\"\n modalObs.disableInput || modalObs.valid === false || modalObs.validKey === false\n \"\n >\n {{ 'searchFieldsOverview.save' | translate }}\n </button>\n </ng-container>\n </ibm-modal-footer>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteRowIndex$ | async\"\n (confirmEvent)=\"deleteRowConfirmation($event)\"\n confirmButtonTextTranslationKey=\"searchFieldsOverview.deleteSearchField\"\n titleTranslationKey=\"searchFieldsOverview.searchField\"\n contentTranslationKey=\"searchFieldsOverview.deleteSearchFieldConfirmation\"\n ></valtimo-confirmation-modal>\n</ng-template>\n\n<ng-template #noConfigWarning>\n <div class=\"pl-2 pr-2 pb-2\">\n <ibm-notification\n [notificationObj]=\"{\n type: 'info',\n title: 'searchFieldsOverview.noSearchFieldsConfiguredWarningTitle' | translate,\n showClose: false\n }\"\n >\n </ibm-notification>\n </div>\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 */::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--inline-notification{max-width:100%}.label-with-tooltip{display:flex;align-items:center}.cds--text-input__field-wrapper:not(:last-child){margin-bottom:1rem}.display-type-dropdown{width:300px}.list-column-form{margin-bottom:3rem}.select-label{padding-bottom:.5rem;width:250px}.loading-icon{width:100%;display:flex;align-items:center;justify-content:center}.center-link{display:flex;align-items:center}::ng-deep .move-row-buttons{display:flex;flex-direction:row;justify-content:flex-end;padding-right:13px}\n"] }]
1064
+ }], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: i2.ActivatedRoute }, { type: i3$1.TranslateService }, { type: i4.ConfigService }, { type: i5$1.DomSanitizer }]; }, propDecorators: { moveRowButtonsTemplateRef: [{
1065
+ type: ViewChild,
1066
+ args: ['moveRowButtons']
363
1067
  }] } });
364
1068
 
365
1069
  /*
@@ -404,12 +1108,12 @@ class ObjectManagementDetailContainerComponent {
404
1108
  (_a = this.tabSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
405
1109
  }
406
1110
  }
407
- ObjectManagementDetailContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementDetailContainerComponent, deps: [{ token: ObjectManagementStateService }, { token: ObjectManagementService }, { token: i3$1.ActivatedRoute }, { token: i2.ConfigService }, { token: TabService }], target: i0.ɵɵFactoryTarget.Component });
408
- ObjectManagementDetailContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementDetailContainerComponent, selector: "valtimo-object-management-detail-container", ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 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 class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabContent\"></ng-container>\n </valtimo-widget>\n </div>\n </div>\n</div>\n\n<ng-template #title>\n <div class=\"bg-light dossier-header\" *ngIf=\"object$ | async as obs\">\n <h3 class=\"dossier-title\">\n {{ obs.title }}\n <div *ngIf=\"obs.showInDataMenu\" class=\"pull-right\">\n <span class=\"badge badge-pill badge-info increase-size\">{{\n 'objectManagement.visibleInMenu' | translate\n }}</span>\n </div>\n </h3>\n </div>\n</ng-template>\n\n<ng-template #tabs>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a\n id=\"general-tab\"\n class=\"nav-link clickable active\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.GENERAL)\"\n >\n {{ 'objectManagement.tabs.general' | translate }}\n </a>\n </li>\n <li class=\"nav-item\" *ngIf=\"caseListColumn\">\n <a\n id=\"list-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.LIST)\"\n >\n {{ 'objectManagement.tabs.list' | translate }}\n </a>\n </li>\n </ul>\n</ng-template>\n\n<ng-template #tabContent>\n <div class=\"pt-3 bg-white position-relative tab-container\">\n <div *ngIf=\"currentTab && currentTab === TabEnum.GENERAL\">\n <valtimo-object-management-detail [object$]=\"object$\"></valtimo-object-management-detail>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.LIST\">\n <valtimo-object-management-list-tab></valtimo-object-management-list-tab>\n </div>\n </div>\n</ng-template>\n", styles: [".tab-container{min-height:300px}.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid rgba(0,0,0,.125)}.dossier-title{margin-top:0;margin-bottom:7px}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: ObjectManagementDetailComponent, selector: "valtimo-object-management-detail", inputs: ["object$"] }, { kind: "component", type: ObjectManagementListTabComponent, selector: "valtimo-object-management-list-tab", inputs: ["object$"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslatePipe, name: "translate" }] });
1111
+ ObjectManagementDetailContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementDetailContainerComponent, deps: [{ token: ObjectManagementStateService }, { token: ObjectManagementService }, { token: i2.ActivatedRoute }, { token: i4.ConfigService }, { token: TabService }], target: i0.ɵɵFactoryTarget.Component });
1112
+ ObjectManagementDetailContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementDetailContainerComponent, selector: "valtimo-object-management-detail-container", ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 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 class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabContent\"></ng-container>\n </valtimo-widget>\n </div>\n </div>\n</div>\n\n<ng-template #title>\n <div class=\"bg-light dossier-header\" *ngIf=\"object$ | async as obs\">\n <h3 class=\"dossier-title\">\n {{ obs.title }}\n <div *ngIf=\"obs.showInDataMenu\" class=\"pull-right\">\n <span class=\"badge badge-pill badge-info increase-size\">{{\n 'objectManagement.visibleInMenu' | translate\n }}</span>\n </div>\n </h3>\n </div>\n</ng-template>\n\n<ng-template #tabs>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a\n id=\"general-tab\"\n class=\"nav-link clickable active\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.GENERAL)\"\n >\n {{ 'objectManagement.tabs.general' | translate }}\n </a>\n </li>\n <li class=\"nav-item\">\n <a\n id=\"search-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.SEARCH)\"\n >\n {{ 'objectManagement.tabs.searchFields' | translate }}\n </a>\n </li>\n <li class=\"nav-item\" *ngIf=\"caseListColumn\">\n <a\n id=\"list-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.LIST)\"\n >\n {{ 'objectManagement.tabs.list' | translate }}\n </a>\n </li>\n </ul>\n</ng-template>\n\n<ng-template #tabContent>\n <div class=\"pt-3 bg-white position-relative tab-container\">\n <div *ngIf=\"currentTab && currentTab === TabEnum.GENERAL\">\n <valtimo-object-management-detail [object$]=\"object$\"></valtimo-object-management-detail>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.SEARCH\">\n <valtimo-object-management-list-search-fields></valtimo-object-management-list-search-fields>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.LIST\">\n <valtimo-object-management-list-columns></valtimo-object-management-list-columns>\n </div>\n </div>\n</ng-template>\n", styles: [".tab-container{min-height:300px}.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid rgba(0,0,0,.125)}.dossier-title{margin-top:0;margin-bottom:7px}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i7.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: ObjectManagementDetailComponent, selector: "valtimo-object-management-detail", inputs: ["object$"] }, { kind: "component", type: ObjectManagementListColumnsComponent, selector: "valtimo-object-management-list-columns" }, { kind: "component", type: ObjectManagementListSearchFieldsComponent, selector: "valtimo-object-management-list-search-fields" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
409
1113
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementDetailContainerComponent, decorators: [{
410
1114
  type: Component,
411
- args: [{ selector: 'valtimo-object-management-detail-container', template: "<!--\n ~ Copyright 2015-2022 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 class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabContent\"></ng-container>\n </valtimo-widget>\n </div>\n </div>\n</div>\n\n<ng-template #title>\n <div class=\"bg-light dossier-header\" *ngIf=\"object$ | async as obs\">\n <h3 class=\"dossier-title\">\n {{ obs.title }}\n <div *ngIf=\"obs.showInDataMenu\" class=\"pull-right\">\n <span class=\"badge badge-pill badge-info increase-size\">{{\n 'objectManagement.visibleInMenu' | translate\n }}</span>\n </div>\n </h3>\n </div>\n</ng-template>\n\n<ng-template #tabs>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a\n id=\"general-tab\"\n class=\"nav-link clickable active\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.GENERAL)\"\n >\n {{ 'objectManagement.tabs.general' | translate }}\n </a>\n </li>\n <li class=\"nav-item\" *ngIf=\"caseListColumn\">\n <a\n id=\"list-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.LIST)\"\n >\n {{ 'objectManagement.tabs.list' | translate }}\n </a>\n </li>\n </ul>\n</ng-template>\n\n<ng-template #tabContent>\n <div class=\"pt-3 bg-white position-relative tab-container\">\n <div *ngIf=\"currentTab && currentTab === TabEnum.GENERAL\">\n <valtimo-object-management-detail [object$]=\"object$\"></valtimo-object-management-detail>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.LIST\">\n <valtimo-object-management-list-tab></valtimo-object-management-list-tab>\n </div>\n </div>\n</ng-template>\n", styles: [".tab-container{min-height:300px}.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid rgba(0,0,0,.125)}.dossier-title{margin-top:0;margin-bottom:7px}\n"] }]
412
- }], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i3$1.ActivatedRoute }, { type: i2.ConfigService }, { type: TabService }]; } });
1115
+ args: [{ selector: 'valtimo-object-management-detail-container', template: "<!--\n ~ Copyright 2015-2022 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 class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabContent\"></ng-container>\n </valtimo-widget>\n </div>\n </div>\n</div>\n\n<ng-template #title>\n <div class=\"bg-light dossier-header\" *ngIf=\"object$ | async as obs\">\n <h3 class=\"dossier-title\">\n {{ obs.title }}\n <div *ngIf=\"obs.showInDataMenu\" class=\"pull-right\">\n <span class=\"badge badge-pill badge-info increase-size\">{{\n 'objectManagement.visibleInMenu' | translate\n }}</span>\n </div>\n </h3>\n </div>\n</ng-template>\n\n<ng-template #tabs>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a\n id=\"general-tab\"\n class=\"nav-link clickable active\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.GENERAL)\"\n >\n {{ 'objectManagement.tabs.general' | translate }}\n </a>\n </li>\n <li class=\"nav-item\">\n <a\n id=\"search-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.SEARCH)\"\n >\n {{ 'objectManagement.tabs.searchFields' | translate }}\n </a>\n </li>\n <li class=\"nav-item\" *ngIf=\"caseListColumn\">\n <a\n id=\"list-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.LIST)\"\n >\n {{ 'objectManagement.tabs.list' | translate }}\n </a>\n </li>\n </ul>\n</ng-template>\n\n<ng-template #tabContent>\n <div class=\"pt-3 bg-white position-relative tab-container\">\n <div *ngIf=\"currentTab && currentTab === TabEnum.GENERAL\">\n <valtimo-object-management-detail [object$]=\"object$\"></valtimo-object-management-detail>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.SEARCH\">\n <valtimo-object-management-list-search-fields></valtimo-object-management-list-search-fields>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.LIST\">\n <valtimo-object-management-list-columns></valtimo-object-management-list-columns>\n </div>\n </div>\n</ng-template>\n", styles: [".tab-container{min-height:300px}.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid rgba(0,0,0,.125)}.dossier-title{margin-top:0;margin-bottom:7px}\n"] }]
1116
+ }], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i2.ActivatedRoute }, { type: i4.ConfigService }, { type: TabService }]; } });
413
1117
 
414
1118
  /*
415
1119
  * Copyright 2015-2020 Ritense BV, the Netherlands.
@@ -464,8 +1168,10 @@ class ObjectManagementUploadModalComponent {
464
1168
  }
465
1169
  uploadDefinition() {
466
1170
  this.disable();
467
- this.jsonString$.pipe(take(1)).subscribe((objecttypeDefinition) => {
468
- this.objectManagementService.createObject(Object.assign({}, JSON.parse(objecttypeDefinition))).subscribe(() => {
1171
+ this.jsonString$.pipe(take(1)).subscribe(objecttypeDefinition => {
1172
+ this.objectManagementService
1173
+ .createObject(Object.assign({}, JSON.parse(objecttypeDefinition)))
1174
+ .subscribe(() => {
469
1175
  this.objectManagementState.refresh();
470
1176
  this.objectManagementState.hideModal();
471
1177
  });
@@ -538,7 +1244,14 @@ class ObjectManagementUploadModalComponent {
538
1244
  isValidJsonObjecttype(string) {
539
1245
  var _a;
540
1246
  const jsonObjecttype = JSON.parse(string);
541
- const isValid = this.validateObject(jsonObjecttype, ['title', 'objecttypenApiPluginConfigurationId', 'objecttypeId', 'objectenApiPluginConfigurationId', 'showInDataMenu']);
1247
+ const isValid = this.validateObject(jsonObjecttype, [
1248
+ 'title',
1249
+ 'objecttypenApiPluginConfigurationId',
1250
+ 'objecttypeId',
1251
+ 'objecttypeVersion',
1252
+ 'objectenApiPluginConfigurationId',
1253
+ 'showInDataMenu',
1254
+ ]);
542
1255
  const isObjecttypeTitleUnique = !((_a = this.objecttypes) === null || _a === void 0 ? void 0 : _a.find(objecttype => objecttype.title === jsonObjecttype.title));
543
1256
  if (isValid && isObjecttypeTitleUnique) {
544
1257
  return true;
@@ -565,12 +1278,12 @@ class ObjectManagementUploadModalComponent {
565
1278
  this.disabled$.next(false);
566
1279
  }
567
1280
  }
568
- ObjectManagementUploadModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementUploadModalComponent, deps: [{ token: ObjectManagementStateService }, { token: ObjectManagementService }, { token: i3.FormManagementService }, { token: i4.PluginManagementService }, { token: i5.ModalService }, { token: i6$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
569
- ObjectManagementUploadModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementUploadModalComponent, selector: "valtimo-object-management-upload-modal", inputs: { objecttypes: "objecttypes" }, viewQueries: [{ propertyName: "objectManagementUploadModal", first: true, predicate: ["objectManagementUploadModal"], descendants: true }], 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\n<v-modal #objectManagementUploadModal *ngIf=\"{\n disabled: disabled$ | async,\n jsonString: jsonString$ | async,\n error: error$ | async\n} as obs\">\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{ 'objectManagement.uploadObjecttype' | translate }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"uploadForm\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button (clickEvent)=\"uploadDefinition()\" [disabled]=\"obs.jsonString === '' || obs.disabled\" mdiIcon=\"plus\" type=\"success\">\n {{ 'Upload' | translate }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #uploadForm>\n <ng-container *ngIf=\"showForm$ | async\">\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.objecttypeDef' | translate\"\n [externalError$]=\"error$\"\n [maxFiles]=\"1\"\n ></valtimo-dropzone>\n </ng-container>\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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6$2.DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera", "maxFiles"], outputs: ["fileSelected"] }, { kind: "component", type: i5.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "component", type: i5.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "component", type: i5.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslatePipe, name: "translate" }] });
1281
+ ObjectManagementUploadModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementUploadModalComponent, deps: [{ token: ObjectManagementStateService }, { token: ObjectManagementService }, { token: i3.FormManagementService }, { token: i4$1.PluginManagementService }, { token: i5.ModalService }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
1282
+ ObjectManagementUploadModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementUploadModalComponent, selector: "valtimo-object-management-upload-modal", inputs: { objecttypes: "objecttypes" }, viewQueries: [{ propertyName: "objectManagementUploadModal", first: true, predicate: ["objectManagementUploadModal"], descendants: true }], 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\n<v-modal\n #objectManagementUploadModal\n *ngIf=\"{\n disabled: disabled$ | async,\n jsonString: jsonString$ | async,\n error: error$ | async\n } as obs\"\n>\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{ 'objectManagement.uploadObjecttype' | translate }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"uploadForm\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button\n (clickEvent)=\"uploadDefinition()\"\n [disabled]=\"obs.jsonString === '' || obs.disabled\"\n mdiIcon=\"plus\"\n type=\"success\"\n >\n {{ 'Upload' | translate }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #uploadForm>\n <ng-container *ngIf=\"showForm$ | async\">\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.objecttypeDef' | translate\"\n [externalError$]=\"error$\"\n [maxFiles]=\"1\"\n ></valtimo-dropzone>\n </ng-container>\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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i7.DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera", "maxFiles"], outputs: ["fileSelected"] }, { kind: "component", type: i5.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "component", type: i5.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "component", type: i5.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
570
1283
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementUploadModalComponent, decorators: [{
571
1284
  type: Component,
572
- args: [{ selector: 'valtimo-object-management-upload-modal', 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\n<v-modal #objectManagementUploadModal *ngIf=\"{\n disabled: disabled$ | async,\n jsonString: jsonString$ | async,\n error: error$ | async\n} as obs\">\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{ 'objectManagement.uploadObjecttype' | translate }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"uploadForm\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button (clickEvent)=\"uploadDefinition()\" [disabled]=\"obs.jsonString === '' || obs.disabled\" mdiIcon=\"plus\" type=\"success\">\n {{ 'Upload' | translate }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #uploadForm>\n <ng-container *ngIf=\"showForm$ | async\">\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.objecttypeDef' | translate\"\n [externalError$]=\"error$\"\n [maxFiles]=\"1\"\n ></valtimo-dropzone>\n </ng-container>\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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"] }]
573
- }], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i3.FormManagementService }, { type: i4.PluginManagementService }, { type: i5.ModalService }, { type: i6$1.TranslateService }]; }, propDecorators: { objectManagementUploadModal: [{
1285
+ args: [{ selector: 'valtimo-object-management-upload-modal', 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\n<v-modal\n #objectManagementUploadModal\n *ngIf=\"{\n disabled: disabled$ | async,\n jsonString: jsonString$ | async,\n error: error$ | async\n } as obs\"\n>\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{ 'objectManagement.uploadObjecttype' | translate }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"uploadForm\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button\n (clickEvent)=\"uploadDefinition()\"\n [disabled]=\"obs.jsonString === '' || obs.disabled\"\n mdiIcon=\"plus\"\n type=\"success\"\n >\n {{ 'Upload' | translate }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #uploadForm>\n <ng-container *ngIf=\"showForm$ | async\">\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.objecttypeDef' | translate\"\n [externalError$]=\"error$\"\n [maxFiles]=\"1\"\n ></valtimo-dropzone>\n </ng-container>\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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"] }]
1286
+ }], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i3.FormManagementService }, { type: i4$1.PluginManagementService }, { type: i5.ModalService }, { type: i3$1.TranslateService }]; }, propDecorators: { objectManagementUploadModal: [{
574
1287
  type: ViewChild,
575
1288
  args: ['objectManagementUploadModal']
576
1289
  }], objecttypes: [{
@@ -602,8 +1315,8 @@ class ObjectManagementListComponent {
602
1315
  this.fields$ = new BehaviorSubject([]);
603
1316
  this.objecttypesInstances$ = combineLatest([
604
1317
  this.translateService.stream('key'),
605
- this.objectManagementState.refresh$
606
- ]).pipe(tap(() => this.setFields()), switchMap$1(() => this.objectManagementService.getAllObjects()), tap(() => this.loading$.next(false)));
1318
+ this.objectManagementState.refresh$,
1319
+ ]).pipe(tap$1(() => this.setFields()), switchMap$1(() => this.objectManagementService.getAllObjects()), tap$1(() => this.loading$.next(false)));
607
1320
  }
608
1321
  showAddModal() {
609
1322
  this.objectManagementState.setModalType('add');
@@ -618,15 +1331,18 @@ class ObjectManagementListComponent {
618
1331
  }
619
1332
  setFields() {
620
1333
  const keys = ['title'];
621
- this.fields$.next(keys.map(key => ({ label: `${this.translateService.instant(`objectManagement.labels.${key}`)}`, key })));
1334
+ this.fields$.next(keys.map(key => ({
1335
+ label: `${this.translateService.instant(`objectManagement.labels.${key}`)}`,
1336
+ key,
1337
+ })));
622
1338
  }
623
1339
  }
624
- ObjectManagementListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListComponent, deps: [{ token: ObjectManagementService }, { token: ObjectManagementStateService }, { token: i6$1.TranslateService }, { token: i3$1.Router }], target: i0.ɵɵFactoryTarget.Component });
625
- ObjectManagementListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementListComponent, selector: "valtimo-object-management-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\n<div class=\"main-content pt-0\" *ngIf=\"{loading: loading$ | async} as obs\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <div class=\"text-right mt-m3px mb-3\">\n <button (click)=\"showUploadModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'objectManagement.uploadObjecttype' | translate }}\n </button>\n <button (click)=\"showAddModal()\" type=\"button\" class=\"btn btn-space btn-primary mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'objectManagement.createObjecttype' | translate }}\n </button>\n </div>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #list let-obs=\"obs\">\n <ng-container *ngIf=\"fields$ | async as fields\">\n <ng-container *ngIf=\"objecttypesInstances$ | async as objecttypesInstances\">\n <valtimo-widget *ngIf=\"obs.loading === false\">\n <valtimo-list\n [items]=\"objecttypesInstances\"\n [fields]=\"fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n paginationIdentifier=\"objecttypesList\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'objectManagement.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n objecttypesInstances?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<valtimo-object-management-upload-modal [objecttypes]=\"objecttypesInstances$ | async\"></valtimo-object-management-upload-modal>\n<valtimo-object-management-modal></valtimo-object-management-modal>\n\n\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 */\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i6$2.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: ObjectManagementModalComponent, selector: "valtimo-object-management-modal", inputs: ["prefillObject$"] }, { kind: "component", type: ObjectManagementUploadModalComponent, selector: "valtimo-object-management-upload-modal", inputs: ["objecttypes"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslatePipe, name: "translate" }] });
1340
+ ObjectManagementListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListComponent, deps: [{ token: ObjectManagementService }, { token: ObjectManagementStateService }, { token: i3$1.TranslateService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
1341
+ ObjectManagementListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementListComponent, selector: "valtimo-object-management-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\n<div class=\"main-content pt-0\" *ngIf=\"{loading: loading$ | async} as obs\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <div class=\"text-right mt-m3px mb-3\">\n <button (click)=\"showUploadModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'objectManagement.uploadObjecttype' | translate }}\n </button>\n <button (click)=\"showAddModal()\" type=\"button\" class=\"btn btn-space btn-primary mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'objectManagement.createObjecttype' | translate }}\n </button>\n </div>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #list let-obs=\"obs\">\n <ng-container *ngIf=\"fields$ | async as fields\">\n <ng-container *ngIf=\"objecttypesInstances$ | async as objecttypesInstances\">\n <valtimo-widget *ngIf=\"obs.loading === false\">\n <valtimo-list\n [items]=\"objecttypesInstances\"\n [fields]=\"fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n paginationIdentifier=\"objecttypesList\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'objectManagement.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n objecttypesInstances?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<valtimo-object-management-upload-modal\n [objecttypes]=\"objecttypesInstances$ | async\"\n></valtimo-object-management-upload-modal>\n<valtimo-object-management-modal></valtimo-object-management-modal>\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 */\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i7.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i7.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: ObjectManagementModalComponent, selector: "valtimo-object-management-modal", inputs: ["prefillObject$"] }, { kind: "component", type: ObjectManagementUploadModalComponent, selector: "valtimo-object-management-upload-modal", inputs: ["objecttypes"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
626
1342
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListComponent, decorators: [{
627
1343
  type: Component,
628
- args: [{ selector: 'valtimo-object-management-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\n<div class=\"main-content pt-0\" *ngIf=\"{loading: loading$ | async} as obs\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <div class=\"text-right mt-m3px mb-3\">\n <button (click)=\"showUploadModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'objectManagement.uploadObjecttype' | translate }}\n </button>\n <button (click)=\"showAddModal()\" type=\"button\" class=\"btn btn-space btn-primary mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'objectManagement.createObjecttype' | translate }}\n </button>\n </div>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #list let-obs=\"obs\">\n <ng-container *ngIf=\"fields$ | async as fields\">\n <ng-container *ngIf=\"objecttypesInstances$ | async as objecttypesInstances\">\n <valtimo-widget *ngIf=\"obs.loading === false\">\n <valtimo-list\n [items]=\"objecttypesInstances\"\n [fields]=\"fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n paginationIdentifier=\"objecttypesList\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'objectManagement.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n objecttypesInstances?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<valtimo-object-management-upload-modal [objecttypes]=\"objecttypesInstances$ | async\"></valtimo-object-management-upload-modal>\n<valtimo-object-management-modal></valtimo-object-management-modal>\n\n\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 */\n"] }]
629
- }], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: ObjectManagementStateService }, { type: i6$1.TranslateService }, { type: i3$1.Router }]; } });
1344
+ args: [{ selector: 'valtimo-object-management-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\n<div class=\"main-content pt-0\" *ngIf=\"{loading: loading$ | async} as obs\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <div class=\"text-right mt-m3px mb-3\">\n <button (click)=\"showUploadModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'objectManagement.uploadObjecttype' | translate }}\n </button>\n <button (click)=\"showAddModal()\" type=\"button\" class=\"btn btn-space btn-primary mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'objectManagement.createObjecttype' | translate }}\n </button>\n </div>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #list let-obs=\"obs\">\n <ng-container *ngIf=\"fields$ | async as fields\">\n <ng-container *ngIf=\"objecttypesInstances$ | async as objecttypesInstances\">\n <valtimo-widget *ngIf=\"obs.loading === false\">\n <valtimo-list\n [items]=\"objecttypesInstances\"\n [fields]=\"fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n paginationIdentifier=\"objecttypesList\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'objectManagement.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n objecttypesInstances?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<valtimo-object-management-upload-modal\n [objecttypes]=\"objecttypesInstances$ | async\"\n></valtimo-object-management-upload-modal>\n<valtimo-object-management-modal></valtimo-object-management-modal>\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 */\n"] }]
1345
+ }], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: ObjectManagementStateService }, { type: i3$1.TranslateService }, { type: i2.Router }]; } });
630
1346
 
631
1347
  /*
632
1348
  * Copyright 2015-2020 Ritense BV, the Netherlands.
@@ -655,12 +1371,12 @@ const routes = [
655
1371
  canActivate: [AuthGuardService],
656
1372
  component: ObjectManagementDetailContainerComponent,
657
1373
  data: { title: 'Object', roles: [ROLE_ADMIN] },
658
- }
1374
+ },
659
1375
  ];
660
1376
  class ObjectManagementRoutingModule {
661
1377
  }
662
1378
  ObjectManagementRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
663
- ObjectManagementRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementRoutingModule, imports: [CommonModule, i3$1.RouterModule], exports: [RouterModule] });
1379
+ ObjectManagementRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementRoutingModule, imports: [CommonModule, i2.RouterModule], exports: [RouterModule] });
664
1380
  ObjectManagementRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] });
665
1381
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementRoutingModule, decorators: [{
666
1382
  type: NgModule,
@@ -692,9 +1408,10 @@ ObjectManagementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", v
692
1408
  ObjectManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModule, declarations: [ObjectManagementListComponent,
693
1409
  ObjectManagementDetailContainerComponent,
694
1410
  ObjectManagementDetailComponent,
695
- ObjectManagementListTabComponent,
1411
+ ObjectManagementListColumnsComponent,
696
1412
  ObjectManagementModalComponent,
697
- ObjectManagementUploadModalComponent], imports: [CommonModule,
1413
+ ObjectManagementUploadModalComponent,
1414
+ ObjectManagementListSearchFieldsComponent], imports: [CommonModule,
698
1415
  DropzoneModule,
699
1416
  WidgetModule,
700
1417
  ListModule,
@@ -705,7 +1422,22 @@ ObjectManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
705
1422
  ButtonModule,
706
1423
  FormModule,
707
1424
  InputModule,
708
- SelectModule] });
1425
+ SelectModule,
1426
+ InputModule$1,
1427
+ ButtonModule$1,
1428
+ TooltipIconModule,
1429
+ CarbonMultiInputModule,
1430
+ ModalModule$1,
1431
+ NotificationModule,
1432
+ LoadingModule,
1433
+ DropdownModule,
1434
+ CheckboxModule,
1435
+ LinkModule,
1436
+ IconModule,
1437
+ ReactiveFormsModule,
1438
+ ConfirmationModalModule,
1439
+ SpinnerModule,
1440
+ ModalModule$2] });
709
1441
  ObjectManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModule, imports: [CommonModule,
710
1442
  DropzoneModule,
711
1443
  WidgetModule,
@@ -717,7 +1449,22 @@ ObjectManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
717
1449
  ButtonModule,
718
1450
  FormModule,
719
1451
  InputModule,
720
- SelectModule] });
1452
+ SelectModule,
1453
+ InputModule$1,
1454
+ ButtonModule$1,
1455
+ TooltipIconModule,
1456
+ CarbonMultiInputModule,
1457
+ ModalModule$1,
1458
+ NotificationModule,
1459
+ LoadingModule,
1460
+ DropdownModule,
1461
+ CheckboxModule,
1462
+ LinkModule,
1463
+ IconModule,
1464
+ ReactiveFormsModule,
1465
+ ConfirmationModalModule,
1466
+ SpinnerModule,
1467
+ ModalModule$2] });
721
1468
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModule, decorators: [{
722
1469
  type: NgModule,
723
1470
  args: [{
@@ -725,9 +1472,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
725
1472
  ObjectManagementListComponent,
726
1473
  ObjectManagementDetailContainerComponent,
727
1474
  ObjectManagementDetailComponent,
728
- ObjectManagementListTabComponent,
1475
+ ObjectManagementListColumnsComponent,
729
1476
  ObjectManagementModalComponent,
730
- ObjectManagementUploadModalComponent
1477
+ ObjectManagementUploadModalComponent,
1478
+ ObjectManagementListSearchFieldsComponent,
731
1479
  ],
732
1480
  imports: [
733
1481
  CommonModule,
@@ -741,9 +1489,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
741
1489
  ButtonModule,
742
1490
  FormModule,
743
1491
  InputModule,
744
- SelectModule
1492
+ SelectModule,
1493
+ InputModule$1,
1494
+ ButtonModule$1,
1495
+ TooltipIconModule,
1496
+ CarbonMultiInputModule,
1497
+ ModalModule$1,
1498
+ NotificationModule,
1499
+ LoadingModule,
1500
+ DropdownModule,
1501
+ CheckboxModule,
1502
+ LinkModule,
1503
+ IconModule,
1504
+ ReactiveFormsModule,
1505
+ ConfirmationModalModule,
1506
+ SpinnerModule,
1507
+ ModalModule$2,
745
1508
  ],
746
- exports: []
1509
+ exports: [],
747
1510
  }]
748
1511
  }] });
749
1512