@breadstone/mosaik-elements-angular 0.0.258 → 0.0.260
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## 0.0.260 (2026-05-07)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **overlays:** implement OverlayStackManager for better overlay handling ([2a9e5e31bf](https://github.com/RueDeRennes/mosaik/commit/2a9e5e31bf))
|
|
6
|
+
|
|
7
|
+
### 🩹 Fixes
|
|
8
|
+
|
|
9
|
+
- **api:** update line numbers in documentation for various services and components ([7ac1fab82d](https://github.com/RueDeRennes/mosaik/commit/7ac1fab82d))
|
|
10
|
+
- **overlays:** disable close on escape and outside click for overlay components ([87cb6c7b6d](https://github.com/RueDeRennes/mosaik/commit/87cb6c7b6d))
|
|
11
|
+
|
|
12
|
+
## 0.0.259 (2026-05-06)
|
|
13
|
+
|
|
14
|
+
This was a version bump only for mosaik-elements-angular to align it with other projects, there were no code changes.
|
|
15
|
+
|
|
1
16
|
## 0.0.258 (2026-05-06)
|
|
2
17
|
|
|
3
18
|
This was a version bump only for mosaik-elements-angular to align it with other projects, there were no code changes.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, ChangeDetectorRef, ElementRef, DestroyRef, input, effect, output, ChangeDetectionStrategy, Component, makeEnvironmentProviders, Injectable, Renderer2, Input, Directive, ViewContainerRef, TemplateRef, isDevMode, EnvironmentInjector, runInInjectionContext, signal, booleanAttribute, forwardRef, ContentChildren, computed, HostListener, untracked, Injector, afterNextRender, ContentChild, DOCUMENT, provideEnvironmentInitializer, Pipe, ViewChild, ViewEncapsulation, Optional, Inject, SkipSelf, provideAppInitializer } from '@angular/core';
|
|
3
|
-
import * as
|
|
4
|
-
import { AbsoluteItemElement, AbsoluteElement, ActionbarGroupElement, ActionbarItemElement, ActionbarSeparatorElement, ActionbarElement, AnchorElement, AppHeaderElement, AppElement, AttachmentChatToolElement, AudioElement, AnimationPlayer, Animation, BREAKPOINTS, PerspectiveElement, RippleElement, ScaleElement, ProgressRingElement, ExpandableElement, FlipElement, TooltipElement, dataListElementValueAccessor, DataListElement, dataTableElementValueAccessor, DataTableElement, StepperElement, WizardElement, Size, Spacing, TextFormatters, DIALOG_STACK_BEHAVIOR_DEFAULT_CONFIG, DialogHeaderElement, DialogHeaderTextElement, DialogHeaderSubTextElement, DialogActionsElement, ButtonElement, DialogElement, DialogFooterElement,
|
|
3
|
+
import * as i2 from '@breadstone/mosaik-elements-foundation';
|
|
4
|
+
import { AbsoluteItemElement, AbsoluteElement, ActionbarGroupElement, ActionbarItemElement, ActionbarSeparatorElement, ActionbarElement, AnchorElement, AppHeaderElement, AppElement, AttachmentChatToolElement, AudioElement, AnimationPlayer, Animation, BREAKPOINTS, PerspectiveElement, RippleElement, ScaleElement, ProgressRingElement, ExpandableElement, FlipElement, TooltipElement, dataListElementValueAccessor, DataListElement, dataTableElementValueAccessor, DataTableElement, StepperElement, WizardElement, Size, Spacing, TextFormatters, DIALOG_STACK_BEHAVIOR_DEFAULT_CONFIG, DialogHeaderElement, DialogHeaderTextElement, DialogHeaderSubTextElement, DialogActionsElement, ButtonElement, DialogElement, DialogFooterElement, Key, EID, DRAWER_STACK_BEHAVIOR_DEFAULT_CONFIG, DrawerElement, DrawerHeaderElement, DrawerHeaderTextElement, DrawerHeaderSubTextElement, DrawerContentElement, DrawerActionsElement, DrawerFooterElement, DismissElement, MessageBoxElement, MessageBoxResult, SheetElement, SheetContentElement, SheetFooterElement, SheetHeaderElement, SheetHeaderSubTextElement, SheetHeaderTextElement, ToastElement, DateAgoIntl, TimeAgoIntl, ThemeService as ThemeService$1, TranslatorService, Translator, TranslatorServiceLocator, autoCompleteBoxElementValueAccessor, AutoCompleteBoxElement, AvatarGroupElement, avatarElementValueAccessor, AvatarElement, BackdropElement, BadgeElement, BannerGroupElement, BannerHeaderElement, BannerSubHeaderElement, BannerElement, BoxElement, BreadcrumbItemElement, BreadcrumbElement, BusyStateElement, ButtonGroupElement, CalendarHeaderElement, CalendarItemElement, CalendarSubHeaderElement, calendarElementValueAccessor, CalendarElement, CameraElement, CardActionsElement, CardContentElement, CardFooterElement, CardHeaderElement, CardSubTitleElement, CardTitleElement, CardElement, Carousel2Element, CarouselItem2Element, CarouselItemElement, CarouselElement, CellGroupElement, CellElement, ChartElement, ChatHeaderElement, ChatInputAttachmentListElement, ChatInputElement, ChatMarkerElement, ChatMessageAvatarElement, ChatMessageDividerElement, ChatMessageReactionElement, ChatMessageElement, ChatElement, checkBoxGroupElementValueAccessor, CheckBoxGroupElement, checkboxElementValueAccessor, CheckboxElement, CheckmarkElement, chipGroupElementValueAccessor, ChipGroupElement, ChipElement, chipBoxElementValueAccessor, ChipBoxElement, ChoiceGroupHeaderElement, choiceGroupElementValueAccessor, ChoiceGroupElement, choiceElementValueAccessor, ChoiceElement, CodeElement, ColorAreaElement, colorEditorAlphaSliderElementValueAccessor, ColorEditorAlphaSliderElement, colorEditorAreaElementValueAccessor, ColorEditorAreaElement, colorEditorHueSliderElementValueAccessor, ColorEditorHueSliderElement, colorEditorInputsElementValueAccessor, ColorEditorInputsElement, colorEditorPaletteElementValueAccessor, ColorEditorPaletteElement, colorEditorShadeSliderElementValueAccessor, ColorEditorShadeSliderElement, colorEditorSwatchElementValueAccessor, ColorEditorSwatchElement, colorEditorElementValueAccessor, ColorEditorElement, ColorPickerElement, ColorSliderElement, ColorSwatchGroupElement, ColorSwatchElement, ColorThumbElement, colorBoxElementValueAccessor, ColorBoxElement, ComboItemElement, comboElementValueAccessor, ComboElement, CommentElement, CompoundButtonElement, CookiesConsentElement, dateBoxElementValueAccessor, DateBoxElement, dateTimeBoxElementValueAccessor, DateTimeBoxElement, DesignerCanvasElement, DesignerContentElement, DesignerFrameElement, DesignerElement, DialogContentElement, DisclosureElement, DividerElement, DockPanelElement, DotGroupElement, DotElement, DrawerContainerElement, DropZoneElement, DropDownButtonElement, DurationBoxElement, ElevationElement, EmojiElement, EmptyStateElement, EpgChannelElement, EpgProgramElement, EpgElement, ErrorStateElement, ErrorElement, ExpanderGroupElement, ExpanderHeaderElement, ExpanderSubHeaderElement, ExpanderElement, FloatingActionButtonGroupElement, FloatingActionButtonElement, FilePickerElement, FileUploadItemElement, fileUploadElementValueAccessor, FileUploadElement, FloatingTriggerElement, FloatingElement, FlowBoardColumnComposerElement, FlowBoardColumnItemComposerElement, FlowBoardColumnItemElement, FlowBoardColumnElement, FlowBoardElement, FocusRingElement, FontEditorElement, FooterItemGroupElement, FooterItemElement, FooterElement, FormFieldElement, FormElement, GhostElement, GridItemElement, GridElement, HelmetElement, HintElement, IconElement, ImageElement, IndicatorElement, JumbotronHeaderElement, JumbotronSubHeaderElement, JumbotronElement, KbdShortcutElement, KbdElement, LightChainElement, ListItemGroupElement, ListItemElement, listElementValueAccessor, ListElement, ListingItemMarkerElement, ListingItemElement, ListingElement, MapElement, MarqueeElement, MasonryElement, MenuItemGroupElement, MenuItemElement, MenuElement, MessageContentElement, MessageElement, MeterBarElement, MeterRingElement, NumberCounterElement, NumberElement, numberBoxElementValueAccessor, NumberBoxElement, PageContentElement, PageHeaderElement, PagePreContentElement, PagePreHeaderElement, PageElement, PageMenuElement, PaginatorElement, passwordBoxElementValueAccessor, PasswordBoxElement, PatternElement, PersonaElement, pinBoxElementValueAccessor, PinBoxElement, PipElement, PlaceholderElement, PopupElement, PortalHostElement, PortalProjectionElement, PortalElement, PressButtonElement, ProgressBarElement, QRCodeElement, radioGroupElementValueAccessor, RadioGroupElement, radioElementValueAccessor, RadioElement, RatingElement, ReactionChatToolElement, RegionViewElement, RegionElement, RepeatButtonElement, ResizeAdornerElement, ResizeThumbElement, ResizeElement, RibbonElement, richTextBoxElementValueAccessor, RichTextBoxElement, SchedulerEventElement, SchedulerElement, ScrollElement, scrubSliderElementValueAccessor, ScrubSliderElement, searchBoxElementValueAccessor, SearchBoxElement, SegmentItemElement, SegmentElement, SelectItemGroupElement, SelectItemElement, selectElementValueAccessor, SelectElement, signaturePadElementValueAccessor, SignaturePadElement, SkeletonElement, sliderElementValueAccessor, SliderElement, Slider2ThumbElement, Slider2Element, SpacerElement, SplitButtonElement, SplitElement, StackElement, StepperItemElement, StickyElement, SuccessStateElement, SummaryElement, SwipeElement, TabItemElement, TabPanelElement, TabStripItemElement, TabStripElement, TabElement, TableBodyCellElement, TableBodyRowElement, TableBodyElement, TableColumnEditorElement, TableFooterCellElement, TableFooterRowElement, TableFooterElement, TableHeaderCellElement, TableHeaderRowElement, TableHeaderElement, TableElement, TextFormatElement, TextElement, textBoxElementValueAccessor, TextBoxElement, Theme2Element, ThumbElement, ThumbnailElement, TickBarElement, TileListItemElement, TileListElement, TileManagerTileElement, TileManagerElement, TileElement, timeBoxElementValueAccessor, TimeBoxElement, TimelineContentElement, TimelineItemElement, TimelineMarkerElement, TimelineOppositeElement, TimelineElement, toggleButtonGroupElementValueAccessor, ToggleButtonGroupElement, toggleButtonElementValueAccessor, ToggleButtonElement, toggleSwitchElementValueAccessor, ToggleSwitchElement, ToggleTipElement, ToolbarElement, TourAnchorElement, TourStepElement, TourElement, TreeItemElement, treeElementValueAccessor, TreeElement, UpDownSpinnerElement, VideoElement, VirtualizeElement, VoiceRecorderChatToolElement, WizardStepElement, WrapElement } from '@breadstone/mosaik-elements-foundation';
|
|
5
5
|
import { AbstractControl, FormGroupDirective, NgControl, TouchedChangeEvent, NG_VALUE_ACCESSOR, FormControl, FormArray, FormGroup } from '@angular/forms';
|
|
6
6
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
7
7
|
import { CssLength, ThemeObserver, ThemeGeneratorServiceLocator, ThemeGenerator, ThemeObserverServiceLocator } from '@breadstone/mosaik-themes';
|
|
@@ -2619,40 +2619,16 @@ class AnimateDirective {
|
|
|
2619
2619
|
*
|
|
2620
2620
|
* @public
|
|
2621
2621
|
*/
|
|
2622
|
-
constructor() {
|
|
2623
|
-
this._animationRegistry =
|
|
2624
|
-
this._element =
|
|
2625
|
-
this._animationPlayer =
|
|
2626
|
-
this._renderer =
|
|
2622
|
+
constructor(animationRegistry = inject(AnimationRegistry), element = inject((ElementRef)), animationPlayer = inject(AnimationPlayer), renderer = inject(Renderer2)) {
|
|
2623
|
+
this._animationRegistry = animationRegistry;
|
|
2624
|
+
this._element = element;
|
|
2625
|
+
this._animationPlayer = animationPlayer;
|
|
2626
|
+
this._renderer = renderer;
|
|
2627
2627
|
this._wasTriggered = false;
|
|
2628
2628
|
this._animate = undefined;
|
|
2629
2629
|
this._options = undefined;
|
|
2630
2630
|
}
|
|
2631
2631
|
// #endregion
|
|
2632
|
-
// #region Properties
|
|
2633
|
-
/**
|
|
2634
|
-
* Gets or sets the `animate` property.
|
|
2635
|
-
*
|
|
2636
|
-
* @public
|
|
2637
|
-
*/
|
|
2638
|
-
get animate() {
|
|
2639
|
-
return this._animate;
|
|
2640
|
-
}
|
|
2641
|
-
set animate(value) {
|
|
2642
|
-
this._animate = value;
|
|
2643
|
-
}
|
|
2644
|
-
/**
|
|
2645
|
-
* Gets or sets the `options` property.
|
|
2646
|
-
*
|
|
2647
|
-
* @public
|
|
2648
|
-
*/
|
|
2649
|
-
get options() {
|
|
2650
|
-
return this._options;
|
|
2651
|
-
}
|
|
2652
|
-
set options(value) {
|
|
2653
|
-
this._options = value;
|
|
2654
|
-
}
|
|
2655
|
-
// #endregion
|
|
2656
2632
|
// #region Methods
|
|
2657
2633
|
/**
|
|
2658
2634
|
* @public
|
|
@@ -2667,75 +2643,134 @@ class AnimateDirective {
|
|
|
2667
2643
|
if (this._wasTriggered) {
|
|
2668
2644
|
return;
|
|
2669
2645
|
}
|
|
2670
|
-
|
|
2671
|
-
|
|
2646
|
+
const resolvedAnimation = this.resolveAnimation();
|
|
2647
|
+
if (!resolvedAnimation) {
|
|
2648
|
+
console.warn('[AnimateDirective]: No valid animation steps provided.');
|
|
2649
|
+
return;
|
|
2650
|
+
}
|
|
2651
|
+
this._wasTriggered = true;
|
|
2652
|
+
this.applyInitialStyles(resolvedAnimation);
|
|
2653
|
+
if (resolvedAnimation.steps.length === 0) {
|
|
2654
|
+
return;
|
|
2655
|
+
}
|
|
2656
|
+
if (resolvedAnimation.trigger) {
|
|
2657
|
+
resolvedAnimation.trigger(() => this.play(resolvedAnimation));
|
|
2658
|
+
return;
|
|
2659
|
+
}
|
|
2660
|
+
this.play(resolvedAnimation);
|
|
2661
|
+
}
|
|
2662
|
+
/**
|
|
2663
|
+
* @private
|
|
2664
|
+
*/
|
|
2665
|
+
resolveAnimation() {
|
|
2666
|
+
if (!this._animate) {
|
|
2667
|
+
return undefined;
|
|
2668
|
+
}
|
|
2672
2669
|
if (typeof this._animate === 'string') {
|
|
2673
|
-
|
|
2674
|
-
if (!registered) {
|
|
2675
|
-
console.warn(`[AnimateDirective]: The animation with name "${this._animate}" was not found in the registry.`);
|
|
2676
|
-
return;
|
|
2677
|
-
}
|
|
2678
|
-
resolvedAnimation = { ...registered };
|
|
2670
|
+
return this.resolveRegisteredAnimation(this._animate);
|
|
2679
2671
|
}
|
|
2680
|
-
|
|
2681
|
-
const
|
|
2682
|
-
if (!
|
|
2683
|
-
|
|
2684
|
-
return;
|
|
2672
|
+
if (this._animate.name) {
|
|
2673
|
+
const registeredAnimation = this.resolveRegisteredAnimation(this._animate.name);
|
|
2674
|
+
if (!registeredAnimation) {
|
|
2675
|
+
return undefined;
|
|
2685
2676
|
}
|
|
2686
|
-
|
|
2687
|
-
|
|
2677
|
+
return {
|
|
2678
|
+
initial: this._animate.initial ?? registeredAnimation.initial,
|
|
2679
|
+
steps: this._animate.steps ?? registeredAnimation.steps,
|
|
2680
|
+
options: this.mergeOptions(registeredAnimation.options, this._animate.options),
|
|
2688
2681
|
trigger: this._animate.trigger,
|
|
2689
2682
|
onFinished: this._animate.onFinished
|
|
2690
2683
|
};
|
|
2691
2684
|
}
|
|
2692
|
-
|
|
2693
|
-
|
|
2685
|
+
if (!this._animate.steps) {
|
|
2686
|
+
return undefined;
|
|
2694
2687
|
}
|
|
2695
|
-
|
|
2696
|
-
|
|
2688
|
+
return {
|
|
2689
|
+
initial: this._animate.initial,
|
|
2690
|
+
steps: this._animate.steps,
|
|
2691
|
+
options: this._animate.options,
|
|
2692
|
+
trigger: this._animate.trigger,
|
|
2693
|
+
onFinished: this._animate.onFinished
|
|
2694
|
+
};
|
|
2695
|
+
}
|
|
2696
|
+
/**
|
|
2697
|
+
* @private
|
|
2698
|
+
*/
|
|
2699
|
+
resolveRegisteredAnimation(name) {
|
|
2700
|
+
const registeredAnimation = this._animationRegistry.animations[name];
|
|
2701
|
+
if (!registeredAnimation) {
|
|
2702
|
+
console.warn(`[AnimateDirective]: The animation with name "${name}" was not found in the registry.`);
|
|
2703
|
+
return undefined;
|
|
2704
|
+
}
|
|
2705
|
+
return { ...registeredAnimation };
|
|
2706
|
+
}
|
|
2707
|
+
/**
|
|
2708
|
+
* @private
|
|
2709
|
+
*/
|
|
2710
|
+
mergeOptions(baseOptions, overrideOptions) {
|
|
2711
|
+
if (!baseOptions && !overrideOptions) {
|
|
2712
|
+
return undefined;
|
|
2713
|
+
}
|
|
2714
|
+
return {
|
|
2715
|
+
...baseOptions,
|
|
2716
|
+
...overrideOptions
|
|
2717
|
+
};
|
|
2718
|
+
}
|
|
2719
|
+
/**
|
|
2720
|
+
* @private
|
|
2721
|
+
*/
|
|
2722
|
+
applyInitialStyles(animation) {
|
|
2723
|
+
if (!animation.initial) {
|
|
2697
2724
|
return;
|
|
2698
2725
|
}
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
const initialKeyframe = resolvedAnimation.steps[0];
|
|
2702
|
-
for (const [key, value] of Object.entries(initialKeyframe)) {
|
|
2703
|
-
if (key === 'offset' || key === 'easing' || key === 'composite') {
|
|
2726
|
+
for (const [key, value] of Object.entries(animation.initial)) {
|
|
2727
|
+
if (this.isKeyframeMetadataProperty(key)) {
|
|
2704
2728
|
continue;
|
|
2705
2729
|
}
|
|
2706
2730
|
if (key in this._element.nativeElement.style) {
|
|
2707
|
-
this._renderer.setStyle(this._element.nativeElement, key, value);
|
|
2731
|
+
this._renderer.setStyle(this._element.nativeElement, key, value?.toString() ?? '');
|
|
2708
2732
|
}
|
|
2709
2733
|
}
|
|
2710
|
-
if (resolvedAnimation.trigger) {
|
|
2711
|
-
resolvedAnimation.trigger(() => this.play(resolvedAnimation));
|
|
2712
|
-
}
|
|
2713
|
-
else {
|
|
2714
|
-
this.play(resolvedAnimation);
|
|
2715
|
-
}
|
|
2716
2734
|
}
|
|
2717
2735
|
/**
|
|
2718
2736
|
* @private
|
|
2719
2737
|
*/
|
|
2720
2738
|
play(animation) {
|
|
2721
|
-
|
|
2722
|
-
...this._options
|
|
2723
|
-
};
|
|
2724
|
-
void this._animationPlayer.play(this._element.nativeElement, animation, overrideOptions).then(() => {
|
|
2725
|
-
// Commit the final keyframe styles
|
|
2726
|
-
if (animation.steps && animation.steps.length > 0) {
|
|
2727
|
-
const finalKeyframe = animation.steps[animation.steps.length - 1];
|
|
2728
|
-
for (const [key, value] of Object.entries(finalKeyframe)) {
|
|
2729
|
-
if (key === 'offset' || key === 'easing' || key === 'composite') {
|
|
2730
|
-
continue;
|
|
2731
|
-
}
|
|
2732
|
-
this._renderer.setStyle(this._element.nativeElement, key, value);
|
|
2733
|
-
}
|
|
2734
|
-
}
|
|
2739
|
+
void this._animationPlayer.playToFinal(this._element.nativeElement, animation, this._options).then(() => {
|
|
2735
2740
|
animation.onFinished?.();
|
|
2736
2741
|
});
|
|
2737
2742
|
}
|
|
2738
|
-
|
|
2743
|
+
/**
|
|
2744
|
+
* @private
|
|
2745
|
+
*/
|
|
2746
|
+
isKeyframeMetadataProperty(key) {
|
|
2747
|
+
return key === 'offset' || key === 'easing' || key === 'composite';
|
|
2748
|
+
}
|
|
2749
|
+
// #endregion
|
|
2750
|
+
// #region Properties
|
|
2751
|
+
/**
|
|
2752
|
+
* Gets or sets the `animate` property.
|
|
2753
|
+
*
|
|
2754
|
+
* @public
|
|
2755
|
+
*/
|
|
2756
|
+
get animate() {
|
|
2757
|
+
return this._animate;
|
|
2758
|
+
}
|
|
2759
|
+
set animate(value) {
|
|
2760
|
+
this._animate = value;
|
|
2761
|
+
}
|
|
2762
|
+
/**
|
|
2763
|
+
* Gets or sets the `options` property.
|
|
2764
|
+
*
|
|
2765
|
+
* @public
|
|
2766
|
+
*/
|
|
2767
|
+
get options() {
|
|
2768
|
+
return this._options;
|
|
2769
|
+
}
|
|
2770
|
+
set options(value) {
|
|
2771
|
+
this._options = value;
|
|
2772
|
+
}
|
|
2773
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: AnimateDirective, deps: [{ token: AnimationRegistry }, { token: i0.ElementRef }, { token: i2.AnimationPlayer }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2739
2774
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.10", type: AnimateDirective, isStandalone: true, selector: "[mosaikAnimate]", inputs: { animate: ["mosaikAnimate", "animate"], options: ["mosaikAnimateOptions", "options"] }, ngImport: i0 });
|
|
2740
2775
|
}
|
|
2741
2776
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: AnimateDirective, decorators: [{
|
|
@@ -2743,7 +2778,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
2743
2778
|
args: [{
|
|
2744
2779
|
selector: '[mosaikAnimate]'
|
|
2745
2780
|
}]
|
|
2746
|
-
}], ctorParameters: () => [], propDecorators: { animate: [{
|
|
2781
|
+
}], ctorParameters: () => [{ type: AnimationRegistry }, { type: i0.ElementRef }, { type: i2.AnimationPlayer }, { type: i0.Renderer2 }], propDecorators: { animate: [{
|
|
2747
2782
|
type: Input,
|
|
2748
2783
|
args: [{
|
|
2749
2784
|
alias: 'mosaikAnimate',
|
|
@@ -11747,6 +11782,80 @@ class StatelessInjector {
|
|
|
11747
11782
|
}
|
|
11748
11783
|
}
|
|
11749
11784
|
|
|
11785
|
+
// #region Imports
|
|
11786
|
+
const OVERLAY_INTERACTION_STATE = getOverlayInteractionState();
|
|
11787
|
+
/**
|
|
11788
|
+
* Coordinates close interactions across stacked CDK overlays.
|
|
11789
|
+
*
|
|
11790
|
+
* @internal
|
|
11791
|
+
*/
|
|
11792
|
+
class OverlayInteractionCoordinator {
|
|
11793
|
+
// #region Methods
|
|
11794
|
+
/**
|
|
11795
|
+
* Registers an overlay as active for global close interaction arbitration.
|
|
11796
|
+
*
|
|
11797
|
+
* @internal
|
|
11798
|
+
*/
|
|
11799
|
+
static register(overlayRef) {
|
|
11800
|
+
OverlayInteractionCoordinator.unregister(overlayRef);
|
|
11801
|
+
OVERLAY_INTERACTION_STATE.entries.push({
|
|
11802
|
+
overlayRef: overlayRef,
|
|
11803
|
+
order: ++OVERLAY_INTERACTION_STATE.order
|
|
11804
|
+
});
|
|
11805
|
+
}
|
|
11806
|
+
/**
|
|
11807
|
+
* Removes an overlay from global close interaction arbitration.
|
|
11808
|
+
*
|
|
11809
|
+
* @internal
|
|
11810
|
+
*/
|
|
11811
|
+
static unregister(overlayRef) {
|
|
11812
|
+
const index = OVERLAY_INTERACTION_STATE.entries.findIndex((entry) => entry.overlayRef === overlayRef);
|
|
11813
|
+
if (index >= 0) {
|
|
11814
|
+
OVERLAY_INTERACTION_STATE.entries.splice(index, 1);
|
|
11815
|
+
}
|
|
11816
|
+
}
|
|
11817
|
+
/**
|
|
11818
|
+
* Returns whether the overlay is the uppermost currently attached overlay.
|
|
11819
|
+
*
|
|
11820
|
+
* @internal
|
|
11821
|
+
*/
|
|
11822
|
+
static isTopMost(overlayRef) {
|
|
11823
|
+
return OverlayInteractionCoordinator.getTopMostOverlayRef() === overlayRef;
|
|
11824
|
+
}
|
|
11825
|
+
/**
|
|
11826
|
+
* Returns whether the overlay owned the uppermost position when the interaction event started.
|
|
11827
|
+
*
|
|
11828
|
+
* @internal
|
|
11829
|
+
*/
|
|
11830
|
+
static isTopMostForInteraction(overlayRef, event) {
|
|
11831
|
+
return OverlayInteractionCoordinator.getOrCreateInteractionOwner(event) === overlayRef;
|
|
11832
|
+
}
|
|
11833
|
+
static getOrCreateInteractionOwner(event) {
|
|
11834
|
+
if (!OVERLAY_INTERACTION_STATE.eventOwners.has(event)) {
|
|
11835
|
+
OVERLAY_INTERACTION_STATE.eventOwners.set(event, OverlayInteractionCoordinator.getTopMostOverlayRef());
|
|
11836
|
+
}
|
|
11837
|
+
return OVERLAY_INTERACTION_STATE.eventOwners.get(event) ?? null;
|
|
11838
|
+
}
|
|
11839
|
+
static getTopMostOverlayRef() {
|
|
11840
|
+
let topMostEntry = null;
|
|
11841
|
+
for (const entry of OVERLAY_INTERACTION_STATE.entries) {
|
|
11842
|
+
if (entry.overlayRef.hasAttached() && (!topMostEntry || entry.order > topMostEntry.order)) {
|
|
11843
|
+
topMostEntry = entry;
|
|
11844
|
+
}
|
|
11845
|
+
}
|
|
11846
|
+
return topMostEntry?.overlayRef ?? null;
|
|
11847
|
+
}
|
|
11848
|
+
}
|
|
11849
|
+
function getOverlayInteractionState() {
|
|
11850
|
+
const root = globalThis;
|
|
11851
|
+
root.__mosaikOverlayInteractionState__ ??= {
|
|
11852
|
+
entries: new Array(),
|
|
11853
|
+
eventOwners: new WeakMap(),
|
|
11854
|
+
order: 0
|
|
11855
|
+
};
|
|
11856
|
+
return root.__mosaikOverlayInteractionState__;
|
|
11857
|
+
}
|
|
11858
|
+
|
|
11750
11859
|
// #region Imports
|
|
11751
11860
|
/**
|
|
11752
11861
|
* @public
|
|
@@ -11862,6 +11971,7 @@ class PortalProvider {
|
|
|
11862
11971
|
overlay: overlayRef,
|
|
11863
11972
|
portal: portal
|
|
11864
11973
|
});
|
|
11974
|
+
OverlayInteractionCoordinator.register(overlayRef);
|
|
11865
11975
|
this._cacheCountSubject.next(this._cache.length);
|
|
11866
11976
|
}
|
|
11867
11977
|
/**
|
|
@@ -11871,12 +11981,17 @@ class PortalProvider {
|
|
|
11871
11981
|
if (overlayRef.hasAttached()) {
|
|
11872
11982
|
overlayRef.detach();
|
|
11873
11983
|
}
|
|
11874
|
-
|
|
11984
|
+
OverlayInteractionCoordinator.unregister(overlayRef);
|
|
11985
|
+
const index = this._cache.findIndex((x) => x.overlay === overlayRef);
|
|
11986
|
+
if (index >= 0) {
|
|
11987
|
+
this._cache.splice(index, 1);
|
|
11988
|
+
}
|
|
11875
11989
|
this._cacheCountSubject.next(this._cache.length);
|
|
11876
11990
|
}
|
|
11877
11991
|
}
|
|
11878
11992
|
|
|
11879
11993
|
// #region Imports
|
|
11994
|
+
// #endregion
|
|
11880
11995
|
// #region Methods
|
|
11881
11996
|
/**
|
|
11882
11997
|
* Subscribes to CDK outside interactions while preserving Mosaik portal ownership.
|
|
@@ -11884,11 +11999,40 @@ class PortalProvider {
|
|
|
11884
11999
|
* @internal
|
|
11885
12000
|
*/
|
|
11886
12001
|
function connectOverlayOutsideClose(overlayRef, closed, close) {
|
|
11887
|
-
overlayRef.backdropClick().pipe(take(1), takeUntil(closed))
|
|
12002
|
+
overlayRef.backdropClick().pipe(filter((event) => OverlayInteractionCoordinator.isTopMostForInteraction(overlayRef, event)), take(1), takeUntil(closed))
|
|
11888
12003
|
.subscribe(() => close());
|
|
11889
|
-
overlayRef.outsidePointerEvents().pipe(filter((event) => !isOwnedMosaikPortalProjectionEvent(overlayRef, event)), take(1), takeUntil(closed))
|
|
12004
|
+
overlayRef.outsidePointerEvents().pipe(filter((event) => OverlayInteractionCoordinator.isTopMostForInteraction(overlayRef, event)), filter((event) => !isOwnedMosaikPortalProjectionEvent(overlayRef, event)), take(1), takeUntil(closed))
|
|
11890
12005
|
.subscribe(() => close());
|
|
11891
12006
|
}
|
|
12007
|
+
/**
|
|
12008
|
+
* Subscribes to escape key interactions while only closing the topmost overlay.
|
|
12009
|
+
*
|
|
12010
|
+
* @internal
|
|
12011
|
+
*/
|
|
12012
|
+
function connectOverlayEscapeClose(overlayRef, closed, close) {
|
|
12013
|
+
const escapeEvents = fromEvent(overlayRef.overlayElement.ownerDocument, 'keydown', { capture: true }).pipe(filter(isEscapeKeyEvent), filter((event) => OverlayInteractionCoordinator.isTopMostForInteraction(overlayRef, event)), takeUntil(closed));
|
|
12014
|
+
escapeEvents.pipe(take(1))
|
|
12015
|
+
.subscribe((event) => {
|
|
12016
|
+
consumeEscapeKeyEvent(event);
|
|
12017
|
+
close();
|
|
12018
|
+
});
|
|
12019
|
+
}
|
|
12020
|
+
/**
|
|
12021
|
+
* Subscribes to escape key interactions and blocks them while this overlay is topmost.
|
|
12022
|
+
*
|
|
12023
|
+
* @internal
|
|
12024
|
+
*/
|
|
12025
|
+
function connectOverlayEscapeBlock(overlayRef, closed) {
|
|
12026
|
+
fromEvent(overlayRef.overlayElement.ownerDocument, 'keydown', { capture: true }).pipe(filter(isEscapeKeyEvent), filter((event) => OverlayInteractionCoordinator.isTopMostForInteraction(overlayRef, event)), takeUntil(closed))
|
|
12027
|
+
.subscribe((event) => consumeEscapeKeyEvent(event));
|
|
12028
|
+
}
|
|
12029
|
+
function isEscapeKeyEvent(event) {
|
|
12030
|
+
return event.key === 'Escape' || event.code === 'Escape' || event.keyCode === Key.Escape;
|
|
12031
|
+
}
|
|
12032
|
+
function consumeEscapeKeyEvent(event) {
|
|
12033
|
+
event.preventDefault();
|
|
12034
|
+
event.stopImmediatePropagation();
|
|
12035
|
+
}
|
|
11892
12036
|
function isOwnedMosaikPortalProjectionEvent(overlayRef, event) {
|
|
11893
12037
|
return event.composedPath()
|
|
11894
12038
|
.some((target) => isMosaikPortalProjectionElement(target) && isProjectionOwnedByOverlay(overlayRef, target));
|
|
@@ -11942,7 +12086,6 @@ function isShadowRoot(node) {
|
|
|
11942
12086
|
*/
|
|
11943
12087
|
class DialogService extends PortalProvider {
|
|
11944
12088
|
// #region Fields
|
|
11945
|
-
_document;
|
|
11946
12089
|
_behaviors;
|
|
11947
12090
|
_portalInjector;
|
|
11948
12091
|
// #endregion
|
|
@@ -11954,7 +12097,6 @@ class DialogService extends PortalProvider {
|
|
|
11954
12097
|
*/
|
|
11955
12098
|
constructor() {
|
|
11956
12099
|
super();
|
|
11957
|
-
this._document = inject(DOCUMENT);
|
|
11958
12100
|
this._behaviors = new Array();
|
|
11959
12101
|
for (const behavior of inject(DIALOG_BEHAVIORS, { optional: true }) ?? []) {
|
|
11960
12102
|
this.withBehavior(behavior);
|
|
@@ -12097,16 +12239,17 @@ class DialogService extends PortalProvider {
|
|
|
12097
12239
|
component.setInput(p, config[p]);
|
|
12098
12240
|
}
|
|
12099
12241
|
});
|
|
12242
|
+
component.setInput('pressEscapeToClose', false);
|
|
12243
|
+
component.setInput('clickOutsideToClose', false);
|
|
12100
12244
|
if (config.clickOutsideToClose) {
|
|
12101
12245
|
connectOverlayOutsideClose(overlayRef, dialogRef.closed, () => dialogRef.close(Cancel.negative()));
|
|
12102
12246
|
}
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
|
|
12109
|
-
}
|
|
12247
|
+
}
|
|
12248
|
+
if (config?.pressEscapeToClose) {
|
|
12249
|
+
connectOverlayEscapeClose(overlayRef, dialogRef.closed, () => dialogRef.close(Cancel.negative()));
|
|
12250
|
+
}
|
|
12251
|
+
else {
|
|
12252
|
+
connectOverlayEscapeBlock(overlayRef, dialogRef.closed);
|
|
12110
12253
|
}
|
|
12111
12254
|
const closedSubscription = component.closed.subscribe(() => {
|
|
12112
12255
|
closedSubscription.unsubscribe();
|
|
@@ -14794,7 +14937,6 @@ class DrawerRef extends PortalRef {
|
|
|
14794
14937
|
*/
|
|
14795
14938
|
class DrawerService extends PortalProvider {
|
|
14796
14939
|
// #region Fields
|
|
14797
|
-
_document;
|
|
14798
14940
|
_behaviors;
|
|
14799
14941
|
_portalInjector;
|
|
14800
14942
|
// #endregion
|
|
@@ -14806,7 +14948,6 @@ class DrawerService extends PortalProvider {
|
|
|
14806
14948
|
*/
|
|
14807
14949
|
constructor() {
|
|
14808
14950
|
super();
|
|
14809
|
-
this._document = inject(DOCUMENT);
|
|
14810
14951
|
this._behaviors = new Array();
|
|
14811
14952
|
for (const behavior of inject(DRAWER_BEHAVIORS, { optional: true }) ?? []) {
|
|
14812
14953
|
this.withBehavior(behavior);
|
|
@@ -14950,16 +15091,17 @@ class DrawerService extends PortalProvider {
|
|
|
14950
15091
|
component.setInput(p, config[p]);
|
|
14951
15092
|
}
|
|
14952
15093
|
});
|
|
15094
|
+
component.setInput('pressEscapeToClose', false);
|
|
15095
|
+
component.setInput('clickOutsideToClose', false);
|
|
14953
15096
|
if (config.clickOutsideToClose) {
|
|
14954
15097
|
connectOverlayOutsideClose(overlayRef, drawerRef.closed, () => drawerRef.close(Cancel.negative()));
|
|
14955
15098
|
}
|
|
14956
|
-
|
|
14957
|
-
|
|
14958
|
-
|
|
14959
|
-
|
|
14960
|
-
|
|
14961
|
-
|
|
14962
|
-
}
|
|
15099
|
+
}
|
|
15100
|
+
if (config?.pressEscapeToClose) {
|
|
15101
|
+
connectOverlayEscapeClose(overlayRef, drawerRef.closed, () => drawerRef.close(Cancel.negative()));
|
|
15102
|
+
}
|
|
15103
|
+
else {
|
|
15104
|
+
connectOverlayEscapeBlock(overlayRef, drawerRef.closed);
|
|
14963
15105
|
}
|
|
14964
15106
|
const closedSubscription = component.closed.subscribe(() => {
|
|
14965
15107
|
closedSubscription.unsubscribe();
|
|
@@ -15758,7 +15900,6 @@ class MessageBoxRef extends PortalRef {
|
|
|
15758
15900
|
*/
|
|
15759
15901
|
class MessageBoxService extends PortalProvider {
|
|
15760
15902
|
// #region Fields
|
|
15761
|
-
_document;
|
|
15762
15903
|
_messageBoxBehaviors;
|
|
15763
15904
|
// #endregion
|
|
15764
15905
|
// #region Ctor
|
|
@@ -15769,7 +15910,6 @@ class MessageBoxService extends PortalProvider {
|
|
|
15769
15910
|
*/
|
|
15770
15911
|
constructor(config = null, behaviors = null) {
|
|
15771
15912
|
super();
|
|
15772
|
-
this._document = inject(DOCUMENT);
|
|
15773
15913
|
this._messageBoxBehaviors = new Array();
|
|
15774
15914
|
for (const behavior of behaviors ?? []) {
|
|
15775
15915
|
this.withBehavior(behavior);
|
|
@@ -15886,6 +16026,8 @@ class MessageBoxService extends PortalProvider {
|
|
|
15886
16026
|
component.setInput(p, config[p]);
|
|
15887
16027
|
}
|
|
15888
16028
|
});
|
|
16029
|
+
component.setInput('pressEscapeToClose', false);
|
|
16030
|
+
component.setInput('clickOutsideToClose', false);
|
|
15889
16031
|
// Apply intl overrides directly on the native element's intl object
|
|
15890
16032
|
if (config.intl) {
|
|
15891
16033
|
Object.assign(messageBoxRef.element.intl, config.intl);
|
|
@@ -15893,13 +16035,12 @@ class MessageBoxService extends PortalProvider {
|
|
|
15893
16035
|
if (config.clickOutsideToClose) {
|
|
15894
16036
|
connectOverlayOutsideClose(overlayRef, messageBoxRef.closed, () => messageBoxRef.close(Cancel.negative()));
|
|
15895
16037
|
}
|
|
15896
|
-
|
|
15897
|
-
|
|
15898
|
-
|
|
15899
|
-
|
|
15900
|
-
|
|
15901
|
-
|
|
15902
|
-
}
|
|
16038
|
+
}
|
|
16039
|
+
if (config?.pressEscapeToClose) {
|
|
16040
|
+
connectOverlayEscapeClose(overlayRef, messageBoxRef.closed, () => messageBoxRef.close(Cancel.negative()));
|
|
16041
|
+
}
|
|
16042
|
+
else {
|
|
16043
|
+
connectOverlayEscapeBlock(overlayRef, messageBoxRef.closed);
|
|
15903
16044
|
}
|
|
15904
16045
|
// Bridge dialogResult (button clicks) to the ref's closed Observable
|
|
15905
16046
|
const dialogResultSubscription = component.dialogResult.subscribe((result) => {
|
|
@@ -17414,7 +17555,6 @@ class SheetRef extends PortalRef {
|
|
|
17414
17555
|
*/
|
|
17415
17556
|
class SheetService extends PortalProvider {
|
|
17416
17557
|
// #region Fields
|
|
17417
|
-
_document;
|
|
17418
17558
|
_sheetBehaviors;
|
|
17419
17559
|
_portalInjector;
|
|
17420
17560
|
// #endregion
|
|
@@ -17426,7 +17566,6 @@ class SheetService extends PortalProvider {
|
|
|
17426
17566
|
*/
|
|
17427
17567
|
constructor(config = null, behaviors = null) {
|
|
17428
17568
|
super();
|
|
17429
|
-
this._document = inject(DOCUMENT);
|
|
17430
17569
|
this._sheetBehaviors = new Array();
|
|
17431
17570
|
for (const behavior of behaviors ?? []) {
|
|
17432
17571
|
this.withBehavior(behavior);
|
|
@@ -17543,16 +17682,17 @@ class SheetService extends PortalProvider {
|
|
|
17543
17682
|
component.setInput(p, config[p]);
|
|
17544
17683
|
}
|
|
17545
17684
|
});
|
|
17685
|
+
component.setInput('pressEscapeToClose', false);
|
|
17686
|
+
component.setInput('clickOutsideToClose', false);
|
|
17546
17687
|
if (config.clickOutsideToClose) {
|
|
17547
17688
|
connectOverlayOutsideClose(overlayRef, sheetRef.closed, () => sheetRef.close(Cancel.negative()));
|
|
17548
17689
|
}
|
|
17549
|
-
|
|
17550
|
-
|
|
17551
|
-
|
|
17552
|
-
|
|
17553
|
-
|
|
17554
|
-
|
|
17555
|
-
}
|
|
17690
|
+
}
|
|
17691
|
+
if (config?.pressEscapeToClose) {
|
|
17692
|
+
connectOverlayEscapeClose(overlayRef, sheetRef.closed, () => sheetRef.close(Cancel.negative()));
|
|
17693
|
+
}
|
|
17694
|
+
else {
|
|
17695
|
+
connectOverlayEscapeBlock(overlayRef, sheetRef.closed);
|
|
17556
17696
|
}
|
|
17557
17697
|
const closedSubscription = component.closed.subscribe(() => {
|
|
17558
17698
|
closedSubscription.unsubscribe();
|
|
@@ -18172,7 +18312,6 @@ class ToastRef extends PortalRef {
|
|
|
18172
18312
|
*/
|
|
18173
18313
|
class ToastService extends PortalProvider {
|
|
18174
18314
|
// #region Fields
|
|
18175
|
-
_document;
|
|
18176
18315
|
_toastBehaviors;
|
|
18177
18316
|
// #endregion
|
|
18178
18317
|
// #region Ctor
|
|
@@ -18183,7 +18322,6 @@ class ToastService extends PortalProvider {
|
|
|
18183
18322
|
*/
|
|
18184
18323
|
constructor(config = null, behaviors = null) {
|
|
18185
18324
|
super();
|
|
18186
|
-
this._document = inject(DOCUMENT);
|
|
18187
18325
|
this._toastBehaviors = new Array();
|
|
18188
18326
|
for (const behavior of behaviors ?? []) {
|
|
18189
18327
|
this.withBehavior(behavior);
|
|
@@ -18303,16 +18441,17 @@ class ToastService extends PortalProvider {
|
|
|
18303
18441
|
component.setInput(p, config[p]);
|
|
18304
18442
|
}
|
|
18305
18443
|
});
|
|
18444
|
+
component.setInput('pressEscapeToClose', false);
|
|
18445
|
+
component.setInput('clickOutsideToClose', false);
|
|
18306
18446
|
if (config.clickOutsideToClose) {
|
|
18307
18447
|
connectOverlayOutsideClose(overlayRef, toastRef.closed, () => toastRef.close(Cancel.negative()));
|
|
18308
18448
|
}
|
|
18309
|
-
|
|
18310
|
-
|
|
18311
|
-
|
|
18312
|
-
|
|
18313
|
-
|
|
18314
|
-
|
|
18315
|
-
}
|
|
18449
|
+
}
|
|
18450
|
+
if (config?.pressEscapeToClose) {
|
|
18451
|
+
connectOverlayEscapeClose(overlayRef, toastRef.closed, () => toastRef.close(Cancel.negative()));
|
|
18452
|
+
}
|
|
18453
|
+
else {
|
|
18454
|
+
connectOverlayEscapeBlock(overlayRef, toastRef.closed);
|
|
18316
18455
|
}
|
|
18317
18456
|
const closedSubscription = component.closed.subscribe(() => {
|
|
18318
18457
|
closedSubscription.unsubscribe();
|
|
@@ -19192,12 +19331,12 @@ class TranslateService {
|
|
|
19192
19331
|
translate(key, ...args) {
|
|
19193
19332
|
return this._translator.translate(key, ...args);
|
|
19194
19333
|
}
|
|
19195
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: TranslateService, deps: [{ token:
|
|
19334
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: TranslateService, deps: [{ token: i2.TranslatorService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19196
19335
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: TranslateService });
|
|
19197
19336
|
}
|
|
19198
19337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: TranslateService, decorators: [{
|
|
19199
19338
|
type: Injectable
|
|
19200
|
-
}], ctorParameters: () => [{ type:
|
|
19339
|
+
}], ctorParameters: () => [{ type: i2.TranslatorService }] });
|
|
19201
19340
|
|
|
19202
19341
|
// #region Imports
|
|
19203
19342
|
// #endregion
|
|
@@ -81051,6 +81190,7 @@ const THEME2_DEFAULT_PROPS = new InjectionToken('MOSAIK_THEME2_DEFAULT_PROPS');
|
|
|
81051
81190
|
/**
|
|
81052
81191
|
* @public
|
|
81053
81192
|
*
|
|
81193
|
+
* @slot - The content that receives the scoped theme variables.
|
|
81054
81194
|
* @slot style - Custom styles injection slot for shadow DOM styling escape hatch
|
|
81055
81195
|
*/
|
|
81056
81196
|
let Theme2Component = class Theme2Component {
|