@cauca-911/management 22.0.2 → 22.0.4
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 +8 -0
- package/assets/i18n/cauca/es-management.json +8 -0
- package/assets/i18n/cauca/fr-management.json +8 -0
- package/fesm2022/cauca-911-management.mjs +298 -603
- package/fesm2022/cauca-911-management.mjs.map +1 -1
- package/package.json +1 -2
- package/types/cauca-911-management.d.ts +111 -197
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cauca-911/management",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=22.1.0",
|
|
6
6
|
"@angular/core": ">=22.1.0",
|
|
7
7
|
"@cauca-911/core": ">=22.0.0",
|
|
8
8
|
"@cauca-911/datagrid": ">=22.0.0",
|
|
9
|
-
"@cauca-911/devextreme": ">=22.0.0",
|
|
10
9
|
"@cauca-911/material": ">=22.0.0",
|
|
11
10
|
"odata-filter-builder": ">=1.0.0"
|
|
12
11
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Type, InjectionToken, Provider, EnvironmentProviders, OnInit } from '@angular/core';
|
|
3
3
|
import { Routes } from '@angular/router';
|
|
4
4
|
import { OnDeactivate } from '@cauca-911/material';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { ODataFilter } from 'odata-data-source';
|
|
6
|
+
import { BaseGridColumnComponent } from '@cauca-911/datagrid';
|
|
7
7
|
|
|
8
8
|
declare const MANAGEMENT_URL_PREFIX: InjectionToken<string>;
|
|
9
9
|
declare const MANAGEMENT_ROUTE_SEGMENT: InjectionToken<string>;
|
|
@@ -22,17 +22,17 @@ interface RefreshablePermissionState {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
declare class GroupsPageComponent {
|
|
25
|
-
static ɵfac:
|
|
26
|
-
static ɵcmp:
|
|
25
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GroupsPageComponent, never>;
|
|
26
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GroupsPageComponent, "cauca-groups-page", never, {}, {}, never, never, true, never>;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
declare class GroupEditionPageComponent implements OnInit, OnDeactivate {
|
|
30
|
-
readonly id:
|
|
31
|
-
readonly isLoaded:
|
|
32
|
-
readonly isSaving:
|
|
33
|
-
readonly showSavingError:
|
|
34
|
-
readonly title:
|
|
35
|
-
readonly currentLocation:
|
|
30
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
31
|
+
readonly isLoaded: _angular_core.WritableSignal<boolean>;
|
|
32
|
+
readonly isSaving: _angular_core.WritableSignal<boolean>;
|
|
33
|
+
readonly showSavingError: _angular_core.WritableSignal<boolean>;
|
|
34
|
+
readonly title: _angular_core.Signal<string>;
|
|
35
|
+
readonly currentLocation: _angular_core.Signal<{
|
|
36
36
|
link: string;
|
|
37
37
|
title: string;
|
|
38
38
|
}[]>;
|
|
@@ -55,8 +55,8 @@ declare class GroupEditionPageComponent implements OnInit, OnDeactivate {
|
|
|
55
55
|
private resetSavingState;
|
|
56
56
|
private askForCancelConfirmation;
|
|
57
57
|
private showValidationError;
|
|
58
|
-
static ɵfac:
|
|
59
|
-
static ɵcmp:
|
|
58
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GroupEditionPageComponent, never>;
|
|
59
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GroupEditionPageComponent, "cauca-group-edition-page", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
declare enum PermissionStatus {
|
|
@@ -88,198 +88,112 @@ interface UserPermissionsDialogData {
|
|
|
88
88
|
}
|
|
89
89
|
declare class UserPermissionsDialogComponent {
|
|
90
90
|
readonly data: UserPermissionsDialogData;
|
|
91
|
-
readonly permissionsResource:
|
|
92
|
-
readonly permissions:
|
|
91
|
+
readonly permissionsResource: _angular_core.ResourceRef<UserPermissionDetail[]>;
|
|
92
|
+
readonly permissions: _angular_core.Signal<UserPermissionDetail[]>;
|
|
93
93
|
private readonly dialogRef;
|
|
94
94
|
private readonly service;
|
|
95
95
|
closeDialog(): void;
|
|
96
|
-
static ɵfac:
|
|
97
|
-
static ɵcmp:
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* @deprecated This model is obsolete and should not be used.
|
|
121
|
-
*/
|
|
122
|
-
declare class UserPermissionModel {
|
|
123
|
-
idUserPermission: string;
|
|
124
|
-
isAllowed: boolean;
|
|
125
|
-
idUser: string;
|
|
126
|
-
idModulePermission: string;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* @deprecated This model is obsolete and should not be used.
|
|
131
|
-
*/
|
|
132
|
-
declare class UserModel {
|
|
96
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserPermissionsDialogComponent, never>;
|
|
97
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserPermissionsDialogComponent, "cauca-user-permissions-dialog", never, {}, {}, never, never, true, never>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
type UserGridColumnKind = 'text' | 'check' | 'scope';
|
|
101
|
+
/** A column a site adds to the shared users grid, on top of the three columns every site shows. */
|
|
102
|
+
interface UserGridColumn {
|
|
103
|
+
/** The row property the column reads, and the MatTable column name. */
|
|
104
|
+
prop: string;
|
|
105
|
+
/** Translation key. The grid translates it. */
|
|
106
|
+
label: string;
|
|
107
|
+
kind: UserGridColumnKind;
|
|
108
|
+
/** The normalized twin the search box filters on. Omit to leave the column out of the search. */
|
|
109
|
+
searchableProp?: string;
|
|
110
|
+
width?: string;
|
|
111
|
+
showToolTip?: boolean;
|
|
112
|
+
/** `scope` only: the key shown in place of the list when the row covers everything. */
|
|
113
|
+
allLabel?: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** The shape every site's `UserList` feed shares. Site-specific columns arrive as extra properties. */
|
|
117
|
+
interface UserListRow {
|
|
133
118
|
id: string;
|
|
134
119
|
userName: string;
|
|
135
120
|
firstName: string;
|
|
136
121
|
lastName: string;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
users:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
readonly
|
|
181
|
-
readonly
|
|
182
|
-
readonly
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
translations: any;
|
|
190
|
-
private groupUsers;
|
|
191
|
-
private readonly managementGroupService;
|
|
192
|
-
private readonly managementUserService;
|
|
193
|
-
private readonly managementPermissionService;
|
|
194
|
-
constructor();
|
|
122
|
+
searchableUserName: string;
|
|
123
|
+
searchableFirstName: string;
|
|
124
|
+
searchableLastName: string;
|
|
125
|
+
[extraColumn: string]: unknown;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
declare class UsersPageComponent {
|
|
129
|
+
/** Translation keys. Every site names its users page and its menu differently. */
|
|
130
|
+
readonly caption: _angular_core.InputSignal<string>;
|
|
131
|
+
readonly baseCrumb: _angular_core.InputSignal<string>;
|
|
132
|
+
readonly breadcrumb: _angular_core.InputSignal<string>;
|
|
133
|
+
readonly extraColumns: _angular_core.InputSignal<UserGridColumn[]>;
|
|
134
|
+
readonly showAddButton: _angular_core.InputSignal<boolean>;
|
|
135
|
+
readonly addButtonLabel: _angular_core.InputSignal<string>;
|
|
136
|
+
readonly canEdit: _angular_core.InputSignal<boolean>;
|
|
137
|
+
readonly canDelete: _angular_core.InputSignal<boolean>;
|
|
138
|
+
readonly editLinkField: _angular_core.InputSignal<string>;
|
|
139
|
+
readonly showPermissions: _angular_core.InputSignal<boolean>;
|
|
140
|
+
readonly persistState: _angular_core.InputSignal<boolean>;
|
|
141
|
+
readonly addClick: _angular_core.OutputEmitterRef<void>;
|
|
142
|
+
readonly deleteClick: _angular_core.OutputEmitterRef<UserListRow>;
|
|
143
|
+
private readonly grid;
|
|
144
|
+
refresh(): void;
|
|
145
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UsersPageComponent, never>;
|
|
146
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UsersPageComponent, "cauca-users-page", never, { "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "baseCrumb": { "alias": "baseCrumb"; "required": false; "isSignal": true; }; "breadcrumb": { "alias": "breadcrumb"; "required": false; "isSignal": true; }; "extraColumns": { "alias": "extraColumns"; "required": false; "isSignal": true; }; "showAddButton": { "alias": "showAddButton"; "required": false; "isSignal": true; }; "addButtonLabel": { "alias": "addButtonLabel"; "required": false; "isSignal": true; }; "canEdit": { "alias": "canEdit"; "required": false; "isSignal": true; }; "canDelete": { "alias": "canDelete"; "required": false; "isSignal": true; }; "editLinkField": { "alias": "editLinkField"; "required": false; "isSignal": true; }; "showPermissions": { "alias": "showPermissions"; "required": false; "isSignal": true; }; "persistState": { "alias": "persistState"; "required": false; "isSignal": true; }; }, { "addClick": "addClick"; "deleteClick": "deleteClick"; }, never, never, true, never>;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
declare class UserListGridComponent implements OnInit {
|
|
150
|
+
/**
|
|
151
|
+
* Read when the grid registers its columns, in `ngAfterContentInit`. Changing it afterwards
|
|
152
|
+
* recomputes `columns()` but does not re-run `applyColumns()`, so the MatTable is asked to
|
|
153
|
+
* render a column id it never registered and throws `Could not find column with id "X"`.
|
|
154
|
+
* `showPermissions`, `canEdit` and `canDelete` gate the row-action column the same way and
|
|
155
|
+
* carry the same constraint — and are the more likely one to hit, since a consumer binds them
|
|
156
|
+
* to an async permission signal more readily than it replaces the column list.
|
|
157
|
+
*/
|
|
158
|
+
readonly extraColumns: _angular_core.InputSignal<UserGridColumn[]>;
|
|
159
|
+
readonly showAddButton: _angular_core.InputSignal<boolean>;
|
|
160
|
+
/** Translation key. */
|
|
161
|
+
readonly addButtonLabel: _angular_core.InputSignal<string>;
|
|
162
|
+
readonly canEdit: _angular_core.InputSignal<boolean>;
|
|
163
|
+
readonly canDelete: _angular_core.InputSignal<boolean>;
|
|
164
|
+
readonly editLinkField: _angular_core.InputSignal<string>;
|
|
165
|
+
readonly showPermissions: _angular_core.InputSignal<boolean>;
|
|
166
|
+
readonly persistState: _angular_core.InputSignal<boolean>;
|
|
167
|
+
readonly addClick: _angular_core.OutputEmitterRef<void>;
|
|
168
|
+
readonly deleteClick: _angular_core.OutputEmitterRef<UserListRow>;
|
|
169
|
+
protected readonly hasRowActions: _angular_core.Signal<boolean>;
|
|
170
|
+
protected readonly columns: _angular_core.Signal<string[]>;
|
|
171
|
+
private readonly grid;
|
|
172
|
+
private readonly sort;
|
|
173
|
+
private readonly dialog;
|
|
195
174
|
ngOnInit(): void;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CaucaManagementGroupComponent, "cauca-management-group", never, { "showPrintButton": { "alias": "showPrintButton"; "required": false; "isSignal": true; }; "hoverStatePermission": { "alias": "hoverStatePermission"; "required": false; "isSignal": true; }; "showAssignableByAllUsers": { "alias": "showAssignableByAllUsers"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* @deprecated This component is obsolete and should not be used.
|
|
219
|
-
*/
|
|
220
|
-
declare class CaucaManagementUserComponent implements OnInit {
|
|
221
|
-
users: UserModel[];
|
|
222
|
-
showColumnXS: boolean;
|
|
223
|
-
private readonly managementUserService;
|
|
175
|
+
refresh(): void;
|
|
176
|
+
protected readonly filterPredicate: (filter: string) => ODataFilter[];
|
|
177
|
+
protected openPermissions(row: UserListRow): Promise<void>;
|
|
178
|
+
protected onDelete(row: unknown): void;
|
|
179
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserListGridComponent, never>;
|
|
180
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserListGridComponent, "cauca-user-list-grid", never, { "extraColumns": { "alias": "extraColumns"; "required": false; "isSignal": true; }; "showAddButton": { "alias": "showAddButton"; "required": false; "isSignal": true; }; "addButtonLabel": { "alias": "addButtonLabel"; "required": false; "isSignal": true; }; "canEdit": { "alias": "canEdit"; "required": false; "isSignal": true; }; "canDelete": { "alias": "canDelete"; "required": false; "isSignal": true; }; "editLinkField": { "alias": "editLinkField"; "required": false; "isSignal": true; }; "showPermissions": { "alias": "showPermissions"; "required": false; "isSignal": true; }; "persistState": { "alias": "persistState"; "required": false; "isSignal": true; }; }, { "addClick": "addClick"; "deleteClick": "deleteClick"; }, never, never, true, never>;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** The value a read view emits for a scope covering everything, in place of a list of names. */
|
|
184
|
+
declare const AllScopeToken = "ALL";
|
|
185
|
+
declare class ScopeListGridColumnComponent extends BaseGridColumnComponent {
|
|
186
|
+
/** Translation key shown instead of the list when the row's scope covers everything. */
|
|
187
|
+
readonly allLabel: _angular_core.InputSignal<string>;
|
|
188
|
+
protected readonly allToken = "ALL";
|
|
189
|
+
/**
|
|
190
|
+
* The `providers` alias above is what makes the grid's `ContentChildren(BaseGridColumnComponent)`
|
|
191
|
+
* match this subclass; without it the column registers nowhere and renders as an empty slot.
|
|
192
|
+
*/
|
|
224
193
|
constructor();
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
onRowUpdated(e: any): void;
|
|
228
|
-
onRowRemoved(e: any): void;
|
|
229
|
-
userNameAlreadyUsedValidation: (e: any) => Promise<boolean>;
|
|
230
|
-
private saveGroup;
|
|
231
|
-
private getUsers;
|
|
232
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CaucaManagementUserComponent, never>;
|
|
233
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CaucaManagementUserComponent, "cauca-management-user", never, {}, {}, never, never, true, never>;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* @deprecated Import CaucaManagementComponent, CaucaManagementUserComponent and
|
|
238
|
-
* CaucaManagementGroupComponent directly in your standalone components. Kept as a re-export
|
|
239
|
-
* so existing consumers keep compiling.
|
|
240
|
-
*/
|
|
241
|
-
declare class CaucaManagementModule {
|
|
242
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CaucaManagementModule, never>;
|
|
243
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CaucaManagementModule, never, [typeof CaucaManagementComponent, typeof CaucaManagementGroupComponent, typeof CaucaManagementUserComponent], [typeof CaucaManagementComponent, typeof CaucaManagementUserComponent, typeof CaucaManagementGroupComponent]>;
|
|
244
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<CaucaManagementModule>;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* @deprecated This service is obsolete and should not be used.
|
|
249
|
-
*/
|
|
250
|
-
declare class ManagementUserService {
|
|
251
|
-
protected readonly http: HttpClient;
|
|
252
|
-
private readonly baseUrl;
|
|
253
|
-
private readonly baseUrlToUse;
|
|
254
|
-
getAll<TUser>(): Observable<TUser[]>;
|
|
255
|
-
get<TUser>(idUser: string): Observable<TUser>;
|
|
256
|
-
getGroup(idUser: string): Observable<any>;
|
|
257
|
-
addGroup(userGroup: UserGroupModel): Observable<any>;
|
|
258
|
-
deleteGroup(idUserGroup: string): Observable<any>;
|
|
259
|
-
addPermission(userPermission: UserPermissionModel): Observable<any>;
|
|
260
|
-
deletePermission(idUserPermission: string): Observable<any>;
|
|
261
|
-
save<TUser>(user: TUser): Observable<any>;
|
|
262
|
-
delete(idUser: string): Observable<any>;
|
|
263
|
-
hasExistingUserName<TUser>(user: TUser): Observable<boolean>;
|
|
264
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ManagementUserService, never>;
|
|
265
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ManagementUserService>;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* @deprecated This service is obsolete and should not be used.
|
|
270
|
-
*/
|
|
271
|
-
declare class ManagementGroupService {
|
|
272
|
-
private readonly http;
|
|
273
|
-
private readonly baseUrl;
|
|
274
|
-
private readonly baseUrlToUse;
|
|
275
|
-
getAll(): Observable<GroupModel[]>;
|
|
276
|
-
get(idGroup: string): Observable<GroupModel>;
|
|
277
|
-
save(group: GroupModel): Observable<any>;
|
|
278
|
-
delete(idGroup: string): Observable<any>;
|
|
279
|
-
hasExistingGroupName(group: GroupModel): Observable<boolean>;
|
|
280
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ManagementGroupService, never>;
|
|
281
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ManagementGroupService>;
|
|
194
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScopeListGridColumnComponent, never>;
|
|
195
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScopeListGridColumnComponent, "cauca-scope-list-grid-column", never, { "allLabel": { "alias": "allLabel"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
282
196
|
}
|
|
283
197
|
|
|
284
|
-
export {
|
|
285
|
-
export type { CaucaManagementConfig, RefreshablePermissionState, UserPermissionsDialogData };
|
|
198
|
+
export { AllScopeToken, GroupEditionPageComponent, GroupsPageComponent, MANAGEMENT_ROUTE_SEGMENT, MANAGEMENT_URL_PREFIX, REFRESHABLE_PERMISSION_STATE_TOKEN, ScopeListGridColumnComponent, UserListGridComponent, UserPermissionsDialogComponent, UsersPageComponent, managementGroupRoutes, provideCaucaManagement };
|
|
199
|
+
export type { CaucaManagementConfig, RefreshablePermissionState, UserGridColumn, UserGridColumnKind, UserListRow, UserPermissionsDialogData };
|