@spicainternational/ngx-sds-components 5.9.2 → 5.10.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 +3 -1
- package/esm2020/src/lib/badge/badge.directive.mjs +88 -0
- package/esm2020/src/lib/badge/badge.module.mjs +29 -0
- package/esm2020/src/lib/badge/badge.types.mjs +2 -0
- package/esm2020/src/lib/badge/components/badge.component.mjs +59 -0
- package/esm2020/src/lib/badge/public-api.mjs +3 -0
- package/esm2020/src/lib/badge/spicainternational-ngx-sds-components-src-lib-badge.mjs +5 -0
- package/esm2020/src/lib/date-picker/date-picker.component.mjs +65 -15
- package/esm2020/src/lib/expansion-panel/expansion-panel.component.mjs +37 -11
- package/esm2020/src/lib/expansion-panel/expansion-panel.module.mjs +11 -20
- package/esm2020/src/lib/expansion-panel/expansion-panel.types.mjs +2 -0
- package/esm2020/src/lib/modal/dialog/dialog.component.mjs +11 -5
- package/esm2020/src/lib/modal/dialog/dialog.types.mjs +2 -0
- package/esm2020/src/lib/quick-info/quick-info.component.mjs +47 -10
- package/esm2020/src/lib/side-bar/side-bar.component.mjs +11 -4
- package/esm2020/src/lib/side-bar/side-bar.module.mjs +5 -4
- package/esm2020/src/lib/tooltip/components/tooltip.component.mjs +5 -4
- package/esm2020/src/lib/tooltip/tooltip.directive.mjs +28 -2
- package/esm2020/src/lib/tooltip/tooltip.module.mjs +8 -4
- package/esm2020/src/lib/tooltip/tooltip.types.mjs +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-badge.mjs +176 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-badge.mjs.map +1 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +64 -14
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs +45 -28
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs +10 -4
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-quick-info.mjs +46 -9
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-quick-info.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-side-bar.mjs +14 -6
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-side-bar.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-tooltip.mjs +38 -7
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-tooltip.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components.mjs +2 -0
- package/fesm2015/spicainternational-ngx-sds-components.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-badge.mjs +176 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-badge.mjs.map +1 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +64 -14
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs +45 -28
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs +10 -4
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-quick-info.mjs +46 -9
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-quick-info.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-side-bar.mjs +14 -6
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-side-bar.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-tooltip.mjs +38 -7
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-tooltip.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components.mjs +2 -0
- package/fesm2020/spicainternational-ngx-sds-components.mjs.map +1 -1
- package/package.json +9 -1
- package/public-api.d.ts +2 -0
- package/src/lib/badge/badge.directive.d.ts +23 -0
- package/src/lib/badge/badge.module.d.ts +9 -0
- package/src/lib/badge/badge.types.d.ts +2 -0
- package/src/lib/badge/components/badge.component.d.ts +23 -0
- package/src/lib/badge/package.json +10 -0
- package/src/lib/badge/public-api.d.ts +2 -0
- package/src/lib/badge/spicainternational-ngx-sds-components-src-lib-badge.d.ts +5 -0
- package/src/lib/date-picker/date-picker.component.d.ts +12 -2
- package/src/lib/expansion-panel/expansion-panel.component.d.ts +21 -6
- package/src/lib/expansion-panel/expansion-panel.module.d.ts +5 -5
- package/src/lib/expansion-panel/expansion-panel.types.d.ts +1 -0
- package/src/lib/modal/dialog/dialog.component.d.ts +5 -2
- package/src/lib/modal/dialog/dialog.types.d.ts +1 -0
- package/src/lib/quick-info/quick-info.component.d.ts +11 -2
- package/src/lib/side-bar/side-bar.component.d.ts +5 -1
- package/src/lib/side-bar/side-bar.module.d.ts +2 -1
- package/src/lib/tooltip/components/tooltip.component.d.ts +4 -1
- package/src/lib/tooltip/tooltip.directive.d.ts +7 -3
- package/src/lib/tooltip/tooltip.module.d.ts +2 -1
- package/src/lib/tooltip/tooltip.types.d.ts +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, Directive, Input, HostListener, NgModule } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1 from '@fortawesome/angular-fontawesome';
|
|
6
|
+
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
5
7
|
|
|
6
8
|
class SdsTooltipComponent {
|
|
7
9
|
constructor() {
|
|
@@ -15,10 +17,10 @@ class SdsTooltipComponent {
|
|
|
15
17
|
ngOnInit() { }
|
|
16
18
|
}
|
|
17
19
|
SdsTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
-
SdsTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsTooltipComponent, selector: "
|
|
20
|
+
SdsTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsTooltipComponent, selector: "ng-component", ngImport: i0, template: "<div class=\"sds-tooltip\"\r\n [ngClass]=\"['sds-tooltip-' + position, 'sds-tooltip-' + theme, tooltipClass]\"\r\n [class.sds-tooltip-visible]=\"visible\"\r\n [style.left.px]=\"left\"\r\n [style.top.px]=\"top\"\r\n >\r\n <fa-icon class=\"sds-tooltip-icon\"\r\n *ngIf=\"tooltipIcon\" \r\n [icon]=\"tooltipIcon\">\r\n </fa-icon>\r\n\r\n <small class=\"sds-tooltip-text\">\r\n {{ tooltip }}\r\n </small>\r\n\r\n</div>\r\n", styles: [".sds-tooltip{position:fixed;background-color:#000;border-radius:4px;color:#fff;padding:3px 6px;max-width:15rem;z-index:1070;opacity:0}.sds-tooltip fa-icon{margin-right:.25rem}.sds-tooltip:before{content:\"\";width:0;height:0;position:absolute}.sds-tooltip-visible{opacity:1;transition:opacity .3s}.sds-tooltip-light{background-color:#e9ecef;color:#000}.sds-tooltip-light:before{border:5px solid #E9ECEF}.sds-tooltip-dark{background-color:#000;color:#fff}.sds-tooltip-dark:before{border:5px solid black}.sds-tooltip-danger{background-color:#cc5252;color:#fff}.sds-tooltip-danger:before{border:5px solid #cc5252}.sds-tooltip-success{background-color:#29ba60;color:#fff}.sds-tooltip-success:before{border:5px solid #29ba60}.sds-tooltip-warning{background-color:#ffc107;color:#212529}.sds-tooltip-warning:before{border:5px solid #ffc107}.sds-tooltip-info{background-color:#56ace0;color:#fff}.sds-tooltip-info:before{border:5px solid #56ace0}.sds-tooltip-below{transform:translate(-50%);margin-top:.5rem}.sds-tooltip-below:before{border-left-color:transparent;border-right-color:transparent;border-top:none;left:calc(50% - 5px);top:-4px}.sds-tooltip-above{transform:translate(-50%,calc(-100% - .5rem));margin-bottom:.5rem}.sds-tooltip-above:before{border-left-color:transparent;border-right-color:transparent;border-bottom:none;left:calc(50% - 5px);bottom:-4px}.sds-tooltip-left{transform:translate(calc(-100% - .5rem),-50%)}.sds-tooltip-left:before{border-top-color:transparent;border-bottom-color:transparent;border-right:none;right:-4px;top:calc(50% - 5px)}.sds-tooltip-right{transform:translateY(-50%);margin-left:.5rem}.sds-tooltip-right:before{border-top-color:transparent;border-bottom-color:transparent;border-left:none;left:-4px;top:calc(50% - 5px)}.sds-tooltip-dynamic{margin-left:20px}.sds-tooltip-dynamic:before{display:none}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
19
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsTooltipComponent, decorators: [{
|
|
20
22
|
type: Component,
|
|
21
|
-
args: [{
|
|
23
|
+
args: [{ template: "<div class=\"sds-tooltip\"\r\n [ngClass]=\"['sds-tooltip-' + position, 'sds-tooltip-' + theme, tooltipClass]\"\r\n [class.sds-tooltip-visible]=\"visible\"\r\n [style.left.px]=\"left\"\r\n [style.top.px]=\"top\"\r\n >\r\n <fa-icon class=\"sds-tooltip-icon\"\r\n *ngIf=\"tooltipIcon\" \r\n [icon]=\"tooltipIcon\">\r\n </fa-icon>\r\n\r\n <small class=\"sds-tooltip-text\">\r\n {{ tooltip }}\r\n </small>\r\n\r\n</div>\r\n", styles: [".sds-tooltip{position:fixed;background-color:#000;border-radius:4px;color:#fff;padding:3px 6px;max-width:15rem;z-index:1070;opacity:0}.sds-tooltip fa-icon{margin-right:.25rem}.sds-tooltip:before{content:\"\";width:0;height:0;position:absolute}.sds-tooltip-visible{opacity:1;transition:opacity .3s}.sds-tooltip-light{background-color:#e9ecef;color:#000}.sds-tooltip-light:before{border:5px solid #E9ECEF}.sds-tooltip-dark{background-color:#000;color:#fff}.sds-tooltip-dark:before{border:5px solid black}.sds-tooltip-danger{background-color:#cc5252;color:#fff}.sds-tooltip-danger:before{border:5px solid #cc5252}.sds-tooltip-success{background-color:#29ba60;color:#fff}.sds-tooltip-success:before{border:5px solid #29ba60}.sds-tooltip-warning{background-color:#ffc107;color:#212529}.sds-tooltip-warning:before{border:5px solid #ffc107}.sds-tooltip-info{background-color:#56ace0;color:#fff}.sds-tooltip-info:before{border:5px solid #56ace0}.sds-tooltip-below{transform:translate(-50%);margin-top:.5rem}.sds-tooltip-below:before{border-left-color:transparent;border-right-color:transparent;border-top:none;left:calc(50% - 5px);top:-4px}.sds-tooltip-above{transform:translate(-50%,calc(-100% - .5rem));margin-bottom:.5rem}.sds-tooltip-above:before{border-left-color:transparent;border-right-color:transparent;border-bottom:none;left:calc(50% - 5px);bottom:-4px}.sds-tooltip-left{transform:translate(calc(-100% - .5rem),-50%)}.sds-tooltip-left:before{border-top-color:transparent;border-bottom-color:transparent;border-right:none;right:-4px;top:calc(50% - 5px)}.sds-tooltip-right{transform:translateY(-50%);margin-left:.5rem}.sds-tooltip-right:before{border-top-color:transparent;border-bottom-color:transparent;border-left:none;left:-4px;top:calc(50% - 5px)}.sds-tooltip-dynamic{margin-left:20px}.sds-tooltip-dynamic:before{display:none}\n"] }]
|
|
22
24
|
}], ctorParameters: function () { return []; } });
|
|
23
25
|
|
|
24
26
|
class TooltipDirective {
|
|
@@ -30,6 +32,7 @@ class TooltipDirective {
|
|
|
30
32
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
31
33
|
this.injector = injector;
|
|
32
34
|
this.tooltip = '';
|
|
35
|
+
this.tooltipClass = '';
|
|
33
36
|
this.position = 'above';
|
|
34
37
|
this.theme = 'dark';
|
|
35
38
|
this.showDelay = 0;
|
|
@@ -40,6 +43,23 @@ class TooltipDirective {
|
|
|
40
43
|
// this.setHideTooltipTimeout();
|
|
41
44
|
// });
|
|
42
45
|
}
|
|
46
|
+
ngOnChanges(changes) {
|
|
47
|
+
if (changes['tooltip']) {
|
|
48
|
+
if (this.componentRef !== null) {
|
|
49
|
+
this.componentRef.instance.tooltip = this.tooltip;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (changes['tooltipIcon']) {
|
|
53
|
+
if (this.componentRef !== null) {
|
|
54
|
+
this.componentRef.instance.tooltipIcon = this.tooltipIcon;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (changes['tooltipClass']) {
|
|
58
|
+
if (this.componentRef !== null) {
|
|
59
|
+
this.componentRef.instance.tooltipClass = this.tooltipClass;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
43
63
|
onMouseEnter() {
|
|
44
64
|
this.initializeTooltip();
|
|
45
65
|
}
|
|
@@ -62,6 +82,8 @@ class TooltipDirective {
|
|
|
62
82
|
this.componentRef.instance.left = $event.clientX;
|
|
63
83
|
this.componentRef.instance.top = $event.clientY;
|
|
64
84
|
this.componentRef.instance.tooltip = this.tooltip;
|
|
85
|
+
this.componentRef.instance.tooltipIcon = this.tooltipIcon;
|
|
86
|
+
this.componentRef.instance.tooltipClass = this.tooltipClass;
|
|
65
87
|
}
|
|
66
88
|
}
|
|
67
89
|
onTouchStart($event) {
|
|
@@ -90,6 +112,8 @@ class TooltipDirective {
|
|
|
90
112
|
setTooltipComponentProperties() {
|
|
91
113
|
if (this.componentRef !== null) {
|
|
92
114
|
this.componentRef.instance.tooltip = this.tooltip;
|
|
115
|
+
this.componentRef.instance.tooltipIcon = this.tooltipIcon;
|
|
116
|
+
this.componentRef.instance.tooltipClass = this.tooltipClass;
|
|
93
117
|
this.componentRef.instance.position = this.position;
|
|
94
118
|
this.componentRef.instance.theme = this.theme;
|
|
95
119
|
const { left, right, top, bottom } = this.elementRef.nativeElement.getBoundingClientRect();
|
|
@@ -142,7 +166,7 @@ class TooltipDirective {
|
|
|
142
166
|
}
|
|
143
167
|
}
|
|
144
168
|
TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.ApplicationRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
145
|
-
TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.1", type: TooltipDirective, selector: "[sdsTooltip]", inputs: { tooltip: "tooltip", position: "position", theme: "theme", showDelay: "showDelay", hideDelay: "hideDelay" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "mousemove": "onMouseMove($event)", "touchstart": "onTouchStart($event)", "touchend": "onTouchEnd()" } }, ngImport: i0 });
|
|
169
|
+
TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.1", type: TooltipDirective, selector: "[sdsTooltip]", inputs: { tooltip: "tooltip", tooltipClass: "tooltipClass", tooltipIcon: "tooltipIcon", position: "position", theme: "theme", showDelay: "showDelay", hideDelay: "hideDelay" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "mousemove": "onMouseMove($event)", "touchstart": "onTouchStart($event)", "touchend": "onTouchEnd()" } }, usesOnChanges: true, ngImport: i0 });
|
|
146
170
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
147
171
|
type: Directive,
|
|
148
172
|
args: [{
|
|
@@ -150,6 +174,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
150
174
|
}]
|
|
151
175
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }]; }, propDecorators: { tooltip: [{
|
|
152
176
|
type: Input
|
|
177
|
+
}], tooltipClass: [{
|
|
178
|
+
type: Input
|
|
179
|
+
}], tooltipIcon: [{
|
|
180
|
+
type: Input
|
|
153
181
|
}], position: [{
|
|
154
182
|
type: Input
|
|
155
183
|
}], theme: [{
|
|
@@ -179,9 +207,11 @@ class SdsTooltipModule {
|
|
|
179
207
|
}
|
|
180
208
|
SdsTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
181
209
|
SdsTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsTooltipModule, declarations: [SdsTooltipComponent,
|
|
182
|
-
TooltipDirective], imports: [CommonModule
|
|
210
|
+
TooltipDirective], imports: [CommonModule,
|
|
211
|
+
FontAwesomeModule], exports: [TooltipDirective] });
|
|
183
212
|
SdsTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsTooltipModule, imports: [[
|
|
184
|
-
CommonModule
|
|
213
|
+
CommonModule,
|
|
214
|
+
FontAwesomeModule
|
|
185
215
|
]] });
|
|
186
216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsTooltipModule, decorators: [{
|
|
187
217
|
type: NgModule,
|
|
@@ -191,7 +221,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
191
221
|
TooltipDirective
|
|
192
222
|
],
|
|
193
223
|
imports: [
|
|
194
|
-
CommonModule
|
|
224
|
+
CommonModule,
|
|
225
|
+
FontAwesomeModule
|
|
195
226
|
],
|
|
196
227
|
exports: [
|
|
197
228
|
TooltipDirective
|
|
@@ -1 +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\r\n if (this.tooltip) {\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\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.tooltip && 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,IAAA,QAAQ,MAAW;;gHAdV,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,O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,gBAAgB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,gBAAgB;AACjB,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
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\nimport { IconProp } from '@fortawesome/fontawesome-svg-core';\r\n\r\n@Component({\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 tooltipIcon?: IconProp;\r\n public tooltipClass?: string;\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, tooltipClass]\"\r\n [class.sds-tooltip-visible]=\"visible\"\r\n [style.left.px]=\"left\"\r\n [style.top.px]=\"top\"\r\n >\r\n <fa-icon class=\"sds-tooltip-icon\"\r\n *ngIf=\"tooltipIcon\" \r\n [icon]=\"tooltipIcon\">\r\n </fa-icon>\r\n\r\n <small class=\"sds-tooltip-text\">\r\n {{ tooltip }}\r\n </small>\r\n\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 OnChanges,\r\n Renderer2,\r\n SimpleChanges,\r\n ViewContainerRef,\r\n} from '@angular/core';\r\nimport { SdsTooltipComponent } from './components/tooltip.component';\r\nimport { TooltipPosition, TooltipTheme } from './tooltip.types';\r\nimport { IconProp } from '@fortawesome/fontawesome-svg-core';\r\n\r\n@Directive({\r\n selector: '[sdsTooltip]',\r\n})\r\nexport class TooltipDirective implements OnChanges {\r\n @Input() tooltip = '';\r\n @Input() tooltipClass = '';\r\n @Input() tooltipIcon?: IconProp;\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 ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['tooltip']) {\r\n if (this.componentRef !== null) {\r\n this.componentRef.instance.tooltip = this.tooltip;\r\n } \r\n }\r\n\r\n if (changes['tooltipIcon']) {\r\n if (this.componentRef !== null) {\r\n this.componentRef.instance.tooltipIcon = this.tooltipIcon;\r\n } \r\n } \r\n \r\n if (changes['tooltipClass']) {\r\n if (this.componentRef !== null) {\r\n this.componentRef.instance.tooltipClass = this.tooltipClass;\r\n } \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 this.componentRef.instance.tooltipIcon = this.tooltipIcon;\r\n this.componentRef.instance.tooltipClass = this.tooltipClass;\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\r\n if (this.tooltip) {\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\r\n private setTooltipComponentProperties() {\r\n if (this.componentRef !== null) {\r\n this.componentRef.instance.tooltip = this.tooltip;\r\n this.componentRef.instance.tooltipIcon = this.tooltipIcon;\r\n this.componentRef.instance.tooltipClass = this.tooltipClass;\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.tooltip && 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\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\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 FontAwesomeModule\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;AAe5B,IAAA,WAAA,GAAA;QAbO,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;QAKzB,IAAQ,CAAA,QAAA,GAAoB,OAAO,CAAC;QACpC,IAAK,CAAA,KAAA,GAAiB,MAAM,CAAC;KAIpB;AAEhB,IAAA,QAAQ,MAAW;;gHAjBV,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,oDCRhC,odAgBA,EAAA,MAAA,EAAA,CAAA,4yDAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,QAAA,EAAA,YAAA,EAAA,SAAA,EAAA,WAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,UAAA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ACP,gBAAgB;AACjB,qBAAA;AACF,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';
|
|
2
2
|
export * from '@spicainternational/ngx-sds-components/src/lib/avatar';
|
|
3
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/badge';
|
|
3
4
|
export * from '@spicainternational/ngx-sds-components/src/lib/callout';
|
|
4
5
|
export * from '@spicainternational/ngx-sds-components/src/lib/color-picker';
|
|
6
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/expansion-panel';
|
|
5
7
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-picker';
|
|
6
8
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';
|
|
7
9
|
export * from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';
|
|
@@ -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/duration-pipe';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/duration-box';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/layout';\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/page-header';\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":"
|
|
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/badge';\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/expansion-panel';\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/duration-pipe';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/duration-box';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/layout';\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/page-header';\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.
|
|
3
|
+
"version": "5.10.1",
|
|
4
4
|
"description": "Spica design system angular components.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": ">=13.3.0",
|
|
@@ -54,6 +54,14 @@
|
|
|
54
54
|
"node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-avatar.mjs",
|
|
55
55
|
"default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-avatar.mjs"
|
|
56
56
|
},
|
|
57
|
+
"./src/lib/badge": {
|
|
58
|
+
"types": "./src/lib/badge/spicainternational-ngx-sds-components-src-lib-badge.d.ts",
|
|
59
|
+
"esm2020": "./esm2020/src/lib/badge/spicainternational-ngx-sds-components-src-lib-badge.mjs",
|
|
60
|
+
"es2020": "./fesm2020/spicainternational-ngx-sds-components-src-lib-badge.mjs",
|
|
61
|
+
"es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-badge.mjs",
|
|
62
|
+
"node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-badge.mjs",
|
|
63
|
+
"default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-badge.mjs"
|
|
64
|
+
},
|
|
57
65
|
"./src/lib/callout": {
|
|
58
66
|
"types": "./src/lib/callout/spicainternational-ngx-sds-components-src-lib-callout.d.ts",
|
|
59
67
|
"esm2020": "./esm2020/src/lib/callout/spicainternational-ngx-sds-components-src-lib-callout.mjs",
|
package/public-api.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';
|
|
2
2
|
export * from '@spicainternational/ngx-sds-components/src/lib/avatar';
|
|
3
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/badge';
|
|
3
4
|
export * from '@spicainternational/ngx-sds-components/src/lib/callout';
|
|
4
5
|
export * from '@spicainternational/ngx-sds-components/src/lib/color-picker';
|
|
6
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/expansion-panel';
|
|
5
7
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-picker';
|
|
6
8
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';
|
|
7
9
|
export * from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AfterViewInit, ApplicationRef, ElementRef, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { BadgeSize, BadgeVariant } from './badge.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SdsBadgeDirective implements OnInit, OnChanges, OnDestroy, AfterViewInit {
|
|
5
|
+
private host;
|
|
6
|
+
private appRef;
|
|
7
|
+
private viewContainerRef;
|
|
8
|
+
sdsBadge: string;
|
|
9
|
+
size: BadgeSize;
|
|
10
|
+
variant: BadgeVariant;
|
|
11
|
+
private badgeComponentRef;
|
|
12
|
+
private observer;
|
|
13
|
+
constructor(host: ElementRef, appRef: ApplicationRef, viewContainerRef: ViewContainerRef);
|
|
14
|
+
ngAfterViewInit(): void;
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
17
|
+
ngOnDestroy(): void;
|
|
18
|
+
private initializeBadge;
|
|
19
|
+
private destroyBadgeComponentRef;
|
|
20
|
+
private setBadgePosition;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsBadgeDirective, never>;
|
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdsBadgeDirective, "[sdsBadge]", never, { "sdsBadge": "sdsBadge"; "size": "size"; "variant": "variant"; }, {}, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./badge.directive";
|
|
3
|
+
import * as i2 from "./components/badge.component";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
export declare class SdsBadgeModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsBadgeModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdsBadgeModule, [typeof i1.SdsBadgeDirective, typeof i2.SdsBadgeComponent], [typeof i3.CommonModule], [typeof i1.SdsBadgeDirective]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SdsBadgeModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnInit } from '@angular/core';
|
|
2
|
+
import { BadgeSize, BadgeVariant } from '../badge.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SdsBadgeComponent implements OnInit {
|
|
5
|
+
private readonly cdRef;
|
|
6
|
+
private _text;
|
|
7
|
+
private _size;
|
|
8
|
+
private _variant;
|
|
9
|
+
private _left;
|
|
10
|
+
get text(): string;
|
|
11
|
+
set text(value: string);
|
|
12
|
+
get size(): BadgeSize;
|
|
13
|
+
set size(value: BadgeSize);
|
|
14
|
+
get variant(): BadgeVariant;
|
|
15
|
+
set variant(value: BadgeVariant);
|
|
16
|
+
get left(): number;
|
|
17
|
+
set left(value: number);
|
|
18
|
+
constructor(cdRef: ChangeDetectorRef);
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
private refresh;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsBadgeComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsBadgeComponent, "sds-badge", never, {}, {}, never, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"module": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-badge.mjs",
|
|
3
|
+
"es2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-badge.mjs",
|
|
4
|
+
"esm2020": "../../../esm2020/src/lib/badge/spicainternational-ngx-sds-components-src-lib-badge.mjs",
|
|
5
|
+
"fesm2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-badge.mjs",
|
|
6
|
+
"fesm2015": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-badge.mjs",
|
|
7
|
+
"typings": "spicainternational-ngx-sds-components-src-lib-badge.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"name": "@spicainternational/ngx-sds-components/src/lib/badge"
|
|
10
|
+
}
|
|
@@ -5,6 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class SdsDatePickerComponent implements OnInit, OnChanges {
|
|
6
6
|
private changeRef;
|
|
7
7
|
private datePickerService;
|
|
8
|
+
displayContent: any;
|
|
8
9
|
selectionKind: 'period' | 'single';
|
|
9
10
|
dateRangeDefinitions: Array<PeriodPickerDateRangeDefinition>;
|
|
10
11
|
selectedDate: Date;
|
|
@@ -28,6 +29,12 @@ export declare class SdsDatePickerComponent implements OnInit, OnChanges {
|
|
|
28
29
|
dateRangeDefinitionsWidth: string;
|
|
29
30
|
showPreviousAndNextButtons: boolean;
|
|
30
31
|
width: string;
|
|
32
|
+
dropdownWrapperClass: string;
|
|
33
|
+
dropdownWrapperId: string;
|
|
34
|
+
getPreviousDateCallback: (currentDate: string | number | Date) => string | number | Date;
|
|
35
|
+
getNextDateCallback: (currentDate: string | number | Date) => string | number | Date;
|
|
36
|
+
getPreviousRangeCallback: (currentStartDate: string | number | Date, currentEndDate: string | number | Date) => [string | number | Date, string | number | Date];
|
|
37
|
+
getNextRangeCallback: (currentStartDate: string | number | Date, currentEndDate: string | number | Date) => [string | number | Date, string | number | Date];
|
|
31
38
|
previousPeriodIcon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
32
39
|
nextPeriodIcon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
33
40
|
calendarIcon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
@@ -80,7 +87,10 @@ export declare class SdsDatePickerComponent implements OnInit, OnChanges {
|
|
|
80
87
|
setSelectedDate(dateStart: string | number | Date, dateEnd: string | number | Date, emitChange?: boolean): void;
|
|
81
88
|
goToNextDate(): void;
|
|
82
89
|
goToPreviousDate(): void;
|
|
83
|
-
|
|
90
|
+
getNextDay(currentDate: string | number | Date): string | number | Date;
|
|
91
|
+
getPreviousDay(currentDate: string | number | Date): string | number | Date;
|
|
92
|
+
getNextRange(currentStartDate: string | number | Date, currentEndDate: string | number | Date): [string | number | Date, string | number | Date];
|
|
93
|
+
getPreviousRange(currentStartDate: string | number | Date, currentEndDate: string | number | Date): [string | number | Date, string | number | Date];
|
|
84
94
|
setNextPreviousRange(setNext: boolean): void;
|
|
85
95
|
getCellCssClass(date: any): string;
|
|
86
96
|
selectEndDate(event: any): void;
|
|
@@ -97,5 +107,5 @@ export declare class SdsDatePickerComponent implements OnInit, OnChanges {
|
|
|
97
107
|
private formatDate;
|
|
98
108
|
private generateDateRanges;
|
|
99
109
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsDatePickerComponent, never>;
|
|
100
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsDatePickerComponent, "sds-date-picker", never, { "selectionKind": "selectionKind"; "dateRangeDefinitions": "dateRangeDefinitions"; "selectedDate": "selectedDate"; "selectedDateStart": "selectedDateStart"; "selectedDateEnd": "selectedDateEnd"; "minDate": "minDate"; "maxDate": "maxDate"; "locales": "locales"; "disabled": "disabled"; "validationError": "validationError"; "isValid": "isValid"; "disabledDates": "disabledDates"; "applyText": "applyText"; "cancelText": "cancelText"; "translations": "translations"; "firstDayOfWeek": "firstDayOfWeek"; "dateRangeDefinitionsWidth": "dateRangeDefinitionsWidth"; "showPreviousAndNextButtons": "showPreviousAndNextButtons"; "width": "width"; }, { "selectedDateChange": "selectedDateChange"; "selectedDateStartChange": "selectedDateStartChange"; "selectedDateEndChange": "selectedDateEndChange"; "periodChange": "periodChange"; },
|
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsDatePickerComponent, "sds-date-picker", never, { "selectionKind": "selectionKind"; "dateRangeDefinitions": "dateRangeDefinitions"; "selectedDate": "selectedDate"; "selectedDateStart": "selectedDateStart"; "selectedDateEnd": "selectedDateEnd"; "minDate": "minDate"; "maxDate": "maxDate"; "locales": "locales"; "disabled": "disabled"; "validationError": "validationError"; "isValid": "isValid"; "disabledDates": "disabledDates"; "applyText": "applyText"; "cancelText": "cancelText"; "translations": "translations"; "firstDayOfWeek": "firstDayOfWeek"; "dateRangeDefinitionsWidth": "dateRangeDefinitionsWidth"; "showPreviousAndNextButtons": "showPreviousAndNextButtons"; "width": "width"; "dropdownWrapperClass": "dropdownWrapperClass"; "dropdownWrapperId": "dropdownWrapperId"; "getPreviousDateCallback": "getPreviousDateCallback"; "getNextDateCallback": "getNextDateCallback"; "getPreviousRangeCallback": "getPreviousRangeCallback"; "getNextRangeCallback": "getNextRangeCallback"; }, { "selectedDateChange": "selectedDateChange"; "selectedDateStartChange": "selectedDateStartChange"; "selectedDateEndChange": "selectedDateEndChange"; "periodChange": "periodChange"; }, ["displayContent"], ["display"]>;
|
|
101
111
|
}
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { IconDefinition } from '@fortawesome/pro-solid-svg-icons';
|
|
3
|
+
import { CaretPlacement } from './expansion-panel.types';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class
|
|
5
|
+
export declare class SdsExpansionPanelComponent {
|
|
5
6
|
headerText?: string;
|
|
6
7
|
hideHeader?: boolean;
|
|
7
8
|
headerId?: string;
|
|
9
|
+
animateCaret: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* toggles greyish background
|
|
12
|
+
*
|
|
13
|
+
* @memberof SdsExpansionPanelComponent
|
|
14
|
+
*/
|
|
15
|
+
showBackground: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* position caret next to header of on the far end of the component
|
|
18
|
+
*
|
|
19
|
+
* @type {('nextToHeader' | 'farEnd')}
|
|
20
|
+
* @memberof SdsExpansionPanelComponent
|
|
21
|
+
*/
|
|
22
|
+
caretPlacement: CaretPlacement;
|
|
8
23
|
/**
|
|
9
24
|
* 'descriptionText' - text displayed when component is "closed".
|
|
10
25
|
*
|
|
@@ -16,9 +31,9 @@ export declare class ExpansionPanelComponent {
|
|
|
16
31
|
descriptionText?: string;
|
|
17
32
|
isOpen: boolean;
|
|
18
33
|
isOpenChange: EventEmitter<boolean>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
34
|
+
caretIcon: IconDefinition;
|
|
35
|
+
onToggleIsOpenClick(event: MouseEvent): void;
|
|
36
|
+
openPanel(): void;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsExpansionPanelComponent, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsExpansionPanelComponent, "sds-expansion-panel", never, { "headerText": "headerText"; "hideHeader": "hideHeader"; "headerId": "headerId"; "animateCaret": "animateCaret"; "showBackground": "showBackground"; "caretPlacement": "caretPlacement"; "descriptionText": "descriptionText"; "isOpen": "isOpen"; }, { "isOpenChange": "isOpenChange"; }, never, ["[contentOnClosed]", "*"]>;
|
|
24
39
|
}
|
|
@@ -6,10 +6,10 @@ import * as i3 from "@fortawesome/angular-fontawesome";
|
|
|
6
6
|
* Expansion panel - provides an expandable details-summary view. Used for 'progressive disclosure'.
|
|
7
7
|
*
|
|
8
8
|
* @export
|
|
9
|
-
* @class
|
|
9
|
+
* @class SdsExpansionPanelModule
|
|
10
10
|
*/
|
|
11
|
-
export declare class
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
13
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<
|
|
14
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<
|
|
11
|
+
export declare class SdsExpansionPanelModule {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsExpansionPanelModule, never>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdsExpansionPanelModule, [typeof i1.SdsExpansionPanelComponent], [typeof i2.CommonModule, typeof i3.FontAwesomeModule], [typeof i1.SdsExpansionPanelComponent]>;
|
|
14
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SdsExpansionPanelModule>;
|
|
15
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type CaretPlacement = 'nextToHeader' | 'farEnd';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { ButtonType } from './dialog.types';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
declare type modalButton = 'primary' | 'secondary' | 'close';
|
|
4
5
|
export declare class SdsDialogComponent implements OnInit {
|
|
@@ -6,9 +7,11 @@ export declare class SdsDialogComponent implements OnInit {
|
|
|
6
7
|
closeText?: string;
|
|
7
8
|
size: 'sm' | 'md' | 'lg' | 'xl';
|
|
8
9
|
primaryButtonText: string;
|
|
9
|
-
secondaryButtonText: string;
|
|
10
10
|
primaryButtonClass: string;
|
|
11
|
+
primaryButtonType: ButtonType;
|
|
12
|
+
secondaryButtonText: string;
|
|
11
13
|
secondaryButtonClass: string;
|
|
14
|
+
secondaryButtonType: ButtonType;
|
|
12
15
|
showHeader: boolean;
|
|
13
16
|
showCloseButton: boolean;
|
|
14
17
|
showPrimaryButton: boolean;
|
|
@@ -28,6 +31,6 @@ export declare class SdsDialogComponent implements OnInit {
|
|
|
28
31
|
onModalClose(): void;
|
|
29
32
|
onModalOpen(): void;
|
|
30
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsDialogComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsDialogComponent, "sds-dialog", never, { "title": "title"; "closeText": "closeText"; "size": "size"; "primaryButtonText": "primaryButtonText"; "
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsDialogComponent, "sds-dialog", never, { "title": "title"; "closeText": "closeText"; "size": "size"; "primaryButtonText": "primaryButtonText"; "primaryButtonClass": "primaryButtonClass"; "primaryButtonType": "primaryButtonType"; "secondaryButtonText": "secondaryButtonText"; "secondaryButtonClass": "secondaryButtonClass"; "secondaryButtonType": "secondaryButtonType"; "showHeader": "showHeader"; "showCloseButton": "showCloseButton"; "showPrimaryButton": "showPrimaryButton"; "showSecondaryButton": "showSecondaryButton"; }, { "dialogOpen": "dialogOpen"; "dialogClose": "dialogClose"; }, never, ["*"]>;
|
|
32
35
|
}
|
|
33
36
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type ButtonType = 'button' | 'submit' | 'reset';
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { ElementRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SdsQuickInfoComponent implements OnChanges {
|
|
4
4
|
popoverMaxWidth: number | Function | string;
|
|
5
5
|
popoverMinWidth: number | Function | string;
|
|
6
6
|
popoverWidth: number | Function | string;
|
|
7
7
|
showDelay?: number;
|
|
8
|
+
showEventName: string;
|
|
8
9
|
hideDelay?: number;
|
|
10
|
+
hideEventName: string;
|
|
9
11
|
mode: 'default' | 'hint';
|
|
12
|
+
hide: EventEmitter<any>;
|
|
13
|
+
show: EventEmitter<any>;
|
|
14
|
+
private _popover;
|
|
10
15
|
buttonElementRef?: ElementRef;
|
|
11
16
|
customContent: ElementRef;
|
|
12
17
|
hideEvent: string | {
|
|
@@ -20,8 +25,12 @@ export declare class SdsQuickInfoComponent implements OnChanges {
|
|
|
20
25
|
constructor();
|
|
21
26
|
ngOnChanges(changes: SimpleChanges): void;
|
|
22
27
|
onHiding(e: any): void;
|
|
28
|
+
onHidden(): void;
|
|
29
|
+
onShown(): void;
|
|
30
|
+
showInfo(): void;
|
|
31
|
+
hideInfo(): void;
|
|
23
32
|
private setShowEvent;
|
|
24
33
|
private setHideEvent;
|
|
25
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsQuickInfoComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsQuickInfoComponent, "sds-quick-info", never, { "popoverMaxWidth": "popoverMaxWidth"; "popoverMinWidth": "popoverMinWidth"; "popoverWidth": "popoverWidth"; "showDelay": "showDelay"; "hideDelay": "hideDelay"; "mode": "mode"; }, {}, ["customContent"], ["customContent", "*"]>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsQuickInfoComponent, "sds-quick-info", never, { "popoverMaxWidth": "popoverMaxWidth"; "popoverMinWidth": "popoverMinWidth"; "popoverWidth": "popoverWidth"; "showDelay": "showDelay"; "showEventName": "showEventName"; "hideDelay": "hideDelay"; "hideEventName": "hideEventName"; "mode": "mode"; }, { "hide": "hide"; "show": "show"; }, ["customContent"], ["customContent", "*"]>;
|
|
27
36
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class SdsSideBarComponent implements OnInit {
|
|
4
5
|
showSideBar: boolean;
|
|
5
6
|
product: string;
|
|
6
7
|
isMainSideBar: boolean;
|
|
7
8
|
showSideBarToggleButton: boolean;
|
|
9
|
+
hideSideBarText?: string;
|
|
10
|
+
showSideBarText?: string;
|
|
11
|
+
caretIcon: IconDefinition;
|
|
8
12
|
constructor();
|
|
9
13
|
ngOnInit(): void;
|
|
10
14
|
toggleSideBar(state?: boolean): void;
|
|
11
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsSideBarComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsSideBarComponent, "sds-side-bar", never, { "product": "product"; "isMainSideBar": "isMainSideBar"; "showSideBarToggleButton": "showSideBarToggleButton"; }, {}, never, ["*"]>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsSideBarComponent, "sds-side-bar", never, { "product": "product"; "isMainSideBar": "isMainSideBar"; "showSideBarToggleButton": "showSideBarToggleButton"; "hideSideBarText": "hideSideBarText"; "showSideBarText": "showSideBarText"; }, {}, never, ["*"]>;
|
|
13
17
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./side-bar.component";
|
|
3
3
|
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@fortawesome/angular-fontawesome";
|
|
4
5
|
export declare class SdsSideBarModule {
|
|
5
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsSideBarModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SdsSideBarModule, [typeof i1.SdsSideBarComponent], [typeof i2.CommonModule], [typeof i1.SdsSideBarComponent]>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdsSideBarModule, [typeof i1.SdsSideBarComponent], [typeof i2.CommonModule, typeof i3.FontAwesomeModule], [typeof i1.SdsSideBarComponent]>;
|
|
7
8
|
static ɵinj: i0.ɵɵInjectorDeclaration<SdsSideBarModule>;
|
|
8
9
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { TooltipPosition, TooltipTheme } from '../tooltip.types';
|
|
3
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class SdsTooltipComponent implements OnInit {
|
|
5
6
|
tooltip: string;
|
|
6
7
|
left: number;
|
|
7
8
|
top: number;
|
|
8
9
|
visible: boolean;
|
|
10
|
+
tooltipIcon?: IconProp;
|
|
11
|
+
tooltipClass?: string;
|
|
9
12
|
position: TooltipPosition;
|
|
10
13
|
theme: TooltipTheme;
|
|
11
14
|
constructor();
|
|
12
15
|
ngOnInit(): void;
|
|
13
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsTooltipComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsTooltipComponent, "
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsTooltipComponent, "ng-component", never, {}, {}, never, never>;
|
|
15
18
|
}
|