@skyux/core 15.0.0-alpha.9 → 15.0.0-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/core",
3
- "version": "15.0.0-alpha.9",
3
+ "version": "15.0.0-beta.0",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -21,7 +21,7 @@
21
21
  "@angular/core": "^22.1.2",
22
22
  "@angular/platform-browser": "^22.1.2",
23
23
  "@angular/router": "^22.1.2",
24
- "@skyux/i18n": "15.0.0-alpha.9"
24
+ "@skyux/i18n": "15.0.0-beta.0"
25
25
  },
26
26
  "dependencies": {
27
27
  "tslib": "^2.8.1"
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Provider, Predicate, DebugElement } from '@angular/core';
3
- import { SkyMediaQueryService, SkyMediaBreakpoints, SkyMediaQueryListener, SkyUIConfigService, SkyBreakpoint } from '@skyux/core';
2
+ import { Provider, EnvironmentProviders, Predicate, DebugElement } from '@angular/core';
3
+ import { SkyMediaQueryService, SkyMediaBreakpoints, SkyMediaQueryListener, SkyUIConfigService, SkyInstrumentationEvent, SkyBreakpoint } from '@skyux/core';
4
4
  import { BehaviorSubject, Subscription, Observable } from 'rxjs';
5
5
  import { BaseHarnessFilters, ComponentHarness, ComponentHarnessConstructor, HarnessPredicate, HarnessQuery, TestElement } from '@angular/cdk/testing';
6
6
  import { ComponentFixture } from '@angular/core/testing';
@@ -97,6 +97,30 @@ declare class SkyHelpTestingModule {
97
97
  static ɵinj: i0.ɵɵInjectorDeclaration<SkyHelpTestingModule>;
98
98
  }
99
99
 
100
+ /**
101
+ * Registers a listener that records the instrumentation events emitted during a
102
+ * unit test. Inject `SkyInstrumentationTestingController` to validate them.
103
+ */
104
+ declare function provideSkyInstrumentationTesting(): EnvironmentProviders;
105
+
106
+ /**
107
+ * Validates the instrumentation events emitted during a unit test.
108
+ */
109
+ declare abstract class SkyInstrumentationTestingController {
110
+ /**
111
+ * Throws an error if the expected event was not emitted.
112
+ * @param evt The expected event. All properties must match an emitted event.
113
+ */
114
+ abstract expectEvent(evt: SkyInstrumentationEvent): void;
115
+ /**
116
+ * Throws an error if the expected event was not emitted a specific number of
117
+ * times.
118
+ * @param evt The expected event. All properties must match an emitted event.
119
+ * @param count The expected number of times the event was emitted.
120
+ */
121
+ abstract expectEventCount(evt: SkyInstrumentationEvent, count: number): void;
122
+ }
123
+
100
124
  /**
101
125
  * A controller to be injected into tests, which mocks the
102
126
  * `SkyMediaQueryService` and handles interactions with breakpoints.
@@ -280,5 +304,5 @@ declare class SkyInputHarness extends ComponentHarness {
280
304
  setValue(value: string): Promise<void>;
281
305
  }
282
306
 
283
- export { MockSkyMediaQueryService, MockSkyUIConfigService, SkyAppTestUtility, SkyBy, SkyComponentHarness, SkyCoreTestingModule, SkyHarnessUtility, SkyHelpTestingController, SkyHelpTestingModule, SkyInputHarness, SkyMediaQueryTestingController, SkyOverlayHarness, SkyQueryableComponentHarness, mockResizeObserver, mockResizeObserverEntry, mockResizeObserverHandle, provideSkyFileReaderTesting, provideSkyMediaQueryTesting };
307
+ export { MockSkyMediaQueryService, MockSkyUIConfigService, SkyAppTestUtility, SkyBy, SkyComponentHarness, SkyCoreTestingModule, SkyHarnessUtility, SkyHelpTestingController, SkyHelpTestingModule, SkyInputHarness, SkyInstrumentationTestingController, SkyMediaQueryTestingController, SkyOverlayHarness, SkyQueryableComponentHarness, mockResizeObserver, mockResizeObserverEntry, mockResizeObserverHandle, provideSkyFileReaderTesting, provideSkyInstrumentationTesting, provideSkyMediaQueryTesting };
284
308
  export type { SkyAppTestUtilityDomEventOptions, SkyHarnessFilters, SkyOverlayHarnessFilters };
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { RendererFactory2, ElementRef, OnInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, Renderer2, NgZone, EnvironmentProviders, StaticProvider, Type, ViewContainerRef, EnvironmentInjector, ApplicationRef, ComponentRef, InjectionToken, Provider, Injector, PipeTransform, ChangeDetectorRef, TemplateRef, EmbeddedViewRef, AfterViewInit } from '@angular/core';
2
+ import { RendererFactory2, ElementRef, OnInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, Renderer2, NgZone, EnvironmentProviders, StaticProvider, Type, ViewContainerRef, EnvironmentInjector, ApplicationRef, ComponentRef, InjectionToken, Injector, Provider, PipeTransform, ChangeDetectorRef, TemplateRef, EmbeddedViewRef, AfterViewInit } from '@angular/core';
3
3
  import { ViewportRuler } from '@angular/cdk/overlay';
4
4
  import { Observable, ReplaySubject, Subscription } from 'rxjs';
5
5
  import * as i1 from '@skyux/i18n';
@@ -846,6 +846,93 @@ declare class SkyIdService {
846
846
  static ɵprov: i0.ɵɵInjectableDeclaration<SkyIdService>;
847
847
  }
848
848
 
849
+ /**
850
+ * Describes the region of the page that an instrumentation event came from.
851
+ */
852
+ interface SkyInstrumentationContextValue {
853
+ /**
854
+ * Identifies the context. Listeners filter on this value.
855
+ */
856
+ name: string;
857
+ /**
858
+ * Values describing the context, such as record identifiers.
859
+ */
860
+ detail?: Record<string, unknown>;
861
+ /**
862
+ * The context that encloses this one, when contexts are nested. Walk this
863
+ * chain to read the name and detail of each enclosing context.
864
+ */
865
+ parent?: SkyInstrumentationContextValue;
866
+ }
867
+ /**
868
+ * An interaction reported by a SKY UX component, delivered to every registered
869
+ * `SkyInstrumentationListener`.
870
+ */
871
+ interface SkyInstrumentationEvent {
872
+ /**
873
+ * The context resolved from the nearest `skyInstrumentationContext`, or
874
+ * `undefined` when the component is not within one.
875
+ */
876
+ context?: SkyInstrumentationContextValue;
877
+ /**
878
+ * The name of the event, such as `sky.help-inline.help-requested`.
879
+ */
880
+ eventName: string;
881
+ /**
882
+ * Values describing the interaction, such as the help key that was requested.
883
+ */
884
+ eventDetail?: Record<string, unknown>;
885
+ }
886
+
887
+ /**
888
+ * Describes the region of the page that the instrumentation events emitted
889
+ * within this element came from. Nest contexts to add more specific
890
+ * information.
891
+ */
892
+ declare class SkyInstrumentationContext {
893
+ /**
894
+ * The context to attach to instrumentation events emitted within this
895
+ * element.
896
+ */
897
+ readonly skyInstrumentationContext: i0.InputSignal<SkyInstrumentationContextValue>;
898
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyInstrumentationContext, never>;
899
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SkyInstrumentationContext, "[skyInstrumentationContext]", never, { "skyInstrumentationContext": { "alias": "skyInstrumentationContext"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
900
+ }
901
+
902
+ /**
903
+ * Forwards the instrumentation context resolved from the given injector to a
904
+ * dynamically created component, such as a modal or flyout, which would
905
+ * otherwise render outside of the launching element.
906
+ */
907
+ declare function provideSkyInstrumentationContextFrom(injector: Injector): StaticProvider[];
908
+
909
+ /**
910
+ * @internal
911
+ */
912
+ interface _SkyInstrumentationEmitter {
913
+ emit(eventName: string, eventDetail?: Record<string, unknown>): void;
914
+ }
915
+ /**
916
+ * @internal
917
+ */
918
+ declare function _injectSkyInstrumentationEmitter(): _SkyInstrumentationEmitter;
919
+
920
+ /**
921
+ * Receives the instrumentation events emitted by SKY UX components.
922
+ */
923
+ interface SkyInstrumentationListener {
924
+ /**
925
+ * Called once for each event, in the order the events are emitted.
926
+ */
927
+ handleEvent(evt: SkyInstrumentationEvent): void;
928
+ }
929
+ /**
930
+ * Registers a listener to receive instrumentation events. Provide this in your
931
+ * application config so that components in lazy-loaded routes can reach the
932
+ * listener.
933
+ */
934
+ declare function provideSkyInstrumentationListener(listener: Type<SkyInstrumentationListener>): EnvironmentProviders;
935
+
849
936
  interface SkyLayoutHostForChildArgs {
850
937
  layout: string;
851
938
  }
@@ -1768,5 +1855,5 @@ declare class Version {
1768
1855
  */
1769
1856
  declare const VERSION: Version;
1770
1857
 
1771
- export { NumericOptions, SKY_BREAKPOINTS, SKY_BREAKPOINT_OBSERVER, SKY_HELP_GLOBAL_OPTIONS, SKY_ICON_SVG_URL, SKY_LOG_LEVEL, SKY_STACKING_CONTEXT, SkyAffixAutoFitContext, SkyAffixModule, SkyAffixService, SkyAffixer, SkyAppFormat, SkyAppTitleService, SkyAppWindowRef, SkyContainerBreakpointObserver, SkyContentInfoProvider, SkyCoreAdapterModule, SkyCoreAdapterService, SkyDefaultInputProvider, SkyDockItem, SkyDockLocation, SkyDockModule, SkyDockService, SkyDynamicComponentLegacyService, SkyDynamicComponentLocation, SkyDynamicComponentModule, SkyDynamicComponentService, SkyFileReaderService, SkyHelpService, SkyIdModule, SkyIdService, SkyLayoutHostDirective, SkyLayoutHostService, SkyLiveAnnouncerService, SkyLogLevel, SkyLogModule, SkyLogService, SkyMediaBreakpointObserver, SkyMediaBreakpoints, SkyMediaQueryModule, SkyMediaQueryService, SkyMutationObserverService, SkyNumericModule, SkyNumericPipe, SkyNumericService, SkyOverlayInstance, SkyOverlayLegacyService, SkyOverlayModule, SkyOverlayService, SkyPercentPipe, SkyPercentPipeModule, SkyResizeObserverMediaQueryService, SkyResizeObserverService, SkyResponsiveHostDirective, SkyScreenReaderLabelDirective, SkyScrollShadowDirective, SkyScrollableHostService, SkyTrimModule, SkyUIConfigService, SkyViewkeeper, SkyViewkeeperHostOptions, SkyViewkeeperModule, SkyViewkeeperService, VERSION, _SkyAnimationEndHandlerDirective, _SkyAnimationSlideComponent, _SkyTransitionEndHandlerDirective, provideNoopSkyAnimations, provideSkyBreakpointObserver, SkyAffixDirective as λ1, SkyIdDirective as λ2, SkyViewkeeperDirective as λ3, SkyTrimDirective as λ4 };
1772
- export type { SkyAffixConfig, SkyAffixHorizontalAlignment, SkyAffixOffset, SkyAffixOffsetChange, SkyAffixPlacement, SkyAffixPlacementChange, SkyAffixPosition, SkyAffixVerticalAlignment, SkyAppSetTitleArgs, SkyBreakpoint, SkyBreakpointObserver, SkyContentInfo, SkyContentInfoDescriptor, SkyDockInsertComponentConfig, SkyDockItemConfig, SkyDockOptions, SkyDynamicComponentOptions, SkyFocusableChildrenOptions, SkyHelpGlobalOptions, SkyHelpOpenArgs, SkyHelpUpdateArgs, SkyLayoutHostForChildArgs, SkyLiveAnnouncerArgs, SkyLiveAnnouncerPoliteness, SkyMediaQueryListener, SkyNumericOptions, SkyNumericSymbol, SkyOverlayConfig, SkyOverlayPosition, SkyScrollShadowEventArgs, SkyStackingContext, SkyViewkeeperOptions };
1858
+ export { NumericOptions, SKY_BREAKPOINTS, SKY_BREAKPOINT_OBSERVER, SKY_HELP_GLOBAL_OPTIONS, SKY_ICON_SVG_URL, SKY_LOG_LEVEL, SKY_STACKING_CONTEXT, SkyAffixAutoFitContext, SkyAffixModule, SkyAffixService, SkyAffixer, SkyAppFormat, SkyAppTitleService, SkyAppWindowRef, SkyContainerBreakpointObserver, SkyContentInfoProvider, SkyCoreAdapterModule, SkyCoreAdapterService, SkyDefaultInputProvider, SkyDockItem, SkyDockLocation, SkyDockModule, SkyDockService, SkyDynamicComponentLegacyService, SkyDynamicComponentLocation, SkyDynamicComponentModule, SkyDynamicComponentService, SkyFileReaderService, SkyHelpService, SkyIdModule, SkyIdService, SkyInstrumentationContext, SkyLayoutHostDirective, SkyLayoutHostService, SkyLiveAnnouncerService, SkyLogLevel, SkyLogModule, SkyLogService, SkyMediaBreakpointObserver, SkyMediaBreakpoints, SkyMediaQueryModule, SkyMediaQueryService, SkyMutationObserverService, SkyNumericModule, SkyNumericPipe, SkyNumericService, SkyOverlayInstance, SkyOverlayLegacyService, SkyOverlayModule, SkyOverlayService, SkyPercentPipe, SkyPercentPipeModule, SkyResizeObserverMediaQueryService, SkyResizeObserverService, SkyResponsiveHostDirective, SkyScreenReaderLabelDirective, SkyScrollShadowDirective, SkyScrollableHostService, SkyTrimModule, SkyUIConfigService, SkyViewkeeper, SkyViewkeeperHostOptions, SkyViewkeeperModule, SkyViewkeeperService, VERSION, _SkyAnimationEndHandlerDirective, _SkyAnimationSlideComponent, _SkyTransitionEndHandlerDirective, _injectSkyInstrumentationEmitter, provideNoopSkyAnimations, provideSkyBreakpointObserver, provideSkyInstrumentationContextFrom, provideSkyInstrumentationListener, SkyAffixDirective as λ1, SkyIdDirective as λ2, SkyViewkeeperDirective as λ3, SkyTrimDirective as λ4 };
1859
+ export type { SkyAffixConfig, SkyAffixHorizontalAlignment, SkyAffixOffset, SkyAffixOffsetChange, SkyAffixPlacement, SkyAffixPlacementChange, SkyAffixPosition, SkyAffixVerticalAlignment, SkyAppSetTitleArgs, SkyBreakpoint, SkyBreakpointObserver, SkyContentInfo, SkyContentInfoDescriptor, SkyDockInsertComponentConfig, SkyDockItemConfig, SkyDockOptions, SkyDynamicComponentOptions, SkyFocusableChildrenOptions, SkyHelpGlobalOptions, SkyHelpOpenArgs, SkyHelpUpdateArgs, SkyInstrumentationContextValue, SkyInstrumentationEvent, SkyInstrumentationListener, SkyLayoutHostForChildArgs, SkyLiveAnnouncerArgs, SkyLiveAnnouncerPoliteness, SkyMediaQueryListener, SkyNumericOptions, SkyNumericSymbol, SkyOverlayConfig, SkyOverlayPosition, SkyScrollShadowEventArgs, SkyStackingContext, SkyViewkeeperOptions, _SkyInstrumentationEmitter };