@nova-design-system/nova-webcomponents 3.0.0-beta.20 → 3.0.0-beta.21
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 +9342 -0
- package/dist/cjs/{app-globals-8dbc03be.js → app-globals-2ceecab2.js} +2 -2
- package/dist/cjs/{app-globals-8dbc03be.js.map → app-globals-2ceecab2.js.map} +1 -1
- package/dist/cjs/{index-b925c7f5.js → index-5d1f2412.js} +6 -20
- package/dist/cjs/index-5d1f2412.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/native.cjs.js +3 -3
- package/dist/cjs/nv-alert.cjs.entry.js +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge.cjs.entry.js +1 -1
- package/dist/cjs/nv-base.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldselect.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldtext.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldtoggle.cjs.entry.js +3 -3
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton.cjs.entry.js +2 -2
- package/dist/cjs/nv-loader.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +2 -2
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +2 -2
- package/dist/cjs/nv-row.cjs.entry.js +2 -2
- package/dist/cjs/nv-stack.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +0 -2
- 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 +2 -2
- package/dist/collection/components/nv-icon/nv-icon.js.map +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-tooltip/nv-tooltip.js +1 -1
- package/dist/components/index.js +3 -3
- package/dist/components/nv-alert.js +2 -2
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +2 -2
- package/dist/components/nv-base.js +1 -1
- package/dist/components/nv-button.js +2 -2
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +121 -1
- package/dist/components/nv-fieldcheckbox.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +5 -5
- package/dist/components/nv-fieldpassword.js +7 -7
- package/dist/components/nv-fieldradio.js +4 -4
- package/dist/components/nv-fieldselect.js +7 -7
- package/dist/components/nv-fieldtext.js +5 -5
- package/dist/components/nv-fieldtextarea.js +4 -4
- package/dist/components/nv-fieldtoggle.js +3 -3
- 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 +3 -3
- package/dist/components/nv-menuitem.js +2 -2
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +2 -2
- package/dist/components/nv-stack.js +2 -2
- package/dist/components/nv-tooltip.js +3 -3
- package/dist/components/{p-45ffa910.js → p-50bd2808.js} +2 -2
- package/dist/components/{p-45ffa910.js.map → p-50bd2808.js.map} +1 -1
- package/dist/components/{p-9cbeeff9.js → p-6146d4b0.js} +3 -3
- package/dist/components/{p-9cbeeff9.js.map → p-6146d4b0.js.map} +1 -1
- package/dist/components/{p-c434f2e5.js → p-632bedb8.js} +2 -6
- package/dist/components/p-632bedb8.js.map +1 -0
- package/dist/components/{p-d8a41fbe.js → p-8da6d9a3.js} +3 -3
- package/dist/components/{p-d8a41fbe.js.map → p-8da6d9a3.js.map} +1 -1
- package/dist/components/{p-813b38b1.js → p-be79e7bc.js} +5 -5
- package/dist/components/{p-813b38b1.js.map → p-be79e7bc.js.map} +1 -1
- package/dist/components/{p-d9d56e06.js → p-c711fe67.js} +4 -4
- package/dist/components/{p-d9d56e06.js.map → p-c711fe67.js.map} +1 -1
- package/dist/docs.json +3 -1049
- package/dist/esm/{app-globals-ec286266.js → app-globals-df0a3c8d.js} +2 -2
- package/dist/esm/{app-globals-ec286266.js.map → app-globals-df0a3c8d.js.map} +1 -1
- package/dist/esm/{index-3762ddc4.js → index-179dfba2.js} +6 -20
- package/dist/esm/index-179dfba2.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/native.js +4 -4
- package/dist/esm/nv-alert.entry.js +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge.entry.js +1 -1
- package/dist/esm/nv-base.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +4 -4
- package/dist/esm/nv-fieldpassword.entry.js +4 -4
- package/dist/esm/nv-fieldradio.entry.js +4 -4
- package/dist/esm/nv-fieldselect.entry.js +6 -6
- package/dist/esm/nv-fieldtext.entry.js +4 -4
- package/dist/esm/nv-fieldtextarea.entry.js +4 -4
- package/dist/esm/nv-fieldtoggle.entry.js +3 -3
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton.entry.js +2 -2
- package/dist/esm/nv-loader.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +2 -2
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +2 -2
- package/dist/esm/nv-row.entry.js +2 -2
- package/dist/esm/nv-stack.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +2 -2
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-60f027d4.entry.js → p-06f64d05.entry.js} +2 -2
- package/dist/native/{p-a8fe9493.entry.js → p-0aa0193b.entry.js} +2 -2
- package/dist/native/{p-95a054ed.entry.js → p-124a7067.entry.js} +2 -2
- package/dist/native/{p-ee23e820.entry.js → p-13d0ab5b.entry.js} +2 -2
- package/dist/native/{p-ee23e820.entry.js.map → p-13d0ab5b.entry.js.map} +1 -1
- package/dist/native/{p-3bb76528.entry.js → p-14c08510.entry.js} +2 -2
- package/dist/native/{p-ce6ff56c.entry.js → p-1ceee367.entry.js} +2 -2
- package/dist/native/p-29d482cd.entry.js +2 -0
- package/dist/native/{p-70c73c72.entry.js.map → p-29d482cd.entry.js.map} +1 -1
- package/dist/native/{p-3935c952.entry.js → p-43cd42ca.entry.js} +2 -2
- package/dist/native/{p-8d472724.entry.js → p-519e0f59.entry.js} +2 -2
- package/dist/native/{p-c749aafd.entry.js → p-617d6a09.entry.js} +2 -2
- package/dist/native/p-6f762ec2.entry.js +2 -0
- package/dist/native/{p-068965e9.entry.js.map → p-6f762ec2.entry.js.map} +1 -1
- package/dist/native/{p-1e575590.entry.js → p-71d6aad8.entry.js} +2 -2
- package/dist/native/{p-fd8ee23e.entry.js → p-7ce1b712.entry.js} +2 -2
- package/dist/native/p-80788ddf.js +2 -0
- package/dist/native/{p-5c0e7fda.entry.js → p-830ec54a.entry.js} +2 -2
- package/dist/native/{p-09d57171.entry.js → p-89accab1.entry.js} +2 -2
- package/dist/native/{p-1adc83f5.entry.js → p-8b65b16f.entry.js} +2 -2
- package/dist/native/{p-21bc1cf9.entry.js → p-b5e4a9e7.entry.js} +2 -2
- package/dist/native/{p-c3c9444e.entry.js → p-b8eb4c31.entry.js} +2 -2
- package/dist/native/p-b99aa075.entry.js +2 -0
- package/dist/native/{p-e4d12abd.entry.js → p-d5a8b6c4.entry.js} +2 -2
- package/dist/native/{p-006006b6.js → p-db2a68f3.js} +3 -3
- package/dist/native/p-db2a68f3.js.map +1 -0
- package/dist/native/{p-60679799.entry.js → p-f5acea50.entry.js} +2 -2
- package/dist/native/{p-f215822a.entry.js → p-f9aac71a.entry.js} +2 -2
- package/dist/native/{p-99e17032.entry.js → p-fb6f42b7.entry.js} +2 -2
- package/dist/types/components.d.ts +0 -287
- package/dist/vscode-data.json +3179 -0
- package/hydrate/index.js +33 -495
- package/hydrate/index.mjs +33 -495
- package/hydrate/package.json +1 -1
- package/package.json +3 -2
- package/postinstall.js +15 -0
- package/dist/cjs/index-b925c7f5.js.map +0 -1
- package/dist/cjs/nv-fielddropdownitemcheck.cjs.entry.js +0 -48
- package/dist/cjs/nv-fielddropdownitemcheck.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +0 -368
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +0 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +0 -12
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js +0 -6
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js.map +0 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +0 -190
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +0 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +0 -195
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +0 -169
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +0 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +0 -822
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +0 -1
- package/dist/components/nv-fielddropdownitemcheck.d.ts +0 -11
- package/dist/components/nv-fielddropdownitemcheck.js +0 -8
- package/dist/components/nv-fielddropdownitemcheck.js.map +0 -1
- package/dist/components/nv-fieldmultiselect.d.ts +0 -11
- package/dist/components/nv-fieldmultiselect.js +0 -445
- package/dist/components/nv-fieldmultiselect.js.map +0 -1
- package/dist/components/p-1079b972.js +0 -125
- package/dist/components/p-1079b972.js.map +0 -1
- package/dist/components/p-c434f2e5.js.map +0 -1
- package/dist/components/p-dbbda3ac.js +0 -72
- package/dist/components/p-dbbda3ac.js.map +0 -1
- package/dist/esm/index-3762ddc4.js.map +0 -1
- package/dist/esm/nv-fielddropdownitemcheck.entry.js +0 -44
- package/dist/esm/nv-fielddropdownitemcheck.entry.js.map +0 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +0 -364
- package/dist/esm/nv-fieldmultiselect.entry.js.map +0 -1
- package/dist/native/p-006006b6.js.map +0 -1
- package/dist/native/p-056455a2.entry.js +0 -2
- package/dist/native/p-068965e9.entry.js +0 -2
- package/dist/native/p-1392b30f.entry.js +0 -2
- package/dist/native/p-1392b30f.entry.js.map +0 -1
- package/dist/native/p-21cdc57d.entry.js +0 -2
- package/dist/native/p-21cdc57d.entry.js.map +0 -1
- package/dist/native/p-70c73c72.entry.js +0 -2
- package/dist/native/p-b0955577.js +0 -2
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +0 -43
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.d.ts +0 -4
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +0 -215
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.d.ts +0 -4
- /package/dist/native/{p-60f027d4.entry.js.map → p-06f64d05.entry.js.map} +0 -0
- /package/dist/native/{p-a8fe9493.entry.js.map → p-0aa0193b.entry.js.map} +0 -0
- /package/dist/native/{p-95a054ed.entry.js.map → p-124a7067.entry.js.map} +0 -0
- /package/dist/native/{p-3bb76528.entry.js.map → p-14c08510.entry.js.map} +0 -0
- /package/dist/native/{p-ce6ff56c.entry.js.map → p-1ceee367.entry.js.map} +0 -0
- /package/dist/native/{p-3935c952.entry.js.map → p-43cd42ca.entry.js.map} +0 -0
- /package/dist/native/{p-8d472724.entry.js.map → p-519e0f59.entry.js.map} +0 -0
- /package/dist/native/{p-c749aafd.entry.js.map → p-617d6a09.entry.js.map} +0 -0
- /package/dist/native/{p-1e575590.entry.js.map → p-71d6aad8.entry.js.map} +0 -0
- /package/dist/native/{p-fd8ee23e.entry.js.map → p-7ce1b712.entry.js.map} +0 -0
- /package/dist/native/{p-b0955577.js.map → p-80788ddf.js.map} +0 -0
- /package/dist/native/{p-5c0e7fda.entry.js.map → p-830ec54a.entry.js.map} +0 -0
- /package/dist/native/{p-09d57171.entry.js.map → p-89accab1.entry.js.map} +0 -0
- /package/dist/native/{p-1adc83f5.entry.js.map → p-8b65b16f.entry.js.map} +0 -0
- /package/dist/native/{p-21bc1cf9.entry.js.map → p-b5e4a9e7.entry.js.map} +0 -0
- /package/dist/native/{p-c3c9444e.entry.js.map → p-b8eb4c31.entry.js.map} +0 -0
- /package/dist/native/{p-056455a2.entry.js.map → p-b99aa075.entry.js.map} +0 -0
- /package/dist/native/{p-e4d12abd.entry.js.map → p-d5a8b6c4.entry.js.map} +0 -0
- /package/dist/native/{p-60679799.entry.js.map → p-f5acea50.entry.js.map} +0 -0
- /package/dist/native/{p-f215822a.entry.js.map → p-f9aac71a.entry.js.map} +0 -0
- /package/dist/native/{p-99e17032.entry.js.map → p-fb6f42b7.entry.js.map} +0 -0
|
@@ -1,822 +0,0 @@
|
|
|
1
|
-
import { Host, h, } from "@stencil/core";
|
|
2
|
-
import { v4 as uuidv4 } from "uuid";
|
|
3
|
-
// import { DropdownItemSelectedEventDetail } from '../nv-fielddropdownitemcheck/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 class NvFieldmultiselect {
|
|
14
|
-
constructor() {
|
|
15
|
-
/**
|
|
16
|
-
* Handle click on the input container.
|
|
17
|
-
* @param {MouseEvent} event - The click event.
|
|
18
|
-
*/
|
|
19
|
-
this.handleInputContainerClick = (event) => {
|
|
20
|
-
if (this.disabled || this.readonly) {
|
|
21
|
-
return; // Do nothing if the dropdown is disabled or read-only
|
|
22
|
-
}
|
|
23
|
-
const target = event.target;
|
|
24
|
-
// Check if it is the paragraph or another part of the container
|
|
25
|
-
if (target.tagName === 'P' || target.tagName === 'SPAN') {
|
|
26
|
-
this.open = true;
|
|
27
|
-
this.popoverElement.show();
|
|
28
|
-
// Simulate focus to trigger "focus-within" style
|
|
29
|
-
const inputContainer = this.el.querySelector('.input-container');
|
|
30
|
-
if (inputContainer) {
|
|
31
|
-
inputContainer.classList.add('focus-within');
|
|
32
|
-
// Remove the "focus-within" class after a delay or when the popover is closed
|
|
33
|
-
const removeFocusWithin = () => {
|
|
34
|
-
inputContainer.classList.remove('focus-within');
|
|
35
|
-
};
|
|
36
|
-
// Or remove the class when the popover is closed
|
|
37
|
-
this.popoverElement.addEventListener('hide', removeFocusWithin);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Handle input change.
|
|
43
|
-
* @param {Event} event - The input event.
|
|
44
|
-
*/
|
|
45
|
-
this.handleInput = (event) => {
|
|
46
|
-
if (!this.filterable)
|
|
47
|
-
return; // Do not filter if `filterable` is false
|
|
48
|
-
if (this.disabled || this.readonly) {
|
|
49
|
-
return; // Do not toggle the state if the dropdown is disabled or read-only
|
|
50
|
-
}
|
|
51
|
-
const input = event.target;
|
|
52
|
-
this.filterText = input.value.toLowerCase();
|
|
53
|
-
this.value = input.value; // Update the value
|
|
54
|
-
this.valueChanged.emit(input.value); // Emit an event if needed
|
|
55
|
-
this.filterItems(); // Update the visibility of items
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Handle input focus.
|
|
59
|
-
*/
|
|
60
|
-
this.handleInputFocus = () => {
|
|
61
|
-
if (this.disabled || this.readonly) {
|
|
62
|
-
return; // Do not toggle the state if the dropdown is disabled or read-only
|
|
63
|
-
}
|
|
64
|
-
this.open = true; // Force the popover to open
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Handle input blur.
|
|
68
|
-
*/
|
|
69
|
-
this.handleInputBlur = () => {
|
|
70
|
-
// Use a delay to check if the focus is still within the popover
|
|
71
|
-
setTimeout(() => {
|
|
72
|
-
if (!this.el.contains(document.activeElement)) {
|
|
73
|
-
this.open = false;
|
|
74
|
-
this.popoverElement.hide(); // Close the popover if the focus is outside the component
|
|
75
|
-
}
|
|
76
|
-
}, 150);
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Toggle the dropdown popover.
|
|
80
|
-
* @returns {void}
|
|
81
|
-
*/
|
|
82
|
-
this.togglePopover = () => {
|
|
83
|
-
if (this.disabled || this.readonly) {
|
|
84
|
-
return; // Do not toggle if disabled or read-only
|
|
85
|
-
}
|
|
86
|
-
this.open = !this.open;
|
|
87
|
-
if (this.open) {
|
|
88
|
-
this.popoverElement.show();
|
|
89
|
-
// Si le dropdown n'est pas filtrable, focus sur le premier élément
|
|
90
|
-
if (!this.filterable) {
|
|
91
|
-
this.focusFirstItem();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
this.popoverElement.hide();
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
this.maxHeight = '200px';
|
|
99
|
-
this.selectedValues = [];
|
|
100
|
-
this.badgeLabel = 'selected';
|
|
101
|
-
this.options = [];
|
|
102
|
-
this.clearable = false;
|
|
103
|
-
this.inputId = uuidv4();
|
|
104
|
-
this.label = undefined;
|
|
105
|
-
this.description = undefined;
|
|
106
|
-
this.placeholder = undefined;
|
|
107
|
-
this.name = undefined;
|
|
108
|
-
this.open = false;
|
|
109
|
-
this.autocomplete = 'off';
|
|
110
|
-
this.value = undefined;
|
|
111
|
-
this.required = false;
|
|
112
|
-
this.error = false;
|
|
113
|
-
this.errorDescription = undefined;
|
|
114
|
-
this.readonly = false;
|
|
115
|
-
this.disabled = false;
|
|
116
|
-
this.emptyresult = 'No results found';
|
|
117
|
-
this.filterText = '';
|
|
118
|
-
this.filterable = false;
|
|
119
|
-
this.isFilterable = this.filterable;
|
|
120
|
-
}
|
|
121
|
-
handleOpenChanged(event) {
|
|
122
|
-
this.open = event.detail; // Update `open` based on the popover state
|
|
123
|
-
}
|
|
124
|
-
watchFilterableHandler(newValue) {
|
|
125
|
-
this.isFilterable = newValue;
|
|
126
|
-
this.filterable = newValue;
|
|
127
|
-
}
|
|
128
|
-
watchValueHandler() {
|
|
129
|
-
// Handle value change and update the corresponding dropdown item if it exists
|
|
130
|
-
this.setInitialSelection();
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Listen for the `itemChecked` event emitted by child items.
|
|
134
|
-
* Updates the selected values accordingly.
|
|
135
|
-
* @param {CustomEvent<{ value: string; checked: boolean }>} event - The event object containing the selected value and its checked state.
|
|
136
|
-
*/
|
|
137
|
-
handleItemChecked(event) {
|
|
138
|
-
if (this.disabled || this.readonly)
|
|
139
|
-
return;
|
|
140
|
-
const { value, checked } = event.detail;
|
|
141
|
-
// Si une valeur est définie, met à jour `selectedValues`.
|
|
142
|
-
if (value) {
|
|
143
|
-
if (checked) {
|
|
144
|
-
// Ajoute la valeur si elle est cochée
|
|
145
|
-
this.selectedValues = [...this.selectedValues, value];
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
// Retire la valeur si elle est décochée
|
|
149
|
-
this.selectedValues = this.selectedValues.filter(val => val !== value);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
// Émet l'événement `multiselectChange` avec la nouvelle liste des valeurs sélectionnées
|
|
153
|
-
this.multiselectChange.emit(this.selectedValues);
|
|
154
|
-
}
|
|
155
|
-
//#endregion EVENTS
|
|
156
|
-
/****************************************************************************/
|
|
157
|
-
//#region METHODS
|
|
158
|
-
/**
|
|
159
|
-
* Subscribe to click outside event.
|
|
160
|
-
*/
|
|
161
|
-
connectedCallback() {
|
|
162
|
-
document.addEventListener('click', this.handleClickOutside.bind(this));
|
|
163
|
-
// Handle pre-selection during component initialization
|
|
164
|
-
this.setInitialSelection();
|
|
165
|
-
// Apply filtering if the dropdown is filterable and there is a value
|
|
166
|
-
if (this.filterable && this.value) {
|
|
167
|
-
this.filterText = this.value.toLowerCase();
|
|
168
|
-
this.filterItems(); // Update the visibility of items
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
// Ensure all items are visible if no filtering is applied
|
|
172
|
-
this.resetFilter();
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Set the initial selection based on the current value and update the inputElement value.
|
|
177
|
-
*/
|
|
178
|
-
setInitialSelection() {
|
|
179
|
-
var _a;
|
|
180
|
-
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
181
|
-
const selectedItem = items.find(item => {
|
|
182
|
-
var _a;
|
|
183
|
-
return item.getAttribute('label') === this.value ||
|
|
184
|
-
item.getAttribute('value') === this.value ||
|
|
185
|
-
((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === this.value;
|
|
186
|
-
});
|
|
187
|
-
// Remove 'selected' from all items first to reset the state
|
|
188
|
-
items.forEach(item => {
|
|
189
|
-
item.removeAttribute('selected');
|
|
190
|
-
item.classList.remove('selected');
|
|
191
|
-
});
|
|
192
|
-
if (selectedItem) {
|
|
193
|
-
// Add the `selected` attribute and `selected` class for visual styling
|
|
194
|
-
selectedItem.setAttribute('selected', 'true');
|
|
195
|
-
selectedItem.classList.add('selected');
|
|
196
|
-
// Update the value and inputElement value to reflect the pre-selected item
|
|
197
|
-
this.value =
|
|
198
|
-
selectedItem.getAttribute('label') ||
|
|
199
|
-
selectedItem.getAttribute('value') ||
|
|
200
|
-
((_a = selectedItem.textContent) === null || _a === void 0 ? void 0 : _a.trim()) ||
|
|
201
|
-
'';
|
|
202
|
-
if (this.inputElement) {
|
|
203
|
-
this.inputElement.value = this.value;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Unsubscribe from click outside event.
|
|
209
|
-
*/
|
|
210
|
-
disconnectedCallback() {
|
|
211
|
-
document.removeEventListener('click', this.handleClickOutside.bind(this));
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Filter dropdown items based on the text entered by the user.
|
|
215
|
-
* If no items are found, display a message indicating no results.
|
|
216
|
-
*/
|
|
217
|
-
filterItems() {
|
|
218
|
-
var _a;
|
|
219
|
-
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
220
|
-
// Remove the "no results found" item if it exists
|
|
221
|
-
const existingEmptyItem = this.el.querySelector('nv-fielddropdownitemcheck[data-empty]');
|
|
222
|
-
if (existingEmptyItem) {
|
|
223
|
-
existingEmptyItem.remove();
|
|
224
|
-
}
|
|
225
|
-
let hasVisibleItems = false;
|
|
226
|
-
// Iterate over all items and adjust their visibility
|
|
227
|
-
items.forEach(item => {
|
|
228
|
-
var _a, _b;
|
|
229
|
-
const textContent = ((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || ''; // Get the textual content of the slot
|
|
230
|
-
const value = ((_b = item.value) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || ''; // Get the value of the `value` attribute
|
|
231
|
-
// Check if the filtered text is present either in the value or in the textual content
|
|
232
|
-
const shouldShow = value.includes(this.filterText) ||
|
|
233
|
-
textContent.includes(this.filterText);
|
|
234
|
-
item.style.display = shouldShow ? '' : 'none'; // Hide or show the item
|
|
235
|
-
if (shouldShow) {
|
|
236
|
-
hasVisibleItems = true;
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
// If no items are visible, add the "no results found" item
|
|
240
|
-
if (!hasVisibleItems) {
|
|
241
|
-
const emptyItem = document.createElement('nv-fielddropdownitemcheck');
|
|
242
|
-
emptyItem.setAttribute('data-empty', 'true');
|
|
243
|
-
emptyItem.setAttribute('disabled', 'true');
|
|
244
|
-
emptyItem.textContent = this.emptyresult;
|
|
245
|
-
(_a = this.el.querySelector('ul[slot="content"]')) === null || _a === void 0 ? void 0 : _a.appendChild(emptyItem);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Reset the filter and make all items visible.
|
|
250
|
-
*/
|
|
251
|
-
resetFilter() {
|
|
252
|
-
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
253
|
-
items.forEach(item => {
|
|
254
|
-
item.style.display = '';
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Retrieves the current filter text entered by the user.
|
|
259
|
-
* @returns {string} The filter text.
|
|
260
|
-
*/
|
|
261
|
-
async getFilterText() {
|
|
262
|
-
return this.filterText;
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Handle click outside the component.
|
|
266
|
-
* @param {MouseEvent} event - The click event.
|
|
267
|
-
*/
|
|
268
|
-
handleClickOutside(event) {
|
|
269
|
-
if (this.el.contains(event.target) ||
|
|
270
|
-
(this.inputElement && this.inputElement.contains(event.target))) {
|
|
271
|
-
// If the click is inside the component or on the input, do not close the popover
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
this.popoverElement.hide(); // Close the popover if the click is outside the component
|
|
275
|
-
}
|
|
276
|
-
handleKeyDown(event) {
|
|
277
|
-
if (!this.open) {
|
|
278
|
-
if (event.key === 'ArrowDown') {
|
|
279
|
-
this.open = true;
|
|
280
|
-
this.popoverElement.show();
|
|
281
|
-
// Focus sur le premier élément si la liste n'est pas filtrable
|
|
282
|
-
if (!this.filterable) {
|
|
283
|
-
this.focusFirstItem();
|
|
284
|
-
}
|
|
285
|
-
event.preventDefault();
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
291
|
-
if (items.length === 0) {
|
|
292
|
-
console.warn('No dropdown items found to navigate');
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
let currentIndex = items.findIndex(item => item.classList.contains('highlighted'));
|
|
296
|
-
if (event.key === 'ArrowDown') {
|
|
297
|
-
event.preventDefault();
|
|
298
|
-
currentIndex = (currentIndex + 1) % items.length;
|
|
299
|
-
this.updateHighlightedItem(items, currentIndex);
|
|
300
|
-
}
|
|
301
|
-
else if (event.key === 'ArrowUp') {
|
|
302
|
-
event.preventDefault();
|
|
303
|
-
currentIndex = (currentIndex - 1 + items.length) % items.length;
|
|
304
|
-
this.updateHighlightedItem(items, currentIndex);
|
|
305
|
-
}
|
|
306
|
-
else if (event.key === 'Enter' && currentIndex >= 0) {
|
|
307
|
-
event.preventDefault();
|
|
308
|
-
items[currentIndex].click();
|
|
309
|
-
}
|
|
310
|
-
else if (event.key === 'Escape') {
|
|
311
|
-
event.preventDefault();
|
|
312
|
-
this.open = false;
|
|
313
|
-
this.popoverElement.hide();
|
|
314
|
-
if (this.inputElement) {
|
|
315
|
-
this.inputElement.blur();
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
updateHighlightedItem(items, index) {
|
|
320
|
-
items.forEach((item, i) => {
|
|
321
|
-
if (i === index) {
|
|
322
|
-
item.classList.add('highlighted');
|
|
323
|
-
item.setAttribute('tabindex', '0');
|
|
324
|
-
item.focus();
|
|
325
|
-
}
|
|
326
|
-
else {
|
|
327
|
-
item.classList.remove('highlighted');
|
|
328
|
-
item.setAttribute('tabindex', '-1');
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
focusFirstItem() {
|
|
333
|
-
const firstItem = this.el.querySelector('nv-fielddropdownitemcheck');
|
|
334
|
-
if (firstItem) {
|
|
335
|
-
firstItem.setAttribute('tabindex', '0');
|
|
336
|
-
firstItem.classList.add('highlighted');
|
|
337
|
-
firstItem.focus();
|
|
338
|
-
}
|
|
339
|
-
else {
|
|
340
|
-
console.warn('No first item found to focus');
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
//#endregion METHODS
|
|
344
|
-
/****************************************************************************/
|
|
345
|
-
//#region RENDER
|
|
346
|
-
render() {
|
|
347
|
-
return (h(Host, { key: '8491eef8fe6d3df7b6cc1992c2894e8dd2513a6c' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '79c49fdbcdf7ca404880d318c59afe5096bf4b9e', htmlFor: this.inputId }, h("slot", { key: 'f4eba554fc97e2ae1a24f01a20d3e37ab84acae4', name: "label" }, this.label))), h("nv-popover", { key: '46b5a94caa12e50b592de484b158ba67715cec14', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { key: '473a98f6c7636d65b1d9d35beb6f3c5ba012179f', class: "input-wrapper-multiselect", slot: "trigger" }, h("slot", { key: '4038e51342c18e735ea2c164a1658f0928f3f7e1', name: "before-input" }), h("div", { key: 'cb53b835fb716e20f79593cdf7874f64987a8cc5', class: "input-container-multiselect", onClick: this.handleInputContainerClick }, h("slot", { key: 'c5879628d28b7901bca1da93499ed83f661e1fe3', name: "leading-input" }), this.isFilterable || this.disabled || this.readonly ? (h("input", { id: this.inputId, type: "search", ref: e => (this.inputElement = e), autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.value, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onKeyDown: this.handleKeyDown })) : (h("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClick, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocus }, h("span", null, this.value || this.placeholder))), h("nv-iconbutton", { key: '8459a377fbee5cebc457bcc53385a6e8832e4781', class: "toggle-dropdown-icon", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', "aria-pressed": this.open.toString(), onClick: this.togglePopover })), h("slot", { key: 'f338a93f4eaac472817ce32f72695e8ea026b3d7', name: "after-input" })), h("slot", { key: 'e9c871135bbed4f64113ab6a7ff5342a3374860e', name: "content" }, h("ul", { key: 'd129ae2fcf0d84d7337b886fbd7a0b64dc6e0c3e' }, this.options.map(option => (h("li", { class: {
|
|
348
|
-
'dropdown-item': true,
|
|
349
|
-
'is-selected': this.selectedValues.includes(option.value),
|
|
350
|
-
}, "aria-selected": this.selectedValues
|
|
351
|
-
.includes(option.value)
|
|
352
|
-
.toString(), role: "option" }, h("nv-fielddropdownitemcheck", { value: option.value, label: option.label, checked: this.selectedValues.includes(option.value) }))))))), (this.description ||
|
|
353
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '66ce27f7c0ee316381c12664130518e84e080fd4', class: "description" }, h("slot", { key: '9a7bd32d04f2b451fff8d6546273097c7bf8b0cc', name: "description" }, this.description))), (this.errorDescription ||
|
|
354
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'ffcc1911fb6485e2b34dbb1dfb775d2800bfd940', hidden: !this.error, class: "error-description" }, h("slot", { key: 'd77fe0f486d0d0e9a905463f85fb91edbf7c0854', name: "error-description" }, this.errorDescription)))));
|
|
355
|
-
}
|
|
356
|
-
static get is() { return "nv-fieldmultiselect"; }
|
|
357
|
-
static get formAssociated() { return true; }
|
|
358
|
-
static get originalStyleUrls() {
|
|
359
|
-
return {
|
|
360
|
-
"$": ["nv-fieldmultiselect.scss"]
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
static get styleUrls() {
|
|
364
|
-
return {
|
|
365
|
-
"$": ["nv-fieldmultiselect.css"]
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
|
-
static get properties() {
|
|
369
|
-
return {
|
|
370
|
-
"maxHeight": {
|
|
371
|
-
"type": "string",
|
|
372
|
-
"mutable": false,
|
|
373
|
-
"complexType": {
|
|
374
|
-
"original": "string",
|
|
375
|
-
"resolved": "string",
|
|
376
|
-
"references": {}
|
|
377
|
-
},
|
|
378
|
-
"required": false,
|
|
379
|
-
"optional": false,
|
|
380
|
-
"docs": {
|
|
381
|
-
"tags": [],
|
|
382
|
-
"text": "Maximum height of the dropdown list when open."
|
|
383
|
-
},
|
|
384
|
-
"attribute": "max-height",
|
|
385
|
-
"reflect": true,
|
|
386
|
-
"defaultValue": "'200px'"
|
|
387
|
-
},
|
|
388
|
-
"badgeLabel": {
|
|
389
|
-
"type": "string",
|
|
390
|
-
"mutable": false,
|
|
391
|
-
"complexType": {
|
|
392
|
-
"original": "string",
|
|
393
|
-
"resolved": "string",
|
|
394
|
-
"references": {}
|
|
395
|
-
},
|
|
396
|
-
"required": false,
|
|
397
|
-
"optional": false,
|
|
398
|
-
"docs": {
|
|
399
|
-
"tags": [],
|
|
400
|
-
"text": "Text for the badge showing the number of selected items."
|
|
401
|
-
},
|
|
402
|
-
"attribute": "badge-label",
|
|
403
|
-
"reflect": true,
|
|
404
|
-
"defaultValue": "'selected'"
|
|
405
|
-
},
|
|
406
|
-
"options": {
|
|
407
|
-
"type": "unknown",
|
|
408
|
-
"mutable": false,
|
|
409
|
-
"complexType": {
|
|
410
|
-
"original": "Array<{ label: string; value: string }>",
|
|
411
|
-
"resolved": "{ label: string; value: string; }[]",
|
|
412
|
-
"references": {
|
|
413
|
-
"Array": {
|
|
414
|
-
"location": "global",
|
|
415
|
-
"id": "global::Array"
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
},
|
|
419
|
-
"required": false,
|
|
420
|
-
"optional": false,
|
|
421
|
-
"docs": {
|
|
422
|
-
"tags": [],
|
|
423
|
-
"text": "List of options available in the dropdown."
|
|
424
|
-
},
|
|
425
|
-
"defaultValue": "[]"
|
|
426
|
-
},
|
|
427
|
-
"clearable": {
|
|
428
|
-
"type": "boolean",
|
|
429
|
-
"mutable": false,
|
|
430
|
-
"complexType": {
|
|
431
|
-
"original": "boolean",
|
|
432
|
-
"resolved": "boolean",
|
|
433
|
-
"references": {}
|
|
434
|
-
},
|
|
435
|
-
"required": false,
|
|
436
|
-
"optional": false,
|
|
437
|
-
"docs": {
|
|
438
|
-
"tags": [],
|
|
439
|
-
"text": "Enables a clear-all button for the selection."
|
|
440
|
-
},
|
|
441
|
-
"attribute": "clearable",
|
|
442
|
-
"reflect": true,
|
|
443
|
-
"defaultValue": "false"
|
|
444
|
-
},
|
|
445
|
-
"inputId": {
|
|
446
|
-
"type": "string",
|
|
447
|
-
"mutable": false,
|
|
448
|
-
"complexType": {
|
|
449
|
-
"original": "string",
|
|
450
|
-
"resolved": "string",
|
|
451
|
-
"references": {}
|
|
452
|
-
},
|
|
453
|
-
"required": false,
|
|
454
|
-
"optional": false,
|
|
455
|
-
"docs": {
|
|
456
|
-
"tags": [],
|
|
457
|
-
"text": "Sets the ID for the input element and the for attribute of the associated\nlabel. If no ID is provided, a random one will be automatically generated\nto ensure unique identification, facilitating proper label association and\naccessibility."
|
|
458
|
-
},
|
|
459
|
-
"attribute": "input-id",
|
|
460
|
-
"reflect": true,
|
|
461
|
-
"defaultValue": "uuidv4()"
|
|
462
|
-
},
|
|
463
|
-
"label": {
|
|
464
|
-
"type": "string",
|
|
465
|
-
"mutable": false,
|
|
466
|
-
"complexType": {
|
|
467
|
-
"original": "string",
|
|
468
|
-
"resolved": "string",
|
|
469
|
-
"references": {}
|
|
470
|
-
},
|
|
471
|
-
"required": false,
|
|
472
|
-
"optional": false,
|
|
473
|
-
"docs": {
|
|
474
|
-
"tags": [],
|
|
475
|
-
"text": "Lets you define the text that explains what users should enter in the text\ninput field. It\u2019s a crucial element for making forms clear and\nuser-friendly."
|
|
476
|
-
},
|
|
477
|
-
"attribute": "label",
|
|
478
|
-
"reflect": true
|
|
479
|
-
},
|
|
480
|
-
"description": {
|
|
481
|
-
"type": "string",
|
|
482
|
-
"mutable": false,
|
|
483
|
-
"complexType": {
|
|
484
|
-
"original": "string",
|
|
485
|
-
"resolved": "string",
|
|
486
|
-
"references": {}
|
|
487
|
-
},
|
|
488
|
-
"required": false,
|
|
489
|
-
"optional": false,
|
|
490
|
-
"docs": {
|
|
491
|
-
"tags": [],
|
|
492
|
-
"text": "Add helpful hints or extra information under the text input field. This is\nwhere you can clarify what users should enter or provide additional\ninstructions, making the form easier to fill out correctly."
|
|
493
|
-
},
|
|
494
|
-
"attribute": "description",
|
|
495
|
-
"reflect": true
|
|
496
|
-
},
|
|
497
|
-
"placeholder": {
|
|
498
|
-
"type": "string",
|
|
499
|
-
"mutable": false,
|
|
500
|
-
"complexType": {
|
|
501
|
-
"original": "string",
|
|
502
|
-
"resolved": "string",
|
|
503
|
-
"references": {}
|
|
504
|
-
},
|
|
505
|
-
"required": false,
|
|
506
|
-
"optional": false,
|
|
507
|
-
"docs": {
|
|
508
|
-
"tags": [],
|
|
509
|
-
"text": "Display temporary text inside the input field to give users a hint about\nwhat to type. It\u2019s a great way to provide examples or suggestions directly\nin the field before they start typing.\nThe placeholder is displayed only when the filterable option is enabled."
|
|
510
|
-
},
|
|
511
|
-
"attribute": "placeholder",
|
|
512
|
-
"reflect": true
|
|
513
|
-
},
|
|
514
|
-
"name": {
|
|
515
|
-
"type": "string",
|
|
516
|
-
"mutable": false,
|
|
517
|
-
"complexType": {
|
|
518
|
-
"original": "string",
|
|
519
|
-
"resolved": "string",
|
|
520
|
-
"references": {}
|
|
521
|
-
},
|
|
522
|
-
"required": false,
|
|
523
|
-
"optional": false,
|
|
524
|
-
"docs": {
|
|
525
|
-
"tags": [],
|
|
526
|
-
"text": "Defines the name attribute of the input field, which is crucial for form\nsubmission. This value is used as the key in the key-value pair sent to\nthe server, representing the input\u2019s data in form submissions. It should be\nunique within the form to avoid conflicts."
|
|
527
|
-
},
|
|
528
|
-
"attribute": "name",
|
|
529
|
-
"reflect": true
|
|
530
|
-
},
|
|
531
|
-
"open": {
|
|
532
|
-
"type": "boolean",
|
|
533
|
-
"mutable": true,
|
|
534
|
-
"complexType": {
|
|
535
|
-
"original": "boolean",
|
|
536
|
-
"resolved": "boolean",
|
|
537
|
-
"references": {}
|
|
538
|
-
},
|
|
539
|
-
"required": false,
|
|
540
|
-
"optional": false,
|
|
541
|
-
"docs": {
|
|
542
|
-
"tags": [],
|
|
543
|
-
"text": "State of the dropdown popover."
|
|
544
|
-
},
|
|
545
|
-
"attribute": "open",
|
|
546
|
-
"reflect": true,
|
|
547
|
-
"defaultValue": "false"
|
|
548
|
-
},
|
|
549
|
-
"autocomplete": {
|
|
550
|
-
"type": "string",
|
|
551
|
-
"mutable": false,
|
|
552
|
-
"complexType": {
|
|
553
|
-
"original": "`${TextInputAutocomplete}`",
|
|
554
|
-
"resolved": "\"on\" | \"off\" | \"section-*\" | \"shipping\" | \"billing\" | \"home\" | \"work\" | \"mobile\" | \"fax\" | \"pager\" | \"tel\" | \"tel-country-code\" | \"tel-national\" | \"tel-area-code\" | \"tel-local\" | \"tel-local-prefix\" | \"tel-local-suffix\" | \"tel-extension\" | \"email\" | \"impp\" | \"name\" | \"honorific-prefix\" | \"given-name\" | \"additional-name\" | \"family-name\" | \"honorific-suffix\" | \"nickname\" | \"username\" | \"new-password\" | \"current-password\" | \"one-time-code\" | \"organization-title\" | \"organization\" | \"street-address\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"address-level4\" | \"address-level3\" | \"address-level2\" | \"address-level1\" | \"country\" | \"country-name\" | \"postal-code\" | \"cc-name\" | \"cc-given-name\" | \"cc-additional-name\" | \"cc-family-name\" | \"cc-number\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-csc\" | \"cc-type\" | \"transaction-currency\" | \"transaction-amount\" | \"language\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"sex\" | \"url\" | \"photo\"",
|
|
555
|
-
"references": {
|
|
556
|
-
"TextInputAutocomplete": {
|
|
557
|
-
"location": "import",
|
|
558
|
-
"path": "../../utils/constants",
|
|
559
|
-
"id": "src/utils/constants.ts::TextInputAutocomplete"
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
},
|
|
563
|
-
"required": false,
|
|
564
|
-
"optional": false,
|
|
565
|
-
"docs": {
|
|
566
|
-
"tags": [],
|
|
567
|
-
"text": "The autocomplete prop helps users fill out the input field faster by\nsuggesting entries they\u2019ve used before, like their email or address.\nYou can turn it on to make forms more convenient or off to ensure users\nalways type in fresh data."
|
|
568
|
-
},
|
|
569
|
-
"attribute": "autocomplete",
|
|
570
|
-
"reflect": true,
|
|
571
|
-
"defaultValue": "'off'"
|
|
572
|
-
},
|
|
573
|
-
"value": {
|
|
574
|
-
"type": "string",
|
|
575
|
-
"mutable": true,
|
|
576
|
-
"complexType": {
|
|
577
|
-
"original": "string",
|
|
578
|
-
"resolved": "string",
|
|
579
|
-
"references": {}
|
|
580
|
-
},
|
|
581
|
-
"required": false,
|
|
582
|
-
"optional": false,
|
|
583
|
-
"docs": {
|
|
584
|
-
"tags": [],
|
|
585
|
-
"text": "Specifies the value of the input field, which determines the text displayed\nwithin the field. This prop is typically used in controlled components\nwhere the input\u2019s value is managed by the component\u2019s state."
|
|
586
|
-
},
|
|
587
|
-
"attribute": "value",
|
|
588
|
-
"reflect": true
|
|
589
|
-
},
|
|
590
|
-
"required": {
|
|
591
|
-
"type": "boolean",
|
|
592
|
-
"mutable": false,
|
|
593
|
-
"complexType": {
|
|
594
|
-
"original": "boolean",
|
|
595
|
-
"resolved": "boolean",
|
|
596
|
-
"references": {}
|
|
597
|
-
},
|
|
598
|
-
"required": false,
|
|
599
|
-
"optional": false,
|
|
600
|
-
"docs": {
|
|
601
|
-
"tags": [],
|
|
602
|
-
"text": "Marks the input field as required, ensuring that the user must fill it out\nbefore submitting the form."
|
|
603
|
-
},
|
|
604
|
-
"attribute": "required",
|
|
605
|
-
"reflect": true,
|
|
606
|
-
"defaultValue": "false"
|
|
607
|
-
},
|
|
608
|
-
"error": {
|
|
609
|
-
"type": "boolean",
|
|
610
|
-
"mutable": false,
|
|
611
|
-
"complexType": {
|
|
612
|
-
"original": "boolean",
|
|
613
|
-
"resolved": "boolean",
|
|
614
|
-
"references": {}
|
|
615
|
-
},
|
|
616
|
-
"required": false,
|
|
617
|
-
"optional": false,
|
|
618
|
-
"docs": {
|
|
619
|
-
"tags": [{
|
|
620
|
-
"name": "validator",
|
|
621
|
-
"text": "error"
|
|
622
|
-
}],
|
|
623
|
-
"text": "Alters the input field\u2019s appearance to indicate an error, helping users\nidentify fields that need correction."
|
|
624
|
-
},
|
|
625
|
-
"attribute": "error",
|
|
626
|
-
"reflect": true,
|
|
627
|
-
"defaultValue": "false"
|
|
628
|
-
},
|
|
629
|
-
"errorDescription": {
|
|
630
|
-
"type": "string",
|
|
631
|
-
"mutable": false,
|
|
632
|
-
"complexType": {
|
|
633
|
-
"original": "string",
|
|
634
|
-
"resolved": "string",
|
|
635
|
-
"references": {}
|
|
636
|
-
},
|
|
637
|
-
"required": false,
|
|
638
|
-
"optional": false,
|
|
639
|
-
"docs": {
|
|
640
|
-
"tags": [{
|
|
641
|
-
"name": "validator",
|
|
642
|
-
"text": "message"
|
|
643
|
-
}],
|
|
644
|
-
"text": "A description that appears when there is an error related to the dropdown\nfield."
|
|
645
|
-
},
|
|
646
|
-
"attribute": "error-description",
|
|
647
|
-
"reflect": true
|
|
648
|
-
},
|
|
649
|
-
"readonly": {
|
|
650
|
-
"type": "boolean",
|
|
651
|
-
"mutable": false,
|
|
652
|
-
"complexType": {
|
|
653
|
-
"original": "boolean",
|
|
654
|
-
"resolved": "boolean",
|
|
655
|
-
"references": {}
|
|
656
|
-
},
|
|
657
|
-
"required": false,
|
|
658
|
-
"optional": false,
|
|
659
|
-
"docs": {
|
|
660
|
-
"tags": [],
|
|
661
|
-
"text": "Display the input field\u2019s content without allowing users to change it.\nUsers can still click on it, select, and copy the text, but they won\u2019t be\nable to type or delete anything."
|
|
662
|
-
},
|
|
663
|
-
"attribute": "readonly",
|
|
664
|
-
"reflect": true,
|
|
665
|
-
"defaultValue": "false"
|
|
666
|
-
},
|
|
667
|
-
"disabled": {
|
|
668
|
-
"type": "boolean",
|
|
669
|
-
"mutable": false,
|
|
670
|
-
"complexType": {
|
|
671
|
-
"original": "boolean",
|
|
672
|
-
"resolved": "boolean",
|
|
673
|
-
"references": {}
|
|
674
|
-
},
|
|
675
|
-
"required": false,
|
|
676
|
-
"optional": false,
|
|
677
|
-
"docs": {
|
|
678
|
-
"tags": [],
|
|
679
|
-
"text": "The disabled prop lets you turn off the input field so that users can\u2019t\ntype in it. When disabled, the field is grayed out and won\u2019t respond to\nclicks or touches."
|
|
680
|
-
},
|
|
681
|
-
"attribute": "disabled",
|
|
682
|
-
"reflect": true,
|
|
683
|
-
"defaultValue": "false"
|
|
684
|
-
},
|
|
685
|
-
"emptyresult": {
|
|
686
|
-
"type": "string",
|
|
687
|
-
"mutable": false,
|
|
688
|
-
"complexType": {
|
|
689
|
-
"original": "string",
|
|
690
|
-
"resolved": "string",
|
|
691
|
-
"references": {}
|
|
692
|
-
},
|
|
693
|
-
"required": false,
|
|
694
|
-
"optional": false,
|
|
695
|
-
"docs": {
|
|
696
|
-
"tags": [],
|
|
697
|
-
"text": "The text to display when no items match the filter."
|
|
698
|
-
},
|
|
699
|
-
"attribute": "emptyresult",
|
|
700
|
-
"reflect": true,
|
|
701
|
-
"defaultValue": "'No results found'"
|
|
702
|
-
},
|
|
703
|
-
"filterable": {
|
|
704
|
-
"type": "boolean",
|
|
705
|
-
"mutable": true,
|
|
706
|
-
"complexType": {
|
|
707
|
-
"original": "boolean",
|
|
708
|
-
"resolved": "boolean",
|
|
709
|
-
"references": {}
|
|
710
|
-
},
|
|
711
|
-
"required": false,
|
|
712
|
-
"optional": false,
|
|
713
|
-
"docs": {
|
|
714
|
-
"tags": [],
|
|
715
|
-
"text": "Enables or disables the filtering feature for the dropdown items."
|
|
716
|
-
},
|
|
717
|
-
"attribute": "filterable",
|
|
718
|
-
"reflect": true,
|
|
719
|
-
"defaultValue": "false"
|
|
720
|
-
}
|
|
721
|
-
};
|
|
722
|
-
}
|
|
723
|
-
static get states() {
|
|
724
|
-
return {
|
|
725
|
-
"selectedValues": {},
|
|
726
|
-
"filterText": {},
|
|
727
|
-
"isFilterable": {}
|
|
728
|
-
};
|
|
729
|
-
}
|
|
730
|
-
static get events() {
|
|
731
|
-
return [{
|
|
732
|
-
"method": "valueChanged",
|
|
733
|
-
"name": "valueChanged",
|
|
734
|
-
"bubbles": true,
|
|
735
|
-
"cancelable": true,
|
|
736
|
-
"composed": true,
|
|
737
|
-
"docs": {
|
|
738
|
-
"tags": [{
|
|
739
|
-
"name": "bind",
|
|
740
|
-
"text": "value"
|
|
741
|
-
}],
|
|
742
|
-
"text": "Emitted when the input value changes."
|
|
743
|
-
},
|
|
744
|
-
"complexType": {
|
|
745
|
-
"original": "string",
|
|
746
|
-
"resolved": "string",
|
|
747
|
-
"references": {}
|
|
748
|
-
}
|
|
749
|
-
}, {
|
|
750
|
-
"method": "multiselectChange",
|
|
751
|
-
"name": "multiselectChange",
|
|
752
|
-
"bubbles": true,
|
|
753
|
-
"cancelable": true,
|
|
754
|
-
"composed": true,
|
|
755
|
-
"docs": {
|
|
756
|
-
"tags": [],
|
|
757
|
-
"text": "Event emitted when the selection changes in the multiselect.\nEmits the current list of selected values."
|
|
758
|
-
},
|
|
759
|
-
"complexType": {
|
|
760
|
-
"original": "string[]",
|
|
761
|
-
"resolved": "string[]",
|
|
762
|
-
"references": {}
|
|
763
|
-
}
|
|
764
|
-
}];
|
|
765
|
-
}
|
|
766
|
-
static get methods() {
|
|
767
|
-
return {
|
|
768
|
-
"getFilterText": {
|
|
769
|
-
"complexType": {
|
|
770
|
-
"signature": "() => Promise<string>",
|
|
771
|
-
"parameters": [],
|
|
772
|
-
"references": {
|
|
773
|
-
"Promise": {
|
|
774
|
-
"location": "global",
|
|
775
|
-
"id": "global::Promise"
|
|
776
|
-
}
|
|
777
|
-
},
|
|
778
|
-
"return": "Promise<string>"
|
|
779
|
-
},
|
|
780
|
-
"docs": {
|
|
781
|
-
"text": "Retrieves the current filter text entered by the user.",
|
|
782
|
-
"tags": [{
|
|
783
|
-
"name": "returns",
|
|
784
|
-
"text": "The filter text."
|
|
785
|
-
}]
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
};
|
|
789
|
-
}
|
|
790
|
-
static get elementRef() { return "el"; }
|
|
791
|
-
static get watchers() {
|
|
792
|
-
return [{
|
|
793
|
-
"propName": "filterable",
|
|
794
|
-
"methodName": "watchFilterableHandler"
|
|
795
|
-
}, {
|
|
796
|
-
"propName": "value",
|
|
797
|
-
"methodName": "watchValueHandler"
|
|
798
|
-
}];
|
|
799
|
-
}
|
|
800
|
-
static get listeners() {
|
|
801
|
-
return [{
|
|
802
|
-
"name": "openChanged",
|
|
803
|
-
"method": "handleOpenChanged",
|
|
804
|
-
"target": undefined,
|
|
805
|
-
"capture": false,
|
|
806
|
-
"passive": false
|
|
807
|
-
}, {
|
|
808
|
-
"name": "itemChecked",
|
|
809
|
-
"method": "handleItemChecked",
|
|
810
|
-
"target": undefined,
|
|
811
|
-
"capture": false,
|
|
812
|
-
"passive": false
|
|
813
|
-
}, {
|
|
814
|
-
"name": "keydown",
|
|
815
|
-
"method": "handleKeyDown",
|
|
816
|
-
"target": undefined,
|
|
817
|
-
"capture": false,
|
|
818
|
-
"passive": false
|
|
819
|
-
}];
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
//# sourceMappingURL=nv-fieldmultiselect.js.map
|