@testgorilla/tgo-ui 11.15.0 → 11.17.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": "@testgorilla/tgo-ui",
3
- "version": "11.15.0",
3
+ "version": "11.17.0",
4
4
  "license": "proprietary-license",
5
5
  "lint-staged": {
6
6
  "{projects,components}/**/*.ts": [
@@ -1,6 +1,6 @@
1
1
  import * as _testgorilla_tgo_ui_components_core from '@testgorilla/tgo-ui/components/core';
2
2
  import * as _angular_core from '@angular/core';
3
- import { InjectionToken, ViewContainerRef, ElementRef, Type, TemplateRef, Injector } from '@angular/core';
3
+ import { InjectionToken, Signal, TemplateRef, OutputEmitterRef, ViewContainerRef, ElementRef, Type, Injector } from '@angular/core';
4
4
  import { Observable } from 'rxjs';
5
5
  import * as _angular_animations from '@angular/animations';
6
6
 
@@ -12,6 +12,19 @@ declare enum SidePanelAnimationState {
12
12
  ClosedLeft = "closedLeft"
13
13
  }
14
14
  type SidePanelSize = 'small' | 'large' | 'x-large';
15
+ /**
16
+ * What a `ui-side-panel-view` registers with the surrounding `SidePanelComponent`. The panel
17
+ * types its registration against this rather than importing the view component, which keeps
18
+ * the two files free of a runtime import cycle. `undefined` means "falls back to the config".
19
+ */
20
+ interface SidePanelViewRef {
21
+ readonly title: Signal<string | undefined>;
22
+ readonly showBackButton: Signal<boolean | undefined>;
23
+ readonly footerTemplate: Signal<TemplateRef<unknown> | null>;
24
+ readonly footerDivider: Signal<boolean>;
25
+ readonly fillHeight: Signal<boolean>;
26
+ readonly back: OutputEmitterRef<void>;
27
+ }
15
28
  declare class SidePanelConfig {
16
29
  title: string;
17
30
  position: SidePanelPosition;
@@ -51,6 +64,8 @@ declare class SidePanelRef<T = any, R = any> {
51
64
  }
52
65
 
53
66
  declare class SidePanelComponent {
67
+ private readonly sidePanelService;
68
+ sidePanelConfig: SidePanelConfig;
54
69
  sidePanelPosition: _angular_core.WritableSignal<SidePanelPosition>;
55
70
  sidePanelContainer: _angular_core.Signal<ViewContainerRef>;
56
71
  sidePanel: _angular_core.Signal<ElementRef<HTMLDivElement>>;
@@ -61,18 +76,67 @@ declare class SidePanelComponent {
61
76
  isSmall: _angular_core.Signal<boolean>;
62
77
  isLarge: _angular_core.Signal<boolean>;
63
78
  isXLarge: _angular_core.Signal<boolean>;
79
+ private readonly activeView;
80
+ protected readonly headerTitle: _angular_core.Signal<string>;
81
+ protected readonly showBackButton: _angular_core.Signal<boolean>;
82
+ protected readonly footerTemplate: _angular_core.Signal<_angular_core.TemplateRef<unknown> | null>;
83
+ /** A view owns the back button only when it asked for one; otherwise the config did. */
84
+ private readonly viewOwnsBackButton;
85
+ protected readonly footerDivider: _angular_core.Signal<boolean>;
86
+ protected readonly fillHeight: _angular_core.Signal<boolean>;
64
87
  animation: _angular_core.Signal<SidePanelAnimationState.Open | SidePanelAnimationState.ClosedRight | SidePanelAnimationState.ClosedLeft>;
65
- private readonly sidePanelService;
66
- sidePanelConfig: SidePanelConfig;
67
88
  protected readonly closeButtonTestId: string | null;
68
89
  protected readonly backButtonTestId: string | null;
69
90
  constructor();
91
+ /** The last view to register wins, so a control-flow swap in either order ends up correct. */
92
+ registerView(view: SidePanelViewRef): void;
93
+ /** Guarded by identity so a view destroyed after its successor was created cannot unseat it. */
94
+ unregisterView(view: SidePanelViewRef): void;
95
+ /**
96
+ * The action follows whoever asked for the button, so that a consumer who leaves the flag in the
97
+ * config and adopts a view for its footer gets the old close behaviour rather than a dead button.
98
+ */
99
+ protected onBack(): void;
70
100
  open(): void;
71
101
  close(result?: unknown): void;
72
102
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidePanelComponent, never>;
73
103
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidePanelComponent, "ui-side-panel", never, {}, {}, never, never, true, never>;
74
104
  }
75
105
 
106
+ /**
107
+ * One view inside a side panel: its body, its header title and its footer. Render a different
108
+ * one per step to switch views without reopening the panel.
109
+ */
110
+ declare class SidePanelViewComponent implements SidePanelViewRef {
111
+ /** Left unset, the panel keeps the title from `SidePanelConfig`. */
112
+ readonly title: _angular_core.InputSignal<string | undefined>;
113
+ /** Left unset, the panel falls back to `SidePanelConfig.showBackButton`. */
114
+ readonly showBackButton: _angular_core.InputSignalWithTransform<boolean | undefined, unknown>;
115
+ /** Draws a rule above the footer, separating it from content that scrolls underneath. */
116
+ readonly footerDivider: _angular_core.InputSignalWithTransform<boolean, unknown>;
117
+ /**
118
+ * Makes the view fill the panel body instead of growing with its content, and stops the panel
119
+ * scrolling. Content then owns its own overflow — give the element that should scroll
120
+ * `flex: 1; min-height: 0; overflow: auto`, or `height: 100%`.
121
+ */
122
+ readonly fillHeight: _angular_core.InputSignalWithTransform<boolean, unknown>;
123
+ /** The panel does not close itself — move to the previous view, or close it yourself. */
124
+ readonly back: _angular_core.OutputEmitterRef<void>;
125
+ private readonly footer;
126
+ readonly footerTemplate: _angular_core.Signal<_angular_core.TemplateRef<unknown> | null>;
127
+ private readonly panel;
128
+ constructor();
129
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidePanelViewComponent, never>;
130
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidePanelViewComponent, "ui-side-panel-view", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "showBackButton": { "alias": "showBackButton"; "required": false; "isSignal": true; }; "footerDivider": { "alias": "footerDivider"; "required": false; "isSignal": true; }; "fillHeight": { "alias": "fillHeight"; "required": false; "isSignal": true; }; }, { "back": "back"; }, ["footer"], ["*"], true, never>;
131
+ }
132
+
133
+ /** Marks the `ng-template` inside a `ui-side-panel-view` that holds the view's footer. */
134
+ declare class SidePanelFooterDirective {
135
+ readonly templateRef: TemplateRef<unknown>;
136
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidePanelFooterDirective, never>;
137
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SidePanelFooterDirective, "ng-template[uiSidePanelFooter]", never, {}, {}, never, never, true, never>;
138
+ }
139
+
76
140
  declare class SidePanelService {
77
141
  private SidePanelComponentRef?;
78
142
  private contentComponentRef?;
@@ -99,5 +163,5 @@ declare const backdropAnimation: _angular_animations.AnimationTriggerMetadata[];
99
163
 
100
164
  declare const SIDE_PANEL_DATA: InjectionToken<unknown>;
101
165
 
102
- export { SIDE_PANEL_CONFIG, SIDE_PANEL_DATA, SidePanelAnimationState, SidePanelComponent, SidePanelConfig, SidePanelRef, SidePanelService, backdropAnimation, defaultSidePanelConfig, sidePanelAnimation, sidePanelAnimationDuration };
103
- export type { SidePanelPosition, SidePanelSize };
166
+ export { SIDE_PANEL_CONFIG, SIDE_PANEL_DATA, SidePanelAnimationState, SidePanelComponent, SidePanelConfig, SidePanelFooterDirective, SidePanelRef, SidePanelService, SidePanelViewComponent, backdropAnimation, defaultSidePanelConfig, sidePanelAnimation, sidePanelAnimationDuration };
167
+ export type { SidePanelPosition, SidePanelSize, SidePanelViewRef };
@@ -132,6 +132,13 @@ declare class SliderComponent implements Validator {
132
132
  * Basic variant only. See {@link dragStart}.
133
133
  */
134
134
  dragEnd: _angular_core.OutputEmitterRef<number>;
135
+ /**
136
+ * Emitted with the thumb's current value on every move while the user is dragging it.
137
+ * Basic variant only, and pointer drag only: keyboard seeks and programmatic writes never
138
+ * emit it and keep arriving through `sliderValueChange`. See {@link dragStart}.
139
+ */
140
+ dragMove: _angular_core.OutputEmitterRef<number>;
141
+ private isDragging;
135
142
  /**
136
143
  * Tracks hover, so the value bubble markup is only mounted while the pointer is over the slider.
137
144
  * Starts true to keep the at-rest markup identical to what the component shipped before
@@ -157,6 +164,7 @@ declare class SliderComponent implements Validator {
157
164
  protected onValueChange(ev?: number): void;
158
165
  protected onSliderHover(isHovered: boolean): void;
159
166
  protected onDragStart(event: MatSliderDragEvent): void;
167
+ protected onDragMove(value: number): void;
160
168
  protected onDragEnd(event: MatSliderDragEvent): void;
161
169
  protected onInputBlur(inputName: string): void;
162
170
  protected onInputFocus(): void;
@@ -166,7 +174,7 @@ declare class SliderComponent implements Validator {
166
174
  formatLabel(value: number): string;
167
175
  validate(control: AbstractControl): ValidationErrors | null;
168
176
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SliderComponent, [{ optional: true; }]>;
169
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SliderComponent, "ui-slider", never, { "max": { "alias": "max"; "required": false; }; "min": { "alias": "min"; "required": false; }; "percentage": { "alias": "percentage"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "sliderStart": { "alias": "sliderStart"; "required": false; }; "sliderEnd": { "alias": "sliderEnd"; "required": false; }; "label": { "alias": "label"; "required": false; }; "showInputs": { "alias": "showInputs"; "required": false; }; "step": { "alias": "step"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "useDecimal": { "alias": "useDecimal"; "required": false; "isSignal": true; }; "useThousandsSeparator": { "alias": "useThousandsSeparator"; "required": false; "isSignal": true; }; "minLabel": { "alias": "minLabel"; "required": false; "isSignal": true; }; "maxLabel": { "alias": "maxLabel"; "required": false; "isSignal": true; }; "inputWidth": { "alias": "inputWidth"; "required": false; "isSignal": true; }; "showValueBubble": { "alias": "showValueBubble"; "required": false; "isSignal": true; }; }, { "sliderValueChange": "sliderValueChange"; "dragStart": "dragStart"; "dragEnd": "dragEnd"; }, never, never, true, never>;
177
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SliderComponent, "ui-slider", never, { "max": { "alias": "max"; "required": false; }; "min": { "alias": "min"; "required": false; }; "percentage": { "alias": "percentage"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "sliderStart": { "alias": "sliderStart"; "required": false; }; "sliderEnd": { "alias": "sliderEnd"; "required": false; }; "label": { "alias": "label"; "required": false; }; "showInputs": { "alias": "showInputs"; "required": false; }; "step": { "alias": "step"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "useDecimal": { "alias": "useDecimal"; "required": false; "isSignal": true; }; "useThousandsSeparator": { "alias": "useThousandsSeparator"; "required": false; "isSignal": true; }; "minLabel": { "alias": "minLabel"; "required": false; "isSignal": true; }; "maxLabel": { "alias": "maxLabel"; "required": false; "isSignal": true; }; "inputWidth": { "alias": "inputWidth"; "required": false; "isSignal": true; }; "showValueBubble": { "alias": "showValueBubble"; "required": false; "isSignal": true; }; }, { "sliderValueChange": "sliderValueChange"; "dragStart": "dragStart"; "dragEnd": "dragEnd"; "dragMove": "dragMove"; }, never, never, true, never>;
170
178
  }
171
179
 
172
180
  declare class SliderComponentModule {