@cauca-911/management 22.0.0 → 22.0.1
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 +6 -0
- package/assets/i18n/cauca/es-management.json +6 -0
- package/assets/i18n/cauca/fr-management.json +6 -0
- package/fesm2022/cauca-911-management.mjs +254 -11
- package/fesm2022/cauca-911-management.mjs.map +1 -1
- package/package.json +1 -1
- package/types/cauca-911-management.d.ts +40 -2
|
@@ -40,5 +40,11 @@
|
|
|
40
40
|
"permissionAllowed": "Allowed",
|
|
41
41
|
"permissionBlocked": "Blocked",
|
|
42
42
|
"permissionNeitherSet": "Not set"
|
|
43
|
+
},
|
|
44
|
+
"userPermissionDetails": {
|
|
45
|
+
"title": "Effective permissions",
|
|
46
|
+
"originsLabel": "Origins",
|
|
47
|
+
"userOverrideOrigin": "Direct override",
|
|
48
|
+
"noOrigins": "No origin"
|
|
43
49
|
}
|
|
44
50
|
}
|
|
@@ -40,5 +40,11 @@
|
|
|
40
40
|
"permissionAllowed": "Permitido",
|
|
41
41
|
"permissionBlocked": "Bloqueado",
|
|
42
42
|
"permissionNeitherSet": "Sin definir"
|
|
43
|
+
},
|
|
44
|
+
"userPermissionDetails": {
|
|
45
|
+
"title": "Permisos efectivos",
|
|
46
|
+
"originsLabel": "Orígenes",
|
|
47
|
+
"userOverrideOrigin": "Anulación directa",
|
|
48
|
+
"noOrigins": "Sin origen"
|
|
43
49
|
}
|
|
44
50
|
}
|
|
@@ -40,5 +40,11 @@
|
|
|
40
40
|
"permissionAllowed": "Autorisé",
|
|
41
41
|
"permissionBlocked": "Bloqué",
|
|
42
42
|
"permissionNeitherSet": "Non défini"
|
|
43
|
+
},
|
|
44
|
+
"userPermissionDetails": {
|
|
45
|
+
"title": "Permissions effectives",
|
|
46
|
+
"originsLabel": "Origines",
|
|
47
|
+
"userOverrideOrigin": "Substitution directe",
|
|
48
|
+
"noOrigins": "Aucune origine"
|
|
43
49
|
}
|
|
44
50
|
}
|
|
@@ -24,7 +24,7 @@ import * as i1$1 from '@angular/material/dialog';
|
|
|
24
24
|
import { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
25
25
|
import * as i4 from '@angular/material/icon';
|
|
26
26
|
import { MatIconModule, MatIcon } from '@angular/material/icon';
|
|
27
|
-
import { toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
27
|
+
import { toSignal, toObservable, rxResource } from '@angular/core/rxjs-interop';
|
|
28
28
|
import { v4 } from 'uuid';
|
|
29
29
|
import * as i4$1 from '@angular/material/list';
|
|
30
30
|
import { MatListModule } from '@angular/material/list';
|
|
@@ -32,6 +32,8 @@ import * as i6 from '@angular/material/tooltip';
|
|
|
32
32
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
33
33
|
import * as i3 from '@angular/material/checkbox';
|
|
34
34
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
35
|
+
import * as i2$1 from '@angular/material/menu';
|
|
36
|
+
import { MatMenuModule } from '@angular/material/menu';
|
|
35
37
|
import * as i1$3 from '@cauca-911/devextreme';
|
|
36
38
|
import { CaucaDevextremeModule } from '@cauca-911/devextreme';
|
|
37
39
|
import * as i4$2 from 'devextreme-angular/ui/check-box';
|
|
@@ -42,7 +44,7 @@ import * as i6$1 from 'devextreme-angular/ui/tag-box';
|
|
|
42
44
|
import { DxTagBoxModule } from 'devextreme-angular/ui/tag-box';
|
|
43
45
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
44
46
|
import { map } from 'rxjs/operators';
|
|
45
|
-
import * as i2$
|
|
47
|
+
import * as i2$2 from 'devextreme-angular/ui/nested';
|
|
46
48
|
import * as i3$2 from 'devextreme-angular/core';
|
|
47
49
|
|
|
48
50
|
const MANAGEMENT_URL_PREFIX = new InjectionToken('MANAGEMENT_URL_PREFIX');
|
|
@@ -364,7 +366,7 @@ class UserSearchService {
|
|
|
364
366
|
}], null, null); })();
|
|
365
367
|
|
|
366
368
|
const _c0$2 = ["resultPaginator"];
|
|
367
|
-
const _forTrack0$
|
|
369
|
+
const _forTrack0$3 = ($index, $item) => $item.id;
|
|
368
370
|
function GroupUserSelectionDialogComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
369
371
|
i0.ɵɵelementStart(0, "div", 8);
|
|
370
372
|
i0.ɵɵtext(1);
|
|
@@ -416,7 +418,7 @@ function GroupUserSelectionDialogComponent_Conditional_17_Template(rf, ctx) { if
|
|
|
416
418
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
417
419
|
i0.ɵɵelementStart(0, "mat-selection-list", 18);
|
|
418
420
|
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)); });
|
|
419
|
-
i0.ɵɵrepeaterCreate(1, GroupUserSelectionDialogComponent_Conditional_17_For_2_Template, 4, 6, "mat-list-option", 19, _forTrack0$
|
|
421
|
+
i0.ɵɵrepeaterCreate(1, GroupUserSelectionDialogComponent_Conditional_17_For_2_Template, 4, 6, "mat-list-option", 19, _forTrack0$3);
|
|
420
422
|
i0.ɵɵelementEnd();
|
|
421
423
|
i0.ɵɵconditionalCreate(3, GroupUserSelectionDialogComponent_Conditional_17_Conditional_3_Template, 2, 2, "cauca-list-paginator", 20);
|
|
422
424
|
} if (rf & 2) {
|
|
@@ -607,7 +609,7 @@ class GroupUserSelectionDialogComponent {
|
|
|
607
609
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GroupUserSelectionDialogComponent, { className: "GroupUserSelectionDialogComponent", filePath: "lib/components/group-user-selection-dialog/group-user-selection-dialog.component.ts", lineNumber: 46 }); })();
|
|
608
610
|
|
|
609
611
|
const _c0$1 = ["paginator"];
|
|
610
|
-
const _forTrack0$
|
|
612
|
+
const _forTrack0$2 = ($index, $item) => $item.id;
|
|
611
613
|
function GroupUserEditionListComponent_For_10_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
612
614
|
i0.ɵɵelementStart(0, "div", 11);
|
|
613
615
|
i0.ɵɵtext(1);
|
|
@@ -757,7 +759,7 @@ class GroupUserEditionListComponent {
|
|
|
757
759
|
i0.ɵɵtext(7, "search");
|
|
758
760
|
i0.ɵɵelementEnd()();
|
|
759
761
|
i0.ɵɵelementStart(8, "mat-list", 5);
|
|
760
|
-
i0.ɵɵrepeaterCreate(9, GroupUserEditionListComponent_For_10_Template, 8, 5, "mat-list-item", 6, _forTrack0$
|
|
762
|
+
i0.ɵɵrepeaterCreate(9, GroupUserEditionListComponent_For_10_Template, 8, 5, "mat-list-item", 6, _forTrack0$2, false, GroupUserEditionListComponent_ForEmpty_11_Template, 2, 1);
|
|
761
763
|
i0.ɵɵelementEnd();
|
|
762
764
|
i0.ɵɵconditionalCreate(12, GroupUserEditionListComponent_Conditional_12_Template, 2, 2, "cauca-list-paginator", 7);
|
|
763
765
|
i0.ɵɵelementStart(13, "cauca-raised-button", 8);
|
|
@@ -830,7 +832,7 @@ class PermissionManagementService {
|
|
|
830
832
|
}]
|
|
831
833
|
}], null, null); })();
|
|
832
834
|
|
|
833
|
-
const _forTrack0 = ($index, $item) => $item.id;
|
|
835
|
+
const _forTrack0$1 = ($index, $item) => $item.id;
|
|
834
836
|
function GroupPermissionListComponent_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
835
837
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
836
838
|
i0.ɵɵelementStart(0, "mat-list-item", 4)(1, "mat-checkbox", 6);
|
|
@@ -915,7 +917,7 @@ class GroupPermissionListComponent {
|
|
|
915
917
|
i0.ɵɵtext(6, "search");
|
|
916
918
|
i0.ɵɵelementEnd()();
|
|
917
919
|
i0.ɵɵelementStart(7, "mat-selection-list", 3);
|
|
918
|
-
i0.ɵɵrepeaterCreate(8, GroupPermissionListComponent_For_9_Template, 3, 4, "mat-list-item", 4, _forTrack0, false, GroupPermissionListComponent_ForEmpty_10_Template, 6, 3, "div", 5);
|
|
920
|
+
i0.ɵɵrepeaterCreate(8, GroupPermissionListComponent_For_9_Template, 3, 4, "mat-list-item", 4, _forTrack0$1, false, GroupPermissionListComponent_ForEmpty_10_Template, 6, 3, "div", 5);
|
|
919
921
|
i0.ɵɵelementEnd();
|
|
920
922
|
} if (rf & 2) {
|
|
921
923
|
i0.ɵɵadvance(2);
|
|
@@ -1154,6 +1156,247 @@ var groupEditionPage_component = /*#__PURE__*/Object.freeze({
|
|
|
1154
1156
|
GroupEditionPageComponent: GroupEditionPageComponent
|
|
1155
1157
|
});
|
|
1156
1158
|
|
|
1159
|
+
class UserPermissionDetailService {
|
|
1160
|
+
constructor() {
|
|
1161
|
+
this.client = inject(HttpClient);
|
|
1162
|
+
this.loadingState = inject(LoadingStateService, { optional: true });
|
|
1163
|
+
this.baseUrl = this.buildBaseUrl(inject(CaucaCoreService).getConfig().apiUrl, inject(MANAGEMENT_URL_PREFIX, { optional: true }));
|
|
1164
|
+
}
|
|
1165
|
+
getForUser(userId) {
|
|
1166
|
+
const request$ = this.client.get(this.buildApiUrl(`UserPermissionDetails/user/${userId}`));
|
|
1167
|
+
return this.loadingState ? this.loadingState.withLoadingIndicator(request$) : request$;
|
|
1168
|
+
}
|
|
1169
|
+
buildBaseUrl(apiUrl, urlPrefix) {
|
|
1170
|
+
const normalizedApiUrl = apiUrl.replace(/\/+$/, '');
|
|
1171
|
+
const normalizedPrefix = urlPrefix?.trim().replace(/^\/+|\/+$/g, '');
|
|
1172
|
+
return normalizedPrefix
|
|
1173
|
+
? `${normalizedApiUrl}/${normalizedPrefix}`
|
|
1174
|
+
: normalizedApiUrl;
|
|
1175
|
+
}
|
|
1176
|
+
buildApiUrl(path) {
|
|
1177
|
+
const normalizedApiUrl = this.baseUrl.replace(/\/+$/, '');
|
|
1178
|
+
return `${normalizedApiUrl}/${path}`;
|
|
1179
|
+
}
|
|
1180
|
+
static { this.ɵfac = function UserPermissionDetailService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserPermissionDetailService)(); }; }
|
|
1181
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: UserPermissionDetailService, factory: UserPermissionDetailService.ɵfac, providedIn: 'root' }); }
|
|
1182
|
+
}
|
|
1183
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserPermissionDetailService, [{
|
|
1184
|
+
type: Injectable,
|
|
1185
|
+
args: [{
|
|
1186
|
+
providedIn: 'root'
|
|
1187
|
+
}]
|
|
1188
|
+
}], null, null); })();
|
|
1189
|
+
|
|
1190
|
+
var PermissionStatus;
|
|
1191
|
+
(function (PermissionStatus) {
|
|
1192
|
+
PermissionStatus[PermissionStatus["Undefined"] = 0] = "Undefined";
|
|
1193
|
+
PermissionStatus[PermissionStatus["Allowed"] = 1] = "Allowed";
|
|
1194
|
+
PermissionStatus[PermissionStatus["Denied"] = 2] = "Denied";
|
|
1195
|
+
})(PermissionStatus || (PermissionStatus = {}));
|
|
1196
|
+
var UserPermissionOriginKind;
|
|
1197
|
+
(function (UserPermissionOriginKind) {
|
|
1198
|
+
UserPermissionOriginKind[UserPermissionOriginKind["Group"] = 0] = "Group";
|
|
1199
|
+
UserPermissionOriginKind[UserPermissionOriginKind["UserOverride"] = 1] = "UserOverride";
|
|
1200
|
+
})(UserPermissionOriginKind || (UserPermissionOriginKind = {}));
|
|
1201
|
+
|
|
1202
|
+
const _forTrack0 = ($index, $item) => $item.idModulePermission;
|
|
1203
|
+
function UserPermissionListComponent_For_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
1204
|
+
i0.ɵɵtext(0, " check ");
|
|
1205
|
+
} }
|
|
1206
|
+
function UserPermissionListComponent_For_9_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
1207
|
+
i0.ɵɵtext(0, " block ");
|
|
1208
|
+
} }
|
|
1209
|
+
function UserPermissionListComponent_For_9_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
1210
|
+
i0.ɵɵtext(0, " help_outline ");
|
|
1211
|
+
} }
|
|
1212
|
+
function UserPermissionListComponent_For_9_For_15_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
1213
|
+
i0.ɵɵtext(0, " check ");
|
|
1214
|
+
} }
|
|
1215
|
+
function UserPermissionListComponent_For_9_For_15_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
1216
|
+
i0.ɵɵtext(0, " block ");
|
|
1217
|
+
} }
|
|
1218
|
+
function UserPermissionListComponent_For_9_For_15_Template(rf, ctx) { if (rf & 1) {
|
|
1219
|
+
i0.ɵɵelementStart(0, "div", 12)(1, "mat-icon");
|
|
1220
|
+
i0.ɵɵconditionalCreate(2, UserPermissionListComponent_For_9_For_15_Conditional_2_Template, 1, 0)(3, UserPermissionListComponent_For_9_For_15_Conditional_3_Template, 1, 0);
|
|
1221
|
+
i0.ɵɵelementEnd();
|
|
1222
|
+
i0.ɵɵelementStart(4, "span", 13);
|
|
1223
|
+
i0.ɵɵtext(5);
|
|
1224
|
+
i0.ɵɵpipe(6, "translate");
|
|
1225
|
+
i0.ɵɵelementEnd()();
|
|
1226
|
+
} if (rf & 2) {
|
|
1227
|
+
const origin_r1 = ctx.$implicit;
|
|
1228
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
1229
|
+
i0.ɵɵadvance();
|
|
1230
|
+
i0.ɵɵclassProp("allowed", origin_r1.isAllowed)("denied", !origin_r1.isAllowed);
|
|
1231
|
+
i0.ɵɵadvance();
|
|
1232
|
+
i0.ɵɵconditional(origin_r1.isAllowed ? 2 : 3);
|
|
1233
|
+
i0.ɵɵadvance(3);
|
|
1234
|
+
i0.ɵɵtextInterpolate1(" ", origin_r1.kind === ctx_r1.UserPermissionOriginKind.UserOverride ? i0.ɵɵpipeBind1(6, 6, "userPermissionDetails.userOverrideOrigin") : origin_r1.groupName, " ");
|
|
1235
|
+
} }
|
|
1236
|
+
function UserPermissionListComponent_For_9_ForEmpty_16_Template(rf, ctx) { if (rf & 1) {
|
|
1237
|
+
i0.ɵɵelementStart(0, "div", 12)(1, "span", 14);
|
|
1238
|
+
i0.ɵɵtext(2);
|
|
1239
|
+
i0.ɵɵpipe(3, "translate");
|
|
1240
|
+
i0.ɵɵelementEnd()();
|
|
1241
|
+
} if (rf & 2) {
|
|
1242
|
+
i0.ɵɵadvance(2);
|
|
1243
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "userPermissionDetails.noOrigins"));
|
|
1244
|
+
} }
|
|
1245
|
+
function UserPermissionListComponent_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
1246
|
+
i0.ɵɵelementStart(0, "mat-list-item", 5)(1, "mat-icon", 7);
|
|
1247
|
+
i0.ɵɵconditionalCreate(2, UserPermissionListComponent_For_9_Conditional_2_Template, 1, 0)(3, UserPermissionListComponent_For_9_Conditional_3_Template, 1, 0)(4, UserPermissionListComponent_For_9_Conditional_4_Template, 1, 0);
|
|
1248
|
+
i0.ɵɵelementEnd();
|
|
1249
|
+
i0.ɵɵelementStart(5, "div", 8);
|
|
1250
|
+
i0.ɵɵtext(6);
|
|
1251
|
+
i0.ɵɵelementEnd();
|
|
1252
|
+
i0.ɵɵelement(7, "cauca-icon-button", 9);
|
|
1253
|
+
i0.ɵɵelementStart(8, "mat-menu", null, 0)(10, "div", 10);
|
|
1254
|
+
i0.ɵɵlistener("click", function UserPermissionListComponent_For_9_Template_div_click_10_listener($event) { return $event.stopPropagation(); });
|
|
1255
|
+
i0.ɵɵelementStart(11, "div", 11);
|
|
1256
|
+
i0.ɵɵtext(12);
|
|
1257
|
+
i0.ɵɵpipe(13, "translate");
|
|
1258
|
+
i0.ɵɵelementEnd();
|
|
1259
|
+
i0.ɵɵrepeaterCreate(14, UserPermissionListComponent_For_9_For_15_Template, 7, 8, "div", 12, i0.ɵɵrepeaterTrackByIndex, false, UserPermissionListComponent_For_9_ForEmpty_16_Template, 4, 3, "div", 12);
|
|
1260
|
+
i0.ɵɵelementEnd()()();
|
|
1261
|
+
} if (rf & 2) {
|
|
1262
|
+
const permission_r3 = ctx.$implicit;
|
|
1263
|
+
const originsMenu_r4 = i0.ɵɵreference(9);
|
|
1264
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
1265
|
+
i0.ɵɵadvance();
|
|
1266
|
+
i0.ɵɵclassProp("allowed", permission_r3.status === ctx_r1.PermissionStatus.Allowed)("denied", permission_r3.status === ctx_r1.PermissionStatus.Denied);
|
|
1267
|
+
i0.ɵɵadvance();
|
|
1268
|
+
i0.ɵɵconditional(permission_r3.status === ctx_r1.PermissionStatus.Allowed ? 2 : permission_r3.status === ctx_r1.PermissionStatus.Denied ? 3 : 4);
|
|
1269
|
+
i0.ɵɵadvance(4);
|
|
1270
|
+
i0.ɵɵtextInterpolate(permission_r3.name);
|
|
1271
|
+
i0.ɵɵadvance();
|
|
1272
|
+
i0.ɵɵproperty("matMenuTriggerFor", originsMenu_r4);
|
|
1273
|
+
i0.ɵɵadvance(5);
|
|
1274
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 9, "userPermissionDetails.originsLabel"));
|
|
1275
|
+
i0.ɵɵadvance(2);
|
|
1276
|
+
i0.ɵɵrepeater(permission_r3.origins);
|
|
1277
|
+
} }
|
|
1278
|
+
function UserPermissionListComponent_ForEmpty_10_Template(rf, ctx) { if (rf & 1) {
|
|
1279
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "mat-icon", 15);
|
|
1280
|
+
i0.ɵɵtext(2, "grid_off");
|
|
1281
|
+
i0.ɵɵelementEnd();
|
|
1282
|
+
i0.ɵɵelementStart(3, "div", 16);
|
|
1283
|
+
i0.ɵɵtext(4);
|
|
1284
|
+
i0.ɵɵpipe(5, "translate");
|
|
1285
|
+
i0.ɵɵelementEnd()();
|
|
1286
|
+
} if (rf & 2) {
|
|
1287
|
+
i0.ɵɵadvance(4);
|
|
1288
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 1, "noResult"));
|
|
1289
|
+
} }
|
|
1290
|
+
class UserPermissionListComponent {
|
|
1291
|
+
constructor() {
|
|
1292
|
+
this.permissions = input.required(/* @ts-ignore */
|
|
1293
|
+
...(ngDevMode ? [{ debugName: "permissions" }] : /* istanbul ignore next */ []));
|
|
1294
|
+
this.PermissionStatus = PermissionStatus;
|
|
1295
|
+
this.UserPermissionOriginKind = UserPermissionOriginKind;
|
|
1296
|
+
this.searchText = signal('', /* @ts-ignore */
|
|
1297
|
+
...(ngDevMode ? [{ debugName: "searchText" }] : /* istanbul ignore next */ []));
|
|
1298
|
+
this.filteredPermissions = computed(() => this.permissions().filter((permission) => toLowerCaseAndWithoutDiacritics(permission.name)
|
|
1299
|
+
.includes(toLowerCaseAndWithoutDiacritics(this.searchText()))), /* @ts-ignore */
|
|
1300
|
+
...(ngDevMode ? [{ debugName: "filteredPermissions" }] : /* istanbul ignore next */ []));
|
|
1301
|
+
}
|
|
1302
|
+
static { this.ɵfac = function UserPermissionListComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserPermissionListComponent)(); }; }
|
|
1303
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserPermissionListComponent, selectors: [["cauca-user-permission-list"]], inputs: { permissions: [1, "permissions"] }, decls: 11, vars: 5, consts: [["originsMenu", "matMenu"], ["subscriptSizing", "dynamic", "appearance", "outline", 1, "search-field"], ["matInput", "", "type", "text", 3, "input", "value"], ["matSuffix", ""], ["id", "permission-list"], [1, "permission-item"], [1, "no-result"], ["matListItemIcon", ""], ["matListItemTitle", ""], ["matListItemMeta", "", "icon", "info", 3, "matMenuTriggerFor"], [1, "origins-menu-content", 3, "click"], [1, "origin-item", "body2"], [1, "origin-item"], [1, "origin-name", "body1"], [1, "no-origins"], [1, "no-result-icon"], [1, "no-result-text", "body2"]], template: function UserPermissionListComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1304
|
+
i0.ɵɵelementStart(0, "mat-form-field", 1)(1, "mat-label");
|
|
1305
|
+
i0.ɵɵtext(2);
|
|
1306
|
+
i0.ɵɵpipe(3, "translate");
|
|
1307
|
+
i0.ɵɵelementEnd();
|
|
1308
|
+
i0.ɵɵelementStart(4, "input", 2);
|
|
1309
|
+
i0.ɵɵlistener("input", function UserPermissionListComponent_Template_input_input_4_listener($event) { return ctx.searchText.set($event.target.value); });
|
|
1310
|
+
i0.ɵɵelementEnd();
|
|
1311
|
+
i0.ɵɵelementStart(5, "mat-icon", 3);
|
|
1312
|
+
i0.ɵɵtext(6, "search");
|
|
1313
|
+
i0.ɵɵelementEnd()();
|
|
1314
|
+
i0.ɵɵelementStart(7, "mat-list", 4);
|
|
1315
|
+
i0.ɵɵrepeaterCreate(8, UserPermissionListComponent_For_9_Template, 17, 11, "mat-list-item", 5, _forTrack0, false, UserPermissionListComponent_ForEmpty_10_Template, 6, 3, "div", 6);
|
|
1316
|
+
i0.ɵɵelementEnd();
|
|
1317
|
+
} if (rf & 2) {
|
|
1318
|
+
i0.ɵɵadvance(2);
|
|
1319
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 3, "dataGrid.keywordsLabel"));
|
|
1320
|
+
i0.ɵɵadvance(2);
|
|
1321
|
+
i0.ɵɵproperty("value", ctx.searchText());
|
|
1322
|
+
i0.ɵɵadvance(4);
|
|
1323
|
+
i0.ɵɵrepeater(ctx.filteredPermissions());
|
|
1324
|
+
} }, dependencies: [MatListModule, i4$1.MatList, i4$1.MatListItem, i4$1.MatListItemIcon, i4$1.MatListItemTitle, i4$1.MatListItemMeta, MatFormField, MatLabel, MatInput, MatSuffix, MatIcon, MatMenuModule, i2$1.MatMenu, i2$1.MatMenuTrigger, IconButtonComponent, TranslatePipe], styles: ["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:16px}.search-field[_ngcontent-%COMP%]{width:100%}#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}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}.mat-icon.allowed[_ngcontent-%COMP%]{color:var(--%NS%color-success, green)}.mat-icon.denied[_ngcontent-%COMP%]{color:var(--%NS%color-error, red)}.origins-menu-content[_ngcontent-%COMP%]{padding:8px}.origin-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px}.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}"] }); }
|
|
1325
|
+
}
|
|
1326
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserPermissionListComponent, [{
|
|
1327
|
+
type: Component,
|
|
1328
|
+
args: [{ selector: 'cauca-user-permission-list', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatListModule, MatFormField, MatLabel, MatInput, MatSuffix, MatIcon, MatMenuModule, TranslatePipe, IconButtonComponent], template: "<mat-form-field subscriptSizing=\"dynamic\" appearance=\"outline\" class=\"search-field\">\n <mat-label>{{ 'dataGrid.keywordsLabel' | translate }}</mat-label>\n <input matInput type=\"text\" [value]=\"searchText()\" (input)=\"searchText.set($any($event.target).value)\">\n <mat-icon matSuffix>search</mat-icon>\n</mat-form-field>\n\n<mat-list id=\"permission-list\">\n @for (permission of filteredPermissions(); track permission.idModulePermission) {\n <mat-list-item class=\"permission-item\">\n\n <mat-icon matListItemIcon\n [class.allowed]=\"permission.status === PermissionStatus.Allowed\"\n [class.denied]=\"permission.status === PermissionStatus.Denied\">\n @if (permission.status === PermissionStatus.Allowed) {\n check\n } @else if (permission.status === PermissionStatus.Denied) {\n block\n } @else {\n help_outline\n }\n </mat-icon>\n\n <div matListItemTitle>{{ permission.name }}</div>\n\n <cauca-icon-button\n matListItemMeta\n icon=\"info\"\n [matMenuTriggerFor]=\"originsMenu\" />\n\n <mat-menu #originsMenu=\"matMenu\">\n <div class=\"origins-menu-content\" (click)=\"$event.stopPropagation()\">\n <div class=\"origin-item body2\">{{ 'userPermissionDetails.originsLabel' | translate }}</div>\n @for (origin of permission.origins; track $index) {\n <div class=\"origin-item\">\n <mat-icon [class.allowed]=\"origin.isAllowed\" [class.denied]=\"!origin.isAllowed\">\n @if (origin.isAllowed) {\n check\n } @else {\n block\n }\n </mat-icon>\n <span class=\"origin-name body1\">\n {{ origin.kind === UserPermissionOriginKind.UserOverride\n ? ('userPermissionDetails.userOverrideOrigin' | translate)\n : origin.groupName }}\n </span>\n </div>\n } @empty {\n <div class=\"origin-item\">\n <span class=\"no-origins\">{{ 'userPermissionDetails.noOrigins' | translate }}</span>\n </div>\n }\n </div>\n </mat-menu>\n\n </mat-list-item>\n } @empty {\n <div class=\"no-result\">\n <mat-icon class=\"no-result-icon\">grid_off</mat-icon>\n <div class=\"no-result-text body2\">{{ 'noResult' | translate }}</div>\n </div>\n }\n</mat-list>\n", styles: [":host{display:flex;flex-direction:column;gap:16px}.search-field{width:100%}#permission-list{max-height:400px;overflow-y:auto;border:1px solid rgba(0,0,0,.23);border-radius:4px;padding:0}.permission-item{border-bottom:1px solid rgba(0,0,0,.12)}.permission-item:last-child{border-bottom:none}mat-list-item{margin-bottom:0}mat-list-item:nth-child(odd){background-color:#0000000d}mat-list-item:hover{transition:all ease-in-out .1s;background-color:#00000012}.mat-icon.allowed{color:var(--color-success, green)}.mat-icon.denied{color:var(--color-error, red)}.origins-menu-content{padding:8px}.origin-item{display:flex;align-items:center;gap:8px;padding:8px}.no-result{display:flex;flex-direction:column;align-items:center;padding:24px 0;color:#00000061}.no-result-icon{font-size:48px;width:48px;height:48px;margin-bottom:8px}.no-result-text{text-align:center}\n"] }]
|
|
1329
|
+
}], null, { permissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "permissions", required: true }] }] }); })();
|
|
1330
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserPermissionListComponent, { className: "UserPermissionListComponent", filePath: "lib/components/user-permission-list/user-permission-list.component.ts", lineNumber: 20 }); })();
|
|
1331
|
+
|
|
1332
|
+
function UserPermissionsDialogComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
1333
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
1334
|
+
i0.ɵɵtext(1);
|
|
1335
|
+
i0.ɵɵelementEnd();
|
|
1336
|
+
} if (rf & 2) {
|
|
1337
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
1338
|
+
i0.ɵɵadvance();
|
|
1339
|
+
i0.ɵɵtextInterpolate(ctx_r0.data.userDisplayName);
|
|
1340
|
+
} }
|
|
1341
|
+
class UserPermissionsDialogComponent {
|
|
1342
|
+
constructor() {
|
|
1343
|
+
this.data = inject(MAT_DIALOG_DATA);
|
|
1344
|
+
this.permissionsResource = rxResource({
|
|
1345
|
+
params: () => this.data.userId,
|
|
1346
|
+
stream: ({ params: userId }) => this.service.getForUser(userId)
|
|
1347
|
+
});
|
|
1348
|
+
this.permissions = computed(() => this.permissionsResource.value() ?? [], /* @ts-ignore */
|
|
1349
|
+
...(ngDevMode ? [{ debugName: "permissions" }] : /* istanbul ignore next */ []));
|
|
1350
|
+
this.dialogRef = inject((MatDialogRef));
|
|
1351
|
+
this.service = inject(UserPermissionDetailService);
|
|
1352
|
+
}
|
|
1353
|
+
closeDialog() {
|
|
1354
|
+
this.dialogRef.close();
|
|
1355
|
+
}
|
|
1356
|
+
static { this.ɵfac = function UserPermissionsDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserPermissionsDialogComponent)(); }; }
|
|
1357
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserPermissionsDialogComponent, selectors: [["cauca-user-permissions-dialog"]], features: [i0.ɵɵProvidersFeature([LoadingStateService])], decls: 12, vars: 5, consts: [["mat-dialog-title", ""], [1, "title-block"], [1, "h6"], [1, "subtitle", "body2"], [1, "dialog-content"], [3, "retryRequest"], [3, "permissions"], ["align", "end"], ["color", "primary", "label", "close", 3, "buttonClick"]], template: function UserPermissionsDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1358
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
|
|
1359
|
+
i0.ɵɵtext(3);
|
|
1360
|
+
i0.ɵɵpipe(4, "translate");
|
|
1361
|
+
i0.ɵɵelementEnd();
|
|
1362
|
+
i0.ɵɵconditionalCreate(5, UserPermissionsDialogComponent_Conditional_5_Template, 2, 1, "div", 3);
|
|
1363
|
+
i0.ɵɵelementEnd()();
|
|
1364
|
+
i0.ɵɵelementStart(6, "mat-dialog-content", 4);
|
|
1365
|
+
i0.ɵɵelement(7, "cauca-loading-spinner-indicator");
|
|
1366
|
+
i0.ɵɵelementStart(8, "cauca-loading-error", 5);
|
|
1367
|
+
i0.ɵɵlistener("retryRequest", function UserPermissionsDialogComponent_Template_cauca_loading_error_retryRequest_8_listener() { return ctx.permissionsResource.reload(); });
|
|
1368
|
+
i0.ɵɵelementEnd();
|
|
1369
|
+
i0.ɵɵelement(9, "cauca-user-permission-list", 6);
|
|
1370
|
+
i0.ɵɵelementEnd();
|
|
1371
|
+
i0.ɵɵelementStart(10, "mat-dialog-actions", 7)(11, "cauca-raised-button", 8);
|
|
1372
|
+
i0.ɵɵlistener("buttonClick", function UserPermissionsDialogComponent_Template_cauca_raised_button_buttonClick_11_listener() { return ctx.closeDialog(); });
|
|
1373
|
+
i0.ɵɵelementEnd()();
|
|
1374
|
+
} if (rf & 2) {
|
|
1375
|
+
i0.ɵɵadvance(3);
|
|
1376
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 3, "userPermissionDetails.title"));
|
|
1377
|
+
i0.ɵɵadvance(2);
|
|
1378
|
+
i0.ɵɵconditional(ctx.data.userDisplayName ? 5 : -1);
|
|
1379
|
+
i0.ɵɵadvance(4);
|
|
1380
|
+
i0.ɵɵproperty("permissions", ctx.permissions());
|
|
1381
|
+
} }, dependencies: [MatDialogModule, i1$1.MatDialogTitle, i1$1.MatDialogActions, i1$1.MatDialogContent, LoadingSpinnerIndicatorComponent,
|
|
1382
|
+
LoadingErrorComponent,
|
|
1383
|
+
RaisedButtonComponent,
|
|
1384
|
+
UserPermissionListComponent,
|
|
1385
|
+
TranslatePipe], styles: [".title-block[_ngcontent-%COMP%]{display:flex;flex-direction:column}.subtitle[_ngcontent-%COMP%]{color:#0000008a}.dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;min-width:480px}"] }); }
|
|
1386
|
+
}
|
|
1387
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserPermissionsDialogComponent, [{
|
|
1388
|
+
type: Component,
|
|
1389
|
+
args: [{ selector: 'cauca-user-permissions-dialog', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1390
|
+
MatDialogModule,
|
|
1391
|
+
TranslatePipe,
|
|
1392
|
+
LoadingSpinnerIndicatorComponent,
|
|
1393
|
+
LoadingErrorComponent,
|
|
1394
|
+
RaisedButtonComponent,
|
|
1395
|
+
UserPermissionListComponent,
|
|
1396
|
+
], providers: [LoadingStateService], template: "<div mat-dialog-title>\n <div class=\"title-block\">\n <div class=\"h6\">{{ 'userPermissionDetails.title' | translate }}</div>\n @if (data.userDisplayName) {\n <div class=\"subtitle body2\">{{ data.userDisplayName }}</div>\n }\n </div>\n</div>\n\n<mat-dialog-content class=\"dialog-content\">\n <cauca-loading-spinner-indicator />\n <cauca-loading-error (retryRequest)=\"permissionsResource.reload()\" />\n\n <cauca-user-permission-list [permissions]=\"permissions()\" />\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <cauca-raised-button color=\"primary\" label=\"close\" (buttonClick)=\"closeDialog()\" />\n</mat-dialog-actions>\n", styles: [".title-block{display:flex;flex-direction:column}.subtitle{color:#0000008a}.dialog-content{display:flex;flex-direction:column;gap:16px;min-width:480px}\n"] }]
|
|
1397
|
+
}], null, null); })();
|
|
1398
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserPermissionsDialogComponent, { className: "UserPermissionsDialogComponent", filePath: "lib/components/user-permissions-dialog/user-permissions-dialog.component.ts", lineNumber: 31 }); })();
|
|
1399
|
+
|
|
1157
1400
|
class CaucaManagementService {
|
|
1158
1401
|
static { this.ɵfac = function CaucaManagementService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaucaManagementService)(); }; }
|
|
1159
1402
|
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaucaManagementService, factory: CaucaManagementService.ɵfac, providedIn: 'root' }); }
|
|
@@ -1570,7 +1813,7 @@ class CaucaManagementGroupComponent {
|
|
|
1570
1813
|
i0.ɵɵproperty("dxTemplateOf", "usersEditTemplate");
|
|
1571
1814
|
i0.ɵɵadvance();
|
|
1572
1815
|
i0.ɵɵproperty("dxTemplateOf", "permissionsEditTemplate");
|
|
1573
|
-
} }, dependencies: [CaucaDevextremeModule, i1$3.CaucaDataGridComponent, i2$
|
|
1816
|
+
} }, dependencies: [CaucaDevextremeModule, i1$3.CaucaDataGridComponent, i2$2.DxiColumnComponent, i2$2.DxiValidationRuleComponent, i2$2.DxoEditingComponent, i2$2.DxoFormComponent, i2$2.DxiItemComponent, i2$2.DxoPopupComponent, i2$2.DxoExportComponent, i3$2.DxTemplateDirective, DxCheckBoxModule, i4$2.DxCheckBoxComponent, DxListModule, i5$1.DxListComponent, DxTagBoxModule, i6$1.DxTagBoxComponent, TranslatePipe], encapsulation: 2 }); }
|
|
1574
1817
|
}
|
|
1575
1818
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementGroupComponent, [{
|
|
1576
1819
|
type: Component,
|
|
@@ -1677,7 +1920,7 @@ class CaucaManagementUserComponent {
|
|
|
1677
1920
|
i0.ɵɵproperty("labelLocation", ctx.showColumnXS ? "left" : "top");
|
|
1678
1921
|
i0.ɵɵadvance();
|
|
1679
1922
|
i0.ɵɵproperty("isRequired", true);
|
|
1680
|
-
} }, dependencies: [CaucaDevextremeModule, i1$3.CaucaDataGridComponent, i2$
|
|
1923
|
+
} }, dependencies: [CaucaDevextremeModule, i1$3.CaucaDataGridComponent, i2$2.DxiColumnComponent, i2$2.DxiValidationRuleComponent, i2$2.DxoEditingComponent, i2$2.DxoFormComponent, i2$2.DxiItemComponent, i2$2.DxoPopupComponent, TranslatePipe], encapsulation: 2 }); }
|
|
1681
1924
|
}
|
|
1682
1925
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementUserComponent, [{
|
|
1683
1926
|
type: Component,
|
|
@@ -1771,5 +2014,5 @@ class GroupPermissionModel {
|
|
|
1771
2014
|
* Generated bundle index. Do not edit.
|
|
1772
2015
|
*/
|
|
1773
2016
|
|
|
1774
|
-
export { CaucaManagementComponent, CaucaManagementGroupComponent, CaucaManagementModule, CaucaManagementService, CaucaManagementUserComponent, GroupEditionPageComponent, GroupModel, GroupPermissionModel, GroupsPageComponent, MANAGEMENT_ROUTE_SEGMENT, MANAGEMENT_URL_PREFIX, ManagementGroupService, ManagementUserService, REFRESHABLE_PERMISSION_STATE_TOKEN, UserGroupModel, UserModel, UserPermissionModel, managementGroupRoutes, provideCaucaManagement };
|
|
2017
|
+
export { CaucaManagementComponent, CaucaManagementGroupComponent, CaucaManagementModule, CaucaManagementService, CaucaManagementUserComponent, GroupEditionPageComponent, GroupModel, GroupPermissionModel, GroupsPageComponent, MANAGEMENT_ROUTE_SEGMENT, MANAGEMENT_URL_PREFIX, ManagementGroupService, ManagementUserService, REFRESHABLE_PERMISSION_STATE_TOKEN, UserGroupModel, UserModel, UserPermissionModel, UserPermissionsDialogComponent, managementGroupRoutes, provideCaucaManagement };
|
|
1775
2018
|
//# sourceMappingURL=cauca-911-management.mjs.map
|