@zeyos/zx 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/README.md +15 -0
- package/dist/types/compat/base.d.ts +156 -0
- package/dist/types/compat/globals.d.ts +20 -0
- package/dist/types/compat/index.d.ts +128 -0
- package/dist/types/compat/map/basic.d.ts +175 -0
- package/dist/types/compat/map/data.d.ts +102 -0
- package/dist/types/compat/map/date-time.d.ts +80 -0
- package/dist/types/compat/map/factory.d.ts +9 -0
- package/dist/types/compat/map/form.d.ts +98 -0
- package/dist/types/compat/map/helpers.d.ts +12 -0
- package/dist/types/compat/map/http.d.ts +36 -0
- package/dist/types/compat/map/layout.d.ts +106 -0
- package/dist/types/compat/map/options.d.ts +80 -0
- package/dist/types/compat/map/select.d.ts +95 -0
- package/dist/types/compat/map/stubs.d.ts +32 -0
- package/dist/types/compat/map/utilities.d.ts +37 -0
- package/dist/types/compat-entry.d.ts +5 -0
- package/dist/types/components/badge/badge.d.ts +46 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +200 -0
- package/dist/types/components/button/button.d.ts +42 -0
- package/dist/types/components/check-button/check-button.d.ts +98 -0
- package/dist/types/components/checklist/checklist.d.ts +143 -0
- package/dist/types/components/checklist/field-adapter.d.ts +5 -0
- package/dist/types/components/context-menu/context-menu.d.ts +130 -0
- package/dist/types/components/copy/copy-button.d.ts +48 -0
- package/dist/types/components/copy/copy-input.d.ts +91 -0
- package/dist/types/components/data-filter/data-filter.d.ts +250 -0
- package/dist/types/components/data-filter/filter-core.d.ts +52 -0
- package/dist/types/components/date-picker/date-picker.d.ts +137 -0
- package/dist/types/components/date-picker/date-range-picker.d.ts +350 -0
- package/dist/types/components/date-picker/field-adapter.d.ts +6 -0
- package/dist/types/components/date-picker/month-picker.d.ts +75 -0
- package/dist/types/components/date-picker/range-field-adapter.d.ts +7 -0
- package/dist/types/components/date-picker/time-picker.d.ts +127 -0
- package/dist/types/components/datebox/date-range-box.d.ts +218 -0
- package/dist/types/components/datebox/datebox.d.ts +160 -0
- package/dist/types/components/datebox/field-adapter.d.ts +5 -0
- package/dist/types/components/dialog/dialog.d.ts +284 -0
- package/dist/types/components/dropdown/dropdown.d.ts +118 -0
- package/dist/types/components/empty-state/empty-state.d.ts +38 -0
- package/dist/types/components/field/field.d.ts +231 -0
- package/dist/types/components/field-upload/field-adapter.d.ts +5 -0
- package/dist/types/components/field-upload/field-upload.d.ts +213 -0
- package/dist/types/components/fieldset/fieldset.d.ts +125 -0
- package/dist/types/components/finder/finder.d.ts +252 -0
- package/dist/types/components/form/form.d.ts +194 -0
- package/dist/types/components/groupbox/groupbox.d.ts +89 -0
- package/dist/types/components/layout/layout.d.ts +132 -0
- package/dist/types/components/loading/inline-loading.d.ts +86 -0
- package/dist/types/components/loading/progress-bar.d.ts +168 -0
- package/dist/types/components/loading/spinner.d.ts +34 -0
- package/dist/types/components/master-panel/master-panel.d.ts +112 -0
- package/dist/types/components/menu-button/menu-button.d.ts +142 -0
- package/dist/types/components/message/message.d.ts +212 -0
- package/dist/types/components/modal/modal.d.ts +105 -0
- package/dist/types/components/multi-value-editor/field-adapter.d.ts +5 -0
- package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +66 -0
- package/dist/types/components/navigation-bar/navigation-bar.d.ts +229 -0
- package/dist/types/components/number-field/field-adapter.d.ts +5 -0
- package/dist/types/components/number-field/number-field.d.ts +292 -0
- package/dist/types/components/pagination/pagination.d.ts +267 -0
- package/dist/types/components/panel/panel.d.ts +194 -0
- package/dist/types/components/permission/permission.d.ts +93 -0
- package/dist/types/components/rating/field-adapter.d.ts +5 -0
- package/dist/types/components/rating/rating.d.ts +213 -0
- package/dist/types/components/search/search.d.ts +98 -0
- package/dist/types/components/select/field-adapter.d.ts +5 -0
- package/dist/types/components/select/filter.d.ts +11 -0
- package/dist/types/components/select/select.d.ts +235 -0
- package/dist/types/components/skeleton/skeleton.d.ts +97 -0
- package/dist/types/components/slider/field-adapter.d.ts +5 -0
- package/dist/types/components/slider/slider.d.ts +216 -0
- package/dist/types/components/split-view/split-view.d.ts +335 -0
- package/dist/types/components/stepper/stepper.d.ts +314 -0
- package/dist/types/components/stepper/steps.d.ts +131 -0
- package/dist/types/components/tabbox/tabbox.d.ts +230 -0
- package/dist/types/components/table/sort.d.ts +49 -0
- package/dist/types/components/table/table.d.ts +872 -0
- package/dist/types/components/tag-picker/field-adapter.d.ts +5 -0
- package/dist/types/components/tag-picker/tag-picker.d.ts +375 -0
- package/dist/types/components/timebox/field-adapter.d.ts +5 -0
- package/dist/types/components/timebox/timebox.d.ts +121 -0
- package/dist/types/components/toggle/field-adapter.d.ts +5 -0
- package/dist/types/components/toggle/toggle.d.ts +94 -0
- package/dist/types/components/toolbar/toolbar.d.ts +230 -0
- package/dist/types/components/tooltip/tooltip.d.ts +183 -0
- package/dist/types/components/tree/hierarchy.d.ts +113 -0
- package/dist/types/components/tree/tree.d.ts +383 -0
- package/dist/types/components/truncate/truncate.d.ts +61 -0
- package/dist/types/components/value-list/field-adapter.d.ts +5 -0
- package/dist/types/components/value-list/value-list.d.ts +143 -0
- package/dist/types/core/breakpoint.d.ts +68 -0
- package/dist/types/core/component.d.ts +115 -0
- package/dist/types/core/date.d.ts +50 -0
- package/dist/types/core/dom.d.ts +86 -0
- package/dist/types/core/export.d.ts +70 -0
- package/dist/types/core/fontawesome.d.ts +107 -0
- package/dist/types/core/format.d.ts +107 -0
- package/dist/types/core/http.d.ts +122 -0
- package/dist/types/core/i18n.d.ts +35 -0
- package/dist/types/core/icons.d.ts +137 -0
- package/dist/types/core/keyboard.d.ts +72 -0
- package/dist/types/core/position.d.ts +45 -0
- package/dist/types/core/storage.d.ts +46 -0
- package/dist/types/core/util.d.ts +117 -0
- package/dist/types/elements/define.d.ts +73 -0
- package/dist/types/elements/reflect.d.ts +27 -0
- package/dist/types/index.d.ts +79 -0
- package/dist/types/zeyos/connect.d.ts +65 -0
- package/dist/types/zeyos/form.d.ts +140 -0
- package/dist/types/zeyos/icons.d.ts +104 -0
- package/dist/types/zeyos/index.d.ts +12 -0
- package/dist/types/zeyos/modules.d.ts +110 -0
- package/dist/types/zeyos/query.d.ts +157 -0
- package/dist/types/zeyos/schema.d.ts +79 -0
- package/dist/types/zeyos/select.d.ts +167 -0
- package/dist/types/zeyos/table.d.ts +205 -0
- package/dist/zx-compat.esm.js +362 -33
- package/dist/zx-compat.esm.min.js +1 -1
- package/dist/zx-compat.global.js +359 -67
- package/dist/zx-compat.global.min.js +3 -3
- package/dist/zx-zeyos.esm.js +342 -43
- package/dist/zx-zeyos.esm.min.js +1 -1
- package/dist/zx.css +68 -6
- package/dist/zx.esm.js +346 -67
- package/dist/zx.esm.min.js +3 -3
- package/dist/zx.global.js +346 -67
- package/dist/zx.global.min.js +3 -3
- package/dist/zx.min.css +1 -1
- package/docs/api.json +48 -2
- package/docs/llms.md +28 -0
- package/package.json +37 -9
- package/src/compat/base.js +291 -0
- package/src/compat/globals.js +165 -0
- package/src/compat/index.js +84 -0
- package/src/compat/map/basic.js +464 -0
- package/src/compat/map/data.js +232 -0
- package/src/compat/map/date-time.js +177 -0
- package/src/compat/map/factory.js +45 -0
- package/src/compat/map/form.js +330 -0
- package/src/compat/map/helpers.js +46 -0
- package/src/compat/map/http.js +117 -0
- package/src/compat/map/layout.js +256 -0
- package/src/compat/map/options.js +267 -0
- package/src/compat/map/select.js +198 -0
- package/src/compat/map/stubs.js +26 -0
- package/src/compat/map/utilities.js +113 -0
- package/src/compat-entry.js +11 -0
- package/src/components/badge/badge.css +147 -0
- package/src/components/badge/badge.js +92 -0
- package/src/components/breadcrumb/breadcrumb.css +105 -0
- package/src/components/breadcrumb/breadcrumb.js +331 -0
- package/src/components/button/button.css +104 -0
- package/src/components/button/button.js +76 -0
- package/src/components/check-button/check-button.css +66 -0
- package/src/components/check-button/check-button.js +167 -0
- package/src/components/checklist/checklist.css +65 -0
- package/src/components/checklist/checklist.js +282 -0
- package/src/components/checklist/field-adapter.js +46 -0
- package/src/components/context-menu/context-menu.css +54 -0
- package/src/components/context-menu/context-menu.js +334 -0
- package/src/components/copy/copy-button.css +27 -0
- package/src/components/copy/copy-button.js +78 -0
- package/src/components/copy/copy-input.css +59 -0
- package/src/components/copy/copy-input.js +123 -0
- package/src/components/data-filter/data-filter.css +53 -0
- package/src/components/data-filter/data-filter.js +400 -0
- package/src/components/data-filter/filter-core.js +128 -0
- package/src/components/date-picker/date-picker.css +181 -0
- package/src/components/date-picker/date-picker.js +500 -0
- package/src/components/date-picker/date-range-picker.css +264 -0
- package/src/components/date-picker/date-range-picker.js +990 -0
- package/src/components/date-picker/field-adapter.js +36 -0
- package/src/components/date-picker/month-picker.js +223 -0
- package/src/components/date-picker/range-field-adapter.js +31 -0
- package/src/components/date-picker/time-picker.css +191 -0
- package/src/components/date-picker/time-picker.js +406 -0
- package/src/components/datebox/date-range-box.css +128 -0
- package/src/components/datebox/date-range-box.js +492 -0
- package/src/components/datebox/datebox.css +108 -0
- package/src/components/datebox/datebox.js +358 -0
- package/src/components/datebox/field-adapter.js +34 -0
- package/src/components/dialog/dialog.css +74 -0
- package/src/components/dialog/dialog.js +450 -0
- package/src/components/dropdown/dropdown.css +24 -0
- package/src/components/dropdown/dropdown.js +288 -0
- package/src/components/empty-state/empty-state.css +80 -0
- package/src/components/empty-state/empty-state.js +92 -0
- package/src/components/field/field.css +127 -0
- package/src/components/field/field.js +605 -0
- package/src/components/field-upload/field-adapter.js +21 -0
- package/src/components/field-upload/field-upload.css +108 -0
- package/src/components/field-upload/field-upload.js +475 -0
- package/src/components/fieldset/fieldset.css +37 -0
- package/src/components/fieldset/fieldset.js +307 -0
- package/src/components/finder/finder.css +98 -0
- package/src/components/finder/finder.js +509 -0
- package/src/components/form/form.css +32 -0
- package/src/components/form/form.js +302 -0
- package/src/components/groupbox/groupbox.css +51 -0
- package/src/components/groupbox/groupbox.js +199 -0
- package/src/components/layout/layout.css +117 -0
- package/src/components/layout/layout.js +136 -0
- package/src/components/loading/inline-loading.css +34 -0
- package/src/components/loading/inline-loading.js +140 -0
- package/src/components/loading/progress-bar.css +115 -0
- package/src/components/loading/progress-bar.js +259 -0
- package/src/components/loading/spinner.css +58 -0
- package/src/components/loading/spinner.js +57 -0
- package/src/components/master-panel/master-panel.css +51 -0
- package/src/components/master-panel/master-panel.js +203 -0
- package/src/components/menu-button/menu-button.css +49 -0
- package/src/components/menu-button/menu-button.js +294 -0
- package/src/components/message/message.css +122 -0
- package/src/components/message/message.js +499 -0
- package/src/components/modal/modal.css +47 -0
- package/src/components/modal/modal.js +203 -0
- package/src/components/multi-value-editor/field-adapter.js +44 -0
- package/src/components/multi-value-editor/multi-value-editor.css +56 -0
- package/src/components/multi-value-editor/multi-value-editor.js +170 -0
- package/src/components/navigation-bar/navigation-bar.css +130 -0
- package/src/components/navigation-bar/navigation-bar.js +450 -0
- package/src/components/number-field/field-adapter.js +40 -0
- package/src/components/number-field/number-field.css +77 -0
- package/src/components/number-field/number-field.js +545 -0
- package/src/components/pagination/pagination.css +95 -0
- package/src/components/pagination/pagination.js +481 -0
- package/src/components/panel/panel.css +123 -0
- package/src/components/panel/panel.js +336 -0
- package/src/components/permission/permission.css +47 -0
- package/src/components/permission/permission.js +198 -0
- package/src/components/rating/field-adapter.js +34 -0
- package/src/components/rating/rating.css +97 -0
- package/src/components/rating/rating.js +395 -0
- package/src/components/search/search.css +70 -0
- package/src/components/search/search.js +193 -0
- package/src/components/select/field-adapter.js +24 -0
- package/src/components/select/filter.js +39 -0
- package/src/components/select/select.css +180 -0
- package/src/components/select/select.js +663 -0
- package/src/components/skeleton/skeleton.css +76 -0
- package/src/components/skeleton/skeleton.js +139 -0
- package/src/components/slider/field-adapter.js +36 -0
- package/src/components/slider/slider.css +181 -0
- package/src/components/slider/slider.js +399 -0
- package/src/components/split-view/split-view.css +139 -0
- package/src/components/split-view/split-view.js +806 -0
- package/src/components/stepper/stepper.css +234 -0
- package/src/components/stepper/stepper.js +459 -0
- package/src/components/stepper/steps.js +131 -0
- package/src/components/tabbox/tabbox.css +281 -0
- package/src/components/tabbox/tabbox.js +484 -0
- package/src/components/table/sort.js +85 -0
- package/src/components/table/table.css +364 -0
- package/src/components/table/table.js +1693 -0
- package/src/components/tag-picker/field-adapter.js +35 -0
- package/src/components/tag-picker/tag-picker.css +169 -0
- package/src/components/tag-picker/tag-picker.js +837 -0
- package/src/components/timebox/field-adapter.js +24 -0
- package/src/components/timebox/timebox.css +51 -0
- package/src/components/timebox/timebox.js +276 -0
- package/src/components/toggle/field-adapter.js +24 -0
- package/src/components/toggle/toggle.css +66 -0
- package/src/components/toggle/toggle.js +150 -0
- package/src/components/toolbar/toolbar.css +81 -0
- package/src/components/toolbar/toolbar.js +511 -0
- package/src/components/tooltip/tooltip.css +36 -0
- package/src/components/tooltip/tooltip.js +420 -0
- package/src/components/tree/hierarchy.js +151 -0
- package/src/components/tree/tree.css +99 -0
- package/src/components/tree/tree.js +784 -0
- package/src/components/truncate/truncate.css +20 -0
- package/src/components/truncate/truncate.js +92 -0
- package/src/components/value-list/field-adapter.js +24 -0
- package/src/components/value-list/value-list.css +108 -0
- package/src/components/value-list/value-list.js +336 -0
- package/src/core/breakpoint.js +150 -0
- package/src/core/component.js +292 -0
- package/src/core/date.js +216 -0
- package/src/core/dom.js +260 -0
- package/src/core/export.js +204 -0
- package/src/core/fontawesome.js +177 -0
- package/src/core/format.js +283 -0
- package/src/core/http.js +246 -0
- package/src/core/i18n.js +83 -0
- package/src/core/icons.js +283 -0
- package/src/core/keyboard.js +240 -0
- package/src/core/position.js +177 -0
- package/src/core/storage.js +175 -0
- package/src/core/util.js +336 -0
- package/src/elements/define.js +715 -0
- package/src/elements/reflect.js +79 -0
- package/src/index.js +131 -0
- package/src/zeyos/connect.js +142 -0
- package/src/zeyos/form.js +254 -0
- package/src/zeyos/icons.js +92 -0
- package/src/zeyos/index.js +21 -0
- package/src/zeyos/modules.js +269 -0
- package/src/zeyos/query.js +199 -0
- package/src/zeyos/schema.js +474 -0
- package/src/zeyos/select.js +175 -0
- package/src/zeyos/table.js +272 -0
- package/styles/base.css +124 -0
- package/styles/icons.css +34 -0
- package/styles/tokens/dark.css +84 -0
- package/styles/tokens/density.css +9 -0
- package/styles/tokens/global.css +80 -0
- package/styles/tokens/modules.css +109 -0
- package/styles/tokens/semantic.css +49 -0
- package/styles/zx.css +61 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { Component } from '../../core/component.js';
|
|
2
|
+
export type PanelContent = string | Node | Component | null;
|
|
3
|
+
export type PanelButtonDescriptor = {
|
|
4
|
+
/**
|
|
5
|
+
* Visible button label.
|
|
6
|
+
*/
|
|
7
|
+
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Icon name from the kernel icon set.
|
|
10
|
+
*/
|
|
11
|
+
icon?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Visual intent.
|
|
14
|
+
*/
|
|
15
|
+
kind?: 'default' | 'primary' | 'danger' | 'ghost';
|
|
16
|
+
/**
|
|
17
|
+
* Control size.
|
|
18
|
+
*/
|
|
19
|
+
size?: 'md' | 'sm';
|
|
20
|
+
/**
|
|
21
|
+
* Whether the button is disabled.
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Native title text.
|
|
26
|
+
*/
|
|
27
|
+
title?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Click callback.
|
|
30
|
+
*/
|
|
31
|
+
onclick?: (event: MouseEvent) => void;
|
|
32
|
+
};
|
|
33
|
+
export type PanelButton = Element | PanelButtonDescriptor;
|
|
34
|
+
export type PanelOptions = {
|
|
35
|
+
/**
|
|
36
|
+
* Section title.
|
|
37
|
+
*/
|
|
38
|
+
title?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Initial body content.
|
|
41
|
+
*/
|
|
42
|
+
content?: PanelContent;
|
|
43
|
+
/**
|
|
44
|
+
* Initial expanded state.
|
|
45
|
+
*/
|
|
46
|
+
open?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the header toggles the body.
|
|
49
|
+
*/
|
|
50
|
+
collapsible?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Header actions, right-aligned next to the title.
|
|
53
|
+
*/
|
|
54
|
+
buttons?: PanelButton[];
|
|
55
|
+
/**
|
|
56
|
+
* Optional footer content.
|
|
57
|
+
*/
|
|
58
|
+
footer?: PanelContent;
|
|
59
|
+
/**
|
|
60
|
+
* Footer actions, right-aligned in the footer bar.
|
|
61
|
+
*/
|
|
62
|
+
footerButtons?: PanelButton[];
|
|
63
|
+
/**
|
|
64
|
+
* Open callback.
|
|
65
|
+
*/
|
|
66
|
+
onopen?: (event: CustomEvent<Record<string, never>>) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Close callback.
|
|
69
|
+
*/
|
|
70
|
+
onclose?: (event: CustomEvent<Record<string, never>>) => void;
|
|
71
|
+
};
|
|
72
|
+
/** @typedef {string|Node|Component|null} PanelContent */
|
|
73
|
+
/**
|
|
74
|
+
* @typedef {Object} PanelButtonDescriptor
|
|
75
|
+
* @property {string} [label=''] Visible button label.
|
|
76
|
+
* @property {string|null} [icon=null] Icon name from the kernel icon set.
|
|
77
|
+
* @property {'default'|'primary'|'danger'|'ghost'} [kind='default'] Visual intent.
|
|
78
|
+
* @property {'md'|'sm'} [size='md'] Control size.
|
|
79
|
+
* @property {boolean} [disabled=false] Whether the button is disabled.
|
|
80
|
+
* @property {string} [title] Native title text.
|
|
81
|
+
* @property {(event: MouseEvent) => void} [onclick] Click callback.
|
|
82
|
+
*/
|
|
83
|
+
/** @typedef {Element|PanelButtonDescriptor} PanelButton */
|
|
84
|
+
/**
|
|
85
|
+
* @typedef {Object} PanelOptions
|
|
86
|
+
* @property {string} [title=''] Section title.
|
|
87
|
+
* @property {PanelContent} [content=null] Initial body content.
|
|
88
|
+
* @property {boolean} [open=true] Initial expanded state.
|
|
89
|
+
* @property {boolean} [collapsible=true] Whether the header toggles the body.
|
|
90
|
+
* @property {PanelButton[]} [buttons=[]] Header actions, right-aligned next to the title.
|
|
91
|
+
* @property {PanelContent} [footer=null] Optional footer content.
|
|
92
|
+
* @property {PanelButton[]} [footerButtons=[]] Footer actions, right-aligned in the footer bar.
|
|
93
|
+
* @property {(event: CustomEvent<Record<string, never>>) => void} [onopen] Open callback.
|
|
94
|
+
* @property {(event: CustomEvent<Record<string, never>>) => void} [onclose] Close callback.
|
|
95
|
+
*/
|
|
96
|
+
/**
|
|
97
|
+
* Framed, optionally collapsible titled section.
|
|
98
|
+
*
|
|
99
|
+
* The header is a row rather than one big button: the title and chevron form the collapse control
|
|
100
|
+
* and the action area sits beside it, because a button may not contain other buttons.
|
|
101
|
+
* @fires Panel#open
|
|
102
|
+
* @fires Panel#close
|
|
103
|
+
* @extends {Component<PanelOptions>}
|
|
104
|
+
*/
|
|
105
|
+
export declare class Panel extends Component<PanelOptions> {
|
|
106
|
+
_createdRoot: boolean;
|
|
107
|
+
_original: {
|
|
108
|
+
attributes: Array<[string, string]>;
|
|
109
|
+
children: Node[];
|
|
110
|
+
};
|
|
111
|
+
_cleaned: boolean;
|
|
112
|
+
_open: boolean;
|
|
113
|
+
_collapsible: boolean;
|
|
114
|
+
_hasFooterContent: boolean;
|
|
115
|
+
static cssName: string;
|
|
116
|
+
/** @type {Readonly<PanelOptions>} */
|
|
117
|
+
static defaults: Readonly<PanelOptions>;
|
|
118
|
+
/**
|
|
119
|
+
* Creates or enhances a panel.
|
|
120
|
+
* @param {Element|string|null} target Existing container, selector, or null.
|
|
121
|
+
* @param {PanelOptions} [options={}] Panel options.
|
|
122
|
+
*/
|
|
123
|
+
constructor(target: Element | string | null, options?: PanelOptions);
|
|
124
|
+
/** @returns {HTMLElement} */
|
|
125
|
+
render(): HTMLElement;
|
|
126
|
+
/**
|
|
127
|
+
* Replaces the visible title.
|
|
128
|
+
* @param {string} title Next title.
|
|
129
|
+
* @returns {this}
|
|
130
|
+
*/
|
|
131
|
+
setTitle(title: string): this;
|
|
132
|
+
/**
|
|
133
|
+
* Replaces the panel body.
|
|
134
|
+
* @param {PanelContent} content Next text, node, component, or null to clear.
|
|
135
|
+
* @returns {this}
|
|
136
|
+
*/
|
|
137
|
+
setContent(content: PanelContent): this;
|
|
138
|
+
/**
|
|
139
|
+
* Replaces the header action area, right-aligned beside the title.
|
|
140
|
+
* @param {PanelButton[]} list Button descriptors or elements.
|
|
141
|
+
* @returns {this}
|
|
142
|
+
*/
|
|
143
|
+
setButtons(list: PanelButton[]): this;
|
|
144
|
+
/**
|
|
145
|
+
* Replaces or removes the footer content. The footer bar appears whenever it has content,
|
|
146
|
+
* footer buttons, or both.
|
|
147
|
+
* @param {PanelContent} content Next footer content, or null to remove it.
|
|
148
|
+
* @returns {this}
|
|
149
|
+
*/
|
|
150
|
+
setFooter(content: PanelContent): this;
|
|
151
|
+
/**
|
|
152
|
+
* Replaces the footer action area, right-aligned in the footer bar.
|
|
153
|
+
* @param {PanelButton[]} list Button descriptors or elements.
|
|
154
|
+
* @returns {this}
|
|
155
|
+
*/
|
|
156
|
+
setFooterButtons(list: PanelButton[]): this;
|
|
157
|
+
/**
|
|
158
|
+
* Expands the panel.
|
|
159
|
+
* @returns {this}
|
|
160
|
+
* @fires Panel#open
|
|
161
|
+
*/
|
|
162
|
+
open(): this;
|
|
163
|
+
/**
|
|
164
|
+
* Collapses the panel.
|
|
165
|
+
* @returns {this}
|
|
166
|
+
* @fires Panel#close
|
|
167
|
+
*/
|
|
168
|
+
close(): this;
|
|
169
|
+
/**
|
|
170
|
+
* Toggles the panel's expanded state.
|
|
171
|
+
* @returns {this}
|
|
172
|
+
* @fires Panel#open
|
|
173
|
+
* @fires Panel#close
|
|
174
|
+
*/
|
|
175
|
+
toggle(): this;
|
|
176
|
+
/**
|
|
177
|
+
* Reports whether the body is expanded.
|
|
178
|
+
* @returns {boolean}
|
|
179
|
+
*/
|
|
180
|
+
isOpen(): boolean;
|
|
181
|
+
/** @returns {void} */
|
|
182
|
+
destroy(): void;
|
|
183
|
+
/** @returns {void} */
|
|
184
|
+
_syncOpenState(): void;
|
|
185
|
+
/** @returns {void} */
|
|
186
|
+
_syncFooter(): void;
|
|
187
|
+
/**
|
|
188
|
+
* Turns button descriptors into elements, passing through any Element unchanged.
|
|
189
|
+
* @param {PanelButton[]} list Button descriptors or elements.
|
|
190
|
+
* @param {string} label Error-message prefix.
|
|
191
|
+
* @returns {Element[]}
|
|
192
|
+
*/
|
|
193
|
+
_buildButtons(list: PanelButton[], label: string): Element[];
|
|
194
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Component } from '../../core/component.js';
|
|
2
|
+
import { Select } from '../select/select.js';
|
|
3
|
+
export type PermissionGroup = Record<string, any> | string | number | boolean | symbol | bigint | null | undefined;
|
|
4
|
+
export type PermissionOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* Public, private, or group ID.
|
|
7
|
+
*/
|
|
8
|
+
value?: boolean | string | number | symbol | bigint | null;
|
|
9
|
+
/**
|
|
10
|
+
* Available groups.
|
|
11
|
+
*/
|
|
12
|
+
groups?: PermissionGroup[];
|
|
13
|
+
/**
|
|
14
|
+
* Group ID property or reader.
|
|
15
|
+
*/
|
|
16
|
+
groupsValueKey?: string | ((item: PermissionGroup) => unknown);
|
|
17
|
+
/**
|
|
18
|
+
* Group label property or reader.
|
|
19
|
+
*/
|
|
20
|
+
groupsLabelKey?: string | ((item: PermissionGroup) => string);
|
|
21
|
+
/**
|
|
22
|
+
* Localized messages.
|
|
23
|
+
*/
|
|
24
|
+
msg?: Record<string, string> | Record<string, Record<string, string>>;
|
|
25
|
+
/**
|
|
26
|
+
* Change listener.
|
|
27
|
+
*/
|
|
28
|
+
onchange?: (event: CustomEvent<PermissionChangeDetail>) => void;
|
|
29
|
+
};
|
|
30
|
+
export type PermissionChangeDetail = {
|
|
31
|
+
value: unknown;
|
|
32
|
+
};
|
|
33
|
+
/** @typedef {Record<string, any>|string|number|boolean|symbol|bigint|null|undefined} PermissionGroup */
|
|
34
|
+
/**
|
|
35
|
+
* @typedef {Object} PermissionOptions
|
|
36
|
+
* @property {boolean|string|number|symbol|bigint|null} [value=true] Public, private, or group ID.
|
|
37
|
+
* @property {PermissionGroup[]} [groups=[]] Available groups.
|
|
38
|
+
* @property {string|((item: PermissionGroup) => unknown)} [groupsValueKey='ID'] Group ID property or reader.
|
|
39
|
+
* @property {string|((item: PermissionGroup) => string)} [groupsLabelKey='name'] Group label property or reader.
|
|
40
|
+
* @property {Record<string, string>|Record<string, Record<string, string>>} [msg] Localized messages.
|
|
41
|
+
* @property {(event: CustomEvent<PermissionChangeDetail>) => void} [onchange] Change listener.
|
|
42
|
+
*/
|
|
43
|
+
/** @typedef {{value: unknown}} PermissionChangeDetail */
|
|
44
|
+
/**
|
|
45
|
+
* Record-permission choice for private, public, and group access.
|
|
46
|
+
*
|
|
47
|
+
* @fires Permission#change
|
|
48
|
+
* @extends {Component<PermissionOptions>}
|
|
49
|
+
*/
|
|
50
|
+
export declare class Permission extends Component<PermissionOptions> {
|
|
51
|
+
_mode: string;
|
|
52
|
+
_groupValue: any;
|
|
53
|
+
_groupSelect: Select;
|
|
54
|
+
_createdRoot: boolean;
|
|
55
|
+
_originalChildren: any[] | ChildNode[];
|
|
56
|
+
_root: HTMLElement;
|
|
57
|
+
_originalState: string;
|
|
58
|
+
static cssName: string;
|
|
59
|
+
/** @type {PermissionOptions} */
|
|
60
|
+
static defaults: PermissionOptions;
|
|
61
|
+
/** @returns {HTMLElement} */
|
|
62
|
+
render(): HTMLElement;
|
|
63
|
+
/** Returns the normalized permission value. @returns {'private'|'public'|unknown} */
|
|
64
|
+
get(): 'private' | 'public' | unknown;
|
|
65
|
+
/**
|
|
66
|
+
* Sets a public, private, or group permission.
|
|
67
|
+
* @param {boolean|string|number|symbol|bigint|null} value Permission value.
|
|
68
|
+
* @param {{silent?: boolean}} [options={}] Update behavior.
|
|
69
|
+
* @returns {this}
|
|
70
|
+
* @fires Permission#change
|
|
71
|
+
*/
|
|
72
|
+
set(value: boolean | string | number | symbol | bigint | null, { silent }?: {
|
|
73
|
+
silent?: boolean;
|
|
74
|
+
}): this;
|
|
75
|
+
/** Destroys the embedded Select and restores an enhanced target. @returns {void} */
|
|
76
|
+
destroy(): void;
|
|
77
|
+
/** @returns {void} */
|
|
78
|
+
_selectGroupMode(): void;
|
|
79
|
+
/** @returns {void} */
|
|
80
|
+
_sync(): void;
|
|
81
|
+
/**
|
|
82
|
+
* @param {string} name
|
|
83
|
+
* @param {'private'|'public'|'group'} value
|
|
84
|
+
* @param {string} text
|
|
85
|
+
* @returns {{label: HTMLLabelElement, input: HTMLInputElement}}
|
|
86
|
+
*/
|
|
87
|
+
_choice(name: string, value: 'private' | 'public' | 'group', text: string): {
|
|
88
|
+
label: HTMLLabelElement;
|
|
89
|
+
input: HTMLInputElement;
|
|
90
|
+
};
|
|
91
|
+
/** @param {string} key @param {string} fallback @returns {string} */
|
|
92
|
+
_message(key: string, fallback: string): string;
|
|
93
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { Component } from '../../core/component.js';
|
|
2
|
+
export type RatingOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Initial rating; 0 means unrated.
|
|
5
|
+
*/
|
|
6
|
+
value?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Number of symbols.
|
|
9
|
+
*/
|
|
10
|
+
max?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Whether half steps are selectable.
|
|
13
|
+
*/
|
|
14
|
+
allowHalf?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether re-selecting the current value clears it.
|
|
17
|
+
*/
|
|
18
|
+
clearable?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the rating is display-only.
|
|
21
|
+
*/
|
|
22
|
+
readonly?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether interaction is disabled.
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Accessible name of the group.
|
|
29
|
+
*/
|
|
30
|
+
label?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Icon name used for each symbol.
|
|
33
|
+
*/
|
|
34
|
+
icon?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Per-step accessible names, lowest first.
|
|
37
|
+
*/
|
|
38
|
+
labels?: string[] | null;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to render the numeric value beside the symbols.
|
|
41
|
+
*/
|
|
42
|
+
showValue?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Optional rating count rendered beside the value.
|
|
45
|
+
*/
|
|
46
|
+
count?: number | null;
|
|
47
|
+
/**
|
|
48
|
+
* Symbol size.
|
|
49
|
+
*/
|
|
50
|
+
size?: 'sm' | 'md' | 'lg';
|
|
51
|
+
/**
|
|
52
|
+
* Localized messages.
|
|
53
|
+
*/
|
|
54
|
+
msg?: Record<string, string> | Record<string, Record<string, string>>;
|
|
55
|
+
/**
|
|
56
|
+
* Change listener.
|
|
57
|
+
*/
|
|
58
|
+
onchange?: (event: CustomEvent<{
|
|
59
|
+
value: number;
|
|
60
|
+
}>) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Hover-preview listener.
|
|
63
|
+
*/
|
|
64
|
+
onhover?: (event: CustomEvent<{
|
|
65
|
+
value: number | null;
|
|
66
|
+
}>) => void;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* @typedef {Object} RatingOptions
|
|
70
|
+
* @property {number} [value=0] Initial rating; 0 means unrated.
|
|
71
|
+
* @property {number} [max=5] Number of symbols.
|
|
72
|
+
* @property {boolean} [allowHalf=false] Whether half steps are selectable.
|
|
73
|
+
* @property {boolean} [clearable=true] Whether re-selecting the current value clears it.
|
|
74
|
+
* @property {boolean} [readonly=false] Whether the rating is display-only.
|
|
75
|
+
* @property {boolean} [disabled=false] Whether interaction is disabled.
|
|
76
|
+
* @property {string} [label='Rating'] Accessible name of the group.
|
|
77
|
+
* @property {string} [icon='star'] Icon name used for each symbol.
|
|
78
|
+
* @property {string[]|null} [labels=null] Per-step accessible names, lowest first.
|
|
79
|
+
* @property {boolean} [showValue=false] Whether to render the numeric value beside the symbols.
|
|
80
|
+
* @property {number|null} [count=null] Optional rating count rendered beside the value.
|
|
81
|
+
* @property {'sm'|'md'|'lg'} [size='md'] Symbol size.
|
|
82
|
+
* @property {Record<string, string>|Record<string, Record<string, string>>} [msg] Localized messages.
|
|
83
|
+
* @property {(event: CustomEvent<{value: number}>) => void} [onchange] Change listener.
|
|
84
|
+
* @property {(event: CustomEvent<{value: number|null}>) => void} [onhover] Hover-preview listener.
|
|
85
|
+
*/
|
|
86
|
+
/**
|
|
87
|
+
* Star-rating control implementing the APG radio-group pattern: one radio per selectable step,
|
|
88
|
+
* a single tab stop, and arrow-key navigation. Half steps add a second radio per symbol rather
|
|
89
|
+
* than bending the radio semantics, so every reachable value has a real, nameable control.
|
|
90
|
+
*
|
|
91
|
+
* @fires Rating#change
|
|
92
|
+
* @fires Rating#hover
|
|
93
|
+
* @extends {Component<RatingOptions>}
|
|
94
|
+
*/
|
|
95
|
+
export declare class Rating extends Component<RatingOptions> {
|
|
96
|
+
_value: number;
|
|
97
|
+
_preview: any;
|
|
98
|
+
_disabled: boolean;
|
|
99
|
+
_readonly: boolean;
|
|
100
|
+
_radios: any[];
|
|
101
|
+
_createdRoot: boolean;
|
|
102
|
+
_snapshot: import("../../core/dom.js").TargetSnapshot;
|
|
103
|
+
_max: number;
|
|
104
|
+
_step: number;
|
|
105
|
+
_name: string;
|
|
106
|
+
_count: number;
|
|
107
|
+
static cssName: string;
|
|
108
|
+
/** @type {RatingOptions} */
|
|
109
|
+
static defaults: RatingOptions;
|
|
110
|
+
/** @returns {HTMLElement} */
|
|
111
|
+
render(): HTMLElement;
|
|
112
|
+
/** Current rating. @returns {number} */
|
|
113
|
+
get value(): number;
|
|
114
|
+
/** @param {number} next Next rating. */
|
|
115
|
+
set value(next: number);
|
|
116
|
+
/**
|
|
117
|
+
* Returns the current rating.
|
|
118
|
+
* @returns {number}
|
|
119
|
+
*/
|
|
120
|
+
get(): number;
|
|
121
|
+
/**
|
|
122
|
+
* Sets the rating, snapped to the configured step and clamped to `[0, max]`.
|
|
123
|
+
* @param {number} next Next rating; 0 clears it.
|
|
124
|
+
* @param {{silent?: boolean}} [options={}] Set `silent` to suppress `change`.
|
|
125
|
+
* @returns {this}
|
|
126
|
+
* @fires Rating#change
|
|
127
|
+
*/
|
|
128
|
+
set(next: number, { silent }?: {
|
|
129
|
+
silent?: boolean;
|
|
130
|
+
}): this;
|
|
131
|
+
/**
|
|
132
|
+
* Clears the rating.
|
|
133
|
+
* @param {{silent?: boolean}} [options={}] Set `silent` to suppress `change`.
|
|
134
|
+
* @returns {this}
|
|
135
|
+
*/
|
|
136
|
+
clear({ silent }?: {
|
|
137
|
+
silent?: boolean;
|
|
138
|
+
}): this;
|
|
139
|
+
/**
|
|
140
|
+
* Restores the configured initial value.
|
|
141
|
+
* @param {{silent?: boolean}} [options={}] Reset behavior.
|
|
142
|
+
* @returns {this}
|
|
143
|
+
*/
|
|
144
|
+
reset({ silent }?: {
|
|
145
|
+
silent?: boolean;
|
|
146
|
+
}): this;
|
|
147
|
+
/**
|
|
148
|
+
* Replaces the rating count shown beside the value.
|
|
149
|
+
* @param {number|null} count Number of ratings, or null to hide it.
|
|
150
|
+
* @returns {this}
|
|
151
|
+
*/
|
|
152
|
+
setCount(count: number | null): this;
|
|
153
|
+
/** Focuses the selected step, or the first one when unrated. @returns {this} */
|
|
154
|
+
focus(): this;
|
|
155
|
+
/** Enables user interaction. @returns {this} */
|
|
156
|
+
enable(): this;
|
|
157
|
+
/** Disables user interaction. @returns {this} */
|
|
158
|
+
disable(): this;
|
|
159
|
+
/**
|
|
160
|
+
* Sets the read-only state.
|
|
161
|
+
* @param {boolean} readonly Whether the rating is display-only.
|
|
162
|
+
* @returns {this}
|
|
163
|
+
*/
|
|
164
|
+
setReadonly(readonly: boolean): this;
|
|
165
|
+
/**
|
|
166
|
+
* Builds one selectable step.
|
|
167
|
+
* @param {number} value Step value.
|
|
168
|
+
* @param {'half'|'full'} part Which half of the symbol the control covers.
|
|
169
|
+
* @returns {HTMLButtonElement}
|
|
170
|
+
*/
|
|
171
|
+
_radio(value: number, part: 'half' | 'full'): HTMLButtonElement;
|
|
172
|
+
/**
|
|
173
|
+
* @param {number} value Step value.
|
|
174
|
+
* @returns {string}
|
|
175
|
+
*/
|
|
176
|
+
_stepLabel(value: number): string;
|
|
177
|
+
/**
|
|
178
|
+
* Resolves a localized message, falling back to a built-in template.
|
|
179
|
+
* @param {string} key Message key.
|
|
180
|
+
* @param {string} fallback Template used when the host has no translation.
|
|
181
|
+
* @param {unknown[]} args Positional interpolation values.
|
|
182
|
+
* @returns {string}
|
|
183
|
+
*/
|
|
184
|
+
_message(key: string, fallback: string, args: unknown[]): string;
|
|
185
|
+
/**
|
|
186
|
+
* Applies an activation, honoring `clearable`.
|
|
187
|
+
* @param {number} value Step value.
|
|
188
|
+
* @param {boolean} allowClear Whether re-selecting the current value may clear it. Keyboard
|
|
189
|
+
* activation never clears, because the APG radio pattern requires Space on an already
|
|
190
|
+
* checked radio to do nothing.
|
|
191
|
+
* @returns {void}
|
|
192
|
+
*/
|
|
193
|
+
_choose(value: number, allowClear: boolean): void;
|
|
194
|
+
/** @param {KeyboardEvent} event @returns {void} */
|
|
195
|
+
_onKeydown(event: KeyboardEvent): void;
|
|
196
|
+
/**
|
|
197
|
+
* @param {number|null} value Previewed value, or null to drop the preview.
|
|
198
|
+
* @returns {void}
|
|
199
|
+
*/
|
|
200
|
+
_setPreview(value: number | null): void;
|
|
201
|
+
/** @param {unknown} raw @returns {number} */
|
|
202
|
+
_clamp(raw: unknown): number;
|
|
203
|
+
/** @returns {void} */
|
|
204
|
+
_sync(): void;
|
|
205
|
+
/** Paints the filled portion of every symbol from the preview or the value. @returns {void} */
|
|
206
|
+
_paint(): void;
|
|
207
|
+
/** @returns {void} */
|
|
208
|
+
_syncReadout(): void;
|
|
209
|
+
/** @returns {void} */
|
|
210
|
+
_syncDisabled(): void;
|
|
211
|
+
/** Restores an enhanced target to the markup it had before the takeover. @returns {void} */
|
|
212
|
+
destroy(): void;
|
|
213
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Component } from '../../core/component.js';
|
|
2
|
+
export type SearchOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Input placeholder.
|
|
5
|
+
*/
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Initial query.
|
|
9
|
+
*/
|
|
10
|
+
value?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to show a clear control.
|
|
13
|
+
*/
|
|
14
|
+
clearable?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Input debounce in milliseconds.
|
|
17
|
+
*/
|
|
18
|
+
debounce?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Input callback.
|
|
21
|
+
*/
|
|
22
|
+
oninput?: (event: CustomEvent<{
|
|
23
|
+
value: string;
|
|
24
|
+
}>) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Submit callback.
|
|
27
|
+
*/
|
|
28
|
+
onsubmit?: (event: CustomEvent<{
|
|
29
|
+
value: string;
|
|
30
|
+
}>) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Clear callback.
|
|
33
|
+
*/
|
|
34
|
+
onclear?: (event: CustomEvent<Record<string, never>>) => void;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @typedef {Object} SearchOptions
|
|
38
|
+
* @property {string} [placeholder=''] Input placeholder.
|
|
39
|
+
* @property {string} [value=''] Initial query.
|
|
40
|
+
* @property {boolean} [clearable=true] Whether to show a clear control.
|
|
41
|
+
* @property {number} [debounce=250] Input debounce in milliseconds.
|
|
42
|
+
* @property {(event: CustomEvent<{value: string}>) => void} [oninput] Input callback.
|
|
43
|
+
* @property {(event: CustomEvent<{value: string}>) => void} [onsubmit] Submit callback.
|
|
44
|
+
* @property {(event: CustomEvent<Record<string, never>>) => void} [onclear] Clear callback.
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* Search field with embedded submit and optional clear controls.
|
|
48
|
+
* @fires Search#input
|
|
49
|
+
* @fires Search#submit
|
|
50
|
+
* @fires Search#clear
|
|
51
|
+
* @extends {Component<SearchOptions>}
|
|
52
|
+
*/
|
|
53
|
+
export declare class Search extends Component<SearchOptions> {
|
|
54
|
+
_createdRoot: boolean;
|
|
55
|
+
_original: {
|
|
56
|
+
attributes: [string, string][];
|
|
57
|
+
children: Node[];
|
|
58
|
+
};
|
|
59
|
+
_inputTimer: number;
|
|
60
|
+
_cleaned: boolean;
|
|
61
|
+
static cssName: string;
|
|
62
|
+
/** @type {Readonly<SearchOptions>} */
|
|
63
|
+
static defaults: Readonly<SearchOptions>;
|
|
64
|
+
/** @returns {HTMLElement} */
|
|
65
|
+
render(): HTMLElement;
|
|
66
|
+
/**
|
|
67
|
+
* Returns the current query.
|
|
68
|
+
* @returns {string}
|
|
69
|
+
*/
|
|
70
|
+
get(): string;
|
|
71
|
+
/**
|
|
72
|
+
* Sets the current query.
|
|
73
|
+
* @param {string} value Next query.
|
|
74
|
+
* @param {{silent?: boolean}} [options={}] Set `silent` to suppress `input`.
|
|
75
|
+
* @returns {this}
|
|
76
|
+
*/
|
|
77
|
+
set(value: string, { silent }?: {
|
|
78
|
+
silent?: boolean;
|
|
79
|
+
}): this;
|
|
80
|
+
/**
|
|
81
|
+
* Focuses the input.
|
|
82
|
+
* @returns {this}
|
|
83
|
+
*/
|
|
84
|
+
focus(): this;
|
|
85
|
+
/**
|
|
86
|
+
* Clears the query and reports both the value update and clear action.
|
|
87
|
+
* @returns {this}
|
|
88
|
+
* @fires Search#input
|
|
89
|
+
* @fires Search#clear
|
|
90
|
+
*/
|
|
91
|
+
clear(): this;
|
|
92
|
+
/** @returns {void} */
|
|
93
|
+
destroy(): void;
|
|
94
|
+
/** @returns {void} */
|
|
95
|
+
_scheduleInput(): void;
|
|
96
|
+
/** @returns {void} */
|
|
97
|
+
_syncClear(): void;
|
|
98
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns items whose searchable values contain every query word.
|
|
3
|
+
* Matching is case- and diacritic-insensitive.
|
|
4
|
+
*
|
|
5
|
+
* @template T
|
|
6
|
+
* @param {T[]} items Items to search.
|
|
7
|
+
* @param {string} query User-entered search text.
|
|
8
|
+
* @param {Array<string|((item: T) => unknown)>} keys Searchable object keys or value readers.
|
|
9
|
+
* @returns {T[]} Matching items in their original order.
|
|
10
|
+
*/
|
|
11
|
+
export declare function matchItems<T>(items: T[], query: string, keys: Array<string | ((item: T) => unknown)>): T[];
|