@anglr/common 19.2.0-beta.20240125052632 → 20.0.0-beta.20240529082303
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 +19 -1
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +2 -1
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +3 -2
- package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js.map +1 -1
- package/es2022/material/src/modules/debugDataCopyClick.module.js +9 -8
- package/es2022/material/src/modules/debugDataCopyClick.module.js.map +1 -1
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js +38 -4
- package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js.map +1 -1
- package/es2022/src/modules/commonUtils.module.js +7 -3
- package/es2022/src/modules/commonUtils.module.js.map +1 -1
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js +8 -43
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
- package/es2022/src/modules/debugData/modules/debugData.module.js +4 -8
- package/es2022/src/modules/debugData/modules/debugData.module.js.map +1 -1
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +4 -19
- package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js.map +1 -1
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js +11 -6
- package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
- package/es2022/src/pipes/index.js +1 -0
- package/es2022/src/pipes/index.js.map +1 -1
- package/es2022/src/pipes/trimText/trimText.pipe.js +29 -0
- package/es2022/src/pipes/trimText/trimText.pipe.js.map +1 -0
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
- package/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.d.ts +2 -2
- package/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.d.ts.map +1 -1
- package/material/src/modules/debugDataCopyClick.module.d.ts +3 -3
- package/material/src/modules/debugDataCopyClick.module.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts +13 -1
- package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts.map +1 -1
- package/src/modules/commonUtils.module.d.ts +2 -1
- package/src/modules/commonUtils.module.d.ts.map +1 -1
- package/src/modules/debugData/components/debugData/debugData.component.css +1 -0
- package/src/modules/debugData/components/debugData/debugData.component.d.ts +4 -24
- package/src/modules/debugData/components/debugData/debugData.component.d.ts.map +1 -1
- package/src/modules/debugData/components/debugData/debugData.component.html +4 -3
- package/src/modules/debugData/modules/debugData.module.d.ts +1 -2
- package/src/modules/debugData/modules/debugData.module.d.ts.map +1 -1
- package/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.d.ts +2 -10
- package/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.d.ts.map +1 -1
- package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts +5 -6
- package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts.map +1 -1
- package/src/pipes/index.d.ts +1 -0
- package/src/pipes/index.d.ts.map +1 -1
- package/src/pipes/trimText/trimText.pipe.d.ts +17 -0
- package/src/pipes/trimText/trimText.pipe.d.ts.map +1 -0
- package/styles/core/_mixins.scss +14 -0
- package/styles/core/_theme.scss +4 -0
- package/version.bak +1 -1
- package/src/style.scss +0 -87
package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugDataEnabled.service.js","sourceRoot":"","sources":["../../../../../../src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"debugDataEnabled.service.js","sourceRoot":"","sources":["../../../../../../src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA0B,MAAM,EAAC,MAAM,eAAe,CAAC;;AAEzE;;GAEG;AAEH,MAAM,OAAO,uBAAuB;IAEhC,oEAAoE;IAEpE;;OAEG;IACK,QAAQ,GAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;IAE1D,uEAAuE;IAEvE;;OAEG;IACH,IAAW,OAAO;QAEd,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACtC,CAAC;IAED,oEAAoE;IAEpE;;;OAGG;IACI,UAAU,CAAC,UAAmB,IAAI;QAErC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;uGA5BQ,uBAAuB;2GAAvB,uBAAuB,cADX,MAAM;;2FAClB,uBAAuB;kBADnC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC","sourcesContent":["import {Injectable, Signal, WritableSignal, signal} from '@angular/core';\n\n/**\n * Service used for handling enabled state for debug data component\n */\n@Injectable({providedIn: 'root'})\nexport class DebugDataEnabledService\n{\n //######################### private fields #########################\n\n /**\n * Indication whether debug data copmonent is enabled\n */\n private _enabled: WritableSignal<boolean> = signal(false);\n\n //######################### public properties #########################\n\n /**\n * Indication whether debug data copmonent is enabled\n */\n public get enabled(): Signal<boolean>\n {\n return this._enabled.asReadonly();\n }\n\n //######################### public methods #########################\n\n /**\n * Sets enabled state\n * @param enabled - Indication whether will be enabled state set to true, or false, defaults to true\n */\n public setEnabled(enabled: boolean = true): void\n {\n this._enabled.set(enabled);\n }\n}"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContentChild, Directive, ElementRef, HostListener, Inject, Injector, Input, Optional, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
1
|
+
import { ContentChild, Directive, ElementRef, HostListener, Inject, Injector, Input, Optional, SkipSelf, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { AnimationBuilder } from '@angular/animations';
|
|
3
3
|
import { DOCUMENT } from '@angular/common';
|
|
4
4
|
import { fadeInAnimation, fadeOutAnimation } from '@anglr/animations';
|
|
@@ -38,6 +38,7 @@ export class TooltipDirective {
|
|
|
38
38
|
_animationsPlayer;
|
|
39
39
|
_document;
|
|
40
40
|
_position;
|
|
41
|
+
_parent;
|
|
41
42
|
//######################### protected fields #########################
|
|
42
43
|
/**
|
|
43
44
|
* Instance of component used for rendering tooltip
|
|
@@ -114,13 +115,14 @@ export class TooltipDirective {
|
|
|
114
115
|
*/
|
|
115
116
|
tooltipTemplateChild;
|
|
116
117
|
//######################### constructor #########################
|
|
117
|
-
constructor(_viewContainerRef, _injector, _element, _animationsPlayer, _document, _position, options) {
|
|
118
|
+
constructor(_viewContainerRef, _injector, _element, _animationsPlayer, _document, _position, _parent, options) {
|
|
118
119
|
this._viewContainerRef = _viewContainerRef;
|
|
119
120
|
this._injector = _injector;
|
|
120
121
|
this._element = _element;
|
|
121
122
|
this._animationsPlayer = _animationsPlayer;
|
|
122
123
|
this._document = _document;
|
|
123
124
|
this._position = _position;
|
|
125
|
+
this._parent = _parent;
|
|
124
126
|
this._options = extend(true, {}, defaultOptions, options);
|
|
125
127
|
this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);
|
|
126
128
|
this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);
|
|
@@ -152,11 +154,10 @@ export class TooltipDirective {
|
|
|
152
154
|
}
|
|
153
155
|
this._destroyTooltip();
|
|
154
156
|
}
|
|
155
|
-
//#########################
|
|
157
|
+
//######################### protected methods - host #########################
|
|
156
158
|
/**
|
|
157
159
|
* Handles mouse leave event, hover ends
|
|
158
160
|
* @param event - Mouse event that occured
|
|
159
|
-
* @internal
|
|
160
161
|
*/
|
|
161
162
|
mouseLeave(event) {
|
|
162
163
|
if (this._options.stopPropagation) {
|
|
@@ -174,7 +175,6 @@ export class TooltipDirective {
|
|
|
174
175
|
/**
|
|
175
176
|
* Handles mouse move event, displaying tooltip
|
|
176
177
|
* @param event - Mouse event that occured
|
|
177
|
-
* @internal
|
|
178
178
|
*/
|
|
179
179
|
mouseMove(event) {
|
|
180
180
|
if (this._options.stopPropagation) {
|
|
@@ -206,6 +206,7 @@ export class TooltipDirective {
|
|
|
206
206
|
if (!this.tooltip && !this.template && !this.tooltipTemplateChild) {
|
|
207
207
|
return;
|
|
208
208
|
}
|
|
209
|
+
this._parent?._hideTooltip();
|
|
209
210
|
this._createTooltip();
|
|
210
211
|
//if element was not created do nothing
|
|
211
212
|
if (!this._tooltipElement) {
|
|
@@ -293,7 +294,7 @@ export class TooltipDirective {
|
|
|
293
294
|
* Custom input type for `tooltip` input
|
|
294
295
|
*/
|
|
295
296
|
static ngAcceptInputType_tooltip;
|
|
296
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i0.ElementRef }, { token: i1.AnimationBuilder }, { token: DOCUMENT }, { token: POSITION }, { token: TOOLTIP_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
297
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i0.ElementRef }, { token: i1.AnimationBuilder }, { token: DOCUMENT }, { token: POSITION }, { token: TooltipDirective, optional: true, skipSelf: true }, { token: TOOLTIP_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
297
298
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.5", type: TooltipDirective, isStandalone: true, selector: "[tooltip]", inputs: { tooltip: "tooltip", allowHtml: "allowHtml", template: "template", tooltipOptions: "tooltipOptions", tooltipVisible: "tooltipVisible", containerElement: "containerElement" }, host: { listeners: { "mouseleave": "mouseLeave($event)", "mousemove": "mouseMove($event)" } }, queries: [{ propertyName: "tooltipTemplateChild", first: true, predicate: TooltipTemplateDirective, descendants: true }], usesOnChanges: true, ngImport: i0 });
|
|
298
299
|
}
|
|
299
300
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
@@ -308,6 +309,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImpor
|
|
|
308
309
|
}] }, { type: undefined, decorators: [{
|
|
309
310
|
type: Inject,
|
|
310
311
|
args: [POSITION]
|
|
312
|
+
}] }, { type: TooltipDirective, decorators: [{
|
|
313
|
+
type: Optional
|
|
314
|
+
}, {
|
|
315
|
+
type: SkipSelf
|
|
311
316
|
}] }, { type: undefined, decorators: [{
|
|
312
317
|
type: Optional
|
|
313
318
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/directives/tooltip/tooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAE,SAAS,EAAE,UAAU,EAAmB,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAwB,QAAQ,EAAiB,WAAW,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACtN,OAAO,EAAC,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAmB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAC,aAAa,EAAC,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAE5E,OAAO,E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ACf,MAAM;2BAAC,QAAQ;;0BACf,QAAQ;;0BAAI,MAAM;2BAAC,eAAe;yCAhExC,OAAO;sBADb,KAAK;gBAOC,SAAS;sBADf,KAAK;gBAOC,QAAQ;sBADd,KAAK;gBAOK,cAAc;sBADxB,KAAK;gBAsBC,cAAc;sBADpB,KAAK;gBASC,gBAAgB;sBADtB,KAAK;gBASC,oBAAoB;sBAD1B,YAAY;uBAAC,wBAAwB;gBAkE/B,UAAU;sBADhB,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;gBA2B/B,SAAS;sBADf,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import {ComponentRef, ContentChild, Directive, ElementRef, EmbeddedViewRef, HostListener, Inject, Injector, Input, OnChanges, OnDestroy, Optional, SimpleChanges, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {AnimationBuilder, AnimationFactory} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {fadeInAnimation, fadeOutAnimation} from '@anglr/animations';\nimport {RecursivePartial, extend, isBlank, isPresent, nameof, renderToBody} from '@jscrpt/common';\nimport {lastValueFrom} from 'rxjs';\n\nimport {TooltipComponent} from '../../components/tooltip/tooltip.component';\nimport {TooltipOptions, TooltipRenderer} from '../../misc/tooltip.interface';\nimport {TOOLTIP_OPTIONS} from '../../misc/tokens';\nimport {applyPositionResult, Position, PositionPlacement} from '../../../../services/position';\nimport {TooltipTemplateDirective} from '../tooltipTemplate/tooltipTemplate.directive';\nimport {TooltipTemplateContext} from '../tooltipTemplate/tooltipTemplate.context';\nimport {POSITION} from '../../../../types/tokens';\n\n/**\n * Default options for tooltip\n */\nconst defaultOptions: TooltipOptions =\n{\n delay: 200,\n position:\n {\n offset: 'MouseEnter',\n placement: PositionPlacement.TopEnd,\n },\n allowSelection: false,\n tooltipRenderer: TooltipComponent,\n tooltipCssClass: null,\n stopPropagation: false,\n enterAnimation: fadeInAnimation,\n exitAnimation: fadeOutAnimation,\n containerElement: undefined,\n};\n\n/**\n * Directive used for rendering tooltip\n */\n@Directive(\n{\n selector: '[tooltip]',\n standalone: true,\n})\nexport class TooltipDirective<TData = any> implements OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of component used for rendering tooltip\n */\n protected _tooltipComponent?: ComponentRef<TooltipRenderer<TData>>;\n\n /**\n * Instance of HTML element for tooltip renderer\n */\n protected _tooltipElement?: HTMLElement;\n\n /**\n * Animation factory used for enter animation of tooltip\n */\n protected _enterAnimation: AnimationFactory;\n\n /**\n * Animation factory used for exit animation of tooltip\n */\n protected _exitAnimation: AnimationFactory;\n\n /**\n * Instance of options provided for this tooltip\n */\n protected _options: TooltipOptions;\n\n /**\n * Indication whether there is active show tooltip request\n */\n protected _showRequest: boolean = false;\n\n /**\n * Indication whether keep open tooltip component\n */\n protected _keepOpen: boolean = false;\n\n /**\n * Timeout that is used for handling mouse move\n */\n protected _timeout: number|null = null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Tooltip text that is displayed, or any data that could be passed to template\n */\n @Input()\n public tooltip?: TData;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n @Input()\n public allowHtml: boolean = false;\n\n /**\n * Instance of tooltip template that is used for rendering\n */\n @Input()\n public template?: TemplateRef<TooltipTemplateContext<TData>>;\n\n /**\n * Options used for displaying tooltip\n */\n @Input()\n public get tooltipOptions(): RecursivePartial<TooltipOptions>\n {\n return this._options;\n }\n public set tooltipOptions(value: RecursivePartial<TooltipOptions>)\n {\n this._options = extend(true, {}, this._options, value);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement && !this.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\n }\n\n /**\n * Gets or sets indication whether is tooltip visible, if has boolean value, mouse events cant override this\n */\n @Input()\n public tooltipVisible?: boolean;\n\n /**\n * String that defines element in which should be tooltip rendered, if not specified, body is used\n * \n * Allows also css classes to be specified (div.body-box)\n */\n @Input()\n public containerElement: string|undefined|null;\n\n //######################### public properties - children #########################\n\n /**\n * Instance of template from element content, used for rendering\n */\n @ContentChild(TooltipTemplateDirective)\n public tooltipTemplateChild?: TooltipTemplateDirective;\n\n //######################### constructor #########################\n constructor(protected _viewContainerRef: ViewContainerRef,\n protected _injector: Injector,\n protected _element: ElementRef<HTMLElement>,\n protected _animationsPlayer: AnimationBuilder,\n @Inject(DOCUMENT) protected _document: Document,\n @Inject(POSITION) protected _position: Position,\n @Optional() @Inject(TOOLTIP_OPTIONS) options?: Partial<TooltipOptions>,)\n {\n this._options = extend(true, {}, defaultOptions, options);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\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<TooltipDirective>('tooltipVisible') in changes)\n {\n if(this.tooltipVisible)\n {\n this._showTooltip();\n }\n else\n {\n this._hideTooltip();\n }\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n if(this._timeout)\n {\n clearTimeout(this._timeout);\n }\n\n this._destroyTooltip();\n }\n\n //######################### public methods - host #########################\n\n /**\n * Handles mouse leave event, hover ends\n * @param event - Mouse event that occured\n * @internal\n */\n @HostListener('mouseleave', ['$event'])\n public mouseLeave(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n if(isBlank(this.tooltipVisible))\n {\n setTimeout(() =>\n {\n if(!this._keepOpen)\n {\n this._showRequest = false;\n this._hideTooltip();\n }\n }, 10);\n }\n }\n\n /**\n * Handles mouse move event, displaying tooltip\n * @param event - Mouse event that occured\n * @internal\n */\n @HostListener('mousemove', ['$event'])\n public mouseMove(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n this._showRequest = true;\n\n //do nothing if tooltip is visible\n if(this._tooltipComponent || isPresent(this.tooltipVisible))\n {\n return;\n }\n\n if(isPresent(this._timeout))\n {\n clearTimeout(this._timeout);\n }\n\n this._timeout = setTimeout(() =>\n {\n this._timeout = null;\n\n if(this._showRequest)\n {\n this._showTooltip(event);\n\n this._showRequest = false;\n }\n }, this._options.delay) as any;\n }\n\n //######################### protected methods #########################\n\n /**\n * Shows tooltip\n * @param event - Mouse event\n */\n protected _showTooltip(event?: MouseEvent): void\n {\n //no data for tooltip or no template\n if(!this.tooltip && !this.template && !this.tooltipTemplateChild)\n {\n return;\n }\n\n this._createTooltip();\n\n //if element was not created do nothing\n if(!this._tooltipElement)\n {\n return;\n }\n\n this._showData();\n\n lastValueFrom(this._position.placeElement(this._tooltipElement,\n this._element.nativeElement,\n {\n placement: this._options.position.placement,\n offset: this._options.position.offset,\n flip: true,\n mouseEvent: event,\n autoUpdate: false\n }))\n .then(result => applyPositionResult(result));\n }\n\n /**\n * Hides tooltip\n */\n protected _hideTooltip(): void\n {\n this._destroyTooltip();\n }\n\n /**\n * Destroys tooltip component\n */\n protected _destroyTooltip(): void\n {\n if(this._tooltipComponent)\n {\n const component = this._tooltipComponent;\n const element = this._tooltipElement;\n\n const exitAnimation = this._exitAnimation.create(element);\n\n exitAnimation.onDone(() =>\n {\n component.destroy();\n exitAnimation.destroy();\n });\n \n this._tooltipComponent = undefined;\n this._tooltipElement = undefined;\n\n exitAnimation.play();\n }\n }\n\n /**\n * Creates tooltip renderer component\n */\n protected _createTooltip(): void\n {\n // 0. Destroys tooltip if it exists\n this._destroyTooltip();\n\n // 1. Create a component reference from the component\n this._tooltipComponent = this._viewContainerRef\n .createComponent(this._options.tooltipRenderer,\n {\n injector: this._injector\n });\n\n // 3. Get DOM element from component\n this._tooltipElement = (this._tooltipComponent.hostView as EmbeddedViewRef<any>)\n .rootNodes[0] as HTMLElement;\n\n // 4. Append DOM element to the body\n renderToBody(this._document, this._tooltipElement, this.containerElement);\n this._enterAnimation.create(this._tooltipElement).play();\n }\n\n /**\n * Sets data to tooltip component and shows them\n */\n protected _showData(): void\n {\n if(this._tooltipComponent)\n {\n this._tooltipComponent.instance.allowHtml = this.allowHtml;\n this._tooltipComponent.instance.data = this.tooltip;\n this._tooltipComponent.instance.template = this.template ?? this.tooltipTemplateChild?.template;\n this._tooltipComponent.instance.cssClass = this._options.tooltipCssClass;\n\n this._tooltipComponent.instance.registerHoverEvents(() =>\n {\n if(this._options.allowSelection)\n {\n this._keepOpen = true;\n this._showRequest = false;\n }\n },\n () =>\n {\n setTimeout(() =>\n {\n this._keepOpen = false;\n\n if(!this._showRequest)\n {\n this._hideTooltip();\n }\n\n this._showRequest = false;\n }, 5);\n });\n\n this._tooltipComponent.instance.invalidateVisuals();\n }\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `tooltip` input\n */\n public static ngAcceptInputType_tooltip: any;\n}"]}
|
|
1
|
+
{"version":3,"file":"tooltip.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/directives/tooltip/tooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAE,SAAS,EAAE,UAAU,EAAmB,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAwB,QAAQ,EAAiB,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAChO,OAAO,EAAC,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAmB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAC,aAAa,EAAC,MAAM,MAAM,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AAe;2FAnHtC,gBAAgB,8YAwGX,wBAAwB;;2FAxG7B,gBAAgB;kBAL5B,SAAS;mBACV;oBACI,QAAQ,EAAE,WAAW;oBACrB,UAAU,EAAE,IAAI;iBACnB;;0BAiHgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,QAAQ;;0BACf,QAAQ;;0BAAI,QAAQ;;0BACpB,QAAQ;;0BAAI,MAAM;2BAAC,eAAe;yCAjExC,OAAO;sBADb,KAAK;gBAOC,SAAS;sBADf,KAAK;gBAOC,QAAQ;sBADd,KAAK;gBAOK,cAAc;sBADxB,KAAK;gBAsBC,cAAc;sBADpB,KAAK;gBASC,gBAAgB;sBADtB,KAAK;gBASC,oBAAoB;sBAD1B,YAAY;uBAAC,wBAAwB;gBAkE5B,UAAU;sBADnB,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;gBA0B5B,SAAS;sBADlB,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import {ComponentRef, ContentChild, Directive, ElementRef, EmbeddedViewRef, HostListener, Inject, Injector, Input, OnChanges, OnDestroy, Optional, SimpleChanges, SkipSelf, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {AnimationBuilder, AnimationFactory} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {fadeInAnimation, fadeOutAnimation} from '@anglr/animations';\nimport {RecursivePartial, extend, isBlank, isPresent, nameof, renderToBody} from '@jscrpt/common';\nimport {lastValueFrom} from 'rxjs';\n\nimport {TooltipComponent} from '../../components/tooltip/tooltip.component';\nimport {TooltipOptions, TooltipRenderer} from '../../misc/tooltip.interface';\nimport {TOOLTIP_OPTIONS} from '../../misc/tokens';\nimport {applyPositionResult, Position, PositionPlacement} from '../../../../services/position';\nimport {TooltipTemplateDirective} from '../tooltipTemplate/tooltipTemplate.directive';\nimport {TooltipTemplateContext} from '../tooltipTemplate/tooltipTemplate.context';\nimport {POSITION} from '../../../../types/tokens';\n\n/**\n * Default options for tooltip\n */\nconst defaultOptions: TooltipOptions =\n{\n delay: 200,\n position:\n {\n offset: 'MouseEnter',\n placement: PositionPlacement.TopEnd,\n },\n allowSelection: false,\n tooltipRenderer: TooltipComponent,\n tooltipCssClass: null,\n stopPropagation: false, //TODO: breaking change set to true\n enterAnimation: fadeInAnimation,\n exitAnimation: fadeOutAnimation,\n containerElement: undefined,\n};\n\n/**\n * Directive used for rendering tooltip\n */\n@Directive(\n{\n selector: '[tooltip]',\n standalone: true,\n})\nexport class TooltipDirective<TData = any> implements OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of component used for rendering tooltip\n */\n protected _tooltipComponent?: ComponentRef<TooltipRenderer<TData>>;\n\n /**\n * Instance of HTML element for tooltip renderer\n */\n protected _tooltipElement?: HTMLElement;\n\n /**\n * Animation factory used for enter animation of tooltip\n */\n protected _enterAnimation: AnimationFactory;\n\n /**\n * Animation factory used for exit animation of tooltip\n */\n protected _exitAnimation: AnimationFactory;\n\n /**\n * Instance of options provided for this tooltip\n */\n protected _options: TooltipOptions;\n\n /**\n * Indication whether there is active show tooltip request\n */\n protected _showRequest: boolean = false;\n\n /**\n * Indication whether keep open tooltip component\n */\n protected _keepOpen: boolean = false;\n\n /**\n * Timeout that is used for handling mouse move\n */\n protected _timeout: number|null = null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Tooltip text that is displayed, or any data that could be passed to template\n */\n @Input()\n public tooltip?: TData;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n @Input()\n public allowHtml: boolean = false;\n\n /**\n * Instance of tooltip template that is used for rendering\n */\n @Input()\n public template?: TemplateRef<TooltipTemplateContext<TData>>;\n\n /**\n * Options used for displaying tooltip\n */\n @Input()\n public get tooltipOptions(): RecursivePartial<TooltipOptions>\n {\n return this._options;\n }\n public set tooltipOptions(value: RecursivePartial<TooltipOptions>)\n {\n this._options = extend(true, {}, this._options, value);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement && !this.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\n }\n\n /**\n * Gets or sets indication whether is tooltip visible, if has boolean value, mouse events cant override this\n */\n @Input()\n public tooltipVisible?: boolean;\n\n /**\n * String that defines element in which should be tooltip rendered, if not specified, body is used\n * \n * Allows also css classes to be specified (div.body-box)\n */\n @Input()\n public containerElement: string|undefined|null;\n\n //######################### public properties - children #########################\n\n /**\n * Instance of template from element content, used for rendering\n */\n @ContentChild(TooltipTemplateDirective)\n public tooltipTemplateChild?: TooltipTemplateDirective;\n\n //######################### constructor #########################\n constructor(protected _viewContainerRef: ViewContainerRef,\n protected _injector: Injector,\n protected _element: ElementRef<HTMLElement>,\n protected _animationsPlayer: AnimationBuilder,\n @Inject(DOCUMENT) protected _document: Document,\n @Inject(POSITION) protected _position: Position,\n @Optional() @SkipSelf() protected _parent?: TooltipDirective|null,\n @Optional() @Inject(TOOLTIP_OPTIONS) options?: Partial<TooltipOptions>,)\n {\n this._options = extend(true, {}, defaultOptions, options);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\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<TooltipDirective>('tooltipVisible') in changes)\n {\n if(this.tooltipVisible)\n {\n this._showTooltip();\n }\n else\n {\n this._hideTooltip();\n }\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n if(this._timeout)\n {\n clearTimeout(this._timeout);\n }\n\n this._destroyTooltip();\n }\n\n //######################### protected methods - host #########################\n\n /**\n * Handles mouse leave event, hover ends\n * @param event - Mouse event that occured\n */\n @HostListener('mouseleave', ['$event'])\n protected mouseLeave(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n if(isBlank(this.tooltipVisible))\n {\n setTimeout(() =>\n {\n if(!this._keepOpen)\n {\n this._showRequest = false;\n this._hideTooltip();\n }\n }, 10);\n }\n }\n\n /**\n * Handles mouse move event, displaying tooltip\n * @param event - Mouse event that occured\n */\n @HostListener('mousemove', ['$event'])\n protected mouseMove(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n this._showRequest = true;\n\n //do nothing if tooltip is visible\n if(this._tooltipComponent || isPresent(this.tooltipVisible))\n {\n return;\n }\n\n if(isPresent(this._timeout))\n {\n clearTimeout(this._timeout);\n }\n\n this._timeout = setTimeout(() =>\n {\n this._timeout = null;\n\n if(this._showRequest)\n {\n this._showTooltip(event);\n\n this._showRequest = false;\n }\n }, this._options.delay) as any;\n }\n\n //######################### protected methods #########################\n\n /**\n * Shows tooltip\n * @param event - Mouse event\n */\n protected _showTooltip(event?: MouseEvent): void\n {\n //no data for tooltip or no template\n if(!this.tooltip && !this.template && !this.tooltipTemplateChild)\n {\n return;\n }\n\n this._parent?._hideTooltip();\n this._createTooltip();\n\n //if element was not created do nothing\n if(!this._tooltipElement)\n {\n return;\n }\n\n this._showData();\n\n lastValueFrom(this._position.placeElement(this._tooltipElement,\n this._element.nativeElement,\n {\n placement: this._options.position.placement,\n offset: this._options.position.offset,\n flip: true,\n mouseEvent: event,\n autoUpdate: false\n }))\n .then(result => applyPositionResult(result));\n }\n\n /**\n * Hides tooltip\n */\n protected _hideTooltip(): void\n {\n this._destroyTooltip();\n }\n\n /**\n * Destroys tooltip component\n */\n protected _destroyTooltip(): void\n {\n if(this._tooltipComponent)\n {\n const component = this._tooltipComponent;\n const element = this._tooltipElement;\n\n const exitAnimation = this._exitAnimation.create(element);\n\n exitAnimation.onDone(() =>\n {\n component.destroy();\n exitAnimation.destroy();\n });\n \n this._tooltipComponent = undefined;\n this._tooltipElement = undefined;\n\n exitAnimation.play();\n }\n }\n\n /**\n * Creates tooltip renderer component\n */\n protected _createTooltip(): void\n {\n // 0. Destroys tooltip if it exists\n this._destroyTooltip();\n\n // 1. Create a component reference from the component\n this._tooltipComponent = this._viewContainerRef\n .createComponent(this._options.tooltipRenderer,\n {\n injector: this._injector\n });\n\n // 3. Get DOM element from component\n this._tooltipElement = (this._tooltipComponent.hostView as EmbeddedViewRef<any>)\n .rootNodes[0] as HTMLElement;\n\n // 4. Append DOM element to the body\n renderToBody(this._document, this._tooltipElement, this.containerElement);\n this._enterAnimation.create(this._tooltipElement).play();\n }\n\n /**\n * Sets data to tooltip component and shows them\n */\n protected _showData(): void\n {\n if(this._tooltipComponent)\n {\n this._tooltipComponent.instance.allowHtml = this.allowHtml;\n this._tooltipComponent.instance.data = this.tooltip;\n this._tooltipComponent.instance.template = this.template ?? this.tooltipTemplateChild?.template;\n this._tooltipComponent.instance.cssClass = this._options.tooltipCssClass;\n\n this._tooltipComponent.instance.registerHoverEvents(() =>\n {\n if(this._options.allowSelection)\n {\n this._keepOpen = true;\n this._showRequest = false;\n }\n },\n () =>\n {\n setTimeout(() =>\n {\n this._keepOpen = false;\n\n if(!this._showRequest)\n {\n this._hideTooltip();\n }\n\n this._showRequest = false;\n }, 5);\n });\n\n this._tooltipComponent.instance.invalidateVisuals();\n }\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `tooltip` input\n */\n public static ngAcceptInputType_tooltip: any;\n}"]}
|
|
@@ -6,5 +6,6 @@ export * from './isPresent/isPresent.pipe';
|
|
|
6
6
|
export * from './keys/keys.pipe';
|
|
7
7
|
export * from './localize/localize.pipe';
|
|
8
8
|
export * from './mergeCssClasses/mergeCssClasses.pipe';
|
|
9
|
+
export * from './trimText/trimText.pipe';
|
|
9
10
|
export * from './urlEncode/urlEncode.pipe';
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pipes/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sDAAsD,CAAC;AACrE,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wCAAwC,CAAC;AACvD,cAAc,4BAA4B,CAAC","sourcesContent":["export * from './displayProperties/displayProperties.pipe';\nexport * from './firstUppercase/firstUppercase.pipe';\nexport * from './firstUppercaseLocalize/firstUppercaseLocalize.pipe';\nexport * from './isNaN/isNaN.pipe';\nexport * from './isPresent/isPresent.pipe';\nexport * from './keys/keys.pipe';\nexport * from './localize/localize.pipe';\nexport * from './mergeCssClasses/mergeCssClasses.pipe';\nexport * from './urlEncode/urlEncode.pipe';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pipes/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sDAAsD,CAAC;AACrE,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wCAAwC,CAAC;AACvD,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC","sourcesContent":["export * from './displayProperties/displayProperties.pipe';\nexport * from './firstUppercase/firstUppercase.pipe';\nexport * from './firstUppercaseLocalize/firstUppercaseLocalize.pipe';\nexport * from './isNaN/isNaN.pipe';\nexport * from './isPresent/isPresent.pipe';\nexport * from './keys/keys.pipe';\nexport * from './localize/localize.pipe';\nexport * from './mergeCssClasses/mergeCssClasses.pipe';\nexport * from './trimText/trimText.pipe';\nexport * from './urlEncode/urlEncode.pipe';\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Trims long text and adds 'suffix' indication of longer text
|
|
5
|
+
*/
|
|
6
|
+
export class TrimTextPipe {
|
|
7
|
+
/**
|
|
8
|
+
* Trims long text and adds 'suffix' indication of longer text
|
|
9
|
+
* @param text - Text to be trimmed
|
|
10
|
+
* @param length - Maximal allowed length of text, that wont be trimmed
|
|
11
|
+
* @param suffix - Suffix to be added when text is trimmed
|
|
12
|
+
*/
|
|
13
|
+
transform(text, length, suffix = '...') {
|
|
14
|
+
if (!text) {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
if (text.length > length) {
|
|
18
|
+
return text.substring(0, length) + suffix;
|
|
19
|
+
}
|
|
20
|
+
return text;
|
|
21
|
+
}
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TrimTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
23
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.5", ngImport: i0, type: TrimTextPipe, isStandalone: true, name: "trimText" });
|
|
24
|
+
}
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TrimTextPipe, decorators: [{
|
|
26
|
+
type: Pipe,
|
|
27
|
+
args: [{ name: 'trimText', standalone: true }]
|
|
28
|
+
}] });
|
|
29
|
+
//# sourceMappingURL=trimText.pipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trimText.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/trimText/trimText.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAElD;;GAEG;AAEH,MAAM,OAAO,YAAY;IAErB;;;;;OAKG;IACI,SAAS,CAAC,IAA2B,EAAE,MAAc,EAAE,SAAiB,KAAK;QAEhF,IAAG,CAAC,IAAI,EACR;YACI,OAAO,EAAE,CAAC;SACb;QAED,IAAG,IAAI,CAAC,MAAM,GAAG,MAAM,EACvB;YACI,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;SAC7C;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;uGArBQ,YAAY;qGAAZ,YAAY;;2FAAZ,YAAY;kBADxB,IAAI;mBAAC,EAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAC","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Trims long text and adds 'suffix' indication of longer text\n */\n@Pipe({name: 'trimText', standalone: true})\nexport class TrimTextPipe implements PipeTransform\n{\n /**\n * Trims long text and adds 'suffix' indication of longer text\n * @param text - Text to be trimmed\n * @param length - Maximal allowed length of text, that wont be trimmed\n * @param suffix - Suffix to be added when text is trimmed\n */\n public transform(text: string|undefined|null, length: number, suffix: string = '...'): string\n {\n if(!text)\n {\n return '';\n }\n\n if(text.length > length)\n {\n return text.substring(0, length) + suffix;\n }\n\n return text;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floatingUiDomPosition.service.d.ts","sourceRoot":"","sources":["floatingUiDomPosition.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAsH,MAAM,eAAe,CAAC;AAE7L,OAAO,EAAkB,SAAS,EAAc,UAAU,
|
|
1
|
+
{"version":3,"file":"floatingUiDomPosition.service.d.ts","sourceRoot":"","sources":["floatingUiDomPosition.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAsH,MAAM,eAAe,CAAC;AAE7L,OAAO,EAAkB,SAAS,EAAc,UAAU,EAAsB,MAAM,kBAAkB,CAAC;AACzG,OAAO,EAAC,UAAU,EAAC,MAAM,MAAM,CAAC;;AAahC;;GAEG;AACH,qBAEa,qBAAsB,YAAW,QAAQ;IAIlD;;OAEG;IACI,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC,cAAc,CAAC;IAoFrH;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,UAAU,EAAE,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI;IAQ7E;;;;OAIG;IACH,SAAS,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,EAAE,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI;IAgH/E;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS;yCAjOnD,qBAAqB;6CAArB,qBAAqB;CAwRjC"}
|
|
@@ -8,7 +8,7 @@ export declare class DebugDataCopyClickDirective {
|
|
|
8
8
|
/**
|
|
9
9
|
* Data to be copied as serialized json
|
|
10
10
|
*/
|
|
11
|
-
data:
|
|
11
|
+
data: unknown;
|
|
12
12
|
/**
|
|
13
13
|
* Adds css class clickable to this element
|
|
14
14
|
*
|
|
@@ -23,6 +23,6 @@ export declare class DebugDataCopyClickDirective {
|
|
|
23
23
|
*/
|
|
24
24
|
copyData(): void;
|
|
25
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<DebugDataCopyClickDirective, never>;
|
|
26
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DebugDataCopyClickDirective, "debug-data[copyClick]", never, { "data": { "alias": "copyClick"; "required": false; }; }, {}, never, never,
|
|
26
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DebugDataCopyClickDirective, "debug-data[copyClick]", never, { "data": { "alias": "copyClick"; "required": false; }; }, {}, never, never, true, never>;
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=debugDataCopyClick.directive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugDataCopyClick.directive.d.ts","sourceRoot":"","sources":["debugDataCopyClick.directive.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;;AAEjD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"debugDataCopyClick.directive.d.ts","sourceRoot":"","sources":["debugDataCopyClick.directive.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;;AAEjD;;GAEG;AACH,qBAKa,2BAA2B;IAqBxB,SAAS,CAAC,UAAU,EAAE,SAAS;IAjB3C;;OAEG;IAEI,IAAI,EAAE,OAAO,CAAC;IAIrB;;;;OAIG;IAEI,SAAS,EAAE,OAAO,CAAQ;gBAGX,UAAU,EAAE,SAAS;IAM3C;;;;OAIG;IAEI,QAAQ,IAAI,IAAI;yCAjCd,2BAA2B;2CAA3B,2BAA2B;CAqCvC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "
|
|
3
|
-
import * as i2 from "
|
|
2
|
+
import * as i1 from "@anglr/common";
|
|
3
|
+
import * as i2 from "../directives/debugDataCopyClick/debugDataCopyClick.directive";
|
|
4
4
|
/**
|
|
5
5
|
* Module for debug data copy click directive
|
|
6
6
|
*/
|
|
7
7
|
export declare class DebugDataCopyClickModule {
|
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<DebugDataCopyClickModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DebugDataCopyClickModule, [typeof i1.DebugDataCopyClickDirective],
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DebugDataCopyClickModule, never, [typeof i1.DebugDataComponent, typeof i2.DebugDataCopyClickDirective], [typeof i2.DebugDataCopyClickDirective, typeof i1.DebugDataComponent]>;
|
|
10
10
|
static ɵinj: i0.ɵɵInjectorDeclaration<DebugDataCopyClickModule>;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=debugDataCopyClick.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugDataCopyClick.module.d.ts","sourceRoot":"","sources":["debugDataCopyClick.module.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"debugDataCopyClick.module.d.ts","sourceRoot":"","sources":["debugDataCopyClick.module.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,qBAaa,wBAAwB;yCAAxB,wBAAwB;0CAAxB,wBAAwB;0CAAxB,wBAAwB;CAEpC"}
|
package/package.json
CHANGED
|
@@ -30,6 +30,14 @@ 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;
|
|
33
41
|
/**
|
|
34
42
|
* Indication whether are html tags allowed in tooltip text
|
|
35
43
|
*/
|
|
@@ -47,12 +55,16 @@ export declare class EllipsisTooltipSADirective implements OnChanges, OnDestroy
|
|
|
47
55
|
* Called when component is destroyed
|
|
48
56
|
*/
|
|
49
57
|
ngOnDestroy(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Updates tooltip value
|
|
60
|
+
*/
|
|
61
|
+
protected updateTooltip(): void;
|
|
50
62
|
/**
|
|
51
63
|
* Custom input type for `element` input
|
|
52
64
|
*/
|
|
53
65
|
static ngAcceptInputType_element: HTMLElement | ElementRef | '';
|
|
54
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<EllipsisTooltipSADirective, never>;
|
|
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: {}; }]>;
|
|
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: {}; }]>;
|
|
56
68
|
static ngAcceptInputType_allowHtml: unknown;
|
|
57
69
|
}
|
|
58
70
|
//# 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":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@ -4,12 +4,13 @@ import * as i2 from "../pipes/isPresent/isPresent.pipe";
|
|
|
4
4
|
import * as i3 from "../pipes/urlEncode/urlEncode.pipe";
|
|
5
5
|
import * as i4 from "../pipes/mergeCssClasses/mergeCssClasses.pipe";
|
|
6
6
|
import * as i5 from "../pipes/keys/keys.pipe";
|
|
7
|
+
import * as i6 from "../pipes/trimText/trimText.pipe";
|
|
7
8
|
/**
|
|
8
9
|
* Module for common utility stuff
|
|
9
10
|
*/
|
|
10
11
|
export declare class CommonUtilsModule {
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommonUtilsModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CommonUtilsModule, never, [typeof i1.IsNaNSAPipe, typeof i2.IsPresentSAPipe, typeof i3.UrlEncodeSAPipe, typeof i4.MergeCssClassesSAPipe, typeof i5.KeysSAPipe], [typeof i1.IsNaNSAPipe, typeof i2.IsPresentSAPipe, typeof i3.UrlEncodeSAPipe, typeof i4.MergeCssClassesSAPipe, typeof i5.KeysSAPipe]>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CommonUtilsModule, never, [typeof i1.IsNaNSAPipe, typeof i2.IsPresentSAPipe, typeof i3.UrlEncodeSAPipe, typeof i4.MergeCssClassesSAPipe, typeof i5.KeysSAPipe, typeof i6.TrimTextPipe], [typeof i1.IsNaNSAPipe, typeof i2.IsPresentSAPipe, typeof i3.UrlEncodeSAPipe, typeof i4.MergeCssClassesSAPipe, typeof i5.KeysSAPipe, typeof i6.TrimTextPipe]>;
|
|
13
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<CommonUtilsModule>;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=commonUtils.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commonUtils.module.d.ts","sourceRoot":"","sources":["commonUtils.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commonUtils.module.d.ts","sourceRoot":"","sources":["commonUtils.module.ts"],"names":[],"mappings":";;;;;;;AAIA;;GAEG;AACH,qBAqBa,iBAAiB;yCAAjB,iBAAiB;0CAAjB,iBAAiB;0CAAjB,iBAAiB;CAE7B"}
|
|
@@ -1,38 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Subscription } from 'rxjs';
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
3
2
|
import { DebugDataEnabledService } from '../../services/debugDataEnabled/debugDataEnabled.service';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
/**
|
|
6
5
|
* Component used for displaying debug data
|
|
7
6
|
*/
|
|
8
|
-
export declare class DebugDataComponent
|
|
7
|
+
export declare class DebugDataComponent {
|
|
9
8
|
protected debugDataEnabledSvc: DebugDataEnabledService;
|
|
10
|
-
protected changeDetector: ChangeDetectorRef;
|
|
11
9
|
protected element: ElementRef<HTMLElement>;
|
|
12
|
-
|
|
13
|
-
* Subscription for changes of debug data enabled
|
|
14
|
-
*/
|
|
15
|
-
protected debugDataEnabledChangeSubscription: Subscription | undefined | null;
|
|
16
|
-
/**
|
|
17
|
-
* Indication whether is debug data enabled
|
|
18
|
-
*
|
|
19
|
-
* @internal
|
|
20
|
-
*/
|
|
21
|
-
protected enabled: WritableSignal<boolean>;
|
|
22
|
-
constructor(debugDataEnabledSvc: DebugDataEnabledService, changeDetector: ChangeDetectorRef, element: ElementRef<HTMLElement>);
|
|
23
|
-
/**
|
|
24
|
-
* Initialize component
|
|
25
|
-
*/
|
|
26
|
-
ngOnInit(): void;
|
|
27
|
-
/**
|
|
28
|
-
* Called when component is destroyed
|
|
29
|
-
*/
|
|
30
|
-
ngOnDestroy(): void;
|
|
10
|
+
constructor(debugDataEnabledSvc: DebugDataEnabledService, element: ElementRef<HTMLElement>);
|
|
31
11
|
/**
|
|
32
12
|
* Sets enabled css class according enabled state
|
|
33
13
|
*/
|
|
34
14
|
protected setEnabledCssClass(): void;
|
|
35
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DebugDataComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DebugDataComponent, "debug-data", never, {}, {}, never, ["*"],
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DebugDataComponent, "debug-data", never, {}, {}, never, ["*"], true, never>;
|
|
37
17
|
}
|
|
38
18
|
//# sourceMappingURL=debugData.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugData.component.d.ts","sourceRoot":"","sources":["debugData.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,
|
|
1
|
+
{"version":3,"file":"debugData.component.d.ts","sourceRoot":"","sources":["debugData.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,UAAU,EAAS,MAAM,eAAe,CAAC;AAErF,OAAO,EAAC,uBAAuB,EAAC,MAAM,0DAA0D,CAAC;;AAOjG;;GAEG;AACH,qBAQa,kBAAkB;IAGf,SAAS,CAAC,mBAAmB,EAAE,uBAAuB;IACtD,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC;gBADhC,mBAAmB,EAAE,uBAAuB,EAC5C,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC;IAOtD;;OAEG;IACH,SAAS,CAAC,kBAAkB,IAAI,IAAI;yCAd3B,kBAAkB;2CAAlB,kBAAkB;CAyB9B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
@if(debugDataEnabledSvc.enabled())
|
|
2
|
+
{
|
|
3
|
+
<ng-content/>
|
|
4
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "../components/debugData/debugData.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
3
|
/**
|
|
5
4
|
* Module that contains debug data component
|
|
6
5
|
*/
|
|
7
6
|
export declare class DebugDataModule {
|
|
8
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<DebugDataModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DebugDataModule, [typeof i1.DebugDataComponent], [typeof
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DebugDataModule, never, [typeof i1.DebugDataComponent], [typeof i1.DebugDataComponent]>;
|
|
10
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<DebugDataModule>;
|
|
11
10
|
}
|
|
12
11
|
//# sourceMappingURL=debugData.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugData.module.d.ts","sourceRoot":"","sources":["debugData.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"debugData.module.d.ts","sourceRoot":"","sources":["debugData.module.ts"],"names":[],"mappings":";;AAIA;;GAEG;AACH,qBAWa,eAAe;yCAAf,eAAe;0CAAf,eAAe;0CAAf,eAAe;CAE3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* Service used for handling enabled state for debug data component
|
|
@@ -8,18 +8,10 @@ export declare class DebugDataEnabledService {
|
|
|
8
8
|
* Indication whether debug data copmonent is enabled
|
|
9
9
|
*/
|
|
10
10
|
private _enabled;
|
|
11
|
-
/**
|
|
12
|
-
* Subject used for emitting changes of enabled state
|
|
13
|
-
*/
|
|
14
|
-
private _enabledChangeSubject;
|
|
15
11
|
/**
|
|
16
12
|
* Indication whether debug data copmonent is enabled
|
|
17
13
|
*/
|
|
18
|
-
get enabled(): boolean
|
|
19
|
-
/**
|
|
20
|
-
* Occurs when enabled state changed
|
|
21
|
-
*/
|
|
22
|
-
get enabledChange(): Observable<void>;
|
|
14
|
+
get enabled(): Signal<boolean>;
|
|
23
15
|
/**
|
|
24
16
|
* Sets enabled state
|
|
25
17
|
* @param enabled - Indication whether will be enabled state set to true, or false, defaults to true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugDataEnabled.service.d.ts","sourceRoot":"","sources":["debugDataEnabled.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"debugDataEnabled.service.d.ts","sourceRoot":"","sources":["debugDataEnabled.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAyB,MAAM,eAAe,CAAC;;AAEzE;;GAEG;AACH,qBACa,uBAAuB;IAIhC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAA0C;IAI1D;;OAEG;IACH,IAAW,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,CAGpC;IAID;;;OAGG;IACI,UAAU,CAAC,OAAO,GAAE,OAAc,GAAG,IAAI;yCAzBvC,uBAAuB;6CAAvB,uBAAuB;CA6BnC"}
|
|
@@ -16,6 +16,7 @@ export declare class TooltipDirective<TData = any> implements OnChanges, OnDestr
|
|
|
16
16
|
protected _animationsPlayer: AnimationBuilder;
|
|
17
17
|
protected _document: Document;
|
|
18
18
|
protected _position: Position;
|
|
19
|
+
protected _parent?: TooltipDirective | null;
|
|
19
20
|
/**
|
|
20
21
|
* Instance of component used for rendering tooltip
|
|
21
22
|
*/
|
|
@@ -79,7 +80,7 @@ export declare class TooltipDirective<TData = any> implements OnChanges, OnDestr
|
|
|
79
80
|
* Instance of template from element content, used for rendering
|
|
80
81
|
*/
|
|
81
82
|
tooltipTemplateChild?: TooltipTemplateDirective;
|
|
82
|
-
constructor(_viewContainerRef: ViewContainerRef, _injector: Injector, _element: ElementRef<HTMLElement>, _animationsPlayer: AnimationBuilder, _document: Document, _position: Position, options?: Partial<TooltipOptions>);
|
|
83
|
+
constructor(_viewContainerRef: ViewContainerRef, _injector: Injector, _element: ElementRef<HTMLElement>, _animationsPlayer: AnimationBuilder, _document: Document, _position: Position, _parent?: TooltipDirective | null, options?: Partial<TooltipOptions>);
|
|
83
84
|
/**
|
|
84
85
|
* Called when input value changes
|
|
85
86
|
*/
|
|
@@ -91,15 +92,13 @@ export declare class TooltipDirective<TData = any> implements OnChanges, OnDestr
|
|
|
91
92
|
/**
|
|
92
93
|
* Handles mouse leave event, hover ends
|
|
93
94
|
* @param event - Mouse event that occured
|
|
94
|
-
* @internal
|
|
95
95
|
*/
|
|
96
|
-
mouseLeave(event: MouseEvent): void;
|
|
96
|
+
protected mouseLeave(event: MouseEvent): void;
|
|
97
97
|
/**
|
|
98
98
|
* Handles mouse move event, displaying tooltip
|
|
99
99
|
* @param event - Mouse event that occured
|
|
100
|
-
* @internal
|
|
101
100
|
*/
|
|
102
|
-
mouseMove(event: MouseEvent): void;
|
|
101
|
+
protected mouseMove(event: MouseEvent): void;
|
|
103
102
|
/**
|
|
104
103
|
* Shows tooltip
|
|
105
104
|
* @param event - Mouse event
|
|
@@ -125,7 +124,7 @@ export declare class TooltipDirective<TData = any> implements OnChanges, OnDestr
|
|
|
125
124
|
* Custom input type for `tooltip` input
|
|
126
125
|
*/
|
|
127
126
|
static ngAcceptInputType_tooltip: any;
|
|
128
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective<any>, [null, null, null, null, null, null, { optional: true; }]>;
|
|
127
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective<any>, [null, null, null, null, null, null, { optional: true; skipSelf: true; }, { optional: true; }]>;
|
|
129
128
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective<any>, "[tooltip]", never, { "tooltip": { "alias": "tooltip"; "required": false; }; "allowHtml": { "alias": "allowHtml"; "required": false; }; "template": { "alias": "template"; "required": false; }; "tooltipOptions": { "alias": "tooltipOptions"; "required": false; }; "tooltipVisible": { "alias": "tooltipVisible"; "required": false; }; "containerElement": { "alias": "containerElement"; "required": false; }; }, {}, ["tooltipTemplateChild"], never, true, never>;
|
|
130
129
|
}
|
|
131
130
|
//# sourceMappingURL=tooltip.directive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.direct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hD;;OAEG;IACI,WAAW,IAAI,IAAI;IAY1B;;;OAGG;IAEH,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAoB7C;;;OAGG;IAEH,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAmC5C;;;OAGG;IACH,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,IAAI;IA+BhD;;OAEG;IACH,SAAS,CAAC,YAAY,IAAI,IAAI;IAK9B;;OAEG;IACH,SAAS,CAAC,eAAe,IAAI,IAAI;IAsBjC;;OAEG;IACH,SAAS,CAAC,cAAc,IAAI,IAAI;IAqBhC;;OAEG;IACH,SAAS,CAAC,SAAS,IAAI,IAAI;IAsC3B;;OAEG;IACH,OAAc,yBAAyB,EAAE,GAAG,CAAC;yCA9WpC,gBAAgB;2CAAhB,gBAAgB;CA+W5B"}
|
package/src/pipes/index.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ export * from './isPresent/isPresent.pipe';
|
|
|
6
6
|
export * from './keys/keys.pipe';
|
|
7
7
|
export * from './localize/localize.pipe';
|
|
8
8
|
export * from './mergeCssClasses/mergeCssClasses.pipe';
|
|
9
|
+
export * from './trimText/trimText.pipe';
|
|
9
10
|
export * from './urlEncode/urlEncode.pipe';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
package/src/pipes/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sDAAsD,CAAC;AACrE,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wCAAwC,CAAC;AACvD,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sDAAsD,CAAC;AACrE,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wCAAwC,CAAC;AACvD,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Trims long text and adds 'suffix' indication of longer text
|
|
5
|
+
*/
|
|
6
|
+
export declare class TrimTextPipe implements PipeTransform {
|
|
7
|
+
/**
|
|
8
|
+
* Trims long text and adds 'suffix' indication of longer text
|
|
9
|
+
* @param text - Text to be trimmed
|
|
10
|
+
* @param length - Maximal allowed length of text, that wont be trimmed
|
|
11
|
+
* @param suffix - Suffix to be added when text is trimmed
|
|
12
|
+
*/
|
|
13
|
+
transform(text: string | undefined | null, length: number, suffix?: string): string;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TrimTextPipe, never>;
|
|
15
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TrimTextPipe, "trimText", true>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=trimText.pipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trimText.pipe.d.ts","sourceRoot":"","sources":["trimText.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,aAAa,EAAC,MAAM,eAAe,CAAC;;AAElD;;GAEG;AACH,qBACa,YAAa,YAAW,aAAa;IAE9C;;;;;OAKG;IACI,SAAS,CAAC,IAAI,EAAE,MAAM,GAAC,SAAS,GAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,MAAc,GAAG,MAAM;yCARpF,YAAY;uCAAZ,YAAY;CAsBxB"}
|