@cauca-911/management 22.0.4 → 22.0.6
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 +7 -0
- package/assets/i18n/cauca/es-management.json +7 -0
- package/assets/i18n/cauca/fr-management.json +7 -0
- package/fesm2022/cauca-911-management.mjs +434 -29
- package/fesm2022/cauca-911-management.mjs.map +1 -1
- package/package.json +2 -1
- package/types/cauca-911-management.d.ts +120 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, Injector, inject, Injectable, computed, ChangeDetectionStrategy, Component, ViewChild, signal, viewChild, resource, effect, untracked, model, input, HostListener, forwardRef, ViewEncapsulation, output } from '@angular/core';
|
|
3
|
-
import { pendingChangesGuard, DialogService, PageTitleComponent, LoadingSpinnerIndicatorComponent, LoadingErrorComponent, StrokedButtonComponent, RaisedButtonComponent, ListPaginatorComponent, IconButtonComponent, LoadingStateService, GroupContainerComponent, ConfirmationResult, SavingErrorBoxComponent, MenuItemComponent } from '@cauca-911/material';
|
|
3
|
+
import { pendingChangesGuard, DialogService, PageTitleComponent, LoadingSpinnerIndicatorComponent, LoadingErrorComponent, StrokedButtonComponent, RaisedButtonComponent, ListPaginatorComponent, IconButtonComponent, LoadingStateService, GroupContainerComponent, ConfirmationResult, SavingErrorBoxComponent, MenuItemComponent, ExpandablePanelComponent, FieldErrorsComponent, PasswordSelectionComponent, PhoneNumberInputComponent, ControlFieldErrorsComponent } from '@cauca-911/material';
|
|
4
4
|
import * as i1 from '@angular/material/card';
|
|
5
5
|
import { MatCardModule } from '@angular/material/card';
|
|
6
6
|
import { TranslatePipe } from '@ngx-translate/core';
|
|
@@ -8,7 +8,7 @@ import { MatSort } from '@angular/material/sort';
|
|
|
8
8
|
import { Router } from '@angular/router';
|
|
9
9
|
import ODataFilterBuilder from 'odata-filter-builder';
|
|
10
10
|
import { OdataGridComponent, SortableDataGridColumnComponent, SortableDataGridCheckColumnComponent, DataGridCommandsColumnComponent, DataGridComponent, BaseGridColumnComponent, DataGridMenuColumnComponent } from '@cauca-911/datagrid';
|
|
11
|
-
import { HttpClient } from '@angular/common/http';
|
|
11
|
+
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
12
12
|
import { CaucaCoreService, toLowerCaseAndWithoutDiacritics } from '@cauca-911/core';
|
|
13
13
|
import { firstValueFrom, startWith, debounceTime } from 'rxjs';
|
|
14
14
|
import * as i1$2 from '@angular/material/form-field';
|
|
@@ -36,6 +36,13 @@ import * as i2$1 from '@angular/material/menu';
|
|
|
36
36
|
import { MatMenuModule } from '@angular/material/menu';
|
|
37
37
|
import { NgStyle } from '@angular/common';
|
|
38
38
|
import { MatColumnDef, MatHeaderCell, MatHeaderCellDef, MatCell, MatCellDef, MatFooterCell, MatFooterCellDef } from '@angular/material/table';
|
|
39
|
+
import { schema, required, maxLength, validateHttp, email, readonly, pattern, FormField } from '@angular/forms/signals';
|
|
40
|
+
import * as i3$2 from '@angular/material/progress-spinner';
|
|
41
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
42
|
+
import * as i2$2 from '@angular/material/select';
|
|
43
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
44
|
+
import * as i3$3 from 'ngx-mat-select-search';
|
|
45
|
+
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
39
46
|
|
|
40
47
|
const MANAGEMENT_URL_PREFIX = new InjectionToken('MANAGEMENT_URL_PREFIX');
|
|
41
48
|
const MANAGEMENT_ROUTE_SEGMENT = new InjectionToken('MANAGEMENT_ROUTE_SEGMENT');
|
|
@@ -93,7 +100,7 @@ class GroupManagementService {
|
|
|
93
100
|
}]
|
|
94
101
|
}], null, null); })();
|
|
95
102
|
|
|
96
|
-
const _c0$
|
|
103
|
+
const _c0$6 = () => ["name"];
|
|
97
104
|
class GroupListGridComponent {
|
|
98
105
|
constructor() {
|
|
99
106
|
this.columns = computed(() => this.getColumns(), /* @ts-ignore */
|
|
@@ -151,7 +158,7 @@ class GroupListGridComponent {
|
|
|
151
158
|
i0.ɵɵlistener("deleteClick", function GroupListGridComponent_Template_cauca_data_grid_commands_column_deleteClick_6_listener($event) { return ctx.deleteGroup($event); });
|
|
152
159
|
i0.ɵɵelementEnd()();
|
|
153
160
|
} if (rf & 2) {
|
|
154
|
-
i0.ɵɵproperty("showTableOptions", true)("showAddButton", true)("addButtonLabel", i0.ɵɵpipeBind1(1, 10, "groups.addButtonLabel"))("baseSort", i0.ɵɵpureFunction0(16, _c0$
|
|
161
|
+
i0.ɵɵproperty("showTableOptions", true)("showAddButton", true)("addButtonLabel", i0.ɵɵpipeBind1(1, 10, "groups.addButtonLabel"))("baseSort", i0.ɵɵpureFunction0(16, _c0$6))("filterPredicate", ctx.filterPredicate)("displayedColumns", ctx.columns());
|
|
155
162
|
i0.ɵɵadvance(2);
|
|
156
163
|
i0.ɵɵproperty("label", i0.ɵɵpipeBind1(3, 12, "groups.groupNameColumnLabel"));
|
|
157
164
|
i0.ɵɵadvance(2);
|
|
@@ -355,8 +362,8 @@ class UserSearchService {
|
|
|
355
362
|
}]
|
|
356
363
|
}], null, null); })();
|
|
357
364
|
|
|
358
|
-
const _c0$
|
|
359
|
-
const _forTrack0$
|
|
365
|
+
const _c0$5 = ["resultPaginator"];
|
|
366
|
+
const _forTrack0$5 = ($index, $item) => $item.id;
|
|
360
367
|
function GroupUserSelectionDialogComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
361
368
|
i0.ɵɵelementStart(0, "div", 8);
|
|
362
369
|
i0.ɵɵtext(1);
|
|
@@ -408,7 +415,7 @@ function GroupUserSelectionDialogComponent_Conditional_17_Template(rf, ctx) { if
|
|
|
408
415
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
409
416
|
i0.ɵɵelementStart(0, "mat-selection-list", 18);
|
|
410
417
|
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)); });
|
|
411
|
-
i0.ɵɵrepeaterCreate(1, GroupUserSelectionDialogComponent_Conditional_17_For_2_Template, 4, 6, "mat-list-option", 19, _forTrack0$
|
|
418
|
+
i0.ɵɵrepeaterCreate(1, GroupUserSelectionDialogComponent_Conditional_17_For_2_Template, 4, 6, "mat-list-option", 19, _forTrack0$5);
|
|
412
419
|
i0.ɵɵelementEnd();
|
|
413
420
|
i0.ɵɵconditionalCreate(3, GroupUserSelectionDialogComponent_Conditional_17_Conditional_3_Template, 2, 2, "cauca-list-paginator", 20);
|
|
414
421
|
} if (rf & 2) {
|
|
@@ -509,7 +516,7 @@ class GroupUserSelectionDialogComponent {
|
|
|
509
516
|
}
|
|
510
517
|
static { this.ɵfac = function GroupUserSelectionDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GroupUserSelectionDialogComponent)(); }; }
|
|
511
518
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GroupUserSelectionDialogComponent, selectors: [["cauca-group-user-selection-dialog"]], viewQuery: function GroupUserSelectionDialogComponent_Query(rf, ctx) { if (rf & 1) {
|
|
512
|
-
i0.ɵɵviewQuerySignal(ctx.paginator, _c0$
|
|
519
|
+
i0.ɵɵviewQuerySignal(ctx.paginator, _c0$5, 5);
|
|
513
520
|
} if (rf & 2) {
|
|
514
521
|
i0.ɵɵqueryAdvance();
|
|
515
522
|
} }, 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) {
|
|
@@ -598,8 +605,8 @@ class GroupUserSelectionDialogComponent {
|
|
|
598
605
|
}], () => [], { paginator: [{ type: i0.ViewChild, args: ['resultPaginator', { isSignal: true }] }] }); })();
|
|
599
606
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GroupUserSelectionDialogComponent, { className: "GroupUserSelectionDialogComponent", filePath: "lib/components/group-user-selection-dialog/group-user-selection-dialog.component.ts", lineNumber: 46 }); })();
|
|
600
607
|
|
|
601
|
-
const _c0$
|
|
602
|
-
const _forTrack0$
|
|
608
|
+
const _c0$4 = ["paginator"];
|
|
609
|
+
const _forTrack0$4 = ($index, $item) => $item.id;
|
|
603
610
|
function GroupUserEditionListComponent_For_10_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
604
611
|
i0.ɵɵelementStart(0, "div", 11);
|
|
605
612
|
i0.ɵɵtext(1);
|
|
@@ -734,7 +741,7 @@ class GroupUserEditionListComponent {
|
|
|
734
741
|
}
|
|
735
742
|
static { this.ɵfac = function GroupUserEditionListComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GroupUserEditionListComponent)(); }; }
|
|
736
743
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GroupUserEditionListComponent, selectors: [["cauca-group-user-edition-list"]], viewQuery: function GroupUserEditionListComponent_Query(rf, ctx) { if (rf & 1) {
|
|
737
|
-
i0.ɵɵviewQuerySignal(ctx.paginator, _c0$
|
|
744
|
+
i0.ɵɵviewQuerySignal(ctx.paginator, _c0$4, 5);
|
|
738
745
|
} if (rf & 2) {
|
|
739
746
|
i0.ɵɵqueryAdvance();
|
|
740
747
|
} }, 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) {
|
|
@@ -749,7 +756,7 @@ class GroupUserEditionListComponent {
|
|
|
749
756
|
i0.ɵɵtext(7, "search");
|
|
750
757
|
i0.ɵɵelementEnd()();
|
|
751
758
|
i0.ɵɵelementStart(8, "mat-list", 5);
|
|
752
|
-
i0.ɵɵrepeaterCreate(9, GroupUserEditionListComponent_For_10_Template, 8, 5, "mat-list-item", 6, _forTrack0$
|
|
759
|
+
i0.ɵɵrepeaterCreate(9, GroupUserEditionListComponent_For_10_Template, 8, 5, "mat-list-item", 6, _forTrack0$4, false, GroupUserEditionListComponent_ForEmpty_11_Template, 2, 1);
|
|
753
760
|
i0.ɵɵelementEnd();
|
|
754
761
|
i0.ɵɵconditionalCreate(12, GroupUserEditionListComponent_Conditional_12_Template, 2, 2, "cauca-list-paginator", 7);
|
|
755
762
|
i0.ɵɵelementStart(13, "cauca-raised-button", 8);
|
|
@@ -822,7 +829,7 @@ class PermissionManagementService {
|
|
|
822
829
|
}]
|
|
823
830
|
}], null, null); })();
|
|
824
831
|
|
|
825
|
-
const _forTrack0$
|
|
832
|
+
const _forTrack0$3 = ($index, $item) => $item.id;
|
|
826
833
|
function GroupPermissionListComponent_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
827
834
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
828
835
|
i0.ɵɵelementStart(0, "mat-list-item", 4)(1, "mat-checkbox", 6);
|
|
@@ -907,7 +914,7 @@ class GroupPermissionListComponent {
|
|
|
907
914
|
i0.ɵɵtext(6, "search");
|
|
908
915
|
i0.ɵɵelementEnd()();
|
|
909
916
|
i0.ɵɵelementStart(7, "mat-selection-list", 3);
|
|
910
|
-
i0.ɵɵrepeaterCreate(8, GroupPermissionListComponent_For_9_Template, 3, 4, "mat-list-item", 4, _forTrack0$
|
|
917
|
+
i0.ɵɵrepeaterCreate(8, GroupPermissionListComponent_For_9_Template, 3, 4, "mat-list-item", 4, _forTrack0$3, false, GroupPermissionListComponent_ForEmpty_10_Template, 6, 3, "div", 5);
|
|
911
918
|
i0.ɵɵelementEnd();
|
|
912
919
|
} if (rf & 2) {
|
|
913
920
|
i0.ɵɵadvance(2);
|
|
@@ -1189,7 +1196,7 @@ var UserPermissionOriginKind;
|
|
|
1189
1196
|
UserPermissionOriginKind[UserPermissionOriginKind["UserOverride"] = 1] = "UserOverride";
|
|
1190
1197
|
})(UserPermissionOriginKind || (UserPermissionOriginKind = {}));
|
|
1191
1198
|
|
|
1192
|
-
const _forTrack0$
|
|
1199
|
+
const _forTrack0$2 = ($index, $item) => $item.idModulePermission;
|
|
1193
1200
|
function UserPermissionListComponent_For_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
1194
1201
|
i0.ɵɵtext(0, " check ");
|
|
1195
1202
|
} }
|
|
@@ -1299,7 +1306,7 @@ class UserPermissionListComponent {
|
|
|
1299
1306
|
i0.ɵɵtext(6, "search");
|
|
1300
1307
|
i0.ɵɵelementEnd()();
|
|
1301
1308
|
i0.ɵɵelementStart(7, "mat-list", 4);
|
|
1302
|
-
i0.ɵɵrepeaterCreate(8, UserPermissionListComponent_For_9_Template, 16, 11, "mat-list-item", 5, _forTrack0$
|
|
1309
|
+
i0.ɵɵrepeaterCreate(8, UserPermissionListComponent_For_9_Template, 16, 11, "mat-list-item", 5, _forTrack0$2, false, UserPermissionListComponent_ForEmpty_10_Template, 6, 3, "div", 6);
|
|
1303
1310
|
i0.ɵɵelementEnd();
|
|
1304
1311
|
} if (rf & 2) {
|
|
1305
1312
|
i0.ɵɵadvance(2);
|
|
@@ -1384,14 +1391,14 @@ class UserPermissionsDialogComponent {
|
|
|
1384
1391
|
}], null, null); })();
|
|
1385
1392
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserPermissionsDialogComponent, { className: "UserPermissionsDialogComponent", filePath: "lib/components/user-permissions-dialog/user-permissions-dialog.component.ts", lineNumber: 31 }); })();
|
|
1386
1393
|
|
|
1387
|
-
const _c0$
|
|
1394
|
+
const _c0$3 = a0 => ({ "width": a0 });
|
|
1388
1395
|
function ScopeListGridColumnComponent_th_1_Template(rf, ctx) { if (rf & 1) {
|
|
1389
1396
|
i0.ɵɵelementStart(0, "th", 4);
|
|
1390
1397
|
i0.ɵɵtext(1);
|
|
1391
1398
|
i0.ɵɵelementEnd();
|
|
1392
1399
|
} if (rf & 2) {
|
|
1393
1400
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
1394
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2, _c0$
|
|
1401
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2, _c0$3, ctx_r0.width()));
|
|
1395
1402
|
i0.ɵɵadvance();
|
|
1396
1403
|
i0.ɵɵtextInterpolate1(" ", ctx_r0.label() ?? ctx_r0.capitalize(ctx_r0.prop()), " ");
|
|
1397
1404
|
} }
|
|
@@ -1477,31 +1484,31 @@ class ScopeListGridColumnComponent extends BaseGridColumnComponent {
|
|
|
1477
1484
|
}], () => [], { allLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "allLabel", required: true }] }] }); })();
|
|
1478
1485
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ScopeListGridColumnComponent, { className: "ScopeListGridColumnComponent", filePath: "lib/components/scope-list-grid-column/scope-list-grid-column.component.ts", lineNumber: 28 }); })();
|
|
1479
1486
|
|
|
1480
|
-
const _c0 = () => ["userName"];
|
|
1481
|
-
const _forTrack0 = ($index, $item) => $item.prop;
|
|
1487
|
+
const _c0$2 = () => ["userName"];
|
|
1488
|
+
const _forTrack0$1 = ($index, $item) => $item.prop;
|
|
1482
1489
|
function UserListGridComponent_For_9_Case_0_Template(rf, ctx) { if (rf & 1) {
|
|
1483
1490
|
i0.ɵɵelement(0, "cauca-scope-list-grid-column", 6);
|
|
1484
1491
|
i0.ɵɵpipe(1, "translate");
|
|
1485
1492
|
} if (rf & 2) {
|
|
1486
1493
|
const column_r1 = i0.ɵɵnextContext().$implicit;
|
|
1487
|
-
i0.ɵɵproperty("id", column_r1.prop)("prop", column_r1.prop)("width", column_r1.width ?? "")("showToolTip", column_r1.showToolTip ?? true)("allLabel", column_r1.allLabel ?? "")("label", i0.ɵɵpipeBind1(1,
|
|
1494
|
+
i0.ɵɵproperty("id", column_r1.prop)("prop", column_r1.prop)("width", column_r1.width ?? "")("showToolTip", column_r1.showToolTip ?? true)("allLabel", column_r1.allLabel ?? "")("visibleByDefault", column_r1.visibleByDefault ?? true)("label", i0.ɵɵpipeBind1(1, 7, column_r1.label));
|
|
1488
1495
|
} }
|
|
1489
1496
|
function UserListGridComponent_For_9_Case_1_Template(rf, ctx) { if (rf & 1) {
|
|
1490
1497
|
i0.ɵɵelement(0, "cauca-sortable-data-grid-check-column", 7);
|
|
1491
1498
|
i0.ɵɵpipe(1, "translate");
|
|
1492
1499
|
} if (rf & 2) {
|
|
1493
1500
|
const column_r1 = i0.ɵɵnextContext().$implicit;
|
|
1494
|
-
i0.ɵɵproperty("id", column_r1.prop)("prop", column_r1.prop)("width", column_r1.width ?? "")("label", i0.ɵɵpipeBind1(1,
|
|
1501
|
+
i0.ɵɵproperty("id", column_r1.prop)("prop", column_r1.prop)("width", column_r1.width ?? "")("visibleByDefault", column_r1.visibleByDefault ?? true)("label", i0.ɵɵpipeBind1(1, 5, column_r1.label));
|
|
1495
1502
|
} }
|
|
1496
1503
|
function UserListGridComponent_For_9_Case_2_Template(rf, ctx) { if (rf & 1) {
|
|
1497
1504
|
i0.ɵɵelement(0, "cauca-sortable-data-grid-column", 8);
|
|
1498
1505
|
i0.ɵɵpipe(1, "translate");
|
|
1499
1506
|
} if (rf & 2) {
|
|
1500
1507
|
const column_r1 = i0.ɵɵnextContext().$implicit;
|
|
1501
|
-
i0.ɵɵproperty("id", column_r1.prop)("prop", column_r1.prop)("width", column_r1.width ?? "")("showToolTip", column_r1.showToolTip ?? true)("label", i0.ɵɵpipeBind1(1,
|
|
1508
|
+
i0.ɵɵproperty("id", column_r1.prop)("prop", column_r1.prop)("width", column_r1.width ?? "")("showToolTip", column_r1.showToolTip ?? true)("visibleByDefault", column_r1.visibleByDefault ?? true)("label", i0.ɵɵpipeBind1(1, 6, column_r1.label));
|
|
1502
1509
|
} }
|
|
1503
1510
|
function UserListGridComponent_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
1504
|
-
i0.ɵɵconditionalCreate(0, UserListGridComponent_For_9_Case_0_Template, 2,
|
|
1511
|
+
i0.ɵɵconditionalCreate(0, UserListGridComponent_For_9_Case_0_Template, 2, 9, "cauca-scope-list-grid-column", 6)(1, UserListGridComponent_For_9_Case_1_Template, 2, 7, "cauca-sortable-data-grid-check-column", 7)(2, UserListGridComponent_For_9_Case_2_Template, 2, 8, "cauca-sortable-data-grid-column", 8);
|
|
1505
1512
|
} if (rf & 2) {
|
|
1506
1513
|
let tmp_10_0;
|
|
1507
1514
|
const column_r1 = ctx.$implicit;
|
|
@@ -1606,7 +1613,7 @@ class UserListGridComponent {
|
|
|
1606
1613
|
i0.ɵɵviewQuerySignal(ctx.grid, OdataGridComponent, 5)(ctx.sort, MatSort, 5);
|
|
1607
1614
|
} if (rf & 2) {
|
|
1608
1615
|
i0.ɵɵqueryAdvance(2);
|
|
1609
|
-
} }, inputs: { extraColumns: [1, "extraColumns"], showAddButton: [1, "showAddButton"], addButtonLabel: [1, "addButtonLabel"], canEdit: [1, "canEdit"], canDelete: [1, "canDelete"], editLinkField: [1, "editLinkField"], showPermissions: [1, "showPermissions"], persistState: [1, "persistState"] }, outputs: { addClick: "addClick", deleteClick: "deleteClick" }, decls: 11, vars: 24, consts: [["menuTemplate", ""], ["matSort", "", "matSortActive", "userName", "matSortDirection", "asc", "aria-label", "Users table", "resourceName", "UserList", 3, "addButtonClick", "persistState", "showTableOptions", "showRefreshButton", "showAddButton", "addButtonLabel", "baseSort", "filterPredicate", "displayedColumns"], ["id", "userName", "prop", "userName", 3, "showToolTip", "label"], ["id", "firstName", "prop", "firstName", 3, "showToolTip", "label"], ["id", "lastName", "prop", "lastName", 3, "showToolTip", "label"], ["id", "buttons", "prop", "menu", 3, "canEdit", "canDelete", "editLinkField"], [3, "id", "prop", "width", "showToolTip", "allLabel", "label"], [3, "id", "prop", "width", "label"], [3, "id", "prop", "width", "showToolTip", "label"], ["id", "buttons", "prop", "menu", 3, "deleteClick", "canEdit", "canDelete", "editLinkField"], ["icon", "list", "label", "userList.viewPermissions", 3, "translateLabel"], ["icon", "list", "label", "userList.viewPermissions", 3, "buttonClick", "translateLabel"]], template: function UserListGridComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1616
|
+
} }, inputs: { extraColumns: [1, "extraColumns"], showAddButton: [1, "showAddButton"], addButtonLabel: [1, "addButtonLabel"], canEdit: [1, "canEdit"], canDelete: [1, "canDelete"], editLinkField: [1, "editLinkField"], showPermissions: [1, "showPermissions"], persistState: [1, "persistState"] }, outputs: { addClick: "addClick", deleteClick: "deleteClick" }, decls: 11, vars: 24, consts: [["menuTemplate", ""], ["matSort", "", "matSortActive", "userName", "matSortDirection", "asc", "aria-label", "Users table", "resourceName", "UserList", 3, "addButtonClick", "persistState", "showTableOptions", "showRefreshButton", "showAddButton", "addButtonLabel", "baseSort", "filterPredicate", "displayedColumns"], ["id", "userName", "prop", "userName", 3, "showToolTip", "label"], ["id", "firstName", "prop", "firstName", 3, "showToolTip", "label"], ["id", "lastName", "prop", "lastName", 3, "showToolTip", "label"], ["id", "buttons", "prop", "menu", 3, "canEdit", "canDelete", "editLinkField"], [3, "id", "prop", "width", "showToolTip", "allLabel", "visibleByDefault", "label"], [3, "id", "prop", "width", "visibleByDefault", "label"], [3, "id", "prop", "width", "showToolTip", "visibleByDefault", "label"], ["id", "buttons", "prop", "menu", 3, "deleteClick", "canEdit", "canDelete", "editLinkField"], ["icon", "list", "label", "userList.viewPermissions", 3, "translateLabel"], ["icon", "list", "label", "userList.viewPermissions", 3, "buttonClick", "translateLabel"]], template: function UserListGridComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1610
1617
|
i0.ɵɵelementStart(0, "cauca-odata-grid", 1);
|
|
1611
1618
|
i0.ɵɵpipe(1, "translate");
|
|
1612
1619
|
i0.ɵɵlistener("addButtonClick", function UserListGridComponent_Template_cauca_odata_grid_addButtonClick_0_listener() { return ctx.addClick.emit(); });
|
|
@@ -1616,11 +1623,11 @@ class UserListGridComponent {
|
|
|
1616
1623
|
i0.ɵɵpipe(5, "translate");
|
|
1617
1624
|
i0.ɵɵelement(6, "cauca-sortable-data-grid-column", 4);
|
|
1618
1625
|
i0.ɵɵpipe(7, "translate");
|
|
1619
|
-
i0.ɵɵrepeaterCreate(8, UserListGridComponent_For_9_Template, 3, 1, null, null, _forTrack0);
|
|
1626
|
+
i0.ɵɵrepeaterCreate(8, UserListGridComponent_For_9_Template, 3, 1, null, null, _forTrack0$1);
|
|
1620
1627
|
i0.ɵɵconditionalCreate(10, UserListGridComponent_Conditional_10_Template, 3, 3, "cauca-data-grid-menu-column", 5);
|
|
1621
1628
|
i0.ɵɵelementEnd();
|
|
1622
1629
|
} if (rf & 2) {
|
|
1623
|
-
i0.ɵɵproperty("persistState", ctx.persistState())("showTableOptions", true)("showRefreshButton", true)("showAddButton", ctx.showAddButton())("addButtonLabel", i0.ɵɵpipeBind1(1, 15, ctx.addButtonLabel()))("baseSort", i0.ɵɵpureFunction0(23, _c0))("filterPredicate", ctx.filterPredicate)("displayedColumns", ctx.columns());
|
|
1630
|
+
i0.ɵɵproperty("persistState", ctx.persistState())("showTableOptions", true)("showRefreshButton", true)("showAddButton", ctx.showAddButton())("addButtonLabel", i0.ɵɵpipeBind1(1, 15, ctx.addButtonLabel()))("baseSort", i0.ɵɵpureFunction0(23, _c0$2))("filterPredicate", ctx.filterPredicate)("displayedColumns", ctx.columns());
|
|
1624
1631
|
i0.ɵɵadvance(2);
|
|
1625
1632
|
i0.ɵɵproperty("showToolTip", true)("label", i0.ɵɵpipeBind1(3, 17, "userList.column.userName"));
|
|
1626
1633
|
i0.ɵɵadvance(2);
|
|
@@ -1639,7 +1646,7 @@ class UserListGridComponent {
|
|
|
1639
1646
|
args: [{ selector: 'cauca-user-list-grid', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1640
1647
|
MatSort, OdataGridComponent, SortableDataGridColumnComponent, SortableDataGridCheckColumnComponent,
|
|
1641
1648
|
ScopeListGridColumnComponent, DataGridMenuColumnComponent, MenuItemComponent, TranslatePipe,
|
|
1642
|
-
], template: "<cauca-odata-grid\n matSort\n matSortActive=\"userName\"\n matSortDirection=\"asc\"\n aria-label=\"Users table\"\n resourceName=\"UserList\"\n [persistState]=\"persistState()\"\n [showTableOptions]=\"true\"\n [showRefreshButton]=\"true\"\n [showAddButton]=\"showAddButton()\"\n [addButtonLabel]=\"addButtonLabel() | translate\"\n (addButtonClick)=\"addClick.emit()\"\n [baseSort]=\"['userName']\"\n [filterPredicate]=\"filterPredicate\"\n [displayedColumns]=\"columns()\">\n\n <cauca-sortable-data-grid-column id=\"userName\" prop=\"userName\" [showToolTip]=\"true\"\n [label]=\"'userList.column.userName' | translate\"/>\n <cauca-sortable-data-grid-column id=\"firstName\" prop=\"firstName\" [showToolTip]=\"true\"\n [label]=\"'userList.column.firstName' | translate\"/>\n <cauca-sortable-data-grid-column id=\"lastName\" prop=\"lastName\" [showToolTip]=\"true\"\n [label]=\"'userList.column.lastName' | translate\"/>\n\n @for (column of extraColumns(); track column.prop) {\n @switch (column.kind) {\n @case ('scope') {\n <cauca-scope-list-grid-column [id]=\"column.prop\" [prop]=\"column.prop\"\n [width]=\"column.width ?? ''\"\n [showToolTip]=\"column.showToolTip ?? true\"\n [allLabel]=\"column.allLabel ?? ''\"\n [label]=\"column.label | translate\"/>\n }\n @case ('check') {\n <cauca-sortable-data-grid-check-column [id]=\"column.prop\" [prop]=\"column.prop\"\n [width]=\"column.width ?? ''\"\n [label]=\"column.label | translate\"/>\n }\n @default {\n <cauca-sortable-data-grid-column [id]=\"column.prop\" [prop]=\"column.prop\"\n [width]=\"column.width ?? ''\"\n [showToolTip]=\"column.showToolTip ?? true\"\n [label]=\"column.label | translate\"/>\n }\n }\n }\n\n @if (hasRowActions()) {\n <cauca-data-grid-menu-column id=\"buttons\" prop=\"menu\"\n [canEdit]=\"canEdit()\"\n [canDelete]=\"canDelete()\"\n [editLinkField]=\"editLinkField()\"\n (deleteClick)=\"onDelete($event)\">\n <ng-template #menuTemplate let-row=\"row\">\n @if (showPermissions()) {\n <cauca-menu-item icon=\"list\" label=\"userList.viewPermissions\" [translateLabel]=\"true\"\n (buttonClick)=\"openPermissions(row)\"/>\n }\n </ng-template>\n </cauca-data-grid-menu-column>\n }\n\n</cauca-odata-grid>\n" }]
|
|
1649
|
+
], template: "<cauca-odata-grid\n matSort\n matSortActive=\"userName\"\n matSortDirection=\"asc\"\n aria-label=\"Users table\"\n resourceName=\"UserList\"\n [persistState]=\"persistState()\"\n [showTableOptions]=\"true\"\n [showRefreshButton]=\"true\"\n [showAddButton]=\"showAddButton()\"\n [addButtonLabel]=\"addButtonLabel() | translate\"\n (addButtonClick)=\"addClick.emit()\"\n [baseSort]=\"['userName']\"\n [filterPredicate]=\"filterPredicate\"\n [displayedColumns]=\"columns()\">\n\n <cauca-sortable-data-grid-column id=\"userName\" prop=\"userName\" [showToolTip]=\"true\"\n [label]=\"'userList.column.userName' | translate\"/>\n <cauca-sortable-data-grid-column id=\"firstName\" prop=\"firstName\" [showToolTip]=\"true\"\n [label]=\"'userList.column.firstName' | translate\"/>\n <cauca-sortable-data-grid-column id=\"lastName\" prop=\"lastName\" [showToolTip]=\"true\"\n [label]=\"'userList.column.lastName' | translate\"/>\n\n @for (column of extraColumns(); track column.prop) {\n @switch (column.kind) {\n @case ('scope') {\n <cauca-scope-list-grid-column [id]=\"column.prop\" [prop]=\"column.prop\"\n [width]=\"column.width ?? ''\"\n [showToolTip]=\"column.showToolTip ?? true\"\n [allLabel]=\"column.allLabel ?? ''\"\n [visibleByDefault]=\"column.visibleByDefault ?? true\"\n [label]=\"column.label | translate\"/>\n }\n @case ('check') {\n <cauca-sortable-data-grid-check-column [id]=\"column.prop\" [prop]=\"column.prop\"\n [width]=\"column.width ?? ''\"\n [visibleByDefault]=\"column.visibleByDefault ?? true\"\n [label]=\"column.label | translate\"/>\n }\n @default {\n <cauca-sortable-data-grid-column [id]=\"column.prop\" [prop]=\"column.prop\"\n [width]=\"column.width ?? ''\"\n [showToolTip]=\"column.showToolTip ?? true\"\n [visibleByDefault]=\"column.visibleByDefault ?? true\"\n [label]=\"column.label | translate\"/>\n }\n }\n }\n\n @if (hasRowActions()) {\n <cauca-data-grid-menu-column id=\"buttons\" prop=\"menu\"\n [canEdit]=\"canEdit()\"\n [canDelete]=\"canDelete()\"\n [editLinkField]=\"editLinkField()\"\n (deleteClick)=\"onDelete($event)\">\n <ng-template #menuTemplate let-row=\"row\">\n @if (showPermissions()) {\n <cauca-menu-item icon=\"list\" label=\"userList.viewPermissions\" [translateLabel]=\"true\"\n (buttonClick)=\"openPermissions(row)\"/>\n }\n </ng-template>\n </cauca-data-grid-menu-column>\n }\n\n</cauca-odata-grid>\n" }]
|
|
1643
1650
|
}], null, { extraColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraColumns", required: false }] }], showAddButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAddButton", required: false }] }], addButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "addButtonLabel", required: false }] }], canEdit: [{ type: i0.Input, args: [{ isSignal: true, alias: "canEdit", required: false }] }], canDelete: [{ type: i0.Input, args: [{ isSignal: true, alias: "canDelete", required: false }] }], editLinkField: [{ type: i0.Input, args: [{ isSignal: true, alias: "editLinkField", required: false }] }], showPermissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPermissions", required: false }] }], persistState: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistState", required: false }] }], addClick: [{ type: i0.Output, args: ["addClick"] }], deleteClick: [{ type: i0.Output, args: ["deleteClick"] }], grid: [{ type: i0.ViewChild, args: [i0.forwardRef(() => OdataGridComponent), { isSignal: true }] }], sort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }] }); })();
|
|
1644
1651
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserListGridComponent, { className: "UserListGridComponent", filePath: "lib/components/user-list-grid/user-list-grid.component.ts", lineNumber: 27 }); })();
|
|
1645
1652
|
|
|
@@ -1698,6 +1705,404 @@ class UsersPageComponent {
|
|
|
1698
1705
|
}], null, { caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], baseCrumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseCrumb", required: false }] }], breadcrumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadcrumb", required: false }] }], extraColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraColumns", required: false }] }], showAddButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAddButton", required: false }] }], addButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "addButtonLabel", required: false }] }], canEdit: [{ type: i0.Input, args: [{ isSignal: true, alias: "canEdit", required: false }] }], canDelete: [{ type: i0.Input, args: [{ isSignal: true, alias: "canDelete", required: false }] }], editLinkField: [{ type: i0.Input, args: [{ isSignal: true, alias: "editLinkField", required: false }] }], showPermissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPermissions", required: false }] }], persistState: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistState", required: false }] }], addClick: [{ type: i0.Output, args: ["addClick"] }], deleteClick: [{ type: i0.Output, args: ["deleteClick"] }], grid: [{ type: i0.ViewChild, args: [i0.forwardRef(() => UserListGridComponent), { isSignal: true }] }] }); })();
|
|
1699
1706
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UsersPageComponent, { className: "UsersPageComponent", filePath: "lib/pages/users-page/users-page.component.ts", lineNumber: 14 }); })();
|
|
1700
1707
|
|
|
1708
|
+
/** What creation sends as the identifier. */
|
|
1709
|
+
const EmptyUserId = '00000000-0000-0000-0000-000000000000';
|
|
1710
|
+
function createEmptyUserForEdition() {
|
|
1711
|
+
return {
|
|
1712
|
+
id: EmptyUserId,
|
|
1713
|
+
login: { userName: '', password: '', twoFactorAuthenticatorEnabled: true },
|
|
1714
|
+
personalInformation: { firstName: '', lastName: '', email: '', phoneNumber: '' },
|
|
1715
|
+
groupIds: [],
|
|
1716
|
+
};
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
const RequiredMessage = 'error.requiredField';
|
|
1720
|
+
const MaxLengthMessage = 'error.maxLength';
|
|
1721
|
+
function createUserLoginSchema(options) {
|
|
1722
|
+
return schema((login) => {
|
|
1723
|
+
required(login.userName, { message: RequiredMessage });
|
|
1724
|
+
maxLength(login.userName, 100, { message: MaxLengthMessage });
|
|
1725
|
+
validateHttp(login.userName, {
|
|
1726
|
+
request: (context) => {
|
|
1727
|
+
const userName = context.value();
|
|
1728
|
+
return userName ? options.userNameAvailabilityUrl(userName) : undefined;
|
|
1729
|
+
},
|
|
1730
|
+
onSuccess: (isAvailable) => (isAvailable
|
|
1731
|
+
? undefined
|
|
1732
|
+
: { kind: 'userNameTaken', message: 'management.userNameAlreadyUsed' }),
|
|
1733
|
+
onError: () => undefined,
|
|
1734
|
+
debounce: 400,
|
|
1735
|
+
});
|
|
1736
|
+
required(login.password, {
|
|
1737
|
+
when: () => options.isNew(),
|
|
1738
|
+
message: RequiredMessage,
|
|
1739
|
+
});
|
|
1740
|
+
});
|
|
1741
|
+
}
|
|
1742
|
+
function createUserPersonalInformationSchema(options) {
|
|
1743
|
+
return schema((info) => {
|
|
1744
|
+
required(info.firstName, { message: RequiredMessage });
|
|
1745
|
+
maxLength(info.firstName, 100, { message: MaxLengthMessage });
|
|
1746
|
+
required(info.lastName, { message: RequiredMessage });
|
|
1747
|
+
maxLength(info.lastName, 100, { message: MaxLengthMessage });
|
|
1748
|
+
required(info.email, { message: RequiredMessage });
|
|
1749
|
+
email(info.email, { message: 'error.invalidEmail' });
|
|
1750
|
+
maxLength(info.email, 100, { message: MaxLengthMessage });
|
|
1751
|
+
readonly(info.email, { when: () => options.isEmailReadOnly() });
|
|
1752
|
+
pattern(info.phoneNumber, /^(\d{10})?$/, { message: 'error.invalidPhoneNumber' });
|
|
1753
|
+
});
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
class UserEditionService {
|
|
1757
|
+
constructor() {
|
|
1758
|
+
this.client = inject(HttpClient);
|
|
1759
|
+
this.baseUrl = inject(CaucaCoreService).getConfig().apiUrl;
|
|
1760
|
+
this.urlPrefix = inject(MANAGEMENT_URL_PREFIX, { optional: true }) ?? '';
|
|
1761
|
+
}
|
|
1762
|
+
getForEdition(userId) {
|
|
1763
|
+
return this.client.get(this.buildApiUrl(`UserEdition/${userId}`));
|
|
1764
|
+
}
|
|
1765
|
+
saveForEdition(user) {
|
|
1766
|
+
return this.client.post(this.buildApiUrl('UserEdition'), user);
|
|
1767
|
+
}
|
|
1768
|
+
userNameAvailabilityUrl(userName, userId) {
|
|
1769
|
+
const params = new HttpParams({ fromObject: { userName, userId } });
|
|
1770
|
+
return `${this.buildApiUrl('UserEdition/username-available')}?${params.toString()}`;
|
|
1771
|
+
}
|
|
1772
|
+
buildApiUrl(path) {
|
|
1773
|
+
const normalizedApiUrl = this.baseUrl.replace(/\/+$/, '');
|
|
1774
|
+
const normalizedPrefix = this.urlPrefix.trim().replace(/^\/+|\/+$/g, '');
|
|
1775
|
+
return normalizedPrefix
|
|
1776
|
+
? `${normalizedApiUrl}/${normalizedPrefix}/${path}`
|
|
1777
|
+
: `${normalizedApiUrl}/${path}`;
|
|
1778
|
+
}
|
|
1779
|
+
static { this.ɵfac = function UserEditionService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserEditionService)(); }; }
|
|
1780
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: UserEditionService, factory: UserEditionService.ɵfac, providedIn: 'root' }); }
|
|
1781
|
+
}
|
|
1782
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserEditionService, [{
|
|
1783
|
+
type: Injectable,
|
|
1784
|
+
args: [{
|
|
1785
|
+
providedIn: 'root'
|
|
1786
|
+
}]
|
|
1787
|
+
}], null, null); })();
|
|
1788
|
+
|
|
1789
|
+
class AssignableGroupsService {
|
|
1790
|
+
constructor() {
|
|
1791
|
+
this.client = inject(HttpClient);
|
|
1792
|
+
this.baseUrl = inject(CaucaCoreService).getConfig().apiUrl;
|
|
1793
|
+
this.urlPrefix = inject(MANAGEMENT_URL_PREFIX, { optional: true }) ?? '';
|
|
1794
|
+
}
|
|
1795
|
+
getAssignableGroups() {
|
|
1796
|
+
return this.client.get(this.buildApiUrl('GroupList/assignable'));
|
|
1797
|
+
}
|
|
1798
|
+
buildApiUrl(path) {
|
|
1799
|
+
const normalizedApiUrl = this.baseUrl.replace(/\/+$/, '');
|
|
1800
|
+
const normalizedPrefix = this.urlPrefix.trim().replace(/^\/+|\/+$/g, '');
|
|
1801
|
+
return normalizedPrefix
|
|
1802
|
+
? `${normalizedApiUrl}/${normalizedPrefix}/${path}`
|
|
1803
|
+
: `${normalizedApiUrl}/${path}`;
|
|
1804
|
+
}
|
|
1805
|
+
static { this.ɵfac = function AssignableGroupsService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AssignableGroupsService)(); }; }
|
|
1806
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AssignableGroupsService, factory: AssignableGroupsService.ɵfac, providedIn: 'root' }); }
|
|
1807
|
+
}
|
|
1808
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AssignableGroupsService, [{
|
|
1809
|
+
type: Injectable,
|
|
1810
|
+
args: [{
|
|
1811
|
+
providedIn: 'root'
|
|
1812
|
+
}]
|
|
1813
|
+
}], null, null); })();
|
|
1814
|
+
|
|
1815
|
+
const _c0$1 = ["*"];
|
|
1816
|
+
function UserLoginFieldsComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
1817
|
+
i0.ɵɵelement(0, "mat-progress-spinner", 4);
|
|
1818
|
+
} }
|
|
1819
|
+
class UserLoginFieldsComponent {
|
|
1820
|
+
constructor() {
|
|
1821
|
+
this.field = input.required(/* @ts-ignore */
|
|
1822
|
+
...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
|
|
1823
|
+
this.isNew = input(false, /* @ts-ignore */
|
|
1824
|
+
...(ngDevMode ? [{ debugName: "isNew" }] : /* istanbul ignore next */ []));
|
|
1825
|
+
this.isValidatingUserName = input(false, /* @ts-ignore */
|
|
1826
|
+
...(ngDevMode ? [{ debugName: "isValidatingUserName" }] : /* istanbul ignore next */ []));
|
|
1827
|
+
}
|
|
1828
|
+
static { this.ɵfac = function UserLoginFieldsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserLoginFieldsComponent)(); }; }
|
|
1829
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserLoginFieldsComponent, selectors: [["cauca-user-login-fields"]], inputs: { field: [1, "field"], isNew: [1, "isNew"], isValidatingUserName: [1, "isValidatingUserName"] }, ngContentSelectors: _c0$1, decls: 17, vars: 18, consts: [[3, "caption"], [1, "user-login-fields"], ["id", "user-name-field", "subscriptSizing", "dynamic"], ["matInput", "", 3, "formField"], ["matSuffix", "", "diameter", "16", "mode", "indeterminate"], [3, "field"], [1, "password-fields"], [3, "required", "formField"], ["color", "primary", 3, "formField"]], template: function UserLoginFieldsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1830
|
+
i0.ɵɵprojectionDef();
|
|
1831
|
+
i0.ɵɵelementStart(0, "cauca-expandable-panel", 0);
|
|
1832
|
+
i0.ɵɵpipe(1, "translate");
|
|
1833
|
+
i0.ɵɵelementStart(2, "div", 1)(3, "mat-form-field", 2)(4, "mat-label");
|
|
1834
|
+
i0.ɵɵtext(5);
|
|
1835
|
+
i0.ɵɵpipe(6, "translate");
|
|
1836
|
+
i0.ɵɵelementEnd();
|
|
1837
|
+
i0.ɵɵelement(7, "input", 3);
|
|
1838
|
+
i0.ɵɵpipe(8, "translate");
|
|
1839
|
+
i0.ɵɵcontrolCreate();
|
|
1840
|
+
i0.ɵɵconditionalCreate(9, UserLoginFieldsComponent_Conditional_9_Template, 1, 0, "mat-progress-spinner", 4);
|
|
1841
|
+
i0.ɵɵelementEnd();
|
|
1842
|
+
i0.ɵɵelement(10, "cauca-field-errors", 5);
|
|
1843
|
+
i0.ɵɵelementStart(11, "div", 6);
|
|
1844
|
+
i0.ɵɵelement(12, "cauca-password-selection", 7);
|
|
1845
|
+
i0.ɵɵcontrolCreate();
|
|
1846
|
+
i0.ɵɵelementEnd();
|
|
1847
|
+
i0.ɵɵelementStart(13, "mat-slide-toggle", 8);
|
|
1848
|
+
i0.ɵɵtext(14);
|
|
1849
|
+
i0.ɵɵpipe(15, "translate");
|
|
1850
|
+
i0.ɵɵelementEnd();
|
|
1851
|
+
i0.ɵɵcontrolCreate();
|
|
1852
|
+
i0.ɵɵprojection(16);
|
|
1853
|
+
i0.ɵɵelementEnd()();
|
|
1854
|
+
} if (rf & 2) {
|
|
1855
|
+
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(1, 10, "userEdition.loginSectionCaption"));
|
|
1856
|
+
i0.ɵɵadvance(5);
|
|
1857
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 12, "management.userName"));
|
|
1858
|
+
i0.ɵɵadvance(2);
|
|
1859
|
+
i0.ɵɵproperty("formField", ctx.field().userName);
|
|
1860
|
+
i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(8, 14, "management.userName"));
|
|
1861
|
+
i0.ɵɵcontrol();
|
|
1862
|
+
i0.ɵɵadvance(2);
|
|
1863
|
+
i0.ɵɵconditional(ctx.isValidatingUserName() ? 9 : -1);
|
|
1864
|
+
i0.ɵɵadvance();
|
|
1865
|
+
i0.ɵɵproperty("field", ctx.field().userName);
|
|
1866
|
+
i0.ɵɵadvance(2);
|
|
1867
|
+
i0.ɵɵproperty("required", ctx.isNew())("formField", ctx.field().password);
|
|
1868
|
+
i0.ɵɵcontrol();
|
|
1869
|
+
i0.ɵɵadvance();
|
|
1870
|
+
i0.ɵɵproperty("formField", ctx.field().twoFactorAuthenticatorEnabled);
|
|
1871
|
+
i0.ɵɵcontrol();
|
|
1872
|
+
i0.ɵɵadvance();
|
|
1873
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(15, 16, "userEdition.twoFactorAuthenticatorEnabled"), " ");
|
|
1874
|
+
} }, dependencies: [ExpandablePanelComponent,
|
|
1875
|
+
FieldErrorsComponent,
|
|
1876
|
+
FormField,
|
|
1877
|
+
MatFormFieldModule, i1$2.MatFormField, i1$2.MatLabel, i1$2.MatSuffix, MatInputModule, i2.MatInput, MatProgressSpinnerModule, i3$2.MatProgressSpinner, MatSlideToggleModule, i3$1.MatSlideToggle, PasswordSelectionComponent,
|
|
1878
|
+
TranslatePipe], styles: ["[_nghost-%COMP%]{display:block}.user-login-fields[_ngcontent-%COMP%]{display:flex;flex-direction:column}.user-login-fields[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]:not(:first-child), .user-login-fields[_ngcontent-%COMP%] .password-fields[_ngcontent-%COMP%], .user-login-fields[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{margin-top:1.25rem}"] }); }
|
|
1879
|
+
}
|
|
1880
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserLoginFieldsComponent, [{
|
|
1881
|
+
type: Component,
|
|
1882
|
+
args: [{ selector: 'cauca-user-login-fields', imports: [
|
|
1883
|
+
ExpandablePanelComponent,
|
|
1884
|
+
FieldErrorsComponent,
|
|
1885
|
+
FormField,
|
|
1886
|
+
MatFormFieldModule,
|
|
1887
|
+
MatInputModule,
|
|
1888
|
+
MatProgressSpinnerModule,
|
|
1889
|
+
MatSlideToggleModule,
|
|
1890
|
+
PasswordSelectionComponent,
|
|
1891
|
+
TranslatePipe,
|
|
1892
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<cauca-expandable-panel [caption]=\"'userEdition.loginSectionCaption' | translate\">\n <div class=\"user-login-fields\">\n <mat-form-field id=\"user-name-field\" subscriptSizing=\"dynamic\">\n <mat-label>{{ 'management.userName' | translate }}</mat-label>\n <input matInput [attr.aria-label]=\"'management.userName' | translate\" [formField]=\"field().userName\">\n @if (isValidatingUserName()) {\n <mat-progress-spinner matSuffix diameter=\"16\" mode=\"indeterminate\"/>\n }\n </mat-form-field>\n <cauca-field-errors [field]=\"field().userName\"/>\n\n <div class=\"password-fields\">\n <cauca-password-selection [required]=\"isNew()\" [formField]=\"field().password\"/>\n </div>\n\n <mat-slide-toggle color=\"primary\" [formField]=\"field().twoFactorAuthenticatorEnabled\">\n {{ 'userEdition.twoFactorAuthenticatorEnabled' | translate }}\n </mat-slide-toggle>\n\n <ng-content/>\n </div>\n</cauca-expandable-panel>\n", styles: [":host{display:block}.user-login-fields{display:flex;flex-direction:column}.user-login-fields mat-form-field:not(:first-child),.user-login-fields .password-fields,.user-login-fields mat-slide-toggle{margin-top:1.25rem}\n"] }]
|
|
1893
|
+
}], null, { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], isNew: [{ type: i0.Input, args: [{ isSignal: true, alias: "isNew", required: false }] }], isValidatingUserName: [{ type: i0.Input, args: [{ isSignal: true, alias: "isValidatingUserName", required: false }] }] }); })();
|
|
1894
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserLoginFieldsComponent, { className: "UserLoginFieldsComponent", filePath: "lib/components/user-login-fields/user-login-fields.component.ts", lineNumber: 28 }); })();
|
|
1895
|
+
|
|
1896
|
+
const _c0 = ["*"];
|
|
1897
|
+
function UserPersonalInformationFieldsComponent_Conditional_23_Template(rf, ctx) { if (rf & 1) {
|
|
1898
|
+
i0.ɵɵelementStart(0, "mat-hint");
|
|
1899
|
+
i0.ɵɵtext(1);
|
|
1900
|
+
i0.ɵɵpipe(2, "translate");
|
|
1901
|
+
i0.ɵɵelementEnd();
|
|
1902
|
+
} if (rf & 2) {
|
|
1903
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
1904
|
+
i0.ɵɵadvance();
|
|
1905
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.emailHint()));
|
|
1906
|
+
} }
|
|
1907
|
+
class UserPersonalInformationFieldsComponent {
|
|
1908
|
+
constructor() {
|
|
1909
|
+
this.field = input.required(/* @ts-ignore */
|
|
1910
|
+
...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
|
|
1911
|
+
this.isEmailReadOnly = input(false, /* @ts-ignore */
|
|
1912
|
+
...(ngDevMode ? [{ debugName: "isEmailReadOnly" }] : /* istanbul ignore next */ []));
|
|
1913
|
+
this.emailHint = input('', /* @ts-ignore */
|
|
1914
|
+
...(ngDevMode ? [{ debugName: "emailHint" }] : /* istanbul ignore next */ []));
|
|
1915
|
+
}
|
|
1916
|
+
static { this.ɵfac = function UserPersonalInformationFieldsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserPersonalInformationFieldsComponent)(); }; }
|
|
1917
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserPersonalInformationFieldsComponent, selectors: [["cauca-user-personal-information-fields"]], inputs: { field: [1, "field"], isEmailReadOnly: [1, "isEmailReadOnly"], emailHint: [1, "emailHint"] }, ngContentSelectors: _c0, decls: 27, vars: 30, consts: [[3, "caption"], [1, "user-personal-information-fields"], ["id", "first-name-field", "subscriptSizing", "dynamic"], ["matInput", "", 3, "formField"], [3, "field"], ["id", "last-name-field", "subscriptSizing", "dynamic"], ["id", "email-field", "subscriptSizing", "dynamic"], [3, "formField", "label"]], template: function UserPersonalInformationFieldsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1918
|
+
i0.ɵɵprojectionDef();
|
|
1919
|
+
i0.ɵɵelementStart(0, "cauca-expandable-panel", 0);
|
|
1920
|
+
i0.ɵɵpipe(1, "translate");
|
|
1921
|
+
i0.ɵɵelementStart(2, "div", 1)(3, "mat-form-field", 2)(4, "mat-label");
|
|
1922
|
+
i0.ɵɵtext(5);
|
|
1923
|
+
i0.ɵɵpipe(6, "translate");
|
|
1924
|
+
i0.ɵɵelementEnd();
|
|
1925
|
+
i0.ɵɵelement(7, "input", 3);
|
|
1926
|
+
i0.ɵɵpipe(8, "translate");
|
|
1927
|
+
i0.ɵɵcontrolCreate();
|
|
1928
|
+
i0.ɵɵelementEnd();
|
|
1929
|
+
i0.ɵɵelement(9, "cauca-field-errors", 4);
|
|
1930
|
+
i0.ɵɵelementStart(10, "mat-form-field", 5)(11, "mat-label");
|
|
1931
|
+
i0.ɵɵtext(12);
|
|
1932
|
+
i0.ɵɵpipe(13, "translate");
|
|
1933
|
+
i0.ɵɵelementEnd();
|
|
1934
|
+
i0.ɵɵelement(14, "input", 3);
|
|
1935
|
+
i0.ɵɵpipe(15, "translate");
|
|
1936
|
+
i0.ɵɵcontrolCreate();
|
|
1937
|
+
i0.ɵɵelementEnd();
|
|
1938
|
+
i0.ɵɵelement(16, "cauca-field-errors", 4);
|
|
1939
|
+
i0.ɵɵelementStart(17, "mat-form-field", 6)(18, "mat-label");
|
|
1940
|
+
i0.ɵɵtext(19);
|
|
1941
|
+
i0.ɵɵpipe(20, "translate");
|
|
1942
|
+
i0.ɵɵelementEnd();
|
|
1943
|
+
i0.ɵɵelement(21, "input", 3);
|
|
1944
|
+
i0.ɵɵpipe(22, "translate");
|
|
1945
|
+
i0.ɵɵcontrolCreate();
|
|
1946
|
+
i0.ɵɵconditionalCreate(23, UserPersonalInformationFieldsComponent_Conditional_23_Template, 3, 3, "mat-hint");
|
|
1947
|
+
i0.ɵɵelementEnd();
|
|
1948
|
+
i0.ɵɵelement(24, "cauca-field-errors", 4)(25, "cauca-phone-number-input", 7);
|
|
1949
|
+
i0.ɵɵcontrolCreate();
|
|
1950
|
+
i0.ɵɵprojection(26);
|
|
1951
|
+
i0.ɵɵelementEnd()();
|
|
1952
|
+
} if (rf & 2) {
|
|
1953
|
+
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(1, 16, "userEdition.personalInformationSectionCaption"));
|
|
1954
|
+
i0.ɵɵadvance(5);
|
|
1955
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 18, "management.firstName"));
|
|
1956
|
+
i0.ɵɵadvance(2);
|
|
1957
|
+
i0.ɵɵproperty("formField", ctx.field().firstName);
|
|
1958
|
+
i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(8, 20, "management.firstName"));
|
|
1959
|
+
i0.ɵɵcontrol();
|
|
1960
|
+
i0.ɵɵadvance(2);
|
|
1961
|
+
i0.ɵɵproperty("field", ctx.field().firstName);
|
|
1962
|
+
i0.ɵɵadvance(3);
|
|
1963
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 22, "management.lastName"));
|
|
1964
|
+
i0.ɵɵadvance(2);
|
|
1965
|
+
i0.ɵɵproperty("formField", ctx.field().lastName);
|
|
1966
|
+
i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(15, 24, "management.lastName"));
|
|
1967
|
+
i0.ɵɵcontrol();
|
|
1968
|
+
i0.ɵɵadvance(2);
|
|
1969
|
+
i0.ɵɵproperty("field", ctx.field().lastName);
|
|
1970
|
+
i0.ɵɵadvance(3);
|
|
1971
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(20, 26, "management.email"));
|
|
1972
|
+
i0.ɵɵadvance(2);
|
|
1973
|
+
i0.ɵɵproperty("formField", ctx.field().email);
|
|
1974
|
+
i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(22, 28, "management.email"));
|
|
1975
|
+
i0.ɵɵcontrol();
|
|
1976
|
+
i0.ɵɵadvance(2);
|
|
1977
|
+
i0.ɵɵconditional(ctx.isEmailReadOnly() && ctx.emailHint() ? 23 : -1);
|
|
1978
|
+
i0.ɵɵadvance();
|
|
1979
|
+
i0.ɵɵproperty("field", ctx.field().email);
|
|
1980
|
+
i0.ɵɵadvance();
|
|
1981
|
+
i0.ɵɵproperty("formField", ctx.field().phoneNumber)("label", "management.phoneNumber");
|
|
1982
|
+
i0.ɵɵcontrol();
|
|
1983
|
+
} }, dependencies: [ExpandablePanelComponent,
|
|
1984
|
+
FieldErrorsComponent,
|
|
1985
|
+
FormField,
|
|
1986
|
+
MatFormFieldModule, i1$2.MatFormField, i1$2.MatLabel, i1$2.MatHint, MatInputModule, i2.MatInput, PhoneNumberInputComponent,
|
|
1987
|
+
TranslatePipe], styles: ["[_nghost-%COMP%]{display:block}.user-personal-information-fields[_ngcontent-%COMP%]{display:flex;flex-direction:column}.user-personal-information-fields[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]:not(:first-child), .user-personal-information-fields[_ngcontent-%COMP%] cauca-phone-number-input[_ngcontent-%COMP%]{margin-top:1.25rem}"] }); }
|
|
1988
|
+
}
|
|
1989
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserPersonalInformationFieldsComponent, [{
|
|
1990
|
+
type: Component,
|
|
1991
|
+
args: [{ selector: 'cauca-user-personal-information-fields', imports: [
|
|
1992
|
+
ExpandablePanelComponent,
|
|
1993
|
+
FieldErrorsComponent,
|
|
1994
|
+
FormField,
|
|
1995
|
+
MatFormFieldModule,
|
|
1996
|
+
MatInputModule,
|
|
1997
|
+
PhoneNumberInputComponent,
|
|
1998
|
+
TranslatePipe,
|
|
1999
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<cauca-expandable-panel [caption]=\"'userEdition.personalInformationSectionCaption' | translate\">\n <div class=\"user-personal-information-fields\">\n <mat-form-field id=\"first-name-field\" subscriptSizing=\"dynamic\">\n <mat-label>{{ 'management.firstName' | translate }}</mat-label>\n <input matInput [attr.aria-label]=\"'management.firstName' | translate\" [formField]=\"field().firstName\">\n </mat-form-field>\n <cauca-field-errors [field]=\"field().firstName\"/>\n\n <mat-form-field id=\"last-name-field\" subscriptSizing=\"dynamic\">\n <mat-label>{{ 'management.lastName' | translate }}</mat-label>\n <input matInput [attr.aria-label]=\"'management.lastName' | translate\" [formField]=\"field().lastName\">\n </mat-form-field>\n <cauca-field-errors [field]=\"field().lastName\"/>\n\n <mat-form-field id=\"email-field\" subscriptSizing=\"dynamic\">\n <mat-label>{{ 'management.email' | translate }}</mat-label>\n <input matInput [attr.aria-label]=\"'management.email' | translate\" [formField]=\"field().email\">\n @if (isEmailReadOnly() && emailHint()) {\n <mat-hint>{{ emailHint() | translate }}</mat-hint>\n }\n </mat-form-field>\n <cauca-field-errors [field]=\"field().email\"/>\n\n <cauca-phone-number-input [formField]=\"field().phoneNumber\" [label]=\"'management.phoneNumber'\"/>\n\n <ng-content/>\n </div>\n</cauca-expandable-panel>\n", styles: [":host{display:block}.user-personal-information-fields{display:flex;flex-direction:column}.user-personal-information-fields mat-form-field:not(:first-child),.user-personal-information-fields cauca-phone-number-input{margin-top:1.25rem}\n"] }]
|
|
2000
|
+
}], null, { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], isEmailReadOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEmailReadOnly", required: false }] }], emailHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "emailHint", required: false }] }] }); })();
|
|
2001
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserPersonalInformationFieldsComponent, { className: "UserPersonalInformationFieldsComponent", filePath: "lib/components/user-personal-information-fields/user-personal-information-fields.component.ts", lineNumber: 24 }); })();
|
|
2002
|
+
|
|
2003
|
+
const _forTrack0 = ($index, $item) => $item.id;
|
|
2004
|
+
function UserGroupsSelectorComponent_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
2005
|
+
i0.ɵɵelementStart(0, "mat-option", 3);
|
|
2006
|
+
i0.ɵɵtext(1);
|
|
2007
|
+
i0.ɵɵelementEnd();
|
|
2008
|
+
} if (rf & 2) {
|
|
2009
|
+
const option_r1 = ctx.$implicit;
|
|
2010
|
+
i0.ɵɵproperty("value", option_r1.id);
|
|
2011
|
+
i0.ɵɵadvance();
|
|
2012
|
+
i0.ɵɵtextInterpolate(option_r1.name);
|
|
2013
|
+
} }
|
|
2014
|
+
class UserGroupsSelectorComponent {
|
|
2015
|
+
constructor() {
|
|
2016
|
+
this.value = model([], /* @ts-ignore */
|
|
2017
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2018
|
+
this.label = input('management.groups', /* @ts-ignore */
|
|
2019
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2020
|
+
this.disabled = input(false, /* @ts-ignore */
|
|
2021
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2022
|
+
// Shadowing the `readonly` keyword as a property name is mandated by
|
|
2023
|
+
// `FormUiControl.readonly` — see `base-file-picker.ts`.
|
|
2024
|
+
this.readonly = input(false, /* @ts-ignore */
|
|
2025
|
+
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
2026
|
+
this.required = input(false, /* @ts-ignore */
|
|
2027
|
+
...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
2028
|
+
this.invalid = input(false, /* @ts-ignore */
|
|
2029
|
+
...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
2030
|
+
this.touched = input(false, /* @ts-ignore */
|
|
2031
|
+
...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
2032
|
+
this.name = input('', /* @ts-ignore */
|
|
2033
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
2034
|
+
this.errors = input([], /* @ts-ignore */
|
|
2035
|
+
...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
2036
|
+
this.touch = output();
|
|
2037
|
+
this.filterControl = new FormControl('');
|
|
2038
|
+
this.options = computed(() => this.groups.value(), /* @ts-ignore */
|
|
2039
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
2040
|
+
this.filteredOptions = computed(() => {
|
|
2041
|
+
const filter = toLowerCaseAndWithoutDiacritics(this.filterText() ?? '');
|
|
2042
|
+
return filter
|
|
2043
|
+
? this.options().filter((option) => toLowerCaseAndWithoutDiacritics(option.name).includes(filter))
|
|
2044
|
+
: this.options();
|
|
2045
|
+
}, /* @ts-ignore */
|
|
2046
|
+
...(ngDevMode ? [{ debugName: "filteredOptions" }] : /* istanbul ignore next */ []));
|
|
2047
|
+
this.isSelectDisabled = computed(() => this.disabled() || this.readonly() || this.options().length === 0, /* @ts-ignore */
|
|
2048
|
+
...(ngDevMode ? [{ debugName: "isSelectDisabled" }] : /* istanbul ignore next */ []));
|
|
2049
|
+
this.assignableGroupsService = inject(AssignableGroupsService);
|
|
2050
|
+
this.filterText = toSignal(this.filterControl.valueChanges, { initialValue: '' });
|
|
2051
|
+
this.groups = rxResource({
|
|
2052
|
+
stream: () => this.assignableGroupsService.getAssignableGroups(),
|
|
2053
|
+
defaultValue: [],
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
onSelectionChange(groupIds) {
|
|
2057
|
+
this.value.set(groupIds);
|
|
2058
|
+
this.touch.emit();
|
|
2059
|
+
}
|
|
2060
|
+
static { this.ɵfac = function UserGroupsSelectorComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserGroupsSelectorComponent)(); }; }
|
|
2061
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserGroupsSelectorComponent, selectors: [["cauca-user-groups-selector"]], inputs: { value: [1, "value"], label: [1, "label"], disabled: [1, "disabled"], readonly: [1, "readonly"], required: [1, "required"], invalid: [1, "invalid"], touched: [1, "touched"], name: [1, "name"], errors: [1, "errors"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 12, vars: 17, consts: [["subscriptSizing", "dynamic", 1, "user-groups-selector-field"], ["multiple", "", 3, "valueChange", "value", "disabled", "required"], [3, "formControl", "placeholderLabel", "noEntriesFoundLabel"], [3, "value"], [3, "touched", "errors"]], template: function UserGroupsSelectorComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2062
|
+
i0.ɵɵelementStart(0, "mat-form-field", 0)(1, "mat-label");
|
|
2063
|
+
i0.ɵɵtext(2);
|
|
2064
|
+
i0.ɵɵpipe(3, "translate");
|
|
2065
|
+
i0.ɵɵelementEnd();
|
|
2066
|
+
i0.ɵɵelementStart(4, "mat-select", 1);
|
|
2067
|
+
i0.ɵɵlistener("valueChange", function UserGroupsSelectorComponent_Template_mat_select_valueChange_4_listener($event) { return ctx.onSelectionChange($event); });
|
|
2068
|
+
i0.ɵɵelementStart(5, "mat-option");
|
|
2069
|
+
i0.ɵɵelement(6, "ngx-mat-select-search", 2);
|
|
2070
|
+
i0.ɵɵpipe(7, "translate");
|
|
2071
|
+
i0.ɵɵpipe(8, "translate");
|
|
2072
|
+
i0.ɵɵcontrolCreate();
|
|
2073
|
+
i0.ɵɵelementEnd();
|
|
2074
|
+
i0.ɵɵrepeaterCreate(9, UserGroupsSelectorComponent_For_10_Template, 2, 2, "mat-option", 3, _forTrack0);
|
|
2075
|
+
i0.ɵɵelementEnd()();
|
|
2076
|
+
i0.ɵɵelement(11, "cauca-control-field-errors", 4);
|
|
2077
|
+
} if (rf & 2) {
|
|
2078
|
+
i0.ɵɵadvance(2);
|
|
2079
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 11, ctx.label()));
|
|
2080
|
+
i0.ɵɵadvance(2);
|
|
2081
|
+
i0.ɵɵproperty("value", ctx.value())("disabled", ctx.isSelectDisabled())("required", ctx.required());
|
|
2082
|
+
i0.ɵɵattribute("aria-invalid", ctx.invalid())("name", ctx.name() || null);
|
|
2083
|
+
i0.ɵɵadvance(2);
|
|
2084
|
+
i0.ɵɵproperty("formControl", ctx.filterControl)("placeholderLabel", i0.ɵɵpipeBind1(7, 13, "search"))("noEntriesFoundLabel", i0.ɵɵpipeBind1(8, 15, "noResult"));
|
|
2085
|
+
i0.ɵɵcontrol();
|
|
2086
|
+
i0.ɵɵadvance(3);
|
|
2087
|
+
i0.ɵɵrepeater(ctx.filteredOptions());
|
|
2088
|
+
i0.ɵɵadvance(2);
|
|
2089
|
+
i0.ɵɵproperty("touched", ctx.touched())("errors", ctx.errors());
|
|
2090
|
+
} }, dependencies: [ControlFieldErrorsComponent,
|
|
2091
|
+
MatFormFieldModule, i1$2.MatFormField, i1$2.MatLabel, MatSelectModule, i2$2.MatSelect, i2$2.MatOption, NgxMatSelectSearchModule, i3$3.MatSelectSearchComponent, ReactiveFormsModule, i5.NgControlStatus, i5.FormControlDirective, TranslatePipe], styles: ["[_nghost-%COMP%]{display:block}.user-groups-selector-field[_ngcontent-%COMP%]{width:100%}"] }); }
|
|
2092
|
+
}
|
|
2093
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserGroupsSelectorComponent, [{
|
|
2094
|
+
type: Component,
|
|
2095
|
+
args: [{ selector: 'cauca-user-groups-selector', imports: [
|
|
2096
|
+
ControlFieldErrorsComponent,
|
|
2097
|
+
MatFormFieldModule,
|
|
2098
|
+
MatSelectModule,
|
|
2099
|
+
NgxMatSelectSearchModule,
|
|
2100
|
+
ReactiveFormsModule,
|
|
2101
|
+
TranslatePipe,
|
|
2102
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field class=\"user-groups-selector-field\" subscriptSizing=\"dynamic\">\n <mat-label>{{ label() | translate }}</mat-label>\n <mat-select multiple [value]=\"value()\" [disabled]=\"isSelectDisabled()\"\n [required]=\"required()\"\n [attr.aria-invalid]=\"invalid()\"\n [attr.name]=\"name() || null\"\n (valueChange)=\"onSelectionChange($event)\">\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"filterControl\"\n [placeholderLabel]=\"'search' | translate\"\n [noEntriesFoundLabel]=\"'noResult' | translate\"/>\n </mat-option>\n\n @for (option of filteredOptions(); track option.id) {\n <mat-option [value]=\"option.id\">{{ option.name }}</mat-option>\n }\n </mat-select>\n</mat-form-field>\n\n<cauca-control-field-errors [touched]=\"touched()\" [errors]=\"errors()\"/>\n", styles: [":host{display:block}.user-groups-selector-field{width:100%}\n"] }]
|
|
2103
|
+
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
|
|
2104
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserGroupsSelectorComponent, { className: "UserGroupsSelectorComponent", filePath: "lib/components/user-groups-selector/user-groups-selector.component.ts", lineNumber: 28 }); })();
|
|
2105
|
+
|
|
1701
2106
|
/*
|
|
1702
2107
|
* Public API Surface of cauca-management
|
|
1703
2108
|
*/
|
|
@@ -1706,5 +2111,5 @@ class UsersPageComponent {
|
|
|
1706
2111
|
* Generated bundle index. Do not edit.
|
|
1707
2112
|
*/
|
|
1708
2113
|
|
|
1709
|
-
export { AllScopeToken, GroupEditionPageComponent, GroupsPageComponent, MANAGEMENT_ROUTE_SEGMENT, MANAGEMENT_URL_PREFIX, REFRESHABLE_PERMISSION_STATE_TOKEN, ScopeListGridColumnComponent, UserListGridComponent, UserPermissionsDialogComponent, UsersPageComponent, managementGroupRoutes, provideCaucaManagement };
|
|
2114
|
+
export { AllScopeToken, AssignableGroupsService, EmptyUserId, GroupEditionPageComponent, GroupsPageComponent, MANAGEMENT_ROUTE_SEGMENT, MANAGEMENT_URL_PREFIX, REFRESHABLE_PERMISSION_STATE_TOKEN, ScopeListGridColumnComponent, UserEditionService, UserGroupsSelectorComponent, UserListGridComponent, UserLoginFieldsComponent, UserPermissionsDialogComponent, UserPersonalInformationFieldsComponent, UsersPageComponent, createEmptyUserForEdition, createUserLoginSchema, createUserPersonalInformationSchema, managementGroupRoutes, provideCaucaManagement };
|
|
1710
2115
|
//# sourceMappingURL=cauca-911-management.mjs.map
|