@progressio_resources/gravity-design-system 3.6.19 → 3.7.0
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/esm2022/lib/components/gravity-tooltip-container/gravity-tooltip-container.component.mjs +44 -0
- package/esm2022/lib/gravity-design-system.module.mjs +8 -3
- package/esm2022/lib/layout/gravity-menu/gravity-menu.component.mjs +28 -5
- package/esm2022/lib/vendor/gravity-tooltip/gravity-tooltip.component.mjs +11 -9
- package/esm2022/lib/vendor/gravity-tooltip/gravity-tooltip.directive.mjs +22 -6
- package/esm2022/lib/vendor/gravity-tooltip/options.interface.mjs +1 -1
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/progressio_resources-gravity-design-system.mjs +101 -20
- package/fesm2022/progressio_resources-gravity-design-system.mjs.map +1 -1
- package/lib/components/gravity-tooltip-container/gravity-tooltip-container.component.d.ts +40 -0
- package/lib/gravity-design-system.module.d.ts +10 -9
- package/lib/layout/gravity-menu/gravity-menu.component.d.ts +7 -4
- package/lib/vendor/gravity-tooltip/gravity-tooltip.component.d.ts +2 -1
- package/lib/vendor/gravity-tooltip/gravity-tooltip.directive.d.ts +3 -1
- package/lib/vendor/gravity-tooltip/options.interface.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.html +1 -0
- package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.sass +12 -14
- package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.ts +7 -7
- package/src/lib/vendor/gravity-tooltip/gravity-tooltip.directive.ts +21 -4
- package/src/lib/vendor/gravity-tooltip/options.interface.ts +1 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class GravityTooltipContainerComponent {
|
|
4
|
+
cypressTag: string;
|
|
5
|
+
tooltipBanner?: any | [
|
|
6
|
+
{
|
|
7
|
+
imageUrl?: string;
|
|
8
|
+
actionContent?: {
|
|
9
|
+
text: string;
|
|
10
|
+
icon: string;
|
|
11
|
+
status: 'positive' | 'positive-secondary' | 'negative' | 'negative-secondary' | 'attention' | 'neutro' | 'disabled';
|
|
12
|
+
};
|
|
13
|
+
header?: {
|
|
14
|
+
icon: string;
|
|
15
|
+
title: string;
|
|
16
|
+
subtitle: string;
|
|
17
|
+
};
|
|
18
|
+
body?: string;
|
|
19
|
+
button?: {
|
|
20
|
+
text: string;
|
|
21
|
+
icon: string;
|
|
22
|
+
iconPosition: 'left' | 'right';
|
|
23
|
+
type: 'primary' | 'secondary' | 'tertiary' | 'positive' | 'negative';
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
tooltipSimple?: {
|
|
28
|
+
title?: string;
|
|
29
|
+
text?: string;
|
|
30
|
+
};
|
|
31
|
+
closeBanner: EventEmitter<void>;
|
|
32
|
+
actionButton: EventEmitter<void>;
|
|
33
|
+
currentPage: number;
|
|
34
|
+
get currentBanner(): any;
|
|
35
|
+
changePage(event: any): void;
|
|
36
|
+
closeBannerTooltip(): void;
|
|
37
|
+
actionButtonClicked(): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GravityTooltipContainerComponent, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GravityTooltipContainerComponent, "gravity-tooltip-container", never, { "cypressTag": { "alias": "cypressTag"; "required": false; }; "tooltipBanner": { "alias": "tooltipBanner"; "required": false; }; "tooltipSimple": { "alias": "tooltipSimple"; "required": false; }; }, { "closeBanner": "closeBanner"; "actionButton": "actionButton"; }, never, never, false, never>;
|
|
40
|
+
}
|
|
@@ -66,16 +66,17 @@ import * as i64 from "./layout/gravity-header/gravity-header.component";
|
|
|
66
66
|
import * as i65 from "./components/gravity-pagination/gravity-pagination.component";
|
|
67
67
|
import * as i66 from "./components/gravity-push-notifications/gravity-push-notifications.component";
|
|
68
68
|
import * as i67 from "./layout/gravity-menu/gravity-menu.component";
|
|
69
|
-
import * as i68 from "
|
|
70
|
-
import * as i69 from "angular-svg-icon
|
|
71
|
-
import * as i70 from "
|
|
72
|
-
import * as i71 from "
|
|
73
|
-
import * as i72 from "@angular/
|
|
74
|
-
import * as i73 from "
|
|
75
|
-
import * as i74 from "
|
|
76
|
-
import * as i75 from "@
|
|
69
|
+
import * as i68 from "./components/gravity-tooltip-container/gravity-tooltip-container.component";
|
|
70
|
+
import * as i69 from "angular-svg-icon";
|
|
71
|
+
import * as i70 from "angular-svg-icon-preloader";
|
|
72
|
+
import * as i71 from "ngx-bootstrap/datepicker";
|
|
73
|
+
import * as i72 from "@angular/common";
|
|
74
|
+
import * as i73 from "@angular/forms";
|
|
75
|
+
import * as i74 from "./vendor/gravity-tooltip/gravity-tooltip.module";
|
|
76
|
+
import * as i75 from "@ng-bootstrap/ng-bootstrap";
|
|
77
|
+
import * as i76 from "@angular/router";
|
|
77
78
|
export declare class GravityDesignSystemModule {
|
|
78
79
|
static ɵfac: i0.ɵɵFactoryDeclaration<GravityDesignSystemModule, never>;
|
|
79
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<GravityDesignSystemModule, [typeof i1.GravityAttachFileComponent, typeof i2.GravityAvatarStackComponent, typeof i3.GravityGenericAvatarComponent, typeof i4.GravityButtonComponent, typeof i5.GravityCalendarV2Component, typeof i6.GravityCheckboxComponent, typeof i7.GravityCurrencyComponent, typeof i8.GravityDataViewsV2Component, typeof i9.GravityDialogComponent, typeof i10.GravityDetailContainerComponent, typeof i11.GravityDropdownListComponent, typeof i12.GravityDropdownListDisplayComponent, typeof i13.GravityIconButtonComponent, typeof i14.GravityIconComponent, typeof i15.GravityMultiLanguageComponent, typeof i16.GravityNetworkPillComponent, typeof i17.GravityNotificationComponent, typeof i18.GravityNotificationInstantContainerComponent, typeof i19.GravityRadioButtonComponent, typeof i20.GravityStatusIndicatorComponent, typeof i21.GravityStepperComponent, typeof i22.GravitySwitchComponent, typeof i23.GravityTableComponent, typeof i24.GravityTablesV2Component, typeof i25.GravityTextFieldComponent, typeof i26.GravityTextFieldNumberOnlyComponent, typeof i27.GravityTreeViewComponent, typeof i28.NodeComponent, typeof i29.NodeToggleComponent, typeof i30.NodeCheckboxComponent, typeof i31.NodeNameComponent, typeof i32.FilterByPipe, typeof i33.DateAbbreviationPipe, typeof i34.BsDatepickerDayDecoratorComponent, typeof i35.BsDatepickerNavigationViewComponent, typeof i36.BsDaysCalendarViewComponent, typeof i37.BsMonthCalendarViewComponent, typeof i38.BsYearsCalendarViewComponent, typeof i39.BsDatepickerContainerComponent, typeof i40.BsDatepickerDirective, typeof i41.BsDatepickerInlineContainerComponent, typeof i42.BsDatepickerInlineDirective, typeof i43.BsDaterangepickerContainerComponent, typeof i44.BsDaterangepickerDirective, typeof i45.BsDaterangepickerInlineContainerComponent, typeof i46.BsDaterangepickerInlineDirective, typeof i47.GravityModalComponent, typeof i48.GravityLinkComponent, typeof i49.GravityTabPrimaryComponent, typeof i50.GravityTabSecondaryComponent, typeof i51.GravityChipGroupComponent, typeof i52.GravityEditableInputComponent, typeof i53.GravityCardButtonComponent, typeof i54.GravityDropdownLabelComponent, typeof i55.GravityNavigationCardComponent, typeof i56.GravityGenericAvatarSecondaryComponent, typeof i57.GravityBackdropComponent, typeof i58.GravityDatePickerComponent, typeof i59.DayCalendarComponent, typeof i60.MonthCalendarComponent, typeof i61.YearCalendarComponent, typeof i62.GravitySegmentedButtonComponent, typeof i63.GravityCurrencyDisplayV2Component, typeof i64.GravityHeaderComponent, typeof i65.GravityPaginationComponent, typeof i66.GravityPushNotificationsComponent, typeof i67.GravityMenuComponent], [typeof
|
|
80
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<GravityDesignSystemModule, [typeof i1.GravityAttachFileComponent, typeof i2.GravityAvatarStackComponent, typeof i3.GravityGenericAvatarComponent, typeof i4.GravityButtonComponent, typeof i5.GravityCalendarV2Component, typeof i6.GravityCheckboxComponent, typeof i7.GravityCurrencyComponent, typeof i8.GravityDataViewsV2Component, typeof i9.GravityDialogComponent, typeof i10.GravityDetailContainerComponent, typeof i11.GravityDropdownListComponent, typeof i12.GravityDropdownListDisplayComponent, typeof i13.GravityIconButtonComponent, typeof i14.GravityIconComponent, typeof i15.GravityMultiLanguageComponent, typeof i16.GravityNetworkPillComponent, typeof i17.GravityNotificationComponent, typeof i18.GravityNotificationInstantContainerComponent, typeof i19.GravityRadioButtonComponent, typeof i20.GravityStatusIndicatorComponent, typeof i21.GravityStepperComponent, typeof i22.GravitySwitchComponent, typeof i23.GravityTableComponent, typeof i24.GravityTablesV2Component, typeof i25.GravityTextFieldComponent, typeof i26.GravityTextFieldNumberOnlyComponent, typeof i27.GravityTreeViewComponent, typeof i28.NodeComponent, typeof i29.NodeToggleComponent, typeof i30.NodeCheckboxComponent, typeof i31.NodeNameComponent, typeof i32.FilterByPipe, typeof i33.DateAbbreviationPipe, typeof i34.BsDatepickerDayDecoratorComponent, typeof i35.BsDatepickerNavigationViewComponent, typeof i36.BsDaysCalendarViewComponent, typeof i37.BsMonthCalendarViewComponent, typeof i38.BsYearsCalendarViewComponent, typeof i39.BsDatepickerContainerComponent, typeof i40.BsDatepickerDirective, typeof i41.BsDatepickerInlineContainerComponent, typeof i42.BsDatepickerInlineDirective, typeof i43.BsDaterangepickerContainerComponent, typeof i44.BsDaterangepickerDirective, typeof i45.BsDaterangepickerInlineContainerComponent, typeof i46.BsDaterangepickerInlineDirective, typeof i47.GravityModalComponent, typeof i48.GravityLinkComponent, typeof i49.GravityTabPrimaryComponent, typeof i50.GravityTabSecondaryComponent, typeof i51.GravityChipGroupComponent, typeof i52.GravityEditableInputComponent, typeof i53.GravityCardButtonComponent, typeof i54.GravityDropdownLabelComponent, typeof i55.GravityNavigationCardComponent, typeof i56.GravityGenericAvatarSecondaryComponent, typeof i57.GravityBackdropComponent, typeof i58.GravityDatePickerComponent, typeof i59.DayCalendarComponent, typeof i60.MonthCalendarComponent, typeof i61.YearCalendarComponent, typeof i62.GravitySegmentedButtonComponent, typeof i63.GravityCurrencyDisplayV2Component, typeof i64.GravityHeaderComponent, typeof i65.GravityPaginationComponent, typeof i66.GravityPushNotificationsComponent, typeof i67.GravityMenuComponent, typeof i68.GravityTooltipContainerComponent], [typeof i69.AngularSvgIconModule, typeof i70.AngularSvgIconPreloaderModule, typeof i71.BsDatepickerModule, typeof i72.CommonModule, typeof i73.FormsModule, typeof i74.GravityTooltipModule, typeof i75.NgbDatepickerModule, typeof i75.NgbOffcanvasModule, typeof i75.NgbProgressbarModule, typeof i75.NgbToastModule, typeof i73.ReactiveFormsModule, typeof i76.RouterLink], [typeof i1.GravityAttachFileComponent, typeof i2.GravityAvatarStackComponent, typeof i3.GravityGenericAvatarComponent, typeof i4.GravityButtonComponent, typeof i5.GravityCalendarV2Component, typeof i6.GravityCheckboxComponent, typeof i7.GravityCurrencyComponent, typeof i63.GravityCurrencyDisplayV2Component, typeof i8.GravityDataViewsV2Component, typeof i9.GravityDialogComponent, typeof i10.GravityDetailContainerComponent, typeof i11.GravityDropdownListComponent, typeof i12.GravityDropdownListDisplayComponent, typeof i13.GravityIconButtonComponent, typeof i14.GravityIconComponent, typeof i15.GravityMultiLanguageComponent, typeof i16.GravityNetworkPillComponent, typeof i18.GravityNotificationInstantContainerComponent, typeof i19.GravityRadioButtonComponent, typeof i20.GravityStatusIndicatorComponent, typeof i21.GravityStepperComponent, typeof i22.GravitySwitchComponent, typeof i23.GravityTableComponent, typeof i24.GravityTablesV2Component, typeof i25.GravityTextFieldComponent, typeof i26.GravityTextFieldNumberOnlyComponent, typeof i74.GravityTooltipModule, typeof i27.GravityTreeViewComponent, typeof i47.GravityModalComponent, typeof i48.GravityLinkComponent, typeof i49.GravityTabPrimaryComponent, typeof i50.GravityTabSecondaryComponent, typeof i51.GravityChipGroupComponent, typeof i52.GravityEditableInputComponent, typeof i53.GravityCardButtonComponent, typeof i55.GravityNavigationCardComponent, typeof i56.GravityGenericAvatarSecondaryComponent, typeof i57.GravityBackdropComponent, typeof i58.GravityDatePickerComponent, typeof i62.GravitySegmentedButtonComponent, typeof i64.GravityHeaderComponent, typeof i65.GravityPaginationComponent, typeof i66.GravityPushNotificationsComponent, typeof i67.GravityMenuComponent, typeof i68.GravityTooltipContainerComponent]>;
|
|
80
81
|
static ɵinj: i0.ɵɵInjectorDeclaration<GravityDesignSystemModule>;
|
|
81
82
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
1
|
import { MenuHeader, MenuOption, SecondaryActions, UserInfo } from "../../model/gravity-menu-items.model";
|
|
2
|
+
import { ElementRef, EventEmitter, AfterViewInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class GravityMenuComponent implements AfterViewInit, OnDestroy {
|
|
4
|
+
export declare class GravityMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
5
5
|
logoUrl: string;
|
|
6
6
|
items: MenuHeader[];
|
|
7
7
|
userInfo: UserInfo[];
|
|
@@ -9,6 +9,7 @@ export declare class GravityMenuComponent implements AfterViewInit, OnDestroy {
|
|
|
9
9
|
showCloseButton: boolean;
|
|
10
10
|
cardButtons: SecondaryActions[];
|
|
11
11
|
maxCardButtonsPerRow: number;
|
|
12
|
+
currentLink: string | null;
|
|
12
13
|
secondaryActions: SecondaryActions[];
|
|
13
14
|
size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
15
|
mainFooterAction: {
|
|
@@ -17,18 +18,20 @@ export declare class GravityMenuComponent implements AfterViewInit, OnDestroy {
|
|
|
17
18
|
callback?: () => void;
|
|
18
19
|
} | null;
|
|
19
20
|
close: EventEmitter<any>;
|
|
20
|
-
selected: EventEmitter<
|
|
21
|
+
selected: EventEmitter<string>;
|
|
21
22
|
menuBody: ElementRef<HTMLDivElement>;
|
|
22
23
|
closing: boolean;
|
|
23
24
|
selectedOption: MenuOption;
|
|
24
25
|
private resizeObserver;
|
|
26
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
25
27
|
ngAfterViewInit(): void;
|
|
26
28
|
ngOnDestroy(): void;
|
|
29
|
+
private preselectOptionByLink;
|
|
27
30
|
selectOption(option: MenuOption): void;
|
|
28
31
|
closeMenu(): void;
|
|
29
32
|
toggleMenuHeader(header: MenuHeader): void;
|
|
30
33
|
private updateOverflow;
|
|
31
34
|
getCardButtonsRows(): any[][];
|
|
32
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<GravityMenuComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GravityMenuComponent, "gravity-menu", never, { "logoUrl": { "alias": "logoUrl"; "required": false; }; "items": { "alias": "items"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "cardButtons": { "alias": "cardButtons"; "required": false; }; "maxCardButtonsPerRow": { "alias": "maxCardButtonsPerRow"; "required": false; }; "secondaryActions": { "alias": "secondaryActions"; "required": false; }; "size": { "alias": "size"; "required": false; }; "mainFooterAction": { "alias": "mainFooterAction"; "required": false; }; }, { "close": "close"; "selected": "selected"; }, never, never, false, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GravityMenuComponent, "gravity-menu", never, { "logoUrl": { "alias": "logoUrl"; "required": false; }; "items": { "alias": "items"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "cardButtons": { "alias": "cardButtons"; "required": false; }; "maxCardButtonsPerRow": { "alias": "maxCardButtonsPerRow"; "required": false; }; "currentLink": { "alias": "currentLink"; "required": false; }; "secondaryActions": { "alias": "secondaryActions"; "required": false; }; "size": { "alias": "size"; "required": false; }; "mainFooterAction": { "alias": "mainFooterAction"; "required": false; }; }, { "close": "close"; "selected": "selected"; }, never, never, false, never>;
|
|
34
37
|
}
|
|
@@ -16,6 +16,7 @@ export declare class GravityTooltipComponent implements OnInit {
|
|
|
16
16
|
hostClassShow: boolean;
|
|
17
17
|
hostClassShadow: boolean;
|
|
18
18
|
hostClassLight: boolean;
|
|
19
|
+
hostClassNoPointer: boolean;
|
|
19
20
|
transitionEnd(): void;
|
|
20
21
|
set show(value: boolean);
|
|
21
22
|
get show(): boolean;
|
|
@@ -33,10 +34,10 @@ export declare class GravityTooltipComponent implements OnInit {
|
|
|
33
34
|
setPlacementClass(placement: string): void;
|
|
34
35
|
setHostStyle(placement: string, disableAutoPlacement?: boolean): boolean;
|
|
35
36
|
setZIndex(): void;
|
|
36
|
-
setPointerEvents(): void;
|
|
37
37
|
setCustomClass(): void;
|
|
38
38
|
setAnimationDuration(): void;
|
|
39
39
|
setStyles(): void;
|
|
40
|
+
closeTooltip(): void;
|
|
40
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<GravityTooltipComponent, never>;
|
|
41
42
|
static ɵcmp: i0.ɵɵComponentDeclaration<GravityTooltipComponent, "tooltip", never, { "data": { "alias": "data"; "required": false; }; "show": { "alias": "show"; "required": false; }; }, {}, never, never, false, never>;
|
|
42
43
|
}
|
|
@@ -59,6 +59,7 @@ export declare class GravityTooltipDirective implements OnChanges {
|
|
|
59
59
|
theme: "dark" | "light";
|
|
60
60
|
offset: number;
|
|
61
61
|
width: string;
|
|
62
|
+
persistent: boolean;
|
|
62
63
|
set maxWidthBackwardCompatibility(value: string);
|
|
63
64
|
set maxWidth(value: string);
|
|
64
65
|
get maxWidth(): string;
|
|
@@ -106,6 +107,7 @@ export declare class GravityTooltipDirective implements OnChanges {
|
|
|
106
107
|
handleEvents(event: any): void;
|
|
107
108
|
show(): void;
|
|
108
109
|
hide(): void;
|
|
110
|
+
closeFromOutside(): void;
|
|
109
111
|
static ɵfac: i0.ɵɵFactoryDeclaration<GravityTooltipDirective, [{ optional: true; }, null, null, null, null]>;
|
|
110
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<GravityTooltipDirective, "[tooltip]", ["tooltip"], { "options": { "alias": "options"; "required": false; }; "tooltipValue": { "alias": "tooltip"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "autoPlacement": { "alias": "autoPlacement"; "required": false; }; "contentTypeBackwardCompatibility": { "alias": "content-type"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "hideDelayMobile": { "alias": "hide-delay-mobile"; "required": false; }; "hideDelayTouchscreen": { "alias": "hideDelayTouchscreen"; "required": false; }; "zIndexBackwardCompatibility": { "alias": "z-index"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "animationDurationBackwardCompatibility": { "alias": "animation-duration"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "trigger": { "alias": "trigger"; "required": false; }; "tooltipClassBackwardCompatibility": { "alias": "tooltip-class"; "required": false; }; "tooltipClass": { "alias": "tooltipClass"; "required": false; }; "display": { "alias": "display"; "required": false; }; "displayMobile": { "alias": "display-mobile"; "required": false; }; "displayTouchscreen": { "alias": "displayTouchscreen"; "required": false; }; "shadow": { "alias": "shadow"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "width": { "alias": "width"; "required": false; }; "maxWidthBackwardCompatibility": { "alias": "max-width"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "id": { "alias": "id"; "required": false; }; "showDelayBackwardCompatibility": { "alias": "show-delay"; "required": false; }; "showDelay": { "alias": "showDelay"; "required": false; }; "hideDelayBackwardCompatibility": { "alias": "hide-delay"; "required": false; }; "hideDelay": { "alias": "hideDelay"; "required": false; }; "hideDelayAfterClick": { "alias": "hideDelayAfterClick"; "required": false; }; "pointerEvents": { "alias": "pointerEvents"; "required": false; }; "position": { "alias": "position"; "required": false; }; }, { "events": "events"; }, never, never, false, never>;
|
|
112
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<GravityTooltipDirective, "[tooltip]", ["tooltip"], { "options": { "alias": "options"; "required": false; }; "tooltipValue": { "alias": "tooltip"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "autoPlacement": { "alias": "autoPlacement"; "required": false; }; "contentTypeBackwardCompatibility": { "alias": "content-type"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "hideDelayMobile": { "alias": "hide-delay-mobile"; "required": false; }; "hideDelayTouchscreen": { "alias": "hideDelayTouchscreen"; "required": false; }; "zIndexBackwardCompatibility": { "alias": "z-index"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "animationDurationBackwardCompatibility": { "alias": "animation-duration"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "trigger": { "alias": "trigger"; "required": false; }; "tooltipClassBackwardCompatibility": { "alias": "tooltip-class"; "required": false; }; "tooltipClass": { "alias": "tooltipClass"; "required": false; }; "display": { "alias": "display"; "required": false; }; "displayMobile": { "alias": "display-mobile"; "required": false; }; "displayTouchscreen": { "alias": "displayTouchscreen"; "required": false; }; "shadow": { "alias": "shadow"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "width": { "alias": "width"; "required": false; }; "persistent": { "alias": "persistent"; "required": false; }; "maxWidthBackwardCompatibility": { "alias": "max-width"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "id": { "alias": "id"; "required": false; }; "showDelayBackwardCompatibility": { "alias": "show-delay"; "required": false; }; "showDelay": { "alias": "showDelay"; "required": false; }; "hideDelayBackwardCompatibility": { "alias": "hide-delay"; "required": false; }; "hideDelay": { "alias": "hideDelay"; "required": false; }; "hideDelayAfterClick": { "alias": "hideDelayAfterClick"; "required": false; }; "pointerEvents": { "alias": "pointerEvents"; "required": false; }; "position": { "alias": "position"; "required": false; }; }, { "events": "events"; }, never, never, false, never>;
|
|
111
113
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export * from './lib/components/gravity-backdrop/gravity-backdrop.component';
|
|
|
41
41
|
export * from './lib/components/gravity-segmented-button/gravity-segmented-button.component';
|
|
42
42
|
export * from './lib/components/gravity-push-notifications/gravity-push-notifications.component';
|
|
43
43
|
export * from './lib/components/gravity-pagination/gravity-pagination.component';
|
|
44
|
+
export * from './lib/components/gravity-tooltip-container/gravity-tooltip-container.component';
|
|
44
45
|
export * from './lib/layout/gravity-header/gravity-header.component';
|
|
45
46
|
export * from './lib/layout/gravity-menu/gravity-menu.component';
|
|
46
47
|
export * from './lib/services/gravity-dialog-manager.service';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<div *ngIf="isThemeLight" class="tooltip-arrow"></div>
|
|
2
2
|
|
|
3
|
+
<!--Si el contentType es template, se usa el ngTemplate sino usa el htmlOrStringTemplate-->
|
|
3
4
|
<div *ngIf="options['contentType'] === 'template' else htmlOrStringTemplate">
|
|
4
5
|
<ng-container *ngTemplateOutlet="value"></ng-container>
|
|
5
6
|
</div>
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
\:host
|
|
2
|
-
max-width: 200px
|
|
3
|
-
background-color: var(--bg-tooltip-primary)
|
|
4
|
-
color: var(--on-bg-tooltip-primary)
|
|
5
|
-
text-align: center
|
|
6
|
-
border-radius: 6px
|
|
7
|
-
padding: 5px 8px
|
|
8
2
|
position: absolute
|
|
9
|
-
pointer-events: none
|
|
10
3
|
z-index: 1000
|
|
11
4
|
display: block
|
|
12
5
|
opacity: 0
|
|
@@ -16,16 +9,21 @@
|
|
|
16
9
|
transition: opacity 300ms
|
|
17
10
|
top: 0
|
|
18
11
|
left: 0
|
|
12
|
+
border-radius: 5px
|
|
19
13
|
|
|
20
14
|
\:host.tooltip-show
|
|
21
15
|
opacity: 1
|
|
22
16
|
|
|
23
17
|
\:host.tooltip-shadow
|
|
24
|
-
box-shadow: 0
|
|
18
|
+
box-shadow: 0 4px 10px 0 rgba(21, 28, 41, 0.22)
|
|
25
19
|
|
|
26
20
|
\:host.tooltip-light.tooltip-shadow
|
|
27
|
-
box-shadow: 0
|
|
21
|
+
box-shadow: 0 4px 10px 0 rgba(21, 28, 41, 0.22)
|
|
22
|
+
|
|
23
|
+
\:host.tooltip-no-pointer
|
|
24
|
+
pointer-events: none
|
|
28
25
|
|
|
26
|
+
//Caret
|
|
29
27
|
\:host.tooltip::after
|
|
30
28
|
content: ""
|
|
31
29
|
position: absolute
|
|
@@ -81,11 +79,11 @@
|
|
|
81
79
|
border-color: transparent transparent transparent var(--bg-tooltip-primary)
|
|
82
80
|
|
|
83
81
|
\:host.tooltip-left-top::after
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
top: 10%
|
|
83
|
+
left: 100%
|
|
84
|
+
margin-top: -5px
|
|
85
|
+
border-width: 5px
|
|
86
|
+
border-color: transparent transparent transparent var(--bg-tooltip-primary)
|
|
89
87
|
|
|
90
88
|
\:host.tooltip-left-bottom::after
|
|
91
89
|
top: 90%
|
|
@@ -23,6 +23,7 @@ export class GravityTooltipComponent implements OnInit {
|
|
|
23
23
|
@HostBinding('class.tooltip-show') hostClassShow!: boolean;
|
|
24
24
|
@HostBinding('class.tooltip-shadow') hostClassShadow!: boolean;
|
|
25
25
|
@HostBinding('class.tooltip-light') hostClassLight!: boolean;
|
|
26
|
+
@HostBinding('class.tooltip-no-pointer') hostClassNoPointer!: boolean;
|
|
26
27
|
|
|
27
28
|
@HostListener('transitionend', ['$event'])
|
|
28
29
|
transitionEnd() {
|
|
@@ -211,12 +212,6 @@ export class GravityTooltipComponent implements OnInit {
|
|
|
211
212
|
}
|
|
212
213
|
}
|
|
213
214
|
|
|
214
|
-
setPointerEvents(): void {
|
|
215
|
-
if (this.options['pointerEvents']) {
|
|
216
|
-
this.hostStylePointerEvents = this.options['pointerEvents'];
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
215
|
setCustomClass() {
|
|
221
216
|
if (this.options['tooltipClass']) {
|
|
222
217
|
this.options['tooltipClass'].split(' ').forEach((className: any) => {
|
|
@@ -233,12 +228,17 @@ export class GravityTooltipComponent implements OnInit {
|
|
|
233
228
|
|
|
234
229
|
setStyles() {
|
|
235
230
|
this.setZIndex();
|
|
236
|
-
this.setPointerEvents();
|
|
237
231
|
this.setAnimationDuration();
|
|
238
232
|
|
|
239
233
|
this.hostClassShadow = this.options['shadow'];
|
|
240
234
|
this.hostClassLight = this.isThemeLight;
|
|
241
235
|
this.hostStyleMaxWidth = this.options['maxWidth'];
|
|
242
236
|
this.hostStyleWidth = this.options['width'] ? this.options['width'] : '';
|
|
237
|
+
this.hostClassNoPointer = !this.options['persistent'];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
closeTooltip() {
|
|
241
|
+
this.show = false;
|
|
242
|
+
this.events.emit({ type: 'hide', position: this.data.elementPosition });
|
|
243
243
|
}
|
|
244
244
|
}
|
|
@@ -149,6 +149,7 @@ export class GravityTooltipDirective implements OnChanges {
|
|
|
149
149
|
@Input('theme') theme!: "dark" | "light";
|
|
150
150
|
@Input('offset') offset!: number;
|
|
151
151
|
@Input('width') width!: string;
|
|
152
|
+
@Input('persistent') persistent: boolean = false;
|
|
152
153
|
|
|
153
154
|
// Max width
|
|
154
155
|
@Input('max-width') set maxWidthBackwardCompatibility(value: string) {
|
|
@@ -255,7 +256,7 @@ export class GravityTooltipDirective implements OnChanges {
|
|
|
255
256
|
@HostListener('focusout')
|
|
256
257
|
@HostListener('mouseleave')
|
|
257
258
|
onMouseLeave() {
|
|
258
|
-
if (this.options['trigger'] === 'hover') {
|
|
259
|
+
if (this.options['trigger'] === 'hover' && !this.persistent) {
|
|
259
260
|
this.destroyTooltip();
|
|
260
261
|
}
|
|
261
262
|
}
|
|
@@ -267,9 +268,12 @@ export class GravityTooltipDirective implements OnChanges {
|
|
|
267
268
|
}
|
|
268
269
|
|
|
269
270
|
this.show();
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
|
|
272
|
+
if (!this.persistent) {
|
|
273
|
+
this.hideAfterClickTimeoutId = window.setTimeout(() => {
|
|
274
|
+
this.destroyTooltip();
|
|
275
|
+
}, this.options['hideDelayAfterClick']);
|
|
276
|
+
}
|
|
273
277
|
}
|
|
274
278
|
|
|
275
279
|
ngOnChanges(changes: SimpleChanges) {
|
|
@@ -350,6 +354,10 @@ export class GravityTooltipDirective implements OnChanges {
|
|
|
350
354
|
destroyTooltip(options = {
|
|
351
355
|
fast: false
|
|
352
356
|
}): void {
|
|
357
|
+
if (this.persistent) {
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
|
|
353
361
|
this.clearTimeouts();
|
|
354
362
|
|
|
355
363
|
if (this.isTooltipDestroyed == false) {
|
|
@@ -500,4 +508,13 @@ export class GravityTooltipDirective implements OnChanges {
|
|
|
500
508
|
public hide() {
|
|
501
509
|
this.destroyTooltip();
|
|
502
510
|
}
|
|
511
|
+
|
|
512
|
+
public closeFromOutside(): void {
|
|
513
|
+
if (!this.componentRef || this.isTooltipDestroyed) {
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
(this.componentRef.instance as any).closeTooltip();
|
|
518
|
+
this.destroyTooltip({ fast: true });
|
|
519
|
+
}
|
|
503
520
|
}
|