@nanahoshi/mona-ui 0.22.1 → 0.23.1
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/nanahoshi-mona-ui-dropdown-list.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-CIMXz60d.mjs +169 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-CpeheGXU.mjs +176 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DZDeYdqc.mjs → nanahoshi-mona-ui-grid-grid-row.component-B_5ay_Nz.mjs} +201 -192
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-BzKywU5b.mjs +173 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C_mj53LF.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-IewqeT4m.mjs} +554 -667
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +47 -7
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +386 -180
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +266 -99
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +35 -32
- package/fesm2022/nanahoshi-mona-ui-locales.mjs +13 -0
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1 -1
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-grid.d.ts +126 -26
- package/types/nanahoshi-mona-ui-i18n.d.ts +1 -0
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +35 -1
- package/types/nanahoshi-mona-ui-internal-list.d.ts +82 -16
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +50 -3
- package/types/nanahoshi-mona-ui-internal.d.ts +18 -4
- package/types/nanahoshi-mona-ui-locales.d.ts +13 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-cell.component-blRlw0Ie.mjs +0 -108
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Cviex3cR.mjs +0 -44
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-H38ZTj-_.mjs +0 -164
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-b1W7r45p.mjs +0 -239
|
@@ -10,10 +10,21 @@ import { Subject, ReplaySubject } from 'rxjs';
|
|
|
10
10
|
interface ListItemOptions<T> {
|
|
11
11
|
data: T;
|
|
12
12
|
header?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Marks the item as a group header. Defaults to `true` when a non-empty `header` is given.
|
|
15
|
+
* Set it explicitly for groups whose key is empty, which still need a header row.
|
|
16
|
+
*/
|
|
17
|
+
isHeader?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Reuses an existing identifier, so an item rebuilt for refreshed data keeps its DOM id and tracking.
|
|
20
|
+
* A new UUID is generated when omitted.
|
|
21
|
+
*/
|
|
22
|
+
uid?: string;
|
|
13
23
|
}
|
|
14
24
|
declare class ListItem<TData> {
|
|
15
25
|
readonly data: TData;
|
|
16
26
|
readonly header: string;
|
|
27
|
+
readonly isHeader: boolean;
|
|
17
28
|
readonly uid: string;
|
|
18
29
|
constructor(options: ListItemOptions<TData>);
|
|
19
30
|
}
|
|
@@ -108,11 +119,27 @@ declare class ListService<TData> {
|
|
|
108
119
|
readonly focus$: Subject<void>;
|
|
109
120
|
readonly focusableItem: _angular_core.Signal<ListItem<TData> | null>;
|
|
110
121
|
readonly groupBy: _angular_core.WritableSignal<ListKeySelector<TData>>;
|
|
122
|
+
/**
|
|
123
|
+
* Maps each option uid to the uid of the group header it is listed under.
|
|
124
|
+
*/
|
|
125
|
+
readonly groupHeaderUids: _angular_core.Signal<Map<string, string>>;
|
|
111
126
|
readonly groupableOptions: _angular_core.WritableSignal<GroupableOptions<TData, any>>;
|
|
127
|
+
/**
|
|
128
|
+
* The highlighted (active) item. When the data changes, it is re-resolved to the item with the same `uid`,
|
|
129
|
+
* or cleared when that item is gone.
|
|
130
|
+
*/
|
|
112
131
|
readonly highlightedItem: _angular_core.WritableSignal<ListItem<TData> | null>;
|
|
113
132
|
readonly itemFocusOut$: Subject<ListItem<TData>>;
|
|
114
|
-
|
|
133
|
+
/**
|
|
134
|
+
* Position of each option among all filtered options (not only the current page), for `aria-posinset`
|
|
135
|
+
* and `aria-setsize`.
|
|
136
|
+
*/
|
|
137
|
+
readonly itemPositions: _angular_core.Signal<Map<string, {
|
|
138
|
+
position: number;
|
|
139
|
+
total: number;
|
|
140
|
+
}>>;
|
|
115
141
|
readonly navigableOptions: _angular_core.WritableSignal<NavigableOptions>;
|
|
142
|
+
readonly navigatedItem$: Subject<ListItem<TData> | null>;
|
|
116
143
|
readonly pageState: _angular_core.WritableSignal<PageState>;
|
|
117
144
|
readonly pageableOptions: _angular_core.WritableSignal<PagerSettings>;
|
|
118
145
|
readonly scrollToItem$: ReplaySubject<{
|
|
@@ -126,16 +153,20 @@ declare class ListService<TData> {
|
|
|
126
153
|
readonly selectionChange$: Subject<ListItem<TData>>;
|
|
127
154
|
readonly textField: _angular_core.WritableSignal<string | Selector<TData, string>>;
|
|
128
155
|
readonly valueField: _angular_core.WritableSignal<string | Selector<TData, unknown>>;
|
|
156
|
+
/**
|
|
157
|
+
* Visible items in display order: filtered, ordered and grouped (with header rows), but not paged.
|
|
158
|
+
*/
|
|
129
159
|
readonly viewItems: _angular_core.Signal<ImmutableSet<ListItem<TData>>>;
|
|
130
160
|
readonly virtualScrollOptions: _angular_core.WritableSignal<VirtualScrollOptions>;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
161
|
+
clearFilter(): void;
|
|
162
|
+
clearHighlightedItem(): void;
|
|
163
|
+
clearSelections(): void;
|
|
164
|
+
/**
|
|
165
|
+
* Finds the next item whose text starts with the typeahead buffer, starting after the active item.
|
|
166
|
+
* Group headers and disabled items are never matched.
|
|
167
|
+
*/
|
|
168
|
+
cycleThroughMatchedItems(buffer: string): ListItem<TData> | null;
|
|
169
|
+
deselectItems(item: Iterable<ListItem<TData>>): void;
|
|
139
170
|
/**
|
|
140
171
|
* Resolves the selection value of a data item through `valueField`.
|
|
141
172
|
*
|
|
@@ -146,14 +177,25 @@ declare class ListService<TData> {
|
|
|
146
177
|
* Falsy results such as `0`, `false`, and `""` are valid values and do not fall back to the item.
|
|
147
178
|
*/
|
|
148
179
|
getDataItemValue(dataItem: TData): unknown;
|
|
149
|
-
clearFilter(): void;
|
|
150
|
-
clearHighlightedItem(): void;
|
|
151
|
-
clearSelections(): void;
|
|
152
|
-
cycleThroughMatchedItems(buffer: string): ListItem<TData> | null;
|
|
153
|
-
deselectItems(item: Iterable<ListItem<TData>>): void;
|
|
154
180
|
getFilterDebounceDuration(): number;
|
|
155
181
|
getGroupField(item: ListItem<TData>): any;
|
|
182
|
+
/**
|
|
183
|
+
* Returns the uid of the group header an item is rendered under, or `null` when the list is not grouped.
|
|
184
|
+
*/
|
|
185
|
+
getGroupHeaderUid(item: ListItem<TData>): string | null;
|
|
186
|
+
getItemPosition(item: ListItem<TData>): {
|
|
187
|
+
position: number;
|
|
188
|
+
total: number;
|
|
189
|
+
} | null;
|
|
190
|
+
/**
|
|
191
|
+
* Resolves the display text of an item through `textField`.
|
|
192
|
+
* Non-string field values (numbers, dates, …) are converted with `String()`, and nullish values become `""`.
|
|
193
|
+
*/
|
|
156
194
|
getItemText(item: ListItem<TData>): string;
|
|
195
|
+
/**
|
|
196
|
+
* Finds the item that typed text should resolve to: an exact text match first (respecting `caseSensitive`),
|
|
197
|
+
* otherwise the first item accepted by the filter operator. Group headers and disabled items are skipped.
|
|
198
|
+
*/
|
|
157
199
|
getMatchingFilteredItem(text: string): ListItem<TData> | null;
|
|
158
200
|
isDisabled(item: ListItem<TData>): boolean;
|
|
159
201
|
isFilteringEnabled(): boolean;
|
|
@@ -162,6 +204,11 @@ declare class ListService<TData> {
|
|
|
162
204
|
navigate(direction: NavigationDirection, mode: NavigationMode, focus: boolean): ListItem<TData> | null;
|
|
163
205
|
notifySelectionChange(item: ListItem<TData>): void;
|
|
164
206
|
scrollToItem(item: ListItem<TData>, focus: boolean): void;
|
|
207
|
+
/**
|
|
208
|
+
* Selects every enabled item currently in view, keeping existing selections. Only applies in multiple mode.
|
|
209
|
+
* @returns whether the selection changed.
|
|
210
|
+
*/
|
|
211
|
+
selectAllItems(): boolean;
|
|
165
212
|
selectItem(item: ListItem<TData>, scroll?: boolean, focus?: boolean): void;
|
|
166
213
|
setData(data: Iterable<TData>): void;
|
|
167
214
|
setDisabledBy(disabledBy: string | Predicate<TData>): void;
|
|
@@ -179,11 +226,16 @@ declare class ListService<TData> {
|
|
|
179
226
|
setValueField(valueField: string | Selector<TData, unknown>): void;
|
|
180
227
|
setVirtualScrollOptions(options: VirtualScrollOptions): void;
|
|
181
228
|
private filterItem;
|
|
229
|
+
/**
|
|
230
|
+
* Returns the item when it is one of the navigable items, otherwise `null`.
|
|
231
|
+
* An anchor that was filtered out or removed must not be navigated from.
|
|
232
|
+
*/
|
|
233
|
+
private getItemInView;
|
|
182
234
|
private getOrderKey;
|
|
183
235
|
private getPreviousItemForNavigation;
|
|
184
236
|
private getSelectionKey;
|
|
185
|
-
private navigateForMultipleSelection;
|
|
186
237
|
private navigateFirstForSingleSelection;
|
|
238
|
+
private navigateForMultipleSelection;
|
|
187
239
|
private navigateForSingleSelection;
|
|
188
240
|
private navigateLastForSingleSelection;
|
|
189
241
|
private navigateNextForSingleSelection;
|
|
@@ -196,7 +248,15 @@ declare class ListService<TData> {
|
|
|
196
248
|
declare class ListComponent<TData> implements OnInit {
|
|
197
249
|
#private;
|
|
198
250
|
private readonly filterInput;
|
|
251
|
+
/**
|
|
252
|
+
* Id of the highlighted option, used as `aria-activedescendant` by the filter input.
|
|
253
|
+
*/
|
|
254
|
+
protected readonly activeDescendant: Signal<string | null>;
|
|
199
255
|
protected readonly classes: Signal<string>;
|
|
256
|
+
/**
|
|
257
|
+
* The `listId` input, or a generated id so the listbox can always be referenced by `aria-controls`.
|
|
258
|
+
*/
|
|
259
|
+
protected readonly effectiveListId: Signal<string>;
|
|
200
260
|
protected readonly footerTemplate: Signal<TemplateRef<any> | undefined>;
|
|
201
261
|
protected readonly groupHeaderClasses: Signal<string>;
|
|
202
262
|
protected readonly groupHeaderTemplate: Signal<TemplateRef<any> | undefined>;
|
|
@@ -235,10 +295,16 @@ declare class ListComponent<TData> implements OnInit {
|
|
|
235
295
|
constructor();
|
|
236
296
|
ngOnInit(): void;
|
|
237
297
|
protected onFilterChange(event: FilterChangeEvent): void;
|
|
238
|
-
protected onListItemCheck(item: ListItem<TData>): void;
|
|
239
298
|
protected onListItemClick(item: ListItem<TData>): void;
|
|
299
|
+
protected trackByUid(_: number, item: ListItem<TData>): string;
|
|
240
300
|
private cycleThroughMatchedItems;
|
|
241
301
|
private focusToItem;
|
|
302
|
+
/**
|
|
303
|
+
* Handles multiple-selection shortcuts from the WAI-ARIA listbox pattern:
|
|
304
|
+
* Space toggles the highlighted option and Ctrl/Cmd+A selects every enabled option.
|
|
305
|
+
* @returns whether the event was handled.
|
|
306
|
+
*/
|
|
307
|
+
private handleMultipleSelectionKeys;
|
|
242
308
|
private handleNavigation;
|
|
243
309
|
private handlePageScroll;
|
|
244
310
|
private scrollToItem;
|
|
@@ -67,6 +67,11 @@ declare class TreeNode<T> {
|
|
|
67
67
|
readonly data: T;
|
|
68
68
|
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
69
69
|
readonly uid: string;
|
|
70
|
+
/**
|
|
71
|
+
* Whether children from an asynchronous children selector have been loaded. Loaded children are cached,
|
|
72
|
+
* so collapsing and re-expanding the node does not request them again.
|
|
73
|
+
*/
|
|
74
|
+
childrenLoaded: boolean;
|
|
70
75
|
index: string;
|
|
71
76
|
parent: TreeNode<T> | null;
|
|
72
77
|
constructor(data: T);
|
|
@@ -269,6 +274,15 @@ declare class TreeService<T> {
|
|
|
269
274
|
static flatten<T>(nodes: Iterable<TreeNode<T>>): List<TreeNode<T>>;
|
|
270
275
|
clearFilter(): void;
|
|
271
276
|
detachNode(node: TreeNode<T>): void;
|
|
277
|
+
/**
|
|
278
|
+
* Expands every expandable, enabled sibling of a node (the `*` key of the WAI-ARIA tree pattern).
|
|
279
|
+
*/
|
|
280
|
+
expandSiblings(node: TreeNode<T>): void;
|
|
281
|
+
/**
|
|
282
|
+
* Finds the next visible node, after the navigated node and wrapping around, whose text starts with `prefix`
|
|
283
|
+
* (case-insensitive). Used for typeahead.
|
|
284
|
+
*/
|
|
285
|
+
findNodeByText(prefix: string): TreeNode<T> | null;
|
|
272
286
|
getNodeByUid(uid: string): TreeNode<T> | null;
|
|
273
287
|
getNodeElementId(uid: string): string;
|
|
274
288
|
getNodeText(node: TreeNode<T>): string;
|
|
@@ -283,7 +297,15 @@ declare class TreeService<T> {
|
|
|
283
297
|
isSelected(node: TreeNode<T>): boolean;
|
|
284
298
|
isTreeFiltered(): boolean;
|
|
285
299
|
isVisible(node: TreeNode<T>): boolean;
|
|
286
|
-
|
|
300
|
+
/**
|
|
301
|
+
* Loads the children of a node from an asynchronous children selector.
|
|
302
|
+
* Children are loaded once and cached; pass `reload` to request them again. A new load cancels a pending one.
|
|
303
|
+
*/
|
|
304
|
+
loadNodeChildren(node: TreeNode<T>, reload?: boolean): void;
|
|
305
|
+
/**
|
|
306
|
+
* Moves a node relative to a target node. Moving a node onto itself or into its own subtree is ignored,
|
|
307
|
+
* because it would detach the subtree and create a parent cycle.
|
|
308
|
+
*/
|
|
287
309
|
moveNode(sourceNode: TreeNode<T>, targetNode: TreeNode<T>, position: DropPosition): void;
|
|
288
310
|
navigate(direction: "next" | "previous" | "first" | "last"): TreeNode<T> | null;
|
|
289
311
|
notifySelectionChange(node: TreeNode<T>): void;
|
|
@@ -314,21 +336,40 @@ declare class TreeService<T> {
|
|
|
314
336
|
setSelectedDataItems(dataItems: Iterable<T>): void;
|
|
315
337
|
setSelectedKeys(keys: Iterable<any>): void;
|
|
316
338
|
setTextField(selector: string | Selector<T, string>): void;
|
|
339
|
+
/**
|
|
340
|
+
* Expands or collapses a node the way user interaction does: disabled nodes are left alone, children of an
|
|
341
|
+
* asynchronous children selector are loaded on first expand, and `nodeExpand$` is notified.
|
|
342
|
+
* @returns whether the expand state changed.
|
|
343
|
+
*/
|
|
344
|
+
toggleNodeExpand(node: TreeNode<T>, expanded: boolean): boolean;
|
|
317
345
|
getCheckKey(node: TreeNode<T>): any;
|
|
318
346
|
getDisableKey(node: TreeNode<T>): any;
|
|
319
347
|
private applyCheckedKeysToNodes;
|
|
320
348
|
private computeVisibleUids;
|
|
321
349
|
private createFlatNodes;
|
|
350
|
+
/**
|
|
351
|
+
* Builds tree nodes for hierarchical data, reusing the existing node of each data item so node state survives
|
|
352
|
+
* a data refresh. A data object that appears more than once gets a node of its own for every extra occurrence.
|
|
353
|
+
*/
|
|
322
354
|
private createHierarchicalNodes;
|
|
323
355
|
private createNodeDictionary;
|
|
324
356
|
private createNodes;
|
|
357
|
+
/**
|
|
358
|
+
* The derived check state of a parent: `true` when all of its check-state children are checked,
|
|
359
|
+
* or `null` when it has none (its own state then stands).
|
|
360
|
+
*/
|
|
361
|
+
private deriveParentChecked;
|
|
362
|
+
/**
|
|
363
|
+
* Children that determine a parent's derived check state: those with a checkbox and, unless
|
|
364
|
+
* `checkDisabledChildren` is set, only enabled ones, because the user cannot change disabled children.
|
|
365
|
+
*/
|
|
366
|
+
private getCheckStateChildren;
|
|
325
367
|
private getExpandKey;
|
|
326
368
|
private getChildNodes;
|
|
327
369
|
private getDataItemSelectKey;
|
|
328
370
|
private getParentNodes;
|
|
329
371
|
private getSelectKey;
|
|
330
372
|
private isAnyParentCollapsed;
|
|
331
|
-
private isAnyParentDisabled;
|
|
332
373
|
private isFiltered;
|
|
333
374
|
private loadCheckedKeysForChildren;
|
|
334
375
|
private moveNodeAfter;
|
|
@@ -360,6 +401,7 @@ declare class TreeComponent<T> {
|
|
|
360
401
|
private setKeydownSubscription;
|
|
361
402
|
private setNodeDragHandlerSubscription;
|
|
362
403
|
private setSubscriptions;
|
|
404
|
+
private setTypeaheadSubscription;
|
|
363
405
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeComponent<any>, never>;
|
|
364
406
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TreeComponent<any>, "mona-tree", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, ["nodeTemplate"], never, true, never>;
|
|
365
407
|
}
|
|
@@ -378,6 +420,8 @@ declare const TREE_DEFAULT_MESSAGES: MonaTreeViewMessages;
|
|
|
378
420
|
* @param idKey - The property key used to uniquely identify each node (e.g., 'id').
|
|
379
421
|
* @param parentIdKey - The property key holding the parent node's id, or null for roots (e.g., 'parentId').
|
|
380
422
|
* @returns A new array representing the updated flat tree, with the moved node's parentIdKey updated.
|
|
423
|
+
* The array is returned unchanged when the position is "outside" or the target is the dragged node or one of its
|
|
424
|
+
* descendants, which would otherwise create a parent cycle.
|
|
381
425
|
*/
|
|
382
426
|
declare function moveFlatTreeNode<T extends Record<string, any>>(treeData: Iterable<T>, event: NodeDropEvent<T>, idKey: keyof T, parentIdKey: keyof T): T[];
|
|
383
427
|
|
|
@@ -387,7 +431,10 @@ declare function moveFlatTreeNode<T extends Record<string, any>>(treeData: Itera
|
|
|
387
431
|
* @param event - The drag-and-drop event payload.
|
|
388
432
|
* @param idKey - The property key used to identify nodes (e.g., 'id').
|
|
389
433
|
* @param childrenKey - The property key containing the nested items (e.g., 'items').
|
|
390
|
-
* @returns A new array representing the updated tree structure.
|
|
434
|
+
* @returns A new top-level array representing the updated tree structure.
|
|
435
|
+
* Nested children arrays are updated in place, so untouched data items keep their identity (and their tree state).
|
|
436
|
+
* The move is skipped, returning the tree unchanged, when the position is "outside", the target is missing,
|
|
437
|
+
* or the target is the dragged node or one of its descendants, so a node is never lost or made its own ancestor.
|
|
391
438
|
*/
|
|
392
439
|
declare function moveTreeNode<T extends Record<string, any>>(treeData: Iterable<T>, event: NodeDropEvent<T>, idKey: keyof T, childrenKey: keyof T): T[];
|
|
393
440
|
|
|
@@ -72,7 +72,8 @@ type Action<P = void, R = void> = (arg: P) => R;
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Generates a unique control ID for an element.
|
|
75
|
-
* The ID consists of
|
|
75
|
+
* The ID consists of the `mona-` prefix followed by a random hexadecimal string.
|
|
76
|
+
* It contains only characters that are safe in CSS selectors, so it can be used with `querySelector("#…")` unescaped.
|
|
76
77
|
* @param {number} [level=0] - The nesting level of the element. This increases the length of the generated ID.
|
|
77
78
|
* @param {number} [length=7] - The base length of the random part of the ID.
|
|
78
79
|
* @returns {string} A unique control ID string for use for elements.
|
|
@@ -99,12 +100,12 @@ declare const themeOverlaySurfaceClasses = "\n [background-color:var(--mona-e
|
|
|
99
100
|
declare const restoreOverlayScroll: (overlayRef: OverlayRef, element: HTMLElement) => void;
|
|
100
101
|
|
|
101
102
|
interface WindowStyleSettings {
|
|
103
|
+
left?: number;
|
|
102
104
|
maxHeight?: number;
|
|
103
105
|
maxWidth?: number;
|
|
104
106
|
minHeight?: number;
|
|
105
107
|
minWidth?: number;
|
|
106
108
|
top?: number;
|
|
107
|
-
left?: number;
|
|
108
109
|
windowClass?: string | string[];
|
|
109
110
|
}
|
|
110
111
|
declare const setWindowStyles: (element: HTMLElement, settings: WindowStyleSettings) => void;
|
|
@@ -136,8 +137,21 @@ declare enum NavigationKeys {
|
|
|
136
137
|
declare const NavigationKeysList: string[];
|
|
137
138
|
declare const isNavigationKey: (key: string) => boolean;
|
|
138
139
|
|
|
139
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Modifier state of a keyboard event. Typeahead is skipped while Ctrl, Meta or Alt is held,
|
|
142
|
+
* so shortcuts such as Ctrl+A or Cmd+C keep their default behavior.
|
|
143
|
+
*/
|
|
144
|
+
interface TypeaheadModifiers {
|
|
145
|
+
readonly altKey?: boolean;
|
|
146
|
+
readonly ctrlKey?: boolean;
|
|
147
|
+
readonly metaKey?: boolean;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Returns whether a `KeyboardEvent.key` value should feed typeahead.
|
|
151
|
+
* Any single letter or digit in any script counts, plus space, `-` and `_`.
|
|
152
|
+
*/
|
|
153
|
+
declare const isTypeaheadKey: (key: string, modifiers?: TypeaheadModifiers) => boolean;
|
|
140
154
|
declare const setupTypeahead: (typeaheadKey$: Observable<string>) => Observable<string>;
|
|
141
155
|
|
|
142
156
|
export { AttributeBinderDirective, NavigationKeys, NavigationKeysList, createElementControlId, focusElement, hex2rgba, hsla2hsva, hsva2rgba, isNavigationKey, isTypeaheadKey, isValidHex, isValidHsla, isValidRgb, restoreOverlayScroll, rgba2hex, rgba2hsla, rgba2hsva, rxFromResize, rxTimeout, setWindowStyles, setupTypeahead, string2Hsla, string2rgba, themeControlBackdropClasses, themeControlSurfaceClasses, themeOverlayBackdropClasses, themeOverlaySurfaceClasses, themeRaisedBackdropClasses, themeRaisedSurfaceClasses, toCssValue };
|
|
143
|
-
export type { Action, AttributeConfig, Channel, ColorScheme, HSL, HSLA, HSV, HSVA, HSVChannel, RGB, RGBA, RGBAChannel, RGBChannel, VariantInputs, WindowStyleSettings };
|
|
157
|
+
export type { Action, AttributeConfig, Channel, ColorScheme, HSL, HSLA, HSV, HSVA, HSVChannel, RGB, RGBA, RGBAChannel, RGBChannel, TypeaheadModifiers, VariantInputs, WindowStyleSettings };
|
|
@@ -239,6 +239,7 @@ declare const MONA_AR_SA_LOCALE: {
|
|
|
239
239
|
selectRow: (rowNumber: number) => string;
|
|
240
240
|
};
|
|
241
241
|
list: {
|
|
242
|
+
filterList: string;
|
|
242
243
|
noData: string;
|
|
243
244
|
};
|
|
244
245
|
listBox: {
|
|
@@ -616,6 +617,7 @@ declare const MONA_ES_ES_LOCALE: {
|
|
|
616
617
|
selectRow: (rowNumber: number) => string;
|
|
617
618
|
};
|
|
618
619
|
list: {
|
|
620
|
+
filterList: string;
|
|
619
621
|
noData: string;
|
|
620
622
|
};
|
|
621
623
|
listBox: {
|
|
@@ -993,6 +995,7 @@ declare const MONA_DE_DE_LOCALE: {
|
|
|
993
995
|
selectRow: (rowNumber: number) => string;
|
|
994
996
|
};
|
|
995
997
|
list: {
|
|
998
|
+
filterList: string;
|
|
996
999
|
noData: string;
|
|
997
1000
|
};
|
|
998
1001
|
listBox: {
|
|
@@ -1370,6 +1373,7 @@ declare const MONA_FR_FR_LOCALE: {
|
|
|
1370
1373
|
selectRow: (rowNumber: number) => string;
|
|
1371
1374
|
};
|
|
1372
1375
|
list: {
|
|
1376
|
+
filterList: string;
|
|
1373
1377
|
noData: string;
|
|
1374
1378
|
};
|
|
1375
1379
|
listBox: {
|
|
@@ -1747,6 +1751,7 @@ declare const MONA_IT_IT_LOCALE: {
|
|
|
1747
1751
|
selectRow: (rowNumber: number) => string;
|
|
1748
1752
|
};
|
|
1749
1753
|
list: {
|
|
1754
|
+
filterList: string;
|
|
1750
1755
|
noData: string;
|
|
1751
1756
|
};
|
|
1752
1757
|
listBox: {
|
|
@@ -2124,6 +2129,7 @@ declare const MONA_JA_JP_LOCALE: {
|
|
|
2124
2129
|
selectRow: (rowNumber: number) => string;
|
|
2125
2130
|
};
|
|
2126
2131
|
list: {
|
|
2132
|
+
filterList: string;
|
|
2127
2133
|
noData: string;
|
|
2128
2134
|
};
|
|
2129
2135
|
listBox: {
|
|
@@ -2501,6 +2507,7 @@ declare const MONA_KO_KR_LOCALE: {
|
|
|
2501
2507
|
selectRow: (rowNumber: number) => string;
|
|
2502
2508
|
};
|
|
2503
2509
|
list: {
|
|
2510
|
+
filterList: string;
|
|
2504
2511
|
noData: string;
|
|
2505
2512
|
};
|
|
2506
2513
|
listBox: {
|
|
@@ -2878,6 +2885,7 @@ declare const MONA_PT_BR_LOCALE: {
|
|
|
2878
2885
|
selectRow: (rowNumber: number) => string;
|
|
2879
2886
|
};
|
|
2880
2887
|
list: {
|
|
2888
|
+
filterList: string;
|
|
2881
2889
|
noData: string;
|
|
2882
2890
|
};
|
|
2883
2891
|
listBox: {
|
|
@@ -3255,6 +3263,7 @@ declare const MONA_ZH_CN_LOCALE: {
|
|
|
3255
3263
|
selectRow: (rowNumber: number) => string;
|
|
3256
3264
|
};
|
|
3257
3265
|
list: {
|
|
3266
|
+
filterList: string;
|
|
3258
3267
|
noData: string;
|
|
3259
3268
|
};
|
|
3260
3269
|
listBox: {
|
|
@@ -3632,6 +3641,7 @@ declare const MONA_ZH_TW_LOCALE: {
|
|
|
3632
3641
|
selectRow: (rowNumber: number) => string;
|
|
3633
3642
|
};
|
|
3634
3643
|
list: {
|
|
3644
|
+
filterList: string;
|
|
3635
3645
|
noData: string;
|
|
3636
3646
|
};
|
|
3637
3647
|
listBox: {
|
|
@@ -4009,6 +4019,7 @@ declare const MONA_TR_TR_LOCALE: {
|
|
|
4009
4019
|
selectRow: (rowNumber: number) => string;
|
|
4010
4020
|
};
|
|
4011
4021
|
list: {
|
|
4022
|
+
filterList: string;
|
|
4012
4023
|
noData: string;
|
|
4013
4024
|
};
|
|
4014
4025
|
listBox: {
|
|
@@ -4386,6 +4397,7 @@ declare const MONA_ID_ID_LOCALE: {
|
|
|
4386
4397
|
selectRow: (rowNumber: number) => string;
|
|
4387
4398
|
};
|
|
4388
4399
|
list: {
|
|
4400
|
+
filterList: string;
|
|
4389
4401
|
noData: string;
|
|
4390
4402
|
};
|
|
4391
4403
|
listBox: {
|
|
@@ -4763,6 +4775,7 @@ declare const MONA_RU_RU_LOCALE: {
|
|
|
4763
4775
|
selectRow: (rowNumber: number) => string;
|
|
4764
4776
|
};
|
|
4765
4777
|
list: {
|
|
4778
|
+
filterList: string;
|
|
4766
4779
|
noData: string;
|
|
4767
4780
|
};
|
|
4768
4781
|
listBox: {
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
-
import { ImmutableDictionary } from '@mirei/ts-collections';
|
|
5
|
-
import { c as GridService } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C_mj53LF.mjs';
|
|
6
|
-
|
|
7
|
-
class GridFooterCellComponent {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.#gridService = inject(GridService);
|
|
10
|
-
this.aggregate = computed(() => {
|
|
11
|
-
const field = this.column().field;
|
|
12
|
-
const groupKey = this.groupKey();
|
|
13
|
-
if (groupKey == null) {
|
|
14
|
-
return this.aggregateMap().get(field) ?? null;
|
|
15
|
-
}
|
|
16
|
-
return this.#gridService.groupAggregateMap().get(groupKey)?.aggregates.get(field) ?? null;
|
|
17
|
-
}, /* @ts-ignore */
|
|
18
|
-
...(ngDevMode ? [{ debugName: "aggregate" }] : /* istanbul ignore next */ []));
|
|
19
|
-
this.aggregateMap = computed(() => {
|
|
20
|
-
const groupKey = this.groupKey();
|
|
21
|
-
if (groupKey == null) {
|
|
22
|
-
return this.#gridService.aggregateMap();
|
|
23
|
-
}
|
|
24
|
-
return (this.#gridService.groupAggregateMap().get(groupKey)?.aggregates ??
|
|
25
|
-
ImmutableDictionary.create());
|
|
26
|
-
}, /* @ts-ignore */
|
|
27
|
-
...(ngDevMode ? [{ debugName: "aggregateMap" }] : /* istanbul ignore next */ []));
|
|
28
|
-
this.displayValue = computed(() => {
|
|
29
|
-
return this.#gridService.resolveAggregateValue(this.aggregate(), this.column().aggregate);
|
|
30
|
-
}, /* @ts-ignore */
|
|
31
|
-
...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
|
|
32
|
-
this.templateContext = computed(() => {
|
|
33
|
-
const column = this.column();
|
|
34
|
-
const columnIndex = this.columnIndex();
|
|
35
|
-
const aggregate = this.aggregate();
|
|
36
|
-
const aggregates = this.aggregateMap().toObject(e => e.key, e => e.value);
|
|
37
|
-
const value = this.displayValue();
|
|
38
|
-
const groupKey = this.groupKey();
|
|
39
|
-
if (groupKey == null) {
|
|
40
|
-
return {
|
|
41
|
-
$implicit: value,
|
|
42
|
-
aggregate,
|
|
43
|
-
aggregates,
|
|
44
|
-
column,
|
|
45
|
-
columnIndex,
|
|
46
|
-
rows: this.#gridService.aggregateRows()
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
const groupFooterAggregate = this.#gridService.groupAggregateMap().get(groupKey);
|
|
50
|
-
return {
|
|
51
|
-
$implicit: value,
|
|
52
|
-
aggregate,
|
|
53
|
-
aggregates,
|
|
54
|
-
column,
|
|
55
|
-
columnIndex,
|
|
56
|
-
count: groupFooterAggregate?.count ?? 0,
|
|
57
|
-
depth: groupFooterAggregate?.depth ?? 0,
|
|
58
|
-
groupKey,
|
|
59
|
-
groupValue: groupFooterAggregate?.groupValue,
|
|
60
|
-
rows: groupFooterAggregate?.rows ?? []
|
|
61
|
-
};
|
|
62
|
-
}, /* @ts-ignore */
|
|
63
|
-
...(ngDevMode ? [{ debugName: "templateContext" }] : /* istanbul ignore next */ []));
|
|
64
|
-
this.templateRef = computed(() => {
|
|
65
|
-
if (this.groupKey() != null) {
|
|
66
|
-
return this.column().groupFooterTemplate;
|
|
67
|
-
}
|
|
68
|
-
return this.column().footerTemplate;
|
|
69
|
-
}, /* @ts-ignore */
|
|
70
|
-
...(ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []));
|
|
71
|
-
this.column = input.required(/* @ts-ignore */
|
|
72
|
-
...(ngDevMode ? [{ debugName: "column" }] : /* istanbul ignore next */ []));
|
|
73
|
-
this.columnIndex = input.required(/* @ts-ignore */
|
|
74
|
-
...(ngDevMode ? [{ debugName: "columnIndex" }] : /* istanbul ignore next */ []));
|
|
75
|
-
this.groupKey = input(null, /* @ts-ignore */
|
|
76
|
-
...(ngDevMode ? [{ debugName: "groupKey" }] : /* istanbul ignore next */ []));
|
|
77
|
-
}
|
|
78
|
-
#gridService;
|
|
79
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFooterCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
80
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridFooterCellComponent, isStandalone: true, selector: "mona-grid-footer-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, columnIndex: { classPropertyName: "columnIndex", publicName: "columnIndex", isSignal: true, isRequired: true, transformFunction: null }, groupKey: { classPropertyName: "groupKey", publicName: "groupKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "flex items-center h-full" }, ngImport: i0, template: `
|
|
81
|
-
@if (templateRef(); as templateRef) {
|
|
82
|
-
<ng-container [ngTemplateOutlet]="templateRef" [ngTemplateOutletContext]="templateContext()"></ng-container>
|
|
83
|
-
} @else if (displayValue() != null) {
|
|
84
|
-
<span class="block truncate font-medium">{{ displayValue() }}</span>
|
|
85
|
-
}
|
|
86
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
87
|
-
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFooterCellComponent, decorators: [{
|
|
89
|
-
type: Component,
|
|
90
|
-
args: [{
|
|
91
|
-
selector: "mona-grid-footer-cell",
|
|
92
|
-
template: `
|
|
93
|
-
@if (templateRef(); as templateRef) {
|
|
94
|
-
<ng-container [ngTemplateOutlet]="templateRef" [ngTemplateOutletContext]="templateContext()"></ng-container>
|
|
95
|
-
} @else if (displayValue() != null) {
|
|
96
|
-
<span class="block truncate font-medium">{{ displayValue() }}</span>
|
|
97
|
-
}
|
|
98
|
-
`,
|
|
99
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
100
|
-
imports: [NgTemplateOutlet],
|
|
101
|
-
host: {
|
|
102
|
-
class: "flex items-center h-full"
|
|
103
|
-
}
|
|
104
|
-
}]
|
|
105
|
-
}], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], columnIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnIndex", required: true }] }], groupKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupKey", required: false }] }] } });
|
|
106
|
-
|
|
107
|
-
export { GridFooterCellComponent };
|
|
108
|
-
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-cell.component-blRlw0Ie.mjs.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, computed, input, Directive } from '@angular/core';
|
|
3
|
-
import { c as GridService, A as gridFooterTableCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C_mj53LF.mjs';
|
|
4
|
-
|
|
5
|
-
class GridFooterTableCellDirective {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.#gridService = inject(GridService, { optional: true });
|
|
8
|
-
this.className = computed(() => {
|
|
9
|
-
return (gridFooterTableCellThemeVariants() +
|
|
10
|
-
(this.#gridService?.virtualScrollOptions().enabled
|
|
11
|
-
? " h-(--mona-grid-row-height) max-h-(--mona-grid-row-height) overflow-hidden py-0! align-middle"
|
|
12
|
-
: ""));
|
|
13
|
-
}, /* @ts-ignore */
|
|
14
|
-
...(ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []));
|
|
15
|
-
this.minWidth = computed(() => this.footerColumn()?.minWidth ?? this.footerCellMinWidth(), /* @ts-ignore */
|
|
16
|
-
...(ngDevMode ? [{ debugName: "minWidth" }] : /* istanbul ignore next */ []));
|
|
17
|
-
this.width = computed(() => this.footerColumn()?.calculatedWidth ?? this.footerCellWidth(), /* @ts-ignore */
|
|
18
|
-
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
19
|
-
this.footerCellMinWidth = input(null, /* @ts-ignore */
|
|
20
|
-
...(ngDevMode ? [{ debugName: "footerCellMinWidth" }] : /* istanbul ignore next */ []));
|
|
21
|
-
this.footerCellWidth = input(null, /* @ts-ignore */
|
|
22
|
-
...(ngDevMode ? [{ debugName: "footerCellWidth" }] : /* istanbul ignore next */ []));
|
|
23
|
-
this.footerColumn = input(null, /* @ts-ignore */
|
|
24
|
-
...(ngDevMode ? [{ debugName: "footerColumn" }] : /* istanbul ignore next */ []));
|
|
25
|
-
}
|
|
26
|
-
#gridService;
|
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFooterTableCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
28
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridFooterTableCellDirective, isStandalone: true, selector: "td[monaGridFooterTableCell]", inputs: { footerCellMinWidth: { classPropertyName: "footerCellMinWidth", publicName: "footerCellMinWidth", isSignal: true, isRequired: false, transformFunction: null }, footerCellWidth: { classPropertyName: "footerCellWidth", publicName: "footerCellWidth", isSignal: true, isRequired: false, transformFunction: null }, footerColumn: { classPropertyName: "footerColumn", publicName: "footerColumn", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "gridcell" }, properties: { "class": "className()", "style.width.px": "width()", "style.min-width.px": "minWidth()" } }, ngImport: i0 }); }
|
|
29
|
-
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFooterTableCellDirective, decorators: [{
|
|
31
|
-
type: Directive,
|
|
32
|
-
args: [{
|
|
33
|
-
selector: "td[monaGridFooterTableCell]",
|
|
34
|
-
host: {
|
|
35
|
-
"[class]": "className()",
|
|
36
|
-
"[style.width.px]": "width()",
|
|
37
|
-
"[style.min-width.px]": "minWidth()",
|
|
38
|
-
role: "gridcell"
|
|
39
|
-
}
|
|
40
|
-
}]
|
|
41
|
-
}], propDecorators: { footerCellMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerCellMinWidth", required: false }] }], footerCellWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerCellWidth", required: false }] }], footerColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerColumn", required: false }] }] } });
|
|
42
|
-
|
|
43
|
-
export { GridFooterTableCellDirective };
|
|
44
|
-
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Cviex3cR.mjs.map
|