q2-tecton-elements 1.56.2 → 1.56.4
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 +303 -245
- package/dist/cjs/{index-99667782.js → index-905f4c87.js} +1 -5
- package/dist/cjs/index-905f4c87.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-badge_7.cjs.entry.js +12 -4
- package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
- 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 +33 -32
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +7 -8
- package/dist/cjs/q2-editable-field.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-example.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
- 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-item_3.cjs.entry.js +3 -3
- package/dist/cjs/q2-legend.cjs.entry.js +1 -1
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.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-optgroup.cjs.entry.js +2 -2
- package/dist/cjs/q2-option-list_2.cjs.entry.js +54 -63
- package/dist/cjs/q2-option-list_2.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
- package/dist/cjs/q2-pill.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- 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-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +81 -11
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- 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-tag.cjs.entry.js +2 -2
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +3 -2
- package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
- package/dist/collection/components/q2-btn/q2-btn.js +4 -0
- package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +2 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +33 -31
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +34 -32
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +12 -7
- package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
- package/dist/collection/components/q2-example/q2-example.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-icon/q2-icon.js +4 -0
- package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
- package/dist/collection/components/q2-input/q2-input.js +1 -1
- package/dist/collection/components/q2-item/q2-item.js +1 -1
- 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.js +1 -1
- package/dist/collection/components/q2-modal/q2-modal.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +1 -0
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pill/q2-pill.js +1 -1
- package/dist/collection/components/q2-popover/q2-popover.css +18 -10
- package/dist/collection/components/q2-popover/q2-popover.js +55 -63
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +1 -34
- package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +743 -435
- package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
- 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-section/q2-section.js +2 -2
- package/dist/collection/components/q2-select/q2-select.js +96 -14
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.spec.js +327 -0
- package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
- 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 +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +5 -0
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js +2 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/components/index2.js +1 -4
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group2.js +1 -1
- package/dist/components/q2-action-sheet.js +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-btn2.js +4 -0
- package/dist/components/q2-btn2.js.map +1 -1
- package/dist/components/q2-carousel-pane.js +2 -2
- package/dist/components/q2-chart-area.js +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-donut.js +1 -1
- package/dist/components/q2-currency.js +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown.js +32 -31
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-editable-field.js +7 -8
- package/dist/components/q2-editable-field.js.map +1 -1
- package/dist/components/q2-example.js +1 -1
- package/dist/components/q2-form.js +1 -1
- package/dist/components/q2-formatted-text.js +1 -1
- package/dist/components/q2-icon2.js +4 -0
- package/dist/components/q2-icon2.js.map +1 -1
- package/dist/components/q2-input2.js +1 -1
- package/dist/components/q2-item2.js +1 -1
- package/dist/components/q2-legend2.js +1 -1
- package/dist/components/q2-list2.js +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-modal.js +1 -1
- package/dist/components/q2-month-picker.js +2 -2
- package/dist/components/q2-optgroup2.js +1 -1
- package/dist/components/q2-pagination.js +3 -3
- package/dist/components/q2-pill.js +1 -1
- package/dist/components/q2-popover2.js +54 -63
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +1 -1
- package/dist/components/q2-section.js +2 -2
- package/dist/components/q2-select2.js +84 -14
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/components/q2-stepper-vertical.js +1 -1
- package/dist/components/q2-stepper.js +1 -1
- package/dist/components/q2-tab-container.js +1 -1
- package/dist/components/q2-tab-pane.js +1 -1
- package/dist/components/q2-tag.js +1 -1
- package/dist/components/q2-textarea.js +2 -1
- package/dist/components/q2-textarea.js.map +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/{index-c215e8ef.js → index-f2a66217.js} +2 -5
- package/dist/esm/index-f2a66217.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +2 -2
- package/dist/esm/q2-action-sheet.entry.js +2 -2
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-badge_7.entry.js +12 -4
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/q2-chart-area.entry.js +2 -2
- package/dist/esm/q2-chart-bar.entry.js +2 -2
- package/dist/esm/q2-chart-donut.entry.js +2 -2
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox.entry.js +1 -1
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +1 -1
- 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 +33 -32
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +7 -8
- package/dist/esm/q2-editable-field.entry.js.map +1 -1
- package/dist/esm/q2-example.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +1 -1
- package/dist/esm/q2-form.entry.js +1 -1
- package/dist/esm/q2-formatted-text.entry.js +1 -1
- package/dist/esm/q2-item_3.entry.js +3 -3
- package/dist/esm/q2-legend.entry.js +1 -1
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.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-optgroup.entry.js +2 -2
- package/dist/esm/q2-option-list_2.entry.js +54 -63
- package/dist/esm/q2-option-list_2.entry.js.map +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +4 -4
- package/dist/esm/q2-pill.entry.js +2 -2
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-relative-time.entry.js +2 -2
- package/dist/esm/q2-resize-observer.entry.js +1 -1
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +82 -12
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +2 -2
- package/dist/esm/q2-tag.entry.js +2 -2
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +3 -2
- package/dist/esm/q2-textarea.entry.js.map +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/{index-c215e8ef.js → index-f2a66217.js} +2 -6
- package/dist/q2-tecton-elements/index-f2a66217.js.map +1 -0
- package/dist/q2-tecton-elements/q2-action-group.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-badge_7.entry.js +50 -42
- package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-calendar.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +80 -80
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-currency.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-detail.entry.js +39 -39
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +81 -79
- package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +32 -23
- package/dist/q2-tecton-elements/q2-editable-field.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-form.entry.js +10 -10
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-item_3.entry.js +19 -19
- package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-message.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-modal.entry.js +24 -24
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +67 -67
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-option-list_2.entry.js +155 -154
- package/dist/q2-tecton-elements/q2-option-list_2.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-option.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-pagination.entry.js +42 -42
- package/dist/q2-tecton-elements/q2-pill.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-radio.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-section.entry.js +23 -23
- package/dist/q2-tecton-elements/q2-select.entry.js +146 -88
- package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-stepper.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-tag.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +4 -3
- package/dist/q2-tecton-elements/q2-textarea.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
- package/dist/types/components/q2-btn/q2-btn.d.ts +1 -0
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +7 -8
- package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +2 -1
- package/dist/types/components/q2-icon/q2-icon.d.ts +1 -0
- package/dist/types/components/q2-popover/q2-popover.d.ts +4 -4
- package/dist/types/components/q2-select/q2-select.d.ts +18 -0
- package/package.json +3 -3
- package/dist/cjs/index-99667782.js.map +0 -1
- package/dist/esm/index-c215e8ef.js.map +0 -1
- package/dist/q2-tecton-elements/index-c215e8ef.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { r as t, c as e, h as i, H as
|
|
1
|
+
import { r as t, c as e, h as i, H as o, g as s } from "./index-7a5365e2.js";
|
|
2
2
|
|
|
3
|
-
import { n, l as r, o as a, i as
|
|
3
|
+
import { n, l as r, o as a, i as h, w as c, v as l, h as p } from "./index-f2a66217.js";
|
|
4
4
|
|
|
5
5
|
function sanitizeRegexString(t) {
|
|
6
6
|
return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const d = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{position:relative;width:100%;display:block;line-height:var(--tct-option-list-line-height, var(--t-option-list-line-height, var(--app-line-height, 1.428571429em)))}.content{text-align:start}:host([is-sizeable]) .content{display:block;height:auto}";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const u = d;
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const f = class {
|
|
14
14
|
constructor(i) {
|
|
15
15
|
t(this, i);
|
|
16
16
|
this.change = e(this, "change", 7);
|
|
@@ -33,14 +33,14 @@ const b = class {
|
|
|
33
33
|
};
|
|
34
34
|
/* tslint:disable:cyclomatic-complexity */ this.externalKeydownHandler = t => {
|
|
35
35
|
t.stopPropagation();
|
|
36
|
-
const {activeIndex: e, customSearch: i, allOptions:
|
|
37
|
-
const {key:
|
|
36
|
+
const {activeIndex: e, customSearch: i, allOptions: o} = this;
|
|
37
|
+
const {key: s} = t;
|
|
38
38
|
let r;
|
|
39
|
-
switch (
|
|
39
|
+
switch (s) {
|
|
40
40
|
case " ":
|
|
41
41
|
if (this.searchString) {
|
|
42
42
|
if (i) break;
|
|
43
|
-
this.searchOptions(
|
|
43
|
+
this.searchOptions(s, true);
|
|
44
44
|
break;
|
|
45
45
|
} else if (this.type === "menu") {
|
|
46
46
|
this.activeIndex = 0;
|
|
@@ -88,7 +88,7 @@ const b = class {
|
|
|
88
88
|
|
|
89
89
|
case "End":
|
|
90
90
|
t.preventDefault();
|
|
91
|
-
this.openDropdownWithActiveElement(
|
|
91
|
+
this.openDropdownWithActiveElement(o.length - 1);
|
|
92
92
|
break;
|
|
93
93
|
|
|
94
94
|
case "PageUp":
|
|
@@ -98,7 +98,7 @@ const b = class {
|
|
|
98
98
|
|
|
99
99
|
case "PageDown":
|
|
100
100
|
t.preventDefault();
|
|
101
|
-
this.openDropdownWithActiveElement(Math.min((e || 0) + 10,
|
|
101
|
+
this.openDropdownWithActiveElement(Math.min((e || 0) + 10, o.length - 1));
|
|
102
102
|
break;
|
|
103
103
|
|
|
104
104
|
case "Tab":
|
|
@@ -119,24 +119,24 @@ const b = class {
|
|
|
119
119
|
|
|
120
120
|
default:
|
|
121
121
|
if (i) break;
|
|
122
|
-
if (!
|
|
123
|
-
this.searchOptions(
|
|
122
|
+
if (!s.match(/^[\w]$/)) break;
|
|
123
|
+
this.searchOptions(s, true);
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
/* tslint:enable:cyclomatic-complexity */ this.focusoutHandler = t => {
|
|
128
128
|
const {relatedTarget: e} = t;
|
|
129
129
|
const i = this.allOptions.includes(e);
|
|
130
|
-
const
|
|
131
|
-
if (i ||
|
|
130
|
+
const o = !i && this.hostElement.contains(e);
|
|
131
|
+
if (i || o) {
|
|
132
132
|
t.stopPropagation();
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
this.internalKeydownHandler = t => {
|
|
136
136
|
t.stopPropagation();
|
|
137
|
-
const {activeIndex: e, customSearch: i, allOptions:
|
|
137
|
+
const {activeIndex: e, customSearch: i, allOptions: o, allVisibleOptions: s, multiple: n} = this;
|
|
138
138
|
const {key: r, shiftKey: a} = t;
|
|
139
|
-
let
|
|
139
|
+
let h;
|
|
140
140
|
switch (r) {
|
|
141
141
|
case " ":
|
|
142
142
|
if (this.searchString && !this.multiple) {
|
|
@@ -144,9 +144,9 @@ const b = class {
|
|
|
144
144
|
this.searchOptions(r, false);
|
|
145
145
|
break;
|
|
146
146
|
}
|
|
147
|
-
|
|
148
|
-
if (!
|
|
149
|
-
this.selectOption(
|
|
147
|
+
h = o.find((t => t.active));
|
|
148
|
+
if (!h || h.disabled) break;
|
|
149
|
+
this.selectOption(h);
|
|
150
150
|
if (n) break;
|
|
151
151
|
this.hostElement.addEventListener("tctClick", (() => {
|
|
152
152
|
this.popoverState.emit({
|
|
@@ -159,9 +159,9 @@ const b = class {
|
|
|
159
159
|
break;
|
|
160
160
|
|
|
161
161
|
case "Enter":
|
|
162
|
-
|
|
163
|
-
if (!
|
|
164
|
-
this.selectOption(
|
|
162
|
+
h = o.find((t => t.active));
|
|
163
|
+
if (!h || h.disabled) break;
|
|
164
|
+
this.selectOption(h);
|
|
165
165
|
if (n) break;
|
|
166
166
|
this.hostElement.addEventListener("tctClick", (() => {
|
|
167
167
|
this.popoverState.emit({
|
|
@@ -175,8 +175,8 @@ const b = class {
|
|
|
175
175
|
|
|
176
176
|
case "ArrowUp":
|
|
177
177
|
t.preventDefault();
|
|
178
|
-
const
|
|
179
|
-
const l =
|
|
178
|
+
const c = s[0];
|
|
179
|
+
const l = c.active;
|
|
180
180
|
if (l) break;
|
|
181
181
|
if (e === undefined) {
|
|
182
182
|
this.setDefaultActiveElement();
|
|
@@ -190,7 +190,7 @@ const b = class {
|
|
|
190
190
|
|
|
191
191
|
case "ArrowDown":
|
|
192
192
|
t.preventDefault();
|
|
193
|
-
const p =
|
|
193
|
+
const p = s[s.length - 1];
|
|
194
194
|
const d = p.active;
|
|
195
195
|
if (d) break;
|
|
196
196
|
if (e === undefined) {
|
|
@@ -210,7 +210,7 @@ const b = class {
|
|
|
210
210
|
|
|
211
211
|
case "End":
|
|
212
212
|
t.preventDefault();
|
|
213
|
-
this.openDropdownWithActiveElement(
|
|
213
|
+
this.openDropdownWithActiveElement(o.length - 1);
|
|
214
214
|
break;
|
|
215
215
|
|
|
216
216
|
case "PageUp":
|
|
@@ -220,7 +220,7 @@ const b = class {
|
|
|
220
220
|
|
|
221
221
|
case "PageDown":
|
|
222
222
|
t.preventDefault();
|
|
223
|
-
this.openDropdownWithActiveElement(Math.min(e + 10,
|
|
223
|
+
this.openDropdownWithActiveElement(Math.min(e + 10, o.length - 1));
|
|
224
224
|
break;
|
|
225
225
|
|
|
226
226
|
case "Tab":
|
|
@@ -233,9 +233,9 @@ const b = class {
|
|
|
233
233
|
});
|
|
234
234
|
break;
|
|
235
235
|
}
|
|
236
|
-
|
|
237
|
-
if (!
|
|
238
|
-
this.selectOption(
|
|
236
|
+
h = o.find((t => t.active));
|
|
237
|
+
if (!h || h.disabled) return;
|
|
238
|
+
this.selectOption(h);
|
|
239
239
|
break;
|
|
240
240
|
|
|
241
241
|
case "Esc":
|
|
@@ -333,7 +333,7 @@ const b = class {
|
|
|
333
333
|
t.stopPropagation();
|
|
334
334
|
}
|
|
335
335
|
delegateFocus(t) {
|
|
336
|
-
if (!
|
|
336
|
+
if (!h(t, this.hostElement)) return;
|
|
337
337
|
this.popoverState.emit({
|
|
338
338
|
open: true,
|
|
339
339
|
action: "open"
|
|
@@ -425,13 +425,13 @@ const b = class {
|
|
|
425
425
|
}
|
|
426
426
|
focusSelectedSibling(t) {
|
|
427
427
|
const {allVisibleOptions: e, allOptions: i} = this;
|
|
428
|
-
const
|
|
429
|
-
if (
|
|
428
|
+
const o = e.length < 2;
|
|
429
|
+
if (o) {
|
|
430
430
|
this.showSelected = false;
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
433
|
-
const
|
|
434
|
-
const n =
|
|
433
|
+
const s = e.indexOf(t);
|
|
434
|
+
const n = s ? s - 1 : s + 1;
|
|
435
435
|
const r = e[n];
|
|
436
436
|
const a = i.indexOf(r);
|
|
437
437
|
this.activeIndex = a;
|
|
@@ -450,9 +450,9 @@ const b = class {
|
|
|
450
450
|
return 0;
|
|
451
451
|
}
|
|
452
452
|
getNextVisibleIndex(t) {
|
|
453
|
-
const {allVisibleOptions: e, allOptions: i, activeIndex:
|
|
454
|
-
const
|
|
455
|
-
const n = e.indexOf(
|
|
453
|
+
const {allVisibleOptions: e, allOptions: i, activeIndex: o} = this;
|
|
454
|
+
const s = i[o];
|
|
455
|
+
const n = e.indexOf(s);
|
|
456
456
|
let r = n + t;
|
|
457
457
|
if (r < 0) {
|
|
458
458
|
r = e.length - 1;
|
|
@@ -465,12 +465,12 @@ const b = class {
|
|
|
465
465
|
getRootSlot(t) {
|
|
466
466
|
var e;
|
|
467
467
|
const i = t.querySelector("slot");
|
|
468
|
-
const
|
|
469
|
-
const
|
|
470
|
-
if (
|
|
471
|
-
return this.getRootSlot(
|
|
468
|
+
const o = (e = i === null || i === void 0 ? void 0 : i.assignedElements()) !== null && e !== void 0 ? e : Array.from(t.children);
|
|
469
|
+
const s = !!o.length && o[0].tagName === "SLOT";
|
|
470
|
+
if (s) {
|
|
471
|
+
return this.getRootSlot(o[0]);
|
|
472
472
|
} else {
|
|
473
|
-
return
|
|
473
|
+
return o;
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
async openDropdownWithActiveElement(t) {
|
|
@@ -479,7 +479,7 @@ const b = class {
|
|
|
479
479
|
open: true,
|
|
480
480
|
action: "open"
|
|
481
481
|
});
|
|
482
|
-
await
|
|
482
|
+
await c();
|
|
483
483
|
this.activeIndex = t;
|
|
484
484
|
this.setActiveOption();
|
|
485
485
|
this.setFocusedOption();
|
|
@@ -504,30 +504,30 @@ const b = class {
|
|
|
504
504
|
this.searchAndFocus(t, e);
|
|
505
505
|
}
|
|
506
506
|
selectOption(t) {
|
|
507
|
-
const {multiple: e, noSelect: i, showSelected:
|
|
507
|
+
const {multiple: e, noSelect: i, showSelected: o} = this;
|
|
508
508
|
if (!t || t.disabled || "disabledGroup" in t && t.disabledGroup) return;
|
|
509
|
-
const
|
|
509
|
+
const s = t.value;
|
|
510
510
|
const n = "display" in t && t.display ? t.display : t.innerText.trim();
|
|
511
511
|
const r = {
|
|
512
|
-
value:
|
|
512
|
+
value: s,
|
|
513
513
|
display: n
|
|
514
514
|
};
|
|
515
515
|
let a = [];
|
|
516
516
|
if (e) {
|
|
517
517
|
const {selectedOptions: e} = this;
|
|
518
|
-
const i = e.find((t => t.value ===
|
|
518
|
+
const i = e.find((t => t.value === s));
|
|
519
519
|
if (i) {
|
|
520
|
-
a = e.filter((({value: t}) => t !==
|
|
520
|
+
a = e.filter((({value: t}) => t !== s));
|
|
521
521
|
} else {
|
|
522
522
|
a = [ ...e, r ];
|
|
523
523
|
}
|
|
524
|
-
if (
|
|
524
|
+
if (o) this.focusSelectedSibling(t);
|
|
525
525
|
} else {
|
|
526
526
|
a = [ r ];
|
|
527
527
|
}
|
|
528
528
|
if (i) this.setActiveElement(null); else this.selectedOptions = a;
|
|
529
529
|
this.change.emit({
|
|
530
|
-
value:
|
|
530
|
+
value: s,
|
|
531
531
|
values: a
|
|
532
532
|
});
|
|
533
533
|
}
|
|
@@ -555,17 +555,17 @@ const b = class {
|
|
|
555
555
|
updateSingleOptionAttrs() {
|
|
556
556
|
var t;
|
|
557
557
|
const {allOptions: e, selectedOptions: i} = this;
|
|
558
|
-
const
|
|
558
|
+
const o = ((t = i[0]) === null || t === void 0 ? void 0 : t.value) || undefined;
|
|
559
559
|
if (this.noSelect) return;
|
|
560
560
|
e.forEach((t => {
|
|
561
561
|
if (!("selected" in t)) return;
|
|
562
|
-
t.selected = t.value ===
|
|
562
|
+
t.selected = t.value === o;
|
|
563
563
|
}));
|
|
564
564
|
}
|
|
565
565
|
// #endregion
|
|
566
566
|
// #region Render Methods
|
|
567
567
|
render() {
|
|
568
|
-
return i(
|
|
568
|
+
return i(o, {
|
|
569
569
|
key: "48bc63463e38e58f7f18e5b5b105e14689be640c"
|
|
570
570
|
}, i("div", {
|
|
571
571
|
key: "26d143ad186b387274837d2141f9e5cd7cee6fb0",
|
|
@@ -585,7 +585,7 @@ const b = class {
|
|
|
585
585
|
}))));
|
|
586
586
|
}
|
|
587
587
|
get hostElement() {
|
|
588
|
-
return
|
|
588
|
+
return s(this);
|
|
589
589
|
}
|
|
590
590
|
static get watchers() {
|
|
591
591
|
return {
|
|
@@ -595,28 +595,33 @@ const b = class {
|
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
597
|
|
|
598
|
-
|
|
598
|
+
f.style = u;
|
|
599
599
|
|
|
600
|
-
const
|
|
600
|
+
const b = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.legacy.container{display:none}.legacy.show{display:block;z-index:var(--tct-popover-z-index, 50)}:popover-open,.show{position:absolute;margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 4px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:popover-open.block,.show.block{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:popover-open.left,.show.left{left:var(--comp-pop-left);right:unset}:popover-open.right,.show.right{right:var(--comp-pop-right);left:unset}:popover-open.down,.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}:popover-open.up,.show.up{top:unset;bottom:var(--comp-pop-bottom)}:popover-open::-webkit-scrollbar,.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}:popover-open::-webkit-scrollbar-thumb,.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}:popover-open::-webkit-scrollbar-track,.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
|
|
601
601
|
|
|
602
|
-
const v =
|
|
602
|
+
const v = b;
|
|
603
603
|
|
|
604
|
-
const
|
|
604
|
+
const w = class {
|
|
605
605
|
constructor(i) {
|
|
606
606
|
t(this, i);
|
|
607
607
|
this.popoverStateChanged = e(this, "popoverStateChanged", 7);
|
|
608
608
|
/**
|
|
609
609
|
* The number of pixels to leave between the popover and the edge of the viewport
|
|
610
610
|
*/ this.displayBuffer = 10;
|
|
611
|
-
|
|
611
|
+
this.orientationChanged = false;
|
|
612
612
|
this.handleMinHeight = () => {
|
|
613
613
|
if (this.minHeight) {
|
|
614
614
|
p(this, "minHeight", "prop");
|
|
615
615
|
}
|
|
616
616
|
};
|
|
617
|
+
this.handlePopoverToggleEvent = t => {
|
|
618
|
+
this.popoverStateChanged.emit({
|
|
619
|
+
open: t.newState === "open"
|
|
620
|
+
});
|
|
621
|
+
};
|
|
617
622
|
this.setAbsoluteCSSProperties = async () => {
|
|
618
|
-
const {controlElement: t, containerElement: e, currentDirection: i, align:
|
|
619
|
-
if (
|
|
623
|
+
const {controlElement: t, containerElement: e, currentDirection: i, align: o} = this;
|
|
624
|
+
if (o === "right") {
|
|
620
625
|
e.style.setProperty("--comp-pop-right", "0");
|
|
621
626
|
e.style.setProperty("--comp-pop-left", "unset");
|
|
622
627
|
} else {
|
|
@@ -628,43 +633,49 @@ const m = class {
|
|
|
628
633
|
}
|
|
629
634
|
if (i === "up") {
|
|
630
635
|
const i = getComputedStyle(t);
|
|
631
|
-
const
|
|
632
|
-
e.style.setProperty("--comp-pop-bottom", `${
|
|
636
|
+
const o = parseInt(i.height || "0") + parseInt(i.borderTopWidth || "0") + parseInt(i.borderBottomWidth || "0");
|
|
637
|
+
e.style.setProperty("--comp-pop-bottom", `${o}px`);
|
|
633
638
|
}
|
|
634
639
|
// Wait for one paint to prevent layout thrashing
|
|
635
|
-
await
|
|
640
|
+
await c();
|
|
636
641
|
e.style.setProperty("--comp-pop-opacity", "1");
|
|
637
642
|
};
|
|
638
|
-
this.
|
|
639
|
-
var t, e, i, s;
|
|
640
|
-
const {controlElement:
|
|
641
|
-
const {top:
|
|
643
|
+
this.setPopoverAPICSSProperties = async () => {
|
|
644
|
+
var t, e, i, o, s, n;
|
|
645
|
+
const {controlElement: r, containerElement: a, currentDirection: h, isModule: l, align: p} = this;
|
|
646
|
+
const {top: d, bottom: u, left: f, right: b} = (e = (t = r === null || r === void 0 ? void 0 : r.getBoundingClientRect) === null || t === void 0 ? void 0 : t.call(r)) !== null && e !== void 0 ? e : {
|
|
642
647
|
top: 0,
|
|
643
648
|
bottom: 0,
|
|
644
649
|
left: 0,
|
|
645
650
|
right: 0
|
|
646
651
|
};
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
652
|
+
const v = f;
|
|
653
|
+
const w = ((i = window === null || window === void 0 ? void 0 : window.visualViewport) === null || i === void 0 ? void 0 : i.width) - b;
|
|
654
|
+
if (p === "right") {
|
|
655
|
+
a.style.setProperty("--comp-pop-right", `${w - window.scrollX}px`);
|
|
656
|
+
a.style.setProperty("--comp-pop-left", "unset");
|
|
657
|
+
} else {
|
|
658
|
+
a.style.setProperty("--comp-pop-left", `${v + window.scrollX}px`);
|
|
659
|
+
a.style.setProperty("--comp-pop-right", "unset");
|
|
660
|
+
}
|
|
661
|
+
if (this.block) a.style.setProperty("--comp-pop-width", `${(r === null || r === void 0 ? void 0 : r.offsetWidth) || 0}px`);
|
|
662
|
+
if (h === "up") {
|
|
663
|
+
if (l) {
|
|
664
|
+
a.style.setProperty("--comp-pop-bottom", `${window.innerHeight - d}px`);
|
|
654
665
|
} else {
|
|
655
|
-
|
|
666
|
+
a.style.setProperty("--comp-pop-bottom", `${window.innerHeight - d - ((o = window === null || window === void 0 ? void 0 : window.visualViewport) === null || o === void 0 ? void 0 : o.offsetTop) - window.scrollY}px`);
|
|
656
667
|
}
|
|
657
668
|
}
|
|
658
|
-
if (
|
|
659
|
-
if (
|
|
660
|
-
|
|
669
|
+
if (h === "down") {
|
|
670
|
+
if (l) {
|
|
671
|
+
a.style.setProperty("--comp-pop-top", `${u}px`);
|
|
661
672
|
} else {
|
|
662
|
-
|
|
673
|
+
a.style.setProperty("--comp-pop-top", `${u + ((n = (s = window === null || window === void 0 ? void 0 : window.visualViewport) === null || s === void 0 ? void 0 : s.offsetTop) !== null && n !== void 0 ? n : 0) + window.scrollY}px`);
|
|
663
674
|
}
|
|
664
675
|
}
|
|
665
676
|
// Wait for one paint to prevent layout thrashing
|
|
666
|
-
await
|
|
667
|
-
|
|
677
|
+
await c();
|
|
678
|
+
a.style.setProperty("--comp-pop-opacity", "1");
|
|
668
679
|
};
|
|
669
680
|
this.viewPortChanged = () => {
|
|
670
681
|
if (!this.open) return;
|
|
@@ -676,7 +687,7 @@ const m = class {
|
|
|
676
687
|
};
|
|
677
688
|
this.currentDirection = undefined;
|
|
678
689
|
this.show = false;
|
|
679
|
-
this.align =
|
|
690
|
+
this.align = "left";
|
|
680
691
|
this.block = undefined;
|
|
681
692
|
this.controlElement = undefined;
|
|
682
693
|
this.direction = undefined;
|
|
@@ -689,9 +700,20 @@ const m = class {
|
|
|
689
700
|
// #region Component Lifecycle Events
|
|
690
701
|
disconnectedCallback() {
|
|
691
702
|
this.removeViewportListeners();
|
|
703
|
+
this.containerElement.removeEventListener("toggle", this.handlePopoverToggleEvent);
|
|
704
|
+
this.containerElement = null;
|
|
705
|
+
this.contentElement = null;
|
|
706
|
+
this.controlElement = null;
|
|
707
|
+
}
|
|
708
|
+
componentWillLoad() {
|
|
709
|
+
if (!this.supportsPopoverAPI) {
|
|
710
|
+
console.warn("The Popover API is not supported in this browser. Please update your browser to the latest version. The component will use legacy mode.");
|
|
711
|
+
this.mode = "legacy";
|
|
712
|
+
}
|
|
692
713
|
}
|
|
693
714
|
componentDidLoad() {
|
|
694
715
|
this.handleMinHeight();
|
|
716
|
+
if (this.supportsPopoverAPI) this.containerElement.addEventListener("toggle", this.handlePopoverToggleEvent);
|
|
695
717
|
if (this.open) this.determinePopDirection();
|
|
696
718
|
}
|
|
697
719
|
// #endregion
|
|
@@ -716,7 +738,6 @@ const m = class {
|
|
|
716
738
|
this.handleMinHeight();
|
|
717
739
|
}
|
|
718
740
|
async openChanged(t) {
|
|
719
|
-
this.setRootElement();
|
|
720
741
|
this.popoverStateChanged.emit({
|
|
721
742
|
open: t
|
|
722
743
|
});
|
|
@@ -726,8 +747,12 @@ const m = class {
|
|
|
726
747
|
} else {
|
|
727
748
|
this.removeViewportListeners();
|
|
728
749
|
this.currentDirection = undefined;
|
|
729
|
-
this.
|
|
730
|
-
|
|
750
|
+
if (this.mode === "legacy" || !this.supportsPopoverAPI) {
|
|
751
|
+
this.show = false;
|
|
752
|
+
} else {
|
|
753
|
+
this.containerElement.hidePopover();
|
|
754
|
+
}
|
|
755
|
+
await c();
|
|
731
756
|
this.clearCSSProperties();
|
|
732
757
|
}
|
|
733
758
|
}
|
|
@@ -736,8 +761,8 @@ const m = class {
|
|
|
736
761
|
get isModule() {
|
|
737
762
|
var t, e;
|
|
738
763
|
const i = window !== window.top;
|
|
739
|
-
const
|
|
740
|
-
return i &&
|
|
764
|
+
const o = Object.keys((e = (t = window.Tecton) === null || t === void 0 ? void 0 : t.platformDimensions) !== null && e !== void 0 ? e : {}).length > 0;
|
|
765
|
+
return i && o;
|
|
741
766
|
}
|
|
742
767
|
get providedDirection() {
|
|
743
768
|
const {direction: t} = this;
|
|
@@ -750,6 +775,9 @@ const m = class {
|
|
|
750
775
|
return undefined;
|
|
751
776
|
}
|
|
752
777
|
}
|
|
778
|
+
get supportsPopoverAPI() {
|
|
779
|
+
return Object.hasOwn(HTMLElement.prototype, "popover");
|
|
780
|
+
}
|
|
753
781
|
get validatedMaxHeight() {
|
|
754
782
|
const {maxHeight: t} = this;
|
|
755
783
|
return isNaN(t) ? undefined : t;
|
|
@@ -758,15 +786,13 @@ const m = class {
|
|
|
758
786
|
var t;
|
|
759
787
|
window.addEventListener("resize", this.viewPortOrientationChanged);
|
|
760
788
|
visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener("resize", this.viewPortChanged);
|
|
761
|
-
|
|
762
|
-
window.addEventListener("scroll", this.viewPortChanged, {
|
|
789
|
+
window.addEventListener("scroll", this.viewPortChanged, {
|
|
763
790
|
passive: true,
|
|
764
791
|
capture: true
|
|
765
792
|
});
|
|
766
|
-
(t = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || t === void 0 ? void 0 : t.addEventListener("
|
|
793
|
+
(t = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || t === void 0 ? void 0 : t.addEventListener("orientationchange", this.viewPortOrientationChanged);
|
|
767
794
|
window.addEventListener("orientationchange", this.viewPortOrientationChanged);
|
|
768
|
-
|
|
769
|
-
}
|
|
795
|
+
}
|
|
770
796
|
clearCSSProperties() {
|
|
771
797
|
this.containerElement.style.removeProperty("--comp-pop-max-height");
|
|
772
798
|
this.containerElement.style.removeProperty("--comp-pop-top");
|
|
@@ -778,11 +804,11 @@ const m = class {
|
|
|
778
804
|
}
|
|
779
805
|
async determinePopDirection() {
|
|
780
806
|
var t, e, i;
|
|
781
|
-
const {containerElement:
|
|
782
|
-
if (
|
|
783
|
-
await
|
|
807
|
+
const {containerElement: o, controlElement: s, providedDirection: n, displayBuffer: r} = this;
|
|
808
|
+
if (o) o.style.maxHeight = null;
|
|
809
|
+
await c();
|
|
784
810
|
const {isModule: a} = this;
|
|
785
|
-
const {top:
|
|
811
|
+
const {top: h, bottom: l} = (e = (t = s === null || s === void 0 ? void 0 : s.getBoundingClientRect) === null || t === void 0 ? void 0 : t.call(s)) !== null && e !== void 0 ? e : {
|
|
786
812
|
top: 0,
|
|
787
813
|
bottom: 0
|
|
788
814
|
};
|
|
@@ -791,31 +817,31 @@ const m = class {
|
|
|
791
817
|
let u;
|
|
792
818
|
if (a) {
|
|
793
819
|
const {outletOffset: t = 0, innerHeight: e = window.innerHeight} = ((i = window.Tecton) === null || i === void 0 ? void 0 : i.platformDimensions) || {};
|
|
794
|
-
const
|
|
795
|
-
const
|
|
796
|
-
const n =
|
|
820
|
+
const o = window.visualViewport.height - l;
|
|
821
|
+
const s = e - (t + l);
|
|
822
|
+
const n = o < s;
|
|
797
823
|
p = e;
|
|
798
824
|
// If the top of the module is below the top of the window we just use the controlTop
|
|
799
825
|
// Otherwise we need to add the outletOffset to the controlTop
|
|
800
|
-
d = (t > 0 ?
|
|
801
|
-
u = n ?
|
|
826
|
+
d = (t > 0 ? h : h + t) - r;
|
|
827
|
+
u = n ? o - r : s - r;
|
|
802
828
|
} else {
|
|
803
829
|
p = window.visualViewport.height;
|
|
804
|
-
d =
|
|
830
|
+
d = h - r;
|
|
805
831
|
u = p - l - r;
|
|
806
832
|
}
|
|
807
833
|
const f = d > u ? "up" : "down";
|
|
808
834
|
// We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)
|
|
809
|
-
const b = !
|
|
835
|
+
const b = !o.style.getPropertyValue("--comp-pop-max-height") || this.orientationChanged;
|
|
810
836
|
// we do not want to constantly update the max-height after an orientation change, so we switch this back to false
|
|
811
837
|
this.orientationChanged = false;
|
|
812
|
-
const
|
|
813
|
-
switch (
|
|
838
|
+
const v = this.currentDirection || n || f;
|
|
839
|
+
switch (v) {
|
|
814
840
|
case "up":
|
|
815
841
|
if (b) {
|
|
816
842
|
const t = this.validatedMaxHeight || d;
|
|
817
843
|
const e = Math.min(d, t);
|
|
818
|
-
|
|
844
|
+
o.style.setProperty("--comp-pop-max-height", `${e}px`);
|
|
819
845
|
}
|
|
820
846
|
this.setDirectionAndShow("up");
|
|
821
847
|
break;
|
|
@@ -824,7 +850,7 @@ const m = class {
|
|
|
824
850
|
if (b) {
|
|
825
851
|
const t = this.validatedMaxHeight || u;
|
|
826
852
|
const e = Math.min(u, t);
|
|
827
|
-
|
|
853
|
+
o.style.setProperty("--comp-pop-max-height", `${e}px`);
|
|
828
854
|
}
|
|
829
855
|
this.setDirectionAndShow("down");
|
|
830
856
|
break;
|
|
@@ -834,75 +860,50 @@ const m = class {
|
|
|
834
860
|
var t;
|
|
835
861
|
window.removeEventListener("resize", this.viewPortOrientationChanged);
|
|
836
862
|
visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener("resize", this.viewPortChanged);
|
|
837
|
-
|
|
838
|
-
|
|
863
|
+
window.removeEventListener("scroll", this.viewPortChanged, {
|
|
864
|
+
capture: true
|
|
865
|
+
});
|
|
839
866
|
(t = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || t === void 0 ? void 0 : t.removeEventListener("orientationchange", this.viewPortOrientationChanged);
|
|
840
867
|
window.removeEventListener("orientationchange", this.viewPortOrientationChanged);
|
|
841
|
-
|
|
842
|
-
}
|
|
868
|
+
}
|
|
843
869
|
setDirectionAndShow(t) {
|
|
844
|
-
this.setRootElement();
|
|
845
870
|
// Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
|
|
846
871
|
// popover can be closed between the time the popover is opened and the time the direction is determined
|
|
847
|
-
|
|
872
|
+
const e = this.open;
|
|
848
873
|
if (!e) return;
|
|
849
874
|
this.currentDirection = t;
|
|
850
|
-
this.
|
|
851
|
-
|
|
875
|
+
if (this.mode === "legacy" || !this.supportsPopoverAPI) {
|
|
876
|
+
this.show = true;
|
|
852
877
|
this.setAbsoluteCSSProperties();
|
|
853
878
|
} else {
|
|
854
|
-
this.
|
|
879
|
+
this.setPopoverAPICSSProperties();
|
|
880
|
+
this.containerElement.showPopover();
|
|
855
881
|
}
|
|
856
882
|
}
|
|
857
|
-
setRootElement() {
|
|
858
|
-
let t = this.hostElement;
|
|
859
|
-
while (t && t !== document.documentElement) {
|
|
860
|
-
const e = window.getComputedStyle(t);
|
|
861
|
-
// Check if the element has any styles applied that create a new containg block
|
|
862
|
-
if (e.transform !== "none" || e.filter !== "none" || e.perspective !== "none" || e.containerType !== "normal" || [ "transform", "perspective", "filter" ].includes(e.willChange) || [ "layout", "paint", "strict", "content" ].includes(e.contain)) {
|
|
863
|
-
this.rootElementRect = t.getBoundingClientRect();
|
|
864
|
-
return;
|
|
865
|
-
}
|
|
866
|
-
const i = t.getRootNode();
|
|
867
|
-
const s = typeof ShadowRoot !== "undefined" && i instanceof ShadowRoot && i.host instanceof HTMLElement;
|
|
868
|
-
if (s) {
|
|
869
|
-
t = i.host;
|
|
870
|
-
} else {
|
|
871
|
-
t = t.parentElement;
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
// Return the document's bounding rect if no element is found
|
|
875
|
-
this.rootElementRect = {
|
|
876
|
-
top: 0,
|
|
877
|
-
bottom: 0,
|
|
878
|
-
left: 0,
|
|
879
|
-
right: 0,
|
|
880
|
-
height: window.visualViewport.height,
|
|
881
|
-
width: window.visualViewport.width
|
|
882
|
-
};
|
|
883
|
-
}
|
|
884
883
|
// #endregion
|
|
885
884
|
// #region Render Methods
|
|
886
885
|
render() {
|
|
887
|
-
const t = [ "container", this.currentDirection ];
|
|
886
|
+
const t = [ "container", this.currentDirection, this.align ];
|
|
888
887
|
if (this.show) t.push("show");
|
|
888
|
+
if (this.block) t.push("block");
|
|
889
889
|
if (this.mode === "legacy") t.push("legacy");
|
|
890
890
|
return i("div", {
|
|
891
|
-
key: "
|
|
891
|
+
key: "c9bbcb53ba8f8bb8879d96cd2f828943dea32b92",
|
|
892
892
|
ref: t => this.containerElement = t,
|
|
893
893
|
class: t.join(" "),
|
|
894
894
|
"test-id": "outerContainer",
|
|
895
|
-
tabIndex: -1
|
|
895
|
+
tabIndex: -1,
|
|
896
|
+
popover: "auto"
|
|
896
897
|
}, i("div", {
|
|
897
|
-
key: "
|
|
898
|
+
key: "4088186bfb7b320fcd8836bcef40b90a685caf9e",
|
|
898
899
|
ref: t => this.contentElement = t,
|
|
899
900
|
class: "content"
|
|
900
901
|
}, i("slot", {
|
|
901
|
-
key: "
|
|
902
|
+
key: "0876866b03a8708a0b401df638d3146263afc141"
|
|
902
903
|
})));
|
|
903
904
|
}
|
|
904
905
|
get hostElement() {
|
|
905
|
-
return
|
|
906
|
+
return s(this);
|
|
906
907
|
}
|
|
907
908
|
static get watchers() {
|
|
908
909
|
return {
|
|
@@ -912,7 +913,7 @@ const m = class {
|
|
|
912
913
|
}
|
|
913
914
|
};
|
|
914
915
|
|
|
915
|
-
|
|
916
|
+
w.style = v;
|
|
916
917
|
|
|
917
|
-
export {
|
|
918
|
+
export { f as q2_option_list, w as q2_popover };
|
|
918
919
|
//# sourceMappingURL=q2-option-list_2.entry.js.map
|