@openremote/or-vaadin-components 1.26.0-snapshot.20260630093114 → 1.26.1
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/custom-elements-jsx.d.ts +1931 -1931
- package/custom-elements.json +8963 -8963
- package/package.json +3 -3
package/custom-elements-jsx.d.ts
CHANGED
|
@@ -51,13 +51,13 @@ import type { ComboBoxItem } from "/home/runner/work/openremote/openremote/node_
|
|
|
51
51
|
import type { ComboBoxOverlay } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/combo-box/./lib/vaadin-combo-box-overlay.js";
|
|
52
52
|
import type { ComboBoxScroller } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/combo-box/./lib/vaadin-combo-box-scroller.js";
|
|
53
53
|
import type { ComboBox } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/combo-box/./lib/vaadin-combo-box.js";
|
|
54
|
-
import type { DatePickerYear } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/date-picker/./lib/vaadin-date-picker-year.js";
|
|
55
|
-
import type { DatePicker } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/date-picker/./lib/vaadin-date-picker.js";
|
|
56
|
-
import type { InfiniteScroller } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/date-picker/./lib/vaadin-infinite-scroller.js";
|
|
57
54
|
import type { ContextMenuItem } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/context-menu/./lib/vaadin-context-menu-item.js";
|
|
58
55
|
import type { ContextMenuListBox } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/context-menu/./lib/vaadin-context-menu-list-box.js";
|
|
59
56
|
import type { ContextMenuOverlay } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/context-menu/./lib/vaadin-context-menu-overlay.js";
|
|
60
57
|
import type { ContextMenu } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/context-menu/./lib/vaadin-context-menu.js";
|
|
58
|
+
import type { DatePickerYear } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/date-picker/./lib/vaadin-date-picker-year.js";
|
|
59
|
+
import type { DatePicker } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/date-picker/./lib/vaadin-date-picker.js";
|
|
60
|
+
import type { InfiniteScroller } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/date-picker/./lib/vaadin-infinite-scroller.js";
|
|
61
61
|
import type { DateTimePicker } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/date-time-picker/./lib/vaadin-date-time-picker.js";
|
|
62
62
|
import type { DialogOverlay } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/dialog/./lib/vaadin-dialog-overlay.js";
|
|
63
63
|
import type { Dialog } from "/home/runner/work/openremote/openremote/node_modules/@vaadin/dialog/./lib/vaadin-dialog.js";
|
|
@@ -5393,18 +5393,34 @@ the clear icon element should be provided via the `clearElement` getter. */
|
|
|
5393
5393
|
textContent?: string | number;
|
|
5394
5394
|
};
|
|
5395
5395
|
|
|
5396
|
-
export type
|
|
5396
|
+
export type ContextMenuItemProps = {
|
|
5397
|
+
/** Used for mixin detection because `instanceof` does not work with mixins.
|
|
5398
|
+
e.g. in VaadinListMixin it filters items by using the
|
|
5399
|
+
`element._hasVaadinItemMixin` condition. */
|
|
5400
|
+
_hasVaadinItemMixin?: ContextMenuItem["_hasVaadinItemMixin"];
|
|
5401
|
+
/** If true, the item is in selected state. */
|
|
5402
|
+
selected?: ContextMenuItem["selected"];
|
|
5397
5403
|
/** */
|
|
5398
|
-
|
|
5404
|
+
_value?: ContextMenuItem["_value"];
|
|
5399
5405
|
/** */
|
|
5400
|
-
|
|
5406
|
+
dir?: ContextMenuItem["dir"];
|
|
5407
|
+
/** Submittable string value. The default value is the trimmed text content of the element. */
|
|
5408
|
+
value?: ContextMenuItem["value"];
|
|
5401
5409
|
};
|
|
5402
5410
|
|
|
5403
|
-
export type
|
|
5411
|
+
export type ContextMenuItemSolidJsProps = {
|
|
5412
|
+
/** Used for mixin detection because `instanceof` does not work with mixins.
|
|
5413
|
+
e.g. in VaadinListMixin it filters items by using the
|
|
5414
|
+
`element._hasVaadinItemMixin` condition. */
|
|
5415
|
+
"prop:_hasVaadinItemMixin"?: ContextMenuItem["_hasVaadinItemMixin"];
|
|
5416
|
+
/** If true, the item is in selected state. */
|
|
5417
|
+
"prop:selected"?: ContextMenuItem["selected"];
|
|
5404
5418
|
/** */
|
|
5405
|
-
"prop:
|
|
5419
|
+
"prop:_value"?: ContextMenuItem["_value"];
|
|
5406
5420
|
/** */
|
|
5407
|
-
"prop:
|
|
5421
|
+
"prop:dir"?: ContextMenuItem["dir"];
|
|
5422
|
+
/** Submittable string value. The default value is the trimmed text content of the element. */
|
|
5423
|
+
"prop:value"?: ContextMenuItem["value"];
|
|
5408
5424
|
|
|
5409
5425
|
/** Set the innerHTML of the element */
|
|
5410
5426
|
innerHTML?: string;
|
|
@@ -5412,357 +5428,426 @@ export type DatePickerYearSolidJsProps = {
|
|
|
5412
5428
|
textContent?: string | number;
|
|
5413
5429
|
};
|
|
5414
5430
|
|
|
5415
|
-
export type
|
|
5416
|
-
/**
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
/**
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
"
|
|
5424
|
-
/**
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
invalid?: unknown;
|
|
5434
|
-
/** Set when the element is focused */
|
|
5435
|
-
focused?: unknown;
|
|
5436
|
-
/** Set when the element is keyboard focused */
|
|
5437
|
-
"focus-ring"?: unknown;
|
|
5438
|
-
/** Set when the element is readonly */
|
|
5439
|
-
readonly?: DatePicker["readonly"];
|
|
5440
|
-
/** Set when the overlay is opened */
|
|
5441
|
-
opened?: DatePicker["opened"];
|
|
5442
|
-
/** Set when week numbers are shown in the calendar */
|
|
5443
|
-
"week-numbers"?: unknown;
|
|
5444
|
-
/** */
|
|
5445
|
-
"<vaadin-date-picker>"?: unknown;
|
|
5446
|
-
/** */
|
|
5447
|
-
"<vaadin-date-picker-overlay-content>"?: unknown;
|
|
5448
|
-
/** */
|
|
5449
|
-
"<vaadin-date-picker-month-scroller>"?: unknown;
|
|
5450
|
-
/** */
|
|
5451
|
-
"<vaadin-date-picker-year-scroller>"?: unknown;
|
|
5452
|
-
/** */
|
|
5453
|
-
"<vaadin-date-picker-year>"?: unknown;
|
|
5431
|
+
export type ContextMenuListBoxProps = {
|
|
5432
|
+
/** Define how items are disposed in the dom.
|
|
5433
|
+
Possible values are: `horizontal|vertical`.
|
|
5434
|
+
It also changes navigation keys from left/right to up/down. */
|
|
5435
|
+
orientation?: ContextMenuListBox["orientation"];
|
|
5436
|
+
/** If true, the user cannot interact with this element.
|
|
5437
|
+
When the element is disabled, the selected item is
|
|
5438
|
+
not updated when `selected` property is changed. */
|
|
5439
|
+
disabled?: ContextMenuListBox["disabled"];
|
|
5440
|
+
/** The index of the item selected in the items array.
|
|
5441
|
+
Note: Not updated when used in `multiple` selection mode. */
|
|
5442
|
+
selected?: ContextMenuListBox["selected"];
|
|
5443
|
+
/** A read-only list of items from which a selection can be made.
|
|
5444
|
+
It is populated from the elements passed to the light DOM,
|
|
5445
|
+
and updated dynamically when adding or removing items. */
|
|
5446
|
+
items?: ContextMenuListBox["items"];
|
|
5447
|
+
/** The search buffer for the keyboard selection feature. */
|
|
5448
|
+
_searchBuf?: ContextMenuListBox["_searchBuf"];
|
|
5454
5449
|
/** */
|
|
5455
|
-
"
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5450
|
+
dir?: ContextMenuListBox["dir"];
|
|
5451
|
+
};
|
|
5452
|
+
|
|
5453
|
+
export type ContextMenuListBoxSolidJsProps = {
|
|
5454
|
+
/** Define how items are disposed in the dom.
|
|
5455
|
+
Possible values are: `horizontal|vertical`.
|
|
5456
|
+
It also changes navigation keys from left/right to up/down. */
|
|
5457
|
+
"prop:orientation"?: ContextMenuListBox["orientation"];
|
|
5458
|
+
/** If true, the user cannot interact with this element.
|
|
5459
|
+
When the element is disabled, the selected item is
|
|
5460
|
+
not updated when `selected` property is changed. */
|
|
5461
|
+
"prop:disabled"?: ContextMenuListBox["disabled"];
|
|
5462
|
+
/** The index of the item selected in the items array.
|
|
5463
|
+
Note: Not updated when used in `multiple` selection mode. */
|
|
5464
|
+
"prop:selected"?: ContextMenuListBox["selected"];
|
|
5465
|
+
/** A read-only list of items from which a selection can be made.
|
|
5466
|
+
It is populated from the elements passed to the light DOM,
|
|
5467
|
+
and updated dynamically when adding or removing items. */
|
|
5468
|
+
"prop:items"?: ContextMenuListBox["items"];
|
|
5469
|
+
/** The search buffer for the keyboard selection feature. */
|
|
5470
|
+
"prop:_searchBuf"?: ContextMenuListBox["_searchBuf"];
|
|
5462
5471
|
/** */
|
|
5463
|
-
|
|
5464
|
-
/** Selected date.
|
|
5472
|
+
"prop:dir"?: ContextMenuListBox["dir"];
|
|
5465
5473
|
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5474
|
+
/** Set the innerHTML of the element */
|
|
5475
|
+
innerHTML?: string;
|
|
5476
|
+
/** Set the textContent of the element */
|
|
5477
|
+
textContent?: string | number;
|
|
5478
|
+
};
|
|
5471
5479
|
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
is 1 (Monday). */
|
|
5479
|
-
showWeekNumbers?: DatePicker["showWeekNumbers"];
|
|
5480
|
+
export type ContextMenuOverlayProps = {
|
|
5481
|
+
/** Position of the overlay with respect to the target.
|
|
5482
|
+
Supported values: null, `top-start`, `top`, `top-end`,
|
|
5483
|
+
`bottom-start`, `bottom`, `bottom-end`, `start-top`,
|
|
5484
|
+
`start`, `start-bottom`, `end-top`, `end`, `end-bottom`. */
|
|
5485
|
+
position?: ContextMenuOverlay["position"];
|
|
5480
5486
|
/** */
|
|
5481
|
-
|
|
5487
|
+
parentOverlay?: ContextMenuOverlay["parentOverlay"];
|
|
5482
5488
|
/** */
|
|
5483
|
-
|
|
5484
|
-
/**
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5489
|
+
_theme?: ContextMenuOverlay["_theme"];
|
|
5490
|
+
/** When true, opening the overlay moves focus to the first focusable child,
|
|
5491
|
+
or to the overlay part with tabindex if there are no focusable children. */
|
|
5492
|
+
focusTrap?: ContextMenuOverlay["focusTrap"];
|
|
5493
|
+
/** Set to true to enable restoring of focus when overlay is closed. */
|
|
5494
|
+
restoreFocusOnClose?: ContextMenuOverlay["restoreFocusOnClose"];
|
|
5495
|
+
/** Set to specify the element which should be focused on overlay close,
|
|
5496
|
+
if `restoreFocusOnClose` is set to true. */
|
|
5497
|
+
restoreFocusNode?: ContextMenuOverlay["restoreFocusNode"];
|
|
5498
|
+
/** The element next to which this overlay should be aligned.
|
|
5499
|
+
The position of the overlay relative to the positionTarget can be adjusted
|
|
5500
|
+
with properties `horizontalAlign`, `verticalAlign`, `noHorizontalOverlap`
|
|
5501
|
+
and `noVerticalOverlap`. */
|
|
5502
|
+
positionTarget?: ContextMenuOverlay["positionTarget"];
|
|
5503
|
+
/** When `positionTarget` is set, this property defines whether to align the overlay's
|
|
5504
|
+
left or right side to the target element by default.
|
|
5505
|
+
Possible values are `start` and `end`.
|
|
5506
|
+
RTL is taken into account when interpreting the value.
|
|
5507
|
+
The overlay is automatically flipped to the opposite side when it doesn't fit into
|
|
5508
|
+
the default side defined by this property. */
|
|
5509
|
+
horizontalAlign?: ContextMenuOverlay["horizontalAlign"];
|
|
5510
|
+
/** When `positionTarget` is set, this property defines whether to align the overlay's
|
|
5511
|
+
top or bottom side to the target element by default.
|
|
5512
|
+
Possible values are `top` and `bottom`.
|
|
5513
|
+
The overlay is automatically flipped to the opposite side when it doesn't fit into
|
|
5514
|
+
the default side defined by this property. */
|
|
5515
|
+
verticalAlign?: ContextMenuOverlay["verticalAlign"];
|
|
5516
|
+
/** When `positionTarget` is set, this property defines whether the overlay should overlap
|
|
5517
|
+
the target element in the x-axis, or be positioned right next to it. */
|
|
5518
|
+
noHorizontalOverlap?: ContextMenuOverlay["noHorizontalOverlap"];
|
|
5519
|
+
/** When `positionTarget` is set, this property defines whether the overlay should overlap
|
|
5520
|
+
the target element in the y-axis, or be positioned right above/below it. */
|
|
5521
|
+
noVerticalOverlap?: ContextMenuOverlay["noVerticalOverlap"];
|
|
5522
|
+
/** If the overlay content has no intrinsic height, this property can be used to set
|
|
5523
|
+
the minimum vertical space (in pixels) required by the overlay. Setting a value to
|
|
5524
|
+
the property effectively disables the content measurement in favor of using this
|
|
5525
|
+
fixed value for determining the open direction. */
|
|
5526
|
+
requiredVerticalSpace?: ContextMenuOverlay["requiredVerticalSpace"];
|
|
5527
|
+
/** When true, the overlay is visible and attached to body. */
|
|
5528
|
+
opened?: ContextMenuOverlay["opened"];
|
|
5529
|
+
/** Owner element passed with renderer function */
|
|
5530
|
+
owner?: ContextMenuOverlay["owner"];
|
|
5531
|
+
/** Object with properties that is passed to `renderer` function */
|
|
5532
|
+
model?: ContextMenuOverlay["model"];
|
|
5533
|
+
/** Custom function for rendering the content of the overlay.
|
|
5534
|
+
Receives three arguments:
|
|
5491
5535
|
|
|
5492
|
-
|
|
5493
|
-
-
|
|
5494
|
-
-
|
|
5495
|
-
|
|
5496
|
-
/**
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
/**
|
|
5503
|
-
|
|
5536
|
+
- `root` The root container DOM element. Append your content to it.
|
|
5537
|
+
- `owner` The host element of the renderer function.
|
|
5538
|
+
- `model` The object with the properties related with rendering. */
|
|
5539
|
+
renderer?: ContextMenuOverlay["renderer"];
|
|
5540
|
+
/** When true the overlay won't disable the main content, showing
|
|
5541
|
+
it doesn't change the functionality of the user interface. */
|
|
5542
|
+
modeless?: ContextMenuOverlay["modeless"];
|
|
5543
|
+
/** When set to true, the overlay is hidden. This also closes the overlay
|
|
5544
|
+
immediately in case there is a closing animation in progress. */
|
|
5545
|
+
hidden?: ContextMenuOverlay["hidden"];
|
|
5546
|
+
/** When true the overlay has backdrop on top of content when opened. */
|
|
5547
|
+
withBackdrop?: ContextMenuOverlay["withBackdrop"];
|
|
5504
5548
|
/** */
|
|
5505
|
-
|
|
5549
|
+
dir?: ContextMenuOverlay["dir"];
|
|
5506
5550
|
/** */
|
|
5507
|
-
|
|
5551
|
+
__focusTrapController?: ContextMenuOverlay["__focusTrapController"];
|
|
5508
5552
|
/** */
|
|
5509
|
-
|
|
5553
|
+
__focusRestorationController?: ContextMenuOverlay["__focusRestorationController"];
|
|
5510
5554
|
/** */
|
|
5511
|
-
|
|
5555
|
+
_boundMouseDownListener?: ContextMenuOverlay["_boundMouseDownListener"];
|
|
5512
5556
|
/** */
|
|
5513
|
-
|
|
5514
|
-
/**
|
|
5515
|
-
|
|
5516
|
-
|
|
5557
|
+
_boundMouseUpListener?: ContextMenuOverlay["_boundMouseUpListener"];
|
|
5558
|
+
/** */
|
|
5559
|
+
_boundOutsideClickListener?: ContextMenuOverlay["_boundOutsideClickListener"];
|
|
5560
|
+
/** */
|
|
5561
|
+
_boundKeydownListener?: ContextMenuOverlay["_boundKeydownListener"];
|
|
5517
5562
|
|
|
5518
|
-
Should be overridden by subclasses to provide a custom JSDoc with the
|
|
5519
|
-
default I18N properties. */
|
|
5520
|
-
i18n?: DatePicker["i18n"];
|
|
5521
5563
|
/** */
|
|
5522
|
-
|
|
5523
|
-
/**
|
|
5564
|
+
"onvaadin-overlay-closed"?: (e: CustomEvent) => void;
|
|
5565
|
+
/** */
|
|
5566
|
+
"onvaadin-overlay-closing"?: (e: CustomEvent) => void;
|
|
5567
|
+
};
|
|
5524
5568
|
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
- `
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
`allowedCharPattern = "[\\d-]"` */
|
|
5532
|
-
allowedCharPattern?: DatePicker["allowedCharPattern"];
|
|
5533
|
-
/** If true, the input text gets fully selected when the field is focused using click or touch / tap. */
|
|
5534
|
-
autoselect?: DatePicker["autoselect"];
|
|
5535
|
-
/** The name of this field. */
|
|
5536
|
-
name?: DatePicker["name"];
|
|
5537
|
-
/** A hint to the user of what can be entered in the field. */
|
|
5538
|
-
placeholder?: DatePicker["placeholder"];
|
|
5539
|
-
/** The text usually displayed in a tooltip popup when the mouse is over the field. */
|
|
5540
|
-
title?: DatePicker["title"];
|
|
5541
|
-
/** A target element to which ARIA attributes are set. */
|
|
5542
|
-
ariaTarget?: DatePicker["ariaTarget"];
|
|
5543
|
-
/** Error to show when the field is invalid. */
|
|
5544
|
-
errorMessage?: DatePicker["errorMessage"];
|
|
5545
|
-
/** String used for the helper text. */
|
|
5546
|
-
helperText?: DatePicker["helperText"];
|
|
5547
|
-
/** String used to label the component to screen reader users. */
|
|
5548
|
-
accessibleName?: DatePicker["accessibleName"];
|
|
5549
|
-
/** Id of the element used as label of the component to screen reader users. */
|
|
5550
|
-
accessibleNameRef?: DatePicker["accessibleNameRef"];
|
|
5551
|
-
/** Set to true to display the clear icon which clears the input.
|
|
5552
|
-
|
|
5553
|
-
It is up to the component to choose where to place the clear icon:
|
|
5554
|
-
in the Shadow DOM or in the light DOM. In any way, a reference to
|
|
5555
|
-
the clear icon element should be provided via the `clearElement` getter. */
|
|
5556
|
-
clearButtonVisible?: DatePicker["clearButtonVisible"];
|
|
5569
|
+
export type ContextMenuOverlaySolidJsProps = {
|
|
5570
|
+
/** Position of the overlay with respect to the target.
|
|
5571
|
+
Supported values: null, `top-start`, `top`, `top-end`,
|
|
5572
|
+
`bottom-start`, `bottom`, `bottom-end`, `start-top`,
|
|
5573
|
+
`start`, `start-bottom`, `end-top`, `end`, `end-bottom`. */
|
|
5574
|
+
"prop:position"?: ContextMenuOverlay["position"];
|
|
5557
5575
|
/** */
|
|
5558
|
-
|
|
5576
|
+
"prop:parentOverlay"?: ContextMenuOverlay["parentOverlay"];
|
|
5559
5577
|
/** */
|
|
5560
|
-
|
|
5578
|
+
"prop:_theme"?: ContextMenuOverlay["_theme"];
|
|
5579
|
+
/** When true, opening the overlay moves focus to the first focusable child,
|
|
5580
|
+
or to the overlay part with tabindex if there are no focusable children. */
|
|
5581
|
+
"prop:focusTrap"?: ContextMenuOverlay["focusTrap"];
|
|
5582
|
+
/** Set to true to enable restoring of focus when overlay is closed. */
|
|
5583
|
+
"prop:restoreFocusOnClose"?: ContextMenuOverlay["restoreFocusOnClose"];
|
|
5584
|
+
/** Set to specify the element which should be focused on overlay close,
|
|
5585
|
+
if `restoreFocusOnClose` is set to true. */
|
|
5586
|
+
"prop:restoreFocusNode"?: ContextMenuOverlay["restoreFocusNode"];
|
|
5587
|
+
/** The element next to which this overlay should be aligned.
|
|
5588
|
+
The position of the overlay relative to the positionTarget can be adjusted
|
|
5589
|
+
with properties `horizontalAlign`, `verticalAlign`, `noHorizontalOverlap`
|
|
5590
|
+
and `noVerticalOverlap`. */
|
|
5591
|
+
"prop:positionTarget"?: ContextMenuOverlay["positionTarget"];
|
|
5592
|
+
/** When `positionTarget` is set, this property defines whether to align the overlay's
|
|
5593
|
+
left or right side to the target element by default.
|
|
5594
|
+
Possible values are `start` and `end`.
|
|
5595
|
+
RTL is taken into account when interpreting the value.
|
|
5596
|
+
The overlay is automatically flipped to the opposite side when it doesn't fit into
|
|
5597
|
+
the default side defined by this property. */
|
|
5598
|
+
"prop:horizontalAlign"?: ContextMenuOverlay["horizontalAlign"];
|
|
5599
|
+
/** When `positionTarget` is set, this property defines whether to align the overlay's
|
|
5600
|
+
top or bottom side to the target element by default.
|
|
5601
|
+
Possible values are `top` and `bottom`.
|
|
5602
|
+
The overlay is automatically flipped to the opposite side when it doesn't fit into
|
|
5603
|
+
the default side defined by this property. */
|
|
5604
|
+
"prop:verticalAlign"?: ContextMenuOverlay["verticalAlign"];
|
|
5605
|
+
/** When `positionTarget` is set, this property defines whether the overlay should overlap
|
|
5606
|
+
the target element in the x-axis, or be positioned right next to it. */
|
|
5607
|
+
"prop:noHorizontalOverlap"?: ContextMenuOverlay["noHorizontalOverlap"];
|
|
5608
|
+
/** When `positionTarget` is set, this property defines whether the overlay should overlap
|
|
5609
|
+
the target element in the y-axis, or be positioned right above/below it. */
|
|
5610
|
+
"prop:noVerticalOverlap"?: ContextMenuOverlay["noVerticalOverlap"];
|
|
5611
|
+
/** If the overlay content has no intrinsic height, this property can be used to set
|
|
5612
|
+
the minimum vertical space (in pixels) required by the overlay. Setting a value to
|
|
5613
|
+
the property effectively disables the content measurement in favor of using this
|
|
5614
|
+
fixed value for determining the open direction. */
|
|
5615
|
+
"prop:requiredVerticalSpace"?: ContextMenuOverlay["requiredVerticalSpace"];
|
|
5616
|
+
/** When true, the overlay is visible and attached to body. */
|
|
5617
|
+
"prop:opened"?: ContextMenuOverlay["opened"];
|
|
5618
|
+
/** Owner element passed with renderer function */
|
|
5619
|
+
"prop:owner"?: ContextMenuOverlay["owner"];
|
|
5620
|
+
/** Object with properties that is passed to `renderer` function */
|
|
5621
|
+
"prop:model"?: ContextMenuOverlay["model"];
|
|
5622
|
+
/** Custom function for rendering the content of the overlay.
|
|
5623
|
+
Receives three arguments:
|
|
5624
|
+
|
|
5625
|
+
- `root` The root container DOM element. Append your content to it.
|
|
5626
|
+
- `owner` The host element of the renderer function.
|
|
5627
|
+
- `model` The object with the properties related with rendering. */
|
|
5628
|
+
"prop:renderer"?: ContextMenuOverlay["renderer"];
|
|
5629
|
+
/** When true the overlay won't disable the main content, showing
|
|
5630
|
+
it doesn't change the functionality of the user interface. */
|
|
5631
|
+
"prop:modeless"?: ContextMenuOverlay["modeless"];
|
|
5632
|
+
/** When set to true, the overlay is hidden. This also closes the overlay
|
|
5633
|
+
immediately in case there is a closing animation in progress. */
|
|
5634
|
+
"prop:hidden"?: ContextMenuOverlay["hidden"];
|
|
5635
|
+
/** When true the overlay has backdrop on top of content when opened. */
|
|
5636
|
+
"prop:withBackdrop"?: ContextMenuOverlay["withBackdrop"];
|
|
5561
5637
|
/** */
|
|
5562
|
-
|
|
5638
|
+
"prop:dir"?: ContextMenuOverlay["dir"];
|
|
5563
5639
|
/** */
|
|
5564
|
-
|
|
5640
|
+
"prop:__focusTrapController"?: ContextMenuOverlay["__focusTrapController"];
|
|
5565
5641
|
/** */
|
|
5566
|
-
|
|
5642
|
+
"prop:__focusRestorationController"?: ContextMenuOverlay["__focusRestorationController"];
|
|
5567
5643
|
/** */
|
|
5568
|
-
|
|
5644
|
+
"prop:_boundMouseDownListener"?: ContextMenuOverlay["_boundMouseDownListener"];
|
|
5569
5645
|
/** */
|
|
5570
|
-
|
|
5646
|
+
"prop:_boundMouseUpListener"?: ContextMenuOverlay["_boundMouseUpListener"];
|
|
5571
5647
|
/** */
|
|
5572
|
-
|
|
5648
|
+
"prop:_boundOutsideClickListener"?: ContextMenuOverlay["_boundOutsideClickListener"];
|
|
5573
5649
|
/** */
|
|
5574
|
-
|
|
5650
|
+
"prop:_boundKeydownListener"?: ContextMenuOverlay["_boundKeydownListener"];
|
|
5575
5651
|
/** */
|
|
5576
|
-
|
|
5652
|
+
"on:vaadin-overlay-closed"?: (e: CustomEvent) => void;
|
|
5653
|
+
/** */
|
|
5654
|
+
"on:vaadin-overlay-closing"?: (e: CustomEvent) => void;
|
|
5577
5655
|
|
|
5578
|
-
/**
|
|
5579
|
-
|
|
5580
|
-
/**
|
|
5581
|
-
|
|
5582
|
-
/** Fired when the `invalid` property changes. */
|
|
5583
|
-
"oninvalid-changed"?: (e: CustomEvent) => void;
|
|
5584
|
-
/** Fired when the `opened` property changes. */
|
|
5585
|
-
"onopened-changed"?: (e: CustomEvent) => void;
|
|
5586
|
-
/** Fired when the `value` property changes. */
|
|
5587
|
-
"onvalue-changed"?: (e: CustomEvent) => void;
|
|
5588
|
-
/** Fired whenever the field is validated. */
|
|
5589
|
-
onvalidated?: (e: CustomEvent) => void;
|
|
5656
|
+
/** Set the innerHTML of the element */
|
|
5657
|
+
innerHTML?: string;
|
|
5658
|
+
/** Set the textContent of the element */
|
|
5659
|
+
textContent?: string | number;
|
|
5590
5660
|
};
|
|
5591
5661
|
|
|
5592
|
-
export type
|
|
5593
|
-
/**
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
"prop:undefined"?: unknown;
|
|
5599
|
-
/** Set when the element has a value */
|
|
5600
|
-
"bool:has-value"?: unknown;
|
|
5601
|
-
/** Set when the element has a label */
|
|
5602
|
-
"bool:has-label"?: unknown;
|
|
5603
|
-
/** Set when the element has helper text or slot */
|
|
5604
|
-
"bool:has-helper"?: unknown;
|
|
5605
|
-
/** Set when the element has an error message */
|
|
5606
|
-
"bool:has-error-message"?: unknown;
|
|
5607
|
-
/** Set when the element has a slotted tooltip */
|
|
5608
|
-
"bool:has-tooltip"?: unknown;
|
|
5609
|
-
/** Set when the element is invalid */
|
|
5610
|
-
"bool:invalid"?: unknown;
|
|
5611
|
-
/** Set when the element is focused */
|
|
5612
|
-
"bool:focused"?: unknown;
|
|
5613
|
-
/** Set when the element is keyboard focused */
|
|
5614
|
-
"bool:focus-ring"?: unknown;
|
|
5615
|
-
/** Set when the element is readonly */
|
|
5616
|
-
"prop:readonly"?: DatePicker["readonly"];
|
|
5617
|
-
/** Set when the overlay is opened */
|
|
5618
|
-
"prop:opened"?: DatePicker["opened"];
|
|
5619
|
-
/** Set when week numbers are shown in the calendar */
|
|
5620
|
-
"bool:week-numbers"?: unknown;
|
|
5621
|
-
/** */
|
|
5622
|
-
"bool:<vaadin-date-picker>"?: unknown;
|
|
5662
|
+
export type ContextMenuProps = {
|
|
5663
|
+
/** Position of the overlay with respect to the target.
|
|
5664
|
+
Supported values: null, `top-start`, `top`, `top-end`,
|
|
5665
|
+
`bottom-start`, `bottom`, `bottom-end`, `start-top`,
|
|
5666
|
+
`start`, `start-bottom`, `end-top`, `end`, `end-bottom`. */
|
|
5667
|
+
position?: ContextMenu["position"];
|
|
5623
5668
|
/** */
|
|
5624
|
-
"
|
|
5669
|
+
"<vaadin-item>"?: unknown;
|
|
5625
5670
|
/** */
|
|
5626
|
-
|
|
5671
|
+
undefined?: unknown;
|
|
5672
|
+
/** CSS selector that can be used to target any child element
|
|
5673
|
+
of the context menu to listen for `openOn` events. */
|
|
5674
|
+
selector?: ContextMenu["selector"];
|
|
5675
|
+
/** True if the overlay is currently displayed. */
|
|
5676
|
+
opened?: ContextMenu["opened"];
|
|
5677
|
+
/** Event name to listen for opening the context menu. */
|
|
5678
|
+
openOn?: ContextMenu["openOn"];
|
|
5679
|
+
/** The target element that's listened to for context menu opening events.
|
|
5680
|
+
By default the vaadin-context-menu listens to the target's `vaadin-contextmenu`
|
|
5681
|
+
events. */
|
|
5682
|
+
listenOn?: ContextMenu["listenOn"];
|
|
5683
|
+
/** Event name to listen for closing the context menu. */
|
|
5684
|
+
closeOn?: ContextMenu["closeOn"];
|
|
5685
|
+
/** Custom function for rendering the content of the menu overlay.
|
|
5686
|
+
Receives three arguments:
|
|
5687
|
+
|
|
5688
|
+
- `root` The root container DOM element. Append your content to it.
|
|
5689
|
+
- `contextMenu` The reference to the `<vaadin-context-menu>` element.
|
|
5690
|
+
- `context` The object with the menu context, contains:
|
|
5691
|
+
- `context.target` the target of the menu opening event,
|
|
5692
|
+
- `context.detail` the menu opening event detail. */
|
|
5693
|
+
renderer?: ContextMenu["renderer"];
|
|
5694
|
+
/** When true, the menu overlay is modeless. */
|
|
5695
|
+
_modeless?: ContextMenu["_modeless"];
|
|
5627
5696
|
/** */
|
|
5628
|
-
"
|
|
5697
|
+
_context?: ContextMenu["_context"];
|
|
5629
5698
|
/** */
|
|
5630
|
-
"
|
|
5699
|
+
_phone?: ContextMenu["_phone"];
|
|
5631
5700
|
/** */
|
|
5632
|
-
"
|
|
5633
|
-
/** Fullscreen mode years scroller toggle */
|
|
5634
|
-
"bool:years-toggle-button"?: unknown;
|
|
5635
|
-
/** Toolbar with slotted buttons */
|
|
5636
|
-
"bool:toolbar"?: unknown;
|
|
5637
|
-
/** The current selected date. */
|
|
5638
|
-
"prop:_selectedDate"?: DatePicker["_selectedDate"];
|
|
5701
|
+
_fullscreen?: ContextMenu["_fullscreen"];
|
|
5639
5702
|
/** */
|
|
5640
|
-
|
|
5641
|
-
/**
|
|
5703
|
+
_fullscreenMediaQuery?: ContextMenu["_fullscreenMediaQuery"];
|
|
5704
|
+
/** Defines a (hierarchical) menu structure for the component.
|
|
5705
|
+
If a menu item has a non-empty `children` set, a sub-menu with the child items is opened
|
|
5706
|
+
next to the parent menu on mouseover, tap or a right arrow keypress.
|
|
5642
5707
|
|
|
5643
|
-
|
|
5644
|
-
- ISO 8601 `"YYYY-MM-DD"` (default)
|
|
5645
|
-
- 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"` */
|
|
5646
|
-
"prop:value"?: DatePicker["value"];
|
|
5647
|
-
/** Date which should be visible when there is no value selected.
|
|
5708
|
+
The items API can't be used together with a renderer!
|
|
5648
5709
|
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5710
|
+
#### Example
|
|
5711
|
+
|
|
5712
|
+
```javascript
|
|
5713
|
+
contextMenu.items = [
|
|
5714
|
+
{ text: 'Menu Item 1', theme: 'primary', className: 'first', children:
|
|
5715
|
+
[
|
|
5716
|
+
{ text: 'Menu Item 1-1', checked: true, keepOpen: true },
|
|
5717
|
+
{ text: 'Menu Item 1-2' }
|
|
5718
|
+
]
|
|
5719
|
+
},
|
|
5720
|
+
{ component: 'hr' },
|
|
5721
|
+
{ text: 'Menu Item 2', children:
|
|
5722
|
+
[
|
|
5723
|
+
{ text: 'Menu Item 2-1' },
|
|
5724
|
+
{ text: 'Menu Item 2-2', disabled: true }
|
|
5725
|
+
]
|
|
5726
|
+
},
|
|
5727
|
+
{ text: 'Menu Item 3', disabled: true, className: 'last' }
|
|
5728
|
+
];
|
|
5729
|
+
``` */
|
|
5730
|
+
items?: ContextMenu["items"];
|
|
5657
5731
|
/** */
|
|
5658
|
-
|
|
5732
|
+
_positionTarget?: ContextMenu["_positionTarget"];
|
|
5659
5733
|
/** */
|
|
5660
|
-
|
|
5661
|
-
/** The earliest date that can be selected. All earlier dates will be disabled.
|
|
5662
|
-
|
|
5663
|
-
Supported date formats:
|
|
5664
|
-
- ISO 8601 `"YYYY-MM-DD"` (default)
|
|
5665
|
-
- 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"` */
|
|
5666
|
-
"prop:min"?: DatePicker["min"];
|
|
5667
|
-
/** The latest date that can be selected. All later dates will be disabled.
|
|
5668
|
-
|
|
5669
|
-
Supported date formats:
|
|
5670
|
-
- ISO 8601 `"YYYY-MM-DD"` (default)
|
|
5671
|
-
- 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"` */
|
|
5672
|
-
"prop:max"?: DatePicker["max"];
|
|
5673
|
-
/** A function to be used to determine whether the user can select a given date.
|
|
5674
|
-
Receives a `DatePickerDate` object of the date to be selected and should return a
|
|
5675
|
-
boolean. */
|
|
5676
|
-
"prop:isDateDisabled"?: DatePicker["isDateDisabled"];
|
|
5677
|
-
/** The earliest date that can be selected. All earlier dates will be disabled. */
|
|
5678
|
-
"prop:_minDate"?: DatePicker["_minDate"];
|
|
5679
|
-
/** The latest date that can be selected. All later dates will be disabled. */
|
|
5680
|
-
"prop:_maxDate"?: DatePicker["_maxDate"];
|
|
5681
|
-
/** */
|
|
5682
|
-
"prop:_noInput"?: DatePicker["_noInput"];
|
|
5734
|
+
dir?: ContextMenu["dir"];
|
|
5683
5735
|
/** */
|
|
5684
|
-
|
|
5736
|
+
_boundOpen?: ContextMenu["_boundOpen"];
|
|
5685
5737
|
/** */
|
|
5686
|
-
|
|
5738
|
+
_boundClose?: ContextMenu["_boundClose"];
|
|
5687
5739
|
/** */
|
|
5688
|
-
|
|
5740
|
+
_boundPreventDefault?: ContextMenu["_boundPreventDefault"];
|
|
5689
5741
|
/** */
|
|
5690
|
-
|
|
5691
|
-
/** The object used to localize this component. To change the default
|
|
5692
|
-
localization, replace this with an object that provides all properties, or
|
|
5693
|
-
just the individual properties you want to change.
|
|
5694
|
-
|
|
5695
|
-
Should be overridden by subclasses to provide a custom JSDoc with the
|
|
5696
|
-
default I18N properties. */
|
|
5697
|
-
"prop:i18n"?: DatePicker["i18n"];
|
|
5742
|
+
_boundOnGlobalContextMenu?: ContextMenu["_boundOnGlobalContextMenu"];
|
|
5698
5743
|
/** */
|
|
5699
|
-
|
|
5700
|
-
/** A pattern matched against individual characters the user inputs.
|
|
5744
|
+
__itemsOutsideClickListener?: ContextMenu["__itemsOutsideClickListener"];
|
|
5701
5745
|
|
|
5702
|
-
|
|
5703
|
-
-
|
|
5704
|
-
|
|
5705
|
-
-
|
|
5746
|
+
/** Fired when the `opened` property changes. */
|
|
5747
|
+
"onopened-changed"?: (e: CustomEvent) => void;
|
|
5748
|
+
/** Fired when an item is selected when the context menu is populated using the `items` API. */
|
|
5749
|
+
"onitem-selected"?: (e: CustomEvent) => void;
|
|
5750
|
+
/** Fired when the context menu is closed. */
|
|
5751
|
+
onclosed?: (e: CustomEvent) => void;
|
|
5752
|
+
/** Fired when all menus should close, e.g., after pressing Tab or on submenu close. */
|
|
5753
|
+
"onclose-all-menus"?: (e: CustomEvent) => void;
|
|
5754
|
+
/** Fired when a click happens outside any open sub-menus. */
|
|
5755
|
+
"onitems-outside-click"?: (e: CustomEvent) => void;
|
|
5756
|
+
};
|
|
5706
5757
|
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
"prop:
|
|
5720
|
-
/**
|
|
5721
|
-
"prop:
|
|
5722
|
-
/**
|
|
5723
|
-
"prop:
|
|
5724
|
-
/**
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
"prop:
|
|
5728
|
-
/**
|
|
5758
|
+
export type ContextMenuSolidJsProps = {
|
|
5759
|
+
/** Position of the overlay with respect to the target.
|
|
5760
|
+
Supported values: null, `top-start`, `top`, `top-end`,
|
|
5761
|
+
`bottom-start`, `bottom`, `bottom-end`, `start-top`,
|
|
5762
|
+
`start`, `start-bottom`, `end-top`, `end`, `end-bottom`. */
|
|
5763
|
+
"prop:position"?: ContextMenu["position"];
|
|
5764
|
+
/** */
|
|
5765
|
+
"bool:<vaadin-item>"?: unknown;
|
|
5766
|
+
/** */
|
|
5767
|
+
"prop:undefined"?: unknown;
|
|
5768
|
+
/** CSS selector that can be used to target any child element
|
|
5769
|
+
of the context menu to listen for `openOn` events. */
|
|
5770
|
+
"prop:selector"?: ContextMenu["selector"];
|
|
5771
|
+
/** True if the overlay is currently displayed. */
|
|
5772
|
+
"prop:opened"?: ContextMenu["opened"];
|
|
5773
|
+
/** Event name to listen for opening the context menu. */
|
|
5774
|
+
"prop:openOn"?: ContextMenu["openOn"];
|
|
5775
|
+
/** The target element that's listened to for context menu opening events.
|
|
5776
|
+
By default the vaadin-context-menu listens to the target's `vaadin-contextmenu`
|
|
5777
|
+
events. */
|
|
5778
|
+
"prop:listenOn"?: ContextMenu["listenOn"];
|
|
5779
|
+
/** Event name to listen for closing the context menu. */
|
|
5780
|
+
"prop:closeOn"?: ContextMenu["closeOn"];
|
|
5781
|
+
/** Custom function for rendering the content of the menu overlay.
|
|
5782
|
+
Receives three arguments:
|
|
5729
5783
|
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5784
|
+
- `root` The root container DOM element. Append your content to it.
|
|
5785
|
+
- `contextMenu` The reference to the `<vaadin-context-menu>` element.
|
|
5786
|
+
- `context` The object with the menu context, contains:
|
|
5787
|
+
- `context.target` the target of the menu opening event,
|
|
5788
|
+
- `context.detail` the menu opening event detail. */
|
|
5789
|
+
"prop:renderer"?: ContextMenu["renderer"];
|
|
5790
|
+
/** When true, the menu overlay is modeless. */
|
|
5791
|
+
"prop:_modeless"?: ContextMenu["_modeless"];
|
|
5734
5792
|
/** */
|
|
5735
|
-
"prop:
|
|
5793
|
+
"prop:_context"?: ContextMenu["_context"];
|
|
5736
5794
|
/** */
|
|
5737
|
-
"prop:
|
|
5795
|
+
"prop:_phone"?: ContextMenu["_phone"];
|
|
5738
5796
|
/** */
|
|
5739
|
-
"prop:
|
|
5797
|
+
"prop:_fullscreen"?: ContextMenu["_fullscreen"];
|
|
5740
5798
|
/** */
|
|
5741
|
-
"prop:
|
|
5799
|
+
"prop:_fullscreenMediaQuery"?: ContextMenu["_fullscreenMediaQuery"];
|
|
5800
|
+
/** Defines a (hierarchical) menu structure for the component.
|
|
5801
|
+
If a menu item has a non-empty `children` set, a sub-menu with the child items is opened
|
|
5802
|
+
next to the parent menu on mouseover, tap or a right arrow keypress.
|
|
5803
|
+
|
|
5804
|
+
The items API can't be used together with a renderer!
|
|
5805
|
+
|
|
5806
|
+
#### Example
|
|
5807
|
+
|
|
5808
|
+
```javascript
|
|
5809
|
+
contextMenu.items = [
|
|
5810
|
+
{ text: 'Menu Item 1', theme: 'primary', className: 'first', children:
|
|
5811
|
+
[
|
|
5812
|
+
{ text: 'Menu Item 1-1', checked: true, keepOpen: true },
|
|
5813
|
+
{ text: 'Menu Item 1-2' }
|
|
5814
|
+
]
|
|
5815
|
+
},
|
|
5816
|
+
{ component: 'hr' },
|
|
5817
|
+
{ text: 'Menu Item 2', children:
|
|
5818
|
+
[
|
|
5819
|
+
{ text: 'Menu Item 2-1' },
|
|
5820
|
+
{ text: 'Menu Item 2-2', disabled: true }
|
|
5821
|
+
]
|
|
5822
|
+
},
|
|
5823
|
+
{ text: 'Menu Item 3', disabled: true, className: 'last' }
|
|
5824
|
+
];
|
|
5825
|
+
``` */
|
|
5826
|
+
"prop:items"?: ContextMenu["items"];
|
|
5742
5827
|
/** */
|
|
5743
|
-
"prop:
|
|
5828
|
+
"prop:_positionTarget"?: ContextMenu["_positionTarget"];
|
|
5744
5829
|
/** */
|
|
5745
|
-
"prop:
|
|
5830
|
+
"prop:dir"?: ContextMenu["dir"];
|
|
5746
5831
|
/** */
|
|
5747
|
-
"prop:
|
|
5832
|
+
"prop:_boundOpen"?: ContextMenu["_boundOpen"];
|
|
5748
5833
|
/** */
|
|
5749
|
-
"prop:
|
|
5834
|
+
"prop:_boundClose"?: ContextMenu["_boundClose"];
|
|
5750
5835
|
/** */
|
|
5751
|
-
"prop:
|
|
5836
|
+
"prop:_boundPreventDefault"?: ContextMenu["_boundPreventDefault"];
|
|
5752
5837
|
/** */
|
|
5753
|
-
"prop:
|
|
5754
|
-
/**
|
|
5755
|
-
"
|
|
5756
|
-
/** Fired when the user commits an unparsable value change and there is no change event. */
|
|
5757
|
-
"on:unparsable-change"?: (e: CustomEvent) => void;
|
|
5758
|
-
/** Fired when the `invalid` property changes. */
|
|
5759
|
-
"on:invalid-changed"?: (e: CustomEvent) => void;
|
|
5838
|
+
"prop:_boundOnGlobalContextMenu"?: ContextMenu["_boundOnGlobalContextMenu"];
|
|
5839
|
+
/** */
|
|
5840
|
+
"prop:__itemsOutsideClickListener"?: ContextMenu["__itemsOutsideClickListener"];
|
|
5760
5841
|
/** Fired when the `opened` property changes. */
|
|
5761
5842
|
"on:opened-changed"?: (e: CustomEvent) => void;
|
|
5762
|
-
/** Fired when the `
|
|
5763
|
-
"on:
|
|
5764
|
-
/** Fired
|
|
5765
|
-
"on:
|
|
5843
|
+
/** Fired when an item is selected when the context menu is populated using the `items` API. */
|
|
5844
|
+
"on:item-selected"?: (e: CustomEvent) => void;
|
|
5845
|
+
/** Fired when the context menu is closed. */
|
|
5846
|
+
"on:closed"?: (e: CustomEvent) => void;
|
|
5847
|
+
/** Fired when all menus should close, e.g., after pressing Tab or on submenu close. */
|
|
5848
|
+
"on:close-all-menus"?: (e: CustomEvent) => void;
|
|
5849
|
+
/** Fired when a click happens outside any open sub-menus. */
|
|
5850
|
+
"on:items-outside-click"?: (e: CustomEvent) => void;
|
|
5766
5851
|
|
|
5767
5852
|
/** Set the innerHTML of the element */
|
|
5768
5853
|
innerHTML?: string;
|
|
@@ -5770,34 +5855,18 @@ the clear icon element should be provided via the `clearElement` getter. */
|
|
|
5770
5855
|
textContent?: string | number;
|
|
5771
5856
|
};
|
|
5772
5857
|
|
|
5773
|
-
export type
|
|
5774
|
-
/** Used for mixin detection because `instanceof` does not work with mixins.
|
|
5775
|
-
e.g. in VaadinListMixin it filters items by using the
|
|
5776
|
-
`element._hasVaadinItemMixin` condition. */
|
|
5777
|
-
_hasVaadinItemMixin?: ContextMenuItem["_hasVaadinItemMixin"];
|
|
5778
|
-
/** If true, the item is in selected state. */
|
|
5779
|
-
selected?: ContextMenuItem["selected"];
|
|
5858
|
+
export type DatePickerYearProps = {
|
|
5780
5859
|
/** */
|
|
5781
|
-
|
|
5860
|
+
year?: DatePickerYear["year"];
|
|
5782
5861
|
/** */
|
|
5783
|
-
|
|
5784
|
-
/** Submittable string value. The default value is the trimmed text content of the element. */
|
|
5785
|
-
value?: ContextMenuItem["value"];
|
|
5862
|
+
selectedDate?: DatePickerYear["selectedDate"];
|
|
5786
5863
|
};
|
|
5787
5864
|
|
|
5788
|
-
export type
|
|
5789
|
-
/** Used for mixin detection because `instanceof` does not work with mixins.
|
|
5790
|
-
e.g. in VaadinListMixin it filters items by using the
|
|
5791
|
-
`element._hasVaadinItemMixin` condition. */
|
|
5792
|
-
"prop:_hasVaadinItemMixin"?: ContextMenuItem["_hasVaadinItemMixin"];
|
|
5793
|
-
/** If true, the item is in selected state. */
|
|
5794
|
-
"prop:selected"?: ContextMenuItem["selected"];
|
|
5865
|
+
export type DatePickerYearSolidJsProps = {
|
|
5795
5866
|
/** */
|
|
5796
|
-
"prop:
|
|
5867
|
+
"prop:year"?: DatePickerYear["year"];
|
|
5797
5868
|
/** */
|
|
5798
|
-
"prop:
|
|
5799
|
-
/** Submittable string value. The default value is the trimmed text content of the element. */
|
|
5800
|
-
"prop:value"?: ContextMenuItem["value"];
|
|
5869
|
+
"prop:selectedDate"?: DatePickerYear["selectedDate"];
|
|
5801
5870
|
|
|
5802
5871
|
/** Set the innerHTML of the element */
|
|
5803
5872
|
innerHTML?: string;
|
|
@@ -5805,426 +5874,357 @@ e.g. in VaadinListMixin it filters items by using the
|
|
|
5805
5874
|
textContent?: string | number;
|
|
5806
5875
|
};
|
|
5807
5876
|
|
|
5808
|
-
export type
|
|
5809
|
-
/** Define how items are disposed in the dom.
|
|
5810
|
-
Possible values are: `horizontal|vertical`.
|
|
5811
|
-
It also changes navigation keys from left/right to up/down. */
|
|
5812
|
-
orientation?: ContextMenuListBox["orientation"];
|
|
5813
|
-
/** If true, the user cannot interact with this element.
|
|
5814
|
-
When the element is disabled, the selected item is
|
|
5815
|
-
not updated when `selected` property is changed. */
|
|
5816
|
-
disabled?: ContextMenuListBox["disabled"];
|
|
5817
|
-
/** The index of the item selected in the items array.
|
|
5818
|
-
Note: Not updated when used in `multiple` selection mode. */
|
|
5819
|
-
selected?: ContextMenuListBox["selected"];
|
|
5820
|
-
/** A read-only list of items from which a selection can be made.
|
|
5821
|
-
It is populated from the elements passed to the light DOM,
|
|
5822
|
-
and updated dynamically when adding or removing items. */
|
|
5823
|
-
items?: ContextMenuListBox["items"];
|
|
5824
|
-
/** The search buffer for the keyboard selection feature. */
|
|
5825
|
-
_searchBuf?: ContextMenuListBox["_searchBuf"];
|
|
5826
|
-
/** */
|
|
5827
|
-
dir?: ContextMenuListBox["dir"];
|
|
5828
|
-
};
|
|
5829
|
-
|
|
5830
|
-
export type ContextMenuListBoxSolidJsProps = {
|
|
5831
|
-
/** Define how items are disposed in the dom.
|
|
5832
|
-
Possible values are: `horizontal|vertical`.
|
|
5833
|
-
It also changes navigation keys from left/right to up/down. */
|
|
5834
|
-
"prop:orientation"?: ContextMenuListBox["orientation"];
|
|
5835
|
-
/** If true, the user cannot interact with this element.
|
|
5836
|
-
When the element is disabled, the selected item is
|
|
5837
|
-
not updated when `selected` property is changed. */
|
|
5838
|
-
"prop:disabled"?: ContextMenuListBox["disabled"];
|
|
5839
|
-
/** The index of the item selected in the items array.
|
|
5840
|
-
Note: Not updated when used in `multiple` selection mode. */
|
|
5841
|
-
"prop:selected"?: ContextMenuListBox["selected"];
|
|
5842
|
-
/** A read-only list of items from which a selection can be made.
|
|
5843
|
-
It is populated from the elements passed to the light DOM,
|
|
5844
|
-
and updated dynamically when adding or removing items. */
|
|
5845
|
-
"prop:items"?: ContextMenuListBox["items"];
|
|
5846
|
-
/** The search buffer for the keyboard selection feature. */
|
|
5847
|
-
"prop:_searchBuf"?: ContextMenuListBox["_searchBuf"];
|
|
5877
|
+
export type DatePickerProps = {
|
|
5848
5878
|
/** */
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
/**
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5879
|
+
_positionTarget?: DatePicker["_positionTarget"];
|
|
5880
|
+
/** Set when the element is disabled */
|
|
5881
|
+
disabled?: unknown;
|
|
5882
|
+
/** Set when the element is disabled */
|
|
5883
|
+
undefined?: unknown;
|
|
5884
|
+
/** Set when the element has a value */
|
|
5885
|
+
"has-value"?: unknown;
|
|
5886
|
+
/** Set when the element has a label */
|
|
5887
|
+
"has-label"?: unknown;
|
|
5888
|
+
/** Set when the element has helper text or slot */
|
|
5889
|
+
"has-helper"?: unknown;
|
|
5890
|
+
/** Set when the element has an error message */
|
|
5891
|
+
"has-error-message"?: unknown;
|
|
5892
|
+
/** Set when the element has a slotted tooltip */
|
|
5893
|
+
"has-tooltip"?: unknown;
|
|
5894
|
+
/** Set when the element is invalid */
|
|
5895
|
+
invalid?: unknown;
|
|
5896
|
+
/** Set when the element is focused */
|
|
5897
|
+
focused?: unknown;
|
|
5898
|
+
/** Set when the element is keyboard focused */
|
|
5899
|
+
"focus-ring"?: unknown;
|
|
5900
|
+
/** Set when the element is readonly */
|
|
5901
|
+
readonly?: DatePicker["readonly"];
|
|
5902
|
+
/** Set when the overlay is opened */
|
|
5903
|
+
opened?: DatePicker["opened"];
|
|
5904
|
+
/** Set when week numbers are shown in the calendar */
|
|
5905
|
+
"week-numbers"?: unknown;
|
|
5863
5906
|
/** */
|
|
5864
|
-
|
|
5907
|
+
"<vaadin-date-picker>"?: unknown;
|
|
5865
5908
|
/** */
|
|
5866
|
-
|
|
5867
|
-
/** When true, opening the overlay moves focus to the first focusable child,
|
|
5868
|
-
or to the overlay part with tabindex if there are no focusable children. */
|
|
5869
|
-
focusTrap?: ContextMenuOverlay["focusTrap"];
|
|
5870
|
-
/** Set to true to enable restoring of focus when overlay is closed. */
|
|
5871
|
-
restoreFocusOnClose?: ContextMenuOverlay["restoreFocusOnClose"];
|
|
5872
|
-
/** Set to specify the element which should be focused on overlay close,
|
|
5873
|
-
if `restoreFocusOnClose` is set to true. */
|
|
5874
|
-
restoreFocusNode?: ContextMenuOverlay["restoreFocusNode"];
|
|
5875
|
-
/** The element next to which this overlay should be aligned.
|
|
5876
|
-
The position of the overlay relative to the positionTarget can be adjusted
|
|
5877
|
-
with properties `horizontalAlign`, `verticalAlign`, `noHorizontalOverlap`
|
|
5878
|
-
and `noVerticalOverlap`. */
|
|
5879
|
-
positionTarget?: ContextMenuOverlay["positionTarget"];
|
|
5880
|
-
/** When `positionTarget` is set, this property defines whether to align the overlay's
|
|
5881
|
-
left or right side to the target element by default.
|
|
5882
|
-
Possible values are `start` and `end`.
|
|
5883
|
-
RTL is taken into account when interpreting the value.
|
|
5884
|
-
The overlay is automatically flipped to the opposite side when it doesn't fit into
|
|
5885
|
-
the default side defined by this property. */
|
|
5886
|
-
horizontalAlign?: ContextMenuOverlay["horizontalAlign"];
|
|
5887
|
-
/** When `positionTarget` is set, this property defines whether to align the overlay's
|
|
5888
|
-
top or bottom side to the target element by default.
|
|
5889
|
-
Possible values are `top` and `bottom`.
|
|
5890
|
-
The overlay is automatically flipped to the opposite side when it doesn't fit into
|
|
5891
|
-
the default side defined by this property. */
|
|
5892
|
-
verticalAlign?: ContextMenuOverlay["verticalAlign"];
|
|
5893
|
-
/** When `positionTarget` is set, this property defines whether the overlay should overlap
|
|
5894
|
-
the target element in the x-axis, or be positioned right next to it. */
|
|
5895
|
-
noHorizontalOverlap?: ContextMenuOverlay["noHorizontalOverlap"];
|
|
5896
|
-
/** When `positionTarget` is set, this property defines whether the overlay should overlap
|
|
5897
|
-
the target element in the y-axis, or be positioned right above/below it. */
|
|
5898
|
-
noVerticalOverlap?: ContextMenuOverlay["noVerticalOverlap"];
|
|
5899
|
-
/** If the overlay content has no intrinsic height, this property can be used to set
|
|
5900
|
-
the minimum vertical space (in pixels) required by the overlay. Setting a value to
|
|
5901
|
-
the property effectively disables the content measurement in favor of using this
|
|
5902
|
-
fixed value for determining the open direction. */
|
|
5903
|
-
requiredVerticalSpace?: ContextMenuOverlay["requiredVerticalSpace"];
|
|
5904
|
-
/** When true, the overlay is visible and attached to body. */
|
|
5905
|
-
opened?: ContextMenuOverlay["opened"];
|
|
5906
|
-
/** Owner element passed with renderer function */
|
|
5907
|
-
owner?: ContextMenuOverlay["owner"];
|
|
5908
|
-
/** Object with properties that is passed to `renderer` function */
|
|
5909
|
-
model?: ContextMenuOverlay["model"];
|
|
5910
|
-
/** Custom function for rendering the content of the overlay.
|
|
5911
|
-
Receives three arguments:
|
|
5912
|
-
|
|
5913
|
-
- `root` The root container DOM element. Append your content to it.
|
|
5914
|
-
- `owner` The host element of the renderer function.
|
|
5915
|
-
- `model` The object with the properties related with rendering. */
|
|
5916
|
-
renderer?: ContextMenuOverlay["renderer"];
|
|
5917
|
-
/** When true the overlay won't disable the main content, showing
|
|
5918
|
-
it doesn't change the functionality of the user interface. */
|
|
5919
|
-
modeless?: ContextMenuOverlay["modeless"];
|
|
5920
|
-
/** When set to true, the overlay is hidden. This also closes the overlay
|
|
5921
|
-
immediately in case there is a closing animation in progress. */
|
|
5922
|
-
hidden?: ContextMenuOverlay["hidden"];
|
|
5923
|
-
/** When true the overlay has backdrop on top of content when opened. */
|
|
5924
|
-
withBackdrop?: ContextMenuOverlay["withBackdrop"];
|
|
5909
|
+
"<vaadin-date-picker-overlay-content>"?: unknown;
|
|
5925
5910
|
/** */
|
|
5926
|
-
|
|
5911
|
+
"<vaadin-date-picker-month-scroller>"?: unknown;
|
|
5927
5912
|
/** */
|
|
5928
|
-
|
|
5913
|
+
"<vaadin-date-picker-year-scroller>"?: unknown;
|
|
5929
5914
|
/** */
|
|
5930
|
-
|
|
5915
|
+
"<vaadin-date-picker-year>"?: unknown;
|
|
5931
5916
|
/** */
|
|
5932
|
-
|
|
5917
|
+
"<vaadin-month-calendar>"?: unknown;
|
|
5918
|
+
/** Fullscreen mode years scroller toggle */
|
|
5919
|
+
"years-toggle-button"?: unknown;
|
|
5920
|
+
/** Toolbar with slotted buttons */
|
|
5921
|
+
toolbar?: unknown;
|
|
5922
|
+
/** The current selected date. */
|
|
5923
|
+
_selectedDate?: DatePicker["_selectedDate"];
|
|
5933
5924
|
/** */
|
|
5934
|
-
|
|
5925
|
+
_focusedDate?: DatePicker["_focusedDate"];
|
|
5926
|
+
/** Selected date.
|
|
5927
|
+
|
|
5928
|
+
Supported date formats:
|
|
5929
|
+
- ISO 8601 `"YYYY-MM-DD"` (default)
|
|
5930
|
+
- 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"` */
|
|
5931
|
+
value?: DatePicker["value"];
|
|
5932
|
+
/** Date which should be visible when there is no value selected.
|
|
5933
|
+
|
|
5934
|
+
The same date formats as for the `value` property are supported. */
|
|
5935
|
+
initialPosition?: DatePicker["initialPosition"];
|
|
5936
|
+
/** Set true to prevent the overlay from opening automatically. */
|
|
5937
|
+
autoOpenDisabled?: DatePicker["autoOpenDisabled"];
|
|
5938
|
+
/** Set true to display ISO-8601 week numbers in the calendar. Notice that
|
|
5939
|
+
displaying week numbers is only supported when `i18n.firstDayOfWeek`
|
|
5940
|
+
is 1 (Monday). */
|
|
5941
|
+
showWeekNumbers?: DatePicker["showWeekNumbers"];
|
|
5935
5942
|
/** */
|
|
5936
|
-
|
|
5943
|
+
_fullscreen?: DatePicker["_fullscreen"];
|
|
5937
5944
|
/** */
|
|
5938
|
-
|
|
5945
|
+
_fullscreenMediaQuery?: DatePicker["_fullscreenMediaQuery"];
|
|
5946
|
+
/** The earliest date that can be selected. All earlier dates will be disabled.
|
|
5939
5947
|
|
|
5948
|
+
Supported date formats:
|
|
5949
|
+
- ISO 8601 `"YYYY-MM-DD"` (default)
|
|
5950
|
+
- 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"` */
|
|
5951
|
+
min?: DatePicker["min"];
|
|
5952
|
+
/** The latest date that can be selected. All later dates will be disabled.
|
|
5953
|
+
|
|
5954
|
+
Supported date formats:
|
|
5955
|
+
- ISO 8601 `"YYYY-MM-DD"` (default)
|
|
5956
|
+
- 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"` */
|
|
5957
|
+
max?: DatePicker["max"];
|
|
5958
|
+
/** A function to be used to determine whether the user can select a given date.
|
|
5959
|
+
Receives a `DatePickerDate` object of the date to be selected and should return a
|
|
5960
|
+
boolean. */
|
|
5961
|
+
isDateDisabled?: DatePicker["isDateDisabled"];
|
|
5962
|
+
/** The earliest date that can be selected. All earlier dates will be disabled. */
|
|
5963
|
+
_minDate?: DatePicker["_minDate"];
|
|
5964
|
+
/** The latest date that can be selected. All later dates will be disabled. */
|
|
5965
|
+
_maxDate?: DatePicker["_maxDate"];
|
|
5940
5966
|
/** */
|
|
5941
|
-
"
|
|
5967
|
+
_noInput?: DatePicker["_noInput"];
|
|
5942
5968
|
/** */
|
|
5943
|
-
"
|
|
5944
|
-
};
|
|
5945
|
-
|
|
5946
|
-
export type ContextMenuOverlaySolidJsProps = {
|
|
5947
|
-
/** Position of the overlay with respect to the target.
|
|
5948
|
-
Supported values: null, `top-start`, `top`, `top-end`,
|
|
5949
|
-
`bottom-start`, `bottom`, `bottom-end`, `start-top`,
|
|
5950
|
-
`start`, `start-bottom`, `end-top`, `end`, `end-bottom`. */
|
|
5951
|
-
"prop:position"?: ContextMenuOverlay["position"];
|
|
5969
|
+
_ios?: DatePicker["_ios"];
|
|
5952
5970
|
/** */
|
|
5953
|
-
|
|
5971
|
+
_focusOverlayOnOpen?: DatePicker["_focusOverlayOnOpen"];
|
|
5954
5972
|
/** */
|
|
5955
|
-
|
|
5956
|
-
/**
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
/** Set to specify the element which should be focused on overlay close,
|
|
5962
|
-
if `restoreFocusOnClose` is set to true. */
|
|
5963
|
-
"prop:restoreFocusNode"?: ContextMenuOverlay["restoreFocusNode"];
|
|
5964
|
-
/** The element next to which this overlay should be aligned.
|
|
5965
|
-
The position of the overlay relative to the positionTarget can be adjusted
|
|
5966
|
-
with properties `horizontalAlign`, `verticalAlign`, `noHorizontalOverlap`
|
|
5967
|
-
and `noVerticalOverlap`. */
|
|
5968
|
-
"prop:positionTarget"?: ContextMenuOverlay["positionTarget"];
|
|
5969
|
-
/** When `positionTarget` is set, this property defines whether to align the overlay's
|
|
5970
|
-
left or right side to the target element by default.
|
|
5971
|
-
Possible values are `start` and `end`.
|
|
5972
|
-
RTL is taken into account when interpreting the value.
|
|
5973
|
-
The overlay is automatically flipped to the opposite side when it doesn't fit into
|
|
5974
|
-
the default side defined by this property. */
|
|
5975
|
-
"prop:horizontalAlign"?: ContextMenuOverlay["horizontalAlign"];
|
|
5976
|
-
/** When `positionTarget` is set, this property defines whether to align the overlay's
|
|
5977
|
-
top or bottom side to the target element by default.
|
|
5978
|
-
Possible values are `top` and `bottom`.
|
|
5979
|
-
The overlay is automatically flipped to the opposite side when it doesn't fit into
|
|
5980
|
-
the default side defined by this property. */
|
|
5981
|
-
"prop:verticalAlign"?: ContextMenuOverlay["verticalAlign"];
|
|
5982
|
-
/** When `positionTarget` is set, this property defines whether the overlay should overlap
|
|
5983
|
-
the target element in the x-axis, or be positioned right next to it. */
|
|
5984
|
-
"prop:noHorizontalOverlap"?: ContextMenuOverlay["noHorizontalOverlap"];
|
|
5985
|
-
/** When `positionTarget` is set, this property defines whether the overlay should overlap
|
|
5986
|
-
the target element in the y-axis, or be positioned right above/below it. */
|
|
5987
|
-
"prop:noVerticalOverlap"?: ContextMenuOverlay["noVerticalOverlap"];
|
|
5988
|
-
/** If the overlay content has no intrinsic height, this property can be used to set
|
|
5989
|
-
the minimum vertical space (in pixels) required by the overlay. Setting a value to
|
|
5990
|
-
the property effectively disables the content measurement in favor of using this
|
|
5991
|
-
fixed value for determining the open direction. */
|
|
5992
|
-
"prop:requiredVerticalSpace"?: ContextMenuOverlay["requiredVerticalSpace"];
|
|
5993
|
-
/** When true, the overlay is visible and attached to body. */
|
|
5994
|
-
"prop:opened"?: ContextMenuOverlay["opened"];
|
|
5995
|
-
/** Owner element passed with renderer function */
|
|
5996
|
-
"prop:owner"?: ContextMenuOverlay["owner"];
|
|
5997
|
-
/** Object with properties that is passed to `renderer` function */
|
|
5998
|
-
"prop:model"?: ContextMenuOverlay["model"];
|
|
5999
|
-
/** Custom function for rendering the content of the overlay.
|
|
6000
|
-
Receives three arguments:
|
|
5973
|
+
_overlayContent?: DatePicker["_overlayContent"];
|
|
5974
|
+
/** */
|
|
5975
|
+
__enteredDate?: DatePicker["__enteredDate"];
|
|
5976
|
+
/** The object used to localize this component. To change the default
|
|
5977
|
+
localization, replace this with an object that provides all properties, or
|
|
5978
|
+
just the individual properties you want to change.
|
|
6001
5979
|
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
"prop:renderer"?: ContextMenuOverlay["renderer"];
|
|
6006
|
-
/** When true the overlay won't disable the main content, showing
|
|
6007
|
-
it doesn't change the functionality of the user interface. */
|
|
6008
|
-
"prop:modeless"?: ContextMenuOverlay["modeless"];
|
|
6009
|
-
/** When set to true, the overlay is hidden. This also closes the overlay
|
|
6010
|
-
immediately in case there is a closing animation in progress. */
|
|
6011
|
-
"prop:hidden"?: ContextMenuOverlay["hidden"];
|
|
6012
|
-
/** When true the overlay has backdrop on top of content when opened. */
|
|
6013
|
-
"prop:withBackdrop"?: ContextMenuOverlay["withBackdrop"];
|
|
5980
|
+
Should be overridden by subclasses to provide a custom JSDoc with the
|
|
5981
|
+
default I18N properties. */
|
|
5982
|
+
i18n?: DatePicker["i18n"];
|
|
6014
5983
|
/** */
|
|
6015
|
-
|
|
5984
|
+
__effectiveI18n?: DatePicker["__effectiveI18n"];
|
|
5985
|
+
/** A pattern matched against individual characters the user inputs.
|
|
5986
|
+
|
|
5987
|
+
When set, the field will prevent:
|
|
5988
|
+
- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`
|
|
5989
|
+
- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`
|
|
5990
|
+
- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`
|
|
5991
|
+
|
|
5992
|
+
For example, to allow entering only numbers and minus signs, use:
|
|
5993
|
+
`allowedCharPattern = "[\\d-]"` */
|
|
5994
|
+
allowedCharPattern?: DatePicker["allowedCharPattern"];
|
|
5995
|
+
/** If true, the input text gets fully selected when the field is focused using click or touch / tap. */
|
|
5996
|
+
autoselect?: DatePicker["autoselect"];
|
|
5997
|
+
/** The name of this field. */
|
|
5998
|
+
name?: DatePicker["name"];
|
|
5999
|
+
/** A hint to the user of what can be entered in the field. */
|
|
6000
|
+
placeholder?: DatePicker["placeholder"];
|
|
6001
|
+
/** The text usually displayed in a tooltip popup when the mouse is over the field. */
|
|
6002
|
+
title?: DatePicker["title"];
|
|
6003
|
+
/** A target element to which ARIA attributes are set. */
|
|
6004
|
+
ariaTarget?: DatePicker["ariaTarget"];
|
|
6005
|
+
/** Error to show when the field is invalid. */
|
|
6006
|
+
errorMessage?: DatePicker["errorMessage"];
|
|
6007
|
+
/** String used for the helper text. */
|
|
6008
|
+
helperText?: DatePicker["helperText"];
|
|
6009
|
+
/** String used to label the component to screen reader users. */
|
|
6010
|
+
accessibleName?: DatePicker["accessibleName"];
|
|
6011
|
+
/** Id of the element used as label of the component to screen reader users. */
|
|
6012
|
+
accessibleNameRef?: DatePicker["accessibleNameRef"];
|
|
6013
|
+
/** Set to true to display the clear icon which clears the input.
|
|
6014
|
+
|
|
6015
|
+
It is up to the component to choose where to place the clear icon:
|
|
6016
|
+
in the Shadow DOM or in the light DOM. In any way, a reference to
|
|
6017
|
+
the clear icon element should be provided via the `clearElement` getter. */
|
|
6018
|
+
clearButtonVisible?: DatePicker["clearButtonVisible"];
|
|
6016
6019
|
/** */
|
|
6017
|
-
|
|
6020
|
+
dir?: DatePicker["dir"];
|
|
6018
6021
|
/** */
|
|
6019
|
-
|
|
6022
|
+
_inputElementValue?: DatePicker["_inputElementValue"];
|
|
6020
6023
|
/** */
|
|
6021
|
-
|
|
6024
|
+
_boundOnClick?: DatePicker["_boundOnClick"];
|
|
6022
6025
|
/** */
|
|
6023
|
-
|
|
6026
|
+
_boundOnScroll?: DatePicker["_boundOnScroll"];
|
|
6024
6027
|
/** */
|
|
6025
|
-
|
|
6028
|
+
_boundOnPaste?: DatePicker["_boundOnPaste"];
|
|
6029
|
+
/** */
|
|
6030
|
+
_boundOnDrop?: DatePicker["_boundOnDrop"];
|
|
6031
|
+
/** */
|
|
6032
|
+
_boundOnBeforeInput?: DatePicker["_boundOnBeforeInput"];
|
|
6026
6033
|
/** */
|
|
6027
|
-
|
|
6034
|
+
_fieldAriaController?: DatePicker["_fieldAriaController"];
|
|
6028
6035
|
/** */
|
|
6029
|
-
"
|
|
6036
|
+
_helperController?: DatePicker["_helperController"];
|
|
6030
6037
|
/** */
|
|
6031
|
-
"
|
|
6038
|
+
_errorController?: DatePicker["_errorController"];
|
|
6032
6039
|
|
|
6033
|
-
/**
|
|
6034
|
-
|
|
6035
|
-
/**
|
|
6036
|
-
|
|
6040
|
+
/** Fired when the user commits a value change. */
|
|
6041
|
+
onchange?: (e: CustomEvent) => void;
|
|
6042
|
+
/** Fired when the user commits an unparsable value change and there is no change event. */
|
|
6043
|
+
"onunparsable-change"?: (e: CustomEvent) => void;
|
|
6044
|
+
/** Fired when the `invalid` property changes. */
|
|
6045
|
+
"oninvalid-changed"?: (e: CustomEvent) => void;
|
|
6046
|
+
/** Fired when the `opened` property changes. */
|
|
6047
|
+
"onopened-changed"?: (e: CustomEvent) => void;
|
|
6048
|
+
/** Fired when the `value` property changes. */
|
|
6049
|
+
"onvalue-changed"?: (e: CustomEvent) => void;
|
|
6050
|
+
/** Fired whenever the field is validated. */
|
|
6051
|
+
onvalidated?: (e: CustomEvent) => void;
|
|
6037
6052
|
};
|
|
6038
6053
|
|
|
6039
|
-
export type
|
|
6040
|
-
/** Position of the overlay with respect to the target.
|
|
6041
|
-
Supported values: null, `top-start`, `top`, `top-end`,
|
|
6042
|
-
`bottom-start`, `bottom`, `bottom-end`, `start-top`,
|
|
6043
|
-
`start`, `start-bottom`, `end-top`, `end`, `end-bottom`. */
|
|
6044
|
-
position?: ContextMenu["position"];
|
|
6054
|
+
export type DatePickerSolidJsProps = {
|
|
6045
6055
|
/** */
|
|
6046
|
-
"
|
|
6056
|
+
"prop:_positionTarget"?: DatePicker["_positionTarget"];
|
|
6057
|
+
/** Set when the element is disabled */
|
|
6058
|
+
"bool:disabled"?: unknown;
|
|
6059
|
+
/** Set when the element is disabled */
|
|
6060
|
+
"prop:undefined"?: unknown;
|
|
6061
|
+
/** Set when the element has a value */
|
|
6062
|
+
"bool:has-value"?: unknown;
|
|
6063
|
+
/** Set when the element has a label */
|
|
6064
|
+
"bool:has-label"?: unknown;
|
|
6065
|
+
/** Set when the element has helper text or slot */
|
|
6066
|
+
"bool:has-helper"?: unknown;
|
|
6067
|
+
/** Set when the element has an error message */
|
|
6068
|
+
"bool:has-error-message"?: unknown;
|
|
6069
|
+
/** Set when the element has a slotted tooltip */
|
|
6070
|
+
"bool:has-tooltip"?: unknown;
|
|
6071
|
+
/** Set when the element is invalid */
|
|
6072
|
+
"bool:invalid"?: unknown;
|
|
6073
|
+
/** Set when the element is focused */
|
|
6074
|
+
"bool:focused"?: unknown;
|
|
6075
|
+
/** Set when the element is keyboard focused */
|
|
6076
|
+
"bool:focus-ring"?: unknown;
|
|
6077
|
+
/** Set when the element is readonly */
|
|
6078
|
+
"prop:readonly"?: DatePicker["readonly"];
|
|
6079
|
+
/** Set when the overlay is opened */
|
|
6080
|
+
"prop:opened"?: DatePicker["opened"];
|
|
6081
|
+
/** Set when week numbers are shown in the calendar */
|
|
6082
|
+
"bool:week-numbers"?: unknown;
|
|
6047
6083
|
/** */
|
|
6048
|
-
|
|
6049
|
-
/** CSS selector that can be used to target any child element
|
|
6050
|
-
of the context menu to listen for `openOn` events. */
|
|
6051
|
-
selector?: ContextMenu["selector"];
|
|
6052
|
-
/** True if the overlay is currently displayed. */
|
|
6053
|
-
opened?: ContextMenu["opened"];
|
|
6054
|
-
/** Event name to listen for opening the context menu. */
|
|
6055
|
-
openOn?: ContextMenu["openOn"];
|
|
6056
|
-
/** The target element that's listened to for context menu opening events.
|
|
6057
|
-
By default the vaadin-context-menu listens to the target's `vaadin-contextmenu`
|
|
6058
|
-
events. */
|
|
6059
|
-
listenOn?: ContextMenu["listenOn"];
|
|
6060
|
-
/** Event name to listen for closing the context menu. */
|
|
6061
|
-
closeOn?: ContextMenu["closeOn"];
|
|
6062
|
-
/** Custom function for rendering the content of the menu overlay.
|
|
6063
|
-
Receives three arguments:
|
|
6064
|
-
|
|
6065
|
-
- `root` The root container DOM element. Append your content to it.
|
|
6066
|
-
- `contextMenu` The reference to the `<vaadin-context-menu>` element.
|
|
6067
|
-
- `context` The object with the menu context, contains:
|
|
6068
|
-
- `context.target` the target of the menu opening event,
|
|
6069
|
-
- `context.detail` the menu opening event detail. */
|
|
6070
|
-
renderer?: ContextMenu["renderer"];
|
|
6071
|
-
/** When true, the menu overlay is modeless. */
|
|
6072
|
-
_modeless?: ContextMenu["_modeless"];
|
|
6084
|
+
"bool:<vaadin-date-picker>"?: unknown;
|
|
6073
6085
|
/** */
|
|
6074
|
-
|
|
6086
|
+
"bool:<vaadin-date-picker-overlay-content>"?: unknown;
|
|
6075
6087
|
/** */
|
|
6076
|
-
|
|
6088
|
+
"bool:<vaadin-date-picker-month-scroller>"?: unknown;
|
|
6077
6089
|
/** */
|
|
6078
|
-
|
|
6090
|
+
"bool:<vaadin-date-picker-year-scroller>"?: unknown;
|
|
6079
6091
|
/** */
|
|
6080
|
-
|
|
6081
|
-
/**
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6092
|
+
"bool:<vaadin-date-picker-year>"?: unknown;
|
|
6093
|
+
/** */
|
|
6094
|
+
"bool:<vaadin-month-calendar>"?: unknown;
|
|
6095
|
+
/** Fullscreen mode years scroller toggle */
|
|
6096
|
+
"bool:years-toggle-button"?: unknown;
|
|
6097
|
+
/** Toolbar with slotted buttons */
|
|
6098
|
+
"bool:toolbar"?: unknown;
|
|
6099
|
+
/** The current selected date. */
|
|
6100
|
+
"prop:_selectedDate"?: DatePicker["_selectedDate"];
|
|
6101
|
+
/** */
|
|
6102
|
+
"prop:_focusedDate"?: DatePicker["_focusedDate"];
|
|
6103
|
+
/** Selected date.
|
|
6086
6104
|
|
|
6087
|
-
|
|
6105
|
+
Supported date formats:
|
|
6106
|
+
- ISO 8601 `"YYYY-MM-DD"` (default)
|
|
6107
|
+
- 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"` */
|
|
6108
|
+
"prop:value"?: DatePicker["value"];
|
|
6109
|
+
/** Date which should be visible when there is no value selected.
|
|
6088
6110
|
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
{ component: 'hr' },
|
|
6098
|
-
{ text: 'Menu Item 2', children:
|
|
6099
|
-
[
|
|
6100
|
-
{ text: 'Menu Item 2-1' },
|
|
6101
|
-
{ text: 'Menu Item 2-2', disabled: true }
|
|
6102
|
-
]
|
|
6103
|
-
},
|
|
6104
|
-
{ text: 'Menu Item 3', disabled: true, className: 'last' }
|
|
6105
|
-
];
|
|
6106
|
-
``` */
|
|
6107
|
-
items?: ContextMenu["items"];
|
|
6111
|
+
The same date formats as for the `value` property are supported. */
|
|
6112
|
+
"prop:initialPosition"?: DatePicker["initialPosition"];
|
|
6113
|
+
/** Set true to prevent the overlay from opening automatically. */
|
|
6114
|
+
"prop:autoOpenDisabled"?: DatePicker["autoOpenDisabled"];
|
|
6115
|
+
/** Set true to display ISO-8601 week numbers in the calendar. Notice that
|
|
6116
|
+
displaying week numbers is only supported when `i18n.firstDayOfWeek`
|
|
6117
|
+
is 1 (Monday). */
|
|
6118
|
+
"prop:showWeekNumbers"?: DatePicker["showWeekNumbers"];
|
|
6108
6119
|
/** */
|
|
6109
|
-
|
|
6120
|
+
"prop:_fullscreen"?: DatePicker["_fullscreen"];
|
|
6110
6121
|
/** */
|
|
6111
|
-
|
|
6122
|
+
"prop:_fullscreenMediaQuery"?: DatePicker["_fullscreenMediaQuery"];
|
|
6123
|
+
/** The earliest date that can be selected. All earlier dates will be disabled.
|
|
6124
|
+
|
|
6125
|
+
Supported date formats:
|
|
6126
|
+
- ISO 8601 `"YYYY-MM-DD"` (default)
|
|
6127
|
+
- 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"` */
|
|
6128
|
+
"prop:min"?: DatePicker["min"];
|
|
6129
|
+
/** The latest date that can be selected. All later dates will be disabled.
|
|
6130
|
+
|
|
6131
|
+
Supported date formats:
|
|
6132
|
+
- ISO 8601 `"YYYY-MM-DD"` (default)
|
|
6133
|
+
- 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"` */
|
|
6134
|
+
"prop:max"?: DatePicker["max"];
|
|
6135
|
+
/** A function to be used to determine whether the user can select a given date.
|
|
6136
|
+
Receives a `DatePickerDate` object of the date to be selected and should return a
|
|
6137
|
+
boolean. */
|
|
6138
|
+
"prop:isDateDisabled"?: DatePicker["isDateDisabled"];
|
|
6139
|
+
/** The earliest date that can be selected. All earlier dates will be disabled. */
|
|
6140
|
+
"prop:_minDate"?: DatePicker["_minDate"];
|
|
6141
|
+
/** The latest date that can be selected. All later dates will be disabled. */
|
|
6142
|
+
"prop:_maxDate"?: DatePicker["_maxDate"];
|
|
6112
6143
|
/** */
|
|
6113
|
-
|
|
6144
|
+
"prop:_noInput"?: DatePicker["_noInput"];
|
|
6114
6145
|
/** */
|
|
6115
|
-
|
|
6146
|
+
"prop:_ios"?: DatePicker["_ios"];
|
|
6116
6147
|
/** */
|
|
6117
|
-
|
|
6148
|
+
"prop:_focusOverlayOnOpen"?: DatePicker["_focusOverlayOnOpen"];
|
|
6118
6149
|
/** */
|
|
6119
|
-
|
|
6150
|
+
"prop:_overlayContent"?: DatePicker["_overlayContent"];
|
|
6120
6151
|
/** */
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
/** Fired when an item is selected when the context menu is populated using the `items` API. */
|
|
6126
|
-
"onitem-selected"?: (e: CustomEvent) => void;
|
|
6127
|
-
/** Fired when the context menu is closed. */
|
|
6128
|
-
onclosed?: (e: CustomEvent) => void;
|
|
6129
|
-
/** Fired when all menus should close, e.g., after pressing Tab or on submenu close. */
|
|
6130
|
-
"onclose-all-menus"?: (e: CustomEvent) => void;
|
|
6131
|
-
/** Fired when a click happens outside any open sub-menus. */
|
|
6132
|
-
"onitems-outside-click"?: (e: CustomEvent) => void;
|
|
6133
|
-
};
|
|
6152
|
+
"prop:__enteredDate"?: DatePicker["__enteredDate"];
|
|
6153
|
+
/** The object used to localize this component. To change the default
|
|
6154
|
+
localization, replace this with an object that provides all properties, or
|
|
6155
|
+
just the individual properties you want to change.
|
|
6134
6156
|
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
`bottom-start`, `bottom`, `bottom-end`, `start-top`,
|
|
6139
|
-
`start`, `start-bottom`, `end-top`, `end`, `end-bottom`. */
|
|
6140
|
-
"prop:position"?: ContextMenu["position"];
|
|
6141
|
-
/** */
|
|
6142
|
-
"bool:<vaadin-item>"?: unknown;
|
|
6157
|
+
Should be overridden by subclasses to provide a custom JSDoc with the
|
|
6158
|
+
default I18N properties. */
|
|
6159
|
+
"prop:i18n"?: DatePicker["i18n"];
|
|
6143
6160
|
/** */
|
|
6144
|
-
"prop:
|
|
6145
|
-
/**
|
|
6146
|
-
of the context menu to listen for `openOn` events. */
|
|
6147
|
-
"prop:selector"?: ContextMenu["selector"];
|
|
6148
|
-
/** True if the overlay is currently displayed. */
|
|
6149
|
-
"prop:opened"?: ContextMenu["opened"];
|
|
6150
|
-
/** Event name to listen for opening the context menu. */
|
|
6151
|
-
"prop:openOn"?: ContextMenu["openOn"];
|
|
6152
|
-
/** The target element that's listened to for context menu opening events.
|
|
6153
|
-
By default the vaadin-context-menu listens to the target's `vaadin-contextmenu`
|
|
6154
|
-
events. */
|
|
6155
|
-
"prop:listenOn"?: ContextMenu["listenOn"];
|
|
6156
|
-
/** Event name to listen for closing the context menu. */
|
|
6157
|
-
"prop:closeOn"?: ContextMenu["closeOn"];
|
|
6158
|
-
/** Custom function for rendering the content of the menu overlay.
|
|
6159
|
-
Receives three arguments:
|
|
6161
|
+
"prop:__effectiveI18n"?: DatePicker["__effectiveI18n"];
|
|
6162
|
+
/** A pattern matched against individual characters the user inputs.
|
|
6160
6163
|
|
|
6161
|
-
|
|
6162
|
-
- `
|
|
6163
|
-
- `
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
"prop:
|
|
6169
|
-
/**
|
|
6170
|
-
"prop:
|
|
6164
|
+
When set, the field will prevent:
|
|
6165
|
+
- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`
|
|
6166
|
+
- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`
|
|
6167
|
+
- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`
|
|
6168
|
+
|
|
6169
|
+
For example, to allow entering only numbers and minus signs, use:
|
|
6170
|
+
`allowedCharPattern = "[\\d-]"` */
|
|
6171
|
+
"prop:allowedCharPattern"?: DatePicker["allowedCharPattern"];
|
|
6172
|
+
/** If true, the input text gets fully selected when the field is focused using click or touch / tap. */
|
|
6173
|
+
"prop:autoselect"?: DatePicker["autoselect"];
|
|
6174
|
+
/** The name of this field. */
|
|
6175
|
+
"prop:name"?: DatePicker["name"];
|
|
6176
|
+
/** A hint to the user of what can be entered in the field. */
|
|
6177
|
+
"prop:placeholder"?: DatePicker["placeholder"];
|
|
6178
|
+
/** The text usually displayed in a tooltip popup when the mouse is over the field. */
|
|
6179
|
+
"prop:title"?: DatePicker["title"];
|
|
6180
|
+
/** A target element to which ARIA attributes are set. */
|
|
6181
|
+
"prop:ariaTarget"?: DatePicker["ariaTarget"];
|
|
6182
|
+
/** Error to show when the field is invalid. */
|
|
6183
|
+
"prop:errorMessage"?: DatePicker["errorMessage"];
|
|
6184
|
+
/** String used for the helper text. */
|
|
6185
|
+
"prop:helperText"?: DatePicker["helperText"];
|
|
6186
|
+
/** String used to label the component to screen reader users. */
|
|
6187
|
+
"prop:accessibleName"?: DatePicker["accessibleName"];
|
|
6188
|
+
/** Id of the element used as label of the component to screen reader users. */
|
|
6189
|
+
"prop:accessibleNameRef"?: DatePicker["accessibleNameRef"];
|
|
6190
|
+
/** Set to true to display the clear icon which clears the input.
|
|
6191
|
+
|
|
6192
|
+
It is up to the component to choose where to place the clear icon:
|
|
6193
|
+
in the Shadow DOM or in the light DOM. In any way, a reference to
|
|
6194
|
+
the clear icon element should be provided via the `clearElement` getter. */
|
|
6195
|
+
"prop:clearButtonVisible"?: DatePicker["clearButtonVisible"];
|
|
6171
6196
|
/** */
|
|
6172
|
-
"prop:
|
|
6197
|
+
"prop:dir"?: DatePicker["dir"];
|
|
6173
6198
|
/** */
|
|
6174
|
-
"prop:
|
|
6199
|
+
"prop:_inputElementValue"?: DatePicker["_inputElementValue"];
|
|
6175
6200
|
/** */
|
|
6176
|
-
"prop:
|
|
6177
|
-
/** Defines a (hierarchical) menu structure for the component.
|
|
6178
|
-
If a menu item has a non-empty `children` set, a sub-menu with the child items is opened
|
|
6179
|
-
next to the parent menu on mouseover, tap or a right arrow keypress.
|
|
6180
|
-
|
|
6181
|
-
The items API can't be used together with a renderer!
|
|
6182
|
-
|
|
6183
|
-
#### Example
|
|
6184
|
-
|
|
6185
|
-
```javascript
|
|
6186
|
-
contextMenu.items = [
|
|
6187
|
-
{ text: 'Menu Item 1', theme: 'primary', className: 'first', children:
|
|
6188
|
-
[
|
|
6189
|
-
{ text: 'Menu Item 1-1', checked: true, keepOpen: true },
|
|
6190
|
-
{ text: 'Menu Item 1-2' }
|
|
6191
|
-
]
|
|
6192
|
-
},
|
|
6193
|
-
{ component: 'hr' },
|
|
6194
|
-
{ text: 'Menu Item 2', children:
|
|
6195
|
-
[
|
|
6196
|
-
{ text: 'Menu Item 2-1' },
|
|
6197
|
-
{ text: 'Menu Item 2-2', disabled: true }
|
|
6198
|
-
]
|
|
6199
|
-
},
|
|
6200
|
-
{ text: 'Menu Item 3', disabled: true, className: 'last' }
|
|
6201
|
-
];
|
|
6202
|
-
``` */
|
|
6203
|
-
"prop:items"?: ContextMenu["items"];
|
|
6201
|
+
"prop:_boundOnClick"?: DatePicker["_boundOnClick"];
|
|
6204
6202
|
/** */
|
|
6205
|
-
"prop:
|
|
6203
|
+
"prop:_boundOnScroll"?: DatePicker["_boundOnScroll"];
|
|
6206
6204
|
/** */
|
|
6207
|
-
"prop:
|
|
6205
|
+
"prop:_boundOnPaste"?: DatePicker["_boundOnPaste"];
|
|
6208
6206
|
/** */
|
|
6209
|
-
"prop:
|
|
6207
|
+
"prop:_boundOnDrop"?: DatePicker["_boundOnDrop"];
|
|
6210
6208
|
/** */
|
|
6211
|
-
"prop:
|
|
6209
|
+
"prop:_boundOnBeforeInput"?: DatePicker["_boundOnBeforeInput"];
|
|
6212
6210
|
/** */
|
|
6213
|
-
"prop:
|
|
6211
|
+
"prop:_fieldAriaController"?: DatePicker["_fieldAriaController"];
|
|
6214
6212
|
/** */
|
|
6215
|
-
"prop:
|
|
6213
|
+
"prop:_helperController"?: DatePicker["_helperController"];
|
|
6216
6214
|
/** */
|
|
6217
|
-
"prop:
|
|
6215
|
+
"prop:_errorController"?: DatePicker["_errorController"];
|
|
6216
|
+
/** Fired when the user commits a value change. */
|
|
6217
|
+
"on:change"?: (e: CustomEvent) => void;
|
|
6218
|
+
/** Fired when the user commits an unparsable value change and there is no change event. */
|
|
6219
|
+
"on:unparsable-change"?: (e: CustomEvent) => void;
|
|
6220
|
+
/** Fired when the `invalid` property changes. */
|
|
6221
|
+
"on:invalid-changed"?: (e: CustomEvent) => void;
|
|
6218
6222
|
/** Fired when the `opened` property changes. */
|
|
6219
6223
|
"on:opened-changed"?: (e: CustomEvent) => void;
|
|
6220
|
-
/** Fired when
|
|
6221
|
-
"on:
|
|
6222
|
-
/** Fired
|
|
6223
|
-
"on:
|
|
6224
|
-
/** Fired when all menus should close, e.g., after pressing Tab or on submenu close. */
|
|
6225
|
-
"on:close-all-menus"?: (e: CustomEvent) => void;
|
|
6226
|
-
/** Fired when a click happens outside any open sub-menus. */
|
|
6227
|
-
"on:items-outside-click"?: (e: CustomEvent) => void;
|
|
6224
|
+
/** Fired when the `value` property changes. */
|
|
6225
|
+
"on:value-changed"?: (e: CustomEvent) => void;
|
|
6226
|
+
/** Fired whenever the field is validated. */
|
|
6227
|
+
"on:validated"?: (e: CustomEvent) => void;
|
|
6228
6228
|
|
|
6229
6229
|
/** Set the innerHTML of the element */
|
|
6230
6230
|
innerHTML?: string;
|
|
@@ -13409,437 +13409,190 @@ export type CustomElements = {
|
|
|
13409
13409
|
* it doesn't change the functionality of the user interface.
|
|
13410
13410
|
* - `hidden`: When set to true, the overlay is hidden. This also closes the overlay
|
|
13411
13411
|
* immediately in case there is a closing animation in progress.
|
|
13412
|
-
* - `withBackdrop`: When true the overlay has backdrop on top of content when opened.
|
|
13413
|
-
* - `focusTrap`: When true, opening the overlay moves focus to the first focusable child,
|
|
13414
|
-
* or to the overlay part with tabindex if there are no focusable children.
|
|
13415
|
-
* - `restoreFocusOnClose`: Set to true to enable restoring of focus when overlay is closed.
|
|
13416
|
-
* - `restoreFocusNode`: Set to specify the element which should be focused on overlay close,
|
|
13417
|
-
* if `restoreFocusOnClose` is set to true.
|
|
13418
|
-
* - `dir`: undefined
|
|
13419
|
-
* - `_boundMouseDownListener`: undefined (property only)
|
|
13420
|
-
* - `_boundMouseUpListener`: undefined (property only)
|
|
13421
|
-
* - `_boundOutsideClickListener`: undefined (property only)
|
|
13422
|
-
* - `_boundKeydownListener`: undefined (property only)
|
|
13423
|
-
* - `__focusTrapController`: undefined (property only)
|
|
13424
|
-
* - `__focusRestorationController`: undefined (property only)
|
|
13425
|
-
*
|
|
13426
|
-
* ## Events
|
|
13427
|
-
*
|
|
13428
|
-
* Events that will be emitted by the component.
|
|
13429
|
-
*
|
|
13430
|
-
* - `vaadin-overlay-closed`: undefined
|
|
13431
|
-
* - `vaadin-overlay-closing`: undefined
|
|
13432
|
-
* - `undefined`: undefined
|
|
13433
|
-
*
|
|
13434
|
-
* ## Methods
|
|
13435
|
-
*
|
|
13436
|
-
* Methods that can be called to access component functionality.
|
|
13437
|
-
*
|
|
13438
|
-
* - `_updatePosition() => void`: undefined
|
|
13439
|
-
* - `__shouldAlignStartHorizontally(targetRect, rtl) => void`: undefined
|
|
13440
|
-
* - `__shouldAlignStartVertically(targetRect) => void`: undefined
|
|
13441
|
-
* - `__shouldAlignStart(targetRect, contentSize, viewportSize, margins, defaultAlignStart, noOverlap, propNames) => void`: undefined
|
|
13442
|
-
* - `__adjustBottomProperty(cssPropNameToSet, propNames, currentValue) => void`: Returns an adjusted value after resizing the browser window,
|
|
13443
|
-
* to avoid wrong calculations when e.g. previously set `bottom`
|
|
13444
|
-
* CSS property value is larger than the updated viewport height.
|
|
13445
|
-
* See https://github.com/vaadin/web-components/issues/4604
|
|
13446
|
-
* - `__calculatePositionInOneDimension(targetRect, overlayRect, noOverlap, propNames, overlay, shouldAlignStart) => void`: Returns an object with CSS position properties to set,
|
|
13447
|
-
* e.g. { top: "100px" }
|
|
13448
|
-
* - `requestContentUpdate() => void`: Requests an update for the content of the overlay.
|
|
13449
|
-
* While performing the update, it invokes the renderer passed in the `renderer` property.
|
|
13450
|
-
*
|
|
13451
|
-
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
13452
|
-
* - `close(sourceEvent: Event=) => void`: undefined
|
|
13453
|
-
* - `setBounds(bounds: !OverlayBoundsParam, absolute: boolean = true) => void`: Updates the coordinates of the overlay.
|
|
13454
|
-
* - `bringToFront() => void`: Brings the overlay as visually the frontmost one.
|
|
13455
|
-
* - `createProperty(name, options) => void`: undefined
|
|
13456
|
-
* - `getOrCreateMap(name) => void`: undefined
|
|
13457
|
-
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
13458
|
-
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
13459
|
-
*/
|
|
13460
|
-
"vaadin-combo-box-overlay": Partial<
|
|
13461
|
-
ComboBoxOverlayProps & BaseProps<ComboBoxOverlay> & BaseEvents
|
|
13462
|
-
>;
|
|
13463
|
-
|
|
13464
|
-
/**
|
|
13465
|
-
* An element used internally by `<vaadin-combo-box>`. Not intended to be used separately.
|
|
13466
|
-
*
|
|
13467
|
-
* ## Attributes & Properties
|
|
13468
|
-
*
|
|
13469
|
-
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
13470
|
-
*
|
|
13471
|
-
* - `items`: A full set of items to filter the visible options from.
|
|
13472
|
-
* Set to an empty array when combo-box is not opened.
|
|
13473
|
-
* - `focusedIndex`: Index of an item that has focus outline and is scrolled into view.
|
|
13474
|
-
* The actual focus still remains in the input field.
|
|
13475
|
-
* - `loading`: Set to true while combo-box fetches new page from the data provider.
|
|
13476
|
-
* - `opened`: Whether the combo-box is currently opened or not. If set to false,
|
|
13477
|
-
* calling `scrollIntoView` does not have any effect.
|
|
13478
|
-
* - `selectedItem`: The selected item from the `items` array.
|
|
13479
|
-
* - `itemClassNameGenerator`: A function used to generate CSS class names for dropdown
|
|
13480
|
-
* items based on the item. The return value should be the
|
|
13481
|
-
* generated class name as a string, or multiple class names
|
|
13482
|
-
* separated by whitespace characters.
|
|
13483
|
-
* - `itemIdPath`: Path for the id of the item, used to detect whether the item is selected.
|
|
13484
|
-
* - `owner`: Reference to the owner (combo-box owner), used by the item elements.
|
|
13485
|
-
* - `getItemLabel`: Function used to set a label for every combo-box item.
|
|
13486
|
-
* - `renderer`: Function used to render the content of every combo-box item.
|
|
13487
|
-
* - `theme`: Used to propagate the `theme` attribute from the host element.
|
|
13488
|
-
* - `__boundOnItemClick`: undefined (property only)
|
|
13489
|
-
*
|
|
13490
|
-
* ## Events
|
|
13491
|
-
*
|
|
13492
|
-
* Events that will be emitted by the component.
|
|
13493
|
-
*
|
|
13494
|
-
* - `selection-changed`: undefined
|
|
13495
|
-
* - `index-requested`: undefined
|
|
13496
|
-
* - `undefined`: undefined
|
|
13497
|
-
*
|
|
13498
|
-
* ## Methods
|
|
13499
|
-
*
|
|
13500
|
-
* Methods that can be called to access component functionality.
|
|
13501
|
-
*
|
|
13502
|
-
* - `requestContentUpdate() => void`: Updates the virtualizer's size and items.
|
|
13503
|
-
* - `scrollIntoView(index: number) => void`: Scrolls an item at given index into view and adjusts `scrollTop`
|
|
13504
|
-
* so that the element gets fully visible on Arrow Down key press.
|
|
13505
|
-
* - `createProperty(name, options) => void`: undefined
|
|
13506
|
-
* - `getOrCreateMap(name) => void`: undefined
|
|
13507
|
-
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
13508
|
-
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
13509
|
-
*/
|
|
13510
|
-
"vaadin-combo-box-scroller": Partial<
|
|
13511
|
-
ComboBoxScrollerProps & BaseProps<ComboBoxScroller> & BaseEvents
|
|
13512
|
-
>;
|
|
13513
|
-
|
|
13514
|
-
/**
|
|
13515
|
-
* `<vaadin-combo-box>` is a web component for choosing a value from a filterable list of options
|
|
13516
|
-
* presented in a dropdown overlay. The options can be provided as a list of strings or objects
|
|
13517
|
-
* by setting [`items`](#/elements/vaadin-combo-box#property-items) property on the element.
|
|
13518
|
-
*
|
|
13519
|
-
* ```html
|
|
13520
|
-
* <vaadin-combo-box id="combo-box"></vaadin-combo-box>
|
|
13521
|
-
* ```
|
|
13522
|
-
*
|
|
13523
|
-
* ```js
|
|
13524
|
-
* document.querySelector('#combo-box').items = ['apple', 'orange', 'banana'];
|
|
13525
|
-
* ```
|
|
13526
|
-
*
|
|
13527
|
-
* When the selected `value` is changed, a `value-changed` event is triggered.
|
|
13528
|
-
*
|
|
13529
|
-
* ### Item rendering
|
|
13530
|
-
*
|
|
13531
|
-
* To customize the content of the `<vaadin-combo-box-item>` elements placed in the dropdown, use
|
|
13532
|
-
* [`renderer`](#/elements/vaadin-combo-box#property-renderer) property which accepts a function.
|
|
13533
|
-
* The renderer function is called with `root`, `comboBox`, and `model` as arguments.
|
|
13534
|
-
*
|
|
13535
|
-
* Generate DOM content by using `model` object properties if needed, and append it to the `root`
|
|
13536
|
-
* element. The `comboBox` reference is provided to access the combo-box element state. Do not
|
|
13537
|
-
* set combo-box properties in a `renderer` function.
|
|
13538
|
-
*
|
|
13539
|
-
* ```js
|
|
13540
|
-
* const comboBox = document.querySelector('#combo-box');
|
|
13541
|
-
* comboBox.items = [{'label': 'Hydrogen', 'value': 'H'}];
|
|
13542
|
-
* comboBox.renderer = (root, comboBox, model) => {
|
|
13543
|
-
* const item = model.item;
|
|
13544
|
-
* root.innerHTML = `${model.index}: ${item.label} <b>${item.value}</b>`;
|
|
13545
|
-
* };
|
|
13546
|
-
* ```
|
|
13547
|
-
*
|
|
13548
|
-
* Renderer is called on the opening of the combo-box and each time the related model is updated.
|
|
13549
|
-
* Before creating new content, it is recommended to check if there is already an existing DOM
|
|
13550
|
-
* element in `root` from a previous renderer call for reusing it. Even though combo-box uses
|
|
13551
|
-
* infinite scrolling, reducing DOM operations might improve performance.
|
|
13552
|
-
*
|
|
13553
|
-
* The following properties are available in the `model` argument:
|
|
13554
|
-
*
|
|
13555
|
-
* Property | Type | Description
|
|
13556
|
-
* -----------|------------------|-------------
|
|
13557
|
-
* `index` | Number | Index of the item in the `items` array
|
|
13558
|
-
* `item` | String or Object | The item reference
|
|
13559
|
-
* `selected` | Boolean | True when item is selected
|
|
13560
|
-
* `focused` | Boolean | True when item is focused
|
|
13561
|
-
*
|
|
13562
|
-
* ### Lazy Loading with Function Data Provider
|
|
13563
|
-
*
|
|
13564
|
-
* In addition to assigning an array to the items property, you can alternatively use the
|
|
13565
|
-
* [`dataProvider`](#/elements/vaadin-combo-box#property-dataProvider) function property.
|
|
13566
|
-
* The `<vaadin-combo-box>` calls this function lazily, only when it needs more data
|
|
13567
|
-
* to be displayed.
|
|
13568
|
-
*
|
|
13569
|
-
* __Note that when using function data providers, the total number of items
|
|
13570
|
-
* needs to be set manually. The total number of items can be returned
|
|
13571
|
-
* in the second argument of the data provider callback:__
|
|
13572
|
-
*
|
|
13573
|
-
* ```js
|
|
13574
|
-
* comboBox.dataProvider = async (params, callback) => {
|
|
13575
|
-
* const API = 'https://demo.vaadin.com/demo-data/1.0/filtered-countries';
|
|
13576
|
-
* const { filter, page, pageSize } = params;
|
|
13577
|
-
* const index = page * pageSize;
|
|
13578
|
-
*
|
|
13579
|
-
* const res = await fetch(`${API}?index=${index}&count=${pageSize}&filter=${filter}`);
|
|
13580
|
-
* if (res.ok) {
|
|
13581
|
-
* const { result, size } = await res.json();
|
|
13582
|
-
* callback(result, size);
|
|
13583
|
-
* }
|
|
13584
|
-
* };
|
|
13585
|
-
* ```
|
|
13586
|
-
*
|
|
13587
|
-
* ### Styling
|
|
13588
|
-
*
|
|
13589
|
-
* The following custom properties are available for styling:
|
|
13590
|
-
*
|
|
13591
|
-
* Custom property | Description | Default
|
|
13592
|
-
* ----------------------------------------|----------------------------|---------
|
|
13593
|
-
* `--vaadin-field-default-width` | Default width of the field | `12em`
|
|
13594
|
-
* `--vaadin-combo-box-overlay-width` | Width of the overlay | `auto`
|
|
13595
|
-
* `--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`
|
|
13596
|
-
*
|
|
13597
|
-
* The following shadow DOM parts are available for styling:
|
|
13412
|
+
* - `withBackdrop`: When true the overlay has backdrop on top of content when opened.
|
|
13413
|
+
* - `focusTrap`: When true, opening the overlay moves focus to the first focusable child,
|
|
13414
|
+
* or to the overlay part with tabindex if there are no focusable children.
|
|
13415
|
+
* - `restoreFocusOnClose`: Set to true to enable restoring of focus when overlay is closed.
|
|
13416
|
+
* - `restoreFocusNode`: Set to specify the element which should be focused on overlay close,
|
|
13417
|
+
* if `restoreFocusOnClose` is set to true.
|
|
13418
|
+
* - `dir`: undefined
|
|
13419
|
+
* - `_boundMouseDownListener`: undefined (property only)
|
|
13420
|
+
* - `_boundMouseUpListener`: undefined (property only)
|
|
13421
|
+
* - `_boundOutsideClickListener`: undefined (property only)
|
|
13422
|
+
* - `_boundKeydownListener`: undefined (property only)
|
|
13423
|
+
* - `__focusTrapController`: undefined (property only)
|
|
13424
|
+
* - `__focusRestorationController`: undefined (property only)
|
|
13598
13425
|
*
|
|
13599
|
-
*
|
|
13600
|
-
* ---------------------|----------------
|
|
13601
|
-
* `label` | The label element
|
|
13602
|
-
* `input-field` | The element that wraps prefix, value and buttons
|
|
13603
|
-
* `field-button` | Set on both clear and toggle buttons
|
|
13604
|
-
* `clear-button` | The clear button
|
|
13605
|
-
* `error-message` | The error message element
|
|
13606
|
-
* `helper-text` | The helper text element wrapper
|
|
13607
|
-
* `required-indicator` | The `required` state indicator element
|
|
13608
|
-
* `toggle-button` | The toggle button
|
|
13609
|
-
* `overlay` | The overlay container
|
|
13610
|
-
* `content` | The overlay content
|
|
13611
|
-
* `loader` | The loading indicator shown while loading items
|
|
13426
|
+
* ## Events
|
|
13612
13427
|
*
|
|
13613
|
-
*
|
|
13428
|
+
* Events that will be emitted by the component.
|
|
13614
13429
|
*
|
|
13615
|
-
*
|
|
13616
|
-
*
|
|
13617
|
-
* `
|
|
13618
|
-
* `has-value` | Set when the element has a value
|
|
13619
|
-
* `has-label` | Set when the element has a label
|
|
13620
|
-
* `has-helper` | Set when the element has helper text or slot
|
|
13621
|
-
* `has-error-message` | Set when the element has an error message
|
|
13622
|
-
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
13623
|
-
* `invalid` | Set when the element is invalid
|
|
13624
|
-
* `focused` | Set when the element is focused
|
|
13625
|
-
* `focus-ring` | Set when the element is keyboard focused
|
|
13626
|
-
* `readonly` | Set when the element is readonly
|
|
13627
|
-
* `opened` | Set when the overlay is opened
|
|
13628
|
-
* `loading` | Set when loading items from the data provider
|
|
13430
|
+
* - `vaadin-overlay-closed`: undefined
|
|
13431
|
+
* - `vaadin-overlay-closing`: undefined
|
|
13432
|
+
* - `undefined`: undefined
|
|
13629
13433
|
*
|
|
13630
|
-
*
|
|
13434
|
+
* ## Methods
|
|
13631
13435
|
*
|
|
13632
|
-
*
|
|
13633
|
-
* components are themable:
|
|
13436
|
+
* Methods that can be called to access component functionality.
|
|
13634
13437
|
*
|
|
13635
|
-
* -
|
|
13438
|
+
* - `_updatePosition() => void`: undefined
|
|
13439
|
+
* - `__shouldAlignStartHorizontally(targetRect, rtl) => void`: undefined
|
|
13440
|
+
* - `__shouldAlignStartVertically(targetRect) => void`: undefined
|
|
13441
|
+
* - `__shouldAlignStart(targetRect, contentSize, viewportSize, margins, defaultAlignStart, noOverlap, propNames) => void`: undefined
|
|
13442
|
+
* - `__adjustBottomProperty(cssPropNameToSet, propNames, currentValue) => void`: Returns an adjusted value after resizing the browser window,
|
|
13443
|
+
* to avoid wrong calculations when e.g. previously set `bottom`
|
|
13444
|
+
* CSS property value is larger than the updated viewport height.
|
|
13445
|
+
* See https://github.com/vaadin/web-components/issues/4604
|
|
13446
|
+
* - `__calculatePositionInOneDimension(targetRect, overlayRect, noOverlap, propNames, overlay, shouldAlignStart) => void`: Returns an object with CSS position properties to set,
|
|
13447
|
+
* e.g. { top: "100px" }
|
|
13448
|
+
* - `requestContentUpdate() => void`: Requests an update for the content of the overlay.
|
|
13449
|
+
* While performing the update, it invokes the renderer passed in the `renderer` property.
|
|
13636
13450
|
*
|
|
13637
|
-
*
|
|
13451
|
+
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
13452
|
+
* - `close(sourceEvent: Event=) => void`: undefined
|
|
13453
|
+
* - `setBounds(bounds: !OverlayBoundsParam, absolute: boolean = true) => void`: Updates the coordinates of the overlay.
|
|
13454
|
+
* - `bringToFront() => void`: Brings the overlay as visually the frontmost one.
|
|
13455
|
+
* - `createProperty(name, options) => void`: undefined
|
|
13456
|
+
* - `getOrCreateMap(name) => void`: undefined
|
|
13457
|
+
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
13458
|
+
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
13459
|
+
*/
|
|
13460
|
+
"vaadin-combo-box-overlay": Partial<
|
|
13461
|
+
ComboBoxOverlayProps & BaseProps<ComboBoxOverlay> & BaseEvents
|
|
13462
|
+
>;
|
|
13463
|
+
|
|
13464
|
+
/**
|
|
13465
|
+
* An element used internally by `<vaadin-combo-box>`. Not intended to be used separately.
|
|
13638
13466
|
*
|
|
13639
13467
|
* ## Attributes & Properties
|
|
13640
13468
|
*
|
|
13641
13469
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
13642
13470
|
*
|
|
13643
|
-
* - `
|
|
13644
|
-
*
|
|
13645
|
-
* - `
|
|
13646
|
-
*
|
|
13647
|
-
* - `
|
|
13648
|
-
* - `
|
|
13649
|
-
*
|
|
13650
|
-
* - `invalid`/`undefined`: Set when the element is invalid
|
|
13651
|
-
* - `focused`/`undefined`: Set when the element is focused
|
|
13652
|
-
* - `focus-ring`/`undefined`: Set when the element is keyboard focused
|
|
13653
|
-
* - `readonly`: Set when the element is readonly
|
|
13654
|
-
* - `opened`: Set when the overlay is opened
|
|
13655
|
-
* - `loading`: Set when loading items from the data provider
|
|
13656
|
-
* - `<vaadin-combo-box>`/`undefined`: undefined
|
|
13657
|
-
* - `<vaadin-combo-box-item>`/`undefined`: undefined
|
|
13658
|
-
* - `<vaadin-item>`/`undefined`: undefined
|
|
13659
|
-
* - `pageSize`: Number of items fetched at a time from the dataprovider.
|
|
13660
|
-
* - `size`: Total number of items.
|
|
13661
|
-
* - `dataProvider`: Function that provides items lazily. Receives arguments `params`, `callback`
|
|
13662
|
-
*
|
|
13663
|
-
* `params.page` Requested page index
|
|
13664
|
-
*
|
|
13665
|
-
* `params.pageSize` Current page size
|
|
13666
|
-
*
|
|
13667
|
-
* `params.filter` Currently applied filter
|
|
13668
|
-
*
|
|
13669
|
-
* `callback(items, size)` Callback function with arguments:
|
|
13670
|
-
* - `items` Current page of items
|
|
13671
|
-
* - `size` Total number of items.
|
|
13672
|
-
* - `renderer`: Custom function for rendering the content of every item.
|
|
13673
|
-
* Receives three arguments:
|
|
13674
|
-
*
|
|
13675
|
-
* - `root` The `<vaadin-combo-box-item>` internal container DOM element.
|
|
13676
|
-
* - `comboBox` The reference to the `<vaadin-combo-box>` element.
|
|
13677
|
-
* - `model` The object with the properties related with the rendered
|
|
13678
|
-
* item, contains:
|
|
13679
|
-
* - `model.index` The index of the rendered item.
|
|
13680
|
-
* - `model.item` The item.
|
|
13681
|
-
* - `allowCustomValue`: If `true`, the user can input a value that is not present in the items list.
|
|
13682
|
-
* `value` property will be set to the input value in this case.
|
|
13683
|
-
* Also, when `value` is set programmatically, the input value will be set
|
|
13684
|
-
* to reflect that value.
|
|
13471
|
+
* - `items`: A full set of items to filter the visible options from.
|
|
13472
|
+
* Set to an empty array when combo-box is not opened.
|
|
13473
|
+
* - `focusedIndex`: Index of an item that has focus outline and is scrolled into view.
|
|
13474
|
+
* The actual focus still remains in the input field.
|
|
13475
|
+
* - `loading`: Set to true while combo-box fetches new page from the data provider.
|
|
13476
|
+
* - `opened`: Whether the combo-box is currently opened or not. If set to false,
|
|
13477
|
+
* calling `scrollIntoView` does not have any effect.
|
|
13685
13478
|
* - `selectedItem`: The selected item from the `items` array.
|
|
13686
13479
|
* - `itemClassNameGenerator`: A function used to generate CSS class names for dropdown
|
|
13687
13480
|
* items based on the item. The return value should be the
|
|
13688
13481
|
* generated class name as a string, or multiple class names
|
|
13689
13482
|
* separated by whitespace characters.
|
|
13690
|
-
* - `itemIdPath`: Path for the id of the item
|
|
13691
|
-
*
|
|
13692
|
-
*
|
|
13693
|
-
* `
|
|
13694
|
-
* - `
|
|
13695
|
-
* - `
|
|
13696
|
-
* The items can be of either `String` or `Object` type.
|
|
13697
|
-
* - `filteredItems`: A subset of items, filtered based on the user input. Filtered items
|
|
13698
|
-
* can be assigned directly to omit the internal filtering functionality.
|
|
13699
|
-
* The items can be of either `String` or `Object` type.
|
|
13700
|
-
* - `filter`: Filtering string the user has typed into the input field.
|
|
13701
|
-
* - `itemLabelGenerator`: A function that is used to generate the label for dropdown
|
|
13702
|
-
* items based on the item. Receives one argument:
|
|
13703
|
-
* - `item` The item to generate the label for.
|
|
13704
|
-
* - `itemLabelPath`: Path for label of the item. If `items` is an array of objects, the
|
|
13705
|
-
* `itemLabelPath` is used to fetch the displayed string label for each
|
|
13706
|
-
* item.
|
|
13707
|
-
*
|
|
13708
|
-
* The item label is also used for matching items when processing user
|
|
13709
|
-
* input, i.e., for filtering and selecting items.
|
|
13710
|
-
* - `itemValuePath`: Path for the value of the item. If `items` is an array of objects, the
|
|
13711
|
-
* `itemValuePath:` is used to fetch the string value for the selected
|
|
13712
|
-
* item.
|
|
13713
|
-
*
|
|
13714
|
-
* The item value is used in the `value` property of the combo box,
|
|
13715
|
-
* to provide the form value.
|
|
13716
|
-
* - `autoOpenDisabled`: Set true to prevent the overlay from opening automatically.
|
|
13717
|
-
* - `_focusedIndex`: undefined
|
|
13718
|
-
* - `_toggleElement`: undefined
|
|
13719
|
-
* - `_dropdownItems`: Set of items to be rendered in the dropdown.
|
|
13720
|
-
* - `_overlayOpened`: Whether the overlay should be opened.
|
|
13721
|
-
* - `pattern`: A regular expression that the value is checked against.
|
|
13722
|
-
* The pattern must match the entire value, not just some subset.
|
|
13723
|
-
* - `allowedCharPattern`: A pattern matched against individual characters the user inputs.
|
|
13724
|
-
*
|
|
13725
|
-
* When set, the field will prevent:
|
|
13726
|
-
* - `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`
|
|
13727
|
-
* - `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`
|
|
13728
|
-
* - `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`
|
|
13729
|
-
*
|
|
13730
|
-
* For example, to allow entering only numbers and minus signs, use:
|
|
13731
|
-
* `allowedCharPattern = "[\\d-]"`
|
|
13732
|
-
* - `autoselect`: If true, the input text gets fully selected when the field is focused using click or touch / tap.
|
|
13733
|
-
* - `name`: The name of this field.
|
|
13734
|
-
* - `placeholder`: A hint to the user of what can be entered in the field.
|
|
13735
|
-
* - `title`: The text usually displayed in a tooltip popup when the mouse is over the field.
|
|
13736
|
-
* - `ariaTarget`: A target element to which ARIA attributes are set.
|
|
13737
|
-
* - `errorMessage`: Error to show when the field is invalid.
|
|
13738
|
-
* - `helperText`: String used for the helper text.
|
|
13739
|
-
* - `accessibleName`: String used to label the component to screen reader users.
|
|
13740
|
-
* - `accessibleNameRef`: Id of the element used as label of the component to screen reader users.
|
|
13741
|
-
* - `clearButtonVisible`: Set to true to display the clear icon which clears the input.
|
|
13742
|
-
*
|
|
13743
|
-
* It is up to the component to choose where to place the clear icon:
|
|
13744
|
-
* in the Shadow DOM or in the light DOM. In any way, a reference to
|
|
13745
|
-
* the clear icon element should be provided via the `clearElement` getter.
|
|
13746
|
-
* - `dir`: undefined
|
|
13747
|
-
* - `_boundOverlaySelectedItemChanged`: undefined (property only)
|
|
13748
|
-
* - `_boundOnClearButtonMouseDown`: undefined (property only)
|
|
13749
|
-
* - `_boundOnClick`: undefined (property only)
|
|
13750
|
-
* - `_boundOnOverlayTouchAction`: undefined (property only)
|
|
13751
|
-
* - `_boundOnTouchend`: undefined (property only)
|
|
13752
|
-
* - `_boundOnPaste`: undefined (property only)
|
|
13753
|
-
* - `_boundOnDrop`: undefined (property only)
|
|
13754
|
-
* - `_boundOnBeforeInput`: undefined (property only)
|
|
13755
|
-
* - `_fieldAriaController`: undefined (property only)
|
|
13756
|
-
* - `_helperController`: undefined (property only)
|
|
13757
|
-
* - `_errorController`: undefined (property only)
|
|
13483
|
+
* - `itemIdPath`: Path for the id of the item, used to detect whether the item is selected.
|
|
13484
|
+
* - `owner`: Reference to the owner (combo-box owner), used by the item elements.
|
|
13485
|
+
* - `getItemLabel`: Function used to set a label for every combo-box item.
|
|
13486
|
+
* - `renderer`: Function used to render the content of every combo-box item.
|
|
13487
|
+
* - `theme`: Used to propagate the `theme` attribute from the host element.
|
|
13488
|
+
* - `__boundOnItemClick`: undefined (property only)
|
|
13758
13489
|
*
|
|
13759
13490
|
* ## Events
|
|
13760
13491
|
*
|
|
13761
13492
|
* Events that will be emitted by the component.
|
|
13762
13493
|
*
|
|
13763
|
-
* - `
|
|
13764
|
-
* - `
|
|
13765
|
-
* - `filter-changed`: Fired when the `filter` property changes.
|
|
13766
|
-
* - `invalid-changed`: Fired when the `invalid` property changes.
|
|
13767
|
-
* - `opened-changed`: Fired when the `opened` property changes.
|
|
13768
|
-
* - `selected-item-changed`: Fired when the `selectedItem` property changes.
|
|
13769
|
-
* - `value-changed`: Fired when the `value` property changes.
|
|
13770
|
-
* - `validated`: Fired whenever the field is validated.
|
|
13771
|
-
* - `vaadin-combo-box-dropdown-opened`: undefined
|
|
13772
|
-
* - `vaadin-combo-box-dropdown-closed`: undefined
|
|
13494
|
+
* - `selection-changed`: undefined
|
|
13495
|
+
* - `index-requested`: undefined
|
|
13773
13496
|
* - `undefined`: undefined
|
|
13774
13497
|
*
|
|
13775
13498
|
* ## Methods
|
|
13776
13499
|
*
|
|
13777
13500
|
* Methods that can be called to access component functionality.
|
|
13778
13501
|
*
|
|
13779
|
-
* - `
|
|
13780
|
-
* - `
|
|
13781
|
-
*
|
|
13782
|
-
*
|
|
13783
|
-
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
13784
|
-
* - `cancel() => void`: Reverts back to original value.
|
|
13785
|
-
* - `open() => void`: Opens the dropdown list.
|
|
13786
|
-
* - `close() => void`: Closes the dropdown list.
|
|
13502
|
+
* - `requestContentUpdate() => void`: Updates the virtualizer's size and items.
|
|
13503
|
+
* - `scrollIntoView(index: number) => void`: Scrolls an item at given index into view and adjusts `scrollTop`
|
|
13504
|
+
* so that the element gets fully visible on Arrow Down key press.
|
|
13787
13505
|
* - `createProperty(name, options) => void`: undefined
|
|
13788
13506
|
* - `getOrCreateMap(name) => void`: undefined
|
|
13789
13507
|
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
13790
13508
|
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
13791
13509
|
*/
|
|
13792
|
-
"vaadin-combo-box": Partial<
|
|
13510
|
+
"vaadin-combo-box-scroller": Partial<
|
|
13511
|
+
ComboBoxScrollerProps & BaseProps<ComboBoxScroller> & BaseEvents
|
|
13512
|
+
>;
|
|
13793
13513
|
|
|
13794
13514
|
/**
|
|
13795
|
-
*
|
|
13515
|
+
* `<vaadin-combo-box>` is a web component for choosing a value from a filterable list of options
|
|
13516
|
+
* presented in a dropdown overlay. The options can be provided as a list of strings or objects
|
|
13517
|
+
* by setting [`items`](#/elements/vaadin-combo-box#property-items) property on the element.
|
|
13796
13518
|
*
|
|
13797
|
-
*
|
|
13519
|
+
* ```html
|
|
13520
|
+
* <vaadin-combo-box id="combo-box"></vaadin-combo-box>
|
|
13521
|
+
* ```
|
|
13798
13522
|
*
|
|
13799
|
-
*
|
|
13523
|
+
* ```js
|
|
13524
|
+
* document.querySelector('#combo-box').items = ['apple', 'orange', 'banana'];
|
|
13525
|
+
* ```
|
|
13800
13526
|
*
|
|
13801
|
-
*
|
|
13802
|
-
* - `selectedDate`: undefined
|
|
13527
|
+
* When the selected `value` is changed, a `value-changed` event is triggered.
|
|
13803
13528
|
*
|
|
13804
|
-
*
|
|
13529
|
+
* ### Item rendering
|
|
13530
|
+
*
|
|
13531
|
+
* To customize the content of the `<vaadin-combo-box-item>` elements placed in the dropdown, use
|
|
13532
|
+
* [`renderer`](#/elements/vaadin-combo-box#property-renderer) property which accepts a function.
|
|
13533
|
+
* The renderer function is called with `root`, `comboBox`, and `model` as arguments.
|
|
13534
|
+
*
|
|
13535
|
+
* Generate DOM content by using `model` object properties if needed, and append it to the `root`
|
|
13536
|
+
* element. The `comboBox` reference is provided to access the combo-box element state. Do not
|
|
13537
|
+
* set combo-box properties in a `renderer` function.
|
|
13538
|
+
*
|
|
13539
|
+
* ```js
|
|
13540
|
+
* const comboBox = document.querySelector('#combo-box');
|
|
13541
|
+
* comboBox.items = [{'label': 'Hydrogen', 'value': 'H'}];
|
|
13542
|
+
* comboBox.renderer = (root, comboBox, model) => {
|
|
13543
|
+
* const item = model.item;
|
|
13544
|
+
* root.innerHTML = `${model.index}: ${item.label} <b>${item.value}</b>`;
|
|
13545
|
+
* };
|
|
13546
|
+
* ```
|
|
13805
13547
|
*
|
|
13806
|
-
*
|
|
13548
|
+
* Renderer is called on the opening of the combo-box and each time the related model is updated.
|
|
13549
|
+
* Before creating new content, it is recommended to check if there is already an existing DOM
|
|
13550
|
+
* element in `root` from a previous renderer call for reusing it. Even though combo-box uses
|
|
13551
|
+
* infinite scrolling, reducing DOM operations might improve performance.
|
|
13807
13552
|
*
|
|
13808
|
-
*
|
|
13553
|
+
* The following properties are available in the `model` argument:
|
|
13809
13554
|
*
|
|
13810
|
-
*
|
|
13555
|
+
* Property | Type | Description
|
|
13556
|
+
* -----------|------------------|-------------
|
|
13557
|
+
* `index` | Number | Index of the item in the `items` array
|
|
13558
|
+
* `item` | String or Object | The item reference
|
|
13559
|
+
* `selected` | Boolean | True when item is selected
|
|
13560
|
+
* `focused` | Boolean | True when item is focused
|
|
13811
13561
|
*
|
|
13812
|
-
*
|
|
13562
|
+
* ### Lazy Loading with Function Data Provider
|
|
13813
13563
|
*
|
|
13814
|
-
*
|
|
13815
|
-
*
|
|
13816
|
-
* -
|
|
13817
|
-
*
|
|
13818
|
-
*/
|
|
13819
|
-
"vaadin-date-picker-year": Partial<
|
|
13820
|
-
DatePickerYearProps & BaseProps<DatePickerYear> & BaseEvents
|
|
13821
|
-
>;
|
|
13822
|
-
|
|
13823
|
-
/**
|
|
13824
|
-
* `<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.
|
|
13564
|
+
* In addition to assigning an array to the items property, you can alternatively use the
|
|
13565
|
+
* [`dataProvider`](#/elements/vaadin-combo-box#property-dataProvider) function property.
|
|
13566
|
+
* The `<vaadin-combo-box>` calls this function lazily, only when it needs more data
|
|
13567
|
+
* to be displayed.
|
|
13825
13568
|
*
|
|
13826
|
-
*
|
|
13827
|
-
*
|
|
13828
|
-
*
|
|
13569
|
+
* __Note that when using function data providers, the total number of items
|
|
13570
|
+
* needs to be set manually. The total number of items can be returned
|
|
13571
|
+
* in the second argument of the data provider callback:__
|
|
13829
13572
|
*
|
|
13830
13573
|
* ```js
|
|
13831
|
-
*
|
|
13832
|
-
*
|
|
13574
|
+
* comboBox.dataProvider = async (params, callback) => {
|
|
13575
|
+
* const API = 'https://demo.vaadin.com/demo-data/1.0/filtered-countries';
|
|
13576
|
+
* const { filter, page, pageSize } = params;
|
|
13577
|
+
* const index = page * pageSize;
|
|
13833
13578
|
*
|
|
13834
|
-
*
|
|
13579
|
+
* const res = await fetch(`${API}?index=${index}&count=${pageSize}&filter=${filter}`);
|
|
13580
|
+
* if (res.ok) {
|
|
13581
|
+
* const { result, size } = await res.json();
|
|
13582
|
+
* callback(result, size);
|
|
13583
|
+
* }
|
|
13584
|
+
* };
|
|
13585
|
+
* ```
|
|
13835
13586
|
*
|
|
13836
13587
|
* ### Styling
|
|
13837
13588
|
*
|
|
13838
13589
|
* The following custom properties are available for styling:
|
|
13839
13590
|
*
|
|
13840
|
-
* Custom property
|
|
13841
|
-
*
|
|
13842
|
-
* `--vaadin-field-default-width`
|
|
13591
|
+
* Custom property | Description | Default
|
|
13592
|
+
* ----------------------------------------|----------------------------|---------
|
|
13593
|
+
* `--vaadin-field-default-width` | Default width of the field | `12em`
|
|
13594
|
+
* `--vaadin-combo-box-overlay-width` | Width of the overlay | `auto`
|
|
13595
|
+
* `--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`
|
|
13843
13596
|
*
|
|
13844
13597
|
* The following shadow DOM parts are available for styling:
|
|
13845
13598
|
*
|
|
@@ -13853,9 +13606,9 @@ export type CustomElements = {
|
|
|
13853
13606
|
* `helper-text` | The helper text element wrapper
|
|
13854
13607
|
* `required-indicator` | The `required` state indicator element
|
|
13855
13608
|
* `toggle-button` | The toggle button
|
|
13856
|
-
* `backdrop` | Backdrop of the overlay
|
|
13857
13609
|
* `overlay` | The overlay container
|
|
13858
13610
|
* `content` | The overlay content
|
|
13611
|
+
* `loader` | The loading indicator shown while loading items
|
|
13859
13612
|
*
|
|
13860
13613
|
* The following state attributes are available for styling:
|
|
13861
13614
|
*
|
|
@@ -13872,76 +13625,17 @@ export type CustomElements = {
|
|
|
13872
13625
|
* `focus-ring` | Set when the element is keyboard focused
|
|
13873
13626
|
* `readonly` | Set when the element is readonly
|
|
13874
13627
|
* `opened` | Set when the overlay is opened
|
|
13875
|
-
* `
|
|
13628
|
+
* `loading` | Set when loading items from the data provider
|
|
13876
13629
|
*
|
|
13877
13630
|
* ### Internal components
|
|
13878
13631
|
*
|
|
13879
|
-
* In addition to `<vaadin-
|
|
13632
|
+
* In addition to `<vaadin-combo-box>` itself, the following internal
|
|
13880
13633
|
* components are themable:
|
|
13881
13634
|
*
|
|
13882
|
-
* - `<vaadin-
|
|
13883
|
-
* - `<vaadin-date-picker-month-scroller>`
|
|
13884
|
-
* - `<vaadin-date-picker-year-scroller>`
|
|
13885
|
-
* - `<vaadin-date-picker-year>`
|
|
13886
|
-
* - `<vaadin-month-calendar>`
|
|
13887
|
-
*
|
|
13888
|
-
* In order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:
|
|
13889
|
-
*
|
|
13890
|
-
* Part name | Description
|
|
13891
|
-
* ----------------------|--------------------
|
|
13892
|
-
* `years-toggle-button` | Fullscreen mode years scroller toggle
|
|
13893
|
-
* `toolbar` | Toolbar with slotted buttons
|
|
13894
|
-
*
|
|
13895
|
-
* The following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:
|
|
13896
|
-
*
|
|
13897
|
-
* Attribute | Description
|
|
13898
|
-
* ----------------|-------------------------------------------------
|
|
13899
|
-
* `desktop` | Set when the overlay content is in desktop mode
|
|
13900
|
-
* `fullscreen` | Set when the overlay content is in fullscreen mode
|
|
13901
|
-
* `years-visible` | Set when the year scroller is visible in fullscreen mode
|
|
13902
|
-
*
|
|
13903
|
-
* In order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:
|
|
13904
|
-
*
|
|
13905
|
-
* Part name | Description
|
|
13906
|
-
* ----------------------|--------------------
|
|
13907
|
-
* `month-header` | Month title
|
|
13908
|
-
* `weekdays` | Weekday container
|
|
13909
|
-
* `weekday` | Weekday element
|
|
13910
|
-
* `week-numbers` | Week numbers container
|
|
13911
|
-
* `week-number` | Week number element
|
|
13912
|
-
* `date` | Date element
|
|
13913
|
-
* `disabled` | Disabled date element
|
|
13914
|
-
* `focused` | Focused date element
|
|
13915
|
-
* `selected` | Selected date element
|
|
13916
|
-
* `today` | Date element corresponding to the current day
|
|
13917
|
-
* `past` | Date element corresponding to the date in the past
|
|
13918
|
-
* `future` | Date element corresponding to the date in the future
|
|
13919
|
-
*
|
|
13920
|
-
* In order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:
|
|
13921
|
-
*
|
|
13922
|
-
* Part name | Description
|
|
13923
|
-
* ----------------------|--------------------
|
|
13924
|
-
* `year-number` | Year number
|
|
13925
|
-
* `year-separator` | Year separator
|
|
13635
|
+
* - `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](#/elements/vaadin-item).
|
|
13926
13636
|
*
|
|
13927
13637
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
13928
13638
|
*
|
|
13929
|
-
* ### Change events
|
|
13930
|
-
*
|
|
13931
|
-
* Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,
|
|
13932
|
-
* the component can fire either a `change` event or an `unparsable-change` event:
|
|
13933
|
-
*
|
|
13934
|
-
* Value change | Event
|
|
13935
|
-
* :------------------------|:------------------
|
|
13936
|
-
* empty => parsable | change
|
|
13937
|
-
* empty => unparsable | unparsable-change
|
|
13938
|
-
* parsable => empty | change
|
|
13939
|
-
* parsable => parsable | change
|
|
13940
|
-
* parsable => unparsable | change
|
|
13941
|
-
* unparsable => empty | unparsable-change
|
|
13942
|
-
* unparsable => parsable | change
|
|
13943
|
-
* unparsable => unparsable | unparsable-change
|
|
13944
|
-
*
|
|
13945
13639
|
* ## Attributes & Properties
|
|
13946
13640
|
*
|
|
13947
13641
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
@@ -13958,59 +13652,74 @@ export type CustomElements = {
|
|
|
13958
13652
|
* - `focus-ring`/`undefined`: Set when the element is keyboard focused
|
|
13959
13653
|
* - `readonly`: Set when the element is readonly
|
|
13960
13654
|
* - `opened`: Set when the overlay is opened
|
|
13961
|
-
* - `
|
|
13962
|
-
* - `<vaadin-
|
|
13963
|
-
* - `<vaadin-
|
|
13964
|
-
* - `<vaadin-
|
|
13965
|
-
* -
|
|
13966
|
-
* -
|
|
13967
|
-
* -
|
|
13968
|
-
* - `<vaadin-date-picker-overlay-content>`/`undefined`: undefined
|
|
13969
|
-
* - `years-toggle-button`/`undefined`: Fullscreen mode years scroller toggle
|
|
13970
|
-
* - `toolbar`/`undefined`: Toolbar with slotted buttons
|
|
13971
|
-
* - `_selectedDate`: The current selected date.
|
|
13972
|
-
* - `_focusedDate`: undefined
|
|
13973
|
-
* - `value`: Selected date.
|
|
13655
|
+
* - `loading`: Set when loading items from the data provider
|
|
13656
|
+
* - `<vaadin-combo-box>`/`undefined`: undefined
|
|
13657
|
+
* - `<vaadin-combo-box-item>`/`undefined`: undefined
|
|
13658
|
+
* - `<vaadin-item>`/`undefined`: undefined
|
|
13659
|
+
* - `pageSize`: Number of items fetched at a time from the dataprovider.
|
|
13660
|
+
* - `size`: Total number of items.
|
|
13661
|
+
* - `dataProvider`: Function that provides items lazily. Receives arguments `params`, `callback`
|
|
13974
13662
|
*
|
|
13975
|
-
*
|
|
13976
|
-
* - ISO 8601 `"YYYY-MM-DD"` (default)
|
|
13977
|
-
* - 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"`
|
|
13978
|
-
* - `initialPosition`: Date which should be visible when there is no value selected.
|
|
13663
|
+
* `params.page` Requested page index
|
|
13979
13664
|
*
|
|
13980
|
-
*
|
|
13981
|
-
* - `autoOpenDisabled`: Set true to prevent the overlay from opening automatically.
|
|
13982
|
-
* - `showWeekNumbers`: Set true to display ISO-8601 week numbers in the calendar. Notice that
|
|
13983
|
-
* displaying week numbers is only supported when `i18n.firstDayOfWeek`
|
|
13984
|
-
* is 1 (Monday).
|
|
13985
|
-
* - `_fullscreen`: undefined
|
|
13986
|
-
* - `_fullscreenMediaQuery`: undefined
|
|
13987
|
-
* - `min`: The earliest date that can be selected. All earlier dates will be disabled.
|
|
13665
|
+
* `params.pageSize` Current page size
|
|
13988
13666
|
*
|
|
13989
|
-
*
|
|
13990
|
-
* - ISO 8601 `"YYYY-MM-DD"` (default)
|
|
13991
|
-
* - 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"`
|
|
13992
|
-
* - `max`: The latest date that can be selected. All later dates will be disabled.
|
|
13667
|
+
* `params.filter` Currently applied filter
|
|
13993
13668
|
*
|
|
13994
|
-
*
|
|
13995
|
-
*
|
|
13996
|
-
*
|
|
13997
|
-
* - `
|
|
13998
|
-
* Receives
|
|
13999
|
-
* boolean.
|
|
14000
|
-
* - `_minDate`: The earliest date that can be selected. All earlier dates will be disabled.
|
|
14001
|
-
* - `_maxDate`: The latest date that can be selected. All later dates will be disabled.
|
|
14002
|
-
* - `_noInput`: undefined
|
|
14003
|
-
* - `_ios`: undefined
|
|
14004
|
-
* - `_focusOverlayOnOpen`: undefined
|
|
14005
|
-
* - `_overlayContent`: undefined
|
|
14006
|
-
* - `__enteredDate`: undefined
|
|
14007
|
-
* - `i18n`: The object used to localize this component. To change the default
|
|
14008
|
-
* localization, replace this with an object that provides all properties, or
|
|
14009
|
-
* just the individual properties you want to change.
|
|
13669
|
+
* `callback(items, size)` Callback function with arguments:
|
|
13670
|
+
* - `items` Current page of items
|
|
13671
|
+
* - `size` Total number of items.
|
|
13672
|
+
* - `renderer`: Custom function for rendering the content of every item.
|
|
13673
|
+
* Receives three arguments:
|
|
14010
13674
|
*
|
|
14011
|
-
*
|
|
14012
|
-
*
|
|
14013
|
-
* - `
|
|
13675
|
+
* - `root` The `<vaadin-combo-box-item>` internal container DOM element.
|
|
13676
|
+
* - `comboBox` The reference to the `<vaadin-combo-box>` element.
|
|
13677
|
+
* - `model` The object with the properties related with the rendered
|
|
13678
|
+
* item, contains:
|
|
13679
|
+
* - `model.index` The index of the rendered item.
|
|
13680
|
+
* - `model.item` The item.
|
|
13681
|
+
* - `allowCustomValue`: If `true`, the user can input a value that is not present in the items list.
|
|
13682
|
+
* `value` property will be set to the input value in this case.
|
|
13683
|
+
* Also, when `value` is set programmatically, the input value will be set
|
|
13684
|
+
* to reflect that value.
|
|
13685
|
+
* - `selectedItem`: The selected item from the `items` array.
|
|
13686
|
+
* - `itemClassNameGenerator`: A function used to generate CSS class names for dropdown
|
|
13687
|
+
* items based on the item. The return value should be the
|
|
13688
|
+
* generated class name as a string, or multiple class names
|
|
13689
|
+
* separated by whitespace characters.
|
|
13690
|
+
* - `itemIdPath`: Path for the id of the item. If `items` is an array of objects,
|
|
13691
|
+
* the `itemIdPath` is used to compare and identify the same item
|
|
13692
|
+
* in `selectedItem` and `filteredItems` (items given by the
|
|
13693
|
+
* `dataProvider` callback).
|
|
13694
|
+
* - `__keepOverlayOpened`: undefined
|
|
13695
|
+
* - `items`: A full set of items to filter the visible options from.
|
|
13696
|
+
* The items can be of either `String` or `Object` type.
|
|
13697
|
+
* - `filteredItems`: A subset of items, filtered based on the user input. Filtered items
|
|
13698
|
+
* can be assigned directly to omit the internal filtering functionality.
|
|
13699
|
+
* The items can be of either `String` or `Object` type.
|
|
13700
|
+
* - `filter`: Filtering string the user has typed into the input field.
|
|
13701
|
+
* - `itemLabelGenerator`: A function that is used to generate the label for dropdown
|
|
13702
|
+
* items based on the item. Receives one argument:
|
|
13703
|
+
* - `item` The item to generate the label for.
|
|
13704
|
+
* - `itemLabelPath`: Path for label of the item. If `items` is an array of objects, the
|
|
13705
|
+
* `itemLabelPath` is used to fetch the displayed string label for each
|
|
13706
|
+
* item.
|
|
13707
|
+
*
|
|
13708
|
+
* The item label is also used for matching items when processing user
|
|
13709
|
+
* input, i.e., for filtering and selecting items.
|
|
13710
|
+
* - `itemValuePath`: Path for the value of the item. If `items` is an array of objects, the
|
|
13711
|
+
* `itemValuePath:` is used to fetch the string value for the selected
|
|
13712
|
+
* item.
|
|
13713
|
+
*
|
|
13714
|
+
* The item value is used in the `value` property of the combo box,
|
|
13715
|
+
* to provide the form value.
|
|
13716
|
+
* - `autoOpenDisabled`: Set true to prevent the overlay from opening automatically.
|
|
13717
|
+
* - `_focusedIndex`: undefined
|
|
13718
|
+
* - `_toggleElement`: undefined
|
|
13719
|
+
* - `_dropdownItems`: Set of items to be rendered in the dropdown.
|
|
13720
|
+
* - `_overlayOpened`: Whether the overlay should be opened.
|
|
13721
|
+
* - `pattern`: A regular expression that the value is checked against.
|
|
13722
|
+
* The pattern must match the entire value, not just some subset.
|
|
14014
13723
|
* - `allowedCharPattern`: A pattern matched against individual characters the user inputs.
|
|
14015
13724
|
*
|
|
14016
13725
|
* When set, the field will prevent:
|
|
@@ -14035,9 +13744,11 @@ export type CustomElements = {
|
|
|
14035
13744
|
* in the Shadow DOM or in the light DOM. In any way, a reference to
|
|
14036
13745
|
* the clear icon element should be provided via the `clearElement` getter.
|
|
14037
13746
|
* - `dir`: undefined
|
|
14038
|
-
* - `
|
|
13747
|
+
* - `_boundOverlaySelectedItemChanged`: undefined (property only)
|
|
13748
|
+
* - `_boundOnClearButtonMouseDown`: undefined (property only)
|
|
14039
13749
|
* - `_boundOnClick`: undefined (property only)
|
|
14040
|
-
* - `
|
|
13750
|
+
* - `_boundOnOverlayTouchAction`: undefined (property only)
|
|
13751
|
+
* - `_boundOnTouchend`: undefined (property only)
|
|
14041
13752
|
* - `_boundOnPaste`: undefined (property only)
|
|
14042
13753
|
* - `_boundOnDrop`: undefined (property only)
|
|
14043
13754
|
* - `_boundOnBeforeInput`: undefined (property only)
|
|
@@ -14050,30 +13761,35 @@ export type CustomElements = {
|
|
|
14050
13761
|
* Events that will be emitted by the component.
|
|
14051
13762
|
*
|
|
14052
13763
|
* - `change`: Fired when the user commits a value change.
|
|
14053
|
-
* - `
|
|
13764
|
+
* - `custom-value-set`: Fired when the user sets a custom value.
|
|
13765
|
+
* - `filter-changed`: Fired when the `filter` property changes.
|
|
14054
13766
|
* - `invalid-changed`: Fired when the `invalid` property changes.
|
|
14055
13767
|
* - `opened-changed`: Fired when the `opened` property changes.
|
|
13768
|
+
* - `selected-item-changed`: Fired when the `selectedItem` property changes.
|
|
14056
13769
|
* - `value-changed`: Fired when the `value` property changes.
|
|
14057
13770
|
* - `validated`: Fired whenever the field is validated.
|
|
13771
|
+
* - `vaadin-combo-box-dropdown-opened`: undefined
|
|
13772
|
+
* - `vaadin-combo-box-dropdown-closed`: undefined
|
|
14058
13773
|
* - `undefined`: undefined
|
|
14059
13774
|
*
|
|
14060
13775
|
* ## Methods
|
|
14061
13776
|
*
|
|
14062
13777
|
* Methods that can be called to access component functionality.
|
|
14063
13778
|
*
|
|
14064
|
-
* - `
|
|
14065
|
-
* - `
|
|
14066
|
-
*
|
|
13779
|
+
* - `clearCache() => void`: Clears the cached pages and reloads data from dataprovider when needed.
|
|
13780
|
+
* - `requestContentUpdate() => void`: Requests an update for the content of items.
|
|
13781
|
+
* While performing the update, it invokes the renderer (passed in the `renderer` property) once an item.
|
|
14067
13782
|
*
|
|
14068
|
-
*
|
|
13783
|
+
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
13784
|
+
* - `cancel() => void`: Reverts back to original value.
|
|
13785
|
+
* - `open() => void`: Opens the dropdown list.
|
|
13786
|
+
* - `close() => void`: Closes the dropdown list.
|
|
14069
13787
|
* - `createProperty(name, options) => void`: undefined
|
|
14070
13788
|
* - `getOrCreateMap(name) => void`: undefined
|
|
14071
13789
|
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
14072
13790
|
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
14073
13791
|
*/
|
|
14074
|
-
"vaadin-
|
|
14075
|
-
DatePickerProps & BaseProps<DatePicker> & BaseEvents
|
|
14076
|
-
>;
|
|
13792
|
+
"vaadin-combo-box": Partial<ComboBoxProps & BaseProps<ComboBox> & BaseEvents>;
|
|
14077
13793
|
|
|
14078
13794
|
/**
|
|
14079
13795
|
* An element used internally by `<vaadin-context-menu>`. Not intended to be used separately.
|
|
@@ -14408,152 +14124,436 @@ export type CustomElements = {
|
|
|
14408
14124
|
* };
|
|
14409
14125
|
* ```
|
|
14410
14126
|
*
|
|
14411
|
-
* ### Styling
|
|
14127
|
+
* ### Styling
|
|
14128
|
+
*
|
|
14129
|
+
* The following shadow DOM parts are available for styling:
|
|
14130
|
+
*
|
|
14131
|
+
* Part name | Description
|
|
14132
|
+
* -----------------|-------------------------------------------
|
|
14133
|
+
* `backdrop` | Backdrop of the overlay
|
|
14134
|
+
* `overlay` | The overlay container
|
|
14135
|
+
* `content` | The overlay content
|
|
14136
|
+
*
|
|
14137
|
+
* ### Custom CSS Properties
|
|
14138
|
+
*
|
|
14139
|
+
* The following custom CSS properties are available for styling:
|
|
14140
|
+
*
|
|
14141
|
+
* Custom CSS property | Description
|
|
14142
|
+
* --------------------------------------|-------------
|
|
14143
|
+
* `--vaadin-context-menu-offset-top` | Used as an offset when using `position` and the context menu is aligned vertically below the target
|
|
14144
|
+
* `--vaadin-context-menu-offset-bottom` | Used as an offset when using `position` and the context menu is aligned vertically above the target
|
|
14145
|
+
* `--vaadin-context-menu-offset-start` | Used as an offset when using `position` and the context menu is aligned horizontally after the target
|
|
14146
|
+
* `--vaadin-context-menu-offset-end` | Used as an offset when using `position` and the context menu is aligned horizontally before the target
|
|
14147
|
+
*
|
|
14148
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
14149
|
+
*
|
|
14150
|
+
* ### Internal components
|
|
14151
|
+
*
|
|
14152
|
+
* When using `items` API the following internal components are themable:
|
|
14153
|
+
*
|
|
14154
|
+
* - `<vaadin-context-menu-item>` - has the same API as [`<vaadin-item>`](#/elements/vaadin-item).
|
|
14155
|
+
* - `<vaadin-context-menu-list-box>` - has the same API as [`<vaadin-list-box>`](#/elements/vaadin-list-box).
|
|
14156
|
+
*
|
|
14157
|
+
* The `<vaadin-context-menu-item>` sub-menu elements have the following additional state attributes
|
|
14158
|
+
* on top of the built-in `<vaadin-item>` state attributes:
|
|
14159
|
+
*
|
|
14160
|
+
* Attribute | Description
|
|
14161
|
+
* ---------- |-------------
|
|
14162
|
+
* `expanded` | Expanded parent item.
|
|
14163
|
+
*
|
|
14164
|
+
* ## Attributes & Properties
|
|
14165
|
+
*
|
|
14166
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
14167
|
+
*
|
|
14168
|
+
* - `position`: Position of the overlay with respect to the target.
|
|
14169
|
+
* Supported values: null, `top-start`, `top`, `top-end`,
|
|
14170
|
+
* `bottom-start`, `bottom`, `bottom-end`, `start-top`,
|
|
14171
|
+
* `start`, `start-bottom`, `end-top`, `end`, `end-bottom`.
|
|
14172
|
+
* - `<vaadin-item>`/`undefined`: undefined
|
|
14173
|
+
* - `selector`: CSS selector that can be used to target any child element
|
|
14174
|
+
* of the context menu to listen for `openOn` events.
|
|
14175
|
+
* - `opened`: True if the overlay is currently displayed.
|
|
14176
|
+
* - `openOn`: Event name to listen for opening the context menu.
|
|
14177
|
+
* - `listenOn`: The target element that's listened to for context menu opening events.
|
|
14178
|
+
* By default the vaadin-context-menu listens to the target's `vaadin-contextmenu`
|
|
14179
|
+
* events.
|
|
14180
|
+
* - `closeOn`: Event name to listen for closing the context menu.
|
|
14181
|
+
* - `renderer`: Custom function for rendering the content of the menu overlay.
|
|
14182
|
+
* Receives three arguments:
|
|
14183
|
+
*
|
|
14184
|
+
* - `root` The root container DOM element. Append your content to it.
|
|
14185
|
+
* - `contextMenu` The reference to the `<vaadin-context-menu>` element.
|
|
14186
|
+
* - `context` The object with the menu context, contains:
|
|
14187
|
+
* - `context.target` the target of the menu opening event,
|
|
14188
|
+
* - `context.detail` the menu opening event detail.
|
|
14189
|
+
* - `_modeless`: When true, the menu overlay is modeless.
|
|
14190
|
+
* - `_context`: undefined
|
|
14191
|
+
* - `_phone`: undefined
|
|
14192
|
+
* - `_fullscreen`: undefined
|
|
14193
|
+
* - `_fullscreenMediaQuery`: undefined
|
|
14194
|
+
* - `items`: Defines a (hierarchical) menu structure for the component.
|
|
14195
|
+
* If a menu item has a non-empty `children` set, a sub-menu with the child items is opened
|
|
14196
|
+
* next to the parent menu on mouseover, tap or a right arrow keypress.
|
|
14197
|
+
*
|
|
14198
|
+
* The items API can't be used together with a renderer!
|
|
14199
|
+
*
|
|
14200
|
+
* #### Example
|
|
14201
|
+
*
|
|
14202
|
+
* ```javascript
|
|
14203
|
+
* contextMenu.items = [
|
|
14204
|
+
* { text: 'Menu Item 1', theme: 'primary', className: 'first', children:
|
|
14205
|
+
* [
|
|
14206
|
+
* { text: 'Menu Item 1-1', checked: true, keepOpen: true },
|
|
14207
|
+
* { text: 'Menu Item 1-2' }
|
|
14208
|
+
* ]
|
|
14209
|
+
* },
|
|
14210
|
+
* { component: 'hr' },
|
|
14211
|
+
* { text: 'Menu Item 2', children:
|
|
14212
|
+
* [
|
|
14213
|
+
* { text: 'Menu Item 2-1' },
|
|
14214
|
+
* { text: 'Menu Item 2-2', disabled: true }
|
|
14215
|
+
* ]
|
|
14216
|
+
* },
|
|
14217
|
+
* { text: 'Menu Item 3', disabled: true, className: 'last' }
|
|
14218
|
+
* ];
|
|
14219
|
+
* ```
|
|
14220
|
+
* - `_positionTarget`: undefined
|
|
14221
|
+
* - `dir`: undefined
|
|
14222
|
+
* - `_boundOpen`: undefined (property only)
|
|
14223
|
+
* - `_boundClose`: undefined (property only)
|
|
14224
|
+
* - `_boundPreventDefault`: undefined (property only)
|
|
14225
|
+
* - `_boundOnGlobalContextMenu`: undefined (property only)
|
|
14226
|
+
* - `__itemsOutsideClickListener`: undefined (property only)
|
|
14227
|
+
*
|
|
14228
|
+
* ## Events
|
|
14229
|
+
*
|
|
14230
|
+
* Events that will be emitted by the component.
|
|
14231
|
+
*
|
|
14232
|
+
* - `opened-changed`: Fired when the `opened` property changes.
|
|
14233
|
+
* - `item-selected`: Fired when an item is selected when the context menu is populated using the `items` API.
|
|
14234
|
+
* - `closed`: Fired when the context menu is closed.
|
|
14235
|
+
* - `close-all-menus`: Fired when all menus should close, e.g., after pressing Tab or on submenu close.
|
|
14236
|
+
* - `items-outside-click`: Fired when a click happens outside any open sub-menus.
|
|
14237
|
+
* - `undefined`: undefined
|
|
14238
|
+
*
|
|
14239
|
+
* ## Methods
|
|
14240
|
+
*
|
|
14241
|
+
* Methods that can be called to access component functionality.
|
|
14242
|
+
*
|
|
14243
|
+
* - `requestContentUpdate() => void`: Requests an update for the content of the menu overlay.
|
|
14244
|
+
* While performing the update, it invokes the renderer passed in the `renderer` property.
|
|
14245
|
+
*
|
|
14246
|
+
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
14247
|
+
* - `close() => void`: Closes the overlay.
|
|
14248
|
+
* - `open(e: !Event | undefined) => void`: Opens the overlay.
|
|
14249
|
+
* - `createProperty(name, options) => void`: undefined
|
|
14250
|
+
* - `getOrCreateMap(name) => void`: undefined
|
|
14251
|
+
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
14252
|
+
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
14253
|
+
*
|
|
14254
|
+
* ## CSS Custom Properties
|
|
14255
|
+
*
|
|
14256
|
+
* CSS variables available for styling the component.
|
|
14257
|
+
*
|
|
14258
|
+
* - `--vaadin-context-menu-offset-top`: Used as an offset when using `position` and the context menu is aligned vertically below the target (default: `undefined`)
|
|
14259
|
+
* - `--vaadin-context-menu-offset-bottom`: Used as an offset when using `position` and the context menu is aligned vertically above the target (default: `undefined`)
|
|
14260
|
+
* - `--vaadin-context-menu-offset-start`: Used as an offset when using `position` and the context menu is aligned horizontally after the target (default: `undefined`)
|
|
14261
|
+
* - `--vaadin-context-menu-offset-end`: Used as an offset when using `position` and the context menu is aligned horizontally before the target (default: `undefined`)
|
|
14262
|
+
* - `items`: undefined (default: `undefined`)
|
|
14263
|
+
* - `<vaadin-context-menu-item>`: undefined (default: `undefined`)
|
|
14264
|
+
* - `<vaadin-item>`: undefined (default: `undefined`)
|
|
14265
|
+
* - `<vaadin-context-menu-list-box>`: undefined (default: `undefined`)
|
|
14266
|
+
* - `<vaadin-list-box>`: undefined (default: `undefined`)
|
|
14267
|
+
* - `<vaadin-context-menu-item>`: undefined (default: `undefined`)
|
|
14268
|
+
* - `<vaadin-item>`: undefined (default: `undefined`)
|
|
14269
|
+
* - `expanded`: Expanded parent item. (default: `undefined`)
|
|
14270
|
+
*/
|
|
14271
|
+
"vaadin-context-menu": Partial<
|
|
14272
|
+
ContextMenuProps & BaseProps<ContextMenu> & BaseEvents
|
|
14273
|
+
>;
|
|
14274
|
+
|
|
14275
|
+
/**
|
|
14276
|
+
* An element used internally by `<vaadin-date-picker>`. Not intended to be used separately.
|
|
14277
|
+
*
|
|
14278
|
+
* ## Attributes & Properties
|
|
14279
|
+
*
|
|
14280
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
14281
|
+
*
|
|
14282
|
+
* - `year`: undefined
|
|
14283
|
+
* - `selectedDate`: undefined
|
|
14284
|
+
*
|
|
14285
|
+
* ## Events
|
|
14286
|
+
*
|
|
14287
|
+
* Events that will be emitted by the component.
|
|
14288
|
+
*
|
|
14289
|
+
* - `undefined`: undefined
|
|
14290
|
+
*
|
|
14291
|
+
* ## Methods
|
|
14292
|
+
*
|
|
14293
|
+
* Methods that can be called to access component functionality.
|
|
14294
|
+
*
|
|
14295
|
+
* - `createProperty(name, options) => void`: undefined
|
|
14296
|
+
* - `getOrCreateMap(name) => void`: undefined
|
|
14297
|
+
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
14298
|
+
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
14299
|
+
*/
|
|
14300
|
+
"vaadin-date-picker-year": Partial<
|
|
14301
|
+
DatePickerYearProps & BaseProps<DatePickerYear> & BaseEvents
|
|
14302
|
+
>;
|
|
14303
|
+
|
|
14304
|
+
/**
|
|
14305
|
+
* `<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.
|
|
14306
|
+
*
|
|
14307
|
+
* ```html
|
|
14308
|
+
* <vaadin-date-picker label="Birthday"></vaadin-date-picker>
|
|
14309
|
+
* ```
|
|
14310
|
+
*
|
|
14311
|
+
* ```js
|
|
14312
|
+
* datePicker.value = '2016-03-02';
|
|
14313
|
+
* ```
|
|
14314
|
+
*
|
|
14315
|
+
* When the selected `value` is changed, a `value-changed` event is triggered.
|
|
14316
|
+
*
|
|
14317
|
+
* ### Styling
|
|
14318
|
+
*
|
|
14319
|
+
* The following custom properties are available for styling:
|
|
14320
|
+
*
|
|
14321
|
+
* Custom property | Description | Default
|
|
14322
|
+
* -------------------------------|----------------------------|---------
|
|
14323
|
+
* `--vaadin-field-default-width` | Default width of the field | `12em`
|
|
14324
|
+
*
|
|
14325
|
+
* The following shadow DOM parts are available for styling:
|
|
14326
|
+
*
|
|
14327
|
+
* Part name | Description
|
|
14328
|
+
* ---------------------|----------------
|
|
14329
|
+
* `label` | The label element
|
|
14330
|
+
* `input-field` | The element that wraps prefix, value and buttons
|
|
14331
|
+
* `field-button` | Set on both clear and toggle buttons
|
|
14332
|
+
* `clear-button` | The clear button
|
|
14333
|
+
* `error-message` | The error message element
|
|
14334
|
+
* `helper-text` | The helper text element wrapper
|
|
14335
|
+
* `required-indicator` | The `required` state indicator element
|
|
14336
|
+
* `toggle-button` | The toggle button
|
|
14337
|
+
* `backdrop` | Backdrop of the overlay
|
|
14338
|
+
* `overlay` | The overlay container
|
|
14339
|
+
* `content` | The overlay content
|
|
14340
|
+
*
|
|
14341
|
+
* The following state attributes are available for styling:
|
|
14342
|
+
*
|
|
14343
|
+
* Attribute | Description
|
|
14344
|
+
* ---------------------|---------------------------------
|
|
14345
|
+
* `disabled` | Set when the element is disabled
|
|
14346
|
+
* `has-value` | Set when the element has a value
|
|
14347
|
+
* `has-label` | Set when the element has a label
|
|
14348
|
+
* `has-helper` | Set when the element has helper text or slot
|
|
14349
|
+
* `has-error-message` | Set when the element has an error message
|
|
14350
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
14351
|
+
* `invalid` | Set when the element is invalid
|
|
14352
|
+
* `focused` | Set when the element is focused
|
|
14353
|
+
* `focus-ring` | Set when the element is keyboard focused
|
|
14354
|
+
* `readonly` | Set when the element is readonly
|
|
14355
|
+
* `opened` | Set when the overlay is opened
|
|
14356
|
+
* `week-numbers` | Set when week numbers are shown in the calendar
|
|
14357
|
+
*
|
|
14358
|
+
* ### Internal components
|
|
14359
|
+
*
|
|
14360
|
+
* In addition to `<vaadin-date-picker>` itself, the following internal
|
|
14361
|
+
* components are themable:
|
|
14362
|
+
*
|
|
14363
|
+
* - `<vaadin-date-picker-overlay-content>`
|
|
14364
|
+
* - `<vaadin-date-picker-month-scroller>`
|
|
14365
|
+
* - `<vaadin-date-picker-year-scroller>`
|
|
14366
|
+
* - `<vaadin-date-picker-year>`
|
|
14367
|
+
* - `<vaadin-month-calendar>`
|
|
14368
|
+
*
|
|
14369
|
+
* In order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:
|
|
14412
14370
|
*
|
|
14413
|
-
*
|
|
14371
|
+
* Part name | Description
|
|
14372
|
+
* ----------------------|--------------------
|
|
14373
|
+
* `years-toggle-button` | Fullscreen mode years scroller toggle
|
|
14374
|
+
* `toolbar` | Toolbar with slotted buttons
|
|
14414
14375
|
*
|
|
14415
|
-
*
|
|
14416
|
-
* -----------------|-------------------------------------------
|
|
14417
|
-
* `backdrop` | Backdrop of the overlay
|
|
14418
|
-
* `overlay` | The overlay container
|
|
14419
|
-
* `content` | The overlay content
|
|
14376
|
+
* The following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:
|
|
14420
14377
|
*
|
|
14421
|
-
*
|
|
14378
|
+
* Attribute | Description
|
|
14379
|
+
* ----------------|-------------------------------------------------
|
|
14380
|
+
* `desktop` | Set when the overlay content is in desktop mode
|
|
14381
|
+
* `fullscreen` | Set when the overlay content is in fullscreen mode
|
|
14382
|
+
* `years-visible` | Set when the year scroller is visible in fullscreen mode
|
|
14422
14383
|
*
|
|
14423
|
-
*
|
|
14384
|
+
* In order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:
|
|
14424
14385
|
*
|
|
14425
|
-
*
|
|
14426
|
-
*
|
|
14427
|
-
*
|
|
14428
|
-
*
|
|
14429
|
-
*
|
|
14430
|
-
*
|
|
14386
|
+
* Part name | Description
|
|
14387
|
+
* ----------------------|--------------------
|
|
14388
|
+
* `month-header` | Month title
|
|
14389
|
+
* `weekdays` | Weekday container
|
|
14390
|
+
* `weekday` | Weekday element
|
|
14391
|
+
* `week-numbers` | Week numbers container
|
|
14392
|
+
* `week-number` | Week number element
|
|
14393
|
+
* `date` | Date element
|
|
14394
|
+
* `disabled` | Disabled date element
|
|
14395
|
+
* `focused` | Focused date element
|
|
14396
|
+
* `selected` | Selected date element
|
|
14397
|
+
* `today` | Date element corresponding to the current day
|
|
14398
|
+
* `past` | Date element corresponding to the date in the past
|
|
14399
|
+
* `future` | Date element corresponding to the date in the future
|
|
14431
14400
|
*
|
|
14432
|
-
*
|
|
14401
|
+
* In order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:
|
|
14433
14402
|
*
|
|
14434
|
-
*
|
|
14403
|
+
* Part name | Description
|
|
14404
|
+
* ----------------------|--------------------
|
|
14405
|
+
* `year-number` | Year number
|
|
14406
|
+
* `year-separator` | Year separator
|
|
14435
14407
|
*
|
|
14436
|
-
*
|
|
14408
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
14437
14409
|
*
|
|
14438
|
-
*
|
|
14439
|
-
* - `<vaadin-context-menu-list-box>` - has the same API as [`<vaadin-list-box>`](#/elements/vaadin-list-box).
|
|
14410
|
+
* ### Change events
|
|
14440
14411
|
*
|
|
14441
|
-
*
|
|
14442
|
-
*
|
|
14412
|
+
* Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,
|
|
14413
|
+
* the component can fire either a `change` event or an `unparsable-change` event:
|
|
14443
14414
|
*
|
|
14444
|
-
*
|
|
14445
|
-
*
|
|
14446
|
-
*
|
|
14415
|
+
* Value change | Event
|
|
14416
|
+
* :------------------------|:------------------
|
|
14417
|
+
* empty => parsable | change
|
|
14418
|
+
* empty => unparsable | unparsable-change
|
|
14419
|
+
* parsable => empty | change
|
|
14420
|
+
* parsable => parsable | change
|
|
14421
|
+
* parsable => unparsable | change
|
|
14422
|
+
* unparsable => empty | unparsable-change
|
|
14423
|
+
* unparsable => parsable | change
|
|
14424
|
+
* unparsable => unparsable | unparsable-change
|
|
14447
14425
|
*
|
|
14448
14426
|
* ## Attributes & Properties
|
|
14449
14427
|
*
|
|
14450
14428
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
14451
14429
|
*
|
|
14452
|
-
* - `
|
|
14453
|
-
*
|
|
14454
|
-
*
|
|
14455
|
-
*
|
|
14456
|
-
* -
|
|
14457
|
-
* - `
|
|
14458
|
-
*
|
|
14459
|
-
* - `
|
|
14460
|
-
* - `
|
|
14461
|
-
* - `
|
|
14462
|
-
*
|
|
14463
|
-
*
|
|
14464
|
-
* - `
|
|
14465
|
-
* -
|
|
14466
|
-
*
|
|
14430
|
+
* - `_positionTarget`: undefined
|
|
14431
|
+
* - `disabled`/`undefined`: Set when the element is disabled
|
|
14432
|
+
* - `has-value`/`undefined`: Set when the element has a value
|
|
14433
|
+
* - `has-label`/`undefined`: Set when the element has a label
|
|
14434
|
+
* - `has-helper`/`undefined`: Set when the element has helper text or slot
|
|
14435
|
+
* - `has-error-message`/`undefined`: Set when the element has an error message
|
|
14436
|
+
* - `has-tooltip`/`undefined`: Set when the element has a slotted tooltip
|
|
14437
|
+
* - `invalid`/`undefined`: Set when the element is invalid
|
|
14438
|
+
* - `focused`/`undefined`: Set when the element is focused
|
|
14439
|
+
* - `focus-ring`/`undefined`: Set when the element is keyboard focused
|
|
14440
|
+
* - `readonly`: Set when the element is readonly
|
|
14441
|
+
* - `opened`: Set when the overlay is opened
|
|
14442
|
+
* - `week-numbers`/`undefined`: Set when week numbers are shown in the calendar
|
|
14443
|
+
* - `<vaadin-date-picker>`/`undefined`: undefined
|
|
14444
|
+
* - `<vaadin-date-picker-overlay-content>`/`undefined`: undefined
|
|
14445
|
+
* - `<vaadin-date-picker-month-scroller>`/`undefined`: undefined
|
|
14446
|
+
* - `<vaadin-date-picker-year-scroller>`/`undefined`: undefined
|
|
14447
|
+
* - `<vaadin-date-picker-year>`/`undefined`: undefined
|
|
14448
|
+
* - `<vaadin-month-calendar>`/`undefined`: undefined
|
|
14449
|
+
* - `<vaadin-date-picker-overlay-content>`/`undefined`: undefined
|
|
14450
|
+
* - `years-toggle-button`/`undefined`: Fullscreen mode years scroller toggle
|
|
14451
|
+
* - `toolbar`/`undefined`: Toolbar with slotted buttons
|
|
14452
|
+
* - `_selectedDate`: The current selected date.
|
|
14453
|
+
* - `_focusedDate`: undefined
|
|
14454
|
+
* - `value`: Selected date.
|
|
14467
14455
|
*
|
|
14468
|
-
*
|
|
14469
|
-
* -
|
|
14470
|
-
* -
|
|
14471
|
-
*
|
|
14472
|
-
*
|
|
14473
|
-
*
|
|
14474
|
-
* - `
|
|
14475
|
-
* - `
|
|
14456
|
+
* Supported date formats:
|
|
14457
|
+
* - ISO 8601 `"YYYY-MM-DD"` (default)
|
|
14458
|
+
* - 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"`
|
|
14459
|
+
* - `initialPosition`: Date which should be visible when there is no value selected.
|
|
14460
|
+
*
|
|
14461
|
+
* The same date formats as for the `value` property are supported.
|
|
14462
|
+
* - `autoOpenDisabled`: Set true to prevent the overlay from opening automatically.
|
|
14463
|
+
* - `showWeekNumbers`: Set true to display ISO-8601 week numbers in the calendar. Notice that
|
|
14464
|
+
* displaying week numbers is only supported when `i18n.firstDayOfWeek`
|
|
14465
|
+
* is 1 (Monday).
|
|
14476
14466
|
* - `_fullscreen`: undefined
|
|
14477
14467
|
* - `_fullscreenMediaQuery`: undefined
|
|
14478
|
-
* - `
|
|
14479
|
-
* If a menu item has a non-empty `children` set, a sub-menu with the child items is opened
|
|
14480
|
-
* next to the parent menu on mouseover, tap or a right arrow keypress.
|
|
14468
|
+
* - `min`: The earliest date that can be selected. All earlier dates will be disabled.
|
|
14481
14469
|
*
|
|
14482
|
-
*
|
|
14470
|
+
* Supported date formats:
|
|
14471
|
+
* - ISO 8601 `"YYYY-MM-DD"` (default)
|
|
14472
|
+
* - 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"`
|
|
14473
|
+
* - `max`: The latest date that can be selected. All later dates will be disabled.
|
|
14483
14474
|
*
|
|
14484
|
-
*
|
|
14475
|
+
* Supported date formats:
|
|
14476
|
+
* - ISO 8601 `"YYYY-MM-DD"` (default)
|
|
14477
|
+
* - 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"`
|
|
14478
|
+
* - `isDateDisabled`: A function to be used to determine whether the user can select a given date.
|
|
14479
|
+
* Receives a `DatePickerDate` object of the date to be selected and should return a
|
|
14480
|
+
* boolean.
|
|
14481
|
+
* - `_minDate`: The earliest date that can be selected. All earlier dates will be disabled.
|
|
14482
|
+
* - `_maxDate`: The latest date that can be selected. All later dates will be disabled.
|
|
14483
|
+
* - `_noInput`: undefined
|
|
14484
|
+
* - `_ios`: undefined
|
|
14485
|
+
* - `_focusOverlayOnOpen`: undefined
|
|
14486
|
+
* - `_overlayContent`: undefined
|
|
14487
|
+
* - `__enteredDate`: undefined
|
|
14488
|
+
* - `i18n`: The object used to localize this component. To change the default
|
|
14489
|
+
* localization, replace this with an object that provides all properties, or
|
|
14490
|
+
* just the individual properties you want to change.
|
|
14485
14491
|
*
|
|
14486
|
-
*
|
|
14487
|
-
*
|
|
14488
|
-
*
|
|
14489
|
-
*
|
|
14490
|
-
*
|
|
14491
|
-
*
|
|
14492
|
-
*
|
|
14493
|
-
*
|
|
14494
|
-
*
|
|
14495
|
-
*
|
|
14496
|
-
*
|
|
14497
|
-
*
|
|
14498
|
-
*
|
|
14499
|
-
*
|
|
14500
|
-
*
|
|
14501
|
-
*
|
|
14502
|
-
*
|
|
14503
|
-
*
|
|
14504
|
-
* - `
|
|
14492
|
+
* Should be overridden by subclasses to provide a custom JSDoc with the
|
|
14493
|
+
* default I18N properties.
|
|
14494
|
+
* - `__effectiveI18n`: undefined
|
|
14495
|
+
* - `allowedCharPattern`: A pattern matched against individual characters the user inputs.
|
|
14496
|
+
*
|
|
14497
|
+
* When set, the field will prevent:
|
|
14498
|
+
* - `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`
|
|
14499
|
+
* - `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`
|
|
14500
|
+
* - `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`
|
|
14501
|
+
*
|
|
14502
|
+
* For example, to allow entering only numbers and minus signs, use:
|
|
14503
|
+
* `allowedCharPattern = "[\\d-]"`
|
|
14504
|
+
* - `autoselect`: If true, the input text gets fully selected when the field is focused using click or touch / tap.
|
|
14505
|
+
* - `name`: The name of this field.
|
|
14506
|
+
* - `placeholder`: A hint to the user of what can be entered in the field.
|
|
14507
|
+
* - `title`: The text usually displayed in a tooltip popup when the mouse is over the field.
|
|
14508
|
+
* - `ariaTarget`: A target element to which ARIA attributes are set.
|
|
14509
|
+
* - `errorMessage`: Error to show when the field is invalid.
|
|
14510
|
+
* - `helperText`: String used for the helper text.
|
|
14511
|
+
* - `accessibleName`: String used to label the component to screen reader users.
|
|
14512
|
+
* - `accessibleNameRef`: Id of the element used as label of the component to screen reader users.
|
|
14513
|
+
* - `clearButtonVisible`: Set to true to display the clear icon which clears the input.
|
|
14514
|
+
*
|
|
14515
|
+
* It is up to the component to choose where to place the clear icon:
|
|
14516
|
+
* in the Shadow DOM or in the light DOM. In any way, a reference to
|
|
14517
|
+
* the clear icon element should be provided via the `clearElement` getter.
|
|
14505
14518
|
* - `dir`: undefined
|
|
14506
|
-
* - `
|
|
14507
|
-
* - `
|
|
14508
|
-
* - `
|
|
14509
|
-
* - `
|
|
14510
|
-
* - `
|
|
14519
|
+
* - `_inputElementValue`: undefined (property only)
|
|
14520
|
+
* - `_boundOnClick`: undefined (property only)
|
|
14521
|
+
* - `_boundOnScroll`: undefined (property only)
|
|
14522
|
+
* - `_boundOnPaste`: undefined (property only)
|
|
14523
|
+
* - `_boundOnDrop`: undefined (property only)
|
|
14524
|
+
* - `_boundOnBeforeInput`: undefined (property only)
|
|
14525
|
+
* - `_fieldAriaController`: undefined (property only)
|
|
14526
|
+
* - `_helperController`: undefined (property only)
|
|
14527
|
+
* - `_errorController`: undefined (property only)
|
|
14511
14528
|
*
|
|
14512
14529
|
* ## Events
|
|
14513
14530
|
*
|
|
14514
14531
|
* Events that will be emitted by the component.
|
|
14515
14532
|
*
|
|
14533
|
+
* - `change`: Fired when the user commits a value change.
|
|
14534
|
+
* - `unparsable-change`: Fired when the user commits an unparsable value change and there is no change event.
|
|
14535
|
+
* - `invalid-changed`: Fired when the `invalid` property changes.
|
|
14516
14536
|
* - `opened-changed`: Fired when the `opened` property changes.
|
|
14517
|
-
* - `
|
|
14518
|
-
* - `
|
|
14519
|
-
* - `
|
|
14520
|
-
*
|
|
14521
|
-
*
|
|
14522
|
-
*
|
|
14523
|
-
*
|
|
14524
|
-
*
|
|
14525
|
-
*
|
|
14526
|
-
*
|
|
14527
|
-
* - `
|
|
14528
|
-
*
|
|
14529
|
-
*
|
|
14530
|
-
*
|
|
14531
|
-
* - `
|
|
14532
|
-
* - `
|
|
14533
|
-
* - `
|
|
14534
|
-
* - `getOrCreateMap(name) => void`: undefined
|
|
14535
|
-
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
14536
|
-
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
14537
|
-
*
|
|
14538
|
-
* ## CSS Custom Properties
|
|
14539
|
-
*
|
|
14540
|
-
* CSS variables available for styling the component.
|
|
14541
|
-
*
|
|
14542
|
-
* - `--vaadin-context-menu-offset-top`: Used as an offset when using `position` and the context menu is aligned vertically below the target (default: `undefined`)
|
|
14543
|
-
* - `--vaadin-context-menu-offset-bottom`: Used as an offset when using `position` and the context menu is aligned vertically above the target (default: `undefined`)
|
|
14544
|
-
* - `--vaadin-context-menu-offset-start`: Used as an offset when using `position` and the context menu is aligned horizontally after the target (default: `undefined`)
|
|
14545
|
-
* - `--vaadin-context-menu-offset-end`: Used as an offset when using `position` and the context menu is aligned horizontally before the target (default: `undefined`)
|
|
14546
|
-
* - `items`: undefined (default: `undefined`)
|
|
14547
|
-
* - `<vaadin-context-menu-item>`: undefined (default: `undefined`)
|
|
14548
|
-
* - `<vaadin-item>`: undefined (default: `undefined`)
|
|
14549
|
-
* - `<vaadin-context-menu-list-box>`: undefined (default: `undefined`)
|
|
14550
|
-
* - `<vaadin-list-box>`: undefined (default: `undefined`)
|
|
14551
|
-
* - `<vaadin-context-menu-item>`: undefined (default: `undefined`)
|
|
14552
|
-
* - `<vaadin-item>`: undefined (default: `undefined`)
|
|
14553
|
-
* - `expanded`: Expanded parent item. (default: `undefined`)
|
|
14537
|
+
* - `value-changed`: Fired when the `value` property changes.
|
|
14538
|
+
* - `validated`: Fired whenever the field is validated.
|
|
14539
|
+
* - `undefined`: undefined
|
|
14540
|
+
*
|
|
14541
|
+
* ## Methods
|
|
14542
|
+
*
|
|
14543
|
+
* Methods that can be called to access component functionality.
|
|
14544
|
+
*
|
|
14545
|
+
* - `open() => void`: Opens the dropdown.
|
|
14546
|
+
* - `close() => void`: Closes the dropdown.
|
|
14547
|
+
* - `checkValidity() => boolean`: Returns true if the current input value satisfies all constraints (if any)
|
|
14548
|
+
*
|
|
14549
|
+
* Override the `checkValidity` method for custom validations.
|
|
14550
|
+
* - `createProperty(name, options) => void`: undefined
|
|
14551
|
+
* - `getOrCreateMap(name) => void`: undefined
|
|
14552
|
+
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
14553
|
+
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
14554
14554
|
*/
|
|
14555
|
-
"vaadin-
|
|
14556
|
-
|
|
14555
|
+
"vaadin-date-picker": Partial<
|
|
14556
|
+
DatePickerProps & BaseProps<DatePicker> & BaseEvents
|
|
14557
14557
|
>;
|
|
14558
14558
|
|
|
14559
14559
|
/**
|
|
@@ -20905,459 +20905,207 @@ export type CustomElementsSolidJs = {
|
|
|
20905
20905
|
* fixed value for determining the open direction.
|
|
20906
20906
|
* - `opened`: When true, the overlay is visible and attached to body.
|
|
20907
20907
|
* - `owner`: Owner element passed with renderer function
|
|
20908
|
-
* - `model`: Object with properties that is passed to `renderer` function
|
|
20909
|
-
* - `renderer`: Custom function for rendering the content of the overlay.
|
|
20910
|
-
* Receives three arguments:
|
|
20911
|
-
*
|
|
20912
|
-
* - `root` The root container DOM element. Append your content to it.
|
|
20913
|
-
* - `owner` The host element of the renderer function.
|
|
20914
|
-
* - `model` The object with the properties related with rendering.
|
|
20915
|
-
* - `modeless`: When true the overlay won't disable the main content, showing
|
|
20916
|
-
* it doesn't change the functionality of the user interface.
|
|
20917
|
-
* - `hidden`: When set to true, the overlay is hidden. This also closes the overlay
|
|
20918
|
-
* immediately in case there is a closing animation in progress.
|
|
20919
|
-
* - `withBackdrop`: When true the overlay has backdrop on top of content when opened.
|
|
20920
|
-
* - `focusTrap`: When true, opening the overlay moves focus to the first focusable child,
|
|
20921
|
-
* or to the overlay part with tabindex if there are no focusable children.
|
|
20922
|
-
* - `restoreFocusOnClose`: Set to true to enable restoring of focus when overlay is closed.
|
|
20923
|
-
* - `restoreFocusNode`: Set to specify the element which should be focused on overlay close,
|
|
20924
|
-
* if `restoreFocusOnClose` is set to true.
|
|
20925
|
-
* - `dir`: undefined
|
|
20926
|
-
* - `_boundMouseDownListener`: undefined (property only)
|
|
20927
|
-
* - `_boundMouseUpListener`: undefined (property only)
|
|
20928
|
-
* - `_boundOutsideClickListener`: undefined (property only)
|
|
20929
|
-
* - `_boundKeydownListener`: undefined (property only)
|
|
20930
|
-
* - `__focusTrapController`: undefined (property only)
|
|
20931
|
-
* - `__focusRestorationController`: undefined (property only)
|
|
20932
|
-
*
|
|
20933
|
-
* ## Events
|
|
20934
|
-
*
|
|
20935
|
-
* Events that will be emitted by the component.
|
|
20936
|
-
*
|
|
20937
|
-
* - `vaadin-overlay-closed`: undefined
|
|
20938
|
-
* - `vaadin-overlay-closing`: undefined
|
|
20939
|
-
* - `undefined`: undefined
|
|
20940
|
-
*
|
|
20941
|
-
* ## Methods
|
|
20942
|
-
*
|
|
20943
|
-
* Methods that can be called to access component functionality.
|
|
20944
|
-
*
|
|
20945
|
-
* - `_updatePosition() => void`: undefined
|
|
20946
|
-
* - `__shouldAlignStartHorizontally(targetRect, rtl) => void`: undefined
|
|
20947
|
-
* - `__shouldAlignStartVertically(targetRect) => void`: undefined
|
|
20948
|
-
* - `__shouldAlignStart(targetRect, contentSize, viewportSize, margins, defaultAlignStart, noOverlap, propNames) => void`: undefined
|
|
20949
|
-
* - `__adjustBottomProperty(cssPropNameToSet, propNames, currentValue) => void`: Returns an adjusted value after resizing the browser window,
|
|
20950
|
-
* to avoid wrong calculations when e.g. previously set `bottom`
|
|
20951
|
-
* CSS property value is larger than the updated viewport height.
|
|
20952
|
-
* See https://github.com/vaadin/web-components/issues/4604
|
|
20953
|
-
* - `__calculatePositionInOneDimension(targetRect, overlayRect, noOverlap, propNames, overlay, shouldAlignStart) => void`: Returns an object with CSS position properties to set,
|
|
20954
|
-
* e.g. { top: "100px" }
|
|
20955
|
-
* - `requestContentUpdate() => void`: Requests an update for the content of the overlay.
|
|
20956
|
-
* While performing the update, it invokes the renderer passed in the `renderer` property.
|
|
20957
|
-
*
|
|
20958
|
-
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
20959
|
-
* - `close(sourceEvent: Event=) => void`: undefined
|
|
20960
|
-
* - `setBounds(bounds: !OverlayBoundsParam, absolute: boolean = true) => void`: Updates the coordinates of the overlay.
|
|
20961
|
-
* - `bringToFront() => void`: Brings the overlay as visually the frontmost one.
|
|
20962
|
-
* - `createProperty(name, options) => void`: undefined
|
|
20963
|
-
* - `getOrCreateMap(name) => void`: undefined
|
|
20964
|
-
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
20965
|
-
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
20966
|
-
*/
|
|
20967
|
-
"vaadin-combo-box-overlay": Partial<
|
|
20968
|
-
ComboBoxOverlayProps &
|
|
20969
|
-
ComboBoxOverlaySolidJsProps &
|
|
20970
|
-
BaseProps<ComboBoxOverlay> &
|
|
20971
|
-
BaseEvents
|
|
20972
|
-
>;
|
|
20973
|
-
|
|
20974
|
-
/**
|
|
20975
|
-
* An element used internally by `<vaadin-combo-box>`. Not intended to be used separately.
|
|
20976
|
-
*
|
|
20977
|
-
* ## Attributes & Properties
|
|
20978
|
-
*
|
|
20979
|
-
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
20980
|
-
*
|
|
20981
|
-
* - `items`: A full set of items to filter the visible options from.
|
|
20982
|
-
* Set to an empty array when combo-box is not opened.
|
|
20983
|
-
* - `focusedIndex`: Index of an item that has focus outline and is scrolled into view.
|
|
20984
|
-
* The actual focus still remains in the input field.
|
|
20985
|
-
* - `loading`: Set to true while combo-box fetches new page from the data provider.
|
|
20986
|
-
* - `opened`: Whether the combo-box is currently opened or not. If set to false,
|
|
20987
|
-
* calling `scrollIntoView` does not have any effect.
|
|
20988
|
-
* - `selectedItem`: The selected item from the `items` array.
|
|
20989
|
-
* - `itemClassNameGenerator`: A function used to generate CSS class names for dropdown
|
|
20990
|
-
* items based on the item. The return value should be the
|
|
20991
|
-
* generated class name as a string, or multiple class names
|
|
20992
|
-
* separated by whitespace characters.
|
|
20993
|
-
* - `itemIdPath`: Path for the id of the item, used to detect whether the item is selected.
|
|
20994
|
-
* - `owner`: Reference to the owner (combo-box owner), used by the item elements.
|
|
20995
|
-
* - `getItemLabel`: Function used to set a label for every combo-box item.
|
|
20996
|
-
* - `renderer`: Function used to render the content of every combo-box item.
|
|
20997
|
-
* - `theme`: Used to propagate the `theme` attribute from the host element.
|
|
20998
|
-
* - `__boundOnItemClick`: undefined (property only)
|
|
20999
|
-
*
|
|
21000
|
-
* ## Events
|
|
21001
|
-
*
|
|
21002
|
-
* Events that will be emitted by the component.
|
|
21003
|
-
*
|
|
21004
|
-
* - `selection-changed`: undefined
|
|
21005
|
-
* - `index-requested`: undefined
|
|
21006
|
-
* - `undefined`: undefined
|
|
21007
|
-
*
|
|
21008
|
-
* ## Methods
|
|
21009
|
-
*
|
|
21010
|
-
* Methods that can be called to access component functionality.
|
|
21011
|
-
*
|
|
21012
|
-
* - `requestContentUpdate() => void`: Updates the virtualizer's size and items.
|
|
21013
|
-
* - `scrollIntoView(index: number) => void`: Scrolls an item at given index into view and adjusts `scrollTop`
|
|
21014
|
-
* so that the element gets fully visible on Arrow Down key press.
|
|
21015
|
-
* - `createProperty(name, options) => void`: undefined
|
|
21016
|
-
* - `getOrCreateMap(name) => void`: undefined
|
|
21017
|
-
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
21018
|
-
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
21019
|
-
*/
|
|
21020
|
-
"vaadin-combo-box-scroller": Partial<
|
|
21021
|
-
ComboBoxScrollerProps &
|
|
21022
|
-
ComboBoxScrollerSolidJsProps &
|
|
21023
|
-
BaseProps<ComboBoxScroller> &
|
|
21024
|
-
BaseEvents
|
|
21025
|
-
>;
|
|
21026
|
-
|
|
21027
|
-
/**
|
|
21028
|
-
* `<vaadin-combo-box>` is a web component for choosing a value from a filterable list of options
|
|
21029
|
-
* presented in a dropdown overlay. The options can be provided as a list of strings or objects
|
|
21030
|
-
* by setting [`items`](#/elements/vaadin-combo-box#property-items) property on the element.
|
|
21031
|
-
*
|
|
21032
|
-
* ```html
|
|
21033
|
-
* <vaadin-combo-box id="combo-box"></vaadin-combo-box>
|
|
21034
|
-
* ```
|
|
21035
|
-
*
|
|
21036
|
-
* ```js
|
|
21037
|
-
* document.querySelector('#combo-box').items = ['apple', 'orange', 'banana'];
|
|
21038
|
-
* ```
|
|
21039
|
-
*
|
|
21040
|
-
* When the selected `value` is changed, a `value-changed` event is triggered.
|
|
21041
|
-
*
|
|
21042
|
-
* ### Item rendering
|
|
21043
|
-
*
|
|
21044
|
-
* To customize the content of the `<vaadin-combo-box-item>` elements placed in the dropdown, use
|
|
21045
|
-
* [`renderer`](#/elements/vaadin-combo-box#property-renderer) property which accepts a function.
|
|
21046
|
-
* The renderer function is called with `root`, `comboBox`, and `model` as arguments.
|
|
21047
|
-
*
|
|
21048
|
-
* Generate DOM content by using `model` object properties if needed, and append it to the `root`
|
|
21049
|
-
* element. The `comboBox` reference is provided to access the combo-box element state. Do not
|
|
21050
|
-
* set combo-box properties in a `renderer` function.
|
|
21051
|
-
*
|
|
21052
|
-
* ```js
|
|
21053
|
-
* const comboBox = document.querySelector('#combo-box');
|
|
21054
|
-
* comboBox.items = [{'label': 'Hydrogen', 'value': 'H'}];
|
|
21055
|
-
* comboBox.renderer = (root, comboBox, model) => {
|
|
21056
|
-
* const item = model.item;
|
|
21057
|
-
* root.innerHTML = `${model.index}: ${item.label} <b>${item.value}</b>`;
|
|
21058
|
-
* };
|
|
21059
|
-
* ```
|
|
21060
|
-
*
|
|
21061
|
-
* Renderer is called on the opening of the combo-box and each time the related model is updated.
|
|
21062
|
-
* Before creating new content, it is recommended to check if there is already an existing DOM
|
|
21063
|
-
* element in `root` from a previous renderer call for reusing it. Even though combo-box uses
|
|
21064
|
-
* infinite scrolling, reducing DOM operations might improve performance.
|
|
21065
|
-
*
|
|
21066
|
-
* The following properties are available in the `model` argument:
|
|
21067
|
-
*
|
|
21068
|
-
* Property | Type | Description
|
|
21069
|
-
* -----------|------------------|-------------
|
|
21070
|
-
* `index` | Number | Index of the item in the `items` array
|
|
21071
|
-
* `item` | String or Object | The item reference
|
|
21072
|
-
* `selected` | Boolean | True when item is selected
|
|
21073
|
-
* `focused` | Boolean | True when item is focused
|
|
21074
|
-
*
|
|
21075
|
-
* ### Lazy Loading with Function Data Provider
|
|
21076
|
-
*
|
|
21077
|
-
* In addition to assigning an array to the items property, you can alternatively use the
|
|
21078
|
-
* [`dataProvider`](#/elements/vaadin-combo-box#property-dataProvider) function property.
|
|
21079
|
-
* The `<vaadin-combo-box>` calls this function lazily, only when it needs more data
|
|
21080
|
-
* to be displayed.
|
|
21081
|
-
*
|
|
21082
|
-
* __Note that when using function data providers, the total number of items
|
|
21083
|
-
* needs to be set manually. The total number of items can be returned
|
|
21084
|
-
* in the second argument of the data provider callback:__
|
|
21085
|
-
*
|
|
21086
|
-
* ```js
|
|
21087
|
-
* comboBox.dataProvider = async (params, callback) => {
|
|
21088
|
-
* const API = 'https://demo.vaadin.com/demo-data/1.0/filtered-countries';
|
|
21089
|
-
* const { filter, page, pageSize } = params;
|
|
21090
|
-
* const index = page * pageSize;
|
|
21091
|
-
*
|
|
21092
|
-
* const res = await fetch(`${API}?index=${index}&count=${pageSize}&filter=${filter}`);
|
|
21093
|
-
* if (res.ok) {
|
|
21094
|
-
* const { result, size } = await res.json();
|
|
21095
|
-
* callback(result, size);
|
|
21096
|
-
* }
|
|
21097
|
-
* };
|
|
21098
|
-
* ```
|
|
21099
|
-
*
|
|
21100
|
-
* ### Styling
|
|
21101
|
-
*
|
|
21102
|
-
* The following custom properties are available for styling:
|
|
21103
|
-
*
|
|
21104
|
-
* Custom property | Description | Default
|
|
21105
|
-
* ----------------------------------------|----------------------------|---------
|
|
21106
|
-
* `--vaadin-field-default-width` | Default width of the field | `12em`
|
|
21107
|
-
* `--vaadin-combo-box-overlay-width` | Width of the overlay | `auto`
|
|
21108
|
-
* `--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`
|
|
21109
|
-
*
|
|
21110
|
-
* The following shadow DOM parts are available for styling:
|
|
21111
|
-
*
|
|
21112
|
-
* Part name | Description
|
|
21113
|
-
* ---------------------|----------------
|
|
21114
|
-
* `label` | The label element
|
|
21115
|
-
* `input-field` | The element that wraps prefix, value and buttons
|
|
21116
|
-
* `field-button` | Set on both clear and toggle buttons
|
|
21117
|
-
* `clear-button` | The clear button
|
|
21118
|
-
* `error-message` | The error message element
|
|
21119
|
-
* `helper-text` | The helper text element wrapper
|
|
21120
|
-
* `required-indicator` | The `required` state indicator element
|
|
21121
|
-
* `toggle-button` | The toggle button
|
|
21122
|
-
* `overlay` | The overlay container
|
|
21123
|
-
* `content` | The overlay content
|
|
21124
|
-
* `loader` | The loading indicator shown while loading items
|
|
21125
|
-
*
|
|
21126
|
-
* The following state attributes are available for styling:
|
|
21127
|
-
*
|
|
21128
|
-
* Attribute | Description
|
|
21129
|
-
* ---------------------|---------------------------------
|
|
21130
|
-
* `disabled` | Set when the element is disabled
|
|
21131
|
-
* `has-value` | Set when the element has a value
|
|
21132
|
-
* `has-label` | Set when the element has a label
|
|
21133
|
-
* `has-helper` | Set when the element has helper text or slot
|
|
21134
|
-
* `has-error-message` | Set when the element has an error message
|
|
21135
|
-
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
21136
|
-
* `invalid` | Set when the element is invalid
|
|
21137
|
-
* `focused` | Set when the element is focused
|
|
21138
|
-
* `focus-ring` | Set when the element is keyboard focused
|
|
21139
|
-
* `readonly` | Set when the element is readonly
|
|
21140
|
-
* `opened` | Set when the overlay is opened
|
|
21141
|
-
* `loading` | Set when loading items from the data provider
|
|
21142
|
-
*
|
|
21143
|
-
* ### Internal components
|
|
20908
|
+
* - `model`: Object with properties that is passed to `renderer` function
|
|
20909
|
+
* - `renderer`: Custom function for rendering the content of the overlay.
|
|
20910
|
+
* Receives three arguments:
|
|
21144
20911
|
*
|
|
21145
|
-
*
|
|
21146
|
-
*
|
|
20912
|
+
* - `root` The root container DOM element. Append your content to it.
|
|
20913
|
+
* - `owner` The host element of the renderer function.
|
|
20914
|
+
* - `model` The object with the properties related with rendering.
|
|
20915
|
+
* - `modeless`: When true the overlay won't disable the main content, showing
|
|
20916
|
+
* it doesn't change the functionality of the user interface.
|
|
20917
|
+
* - `hidden`: When set to true, the overlay is hidden. This also closes the overlay
|
|
20918
|
+
* immediately in case there is a closing animation in progress.
|
|
20919
|
+
* - `withBackdrop`: When true the overlay has backdrop on top of content when opened.
|
|
20920
|
+
* - `focusTrap`: When true, opening the overlay moves focus to the first focusable child,
|
|
20921
|
+
* or to the overlay part with tabindex if there are no focusable children.
|
|
20922
|
+
* - `restoreFocusOnClose`: Set to true to enable restoring of focus when overlay is closed.
|
|
20923
|
+
* - `restoreFocusNode`: Set to specify the element which should be focused on overlay close,
|
|
20924
|
+
* if `restoreFocusOnClose` is set to true.
|
|
20925
|
+
* - `dir`: undefined
|
|
20926
|
+
* - `_boundMouseDownListener`: undefined (property only)
|
|
20927
|
+
* - `_boundMouseUpListener`: undefined (property only)
|
|
20928
|
+
* - `_boundOutsideClickListener`: undefined (property only)
|
|
20929
|
+
* - `_boundKeydownListener`: undefined (property only)
|
|
20930
|
+
* - `__focusTrapController`: undefined (property only)
|
|
20931
|
+
* - `__focusRestorationController`: undefined (property only)
|
|
21147
20932
|
*
|
|
21148
|
-
*
|
|
20933
|
+
* ## Events
|
|
21149
20934
|
*
|
|
21150
|
-
*
|
|
20935
|
+
* Events that will be emitted by the component.
|
|
21151
20936
|
*
|
|
21152
|
-
*
|
|
20937
|
+
* - `vaadin-overlay-closed`: undefined
|
|
20938
|
+
* - `vaadin-overlay-closing`: undefined
|
|
20939
|
+
* - `undefined`: undefined
|
|
21153
20940
|
*
|
|
21154
|
-
*
|
|
20941
|
+
* ## Methods
|
|
21155
20942
|
*
|
|
21156
|
-
*
|
|
21157
|
-
* - `disabled`/`undefined`: Set when the element is disabled
|
|
21158
|
-
* - `has-value`/`undefined`: Set when the element has a value
|
|
21159
|
-
* - `has-label`/`undefined`: Set when the element has a label
|
|
21160
|
-
* - `has-helper`/`undefined`: Set when the element has helper text or slot
|
|
21161
|
-
* - `has-error-message`/`undefined`: Set when the element has an error message
|
|
21162
|
-
* - `has-tooltip`/`undefined`: Set when the element has a slotted tooltip
|
|
21163
|
-
* - `invalid`/`undefined`: Set when the element is invalid
|
|
21164
|
-
* - `focused`/`undefined`: Set when the element is focused
|
|
21165
|
-
* - `focus-ring`/`undefined`: Set when the element is keyboard focused
|
|
21166
|
-
* - `readonly`: Set when the element is readonly
|
|
21167
|
-
* - `opened`: Set when the overlay is opened
|
|
21168
|
-
* - `loading`: Set when loading items from the data provider
|
|
21169
|
-
* - `<vaadin-combo-box>`/`undefined`: undefined
|
|
21170
|
-
* - `<vaadin-combo-box-item>`/`undefined`: undefined
|
|
21171
|
-
* - `<vaadin-item>`/`undefined`: undefined
|
|
21172
|
-
* - `pageSize`: Number of items fetched at a time from the dataprovider.
|
|
21173
|
-
* - `size`: Total number of items.
|
|
21174
|
-
* - `dataProvider`: Function that provides items lazily. Receives arguments `params`, `callback`
|
|
20943
|
+
* Methods that can be called to access component functionality.
|
|
21175
20944
|
*
|
|
21176
|
-
* `
|
|
20945
|
+
* - `_updatePosition() => void`: undefined
|
|
20946
|
+
* - `__shouldAlignStartHorizontally(targetRect, rtl) => void`: undefined
|
|
20947
|
+
* - `__shouldAlignStartVertically(targetRect) => void`: undefined
|
|
20948
|
+
* - `__shouldAlignStart(targetRect, contentSize, viewportSize, margins, defaultAlignStart, noOverlap, propNames) => void`: undefined
|
|
20949
|
+
* - `__adjustBottomProperty(cssPropNameToSet, propNames, currentValue) => void`: Returns an adjusted value after resizing the browser window,
|
|
20950
|
+
* to avoid wrong calculations when e.g. previously set `bottom`
|
|
20951
|
+
* CSS property value is larger than the updated viewport height.
|
|
20952
|
+
* See https://github.com/vaadin/web-components/issues/4604
|
|
20953
|
+
* - `__calculatePositionInOneDimension(targetRect, overlayRect, noOverlap, propNames, overlay, shouldAlignStart) => void`: Returns an object with CSS position properties to set,
|
|
20954
|
+
* e.g. { top: "100px" }
|
|
20955
|
+
* - `requestContentUpdate() => void`: Requests an update for the content of the overlay.
|
|
20956
|
+
* While performing the update, it invokes the renderer passed in the `renderer` property.
|
|
21177
20957
|
*
|
|
21178
|
-
*
|
|
20958
|
+
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
20959
|
+
* - `close(sourceEvent: Event=) => void`: undefined
|
|
20960
|
+
* - `setBounds(bounds: !OverlayBoundsParam, absolute: boolean = true) => void`: Updates the coordinates of the overlay.
|
|
20961
|
+
* - `bringToFront() => void`: Brings the overlay as visually the frontmost one.
|
|
20962
|
+
* - `createProperty(name, options) => void`: undefined
|
|
20963
|
+
* - `getOrCreateMap(name) => void`: undefined
|
|
20964
|
+
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
20965
|
+
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
20966
|
+
*/
|
|
20967
|
+
"vaadin-combo-box-overlay": Partial<
|
|
20968
|
+
ComboBoxOverlayProps &
|
|
20969
|
+
ComboBoxOverlaySolidJsProps &
|
|
20970
|
+
BaseProps<ComboBoxOverlay> &
|
|
20971
|
+
BaseEvents
|
|
20972
|
+
>;
|
|
20973
|
+
|
|
20974
|
+
/**
|
|
20975
|
+
* An element used internally by `<vaadin-combo-box>`. Not intended to be used separately.
|
|
21179
20976
|
*
|
|
21180
|
-
*
|
|
20977
|
+
* ## Attributes & Properties
|
|
21181
20978
|
*
|
|
21182
|
-
*
|
|
21183
|
-
* - `items` Current page of items
|
|
21184
|
-
* - `size` Total number of items.
|
|
21185
|
-
* - `renderer`: Custom function for rendering the content of every item.
|
|
21186
|
-
* Receives three arguments:
|
|
20979
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
21187
20980
|
*
|
|
21188
|
-
* - `
|
|
21189
|
-
*
|
|
21190
|
-
* - `
|
|
21191
|
-
*
|
|
21192
|
-
*
|
|
21193
|
-
*
|
|
21194
|
-
*
|
|
21195
|
-
* `value` property will be set to the input value in this case.
|
|
21196
|
-
* Also, when `value` is set programmatically, the input value will be set
|
|
21197
|
-
* to reflect that value.
|
|
20981
|
+
* - `items`: A full set of items to filter the visible options from.
|
|
20982
|
+
* Set to an empty array when combo-box is not opened.
|
|
20983
|
+
* - `focusedIndex`: Index of an item that has focus outline and is scrolled into view.
|
|
20984
|
+
* The actual focus still remains in the input field.
|
|
20985
|
+
* - `loading`: Set to true while combo-box fetches new page from the data provider.
|
|
20986
|
+
* - `opened`: Whether the combo-box is currently opened or not. If set to false,
|
|
20987
|
+
* calling `scrollIntoView` does not have any effect.
|
|
21198
20988
|
* - `selectedItem`: The selected item from the `items` array.
|
|
21199
20989
|
* - `itemClassNameGenerator`: A function used to generate CSS class names for dropdown
|
|
21200
20990
|
* items based on the item. The return value should be the
|
|
21201
20991
|
* generated class name as a string, or multiple class names
|
|
21202
20992
|
* separated by whitespace characters.
|
|
21203
|
-
* - `itemIdPath`: Path for the id of the item
|
|
21204
|
-
*
|
|
21205
|
-
*
|
|
21206
|
-
* `
|
|
21207
|
-
* - `
|
|
21208
|
-
* - `
|
|
21209
|
-
* The items can be of either `String` or `Object` type.
|
|
21210
|
-
* - `filteredItems`: A subset of items, filtered based on the user input. Filtered items
|
|
21211
|
-
* can be assigned directly to omit the internal filtering functionality.
|
|
21212
|
-
* The items can be of either `String` or `Object` type.
|
|
21213
|
-
* - `filter`: Filtering string the user has typed into the input field.
|
|
21214
|
-
* - `itemLabelGenerator`: A function that is used to generate the label for dropdown
|
|
21215
|
-
* items based on the item. Receives one argument:
|
|
21216
|
-
* - `item` The item to generate the label for.
|
|
21217
|
-
* - `itemLabelPath`: Path for label of the item. If `items` is an array of objects, the
|
|
21218
|
-
* `itemLabelPath` is used to fetch the displayed string label for each
|
|
21219
|
-
* item.
|
|
21220
|
-
*
|
|
21221
|
-
* The item label is also used for matching items when processing user
|
|
21222
|
-
* input, i.e., for filtering and selecting items.
|
|
21223
|
-
* - `itemValuePath`: Path for the value of the item. If `items` is an array of objects, the
|
|
21224
|
-
* `itemValuePath:` is used to fetch the string value for the selected
|
|
21225
|
-
* item.
|
|
21226
|
-
*
|
|
21227
|
-
* The item value is used in the `value` property of the combo box,
|
|
21228
|
-
* to provide the form value.
|
|
21229
|
-
* - `autoOpenDisabled`: Set true to prevent the overlay from opening automatically.
|
|
21230
|
-
* - `_focusedIndex`: undefined
|
|
21231
|
-
* - `_toggleElement`: undefined
|
|
21232
|
-
* - `_dropdownItems`: Set of items to be rendered in the dropdown.
|
|
21233
|
-
* - `_overlayOpened`: Whether the overlay should be opened.
|
|
21234
|
-
* - `pattern`: A regular expression that the value is checked against.
|
|
21235
|
-
* The pattern must match the entire value, not just some subset.
|
|
21236
|
-
* - `allowedCharPattern`: A pattern matched against individual characters the user inputs.
|
|
21237
|
-
*
|
|
21238
|
-
* When set, the field will prevent:
|
|
21239
|
-
* - `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`
|
|
21240
|
-
* - `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`
|
|
21241
|
-
* - `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`
|
|
21242
|
-
*
|
|
21243
|
-
* For example, to allow entering only numbers and minus signs, use:
|
|
21244
|
-
* `allowedCharPattern = "[\\d-]"`
|
|
21245
|
-
* - `autoselect`: If true, the input text gets fully selected when the field is focused using click or touch / tap.
|
|
21246
|
-
* - `name`: The name of this field.
|
|
21247
|
-
* - `placeholder`: A hint to the user of what can be entered in the field.
|
|
21248
|
-
* - `title`: The text usually displayed in a tooltip popup when the mouse is over the field.
|
|
21249
|
-
* - `ariaTarget`: A target element to which ARIA attributes are set.
|
|
21250
|
-
* - `errorMessage`: Error to show when the field is invalid.
|
|
21251
|
-
* - `helperText`: String used for the helper text.
|
|
21252
|
-
* - `accessibleName`: String used to label the component to screen reader users.
|
|
21253
|
-
* - `accessibleNameRef`: Id of the element used as label of the component to screen reader users.
|
|
21254
|
-
* - `clearButtonVisible`: Set to true to display the clear icon which clears the input.
|
|
21255
|
-
*
|
|
21256
|
-
* It is up to the component to choose where to place the clear icon:
|
|
21257
|
-
* in the Shadow DOM or in the light DOM. In any way, a reference to
|
|
21258
|
-
* the clear icon element should be provided via the `clearElement` getter.
|
|
21259
|
-
* - `dir`: undefined
|
|
21260
|
-
* - `_boundOverlaySelectedItemChanged`: undefined (property only)
|
|
21261
|
-
* - `_boundOnClearButtonMouseDown`: undefined (property only)
|
|
21262
|
-
* - `_boundOnClick`: undefined (property only)
|
|
21263
|
-
* - `_boundOnOverlayTouchAction`: undefined (property only)
|
|
21264
|
-
* - `_boundOnTouchend`: undefined (property only)
|
|
21265
|
-
* - `_boundOnPaste`: undefined (property only)
|
|
21266
|
-
* - `_boundOnDrop`: undefined (property only)
|
|
21267
|
-
* - `_boundOnBeforeInput`: undefined (property only)
|
|
21268
|
-
* - `_fieldAriaController`: undefined (property only)
|
|
21269
|
-
* - `_helperController`: undefined (property only)
|
|
21270
|
-
* - `_errorController`: undefined (property only)
|
|
20993
|
+
* - `itemIdPath`: Path for the id of the item, used to detect whether the item is selected.
|
|
20994
|
+
* - `owner`: Reference to the owner (combo-box owner), used by the item elements.
|
|
20995
|
+
* - `getItemLabel`: Function used to set a label for every combo-box item.
|
|
20996
|
+
* - `renderer`: Function used to render the content of every combo-box item.
|
|
20997
|
+
* - `theme`: Used to propagate the `theme` attribute from the host element.
|
|
20998
|
+
* - `__boundOnItemClick`: undefined (property only)
|
|
21271
20999
|
*
|
|
21272
21000
|
* ## Events
|
|
21273
21001
|
*
|
|
21274
21002
|
* Events that will be emitted by the component.
|
|
21275
21003
|
*
|
|
21276
|
-
* - `
|
|
21277
|
-
* - `
|
|
21278
|
-
* - `filter-changed`: Fired when the `filter` property changes.
|
|
21279
|
-
* - `invalid-changed`: Fired when the `invalid` property changes.
|
|
21280
|
-
* - `opened-changed`: Fired when the `opened` property changes.
|
|
21281
|
-
* - `selected-item-changed`: Fired when the `selectedItem` property changes.
|
|
21282
|
-
* - `value-changed`: Fired when the `value` property changes.
|
|
21283
|
-
* - `validated`: Fired whenever the field is validated.
|
|
21284
|
-
* - `vaadin-combo-box-dropdown-opened`: undefined
|
|
21285
|
-
* - `vaadin-combo-box-dropdown-closed`: undefined
|
|
21004
|
+
* - `selection-changed`: undefined
|
|
21005
|
+
* - `index-requested`: undefined
|
|
21286
21006
|
* - `undefined`: undefined
|
|
21287
21007
|
*
|
|
21288
21008
|
* ## Methods
|
|
21289
21009
|
*
|
|
21290
21010
|
* Methods that can be called to access component functionality.
|
|
21291
21011
|
*
|
|
21292
|
-
* - `
|
|
21293
|
-
* - `
|
|
21294
|
-
*
|
|
21295
|
-
*
|
|
21296
|
-
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
21297
|
-
* - `cancel() => void`: Reverts back to original value.
|
|
21298
|
-
* - `open() => void`: Opens the dropdown list.
|
|
21299
|
-
* - `close() => void`: Closes the dropdown list.
|
|
21012
|
+
* - `requestContentUpdate() => void`: Updates the virtualizer's size and items.
|
|
21013
|
+
* - `scrollIntoView(index: number) => void`: Scrolls an item at given index into view and adjusts `scrollTop`
|
|
21014
|
+
* so that the element gets fully visible on Arrow Down key press.
|
|
21300
21015
|
* - `createProperty(name, options) => void`: undefined
|
|
21301
21016
|
* - `getOrCreateMap(name) => void`: undefined
|
|
21302
21017
|
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
21303
21018
|
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
21304
21019
|
*/
|
|
21305
|
-
"vaadin-combo-box": Partial<
|
|
21306
|
-
|
|
21020
|
+
"vaadin-combo-box-scroller": Partial<
|
|
21021
|
+
ComboBoxScrollerProps &
|
|
21022
|
+
ComboBoxScrollerSolidJsProps &
|
|
21023
|
+
BaseProps<ComboBoxScroller> &
|
|
21024
|
+
BaseEvents
|
|
21307
21025
|
>;
|
|
21308
21026
|
|
|
21309
21027
|
/**
|
|
21310
|
-
*
|
|
21028
|
+
* `<vaadin-combo-box>` is a web component for choosing a value from a filterable list of options
|
|
21029
|
+
* presented in a dropdown overlay. The options can be provided as a list of strings or objects
|
|
21030
|
+
* by setting [`items`](#/elements/vaadin-combo-box#property-items) property on the element.
|
|
21311
21031
|
*
|
|
21312
|
-
*
|
|
21032
|
+
* ```html
|
|
21033
|
+
* <vaadin-combo-box id="combo-box"></vaadin-combo-box>
|
|
21034
|
+
* ```
|
|
21313
21035
|
*
|
|
21314
|
-
*
|
|
21036
|
+
* ```js
|
|
21037
|
+
* document.querySelector('#combo-box').items = ['apple', 'orange', 'banana'];
|
|
21038
|
+
* ```
|
|
21315
21039
|
*
|
|
21316
|
-
*
|
|
21317
|
-
* - `selectedDate`: undefined
|
|
21040
|
+
* When the selected `value` is changed, a `value-changed` event is triggered.
|
|
21318
21041
|
*
|
|
21319
|
-
*
|
|
21042
|
+
* ### Item rendering
|
|
21320
21043
|
*
|
|
21321
|
-
*
|
|
21044
|
+
* To customize the content of the `<vaadin-combo-box-item>` elements placed in the dropdown, use
|
|
21045
|
+
* [`renderer`](#/elements/vaadin-combo-box#property-renderer) property which accepts a function.
|
|
21046
|
+
* The renderer function is called with `root`, `comboBox`, and `model` as arguments.
|
|
21322
21047
|
*
|
|
21323
|
-
*
|
|
21048
|
+
* Generate DOM content by using `model` object properties if needed, and append it to the `root`
|
|
21049
|
+
* element. The `comboBox` reference is provided to access the combo-box element state. Do not
|
|
21050
|
+
* set combo-box properties in a `renderer` function.
|
|
21051
|
+
*
|
|
21052
|
+
* ```js
|
|
21053
|
+
* const comboBox = document.querySelector('#combo-box');
|
|
21054
|
+
* comboBox.items = [{'label': 'Hydrogen', 'value': 'H'}];
|
|
21055
|
+
* comboBox.renderer = (root, comboBox, model) => {
|
|
21056
|
+
* const item = model.item;
|
|
21057
|
+
* root.innerHTML = `${model.index}: ${item.label} <b>${item.value}</b>`;
|
|
21058
|
+
* };
|
|
21059
|
+
* ```
|
|
21060
|
+
*
|
|
21061
|
+
* Renderer is called on the opening of the combo-box and each time the related model is updated.
|
|
21062
|
+
* Before creating new content, it is recommended to check if there is already an existing DOM
|
|
21063
|
+
* element in `root` from a previous renderer call for reusing it. Even though combo-box uses
|
|
21064
|
+
* infinite scrolling, reducing DOM operations might improve performance.
|
|
21065
|
+
*
|
|
21066
|
+
* The following properties are available in the `model` argument:
|
|
21324
21067
|
*
|
|
21325
|
-
*
|
|
21068
|
+
* Property | Type | Description
|
|
21069
|
+
* -----------|------------------|-------------
|
|
21070
|
+
* `index` | Number | Index of the item in the `items` array
|
|
21071
|
+
* `item` | String or Object | The item reference
|
|
21072
|
+
* `selected` | Boolean | True when item is selected
|
|
21073
|
+
* `focused` | Boolean | True when item is focused
|
|
21326
21074
|
*
|
|
21327
|
-
*
|
|
21075
|
+
* ### Lazy Loading with Function Data Provider
|
|
21328
21076
|
*
|
|
21329
|
-
*
|
|
21330
|
-
*
|
|
21331
|
-
* -
|
|
21332
|
-
*
|
|
21333
|
-
*/
|
|
21334
|
-
"vaadin-date-picker-year": Partial<
|
|
21335
|
-
DatePickerYearProps &
|
|
21336
|
-
DatePickerYearSolidJsProps &
|
|
21337
|
-
BaseProps<DatePickerYear> &
|
|
21338
|
-
BaseEvents
|
|
21339
|
-
>;
|
|
21340
|
-
|
|
21341
|
-
/**
|
|
21342
|
-
* `<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.
|
|
21077
|
+
* In addition to assigning an array to the items property, you can alternatively use the
|
|
21078
|
+
* [`dataProvider`](#/elements/vaadin-combo-box#property-dataProvider) function property.
|
|
21079
|
+
* The `<vaadin-combo-box>` calls this function lazily, only when it needs more data
|
|
21080
|
+
* to be displayed.
|
|
21343
21081
|
*
|
|
21344
|
-
*
|
|
21345
|
-
*
|
|
21346
|
-
*
|
|
21082
|
+
* __Note that when using function data providers, the total number of items
|
|
21083
|
+
* needs to be set manually. The total number of items can be returned
|
|
21084
|
+
* in the second argument of the data provider callback:__
|
|
21347
21085
|
*
|
|
21348
21086
|
* ```js
|
|
21349
|
-
*
|
|
21350
|
-
*
|
|
21087
|
+
* comboBox.dataProvider = async (params, callback) => {
|
|
21088
|
+
* const API = 'https://demo.vaadin.com/demo-data/1.0/filtered-countries';
|
|
21089
|
+
* const { filter, page, pageSize } = params;
|
|
21090
|
+
* const index = page * pageSize;
|
|
21351
21091
|
*
|
|
21352
|
-
*
|
|
21092
|
+
* const res = await fetch(`${API}?index=${index}&count=${pageSize}&filter=${filter}`);
|
|
21093
|
+
* if (res.ok) {
|
|
21094
|
+
* const { result, size } = await res.json();
|
|
21095
|
+
* callback(result, size);
|
|
21096
|
+
* }
|
|
21097
|
+
* };
|
|
21098
|
+
* ```
|
|
21353
21099
|
*
|
|
21354
21100
|
* ### Styling
|
|
21355
21101
|
*
|
|
21356
21102
|
* The following custom properties are available for styling:
|
|
21357
21103
|
*
|
|
21358
|
-
* Custom property
|
|
21359
|
-
*
|
|
21360
|
-
* `--vaadin-field-default-width`
|
|
21104
|
+
* Custom property | Description | Default
|
|
21105
|
+
* ----------------------------------------|----------------------------|---------
|
|
21106
|
+
* `--vaadin-field-default-width` | Default width of the field | `12em`
|
|
21107
|
+
* `--vaadin-combo-box-overlay-width` | Width of the overlay | `auto`
|
|
21108
|
+
* `--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`
|
|
21361
21109
|
*
|
|
21362
21110
|
* The following shadow DOM parts are available for styling:
|
|
21363
21111
|
*
|
|
@@ -21371,9 +21119,9 @@ export type CustomElementsSolidJs = {
|
|
|
21371
21119
|
* `helper-text` | The helper text element wrapper
|
|
21372
21120
|
* `required-indicator` | The `required` state indicator element
|
|
21373
21121
|
* `toggle-button` | The toggle button
|
|
21374
|
-
* `backdrop` | Backdrop of the overlay
|
|
21375
21122
|
* `overlay` | The overlay container
|
|
21376
21123
|
* `content` | The overlay content
|
|
21124
|
+
* `loader` | The loading indicator shown while loading items
|
|
21377
21125
|
*
|
|
21378
21126
|
* The following state attributes are available for styling:
|
|
21379
21127
|
*
|
|
@@ -21390,76 +21138,17 @@ export type CustomElementsSolidJs = {
|
|
|
21390
21138
|
* `focus-ring` | Set when the element is keyboard focused
|
|
21391
21139
|
* `readonly` | Set when the element is readonly
|
|
21392
21140
|
* `opened` | Set when the overlay is opened
|
|
21393
|
-
* `
|
|
21141
|
+
* `loading` | Set when loading items from the data provider
|
|
21394
21142
|
*
|
|
21395
21143
|
* ### Internal components
|
|
21396
21144
|
*
|
|
21397
|
-
* In addition to `<vaadin-
|
|
21145
|
+
* In addition to `<vaadin-combo-box>` itself, the following internal
|
|
21398
21146
|
* components are themable:
|
|
21399
21147
|
*
|
|
21400
|
-
* - `<vaadin-
|
|
21401
|
-
* - `<vaadin-date-picker-month-scroller>`
|
|
21402
|
-
* - `<vaadin-date-picker-year-scroller>`
|
|
21403
|
-
* - `<vaadin-date-picker-year>`
|
|
21404
|
-
* - `<vaadin-month-calendar>`
|
|
21405
|
-
*
|
|
21406
|
-
* In order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:
|
|
21407
|
-
*
|
|
21408
|
-
* Part name | Description
|
|
21409
|
-
* ----------------------|--------------------
|
|
21410
|
-
* `years-toggle-button` | Fullscreen mode years scroller toggle
|
|
21411
|
-
* `toolbar` | Toolbar with slotted buttons
|
|
21412
|
-
*
|
|
21413
|
-
* The following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:
|
|
21414
|
-
*
|
|
21415
|
-
* Attribute | Description
|
|
21416
|
-
* ----------------|-------------------------------------------------
|
|
21417
|
-
* `desktop` | Set when the overlay content is in desktop mode
|
|
21418
|
-
* `fullscreen` | Set when the overlay content is in fullscreen mode
|
|
21419
|
-
* `years-visible` | Set when the year scroller is visible in fullscreen mode
|
|
21420
|
-
*
|
|
21421
|
-
* In order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:
|
|
21422
|
-
*
|
|
21423
|
-
* Part name | Description
|
|
21424
|
-
* ----------------------|--------------------
|
|
21425
|
-
* `month-header` | Month title
|
|
21426
|
-
* `weekdays` | Weekday container
|
|
21427
|
-
* `weekday` | Weekday element
|
|
21428
|
-
* `week-numbers` | Week numbers container
|
|
21429
|
-
* `week-number` | Week number element
|
|
21430
|
-
* `date` | Date element
|
|
21431
|
-
* `disabled` | Disabled date element
|
|
21432
|
-
* `focused` | Focused date element
|
|
21433
|
-
* `selected` | Selected date element
|
|
21434
|
-
* `today` | Date element corresponding to the current day
|
|
21435
|
-
* `past` | Date element corresponding to the date in the past
|
|
21436
|
-
* `future` | Date element corresponding to the date in the future
|
|
21437
|
-
*
|
|
21438
|
-
* In order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:
|
|
21439
|
-
*
|
|
21440
|
-
* Part name | Description
|
|
21441
|
-
* ----------------------|--------------------
|
|
21442
|
-
* `year-number` | Year number
|
|
21443
|
-
* `year-separator` | Year separator
|
|
21148
|
+
* - `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](#/elements/vaadin-item).
|
|
21444
21149
|
*
|
|
21445
21150
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
21446
21151
|
*
|
|
21447
|
-
* ### Change events
|
|
21448
|
-
*
|
|
21449
|
-
* Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,
|
|
21450
|
-
* the component can fire either a `change` event or an `unparsable-change` event:
|
|
21451
|
-
*
|
|
21452
|
-
* Value change | Event
|
|
21453
|
-
* :------------------------|:------------------
|
|
21454
|
-
* empty => parsable | change
|
|
21455
|
-
* empty => unparsable | unparsable-change
|
|
21456
|
-
* parsable => empty | change
|
|
21457
|
-
* parsable => parsable | change
|
|
21458
|
-
* parsable => unparsable | change
|
|
21459
|
-
* unparsable => empty | unparsable-change
|
|
21460
|
-
* unparsable => parsable | change
|
|
21461
|
-
* unparsable => unparsable | unparsable-change
|
|
21462
|
-
*
|
|
21463
21152
|
* ## Attributes & Properties
|
|
21464
21153
|
*
|
|
21465
21154
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
@@ -21476,59 +21165,74 @@ export type CustomElementsSolidJs = {
|
|
|
21476
21165
|
* - `focus-ring`/`undefined`: Set when the element is keyboard focused
|
|
21477
21166
|
* - `readonly`: Set when the element is readonly
|
|
21478
21167
|
* - `opened`: Set when the overlay is opened
|
|
21479
|
-
* - `
|
|
21480
|
-
* - `<vaadin-
|
|
21481
|
-
* - `<vaadin-
|
|
21482
|
-
* - `<vaadin-
|
|
21483
|
-
* -
|
|
21484
|
-
* -
|
|
21485
|
-
* -
|
|
21486
|
-
* - `<vaadin-date-picker-overlay-content>`/`undefined`: undefined
|
|
21487
|
-
* - `years-toggle-button`/`undefined`: Fullscreen mode years scroller toggle
|
|
21488
|
-
* - `toolbar`/`undefined`: Toolbar with slotted buttons
|
|
21489
|
-
* - `_selectedDate`: The current selected date.
|
|
21490
|
-
* - `_focusedDate`: undefined
|
|
21491
|
-
* - `value`: Selected date.
|
|
21168
|
+
* - `loading`: Set when loading items from the data provider
|
|
21169
|
+
* - `<vaadin-combo-box>`/`undefined`: undefined
|
|
21170
|
+
* - `<vaadin-combo-box-item>`/`undefined`: undefined
|
|
21171
|
+
* - `<vaadin-item>`/`undefined`: undefined
|
|
21172
|
+
* - `pageSize`: Number of items fetched at a time from the dataprovider.
|
|
21173
|
+
* - `size`: Total number of items.
|
|
21174
|
+
* - `dataProvider`: Function that provides items lazily. Receives arguments `params`, `callback`
|
|
21492
21175
|
*
|
|
21493
|
-
*
|
|
21494
|
-
* - ISO 8601 `"YYYY-MM-DD"` (default)
|
|
21495
|
-
* - 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"`
|
|
21496
|
-
* - `initialPosition`: Date which should be visible when there is no value selected.
|
|
21176
|
+
* `params.page` Requested page index
|
|
21497
21177
|
*
|
|
21498
|
-
*
|
|
21499
|
-
* - `autoOpenDisabled`: Set true to prevent the overlay from opening automatically.
|
|
21500
|
-
* - `showWeekNumbers`: Set true to display ISO-8601 week numbers in the calendar. Notice that
|
|
21501
|
-
* displaying week numbers is only supported when `i18n.firstDayOfWeek`
|
|
21502
|
-
* is 1 (Monday).
|
|
21503
|
-
* - `_fullscreen`: undefined
|
|
21504
|
-
* - `_fullscreenMediaQuery`: undefined
|
|
21505
|
-
* - `min`: The earliest date that can be selected. All earlier dates will be disabled.
|
|
21178
|
+
* `params.pageSize` Current page size
|
|
21506
21179
|
*
|
|
21507
|
-
*
|
|
21508
|
-
* - ISO 8601 `"YYYY-MM-DD"` (default)
|
|
21509
|
-
* - 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"`
|
|
21510
|
-
* - `max`: The latest date that can be selected. All later dates will be disabled.
|
|
21180
|
+
* `params.filter` Currently applied filter
|
|
21511
21181
|
*
|
|
21512
|
-
*
|
|
21513
|
-
*
|
|
21514
|
-
*
|
|
21515
|
-
* - `
|
|
21516
|
-
* Receives
|
|
21517
|
-
* boolean.
|
|
21518
|
-
* - `_minDate`: The earliest date that can be selected. All earlier dates will be disabled.
|
|
21519
|
-
* - `_maxDate`: The latest date that can be selected. All later dates will be disabled.
|
|
21520
|
-
* - `_noInput`: undefined
|
|
21521
|
-
* - `_ios`: undefined
|
|
21522
|
-
* - `_focusOverlayOnOpen`: undefined
|
|
21523
|
-
* - `_overlayContent`: undefined
|
|
21524
|
-
* - `__enteredDate`: undefined
|
|
21525
|
-
* - `i18n`: The object used to localize this component. To change the default
|
|
21526
|
-
* localization, replace this with an object that provides all properties, or
|
|
21527
|
-
* just the individual properties you want to change.
|
|
21182
|
+
* `callback(items, size)` Callback function with arguments:
|
|
21183
|
+
* - `items` Current page of items
|
|
21184
|
+
* - `size` Total number of items.
|
|
21185
|
+
* - `renderer`: Custom function for rendering the content of every item.
|
|
21186
|
+
* Receives three arguments:
|
|
21528
21187
|
*
|
|
21529
|
-
*
|
|
21530
|
-
*
|
|
21531
|
-
* - `
|
|
21188
|
+
* - `root` The `<vaadin-combo-box-item>` internal container DOM element.
|
|
21189
|
+
* - `comboBox` The reference to the `<vaadin-combo-box>` element.
|
|
21190
|
+
* - `model` The object with the properties related with the rendered
|
|
21191
|
+
* item, contains:
|
|
21192
|
+
* - `model.index` The index of the rendered item.
|
|
21193
|
+
* - `model.item` The item.
|
|
21194
|
+
* - `allowCustomValue`: If `true`, the user can input a value that is not present in the items list.
|
|
21195
|
+
* `value` property will be set to the input value in this case.
|
|
21196
|
+
* Also, when `value` is set programmatically, the input value will be set
|
|
21197
|
+
* to reflect that value.
|
|
21198
|
+
* - `selectedItem`: The selected item from the `items` array.
|
|
21199
|
+
* - `itemClassNameGenerator`: A function used to generate CSS class names for dropdown
|
|
21200
|
+
* items based on the item. The return value should be the
|
|
21201
|
+
* generated class name as a string, or multiple class names
|
|
21202
|
+
* separated by whitespace characters.
|
|
21203
|
+
* - `itemIdPath`: Path for the id of the item. If `items` is an array of objects,
|
|
21204
|
+
* the `itemIdPath` is used to compare and identify the same item
|
|
21205
|
+
* in `selectedItem` and `filteredItems` (items given by the
|
|
21206
|
+
* `dataProvider` callback).
|
|
21207
|
+
* - `__keepOverlayOpened`: undefined
|
|
21208
|
+
* - `items`: A full set of items to filter the visible options from.
|
|
21209
|
+
* The items can be of either `String` or `Object` type.
|
|
21210
|
+
* - `filteredItems`: A subset of items, filtered based on the user input. Filtered items
|
|
21211
|
+
* can be assigned directly to omit the internal filtering functionality.
|
|
21212
|
+
* The items can be of either `String` or `Object` type.
|
|
21213
|
+
* - `filter`: Filtering string the user has typed into the input field.
|
|
21214
|
+
* - `itemLabelGenerator`: A function that is used to generate the label for dropdown
|
|
21215
|
+
* items based on the item. Receives one argument:
|
|
21216
|
+
* - `item` The item to generate the label for.
|
|
21217
|
+
* - `itemLabelPath`: Path for label of the item. If `items` is an array of objects, the
|
|
21218
|
+
* `itemLabelPath` is used to fetch the displayed string label for each
|
|
21219
|
+
* item.
|
|
21220
|
+
*
|
|
21221
|
+
* The item label is also used for matching items when processing user
|
|
21222
|
+
* input, i.e., for filtering and selecting items.
|
|
21223
|
+
* - `itemValuePath`: Path for the value of the item. If `items` is an array of objects, the
|
|
21224
|
+
* `itemValuePath:` is used to fetch the string value for the selected
|
|
21225
|
+
* item.
|
|
21226
|
+
*
|
|
21227
|
+
* The item value is used in the `value` property of the combo box,
|
|
21228
|
+
* to provide the form value.
|
|
21229
|
+
* - `autoOpenDisabled`: Set true to prevent the overlay from opening automatically.
|
|
21230
|
+
* - `_focusedIndex`: undefined
|
|
21231
|
+
* - `_toggleElement`: undefined
|
|
21232
|
+
* - `_dropdownItems`: Set of items to be rendered in the dropdown.
|
|
21233
|
+
* - `_overlayOpened`: Whether the overlay should be opened.
|
|
21234
|
+
* - `pattern`: A regular expression that the value is checked against.
|
|
21235
|
+
* The pattern must match the entire value, not just some subset.
|
|
21532
21236
|
* - `allowedCharPattern`: A pattern matched against individual characters the user inputs.
|
|
21533
21237
|
*
|
|
21534
21238
|
* When set, the field will prevent:
|
|
@@ -21553,9 +21257,11 @@ export type CustomElementsSolidJs = {
|
|
|
21553
21257
|
* in the Shadow DOM or in the light DOM. In any way, a reference to
|
|
21554
21258
|
* the clear icon element should be provided via the `clearElement` getter.
|
|
21555
21259
|
* - `dir`: undefined
|
|
21556
|
-
* - `
|
|
21260
|
+
* - `_boundOverlaySelectedItemChanged`: undefined (property only)
|
|
21261
|
+
* - `_boundOnClearButtonMouseDown`: undefined (property only)
|
|
21557
21262
|
* - `_boundOnClick`: undefined (property only)
|
|
21558
|
-
* - `
|
|
21263
|
+
* - `_boundOnOverlayTouchAction`: undefined (property only)
|
|
21264
|
+
* - `_boundOnTouchend`: undefined (property only)
|
|
21559
21265
|
* - `_boundOnPaste`: undefined (property only)
|
|
21560
21266
|
* - `_boundOnDrop`: undefined (property only)
|
|
21561
21267
|
* - `_boundOnBeforeInput`: undefined (property only)
|
|
@@ -21568,32 +21274,36 @@ export type CustomElementsSolidJs = {
|
|
|
21568
21274
|
* Events that will be emitted by the component.
|
|
21569
21275
|
*
|
|
21570
21276
|
* - `change`: Fired when the user commits a value change.
|
|
21571
|
-
* - `
|
|
21277
|
+
* - `custom-value-set`: Fired when the user sets a custom value.
|
|
21278
|
+
* - `filter-changed`: Fired when the `filter` property changes.
|
|
21572
21279
|
* - `invalid-changed`: Fired when the `invalid` property changes.
|
|
21573
21280
|
* - `opened-changed`: Fired when the `opened` property changes.
|
|
21281
|
+
* - `selected-item-changed`: Fired when the `selectedItem` property changes.
|
|
21574
21282
|
* - `value-changed`: Fired when the `value` property changes.
|
|
21575
21283
|
* - `validated`: Fired whenever the field is validated.
|
|
21284
|
+
* - `vaadin-combo-box-dropdown-opened`: undefined
|
|
21285
|
+
* - `vaadin-combo-box-dropdown-closed`: undefined
|
|
21576
21286
|
* - `undefined`: undefined
|
|
21577
21287
|
*
|
|
21578
21288
|
* ## Methods
|
|
21579
21289
|
*
|
|
21580
21290
|
* Methods that can be called to access component functionality.
|
|
21581
21291
|
*
|
|
21582
|
-
* - `
|
|
21583
|
-
* - `
|
|
21584
|
-
*
|
|
21292
|
+
* - `clearCache() => void`: Clears the cached pages and reloads data from dataprovider when needed.
|
|
21293
|
+
* - `requestContentUpdate() => void`: Requests an update for the content of items.
|
|
21294
|
+
* While performing the update, it invokes the renderer (passed in the `renderer` property) once an item.
|
|
21585
21295
|
*
|
|
21586
|
-
*
|
|
21296
|
+
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
21297
|
+
* - `cancel() => void`: Reverts back to original value.
|
|
21298
|
+
* - `open() => void`: Opens the dropdown list.
|
|
21299
|
+
* - `close() => void`: Closes the dropdown list.
|
|
21587
21300
|
* - `createProperty(name, options) => void`: undefined
|
|
21588
21301
|
* - `getOrCreateMap(name) => void`: undefined
|
|
21589
21302
|
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
21590
21303
|
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
21591
21304
|
*/
|
|
21592
|
-
"vaadin-
|
|
21593
|
-
|
|
21594
|
-
DatePickerSolidJsProps &
|
|
21595
|
-
BaseProps<DatePicker> &
|
|
21596
|
-
BaseEvents
|
|
21305
|
+
"vaadin-combo-box": Partial<
|
|
21306
|
+
ComboBoxProps & ComboBoxSolidJsProps & BaseProps<ComboBox> & BaseEvents
|
|
21597
21307
|
>;
|
|
21598
21308
|
|
|
21599
21309
|
/**
|
|
@@ -21938,154 +21648,444 @@ export type CustomElementsSolidJs = {
|
|
|
21938
21648
|
* };
|
|
21939
21649
|
* ```
|
|
21940
21650
|
*
|
|
21941
|
-
* ### Styling
|
|
21651
|
+
* ### Styling
|
|
21652
|
+
*
|
|
21653
|
+
* The following shadow DOM parts are available for styling:
|
|
21654
|
+
*
|
|
21655
|
+
* Part name | Description
|
|
21656
|
+
* -----------------|-------------------------------------------
|
|
21657
|
+
* `backdrop` | Backdrop of the overlay
|
|
21658
|
+
* `overlay` | The overlay container
|
|
21659
|
+
* `content` | The overlay content
|
|
21660
|
+
*
|
|
21661
|
+
* ### Custom CSS Properties
|
|
21662
|
+
*
|
|
21663
|
+
* The following custom CSS properties are available for styling:
|
|
21664
|
+
*
|
|
21665
|
+
* Custom CSS property | Description
|
|
21666
|
+
* --------------------------------------|-------------
|
|
21667
|
+
* `--vaadin-context-menu-offset-top` | Used as an offset when using `position` and the context menu is aligned vertically below the target
|
|
21668
|
+
* `--vaadin-context-menu-offset-bottom` | Used as an offset when using `position` and the context menu is aligned vertically above the target
|
|
21669
|
+
* `--vaadin-context-menu-offset-start` | Used as an offset when using `position` and the context menu is aligned horizontally after the target
|
|
21670
|
+
* `--vaadin-context-menu-offset-end` | Used as an offset when using `position` and the context menu is aligned horizontally before the target
|
|
21671
|
+
*
|
|
21672
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
21673
|
+
*
|
|
21674
|
+
* ### Internal components
|
|
21675
|
+
*
|
|
21676
|
+
* When using `items` API the following internal components are themable:
|
|
21677
|
+
*
|
|
21678
|
+
* - `<vaadin-context-menu-item>` - has the same API as [`<vaadin-item>`](#/elements/vaadin-item).
|
|
21679
|
+
* - `<vaadin-context-menu-list-box>` - has the same API as [`<vaadin-list-box>`](#/elements/vaadin-list-box).
|
|
21680
|
+
*
|
|
21681
|
+
* The `<vaadin-context-menu-item>` sub-menu elements have the following additional state attributes
|
|
21682
|
+
* on top of the built-in `<vaadin-item>` state attributes:
|
|
21683
|
+
*
|
|
21684
|
+
* Attribute | Description
|
|
21685
|
+
* ---------- |-------------
|
|
21686
|
+
* `expanded` | Expanded parent item.
|
|
21687
|
+
*
|
|
21688
|
+
* ## Attributes & Properties
|
|
21689
|
+
*
|
|
21690
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
21691
|
+
*
|
|
21692
|
+
* - `position`: Position of the overlay with respect to the target.
|
|
21693
|
+
* Supported values: null, `top-start`, `top`, `top-end`,
|
|
21694
|
+
* `bottom-start`, `bottom`, `bottom-end`, `start-top`,
|
|
21695
|
+
* `start`, `start-bottom`, `end-top`, `end`, `end-bottom`.
|
|
21696
|
+
* - `<vaadin-item>`/`undefined`: undefined
|
|
21697
|
+
* - `selector`: CSS selector that can be used to target any child element
|
|
21698
|
+
* of the context menu to listen for `openOn` events.
|
|
21699
|
+
* - `opened`: True if the overlay is currently displayed.
|
|
21700
|
+
* - `openOn`: Event name to listen for opening the context menu.
|
|
21701
|
+
* - `listenOn`: The target element that's listened to for context menu opening events.
|
|
21702
|
+
* By default the vaadin-context-menu listens to the target's `vaadin-contextmenu`
|
|
21703
|
+
* events.
|
|
21704
|
+
* - `closeOn`: Event name to listen for closing the context menu.
|
|
21705
|
+
* - `renderer`: Custom function for rendering the content of the menu overlay.
|
|
21706
|
+
* Receives three arguments:
|
|
21707
|
+
*
|
|
21708
|
+
* - `root` The root container DOM element. Append your content to it.
|
|
21709
|
+
* - `contextMenu` The reference to the `<vaadin-context-menu>` element.
|
|
21710
|
+
* - `context` The object with the menu context, contains:
|
|
21711
|
+
* - `context.target` the target of the menu opening event,
|
|
21712
|
+
* - `context.detail` the menu opening event detail.
|
|
21713
|
+
* - `_modeless`: When true, the menu overlay is modeless.
|
|
21714
|
+
* - `_context`: undefined
|
|
21715
|
+
* - `_phone`: undefined
|
|
21716
|
+
* - `_fullscreen`: undefined
|
|
21717
|
+
* - `_fullscreenMediaQuery`: undefined
|
|
21718
|
+
* - `items`: Defines a (hierarchical) menu structure for the component.
|
|
21719
|
+
* If a menu item has a non-empty `children` set, a sub-menu with the child items is opened
|
|
21720
|
+
* next to the parent menu on mouseover, tap or a right arrow keypress.
|
|
21721
|
+
*
|
|
21722
|
+
* The items API can't be used together with a renderer!
|
|
21723
|
+
*
|
|
21724
|
+
* #### Example
|
|
21725
|
+
*
|
|
21726
|
+
* ```javascript
|
|
21727
|
+
* contextMenu.items = [
|
|
21728
|
+
* { text: 'Menu Item 1', theme: 'primary', className: 'first', children:
|
|
21729
|
+
* [
|
|
21730
|
+
* { text: 'Menu Item 1-1', checked: true, keepOpen: true },
|
|
21731
|
+
* { text: 'Menu Item 1-2' }
|
|
21732
|
+
* ]
|
|
21733
|
+
* },
|
|
21734
|
+
* { component: 'hr' },
|
|
21735
|
+
* { text: 'Menu Item 2', children:
|
|
21736
|
+
* [
|
|
21737
|
+
* { text: 'Menu Item 2-1' },
|
|
21738
|
+
* { text: 'Menu Item 2-2', disabled: true }
|
|
21739
|
+
* ]
|
|
21740
|
+
* },
|
|
21741
|
+
* { text: 'Menu Item 3', disabled: true, className: 'last' }
|
|
21742
|
+
* ];
|
|
21743
|
+
* ```
|
|
21744
|
+
* - `_positionTarget`: undefined
|
|
21745
|
+
* - `dir`: undefined
|
|
21746
|
+
* - `_boundOpen`: undefined (property only)
|
|
21747
|
+
* - `_boundClose`: undefined (property only)
|
|
21748
|
+
* - `_boundPreventDefault`: undefined (property only)
|
|
21749
|
+
* - `_boundOnGlobalContextMenu`: undefined (property only)
|
|
21750
|
+
* - `__itemsOutsideClickListener`: undefined (property only)
|
|
21751
|
+
*
|
|
21752
|
+
* ## Events
|
|
21753
|
+
*
|
|
21754
|
+
* Events that will be emitted by the component.
|
|
21755
|
+
*
|
|
21756
|
+
* - `opened-changed`: Fired when the `opened` property changes.
|
|
21757
|
+
* - `item-selected`: Fired when an item is selected when the context menu is populated using the `items` API.
|
|
21758
|
+
* - `closed`: Fired when the context menu is closed.
|
|
21759
|
+
* - `close-all-menus`: Fired when all menus should close, e.g., after pressing Tab or on submenu close.
|
|
21760
|
+
* - `items-outside-click`: Fired when a click happens outside any open sub-menus.
|
|
21761
|
+
* - `undefined`: undefined
|
|
21762
|
+
*
|
|
21763
|
+
* ## Methods
|
|
21764
|
+
*
|
|
21765
|
+
* Methods that can be called to access component functionality.
|
|
21766
|
+
*
|
|
21767
|
+
* - `requestContentUpdate() => void`: Requests an update for the content of the menu overlay.
|
|
21768
|
+
* While performing the update, it invokes the renderer passed in the `renderer` property.
|
|
21769
|
+
*
|
|
21770
|
+
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
21771
|
+
* - `close() => void`: Closes the overlay.
|
|
21772
|
+
* - `open(e: !Event | undefined) => void`: Opens the overlay.
|
|
21773
|
+
* - `createProperty(name, options) => void`: undefined
|
|
21774
|
+
* - `getOrCreateMap(name) => void`: undefined
|
|
21775
|
+
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
21776
|
+
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
21777
|
+
*
|
|
21778
|
+
* ## CSS Custom Properties
|
|
21779
|
+
*
|
|
21780
|
+
* CSS variables available for styling the component.
|
|
21781
|
+
*
|
|
21782
|
+
* - `--vaadin-context-menu-offset-top`: Used as an offset when using `position` and the context menu is aligned vertically below the target (default: `undefined`)
|
|
21783
|
+
* - `--vaadin-context-menu-offset-bottom`: Used as an offset when using `position` and the context menu is aligned vertically above the target (default: `undefined`)
|
|
21784
|
+
* - `--vaadin-context-menu-offset-start`: Used as an offset when using `position` and the context menu is aligned horizontally after the target (default: `undefined`)
|
|
21785
|
+
* - `--vaadin-context-menu-offset-end`: Used as an offset when using `position` and the context menu is aligned horizontally before the target (default: `undefined`)
|
|
21786
|
+
* - `items`: undefined (default: `undefined`)
|
|
21787
|
+
* - `<vaadin-context-menu-item>`: undefined (default: `undefined`)
|
|
21788
|
+
* - `<vaadin-item>`: undefined (default: `undefined`)
|
|
21789
|
+
* - `<vaadin-context-menu-list-box>`: undefined (default: `undefined`)
|
|
21790
|
+
* - `<vaadin-list-box>`: undefined (default: `undefined`)
|
|
21791
|
+
* - `<vaadin-context-menu-item>`: undefined (default: `undefined`)
|
|
21792
|
+
* - `<vaadin-item>`: undefined (default: `undefined`)
|
|
21793
|
+
* - `expanded`: Expanded parent item. (default: `undefined`)
|
|
21794
|
+
*/
|
|
21795
|
+
"vaadin-context-menu": Partial<
|
|
21796
|
+
ContextMenuProps &
|
|
21797
|
+
ContextMenuSolidJsProps &
|
|
21798
|
+
BaseProps<ContextMenu> &
|
|
21799
|
+
BaseEvents
|
|
21800
|
+
>;
|
|
21801
|
+
|
|
21802
|
+
/**
|
|
21803
|
+
* An element used internally by `<vaadin-date-picker>`. Not intended to be used separately.
|
|
21804
|
+
*
|
|
21805
|
+
* ## Attributes & Properties
|
|
21806
|
+
*
|
|
21807
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
21808
|
+
*
|
|
21809
|
+
* - `year`: undefined
|
|
21810
|
+
* - `selectedDate`: undefined
|
|
21811
|
+
*
|
|
21812
|
+
* ## Events
|
|
21813
|
+
*
|
|
21814
|
+
* Events that will be emitted by the component.
|
|
21815
|
+
*
|
|
21816
|
+
* - `undefined`: undefined
|
|
21817
|
+
*
|
|
21818
|
+
* ## Methods
|
|
21819
|
+
*
|
|
21820
|
+
* Methods that can be called to access component functionality.
|
|
21821
|
+
*
|
|
21822
|
+
* - `createProperty(name, options) => void`: undefined
|
|
21823
|
+
* - `getOrCreateMap(name) => void`: undefined
|
|
21824
|
+
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
21825
|
+
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
21826
|
+
*/
|
|
21827
|
+
"vaadin-date-picker-year": Partial<
|
|
21828
|
+
DatePickerYearProps &
|
|
21829
|
+
DatePickerYearSolidJsProps &
|
|
21830
|
+
BaseProps<DatePickerYear> &
|
|
21831
|
+
BaseEvents
|
|
21832
|
+
>;
|
|
21833
|
+
|
|
21834
|
+
/**
|
|
21835
|
+
* `<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.
|
|
21836
|
+
*
|
|
21837
|
+
* ```html
|
|
21838
|
+
* <vaadin-date-picker label="Birthday"></vaadin-date-picker>
|
|
21839
|
+
* ```
|
|
21840
|
+
*
|
|
21841
|
+
* ```js
|
|
21842
|
+
* datePicker.value = '2016-03-02';
|
|
21843
|
+
* ```
|
|
21844
|
+
*
|
|
21845
|
+
* When the selected `value` is changed, a `value-changed` event is triggered.
|
|
21846
|
+
*
|
|
21847
|
+
* ### Styling
|
|
21848
|
+
*
|
|
21849
|
+
* The following custom properties are available for styling:
|
|
21850
|
+
*
|
|
21851
|
+
* Custom property | Description | Default
|
|
21852
|
+
* -------------------------------|----------------------------|---------
|
|
21853
|
+
* `--vaadin-field-default-width` | Default width of the field | `12em`
|
|
21854
|
+
*
|
|
21855
|
+
* The following shadow DOM parts are available for styling:
|
|
21856
|
+
*
|
|
21857
|
+
* Part name | Description
|
|
21858
|
+
* ---------------------|----------------
|
|
21859
|
+
* `label` | The label element
|
|
21860
|
+
* `input-field` | The element that wraps prefix, value and buttons
|
|
21861
|
+
* `field-button` | Set on both clear and toggle buttons
|
|
21862
|
+
* `clear-button` | The clear button
|
|
21863
|
+
* `error-message` | The error message element
|
|
21864
|
+
* `helper-text` | The helper text element wrapper
|
|
21865
|
+
* `required-indicator` | The `required` state indicator element
|
|
21866
|
+
* `toggle-button` | The toggle button
|
|
21867
|
+
* `backdrop` | Backdrop of the overlay
|
|
21868
|
+
* `overlay` | The overlay container
|
|
21869
|
+
* `content` | The overlay content
|
|
21870
|
+
*
|
|
21871
|
+
* The following state attributes are available for styling:
|
|
21872
|
+
*
|
|
21873
|
+
* Attribute | Description
|
|
21874
|
+
* ---------------------|---------------------------------
|
|
21875
|
+
* `disabled` | Set when the element is disabled
|
|
21876
|
+
* `has-value` | Set when the element has a value
|
|
21877
|
+
* `has-label` | Set when the element has a label
|
|
21878
|
+
* `has-helper` | Set when the element has helper text or slot
|
|
21879
|
+
* `has-error-message` | Set when the element has an error message
|
|
21880
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
21881
|
+
* `invalid` | Set when the element is invalid
|
|
21882
|
+
* `focused` | Set when the element is focused
|
|
21883
|
+
* `focus-ring` | Set when the element is keyboard focused
|
|
21884
|
+
* `readonly` | Set when the element is readonly
|
|
21885
|
+
* `opened` | Set when the overlay is opened
|
|
21886
|
+
* `week-numbers` | Set when week numbers are shown in the calendar
|
|
21887
|
+
*
|
|
21888
|
+
* ### Internal components
|
|
21889
|
+
*
|
|
21890
|
+
* In addition to `<vaadin-date-picker>` itself, the following internal
|
|
21891
|
+
* components are themable:
|
|
21892
|
+
*
|
|
21893
|
+
* - `<vaadin-date-picker-overlay-content>`
|
|
21894
|
+
* - `<vaadin-date-picker-month-scroller>`
|
|
21895
|
+
* - `<vaadin-date-picker-year-scroller>`
|
|
21896
|
+
* - `<vaadin-date-picker-year>`
|
|
21897
|
+
* - `<vaadin-month-calendar>`
|
|
21898
|
+
*
|
|
21899
|
+
* In order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:
|
|
21942
21900
|
*
|
|
21943
|
-
*
|
|
21901
|
+
* Part name | Description
|
|
21902
|
+
* ----------------------|--------------------
|
|
21903
|
+
* `years-toggle-button` | Fullscreen mode years scroller toggle
|
|
21904
|
+
* `toolbar` | Toolbar with slotted buttons
|
|
21944
21905
|
*
|
|
21945
|
-
*
|
|
21946
|
-
* -----------------|-------------------------------------------
|
|
21947
|
-
* `backdrop` | Backdrop of the overlay
|
|
21948
|
-
* `overlay` | The overlay container
|
|
21949
|
-
* `content` | The overlay content
|
|
21906
|
+
* The following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:
|
|
21950
21907
|
*
|
|
21951
|
-
*
|
|
21908
|
+
* Attribute | Description
|
|
21909
|
+
* ----------------|-------------------------------------------------
|
|
21910
|
+
* `desktop` | Set when the overlay content is in desktop mode
|
|
21911
|
+
* `fullscreen` | Set when the overlay content is in fullscreen mode
|
|
21912
|
+
* `years-visible` | Set when the year scroller is visible in fullscreen mode
|
|
21952
21913
|
*
|
|
21953
|
-
*
|
|
21914
|
+
* In order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:
|
|
21954
21915
|
*
|
|
21955
|
-
*
|
|
21956
|
-
*
|
|
21957
|
-
*
|
|
21958
|
-
*
|
|
21959
|
-
*
|
|
21960
|
-
*
|
|
21916
|
+
* Part name | Description
|
|
21917
|
+
* ----------------------|--------------------
|
|
21918
|
+
* `month-header` | Month title
|
|
21919
|
+
* `weekdays` | Weekday container
|
|
21920
|
+
* `weekday` | Weekday element
|
|
21921
|
+
* `week-numbers` | Week numbers container
|
|
21922
|
+
* `week-number` | Week number element
|
|
21923
|
+
* `date` | Date element
|
|
21924
|
+
* `disabled` | Disabled date element
|
|
21925
|
+
* `focused` | Focused date element
|
|
21926
|
+
* `selected` | Selected date element
|
|
21927
|
+
* `today` | Date element corresponding to the current day
|
|
21928
|
+
* `past` | Date element corresponding to the date in the past
|
|
21929
|
+
* `future` | Date element corresponding to the date in the future
|
|
21961
21930
|
*
|
|
21962
|
-
*
|
|
21931
|
+
* In order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:
|
|
21963
21932
|
*
|
|
21964
|
-
*
|
|
21933
|
+
* Part name | Description
|
|
21934
|
+
* ----------------------|--------------------
|
|
21935
|
+
* `year-number` | Year number
|
|
21936
|
+
* `year-separator` | Year separator
|
|
21965
21937
|
*
|
|
21966
|
-
*
|
|
21938
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
21967
21939
|
*
|
|
21968
|
-
*
|
|
21969
|
-
* - `<vaadin-context-menu-list-box>` - has the same API as [`<vaadin-list-box>`](#/elements/vaadin-list-box).
|
|
21940
|
+
* ### Change events
|
|
21970
21941
|
*
|
|
21971
|
-
*
|
|
21972
|
-
*
|
|
21942
|
+
* Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,
|
|
21943
|
+
* the component can fire either a `change` event or an `unparsable-change` event:
|
|
21973
21944
|
*
|
|
21974
|
-
*
|
|
21975
|
-
*
|
|
21976
|
-
*
|
|
21945
|
+
* Value change | Event
|
|
21946
|
+
* :------------------------|:------------------
|
|
21947
|
+
* empty => parsable | change
|
|
21948
|
+
* empty => unparsable | unparsable-change
|
|
21949
|
+
* parsable => empty | change
|
|
21950
|
+
* parsable => parsable | change
|
|
21951
|
+
* parsable => unparsable | change
|
|
21952
|
+
* unparsable => empty | unparsable-change
|
|
21953
|
+
* unparsable => parsable | change
|
|
21954
|
+
* unparsable => unparsable | unparsable-change
|
|
21977
21955
|
*
|
|
21978
21956
|
* ## Attributes & Properties
|
|
21979
21957
|
*
|
|
21980
21958
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
21981
21959
|
*
|
|
21982
|
-
* - `
|
|
21983
|
-
*
|
|
21984
|
-
*
|
|
21985
|
-
*
|
|
21986
|
-
* -
|
|
21987
|
-
* - `
|
|
21988
|
-
*
|
|
21989
|
-
* - `
|
|
21990
|
-
* - `
|
|
21991
|
-
* - `
|
|
21992
|
-
*
|
|
21993
|
-
*
|
|
21994
|
-
* - `
|
|
21995
|
-
* -
|
|
21996
|
-
*
|
|
21960
|
+
* - `_positionTarget`: undefined
|
|
21961
|
+
* - `disabled`/`undefined`: Set when the element is disabled
|
|
21962
|
+
* - `has-value`/`undefined`: Set when the element has a value
|
|
21963
|
+
* - `has-label`/`undefined`: Set when the element has a label
|
|
21964
|
+
* - `has-helper`/`undefined`: Set when the element has helper text or slot
|
|
21965
|
+
* - `has-error-message`/`undefined`: Set when the element has an error message
|
|
21966
|
+
* - `has-tooltip`/`undefined`: Set when the element has a slotted tooltip
|
|
21967
|
+
* - `invalid`/`undefined`: Set when the element is invalid
|
|
21968
|
+
* - `focused`/`undefined`: Set when the element is focused
|
|
21969
|
+
* - `focus-ring`/`undefined`: Set when the element is keyboard focused
|
|
21970
|
+
* - `readonly`: Set when the element is readonly
|
|
21971
|
+
* - `opened`: Set when the overlay is opened
|
|
21972
|
+
* - `week-numbers`/`undefined`: Set when week numbers are shown in the calendar
|
|
21973
|
+
* - `<vaadin-date-picker>`/`undefined`: undefined
|
|
21974
|
+
* - `<vaadin-date-picker-overlay-content>`/`undefined`: undefined
|
|
21975
|
+
* - `<vaadin-date-picker-month-scroller>`/`undefined`: undefined
|
|
21976
|
+
* - `<vaadin-date-picker-year-scroller>`/`undefined`: undefined
|
|
21977
|
+
* - `<vaadin-date-picker-year>`/`undefined`: undefined
|
|
21978
|
+
* - `<vaadin-month-calendar>`/`undefined`: undefined
|
|
21979
|
+
* - `<vaadin-date-picker-overlay-content>`/`undefined`: undefined
|
|
21980
|
+
* - `years-toggle-button`/`undefined`: Fullscreen mode years scroller toggle
|
|
21981
|
+
* - `toolbar`/`undefined`: Toolbar with slotted buttons
|
|
21982
|
+
* - `_selectedDate`: The current selected date.
|
|
21983
|
+
* - `_focusedDate`: undefined
|
|
21984
|
+
* - `value`: Selected date.
|
|
21997
21985
|
*
|
|
21998
|
-
*
|
|
21999
|
-
* -
|
|
22000
|
-
* -
|
|
22001
|
-
*
|
|
22002
|
-
*
|
|
22003
|
-
*
|
|
22004
|
-
* - `
|
|
22005
|
-
* - `
|
|
21986
|
+
* Supported date formats:
|
|
21987
|
+
* - ISO 8601 `"YYYY-MM-DD"` (default)
|
|
21988
|
+
* - 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"`
|
|
21989
|
+
* - `initialPosition`: Date which should be visible when there is no value selected.
|
|
21990
|
+
*
|
|
21991
|
+
* The same date formats as for the `value` property are supported.
|
|
21992
|
+
* - `autoOpenDisabled`: Set true to prevent the overlay from opening automatically.
|
|
21993
|
+
* - `showWeekNumbers`: Set true to display ISO-8601 week numbers in the calendar. Notice that
|
|
21994
|
+
* displaying week numbers is only supported when `i18n.firstDayOfWeek`
|
|
21995
|
+
* is 1 (Monday).
|
|
22006
21996
|
* - `_fullscreen`: undefined
|
|
22007
21997
|
* - `_fullscreenMediaQuery`: undefined
|
|
22008
|
-
* - `
|
|
22009
|
-
* If a menu item has a non-empty `children` set, a sub-menu with the child items is opened
|
|
22010
|
-
* next to the parent menu on mouseover, tap or a right arrow keypress.
|
|
21998
|
+
* - `min`: The earliest date that can be selected. All earlier dates will be disabled.
|
|
22011
21999
|
*
|
|
22012
|
-
*
|
|
22000
|
+
* Supported date formats:
|
|
22001
|
+
* - ISO 8601 `"YYYY-MM-DD"` (default)
|
|
22002
|
+
* - 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"`
|
|
22003
|
+
* - `max`: The latest date that can be selected. All later dates will be disabled.
|
|
22013
22004
|
*
|
|
22014
|
-
*
|
|
22005
|
+
* Supported date formats:
|
|
22006
|
+
* - ISO 8601 `"YYYY-MM-DD"` (default)
|
|
22007
|
+
* - 6-digit extended ISO 8601 `"+YYYYYY-MM-DD"`, `"-YYYYYY-MM-DD"`
|
|
22008
|
+
* - `isDateDisabled`: A function to be used to determine whether the user can select a given date.
|
|
22009
|
+
* Receives a `DatePickerDate` object of the date to be selected and should return a
|
|
22010
|
+
* boolean.
|
|
22011
|
+
* - `_minDate`: The earliest date that can be selected. All earlier dates will be disabled.
|
|
22012
|
+
* - `_maxDate`: The latest date that can be selected. All later dates will be disabled.
|
|
22013
|
+
* - `_noInput`: undefined
|
|
22014
|
+
* - `_ios`: undefined
|
|
22015
|
+
* - `_focusOverlayOnOpen`: undefined
|
|
22016
|
+
* - `_overlayContent`: undefined
|
|
22017
|
+
* - `__enteredDate`: undefined
|
|
22018
|
+
* - `i18n`: The object used to localize this component. To change the default
|
|
22019
|
+
* localization, replace this with an object that provides all properties, or
|
|
22020
|
+
* just the individual properties you want to change.
|
|
22015
22021
|
*
|
|
22016
|
-
*
|
|
22017
|
-
*
|
|
22018
|
-
*
|
|
22019
|
-
*
|
|
22020
|
-
*
|
|
22021
|
-
*
|
|
22022
|
-
*
|
|
22023
|
-
*
|
|
22024
|
-
*
|
|
22025
|
-
*
|
|
22026
|
-
*
|
|
22027
|
-
*
|
|
22028
|
-
*
|
|
22029
|
-
*
|
|
22030
|
-
*
|
|
22031
|
-
*
|
|
22032
|
-
*
|
|
22033
|
-
*
|
|
22034
|
-
* - `
|
|
22022
|
+
* Should be overridden by subclasses to provide a custom JSDoc with the
|
|
22023
|
+
* default I18N properties.
|
|
22024
|
+
* - `__effectiveI18n`: undefined
|
|
22025
|
+
* - `allowedCharPattern`: A pattern matched against individual characters the user inputs.
|
|
22026
|
+
*
|
|
22027
|
+
* When set, the field will prevent:
|
|
22028
|
+
* - `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`
|
|
22029
|
+
* - `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`
|
|
22030
|
+
* - `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`
|
|
22031
|
+
*
|
|
22032
|
+
* For example, to allow entering only numbers and minus signs, use:
|
|
22033
|
+
* `allowedCharPattern = "[\\d-]"`
|
|
22034
|
+
* - `autoselect`: If true, the input text gets fully selected when the field is focused using click or touch / tap.
|
|
22035
|
+
* - `name`: The name of this field.
|
|
22036
|
+
* - `placeholder`: A hint to the user of what can be entered in the field.
|
|
22037
|
+
* - `title`: The text usually displayed in a tooltip popup when the mouse is over the field.
|
|
22038
|
+
* - `ariaTarget`: A target element to which ARIA attributes are set.
|
|
22039
|
+
* - `errorMessage`: Error to show when the field is invalid.
|
|
22040
|
+
* - `helperText`: String used for the helper text.
|
|
22041
|
+
* - `accessibleName`: String used to label the component to screen reader users.
|
|
22042
|
+
* - `accessibleNameRef`: Id of the element used as label of the component to screen reader users.
|
|
22043
|
+
* - `clearButtonVisible`: Set to true to display the clear icon which clears the input.
|
|
22044
|
+
*
|
|
22045
|
+
* It is up to the component to choose where to place the clear icon:
|
|
22046
|
+
* in the Shadow DOM or in the light DOM. In any way, a reference to
|
|
22047
|
+
* the clear icon element should be provided via the `clearElement` getter.
|
|
22035
22048
|
* - `dir`: undefined
|
|
22036
|
-
* - `
|
|
22037
|
-
* - `
|
|
22038
|
-
* - `
|
|
22039
|
-
* - `
|
|
22040
|
-
* - `
|
|
22049
|
+
* - `_inputElementValue`: undefined (property only)
|
|
22050
|
+
* - `_boundOnClick`: undefined (property only)
|
|
22051
|
+
* - `_boundOnScroll`: undefined (property only)
|
|
22052
|
+
* - `_boundOnPaste`: undefined (property only)
|
|
22053
|
+
* - `_boundOnDrop`: undefined (property only)
|
|
22054
|
+
* - `_boundOnBeforeInput`: undefined (property only)
|
|
22055
|
+
* - `_fieldAriaController`: undefined (property only)
|
|
22056
|
+
* - `_helperController`: undefined (property only)
|
|
22057
|
+
* - `_errorController`: undefined (property only)
|
|
22041
22058
|
*
|
|
22042
22059
|
* ## Events
|
|
22043
22060
|
*
|
|
22044
22061
|
* Events that will be emitted by the component.
|
|
22045
22062
|
*
|
|
22063
|
+
* - `change`: Fired when the user commits a value change.
|
|
22064
|
+
* - `unparsable-change`: Fired when the user commits an unparsable value change and there is no change event.
|
|
22065
|
+
* - `invalid-changed`: Fired when the `invalid` property changes.
|
|
22046
22066
|
* - `opened-changed`: Fired when the `opened` property changes.
|
|
22047
|
-
* - `
|
|
22048
|
-
* - `
|
|
22049
|
-
* - `close-all-menus`: Fired when all menus should close, e.g., after pressing Tab or on submenu close.
|
|
22050
|
-
* - `items-outside-click`: Fired when a click happens outside any open sub-menus.
|
|
22067
|
+
* - `value-changed`: Fired when the `value` property changes.
|
|
22068
|
+
* - `validated`: Fired whenever the field is validated.
|
|
22051
22069
|
* - `undefined`: undefined
|
|
22052
22070
|
*
|
|
22053
22071
|
* ## Methods
|
|
22054
22072
|
*
|
|
22055
22073
|
* Methods that can be called to access component functionality.
|
|
22056
22074
|
*
|
|
22057
|
-
* - `
|
|
22058
|
-
*
|
|
22075
|
+
* - `open() => void`: Opens the dropdown.
|
|
22076
|
+
* - `close() => void`: Closes the dropdown.
|
|
22077
|
+
* - `checkValidity() => boolean`: Returns true if the current input value satisfies all constraints (if any)
|
|
22059
22078
|
*
|
|
22060
|
-
*
|
|
22061
|
-
* - `close() => void`: Closes the overlay.
|
|
22062
|
-
* - `open(e: !Event | undefined) => void`: Opens the overlay.
|
|
22079
|
+
* Override the `checkValidity` method for custom validations.
|
|
22063
22080
|
* - `createProperty(name, options) => void`: undefined
|
|
22064
22081
|
* - `getOrCreateMap(name) => void`: undefined
|
|
22065
22082
|
* - `addCheckedInitializer(initializer) => void`: undefined
|
|
22066
22083
|
* - `getPropertyDescriptor(name, key, options) => void`: undefined
|
|
22067
|
-
*
|
|
22068
|
-
* ## CSS Custom Properties
|
|
22069
|
-
*
|
|
22070
|
-
* CSS variables available for styling the component.
|
|
22071
|
-
*
|
|
22072
|
-
* - `--vaadin-context-menu-offset-top`: Used as an offset when using `position` and the context menu is aligned vertically below the target (default: `undefined`)
|
|
22073
|
-
* - `--vaadin-context-menu-offset-bottom`: Used as an offset when using `position` and the context menu is aligned vertically above the target (default: `undefined`)
|
|
22074
|
-
* - `--vaadin-context-menu-offset-start`: Used as an offset when using `position` and the context menu is aligned horizontally after the target (default: `undefined`)
|
|
22075
|
-
* - `--vaadin-context-menu-offset-end`: Used as an offset when using `position` and the context menu is aligned horizontally before the target (default: `undefined`)
|
|
22076
|
-
* - `items`: undefined (default: `undefined`)
|
|
22077
|
-
* - `<vaadin-context-menu-item>`: undefined (default: `undefined`)
|
|
22078
|
-
* - `<vaadin-item>`: undefined (default: `undefined`)
|
|
22079
|
-
* - `<vaadin-context-menu-list-box>`: undefined (default: `undefined`)
|
|
22080
|
-
* - `<vaadin-list-box>`: undefined (default: `undefined`)
|
|
22081
|
-
* - `<vaadin-context-menu-item>`: undefined (default: `undefined`)
|
|
22082
|
-
* - `<vaadin-item>`: undefined (default: `undefined`)
|
|
22083
|
-
* - `expanded`: Expanded parent item. (default: `undefined`)
|
|
22084
22084
|
*/
|
|
22085
|
-
"vaadin-
|
|
22086
|
-
|
|
22087
|
-
|
|
22088
|
-
BaseProps<
|
|
22085
|
+
"vaadin-date-picker": Partial<
|
|
22086
|
+
DatePickerProps &
|
|
22087
|
+
DatePickerSolidJsProps &
|
|
22088
|
+
BaseProps<DatePicker> &
|
|
22089
22089
|
BaseEvents
|
|
22090
22090
|
>;
|
|
22091
22091
|
|