@masterteam/delegations 0.0.42 → 0.0.44
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/delegations.css +1 -1
- package/assets/i18n/ar.json +165 -164
- package/assets/i18n/en.json +165 -164
- package/fesm2022/masterteam-delegations.mjs +255 -139
- package/fesm2022/masterteam-delegations.mjs.map +1 -1
- package/package.json +4 -4
- package/types/masterteam-delegations.d.ts +89 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/delegations",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.44",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/delegations",
|
|
6
6
|
"linkDirectory": false,
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"tailwindcss": "^4.2.2",
|
|
21
21
|
"tailwindcss-primeui": "^0.6.1",
|
|
22
22
|
"@ngxs/store": "^20.1.0",
|
|
23
|
-
"@masterteam/components": "^0.0.
|
|
24
|
-
"@masterteam/
|
|
25
|
-
"@masterteam/
|
|
23
|
+
"@masterteam/components": "^0.0.190",
|
|
24
|
+
"@masterteam/icons": "^0.0.16",
|
|
25
|
+
"@masterteam/forms": "^0.0.91"
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"exports": {
|
|
@@ -60,7 +60,6 @@ interface DelegationRow {
|
|
|
60
60
|
approval: DelegationApprovalInfo;
|
|
61
61
|
cancellation: DelegationCancellationInfo;
|
|
62
62
|
allowedActions: DelegationAllowedAction[];
|
|
63
|
-
scopeSummary: DelegationDisplayValue;
|
|
64
63
|
rowVersion: string;
|
|
65
64
|
}
|
|
66
65
|
interface DelegationPage<T> {
|
|
@@ -144,9 +143,8 @@ interface DelegationScopeCombinationRule {
|
|
|
144
143
|
[extra: string]: unknown;
|
|
145
144
|
}
|
|
146
145
|
/**
|
|
147
|
-
* `scope/options`
|
|
148
|
-
*
|
|
149
|
-
* compatibility and diagnostics while older environments catch up.
|
|
146
|
+
* Legacy `scope/options` grouping kept only as a compatibility fallback. The
|
|
147
|
+
* current FE selector contract is `permissions`.
|
|
150
148
|
*/
|
|
151
149
|
interface DelegationScopeHierarchyTarget {
|
|
152
150
|
target: DelegationScopeTarget;
|
|
@@ -205,6 +203,29 @@ interface DelegationScopePermissionGroup {
|
|
|
205
203
|
sortOrder?: number | null;
|
|
206
204
|
levels?: DelegationScopeLevelNode[] | null;
|
|
207
205
|
}
|
|
206
|
+
interface DelegationScopeViewOperation extends DelegationScopeAction {
|
|
207
|
+
selected?: boolean;
|
|
208
|
+
isAvailable?: boolean;
|
|
209
|
+
accessibilities?: DelegationScopeFact[] | null;
|
|
210
|
+
dataFilters?: DelegationScopeFact[] | null;
|
|
211
|
+
constraints?: DelegationScopeFact[] | null;
|
|
212
|
+
}
|
|
213
|
+
interface DelegationScopeViewModule extends Omit<DelegationScopeModuleNode, 'operations'> {
|
|
214
|
+
isAvailable?: boolean;
|
|
215
|
+
operations?: DelegationScopeViewOperation[] | null;
|
|
216
|
+
}
|
|
217
|
+
interface DelegationScopeViewLevel extends Omit<DelegationScopeLevelNode, 'modules' | 'operations'> {
|
|
218
|
+
isAvailable?: boolean;
|
|
219
|
+
operations?: DelegationScopeViewOperation[] | null;
|
|
220
|
+
modules?: DelegationScopeViewModule[] | null;
|
|
221
|
+
}
|
|
222
|
+
interface DelegationScopeViewTemplate extends Omit<DelegationScopePermissionGroup, 'levels'> {
|
|
223
|
+
isAvailable?: boolean;
|
|
224
|
+
levels?: DelegationScopeViewLevel[] | null;
|
|
225
|
+
}
|
|
226
|
+
interface DelegationScopeView {
|
|
227
|
+
templates?: DelegationScopeViewTemplate[] | null;
|
|
228
|
+
}
|
|
208
229
|
interface DelegationAppAccessibility {
|
|
209
230
|
accessibilityGroupId?: number | null;
|
|
210
231
|
applicationKey: string;
|
|
@@ -255,6 +276,7 @@ interface DelegationStatusInfo {
|
|
|
255
276
|
interface DelegationDetail {
|
|
256
277
|
row: DelegationRow;
|
|
257
278
|
scope: DelegationScopeSelection;
|
|
279
|
+
scopeView?: DelegationScopeView | null;
|
|
258
280
|
status: DelegationStatusInfo;
|
|
259
281
|
}
|
|
260
282
|
interface DelegationDto {
|
|
@@ -479,9 +501,8 @@ declare class StartSessionDialog {
|
|
|
479
501
|
private readonly transloco;
|
|
480
502
|
protected readonly isBusy: _angular_core.Signal<boolean>;
|
|
481
503
|
protected readonly bodyKey: _angular_core.Signal<"delegations.session.switchConfirmBody" | "delegations.session.startConfirmBody">;
|
|
482
|
-
protected readonly confirmLabelKey: _angular_core.Signal<"delegations.action.
|
|
504
|
+
protected readonly confirmLabelKey: _angular_core.Signal<"delegations.action.switchSession" | "delegations.action.startSession">;
|
|
483
505
|
protected readonly successMessageKey: _angular_core.Signal<"delegations.session.switched" | "delegations.session.started">;
|
|
484
|
-
protected formatScopeSummary(summary: DelegationRow['scopeSummary']): string;
|
|
485
506
|
protected userEntity(party: DelegationRow['delegator']): _masterteam_components_entities.EntityData;
|
|
486
507
|
confirm(): void;
|
|
487
508
|
cancel(): void;
|
|
@@ -581,6 +602,13 @@ declare class DelegationsList implements OnInit {
|
|
|
581
602
|
readonly tab: _angular_core.InputSignalWithTransform<DelegationTab | null, unknown>;
|
|
582
603
|
/** Bound from the `?view=<id>` query param (detail drawer). */
|
|
583
604
|
readonly view: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
605
|
+
/** Back-compatible notification deep-link aliases for opening details. */
|
|
606
|
+
readonly selected: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
607
|
+
readonly itemSelected: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
608
|
+
readonly selectedItemId: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
609
|
+
readonly selectedItem: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
610
|
+
readonly itemId: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
611
|
+
readonly delegationId: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
584
612
|
/** Bound from the `?edit=<id>` query param (edit drawer). */
|
|
585
613
|
readonly edit: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
586
614
|
private readonly facade;
|
|
@@ -608,6 +636,7 @@ declare class DelegationsList implements OnInit {
|
|
|
608
636
|
protected readonly rows: _angular_core.Signal<DelegationRow[]>;
|
|
609
637
|
protected readonly tableRows: _angular_core.Signal<DelegationTableRow[]>;
|
|
610
638
|
protected readonly emptyStateKey: _angular_core.Signal<string>;
|
|
639
|
+
private readonly detailQueryId;
|
|
611
640
|
protected readonly tableActions: _angular_core.Signal<TableAction[]>;
|
|
612
641
|
protected readonly rowActions: _angular_core.WritableSignal<TableAction[]>;
|
|
613
642
|
/**
|
|
@@ -642,13 +671,14 @@ declare class DelegationsList implements OnInit {
|
|
|
642
671
|
private closeDetail;
|
|
643
672
|
private closeEdit;
|
|
644
673
|
private clearQuery;
|
|
674
|
+
private clearDetailQuery;
|
|
645
675
|
private approve;
|
|
646
676
|
private reject;
|
|
647
677
|
private cancel;
|
|
648
678
|
private startSession;
|
|
649
679
|
private mark;
|
|
650
680
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationsList, never>;
|
|
651
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DelegationsList, "mt-delegations-list", never, { "showBreadcrumb": { "alias": "showBreadcrumb"; "required": false; "isSignal": true; }; "showPageShell": { "alias": "showPageShell"; "required": false; "isSignal": true; }; "adminMode": { "alias": "adminMode"; "required": false; "isSignal": true; }; "surfaceTitleKey": { "alias": "surfaceTitleKey"; "required": false; "isSignal": true; }; "assignedTabLabelKey": { "alias": "assignedTabLabelKey"; "required": false; "isSignal": true; }; "assignedDecisionTab": { "alias": "assignedDecisionTab"; "required": false; "isSignal": true; }; "assignedEmptyStateKey": { "alias": "assignedEmptyStateKey"; "required": false; "isSignal": true; }; "assignedStatus": { "alias": "assignedStatus"; "required": false; "isSignal": true; }; "showApprovalTab": { "alias": "showApprovalTab"; "required": false; "isSignal": true; }; "approvalTabLabelKey": { "alias": "approvalTabLabelKey"; "required": false; "isSignal": true; }; "approvalEmptyStateKey": { "alias": "approvalEmptyStateKey"; "required": false; "isSignal": true; }; "approvalStatus": { "alias": "approvalStatus"; "required": false; "isSignal": true; }; "routed": { "alias": "routed"; "required": false; "isSignal": true; }; "tab": { "alias": "tab"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "edit": { "alias": "edit"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
681
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DelegationsList, "mt-delegations-list", never, { "showBreadcrumb": { "alias": "showBreadcrumb"; "required": false; "isSignal": true; }; "showPageShell": { "alias": "showPageShell"; "required": false; "isSignal": true; }; "adminMode": { "alias": "adminMode"; "required": false; "isSignal": true; }; "surfaceTitleKey": { "alias": "surfaceTitleKey"; "required": false; "isSignal": true; }; "assignedTabLabelKey": { "alias": "assignedTabLabelKey"; "required": false; "isSignal": true; }; "assignedDecisionTab": { "alias": "assignedDecisionTab"; "required": false; "isSignal": true; }; "assignedEmptyStateKey": { "alias": "assignedEmptyStateKey"; "required": false; "isSignal": true; }; "assignedStatus": { "alias": "assignedStatus"; "required": false; "isSignal": true; }; "showApprovalTab": { "alias": "showApprovalTab"; "required": false; "isSignal": true; }; "approvalTabLabelKey": { "alias": "approvalTabLabelKey"; "required": false; "isSignal": true; }; "approvalEmptyStateKey": { "alias": "approvalEmptyStateKey"; "required": false; "isSignal": true; }; "approvalStatus": { "alias": "approvalStatus"; "required": false; "isSignal": true; }; "routed": { "alias": "routed"; "required": false; "isSignal": true; }; "tab": { "alias": "tab"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "itemSelected": { "alias": "itemSelected"; "required": false; "isSignal": true; }; "selectedItemId": { "alias": "selectedItemId"; "required": false; "isSignal": true; }; "selectedItem": { "alias": "selectedItem"; "required": false; "isSignal": true; }; "itemId": { "alias": "itemId"; "required": false; "isSignal": true; }; "delegationId": { "alias": "delegationId"; "required": false; "isSignal": true; }; "edit": { "alias": "edit"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
652
682
|
}
|
|
653
683
|
|
|
654
684
|
interface DelegationFormUserValue {
|
|
@@ -714,8 +744,43 @@ declare class DelegationForm implements OnInit {
|
|
|
714
744
|
}
|
|
715
745
|
|
|
716
746
|
type DetailTab = 'overview' | 'scope';
|
|
747
|
+
type ScopeViewNode = {
|
|
748
|
+
kind: 'template';
|
|
749
|
+
key: string;
|
|
750
|
+
label: string;
|
|
751
|
+
fallbackKey?: string | null;
|
|
752
|
+
isAvailable: boolean;
|
|
753
|
+
depth: number;
|
|
754
|
+
children: ScopeViewNode[];
|
|
755
|
+
} | {
|
|
756
|
+
kind: 'level';
|
|
757
|
+
key: string;
|
|
758
|
+
label: string;
|
|
759
|
+
fallbackKey?: string | null;
|
|
760
|
+
isAvailable: boolean;
|
|
761
|
+
depth: number;
|
|
762
|
+
children: ScopeViewNode[];
|
|
763
|
+
} | {
|
|
764
|
+
kind: 'module';
|
|
765
|
+
key: string;
|
|
766
|
+
label: string;
|
|
767
|
+
fallbackKey?: string | null;
|
|
768
|
+
isAvailable: boolean;
|
|
769
|
+
depth: number;
|
|
770
|
+
children: ScopeViewNode[];
|
|
771
|
+
} | {
|
|
772
|
+
kind: 'operation';
|
|
773
|
+
key: string;
|
|
774
|
+
label: string;
|
|
775
|
+
fallbackKey?: string | null;
|
|
776
|
+
isAvailable: boolean;
|
|
777
|
+
isHighRisk: boolean;
|
|
778
|
+
depth: number;
|
|
779
|
+
};
|
|
717
780
|
/**
|
|
718
|
-
* Read-only drawer that shows
|
|
781
|
+
* Read-only drawer that shows `DelegationDetail` row/status plus saved scope
|
|
782
|
+
* from `scopeView`. The persisted `scope.grants` shape is not parsed for
|
|
783
|
+
* display; it remains a backend validation/persistence shape.
|
|
719
784
|
*/
|
|
720
785
|
declare class DelegationDetailDrawer implements OnInit {
|
|
721
786
|
readonly delegationId: _angular_core.InputSignal<number>;
|
|
@@ -732,13 +797,24 @@ declare class DelegationDetailDrawer implements OnInit {
|
|
|
732
797
|
protected readonly isLoading: _angular_core.Signal<boolean>;
|
|
733
798
|
protected readonly detail: _angular_core.Signal<_masterteam_delegations.DelegationDetail | null>;
|
|
734
799
|
protected readonly row: _angular_core.Signal<_masterteam_delegations.DelegationRow | null>;
|
|
800
|
+
protected readonly scopeNodes: _angular_core.Signal<ScopeViewNode[]>;
|
|
801
|
+
protected readonly scopeVisibleNodes: _angular_core.Signal<ScopeViewNode[]>;
|
|
802
|
+
protected readonly selectedOperationCount: _angular_core.Signal<number>;
|
|
735
803
|
ngOnInit(): void;
|
|
736
804
|
protected formatSpecificDays(days: readonly number[] | null | undefined): string;
|
|
737
805
|
protected approvalLabel(): string;
|
|
738
|
-
protected getScopeTargetLabel(target: DelegationScopeTarget): string;
|
|
739
|
-
protected getScopeActionLabel(action: DelegationScopeAction): string;
|
|
740
|
-
protected formatScopeSummary(summary: DelegationDisplayValue | undefined): string;
|
|
741
806
|
protected userEntity(party: DelegationParty, label?: string): _masterteam_components_entities.EntityData;
|
|
807
|
+
protected hasChildren(node: ScopeViewNode): boolean;
|
|
808
|
+
protected trackScopeNode(_index: number, node: ScopeViewNode): string;
|
|
809
|
+
private buildScopeViewTree;
|
|
810
|
+
private flattenScopeNodes;
|
|
811
|
+
private toTemplateNode;
|
|
812
|
+
private toLevelNodes;
|
|
813
|
+
private toModuleNode;
|
|
814
|
+
private toOperationNode;
|
|
815
|
+
private displayLabel;
|
|
816
|
+
private toArray;
|
|
817
|
+
private hasScopeChildren;
|
|
742
818
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationDetailDrawer, never>;
|
|
743
819
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DelegationDetailDrawer, "mt-delegation-detail-drawer", never, { "delegationId": { "alias": "delegationId"; "required": true; "isSignal": true; }; "adminMode": { "alias": "adminMode"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
744
820
|
}
|
|
@@ -750,7 +826,7 @@ interface DelegationScopeTreeNode {
|
|
|
750
826
|
displayName?: DelegationDisplayValue;
|
|
751
827
|
fallbackKey?: string | null;
|
|
752
828
|
isHighRisk?: boolean;
|
|
753
|
-
/** Present only on operation leaves
|
|
829
|
+
/** Present only on operation leaves: the explicit grant to persist/preview. */
|
|
754
830
|
grant?: DelegationGrant;
|
|
755
831
|
children?: DelegationScopeTreeNode[];
|
|
756
832
|
}
|
|
@@ -1181,4 +1257,4 @@ declare class DelegationSessionFacade {
|
|
|
1181
1257
|
}
|
|
1182
1258
|
|
|
1183
1259
|
export { ApproveDelegation, CancelDelegation, ClearDelegationDetail, ClearScopePreview, CreateDelegationLegacy, CreateDelegationV2, DELEGATION_RELOAD_ON_SESSION_CHANGE, DelegationDetailDrawer, DelegationForm, DelegationMenuPanel, DelegationSessionActionKey, DelegationSessionFacade, DelegationSessionState, DelegationStatusChip, Delegations, DelegationsActionKey, DelegationsFacade, DelegationsList, DelegationsState, EndDelegationSession, GetActiveAssignedDelegations, GetAdminDelegations, GetApprovalDelegations, GetAssignedDelegations, GetDelegationDetail, GetMyDelegations, GetScopeOptions, LoadDelegationCandidates, MarkDelegationPrompted, PreviewScope, RejectDelegation, RejectDelegationDialog, ScopePicker, StartDelegationSession, StartSessionDialog, SwitchDelegationSession, TopbarDelegationMenu, UpdateDelegationLegacy, UpdateDelegationV2, appDelegationInterceptor };
|
|
1184
|
-
export type { ActiveDelegationSession, AdminCreateDelegationV2Request, AdminUpdateDelegationV2Request, ApproveDelegationRequest, CreateDelegationLegacyRequest, CreateDelegationV2Request, DelegationAllowedAction, DelegationAppAccessibility, DelegationApprovalInfo, DelegationApprovalStatus, DelegationCancellationInfo, DelegationDayRuleMode, DelegationDetail, DelegationDisplayValue, DelegationDto, DelegationEffectiveStatus, DelegationGrant, DelegationListQuery, DelegationPage, DelegationParty, DelegationRow, DelegationScopeAction, DelegationScopeCombinationRule, DelegationScopeDeniedItem, DelegationScopeFact, DelegationScopeHierarchyGroup, DelegationScopeHierarchyTarget, DelegationScopeLevelNode, DelegationScopeModuleNode, DelegationScopeOptions, DelegationScopePermissionGroup, DelegationScopePreview, DelegationScopePreviewRequest, DelegationScopeSelection, DelegationScopeTarget, DelegationScopeWarning, DelegationSessionInvalidationReason, DelegationSessionStateModel, DelegationSortDirection, DelegationStatusInfo, DelegationsStateModel, RejectDelegationRequest, UpdateDelegationLegacyRequest, UpdateDelegationV2Request };
|
|
1260
|
+
export type { ActiveDelegationSession, AdminCreateDelegationV2Request, AdminUpdateDelegationV2Request, ApproveDelegationRequest, CreateDelegationLegacyRequest, CreateDelegationV2Request, DelegationAllowedAction, DelegationAppAccessibility, DelegationApprovalInfo, DelegationApprovalStatus, DelegationCancellationInfo, DelegationDayRuleMode, DelegationDetail, DelegationDisplayValue, DelegationDto, DelegationEffectiveStatus, DelegationGrant, DelegationListQuery, DelegationPage, DelegationParty, DelegationRow, DelegationScopeAction, DelegationScopeCombinationRule, DelegationScopeDeniedItem, DelegationScopeFact, DelegationScopeHierarchyGroup, DelegationScopeHierarchyTarget, DelegationScopeLevelNode, DelegationScopeModuleNode, DelegationScopeOptions, DelegationScopePermissionGroup, DelegationScopePreview, DelegationScopePreviewRequest, DelegationScopeSelection, DelegationScopeTarget, DelegationScopeView, DelegationScopeViewLevel, DelegationScopeViewModule, DelegationScopeViewOperation, DelegationScopeViewTemplate, DelegationScopeWarning, DelegationSessionInvalidationReason, DelegationSessionStateModel, DelegationSortDirection, DelegationStatusInfo, DelegationsStateModel, RejectDelegationRequest, UpdateDelegationLegacyRequest, UpdateDelegationV2Request };
|