@bimetal/list-angular-components 0.29.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/LICENSE ADDED
@@ -0,0 +1,129 @@
1
+ # PolyForm Noncommercial License 1.0.0
2
+
3
+ <https://polyformproject.org/licenses/noncommercial/1.0.0>
4
+
5
+ ## Acceptance
6
+
7
+ In order to get any license under these terms, you must agree
8
+ to them as both strict obligations and conditions to all
9
+ your licenses.
10
+
11
+ ## Copyright License
12
+
13
+ The licensor grants you a copyright license for the
14
+ software to do everything you might do with the software
15
+ that would otherwise infringe the licensor's copyright
16
+ in it for any permitted purpose. However, you may
17
+ only distribute the software according to [Distribution
18
+ License](#distribution-license) and make changes or new works
19
+ based on the software according to [Changes and New Works
20
+ License](#changes-and-new-works-license).
21
+
22
+ ## Distribution License
23
+
24
+ The licensor grants you an additional copyright license
25
+ to distribute copies of the software. Your license
26
+ to distribute covers distributing the software with
27
+ changes and new works permitted by [Changes and New Works
28
+ License](#changes-and-new-works-license).
29
+
30
+ ## Notices
31
+
32
+ You must ensure that anyone who gets a copy of any part of
33
+ the software from you also gets a copy of these terms or the
34
+ URL for them above, as well as copies of any plain-text lines
35
+ beginning with `Required Notice:` that the licensor provided
36
+ with the software. For example:
37
+
38
+ > Required Notice: Copyright Andreas Biederbeck (https://bimetal.dev)
39
+
40
+ ## Changes and New Works License
41
+
42
+ The licensor grants you an additional copyright license to
43
+ make changes and new works based on the software for any
44
+ permitted purpose.
45
+
46
+ ## Patent License
47
+
48
+ The licensor grants you a patent license for the software that
49
+ covers patent claims the licensor can license, or becomes able
50
+ to license, that you would infringe by using the software.
51
+
52
+ ## Noncommercial Purposes
53
+
54
+ Any noncommercial purpose is a permitted purpose.
55
+
56
+ ## Personal Uses
57
+
58
+ Personal use for research, experiment, and testing for
59
+ the benefit of public knowledge, personal study, private
60
+ entertainment, hobby projects, amateur pursuits, or religious
61
+ observance, without any anticipated commercial application,
62
+ is use for a permitted purpose.
63
+
64
+ ## Noncommercial Organizations
65
+
66
+ Use by any charitable organization, educational institution,
67
+ public research organization, public safety or health
68
+ organization, environmental protection organization,
69
+ or government institution is use for a permitted purpose
70
+ regardless of the source of funding or obligations resulting
71
+ from the funding.
72
+
73
+ ## Fair Use
74
+
75
+ You may have "fair use" rights for the software under the
76
+ law. These terms do not limit them.
77
+
78
+ ## No Other Rights
79
+
80
+ These terms do not allow you to sublicense or transfer any of
81
+ your licenses to anyone else, or prevent the licensor from
82
+ granting licenses to anyone else. These terms do not imply
83
+ any other licenses.
84
+
85
+ ## Patent Defense
86
+
87
+ If you make any written claim that the software infringes or
88
+ contributes to infringement of any patent, your patent license
89
+ for the software granted under these terms ends immediately. If
90
+ your company makes such a claim, your patent license ends
91
+ immediately for work on behalf of your company.
92
+
93
+ ## Violations
94
+
95
+ The first time you are notified in writing that you have
96
+ violated any of these terms, or any agreement made under them,
97
+ you have 32 calendar days to come into compliance. If you come
98
+ into compliance, your licenses revive and continue as if you had
99
+ never violated.
100
+
101
+ ## No Liability
102
+
103
+ ***As far as the law allows, the software comes as is, without
104
+ any warranty or condition, and the licensor will not be liable
105
+ to you for any damages arising out of these terms or the use
106
+ or nature of the software, under any kind of legal claim.***
107
+
108
+ ## Definitions
109
+
110
+ The **licensor** is the individual or entity offering these
111
+ terms, and the **software** is the software the licensor makes
112
+ available under these terms.
113
+
114
+ **You** refers to the individual or entity agreeing to these
115
+ terms.
116
+
117
+ **Your company** is any legal entity, sole proprietorship,
118
+ or other kind of organization that you work for, plus all
119
+ organizations that have control over, are under the control of,
120
+ or are under common control with that organization. **Control**
121
+ means ownership of substantially all the assets of an entity,
122
+ or the power to direct its management and policies by vote,
123
+ contract, or otherwise. Control can be direct or indirect.
124
+
125
+ **Your licenses** are all the licenses granted to you for the
126
+ software under these terms.
127
+
128
+ **Use** means anything you do with the software requiring one
129
+ of your licenses.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # @bimetal/list-angular-components
2
+
3
+ The default **Angular list / catalog** for BIMETAL — a thin, standalone-component
4
+ binding over the canonical [`@bimetal/list-headless`](../list-headless)
5
+ controller. Behaviorally identical to the React, Vue and Svelte lists: all
6
+ interaction logic lives in the controller, the component only renders the
7
+ canonical `.bm-list*` DOM with ARIA listbox roles, registers window pointer /
8
+ keydown listeners, and normalizes the events.
9
+
10
+ ## Features
11
+
12
+ - **Multi-select** — click toggles, Ctrl/Cmd-click adds, Shift-click extends the
13
+ range; `aria-selected` per row.
14
+ - **Batch reorder** — keyboard (Ctrl/Cmd+Arrows) and pointer drag move the whole
15
+ selection block and commit as ONE `MoveItems` (one undo).
16
+ - **Batch delete, in-place rename, undo** and **theming** (`darkMode`).
17
+
18
+ ## Usage
19
+
20
+ ```ts
21
+ import { Component } from '@angular/core';
22
+ import { List } from '@bimetal/list-angular-components';
23
+ import { createListStore } from '@bimetal/list-data';
24
+ import '@bimetal/list-angular-components/styles';
25
+
26
+ @Component({
27
+ standalone: true,
28
+ imports: [List],
29
+ template: `<bm-list [store]="store" [listId]="listId" title="Liste" [darkMode]="true"></bm-list>`,
30
+ })
31
+ export class CatalogPage {
32
+ store = createListStore();
33
+ listId = 'catalog';
34
+ }
35
+ ```
36
+
37
+ ### Inputs
38
+
39
+ | Input | Type | Default | Notes |
40
+ | ---------- | ------------------------ | ------- | ----------------------------------------------------------- |
41
+ | `store` | `ListStore` | — | Immutable after mount; remount (via `@if`/`*ngIf`) to swap. |
42
+ | `listId` | `string` | — | The list aggregate id this view binds to. Immutable. |
43
+ | `config` | `ListConfigInput` | — | Locale + row-geometry overrides; merged with defaults. |
44
+ | `darkMode` | `boolean` | `false` | Adds `data-theme="dark"`. |
45
+ | `title` | `string` | — | Optional toolbar heading. Omitted → no heading rendered. |
46
+ | `tag` | `string` | — | Optional small toolbar tagline next to the heading. |
47
+ | `onError` | `(err: unknown) => void` | — | Non-domain error channel (e.g. `ConcurrencyError`). |
48
+
49
+ ## License
50
+
51
+ PolyForm-Noncommercial-1.0.0 — see [LICENSE](./LICENSE).
@@ -0,0 +1,77 @@
1
+ import { ElementRef, AfterViewInit, AfterViewChecked, OnInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
2
+ import type { ListConfigInput, ListControllerSnapshot, ListLocale, ListItemView } from '@bimetal/list-headless';
3
+ import type { ListStore } from '@bimetal/list-data';
4
+ import * as i0 from "@angular/core";
5
+ /** Focus (and select) a freshly-mounted in-place rename input — parity with the
6
+ * React `autoFocus` + `onFocus → select()`. The `@if`-rendered input is a fresh
7
+ * element each time editing opens, so this fires once per open. */
8
+ export declare class ListAutofocusDirective implements AfterViewInit {
9
+ private readonly el;
10
+ ngAfterViewInit(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<ListAutofocusDirective, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ListAutofocusDirective, "[bmListAutofocus]", never, {}, {}, never, never, true, never>;
13
+ }
14
+ /**
15
+ * The Angular list / catalog — a thin binding over the canonical
16
+ * `@bimetal/list-headless` controller (instance #7 of the shipped component
17
+ * family). Renders the ordered rows on the canonical `.bm-list*` DOM with ARIA
18
+ * listbox roles; the controller owns selection, batch reorder/delete, the inline
19
+ * rename, undo and the keyboard semantics. The component owns DOM and listener
20
+ * registration only (the window pointer/keydown forwarders) and applies
21
+ * `tabindex=0` from the controller-derived `navAnchor` (never `cursor`).
22
+ */
23
+ export declare class List implements OnInit, AfterViewInit, AfterViewChecked, OnDestroy, OnChanges {
24
+ store: ListStore;
25
+ listId: string;
26
+ config?: ListConfigInput;
27
+ darkMode: boolean;
28
+ /** Optional toolbar heading. Omitted → no heading is rendered. */
29
+ title?: string;
30
+ /** Optional small toolbar tagline next to the heading. */
31
+ tag?: string;
32
+ /** Controller error channel: domain rejections surface as the undo toast;
33
+ * any other error (e.g. ConcurrencyError) is passed here instead of rejecting. */
34
+ onError?: (err: unknown) => void;
35
+ private binding;
36
+ listRef?: ElementRef<HTMLElement>;
37
+ private zone;
38
+ private suppressClick;
39
+ private lastNavAnchor;
40
+ get ctrl(): import("@bimetal/list-headless").ListController;
41
+ get snapshot(): ListControllerSnapshot;
42
+ get locale(): ListLocale;
43
+ get hasSel(): boolean;
44
+ get renderedRows(): readonly ListItemView[];
45
+ onKey(e: KeyboardEvent): void;
46
+ private onMove;
47
+ private onUp;
48
+ private onCancel;
49
+ private report;
50
+ private resizeObserver?;
51
+ ngOnInit(): void;
52
+ ngAfterViewInit(): void;
53
+ ngAfterViewChecked(): void;
54
+ ngOnChanges(changes: SimpleChanges): void;
55
+ ngOnDestroy(): void;
56
+ /** The CSS custom properties the controller derives (row height, etc.). */
57
+ cssVars(): Record<string, string>;
58
+ /** Row class with the controller-derived selection / drag preview appended. */
59
+ rowClass(r: ListItemView): string;
60
+ onRowPointerDown(e: PointerEvent, id: string): void;
61
+ onRowClick(e: MouseEvent, id: string): void;
62
+ onAddItem(): void;
63
+ onDeleteSelection(): void;
64
+ onUndo(): void;
65
+ onDismiss(): void;
66
+ /** Open the in-place editor for the single selected row (toolbar button). */
67
+ startRename(): void;
68
+ /** Push the live input text into the snapshot (controlled via `editing.draft`). */
69
+ onDraft(e: Event): void;
70
+ onFilter(e: Event): void;
71
+ onEditKeydown(e: KeyboardEvent): void;
72
+ /** Select the input's contents on focus — parity with the React `onFocus`. */
73
+ onEditFocus(e: Event): void;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<List, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<List, "bm-list", never, { "store": { "alias": "store"; "required": true; }; "listId": { "alias": "listId"; "required": true; }; "config": { "alias": "config"; "required": false; }; "darkMode": { "alias": "darkMode"; "required": false; }; "title": { "alias": "title"; "required": false; }; "tag": { "alias": "tag"; "required": false; }; "onError": { "alias": "onError"; "required": false; }; }, {}, never, never, true, never>;
76
+ }
77
+ //# sourceMappingURL=List.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/components/List.ts"],"names":[],"mappings":"AAAA,OAAO,EACiB,UAAU,E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AAG,IAAI;IAc7B,OAAO,CAAC,MAAM,CAYZ;IACF,OAAO,CAAC,IAAI,CAA6F;IACzG,OAAO,CAAC,QAAQ,CAAkE;IAMlF,OAAO,CAAC,MAAM,CAGZ;IACF,OAAO,CAAC,cAAc,CAAC,CAAiB;IAExC,QAAQ;IAkBR,eAAe;IAgBf,kBAAkB;IAYlB,WAAW,CAAC,OAAO,EAAE,aAAa;IAOlC,WAAW;IAaX,2EAA2E;IAC3E,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAEjC,+EAA+E;IAC/E,QAAQ,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM;IAajC,gBAAgB,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM;IAQ5C,UAAU,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM;IAKpC,SAAS;IACT,iBAAiB;IACjB,MAAM;IACN,SAAS;IAET,6EAA6E;IAC7E,WAAW;IAMX,mFAAmF;IACnF,OAAO,CAAC,CAAC,EAAE,KAAK;IAChB,QAAQ,CAAC,CAAC,EAAE,KAAK;IACjB,aAAa,CAAC,CAAC,EAAE,aAAa;IAI9B,8EAA8E;IAC9E,WAAW,CAAC,CAAC,EAAE,KAAK;yCAzMT,IAAI;2CAAJ,IAAI;CA0MhB"}
@@ -0,0 +1,529 @@
1
+ import { Component, Directive, ElementRef, ViewChild, Input, ChangeDetectionStrategy, NgZone, inject, } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { listCssVars } from '@bimetal/list-headless';
4
+ import { createListControllerBinding, } from '@bimetal/angular';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "@angular/common";
7
+ const _c0 = ["listbox"];
8
+ const _forTrack0 = ($index, $item) => $item.item.id;
9
+ function List_Conditional_2_Template(rf, ctx) { if (rf & 1) {
10
+ i0.ɵɵelementStart(0, "h1", 4);
11
+ i0.ɵɵtext(1);
12
+ i0.ɵɵelementEnd();
13
+ } if (rf & 2) {
14
+ const ctx_r1 = i0.ɵɵnextContext();
15
+ i0.ɵɵadvance();
16
+ i0.ɵɵtextInterpolate(ctx_r1.title);
17
+ } }
18
+ function List_Conditional_3_Template(rf, ctx) { if (rf & 1) {
19
+ i0.ɵɵelementStart(0, "span", 5);
20
+ i0.ɵɵtext(1);
21
+ i0.ɵɵelementEnd();
22
+ } if (rf & 2) {
23
+ const ctx_r1 = i0.ɵɵnextContext();
24
+ i0.ɵɵadvance();
25
+ i0.ɵɵtextInterpolate(ctx_r1.tag);
26
+ } }
27
+ function List_Conditional_15_Template(rf, ctx) { if (rf & 1) {
28
+ i0.ɵɵelement(0, "div", 14);
29
+ } if (rf & 2) {
30
+ const ctx_r1 = i0.ɵɵnextContext();
31
+ i0.ɵɵstyleProp("height", ctx_r1.snapshot.virtual.offsetTop, "px");
32
+ } }
33
+ function List_For_17_Conditional_3_Template(rf, ctx) { if (rf & 1) {
34
+ const _r5 = i0.ɵɵgetCurrentView();
35
+ i0.ɵɵelementStart(0, "input", 18, 1);
36
+ i0.ɵɵlistener("input", function List_For_17_Conditional_3_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onDraft($event)); })("keydown", function List_For_17_Conditional_3_Template_input_keydown_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onEditKeydown($event)); })("focus", function List_For_17_Conditional_3_Template_input_focus_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onEditFocus($event)); })("click", function List_For_17_Conditional_3_Template_input_click_0_listener($event) { i0.ɵɵrestoreView(_r5); return i0.ɵɵresetView($event.stopPropagation()); })("pointerdown", function List_For_17_Conditional_3_Template_input_pointerdown_0_listener($event) { i0.ɵɵrestoreView(_r5); return i0.ɵɵresetView($event.stopPropagation()); });
37
+ i0.ɵɵelementEnd();
38
+ } if (rf & 2) {
39
+ const ctx_r1 = i0.ɵɵnextContext(2);
40
+ i0.ɵɵproperty("value", ctx_r1.snapshot.editing.draft);
41
+ i0.ɵɵattribute("placeholder", ctx_r1.locale.titlePlaceholder);
42
+ } }
43
+ function List_For_17_Conditional_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
44
+ i0.ɵɵelementStart(0, "span", 19);
45
+ i0.ɵɵtext(1);
46
+ i0.ɵɵelementEnd();
47
+ } if (rf & 2) {
48
+ const r_r4 = i0.ɵɵnextContext(2).$implicit;
49
+ i0.ɵɵadvance();
50
+ i0.ɵɵtextInterpolate(r_r4.item.icon);
51
+ } }
52
+ function List_For_17_Conditional_4_Conditional_4_Template(rf, ctx) { if (rf & 1) {
53
+ i0.ɵɵelementStart(0, "span", 22);
54
+ i0.ɵɵtext(1);
55
+ i0.ɵɵelementEnd();
56
+ } if (rf & 2) {
57
+ const r_r4 = i0.ɵɵnextContext(2).$implicit;
58
+ i0.ɵɵadvance();
59
+ i0.ɵɵtextInterpolate(r_r4.item.description);
60
+ } }
61
+ function List_For_17_Conditional_4_Conditional_5_Template(rf, ctx) { if (rf & 1) {
62
+ i0.ɵɵelementStart(0, "span", 23);
63
+ i0.ɵɵtext(1);
64
+ i0.ɵɵelementEnd();
65
+ } if (rf & 2) {
66
+ const r_r4 = i0.ɵɵnextContext(2).$implicit;
67
+ i0.ɵɵadvance();
68
+ i0.ɵɵtextInterpolate(r_r4.item.badge);
69
+ } }
70
+ function List_For_17_Conditional_4_Template(rf, ctx) { if (rf & 1) {
71
+ i0.ɵɵtemplate(0, List_For_17_Conditional_4_Conditional_0_Template, 2, 1, "span", 19);
72
+ i0.ɵɵelementStart(1, "span", 20)(2, "span", 21);
73
+ i0.ɵɵtext(3);
74
+ i0.ɵɵelementEnd();
75
+ i0.ɵɵtemplate(4, List_For_17_Conditional_4_Conditional_4_Template, 2, 1, "span", 22);
76
+ i0.ɵɵelementEnd();
77
+ i0.ɵɵtemplate(5, List_For_17_Conditional_4_Conditional_5_Template, 2, 1, "span", 23);
78
+ } if (rf & 2) {
79
+ const r_r4 = i0.ɵɵnextContext().$implicit;
80
+ i0.ɵɵconditional(r_r4.item.icon ? 0 : -1);
81
+ i0.ɵɵadvance(3);
82
+ i0.ɵɵtextInterpolate(r_r4.item.label);
83
+ i0.ɵɵadvance();
84
+ i0.ɵɵconditional(r_r4.item.description ? 4 : -1);
85
+ i0.ɵɵadvance();
86
+ i0.ɵɵconditional(r_r4.item.badge ? 5 : -1);
87
+ } }
88
+ function List_For_17_Template(rf, ctx) { if (rf & 1) {
89
+ const _r3 = i0.ɵɵgetCurrentView();
90
+ i0.ɵɵelementStart(0, "div", 15);
91
+ i0.ɵɵlistener("pointerdown", function List_For_17_Template_div_pointerdown_0_listener($event) { const r_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onRowPointerDown($event, r_r4.item.id)); })("click", function List_For_17_Template_div_click_0_listener($event) { const r_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onRowClick($event, r_r4.item.id)); })("dblclick", function List_For_17_Template_div_dblclick_0_listener() { const r_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ctrl.startEdit(r_r4.item.id)); });
92
+ i0.ɵɵelementStart(1, "span", 16);
93
+ i0.ɵɵtext(2, "\u283F");
94
+ i0.ɵɵelementEnd();
95
+ i0.ɵɵtemplate(3, List_For_17_Conditional_3_Template, 2, 2, "input", 17)(4, List_For_17_Conditional_4_Template, 6, 4);
96
+ i0.ɵɵelementEnd();
97
+ } if (rf & 2) {
98
+ const r_r4 = ctx.$implicit;
99
+ const ctx_r1 = i0.ɵɵnextContext();
100
+ i0.ɵɵclassMap(ctx_r1.rowClass(r_r4));
101
+ i0.ɵɵattribute("data-item-id", r_r4.item.id)("aria-selected", r_r4.selected)("aria-disabled", r_r4.item.disabled ? "true" : null)("tabindex", r_r4.item.id === ctx_r1.snapshot.navAnchor ? 0 : -1);
102
+ i0.ɵɵadvance(3);
103
+ i0.ɵɵconditional((ctx_r1.snapshot.editing == null ? null : ctx_r1.snapshot.editing.itemId) === r_r4.item.id ? 3 : 4);
104
+ } }
105
+ function List_Conditional_18_Template(rf, ctx) { if (rf & 1) {
106
+ i0.ɵɵelement(0, "div", 14);
107
+ } if (rf & 2) {
108
+ const ctx_r1 = i0.ɵɵnextContext();
109
+ i0.ɵɵstyleProp("height", ctx_r1.snapshot.virtual.offsetBottom, "px");
110
+ } }
111
+ function List_Conditional_19_Template(rf, ctx) { if (rf & 1) {
112
+ const _r6 = i0.ɵɵgetCurrentView();
113
+ i0.ɵɵelementStart(0, "div", 13)(1, "span", 24);
114
+ i0.ɵɵtext(2);
115
+ i0.ɵɵelementEnd();
116
+ i0.ɵɵelementStart(3, "button", 25);
117
+ i0.ɵɵlistener("click", function List_Conditional_19_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onDismiss()); });
118
+ i0.ɵɵtext(4, "\u00D7");
119
+ i0.ɵɵelementEnd()();
120
+ } if (rf & 2) {
121
+ i0.ɵɵadvance(2);
122
+ i0.ɵɵtextInterpolate(ctx.description);
123
+ } }
124
+ /** Focus (and select) a freshly-mounted in-place rename input — parity with the
125
+ * React `autoFocus` + `onFocus → select()`. The `@if`-rendered input is a fresh
126
+ * element each time editing opens, so this fires once per open. */
127
+ export class ListAutofocusDirective {
128
+ el = inject(ElementRef);
129
+ ngAfterViewInit() {
130
+ queueMicrotask(() => {
131
+ const input = this.el.nativeElement;
132
+ input.focus?.();
133
+ input.select?.();
134
+ });
135
+ }
136
+ static ɵfac = function ListAutofocusDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ListAutofocusDirective)(); };
137
+ static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ListAutofocusDirective, selectors: [["", "bmListAutofocus", ""]] });
138
+ }
139
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ListAutofocusDirective, [{
140
+ type: Directive,
141
+ args: [{ selector: '[bmListAutofocus]', standalone: true }]
142
+ }], null, null); })();
143
+ /** True when a keyboard event targets a text-editing element. */
144
+ function isEditableTarget(t) {
145
+ const el = t;
146
+ if (!el || !el.tagName)
147
+ return false;
148
+ const tag = el.tagName;
149
+ return tag === 'INPUT' || tag === 'TEXTAREA' || el.isContentEditable === true;
150
+ }
151
+ /**
152
+ * The Angular list / catalog — a thin binding over the canonical
153
+ * `@bimetal/list-headless` controller (instance #7 of the shipped component
154
+ * family). Renders the ordered rows on the canonical `.bm-list*` DOM with ARIA
155
+ * listbox roles; the controller owns selection, batch reorder/delete, the inline
156
+ * rename, undo and the keyboard semantics. The component owns DOM and listener
157
+ * registration only (the window pointer/keydown forwarders) and applies
158
+ * `tabindex=0` from the controller-derived `navAnchor` (never `cursor`).
159
+ */
160
+ export class List {
161
+ store;
162
+ listId;
163
+ config;
164
+ darkMode = false;
165
+ /** Optional toolbar heading. Omitted → no heading is rendered. */
166
+ title;
167
+ /** Optional small toolbar tagline next to the heading. */
168
+ tag;
169
+ /** Controller error channel: domain rejections surface as the undo toast;
170
+ * any other error (e.g. ConcurrencyError) is passed here instead of rejecting. */
171
+ onError;
172
+ binding;
173
+ // The listbox host — the drag hit-test and the roving-focus scan are scoped to
174
+ // THIS list's own DOM (with two lists on a page the global elementFromPoint /
175
+ // focus query would otherwise reach into the other one).
176
+ listRef;
177
+ // Injected via the field API so the binding works under JIT (vitest/esbuild
178
+ // does not emit constructor-parameter decorator metadata). `optional` keeps
179
+ // direct `new List()` instantiation (non-TestBed unit use) working.
180
+ zone = inject(NgZone, { optional: true }) ?? undefined;
181
+ // Suppress the trailing click that fires after an active drag ends on a row.
182
+ suppressClick = false;
183
+ // The last navAnchor focused, so the roving-focus effect fires only when the
184
+ // controller actually MOVED the anchor — not on every re-render.
185
+ lastNavAnchor = null;
186
+ get ctrl() { return this.binding.ctrl; }
187
+ get snapshot() { return this.binding.snapshot(); }
188
+ get locale() { return this.snapshot.config.locale; }
189
+ get hasSel() { return this.snapshot.selection.length > 0; }
190
+ // The window slice when virtualizing, else the full (filtered) list. The binding
191
+ // never computes the window — it renders `virtual.rows` + the controller's spacers.
192
+ get renderedRows() { return this.snapshot.virtual ? this.snapshot.virtual.rows : this.snapshot.rows; }
193
+ // The controller owns the keyboard semantics (arrows, shift-range, Ctrl/Cmd+
194
+ // arrows move, Enter/Delete/Escape/undo). Bound to THIS component's root via
195
+ // `(keydown)` in the template (NOT window), so a keystroke in one list never
196
+ // deletes/reorders/undoes a sibling list.
197
+ onKey(e) {
198
+ this.ctrl.handleKeydown({
199
+ key: e.key,
200
+ ctrlKey: e.ctrlKey,
201
+ metaKey: e.metaKey,
202
+ shiftKey: e.shiftKey,
203
+ isEditable: isEditableTarget(e.target),
204
+ preventDefault: () => e.preventDefault(),
205
+ });
206
+ }
207
+ // The controller owns the reorder gesture (arming, threshold, zone). The
208
+ // binding only forwards pointer events with the hit-tested row + its rect
209
+ // (DOM-only work), gated statelessly by `e.buttons` so hover doesn't hit-test.
210
+ onMove = (e) => {
211
+ if (e.buttons === 0)
212
+ return;
213
+ const rowEl = document.elementFromPoint(e.clientX, e.clientY)?.closest('.bm-list__row');
214
+ const id = rowEl?.dataset['itemId'];
215
+ let over;
216
+ // Scope the hit-test to THIS list's root — with two lists on a page the
217
+ // global elementFromPoint would otherwise hand us a row from the other one.
218
+ if (rowEl && id && this.listRef?.nativeElement.contains(rowEl)) {
219
+ const r = rowEl.getBoundingClientRect();
220
+ over = { itemId: id, rect: { top: r.top, height: r.height } };
221
+ }
222
+ this.ctrl.pointerMove({ x: e.clientX, y: e.clientY }, e.pointerId, over);
223
+ };
224
+ onUp = (e) => { if (this.ctrl.pointerUp(e.pointerId))
225
+ this.suppressClick = true; };
226
+ onCancel = (e) => { this.ctrl.pointerCancel(e.pointerId); };
227
+ // Virtualization: the binding REPORTS the scroll container's scrollTop + measured
228
+ // height; the controller owns ALL window/offset math. We never compute the window.
229
+ // Bound as a class arrow so the scroll listener and the ResizeObserver share one
230
+ // ref (mirroring onMove/onUp) — and so add/removeEventListener line up on destroy.
231
+ report = () => {
232
+ const el = this.listRef?.nativeElement;
233
+ if (el)
234
+ this.ctrl.setViewport(el.scrollTop, el.clientHeight);
235
+ };
236
+ resizeObserver;
237
+ ngOnInit() {
238
+ this.binding = createListControllerBinding({
239
+ store: this.store,
240
+ listId: this.listId,
241
+ config: this.config,
242
+ onError: (err) => this.onError?.(err),
243
+ }, this.zone);
244
+ if (typeof window !== 'undefined') {
245
+ window.addEventListener('pointermove', this.onMove);
246
+ window.addEventListener('pointerup', this.onUp);
247
+ window.addEventListener('pointercancel', this.onCancel);
248
+ }
249
+ }
250
+ // Wire the viewport reporter once the listbox element exists: an initial measure
251
+ // plus a passive `scroll` listener and a ResizeObserver, all sharing `this.report`.
252
+ // The controller turns the reported scrollTop/clientHeight into the window + spacers.
253
+ ngAfterViewInit() {
254
+ const el = this.listRef?.nativeElement;
255
+ if (!el)
256
+ return;
257
+ this.report(); // initial measure
258
+ el.addEventListener('scroll', this.report, { passive: true });
259
+ if (typeof ResizeObserver !== 'undefined') {
260
+ this.resizeObserver = new ResizeObserver(this.report);
261
+ this.resizeObserver.observe(el);
262
+ }
263
+ }
264
+ // Roving focus: keep DOM focus on the navAnchor row WHEN focus is already in
265
+ // the list. Scoped to this component's root (never a global query), via a
266
+ // dataset scan that avoids interpolating the id into a selector (no CSS.escape
267
+ // dependency, no injection). Guarded on a stable key so it fires only when the
268
+ // controller moved the anchor — parity with the React focus effect.
269
+ ngAfterViewChecked() {
270
+ const anchor = this.snapshot.navAnchor;
271
+ if (anchor === this.lastNavAnchor)
272
+ return;
273
+ this.lastNavAnchor = anchor;
274
+ // An open inline editor owns DOM focus — don't steal it back to the roving row.
275
+ if (this.snapshot.editing)
276
+ return;
277
+ const el = this.listRef?.nativeElement;
278
+ if (!anchor || !el || !el.contains(document.activeElement))
279
+ return;
280
+ const target = Array.from(el.querySelectorAll('.bm-list__row')).find(r => r.dataset['itemId'] === anchor);
281
+ target?.focus();
282
+ }
283
+ ngOnChanges(changes) {
284
+ if (!this.binding)
285
+ return; // before ngOnInit
286
+ if (changes['config'] && !changes['config'].firstChange) {
287
+ this.ctrl.setConfig(this.config);
288
+ }
289
+ }
290
+ ngOnDestroy() {
291
+ if (typeof window !== 'undefined') {
292
+ window.removeEventListener('pointermove', this.onMove);
293
+ window.removeEventListener('pointerup', this.onUp);
294
+ window.removeEventListener('pointercancel', this.onCancel);
295
+ }
296
+ this.listRef?.nativeElement.removeEventListener('scroll', this.report);
297
+ this.resizeObserver?.disconnect();
298
+ this.binding?.destroy();
299
+ }
300
+ // ── Derived view helpers (Angular templates forbid arrow functions) ──
301
+ /** The CSS custom properties the controller derives (row height, etc.). */
302
+ cssVars() { return listCssVars(this.snapshot); }
303
+ /** Row class with the controller-derived selection / drag preview appended. */
304
+ rowClass(r) {
305
+ const drag = this.snapshot.drag;
306
+ let c = 'bm-list__row';
307
+ if (r.selected)
308
+ c += ' bm-list__row--selected';
309
+ if (r.matched)
310
+ c += ' bm-list__row--match';
311
+ if (r.item.disabled)
312
+ c += ' bm-list__row--disabled';
313
+ if (drag?.itemId === r.item.id)
314
+ c += ' bm-list__row--dragging';
315
+ if (drag?.over?.targetId === r.item.id)
316
+ c += ' bm-list__row--drop-' + drag.over.zone;
317
+ return c;
318
+ }
319
+ // ── Event handlers ──────────────────────────────────────────────
320
+ onRowPointerDown(e, id) {
321
+ // Clear any stale suppression from a prior drag that ended off-row (no
322
+ // trailing click fired to consume it) so this fresh interaction's click is
323
+ // never swallowed.
324
+ this.suppressClick = false;
325
+ this.ctrl.pointerDownOnItem(id, { x: e.clientX, y: e.clientY }, e.pointerId);
326
+ }
327
+ onRowClick(e, id) {
328
+ if (this.suppressClick) {
329
+ this.suppressClick = false;
330
+ return;
331
+ }
332
+ this.ctrl.selectItem(id, { additive: e.ctrlKey || e.metaKey, range: e.shiftKey });
333
+ }
334
+ onAddItem() { this.ctrl.voidAddItem(); }
335
+ onDeleteSelection() { this.ctrl.voidDeleteSelection(); }
336
+ onUndo() { this.ctrl.voidUndo(); }
337
+ onDismiss() { this.ctrl.dismissUndo(); }
338
+ /** Open the in-place editor for the single selected row (toolbar button). */
339
+ startRename() {
340
+ const sel = this.snapshot.selection;
341
+ if (sel.length !== 1)
342
+ return;
343
+ this.ctrl.startEdit(sel[0]);
344
+ }
345
+ /** Push the live input text into the snapshot (controlled via `editing.draft`). */
346
+ onDraft(e) { this.ctrl.setDraft(e.target.value); }
347
+ onFilter(e) { this.ctrl.setFilter(e.target.value); }
348
+ onEditKeydown(e) {
349
+ this.ctrl.handleEditKeydown({ key: e.key, ctrlKey: e.ctrlKey, metaKey: e.metaKey, shiftKey: e.shiftKey, isEditable: true, preventDefault: () => e.preventDefault() });
350
+ }
351
+ /** Select the input's contents on focus — parity with the React `onFocus`. */
352
+ onEditFocus(e) { e.target.select(); }
353
+ static ɵfac = function List_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || List)(); };
354
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: List, selectors: [["bm-list"]], viewQuery: function List_Query(rf, ctx) { if (rf & 1) {
355
+ i0.ɵɵviewQuery(_c0, 5);
356
+ } if (rf & 2) {
357
+ let _t;
358
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.listRef = _t.first);
359
+ } }, inputs: { store: "store", listId: "listId", config: "config", darkMode: "darkMode", title: "title", tag: "tag", onError: "onError" }, features: [i0.ɵɵNgOnChangesFeature], decls: 20, vars: 20, consts: [["listbox", ""], ["editInput", ""], [1, "bm-list", 3, "keydown", "ngStyle"], [1, "bm-list__toolbar"], [1, "bm-list__title"], [1, "bm-list__tag"], ["type", "button", 1, "bm-list__btn", "bm-list__btn--primary", 3, "click"], ["type", "button", 1, "bm-list__btn", 3, "click", "disabled"], ["type", "button", 1, "bm-list__btn", 3, "click"], ["type", "search", 1, "bm-list__search", 3, "input", "value"], ["role", "listbox", "aria-multiselectable", "true", 1, "bm-list__listbox"], ["aria-hidden", "true", 1, "bm-list__spacer", 3, "height"], ["role", "option", 3, "class"], ["role", "status", 1, "bm-list__toast"], ["aria-hidden", "true", 1, "bm-list__spacer"], ["role", "option", 3, "pointerdown", "click", "dblclick"], ["aria-hidden", "true", 1, "bm-list__handle"], ["bmListAutofocus", "", 1, "bm-list__edit", 3, "value"], ["bmListAutofocus", "", 1, "bm-list__edit", 3, "input", "keydown", "focus", "click", "pointerdown", "value"], ["aria-hidden", "true", 1, "bm-list__icon"], [1, "bm-list__text"], [1, "bm-list__label"], [1, "bm-list__secondary"], [1, "bm-list__badge"], [1, "bm-list__toast-msg"], ["type", "button", 1, "bm-list__toast-dismiss", 3, "click"]], template: function List_Template(rf, ctx) { if (rf & 1) {
360
+ const _r1 = i0.ɵɵgetCurrentView();
361
+ i0.ɵɵelementStart(0, "div", 2);
362
+ i0.ɵɵlistener("keydown", function List_Template_div_keydown_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onKey($event)); });
363
+ i0.ɵɵelementStart(1, "div", 3);
364
+ i0.ɵɵtemplate(2, List_Conditional_2_Template, 2, 1, "h1", 4)(3, List_Conditional_3_Template, 2, 1, "span", 5);
365
+ i0.ɵɵelementStart(4, "button", 6);
366
+ i0.ɵɵlistener("click", function List_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onAddItem()); });
367
+ i0.ɵɵtext(5);
368
+ i0.ɵɵelementEnd();
369
+ i0.ɵɵelementStart(6, "button", 7);
370
+ i0.ɵɵlistener("click", function List_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.startRename()); });
371
+ i0.ɵɵtext(7);
372
+ i0.ɵɵelementEnd();
373
+ i0.ɵɵelementStart(8, "button", 7);
374
+ i0.ɵɵlistener("click", function List_Template_button_click_8_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDeleteSelection()); });
375
+ i0.ɵɵtext(9);
376
+ i0.ɵɵelementEnd();
377
+ i0.ɵɵelementStart(10, "button", 8);
378
+ i0.ɵɵlistener("click", function List_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onUndo()); });
379
+ i0.ɵɵtext(11);
380
+ i0.ɵɵelementEnd();
381
+ i0.ɵɵelementStart(12, "input", 9);
382
+ i0.ɵɵlistener("input", function List_Template_input_input_12_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onFilter($event)); });
383
+ i0.ɵɵelementEnd()();
384
+ i0.ɵɵelementStart(13, "div", 10, 0);
385
+ i0.ɵɵtemplate(15, List_Conditional_15_Template, 1, 2, "div", 11);
386
+ i0.ɵɵrepeaterCreate(16, List_For_17_Template, 5, 7, "div", 12, _forTrack0);
387
+ i0.ɵɵtemplate(18, List_Conditional_18_Template, 1, 2, "div", 11);
388
+ i0.ɵɵelementEnd();
389
+ i0.ɵɵtemplate(19, List_Conditional_19_Template, 5, 1, "div", 13);
390
+ i0.ɵɵelementEnd();
391
+ } if (rf & 2) {
392
+ let tmp_15_0;
393
+ let tmp_19_0;
394
+ i0.ɵɵclassProp("bm-list--virtual", !!ctx.snapshot.virtual);
395
+ i0.ɵɵproperty("ngStyle", ctx.cssVars());
396
+ i0.ɵɵattribute("data-theme", ctx.darkMode ? "dark" : null);
397
+ i0.ɵɵadvance(2);
398
+ i0.ɵɵconditional(ctx.title ? 2 : -1);
399
+ i0.ɵɵadvance();
400
+ i0.ɵɵconditional(ctx.tag ? 3 : -1);
401
+ i0.ɵɵadvance(2);
402
+ i0.ɵɵtextInterpolate1("+ ", ctx.locale.addItem, "");
403
+ i0.ɵɵadvance();
404
+ i0.ɵɵproperty("disabled", ctx.snapshot.selection.length !== 1);
405
+ i0.ɵɵadvance();
406
+ i0.ɵɵtextInterpolate(ctx.locale.rename);
407
+ i0.ɵɵadvance();
408
+ i0.ɵɵproperty("disabled", !ctx.hasSel);
409
+ i0.ɵɵadvance();
410
+ i0.ɵɵtextInterpolate2("", ctx.locale.delete, "", ctx.hasSel ? " (" + ctx.snapshot.selection.length + ")" : "", "");
411
+ i0.ɵɵadvance(2);
412
+ i0.ɵɵtextInterpolate1("\u21B6 ", ctx.locale.undo, "");
413
+ i0.ɵɵadvance();
414
+ i0.ɵɵproperty("value", ctx.snapshot.filterQuery);
415
+ i0.ɵɵattribute("placeholder", ctx.locale.searchPlaceholder)("aria-label", ctx.locale.searchPlaceholder);
416
+ i0.ɵɵadvance();
417
+ i0.ɵɵattribute("aria-label", (tmp_15_0 = ctx.title) !== null && tmp_15_0 !== undefined ? tmp_15_0 : "Katalog");
418
+ i0.ɵɵadvance(2);
419
+ i0.ɵɵconditional(ctx.snapshot.virtual && ctx.snapshot.virtual.offsetTop > 0 ? 15 : -1);
420
+ i0.ɵɵadvance();
421
+ i0.ɵɵrepeater(ctx.renderedRows);
422
+ i0.ɵɵadvance(2);
423
+ i0.ɵɵconditional(ctx.snapshot.virtual && ctx.snapshot.virtual.offsetBottom > 0 ? 18 : -1);
424
+ i0.ɵɵadvance();
425
+ i0.ɵɵconditional((tmp_19_0 = ctx.snapshot.lastAction) ? 19 : -1, tmp_19_0);
426
+ } }, dependencies: [CommonModule, i1.NgStyle, ListAutofocusDirective], encapsulation: 2, changeDetection: 0 });
427
+ }
428
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(List, [{
429
+ type: Component,
430
+ args: [{
431
+ selector: 'bm-list',
432
+ standalone: true,
433
+ imports: [CommonModule, ListAutofocusDirective],
434
+ changeDetection: ChangeDetectionStrategy.OnPush,
435
+ template: `
436
+ <div class="bm-list" [class.bm-list--virtual]="!!snapshot.virtual" [attr.data-theme]="darkMode ? 'dark' : null" [ngStyle]="cssVars()" (keydown)="onKey($event)">
437
+ <div class="bm-list__toolbar">
438
+ @if (title) {
439
+ <h1 class="bm-list__title">{{ title }}</h1>
440
+ }
441
+ @if (tag) {
442
+ <span class="bm-list__tag">{{ tag }}</span>
443
+ }
444
+ <button class="bm-list__btn bm-list__btn--primary" type="button" (click)="onAddItem()">+ {{ locale.addItem }}</button>
445
+ <button class="bm-list__btn" type="button" [disabled]="snapshot.selection.length !== 1" (click)="startRename()">{{ locale.rename }}</button>
446
+ <button class="bm-list__btn" type="button" [disabled]="!hasSel" (click)="onDeleteSelection()">{{ locale.delete }}{{ hasSel ? ' (' + snapshot.selection.length + ')' : '' }}</button>
447
+ <button class="bm-list__btn" type="button" (click)="onUndo()">↶ {{ locale.undo }}</button>
448
+ <input class="bm-list__search" type="search" [value]="snapshot.filterQuery" [attr.placeholder]="locale.searchPlaceholder" [attr.aria-label]="locale.searchPlaceholder" (input)="onFilter($event)" />
449
+ </div>
450
+
451
+ <div class="bm-list__listbox" role="listbox" aria-multiselectable="true" [attr.aria-label]="title ?? 'Katalog'" #listbox>
452
+ <!-- Virtual spacers: the controller's px offsets — the binding applies them, no math. -->
453
+ @if (snapshot.virtual && snapshot.virtual.offsetTop > 0) {
454
+ <div class="bm-list__spacer" aria-hidden="true" [style.height.px]="snapshot.virtual.offsetTop"></div>
455
+ }
456
+ @for (r of renderedRows; track r.item.id) {
457
+ <div
458
+ [class]="rowClass(r)"
459
+ [attr.data-item-id]="r.item.id"
460
+ role="option"
461
+ [attr.aria-selected]="r.selected"
462
+ [attr.aria-disabled]="r.item.disabled ? 'true' : null"
463
+ [attr.tabindex]="r.item.id === snapshot.navAnchor ? 0 : -1"
464
+ (pointerdown)="onRowPointerDown($event, r.item.id)"
465
+ (click)="onRowClick($event, r.item.id)"
466
+ (dblclick)="ctrl.startEdit(r.item.id)">
467
+ <span class="bm-list__handle" aria-hidden="true">⠿</span>
468
+ @if (snapshot.editing?.itemId === r.item.id) {
469
+ <!-- In-place editor: controlled by snapshot.editing.draft (so it survives
470
+ re-render). No blur-commit — Enter commits, Escape cancels (handled by
471
+ the root keydown). stopPropagation keeps input clicks from re-selecting
472
+ / arming a drag on the row. -->
473
+ <input
474
+ bmListAutofocus
475
+ #editInput
476
+ class="bm-list__edit"
477
+ [value]="snapshot.editing!.draft"
478
+ [attr.placeholder]="locale.titlePlaceholder"
479
+ (input)="onDraft($event)"
480
+ (keydown)="onEditKeydown($event)"
481
+ (focus)="onEditFocus($event)"
482
+ (click)="$event.stopPropagation()"
483
+ (pointerdown)="$event.stopPropagation()" />
484
+ } @else {
485
+ @if (r.item.icon) { <span class="bm-list__icon" aria-hidden="true">{{ r.item.icon }}</span> }
486
+ <span class="bm-list__text">
487
+ <span class="bm-list__label">{{ r.item.label }}</span>
488
+ @if (r.item.description) { <span class="bm-list__secondary">{{ r.item.description }}</span> }
489
+ </span>
490
+ @if (r.item.badge) { <span class="bm-list__badge">{{ r.item.badge }}</span> }
491
+ }
492
+ </div>
493
+ }
494
+ @if (snapshot.virtual && snapshot.virtual.offsetBottom > 0) {
495
+ <div class="bm-list__spacer" aria-hidden="true" [style.height.px]="snapshot.virtual.offsetBottom"></div>
496
+ }
497
+ </div>
498
+
499
+ @if (snapshot.lastAction; as undo) {
500
+ <div class="bm-list__toast" role="status">
501
+ <span class="bm-list__toast-msg">{{ undo.description }}</span>
502
+ <button class="bm-list__toast-dismiss" type="button" (click)="onDismiss()">×</button>
503
+ </div>
504
+ }
505
+ </div>
506
+ `,
507
+ }]
508
+ }], null, { store: [{
509
+ type: Input,
510
+ args: [{ required: true }]
511
+ }], listId: [{
512
+ type: Input,
513
+ args: [{ required: true }]
514
+ }], config: [{
515
+ type: Input
516
+ }], darkMode: [{
517
+ type: Input
518
+ }], title: [{
519
+ type: Input
520
+ }], tag: [{
521
+ type: Input
522
+ }], onError: [{
523
+ type: Input
524
+ }], listRef: [{
525
+ type: ViewChild,
526
+ args: ['listbox']
527
+ }] }); })();
528
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(List, { className: "List", filePath: "components/list.ts", lineNumber: 125 }); })();
529
+ //# sourceMappingURL=List.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.js","sourceRoot":"","sources":["../../src/components/List.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,SAAS,EAAE,UAAU,EAAmC,SAAS,EAAE,KAAK,EACnF,uBAAuB,EAAE,MAAM,EAAE,MAAM,GACxC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAKrD,OAAO,EACL,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;;;;;;IA2ChB,6BAA2B;IAAA,YAAW;IAAA,iBAAK;;;IAAhB,cAAW;IAAX,kCAAW;;;IAGtC,+BAA2B;IAAA,YAAS;IAAA,iBAAO;;;IAAhB,cAAS;IAAT,gCAAS;;;IAYpC,0BAAqG;;;IAArD,iEAA8C;;;;IAmB1F,oCAU6C;IAA3C,AADA,AADA,AADA,AADA,qLAAS,sBAAe,KAAC,4KACd,4BAAqB,KAAC,wKACxB,0BAAmB,KAAC,oIACpB,wBAAwB,KAAC,gJACnB,wBAAwB,KAAC;IAV1C,iBAU6C;;;IAN3C,qDAAiC;;;;IAQf,gCAA+C;IAAA,YAAiB;IAAA,iBAAO;;;IAAxB,cAAiB;IAAjB,oCAAiB;;;IAGvD,gCAAiC;IAAA,YAAwB;IAAA,iBAAO;;;IAA/B,cAAwB;IAAxB,2CAAwB;;;IAEjE,gCAA6B;IAAA,YAAkB;IAAA,iBAAO;;;IAAzB,cAAkB;IAAlB,qCAAkB;;;IALpE,oFAAmB;IAEjB,AADF,gCAA4B,eACG;IAAA,YAAkB;IAAA,iBAAO;IACtD,oFAA0B;IAC5B,iBAAO;IACP,oFAAoB;;;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E,QAAQ,EAAE,IAAI,EAAE;YAChB,MAAM;kBAAd,KAAK;YACG,QAAQ;kBAAhB,KAAK;YAEG,KAAK;kBAAb,KAAK;YAEG,GAAG;kBAAX,KAAK;YAGG,OAAO;kBAAf,KAAK;YAOgB,OAAO;kBAA5B,SAAS;mBAAC,SAAS;;kFAlBT,IAAI"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @module @bimetal/list-angular-components
3
+ *
4
+ * The default Angular list / catalog — a thin, standalone-component binding over
5
+ * the canonical `@bimetal/list-headless` controller (instance #7 of the shipped
6
+ * component family). Multi-select, batch reorder (keyboard + pointer drag), batch
7
+ * delete, rename, undo. The controller owns every interaction decision; the
8
+ * component renders the canonical `.bm-list*` DOM with ARIA listbox roles and
9
+ * forwards normalized pointer/keyboard events. Styles ship from
10
+ * `@bimetal/list-themes`.
11
+ */
12
+ export { List } from './components/List.js';
13
+ export * from '@bimetal/angular';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG5C,cAAc,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @module @bimetal/list-angular-components
3
+ *
4
+ * The default Angular list / catalog — a thin, standalone-component binding over
5
+ * the canonical `@bimetal/list-headless` controller (instance #7 of the shipped
6
+ * component family). Multi-select, batch reorder (keyboard + pointer drag), batch
7
+ * delete, rename, undo. The controller owns every interaction decision; the
8
+ * component renders the canonical `.bm-list*` DOM with ARIA listbox roles and
9
+ * forwards normalized pointer/keyboard events. Styles ship from
10
+ * `@bimetal/list-themes`.
11
+ */
12
+ // ── Main Component ──────────────────────────────────────────────
13
+ export { List } from './components/List.js';
14
+ // ── Re-export the generic Angular list binding for convenience ──
15
+ export * from '@bimetal/angular';
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,mEAAmE;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,mEAAmE;AACnE,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ @import '@bimetal/list-themes';
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@bimetal/list-angular-components",
3
+ "version": "0.29.0",
4
+ "description": "Angular list / catalog — multi-select, batch reorder (keyboard + pointer drag), batch delete, rename, undo, theming.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./styles": "./dist/styles/index.css"
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "scripts": {
21
+ "build": "ngc -p tsconfig.json && node scripts/copy-css.mjs",
22
+ "typecheck": "ngc -p tsconfig.json --noEmit",
23
+ "test": "vitest run",
24
+ "prepublishOnly": "npm run build"
25
+ },
26
+ "dependencies": {
27
+ "@bimetal/angular": "^0.29.0",
28
+ "@bimetal/list-data": "^0.29.0",
29
+ "@bimetal/list-headless": "^0.29.0",
30
+ "@bimetal/list-themes": "^0.29.0"
31
+ },
32
+ "peerDependencies": {
33
+ "@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",
34
+ "@angular/common": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0"
35
+ },
36
+ "devDependencies": {
37
+ "@angular/common": "^19.2.0",
38
+ "@angular/compiler": "^19.2.0",
39
+ "@angular/compiler-cli": "^19.2.0",
40
+ "@angular/core": "^19.2.0",
41
+ "@angular/forms": "^19.2.0",
42
+ "@angular/platform-browser": "^19.2.0",
43
+ "happy-dom": "^18.0.1",
44
+ "typescript": "~5.8.3",
45
+ "vitest": "^3.2.4"
46
+ },
47
+ "sideEffects": [
48
+ "**/*.css"
49
+ ],
50
+ "license": "PolyForm-Noncommercial-1.0.0",
51
+ "author": "Andreas Biederbeck",
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "https://github.com/bimetal/bimetal.git",
55
+ "directory": "packages/list/list-angular-components"
56
+ },
57
+ "keywords": [
58
+ "list",
59
+ "catalog",
60
+ "angular",
61
+ "components",
62
+ "multi-select",
63
+ "reorder"
64
+ ]
65
+ }