@nova-design-system/nova-webcomponents 3.0.0-beta.28 → 3.0.0-beta.30
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/dist/blazor-docs.json +1345 -174
- package/dist/cjs/index-c50face0.js +14 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/{nv-badge.cjs.entry.js → nv-badge_2.cjs.entry.js} +44 -4
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1038 -0
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtoggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js +1 -1
- package/dist/cjs/{nv-iconbutton.cjs.entry.js → nv-iconbutton_2.cjs.entry.js} +22 -2
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-menu.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-tablebody.cjs.entry.js +1 -1
- package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-tabledatacell.cjs.entry.js +1 -1
- package/dist/cjs/nv-tablehead.cjs.entry.js +1 -1
- package/dist/cjs/nv-tablerow.cjs.entry.js +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/nv-badge/nv-badge.css +70 -0
- package/dist/collection/components/nv-badge/nv-badge.docs.js +1 -1
- package/dist/collection/components/nv-badge/nv-badge.docs.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.js +3 -3
- package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +12 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js +6 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js.map +1 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +171 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +201 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +257 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +1578 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.js +2 -2
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-tablebody/nv-tablebody.js +1 -1
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js +1 -1
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.js +1 -1
- package/dist/collection/components/nv-tablehead/nv-tablehead.js +1 -1
- package/dist/collection/components/nv-tablerow/nv-tablerow.js +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/dev/dev-components.js +1 -1
- package/dist/collection/dev/dev-components.js.map +1 -1
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -147
- package/dist/components/nv-badge.js.map +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -121
- package/dist/components/nv-fieldcheckbox.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +5 -5
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.d.ts +11 -0
- package/dist/components/nv-fielddropdownitemcheck.js +8 -0
- package/dist/components/nv-fielddropdownitemcheck.js.map +1 -0
- package/dist/components/nv-fieldmultiselect.d.ts +11 -0
- package/dist/components/nv-fieldmultiselect.js +1129 -0
- package/dist/components/nv-fieldmultiselect.js.map +1 -0
- package/dist/components/nv-fieldnumber.js +4 -4
- package/dist/components/nv-fieldpassword.js +6 -6
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +6 -6
- package/dist/components/nv-fieldtext.js +4 -4
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtoggle.js +2 -2
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +2 -2
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-tablebody.js +1 -1
- package/dist/components/nv-tablecolumn.js +1 -1
- package/dist/components/nv-tabledatacell.js +1 -1
- package/dist/components/nv-tablehead.js +1 -1
- package/dist/components/nv-tablerow.js +1 -1
- package/dist/components/nv-tooltip.js +2 -2
- package/dist/components/p-5ce661bd.js +125 -0
- package/dist/components/p-5ce661bd.js.map +1 -0
- package/dist/components/{p-45c63143.js → p-8bec002e.js} +4 -4
- package/dist/components/{p-45c63143.js.map → p-8bec002e.js.map} +1 -1
- package/dist/components/{p-8c8cf8ea.js → p-a1aa8970.js} +2 -2
- package/dist/components/{p-8c8cf8ea.js.map → p-a1aa8970.js.map} +1 -1
- package/dist/{esm/nv-badge.entry.js → components/p-a4802979.js} +51 -15
- package/dist/components/p-a4802979.js.map +1 -0
- package/dist/components/{p-45405075.js → p-b12abc99.js} +2 -2
- package/dist/components/{p-45405075.js.map → p-b12abc99.js.map} +1 -1
- package/dist/components/{p-89fb6636.js → p-d5dd3def.js} +2 -2
- package/dist/components/{p-89fb6636.js.map → p-d5dd3def.js.map} +1 -1
- package/dist/components/{p-689a7b38.js → p-d70df149.js} +2 -2
- package/dist/components/{p-689a7b38.js.map → p-d70df149.js.map} +1 -1
- package/dist/components/p-e4641c41.js +72 -0
- package/dist/components/p-e4641c41.js.map +1 -0
- package/dist/docs.json +1326 -171
- package/dist/esm/index-e7b35c14.js +14 -14
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +154 -0
- package/dist/esm/nv-badge_2.entry.js.map +1 -0
- package/dist/esm/nv-fieldmultiselect.entry.js +1034 -0
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -0
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldpassword.entry.js +3 -3
- package/dist/esm/nv-fieldradio.entry.js +3 -3
- package/dist/esm/nv-fieldselect.entry.js +5 -5
- package/dist/esm/nv-fieldtext.entry.js +3 -3
- package/dist/esm/nv-fieldtextarea.entry.js +3 -3
- package/dist/esm/nv-fieldtoggle.entry.js +2 -2
- package/dist/esm/nv-icon.entry.js +1 -1
- package/dist/esm/{nv-iconbutton.entry.js → nv-iconbutton_2.entry.js} +22 -3
- package/dist/esm/nv-iconbutton_2.entry.js.map +1 -0
- package/dist/esm/nv-menu.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-tablebody.entry.js +1 -1
- package/dist/esm/nv-tablecolumn.entry.js +1 -1
- package/dist/esm/nv-tabledatacell.entry.js +1 -1
- package/dist/esm/nv-tablehead.entry.js +1 -1
- package/dist/esm/nv-tablerow.entry.js +1 -1
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-dbae3920.entry.js → p-0fbb962b.entry.js} +2 -2
- package/dist/native/{p-81256924.entry.js → p-12eaebd6.entry.js} +2 -2
- package/dist/native/p-1c689ec7.entry.js +2 -0
- package/dist/native/{p-bdab3562.entry.js → p-305951e4.entry.js} +2 -2
- package/dist/native/p-306d1f04.entry.js +2 -0
- package/dist/native/p-306d1f04.entry.js.map +1 -0
- package/dist/native/{p-de6e0e1f.entry.js → p-3f912745.entry.js} +2 -2
- package/dist/native/p-589eb477.entry.js +2 -0
- package/dist/native/{p-e2df46e2.entry.js → p-5b4bdbe2.entry.js} +2 -2
- package/dist/native/{p-75b5fdce.entry.js → p-65ad60eb.entry.js} +2 -2
- package/dist/native/{p-ea4092a7.entry.js → p-7b2d8b8c.entry.js} +2 -2
- package/dist/native/{p-c1c661a0.entry.js → p-7b3a4cbf.entry.js} +2 -2
- package/dist/native/{p-38817aa3.entry.js → p-91d30cd7.entry.js} +2 -2
- package/dist/native/{p-c4f7e36d.entry.js → p-92e3e334.entry.js} +2 -2
- package/dist/native/{p-1edb76e1.entry.js → p-a03df637.entry.js} +2 -2
- package/dist/native/p-a5582014.entry.js +2 -0
- package/dist/native/p-a5582014.entry.js.map +1 -0
- package/dist/native/p-a7a3c45f.entry.js +2 -0
- package/dist/native/p-a7be7540.entry.js +2 -0
- package/dist/native/p-a7be7540.entry.js.map +1 -0
- package/dist/native/p-a8c0fefa.entry.js +2 -0
- package/dist/native/{p-99850272.entry.js.map → p-a8c0fefa.entry.js.map} +1 -1
- package/dist/native/{p-808cf007.entry.js → p-c8f36510.entry.js} +2 -2
- package/dist/native/p-d3d682a7.entry.js +2 -0
- package/dist/native/p-d4c0a1e0.entry.js +2 -0
- package/dist/native/{p-844f4878.entry.js → p-dbade286.entry.js} +2 -2
- package/dist/types/components/nv-badge/nv-badge.d.ts +1 -1
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +52 -0
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.d.ts +4 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +405 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.d.ts +4 -0
- package/dist/types/components.d.ts +331 -2
- package/dist/vscode-data.json +325 -1
- package/hydrate/index.js +1171 -40
- package/hydrate/index.mjs +1171 -40
- package/package.json +7 -2
- package/readme.md +5 -1
- package/dist/cjs/nv-badge.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-iconbutton.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-loader.cjs.entry.js +0 -29
- package/dist/cjs/nv-loader.cjs.entry.js.map +0 -1
- package/dist/esm/nv-badge.entry.js.map +0 -1
- package/dist/esm/nv-iconbutton.entry.js.map +0 -1
- package/dist/esm/nv-loader.entry.js +0 -25
- package/dist/esm/nv-loader.entry.js.map +0 -1
- package/dist/native/p-01be802d.entry.js +0 -2
- package/dist/native/p-0cfe2048.entry.js +0 -2
- package/dist/native/p-0cfe2048.entry.js.map +0 -1
- package/dist/native/p-28cf537b.entry.js +0 -2
- package/dist/native/p-4b926563.entry.js +0 -2
- package/dist/native/p-861f91d3.entry.js +0 -2
- package/dist/native/p-9221f72a.entry.js +0 -2
- package/dist/native/p-99850272.entry.js +0 -2
- package/dist/native/p-dba9c57c.entry.js +0 -2
- package/dist/native/p-dba9c57c.entry.js.map +0 -1
- package/dist/native/p-ed893068.entry.js +0 -2
- package/dist/native/p-ed893068.entry.js.map +0 -1
- /package/dist/native/{p-dbae3920.entry.js.map → p-0fbb962b.entry.js.map} +0 -0
- /package/dist/native/{p-81256924.entry.js.map → p-12eaebd6.entry.js.map} +0 -0
- /package/dist/native/{p-4b926563.entry.js.map → p-1c689ec7.entry.js.map} +0 -0
- /package/dist/native/{p-bdab3562.entry.js.map → p-305951e4.entry.js.map} +0 -0
- /package/dist/native/{p-de6e0e1f.entry.js.map → p-3f912745.entry.js.map} +0 -0
- /package/dist/native/{p-9221f72a.entry.js.map → p-589eb477.entry.js.map} +0 -0
- /package/dist/native/{p-e2df46e2.entry.js.map → p-5b4bdbe2.entry.js.map} +0 -0
- /package/dist/native/{p-75b5fdce.entry.js.map → p-65ad60eb.entry.js.map} +0 -0
- /package/dist/native/{p-ea4092a7.entry.js.map → p-7b2d8b8c.entry.js.map} +0 -0
- /package/dist/native/{p-c1c661a0.entry.js.map → p-7b3a4cbf.entry.js.map} +0 -0
- /package/dist/native/{p-38817aa3.entry.js.map → p-91d30cd7.entry.js.map} +0 -0
- /package/dist/native/{p-c4f7e36d.entry.js.map → p-92e3e334.entry.js.map} +0 -0
- /package/dist/native/{p-1edb76e1.entry.js.map → p-a03df637.entry.js.map} +0 -0
- /package/dist/native/{p-01be802d.entry.js.map → p-a7a3c45f.entry.js.map} +0 -0
- /package/dist/native/{p-808cf007.entry.js.map → p-c8f36510.entry.js.map} +0 -0
- /package/dist/native/{p-28cf537b.entry.js.map → p-d3d682a7.entry.js.map} +0 -0
- /package/dist/native/{p-861f91d3.entry.js.map → p-d4c0a1e0.entry.js.map} +0 -0
- /package/dist/native/{p-844f4878.entry.js.map → p-dbade286.entry.js.map} +0 -0
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { TextInputAutocomplete } from '../../utils/constants';
|
|
3
|
+
import { DropdownItemSelectedEventDetail } from '../nv-fielddropdownitem/DropdownItemSelectedEventDetail';
|
|
4
|
+
/**
|
|
5
|
+
* @slot content - The content of the list.
|
|
6
|
+
* @slot leading-input - Content to be placed before the input text, within the input container.
|
|
7
|
+
* @slot before-input - Content to be placed before the input text, outside the input container.
|
|
8
|
+
* @slot after-input - Content to be placed after the input text, outside the input container.
|
|
9
|
+
* @slot label - Content to be placed as the label, will override the label prop.
|
|
10
|
+
* @slot description - Content to be placed as the description, will override the description prop.
|
|
11
|
+
* @slot error-description - Content to be placed as the error description, will override the errorDescription prop.
|
|
12
|
+
*/
|
|
13
|
+
export declare class NvFieldmultiselect {
|
|
14
|
+
el: HTMLNvFieldmultiselectElement;
|
|
15
|
+
private inputElement;
|
|
16
|
+
private popoverElement;
|
|
17
|
+
/**
|
|
18
|
+
* Timer for debouncing input events.
|
|
19
|
+
* Private property preferred over @State as it:
|
|
20
|
+
* - Doesn't need to trigger re-renders
|
|
21
|
+
* - Is purely for internal logic
|
|
22
|
+
* - Improves performance by avoiding Stencil's reactivity system
|
|
23
|
+
*/
|
|
24
|
+
private debounceTimer;
|
|
25
|
+
/**
|
|
26
|
+
* Flag to prevent concurrent reordering operations.
|
|
27
|
+
* Private property preferred over @State as it:
|
|
28
|
+
* - Manages internal component logic without affecting UI
|
|
29
|
+
* - Avoids unnecessary re-renders
|
|
30
|
+
* - Provides better performance for rapid state changes
|
|
31
|
+
* - Only needs class-level scope
|
|
32
|
+
*/
|
|
33
|
+
private isReordering;
|
|
34
|
+
/****************************************************************************/
|
|
35
|
+
/**
|
|
36
|
+
* Sets the ID for the input element and the for attribute of the associated
|
|
37
|
+
* label. If no ID is provided, a random one will be automatically generated
|
|
38
|
+
* to ensure unique identification, facilitating proper label association and
|
|
39
|
+
* accessibility.
|
|
40
|
+
*/
|
|
41
|
+
readonly inputId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Defines the name attribute of the input field, which is crucial for form
|
|
44
|
+
* submission. This value is used as the key in the key-value pair sent to
|
|
45
|
+
* the server, representing the input's data in form submissions. It should be
|
|
46
|
+
* unique within the form to avoid conflicts.
|
|
47
|
+
*/
|
|
48
|
+
readonly name: string;
|
|
49
|
+
/**
|
|
50
|
+
* Lets you define the text that explains what users should enter in the text
|
|
51
|
+
* input field. It's a crucial element for making forms clear and user-friendly.
|
|
52
|
+
*/
|
|
53
|
+
readonly label: string;
|
|
54
|
+
/**
|
|
55
|
+
* Add helpful hints or extra information under the text input field.
|
|
56
|
+
*/
|
|
57
|
+
readonly description: string;
|
|
58
|
+
/**
|
|
59
|
+
* Display temporary text inside the input field.
|
|
60
|
+
*/
|
|
61
|
+
readonly placeholder: string;
|
|
62
|
+
/**
|
|
63
|
+
* Defines the maximum height of the multiselect list when open.
|
|
64
|
+
*/
|
|
65
|
+
readonly maxHeight: string;
|
|
66
|
+
/**
|
|
67
|
+
* Text for the badge showing the number of selected items.
|
|
68
|
+
*/
|
|
69
|
+
readonly badgeLabel: string;
|
|
70
|
+
/**
|
|
71
|
+
* The text to display when no items match the filter.
|
|
72
|
+
*/
|
|
73
|
+
readonly emptyresult: string;
|
|
74
|
+
/**
|
|
75
|
+
* Marks the input field as required.
|
|
76
|
+
*/
|
|
77
|
+
readonly required: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Alters the input field's appearance to indicate an error.
|
|
80
|
+
*/
|
|
81
|
+
readonly error: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* A description that appears when there is an error.
|
|
84
|
+
*/
|
|
85
|
+
readonly errorDescription: string;
|
|
86
|
+
/**
|
|
87
|
+
* Display the input field's content without allowing users to change it.
|
|
88
|
+
*/
|
|
89
|
+
readonly readonly: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Disables the input field.
|
|
92
|
+
*/
|
|
93
|
+
readonly disabled: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* The autocomplete prop for faster input filling.
|
|
96
|
+
*/
|
|
97
|
+
readonly autocomplete: `${TextInputAutocomplete}`;
|
|
98
|
+
/**
|
|
99
|
+
* Enables or disables the filtering feature for the multiselect items.
|
|
100
|
+
*/
|
|
101
|
+
filterable: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Specifies the value of the input field.
|
|
104
|
+
*/
|
|
105
|
+
value: string;
|
|
106
|
+
/**
|
|
107
|
+
* State of the multiselect popover.
|
|
108
|
+
*/
|
|
109
|
+
open: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Multiselect mode: 'options' (JSON data) or 'slots' (custom items).
|
|
112
|
+
* This property is now reflected in the modeState.
|
|
113
|
+
*/
|
|
114
|
+
readonly mode: 'options' | 'slots';
|
|
115
|
+
/**
|
|
116
|
+
* List of options available in the multiselect.
|
|
117
|
+
* @description The options are passed as a JSON string.
|
|
118
|
+
* @example options='[{"label": "Option 1", "value": "option1"}, {"label": "Option 2", "value": "option2"}]'
|
|
119
|
+
*/
|
|
120
|
+
readonly options?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Options configuration for the multiselect items.
|
|
123
|
+
*/
|
|
124
|
+
parsedOptions: Array<{
|
|
125
|
+
/** Label to display for the option */
|
|
126
|
+
label: string;
|
|
127
|
+
/** Value associated with the option */
|
|
128
|
+
value: string;
|
|
129
|
+
/** Whether this option is a divider */
|
|
130
|
+
isDivider?: boolean;
|
|
131
|
+
/** Whether this option is disabled */
|
|
132
|
+
disabled?: boolean;
|
|
133
|
+
/** Additional description for the option */
|
|
134
|
+
description?: string;
|
|
135
|
+
/** Whether this option is pre-checked */
|
|
136
|
+
checked?: boolean;
|
|
137
|
+
}>;
|
|
138
|
+
/**
|
|
139
|
+
* List of selected values in the multiselect.
|
|
140
|
+
*/
|
|
141
|
+
selectedValues: string[];
|
|
142
|
+
/**
|
|
143
|
+
* Sorted options for display.
|
|
144
|
+
*/
|
|
145
|
+
sortedOptions: Array<{
|
|
146
|
+
/** Label to display for the option */
|
|
147
|
+
label: string;
|
|
148
|
+
/** Value associated with the option */
|
|
149
|
+
value: string;
|
|
150
|
+
/** Whether this option is a divider */
|
|
151
|
+
isDivider?: boolean;
|
|
152
|
+
}>;
|
|
153
|
+
/**
|
|
154
|
+
* The text entered by the user for filtering multiselect items.
|
|
155
|
+
*/
|
|
156
|
+
filterText: string;
|
|
157
|
+
/**
|
|
158
|
+
* Determines whether the multiselect is filterable.
|
|
159
|
+
*/
|
|
160
|
+
isFilterable: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Delay in milliseconds before the search is triggered when typing in the filter input.
|
|
163
|
+
* @default 300
|
|
164
|
+
*/
|
|
165
|
+
readonly debounceDelay: number;
|
|
166
|
+
/**
|
|
167
|
+
* State for the mode of the multiselect.
|
|
168
|
+
* @type {'options' | 'slots'}
|
|
169
|
+
* @default 'options'
|
|
170
|
+
*/
|
|
171
|
+
modeState: 'options' | 'slots';
|
|
172
|
+
/****************************************************************************/
|
|
173
|
+
/**
|
|
174
|
+
* Subscribe to click outside event.
|
|
175
|
+
*/
|
|
176
|
+
connectedCallback(): void;
|
|
177
|
+
/**
|
|
178
|
+
* Unsubscribe from click outside event.
|
|
179
|
+
*/
|
|
180
|
+
disconnectedCallback(): void;
|
|
181
|
+
/**
|
|
182
|
+
* Event emitted when an item is selected.
|
|
183
|
+
*/
|
|
184
|
+
dropdownItemSelected: EventEmitter<DropdownItemSelectedEventDetail>;
|
|
185
|
+
/**
|
|
186
|
+
* Emitted when the input value changes.
|
|
187
|
+
* @bind value
|
|
188
|
+
*/
|
|
189
|
+
valueChanged: EventEmitter<string>;
|
|
190
|
+
/**
|
|
191
|
+
* Event emitted when the selection changes in the multiselect.
|
|
192
|
+
* Emits the current list of selected values.
|
|
193
|
+
*/
|
|
194
|
+
multiselectChange: EventEmitter<string[]>;
|
|
195
|
+
/**
|
|
196
|
+
* Emitted when the input loses focus.
|
|
197
|
+
* @param {CustomEvent<boolean>} event - The event object containing the focus state.
|
|
198
|
+
*/
|
|
199
|
+
handleOpenChanged(event: CustomEvent<boolean>): void;
|
|
200
|
+
/**
|
|
201
|
+
* Listen for the `itemChecked` event emitted by child items.
|
|
202
|
+
* @param {CustomEvent<{ value: string; checked: boolean }>} event - The event object containing the selected value and its checked state.
|
|
203
|
+
*/
|
|
204
|
+
handleItemChecked(event: CustomEvent): void;
|
|
205
|
+
/**
|
|
206
|
+
* Emitted when the options change.
|
|
207
|
+
* @param {string | Array<{label: string, value: string, isDivider?: boolean, disabled?: boolean, description?: string, checked?: boolean}>} newValue - The new value of the options.
|
|
208
|
+
*/
|
|
209
|
+
handleOptionsChange(newValue: string | Array<{
|
|
210
|
+
/** Label to display for the option */
|
|
211
|
+
label: string;
|
|
212
|
+
/** Value associated with the option */
|
|
213
|
+
value: string;
|
|
214
|
+
/** Whether this option is a divider */
|
|
215
|
+
isDivider?: boolean;
|
|
216
|
+
/** Whether this option is disabled */
|
|
217
|
+
disabled?: boolean;
|
|
218
|
+
/** Additional description for the option */
|
|
219
|
+
description?: string;
|
|
220
|
+
/** Whether this option is pre-checked */
|
|
221
|
+
checked?: boolean;
|
|
222
|
+
}>): void;
|
|
223
|
+
/**
|
|
224
|
+
* Emitted when the value changes.
|
|
225
|
+
*/
|
|
226
|
+
watchValueHandler(): void;
|
|
227
|
+
/**
|
|
228
|
+
* Emitted when the filterable property changes.
|
|
229
|
+
* @param {boolean} newValue - The new value of the filterable property.
|
|
230
|
+
*/
|
|
231
|
+
watchFilterableHandler(newValue: boolean): void;
|
|
232
|
+
handleSlotChange(event: Event): void;
|
|
233
|
+
/****************************************************************************/
|
|
234
|
+
/**
|
|
235
|
+
* Retrieves the current filter text entered by the user.
|
|
236
|
+
* @returns {string} The filter text.
|
|
237
|
+
*/
|
|
238
|
+
getFilterText(): Promise<string>;
|
|
239
|
+
/**
|
|
240
|
+
* Set the initial selection based on the current value and update the inputElement value.
|
|
241
|
+
*/
|
|
242
|
+
private setInitialSelection;
|
|
243
|
+
/**
|
|
244
|
+
* Reset the filter and make all items visible.
|
|
245
|
+
*/
|
|
246
|
+
resetFilter(): Promise<void>;
|
|
247
|
+
/**
|
|
248
|
+
* Returns the list of selected values.
|
|
249
|
+
* @returns {string[]} The selected values.
|
|
250
|
+
*/
|
|
251
|
+
getSelectedValues(): Promise<string[]>;
|
|
252
|
+
/**
|
|
253
|
+
* Reorder the content of the slot.
|
|
254
|
+
*/
|
|
255
|
+
private reorderSlotContent;
|
|
256
|
+
/**
|
|
257
|
+
* Reorder the content for options mode with async handling
|
|
258
|
+
*/
|
|
259
|
+
private reorderOptionsContent;
|
|
260
|
+
/**
|
|
261
|
+
* Filter multiselect items based on the text entered by the user.
|
|
262
|
+
*/
|
|
263
|
+
private filterItems;
|
|
264
|
+
/**
|
|
265
|
+
* Filter multiselect items in options mode.
|
|
266
|
+
*/
|
|
267
|
+
private filterOptionsItems;
|
|
268
|
+
/**
|
|
269
|
+
* Filter multiselect items in slots mode
|
|
270
|
+
*/
|
|
271
|
+
private filterSlotsItems;
|
|
272
|
+
/**
|
|
273
|
+
* Handle badge close for options mode.
|
|
274
|
+
*/
|
|
275
|
+
private handleBadgeCloseOptions;
|
|
276
|
+
/**
|
|
277
|
+
* Handle badge close for slots mode.
|
|
278
|
+
*/
|
|
279
|
+
private handleBadgeCloseSlots;
|
|
280
|
+
/**
|
|
281
|
+
* Normalizes text by removing accents and converting to lowercase
|
|
282
|
+
* @param {string} text - The text to normalize
|
|
283
|
+
* @returns {string} The normalized text
|
|
284
|
+
*
|
|
285
|
+
* @example
|
|
286
|
+
* normalizeText("Café Latte") => "cafe latte"
|
|
287
|
+
*
|
|
288
|
+
* @description
|
|
289
|
+
* This function performs text normalization in three steps:
|
|
290
|
+
* 1. Decomposes characters into their base form and combining characters (NFD)
|
|
291
|
+
* 2. Removes all diacritical marks (accents, umlauts, etc.)
|
|
292
|
+
* 3. Converts to lowercase and trims whitespace
|
|
293
|
+
*
|
|
294
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize} - MDN documentation on String.normalize()
|
|
295
|
+
* @see {@link https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms} - More info about Unicode normalization forms
|
|
296
|
+
*/
|
|
297
|
+
private normalizeText;
|
|
298
|
+
/**
|
|
299
|
+
* Handle click outside the component.
|
|
300
|
+
* @param {MouseEvent} event - The click event.
|
|
301
|
+
*/
|
|
302
|
+
private handleClickOutside;
|
|
303
|
+
/**
|
|
304
|
+
* Handle popover close
|
|
305
|
+
*/
|
|
306
|
+
private handlePopoverClose;
|
|
307
|
+
/**
|
|
308
|
+
* Handle keyboard events for options mode.
|
|
309
|
+
* @param {KeyboardEvent} event - The keyboard event.
|
|
310
|
+
*/
|
|
311
|
+
private handleKeyDownOptions;
|
|
312
|
+
/**
|
|
313
|
+
* Handle input blur for options mode.
|
|
314
|
+
*/
|
|
315
|
+
private handleInputBlurOptions;
|
|
316
|
+
/**
|
|
317
|
+
* Handle keyboard events & arrow key navigation.
|
|
318
|
+
* If the multiselect is not open, opens it and focuses on the first item if the list is not filterable.
|
|
319
|
+
* If the multiselect is open, handles arrow key navigation and closes it if the focus is outside the component.
|
|
320
|
+
* @param {KeyboardEvent} event - The keyboard event.
|
|
321
|
+
*/
|
|
322
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
323
|
+
/**
|
|
324
|
+
* Updates the highlighted item in the dropdown list.
|
|
325
|
+
*
|
|
326
|
+
* @param {(HTMLNvFielddropdownitemElement | HTMLNvFielddropdownitemcheckElement)[]} items - The items to update.
|
|
327
|
+
* @param {number} index - The index of the item to highlight.
|
|
328
|
+
*/
|
|
329
|
+
private updateHighlightedItem;
|
|
330
|
+
/**
|
|
331
|
+
* Focus on the first item in the dropdown list.
|
|
332
|
+
*/
|
|
333
|
+
private focusFirstItem;
|
|
334
|
+
/**
|
|
335
|
+
* Handle click on the input container for options mode.
|
|
336
|
+
* @param {MouseEvent} event - The click event.
|
|
337
|
+
*/
|
|
338
|
+
private handleInputContainerClickOptions;
|
|
339
|
+
/**
|
|
340
|
+
* Handle click on the input container for slots mode.
|
|
341
|
+
* @param {MouseEvent} event - The click event.
|
|
342
|
+
*/
|
|
343
|
+
private handleInputContainerClickSlots;
|
|
344
|
+
/**
|
|
345
|
+
* Handle input change for options mode.
|
|
346
|
+
* @param {Event} event - The input event.
|
|
347
|
+
*/
|
|
348
|
+
private readonly handleInputOptions;
|
|
349
|
+
/**
|
|
350
|
+
* Handle input change for slots mode
|
|
351
|
+
* @param {Event} event - The input event.
|
|
352
|
+
*/
|
|
353
|
+
private readonly handleInputSlots;
|
|
354
|
+
/**
|
|
355
|
+
* Handle input focus for options mode.
|
|
356
|
+
*/
|
|
357
|
+
private handleInputFocusOptions;
|
|
358
|
+
/**
|
|
359
|
+
* Handle input focus for slots mode.
|
|
360
|
+
*/
|
|
361
|
+
private handleInputFocusSlots;
|
|
362
|
+
/**
|
|
363
|
+
* Handle input blur for slots mode.
|
|
364
|
+
*/
|
|
365
|
+
private handleInputBlurSlots;
|
|
366
|
+
/**
|
|
367
|
+
* Toggle the multiselect popover for options mode.
|
|
368
|
+
*/
|
|
369
|
+
private togglePopoverOptions;
|
|
370
|
+
/**
|
|
371
|
+
* Toggle the multiselect popover for slots mode.
|
|
372
|
+
*/
|
|
373
|
+
private togglePopoverSlots;
|
|
374
|
+
/**
|
|
375
|
+
* Handle keyboard events for slots mode.
|
|
376
|
+
* @param {KeyboardEvent} event - The keyboard event.
|
|
377
|
+
*/
|
|
378
|
+
private handleKeyDownSlots;
|
|
379
|
+
/**
|
|
380
|
+
* Watch for changes in the mode prop and update modeState accordingly
|
|
381
|
+
* @param {string} newValue - The new mode value
|
|
382
|
+
*/
|
|
383
|
+
handleModeChange(newValue: 'options' | 'slots'): void;
|
|
384
|
+
/****************************************************************************/
|
|
385
|
+
/**
|
|
386
|
+
* Renders the component in options mode
|
|
387
|
+
* @returns {any} The JSX for options mode
|
|
388
|
+
*/
|
|
389
|
+
private renderOptionsMode;
|
|
390
|
+
/**
|
|
391
|
+
* Renders the component in slots mode
|
|
392
|
+
* @returns {any} The JSX for slots mode
|
|
393
|
+
*/
|
|
394
|
+
private renderSlotsMode;
|
|
395
|
+
/**
|
|
396
|
+
* Renders description and error description sections
|
|
397
|
+
* @returns {any} The JSX for descriptions
|
|
398
|
+
*/
|
|
399
|
+
private renderDescriptions;
|
|
400
|
+
/**
|
|
401
|
+
* Main render method that decides which mode to render
|
|
402
|
+
* @returns {any} The JSX for the component
|
|
403
|
+
*/
|
|
404
|
+
render(): any;
|
|
405
|
+
}
|