@naniteninja/dashboard-components-lib 2.4.4 → 2.4.6

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/index.d.ts CHANGED
@@ -691,6 +691,23 @@ interface IHomeDashboardInputs {
691
691
  mainSwiperHeight: string;
692
692
  subMainSwiperHeight: string;
693
693
  showRejectMenu: boolean;
694
+ /**
695
+ * Put "Chat Handoff" in the dots menu instead of "Reject".
696
+ *
697
+ * Set on the matcher's dashboard: handing the conversation to the client is the matcher's
698
+ * decision, whereas rejecting a prospect is the client's.
699
+ */
700
+ showHandoffOption?: boolean;
701
+ /**
702
+ * Whether handing off is permitted for this particular match right now.
703
+ *
704
+ * The host answers because it holds the meetup time; the rule is any point within 24 hours of
705
+ * the meetup. Returning false renders the item visible but inert, so the matcher can see the
706
+ * option exists and that it is not yet open to them.
707
+ */
708
+ isHandoffAvailable?: (item: ILibClientMatchOverview) => boolean;
709
+ /** Whether this chat has already been handed off, so the item reads as done. */
710
+ isHandoffDone?: (item: ILibClientMatchOverview) => boolean;
694
711
  /** Full pool of bookable itineraries passed to lib-scheduler as fun choices */
695
712
  itineraryPool: ISchedulerEventSuggestion[];
696
713
  /** Max visible fun choices per free-time slot (default 3, grows as user cancels) */
@@ -1843,6 +1860,10 @@ interface ISwipeableTabsHost {
1843
1860
  mainSwiperInstance: Swiper__default;
1844
1861
  _activeIndex: number;
1845
1862
  activeIndex: number;
1863
+ mainSwiperGestureActive: boolean;
1864
+ mainSwiperLastGestureAt: number;
1865
+ activeIndexBeforeLastEmit: number;
1866
+ lastActiveIndexEmitAt: number;
1846
1867
  enableGrouping: boolean;
1847
1868
  enableDragAndDrop: boolean;
1848
1869
  enableTabBarScrollDrag: boolean;
@@ -1965,6 +1986,7 @@ interface ISwipeableTabsHost {
1965
1986
  mergeNewItemsAfterRestore(storedRule: StoredRule): void;
1966
1987
  updateDisplayItems(): void;
1967
1988
  saveState(): void;
1989
+ schedulePortalStabilize?(): void;
1968
1990
  }
1969
1991
 
1970
1992
  declare class SwipeableTabsResizeService {
@@ -2166,6 +2188,30 @@ declare class SwipeableTabsHostState {
2166
2188
  expandedItemLeft: number;
2167
2189
  expandedItemRef: ILibClientMatchOverview | null;
2168
2190
  _activeIndex: number;
2191
+ /**
2192
+ * The main swiper's `slideChange` is only honoured while the user is actually dragging it (or
2193
+ * shortly after they let go / pressed an arrow key). Swiper also fires `slideChange` on its own
2194
+ * after `update()` recomputes the active slide from the translate — and `update()` runs on every
2195
+ * DOM mutation because the swiper is created with `observer: true`. On the client dashboard the
2196
+ * content swiper sits squashed behind a 55px belt, so those recomputations could land on a
2197
+ * neighbouring slide and drag the expanded prospect along with them, one tab at a time, with
2198
+ * nobody touching anything. Without a gesture there is nothing to follow.
2199
+ */
2200
+ mainSwiperGestureActive: boolean;
2201
+ mainSwiperLastGestureAt: number;
2202
+ /**
2203
+ * What `_activeIndex` was right before this component last announced a new index, and when.
2204
+ *
2205
+ * Hosts feed `activeIndexChange` back into `[activeIndex]`, sometimes after a delay and via
2206
+ * config objects that get rebuilt on every data refresh. A rebuild that happens between our emit
2207
+ * and the host catching up pushes the *old* index straight back in, which used to re-expand the
2208
+ * previous prospect and then flip forward again when the host finally caught up. An incoming
2209
+ * value that equals the index we just moved away from, within a short window, is that echo and
2210
+ * is ignored — a genuine host request to go back to it inside that window cannot be told apart,
2211
+ * and is not something a person can do within 1.5 seconds of tapping a different tab.
2212
+ */
2213
+ activeIndexBeforeLastEmit: number;
2214
+ lastActiveIndexEmitAt: number;
2169
2215
  }
2170
2216
 
2171
2217
  declare class SwipeableTabsStateService {
@@ -2489,6 +2535,7 @@ interface IClientHomeHost {
2489
2535
  removeSuggestion: EventEmitter<ISchedulerAction>;
2490
2536
  handleAppearPopup: EventEmitter<AlertStatusFields>;
2491
2537
  rejectRequest: EventEmitter<ILibClientMatchOverview>;
2538
+ handoffRequest: EventEmitter<ILibClientMatchOverview>;
2492
2539
  dismissPriority: EventEmitter<{
2493
2540
  prospectId: string;
2494
2541
  chatId: string;
@@ -2584,6 +2631,13 @@ declare class LibClientHomeComponent implements OnInit, OnDestroy, OnChanges, IC
2584
2631
  removeSuggestion: EventEmitter<ISchedulerAction>;
2585
2632
  handleAppearPopup: EventEmitter<AlertStatusFields>;
2586
2633
  rejectRequest: EventEmitter<ILibClientMatchOverview>;
2634
+ /**
2635
+ * The matcher asked to hand this chat to their client.
2636
+ *
2637
+ * The host owns the decision to accept it — it knows the meetup time and holds the endpoint —
2638
+ * so this only reports the intent.
2639
+ */
2640
+ handoffRequest: EventEmitter<ILibClientMatchOverview>;
2587
2641
  dismissPriority: EventEmitter<{
2588
2642
  prospectId: string;
2589
2643
  chatId: string;
@@ -2608,7 +2662,7 @@ declare class LibClientHomeComponent implements OnInit, OnDestroy, OnChanges, IC
2608
2662
  ngOnDestroy(): void;
2609
2663
  focus(): void;
2610
2664
  static ɵfac: i0.ɵɵFactoryDeclaration<LibClientHomeComponent, never>;
2611
- static ɵcmp: i0.ɵɵComponentDeclaration<LibClientHomeComponent, "lib-client-home", never, { "config": { "alias": "config"; "required": false; }; "menuPosition": { "alias": "menuPosition"; "required": false; }; "role": { "alias": "role"; "required": false; }; "dimMinStatusRank": { "alias": "dimMinStatusRank"; "required": false; }; }, { "activeIndexChange": "activeIndexChange"; "addMessage": "addMessage"; "getMessages": "getMessages"; "bookEvent": "bookEvent"; "removeSuggestion": "removeSuggestion"; "handleAppearPopup": "handleAppearPopup"; "rejectRequest": "rejectRequest"; "dismissPriority": "dismissPriority"; "remainingPrioritiesChange": "remainingPrioritiesChange"; }, never, never, true, never>;
2665
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibClientHomeComponent, "lib-client-home", never, { "config": { "alias": "config"; "required": false; }; "menuPosition": { "alias": "menuPosition"; "required": false; }; "role": { "alias": "role"; "required": false; }; "dimMinStatusRank": { "alias": "dimMinStatusRank"; "required": false; }; }, { "activeIndexChange": "activeIndexChange"; "addMessage": "addMessage"; "getMessages": "getMessages"; "bookEvent": "bookEvent"; "removeSuggestion": "removeSuggestion"; "handleAppearPopup": "handleAppearPopup"; "rejectRequest": "rejectRequest"; "handoffRequest": "handoffRequest"; "dismissPriority": "dismissPriority"; "remainingPrioritiesChange": "remainingPrioritiesChange"; }, never, never, true, never>;
2612
2666
  }
2613
2667
 
2614
2668
  interface IClientMatchOverviewHost {
@@ -2629,9 +2683,13 @@ interface IClientMatchOverviewHost {
2629
2683
  dimmed: boolean;
2630
2684
  statusProgressOverride: number;
2631
2685
  showValueProportionLabel: boolean;
2686
+ showHandoffOption?: boolean;
2687
+ handoffAvailable?: boolean;
2688
+ handoffDone?: boolean;
2632
2689
  sendConversationFlag: EventEmitter<IConversationFlag>;
2633
2690
  repositionRequest: EventEmitter<void>;
2634
2691
  rejectRequest: EventEmitter<void>;
2692
+ handoffRequest: EventEmitter<void>;
2635
2693
  menuTemplate: TemplateRef<IEmptyTemplateContext>;
2636
2694
  rejectMenuTemplate: TemplateRef<IEmptyTemplateContext>;
2637
2695
  elementRef: ElementRef<HTMLElement>;
@@ -2662,6 +2720,14 @@ declare class ClientMatchOverviewActionsService {
2662
2720
  toggleRejectMenu(event: Event): void;
2663
2721
  closeRejectMenu(): void;
2664
2722
  reject(): void;
2723
+ /**
2724
+ * Hand the conversation to the client.
2725
+ *
2726
+ * Refused before the meetup is within 24 hours, and refused once it has already happened —
2727
+ * checked here as well as in the template so a stray call cannot bypass a disabled item. The
2728
+ * menu closes either way, because leaving it open after a tap reads as the tap not registering.
2729
+ */
2730
+ handoff(): void;
2665
2731
  reposition(): void;
2666
2732
  private createMenu;
2667
2733
  private destroyMenu;
@@ -2796,6 +2862,23 @@ declare class LibClientMatchOverviewComponent implements OnInit, OnDestroy, Afte
2796
2862
  isGrouped: boolean;
2797
2863
  showProgressUnderHead: boolean;
2798
2864
  showRejectMenu: boolean;
2865
+ /**
2866
+ * Show "Chat Handoff" in the dots menu in place of "Reject".
2867
+ *
2868
+ * The matcher's copy of this tab offers handing the conversation to the client rather than
2869
+ * rejecting the prospect — rejecting is the client's decision to make, not the matcher's. The
2870
+ * menu itself, its trigger and its dismissal are shared; only the single item inside it differs.
2871
+ */
2872
+ showHandoffOption: boolean;
2873
+ /**
2874
+ * Whether handing off is allowed yet. False renders the item greyed and inert.
2875
+ *
2876
+ * The host decides this — it owns the meetup time — and the rule is that a matcher may hand off
2877
+ * at any point within 24 hours of the meetup.
2878
+ */
2879
+ handoffAvailable: boolean;
2880
+ /** Already handed off; the item reads as done and cannot be triggered again. */
2881
+ handoffDone: boolean;
2799
2882
  role: AccountTypes;
2800
2883
  dimmed: boolean;
2801
2884
  statusProgressOverride: number;
@@ -2803,6 +2886,8 @@ declare class LibClientMatchOverviewComponent implements OnInit, OnDestroy, Afte
2803
2886
  sendConversationFlag: EventEmitter<IConversationFlag>;
2804
2887
  repositionRequest: EventEmitter<void>;
2805
2888
  rejectRequest: EventEmitter<void>;
2889
+ /** The matcher chose to hand the conversation over. Emitted only when handoff is available. */
2890
+ handoffRequest: EventEmitter<void>;
2806
2891
  menuTemplate: TemplateRef<IEmptyTemplateContext>;
2807
2892
  rejectMenuTemplate: TemplateRef<IEmptyTemplateContext>;
2808
2893
  readonly state: ClientMatchOverviewStateService;
@@ -2817,7 +2902,7 @@ declare class LibClientMatchOverviewComponent implements OnInit, OnDestroy, Afte
2817
2902
  ngOnChanges(changes: SimpleChanges): void;
2818
2903
  ngOnDestroy(): void;
2819
2904
  static ɵfac: i0.ɵɵFactoryDeclaration<LibClientMatchOverviewComponent, never>;
2820
- static ɵcmp: i0.ɵɵComponentDeclaration<LibClientMatchOverviewComponent, "lib-client-match-overview", never, { "overview": { "alias": "overview"; "required": true; }; "meta": { "alias": "meta"; "required": false; }; "expand": { "alias": "expand"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "default": { "alias": "default"; "required": false; }; "hideProgressBar": { "alias": "hideProgressBar"; "required": false; }; "partialColors": { "alias": "partialColors"; "required": false; }; "showExternalPartialCircleProgress": { "alias": "showExternalPartialCircleProgress"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "enableChangeOverview": { "alias": "enableChangeOverview"; "required": false; }; "isGrouped": { "alias": "isGrouped"; "required": false; }; "showProgressUnderHead": { "alias": "showProgressUnderHead"; "required": false; }; "showRejectMenu": { "alias": "showRejectMenu"; "required": false; }; "role": { "alias": "role"; "required": false; }; "dimmed": { "alias": "dimmed"; "required": false; }; "statusProgressOverride": { "alias": "statusProgressOverride"; "required": false; }; "showValueProportionLabel": { "alias": "showValueProportionLabel"; "required": false; }; }, { "sendConversationFlag": "sendConversationFlag"; "repositionRequest": "repositionRequest"; "rejectRequest": "rejectRequest"; }, never, never, true, never>;
2905
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibClientMatchOverviewComponent, "lib-client-match-overview", never, { "overview": { "alias": "overview"; "required": true; }; "meta": { "alias": "meta"; "required": false; }; "expand": { "alias": "expand"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "default": { "alias": "default"; "required": false; }; "hideProgressBar": { "alias": "hideProgressBar"; "required": false; }; "partialColors": { "alias": "partialColors"; "required": false; }; "showExternalPartialCircleProgress": { "alias": "showExternalPartialCircleProgress"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "enableChangeOverview": { "alias": "enableChangeOverview"; "required": false; }; "isGrouped": { "alias": "isGrouped"; "required": false; }; "showProgressUnderHead": { "alias": "showProgressUnderHead"; "required": false; }; "showRejectMenu": { "alias": "showRejectMenu"; "required": false; }; "showHandoffOption": { "alias": "showHandoffOption"; "required": false; }; "handoffAvailable": { "alias": "handoffAvailable"; "required": false; }; "handoffDone": { "alias": "handoffDone"; "required": false; }; "role": { "alias": "role"; "required": false; }; "dimmed": { "alias": "dimmed"; "required": false; }; "statusProgressOverride": { "alias": "statusProgressOverride"; "required": false; }; "showValueProportionLabel": { "alias": "showValueProportionLabel"; "required": false; }; }, { "sendConversationFlag": "sendConversationFlag"; "repositionRequest": "repositionRequest"; "rejectRequest": "rejectRequest"; "handoffRequest": "handoffRequest"; }, never, never, true, never>;
2821
2906
  }
2822
2907
 
2823
2908
  interface TabStripDragState {
@@ -3236,6 +3321,20 @@ declare class ClientViewportSlidesService {
3236
3321
  handleProfileEdgeDrag(event: 'left' | 'right' | Event): void;
3237
3322
  handleHandoffSwipeNext(): void;
3238
3323
  handleHandoffSwipePrev(): void;
3324
+ /**
3325
+ * A different prospect tab was chosen.
3326
+ *
3327
+ * The state moves immediately: config index, expanded flags, the host's `activeIndexChange`.
3328
+ * Only the slide-out / slide-in of the content panel is timed. This used to all sit inside the
3329
+ * 150ms slide-out delay, which left the host holding the previous index while data refreshes
3330
+ * kept rebuilding its config — each rebuild pushed that previous index back into the belt and
3331
+ * re-expanded the prospect the user had just left, until the delayed emit flipped it forward
3332
+ * again. With the host told at once there is no window for that.
3333
+ *
3334
+ * The matches are no longer re-emitted here. Flipping `isExpanded` in place is all the belt and
3335
+ * the spider chart read; pushing a fresh array through `clientMatches$` on every tab change only
3336
+ * made every subscriber — including the belt itself — re-run its refresh logic for no new data.
3337
+ */
3239
3338
  onChatHeadChange(index: number, profileSwiperEl?: ElementRef, previousProspectIndex?: number): number;
3240
3339
  onSwipeStart(event: MouseEvent | TouchEvent): {
3241
3340
  touchStartX: number;
@@ -3267,6 +3366,8 @@ declare class ClientViewportStateService {
3267
3366
  destroy(): void;
3268
3367
  initialize(): void;
3269
3368
  handleConfigChange(): void;
3369
+ /** The Chat Handoff panel shows the active prospect's conversation; call after the matches change. */
3370
+ refreshHandoffForActiveProspect(): void;
3270
3371
  handleClientHomeConfigChange(): void;
3271
3372
  initPageRouting(): void;
3272
3373
  applyActivePageInput(): void;
@@ -3842,6 +3943,12 @@ declare class MatcherViewportComponent extends BaseViewportComponent implements
3842
3943
  }>;
3843
3944
  getMessages: EventEmitter<boolean>;
3844
3945
  rejectRequest: EventEmitter<ILibClientMatchOverview>;
3946
+ /**
3947
+ * The matcher chose "Chat Handoff" on a prospect's expanded tab.
3948
+ *
3949
+ * Forwarded untouched to the host app, which owns both the 24-hour rule and the endpoint.
3950
+ */
3951
+ handoffRequest: EventEmitter<ILibClientMatchOverview>;
3845
3952
  dismissPriority: EventEmitter<{
3846
3953
  prospectId: string;
3847
3954
  chatId: string;
@@ -3970,7 +4077,7 @@ declare class MatcherViewportComponent extends BaseViewportComponent implements
3970
4077
  private isChatTarget;
3971
4078
  private attachContentScrollWheelDelegate;
3972
4079
  static ɵfac: i0.ɵɵFactoryDeclaration<MatcherViewportComponent, never>;
3973
- static ɵcmp: i0.ɵɵComponentDeclaration<MatcherViewportComponent, "lib-matcher-viewport", never, { "config": { "alias": "config"; "required": false; }; "showViewportControls": { "alias": "showViewportControls"; "required": false; }; "showViewportHeader": { "alias": "showViewportHeader"; "required": false; }; "showViewportFooter": { "alias": "showViewportFooter"; "required": false; }; "activePageInput": { "alias": "activePageInput"; "required": false; }; "enablePageRouting": { "alias": "enablePageRouting"; "required": false; }; "pageRouteQueryParamKey": { "alias": "pageRouteQueryParamKey"; "required": false; }; "pageRouteParamKey": { "alias": "pageRouteParamKey"; "required": false; }; "pageRouteSegmentName": { "alias": "pageRouteSegmentName"; "required": false; }; }, { "activeIndexChange": "activeIndexChange"; "activePageChange": "activePageChange"; "addMessage": "addMessage"; "getMessages": "getMessages"; "rejectRequest": "rejectRequest"; "dismissPriority": "dismissPriority"; "reactivatePriority": "reactivatePriority"; }, never, never, false, never>;
4080
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatcherViewportComponent, "lib-matcher-viewport", never, { "config": { "alias": "config"; "required": false; }; "showViewportControls": { "alias": "showViewportControls"; "required": false; }; "showViewportHeader": { "alias": "showViewportHeader"; "required": false; }; "showViewportFooter": { "alias": "showViewportFooter"; "required": false; }; "activePageInput": { "alias": "activePageInput"; "required": false; }; "enablePageRouting": { "alias": "enablePageRouting"; "required": false; }; "pageRouteQueryParamKey": { "alias": "pageRouteQueryParamKey"; "required": false; }; "pageRouteParamKey": { "alias": "pageRouteParamKey"; "required": false; }; "pageRouteSegmentName": { "alias": "pageRouteSegmentName"; "required": false; }; }, { "activeIndexChange": "activeIndexChange"; "activePageChange": "activePageChange"; "addMessage": "addMessage"; "getMessages": "getMessages"; "rejectRequest": "rejectRequest"; "handoffRequest": "handoffRequest"; "dismissPriority": "dismissPriority"; "reactivatePriority": "reactivatePriority"; }, never, never, false, never>;
3974
4081
  }
3975
4082
 
3976
4083
  /** Ionic `ion-progress-bar` host (Stencil `el` + shadow root). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naniteninja/dashboard-components-lib",
3
- "version": "2.4.4",
3
+ "version": "2.4.6",
4
4
  "author": "naniteninja",
5
5
  "repository": {
6
6
  "type": "git"