igniteui-angular 22.2.0-rc.0 → 22.2.0-rc.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/README.md +1 -1
- package/button-group/README.md +42 -9
- package/calendar/README.md +30 -20
- package/card/README.md +1 -1
- package/fesm2022/igniteui-angular-accordion.mjs +7 -7
- package/fesm2022/igniteui-angular-action-strip.mjs +11 -22
- package/fesm2022/igniteui-angular-action-strip.mjs.map +1 -1
- package/fesm2022/igniteui-angular-avatar.mjs +7 -7
- package/fesm2022/igniteui-angular-badge.mjs +7 -7
- package/fesm2022/igniteui-angular-banner.mjs +10 -10
- package/fesm2022/igniteui-angular-bottom-nav.mjs +22 -22
- package/fesm2022/igniteui-angular-button-group.mjs +32 -35
- package/fesm2022/igniteui-angular-button-group.mjs.map +1 -1
- package/fesm2022/igniteui-angular-calendar.mjs +132 -180
- package/fesm2022/igniteui-angular-calendar.mjs.map +1 -1
- package/fesm2022/igniteui-angular-card.mjs +47 -58
- package/fesm2022/igniteui-angular-card.mjs.map +1 -1
- package/fesm2022/igniteui-angular-carousel.mjs +22 -22
- package/fesm2022/igniteui-angular-chat-extras.mjs +6 -6
- package/fesm2022/igniteui-angular-chat.mjs +12 -12
- package/fesm2022/igniteui-angular-checkbox.mjs +7 -7
- package/fesm2022/igniteui-angular-chips.mjs +10 -10
- package/fesm2022/igniteui-angular-combo.mjs +69 -67
- package/fesm2022/igniteui-angular-combo.mjs.map +1 -1
- package/fesm2022/igniteui-angular-core.mjs +139 -92
- package/fesm2022/igniteui-angular-core.mjs.map +1 -1
- package/fesm2022/igniteui-angular-date-picker.mjs +53 -70
- package/fesm2022/igniteui-angular-date-picker.mjs.map +1 -1
- package/fesm2022/igniteui-angular-dialog.mjs +13 -13
- package/fesm2022/igniteui-angular-directives.mjs +194 -194
- package/fesm2022/igniteui-angular-drop-down.mjs +29 -29
- package/fesm2022/igniteui-angular-expansion-panel.mjs +28 -28
- package/fesm2022/igniteui-angular-grids-core.mjs +737 -661
- package/fesm2022/igniteui-angular-grids-core.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-grid.mjs +49 -49
- package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs +37 -37
- package/fesm2022/igniteui-angular-grids-lite.mjs +25 -17
- package/fesm2022/igniteui-angular-grids-lite.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-pivot-grid.mjs +80 -80
- package/fesm2022/igniteui-angular-grids-pivot-grid.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-tree-grid.mjs +55 -55
- package/fesm2022/igniteui-angular-icon.mjs +10 -10
- package/fesm2022/igniteui-angular-input-group.mjs +59 -55
- package/fesm2022/igniteui-angular-input-group.mjs.map +1 -1
- package/fesm2022/igniteui-angular-list.mjs +40 -40
- package/fesm2022/igniteui-angular-navbar.mjs +13 -13
- package/fesm2022/igniteui-angular-navigation-drawer.mjs +43 -38
- package/fesm2022/igniteui-angular-navigation-drawer.mjs.map +1 -1
- package/fesm2022/igniteui-angular-paginator.mjs +19 -19
- package/fesm2022/igniteui-angular-progressbar.mjs +19 -19
- package/fesm2022/igniteui-angular-query-builder.mjs +22 -22
- package/fesm2022/igniteui-angular-radio.mjs +25 -21
- package/fesm2022/igniteui-angular-radio.mjs.map +1 -1
- package/fesm2022/igniteui-angular-select.mjs +29 -33
- package/fesm2022/igniteui-angular-select.mjs.map +1 -1
- package/fesm2022/igniteui-angular-simple-combo.mjs +9 -9
- package/fesm2022/igniteui-angular-simple-combo.mjs.map +1 -1
- package/fesm2022/igniteui-angular-slider.mjs +28 -28
- package/fesm2022/igniteui-angular-snackbar.mjs +7 -7
- package/fesm2022/igniteui-angular-splitter.mjs +13 -13
- package/fesm2022/igniteui-angular-stepper.mjs +34 -34
- package/fesm2022/igniteui-angular-switch.mjs +7 -7
- package/fesm2022/igniteui-angular-tabs.mjs +34 -34
- package/fesm2022/igniteui-angular-time-picker.mjs +26 -36
- package/fesm2022/igniteui-angular-time-picker.mjs.map +1 -1
- package/fesm2022/igniteui-angular-toast.mjs +7 -7
- package/fesm2022/igniteui-angular-tree.mjs +28 -28
- package/fesm2022/igniteui-angular-virtual-scroll.mjs +497 -145
- package/fesm2022/igniteui-angular-virtual-scroll.mjs.map +1 -1
- package/migrations/common/UpdateChanges.d.ts +56 -0
- package/migrations/common/UpdateChanges.js +366 -38
- package/migrations/common/UpdateChanges.spec.js +829 -0
- package/migrations/migration-collection.json +1 -1
- package/migrations/update-22_2_0/index.js +145 -0
- package/migrations/update-22_2_0/index.spec.js +206 -0
- package/navigation-drawer/README.md +1 -1
- package/package.json +3 -3
- package/schematics/tsconfig.tsbuildinfo +1 -1
- package/skills/igniteui-angular-components/SKILL.md +9 -5
- package/skills/igniteui-angular-components/references/form-controls.md +1 -1
- package/skills/igniteui-angular-components/references/mcp-setup.md +14 -2
- package/skills/igniteui-angular-figma-to-app/SKILL.md +112 -525
- package/skills/igniteui-angular-figma-to-app/references/asset-extraction.md +49 -75
- package/skills/igniteui-angular-figma-to-app/references/design-provenance.md +201 -0
- package/skills/igniteui-angular-figma-to-app/references/design-token-bridge.md +175 -52
- package/skills/igniteui-angular-figma-to-app/references/figma-component-map.md +153 -99
- package/skills/igniteui-angular-figma-to-app/references/figma-exploration.md +226 -0
- package/skills/igniteui-angular-figma-to-app/references/mcp-setup.md +71 -105
- package/skills/igniteui-angular-figma-to-app/references/project-setup.md +63 -0
- package/skills/igniteui-angular-figma-to-app/references/theme-generation.md +120 -0
- package/skills/igniteui-angular-figma-to-app/references/validation-patterns.md +48 -50
- package/skills/igniteui-angular-generate-from-image-design/SKILL.md +11 -7
- package/skills/igniteui-angular-grids/SKILL.md +7 -3
- package/skills/igniteui-angular-grids/references/editing.md +1 -2
- package/skills/igniteui-angular-grids/references/grid-migration.md +1 -1
- package/skills/igniteui-angular-theming/SKILL.md +9 -5
- package/skills/igniteui-angular-theming/references/mcp-setup.md +12 -2
- package/types/igniteui-angular-button-group.d.ts +49 -34
- package/types/igniteui-angular-calendar.d.ts +33 -50
- package/types/igniteui-angular-card.d.ts +12 -17
- package/types/igniteui-angular-combo.d.ts +6 -0
- package/types/igniteui-angular-core.d.ts +25 -8
- package/types/igniteui-angular-grids-core.d.ts +48 -4
- package/types/igniteui-angular-grids-lite.d.ts +5 -1
- package/types/igniteui-angular-grids-pivot-grid.d.ts +1 -1
- package/types/igniteui-angular-input-group.d.ts +17 -3
- package/types/igniteui-angular-navigation-drawer.d.ts +1 -0
- package/types/igniteui-angular-radio.d.ts +5 -0
- package/types/igniteui-angular-time-picker.d.ts +0 -1
- package/types/igniteui-angular-virtual-scroll.d.ts +41 -13
- package/virtual-scroll/README.md +32 -1
|
@@ -25,6 +25,8 @@ declare class IgxVsItemContext<T> {
|
|
|
25
25
|
/** Whether the current item is at an odd index. */
|
|
26
26
|
get odd(): boolean;
|
|
27
27
|
}
|
|
28
|
+
/** Returns an item's key from the item and its index in the whole collection. */
|
|
29
|
+
type VirtualScrollKeyFunction<T> = (item: T, index: number) => unknown;
|
|
28
30
|
/**
|
|
29
31
|
* How `scrollToIndex` positions the requested item in the viewport.
|
|
30
32
|
* The subset of `ScrollLogicalPosition` that the engine supports.
|
|
@@ -156,6 +158,7 @@ declare class IgxVirtualScrollComponent<T> implements OnDestroy {
|
|
|
156
158
|
/**
|
|
157
159
|
* Estimated item size in pixels used before an item is measured in the DOM.
|
|
158
160
|
* The engine replaces this with the actual measured size after the first render of each item.
|
|
161
|
+
* Unmeasured items then take the average measured size.
|
|
159
162
|
* Default is 50 pixels.
|
|
160
163
|
* Setting this to a value close to the actual average item size can improve initial rendering performance.
|
|
161
164
|
*/
|
|
@@ -206,8 +209,26 @@ declare class IgxVirtualScrollComponent<T> implements OnDestroy {
|
|
|
206
209
|
* infer an item's position from the markup. Templates that render a role
|
|
207
210
|
* with set semantics (`listitem`, `option`, `row`, ...) should map the
|
|
208
211
|
* context's `index` and `count` onto `aria-posinset` and `aria-setsize`.
|
|
212
|
+
*
|
|
213
|
+
* Item elements are recycled: bind all item state and write user changes
|
|
214
|
+
* back to the item, or unbound DOM state (e.g. a toggled checkbox) shows on
|
|
215
|
+
* another item. See `keyFunction`.
|
|
209
216
|
*/
|
|
210
217
|
readonly itemTemplate: _angular_core.InputSignal<TemplateRef<IgxVsItemContext<T>> | null>;
|
|
218
|
+
/**
|
|
219
|
+
* Returns a unique key from an item and its index in the whole collection. An item keeps its
|
|
220
|
+
* element while its key stays rendered. Defaults to the index; set it when items move within
|
|
221
|
+
* `data` (sort, insert, remove).
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```html
|
|
225
|
+
* <igx-virtual-scroll [data]="people" [keyFunction]="byId">...</igx-virtual-scroll>
|
|
226
|
+
* ```
|
|
227
|
+
* ```ts
|
|
228
|
+
* byId = (person: Person) => person.id;
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
readonly keyFunction: _angular_core.InputSignal<VirtualScrollKeyFunction<T> | null>;
|
|
211
232
|
/** Emitted when the rendered virtual window changes. */
|
|
212
233
|
readonly stateChange: _angular_core.OutputEmitterRef<VirtualScrollState>;
|
|
213
234
|
/**
|
|
@@ -243,6 +264,8 @@ declare class IgxVirtualScrollComponent<T> implements OnDestroy {
|
|
|
243
264
|
protected readonly _spaceSize: _angular_core.Signal<number>;
|
|
244
265
|
/** The part of the rendered range a page actually covers. */
|
|
245
266
|
private readonly _loadedRange;
|
|
267
|
+
/** The key of each rendered item: from `keyFunction`, or its index. */
|
|
268
|
+
protected readonly _itemKey: _angular_core.Signal<(context: IgxVsItemContext<T>) => unknown>;
|
|
246
269
|
/** The item contexts for the currently rendered window, in render order. */
|
|
247
270
|
protected readonly _renderedItems: _angular_core.Signal<IgxVsItemContext<T>[]>;
|
|
248
271
|
/**
|
|
@@ -266,11 +289,13 @@ declare class IgxVirtualScrollComponent<T> implements OnDestroy {
|
|
|
266
289
|
* first jump can miss the target. The items at the landing point are then
|
|
267
290
|
* measured and the scroll position is corrected, until the offset is
|
|
268
291
|
* stable. The returned promise resolves on that final offset; callers that
|
|
269
|
-
* need only the first, approximate scroll can ignore it
|
|
292
|
+
* need only the first, approximate scroll can ignore it, because the first
|
|
293
|
+
* jump is applied before the call returns.
|
|
270
294
|
*
|
|
271
295
|
* @param index The index of the item to scroll to.
|
|
272
296
|
* @param options `block` / `inline` select the alignment (`start`,
|
|
273
|
-
* `center`, `end` or `nearest
|
|
297
|
+
* `center`, `end` or `nearest`, which scrolls the smallest distance that
|
|
298
|
+
* brings the item into view); `behavior` selects `auto` or `smooth`.
|
|
274
299
|
*/
|
|
275
300
|
scrollToIndex(index: number, options?: ScrollIntoViewOptions): Promise<void>;
|
|
276
301
|
/**
|
|
@@ -286,10 +311,6 @@ declare class IgxVirtualScrollComponent<T> implements OnDestroy {
|
|
|
286
311
|
* The scroll offset that aligns `index` in the viewport according to
|
|
287
312
|
* `options`, from the engine's current size data. As more items are
|
|
288
313
|
* measured, the same input can give a different, more accurate result.
|
|
289
|
-
*
|
|
290
|
-
* `nearest` keeps the current offset for an item already in view and
|
|
291
|
-
* otherwise brings the item to its nearer edge, as native `scrollIntoView`
|
|
292
|
-
* does.
|
|
293
314
|
*/
|
|
294
315
|
private _getAlignedScrollOffset;
|
|
295
316
|
/**
|
|
@@ -330,6 +351,8 @@ declare class IgxVirtualScrollComponent<T> implements OnDestroy {
|
|
|
330
351
|
* across two consecutive frames.
|
|
331
352
|
*/
|
|
332
353
|
private _resolveLayoutComplete;
|
|
354
|
+
/** Whether the host has a box, as opposed to being hidden or detached. */
|
|
355
|
+
private _isLaidOut;
|
|
333
356
|
private _measureViewport;
|
|
334
357
|
private _setupViewportResizeObserver;
|
|
335
358
|
private _setupScrollListener;
|
|
@@ -339,21 +362,26 @@ declare class IgxVirtualScrollComponent<T> implements OnDestroy {
|
|
|
339
362
|
* would schedule a change detection pass for an identical result.
|
|
340
363
|
*/
|
|
341
364
|
private _handleScroll;
|
|
365
|
+
/**
|
|
366
|
+
* Re-reads the scroll offset outside a scroll event. Detaching the host resets the offset
|
|
367
|
+
* without one, and the event for a scroll that was just applied may not have arrived yet.
|
|
368
|
+
*/
|
|
369
|
+
private _syncScrollPosition;
|
|
342
370
|
private _handleItemResize;
|
|
343
371
|
/**
|
|
344
372
|
* Synchronizes the item observer with the rendered window, applying only
|
|
345
373
|
* the difference. A newly observed element gets one initial measurement.
|
|
346
374
|
*
|
|
347
375
|
* An element whose `data-index` changed is re-registered, because
|
|
348
|
-
* `observe` on an already observed element is a no-op.
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
376
|
+
* `observe` on an already observed element is a no-op. The wrapper elements
|
|
377
|
+
* are recycled, so after a scroll the same element can host a different
|
|
378
|
+
* item at an identical size. The observer stays quiet about that and the
|
|
379
|
+
* new index would keep its estimated size.
|
|
352
380
|
*/
|
|
353
381
|
private _scheduleItemMeasurement;
|
|
354
382
|
/**
|
|
355
383
|
* Forgets the wrappers from `index` on, so the next pass registers them
|
|
356
|
-
* again: the
|
|
384
|
+
* again: the engine dropped their sizes, and a wrapper whose size did not
|
|
357
385
|
* change reports nothing on its own.
|
|
358
386
|
*/
|
|
359
387
|
private _remeasureFrom;
|
|
@@ -381,7 +409,7 @@ declare class IgxVirtualScrollComponent<T> implements OnDestroy {
|
|
|
381
409
|
private _checkDataRequest;
|
|
382
410
|
private _teardown;
|
|
383
411
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IgxVirtualScrollComponent<any>, never>;
|
|
384
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IgxVirtualScrollComponent<any>, "igx-virtual-scroll", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "overScan": { "alias": "overScan"; "required": false; "isSignal": true; }; "estimatedItemSize": { "alias": "estimatedItemSize"; "required": false; "isSignal": true; }; "dataWindow": { "alias": "dataWindow"; "required": false; "isSignal": true; }; "initialViewportSize": { "alias": "initialViewportSize"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; }, { "stateChange": "stateChange"; "dataRequest": "dataRequest"; }, ["_itemDirective"], never, true, never>;
|
|
412
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IgxVirtualScrollComponent<any>, "igx-virtual-scroll", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "overScan": { "alias": "overScan"; "required": false; "isSignal": true; }; "estimatedItemSize": { "alias": "estimatedItemSize"; "required": false; "isSignal": true; }; "dataWindow": { "alias": "dataWindow"; "required": false; "isSignal": true; }; "initialViewportSize": { "alias": "initialViewportSize"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "keyFunction": { "alias": "keyFunction"; "required": false; "isSignal": true; }; }, { "stateChange": "stateChange"; "dataRequest": "dataRequest"; }, ["_itemDirective"], never, true, never>;
|
|
385
413
|
}
|
|
386
414
|
|
|
387
415
|
/**
|
|
@@ -405,4 +433,4 @@ declare class IgxVirtualItemDirective<T = unknown> {
|
|
|
405
433
|
}
|
|
406
434
|
|
|
407
435
|
export { IgxVirtualItemDirective, IgxVirtualScrollComponent, IgxVsItemContext };
|
|
408
|
-
export type { ScrollAlignment, VirtualDataWindow, VirtualScrollDataRequest, VirtualScrollState, VisibleRange };
|
|
436
|
+
export type { ScrollAlignment, VirtualDataWindow, VirtualScrollDataRequest, VirtualScrollKeyFunction, VirtualScrollState, VisibleRange };
|
package/virtual-scroll/README.md
CHANGED
|
@@ -44,6 +44,7 @@ export class MyComponent {
|
|
|
44
44
|
| `overScan` | `number` | `2` | Extra items to render beyond each edge of the viewport. Higher values reduce blank flashes during fast scrolling at the cost of slightly more DOM nodes. Normalized to a non-negative integer. |
|
|
45
45
|
| `estimatedItemSize` | `number` | `50` | Pixel size used for items before they are measured in the DOM. Set this close to the real average size for the best initial-render accuracy. A non-positive value falls back to `50`. |
|
|
46
46
|
| `itemTemplate` | `TemplateRef<IgxVsItemContext<T>> \| null` | `null` | Programmatic template that takes precedence over a content `ng-template[igxVirtualItem]`. |
|
|
47
|
+
| `keyFunction` | `VirtualScrollKeyFunction<T> \| null` | `null` | Returns an item's key from the item and its index. Defaults to the index. See [Item elements and keys](#item-elements-and-keys). |
|
|
47
48
|
|
|
48
49
|
|
|
49
50
|
### Paged data
|
|
@@ -109,6 +110,8 @@ rendered window stays in the DOM while the host is away.
|
|
|
109
110
|
|
|
110
111
|
Changing `estimatedItemSize` re-applies it to every item that has **not** yet been measured in the DOM. Items that have been measured keep their real size.
|
|
111
112
|
|
|
113
|
+
Unmeasured items then take the average measured size, so the scrollbar tracks real content. Later averages apply only while every item before the rendered window is measured and the list fits the browser's scroll limit, so rendered items never shift. A new `estimatedItemSize` restarts the average.
|
|
114
|
+
|
|
112
115
|
---
|
|
113
116
|
|
|
114
117
|
## Outputs
|
|
@@ -147,7 +150,7 @@ await this.vs.scrollToIndex(500, { block: 'nearest' });
|
|
|
147
150
|
| `inline` | same as `block` | Alignment on the horizontal axis; falls back to `block`. |
|
|
148
151
|
| `behavior` | `'auto'` \| `'smooth'` | Defaults to `'auto'`. |
|
|
149
152
|
|
|
150
|
-
`'nearest'` leaves the scroll position untouched when the item is already fully in view, or when the item is larger than the viewport and currently covers it. Otherwise it
|
|
153
|
+
`'nearest'` leaves the scroll position untouched when the item is already fully in view, or when the item is larger than the viewport and currently covers it. Otherwise it scrolls the smallest distance that brings the item into view, as native `scrollIntoView({ block: 'nearest' })` does.
|
|
151
154
|
|
|
152
155
|
Out-of-range indices are clamped to the data, and the resulting offset is clamped to the largest reachable scroll position.
|
|
153
156
|
|
|
@@ -228,6 +231,34 @@ The component diffs the new array against the previous one to decide which item
|
|
|
228
231
|
|
|
229
232
|
---
|
|
230
233
|
|
|
234
|
+
## Item elements and keys
|
|
235
|
+
|
|
236
|
+
Item elements are recycled: an item that stays in the window keeps its element, and leaving items hand theirs to entering ones, so a scroll step updates only the entering items. A focused element is not moved while its item stays in the window, so it keeps focus.
|
|
237
|
+
|
|
238
|
+
Without `keyFunction`, elements are keyed by index. Set it when items move within `data` (sort, insert, remove), so an element follows its item:
|
|
239
|
+
|
|
240
|
+
```html
|
|
241
|
+
<igx-virtual-scroll [data]="people" [keyFunction]="byId" style="height: 400px;">
|
|
242
|
+
<ng-template igxVirtualItem let-person>
|
|
243
|
+
<person-card [person]="person" />
|
|
244
|
+
</ng-template>
|
|
245
|
+
</igx-virtual-scroll>
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
```ts
|
|
249
|
+
byId = (person: Person) => person.id;
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Unbound DOM state, such as a checkbox toggled without `[checked]`, stays with a recycled element and shows on another item. Angular writes a binding only when its value changes, so bind all item state and write user changes back to the item:
|
|
253
|
+
|
|
254
|
+
```html
|
|
255
|
+
<ng-template igxVirtualItem let-task>
|
|
256
|
+
<input type="checkbox" [checked]="task.done" (change)="task.done = $any($event.target).checked" />
|
|
257
|
+
</ng-template>
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
231
262
|
## Horizontal scrolling
|
|
232
263
|
|
|
233
264
|
Set `orientation="horizontal"`. Items are laid out in a row; ensure each item has an explicit `width` so the engine can measure sizes correctly.
|