@spicainternational/ngx-sds-components 5.1.0 → 5.2.1
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/esm2020/public-api.mjs +2 -1
- package/esm2020/src/lib/avatar/avatar.component.mjs +13 -13
- package/esm2020/src/lib/date-picker/date-picker.component.mjs +19 -7
- package/esm2020/src/lib/date-picker/date-picker.model.mjs +1 -1
- package/esm2020/src/lib/tooltip/components/tooltip.component.mjs +21 -0
- package/esm2020/src/lib/tooltip/public-api.mjs +3 -0
- package/esm2020/src/lib/tooltip/spicainternational-ngx-sds-components-src-lib-tooltip.mjs +5 -0
- package/esm2020/src/lib/tooltip/tooltip.directive.mjs +155 -0
- package/esm2020/src/lib/tooltip/tooltip.module.mjs +29 -0
- package/esm2020/src/lib/tooltip/tooltip.types.mjs +2 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-avatar.mjs +12 -12
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-avatar.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +19 -7
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-tooltip.mjs +205 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-tooltip.mjs.map +1 -0
- package/fesm2015/spicainternational-ngx-sds-components.mjs +1 -0
- package/fesm2015/spicainternational-ngx-sds-components.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-avatar.mjs +12 -12
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-avatar.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +17 -5
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-tooltip.mjs +205 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-tooltip.mjs.map +1 -0
- package/fesm2020/spicainternational-ngx-sds-components.mjs +1 -0
- package/fesm2020/spicainternational-ngx-sds-components.mjs.map +1 -1
- package/package.json +9 -1
- package/public-api.d.ts +1 -0
- package/src/lib/date-picker/date-picker.model.d.ts +1 -0
- package/src/lib/tooltip/components/tooltip.component.d.ts +15 -0
- package/src/lib/tooltip/package.json +10 -0
- package/src/lib/tooltip/public-api.d.ts +2 -0
- package/src/lib/tooltip/spicainternational-ngx-sds-components-src-lib-tooltip.d.ts +5 -0
- package/src/lib/tooltip/tooltip.directive.d.ts +32 -0
- package/src/lib/tooltip/tooltip.module.d.ts +9 -0
- package/src/lib/tooltip/tooltip.types.d.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-tooltip.mjs","sources":["../../../projects/ngx-sds-components/src/lib/tooltip/components/tooltip.component.ts","../../../projects/ngx-sds-components/src/lib/tooltip/components/tooltip.component.html","../../../projects/ngx-sds-components/src/lib/tooltip/tooltip.directive.ts","../../../projects/ngx-sds-components/src/lib/tooltip/tooltip.module.ts","../../../projects/ngx-sds-components/src/lib/tooltip/spicainternational-ngx-sds-components-src-lib-tooltip.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\r\nimport { TooltipPosition, TooltipTheme } from '../tooltip.types';\r\n\r\n@Component({\r\n selector: 'sds-tooltip',\r\n templateUrl: './tooltip.component.html',\r\n styleUrls: ['./tooltip.component.scss'],\r\n})\r\nexport class SdsTooltipComponent implements OnInit {\r\n\r\n public tooltip: string = '';\r\n public left: number = 0;\r\n public top: number = 0;\r\n public visible: boolean = false;\r\n\r\n public position: TooltipPosition = 'above';\r\n public theme: TooltipTheme = 'dark';\r\n\r\n\r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n}\r\n","<div class=\"sds-tooltip\"\r\n [ngClass]=\"['sds-tooltip-' + position, 'sds-tooltip-' + theme]\"\r\n [class.sds-tooltip-visible]=\"visible\"\r\n [style.left.px]=\"left\"\r\n [style.top.px]=\"top\"\r\n >\r\n <small>\r\n {{ tooltip }}\r\n </small>\r\n</div>\r\n","import {\r\n ApplicationRef,\r\n ComponentFactoryResolver,\r\n ComponentRef,\r\n Directive,\r\n ElementRef,\r\n EmbeddedViewRef,\r\n HostListener,\r\n Injector,\r\n Input,\r\n Renderer2,\r\n ViewContainerRef,\r\n} from '@angular/core';\r\nimport { SdsTooltipComponent } from './components/tooltip.component';\r\nimport { TooltipPosition, TooltipTheme } from './tooltip.types';\r\n\r\n@Directive({\r\n selector: '[sdsTooltip]',\r\n})\r\nexport class TooltipDirective {\r\n @Input() tooltip = '';\r\n @Input() position: TooltipPosition = 'above';\r\n @Input() theme: TooltipTheme = 'dark';\r\n @Input() showDelay = 0;\r\n @Input() hideDelay = 0;\r\n\r\n private componentRef: ComponentRef<any> | null = null;\r\n private showTimeout?: number;\r\n private hideTimeout?: number;\r\n private touchTimeout?: number;\r\n\r\n\r\n constructor(\r\n private elementRef: ElementRef,\r\n private appRef: ApplicationRef,\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n // private viewContainerRef: ViewContainerRef,\r\n private injector: Injector,\r\n // private renderer2: Renderer2\r\n ) {\r\n // this.renderer2.listen('window', 'scroll', (_) => {\r\n // console.log('scroll');\r\n // this.setHideTooltipTimeout();\r\n // });\r\n }\r\n\r\n @HostListener('mouseenter')\r\n onMouseEnter(): void {\r\n this.initializeTooltip();\r\n }\r\n\r\n @HostListener('mouseleave')\r\n onMouseLeave(): void {\r\n this.setHideTooltipTimeout();\r\n }\r\n\r\n // @HostListener(\"window:scroll\", [])\r\n // onWindowScroll() {\r\n // console.log('scroll');\r\n // this.setHideTooltipTimeout();\r\n // }\r\n\r\n // @HostListener('window:scroll') onScroll(e: Event): void {\r\n // console.log((e.target as Element).scrollTop);\r\n // }\r\n\r\n // @HostListener('scroll') onScrollHost(e: Event): void {\r\n // console.log((e.target as Element).scrollTop);\r\n // }\r\n\r\n @HostListener('mousemove', ['$event'])\r\n onMouseMove($event: MouseEvent): void {\r\n if (this.componentRef !== null && this.position === 'dynamic') {\r\n this.componentRef.instance.left = $event.clientX;\r\n this.componentRef.instance.top = $event.clientY;\r\n this.componentRef.instance.tooltip = this.tooltip;\r\n }\r\n }\r\n\r\n @HostListener('touchstart', ['$event'])\r\n onTouchStart($event: TouchEvent): void {\r\n $event.preventDefault();\r\n window.clearTimeout(this.touchTimeout);\r\n this.touchTimeout = window.setTimeout(this.initializeTooltip.bind(this), 500);\r\n }\r\n\r\n @HostListener('touchend')\r\n onTouchEnd(): void {\r\n window.clearTimeout(this.touchTimeout);\r\n this.setHideTooltipTimeout();\r\n }\r\n\r\n private initializeTooltip() {\r\n if (this.componentRef === null) {\r\n window.clearInterval(this.hideDelay);\r\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(SdsTooltipComponent);\r\n this.componentRef = componentFactory.create(this.injector);\r\n\r\n this.appRef.attachView(this.componentRef.hostView);\r\n const [tooltipDOMElement] = (this.componentRef.hostView as EmbeddedViewRef<any>).rootNodes;\r\n\r\n this.setTooltipComponentProperties();\r\n\r\n document.body.appendChild(tooltipDOMElement);\r\n this.showTimeout = window.setTimeout(this.showTooltip.bind(this), this.showDelay);\r\n }\r\n }\r\n\r\n private setTooltipComponentProperties() {\r\n if (this.componentRef !== null) {\r\n this.componentRef.instance.tooltip = this.tooltip;\r\n this.componentRef.instance.position = this.position;\r\n this.componentRef.instance.theme = this.theme;\r\n\r\n const { left, right, top, bottom } = this.elementRef.nativeElement.getBoundingClientRect();\r\n\r\n switch (this.position) {\r\n case 'below': {\r\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\r\n this.componentRef.instance.top = Math.round(bottom);\r\n break;\r\n }\r\n case 'above': {\r\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\r\n this.componentRef.instance.top = Math.round(top);\r\n break;\r\n }\r\n case 'right': {\r\n this.componentRef.instance.left = Math.round(right);\r\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\r\n break;\r\n }\r\n case 'left': {\r\n this.componentRef.instance.left = Math.round(left);\r\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\r\n break;\r\n }\r\n default: {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n private showTooltip() {\r\n if (this.componentRef !== null) {\r\n this.componentRef.instance.visible = true;\r\n }\r\n }\r\n\r\n private setHideTooltipTimeout() {\r\n this.hideTimeout = window.setTimeout(this.destroy.bind(this), this.hideDelay);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroy();\r\n }\r\n\r\n destroy(): void {\r\n if (this.componentRef !== null) {\r\n window.clearInterval(this.showTimeout);\r\n window.clearInterval(this.hideDelay);\r\n this.appRef.detachView(this.componentRef.hostView);\r\n this.componentRef.destroy();\r\n this.componentRef = null;\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsTooltipComponent } from '../tooltip/components/tooltip.component';\r\nimport { TooltipDirective } from './tooltip.directive';\r\nimport { TooltipPosition, TooltipTheme } from './tooltip.types';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n SdsTooltipComponent,\r\n TooltipDirective\r\n ],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [\r\n TooltipDirective\r\n ]\r\n})\r\nexport class SdsTooltipModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAQa,mBAAmB,CAAA;AAY5B,IAAA,WAAA,GAAA;QAVO,IAAO,CAAA,OAAA,GAAW,EAAE,CAAC;QACrB,IAAI,CAAA,IAAA,GAAW,CAAC,CAAC;QACjB,IAAG,CAAA,GAAA,GAAW,CAAC,CAAC;QAChB,IAAO,CAAA,OAAA,GAAY,KAAK,CAAC;QAEzB,IAAQ,CAAA,QAAA,GAAoB,OAAO,CAAC;QACpC,IAAK,CAAA,KAAA,GAAiB,MAAM,CAAC;KAIpB;AAEhB,IAA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CAAA;2FAKU,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAZ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,mBAAmB;wBACnB,gBAAgB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,gBAAgB;AACjB,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -10,6 +10,7 @@ export * from '@spicainternational/ngx-sds-components/src/lib/pane';
|
|
|
10
10
|
export * from '@spicainternational/ngx-sds-components/src/lib/quick-info';
|
|
11
11
|
export * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';
|
|
12
12
|
export * from '@spicainternational/ngx-sds-components/src/lib/side-bar';
|
|
13
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/tooltip';
|
|
13
14
|
|
|
14
15
|
/*
|
|
15
16
|
* Public API Surface of ngx-sds-components
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar'
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/tooltip';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spicainternational/ngx-sds-components",
|
|
3
|
-
"version": "5.1
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"description": "Spica design system angular components.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": ">=10.0.0",
|
|
@@ -131,6 +131,14 @@
|
|
|
131
131
|
"es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-side-bar.mjs",
|
|
132
132
|
"node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-side-bar.mjs",
|
|
133
133
|
"default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-side-bar.mjs"
|
|
134
|
+
},
|
|
135
|
+
"./src/lib/tooltip": {
|
|
136
|
+
"types": "./src/lib/tooltip/spicainternational-ngx-sds-components-src-lib-tooltip.d.ts",
|
|
137
|
+
"esm2020": "./esm2020/src/lib/tooltip/spicainternational-ngx-sds-components-src-lib-tooltip.mjs",
|
|
138
|
+
"es2020": "./fesm2020/spicainternational-ngx-sds-components-src-lib-tooltip.mjs",
|
|
139
|
+
"es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-tooltip.mjs",
|
|
140
|
+
"node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-tooltip.mjs",
|
|
141
|
+
"default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-tooltip.mjs"
|
|
134
142
|
}
|
|
135
143
|
},
|
|
136
144
|
"sideEffects": false
|
package/public-api.d.ts
CHANGED
|
@@ -10,3 +10,4 @@ export * from '@spicainternational/ngx-sds-components/src/lib/pane';
|
|
|
10
10
|
export * from '@spicainternational/ngx-sds-components/src/lib/quick-info';
|
|
11
11
|
export * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';
|
|
12
12
|
export * from '@spicainternational/ngx-sds-components/src/lib/side-bar';
|
|
13
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/tooltip';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { TooltipPosition, TooltipTheme } from '../tooltip.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SdsTooltipComponent implements OnInit {
|
|
5
|
+
tooltip: string;
|
|
6
|
+
left: number;
|
|
7
|
+
top: number;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
position: TooltipPosition;
|
|
10
|
+
theme: TooltipTheme;
|
|
11
|
+
constructor();
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsTooltipComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsTooltipComponent, "sds-tooltip", never, {}, {}, never, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"module": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-tooltip.mjs",
|
|
3
|
+
"es2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-tooltip.mjs",
|
|
4
|
+
"esm2020": "../../../esm2020/src/lib/tooltip/spicainternational-ngx-sds-components-src-lib-tooltip.mjs",
|
|
5
|
+
"fesm2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-tooltip.mjs",
|
|
6
|
+
"fesm2015": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-tooltip.mjs",
|
|
7
|
+
"typings": "spicainternational-ngx-sds-components-src-lib-tooltip.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"name": "@spicainternational/ngx-sds-components/src/lib/tooltip"
|
|
10
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ApplicationRef, ComponentFactoryResolver, ElementRef, Injector } from '@angular/core';
|
|
2
|
+
import { TooltipPosition, TooltipTheme } from './tooltip.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TooltipDirective {
|
|
5
|
+
private elementRef;
|
|
6
|
+
private appRef;
|
|
7
|
+
private componentFactoryResolver;
|
|
8
|
+
private injector;
|
|
9
|
+
tooltip: string;
|
|
10
|
+
position: TooltipPosition;
|
|
11
|
+
theme: TooltipTheme;
|
|
12
|
+
showDelay: number;
|
|
13
|
+
hideDelay: number;
|
|
14
|
+
private componentRef;
|
|
15
|
+
private showTimeout?;
|
|
16
|
+
private hideTimeout?;
|
|
17
|
+
private touchTimeout?;
|
|
18
|
+
constructor(elementRef: ElementRef, appRef: ApplicationRef, componentFactoryResolver: ComponentFactoryResolver, injector: Injector);
|
|
19
|
+
onMouseEnter(): void;
|
|
20
|
+
onMouseLeave(): void;
|
|
21
|
+
onMouseMove($event: MouseEvent): void;
|
|
22
|
+
onTouchStart($event: TouchEvent): void;
|
|
23
|
+
onTouchEnd(): void;
|
|
24
|
+
private initializeTooltip;
|
|
25
|
+
private setTooltipComponentProperties;
|
|
26
|
+
private showTooltip;
|
|
27
|
+
private setHideTooltipTimeout;
|
|
28
|
+
ngOnDestroy(): void;
|
|
29
|
+
destroy(): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, never>;
|
|
31
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[sdsTooltip]", never, { "tooltip": "tooltip"; "position": "position"; "theme": "theme"; "showDelay": "showDelay"; "hideDelay": "hideDelay"; }, {}, never>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./components/tooltip.component";
|
|
3
|
+
import * as i2 from "./tooltip.directive";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
export declare class SdsTooltipModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsTooltipModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdsTooltipModule, [typeof i1.SdsTooltipComponent, typeof i2.TooltipDirective], [typeof i3.CommonModule], [typeof i2.TooltipDirective]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SdsTooltipModule>;
|
|
9
|
+
}
|