@vonage/vivid 5.23.1 → 5.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- package/audio-player/index.cjs +2 -2
- package/audio-player/index.js +3 -3
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/bundled/definition15.cjs +8 -7
- package/bundled/definition15.js +26 -24
- package/bundled/definition17.cjs +2 -2
- package/bundled/definition17.js +2 -2
- package/bundled/definition18.cjs +12 -83
- package/bundled/definition18.js +35 -419
- package/bundled/definition19.cjs +87 -7
- package/bundled/definition19.js +432 -16
- package/bundled/definition20.cjs +7 -37
- package/bundled/definition20.js +17 -172
- package/bundled/definition21.cjs +35 -27
- package/bundled/definition21.js +154 -154
- package/bundled/definition22.cjs +29 -6
- package/bundled/definition22.js +172 -20
- package/bundled/definition23.cjs +6 -12
- package/bundled/definition23.js +17 -32
- package/bundled/definition24.cjs +12 -39
- package/bundled/definition24.js +32 -67
- package/bundled/definition25.cjs +44 -0
- package/bundled/definition25.js +77 -0
- package/bundled/extractOptions.cjs +1 -0
- package/bundled/extractOptions.js +11 -0
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +24 -11
- package/bundled/render-in-light-dom.cjs +1 -1
- package/bundled/render-in-light-dom.js +16 -19
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +9 -1
- package/combobox/definition.cjs +1 -1
- package/combobox/definition.js +1 -1
- package/combobox/index.cjs +7 -7
- package/combobox/index.js +29 -21
- package/country/definition.cjs +1 -1
- package/country/definition.js +1 -1
- package/country/index.cjs +1 -1
- package/country/index.js +1 -1
- package/country-group/definition.cjs +1 -1
- package/country-group/definition.js +1 -1
- package/country-group/index.cjs +1 -1
- package/country-group/index.js +2 -2
- package/custom-elements.json +3102 -2842
- package/data-grid/definition.cjs +1 -1
- package/data-grid/definition.js +1 -1
- package/data-grid/index.cjs +4 -4
- package/data-grid/index.js +5 -5
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +1 -1
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +1 -1
- package/dial-pad/definition.cjs +1 -1
- package/dial-pad/definition.js +1 -1
- package/dial-pad/index.cjs +24 -24
- package/dial-pad/index.js +120 -51
- package/dialog/definition.cjs +1 -1
- package/dialog/definition.js +1 -1
- package/divider/definition.cjs +1 -1
- package/divider/definition.js +1 -1
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/empty-state/definition.cjs +1 -1
- package/empty-state/definition.js +1 -1
- package/fab/definition.cjs +1 -1
- package/fab/definition.js +1 -1
- package/file-picker/definition.cjs +1 -1
- package/file-picker/definition.js +1 -1
- package/flag/definition.cjs +1 -1
- package/flag/definition.js +1 -1
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/header/index.cjs +3 -3
- package/header/index.js +3 -3
- package/index.cjs +200 -196
- package/index.js +53 -52
- package/kbd-key/definition.cjs +1 -1
- package/kbd-key/definition.js +1 -1
- package/kbd-shortcut/definition.cjs +1 -1
- package/kbd-shortcut/definition.js +1 -1
- package/layout/definition.cjs +1 -1
- package/layout/definition.js +1 -1
- package/lib/accordion-item/accordion-item.d.ts +2 -1
- package/lib/action-group/action-group.d.ts +1 -1
- package/lib/alert/alert.d.ts +2 -2
- package/lib/audio-player/audio-player.d.ts +1 -1
- package/lib/avatar/avatar.d.ts +1 -1
- package/lib/badge/badge.d.ts +1 -1
- package/lib/banner/banner.d.ts +3 -3
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/button/button.d.ts +3 -3
- package/lib/calendar-event/calendar-event.d.ts +1 -1
- package/lib/card/card.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +6 -6
- package/lib/color-picker/color-picker.d.ts +7 -7
- package/lib/combobox/combobox.d.ts +7 -7
- package/lib/components.d.ts +1 -0
- package/lib/country-group/country-group.d.ts +2 -2
- package/lib/data-grid/data-grid-cell.d.ts +4 -3
- package/lib/data-grid/data-grid-row.d.ts +3 -2
- package/lib/data-grid/data-grid.options.d.ts +5 -0
- package/lib/date-picker/date-picker.d.ts +8 -8
- package/lib/date-range-picker/date-range-picker.d.ts +4 -4
- package/lib/date-time-picker/date-time-picker.d.ts +8 -8
- package/lib/dial-pad/dial-pad.d.ts +2 -1
- package/lib/dialog/dialog.d.ts +2 -2
- package/lib/divider/divider.d.ts +1 -1
- package/lib/fab/fab.d.ts +1 -1
- package/lib/file-picker/file-picker.d.ts +7 -7
- package/lib/header/header.d.ts +1 -1
- package/lib/menu/menu.d.ts +2 -2
- package/lib/menu-item/menu-item.d.ts +3 -3
- package/lib/nav/nav.d.ts +1 -1
- package/lib/nav-disclosure/nav-disclosure.d.ts +2 -2
- package/lib/nav-item/nav-item.d.ts +2 -2
- package/lib/note/note.d.ts +1 -1
- package/lib/number-field/number-field.d.ts +9 -9
- package/lib/optgroup/definition.d.ts +3 -0
- package/lib/optgroup/index.d.ts +1 -0
- package/lib/optgroup/optgroup.d.ts +430 -0
- package/lib/optgroup/optgroup.template.d.ts +2 -0
- package/lib/optgroup/variations.browser-spec.d.ts +1 -0
- package/lib/option/option.d.ts +2 -2
- package/lib/pagination/pagination.d.ts +1 -1
- package/lib/popover/popover.d.ts +2 -2
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +1 -1
- package/lib/radio/radio.d.ts +3 -3
- package/lib/radio-group/radio-group.d.ts +1 -1
- package/lib/range-slider/range-slider.d.ts +3 -3
- package/lib/rich-text-editor/rich-text-editor.d.ts +1 -1
- package/lib/searchable-select/option-tag.d.ts +1 -1
- package/lib/searchable-select/searchable-select.d.ts +47 -47
- package/lib/select/select.d.ts +9 -9
- package/lib/selectable-box/selectable-box.d.ts +1 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +2 -2
- package/lib/slider/slider.d.ts +3 -3
- package/lib/split-button/split-button.d.ts +3 -3
- package/lib/status/status.d.ts +1 -1
- package/lib/switch/switch.d.ts +2 -2
- package/lib/tab/tab.d.ts +3 -3
- package/lib/tab-panel/tab-panel.d.ts +1 -1
- package/lib/table/table-cell.d.ts +1 -1
- package/lib/table/table-header-cell.d.ts +1 -1
- package/lib/table/table-row.d.ts +1 -1
- package/lib/table/table-sorting-button.d.ts +1 -1
- package/lib/tag/tag.d.ts +3 -3
- package/lib/tag-group/tag-group.d.ts +1 -1
- package/lib/tag-name-map.d.ts +2 -1
- package/lib/text-area/text-area.d.ts +8 -8
- package/lib/text-field/text-field.d.ts +9 -9
- package/lib/time-picker/time-picker.d.ts +4 -4
- package/lib/toggletip/toggletip.d.ts +2 -2
- package/lib/tooltip/tooltip.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +2 -2
- package/lib/tree-view/tree-view.d.ts +1 -1
- package/lib/video-player/video-player.d.ts +1 -1
- package/menu/index.cjs +1 -1
- package/menu/index.js +1 -1
- package/menu-item/index.cjs +1 -1
- package/menu-item/index.js +1 -1
- package/nav/definition.cjs +1 -1
- package/nav/definition.js +1 -1
- package/nav-disclosure/definition.cjs +1 -1
- package/nav-disclosure/definition.js +1 -1
- package/nav-item/definition.cjs +1 -1
- package/nav-item/definition.js +1 -1
- package/note/definition.cjs +1 -1
- package/note/definition.js +1 -1
- package/number-field/definition.cjs +1 -1
- package/number-field/definition.js +1 -1
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/optgroup/definition.cjs +5 -0
- package/optgroup/definition.js +2 -0
- package/optgroup/index.cjs +1 -0
- package/optgroup/index.js +4 -0
- package/package.json +6 -6
- package/pagination/definition.cjs +1 -1
- package/pagination/definition.js +1 -1
- package/platform-switch/definition.cjs +1 -1
- package/platform-switch/definition.js +1 -1
- package/popover/definition.cjs +1 -1
- package/popover/definition.js +1 -1
- package/progress/definition.cjs +1 -1
- package/progress/definition.js +1 -1
- package/radio/definition.cjs +1 -1
- package/radio/definition.js +1 -1
- package/radio-group/definition.cjs +1 -1
- package/radio-group/definition.js +1 -1
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/rich-text-editor/definition.cjs +1 -1
- package/rich-text-editor/definition.js +1 -1
- package/rich-text-editor/index.cjs +1 -1
- package/rich-text-editor/index.js +4 -4
- package/rich-text-view/definition.cjs +1 -1
- package/rich-text-view/definition.js +1 -1
- package/searchable-select/definition.cjs +1 -1
- package/searchable-select/definition.js +1 -1
- package/searchable-select/index.cjs +19 -19
- package/searchable-select/index.js +60 -45
- package/select/definition.cjs +1 -1
- package/select/definition.js +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/shared/aria/delegates-aria.d.ts +1 -1
- package/shared/aria/host-semantics.d.ts +1 -1
- package/shared/color-picker/base-color-picker.d.ts +1 -1
- package/shared/feedback/feedback-message.d.ts +1 -1
- package/shared/feedback/mixins.d.ts +2 -2
- package/shared/foundation/button/button.d.ts +2 -2
- package/shared/foundation/form-associated/form-associated.d.ts +2 -2
- package/shared/foundation/listbox/extractOptions.d.ts +2 -0
- package/shared/foundation/listbox/listbox.d.ts +2 -0
- package/shared/patterns/affix.d.ts +2 -2
- package/shared/patterns/anchored.d.ts +2 -2
- package/shared/patterns/char-count/char-count.d.ts +1 -1
- package/shared/patterns/form-elements/form-element.d.ts +1 -1
- package/shared/patterns/form-elements/with-contextual-help.d.ts +1 -1
- package/shared/patterns/form-elements/with-error-text.d.ts +1 -1
- package/shared/patterns/form-elements/with-success-text.d.ts +1 -1
- package/shared/patterns/kbd-shortcut.d.ts +1 -1
- package/shared/patterns/linkable.d.ts +1 -1
- package/shared/patterns/localized.d.ts +2 -2
- package/shared/patterns/trapped-focus.d.ts +1 -1
- package/shared/picker-field/mixins/calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +2 -2
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -1
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/single-date-picker.d.ts +2 -2
- package/shared/picker-field/mixins/single-value-picker.d.ts +2 -2
- package/shared/picker-field/mixins/time-selection-picker.d.ts +2 -2
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +4 -4
- package/shared/picker-field/picker-field.d.ts +7 -7
- package/side-drawer/definition.cjs +1 -1
- package/side-drawer/definition.js +1 -1
- package/simple-color-picker/definition.cjs +1 -1
- package/simple-color-picker/definition.js +1 -1
- package/split-button/definition.cjs +1 -1
- package/split-button/definition.js +1 -1
- package/split-button/index.cjs +1 -0
- package/split-button/index.js +1 -0
- package/status/definition.cjs +1 -1
- package/status/definition.js +1 -1
- package/switch/definition.cjs +1 -1
- package/switch/definition.js +1 -1
- package/switch/index.cjs +6 -5
- package/switch/index.js +16 -14
- package/tab/definition.cjs +1 -1
- package/tab/definition.js +1 -1
- package/tab-panel/definition.cjs +1 -1
- package/tab-panel/definition.js +1 -1
- package/table/definition.cjs +1 -1
- package/table/definition.js +1 -1
- package/tabs/definition.cjs +1 -1
- package/tabs/definition.js +1 -1
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag-group/definition.cjs +1 -1
- package/tag-group/definition.js +1 -1
- package/text-area/definition.cjs +1 -1
- package/text-area/definition.js +1 -1
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +1 -1
- package/unbundled/definition13.cjs +1 -1
- package/unbundled/definition13.js +1 -1
- package/unbundled/definition2.cjs +9 -3
- package/unbundled/definition2.js +9 -3
- package/unbundled/definition23.cjs +1 -0
- package/unbundled/definition23.js +2 -1
- package/unbundled/definition29.cjs +2 -2
- package/unbundled/definition29.js +2 -2
- package/unbundled/definition30.cjs +65 -484
- package/unbundled/definition30.js +57 -482
- package/unbundled/definition31.cjs +501 -39
- package/unbundled/definition31.js +499 -37
- package/unbundled/definition32.cjs +38 -239
- package/unbundled/definition32.js +35 -236
- package/unbundled/definition33.cjs +236 -74
- package/unbundled/definition33.js +233 -71
- package/unbundled/definition34.cjs +74 -1968
- package/unbundled/definition34.js +70 -1940
- package/unbundled/definition35.cjs +1992 -26
- package/unbundled/definition35.js +1964 -27
- package/unbundled/definition36.cjs +26 -111
- package/unbundled/definition36.js +23 -103
- package/unbundled/definition37.cjs +53 -294
- package/unbundled/definition37.js +50 -291
- package/unbundled/definition38.cjs +282 -132
- package/unbundled/definition38.js +279 -129
- package/unbundled/definition39.cjs +165 -339
- package/unbundled/definition39.js +163 -337
- package/unbundled/definition40.cjs +394 -228
- package/unbundled/definition40.js +391 -225
- package/unbundled/definition41.cjs +263 -46
- package/unbundled/definition41.js +258 -41
- package/unbundled/definition42.cjs +47 -67
- package/unbundled/definition42.js +45 -65
- package/unbundled/definition43.cjs +56 -383
- package/unbundled/definition43.js +55 -382
- package/unbundled/definition44.cjs +386 -44
- package/unbundled/definition44.js +382 -40
- package/unbundled/definition45.cjs +53 -45
- package/unbundled/definition45.js +49 -41
- package/unbundled/definition46.cjs +40 -164
- package/unbundled/definition46.js +36 -160
- package/unbundled/definition47.cjs +171 -31
- package/unbundled/definition47.js +168 -22
- package/unbundled/definition48.cjs +30 -89
- package/unbundled/definition48.js +22 -87
- package/unbundled/definition49.cjs +70 -33
- package/unbundled/definition49.js +67 -30
- package/unbundled/definition50.cjs +54 -23
- package/unbundled/definition50.js +52 -18
- package/unbundled/definition51.cjs +23 -39
- package/unbundled/definition51.js +17 -36
- package/unbundled/definition52.cjs +29 -314
- package/unbundled/definition52.js +27 -312
- package/unbundled/definition53.cjs +301 -195
- package/unbundled/definition53.js +297 -191
- package/unbundled/definition54.cjs +210 -40
- package/unbundled/definition54.js +206 -36
- package/unbundled/definition55.cjs +42 -266
- package/unbundled/definition55.js +38 -262
- package/unbundled/definition56.cjs +266 -50
- package/unbundled/definition56.js +263 -46
- package/unbundled/definition57.cjs +48 -146
- package/unbundled/definition57.js +47 -143
- package/unbundled/definition58.cjs +127 -225
- package/unbundled/definition58.js +122 -223
- package/unbundled/definition59.cjs +199 -418
- package/unbundled/definition59.js +196 -415
- package/unbundled/definition60.cjs +441 -3738
- package/unbundled/definition60.js +431 -3565
- package/unbundled/definition61.cjs +3712 -728
- package/unbundled/definition61.js +3538 -717
- package/unbundled/definition62.cjs +769 -97
- package/unbundled/definition62.js +766 -94
- package/unbundled/definition63.cjs +100 -981
- package/unbundled/definition63.js +98 -976
- package/unbundled/definition64.cjs +988 -93
- package/unbundled/definition64.js +982 -90
- package/unbundled/definition65.cjs +109 -73
- package/unbundled/definition65.js +105 -63
- package/unbundled/definition66.cjs +69 -155
- package/unbundled/definition66.js +60 -152
- package/unbundled/definition67.cjs +154 -118
- package/unbundled/definition67.js +151 -115
- package/unbundled/definition68.cjs +124 -49
- package/unbundled/definition68.js +120 -45
- package/unbundled/definition69.cjs +51 -84
- package/unbundled/definition69.js +50 -80
- package/unbundled/definition70.cjs +91 -19
- package/unbundled/definition70.js +86 -14
- package/unbundled/definition71.cjs +20 -87
- package/unbundled/definition71.js +14 -84
- package/unbundled/definition72.cjs +76 -294
- package/unbundled/definition72.js +71 -217
- package/unbundled/definition73.cjs +288 -311
- package/unbundled/definition73.js +218 -306
- package/unbundled/definition74.cjs +326 -26
- package/unbundled/definition74.js +317 -23
- package/unbundled/definition75.cjs +27 -122
- package/unbundled/definition75.js +22 -118
- package/unbundled/definition76.cjs +103 -232
- package/unbundled/definition76.js +99 -228
- package/unbundled/definition77.cjs +259 -26
- package/unbundled/definition77.js +249 -23
- package/unbundled/definition78.cjs +29 -148
- package/unbundled/definition78.js +27 -133
- package/unbundled/definition79.cjs +117 -173
- package/unbundled/definition79.js +108 -169
- package/unbundled/definition80.cjs +181 -477
- package/unbundled/definition80.js +176 -471
- package/unbundled/definition81.cjs +517 -0
- package/unbundled/definition81.js +497 -0
- package/unbundled/extractOptions.cjs +21 -0
- package/unbundled/extractOptions.js +16 -0
- package/unbundled/listbox.cjs +23 -6
- package/unbundled/listbox.js +23 -6
- package/unbundled/vivid-element.cjs +10 -1
- package/unbundled/vivid-element.js +10 -1
- package/video-player/definition.cjs +1 -1
- package/video-player/definition.js +1 -1
- package/vivid.api.json +194 -0
|
@@ -1,377 +1,203 @@
|
|
|
1
|
-
import { d as createRegisterFunction,
|
|
2
|
-
import { r as Icon, t as iconDefinition } from "./definition.js";
|
|
1
|
+
import { d as createRegisterFunction, u as defineVividComponent } from "./vivid-element.js";
|
|
3
2
|
import { t as __decorate } from "./decorate.js";
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { n as visuallyHiddenDefinition
|
|
7
|
-
import { n as textFieldDefinition
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
import { t as buttonDefinition } from "./definition6.js";
|
|
4
|
+
import { t as popupDefinition } from "./definition9.js";
|
|
5
|
+
import { n as visuallyHiddenDefinition } from "./definition22.js";
|
|
6
|
+
import { n as textFieldDefinition } from "./definition26.js";
|
|
7
|
+
import { t as dividerDefinition } from "./definition36.js";
|
|
8
|
+
import { n as PickerField, r as picker_field_default, t as PickerFieldTemplate } from "./picker-field.template.js";
|
|
9
|
+
import { a as formatPresentationDate, c as currentDateStr, i as CalendarPicker, l as isValidDateStr, o as parsePresentationDate, r as ValidDateFilter, s as compareDateStr, t as CalendarPickerTemplate, u as calendar_picker_default } from "./calendar-picker.template.js";
|
|
10
|
+
import { t as SingleValuePicker } from "./single-value-picker.js";
|
|
11
|
+
import { t as SingleDatePickerMixin } from "./single-date-picker.js";
|
|
12
|
+
import { a as formatPresentationTime, c as compareTimeStr, i as TimeSelectionPicker, l as isValidTimeStr, o as parsePresentationTime, r as ValidTimeFilter, s as inlineTimePickerDefinition, t as TimeSelectionPickerTemplate } from "./time-selection-picker.template.js";
|
|
13
|
+
import { attr, html } from "@microsoft/fast-element";
|
|
14
|
+
//#region src/lib/date-time-picker/date-time-picker.scss?inline
|
|
15
|
+
var date_time_picker_default = ".date-time-picker{gap:28px;padding-inline-start:12px;display:flex}.time-picker{padding-block:4px 12px}";
|
|
12
16
|
//#endregion
|
|
13
|
-
//#region src/
|
|
17
|
+
//#region src/shared/datetime/dateTimeStr.ts
|
|
18
|
+
var extractDatePart = (dateTimeStr) => dateTimeStr.split("T")[0] || "";
|
|
19
|
+
var extractTimePart = (dateTimeStr) => dateTimeStr.split("T")[1] || "";
|
|
20
|
+
var isValidDateTimeStr = (string) => {
|
|
21
|
+
const [dateStr = "", timeStr = ""] = string.split("T");
|
|
22
|
+
return isValidDateStr(dateStr) && isValidTimeStr(timeStr);
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/shared/datetime/presentationDateTime.ts
|
|
26
|
+
var formatPresentationDateTime = (dateTimeStr, locale, includeSeconds, use12HourClock) => {
|
|
27
|
+
const [dateStr, timeStr] = dateTimeStr.split("T");
|
|
28
|
+
return `${formatPresentationDate(dateStr, locale)} ${formatPresentationTime(timeStr, includeSeconds, use12HourClock)}`;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Attempts to parse user input as date time.
|
|
32
|
+
* Throws if input can't be parsed.
|
|
33
|
+
*/
|
|
34
|
+
var parsePresentationDateTime = (presentationDateTime, locale, use12HourClock) => {
|
|
35
|
+
const [datePart, ...timeParts] = presentationDateTime.split(" ");
|
|
36
|
+
return `${parsePresentationDate(datePart, locale)}T${parsePresentationTime(timeParts.join(" "), use12HourClock)}`;
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/lib/date-time-picker/date-time-picker.ts
|
|
40
|
+
var ValidDateTimeFilter = {
|
|
41
|
+
fromView: (value) => {
|
|
42
|
+
if (value && isValidDateTimeStr(value)) return value;
|
|
43
|
+
return "";
|
|
44
|
+
},
|
|
45
|
+
toView(value) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
14
49
|
/**
|
|
15
|
-
*
|
|
50
|
+
* Single date picker component.
|
|
16
51
|
*
|
|
17
52
|
* @public
|
|
18
|
-
* @component
|
|
19
|
-
* @
|
|
20
|
-
* @event {CustomEvent<undefined>} input - Emitted when the
|
|
21
|
-
* @event {CustomEvent<undefined>}
|
|
22
|
-
* @event {CustomEvent<undefined>} focus - Emitted when the text field receives focus
|
|
23
|
-
* @event {CustomEvent<HTMLElement>}keypad-click - Emitted when a digit button is clicked
|
|
24
|
-
* @event {CustomEvent<undefined>} dial - Emitted when the call button is clicked
|
|
25
|
-
* @event {CustomEvent<undefined>} end-call - Emitted when the end call button is clicked
|
|
53
|
+
* @component date-time-picker
|
|
54
|
+
* @slot helper-text - Describes how to use the date-picker. Alternative to the `helper-text` attribute.
|
|
55
|
+
* @event {CustomEvent<undefined>} input - Emitted when the date is changed by the user.
|
|
56
|
+
* @event {CustomEvent<undefined>} change - Emitted when the date is changed by the user.
|
|
26
57
|
* @vueModel modelValue value input,@lazy:change `event.currentTarget.value`
|
|
58
|
+
* @testAction selectDateTime selectDateTime
|
|
27
59
|
*/
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
this.
|
|
32
|
-
this.placeholder = null;
|
|
33
|
-
this.value = "";
|
|
34
|
-
this.pattern = "^[0-9#*]*$";
|
|
35
|
-
this.disabled = false;
|
|
36
|
-
this.pending = false;
|
|
37
|
-
this.callActive = false;
|
|
38
|
-
this.noCall = false;
|
|
39
|
-
this.noInput = false;
|
|
40
|
-
this.endCallButtonLabel = null;
|
|
41
|
-
this.callButtonLabel = null;
|
|
42
|
-
this.deleteAriaLabel = null;
|
|
43
|
-
this._longPressTimeoutId = null;
|
|
44
|
-
this._suppressNextClick = false;
|
|
45
|
-
this._keyboardLongPressCompleted = false;
|
|
46
|
-
this._onDial = () => {
|
|
47
|
-
if (!this._textFieldEl.checkValidity()) this._announceValidationError(this._textFieldEl.errorValidationMessage ?? "");
|
|
48
|
-
else this._clearErrorAnnouncement();
|
|
49
|
-
this.$emit(this.callActive ? "end-call" : "dial");
|
|
50
|
-
};
|
|
51
|
-
this.autofocus = false;
|
|
52
|
-
this._errorAnnouncement = "";
|
|
53
|
-
this._forceAnnouncementToggle = false;
|
|
54
|
-
}
|
|
55
|
-
valueChanged(_oldValue, newValue) {
|
|
56
|
-
if (newValue !== void 0 && newValue !== null && this._textFieldEl && newValue !== this._textFieldEl.value) {
|
|
57
|
-
this._textFieldEl.value = newValue;
|
|
58
|
-
this._textFieldEl.reportValidity();
|
|
59
|
-
}
|
|
60
|
+
var DateTimePicker = class extends TimeSelectionPicker(SingleDatePickerMixin(SingleValuePicker(CalendarPicker(PickerField)))) {
|
|
61
|
+
/** @internal */
|
|
62
|
+
get _resolvedMinDate() {
|
|
63
|
+
return this.minDate || extractDatePart(this.min);
|
|
60
64
|
}
|
|
61
65
|
/** @internal */
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this._clearLongPressTimer();
|
|
65
|
-
const target = event.currentTarget;
|
|
66
|
-
this._longPressTimeoutId = window.setTimeout(() => {
|
|
67
|
-
this._suppressNextClick = true;
|
|
68
|
-
this.value += "+";
|
|
69
|
-
this.$emit("keypad-click", target);
|
|
70
|
-
this.$emit("input");
|
|
71
|
-
this.$emit("change");
|
|
72
|
-
}, 600);
|
|
66
|
+
get _resolvedMaxDate() {
|
|
67
|
+
return this.maxDate || extractDatePart(this.max);
|
|
73
68
|
}
|
|
74
69
|
/** @internal */
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (this._longPressTimeoutId !== null) return;
|
|
78
|
-
this._keyboardLongPressCompleted = false;
|
|
79
|
-
this._longPressTimeoutId = window.setTimeout(() => {
|
|
80
|
-
this._keyboardLongPressCompleted = true;
|
|
81
|
-
this.value += "+";
|
|
82
|
-
this.$emit("input");
|
|
83
|
-
this.$emit("change");
|
|
84
|
-
}, 650);
|
|
70
|
+
get _resolvedMinTime() {
|
|
71
|
+
return this.minTime || this.min && extractDatePart(this.min) === this._dateValue() && extractTimePart(this.min) || "";
|
|
85
72
|
}
|
|
86
73
|
/** @internal */
|
|
87
|
-
|
|
88
|
-
this.
|
|
89
|
-
window.setTimeout(() => {
|
|
90
|
-
if (this._suppressNextClick) this._suppressNextClick = false;
|
|
91
|
-
}, 0);
|
|
74
|
+
get _resolvedMaxTime() {
|
|
75
|
+
return this.maxTime || this.max && extractDatePart(this.max) === this._dateValue() && extractTimePart(this.max) || "";
|
|
92
76
|
}
|
|
93
|
-
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
*/
|
|
97
|
-
_endKeyboardLongPress() {
|
|
98
|
-
const wasLongPress = this._keyboardLongPressCompleted;
|
|
99
|
-
this._clearLongPressTimer();
|
|
100
|
-
window.setTimeout(() => {
|
|
101
|
-
this._keyboardLongPressCompleted = false;
|
|
102
|
-
}, 0);
|
|
103
|
-
return wasLongPress;
|
|
77
|
+
/** @internal */
|
|
78
|
+
_toPresentationValue(value) {
|
|
79
|
+
return formatPresentationDateTime(value, this.locale.calendarPicker, this._displaySeconds, this._use12hClock);
|
|
104
80
|
}
|
|
105
81
|
/** @internal */
|
|
106
|
-
|
|
107
|
-
this.
|
|
82
|
+
_parsePresentationValue(presentationValue) {
|
|
83
|
+
return parsePresentationDateTime(presentationValue, this.locale.calendarPicker, this._use12hClock);
|
|
108
84
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
this._longPressTimeoutId = null;
|
|
113
|
-
}
|
|
85
|
+
/** @internal */
|
|
86
|
+
_dateValue() {
|
|
87
|
+
return extractDatePart(this.value);
|
|
114
88
|
}
|
|
115
|
-
/**
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
*/
|
|
119
|
-
focus() {
|
|
120
|
-
const digitBtns = this.shadowRoot?.querySelectorAll(".digits .digit-btn");
|
|
121
|
-
(this._textFieldEl || digitBtns?.[0])?.focus();
|
|
89
|
+
/** @internal */
|
|
90
|
+
_withUpdatedDate(dateStr) {
|
|
91
|
+
return `${dateStr}T${extractTimePart(this.value) || "00:00:00"}`;
|
|
122
92
|
}
|
|
123
93
|
/** @internal */
|
|
124
|
-
|
|
125
|
-
this.
|
|
126
|
-
window.queueMicrotask(() => {
|
|
127
|
-
if (message) {
|
|
128
|
-
this._forceAnnouncementToggle = !this._forceAnnouncementToggle;
|
|
129
|
-
this._errorAnnouncement = `${message}${this._forceAnnouncementToggle ? "" : ""}`;
|
|
130
|
-
} else this._clearErrorAnnouncement();
|
|
131
|
-
});
|
|
94
|
+
get _timeValue() {
|
|
95
|
+
return extractTimePart(this.value);
|
|
132
96
|
}
|
|
133
97
|
/** @internal */
|
|
134
|
-
|
|
135
|
-
this.
|
|
136
|
-
|
|
98
|
+
_withUpdatedTime(timeStr) {
|
|
99
|
+
return `${extractDatePart(this.value) || currentDateStr()}T${timeStr}`;
|
|
100
|
+
}
|
|
101
|
+
constructor() {
|
|
102
|
+
super();
|
|
103
|
+
this._isValidValue = isValidDateTimeStr;
|
|
104
|
+
this._textFieldSize = "30";
|
|
105
|
+
this.proxy.type = "datetime-local";
|
|
106
|
+
this.proxy.step = "1";
|
|
107
|
+
this.min = "";
|
|
108
|
+
this.minDate = "";
|
|
109
|
+
this.minTime = "";
|
|
110
|
+
this.max = "";
|
|
111
|
+
this.maxDate = "";
|
|
112
|
+
this.maxTime = "";
|
|
137
113
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
attribute: "call-active",
|
|
147
|
-
mode: "boolean"
|
|
148
|
-
})], DialPad.prototype, "callActive", void 0);
|
|
149
|
-
__decorate([attr({
|
|
150
|
-
mode: "boolean",
|
|
151
|
-
attribute: "no-call"
|
|
152
|
-
})], DialPad.prototype, "noCall", void 0);
|
|
153
|
-
__decorate([attr({
|
|
154
|
-
mode: "boolean",
|
|
155
|
-
attribute: "no-input"
|
|
156
|
-
})], DialPad.prototype, "noInput", void 0);
|
|
157
|
-
__decorate([attr], DialPad.prototype, "size", void 0);
|
|
158
|
-
__decorate([attr({ attribute: "end-call-button-label" })], DialPad.prototype, "endCallButtonLabel", void 0);
|
|
159
|
-
__decorate([attr({ attribute: "call-button-label" })], DialPad.prototype, "callButtonLabel", void 0);
|
|
160
|
-
__decorate([attr({ attribute: "delete-aria-label" })], DialPad.prototype, "deleteAriaLabel", void 0);
|
|
161
|
-
__decorate([attr({ mode: "boolean" })], DialPad.prototype, "autofocus", void 0);
|
|
162
|
-
__decorate([observable], DialPad.prototype, "_errorAnnouncement", void 0);
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region src/lib/dial-pad/dial-pad.template.ts
|
|
165
|
-
var DialPadButton = class {
|
|
166
|
-
constructor(value, label, ariaLabel, icon, id) {
|
|
167
|
-
this.value = value;
|
|
168
|
-
this.label = label;
|
|
169
|
-
this.ariaLabel = ariaLabel;
|
|
170
|
-
this.icon = icon;
|
|
171
|
-
this.id = id;
|
|
114
|
+
/** @internal */
|
|
115
|
+
_getCustomValidationError() {
|
|
116
|
+
if (this._isPresentationValueInvalid()) return this.locale.dateTimePicker.invalidDateTimeError;
|
|
117
|
+
if (this._dateValue() && this._resolvedMinDate && compareDateStr(this._dateValue(), this._resolvedMinDate) < 0) return this.locale.dateTimePicker.dateBeforeMinDateError(formatPresentationDate(this._resolvedMinDate, this.locale.calendarPicker));
|
|
118
|
+
if (this._dateValue() && this._resolvedMaxDate && compareDateStr(this._dateValue(), this._resolvedMaxDate) > 0) return this.locale.dateTimePicker.dateAfterMaxDateError(formatPresentationDate(this._resolvedMaxDate, this.locale.calendarPicker));
|
|
119
|
+
if (this._timeValue && this._resolvedMinTime && compareTimeStr(this._timeValue, this._resolvedMinTime) < 0) return this.locale.dateTimePicker.timeBeforeMinTimeError(formatPresentationTime(this._resolvedMinTime, this._displaySeconds, this._use12hClock));
|
|
120
|
+
if (this._timeValue && this._resolvedMaxTime && compareTimeStr(this._timeValue, this._resolvedMaxTime) > 0) return this.locale.dateTimePicker.timeAfterMaxTimeError(formatPresentationTime(this._resolvedMaxTime, this._displaySeconds, this._use12hClock));
|
|
121
|
+
return null;
|
|
172
122
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
new DialPadButton("2", "ABC", "digitTwoLabel", "two-solid", "btn2"),
|
|
177
|
-
new DialPadButton("3", "DEF", "digitThreeLabel", "three-solid", "btn3"),
|
|
178
|
-
new DialPadButton("4", "GHI", "digitFourLabel", "four-solid", "btn4"),
|
|
179
|
-
new DialPadButton("5", "JKL", "digitFiveLabel", "five-solid", "btn5"),
|
|
180
|
-
new DialPadButton("6", "MNO", "digitSixLabel", "six-solid", "btn6"),
|
|
181
|
-
new DialPadButton("7", "PQRS", "digitSevenLabel", "seven-solid", "btn7"),
|
|
182
|
-
new DialPadButton("8", "TUV", "digitEightLabel", "eight-solid", "btn8"),
|
|
183
|
-
new DialPadButton("9", "WXYZ", "digitNineLabel", "nine-solid", "btn9"),
|
|
184
|
-
new DialPadButton("*", null, "digitAsteriskLabel", "asterisk-2-solid", "btnAsterisk"),
|
|
185
|
-
new DialPadButton("0", "+", "digitZeroLabel", "zero-solid", "btn0"),
|
|
186
|
-
new DialPadButton("#", null, "digitHashtagLabel", "hashtag-solid", "btnHashtag")
|
|
187
|
-
];
|
|
188
|
-
function handleKeyDown(x, e) {
|
|
189
|
-
if (e.key === keyEnter && !x.pending && !x.disabled && !x.callActive && !x.noCall && x.value.length > 0 && e.target instanceof HTMLInputElement) x._onDial();
|
|
190
|
-
else if (e.key === " " || e.key === "Space") {
|
|
191
|
-
/* v8 ignore else -- @preserve */
|
|
192
|
-
if (e.target instanceof HTMLInputElement) {
|
|
193
|
-
e.preventDefault();
|
|
194
|
-
/* v8 ignore else -- @preserve */
|
|
195
|
-
if (!e.repeat) x._startKeyboardLongPress();
|
|
196
|
-
}
|
|
197
|
-
} else {
|
|
198
|
-
const elementIndex = DIAL_PAD_BUTTONS.findIndex((x) => x.value === e.key);
|
|
199
|
-
if (elementIndex > -1) {
|
|
200
|
-
const digit = x.shadowRoot.querySelector(".digits").children[elementIndex];
|
|
201
|
-
/* v8 ignore else -- @preserve */
|
|
202
|
-
if (digit) {
|
|
203
|
-
digit.active = true;
|
|
204
|
-
setTimeout(() => {
|
|
205
|
-
digit.active = false;
|
|
206
|
-
}, 200);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
123
|
+
/** @internal */
|
|
124
|
+
get _textFieldPlaceholder() {
|
|
125
|
+
return `${this.locale.calendarPicker.dateFormatPlaceholder} ${this._timePlaceholder}`;
|
|
209
126
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
if (e.key === " " || e.key === "Space") {
|
|
215
|
-
/* v8 ignore else -- @preserve */
|
|
216
|
-
if (e.target instanceof HTMLInputElement) {
|
|
217
|
-
e.preventDefault();
|
|
218
|
-
if (!x._endKeyboardLongPress() && !x.disabled && !x.callActive) {
|
|
219
|
-
x.value += " ";
|
|
220
|
-
x.$emit("input");
|
|
221
|
-
x.$emit("change");
|
|
222
|
-
}
|
|
223
|
-
}
|
|
127
|
+
/** @internal */
|
|
128
|
+
get _pickerButtonLabel() {
|
|
129
|
+
if (this.value) return this.locale.dateTimePicker.changeDateTimeLabel(this._toPresentationValue(this.value));
|
|
130
|
+
else return this.locale.dateTimePicker.chooseDateTimeLabel;
|
|
224
131
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
/* v8 ignore else -- @preserve */
|
|
229
|
-
if ((event.key === " " || event.key === "Space") && digit.value === "0") {
|
|
230
|
-
event.preventDefault();
|
|
231
|
-
/* v8 ignore else -- @preserve */
|
|
232
|
-
if (!event.repeat) dialPad._startKeyboardLongPress();
|
|
132
|
+
/** @internal */
|
|
133
|
+
_focusableElsWithinDialog() {
|
|
134
|
+
return this._dialogEl.querySelectorAll("#inline-time-picker, button, .vwc-button");
|
|
233
135
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
/* v8 ignore else -- @preserve */
|
|
238
|
-
if ((event.key === " " || event.key === "Space") && digit.value === "0") {
|
|
239
|
-
event.preventDefault();
|
|
240
|
-
/* v8 ignore else -- @preserve */
|
|
241
|
-
if (!dialPad._endKeyboardLongPress() && !dialPad.disabled && !dialPad.callActive) onDigitClick(digit, {
|
|
242
|
-
parent: dialPad,
|
|
243
|
-
event: new MouseEvent("click", { bubbles: true })
|
|
244
|
-
});
|
|
136
|
+
/** @internal */
|
|
137
|
+
get _pickerButtonIcon() {
|
|
138
|
+
return "calendar-clock-line";
|
|
245
139
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
x.value = x._textFieldEl.value;
|
|
250
|
-
}
|
|
251
|
-
function stopPropagation(_, { event: e }) {
|
|
252
|
-
e.stopImmediatePropagation();
|
|
253
|
-
}
|
|
254
|
-
function deleteLastCharacter(dialPad) {
|
|
255
|
-
dialPad.value = dialPad.value.slice(0, -1);
|
|
256
|
-
dialPad.$emit("input");
|
|
257
|
-
dialPad.$emit("change");
|
|
258
|
-
if (dialPad.value === "") dialPad._textFieldEl?.focus();
|
|
259
|
-
}
|
|
260
|
-
function renderTextField(textFieldTag, buttonTag) {
|
|
261
|
-
return html`<${textFieldTag} ${ref("_textFieldEl")} class="phone-field" internal-part type="tel"
|
|
262
|
-
value="${(x) => x.value}" placeholder="${(x) => x.placeholder}"
|
|
263
|
-
?disabled="${(x) => x.disabled}" helper-text="${(x) => x.helperText}" pattern="${(x) => x.pattern}"
|
|
264
|
-
aria-label="${(x) => x.locale.dialPad.inputLabel}"
|
|
265
|
-
@keydown="${(x, c) => handleKeyDown(x, c.event)}"
|
|
266
|
-
@keyup="${(x, c) => handleKeyUp(x, c.event)}"
|
|
267
|
-
@input="${syncFieldAndPadValues}"
|
|
268
|
-
@change="${syncFieldAndPadValues}"
|
|
269
|
-
@focus="${stopPropagation}"
|
|
270
|
-
@blur="${stopPropagation}"
|
|
271
|
-
?autofocus="${(x) => x.autofocus}"
|
|
272
|
-
scale="${(x) => x.size === "condensed" ? "condensed" : "normal"}">
|
|
273
|
-
>
|
|
274
|
-
${when((x) => x.value && x.value.length && x.value.length > 0, html`<${buttonTag}
|
|
275
|
-
slot="action-items"
|
|
276
|
-
size='super-condensed'
|
|
277
|
-
icon="backspace-line"
|
|
278
|
-
aria-label="${(x) => x.deleteAriaLabel || x.locale.dialPad.deleteButtonLabel}"
|
|
279
|
-
appearance='ghost'
|
|
280
|
-
?disabled="${(x) => x.disabled || x.callActive}"
|
|
281
|
-
@click="${(x) => deleteLastCharacter(x)}">
|
|
282
|
-
</${buttonTag}>`)}
|
|
283
|
-
</${textFieldTag}>`;
|
|
284
|
-
}
|
|
285
|
-
function onDigitClick(digit, { parent: dialPad, event }) {
|
|
286
|
-
if (dialPad._suppressNextClick) {
|
|
287
|
-
dialPad._suppressNextClick = false;
|
|
288
|
-
return;
|
|
140
|
+
/** @internal */
|
|
141
|
+
get _dialogLabel() {
|
|
142
|
+
return this.locale.dateTimePicker.chooseDateTimeLabel;
|
|
289
143
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
<${iconTag} slot="icon"
|
|
324
|
-
name="${(x) => x.icon}"
|
|
325
|
-
class="digit-btn-num"></${iconTag}>
|
|
326
|
-
</${buttonTag}>
|
|
327
|
-
`, { positioning: true })}
|
|
328
|
-
`;
|
|
329
|
-
}
|
|
330
|
-
function renderDialButton(buttonTag) {
|
|
331
|
-
return html`<${buttonTag} class="call-btn"
|
|
332
|
-
size="${(x) => x.size === "condensed" ? "normal" : "expanded"}"
|
|
333
|
-
appearance="filled"
|
|
334
|
-
icon="${(x) => x.callActive ? "disable-call-line" : "call-line"}"
|
|
335
|
-
connotation="${(x) => x.callActive ? "alert" : "cta"}"
|
|
336
|
-
?disabled="${(x) => x.disabled}"
|
|
337
|
-
?pending="${(x) => x.pending}"
|
|
338
|
-
@click="${(x) => x._onDial()}"
|
|
339
|
-
label="${(x) => x.callActive ? x.endCallButtonLabel || x.locale.dialPad.endCallButtonLabel : x.callButtonLabel || x.locale.dialPad.callButtonLabel}">
|
|
340
|
-
</${buttonTag}>`;
|
|
341
|
-
}
|
|
342
|
-
function renderErrorAnnouncement(visuallyHiddenTag) {
|
|
343
|
-
return html`<${visuallyHiddenTag} role="alert" aria-atomic="true">
|
|
344
|
-
${(x) => `${x.locale.dialPad.errorLabel} ${x._errorAnnouncement}`}
|
|
345
|
-
</${visuallyHiddenTag}>`;
|
|
346
|
-
}
|
|
347
|
-
var DialPadTemplate = (context) => {
|
|
348
|
-
const buttonTag = context.tagFor(Button);
|
|
349
|
-
const iconTag = context.tagFor(Icon);
|
|
350
|
-
const textFieldTag = context.tagFor(TextField);
|
|
351
|
-
const visuallyHiddenTag = context.tagFor(VisuallyHidden);
|
|
352
|
-
return html` <div
|
|
353
|
-
class="${(x) => classNames("base", [`size-${x.size}`, Boolean(x.size)], ["no-input", x.noInput])}"
|
|
354
|
-
>
|
|
355
|
-
${when((x) => !x.noInput, renderTextField(textFieldTag, buttonTag))}
|
|
356
|
-
<div class="digits">${renderDigits(buttonTag, iconTag)}</div>
|
|
357
|
-
${when((x) => !x.noCall, renderDialButton(buttonTag))}
|
|
358
|
-
${renderErrorAnnouncement(visuallyHiddenTag)}
|
|
359
|
-
</div>`;
|
|
144
|
+
};
|
|
145
|
+
__decorate([attr({ converter: ValidDateTimeFilter })], DateTimePicker.prototype, "min", void 0);
|
|
146
|
+
__decorate([attr({
|
|
147
|
+
converter: ValidTimeFilter,
|
|
148
|
+
attribute: "min-time"
|
|
149
|
+
})], DateTimePicker.prototype, "minTime", void 0);
|
|
150
|
+
__decorate([attr({
|
|
151
|
+
converter: ValidDateFilter,
|
|
152
|
+
attribute: "min-date"
|
|
153
|
+
})], DateTimePicker.prototype, "minDate", void 0);
|
|
154
|
+
__decorate([attr({ converter: ValidDateTimeFilter })], DateTimePicker.prototype, "max", void 0);
|
|
155
|
+
__decorate([attr({
|
|
156
|
+
converter: ValidTimeFilter,
|
|
157
|
+
attribute: "max-time"
|
|
158
|
+
})], DateTimePicker.prototype, "maxTime", void 0);
|
|
159
|
+
__decorate([attr({
|
|
160
|
+
converter: ValidDateFilter,
|
|
161
|
+
attribute: "max-date"
|
|
162
|
+
})], DateTimePicker.prototype, "maxDate", void 0);
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/lib/date-time-picker/date-time-picker.template.ts
|
|
165
|
+
var DateTimePickerTemplate = (context) => {
|
|
166
|
+
return PickerFieldTemplate(context, html`
|
|
167
|
+
<div class="date-time-picker">
|
|
168
|
+
${() => CalendarPickerTemplate(context)}
|
|
169
|
+
<div class="time-picker">
|
|
170
|
+
${() => TimeSelectionPickerTemplate(context, 9)}
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
`, {
|
|
174
|
+
withSeparator: false,
|
|
175
|
+
padded: false
|
|
176
|
+
});
|
|
360
177
|
};
|
|
361
178
|
//#endregion
|
|
362
|
-
//#region src/lib/
|
|
179
|
+
//#region src/lib/date-time-picker/definition.ts
|
|
363
180
|
/** @internal */
|
|
364
|
-
var
|
|
181
|
+
var dateTimePickerDefinition = defineVividComponent("date-time-picker", DateTimePicker, DateTimePickerTemplate, [
|
|
365
182
|
buttonDefinition,
|
|
183
|
+
popupDefinition,
|
|
366
184
|
textFieldDefinition,
|
|
367
|
-
|
|
185
|
+
dividerDefinition,
|
|
186
|
+
inlineTimePickerDefinition,
|
|
368
187
|
visuallyHiddenDefinition
|
|
369
|
-
], {
|
|
188
|
+
], {
|
|
189
|
+
styles: [
|
|
190
|
+
picker_field_default,
|
|
191
|
+
calendar_picker_default,
|
|
192
|
+
date_time_picker_default
|
|
193
|
+
],
|
|
194
|
+
shadowOptions: { delegatesFocus: true }
|
|
195
|
+
});
|
|
370
196
|
/**
|
|
371
|
-
* Registers the
|
|
197
|
+
* Registers the date-time-picker element with the design system.
|
|
372
198
|
*
|
|
373
199
|
* @param prefix - the prefix to use for the component name
|
|
374
200
|
*/
|
|
375
|
-
var
|
|
201
|
+
var registerDateTimePicker = createRegisterFunction(dateTimePickerDefinition);
|
|
376
202
|
//#endregion
|
|
377
|
-
export {
|
|
203
|
+
export { registerDateTimePicker as n, DateTimePicker as r, dateTimePickerDefinition as t };
|