@softheon/armature 17.26.2 → 17.27.0

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.
@@ -17,3 +17,4 @@ export * from './sof-utility-button/sof-utility-button.component';
17
17
  export * from './confirm-address/sof-confirm-address/compare-address-pipe/compare-address.pipe';
18
18
  export * from './sof-callout/sof-callout.component';
19
19
  export * from './sof-context/sof-context.component';
20
+ export * from './sof-bottom-sheet/sof-bottom-sheet.component';
@@ -0,0 +1,64 @@
1
+ import { AfterViewInit, ElementRef, TemplateRef } from '@angular/core';
2
+ import { MatBottomSheetRef } from '@angular/material/bottom-sheet';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * The mobile bottom sheet
6
+ * @note while designed for mobile/tablet will work on desktop as well.
7
+ */
8
+ export declare class SofBottomSheetComponent implements AfterViewInit {
9
+ /** Reference to the bottom sheets content element */
10
+ sheetContent: ElementRef<HTMLDivElement>;
11
+ /** Sheet header height */
12
+ private readonly bottomSheetHeaderHeight;
13
+ /** 25% of the viewport height, minus the headers height */
14
+ private minHeight;
15
+ /** 95% of the viewport height, minus the headers height */
16
+ private maxHeight;
17
+ /** 60% of the viewport height, minus the headers height */
18
+ private defaultHeight;
19
+ /** Initial sheet content height */
20
+ sheetHeight: number;
21
+ /** Area tolerance for snapping to default height (in px) */
22
+ private readonly defaultHeightTolerance;
23
+ /** Is the user dragging the target (header) */
24
+ private isDragging;
25
+ /** The starting Y axis position when dragging */
26
+ private startY;
27
+ /** Initial height when drag started */
28
+ private initialHeight;
29
+ /** Is the user dragging the bottom sheets content element */
30
+ private isContentDrag;
31
+ /** ID for the dismiss button */
32
+ readonly dismissButtonId: string;
33
+ /** Implement custom rendering */
34
+ private renderer;
35
+ /** Provide custom change detection functionality when using 'ChangeDetectionStrategy.OnPush' */
36
+ private cdr;
37
+ /** The bottom sheets data */
38
+ data: BottomSheetData;
39
+ /** The bottom sheet reference */
40
+ bottomSheetRef: MatBottomSheetRef;
41
+ /** Ensure the bottom sheet starts at the default height (60% of the viewport) */
42
+ ngAfterViewInit(): void;
43
+ /** Start the drag operation (handles both mouse and touch events) */
44
+ startDrag(event: MouseEvent | TouchEvent, isContentDrag?: boolean): void;
45
+ /** Handle the drag movement event */
46
+ private onDrag;
47
+ /** End the drag operation and snap to the nearest state */
48
+ private endDrag;
49
+ /** Utility method to extract the Y position from mouse or touch events */
50
+ private getYPosition;
51
+ /** Update the height variables on window resize */
52
+ onResize(): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<SofBottomSheetComponent, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<SofBottomSheetComponent, "sof-bottom-sheet", never, {}, {}, never, never, true, never>;
55
+ }
56
+ /**
57
+ * The bottom sheet data
58
+ * @note all properties are required
59
+ */
60
+ export interface BottomSheetData {
61
+ headerIconClass: string;
62
+ headerTitle: string;
63
+ template: TemplateRef<any>;
64
+ }
@@ -19,6 +19,15 @@ export declare class SofContextComponent {
19
19
  selectedRowData: any;
20
20
  /** Whether the menu is visible */
21
21
  isMenuVisible: boolean;
22
+ /** Tooltip text */
23
+ tooltipText: string;
24
+ /** Whether tooltip is visible */
25
+ tooltipVisible: boolean;
26
+ /** The position of the tooltip */
27
+ tooltipPosition: {
28
+ x: string;
29
+ y: string;
30
+ };
22
31
  /**
23
32
  * Constructs the component
24
33
  * @param cdRef The change detector
@@ -40,6 +49,16 @@ export declare class SofContextComponent {
40
49
  * @param item Clicked menu item
41
50
  */
42
51
  onMenuItemClick(item: ContextMenuItem): void;
52
+ /**
53
+ * Shows tooltip when hovering over a menu item
54
+ * @param event Mouse event
55
+ * @param description Tooltip text
56
+ */
57
+ showTooltip(event: MouseEvent, description: string): void;
58
+ /**
59
+ * Hides the tooltip when the user moves the mouse away
60
+ */
61
+ hideTooltip(): void;
43
62
  /**
44
63
  * Hides the menu when clicking outside
45
64
  */
@@ -54,4 +73,5 @@ export interface ContextMenuItem {
54
73
  iconClasses: string[];
55
74
  action: (data: any, mailbox?: string) => void;
56
75
  disabled?: boolean;
76
+ description?: string;
57
77
  }
@@ -54,10 +54,16 @@ export declare class B2bNavComponent implements OnInit {
54
54
  isNavOpen: boolean;
55
55
  /** The selected nav node */
56
56
  selectedNode: NavNode;
57
- /** Angular's router */
58
57
  /** On Init - Initialize the settings */
59
58
  ngOnInit(): void;
59
+ /** Shrinks the navigation */
60
60
  shrinkNav(): void;
61
+ /**
62
+ * Opens the menu for the navigation
63
+ * @param node The node
64
+ * @param event The event
65
+ * @returns void
66
+ */
61
67
  openMenu(node: NavNode, event: MouseEvent): void;
62
68
  /**
63
69
  * Initializes the nav panel settings, defaults will be set if `null` or `undefined`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softheon/armature",
3
- "version": "17.26.2",
3
+ "version": "17.27.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.5.0"
6
6
  },