@softheon/armature 19.11.1 → 19.12.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.
- package/ag-grid-components/src/sof-table/sof-table.component.d.ts +9 -11
- package/fesm2022/softheon-armature-ag-grid-components.mjs +15 -15
- package/fesm2022/softheon-armature-ag-grid-components.mjs.map +1 -1
- package/fesm2022/softheon-armature.mjs +141 -37
- package/fesm2022/softheon-armature.mjs.map +1 -1
- package/lib/directives/text-overflow-ellipsis-tooltip.directive.d.ts +59 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, NgZone, OnDestroy, Renderer2 } from '@angular/core';
|
|
2
|
+
import { MatTooltip } from '@angular/material/tooltip';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Text Overflow Ellipsis Tooltip Directive
|
|
6
|
+
* @description Using this directive will add the following css to the host element -
|
|
7
|
+
* - width: 100%
|
|
8
|
+
* - overflow: hidden
|
|
9
|
+
* - white-space: nowrap
|
|
10
|
+
* - text-overflow: ellipsis
|
|
11
|
+
|
|
12
|
+
* Will apply a [matTooltip] with the provided input text to the host element if the overflow ellipsis is showing
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <p textOverflowEllipsisTooltip>{{this.text}}</p>
|
|
16
|
+
|
|
17
|
+
* <p [textOverflowEllipsisTooltip]="'Optional tooltip text'">{{this.text}}</p>
|
|
18
|
+
* ```
|
|
19
|
+
|
|
20
|
+
* @note If no tooltip text provided, will use the elements 'textContent'
|
|
21
|
+
*/
|
|
22
|
+
export declare class TextOverflowEllipsisTooltipDirective implements AfterViewInit, OnDestroy {
|
|
23
|
+
private elRef;
|
|
24
|
+
private tooltip;
|
|
25
|
+
private renderer;
|
|
26
|
+
private zone;
|
|
27
|
+
/**
|
|
28
|
+
* The tooltip test to display, optional
|
|
29
|
+
* @note If no tooltip text provided, will use the elements 'textContent'
|
|
30
|
+
*/
|
|
31
|
+
tooltipText: string;
|
|
32
|
+
/** Is the element overflowing */
|
|
33
|
+
private isOverflowing;
|
|
34
|
+
/** The resize observer */
|
|
35
|
+
private resizeObserver;
|
|
36
|
+
/**
|
|
37
|
+
* Directive constructor
|
|
38
|
+
* @param elRef A wrapper around a native element inside of a View
|
|
39
|
+
* @param tooltip Directive that attaches a material design tooltip to the host element
|
|
40
|
+
* @param renderer Extend this base class to implement custom rendering
|
|
41
|
+
* @param zone An injectable service for executing work inside or outside of the Angular zone
|
|
42
|
+
*/
|
|
43
|
+
constructor(elRef: ElementRef<HTMLElement>, tooltip: MatTooltip, renderer: Renderer2, zone: NgZone);
|
|
44
|
+
/**
|
|
45
|
+
* Add the element styles,
|
|
46
|
+
* register the resize observer outside ng zone
|
|
47
|
+
*/
|
|
48
|
+
ngAfterViewInit(): void;
|
|
49
|
+
/** Disconnect the resize observer */
|
|
50
|
+
ngOnDestroy(): void;
|
|
51
|
+
/** Update the tooltip if the element is overflowing */
|
|
52
|
+
private updateTooltip;
|
|
53
|
+
/** Show the tooltip on mouseover */
|
|
54
|
+
onMouseOver(): void;
|
|
55
|
+
/** Show the tooltip on mouseover */
|
|
56
|
+
onMouseLeave(): void;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextOverflowEllipsisTooltipDirective, never>;
|
|
58
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TextOverflowEllipsisTooltipDirective, "[textOverflowEllipsisTooltip]", never, { "tooltipText": { "alias": "textOverflowEllipsisTooltip"; "required": false; }; }, {}, never, never, true, never>;
|
|
59
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export * from './lib/rbac/services/tokens';
|
|
|
50
50
|
export { Snackbar } from './lib/snackbar/snackbar';
|
|
51
51
|
export * from './lib/snackbar/snackbar.service';
|
|
52
52
|
export * from './lib/snackbar/sof-snackbar/sof-snackbar.component';
|
|
53
|
+
export * from './lib/directives/text-overflow-ellipsis-tooltip.directive';
|
|
53
54
|
export * from './lib/mfe/mfe.module';
|
|
54
55
|
export * from './lib/mfe/services/entity-helper.service';
|
|
55
56
|
export * from './lib/mfe/components/entity-base/entity-base.component';
|