@zeyos/zx 4.3.4 → 4.4.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 +155 -0
- package/README.md +7 -0
- package/dist/types/components/activity-item/activity-item.d.ts +351 -0
- package/dist/types/components/activity-list/activity-list.d.ts +195 -0
- package/dist/types/components/app-sidebar/app-sidebar.d.ts +28 -0
- package/dist/types/components/button/button.d.ts +8 -0
- package/dist/types/components/calendar/calendar.d.ts +19 -0
- package/dist/types/components/card/card.d.ts +7 -0
- package/dist/types/components/card-view/card-view.d.ts +11 -3
- package/dist/types/components/card-view/record-card.d.ts +7 -1
- package/dist/types/components/code-editor/code-editor.d.ts +160 -0
- package/dist/types/components/code-editor/field-adapter.d.ts +5 -0
- package/dist/types/components/context-menu/context-menu.d.ts +18 -2
- package/dist/types/components/date-picker/date-picker.d.ts +8 -0
- package/dist/types/components/date-picker/time-picker.d.ts +7 -0
- package/dist/types/components/dialog/dialog.d.ts +29 -0
- package/dist/types/components/entity-ref/entity-ref.d.ts +331 -0
- package/dist/types/components/file-item/file-item.d.ts +234 -0
- package/dist/types/components/file-list/file-list.d.ts +171 -0
- package/dist/types/components/filter/filter.d.ts +91 -36
- package/dist/types/components/filter-panel/filter-panel.d.ts +449 -0
- package/dist/types/components/kanban-view/kanban-card.d.ts +138 -0
- package/dist/types/components/kanban-view/kanban-view.d.ts +170 -4
- package/dist/types/components/launcher/launcher.d.ts +19 -12
- package/dist/types/components/list-toolbar/list-toolbar.d.ts +599 -0
- package/dist/types/components/menu-button/menu-button.d.ts +4 -37
- package/dist/types/components/message/message.d.ts +7 -0
- package/dist/types/components/modal/modal.d.ts +48 -0
- package/dist/types/components/navigation-bar/navigation-bar.d.ts +105 -21
- package/dist/types/components/panel/panel.d.ts +7 -0
- package/dist/types/components/search/search.d.ts +7 -0
- package/dist/types/components/select/select.d.ts +4 -0
- package/dist/types/components/sort-control/sort-control.d.ts +105 -0
- package/dist/types/components/stat-tile/stat-tile.d.ts +277 -0
- package/dist/types/components/tabbox/tabbox.d.ts +7 -0
- package/dist/types/components/table/table.d.ts +144 -0
- package/dist/types/components/table-view/table-view.d.ts +11 -5
- package/dist/types/components/timebox/timebox.d.ts +7 -0
- package/dist/types/components/value-list/value-list.d.ts +8 -0
- package/dist/types/components/view/record-view.d.ts +96 -5
- package/dist/types/core/icons.d.ts +17 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/internal/app-rail.d.ts +10 -0
- package/dist/types/internal/menu-items.d.ts +134 -0
- package/dist/zx-zeyos.esm.js +616 -77
- package/dist/zx-zeyos.esm.min.js +8 -1
- package/dist/zx.css +2085 -238
- package/dist/zx.esm.js +6704 -1542
- package/dist/zx.esm.min.js +10 -3
- package/dist/zx.global.js +6704 -1542
- package/dist/zx.global.min.js +10 -3
- package/dist/zx.min.css +1 -1
- package/docs/api.json +1479 -127
- package/docs/llms.md +315 -10
- package/docs/llms.txt +11 -5
- package/package.json +1 -1
- package/src/components/activity-item/activity-item.css +137 -0
- package/src/components/activity-item/activity-item.js +599 -0
- package/src/components/activity-list/activity-list.css +64 -0
- package/src/components/activity-list/activity-list.js +375 -0
- package/src/components/app-rail/app-rail.css +227 -19
- package/src/components/app-sidebar/app-sidebar.css +414 -24
- package/src/components/app-sidebar/app-sidebar.js +65 -5
- package/src/components/button/button.css +8 -0
- package/src/components/button/button.js +6 -1
- package/src/components/calendar/calendar.js +33 -3
- package/src/components/card/card.js +12 -1
- package/src/components/card-view/card-view.css +1 -0
- package/src/components/card-view/card-view.js +25 -9
- package/src/components/card-view/record-card.js +7 -3
- package/src/components/code-editor/code-editor.css +67 -0
- package/src/components/code-editor/code-editor.js +288 -0
- package/src/components/code-editor/field-adapter.js +34 -0
- package/src/components/context-menu/context-menu.css +80 -3
- package/src/components/context-menu/context-menu.js +22 -30
- package/src/components/date-picker/date-picker.js +22 -8
- package/src/components/date-picker/month-picker.js +3 -3
- package/src/components/date-picker/time-picker.js +20 -8
- package/src/components/dialog/dialog.js +88 -66
- package/src/components/dropdown/dropdown.js +2 -2
- package/src/components/entity-ref/entity-ref.css +182 -0
- package/src/components/entity-ref/entity-ref.js +496 -0
- package/src/components/file-item/file-item.css +88 -0
- package/src/components/file-item/file-item.js +371 -0
- package/src/components/file-list/file-list.css +51 -0
- package/src/components/file-list/file-list.js +320 -0
- package/src/components/filter/filter.css +27 -1
- package/src/components/filter/filter.js +199 -45
- package/src/components/filter-panel/filter-panel.css +104 -0
- package/src/components/filter-panel/filter-panel.js +964 -0
- package/src/components/kanban-view/kanban-card.js +239 -0
- package/src/components/kanban-view/kanban-view.css +194 -0
- package/src/components/kanban-view/kanban-view.js +251 -8
- package/src/components/launcher/launcher.js +59 -27
- package/src/components/list-toolbar/list-toolbar.css +189 -0
- package/src/components/list-toolbar/list-toolbar.js +851 -0
- package/src/components/menu-button/menu-button.css +80 -3
- package/src/components/menu-button/menu-button.js +21 -37
- package/src/components/message/message.css +5 -2
- package/src/components/message/message.js +13 -2
- package/src/components/modal/modal.css +15 -0
- package/src/components/modal/modal.js +141 -0
- package/src/components/navigation-bar/navigation-bar.css +77 -2
- package/src/components/navigation-bar/navigation-bar.js +171 -4
- package/src/components/panel/panel.js +13 -2
- package/src/components/search/search.js +17 -5
- package/src/components/select/field-adapter.js +4 -1
- package/src/components/select/select.js +3 -0
- package/src/components/sort-control/sort-control.css +17 -0
- package/src/components/sort-control/sort-control.js +140 -0
- package/src/components/stat-tile/stat-tile.css +213 -0
- package/src/components/stat-tile/stat-tile.js +590 -0
- package/src/components/tabbox/tabbox.js +12 -1
- package/src/components/table/table.css +51 -2
- package/src/components/table/table.js +298 -19
- package/src/components/table-view/table-view.css +8 -2
- package/src/components/table-view/table-view.js +21 -6
- package/src/components/tag-picker/tag-picker.css +3 -1
- package/src/components/timebox/timebox.js +18 -5
- package/src/components/value-list/value-list.js +22 -6
- package/src/components/view/record-view.css +5 -0
- package/src/components/view/record-view.js +100 -7
- package/src/core/icons.js +74 -5
- package/src/index.js +25 -0
- package/src/internal/app-rail.js +19 -1
- package/src/internal/menu-items.js +142 -0
- package/styles/print.css +192 -0
- package/styles/zx.css +11 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { Component } from '../../core/component.js';
|
|
2
|
+
import { FileItem } from '../file-item/file-item.js';
|
|
3
|
+
export type FileItemOptions = import('../file-item/file-item.js').FileItemOptions;
|
|
4
|
+
export type FileItemState = import('../file-item/file-item.js').FileItemState;
|
|
5
|
+
export type FileListOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* Initial files in host-supplied order.
|
|
8
|
+
*/
|
|
9
|
+
items?: FileItemOptions[];
|
|
10
|
+
/**
|
|
11
|
+
* Accessible collection name.
|
|
12
|
+
*/
|
|
13
|
+
label?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Whether initial or incremental files are loading.
|
|
16
|
+
*/
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Placeholder rows shown for an empty loading list.
|
|
20
|
+
*/
|
|
21
|
+
loadingCount?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Loading status text.
|
|
24
|
+
*/
|
|
25
|
+
loadingText?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Empty-state content.
|
|
28
|
+
*/
|
|
29
|
+
emptyText?: string | number | Node | Component | null;
|
|
30
|
+
/**
|
|
31
|
+
* Preventable native-file-link listener.
|
|
32
|
+
*/
|
|
33
|
+
onactivate?: (event: CustomEvent<{
|
|
34
|
+
id: unknown;
|
|
35
|
+
index: number;
|
|
36
|
+
file: Readonly<FileItemState>;
|
|
37
|
+
href: string;
|
|
38
|
+
event: MouseEvent;
|
|
39
|
+
}>) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Preventable file-action listener.
|
|
42
|
+
*/
|
|
43
|
+
onaction?: (event: CustomEvent<{
|
|
44
|
+
id: string;
|
|
45
|
+
fileId: unknown;
|
|
46
|
+
index: number;
|
|
47
|
+
action: object;
|
|
48
|
+
file: Readonly<FileItemState>;
|
|
49
|
+
event: MouseEvent;
|
|
50
|
+
}>) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Collection mutation listener.
|
|
53
|
+
*/
|
|
54
|
+
ondatachange?: (event: CustomEvent<{
|
|
55
|
+
items: Readonly<FileItemState>[];
|
|
56
|
+
}>) => void;
|
|
57
|
+
};
|
|
58
|
+
/** @typedef {import('../file-item/file-item.js').FileItemOptions} FileItemOptions */
|
|
59
|
+
/** @typedef {import('../file-item/file-item.js').FileItemState} FileItemState */
|
|
60
|
+
/**
|
|
61
|
+
* @typedef {Object} FileListOptions
|
|
62
|
+
* @property {FileItemOptions[]} [items=[]] Initial files in host-supplied order.
|
|
63
|
+
* @property {string} [label='Files'] Accessible collection name.
|
|
64
|
+
* @property {boolean} [loading=false] Whether initial or incremental files are loading.
|
|
65
|
+
* @property {number} [loadingCount=3] Placeholder rows shown for an empty loading list.
|
|
66
|
+
* @property {string} [loadingText='Loading files'] Loading status text.
|
|
67
|
+
* @property {string|number|Node|Component|null} [emptyText='No files'] Empty-state content.
|
|
68
|
+
* @property {(event: CustomEvent<{id: unknown, index: number, file: Readonly<FileItemState>, href: string, event: MouseEvent}>) => void} [onactivate]
|
|
69
|
+
* Preventable native-file-link listener.
|
|
70
|
+
* @property {(event: CustomEvent<{id: string, fileId: unknown, index: number, action: object, file: Readonly<FileItemState>, event: MouseEvent}>) => void} [onaction]
|
|
71
|
+
* Preventable file-action listener.
|
|
72
|
+
* @property {(event: CustomEvent<{items: Readonly<FileItemState>[]}>) => void} [ondatachange]
|
|
73
|
+
* Collection mutation listener.
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* Accessible collection for durable and transient files. Ordering and mutation are local
|
|
77
|
+
* presentation concerns only; transport, authorization, and persistence remain host-owned.
|
|
78
|
+
* @fires FileList#activate
|
|
79
|
+
* @fires FileList#action
|
|
80
|
+
* @fires FileList#datachange
|
|
81
|
+
* @extends {Component<FileListOptions>}
|
|
82
|
+
*/
|
|
83
|
+
export declare class FileList extends Component<FileListOptions> {
|
|
84
|
+
_createdRoot: boolean;
|
|
85
|
+
_snapshot: import("../../core/dom.js").TargetSnapshot;
|
|
86
|
+
_destroyed: boolean;
|
|
87
|
+
_items: import("../file-item/file-item.js").FileItemState[];
|
|
88
|
+
_loading: any;
|
|
89
|
+
_itemComponents: any[];
|
|
90
|
+
static cssName: string;
|
|
91
|
+
/** @type {Readonly<FileListOptions>} */
|
|
92
|
+
static defaults: Readonly<FileListOptions>;
|
|
93
|
+
/**
|
|
94
|
+
* Creates or enhances a file collection.
|
|
95
|
+
* @param {Element|string|null} [target=null] Existing host, selector, or null.
|
|
96
|
+
* @param {FileListOptions} [options={}] Collection presentation.
|
|
97
|
+
*/
|
|
98
|
+
constructor(target?: Element | string | null, options?: FileListOptions);
|
|
99
|
+
/** @returns {HTMLElement} */
|
|
100
|
+
render(): HTMLElement;
|
|
101
|
+
/**
|
|
102
|
+
* Replaces every file.
|
|
103
|
+
* @param {FileItemOptions[]} items Ordered file descriptors.
|
|
104
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
105
|
+
* @returns {this}
|
|
106
|
+
*/
|
|
107
|
+
setItems(items: FileItemOptions[], options?: {
|
|
108
|
+
silent?: boolean;
|
|
109
|
+
}): this;
|
|
110
|
+
/** Returns defensive snapshots in display order. @returns {Readonly<FileItemState>[]} */
|
|
111
|
+
getItems(): Readonly<FileItemState>[];
|
|
112
|
+
/** Returns a defensive snapshot by stable ID. @param {unknown} id File id. @returns {Readonly<FileItemState>|null} */
|
|
113
|
+
getItem(id: unknown): Readonly<FileItemState> | null;
|
|
114
|
+
/**
|
|
115
|
+
* Adds one file at a bounded index.
|
|
116
|
+
* @param {FileItemOptions} item File descriptor.
|
|
117
|
+
* @param {number} [index] Insertion position; omitted means append.
|
|
118
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
119
|
+
* @returns {this}
|
|
120
|
+
*/
|
|
121
|
+
addItem(item: FileItemOptions, index?: number, options?: {
|
|
122
|
+
silent?: boolean;
|
|
123
|
+
}): this;
|
|
124
|
+
/**
|
|
125
|
+
* Patches the first file whose ID is `Object.is`-equal to `id`.
|
|
126
|
+
* @param {unknown} id File id.
|
|
127
|
+
* @param {Partial<FileItemOptions>} values Replacement fields.
|
|
128
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
129
|
+
* @returns {this}
|
|
130
|
+
*/
|
|
131
|
+
updateItem(id: unknown, values: Partial<FileItemOptions>, options?: {
|
|
132
|
+
silent?: boolean;
|
|
133
|
+
}): this;
|
|
134
|
+
/**
|
|
135
|
+
* Removes the first file whose ID is `Object.is`-equal to `id`.
|
|
136
|
+
* @param {unknown} id File id.
|
|
137
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
138
|
+
* @returns {this}
|
|
139
|
+
*/
|
|
140
|
+
removeItem(id: unknown, options?: {
|
|
141
|
+
silent?: boolean;
|
|
142
|
+
}): this;
|
|
143
|
+
/** Sets initial/incremental loading presentation. @param {boolean} loading Loading state. @returns {this} */
|
|
144
|
+
setLoading(loading: boolean): this;
|
|
145
|
+
/** Restores an enhanced target exactly, or removes an owned collection. @returns {void} */
|
|
146
|
+
destroy(): void;
|
|
147
|
+
/** @returns {void} */
|
|
148
|
+
_renderList(): void;
|
|
149
|
+
/** @param {boolean} placeholders @returns {HTMLElement} */
|
|
150
|
+
_createLoading(placeholders: boolean): HTMLElement;
|
|
151
|
+
/** @returns {void} */
|
|
152
|
+
_destroyItems(): void;
|
|
153
|
+
/** @param {CustomEvent} event @returns {void} */
|
|
154
|
+
_forwardActivate(event: CustomEvent): void;
|
|
155
|
+
/** @param {CustomEvent} event @returns {void} */
|
|
156
|
+
_forwardAction(event: CustomEvent): void;
|
|
157
|
+
/** @param {CustomEvent} event @returns {FileItem|null} */
|
|
158
|
+
_componentForEvent(event: CustomEvent): FileItem | null;
|
|
159
|
+
/** @returns {void} */
|
|
160
|
+
_emitDataChange(): void;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Validates, normalizes, and clones file descriptors without mutating the input.
|
|
164
|
+
* Explicit duplicate IDs are rejected; id-less rows remain valid.
|
|
165
|
+
* @param {unknown} value Candidate descriptors.
|
|
166
|
+
* @returns {FileItemState[]}
|
|
167
|
+
*/
|
|
168
|
+
export declare function normalizeFileListItems(value: unknown): FileItemState[];
|
|
169
|
+
/** File descriptors changed through a list mutation method. @event FileList#datachange @type {CustomEvent<{items:Readonly<FileItemState>[]}>} */
|
|
170
|
+
/** A file link activated through the list. @event FileList#activate @type {CustomEvent<{id:unknown,index:number,file:Readonly<FileItemState>,href:string,event:MouseEvent}>} */
|
|
171
|
+
/** A file action activated through the list. @event FileList#action @type {CustomEvent<{id:string,fileId:unknown,index:number,action:object,file:Readonly<FileItemState>,event:MouseEvent}>} */
|
|
@@ -95,6 +95,26 @@ export type FilterOptions = {
|
|
|
95
95
|
* Maximum condition count.
|
|
96
96
|
*/
|
|
97
97
|
maxConditions?: number;
|
|
98
|
+
/**
|
|
99
|
+
* Searchable field, operator and single-choice controls.
|
|
100
|
+
*/
|
|
101
|
+
searchable?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Condition layout; compact rows adapt to container width.
|
|
104
|
+
*/
|
|
105
|
+
layout?: 'standard' | 'compact';
|
|
106
|
+
/**
|
|
107
|
+
* Restrict root logic without rewriting incompatible saved expressions.
|
|
108
|
+
*/
|
|
109
|
+
rootLogic?: 'and' | 'or' | null;
|
|
110
|
+
/**
|
|
111
|
+
* Show the internal Apply button.
|
|
112
|
+
*/
|
|
113
|
+
showApply?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Show Add controls inside the root group as well as the footer.
|
|
116
|
+
*/
|
|
117
|
+
showRootActions?: boolean;
|
|
98
118
|
/**
|
|
99
119
|
* Emit apply after every valid mutation.
|
|
100
120
|
*/
|
|
@@ -108,11 +128,11 @@ export type FilterOptions = {
|
|
|
108
128
|
*/
|
|
109
129
|
disabled?: boolean;
|
|
110
130
|
/**
|
|
111
|
-
* Apply button label.
|
|
131
|
+
* Apply button label. Omitted resolves `filter.apply`, English `Apply filters`.
|
|
112
132
|
*/
|
|
113
133
|
applyLabel?: string;
|
|
114
134
|
/**
|
|
115
|
-
* Clear button label.
|
|
135
|
+
* Clear button label. Omitted resolves `filter.clear`, English `Clear`.
|
|
116
136
|
*/
|
|
117
137
|
clearLabel?: string;
|
|
118
138
|
/**
|
|
@@ -140,40 +160,32 @@ export type FilterOptions = {
|
|
|
140
160
|
*/
|
|
141
161
|
onerror?: (event: CustomEvent<Record<string, unknown>>) => void;
|
|
142
162
|
};
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
* @property {string} [clearLabel='Clear'] Clear button label.
|
|
170
|
-
* @property {(event:CustomEvent<Record<string,unknown>>)=>void} [onchange] Draft-change listener.
|
|
171
|
-
* @property {(event:CustomEvent<Record<string,unknown>>)=>void} [onapply] Valid-apply listener.
|
|
172
|
-
* @property {(event:CustomEvent<Record<string,unknown>>)=>void} [oninvalid] Invalid-apply listener.
|
|
173
|
-
* @property {(event:CustomEvent<Record<string,unknown>>)=>void} [onquery] Async query listener.
|
|
174
|
-
* @property {(event:CustomEvent<Record<string,unknown>>)=>void} [onloaded] Async loaded listener.
|
|
175
|
-
* @property {(event:CustomEvent<Record<string,unknown>>)=>void} [onerror] Async failure listener.
|
|
176
|
-
*/
|
|
163
|
+
export type FilterValueMessages = {
|
|
164
|
+
/**
|
|
165
|
+
* Empty-choice option label.
|
|
166
|
+
*/
|
|
167
|
+
choose: string;
|
|
168
|
+
/**
|
|
169
|
+
* Boolean true label.
|
|
170
|
+
*/
|
|
171
|
+
yes: string;
|
|
172
|
+
/**
|
|
173
|
+
* Boolean false label.
|
|
174
|
+
*/
|
|
175
|
+
no: string;
|
|
176
|
+
/**
|
|
177
|
+
* Placeholder for a many-valued text input.
|
|
178
|
+
*/
|
|
179
|
+
commaSeparated: string;
|
|
180
|
+
/**
|
|
181
|
+
* Accessible name for a single value control.
|
|
182
|
+
*/
|
|
183
|
+
value: (label: string) => string;
|
|
184
|
+
/**
|
|
185
|
+
* Accessible name for one end of a pair.
|
|
186
|
+
*/
|
|
187
|
+
valueAt: (label: string, position: number) => string;
|
|
188
|
+
};
|
|
177
189
|
/**
|
|
178
190
|
* Backend-neutral dynamic filter expression editor.
|
|
179
191
|
* @fires Filter#change
|
|
@@ -227,6 +239,8 @@ export declare class Filter extends Component<FilterOptions> {
|
|
|
227
239
|
_disabled: boolean;
|
|
228
240
|
_async: Map<any, any>;
|
|
229
241
|
_customEditors: any[];
|
|
242
|
+
_selectEditors: any[];
|
|
243
|
+
_disposed: boolean;
|
|
230
244
|
_value: import("./filter-model.js").FilterAst;
|
|
231
245
|
_renderVersion: any;
|
|
232
246
|
static cssName: string;
|
|
@@ -279,6 +293,20 @@ export declare class Filter extends Component<FilterOptions> {
|
|
|
279
293
|
_renderCondition(node: any): HTMLElement;
|
|
280
294
|
/** @param {any} node @param {FilterField|null} field @param {any} operator @returns {HTMLElement} */
|
|
281
295
|
_renderValue(node: any, field: FilterField | null, operator: any): HTMLElement;
|
|
296
|
+
/**
|
|
297
|
+
* Owns a themed picker and defers mutation until Select finishes its selection event.
|
|
298
|
+
* @param {Array<{value:unknown,label:string}>} items Choices.
|
|
299
|
+
* @param {unknown} value Selected value.
|
|
300
|
+
* @param {string} label Accessible name.
|
|
301
|
+
* @param {string} nodeId Condition ID.
|
|
302
|
+
* @param {string} part Focus target name.
|
|
303
|
+
* @param {(value:unknown)=>void} changed Selection handler.
|
|
304
|
+
* @returns {HTMLElement} Picker root.
|
|
305
|
+
*/
|
|
306
|
+
_searchSelect(items: Array<{
|
|
307
|
+
value: unknown;
|
|
308
|
+
label: string;
|
|
309
|
+
}>, value: unknown, label: string, nodeId: string, part: string, changed: (value: unknown) => void): HTMLElement;
|
|
282
310
|
/** @param {Event} event @returns {void} */
|
|
283
311
|
_handleChange(event: Event): void;
|
|
284
312
|
/** @param {Event} event @returns {void} */
|
|
@@ -322,6 +350,26 @@ export declare class Filter extends Component<FilterOptions> {
|
|
|
322
350
|
_defaultOperator(field: FilterField | null): string | null;
|
|
323
351
|
/** @param {string} text @returns {void} */
|
|
324
352
|
_announce(text: string): void;
|
|
353
|
+
/** Names a field or operator a saved expression refers to that this instance does not offer.
|
|
354
|
+
* @param {string} id Unknown field or operator ID. @returns {string} */
|
|
355
|
+
_unavailable(id: string): string;
|
|
356
|
+
/** @param {any} node Condition. @param {FilterField|null} field Resolved field. @returns {HTMLElement} */
|
|
357
|
+
_removeConditionButton(node: any, field: FilterField | null): HTMLElement;
|
|
358
|
+
/**
|
|
359
|
+
* Resolves the strings the two value builders need. They are module functions so that the
|
|
360
|
+
* markup they produce stays testable without a component, which means the words have to be
|
|
361
|
+
* handed to them rather than looked up inside.
|
|
362
|
+
* @returns {FilterValueMessages}
|
|
363
|
+
*/
|
|
364
|
+
_valueMessages(): FilterValueMessages;
|
|
365
|
+
/**
|
|
366
|
+
* Resolves a message through the host translator, falling back to the built-in English text.
|
|
367
|
+
* @param {string} key Message key.
|
|
368
|
+
* @param {string} fallback Built-in text, with `%1`-style placeholders.
|
|
369
|
+
* @param {...unknown} args Interpolation values.
|
|
370
|
+
* @returns {string}
|
|
371
|
+
*/
|
|
372
|
+
_message(key: string, fallback: string, ...args: unknown[]): string;
|
|
325
373
|
}
|
|
326
374
|
/** @event Filter#change @type {CustomEvent<Record<string,unknown>>} */
|
|
327
375
|
/** @event Filter#apply @type {CustomEvent<{value:FilterAst}>} */
|
|
@@ -329,3 +377,10 @@ export declare class Filter extends Component<FilterOptions> {
|
|
|
329
377
|
/** @event Filter#query @type {CustomEvent<Record<string,unknown>>} */
|
|
330
378
|
/** @event Filter#loaded @type {CustomEvent<Record<string,unknown>>} */
|
|
331
379
|
/** @event Filter#error @type {CustomEvent<Record<string,unknown>>} */
|
|
380
|
+
/**
|
|
381
|
+
* Reports a restricted root mismatch without mutating the supplied expression.
|
|
382
|
+
* @param {FilterAst} value Expression to validate.
|
|
383
|
+
* @param {'and'|'or'|null} logic Required root logic.
|
|
384
|
+
* @returns {Record<string,string>|null} Actionable validation error, or null.
|
|
385
|
+
*/
|
|
386
|
+
export declare function rootLogicError(value: FilterAst, logic: 'and' | 'or' | null): Record<string, string> | null;
|