@breadstone/mosaik-elements-angular 0.0.53 → 0.0.55
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, ChangeDetectorRef, ElementRef, NgZone, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, makeEnvironmentProviders, DestroyRef, Directive, forwardRef, Pipe, ViewChild, ViewEncapsulation, TemplateRef, Injectable, Renderer2, signal, computed, effect, HostListener, ViewContainerRef, isDevMode } from '@angular/core';
|
|
3
|
-
import { AbsoluteItemElement, AbsoluteElement, AnchorElement, AppHeaderElement, AppElement, AutoCompleteBoxElement, AvatarGroupElement, avatarElementValueAccessor, AvatarElement, BackdropElement, BadgeElement, BannerHeaderElement, BannerSubHeaderElement, BannerElement, BottomSheetElement, BoxElement, BreadcrumbItemElement, BreadcrumbElement, ButtonGroupElement, ButtonElement, CalendarHeaderElement, CalendarItemElement, CalendarSubHeaderElement, calendarElementValueAccessor, CalendarElement, CameraElement, CardActionsElement, CardContentElement, CardFooterElement, CardHeaderElement, CardSubTitleElement, CardTitleElement, CardElement, Carousel2Element, CarouselItem2Element, CarouselItemElement, CarouselElement, CellGroupElement, CellElement, ChartElement, ChatHeaderElement, ChatMarkerElement, ChatMessageAvatarElement, ChatMessageDividerElement, ChatMessageElement, ChatElement, checkBoxGroupElementValueAccessor, CheckBoxGroupElement, checkboxElementValueAccessor, CheckboxElement, CheckmarkElement, ChipElement, chipBoxElementValueAccessor, ChipBoxElement, ChoiceGroupHeaderElement, choiceGroupElementValueAccessor, ChoiceGroupElement, choiceElementValueAccessor, ChoiceElement, CodeElement, ColorAreaElement, ColorPickerElement, ColorSliderElement, ColorSwatchGroupElement, ColorSwatchElement, ColorThumbElement, colorBoxElementValueAccessor, ColorBoxElement, ComboItemElement, comboElementValueAccessor, ComboElement, CommentElement, CompoundButtonElement, CookiesConsentElement, DataListElement, DataTableElement, dateBoxElementValueAccessor, DateBoxElement, dateTimeBoxElementValueAccessor, DateTimeBoxElement, DialogActionsElement, DialogContentElement, DialogFooterElement, DialogHeaderSubTextElement, DialogHeaderTextElement, DialogHeaderElement, DialogElement, DialogHostElement, DisclosureElement, DividerElement, DotElement, DrawerContainerElement, DrawerContentElement, DrawerElement, DropZoneElement, DropDownButtonElement, ElevationElement, EmojiElement, EmptyStateElement, EpgChannelElement, EpgProgramElement, EpgElement, ErrorStateElement, ErrorElement, ExpandableElement, ExpanderGroupElement, ExpanderHeaderElement, ExpanderSubHeaderElement, ExpanderElement, FloatingActionButtonGroupElement, FloatingActionButtonElement, FilePickerElement, FileUploadItemElement, fileUploadElementValueAccessor, FileUploadElement, FlipElement, FloatingTriggerElement, FloatingElement, FocusRingElement, FooterItemGroupElement, FooterItemElement, FooterElement, FormFieldElement, FormElement, GridItemElement, GridElement, HelmetElement, HintElement, IconElement, ImageElement, IndicatorElement, JumbtronHeaderElement, JumbtronSubHeaderElement, JumbtronElement, KbdShortcutElement, KbdElement, LightChainElement, ListItemGroupElement, ListItemElement, ListElement, MarqueeElement, MasonryElement, MenuItemGroupElement, MenuItemElement, MenuElement, MessageBoxElement, MeterBarElement, MeterRingElement, NumberCounterElement, NumberElement, numberBoxElementValueAccessor, NumberBoxElement, PageContentElement, PageHeaderElement, PagePreContentElement, PagePreHeaderElement, PageElement, PageMenuElement, PaginatorElement, passwordBoxElementValueAccessor, PasswordBoxElement, PatternElement, PersonaElement, PerspectiveElement, pinBoxElementValueAccessor, PinBoxElement, PopupElement, PortalProjectionElement, PortalElement, ProgressBarElement, ProgressRingElement, QRCodeElement, radioGroupElementValueAccessor, RadioGroupElement, radioElementValueAccessor, RadioElement, RatingElement, RepeatButtonElement, ResizeAdornerElement, RibbonElement, richTextBoxElementValueAccessor, RichTextBoxElement, RippleElement, ScaleElement, ScrollElement, searchBoxElementValueAccessor, SearchBoxElement, SegmentItemElement, SegmentElement, SelectItemGroupElement, SelectItemElement, selectElementValueAccessor, SelectElement, signaturePadElementValueAccessor, SignaturePadElement, SkeletonElement, sliderElementValueAccessor, SliderElement, Slider2ThumbElement, Slider2Element, SpacerElement, SplitButtonElement, SplitElement, StackElement, StickyElement, SuccessStateElement, SummaryElement, SwipeElement, TabItemElement, TabPanelElement, TabStripItemElement, TabStripElement, TabElement, TableBodyElement, TableCellElement, TableFooterElement, TableHeaderElement, TableRowElement, TableElement, TextFormatElement, TextElement, textBoxElementValueAccessor, TextBoxElement, Theme2Element, TickBarElement, TileListItemElement, TileListElement, timeBoxElementValueAccessor, TimeBoxElement, ToastElement, ToggleButtonElement, toggleSwitchElementValueAccessor, ToggleSwitchElement, ToggleTipElement, ToolbarElement, TooltipElement, TreeItemElement, TreeElement, UpDownSpinnerElement, VideoElement, VirtualizeElement, WizardStepElement, WizardElement, WrapElement, EID, Key, ToastServiceLocator, TranslatorService, Translator, TranslatorServiceLocator, BREAKPOINTS, AnimationPlayer2 } from '@breadstone/mosaik-elements-foundation';
|
|
3
|
+
import { AbsoluteItemElement, AbsoluteElement, AnchorElement, AppHeaderElement, AppElement, AutoCompleteBoxElement, AvatarGroupElement, avatarElementValueAccessor, AvatarElement, BackdropElement, BadgeElement, BannerHeaderElement, BannerSubHeaderElement, BannerElement, BottomSheetElement, BoxElement, BreadcrumbItemElement, BreadcrumbElement, ButtonGroupElement, ButtonElement, CalendarHeaderElement, CalendarItemElement, CalendarSubHeaderElement, calendarElementValueAccessor, CalendarElement, CameraElement, CardActionsElement, CardContentElement, CardFooterElement, CardHeaderElement, CardSubTitleElement, CardTitleElement, CardElement, Carousel2Element, CarouselItem2Element, CarouselItemElement, CarouselElement, CellGroupElement, CellElement, ChartElement, ChatHeaderElement, ChatMarkerElement, ChatMessageAvatarElement, ChatMessageDividerElement, ChatMessageElement, ChatElement, checkBoxGroupElementValueAccessor, CheckBoxGroupElement, checkboxElementValueAccessor, CheckboxElement, CheckmarkElement, ChipElement, chipBoxElementValueAccessor, ChipBoxElement, ChoiceGroupHeaderElement, choiceGroupElementValueAccessor, ChoiceGroupElement, choiceElementValueAccessor, ChoiceElement, CodeElement, ColorAreaElement, ColorPickerElement, ColorSliderElement, ColorSwatchGroupElement, ColorSwatchElement, ColorThumbElement, colorBoxElementValueAccessor, ColorBoxElement, ComboItemElement, comboElementValueAccessor, ComboElement, CommentElement, CompoundButtonElement, CookiesConsentElement, DataListElement, DataTableElement, dateBoxElementValueAccessor, DateBoxElement, dateTimeBoxElementValueAccessor, DateTimeBoxElement, DialogActionsElement, DialogContentElement, DialogFooterElement, DialogHeaderSubTextElement, DialogHeaderTextElement, DialogHeaderElement, DialogElement, DialogHostElement, DisclosureElement, DividerElement, DotElement, DrawerContainerElement, DrawerContentElement, DrawerElement, DropZoneElement, DropDownButtonElement, ElevationElement, EmojiElement, EmptyStateElement, EpgChannelElement, EpgProgramElement, EpgElement, ErrorStateElement, ErrorElement, ExpandableElement, ExpanderGroupElement, ExpanderHeaderElement, ExpanderSubHeaderElement, ExpanderElement, FloatingActionButtonGroupElement, FloatingActionButtonElement, FilePickerElement, FileUploadItemElement, fileUploadElementValueAccessor, FileUploadElement, FlipElement, FloatingTriggerElement, FloatingElement, FocusRingElement, FooterItemGroupElement, FooterItemElement, FooterElement, FormFieldElement, FormElement, GridItemElement, GridElement, HelmetElement, HintElement, IconElement, ImageElement, IndicatorElement, JumbtronHeaderElement, JumbtronSubHeaderElement, JumbtronElement, KbdShortcutElement, KbdElement, LightChainElement, ListItemGroupElement, ListItemElement, ListElement, MarqueeElement, MasonryElement, MenuItemGroupElement, MenuItemElement, MenuElement, MessageBoxElement, MeterBarElement, MeterRingElement, NumberCounterElement, NumberElement, numberBoxElementValueAccessor, NumberBoxElement, PageContentElement, PageHeaderElement, PagePreContentElement, PagePreHeaderElement, PageElement, PageMenuElement, PaginatorElement, passwordBoxElementValueAccessor, PasswordBoxElement, PatternElement, PersonaElement, PerspectiveElement, pinBoxElementValueAccessor, PinBoxElement, PopupElement, PortalProjectionElement, PortalElement, ProgressBarElement, ProgressRingElement, QRCodeElement, radioGroupElementValueAccessor, RadioGroupElement, radioElementValueAccessor, RadioElement, RatingElement, RepeatButtonElement, ResizeAdornerElement, RibbonElement, richTextBoxElementValueAccessor, RichTextBoxElement, RippleElement, ScaleElement, ScrollElement, searchBoxElementValueAccessor, SearchBoxElement, SegmentItemElement, SegmentElement, SelectItemGroupElement, SelectItemElement, selectElementValueAccessor, SelectElement, signaturePadElementValueAccessor, SignaturePadElement, SkeletonElement, sliderElementValueAccessor, SliderElement, Slider2ThumbElement, Slider2Element, SpacerElement, SplitButtonElement, SplitElement, StackElement, StickyElement, SuccessStateElement, SummaryElement, SwipeElement, TabItemElement, TabPanelElement, TabStripItemElement, TabStripElement, TabElement, TableBodyElement, TableCellElement, TableFooterElement, TableHeaderElement, TableRowElement, TableElement, TextFormatElement, TextElement, textBoxElementValueAccessor, TextBoxElement, Theme2Element, TickBarElement, TileListItemElement, TileListElement, timeBoxElementValueAccessor, TimeBoxElement, ToastElement, ToggleButtonElement, toggleSwitchElementValueAccessor, ToggleSwitchElement, ToggleTipElement, ToolbarElement, TooltipElement, TreeItemElement, TreeElement, UpDownSpinnerElement, VideoElement, VirtualizeElement, WizardStepElement, WizardElement, WrapElement, EID, Key, ToastServiceLocator, TranslatorService, Translator, TranslatorServiceLocator, BREAKPOINTS, AnimationPlayer2, Animation } from '@breadstone/mosaik-elements-foundation';
|
|
4
4
|
import { NgControl, TouchedChangeEvent, NG_VALUE_ACCESSOR, FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { filter, of, isObservable, Subject, BehaviorSubject, fromEvent, takeUntil, from } from 'rxjs';
|
|
@@ -55574,6 +55574,72 @@ function provideTheme(config) {
|
|
|
55574
55574
|
*/
|
|
55575
55575
|
const ANIMATION_REGISTRY = new InjectionToken('MOSAIK_ANIMATION_REGISTRY');
|
|
55576
55576
|
|
|
55577
|
+
// #region Imports
|
|
55578
|
+
// #endregion
|
|
55579
|
+
/**
|
|
55580
|
+
* Registry of animations
|
|
55581
|
+
*
|
|
55582
|
+
* @public
|
|
55583
|
+
*/
|
|
55584
|
+
class AnimationRegistry {
|
|
55585
|
+
//#region Fields
|
|
55586
|
+
_animations;
|
|
55587
|
+
//#endregion
|
|
55588
|
+
//#region Ctor
|
|
55589
|
+
/**
|
|
55590
|
+
* Constructs a new instance of the `AnimationRegistry` class.
|
|
55591
|
+
*
|
|
55592
|
+
* @public
|
|
55593
|
+
*/
|
|
55594
|
+
constructor() {
|
|
55595
|
+
this._animations = {};
|
|
55596
|
+
}
|
|
55597
|
+
//#endregion
|
|
55598
|
+
//#region Properties
|
|
55599
|
+
/**
|
|
55600
|
+
* Gets the registered animations.
|
|
55601
|
+
*
|
|
55602
|
+
* @public
|
|
55603
|
+
* @readonly
|
|
55604
|
+
*/
|
|
55605
|
+
get animations() {
|
|
55606
|
+
return this._animations;
|
|
55607
|
+
}
|
|
55608
|
+
//#endregion
|
|
55609
|
+
//#region Methods
|
|
55610
|
+
/**
|
|
55611
|
+
* Registers an animation with the registry.
|
|
55612
|
+
*
|
|
55613
|
+
* @public
|
|
55614
|
+
* @param name - The name of the animation.
|
|
55615
|
+
* @param animation - The animation options to register.
|
|
55616
|
+
*/
|
|
55617
|
+
register(name, animation) {
|
|
55618
|
+
if (!name || !animation) {
|
|
55619
|
+
throw new Error('Animation name and options must be provided.');
|
|
55620
|
+
}
|
|
55621
|
+
this._animations[name] = animation;
|
|
55622
|
+
}
|
|
55623
|
+
/**
|
|
55624
|
+
* Unregister an animation from the registry.
|
|
55625
|
+
*
|
|
55626
|
+
* @public
|
|
55627
|
+
* @param name - The name of the animation to retrieve.
|
|
55628
|
+
* @returns The animation options if found, otherwise undefined.
|
|
55629
|
+
*/
|
|
55630
|
+
unregister(name) {
|
|
55631
|
+
if (!name) {
|
|
55632
|
+
throw new Error('Animation name must be provided.');
|
|
55633
|
+
}
|
|
55634
|
+
delete this._animations[name];
|
|
55635
|
+
}
|
|
55636
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AnimationRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
55637
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AnimationRegistry });
|
|
55638
|
+
}
|
|
55639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AnimationRegistry, decorators: [{
|
|
55640
|
+
type: Injectable
|
|
55641
|
+
}], ctorParameters: () => [] });
|
|
55642
|
+
|
|
55577
55643
|
// #region Imports
|
|
55578
55644
|
// #endregion
|
|
55579
55645
|
/**
|
|
@@ -55586,6 +55652,21 @@ function provideAnimate(config) {
|
|
|
55586
55652
|
useValue: config?.animations,
|
|
55587
55653
|
multi: true
|
|
55588
55654
|
},
|
|
55655
|
+
{
|
|
55656
|
+
provide: AnimationRegistry,
|
|
55657
|
+
useFactory: () => {
|
|
55658
|
+
const service = new AnimationRegistry();
|
|
55659
|
+
Object.entries(Animation).forEach((anim) => {
|
|
55660
|
+
service.register(anim[0], anim[1]);
|
|
55661
|
+
});
|
|
55662
|
+
if (config?.animations) {
|
|
55663
|
+
Object.entries(config.animations).forEach((anim) => {
|
|
55664
|
+
service.register(anim[0], anim[1]);
|
|
55665
|
+
});
|
|
55666
|
+
}
|
|
55667
|
+
return service;
|
|
55668
|
+
}
|
|
55669
|
+
},
|
|
55589
55670
|
{
|
|
55590
55671
|
provide: AnimationPlayer2,
|
|
55591
55672
|
useClass: AnimationPlayer2
|
|
@@ -55607,8 +55688,13 @@ class AnimateDirective {
|
|
|
55607
55688
|
_options;
|
|
55608
55689
|
// #endregion
|
|
55609
55690
|
// #region Ctor
|
|
55691
|
+
/**
|
|
55692
|
+
* Constructs a new instance of the `AnimateDirective` class.
|
|
55693
|
+
*
|
|
55694
|
+
* @public
|
|
55695
|
+
*/
|
|
55610
55696
|
constructor() {
|
|
55611
|
-
this._registry = inject(ANIMATION_REGISTRY);
|
|
55697
|
+
this._registry = Object.assign({}, ...inject(ANIMATION_REGISTRY, { optional: true }));
|
|
55612
55698
|
this._element = inject(ElementRef);
|
|
55613
55699
|
this._animationPlayer = inject(AnimationPlayer2);
|
|
55614
55700
|
this._renderer = inject(Renderer2);
|
|
@@ -55642,7 +55728,7 @@ class AnimateDirective {
|
|
|
55642
55728
|
tryTrigger() {
|
|
55643
55729
|
if (typeof this._options === 'string') {
|
|
55644
55730
|
this._options = this._registry[this._options];
|
|
55645
|
-
if (this._options) {
|
|
55731
|
+
if (!this._options) {
|
|
55646
55732
|
console.warn(`[AnimateDirective]: The animation with "${this._options}" was not found.`);
|
|
55647
55733
|
return;
|
|
55648
55734
|
}
|