@valtimo/object 10.5.1 → 10.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/object-detail-container/object-detail-container.component.mjs +4 -4
- package/esm2020/lib/components/object-detail-container/tabs/object-detail/object-detail.component.mjs +39 -13
- package/esm2020/lib/components/object-list/object-list.component.mjs +61 -45
- package/esm2020/lib/object-routing.module.mjs +7 -7
- package/esm2020/lib/object.module.mjs +11 -9
- package/esm2020/lib/services/object-column.service.mjs +4 -4
- package/esm2020/lib/services/object-state.service.mjs +4 -4
- package/esm2020/lib/services/object.service.mjs +4 -4
- package/esm2020/lib/services/tab.service.mjs +4 -4
- package/fesm2015/valtimo-object.mjs +126 -83
- package/fesm2015/valtimo-object.mjs.map +1 -1
- package/fesm2020/valtimo-object.mjs +126 -82
- package/fesm2020/valtimo-object.mjs.map +1 -1
- package/lib/components/object-detail-container/tabs/object-detail/object-detail.component.d.ts +12 -5
- package/lib/components/object-list/object-list.component.d.ts +8 -6
- package/lib/object.module.d.ts +1 -1
- package/package.json +5 -4
|
@@ -5,17 +5,17 @@ import * as i2 from '@valtimo/config';
|
|
|
5
5
|
import { ROLE_USER } from '@valtimo/config';
|
|
6
6
|
import * as i3 from '@angular/router';
|
|
7
7
|
import { RouterModule } from '@angular/router';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i8 from '@angular/common';
|
|
9
9
|
import { CommonModule, AsyncPipe } from '@angular/common';
|
|
10
10
|
import { AuthGuardService } from '@valtimo/security';
|
|
11
|
-
import { map, BehaviorSubject, combineLatest, distinctUntilChanged, of, startWith, throwError, Subject } from 'rxjs';
|
|
12
|
-
import { switchMap,
|
|
11
|
+
import { map, BehaviorSubject, combineLatest, distinctUntilChanged, of, startWith, filter, throwError, Subject } from 'rxjs';
|
|
12
|
+
import { tap, switchMap, catchError, take, finalize } from 'rxjs/operators';
|
|
13
13
|
import * as i2$1 from '@valtimo/object-management';
|
|
14
14
|
import * as i4 from '@ngx-translate/core';
|
|
15
15
|
import { TranslateModule } from '@ngx-translate/core';
|
|
16
16
|
import * as i6 from 'ngx-toastr';
|
|
17
|
-
import * as
|
|
18
|
-
import { WidgetModule, ListModule, SpinnerModule, FormIoModule, ConfirmationModalModule, SearchFieldsModule } from '@valtimo/components';
|
|
17
|
+
import * as i7 from '@valtimo/components';
|
|
18
|
+
import { WidgetModule, ListModule, SpinnerModule, FormIoModule, ConfirmationModalModule, SearchFieldsModule, ValtimoCdsModalDirectiveModule } from '@valtimo/components';
|
|
19
19
|
import * as i9 from 'carbon-components-angular';
|
|
20
20
|
import { ButtonModule, IconModule, LoadingModule, ModalModule, InputModule } from 'carbon-components-angular';
|
|
21
21
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
@@ -63,9 +63,9 @@ class ObjectService {
|
|
|
63
63
|
return Object.fromEntries(Object.entries(submission).filter(([_, value]) => value !== ''));
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
ObjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
67
|
-
ObjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
66
|
+
ObjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
67
|
+
ObjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectService, providedIn: 'root' });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectService, decorators: [{
|
|
69
69
|
type: Injectable,
|
|
70
70
|
args: [{
|
|
71
71
|
providedIn: 'root',
|
|
@@ -128,9 +128,9 @@ class ObjectColumnService {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
ObjectColumnService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
132
|
-
ObjectColumnService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
131
|
+
ObjectColumnService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectColumnService, deps: [{ token: i2.ConfigService }, { token: i2$1.ObjectManagementService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
132
|
+
ObjectColumnService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectColumnService, providedIn: 'root' });
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectColumnService, decorators: [{
|
|
134
134
|
type: Injectable,
|
|
135
135
|
args: [{
|
|
136
136
|
providedIn: 'root',
|
|
@@ -153,7 +153,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
153
153
|
* limitations under the License.
|
|
154
154
|
*/
|
|
155
155
|
class ObjectListComponent {
|
|
156
|
-
constructor(objectService, objectColumnService, objectManagementService, translateService, router, route, toastr, translate) {
|
|
156
|
+
constructor(objectService, objectColumnService, objectManagementService, translateService, router, route, toastr, translate, pageTitleService) {
|
|
157
157
|
this.objectService = objectService;
|
|
158
158
|
this.objectColumnService = objectColumnService;
|
|
159
159
|
this.objectManagementService = objectManagementService;
|
|
@@ -162,6 +162,7 @@ class ObjectListComponent {
|
|
|
162
162
|
this.route = route;
|
|
163
163
|
this.toastr = toastr;
|
|
164
164
|
this.translate = translate;
|
|
165
|
+
this.pageTitleService = pageTitleService;
|
|
165
166
|
this.loading$ = new BehaviorSubject(true);
|
|
166
167
|
this.submission$ = new BehaviorSubject({});
|
|
167
168
|
this.formValid$ = new BehaviorSubject(false);
|
|
@@ -169,7 +170,16 @@ class ObjectListComponent {
|
|
|
169
170
|
this.disableInput$ = new BehaviorSubject(false);
|
|
170
171
|
this.clearForm$ = new BehaviorSubject(false);
|
|
171
172
|
this.columnType$ = new BehaviorSubject(ColumnType.DEFAULT);
|
|
172
|
-
this.objectManagementId$ = this.route.params.pipe(map(params => params.objectManagementId)
|
|
173
|
+
this.objectManagementId$ = this.route.params.pipe(map(params => params.objectManagementId), tap(objectManagementId => {
|
|
174
|
+
if (!this._settingPageTitle && objectManagementId) {
|
|
175
|
+
this._settingPageTitle = true;
|
|
176
|
+
this.objectManagementService.getObjectById(objectManagementId).subscribe(objectType => {
|
|
177
|
+
if (objectType.title) {
|
|
178
|
+
this.pageTitleService.setCustomPageTitle(objectType.title);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}));
|
|
173
183
|
this.refreshObjectList$ = new BehaviorSubject(null);
|
|
174
184
|
this.currentPageAndSize$ = new BehaviorSubject({
|
|
175
185
|
page: 0,
|
|
@@ -199,26 +209,34 @@ class ObjectListComponent {
|
|
|
199
209
|
this.translateService.stream('key'),
|
|
200
210
|
this.refreshObjectList$,
|
|
201
211
|
]).pipe(switchMap(([objectManagementId, currentPage, columnType, searchFieldValues]) => {
|
|
212
|
+
const handleError = () => {
|
|
213
|
+
this.disableInput();
|
|
214
|
+
return of(null);
|
|
215
|
+
};
|
|
202
216
|
if (columnType === ColumnType.CUSTOM) {
|
|
203
|
-
return this.objectService
|
|
217
|
+
return this.objectService
|
|
218
|
+
.postObjectsByObjectManagementId(objectManagementId, {
|
|
204
219
|
page: currentPage.page,
|
|
205
220
|
size: currentPage.size,
|
|
206
221
|
}, Object.keys(searchFieldValues).length > 0
|
|
207
222
|
? { otherFilters: this.mapSearchValuesToFilters(searchFieldValues) }
|
|
208
|
-
: {})
|
|
223
|
+
: {})
|
|
224
|
+
.pipe(catchError(() => handleError()));
|
|
209
225
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
226
|
+
return this.objectService
|
|
227
|
+
.getObjectsByObjectManagementId(objectManagementId, {
|
|
228
|
+
page: currentPage.page,
|
|
229
|
+
size: currentPage.size,
|
|
230
|
+
})
|
|
231
|
+
.pipe(catchError(() => handleError()));
|
|
232
|
+
}), tap(instanceRes => {
|
|
233
|
+
if (instanceRes != null) {
|
|
234
|
+
this.pageSizes$.pipe(take(1)).subscribe(sizes => {
|
|
235
|
+
// @ts-ignore
|
|
236
|
+
this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
|
|
214
237
|
});
|
|
215
238
|
}
|
|
216
|
-
}), tap(
|
|
217
|
-
this.pageSizes$.pipe(take(1)).subscribe(sizes => {
|
|
218
|
-
// @ts-ignore
|
|
219
|
-
this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
|
|
220
|
-
});
|
|
221
|
-
}), map(res => res.content.map(record => { var _a; return (_a = record === null || record === void 0 ? void 0 : record.items) === null || _a === void 0 ? void 0 : _a.reduce((obj, item) => Object.assign(obj, { objectId: record.id }, { [item.key]: item.value }), {}); })), tap(() => this.loading$.next(false)));
|
|
239
|
+
}), map(res => { var _a; return (_a = res === null || res === void 0 ? void 0 : res.content) === null || _a === void 0 ? void 0 : _a.map(record => { var _a; return (_a = record === null || record === void 0 ? void 0 : record.items) === null || _a === void 0 ? void 0 : _a.reduce((obj, item) => Object.assign(obj, { objectId: record.id }, { [item.key]: item.value }), {}); }); }), tap(() => this.loading$.next(false)));
|
|
222
240
|
this.formDefinition$ = combineLatest([
|
|
223
241
|
this.objectManagementId$,
|
|
224
242
|
this.clearForm$,
|
|
@@ -246,15 +264,14 @@ class ObjectListComponent {
|
|
|
246
264
|
const translationKey = `fieldLabels.${column.translationKey}`;
|
|
247
265
|
const translation = this.translateService.instant(translationKey);
|
|
248
266
|
const validTranslation = translation !== translationKey && translation;
|
|
249
|
-
return Object.assign(Object.assign({ key: column.translationKey, label: column.title || validTranslation || column.translationKey, sortable: column.sortable }, (column.viewType && { viewType: column.viewType })), (column.enum && { enum: column.enum }));
|
|
267
|
+
return Object.assign(Object.assign(Object.assign({ key: column.translationKey, label: column.title || validTranslation || column.translationKey, sortable: column.sortable }, (column.viewType && { viewType: column.viewType })), (column.enum && { enum: column.enum })), (column.format && { format: column.format }));
|
|
250
268
|
}),
|
|
251
269
|
];
|
|
252
270
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
return this.setDefaultFields();
|
|
256
|
-
}
|
|
271
|
+
this.columnType$.next(ColumnType.DEFAULT);
|
|
272
|
+
return this.setDefaultFields();
|
|
257
273
|
}));
|
|
274
|
+
this._settingPageTitle = false;
|
|
258
275
|
}
|
|
259
276
|
paginationClicked(newPageNumber) {
|
|
260
277
|
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
@@ -284,22 +301,21 @@ class ObjectListComponent {
|
|
|
284
301
|
addObject() {
|
|
285
302
|
this.disableInput();
|
|
286
303
|
combineLatest([this.objectManagementId$, this.submission$, this.formValid$])
|
|
287
|
-
.pipe(take(1))
|
|
288
|
-
.
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
304
|
+
.pipe(take(1), filter(([objectManagementId, submission, formValid]) => formValid), switchMap(([objectManagementId, submission]) => this.objectService
|
|
305
|
+
.createObject({ objectManagementId }, Object.assign({}, this.objectService.removeEmptyStringValuesFromSubmission(submission)))
|
|
306
|
+
.pipe(take(1), catchError((error) => {
|
|
307
|
+
this.handleCreateObjectError(error);
|
|
308
|
+
return throwError(error);
|
|
309
|
+
}))), finalize(() => {
|
|
310
|
+
this.enableInput();
|
|
311
|
+
}))
|
|
312
|
+
.subscribe({
|
|
313
|
+
next: () => {
|
|
314
|
+
this.closeModal();
|
|
315
|
+
this.refreshObjectList();
|
|
316
|
+
this.clearForm$.next(true);
|
|
317
|
+
this.toastr.success(this.translate.instant('object.messages.objectCreated'));
|
|
318
|
+
},
|
|
303
319
|
});
|
|
304
320
|
}
|
|
305
321
|
redirectToDetails(record) {
|
|
@@ -334,7 +350,6 @@ class ObjectListComponent {
|
|
|
334
350
|
return throwError(error);
|
|
335
351
|
}
|
|
336
352
|
handleCreateObjectError(error) {
|
|
337
|
-
this.closeModal();
|
|
338
353
|
this.toastr.error(this.translate.instant('object.messages.objectCreationError'));
|
|
339
354
|
return throwError(error);
|
|
340
355
|
}
|
|
@@ -350,18 +365,18 @@ class ObjectListComponent {
|
|
|
350
365
|
}
|
|
351
366
|
else {
|
|
352
367
|
// @ts-ignore
|
|
353
|
-
filters.push({ key: valueKey, values: [
|
|
368
|
+
filters.push({ key: valueKey, values: [searchValue] });
|
|
354
369
|
}
|
|
355
370
|
});
|
|
356
371
|
return filters;
|
|
357
372
|
}
|
|
358
373
|
}
|
|
359
|
-
ObjectListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
360
|
-
ObjectListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
361
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
374
|
+
ObjectListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectListComponent, deps: [{ token: ObjectService }, { token: ObjectColumnService }, { token: i2$1.ObjectManagementService }, { token: i4.TranslateService }, { token: i3.Router }, { token: i3.ActivatedRoute }, { token: i6.ToastrService }, { token: i4.TranslateService }, { token: i7.PageTitleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
375
|
+
ObjectListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ObjectListComponent, selector: "valtimo-object-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n pagination: pagination$ | async,\n disableInput: disableInput$ | async,\n fields: fields$ | async,\n objectConfiguration: objectConfiguration$ | async\n } as obs\"\n>\n <div class=\"main-content pt-0\">\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-0\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngTemplateOutlet=\"searchFields; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createNewModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button\n (click)=\"openModal()\"\n cdsButton=\"primary\"\n size=\"md\"\n class=\"ml-3\"\n [disabled]=\"obs.disableInput || obs.loading\"\n >\n {{ 'object.createObject' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #searchFields let-obs=\"obs\">\n <div class=\"mb-3\">\n <valtimo-search-fields\n [loading]=\"obs.loading\"\n [searchFields]=\"objectSearchFields$ | async\"\n (doSearch)=\"search($event)\"\n [documentDefinitionName]=\"objectManagementId$ | async\"\n [setValuesSubject$]=\"null\"\n ></valtimo-search-fields>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.objectConfiguration\"\n [fields]=\"obs.fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"objectConfigurationList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'object.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n obs.objectConfiguration?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #createNewModal>\n <cds-modal\n valtimoCdsModal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n formDefinition: formDefinition$ | async,\n disableInput: disableInput$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ 'object.createObject' | translate }}\n </h3>\n </cds-modal-header>\n <section cdsModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </cds-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formDefinition\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <cds-modal-footer>\n <ng-container>\n <button\n cdsButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"addObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </cds-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><cds-loading></cds-loading></div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.loading-icon{display:flex;justify-content:center}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i7.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i7.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "directive", type: i9.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i9.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i9.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i7.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i9.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i9.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i9.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i9.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i9.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "component", type: i7.SearchFieldsComponent, selector: "valtimo-search-fields", inputs: ["loading", "searchFields", "documentDefinitionName", "setValuesSubject$", "defaultValues"], outputs: ["doSearch"] }, { kind: "directive", type: i7.ValtimoCdsModalDirective, selector: "[valtimoCdsModal]" }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectListComponent, decorators: [{
|
|
362
377
|
type: Component,
|
|
363
|
-
args: [{ selector: 'valtimo-object-list', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n pagination: pagination$ | async,\n disableInput: disableInput$ | async,\n fields: fields$ | async,\n objectConfiguration: objectConfiguration$ | async\n } as obs\"\n>\n <div class=\"main-content pt-0\">\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-0\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngTemplateOutlet=\"searchFields; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createNewModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button\n (click)=\"openModal()\"\n
|
|
364
|
-
}], ctorParameters: function () { return [{ type: ObjectService }, { type: ObjectColumnService }, { type: i2$1.ObjectManagementService }, { type: i4.TranslateService }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: i6.ToastrService }, { type: i4.TranslateService }]; } });
|
|
378
|
+
args: [{ selector: 'valtimo-object-list', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n pagination: pagination$ | async,\n disableInput: disableInput$ | async,\n fields: fields$ | async,\n objectConfiguration: objectConfiguration$ | async\n } as obs\"\n>\n <div class=\"main-content pt-0\">\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-0\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngTemplateOutlet=\"searchFields; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createNewModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button\n (click)=\"openModal()\"\n cdsButton=\"primary\"\n size=\"md\"\n class=\"ml-3\"\n [disabled]=\"obs.disableInput || obs.loading\"\n >\n {{ 'object.createObject' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #searchFields let-obs=\"obs\">\n <div class=\"mb-3\">\n <valtimo-search-fields\n [loading]=\"obs.loading\"\n [searchFields]=\"objectSearchFields$ | async\"\n (doSearch)=\"search($event)\"\n [documentDefinitionName]=\"objectManagementId$ | async\"\n [setValuesSubject$]=\"null\"\n ></valtimo-search-fields>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.objectConfiguration\"\n [fields]=\"obs.fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"objectConfigurationList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'object.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n obs.objectConfiguration?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #createNewModal>\n <cds-modal\n valtimoCdsModal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n formDefinition: formDefinition$ | async,\n disableInput: disableInput$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ 'object.createObject' | translate }}\n </h3>\n </cds-modal-header>\n <section cdsModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </cds-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formDefinition\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <cds-modal-footer>\n <ng-container>\n <button\n cdsButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"addObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </cds-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><cds-loading></cds-loading></div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.loading-icon{display:flex;justify-content:center}\n"] }]
|
|
379
|
+
}], ctorParameters: function () { return [{ type: ObjectService }, { type: ObjectColumnService }, { type: i2$1.ObjectManagementService }, { type: i4.TranslateService }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: i6.ToastrService }, { type: i4.TranslateService }, { type: i7.PageTitleService }]; } });
|
|
365
380
|
|
|
366
381
|
/*
|
|
367
382
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
@@ -430,9 +445,9 @@ class ObjectStateService {
|
|
|
430
445
|
this._modalType$.next(type);
|
|
431
446
|
}
|
|
432
447
|
}
|
|
433
|
-
ObjectStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
434
|
-
ObjectStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
448
|
+
ObjectStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
449
|
+
ObjectStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectStateService, providedIn: 'root' });
|
|
450
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectStateService, decorators: [{
|
|
436
451
|
type: Injectable,
|
|
437
452
|
args: [{
|
|
438
453
|
providedIn: 'root',
|
|
@@ -465,9 +480,9 @@ class TabService {
|
|
|
465
480
|
this._currentTab$.next(tab);
|
|
466
481
|
}
|
|
467
482
|
}
|
|
468
|
-
TabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
469
|
-
TabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
470
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
483
|
+
TabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
484
|
+
TabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabService, providedIn: 'root' });
|
|
485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabService, decorators: [{
|
|
471
486
|
type: Injectable,
|
|
472
487
|
args: [{
|
|
473
488
|
providedIn: 'root',
|
|
@@ -490,13 +505,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
490
505
|
* limitations under the License.
|
|
491
506
|
*/
|
|
492
507
|
class ObjectDetailComponent {
|
|
493
|
-
constructor(objectService, objectState, route, router, translate, toastr) {
|
|
508
|
+
constructor(objectService, objectState, route, router, translate, toastr, pageTitleService, breadcrumbService, objectManagementService) {
|
|
494
509
|
this.objectService = objectService;
|
|
495
510
|
this.objectState = objectState;
|
|
496
511
|
this.route = route;
|
|
497
512
|
this.router = router;
|
|
498
513
|
this.translate = translate;
|
|
499
514
|
this.toastr = toastr;
|
|
515
|
+
this.pageTitleService = pageTitleService;
|
|
516
|
+
this.breadcrumbService = breadcrumbService;
|
|
517
|
+
this.objectManagementService = objectManagementService;
|
|
500
518
|
this.loading$ = new BehaviorSubject(true);
|
|
501
519
|
this.submission$ = new BehaviorSubject({});
|
|
502
520
|
this.formValid$ = new BehaviorSubject(false);
|
|
@@ -505,8 +523,19 @@ class ObjectDetailComponent {
|
|
|
505
523
|
this.showDeleteModal$ = new Subject();
|
|
506
524
|
this.deleteObjectUrl$ = new BehaviorSubject('');
|
|
507
525
|
this.refreshObject$ = new BehaviorSubject(null);
|
|
508
|
-
this.objectManagementId$ = this.route.params.pipe(map(params => params.objectManagementId)
|
|
509
|
-
|
|
526
|
+
this.objectManagementId$ = this.route.params.pipe(map(params => params.objectManagementId), tap(objectManagementId => {
|
|
527
|
+
if (!this._settingBreadcrumb && objectManagementId) {
|
|
528
|
+
this._settingBreadcrumb = true;
|
|
529
|
+
this.objectManagementService.getObjectById(objectManagementId).subscribe(objectType => {
|
|
530
|
+
if (objectType.id && objectType.title) {
|
|
531
|
+
this.setBreadcrumb(objectType.id, objectType.title);
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
}));
|
|
536
|
+
this.objectId$ = this.route.params.pipe(map(params => params.objectId), tap(objectId => {
|
|
537
|
+
this.pageTitleService.setCustomPageTitle(objectId);
|
|
538
|
+
}));
|
|
510
539
|
this.formioFormSummary$ = combineLatest([
|
|
511
540
|
this.objectManagementId$,
|
|
512
541
|
this.objectId$,
|
|
@@ -524,7 +553,11 @@ class ObjectDetailComponent {
|
|
|
524
553
|
objectId,
|
|
525
554
|
formType: FormType.EDITFORM,
|
|
526
555
|
})
|
|
527
|
-
.pipe(catchError(() =>
|
|
556
|
+
.pipe(catchError(() => {
|
|
557
|
+
this.disableInput();
|
|
558
|
+
return this.handleRetrievingFormError();
|
|
559
|
+
}))), map(res => res === null || res === void 0 ? void 0 : res.formDefinition), tap(() => this.loading$.next(false)));
|
|
560
|
+
this._settingBreadcrumb = false;
|
|
528
561
|
}
|
|
529
562
|
saveObject() {
|
|
530
563
|
this.disableInput();
|
|
@@ -607,13 +640,20 @@ class ObjectDetailComponent {
|
|
|
607
640
|
this.toastr.error(this.translate.instant('object.messages.objectDeleteError'));
|
|
608
641
|
return throwError(error);
|
|
609
642
|
}
|
|
643
|
+
setBreadcrumb(objectTypeId, title) {
|
|
644
|
+
this.breadcrumbService.setSecondBreadcrumb({
|
|
645
|
+
route: [`/objects/${objectTypeId}`],
|
|
646
|
+
content: title,
|
|
647
|
+
href: `/objects/${objectTypeId}`,
|
|
648
|
+
});
|
|
649
|
+
}
|
|
610
650
|
}
|
|
611
|
-
ObjectDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
612
|
-
ObjectDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
613
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
651
|
+
ObjectDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectDetailComponent, deps: [{ token: ObjectService }, { token: ObjectStateService }, { token: i3.ActivatedRoute }, { token: i3.Router }, { token: i4.TranslateService }, { token: i6.ToastrService }, { token: i7.PageTitleService }, { token: i7.BreadcrumbService }, { token: i2$1.ObjectManagementService }], target: i0.ɵɵFactoryTarget.Component });
|
|
652
|
+
ObjectDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ObjectDetailComponent, selector: "valtimo-object-detail", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<ng-container\n *ngIf=\"{\n formioFormSummary: formioFormSummary$ | async,\n disableInput: disableInput$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"text-right\">\n <div class=\"btn-group mb-1\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <div class=\"col-12\">\n <ng-container *ngTemplateOutlet=\"widget; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button [disabled]=\"obs.disableInput\" (click)=\"openModal()\" cdsButton=\"primary\" size=\"md\">\n {{ 'object.editObject' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n\n <button (click)=\"deleteObject()\" cdsButton=\"danger\" size=\"md\" class=\"ml-3\">\n {{ 'object.deleteObject' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #widget let-obs=\"obs\">\n <valtimo-form-io\n *ngIf=\"obs.formioFormSummary\"\n [form]=\"obs.formioFormSummary\"\n [readOnly]=\"true\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #createEditModal>\n <cds-modal\n valtimoCdsModal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n disableInput: disableInput$ | async,\n formioFormEdit: formioFormEdit$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ 'object.editObject' | translate }}\n </h3>\n </cds-modal-header>\n <section cdsModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </cds-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formioFormEdit\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <cds-modal-footer>\n <ng-container>\n <button\n cdsButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"saveObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </cds-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><cds-loading></cds-loading></div>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteObjectUrl$ | async\"\n (confirmEvent)=\"deleteObjectConfirmation()\"\n confirmButtonTextTranslationKey=\"object.deleteObject\"\n titleTranslationKey=\"object.deleteObject\"\n contentTranslationKey=\"object.deleteObjectConfirmation\"\n ></valtimo-confirmation-modal>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.row{margin:0}.object-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{border:none}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i9.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i9.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i9.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i7.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i9.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i9.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i9.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i9.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i9.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "component", type: i7.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm"], outputs: ["confirmEvent"] }, { kind: "directive", type: i7.ValtimoCdsModalDirective, selector: "[valtimoCdsModal]" }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
653
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectDetailComponent, decorators: [{
|
|
614
654
|
type: Component,
|
|
615
|
-
args: [{ selector: 'valtimo-object-detail', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<ng-container\n *ngIf=\"{\n formioFormSummary: formioFormSummary$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"text-right\">\n <div class=\"btn-group mb-1\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <div class=\"col-12\">\n <ng-container *ngTemplateOutlet=\"widget; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button (click)=\"openModal()\"
|
|
616
|
-
}], ctorParameters: function () { return [{ type: ObjectService }, { type: ObjectStateService }, { type: i3.ActivatedRoute }, { type: i3.Router }, { type: i4.TranslateService }, { type: i6.ToastrService }]; } });
|
|
655
|
+
args: [{ selector: 'valtimo-object-detail', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<ng-container\n *ngIf=\"{\n formioFormSummary: formioFormSummary$ | async,\n disableInput: disableInput$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"text-right\">\n <div class=\"btn-group mb-1\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <div class=\"col-12\">\n <ng-container *ngTemplateOutlet=\"widget; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <button [disabled]=\"obs.disableInput\" (click)=\"openModal()\" cdsButton=\"primary\" size=\"md\">\n {{ 'object.editObject' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n\n <button (click)=\"deleteObject()\" cdsButton=\"danger\" size=\"md\" class=\"ml-3\">\n {{ 'object.deleteObject' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #widget let-obs=\"obs\">\n <valtimo-form-io\n *ngIf=\"obs.formioFormSummary\"\n [form]=\"obs.formioFormSummary\"\n [readOnly]=\"true\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #createEditModal>\n <cds-modal\n valtimoCdsModal\n *ngIf=\"{\n show: showModal$ | async,\n formValid: formValid$ | async,\n disableInput: disableInput$ | async,\n formioFormEdit: formioFormEdit$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ 'object.editObject' | translate }}\n </h3>\n </cds-modal-header>\n <section cdsModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </cds-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <valtimo-form-io\n [form]=\"modalObs.formioFormEdit\"\n (change)=\"onFormioChange($event)\"\n ></valtimo-form-io>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <cds-modal-footer>\n <ng-container>\n <button\n cdsButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'object.close' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"saveObject()\"\n [disabled]=\"modalObs.disableInput || modalObs.formValid === false\"\n >\n {{ 'object.save' | translate }}\n </button>\n </ng-container>\n </cds-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><cds-loading></cds-loading></div>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteObjectUrl$ | async\"\n (confirmEvent)=\"deleteObjectConfirmation()\"\n confirmButtonTextTranslationKey=\"object.deleteObject\"\n titleTranslationKey=\"object.deleteObject\"\n contentTranslationKey=\"object.deleteObjectConfirmation\"\n ></valtimo-confirmation-modal>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.row{margin:0}.object-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{border:none}\n"] }]
|
|
656
|
+
}], ctorParameters: function () { return [{ type: ObjectService }, { type: ObjectStateService }, { type: i3.ActivatedRoute }, { type: i3.Router }, { type: i4.TranslateService }, { type: i6.ToastrService }, { type: i7.PageTitleService }, { type: i7.BreadcrumbService }, { type: i2$1.ObjectManagementService }]; } });
|
|
617
657
|
|
|
618
658
|
/*
|
|
619
659
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
@@ -656,9 +696,9 @@ class ObjectDetailContainerComponent {
|
|
|
656
696
|
(_a = this.tabSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
657
697
|
}
|
|
658
698
|
}
|
|
659
|
-
ObjectDetailContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
660
|
-
ObjectDetailContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
661
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
699
|
+
ObjectDetailContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectDetailContainerComponent, deps: [{ token: ObjectStateService }, { token: ObjectService }, { token: i3.ActivatedRoute }, { token: i2.ConfigService }, { token: TabService }], target: i0.ɵɵFactoryTarget.Component });
|
|
700
|
+
ObjectDetailContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ObjectDetailContainerComponent, selector: "valtimo-object-detail-container", ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabContent\"></ng-container>\n </valtimo-widget>\n </div>\n </div>\n</div>\n\n<ng-template #title>\n <div class=\"bg-light dossier-header\">\n <h3 class=\"dossier-title\">\n {{ 'object.header' | translate }}\n </h3>\n </div>\n</ng-template>\n\n<ng-template #tabs>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a\n id=\"general-tab\"\n class=\"nav-link clickable active\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.GENERAL)\"\n >\n {{ 'object.tabs.general' | translate }}\n </a>\n </li>\n </ul>\n</ng-template>\n\n<ng-template #tabContent>\n <div class=\"pl-1 pr-1 pt-3 bg-white position-relative tab-container\">\n <div *ngIf=\"currentTab && currentTab === TabEnum.GENERAL\">\n <valtimo-object-detail></valtimo-object-detail>\n </div>\n </div>\n</ng-template>\n", styles: [".tab-container{min-height:300px}.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid rgba(0,0,0,.125)}.dossier-title{margin-top:0;margin-bottom:7px}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i7.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: ObjectDetailComponent, selector: "valtimo-object-detail" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectDetailContainerComponent, decorators: [{
|
|
662
702
|
type: Component,
|
|
663
703
|
args: [{ selector: 'valtimo-object-detail-container', template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabContent\"></ng-container>\n </valtimo-widget>\n </div>\n </div>\n</div>\n\n<ng-template #title>\n <div class=\"bg-light dossier-header\">\n <h3 class=\"dossier-title\">\n {{ 'object.header' | translate }}\n </h3>\n </div>\n</ng-template>\n\n<ng-template #tabs>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a\n id=\"general-tab\"\n class=\"nav-link clickable active\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.GENERAL)\"\n >\n {{ 'object.tabs.general' | translate }}\n </a>\n </li>\n </ul>\n</ng-template>\n\n<ng-template #tabContent>\n <div class=\"pl-1 pr-1 pt-3 bg-white position-relative tab-container\">\n <div *ngIf=\"currentTab && currentTab === TabEnum.GENERAL\">\n <valtimo-object-detail></valtimo-object-detail>\n </div>\n </div>\n</ng-template>\n", styles: [".tab-container{min-height:300px}.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid rgba(0,0,0,.125)}.dossier-title{margin-top:0;margin-bottom:7px}\n"] }]
|
|
664
704
|
}], ctorParameters: function () { return [{ type: ObjectStateService }, { type: ObjectService }, { type: i3.ActivatedRoute }, { type: i2.ConfigService }, { type: TabService }]; } });
|
|
@@ -683,21 +723,21 @@ const routes = [
|
|
|
683
723
|
path: 'objects/:objectManagementId',
|
|
684
724
|
canActivate: [AuthGuardService],
|
|
685
725
|
component: ObjectListComponent,
|
|
686
|
-
data: { title: 'Objects', roles: [ROLE_USER] },
|
|
726
|
+
data: { title: 'Objects', roles: [ROLE_USER], customPageTitle: true },
|
|
687
727
|
},
|
|
688
728
|
{
|
|
689
729
|
path: 'objects/:objectManagementId/:objectId',
|
|
690
730
|
canActivate: [AuthGuardService],
|
|
691
731
|
component: ObjectDetailContainerComponent,
|
|
692
|
-
data: { title: 'Object details', roles: [ROLE_USER] },
|
|
732
|
+
data: { title: 'Object details', roles: [ROLE_USER], customPageTitle: true },
|
|
693
733
|
},
|
|
694
734
|
];
|
|
695
735
|
class ObjectRoutingModule {
|
|
696
736
|
}
|
|
697
|
-
ObjectRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
698
|
-
ObjectRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
699
|
-
ObjectRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
700
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
737
|
+
ObjectRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
738
|
+
ObjectRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ObjectRoutingModule, imports: [CommonModule, i3.RouterModule], exports: [RouterModule] });
|
|
739
|
+
ObjectRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] });
|
|
740
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectRoutingModule, decorators: [{
|
|
701
741
|
type: NgModule,
|
|
702
742
|
args: [{
|
|
703
743
|
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
@@ -723,8 +763,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
723
763
|
*/
|
|
724
764
|
class ObjectModule {
|
|
725
765
|
}
|
|
726
|
-
ObjectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
727
|
-
ObjectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
766
|
+
ObjectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
767
|
+
ObjectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ObjectModule, declarations: [ObjectListComponent, ObjectDetailContainerComponent, ObjectDetailComponent], imports: [CommonModule,
|
|
728
768
|
ObjectRoutingModule,
|
|
729
769
|
TranslateModule,
|
|
730
770
|
AsyncPipe,
|
|
@@ -740,8 +780,9 @@ ObjectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
|
740
780
|
InputModule,
|
|
741
781
|
TooltipIconModule,
|
|
742
782
|
ConfirmationModalModule,
|
|
743
|
-
SearchFieldsModule
|
|
744
|
-
|
|
783
|
+
SearchFieldsModule,
|
|
784
|
+
ValtimoCdsModalDirectiveModule] });
|
|
785
|
+
ObjectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectModule, imports: [CommonModule,
|
|
745
786
|
ObjectRoutingModule,
|
|
746
787
|
TranslateModule,
|
|
747
788
|
WidgetModule,
|
|
@@ -756,8 +797,9 @@ ObjectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
|
756
797
|
InputModule,
|
|
757
798
|
TooltipIconModule,
|
|
758
799
|
ConfirmationModalModule,
|
|
759
|
-
SearchFieldsModule
|
|
760
|
-
|
|
800
|
+
SearchFieldsModule,
|
|
801
|
+
ValtimoCdsModalDirectiveModule] });
|
|
802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ObjectModule, decorators: [{
|
|
761
803
|
type: NgModule,
|
|
762
804
|
args: [{
|
|
763
805
|
declarations: [ObjectListComponent, ObjectDetailContainerComponent, ObjectDetailComponent],
|
|
@@ -779,6 +821,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
779
821
|
TooltipIconModule,
|
|
780
822
|
ConfirmationModalModule,
|
|
781
823
|
SearchFieldsModule,
|
|
824
|
+
ValtimoCdsModalDirectiveModule,
|
|
782
825
|
],
|
|
783
826
|
exports: [],
|
|
784
827
|
}]
|