@danske/sapphire-angular 1.16.0 → 1.16.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/lib/modal/public_api.mjs +2 -1
- package/esm2020/lib/popover/src/popover-trigger.directive.mjs +14 -14
- package/esm2020/lib/popover/src/popover.component.mjs +12 -2
- package/fesm2015/danske-sapphire-angular.mjs +25 -15
- package/fesm2015/danske-sapphire-angular.mjs.map +1 -1
- package/fesm2020/danske-sapphire-angular.mjs +25 -15
- package/fesm2020/danske-sapphire-angular.mjs.map +1 -1
- package/lib/modal/public_api.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1609,20 +1609,20 @@ class PopoverTriggerDirective {
|
|
|
1609
1609
|
this.closed.next();
|
|
1610
1610
|
this.changeDetectorRef.detectChanges();
|
|
1611
1611
|
});
|
|
1612
|
-
this.overlayRef
|
|
1613
|
-
.outsidePointerEvents()
|
|
1614
|
-
.pipe(takeUntil(merge(this.closed, this.destroyed)))
|
|
1615
|
-
.subscribe((event) => {
|
|
1616
|
-
if (
|
|
1617
|
-
// If popover is opened on press start, an outside pointer event
|
|
1618
|
-
// is emitted as the mouse is being released, which would immediately
|
|
1619
|
-
// close the popover. Probably a bug in @angular/cdk/overlay.
|
|
1620
|
-
!(this.openOnPressStart && this.isBeingPressed) &&
|
|
1621
|
-
!this.elementRef.nativeElement.contains(event.target)) {
|
|
1622
|
-
this.close();
|
|
1623
|
-
}
|
|
1624
|
-
});
|
|
1625
1612
|
}
|
|
1613
|
+
this.overlayRef
|
|
1614
|
+
.outsidePointerEvents()
|
|
1615
|
+
.pipe(takeUntil(merge(this.closed, this.destroyed)))
|
|
1616
|
+
.subscribe((event) => {
|
|
1617
|
+
if (
|
|
1618
|
+
// If popover is opened on press start, an outside pointer event
|
|
1619
|
+
// is emitted as the mouse is being released, which would immediately
|
|
1620
|
+
// close the popover. Probably a bug in @angular/cdk/overlay.
|
|
1621
|
+
!(this.openOnPressStart && this.isBeingPressed) &&
|
|
1622
|
+
!this.elementRef.nativeElement.contains(event.target)) {
|
|
1623
|
+
this.close();
|
|
1624
|
+
}
|
|
1625
|
+
});
|
|
1626
1626
|
this.overlayRef.attach(this.getContentPortal());
|
|
1627
1627
|
this.changeDetectorRef.detectChanges();
|
|
1628
1628
|
}
|
|
@@ -1894,7 +1894,17 @@ class PopoverComponent {
|
|
|
1894
1894
|
// focus is going. So we asynchronously check if the focus is outside the trigger and close
|
|
1895
1895
|
// in that case.
|
|
1896
1896
|
setTimeout(() => {
|
|
1897
|
-
if (
|
|
1897
|
+
if (
|
|
1898
|
+
/**
|
|
1899
|
+
* If the focus is going to body, don't close the popover.
|
|
1900
|
+
* similar consideration in react-aria's useOverlay:
|
|
1901
|
+
* https://github.com/adobe/react-spectrum/blob/2bda4c971dd557be7ecc44614569a8281e6cb6dd/packages/%40react-aria/overlays/src/useOverlay.ts#L128-L130
|
|
1902
|
+
*
|
|
1903
|
+
* In addition to those scenarios, the focused element may get disabled in the popover,
|
|
1904
|
+
* which moves the focus to body.
|
|
1905
|
+
*/
|
|
1906
|
+
document.activeElement !== document.body &&
|
|
1907
|
+
!this.trigger?.elementRef.nativeElement.contains(document.activeElement)) {
|
|
1898
1908
|
this.trigger?.close();
|
|
1899
1909
|
}
|
|
1900
1910
|
});
|
|
@@ -7953,5 +7963,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
7953
7963
|
* Generated bundle index. Do not edit.
|
|
7954
7964
|
*/
|
|
7955
7965
|
|
|
7956
|
-
export { BadgeComponent, BasicSelectComponent, BasicSingleSelectDirective, ButtonComponent, ButtonGroupComponent, ButtonIconDirective, CheckboxChange, CheckboxComponent, ConfirmationDialogComponent, ContextualHelpComponent, ContextualHelpContentDirective, ContextualHelpFooterDirective, ContextualHelpHeaderDirective, DEFAULT_BREAKPOINTS, DangerDialogComponent, DialogCloseButtonDirective, DialogComponent, DialogContentDirective, DialogFooterComponent, DialogFooterDirective, DialogHeaderComponent, DialogHeaderDirective, DialogTriggerDirective, FieldComponent, FieldControl, FieldErrorDirective, FieldLabelDirective, FieldNoteDirective, FieldNoteSuffixDirective, HeadingComponent, ICON_SIZE_PROVIDER, IconButtonComponent, IconComponent, InlinePanelComponent, LinkComponent, ListboxChild, ListboxComponent, ListboxInputDirective, MenuComponent, MenuItemComponent, MenuSectionComponent, MenuTriggerDirective, ModalService, MultiSelectDirective, NotificationBadgeComponent, OptionComponent, OptionIconDirective, OptionPrimaryTextDirective, OptionSecondaryTextDirective, POPOVER_TRIGGER, PaginationComponent, PanelBackButtonDirective, PanelCloseButtonDirective, PanelComponent, PanelContentComponent, PanelFooterComponent, PanelFooterDirective, PanelHeaderComponent, PanelHeaderDirective, PanelTriggerDirective, ParagraphComponent, PopoverCloseButtonDirective, PopoverComponent, PopoverTitleDirective, PopoverTriggerDirective, RadioComponent, RadioGroupComponent, SapphireBadgeModule, SapphireButtonModule, SapphireCheckboxModule, SapphireCheckboxRequiredValidator, SapphireContextualHelpModule, SapphireCoreModule, SapphireFieldModule, SapphireIconModule, SapphireLinkModule, SapphireListboxModule, SapphireMenuModule, SapphireModalModule, SapphireNotificationBadgeModule, SapphireOverlayContainer, SapphirePaginationChange, SapphirePaginationModule, SapphirePopoverModule, SapphireRadioChange, SapphireRadioModule, SapphireSegmentedTabsModule, SapphireSelectModule, SapphireSkeletonModule, SapphireSurfaceModule, SapphireSwitchChange, SapphireSwitchModule, SapphireSwitchRequiredValidator, SapphireTableModule, SapphireTextFieldModule, SapphireThemeModule, SapphireToggleButtonRequiredValidator, SapphireTooltipModule, SapphireTypographyModule, ScrollMonitorDirective, SearchableSelectDirective, SectionDirective, SegmentedTabComponent, SegmentedTabContentDirective, SegmentedTabLabelDirective, SegmentedTabsComponent, SelectComponent, SelectionTextDirective, SingleSelectDirective, SkeletonBlockDirective, SkeletonCircleDirective, SkeletonComponent, SkeletonTextDirective, SurfaceComponent, SwitchComponent, TableBodyDirective, TableCellDirective, TableComponent, TableDirective, TableHeadCellComponent, TableHeadDirective, TableRowDirective, TableSortDirective, TableSortHeaderDirective, TextFieldAffixDirective, TextFieldComponent, TextFieldInputDirective, TextFieldPostfixDirective, TextFieldPrefixDirective, TextFieldTextareaAutosizeDirective, ThemeBaseDirective, ThemeCheckDirective, ThemeDefault, ThemeDefaultDark, ThemeRootDirective, ToggleButtonComponent, TooltipComponent, TooltipDirective, TruncatedWithTooltipDirective, UseComponentStyles, UseComponentStylesOnHost, ViewEncapsulationProvider };
|
|
7966
|
+
export { BadgeComponent, BasicSelectComponent, BasicSingleSelectDirective, ButtonComponent, ButtonGroupComponent, ButtonIconDirective, CheckboxChange, CheckboxComponent, ConfirmationDialogComponent, ContextualHelpComponent, ContextualHelpContentDirective, ContextualHelpFooterDirective, ContextualHelpHeaderDirective, DEFAULT_BREAKPOINTS, DangerDialogComponent, DialogCloseButtonDirective, DialogComponent, DialogContentDirective, DialogFooterComponent, DialogFooterDirective, DialogHeaderComponent, DialogHeaderDirective, DialogTriggerDirective, FieldComponent, FieldControl, FieldErrorDirective, FieldLabelDirective, FieldNoteDirective, FieldNoteSuffixDirective, HeadingComponent, ICON_SIZE_PROVIDER, IconButtonComponent, IconComponent, InlinePanelComponent, LinkComponent, ListboxChild, ListboxComponent, ListboxInputDirective, MenuComponent, MenuItemComponent, MenuSectionComponent, MenuTriggerDirective, ModalCloseButtonDirective, ModalService, MultiSelectDirective, NotificationBadgeComponent, OptionComponent, OptionIconDirective, OptionPrimaryTextDirective, OptionSecondaryTextDirective, POPOVER_TRIGGER, PaginationComponent, PanelBackButtonDirective, PanelCloseButtonDirective, PanelComponent, PanelContentComponent, PanelFooterComponent, PanelFooterDirective, PanelHeaderComponent, PanelHeaderDirective, PanelTriggerDirective, ParagraphComponent, PopoverCloseButtonDirective, PopoverComponent, PopoverTitleDirective, PopoverTriggerDirective, RadioComponent, RadioGroupComponent, SapphireBadgeModule, SapphireButtonModule, SapphireCheckboxModule, SapphireCheckboxRequiredValidator, SapphireContextualHelpModule, SapphireCoreModule, SapphireFieldModule, SapphireIconModule, SapphireLinkModule, SapphireListboxModule, SapphireMenuModule, SapphireModalModule, SapphireNotificationBadgeModule, SapphireOverlayContainer, SapphirePaginationChange, SapphirePaginationModule, SapphirePopoverModule, SapphireRadioChange, SapphireRadioModule, SapphireSegmentedTabsModule, SapphireSelectModule, SapphireSkeletonModule, SapphireSurfaceModule, SapphireSwitchChange, SapphireSwitchModule, SapphireSwitchRequiredValidator, SapphireTableModule, SapphireTextFieldModule, SapphireThemeModule, SapphireToggleButtonRequiredValidator, SapphireTooltipModule, SapphireTypographyModule, ScrollMonitorDirective, SearchableSelectDirective, SectionDirective, SegmentedTabComponent, SegmentedTabContentDirective, SegmentedTabLabelDirective, SegmentedTabsComponent, SelectComponent, SelectionTextDirective, SingleSelectDirective, SkeletonBlockDirective, SkeletonCircleDirective, SkeletonComponent, SkeletonTextDirective, SurfaceComponent, SwitchComponent, TableBodyDirective, TableCellDirective, TableComponent, TableDirective, TableHeadCellComponent, TableHeadDirective, TableRowDirective, TableSortDirective, TableSortHeaderDirective, TextFieldAffixDirective, TextFieldComponent, TextFieldInputDirective, TextFieldPostfixDirective, TextFieldPrefixDirective, TextFieldTextareaAutosizeDirective, ThemeBaseDirective, ThemeCheckDirective, ThemeDefault, ThemeDefaultDark, ThemeRootDirective, ToggleButtonComponent, TooltipComponent, TooltipDirective, TruncatedWithTooltipDirective, UseComponentStyles, UseComponentStylesOnHost, ViewEncapsulationProvider };
|
|
7957
7967
|
//# sourceMappingURL=danske-sapphire-angular.mjs.map
|