@valtimo/connector-management 10.8.0 → 11.1.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 → esm2022}/lib/components/add-connector-configure/add-connector-configure.component.mjs +4 -4
- package/esm2022/lib/components/add-connector-select/add-connector-select.component.mjs +66 -0
- package/{esm2020 → esm2022}/lib/components/connector-link-extension/connector-link-extension.component.mjs +4 -4
- package/esm2022/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.mjs +127 -0
- package/esm2022/lib/components/connector-management/connector-management.component.mjs +102 -0
- package/esm2022/lib/components/connector-modal/connector-modal.component.mjs +95 -0
- package/{esm2020 → esm2022}/lib/components/edit-connector-form/edit-connector-form.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/components/edit-connector-properties/edit-connector-properties.component.mjs +5 -5
- package/esm2022/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.component.mjs +173 -0
- package/esm2022/lib/components/edit-taak-connector/edit-taak-connector.component.mjs +143 -0
- package/{esm2020 → esm2022}/lib/components/modify-connector/modify-connector.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/components/multi-value-connector-property/multi-value-connector-property.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/connector-management-routing.mjs +5 -5
- package/esm2022/lib/connector-management.module.mjs +145 -0
- package/esm2022/lib/services/connector-management/connector-management.service.mjs +56 -0
- package/{esm2020 → esm2022}/lib/services/connector-management-state/connector-management-state.service.mjs +4 -4
- package/esm2022/lib/services/object-api-sync/object-api-sync.service.mjs +47 -0
- package/{fesm2020 → fesm2022}/valtimo-connector-management.mjs +123 -130
- package/fesm2022/valtimo-connector-management.mjs.map +1 -0
- package/lib/components/add-connector-configure/add-connector-configure.component.d.ts +1 -1
- package/lib/components/add-connector-select/add-connector-select.component.d.ts +1 -1
- package/lib/components/connector-link-extension/connector-link-extension.component.d.ts +1 -1
- package/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.d.ts +1 -1
- package/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.d.ts.map +1 -1
- package/lib/components/connector-management/connector-management.component.d.ts +2 -3
- package/lib/components/connector-management/connector-management.component.d.ts.map +1 -1
- package/lib/components/connector-modal/connector-modal.component.d.ts +4 -4
- package/lib/components/connector-modal/connector-modal.component.d.ts.map +1 -1
- package/lib/components/edit-connector-form/edit-connector-form.component.d.ts +1 -1
- package/lib/components/edit-connector-properties/edit-connector-properties.component.d.ts +1 -1
- package/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.component.d.ts +1 -1
- package/lib/components/edit-taak-connector/edit-taak-connector.component.d.ts +1 -1
- package/lib/components/modify-connector/modify-connector.component.d.ts +1 -1
- package/lib/components/multi-value-connector-property/multi-value-connector-property.component.d.ts +1 -1
- package/lib/connector-management.module.d.ts +1 -3
- package/lib/connector-management.module.d.ts.map +1 -1
- package/lib/services/connector-management/connector-management.service.d.ts.map +1 -1
- package/lib/services/object-api-sync/object-api-sync.service.d.ts.map +1 -1
- package/package.json +8 -15
- package/esm2020/lib/components/add-connector-select/add-connector-select.component.mjs +0 -67
- package/esm2020/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.mjs +0 -129
- package/esm2020/lib/components/connector-management/connector-management.component.mjs +0 -103
- package/esm2020/lib/components/connector-modal/connector-modal.component.mjs +0 -95
- package/esm2020/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.component.mjs +0 -174
- package/esm2020/lib/components/edit-taak-connector/edit-taak-connector.component.mjs +0 -144
- package/esm2020/lib/connector-management.module.mjs +0 -150
- package/esm2020/lib/services/connector-management/connector-management.service.mjs +0 -56
- package/esm2020/lib/services/object-api-sync/object-api-sync.service.mjs +0 -47
- package/fesm2015/valtimo-connector-management.mjs +0 -2077
- package/fesm2015/valtimo-connector-management.mjs.map +0 -1
- package/fesm2020/valtimo-connector-management.mjs.map +0 -1
- /package/{esm2020 → esm2022}/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.form.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/components/edit-taak-connector/edit-taak-connector.form.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/extension/connector-management.extension.init.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/object-sync.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/valtimo-connector-management.mjs +0 -0
|
@@ -1,2077 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, EventEmitter, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
|
-
import * as i5$1 from '@angular/router';
|
|
4
|
-
import { RouterModule } from '@angular/router';
|
|
5
|
-
import * as i5 from '@angular/common';
|
|
6
|
-
import { CommonModule } from '@angular/common';
|
|
7
|
-
import { AuthGuardService } from '@valtimo/security';
|
|
8
|
-
import * as i2 from '@valtimo/config';
|
|
9
|
-
import { ROLE_ADMIN, ConfigService, Extension, BasicExtensionPoint } from '@valtimo/config';
|
|
10
|
-
import { Subject, BehaviorSubject, combineLatest, timer, of } from 'rxjs';
|
|
11
|
-
import { take, map, tap, switchMap, catchError } from 'rxjs/operators';
|
|
12
|
-
import * as i1 from '@angular/common/http';
|
|
13
|
-
import * as i2$1 from '@ngx-translate/core';
|
|
14
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
15
|
-
import * as i2$2 from '@valtimo/user-interface';
|
|
16
|
-
import { ButtonModule, TableModule, ModalModule as ModalModule$1, StepperModule, CardModule, TitleModule, InputModule, PageModule, ParagraphModule } from '@valtimo/user-interface';
|
|
17
|
-
import * as i6 from '@angular/flex-layout/flex';
|
|
18
|
-
import * as i6$1 from '@valtimo/components';
|
|
19
|
-
import { WidgetModule, ListModule, SpinnerModule, ModalModule, FormIoModule } from '@valtimo/components';
|
|
20
|
-
import { set, cloneDeep, get } from 'lodash';
|
|
21
|
-
import * as i1$1 from '@valtimo/form';
|
|
22
|
-
import * as i2$3 from '@valtimo/document';
|
|
23
|
-
import * as i8 from '@angular/flex-layout/extended';
|
|
24
|
-
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
25
|
-
import { NGXLogger } from 'ngx-logger';
|
|
26
|
-
|
|
27
|
-
/*
|
|
28
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
29
|
-
*
|
|
30
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
31
|
-
* you may not use this file except in compliance with the License.
|
|
32
|
-
* You may obtain a copy of the License at
|
|
33
|
-
*
|
|
34
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
35
|
-
*
|
|
36
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
37
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
38
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
39
|
-
* See the License for the specific language governing permissions and
|
|
40
|
-
* limitations under the License.
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
/*
|
|
44
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
45
|
-
*
|
|
46
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
47
|
-
* you may not use this file except in compliance with the License.
|
|
48
|
-
* You may obtain a copy of the License at
|
|
49
|
-
*
|
|
50
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
51
|
-
*
|
|
52
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
53
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
54
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
55
|
-
* See the License for the specific language governing permissions and
|
|
56
|
-
* limitations under the License.
|
|
57
|
-
*/
|
|
58
|
-
class ConnectorManagementService {
|
|
59
|
-
constructor(http, configService) {
|
|
60
|
-
this.http = http;
|
|
61
|
-
this.configService = configService;
|
|
62
|
-
this.valtimoApiConfig = configService.config.valtimoApi;
|
|
63
|
-
}
|
|
64
|
-
getConnectorInstances(params) {
|
|
65
|
-
return this.http.get(`${this.valtimoApiConfig.endpointUri}v1/connector/instance`, { params });
|
|
66
|
-
}
|
|
67
|
-
getConnectorInstancesByType(typeId, params) {
|
|
68
|
-
return this.http.get(`${this.valtimoApiConfig.endpointUri}v1/connector/instance/${typeId}`, { params });
|
|
69
|
-
}
|
|
70
|
-
getConnectorInstanceById(instanceId) {
|
|
71
|
-
return this.http.get(`${this.valtimoApiConfig.endpointUri}v1/connector/instance?instanceId=${instanceId}`);
|
|
72
|
-
}
|
|
73
|
-
getConnectorTypes() {
|
|
74
|
-
return this.http.get(`${this.valtimoApiConfig.endpointUri}v1/connector/type`);
|
|
75
|
-
}
|
|
76
|
-
createConnectorInstance(request) {
|
|
77
|
-
return this.http.post(`${this.valtimoApiConfig.endpointUri}v1/connector/instance`, request);
|
|
78
|
-
}
|
|
79
|
-
updateConnectorInstance(request) {
|
|
80
|
-
return this.http.put(`${this.valtimoApiConfig.endpointUri}v1/connector/instance`, request);
|
|
81
|
-
}
|
|
82
|
-
deleteConnectorInstance(connectorInstanceId) {
|
|
83
|
-
return this.http.delete(`${this.valtimoApiConfig.endpointUri}v1/connector/instance/${connectorInstanceId}`);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
ConnectorManagementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
87
|
-
ConnectorManagementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementService, providedIn: 'root' });
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementService, decorators: [{
|
|
89
|
-
type: Injectable,
|
|
90
|
-
args: [{
|
|
91
|
-
providedIn: 'root',
|
|
92
|
-
}]
|
|
93
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.ConfigService }]; } });
|
|
94
|
-
|
|
95
|
-
/*
|
|
96
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
97
|
-
*
|
|
98
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
99
|
-
* you may not use this file except in compliance with the License.
|
|
100
|
-
* You may obtain a copy of the License at
|
|
101
|
-
*
|
|
102
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
103
|
-
*
|
|
104
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
105
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
106
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
107
|
-
* See the License for the specific language governing permissions and
|
|
108
|
-
* limitations under the License.
|
|
109
|
-
*/
|
|
110
|
-
class ConnectorManagementStateService {
|
|
111
|
-
constructor() {
|
|
112
|
-
this._showModal$ = new Subject();
|
|
113
|
-
this._hideModal$ = new Subject();
|
|
114
|
-
this._showExtensionModal$ = new BehaviorSubject(false);
|
|
115
|
-
this._inputDisabled$ = new BehaviorSubject(false);
|
|
116
|
-
this._saveButtonDisabled$ = new BehaviorSubject(true);
|
|
117
|
-
this._refresh$ = new BehaviorSubject(null);
|
|
118
|
-
this._save$ = new Subject();
|
|
119
|
-
this._selectedInstance$ = new BehaviorSubject(undefined);
|
|
120
|
-
this._lastConfigIdAdded$ = new BehaviorSubject('');
|
|
121
|
-
this._selectedConnector$ = new BehaviorSubject(undefined);
|
|
122
|
-
this._connectorTypes$ = new BehaviorSubject(undefined);
|
|
123
|
-
this._modalType$ = new BehaviorSubject('add');
|
|
124
|
-
this._delete$ = new Subject();
|
|
125
|
-
this._hideModalSaveButton$ = new BehaviorSubject(false);
|
|
126
|
-
}
|
|
127
|
-
get showModal$() {
|
|
128
|
-
return this._showModal$.asObservable();
|
|
129
|
-
}
|
|
130
|
-
get hideModal$() {
|
|
131
|
-
return this._hideModal$.asObservable();
|
|
132
|
-
}
|
|
133
|
-
get showExtensionModal$() {
|
|
134
|
-
return this._showExtensionModal$.asObservable();
|
|
135
|
-
}
|
|
136
|
-
get inputDisabled$() {
|
|
137
|
-
return this._inputDisabled$.asObservable();
|
|
138
|
-
}
|
|
139
|
-
get refresh$() {
|
|
140
|
-
return this._refresh$.asObservable();
|
|
141
|
-
}
|
|
142
|
-
get selectedInstance$() {
|
|
143
|
-
return this._selectedInstance$.asObservable();
|
|
144
|
-
}
|
|
145
|
-
get lastConfigIdAdded$() {
|
|
146
|
-
return this._lastConfigIdAdded$.asObservable();
|
|
147
|
-
}
|
|
148
|
-
get selectedConnector$() {
|
|
149
|
-
return this._selectedConnector$.asObservable();
|
|
150
|
-
}
|
|
151
|
-
get connectorTypes$() {
|
|
152
|
-
return this._connectorTypes$.asObservable();
|
|
153
|
-
}
|
|
154
|
-
get saveButtonDisabled$() {
|
|
155
|
-
return this._saveButtonDisabled$.asObservable();
|
|
156
|
-
}
|
|
157
|
-
get save$() {
|
|
158
|
-
return this._save$.asObservable();
|
|
159
|
-
}
|
|
160
|
-
get modalType$() {
|
|
161
|
-
return this._modalType$.asObservable();
|
|
162
|
-
}
|
|
163
|
-
get delete$() {
|
|
164
|
-
return this._delete$.asObservable();
|
|
165
|
-
}
|
|
166
|
-
get hideModalSaveButton$() {
|
|
167
|
-
return this._hideModalSaveButton$.asObservable();
|
|
168
|
-
}
|
|
169
|
-
showModal() {
|
|
170
|
-
this._showModal$.next(null);
|
|
171
|
-
}
|
|
172
|
-
hideModal() {
|
|
173
|
-
this._hideModal$.next(null);
|
|
174
|
-
}
|
|
175
|
-
showExtensionModal() {
|
|
176
|
-
this._showExtensionModal$.next(true);
|
|
177
|
-
}
|
|
178
|
-
hideExtensionModal() {
|
|
179
|
-
this._showExtensionModal$.next(false);
|
|
180
|
-
}
|
|
181
|
-
disableInput() {
|
|
182
|
-
this._inputDisabled$.next(true);
|
|
183
|
-
}
|
|
184
|
-
enableInput() {
|
|
185
|
-
this._inputDisabled$.next(false);
|
|
186
|
-
}
|
|
187
|
-
refresh() {
|
|
188
|
-
this._refresh$.next(null);
|
|
189
|
-
}
|
|
190
|
-
setConnectorInstance(instance) {
|
|
191
|
-
this._selectedInstance$.next(instance);
|
|
192
|
-
}
|
|
193
|
-
setLastConfigIdAdded(id) {
|
|
194
|
-
this._lastConfigIdAdded$.next(id);
|
|
195
|
-
}
|
|
196
|
-
clearLastConfigIdAdded() {
|
|
197
|
-
this._lastConfigIdAdded$.next('');
|
|
198
|
-
}
|
|
199
|
-
setSelectedConnectorType(connectorType) {
|
|
200
|
-
this._selectedConnector$.next(connectorType);
|
|
201
|
-
}
|
|
202
|
-
clearSelectedConnector() {
|
|
203
|
-
this._selectedConnector$.next(undefined);
|
|
204
|
-
}
|
|
205
|
-
setConnectorTypes(connectorTypes) {
|
|
206
|
-
this._connectorTypes$.next(connectorTypes);
|
|
207
|
-
}
|
|
208
|
-
enableSaveButton() {
|
|
209
|
-
this._saveButtonDisabled$.next(false);
|
|
210
|
-
}
|
|
211
|
-
disableSaveButton() {
|
|
212
|
-
this._saveButtonDisabled$.next(true);
|
|
213
|
-
}
|
|
214
|
-
save() {
|
|
215
|
-
this._saveButtonDisabled$.pipe(take(1)).subscribe(saveButtonDisabled => {
|
|
216
|
-
if (!saveButtonDisabled) {
|
|
217
|
-
this._save$.next(null);
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
setModalType(type) {
|
|
222
|
-
this._modalType$.next(type);
|
|
223
|
-
}
|
|
224
|
-
delete() {
|
|
225
|
-
this._delete$.next(null);
|
|
226
|
-
}
|
|
227
|
-
hideModalSaveButton() {
|
|
228
|
-
this._hideModalSaveButton$.next(true);
|
|
229
|
-
}
|
|
230
|
-
showModalSaveButton() {
|
|
231
|
-
this._hideModalSaveButton$.next(false);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
ConnectorManagementStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
235
|
-
ConnectorManagementStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementStateService, providedIn: 'root' });
|
|
236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementStateService, decorators: [{
|
|
237
|
-
type: Injectable,
|
|
238
|
-
args: [{
|
|
239
|
-
providedIn: 'root',
|
|
240
|
-
}]
|
|
241
|
-
}] });
|
|
242
|
-
|
|
243
|
-
/*
|
|
244
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
245
|
-
*
|
|
246
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
247
|
-
* you may not use this file except in compliance with the License.
|
|
248
|
-
* You may obtain a copy of the License at
|
|
249
|
-
*
|
|
250
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
251
|
-
*
|
|
252
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
253
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
254
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
255
|
-
* See the License for the specific language governing permissions and
|
|
256
|
-
* limitations under the License.
|
|
257
|
-
*/
|
|
258
|
-
class AddConnectorSelectComponent {
|
|
259
|
-
constructor(connectorManagementService, stateService, translateService) {
|
|
260
|
-
this.connectorManagementService = connectorManagementService;
|
|
261
|
-
this.stateService = stateService;
|
|
262
|
-
this.translateService = translateService;
|
|
263
|
-
this.selectedConnector$ = this.stateService.selectedConnector$;
|
|
264
|
-
this.disabled$ = this.stateService.inputDisabled$;
|
|
265
|
-
this.connectorTypes$ = this.stateService.connectorTypes$;
|
|
266
|
-
}
|
|
267
|
-
ngOnInit() {
|
|
268
|
-
this.openRefreshSubscription();
|
|
269
|
-
this.getConnectorTypes();
|
|
270
|
-
}
|
|
271
|
-
ngOnDestroy() {
|
|
272
|
-
var _a;
|
|
273
|
-
(_a = this.refreshSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
274
|
-
}
|
|
275
|
-
selectConnector(connectorType) {
|
|
276
|
-
this.stateService.setSelectedConnectorType(connectorType);
|
|
277
|
-
}
|
|
278
|
-
deselectConnector() {
|
|
279
|
-
this.stateService.clearSelectedConnector();
|
|
280
|
-
}
|
|
281
|
-
getConnectorTypes() {
|
|
282
|
-
this.connectorManagementService.getConnectorTypes().subscribe(connectorTypes => {
|
|
283
|
-
this.stateService.setConnectorTypes(connectorTypes);
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
openRefreshSubscription() {
|
|
287
|
-
this.refreshSubscription = combineLatest([
|
|
288
|
-
this.stateService.showModal$,
|
|
289
|
-
this.stateService.refresh$,
|
|
290
|
-
]).subscribe(() => {
|
|
291
|
-
this.deselectConnector();
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
AddConnectorSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddConnectorSelectComponent, deps: [{ token: ConnectorManagementService }, { token: ConnectorManagementStateService }, { token: i2$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
296
|
-
AddConnectorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AddConnectorSelectComponent, selector: "valtimo-add-connector-select", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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=\"connectorTypes$ | async as connectorTypes; else loading\">\n <div fxLayout=\"row wrap\" fxLayoutGap=\"22px grid\">\n <div fxFlex=\"33.3%\" *ngFor=\"let connectorType of connectorTypes\">\n <v-card\n [titleTranslationKey]=\"'connector.' + connectorType.name + '.title'\"\n [descriptionTranslationKey]=\"'connector.' + connectorType.name + '.description'\"\n [selectable]=\"true\"\n [selected]=\"(selectedConnector$ | async)?.name === connectorType.name\"\n [fullHeight]=\"true\"\n (selectEvent)=\"selectConnector(connectorType)\"\n (deselectEvent)=\"deselectConnector()\"\n ></v-card>\n </div>\n </div>\n</ng-container>\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-2023 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}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$2.CardComponent, selector: "v-card", inputs: ["titleTranslationKey", "title", "descriptionTranslationKey", "description", "selectable", "selected", "fullHeight", "loading", "loadingTitle", "loadingDescription"], outputs: ["selectEvent", "deselectEvent"] }, { kind: "directive", 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"] }, { kind: "directive", 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"] }, { kind: "directive", 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"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }] });
|
|
297
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddConnectorSelectComponent, decorators: [{
|
|
298
|
-
type: Component,
|
|
299
|
-
args: [{ selector: 'valtimo-add-connector-select', template: "<!--\n ~ Copyright 2015-2023 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=\"connectorTypes$ | async as connectorTypes; else loading\">\n <div fxLayout=\"row wrap\" fxLayoutGap=\"22px grid\">\n <div fxFlex=\"33.3%\" *ngFor=\"let connectorType of connectorTypes\">\n <v-card\n [titleTranslationKey]=\"'connector.' + connectorType.name + '.title'\"\n [descriptionTranslationKey]=\"'connector.' + connectorType.name + '.description'\"\n [selectable]=\"true\"\n [selected]=\"(selectedConnector$ | async)?.name === connectorType.name\"\n [fullHeight]=\"true\"\n (selectEvent)=\"selectConnector(connectorType)\"\n (deselectEvent)=\"deselectConnector()\"\n ></v-card>\n </div>\n </div>\n</ng-container>\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-2023 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}\n"] }]
|
|
300
|
-
}], ctorParameters: function () { return [{ type: ConnectorManagementService }, { type: ConnectorManagementStateService }, { type: i2$1.TranslateService }]; } });
|
|
301
|
-
|
|
302
|
-
/*
|
|
303
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
304
|
-
*
|
|
305
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
306
|
-
* you may not use this file except in compliance with the License.
|
|
307
|
-
* You may obtain a copy of the License at
|
|
308
|
-
*
|
|
309
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
310
|
-
*
|
|
311
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
312
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
313
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
314
|
-
* See the License for the specific language governing permissions and
|
|
315
|
-
* limitations under the License.
|
|
316
|
-
*/
|
|
317
|
-
class MultiValueConnectorPropertyComponent {
|
|
318
|
-
constructor() {
|
|
319
|
-
this.valuesSet = new EventEmitter();
|
|
320
|
-
this.amountOfValues$ = new BehaviorSubject([null]);
|
|
321
|
-
this.removeButtonDisabled$ = this.amountOfValues$.pipe(map(amountOfValues => amountOfValues.length === 1));
|
|
322
|
-
this.values$ = new BehaviorSubject({});
|
|
323
|
-
this.addButtonDisabled$ = combineLatest([this.values$, this.amountOfValues$]).pipe(map(([values, amountOfValues]) => {
|
|
324
|
-
const objectValues = Object.values(values);
|
|
325
|
-
const validObjectValues = objectValues.filter(value => value === 0 || value);
|
|
326
|
-
return amountOfValues.length !== validObjectValues.length;
|
|
327
|
-
}));
|
|
328
|
-
}
|
|
329
|
-
ngOnInit() {
|
|
330
|
-
this.openValuesSubscription();
|
|
331
|
-
this.setDefaults();
|
|
332
|
-
}
|
|
333
|
-
ngOnDestroy() {
|
|
334
|
-
var _a;
|
|
335
|
-
(_a = this.valuesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
336
|
-
}
|
|
337
|
-
onValueChange(value, editField, index) {
|
|
338
|
-
this.values$.pipe(take(1)).subscribe(values => {
|
|
339
|
-
this.values$.next(Object.assign(Object.assign({}, values), { [index]: editField.editType === 'string[]'
|
|
340
|
-
? value.trim()
|
|
341
|
-
: parseInt(value, 10) }));
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
addRow() {
|
|
345
|
-
this.amountOfValues$.pipe(take(1)).subscribe(amountOfValues => {
|
|
346
|
-
this.amountOfValues$.next([...amountOfValues, null]);
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
removeRow() {
|
|
350
|
-
combineLatest([this.values$, this.amountOfValues$])
|
|
351
|
-
.pipe(take(1))
|
|
352
|
-
.subscribe(([values, amountOfValues]) => {
|
|
353
|
-
const lastValueIndex = amountOfValues.length - 1;
|
|
354
|
-
const valuesCopy = Object.assign({}, values);
|
|
355
|
-
delete valuesCopy[lastValueIndex];
|
|
356
|
-
this.values$.next(valuesCopy);
|
|
357
|
-
this.amountOfValues$.next(amountOfValues.filter((curr, index) => index !== lastValueIndex));
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
openValuesSubscription() {
|
|
361
|
-
this.valuesSubscription = this.values$.subscribe(values => {
|
|
362
|
-
this.valuesSet.emit({
|
|
363
|
-
editFieldKey: this.editField.key,
|
|
364
|
-
values: Object.values(values).filter(value => value === 0 || value),
|
|
365
|
-
});
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
setDefaults() {
|
|
369
|
-
const defaultValue = this.defaultValue;
|
|
370
|
-
const validValues = Array.isArray(defaultValue) && defaultValue.filter(value => value === 0 || value);
|
|
371
|
-
if (validValues && validValues.length > 0) {
|
|
372
|
-
const valuesObject = {};
|
|
373
|
-
validValues.forEach((value, index) => {
|
|
374
|
-
valuesObject[index] = value;
|
|
375
|
-
});
|
|
376
|
-
this.values$.next(valuesObject);
|
|
377
|
-
this.amountOfValues$.next(validValues.map(() => null));
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
MultiValueConnectorPropertyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MultiValueConnectorPropertyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
382
|
-
MultiValueConnectorPropertyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MultiValueConnectorPropertyComponent, selector: "valtimo-multi-value-connector-property", inputs: { editField: "editField", disabled: "disabled", defaultValue: "defaultValue" }, outputs: { valuesSet: "valuesSet" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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\n class=\"form-group row\"\n *ngIf=\"{amountOfValues: amountOfValues$ | async, values: values$ | async} as obs\"\n>\n <label class=\"col-3 col-form-label text-sm-right\">\n {{ 'connectorManagement.inputLabels.' + editField.key | translate }}\n </label>\n <div class=\"col-7\">\n <ng-container *ngFor=\"let value of obs.amountOfValues; let index = index\">\n <ng-container\n *ngTemplateOutlet=\"input; context: {index: index, disabled: disabled, values: obs.values}\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"buttons; context: {disabled: disabled}\"></ng-container>\n </div>\n</div>\n\n<ng-template #input let-index=\"index\" let-disabled=\"disabled\" let-values=\"values\">\n <input\n *ngIf=\"editField.editType === 'string[]'\"\n class=\"form-control mb-2\"\n type=\"text\"\n (input)=\"onValueChange($event.target.value, editField, index)\"\n [disabled]=\"disabled\"\n [value]=\"defaultValue && values[index] ? values[index] : ''\"\n />\n <input\n *ngIf=\"editField.editType === 'number[]'\"\n class=\"form-control mb-2\"\n type=\"number\"\n step=\"1\"\n min=\"0\"\n oninput=\"validity.valid||(value='');\"\n (input)=\"onValueChange($event.target.value, editField, index)\"\n [disabled]=\"disabled\"\n [value]=\"defaultValue && values[index] ? values[index] : ''\"\n />\n</ng-template>\n\n<ng-template #buttons let-disabled=\"disabled\">\n <div class=\"button-container mt-1\">\n <button\n class=\"btn btn-danger btn-space btn-sm\"\n (click)=\"removeRow()\"\n [disabled]=\"disabled || (removeButtonDisabled$ | async)\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.removeValue' | translate }}\n </button>\n <button\n class=\"btn btn-secondary btn-space mr-0 btn-sm\"\n (click)=\"addRow()\"\n [disabled]=\"disabled || (addButtonDisabled$ | async)\"\n >\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'connectorManagement.addValue' | translate }}\n </button>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.button-container{display:flex;width:100%;justify-content:flex-end}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MultiValueConnectorPropertyComponent, decorators: [{
|
|
384
|
-
type: Component,
|
|
385
|
-
args: [{ selector: 'valtimo-multi-value-connector-property', template: "<!--\n ~ Copyright 2015-2023 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\n class=\"form-group row\"\n *ngIf=\"{amountOfValues: amountOfValues$ | async, values: values$ | async} as obs\"\n>\n <label class=\"col-3 col-form-label text-sm-right\">\n {{ 'connectorManagement.inputLabels.' + editField.key | translate }}\n </label>\n <div class=\"col-7\">\n <ng-container *ngFor=\"let value of obs.amountOfValues; let index = index\">\n <ng-container\n *ngTemplateOutlet=\"input; context: {index: index, disabled: disabled, values: obs.values}\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"buttons; context: {disabled: disabled}\"></ng-container>\n </div>\n</div>\n\n<ng-template #input let-index=\"index\" let-disabled=\"disabled\" let-values=\"values\">\n <input\n *ngIf=\"editField.editType === 'string[]'\"\n class=\"form-control mb-2\"\n type=\"text\"\n (input)=\"onValueChange($event.target.value, editField, index)\"\n [disabled]=\"disabled\"\n [value]=\"defaultValue && values[index] ? values[index] : ''\"\n />\n <input\n *ngIf=\"editField.editType === 'number[]'\"\n class=\"form-control mb-2\"\n type=\"number\"\n step=\"1\"\n min=\"0\"\n oninput=\"validity.valid||(value='');\"\n (input)=\"onValueChange($event.target.value, editField, index)\"\n [disabled]=\"disabled\"\n [value]=\"defaultValue && values[index] ? values[index] : ''\"\n />\n</ng-template>\n\n<ng-template #buttons let-disabled=\"disabled\">\n <div class=\"button-container mt-1\">\n <button\n class=\"btn btn-danger btn-space btn-sm\"\n (click)=\"removeRow()\"\n [disabled]=\"disabled || (removeButtonDisabled$ | async)\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.removeValue' | translate }}\n </button>\n <button\n class=\"btn btn-secondary btn-space mr-0 btn-sm\"\n (click)=\"addRow()\"\n [disabled]=\"disabled || (addButtonDisabled$ | async)\"\n >\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'connectorManagement.addValue' | translate }}\n </button>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.button-container{display:flex;width:100%;justify-content:flex-end}\n"] }]
|
|
386
|
-
}], propDecorators: { editField: [{
|
|
387
|
-
type: Input
|
|
388
|
-
}], disabled: [{
|
|
389
|
-
type: Input
|
|
390
|
-
}], defaultValue: [{
|
|
391
|
-
type: Input
|
|
392
|
-
}], valuesSet: [{
|
|
393
|
-
type: Output
|
|
394
|
-
}] } });
|
|
395
|
-
|
|
396
|
-
/*
|
|
397
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
398
|
-
*
|
|
399
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
400
|
-
* you may not use this file except in compliance with the License.
|
|
401
|
-
* You may obtain a copy of the License at
|
|
402
|
-
*
|
|
403
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
404
|
-
*
|
|
405
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
406
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
407
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
408
|
-
* See the License for the specific language governing permissions and
|
|
409
|
-
* limitations under the License.
|
|
410
|
-
*/
|
|
411
|
-
class EditConnectorPropertiesComponent {
|
|
412
|
-
constructor(stateService) {
|
|
413
|
-
this.stateService = stateService;
|
|
414
|
-
this.withDefaults = false;
|
|
415
|
-
this.showDeleteButton = false;
|
|
416
|
-
this.showSaveButton = true;
|
|
417
|
-
this.propertiesSave = new EventEmitter();
|
|
418
|
-
this.connectorDelete = new EventEmitter();
|
|
419
|
-
this.modifiedProperties$ = new BehaviorSubject(undefined);
|
|
420
|
-
this.editFields$ = new BehaviorSubject([]);
|
|
421
|
-
this.connectorName$ = new BehaviorSubject('');
|
|
422
|
-
this.saveButtonDisabled$ = this.stateService.saveButtonDisabled$;
|
|
423
|
-
this.disabled$ = this.stateService.inputDisabled$;
|
|
424
|
-
}
|
|
425
|
-
ngOnInit() {
|
|
426
|
-
this.setEditFields();
|
|
427
|
-
this.setName();
|
|
428
|
-
this.openSaveButtonDisabledSubscription();
|
|
429
|
-
this.openSaveSubscription();
|
|
430
|
-
this.openDeleteSubscription();
|
|
431
|
-
this.stateService.showModalSaveButton();
|
|
432
|
-
}
|
|
433
|
-
ngOnChanges() {
|
|
434
|
-
this.setEditFields();
|
|
435
|
-
this.setName();
|
|
436
|
-
}
|
|
437
|
-
ngOnDestroy() {
|
|
438
|
-
var _a, _b, _c;
|
|
439
|
-
(_a = this.saveButtonDisabledSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
440
|
-
(_b = this.saveSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
441
|
-
(_c = this.deleteSubscription) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
442
|
-
}
|
|
443
|
-
multiFieldValuesSet(event) {
|
|
444
|
-
this.modifiedProperties$.pipe(take(1)).subscribe(properties => {
|
|
445
|
-
set(properties, event.editFieldKey, event.values);
|
|
446
|
-
this.modifiedProperties$.next(properties);
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
onSingleValueChange(value, editField) {
|
|
450
|
-
this.modifiedProperties$.pipe(take(1)).subscribe(properties => {
|
|
451
|
-
set(properties, editField.key, editField.editType === 'string' ? value.trim() : parseInt(value, 10));
|
|
452
|
-
this.modifiedProperties$.next(properties);
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
onNameValueChange(value) {
|
|
456
|
-
this.connectorName$.next(value.trim());
|
|
457
|
-
}
|
|
458
|
-
onSave() {
|
|
459
|
-
this.stateService.disableInput();
|
|
460
|
-
combineLatest([this.modifiedProperties$, this.connectorName$])
|
|
461
|
-
.pipe(take(1))
|
|
462
|
-
.subscribe(([properties, name]) => {
|
|
463
|
-
this.propertiesSave.emit({ properties, name });
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
onDelete() {
|
|
467
|
-
this.stateService.disableInput();
|
|
468
|
-
this.connectorDelete.emit();
|
|
469
|
-
}
|
|
470
|
-
setName() {
|
|
471
|
-
if (this.withDefaults && this.defaultName) {
|
|
472
|
-
this.connectorName$.next(this.defaultName);
|
|
473
|
-
}
|
|
474
|
-
else {
|
|
475
|
-
this.connectorName$.next('');
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
setModifiedProperties(editFields) {
|
|
479
|
-
const propertiesCopy = cloneDeep(this.properties);
|
|
480
|
-
if (!this.withDefaults) {
|
|
481
|
-
editFields.forEach(editField => {
|
|
482
|
-
set(propertiesCopy, editField.key, undefined);
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
this.modifiedProperties$.next(propertiesCopy);
|
|
486
|
-
}
|
|
487
|
-
setEditFields() {
|
|
488
|
-
const editFields = [];
|
|
489
|
-
const keysToFilter = ['className'];
|
|
490
|
-
const handlePropertyLevel = (propertyLevel, previousKeys) => {
|
|
491
|
-
const propertyLevelKeys = Object.keys(propertyLevel).filter(key => !keysToFilter.includes(key));
|
|
492
|
-
propertyLevelKeys.forEach(key => {
|
|
493
|
-
const propertyValue = propertyLevel[key];
|
|
494
|
-
const baseEditField = Object.assign({ key: previousKeys + key }, (this.withDefaults && { defaultValue: propertyValue }));
|
|
495
|
-
if (typeof propertyValue === 'number') {
|
|
496
|
-
editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'number' }));
|
|
497
|
-
}
|
|
498
|
-
else if (Array.isArray(propertyValue)) {
|
|
499
|
-
if (propertyValue[0] && typeof propertyValue[0] === 'number') {
|
|
500
|
-
editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'number[]' }));
|
|
501
|
-
}
|
|
502
|
-
else {
|
|
503
|
-
editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'string[]' }));
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
else if (typeof propertyValue === 'string') {
|
|
507
|
-
editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'string' }));
|
|
508
|
-
}
|
|
509
|
-
else if (typeof propertyValue === 'object') {
|
|
510
|
-
handlePropertyLevel(propertyValue, `${previousKeys}${key}.`);
|
|
511
|
-
}
|
|
512
|
-
});
|
|
513
|
-
};
|
|
514
|
-
handlePropertyLevel(this.properties, '');
|
|
515
|
-
this.editFields$.next(editFields);
|
|
516
|
-
this.setModifiedProperties(editFields);
|
|
517
|
-
}
|
|
518
|
-
openSaveButtonDisabledSubscription() {
|
|
519
|
-
this.saveButtonDisabledSubscription = combineLatest([
|
|
520
|
-
this.editFields$,
|
|
521
|
-
this.modifiedProperties$,
|
|
522
|
-
this.connectorName$,
|
|
523
|
-
])
|
|
524
|
-
.pipe(map(([editFields, modifiedProperties, connectorName]) => {
|
|
525
|
-
const values = editFields.map(field => get(modifiedProperties, field.key));
|
|
526
|
-
const validValues = values.filter(value => Array.isArray(value) ? value.length > 0 : value === 0 || value);
|
|
527
|
-
const invalidProperties = editFields.length !== validValues.length || !connectorName;
|
|
528
|
-
if (invalidProperties) {
|
|
529
|
-
this.stateService.disableSaveButton();
|
|
530
|
-
}
|
|
531
|
-
else {
|
|
532
|
-
this.stateService.enableSaveButton();
|
|
533
|
-
}
|
|
534
|
-
}))
|
|
535
|
-
.subscribe();
|
|
536
|
-
}
|
|
537
|
-
openSaveSubscription() {
|
|
538
|
-
this.saveSubscription = this.stateService.save$.subscribe(() => {
|
|
539
|
-
this.onSave();
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
openDeleteSubscription() {
|
|
543
|
-
this.deleteSubscription = this.stateService.delete$.subscribe(() => {
|
|
544
|
-
this.onDelete();
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
EditConnectorPropertiesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditConnectorPropertiesComponent, deps: [{ token: ConnectorManagementStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
549
|
-
EditConnectorPropertiesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EditConnectorPropertiesComponent, selector: "valtimo-edit-connector-properties", inputs: { properties: "properties", withDefaults: "withDefaults", showDeleteButton: "showDeleteButton", showSaveButton: "showSaveButton", defaultName: "defaultName" }, outputs: { propertiesSave: "propertiesSave", connectorDelete: "connectorDelete" }, usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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\n class=\"edit-fields\"\n *ngIf=\"{editFields: editFields$ | async, disabled: disabled$ | async} as obs\"\n>\n <ng-container *ngTemplateOutlet=\"nameInput; context: {disabled: obs.disabled}\"></ng-container>\n <ng-container *ngFor=\"let editField of obs.editFields\">\n <ng-container *ngIf=\"editField.editType === 'string' || editField.editType === 'number'\">\n <ng-container\n *ngTemplateOutlet=\"singleInput; context: {editField: editField, disabled: obs.disabled}\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"editField.editType === 'string[]' || editField.editType === 'number[]'\">\n <valtimo-multi-value-connector-property\n [editField]=\"editField\"\n (valuesSet)=\"multiFieldValuesSet($event)\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"withDefaults && editField.defaultValue\"\n >\n </valtimo-multi-value-connector-property>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"buttons; context: {disabled: obs.disabled}\"></ng-container>\n</div>\n\n<ng-template #nameInput let-disabled=\"disabled\">\n <v-input\n name=\"name\"\n titleTranslationKey=\"connectorManagement.inputLabels.connectorName\"\n [defaultValue]=\"withDefaults && defaultName ? defaultName : ''\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [disabled]=\"disabled\"\n (valueChange)=\"onNameValueChange($event)\"\n ></v-input>\n</ng-template>\n\n<ng-template #singleInput let-editField=\"editField\" let-disabled=\"disabled\">\n <v-input\n *ngIf=\"editField.editType === 'string'\"\n [name]=\"editField.key\"\n [titleTranslationKey]=\"'connectorManagement.inputLabels.' + editField.key\"\n [defaultValue]=\"withDefaults ? editField.defaultValue : ''\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [disabled]=\"disabled\"\n (valueChange)=\"onSingleValueChange($event, editField)\"\n ></v-input>\n <v-input\n *ngIf=\"editField.editType === 'number'\"\n [name]=\"editField.key\"\n [titleTranslationKey]=\"'connectorManagement.inputLabels.' + editField.key\"\n [defaultValue]=\"withDefaults ? editField.defaultValue : ''\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [disabled]=\"disabled\"\n (valueChange)=\"onSingleValueChange($event, editField)\"\n [step]=\"1\"\n [min]=\"0\"\n ></v-input>\n</ng-template>\n\n<ng-template #buttons let-disabled=\"disabled\">\n <div class=\"border-top mt-3 pt-6\" *ngIf=\"showDeleteButton || showSaveButton\">\n <div class=\"button-container\">\n <button\n *ngIf=\"showSaveButton\"\n class=\"btn btn-primary\"\n [disabled]=\"disabled || (saveButtonDisabled$ | async)\"\n (click)=\"onSave()\"\n >\n <i class=\"icon mdi mdi-save mr-1\"></i>\n {{ 'connectorManagement.save' | translate }}\n </button>\n <button\n *ngIf=\"showDeleteButton\"\n class=\"btn btn-danger btn-space\"\n (click)=\"onDelete()\"\n [disabled]=\"disabled\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.remove' | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.button-container{flex-flow:row-reverse;width:100%;display:flex;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$2.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: MultiValueConnectorPropertyComponent, selector: "valtimo-multi-value-connector-property", inputs: ["editField", "disabled", "defaultValue"], outputs: ["valuesSet"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditConnectorPropertiesComponent, decorators: [{
|
|
551
|
-
type: Component,
|
|
552
|
-
args: [{ selector: 'valtimo-edit-connector-properties', template: "<!--\n ~ Copyright 2015-2023 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\n class=\"edit-fields\"\n *ngIf=\"{editFields: editFields$ | async, disabled: disabled$ | async} as obs\"\n>\n <ng-container *ngTemplateOutlet=\"nameInput; context: {disabled: obs.disabled}\"></ng-container>\n <ng-container *ngFor=\"let editField of obs.editFields\">\n <ng-container *ngIf=\"editField.editType === 'string' || editField.editType === 'number'\">\n <ng-container\n *ngTemplateOutlet=\"singleInput; context: {editField: editField, disabled: obs.disabled}\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"editField.editType === 'string[]' || editField.editType === 'number[]'\">\n <valtimo-multi-value-connector-property\n [editField]=\"editField\"\n (valuesSet)=\"multiFieldValuesSet($event)\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"withDefaults && editField.defaultValue\"\n >\n </valtimo-multi-value-connector-property>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"buttons; context: {disabled: obs.disabled}\"></ng-container>\n</div>\n\n<ng-template #nameInput let-disabled=\"disabled\">\n <v-input\n name=\"name\"\n titleTranslationKey=\"connectorManagement.inputLabels.connectorName\"\n [defaultValue]=\"withDefaults && defaultName ? defaultName : ''\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [disabled]=\"disabled\"\n (valueChange)=\"onNameValueChange($event)\"\n ></v-input>\n</ng-template>\n\n<ng-template #singleInput let-editField=\"editField\" let-disabled=\"disabled\">\n <v-input\n *ngIf=\"editField.editType === 'string'\"\n [name]=\"editField.key\"\n [titleTranslationKey]=\"'connectorManagement.inputLabels.' + editField.key\"\n [defaultValue]=\"withDefaults ? editField.defaultValue : ''\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [disabled]=\"disabled\"\n (valueChange)=\"onSingleValueChange($event, editField)\"\n ></v-input>\n <v-input\n *ngIf=\"editField.editType === 'number'\"\n [name]=\"editField.key\"\n [titleTranslationKey]=\"'connectorManagement.inputLabels.' + editField.key\"\n [defaultValue]=\"withDefaults ? editField.defaultValue : ''\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [disabled]=\"disabled\"\n (valueChange)=\"onSingleValueChange($event, editField)\"\n [step]=\"1\"\n [min]=\"0\"\n ></v-input>\n</ng-template>\n\n<ng-template #buttons let-disabled=\"disabled\">\n <div class=\"border-top mt-3 pt-6\" *ngIf=\"showDeleteButton || showSaveButton\">\n <div class=\"button-container\">\n <button\n *ngIf=\"showSaveButton\"\n class=\"btn btn-primary\"\n [disabled]=\"disabled || (saveButtonDisabled$ | async)\"\n (click)=\"onSave()\"\n >\n <i class=\"icon mdi mdi-save mr-1\"></i>\n {{ 'connectorManagement.save' | translate }}\n </button>\n <button\n *ngIf=\"showDeleteButton\"\n class=\"btn btn-danger btn-space\"\n (click)=\"onDelete()\"\n [disabled]=\"disabled\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.remove' | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.button-container{flex-flow:row-reverse;width:100%;display:flex;justify-content:space-between}\n"] }]
|
|
553
|
-
}], ctorParameters: function () { return [{ type: ConnectorManagementStateService }]; }, propDecorators: { properties: [{
|
|
554
|
-
type: Input
|
|
555
|
-
}], withDefaults: [{
|
|
556
|
-
type: Input
|
|
557
|
-
}], showDeleteButton: [{
|
|
558
|
-
type: Input
|
|
559
|
-
}], showSaveButton: [{
|
|
560
|
-
type: Input
|
|
561
|
-
}], defaultName: [{
|
|
562
|
-
type: Input
|
|
563
|
-
}], propertiesSave: [{
|
|
564
|
-
type: Output
|
|
565
|
-
}], connectorDelete: [{
|
|
566
|
-
type: Output
|
|
567
|
-
}] } });
|
|
568
|
-
|
|
569
|
-
/*
|
|
570
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
571
|
-
*
|
|
572
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
573
|
-
* you may not use this file except in compliance with the License.
|
|
574
|
-
* You may obtain a copy of the License at
|
|
575
|
-
*
|
|
576
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
577
|
-
*
|
|
578
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
579
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
580
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
581
|
-
* See the License for the specific language governing permissions and
|
|
582
|
-
* limitations under the License.
|
|
583
|
-
*/
|
|
584
|
-
const editProductAanvragenConnectorForm = {
|
|
585
|
-
display: 'wizard',
|
|
586
|
-
settings: {
|
|
587
|
-
pdf: {
|
|
588
|
-
id: '1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
|
|
589
|
-
src: 'https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
|
|
590
|
-
},
|
|
591
|
-
},
|
|
592
|
-
components: [
|
|
593
|
-
{
|
|
594
|
-
title: 'connectorForm.productaanvraag.step0.title',
|
|
595
|
-
breadcrumbClickable: true,
|
|
596
|
-
buttonSettings: {
|
|
597
|
-
previous: true,
|
|
598
|
-
cancel: true,
|
|
599
|
-
next: true,
|
|
600
|
-
},
|
|
601
|
-
navigateOnEnter: false,
|
|
602
|
-
saveOnEnter: false,
|
|
603
|
-
scrollToTop: false,
|
|
604
|
-
collapsible: false,
|
|
605
|
-
key: 'page0',
|
|
606
|
-
type: 'panel',
|
|
607
|
-
label: 'Page 0',
|
|
608
|
-
input: false,
|
|
609
|
-
tableView: false,
|
|
610
|
-
components: [
|
|
611
|
-
{
|
|
612
|
-
label: 'HTML',
|
|
613
|
-
attrs: [
|
|
614
|
-
{
|
|
615
|
-
attr: '',
|
|
616
|
-
value: '',
|
|
617
|
-
},
|
|
618
|
-
],
|
|
619
|
-
content: 'connectorForm.productaanvraag.step0.tip',
|
|
620
|
-
refreshOnChange: false,
|
|
621
|
-
key: 'html4',
|
|
622
|
-
type: 'htmlelement',
|
|
623
|
-
input: false,
|
|
624
|
-
tableView: false,
|
|
625
|
-
},
|
|
626
|
-
{
|
|
627
|
-
key: 'productAanvraagTypes',
|
|
628
|
-
type: 'editgrid',
|
|
629
|
-
input: true,
|
|
630
|
-
validate: {
|
|
631
|
-
minLength: 1,
|
|
632
|
-
},
|
|
633
|
-
customClass: 'edit-grid-component',
|
|
634
|
-
components: [
|
|
635
|
-
{
|
|
636
|
-
label: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.label',
|
|
637
|
-
tooltip: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.tooltip',
|
|
638
|
-
tableView: true,
|
|
639
|
-
validate: {
|
|
640
|
-
required: true,
|
|
641
|
-
},
|
|
642
|
-
key: 'productAanvraagType',
|
|
643
|
-
type: 'textfield',
|
|
644
|
-
input: true,
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
label: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.label',
|
|
648
|
-
widget: 'choicesjs',
|
|
649
|
-
placeholder: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.placeholder',
|
|
650
|
-
tableView: true,
|
|
651
|
-
validate: {
|
|
652
|
-
required: true,
|
|
653
|
-
},
|
|
654
|
-
key: 'caseDefinitionKey',
|
|
655
|
-
type: 'select',
|
|
656
|
-
input: true,
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
label: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.label',
|
|
660
|
-
widget: 'choicesjs',
|
|
661
|
-
tableView: true,
|
|
662
|
-
dataSrc: 'custom',
|
|
663
|
-
data: {
|
|
664
|
-
custom: "values = window['productRequestDefinitions'][row.caseDefinitionKey] || []",
|
|
665
|
-
},
|
|
666
|
-
dataType: 'string',
|
|
667
|
-
refreshOn: 'row.caseDefinitionKey',
|
|
668
|
-
clearOnRefresh: true,
|
|
669
|
-
key: 'processDefinitionKey',
|
|
670
|
-
type: 'select',
|
|
671
|
-
input: true,
|
|
672
|
-
validate: {
|
|
673
|
-
required: true,
|
|
674
|
-
},
|
|
675
|
-
placeholder: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.placeholder',
|
|
676
|
-
},
|
|
677
|
-
],
|
|
678
|
-
},
|
|
679
|
-
],
|
|
680
|
-
},
|
|
681
|
-
{
|
|
682
|
-
title: 'connectorForm.productaanvraag.step1.title',
|
|
683
|
-
breadcrumbClickable: true,
|
|
684
|
-
buttonSettings: {
|
|
685
|
-
previous: true,
|
|
686
|
-
cancel: true,
|
|
687
|
-
next: true,
|
|
688
|
-
},
|
|
689
|
-
navigateOnEnter: false,
|
|
690
|
-
saveOnEnter: false,
|
|
691
|
-
scrollToTop: false,
|
|
692
|
-
collapsible: false,
|
|
693
|
-
key: 'page1',
|
|
694
|
-
type: 'panel',
|
|
695
|
-
label: 'Page 1',
|
|
696
|
-
input: false,
|
|
697
|
-
tableView: false,
|
|
698
|
-
components: [
|
|
699
|
-
{
|
|
700
|
-
label: 'HTML',
|
|
701
|
-
attrs: [
|
|
702
|
-
{
|
|
703
|
-
attr: '',
|
|
704
|
-
value: '',
|
|
705
|
-
},
|
|
706
|
-
],
|
|
707
|
-
content: 'connectorForm.productaanvraag.step1.tip',
|
|
708
|
-
refreshOnChange: false,
|
|
709
|
-
key: 'html',
|
|
710
|
-
type: 'htmlelement',
|
|
711
|
-
input: false,
|
|
712
|
-
tableView: false,
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
title: 'connectorForm.productaanvraag.step1.connectors.panelTitle',
|
|
716
|
-
collapsible: false,
|
|
717
|
-
key: 'connectorFormProductaanvraagStep1ConnectorsPanelTitle',
|
|
718
|
-
type: 'panel',
|
|
719
|
-
label: 'Panel',
|
|
720
|
-
input: false,
|
|
721
|
-
tableView: false,
|
|
722
|
-
components: [
|
|
723
|
-
{
|
|
724
|
-
label: 'connectorForm.productaanvraag.step1.connectors.openNotificatieConnector.label',
|
|
725
|
-
widget: 'choicesjs',
|
|
726
|
-
tableView: true,
|
|
727
|
-
dataSrc: 'custom',
|
|
728
|
-
data: {
|
|
729
|
-
custom: "values = window['openNotificatieConnectorNames'] || []",
|
|
730
|
-
},
|
|
731
|
-
dataType: 'string',
|
|
732
|
-
clearOnRefresh: true,
|
|
733
|
-
key: 'openNotificatieConnectionName',
|
|
734
|
-
type: 'select',
|
|
735
|
-
input: true,
|
|
736
|
-
validate: {
|
|
737
|
-
required: true,
|
|
738
|
-
},
|
|
739
|
-
placeholder: 'connectorForm.productaanvraag.step1.connectors.openNotificatieConnector.placeholder',
|
|
740
|
-
},
|
|
741
|
-
{
|
|
742
|
-
label: 'connectorForm.productaanvraag.step1.connectors.objectsApiConnector.label',
|
|
743
|
-
widget: 'choicesjs',
|
|
744
|
-
tableView: true,
|
|
745
|
-
dataSrc: 'custom',
|
|
746
|
-
data: {
|
|
747
|
-
custom: "values = window['objectApiConnectorNames'] || []",
|
|
748
|
-
},
|
|
749
|
-
dataType: 'string',
|
|
750
|
-
clearOnRefresh: true,
|
|
751
|
-
key: 'objectsApiConnectionName',
|
|
752
|
-
type: 'select',
|
|
753
|
-
input: true,
|
|
754
|
-
validate: {
|
|
755
|
-
required: true,
|
|
756
|
-
},
|
|
757
|
-
placeholder: 'connectorForm.productaanvraag.step1.connectors.objectsApiConnector.placeholder',
|
|
758
|
-
},
|
|
759
|
-
],
|
|
760
|
-
},
|
|
761
|
-
],
|
|
762
|
-
},
|
|
763
|
-
{
|
|
764
|
-
title: 'connectorForm.productaanvraag.step2.title',
|
|
765
|
-
breadcrumbClickable: true,
|
|
766
|
-
buttonSettings: {
|
|
767
|
-
previous: true,
|
|
768
|
-
cancel: true,
|
|
769
|
-
next: true,
|
|
770
|
-
},
|
|
771
|
-
navigateOnEnter: false,
|
|
772
|
-
saveOnEnter: false,
|
|
773
|
-
scrollToTop: false,
|
|
774
|
-
collapsible: false,
|
|
775
|
-
key: 'page2',
|
|
776
|
-
type: 'panel',
|
|
777
|
-
label: 'Page 2',
|
|
778
|
-
input: false,
|
|
779
|
-
tableView: false,
|
|
780
|
-
components: [
|
|
781
|
-
{
|
|
782
|
-
label: 'HTML',
|
|
783
|
-
attrs: [
|
|
784
|
-
{
|
|
785
|
-
attr: '',
|
|
786
|
-
value: '',
|
|
787
|
-
},
|
|
788
|
-
],
|
|
789
|
-
content: 'connectorForm.productaanvraag.step2.tip',
|
|
790
|
-
refreshOnChange: false,
|
|
791
|
-
key: 'html3',
|
|
792
|
-
type: 'htmlelement',
|
|
793
|
-
input: false,
|
|
794
|
-
tableView: false,
|
|
795
|
-
},
|
|
796
|
-
{
|
|
797
|
-
title: 'connectorForm.productaanvraag.step2.applicant.panelTitle',
|
|
798
|
-
collapsible: false,
|
|
799
|
-
key: 'connectorFormProductaanvraagstep2ApplicantPanelTitle',
|
|
800
|
-
type: 'panel',
|
|
801
|
-
label: 'Panel',
|
|
802
|
-
input: false,
|
|
803
|
-
tableView: false,
|
|
804
|
-
components: [
|
|
805
|
-
{
|
|
806
|
-
label: 'HTML',
|
|
807
|
-
attrs: [
|
|
808
|
-
{
|
|
809
|
-
attr: '',
|
|
810
|
-
value: '',
|
|
811
|
-
},
|
|
812
|
-
],
|
|
813
|
-
content: 'connectorForm.productaanvraag.step2.applicant.tip',
|
|
814
|
-
refreshOnChange: false,
|
|
815
|
-
key: 'html5',
|
|
816
|
-
type: 'htmlelement',
|
|
817
|
-
input: false,
|
|
818
|
-
tableView: false,
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
label: 'connectorForm.productaanvraag.step2.applicant.roleTypeUrl.label',
|
|
822
|
-
tooltip: 'connectorForm.productaanvraag.step2.applicant.roleTypeUrl.tooltip',
|
|
823
|
-
tableView: true,
|
|
824
|
-
validate: {
|
|
825
|
-
required: true,
|
|
826
|
-
},
|
|
827
|
-
key: 'applicantRoleTypeUrl',
|
|
828
|
-
type: 'textfield',
|
|
829
|
-
input: true,
|
|
830
|
-
},
|
|
831
|
-
],
|
|
832
|
-
},
|
|
833
|
-
],
|
|
834
|
-
},
|
|
835
|
-
{
|
|
836
|
-
title: 'connectorForm.productaanvraag.step3.title',
|
|
837
|
-
breadcrumbClickable: true,
|
|
838
|
-
buttonSettings: {
|
|
839
|
-
previous: true,
|
|
840
|
-
cancel: true,
|
|
841
|
-
next: true,
|
|
842
|
-
},
|
|
843
|
-
navigateOnEnter: false,
|
|
844
|
-
saveOnEnter: false,
|
|
845
|
-
scrollToTop: false,
|
|
846
|
-
collapsible: false,
|
|
847
|
-
key: 'page3',
|
|
848
|
-
type: 'panel',
|
|
849
|
-
label: 'Page 3',
|
|
850
|
-
input: false,
|
|
851
|
-
tableView: false,
|
|
852
|
-
components: [
|
|
853
|
-
{
|
|
854
|
-
label: 'HTML',
|
|
855
|
-
attrs: [
|
|
856
|
-
{
|
|
857
|
-
attr: '',
|
|
858
|
-
value: '',
|
|
859
|
-
},
|
|
860
|
-
],
|
|
861
|
-
content: 'connectorForm.productaanvraag.step3.tip',
|
|
862
|
-
refreshOnChange: false,
|
|
863
|
-
key: 'html6',
|
|
864
|
-
type: 'htmlelement',
|
|
865
|
-
input: false,
|
|
866
|
-
tableView: false,
|
|
867
|
-
},
|
|
868
|
-
{
|
|
869
|
-
label: 'connectorForm.productaanvraag.step3.name',
|
|
870
|
-
tableView: true,
|
|
871
|
-
validate: {
|
|
872
|
-
required: true,
|
|
873
|
-
},
|
|
874
|
-
key: 'connectorName',
|
|
875
|
-
type: 'textfield',
|
|
876
|
-
input: true,
|
|
877
|
-
},
|
|
878
|
-
],
|
|
879
|
-
},
|
|
880
|
-
],
|
|
881
|
-
};
|
|
882
|
-
|
|
883
|
-
/*
|
|
884
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
885
|
-
*
|
|
886
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
887
|
-
* you may not use this file except in compliance with the License.
|
|
888
|
-
* You may obtain a copy of the License at
|
|
889
|
-
*
|
|
890
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
891
|
-
*
|
|
892
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
893
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
894
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
895
|
-
* See the License for the specific language governing permissions and
|
|
896
|
-
* limitations under the License.
|
|
897
|
-
*/
|
|
898
|
-
class EditProductAanvragenConnectorComponent {
|
|
899
|
-
constructor(formTranslationService, formMappingService, documentService, translateService, connectorManagementService, stateService) {
|
|
900
|
-
this.formTranslationService = formTranslationService;
|
|
901
|
-
this.formMappingService = formMappingService;
|
|
902
|
-
this.documentService = documentService;
|
|
903
|
-
this.translateService = translateService;
|
|
904
|
-
this.connectorManagementService = connectorManagementService;
|
|
905
|
-
this.stateService = stateService;
|
|
906
|
-
this.showDeleteButton = false;
|
|
907
|
-
this.propertiesSave = new EventEmitter();
|
|
908
|
-
this.connectorDelete = new EventEmitter();
|
|
909
|
-
this.formRefresh$ = new Subject();
|
|
910
|
-
this.formDefinition$ = new BehaviorSubject(undefined);
|
|
911
|
-
this.translatedFormDefinition$ = this.formDefinition$.pipe(map(definition => this.formTranslationService.translateForm(definition)));
|
|
912
|
-
this.caseDefinitionOptions = [];
|
|
913
|
-
this.processDocumentDefinitionOptions = {};
|
|
914
|
-
this.options = {
|
|
915
|
-
disableAlerts: true,
|
|
916
|
-
};
|
|
917
|
-
this.mapCaseDefinitionKeyComponent = (component) => {
|
|
918
|
-
if (component.key === 'caseDefinitionKey') {
|
|
919
|
-
return Object.assign(Object.assign({}, component), { disabled: false, data: { values: this.caseDefinitionOptions } });
|
|
920
|
-
}
|
|
921
|
-
return component;
|
|
922
|
-
};
|
|
923
|
-
}
|
|
924
|
-
ngOnInit() {
|
|
925
|
-
window['productRequestDefinitions'] = {};
|
|
926
|
-
this.openFormDefinitionSubscription();
|
|
927
|
-
this.openDeleteSubscription();
|
|
928
|
-
this.formDefinition$.next(editProductAanvragenConnectorForm);
|
|
929
|
-
this.loadConnectorNames();
|
|
930
|
-
this.loadDefinitions();
|
|
931
|
-
this.stateService.hideModalSaveButton();
|
|
932
|
-
}
|
|
933
|
-
ngOnChanges() {
|
|
934
|
-
this.formDefinition$.next(editProductAanvragenConnectorForm);
|
|
935
|
-
this.loadConnectorNames();
|
|
936
|
-
this.loadDefinitions();
|
|
937
|
-
}
|
|
938
|
-
ngOnDestroy() {
|
|
939
|
-
var _a, _b, _c;
|
|
940
|
-
(_a = this.formDefinitionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
941
|
-
(_b = this.translateSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
942
|
-
(_c = this.deleteSubscription) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
943
|
-
}
|
|
944
|
-
onSubmit(event) {
|
|
945
|
-
const submission = event.data;
|
|
946
|
-
const properties = cloneDeep(this.properties);
|
|
947
|
-
properties.objectsApiConnectionName = submission.objectsApiConnectionName;
|
|
948
|
-
properties.openNotificatieConnectionName = submission.openNotificatieConnectionName;
|
|
949
|
-
properties.aanvragerRolTypeUrl = submission.applicantRoleTypeUrl;
|
|
950
|
-
properties.typeMapping = submission.productAanvraagTypes;
|
|
951
|
-
this.propertiesSave.emit({ properties, name: submission.connectorName });
|
|
952
|
-
}
|
|
953
|
-
onDelete() {
|
|
954
|
-
this.stateService.disableInput();
|
|
955
|
-
this.connectorDelete.emit();
|
|
956
|
-
}
|
|
957
|
-
openFormDefinitionSubscription() {
|
|
958
|
-
this.formDefinitionSubscription = combineLatest([
|
|
959
|
-
this.formDefinition$,
|
|
960
|
-
this.translateService.stream('key'),
|
|
961
|
-
]).subscribe(([form]) => {
|
|
962
|
-
const translatedForm = this.formTranslationService.translateForm(form);
|
|
963
|
-
this.refreshForm({ form: translatedForm });
|
|
964
|
-
});
|
|
965
|
-
}
|
|
966
|
-
prefillForm() {
|
|
967
|
-
const properties = cloneDeep(this.properties);
|
|
968
|
-
const submission = {};
|
|
969
|
-
submission.objectsApiConnectionName = properties.objectsApiConnectionName;
|
|
970
|
-
submission.openNotificatieConnectionName = properties.openNotificatieConnectionName;
|
|
971
|
-
submission.applicantRoleTypeUrl = properties.aanvragerRolTypeUrl;
|
|
972
|
-
submission.productAanvraagTypes = properties.typeMapping;
|
|
973
|
-
submission.connectorName = this.defaultName;
|
|
974
|
-
this.refreshForm({ submission: { data: submission } });
|
|
975
|
-
}
|
|
976
|
-
refreshForm(refreshValue) {
|
|
977
|
-
this.formRefresh$.next(refreshValue);
|
|
978
|
-
}
|
|
979
|
-
loadDefinitions() {
|
|
980
|
-
let documentDefinitions;
|
|
981
|
-
this.documentService
|
|
982
|
-
.getAllDefinitions()
|
|
983
|
-
.pipe(tap(resDocumentDefinitions => (documentDefinitions = resDocumentDefinitions.content)), switchMap(resDocumentDefinitions => combineLatest(resDocumentDefinitions.content.map(definition => this.documentService.findProcessDocumentDefinitions(definition.id.name)))), tap(res => {
|
|
984
|
-
var _a;
|
|
985
|
-
this.caseDefinitionOptions = documentDefinitions.map(documentDefinition => ({
|
|
986
|
-
label: documentDefinition.id.name,
|
|
987
|
-
value: documentDefinition.id.name,
|
|
988
|
-
}));
|
|
989
|
-
documentDefinitions.forEach((documentDefinition, index) => {
|
|
990
|
-
this.processDocumentDefinitionOptions[documentDefinition.id.name] = res[index].map(processDocumentDefinition => processDocumentDefinition.id.processDefinitionKey);
|
|
991
|
-
});
|
|
992
|
-
window['productRequestDefinitions'] = this.processDocumentDefinitionOptions;
|
|
993
|
-
const definitionWithCaseDefinitionOptions = this.formMappingService.mapComponents(this.formDefinition$.getValue(), this.mapCaseDefinitionKeyComponent);
|
|
994
|
-
this.formDefinition$.next(definitionWithCaseDefinitionOptions);
|
|
995
|
-
if ((_a = this.properties) === null || _a === void 0 ? void 0 : _a.aanvragerRolTypeUrl) {
|
|
996
|
-
this.prefillForm();
|
|
997
|
-
}
|
|
998
|
-
}))
|
|
999
|
-
.subscribe();
|
|
1000
|
-
}
|
|
1001
|
-
loadConnectorNames() {
|
|
1002
|
-
this.connectorManagementService
|
|
1003
|
-
.getConnectorTypes()
|
|
1004
|
-
.pipe(tap(res => {
|
|
1005
|
-
res.forEach(connectorType => {
|
|
1006
|
-
if (connectorType.name === 'ObjectsApi') {
|
|
1007
|
-
this.loadConnectorNamesByType('objectApiConnectorNames', connectorType.id);
|
|
1008
|
-
}
|
|
1009
|
-
else if (connectorType.name === 'OpenNotificatie') {
|
|
1010
|
-
this.loadConnectorNamesByType('openNotificatieConnectorNames', connectorType.id);
|
|
1011
|
-
}
|
|
1012
|
-
});
|
|
1013
|
-
}))
|
|
1014
|
-
.subscribe();
|
|
1015
|
-
}
|
|
1016
|
-
loadConnectorNamesByType(windowKey, connectorTypeId) {
|
|
1017
|
-
this.connectorManagementService
|
|
1018
|
-
.getConnectorInstancesByType(connectorTypeId)
|
|
1019
|
-
.pipe(map(res => (window[windowKey] = res.content.map(connector => connector.name))))
|
|
1020
|
-
.subscribe();
|
|
1021
|
-
}
|
|
1022
|
-
openDeleteSubscription() {
|
|
1023
|
-
this.deleteSubscription = this.stateService.delete$.subscribe(() => {
|
|
1024
|
-
this.onDelete();
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
EditProductAanvragenConnectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditProductAanvragenConnectorComponent, deps: [{ token: i1$1.FormTranslationService }, { token: i1$1.FormMappingService }, { token: i2$3.DocumentService }, { token: i2$1.TranslateService }, { token: ConnectorManagementService }, { token: ConnectorManagementStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1029
|
-
EditProductAanvragenConnectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EditProductAanvragenConnectorComponent, selector: "valtimo-edit-product-aanvragen-connector", inputs: { properties: "properties", defaultName: "defaultName", showDeleteButton: "showDeleteButton" }, outputs: { propertiesSave: "propertiesSave", connectorDelete: "connectorDelete" }, usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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\n *ngIf=\"translatedFormDefinition$ | async as definition\"\n class=\"edit-product-request\"\n [ngClass]=\"{'has-delete': showDeleteButton}\"\n>\n <valtimo-form-io\n [form]=\"definition\"\n [formRefresh$]=\"formRefresh$\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n\n <button *ngIf=\"showDeleteButton\" class=\"btn btn-danger btn-space\" (click)=\"onDelete()\">\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.remove' | translate }}\n </button>\n</div>\n", styles: ["/*!\n * Copyright 2015-2023 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-product-request ::ng-deep .btn-wizard-nav-cancel{display:none}.edit-product-request ::ng-deep .list-inline{display:flex;flex-direction:row;justify-content:flex-end}.edit-product-request ::ng-deep .col-sm-2{flex:0 0 25%;max-width:25%}.edit-product-request ::ng-deep .edit-grid-component>label{display:none}.edit-product-request.has-delete ::ng-deep .list-inline{margin-bottom:-30px}.edit-product-request .btn-danger{position:relative}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "directive", type: i8.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
1030
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditProductAanvragenConnectorComponent, decorators: [{
|
|
1031
|
-
type: Component,
|
|
1032
|
-
args: [{ selector: 'valtimo-edit-product-aanvragen-connector', template: "<!--\n ~ Copyright 2015-2023 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\n *ngIf=\"translatedFormDefinition$ | async as definition\"\n class=\"edit-product-request\"\n [ngClass]=\"{'has-delete': showDeleteButton}\"\n>\n <valtimo-form-io\n [form]=\"definition\"\n [formRefresh$]=\"formRefresh$\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n\n <button *ngIf=\"showDeleteButton\" class=\"btn btn-danger btn-space\" (click)=\"onDelete()\">\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.remove' | translate }}\n </button>\n</div>\n", styles: ["/*!\n * Copyright 2015-2023 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-product-request ::ng-deep .btn-wizard-nav-cancel{display:none}.edit-product-request ::ng-deep .list-inline{display:flex;flex-direction:row;justify-content:flex-end}.edit-product-request ::ng-deep .col-sm-2{flex:0 0 25%;max-width:25%}.edit-product-request ::ng-deep .edit-grid-component>label{display:none}.edit-product-request.has-delete ::ng-deep .list-inline{margin-bottom:-30px}.edit-product-request .btn-danger{position:relative}\n"] }]
|
|
1033
|
-
}], ctorParameters: function () { return [{ type: i1$1.FormTranslationService }, { type: i1$1.FormMappingService }, { type: i2$3.DocumentService }, { type: i2$1.TranslateService }, { type: ConnectorManagementService }, { type: ConnectorManagementStateService }]; }, propDecorators: { properties: [{
|
|
1034
|
-
type: Input
|
|
1035
|
-
}], defaultName: [{
|
|
1036
|
-
type: Input
|
|
1037
|
-
}], showDeleteButton: [{
|
|
1038
|
-
type: Input
|
|
1039
|
-
}], propertiesSave: [{
|
|
1040
|
-
type: Output
|
|
1041
|
-
}], connectorDelete: [{
|
|
1042
|
-
type: Output
|
|
1043
|
-
}] } });
|
|
1044
|
-
|
|
1045
|
-
/*
|
|
1046
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1047
|
-
*
|
|
1048
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1049
|
-
* you may not use this file except in compliance with the License.
|
|
1050
|
-
* You may obtain a copy of the License at
|
|
1051
|
-
*
|
|
1052
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1053
|
-
*
|
|
1054
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1055
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1056
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1057
|
-
* See the License for the specific language governing permissions and
|
|
1058
|
-
* limitations under the License.
|
|
1059
|
-
*/
|
|
1060
|
-
const editTaakConnectorForm = {
|
|
1061
|
-
components: [
|
|
1062
|
-
{
|
|
1063
|
-
label: 'connectorForm.taak.name',
|
|
1064
|
-
tableView: false,
|
|
1065
|
-
validate: {
|
|
1066
|
-
required: true,
|
|
1067
|
-
},
|
|
1068
|
-
key: 'connectorName',
|
|
1069
|
-
type: 'textfield',
|
|
1070
|
-
input: true,
|
|
1071
|
-
},
|
|
1072
|
-
{
|
|
1073
|
-
label: 'connectorForm.taak.openNotificatieConnector.label',
|
|
1074
|
-
widget: 'choicesjs',
|
|
1075
|
-
tableView: false,
|
|
1076
|
-
dataSrc: 'custom',
|
|
1077
|
-
data: {
|
|
1078
|
-
custom: "values = window['openNotificatieConnectorNames'] || []",
|
|
1079
|
-
},
|
|
1080
|
-
dataType: 'string',
|
|
1081
|
-
clearOnRefresh: true,
|
|
1082
|
-
key: 'openNotificatieConnectionName',
|
|
1083
|
-
type: 'select',
|
|
1084
|
-
input: true,
|
|
1085
|
-
validate: {
|
|
1086
|
-
required: true,
|
|
1087
|
-
},
|
|
1088
|
-
placeholder: 'connectorForm.taak.openNotificatieConnector.placeholder',
|
|
1089
|
-
},
|
|
1090
|
-
{
|
|
1091
|
-
label: 'connectorForm.taak.objectsApiConnector.label',
|
|
1092
|
-
widget: 'choicesjs',
|
|
1093
|
-
tableView: false,
|
|
1094
|
-
dataSrc: 'custom',
|
|
1095
|
-
data: {
|
|
1096
|
-
custom: "values = window['objectApiConnectorNames'] || []",
|
|
1097
|
-
},
|
|
1098
|
-
dataType: 'string',
|
|
1099
|
-
clearOnRefresh: true,
|
|
1100
|
-
key: 'objectsApiConnectionName',
|
|
1101
|
-
type: 'select',
|
|
1102
|
-
input: true,
|
|
1103
|
-
validate: {
|
|
1104
|
-
required: true,
|
|
1105
|
-
},
|
|
1106
|
-
placeholder: 'connectorForm.taak.objectsApiConnector.placeholder',
|
|
1107
|
-
},
|
|
1108
|
-
{
|
|
1109
|
-
key: 'submit',
|
|
1110
|
-
type: 'button',
|
|
1111
|
-
customClass: 'list-inline',
|
|
1112
|
-
leftIcon: 'icon mdi mdi-save mt-1',
|
|
1113
|
-
input: true,
|
|
1114
|
-
label: 'connectorManagement.save',
|
|
1115
|
-
tableView: false,
|
|
1116
|
-
disableOnInvalid: true,
|
|
1117
|
-
},
|
|
1118
|
-
],
|
|
1119
|
-
};
|
|
1120
|
-
|
|
1121
|
-
/*
|
|
1122
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1123
|
-
*
|
|
1124
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1125
|
-
* you may not use this file except in compliance with the License.
|
|
1126
|
-
* You may obtain a copy of the License at
|
|
1127
|
-
*
|
|
1128
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1129
|
-
*
|
|
1130
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1131
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1132
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1133
|
-
* See the License for the specific language governing permissions and
|
|
1134
|
-
* limitations under the License.
|
|
1135
|
-
*/
|
|
1136
|
-
class EditTaakConnectorComponent {
|
|
1137
|
-
constructor(formTranslationService, formMappingService, translateService, connectorManagementService, stateService) {
|
|
1138
|
-
this.formTranslationService = formTranslationService;
|
|
1139
|
-
this.formMappingService = formMappingService;
|
|
1140
|
-
this.translateService = translateService;
|
|
1141
|
-
this.connectorManagementService = connectorManagementService;
|
|
1142
|
-
this.stateService = stateService;
|
|
1143
|
-
this.showDeleteButton = false;
|
|
1144
|
-
this.propertiesSave = new EventEmitter();
|
|
1145
|
-
this.connectorDelete = new EventEmitter();
|
|
1146
|
-
this.formRefresh$ = new Subject();
|
|
1147
|
-
this.formDefinition$ = new BehaviorSubject(undefined);
|
|
1148
|
-
this.translatedFormDefinition$ = this.formDefinition$.pipe(map(definition => this.formTranslationService.translateForm(definition)));
|
|
1149
|
-
this.options = {
|
|
1150
|
-
disableAlerts: true,
|
|
1151
|
-
};
|
|
1152
|
-
}
|
|
1153
|
-
ngOnInit() {
|
|
1154
|
-
this.openFormDefinitionSubscription();
|
|
1155
|
-
this.openDeleteSubscription();
|
|
1156
|
-
this.formDefinition$.next(editTaakConnectorForm);
|
|
1157
|
-
this.loadConnectorNames();
|
|
1158
|
-
this.prefillForm();
|
|
1159
|
-
this.stateService.hideModalSaveButton();
|
|
1160
|
-
}
|
|
1161
|
-
ngOnChanges() {
|
|
1162
|
-
this.formDefinition$.next(editTaakConnectorForm);
|
|
1163
|
-
this.loadConnectorNames();
|
|
1164
|
-
this.prefillForm();
|
|
1165
|
-
}
|
|
1166
|
-
ngOnDestroy() {
|
|
1167
|
-
var _a, _b, _c;
|
|
1168
|
-
(_a = this.formDefinitionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
1169
|
-
(_b = this.translateSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
1170
|
-
(_c = this.deleteSubscription) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
1171
|
-
}
|
|
1172
|
-
onSubmit(event) {
|
|
1173
|
-
const submission = event.data;
|
|
1174
|
-
const properties = cloneDeep(this.properties);
|
|
1175
|
-
properties.objectsApiConnectionName = submission.objectsApiConnectionName;
|
|
1176
|
-
properties.openNotificatieConnectionName = submission.openNotificatieConnectionName;
|
|
1177
|
-
this.propertiesSave.emit({ properties, name: submission.connectorName });
|
|
1178
|
-
}
|
|
1179
|
-
onDelete() {
|
|
1180
|
-
this.stateService.disableInput();
|
|
1181
|
-
this.connectorDelete.emit();
|
|
1182
|
-
}
|
|
1183
|
-
openFormDefinitionSubscription() {
|
|
1184
|
-
this.formDefinitionSubscription = combineLatest([
|
|
1185
|
-
this.formDefinition$,
|
|
1186
|
-
this.translateService.stream('key'),
|
|
1187
|
-
]).subscribe(([form]) => {
|
|
1188
|
-
const translatedForm = this.formTranslationService.translateForm(form);
|
|
1189
|
-
this.refreshForm({ form: translatedForm });
|
|
1190
|
-
});
|
|
1191
|
-
}
|
|
1192
|
-
prefillForm() {
|
|
1193
|
-
timer(100)
|
|
1194
|
-
.pipe(tap(() => {
|
|
1195
|
-
if (this.defaultName !== undefined) {
|
|
1196
|
-
const properties = cloneDeep(this.properties);
|
|
1197
|
-
const submission = {};
|
|
1198
|
-
submission.objectsApiConnectionName = properties.objectsApiConnectionName;
|
|
1199
|
-
submission.openNotificatieConnectionName = properties.openNotificatieConnectionName;
|
|
1200
|
-
submission.connectorName = this.defaultName;
|
|
1201
|
-
this.refreshForm({ submission: { data: submission } });
|
|
1202
|
-
}
|
|
1203
|
-
}))
|
|
1204
|
-
.subscribe();
|
|
1205
|
-
}
|
|
1206
|
-
refreshForm(refreshValue) {
|
|
1207
|
-
this.formRefresh$.next(refreshValue);
|
|
1208
|
-
}
|
|
1209
|
-
loadConnectorNames() {
|
|
1210
|
-
this.connectorManagementService
|
|
1211
|
-
.getConnectorTypes()
|
|
1212
|
-
.pipe(tap(res => {
|
|
1213
|
-
res.forEach(connectorType => {
|
|
1214
|
-
if (connectorType.name === 'ObjectsApi') {
|
|
1215
|
-
this.loadConnectorNamesByType('objectApiConnectorNames', connectorType.id);
|
|
1216
|
-
}
|
|
1217
|
-
else if (connectorType.name === 'OpenNotificatie') {
|
|
1218
|
-
this.loadConnectorNamesByType('openNotificatieConnectorNames', connectorType.id);
|
|
1219
|
-
}
|
|
1220
|
-
});
|
|
1221
|
-
}))
|
|
1222
|
-
.subscribe();
|
|
1223
|
-
}
|
|
1224
|
-
loadConnectorNamesByType(windowKey, connectorTypeId) {
|
|
1225
|
-
this.connectorManagementService
|
|
1226
|
-
.getConnectorInstancesByType(connectorTypeId)
|
|
1227
|
-
.pipe(map(res => (window[windowKey] = res.content.map(connector => connector.name))))
|
|
1228
|
-
.subscribe();
|
|
1229
|
-
}
|
|
1230
|
-
openDeleteSubscription() {
|
|
1231
|
-
this.deleteSubscription = this.stateService.delete$.subscribe(() => {
|
|
1232
|
-
this.onDelete();
|
|
1233
|
-
});
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
EditTaakConnectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditTaakConnectorComponent, deps: [{ token: i1$1.FormTranslationService }, { token: i1$1.FormMappingService }, { token: i2$1.TranslateService }, { token: ConnectorManagementService }, { token: ConnectorManagementStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1237
|
-
EditTaakConnectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EditTaakConnectorComponent, selector: "valtimo-edit-taak-connector", inputs: { properties: "properties", defaultName: "defaultName", showDeleteButton: "showDeleteButton" }, outputs: { propertiesSave: "propertiesSave", connectorDelete: "connectorDelete" }, usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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\n *ngIf=\"translatedFormDefinition$ | async as definition\"\n class=\"edit-taak\"\n [ngClass]=\"{'has-delete': showDeleteButton}\"\n>\n <valtimo-form-io\n [form]=\"definition\"\n [formRefresh$]=\"formRefresh$\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n\n <button *ngIf=\"showDeleteButton\" class=\"btn btn-danger btn-space\" (click)=\"onDelete()\">\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.remove' | translate }}\n </button>\n</div>\n", styles: ["/*!\n * Copyright 2015-2023 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-taak ::ng-deep .list-inline{display:flex;flex-direction:row;justify-content:flex-end}.edit-taak .btn-danger{position:absolute;bottom:35px}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "directive", type: i8.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
1238
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditTaakConnectorComponent, decorators: [{
|
|
1239
|
-
type: Component,
|
|
1240
|
-
args: [{ selector: 'valtimo-edit-taak-connector', template: "<!--\n ~ Copyright 2015-2023 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\n *ngIf=\"translatedFormDefinition$ | async as definition\"\n class=\"edit-taak\"\n [ngClass]=\"{'has-delete': showDeleteButton}\"\n>\n <valtimo-form-io\n [form]=\"definition\"\n [formRefresh$]=\"formRefresh$\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n\n <button *ngIf=\"showDeleteButton\" class=\"btn btn-danger btn-space\" (click)=\"onDelete()\">\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.remove' | translate }}\n </button>\n</div>\n", styles: ["/*!\n * Copyright 2015-2023 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-taak ::ng-deep .list-inline{display:flex;flex-direction:row;justify-content:flex-end}.edit-taak .btn-danger{position:absolute;bottom:35px}\n"] }]
|
|
1241
|
-
}], ctorParameters: function () { return [{ type: i1$1.FormTranslationService }, { type: i1$1.FormMappingService }, { type: i2$1.TranslateService }, { type: ConnectorManagementService }, { type: ConnectorManagementStateService }]; }, propDecorators: { properties: [{
|
|
1242
|
-
type: Input
|
|
1243
|
-
}], defaultName: [{
|
|
1244
|
-
type: Input
|
|
1245
|
-
}], showDeleteButton: [{
|
|
1246
|
-
type: Input
|
|
1247
|
-
}], propertiesSave: [{
|
|
1248
|
-
type: Output
|
|
1249
|
-
}], connectorDelete: [{
|
|
1250
|
-
type: Output
|
|
1251
|
-
}] } });
|
|
1252
|
-
|
|
1253
|
-
/*
|
|
1254
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1255
|
-
*
|
|
1256
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1257
|
-
* you may not use this file except in compliance with the License.
|
|
1258
|
-
* You may obtain a copy of the License at
|
|
1259
|
-
*
|
|
1260
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1261
|
-
*
|
|
1262
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1263
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1264
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1265
|
-
* See the License for the specific language governing permissions and
|
|
1266
|
-
* limitations under the License.
|
|
1267
|
-
*/
|
|
1268
|
-
class EditConnectorFormComponent {
|
|
1269
|
-
constructor() {
|
|
1270
|
-
this.withDefaults = false;
|
|
1271
|
-
this.showDeleteButton = false;
|
|
1272
|
-
this.showSaveButton = true;
|
|
1273
|
-
this.propertiesSave = new EventEmitter();
|
|
1274
|
-
this.connectorDelete = new EventEmitter();
|
|
1275
|
-
this.productAanvragenName = 'ProductAanvragen';
|
|
1276
|
-
this.taakName = 'Taak';
|
|
1277
|
-
this.customConnectorNames = [this.productAanvragenName, this.taakName];
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
EditConnectorFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditConnectorFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1281
|
-
EditConnectorFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EditConnectorFormComponent, selector: "valtimo-edit-connector-form", inputs: { properties: "properties", withDefaults: "withDefaults", showDeleteButton: "showDeleteButton", showSaveButton: "showSaveButton", defaultName: "defaultName", connectorName: "connectorName" }, outputs: { propertiesSave: "propertiesSave", connectorDelete: "connectorDelete" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-edit-connector-properties\n *ngIf=\"!customConnectorNames.includes(connectorName)\"\n [properties]=\"properties\"\n [withDefaults]=\"withDefaults\"\n [defaultName]=\"defaultName\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n [showSaveButton]=\"showSaveButton\"\n>\n</valtimo-edit-connector-properties>\n\n<valtimo-edit-product-aanvragen-connector\n *ngIf=\"connectorName === productAanvragenName\"\n [defaultName]=\"defaultName\"\n [properties]=\"properties\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-product-aanvragen-connector>\n\n<valtimo-edit-taak-connector\n *ngIf=\"connectorName === taakName\"\n [defaultName]=\"defaultName\"\n [properties]=\"properties\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-taak-connector>\n", styles: ["/*!\n * Copyright 2015-2023 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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EditConnectorPropertiesComponent, selector: "valtimo-edit-connector-properties", inputs: ["properties", "withDefaults", "showDeleteButton", "showSaveButton", "defaultName"], outputs: ["propertiesSave", "connectorDelete"] }, { kind: "component", type: EditProductAanvragenConnectorComponent, selector: "valtimo-edit-product-aanvragen-connector", inputs: ["properties", "defaultName", "showDeleteButton"], outputs: ["propertiesSave", "connectorDelete"] }, { kind: "component", type: EditTaakConnectorComponent, selector: "valtimo-edit-taak-connector", inputs: ["properties", "defaultName", "showDeleteButton"], outputs: ["propertiesSave", "connectorDelete"] }] });
|
|
1282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditConnectorFormComponent, decorators: [{
|
|
1283
|
-
type: Component,
|
|
1284
|
-
args: [{ selector: 'valtimo-edit-connector-form', template: "<!--\n ~ Copyright 2015-2023 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-edit-connector-properties\n *ngIf=\"!customConnectorNames.includes(connectorName)\"\n [properties]=\"properties\"\n [withDefaults]=\"withDefaults\"\n [defaultName]=\"defaultName\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n [showSaveButton]=\"showSaveButton\"\n>\n</valtimo-edit-connector-properties>\n\n<valtimo-edit-product-aanvragen-connector\n *ngIf=\"connectorName === productAanvragenName\"\n [defaultName]=\"defaultName\"\n [properties]=\"properties\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-product-aanvragen-connector>\n\n<valtimo-edit-taak-connector\n *ngIf=\"connectorName === taakName\"\n [defaultName]=\"defaultName\"\n [properties]=\"properties\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-taak-connector>\n", styles: ["/*!\n * Copyright 2015-2023 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"] }]
|
|
1285
|
-
}], propDecorators: { properties: [{
|
|
1286
|
-
type: Input
|
|
1287
|
-
}], withDefaults: [{
|
|
1288
|
-
type: Input
|
|
1289
|
-
}], showDeleteButton: [{
|
|
1290
|
-
type: Input
|
|
1291
|
-
}], showSaveButton: [{
|
|
1292
|
-
type: Input
|
|
1293
|
-
}], defaultName: [{
|
|
1294
|
-
type: Input
|
|
1295
|
-
}], connectorName: [{
|
|
1296
|
-
type: Input
|
|
1297
|
-
}], propertiesSave: [{
|
|
1298
|
-
type: Output
|
|
1299
|
-
}], connectorDelete: [{
|
|
1300
|
-
type: Output
|
|
1301
|
-
}] } });
|
|
1302
|
-
|
|
1303
|
-
/*
|
|
1304
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1305
|
-
*
|
|
1306
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1307
|
-
* you may not use this file except in compliance with the License.
|
|
1308
|
-
* You may obtain a copy of the License at
|
|
1309
|
-
*
|
|
1310
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1311
|
-
*
|
|
1312
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1313
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1314
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1315
|
-
* See the License for the specific language governing permissions and
|
|
1316
|
-
* limitations under the License.
|
|
1317
|
-
*/
|
|
1318
|
-
class AddConnectorConfigureComponent {
|
|
1319
|
-
constructor(connectorManagementService, stateService, alertService, translateService) {
|
|
1320
|
-
this.connectorManagementService = connectorManagementService;
|
|
1321
|
-
this.stateService = stateService;
|
|
1322
|
-
this.alertService = alertService;
|
|
1323
|
-
this.translateService = translateService;
|
|
1324
|
-
this.showSaveButton = true;
|
|
1325
|
-
this.selectedConnector$ = this.stateService.selectedConnector$;
|
|
1326
|
-
this.disabled$ = this.stateService.inputDisabled$;
|
|
1327
|
-
this.connectorTypes$ = this.stateService.connectorTypes$;
|
|
1328
|
-
}
|
|
1329
|
-
selectConnector(connectorType) {
|
|
1330
|
-
this.stateService.setSelectedConnectorType(connectorType);
|
|
1331
|
-
}
|
|
1332
|
-
onSave(event) {
|
|
1333
|
-
this.stateService.disableInput();
|
|
1334
|
-
this.selectedConnector$.pipe(take(1)).subscribe(selectedConnectorType => {
|
|
1335
|
-
this.connectorManagementService
|
|
1336
|
-
.createConnectorInstance({
|
|
1337
|
-
name: event.name,
|
|
1338
|
-
typeId: selectedConnectorType.id,
|
|
1339
|
-
connectorProperties: event.properties,
|
|
1340
|
-
})
|
|
1341
|
-
.subscribe(() => {
|
|
1342
|
-
this.alertService.success(this.translateService.instant('connectorManagement.messages.addSuccess'));
|
|
1343
|
-
this.stateService.hideModal();
|
|
1344
|
-
this.stateService.enableInput();
|
|
1345
|
-
this.stateService.refresh();
|
|
1346
|
-
}, () => {
|
|
1347
|
-
this.stateService.enableInput();
|
|
1348
|
-
});
|
|
1349
|
-
});
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
AddConnectorConfigureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddConnectorConfigureComponent, deps: [{ token: ConnectorManagementService }, { token: ConnectorManagementStateService }, { token: i6$1.AlertService }, { token: i2$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1353
|
-
AddConnectorConfigureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AddConnectorConfigureComponent, selector: "valtimo-add-connector-configure", inputs: { showSaveButton: "showSaveButton" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-edit-connector-form\n *ngIf=\"selectedConnector$ | async as connector\"\n [connectorName]=\"connector.name\"\n [properties]=\"(selectedConnector$ | async).properties\"\n (propertiesSave)=\"onSave($event)\"\n [showSaveButton]=\"showSaveButton\"\n>\n</valtimo-edit-connector-form>\n", styles: ["/*!\n * Copyright 2015-2023 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}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EditConnectorFormComponent, selector: "valtimo-edit-connector-form", inputs: ["properties", "withDefaults", "showDeleteButton", "showSaveButton", "defaultName", "connectorName"], outputs: ["propertiesSave", "connectorDelete"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }] });
|
|
1354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddConnectorConfigureComponent, decorators: [{
|
|
1355
|
-
type: Component,
|
|
1356
|
-
args: [{ selector: 'valtimo-add-connector-configure', template: "<!--\n ~ Copyright 2015-2023 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-edit-connector-form\n *ngIf=\"selectedConnector$ | async as connector\"\n [connectorName]=\"connector.name\"\n [properties]=\"(selectedConnector$ | async).properties\"\n (propertiesSave)=\"onSave($event)\"\n [showSaveButton]=\"showSaveButton\"\n>\n</valtimo-edit-connector-form>\n", styles: ["/*!\n * Copyright 2015-2023 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}\n"] }]
|
|
1357
|
-
}], ctorParameters: function () { return [{ type: ConnectorManagementService }, { type: ConnectorManagementStateService }, { type: i6$1.AlertService }, { type: i2$1.TranslateService }]; }, propDecorators: { showSaveButton: [{
|
|
1358
|
-
type: Input
|
|
1359
|
-
}] } });
|
|
1360
|
-
|
|
1361
|
-
/*
|
|
1362
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1363
|
-
*
|
|
1364
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1365
|
-
* you may not use this file except in compliance with the License.
|
|
1366
|
-
* You may obtain a copy of the License at
|
|
1367
|
-
*
|
|
1368
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1369
|
-
*
|
|
1370
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1371
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1372
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1373
|
-
* See the License for the specific language governing permissions and
|
|
1374
|
-
* limitations under the License.
|
|
1375
|
-
*/
|
|
1376
|
-
class ModifyConnectorComponent {
|
|
1377
|
-
constructor(connectorManagementService, stateService, alertService, translateService) {
|
|
1378
|
-
this.connectorManagementService = connectorManagementService;
|
|
1379
|
-
this.stateService = stateService;
|
|
1380
|
-
this.alertService = alertService;
|
|
1381
|
-
this.translateService = translateService;
|
|
1382
|
-
this.showSaveButton = true;
|
|
1383
|
-
this.showDeleteButton = true;
|
|
1384
|
-
this.instance$ = this.stateService.selectedInstance$;
|
|
1385
|
-
}
|
|
1386
|
-
onSave(event) {
|
|
1387
|
-
this.stateService.disableInput();
|
|
1388
|
-
this.instance$.pipe(take(1)).subscribe(instance => {
|
|
1389
|
-
this.connectorManagementService
|
|
1390
|
-
.updateConnectorInstance({
|
|
1391
|
-
name: event.name,
|
|
1392
|
-
typeId: instance.type.id,
|
|
1393
|
-
id: instance.id,
|
|
1394
|
-
connectorProperties: event.properties,
|
|
1395
|
-
})
|
|
1396
|
-
.subscribe(() => {
|
|
1397
|
-
this.alertService.success(this.translateService.instant('connectorManagement.messages.modifySuccess'));
|
|
1398
|
-
this.stateService.hideModal();
|
|
1399
|
-
this.stateService.enableInput();
|
|
1400
|
-
this.stateService.refresh();
|
|
1401
|
-
}, () => {
|
|
1402
|
-
this.stateService.enableInput();
|
|
1403
|
-
});
|
|
1404
|
-
});
|
|
1405
|
-
}
|
|
1406
|
-
onDelete() {
|
|
1407
|
-
this.stateService.disableInput();
|
|
1408
|
-
this.instance$.pipe(take(1)).subscribe(instance => {
|
|
1409
|
-
this.connectorManagementService.deleteConnectorInstance(instance.id).subscribe(() => {
|
|
1410
|
-
this.alertService.success(this.translateService.instant('connectorManagement.messages.deleteSuccess'));
|
|
1411
|
-
this.stateService.hideModal();
|
|
1412
|
-
this.stateService.enableInput();
|
|
1413
|
-
this.stateService.refresh();
|
|
1414
|
-
}, () => {
|
|
1415
|
-
this.stateService.enableInput();
|
|
1416
|
-
});
|
|
1417
|
-
});
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
ModifyConnectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ModifyConnectorComponent, deps: [{ token: ConnectorManagementService }, { token: ConnectorManagementStateService }, { token: i6$1.AlertService }, { token: i2$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1421
|
-
ModifyConnectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ModifyConnectorComponent, selector: "valtimo-modify-connector", inputs: { showSaveButton: "showSaveButton", showDeleteButton: "showDeleteButton" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-edit-connector-form\n *ngIf=\"instance$ | async as instance\"\n [properties]=\"instance.properties\"\n [withDefaults]=\"true\"\n [defaultName]=\"instance.name\"\n [showDeleteButton]=\"showDeleteButton\"\n [connectorName]=\"instance.type.name\"\n [showSaveButton]=\"showSaveButton\"\n (propertiesSave)=\"onSave($event)\"\n (connectorDelete)=\"onDelete()\"\n>\n</valtimo-edit-connector-form>\n", styles: ["/*!\n * Copyright 2015-2023 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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EditConnectorFormComponent, selector: "valtimo-edit-connector-form", inputs: ["properties", "withDefaults", "showDeleteButton", "showSaveButton", "defaultName", "connectorName"], outputs: ["propertiesSave", "connectorDelete"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }] });
|
|
1422
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ModifyConnectorComponent, decorators: [{
|
|
1423
|
-
type: Component,
|
|
1424
|
-
args: [{ selector: 'valtimo-modify-connector', template: "<!--\n ~ Copyright 2015-2023 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-edit-connector-form\n *ngIf=\"instance$ | async as instance\"\n [properties]=\"instance.properties\"\n [withDefaults]=\"true\"\n [defaultName]=\"instance.name\"\n [showDeleteButton]=\"showDeleteButton\"\n [connectorName]=\"instance.type.name\"\n [showSaveButton]=\"showSaveButton\"\n (propertiesSave)=\"onSave($event)\"\n (connectorDelete)=\"onDelete()\"\n>\n</valtimo-edit-connector-form>\n", styles: ["/*!\n * Copyright 2015-2023 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"] }]
|
|
1425
|
-
}], ctorParameters: function () { return [{ type: ConnectorManagementService }, { type: ConnectorManagementStateService }, { type: i6$1.AlertService }, { type: i2$1.TranslateService }]; }, propDecorators: { showSaveButton: [{
|
|
1426
|
-
type: Input
|
|
1427
|
-
}], showDeleteButton: [{
|
|
1428
|
-
type: Input
|
|
1429
|
-
}] } });
|
|
1430
|
-
|
|
1431
|
-
/*
|
|
1432
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1433
|
-
*
|
|
1434
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1435
|
-
* you may not use this file except in compliance with the License.
|
|
1436
|
-
* You may obtain a copy of the License at
|
|
1437
|
-
*
|
|
1438
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1439
|
-
*
|
|
1440
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1441
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1442
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1443
|
-
* See the License for the specific language governing permissions and
|
|
1444
|
-
* limitations under the License.
|
|
1445
|
-
*/
|
|
1446
|
-
class ConnectorModalComponent {
|
|
1447
|
-
constructor(stateService, modalService) {
|
|
1448
|
-
this.stateService = stateService;
|
|
1449
|
-
this.modalService = modalService;
|
|
1450
|
-
this.connectorTypeSelected$ = this.stateService.selectedConnector$;
|
|
1451
|
-
this.saveButtonDisabled$ = this.stateService.saveButtonDisabled$;
|
|
1452
|
-
this.inputDisabled$ = this.stateService.inputDisabled$;
|
|
1453
|
-
this.hideModalSaveButton$ = this.stateService.hideModalSaveButton$;
|
|
1454
|
-
this.returnToFirstStepSubject$ = new Subject();
|
|
1455
|
-
}
|
|
1456
|
-
ngAfterViewInit() {
|
|
1457
|
-
this.openShowSubscription();
|
|
1458
|
-
this.openHideSubscription();
|
|
1459
|
-
}
|
|
1460
|
-
ngOnDestroy() {
|
|
1461
|
-
var _a, _b;
|
|
1462
|
-
(_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
1463
|
-
(_b = this.hideSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
1464
|
-
}
|
|
1465
|
-
hide() {
|
|
1466
|
-
this.stateService.disableInput();
|
|
1467
|
-
this.modalService.closeModal(() => {
|
|
1468
|
-
this.returnToFirstStep();
|
|
1469
|
-
this.stateService.enableInput();
|
|
1470
|
-
this.stateService.clearSelectedConnector();
|
|
1471
|
-
});
|
|
1472
|
-
}
|
|
1473
|
-
complete() {
|
|
1474
|
-
this.stateService.save();
|
|
1475
|
-
}
|
|
1476
|
-
delete() {
|
|
1477
|
-
this.stateService.delete();
|
|
1478
|
-
}
|
|
1479
|
-
openShowSubscription() {
|
|
1480
|
-
this.showSubscription = this.stateService.showModal$.subscribe(() => {
|
|
1481
|
-
this.show();
|
|
1482
|
-
});
|
|
1483
|
-
}
|
|
1484
|
-
openHideSubscription() {
|
|
1485
|
-
this.hideSubscription = this.stateService.hideModal$.subscribe(() => {
|
|
1486
|
-
this.hide();
|
|
1487
|
-
});
|
|
1488
|
-
}
|
|
1489
|
-
returnToFirstStep() {
|
|
1490
|
-
this.returnToFirstStepSubject$.next(true);
|
|
1491
|
-
}
|
|
1492
|
-
show() {
|
|
1493
|
-
this.stateService.modalType$.pipe(take(1)).subscribe(modalType => {
|
|
1494
|
-
if (modalType === 'add') {
|
|
1495
|
-
this.modalService.openModal(this.connectorCreateModal);
|
|
1496
|
-
}
|
|
1497
|
-
else if (modalType === 'modify') {
|
|
1498
|
-
this.modalService.openModal(this.connectorEditModal);
|
|
1499
|
-
}
|
|
1500
|
-
});
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
ConnectorModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorModalComponent, deps: [{ token: ConnectorManagementStateService }, { token: i2$2.ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1504
|
-
ConnectorModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConnectorModalComponent, selector: "valtimo-connector-modal", viewQueries: [{ propertyName: "connectorCreateModal", first: true, predicate: ["connectorCreateModal"], descendants: true }, { propertyName: "connectorEditModal", first: true, predicate: ["connectorEditModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 #connectorEditModal>\n <div role=\"header\">\n <div class=\"edit-connector-title\">\n <v-title [margin]=\"false\">{{ 'connectorManagement.modify' | translate }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <valtimo-modify-connector\n [showSaveButton]=\"false\"\n [showDeleteButton]=\"false\"\n ></valtimo-modify-connector>\n </div>\n <div role=\"footer\">\n <div class=\"edit-connector-buttons\">\n <v-button\n [disabled]=\"inputDisabled$ | async\"\n (clickEvent)=\"delete()\"\n [mdiIcon]=\"'delete'\"\n type=\"danger\"\n >{{ 'connectorManagement.remove' | translate }}</v-button\n >\n <v-button\n *ngIf=\"(hideModalSaveButton$ | async) === false\"\n [disabled]=\"(saveButtonDisabled$ | async) || (inputDisabled$ | async)\"\n (clickEvent)=\"complete()\"\n [mdiIcon]=\"'check'\"\n type=\"success\"\n >{{ 'connectorManagement.save' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<v-stepper-container\n (completeEvent)=\"complete()\"\n (cancelClickEvent)=\"hide()\"\n [disabled]=\"inputDisabled$ | async\"\n [returnToFirstStepSubject$]=\"returnToFirstStepSubject$\"\n>\n <v-modal #connectorCreateModal (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=\"addConnectorSteps.step0\">\n <valtimo-add-connector-select></valtimo-add-connector-select>\n </v-stepper-step>\n <v-stepper-step titleTranslationKey=\"addConnectorSteps.step1\">\n <valtimo-add-connector-configure\n [showSaveButton]=\"false\"\n ></valtimo-add-connector-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=\"addConnectorSteps.step1\"\n [nextButtonEnabled]=\"connectorTypeSelected$ | async\"\n ></v-stepper-footer-step>\n <v-stepper-footer-step\n completeButtonTranslationKey=\"addConnectorSteps.complete\"\n [completeButtonEnabled]=\"(saveButtonDisabled$ | async) === false\"\n [showCompleteButton]=\"(hideModalSaveButton$ | async) === false\"\n ></v-stepper-footer-step>\n </v-stepper-footer>\n </div>\n </v-modal>\n</v-stepper-container>\n", styles: ["/*!\n * Copyright 2015-2023 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-connector-buttons,.edit-connector-title{width:100%;display:flex;flex-direction:row;justify-content:space-between}.edit-connector-title{justify-content:center}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { kind: "component", type: i2$2.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "component", type: i2$2.StepperContainerComponent, selector: "v-stepper-container", inputs: ["returnToFirstStepSubject$", "disabled"], outputs: ["cancelClickEvent", "completeEvent", "nextStepEvent"] }, { kind: "component", type: i2$2.StepperContentComponent, selector: "v-stepper-content" }, { kind: "component", type: i2$2.StepperFooterComponent, selector: "v-stepper-footer" }, { kind: "component", type: i2$2.StepperHeaderComponent, selector: "v-stepper-header" }, { kind: "component", type: i2$2.StepperStepComponent, selector: "v-stepper-step", inputs: ["titleTranslationKey"] }, { kind: "component", type: i2$2.StepperFooterStepComponent, selector: "v-stepper-footer-step", inputs: ["nextButtonEnabled", "completeButtonEnabled", "nextButtonTranslationKey", "cancelButtonTranslationKey", "completeButtonTranslationKey", "completeButtonMdiIcon", "showCompleteButton"] }, { kind: "component", type: i2$2.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "component", type: AddConnectorSelectComponent, selector: "valtimo-add-connector-select" }, { kind: "component", type: AddConnectorConfigureComponent, selector: "valtimo-add-connector-configure", inputs: ["showSaveButton"] }, { kind: "component", type: ModifyConnectorComponent, selector: "valtimo-modify-connector", inputs: ["showSaveButton", "showDeleteButton"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
1505
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorModalComponent, decorators: [{
|
|
1506
|
-
type: Component,
|
|
1507
|
-
args: [{ selector: 'valtimo-connector-modal', template: "<!--\n ~ Copyright 2015-2023 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 #connectorEditModal>\n <div role=\"header\">\n <div class=\"edit-connector-title\">\n <v-title [margin]=\"false\">{{ 'connectorManagement.modify' | translate }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <valtimo-modify-connector\n [showSaveButton]=\"false\"\n [showDeleteButton]=\"false\"\n ></valtimo-modify-connector>\n </div>\n <div role=\"footer\">\n <div class=\"edit-connector-buttons\">\n <v-button\n [disabled]=\"inputDisabled$ | async\"\n (clickEvent)=\"delete()\"\n [mdiIcon]=\"'delete'\"\n type=\"danger\"\n >{{ 'connectorManagement.remove' | translate }}</v-button\n >\n <v-button\n *ngIf=\"(hideModalSaveButton$ | async) === false\"\n [disabled]=\"(saveButtonDisabled$ | async) || (inputDisabled$ | async)\"\n (clickEvent)=\"complete()\"\n [mdiIcon]=\"'check'\"\n type=\"success\"\n >{{ 'connectorManagement.save' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<v-stepper-container\n (completeEvent)=\"complete()\"\n (cancelClickEvent)=\"hide()\"\n [disabled]=\"inputDisabled$ | async\"\n [returnToFirstStepSubject$]=\"returnToFirstStepSubject$\"\n>\n <v-modal #connectorCreateModal (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=\"addConnectorSteps.step0\">\n <valtimo-add-connector-select></valtimo-add-connector-select>\n </v-stepper-step>\n <v-stepper-step titleTranslationKey=\"addConnectorSteps.step1\">\n <valtimo-add-connector-configure\n [showSaveButton]=\"false\"\n ></valtimo-add-connector-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=\"addConnectorSteps.step1\"\n [nextButtonEnabled]=\"connectorTypeSelected$ | async\"\n ></v-stepper-footer-step>\n <v-stepper-footer-step\n completeButtonTranslationKey=\"addConnectorSteps.complete\"\n [completeButtonEnabled]=\"(saveButtonDisabled$ | async) === false\"\n [showCompleteButton]=\"(hideModalSaveButton$ | async) === false\"\n ></v-stepper-footer-step>\n </v-stepper-footer>\n </div>\n </v-modal>\n</v-stepper-container>\n", styles: ["/*!\n * Copyright 2015-2023 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-connector-buttons,.edit-connector-title{width:100%;display:flex;flex-direction:row;justify-content:space-between}.edit-connector-title{justify-content:center}\n"] }]
|
|
1508
|
-
}], ctorParameters: function () { return [{ type: ConnectorManagementStateService }, { type: i2$2.ModalService }]; }, propDecorators: { connectorCreateModal: [{
|
|
1509
|
-
type: ViewChild,
|
|
1510
|
-
args: ['connectorCreateModal']
|
|
1511
|
-
}], connectorEditModal: [{
|
|
1512
|
-
type: ViewChild,
|
|
1513
|
-
args: ['connectorEditModal']
|
|
1514
|
-
}] } });
|
|
1515
|
-
|
|
1516
|
-
/*
|
|
1517
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1518
|
-
*
|
|
1519
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1520
|
-
* you may not use this file except in compliance with the License.
|
|
1521
|
-
* You may obtain a copy of the License at
|
|
1522
|
-
*
|
|
1523
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1524
|
-
*
|
|
1525
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1526
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1527
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1528
|
-
* See the License for the specific language governing permissions and
|
|
1529
|
-
* limitations under the License.
|
|
1530
|
-
*/
|
|
1531
|
-
class ConnectorManagementComponent {
|
|
1532
|
-
constructor(connectorManagementService, translateService, stateService) {
|
|
1533
|
-
this.connectorManagementService = connectorManagementService;
|
|
1534
|
-
this.translateService = translateService;
|
|
1535
|
-
this.stateService = stateService;
|
|
1536
|
-
this.loading$ = new BehaviorSubject(true);
|
|
1537
|
-
this.fields$ = new BehaviorSubject([]);
|
|
1538
|
-
this.columns$ = this.fields$.pipe(map(fields => fields.map(field => ({
|
|
1539
|
-
dataKey: field.key,
|
|
1540
|
-
labelTranslationKey: field.label,
|
|
1541
|
-
}))));
|
|
1542
|
-
this.currentPageAndSize$ = new BehaviorSubject({
|
|
1543
|
-
page: 0,
|
|
1544
|
-
size: 10,
|
|
1545
|
-
});
|
|
1546
|
-
this.pageSizes$ = new BehaviorSubject({
|
|
1547
|
-
collectionSize: 0,
|
|
1548
|
-
maxPaginationItemSize: 5,
|
|
1549
|
-
});
|
|
1550
|
-
this.pagination$ = combineLatest([
|
|
1551
|
-
this.currentPageAndSize$,
|
|
1552
|
-
this.pageSizes$,
|
|
1553
|
-
]).pipe(map(([currentPage, sizes]) => (Object.assign(Object.assign(Object.assign({}, currentPage), sizes), { page: currentPage.page + 1 }))));
|
|
1554
|
-
this.connectorInstances$ = combineLatest([
|
|
1555
|
-
this.currentPageAndSize$,
|
|
1556
|
-
this.translateService.stream('key'),
|
|
1557
|
-
this.stateService.refresh$,
|
|
1558
|
-
]).pipe(tap(() => this.setFields()), switchMap(([currentPage]) => combineLatest([
|
|
1559
|
-
this.connectorManagementService.getConnectorInstances({
|
|
1560
|
-
page: currentPage.page,
|
|
1561
|
-
size: currentPage.size,
|
|
1562
|
-
}),
|
|
1563
|
-
this.connectorManagementService.getConnectorTypes(),
|
|
1564
|
-
])), tap(([instanceRes]) => {
|
|
1565
|
-
this.pageSizes$.pipe(take(1)).subscribe(sizes => {
|
|
1566
|
-
this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
|
|
1567
|
-
});
|
|
1568
|
-
}), map(([instanceRes, typesRes]) => instanceRes.content.map(instance => {
|
|
1569
|
-
var _a;
|
|
1570
|
-
return (Object.assign(Object.assign({}, instance), { typeName: (_a = typesRes.find(type => type.id === instance.type.id)) === null || _a === void 0 ? void 0 : _a.name }));
|
|
1571
|
-
})), tap(() => this.loading$.next(false)));
|
|
1572
|
-
}
|
|
1573
|
-
ngOnDestroy() {
|
|
1574
|
-
this.stateService.hideModal();
|
|
1575
|
-
}
|
|
1576
|
-
paginationClicked(newPageNumber) {
|
|
1577
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
1578
|
-
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { page: newPageNumber - 1 }));
|
|
1579
|
-
});
|
|
1580
|
-
}
|
|
1581
|
-
paginationSet(newPageSize) {
|
|
1582
|
-
if (newPageSize) {
|
|
1583
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
1584
|
-
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { size: newPageSize }));
|
|
1585
|
-
});
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
rowClicked(instance) {
|
|
1589
|
-
this.stateService.setModalType('modify');
|
|
1590
|
-
this.stateService.setConnectorInstance(instance);
|
|
1591
|
-
this.stateService.showModal();
|
|
1592
|
-
}
|
|
1593
|
-
showAddModal() {
|
|
1594
|
-
this.stateService.setModalType('add');
|
|
1595
|
-
this.stateService.showModal();
|
|
1596
|
-
}
|
|
1597
|
-
setFields() {
|
|
1598
|
-
const keys = ['name', 'typeName'];
|
|
1599
|
-
this.fields$.next(keys.map(key => ({ label: `connectorManagement.labels.${key}`, key })));
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
ConnectorManagementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementComponent, deps: [{ token: ConnectorManagementService }, { token: i2$1.TranslateService }, { token: ConnectorManagementStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1603
|
-
ConnectorManagementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConnectorManagementComponent, selector: "valtimo-connector-management", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 connectorInstances: connectorInstances$ | async,\n fields: fields$ | async,\n columns: columns$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <v-page-header>\n <v-page-header-introduction>\n <v-paragraph>{{ 'pages.connectors.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 {{ 'connectorManagement.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.connectorInstances\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"true\"\n [amountOfLoadingRows]=\"2\"\n [collectionSize]=\"obs.pagination.collectionSize\"\n [maxPaginationItemSize]=\"obs.pagination.maxPaginationItemSize\"\n [page]=\"obs.pagination.page\"\n [size]=\"obs.pagination.size\"\n [itemsTranslationKey]=\"'connectorManagement.tableItemsText'\"\n (editButtonClicked)=\"rowClicked($event)\"\n (paginationSizeSet)=\"paginationSet($event)\"\n (paginationPageSet)=\"paginationClicked($event)\"\n ></v-table>\n </v-page-content>\n</v-page-container>\n\n<valtimo-connector-modal></valtimo-connector-modal>\n", styles: ["/*!\n * Copyright 2015-2023 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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { kind: "component", type: i2$2.TableComponent, selector: "v-table", inputs: ["items", "columns", "loading", "showEditButtons", "showPagination", "editButtonTranslationKey", "itemsTranslationKey", "noResultsTranslationKey", "mobileBreakpointPx", "amountOfLoadingRows", "collectionSize", "maxPaginationItemSize", "page", "size"], outputs: ["editButtonClicked", "paginationSizeSet", "paginationPageSet"] }, { kind: "component", type: i2$2.PageContainerComponent, selector: "v-page-container" }, { kind: "component", type: i2$2.PageContentComponent, selector: "v-page-content" }, { kind: "component", type: i2$2.PageHeaderComponent, selector: "v-page-header" }, { kind: "component", type: i2$2.PageHeaderActionsComponent, selector: "v-page-header-actions" }, { kind: "component", type: i2$2.PageHeaderIntroductionComponent, selector: "v-page-header-introduction" }, { kind: "component", type: i2$2.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { kind: "component", type: ConnectorModalComponent, selector: "valtimo-connector-modal" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
1604
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementComponent, decorators: [{
|
|
1605
|
-
type: Component,
|
|
1606
|
-
args: [{ selector: 'valtimo-connector-management', template: "<!--\n ~ Copyright 2015-2023 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 connectorInstances: connectorInstances$ | async,\n fields: fields$ | async,\n columns: columns$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <v-page-header>\n <v-page-header-introduction>\n <v-paragraph>{{ 'pages.connectors.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 {{ 'connectorManagement.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.connectorInstances\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"true\"\n [amountOfLoadingRows]=\"2\"\n [collectionSize]=\"obs.pagination.collectionSize\"\n [maxPaginationItemSize]=\"obs.pagination.maxPaginationItemSize\"\n [page]=\"obs.pagination.page\"\n [size]=\"obs.pagination.size\"\n [itemsTranslationKey]=\"'connectorManagement.tableItemsText'\"\n (editButtonClicked)=\"rowClicked($event)\"\n (paginationSizeSet)=\"paginationSet($event)\"\n (paginationPageSet)=\"paginationClicked($event)\"\n ></v-table>\n </v-page-content>\n</v-page-container>\n\n<valtimo-connector-modal></valtimo-connector-modal>\n", styles: ["/*!\n * Copyright 2015-2023 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"] }]
|
|
1607
|
-
}], ctorParameters: function () { return [{ type: ConnectorManagementService }, { type: i2$1.TranslateService }, { type: ConnectorManagementStateService }]; } });
|
|
1608
|
-
|
|
1609
|
-
/*
|
|
1610
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1611
|
-
*
|
|
1612
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1613
|
-
* you may not use this file except in compliance with the License.
|
|
1614
|
-
* You may obtain a copy of the License at
|
|
1615
|
-
*
|
|
1616
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1617
|
-
*
|
|
1618
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1619
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1620
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1621
|
-
* See the License for the specific language governing permissions and
|
|
1622
|
-
* limitations under the License.
|
|
1623
|
-
*/
|
|
1624
|
-
const routes = [
|
|
1625
|
-
{
|
|
1626
|
-
path: 'connectors',
|
|
1627
|
-
component: ConnectorManagementComponent,
|
|
1628
|
-
canActivate: [AuthGuardService],
|
|
1629
|
-
data: { title: 'Connectors', roles: [ROLE_ADMIN] },
|
|
1630
|
-
},
|
|
1631
|
-
];
|
|
1632
|
-
class ConnectorManagementRoutingModule {
|
|
1633
|
-
}
|
|
1634
|
-
ConnectorManagementRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1635
|
-
ConnectorManagementRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementRoutingModule, imports: [CommonModule, i5$1.RouterModule], exports: [RouterModule] });
|
|
1636
|
-
ConnectorManagementRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] });
|
|
1637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementRoutingModule, decorators: [{
|
|
1638
|
-
type: NgModule,
|
|
1639
|
-
args: [{
|
|
1640
|
-
declarations: [],
|
|
1641
|
-
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
1642
|
-
exports: [RouterModule],
|
|
1643
|
-
}]
|
|
1644
|
-
}] });
|
|
1645
|
-
|
|
1646
|
-
/*
|
|
1647
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1648
|
-
*
|
|
1649
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1650
|
-
* you may not use this file except in compliance with the License.
|
|
1651
|
-
* You may obtain a copy of the License at
|
|
1652
|
-
*
|
|
1653
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1654
|
-
*
|
|
1655
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1656
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1657
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1658
|
-
* See the License for the specific language governing permissions and
|
|
1659
|
-
* limitations under the License.
|
|
1660
|
-
*/
|
|
1661
|
-
class ObjectApiSyncService {
|
|
1662
|
-
constructor(http, configService) {
|
|
1663
|
-
this.http = http;
|
|
1664
|
-
this.configService = configService;
|
|
1665
|
-
this.valtimoApiConfig = configService.config.valtimoApi;
|
|
1666
|
-
}
|
|
1667
|
-
getObjectSyncConfigs(documentDefinitionName) {
|
|
1668
|
-
return this.http.get(`${this.valtimoApiConfig.endpointUri}v1/object/sync/config`, { params: { documentDefinitionName } });
|
|
1669
|
-
}
|
|
1670
|
-
createObjectSyncConfig(request) {
|
|
1671
|
-
return this.http.post(`${this.valtimoApiConfig.endpointUri}v1/object/sync/config`, request);
|
|
1672
|
-
}
|
|
1673
|
-
modifyObjectSyncConfig(request) {
|
|
1674
|
-
return this.http.put(`${this.valtimoApiConfig.endpointUri}v1/object/sync/config`, request);
|
|
1675
|
-
}
|
|
1676
|
-
deleteObjectSyncConfig(configId) {
|
|
1677
|
-
return this.http.delete(`${this.valtimoApiConfig.endpointUri}v1/object/sync/config/${configId}`);
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
ObjectApiSyncService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectApiSyncService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1681
|
-
ObjectApiSyncService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectApiSyncService, providedIn: 'root' });
|
|
1682
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectApiSyncService, decorators: [{
|
|
1683
|
-
type: Injectable,
|
|
1684
|
-
args: [{
|
|
1685
|
-
providedIn: 'root',
|
|
1686
|
-
}]
|
|
1687
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.ConfigService }]; } });
|
|
1688
|
-
|
|
1689
|
-
/*
|
|
1690
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1691
|
-
*
|
|
1692
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1693
|
-
* you may not use this file except in compliance with the License.
|
|
1694
|
-
* You may obtain a copy of the License at
|
|
1695
|
-
*
|
|
1696
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1697
|
-
*
|
|
1698
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1699
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1700
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1701
|
-
* See the License for the specific language governing permissions and
|
|
1702
|
-
* limitations under the License.
|
|
1703
|
-
*/
|
|
1704
|
-
class ConnectorLinkExtensionModalComponent {
|
|
1705
|
-
constructor(connectorManagementService, translateService, stateService, objectApiSyncService, route, alertService) {
|
|
1706
|
-
this.connectorManagementService = connectorManagementService;
|
|
1707
|
-
this.translateService = translateService;
|
|
1708
|
-
this.stateService = stateService;
|
|
1709
|
-
this.objectApiSyncService = objectApiSyncService;
|
|
1710
|
-
this.route = route;
|
|
1711
|
-
this.alertService = alertService;
|
|
1712
|
-
this.loading$ = new BehaviorSubject(true);
|
|
1713
|
-
this.fields$ = new BehaviorSubject([]);
|
|
1714
|
-
this.currentPageAndSize$ = new BehaviorSubject({
|
|
1715
|
-
page: 0,
|
|
1716
|
-
size: 10,
|
|
1717
|
-
});
|
|
1718
|
-
this.pageSizes$ = new BehaviorSubject({
|
|
1719
|
-
collectionSize: 0,
|
|
1720
|
-
maxPaginationItemSize: 5,
|
|
1721
|
-
});
|
|
1722
|
-
this.pagination$ = combineLatest([
|
|
1723
|
-
this.currentPageAndSize$,
|
|
1724
|
-
this.pageSizes$,
|
|
1725
|
-
]).pipe(map(([currentPage, sizes]) => (Object.assign(Object.assign(Object.assign({}, currentPage), sizes), { page: currentPage.page + 1 }))));
|
|
1726
|
-
this.connectorInstances$ = combineLatest([
|
|
1727
|
-
this.currentPageAndSize$,
|
|
1728
|
-
this.connectorManagementService.getConnectorTypes(),
|
|
1729
|
-
this.translateService.stream('key'),
|
|
1730
|
-
this.stateService.refresh$,
|
|
1731
|
-
]).pipe(tap(() => this.setFields()), switchMap(([currentPage, types]) => { var _a; return this.connectorManagementService.getConnectorInstancesByType((_a = types.find(type => type.name.toLowerCase().includes('objectsapi'))) === null || _a === void 0 ? void 0 : _a.id, { page: currentPage.page, size: currentPage.size }); }), tap(instanceRes => {
|
|
1732
|
-
this.pageSizes$.pipe(take(1)).subscribe(sizes => {
|
|
1733
|
-
this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
|
|
1734
|
-
});
|
|
1735
|
-
}), map(res => res.content), tap(() => this.loading$.next(false)));
|
|
1736
|
-
this.noObjectsApiConnectors$ = this.connectorInstances$.pipe(map(instances => !instances || instances.length === 0));
|
|
1737
|
-
this.disabled$ = this.stateService.inputDisabled$;
|
|
1738
|
-
}
|
|
1739
|
-
ngAfterViewInit() {
|
|
1740
|
-
this.showSubscription = this.stateService.showExtensionModal$.subscribe(show => {
|
|
1741
|
-
if (show) {
|
|
1742
|
-
this.show();
|
|
1743
|
-
}
|
|
1744
|
-
else {
|
|
1745
|
-
this.hide();
|
|
1746
|
-
}
|
|
1747
|
-
});
|
|
1748
|
-
}
|
|
1749
|
-
ngOnDestroy() {
|
|
1750
|
-
var _a;
|
|
1751
|
-
(_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
1752
|
-
}
|
|
1753
|
-
paginationClicked(newPageNumber) {
|
|
1754
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
1755
|
-
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { page: newPageNumber - 1 }));
|
|
1756
|
-
});
|
|
1757
|
-
}
|
|
1758
|
-
paginationSet(newPageSize) {
|
|
1759
|
-
if (newPageSize) {
|
|
1760
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
1761
|
-
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { size: newPageSize }));
|
|
1762
|
-
});
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1765
|
-
rowClicked(instance) {
|
|
1766
|
-
var _a, _b;
|
|
1767
|
-
const connectorInstanceId = instance.id;
|
|
1768
|
-
const enabled = true;
|
|
1769
|
-
const documentDefinitionName = this.route.snapshot.paramMap.get('name');
|
|
1770
|
-
const objectTypeUrl = (_b = (_a = instance.properties) === null || _a === void 0 ? void 0 : _a.objectType) === null || _b === void 0 ? void 0 : _b.url;
|
|
1771
|
-
const splitObjectTypeUrl = objectTypeUrl === null || objectTypeUrl === void 0 ? void 0 : objectTypeUrl.split('/');
|
|
1772
|
-
const objectTypeId = splitObjectTypeUrl[splitObjectTypeUrl.length - 1];
|
|
1773
|
-
this.stateService.disableInput();
|
|
1774
|
-
this.objectApiSyncService
|
|
1775
|
-
.createObjectSyncConfig({ connectorInstanceId, enabled, documentDefinitionName, objectTypeId })
|
|
1776
|
-
.subscribe(res => {
|
|
1777
|
-
this.alertService.success(this.translateService.instant('connectorManagement.extension.addSyncSuccess'));
|
|
1778
|
-
this.stateService.hideExtensionModal();
|
|
1779
|
-
this.stateService.enableInput();
|
|
1780
|
-
this.stateService.refresh();
|
|
1781
|
-
this.stateService.setLastConfigIdAdded(res.objectSyncConfig.id);
|
|
1782
|
-
}, () => {
|
|
1783
|
-
this.stateService.enableInput();
|
|
1784
|
-
});
|
|
1785
|
-
}
|
|
1786
|
-
setFields() {
|
|
1787
|
-
const getTranslatedLabel = (key) => this.translateService.instant(`connectorManagement.labels.${key}`);
|
|
1788
|
-
const keys = ['name'];
|
|
1789
|
-
this.fields$.next(keys.map(key => ({ label: getTranslatedLabel(key), key })));
|
|
1790
|
-
}
|
|
1791
|
-
show() {
|
|
1792
|
-
this.modal.show();
|
|
1793
|
-
}
|
|
1794
|
-
hide() {
|
|
1795
|
-
this.modal.hide();
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
ConnectorLinkExtensionModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorLinkExtensionModalComponent, deps: [{ token: ConnectorManagementService }, { token: i2$1.TranslateService }, { token: ConnectorManagementStateService }, { token: ObjectApiSyncService }, { token: i5$1.ActivatedRoute }, { token: i6$1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1799
|
-
ConnectorLinkExtensionModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConnectorLinkExtensionModalComponent, selector: "valtimo-connector-link-extension-modal", viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-modal #modal [title]=\"'connectorManagement.extension.buttonText' | translate\">\n <div\n class=\"mt-2\"\n body\n *ngIf=\"{\n connectorInstances: connectorInstances$ | async,\n fields: fields$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async,\n noConnectors: noObjectsApiConnectors$ | async\n } as obs\"\n >\n <div *ngIf=\"obs.loading === false; else loading\" [ngClass]=\"{disabled: obs.disabled}\">\n <ng-container *ngIf=\"!obs.noConnectors; else noConnectors\">\n <p class=\"lead\">{{ 'connectorManagement.extension.clickToSync' | translate }}</p>\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.connectorInstances\"\n [fields]=\"obs.fields\"\n [header]=\"false\"\n [viewMode]=\"false\"\n [isSearchable]=\"false\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"connectorManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowClicked($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'connectorManagement.title' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'connectorManagement.subtitle' | translate }}\n </h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </ng-container>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #noConnectors>\n <p class=\"lead\">{{ 'connectorManagement.extension.noConnectors' | translate }}</p>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.disabled{opacity:.8;pointer-events:none;filter:grayscale(1)}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i6$1.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: i6$1.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "component", type: i6$1.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "directive", type: i8.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
1800
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorLinkExtensionModalComponent, decorators: [{
|
|
1801
|
-
type: Component,
|
|
1802
|
-
args: [{ selector: 'valtimo-connector-link-extension-modal', template: "<!--\n ~ Copyright 2015-2023 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-modal #modal [title]=\"'connectorManagement.extension.buttonText' | translate\">\n <div\n class=\"mt-2\"\n body\n *ngIf=\"{\n connectorInstances: connectorInstances$ | async,\n fields: fields$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async,\n noConnectors: noObjectsApiConnectors$ | async\n } as obs\"\n >\n <div *ngIf=\"obs.loading === false; else loading\" [ngClass]=\"{disabled: obs.disabled}\">\n <ng-container *ngIf=\"!obs.noConnectors; else noConnectors\">\n <p class=\"lead\">{{ 'connectorManagement.extension.clickToSync' | translate }}</p>\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.connectorInstances\"\n [fields]=\"obs.fields\"\n [header]=\"false\"\n [viewMode]=\"false\"\n [isSearchable]=\"false\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"connectorManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowClicked($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'connectorManagement.title' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'connectorManagement.subtitle' | translate }}\n </h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </ng-container>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #noConnectors>\n <p class=\"lead\">{{ 'connectorManagement.extension.noConnectors' | translate }}</p>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.disabled{opacity:.8;pointer-events:none;filter:grayscale(1)}\n"] }]
|
|
1803
|
-
}], ctorParameters: function () { return [{ type: ConnectorManagementService }, { type: i2$1.TranslateService }, { type: ConnectorManagementStateService }, { type: ObjectApiSyncService }, { type: i5$1.ActivatedRoute }, { type: i6$1.AlertService }]; }, propDecorators: { modal: [{
|
|
1804
|
-
type: ViewChild,
|
|
1805
|
-
args: ['modal']
|
|
1806
|
-
}] } });
|
|
1807
|
-
|
|
1808
|
-
/*
|
|
1809
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1810
|
-
*
|
|
1811
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1812
|
-
* you may not use this file except in compliance with the License.
|
|
1813
|
-
* You may obtain a copy of the License at
|
|
1814
|
-
*
|
|
1815
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1816
|
-
*
|
|
1817
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1818
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1819
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1820
|
-
* See the License for the specific language governing permissions and
|
|
1821
|
-
* limitations under the License.
|
|
1822
|
-
*/
|
|
1823
|
-
class ConnectorLinkExtensionComponent {
|
|
1824
|
-
constructor(stateService, objectApiSyncService, translateService, route, alertService, connectorManagementService) {
|
|
1825
|
-
this.stateService = stateService;
|
|
1826
|
-
this.objectApiSyncService = objectApiSyncService;
|
|
1827
|
-
this.translateService = translateService;
|
|
1828
|
-
this.route = route;
|
|
1829
|
-
this.alertService = alertService;
|
|
1830
|
-
this.connectorManagementService = connectorManagementService;
|
|
1831
|
-
this.loading$ = new BehaviorSubject(true);
|
|
1832
|
-
this.objectApiSyncConfig$ = combineLatest([
|
|
1833
|
-
this.route.params,
|
|
1834
|
-
this.translateService.stream('key'),
|
|
1835
|
-
this.stateService.refresh$,
|
|
1836
|
-
]).pipe(switchMap(([params]) => this.objectApiSyncService.getObjectSyncConfigs(params.name)), switchMap(configs => combineLatest([
|
|
1837
|
-
of(configs),
|
|
1838
|
-
...configs.map(config => this.connectorManagementService
|
|
1839
|
-
.getConnectorInstanceById(config.connectorInstanceId)
|
|
1840
|
-
.pipe(catchError(() => of('')))),
|
|
1841
|
-
])), map(results => {
|
|
1842
|
-
const [, ...instances] = results.filter(result => result);
|
|
1843
|
-
return results[0].map(syncConfig => {
|
|
1844
|
-
var _a;
|
|
1845
|
-
return (Object.assign(Object.assign({}, syncConfig), { title: ((_a = instances.find(instance => instance.id === syncConfig.connectorInstanceId)) === null || _a === void 0 ? void 0 : _a.name) ||
|
|
1846
|
-
'Objects API' }));
|
|
1847
|
-
});
|
|
1848
|
-
}), map(results => (Array.isArray(results) && results.length > 0 ? results[0] : null)), tap(() => {
|
|
1849
|
-
this.loading$.next(false);
|
|
1850
|
-
}));
|
|
1851
|
-
this.disabled$ = this.stateService.inputDisabled$;
|
|
1852
|
-
}
|
|
1853
|
-
ngOnDestroy() {
|
|
1854
|
-
this.stateService.hideExtensionModal();
|
|
1855
|
-
}
|
|
1856
|
-
openModal() {
|
|
1857
|
-
this.stateService.showExtensionModal();
|
|
1858
|
-
}
|
|
1859
|
-
toggleSync(config) {
|
|
1860
|
-
this.stateService.disableInput();
|
|
1861
|
-
this.objectApiSyncService
|
|
1862
|
-
.modifyObjectSyncConfig(Object.assign(Object.assign({}, config), { enabled: !config.enabled }))
|
|
1863
|
-
.subscribe(() => {
|
|
1864
|
-
if (!config.enabled) {
|
|
1865
|
-
this.alertService.success(this.translateService.instant('connectorManagement.extension.addSyncSuccess'));
|
|
1866
|
-
}
|
|
1867
|
-
else {
|
|
1868
|
-
this.alertService.success(this.translateService.instant('connectorManagement.extension.disableSyncSuccess'));
|
|
1869
|
-
}
|
|
1870
|
-
this.stateService.enableInput();
|
|
1871
|
-
this.stateService.refresh();
|
|
1872
|
-
}, () => {
|
|
1873
|
-
this.stateService.enableInput();
|
|
1874
|
-
});
|
|
1875
|
-
}
|
|
1876
|
-
deleteSync(configId) {
|
|
1877
|
-
this.stateService.disableInput();
|
|
1878
|
-
this.objectApiSyncService.deleteObjectSyncConfig(configId).subscribe(() => {
|
|
1879
|
-
this.alertService.success(this.translateService.instant('connectorManagement.extension.deleteSyncSuccess'));
|
|
1880
|
-
this.stateService.enableInput();
|
|
1881
|
-
this.stateService.refresh();
|
|
1882
|
-
}, () => {
|
|
1883
|
-
this.stateService.enableInput();
|
|
1884
|
-
});
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
ConnectorLinkExtensionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorLinkExtensionComponent, deps: [{ token: ConnectorManagementStateService }, { token: ObjectApiSyncService }, { token: i2$1.TranslateService }, { token: i5$1.ActivatedRoute }, { token: i6$1.AlertService }, { token: ConnectorManagementService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1888
|
-
ConnectorLinkExtensionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConnectorLinkExtensionComponent, selector: "valtimo-connector-link-extension", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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<h2 class=\"mb-4 mt-6\">{{ 'connectorManagement.extension.title' | translate }}</h2>\n\n<ng-container\n *ngIf=\"{\n syncConfig: objectApiSyncConfig$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngIf=\"obs.syncConfig; else addSync\">\n <div class=\"card card-border card-contrast\">\n <div class=\"card-header card-header-contrast card-header-featured\">\n <div>\n {{ obs.syncConfig.title }}\n </div>\n <div class=\"controls\">\n <button\n class=\"btn btn-danger ml-3\"\n [disabled]=\"obs.disabled\"\n (click)=\"deleteSync(obs.syncConfig.id)\"\n >\n <i class=\"icon mdi mdi-delete\"></i>\n </button>\n </div>\n </div>\n <div class=\"card-body\">\n <div class=\"setting-row\">\n {{ 'connectorManagement.autoSync' | translate }}\n <div class=\"controls\">\n <div class=\"switch-button switch-button-success\">\n <input\n type=\"checkbox\"\n [checked]=\"obs.syncConfig.enabled\"\n [disabled]=\"obs.disabled\"\n name=\"sync\"\n id=\"sync\"\n (click)=\"toggleSync(obs.syncConfig)\"\n />\n <span><label for=\"sync\"></label></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<valtimo-connector-link-extension-modal></valtimo-connector-link-extension-modal>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #addSync>\n <div class=\"text-right mt-5\">\n <button class=\"btn btn-primary\" (click)=\"openModal()\" [disabled]=\"disabled$ | async\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'connectorManagement.extension.buttonText' | translate }}\n </button>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.card-header,.setting-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.controls{display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "component", type: ConnectorLinkExtensionModalComponent, selector: "valtimo-connector-link-extension-modal" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
1889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorLinkExtensionComponent, decorators: [{
|
|
1890
|
-
type: Component,
|
|
1891
|
-
args: [{ selector: 'valtimo-connector-link-extension', template: "<!--\n ~ Copyright 2015-2023 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<h2 class=\"mb-4 mt-6\">{{ 'connectorManagement.extension.title' | translate }}</h2>\n\n<ng-container\n *ngIf=\"{\n syncConfig: objectApiSyncConfig$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngIf=\"obs.syncConfig; else addSync\">\n <div class=\"card card-border card-contrast\">\n <div class=\"card-header card-header-contrast card-header-featured\">\n <div>\n {{ obs.syncConfig.title }}\n </div>\n <div class=\"controls\">\n <button\n class=\"btn btn-danger ml-3\"\n [disabled]=\"obs.disabled\"\n (click)=\"deleteSync(obs.syncConfig.id)\"\n >\n <i class=\"icon mdi mdi-delete\"></i>\n </button>\n </div>\n </div>\n <div class=\"card-body\">\n <div class=\"setting-row\">\n {{ 'connectorManagement.autoSync' | translate }}\n <div class=\"controls\">\n <div class=\"switch-button switch-button-success\">\n <input\n type=\"checkbox\"\n [checked]=\"obs.syncConfig.enabled\"\n [disabled]=\"obs.disabled\"\n name=\"sync\"\n id=\"sync\"\n (click)=\"toggleSync(obs.syncConfig)\"\n />\n <span><label for=\"sync\"></label></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<valtimo-connector-link-extension-modal></valtimo-connector-link-extension-modal>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #addSync>\n <div class=\"text-right mt-5\">\n <button class=\"btn btn-primary\" (click)=\"openModal()\" [disabled]=\"disabled$ | async\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'connectorManagement.extension.buttonText' | translate }}\n </button>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.card-header,.setting-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.controls{display:flex;align-items:center}\n"] }]
|
|
1892
|
-
}], ctorParameters: function () { return [{ type: ConnectorManagementStateService }, { type: ObjectApiSyncService }, { type: i2$1.TranslateService }, { type: i5$1.ActivatedRoute }, { type: i6$1.AlertService }, { type: ConnectorManagementService }]; } });
|
|
1893
|
-
|
|
1894
|
-
/*
|
|
1895
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1896
|
-
*
|
|
1897
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1898
|
-
* you may not use this file except in compliance with the License.
|
|
1899
|
-
* You may obtain a copy of the License at
|
|
1900
|
-
*
|
|
1901
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1902
|
-
*
|
|
1903
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1904
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1905
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1906
|
-
* See the License for the specific language governing permissions and
|
|
1907
|
-
* limitations under the License.
|
|
1908
|
-
*/
|
|
1909
|
-
class ConnectorManagementModule {
|
|
1910
|
-
}
|
|
1911
|
-
ConnectorManagementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1912
|
-
ConnectorManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementModule, declarations: [ConnectorManagementComponent,
|
|
1913
|
-
AddConnectorSelectComponent,
|
|
1914
|
-
AddConnectorConfigureComponent,
|
|
1915
|
-
ConnectorModalComponent,
|
|
1916
|
-
ModifyConnectorComponent,
|
|
1917
|
-
EditConnectorPropertiesComponent,
|
|
1918
|
-
MultiValueConnectorPropertyComponent,
|
|
1919
|
-
ConnectorLinkExtensionComponent,
|
|
1920
|
-
ConnectorLinkExtensionModalComponent,
|
|
1921
|
-
EditProductAanvragenConnectorComponent,
|
|
1922
|
-
EditConnectorFormComponent,
|
|
1923
|
-
EditTaakConnectorComponent], imports: [CommonModule,
|
|
1924
|
-
ConnectorManagementRoutingModule,
|
|
1925
|
-
TranslateModule,
|
|
1926
|
-
WidgetModule,
|
|
1927
|
-
ListModule,
|
|
1928
|
-
SpinnerModule,
|
|
1929
|
-
ModalModule,
|
|
1930
|
-
FormIoModule,
|
|
1931
|
-
ButtonModule,
|
|
1932
|
-
TableModule,
|
|
1933
|
-
ModalModule$1,
|
|
1934
|
-
StepperModule,
|
|
1935
|
-
CardModule,
|
|
1936
|
-
FlexLayoutModule,
|
|
1937
|
-
TitleModule,
|
|
1938
|
-
InputModule,
|
|
1939
|
-
PageModule,
|
|
1940
|
-
ParagraphModule], exports: [ConnectorManagementComponent,
|
|
1941
|
-
AddConnectorSelectComponent,
|
|
1942
|
-
AddConnectorConfigureComponent,
|
|
1943
|
-
ConnectorModalComponent,
|
|
1944
|
-
ModifyConnectorComponent,
|
|
1945
|
-
EditConnectorPropertiesComponent,
|
|
1946
|
-
MultiValueConnectorPropertyComponent,
|
|
1947
|
-
ConnectorLinkExtensionComponent,
|
|
1948
|
-
ConnectorLinkExtensionModalComponent,
|
|
1949
|
-
EditProductAanvragenConnectorComponent,
|
|
1950
|
-
EditTaakConnectorComponent] });
|
|
1951
|
-
ConnectorManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementModule, providers: [ConnectorManagementStateService], imports: [CommonModule,
|
|
1952
|
-
ConnectorManagementRoutingModule,
|
|
1953
|
-
TranslateModule,
|
|
1954
|
-
WidgetModule,
|
|
1955
|
-
ListModule,
|
|
1956
|
-
SpinnerModule,
|
|
1957
|
-
ModalModule,
|
|
1958
|
-
FormIoModule,
|
|
1959
|
-
ButtonModule,
|
|
1960
|
-
TableModule,
|
|
1961
|
-
ModalModule$1,
|
|
1962
|
-
StepperModule,
|
|
1963
|
-
CardModule,
|
|
1964
|
-
FlexLayoutModule,
|
|
1965
|
-
TitleModule,
|
|
1966
|
-
InputModule,
|
|
1967
|
-
PageModule,
|
|
1968
|
-
ParagraphModule] });
|
|
1969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorManagementModule, decorators: [{
|
|
1970
|
-
type: NgModule,
|
|
1971
|
-
args: [{
|
|
1972
|
-
providers: [ConnectorManagementStateService],
|
|
1973
|
-
declarations: [
|
|
1974
|
-
ConnectorManagementComponent,
|
|
1975
|
-
AddConnectorSelectComponent,
|
|
1976
|
-
AddConnectorConfigureComponent,
|
|
1977
|
-
ConnectorModalComponent,
|
|
1978
|
-
ModifyConnectorComponent,
|
|
1979
|
-
EditConnectorPropertiesComponent,
|
|
1980
|
-
MultiValueConnectorPropertyComponent,
|
|
1981
|
-
ConnectorLinkExtensionComponent,
|
|
1982
|
-
ConnectorLinkExtensionModalComponent,
|
|
1983
|
-
EditProductAanvragenConnectorComponent,
|
|
1984
|
-
EditConnectorFormComponent,
|
|
1985
|
-
EditTaakConnectorComponent,
|
|
1986
|
-
],
|
|
1987
|
-
imports: [
|
|
1988
|
-
CommonModule,
|
|
1989
|
-
ConnectorManagementRoutingModule,
|
|
1990
|
-
TranslateModule,
|
|
1991
|
-
WidgetModule,
|
|
1992
|
-
ListModule,
|
|
1993
|
-
SpinnerModule,
|
|
1994
|
-
ModalModule,
|
|
1995
|
-
FormIoModule,
|
|
1996
|
-
ButtonModule,
|
|
1997
|
-
TableModule,
|
|
1998
|
-
ModalModule$1,
|
|
1999
|
-
StepperModule,
|
|
2000
|
-
CardModule,
|
|
2001
|
-
FlexLayoutModule,
|
|
2002
|
-
TitleModule,
|
|
2003
|
-
InputModule,
|
|
2004
|
-
PageModule,
|
|
2005
|
-
ParagraphModule,
|
|
2006
|
-
],
|
|
2007
|
-
exports: [
|
|
2008
|
-
ConnectorManagementComponent,
|
|
2009
|
-
AddConnectorSelectComponent,
|
|
2010
|
-
AddConnectorConfigureComponent,
|
|
2011
|
-
ConnectorModalComponent,
|
|
2012
|
-
ModifyConnectorComponent,
|
|
2013
|
-
EditConnectorPropertiesComponent,
|
|
2014
|
-
MultiValueConnectorPropertyComponent,
|
|
2015
|
-
ConnectorLinkExtensionComponent,
|
|
2016
|
-
ConnectorLinkExtensionModalComponent,
|
|
2017
|
-
EditProductAanvragenConnectorComponent,
|
|
2018
|
-
EditTaakConnectorComponent,
|
|
2019
|
-
],
|
|
2020
|
-
}]
|
|
2021
|
-
}] });
|
|
2022
|
-
|
|
2023
|
-
/*
|
|
2024
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2025
|
-
*
|
|
2026
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2027
|
-
* you may not use this file except in compliance with the License.
|
|
2028
|
-
* You may obtain a copy of the License at
|
|
2029
|
-
*
|
|
2030
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2031
|
-
*
|
|
2032
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2033
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
2034
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2035
|
-
* See the License for the specific language governing permissions and
|
|
2036
|
-
* limitations under the License.
|
|
2037
|
-
*/
|
|
2038
|
-
function connectorLinkExtensionInitializer(injector) {
|
|
2039
|
-
const configService = injector.get(ConfigService);
|
|
2040
|
-
const logger = injector.get(NGXLogger);
|
|
2041
|
-
return () => new Promise((resolve, reject) => {
|
|
2042
|
-
try {
|
|
2043
|
-
logger.debug('connector link extension initializer before init');
|
|
2044
|
-
const extension = new Extension('ConnectorLink', new BasicExtensionPoint('dossier-management', 'dossier', 'right-panel', ConnectorLinkExtensionComponent));
|
|
2045
|
-
configService.addExtension(extension);
|
|
2046
|
-
logger.debug('connector link extension initializer after init');
|
|
2047
|
-
resolve();
|
|
2048
|
-
}
|
|
2049
|
-
catch (error) {
|
|
2050
|
-
logger.debug('connector link extension initializer error', error);
|
|
2051
|
-
reject(error);
|
|
2052
|
-
}
|
|
2053
|
-
});
|
|
2054
|
-
}
|
|
2055
|
-
|
|
2056
|
-
/*
|
|
2057
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2058
|
-
*
|
|
2059
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2060
|
-
* you may not use this file except in compliance with the License.
|
|
2061
|
-
* You may obtain a copy of the License at
|
|
2062
|
-
*
|
|
2063
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2064
|
-
*
|
|
2065
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2066
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
2067
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2068
|
-
* See the License for the specific language governing permissions and
|
|
2069
|
-
* limitations under the License.
|
|
2070
|
-
*/
|
|
2071
|
-
|
|
2072
|
-
/**
|
|
2073
|
-
* Generated bundle index. Do not edit.
|
|
2074
|
-
*/
|
|
2075
|
-
|
|
2076
|
-
export { AddConnectorConfigureComponent, AddConnectorSelectComponent, ConnectorLinkExtensionComponent, ConnectorLinkExtensionModalComponent, ConnectorManagementComponent, ConnectorManagementModule, ConnectorManagementService, ConnectorManagementStateService, ConnectorModalComponent, EditConnectorPropertiesComponent, EditProductAanvragenConnectorComponent, EditTaakConnectorComponent, ModifyConnectorComponent, MultiValueConnectorPropertyComponent, ObjectApiSyncService, connectorLinkExtensionInitializer };
|
|
2077
|
-
//# sourceMappingURL=valtimo-connector-management.mjs.map
|