@masterteam/delegations 0.0.18 → 0.0.19
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/delegations",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/delegations",
|
|
6
6
|
"linkDirectory": false,
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"tailwindcss-primeui": "^0.6.1",
|
|
22
22
|
"@ngxs/store": "^20.1.0",
|
|
23
23
|
"@masterteam/components": "^0.0.175",
|
|
24
|
-
"@masterteam/
|
|
25
|
-
"@masterteam/
|
|
24
|
+
"@masterteam/icons": "^0.0.15",
|
|
25
|
+
"@masterteam/forms": "^0.0.80"
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"exports": {
|
|
@@ -20,6 +20,13 @@ type DelegationEffectiveStatus = 'PendingApproval' | 'Scheduled' | 'Active' | 'I
|
|
|
20
20
|
type DelegationApprovalStatus = 'NotRequired' | 'Pending' | 'Approved' | 'Rejected';
|
|
21
21
|
type DelegationAllowedAction = 'View' | 'Edit' | 'Approve' | 'Reject' | 'Cancel' | 'StartSession' | 'EndSession';
|
|
22
22
|
type DelegationDayRuleMode = 'FullRange' | 'SpecificDays';
|
|
23
|
+
type DelegationDisplayValue = string | {
|
|
24
|
+
ar?: string | null;
|
|
25
|
+
en?: string | null;
|
|
26
|
+
defaultAr?: string | null;
|
|
27
|
+
defaultEn?: string | null;
|
|
28
|
+
[locale: string]: unknown;
|
|
29
|
+
} | null;
|
|
23
30
|
interface DelegationParty {
|
|
24
31
|
userId: string;
|
|
25
32
|
displayName: string;
|
|
@@ -50,7 +57,7 @@ interface DelegationRow {
|
|
|
50
57
|
approval: DelegationApprovalInfo;
|
|
51
58
|
cancellation: DelegationCancellationInfo;
|
|
52
59
|
allowedActions: DelegationAllowedAction[];
|
|
53
|
-
scopeSummary:
|
|
60
|
+
scopeSummary: DelegationDisplayValue;
|
|
54
61
|
rowVersion: string;
|
|
55
62
|
}
|
|
56
63
|
interface DelegationPage<T> {
|
|
@@ -71,38 +78,73 @@ interface DelegationScopeTarget {
|
|
|
71
78
|
moduleKey?: string | null;
|
|
72
79
|
permissionModuleType?: string | null;
|
|
73
80
|
permissionTargetId?: number | null;
|
|
74
|
-
displayName?:
|
|
81
|
+
displayName?: DelegationDisplayValue;
|
|
82
|
+
displayLabel?: DelegationDisplayValue;
|
|
83
|
+
label?: DelegationDisplayValue;
|
|
75
84
|
}
|
|
76
85
|
interface DelegationScopeAction {
|
|
77
86
|
applicationKey: string;
|
|
78
87
|
operationKey: string;
|
|
79
88
|
operationKind: string;
|
|
80
|
-
displayName?:
|
|
81
|
-
displayLabel?:
|
|
82
|
-
operationDisplayName?:
|
|
83
|
-
operationLabel?:
|
|
84
|
-
label?:
|
|
89
|
+
displayName?: DelegationDisplayValue;
|
|
90
|
+
displayLabel?: DelegationDisplayValue;
|
|
91
|
+
operationDisplayName?: DelegationDisplayValue;
|
|
92
|
+
operationLabel?: DelegationDisplayValue;
|
|
93
|
+
label?: DelegationDisplayValue;
|
|
85
94
|
permissionCommand?: string | null;
|
|
86
95
|
businessActionCode?: string | null;
|
|
87
96
|
isHighRisk?: boolean;
|
|
88
97
|
isDelegableSnapshot?: boolean;
|
|
89
98
|
}
|
|
99
|
+
interface DelegationScopeFact {
|
|
100
|
+
key?: string | null;
|
|
101
|
+
code?: string | null;
|
|
102
|
+
id?: string | number | null;
|
|
103
|
+
displayName?: DelegationDisplayValue;
|
|
104
|
+
displayLabel?: DelegationDisplayValue;
|
|
105
|
+
label?: DelegationDisplayValue;
|
|
106
|
+
[extra: string]: unknown;
|
|
107
|
+
}
|
|
90
108
|
interface DelegationGrant {
|
|
91
109
|
/** Optional backend-provided stable grant identity; preferred for de-dup when present. */
|
|
92
110
|
key?: string;
|
|
93
111
|
applicationKey: string;
|
|
94
112
|
target: DelegationScopeTarget;
|
|
95
113
|
action: DelegationScopeAction;
|
|
96
|
-
accessibilities:
|
|
97
|
-
dataFilters:
|
|
98
|
-
constraints:
|
|
114
|
+
accessibilities: DelegationScopeFact[];
|
|
115
|
+
dataFilters: DelegationScopeFact[];
|
|
116
|
+
constraints: DelegationScopeFact[];
|
|
99
117
|
}
|
|
100
118
|
interface DelegationScopeSelection {
|
|
101
119
|
grants: DelegationGrant[];
|
|
102
120
|
metadata: Record<string, unknown>;
|
|
103
121
|
}
|
|
104
|
-
|
|
105
|
-
|
|
122
|
+
interface DelegationScopeCombinationRule {
|
|
123
|
+
applicationKey?: string | null;
|
|
124
|
+
targetType: string;
|
|
125
|
+
targetKey: string;
|
|
126
|
+
operationKey: string;
|
|
127
|
+
accessibilityKeys?: string[] | null;
|
|
128
|
+
dataFilterKeys?: string[] | null;
|
|
129
|
+
constraintKeys?: string[] | null;
|
|
130
|
+
[extra: string]: unknown;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* `scope/options` may come back either as legacy `grants[]` or as the newer
|
|
134
|
+
* catalog facts (`targets + operations + combinationRules`).
|
|
135
|
+
*/
|
|
136
|
+
interface DelegationScopeOptions {
|
|
137
|
+
grants?: DelegationGrant[] | null;
|
|
138
|
+
metadata?: Record<string, unknown>;
|
|
139
|
+
targets?: DelegationScopeTarget[] | null;
|
|
140
|
+
operations?: DelegationScopeAction[] | null;
|
|
141
|
+
accessibilities?: DelegationScopeFact[] | null;
|
|
142
|
+
presets?: Record<string, unknown>[] | null;
|
|
143
|
+
combinationRules?: DelegationScopeCombinationRule[] | null;
|
|
144
|
+
nonDelegableOperations?: (string | DelegationScopeFact)[] | null;
|
|
145
|
+
dataFilters?: DelegationScopeFact[] | null;
|
|
146
|
+
constraints?: DelegationScopeFact[] | null;
|
|
147
|
+
}
|
|
106
148
|
interface DelegationScopeWarning {
|
|
107
149
|
code?: string;
|
|
108
150
|
message: string;
|
|
@@ -119,7 +161,7 @@ interface DelegationScopePreview {
|
|
|
119
161
|
isValid: boolean;
|
|
120
162
|
normalizedScope: DelegationScopeSelection;
|
|
121
163
|
scopeHash: string;
|
|
122
|
-
summary:
|
|
164
|
+
summary: DelegationDisplayValue;
|
|
123
165
|
warnings: DelegationScopeWarning[];
|
|
124
166
|
deniedItems: DelegationScopeDeniedItem[];
|
|
125
167
|
}
|
|
@@ -245,6 +287,7 @@ declare class TopbarDelegationMenu {
|
|
|
245
287
|
protected readonly onBehalfOf: _angular_core.Signal<_masterteam_delegations.DelegationParty | null>;
|
|
246
288
|
protected readonly executedBy: _angular_core.Signal<_masterteam_delegations.DelegationParty | null>;
|
|
247
289
|
protected readonly mode: _angular_core.Signal<"active" | "candidates" | "hidden">;
|
|
290
|
+
protected formatScopeSummary(summary: DelegationRow['scopeSummary']): string;
|
|
248
291
|
togglePopover(event: Event): void;
|
|
249
292
|
start(row: DelegationRow, event: MouseEvent): void;
|
|
250
293
|
switchTo(row: DelegationRow, event: MouseEvent): void;
|
|
@@ -279,6 +322,7 @@ declare class StartSessionDialog {
|
|
|
279
322
|
private readonly transloco;
|
|
280
323
|
protected readonly isBusy: _angular_core.Signal<boolean>;
|
|
281
324
|
protected readonly bodyKey: _angular_core.Signal<"delegations.session.switchConfirmBody" | "delegations.session.startConfirmBody">;
|
|
325
|
+
protected formatScopeSummary(summary: DelegationRow['scopeSummary']): string;
|
|
282
326
|
confirm(): void;
|
|
283
327
|
cancel(): void;
|
|
284
328
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StartSessionDialog, never>;
|
|
@@ -356,7 +400,7 @@ declare class DelegationsList implements OnInit {
|
|
|
356
400
|
label: string;
|
|
357
401
|
}[]>;
|
|
358
402
|
protected readonly isLoading: _angular_core.Signal<boolean>;
|
|
359
|
-
protected readonly scopeOptions: _angular_core.Signal<_masterteam_delegations.
|
|
403
|
+
protected readonly scopeOptions: _angular_core.Signal<_masterteam_delegations.DelegationScopeOptions | null>;
|
|
360
404
|
protected readonly rows: _angular_core.Signal<DelegationRow[]>;
|
|
361
405
|
statusCol: _angular_core.Signal<TemplateRef<unknown>>;
|
|
362
406
|
userCol: _angular_core.Signal<TemplateRef<unknown>>;
|
|
@@ -374,6 +418,7 @@ declare class DelegationsList implements OnInit {
|
|
|
374
418
|
private reloadCurrentTab;
|
|
375
419
|
protected has(row: DelegationRow, action: DelegationAllowedAction): boolean;
|
|
376
420
|
protected formatDays(row: DelegationRow): string;
|
|
421
|
+
protected formatScopeSummary(value: DelegationRow['scopeSummary']): string;
|
|
377
422
|
private viewDetails;
|
|
378
423
|
private openForm;
|
|
379
424
|
private approve;
|
|
@@ -456,6 +501,7 @@ declare class DelegationDetailDrawer implements OnInit {
|
|
|
456
501
|
protected approvalLabel(): string;
|
|
457
502
|
protected getScopeTargetLabel(target: DelegationScopeTarget): string;
|
|
458
503
|
protected getScopeActionLabel(action: DelegationScopeAction): string;
|
|
504
|
+
protected formatScopeSummary(summary: DelegationDisplayValue | undefined): string;
|
|
459
505
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationDetailDrawer, never>;
|
|
460
506
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DelegationDetailDrawer, "mt-delegation-detail-drawer", never, { "delegationId": { "alias": "delegationId"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
461
507
|
}
|
|
@@ -484,7 +530,8 @@ declare class ScopePicker {
|
|
|
484
530
|
*/
|
|
485
531
|
readonly delegatorUserId: _angular_core.InputSignal<string | undefined>;
|
|
486
532
|
private readonly facade;
|
|
487
|
-
|
|
533
|
+
private readonly transloco;
|
|
534
|
+
protected readonly options: _angular_core.Signal<_masterteam_delegations.DelegationScopeOptions | null>;
|
|
488
535
|
protected readonly preview: _angular_core.Signal<_masterteam_delegations.DelegationScopePreview | null>;
|
|
489
536
|
protected readonly isLoadingOptions: _angular_core.Signal<boolean>;
|
|
490
537
|
protected readonly isPreviewing: _angular_core.Signal<boolean>;
|
|
@@ -500,10 +547,12 @@ declare class ScopePicker {
|
|
|
500
547
|
protected isSelected(grant: DelegationGrant): boolean;
|
|
501
548
|
protected getTargetLabel(target: DelegationScopeTarget): string;
|
|
502
549
|
protected getActionLabel(grant: DelegationGrant): string;
|
|
550
|
+
protected getPreviewSummary(summary: DelegationDisplayValue | undefined): string;
|
|
503
551
|
protected formatDeniedOperation(value?: string | null): string;
|
|
504
552
|
protected formatDeniedTarget(value?: string | null): string;
|
|
505
553
|
protected toggleGrant(grant: DelegationGrant): void;
|
|
506
554
|
protected selectedCount(group: TargetGroup): number;
|
|
555
|
+
private currentLanguage;
|
|
507
556
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScopePicker, never>;
|
|
508
557
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScopePicker, "mt-scope-picker", never, { "scope": { "alias": "scope"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "delegatorUserId": { "alias": "delegatorUserId"; "required": false; "isSignal": true; }; }, { "scope": "scopeChange"; }, never, never, true, never>;
|
|
509
558
|
}
|
|
@@ -625,7 +674,7 @@ declare class DelegationsState {
|
|
|
625
674
|
getActive(ctx: StateContext<DelegationsStateModel>, { query }: GetActiveAssignedDelegations): rxjs.Observable<Response<DelegationPage<DelegationRow>>>;
|
|
626
675
|
getDetail(ctx: StateContext<DelegationsStateModel>, { id }: GetDelegationDetail): rxjs.Observable<Response<DelegationDetail>>;
|
|
627
676
|
clearDetail(ctx: StateContext<DelegationsStateModel>): void;
|
|
628
|
-
getScopeOptions(ctx: StateContext<DelegationsStateModel>, { delegatorUserId }: GetScopeOptions): rxjs.Observable<Response<
|
|
677
|
+
getScopeOptions(ctx: StateContext<DelegationsStateModel>, { delegatorUserId }: GetScopeOptions): rxjs.Observable<Response<DelegationScopeOptions>>;
|
|
629
678
|
previewScope(ctx: StateContext<DelegationsStateModel>, { scope }: PreviewScope): rxjs.Observable<Response<DelegationScopePreview>>;
|
|
630
679
|
clearScopePreview(ctx: StateContext<DelegationsStateModel>): void;
|
|
631
680
|
createLegacy(ctx: StateContext<DelegationsStateModel>, { request }: CreateDelegationLegacy): rxjs.Observable<Response<DelegationDto>>;
|
|
@@ -645,7 +694,7 @@ declare class DelegationsFacade {
|
|
|
645
694
|
readonly assignedPage: _angular_core.Signal<_masterteam_delegations.DelegationPage<_masterteam_delegations.DelegationRow> | null>;
|
|
646
695
|
readonly activePage: _angular_core.Signal<_masterteam_delegations.DelegationPage<_masterteam_delegations.DelegationRow> | null>;
|
|
647
696
|
readonly detail: _angular_core.Signal<_masterteam_delegations.DelegationDetail | null>;
|
|
648
|
-
readonly scopeOptions: _angular_core.Signal<
|
|
697
|
+
readonly scopeOptions: _angular_core.Signal<_masterteam_delegations.DelegationScopeOptions | null>;
|
|
649
698
|
readonly scopePreview: _angular_core.Signal<_masterteam_delegations.DelegationScopePreview | null>;
|
|
650
699
|
private readonly loadingActive;
|
|
651
700
|
private readonly errors;
|
|
@@ -773,4 +822,4 @@ declare class DelegationSessionFacade {
|
|
|
773
822
|
}
|
|
774
823
|
|
|
775
824
|
export { ApproveDelegation, CancelDelegation, ClearDelegationDetail, ClearScopePreview, CreateDelegationLegacy, CreateDelegationV2, DelegationDetailDrawer, DelegationForm, DelegationSessionActionKey, DelegationSessionFacade, DelegationSessionState, DelegationStatusChip, Delegations, DelegationsActionKey, DelegationsFacade, DelegationsList, DelegationsState, EndDelegationSession, GetActiveAssignedDelegations, GetAssignedDelegations, GetDelegationDetail, GetMyDelegations, GetScopeOptions, LoadDelegationCandidates, PreviewScope, RejectDelegation, RejectDelegationDialog, ScopePicker, StartDelegationSession, StartSessionDialog, SwitchDelegationSession, TopbarDelegationMenu, UpdateDelegationLegacy, UpdateDelegationV2, appDelegationInterceptor };
|
|
776
|
-
export type { ActiveDelegationSession, ApproveDelegationRequest, CreateDelegationLegacyRequest, CreateDelegationV2Request, DelegationAllowedAction, DelegationApprovalInfo, DelegationApprovalStatus, DelegationCancellationInfo, DelegationDayRuleMode, DelegationDetail, DelegationDto, DelegationEffectiveStatus, DelegationGrant, DelegationListQuery, DelegationPage, DelegationParty, DelegationRow, DelegationScopeAction, DelegationScopeDeniedItem, DelegationScopeOptions, DelegationScopePreview, DelegationScopeSelection, DelegationScopeTarget, DelegationScopeWarning, DelegationSessionInvalidationReason, DelegationSessionStateModel, DelegationSortDirection, DelegationStatusInfo, DelegationsStateModel, RejectDelegationRequest, UpdateDelegationLegacyRequest, UpdateDelegationV2Request };
|
|
825
|
+
export type { ActiveDelegationSession, ApproveDelegationRequest, CreateDelegationLegacyRequest, CreateDelegationV2Request, DelegationAllowedAction, DelegationApprovalInfo, DelegationApprovalStatus, DelegationCancellationInfo, DelegationDayRuleMode, DelegationDetail, DelegationDisplayValue, DelegationDto, DelegationEffectiveStatus, DelegationGrant, DelegationListQuery, DelegationPage, DelegationParty, DelegationRow, DelegationScopeAction, DelegationScopeCombinationRule, DelegationScopeDeniedItem, DelegationScopeFact, DelegationScopeOptions, DelegationScopePreview, DelegationScopeSelection, DelegationScopeTarget, DelegationScopeWarning, DelegationSessionInvalidationReason, DelegationSessionStateModel, DelegationSortDirection, DelegationStatusInfo, DelegationsStateModel, RejectDelegationRequest, UpdateDelegationLegacyRequest, UpdateDelegationV2Request };
|