@masterteam/delegations 0.0.25 → 0.0.27

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.25",
3
+ "version": "0.0.27",
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.175",
24
- "@masterteam/forms": "^0.0.80",
25
- "@masterteam/icons": "^0.0.15"
23
+ "@masterteam/icons": "^0.0.15",
24
+ "@masterteam/forms": "^0.0.81",
25
+ "@masterteam/components": "^0.0.179"
26
26
  },
27
27
  "sideEffects": false,
28
28
  "exports": {
@@ -317,11 +317,12 @@ interface DelegationsStateModel extends LoadingStateShape<DelegationsActionKey>
317
317
  * State C — active delegated session: shows "Acting on behalf of {delegator}" +
318
318
  * "Executed by {actual user}", plus Back / Switch.
319
319
  */
320
- declare class TopbarDelegationMenu {
320
+ declare class TopbarDelegationMenu implements OnInit {
321
321
  /** Path to the management page, e.g. `/control-panel/delegations` or `/delegations`. */
322
322
  readonly managePath: _angular_core.InputSignal<string>;
323
323
  readonly compact: _angular_core.InputSignal<boolean>;
324
324
  readonly showManageLink: _angular_core.InputSignal<boolean>;
325
+ readonly promptOnCandidates: _angular_core.InputSignal<boolean>;
325
326
  private readonly facade;
326
327
  private readonly modal;
327
328
  private readonly transloco;
@@ -331,15 +332,19 @@ declare class TopbarDelegationMenu {
331
332
  protected readonly hasCandidates: _angular_core.Signal<boolean>;
332
333
  protected readonly onBehalfOf: _angular_core.Signal<_masterteam_delegations.DelegationParty | null>;
333
334
  protected readonly executedBy: _angular_core.Signal<_masterteam_delegations.DelegationParty | null>;
334
- protected readonly mode: _angular_core.Signal<"active" | "candidates" | "hidden">;
335
+ private readonly promptShown;
336
+ protected readonly mode: _angular_core.Signal<"hidden" | "candidates" | "active">;
337
+ constructor();
338
+ ngOnInit(): void;
335
339
  protected formatScopeSummary(summary: DelegationRow['scopeSummary']): string;
336
340
  togglePopover(event: Event): void;
337
341
  start(row: DelegationRow, event: MouseEvent): void;
338
342
  switchTo(row: DelegationRow, event: MouseEvent): void;
339
343
  endSession(event: MouseEvent): void;
340
344
  private openConfirm;
345
+ private openCandidatesPrompt;
341
346
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TopbarDelegationMenu, never>;
342
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<TopbarDelegationMenu, "mt-topbar-delegation-menu", never, { "managePath": { "alias": "managePath"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "showManageLink": { "alias": "showManageLink"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
347
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TopbarDelegationMenu, "mt-topbar-delegation-menu", never, { "managePath": { "alias": "managePath"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "showManageLink": { "alias": "showManageLink"; "required": false; "isSignal": true; }; "promptOnCandidates": { "alias": "promptOnCandidates"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
343
348
  }
344
349
 
345
350
  interface StatusVisual {
@@ -367,6 +372,8 @@ declare class StartSessionDialog {
367
372
  private readonly transloco;
368
373
  protected readonly isBusy: _angular_core.Signal<boolean>;
369
374
  protected readonly bodyKey: _angular_core.Signal<"delegations.session.switchConfirmBody" | "delegations.session.startConfirmBody">;
375
+ protected readonly confirmLabelKey: _angular_core.Signal<"delegations.action.switchSession" | "delegations.action.startSession">;
376
+ protected readonly successMessageKey: _angular_core.Signal<"delegations.session.switched" | "delegations.session.started">;
370
377
  protected formatScopeSummary(summary: DelegationRow['scopeSummary']): string;
371
378
  confirm(): void;
372
379
  cancel(): void;
@@ -411,7 +418,7 @@ declare class Delegations implements OnInit {
411
418
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<Delegations, "mt-delegations", never, {}, {}, never, never, true, never>;
412
419
  }
413
420
 
414
- type DelegationTab = 'my' | 'assigned';
421
+ type DelegationTab = 'my' | 'assigned' | 'approvals';
415
422
  /**
416
423
  * Delegations portal page (doc 02, 09): two lists — My Delegations (current user
417
424
  * is delegator) and Delegated To Me (current user is delegate). Rows render only
@@ -425,6 +432,11 @@ declare class DelegationsList implements OnInit {
425
432
  * `data: { showBreadcrumb: false }`.
426
433
  */
427
434
  readonly showBreadcrumb: _angular_core.InputSignal<boolean>;
435
+ /**
436
+ * Admin routes can embed the list under `mt-delegations`, which already owns
437
+ * the page title, back button, and route tabs.
438
+ */
439
+ readonly showPageShell: _angular_core.InputSignal<boolean>;
428
440
  /**
429
441
  * Admin-managed surface: the create/edit form also collects the Delegator /
430
442
  * From user (admin creates a delegation between two users). Client
@@ -437,6 +449,10 @@ declare class DelegationsList implements OnInit {
437
449
  readonly assignedDecisionTab: _angular_core.InputSignal<boolean>;
438
450
  readonly assignedEmptyStateKey: _angular_core.InputSignal<string>;
439
451
  readonly assignedStatus: _angular_core.InputSignal<DelegationEffectiveStatus | null>;
452
+ readonly showApprovalTab: _angular_core.InputSignal<boolean>;
453
+ readonly approvalTabLabelKey: _angular_core.InputSignal<string>;
454
+ readonly approvalEmptyStateKey: _angular_core.InputSignal<string>;
455
+ readonly approvalStatus: _angular_core.InputSignal<DelegationEffectiveStatus>;
440
456
  private readonly facade;
441
457
  private readonly location;
442
458
  private readonly modal;
@@ -461,17 +477,13 @@ declare class DelegationsList implements OnInit {
461
477
  label: string;
462
478
  }[]>;
463
479
  protected readonly isLoading: _angular_core.Signal<boolean>;
464
- protected readonly isLoadingScopeOptions: _angular_core.Signal<boolean>;
465
- protected readonly scopeOptions: _angular_core.Signal<_masterteam_delegations.DelegationScopeOptions | null>;
466
480
  protected readonly rows: _angular_core.Signal<DelegationRow[]>;
467
481
  protected readonly emptyStateKey: _angular_core.Signal<string>;
468
482
  statusCol: _angular_core.Signal<TemplateRef<unknown>>;
469
483
  userCol: _angular_core.Signal<TemplateRef<unknown>>;
470
484
  delegatorCol: _angular_core.Signal<TemplateRef<unknown>>;
471
485
  delegatedUserCol: _angular_core.Signal<TemplateRef<unknown>>;
472
- scopeCol: _angular_core.Signal<TemplateRef<unknown>>;
473
486
  daysCol: _angular_core.Signal<TemplateRef<unknown>>;
474
- protected readonly canCreate: _angular_core.Signal<boolean>;
475
487
  protected readonly tableActions: _angular_core.Signal<TableAction[]>;
476
488
  protected readonly rowActions: _angular_core.WritableSignal<TableAction[]>;
477
489
  protected readonly tableColumns: _angular_core.WritableSignal<ColumnDef[]>;
@@ -484,7 +496,6 @@ declare class DelegationsList implements OnInit {
484
496
  private reloadCurrentTab;
485
497
  protected has(row: DelegationRow, action: DelegationAllowedAction): boolean;
486
498
  protected formatDays(row: DelegationRow): string;
487
- protected formatScopeSummary(value: DelegationRow['scopeSummary']): string;
488
499
  protected getListedParty(row: DelegationRow): DelegationParty;
489
500
  private viewDetails;
490
501
  private openForm;
@@ -494,7 +505,7 @@ declare class DelegationsList implements OnInit {
494
505
  private startSession;
495
506
  private mark;
496
507
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationsList, never>;
497
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DelegationsList, "mt-delegations-list", never, { "showBreadcrumb": { "alias": "showBreadcrumb"; "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; }; }, {}, never, never, true, never>;
508
+ 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; }; }, {}, never, never, true, never>;
498
509
  }
499
510
 
500
511
  interface DelegationFormUserValue {
@@ -862,7 +873,7 @@ interface ActiveDelegationSession {
862
873
  token: string;
863
874
  delegation: DelegationRow;
864
875
  }
865
- type DelegationSessionInvalidationReason = 'TokenInvalid' | 'SessionMismatch' | 'ScopeChanged' | 'Forbidden' | 'Logout' | 'UserSwitch' | 'Manual';
876
+ type DelegationSessionInvalidationReason = 'TokenInvalid' | 'SessionMismatch' | 'ScopeChanged' | 'Forbidden' | 'Logout' | 'UserSwitch' | 'TenantSwitch' | 'AppSwitch' | 'Manual';
866
877
  declare enum DelegationSessionActionKey {
867
878
  LoadCandidates = "loadCandidates",
868
879
  StartSession = "startSession"
@@ -907,7 +918,7 @@ declare class DelegationSessionState {
907
918
  static getErrors(state: DelegationSessionStateModel): Record<string, string | null | undefined>;
908
919
  loadCandidates(ctx: StateContext<DelegationSessionStateModel>): rxjs.Observable<Response<DelegationPage<DelegationRow>>>;
909
920
  start(ctx: StateContext<DelegationSessionStateModel>, { delegation }: StartDelegationSession): rxjs.Observable<Response<string>>;
910
- end(ctx: StateContext<DelegationSessionStateModel>): rxjs.Observable<never>;
921
+ end(ctx: StateContext<DelegationSessionStateModel>, { reason }: EndDelegationSession): rxjs.Observable<never>;
911
922
  switch(ctx: StateContext<DelegationSessionStateModel>, { delegation }: SwitchDelegationSession): rxjs.Observable<void>;
912
923
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationSessionState, never>;
913
924
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<DelegationSessionState>;