ngwr 16.1.0 → 16.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/date-picker/styles/_index.scss +89 -1
- package/dropdown/styles/_index.scss +37 -1
- package/fesm2022/ngwr-date-picker-testing.mjs +18 -0
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +152 -8
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +73 -9
- package/fesm2022/ngwr-date-stamp.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +86 -5
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs +38 -3
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +358 -24
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +7 -2
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +7 -2
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +7 -2
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +7 -2
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +7 -2
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +7 -2
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +7 -2
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +7 -2
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +7 -2
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +7 -2
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +7 -2
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +7 -2
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +7 -2
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +7 -2
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +7 -2
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +7 -2
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +7 -2
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +7 -2
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +7 -2
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +7 -2
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +7 -2
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +7 -2
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox-testing.mjs +26 -0
- package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +246 -10
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +28 -6
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +3 -0
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-slider-testing.mjs +17 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +87 -11
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list-testing.mjs +103 -0
- package/fesm2022/ngwr-sortable-list-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sortable-list.mjs +257 -53
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/i18n/ar.json +7 -2
- package/i18n/cs.json +7 -2
- package/i18n/de.json +7 -2
- package/i18n/en.json +7 -2
- package/i18n/es.json +7 -2
- package/i18n/fr.json +7 -2
- package/i18n/he.json +7 -2
- package/i18n/hi.json +7 -2
- package/i18n/id.json +7 -2
- package/i18n/it.json +7 -2
- package/i18n/ja.json +7 -2
- package/i18n/ko.json +7 -2
- package/i18n/nl.json +7 -2
- package/i18n/pl.json +7 -2
- package/i18n/pt.json +7 -2
- package/i18n/ru.json +7 -2
- package/i18n/sv.json +7 -2
- package/i18n/tr.json +7 -2
- package/i18n/uk.json +7 -2
- package/i18n/vi.json +7 -2
- package/i18n/zh-TW.json +7 -2
- package/i18n/zh.json +7 -2
- package/lightbox/styles/_rules.scss +96 -0
- package/llms-full.txt +12 -8
- package/llms.txt +12 -0
- package/package.json +5 -1
- package/schematics/use/symbol-map.json +1 -0
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +2 -1
- package/slider/styles/_index.scss +106 -0
- package/sortable-list/styles/_rules.scss +23 -1
- package/types/ngwr-date-picker-testing.d.ts +17 -0
- package/types/ngwr-date-picker.d.ts +79 -2
- package/types/ngwr-date-stamp-testing.d.ts +1 -1
- package/types/ngwr-date-stamp.d.ts +53 -7
- package/types/ngwr-date.d.ts +118 -15
- package/types/ngwr-dropdown-testing.d.ts +53 -5
- package/types/ngwr-dropdown.d.ts +100 -0
- package/types/ngwr-lightbox-testing.d.ts +27 -0
- package/types/ngwr-lightbox.d.ts +71 -6
- package/types/ngwr-pipes.d.ts +33 -13
- package/types/ngwr-slider-testing.d.ts +8 -1
- package/types/ngwr-slider.d.ts +89 -3
- package/types/ngwr-sortable-list-testing.d.ts +79 -0
- package/types/ngwr-sortable-list.d.ts +113 -10
- package/types/ngwr-version.d.ts +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ElementRef, Signal } from "@angular/core";
|
|
2
|
+
import { ElementRef, Signal, WritableSignal } from "@angular/core";
|
|
3
3
|
import * as i1 from "@angular/cdk/drag-drop";
|
|
4
|
-
import { CdkDragDrop } from "@angular/cdk/drag-drop";
|
|
5
4
|
/**
|
|
6
5
|
* Contract a `<wr-sortable-item>` uses to talk to its parent list.
|
|
7
6
|
*
|
|
@@ -59,6 +58,27 @@ interface WrSortableReorderEvent<T> {
|
|
|
59
58
|
/** Convenience handle for the dropped item. */
|
|
60
59
|
readonly item: T;
|
|
61
60
|
}
|
|
61
|
+
/** One end of a move between connected lists: the list and the index in it. */
|
|
62
|
+
interface WrSortableMoveEnd<T> {
|
|
63
|
+
/** The list. Tell it apart by its `id` input, or by comparing the instance. */
|
|
64
|
+
readonly list: WrSortableList<T>;
|
|
65
|
+
/** Index in that list's `items`. */
|
|
66
|
+
readonly index: number;
|
|
67
|
+
}
|
|
68
|
+
/** Payload emitted by the TARGET list when an item arrives from another list of its group. */
|
|
69
|
+
interface WrSortableMoveEvent<T> {
|
|
70
|
+
/** The item that moved. */
|
|
71
|
+
readonly item: T;
|
|
72
|
+
/** Where it left. */
|
|
73
|
+
readonly from: WrSortableMoveEnd<T>;
|
|
74
|
+
/** Where it landed. */
|
|
75
|
+
readonly to: WrSortableMoveEnd<T>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Decides whether a list takes an item from another list of its group.
|
|
79
|
+
* `from` is the list the gesture started in.
|
|
80
|
+
*/
|
|
81
|
+
type WrSortableCanEnter<T> = (item: T, from: WrSortableList<T>) => boolean;
|
|
62
82
|
/**
|
|
63
83
|
* Drag-to-reorder list. Wraps CDK's `cdkDropList` + `cdkDrag` with a
|
|
64
84
|
* signal-based items binding — the source array is updated in place and
|
|
@@ -87,6 +107,13 @@ interface WrSortableReorderEvent<T> {
|
|
|
87
107
|
* click would be picking itself straight back up. A visible move-up /
|
|
88
108
|
* move-down affordance is the remaining answer, and that is a design change.
|
|
89
109
|
*
|
|
110
|
+
* Lists that share a `group` exchange items, by drag and by keyboard. The
|
|
111
|
+
* target list emits `move` once, and both lists write `[(items)]`; `reorder`
|
|
112
|
+
* stays for a move inside one list. Lists find each other through a root
|
|
113
|
+
* registry and are handed to `cdkDropListConnectedTo`, not through
|
|
114
|
+
* `cdkDropListGroup`, which needs a common ancestor directive and so cannot
|
|
115
|
+
* join lists that live in separate components.
|
|
116
|
+
*
|
|
90
117
|
* @example
|
|
91
118
|
* ```html
|
|
92
119
|
* <wr-sortable-list [(items)]="rows" (reorder)="onReorder($event)">
|
|
@@ -122,11 +149,42 @@ export declare class WrSortableList<T = unknown> implements WrSortableListContex
|
|
|
122
149
|
touch: number;
|
|
123
150
|
mouse: number;
|
|
124
151
|
}>;
|
|
125
|
-
/**
|
|
152
|
+
/**
|
|
153
|
+
* Name of the group this list belongs to. Lists with the same group exchange
|
|
154
|
+
* items, wherever they sit in the page. @default null
|
|
155
|
+
*/
|
|
156
|
+
readonly group: import("@angular/core").InputSignal<string | null>;
|
|
157
|
+
/**
|
|
158
|
+
* Refuses an item coming from another list of the group, by drag and by
|
|
159
|
+
* keyboard alike. An item can always return to the list it left.
|
|
160
|
+
* @default null
|
|
161
|
+
*/
|
|
162
|
+
readonly canEnter: import("@angular/core").InputSignal<WrSortableCanEnter<T> | null>;
|
|
163
|
+
/**
|
|
164
|
+
* Accessible name of the list. A keyboard move into this list announces it;
|
|
165
|
+
* without one the announcement falls back to the list's position in the group.
|
|
166
|
+
* @default null
|
|
167
|
+
*/
|
|
168
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
|
|
169
|
+
/** The host's `id`, and what tells the lists of a `move` apart. Generated when omitted. */
|
|
170
|
+
readonly id: import("@angular/core").InputSignal<string | undefined>;
|
|
171
|
+
/** Fired after a successful reorder with the new array + indices. Not fired for a move between lists. */
|
|
126
172
|
readonly reorder: import("@angular/core").OutputEmitterRef<WrSortableReorderEvent<T>>;
|
|
173
|
+
/**
|
|
174
|
+
* Fired once on the list an item ARRIVED in from another list of the group,
|
|
175
|
+
* after both lists have written `items`. The list it left emits nothing but
|
|
176
|
+
* `itemsChange`.
|
|
177
|
+
*/
|
|
178
|
+
readonly move: import("@angular/core").OutputEmitterRef<WrSortableMoveEvent<T>>;
|
|
127
179
|
private readonly injector;
|
|
180
|
+
private readonly host;
|
|
181
|
+
private readonly dropList;
|
|
182
|
+
private readonly lists;
|
|
183
|
+
private readonly listEl;
|
|
184
|
+
/** The other lists of this list's group. */
|
|
185
|
+
private readonly peers;
|
|
128
186
|
/**
|
|
129
|
-
* Ambient reading direction, for the
|
|
187
|
+
* Ambient reading direction, for the keyboard path.
|
|
130
188
|
*
|
|
131
189
|
* Optional so a bare `TestBed` — or any consumer that never set a direction —
|
|
132
190
|
* needs no provider; `Directionality` is root-provided, so `null` only ever
|
|
@@ -152,21 +210,28 @@ export declare class WrSortableList<T = unknown> implements WrSortableListContex
|
|
|
152
210
|
*/
|
|
153
211
|
private readonly rows;
|
|
154
212
|
/** Index of the row the keyboard is holding, or `null` when nothing is held. */
|
|
155
|
-
readonly grabbedIndex:
|
|
213
|
+
readonly grabbedIndex: WritableSignal<number | null>;
|
|
156
214
|
/** Live-region text. Written by the keyboard path only. */
|
|
157
|
-
protected readonly announcement:
|
|
215
|
+
protected readonly announcement: WritableSignal<string>;
|
|
216
|
+
private readonly uid;
|
|
158
217
|
/** Links every row to the key model via `aria-describedby`. */
|
|
159
218
|
readonly keyHelpId: string;
|
|
219
|
+
protected readonly fallbackId: string;
|
|
220
|
+
private readonly keyHelp;
|
|
221
|
+
private readonly groupKeyHelp;
|
|
160
222
|
protected readonly resolvedKeyHelp: import("@angular/core").Signal<string>;
|
|
161
223
|
private readonly grabbedText;
|
|
162
224
|
private readonly movedText;
|
|
163
225
|
private readonly droppedText;
|
|
164
226
|
private readonly cancelledText;
|
|
165
|
-
|
|
227
|
+
private readonly movedToText;
|
|
228
|
+
private readonly listPositionText;
|
|
229
|
+
/** Where the held row started, which can be another list. Escape puts it back there. */
|
|
166
230
|
private grabOrigin;
|
|
167
231
|
/** True while a keyboard move is handing focus back — see `onRowFocusout`. */
|
|
168
232
|
private restoringFocus;
|
|
169
|
-
|
|
233
|
+
constructor();
|
|
234
|
+
private onDrop;
|
|
170
235
|
/**
|
|
171
236
|
* The keyboard reorder path: pick up, move, drop — deliberately a two-step
|
|
172
237
|
* grab rather than "an arrow moves the focused row", so that arrowing through
|
|
@@ -213,9 +278,22 @@ export declare class WrSortableList<T = unknown> implements WrSortableListContex
|
|
|
213
278
|
onRowFocusout(): void;
|
|
214
279
|
private grab;
|
|
215
280
|
private moveGrabbed;
|
|
281
|
+
/**
|
|
282
|
+
* Hands the held row to the nearest list of the group, in document order,
|
|
283
|
+
* that takes it. A list that refuses is stepped over, since a drag can reach
|
|
284
|
+
* any list of the group and the keyboard must not reach fewer.
|
|
285
|
+
*/
|
|
286
|
+
private moveToList;
|
|
216
287
|
private drop;
|
|
217
288
|
private cancelGrab;
|
|
289
|
+
/** Whether this list takes `item` from another list of the group. */
|
|
290
|
+
private accepts;
|
|
291
|
+
/** This list and its peers, in document order. */
|
|
292
|
+
private groupLists;
|
|
293
|
+
private removeAt;
|
|
294
|
+
private insertAt;
|
|
218
295
|
private relocate;
|
|
296
|
+
private focusRow;
|
|
219
297
|
private position;
|
|
220
298
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrSortableList<any>, never>;
|
|
221
299
|
static ɵcmp: i0.ɵɵComponentDeclaration<WrSortableList<any>, "wr-sortable-list", never, {
|
|
@@ -244,10 +322,35 @@ export declare class WrSortableList<T = unknown> implements WrSortableListContex
|
|
|
244
322
|
"required": false;
|
|
245
323
|
"isSignal": true;
|
|
246
324
|
};
|
|
325
|
+
"group": {
|
|
326
|
+
"alias": "group";
|
|
327
|
+
"required": false;
|
|
328
|
+
"isSignal": true;
|
|
329
|
+
};
|
|
330
|
+
"canEnter": {
|
|
331
|
+
"alias": "canEnter";
|
|
332
|
+
"required": false;
|
|
333
|
+
"isSignal": true;
|
|
334
|
+
};
|
|
335
|
+
"ariaLabel": {
|
|
336
|
+
"alias": "ariaLabel";
|
|
337
|
+
"required": false;
|
|
338
|
+
"isSignal": true;
|
|
339
|
+
};
|
|
340
|
+
"id": {
|
|
341
|
+
"alias": "id";
|
|
342
|
+
"required": false;
|
|
343
|
+
"isSignal": true;
|
|
344
|
+
};
|
|
247
345
|
}, {
|
|
248
346
|
"items": "itemsChange";
|
|
249
347
|
"reorder": "reorder";
|
|
250
|
-
|
|
348
|
+
"move": "move";
|
|
349
|
+
}, never, ["*", "[wrSortableListEmpty]"], true, [{
|
|
350
|
+
directive: typeof i1.CdkDropList;
|
|
351
|
+
inputs: {};
|
|
352
|
+
outputs: {};
|
|
353
|
+
}]>;
|
|
251
354
|
}
|
|
252
355
|
/**
|
|
253
356
|
* One row of a {@link WrSortableList}. Write the loop yourself and put whatever
|
|
@@ -340,4 +443,4 @@ export declare class WrDragHandle {
|
|
|
340
443
|
outputs: {};
|
|
341
444
|
}]>;
|
|
342
445
|
}
|
|
343
|
-
export type { WrSortableReorderEvent };
|
|
446
|
+
export type { WrSortableCanEnter, WrSortableMoveEnd, WrSortableMoveEvent, WrSortableReorderEvent };
|
package/types/ngwr-version.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { InjectionToken } from "@angular/core";
|
|
|
15
15
|
* Distinct from `Version` exported by `@angular/core`, which reports the
|
|
16
16
|
* loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.
|
|
17
17
|
*/
|
|
18
|
-
export declare const NGWR_VERSION = "16.
|
|
18
|
+
export declare const NGWR_VERSION = "16.2.0";
|
|
19
19
|
/**
|
|
20
20
|
* Injection token holding the ngwr library version string.
|
|
21
21
|
*
|