q2-tecton-elements 1.72.0 → 1.73.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/dist/bundle-report.json +39545 -34361
- package/dist/cjs/{charting-ClN1ldqv.js → charting-CdNTrVBe.js} +80 -0
- package/dist/cjs/click-elsewhere_3.cjs.entry.js +81 -14
- package/dist/cjs/{dataSample-BYR-wrOn.js → dataSample-B4blhlH4.js} +1 -1
- package/dist/cjs/date-picker-helpers-UYvPn98R.js +257 -0
- package/dist/cjs/{index-BY3aao8R.js → index-BqyWHpNu.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +98 -18
- package/dist/cjs/q2-avatar.cjs.entry.js +34 -1
- package/dist/cjs/q2-badge_2.cjs.entry.js +3 -3
- package/dist/cjs/q2-btn_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-calendar.cjs.entry.js +9 -4
- package/dist/cjs/q2-card-image.cjs.entry.js +3 -3
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
- package/dist/cjs/q2-carousel.cjs.entry.js +20 -6
- package/dist/cjs/q2-chart-area.cjs.entry.js +38 -7
- package/dist/cjs/q2-chart-bar.cjs.entry.js +39 -8
- package/dist/cjs/q2-chart-donut.cjs.entry.js +31 -13
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox_2.cjs.entry.js +8 -5
- package/dist/cjs/q2-context.cjs.entry.js +4 -4
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +7 -7
- package/dist/cjs/q2-date-calendar.cjs.entry.js +452 -0
- package/dist/cjs/q2-date-picker_2.cjs.entry.js +968 -0
- package/dist/cjs/q2-detail.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/q2-editable-field.cjs.entry.js +20 -7
- package/dist/cjs/q2-example.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +2 -2
- package/dist/cjs/q2-form.cjs.entry.js +1 -1
- package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-item.cjs.entry.js +20 -2
- package/dist/cjs/q2-legend.cjs.entry.js +1 -1
- package/dist/cjs/q2-link_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +3 -3
- package/dist/cjs/q2-meter.cjs.entry.js +2 -2
- package/dist/cjs/q2-modal.cjs.entry.js +2 -2
- package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
- package/dist/cjs/q2-mutation-observer.cjs.entry.js +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-otp.cjs.entry.js +5 -5
- package/dist/cjs/q2-pagination.cjs.entry.js +12 -6
- package/dist/cjs/q2-pill.cjs.entry.js +8 -5
- package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio.cjs.entry.js +2 -2
- package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
- package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
- package/dist/cjs/q2-search.cjs.entry.js +3 -3
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +8 -4
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
- package/dist/cjs/q2-surface.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
- package/dist/cjs/q2-toast.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/{sectorHelper-9TWL-3dw.js → sectorHelper-CxhDl5ql.js} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.css +52 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +98 -18
- package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.vr.js +124 -0
- package/dist/collection/components/q2-avatar/q2-avatar.js +34 -1
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.vr.js +79 -4
- package/dist/collection/components/q2-btn/q2-btn.css +84 -136
- package/dist/collection/components/q2-btn/q2-btn.js +10 -4
- package/dist/collection/components/q2-btn/test/q2-btn-test.vr.js +99 -43
- package/dist/collection/components/q2-calendar/q2-calendar.js +16 -5
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.vr.js +3 -13
- package/dist/collection/components/q2-card-image/q2-card-image.js +2 -2
- package/dist/collection/components/q2-carousel/q2-carousel.js +19 -5
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.vr.js +32 -0
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.css +11 -0
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +53 -7
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.vr.js +14 -0
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.css +11 -0
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +50 -4
- package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.vr.js +14 -0
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +30 -10
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.vr.js +25 -0
- package/dist/collection/components/q2-checkbox/q2-checkbox.js +6 -3
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +6 -3
- package/dist/collection/components/q2-context/q2-context.js +3 -3
- package/dist/collection/components/q2-context/test/q2-context-test.vr.js +3 -3
- package/dist/collection/components/q2-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.css +3 -0
- package/dist/collection/components/q2-data-table/q2-data-table.js +5 -5
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.vr.js +47 -0
- package/dist/collection/components/q2-date-calendar/q2-date-calendar.css +393 -0
- package/dist/collection/components/q2-date-calendar/q2-date-calendar.js +1022 -0
- package/dist/collection/components/q2-date-calendar/test/q2-date-calendar-test.vr.js +111 -0
- package/dist/collection/components/q2-date-picker/q2-date-picker.css +138 -0
- package/dist/collection/components/q2-date-picker/q2-date-picker.js +2010 -0
- package/dist/collection/components/q2-date-picker/test/q2-date-picker-test.vr.js +179 -0
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +5 -5
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +27 -8
- package/dist/collection/components/q2-example/q2-example.js +1 -1
- package/dist/collection/components/q2-file-picker/q2-file-picker.js +1 -1
- package/dist/collection/components/q2-form/q2-form.js +1 -1
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
- package/dist/collection/components/q2-input/formatting/phone-number-formats.js +1 -1
- package/dist/collection/components/q2-input/q2-input.js +6 -3
- package/dist/collection/components/q2-item/q2-item.js +19 -1
- package/dist/collection/components/q2-item/test/q2-item-test.vr.js +2 -2
- package/dist/collection/components/q2-legend/q2-legend.js +1 -1
- package/dist/collection/components/q2-list/q2-list.js +1 -1
- package/dist/collection/components/q2-message/q2-message.css +1 -1
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-message/test/q2-message-test.vr.js +11 -2
- package/dist/collection/components/q2-meter/q2-meter.js +1 -1
- package/dist/collection/components/q2-modal/q2-modal.js +1 -1
- package/dist/collection/components/q2-modal/test/q2-modal-test.vr.js +7 -7
- package/dist/collection/components/q2-mutation-observer/q2-mutation-observer.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-option-list/q2-option-list.js +36 -4
- package/dist/collection/components/q2-otp/q2-otp.js +4 -4
- package/dist/collection/components/q2-pagination/q2-pagination.css +17 -0
- package/dist/collection/components/q2-pagination/q2-pagination.js +10 -4
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.vr.js +39 -0
- package/dist/collection/components/q2-pill/q2-pill.css +14 -10
- package/dist/collection/components/q2-pill/q2-pill.js +6 -3
- package/dist/collection/components/q2-pill/test/q2-pill-test.vr.js +25 -0
- package/dist/collection/components/q2-popover/q2-popover.css +1 -0
- package/dist/collection/components/q2-popover/q2-popover.js +43 -8
- package/dist/collection/components/q2-radio/q2-radio.js +5 -2
- package/dist/collection/components/q2-radio-group/q2-radio-group.js +6 -3
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
- package/dist/collection/components/q2-search/q2-search.js +6 -3
- package/dist/collection/components/q2-section/q2-section.js +2 -2
- package/dist/collection/components/q2-select/q2-select.js +12 -5
- package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
- package/dist/collection/components/q2-surface/q2-surface.js +1 -1
- package/dist/collection/components/q2-surface/test/q2-surface-test.vr.js +2 -2
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +6 -3
- package/dist/collection/components/q2-textarea/q2-textarea.js +6 -3
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.vr.js +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/chart-keyboard.js +76 -0
- package/dist/collection/utils/date-picker/date-picker-helpers.js +239 -0
- package/dist/collection/utils/date-picker/date-picker-types.js +1 -0
- package/dist/collection/utils/index.js +1 -1
- package/dist/components/charting.js +1603 -1532
- package/dist/components/dataSample.js +7 -7
- package/dist/components/index.js +57 -53
- package/dist/components/index2.js +2 -2
- package/dist/components/q2-action-sheet.js +224 -103
- package/dist/components/q2-avatar2.js +41 -27
- package/dist/components/q2-btn2.js +2 -2
- package/dist/components/q2-calendar.js +6 -3
- package/dist/components/q2-card-image.js +2 -2
- package/dist/components/q2-carousel-pane2.js +3 -3
- package/dist/components/q2-carousel.js +37 -24
- package/dist/components/q2-chart-area.js +415 -369
- package/dist/components/q2-chart-bar.js +193 -148
- package/dist/components/q2-chart-donut.js +185 -158
- package/dist/components/q2-checkbox-group.js +6 -6
- package/dist/components/q2-checkbox2.js +11 -11
- package/dist/components/q2-context.js +20 -20
- package/dist/components/q2-currency.js +9 -9
- package/dist/components/q2-data-table.js +111 -111
- package/dist/components/q2-date-calendar.d.ts +11 -0
- package/dist/components/q2-date-calendar.js +5 -0
- package/dist/components/q2-date-calendar2.js +678 -0
- package/dist/components/q2-date-picker.d.ts +11 -0
- package/dist/components/q2-date-picker.js +5 -0
- package/dist/components/q2-date-picker2.js +875 -0
- package/dist/components/q2-detail.js +3 -3
- package/dist/components/q2-dropdown.js +17 -17
- package/dist/components/q2-editable-field.js +16 -5
- package/dist/components/q2-example.js +11 -11
- package/dist/components/q2-file-picker.js +1 -1
- package/dist/components/q2-form.js +6 -6
- package/dist/components/q2-formatted-text.js +2 -2
- package/dist/components/q2-input2.js +6 -6
- package/dist/components/q2-item2.js +32 -22
- package/dist/components/q2-legend2.js +7 -7
- package/dist/components/q2-list2.js +6 -6
- package/dist/components/q2-message2.js +10 -10
- package/dist/components/q2-meter.js +7 -7
- package/dist/components/q2-modal.js +22 -22
- package/dist/components/q2-month-picker.js +17 -17
- package/dist/components/q2-mutation-observer.js +1 -1
- package/dist/components/q2-optgroup2.js +7 -7
- package/dist/components/q2-option-list2.js +55 -34
- package/dist/components/q2-otp.js +8 -8
- package/dist/components/q2-pagination.js +70 -68
- package/dist/components/q2-pill.js +51 -46
- package/dist/components/q2-popover2.js +70 -49
- package/dist/components/q2-radio-group.js +7 -7
- package/dist/components/q2-radio.js +6 -6
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +1 -1
- package/dist/components/q2-search.js +5 -5
- package/dist/components/q2-section.js +17 -17
- package/dist/components/q2-select2.js +2 -2
- package/dist/components/q2-stepper-pane.js +29 -29
- package/dist/components/q2-stepper-vertical.js +4 -4
- package/dist/components/q2-stepper.js +57 -57
- package/dist/components/q2-surface.js +3 -3
- package/dist/components/q2-tab-container.js +21 -21
- package/dist/components/q2-tab-pane.js +6 -6
- package/dist/components/q2-tag2.js +8 -6
- package/dist/components/q2-textarea.js +3 -3
- package/dist/components/sectorHelper.js +78 -78
- package/dist/components/tecton-tab-pane.js +10 -10
- package/dist/esm/{charting-DOZct-UB.js → charting-DFXJklqs.js} +79 -1
- package/dist/esm/click-elsewhere_3.entry.js +81 -14
- package/dist/esm/{dataSample-Dm1zpQNi.js → dataSample-CP_VKNqt.js} +1 -1
- package/dist/esm/date-picker-helpers-D8QnN_AS.js +242 -0
- package/dist/esm/{index-DJw6Feh0.js → index-CP8pXJ-l.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +99 -19
- package/dist/esm/q2-avatar.entry.js +34 -1
- package/dist/esm/q2-badge_2.entry.js +3 -3
- package/dist/esm/q2-btn_2.entry.js +2 -2
- package/dist/esm/q2-calendar.entry.js +9 -4
- package/dist/esm/q2-card-image.entry.js +3 -3
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +3 -3
- package/dist/esm/q2-carousel.entry.js +20 -6
- package/dist/esm/q2-chart-area.entry.js +38 -7
- package/dist/esm/q2-chart-bar.entry.js +39 -8
- package/dist/esm/q2-chart-donut.entry.js +31 -13
- package/dist/esm/q2-checkbox-group.entry.js +2 -2
- package/dist/esm/q2-checkbox_2.entry.js +8 -5
- package/dist/esm/q2-context.entry.js +4 -4
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +7 -7
- package/dist/esm/q2-date-calendar.entry.js +450 -0
- package/dist/esm/q2-date-picker_2.entry.js +965 -0
- package/dist/esm/q2-detail.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +3 -3
- package/dist/esm/q2-editable-field.entry.js +20 -7
- package/dist/esm/q2-example.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +2 -2
- package/dist/esm/q2-form.entry.js +1 -1
- package/dist/esm/q2-formatted-text.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-item.entry.js +20 -2
- package/dist/esm/q2-legend.entry.js +1 -1
- package/dist/esm/q2-link_2.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +3 -3
- package/dist/esm/q2-meter.entry.js +2 -2
- package/dist/esm/q2-modal.entry.js +2 -2
- package/dist/esm/q2-month-picker.entry.js +3 -3
- package/dist/esm/q2-mutation-observer.entry.js +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-otp.entry.js +5 -5
- package/dist/esm/q2-pagination.entry.js +12 -6
- package/dist/esm/q2-pill.entry.js +8 -5
- package/dist/esm/q2-radio-group.entry.js +2 -2
- package/dist/esm/q2-radio.entry.js +2 -2
- package/dist/esm/q2-relative-time.entry.js +2 -2
- package/dist/esm/q2-resize-observer.entry.js +1 -1
- package/dist/esm/q2-search.entry.js +3 -3
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +8 -4
- package/dist/esm/q2-stepper-pane.entry.js +2 -2
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +2 -2
- package/dist/esm/q2-surface.entry.js +1 -1
- package/dist/esm/q2-tab-container.entry.js +2 -2
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +2 -2
- package/dist/esm/q2-toast.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- package/dist/esm/{sectorHelper--RMGWGAy.js → sectorHelper-DBtkWtpl.js} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/{charting-DOZct-UB.js → charting-DFXJklqs.js} +1625 -1554
- package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +85 -43
- package/dist/q2-tecton-elements/{dataSample-Dm1zpQNi.js → dataSample-CP_VKNqt.js} +33 -33
- package/dist/q2-tecton-elements/date-picker-helpers-D8QnN_AS.js +153 -0
- package/dist/q2-tecton-elements/{index-DJw6Feh0.js → index-CP8pXJ-l.js} +1 -1
- package/dist/q2-tecton-elements/q2-action-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +169 -84
- package/dist/q2-tecton-elements/q2-avatar.entry.js +24 -10
- package/dist/q2-tecton-elements/q2-badge_2.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-btn_2.entry.js +23 -23
- package/dist/q2-tecton-elements/q2-calendar.entry.js +7 -4
- package/dist/q2-tecton-elements/q2-card-image.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-carousel.entry.js +24 -11
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +187 -141
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +377 -333
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +184 -158
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +20 -18
- package/dist/q2-tecton-elements/q2-context.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-currency.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-data-table.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-date-calendar.entry.js +438 -0
- package/dist/q2-tecton-elements/q2-date-picker_2.entry.js +792 -0
- package/dist/q2-tecton-elements/q2-detail.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +16 -16
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +17 -6
- package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-form.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-icon.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-item.entry.js +26 -16
- package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-link_2.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-message.entry.js +29 -29
- package/dist/q2-tecton-elements/q2-meter.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-modal.entry.js +18 -18
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-mutation-observer.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-option.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-otp.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-pagination.entry.js +51 -49
- package/dist/q2-tecton-elements/q2-pill.entry.js +22 -17
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-radio.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-search.entry.js +31 -31
- package/dist/q2-tecton-elements/q2-section.entry.js +20 -20
- package/dist/q2-tecton-elements/q2-select.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +10 -10
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-stepper.entry.js +45 -45
- package/dist/q2-tecton-elements/q2-surface.entry.js +15 -15
- package/dist/q2-tecton-elements/q2-tab-container.entry.js +20 -20
- package/dist/q2-tecton-elements/q2-tab-pane.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-toast.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
- package/dist/q2-tecton-elements/{sectorHelper--RMGWGAy.js → sectorHelper-DBtkWtpl.js} +56 -56
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +9 -9
- package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +21 -1
- package/dist/types/components/q2-action-sheet/test/q2-action-sheet-test.vr.d.ts +1 -0
- package/dist/types/components/q2-avatar/q2-avatar.d.ts +5 -0
- package/dist/types/components/q2-btn/q2-btn.d.ts +7 -3
- package/dist/types/components/q2-calendar/q2-calendar.d.ts +10 -2
- package/dist/types/components/q2-carousel/q2-carousel.d.ts +5 -0
- package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +11 -2
- package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +9 -0
- package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +1 -0
- package/dist/types/components/q2-checkbox/q2-checkbox.d.ts +4 -3
- package/dist/types/components/q2-checkbox-group/q2-checkbox-group.d.ts +4 -2
- package/dist/types/components/q2-date-calendar/q2-date-calendar.d.ts +122 -0
- package/dist/types/components/q2-date-calendar/test/q2-date-calendar-test.vr.d.ts +1 -0
- package/dist/types/components/q2-date-picker/q2-date-picker.d.ts +304 -0
- package/dist/types/components/q2-date-picker/test/q2-date-picker-test.vr.d.ts +1 -0
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +3 -3
- package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +14 -1
- package/dist/types/components/q2-input/q2-input.d.ts +4 -2
- package/dist/types/components/q2-item/q2-item.d.ts +3 -0
- package/dist/types/components/q2-option-list/q2-option-list.d.ts +1 -0
- package/dist/types/components/q2-popover/q2-popover.d.ts +4 -0
- package/dist/types/components/q2-radio/q2-radio.d.ts +3 -2
- package/dist/types/components/q2-radio-group/q2-radio-group.d.ts +4 -2
- package/dist/types/components/q2-search/q2-search.d.ts +3 -1
- package/dist/types/components/q2-select/q2-select.d.ts +4 -2
- package/dist/types/components/q2-textarea/q2-textarea.d.ts +4 -2
- package/dist/types/components.d.ts +858 -49
- package/dist/types/global.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/chart-keyboard.d.ts +16 -0
- package/dist/types/utils/date-picker/date-picker-helpers.d.ts +47 -0
- package/dist/types/utils/date-picker/date-picker-types.d.ts +42 -0
- package/package.json +3 -3
- package/dist/cjs/q2-optgroup.cjs.entry.js +0 -70
- package/dist/esm/q2-optgroup.entry.js +0 -68
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +0 -88
|
@@ -0,0 +1,1022 @@
|
|
|
1
|
+
import { h, } from "@stencil/core";
|
|
2
|
+
import { addDays, isSameDay, isValid as isValidDate } from "date-fns";
|
|
3
|
+
import { loc } from "../../utils";
|
|
4
|
+
import { formatDisplayDate, formatDateFull, formatDateISO, getDays, getDaysOfWeek, isDateSelectable, isRangeSelectable, localizeDatePickerString, normalizeDisplayFormat, parseDatePickerValue, setupMonthYear, } from "../../utils/date-picker/date-picker-helpers";
|
|
5
|
+
/**
|
|
6
|
+
* @name Date Calendar
|
|
7
|
+
* @category Forms
|
|
8
|
+
* @summary Use for selecting dates from a standalone calendar.
|
|
9
|
+
*/
|
|
10
|
+
export class Q2DateCalendar {
|
|
11
|
+
constructor() {
|
|
12
|
+
// #region Own Properties
|
|
13
|
+
this.dayAbbrStrings = getDays();
|
|
14
|
+
this.dayStrings = getDaysOfWeek();
|
|
15
|
+
this.rangeError = '';
|
|
16
|
+
/** Uses the action-sheet calendar presentation. */
|
|
17
|
+
this.actionSheet = false;
|
|
18
|
+
/** Controls whether navigation appears above or below the date grid. */
|
|
19
|
+
this.direction = 'down';
|
|
20
|
+
/** Disables calendar interaction. */
|
|
21
|
+
this.disabled = false;
|
|
22
|
+
/** Formats calendar and range labels using the provided locale. */
|
|
23
|
+
this.locale = document.documentElement.lang || 'en-US';
|
|
24
|
+
/** Selects single-date or range calendar behavior. */
|
|
25
|
+
this.mode = 'single';
|
|
26
|
+
/** Indicates that a new calendar session has opened. */
|
|
27
|
+
this.open = false;
|
|
28
|
+
/** Prevents calendar selection while retaining calendar visibility. */
|
|
29
|
+
this.readonly = false;
|
|
30
|
+
this.onDateHover = (event) => {
|
|
31
|
+
const button = event.currentTarget;
|
|
32
|
+
if (button.disabled || !this.isRangeMode || !this.rangeDraftStart || this.rangeDraftEnd)
|
|
33
|
+
return;
|
|
34
|
+
const hoverDate = parseDatePickerValue(button.dataset.date);
|
|
35
|
+
this.rangeHoverDate = isValidDate(hoverDate) && this.isDateValid(hoverDate) ? hoverDate : undefined;
|
|
36
|
+
};
|
|
37
|
+
this.onDateHoverEnd = () => {
|
|
38
|
+
this.rangeHoverDate = undefined;
|
|
39
|
+
};
|
|
40
|
+
this.onDateKeydown = (event) => {
|
|
41
|
+
const button = event.target.closest('button[data-date]');
|
|
42
|
+
if (!button)
|
|
43
|
+
return;
|
|
44
|
+
const currentDate = parseDatePickerValue(button.dataset.date);
|
|
45
|
+
let nextDate;
|
|
46
|
+
let navigationDirection;
|
|
47
|
+
switch (event.key) {
|
|
48
|
+
case 'Escape':
|
|
49
|
+
event.preventDefault();
|
|
50
|
+
this.resetRangeDraft();
|
|
51
|
+
this.tctCalendarDismiss.emit();
|
|
52
|
+
return;
|
|
53
|
+
case 'ArrowUp':
|
|
54
|
+
nextDate = addDays(currentDate, -7);
|
|
55
|
+
navigationDirection = -1;
|
|
56
|
+
break;
|
|
57
|
+
case 'ArrowDown':
|
|
58
|
+
nextDate = addDays(currentDate, 7);
|
|
59
|
+
navigationDirection = 1;
|
|
60
|
+
break;
|
|
61
|
+
case 'ArrowLeft':
|
|
62
|
+
nextDate = addDays(currentDate, -1);
|
|
63
|
+
navigationDirection = -1;
|
|
64
|
+
break;
|
|
65
|
+
case 'ArrowRight':
|
|
66
|
+
nextDate = addDays(currentDate, 1);
|
|
67
|
+
navigationDirection = 1;
|
|
68
|
+
break;
|
|
69
|
+
case 'Home':
|
|
70
|
+
nextDate = addDays(currentDate, -currentDate.getDay());
|
|
71
|
+
navigationDirection = 1;
|
|
72
|
+
break;
|
|
73
|
+
case 'End':
|
|
74
|
+
nextDate = addDays(currentDate, 6 - currentDate.getDay());
|
|
75
|
+
navigationDirection = -1;
|
|
76
|
+
break;
|
|
77
|
+
case 'PageUp':
|
|
78
|
+
nextDate = new Date(currentDate.getFullYear() - (event.shiftKey ? 1 : 0), currentDate.getMonth() - (event.shiftKey ? 0 : 1), currentDate.getDate());
|
|
79
|
+
navigationDirection = -1;
|
|
80
|
+
break;
|
|
81
|
+
case 'PageDown':
|
|
82
|
+
nextDate = new Date(currentDate.getFullYear() + (event.shiftKey ? 1 : 0), currentDate.getMonth() + (event.shiftKey ? 0 : 1), currentDate.getDate());
|
|
83
|
+
navigationDirection = 1;
|
|
84
|
+
break;
|
|
85
|
+
default:
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
event.preventDefault();
|
|
89
|
+
const validDate = this.findValidNavigationDate(nextDate, navigationDirection);
|
|
90
|
+
if (validDate)
|
|
91
|
+
this.activateDate(validDate);
|
|
92
|
+
};
|
|
93
|
+
this.onDateSelection = (event) => {
|
|
94
|
+
const button = event.target.closest('button[data-date]');
|
|
95
|
+
if (!button || button.disabled || this.disabled || this.readonly)
|
|
96
|
+
return;
|
|
97
|
+
this.selectDate(parseDatePickerValue(button.dataset.date));
|
|
98
|
+
};
|
|
99
|
+
this.onRangeCancel = () => {
|
|
100
|
+
this.resetRangeDraft();
|
|
101
|
+
this.tctCalendarCancel.emit();
|
|
102
|
+
};
|
|
103
|
+
this.onRangeCommit = () => {
|
|
104
|
+
if (this.disabled || this.readonly || !this.rangeDraftStart || !this.rangeDraftEnd)
|
|
105
|
+
return;
|
|
106
|
+
if (!this.isRangeValid(this.rangeDraftStart, this.rangeDraftEnd)) {
|
|
107
|
+
this.setRangeError(this.rangeValidationError);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
this.setRangeError('');
|
|
111
|
+
this.emitCommit({
|
|
112
|
+
rangeStart: formatDateISO(this.rangeDraftStart),
|
|
113
|
+
rangeEnd: formatDateISO(this.rangeDraftEnd),
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
// #endregion
|
|
118
|
+
// #region Component Lifecycle Events
|
|
119
|
+
connectedCallback() {
|
|
120
|
+
this.resetCalendarSession();
|
|
121
|
+
}
|
|
122
|
+
// #endregion
|
|
123
|
+
// #region Listeners
|
|
124
|
+
focusHandler(event) {
|
|
125
|
+
var _a;
|
|
126
|
+
if (event.target !== event.currentTarget)
|
|
127
|
+
return;
|
|
128
|
+
this.focusDate(((_a = event.detail) === null || _a === void 0 ? void 0 : _a.value) || this.rovingDate);
|
|
129
|
+
}
|
|
130
|
+
// #endregion
|
|
131
|
+
// #region Public Methods API
|
|
132
|
+
/** Moves the visible month to the provided date and focuses that day. */
|
|
133
|
+
async focusDate(value) {
|
|
134
|
+
const date = typeof value === 'string' ? parseDatePickerValue(value) : value;
|
|
135
|
+
if (!isValidDate(date))
|
|
136
|
+
return;
|
|
137
|
+
this.activeDate = date;
|
|
138
|
+
this.goToMonthYear(date.getMonth(), date.getFullYear());
|
|
139
|
+
requestAnimationFrame(() => this.focusRenderedDate(date));
|
|
140
|
+
}
|
|
141
|
+
/** Selects the provided date when it satisfies the calendar constraints. */
|
|
142
|
+
async setValue(value) {
|
|
143
|
+
const date = typeof value === 'string' ? parseDatePickerValue(value) : value;
|
|
144
|
+
if (!isValidDate(date) || !this.isDateValid(date))
|
|
145
|
+
return;
|
|
146
|
+
this.selectDate(date);
|
|
147
|
+
}
|
|
148
|
+
// #endregion
|
|
149
|
+
// #region Watchers
|
|
150
|
+
constraintsChanged() {
|
|
151
|
+
this.setRangeError('');
|
|
152
|
+
}
|
|
153
|
+
modeChanged() {
|
|
154
|
+
this.resetCalendarSession();
|
|
155
|
+
}
|
|
156
|
+
openChanged(open) {
|
|
157
|
+
if (open)
|
|
158
|
+
this.resetCalendarSession();
|
|
159
|
+
}
|
|
160
|
+
rangeChanged() {
|
|
161
|
+
if (this.isRangeMode)
|
|
162
|
+
this.resetCalendarSession();
|
|
163
|
+
}
|
|
164
|
+
valueChanged() {
|
|
165
|
+
if (!this.isRangeMode)
|
|
166
|
+
this.resetCalendarSession();
|
|
167
|
+
}
|
|
168
|
+
// #endregion
|
|
169
|
+
// #region Local Methods
|
|
170
|
+
get constraints() {
|
|
171
|
+
return {
|
|
172
|
+
cutoffTime: this.cutoffTime,
|
|
173
|
+
daysOfWeekChecksum: this.daysOfWeekChecksum,
|
|
174
|
+
endDate: this.endDate,
|
|
175
|
+
invalidDates: this.invalidDates,
|
|
176
|
+
startDate: this.startDate,
|
|
177
|
+
validDates: this.validDates,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
get currentWeeks() {
|
|
181
|
+
return this.dateList.reduce((weeks, day, index) => {
|
|
182
|
+
const weekIndex = Math.floor(index / 7);
|
|
183
|
+
if (!weeks[weekIndex])
|
|
184
|
+
weeks[weekIndex] = [];
|
|
185
|
+
weeks[weekIndex].push(day);
|
|
186
|
+
return weeks;
|
|
187
|
+
}, []);
|
|
188
|
+
}
|
|
189
|
+
get dateList() {
|
|
190
|
+
const { monthIndex, selectedYear } = this.selectedMonthYear;
|
|
191
|
+
const firstOfMonth = new Date(selectedYear, monthIndex, 1);
|
|
192
|
+
const daysInMonth = new Date(selectedYear, monthIndex + 1, 0).getDate();
|
|
193
|
+
const visibleCellCount = Math.ceil((firstOfMonth.getDay() + daysInMonth) / 7) * 7;
|
|
194
|
+
const cellCount = this.actionSheet ? 42 : visibleCellCount;
|
|
195
|
+
const firstVisibleDate = new Date(selectedYear, monthIndex, 1 - firstOfMonth.getDay());
|
|
196
|
+
return Array.from({ length: cellCount }, (_, index) => {
|
|
197
|
+
const date = addDays(firstVisibleDate, index);
|
|
198
|
+
const isOutside = date.getMonth() !== monthIndex;
|
|
199
|
+
const selectedRangeStart = this.rangeDraftStart;
|
|
200
|
+
const selectedRangeEnd = this.rangeDraftEnd || this.rangeHoverDate;
|
|
201
|
+
const rangeStart = selectedRangeStart && selectedRangeEnd && selectedRangeStart.getTime() > selectedRangeEnd.getTime()
|
|
202
|
+
? selectedRangeEnd
|
|
203
|
+
: selectedRangeStart;
|
|
204
|
+
const rangeEnd = selectedRangeStart && selectedRangeEnd && selectedRangeStart.getTime() > selectedRangeEnd.getTime()
|
|
205
|
+
? selectedRangeStart
|
|
206
|
+
: selectedRangeEnd;
|
|
207
|
+
const isRangeStart = this.isRangeMode && !!rangeStart && isSameDay(date, rangeStart);
|
|
208
|
+
const isRangeEnd = this.isRangeMode && !!rangeEnd && isSameDay(date, rangeEnd);
|
|
209
|
+
const isSelected = this.isRangeMode
|
|
210
|
+
? isRangeStart || isRangeEnd
|
|
211
|
+
: !!this.selectedDate && isSameDay(date, this.selectedDate);
|
|
212
|
+
const isInRange = this.isRangeMode &&
|
|
213
|
+
!!rangeStart &&
|
|
214
|
+
!!rangeEnd &&
|
|
215
|
+
date.getTime() > rangeStart.getTime() &&
|
|
216
|
+
date.getTime() < rangeEnd.getTime();
|
|
217
|
+
const isToday = isSameDay(date, new Date());
|
|
218
|
+
const isValid = this.isDateValid(date);
|
|
219
|
+
const classes = ['cal-day'];
|
|
220
|
+
if (isOutside)
|
|
221
|
+
classes.push('is-outside');
|
|
222
|
+
if (isInRange)
|
|
223
|
+
classes.push('in-range');
|
|
224
|
+
if (isSelected)
|
|
225
|
+
classes.push('is-selected');
|
|
226
|
+
if (isRangeStart)
|
|
227
|
+
classes.push('range-start');
|
|
228
|
+
if (isRangeEnd || (isRangeStart && !rangeEnd))
|
|
229
|
+
classes.push('range-end');
|
|
230
|
+
if (isToday)
|
|
231
|
+
classes.push('is-today');
|
|
232
|
+
if (!isValid)
|
|
233
|
+
classes.push('is-disabled');
|
|
234
|
+
return {
|
|
235
|
+
classList: classes.join(' '),
|
|
236
|
+
date,
|
|
237
|
+
isOutside,
|
|
238
|
+
isSelected,
|
|
239
|
+
isToday,
|
|
240
|
+
isValid,
|
|
241
|
+
};
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
get isRangeMode() {
|
|
245
|
+
return this.mode === 'range' || this.mode === 'range-typeable';
|
|
246
|
+
}
|
|
247
|
+
get normalizedDisplayFormat() {
|
|
248
|
+
return normalizeDisplayFormat(this.displayFormat);
|
|
249
|
+
}
|
|
250
|
+
get rangeConfirmDisabled() {
|
|
251
|
+
return !this.rangeDraftStart || !this.rangeDraftEnd;
|
|
252
|
+
}
|
|
253
|
+
get rangeEndDate() {
|
|
254
|
+
const date = parseDatePickerValue(this.rangeEnd);
|
|
255
|
+
return isValidDate(date) ? date : undefined;
|
|
256
|
+
}
|
|
257
|
+
get rangeSummary() {
|
|
258
|
+
if (this.rangeDraftStart && this.rangeDraftEnd) {
|
|
259
|
+
return `${this.formatRangeDate(this.rangeDraftStart)} – ${this.formatRangeDate(this.rangeDraftEnd)}`;
|
|
260
|
+
}
|
|
261
|
+
if (this.rangeDraftStart) {
|
|
262
|
+
return `${this.formatRangeDate(this.rangeDraftStart)} – ${localizeDatePickerString('tecton.element.datePicker.range.selectEnd')}`;
|
|
263
|
+
}
|
|
264
|
+
return localizeDatePickerString('tecton.element.datePicker.range.selectStart');
|
|
265
|
+
}
|
|
266
|
+
get rangeValidationError() {
|
|
267
|
+
return localizeDatePickerString('tecton.element.datePicker.validation.rangeUnavailable');
|
|
268
|
+
}
|
|
269
|
+
get rovingDate() {
|
|
270
|
+
const { monthIndex, selectedYear } = this.selectedMonthYear;
|
|
271
|
+
const preferredDates = [this.activeDate, this.isRangeMode ? this.rangeDraftStart : this.selectedDate];
|
|
272
|
+
for (const date of preferredDates) {
|
|
273
|
+
if ((date === null || date === void 0 ? void 0 : date.getMonth()) === monthIndex && (date === null || date === void 0 ? void 0 : date.getFullYear()) === selectedYear)
|
|
274
|
+
return date;
|
|
275
|
+
}
|
|
276
|
+
const today = new Date();
|
|
277
|
+
if (today.getMonth() === monthIndex && today.getFullYear() === selectedYear)
|
|
278
|
+
return today;
|
|
279
|
+
return new Date(selectedYear, monthIndex, 1);
|
|
280
|
+
}
|
|
281
|
+
get selectedDate() {
|
|
282
|
+
const date = parseDatePickerValue(this.isRangeMode ? this.rangeStart : this.value);
|
|
283
|
+
return isValidDate(date) ? date : undefined;
|
|
284
|
+
}
|
|
285
|
+
get title() {
|
|
286
|
+
const { monthIndex, selectedYear } = this.selectedMonthYear;
|
|
287
|
+
return new Intl.DateTimeFormat(this.locale, { month: 'long', year: 'numeric' }).format(new Date(selectedYear, monthIndex, 1));
|
|
288
|
+
}
|
|
289
|
+
activateDate(date) {
|
|
290
|
+
this.activeDate = date;
|
|
291
|
+
this.goToMonthYear(date.getMonth(), date.getFullYear());
|
|
292
|
+
requestAnimationFrame(() => this.focusRenderedDate(date));
|
|
293
|
+
}
|
|
294
|
+
emitCommit(detail) {
|
|
295
|
+
this.tctCalendarCommit.emit(detail);
|
|
296
|
+
this.tctChange.emit(detail);
|
|
297
|
+
}
|
|
298
|
+
findValidNavigationDate(date, direction) {
|
|
299
|
+
let candidate = date;
|
|
300
|
+
for (let offset = 0; offset < 366; offset++) {
|
|
301
|
+
if (this.isDateValid(candidate))
|
|
302
|
+
return candidate;
|
|
303
|
+
candidate = addDays(candidate, direction);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
focusRenderedDate(date) {
|
|
307
|
+
var _a, _b, _c;
|
|
308
|
+
(_c = (_b = (_a = this.hostElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(`button[data-date="${formatDateISO(date)}"]`)) === null || _c === void 0 ? void 0 : _c.focus();
|
|
309
|
+
}
|
|
310
|
+
formatRangeDate(date) {
|
|
311
|
+
if (this.displayFormat)
|
|
312
|
+
return formatDisplayDate(date, this.normalizedDisplayFormat);
|
|
313
|
+
return new Intl.DateTimeFormat(this.locale, { year: 'numeric', month: '2-digit', day: '2-digit' }).format(date);
|
|
314
|
+
}
|
|
315
|
+
goToMonthYear(monthIndex, selectedYear) {
|
|
316
|
+
const normalizedDate = new Date(selectedYear, monthIndex, 1);
|
|
317
|
+
this.selectedMonthYear = {
|
|
318
|
+
monthIndex: normalizedDate.getMonth(),
|
|
319
|
+
selectedYear: normalizedDate.getFullYear(),
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
isDateValid(date) {
|
|
323
|
+
return isDateSelectable(date, this.constraints);
|
|
324
|
+
}
|
|
325
|
+
isRangeValid(start, end) {
|
|
326
|
+
return isRangeSelectable(start, end, this.constraints);
|
|
327
|
+
}
|
|
328
|
+
onNavigate(action) {
|
|
329
|
+
const { monthIndex, selectedYear } = this.selectedMonthYear;
|
|
330
|
+
const navigationTargets = {
|
|
331
|
+
previousYear: [monthIndex, selectedYear - 1],
|
|
332
|
+
previousMonth: [monthIndex - 1, selectedYear],
|
|
333
|
+
nextMonth: [monthIndex + 1, selectedYear],
|
|
334
|
+
nextYear: [monthIndex, selectedYear + 1],
|
|
335
|
+
};
|
|
336
|
+
this.goToMonthYear(...navigationTargets[action]);
|
|
337
|
+
}
|
|
338
|
+
resetCalendarSession() {
|
|
339
|
+
const selectedDate = this.selectedDate;
|
|
340
|
+
this.activeDate = selectedDate;
|
|
341
|
+
this.selectedMonthYear = setupMonthYear(selectedDate);
|
|
342
|
+
this.resetRangeDraft();
|
|
343
|
+
}
|
|
344
|
+
resetRangeDraft() {
|
|
345
|
+
this.setRangeError('');
|
|
346
|
+
this.rangeHoverDate = undefined;
|
|
347
|
+
if (!this.selectedDate || !this.rangeEndDate) {
|
|
348
|
+
this.rangeDraftStart = undefined;
|
|
349
|
+
this.rangeDraftEnd = undefined;
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
[this.rangeDraftStart, this.rangeDraftEnd] = [this.selectedDate, this.rangeEndDate].sort((a, b) => a.getTime() - b.getTime());
|
|
353
|
+
}
|
|
354
|
+
selectDate(selectedDate) {
|
|
355
|
+
if (!this.isDateValid(selectedDate))
|
|
356
|
+
return;
|
|
357
|
+
this.activeDate = selectedDate;
|
|
358
|
+
if (this.isRangeMode) {
|
|
359
|
+
this.setRangeError('');
|
|
360
|
+
if (!this.rangeDraftStart || this.rangeDraftEnd) {
|
|
361
|
+
this.rangeDraftStart = selectedDate;
|
|
362
|
+
this.rangeDraftEnd = undefined;
|
|
363
|
+
}
|
|
364
|
+
else if (selectedDate.getTime() < this.rangeDraftStart.getTime()) {
|
|
365
|
+
this.rangeDraftEnd = this.rangeDraftStart;
|
|
366
|
+
this.rangeDraftStart = selectedDate;
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
this.rangeDraftEnd = selectedDate;
|
|
370
|
+
}
|
|
371
|
+
this.rangeHoverDate = undefined;
|
|
372
|
+
this.goToMonthYear(selectedDate.getMonth(), selectedDate.getFullYear());
|
|
373
|
+
requestAnimationFrame(() => this.focusRenderedDate(selectedDate));
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
this.goToMonthYear(selectedDate.getMonth(), selectedDate.getFullYear());
|
|
377
|
+
this.emitCommit({ value: formatDateISO(selectedDate) });
|
|
378
|
+
}
|
|
379
|
+
setRangeError(error) {
|
|
380
|
+
if (this.rangeError === error)
|
|
381
|
+
return;
|
|
382
|
+
this.rangeError = error;
|
|
383
|
+
this.tctCalendarError.emit(error);
|
|
384
|
+
}
|
|
385
|
+
// #endregion
|
|
386
|
+
// #region Render Methods
|
|
387
|
+
renderNavigation() {
|
|
388
|
+
return [
|
|
389
|
+
h("div", { class: "cal-nav-controls cal-nav-controls-left" }, this.renderNavigationButton('previousYear'), this.renderNavigationButton('previousMonth')),
|
|
390
|
+
h("div", { class: "cal-nav-title", id: "date-picker-label", "aria-live": "polite" }, this.title),
|
|
391
|
+
h("div", { class: "cal-nav-controls cal-nav-controls-right" }, this.renderNavigationButton('nextMonth'), this.renderNavigationButton('nextYear')),
|
|
392
|
+
];
|
|
393
|
+
}
|
|
394
|
+
renderNavigationButton(action) {
|
|
395
|
+
const isYearControl = action === 'previousYear' || action === 'nextYear';
|
|
396
|
+
const isPrevious = action === 'previousYear' || action === 'previousMonth';
|
|
397
|
+
return (h("q2-btn", { class: `cal-nav-btn ${action}`, "hide-label": true, label: loc(`tecton.element.calendar.${action}`), onTctClick: () => this.onNavigate(action), "test-id": `${action}Button` }, h("q2-icon", { type: `chevron-${isYearControl ? 'double-' : ''}${isPrevious ? 'left' : 'right'}` })));
|
|
398
|
+
}
|
|
399
|
+
render() {
|
|
400
|
+
const navigationBelow = !this.actionSheet && this.direction === 'up';
|
|
401
|
+
const rovingDate = this.rovingDate;
|
|
402
|
+
const rangeValidationError = this.rangeValidationError;
|
|
403
|
+
return (h("div", { key: '84c278bd6817625fcf5f70528000edcc84d116a6', class: `cal-panel direction-${navigationBelow ? 'up' : 'down'}${this.actionSheet ? ' is-action-sheet' : ''}`, role: this.actionSheet ? undefined : 'dialog', "aria-label": this.actionSheet
|
|
404
|
+
? undefined
|
|
405
|
+
: localizeDatePickerString(this.accessibleLabel || this.calendarLabel || 'Choose a date') }, this.calendarLabel && !this.actionSheet && (h("p", { key: '9a466d3509ed7ce45949039cfa11ce8485c4e278', class: "calendar-label" }, localizeDatePickerString(this.calendarLabel))), !navigationBelow && h("div", { key: 'a8c6ef4c4098c81bb79cd2ca450f38c56c99c51d', class: "cal-nav" }, this.renderNavigation()), h("div", { key: '45e7f43ee502ea2c19049112860b3690313f53d5', class: "cal-grid", role: "grid", "aria-labelledby": "date-picker-label" }, h("div", { key: '2a1a4caebfb72b601b9dd282550b519a3f610329', role: "rowgroup" }, h("div", { key: '6187b5b5b7391e389a4af9403a2b8c63f9606e35', class: "cal-row cal-weekdays", role: "row" }, this.dayAbbrStrings.map((day, index) => (h("div", { class: "cal-dow", role: "columnheader", "aria-label": this.dayStrings[index] }, day))))), h("div", { key: 'f2c274adc93798dd8c20762a09fcc95bcb77992f', class: "cal-days", role: "rowgroup", onClick: this.onDateSelection, onKeyDown: this.onDateKeydown, onMouseLeave: this.onDateHoverEnd }, this.currentWeeks.map(week => (h("div", { class: "cal-row", role: "row" }, week.map(day => (h("div", { role: "gridcell", "aria-selected": `${day.isSelected}` }, h("button", { type: "button", class: day.classList, "data-date": formatDateISO(day.date), disabled: !day.isValid, tabindex: isSameDay(day.date, rovingDate) ? 0 : -1, "aria-disabled": !day.isValid ? 'true' : undefined, "aria-current": day.isToday ? 'date' : undefined, "aria-label": formatDateFull(day.date), onMouseEnter: this.onDateHover }, day.date.getDate()))))))))), navigationBelow && h("div", { key: '14a8abe8669e403c4745eaf256783f37caf7fc43', class: "cal-nav" }, this.renderNavigation()), this.disclaimer && h("div", { key: 'f3ab74f66fca52d2499f52d20fdfd8a86cc154bc', class: "calendar-disclaimer" }, localizeDatePickerString(this.disclaimer)), this.isRangeMode && (h("div", { key: '276c870f99275bb582b250ed1a3632f5e95c17c3', class: "cal-footer" }, h("div", { key: '1d753811c31360780fae551cb49c190561e292ed', class: "cal-footer-summary" }, h("q2-message", { key: '9db690009d1efa45b4e852e16a5b47ab0262c751', class: "is-placeholder", appearance: "minimal", type: "error", "aria-hidden": "true" }, rangeValidationError), h("span", { key: 'c1b41f3faf70207aa8dc65c8812dc91737cfe590' }, this.rangeSummary)), h("div", { key: '6af2f2741335e07737e61936cd480e90eb38918b', class: "cal-footer-actions" }, h("q2-btn", { key: '62e02cab1e110559304475a1d0c29d1fc65f1d93', intent: "workflow-escape", size: "small", label: localizeDatePickerString('tecton.element.datePicker.action.cancel'), onTctClick: this.onRangeCancel }), h("q2-btn", { key: '14f1286e80e92b42168e3e6abe9718d40b4ded59', intent: "workflow-primary", size: "small", label: localizeDatePickerString('tecton.element.datePicker.action.confirm'), disabled: this.rangeConfirmDisabled, onTctClick: this.onRangeCommit }))))));
|
|
406
|
+
}
|
|
407
|
+
static get is() { return "q2-date-calendar"; }
|
|
408
|
+
static get encapsulation() { return "shadow"; }
|
|
409
|
+
static get originalStyleUrls() {
|
|
410
|
+
return {
|
|
411
|
+
"$": ["q2-date-calendar.scss"]
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
static get styleUrls() {
|
|
415
|
+
return {
|
|
416
|
+
"$": ["q2-date-calendar.css"]
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
static get properties() {
|
|
420
|
+
return {
|
|
421
|
+
"accessibleLabel": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"mutable": false,
|
|
424
|
+
"complexType": {
|
|
425
|
+
"original": "string",
|
|
426
|
+
"resolved": "string",
|
|
427
|
+
"references": {}
|
|
428
|
+
},
|
|
429
|
+
"required": false,
|
|
430
|
+
"optional": false,
|
|
431
|
+
"docs": {
|
|
432
|
+
"tags": [],
|
|
433
|
+
"text": "Accessible calendar dialog label."
|
|
434
|
+
},
|
|
435
|
+
"getter": false,
|
|
436
|
+
"setter": false,
|
|
437
|
+
"reflect": false,
|
|
438
|
+
"attribute": "accessible-label"
|
|
439
|
+
},
|
|
440
|
+
"actionSheet": {
|
|
441
|
+
"type": "boolean",
|
|
442
|
+
"mutable": false,
|
|
443
|
+
"complexType": {
|
|
444
|
+
"original": "boolean",
|
|
445
|
+
"resolved": "boolean",
|
|
446
|
+
"references": {}
|
|
447
|
+
},
|
|
448
|
+
"required": false,
|
|
449
|
+
"optional": false,
|
|
450
|
+
"docs": {
|
|
451
|
+
"tags": [],
|
|
452
|
+
"text": "Uses the action-sheet calendar presentation."
|
|
453
|
+
},
|
|
454
|
+
"getter": false,
|
|
455
|
+
"setter": false,
|
|
456
|
+
"reflect": false,
|
|
457
|
+
"attribute": "action-sheet",
|
|
458
|
+
"defaultValue": "false"
|
|
459
|
+
},
|
|
460
|
+
"calendarLabel": {
|
|
461
|
+
"type": "string",
|
|
462
|
+
"mutable": false,
|
|
463
|
+
"complexType": {
|
|
464
|
+
"original": "string",
|
|
465
|
+
"resolved": "string",
|
|
466
|
+
"references": {}
|
|
467
|
+
},
|
|
468
|
+
"required": false,
|
|
469
|
+
"optional": false,
|
|
470
|
+
"docs": {
|
|
471
|
+
"tags": [],
|
|
472
|
+
"text": "Accessible and visible calendar label."
|
|
473
|
+
},
|
|
474
|
+
"getter": false,
|
|
475
|
+
"setter": false,
|
|
476
|
+
"reflect": false,
|
|
477
|
+
"attribute": "calendar-label"
|
|
478
|
+
},
|
|
479
|
+
"cutoffTime": {
|
|
480
|
+
"type": "string",
|
|
481
|
+
"mutable": false,
|
|
482
|
+
"complexType": {
|
|
483
|
+
"original": "string",
|
|
484
|
+
"resolved": "string",
|
|
485
|
+
"references": {}
|
|
486
|
+
},
|
|
487
|
+
"required": false,
|
|
488
|
+
"optional": false,
|
|
489
|
+
"docs": {
|
|
490
|
+
"tags": [],
|
|
491
|
+
"text": "Specifies a time of day after which a date is no longer valid."
|
|
492
|
+
},
|
|
493
|
+
"getter": false,
|
|
494
|
+
"setter": false,
|
|
495
|
+
"reflect": false,
|
|
496
|
+
"attribute": "cutoff-time"
|
|
497
|
+
},
|
|
498
|
+
"daysOfWeekChecksum": {
|
|
499
|
+
"type": "number",
|
|
500
|
+
"mutable": false,
|
|
501
|
+
"complexType": {
|
|
502
|
+
"original": "number",
|
|
503
|
+
"resolved": "number",
|
|
504
|
+
"references": {}
|
|
505
|
+
},
|
|
506
|
+
"required": false,
|
|
507
|
+
"optional": false,
|
|
508
|
+
"docs": {
|
|
509
|
+
"tags": [],
|
|
510
|
+
"text": "Defines valid days of the week using calendar checksum values."
|
|
511
|
+
},
|
|
512
|
+
"getter": false,
|
|
513
|
+
"setter": false,
|
|
514
|
+
"reflect": false,
|
|
515
|
+
"attribute": "days-of-week-checksum"
|
|
516
|
+
},
|
|
517
|
+
"direction": {
|
|
518
|
+
"type": "string",
|
|
519
|
+
"mutable": false,
|
|
520
|
+
"complexType": {
|
|
521
|
+
"original": "'up' | 'down'",
|
|
522
|
+
"resolved": "\"down\" | \"up\"",
|
|
523
|
+
"references": {}
|
|
524
|
+
},
|
|
525
|
+
"required": false,
|
|
526
|
+
"optional": false,
|
|
527
|
+
"docs": {
|
|
528
|
+
"tags": [],
|
|
529
|
+
"text": "Controls whether navigation appears above or below the date grid."
|
|
530
|
+
},
|
|
531
|
+
"getter": false,
|
|
532
|
+
"setter": false,
|
|
533
|
+
"reflect": false,
|
|
534
|
+
"attribute": "direction",
|
|
535
|
+
"defaultValue": "'down'"
|
|
536
|
+
},
|
|
537
|
+
"disabled": {
|
|
538
|
+
"type": "boolean",
|
|
539
|
+
"mutable": false,
|
|
540
|
+
"complexType": {
|
|
541
|
+
"original": "boolean",
|
|
542
|
+
"resolved": "boolean",
|
|
543
|
+
"references": {}
|
|
544
|
+
},
|
|
545
|
+
"required": false,
|
|
546
|
+
"optional": false,
|
|
547
|
+
"docs": {
|
|
548
|
+
"tags": [],
|
|
549
|
+
"text": "Disables calendar interaction."
|
|
550
|
+
},
|
|
551
|
+
"getter": false,
|
|
552
|
+
"setter": false,
|
|
553
|
+
"reflect": false,
|
|
554
|
+
"attribute": "disabled",
|
|
555
|
+
"defaultValue": "false"
|
|
556
|
+
},
|
|
557
|
+
"disclaimer": {
|
|
558
|
+
"type": "string",
|
|
559
|
+
"mutable": false,
|
|
560
|
+
"complexType": {
|
|
561
|
+
"original": "string",
|
|
562
|
+
"resolved": "string",
|
|
563
|
+
"references": {}
|
|
564
|
+
},
|
|
565
|
+
"required": false,
|
|
566
|
+
"optional": false,
|
|
567
|
+
"docs": {
|
|
568
|
+
"tags": [],
|
|
569
|
+
"text": "Localized disclaimer content."
|
|
570
|
+
},
|
|
571
|
+
"getter": false,
|
|
572
|
+
"setter": false,
|
|
573
|
+
"reflect": false,
|
|
574
|
+
"attribute": "disclaimer"
|
|
575
|
+
},
|
|
576
|
+
"displayFormat": {
|
|
577
|
+
"type": "string",
|
|
578
|
+
"mutable": false,
|
|
579
|
+
"complexType": {
|
|
580
|
+
"original": "DatePickerDisplayFormat",
|
|
581
|
+
"resolved": "\"DD-MM-YYYY\" | \"DD/MM/YYYY\" | \"MM-DD-YYYY\" | \"MM/DD/YYYY\" | \"YYYY-MM-DD\"",
|
|
582
|
+
"references": {
|
|
583
|
+
"DatePickerDisplayFormat": {
|
|
584
|
+
"location": "import",
|
|
585
|
+
"path": "@/utils/date-picker/date-picker-types",
|
|
586
|
+
"id": "src/utils/date-picker/date-picker-types.ts::DatePickerDisplayFormat",
|
|
587
|
+
"referenceLocation": "DatePickerDisplayFormat"
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
"required": false,
|
|
592
|
+
"optional": true,
|
|
593
|
+
"docs": {
|
|
594
|
+
"tags": [],
|
|
595
|
+
"text": "Controls the date format used in range summaries."
|
|
596
|
+
},
|
|
597
|
+
"getter": false,
|
|
598
|
+
"setter": false,
|
|
599
|
+
"reflect": false,
|
|
600
|
+
"attribute": "display-format"
|
|
601
|
+
},
|
|
602
|
+
"endDate": {
|
|
603
|
+
"type": "string",
|
|
604
|
+
"mutable": false,
|
|
605
|
+
"complexType": {
|
|
606
|
+
"original": "string",
|
|
607
|
+
"resolved": "string",
|
|
608
|
+
"references": {}
|
|
609
|
+
},
|
|
610
|
+
"required": false,
|
|
611
|
+
"optional": false,
|
|
612
|
+
"docs": {
|
|
613
|
+
"tags": [],
|
|
614
|
+
"text": "Defines the last selectable date."
|
|
615
|
+
},
|
|
616
|
+
"getter": false,
|
|
617
|
+
"setter": false,
|
|
618
|
+
"reflect": false,
|
|
619
|
+
"attribute": "end-date"
|
|
620
|
+
},
|
|
621
|
+
"invalidDates": {
|
|
622
|
+
"type": "unknown",
|
|
623
|
+
"mutable": false,
|
|
624
|
+
"complexType": {
|
|
625
|
+
"original": "string[]",
|
|
626
|
+
"resolved": "string[]",
|
|
627
|
+
"references": {}
|
|
628
|
+
},
|
|
629
|
+
"required": false,
|
|
630
|
+
"optional": false,
|
|
631
|
+
"docs": {
|
|
632
|
+
"tags": [],
|
|
633
|
+
"text": "Defines an explicit date blacklist using ISO date strings."
|
|
634
|
+
},
|
|
635
|
+
"getter": false,
|
|
636
|
+
"setter": false
|
|
637
|
+
},
|
|
638
|
+
"locale": {
|
|
639
|
+
"type": "string",
|
|
640
|
+
"mutable": false,
|
|
641
|
+
"complexType": {
|
|
642
|
+
"original": "string | string[]",
|
|
643
|
+
"resolved": "string | string[]",
|
|
644
|
+
"references": {}
|
|
645
|
+
},
|
|
646
|
+
"required": false,
|
|
647
|
+
"optional": false,
|
|
648
|
+
"docs": {
|
|
649
|
+
"tags": [],
|
|
650
|
+
"text": "Formats calendar and range labels using the provided locale."
|
|
651
|
+
},
|
|
652
|
+
"getter": false,
|
|
653
|
+
"setter": false,
|
|
654
|
+
"reflect": false,
|
|
655
|
+
"attribute": "locale",
|
|
656
|
+
"defaultValue": "document.documentElement.lang || 'en-US'"
|
|
657
|
+
},
|
|
658
|
+
"mode": {
|
|
659
|
+
"type": "string",
|
|
660
|
+
"mutable": false,
|
|
661
|
+
"complexType": {
|
|
662
|
+
"original": "DatePickerMode",
|
|
663
|
+
"resolved": "\"range\" | \"range-typeable\" | \"single\" | \"single-typeable\"",
|
|
664
|
+
"references": {
|
|
665
|
+
"DatePickerMode": {
|
|
666
|
+
"location": "import",
|
|
667
|
+
"path": "@/utils/date-picker/date-picker-types",
|
|
668
|
+
"id": "src/utils/date-picker/date-picker-types.ts::DatePickerMode",
|
|
669
|
+
"referenceLocation": "DatePickerMode"
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"required": false,
|
|
674
|
+
"optional": false,
|
|
675
|
+
"docs": {
|
|
676
|
+
"tags": [],
|
|
677
|
+
"text": "Selects single-date or range calendar behavior."
|
|
678
|
+
},
|
|
679
|
+
"getter": false,
|
|
680
|
+
"setter": false,
|
|
681
|
+
"reflect": false,
|
|
682
|
+
"attribute": "mode",
|
|
683
|
+
"defaultValue": "'single'"
|
|
684
|
+
},
|
|
685
|
+
"open": {
|
|
686
|
+
"type": "boolean",
|
|
687
|
+
"mutable": false,
|
|
688
|
+
"complexType": {
|
|
689
|
+
"original": "boolean",
|
|
690
|
+
"resolved": "boolean",
|
|
691
|
+
"references": {}
|
|
692
|
+
},
|
|
693
|
+
"required": false,
|
|
694
|
+
"optional": false,
|
|
695
|
+
"docs": {
|
|
696
|
+
"tags": [],
|
|
697
|
+
"text": "Indicates that a new calendar session has opened."
|
|
698
|
+
},
|
|
699
|
+
"getter": false,
|
|
700
|
+
"setter": false,
|
|
701
|
+
"reflect": false,
|
|
702
|
+
"attribute": "open",
|
|
703
|
+
"defaultValue": "false"
|
|
704
|
+
},
|
|
705
|
+
"rangeEnd": {
|
|
706
|
+
"type": "string",
|
|
707
|
+
"mutable": false,
|
|
708
|
+
"complexType": {
|
|
709
|
+
"original": "string",
|
|
710
|
+
"resolved": "string",
|
|
711
|
+
"references": {}
|
|
712
|
+
},
|
|
713
|
+
"required": false,
|
|
714
|
+
"optional": false,
|
|
715
|
+
"docs": {
|
|
716
|
+
"tags": [],
|
|
717
|
+
"text": "The committed range end as an ISO date string."
|
|
718
|
+
},
|
|
719
|
+
"getter": false,
|
|
720
|
+
"setter": false,
|
|
721
|
+
"reflect": false,
|
|
722
|
+
"attribute": "range-end"
|
|
723
|
+
},
|
|
724
|
+
"rangeStart": {
|
|
725
|
+
"type": "string",
|
|
726
|
+
"mutable": false,
|
|
727
|
+
"complexType": {
|
|
728
|
+
"original": "string",
|
|
729
|
+
"resolved": "string",
|
|
730
|
+
"references": {}
|
|
731
|
+
},
|
|
732
|
+
"required": false,
|
|
733
|
+
"optional": false,
|
|
734
|
+
"docs": {
|
|
735
|
+
"tags": [],
|
|
736
|
+
"text": "The committed range start as an ISO date string."
|
|
737
|
+
},
|
|
738
|
+
"getter": false,
|
|
739
|
+
"setter": false,
|
|
740
|
+
"reflect": false,
|
|
741
|
+
"attribute": "range-start"
|
|
742
|
+
},
|
|
743
|
+
"readonly": {
|
|
744
|
+
"type": "boolean",
|
|
745
|
+
"mutable": false,
|
|
746
|
+
"complexType": {
|
|
747
|
+
"original": "boolean",
|
|
748
|
+
"resolved": "boolean",
|
|
749
|
+
"references": {}
|
|
750
|
+
},
|
|
751
|
+
"required": false,
|
|
752
|
+
"optional": false,
|
|
753
|
+
"docs": {
|
|
754
|
+
"tags": [],
|
|
755
|
+
"text": "Prevents calendar selection while retaining calendar visibility."
|
|
756
|
+
},
|
|
757
|
+
"getter": false,
|
|
758
|
+
"setter": false,
|
|
759
|
+
"reflect": false,
|
|
760
|
+
"attribute": "readonly",
|
|
761
|
+
"defaultValue": "false"
|
|
762
|
+
},
|
|
763
|
+
"startDate": {
|
|
764
|
+
"type": "string",
|
|
765
|
+
"mutable": false,
|
|
766
|
+
"complexType": {
|
|
767
|
+
"original": "string",
|
|
768
|
+
"resolved": "string",
|
|
769
|
+
"references": {}
|
|
770
|
+
},
|
|
771
|
+
"required": false,
|
|
772
|
+
"optional": false,
|
|
773
|
+
"docs": {
|
|
774
|
+
"tags": [],
|
|
775
|
+
"text": "Defines the first selectable date."
|
|
776
|
+
},
|
|
777
|
+
"getter": false,
|
|
778
|
+
"setter": false,
|
|
779
|
+
"reflect": false,
|
|
780
|
+
"attribute": "start-date"
|
|
781
|
+
},
|
|
782
|
+
"validDates": {
|
|
783
|
+
"type": "unknown",
|
|
784
|
+
"mutable": false,
|
|
785
|
+
"complexType": {
|
|
786
|
+
"original": "string[]",
|
|
787
|
+
"resolved": "string[]",
|
|
788
|
+
"references": {}
|
|
789
|
+
},
|
|
790
|
+
"required": false,
|
|
791
|
+
"optional": false,
|
|
792
|
+
"docs": {
|
|
793
|
+
"tags": [],
|
|
794
|
+
"text": "Defines an explicit date whitelist using ISO date strings."
|
|
795
|
+
},
|
|
796
|
+
"getter": false,
|
|
797
|
+
"setter": false
|
|
798
|
+
},
|
|
799
|
+
"value": {
|
|
800
|
+
"type": "string",
|
|
801
|
+
"mutable": false,
|
|
802
|
+
"complexType": {
|
|
803
|
+
"original": "string",
|
|
804
|
+
"resolved": "string",
|
|
805
|
+
"references": {}
|
|
806
|
+
},
|
|
807
|
+
"required": false,
|
|
808
|
+
"optional": false,
|
|
809
|
+
"docs": {
|
|
810
|
+
"tags": [],
|
|
811
|
+
"text": "The committed single date as an ISO date string."
|
|
812
|
+
},
|
|
813
|
+
"getter": false,
|
|
814
|
+
"setter": false,
|
|
815
|
+
"reflect": false,
|
|
816
|
+
"attribute": "value"
|
|
817
|
+
}
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
static get states() {
|
|
821
|
+
return {
|
|
822
|
+
"activeDate": {},
|
|
823
|
+
"rangeDraftEnd": {},
|
|
824
|
+
"rangeDraftStart": {},
|
|
825
|
+
"rangeError": {},
|
|
826
|
+
"rangeHoverDate": {},
|
|
827
|
+
"selectedMonthYear": {}
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
static get events() {
|
|
831
|
+
return [{
|
|
832
|
+
"method": "tctCalendarCancel",
|
|
833
|
+
"name": "tctCalendarCancel",
|
|
834
|
+
"bubbles": false,
|
|
835
|
+
"cancelable": true,
|
|
836
|
+
"composed": false,
|
|
837
|
+
"docs": {
|
|
838
|
+
"tags": [],
|
|
839
|
+
"text": "Emitted when the user cancels range selection."
|
|
840
|
+
},
|
|
841
|
+
"complexType": {
|
|
842
|
+
"original": "void",
|
|
843
|
+
"resolved": "void",
|
|
844
|
+
"references": {}
|
|
845
|
+
}
|
|
846
|
+
}, {
|
|
847
|
+
"method": "tctCalendarCommit",
|
|
848
|
+
"name": "tctCalendarCommit",
|
|
849
|
+
"bubbles": false,
|
|
850
|
+
"cancelable": true,
|
|
851
|
+
"composed": false,
|
|
852
|
+
"docs": {
|
|
853
|
+
"tags": [],
|
|
854
|
+
"text": "Emitted when the user commits a single date or date range."
|
|
855
|
+
},
|
|
856
|
+
"complexType": {
|
|
857
|
+
"original": "DatePickerChangeDetail",
|
|
858
|
+
"resolved": "DatePickerChangeDetail",
|
|
859
|
+
"references": {
|
|
860
|
+
"DatePickerChangeDetail": {
|
|
861
|
+
"location": "import",
|
|
862
|
+
"path": "@/utils/date-picker/date-picker-types",
|
|
863
|
+
"id": "src/utils/date-picker/date-picker-types.ts::DatePickerChangeDetail",
|
|
864
|
+
"referenceLocation": "DatePickerChangeDetail"
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
}, {
|
|
869
|
+
"method": "tctCalendarDismiss",
|
|
870
|
+
"name": "tctCalendarDismiss",
|
|
871
|
+
"bubbles": false,
|
|
872
|
+
"cancelable": true,
|
|
873
|
+
"composed": false,
|
|
874
|
+
"docs": {
|
|
875
|
+
"tags": [],
|
|
876
|
+
"text": "Emitted when the calendar asks its container to dismiss it."
|
|
877
|
+
},
|
|
878
|
+
"complexType": {
|
|
879
|
+
"original": "void",
|
|
880
|
+
"resolved": "void",
|
|
881
|
+
"references": {}
|
|
882
|
+
}
|
|
883
|
+
}, {
|
|
884
|
+
"method": "tctCalendarError",
|
|
885
|
+
"name": "tctCalendarError",
|
|
886
|
+
"bubbles": false,
|
|
887
|
+
"cancelable": true,
|
|
888
|
+
"composed": false,
|
|
889
|
+
"docs": {
|
|
890
|
+
"tags": [],
|
|
891
|
+
"text": "Emitted when range confirmation validation changes."
|
|
892
|
+
},
|
|
893
|
+
"complexType": {
|
|
894
|
+
"original": "string",
|
|
895
|
+
"resolved": "string",
|
|
896
|
+
"references": {}
|
|
897
|
+
}
|
|
898
|
+
}, {
|
|
899
|
+
"method": "tctChange",
|
|
900
|
+
"name": "tctChange",
|
|
901
|
+
"bubbles": false,
|
|
902
|
+
"cancelable": true,
|
|
903
|
+
"composed": false,
|
|
904
|
+
"docs": {
|
|
905
|
+
"tags": [],
|
|
906
|
+
"text": "Emitted with the committed date or range for standalone consumers and framework models."
|
|
907
|
+
},
|
|
908
|
+
"complexType": {
|
|
909
|
+
"original": "DatePickerChangeDetail",
|
|
910
|
+
"resolved": "DatePickerChangeDetail",
|
|
911
|
+
"references": {
|
|
912
|
+
"DatePickerChangeDetail": {
|
|
913
|
+
"location": "import",
|
|
914
|
+
"path": "@/utils/date-picker/date-picker-types",
|
|
915
|
+
"id": "src/utils/date-picker/date-picker-types.ts::DatePickerChangeDetail",
|
|
916
|
+
"referenceLocation": "DatePickerChangeDetail"
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}];
|
|
921
|
+
}
|
|
922
|
+
static get methods() {
|
|
923
|
+
return {
|
|
924
|
+
"focusDate": {
|
|
925
|
+
"complexType": {
|
|
926
|
+
"signature": "(value: string | Date) => Promise<void>",
|
|
927
|
+
"parameters": [{
|
|
928
|
+
"name": "value",
|
|
929
|
+
"type": "string | Date",
|
|
930
|
+
"docs": ""
|
|
931
|
+
}],
|
|
932
|
+
"references": {
|
|
933
|
+
"Promise": {
|
|
934
|
+
"location": "global",
|
|
935
|
+
"id": "global::Promise"
|
|
936
|
+
},
|
|
937
|
+
"Date": {
|
|
938
|
+
"location": "global",
|
|
939
|
+
"id": "global::Date"
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
"return": "Promise<void>"
|
|
943
|
+
},
|
|
944
|
+
"docs": {
|
|
945
|
+
"text": "Moves the visible month to the provided date and focuses that day.",
|
|
946
|
+
"tags": []
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
"setValue": {
|
|
950
|
+
"complexType": {
|
|
951
|
+
"signature": "(value: string | Date) => Promise<void>",
|
|
952
|
+
"parameters": [{
|
|
953
|
+
"name": "value",
|
|
954
|
+
"type": "string | Date",
|
|
955
|
+
"docs": ""
|
|
956
|
+
}],
|
|
957
|
+
"references": {
|
|
958
|
+
"Promise": {
|
|
959
|
+
"location": "global",
|
|
960
|
+
"id": "global::Promise"
|
|
961
|
+
},
|
|
962
|
+
"Date": {
|
|
963
|
+
"location": "global",
|
|
964
|
+
"id": "global::Date"
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
"return": "Promise<void>"
|
|
968
|
+
},
|
|
969
|
+
"docs": {
|
|
970
|
+
"text": "Selects the provided date when it satisfies the calendar constraints.",
|
|
971
|
+
"tags": []
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
static get elementRef() { return "hostElement"; }
|
|
977
|
+
static get watchers() {
|
|
978
|
+
return [{
|
|
979
|
+
"propName": "cutoffTime",
|
|
980
|
+
"methodName": "constraintsChanged"
|
|
981
|
+
}, {
|
|
982
|
+
"propName": "daysOfWeekChecksum",
|
|
983
|
+
"methodName": "constraintsChanged"
|
|
984
|
+
}, {
|
|
985
|
+
"propName": "endDate",
|
|
986
|
+
"methodName": "constraintsChanged"
|
|
987
|
+
}, {
|
|
988
|
+
"propName": "invalidDates",
|
|
989
|
+
"methodName": "constraintsChanged"
|
|
990
|
+
}, {
|
|
991
|
+
"propName": "startDate",
|
|
992
|
+
"methodName": "constraintsChanged"
|
|
993
|
+
}, {
|
|
994
|
+
"propName": "validDates",
|
|
995
|
+
"methodName": "constraintsChanged"
|
|
996
|
+
}, {
|
|
997
|
+
"propName": "mode",
|
|
998
|
+
"methodName": "modeChanged"
|
|
999
|
+
}, {
|
|
1000
|
+
"propName": "open",
|
|
1001
|
+
"methodName": "openChanged"
|
|
1002
|
+
}, {
|
|
1003
|
+
"propName": "rangeEnd",
|
|
1004
|
+
"methodName": "rangeChanged"
|
|
1005
|
+
}, {
|
|
1006
|
+
"propName": "rangeStart",
|
|
1007
|
+
"methodName": "rangeChanged"
|
|
1008
|
+
}, {
|
|
1009
|
+
"propName": "value",
|
|
1010
|
+
"methodName": "valueChanged"
|
|
1011
|
+
}];
|
|
1012
|
+
}
|
|
1013
|
+
static get listeners() {
|
|
1014
|
+
return [{
|
|
1015
|
+
"name": "tctCalendarFocus",
|
|
1016
|
+
"method": "focusHandler",
|
|
1017
|
+
"target": undefined,
|
|
1018
|
+
"capture": false,
|
|
1019
|
+
"passive": false
|
|
1020
|
+
}];
|
|
1021
|
+
}
|
|
1022
|
+
}
|