@valtimo/plugin-management 5.5.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/esm2020/lib/components/plugin-add-modal/plugin-add-modal.component.mjs +13 -15
- package/esm2020/lib/components/plugin-add-select/plugin-add-select.component.mjs +10 -10
- package/esm2020/lib/components/plugin-configure/plugin-configure.component.mjs +5 -3
- package/esm2020/lib/components/plugin-edit/plugin-edit.component.mjs +51 -0
- package/esm2020/lib/components/plugin-edit-modal/plugin-edit-modal.component.mjs +113 -0
- package/esm2020/lib/components/plugin-management/plugin-management.component.mjs +13 -8
- package/esm2020/lib/models/index.mjs +1 -2
- package/esm2020/lib/plugin-management.module.mjs +13 -3
- package/esm2020/lib/services/index.mjs +1 -2
- package/esm2020/lib/services/plugin-management-state.service.mjs +20 -2
- package/esm2020/public-api.mjs +3 -1
- package/fesm2015/valtimo-plugin-management.mjs +208 -92
- package/fesm2015/valtimo-plugin-management.mjs.map +1 -1
- package/fesm2020/valtimo-plugin-management.mjs +209 -111
- package/fesm2020/valtimo-plugin-management.mjs.map +1 -1
- package/lib/components/plugin-add-modal/plugin-add-modal.component.d.ts +3 -3
- package/lib/components/plugin-add-modal/plugin-add-modal.component.d.ts.map +1 -1
- package/lib/components/plugin-add-select/plugin-add-select.component.d.ts +3 -3
- package/lib/components/plugin-add-select/plugin-add-select.component.d.ts.map +1 -1
- package/lib/components/plugin-configure/plugin-configure.component.d.ts +1 -0
- package/lib/components/plugin-configure/plugin-configure.component.d.ts.map +1 -1
- package/lib/components/plugin-edit/plugin-edit.component.d.ts +21 -0
- package/lib/components/plugin-edit/plugin-edit.component.d.ts.map +1 -0
- package/lib/components/plugin-edit-modal/plugin-edit-modal.component.d.ts +32 -0
- package/lib/components/plugin-edit-modal/plugin-edit-modal.component.d.ts.map +1 -0
- package/lib/components/plugin-management/plugin-management.component.d.ts +4 -3
- package/lib/components/plugin-management/plugin-management.component.d.ts.map +1 -1
- package/lib/models/index.d.ts +0 -1
- package/lib/models/index.d.ts.map +1 -1
- package/lib/plugin-management.module.d.ts +9 -7
- package/lib/plugin-management.module.d.ts.map +1 -1
- package/lib/services/index.d.ts +0 -1
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/plugin-management-state.service.d.ts +9 -2
- package/lib/services/plugin-management-state.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/public-api.d.ts.map +1 -1
- package/esm2020/lib/models/plugin.model.mjs +0 -17
- package/esm2020/lib/services/plugin-management.service.mjs +0 -67
- package/lib/models/plugin.model.d.ts +0 -26
- package/lib/models/plugin.model.d.ts.map +0 -1
- package/lib/services/plugin-management.service.d.ts +0 -24
- package/lib/services/plugin-management.service.d.ts.map +0 -1
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Component, EventEmitter, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Subject, BehaviorSubject, combineLatest, of } from 'rxjs';
|
|
4
4
|
import { map, take, switchMap, tap } from 'rxjs/operators';
|
|
5
|
-
import * as i1 from '@valtimo/
|
|
6
|
-
import { ROLE_ADMIN } from '@valtimo/config';
|
|
7
|
-
import * as i2 from '@valtimo/plugin';
|
|
5
|
+
import * as i1 from '@valtimo/plugin';
|
|
8
6
|
import { PluginTranslatePipeModule, PluginConfigurationContainerModule } from '@valtimo/plugin';
|
|
9
|
-
import * as
|
|
10
|
-
import * as i4 from '@angular/common/http';
|
|
7
|
+
import * as i2 from '@angular/platform-browser';
|
|
11
8
|
import * as i1$1 from '@angular/router';
|
|
12
9
|
import { RouterModule } from '@angular/router';
|
|
13
|
-
import * as
|
|
10
|
+
import * as i5 from '@angular/common';
|
|
14
11
|
import { CommonModule } from '@angular/common';
|
|
15
12
|
import { AuthGuardService } from '@valtimo/security';
|
|
16
|
-
import
|
|
13
|
+
import { ROLE_ADMIN } from '@valtimo/config';
|
|
14
|
+
import * as i3 from '@ngx-translate/core';
|
|
17
15
|
import { TranslateModule } from '@ngx-translate/core';
|
|
18
|
-
import * as i2$
|
|
16
|
+
import * as i2$1 from '@valtimo/user-interface';
|
|
19
17
|
import { PageModule, ParagraphModule, TitleModule, TableModule, StepperModule, ModalModule, ButtonModule, CardModule } from '@valtimo/user-interface';
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
18
|
+
import * as i4 from 'ngx-logger';
|
|
19
|
+
import * as i6 from '@angular/flex-layout/flex';
|
|
22
20
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
23
21
|
|
|
24
22
|
/*
|
|
@@ -53,81 +51,6 @@ import { FlexLayoutModule } from '@angular/flex-layout';
|
|
|
53
51
|
* limitations under the License.
|
|
54
52
|
*/
|
|
55
53
|
|
|
56
|
-
/*
|
|
57
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
58
|
-
*
|
|
59
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
60
|
-
* you may not use this file except in compliance with the License.
|
|
61
|
-
* You may obtain a copy of the License at
|
|
62
|
-
*
|
|
63
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
64
|
-
*
|
|
65
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
66
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
67
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
68
|
-
* See the License for the specific language governing permissions and
|
|
69
|
-
* limitations under the License.
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
/*
|
|
73
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
74
|
-
*
|
|
75
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
76
|
-
* you may not use this file except in compliance with the License.
|
|
77
|
-
* You may obtain a copy of the License at
|
|
78
|
-
*
|
|
79
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
80
|
-
*
|
|
81
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
82
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
83
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
84
|
-
* See the License for the specific language governing permissions and
|
|
85
|
-
* limitations under the License.
|
|
86
|
-
*/
|
|
87
|
-
class PluginManagementService {
|
|
88
|
-
constructor(configService, pluginService, sanitizer, http) {
|
|
89
|
-
this.configService = configService;
|
|
90
|
-
this.pluginService = pluginService;
|
|
91
|
-
this.sanitizer = sanitizer;
|
|
92
|
-
this.http = http;
|
|
93
|
-
this.VALTIMO_API_ENDPOINT_URI = this.configService.config.valtimoApi.endpointUri;
|
|
94
|
-
}
|
|
95
|
-
getPluginDefinitions() {
|
|
96
|
-
return this.http.get(`${this.VALTIMO_API_ENDPOINT_URI}plugin/definition`);
|
|
97
|
-
}
|
|
98
|
-
getPluginFunctions(pluginDefinitionId) {
|
|
99
|
-
return this.http.get(`${this.VALTIMO_API_ENDPOINT_URI}plugin/definition/${pluginDefinitionId}/action`);
|
|
100
|
-
}
|
|
101
|
-
getAllPluginConfigurations() {
|
|
102
|
-
return this.http.get(`${this.VALTIMO_API_ENDPOINT_URI}plugin/configuration`);
|
|
103
|
-
}
|
|
104
|
-
getAllPluginConfigurationsWithLogos() {
|
|
105
|
-
return this.returnPluginConfigurationsWithLogos(this.getAllPluginConfigurations());
|
|
106
|
-
}
|
|
107
|
-
savePluginConfiguration(pluginConfiguration) {
|
|
108
|
-
return this.http.post(`${this.VALTIMO_API_ENDPOINT_URI}plugin/configuration`, pluginConfiguration);
|
|
109
|
-
}
|
|
110
|
-
returnPluginConfigurationsWithLogos(pluginConfigurations$) {
|
|
111
|
-
return combineLatest([pluginConfigurations$, this.pluginService.pluginSpecifications$]).pipe(map(([pluginConfigurations, pluginSpecifications]) => pluginConfigurations?.map(pluginConfiguration => {
|
|
112
|
-
const pluginSpecification = pluginSpecifications.find(specification => specification.pluginId === pluginConfiguration?.pluginDefinition?.key);
|
|
113
|
-
return {
|
|
114
|
-
...pluginConfiguration,
|
|
115
|
-
...(pluginSpecification?.pluginLogoBase64 && {
|
|
116
|
-
pluginLogoBase64: this.sanitizer.bypassSecurityTrustResourceUrl(pluginSpecification?.pluginLogoBase64),
|
|
117
|
-
}),
|
|
118
|
-
};
|
|
119
|
-
})));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
PluginManagementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementService, deps: [{ token: i1.ConfigService }, { token: i2.PluginService }, { token: i3.DomSanitizer }, { token: i4.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
123
|
-
PluginManagementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementService, providedIn: 'root' });
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementService, decorators: [{
|
|
125
|
-
type: Injectable,
|
|
126
|
-
args: [{
|
|
127
|
-
providedIn: 'root',
|
|
128
|
-
}]
|
|
129
|
-
}], ctorParameters: function () { return [{ type: i1.ConfigService }, { type: i2.PluginService }, { type: i3.DomSanitizer }, { type: i4.HttpClient }]; } });
|
|
130
|
-
|
|
131
54
|
/*
|
|
132
55
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
133
56
|
*
|
|
@@ -152,6 +75,7 @@ class PluginManagementStateService {
|
|
|
152
75
|
this._inputDisabled$ = new BehaviorSubject(false);
|
|
153
76
|
this._refresh$ = new BehaviorSubject(null);
|
|
154
77
|
this._save$ = new Subject();
|
|
78
|
+
this._saveEdit$ = new Subject();
|
|
155
79
|
this._delete$ = new Subject();
|
|
156
80
|
this._hideModalSaveButton$ = new BehaviorSubject(false);
|
|
157
81
|
this._pluginDefinitions$ = new BehaviorSubject(undefined);
|
|
@@ -171,6 +95,7 @@ class PluginManagementStateService {
|
|
|
171
95
|
};
|
|
172
96
|
})));
|
|
173
97
|
this._selectedPluginDefinition$ = new BehaviorSubject(undefined);
|
|
98
|
+
this._selectedPluginConfiguration$ = new BehaviorSubject(undefined);
|
|
174
99
|
}
|
|
175
100
|
get showModal$() {
|
|
176
101
|
return this._showModal$.asObservable();
|
|
@@ -193,9 +118,15 @@ class PluginManagementStateService {
|
|
|
193
118
|
get selectedPluginDefinition$() {
|
|
194
119
|
return this._selectedPluginDefinition$.asObservable();
|
|
195
120
|
}
|
|
121
|
+
get selectedPluginConfiguration$() {
|
|
122
|
+
return this._selectedPluginConfiguration$.asObservable();
|
|
123
|
+
}
|
|
196
124
|
get save$() {
|
|
197
125
|
return this._save$.asObservable();
|
|
198
126
|
}
|
|
127
|
+
get saveEdit$() {
|
|
128
|
+
return this._saveEdit$.asObservable();
|
|
129
|
+
}
|
|
199
130
|
get delete$() {
|
|
200
131
|
return this._delete$.asObservable();
|
|
201
132
|
}
|
|
@@ -223,12 +154,21 @@ class PluginManagementStateService {
|
|
|
223
154
|
selectPluginDefinition(definition) {
|
|
224
155
|
this._selectedPluginDefinition$.next(definition);
|
|
225
156
|
}
|
|
157
|
+
selectPluginConfiguration(configuration) {
|
|
158
|
+
this._selectedPluginConfiguration$.next(configuration);
|
|
159
|
+
}
|
|
226
160
|
clearSelectedPluginDefinition() {
|
|
227
161
|
this._selectedPluginDefinition$.next(undefined);
|
|
228
162
|
}
|
|
163
|
+
clearSelectedPluginConfiguration() {
|
|
164
|
+
this._selectedPluginConfiguration$.next(undefined);
|
|
165
|
+
}
|
|
229
166
|
save() {
|
|
230
167
|
this._save$.next(null);
|
|
231
168
|
}
|
|
169
|
+
saveEdit() {
|
|
170
|
+
this._saveEdit$.next(null);
|
|
171
|
+
}
|
|
232
172
|
delete() {
|
|
233
173
|
this._delete$.next(null);
|
|
234
174
|
}
|
|
@@ -239,17 +179,18 @@ class PluginManagementStateService {
|
|
|
239
179
|
this._hideModalSaveButton$.next(false);
|
|
240
180
|
}
|
|
241
181
|
clear() {
|
|
242
|
-
this.
|
|
182
|
+
this.clearSelectedPluginDefinition();
|
|
183
|
+
this.clearSelectedPluginConfiguration();
|
|
243
184
|
}
|
|
244
185
|
}
|
|
245
|
-
PluginManagementStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementStateService, deps: [{ token:
|
|
186
|
+
PluginManagementStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementStateService, deps: [{ token: i1.PluginService }, { token: i2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
246
187
|
PluginManagementStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementStateService, providedIn: 'root' });
|
|
247
188
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementStateService, decorators: [{
|
|
248
189
|
type: Injectable,
|
|
249
190
|
args: [{
|
|
250
191
|
providedIn: 'root',
|
|
251
192
|
}]
|
|
252
|
-
}], ctorParameters: function () { return [{ type:
|
|
193
|
+
}], ctorParameters: function () { return [{ type: i1.PluginService }, { type: i2.DomSanitizer }]; } });
|
|
253
194
|
|
|
254
195
|
/*
|
|
255
196
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
@@ -318,12 +259,12 @@ class PluginAddSelectComponent {
|
|
|
318
259
|
});
|
|
319
260
|
}
|
|
320
261
|
}
|
|
321
|
-
PluginAddSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginAddSelectComponent, deps: [{ token: PluginManagementService }, { token: PluginManagementStateService }, { token:
|
|
322
|
-
PluginAddSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PluginAddSelectComponent, selector: "valtimo-plugin-add-select", 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<ng-container *ngIf=\"pluginDefinitionsWithLogos$ | async as pluginDefinitions; else loading\">\n <div fxLayout=\"row wrap\" fxLayoutGap=\"22px grid\">\n <ng-container\n *ngTemplateOutlet=\"pluginDefinitionsTemplate; context: {pluginDefinitions: pluginDefinitions}\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n noPluginDefinitionsTemplate;\n context: {pluginDefinitions: pluginDefinitions}\n \"\n ></ng-container>\n </div>\n</ng-container>\n\n<ng-template #noPluginDefinitionsTemplate let-pluginDefinitions=\"pluginDefinitions\">\n <div fxFlex=\"100%\" *ngIf=\"pluginDefinitions?.length === 0\">\n <v-paragraph [center]=\"true\" [fullWidth]=\"true\">{{\n 'pluginManagement.noDefinitions' | translate\n }}</v-paragraph>\n </div>\n</ng-template>\n\n<ng-template #pluginDefinitionsTemplate let-pluginDefinitions=\"pluginDefinitions\">\n <div fxFlex=\"33.3%\" *ngFor=\"let pluginDefinition of pluginDefinitions\">\n <v-card\n [title]=\"'title' | pluginTranslate: pluginDefinition.key | async\"\n [description]=\"'description' | pluginTranslate: pluginDefinition.key | async\"\n [selectable]=\"true\"\n [selected]=\"(selectedPluginDefinition$ | async)?.key === pluginDefinition.key\"\n [fullHeight]=\"true\"\n (selectEvent)=\"selectPluginDefinition(pluginDefinition)\"\n (deselectEvent)=\"deselectPluginDefinition()\"\n >\n <div *ngIf=\"pluginDefinition.pluginLogoBase64\" role=\"header\">\n <img\n class=\"plugin-definition-logo\"\n [title]=\"'title' | pluginTranslate: pluginDefinition.key | async\"\n [src]=\"pluginDefinition.pluginLogoBase64\"\n />\n </div>\n </v-card>\n </div>\n</ng-template>\n\n<ng-template #loading>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"22px grid\">\n <ng-container *ngTemplateOutlet=\"loadingCard\"></ng-container>\n <ng-container *ngTemplateOutlet=\"loadingCard\"></ng-container>\n <ng-container *ngTemplateOutlet=\"loadingCard\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #loadingCard>\n <div fxFlex=\"33.3%\">\n <v-card [loading]=\"true\" [loadingDescription]=\"true\" [loadingTitle]=\"true\"></v-card>\n </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 */.btn-back{position:absolute}.cards-container{display:flex;flex-flow:row wrap;width:100%}.card{width:calc(33.3% - 20px);margin-right:30px}.card:nth-child(3n+3){margin-right:0}.card-header{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.plugin-definition-logo{object-fit:contain;height:60px;width:100%}\n"], components: [{ type: i2$
|
|
262
|
+
PluginAddSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginAddSelectComponent, deps: [{ token: i1.PluginManagementService }, { token: PluginManagementStateService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
263
|
+
PluginAddSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PluginAddSelectComponent, selector: "valtimo-plugin-add-select", 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<ng-container *ngIf=\"pluginDefinitionsWithLogos$ | async as pluginDefinitions; else loading\">\n <div fxLayout=\"row wrap\" fxLayoutGap=\"22px grid\">\n <ng-container\n *ngTemplateOutlet=\"pluginDefinitionsTemplate; context: {pluginDefinitions: pluginDefinitions}\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n noPluginDefinitionsTemplate;\n context: {pluginDefinitions: pluginDefinitions}\n \"\n ></ng-container>\n </div>\n</ng-container>\n\n<ng-template #noPluginDefinitionsTemplate let-pluginDefinitions=\"pluginDefinitions\">\n <div fxFlex=\"100%\" *ngIf=\"pluginDefinitions?.length === 0\">\n <v-paragraph [center]=\"true\" [fullWidth]=\"true\">{{\n 'pluginManagement.noDefinitions' | translate\n }}</v-paragraph>\n </div>\n</ng-template>\n\n<ng-template #pluginDefinitionsTemplate let-pluginDefinitions=\"pluginDefinitions\">\n <div fxFlex=\"33.3%\" *ngFor=\"let pluginDefinition of pluginDefinitions\">\n <v-card\n [title]=\"'title' | pluginTranslate: pluginDefinition.key | async\"\n [description]=\"'description' | pluginTranslate: pluginDefinition.key | async\"\n [selectable]=\"true\"\n [selected]=\"(selectedPluginDefinition$ | async)?.key === pluginDefinition.key\"\n [fullHeight]=\"true\"\n (selectEvent)=\"selectPluginDefinition(pluginDefinition)\"\n (deselectEvent)=\"deselectPluginDefinition()\"\n >\n <div *ngIf=\"pluginDefinition.pluginLogoBase64\" role=\"header\">\n <img\n class=\"plugin-definition-logo\"\n [title]=\"'title' | pluginTranslate: pluginDefinition.key | async\"\n [src]=\"pluginDefinition.pluginLogoBase64\"\n />\n </div>\n </v-card>\n </div>\n</ng-template>\n\n<ng-template #loading>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"22px grid\">\n <ng-container *ngTemplateOutlet=\"loadingCard\"></ng-container>\n <ng-container *ngTemplateOutlet=\"loadingCard\"></ng-container>\n <ng-container *ngTemplateOutlet=\"loadingCard\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #loadingCard>\n <div fxFlex=\"33.3%\">\n <v-card [loading]=\"true\" [loadingDescription]=\"true\" [loadingTitle]=\"true\"></v-card>\n </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 */.btn-back{position:absolute}.cards-container{display:flex;flex-flow:row wrap;width:100%}.card{width:calc(33.3% - 20px);margin-right:30px}.card:nth-child(3n+3){margin-right:0}.card-header{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.plugin-definition-logo{object-fit:contain;height:60px;width:100%}\n"], components: [{ type: i2$1.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { type: i2$1.CardComponent, selector: "v-card", inputs: ["titleTranslationKey", "title", "descriptionTranslationKey", "description", "selectable", "selected", "fullHeight", "loading", "loadingTitle", "loadingDescription"], outputs: ["selectEvent", "deselectEvent"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i5.AsyncPipe, "translate": i3.TranslatePipe, "pluginTranslate": i1.PluginTranslatePipe } });
|
|
323
264
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginAddSelectComponent, decorators: [{
|
|
324
265
|
type: Component,
|
|
325
266
|
args: [{ selector: 'valtimo-plugin-add-select', 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<ng-container *ngIf=\"pluginDefinitionsWithLogos$ | async as pluginDefinitions; else loading\">\n <div fxLayout=\"row wrap\" fxLayoutGap=\"22px grid\">\n <ng-container\n *ngTemplateOutlet=\"pluginDefinitionsTemplate; context: {pluginDefinitions: pluginDefinitions}\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n noPluginDefinitionsTemplate;\n context: {pluginDefinitions: pluginDefinitions}\n \"\n ></ng-container>\n </div>\n</ng-container>\n\n<ng-template #noPluginDefinitionsTemplate let-pluginDefinitions=\"pluginDefinitions\">\n <div fxFlex=\"100%\" *ngIf=\"pluginDefinitions?.length === 0\">\n <v-paragraph [center]=\"true\" [fullWidth]=\"true\">{{\n 'pluginManagement.noDefinitions' | translate\n }}</v-paragraph>\n </div>\n</ng-template>\n\n<ng-template #pluginDefinitionsTemplate let-pluginDefinitions=\"pluginDefinitions\">\n <div fxFlex=\"33.3%\" *ngFor=\"let pluginDefinition of pluginDefinitions\">\n <v-card\n [title]=\"'title' | pluginTranslate: pluginDefinition.key | async\"\n [description]=\"'description' | pluginTranslate: pluginDefinition.key | async\"\n [selectable]=\"true\"\n [selected]=\"(selectedPluginDefinition$ | async)?.key === pluginDefinition.key\"\n [fullHeight]=\"true\"\n (selectEvent)=\"selectPluginDefinition(pluginDefinition)\"\n (deselectEvent)=\"deselectPluginDefinition()\"\n >\n <div *ngIf=\"pluginDefinition.pluginLogoBase64\" role=\"header\">\n <img\n class=\"plugin-definition-logo\"\n [title]=\"'title' | pluginTranslate: pluginDefinition.key | async\"\n [src]=\"pluginDefinition.pluginLogoBase64\"\n />\n </div>\n </v-card>\n </div>\n</ng-template>\n\n<ng-template #loading>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"22px grid\">\n <ng-container *ngTemplateOutlet=\"loadingCard\"></ng-container>\n <ng-container *ngTemplateOutlet=\"loadingCard\"></ng-container>\n <ng-container *ngTemplateOutlet=\"loadingCard\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #loadingCard>\n <div fxFlex=\"33.3%\">\n <v-card [loading]=\"true\" [loadingDescription]=\"true\" [loadingTitle]=\"true\"></v-card>\n </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 */.btn-back{position:absolute}.cards-container{display:flex;flex-flow:row wrap;width:100%}.card{width:calc(33.3% - 20px);margin-right:30px}.card:nth-child(3n+3){margin-right:0}.card-header{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.plugin-definition-logo{object-fit:contain;height:60px;width:100%}\n"] }]
|
|
326
|
-
}], ctorParameters: function () { return [{ type: PluginManagementService }, { type: PluginManagementStateService }, { type:
|
|
267
|
+
}], ctorParameters: function () { return [{ type: i1.PluginManagementService }, { type: PluginManagementStateService }, { type: i3.TranslateService }]; } });
|
|
327
268
|
|
|
328
269
|
/*
|
|
329
270
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
@@ -347,6 +288,7 @@ class PluginConfigureComponent {
|
|
|
347
288
|
this.configuration = new EventEmitter();
|
|
348
289
|
this.save$ = this.stateService.save$;
|
|
349
290
|
this.pluginDefinitionKey$ = this.stateService.selectedPluginDefinition$.pipe(map(definition => definition?.key));
|
|
291
|
+
this.prefillConfiguration$ = of(undefined);
|
|
350
292
|
this.disabled$ = this.stateService.inputDisabled$;
|
|
351
293
|
}
|
|
352
294
|
onValid(valid) {
|
|
@@ -357,10 +299,10 @@ class PluginConfigureComponent {
|
|
|
357
299
|
}
|
|
358
300
|
}
|
|
359
301
|
PluginConfigureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginConfigureComponent, deps: [{ token: PluginManagementStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
360
|
-
PluginConfigureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PluginConfigureComponent, selector: "valtimo-plugin-configure", outputs: { valid: "valid", configuration: "configuration" }, 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<valtimo-plugin-configuration-container\n
|
|
302
|
+
PluginConfigureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PluginConfigureComponent, selector: "valtimo-plugin-configure", outputs: { valid: "valid", configuration: "configuration" }, 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<valtimo-plugin-configuration-container\n *ngIf=\"pluginDefinitionKey$ | async as pluginDefinitionKey\"\n [pluginDefinitionKey]=\"pluginDefinitionKey\"\n [prefillConfiguration$]=\"prefillConfiguration$\"\n [save$]=\"save$\"\n [disabled$]=\"disabled$\"\n (valid)=\"onValid($event)\"\n (configuration)=\"onFunctionConfiguration($event)\"\n type=\"configuration\"\n></valtimo-plugin-configuration-container>\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"], components: [{ type: i1.PluginConfigurationContainerComponent, selector: "valtimo-plugin-configuration-container", inputs: ["type", "pluginDefinitionKey", "functionKey", "save$", "disabled$", "prefillConfiguration$"], outputs: ["valid", "configuration"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe } });
|
|
361
303
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginConfigureComponent, decorators: [{
|
|
362
304
|
type: Component,
|
|
363
|
-
args: [{ selector: 'valtimo-plugin-configure', 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<valtimo-plugin-configuration-container\n
|
|
305
|
+
args: [{ selector: 'valtimo-plugin-configure', 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<valtimo-plugin-configuration-container\n *ngIf=\"pluginDefinitionKey$ | async as pluginDefinitionKey\"\n [pluginDefinitionKey]=\"pluginDefinitionKey\"\n [prefillConfiguration$]=\"prefillConfiguration$\"\n [save$]=\"save$\"\n [disabled$]=\"disabled$\"\n (valid)=\"onValid($event)\"\n (configuration)=\"onFunctionConfiguration($event)\"\n type=\"configuration\"\n></valtimo-plugin-configuration-container>\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"] }]
|
|
364
306
|
}], ctorParameters: function () { return [{ type: PluginManagementStateService }]; }, propDecorators: { valid: [{
|
|
365
307
|
type: Output
|
|
366
308
|
}], configuration: [{
|
|
@@ -405,13 +347,10 @@ class PluginAddModalComponent {
|
|
|
405
347
|
}
|
|
406
348
|
hide() {
|
|
407
349
|
this.stateService.disableInput();
|
|
408
|
-
this.modalService.closeModal()
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
this.stateService.enableInput();
|
|
413
|
-
this.stateService.clear();
|
|
414
|
-
}, appearingDelay);
|
|
350
|
+
this.modalService.closeModal(() => {
|
|
351
|
+
this.returnToFirstStep();
|
|
352
|
+
this.stateService.enableInput();
|
|
353
|
+
this.stateService.clear();
|
|
415
354
|
});
|
|
416
355
|
}
|
|
417
356
|
onValid(valid) {
|
|
@@ -456,16 +395,163 @@ class PluginAddModalComponent {
|
|
|
456
395
|
this.modalService.openModal(this.pluginAddModal);
|
|
457
396
|
}
|
|
458
397
|
}
|
|
459
|
-
PluginAddModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginAddModalComponent, deps: [{ token: PluginManagementStateService }, { token: i2$
|
|
460
|
-
PluginAddModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PluginAddModalComponent, selector: "valtimo-plugin-add-modal", viewQueries: [{ propertyName: "pluginAddModal", first: true, predicate: ["pluginAddModal"], 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-stepper-container\n (completeEvent)=\"complete()\"\n (cancelClickEvent)=\"hide()\"\n [disabled]=\"inputDisabled$ | async\"\n [returnToFirstStepSubject$]=\"returnToFirstStepSubject$\"\n>\n <v-modal #pluginAddModal (closeEvent)=\"hide()\">\n <div role=\"header\">\n <v-stepper-header></v-stepper-header>\n </div>\n <div role=\"content\">\n <v-stepper-content>\n <v-stepper-step titleTranslationKey=\"pluginManagement.addSteps.step0\">\n <valtimo-plugin-add-select></valtimo-plugin-add-select>\n </v-stepper-step>\n <v-stepper-step titleTranslationKey=\"pluginManagement.addSteps.step1\">\n <valtimo-plugin-configure\n (valid)=\"onValid($event)\"\n (configuration)=\"onConfiguration($event)\"\n ></valtimo-plugin-configure>\n </v-stepper-step>\n </v-stepper-content>\n </div>\n <div role=\"footer\">\n <v-stepper-footer>\n <v-stepper-footer-step\n nextButtonTranslationKey=\"pluginManagement.addSteps.step1\"\n [nextButtonEnabled]=\"selectedPluginDefinition$ | async\"\n ></v-stepper-footer-step>\n <v-stepper-footer-step\n completeButtonTranslationKey=\"pluginManagement.addSteps.complete\"\n [completeButtonEnabled]=\"configurationValid$ | async\"\n ></v-stepper-footer-step>\n </v-stepper-footer>\n </div>\n </v-modal>\n</v-stepper-container>\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"], components: [{ type: i2$
|
|
398
|
+
PluginAddModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginAddModalComponent, deps: [{ token: PluginManagementStateService }, { token: i2$1.ModalService }, { token: i1.PluginManagementService }, { token: i4.NGXLogger }], target: i0.ɵɵFactoryTarget.Component });
|
|
399
|
+
PluginAddModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PluginAddModalComponent, selector: "valtimo-plugin-add-modal", viewQueries: [{ propertyName: "pluginAddModal", first: true, predicate: ["pluginAddModal"], 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-stepper-container\n (completeEvent)=\"complete()\"\n (cancelClickEvent)=\"hide()\"\n [disabled]=\"inputDisabled$ | async\"\n [returnToFirstStepSubject$]=\"returnToFirstStepSubject$\"\n>\n <v-modal #pluginAddModal (closeEvent)=\"hide()\">\n <div role=\"header\">\n <v-stepper-header></v-stepper-header>\n </div>\n <div role=\"content\">\n <v-stepper-content>\n <v-stepper-step titleTranslationKey=\"pluginManagement.addSteps.step0\">\n <valtimo-plugin-add-select></valtimo-plugin-add-select>\n </v-stepper-step>\n <v-stepper-step titleTranslationKey=\"pluginManagement.addSteps.step1\">\n <valtimo-plugin-configure\n (valid)=\"onValid($event)\"\n (configuration)=\"onConfiguration($event)\"\n ></valtimo-plugin-configure>\n </v-stepper-step>\n </v-stepper-content>\n </div>\n <div role=\"footer\">\n <v-stepper-footer>\n <v-stepper-footer-step\n nextButtonTranslationKey=\"pluginManagement.addSteps.step1\"\n [nextButtonEnabled]=\"selectedPluginDefinition$ | async\"\n ></v-stepper-footer-step>\n <v-stepper-footer-step\n completeButtonTranslationKey=\"pluginManagement.addSteps.complete\"\n [completeButtonEnabled]=\"configurationValid$ | async\"\n ></v-stepper-footer-step>\n </v-stepper-footer>\n </div>\n </v-modal>\n</v-stepper-container>\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"], components: [{ type: i2$1.StepperContainerComponent, selector: "v-stepper-container", inputs: ["returnToFirstStepSubject$", "disabled"], outputs: ["cancelClickEvent", "completeEvent", "nextStepEvent"] }, { type: i2$1.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx"], outputs: ["closeEvent"] }, { type: i2$1.StepperHeaderComponent, selector: "v-stepper-header" }, { type: i2$1.StepperContentComponent, selector: "v-stepper-content" }, { type: i2$1.StepperStepComponent, selector: "v-stepper-step", inputs: ["titleTranslationKey"] }, { type: PluginAddSelectComponent, selector: "valtimo-plugin-add-select" }, { type: PluginConfigureComponent, selector: "valtimo-plugin-configure", outputs: ["valid", "configuration"] }, { type: i2$1.StepperFooterComponent, selector: "v-stepper-footer" }, { type: i2$1.StepperFooterStepComponent, selector: "v-stepper-footer-step", inputs: ["nextButtonEnabled", "completeButtonEnabled", "nextButtonTranslationKey", "cancelButtonTranslationKey", "completeButtonTranslationKey", "completeButtonMdiIcon", "showCompleteButton"] }], pipes: { "async": i5.AsyncPipe } });
|
|
461
400
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginAddModalComponent, decorators: [{
|
|
462
401
|
type: Component,
|
|
463
402
|
args: [{ selector: 'valtimo-plugin-add-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-stepper-container\n (completeEvent)=\"complete()\"\n (cancelClickEvent)=\"hide()\"\n [disabled]=\"inputDisabled$ | async\"\n [returnToFirstStepSubject$]=\"returnToFirstStepSubject$\"\n>\n <v-modal #pluginAddModal (closeEvent)=\"hide()\">\n <div role=\"header\">\n <v-stepper-header></v-stepper-header>\n </div>\n <div role=\"content\">\n <v-stepper-content>\n <v-stepper-step titleTranslationKey=\"pluginManagement.addSteps.step0\">\n <valtimo-plugin-add-select></valtimo-plugin-add-select>\n </v-stepper-step>\n <v-stepper-step titleTranslationKey=\"pluginManagement.addSteps.step1\">\n <valtimo-plugin-configure\n (valid)=\"onValid($event)\"\n (configuration)=\"onConfiguration($event)\"\n ></valtimo-plugin-configure>\n </v-stepper-step>\n </v-stepper-content>\n </div>\n <div role=\"footer\">\n <v-stepper-footer>\n <v-stepper-footer-step\n nextButtonTranslationKey=\"pluginManagement.addSteps.step1\"\n [nextButtonEnabled]=\"selectedPluginDefinition$ | async\"\n ></v-stepper-footer-step>\n <v-stepper-footer-step\n completeButtonTranslationKey=\"pluginManagement.addSteps.complete\"\n [completeButtonEnabled]=\"configurationValid$ | async\"\n ></v-stepper-footer-step>\n </v-stepper-footer>\n </div>\n </v-modal>\n</v-stepper-container>\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"] }]
|
|
464
|
-
}], ctorParameters: function () { return [{ type: PluginManagementStateService }, { type: i2$
|
|
403
|
+
}], ctorParameters: function () { return [{ type: PluginManagementStateService }, { type: i2$1.ModalService }, { type: i1.PluginManagementService }, { type: i4.NGXLogger }]; }, propDecorators: { pluginAddModal: [{
|
|
465
404
|
type: ViewChild,
|
|
466
405
|
args: ['pluginAddModal']
|
|
467
406
|
}] } });
|
|
468
407
|
|
|
408
|
+
/*
|
|
409
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
410
|
+
*
|
|
411
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
412
|
+
* you may not use this file except in compliance with the License.
|
|
413
|
+
* You may obtain a copy of the License at
|
|
414
|
+
*
|
|
415
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
416
|
+
*
|
|
417
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
418
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
419
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
420
|
+
* See the License for the specific language governing permissions and
|
|
421
|
+
* limitations under the License.
|
|
422
|
+
*/
|
|
423
|
+
class PluginEditComponent {
|
|
424
|
+
constructor(stateService) {
|
|
425
|
+
this.stateService = stateService;
|
|
426
|
+
this.valid = new EventEmitter();
|
|
427
|
+
this.configuration = new EventEmitter();
|
|
428
|
+
this.saveEdit$ = this.stateService.saveEdit$;
|
|
429
|
+
this.pluginDefinitionKey$ = this.stateService.selectedPluginConfiguration$.pipe(map(configuration => configuration?.pluginDefinition?.key));
|
|
430
|
+
this.prefillConfiguration$ = this.stateService.selectedPluginConfiguration$.pipe(map(configuration => configuration
|
|
431
|
+
? { ...configuration.properties, configurationTitle: configuration.title }
|
|
432
|
+
: undefined));
|
|
433
|
+
this.disabled$ = this.stateService.inputDisabled$;
|
|
434
|
+
}
|
|
435
|
+
onValid(valid) {
|
|
436
|
+
this.valid.emit(valid);
|
|
437
|
+
}
|
|
438
|
+
onFunctionConfiguration(configuration) {
|
|
439
|
+
this.configuration.emit(configuration);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
PluginEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginEditComponent, deps: [{ token: PluginManagementStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
443
|
+
PluginEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PluginEditComponent, selector: "valtimo-plugin-edit", outputs: { valid: "valid", configuration: "configuration" }, 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<valtimo-plugin-configuration-container\n *ngIf=\"pluginDefinitionKey$ | async as pluginDefinitionKey\"\n [pluginDefinitionKey]=\"pluginDefinitionKey\"\n [prefillConfiguration$]=\"prefillConfiguration$\"\n [save$]=\"saveEdit$\"\n [disabled$]=\"disabled$\"\n (valid)=\"onValid($event)\"\n (configuration)=\"onFunctionConfiguration($event)\"\n type=\"configuration\"\n></valtimo-plugin-configuration-container>\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"], components: [{ type: i1.PluginConfigurationContainerComponent, selector: "valtimo-plugin-configuration-container", inputs: ["type", "pluginDefinitionKey", "functionKey", "save$", "disabled$", "prefillConfiguration$"], outputs: ["valid", "configuration"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe } });
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginEditComponent, decorators: [{
|
|
445
|
+
type: Component,
|
|
446
|
+
args: [{ selector: 'valtimo-plugin-edit', 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<valtimo-plugin-configuration-container\n *ngIf=\"pluginDefinitionKey$ | async as pluginDefinitionKey\"\n [pluginDefinitionKey]=\"pluginDefinitionKey\"\n [prefillConfiguration$]=\"prefillConfiguration$\"\n [save$]=\"saveEdit$\"\n [disabled$]=\"disabled$\"\n (valid)=\"onValid($event)\"\n (configuration)=\"onFunctionConfiguration($event)\"\n type=\"configuration\"\n></valtimo-plugin-configuration-container>\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"] }]
|
|
447
|
+
}], ctorParameters: function () { return [{ type: PluginManagementStateService }]; }, propDecorators: { valid: [{
|
|
448
|
+
type: Output
|
|
449
|
+
}], configuration: [{
|
|
450
|
+
type: Output
|
|
451
|
+
}] } });
|
|
452
|
+
|
|
453
|
+
/*
|
|
454
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
455
|
+
*
|
|
456
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
457
|
+
* you may not use this file except in compliance with the License.
|
|
458
|
+
* You may obtain a copy of the License at
|
|
459
|
+
*
|
|
460
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
461
|
+
*
|
|
462
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
463
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
464
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
465
|
+
* See the License for the specific language governing permissions and
|
|
466
|
+
* limitations under the License.
|
|
467
|
+
*/
|
|
468
|
+
class PluginEditModalComponent {
|
|
469
|
+
constructor(stateService, modalService, pluginManagementService, logger) {
|
|
470
|
+
this.stateService = stateService;
|
|
471
|
+
this.modalService = modalService;
|
|
472
|
+
this.pluginManagementService = pluginManagementService;
|
|
473
|
+
this.logger = logger;
|
|
474
|
+
this.inputDisabled$ = this.stateService.inputDisabled$;
|
|
475
|
+
this.selectedPluginConfiguration$ = this.stateService.selectedPluginConfiguration$;
|
|
476
|
+
this.configurationValid$ = new BehaviorSubject(false);
|
|
477
|
+
}
|
|
478
|
+
ngOnInit() {
|
|
479
|
+
this.openShowSubscription();
|
|
480
|
+
this.openHideSubscription();
|
|
481
|
+
}
|
|
482
|
+
save() {
|
|
483
|
+
this.stateService.saveEdit();
|
|
484
|
+
}
|
|
485
|
+
delete() {
|
|
486
|
+
this.stateService.disableInput();
|
|
487
|
+
this.stateService.selectedPluginConfiguration$
|
|
488
|
+
.pipe(take(1))
|
|
489
|
+
.subscribe(selectedPluginConfiguration => {
|
|
490
|
+
this.pluginManagementService
|
|
491
|
+
.deletePluginConfiguration(selectedPluginConfiguration.id)
|
|
492
|
+
.subscribe(() => {
|
|
493
|
+
this.stateService.refresh();
|
|
494
|
+
this.hide();
|
|
495
|
+
}, () => {
|
|
496
|
+
this.logger.error('Something went wrong with deleting the plugin configuration.');
|
|
497
|
+
this.stateService.enableInput();
|
|
498
|
+
});
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
hide() {
|
|
502
|
+
this.modalService.closeModal(() => {
|
|
503
|
+
this.stateService.enableInput();
|
|
504
|
+
this.stateService.clear();
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
onPluginValid(valid) {
|
|
508
|
+
this.configurationValid$.next(valid);
|
|
509
|
+
}
|
|
510
|
+
onPluginConfiguration(configuration) {
|
|
511
|
+
this.stateService.disableInput();
|
|
512
|
+
this.stateService.selectedPluginConfiguration$
|
|
513
|
+
.pipe(take(1))
|
|
514
|
+
.subscribe(selectedPluginConfiguration => {
|
|
515
|
+
const configurationTitle = configuration.configurationTitle;
|
|
516
|
+
const configurationData = { ...configuration };
|
|
517
|
+
delete configurationData['configurationTitle'];
|
|
518
|
+
this.pluginManagementService
|
|
519
|
+
.updatePluginConfiguration(selectedPluginConfiguration.id, configurationTitle, configurationData)
|
|
520
|
+
.subscribe(() => {
|
|
521
|
+
this.stateService.refresh();
|
|
522
|
+
this.hide();
|
|
523
|
+
}, () => {
|
|
524
|
+
this.logger.error('Something went wrong with updating the plugin configuration.');
|
|
525
|
+
this.stateService.enableInput();
|
|
526
|
+
});
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
openShowSubscription() {
|
|
530
|
+
this.showSubscription = this.stateService.showModal$.subscribe(modalType => {
|
|
531
|
+
if (modalType === 'edit') {
|
|
532
|
+
this.show();
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
openHideSubscription() {
|
|
537
|
+
this.hideSubscription = this.stateService.hideModal$.subscribe(() => {
|
|
538
|
+
this.hide();
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
show() {
|
|
542
|
+
this.modalService.openModal(this.pluginEditModal);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
PluginEditModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginEditModalComponent, deps: [{ token: PluginManagementStateService }, { token: i2$1.ModalService }, { token: i1.PluginManagementService }, { token: i4.NGXLogger }], target: i0.ɵɵFactoryTarget.Component });
|
|
546
|
+
PluginEditModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PluginEditModalComponent, selector: "valtimo-plugin-edit-modal", viewQueries: [{ propertyName: "pluginEditModal", first: true, predicate: ["pluginEditModal"], 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 #pluginEditModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{selectedConfiguration: selectedPluginConfiguration$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [margin]=\"false\" type=\"h2\">{{\n obs.selectedConfiguration?.title +\n ' - ' +\n ('title' | pluginTranslate: obs.selectedConfiguration?.pluginDefinition?.key | async)\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <valtimo-plugin-edit\n (valid)=\"onPluginValid($event)\"\n (configuration)=\"onPluginConfiguration($event)\"\n ></valtimo-plugin-edit>\n </div>\n <div role=\"footer\">\n <div class=\"edit-plugin-buttons\">\n <v-button\n [disabled]=\"inputDisabled$ | async\"\n (clickEvent)=\"delete()\"\n [mdiIcon]=\"'delete'\"\n type=\"danger\"\n >{{ 'pluginManagement.remove' | translate }}</v-button\n >\n <v-button\n [disabled]=\"(configurationValid$ | async) === false || (inputDisabled$ | async)\"\n (clickEvent)=\"save()\"\n [mdiIcon]=\"'check'\"\n type=\"success\"\n >{{ 'pluginManagement.save' | translate }}</v-button\n >\n </div>\n </div>\n</v-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 */.edit-plugin-buttons{display:flex;width:100%;justify-content:space-between}.edit-configuration-title{display:flex;width:100%;justify-content:center}\n"], components: [{ type: i2$1.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx"], outputs: ["closeEvent"] }, { type: i2$1.TitleComponent, selector: "v-title", inputs: ["type", "margin"] }, { type: PluginEditComponent, selector: "valtimo-plugin-edit", outputs: ["valid", "configuration"] }, { type: i2$1.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe, "pluginTranslate": i1.PluginTranslatePipe, "translate": i3.TranslatePipe } });
|
|
547
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginEditModalComponent, decorators: [{
|
|
548
|
+
type: Component,
|
|
549
|
+
args: [{ selector: 'valtimo-plugin-edit-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 #pluginEditModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{selectedConfiguration: selectedPluginConfiguration$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [margin]=\"false\" type=\"h2\">{{\n obs.selectedConfiguration?.title +\n ' - ' +\n ('title' | pluginTranslate: obs.selectedConfiguration?.pluginDefinition?.key | async)\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <valtimo-plugin-edit\n (valid)=\"onPluginValid($event)\"\n (configuration)=\"onPluginConfiguration($event)\"\n ></valtimo-plugin-edit>\n </div>\n <div role=\"footer\">\n <div class=\"edit-plugin-buttons\">\n <v-button\n [disabled]=\"inputDisabled$ | async\"\n (clickEvent)=\"delete()\"\n [mdiIcon]=\"'delete'\"\n type=\"danger\"\n >{{ 'pluginManagement.remove' | translate }}</v-button\n >\n <v-button\n [disabled]=\"(configurationValid$ | async) === false || (inputDisabled$ | async)\"\n (clickEvent)=\"save()\"\n [mdiIcon]=\"'check'\"\n type=\"success\"\n >{{ 'pluginManagement.save' | translate }}</v-button\n >\n </div>\n </div>\n</v-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 */.edit-plugin-buttons{display:flex;width:100%;justify-content:space-between}.edit-configuration-title{display:flex;width:100%;justify-content:center}\n"] }]
|
|
550
|
+
}], ctorParameters: function () { return [{ type: PluginManagementStateService }, { type: i2$1.ModalService }, { type: i1.PluginManagementService }, { type: i4.NGXLogger }]; }, propDecorators: { pluginEditModal: [{
|
|
551
|
+
type: ViewChild,
|
|
552
|
+
args: ['pluginEditModal']
|
|
553
|
+
}] } });
|
|
554
|
+
|
|
469
555
|
/*
|
|
470
556
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
471
557
|
*
|
|
@@ -516,13 +602,17 @@ class PluginManagementComponent {
|
|
|
516
602
|
showAddModal() {
|
|
517
603
|
this.stateService.showModal('add');
|
|
518
604
|
}
|
|
605
|
+
rowClicked(configuration) {
|
|
606
|
+
this.stateService.selectPluginConfiguration(configuration);
|
|
607
|
+
this.stateService.showModal('edit');
|
|
608
|
+
}
|
|
519
609
|
}
|
|
520
|
-
PluginManagementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementComponent, deps: [{ token: PluginManagementService }, { token:
|
|
521
|
-
PluginManagementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PluginManagementComponent, selector: "valtimo-plugin-management", 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-page-container\n *ngIf=\"{\n pluginConfigurations: pluginConfigurations$ | async,\n columns: columns$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <v-page-header>\n <v-page-header-introduction>\n <v-title>{{ 'pages.plugins.title' | translate }}</v-title>\n <v-paragraph>{{ 'pages.plugins.description' | translate }}</v-paragraph>\n </v-page-header-introduction>\n <v-page-header-actions>\n <v-button\n (clickEvent)=\"showAddModal()\"\n type=\"primary\"\n mdiIcon=\"plus\"\n [disabled]=\"obs.loading\"\n >\n {{ 'pluginManagement.add' | translate }}\n </v-button>\n </v-page-header-actions>\n </v-page-header>\n <v-page-content>\n <v-table\n [loading]=\"obs.loading\"\n [items]=\"obs.pluginConfigurations\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"
|
|
610
|
+
PluginManagementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementComponent, deps: [{ token: i1.PluginManagementService }, { token: i3.TranslateService }, { token: PluginManagementStateService }, { token: i1.PluginTranslationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
611
|
+
PluginManagementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PluginManagementComponent, selector: "valtimo-plugin-management", 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-page-container\n *ngIf=\"{\n pluginConfigurations: pluginConfigurations$ | async,\n columns: columns$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <v-page-header>\n <v-page-header-introduction>\n <v-title>{{ 'pages.plugins.title' | translate }}</v-title>\n <v-paragraph>{{ 'pages.plugins.description' | translate }}</v-paragraph>\n </v-page-header-introduction>\n <v-page-header-actions>\n <v-button\n (clickEvent)=\"showAddModal()\"\n type=\"primary\"\n mdiIcon=\"plus\"\n [disabled]=\"obs.loading\"\n >\n {{ 'pluginManagement.add' | translate }}\n </v-button>\n </v-page-header-actions>\n </v-page-header>\n <v-page-content>\n <v-table\n [loading]=\"obs.loading\"\n [items]=\"obs.pluginConfigurations\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"true\"\n [amountOfLoadingRows]=\"2\"\n [itemsTranslationKey]=\"'pluginManagement.tableItemsText'\"\n [showPagination]=\"false\"\n (editButtonClicked)=\"rowClicked($event)\"\n ></v-table>\n </v-page-content>\n</v-page-container>\n\n<valtimo-plugin-add-modal></valtimo-plugin-add-modal>\n\n<valtimo-plugin-edit-modal></valtimo-plugin-edit-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"], components: [{ type: i2$1.PageContainerComponent, selector: "v-page-container" }, { type: i2$1.PageHeaderComponent, selector: "v-page-header" }, { type: i2$1.PageHeaderIntroductionComponent, selector: "v-page-header-introduction" }, { type: i2$1.TitleComponent, selector: "v-title", inputs: ["type", "margin"] }, { type: i2$1.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { type: i2$1.PageHeaderActionsComponent, selector: "v-page-header-actions" }, { type: i2$1.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { type: i2$1.PageContentComponent, selector: "v-page-content" }, { type: i2$1.TableComponent, selector: "v-table", inputs: ["items", "columns", "loading", "showEditButtons", "showPagination", "editButtonTranslationKey", "itemsTranslationKey", "noResultsTranslationKey", "mobileBreakpointPx", "amountOfLoadingRows", "collectionSize", "maxPaginationItemSize", "page", "size"], outputs: ["editButtonClicked", "paginationSizeSet", "paginationPageSet"] }, { type: PluginAddModalComponent, selector: "valtimo-plugin-add-modal" }, { type: PluginEditModalComponent, selector: "valtimo-plugin-edit-modal" }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe, "translate": i3.TranslatePipe } });
|
|
522
612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementComponent, decorators: [{
|
|
523
613
|
type: Component,
|
|
524
|
-
args: [{ selector: 'valtimo-plugin-management', 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-page-container\n *ngIf=\"{\n pluginConfigurations: pluginConfigurations$ | async,\n columns: columns$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <v-page-header>\n <v-page-header-introduction>\n <v-title>{{ 'pages.plugins.title' | translate }}</v-title>\n <v-paragraph>{{ 'pages.plugins.description' | translate }}</v-paragraph>\n </v-page-header-introduction>\n <v-page-header-actions>\n <v-button\n (clickEvent)=\"showAddModal()\"\n type=\"primary\"\n mdiIcon=\"plus\"\n [disabled]=\"obs.loading\"\n >\n {{ 'pluginManagement.add' | translate }}\n </v-button>\n </v-page-header-actions>\n </v-page-header>\n <v-page-content>\n <v-table\n [loading]=\"obs.loading\"\n [items]=\"obs.pluginConfigurations\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"
|
|
525
|
-
}], ctorParameters: function () { return [{ type: PluginManagementService }, { type:
|
|
614
|
+
args: [{ selector: 'valtimo-plugin-management', 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-page-container\n *ngIf=\"{\n pluginConfigurations: pluginConfigurations$ | async,\n columns: columns$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <v-page-header>\n <v-page-header-introduction>\n <v-title>{{ 'pages.plugins.title' | translate }}</v-title>\n <v-paragraph>{{ 'pages.plugins.description' | translate }}</v-paragraph>\n </v-page-header-introduction>\n <v-page-header-actions>\n <v-button\n (clickEvent)=\"showAddModal()\"\n type=\"primary\"\n mdiIcon=\"plus\"\n [disabled]=\"obs.loading\"\n >\n {{ 'pluginManagement.add' | translate }}\n </v-button>\n </v-page-header-actions>\n </v-page-header>\n <v-page-content>\n <v-table\n [loading]=\"obs.loading\"\n [items]=\"obs.pluginConfigurations\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"true\"\n [amountOfLoadingRows]=\"2\"\n [itemsTranslationKey]=\"'pluginManagement.tableItemsText'\"\n [showPagination]=\"false\"\n (editButtonClicked)=\"rowClicked($event)\"\n ></v-table>\n </v-page-content>\n</v-page-container>\n\n<valtimo-plugin-add-modal></valtimo-plugin-add-modal>\n\n<valtimo-plugin-edit-modal></valtimo-plugin-edit-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"] }]
|
|
615
|
+
}], ctorParameters: function () { return [{ type: i1.PluginManagementService }, { type: i3.TranslateService }, { type: PluginManagementStateService }, { type: i1.PluginTranslationService }]; } });
|
|
526
616
|
|
|
527
617
|
/*
|
|
528
618
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
@@ -582,7 +672,9 @@ PluginManagementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", v
|
|
|
582
672
|
PluginManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementModule, declarations: [PluginManagementComponent,
|
|
583
673
|
PluginAddModalComponent,
|
|
584
674
|
PluginAddSelectComponent,
|
|
585
|
-
PluginConfigureComponent
|
|
675
|
+
PluginConfigureComponent,
|
|
676
|
+
PluginEditModalComponent,
|
|
677
|
+
PluginEditComponent], imports: [CommonModule,
|
|
586
678
|
PluginManagementRoutingModule,
|
|
587
679
|
TranslateModule,
|
|
588
680
|
FlexLayoutModule,
|
|
@@ -598,7 +690,9 @@ PluginManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
|
|
|
598
690
|
PluginConfigurationContainerModule], exports: [PluginManagementComponent,
|
|
599
691
|
PluginAddModalComponent,
|
|
600
692
|
PluginAddSelectComponent,
|
|
601
|
-
PluginConfigureComponent
|
|
693
|
+
PluginConfigureComponent,
|
|
694
|
+
PluginEditModalComponent,
|
|
695
|
+
PluginEditComponent] });
|
|
602
696
|
PluginManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PluginManagementModule, providers: [PluginManagementStateService], imports: [[
|
|
603
697
|
CommonModule,
|
|
604
698
|
PluginManagementRoutingModule,
|
|
@@ -624,6 +718,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
624
718
|
PluginAddModalComponent,
|
|
625
719
|
PluginAddSelectComponent,
|
|
626
720
|
PluginConfigureComponent,
|
|
721
|
+
PluginEditModalComponent,
|
|
722
|
+
PluginEditComponent,
|
|
627
723
|
],
|
|
628
724
|
imports: [
|
|
629
725
|
CommonModule,
|
|
@@ -646,6 +742,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
646
742
|
PluginAddModalComponent,
|
|
647
743
|
PluginAddSelectComponent,
|
|
648
744
|
PluginConfigureComponent,
|
|
745
|
+
PluginEditModalComponent,
|
|
746
|
+
PluginEditComponent,
|
|
649
747
|
],
|
|
650
748
|
}]
|
|
651
749
|
}] });
|
|
@@ -670,5 +768,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
670
768
|
* Generated bundle index. Do not edit.
|
|
671
769
|
*/
|
|
672
770
|
|
|
673
|
-
export { PluginAddModalComponent, PluginAddSelectComponent, PluginConfigureComponent, PluginManagementComponent, PluginManagementModule,
|
|
771
|
+
export { PluginAddModalComponent, PluginAddSelectComponent, PluginConfigureComponent, PluginEditComponent, PluginEditModalComponent, PluginManagementComponent, PluginManagementModule, PluginManagementStateService };
|
|
674
772
|
//# sourceMappingURL=valtimo-plugin-management.mjs.map
|