@valtimo/object-management 10.3.0 → 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.
- package/esm2020/lib/components/object-management-detail-container/object-management-detail-container.component.mjs +6 -5
- package/esm2020/lib/components/object-management-detail-container/tabs/object-management-detail/object-management-detail.component.mjs +12 -5
- package/esm2020/lib/components/object-management-detail-container/tabs/object-management-list-columns/object-management-list-columns.component.mjs +434 -0
- package/esm2020/lib/components/object-management-detail-container/tabs/object-management-list-search-fields/object-management-list-search-fields.component.mjs +325 -0
- package/esm2020/lib/components/object-management-modal/object-management-modal.component.mjs +5 -4
- package/esm2020/lib/components/object-management-upload-modal/object-management-upload-modal.component.mjs +2 -1
- package/esm2020/lib/models/object-management.model.mjs +1 -1
- package/esm2020/lib/object-management.module.mjs +62 -12
- package/esm2020/lib/services/object-management.service.mjs +28 -1
- package/esm2020/lib/services/tab.enum.mjs +2 -1
- package/fesm2015/valtimo-object-management.mjs +794 -43
- package/fesm2015/valtimo-object-management.mjs.map +1 -1
- package/fesm2020/valtimo-object-management.mjs +832 -43
- package/fesm2020/valtimo-object-management.mjs.map +1 -1
- package/lib/components/object-management-detail-container/tabs/object-management-detail/object-management-detail.component.d.ts +2 -1
- package/lib/components/object-management-detail-container/tabs/object-management-list-columns/object-management-list-columns.component.d.ts +91 -0
- package/lib/components/object-management-detail-container/tabs/object-management-list-search-fields/object-management-list-search-fields.component.d.ts +76 -0
- package/lib/models/object-management.model.d.ts +29 -0
- package/lib/object-management.module.d.ts +10 -7
- package/lib/services/object-management.service.d.ts +10 -2
- package/lib/services/tab.enum.d.ts +2 -1
- package/package.json +1 -1
- package/esm2020/lib/components/object-management-detail-container/tabs/object-management-list-tab/object-management-list-tab.component.mjs +0 -30
- 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
|
|
4
|
+
import * as i4 from '@valtimo/config';
|
|
5
5
|
import { ROLE_ADMIN } from '@valtimo/config';
|
|
6
|
-
import * as
|
|
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
|
|
13
|
-
import { DropzoneModule, WidgetModule, ListModule } from '@valtimo/components';
|
|
14
|
-
import
|
|
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
|
|
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,48 @@ 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}`, { ...request, ownerId });
|
|
64
|
+
}
|
|
65
|
+
putSearchList(ownerId, columnKey, request) {
|
|
66
|
+
return this.http.put(`${this.valtimoEndpointUri}v1/search/list-column/${ownerId}/${columnKey}`, { ...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}`, {
|
|
76
|
+
...request,
|
|
77
|
+
ownerId,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
putSearchField(ownerId, key, request) {
|
|
81
|
+
return this.http.put(`${this.valtimoEndpointUri}v1/search/field/${ownerId}/${key}`, { ...request, ownerId });
|
|
82
|
+
}
|
|
83
|
+
deleteSearchField(ownerId, key) {
|
|
84
|
+
return this.http.delete(`${this.valtimoEndpointUri}v1/search/field/${ownerId}/${key}`);
|
|
85
|
+
}
|
|
54
86
|
}
|
|
55
|
-
ObjectManagementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementService, deps: [{ token: i1.HttpClient }, { token:
|
|
87
|
+
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
88
|
ObjectManagementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementService, providedIn: 'root' });
|
|
57
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementService, decorators: [{
|
|
58
90
|
type: Injectable,
|
|
59
91
|
args: [{
|
|
60
92
|
providedIn: 'root',
|
|
61
93
|
}]
|
|
62
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type:
|
|
94
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i4.ConfigService }]; } });
|
|
63
95
|
|
|
64
96
|
var TabEnum;
|
|
65
97
|
(function (TabEnum) {
|
|
66
98
|
TabEnum["GENERAL"] = "general";
|
|
67
99
|
TabEnum["LIST"] = "list";
|
|
100
|
+
TabEnum["SEARCH"] = "search";
|
|
68
101
|
})(TabEnum || (TabEnum = {}));
|
|
69
102
|
|
|
70
103
|
/*
|
|
@@ -272,18 +305,19 @@ class ObjectManagementModalComponent {
|
|
|
272
305
|
this.valid$.next(!!(data.title &&
|
|
273
306
|
data.objectenApiPluginConfigurationId &&
|
|
274
307
|
data.objecttypenApiPluginConfigurationId &&
|
|
275
|
-
data.objecttypeId
|
|
308
|
+
data.objecttypeId,
|
|
309
|
+
data.objecttypeVersion));
|
|
276
310
|
}
|
|
277
311
|
selectObjectType(objecttype) {
|
|
278
312
|
this.selectedObjecttype$.next(objecttype);
|
|
279
313
|
}
|
|
280
314
|
}
|
|
281
|
-
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 });
|
|
282
|
-
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 <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", "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:
|
|
315
|
+
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 });
|
|
316
|
+
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" }] });
|
|
283
317
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModalComponent, decorators: [{
|
|
284
318
|
type: Component,
|
|
285
|
-
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 <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"] }]
|
|
286
|
-
}], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i3.FormManagementService }, { type: i4.PluginManagementService }, { type: i5.ModalService }]; }, propDecorators: { objectManagementModal: [{
|
|
319
|
+
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"] }]
|
|
320
|
+
}], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i3.FormManagementService }, { type: i4$1.PluginManagementService }, { type: i5.ModalService }]; }, propDecorators: { objectManagementModal: [{
|
|
287
321
|
type: ViewChild,
|
|
288
322
|
args: ['objectManagementModal']
|
|
289
323
|
}], prefillObject$: [{
|
|
@@ -309,25 +343,30 @@ class ObjectManagementDetailComponent {
|
|
|
309
343
|
constructor(objectManagementService, objectManagementState) {
|
|
310
344
|
this.objectManagementService = objectManagementService;
|
|
311
345
|
this.objectManagementState = objectManagementState;
|
|
346
|
+
this.loading$ = new BehaviorSubject(false);
|
|
312
347
|
}
|
|
313
348
|
downloadDefinition(object) {
|
|
349
|
+
this.loading$.next(true);
|
|
314
350
|
const dataString = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(object, null, 2));
|
|
315
351
|
console.log(dataString);
|
|
316
352
|
const downloadAnchorElement = document.getElementById('downloadAnchorElement');
|
|
317
353
|
downloadAnchorElement.setAttribute('href', dataString);
|
|
318
354
|
downloadAnchorElement.setAttribute('download', `${object.id}.json`);
|
|
319
355
|
downloadAnchorElement.click();
|
|
356
|
+
this.loading$.next(false);
|
|
320
357
|
}
|
|
321
358
|
showEditModal() {
|
|
359
|
+
this.loading$.next(true);
|
|
322
360
|
this.objectManagementState.setModalType('edit');
|
|
323
361
|
this.objectManagementState.showModal();
|
|
362
|
+
this.loading$.next(false);
|
|
324
363
|
}
|
|
325
364
|
}
|
|
326
365
|
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 });
|
|
327
|
-
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 } as obs\"\n>\n <ng-container
|
|
366
|
+
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" }] });
|
|
328
367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementDetailComponent, decorators: [{
|
|
329
368
|
type: Component,
|
|
330
|
-
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 } as obs\"\n>\n <ng-container
|
|
369
|
+
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"] }]
|
|
331
370
|
}], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: ObjectManagementStateService }]; }, propDecorators: { object$: [{
|
|
332
371
|
type: Input
|
|
333
372
|
}] } });
|
|
@@ -347,16 +386,718 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
347
386
|
* See the License for the specific language governing permissions and
|
|
348
387
|
* limitations under the License.
|
|
349
388
|
*/
|
|
350
|
-
class
|
|
351
|
-
constructor() {
|
|
389
|
+
class ObjectManagementListColumnsComponent {
|
|
390
|
+
constructor(objectManagementService, route, translateService, configService, sanitizer) {
|
|
391
|
+
this.objectManagementService = objectManagementService;
|
|
392
|
+
this.route = route;
|
|
393
|
+
this.translateService = translateService;
|
|
394
|
+
this.configService = configService;
|
|
395
|
+
this.sanitizer = sanitizer;
|
|
396
|
+
this.downloadName$ = new BehaviorSubject('');
|
|
397
|
+
this.downloadUrl$ = new BehaviorSubject(undefined);
|
|
398
|
+
this.loading$ = new BehaviorSubject(true);
|
|
399
|
+
this.currentModalType$ = new BehaviorSubject('create');
|
|
400
|
+
this.showModal$ = new BehaviorSubject(false);
|
|
401
|
+
this.modalShowing$ = this.showModal$.pipe(delay(250));
|
|
402
|
+
this.disableInput$ = new BehaviorSubject(false);
|
|
403
|
+
this.showDeleteModal$ = new Subject();
|
|
404
|
+
this.deleteRowIndex$ = new BehaviorSubject(0);
|
|
405
|
+
this.defaultEnumValues$ = new BehaviorSubject(undefined);
|
|
406
|
+
this.INVALID_KEY = 'invalid';
|
|
407
|
+
this.formGroup = new FormGroup({
|
|
408
|
+
title: new FormControl(''),
|
|
409
|
+
key: new FormControl('', Validators.required),
|
|
410
|
+
path: new FormControl('', Validators.required),
|
|
411
|
+
dateFormat: new FormControl(''),
|
|
412
|
+
displayType: new FormControl({
|
|
413
|
+
key: this.INVALID_KEY,
|
|
414
|
+
}),
|
|
415
|
+
sortable: new FormControl(false),
|
|
416
|
+
defaultSort: new FormControl({
|
|
417
|
+
key: this.INVALID_KEY,
|
|
418
|
+
}),
|
|
419
|
+
enum: new FormControl([]),
|
|
420
|
+
});
|
|
421
|
+
this.DISPLAY_TYPES = [
|
|
422
|
+
'string',
|
|
423
|
+
'date',
|
|
424
|
+
'boolean',
|
|
425
|
+
'enum',
|
|
426
|
+
'arrayCount',
|
|
427
|
+
'underscoresToSpaces',
|
|
428
|
+
];
|
|
429
|
+
this.COLUMNS = [
|
|
430
|
+
{
|
|
431
|
+
viewType: 'string',
|
|
432
|
+
sortable: false,
|
|
433
|
+
propertyName: 'title',
|
|
434
|
+
translationKey: 'title',
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
viewType: 'string',
|
|
438
|
+
sortable: false,
|
|
439
|
+
propertyName: 'key',
|
|
440
|
+
translationKey: 'key',
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
viewType: 'string',
|
|
444
|
+
sortable: false,
|
|
445
|
+
propertyName: 'path',
|
|
446
|
+
translationKey: 'path',
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
viewType: 'string',
|
|
450
|
+
sortable: false,
|
|
451
|
+
propertyName: 'displayType',
|
|
452
|
+
translationKey: 'displayType',
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
viewType: 'string',
|
|
456
|
+
sortable: false,
|
|
457
|
+
propertyName: 'displayTypeParameters',
|
|
458
|
+
translationKey: 'displayTypeParameters',
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
viewType: 'string',
|
|
462
|
+
sortable: false,
|
|
463
|
+
propertyName: 'sortable',
|
|
464
|
+
translationKey: 'sortable',
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
viewType: 'string',
|
|
468
|
+
sortable: false,
|
|
469
|
+
propertyName: 'defaultSort',
|
|
470
|
+
translationKey: 'defaultSort',
|
|
471
|
+
},
|
|
472
|
+
];
|
|
473
|
+
this.cachedObjectManagementListColumns = [];
|
|
474
|
+
this.refreshObjectManagementListColumns$ = new BehaviorSubject(null);
|
|
475
|
+
this.objectManagementFields$ = this.translateService
|
|
476
|
+
.stream('key')
|
|
477
|
+
.pipe(map(() => this.COLUMNS.map(column => ({
|
|
478
|
+
key: column.propertyName,
|
|
479
|
+
label: this.translateService.instant(`listColumn.${column.translationKey}`),
|
|
480
|
+
sortable: column.sortable,
|
|
481
|
+
...(column.viewType && { viewType: column.viewType }),
|
|
482
|
+
...(column.enum && { enum: column.enum }),
|
|
483
|
+
}))));
|
|
484
|
+
this.objectId$ = this.route.params.pipe(map(params => params.id || ''), filter(objectId => !!objectId));
|
|
485
|
+
this.objectManagementListColumns$ = combineLatest([
|
|
486
|
+
this.objectId$,
|
|
487
|
+
this.refreshObjectManagementListColumns$,
|
|
488
|
+
]).pipe(switchMap(([objectId]) => this.objectManagementService.getSearchList(objectId)), tap(objectManagementListColumns => {
|
|
489
|
+
this.objectId$.pipe(take(1)).subscribe(objectId => {
|
|
490
|
+
if (objectManagementListColumns &&
|
|
491
|
+
Array.isArray(objectManagementListColumns) &&
|
|
492
|
+
objectManagementListColumns.length > 0) {
|
|
493
|
+
this.setDownload(objectId, objectManagementListColumns);
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
}), tap(objectManagementListColumns => {
|
|
497
|
+
this.cachedObjectManagementListColumns = objectManagementListColumns;
|
|
498
|
+
this.loading$.next(false);
|
|
499
|
+
this.enableInput();
|
|
500
|
+
}));
|
|
501
|
+
this.translatedObjectManagementListColumns$ = combineLatest([this.objectManagementListColumns$, this.translateService.stream('key')]).pipe(map(([columns]) => columns.map(column => ({
|
|
502
|
+
...column,
|
|
503
|
+
title: column.title || '-',
|
|
504
|
+
sortable: column.sortable
|
|
505
|
+
? this.translateService.instant('listColumn.sortableYes')
|
|
506
|
+
: this.translateService.instant('listColumn.sortableNo'),
|
|
507
|
+
defaultSort: (column.defaultSort === 'ASC' &&
|
|
508
|
+
this.translateService.instant('listColumn.sortableAsc')) ||
|
|
509
|
+
(column.defaultSort === 'DESC' &&
|
|
510
|
+
this.translateService.instant('listColumn.sortableDesc')) ||
|
|
511
|
+
'-',
|
|
512
|
+
displayType: this.translateService.instant(`listColumnDisplayType.${column?.displayType?.type}`),
|
|
513
|
+
displayTypeParameters: this.getDisplayTypeParametersView(column.displayType.displayTypeParameters),
|
|
514
|
+
}))));
|
|
515
|
+
this.disableDefaultSort$ = combineLatest([
|
|
516
|
+
this.currentModalType$,
|
|
517
|
+
this.formGroup.valueChanges,
|
|
518
|
+
]).pipe(map(([currentModalType]) => currentModalType === 'create' &&
|
|
519
|
+
this.cachedObjectManagementListColumns.find(column => !!column.defaultSort)), startWith(false));
|
|
520
|
+
this.showDateFormat$ = this.formGroup.valueChanges.pipe(map(formValues => formValues.displayType?.key === this.DISPLAY_TYPES[1]), tap(showDateFormat => {
|
|
521
|
+
if (showDateFormat === false && !!this.formGroup.value.dateFormat) {
|
|
522
|
+
this.formGroup.patchValue({ dateFormat: '' });
|
|
523
|
+
}
|
|
524
|
+
}), startWith(false));
|
|
525
|
+
this.showEnum$ = this.formGroup.valueChanges.pipe(map(formValues => !!(formValues.displayType?.key === this.DISPLAY_TYPES[3] ||
|
|
526
|
+
formValues.displayType?.key === this.DISPLAY_TYPES[2])), tap(showEnum => {
|
|
527
|
+
const enumValue = this.formGroup.value.enum;
|
|
528
|
+
if (showEnum === false && Array.isArray(enumValue) && enumValue.length > 0) {
|
|
529
|
+
this.formGroup.patchValue({ enum: [] });
|
|
530
|
+
}
|
|
531
|
+
}), startWith(false));
|
|
532
|
+
this.isYesNo$ = this.formGroup.valueChanges.pipe(map(formValues => formValues.displayType?.key === this.DISPLAY_TYPES[2]));
|
|
533
|
+
this.selectedViewTypeItemIndex$ = new BehaviorSubject(0);
|
|
534
|
+
this.viewTypeItems$ = combineLatest([
|
|
535
|
+
this.selectedViewTypeItemIndex$,
|
|
536
|
+
this.translateService.stream('key'),
|
|
537
|
+
]).pipe(map(([selectedViewTypeItemIndex]) => [
|
|
538
|
+
{
|
|
539
|
+
content: this.translateService.instant(`listColumnDisplayType.select`),
|
|
540
|
+
key: this.INVALID_KEY,
|
|
541
|
+
},
|
|
542
|
+
...this.DISPLAY_TYPES.map(type => ({
|
|
543
|
+
content: this.translateService.instant(`listColumnDisplayType.${type}`),
|
|
544
|
+
key: type,
|
|
545
|
+
})),
|
|
546
|
+
].map((item, index) => ({
|
|
547
|
+
...item,
|
|
548
|
+
selected: index === selectedViewTypeItemIndex,
|
|
549
|
+
}))));
|
|
550
|
+
this.selectedSortItemIndex$ = new BehaviorSubject(0);
|
|
551
|
+
this.sortItems$ = combineLatest([
|
|
552
|
+
this.selectedSortItemIndex$,
|
|
553
|
+
this.translateService.stream('key'),
|
|
554
|
+
]).pipe(map(([selectedSortItemIndex]) => [
|
|
555
|
+
{
|
|
556
|
+
content: this.translateService.instant(`listColumn.selectDefaultSort`),
|
|
557
|
+
key: this.INVALID_KEY,
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
content: this.translateService.instant(`listColumn.sortableAsc`),
|
|
561
|
+
key: 'ASC',
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
content: this.translateService.instant(`listColumn.sortableDesc`),
|
|
565
|
+
key: 'DESC',
|
|
566
|
+
},
|
|
567
|
+
].map((item, index) => ({
|
|
568
|
+
...item,
|
|
569
|
+
selected: index === selectedSortItemIndex,
|
|
570
|
+
}))));
|
|
571
|
+
this.validKey$ = combineLatest([this.formGroup.valueChanges, this.currentModalType$]).pipe(map(([formValues, currentModalType]) => {
|
|
572
|
+
const existingKeys = this.cachedObjectManagementListColumns.map(column => column.key);
|
|
573
|
+
return currentModalType === 'create' ? !existingKeys.includes(formValues.key) : true;
|
|
574
|
+
}), startWith(false));
|
|
575
|
+
this.valid$ = combineLatest([this.formGroup.valueChanges, this.validKey$]).pipe(map(([formValues, validKey]) => !!(formValues.displayType?.key !== this.INVALID_KEY &&
|
|
576
|
+
formValues.path &&
|
|
577
|
+
validKey &&
|
|
578
|
+
(formValues.displayType.key === 'enum' ? formValues.enum?.length > 0 : true))), startWith(false));
|
|
579
|
+
}
|
|
580
|
+
openModal(modalType) {
|
|
581
|
+
this.showModal$.next(true);
|
|
582
|
+
this.currentModalType$.next(modalType);
|
|
583
|
+
if (modalType === 'create') {
|
|
584
|
+
this.formGroup.controls['key'].enable();
|
|
585
|
+
this.resetFormGroup();
|
|
586
|
+
}
|
|
587
|
+
else if (modalType === 'edit') {
|
|
588
|
+
this.formGroup.controls['key'].disable();
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
closeModal() {
|
|
592
|
+
this.showModal$.next(false);
|
|
593
|
+
}
|
|
594
|
+
deleteRow(searchListColumnRowIndex, clickEvent) {
|
|
595
|
+
clickEvent.stopPropagation();
|
|
596
|
+
this.showDeleteModal$.next(true);
|
|
597
|
+
this.deleteRowIndex$.next(searchListColumnRowIndex);
|
|
598
|
+
}
|
|
599
|
+
deleteRowConfirmation(searchListColumnRowIndex) {
|
|
600
|
+
const columnKey = this.getColumnKey(searchListColumnRowIndex);
|
|
601
|
+
if (columnKey) {
|
|
602
|
+
this.disableInput();
|
|
603
|
+
this.objectId$
|
|
604
|
+
.pipe(take(1), switchMap(objectId => this.objectManagementService.deleteSearchList(objectId, columnKey)), tap(() => this.refreshObjectManagementListColumns()), catchError(() => {
|
|
605
|
+
this.enableInput();
|
|
606
|
+
return of(null);
|
|
607
|
+
}))
|
|
608
|
+
.subscribe();
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
getColumnKey(searchListColumnRowIndex) {
|
|
612
|
+
return this.cachedObjectManagementListColumns[searchListColumnRowIndex]?.key;
|
|
613
|
+
}
|
|
614
|
+
moveRow(searchListColumnRowIndex, moveUp, clickEvent, objectId) {
|
|
615
|
+
const objectManagementListColumns = [...this.cachedObjectManagementListColumns];
|
|
616
|
+
const searchListColumnRow = objectManagementListColumns[searchListColumnRowIndex];
|
|
617
|
+
clickEvent.stopPropagation();
|
|
618
|
+
// TODO:
|
|
619
|
+
}
|
|
620
|
+
saveCasListColumns() {
|
|
621
|
+
this.disableInput();
|
|
622
|
+
this.currentModalType$.pipe(take(1)).subscribe(currentModalType => {
|
|
623
|
+
if (currentModalType === 'create') {
|
|
624
|
+
this.addColumn();
|
|
625
|
+
}
|
|
626
|
+
else {
|
|
627
|
+
this.updateColumn();
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
enumValueChange(value) {
|
|
632
|
+
this.formGroup.patchValue({ enum: value });
|
|
633
|
+
}
|
|
634
|
+
columnRowClicked(row) {
|
|
635
|
+
this.resetFormGroup();
|
|
636
|
+
combineLatest([this.viewTypeItems$, this.sortItems$])
|
|
637
|
+
.pipe(take(1))
|
|
638
|
+
.subscribe(([viewTypeItems, sortItems]) => {
|
|
639
|
+
const column = this.cachedObjectManagementListColumns.find(cachedColumn => cachedColumn.key === row.key);
|
|
640
|
+
const viewTypeItem = viewTypeItems.find(item => item.key === column.displayType.type);
|
|
641
|
+
const viewTypeItemIndex = viewTypeItems.findIndex(item => item.key === column.displayType.type);
|
|
642
|
+
const sortItem = sortItems.find(item => item.key === column.defaultSort);
|
|
643
|
+
const sortItemIndex = sortItems.findIndex(item => item.key === column.defaultSort);
|
|
644
|
+
const enumValues = column?.displayType?.displayTypeParameters?.enum;
|
|
645
|
+
const mappedEnumValues = [];
|
|
646
|
+
const columnDateFormat = column?.displayType?.displayTypeParameters?.dateFormat;
|
|
647
|
+
this.selectedViewTypeItemIndex$.next(viewTypeItemIndex);
|
|
648
|
+
if (sortItem) {
|
|
649
|
+
this.selectedSortItemIndex$.next(sortItemIndex);
|
|
650
|
+
}
|
|
651
|
+
if (enumValues) {
|
|
652
|
+
Object.keys(enumValues).forEach(key => {
|
|
653
|
+
mappedEnumValues.push({ key, value: enumValues[key] });
|
|
654
|
+
});
|
|
655
|
+
this.defaultEnumValues$.next(mappedEnumValues);
|
|
656
|
+
}
|
|
657
|
+
else {
|
|
658
|
+
this.defaultEnumValues$.next([{ key: '', value: '' }]);
|
|
659
|
+
}
|
|
660
|
+
this.formGroup.patchValue({
|
|
661
|
+
key: column.key,
|
|
662
|
+
title: column.title,
|
|
663
|
+
path: column.path,
|
|
664
|
+
sortable: column.sortable,
|
|
665
|
+
// @ts-ignore
|
|
666
|
+
displayType: { ...viewTypeItem },
|
|
667
|
+
// @ts-ignore
|
|
668
|
+
defaultSort: sortItem ? { ...sortItem } : { ...sortItems[0] },
|
|
669
|
+
...(columnDateFormat && {
|
|
670
|
+
dateFormat: columnDateFormat,
|
|
671
|
+
}),
|
|
672
|
+
});
|
|
673
|
+
this.openModal('edit');
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
updateObjectManagementListColumn(objectId, listColumn) {
|
|
677
|
+
this.disableInput();
|
|
678
|
+
this.objectManagementService
|
|
679
|
+
.putSearchList(objectId, this.formGroup.value.key, listColumn)
|
|
680
|
+
.pipe(tap(() => {
|
|
681
|
+
this.refreshObjectManagementListColumns();
|
|
682
|
+
localStorage.setItem(`list-search-${objectId}`, null);
|
|
683
|
+
}), catchError(() => {
|
|
684
|
+
this.enableInput();
|
|
685
|
+
return of(null);
|
|
686
|
+
}))
|
|
687
|
+
.subscribe();
|
|
688
|
+
}
|
|
689
|
+
addColumn() {
|
|
690
|
+
const formValue = this.formGroup.value;
|
|
691
|
+
this.objectId$
|
|
692
|
+
.pipe(take(1), switchMap(objectId => this.objectManagementService.postSearchList(objectId, this.mapFormValuesToColumn(formValue))), tap(() => {
|
|
693
|
+
this.closeModal();
|
|
694
|
+
this.refreshObjectManagementListColumns();
|
|
695
|
+
}), catchError(() => {
|
|
696
|
+
this.enableInput();
|
|
697
|
+
return of(null);
|
|
698
|
+
}))
|
|
699
|
+
.subscribe();
|
|
700
|
+
}
|
|
701
|
+
getDisplayTypeParametersView(displayTypeParameters) {
|
|
702
|
+
if (displayTypeParameters?.dateFormat) {
|
|
703
|
+
return displayTypeParameters.dateFormat;
|
|
704
|
+
}
|
|
705
|
+
else if (displayTypeParameters?.enum) {
|
|
706
|
+
return Object.keys(displayTypeParameters.enum).reduce((acc, curr) => {
|
|
707
|
+
const keyValuePairString = `${curr}: ${displayTypeParameters.enum[curr]}`;
|
|
708
|
+
if (!acc) {
|
|
709
|
+
return `${keyValuePairString}`;
|
|
710
|
+
}
|
|
711
|
+
else {
|
|
712
|
+
return `${acc}, ${keyValuePairString}`;
|
|
713
|
+
}
|
|
714
|
+
}, '');
|
|
715
|
+
}
|
|
716
|
+
else {
|
|
717
|
+
return '-';
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
updateColumn() {
|
|
721
|
+
this.objectId$
|
|
722
|
+
.pipe(take(1), switchMap(objectId => this.objectManagementService.putSearchList(objectId, this.formGroup.value.key, this.mapFormValuesToColumn(this.formGroup.value))), tap(() => {
|
|
723
|
+
this.closeModal();
|
|
724
|
+
this.refreshObjectManagementListColumns();
|
|
725
|
+
}), catchError(() => {
|
|
726
|
+
this.enableInput();
|
|
727
|
+
return of(null);
|
|
728
|
+
}))
|
|
729
|
+
.subscribe();
|
|
730
|
+
}
|
|
731
|
+
setDownload(objectId, ObjectManagementListColumns) {
|
|
732
|
+
this.downloadName$.next(`${objectId}.json`);
|
|
733
|
+
this.downloadUrl$.next(this.sanitizer.bypassSecurityTrustUrl('data:text/json;charset=UTF-8,' +
|
|
734
|
+
encodeURIComponent(JSON.stringify(ObjectManagementListColumns, null, 2))));
|
|
735
|
+
}
|
|
736
|
+
disableInput() {
|
|
737
|
+
this.disableInput$.next(true);
|
|
738
|
+
this.formGroup.disable();
|
|
739
|
+
}
|
|
740
|
+
enableInput() {
|
|
741
|
+
this.disableInput$.next(false);
|
|
742
|
+
this.formGroup.enable();
|
|
743
|
+
}
|
|
744
|
+
refreshObjectManagementListColumns() {
|
|
745
|
+
this.refreshObjectManagementListColumns$.next(null);
|
|
746
|
+
}
|
|
747
|
+
resetFormGroup() {
|
|
748
|
+
this.formGroup.reset();
|
|
749
|
+
combineLatest([this.sortItems$, this.viewTypeItems$])
|
|
750
|
+
.pipe(take(1))
|
|
751
|
+
.subscribe(([sortItems, viewTypeItems]) => {
|
|
752
|
+
this.defaultEnumValues$.next([{ key: '', value: '' }]);
|
|
753
|
+
this.selectedViewTypeItemIndex$.next(0);
|
|
754
|
+
// @ts-ignore
|
|
755
|
+
this.formGroup.patchValue({ displayType: viewTypeItems[0] });
|
|
756
|
+
this.selectedSortItemIndex$.next(0);
|
|
757
|
+
// @ts-ignore
|
|
758
|
+
this.formGroup.patchValue({ defaultSort: sortItems[0] });
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
mapFormValuesToColumn(formValue) {
|
|
762
|
+
return {
|
|
763
|
+
key: formValue.key,
|
|
764
|
+
sortable: formValue.sortable,
|
|
765
|
+
...(formValue.defaultSort?.key !== this.INVALID_KEY && {
|
|
766
|
+
defaultSort: formValue.defaultSort?.key,
|
|
767
|
+
}),
|
|
768
|
+
title: formValue.title || '',
|
|
769
|
+
path: formValue.path,
|
|
770
|
+
displayType: {
|
|
771
|
+
type: formValue.displayType?.key,
|
|
772
|
+
displayTypeParameters: {
|
|
773
|
+
...(formValue.dateFormat && { dateFormat: formValue.dateFormat }),
|
|
774
|
+
...(Array.isArray(formValue.enum) &&
|
|
775
|
+
formValue.enum.length > 0 && {
|
|
776
|
+
enum: formValue.enum.reduce((acc, curr) => ({ ...acc, [curr.key]: curr.value }), {}),
|
|
777
|
+
}),
|
|
778
|
+
},
|
|
779
|
+
},
|
|
780
|
+
};
|
|
781
|
+
}
|
|
352
782
|
}
|
|
353
|
-
|
|
354
|
-
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", 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"] }] });
|
|
355
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type:
|
|
783
|
+
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 });
|
|
784
|
+
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" }] });
|
|
785
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListColumnsComponent, decorators: [{
|
|
356
786
|
type: Component,
|
|
357
|
-
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", 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"] }]
|
|
358
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
359
|
-
type:
|
|
787
|
+
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"] }]
|
|
788
|
+
}], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: i2.ActivatedRoute }, { type: i3$1.TranslateService }, { type: i4.ConfigService }, { type: i5$1.DomSanitizer }]; }, propDecorators: { moveRowButtonsTemplateRef: [{
|
|
789
|
+
type: ViewChild,
|
|
790
|
+
args: ['moveRowButtons']
|
|
791
|
+
}] } });
|
|
792
|
+
|
|
793
|
+
/*
|
|
794
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
795
|
+
*
|
|
796
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
797
|
+
* you may not use this file except in compliance with the License.
|
|
798
|
+
* You may obtain a copy of the License at
|
|
799
|
+
*
|
|
800
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
801
|
+
*
|
|
802
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
803
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
804
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
805
|
+
* See the License for the specific language governing permissions and
|
|
806
|
+
* limitations under the License.
|
|
807
|
+
*/
|
|
808
|
+
class ObjectManagementListSearchFieldsComponent {
|
|
809
|
+
constructor(objectManagementService, route, translateService, configService, sanitizer) {
|
|
810
|
+
this.objectManagementService = objectManagementService;
|
|
811
|
+
this.route = route;
|
|
812
|
+
this.translateService = translateService;
|
|
813
|
+
this.configService = configService;
|
|
814
|
+
this.sanitizer = sanitizer;
|
|
815
|
+
this.downloadName$ = new BehaviorSubject('');
|
|
816
|
+
this.downloadUrl$ = new BehaviorSubject(undefined);
|
|
817
|
+
this.loading$ = new BehaviorSubject(true);
|
|
818
|
+
this.currentModalType$ = new BehaviorSubject('create');
|
|
819
|
+
this.showModal$ = new BehaviorSubject(false);
|
|
820
|
+
this.disableInput$ = new BehaviorSubject(false);
|
|
821
|
+
this.showDeleteModal$ = new Subject();
|
|
822
|
+
this.deleteRowIndex$ = new BehaviorSubject(0);
|
|
823
|
+
this.INVALID_KEY = 'invalid';
|
|
824
|
+
this.formGroup = new FormGroup({
|
|
825
|
+
title: new FormControl(''),
|
|
826
|
+
key: new FormControl('', Validators.required),
|
|
827
|
+
path: new FormControl('', Validators.required),
|
|
828
|
+
dataType: new FormControl({
|
|
829
|
+
key: this.INVALID_KEY,
|
|
830
|
+
}),
|
|
831
|
+
fieldType: new FormControl({
|
|
832
|
+
key: this.INVALID_KEY,
|
|
833
|
+
}),
|
|
834
|
+
});
|
|
835
|
+
this.COLUMNS = [
|
|
836
|
+
{
|
|
837
|
+
viewType: 'string',
|
|
838
|
+
sortable: false,
|
|
839
|
+
propertyName: 'title',
|
|
840
|
+
translationKey: 'title',
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
viewType: 'string',
|
|
844
|
+
sortable: false,
|
|
845
|
+
propertyName: 'key',
|
|
846
|
+
translationKey: 'key',
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
viewType: 'string',
|
|
850
|
+
sortable: false,
|
|
851
|
+
propertyName: 'path',
|
|
852
|
+
translationKey: 'path',
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
viewType: 'string',
|
|
856
|
+
sortable: false,
|
|
857
|
+
propertyName: 'dataType',
|
|
858
|
+
translationKey: 'dataType',
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
viewType: 'string',
|
|
862
|
+
sortable: false,
|
|
863
|
+
propertyName: 'fieldType',
|
|
864
|
+
translationKey: 'fieldType',
|
|
865
|
+
},
|
|
866
|
+
];
|
|
867
|
+
this.DATA_TYPES = [
|
|
868
|
+
'text',
|
|
869
|
+
'number',
|
|
870
|
+
'date',
|
|
871
|
+
'datetime',
|
|
872
|
+
'boolean',
|
|
873
|
+
];
|
|
874
|
+
this.FIELD_TYPES = ['single', 'range'];
|
|
875
|
+
this.cachedObjectManagementListSearchFields = [];
|
|
876
|
+
this.refreshObjectManagementListSearchFields$ = new BehaviorSubject(null);
|
|
877
|
+
this.objectManagementFields$ = this.translateService
|
|
878
|
+
.stream('key')
|
|
879
|
+
.pipe(map(() => this.COLUMNS.map(column => ({
|
|
880
|
+
key: column.propertyName,
|
|
881
|
+
label: this.translateService.instant(`searchFieldsOverview.${column.translationKey}`),
|
|
882
|
+
sortable: column.sortable,
|
|
883
|
+
...(column.viewType && { viewType: column.viewType }),
|
|
884
|
+
}))));
|
|
885
|
+
this.objectId$ = this.route.params.pipe(map(params => params.id || ''), filter(objectId => !!objectId));
|
|
886
|
+
this.objectManagementListSearchFields$ = combineLatest([
|
|
887
|
+
this.objectId$,
|
|
888
|
+
this.refreshObjectManagementListSearchFields$,
|
|
889
|
+
]).pipe(switchMap(([objectId]) => this.objectManagementService.getSearchField(objectId)), tap(objectManagementListSearchFields => {
|
|
890
|
+
this.objectId$.pipe(take(1)).subscribe(objectId => {
|
|
891
|
+
if (objectManagementListSearchFields &&
|
|
892
|
+
Array.isArray(objectManagementListSearchFields) &&
|
|
893
|
+
objectManagementListSearchFields.length > 0) {
|
|
894
|
+
this.setDownload(objectId, objectManagementListSearchFields);
|
|
895
|
+
}
|
|
896
|
+
});
|
|
897
|
+
}), tap(objectManagementListSearchFields => {
|
|
898
|
+
this.cachedObjectManagementListSearchFields = objectManagementListSearchFields;
|
|
899
|
+
this.loading$.next(false);
|
|
900
|
+
this.enableInput();
|
|
901
|
+
}));
|
|
902
|
+
this.translatedObjectManagementListSearchFields$ = combineLatest([
|
|
903
|
+
this.objectManagementListSearchFields$,
|
|
904
|
+
this.translateService.stream('key'),
|
|
905
|
+
]).pipe(map(([columns]) => columns.map(column => ({
|
|
906
|
+
...column,
|
|
907
|
+
title: column.title || '-',
|
|
908
|
+
dataType: this.translateService.instant(`searchFields.${column?.dataType?.toLowerCase()}`),
|
|
909
|
+
fieldType: this.translateService.instant(`searchFieldsOverview.${column?.fieldType?.toLowerCase()}`),
|
|
910
|
+
}))));
|
|
911
|
+
this.selectedDataTypeItemIndex$ = new BehaviorSubject(0);
|
|
912
|
+
this.dataTypeItems$ = combineLatest([
|
|
913
|
+
this.selectedDataTypeItemIndex$,
|
|
914
|
+
this.translateService.stream('key'),
|
|
915
|
+
]).pipe(map(([selectedDataTypeItemIndex]) => [
|
|
916
|
+
{
|
|
917
|
+
content: this.translateService.instant(`searchFieldDataType.select`),
|
|
918
|
+
key: this.INVALID_KEY,
|
|
919
|
+
},
|
|
920
|
+
...this.DATA_TYPES.map(type => ({
|
|
921
|
+
content: this.translateService.instant(`searchFields.${type}`),
|
|
922
|
+
key: type.toUpperCase(),
|
|
923
|
+
})),
|
|
924
|
+
].map((item, index) => ({
|
|
925
|
+
...item,
|
|
926
|
+
selected: index === selectedDataTypeItemIndex,
|
|
927
|
+
}))));
|
|
928
|
+
this.selectedFieldTypeItemIndex$ = new BehaviorSubject(0);
|
|
929
|
+
this.fieldTypeItems$ = combineLatest([
|
|
930
|
+
this.selectedFieldTypeItemIndex$,
|
|
931
|
+
this.translateService.stream('key'),
|
|
932
|
+
]).pipe(map(([selectedFieldTypeItemIndex]) => [
|
|
933
|
+
{
|
|
934
|
+
content: this.translateService.instant(`searchFieldFieldType.select`),
|
|
935
|
+
key: this.INVALID_KEY,
|
|
936
|
+
},
|
|
937
|
+
...this.FIELD_TYPES.map(type => ({
|
|
938
|
+
content: this.translateService.instant(`searchFieldsOverview.${type}`),
|
|
939
|
+
key: type.toUpperCase(),
|
|
940
|
+
})),
|
|
941
|
+
].map((item, index) => ({
|
|
942
|
+
...item,
|
|
943
|
+
selected: index === selectedFieldTypeItemIndex,
|
|
944
|
+
}))));
|
|
945
|
+
this.validKey$ = combineLatest([this.formGroup.valueChanges, this.currentModalType$]).pipe(map(([formValues, currentModalType]) => {
|
|
946
|
+
const existingKeys = this.cachedObjectManagementListSearchFields.map(column => column.key);
|
|
947
|
+
return currentModalType === 'create' ? !existingKeys.includes(formValues.key) : true;
|
|
948
|
+
}), startWith(false));
|
|
949
|
+
this.valid$ = combineLatest([this.formGroup.valueChanges, this.validKey$]).pipe(map(([formValues, validKey]) => !!(formValues.path && validKey)), startWith(false));
|
|
950
|
+
}
|
|
951
|
+
openModal(modalType) {
|
|
952
|
+
this.showModal$.next(true);
|
|
953
|
+
this.currentModalType$.next(modalType);
|
|
954
|
+
if (modalType === 'create') {
|
|
955
|
+
this.formGroup.controls['key'].enable();
|
|
956
|
+
this.resetFormGroup();
|
|
957
|
+
}
|
|
958
|
+
else if (modalType === 'edit') {
|
|
959
|
+
this.formGroup.controls['key'].disable();
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
closeModal() {
|
|
963
|
+
this.showModal$.next(false);
|
|
964
|
+
}
|
|
965
|
+
deleteRow(listSearchFieldRowIndex, clickEvent) {
|
|
966
|
+
clickEvent.stopPropagation();
|
|
967
|
+
this.showDeleteModal$.next(true);
|
|
968
|
+
this.deleteRowIndex$.next(listSearchFieldRowIndex);
|
|
969
|
+
}
|
|
970
|
+
deleteRowConfirmation(listSearchFieldRowIndex) {
|
|
971
|
+
const columnKey = this.getColumnKey(listSearchFieldRowIndex);
|
|
972
|
+
if (columnKey) {
|
|
973
|
+
this.disableInput();
|
|
974
|
+
this.objectId$
|
|
975
|
+
.pipe(take(1), switchMap(objectId => this.objectManagementService.deleteSearchField(objectId, columnKey)), tap(() => this.refreshObjectManagementListSearchFields()), catchError(() => {
|
|
976
|
+
this.enableInput();
|
|
977
|
+
return of(null);
|
|
978
|
+
}))
|
|
979
|
+
.subscribe();
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
getColumnKey(listSearchFieldRowIndex) {
|
|
983
|
+
return this.cachedObjectManagementListSearchFields[listSearchFieldRowIndex]?.key;
|
|
984
|
+
}
|
|
985
|
+
moveRow(listSearchFieldRowIndex, moveUp, clickEvent, objectId) {
|
|
986
|
+
const objectManagementListSearchFields = [...this.cachedObjectManagementListSearchFields];
|
|
987
|
+
const listSearchFieldRow = objectManagementListSearchFields[listSearchFieldRowIndex];
|
|
988
|
+
clickEvent.stopPropagation();
|
|
989
|
+
}
|
|
990
|
+
saveListSearchFields() {
|
|
991
|
+
this.disableInput();
|
|
992
|
+
this.currentModalType$.pipe(take(1)).subscribe(currentModalType => {
|
|
993
|
+
if (currentModalType === 'create') {
|
|
994
|
+
this.addSearchField();
|
|
995
|
+
}
|
|
996
|
+
else {
|
|
997
|
+
this.updateSearchField();
|
|
998
|
+
}
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
columnRowClicked(row) {
|
|
1002
|
+
this.resetFormGroup();
|
|
1003
|
+
combineLatest([this.dataTypeItems$, this.fieldTypeItems$])
|
|
1004
|
+
.pipe(take(1))
|
|
1005
|
+
.subscribe(([dataTypeItems, fieldTypeItems]) => {
|
|
1006
|
+
const column = this.cachedObjectManagementListSearchFields.find(cachedColumn => cachedColumn.key === row.key);
|
|
1007
|
+
console.log(dataTypeItems);
|
|
1008
|
+
const dataTypeItem = dataTypeItems.find(item => item.key === column.dataType);
|
|
1009
|
+
const dataTypeItemIndex = dataTypeItems.findIndex(item => item.key === column.dataType);
|
|
1010
|
+
const fieldTypeItem = fieldTypeItems.find(item => item.key === column.fieldType);
|
|
1011
|
+
const fieldTypeItemIndex = fieldTypeItems.findIndex(item => item.key === column.fieldType);
|
|
1012
|
+
this.selectedDataTypeItemIndex$.next(dataTypeItemIndex);
|
|
1013
|
+
this.selectedFieldTypeItemIndex$.next(fieldTypeItemIndex);
|
|
1014
|
+
this.formGroup.patchValue({
|
|
1015
|
+
key: column.key,
|
|
1016
|
+
title: column.title,
|
|
1017
|
+
path: column.path,
|
|
1018
|
+
// @ts-ignore
|
|
1019
|
+
dataType: { ...dataTypeItem },
|
|
1020
|
+
// @ts-ignore
|
|
1021
|
+
fieldType: { ...fieldTypeItem },
|
|
1022
|
+
});
|
|
1023
|
+
this.openModal('edit');
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
updateObjectManagementListSearchField(objectId, searchField) {
|
|
1027
|
+
this.disableInput();
|
|
1028
|
+
this.objectManagementService
|
|
1029
|
+
.putSearchField(objectId, this.formGroup.value.key, searchField)
|
|
1030
|
+
.pipe(tap(() => {
|
|
1031
|
+
this.refreshObjectManagementListSearchFields();
|
|
1032
|
+
localStorage.setItem(`list-search-fields${objectId}`, null);
|
|
1033
|
+
}), catchError(() => {
|
|
1034
|
+
this.enableInput();
|
|
1035
|
+
return of(null);
|
|
1036
|
+
}))
|
|
1037
|
+
.subscribe();
|
|
1038
|
+
}
|
|
1039
|
+
addSearchField() {
|
|
1040
|
+
const formValue = this.formGroup.value;
|
|
1041
|
+
this.objectId$
|
|
1042
|
+
.pipe(take(1), switchMap(objectId => this.objectManagementService.postSearchField(objectId, this.mapFormValuesToColumn(formValue))), tap(() => {
|
|
1043
|
+
this.closeModal();
|
|
1044
|
+
this.refreshObjectManagementListSearchFields();
|
|
1045
|
+
}), catchError(() => {
|
|
1046
|
+
this.enableInput();
|
|
1047
|
+
return of(null);
|
|
1048
|
+
}))
|
|
1049
|
+
.subscribe();
|
|
1050
|
+
}
|
|
1051
|
+
updateSearchField() {
|
|
1052
|
+
this.objectId$
|
|
1053
|
+
.pipe(take(1), switchMap(objectId => this.objectManagementService.putSearchField(objectId, this.formGroup.value.key, this.mapFormValuesToColumn(this.formGroup.value))), tap(() => {
|
|
1054
|
+
this.closeModal();
|
|
1055
|
+
this.refreshObjectManagementListSearchFields();
|
|
1056
|
+
}), catchError(() => {
|
|
1057
|
+
this.enableInput();
|
|
1058
|
+
return of(null);
|
|
1059
|
+
}))
|
|
1060
|
+
.subscribe();
|
|
1061
|
+
}
|
|
1062
|
+
setDownload(objectId, ObjectManagementSearchFields) {
|
|
1063
|
+
this.downloadName$.next(`${objectId}.json`);
|
|
1064
|
+
this.downloadUrl$.next(this.sanitizer.bypassSecurityTrustUrl('data:text/json;charset=UTF-8,' +
|
|
1065
|
+
encodeURIComponent(JSON.stringify(ObjectManagementSearchFields, null, 2))));
|
|
1066
|
+
}
|
|
1067
|
+
disableInput() {
|
|
1068
|
+
this.disableInput$.next(true);
|
|
1069
|
+
this.formGroup.disable();
|
|
1070
|
+
}
|
|
1071
|
+
enableInput() {
|
|
1072
|
+
this.disableInput$.next(false);
|
|
1073
|
+
this.formGroup.enable();
|
|
1074
|
+
}
|
|
1075
|
+
refreshObjectManagementListSearchFields() {
|
|
1076
|
+
this.refreshObjectManagementListSearchFields$.next(null);
|
|
1077
|
+
}
|
|
1078
|
+
resetFormGroup() {
|
|
1079
|
+
this.formGroup.reset();
|
|
1080
|
+
this.selectedDataTypeItemIndex$.next(0);
|
|
1081
|
+
this.selectedFieldTypeItemIndex$.next(0);
|
|
1082
|
+
}
|
|
1083
|
+
mapFormValuesToColumn(formValue) {
|
|
1084
|
+
return {
|
|
1085
|
+
key: formValue.key,
|
|
1086
|
+
title: formValue.title || '',
|
|
1087
|
+
path: formValue.path,
|
|
1088
|
+
dataType: formValue.dataType.key,
|
|
1089
|
+
fieldType: formValue.fieldType.key,
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
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 });
|
|
1094
|
+
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" }] });
|
|
1095
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListSearchFieldsComponent, decorators: [{
|
|
1096
|
+
type: Component,
|
|
1097
|
+
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"] }]
|
|
1098
|
+
}], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: i2.ActivatedRoute }, { type: i3$1.TranslateService }, { type: i4.ConfigService }, { type: i5$1.DomSanitizer }]; }, propDecorators: { moveRowButtonsTemplateRef: [{
|
|
1099
|
+
type: ViewChild,
|
|
1100
|
+
args: ['moveRowButtons']
|
|
360
1101
|
}] } });
|
|
361
1102
|
|
|
362
1103
|
/*
|
|
@@ -400,12 +1141,12 @@ class ObjectManagementDetailContainerComponent {
|
|
|
400
1141
|
this.tabSubscription?.unsubscribe();
|
|
401
1142
|
}
|
|
402
1143
|
}
|
|
403
|
-
ObjectManagementDetailContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementDetailContainerComponent, deps: [{ token: ObjectManagementStateService }, { token: ObjectManagementService }, { token:
|
|
404
|
-
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-
|
|
1144
|
+
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 });
|
|
1145
|
+
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" }] });
|
|
405
1146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementDetailContainerComponent, decorators: [{
|
|
406
1147
|
type: Component,
|
|
407
|
-
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-
|
|
408
|
-
}], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type:
|
|
1148
|
+
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"] }]
|
|
1149
|
+
}], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i2.ActivatedRoute }, { type: i4.ConfigService }, { type: TabService }]; } });
|
|
409
1150
|
|
|
410
1151
|
/*
|
|
411
1152
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
@@ -538,6 +1279,7 @@ class ObjectManagementUploadModalComponent {
|
|
|
538
1279
|
'title',
|
|
539
1280
|
'objecttypenApiPluginConfigurationId',
|
|
540
1281
|
'objecttypeId',
|
|
1282
|
+
'objecttypeVersion',
|
|
541
1283
|
'objectenApiPluginConfigurationId',
|
|
542
1284
|
'showInDataMenu',
|
|
543
1285
|
]);
|
|
@@ -567,12 +1309,12 @@ class ObjectManagementUploadModalComponent {
|
|
|
567
1309
|
this.disabled$.next(false);
|
|
568
1310
|
}
|
|
569
1311
|
}
|
|
570
|
-
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:
|
|
571
|
-
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:
|
|
1312
|
+
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 });
|
|
1313
|
+
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" }] });
|
|
572
1314
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementUploadModalComponent, decorators: [{
|
|
573
1315
|
type: Component,
|
|
574
1316
|
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"] }]
|
|
575
|
-
}], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i3.FormManagementService }, { type: i4.PluginManagementService }, { type: i5.ModalService }, { type:
|
|
1317
|
+
}], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i3.FormManagementService }, { type: i4$1.PluginManagementService }, { type: i5.ModalService }, { type: i3$1.TranslateService }]; }, propDecorators: { objectManagementUploadModal: [{
|
|
576
1318
|
type: ViewChild,
|
|
577
1319
|
args: ['objectManagementUploadModal']
|
|
578
1320
|
}], objecttypes: [{
|
|
@@ -605,7 +1347,7 @@ class ObjectManagementListComponent {
|
|
|
605
1347
|
this.objecttypesInstances$ = combineLatest([
|
|
606
1348
|
this.translateService.stream('key'),
|
|
607
1349
|
this.objectManagementState.refresh$,
|
|
608
|
-
]).pipe(tap(() => this.setFields()), switchMap$1(() => this.objectManagementService.getAllObjects()), tap(() => this.loading$.next(false)));
|
|
1350
|
+
]).pipe(tap$1(() => this.setFields()), switchMap$1(() => this.objectManagementService.getAllObjects()), tap$1(() => this.loading$.next(false)));
|
|
609
1351
|
}
|
|
610
1352
|
showAddModal() {
|
|
611
1353
|
this.objectManagementState.setModalType('add');
|
|
@@ -626,12 +1368,12 @@ class ObjectManagementListComponent {
|
|
|
626
1368
|
})));
|
|
627
1369
|
}
|
|
628
1370
|
}
|
|
629
|
-
ObjectManagementListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListComponent, deps: [{ token: ObjectManagementService }, { token: ObjectManagementStateService }, { token:
|
|
630
|
-
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:
|
|
1371
|
+
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 });
|
|
1372
|
+
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" }] });
|
|
631
1373
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListComponent, decorators: [{
|
|
632
1374
|
type: Component,
|
|
633
1375
|
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"] }]
|
|
634
|
-
}], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: ObjectManagementStateService }, { type:
|
|
1376
|
+
}], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: ObjectManagementStateService }, { type: i3$1.TranslateService }, { type: i2.Router }]; } });
|
|
635
1377
|
|
|
636
1378
|
/*
|
|
637
1379
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
@@ -665,7 +1407,7 @@ const routes = [
|
|
|
665
1407
|
class ObjectManagementRoutingModule {
|
|
666
1408
|
}
|
|
667
1409
|
ObjectManagementRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
668
|
-
ObjectManagementRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementRoutingModule, imports: [CommonModule,
|
|
1410
|
+
ObjectManagementRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementRoutingModule, imports: [CommonModule, i2.RouterModule], exports: [RouterModule] });
|
|
669
1411
|
ObjectManagementRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] });
|
|
670
1412
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementRoutingModule, decorators: [{
|
|
671
1413
|
type: NgModule,
|
|
@@ -697,9 +1439,10 @@ ObjectManagementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", v
|
|
|
697
1439
|
ObjectManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModule, declarations: [ObjectManagementListComponent,
|
|
698
1440
|
ObjectManagementDetailContainerComponent,
|
|
699
1441
|
ObjectManagementDetailComponent,
|
|
700
|
-
|
|
1442
|
+
ObjectManagementListColumnsComponent,
|
|
701
1443
|
ObjectManagementModalComponent,
|
|
702
|
-
ObjectManagementUploadModalComponent
|
|
1444
|
+
ObjectManagementUploadModalComponent,
|
|
1445
|
+
ObjectManagementListSearchFieldsComponent], imports: [CommonModule,
|
|
703
1446
|
DropzoneModule,
|
|
704
1447
|
WidgetModule,
|
|
705
1448
|
ListModule,
|
|
@@ -710,7 +1453,22 @@ ObjectManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
710
1453
|
ButtonModule,
|
|
711
1454
|
FormModule,
|
|
712
1455
|
InputModule,
|
|
713
|
-
SelectModule
|
|
1456
|
+
SelectModule,
|
|
1457
|
+
InputModule$1,
|
|
1458
|
+
ButtonModule$1,
|
|
1459
|
+
TooltipIconModule,
|
|
1460
|
+
CarbonMultiInputModule,
|
|
1461
|
+
ModalModule$1,
|
|
1462
|
+
NotificationModule,
|
|
1463
|
+
LoadingModule,
|
|
1464
|
+
DropdownModule,
|
|
1465
|
+
CheckboxModule,
|
|
1466
|
+
LinkModule,
|
|
1467
|
+
IconModule,
|
|
1468
|
+
ReactiveFormsModule,
|
|
1469
|
+
ConfirmationModalModule,
|
|
1470
|
+
SpinnerModule,
|
|
1471
|
+
ModalModule$2] });
|
|
714
1472
|
ObjectManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModule, imports: [CommonModule,
|
|
715
1473
|
DropzoneModule,
|
|
716
1474
|
WidgetModule,
|
|
@@ -722,7 +1480,22 @@ ObjectManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
722
1480
|
ButtonModule,
|
|
723
1481
|
FormModule,
|
|
724
1482
|
InputModule,
|
|
725
|
-
SelectModule
|
|
1483
|
+
SelectModule,
|
|
1484
|
+
InputModule$1,
|
|
1485
|
+
ButtonModule$1,
|
|
1486
|
+
TooltipIconModule,
|
|
1487
|
+
CarbonMultiInputModule,
|
|
1488
|
+
ModalModule$1,
|
|
1489
|
+
NotificationModule,
|
|
1490
|
+
LoadingModule,
|
|
1491
|
+
DropdownModule,
|
|
1492
|
+
CheckboxModule,
|
|
1493
|
+
LinkModule,
|
|
1494
|
+
IconModule,
|
|
1495
|
+
ReactiveFormsModule,
|
|
1496
|
+
ConfirmationModalModule,
|
|
1497
|
+
SpinnerModule,
|
|
1498
|
+
ModalModule$2] });
|
|
726
1499
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModule, decorators: [{
|
|
727
1500
|
type: NgModule,
|
|
728
1501
|
args: [{
|
|
@@ -730,9 +1503,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
730
1503
|
ObjectManagementListComponent,
|
|
731
1504
|
ObjectManagementDetailContainerComponent,
|
|
732
1505
|
ObjectManagementDetailComponent,
|
|
733
|
-
|
|
1506
|
+
ObjectManagementListColumnsComponent,
|
|
734
1507
|
ObjectManagementModalComponent,
|
|
735
1508
|
ObjectManagementUploadModalComponent,
|
|
1509
|
+
ObjectManagementListSearchFieldsComponent,
|
|
736
1510
|
],
|
|
737
1511
|
imports: [
|
|
738
1512
|
CommonModule,
|
|
@@ -747,6 +1521,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
747
1521
|
FormModule,
|
|
748
1522
|
InputModule,
|
|
749
1523
|
SelectModule,
|
|
1524
|
+
InputModule$1,
|
|
1525
|
+
ButtonModule$1,
|
|
1526
|
+
TooltipIconModule,
|
|
1527
|
+
CarbonMultiInputModule,
|
|
1528
|
+
ModalModule$1,
|
|
1529
|
+
NotificationModule,
|
|
1530
|
+
LoadingModule,
|
|
1531
|
+
DropdownModule,
|
|
1532
|
+
CheckboxModule,
|
|
1533
|
+
LinkModule,
|
|
1534
|
+
IconModule,
|
|
1535
|
+
ReactiveFormsModule,
|
|
1536
|
+
ConfirmationModalModule,
|
|
1537
|
+
SpinnerModule,
|
|
1538
|
+
ModalModule$2,
|
|
750
1539
|
],
|
|
751
1540
|
exports: [],
|
|
752
1541
|
}]
|