@quadrel-enterprise-ui/framework 20.27.0 → 20.27.2

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/index.d.ts CHANGED
@@ -7,14 +7,14 @@ import { InjectionToken, EventEmitter, OnInit, PipeTransform, TemplateRef, After
7
7
  import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpParams } from '@angular/common/http';
8
8
  import * as i2 from '@angular/common';
9
9
  import { Moment } from 'moment/moment';
10
- import * as i31 from '@angular/forms';
10
+ import * as i30 from '@angular/forms';
11
11
  import { AbstractControl, UntypedFormGroup, ControlValueAccessor, UntypedFormControl, ValidationErrors, FormControlOptions, AsyncValidatorFn, ValidatorFn, UntypedFormArray, AbstractControlOptions, ɵTypedOrUntyped as _TypedOrUntyped, UntypedFormBuilder, FormGroup, FormArray } from '@angular/forms';
12
12
  import * as i9 from '@ngx-translate/core';
13
13
  import { TranslateService } from '@ngx-translate/core';
14
14
  import { OverlayRef, OverlayPositionBuilder, Overlay, ConnectedPosition } from '@angular/cdk/overlay';
15
15
  import * as i4 from '@angular/router';
16
16
  import { Params } from '@angular/router';
17
- import * as i39 from 'ngx-editor';
17
+ import * as i38 from 'ngx-editor';
18
18
  import { Editor, Toolbar } from 'ngx-editor';
19
19
  import { Moment as Moment$1 } from 'moment';
20
20
  import { Highlightable, ActiveDescendantKeyManager } from '@angular/cdk/a11y';
@@ -628,7 +628,9 @@ declare class QdMockPopoverOnClickDirective {
628
628
  qdPopoverHeight: any;
629
629
  qdPopoverMinHeight: any;
630
630
  qdPopoverMaxHeight: any;
631
- positionStrategy: any;
631
+ qdPopoverPlacement: any;
632
+ qdPopoverOffsetX: any;
633
+ qdPopoverOffsetY: any;
632
634
  qdPopoverCloseStrategy: any;
633
635
  qdPopoverDisabled: any;
634
636
  qdPopoverStopPropagation: boolean;
@@ -644,7 +646,7 @@ declare class QdMockPopoverOnClickDirective {
644
646
  private isElementInTemplateClicked;
645
647
  private getTemplateRootNode;
646
648
  static ɵfac: i0.ɵɵFactoryDeclaration<QdMockPopoverOnClickDirective, never>;
647
- static ɵdir: i0.ɵɵDirectiveDeclaration<QdMockPopoverOnClickDirective, "[qdPopoverOnClick]", ["qdPopoverOnClick"], { "qdPopoverOnClick": { "alias": "qdPopoverOnClick"; "required": false; }; "qdPopoverWidth": { "alias": "qdPopoverWidth"; "required": false; }; "qdPopoverMinWidth": { "alias": "qdPopoverMinWidth"; "required": false; }; "qdPopoverMaxWidth": { "alias": "qdPopoverMaxWidth"; "required": false; }; "qdPopoverHeight": { "alias": "qdPopoverHeight"; "required": false; }; "qdPopoverMinHeight": { "alias": "qdPopoverMinHeight"; "required": false; }; "qdPopoverMaxHeight": { "alias": "qdPopoverMaxHeight"; "required": false; }; "positionStrategy": { "alias": "positionStrategy"; "required": false; }; "qdPopoverCloseStrategy": { "alias": "qdPopoverCloseStrategy"; "required": false; }; "qdPopoverDisabled": { "alias": "qdPopoverDisabled"; "required": false; }; "qdPopoverStopPropagation": { "alias": "qdPopoverStopPropagation"; "required": false; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, false, never>;
649
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QdMockPopoverOnClickDirective, "[qdPopoverOnClick]", ["qdPopoverOnClick"], { "qdPopoverOnClick": { "alias": "qdPopoverOnClick"; "required": false; }; "qdPopoverWidth": { "alias": "qdPopoverWidth"; "required": false; }; "qdPopoverMinWidth": { "alias": "qdPopoverMinWidth"; "required": false; }; "qdPopoverMaxWidth": { "alias": "qdPopoverMaxWidth"; "required": false; }; "qdPopoverHeight": { "alias": "qdPopoverHeight"; "required": false; }; "qdPopoverMinHeight": { "alias": "qdPopoverMinHeight"; "required": false; }; "qdPopoverMaxHeight": { "alias": "qdPopoverMaxHeight"; "required": false; }; "qdPopoverPlacement": { "alias": "qdPopoverPlacement"; "required": false; }; "qdPopoverOffsetX": { "alias": "qdPopoverOffsetX"; "required": false; }; "qdPopoverOffsetY": { "alias": "qdPopoverOffsetY"; "required": false; }; "qdPopoverCloseStrategy": { "alias": "qdPopoverCloseStrategy"; "required": false; }; "qdPopoverDisabled": { "alias": "qdPopoverDisabled"; "required": false; }; "qdPopoverStopPropagation": { "alias": "qdPopoverStopPropagation"; "required": false; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, false, never>;
648
650
  }
649
651
 
650
652
  declare class QdMockCoreModule {
@@ -3688,7 +3690,7 @@ declare class QdMockCheckboxChipsItemComponent {
3688
3690
 
3689
3691
  declare class QdMockFormsModule {
3690
3692
  static ɵfac: i0.ɵɵFactoryDeclaration<QdMockFormsModule, never>;
3691
- static ɵmod: i0.ɵɵNgModuleDeclaration<QdMockFormsModule, [typeof QdMockCalendarComponent, typeof QdMockCheckboxChipsComponent, typeof QdMockCheckboxChipsItemComponent, typeof QdMockCheckboxComponent, typeof QdMockCheckboxesComponent, typeof QdMockDatepickerComponent, typeof QdMockDropdownComponent, typeof QdMockFilterFormItemsComponent, typeof QdMockFormErrorComponent, typeof QdMockFormGroupErrorComponent, typeof QdMockFormHintComponent, typeof QdMockFormLabelComponent, typeof QdMockFormReadonlyComponent, typeof QdMockFormViewonlyComponent, typeof QdMockInputComponent, typeof QdMockPinCodeComponent, typeof QdMockRadioButtonsComponent, typeof QdMockSwitchComponent, typeof QdMockSwitchesComponent, typeof QdMockTextareaComponent], [typeof i2.CommonModule, typeof i31.FormsModule], [typeof QdMockCalendarComponent, typeof QdMockCheckboxChipsComponent, typeof QdMockCheckboxComponent, typeof QdMockCheckboxesComponent, typeof QdMockDatepickerComponent, typeof QdMockDropdownComponent, typeof QdMockFilterFormItemsComponent, typeof QdMockFormErrorComponent, typeof QdMockFormGroupErrorComponent, typeof QdMockFormHintComponent, typeof QdMockFormLabelComponent, typeof QdMockFormReadonlyComponent, typeof QdMockFormViewonlyComponent, typeof QdMockInputComponent, typeof QdMockPinCodeComponent, typeof QdMockRadioButtonsComponent, typeof QdMockSwitchComponent, typeof QdMockSwitchesComponent, typeof QdMockTextareaComponent]>;
3693
+ static ɵmod: i0.ɵɵNgModuleDeclaration<QdMockFormsModule, [typeof QdMockCalendarComponent, typeof QdMockCheckboxChipsComponent, typeof QdMockCheckboxChipsItemComponent, typeof QdMockCheckboxComponent, typeof QdMockCheckboxesComponent, typeof QdMockDatepickerComponent, typeof QdMockDropdownComponent, typeof QdMockFilterFormItemsComponent, typeof QdMockFormErrorComponent, typeof QdMockFormGroupErrorComponent, typeof QdMockFormHintComponent, typeof QdMockFormLabelComponent, typeof QdMockFormReadonlyComponent, typeof QdMockFormViewonlyComponent, typeof QdMockInputComponent, typeof QdMockPinCodeComponent, typeof QdMockRadioButtonsComponent, typeof QdMockSwitchComponent, typeof QdMockSwitchesComponent, typeof QdMockTextareaComponent], [typeof i2.CommonModule, typeof i30.FormsModule], [typeof QdMockCalendarComponent, typeof QdMockCheckboxChipsComponent, typeof QdMockCheckboxComponent, typeof QdMockCheckboxesComponent, typeof QdMockDatepickerComponent, typeof QdMockDropdownComponent, typeof QdMockFilterFormItemsComponent, typeof QdMockFormErrorComponent, typeof QdMockFormGroupErrorComponent, typeof QdMockFormHintComponent, typeof QdMockFormLabelComponent, typeof QdMockFormReadonlyComponent, typeof QdMockFormViewonlyComponent, typeof QdMockInputComponent, typeof QdMockPinCodeComponent, typeof QdMockRadioButtonsComponent, typeof QdMockSwitchComponent, typeof QdMockSwitchesComponent, typeof QdMockTextareaComponent]>;
3692
3694
  static ɵinj: i0.ɵɵInjectorDeclaration<QdMockFormsModule>;
3693
3695
  }
3694
3696
 
@@ -5196,6 +5198,7 @@ interface QdPopoverSizeConstraints {
5196
5198
  * - The returned Observable emits `true` once initial sizing is applied and overlay is visible.
5197
5199
  * - Even if autosize is turned off, the minimum and maximum width or height constraints are always enforced as hard limits.
5198
5200
  * - This means the popover can never be smaller or larger than the values you set, no matter what content it contains.
5201
+ * - The width is also capped to the current screen width, so the popover never reaches past the screen edge — even if a larger maxWidth is set.
5199
5202
  *
5200
5203
  * #### For the hidden-content measuring
5201
5204
  * @see https://stackoverflow.com/questions/1841124/find-the-potential-width-of-a-hidden-element
@@ -5215,6 +5218,7 @@ declare class QdPopoverSizingService {
5215
5218
  observe(host: HTMLElement, popover: HTMLElement, overlayRef: OverlayRef, autoSize: QdPopoverAutoSizeConfig, constraints: QdPopoverSizeConstraints): Observable<boolean>;
5216
5219
  private showOverlay;
5217
5220
  private hideOverlay;
5221
+ private resolveWidthLimits;
5218
5222
  private applySize;
5219
5223
  private measureContentSize;
5220
5224
  disconnect(): void;
@@ -5229,6 +5233,27 @@ declare class QdPopoverParentService {
5229
5233
  static ɵprov: i0.ɵɵInjectableDeclaration<QdPopoverParentService>;
5230
5234
  }
5231
5235
 
5236
+ type QdPopoverPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
5237
+ /**
5238
+ * **QdPopoverOnClickDirective**
5239
+ *
5240
+ * Shows a popover next to its host element and opens or closes it on host click.
5241
+ *
5242
+ * It is an internal building block. Quadrel components such as dropdowns, menu buttons and
5243
+ * filters build on it; consumers do not use it directly.
5244
+ *
5245
+ * #### Features:
5246
+ * - Opens the popover on click and closes it on the next click or an outside click.
5247
+ * - With `qdPopoverEnableKeyControl`, Enter and Space open it, Escape and Tab close it.
5248
+ * - Sizes the popover to its host or content within the min/max limits, and never wider than the screen.
5249
+ * - Places it with the Angular CDK; with `qdPopoverFlipIntoViewport` it opens to the side that has room instead of off the screen edge.
5250
+ * - Keeps only one popover open: opening one closes the others, but a nested popover keeps its parents open.
5251
+ *
5252
+ * #### Notes & Best Practices
5253
+ * - Emits `opened` and `closed` so consumers can react.
5254
+ * - The flip is opt-in, so popovers that already sit correctly stay as they are.
5255
+ * - Not part of the public API; use the higher-level components like `qd-dropdown` or `qd-menu-button` instead.
5256
+ */
5232
5257
  declare class QdPopoverOnClickDirective implements OnInit, OnDestroy {
5233
5258
  protected hostRef: ElementRef<HTMLElement>;
5234
5259
  protected overlayPositionBuilder: OverlayPositionBuilder;
@@ -5236,18 +5261,108 @@ declare class QdPopoverOnClickDirective implements OnInit, OnDestroy {
5236
5261
  protected popoverService: QdPopoverService;
5237
5262
  protected sizingService: QdPopoverSizingService;
5238
5263
  protected popoverParentService: QdPopoverParentService;
5264
+ private readonly _topFirst;
5265
+ /**
5266
+ * The template shown inside the popover.
5267
+ *
5268
+ * Pass the `ng-template` that holds the menu, option list or panel.
5269
+ */
5239
5270
  qdPopoverOnClick: TemplateRef<unknown>;
5240
- positionStrategy?: ConnectedPosition | ConnectedPosition[];
5271
+ /**
5272
+ * Which corner of the host the popover opens from.
5273
+ *
5274
+ * One of `bottom-start`, `bottom-end`, `top-start` or `top-end`. When unset,
5275
+ * the popover uses the default end-aligned position below the host.
5276
+ */
5277
+ qdPopoverPlacement?: QdPopoverPlacement;
5278
+ /**
5279
+ * Fine-tunes the horizontal position, in pixels.
5280
+ *
5281
+ * A negative value moves the popover left, a positive value moves it right.
5282
+ */
5283
+ qdPopoverOffsetX: number;
5284
+ /**
5285
+ * Fine-tunes the vertical gap to the host, in pixels.
5286
+ *
5287
+ * A negative value moves the popover up, a positive value moves it down. The
5288
+ * value is mirrored when the popover flips, so the gap looks the same whether
5289
+ * it opens downward or upward.
5290
+ */
5291
+ qdPopoverOffsetY: number;
5292
+ /**
5293
+ * Decides when a click closes the popover.
5294
+ *
5295
+ * `onEveryClick` (default) closes it on the next click anywhere, including
5296
+ * inside the popover. `onOutsideClick` keeps it open while you click inside
5297
+ * and only closes on a click outside.
5298
+ */
5241
5299
  qdPopoverCloseStrategy: 'onEveryClick' | 'onOutsideClick';
5300
+ /**
5301
+ * Turns the popover off.
5302
+ *
5303
+ * While `true`, clicks and keys on the host no longer open it.
5304
+ */
5242
5305
  qdPopoverDisabled: boolean;
5306
+ /**
5307
+ * Stops the opening click from bubbling to parent elements.
5308
+ *
5309
+ * Keep it `true` so an outer click handler does not fire as well. Set it
5310
+ * `false` when a parent must react to the same click.
5311
+ */
5243
5312
  qdPopoverStopPropagation: boolean;
5313
+ /**
5314
+ * Background colour of the popover panel.
5315
+ *
5316
+ * When unset, the panel uses its default colour.
5317
+ */
5244
5318
  qdPopoverBackgroundColor?: QdPopoverBackgroundColor;
5319
+ /**
5320
+ * Tallest the popover may get, in pixels.
5321
+ *
5322
+ * Once the content is taller, it scrolls inside the popover. `none` removes
5323
+ * the limit.
5324
+ */
5245
5325
  qdPopoverMaxHeight: number | 'none';
5326
+ /**
5327
+ * Narrowest the popover may get, in pixels.
5328
+ *
5329
+ * `none` removes the lower limit.
5330
+ */
5246
5331
  qdPopoverMinWidth: number | 'none';
5332
+ /**
5333
+ * Widest the popover may get, in pixels.
5334
+ *
5335
+ * `none` removes the upper limit. The popover is never wider than the screen,
5336
+ * even if a larger value is set.
5337
+ */
5247
5338
  qdPopoverMaxWidth: number | 'none';
5339
+ /**
5340
+ * Matches the popover size to the host or its content.
5341
+ *
5342
+ * Set `width` and/or `height` to `true`. An empty object keeps the natural
5343
+ * content size. The min and max limits still apply.
5344
+ */
5248
5345
  qdPopoverAutoSize: QdPopoverAutoSizeConfig;
5346
+ /**
5347
+ * Turns on keyboard control.
5348
+ *
5349
+ * While `true`, Enter and Space open the popover and Escape and Tab close it.
5350
+ */
5249
5351
  qdPopoverEnableKeyControl: boolean;
5352
+ /**
5353
+ * Lets the popover flip to the side that has room.
5354
+ *
5355
+ * While `true`, a popover that would open past the screen edge opens to the
5356
+ * opposite side instead. It is opt-in, so popovers that already fit stay put.
5357
+ */
5358
+ qdPopoverFlipIntoViewport: boolean;
5359
+ /**
5360
+ * Emits after the popover has opened.
5361
+ */
5250
5362
  readonly opened: EventEmitter<any>;
5363
+ /**
5364
+ * Emits after the popover has closed.
5365
+ */
5251
5366
  readonly closed: EventEmitter<any>;
5252
5367
  handleClick(event: MouseEvent): void;
5253
5368
  handleDocumentClick(event: PointerEvent): void;
@@ -5257,6 +5372,7 @@ declare class QdPopoverOnClickDirective implements OnInit, OnDestroy {
5257
5372
  private _host;
5258
5373
  private _popoverRef;
5259
5374
  private _positionStrategyInstance;
5375
+ private _resolvedPositions;
5260
5376
  private _subscriptions;
5261
5377
  constructor();
5262
5378
  ngOnInit(): void;
@@ -5275,6 +5391,9 @@ declare class QdPopoverOnClickDirective implements OnInit, OnDestroy {
5275
5391
  close(): void;
5276
5392
  private popoverInstance;
5277
5393
  private initPositionStrategy;
5394
+ private buildPlacementPositions;
5395
+ private applyOffsets;
5396
+ private withHorizontalFallbacks;
5278
5397
  private createOverlay;
5279
5398
  private runSizingAndOpen;
5280
5399
  private setPopoverContent;
@@ -5284,7 +5403,7 @@ declare class QdPopoverOnClickDirective implements OnInit, OnDestroy {
5284
5403
  private unsubscribeAll;
5285
5404
  private cleanup;
5286
5405
  static ɵfac: i0.ɵɵFactoryDeclaration<QdPopoverOnClickDirective, never>;
5287
- static ɵdir: i0.ɵɵDirectiveDeclaration<QdPopoverOnClickDirective, "[qdPopoverOnClick]", ["qdPopoverOnClick"], { "qdPopoverOnClick": { "alias": "qdPopoverOnClick"; "required": false; }; "positionStrategy": { "alias": "positionStrategy"; "required": false; }; "qdPopoverCloseStrategy": { "alias": "qdPopoverCloseStrategy"; "required": false; }; "qdPopoverDisabled": { "alias": "qdPopoverDisabled"; "required": false; }; "qdPopoverStopPropagation": { "alias": "qdPopoverStopPropagation"; "required": false; }; "qdPopoverBackgroundColor": { "alias": "qdPopoverBackgroundColor"; "required": false; }; "qdPopoverMaxHeight": { "alias": "qdPopoverMaxHeight"; "required": false; }; "qdPopoverMinWidth": { "alias": "qdPopoverMinWidth"; "required": false; }; "qdPopoverMaxWidth": { "alias": "qdPopoverMaxWidth"; "required": false; }; "qdPopoverAutoSize": { "alias": "qdPopoverAutoSize"; "required": false; }; "qdPopoverEnableKeyControl": { "alias": "qdPopoverEnableKeyControl"; "required": false; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, false, never>;
5406
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QdPopoverOnClickDirective, "[qdPopoverOnClick]", ["qdPopoverOnClick"], { "qdPopoverOnClick": { "alias": "qdPopoverOnClick"; "required": false; }; "qdPopoverPlacement": { "alias": "qdPopoverPlacement"; "required": false; }; "qdPopoverOffsetX": { "alias": "qdPopoverOffsetX"; "required": false; }; "qdPopoverOffsetY": { "alias": "qdPopoverOffsetY"; "required": false; }; "qdPopoverCloseStrategy": { "alias": "qdPopoverCloseStrategy"; "required": false; }; "qdPopoverDisabled": { "alias": "qdPopoverDisabled"; "required": false; }; "qdPopoverStopPropagation": { "alias": "qdPopoverStopPropagation"; "required": false; }; "qdPopoverBackgroundColor": { "alias": "qdPopoverBackgroundColor"; "required": false; }; "qdPopoverMaxHeight": { "alias": "qdPopoverMaxHeight"; "required": false; }; "qdPopoverMinWidth": { "alias": "qdPopoverMinWidth"; "required": false; }; "qdPopoverMaxWidth": { "alias": "qdPopoverMaxWidth"; "required": false; }; "qdPopoverAutoSize": { "alias": "qdPopoverAutoSize"; "required": false; }; "qdPopoverEnableKeyControl": { "alias": "qdPopoverEnableKeyControl"; "required": false; }; "qdPopoverFlipIntoViewport": { "alias": "qdPopoverFlipIntoViewport"; "required": false; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, false, never>;
5288
5407
  }
5289
5408
 
5290
5409
  /**
@@ -6575,7 +6694,6 @@ declare class QdDropdownComponent implements ControlValueAccessor, OnInit, OnCha
6575
6694
  options: QdFormOption[];
6576
6695
  filterText: '';
6577
6696
  control: AbstractControl;
6578
- positionStrategy: ConnectedPosition[];
6579
6697
  private _value;
6580
6698
  private _selectedOption;
6581
6699
  private _subs;
@@ -6609,7 +6727,6 @@ declare class QdDropdownComponent implements ControlValueAccessor, OnInit, OnCha
6609
6727
  handleFilterChange($event: any): void;
6610
6728
  onOpenDropdown(): void;
6611
6729
  onDropdownClosed(): void;
6612
- private getPositionStrategy;
6613
6730
  private loadOptionsForCurrentConfig;
6614
6731
  private resolveControl;
6615
6732
  private updateConfiguration;
@@ -7069,7 +7186,7 @@ declare class QdFileUploadService {
7069
7186
  */
7070
7187
  declare class QdInputComponent implements OnInit, OnChanges, OnDestroy, ControlValueAccessor, QdFocusable {
7071
7188
  private readonly actionEmitterService;
7072
- private readonly resolverRegistry;
7189
+ private readonly optionsService;
7073
7190
  private readonly controlContainer;
7074
7191
  private readonly eventBrokerService;
7075
7192
  private readonly numberInputService;
@@ -7148,6 +7265,8 @@ declare class QdInputComponent implements OnInit, OnChanges, OnDestroy, ControlV
7148
7265
  * }
7149
7266
  */
7150
7267
  readonly optionsResolved: EventEmitter<QdFormOptionsResolvedEvent>;
7268
+ closeOptions(): void;
7269
+ openOptionsOnArrow(event: KeyboardEvent): void;
7151
7270
  readonly: boolean;
7152
7271
  readonlyAction: boolean;
7153
7272
  viewonly: boolean;
@@ -7160,6 +7279,8 @@ declare class QdInputComponent implements OnInit, OnChanges, OnDestroy, ControlV
7160
7279
  get isErrorFromOutside(): boolean;
7161
7280
  get isAmbiguousState(): boolean;
7162
7281
  inputElement: ElementRef;
7282
+ private popover?;
7283
+ isOptionsOpen: boolean;
7163
7284
  inputType: QdInputType;
7164
7285
  inputMode: QdInputMode;
7165
7286
  htmlInputType: string;
@@ -7172,8 +7293,8 @@ declare class QdInputComponent implements OnInit, OnChanges, OnDestroy, ControlV
7172
7293
  _value: QdInputValueWithUnit;
7173
7294
  _displayValue: string;
7174
7295
  control: AbstractControl | QdFormControl<any>;
7175
- private _optionsResolver;
7176
7296
  private _subs;
7297
+ private _filteredOptions;
7177
7298
  private _isUserTyped;
7178
7299
  private _onChange;
7179
7300
  private _onTouch;
@@ -7194,6 +7315,8 @@ declare class QdInputComponent implements OnInit, OnChanges, OnDestroy, ControlV
7194
7315
  setDisabledState(disabled: boolean): void;
7195
7316
  handleInput(event: any): void;
7196
7317
  handleOptionSelected(option: QdFormInputOption): void;
7318
+ onOptionsOpened(): void;
7319
+ onOptionsClosed(): void;
7197
7320
  handleUnitChange(unit: any): void;
7198
7321
  handleInputFocus(): void;
7199
7322
  handleInputBlur(): void;
@@ -7203,7 +7326,8 @@ declare class QdInputComponent implements OnInit, OnChanges, OnDestroy, ControlV
7203
7326
  focus(): void;
7204
7327
  emitEnterClick(): void;
7205
7328
  private updateConfig;
7206
- private initializeOptionsResolver;
7329
+ private subscribeToOptions;
7330
+ private loadOptionsForTypedValue;
7207
7331
  private emitValue;
7208
7332
  private initOpModeSubscription;
7209
7333
  private normalizeInitialControlValueIfNeeded;
@@ -8805,118 +8929,24 @@ declare class QdInputUnitsComponent implements OnInit, OnChanges {
8805
8929
  static ɵcmp: i0.ɵɵComponentDeclaration<QdInputUnitsComponent, "qd-input-units", never, { "config": { "alias": "config"; "required": false; }; "unitValue": { "alias": "unit"; "required": false; }; }, { "unitChange": "unitChange"; "opened": "opened"; "closed": "closed"; }, never, never, false, never>;
8806
8930
  }
8807
8931
 
8808
- /**
8809
- * Manages the options popover of a form input, including resolver-based options.
8810
- * The resolver trigger rules are defined on {@link QdFormOptionsResolver}.
8811
- *
8812
- * Invariant: the `value` setter resolves options only on actual value changes. Selecting
8813
- * an option assigns the option's i18n key as the new value right away, because the host
8814
- * component writes exactly that key back into the `value` binding for display purposes —
8815
- * the write-back therefore arrives as a no-op instead of resolving with the i18n key.
8816
- */
8817
- declare class QdInputOptionsDirective extends QdPopoverOnClickDirective implements OnInit, OnChanges, OnDestroy, AfterViewInit {
8818
- private readonly translateService;
8819
- private readonly viewContainerRef;
8820
- private readonly changeDetectorRef;
8932
+ declare class QdInputOptionsComponent implements OnInit, AfterViewInit {
8821
8933
  private readonly resolverRegistry;
8822
- private readonly controlContainer;
8823
- get value(): QdInputValue;
8824
- /**
8825
- * The value of the form input
8826
- */
8827
- set value(value: QdInputValue);
8828
- /**
8829
- * The configuration of the form input
8830
- *
8831
- * @example
8832
- * {
8833
- * label: { i18n: 'label' },
8834
- * placeholder: { i18n: 'placeholder' },
8835
- * hint: { i18n: 'hint' }
8836
- * };
8837
- */
8838
- config: QdFormInputConfiguration;
8839
- /**
8840
- * Emits event when the value has changed. Note: Emits on keyup (no longer on click, as before)!
8841
- */
8842
- readonly enterClick: EventEmitter<any>;
8843
- /**
8844
- * Emits event when an option in the fly out has been selected.
8845
- */
8934
+ private readonly keyboardService;
8935
+ private readonly optionsService;
8846
8936
  readonly optionSelected: EventEmitter<_quadrel_enterprise_ui_framework.QdFormBaseOption>;
8847
- /**
8848
- * Emits the resolved options and the depended-on values they were resolved with,
8849
- * after every resolver run.
8850
- *
8851
- * The resolver fetches the options; this output lets the component react to them —
8852
- * typically to drop a selection the new options no longer contain (e.g. clear the
8853
- * chosen city once the country changed).
8854
- *
8855
- * @example
8856
- * onCityOptionsResolved(event: QdFormOptionsResolvedEvent): void {
8857
- * const city = this.form.get('city');
8858
- * if (city?.value && !event.options.some(o => o.value === city.value)) city.reset();
8859
- * }
8860
- */
8861
- readonly optionsResolved: EventEmitter<QdFormOptionsResolvedEvent>;
8862
- onSpace(): void;
8863
- onEscape(): void;
8864
- onTab(): void;
8937
+ optionComponents: QueryList<QdFormInputComponent>;
8938
+ readonly filteredOptions$: Observable<QdFormResolvedOptions>;
8939
+ readonly optionsRequestState$: Observable<QdFormOptionsRequestState>;
8940
+ protected readonly QdFormOptionsRequestState: typeof QdFormOptionsRequestState;
8865
8941
  private _optionsResolver;
8866
- private _optionsRequestStateSubject;
8867
- private readonly _optionsLoadingHintDelay;
8868
- private readonly _optionsLoadingHintMinTime;
8869
- private _hostElement;
8870
- private _keyManager?;
8871
- private _value;
8872
- private _filteredOptionsSubject;
8873
- private _destroyed$;
8874
- private _dependsOnSubscription;
8875
- private readonly _resolveRequests$;
8876
- filteredOptions$: rxjs.Observable<QdFormResolvedOptions>;
8877
- optionsRequestState$: rxjs.Observable<QdFormOptionsRequestState>;
8878
- formInputComponents: QueryList<QdFormInputComponent>;
8879
- constructor();
8880
- ngOnInit(): void;
8881
- private initializeOptionsResolver;
8882
- ngOnChanges(changes: SimpleChanges): void;
8883
- ngOnDestroy(): void;
8884
- ngAfterViewInit(): void;
8885
- onKeyDown(event: KeyboardEvent): void;
8886
- selectOption(option: QdFormResolvedOption): void;
8887
- private logWarningIfBothOptionsAndResolverAreUsed;
8888
- private logWarningIfDependsOnWithoutFormGroup;
8889
- private closePopover;
8890
- private createKeyManager;
8891
- private setPopoverProperties;
8892
- private hasOptions;
8893
- private updateOptions;
8894
- private updateOptionsWhenDependsOnControlsChange;
8895
- private updateOptionsWithResolver;
8896
- private publishLatestResolvedOptions;
8897
- private filterOptions;
8898
- static ɵfac: i0.ɵɵFactoryDeclaration<QdInputOptionsDirective, never>;
8899
- static ɵdir: i0.ɵɵDirectiveDeclaration<QdInputOptionsDirective, "[qdInputOptions]", never, { "value": { "alias": "value"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "enterClick": "enterClick"; "optionSelected": "optionSelected"; "optionsResolved": "optionsResolved"; }, never, never, false, never>;
8900
- }
8901
-
8902
- declare class QdInputOptionsComponent implements OnInit, AfterViewInit {
8903
- private readonly resolverRegistry;
8904
- filteredOptions$: Observable<QdFormResolvedOptions>;
8905
- optionsRequestState$: Observable<QdFormOptionsRequestState>;
8906
- template: EventEmitter<TemplateRef<any>>;
8907
- formInputComponents: EventEmitter<QueryList<QdFormInputComponent>>;
8908
- optionSelected: EventEmitter<_quadrel_enterprise_ui_framework.QdFormBaseOption>;
8909
- private _template;
8910
- _formInputComponents: QueryList<QdFormInputComponent>;
8911
8942
  get requestLoadingHintI18n(): string;
8912
8943
  get requestErrorHintI18n(): string;
8913
- protected readonly QdFormOptionsRequestState: typeof QdFormOptionsRequestState;
8914
- private _optionsResolver;
8944
+ onKeyDown(event: KeyboardEvent): void;
8915
8945
  ngOnInit(): void;
8916
8946
  ngAfterViewInit(): void;
8917
8947
  selectOption(option: QdFormResolvedOption): void;
8918
8948
  static ɵfac: i0.ɵɵFactoryDeclaration<QdInputOptionsComponent, never>;
8919
- static ɵcmp: i0.ɵɵComponentDeclaration<QdInputOptionsComponent, "qd-input-options", never, { "filteredOptions$": { "alias": "filteredOptions$"; "required": false; }; "optionsRequestState$": { "alias": "optionsRequestState$"; "required": false; }; }, { "template": "template"; "formInputComponents": "formInputComponents"; "optionSelected": "optionSelected"; }, never, never, false, never>;
8949
+ static ɵcmp: i0.ɵɵComponentDeclaration<QdInputOptionsComponent, "qd-input-options", never, {}, { "optionSelected": "optionSelected"; }, never, never, false, never>;
8920
8950
  }
8921
8951
 
8922
8952
  type QdMultiInputChipColor = 'default' | 'error' | 'pending';
@@ -9051,7 +9081,7 @@ declare class QdTooltipModule {
9051
9081
 
9052
9082
  declare class QdFormModule {
9053
9083
  static ɵfac: i0.ɵɵFactoryDeclaration<QdFormModule, never>;
9054
- static ɵmod: i0.ɵɵNgModuleDeclaration<QdFormModule, [typeof QdCalendarComponent, typeof QdCheckboxChipsComponent, typeof QdCheckboxChipsItemComponent, typeof QdCheckboxComponent, typeof QdCheckboxesComponent, typeof QdDatepickerComponent, typeof QdDropdownComponent, typeof QdDropdownOptionsComponent, typeof QdFilterFormItemsComponent, typeof QdFormErrorComponent, typeof QdFormHintComponent, typeof QdFormLabelComponent, typeof QdFormReadonlyComponent, typeof QdFormViewonlyComponent, typeof QdInputComponent, typeof QdInputUnitsComponent, typeof QdInputOptionsDirective, typeof QdInputOptionsComponent, typeof QdMultiInputChipComponent, typeof QdMultiInputMenuComponent, typeof QdMultiInputComponent, typeof QdPinCodeComponent, typeof QdRadioButtonsComponent, typeof QdSwitchComponent, typeof QdSwitchesComponent, typeof QdTextareaComponent, typeof QdFormInputComponent, typeof QdRichtextComponent, typeof QdFileUploadComponent], [typeof i2.CommonModule, typeof i31.FormsModule, typeof i31.ReactiveFormsModule, typeof i9.TranslateModule, typeof QdAutofocusModule, typeof QdChipModule, typeof QdCoreModule, typeof QdIconModule, typeof QdPopoverModule, typeof QdTooltipModule, typeof i39.NgxEditorModule], [typeof QdCheckboxChipsComponent, typeof QdCheckboxComponent, typeof QdCheckboxesComponent, typeof QdDatepickerComponent, typeof QdDropdownComponent, typeof QdFilterFormItemsComponent, typeof QdInputComponent, typeof QdMultiInputComponent, typeof QdPinCodeComponent, typeof QdRadioButtonsComponent, typeof QdSwitchComponent, typeof QdSwitchesComponent, typeof QdTextareaComponent, typeof QdRichtextComponent, typeof QdFileUploadComponent]>;
9084
+ static ɵmod: i0.ɵɵNgModuleDeclaration<QdFormModule, [typeof QdCalendarComponent, typeof QdCheckboxChipsComponent, typeof QdCheckboxChipsItemComponent, typeof QdCheckboxComponent, typeof QdCheckboxesComponent, typeof QdDatepickerComponent, typeof QdDropdownComponent, typeof QdDropdownOptionsComponent, typeof QdFilterFormItemsComponent, typeof QdFormErrorComponent, typeof QdFormHintComponent, typeof QdFormLabelComponent, typeof QdFormReadonlyComponent, typeof QdFormViewonlyComponent, typeof QdInputComponent, typeof QdInputUnitsComponent, typeof QdInputOptionsComponent, typeof QdMultiInputChipComponent, typeof QdMultiInputMenuComponent, typeof QdMultiInputComponent, typeof QdPinCodeComponent, typeof QdRadioButtonsComponent, typeof QdSwitchComponent, typeof QdSwitchesComponent, typeof QdTextareaComponent, typeof QdFormInputComponent, typeof QdRichtextComponent, typeof QdFileUploadComponent], [typeof i2.CommonModule, typeof i30.FormsModule, typeof i30.ReactiveFormsModule, typeof i9.TranslateModule, typeof QdAutofocusModule, typeof QdChipModule, typeof QdCoreModule, typeof QdIconModule, typeof QdPopoverModule, typeof QdTooltipModule, typeof i38.NgxEditorModule], [typeof QdCheckboxChipsComponent, typeof QdCheckboxComponent, typeof QdCheckboxesComponent, typeof QdDatepickerComponent, typeof QdDropdownComponent, typeof QdFilterFormItemsComponent, typeof QdInputComponent, typeof QdMultiInputComponent, typeof QdPinCodeComponent, typeof QdRadioButtonsComponent, typeof QdSwitchComponent, typeof QdSwitchesComponent, typeof QdTextareaComponent, typeof QdRichtextComponent, typeof QdFileUploadComponent]>;
9055
9085
  static ɵinj: i0.ɵɵInjectorDeclaration<QdFormModule>;
9056
9086
  }
9057
9087
 
@@ -12059,7 +12089,6 @@ declare class QdFilterItemSelectCategoryComponent implements OnInit {
12059
12089
  dependsOn: string[];
12060
12090
  showSelectButton$: Observable<boolean>;
12061
12091
  itemsLoading$: Observable<boolean>;
12062
- positionStrategy: ConnectedPosition[];
12063
12092
  maxFlyoutHeight: number;
12064
12093
  private _destroyRef;
12065
12094
  private frozenSelectedKeys;
@@ -12132,7 +12161,7 @@ declare class QdFilterItemSingleSelectComponent implements OnInit, OnDestroy {
12132
12161
 
12133
12162
  declare class QdFilterModule {
12134
12163
  static ɵfac: i0.ɵɵFactoryDeclaration<QdFilterModule, never>;
12135
- static ɵmod: i0.ɵɵNgModuleDeclaration<QdFilterModule, [typeof LocaleDatePipe, typeof QdFilterComponent, typeof QdFilterCategoryComponent, typeof QdFilterCategoryBooleanComponent, typeof QdFilterItemBooleanComponent, typeof QdFilterItemDateCategoryComponent, typeof QdFilterItemDateComponent, typeof QdFilterItemDateRangeCategoryComponent, typeof QdFilterItemDateRangeComponent, typeof QdFilterItemFreeTextCategoryComponent, typeof QdFilterItemFreeTextComponent, typeof QdFilterItemSelectCategoryComponent, typeof QdFilterItemMultiSelectComponent, typeof QdFilterItemSingleSelectComponent], [typeof i2.CommonModule, typeof i31.FormsModule, typeof i9.TranslateModule, typeof QdButtonModule, typeof QdChipModule, typeof QdCoreModule, typeof QdFormModule, typeof QdIconModule, typeof QdPopoverModule, typeof QdTooltipModule, typeof i25.StoreFeatureModule], [typeof QdFilterComponent]>;
12164
+ static ɵmod: i0.ɵɵNgModuleDeclaration<QdFilterModule, [typeof LocaleDatePipe, typeof QdFilterComponent, typeof QdFilterCategoryComponent, typeof QdFilterCategoryBooleanComponent, typeof QdFilterItemBooleanComponent, typeof QdFilterItemDateCategoryComponent, typeof QdFilterItemDateComponent, typeof QdFilterItemDateRangeCategoryComponent, typeof QdFilterItemDateRangeComponent, typeof QdFilterItemFreeTextCategoryComponent, typeof QdFilterItemFreeTextComponent, typeof QdFilterItemSelectCategoryComponent, typeof QdFilterItemMultiSelectComponent, typeof QdFilterItemSingleSelectComponent], [typeof i2.CommonModule, typeof i30.FormsModule, typeof i9.TranslateModule, typeof QdButtonModule, typeof QdChipModule, typeof QdCoreModule, typeof QdFormModule, typeof QdIconModule, typeof QdPopoverModule, typeof QdTooltipModule, typeof i25.StoreFeatureModule], [typeof QdFilterComponent]>;
12136
12165
  static ɵinj: i0.ɵɵInjectorDeclaration<QdFilterModule>;
12137
12166
  }
12138
12167
 
@@ -18168,7 +18197,7 @@ declare class QdStriphtmlPipe implements PipeTransform {
18168
18197
 
18169
18198
  declare class QdCommentsModule {
18170
18199
  static ɵfac: i0.ɵɵFactoryDeclaration<QdCommentsModule, never>;
18171
- static ɵmod: i0.ɵɵNgModuleDeclaration<QdCommentsModule, [typeof QdCommentsComponent, typeof QdCommentMenuComponent, typeof AddCommentDialogComponent, typeof QdStriphtmlPipe], [typeof i2.CommonModule, typeof i9.TranslateModule, typeof QdPopoverModule, typeof QdIconModule, typeof QdButtonModule, typeof QdFormModule, typeof QdDialogModule, typeof i31.FormsModule, typeof i31.ReactiveFormsModule, typeof QdCoreModule], [typeof QdCommentsComponent]>;
18200
+ static ɵmod: i0.ɵɵNgModuleDeclaration<QdCommentsModule, [typeof QdCommentsComponent, typeof QdCommentMenuComponent, typeof AddCommentDialogComponent, typeof QdStriphtmlPipe], [typeof i2.CommonModule, typeof i9.TranslateModule, typeof QdPopoverModule, typeof QdIconModule, typeof QdButtonModule, typeof QdFormModule, typeof QdDialogModule, typeof i30.FormsModule, typeof i30.ReactiveFormsModule, typeof QdCoreModule], [typeof QdCommentsComponent]>;
18172
18201
  static ɵinj: i0.ɵɵInjectorDeclaration<QdCommentsModule>;
18173
18202
  }
18174
18203
 
@@ -18725,7 +18754,7 @@ declare class QdFocusableModule {
18725
18754
 
18726
18755
  declare class QdQuickEditModule {
18727
18756
  static ɵfac: i0.ɵɵFactoryDeclaration<QdQuickEditModule, never>;
18728
- static ɵmod: i0.ɵɵNgModuleDeclaration<QdQuickEditModule, [typeof QdQuickEditComponent, typeof QdCustomForDirective], [typeof QdCoreModule, typeof QdButtonModule, typeof i2.CommonModule, typeof QdFormModule, typeof i31.ReactiveFormsModule, typeof QdIconModule, typeof QdPopoverModule, typeof i9.TranslateModule, typeof QdPageModule, typeof QdFocusableModule, typeof QdTooltipModule], [typeof QdQuickEditComponent]>;
18757
+ static ɵmod: i0.ɵɵNgModuleDeclaration<QdQuickEditModule, [typeof QdQuickEditComponent, typeof QdCustomForDirective], [typeof QdCoreModule, typeof QdButtonModule, typeof i2.CommonModule, typeof QdFormModule, typeof i30.ReactiveFormsModule, typeof QdIconModule, typeof QdPopoverModule, typeof i9.TranslateModule, typeof QdPageModule, typeof QdFocusableModule, typeof QdTooltipModule], [typeof QdQuickEditComponent]>;
18729
18758
  static ɵinj: i0.ɵɵInjectorDeclaration<QdQuickEditModule>;
18730
18759
  }
18731
18760
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quadrel-enterprise-ui/framework",
3
- "version": "20.27.0",
3
+ "version": "20.27.2",
4
4
  "exports": {
5
5
  "./jest-preset": "./jest-preset.js",
6
6
  "./package.json": {