@ngneers/controls 0.0.1-next.0 → 0.0.1-next.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/fesm2022/ngneers-controls-api-ng.mjs +11 -18
- package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -1
- package/fesm2022/ngneers-controls-api-resize.mjs +7 -0
- package/fesm2022/ngneers-controls-api-resize.mjs.map +1 -1
- package/fesm2022/ngneers-controls-badge.mjs +160 -0
- package/fesm2022/ngneers-controls-badge.mjs.map +1 -0
- package/fesm2022/ngneers-controls-base.mjs +85 -8
- package/fesm2022/ngneers-controls-base.mjs.map +1 -1
- package/fesm2022/{ngneers-controls-calendar-time-CJT5AFlA.mjs → ngneers-controls-calendar-time-paM6WVpV.mjs} +2 -2
- package/fesm2022/{ngneers-controls-calendar-time-CJT5AFlA.mjs.map → ngneers-controls-calendar-time-paM6WVpV.mjs.map} +1 -1
- package/fesm2022/ngneers-controls-calendar.mjs +13 -6
- package/fesm2022/ngneers-controls-calendar.mjs.map +1 -1
- package/fesm2022/ngneers-controls-checkbox.mjs +3 -3
- package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -1
- package/fesm2022/ngneers-controls-color-picker.mjs +336 -0
- package/fesm2022/ngneers-controls-color-picker.mjs.map +1 -0
- package/fesm2022/ngneers-controls-default-icons.mjs +5 -0
- package/fesm2022/ngneers-controls-default-icons.mjs.map +1 -1
- package/fesm2022/ngneers-controls-directives.mjs +64 -7
- package/fesm2022/ngneers-controls-directives.mjs.map +1 -1
- package/fesm2022/ngneers-controls-edit-inplace.mjs +15 -5
- package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -1
- package/fesm2022/ngneers-controls-errors.mjs +203 -148
- package/fesm2022/ngneers-controls-errors.mjs.map +1 -1
- package/fesm2022/ngneers-controls-filter.mjs +2 -2
- package/fesm2022/ngneers-controls-filter.mjs.map +1 -1
- package/fesm2022/ngneers-controls-hint.mjs +18 -1
- package/fesm2022/ngneers-controls-hint.mjs.map +1 -1
- package/fesm2022/ngneers-controls-i18n-translations-de.mjs +17 -0
- package/fesm2022/ngneers-controls-i18n-translations-de.mjs.map +1 -1
- package/fesm2022/ngneers-controls-i18n-translations-en.mjs +19 -0
- package/fesm2022/ngneers-controls-i18n-translations-en.mjs.map +1 -1
- package/fesm2022/ngneers-controls-icon.mjs +23 -6
- package/fesm2022/ngneers-controls-icon.mjs.map +1 -1
- package/fesm2022/ngneers-controls-input-field.mjs +18 -2
- package/fesm2022/ngneers-controls-input-field.mjs.map +1 -1
- package/fesm2022/ngneers-controls-input.mjs +49 -9
- package/fesm2022/ngneers-controls-input.mjs.map +1 -1
- package/fesm2022/ngneers-controls-list-box.mjs +2 -2
- package/fesm2022/ngneers-controls-list-box.mjs.map +1 -1
- package/fesm2022/ngneers-controls-mask-input.mjs +4 -1
- package/fesm2022/ngneers-controls-mask-input.mjs.map +1 -1
- package/fesm2022/ngneers-controls-number-input.mjs +4 -4
- package/fesm2022/ngneers-controls-number-input.mjs.map +1 -1
- package/fesm2022/ngneers-controls-otp.mjs +263 -0
- package/fesm2022/ngneers-controls-otp.mjs.map +1 -0
- package/fesm2022/ngneers-controls-paginator.mjs +36 -9
- package/fesm2022/ngneers-controls-paginator.mjs.map +1 -1
- package/fesm2022/ngneers-controls-radio.mjs +4 -4
- package/fesm2022/ngneers-controls-radio.mjs.map +1 -1
- package/fesm2022/ngneers-controls-rating.mjs +180 -0
- package/fesm2022/ngneers-controls-rating.mjs.map +1 -0
- package/fesm2022/ngneers-controls-scroll-shadow.mjs +33 -7
- package/fesm2022/ngneers-controls-scroll-shadow.mjs.map +1 -1
- package/fesm2022/ngneers-controls-scroller.mjs +4 -2
- package/fesm2022/ngneers-controls-scroller.mjs.map +1 -1
- package/fesm2022/ngneers-controls-select-button.mjs +2 -1
- package/fesm2022/ngneers-controls-select-button.mjs.map +1 -1
- package/fesm2022/ngneers-controls-select.mjs +24 -4
- package/fesm2022/ngneers-controls-select.mjs.map +1 -1
- package/fesm2022/ngneers-controls-slider.mjs +3 -3
- package/fesm2022/ngneers-controls-slider.mjs.map +1 -1
- package/fesm2022/ngneers-controls-splitter.mjs +43 -12
- package/fesm2022/ngneers-controls-splitter.mjs.map +1 -1
- package/fesm2022/ngneers-controls-stepper.mjs +142 -0
- package/fesm2022/ngneers-controls-stepper.mjs.map +1 -0
- package/fesm2022/ngneers-controls-switch.mjs +3 -3
- package/fesm2022/ngneers-controls-switch.mjs.map +1 -1
- package/fesm2022/ngneers-controls-table.mjs +282 -15
- package/fesm2022/ngneers-controls-table.mjs.map +1 -1
- package/fesm2022/ngneers-controls-tabs.mjs +2 -2
- package/fesm2022/ngneers-controls-tabs.mjs.map +1 -1
- package/fesm2022/ngneers-controls-toggle-button.mjs +3 -3
- package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -1
- package/fesm2022/ngneers-controls-tooltip.mjs +16 -28
- package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -1
- package/fesm2022/ngneers-controls-tree.mjs +2 -2
- package/fesm2022/ngneers-controls-tree.mjs.map +1 -1
- package/fesm2022/ngneers-controls-utils.mjs +138 -1
- package/fesm2022/ngneers-controls-utils.mjs.map +1 -1
- package/package.json +22 -2
- package/types/ngneers-controls-api-ng.d.ts +12 -9
- package/types/ngneers-controls-badge.d.ts +67 -0
- package/types/ngneers-controls-base.d.ts +61 -4
- package/types/ngneers-controls-breadcrumb.d.ts +17 -0
- package/types/ngneers-controls-calendar.d.ts +24 -6
- package/types/ngneers-controls-chip.d.ts +17 -0
- package/types/ngneers-controls-color-picker.d.ts +119 -0
- package/types/ngneers-controls-dialog.d.ts +17 -0
- package/types/ngneers-controls-directives.d.ts +31 -2
- package/types/ngneers-controls-drawer.d.ts +17 -0
- package/types/ngneers-controls-edit-inplace.d.ts +23 -0
- package/types/ngneers-controls-errors.d.ts +105 -16
- package/types/ngneers-controls-filter.d.ts +30 -13
- package/types/ngneers-controls-hint.d.ts +8 -1
- package/types/ngneers-controls-i18n-translations-de.d.ts +17 -0
- package/types/ngneers-controls-i18n-translations-en.d.ts +17 -0
- package/types/ngneers-controls-i18n.d.ts +17 -0
- package/types/ngneers-controls-icon.d.ts +2 -2
- package/types/ngneers-controls-input-field.d.ts +28 -2
- package/types/ngneers-controls-input.d.ts +35 -3
- package/types/ngneers-controls-list-box.d.ts +17 -0
- package/types/ngneers-controls-mask-input.d.ts +17 -0
- package/types/ngneers-controls-otp.d.ts +262 -0
- package/types/ngneers-controls-paginator.d.ts +34 -3
- package/types/ngneers-controls-rating.d.ts +69 -0
- package/types/ngneers-controls-scroll-shadow.d.ts +11 -2
- package/types/ngneers-controls-scroller.d.ts +3 -1
- package/types/ngneers-controls-select.d.ts +30 -3
- package/types/ngneers-controls-snackbar.d.ts +17 -0
- package/types/ngneers-controls-splitter.d.ts +26 -2
- package/types/ngneers-controls-state.d.ts +2 -2
- package/types/ngneers-controls-stepper.d.ts +68 -0
- package/types/ngneers-controls-table.d.ts +276 -169
- package/types/ngneers-controls-toast.d.ts +17 -0
- package/types/ngneers-controls-tooltip.d.ts +0 -1
- package/types/ngneers-controls-tree.d.ts +17 -0
- package/types/ngneers-controls-upload.d.ts +17 -0
- package/types/ngneers-controls-utils.d.ts +27 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Provider, ModelSignal, OutputEmitterRef, Signal, EnvironmentProviders, ComponentRef, InputSignal, InputSignalWithTransform,
|
|
2
|
+
import { InjectionToken, Provider, ModelSignal, OutputEmitterRef, Signal, EnvironmentProviders, ComponentRef, InputSignal, InputSignalWithTransform, ElementRef, Injector, OnDestroy } from '@angular/core';
|
|
3
3
|
import { Translations } from '@ngneers/controls/i18n';
|
|
4
4
|
import { TimeSpan, LogLevel, DeepPartial } from '@ngneers/controls/utils';
|
|
5
5
|
import { Placement, Strategy, Middleware, ComputePositionReturn, Side, Alignment } from '@floating-ui/dom';
|
|
@@ -150,13 +150,6 @@ type ElementArray = Signal<ReadonlyArray<HTMLElement | ElementRef<HTMLElement>>>
|
|
|
150
150
|
type ElementSingle = Signal<HTMLElement | ElementRef<HTMLElement> | undefined> | HTMLElement | Document | ElementRef<HTMLElement>;
|
|
151
151
|
declare function elementSizeSignal(element: ElementSingle, active?: Signal<boolean>): Signal<Size>;
|
|
152
152
|
declare function elementsSizesSignal(element: ElementArray, active?: Signal<boolean>): Signal<readonly Size[]>;
|
|
153
|
-
/**
|
|
154
|
-
* @todo use dom event functions directly and remove this function
|
|
155
|
-
* @deprecated use dom event functions instead
|
|
156
|
-
*/
|
|
157
|
-
declare function abortSignalOnDestroy(options?: {
|
|
158
|
-
injector?: Injector;
|
|
159
|
-
}): AbortSignal;
|
|
160
153
|
/**
|
|
161
154
|
* Creates an Observable that emits the latest event of the specified type from the given DOM element.
|
|
162
155
|
*
|
|
@@ -201,6 +194,16 @@ declare function injectThemeControlKinds<T extends string>(controlName: T): Sign
|
|
|
201
194
|
* `NgnCustomTypes`.
|
|
202
195
|
* @returns A signal of the available colors.
|
|
203
196
|
*/
|
|
197
|
+
/**
|
|
198
|
+
* Reads the explicit per-control default `color`/`kind` from the active theme's
|
|
199
|
+
* `meta.defaults`, as a reactive signal. Empty object when none is configured —
|
|
200
|
+
* callers then fall back to the positional (first-array-entry) default.
|
|
201
|
+
* @param controlName The name of the control to get defaults for.
|
|
202
|
+
*/
|
|
203
|
+
declare function injectThemeControlDefaults<T extends string>(controlName: T): Signal<{
|
|
204
|
+
color?: CustomColor;
|
|
205
|
+
kind?: CustomKind<T>;
|
|
206
|
+
}>;
|
|
204
207
|
declare function injectThemeColors(controlName?: string): Signal<CustomColor[]>;
|
|
205
208
|
|
|
206
209
|
type DeviceType = 'mobile' | 'desktop' | 'tablet';
|
|
@@ -360,5 +363,5 @@ declare class ThemeService implements OnDestroy {
|
|
|
360
363
|
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
|
|
361
364
|
}
|
|
362
365
|
|
|
363
|
-
export { COLOR_SCHEME_STORAGE, COLOR_SCHEME_STORAGE_KEY, COLOR_SCHEME_VALUES, ColorSchemeService, NGN_CONFIG, NgnStorage, NgnTemplate, Platform, ThemeService,
|
|
366
|
+
export { COLOR_SCHEME_STORAGE, COLOR_SCHEME_STORAGE_KEY, COLOR_SCHEME_VALUES, ColorSchemeService, NGN_CONFIG, NgnStorage, NgnTemplate, Platform, ThemeService, autoPositionElement, colorSchemeInitScript, defaultNgnConfig, domEventHandler, domEventObservable, domEventSignal, elementSizeSignal, elementsSizesSignal, getAppliedClasses, injectTheme, injectThemeColors, injectThemeControlDefaults, injectThemeControlKinds, injectThemeTemplate, positionElement, provideNgnConfig, provideNgnControls, roundByDpr, setComponentInput, splitPlacement, templateTypeFn, templateTypesFn, themeTemplateToTemplateInfo, toModalCloseBy, toPopoverCloseBy, withAutoColorScheme };
|
|
364
367
|
export type { Anchor, AppliedThemeClassCfg, AutoPositioningHandle, CloseBy, ColorScheme, ColorSchemeStorage, ColorSchemeStorageOption, ControlTemplateInfo, DeviceType, NgnConfig, NgnConfigInit, NgnFeature, NgnStorageKind, Openable, Point, PopoverCloseBy, PositioningOptions, PositioningSizeConstraints, Size, TooltipOptions };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
3
|
+
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
4
|
+
import { NgnBase } from '@ngneers/controls/base';
|
|
5
|
+
|
|
6
|
+
/** One of the four corners the badge indicator can sit in. */
|
|
7
|
+
type BadgePosition = 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start';
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* The overlay element rendered by the {@link NgnBadge} directive. Not intended
|
|
11
|
+
* to be used directly in templates.
|
|
12
|
+
* @category control
|
|
13
|
+
*/
|
|
14
|
+
declare class NgnBadgeIndicator extends NgnBase<'badge'> {
|
|
15
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"badge", ["root", "dot", "circular", "top-end", "top-start", "bottom-end", "bottom-start"], readonly []>>;
|
|
16
|
+
/** The rendered badge text (already max-clamped by the directive). */
|
|
17
|
+
readonly text: _angular_core.InputSignal<string>;
|
|
18
|
+
/** Whether to render as a dot (no text). @default false */
|
|
19
|
+
readonly dot: _angular_core.InputSignal<boolean>;
|
|
20
|
+
/** Which corner the badge sits in. @default top-end */
|
|
21
|
+
readonly position: _angular_core.InputSignal<BadgePosition>;
|
|
22
|
+
/** Position on a circular anchor's edge (~45°) instead of the box corner. @default false */
|
|
23
|
+
readonly circular: _angular_core.InputSignal<boolean>;
|
|
24
|
+
/** CSS color value or `var(...)` reference for the badge fill. */
|
|
25
|
+
readonly bgColor: _angular_core.InputSignal<string | undefined>;
|
|
26
|
+
protected readonly display: _angular_core.Signal<string>;
|
|
27
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnBadgeIndicator, never>;
|
|
28
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgnBadgeIndicator, "ngn-badge-indicator", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; "dot": { "alias": "dot"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "circular": { "alias": "circular"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Overlays a small badge (count, text, or dot) onto its host element — an icon,
|
|
33
|
+
* button, or avatar. The badge is injected as an absolutely-positioned overlay,
|
|
34
|
+
* so the host is made `position: relative` when it is currently static.
|
|
35
|
+
*/
|
|
36
|
+
declare class NgnBadge {
|
|
37
|
+
private readonly _vcr;
|
|
38
|
+
private readonly _host;
|
|
39
|
+
private readonly _destroyRef;
|
|
40
|
+
private _ref?;
|
|
41
|
+
/** Badge content. A number is clamped by {@link max}; empty hides the badge unless {@link dot}. */
|
|
42
|
+
readonly value: _angular_core.InputSignal<string | number | undefined>;
|
|
43
|
+
/** Clamp a numeric {@link value} to `"{max}+"` when it exceeds this. */
|
|
44
|
+
readonly max: _angular_core.InputSignal<number | undefined>;
|
|
45
|
+
/** Render a dot with no text, ignoring {@link value}. @default false */
|
|
46
|
+
readonly dot: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
47
|
+
/** Show the badge even when {@link value} is `0`. @default false */
|
|
48
|
+
readonly showZero: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
49
|
+
/** Which corner the badge sits in. @default top-end */
|
|
50
|
+
readonly position: _angular_core.InputSignal<BadgePosition>;
|
|
51
|
+
/** CSS color value (hex/rgb) or `var(...)` reference for the badge fill. */
|
|
52
|
+
readonly color: _angular_core.InputSignal<string | undefined>;
|
|
53
|
+
/** Hide the badge without removing the host. @default false */
|
|
54
|
+
readonly hidden: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
55
|
+
/** Anchor on a circular host's edge (~45°) instead of the box corner (e.g. avatars). @default false */
|
|
56
|
+
readonly circular: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
57
|
+
private readonly _platform;
|
|
58
|
+
constructor();
|
|
59
|
+
/** Returns the string to render, or `null` when the badge should not show. */
|
|
60
|
+
private resolveText;
|
|
61
|
+
private teardown;
|
|
62
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnBadge, never>;
|
|
63
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgnBadge, "[ngnBadge], [ngnBadgeDot]", never, { "value": { "alias": "ngnBadge"; "required": false; "isSignal": true; }; "max": { "alias": "ngnBadgeMax"; "required": false; "isSignal": true; }; "dot": { "alias": "ngnBadgeDot"; "required": false; "isSignal": true; }; "showZero": { "alias": "ngnBadgeShowZero"; "required": false; "isSignal": true; }; "position": { "alias": "ngnBadgePosition"; "required": false; "isSignal": true; }; "color": { "alias": "ngnBadgeColor"; "required": false; "isSignal": true; }; "hidden": { "alias": "ngnBadgeHidden"; "required": false; "isSignal": true; }; "circular": { "alias": "ngnBadgeCircular"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { NgnBadge, NgnBadgeIndicator };
|
|
67
|
+
export type { BadgePosition };
|
|
@@ -63,6 +63,13 @@ declare abstract class NgnBase<T extends ControlName | null> {
|
|
|
63
63
|
* Overridden with `true` by input, mask-input, calendar, select, ….
|
|
64
64
|
*/
|
|
65
65
|
readonly isFieldControl: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the control holds no user-entered content. Field controls override
|
|
68
|
+
* this from their eager entry state — not {@link isFieldControl}'s `value`,
|
|
69
|
+
* which can lag behind typing until the entry is valid (mask-input, calendar)
|
|
70
|
+
* — so a wrapping `ngn-input-field` can float its label reliably.
|
|
71
|
+
*/
|
|
72
|
+
readonly empty: Signal<boolean>;
|
|
66
73
|
/**
|
|
67
74
|
* Hook for placing focus/selection from a pointer event that originated in the
|
|
68
75
|
* surrounding field (or the control itself). The default does nothing and
|
|
@@ -238,6 +245,19 @@ declare function getNgnInstance(element: HTMLElement): FullAnyNgnBase;
|
|
|
238
245
|
declare function getNearestNgnInstance<T extends Type<Omit<AnyNgnBase, 'kind'>>>(element: HTMLElement, kind?: T): InstanceType<T> | null;
|
|
239
246
|
declare function getNearestNgnInstanceSig<T extends Type<AnyNgnBase>>(element: HTMLElement, kind?: T): Signal<InstanceType<T> | null>;
|
|
240
247
|
|
|
248
|
+
/**
|
|
249
|
+
* When a control surfaces its invalid styling (border / `aria-invalid`):
|
|
250
|
+
* - `touched` — after the user has blurred the control (default).
|
|
251
|
+
* - `dirty` — once the value has changed.
|
|
252
|
+
* - `immediate` — as soon as it is invalid (e.g. explicit `[invalid]`).
|
|
253
|
+
* - `never` — never style invalid.
|
|
254
|
+
*/
|
|
255
|
+
type NgnInvalidTrigger = 'touched' | 'dirty' | 'immediate' | 'never';
|
|
256
|
+
/**
|
|
257
|
+
* Gates a raw invalid flag by an {@link NgnInvalidTrigger} against the given
|
|
258
|
+
* interaction state. Shared by {@link ValueControlBase} and `NgnInput`.
|
|
259
|
+
*/
|
|
260
|
+
declare function resolveInvalidState(invalid: boolean, trigger: NgnInvalidTrigger, touched: boolean, dirty: boolean): boolean;
|
|
241
261
|
declare abstract class ValueControlBase<C extends ControlName, T> extends NgnBase<C> implements FormValueControl<T> {
|
|
242
262
|
/**
|
|
243
263
|
* The label for the control.
|
|
@@ -254,10 +274,26 @@ declare abstract class ValueControlBase<C extends ControlName, T> extends NgnBas
|
|
|
254
274
|
*/
|
|
255
275
|
readonly inputId: _angular_core.InputSignal<string>;
|
|
256
276
|
/**
|
|
257
|
-
*
|
|
277
|
+
* The raw invalid flag. A bound signal-forms field writes it in from the
|
|
278
|
+
* field's validity (`FormUiControl` `invalid` input); the app may also set it
|
|
279
|
+
* explicitly. Whether it actually *shows* is gated by {@link invalidOn} — map
|
|
280
|
+
* the theme's invalid part (and any `aria-invalid`) to {@link invalidState},
|
|
281
|
+
* not this.
|
|
258
282
|
* @default false
|
|
259
283
|
*/
|
|
260
284
|
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
285
|
+
/**
|
|
286
|
+
* When the control surfaces its invalid styling. The control owns this timing
|
|
287
|
+
* (independent of `ngnErrors`, which governs only the error *message*).
|
|
288
|
+
* @default touched
|
|
289
|
+
*/
|
|
290
|
+
readonly invalidOn: _angular_core.InputSignal<NgnInvalidTrigger>;
|
|
291
|
+
/**
|
|
292
|
+
* The invalid state the theme should render: {@link invalid} gated by
|
|
293
|
+
* {@link invalidOn} against {@link touched} / {@link dirty}. Controls map their
|
|
294
|
+
* theme `invalid` part (and any `aria-invalid`) to this.
|
|
295
|
+
*/
|
|
296
|
+
protected readonly invalidState: _angular_core.Signal<boolean>;
|
|
261
297
|
/**
|
|
262
298
|
* The value of the control.
|
|
263
299
|
*/
|
|
@@ -267,11 +303,32 @@ declare abstract class ValueControlBase<C extends ControlName, T> extends NgnBas
|
|
|
267
303
|
*/
|
|
268
304
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
269
305
|
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
306
|
+
/**
|
|
307
|
+
* The touched state. A bound signal-forms field writes it in via the
|
|
308
|
+
* `FormUiControl` `touched` input; the control writes it out through
|
|
309
|
+
* {@link markTouched} on blur.
|
|
310
|
+
*/
|
|
270
311
|
readonly touched: _angular_core.ModelSignal<boolean>;
|
|
271
312
|
readonly dirty: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
313
|
+
/**
|
|
314
|
+
* Emits when focus leaves the control (the `FormUiControl` `touch` contract).
|
|
315
|
+
* The `Field` directive listens to this to mark the bound field touched — it's
|
|
316
|
+
* the only channel signal forms observes for blur, so plain `touched` writes
|
|
317
|
+
* don't reach the field.
|
|
318
|
+
*/
|
|
319
|
+
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
320
|
+
/**
|
|
321
|
+
* Marks the control touched: flips {@link touched} for local / no-form
|
|
322
|
+
* consumers (e.g. `ngnErrors`) and emits {@link touch} so a bound signal-forms
|
|
323
|
+
* field is marked touched too. Each control calls this from its own blur/close
|
|
324
|
+
* logic — composite controls with an out-of-DOM overlay (select, calendar)
|
|
325
|
+
* call it from their popover-aware blur, so opening the overlay isn't mistaken
|
|
326
|
+
* for a blur.
|
|
327
|
+
*/
|
|
328
|
+
protected markTouched(): void;
|
|
272
329
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ValueControlBase<any, any>, never>;
|
|
273
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ValueControlBase<any, any>, never, never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelledBy": { "alias": "labelledBy"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; }, never, never, true, never>;
|
|
330
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ValueControlBase<any, any>, never, never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelledBy": { "alias": "labelledBy"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "invalidOn": { "alias": "invalidOn"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; "touch": "touch"; }, never, never, true, never>;
|
|
274
331
|
}
|
|
275
332
|
|
|
276
|
-
export { NGN_CONTROL, NgnBase, NgnPt, NgnPtEngine, ValueControlBase, getNearestNgnInstance, getNearestNgnInstanceSig, getNgnInstance, provideSelf, setNgnInstance };
|
|
277
|
-
export type { AnyNgnBase, AnyNgnPassthrough, DepClass, FullAnyNgnBase, NgnBaseSafe, NgnPassthrough, PassthroughValue };
|
|
333
|
+
export { NGN_CONTROL, NgnBase, NgnPt, NgnPtEngine, ValueControlBase, getNearestNgnInstance, getNearestNgnInstanceSig, getNgnInstance, provideSelf, resolveInvalidState, setNgnInstance };
|
|
334
|
+
export type { AnyNgnBase, AnyNgnPassthrough, DepClass, FullAnyNgnBase, NgnBaseSafe, NgnInvalidTrigger, NgnPassthrough, PassthroughValue };
|
|
@@ -182,6 +182,9 @@ declare class NgnBreadcrumb extends BreadcrumbTemplates {
|
|
|
182
182
|
segmentRange: string;
|
|
183
183
|
optionSeparator: string;
|
|
184
184
|
};
|
|
185
|
+
otp: {
|
|
186
|
+
cellLabel: string;
|
|
187
|
+
};
|
|
185
188
|
drawer: {
|
|
186
189
|
close: string;
|
|
187
190
|
};
|
|
@@ -239,6 +242,8 @@ declare class NgnBreadcrumb extends BreadcrumbTemplates {
|
|
|
239
242
|
selectedCount: string;
|
|
240
243
|
page: string;
|
|
241
244
|
resultCount: string;
|
|
245
|
+
retry: string;
|
|
246
|
+
loadError: string;
|
|
242
247
|
};
|
|
243
248
|
state: {
|
|
244
249
|
loading: string;
|
|
@@ -247,6 +252,18 @@ declare class NgnBreadcrumb extends BreadcrumbTemplates {
|
|
|
247
252
|
error: string;
|
|
248
253
|
cancelled: string;
|
|
249
254
|
};
|
|
255
|
+
errors: {
|
|
256
|
+
pending: string;
|
|
257
|
+
required: string;
|
|
258
|
+
email: string;
|
|
259
|
+
minlength: string;
|
|
260
|
+
maxlength: string;
|
|
261
|
+
minLength: string;
|
|
262
|
+
maxLength: string;
|
|
263
|
+
min: string;
|
|
264
|
+
max: string;
|
|
265
|
+
pattern: string;
|
|
266
|
+
};
|
|
250
267
|
}, "_">;
|
|
251
268
|
/**
|
|
252
269
|
* The breadcrumb entries to render, ordered from root to the current page.
|
|
@@ -261,6 +261,9 @@ declare class NgnCalendar extends CalendarTemplates {
|
|
|
261
261
|
segmentRange: string;
|
|
262
262
|
optionSeparator: string;
|
|
263
263
|
};
|
|
264
|
+
otp: {
|
|
265
|
+
cellLabel: string;
|
|
266
|
+
};
|
|
264
267
|
drawer: {
|
|
265
268
|
close: string;
|
|
266
269
|
};
|
|
@@ -318,6 +321,8 @@ declare class NgnCalendar extends CalendarTemplates {
|
|
|
318
321
|
selectedCount: string;
|
|
319
322
|
page: string;
|
|
320
323
|
resultCount: string;
|
|
324
|
+
retry: string;
|
|
325
|
+
loadError: string;
|
|
321
326
|
};
|
|
322
327
|
state: {
|
|
323
328
|
loading: string;
|
|
@@ -326,6 +331,18 @@ declare class NgnCalendar extends CalendarTemplates {
|
|
|
326
331
|
error: string;
|
|
327
332
|
cancelled: string;
|
|
328
333
|
};
|
|
334
|
+
errors: {
|
|
335
|
+
pending: string;
|
|
336
|
+
required: string;
|
|
337
|
+
email: string;
|
|
338
|
+
minlength: string;
|
|
339
|
+
maxlength: string;
|
|
340
|
+
minLength: string;
|
|
341
|
+
maxLength: string;
|
|
342
|
+
min: string;
|
|
343
|
+
max: string;
|
|
344
|
+
pattern: string;
|
|
345
|
+
};
|
|
329
346
|
}, "_">;
|
|
330
347
|
readonly isFieldControl = true;
|
|
331
348
|
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"calendar", ["root", "inline", "invalid", "details", "header", "navigation", "days", "week-day", "day", "day-selected", "day-today", "day-other-month", "months", "month", "time", "input-field"], readonly [{
|
|
@@ -345,7 +362,7 @@ declare class NgnCalendar extends CalendarTemplates {
|
|
|
345
362
|
readonly template: _ngneers_controls_themes.ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly []>;
|
|
346
363
|
}, {
|
|
347
364
|
readonly class: "current-month";
|
|
348
|
-
readonly template: _ngneers_controls_themes.ControlTemplate<"select", ["root", "combobox", "input", "icon", "input-editable", "popover-content", "filter-icon", "list-box-empty"], readonly [{
|
|
365
|
+
readonly template: _ngneers_controls_themes.ControlTemplate<"select", ["root", "combobox", "empty", "placeholder", "input", "icon", "input-editable", "popover-content", "filter-icon", "list-box-empty"], readonly [{
|
|
349
366
|
readonly class: "popover";
|
|
350
367
|
readonly template: _ngneers_controls_themes.ControlTemplate<"popover", ["root", "content", "content-closing"], readonly []>;
|
|
351
368
|
}, {
|
|
@@ -359,7 +376,7 @@ declare class NgnCalendar extends CalendarTemplates {
|
|
|
359
376
|
}]>;
|
|
360
377
|
}, {
|
|
361
378
|
readonly class: "filter";
|
|
362
|
-
readonly template: _ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
379
|
+
readonly template: _ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "filled", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`, `kind-${string}`], readonly [{
|
|
363
380
|
readonly class: "input";
|
|
364
381
|
readonly template: _ngneers_controls_themes.ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
365
382
|
readonly projected: true;
|
|
@@ -367,7 +384,7 @@ declare class NgnCalendar extends CalendarTemplates {
|
|
|
367
384
|
}]>;
|
|
368
385
|
}, {
|
|
369
386
|
readonly class: "current-year";
|
|
370
|
-
readonly template: _ngneers_controls_themes.ControlTemplate<"select", ["root", "combobox", "input", "icon", "input-editable", "popover-content", "filter-icon", "list-box-empty"], readonly [{
|
|
387
|
+
readonly template: _ngneers_controls_themes.ControlTemplate<"select", ["root", "combobox", "empty", "placeholder", "input", "icon", "input-editable", "popover-content", "filter-icon", "list-box-empty"], readonly [{
|
|
371
388
|
readonly class: "popover";
|
|
372
389
|
readonly template: _ngneers_controls_themes.ControlTemplate<"popover", ["root", "content", "content-closing"], readonly []>;
|
|
373
390
|
}, {
|
|
@@ -381,7 +398,7 @@ declare class NgnCalendar extends CalendarTemplates {
|
|
|
381
398
|
}]>;
|
|
382
399
|
}, {
|
|
383
400
|
readonly class: "filter";
|
|
384
|
-
readonly template: _ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
401
|
+
readonly template: _ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "filled", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`, `kind-${string}`], readonly [{
|
|
385
402
|
readonly class: "input";
|
|
386
403
|
readonly template: _ngneers_controls_themes.ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
387
404
|
readonly projected: true;
|
|
@@ -389,19 +406,20 @@ declare class NgnCalendar extends CalendarTemplates {
|
|
|
389
406
|
}]>;
|
|
390
407
|
}, {
|
|
391
408
|
readonly class: "current-month-field";
|
|
392
|
-
readonly template: _ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
409
|
+
readonly template: _ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "filled", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`, `kind-${string}`], readonly [{
|
|
393
410
|
readonly class: "input";
|
|
394
411
|
readonly template: _ngneers_controls_themes.ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
395
412
|
readonly projected: true;
|
|
396
413
|
}]>;
|
|
397
414
|
}, {
|
|
398
415
|
readonly class: "current-year-field";
|
|
399
|
-
readonly template: _ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
416
|
+
readonly template: _ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "filled", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`, `kind-${string}`], readonly [{
|
|
400
417
|
readonly class: "input";
|
|
401
418
|
readonly template: _ngneers_controls_themes.ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
402
419
|
readonly projected: true;
|
|
403
420
|
}]>;
|
|
404
421
|
}]>>;
|
|
422
|
+
readonly empty: Signal<boolean>;
|
|
405
423
|
protected get anchorElement(): HTMLElement;
|
|
406
424
|
protected readonly year: _angular_core.WritableSignal<number>;
|
|
407
425
|
protected readonly month: _angular_core.WritableSignal<number>;
|
|
@@ -107,6 +107,9 @@ declare class NgnChip extends NgnBase<'chip'> {
|
|
|
107
107
|
segmentRange: string;
|
|
108
108
|
optionSeparator: string;
|
|
109
109
|
};
|
|
110
|
+
otp: {
|
|
111
|
+
cellLabel: string;
|
|
112
|
+
};
|
|
110
113
|
drawer: {
|
|
111
114
|
close: string;
|
|
112
115
|
};
|
|
@@ -164,6 +167,8 @@ declare class NgnChip extends NgnBase<'chip'> {
|
|
|
164
167
|
selectedCount: string;
|
|
165
168
|
page: string;
|
|
166
169
|
resultCount: string;
|
|
170
|
+
retry: string;
|
|
171
|
+
loadError: string;
|
|
167
172
|
};
|
|
168
173
|
state: {
|
|
169
174
|
loading: string;
|
|
@@ -172,6 +177,18 @@ declare class NgnChip extends NgnBase<'chip'> {
|
|
|
172
177
|
error: string;
|
|
173
178
|
cancelled: string;
|
|
174
179
|
};
|
|
180
|
+
errors: {
|
|
181
|
+
pending: string;
|
|
182
|
+
required: string;
|
|
183
|
+
email: string;
|
|
184
|
+
minlength: string;
|
|
185
|
+
maxlength: string;
|
|
186
|
+
minLength: string;
|
|
187
|
+
maxLength: string;
|
|
188
|
+
min: string;
|
|
189
|
+
max: string;
|
|
190
|
+
pattern: string;
|
|
191
|
+
};
|
|
175
192
|
}, "_">;
|
|
176
193
|
/**
|
|
177
194
|
* Set whether the chip can be closed (removed).
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
3
|
+
import { Openable, Anchor } from '@ngneers/controls/api/ng';
|
|
4
|
+
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
5
|
+
import { ValueControlBase } from '@ngneers/controls/base';
|
|
6
|
+
import { NgnDragInfo } from '@ngneers/controls/directives';
|
|
7
|
+
import { ColorFormat, HSVA } from '@ngneers/controls/utils';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @category control
|
|
11
|
+
*/
|
|
12
|
+
declare class NgnColorPicker extends ValueControlBase<'color-picker', string> implements Openable {
|
|
13
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"color-picker", ["root", "inline", "trigger", "preview", "panel", "sv-area", "sv-thumb", "hue-track", "hue-thumb", "alpha-track", "alpha-thumb", "swatches", "swatch", "fields", "channels", "channel", "channel-hex", "channel-label", "format-toggle", "invalid", "disabled"], readonly [{
|
|
14
|
+
readonly class: "popover";
|
|
15
|
+
readonly template: _ngneers_controls_themes.ControlTemplate<"popover", ["root", "content", "content-closing"], readonly []>;
|
|
16
|
+
}]>>;
|
|
17
|
+
private readonly _svArea;
|
|
18
|
+
private readonly _hueTrack;
|
|
19
|
+
private readonly _alphaTrack;
|
|
20
|
+
private readonly _popover;
|
|
21
|
+
/** Output/display format. @default hex */
|
|
22
|
+
readonly format: _angular_core.InputSignal<ColorFormat>;
|
|
23
|
+
/** Show the alpha channel. @default true */
|
|
24
|
+
readonly alpha: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
25
|
+
/** Preset swatch colors. */
|
|
26
|
+
readonly swatches: _angular_core.InputSignal<string[] | undefined>;
|
|
27
|
+
/** Render the panel inline instead of behind a trigger. @default false */
|
|
28
|
+
readonly inline: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
29
|
+
/**
|
|
30
|
+
* Headless mode: render no trigger of its own and open in a popover anchored to
|
|
31
|
+
* {@link anchor}, driven imperatively via {@link show}/{@link hide}/{@link toggle}
|
|
32
|
+
* (like `ngn-menu`). Requires {@link anchor}. @default false
|
|
33
|
+
*/
|
|
34
|
+
readonly popover: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
35
|
+
/** The external element the headless popover anchors to. Required when {@link popover} is set. */
|
|
36
|
+
readonly anchor: _angular_core.InputSignal<Anchor | undefined>;
|
|
37
|
+
/** Open state of the popover (headless or built-in trigger); two-way bindable. @default false */
|
|
38
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
39
|
+
/** Emits when the popover has fully closed (part of the `Openable` contract). */
|
|
40
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
41
|
+
/** Internal HSVA source of truth. */
|
|
42
|
+
protected readonly hsva: _angular_core.WritableSignal<HSVA>;
|
|
43
|
+
/** The format the text field/toggle currently displays; seeded from {@link format}. */
|
|
44
|
+
protected readonly activeFormat: _angular_core.WritableSignal<ColorFormat>;
|
|
45
|
+
/** Current color as a CSS string for previews. */
|
|
46
|
+
protected readonly cssColor: _angular_core.Signal<string>;
|
|
47
|
+
/** The last value string this component itself wrote via {@link commit}. */
|
|
48
|
+
private _lastCommitted;
|
|
49
|
+
/**
|
|
50
|
+
* The raw text the user is currently typing in the hex/value field, or `null`
|
|
51
|
+
* when not editing. While editing, the field shows this verbatim (so a short
|
|
52
|
+
* form like `#ff0` isn't reformatted mid-typing) even though the color updates
|
|
53
|
+
* live from it.
|
|
54
|
+
*/
|
|
55
|
+
protected readonly editText: _angular_core.WritableSignal<string | null>;
|
|
56
|
+
constructor();
|
|
57
|
+
/** Open the popover (headless or built-in trigger). */
|
|
58
|
+
show(): void;
|
|
59
|
+
/** Close the popover. */
|
|
60
|
+
hide(): void;
|
|
61
|
+
/** Toggle the popover. */
|
|
62
|
+
toggle(): void;
|
|
63
|
+
/** Commit the current HSVA to the model value, formatted in the currently active format. */
|
|
64
|
+
private commit;
|
|
65
|
+
/**
|
|
66
|
+
* Set the color from an RGBA and commit, preserving the current hue when the new color is
|
|
67
|
+
* achromatic (s=0 or v=0). Otherwise the RGB→HSV round-trip collapses hue to 0, so it would be
|
|
68
|
+
* lost the moment a channel/swatch edit lands on a grey/black — mirrors the SV-drag path, which
|
|
69
|
+
* keeps hue in the `hsva` signal. `alpha` defaults to the incoming rgba's alpha.
|
|
70
|
+
*/
|
|
71
|
+
private setFromRgba;
|
|
72
|
+
protected onSvDrag(info: NgnDragInfo): void;
|
|
73
|
+
protected onHueDrag(info: NgnDragInfo): void;
|
|
74
|
+
protected onAlphaDrag(info: NgnDragInfo): void;
|
|
75
|
+
protected selectSwatch(color: string): void;
|
|
76
|
+
protected toggleOpen(): void;
|
|
77
|
+
/** Popover `closed` handler: run the blur check and re-emit for consumers. */
|
|
78
|
+
protected onPopoverClosed(): void;
|
|
79
|
+
protected potentiallyBlurred(): void;
|
|
80
|
+
protected cycleFormat(): void;
|
|
81
|
+
protected readonly textValue: _angular_core.Signal<string>;
|
|
82
|
+
/**
|
|
83
|
+
* What the hex/value field displays: the user's in-progress text while editing,
|
|
84
|
+
* otherwise the canonical formatted value.
|
|
85
|
+
*/
|
|
86
|
+
protected readonly displayText: _angular_core.Signal<string>;
|
|
87
|
+
/**
|
|
88
|
+
* Per-keystroke handler: keep the field showing the raw text, but update the color
|
|
89
|
+
* live from it when it parses. The field is NOT reformatted while typing.
|
|
90
|
+
*/
|
|
91
|
+
protected onHexInput(text: string | null): void;
|
|
92
|
+
/** Commit handler (change / Enter / blur): apply the final text and normalize the field. */
|
|
93
|
+
protected onHexCommit(text: string | null): void;
|
|
94
|
+
/** RGBA channel values for the RGB boxes. r/g/b are 0–255. */
|
|
95
|
+
protected readonly rgbaChannels: _angular_core.Signal<{
|
|
96
|
+
r: number;
|
|
97
|
+
g: number;
|
|
98
|
+
b: number;
|
|
99
|
+
}>;
|
|
100
|
+
/** HSL channel values for the HSL boxes. h 0–360, s/l 0–100 (%). */
|
|
101
|
+
protected readonly hslChannels: _angular_core.Signal<{
|
|
102
|
+
h: number;
|
|
103
|
+
s: number;
|
|
104
|
+
l: number;
|
|
105
|
+
}>;
|
|
106
|
+
/** Alpha as an integer percentage (0–100) for the alpha box. */
|
|
107
|
+
protected readonly alphaPercent: _angular_core.Signal<number>;
|
|
108
|
+
protected setRgbChannel(ch: 'r' | 'g' | 'b', value: number | null): void;
|
|
109
|
+
protected setHslChannel(ch: 'h' | 's' | 'l', value: number | null): void;
|
|
110
|
+
protected setAlphaPercent(value: number | null): void;
|
|
111
|
+
protected readonly svThumbLeft: _angular_core.Signal<number>;
|
|
112
|
+
protected readonly svThumbTop: _angular_core.Signal<number>;
|
|
113
|
+
protected readonly hueThumbLeft: _angular_core.Signal<number>;
|
|
114
|
+
protected readonly alphaThumbLeft: _angular_core.Signal<number>;
|
|
115
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnColorPicker, never>;
|
|
116
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgnColorPicker, "ngn-color-picker", never, { "format": { "alias": "format"; "required": false; "isSignal": true; }; "alpha": { "alias": "alpha"; "required": false; "isSignal": true; }; "swatches": { "alias": "swatches"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; "popover": { "alias": "popover"; "required": false; "isSignal": true; }; "anchor": { "alias": "anchor"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closed": "closed"; }, never, never, true, never>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export { NgnColorPicker };
|
|
@@ -214,6 +214,9 @@ declare class NgnDialog<T, Buttons extends NgnActionButtonConfig<T extends Promp
|
|
|
214
214
|
segmentRange: string;
|
|
215
215
|
optionSeparator: string;
|
|
216
216
|
};
|
|
217
|
+
otp: {
|
|
218
|
+
cellLabel: string;
|
|
219
|
+
};
|
|
217
220
|
drawer: {
|
|
218
221
|
close: string;
|
|
219
222
|
};
|
|
@@ -271,6 +274,8 @@ declare class NgnDialog<T, Buttons extends NgnActionButtonConfig<T extends Promp
|
|
|
271
274
|
selectedCount: string;
|
|
272
275
|
page: string;
|
|
273
276
|
resultCount: string;
|
|
277
|
+
retry: string;
|
|
278
|
+
loadError: string;
|
|
274
279
|
};
|
|
275
280
|
state: {
|
|
276
281
|
loading: string;
|
|
@@ -279,6 +284,18 @@ declare class NgnDialog<T, Buttons extends NgnActionButtonConfig<T extends Promp
|
|
|
279
284
|
error: string;
|
|
280
285
|
cancelled: string;
|
|
281
286
|
};
|
|
287
|
+
errors: {
|
|
288
|
+
pending: string;
|
|
289
|
+
required: string;
|
|
290
|
+
email: string;
|
|
291
|
+
minlength: string;
|
|
292
|
+
maxlength: string;
|
|
293
|
+
minLength: string;
|
|
294
|
+
maxLength: string;
|
|
295
|
+
min: string;
|
|
296
|
+
max: string;
|
|
297
|
+
pattern: string;
|
|
298
|
+
};
|
|
282
299
|
}, "_">;
|
|
283
300
|
protected readonly headerId: string;
|
|
284
301
|
private readonly _dialogElement;
|
|
@@ -151,6 +151,10 @@ declare class NgnResizable {
|
|
|
151
151
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgnResizable, "[ngnResizable]", never, { "ngnResizable": { "alias": "ngnResizable"; "required": false; "isSignal": true; }; "ngnResizableSizeLimits": { "alias": "ngnResizableSizeLimits"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
/** Remaining scrollable distance to the end, clamped at 0. Pure for testing. */
|
|
155
|
+
declare function computeDistanceFromEnd(scrollSize: number, clientSize: number, scrollPos: number): number;
|
|
156
|
+
/** Whether the current end-distance is within the trigger threshold. Pure for testing. */
|
|
157
|
+
declare function isWithinEndZone(distanceFromEnd: number, threshold: number): boolean;
|
|
154
158
|
declare class NgnScrollAmount {
|
|
155
159
|
private readonly _el;
|
|
156
160
|
/**
|
|
@@ -158,14 +162,39 @@ declare class NgnScrollAmount {
|
|
|
158
162
|
* dimensions are tracked on this element instead of the host element.
|
|
159
163
|
*/
|
|
160
164
|
readonly container: _angular_core.InputSignal<HTMLElement | undefined>;
|
|
165
|
+
/**
|
|
166
|
+
* Distance (px) from the end at which {@link endReached} fires.
|
|
167
|
+
* @default 0
|
|
168
|
+
*/
|
|
169
|
+
readonly endThreshold: _angular_core.InputSignal<number>;
|
|
170
|
+
/**
|
|
171
|
+
* Fires once when scrolling crosses within {@link endThreshold} of the bottom
|
|
172
|
+
* (edge-triggered). For simple "load more" lists; guarded consumers should
|
|
173
|
+
* read {@link distanceFromEnd} instead.
|
|
174
|
+
*/
|
|
175
|
+
readonly endReached: _angular_core.OutputEmitterRef<void>;
|
|
161
176
|
readonly scrollTarget: _angular_core.Signal<HTMLElement>;
|
|
162
177
|
readonly scrollTop: _angular_core.WritableSignal<number>;
|
|
163
178
|
readonly scrollLeft: _angular_core.WritableSignal<number>;
|
|
179
|
+
private readonly _containerSize;
|
|
180
|
+
private readonly _hostSize;
|
|
181
|
+
readonly scrollHeight: _angular_core.WritableSignal<number>;
|
|
182
|
+
readonly clientHeight: _angular_core.WritableSignal<number>;
|
|
183
|
+
readonly scrollWidth: _angular_core.WritableSignal<number>;
|
|
184
|
+
readonly clientWidth: _angular_core.WritableSignal<number>;
|
|
185
|
+
/** Remaining vertical scroll distance to the bottom (px), clamped at 0. */
|
|
186
|
+
readonly distanceFromEnd: _angular_core.Signal<number>;
|
|
187
|
+
/** Remaining horizontal scroll distance to the right edge (px), clamped at 0. */
|
|
188
|
+
readonly distanceFromRight: _angular_core.Signal<number>;
|
|
164
189
|
private readonly _scrollEvent;
|
|
190
|
+
/** Syncs the vertical scroll-size signals. */
|
|
191
|
+
private _syncVerticalGeometry;
|
|
192
|
+
/** Syncs all four scroll-geometry signals off `target`. */
|
|
193
|
+
private _syncGeometry;
|
|
165
194
|
constructor();
|
|
166
195
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnScrollAmount, never>;
|
|
167
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgnScrollAmount, "[ngnScrollAmount]", never, { "container": { "alias": "ngnScrollAmountContainer"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
196
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgnScrollAmount, "[ngnScrollAmount]", never, { "container": { "alias": "ngnScrollAmountContainer"; "required": false; "isSignal": true; }; "endThreshold": { "alias": "ngnScrollAmountEndThreshold"; "required": false; "isSignal": true; }; }, { "endReached": "endReached"; }, never, never, true, never>;
|
|
168
197
|
}
|
|
169
198
|
|
|
170
|
-
export { NgnAutofocus, NgnDrag, NgnDragScroll, NgnMovable, NgnResizable, NgnScrollAmount };
|
|
199
|
+
export { NgnAutofocus, NgnDrag, NgnDragScroll, NgnMovable, NgnResizable, NgnScrollAmount, computeDistanceFromEnd, isWithinEndZone };
|
|
171
200
|
export type { NgnDragInfo };
|
|
@@ -161,6 +161,9 @@ declare class NgnDrawer extends DrawerTemplates implements Openable {
|
|
|
161
161
|
segmentRange: string;
|
|
162
162
|
optionSeparator: string;
|
|
163
163
|
};
|
|
164
|
+
otp: {
|
|
165
|
+
cellLabel: string;
|
|
166
|
+
};
|
|
164
167
|
drawer: {
|
|
165
168
|
close: string;
|
|
166
169
|
};
|
|
@@ -218,6 +221,8 @@ declare class NgnDrawer extends DrawerTemplates implements Openable {
|
|
|
218
221
|
selectedCount: string;
|
|
219
222
|
page: string;
|
|
220
223
|
resultCount: string;
|
|
224
|
+
retry: string;
|
|
225
|
+
loadError: string;
|
|
221
226
|
};
|
|
222
227
|
state: {
|
|
223
228
|
loading: string;
|
|
@@ -226,6 +231,18 @@ declare class NgnDrawer extends DrawerTemplates implements Openable {
|
|
|
226
231
|
error: string;
|
|
227
232
|
cancelled: string;
|
|
228
233
|
};
|
|
234
|
+
errors: {
|
|
235
|
+
pending: string;
|
|
236
|
+
required: string;
|
|
237
|
+
email: string;
|
|
238
|
+
minlength: string;
|
|
239
|
+
maxlength: string;
|
|
240
|
+
minLength: string;
|
|
241
|
+
maxLength: string;
|
|
242
|
+
min: string;
|
|
243
|
+
max: string;
|
|
244
|
+
pattern: string;
|
|
245
|
+
};
|
|
229
246
|
}, "_">;
|
|
230
247
|
protected readonly headerId: string;
|
|
231
248
|
private _focusTrap?;
|