@anglr/common 19.1.0-beta.20240125060823 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## Version 19.1.0 (2024-01-25)
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 { BindThis, nameof } from '@jscrpt/common';
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.updateTooltip);
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,31 +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
- let text = this.allowHtml ? this.element.innerHTML : this.element.innerText;
104
- if (text) {
105
- text = (this.tooltipPrefix ?? '') + text + (this.tooltipSuffix ?? '');
106
- }
107
- this.tooltip.tooltip = text;
108
- }
109
85
  //######################### ng language server #########################
110
86
  /**
111
87
  * Custom input type for `element` input
112
88
  */
113
89
  static ngAcceptInputType_element;
114
90
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: EllipsisTooltipSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
115
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.0.5", type: EllipsisTooltipSADirective, isStandalone: true, selector: "[ellipsisTooltip]", inputs: { ellipsisClass: "ellipsisClass", tooltipPrefix: "tooltipPrefix", tooltipSuffix: "tooltipSuffix", allowHtml: ["allowHtml", "allowHtml", booleanAttribute], element: ["ellipsisTooltip", "element"] }, usesOnChanges: true, hostDirectives: [{ directive: i1.TooltipDirective }], ngImport: i0 });
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 });
116
92
  }
117
- __decorate([
118
- BindThis,
119
- __metadata("design:type", Function),
120
- __metadata("design:paramtypes", []),
121
- __metadata("design:returntype", void 0)
122
- ], EllipsisTooltipSADirective.prototype, "updateTooltip", null);
123
93
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: EllipsisTooltipSADirective, decorators: [{
124
94
  type: Directive,
125
95
  args: [{
@@ -131,15 +101,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImpor
131
101
  }]
132
102
  }], propDecorators: { ellipsisClass: [{
133
103
  type: Input
134
- }], tooltipPrefix: [{
135
- type: Input
136
- }], tooltipSuffix: [{
137
- type: Input
138
104
  }], allowHtml: [{
139
105
  type: Input,
140
106
  args: [{ transform: booleanAttribute }]
141
107
  }], element: [{
142
108
  type: Input,
143
109
  args: ['ellipsisTooltip']
144
- }], updateTooltip: [] } });
110
+ }] } });
145
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":";AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAwB,SAAS,EAAiB,gBAAgB,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACrI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;QAED,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAChC,CAAC;IAED,wEAAwE;IAExE;;OAEG;IACI,MAAM,CAAC,yBAAyB,CAA4B;uGAvJ1D,0BAA0B;2FAA1B,0BAA0B,qMAoDhB,gBAAgB;;AAkFzB;IADT,QAAQ;;;;+DAWR;2FAhJQ,0BAA0B;kBATtC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;oBAC7B,UAAU,EAAE,IAAI;oBAChB,cAAc,EACd;wBACI,gBAAgB;qBACnB;iBACJ;8BAoCU,aAAa;sBADnB,KAAK;gBAOC,aAAa;sBADnB,KAAK;gBAOC,aAAa;sBADnB,KAAK;gBAOC,SAAS;sBADf,KAAK;uBAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC;gBAOzB,OAAO;sBADjB,KAAK;uBAAC,iBAAiB;gBA4Ed,aAAa","sourcesContent":["import {Directive, ElementRef, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges, booleanAttribute, inject} from '@angular/core';\nimport {BindThis, 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.updateTooltip);\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 * Tooltip prefix text to be prepended to tooltip read from content\n */\n @Input()\n public tooltipPrefix: string|undefined|null;\n\n /**\n * Tooltip suffix text to be appended to tooltip read from content\n */\n @Input()\n public tooltipSuffix: string|undefined|null;\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 if(nameof<EllipsisTooltipSADirective>('tooltipPrefix') in changes ||\n nameof<EllipsisTooltipSADirective>('tooltipSuffix') in changes)\n {\n this.updateTooltip();\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 //######################### protected methods #########################\n\n /**\n * Updates tooltip value\n */\n @BindThis\n protected updateTooltip(): void\n {\n let text = this.allowHtml ? this.element.innerHTML : this.element.innerText;\n\n if(text)\n {\n text = (this.tooltipPrefix ?? '') + text + (this.tooltipSuffix ?? '');\n }\n\n this.tooltip.tooltip = text;\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `element` input\n */\n public static ngAcceptInputType_element: HTMLElement|ElementRef|'';\n}"]}
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,gBAAgB,CAAC,CAAC;IAE/D;;OAEG;IACO,YAAY,GAAgB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC;IAEvE;;OAEG;IACO,YAAY,GAAoC,IAAI,gBAAgB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAE9K;;OAEG;IACO,gBAAgB,CAAwB;IAElD,gFAAgF;IAEhF;;OAEG;IAEI,aAAa,GAAW,eAAe,CAAC;IAE/C;;OAEG;IAEI,SAAS,GAAY,KAAK,CAAC;IAElC;;OAEG;IACH,IACW,OAAO;QAEd,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CA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AC;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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anglr/common",
3
- "version": "19.1.0-beta.20240125060823",
3
+ "version": "19.2.0-beta.20240125052632",
4
4
  "description": "Angular module for common angular stuff",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -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; }; "tooltipPrefix": { "alias": "tooltipPrefix"; "required": false; }; "tooltipSuffix": { "alias": "tooltipSuffix"; "required": false; }; "allowHtml": { "alias": "allowHtml"; "required": false; }; "element": { "alias": "ellipsisTooltip"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.TooltipDirective; inputs: {}; outputs: {}; }]>;
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,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S,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.0-beta.20240125060823
1
+ 19.2.0-beta.20240125052632