@zeyos/zx 4.0.0 → 4.1.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/CHANGELOG.md +44 -0
- package/DESIGN-SYSTEM.md +59 -3
- package/dist/types/components/app-icon/app-icon.d.ts +88 -0
- package/dist/types/components/filter/filter-model.d.ts +87 -0
- package/dist/types/components/filter/filter.d.ts +331 -0
- package/dist/types/components/select/select.d.ts +46 -4
- package/dist/types/components/table/table.d.ts +103 -0
- package/dist/types/components/tag-picker/tag-picker.d.ts +16 -0
- package/dist/types/core/dom.d.ts +1 -1
- package/dist/types/core/util.d.ts +9 -0
- package/dist/types/index.d.ts +4 -1
- package/dist/types/zeyos/icons.d.ts +19 -2
- package/dist/types/zeyos/index.d.ts +1 -1
- package/dist/types/zeyos/select.d.ts +2 -0
- package/dist/zx-zeyos.esm.js +702 -75
- package/dist/zx-zeyos.esm.min.js +1 -1
- package/dist/zx.css +415 -4
- package/dist/zx.esm.js +1568 -115
- package/dist/zx.esm.min.js +3 -3
- package/dist/zx.global.js +1568 -115
- package/dist/zx.global.min.js +3 -3
- package/dist/zx.min.css +1 -1
- package/docs/api.json +379 -0
- package/docs/llms.md +93 -16
- package/docs/llms.txt +11 -9
- package/package.json +1 -1
- package/src/components/app-icon/app-icon.css +105 -0
- package/src/components/app-icon/app-icon.js +134 -0
- package/src/components/filter/filter-model.js +226 -0
- package/src/components/filter/filter.css +147 -0
- package/src/components/filter/filter.js +554 -0
- package/src/components/grid/grid.css +1 -1
- package/src/components/grid/grid.js +4 -1
- package/src/components/message/message.css +36 -3
- package/src/components/select/select.css +17 -0
- package/src/components/select/select.js +105 -24
- package/src/components/table/table.css +85 -0
- package/src/components/table/table.js +418 -24
- package/src/components/tag-picker/tag-picker.css +19 -0
- package/src/components/tag-picker/tag-picker.js +42 -5
- package/src/core/dom.js +1 -1
- package/src/core/util.js +20 -0
- package/src/index.js +7 -1
- package/src/zeyos/icons.js +34 -21
- package/src/zeyos/index.js +1 -1
- package/src/zeyos/select.js +6 -5
- package/styles/tokens/semantic.css +9 -0
- package/styles/tokens/themes.css +2 -2
- package/styles/zx.css +2 -0
|
@@ -20,6 +20,10 @@ export type SelectOptions = {
|
|
|
20
20
|
* Choices pinned above the list, kept through filtering and async loads.
|
|
21
21
|
*/
|
|
22
22
|
fixedItems?: SelectItem[];
|
|
23
|
+
/**
|
|
24
|
+
* Optional heading above pinned choices.
|
|
25
|
+
*/
|
|
26
|
+
fixedLabel?: string | null;
|
|
23
27
|
/**
|
|
24
28
|
* Item ID property or reader.
|
|
25
29
|
*/
|
|
@@ -121,6 +125,38 @@ export type SelectOptions = {
|
|
|
121
125
|
*/
|
|
122
126
|
onaction?: (event: CustomEvent<SelectActionDetail>) => void;
|
|
123
127
|
};
|
|
128
|
+
export type EntitySelectOptions = {
|
|
129
|
+
/**
|
|
130
|
+
* Choices pinned above ordinary results.
|
|
131
|
+
*/
|
|
132
|
+
recent?: SelectItem[];
|
|
133
|
+
/**
|
|
134
|
+
* Heading above recent choices.
|
|
135
|
+
*/
|
|
136
|
+
recentLabel?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Optional create command at the bottom.
|
|
139
|
+
*/
|
|
140
|
+
create?: boolean | SelectAction;
|
|
141
|
+
/**
|
|
142
|
+
* Item icon reader.
|
|
143
|
+
*/
|
|
144
|
+
iconKey?: string | ((item: SelectItem) => unknown);
|
|
145
|
+
/**
|
|
146
|
+
* Optional icon colour reader.
|
|
147
|
+
*/
|
|
148
|
+
colorKey?: string | ((item: SelectItem) => unknown);
|
|
149
|
+
/**
|
|
150
|
+
* Secondary-text reader.
|
|
151
|
+
*/
|
|
152
|
+
subtitleKey?: string | ((item: SelectItem) => unknown);
|
|
153
|
+
/**
|
|
154
|
+
* Entity icon renderer.
|
|
155
|
+
*/
|
|
156
|
+
renderIcon?: ((item: SelectItem, context: {
|
|
157
|
+
selected: boolean;
|
|
158
|
+
}) => Node | string | null) | null;
|
|
159
|
+
};
|
|
124
160
|
export type SelectChangeDetail = {
|
|
125
161
|
value: unknown;
|
|
126
162
|
item: SelectItem | null;
|
|
@@ -173,8 +209,7 @@ export declare class Select extends Component<SelectOptions> {
|
|
|
173
209
|
_position: import("../../core/position.js").PositionController;
|
|
174
210
|
_createdRoot: boolean;
|
|
175
211
|
_root: HTMLElement;
|
|
176
|
-
|
|
177
|
-
_originalAttributes: Map<any, any>;
|
|
212
|
+
_snapshot: import("../../core/dom.js").TargetSnapshot;
|
|
178
213
|
_handleTypeahead: (event: KeyboardEvent | string) => void;
|
|
179
214
|
static cssName: string;
|
|
180
215
|
/** @type {SelectOptions} */
|
|
@@ -243,6 +278,13 @@ export declare class Select extends Component<SelectOptions> {
|
|
|
243
278
|
static status(target: Element | string | null, options?: SelectOptions & {
|
|
244
279
|
items?: Array<Record<string, any>>;
|
|
245
280
|
}): Select;
|
|
281
|
+
/**
|
|
282
|
+
* Creates a rich entity picker with optional Recent choices and a create command.
|
|
283
|
+
* @param {Element|string|null} target Component target.
|
|
284
|
+
* @param {SelectOptions & EntitySelectOptions} [options={}] Entity-preset options.
|
|
285
|
+
* @returns {Select}
|
|
286
|
+
*/
|
|
287
|
+
static entity(target: Element | string | null, options?: SelectOptions & EntitySelectOptions): Select;
|
|
246
288
|
/**
|
|
247
289
|
* Creates the record-permission picker: the fixed Private and Public choices above the groups a
|
|
248
290
|
* record can be shared with. The value is the tri-state ZeyOS stores — `false` for private,
|
|
@@ -310,12 +352,12 @@ export declare class Select extends Component<SelectOptions> {
|
|
|
310
352
|
* @returns {SelectItem[]}
|
|
311
353
|
*/
|
|
312
354
|
_matchFixed(query: string): SelectItem[];
|
|
355
|
+
/** De-duplicates choices by public value while preserving caller order. @param {SelectItem[]} items @param {SelectItem[]} [excluded=[]] @returns {SelectItem[]} */
|
|
356
|
+
_uniqueItems(items: SelectItem[], excluded?: SelectItem[]): SelectItem[];
|
|
313
357
|
/** @returns {number} */
|
|
314
358
|
_selectedEntryIndex(): number;
|
|
315
359
|
/** @param {number} itemIndex @returns {number} */
|
|
316
360
|
_itemEntryIndex(itemIndex: number): number;
|
|
317
|
-
/** @param {string} name @returns {void} */
|
|
318
|
-
_rememberAttribute(element: any, name: string): void;
|
|
319
361
|
/** @param {string} key @param {string} fallback @returns {string} */
|
|
320
362
|
_message(key: string, fallback: string): string;
|
|
321
363
|
}
|
|
@@ -217,6 +217,22 @@ export type TableOptions = {
|
|
|
217
217
|
* inert while this is `false`.
|
|
218
218
|
*/
|
|
219
219
|
editMode?: TableEditMode;
|
|
220
|
+
/**
|
|
221
|
+
* Gesture that starts an editable cell.
|
|
222
|
+
*/
|
|
223
|
+
editTrigger?: 'single' | 'double';
|
|
224
|
+
/**
|
|
225
|
+
* Whether rows expose pointer/keyboard reorder handles.
|
|
226
|
+
*/
|
|
227
|
+
rowReorder?: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Whether a column visibility chooser is rendered.
|
|
230
|
+
*/
|
|
231
|
+
columnVisibility?: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* Initially hidden column IDs; at least one stays visible.
|
|
234
|
+
*/
|
|
235
|
+
hiddenColumns?: string[];
|
|
220
236
|
/**
|
|
221
237
|
* Flat parent references projected as an
|
|
222
238
|
* expandable treegrid. Row data and mutation APIs remain flat.
|
|
@@ -247,6 +263,11 @@ export type TableOptions = {
|
|
|
247
263
|
oneditcancel?: (event: CustomEvent<TableEditCancelDetail>) => void;
|
|
248
264
|
oneditinvalid?: (event: CustomEvent<TableEditInvalidDetail>) => void;
|
|
249
265
|
onrowtoggle?: (event: CustomEvent<TableRowToggleDetail>) => void;
|
|
266
|
+
onrowmove?: (event: CustomEvent<TableRowMoveDetail>) => void;
|
|
267
|
+
oncolumnvisibilitychange?: (event: CustomEvent<{
|
|
268
|
+
visible: string[];
|
|
269
|
+
hidden: string[];
|
|
270
|
+
}>) => void;
|
|
250
271
|
};
|
|
251
272
|
export type TableRowClickDetail = {
|
|
252
273
|
row: TableRow;
|
|
@@ -270,6 +291,13 @@ export type TableRowToggleDetail = {
|
|
|
270
291
|
id: unknown;
|
|
271
292
|
expanded: boolean;
|
|
272
293
|
};
|
|
294
|
+
export type TableRowMoveDetail = {
|
|
295
|
+
row: TableRow;
|
|
296
|
+
id: unknown;
|
|
297
|
+
target: TableRow;
|
|
298
|
+
targetId: unknown;
|
|
299
|
+
position: 'before' | 'after';
|
|
300
|
+
};
|
|
273
301
|
export type TableHierarchyEntry = {
|
|
274
302
|
row: TableRow;
|
|
275
303
|
id: unknown;
|
|
@@ -441,6 +469,8 @@ export type TableEditorEntry = {
|
|
|
441
469
|
* @fires Table#rowtoggle
|
|
442
470
|
* @fires Table#stackedchange
|
|
443
471
|
* @fires Table#grow
|
|
472
|
+
* @fires Table#rowmove
|
|
473
|
+
* @fires Table#columnvisibilitychange
|
|
444
474
|
* @extends {Component<TableOptions>}
|
|
445
475
|
*/
|
|
446
476
|
export declare class Table extends Component<TableOptions> {
|
|
@@ -480,6 +510,7 @@ export declare class Table extends Component<TableOptions> {
|
|
|
480
510
|
_rowElements: Map<any, any>;
|
|
481
511
|
_restored: boolean;
|
|
482
512
|
_editMode: TableEditMode;
|
|
513
|
+
_editTrigger: string;
|
|
483
514
|
_edit: {
|
|
484
515
|
id: unknown;
|
|
485
516
|
columnId: string;
|
|
@@ -502,12 +533,18 @@ export declare class Table extends Component<TableOptions> {
|
|
|
502
533
|
_hierarchy: TableHierarchyOptions & {
|
|
503
534
|
column: string;
|
|
504
535
|
};
|
|
536
|
+
_hiddenColumns: Set<string>;
|
|
537
|
+
_dragId: any;
|
|
538
|
+
_grabbedId: any;
|
|
505
539
|
_expanded: Set<unknown>;
|
|
506
540
|
_table: HTMLElement;
|
|
507
541
|
_colgroup: HTMLElement;
|
|
508
542
|
_thead: HTMLElement;
|
|
509
543
|
_tbody: HTMLElement;
|
|
510
544
|
_scroll: HTMLElement;
|
|
545
|
+
_rowMoveMessage: HTMLElement;
|
|
546
|
+
_columnControls: HTMLElement;
|
|
547
|
+
_columnList: HTMLElement;
|
|
511
548
|
_selectAll: HTMLElement;
|
|
512
549
|
_headers: Map<any, any>;
|
|
513
550
|
_hierarchyMeta: Map<unknown, TableHierarchyEntry>;
|
|
@@ -575,6 +612,33 @@ export declare class Table extends Component<TableOptions> {
|
|
|
575
612
|
* @returns {TableRow[]} Current table rows.
|
|
576
613
|
*/
|
|
577
614
|
getData(): TableRow[];
|
|
615
|
+
/** Returns visible column IDs in caller order. @returns {string[]} */
|
|
616
|
+
getVisibleColumns(): string[];
|
|
617
|
+
/** Returns hidden column IDs in caller order. @returns {string[]} */
|
|
618
|
+
getHiddenColumns(): string[];
|
|
619
|
+
/**
|
|
620
|
+
* Shows or hides one column. The final visible column cannot be hidden.
|
|
621
|
+
* @param {string} id Column ID.
|
|
622
|
+
* @param {boolean} [visible=true] Desired visibility.
|
|
623
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
624
|
+
* @returns {this}
|
|
625
|
+
*/
|
|
626
|
+
setColumnVisible(id: string, visible?: boolean, options?: {
|
|
627
|
+
silent?: boolean;
|
|
628
|
+
}): this;
|
|
629
|
+
/** Toggles one column. @param {string} id @param {{silent?:boolean}} [options={}] @returns {this} */
|
|
630
|
+
toggleColumn(id: string, options?: {
|
|
631
|
+
silent?: boolean;
|
|
632
|
+
}): this;
|
|
633
|
+
/**
|
|
634
|
+
* Reorders one row relative to another and emits a cancelable `rowmove` before committing.
|
|
635
|
+
* Hierarchical rows may only move among siblings; an active local sort disables manual order.
|
|
636
|
+
* @param {unknown} id Moving row ID.
|
|
637
|
+
* @param {unknown} targetId Target row ID.
|
|
638
|
+
* @param {'before'|'after'} [position='before'] Target edge.
|
|
639
|
+
* @returns {this}
|
|
640
|
+
*/
|
|
641
|
+
moveRow(id: unknown, targetId: unknown, position?: 'before' | 'after'): this;
|
|
578
642
|
/**
|
|
579
643
|
* Removes all rows.
|
|
580
644
|
* @returns {this}
|
|
@@ -786,6 +850,32 @@ export declare class Table extends Component<TableOptions> {
|
|
|
786
850
|
isStacked(): boolean;
|
|
787
851
|
/** Restores an enhanced target and releases all component listeners. @returns {void} */
|
|
788
852
|
destroy(): void;
|
|
853
|
+
/** @returns {TableColumn[]} */
|
|
854
|
+
_visibleColumns(): TableColumn[];
|
|
855
|
+
/** @returns {HTMLElement} */
|
|
856
|
+
_createColumnControls(): HTMLElement;
|
|
857
|
+
/** @param {string|null} [focusColumn=null] Column checkbox that keeps focus. @returns {void} */
|
|
858
|
+
_renderColumnControls(focusColumn?: string | null): void;
|
|
859
|
+
/** @param {DragEvent} event @returns {void} */
|
|
860
|
+
_handleRowDragStart(event: DragEvent): void;
|
|
861
|
+
/** @param {DragEvent} event @returns {void} */
|
|
862
|
+
_handleRowDragOver(event: DragEvent): void;
|
|
863
|
+
/** @param {DragEvent} event @returns {void} */
|
|
864
|
+
_handleRowDrop(event: DragEvent): void;
|
|
865
|
+
/** @param {KeyboardEvent} event @returns {void} */
|
|
866
|
+
_handleRowHandleKeydown(event: KeyboardEvent): void;
|
|
867
|
+
/** @param {unknown} id @returns {unknown[]} */
|
|
868
|
+
_siblingIds(id: unknown): unknown[];
|
|
869
|
+
/** @param {unknown} left @param {unknown} right @returns {boolean} */
|
|
870
|
+
_canMoveTogether(left: unknown, right: unknown): boolean;
|
|
871
|
+
/** @param {unknown} id @returns {HTMLElement|null} */
|
|
872
|
+
_rowHandle(id: unknown): HTMLElement | null;
|
|
873
|
+
/** @returns {void} */
|
|
874
|
+
_clearDropMarkers(): void;
|
|
875
|
+
/** @returns {void} */
|
|
876
|
+
_clearRowDrag(): void;
|
|
877
|
+
/** @returns {string|null} */
|
|
878
|
+
_hierarchyColumn(): string | null;
|
|
789
879
|
/** @returns {void} */
|
|
790
880
|
_renderColumns(): void;
|
|
791
881
|
/** @returns {void} */
|
|
@@ -1015,6 +1105,19 @@ export declare function projectHierarchyRows(rows: TableRow[], rowId: string | (
|
|
|
1015
1105
|
* @returns {TableRow[]} Sorted flat rows.
|
|
1016
1106
|
*/
|
|
1017
1107
|
export declare function sortHierarchyRows(rows: TableRow[], rowId: string | ((row: TableRow) => unknown), parentId: string | ((row: TableRow) => unknown), getValue: (row: TableRow) => unknown, direction: TableSortDirection): TableRow[];
|
|
1108
|
+
/**
|
|
1109
|
+
* Returns a reordered copy, or null when IDs are missing or hierarchical rows are not siblings.
|
|
1110
|
+
* Moving a parent changes its sibling order; hierarchy projection keeps its descendant subtree
|
|
1111
|
+
* attached as a unit because parent references are never rewritten.
|
|
1112
|
+
* @param {TableRow[]} rows
|
|
1113
|
+
* @param {string|((row:TableRow)=>unknown)} rowId
|
|
1114
|
+
* @param {unknown} id
|
|
1115
|
+
* @param {unknown} targetId
|
|
1116
|
+
* @param {'before'|'after'} [position='before']
|
|
1117
|
+
* @param {string|((row:TableRow)=>unknown)|null} [parentId=null]
|
|
1118
|
+
* @returns {TableRow[]|null}
|
|
1119
|
+
*/
|
|
1120
|
+
export declare function reorderTableRows(rows: TableRow[], rowId: string | ((row: TableRow) => unknown), id: unknown, targetId: unknown, position?: 'before' | 'after', parentId?: string | ((row: TableRow) => unknown) | null): TableRow[] | null;
|
|
1018
1121
|
/**
|
|
1019
1122
|
* Resolves the editor type of a column for one row.
|
|
1020
1123
|
*
|
|
@@ -19,6 +19,14 @@ export type TagPickerOptions = {
|
|
|
19
19
|
* Item label property or reader.
|
|
20
20
|
*/
|
|
21
21
|
labelKey?: TagLabelReader;
|
|
22
|
+
/**
|
|
23
|
+
* Optional item icon property or reader.
|
|
24
|
+
*/
|
|
25
|
+
iconKey?: TagValueReader;
|
|
26
|
+
/**
|
|
27
|
+
* Optional item colour property or reader.
|
|
28
|
+
*/
|
|
29
|
+
colorKey?: TagValueReader;
|
|
22
30
|
/**
|
|
23
31
|
* Fields searched by local filtering.
|
|
24
32
|
*/
|
|
@@ -133,6 +141,8 @@ export type TagPickerOptions = {
|
|
|
133
141
|
* @property {unknown[]} [values=[]] Initially selected IDs.
|
|
134
142
|
* @property {TagValueReader} [valueKey='ID'] Item ID property or reader.
|
|
135
143
|
* @property {TagLabelReader} [labelKey='name'] Item label property or reader.
|
|
144
|
+
* @property {TagValueReader} [iconKey='icon'] Optional item icon property or reader.
|
|
145
|
+
* @property {TagValueReader} [colorKey='color'] Optional item colour property or reader.
|
|
136
146
|
* @property {Array<TagValueReader>|null} [searchKeys=null] Fields searched by local filtering.
|
|
137
147
|
* @property {'local'|((query: string) => Promise<TagItem[]>|TagItem[])} [filter='local'] Filtering mode.
|
|
138
148
|
* @property {number} [minQuery=0] Minimum async query length.
|
|
@@ -359,6 +369,12 @@ export declare class TagPicker extends Component<TagPickerOptions> {
|
|
|
359
369
|
_valueOf(item: unknown): unknown;
|
|
360
370
|
/** @param {unknown} item @returns {string} */
|
|
361
371
|
_labelOf(item: unknown): string;
|
|
372
|
+
/** @param {unknown} item @returns {Node|null} */
|
|
373
|
+
_iconOf(item: unknown): Node | null;
|
|
374
|
+
/** @param {unknown} item @returns {string|null} */
|
|
375
|
+
_colorOf(item: unknown): string | null;
|
|
376
|
+
/** @param {unknown} item @param {unknown} reader @returns {unknown} */
|
|
377
|
+
_readItem(item: unknown, reader: unknown): unknown;
|
|
362
378
|
/** @returns {void} */
|
|
363
379
|
_emitChange(): void;
|
|
364
380
|
/** Grows the input to fit its text so the caret stays visible next to the tags. @returns {void} */
|
package/dist/types/core/dom.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export declare function parseCompactTag(compact: string): CompactTag;
|
|
|
62
62
|
* @returns {HTMLElement}
|
|
63
63
|
*/
|
|
64
64
|
export declare function compactElement(compact: string, properties?: DomBuilderProperties | null, content?: unknown): HTMLElement;
|
|
65
|
-
/**
|
|
65
|
+
/** Public compact-builder alias for concise application DOM construction. */
|
|
66
66
|
export declare const __: typeof compactElement;
|
|
67
67
|
/**
|
|
68
68
|
* Returns a trimmed native-link destination unless its parsed scheme can execute document code.
|
|
@@ -53,6 +53,15 @@ export declare function deepMerge<T, U>(a: T, b: U): T & U;
|
|
|
53
53
|
* @returns {value is Element}
|
|
54
54
|
*/
|
|
55
55
|
export declare function isElement(value: unknown): value is Element;
|
|
56
|
+
/**
|
|
57
|
+
* Accepts concrete CSS colours while rejecting image/function values that could make a colour
|
|
58
|
+
* descriptor trigger a network request when it is later consumed through a custom property.
|
|
59
|
+
* `CSS.supports()` provides the authoritative browser check; the conservative fallback covers
|
|
60
|
+
* ordinary named, hexadecimal, and functional colours in non-browser test environments.
|
|
61
|
+
* @param {unknown} value Candidate colour.
|
|
62
|
+
* @returns {value is string}
|
|
63
|
+
*/
|
|
64
|
+
export declare function isCssColor(value: unknown): value is string;
|
|
56
65
|
/**
|
|
57
66
|
* Restricts a number to an inclusive range.
|
|
58
67
|
* @param {number} n Value to restrict.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export { Stepper } from './components/stepper/stepper.js';
|
|
|
48
48
|
export { Breadcrumb } from './components/breadcrumb/breadcrumb.js';
|
|
49
49
|
export { Pagination, paginationRange } from './components/pagination/pagination.js';
|
|
50
50
|
export { Search } from './components/search/search.js';
|
|
51
|
+
export { AppIcon, appIcon } from './components/app-icon/app-icon.js';
|
|
51
52
|
export { Launcher, rankLauncherItems } from './components/launcher/launcher.js';
|
|
52
53
|
export { Avatar, avatarInitials } from './components/avatar/avatar.js';
|
|
53
54
|
export { AccountMenu } from './components/account-menu/account-menu.js';
|
|
@@ -75,12 +76,14 @@ export { Datebox, DateTimeBox } from './components/datebox/datebox.js';
|
|
|
75
76
|
export { DateRangePicker, clampRange, defaultDateRangePresets, normalizeRange, rangeNights, rangeStateOf } from './components/date-picker/date-range-picker.js';
|
|
76
77
|
export { DateRangeBox, formatRangeText, parseRangeText } from './components/datebox/date-range-box.js';
|
|
77
78
|
export { Timebox, splitTime, joinTime } from './components/timebox/timebox.js';
|
|
78
|
-
export { Table } from './components/table/table.js';
|
|
79
|
+
export { Table, reorderTableRows } from './components/table/table.js';
|
|
79
80
|
export { Grid, billingColumns, isBillingLine } from './components/grid/grid.js';
|
|
80
81
|
export { Chart, ChartJsAdapter, chartSummaryTable, cloneChartValue, isEmptyChartData } from './components/chart/chart.js';
|
|
81
82
|
export { TreeView } from './components/tree/tree.js';
|
|
82
83
|
export { Finder } from './components/finder/finder.js';
|
|
83
84
|
export { DataFilter } from './components/data-filter/data-filter.js';
|
|
85
|
+
export { Filter } from './components/filter/filter.js';
|
|
86
|
+
export { filterOperators, emptyFilterAst, filterCondition, filterGroup, parseFilterAst, cloneFilterAst, stringifyFilterAst, validateFilterAst } from './components/filter/filter-model.js';
|
|
84
87
|
export { Field } from './components/field/field.js';
|
|
85
88
|
export { Fieldset } from './components/fieldset/fieldset.js';
|
|
86
89
|
export { Form } from './components/form/form.js';
|
|
@@ -64,7 +64,7 @@ export type ModuleChipOptions = {
|
|
|
64
64
|
*/
|
|
65
65
|
size?: number | string;
|
|
66
66
|
/**
|
|
67
|
-
* Glyph size
|
|
67
|
+
* Glyph size relative to the tile edge.
|
|
68
68
|
*/
|
|
69
69
|
iconSize?: number | string;
|
|
70
70
|
/**
|
|
@@ -79,10 +79,18 @@ export type ModuleChipOptions = {
|
|
|
79
79
|
* Use the stock Font Awesome fallback glyph.
|
|
80
80
|
*/
|
|
81
81
|
standard?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Explicit glyph override, useful for an offline fallback.
|
|
84
|
+
*/
|
|
85
|
+
icon?: string | Node | (() => string | Node) | null;
|
|
82
86
|
/**
|
|
83
87
|
* Override the module colour for a server-defined fork or weblet.
|
|
84
88
|
*/
|
|
85
89
|
color?: string;
|
|
90
|
+
/**
|
|
91
|
+
* AppIcon material treatment.
|
|
92
|
+
*/
|
|
93
|
+
glass?: false | 'subtle' | 'strong';
|
|
86
94
|
/**
|
|
87
95
|
* Extra class names.
|
|
88
96
|
*/
|
|
@@ -91,11 +99,13 @@ export type ModuleChipOptions = {
|
|
|
91
99
|
/**
|
|
92
100
|
* @typedef {Object} ModuleChipOptions
|
|
93
101
|
* @property {number|string} [size=24] Chip edge length.
|
|
94
|
-
* @property {number|string} [iconSize='
|
|
102
|
+
* @property {number|string} [iconSize='52%'] Glyph size relative to the tile edge.
|
|
95
103
|
* @property {string|null} [label=null] Accessible label; null marks the chip decorative.
|
|
96
104
|
* @property {boolean} [title=false] Adds the module's display name as a `title` tooltip.
|
|
97
105
|
* @property {boolean} [standard=false] Use the stock Font Awesome fallback glyph.
|
|
106
|
+
* @property {string|Node|(()=>string|Node)|null} [icon] Explicit glyph override, useful for an offline fallback.
|
|
98
107
|
* @property {string} [color] Override the module colour for a server-defined fork or weblet.
|
|
108
|
+
* @property {false|'subtle'|'strong'} [glass='subtle'] AppIcon material treatment.
|
|
99
109
|
* @property {string|string[]} [class] Extra class names.
|
|
100
110
|
*/
|
|
101
111
|
/**
|
|
@@ -107,3 +117,10 @@ export type ModuleChipOptions = {
|
|
|
107
117
|
* @returns {HTMLElement} A `<span class="zx-module-icon">` wrapping the glyph.
|
|
108
118
|
*/
|
|
109
119
|
export declare function moduleChip(name: string, options?: ModuleChipOptions): HTMLElement;
|
|
120
|
+
/**
|
|
121
|
+
* Creates the public ZeyOS AppIcon preset for any module, entity, fork, or weblet identity.
|
|
122
|
+
* @param {string} name Module/entity identifier.
|
|
123
|
+
* @param {ModuleChipOptions} [options={}] AppIcon options.
|
|
124
|
+
* @returns {HTMLElement}
|
|
125
|
+
*/
|
|
126
|
+
export declare function zeyosAppIcon(name: string, options?: ModuleChipOptions): HTMLElement;
|
|
@@ -6,7 +6,7 @@ export { fieldToZxField, fieldToZxColumn, resolveFields, registerFieldType } fro
|
|
|
6
6
|
export { buildListQuery, tableSortToQuery, dataFilterStateToFilters, dateToUnixSeconds, unixSecondsToDate } from './query.js';
|
|
7
7
|
export { connect } from './connect.js';
|
|
8
8
|
export { zeyosModules, moduleAliases, moduleInfo, moduleColor, moduleIconName, moduleKeys, moduleGlyphColor, normalizeModuleName, registerModules } from './modules.js';
|
|
9
|
-
export { ZEYOS_ICON_KIT, useZeyosIcons, moduleIcon, moduleChip } from './icons.js';
|
|
9
|
+
export { ZEYOS_ICON_KIT, useZeyosIcons, moduleIcon, moduleChip, zeyosAppIcon } from './icons.js';
|
|
10
10
|
export { ZEYOS_LAUNCHER_APPLICATIONS, buildZeyosLauncherConfig, zeyosLauncher, normalizeZeyosLauncherApplications, normalizeZeyosLauncherRecords, zeyosActiveIdentifier } from './launcher.js';
|
|
11
11
|
export { zeyosSelect, buildZeyosSelectConfig, zeyosEntitySelect, buildZeyosEntitySelectConfig } from './select.js';
|
|
12
12
|
export { zeyosForm } from './form.js';
|
|
@@ -166,6 +166,7 @@ export declare function zeyosSelect(client: Record<string, any>, resource: strin
|
|
|
166
166
|
* subtitleKey?: string|((item: Record<string, unknown>) => unknown)|null,
|
|
167
167
|
* moduleKey?: string|((item: Record<string, unknown>) => unknown),
|
|
168
168
|
* none?: boolean|string,
|
|
169
|
+
* recent?: Record<string, unknown>[],
|
|
169
170
|
* create?: boolean|{id?: string|number, label?: string, group?: string, icon?: string|Node, oninvoke?: Function},
|
|
170
171
|
* renderIcon?: ((item: Record<string, unknown>, context: Record<string, unknown>) => Node|null)|null
|
|
171
172
|
* }} [opts={}] Entity presentation, query, and Select options.
|
|
@@ -175,6 +176,7 @@ export declare function buildZeyosEntitySelectConfig(client: Record<string, any>
|
|
|
175
176
|
subtitleKey?: string | ((item: Record<string, unknown>) => unknown) | null;
|
|
176
177
|
moduleKey?: string | ((item: Record<string, unknown>) => unknown);
|
|
177
178
|
none?: boolean | string;
|
|
179
|
+
recent?: Record<string, unknown>[];
|
|
178
180
|
create?: boolean | {
|
|
179
181
|
id?: string | number;
|
|
180
182
|
label?: string;
|