@anglr/common 19.1.0-beta.20240125054935 → 19.2.0-beta.20240125052632
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/changelog.md +1 -9
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js +4 -34
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js.map +1 -1
- package/package.json +1 -1
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts +1 -13
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts.map +1 -1
- package/version.bak +1 -1
package/changelog.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## Version 19.1.0 (
|
|
3
|
+
## Version 19.1.0 (2023-12-14)
|
|
4
4
|
|
|
5
5
|
### Bug Fixes
|
|
6
6
|
|
|
@@ -17,8 +17,6 @@
|
|
|
17
17
|
- `OnChanges`
|
|
18
18
|
- `OnDestroy`
|
|
19
19
|
- **inputs**
|
|
20
|
-
- `tooltipPrefix` tooltip prefix text to be prepended to tooltip read from content
|
|
21
|
-
- `tooltipSuffix` tooltip suffix text to be appended to tooltip read from content
|
|
22
20
|
- `ellipsisClass` css class appliet to element
|
|
23
21
|
- `allowHtml` indication whether are html tags allowed in tooltip text
|
|
24
22
|
- `ellipsisTooltip` gets or sets HTML element from which is text taken for tooltip
|
|
@@ -50,12 +48,6 @@
|
|
|
50
48
|
- minimal supported version of `tslib` is `2.6.2`
|
|
51
49
|
- tooltip themes changed, previous *dark* is not *light* and vice versa, dark background should be identified as light theme since it is normally used within light app theme
|
|
52
50
|
|
|
53
|
-
## Version 18.2.1 (2023-11-20)
|
|
54
|
-
|
|
55
|
-
### Bug Fixes
|
|
56
|
-
|
|
57
|
-
- fixed `ProgressIndicatorService` isBrowser indicator initialization
|
|
58
|
-
|
|
59
51
|
## Version 18.2.0 (2023-11-09)
|
|
60
52
|
|
|
61
53
|
### Features
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
1
|
import { Directive, ElementRef, Input, Renderer2, booleanAttribute, inject } from '@angular/core';
|
|
3
|
-
import {
|
|
2
|
+
import { nameof } from '@jscrpt/common';
|
|
4
3
|
import { TooltipDirective } from '../../modules/tooltip';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
import * as i1 from "../../modules/tooltip/directives/tooltip/tooltip.directive";
|
|
@@ -24,7 +23,7 @@ export class EllipsisTooltipSADirective {
|
|
|
24
23
|
/**
|
|
25
24
|
* Instance of mutation observer used for watching
|
|
26
25
|
*/
|
|
27
|
-
textObserver = new MutationObserver(this.
|
|
26
|
+
textObserver = new MutationObserver(() => this.tooltip.tooltip = this.allowHtml ? this.element.innerHTML : this.element.innerText);
|
|
28
27
|
/**
|
|
29
28
|
* Original css class
|
|
30
29
|
*/
|
|
@@ -34,14 +33,6 @@ export class EllipsisTooltipSADirective {
|
|
|
34
33
|
* Css class appliet to element
|
|
35
34
|
*/
|
|
36
35
|
ellipsisClass = 'text-ellipsis';
|
|
37
|
-
/**
|
|
38
|
-
* Tooltip prefix text to be prepended to tooltip read from content
|
|
39
|
-
*/
|
|
40
|
-
tooltipPrefix;
|
|
41
|
-
/**
|
|
42
|
-
* Tooltip suffix text to be appended to tooltip read from content
|
|
43
|
-
*/
|
|
44
|
-
tooltipSuffix;
|
|
45
36
|
/**
|
|
46
37
|
* Indication whether are html tags allowed in tooltip text
|
|
47
38
|
*/
|
|
@@ -82,10 +73,6 @@ export class EllipsisTooltipSADirective {
|
|
|
82
73
|
this.textObserver?.disconnect();
|
|
83
74
|
this.textObserver?.observe(this.element, { characterData: true, subtree: true, childList: true });
|
|
84
75
|
}
|
|
85
|
-
if (nameof('tooltipPrefix') in changes ||
|
|
86
|
-
nameof('tooltipSuffix') in changes) {
|
|
87
|
-
this.updateTooltip();
|
|
88
|
-
}
|
|
89
76
|
}
|
|
90
77
|
//######################### public methods - implementation of OnDestroy #########################
|
|
91
78
|
/**
|
|
@@ -95,27 +82,14 @@ export class EllipsisTooltipSADirective {
|
|
|
95
82
|
this.textObserver?.disconnect();
|
|
96
83
|
this.textObserver = null;
|
|
97
84
|
}
|
|
98
|
-
//######################### protected methods #########################
|
|
99
|
-
/**
|
|
100
|
-
* Updates tooltip value
|
|
101
|
-
*/
|
|
102
|
-
updateTooltip() {
|
|
103
|
-
this.tooltip.tooltip = (this.tooltipPrefix ?? '') + (this.allowHtml ? this.element.innerHTML : this.element.innerText) + (this.tooltipSuffix ?? '');
|
|
104
|
-
}
|
|
105
85
|
//######################### ng language server #########################
|
|
106
86
|
/**
|
|
107
87
|
* Custom input type for `element` input
|
|
108
88
|
*/
|
|
109
89
|
static ngAcceptInputType_element;
|
|
110
90
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: EllipsisTooltipSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
111
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.0.5", type: EllipsisTooltipSADirective, isStandalone: true, selector: "[ellipsisTooltip]", inputs: { ellipsisClass: "ellipsisClass",
|
|
91
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.0.5", type: EllipsisTooltipSADirective, isStandalone: true, selector: "[ellipsisTooltip]", inputs: { ellipsisClass: "ellipsisClass", allowHtml: ["allowHtml", "allowHtml", booleanAttribute], element: ["ellipsisTooltip", "element"] }, usesOnChanges: true, hostDirectives: [{ directive: i1.TooltipDirective }], ngImport: i0 });
|
|
112
92
|
}
|
|
113
|
-
__decorate([
|
|
114
|
-
BindThis,
|
|
115
|
-
__metadata("design:type", Function),
|
|
116
|
-
__metadata("design:paramtypes", []),
|
|
117
|
-
__metadata("design:returntype", void 0)
|
|
118
|
-
], EllipsisTooltipSADirective.prototype, "updateTooltip", null);
|
|
119
93
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: EllipsisTooltipSADirective, decorators: [{
|
|
120
94
|
type: Directive,
|
|
121
95
|
args: [{
|
|
@@ -127,15 +101,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImpor
|
|
|
127
101
|
}]
|
|
128
102
|
}], propDecorators: { ellipsisClass: [{
|
|
129
103
|
type: Input
|
|
130
|
-
}], tooltipPrefix: [{
|
|
131
|
-
type: Input
|
|
132
|
-
}], tooltipSuffix: [{
|
|
133
|
-
type: Input
|
|
134
104
|
}], allowHtml: [{
|
|
135
105
|
type: Input,
|
|
136
106
|
args: [{ transform: booleanAttribute }]
|
|
137
107
|
}], element: [{
|
|
138
108
|
type: Input,
|
|
139
109
|
args: ['ellipsisTooltip']
|
|
140
|
-
}]
|
|
110
|
+
}] } });
|
|
141
111
|
//# sourceMappingURL=ellipsisTooltip.directive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ellipsisTooltip.directive.js","sourceRoot":"","sources":["../../../../src/directives/ellipsisTooltip/ellipsisTooltip.directive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ellipsisTooltip.directive.js","sourceRoot":"","sources":["../../../../src/directives/ellipsisTooltip/ellipsisTooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAwB,SAAS,EAAiB,gBAAgB,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACrI,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;;;AAEvD;;GAEG;AAUH,MAAM,OAAO,0BAA0B;IAEnC,sEAAsE;IAEtE;;OAEG;IACO,QAAQ,GAAc,MAAM,CAAC,SAAS,CAAC,CAAC;IAElD;;OAEG;IACO,OAAO,GAAqB,MAAM,CAAC,gBAAg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gBAAgB,CAAC,CAAC;iBAClE;gBAED,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;gBACzD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;aAC9C;YAED,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,CAAC;YAChC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAC,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;SACnG;IACL,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,wEAAwE;IAExE;;OAEG;IACI,MAAM,CAAC,yBAAyB,CAA4B;uGAnH1D,0BAA0B;2FAA1B,0BAA0B,qIAwChB,gBAAgB;;2FAxC1B,0BAA0B;kBATtC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;oBAC7B,UAAU,EAAE,IAAI;oBAChB,cAAc,EACd;wBACI,gBAAgB;qBACnB;iBACJ;8BAoCU,aAAa;sBADnB,KAAK;gBAOC,SAAS;sBADf,KAAK;uBAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC;gBAOzB,OAAO;sBADjB,KAAK;uBAAC,iBAAiB","sourcesContent":["import {Directive, ElementRef, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges, booleanAttribute, inject} from '@angular/core';\nimport {nameof} from '@jscrpt/common';\n\nimport {TooltipDirective} from '../../modules/tooltip';\n\n/**\n * Directive that is used for displaying text from attached element in tooltip\n */\n@Directive(\n{\n selector: '[ellipsisTooltip]',\n standalone: true,\n hostDirectives:\n [\n TooltipDirective,\n ],\n})\nexport class EllipsisTooltipSADirective implements OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of renderer\n */\n protected renderer: Renderer2 = inject(Renderer2);\n\n /**\n * Instance of tooltip directive\n */\n protected tooltip: TooltipDirective = inject(TooltipDirective);\n\n /**\n * HTML element from which is text taken for tooltip\n */\n protected elementValue: HTMLElement = inject(ElementRef).nativeElement;\n\n /**\n * Instance of mutation observer used for watching \n */\n protected textObserver: MutationObserver|undefined|null = new MutationObserver(() => this.tooltip.tooltip = this.allowHtml ? this.element.innerHTML : this.element.innerText);\n\n /**\n * Original css class\n */\n protected originalCssClass: string|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Css class appliet to element\n */\n @Input()\n public ellipsisClass: string = 'text-ellipsis';\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n @Input({transform: booleanAttribute})\n public allowHtml: boolean = false;\n\n /**\n * Gets or sets HTML element from which is text taken for tooltip\n */\n @Input('ellipsisTooltip')\n public get element(): HTMLElement\n {\n return this.elementValue;\n }\n public set element(value: HTMLElement|ElementRef<HTMLElement>)\n {\n if(!value)\n {\n return;\n }\n\n if(value instanceof ElementRef)\n {\n this.elementValue = value.nativeElement;\n\n return;\n }\n\n this.elementValue = value;\n }\n\n //######################### public methods - implementation of OnChanges #########################\n \n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<EllipsisTooltipSADirective>('allowHtml') in changes)\n {\n this.tooltip.allowHtml = this.allowHtml;\n }\n\n if(nameof<EllipsisTooltipSADirective>('element') in changes ||\n nameof<EllipsisTooltipSADirective>('ellipsisClass') in changes)\n {\n if(this.originalCssClass != this.ellipsisClass)\n {\n if(this.originalCssClass)\n {\n this.renderer.removeClass(this.element, this.originalCssClass);\n }\n \n this.renderer.addClass(this.element, this.ellipsisClass);\n this.originalCssClass = this.ellipsisClass;\n }\n\n this.textObserver?.disconnect();\n this.textObserver?.observe(this.element, {characterData: true, subtree: true, childList: true});\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.textObserver?.disconnect();\n this.textObserver = null;\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `element` input\n */\n public static ngAcceptInputType_element: HTMLElement|ElementRef|'';\n}"]}
|
package/package.json
CHANGED
|
@@ -30,14 +30,6 @@ export declare class EllipsisTooltipSADirective implements OnChanges, OnDestroy
|
|
|
30
30
|
* Css class appliet to element
|
|
31
31
|
*/
|
|
32
32
|
ellipsisClass: string;
|
|
33
|
-
/**
|
|
34
|
-
* Tooltip prefix text to be prepended to tooltip read from content
|
|
35
|
-
*/
|
|
36
|
-
tooltipPrefix: string | undefined | null;
|
|
37
|
-
/**
|
|
38
|
-
* Tooltip suffix text to be appended to tooltip read from content
|
|
39
|
-
*/
|
|
40
|
-
tooltipSuffix: string | undefined | null;
|
|
41
33
|
/**
|
|
42
34
|
* Indication whether are html tags allowed in tooltip text
|
|
43
35
|
*/
|
|
@@ -55,16 +47,12 @@ export declare class EllipsisTooltipSADirective implements OnChanges, OnDestroy
|
|
|
55
47
|
* Called when component is destroyed
|
|
56
48
|
*/
|
|
57
49
|
ngOnDestroy(): void;
|
|
58
|
-
/**
|
|
59
|
-
* Updates tooltip value
|
|
60
|
-
*/
|
|
61
|
-
protected updateTooltip(): void;
|
|
62
50
|
/**
|
|
63
51
|
* Custom input type for `element` input
|
|
64
52
|
*/
|
|
65
53
|
static ngAcceptInputType_element: HTMLElement | ElementRef | '';
|
|
66
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<EllipsisTooltipSADirective, never>;
|
|
67
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<EllipsisTooltipSADirective, "[ellipsisTooltip]", never, { "ellipsisClass": { "alias": "ellipsisClass"; "required": false; }; "
|
|
55
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EllipsisTooltipSADirective, "[ellipsisTooltip]", never, { "ellipsisClass": { "alias": "ellipsisClass"; "required": false; }; "allowHtml": { "alias": "allowHtml"; "required": false; }; "element": { "alias": "ellipsisTooltip"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.TooltipDirective; inputs: {}; outputs: {}; }]>;
|
|
68
56
|
static ngAcceptInputType_allowHtml: unknown;
|
|
69
57
|
}
|
|
70
58
|
//# sourceMappingURL=ellipsisTooltip.directive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ellipsisTooltip.directive.d.ts","sourceRoot":"","sources":["ellipsisTooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,UAAU,EAAS,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAA2B,MAAM,eAAe,CAAC;AAGrI,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;;;AAEvD;;GAEG;AACH,qBASa,0BAA2B,YAAW,SAAS,EAAE,SAAS;IAInE;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAqB;IAElD;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,gBAAgB,CAA4B;IAE/D;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,WAAW,CAAoC;IAEvE;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,gBAAgB,GAAC,SAAS,GAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"ellipsisTooltip.directive.d.ts","sourceRoot":"","sources":["ellipsisTooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,UAAU,EAAS,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAA2B,MAAM,eAAe,CAAC;AAGrI,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;;;AAEvD;;GAEG;AACH,qBASa,0BAA2B,YAAW,SAAS,EAAE,SAAS;IAInE;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAqB;IAElD;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,gBAAgB,CAA4B;IAE/D;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,WAAW,CAAoC;IAEvE;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,gBAAgB,GAAC,SAAS,GAAC,IAAI,CAAuH;IAE9K;;OAEG;IACH,SAAS,CAAC,gBAAgB,EAAE,MAAM,GAAC,SAAS,GAAC,IAAI,CAAC;IAIlD;;OAEG;IAEI,aAAa,EAAE,MAAM,CAAmB;IAE/C;;OAEG;IAEI,SAAS,EAAE,OAAO,CAAS;IAElC;;OAEG;IACH,IACW,OAAO,IAAI,WAAW,CAGhC;IACD,IAAW,OAAO,CAAC,KAAK,EAAE,WAAW,GAAC,UAAU,CAAC,WAAW,CAAC,EAe5D;IAID;;OAEG;IACI,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IA4BhD;;OAEG;IACI,WAAW,IAAI,IAAI;IAQ1B;;OAEG;IACH,OAAc,yBAAyB,EAAE,WAAW,GAAC,UAAU,GAAC,EAAE,CAAC;yCAnH1D,0BAA0B;2CAA1B,0BAA0B;wCAoH04vB,OAAQ;CAAx7vB"}
|
package/version.bak
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
19.
|
|
1
|
+
19.2.0-beta.20240125052632
|