@ngneers/controls 0.0.1-pre5 → 0.0.1-pre7
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-accordion.mjs +33 -33
- package/fesm2022/ngneers-controls-accordion.mjs.map +1 -1
- package/fesm2022/ngneers-controls-api-ng.mjs +22 -19
- package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -1
- package/fesm2022/ngneers-controls-api-resize.mjs +706 -0
- package/fesm2022/ngneers-controls-api-resize.mjs.map +1 -0
- package/fesm2022/ngneers-controls-avatar.mjs +13 -13
- package/fesm2022/ngneers-controls-avatar.mjs.map +1 -1
- package/fesm2022/ngneers-controls-base.mjs +89 -64
- package/fesm2022/ngneers-controls-base.mjs.map +1 -1
- package/fesm2022/ngneers-controls-breadcrumb.mjs +19 -19
- package/fesm2022/ngneers-controls-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngneers-controls-button-group.mjs +8 -8
- package/fesm2022/ngneers-controls-button-group.mjs.map +1 -1
- package/fesm2022/ngneers-controls-button.mjs +15 -10
- package/fesm2022/ngneers-controls-button.mjs.map +1 -1
- package/fesm2022/{ngneers-controls-calendar-time-BEeJIqIX.mjs → ngneers-controls-calendar-time-CKAqRgOP.mjs} +9 -9
- package/fesm2022/{ngneers-controls-calendar-time-BEeJIqIX.mjs.map → ngneers-controls-calendar-time-CKAqRgOP.mjs.map} +1 -1
- package/fesm2022/ngneers-controls-calendar.mjs +56 -56
- package/fesm2022/ngneers-controls-calendar.mjs.map +1 -1
- package/fesm2022/ngneers-controls-checkbox.mjs +9 -9
- package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -1
- package/fesm2022/ngneers-controls-chip.mjs +7 -7
- package/fesm2022/ngneers-controls-chip.mjs.map +1 -1
- package/fesm2022/ngneers-controls-default-icons.mjs +61 -0
- package/fesm2022/ngneers-controls-default-icons.mjs.map +1 -0
- package/fesm2022/ngneers-controls-defer.mjs +10 -10
- package/fesm2022/ngneers-controls-defer.mjs.map +1 -1
- package/fesm2022/ngneers-controls-dialog.mjs +38 -40
- package/fesm2022/ngneers-controls-dialog.mjs.map +1 -1
- package/fesm2022/ngneers-controls-directives.mjs +45 -39
- package/fesm2022/ngneers-controls-directives.mjs.map +1 -1
- package/fesm2022/ngneers-controls-drawer.mjs +29 -29
- package/fesm2022/ngneers-controls-drawer.mjs.map +1 -1
- package/fesm2022/ngneers-controls-edit-inplace.mjs +16 -16
- package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -1
- package/fesm2022/ngneers-controls-filter.mjs +192 -44
- package/fesm2022/ngneers-controls-filter.mjs.map +1 -1
- package/fesm2022/{ngneers-controls-i18n-de-CdTPeBiR.mjs → ngneers-controls-i18n-de-CF0xTWEX.mjs} +9 -5
- package/fesm2022/ngneers-controls-i18n-de-CF0xTWEX.mjs.map +1 -0
- package/fesm2022/{ngneers-controls-i18n-en-Cfp2pOLY.mjs → ngneers-controls-i18n-en-8B7xAjH2.mjs} +9 -5
- package/fesm2022/ngneers-controls-i18n-en-8B7xAjH2.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n.mjs +5 -5
- package/fesm2022/ngneers-controls-i18n.mjs.map +1 -1
- package/fesm2022/ngneers-controls-icon.mjs +111 -47
- package/fesm2022/ngneers-controls-icon.mjs.map +1 -1
- package/fesm2022/ngneers-controls-inplace.mjs +18 -18
- package/fesm2022/ngneers-controls-inplace.mjs.map +1 -1
- package/fesm2022/ngneers-controls-input-field.mjs +16 -16
- package/fesm2022/ngneers-controls-input-field.mjs.map +1 -1
- package/fesm2022/ngneers-controls-input-mask.mjs +8 -8
- package/fesm2022/ngneers-controls-input-mask.mjs.map +1 -1
- package/fesm2022/ngneers-controls-input.mjs +6 -6
- package/fesm2022/ngneers-controls-input.mjs.map +1 -1
- package/fesm2022/ngneers-controls-item-view.mjs +33 -33
- package/fesm2022/ngneers-controls-item-view.mjs.map +1 -1
- package/fesm2022/ngneers-controls-list-box.mjs +31 -31
- package/fesm2022/ngneers-controls-list-box.mjs.map +1 -1
- package/fesm2022/ngneers-controls-menu.mjs +33 -33
- package/fesm2022/ngneers-controls-menu.mjs.map +1 -1
- package/fesm2022/ngneers-controls-message.mjs +4 -4
- package/fesm2022/ngneers-controls-message.mjs.map +1 -1
- package/fesm2022/ngneers-controls-paginator.mjs +13 -13
- package/fesm2022/ngneers-controls-paginator.mjs.map +1 -1
- package/fesm2022/ngneers-controls-popover.mjs +21 -16
- package/fesm2022/ngneers-controls-popover.mjs.map +1 -1
- package/fesm2022/ngneers-controls-progress.mjs +16 -16
- package/fesm2022/ngneers-controls-progress.mjs.map +1 -1
- package/fesm2022/ngneers-controls-scroll-shadow.mjs +54 -0
- package/fesm2022/ngneers-controls-scroll-shadow.mjs.map +1 -0
- package/fesm2022/ngneers-controls-scroller.mjs +74 -39
- package/fesm2022/ngneers-controls-scroller.mjs.map +1 -1
- package/fesm2022/ngneers-controls-select-button.mjs +7 -7
- package/fesm2022/ngneers-controls-select-button.mjs.map +1 -1
- package/fesm2022/ngneers-controls-select.mjs +48 -47
- package/fesm2022/ngneers-controls-select.mjs.map +1 -1
- package/fesm2022/ngneers-controls-slider.mjs +11 -11
- package/fesm2022/ngneers-controls-slider.mjs.map +1 -1
- package/fesm2022/ngneers-controls-spinner.mjs +7 -7
- package/fesm2022/ngneers-controls-spinner.mjs.map +1 -1
- package/fesm2022/ngneers-controls-splitter.mjs +141 -328
- package/fesm2022/ngneers-controls-splitter.mjs.map +1 -1
- package/fesm2022/ngneers-controls-switch.mjs +3 -3
- package/fesm2022/ngneers-controls-switch.mjs.map +1 -1
- package/fesm2022/ngneers-controls-table.mjs +1456 -82
- package/fesm2022/ngneers-controls-table.mjs.map +1 -1
- package/fesm2022/ngneers-controls-tabs.mjs +41 -40
- package/fesm2022/ngneers-controls-tabs.mjs.map +1 -1
- package/fesm2022/ngneers-controls-tag.mjs +4 -4
- package/fesm2022/ngneers-controls-tag.mjs.map +1 -1
- package/fesm2022/ngneers-controls-toast.mjs +19 -19
- package/fesm2022/ngneers-controls-toast.mjs.map +1 -1
- package/fesm2022/ngneers-controls-toggle-button.mjs +10 -10
- package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -1
- package/fesm2022/ngneers-controls-tooltip.mjs +74 -38
- package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -1
- package/fesm2022/ngneers-controls-utils-ng.mjs +9 -9
- package/fesm2022/ngneers-controls-utils-ng.mjs.map +1 -1
- package/fesm2022/ngneers-controls-utils.mjs +1 -1
- package/fesm2022/ngneers-controls-utils.mjs.map +1 -1
- package/package.json +34 -12
- package/types/ngneers-controls-accordion.d.ts +6 -4
- package/types/ngneers-controls-api-ng.d.ts +7 -2
- package/types/ngneers-controls-api-resize.d.ts +318 -0
- package/types/ngneers-controls-api.d.ts +2 -2
- package/types/ngneers-controls-base.d.ts +8 -0
- package/types/ngneers-controls-breadcrumb.d.ts +6 -4
- package/types/ngneers-controls-button.d.ts +13 -8
- package/types/ngneers-controls-calendar.d.ts +5 -1
- package/types/ngneers-controls-checkbox.d.ts +6 -4
- package/types/ngneers-controls-chip.d.ts +3 -1
- package/types/ngneers-controls-default-icons.d.ts +5 -0
- package/types/ngneers-controls-directives.d.ts +7 -1
- package/types/ngneers-controls-drawer.d.ts +7 -1
- package/types/ngneers-controls-edit-inplace.d.ts +4 -0
- package/types/ngneers-controls-filter.d.ts +52 -3
- package/types/ngneers-controls-i18n.d.ts +4 -0
- package/types/ngneers-controls-icon.d.ts +23 -40
- package/types/ngneers-controls-input-field.d.ts +7 -1
- package/types/ngneers-controls-item-view.d.ts +4 -2
- package/types/ngneers-controls-list-box.d.ts +5 -1
- package/types/ngneers-controls-menu.d.ts +4 -2
- package/types/ngneers-controls-message.d.ts +3 -1
- package/types/ngneers-controls-paginator.d.ts +4 -0
- package/types/ngneers-controls-popover.d.ts +2 -1
- package/types/ngneers-controls-scroll-shadow.d.ts +16 -0
- package/types/ngneers-controls-scroller.d.ts +12 -2
- package/types/ngneers-controls-select.d.ts +11 -12
- package/types/ngneers-controls-spinner.d.ts +1 -1
- package/types/ngneers-controls-splitter.d.ts +29 -59
- package/types/ngneers-controls-table.d.ts +380 -24
- package/types/ngneers-controls-tabs.d.ts +4 -2
- package/types/ngneers-controls-tag.d.ts +3 -1
- package/types/ngneers-controls-toast.d.ts +5 -3
- package/types/ngneers-controls-toggle-button.d.ts +5 -3
- package/types/ngneers-controls-tooltip.d.ts +7 -1
- package/fesm2022/ngneers-controls-i18n-de-CdTPeBiR.mjs.map +0 -1
- package/fesm2022/ngneers-controls-i18n-en-Cfp2pOLY.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-calendar-z5xA9wTT.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-calendar-z5xA9wTT.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-check-DdAQ9k-T.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-check-DdAQ9k-T.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-chevron_down-HO-z-xOr.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-chevron_down-HO-z-xOr.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-chevron_left-CC5psi16.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-chevron_left-CC5psi16.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-chevron_right-BRxlzx4G.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-chevron_right-BRxlzx4G.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-chevron_up-cqhPO7g2.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-chevron_up-cqhPO7g2.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-ellipsis-DXIGA1sk.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-ellipsis-DXIGA1sk.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-filter-oU7E6Xgr.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-filter-oU7E6Xgr.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-filter_solid-CqIKuR4N.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-filter_solid-CqIKuR4N.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-magnifying_glass-T4Hzbkig.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-magnifying_glass-T4Hzbkig.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-minus-oGDEFO4E.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-minus-oGDEFO4E.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-sort-CRD4tafz.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-sort-CRD4tafz.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-sort_down-DiFB1P6R.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-sort_down-DiFB1P6R.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-sort_up-Bq_q3hIi.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-sort_up-Bq_q3hIi.mjs.map +0 -1
- package/fesm2022/ngneers-controls-icon-xmark-BZKZORiu.mjs +0 -4
- package/fesm2022/ngneers-controls-icon-xmark-BZKZORiu.mjs.map +0 -1
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ModelSignal, Signal } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
type ResizeSizeUnit = 'px' | 'fr' | '%';
|
|
5
|
+
type ResizeSize<U extends ResizeSizeUnit = ResizeSizeUnit> = `${number}${U}`;
|
|
6
|
+
type ResizeLimitUnit = 'px' | '%';
|
|
7
|
+
type ResizeLimit<U extends ResizeLimitUnit = ResizeLimitUnit> = `${number}${U}`;
|
|
8
|
+
type ExpandedResizeSize = {
|
|
9
|
+
value: number;
|
|
10
|
+
unit: ResizeSizeUnit;
|
|
11
|
+
};
|
|
12
|
+
type ExpandedResizeLimit = {
|
|
13
|
+
value: number;
|
|
14
|
+
unit: ResizeLimitUnit;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* How a resize delta is distributed across items.
|
|
18
|
+
* - `adjacent` — zero-sum transfer between the two items neighbouring the divider.
|
|
19
|
+
* - `proportional` — only the dragged item changes; other `fr`/`%` items redistribute via CSS grid.
|
|
20
|
+
* - `push` — only the dragged item changes; the container total grows/shrinks (requires unconstrained container).
|
|
21
|
+
*/
|
|
22
|
+
type ResizeDistributionMode = 'adjacent' | 'proportional' | 'push';
|
|
23
|
+
/**
|
|
24
|
+
* A control-agnostic interface representing a resizable item (panel, column, etc.).
|
|
25
|
+
* Both splitter panels and table header cells implement this interface.
|
|
26
|
+
*/
|
|
27
|
+
interface ResizableItem {
|
|
28
|
+
/** The current size of the item (e.g. '100px', '1fr', '30%'). */
|
|
29
|
+
size: ModelSignal<ResizeSize>;
|
|
30
|
+
/** The minimum size constraint (e.g. '50px', '10%'). */
|
|
31
|
+
minSize: Signal<ResizeLimit>;
|
|
32
|
+
/** The maximum size constraint (e.g. '500px', '80%'). */
|
|
33
|
+
maxSize: Signal<ResizeLimit>;
|
|
34
|
+
}
|
|
35
|
+
interface ResizeEngineConfig {
|
|
36
|
+
/** The resizable items (panels, columns, etc.). */
|
|
37
|
+
items: Signal<readonly ResizableItem[]>;
|
|
38
|
+
/** The total container size in pixels along the resize axis. */
|
|
39
|
+
containerSize: Signal<number>;
|
|
40
|
+
/** The pixel sizes of gaps between items (dividers, gutters). */
|
|
41
|
+
gapSizes: Signal<readonly number[]>;
|
|
42
|
+
/** How deltas are distributed across items during a resize. */
|
|
43
|
+
distributionMode: Signal<ResizeDistributionMode>;
|
|
44
|
+
/** Whether the total size is constrained to the container. If false, push mode can grow the total. */
|
|
45
|
+
containerConstrained: Signal<boolean>;
|
|
46
|
+
/**
|
|
47
|
+
* Whether to convert affected items to fixed `px` values after a drag completes.
|
|
48
|
+
*
|
|
49
|
+
* - **`adjacent` / `push` modes**: when `true`, items whose size changed during the drag
|
|
50
|
+
* are converted from their original unit (`fr`, `%`) to absolute `px`. When `false`,
|
|
51
|
+
* items keep their original units.
|
|
52
|
+
* - **`proportional` mode**: when `true`, the resized column stays as `px` (locked).
|
|
53
|
+
* When `false`, it is converted back to `fr` so it continues to flex with the container.
|
|
54
|
+
* Other columns are never affected.
|
|
55
|
+
*
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
lockSizes?: Signal<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* Absolute minimum size in pixels for any item, enforced as a floor even when
|
|
61
|
+
* a relative min-size (e.g. `5%`) resolves to a smaller value.
|
|
62
|
+
*
|
|
63
|
+
* Set to `0` to disable the floor (e.g. for splitter panels that have no inherent minimum).
|
|
64
|
+
*
|
|
65
|
+
* @default 0
|
|
66
|
+
*/
|
|
67
|
+
minItemSizePx?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Optional callback that returns the actual rendered px sizes of all items
|
|
70
|
+
* (e.g. via `getBoundingClientRect().width`). When provided, push-mode baking
|
|
71
|
+
* uses these DOM-measured values instead of JS-computed fr→px conversions,
|
|
72
|
+
* avoiding sub-pixel rounding mismatches with CSS Grid.
|
|
73
|
+
*/
|
|
74
|
+
resolveItemSizes?: () => number[];
|
|
75
|
+
}
|
|
76
|
+
/** Snapshot of a single item's state at the start of a drag. */
|
|
77
|
+
type ResizeDragContextItem = {
|
|
78
|
+
item: ResizableItem;
|
|
79
|
+
/** Parsed size at drag start (after any push-mode baking). */
|
|
80
|
+
startSize: ExpandedResizeSize;
|
|
81
|
+
/** Parsed min-size constraint. */
|
|
82
|
+
minSize: ExpandedResizeLimit;
|
|
83
|
+
/** Parsed max-size constraint. */
|
|
84
|
+
maxSize: ExpandedResizeLimit;
|
|
85
|
+
};
|
|
86
|
+
/** Full drag state captured at {@link ResizeEngine.startDrag}. */
|
|
87
|
+
type ResizeDragContext = {
|
|
88
|
+
/** Index of the divider being dragged. */
|
|
89
|
+
dividerIndex: number;
|
|
90
|
+
/** Pointer position (px) when the drag started. */
|
|
91
|
+
startPosition: number;
|
|
92
|
+
/** Original sizes before push-mode baking. Used to revert on no-op clicks or cancellation. */
|
|
93
|
+
preBakeSizes: ResizeSize[];
|
|
94
|
+
/** Snapshots of all items at drag start. */
|
|
95
|
+
items: ResizeDragContextItem[];
|
|
96
|
+
/** Fraction conversion factors captured at drag start. */
|
|
97
|
+
fractionFactors: ResizeFractionFactors;
|
|
98
|
+
/** Percent-per-pixel ratio captured at drag start. */
|
|
99
|
+
percentPerPx: number;
|
|
100
|
+
/** Whether push-mode baking has been applied (deferred to first movement). */
|
|
101
|
+
baked: boolean;
|
|
102
|
+
};
|
|
103
|
+
type ResizeFractionFactors = {
|
|
104
|
+
/** Number of fraction units per pixel. */
|
|
105
|
+
frPerPx: number;
|
|
106
|
+
/** Number of pixels per fraction unit. */
|
|
107
|
+
pxPerFr: number;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* A generic, control-agnostic resize engine for CSS grid layouts.
|
|
112
|
+
*
|
|
113
|
+
* Handles drag-based resizing of a list of {@link ResizableItem}s with support for:
|
|
114
|
+
* - **Size units**: `px`, `fr`, `%`
|
|
115
|
+
* - **Distribution modes**:
|
|
116
|
+
* - `adjacent` — transfers space between the two items neighbouring the divider (zero-sum).
|
|
117
|
+
* - `proportional` — only the dragged item changes to `px`; other items keep their `fr`/`%`
|
|
118
|
+
* units and CSS grid redistributes the remaining space. Optionally locks the resized item
|
|
119
|
+
* to `px` via {@link ResizeEngineConfig.lockSizes}.
|
|
120
|
+
* - `push` — the dragged item grows/shrinks independently; the container total changes
|
|
121
|
+
* (requires `containerConstrained = false`).
|
|
122
|
+
* - **Commit modes** (for `adjacent`/`push`): `preserve`, `bakeAll`, `bakeAffected`
|
|
123
|
+
* - **Min-size floor** ({@link ResizeEngineConfig.minItemSizePx}): an absolute `px` floor
|
|
124
|
+
* enforced even when a relative min-size resolves smaller. In `proportional` mode, emitted
|
|
125
|
+
* as CSS `minmax(floor, size)` so the grid natively prevents columns from shrinking below it.
|
|
126
|
+
*
|
|
127
|
+
* Consumers (splitter, table) provide items and configuration via signals.
|
|
128
|
+
* The engine outputs a ready-to-use `grid-template-columns`/`grid-template-rows` string
|
|
129
|
+
* via {@link gridTemplateSizes}.
|
|
130
|
+
*/
|
|
131
|
+
declare class ResizeEngine {
|
|
132
|
+
private readonly items;
|
|
133
|
+
private readonly containerSize;
|
|
134
|
+
private readonly gapSizes;
|
|
135
|
+
private readonly distributionMode;
|
|
136
|
+
private readonly containerConstrained;
|
|
137
|
+
private readonly lockSizes;
|
|
138
|
+
private readonly minItemSizePx;
|
|
139
|
+
private readonly resolveItemSizes?;
|
|
140
|
+
constructor(config: ResizeEngineConfig);
|
|
141
|
+
/** The active drag state, or `null` when idle. */
|
|
142
|
+
readonly dragContext: _angular_core.WritableSignal<ResizeDragContext | null>;
|
|
143
|
+
/** Whether a drag operation is currently in progress. */
|
|
144
|
+
readonly isDragging: Signal<boolean>;
|
|
145
|
+
/**
|
|
146
|
+
* Whether any completed (non-cancelled) drag has occurred in this engine's lifetime.
|
|
147
|
+
*
|
|
148
|
+
* Used by `push` mode to defer resolving `fr`/`%` → `px` until the first drag.
|
|
149
|
+
* Before the first drag, original units are preserved so CSS grid can distribute
|
|
150
|
+
* space without rounding-induced overflow.
|
|
151
|
+
*/
|
|
152
|
+
readonly hasBeenResized: _angular_core.WritableSignal<boolean>;
|
|
153
|
+
/**
|
|
154
|
+
* CSS grid template string with item sizes interleaved with gap sizes.
|
|
155
|
+
*
|
|
156
|
+
* Example output: `"100px 4px minmax(50px, 2fr) 4px minmax(50px, 1fr)"`.
|
|
157
|
+
*
|
|
158
|
+
* **Output strategy per distribution mode:**
|
|
159
|
+
* - `adjacent` — resolves all sizes to `px`. CSS grid cannot constrain adjacent
|
|
160
|
+
* resizing correctly with `fr` units.
|
|
161
|
+
* - `proportional` — keeps `fr`/`%` as-is, wrapped in `minmax(floor, size)` when
|
|
162
|
+
* {@link minItemSizePx} > 0. This lets CSS grid redistribute remaining space
|
|
163
|
+
* while enforcing the minimum floor natively. Locked (`px`) columns pass through.
|
|
164
|
+
* - `push` — keeps original units until the first completed drag, then resolves
|
|
165
|
+
* everything to `px` so the total can exceed the container and trigger scrolling.
|
|
166
|
+
*/
|
|
167
|
+
readonly gridTemplateSizes: Signal<string>;
|
|
168
|
+
/**
|
|
169
|
+
* The total gap size in pixels.
|
|
170
|
+
*/
|
|
171
|
+
readonly totalGapSize: Signal<number>;
|
|
172
|
+
/**
|
|
173
|
+
* Aggregated item sizes by unit.
|
|
174
|
+
*/
|
|
175
|
+
private readonly totalItemSizes;
|
|
176
|
+
/**
|
|
177
|
+
* Minimum total size of all items combined (as a CSS calc expression).
|
|
178
|
+
*/
|
|
179
|
+
readonly minTotalSize: Signal<string>;
|
|
180
|
+
/**
|
|
181
|
+
* Maximum total size of all items combined (as a CSS calc expression).
|
|
182
|
+
*/
|
|
183
|
+
readonly maxTotalSize: Signal<string>;
|
|
184
|
+
/**
|
|
185
|
+
* Begins a drag at the given divider. Original sizes are saved for reverting
|
|
186
|
+
* on no-op clicks or cancellation. In push mode, baking to `px` is deferred
|
|
187
|
+
* to the first {@link drag} call to avoid a visual shift on mousedown.
|
|
188
|
+
*/
|
|
189
|
+
startDrag(dividerIndex: number, startPositionPx: number): void;
|
|
190
|
+
/** Updates item sizes during an active drag based on the current pointer position. */
|
|
191
|
+
drag(dividerIndex: number, currentPositionPx: number): void;
|
|
192
|
+
/**
|
|
193
|
+
* Ends a drag. If cancelled or no movement occurred, sizes revert to their
|
|
194
|
+
* pre-drag values (including undoing any push-mode baking). Otherwise,
|
|
195
|
+
* post-drag finalization runs (commit mode or proportional locking).
|
|
196
|
+
*/
|
|
197
|
+
endDrag(dividerIndex: number, cancel: boolean): void;
|
|
198
|
+
/**
|
|
199
|
+
* Applies a single instantaneous move (e.g. keyboard step) at the given divider.
|
|
200
|
+
* Requires that the relevant items already have engine-calculated sizes.
|
|
201
|
+
*/
|
|
202
|
+
moveDivider(dividerIndex: number, pxDelta: number): void;
|
|
203
|
+
/**
|
|
204
|
+
* Clamps all items to their min/max constraints, respecting {@link minItemSizePx}.
|
|
205
|
+
*
|
|
206
|
+
* Called automatically via `afterRenderEffect` when item sizes change externally
|
|
207
|
+
* or the container resizes. Skipped during an active drag (sizes are managed
|
|
208
|
+
* by the drag handler). For `fr`-sized items, clamping is done iteratively
|
|
209
|
+
* with redistribution to maintain total fraction balance.
|
|
210
|
+
*/
|
|
211
|
+
ensureMinMaxSizes(): void;
|
|
212
|
+
/**
|
|
213
|
+
* Sets the item's size and marks it as engine-calculated via an internal symbol.
|
|
214
|
+
* This mark is used by {@link isItemSizeCalculated} to detect external size changes.
|
|
215
|
+
*/
|
|
216
|
+
setItemSize(item: ResizableItem, size: ResizeSize): void;
|
|
217
|
+
/**
|
|
218
|
+
* Returns `true` if the item's current size matches the last value written by the engine.
|
|
219
|
+
* Returns `false` if the size was changed externally (e.g. by an input binding or state restore).
|
|
220
|
+
*/
|
|
221
|
+
isItemSizeCalculated(item: ResizableItem): boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Routes a px delta to the appropriate distribution strategy.
|
|
224
|
+
*
|
|
225
|
+
* For last-item edge resizing (dividerIndex === items.length - 1), the delta is
|
|
226
|
+
* remapped to the previous divider with negated direction. This allows the last
|
|
227
|
+
* column's handle in push mode to resize it directly.
|
|
228
|
+
*/
|
|
229
|
+
private applyDelta;
|
|
230
|
+
/**
|
|
231
|
+
* Adjacent mode: transfers the delta between the two items neighbouring the divider.
|
|
232
|
+
*
|
|
233
|
+
* Grows the left item and shrinks the right item (or vice versa). When an item
|
|
234
|
+
* hits its min/max constraint, the unapplied remainder cascades to the next item
|
|
235
|
+
* in that direction. A second pass resolves any asymmetry between left and right.
|
|
236
|
+
* The total container width is always preserved (zero-sum).
|
|
237
|
+
*/
|
|
238
|
+
private applyAdjacentDelta;
|
|
239
|
+
/**
|
|
240
|
+
* Proportional mode: only the item at `dividerIndex` changes size (set to absolute `px`).
|
|
241
|
+
* All other items keep their original units (`fr`, `%`), and CSS grid's `minmax(floor, size)`
|
|
242
|
+
* naturally redistributes the remaining space — columns with room shrink while those
|
|
243
|
+
* already at the floor stay put.
|
|
244
|
+
*
|
|
245
|
+
* Growth is capped so the total never overflows the container: each other `fr` column
|
|
246
|
+
* needs at least {@link minItemSizePx}, and locked `px` columns keep their size.
|
|
247
|
+
*
|
|
248
|
+
* After the drag ends, {@link applyProportionalLocking} determines whether the
|
|
249
|
+
* resized column stays as `px` (locked) or is converted back to `fr` (dynamic).
|
|
250
|
+
*/
|
|
251
|
+
private applyProportionalDelta;
|
|
252
|
+
/**
|
|
253
|
+
* Push mode: only the dragged item changes size. All other items stay at their
|
|
254
|
+
* baked `px` values (set during {@link startDrag}). The container total changes,
|
|
255
|
+
* causing horizontal overflow/scrolling. Only valid when `containerConstrained` is `false`.
|
|
256
|
+
*/
|
|
257
|
+
private applyPushDelta;
|
|
258
|
+
/**
|
|
259
|
+
* Post-drag finalization. Behaviour depends on {@link lockSizes} and the distribution mode.
|
|
260
|
+
*
|
|
261
|
+
* When `lockSizes` is `false`:
|
|
262
|
+
* - `adjacent` / `push` — no-op; items keep their original units.
|
|
263
|
+
* - `proportional` — the resized column is converted back to `fr` so it stays dynamic.
|
|
264
|
+
*
|
|
265
|
+
* When `lockSizes` is `true`:
|
|
266
|
+
* - `adjacent` / `push` — items whose size changed are converted to absolute `px`.
|
|
267
|
+
* - `proportional` — no-op; the resized column is already `px` from the drag.
|
|
268
|
+
*/
|
|
269
|
+
private finalizeResize;
|
|
270
|
+
/**
|
|
271
|
+
* Converts the resized column back to `fr` after a proportional drag so it
|
|
272
|
+
* continues to flex with the container. Computes a new `fr` value that would
|
|
273
|
+
* resolve to the same pixel width given the current container and other `fr` columns.
|
|
274
|
+
*/
|
|
275
|
+
private unlockProportionalColumn;
|
|
276
|
+
private createContextItem;
|
|
277
|
+
private getCurrentFractionFactors;
|
|
278
|
+
private getCurrentPercentPerPx;
|
|
279
|
+
/**
|
|
280
|
+
* Bakes all non-px items to absolute px values. Used by push mode on first drag movement.
|
|
281
|
+
* Prefers DOM-measured sizes (via {@link resolveItemSizes}) over JS-computed conversions
|
|
282
|
+
* to avoid sub-pixel mismatches with CSS Grid's internal track sizing.
|
|
283
|
+
*/
|
|
284
|
+
private bakeAllItemsToPx;
|
|
285
|
+
/**
|
|
286
|
+
* Writes computed px deltas back to items, converting to each item's original unit.
|
|
287
|
+
*/
|
|
288
|
+
private commitItemDeltas;
|
|
289
|
+
/**
|
|
290
|
+
* Builds a CSS `calc()` expression summing all items' min or max limits.
|
|
291
|
+
* Items already in `px` contribute their current size; `fr`/`%` items contribute
|
|
292
|
+
* their `minSize`/`maxSize` limit. Used by {@link minTotalSize} and {@link maxTotalSize}.
|
|
293
|
+
*/
|
|
294
|
+
private computeLimitTotalSize;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
declare function isResizeSize(value: unknown): value is ResizeSize;
|
|
298
|
+
declare function getResizeSizeUnit(value: ResizeSize): ResizeSizeUnit;
|
|
299
|
+
declare function getResizeSizeValue(value: ResizeSize): number;
|
|
300
|
+
declare function expandResizeSize(value: ResizeSize): ExpandedResizeSize;
|
|
301
|
+
declare function collapseResizeSize(size: ExpandedResizeSize): ResizeSize;
|
|
302
|
+
declare function isResizeLimit(value: unknown): value is ResizeLimit;
|
|
303
|
+
declare function getResizeLimitUnit(value: ResizeLimit): ResizeLimitUnit;
|
|
304
|
+
declare function getResizeLimitValue(value: ResizeLimit): number;
|
|
305
|
+
declare function getResizeLimitInPx(value: ResizeLimit, containerSize: number): number;
|
|
306
|
+
declare function expandResizeLimit(value: ResizeLimit): ExpandedResizeLimit;
|
|
307
|
+
declare function collapseResizeLimit(size: ExpandedResizeLimit): ResizeLimit;
|
|
308
|
+
/**
|
|
309
|
+
* Resolves a size to its pixel equivalent given the current fraction factors and container size.
|
|
310
|
+
*/
|
|
311
|
+
declare function resolveSizeToPx(size: ExpandedResizeSize, pxPerFr: number, containerSize: number): number;
|
|
312
|
+
/**
|
|
313
|
+
* Converts a pixel delta to the appropriate value delta for the given unit.
|
|
314
|
+
*/
|
|
315
|
+
declare function pxDeltaToUnitDelta(pxDelta: number, unit: ResizeSizeUnit, frPerPx: number, percentPerPx: number): number;
|
|
316
|
+
|
|
317
|
+
export { ResizeEngine, collapseResizeLimit, collapseResizeSize, expandResizeLimit, expandResizeSize, getResizeLimitInPx, getResizeLimitUnit, getResizeLimitValue, getResizeSizeUnit, getResizeSizeValue, isResizeLimit, isResizeSize, pxDeltaToUnitDelta, resolveSizeToPx };
|
|
318
|
+
export type { ExpandedResizeLimit, ExpandedResizeSize, ResizableItem, ResizeDistributionMode, ResizeDragContext, ResizeDragContextItem, ResizeEngineConfig, ResizeFractionFactors, ResizeLimit, ResizeLimitUnit, ResizeSize, ResizeSizeUnit };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AllKeysOfUnion } from '@ngneers/controls/utils';
|
|
2
2
|
import { IconType, CustomKind, CustomColor } from '@ngneers/controls-custom-types';
|
|
3
|
-
import {
|
|
3
|
+
import { NgnIconKey } from '@ngneers/controls/icon';
|
|
4
4
|
|
|
5
5
|
type NgnFilterDataType = 'string' | 'number' | 'date' | 'dateTime' | 'boolean' | 'custom' | 'list';
|
|
6
6
|
type NgnFilterMatchMode = 'all' | 'any';
|
|
@@ -59,7 +59,7 @@ type NgnActionButtonConfig<T = unknown> = {
|
|
|
59
59
|
value: T;
|
|
60
60
|
action?: (event: PointerEvent) => void;
|
|
61
61
|
icon?: IconType;
|
|
62
|
-
defaultIcon?:
|
|
62
|
+
defaultIcon?: NgnIconKey;
|
|
63
63
|
kind?: CustomKind<'button'>;
|
|
64
64
|
color?: CustomColor;
|
|
65
65
|
disabled?: boolean;
|
|
@@ -63,6 +63,14 @@ declare abstract class NgnBase<T extends ControlName | null> {
|
|
|
63
63
|
* and its leave animation has finished.
|
|
64
64
|
*/
|
|
65
65
|
private prepareAfterLeaveHook;
|
|
66
|
+
private static _leaveQueue;
|
|
67
|
+
private static _leaveRafScheduled;
|
|
68
|
+
private static _enqueueLeaveCheck;
|
|
69
|
+
private static _processLeaveQueue;
|
|
70
|
+
/**
|
|
71
|
+
* Recursively searches for a leave animation on the element and its parents.
|
|
72
|
+
*/
|
|
73
|
+
private static _findLeaveAnimation;
|
|
66
74
|
private afterLeaveInternal;
|
|
67
75
|
/**
|
|
68
76
|
* Lifecycle hook that is called after the control has left (been removed from) the DOM.
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import * as _ngneers_controls_custom_types from '@ngneers/controls-custom-types';
|
|
2
|
+
import { IconType } from '@ngneers/controls-custom-types';
|
|
3
|
+
import * as _iconify_types from '@iconify/types';
|
|
1
4
|
import * as _angular_core from '@angular/core';
|
|
2
5
|
import { TemplateRef } from '@angular/core';
|
|
3
6
|
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
@@ -5,7 +8,6 @@ import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
|
5
8
|
import { maybeCallback } from '@ngneers/controls/utils';
|
|
6
9
|
import { NgnBase } from '@ngneers/controls/base';
|
|
7
10
|
import { NgnActionItemFlat, NgnActionItem } from '@ngneers/controls/api';
|
|
8
|
-
import { IconType } from '@ngneers/controls-custom-types';
|
|
9
11
|
|
|
10
12
|
type BreadcrumbItem = NgnActionItemFlat<NgnActionItem>;
|
|
11
13
|
type ItemTemplateType = {
|
|
@@ -73,10 +75,10 @@ declare abstract class BreadcrumbTemplates extends NgnBase<'breadcrumb'> {
|
|
|
73
75
|
* @category control
|
|
74
76
|
*/
|
|
75
77
|
declare class NgnBreadcrumb extends BreadcrumbTemplates {
|
|
76
|
-
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"breadcrumb", ["root", "item", "item-clickable", "separator", "overflow"], readonly [_ngneers_controls_themes.ControlTemplate<"item-view", ["root", "item", "item-overflowing", "more-items", "more-items-hidden", "more-items-default", "hidden-separator"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>, _ngneers_controls_themes.ControlTemplate<"menu", ["root", "submenu", "popover", "item", "item-opened", "icon-children", "separator"], readonly [_ngneers_controls_themes.ControlTemplate<"popover", ["root", "content", "content-closing"
|
|
78
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"breadcrumb", ["root", "item", "item-clickable", "separator", "overflow"], readonly [_ngneers_controls_themes.ControlTemplate<"item-view", ["root", "item", "item-overflowing", "more-items", "more-items-hidden", "more-items-default", "hidden-separator"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>, _ngneers_controls_themes.ControlTemplate<"menu", ["root", "submenu", "popover", "item", "item-opened", "icon-children", "separator"], readonly [_ngneers_controls_themes.ControlTemplate<"popover", ["root", "content", "content-closing"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>]>]>>;
|
|
77
79
|
readonly items: _angular_core.InputSignal<BreadcrumbItem[]>;
|
|
78
|
-
readonly iconItemSeparator: _angular_core.InputSignal<
|
|
79
|
-
readonly iconOverflow: _angular_core.InputSignal<
|
|
80
|
+
readonly iconItemSeparator: _angular_core.InputSignal<_iconify_types.IconifyIcon | _ngneers_controls_custom_types.NgnIconEntry | undefined>;
|
|
81
|
+
readonly iconOverflow: _angular_core.InputSignal<_iconify_types.IconifyIcon | _ngneers_controls_custom_types.NgnIconEntry | undefined>;
|
|
80
82
|
protected readonly maybeCallback: typeof maybeCallback;
|
|
81
83
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnBreadcrumb, never>;
|
|
82
84
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgnBreadcrumb, "ngn-breadcrumb", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "iconItemSeparator": { "alias": "iconItemSeparator"; "required": false; "isSignal": true; }; "iconOverflow": { "alias": "iconOverflow"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { NgnBase } from '@ngneers/controls/base';
|
|
3
3
|
import { maybeCallback } from '@ngneers/controls/utils';
|
|
4
4
|
import { NgnActionButtonConfig } from '@ngneers/controls/api';
|
|
@@ -7,12 +7,17 @@ import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
|
7
7
|
|
|
8
8
|
declare class NgnActionButton<T> extends NgnBase<null> {
|
|
9
9
|
protected readonly theme: null;
|
|
10
|
-
readonly config:
|
|
11
|
-
|
|
10
|
+
readonly config: _angular_core.InputSignal<NgnActionButtonConfig<T>>;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the inner button is displayed inline (line-height sized).
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
readonly inline: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
16
|
+
readonly clicked: _angular_core.OutputEmitterRef<T>;
|
|
12
17
|
protected readonly maybeCallback: typeof maybeCallback;
|
|
13
18
|
protected click(event: PointerEvent): void;
|
|
14
|
-
static ɵfac:
|
|
15
|
-
static ɵcmp:
|
|
19
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnActionButton<any>, never>;
|
|
20
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgnActionButton<any>, "ngn-action-button", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
/**
|
|
@@ -24,11 +29,11 @@ declare class NgnButton extends NgnBase<'button'> {
|
|
|
24
29
|
* Whether the button is displayed inline.
|
|
25
30
|
* This will make the button height fit the current line height.
|
|
26
31
|
*/
|
|
27
|
-
readonly inline:
|
|
32
|
+
readonly inline: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
28
33
|
constructor();
|
|
29
34
|
protected afterLeave(): void;
|
|
30
|
-
static ɵfac:
|
|
31
|
-
static ɵdir:
|
|
35
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnButton, never>;
|
|
36
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgnButton, "button[ngnButton], a[ngnButton]", ["ngnButton"], { "inline": { "alias": "inline"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
export { NgnActionButton, NgnButton };
|
|
@@ -203,10 +203,14 @@ declare class NgnCalendar extends CalendarTemplates {
|
|
|
203
203
|
addCondition: string;
|
|
204
204
|
removeCondition: string;
|
|
205
205
|
clear: string;
|
|
206
|
+
apply: string;
|
|
207
|
+
cancel: string;
|
|
206
208
|
matchModeLabel: string;
|
|
207
209
|
match: {
|
|
208
210
|
all: string;
|
|
209
211
|
any: string;
|
|
212
|
+
and: string;
|
|
213
|
+
or: string;
|
|
210
214
|
};
|
|
211
215
|
selected: string;
|
|
212
216
|
conditions: string;
|
|
@@ -242,7 +246,7 @@ declare class NgnCalendar extends CalendarTemplates {
|
|
|
242
246
|
close: string;
|
|
243
247
|
};
|
|
244
248
|
}, "_">;
|
|
245
|
-
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"calendar", ["root", "inline", "input", "input-field", "details", "header", "navigation", "days", "week-day", "day", "day-selected", "day-today", "day-other-month", "months", "month", "current-month", "current-year", "time", "next", "previous"], readonly [_ngneers_controls_themes.ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>, _ngneers_controls_themes.ControlTemplate<"select", ["root", "combobox", "input", "icon", "input-editable", "popover-content", "filter", "filter-icon", "list-box", "list-box-empty"], readonly [_ngneers_controls_themes.ControlTemplate<"popover", ["root", "content", "content-closing"
|
|
249
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"calendar", ["root", "inline", "input", "input-field", "details", "header", "navigation", "days", "week-day", "day", "day-selected", "day-today", "day-other-month", "months", "month", "current-month", "current-year", "time", "next", "previous"], readonly [_ngneers_controls_themes.ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>, _ngneers_controls_themes.ControlTemplate<"select", ["root", "combobox", "input", "icon", "input-editable", "popover-content", "filter", "filter-icon", "list-box", "list-box-empty"], readonly [_ngneers_controls_themes.ControlTemplate<"popover", ["root", "content", "content-closing"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>, _ngneers_controls_themes.ControlTemplate<"list-box", ["root", "empty", "invalid", "item", "group", "default-item", "default-group", "scroller", "item-selected", "item-highlighted"], readonly [_ngneers_controls_themes.ControlTemplate<"checkbox", ["root", "input", "box", "box-checked", "box-indeterminate", "box-icon", "box-icon-visible", "invalid"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>, _ngneers_controls_themes.ControlTemplate<"scroller", ["root", "virtual", "item", "item-sticky"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>]>, _ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [_ngneers_controls_themes.ControlTemplate<"input", ["root", "invalid", "empty"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>]>]>, _ngneers_controls_themes.ControlTemplate<"input", ["root", "invalid", "empty"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>, _ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [_ngneers_controls_themes.ControlTemplate<"input", ["root", "invalid", "empty"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>]>]>>;
|
|
246
250
|
protected readonly year: _angular_core.WritableSignal<number>;
|
|
247
251
|
protected readonly month: _angular_core.WritableSignal<number>;
|
|
248
252
|
protected readonly yearOptions: NgnItem[];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _ngneers_controls_custom_types from '@ngneers/controls-custom-types';
|
|
3
|
+
import * as _iconify_types from '@iconify/types';
|
|
2
4
|
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
3
5
|
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
4
6
|
import { ValueControlBase } from '@ngneers/controls/base';
|
|
@@ -9,19 +11,19 @@ type ValueType<Indeterminate extends boolean> = InputGeneric<Indeterminate, fals
|
|
|
9
11
|
* @category control
|
|
10
12
|
*/
|
|
11
13
|
declare class NgnCheckbox<Indeterminate extends boolean> extends ValueControlBase<'checkbox', ValueType<Indeterminate>> {
|
|
12
|
-
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"checkbox", ["root", "input", "box", "box-checked", "box-indeterminate", "box-icon", "
|
|
14
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"checkbox", ["root", "input", "box", "box-checked", "box-indeterminate", "box-icon", "box-icon-visible", "invalid"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>>;
|
|
13
15
|
/**
|
|
14
16
|
* Set a custom icon for the checked state.
|
|
15
17
|
*/
|
|
16
|
-
readonly iconChecked: _angular_core.InputSignal<
|
|
18
|
+
readonly iconChecked: _angular_core.InputSignal<_iconify_types.IconifyIcon | _ngneers_controls_custom_types.NgnIconEntry | undefined>;
|
|
17
19
|
/**
|
|
18
20
|
* Set a custom icon for the unchecked state.
|
|
19
21
|
*/
|
|
20
|
-
readonly iconUnchecked: _angular_core.InputSignal<
|
|
22
|
+
readonly iconUnchecked: _angular_core.InputSignal<_iconify_types.IconifyIcon | _ngneers_controls_custom_types.NgnIconEntry | undefined>;
|
|
21
23
|
/**
|
|
22
24
|
* Set a custom icon for the indeterminate state.
|
|
23
25
|
*/
|
|
24
|
-
readonly iconIndeterminate: _angular_core.InputSignal<
|
|
26
|
+
readonly iconIndeterminate: _angular_core.InputSignal<_iconify_types.IconifyIcon | _ngneers_controls_custom_types.NgnIconEntry | undefined>;
|
|
25
27
|
/**
|
|
26
28
|
* Set whether to allow the indeterminate state.
|
|
27
29
|
* If `true`, this will change the {@link value} type to `boolean | null`.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as _ngneers_controls_custom_types from '@ngneers/controls-custom-types';
|
|
2
|
+
import * as _iconify_types from '@iconify/types';
|
|
1
3
|
import * as _angular_core from '@angular/core';
|
|
2
4
|
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
3
5
|
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
@@ -21,7 +23,7 @@ declare class NgnChip extends NgnBase<'chip'> {
|
|
|
21
23
|
/**
|
|
22
24
|
* Set a custom icon for the close button.
|
|
23
25
|
*/
|
|
24
|
-
readonly iconClose: _angular_core.InputSignal<
|
|
26
|
+
readonly iconClose: _angular_core.InputSignal<_iconify_types.IconifyIcon | _ngneers_controls_custom_types.NgnIconEntry | undefined>;
|
|
25
27
|
/**
|
|
26
28
|
* Emitted when the chip is closed (removed).
|
|
27
29
|
*/
|
|
@@ -134,12 +134,18 @@ declare class NgnResizable {
|
|
|
134
134
|
|
|
135
135
|
declare class NgnScrollAmount {
|
|
136
136
|
private readonly _el;
|
|
137
|
+
/**
|
|
138
|
+
* Optional external scroll container. When set, scroll events and
|
|
139
|
+
* dimensions are tracked on this element instead of the host element.
|
|
140
|
+
*/
|
|
141
|
+
readonly scrollContainer: _angular_core.InputSignal<HTMLElement | undefined>;
|
|
142
|
+
readonly scrollTarget: _angular_core.Signal<HTMLElement>;
|
|
137
143
|
readonly scrollTop: _angular_core.WritableSignal<number>;
|
|
138
144
|
readonly scrollLeft: _angular_core.WritableSignal<number>;
|
|
139
145
|
private readonly _scrollEvent;
|
|
140
146
|
constructor();
|
|
141
147
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnScrollAmount, never>;
|
|
142
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgnScrollAmount, "[ngnScrollAmount]", never, {}, {}, never, never, true, never>;
|
|
148
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgnScrollAmount, "[ngnScrollAmount]", never, { "scrollContainer": { "alias": "scrollContainer"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
143
149
|
}
|
|
144
150
|
|
|
145
151
|
export { NgnAutofocus, NgnDrag, NgnDragScroll, NgnMovable, NgnResizable, NgnScrollAmount };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as _ngneers_controls_custom_types from '@ngneers/controls-custom-types';
|
|
2
|
+
import * as _iconify_types from '@iconify/types';
|
|
1
3
|
import * as _angular_core from '@angular/core';
|
|
2
4
|
import { TemplateRef } from '@angular/core';
|
|
3
5
|
import * as _ngneers_signal_translate from '@ngneers/signal-translate';
|
|
@@ -103,10 +105,14 @@ declare class NgnDrawer extends DrawerTemplates implements Openable {
|
|
|
103
105
|
addCondition: string;
|
|
104
106
|
removeCondition: string;
|
|
105
107
|
clear: string;
|
|
108
|
+
apply: string;
|
|
109
|
+
cancel: string;
|
|
106
110
|
matchModeLabel: string;
|
|
107
111
|
match: {
|
|
108
112
|
all: string;
|
|
109
113
|
any: string;
|
|
114
|
+
and: string;
|
|
115
|
+
or: string;
|
|
110
116
|
};
|
|
111
117
|
selected: string;
|
|
112
118
|
conditions: string;
|
|
@@ -180,7 +186,7 @@ declare class NgnDrawer extends DrawerTemplates implements Openable {
|
|
|
180
186
|
/**
|
|
181
187
|
* The icon to use for the close button in the default header template
|
|
182
188
|
*/
|
|
183
|
-
readonly iconClose: _angular_core.InputSignal<
|
|
189
|
+
readonly iconClose: _angular_core.InputSignal<_iconify_types.IconifyIcon | _ngneers_controls_custom_types.NgnIconEntry | undefined>;
|
|
184
190
|
/**
|
|
185
191
|
* Lazy load the drawer content
|
|
186
192
|
* @default false
|
|
@@ -107,10 +107,14 @@ declare class NgnEditInplace extends EditInplaceTemplates {
|
|
|
107
107
|
addCondition: string;
|
|
108
108
|
removeCondition: string;
|
|
109
109
|
clear: string;
|
|
110
|
+
apply: string;
|
|
111
|
+
cancel: string;
|
|
110
112
|
matchModeLabel: string;
|
|
111
113
|
match: {
|
|
112
114
|
all: string;
|
|
113
115
|
any: string;
|
|
116
|
+
and: string;
|
|
117
|
+
or: string;
|
|
114
118
|
};
|
|
115
119
|
selected: string;
|
|
116
120
|
conditions: string;
|