@cauca-911/management 21.3.7 → 22.0.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/assets/i18n/cauca/en-management.json +3 -3
- package/assets/i18n/cauca/es-management.json +3 -3
- package/assets/i18n/cauca/fr-management.json +3 -3
- package/fesm2022/cauca-911-management.mjs +162 -119
- package/fesm2022/cauca-911-management.mjs.map +1 -1
- package/package.json +8 -7
- package/types/cauca-911-management.d.ts +12 -13
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injector, inject, Injectable, computed, ChangeDetectionStrategy, Component, ViewChild, signal, viewChild, resource, effect, untracked, model, input, HostListener,
|
|
2
|
+
import { InjectionToken, Injector, inject, Injectable, computed, ChangeDetectionStrategy, Component, ViewChild, signal, viewChild, resource, effect, untracked, model, input, HostListener, NgModule } from '@angular/core';
|
|
3
3
|
import { pendingChangesGuard, DialogService, PageTitleComponent, LoadingSpinnerIndicatorComponent, LoadingErrorComponent, StrokedButtonComponent, RaisedButtonComponent, ListPaginatorComponent, IconButtonComponent, LoadingStateService, GroupContainerComponent, ConfirmationResult, SavingErrorBoxComponent } from '@cauca-911/material';
|
|
4
4
|
import * as i1 from '@angular/material/card';
|
|
5
5
|
import { MatCardModule } from '@angular/material/card';
|
|
6
|
-
import * as i1$3 from '@ngx-translate/core';
|
|
7
6
|
import { TranslatePipe } from '@ngx-translate/core';
|
|
8
7
|
import { MatSort } from '@angular/material/sort';
|
|
9
8
|
import { Router } from '@angular/router';
|
|
10
9
|
import ODataFilterBuilder from 'odata-filter-builder';
|
|
11
10
|
import { OdataGridComponent, SortableDataGridColumnComponent, SortableDataGridCheckColumnComponent, DataGridCommandsColumnComponent } from '@cauca-911/datagrid';
|
|
12
11
|
import { HttpClient } from '@angular/common/http';
|
|
13
|
-
import { CaucaCoreService, toLowerCaseAndWithoutDiacritics
|
|
12
|
+
import { CaucaCoreService, toLowerCaseAndWithoutDiacritics } from '@cauca-911/core';
|
|
14
13
|
import { firstValueFrom, startWith, debounceTime } from 'rxjs';
|
|
15
14
|
import * as i1$2 from '@angular/material/form-field';
|
|
16
15
|
import { MatFormFieldModule, MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field';
|
|
@@ -33,19 +32,18 @@ import * as i6 from '@angular/material/tooltip';
|
|
|
33
32
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
34
33
|
import * as i3 from '@angular/material/checkbox';
|
|
35
34
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
36
|
-
import * as i1$
|
|
35
|
+
import * as i1$3 from '@cauca-911/devextreme';
|
|
36
|
+
import { CaucaDevextremeModule } from '@cauca-911/devextreme';
|
|
37
|
+
import * as i4$2 from 'devextreme-angular/ui/check-box';
|
|
37
38
|
import { DxCheckBoxModule } from 'devextreme-angular/ui/check-box';
|
|
38
|
-
import * as
|
|
39
|
+
import * as i5$1 from 'devextreme-angular/ui/list';
|
|
39
40
|
import { DxListModule } from 'devextreme-angular/ui/list';
|
|
40
|
-
import * as
|
|
41
|
+
import * as i6$1 from 'devextreme-angular/ui/tag-box';
|
|
41
42
|
import { DxTagBoxModule } from 'devextreme-angular/ui/tag-box';
|
|
42
|
-
import * as i6$1 from '@cauca-911/devextreme';
|
|
43
|
-
import { CaucaDevextremeModule } from '@cauca-911/devextreme';
|
|
44
43
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
45
44
|
import { map } from 'rxjs/operators';
|
|
46
|
-
import * as i2$1 from 'devextreme-angular/
|
|
47
|
-
import * as
|
|
48
|
-
import { CommonModule } from '@angular/common';
|
|
45
|
+
import * as i2$1 from 'devextreme-angular/ui/nested';
|
|
46
|
+
import * as i3$2 from 'devextreme-angular/core';
|
|
49
47
|
|
|
50
48
|
const MANAGEMENT_URL_PREFIX = new InjectionToken('MANAGEMENT_URL_PREFIX');
|
|
51
49
|
const MANAGEMENT_ROUTE_SEGMENT = new InjectionToken('MANAGEMENT_ROUTE_SEGMENT');
|
|
@@ -106,7 +104,8 @@ class GroupManagementService {
|
|
|
106
104
|
const _c0$3 = () => ["name"];
|
|
107
105
|
class GroupListGridComponent {
|
|
108
106
|
constructor() {
|
|
109
|
-
this.columns = computed(() => this.getColumns(),
|
|
107
|
+
this.columns = computed(() => this.getColumns(), /* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
110
109
|
this.router = inject(Router);
|
|
111
110
|
this.dialog = inject(DialogService);
|
|
112
111
|
this.service = inject(GroupManagementService);
|
|
@@ -167,7 +166,7 @@ class GroupListGridComponent {
|
|
|
167
166
|
i0.ɵɵproperty("label", i0.ɵɵpipeBind1(5, 14, "groups.assignableByAllUsersColumnLabel"));
|
|
168
167
|
i0.ɵɵadvance(2);
|
|
169
168
|
i0.ɵɵproperty("canDelete", true)("canEdit", true);
|
|
170
|
-
} }, dependencies: [MatSort, OdataGridComponent, SortableDataGridColumnComponent, SortableDataGridCheckColumnComponent, DataGridCommandsColumnComponent, TranslatePipe], encapsulation: 2
|
|
169
|
+
} }, dependencies: [MatSort, OdataGridComponent, SortableDataGridColumnComponent, SortableDataGridCheckColumnComponent, DataGridCommandsColumnComponent, TranslatePipe], encapsulation: 2 }); }
|
|
171
170
|
}
|
|
172
171
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GroupListGridComponent, [{
|
|
173
172
|
type: Component,
|
|
@@ -190,7 +189,7 @@ class GroupsPageComponent {
|
|
|
190
189
|
i0.ɵɵelementEnd()();
|
|
191
190
|
} if (rf & 2) {
|
|
192
191
|
i0.ɵɵproperty("showBreadcrumb", true);
|
|
193
|
-
} }, dependencies: [MatCardModule, i1.MatCard, i1.MatCardContent, PageTitleComponent, GroupListGridComponent], encapsulation: 2
|
|
192
|
+
} }, dependencies: [MatCardModule, i1.MatCard, i1.MatCardContent, PageTitleComponent, GroupListGridComponent], encapsulation: 2 }); }
|
|
194
193
|
}
|
|
195
194
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GroupsPageComponent, [{
|
|
196
195
|
type: Component,
|
|
@@ -323,6 +322,7 @@ class UserForGroup {
|
|
|
323
322
|
this.firstName = data.firstName;
|
|
324
323
|
this.lastName = data.lastName;
|
|
325
324
|
this.fullName = `${data.firstName} ${data.lastName}`;
|
|
325
|
+
this.additionalInformation = data.additionalInformation;
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
|
|
@@ -377,22 +377,35 @@ function GroupUserSelectionDialogComponent_Conditional_13_Template(rf, ctx) { if
|
|
|
377
377
|
function GroupUserSelectionDialogComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
378
378
|
i0.ɵɵelement(0, "cauca-loading-spinner-indicator");
|
|
379
379
|
} }
|
|
380
|
-
function
|
|
381
|
-
i0.ɵɵelementStart(0, "
|
|
380
|
+
function GroupUserSelectionDialogComponent_Conditional_17_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
381
|
+
i0.ɵɵelementStart(0, "span", 23);
|
|
382
382
|
i0.ɵɵtext(1);
|
|
383
383
|
i0.ɵɵelementEnd();
|
|
384
|
+
} if (rf & 2) {
|
|
385
|
+
const user_r3 = i0.ɵɵnextContext().$implicit;
|
|
386
|
+
i0.ɵɵadvance();
|
|
387
|
+
i0.ɵɵtextInterpolate(user_r3.additionalInformation);
|
|
388
|
+
} }
|
|
389
|
+
function GroupUserSelectionDialogComponent_Conditional_17_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
390
|
+
i0.ɵɵelementStart(0, "mat-list-option", 21)(1, "span", 22);
|
|
391
|
+
i0.ɵɵtext(2);
|
|
392
|
+
i0.ɵɵelementEnd();
|
|
393
|
+
i0.ɵɵconditionalCreate(3, GroupUserSelectionDialogComponent_Conditional_17_For_2_Conditional_3_Template, 2, 1, "span", 23);
|
|
394
|
+
i0.ɵɵelementEnd();
|
|
384
395
|
} if (rf & 2) {
|
|
385
396
|
const user_r3 = ctx.$implicit;
|
|
386
397
|
const ɵ$index_37_r4 = ctx.$index;
|
|
387
398
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
388
399
|
i0.ɵɵclassProp("result-item--even", ɵ$index_37_r4 % 2 === 1);
|
|
389
400
|
i0.ɵɵproperty("value", user_r3)("selected", ctx_r1.selectedUserIds().has(user_r3.id));
|
|
401
|
+
i0.ɵɵadvance(2);
|
|
402
|
+
i0.ɵɵtextInterpolate(user_r3.fullName);
|
|
390
403
|
i0.ɵɵadvance();
|
|
391
|
-
i0.ɵɵ
|
|
404
|
+
i0.ɵɵconditional(user_r3.additionalInformation ? 3 : -1);
|
|
392
405
|
} }
|
|
393
406
|
function GroupUserSelectionDialogComponent_Conditional_17_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
394
407
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
395
|
-
i0.ɵɵelementStart(0, "cauca-list-paginator",
|
|
408
|
+
i0.ɵɵelementStart(0, "cauca-list-paginator", 24, 0);
|
|
396
409
|
i0.ɵɵlistener("pageChange", function GroupUserSelectionDialogComponent_Conditional_17_Conditional_3_Template_cauca_list_paginator_pageChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onPageChange($event)); });
|
|
397
410
|
i0.ɵɵelementEnd();
|
|
398
411
|
} if (rf & 2) {
|
|
@@ -403,7 +416,7 @@ function GroupUserSelectionDialogComponent_Conditional_17_Template(rf, ctx) { if
|
|
|
403
416
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
404
417
|
i0.ɵɵelementStart(0, "mat-selection-list", 18);
|
|
405
418
|
i0.ɵɵlistener("selectionChange", function GroupUserSelectionDialogComponent_Conditional_17_Template_mat_selection_list_selectionChange_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectionChange($event)); });
|
|
406
|
-
i0.ɵɵrepeaterCreate(1, GroupUserSelectionDialogComponent_Conditional_17_For_2_Template,
|
|
419
|
+
i0.ɵɵrepeaterCreate(1, GroupUserSelectionDialogComponent_Conditional_17_For_2_Template, 4, 6, "mat-list-option", 19, _forTrack0$2);
|
|
407
420
|
i0.ɵɵelementEnd();
|
|
408
421
|
i0.ɵɵconditionalCreate(3, GroupUserSelectionDialogComponent_Conditional_17_Conditional_3_Template, 2, 2, "cauca-list-paginator", 20);
|
|
409
422
|
} if (rf & 2) {
|
|
@@ -428,17 +441,23 @@ class GroupUserSelectionDialogComponent {
|
|
|
428
441
|
this.MIN_SEARCH_LENGTH = 3;
|
|
429
442
|
this.PAGE_SIZE = 10;
|
|
430
443
|
this.data = inject(MAT_DIALOG_DATA);
|
|
431
|
-
this.searchTerm = signal('',
|
|
432
|
-
|
|
433
|
-
this.
|
|
434
|
-
|
|
435
|
-
this.
|
|
444
|
+
this.searchTerm = signal('', /* @ts-ignore */
|
|
445
|
+
...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
|
|
446
|
+
this.selectedUsers = signal([], /* @ts-ignore */
|
|
447
|
+
...(ngDevMode ? [{ debugName: "selectedUsers" }] : /* istanbul ignore next */ []));
|
|
448
|
+
this.currentPage = signal(1, /* @ts-ignore */
|
|
449
|
+
...(ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []));
|
|
450
|
+
this.paginator = viewChild('resultPaginator', /* @ts-ignore */
|
|
451
|
+
...(ngDevMode ? [{ debugName: "paginator" }] : /* istanbul ignore next */ []));
|
|
452
|
+
this.selectedUserIds = computed(() => new Set(this.selectedUsers().map(u => u.id)), /* @ts-ignore */
|
|
453
|
+
...(ngDevMode ? [{ debugName: "selectedUserIds" }] : /* istanbul ignore next */ []));
|
|
436
454
|
this.selectedUsersLabel = computed(() => [...this.selectedUsers()]
|
|
437
455
|
.sort((a, b) => toLowerCaseAndWithoutDiacritics(a.fullName).localeCompare(toLowerCaseAndWithoutDiacritics(b.fullName)))
|
|
438
456
|
.map(u => u.fullName)
|
|
439
|
-
.join(', '),
|
|
457
|
+
.join(', '), /* @ts-ignore */
|
|
458
|
+
...(ngDevMode ? [{ debugName: "selectedUsersLabel" }] : /* istanbul ignore next */ []));
|
|
440
459
|
this.debouncedSearch = toSignal(toObservable(this.searchTerm).pipe(debounceTime(300)), { initialValue: '' });
|
|
441
|
-
this.searchResource = resource({ ...(ngDevMode ? { debugName: "searchResource" } : {}), params: computed(() => ({ query: this.debouncedSearch(), page: this.currentPage() })),
|
|
460
|
+
this.searchResource = resource({ ...(ngDevMode ? { debugName: "searchResource" } : /* istanbul ignore next */ {}), params: computed(() => ({ query: this.debouncedSearch(), page: this.currentPage() })),
|
|
442
461
|
loader: ({ params }) => {
|
|
443
462
|
if (params.query.length < this.MIN_SEARCH_LENGTH) {
|
|
444
463
|
return Promise.resolve({ items: [], totalCount: 0 });
|
|
@@ -446,9 +465,12 @@ class GroupUserSelectionDialogComponent {
|
|
|
446
465
|
const skip = (params.page - 1) * this.PAGE_SIZE;
|
|
447
466
|
return this.userSearchService.search(params.query, this.data.currentUserIds, skip, this.PAGE_SIZE);
|
|
448
467
|
} });
|
|
449
|
-
this.results = computed(() => this.lastResult().items,
|
|
450
|
-
|
|
451
|
-
this.
|
|
468
|
+
this.results = computed(() => this.lastResult().items, /* @ts-ignore */
|
|
469
|
+
...(ngDevMode ? [{ debugName: "results" }] : /* istanbul ignore next */ []));
|
|
470
|
+
this.totalCount = computed(() => this.lastResult().totalCount, /* @ts-ignore */
|
|
471
|
+
...(ngDevMode ? [{ debugName: "totalCount" }] : /* istanbul ignore next */ []));
|
|
472
|
+
this.lastResult = signal({ items: [], totalCount: 0 }, /* @ts-ignore */
|
|
473
|
+
...(ngDevMode ? [{ debugName: "lastResult" }] : /* istanbul ignore next */ []));
|
|
452
474
|
this.dialogRef = inject((MatDialogRef));
|
|
453
475
|
this.userSearchService = inject(UserSearchService);
|
|
454
476
|
this.compareUserById = (a, b) => a?.id === b?.id;
|
|
@@ -471,7 +493,7 @@ class GroupUserSelectionDialogComponent {
|
|
|
471
493
|
this.dialogRef.close();
|
|
472
494
|
}
|
|
473
495
|
toggleUser(user) {
|
|
474
|
-
const groupUser = { id: user.id, fullName: user.fullName };
|
|
496
|
+
const groupUser = { id: user.id, fullName: user.fullName, additionalInformation: user.additionalInformation };
|
|
475
497
|
if (this.selectedUserIds().has(user.id)) {
|
|
476
498
|
this.selectedUsers.update(current => current.filter(u => u.id !== user.id));
|
|
477
499
|
}
|
|
@@ -498,7 +520,7 @@ class GroupUserSelectionDialogComponent {
|
|
|
498
520
|
i0.ɵɵviewQuerySignal(ctx.paginator, _c0$2, 5);
|
|
499
521
|
} if (rf & 2) {
|
|
500
522
|
i0.ɵɵqueryAdvance();
|
|
501
|
-
} }, features: [i0.ɵɵProvidersFeature([UserSearchService, LoadingStateService])], decls: 28, vars: 15, consts: [["resultPaginator", ""], ["mat-dialog-title", ""], [1, "h6"], ["id", "closeButton", "icon", "close", 3, "buttonClick"], [1, "dialog-content"], ["subscriptSizing", "dynamic", 1, "search-field"], ["matInput", "", "type", "text", 3, "input", "value"], ["matSuffix", ""], [1, "search-hint", "body2"], [1, "results-region"], [3, "retryRequest"], [1, "no-results", "body2"], [1, "dialog-actions"], [1, "selected-users-panel"], [1, "selected-users-label", "caption"], [1, "selected-users-names", "body2", 3, "matTooltip"], ["color", "primary", "label", "cancel", 3, "buttonClick"], ["color", "primary", "label", "ok", 3, "buttonClick", "isDisabled"], [1, "results-list", 3, "selectionChange", "compareWith"], ["color", "primary", 1, "result-item", 3, "value", "selected", "result-item--even"], [3, "itemsCount", "pageSize"], ["color", "primary", 1, "result-item", 3, "value", "selected"], [3, "pageChange", "itemsCount", "pageSize"]], template: function GroupUserSelectionDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
523
|
+
} }, features: [i0.ɵɵProvidersFeature([UserSearchService, LoadingStateService])], decls: 28, vars: 15, consts: [["resultPaginator", ""], ["mat-dialog-title", ""], [1, "h6"], ["id", "closeButton", "icon", "close", 3, "buttonClick"], [1, "dialog-content"], ["subscriptSizing", "dynamic", 1, "search-field"], ["matInput", "", "type", "text", 3, "input", "value"], ["matSuffix", ""], [1, "search-hint", "body2"], [1, "results-region"], [3, "retryRequest"], [1, "no-results", "body2"], [1, "dialog-actions"], [1, "selected-users-panel"], [1, "selected-users-label", "caption"], [1, "selected-users-names", "body2", 3, "matTooltip"], ["color", "primary", "label", "cancel", 3, "buttonClick"], ["color", "primary", "label", "ok", 3, "buttonClick", "isDisabled"], [1, "results-list", 3, "selectionChange", "compareWith"], ["color", "primary", 1, "result-item", 3, "value", "selected", "result-item--even"], [3, "itemsCount", "pageSize"], ["color", "primary", 1, "result-item", 3, "value", "selected"], ["matListItemTitle", ""], ["matListItemSubtitle", ""], [3, "pageChange", "itemsCount", "pageSize"]], template: function GroupUserSelectionDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
502
524
|
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
|
|
503
525
|
i0.ɵɵtext(2);
|
|
504
526
|
i0.ɵɵpipe(3, "translate");
|
|
@@ -543,7 +565,7 @@ class GroupUserSelectionDialogComponent {
|
|
|
543
565
|
i0.ɵɵadvance(2);
|
|
544
566
|
i0.ɵɵproperty("value", ctx.searchTerm());
|
|
545
567
|
i0.ɵɵadvance(3);
|
|
546
|
-
i0.ɵɵconditional(ctx.searchTerm().length
|
|
568
|
+
i0.ɵɵconditional(ctx.searchTerm().length >= 0 && ctx.searchTerm().length < ctx.MIN_SEARCH_LENGTH ? 13 : -1);
|
|
547
569
|
i0.ɵɵadvance(3);
|
|
548
570
|
i0.ɵɵconditional(ctx.searchResource.isLoading() && !ctx.results().length ? 16 : ctx.results().length ? 17 : !ctx.searchResource.isLoading() && ctx.totalCount() === 0 && ctx.debouncedSearch().length >= ctx.MIN_SEARCH_LENGTH ? 18 : -1);
|
|
549
571
|
i0.ɵɵadvance(6);
|
|
@@ -554,14 +576,14 @@ class GroupUserSelectionDialogComponent {
|
|
|
554
576
|
i0.ɵɵtextInterpolate(ctx.selectedUsersLabel());
|
|
555
577
|
i0.ɵɵadvance(2);
|
|
556
578
|
i0.ɵɵproperty("isDisabled", ctx.selectedUsers().length === 0);
|
|
557
|
-
} }, dependencies: [MatDialogModule, i1$1.MatDialogTitle, i1$1.MatDialogActions, i1$1.MatDialogContent, MatFormFieldModule, i1$2.MatFormField, i1$2.MatLabel, i1$2.MatSuffix, MatInputModule, i2.MatInput, MatIconModule, i4.MatIcon, MatListModule, i4$1.MatSelectionList, i4$1.MatListOption, FormsModule,
|
|
579
|
+
} }, dependencies: [MatDialogModule, i1$1.MatDialogTitle, i1$1.MatDialogActions, i1$1.MatDialogContent, MatFormFieldModule, i1$2.MatFormField, i1$2.MatLabel, i1$2.MatSuffix, MatInputModule, i2.MatInput, MatIconModule, i4.MatIcon, MatListModule, i4$1.MatSelectionList, i4$1.MatListOption, i4$1.MatListItemTitle, FormsModule,
|
|
558
580
|
LoadingSpinnerIndicatorComponent,
|
|
559
581
|
LoadingErrorComponent,
|
|
560
582
|
StrokedButtonComponent,
|
|
561
583
|
RaisedButtonComponent,
|
|
562
584
|
ListPaginatorComponent,
|
|
563
585
|
MatTooltipModule, i6.MatTooltip, IconButtonComponent,
|
|
564
|
-
TranslatePipe], styles: [".dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center}[mat-dialog-title][_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child{flex:1}.search-field[_ngcontent-%COMP%]{margin-top:16px;width:100%;margin-bottom:8px}.search-hint[_ngcontent-%COMP%], .no-results[_ngcontent-%COMP%]{padding:8px 0;color:#0000008a}.results-region[_ngcontent-%COMP%]{height:360px;overflow:hidden;display:flex;flex-direction:column}.results-list[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;padding:0;max-height:400px;border:1px solid rgba(0,0,0,.23);border-radius:4px}.result-item[_ngcontent-%COMP%]{cursor:pointer}mat-list-option[_ngcontent-%COMP%]{margin-bottom:0}mat-list-option[_ngcontent-%COMP%]:nth-child(odd){background-color:#0000000d}mat-list-option[_ngcontent-%COMP%]:hover{transition:all ease-in-out .1s;background-color:#00000012}.dialog-actions[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.selected-users-panel[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.selected-users-label[_ngcontent-%COMP%]{color:#0000008a;font-weight:500}.selected-users-names[_ngcontent-%COMP%]{color:#000000de;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]
|
|
586
|
+
TranslatePipe], styles: [".dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center}[mat-dialog-title][_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child{flex:1}.search-field[_ngcontent-%COMP%]{margin-top:16px;width:100%;margin-bottom:8px}.search-hint[_ngcontent-%COMP%], .no-results[_ngcontent-%COMP%]{padding:8px 0;color:#0000008a}.results-region[_ngcontent-%COMP%]{height:360px;overflow:hidden;display:flex;flex-direction:column}.results-list[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;padding:0;max-height:400px;border:1px solid rgba(0,0,0,.23);border-radius:4px}.result-item[_ngcontent-%COMP%]{cursor:pointer}mat-list-option[_ngcontent-%COMP%]{margin-bottom:0}mat-list-option[_ngcontent-%COMP%]:nth-child(odd){background-color:#0000000d}mat-list-option[_ngcontent-%COMP%]:hover{transition:all ease-in-out .1s;background-color:#00000012}.dialog-actions[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.selected-users-panel[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.selected-users-label[_ngcontent-%COMP%]{color:#0000008a;font-weight:500}.selected-users-names[_ngcontent-%COMP%]{color:#000000de;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"] }); }
|
|
565
587
|
}
|
|
566
588
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GroupUserSelectionDialogComponent, [{
|
|
567
589
|
type: Component,
|
|
@@ -580,12 +602,21 @@ class GroupUserSelectionDialogComponent {
|
|
|
580
602
|
ListPaginatorComponent,
|
|
581
603
|
MatTooltipModule,
|
|
582
604
|
IconButtonComponent,
|
|
583
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [UserSearchService, LoadingStateService], template: "<div mat-dialog-title>\n <div class=\"h6\">{{ 'groupEdition.userSelectionTitle' | translate }}</div>\n <cauca-icon-button id=\"closeButton\" (buttonClick)=\"closeClick()\" icon=\"close\" />\n</div>\n\n<mat-dialog-content class=\"dialog-content\">\n <mat-form-field subscriptSizing=\"dynamic\" class=\"search-field\">\n <mat-label>{{ 'groupEdition.searchUserPlaceholder' | translate }}</mat-label>\n <input matInput type=\"text\" [value]=\"searchTerm()\" (input)=\"searchTerm.set($any($event.target).value)\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n\n @if (searchTerm().length
|
|
605
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [UserSearchService, LoadingStateService], template: "<div mat-dialog-title>\n <div class=\"h6\">{{ 'groupEdition.userSelectionTitle' | translate }}</div>\n <cauca-icon-button id=\"closeButton\" (buttonClick)=\"closeClick()\" icon=\"close\" />\n</div>\n\n<mat-dialog-content class=\"dialog-content\">\n <mat-form-field subscriptSizing=\"dynamic\" class=\"search-field\">\n <mat-label>{{ 'groupEdition.searchUserPlaceholder' | translate }}</mat-label>\n <input matInput type=\"text\" [value]=\"searchTerm()\" (input)=\"searchTerm.set($any($event.target).value)\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n\n @if (searchTerm().length >= 0 && searchTerm().length < MIN_SEARCH_LENGTH) {\n <div class=\"search-hint body2\">{{ 'groupEdition.searchMinChars' | translate }}</div>\n }\n\n <div class=\"results-region\">\n <cauca-loading-error (retryRequest)=\"searchResource.reload()\" />\n\n @if (searchResource.isLoading() && !results().length) {\n <cauca-loading-spinner-indicator />\n } @else if (results().length) {\n <mat-selection-list class=\"results-list\" [compareWith]=\"compareUserById\" (selectionChange)=\"onSelectionChange($event)\">\n @for (user of results(); track user.id; let i = $index) {\n <mat-list-option\n [value]=\"user\"\n [selected]=\"selectedUserIds().has(user.id)\"\n color=\"primary\"\n class=\"result-item\"\n [class.result-item--even]=\"i % 2 === 1\">\n <span matListItemTitle>{{ user.fullName }}</span>\n @if (user.additionalInformation) {\n <span matListItemSubtitle>{{ user.additionalInformation }}</span>\n }\n </mat-list-option>\n }\n </mat-selection-list>\n\n @if (totalCount() > PAGE_SIZE) {\n <cauca-list-paginator\n #resultPaginator\n [itemsCount]=\"totalCount()\"\n [pageSize]=\"PAGE_SIZE\"\n (pageChange)=\"onPageChange($event)\" />\n }\n } @else if (!searchResource.isLoading() && totalCount() === 0 && debouncedSearch().length >= MIN_SEARCH_LENGTH) {\n <div class=\"no-results body2\">{{ 'noResult' | translate }}</div>\n }\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"dialog-actions\">\n <div class=\"selected-users-panel\">\n <span class=\"selected-users-label caption\">{{ 'groupEdition.selectedUsersLabel' | translate }}</span>\n <div class=\"selected-users-names body2\" [matTooltip]=\"selectedUsersLabel()\">{{ selectedUsersLabel() }}</div>\n </div>\n <cauca-stroked-button color=\"primary\" label=\"cancel\" (buttonClick)=\"cancel()\" />\n <cauca-raised-button\n color=\"primary\"\n label=\"ok\"\n [isDisabled]=\"selectedUsers().length === 0\"\n (buttonClick)=\"confirm()\" />\n</mat-dialog-actions>\n", styles: [".dialog-content{display:flex;flex-direction:column;gap:16px}[mat-dialog-title]{display:flex;align-items:center}[mat-dialog-title] div:first-child{flex:1}.search-field{margin-top:16px;width:100%;margin-bottom:8px}.search-hint,.no-results{padding:8px 0;color:#0000008a}.results-region{height:360px;overflow:hidden;display:flex;flex-direction:column}.results-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding:0;max-height:400px;border:1px solid rgba(0,0,0,.23);border-radius:4px}.result-item{cursor:pointer}mat-list-option{margin-bottom:0}mat-list-option:nth-child(odd){background-color:#0000000d}mat-list-option:hover{transition:all ease-in-out .1s;background-color:#00000012}.dialog-actions{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.selected-users-panel{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.selected-users-label{color:#0000008a;font-weight:500}.selected-users-names{color:#000000de;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"] }]
|
|
584
606
|
}], () => [], { paginator: [{ type: i0.ViewChild, args: ['resultPaginator', { isSignal: true }] }] }); })();
|
|
585
607
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GroupUserSelectionDialogComponent, { className: "GroupUserSelectionDialogComponent", filePath: "lib/components/group-user-selection-dialog/group-user-selection-dialog.component.ts", lineNumber: 46 }); })();
|
|
586
608
|
|
|
587
609
|
const _c0$1 = ["paginator"];
|
|
588
610
|
const _forTrack0$1 = ($index, $item) => $item.id;
|
|
611
|
+
function GroupUserEditionListComponent_For_10_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
612
|
+
i0.ɵɵelementStart(0, "div", 11);
|
|
613
|
+
i0.ɵɵtext(1);
|
|
614
|
+
i0.ɵɵelementEnd();
|
|
615
|
+
} if (rf & 2) {
|
|
616
|
+
const user_r3 = i0.ɵɵnextContext().$implicit;
|
|
617
|
+
i0.ɵɵadvance();
|
|
618
|
+
i0.ɵɵtextInterpolate(user_r3.additionalInformation);
|
|
619
|
+
} }
|
|
589
620
|
function GroupUserEditionListComponent_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
590
621
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
591
622
|
i0.ɵɵelementStart(0, "mat-list-item", 6)(1, "mat-icon", 9);
|
|
@@ -594,19 +625,22 @@ function GroupUserEditionListComponent_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
594
625
|
i0.ɵɵelementStart(3, "div", 10);
|
|
595
626
|
i0.ɵɵtext(4);
|
|
596
627
|
i0.ɵɵelementEnd();
|
|
597
|
-
i0.ɵɵ
|
|
598
|
-
i0.ɵɵ
|
|
599
|
-
i0.ɵɵ
|
|
628
|
+
i0.ɵɵconditionalCreate(5, GroupUserEditionListComponent_For_10_Conditional_5_Template, 2, 1, "div", 11);
|
|
629
|
+
i0.ɵɵelementStart(6, "cauca-icon-button", 12);
|
|
630
|
+
i0.ɵɵpipe(7, "translate");
|
|
631
|
+
i0.ɵɵlistener("buttonClick", function GroupUserEditionListComponent_For_10_Template_cauca_icon_button_buttonClick_6_listener() { const user_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.removeUser(user_r3)); });
|
|
600
632
|
i0.ɵɵelementEnd()();
|
|
601
633
|
} if (rf & 2) {
|
|
602
634
|
const user_r3 = ctx.$implicit;
|
|
603
635
|
i0.ɵɵadvance(4);
|
|
604
636
|
i0.ɵɵtextInterpolate(user_r3.fullName);
|
|
605
637
|
i0.ɵɵadvance();
|
|
606
|
-
i0.ɵɵ
|
|
638
|
+
i0.ɵɵconditional(user_r3.additionalInformation ? 5 : -1);
|
|
639
|
+
i0.ɵɵadvance();
|
|
640
|
+
i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(7, 3, "groupEdition.removeUserLabel"));
|
|
607
641
|
} }
|
|
608
642
|
function GroupUserEditionListComponent_ForEmpty_11_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
609
|
-
i0.ɵɵelementStart(0, "div",
|
|
643
|
+
i0.ɵɵelementStart(0, "div", 13);
|
|
610
644
|
i0.ɵɵtext(1);
|
|
611
645
|
i0.ɵɵpipe(2, "translate");
|
|
612
646
|
i0.ɵɵelementEnd();
|
|
@@ -615,7 +649,7 @@ function GroupUserEditionListComponent_ForEmpty_11_Conditional_0_Template(rf, ct
|
|
|
615
649
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "groupEdition.noFilteredUsers"));
|
|
616
650
|
} }
|
|
617
651
|
function GroupUserEditionListComponent_ForEmpty_11_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
618
|
-
i0.ɵɵelementStart(0, "div",
|
|
652
|
+
i0.ɵɵelementStart(0, "div", 13);
|
|
619
653
|
i0.ɵɵtext(1);
|
|
620
654
|
i0.ɵɵpipe(2, "translate");
|
|
621
655
|
i0.ɵɵelementEnd();
|
|
@@ -624,14 +658,14 @@ function GroupUserEditionListComponent_ForEmpty_11_Conditional_1_Template(rf, ct
|
|
|
624
658
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "groupEdition.noUsers"));
|
|
625
659
|
} }
|
|
626
660
|
function GroupUserEditionListComponent_ForEmpty_11_Template(rf, ctx) { if (rf & 1) {
|
|
627
|
-
i0.ɵɵconditionalCreate(0, GroupUserEditionListComponent_ForEmpty_11_Conditional_0_Template, 3, 3, "div",
|
|
661
|
+
i0.ɵɵconditionalCreate(0, GroupUserEditionListComponent_ForEmpty_11_Conditional_0_Template, 3, 3, "div", 13)(1, GroupUserEditionListComponent_ForEmpty_11_Conditional_1_Template, 3, 3, "div", 13);
|
|
628
662
|
} if (rf & 2) {
|
|
629
663
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
630
664
|
i0.ɵɵconditional(ctx_r0.filterTerm() ? 0 : 1);
|
|
631
665
|
} }
|
|
632
666
|
function GroupUserEditionListComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
633
667
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
634
|
-
i0.ɵɵelementStart(0, "cauca-list-paginator",
|
|
668
|
+
i0.ɵɵelementStart(0, "cauca-list-paginator", 14, 0);
|
|
635
669
|
i0.ɵɵlistener("pageChange", function GroupUserEditionListComponent_Conditional_12_Template_cauca_list_paginator_pageChange_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onPageChange($event)); });
|
|
636
670
|
i0.ɵɵelementEnd();
|
|
637
671
|
} if (rf & 2) {
|
|
@@ -641,20 +675,26 @@ function GroupUserEditionListComponent_Conditional_12_Template(rf, ctx) { if (rf
|
|
|
641
675
|
class GroupUserEditionListComponent {
|
|
642
676
|
constructor() {
|
|
643
677
|
this.PAGE_SIZE = 10;
|
|
644
|
-
this.currentPage = signal(1,
|
|
645
|
-
|
|
646
|
-
this.
|
|
647
|
-
|
|
678
|
+
this.currentPage = signal(1, /* @ts-ignore */
|
|
679
|
+
...(ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []));
|
|
680
|
+
this.filterTerm = signal('', /* @ts-ignore */
|
|
681
|
+
...(ngDevMode ? [{ debugName: "filterTerm" }] : /* istanbul ignore next */ []));
|
|
682
|
+
this.paginator = viewChild('paginator', /* @ts-ignore */
|
|
683
|
+
...(ngDevMode ? [{ debugName: "paginator" }] : /* istanbul ignore next */ []));
|
|
684
|
+
this.sortedUsers = computed(() => [...this.state.users()].sort((a, b) => toLowerCaseAndWithoutDiacritics(a.fullName).localeCompare(toLowerCaseAndWithoutDiacritics(b.fullName))), /* @ts-ignore */
|
|
685
|
+
...(ngDevMode ? [{ debugName: "sortedUsers" }] : /* istanbul ignore next */ []));
|
|
648
686
|
this.filteredUsers = computed(() => {
|
|
649
687
|
const term = toLowerCaseAndWithoutDiacritics(this.filterTerm());
|
|
650
688
|
if (!term)
|
|
651
689
|
return this.sortedUsers();
|
|
652
690
|
return this.sortedUsers().filter(u => toLowerCaseAndWithoutDiacritics(u.fullName).includes(term));
|
|
653
|
-
},
|
|
691
|
+
}, /* @ts-ignore */
|
|
692
|
+
...(ngDevMode ? [{ debugName: "filteredUsers" }] : /* istanbul ignore next */ []));
|
|
654
693
|
this.pagedUsers = computed(() => {
|
|
655
694
|
const start = (this.currentPage() - 1) * this.PAGE_SIZE;
|
|
656
695
|
return this.filteredUsers().slice(start, start + this.PAGE_SIZE);
|
|
657
|
-
},
|
|
696
|
+
}, /* @ts-ignore */
|
|
697
|
+
...(ngDevMode ? [{ debugName: "pagedUsers" }] : /* istanbul ignore next */ []));
|
|
658
698
|
this.state = inject(GroupEditionStateService);
|
|
659
699
|
this.dialogService = inject(DialogService);
|
|
660
700
|
this.dialog = inject(MatDialog);
|
|
@@ -705,7 +745,7 @@ class GroupUserEditionListComponent {
|
|
|
705
745
|
i0.ɵɵviewQuerySignal(ctx.paginator, _c0$1, 5);
|
|
706
746
|
} if (rf & 2) {
|
|
707
747
|
i0.ɵɵqueryAdvance();
|
|
708
|
-
} }, features: [i0.ɵɵProvidersFeature([DialogService])], decls: 14, vars: 6, consts: [["paginator", ""], [1, "user-edition-list"], ["subscriptSizing", "dynamic", 1, "filter-field"], ["matInput", "", "type", "text", 3, "input", "value"], ["matSuffix", ""], [1, "users-list"], [1, "user-item"], [3, "itemsCount", "pageSize"], ["color", "primary", "label", "groupEdition.addUsersButton", 1, "add-users-button", 3, "buttonClick"], ["matListItemIcon", ""], ["matListItemTitle", "", 1, "user-name"], ["matListItemMeta", "", "icon", "delete", "color", "error", 1, "delete-button", 3, "buttonClick"], [1, "no-users", "body2"], [3, "pageChange", "itemsCount", "pageSize"]], template: function GroupUserEditionListComponent_Template(rf, ctx) { if (rf & 1) {
|
|
748
|
+
} }, features: [i0.ɵɵProvidersFeature([DialogService])], decls: 14, vars: 6, consts: [["paginator", ""], [1, "user-edition-list"], ["subscriptSizing", "dynamic", 1, "filter-field"], ["matInput", "", "type", "text", 3, "input", "value"], ["matSuffix", ""], [1, "users-list"], [1, "user-item"], [3, "itemsCount", "pageSize"], ["color", "primary", "label", "groupEdition.addUsersButton", 1, "add-users-button", 3, "buttonClick"], ["matListItemIcon", ""], ["matListItemTitle", "", 1, "user-name"], ["matListItemLine", "", 1, "user-additional-information"], ["matListItemMeta", "", "icon", "delete", "color", "error", 1, "delete-button", 3, "buttonClick"], [1, "no-users", "body2"], [3, "pageChange", "itemsCount", "pageSize"]], template: function GroupUserEditionListComponent_Template(rf, ctx) { if (rf & 1) {
|
|
709
749
|
i0.ɵɵelementStart(0, "div", 1)(1, "mat-form-field", 2)(2, "mat-label");
|
|
710
750
|
i0.ɵɵtext(3);
|
|
711
751
|
i0.ɵɵpipe(4, "translate");
|
|
@@ -717,7 +757,7 @@ class GroupUserEditionListComponent {
|
|
|
717
757
|
i0.ɵɵtext(7, "search");
|
|
718
758
|
i0.ɵɵelementEnd()();
|
|
719
759
|
i0.ɵɵelementStart(8, "mat-list", 5);
|
|
720
|
-
i0.ɵɵrepeaterCreate(9, GroupUserEditionListComponent_For_10_Template,
|
|
760
|
+
i0.ɵɵrepeaterCreate(9, GroupUserEditionListComponent_For_10_Template, 8, 5, "mat-list-item", 6, _forTrack0$1, false, GroupUserEditionListComponent_ForEmpty_11_Template, 2, 1);
|
|
721
761
|
i0.ɵɵelementEnd();
|
|
722
762
|
i0.ɵɵconditionalCreate(12, GroupUserEditionListComponent_Conditional_12_Template, 2, 2, "cauca-list-paginator", 7);
|
|
723
763
|
i0.ɵɵelementStart(13, "cauca-raised-button", 8);
|
|
@@ -732,11 +772,11 @@ class GroupUserEditionListComponent {
|
|
|
732
772
|
i0.ɵɵrepeater(ctx.pagedUsers());
|
|
733
773
|
i0.ɵɵadvance(3);
|
|
734
774
|
i0.ɵɵconditional(ctx.filteredUsers().length > ctx.PAGE_SIZE ? 12 : -1);
|
|
735
|
-
} }, dependencies: [IconButtonComponent, RaisedButtonComponent, ListPaginatorComponent, MatFormFieldModule, i1$2.MatFormField, i1$2.MatLabel, i1$2.MatSuffix, MatInputModule, i2.MatInput, MatIconModule, i4.MatIcon, FormsModule, MatListModule, i4$1.MatList, i4$1.MatListItem, i4$1.MatListItemIcon, i4$1.MatListItemTitle, i4$1.MatListItemMeta, TranslatePipe], styles: [".user-edition-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.add-users-button[_ngcontent-%COMP%]{align-self:flex-end}.users-list[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.23);border-radius:4px;padding:0;max-height:400px;overflow-y:auto}mat-list-item[_ngcontent-%COMP%]{margin-bottom:0}.filter-field[_ngcontent-%COMP%]{width:100%}.user-item[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12)}.user-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:32px 16px;text-align:center;color:#0009}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;margin-bottom:16px;opacity:.6}.empty-state[_ngcontent-%COMP%] .empty-message[_ngcontent-%COMP%]{margin:0;font-size:14px}.add-button-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:16px}.no-users[_ngcontent-%COMP%]{padding:16px 0;color:#00000061;text-align:center}mat-list-item[_ngcontent-%COMP%]:nth-child(odd){background-color:#0000000d}mat-list-item[_ngcontent-%COMP%]:hover{transition:all ease-in-out .1s;background-color:#00000012}"]
|
|
775
|
+
} }, dependencies: [IconButtonComponent, RaisedButtonComponent, ListPaginatorComponent, MatFormFieldModule, i1$2.MatFormField, i1$2.MatLabel, i1$2.MatSuffix, MatInputModule, i2.MatInput, MatIconModule, i4.MatIcon, FormsModule, MatListModule, i4$1.MatList, i4$1.MatListItem, i4$1.MatListItemIcon, i4$1.MatListItemLine, i4$1.MatListItemTitle, i4$1.MatListItemMeta, TranslatePipe], styles: [".user-edition-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.add-users-button[_ngcontent-%COMP%]{align-self:flex-end}.users-list[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.23);border-radius:4px;padding:0;max-height:400px;overflow-y:auto}mat-list-item[_ngcontent-%COMP%]{margin-bottom:0}.filter-field[_ngcontent-%COMP%]{width:100%}.user-item[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12)}.user-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:32px 16px;text-align:center;color:#0009}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;margin-bottom:16px;opacity:.6}.empty-state[_ngcontent-%COMP%] .empty-message[_ngcontent-%COMP%]{margin:0;font-size:14px}.add-button-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:16px}.no-users[_ngcontent-%COMP%]{padding:16px 0;color:#00000061;text-align:center}mat-list-item[_ngcontent-%COMP%]:nth-child(odd){background-color:#0000000d}mat-list-item[_ngcontent-%COMP%]:hover{transition:all ease-in-out .1s;background-color:#00000012}"] }); }
|
|
736
776
|
}
|
|
737
777
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GroupUserEditionListComponent, [{
|
|
738
778
|
type: Component,
|
|
739
|
-
args: [{ selector: 'cauca-group-user-edition-list', standalone: true, imports: [TranslatePipe, IconButtonComponent, RaisedButtonComponent, ListPaginatorComponent, MatFormFieldModule, MatInputModule, MatIconModule, FormsModule, MatListModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [DialogService], template: "<div class=\"user-edition-list\">\n\n <mat-form-field subscriptSizing=\"dynamic\" class=\"filter-field\">\n <mat-label>{{ 'groupEdition.filterUsersPlaceholder' | translate }}</mat-label>\n <input matInput type=\"text\" [value]=\"filterTerm()\" (input)=\"filterTerm.set($any($event.target).value)\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n\n <mat-list class=\"users-list\">\n @for (user of pagedUsers(); track user.id) {\n <mat-list-item class=\"user-item\">\n <mat-icon matListItemIcon>person</mat-icon>\n <div matListItemTitle class=\"user-name\">{{ user.fullName }}</div>\n <cauca-icon-button\n
|
|
779
|
+
args: [{ selector: 'cauca-group-user-edition-list', standalone: true, imports: [TranslatePipe, IconButtonComponent, RaisedButtonComponent, ListPaginatorComponent, MatFormFieldModule, MatInputModule, MatIconModule, FormsModule, MatListModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [DialogService], template: "<div class=\"user-edition-list\">\n\n <mat-form-field subscriptSizing=\"dynamic\" class=\"filter-field\">\n <mat-label>{{ 'groupEdition.filterUsersPlaceholder' | translate }}</mat-label>\n <input matInput type=\"text\" [value]=\"filterTerm()\" (input)=\"filterTerm.set($any($event.target).value)\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n\n <mat-list class=\"users-list\">\n @for (user of pagedUsers(); track user.id) {\n <mat-list-item class=\"user-item\">\n <mat-icon matListItemIcon>person</mat-icon>\n <div matListItemTitle class=\"user-name\">{{ user.fullName }}</div>\n @if (user.additionalInformation) {\n <div matListItemLine class=\"user-additional-information\">{{ user.additionalInformation }}</div>\n }\n <cauca-icon-button\n matListItemMeta\n class=\"delete-button\"\n icon=\"delete\"\n color=\"error\"\n (buttonClick)=\"removeUser(user)\"\n [attr.aria-label]=\"'groupEdition.removeUserLabel' | translate\" />\n </mat-list-item>\n } @empty {\n @if (filterTerm()) {\n <div class=\"no-users body2\">{{ 'groupEdition.noFilteredUsers' | translate }}</div>\n } @else {\n <div class=\"no-users body2\">{{ 'groupEdition.noUsers' | translate }}</div>\n }\n }\n </mat-list>\n\n @if (filteredUsers().length > PAGE_SIZE) {\n <cauca-list-paginator\n #paginator\n [itemsCount]=\"filteredUsers().length\"\n [pageSize]=\"PAGE_SIZE\"\n (pageChange)=\"onPageChange($event)\" />\n }\n\n <cauca-raised-button\n class=\"add-users-button\"\n color=\"primary\"\n label=\"groupEdition.addUsersButton\"\n (buttonClick)=\"openAddUsersDialog()\" />\n</div>\n", styles: [".user-edition-list{display:flex;flex-direction:column;gap:16px}.add-users-button{align-self:flex-end}.users-list{border:1px solid rgba(0,0,0,.23);border-radius:4px;padding:0;max-height:400px;overflow-y:auto}mat-list-item{margin-bottom:0}.filter-field{width:100%}.user-item{border-bottom:1px solid rgba(0,0,0,.12)}.user-item:last-child{border-bottom:none}.empty-state{display:flex;flex-direction:column;align-items:center;padding:32px 16px;text-align:center;color:#0009}.empty-state .empty-icon{font-size:48px;width:48px;height:48px;margin-bottom:16px;opacity:.6}.empty-state .empty-message{margin:0;font-size:14px}.add-button-container{display:flex;justify-content:flex-end;margin-top:16px}.no-users{padding:16px 0;color:#00000061;text-align:center}mat-list-item:nth-child(odd){background-color:#0000000d}mat-list-item:hover{transition:all ease-in-out .1s;background-color:#00000012}\n"] }]
|
|
740
780
|
}], () => [], { paginator: [{ type: i0.ViewChild, args: ['paginator', { isSignal: true }] }] }); })();
|
|
741
781
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GroupUserEditionListComponent, { className: "GroupUserEditionListComponent", filePath: "lib/components/group-user-edition-list/group-user-edition-list.component.ts", lineNumber: 24 }); })();
|
|
742
782
|
|
|
@@ -818,10 +858,13 @@ function GroupPermissionListComponent_ForEmpty_10_Template(rf, ctx) { if (rf & 1
|
|
|
818
858
|
} }
|
|
819
859
|
class GroupPermissionListComponent {
|
|
820
860
|
constructor() {
|
|
821
|
-
this.searchText = model('',
|
|
822
|
-
|
|
861
|
+
this.searchText = model('', /* @ts-ignore */
|
|
862
|
+
...(ngDevMode ? [{ debugName: "searchText" }] : /* istanbul ignore next */ []));
|
|
863
|
+
this.currentPermissions = signal([], /* @ts-ignore */
|
|
864
|
+
...(ngDevMode ? [{ debugName: "currentPermissions" }] : /* istanbul ignore next */ []));
|
|
823
865
|
this.filteredPermissionsValues = computed(() => this.currentPermissions()?.filter((permission) => toLowerCaseAndWithoutDiacritics(permission.name)
|
|
824
|
-
.includes(toLowerCaseAndWithoutDiacritics(this.searchText()))) || [],
|
|
866
|
+
.includes(toLowerCaseAndWithoutDiacritics(this.searchText()))) || [], /* @ts-ignore */
|
|
867
|
+
...(ngDevMode ? [{ debugName: "filteredPermissionsValues" }] : /* istanbul ignore next */ []));
|
|
825
868
|
this.service = inject(PermissionManagementService);
|
|
826
869
|
this.state = inject(GroupEditionStateService);
|
|
827
870
|
}
|
|
@@ -867,6 +910,7 @@ class GroupPermissionListComponent {
|
|
|
867
910
|
i0.ɵɵelementStart(4, "input", 1);
|
|
868
911
|
i0.ɵɵtwoWayListener("ngModelChange", function GroupPermissionListComponent_Template_input_ngModelChange_4_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.searchText, $event) || (ctx.searchText = $event); return $event; });
|
|
869
912
|
i0.ɵɵelementEnd();
|
|
913
|
+
i0.ɵɵcontrolCreate();
|
|
870
914
|
i0.ɵɵelementStart(5, "mat-icon", 2);
|
|
871
915
|
i0.ɵɵtext(6, "search");
|
|
872
916
|
i0.ɵɵelementEnd()();
|
|
@@ -878,9 +922,10 @@ class GroupPermissionListComponent {
|
|
|
878
922
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 3, "dataGrid.keywordsLabel"));
|
|
879
923
|
i0.ɵɵadvance(2);
|
|
880
924
|
i0.ɵɵtwoWayProperty("ngModel", ctx.searchText);
|
|
925
|
+
i0.ɵɵcontrol();
|
|
881
926
|
i0.ɵɵadvance(4);
|
|
882
927
|
i0.ɵɵrepeater(ctx.filteredPermissionsValues());
|
|
883
|
-
} }, dependencies: [MatListModule, i4$1.MatSelectionList, i4$1.MatListItem, MatFormField, MatLabel, MatInput, MatSuffix, FormsModule, i5.DefaultValueAccessor, i5.NgControlStatus, i5.NgModel, MatIcon, MatCheckboxModule, i3.MatCheckbox, TranslatePipe], styles: ["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:16px}#permission-list[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto;border:1px solid rgba(0,0,0,.23);border-radius:4px;padding:0}.permission-item[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12)}.permission-item[_ngcontent-%COMP%]:last-child{border-bottom:none}mat-list-item[_ngcontent-%COMP%]{margin-bottom:0}.permission-checkbox[_ngcontent-%COMP%], .filter-field[_ngcontent-%COMP%]{width:100%}.no-result[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:24px 0;color:#00000061}.no-result-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;margin-bottom:8px}.no-result-text[_ngcontent-%COMP%]{text-align:center}mat-list-item[_ngcontent-%COMP%]:nth-child(odd){background-color:#0000000d}mat-list-item[_ngcontent-%COMP%]:hover{transition:all ease-in-out .1s;background-color:#00000012}"]
|
|
928
|
+
} }, dependencies: [MatListModule, i4$1.MatSelectionList, i4$1.MatListItem, MatFormField, MatLabel, MatInput, MatSuffix, FormsModule, i5.DefaultValueAccessor, i5.NgControlStatus, i5.NgModel, MatIcon, MatCheckboxModule, i3.MatCheckbox, TranslatePipe], styles: ["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:16px}#permission-list[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto;border:1px solid rgba(0,0,0,.23);border-radius:4px;padding:0}.permission-item[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12)}.permission-item[_ngcontent-%COMP%]:last-child{border-bottom:none}mat-list-item[_ngcontent-%COMP%]{margin-bottom:0}.permission-checkbox[_ngcontent-%COMP%], .filter-field[_ngcontent-%COMP%]{width:100%}.no-result[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:24px 0;color:#00000061}.no-result-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;margin-bottom:8px}.no-result-text[_ngcontent-%COMP%]{text-align:center}mat-list-item[_ngcontent-%COMP%]:nth-child(odd){background-color:#0000000d}mat-list-item[_ngcontent-%COMP%]:hover{transition:all ease-in-out .1s;background-color:#00000012}"] }); }
|
|
884
929
|
}
|
|
885
930
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GroupPermissionListComponent, [{
|
|
886
931
|
type: Component,
|
|
@@ -908,12 +953,15 @@ class GroupEditionFormComponent {
|
|
|
908
953
|
i0.ɵɵpipe(5, "translate");
|
|
909
954
|
i0.ɵɵelementEnd();
|
|
910
955
|
i0.ɵɵelement(6, "input", 3);
|
|
956
|
+
i0.ɵɵcontrolCreate();
|
|
911
957
|
i0.ɵɵconditionalCreate(7, GroupEditionFormComponent_Conditional_7_Template, 3, 3, "mat-error");
|
|
912
958
|
i0.ɵɵelementEnd();
|
|
913
959
|
i0.ɵɵelementStart(8, "mat-slide-toggle", 4);
|
|
914
960
|
i0.ɵɵtext(9);
|
|
915
961
|
i0.ɵɵpipe(10, "translate");
|
|
916
|
-
i0.ɵɵelementEnd()
|
|
962
|
+
i0.ɵɵelementEnd();
|
|
963
|
+
i0.ɵɵcontrolCreate();
|
|
964
|
+
i0.ɵɵelementEnd();
|
|
917
965
|
i0.ɵɵelement(11, "mat-divider");
|
|
918
966
|
i0.ɵɵelementStart(12, "cauca-group-container", 5);
|
|
919
967
|
i0.ɵɵelement(13, "cauca-group-user-edition-list");
|
|
@@ -926,11 +974,15 @@ class GroupEditionFormComponent {
|
|
|
926
974
|
i0.ɵɵproperty("formGroup", ctx.state.form);
|
|
927
975
|
i0.ɵɵadvance(4);
|
|
928
976
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 4, "groupEdition.nameFieldLabel"));
|
|
929
|
-
i0.ɵɵadvance(3);
|
|
930
|
-
i0.ɵɵconditional(ctx.state.form.get("name").hasError("required") ? 7 : -1);
|
|
931
977
|
i0.ɵɵadvance(2);
|
|
978
|
+
i0.ɵɵcontrol();
|
|
979
|
+
i0.ɵɵadvance();
|
|
980
|
+
i0.ɵɵconditional(ctx.state.form.get("name").hasError("required") ? 7 : -1);
|
|
981
|
+
i0.ɵɵadvance();
|
|
982
|
+
i0.ɵɵcontrol();
|
|
983
|
+
i0.ɵɵadvance();
|
|
932
984
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 6, "groupEdition.assignableByAllUsersLabel"));
|
|
933
|
-
} }, dependencies: [MatFormFieldModule, i1$2.MatFormField, i1$2.MatLabel, i1$2.MatError, MatInputModule, i2.MatInput, MatSlideToggleModule, i3$1.MatSlideToggle, MatDividerModule, i4$1.MatDivider, ReactiveFormsModule, i5.DefaultValueAccessor, i5.NgControlStatus, i5.NgControlStatusGroup, i5.RequiredValidator, i5.FormGroupDirective, i5.FormControlName, GroupContainerComponent, GroupUserEditionListComponent, GroupPermissionListComponent, TranslatePipe], styles: [".form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.row[_ngcontent-%COMP%]{display:flex;align-items:stretch;gap:16px}.row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1}"]
|
|
985
|
+
} }, dependencies: [MatFormFieldModule, i1$2.MatFormField, i1$2.MatLabel, i1$2.MatError, MatInputModule, i2.MatInput, MatSlideToggleModule, i3$1.MatSlideToggle, MatDividerModule, i4$1.MatDivider, ReactiveFormsModule, i5.DefaultValueAccessor, i5.NgControlStatus, i5.NgControlStatusGroup, i5.RequiredValidator, i5.FormGroupDirective, i5.FormControlName, GroupContainerComponent, GroupUserEditionListComponent, GroupPermissionListComponent, TranslatePipe], styles: [".form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.row[_ngcontent-%COMP%]{display:flex;align-items:stretch;gap:16px}.row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1}"] }); }
|
|
934
986
|
}
|
|
935
987
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GroupEditionFormComponent, [{
|
|
936
988
|
type: Component,
|
|
@@ -950,12 +1002,18 @@ function GroupEditionPageComponent_Conditional_6_Template(rf, ctx) { if (rf & 1)
|
|
|
950
1002
|
} }
|
|
951
1003
|
class GroupEditionPageComponent {
|
|
952
1004
|
constructor() {
|
|
953
|
-
this.id = input.required(
|
|
954
|
-
|
|
955
|
-
this.
|
|
956
|
-
|
|
957
|
-
this.
|
|
958
|
-
|
|
1005
|
+
this.id = input.required(/* @ts-ignore */
|
|
1006
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1007
|
+
this.isLoaded = signal(false, /* @ts-ignore */
|
|
1008
|
+
...(ngDevMode ? [{ debugName: "isLoaded" }] : /* istanbul ignore next */ []));
|
|
1009
|
+
this.isSaving = signal(false, /* @ts-ignore */
|
|
1010
|
+
...(ngDevMode ? [{ debugName: "isSaving" }] : /* istanbul ignore next */ []));
|
|
1011
|
+
this.showSavingError = signal(false, /* @ts-ignore */
|
|
1012
|
+
...(ngDevMode ? [{ debugName: "showSavingError" }] : /* istanbul ignore next */ []));
|
|
1013
|
+
this.title = computed(() => 'groupEdition.' + (this.id() === 'new' ? 'newGroupTitle' : 'editGroupTitle'), /* @ts-ignore */
|
|
1014
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
1015
|
+
this.currentLocation = computed(() => [{ link: this.groupsPath, title: 'menu.groups' }], /* @ts-ignore */
|
|
1016
|
+
...(ngDevMode ? [{ debugName: "currentLocation" }] : /* istanbul ignore next */ []));
|
|
959
1017
|
this.state = inject(GroupEditionStateService);
|
|
960
1018
|
this.dialog = inject(DialogService);
|
|
961
1019
|
this.router = inject(Router);
|
|
@@ -1076,7 +1134,7 @@ class GroupEditionPageComponent {
|
|
|
1076
1134
|
i0.ɵɵproperty("isDisabled", ctx.isSaving());
|
|
1077
1135
|
i0.ɵɵadvance();
|
|
1078
1136
|
i0.ɵɵproperty("isInProgress", ctx.isSaving());
|
|
1079
|
-
} }, dependencies: [PageTitleComponent, MatCardModule, i1.MatCard, i1.MatCardActions, i1.MatCardContent, LoadingSpinnerIndicatorComponent, LoadingErrorComponent, SavingErrorBoxComponent, StrokedButtonComponent, RaisedButtonComponent, GroupEditionFormComponent], styles: ["[_nghost-%COMP%]{width:100%}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}mat-card-actions[_ngcontent-%COMP%]{gap:8px}"]
|
|
1137
|
+
} }, dependencies: [PageTitleComponent, MatCardModule, i1.MatCard, i1.MatCardActions, i1.MatCardContent, LoadingSpinnerIndicatorComponent, LoadingErrorComponent, SavingErrorBoxComponent, StrokedButtonComponent, RaisedButtonComponent, GroupEditionFormComponent], styles: ["[_nghost-%COMP%]{width:100%}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}mat-card-actions[_ngcontent-%COMP%]{gap:8px}"] }); }
|
|
1080
1138
|
}
|
|
1081
1139
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GroupEditionPageComponent, [{
|
|
1082
1140
|
type: Component,
|
|
@@ -1109,21 +1167,21 @@ class CaucaManagementService {
|
|
|
1109
1167
|
|
|
1110
1168
|
class CaucaManagementComponent {
|
|
1111
1169
|
static { this.ɵfac = function CaucaManagementComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaucaManagementComponent)(); }; }
|
|
1112
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementComponent, selectors: [["cauca-management"]],
|
|
1113
|
-
i0.ɵɵ
|
|
1170
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementComponent, selectors: [["cauca-management"]], decls: 3, vars: 3, template: function CaucaManagementComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1171
|
+
i0.ɵɵdomElementStart(0, "div");
|
|
1114
1172
|
i0.ɵɵtext(1);
|
|
1115
1173
|
i0.ɵɵpipe(2, "translate");
|
|
1116
|
-
i0.ɵɵ
|
|
1174
|
+
i0.ɵɵdomElementEnd();
|
|
1117
1175
|
} if (rf & 2) {
|
|
1118
1176
|
i0.ɵɵadvance();
|
|
1119
1177
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "core.noGenericComponentOnThisLibrary"));
|
|
1120
|
-
} }, dependencies: [
|
|
1178
|
+
} }, dependencies: [TranslatePipe], encapsulation: 2 }); }
|
|
1121
1179
|
}
|
|
1122
1180
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementComponent, [{
|
|
1123
1181
|
type: Component,
|
|
1124
|
-
args: [{ selector: 'cauca-management',
|
|
1182
|
+
args: [{ selector: 'cauca-management', imports: [TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>{{'core.noGenericComponentOnThisLibrary' | translate}}</div>" }]
|
|
1125
1183
|
}], null, null); })();
|
|
1126
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaManagementComponent, { className: "CaucaManagementComponent", filePath: "lib/cauca-management.component.ts", lineNumber:
|
|
1184
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaManagementComponent, { className: "CaucaManagementComponent", filePath: "lib/cauca-management.component.ts", lineNumber: 11 }); })();
|
|
1127
1185
|
|
|
1128
1186
|
/**
|
|
1129
1187
|
* @deprecated This service is obsolete and should not be used.
|
|
@@ -1267,7 +1325,7 @@ function CaucaManagementGroupComponent_div_21_Template(rf, ctx) { if (rf & 1) {
|
|
|
1267
1325
|
} if (rf & 2) {
|
|
1268
1326
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
1269
1327
|
i0.ɵɵadvance();
|
|
1270
|
-
i0.ɵɵproperty("dataSource", ctx_r2.permissions)("searchEnabled", true)("searchExpr", i0.ɵɵpureFunction0(5, _c0))("hoverStateEnabled", ctx_r2.hoverStatePermission);
|
|
1328
|
+
i0.ɵɵproperty("dataSource", ctx_r2.permissions)("searchEnabled", true)("searchExpr", i0.ɵɵpureFunction0(5, _c0))("hoverStateEnabled", ctx_r2.hoverStatePermission());
|
|
1271
1329
|
i0.ɵɵadvance();
|
|
1272
1330
|
i0.ɵɵproperty("dxTemplateOf", "rowTemplate");
|
|
1273
1331
|
} }
|
|
@@ -1276,9 +1334,12 @@ function CaucaManagementGroupComponent_div_21_Template(rf, ctx) { if (rf & 1) {
|
|
|
1276
1334
|
*/
|
|
1277
1335
|
class CaucaManagementGroupComponent {
|
|
1278
1336
|
constructor() {
|
|
1279
|
-
this.showPrintButton = true
|
|
1280
|
-
|
|
1281
|
-
this.
|
|
1337
|
+
this.showPrintButton = input(true, /* @ts-ignore */
|
|
1338
|
+
...(ngDevMode ? [{ debugName: "showPrintButton" }] : /* istanbul ignore next */ []));
|
|
1339
|
+
this.hoverStatePermission = input(true, /* @ts-ignore */
|
|
1340
|
+
...(ngDevMode ? [{ debugName: "hoverStatePermission" }] : /* istanbul ignore next */ []));
|
|
1341
|
+
this.showAssignableByAllUsers = input(true, /* @ts-ignore */
|
|
1342
|
+
...(ngDevMode ? [{ debugName: "showAssignableByAllUsers" }] : /* istanbul ignore next */ []));
|
|
1282
1343
|
this.groups = [];
|
|
1283
1344
|
this.users = [];
|
|
1284
1345
|
this.permissions = [];
|
|
@@ -1458,7 +1519,7 @@ class CaucaManagementGroupComponent {
|
|
|
1458
1519
|
this.managementGroupService.getAll().subscribe((data) => this.groups = data);
|
|
1459
1520
|
}
|
|
1460
1521
|
static { this.ɵfac = function CaucaManagementGroupComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaucaManagementGroupComponent)(); }; }
|
|
1461
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementGroupComponent, selectors: [["cauca-management-group"]], inputs: { showPrintButton: "showPrintButton", hoverStatePermission: "hoverStatePermission", showAssignableByAllUsers: "showAssignableByAllUsers" },
|
|
1522
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementGroupComponent, selectors: [["cauca-management-group"]], inputs: { showPrintButton: [1, "showPrintButton"], hoverStatePermission: [1, "hoverStatePermission"], showAssignableByAllUsers: [1, "showAssignableByAllUsers"] }, decls: 22, vars: 36, consts: [["keyExpr", "id", 3, "onRowInserted", "onInitNewRow", "onRowUpdated", "onEditingStart", "onRowRemoved", "allowPrint", "dataSource"], ["dataField", "name", 3, "caption"], ["type", "async", 3, "message", "validationCallback"], ["dataField", "assignableByAllUsers", "dataType", "boolean", 3, "caption", "visible"], ["dataField", "users", "editCellTemplate", "usersEditTemplate", 3, "caption", "calculateCellValue"], ["dataField", "permissions", "editCellTemplate", "permissionsEditTemplate", 3, "caption", "visible"], [3, "enabled"], ["mode", "popup", 3, "allowAdding", "allowUpdating", "allowDeleting", "useIcons"], [3, "showTitle", "title", "fullScreen"], ["colCount", "1", 3, "labelLocation"], ["dataField", "name", 3, "isRequired"], ["dataField", "users"], ["dataField", "permissions"], ["dataField", "assignableByAllUsers", 3, "visible"], [4, "dxTemplate", "dxTemplateOf"], ["valueExpr", "id", 3, "onInitialized", "onValueChanged", "displayExpr", "dataSource", "searchEnabled", "searchExpr"], ["itemTemplate", "rowTemplate", 3, "dataSource", "searchEnabled", "searchExpr", "hoverStateEnabled"], [3, "onInitialized", "onValueChanged", "text"]], template: function CaucaManagementGroupComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1462
1523
|
i0.ɵɵelementStart(0, "cauca-dx-data-grid", 0);
|
|
1463
1524
|
i0.ɵɵlistener("onRowInserted", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowInserted_0_listener($event) { return ctx.onRowInserted($event); })("onInitNewRow", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onInitNewRow_0_listener() { return ctx.onInitNewRow(); })("onRowUpdated", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowUpdated_0_listener($event) { return ctx.onRowUpdated($event); })("onEditingStart", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onEditingStart_0_listener($event) { return ctx.onEditingStart($event); })("onRowRemoved", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowRemoved_0_listener($event) { return ctx.onRowRemoved($event); });
|
|
1464
1525
|
i0.ɵɵelementStart(1, "dxi-column", 1);
|
|
@@ -1482,13 +1543,13 @@ class CaucaManagementGroupComponent {
|
|
|
1482
1543
|
i0.ɵɵtemplate(20, CaucaManagementGroupComponent_div_20_Template, 2, 4, "div", 14)(21, CaucaManagementGroupComponent_div_21_Template, 3, 6, "div", 14);
|
|
1483
1544
|
i0.ɵɵelementEnd();
|
|
1484
1545
|
} if (rf & 2) {
|
|
1485
|
-
i0.ɵɵproperty("allowPrint", ctx.showPrintButton)("dataSource", ctx.groups);
|
|
1546
|
+
i0.ɵɵproperty("allowPrint", ctx.showPrintButton())("dataSource", ctx.groups);
|
|
1486
1547
|
i0.ɵɵadvance();
|
|
1487
1548
|
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(2, 24, "management.name"));
|
|
1488
1549
|
i0.ɵɵadvance(2);
|
|
1489
1550
|
i0.ɵɵproperty("message", i0.ɵɵpipeBind1(4, 26, "management.groupNameAlreadyUsed"))("validationCallback", ctx.groupNameAlreadyUsedValidation);
|
|
1490
1551
|
i0.ɵɵadvance(2);
|
|
1491
|
-
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(6, 28, "management.assignableByAllUsers"))("visible", ctx.showAssignableByAllUsers);
|
|
1552
|
+
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(6, 28, "management.assignableByAllUsers"))("visible", ctx.showAssignableByAllUsers());
|
|
1492
1553
|
i0.ɵɵadvance(2);
|
|
1493
1554
|
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(8, 30, "management.users"))("calculateCellValue", ctx.calculateUsersCellValue);
|
|
1494
1555
|
i0.ɵɵadvance(2);
|
|
@@ -1504,24 +1565,18 @@ class CaucaManagementGroupComponent {
|
|
|
1504
1565
|
i0.ɵɵadvance();
|
|
1505
1566
|
i0.ɵɵproperty("isRequired", true);
|
|
1506
1567
|
i0.ɵɵadvance(3);
|
|
1507
|
-
i0.ɵɵproperty("visible", ctx.showAssignableByAllUsers);
|
|
1568
|
+
i0.ɵɵproperty("visible", ctx.showAssignableByAllUsers());
|
|
1508
1569
|
i0.ɵɵadvance();
|
|
1509
1570
|
i0.ɵɵproperty("dxTemplateOf", "usersEditTemplate");
|
|
1510
1571
|
i0.ɵɵadvance();
|
|
1511
1572
|
i0.ɵɵproperty("dxTemplateOf", "permissionsEditTemplate");
|
|
1512
|
-
} }, dependencies: [i1$
|
|
1573
|
+
} }, dependencies: [CaucaDevextremeModule, i1$3.CaucaDataGridComponent, i2$1.DxiColumnComponent, i2$1.DxiValidationRuleComponent, i2$1.DxoEditingComponent, i2$1.DxoFormComponent, i2$1.DxiItemComponent, i2$1.DxoPopupComponent, i2$1.DxoExportComponent, i3$2.DxTemplateDirective, DxCheckBoxModule, i4$2.DxCheckBoxComponent, DxListModule, i5$1.DxListComponent, DxTagBoxModule, i6$1.DxTagBoxComponent, TranslatePipe], encapsulation: 2 }); }
|
|
1513
1574
|
}
|
|
1514
1575
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementGroupComponent, [{
|
|
1515
1576
|
type: Component,
|
|
1516
|
-
args: [{ selector: 'cauca-management-group',
|
|
1517
|
-
}], () => [], { showPrintButton: [{
|
|
1518
|
-
|
|
1519
|
-
}], hoverStatePermission: [{
|
|
1520
|
-
type: Input
|
|
1521
|
-
}], showAssignableByAllUsers: [{
|
|
1522
|
-
type: Input
|
|
1523
|
-
}] }); })();
|
|
1524
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaManagementGroupComponent, { className: "CaucaManagementGroupComponent", filePath: "lib/cauca-management-group/cauca-management-group.component.ts", lineNumber: 22 }); })();
|
|
1577
|
+
args: [{ selector: 'cauca-management-group', imports: [CaucaDevextremeModule, DxCheckBoxModule, DxListModule, DxTagBoxModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<cauca-dx-data-grid [allowPrint]=\"showPrintButton()\" keyExpr=\"id\" [dataSource]=\"groups\"\n (onRowInserted)=\"onRowInserted($event)\" (onInitNewRow)=\"onInitNewRow()\" (onRowUpdated)=\"onRowUpdated($event)\"\n (onEditingStart)=\"onEditingStart($event)\" (onRowRemoved)=\"onRowRemoved($event)\">\n\n <dxi-column dataField=\"name\" [caption]=\"'management.name' | translate\">\n <dxi-validation-rule type=\"async\" [message]=\"'management.groupNameAlreadyUsed' | translate\"\n [validationCallback]=\"groupNameAlreadyUsedValidation\"></dxi-validation-rule>\n </dxi-column>\n <dxi-column dataField=\"assignableByAllUsers\" [caption]=\"'management.assignableByAllUsers' | translate\"\n dataType=\"boolean\" [visible]=\"showAssignableByAllUsers()\">\n </dxi-column>\n <dxi-column dataField=\"users\" [caption]=\"'management.users' | translate\" editCellTemplate=\"usersEditTemplate\"\n [calculateCellValue]=\"calculateUsersCellValue\">\n </dxi-column>\n <dxi-column dataField=\"permissions\" [caption]=\"'management.permissions' | translate\" [visible]=\"false\"\n editCellTemplate=\"permissionsEditTemplate\">\n </dxi-column>\n <dxo-export [enabled]=\"false\"></dxo-export>\n <dxo-editing mode=\"popup\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\" [useIcons]=\"true\">\n <dxo-popup [showTitle]=\"true\" [title]=\"'management.group' | translate\" [fullScreen]=\"!showColumn\"></dxo-popup>\n <dxo-form colCount=\"1\" [labelLocation]=\"showColumnXS ? 'left' : 'top'\">\n <dxi-item dataField=\"name\" [isRequired]=\"true\"></dxi-item>\n <dxi-item dataField=\"users\"></dxi-item>\n <dxi-item dataField=\"permissions\"></dxi-item>\n <dxi-item dataField=\"assignableByAllUsers\" [visible]=\"showAssignableByAllUsers()\"></dxi-item>\n </dxo-form>\n </dxo-editing>\n\n <div *dxTemplate=\"let field of 'usersEditTemplate'\">\n <dx-tag-box valueExpr=\"id\" [displayExpr]=\"fullName\" [dataSource]=\"users\" [searchEnabled]=\"true\"\n [searchExpr]=\"fullName\" (onInitialized)=\"getGroupUser(field, $event)\"\n (onValueChanged)=\"setGroupUser(field, $event)\">\n </dx-tag-box>\n </div>\n <div *dxTemplate=\"let field of 'permissionsEditTemplate'\">\n <dx-list [dataSource]=\"permissions\" itemTemplate=\"rowTemplate\" [searchEnabled]=\"true\"\n [searchExpr]=\"['name', 'tag']\" [hoverStateEnabled]=\"hoverStatePermission()\">\n <div *dxTemplate=\"let permission of 'rowTemplate'\">\n <dx-check-box [text]=\"permission.name\" (onInitialized)=\"getPermissionStatus(field, permission, $event)\"\n (onValueChanged)=\"checkBoxToggled(field, permission, $event)\">\n </dx-check-box>\n </div>\n </dx-list>\n </div>\n</cauca-dx-data-grid>" }]
|
|
1578
|
+
}], () => [], { showPrintButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPrintButton", required: false }] }], hoverStatePermission: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverStatePermission", required: false }] }], showAssignableByAllUsers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAssignableByAllUsers", required: false }] }] }); })();
|
|
1579
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaManagementGroupComponent, { className: "CaucaManagementGroupComponent", filePath: "lib/cauca-management-group/cauca-management-group.component.ts", lineNumber: 28 }); })();
|
|
1525
1580
|
|
|
1526
1581
|
/**
|
|
1527
1582
|
* @deprecated This model is obsolete and should not be used.
|
|
@@ -1578,7 +1633,7 @@ class CaucaManagementUserComponent {
|
|
|
1578
1633
|
this.managementUserService.getAll().subscribe((data) => this.users = data);
|
|
1579
1634
|
}
|
|
1580
1635
|
static { this.ɵfac = function CaucaManagementUserComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaucaManagementUserComponent)(); }; }
|
|
1581
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementUserComponent, selectors: [["cauca-management-user"]],
|
|
1636
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementUserComponent, selectors: [["cauca-management-user"]], decls: 22, vars: 31, consts: [["keyExpr", "id", 3, "onRowInserted", "onRowUpdated", "onRowRemoved", "dataSource"], ["dataField", "userName", 3, "caption"], ["type", "async", 3, "message", "validationCallback"], ["dataField", "isActive", 3, "caption", "visible"], ["dataField", "firstName", 3, "caption"], ["dataField", "lastName", 3, "caption"], ["dataField", "groups", 3, "caption"], ["mode", "popup", 3, "allowAdding", "allowUpdating", "allowDeleting", "useIcons"], [3, "showTitle", "title"], ["colCount", "2", 3, "labelLocation"], ["dataField", "userName", 3, "isRequired"], ["dataField", "isActive"], ["dataField", "firstName"], ["dataField", "lastName"], ["dataField", "group"]], template: function CaucaManagementUserComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1582
1637
|
i0.ɵɵelementStart(0, "cauca-dx-data-grid", 0);
|
|
1583
1638
|
i0.ɵɵlistener("onRowInserted", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowInserted_0_listener($event) { return ctx.onRowInserted($event); })("onRowUpdated", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowUpdated_0_listener($event) { return ctx.onRowUpdated($event); })("onRowRemoved", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowRemoved_0_listener($event) { return ctx.onRowRemoved($event); });
|
|
1584
1639
|
i0.ɵɵelementStart(1, "dxi-column", 1);
|
|
@@ -1622,39 +1677,32 @@ class CaucaManagementUserComponent {
|
|
|
1622
1677
|
i0.ɵɵproperty("labelLocation", ctx.showColumnXS ? "left" : "top");
|
|
1623
1678
|
i0.ɵɵadvance();
|
|
1624
1679
|
i0.ɵɵproperty("isRequired", true);
|
|
1625
|
-
} }, dependencies: [
|
|
1680
|
+
} }, dependencies: [CaucaDevextremeModule, i1$3.CaucaDataGridComponent, i2$1.DxiColumnComponent, i2$1.DxiValidationRuleComponent, i2$1.DxoEditingComponent, i2$1.DxoFormComponent, i2$1.DxiItemComponent, i2$1.DxoPopupComponent, TranslatePipe], encapsulation: 2 }); }
|
|
1626
1681
|
}
|
|
1627
1682
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementUserComponent, [{
|
|
1628
1683
|
type: Component,
|
|
1629
|
-
args: [{ selector: 'cauca-management-user',
|
|
1684
|
+
args: [{ selector: 'cauca-management-user', imports: [CaucaDevextremeModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<cauca-dx-data-grid\n keyExpr=\"id\"\n [dataSource]=\"users\"\n (onRowInserted)=\"onRowInserted($event)\"\n (onRowUpdated)=\"onRowUpdated($event)\"\n (onRowRemoved)=\"onRowRemoved($event)\">\n\n <dxi-column dataField=\"userName\" [caption]=\"'management.userName' | translate\">\n <dxi-validation-rule type=\"async\" [message]=\"'management.userNameAlreadyUsed' | translate\" [validationCallback]=\"userNameAlreadyUsedValidation\"></dxi-validation-rule>\n </dxi-column>\n <dxi-column dataField=\"isActive\" [caption]=\"'management.isActive' | translate\" [visible]=\"false\"></dxi-column>\n <dxi-column dataField=\"firstName\" [caption]=\"'management.firstName' | translate\"></dxi-column>\n <dxi-column dataField=\"lastName\" [caption]=\"'management.lastName' | translate\"></dxi-column>\n <dxi-column dataField=\"groups\" [caption]=\"'management.group' | translate\"></dxi-column>\n\n <dxo-editing mode=\"popup\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\" [useIcons]=\"true\">\n <dxo-popup [showTitle]=\"true\" [title]=\"'management.group' | translate\"></dxo-popup>\n <dxo-form colCount=\"2\" [labelLocation]=\"showColumnXS ? 'left' : 'top'\">\n <dxi-item dataField=\"userName\" [isRequired]=\"true\"></dxi-item>\n <dxi-item dataField=\"isActive\"></dxi-item>\n <dxi-item dataField=\"firstName\"></dxi-item>\n <dxi-item dataField=\"lastName\"></dxi-item>\n <dxi-item dataField=\"group\"></dxi-item>\n </dxo-form>\n </dxo-editing>\n</cauca-dx-data-grid>\n" }]
|
|
1630
1685
|
}], () => [], null); })();
|
|
1631
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaManagementUserComponent, { className: "CaucaManagementUserComponent", filePath: "lib/cauca-management-user/cauca-management-user.component.ts", lineNumber:
|
|
1686
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaManagementUserComponent, { className: "CaucaManagementUserComponent", filePath: "lib/cauca-management-user/cauca-management-user.component.ts", lineNumber: 20 }); })();
|
|
1632
1687
|
|
|
1688
|
+
/**
|
|
1689
|
+
* @deprecated Import CaucaManagementComponent, CaucaManagementUserComponent and
|
|
1690
|
+
* CaucaManagementGroupComponent directly in your standalone components. Kept as a re-export
|
|
1691
|
+
* so existing consumers keep compiling.
|
|
1692
|
+
*/
|
|
1633
1693
|
class CaucaManagementModule {
|
|
1634
1694
|
static { this.ɵfac = function CaucaManagementModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaucaManagementModule)(); }; }
|
|
1635
1695
|
static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CaucaManagementModule }); }
|
|
1636
|
-
static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [
|
|
1637
|
-
|
|
1638
|
-
DxListModule,
|
|
1639
|
-
DxTagBoxModule,
|
|
1640
|
-
CaucaCoreForChildModule,
|
|
1641
|
-
CaucaDevextremeModule] }); }
|
|
1696
|
+
static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CaucaManagementGroupComponent,
|
|
1697
|
+
CaucaManagementUserComponent] }); }
|
|
1642
1698
|
}
|
|
1643
1699
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementModule, [{
|
|
1644
1700
|
type: NgModule,
|
|
1645
1701
|
args: [{
|
|
1646
|
-
|
|
1702
|
+
imports: [
|
|
1647
1703
|
CaucaManagementComponent,
|
|
1648
1704
|
CaucaManagementGroupComponent,
|
|
1649
|
-
CaucaManagementUserComponent
|
|
1650
|
-
],
|
|
1651
|
-
imports: [
|
|
1652
|
-
CommonModule,
|
|
1653
|
-
DxCheckBoxModule,
|
|
1654
|
-
DxListModule,
|
|
1655
|
-
DxTagBoxModule,
|
|
1656
|
-
CaucaCoreForChildModule,
|
|
1657
|
-
CaucaDevextremeModule,
|
|
1705
|
+
CaucaManagementUserComponent,
|
|
1658
1706
|
],
|
|
1659
1707
|
exports: [
|
|
1660
1708
|
CaucaManagementComponent,
|
|
@@ -1663,14 +1711,9 @@ class CaucaManagementModule {
|
|
|
1663
1711
|
]
|
|
1664
1712
|
}]
|
|
1665
1713
|
}], null, null); })();
|
|
1666
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CaucaManagementModule, {
|
|
1714
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CaucaManagementModule, { imports: [CaucaManagementComponent,
|
|
1667
1715
|
CaucaManagementGroupComponent,
|
|
1668
|
-
CaucaManagementUserComponent],
|
|
1669
|
-
DxCheckBoxModule,
|
|
1670
|
-
DxListModule,
|
|
1671
|
-
DxTagBoxModule,
|
|
1672
|
-
CaucaCoreForChildModule,
|
|
1673
|
-
CaucaDevextremeModule], exports: [CaucaManagementComponent,
|
|
1716
|
+
CaucaManagementUserComponent], exports: [CaucaManagementComponent,
|
|
1674
1717
|
CaucaManagementUserComponent,
|
|
1675
1718
|
CaucaManagementGroupComponent] }); })();
|
|
1676
1719
|
|