@tet/tet-components 1.4.157-testing → 1.4.158-staging
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/cjs/format-program-start-date-zxseYpV_.js +151 -0
- package/dist/cjs/{http-codes-D7ffzpYW.js → http-codes-BPqfZGg_.js} +2 -1
- package/dist/cjs/{index-Dzs7Nkbj.js → index-BEOR8cIU.js} +1 -1
- package/dist/cjs/{index-BL_zVDFC.js → index-DRNSo5RU.js} +21 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{product-comparison-DUzqZuWv.js → product-comparison-1j61pRJX.js} +1 -1
- package/dist/cjs/{service-availability-services-BXL7V5i1.js → service-availability-services-pWb5YaEM.js} +1 -1
- package/dist/cjs/tet-accordion.cjs.entry.js +8 -8
- package/dist/cjs/tet-address-offers-filters-products_2.cjs.entry.js +3 -3
- package/dist/cjs/tet-address-offers-v2.cjs.entry.js +5 -5
- package/dist/cjs/tet-address-offers-view-v2.cjs.entry.js +5 -5
- package/dist/cjs/tet-address-offers-view.cjs.entry.js +4 -4
- package/dist/cjs/tet-address-offers_3.cjs.entry.js +6 -6
- package/dist/cjs/tet-address-search_2.cjs.entry.js +7 -7
- package/dist/cjs/tet-assembler_3.cjs.entry.js +4 -4
- package/dist/cjs/tet-autocomplete-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/tet-autocomplete_2.cjs.entry.js +2 -2
- package/dist/cjs/tet-b2b-check-out-form_5.cjs.entry.js +6 -6
- package/dist/cjs/tet-b2b-configurator.cjs.entry.js +4 -4
- package/dist/cjs/tet-banner-nav.cjs.entry.js +3 -3
- package/dist/cjs/tet-bar-graph.cjs.entry.js +1 -1
- package/dist/cjs/tet-border-radius.cjs.entry.js +2 -2
- package/dist/cjs/tet-business-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-compare-card.cjs.entry.js +3 -3
- package/dist/cjs/tet-business-round-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tet-button.cjs.entry.js +1 -1
- package/dist/cjs/tet-card-list.cjs.entry.js +5 -5
- package/dist/cjs/tet-carousel.cjs.entry.js +9 -9
- package/dist/cjs/{tet-checkbox_3.cjs.entry.js → tet-checkbox_2.cjs.entry.js} +1 -453
- package/dist/cjs/tet-cloud-application-form-dialog.cjs.entry.js +3 -3
- package/dist/cjs/tet-cloud-configurator.cjs.entry.js +3 -3
- package/dist/cjs/tet-colors.cjs.entry.js +5 -5
- package/dist/cjs/tet-compare-card-v2.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-cards-tab.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-cards_2.cjs.entry.js +5 -5
- package/dist/cjs/tet-components.cjs.js +2 -2
- package/dist/cjs/tet-container_2.cjs.entry.js +1 -1
- package/dist/cjs/tet-countdown.cjs.entry.js +2 -2
- package/dist/cjs/tet-counter.cjs.entry.js +1 -1
- package/dist/cjs/tet-datepicker-header_4.cjs.entry.js +6 -6
- package/dist/cjs/tet-datepicker.cjs.entry.js +5 -5
- package/dist/cjs/tet-dialog.cjs.entry.js +3 -3
- package/dist/cjs/tet-display.cjs.entry.js +1 -1
- package/dist/cjs/tet-divider.cjs.entry.js +1 -1
- package/dist/cjs/tet-dynamic-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-expandable-input.cjs.entry.js +1 -1
- package/dist/cjs/tet-expansion-panel.cjs.entry.js +2 -2
- package/dist/cjs/tet-feedback-form.cjs.entry.js +3 -3
- package/dist/cjs/tet-filter.cjs.entry.js +1 -1
- package/dist/cjs/tet-floating-block.cjs.entry.js +1 -1
- package/dist/cjs/tet-font-weight.cjs.entry.js +2 -2
- package/dist/cjs/tet-fonts.cjs.entry.js +2 -2
- package/dist/cjs/tet-grid.cjs.entry.js +2 -2
- package/dist/cjs/tet-icon.cjs.entry.js +2 -2
- package/dist/cjs/tet-inline-message.cjs.entry.js +1 -1
- package/dist/cjs/tet-input.cjs.entry.js +3 -3
- package/dist/cjs/tet-layout.cjs.entry.js +2 -2
- package/dist/cjs/tet-link-card-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-link.cjs.entry.js +2 -2
- package/dist/cjs/tet-menu-mobile.cjs.entry.js +1 -1
- package/dist/cjs/tet-menu.cjs.entry.js +1 -1
- package/dist/cjs/tet-mini-compare-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-multi-step-dialog.cjs.entry.js +4 -4
- package/dist/cjs/tet-navigation-mobile.cjs.entry.js +6 -6
- package/dist/cjs/tet-news-card-list.cjs.entry.js +2 -2
- package/dist/cjs/tet-news-card.cjs.entry.js +2 -2
- package/dist/cjs/tet-notification.cjs.entry.js +2 -2
- package/dist/cjs/tet-number-input.cjs.entry.js +1 -1
- package/dist/cjs/tet-paginator.cjs.entry.js +4 -4
- package/dist/cjs/tet-placeholder.cjs.entry.js +2 -2
- package/dist/cjs/tet-position.cjs.entry.js +1 -1
- package/dist/cjs/tet-price-view.cjs.entry.js +1 -1
- package/dist/cjs/tet-radio_2.cjs.entry.js +3 -3
- package/dist/cjs/tet-range-slider.cjs.entry.js +8 -8
- package/dist/cjs/tet-round-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tet-snicker-card-group.cjs.entry.js +1 -1
- package/dist/cjs/tet-snicker-card.cjs.entry.js +3 -3
- package/dist/cjs/tet-spacing.cjs.entry.js +2 -2
- package/dist/cjs/tet-spinner.cjs.entry.js +4 -4
- package/dist/cjs/tet-stepper-input.cjs.entry.js +4 -4
- package/dist/cjs/tet-stepper-v3.cjs.entry.js +1 -1
- package/dist/cjs/tet-sticky-offer.cjs.entry.js +2 -2
- package/dist/cjs/tet-support-search.cjs.entry.js +1 -1
- package/dist/cjs/tet-switch.cjs.entry.js +1 -1
- package/dist/cjs/tet-table.cjs.entry.js +1 -1
- package/dist/cjs/tet-tag_2.cjs.entry.js +5 -5
- package/dist/cjs/tet-text-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-text.cjs.entry.js +1 -1
- package/dist/cjs/tet-textarea.cjs.entry.js +3 -3
- package/dist/cjs/tet-thank-you-view-v3.cjs.entry.js +3 -3
- package/dist/cjs/tet-tooltip.cjs.entry.js +456 -0
- package/dist/cjs/tet-tv-program-channel-picker_3.cjs.entry.js +1465 -0
- package/dist/cjs/tet-tv-program-item.cjs.entry.js +217 -0
- package/dist/cjs/tet-tv-program-placeholders-CRvdN2bT.js +22 -0
- package/dist/cjs/tet-tv-program.cjs.entry.js +642 -3
- package/dist/cjs/{translations-Uvcq4kv8.js → translations-C5voiGIZ.js} +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/advanced/address/tet-address-offers-filters/tet-address-offers-filters.js +1 -1
- package/dist/collection/components/advanced/address/tet-address-offers-v2/tet-address-offers-v2.js +1 -1
- package/dist/collection/components/advanced/address/tet-address-search/tet-address-search.js +3 -3
- package/dist/collection/components/advanced/address/tet-autocomplete-dropdown/tet-autocomplete-dropdown.js +1 -1
- package/dist/collection/components/advanced/cards/tet-business-compare-card/tet-business-compare-card.js +2 -2
- package/dist/collection/components/advanced/cards/tet-card-list/tet-card-list.js +4 -4
- package/dist/collection/components/advanced/cards/tet-news-card/tet-news-card.js +1 -1
- package/dist/collection/components/advanced/dialog/tet-multi-step-dialog/tet-multi-step-dialog.js +1 -1
- package/dist/collection/components/advanced/forms/tet-availability-contact-form/tet-availability-contact-form.js +1 -1
- package/dist/collection/components/advanced/forms/tet-b2b-check-out-form/tet-b2b-check-out-form.js +3 -3
- package/dist/collection/components/basic/buttons/tet-tabs/tet-tab-content/tet-tab-content.js +2 -2
- package/dist/collection/components/basic/buttons/tet-tabs/tet-tab-header/tet-tab-header.js +2 -2
- package/dist/collection/components/basic/buttons/tet-tag/tet-tag.js +2 -2
- package/dist/collection/components/basic/carousel/tet-carousel/tet-carousel.js +6 -6
- package/dist/collection/components/basic/loaders/tet-loader/tet-loader.js +1 -1
- package/dist/collection/components/basic/loaders/tet-placeholder/tet-placeholder.js +1 -1
- package/dist/collection/components/basic/loaders/tet-spinner/tet-spinner.js +3 -3
- package/dist/collection/components/basic/misc/tet-countdown/tet-countdown.js +1 -1
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-header/tet-datepicker-header.js +2 -2
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-month-view/tet-datepicker-month-view.js +1 -1
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-multi-year-view/tet-datepicker-multi-year-view.js +1 -1
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-year-view/tet-datepicker-year-view.js +1 -1
- package/dist/collection/components/simple/inputs/tet-datepicker/tet-datepicker.js +4 -4
- package/dist/collection/components/simple/inputs/tet-range-slider/tet-range-slider.js +7 -7
- package/dist/collection/components/simple/inputs/tet-stepper-input/tet-stepper-input.js +1 -1
- package/dist/collection/components/simple/inputs/tet-textarea/tet-textarea.js +2 -2
- package/dist/collection/components/simple/lists/tet-news-card-list/tet-news-card-list.js +1 -1
- package/dist/collection/components/simple/menu/tet-navigation-mobile/tet-navigation-mobile.js +3 -3
- package/dist/collection/components/simple/menu/tet-paginator/tet-paginator.js +1 -1
- package/dist/collection/components/simple/misc/tet-sticky-offer/tet-sticky-offer.js +1 -1
- package/dist/collection/components/simple/structural/tet-accordion/tet-accordion.css +5 -1
- package/dist/collection/components/simple/structural/tet-accordion/tet-accordion.js +6 -6
- package/dist/collection/components/simple/structural/tet-expansion-panel/tet-expansion-panel.js +1 -1
- package/dist/collection/components/simple/text-blocks/tet-notification/tet-notification.js +1 -1
- package/dist/collection/components/simple/text-blocks/tet-tooltip/tet-tooltip.js +1 -1
- package/dist/collection/components/views/tet-address-offers-view/tet-address-offers-view.js +1 -1
- package/dist/collection/components/views/tet-address-offers-view-v2/tet-address-offers-view-v2.js +2 -2
- package/dist/collection/components/views/tet-tv-program/components/tet-tv-program-channel-picker/tet-tv-program-channel-picker.css +21 -8
- package/dist/collection/components/views/tet-tv-program/components/tet-tv-program-channel-picker/tet-tv-program-channel-picker.js +59 -39
- package/dist/collection/components/views/tet-tv-program/components/tet-tv-program-date-picker/tet-tv-program-date-picker.css +52 -36
- package/dist/collection/components/views/tet-tv-program/components/tet-tv-program-date-picker/tet-tv-program-date-picker.js +24 -30
- package/dist/collection/components/views/tet-tv-program/components/tet-tv-program-item/tet-tv-program-item.css +352 -0
- package/dist/collection/components/views/tet-tv-program/components/tet-tv-program-item/tet-tv-program-item.js +488 -0
- package/dist/collection/components/views/tet-tv-program/components/tet-tv-program-item/tet-tv-program-item.mock.js +45 -0
- package/dist/collection/components/views/tet-tv-program/components/tet-tv-program-schedule/tet-tv-program-schedule.css +567 -0
- package/dist/collection/components/views/tet-tv-program/components/tet-tv-program-schedule/tet-tv-program-schedule.js +1309 -0
- package/dist/collection/components/views/tet-tv-program/test/mock-schedule-layout.js +74 -0
- package/dist/collection/components/views/tet-tv-program/tet-tv-program-placeholders.js +8 -0
- package/dist/collection/components/views/tet-tv-program/tet-tv-program.css +777 -0
- package/dist/collection/components/views/tet-tv-program/tet-tv-program.js +638 -2
- package/dist/collection/components/views/tet-tv-program/tet-tv-program.types.js +1 -0
- package/dist/collection/components/views/tet-tv-program/utils/broadcast-time.js +26 -0
- package/dist/collection/components/views/tet-tv-program/utils/fill-program-gaps.js +44 -0
- package/dist/collection/components/views/tet-tv-program/utils/format-program-start-date.js +13 -0
- package/dist/collection/components/views/tet-tv-program/utils/tooltip-lifecycle.js +132 -0
- package/dist/collection/docs/styling/border-radius/tet-border-radius.js +1 -1
- package/dist/collection/docs/styling/colors/tet-colors.js +4 -4
- package/dist/collection/docs/styling/font-weight/tet-font-weight.js +1 -1
- package/dist/collection/docs/styling/fonts/tet-fonts.js +1 -1
- package/dist/collection/docs/styling/layout/tet-layout.js +1 -1
- package/dist/collection/docs/styling/link/tet-link.js +1 -1
- package/dist/collection/docs/styling/spacing/tet-spacing.js +1 -1
- package/dist/collection/docs/styling/tet-grid/tet-grid.js +1 -1
- package/dist/collection/services/api/index.js +1 -0
- package/dist/collection/services/api/services/tv/tv-program-types.js +1 -0
- package/dist/collection/services/api/services/tv/tv-program.js +31 -0
- package/dist/collection/services/utils/date.js +7 -0
- package/dist/collection/services/utils/index.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-p-J7NvGs.js → p-B5ujbvD5.js} +1 -1
- package/dist/components/{p-CgV4zAwQ.js → p-B8pZddqI.js} +1 -1
- package/dist/components/{p-Mpe-2CVQ.js → p-BBNq_Obn.js} +1 -1
- package/dist/components/{p-nKvolHsW.js → p-BCe35fiF.js} +1 -1
- package/dist/components/{p-CPGJg5Si.js → p-BCpsmWJM.js} +1 -1
- package/dist/components/{p-t_FgKIcd.js → p-BKIzl46N.js} +1 -1
- package/dist/components/{p-CMxcvnRv.js → p-BSySZotX.js} +1 -1
- package/dist/components/{p-CSxtbfBJ.js → p-BV6g-luP.js} +1 -1
- package/dist/components/{p-DN2JwXg9.js → p-BcXV5sQw.js} +1 -1
- package/dist/components/{p-DXQ-UeYl.js → p-BdrzH5ar.js} +1 -1
- package/dist/components/{p-CZach5oP.js → p-BnOTR5fm.js} +1 -1
- package/dist/components/{p-BMSAKp34.js → p-BxOwqp0a.js} +1 -1
- package/dist/components/{p-HzogPVbA.js → p-C16rQ6Rb.js} +1 -1
- package/dist/components/{p-BI70OOEF.js → p-C4ul-L9-.js} +1 -1
- package/dist/components/{p-vu71OGLf.js → p-CFyjcGK7.js} +1 -1
- package/dist/components/{p-C32vgbsV.js → p-CHCXv4yB.js} +1 -1
- package/dist/components/{p-BmH_7-IQ.js → p-CLWLTBE0.js} +1 -1
- package/dist/components/{p-B60jnxEn.js → p-CMSs7Ay5.js} +1 -1
- package/dist/components/{p-CvUaogvc.js → p-CNTMOgMT.js} +1 -1
- package/dist/components/{p-Lpb2mgqh.js → p-CPY7aG_q.js} +1 -1
- package/dist/components/p-CT0JjXhe.js +1 -0
- package/dist/components/{p-C-sZ3Bzu.js → p-CVthBaQt.js} +1 -1
- package/dist/components/{p-C4uKGuRj.js → p-C_hP1fqX.js} +1 -1
- package/dist/components/{p-Bw-D7nPx.js → p-CaHY4mtM.js} +1 -1
- package/dist/components/{p-CwZljiBM.js → p-CgWcN6ca.js} +1 -1
- package/dist/components/{p-DKZxpjnL.js → p-CqSiuKpc.js} +1 -1
- package/dist/components/{p-CF15dAPd.js → p-CtcmUD5r.js} +1 -1
- package/dist/components/{p-Bc4oqt_L.js → p-CushMMdv.js} +1 -1
- package/dist/components/{p-C61jDpta.js → p-D5J-pubV.js} +1 -1
- package/dist/components/{p-B5HqUnpw.js → p-D6zXaWBn.js} +1 -1
- package/dist/components/{p-BrPUjt5B.js → p-D8V6RYb0.js} +1 -1
- package/dist/components/{p-Bho4Xl9R.js → p-DAZQBXWo.js} +1 -1
- package/dist/components/{p-DikHJHTd.js → p-DAjLPYxx.js} +1 -1
- package/dist/components/{p-BztqMLE1.js → p-DD5q1beS.js} +1 -1
- package/dist/components/{p-CDUvchOX.js → p-DEasZUte.js} +1 -1
- package/dist/components/{p-C9dDgHzh.js → p-DEjrxfHh.js} +1 -1
- package/dist/components/{p-B1d6HEqd.js → p-DIDgNN8z.js} +1 -1
- package/dist/components/{p-Cdi7KDBd.js → p-DIyhqSTP.js} +1 -1
- package/dist/components/p-DPGMd9pW.js +1 -0
- package/dist/components/{p-CJnk1Plz.js → p-DSO2W8wX.js} +1 -1
- package/dist/components/p-D_ZrduSw.js +8 -0
- package/dist/components/{p-Czx7ardH.js → p-DopPk-Ix.js} +1 -1
- package/dist/components/{p-CYMnJi7q.js → p-DyY_BOZd.js} +1 -1
- package/dist/components/{p-B-1KdQSL.js → p-DzJunF5n.js} +1 -1
- package/dist/components/{p-lEX8wezw.js → p-IyO0AtW2.js} +1 -1
- package/dist/components/{p-o4S5jRzK.js → p-JSqvRN9t.js} +1 -1
- package/dist/components/{p-D8avEs-F.js → p-Jl97CICe.js} +1 -1
- package/dist/components/{p-mVj43aKR.js → p-PMDuFwdO.js} +1 -1
- package/dist/components/p-PuQGb_kZ.js +1 -0
- package/dist/components/{p-DutLsF-O.js → p-RKwM_UoL.js} +1 -1
- package/dist/components/{p-DnPS3TWn.js → p-U1U7KO8M.js} +1 -1
- package/dist/components/p-WTP67GQt.js +1 -0
- package/dist/components/{p-Bsqoxd9G.js → p-WvkszOBK.js} +1 -1
- package/dist/components/{p-BcVrianM.js → p-Zd3FJ-E9.js} +1 -1
- package/dist/components/{p-BD6bBnqr.js → p-h65iKcGh.js} +1 -1
- package/dist/components/{p-Cb2bEUmu.js → p-kj9GRPBV.js} +1 -1
- package/dist/components/{p-44eECwiT.js → p-nu13atxU.js} +1 -1
- package/dist/components/{p-DgT79UG-.js → p-o3DB-jeO.js} +1 -1
- package/dist/components/p-rItngdC7.js +1 -0
- package/dist/components/{p-B9bE6qY-.js → p-raVwRdrn.js} +1 -1
- package/dist/components/{p-sgozlrhg.js → p-tV8a7IEe.js} +1 -1
- package/dist/components/tet-accordion.js +1 -1
- package/dist/components/tet-address-offers-filters-products.js +1 -1
- package/dist/components/tet-address-offers-filters.js +1 -1
- package/dist/components/tet-address-offers-v2.js +1 -1
- package/dist/components/tet-address-offers-view-v2.js +1 -1
- package/dist/components/tet-address-offers-view.js +1 -1
- package/dist/components/tet-address-offers.js +1 -1
- package/dist/components/tet-address-search.js +1 -1
- package/dist/components/tet-assembler.js +1 -1
- package/dist/components/tet-asset-availability-addresses.js +1 -1
- package/dist/components/tet-autocomplete-dropdown.js +1 -1
- package/dist/components/tet-autocomplete.js +1 -1
- package/dist/components/tet-availability-contact-form.js +1 -1
- package/dist/components/tet-b2b-check-out-form.js +1 -1
- package/dist/components/tet-b2b-compare-card.js +1 -1
- package/dist/components/tet-b2b-configurator-cart.js +1 -1
- package/dist/components/tet-b2b-configurator.js +1 -1
- package/dist/components/tet-banner-nav.js +1 -1
- package/dist/components/tet-bar-graph.js +1 -1
- package/dist/components/tet-border-radius.js +1 -1
- package/dist/components/tet-business-card.js +1 -1
- package/dist/components/tet-business-compare-card.js +1 -1
- package/dist/components/tet-business-navigation.js +1 -1
- package/dist/components/tet-business-round-stepper.js +1 -1
- package/dist/components/tet-business-summary-card.js +1 -1
- package/dist/components/tet-button.js +1 -1
- package/dist/components/tet-card-list.js +1 -1
- package/dist/components/tet-carousel.js +1 -1
- package/dist/components/tet-checkbox.js +1 -1
- package/dist/components/tet-cloud-application-form-dialog.js +1 -1
- package/dist/components/tet-cloud-configurator.js +1 -1
- package/dist/components/tet-colors.js +1 -1
- package/dist/components/tet-compare-card-v2.js +1 -1
- package/dist/components/tet-compare-card-v3.js +1 -1
- package/dist/components/tet-compare-card.js +1 -1
- package/dist/components/tet-compare-cards-tab.js +1 -1
- package/dist/components/tet-compare-cards.js +1 -1
- package/dist/components/tet-container.js +1 -1
- package/dist/components/tet-countdown.js +1 -1
- package/dist/components/tet-counter.js +1 -1
- package/dist/components/tet-datepicker-header.js +1 -1
- package/dist/components/tet-datepicker-month-view.js +1 -1
- package/dist/components/tet-datepicker-multi-year-view.js +1 -1
- package/dist/components/tet-datepicker-year-view.js +1 -1
- package/dist/components/tet-datepicker.js +1 -1
- package/dist/components/tet-dialog.js +1 -1
- package/dist/components/tet-display.js +1 -1
- package/dist/components/tet-divider.js +1 -1
- package/dist/components/tet-dropdown.js +1 -1
- package/dist/components/tet-dynamic-card.js +1 -1
- package/dist/components/tet-expandable-input.js +1 -1
- package/dist/components/tet-expansion-panel.js +1 -1
- package/dist/components/tet-feedback-form.js +1 -1
- package/dist/components/tet-filter.js +1 -1
- package/dist/components/tet-floating-block.js +1 -1
- package/dist/components/tet-font-weight.js +1 -1
- package/dist/components/tet-fonts.js +1 -1
- package/dist/components/tet-grid.js +1 -1
- package/dist/components/tet-icon.js +1 -1
- package/dist/components/tet-inline-message.js +1 -1
- package/dist/components/tet-input.js +1 -1
- package/dist/components/tet-layout.js +1 -1
- package/dist/components/tet-link-card-list.js +1 -1
- package/dist/components/tet-link.js +1 -1
- package/dist/components/tet-loader.js +1 -1
- package/dist/components/tet-menu-mobile.js +1 -1
- package/dist/components/tet-menu.js +1 -1
- package/dist/components/tet-mini-compare-card.js +1 -1
- package/dist/components/tet-multi-step-dialog.js +1 -1
- package/dist/components/tet-navigation-mobile.js +1 -1
- package/dist/components/tet-news-card-list.js +1 -1
- package/dist/components/tet-news-card.js +1 -1
- package/dist/components/tet-notification.js +1 -1
- package/dist/components/tet-number-input.js +1 -1
- package/dist/components/tet-paginator.js +1 -1
- package/dist/components/tet-placeholder.js +1 -1
- package/dist/components/tet-position.js +1 -1
- package/dist/components/tet-price-view.js +1 -1
- package/dist/components/tet-radio-blocks.js +1 -1
- package/dist/components/tet-radio.js +1 -1
- package/dist/components/tet-range-slider.js +1 -1
- package/dist/components/tet-round-stepper.js +1 -1
- package/dist/components/tet-selection-list.js +1 -1
- package/dist/components/tet-snicker-card-group.js +1 -1
- package/dist/components/tet-snicker-card.js +1 -1
- package/dist/components/tet-spacing.js +1 -1
- package/dist/components/tet-spinner.js +1 -1
- package/dist/components/tet-stepper-input.js +1 -1
- package/dist/components/tet-stepper-v3.js +1 -1
- package/dist/components/tet-sticky-offer.js +1 -1
- package/dist/components/tet-support-search.js +1 -1
- package/dist/components/tet-switch.js +1 -1
- package/dist/components/tet-tab-content.js +1 -1
- package/dist/components/tet-tab-header.js +1 -1
- package/dist/components/tet-table.js +1 -1
- package/dist/components/tet-tag-group.js +1 -1
- package/dist/components/tet-tag.js +1 -1
- package/dist/components/tet-text-list.js +1 -1
- package/dist/components/tet-text.js +1 -1
- package/dist/components/tet-textarea.js +1 -1
- package/dist/components/tet-thank-you-view-v3.js +1 -1
- package/dist/components/tet-tooltip.js +1 -1
- package/dist/components/tet-tv-program-channel-picker.js +1 -1
- package/dist/components/tet-tv-program-date-picker.js +1 -1
- package/dist/components/tet-tv-program-item.d.ts +11 -0
- package/dist/components/tet-tv-program-item.js +1 -0
- package/dist/components/tet-tv-program-schedule.d.ts +11 -0
- package/dist/components/tet-tv-program-schedule.js +1 -0
- package/dist/components/tet-tv-program.js +1 -1
- package/dist/esm/format-program-start-date-BTxL4Knq.js +148 -0
- package/dist/esm/{http-codes-CHPW8K5J.js → http-codes-DxBVAMp_.js} +2 -1
- package/dist/esm/{index-gA3_LS77.js → index-BlxQHXlF.js} +21 -13
- package/dist/esm/{index-BzVLx-ae.js → index-Cl1zJLqR.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{product-comparison-09p7FlLY.js → product-comparison-CIa1tZy1.js} +1 -1
- package/dist/esm/{service-availability-services-DHbWTGBw.js → service-availability-services-DR0G7lAz.js} +1 -1
- package/dist/esm/tet-accordion.entry.js +8 -8
- package/dist/esm/tet-address-offers-filters-products_2.entry.js +3 -3
- package/dist/esm/tet-address-offers-v2.entry.js +5 -5
- package/dist/esm/tet-address-offers-view-v2.entry.js +5 -5
- package/dist/esm/tet-address-offers-view.entry.js +4 -4
- package/dist/esm/tet-address-offers_3.entry.js +6 -6
- package/dist/esm/tet-address-search_2.entry.js +7 -7
- package/dist/esm/tet-assembler_3.entry.js +4 -4
- package/dist/esm/tet-autocomplete-dropdown.entry.js +2 -2
- package/dist/esm/tet-autocomplete_2.entry.js +2 -2
- package/dist/esm/tet-b2b-check-out-form_5.entry.js +6 -6
- package/dist/esm/tet-b2b-configurator.entry.js +4 -4
- package/dist/esm/tet-banner-nav.entry.js +3 -3
- package/dist/esm/tet-bar-graph.entry.js +1 -1
- package/dist/esm/tet-border-radius.entry.js +2 -2
- package/dist/esm/tet-business-card.entry.js +1 -1
- package/dist/esm/tet-business-compare-card.entry.js +3 -3
- package/dist/esm/tet-business-round-stepper.entry.js +1 -1
- package/dist/esm/tet-button.entry.js +1 -1
- package/dist/esm/tet-card-list.entry.js +5 -5
- package/dist/esm/tet-carousel.entry.js +9 -9
- package/dist/esm/{tet-checkbox_3.entry.js → tet-checkbox_2.entry.js} +2 -453
- package/dist/esm/tet-cloud-application-form-dialog.entry.js +3 -3
- package/dist/esm/tet-cloud-configurator.entry.js +3 -3
- package/dist/esm/tet-colors.entry.js +5 -5
- package/dist/esm/tet-compare-card-v2.entry.js +3 -3
- package/dist/esm/tet-compare-cards-tab.entry.js +3 -3
- package/dist/esm/tet-compare-cards_2.entry.js +5 -5
- package/dist/esm/tet-components.js +3 -3
- package/dist/esm/tet-container_2.entry.js +1 -1
- package/dist/esm/tet-countdown.entry.js +2 -2
- package/dist/esm/tet-counter.entry.js +1 -1
- package/dist/esm/tet-datepicker-header_4.entry.js +6 -6
- package/dist/esm/tet-datepicker.entry.js +5 -5
- package/dist/esm/tet-dialog.entry.js +3 -3
- package/dist/esm/tet-display.entry.js +1 -1
- package/dist/esm/tet-divider.entry.js +1 -1
- package/dist/esm/tet-dynamic-card.entry.js +1 -1
- package/dist/esm/tet-expandable-input.entry.js +1 -1
- package/dist/esm/tet-expansion-panel.entry.js +2 -2
- package/dist/esm/tet-feedback-form.entry.js +3 -3
- package/dist/esm/tet-filter.entry.js +1 -1
- package/dist/esm/tet-floating-block.entry.js +1 -1
- package/dist/esm/tet-font-weight.entry.js +2 -2
- package/dist/esm/tet-fonts.entry.js +2 -2
- package/dist/esm/tet-grid.entry.js +2 -2
- package/dist/esm/tet-icon.entry.js +2 -2
- package/dist/esm/tet-inline-message.entry.js +1 -1
- package/dist/esm/tet-input.entry.js +3 -3
- package/dist/esm/tet-layout.entry.js +2 -2
- package/dist/esm/tet-link-card-list.entry.js +1 -1
- package/dist/esm/tet-link.entry.js +2 -2
- package/dist/esm/tet-menu-mobile.entry.js +1 -1
- package/dist/esm/tet-menu.entry.js +1 -1
- package/dist/esm/tet-mini-compare-card.entry.js +1 -1
- package/dist/esm/tet-multi-step-dialog.entry.js +4 -4
- package/dist/esm/tet-navigation-mobile.entry.js +6 -6
- package/dist/esm/tet-news-card-list.entry.js +2 -2
- package/dist/esm/tet-news-card.entry.js +2 -2
- package/dist/esm/tet-notification.entry.js +2 -2
- package/dist/esm/tet-number-input.entry.js +1 -1
- package/dist/esm/tet-paginator.entry.js +4 -4
- package/dist/esm/tet-placeholder.entry.js +2 -2
- package/dist/esm/tet-position.entry.js +1 -1
- package/dist/esm/tet-price-view.entry.js +1 -1
- package/dist/esm/tet-radio_2.entry.js +3 -3
- package/dist/esm/tet-range-slider.entry.js +8 -8
- package/dist/esm/tet-round-stepper.entry.js +1 -1
- package/dist/esm/tet-snicker-card-group.entry.js +1 -1
- package/dist/esm/tet-snicker-card.entry.js +3 -3
- package/dist/esm/tet-spacing.entry.js +2 -2
- package/dist/esm/tet-spinner.entry.js +4 -4
- package/dist/esm/tet-stepper-input.entry.js +4 -4
- package/dist/esm/tet-stepper-v3.entry.js +1 -1
- package/dist/esm/tet-sticky-offer.entry.js +2 -2
- package/dist/esm/tet-support-search.entry.js +1 -1
- package/dist/esm/tet-switch.entry.js +1 -1
- package/dist/esm/tet-table.entry.js +1 -1
- package/dist/esm/tet-tag_2.entry.js +5 -5
- package/dist/esm/tet-text-list.entry.js +1 -1
- package/dist/esm/tet-text.entry.js +1 -1
- package/dist/esm/tet-textarea.entry.js +3 -3
- package/dist/esm/tet-thank-you-view-v3.entry.js +3 -3
- package/dist/esm/tet-tooltip.entry.js +454 -0
- package/dist/esm/tet-tv-program-channel-picker_3.entry.js +1461 -0
- package/dist/esm/tet-tv-program-item.entry.js +215 -0
- package/dist/esm/tet-tv-program-placeholders-6PnHO3Vt.js +19 -0
- package/dist/esm/tet-tv-program.entry.js +642 -3
- package/dist/esm/{translations-CLCWF8K_.js → translations-CpmeCaXU.js} +1 -1
- package/dist/tet-components/{p-1af6b8cb.entry.js → p-00383c63.entry.js} +1 -1
- package/dist/tet-components/{p-7c1dd176.entry.js → p-01b6e854.entry.js} +1 -1
- package/dist/tet-components/{p-0744b479.entry.js → p-0364bd08.entry.js} +1 -1
- package/dist/tet-components/{p-13550c14.entry.js → p-07719feb.entry.js} +1 -1
- package/dist/tet-components/{p-6a3891bf.entry.js → p-090b1ee9.entry.js} +1 -1
- package/dist/tet-components/{p-6800ae9e.entry.js → p-0bc383b2.entry.js} +1 -1
- package/dist/tet-components/p-13029731.entry.js +1 -0
- package/dist/tet-components/{p-aa0b655b.entry.js → p-144a817d.entry.js} +1 -1
- package/dist/tet-components/{p-ae31acd5.entry.js → p-14fe8c03.entry.js} +1 -1
- package/dist/tet-components/{p-57d07760.entry.js → p-16f75f0c.entry.js} +1 -1
- package/dist/tet-components/{p-0e021d89.entry.js → p-18c6bad0.entry.js} +1 -1
- package/dist/tet-components/p-197d157d.entry.js +1 -0
- package/dist/tet-components/{p-e88e50e6.entry.js → p-222d6593.entry.js} +1 -1
- package/dist/tet-components/{p-bc73adcc.entry.js → p-22ea8015.entry.js} +1 -1
- package/dist/tet-components/{p-484266ca.entry.js → p-23e33f99.entry.js} +1 -1
- package/dist/tet-components/{p-9d612283.entry.js → p-248957cf.entry.js} +1 -1
- package/dist/tet-components/{p-b370c444.entry.js → p-2a5e14d3.entry.js} +1 -1
- package/dist/tet-components/{p-7d62e8e0.entry.js → p-2eee7043.entry.js} +1 -1
- package/dist/tet-components/{p-0d0de163.entry.js → p-2ff74667.entry.js} +1 -1
- package/dist/tet-components/{p-32983951.entry.js → p-35228f86.entry.js} +1 -1
- package/dist/tet-components/{p-db92c865.entry.js → p-359ddd3d.entry.js} +1 -1
- package/dist/tet-components/{p-1ce9b751.entry.js → p-394504cc.entry.js} +1 -1
- package/dist/tet-components/p-3a242ce0.entry.js +1 -0
- package/dist/tet-components/{p-827abc22.entry.js → p-3a99d267.entry.js} +1 -1
- package/dist/tet-components/{p-231dde32.entry.js → p-3f254745.entry.js} +1 -1
- package/dist/tet-components/{p-73a66398.entry.js → p-429d9d2c.entry.js} +1 -1
- package/dist/tet-components/p-45573d70.entry.js +1 -0
- package/dist/tet-components/{p-c5068d10.entry.js → p-4aab89f2.entry.js} +1 -1
- package/dist/tet-components/{p-2884891b.entry.js → p-4b6daee6.entry.js} +1 -1
- package/dist/tet-components/{p-e45dab2b.entry.js → p-52a679f8.entry.js} +1 -1
- package/dist/tet-components/{p-17f8270f.entry.js → p-537e043d.entry.js} +1 -1
- package/dist/tet-components/{p-039121d4.entry.js → p-549fc480.entry.js} +1 -1
- package/dist/tet-components/{p-f73c5481.entry.js → p-645519ea.entry.js} +1 -1
- package/dist/tet-components/{p-0bd6e06e.entry.js → p-6a39e30f.entry.js} +1 -1
- package/dist/tet-components/{p-c321199b.entry.js → p-6d5bb64b.entry.js} +1 -1
- package/dist/tet-components/p-71918ee5.entry.js +1 -0
- package/dist/tet-components/{p-675387bc.entry.js → p-73ba2953.entry.js} +1 -1
- package/dist/tet-components/{p-e7c43c95.entry.js → p-80179dc9.entry.js} +1 -1
- package/dist/tet-components/{p-7672a3cf.entry.js → p-84835070.entry.js} +1 -1
- package/dist/tet-components/{p-0026968d.entry.js → p-85704684.entry.js} +1 -1
- package/dist/tet-components/{p-72c54f04.entry.js → p-8c129c83.entry.js} +1 -1
- package/dist/tet-components/{p-845419ea.entry.js → p-8dd9bde1.entry.js} +1 -1
- package/dist/tet-components/{p-9f8c0d62.entry.js → p-8df51fe3.entry.js} +1 -1
- package/dist/tet-components/{p-16282657.entry.js → p-8f708ddc.entry.js} +1 -1
- package/dist/tet-components/{p-8424ddb6.entry.js → p-94bf94ea.entry.js} +1 -1
- package/dist/tet-components/{p-af7f7020.entry.js → p-984c1332.entry.js} +1 -1
- package/dist/tet-components/{p-ff164570.entry.js → p-994b8b7f.entry.js} +1 -1
- package/dist/tet-components/{p-324d8840.entry.js → p-9d5f14db.entry.js} +1 -1
- package/dist/tet-components/{p-25c80589.entry.js → p-9dd85372.entry.js} +1 -1
- package/dist/tet-components/{p-7d218d65.entry.js → p-9e0845ff.entry.js} +1 -1
- package/dist/tet-components/{p-AT09y63b.js → p-B3oUiyJ_.js} +1 -1
- package/dist/tet-components/p-BTo8T4K7.js +1 -0
- package/dist/tet-components/p-BTxL4Knq.js +1 -0
- package/dist/tet-components/{p-gA3_LS77.js → p-BlxQHXlF.js} +1 -1
- package/dist/tet-components/p-C2_Y9hR8.js +8 -0
- package/dist/tet-components/{p-ChdlTQSF.js → p-Cu_nZUjB.js} +1 -1
- package/dist/tet-components/{p-nYl-0ap-.js → p-Du1r7fBd.js} +1 -1
- package/dist/tet-components/{p-a91c8e30.entry.js → p-a1e75f54.entry.js} +1 -1
- package/dist/tet-components/{p-22db539b.entry.js → p-a672882d.entry.js} +1 -1
- package/dist/tet-components/{p-c778dbd4.entry.js → p-a8c5f562.entry.js} +1 -1
- package/dist/tet-components/{p-0e9201e6.entry.js → p-aa0626f1.entry.js} +1 -1
- package/dist/tet-components/{p-73acf518.entry.js → p-aab954fd.entry.js} +1 -1
- package/dist/tet-components/{p-76be889b.entry.js → p-adabdd88.entry.js} +1 -1
- package/dist/tet-components/{p-a9706390.entry.js → p-af2bed0c.entry.js} +1 -1
- package/dist/tet-components/{p-1ed0c66f.entry.js → p-b1f8889c.entry.js} +1 -1
- package/dist/tet-components/{p-12fe3881.entry.js → p-b36bd5ee.entry.js} +1 -1
- package/dist/tet-components/{p-2be883e9.entry.js → p-b8c728a3.entry.js} +1 -1
- package/dist/tet-components/{p-b389b07a.entry.js → p-b9892cf7.entry.js} +1 -1
- package/dist/tet-components/{p-0e4129ea.entry.js → p-bc53afc8.entry.js} +1 -1
- package/dist/tet-components/{p-8b7bbbbf.entry.js → p-bfc1d731.entry.js} +1 -1
- package/dist/tet-components/{p-318947f9.entry.js → p-c32a7bb6.entry.js} +1 -1
- package/dist/tet-components/{p-7dfd519c.entry.js → p-c577fcf2.entry.js} +1 -1
- package/dist/tet-components/{p-3dd266f3.entry.js → p-c5fa28a5.entry.js} +1 -1
- package/dist/tet-components/{p-4a21fdfb.entry.js → p-c6266e47.entry.js} +1 -1
- package/dist/tet-components/{p-8b2edb99.entry.js → p-c6dcceb2.entry.js} +1 -1
- package/dist/tet-components/{p-19cb8e38.entry.js → p-c7c9c272.entry.js} +1 -1
- package/dist/tet-components/{p-9ab815b3.entry.js → p-cafa6809.entry.js} +1 -1
- package/dist/tet-components/{p-467663a9.entry.js → p-cbb61a78.entry.js} +1 -1
- package/dist/tet-components/{p-e59ec4c3.entry.js → p-d19565db.entry.js} +1 -1
- package/dist/tet-components/{p-0b122cc1.entry.js → p-d5212455.entry.js} +1 -1
- package/dist/tet-components/p-d5b8d06c.entry.js +1 -0
- package/dist/tet-components/{p-f8aa1f9b.entry.js → p-d770c106.entry.js} +1 -1
- package/dist/tet-components/{p-340c3e79.entry.js → p-d875735c.entry.js} +1 -1
- package/dist/tet-components/{p-daa8ca5c.entry.js → p-d94f8fc5.entry.js} +1 -1
- package/dist/tet-components/{p-ebd66166.entry.js → p-ddcaa280.entry.js} +1 -1
- package/dist/tet-components/{p-7b98b883.entry.js → p-ddfa57fd.entry.js} +1 -1
- package/dist/tet-components/{p-e9e288f6.entry.js → p-eb487864.entry.js} +1 -1
- package/dist/tet-components/{p-03b6c7a2.entry.js → p-ef89dc8a.entry.js} +1 -1
- package/dist/tet-components/{p-8329cd9d.entry.js → p-f378220c.entry.js} +1 -1
- package/dist/tet-components/p-f459c748.entry.js +1 -0
- package/dist/tet-components/{p-a2e40f04.entry.js → p-f490d4a6.entry.js} +1 -1
- package/dist/tet-components/{p-ac515335.entry.js → p-f675b69e.entry.js} +1 -1
- package/dist/tet-components/{p-f53d2d9f.entry.js → p-f7a06231.entry.js} +1 -1
- package/dist/tet-components/{p-Th74Kc5K.js → p-qSX0mu28.js} +1 -1
- package/dist/tet-components/tet-components.esm.js +1 -1
- package/dist/types/components/views/tet-tv-program/components/tet-tv-program-channel-picker/tet-tv-program-channel-picker.d.ts +9 -13
- package/dist/types/components/views/tet-tv-program/components/tet-tv-program-date-picker/tet-tv-program-date-picker.d.ts +1 -3
- package/dist/types/components/views/tet-tv-program/components/tet-tv-program-item/tet-tv-program-item.d.ts +62 -0
- package/dist/types/components/views/tet-tv-program/components/tet-tv-program-item/tet-tv-program-item.mock.d.ts +2 -0
- package/dist/types/components/views/tet-tv-program/components/tet-tv-program-schedule/tet-tv-program-schedule.d.ts +174 -0
- package/dist/types/components/views/tet-tv-program/test/mock-schedule-layout.d.ts +4 -0
- package/dist/types/components/views/tet-tv-program/tet-tv-program-placeholders.d.ts +2 -0
- package/dist/types/components/views/tet-tv-program/tet-tv-program.d.ts +96 -0
- package/dist/types/components/views/tet-tv-program/tet-tv-program.types.d.ts +30 -0
- package/dist/types/components/views/tet-tv-program/utils/broadcast-time.d.ts +14 -0
- package/dist/types/components/views/tet-tv-program/utils/fill-program-gaps.d.ts +3 -0
- package/dist/types/components/views/tet-tv-program/utils/format-program-start-date.d.ts +1 -0
- package/dist/types/components/views/tet-tv-program/utils/tooltip-lifecycle.d.ts +22 -0
- package/dist/types/components.d.ts +339 -6
- package/dist/types/services/api/index.d.ts +2 -0
- package/dist/types/services/api/services/tv/tv-program-types.d.ts +46 -0
- package/dist/types/services/api/services/tv/tv-program.d.ts +7 -0
- package/dist/types/services/utils/date.d.ts +2 -0
- package/dist/types/services/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/tet-tv-program-channel-picker_2.cjs.entry.js +0 -536
- package/dist/components/p-Br4jWI9B.js +0 -8
- package/dist/components/p-DrFW6lxe.js +0 -1
- package/dist/components/p-Q3NUC_eC.js +0 -1
- package/dist/esm/tet-tv-program-channel-picker_2.entry.js +0 -533
- package/dist/tet-components/p-3a573d6e.entry.js +0 -1
- package/dist/tet-components/p-CNGb2lWC.js +0 -8
- package/dist/tet-components/p-aea861c9.entry.js +0 -1
- package/dist/tet-components/p-b21b4329.entry.js +0 -1
- package/dist/tet-components/p-c102d7e8.entry.js +0 -1
- package/dist/tet-components/p-dabdfe62.entry.js +0 -1
|
@@ -0,0 +1,1309 @@
|
|
|
1
|
+
import { TooltipLifecycle } from "../../utils/tooltip-lifecycle";
|
|
2
|
+
import { formatProgramStartDate } from "../../utils/format-program-start-date";
|
|
3
|
+
import { forceUpdate, h } from "@stencil/core";
|
|
4
|
+
import { processTranslations, t } from "../../../../../services/translations/index";
|
|
5
|
+
import { formatLocalDate } from "../../../../../services/utils/date";
|
|
6
|
+
import { renderProgramPlaceholders } from "../../tet-tv-program-placeholders";
|
|
7
|
+
import { TooltipPosition } from "../../../../simple/text-blocks/tet-tooltip/enums/TooltipPosition";
|
|
8
|
+
const DRAG_THRESHOLD = 5;
|
|
9
|
+
const DRAGGING_CLASS = 'tv-program__schedule-container--dragging';
|
|
10
|
+
const MINUTES_PER_DAY = 24 * 60;
|
|
11
|
+
const MINUTE_MS = 60 * 1000;
|
|
12
|
+
const TIMELINE_STEP = 15;
|
|
13
|
+
const MINUTES_PER_HOUR = 60;
|
|
14
|
+
const LABELS = Array.from({ length: MINUTES_PER_DAY / TIMELINE_STEP + 1 }, (_, index) => {
|
|
15
|
+
const minute = index * TIMELINE_STEP;
|
|
16
|
+
const isHour = minute % 60 === 0;
|
|
17
|
+
return {
|
|
18
|
+
minute,
|
|
19
|
+
isHour,
|
|
20
|
+
label: isHour ? `${String(minute / 60).padStart(2, '0')}:00` : String(minute % 60),
|
|
21
|
+
left: `${minute / MINUTES_PER_DAY * 100}%`,
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
export class TetTvProgramSchedule {
|
|
25
|
+
/** Theme of the schedule and its broadcast cards. */
|
|
26
|
+
theme = 'light';
|
|
27
|
+
/** Language used for navigation labels. */
|
|
28
|
+
language = 'lv';
|
|
29
|
+
/** Translated title displayed for unavailable broadcasts and their details. */
|
|
30
|
+
unavailableTitle = '';
|
|
31
|
+
/** Loaded channel schedules. Channels with no loaded schedule should be omitted. */
|
|
32
|
+
schedules = [];
|
|
33
|
+
/** Available channel metadata, retained while programs reload. */
|
|
34
|
+
channels = [];
|
|
35
|
+
/** Selected local calendar date in YYYY-MM-DD format. */
|
|
36
|
+
date = formatLocalDate();
|
|
37
|
+
/** Whether channel metadata is loading. */
|
|
38
|
+
channelsLoading = false;
|
|
39
|
+
/** Whether broadcast programs are loading. */
|
|
40
|
+
programLoading = false;
|
|
41
|
+
/** Whether the next page of channel schedules is loading. */
|
|
42
|
+
loadingMoreChannels = false;
|
|
43
|
+
/** Current timestamp supplied by the parent clock. */
|
|
44
|
+
currentTime = Date.now();
|
|
45
|
+
/** Broadcast status and progress supplied by the parent clock. */
|
|
46
|
+
broadcastTiming = {};
|
|
47
|
+
visibleRange;
|
|
48
|
+
selectedItemId;
|
|
49
|
+
focusedItemId;
|
|
50
|
+
focusedChannelId;
|
|
51
|
+
visibleChannelIds = new Set();
|
|
52
|
+
channelTooltipState;
|
|
53
|
+
canScrollPrevious = false;
|
|
54
|
+
canScrollNext = false;
|
|
55
|
+
failedChannelLogoSources = new Set();
|
|
56
|
+
/** Whether today's current-time line is visible outside the channel gutter. */
|
|
57
|
+
currentTimeVisibilityChanged;
|
|
58
|
+
element;
|
|
59
|
+
channelIdsByRow = new WeakMap();
|
|
60
|
+
channelAnchors = new Map();
|
|
61
|
+
channelRows = new Map();
|
|
62
|
+
channelButtons = new Map();
|
|
63
|
+
placeholderCounts = new Map();
|
|
64
|
+
readyPrograms = new WeakMap();
|
|
65
|
+
channelTooltipLifecycle = new TooltipLifecycle(() => this.finishChannelTooltip());
|
|
66
|
+
programDetails = new Map();
|
|
67
|
+
detailsAccordions = new Map();
|
|
68
|
+
activePrograms = new Map();
|
|
69
|
+
drag;
|
|
70
|
+
suppressClick = false;
|
|
71
|
+
viewport;
|
|
72
|
+
headerViewport;
|
|
73
|
+
timeline;
|
|
74
|
+
resizeObserver;
|
|
75
|
+
rowVisibilityObserver;
|
|
76
|
+
rangeFrame;
|
|
77
|
+
currentTimeVisible;
|
|
78
|
+
channelTooltip;
|
|
79
|
+
pendingChannelTooltip;
|
|
80
|
+
channelTooltipHovered = false;
|
|
81
|
+
channelTooltipFocused = false;
|
|
82
|
+
channelTooltipPinned = false;
|
|
83
|
+
pendingPrograms = new WeakMap();
|
|
84
|
+
hydrationVersion = 0;
|
|
85
|
+
itemPositions = new WeakMap();
|
|
86
|
+
pendingProgramFocus;
|
|
87
|
+
pendingDetailsScroll;
|
|
88
|
+
detailsScrollTimer;
|
|
89
|
+
pendingDetailsResize;
|
|
90
|
+
detailsResizeAnimation;
|
|
91
|
+
navigationMinute;
|
|
92
|
+
connectedCallback() {
|
|
93
|
+
this.observeChannelVisibility();
|
|
94
|
+
if (this.viewport) {
|
|
95
|
+
this.observeViewport();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
async componentWillLoad() {
|
|
99
|
+
await this.onLanguageChange(this.language);
|
|
100
|
+
}
|
|
101
|
+
componentDidLoad() {
|
|
102
|
+
this.observeViewport();
|
|
103
|
+
}
|
|
104
|
+
componentDidRender() {
|
|
105
|
+
this.focusPendingProgram();
|
|
106
|
+
this.waitForProgramItems();
|
|
107
|
+
this.channelTooltipLifecycle.attach(this.channelTooltip);
|
|
108
|
+
for (const [channelId, accordion] of this.detailsAccordions) {
|
|
109
|
+
this.syncProgramDetails(channelId, accordion);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
disconnectedCallback() {
|
|
113
|
+
this.detailsResizeAnimation?.cancel();
|
|
114
|
+
clearTimeout(this.detailsScrollTimer);
|
|
115
|
+
this.pendingDetailsScroll = undefined;
|
|
116
|
+
this.invalidateProgramHydration();
|
|
117
|
+
this.resetChannelTooltip();
|
|
118
|
+
if (this.drag) {
|
|
119
|
+
this.handlePointerEnd(this.drag.pointerId);
|
|
120
|
+
}
|
|
121
|
+
this.suppressClick = false;
|
|
122
|
+
if (this.rangeFrame !== undefined) {
|
|
123
|
+
cancelAnimationFrame(this.rangeFrame);
|
|
124
|
+
this.rangeFrame = undefined;
|
|
125
|
+
}
|
|
126
|
+
this.resizeObserver?.disconnect();
|
|
127
|
+
this.resizeObserver = undefined;
|
|
128
|
+
this.rowVisibilityObserver?.disconnect();
|
|
129
|
+
this.rowVisibilityObserver = undefined;
|
|
130
|
+
}
|
|
131
|
+
/** Blocks clicks triggered by dragging. */
|
|
132
|
+
handleClick(event) {
|
|
133
|
+
if (this.suppressClick && event.detail !== 0) {
|
|
134
|
+
event.preventDefault();
|
|
135
|
+
event.stopImmediatePropagation();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/** Resets keyboard navigation and dismisses channel tooltips. */
|
|
139
|
+
handleChannelTooltipKeydown(event) {
|
|
140
|
+
if (event.key === 'Tab') {
|
|
141
|
+
this.navigationMinute = undefined;
|
|
142
|
+
}
|
|
143
|
+
if (event.key === 'Escape' && this.channelTooltipState) {
|
|
144
|
+
this.hideChannelTooltip();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/** Handles schedule navigation and details dismissal. */
|
|
148
|
+
handleScheduleKeydown(event) {
|
|
149
|
+
const path = event.composedPath();
|
|
150
|
+
const program = path.find(element => element.tagName === 'TET-TV-PROGRAM-ITEM');
|
|
151
|
+
if (event.key === 'Escape') {
|
|
152
|
+
this.closeProgramDetailsOnEscape(event, path);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (program) {
|
|
156
|
+
const channel = this.schedules.find(row => row.items.includes(program.item));
|
|
157
|
+
if (channel) {
|
|
158
|
+
this.navigatePrograms(event, channel.id, program.item);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
|
162
|
+
const button = path.find(element => element.classList?.contains('tv-program__channel-info-button'));
|
|
163
|
+
if (button && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
|
|
164
|
+
event.preventDefault();
|
|
165
|
+
const channels = this.programLoading && this.channels.length > 0 ? this.channels : this.schedules;
|
|
166
|
+
const buttons = channels.map(channel => this.channelButtons.get(channel.id));
|
|
167
|
+
const index = buttons.indexOf(button) + (event.key === 'ArrowDown' ? 1 : -1);
|
|
168
|
+
buttons[index]?.focus();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/** Hides channel tooltips when the viewport changes. */
|
|
173
|
+
dismissChannelTooltipOnViewportChange() {
|
|
174
|
+
if (this.channelTooltipState) {
|
|
175
|
+
this.hideChannelTooltip();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/** Retains selected details and captures their previous height. */
|
|
179
|
+
retainSelectedItem(event) {
|
|
180
|
+
this.selectedItemId = event.detail;
|
|
181
|
+
const channel = this.schedules.find(schedule => schedule.items.some(item => item.id === event.detail));
|
|
182
|
+
const item = channel?.items.find(program => program.id === event.detail);
|
|
183
|
+
this.pendingDetailsResize = undefined;
|
|
184
|
+
if (channel && item) {
|
|
185
|
+
const accordion = this.detailsAccordions.get(channel.id);
|
|
186
|
+
const content = accordion?.querySelector('.tv-program__program-details-spacing');
|
|
187
|
+
if (accordion?.isOpen && content) {
|
|
188
|
+
this.pendingDetailsResize = { channelId: channel.id, height: content.getBoundingClientRect().height };
|
|
189
|
+
}
|
|
190
|
+
this.detailsResizeAnimation?.cancel();
|
|
191
|
+
this.programDetails.set(channel.id, item);
|
|
192
|
+
this.pendingDetailsScroll = item.id;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/** Tracks focused items to keep them mounted. */
|
|
196
|
+
updateFocusedItem() {
|
|
197
|
+
queueMicrotask(() => {
|
|
198
|
+
const active = this.element.shadowRoot?.activeElement;
|
|
199
|
+
this.focusedItemId = active?.item?.id;
|
|
200
|
+
if (!active && !this.pendingProgramFocus) {
|
|
201
|
+
this.focusedChannelId = undefined;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/** Clears selection and navigation when the date changes. */
|
|
206
|
+
resetRetainedItems() {
|
|
207
|
+
this.activePrograms.clear();
|
|
208
|
+
this.pendingProgramFocus = undefined;
|
|
209
|
+
this.navigationMinute = undefined;
|
|
210
|
+
this.itemPositions = new WeakMap();
|
|
211
|
+
this.resetChannelTooltip();
|
|
212
|
+
this.selectedItemId = undefined;
|
|
213
|
+
this.focusedItemId = undefined;
|
|
214
|
+
this.programDetails.clear();
|
|
215
|
+
}
|
|
216
|
+
/** Removes details for programs no longer in the schedule. */
|
|
217
|
+
resetProgramDetails() {
|
|
218
|
+
for (const [channelId, item] of this.programDetails) {
|
|
219
|
+
if (!this.schedules.find(channel => channel.id === channelId)?.items.includes(item)) {
|
|
220
|
+
this.programDetails.delete(channelId);
|
|
221
|
+
if (this.selectedItemId === item.id) {
|
|
222
|
+
this.selectedItemId = undefined;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/** Reloads translations when the language changes. */
|
|
228
|
+
async onLanguageChange(language) {
|
|
229
|
+
await processTranslations('tet-components', language);
|
|
230
|
+
forceUpdate(this);
|
|
231
|
+
}
|
|
232
|
+
/** Invalidates pending item readiness checks. */
|
|
233
|
+
invalidateProgramHydration() {
|
|
234
|
+
this.hydrationVersion++;
|
|
235
|
+
this.pendingPrograms = new WeakMap();
|
|
236
|
+
}
|
|
237
|
+
/** Reports whether the current-time marker is visible. */
|
|
238
|
+
updateCurrentTimeVisibility() {
|
|
239
|
+
const viewport = this.viewport;
|
|
240
|
+
const timeline = this.timeline;
|
|
241
|
+
const now = new Date(this.currentTime);
|
|
242
|
+
let visible = false;
|
|
243
|
+
if (viewport && timeline && viewport.clientWidth > 0 && timeline.clientWidth > 0 && this.date === formatLocalDate(now)) {
|
|
244
|
+
const width = this.headerViewport?.clientWidth || viewport.clientWidth;
|
|
245
|
+
const minute = this.getCurrentTimeMinute();
|
|
246
|
+
const position = timeline.offsetLeft + timeline.clientWidth * minute / MINUTES_PER_DAY - viewport.scrollLeft;
|
|
247
|
+
visible = position >= timeline.offsetLeft && position < width;
|
|
248
|
+
}
|
|
249
|
+
if (this.currentTimeVisible !== visible) {
|
|
250
|
+
this.currentTimeVisible = visible;
|
|
251
|
+
this.currentTimeVisibilityChanged.emit(visible);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/** Clears channel tooltip state and timers. */
|
|
255
|
+
resetChannelTooltip() {
|
|
256
|
+
this.channelTooltipLifecycle.reset();
|
|
257
|
+
this.pendingChannelTooltip = undefined;
|
|
258
|
+
this.channelTooltipState = undefined;
|
|
259
|
+
this.channelTooltipHovered = false;
|
|
260
|
+
this.channelTooltipFocused = false;
|
|
261
|
+
this.channelTooltipPinned = false;
|
|
262
|
+
}
|
|
263
|
+
/** Centers the shared horizontal viewport on the current local time. */
|
|
264
|
+
async scrollToNow(behavior = 'smooth') {
|
|
265
|
+
if (this.viewport && this.timeline) {
|
|
266
|
+
const left = this.getCurrentTimeScrollLeft();
|
|
267
|
+
const reducedMotion = globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
|
|
268
|
+
if (behavior === 'smooth' && !reducedMotion) {
|
|
269
|
+
this.viewport.scrollTo({ left, behavior });
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
this.viewport.scrollLeft = left;
|
|
273
|
+
}
|
|
274
|
+
this.updateNavigation();
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
/** Syncs details expansion and animates content height changes. */
|
|
278
|
+
async syncProgramDetails(channelId, accordion) {
|
|
279
|
+
await accordion.componentOnReady?.();
|
|
280
|
+
if (this.detailsAccordions.get(channelId) !== accordion || !accordion.isConnected) {
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
const open = this.programDetails.get(channelId)?.id === this.selectedItemId;
|
|
284
|
+
if (!open) {
|
|
285
|
+
accordion.querySelector('.tv-program__program-details-spacing')?.getAnimations?.().forEach(animation => animation.cancel());
|
|
286
|
+
}
|
|
287
|
+
if (accordion.isOpen !== open) {
|
|
288
|
+
await accordion.setState(open);
|
|
289
|
+
}
|
|
290
|
+
if (open && this.pendingDetailsResize?.channelId === channelId) {
|
|
291
|
+
const { height } = this.pendingDetailsResize;
|
|
292
|
+
this.pendingDetailsResize = undefined;
|
|
293
|
+
const content = accordion.querySelector('.tv-program__program-details-spacing');
|
|
294
|
+
const nextHeight = content?.getBoundingClientRect().height;
|
|
295
|
+
if (content && height !== nextHeight && !globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches) {
|
|
296
|
+
const duration = Number.parseFloat(getComputedStyle(accordion).getPropertyValue('--accordion-animation-duration')) * 1000;
|
|
297
|
+
this.detailsResizeAnimation = content.animate?.([
|
|
298
|
+
{ height: `${height}px`, overflow: 'hidden' },
|
|
299
|
+
{ height: `${nextHeight}px`, overflow: 'hidden' },
|
|
300
|
+
], { duration: duration || 0, easing: 'ease-in-out' });
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
if (open && this.selectedItemId && this.pendingDetailsScroll === this.selectedItemId) {
|
|
304
|
+
this.pendingDetailsScroll = undefined;
|
|
305
|
+
this.scheduleDetailsScroll(accordion, this.selectedItemId);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
/** Scrolls details into view after expansion. */
|
|
309
|
+
scheduleDetailsScroll(accordion, itemId) {
|
|
310
|
+
clearTimeout(this.detailsScrollTimer);
|
|
311
|
+
const duration = Number.parseFloat(getComputedStyle(accordion).getPropertyValue('--accordion-animation-duration')) || 0;
|
|
312
|
+
this.detailsScrollTimer = setTimeout(() => {
|
|
313
|
+
if (!accordion.isConnected || !accordion.isOpen || this.selectedItemId !== itemId) {
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
const style = getComputedStyle(accordion);
|
|
317
|
+
const marginTop = Number.parseFloat(style.scrollMarginTop) || 0;
|
|
318
|
+
const marginBottom = Number.parseFloat(style.scrollMarginBottom) || 0;
|
|
319
|
+
const height = accordion.getBoundingClientRect().height + marginTop + marginBottom;
|
|
320
|
+
const reducedMotion = globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
|
|
321
|
+
accordion.scrollIntoView?.({
|
|
322
|
+
block: height > globalThis.innerHeight ? 'start' : 'nearest',
|
|
323
|
+
inline: 'nearest',
|
|
324
|
+
behavior: reducedMotion ? 'instant' : 'smooth',
|
|
325
|
+
});
|
|
326
|
+
}, duration * 1000);
|
|
327
|
+
}
|
|
328
|
+
/** Tracks channel rows near the viewport to limit program item rendering. */
|
|
329
|
+
observeChannelVisibility() {
|
|
330
|
+
if (this.rowVisibilityObserver || typeof globalThis.IntersectionObserver !== 'function') {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
const options = { rootMargin: '500px 0px', scrollMargin: '500px 0px' };
|
|
334
|
+
this.rowVisibilityObserver = new IntersectionObserver(entries => {
|
|
335
|
+
const visible = new Set(this.visibleChannelIds);
|
|
336
|
+
let changed = false;
|
|
337
|
+
for (const entry of entries) {
|
|
338
|
+
const id = this.channelIdsByRow.get(entry.target);
|
|
339
|
+
if (id !== undefined && this.channelRows.get(id) === entry.target && visible.has(id) !== entry.isIntersecting) {
|
|
340
|
+
if (entry.isIntersecting) {
|
|
341
|
+
visible.add(id);
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
visible.delete(id);
|
|
345
|
+
}
|
|
346
|
+
changed = true;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
if (changed) {
|
|
350
|
+
this.visibleChannelIds = visible;
|
|
351
|
+
}
|
|
352
|
+
}, options);
|
|
353
|
+
for (const row of this.channelRows.values()) {
|
|
354
|
+
this.rowVisibilityObserver.observe(row);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
/** Registers channel rows for visibility tracking. */
|
|
358
|
+
setChannelRow(channelId, row) {
|
|
359
|
+
const previous = this.channelRows.get(channelId);
|
|
360
|
+
if (previous === row) {
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
if (previous) {
|
|
364
|
+
this.rowVisibilityObserver?.unobserve(previous);
|
|
365
|
+
}
|
|
366
|
+
if (row) {
|
|
367
|
+
this.channelRows.set(channelId, row);
|
|
368
|
+
this.channelIdsByRow.set(row, channelId);
|
|
369
|
+
this.rowVisibilityObserver?.observe(row);
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
this.channelRows.delete(channelId);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
/** Keeps visible, selected, and focused rows mounted. */
|
|
376
|
+
shouldRenderChannelItems(channelId, items) {
|
|
377
|
+
const hasRetainedItem = this.selectedItemId !== undefined || this.focusedItemId !== undefined;
|
|
378
|
+
return !this.rowVisibilityObserver || this.visibleChannelIds.has(channelId) || this.focusedChannelId === channelId
|
|
379
|
+
|| (hasRetainedItem && Boolean(items?.some(item => item.id === this.selectedItemId || item.id === this.focusedItemId)));
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Keeps row placeholders visible until the initial mounted items finish hydrating.
|
|
383
|
+
* Caches readiness per program array and date; later mounts do not reset row placeholders.
|
|
384
|
+
*/
|
|
385
|
+
waitForProgramItems() {
|
|
386
|
+
if (this.channelsLoading || this.programLoading || !this.visibleRange) {
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
const key = this.date;
|
|
390
|
+
const version = this.hydrationVersion;
|
|
391
|
+
const pending = [];
|
|
392
|
+
for (const { id, items } of this.schedules) {
|
|
393
|
+
if (!this.shouldRenderChannelItems(id, items)) {
|
|
394
|
+
continue;
|
|
395
|
+
}
|
|
396
|
+
const row = this.channelRows.get(id);
|
|
397
|
+
if (!row || this.readyPrograms.get(items) === key || this.pendingPrograms.get(items) === key) {
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
this.pendingPrograms.set(items, key);
|
|
401
|
+
const elements = Array.from(row.querySelectorAll('tet-tv-program-item'));
|
|
402
|
+
pending.push(Promise.all(elements.map(element => element.componentOnReady?.())).then(() => {
|
|
403
|
+
if (version === this.hydrationVersion) {
|
|
404
|
+
this.readyPrograms.set(items, key);
|
|
405
|
+
this.pendingPrograms.delete(items);
|
|
406
|
+
}
|
|
407
|
+
}));
|
|
408
|
+
}
|
|
409
|
+
if (pending.length > 0) {
|
|
410
|
+
Promise.all(pending).then(() => {
|
|
411
|
+
if (version === this.hydrationVersion && this.element.isConnected) {
|
|
412
|
+
forceUpdate(this);
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
/** Updates navigation when viewport dimensions change. */
|
|
418
|
+
observeViewport() {
|
|
419
|
+
if (this.viewport && typeof globalThis.ResizeObserver === 'function') {
|
|
420
|
+
this.resizeObserver = new ResizeObserver(() => this.updateNavigation());
|
|
421
|
+
this.resizeObserver.observe(this.viewport);
|
|
422
|
+
if (this.timeline) {
|
|
423
|
+
this.resizeObserver.observe(this.timeline);
|
|
424
|
+
}
|
|
425
|
+
if (this.headerViewport) {
|
|
426
|
+
this.resizeObserver.observe(this.headerViewport);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
else {
|
|
430
|
+
queueMicrotask(() => {
|
|
431
|
+
if (this.element.isConnected) {
|
|
432
|
+
this.updateNavigation();
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
/** Syncs scroll controls, header position, and viewport measurements. */
|
|
438
|
+
updateNavigation() {
|
|
439
|
+
const initialized = this.initializeVisibleRange();
|
|
440
|
+
const headerHeight = `${this.headerViewport?.offsetHeight ?? 0}px`;
|
|
441
|
+
if (this.element.style.getPropertyValue('--schedule-header-height') !== headerHeight) {
|
|
442
|
+
this.element.style.setProperty('--schedule-header-height', headerHeight);
|
|
443
|
+
}
|
|
444
|
+
this.updateCurrentTimeVisibility();
|
|
445
|
+
if (!initialized) {
|
|
446
|
+
this.scheduleVisibleRange();
|
|
447
|
+
}
|
|
448
|
+
const viewport = this.viewport;
|
|
449
|
+
const width = viewport?.clientWidth ?? 0;
|
|
450
|
+
const scrollLeft = viewport?.scrollLeft ?? 0;
|
|
451
|
+
const previous = scrollLeft > 1;
|
|
452
|
+
const next = Boolean(viewport && scrollLeft < viewport.scrollWidth - width - 1);
|
|
453
|
+
if (this.canScrollPrevious !== previous) {
|
|
454
|
+
this.canScrollPrevious = previous;
|
|
455
|
+
}
|
|
456
|
+
if (this.canScrollNext !== next) {
|
|
457
|
+
this.canScrollNext = next;
|
|
458
|
+
}
|
|
459
|
+
if (viewport && this.headerViewport && this.headerViewport.scrollLeft !== scrollLeft) {
|
|
460
|
+
this.headerViewport.scrollLeft = scrollLeft;
|
|
461
|
+
}
|
|
462
|
+
const cssWidth = `${width}px`;
|
|
463
|
+
if (viewport && viewport.style.getPropertyValue('--viewport-width') !== cssWidth) {
|
|
464
|
+
viewport.style.setProperty('--viewport-width', cssWidth);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
/** Sets the initial range, centering today's schedule on now. */
|
|
468
|
+
initializeVisibleRange() {
|
|
469
|
+
if (this.visibleRange || !this.viewport?.clientWidth || !this.timeline?.clientWidth) {
|
|
470
|
+
return false;
|
|
471
|
+
}
|
|
472
|
+
if (this.date === formatLocalDate(new Date(this.currentTime))) {
|
|
473
|
+
this.viewport.scrollLeft = this.getCurrentTimeScrollLeft();
|
|
474
|
+
}
|
|
475
|
+
this.updateVisibleRange();
|
|
476
|
+
return true;
|
|
477
|
+
}
|
|
478
|
+
/** Returns local minutes since midnight, including seconds. */
|
|
479
|
+
getCurrentTimeMinute() {
|
|
480
|
+
const now = new Date(this.currentTime);
|
|
481
|
+
return now.getHours() * MINUTES_PER_HOUR + now.getMinutes()
|
|
482
|
+
+ (now.getSeconds() * 1000 + now.getMilliseconds()) / MINUTE_MS;
|
|
483
|
+
}
|
|
484
|
+
/** Calculates the scroll offset that centers the current time. */
|
|
485
|
+
getCurrentTimeScrollLeft() {
|
|
486
|
+
const viewport = this.viewport;
|
|
487
|
+
const timeline = this.timeline;
|
|
488
|
+
if (!viewport || !timeline) {
|
|
489
|
+
return 0;
|
|
490
|
+
}
|
|
491
|
+
const fraction = this.getCurrentTimeMinute() / MINUTES_PER_DAY;
|
|
492
|
+
const width = this.headerViewport?.clientWidth || viewport.clientWidth;
|
|
493
|
+
return Math.max(0, timeline.offsetLeft + timeline.clientWidth * fraction - width / 2);
|
|
494
|
+
}
|
|
495
|
+
/** Batches visible range updates into one animation frame. */
|
|
496
|
+
scheduleVisibleRange() {
|
|
497
|
+
this.rangeFrame ??= requestAnimationFrame(() => {
|
|
498
|
+
this.rangeFrame = undefined;
|
|
499
|
+
this.updateVisibleRange();
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
/** Calculates visible hours with a one-hour rendering buffer. */
|
|
503
|
+
updateVisibleRange() {
|
|
504
|
+
if (!this.viewport || !this.timeline) {
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
const { scrollLeft, clientWidth } = this.viewport;
|
|
508
|
+
const dayWidth = this.timeline.clientWidth;
|
|
509
|
+
const gutter = this.timeline.offsetLeft;
|
|
510
|
+
if (!(clientWidth > 0 && dayWidth > 0)) {
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
const pixelsPerMinute = dayWidth / MINUTES_PER_DAY;
|
|
514
|
+
const start = Math.max(0, (Math.floor((scrollLeft - gutter) / pixelsPerMinute / MINUTES_PER_HOUR) - 1) * MINUTES_PER_HOUR);
|
|
515
|
+
const end = Math.min(MINUTES_PER_DAY, (Math.ceil((scrollLeft + clientWidth - gutter) / pixelsPerMinute / MINUTES_PER_HOUR) + 1) * MINUTES_PER_HOUR);
|
|
516
|
+
if (this.visibleRange?.start !== start || this.visibleRange?.end !== end) {
|
|
517
|
+
this.visibleRange = { start, end };
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
/** Prepares horizontal dragging. */
|
|
521
|
+
handlePointerDown(event) {
|
|
522
|
+
this.suppressClick = false;
|
|
523
|
+
const isNavigationButton = event.composedPath().some(target => target instanceof globalThis.Element && target.classList.contains('tv-program__timeline-button'));
|
|
524
|
+
if (event.pointerType === 'mouse' && event.button === 0 && this.viewport && !isNavigationButton) {
|
|
525
|
+
this.drag = {
|
|
526
|
+
pointerId: event.pointerId, startX: event.clientX, scrollLeft: this.viewport.scrollLeft,
|
|
527
|
+
surface: event.currentTarget, active: false,
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
/** Scrolls horizontally once the drag threshold is reached. */
|
|
532
|
+
handlePointerMove(event) {
|
|
533
|
+
const drag = this.drag;
|
|
534
|
+
if (!drag || !this.viewport || drag.pointerId !== event.pointerId) {
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
if ((event.buttons & 1) === 0) {
|
|
538
|
+
this.handlePointerEnd(event.pointerId);
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
const distance = event.clientX - drag.startX;
|
|
542
|
+
if (!drag.active && Math.abs(distance) < DRAG_THRESHOLD) {
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
if (!drag.active) {
|
|
546
|
+
drag.active = true;
|
|
547
|
+
this.suppressClick = true;
|
|
548
|
+
drag.surface.classList.add(DRAGGING_CLASS);
|
|
549
|
+
drag.surface.setPointerCapture(event.pointerId);
|
|
550
|
+
}
|
|
551
|
+
event.preventDefault();
|
|
552
|
+
this.viewport.scrollLeft = drag.scrollLeft - distance;
|
|
553
|
+
this.updateNavigation();
|
|
554
|
+
}
|
|
555
|
+
/** Clears dragging state and releases pointer capture. */
|
|
556
|
+
handlePointerEnd(pointerId) {
|
|
557
|
+
if (this.drag?.pointerId === pointerId) {
|
|
558
|
+
const { surface } = this.drag;
|
|
559
|
+
this.drag = undefined;
|
|
560
|
+
surface.classList.remove(DRAGGING_CLASS);
|
|
561
|
+
if (surface.hasPointerCapture(pointerId)) {
|
|
562
|
+
surface.releasePointerCapture(pointerId);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
/** Scrolls the schedule in the requested direction. */
|
|
567
|
+
scrollSchedule(direction) {
|
|
568
|
+
const reducedMotion = globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
|
|
569
|
+
this.viewport?.scrollBy({ left: direction * 320, behavior: reducedMotion ? 'auto' : 'smooth' });
|
|
570
|
+
}
|
|
571
|
+
/** Converts a program time to minutes relative to the selected day. */
|
|
572
|
+
getTimelineMinute(date, time) {
|
|
573
|
+
const [hours, minutes] = time.split(':').map(Number);
|
|
574
|
+
const days = (Date.parse(date) - Date.parse(this.date)) / (MINUTES_PER_DAY * MINUTE_MS);
|
|
575
|
+
return days * MINUTES_PER_DAY + hours * 60 + minutes;
|
|
576
|
+
}
|
|
577
|
+
/** Finds the program closest to the requested timeline minute. */
|
|
578
|
+
getNearestProgram(items, minute) {
|
|
579
|
+
let nearest;
|
|
580
|
+
let distance = Infinity;
|
|
581
|
+
for (const item of items) {
|
|
582
|
+
const start = this.getTimelineMinute(item.startDate, item.startTime);
|
|
583
|
+
const end = this.getTimelineMinute(item.endDate, item.endTime);
|
|
584
|
+
if (!Number.isFinite(start) || !Number.isFinite(end) || end <= start || end <= 0 || start >= MINUTES_PER_DAY) {
|
|
585
|
+
continue;
|
|
586
|
+
}
|
|
587
|
+
const gap = Math.max(start - minute, minute - end, 0);
|
|
588
|
+
if (gap < distance || (start <= minute && minute < end)) {
|
|
589
|
+
nearest = item;
|
|
590
|
+
distance = gap;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
return nearest;
|
|
594
|
+
}
|
|
595
|
+
/** Chooses the channel's keyboard tab stop. */
|
|
596
|
+
getActiveProgram(channelId, items) {
|
|
597
|
+
const remembered = items.find(item => item.id === this.activePrograms.get(channelId));
|
|
598
|
+
const now = new Date(this.currentTime);
|
|
599
|
+
const minute = this.date === formatLocalDate(now)
|
|
600
|
+
? now.getHours() * MINUTES_PER_HOUR + now.getMinutes()
|
|
601
|
+
: this.visibleRange?.start ?? 0;
|
|
602
|
+
return remembered ?? this.getNearestProgram(items, minute);
|
|
603
|
+
}
|
|
604
|
+
/** Moves keyboard focus between programs and channels. */
|
|
605
|
+
navigatePrograms(event, channelId, item) {
|
|
606
|
+
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
609
|
+
const channelIndex = this.schedules.findIndex(channel => channel.id === channelId);
|
|
610
|
+
const channel = this.schedules[channelIndex];
|
|
611
|
+
if (!channel) {
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
const index = channel.items.indexOf(item);
|
|
615
|
+
let targetChannel = channel;
|
|
616
|
+
let target;
|
|
617
|
+
switch (event.key) {
|
|
618
|
+
case 'ArrowLeft':
|
|
619
|
+
target = channel.items[index - 1];
|
|
620
|
+
if (!target) {
|
|
621
|
+
this.channelButtons.get(channelId)?.focus();
|
|
622
|
+
}
|
|
623
|
+
break;
|
|
624
|
+
case 'ArrowRight':
|
|
625
|
+
target = channel.items[index + 1];
|
|
626
|
+
break;
|
|
627
|
+
case 'Home':
|
|
628
|
+
target = channel.items[0];
|
|
629
|
+
break;
|
|
630
|
+
case 'End':
|
|
631
|
+
target = channel.items.at(-1);
|
|
632
|
+
break;
|
|
633
|
+
case 'ArrowUp':
|
|
634
|
+
case 'ArrowDown': {
|
|
635
|
+
const channels = this.schedules.filter(row => row.items.length > 0);
|
|
636
|
+
const index = channels.findIndex(row => row.id === channelId);
|
|
637
|
+
targetChannel = channels[index + (event.key === 'ArrowDown' ? 1 : -1)];
|
|
638
|
+
this.navigationMinute ??= Math.max(0, this.getTimelineMinute(item.startDate, item.startTime));
|
|
639
|
+
target = targetChannel && this.getNearestProgram(targetChannel.items, this.navigationMinute);
|
|
640
|
+
break;
|
|
641
|
+
}
|
|
642
|
+
default:
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
event.preventDefault();
|
|
646
|
+
if (target && targetChannel) {
|
|
647
|
+
if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') {
|
|
648
|
+
this.navigationMinute = undefined;
|
|
649
|
+
}
|
|
650
|
+
this.activePrograms.set(targetChannel.id, target.id);
|
|
651
|
+
this.pendingProgramFocus = { channelId: targetChannel.id, itemId: target.id };
|
|
652
|
+
this.focusedChannelId = targetChannel.id;
|
|
653
|
+
this.focusedItemId = target.id;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
/** Focuses the requested program once it is ready. */
|
|
657
|
+
async focusPendingProgram() {
|
|
658
|
+
const pending = this.pendingProgramFocus;
|
|
659
|
+
if (!pending) {
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
const items = this.channelRows.get(pending.channelId)?.querySelectorAll('tet-tv-program-item');
|
|
663
|
+
const item = Array.from(items ?? []).find(element => element.item.id === pending.itemId);
|
|
664
|
+
if (item) {
|
|
665
|
+
this.pendingProgramFocus = undefined;
|
|
666
|
+
await item.componentOnReady?.();
|
|
667
|
+
if (this.focusedItemId === pending.itemId && item.isConnected) {
|
|
668
|
+
item.shadowRoot?.querySelector('button')?.focus({ preventScroll: true });
|
|
669
|
+
item.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
/** Opens or switches the channel tooltip. */
|
|
674
|
+
showChannelTooltip(channel, interaction) {
|
|
675
|
+
const anchor = this.channelAnchors.get(channel.id);
|
|
676
|
+
if (!anchor) {
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
if (interaction === 'click' && this.channelTooltipState?.channel.id === channel.id && this.channelTooltipPinned) {
|
|
680
|
+
this.hideChannelTooltip();
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
const sameChannel = this.channelTooltipState?.channel.id === channel.id;
|
|
684
|
+
if (this.channelTooltipState && !sameChannel) {
|
|
685
|
+
this.pendingChannelTooltip = { channel, interaction };
|
|
686
|
+
this.channelTooltipHovered = false;
|
|
687
|
+
this.channelTooltipFocused = false;
|
|
688
|
+
this.channelTooltipPinned = false;
|
|
689
|
+
this.channelTooltipLifecycle.dismiss();
|
|
690
|
+
return;
|
|
691
|
+
}
|
|
692
|
+
this.pendingChannelTooltip = undefined;
|
|
693
|
+
if (!sameChannel) {
|
|
694
|
+
this.channelTooltipLifecycle.reset();
|
|
695
|
+
this.channelTooltipHovered = false;
|
|
696
|
+
this.channelTooltipFocused = false;
|
|
697
|
+
this.channelTooltipPinned = false;
|
|
698
|
+
this.channelTooltipState = { channel, anchor };
|
|
699
|
+
}
|
|
700
|
+
this.channelTooltipLifecycle.request(interaction === 'click');
|
|
701
|
+
this.channelTooltipHovered ||= interaction === 'hover';
|
|
702
|
+
this.channelTooltipFocused ||= interaction === 'focus';
|
|
703
|
+
this.channelTooltipPinned ||= interaction === 'click';
|
|
704
|
+
}
|
|
705
|
+
/** Hides the channel tooltip when no interaction keeps it open. */
|
|
706
|
+
leaveChannelTooltip(channelId, focused = false) {
|
|
707
|
+
if (this.pendingChannelTooltip?.channel.id === channelId) {
|
|
708
|
+
const interaction = this.pendingChannelTooltip.interaction;
|
|
709
|
+
if (focused ? interaction !== 'hover' : interaction === 'hover') {
|
|
710
|
+
this.pendingChannelTooltip = undefined;
|
|
711
|
+
}
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
if (this.channelTooltipState?.channel.id !== channelId) {
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
if (focused) {
|
|
718
|
+
this.channelTooltipFocused = false;
|
|
719
|
+
this.channelTooltipPinned = false;
|
|
720
|
+
}
|
|
721
|
+
else {
|
|
722
|
+
this.channelTooltipHovered = false;
|
|
723
|
+
}
|
|
724
|
+
if (!this.channelTooltipHovered && !this.channelTooltipFocused && !this.channelTooltipPinned) {
|
|
725
|
+
this.channelTooltipLifecycle.dismiss();
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
/** Starts channel tooltip dismissal. */
|
|
729
|
+
hideChannelTooltip() {
|
|
730
|
+
this.pendingChannelTooltip = undefined;
|
|
731
|
+
this.channelTooltipHovered = false;
|
|
732
|
+
this.channelTooltipFocused = false;
|
|
733
|
+
this.channelTooltipPinned = false;
|
|
734
|
+
this.channelTooltipLifecycle.dismiss(true);
|
|
735
|
+
}
|
|
736
|
+
/** Clears the dismissed tooltip and opens any queued tooltip. */
|
|
737
|
+
finishChannelTooltip() {
|
|
738
|
+
const pending = this.pendingChannelTooltip;
|
|
739
|
+
this.resetChannelTooltip();
|
|
740
|
+
if (pending) {
|
|
741
|
+
this.showChannelTooltip(pending.channel, pending.interaction);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
/** Closes details unless Escape is already handled or a channel tooltip is open. */
|
|
745
|
+
closeProgramDetailsOnEscape(event, path) {
|
|
746
|
+
if (event.defaultPrevented || this.channelTooltipState) {
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
const details = Array.from(this.detailsAccordions).find(([channelId, accordion]) => accordion.isOpen && this.programDetails.get(channelId)?.id === this.selectedItemId);
|
|
750
|
+
if (details) {
|
|
751
|
+
event.preventDefault();
|
|
752
|
+
event.stopPropagation();
|
|
753
|
+
this.closeProgramDetails(details[0], path.includes(details[1]));
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
/** Closes selected details and optionally restores program focus. */
|
|
757
|
+
async closeProgramDetails(channelId, restoreFocus = true) {
|
|
758
|
+
const itemId = this.programDetails.get(channelId)?.id;
|
|
759
|
+
if (!itemId || itemId !== this.selectedItemId) {
|
|
760
|
+
return;
|
|
761
|
+
}
|
|
762
|
+
const items = this.channelRows.get(channelId)?.querySelectorAll('tet-tv-program-item') ?? [];
|
|
763
|
+
const item = Array.from(items).find(element => element.item.id === itemId);
|
|
764
|
+
this.selectedItemId = undefined;
|
|
765
|
+
await item?.close();
|
|
766
|
+
if (restoreFocus) {
|
|
767
|
+
item?.shadowRoot?.querySelector('button')?.focus({ preventScroll: true });
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
renderNavigationButton(direction) {
|
|
771
|
+
const previous = direction === 'previous';
|
|
772
|
+
const disabled = previous ? !this.canScrollPrevious : !this.canScrollNext;
|
|
773
|
+
return (h("div", { class: `tv-program__timeline-button-container tv-program__timeline-button-container--${direction}` }, h("button", { type: "button", class: "tv-program__timeline-button", disabled: disabled, "aria-label": t(previous ? 'components-tv-program-scroll-backward' : 'components-tv-program-scroll-forward'), onClick: () => this.scrollSchedule(previous ? -1 : 1) }, h("tet-icon", { class: "tv-program__timeline-button-icon", name: previous ? 'tc-chevron-left' : 'tc-chevron-right', theme: this.theme, type: disabled ? 'tertiary' : 'primary' }))));
|
|
774
|
+
}
|
|
775
|
+
renderItem(item, channelId, activeItemId, loading = false) {
|
|
776
|
+
let position = this.itemPositions.get(item);
|
|
777
|
+
if (!position) {
|
|
778
|
+
position = {
|
|
779
|
+
start: Math.max(0, this.getTimelineMinute(item.startDate, item.startTime)),
|
|
780
|
+
end: Math.min(MINUTES_PER_DAY, this.getTimelineMinute(item.endDate, item.endTime)),
|
|
781
|
+
};
|
|
782
|
+
this.itemPositions.set(item, position);
|
|
783
|
+
}
|
|
784
|
+
const { start, end } = position;
|
|
785
|
+
if (!Number.isFinite(start) || !Number.isFinite(end) || end <= start) {
|
|
786
|
+
return null;
|
|
787
|
+
}
|
|
788
|
+
const retained = item.id === this.selectedItemId || item.id === this.focusedItemId || item.id === activeItemId;
|
|
789
|
+
// Stable shells prevent Stencil from moving retained custom elements when the time window advances.
|
|
790
|
+
const renderContent = retained || Boolean(this.visibleRange && end > this.visibleRange.start && start < this.visibleRange.end);
|
|
791
|
+
const timing = this.broadcastTiming[item.id];
|
|
792
|
+
return (h("li", { key: item.id, "aria-hidden": renderContent ? undefined : 'true', style: {
|
|
793
|
+
display: renderContent ? undefined : 'none',
|
|
794
|
+
left: `${start / MINUTES_PER_DAY * 100}%`,
|
|
795
|
+
width: `${(end - start) / MINUTES_PER_DAY * 100}%`,
|
|
796
|
+
visibility: loading ? 'hidden' : undefined,
|
|
797
|
+
} }, renderContent && h("tet-tv-program-item", { item: item, unavailableTitle: this.unavailableTitle, clippedStart: item.startDate < this.date, clippedEnd: this.getTimelineMinute(item.endDate, item.endTime) > MINUTES_PER_DAY, theme: this.theme, layout: "desktop", buttonTabIndex: item.id === activeItemId ? 0 : -1, onFocusin: event => {
|
|
798
|
+
this.activePrograms.set(channelId, item.id);
|
|
799
|
+
this.focusedItemId = item.id;
|
|
800
|
+
this.focusedChannelId = channelId;
|
|
801
|
+
const element = event.currentTarget;
|
|
802
|
+
if (element.shadowRoot?.querySelector('button')?.matches(':focus-visible')) {
|
|
803
|
+
element.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });
|
|
804
|
+
}
|
|
805
|
+
}, isActive: timing?.isActive ?? false, progress: timing?.progress ?? 0 })));
|
|
806
|
+
}
|
|
807
|
+
renderCurrentTime(header = false) {
|
|
808
|
+
const now = new Date(this.currentTime);
|
|
809
|
+
if (this.date !== formatLocalDate(now)) {
|
|
810
|
+
return null;
|
|
811
|
+
}
|
|
812
|
+
const minute = this.getCurrentTimeMinute();
|
|
813
|
+
return (h("div", { class: { 'tv-program__current-time': true, 'tv-program__current-time--header': header }, "aria-hidden": "true", style: { '--current-time-position': `${minute / MINUTES_PER_DAY}` } }));
|
|
814
|
+
}
|
|
815
|
+
renderChannelButton(channel) {
|
|
816
|
+
return (h("h2", { class: "tv-program__channel-logo" }, h("button", { type: "button", class: "tv-program__channel-info-button", ref: element => {
|
|
817
|
+
if (element) {
|
|
818
|
+
this.channelButtons.set(channel.id, element);
|
|
819
|
+
}
|
|
820
|
+
else {
|
|
821
|
+
this.channelButtons.delete(channel.id);
|
|
822
|
+
}
|
|
823
|
+
}, "aria-label": channel.name, "aria-describedby": `channel-description-${channel.id}`, onMouseEnter: () => this.showChannelTooltip(channel, 'hover'), onMouseLeave: () => this.leaveChannelTooltip(channel.id), onFocus: event => {
|
|
824
|
+
this.focusedChannelId = channel.id;
|
|
825
|
+
this.navigationMinute = undefined;
|
|
826
|
+
if (event.currentTarget.matches(':focus-visible')) {
|
|
827
|
+
event.currentTarget.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });
|
|
828
|
+
this.showChannelTooltip(channel, 'focus');
|
|
829
|
+
}
|
|
830
|
+
}, onBlur: () => this.leaveChannelTooltip(channel.id, true), onClick: () => this.showChannelTooltip(channel, 'click') }, h("span", { class: "tv-program__channel-tooltip-anchor", "aria-hidden": "true", ref: element => {
|
|
831
|
+
if (element) {
|
|
832
|
+
this.channelAnchors.set(channel.id, element);
|
|
833
|
+
}
|
|
834
|
+
else {
|
|
835
|
+
this.channelAnchors.delete(channel.id);
|
|
836
|
+
}
|
|
837
|
+
} }), this.renderChannelLogo(channel)), h("span", { id: `channel-description-${channel.id}`, hidden: true }, channel.channelNumber, channel.description && `, ${channel.description}`, channel.languages.length > 0 && `, ${t('components-tv-program-channel-languages')}: ${channel.languages.join(', ').toUpperCase()}`)));
|
|
838
|
+
}
|
|
839
|
+
renderChannelTooltip() {
|
|
840
|
+
if (!this.channelTooltipState) {
|
|
841
|
+
return null;
|
|
842
|
+
}
|
|
843
|
+
const { channel, anchor } = this.channelTooltipState;
|
|
844
|
+
return (h("tet-tooltip", { key: channel.id, class: "tv-program__channel-tooltip", hoverElement: anchor, doNotShowOnHover: true, position: TooltipPosition.RIGHT, "aria-hidden": "true", ref: element => { this.channelTooltip = element; }, onMouseEnter: () => this.showChannelTooltip(channel, 'hover'), onMouseLeave: () => this.leaveChannelTooltip(channel.id) }, h("span", { class: "tv-program__channel-tooltip-content" }, h("span", { class: "tv-program__channel-tooltip-header" }, h("span", null, channel.name), h("span", null, channel.channelNumber)), channel.description && h("span", null, channel.description), channel.languages.length > 0 && (h("span", null, h("span", { class: "tv-program__channel-tooltip-language" }, t('components-tv-program-channel-languages'), ": "), channel.languages.join(', ').toUpperCase())))));
|
|
845
|
+
}
|
|
846
|
+
renderChannels() {
|
|
847
|
+
const channels = this.programLoading && this.channels.length > 0 ? this.channels : this.schedules;
|
|
848
|
+
const itemsByChannel = new Map(this.schedules.map(channel => [channel.id, channel.items]));
|
|
849
|
+
return channels.map(channel => {
|
|
850
|
+
const items = itemsByChannel.get(channel.id);
|
|
851
|
+
const activeItemId = this.getActiveProgram(channel.id, items ?? [])?.id;
|
|
852
|
+
const renderItems = Boolean(this.visibleRange) && this.shouldRenderChannelItems(channel.id, items);
|
|
853
|
+
const loading = renderItems && (this.programLoading || Boolean(items?.length && this.readyPrograms.get(items) !== this.date));
|
|
854
|
+
return (h("section", { class: "tv-program__channel-row", key: channel.id, "aria-label": channel.name }, this.renderChannelButton(channel), h("ul", { class: "tv-program__channel", "aria-busy": loading ? 'true' : 'false', ref: element => this.setChannelRow(channel.id, element) }, renderItems && !this.programLoading && items?.map(item => this.renderItem(item, channel.id, activeItemId, loading)), loading && this.renderPlaceholders(channel.id)), this.renderProgramDetails(channel.id)));
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
renderProgramDetails(channelId) {
|
|
858
|
+
const item = this.programDetails.get(channelId);
|
|
859
|
+
if (!item || this.programLoading) {
|
|
860
|
+
return null;
|
|
861
|
+
}
|
|
862
|
+
const title = item.isUnavailable ? this.unavailableTitle : item.title;
|
|
863
|
+
return (h("tet-accordion", { class: "tv-program__program-details", theme: this.theme, isHeaderInteractive: false, transparentBackground: true, ref: element => {
|
|
864
|
+
if (element) {
|
|
865
|
+
this.detailsAccordions.set(channelId, element);
|
|
866
|
+
}
|
|
867
|
+
else {
|
|
868
|
+
this.detailsAccordions.delete(channelId);
|
|
869
|
+
}
|
|
870
|
+
} }, h("div", { class: "tv-program__program-details-spacing" }, h("section", { class: "tv-program__program-details-content", "aria-label": title }, item.image && (h("div", { class: "tv-program__program-details-content-left" }, h("img", { class: "tv-program__program-details-image", src: item.image, alt: "", loading: "lazy", draggable: false }))), h("div", { class: "tv-program__program-details-content-right" }, h("div", { class: "tv-program__program-details-content-header" }, h("h3", { class: "tv-program__program-details-title" }, title), h("button", { class: "tv-program__program-details-close", type: "button", "aria-label": t('components-tv-program-close'), onClick: () => { this.closeProgramDetails(channelId); } }, h("tet-icon", { class: "tv-program__program-details-close-icon", name: "tc-close", theme: this.theme }))), h("div", { class: "tv-program__program-details-content-meta" }, h("span", null, item.startTime, " - ", item.endTime), h("span", null, formatProgramStartDate(item.startDate)), h("span", null, item.channelName)), item.description && h("p", { class: "tv-program__program-details-content-description" }, item.description))))));
|
|
871
|
+
}
|
|
872
|
+
renderChannelLogo(channel) {
|
|
873
|
+
const imageSource = this.theme === 'dark' ? channel.imageSourceDark ?? channel.imageSource : channel.imageSource;
|
|
874
|
+
return imageSource && !this.failedChannelLogoSources.has(imageSource) ? (h("img", { key: imageSource, class: "tv-program__channel-image", src: imageSource, alt: "", loading: "lazy", draggable: false, onError: () => {
|
|
875
|
+
this.failedChannelLogoSources = new Set([...this.failedChannelLogoSources, imageSource]);
|
|
876
|
+
} })) : (h("span", { class: "tv-program__channel-name", "aria-hidden": "true" }, channel.name));
|
|
877
|
+
}
|
|
878
|
+
renderLoadingChannels(prefix = 'initial') {
|
|
879
|
+
return Array.from({ length: 20 }, (_, index) => (h("section", { class: "tv-program__channel-row", key: `${prefix}-channel-placeholder-${index}`, "aria-hidden": "true" }, h("div", { class: "tv-program__channel-logo tv-program__channel-logo--placeholder" }, h("tet-placeholder", { class: "tv-program__channel-logo-placeholder", height: "var(--channel-row-height)", darkTheme: this.theme === 'dark' })), h("ul", { class: "tv-program__channel" }, this.renderPlaceholders(`channel-placeholder-${index}`)))));
|
|
880
|
+
}
|
|
881
|
+
renderPlaceholders(channelId) {
|
|
882
|
+
let count = this.placeholderCounts.get(channelId);
|
|
883
|
+
if (count === undefined) {
|
|
884
|
+
count = 2 + Math.floor(Math.random() * 3);
|
|
885
|
+
this.placeholderCounts.set(channelId, count);
|
|
886
|
+
}
|
|
887
|
+
return renderProgramPlaceholders(this.theme, 'desktop', count);
|
|
888
|
+
}
|
|
889
|
+
render() {
|
|
890
|
+
return (h("div", { key: 'b9ace66a9a91b2537ee9fbdc5def52f016cf7a8e', class: {
|
|
891
|
+
'tv-program__schedule-container': true,
|
|
892
|
+
'tv-program__schedule-container--scrollable-left': this.canScrollPrevious,
|
|
893
|
+
'tv-program__schedule-container--scrollable-right': this.canScrollNext,
|
|
894
|
+
}, onPointerDown: event => this.handlePointerDown(event), onPointerMove: event => this.handlePointerMove(event), onPointerUp: event => this.handlePointerEnd(event.pointerId), onPointerCancel: event => this.handlePointerEnd(event.pointerId), onLostPointerCapture: event => this.handlePointerEnd(event.pointerId), onDragStart: event => event.preventDefault() }, this.renderChannelTooltip(), h("span", { key: '9213355e58757dbb581cf46b245bea0b8fdf6ed6', class: "tv-program__schedule-fader-left", "aria-hidden": "true" }), h("div", { key: '071cf8353309df9c15a47c6be6b0cf855f0a7cad', class: "tv-program__schedule-header" }, this.renderNavigationButton('previous'), this.renderNavigationButton('next'), h("div", { key: '873d860398ecbc42efc4b9bb50617c3f14879131', class: "tv-program__header-viewport", ref: element => { this.headerViewport = element; } }, h("div", { key: '91069ebd701b08d3bc58b886694305911e86e454', class: "tv-program__schedule" }, h("div", { key: 'abdd7d83467847796a7731fdebdf72d3c07a9008', class: "tv-program__timeline", "aria-hidden": "true", ref: element => { this.timeline = element; } }, LABELS.map(({ minute, isHour, label, left }) => (h("span", { key: minute, class: { 'tv-program__timeline-label': true, 'tv-program__timeline-label--hour': isHour }, style: { left } }, label)))), this.renderCurrentTime(true)))), h("div", { key: '3f22a7e8f3d9ebf837284b98d4a7e1dc6244b091', class: "tv-program__schedule-viewport", "aria-busy": this.channelsLoading || this.programLoading || this.loadingMoreChannels ? 'true' : 'false', ref: element => { this.viewport = element; }, onScroll: () => this.updateNavigation() }, h("div", { key: '792d5b3e5145bd76a2ae0e10513482fc136c3714', class: "tv-program__schedule" }, this.channelsLoading ? (this.renderLoadingChannels()) : this.renderChannels(), this.loadingMoreChannels && this.renderLoadingChannels('next-page'), this.renderCurrentTime())), h("span", { key: '99bc0df7a3879565ea2e03930d96fc51d10d55e8', class: "tv-program__schedule-edge-mask", "aria-hidden": "true" })));
|
|
895
|
+
}
|
|
896
|
+
static get is() { return "tet-tv-program-schedule"; }
|
|
897
|
+
static get encapsulation() { return "shadow"; }
|
|
898
|
+
static get originalStyleUrls() {
|
|
899
|
+
return {
|
|
900
|
+
"$": ["tet-tv-program-schedule.scss"]
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
static get styleUrls() {
|
|
904
|
+
return {
|
|
905
|
+
"$": ["tet-tv-program-schedule.css"]
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
static get properties() {
|
|
909
|
+
return {
|
|
910
|
+
"theme": {
|
|
911
|
+
"type": "string",
|
|
912
|
+
"mutable": false,
|
|
913
|
+
"complexType": {
|
|
914
|
+
"original": "'light' | 'dark'",
|
|
915
|
+
"resolved": "\"dark\" | \"light\"",
|
|
916
|
+
"references": {}
|
|
917
|
+
},
|
|
918
|
+
"required": false,
|
|
919
|
+
"optional": false,
|
|
920
|
+
"docs": {
|
|
921
|
+
"tags": [],
|
|
922
|
+
"text": "Theme of the schedule and its broadcast cards."
|
|
923
|
+
},
|
|
924
|
+
"getter": false,
|
|
925
|
+
"setter": false,
|
|
926
|
+
"reflect": true,
|
|
927
|
+
"attribute": "theme",
|
|
928
|
+
"defaultValue": "'light'"
|
|
929
|
+
},
|
|
930
|
+
"language": {
|
|
931
|
+
"type": "string",
|
|
932
|
+
"mutable": false,
|
|
933
|
+
"complexType": {
|
|
934
|
+
"original": "Language",
|
|
935
|
+
"resolved": "\"en\" | \"lv\" | \"ru\"",
|
|
936
|
+
"references": {
|
|
937
|
+
"Language": {
|
|
938
|
+
"location": "import",
|
|
939
|
+
"path": "@services/translations",
|
|
940
|
+
"id": "src/services/translations/index.ts::Language",
|
|
941
|
+
"referenceLocation": "Language"
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
"required": false,
|
|
946
|
+
"optional": false,
|
|
947
|
+
"docs": {
|
|
948
|
+
"tags": [],
|
|
949
|
+
"text": "Language used for navigation labels."
|
|
950
|
+
},
|
|
951
|
+
"getter": false,
|
|
952
|
+
"setter": false,
|
|
953
|
+
"reflect": false,
|
|
954
|
+
"attribute": "language",
|
|
955
|
+
"defaultValue": "'lv'"
|
|
956
|
+
},
|
|
957
|
+
"unavailableTitle": {
|
|
958
|
+
"type": "string",
|
|
959
|
+
"mutable": false,
|
|
960
|
+
"complexType": {
|
|
961
|
+
"original": "string",
|
|
962
|
+
"resolved": "string",
|
|
963
|
+
"references": {}
|
|
964
|
+
},
|
|
965
|
+
"required": false,
|
|
966
|
+
"optional": false,
|
|
967
|
+
"docs": {
|
|
968
|
+
"tags": [],
|
|
969
|
+
"text": "Translated title displayed for unavailable broadcasts and their details."
|
|
970
|
+
},
|
|
971
|
+
"getter": false,
|
|
972
|
+
"setter": false,
|
|
973
|
+
"reflect": false,
|
|
974
|
+
"attribute": "unavailable-title",
|
|
975
|
+
"defaultValue": "''"
|
|
976
|
+
},
|
|
977
|
+
"schedules": {
|
|
978
|
+
"type": "unknown",
|
|
979
|
+
"mutable": false,
|
|
980
|
+
"complexType": {
|
|
981
|
+
"original": "TvProgramScheduleChannel[]",
|
|
982
|
+
"resolved": "TvProgramScheduleChannel[]",
|
|
983
|
+
"references": {
|
|
984
|
+
"TvProgramScheduleChannel": {
|
|
985
|
+
"location": "import",
|
|
986
|
+
"path": "../../tet-tv-program.types",
|
|
987
|
+
"id": "src/components/views/tet-tv-program/tet-tv-program.types.ts::TvProgramScheduleChannel",
|
|
988
|
+
"referenceLocation": "TvProgramScheduleChannel"
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
"required": false,
|
|
993
|
+
"optional": false,
|
|
994
|
+
"docs": {
|
|
995
|
+
"tags": [],
|
|
996
|
+
"text": "Loaded channel schedules. Channels with no loaded schedule should be omitted."
|
|
997
|
+
},
|
|
998
|
+
"getter": false,
|
|
999
|
+
"setter": false,
|
|
1000
|
+
"defaultValue": "[]"
|
|
1001
|
+
},
|
|
1002
|
+
"channels": {
|
|
1003
|
+
"type": "unknown",
|
|
1004
|
+
"mutable": false,
|
|
1005
|
+
"complexType": {
|
|
1006
|
+
"original": "TvProgramChannel[]",
|
|
1007
|
+
"resolved": "TvProgramChannel[]",
|
|
1008
|
+
"references": {
|
|
1009
|
+
"TvProgramChannel": {
|
|
1010
|
+
"location": "import",
|
|
1011
|
+
"path": "../../tet-tv-program.types",
|
|
1012
|
+
"id": "src/components/views/tet-tv-program/tet-tv-program.types.ts::TvProgramChannel",
|
|
1013
|
+
"referenceLocation": "TvProgramChannel"
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
"required": false,
|
|
1018
|
+
"optional": false,
|
|
1019
|
+
"docs": {
|
|
1020
|
+
"tags": [],
|
|
1021
|
+
"text": "Available channel metadata, retained while programs reload."
|
|
1022
|
+
},
|
|
1023
|
+
"getter": false,
|
|
1024
|
+
"setter": false,
|
|
1025
|
+
"defaultValue": "[]"
|
|
1026
|
+
},
|
|
1027
|
+
"date": {
|
|
1028
|
+
"type": "string",
|
|
1029
|
+
"mutable": false,
|
|
1030
|
+
"complexType": {
|
|
1031
|
+
"original": "string",
|
|
1032
|
+
"resolved": "string",
|
|
1033
|
+
"references": {}
|
|
1034
|
+
},
|
|
1035
|
+
"required": false,
|
|
1036
|
+
"optional": false,
|
|
1037
|
+
"docs": {
|
|
1038
|
+
"tags": [],
|
|
1039
|
+
"text": "Selected local calendar date in YYYY-MM-DD format."
|
|
1040
|
+
},
|
|
1041
|
+
"getter": false,
|
|
1042
|
+
"setter": false,
|
|
1043
|
+
"reflect": false,
|
|
1044
|
+
"attribute": "date",
|
|
1045
|
+
"defaultValue": "formatLocalDate()"
|
|
1046
|
+
},
|
|
1047
|
+
"channelsLoading": {
|
|
1048
|
+
"type": "boolean",
|
|
1049
|
+
"mutable": false,
|
|
1050
|
+
"complexType": {
|
|
1051
|
+
"original": "boolean",
|
|
1052
|
+
"resolved": "boolean",
|
|
1053
|
+
"references": {}
|
|
1054
|
+
},
|
|
1055
|
+
"required": false,
|
|
1056
|
+
"optional": false,
|
|
1057
|
+
"docs": {
|
|
1058
|
+
"tags": [],
|
|
1059
|
+
"text": "Whether channel metadata is loading."
|
|
1060
|
+
},
|
|
1061
|
+
"getter": false,
|
|
1062
|
+
"setter": false,
|
|
1063
|
+
"reflect": false,
|
|
1064
|
+
"attribute": "channels-loading",
|
|
1065
|
+
"defaultValue": "false"
|
|
1066
|
+
},
|
|
1067
|
+
"programLoading": {
|
|
1068
|
+
"type": "boolean",
|
|
1069
|
+
"mutable": false,
|
|
1070
|
+
"complexType": {
|
|
1071
|
+
"original": "boolean",
|
|
1072
|
+
"resolved": "boolean",
|
|
1073
|
+
"references": {}
|
|
1074
|
+
},
|
|
1075
|
+
"required": false,
|
|
1076
|
+
"optional": false,
|
|
1077
|
+
"docs": {
|
|
1078
|
+
"tags": [],
|
|
1079
|
+
"text": "Whether broadcast programs are loading."
|
|
1080
|
+
},
|
|
1081
|
+
"getter": false,
|
|
1082
|
+
"setter": false,
|
|
1083
|
+
"reflect": false,
|
|
1084
|
+
"attribute": "program-loading",
|
|
1085
|
+
"defaultValue": "false"
|
|
1086
|
+
},
|
|
1087
|
+
"loadingMoreChannels": {
|
|
1088
|
+
"type": "boolean",
|
|
1089
|
+
"mutable": false,
|
|
1090
|
+
"complexType": {
|
|
1091
|
+
"original": "boolean",
|
|
1092
|
+
"resolved": "boolean",
|
|
1093
|
+
"references": {}
|
|
1094
|
+
},
|
|
1095
|
+
"required": false,
|
|
1096
|
+
"optional": false,
|
|
1097
|
+
"docs": {
|
|
1098
|
+
"tags": [],
|
|
1099
|
+
"text": "Whether the next page of channel schedules is loading."
|
|
1100
|
+
},
|
|
1101
|
+
"getter": false,
|
|
1102
|
+
"setter": false,
|
|
1103
|
+
"reflect": false,
|
|
1104
|
+
"attribute": "loading-more-channels",
|
|
1105
|
+
"defaultValue": "false"
|
|
1106
|
+
},
|
|
1107
|
+
"currentTime": {
|
|
1108
|
+
"type": "number",
|
|
1109
|
+
"mutable": false,
|
|
1110
|
+
"complexType": {
|
|
1111
|
+
"original": "number",
|
|
1112
|
+
"resolved": "number",
|
|
1113
|
+
"references": {}
|
|
1114
|
+
},
|
|
1115
|
+
"required": false,
|
|
1116
|
+
"optional": false,
|
|
1117
|
+
"docs": {
|
|
1118
|
+
"tags": [],
|
|
1119
|
+
"text": "Current timestamp supplied by the parent clock."
|
|
1120
|
+
},
|
|
1121
|
+
"getter": false,
|
|
1122
|
+
"setter": false,
|
|
1123
|
+
"reflect": false,
|
|
1124
|
+
"attribute": "current-time",
|
|
1125
|
+
"defaultValue": "Date.now()"
|
|
1126
|
+
},
|
|
1127
|
+
"broadcastTiming": {
|
|
1128
|
+
"type": "unknown",
|
|
1129
|
+
"mutable": false,
|
|
1130
|
+
"complexType": {
|
|
1131
|
+
"original": "Record<string, BroadcastTiming>",
|
|
1132
|
+
"resolved": "BroadcastTiming | string",
|
|
1133
|
+
"references": {
|
|
1134
|
+
"Record": {
|
|
1135
|
+
"location": "global",
|
|
1136
|
+
"id": "global::Record"
|
|
1137
|
+
},
|
|
1138
|
+
"BroadcastTiming": {
|
|
1139
|
+
"location": "import",
|
|
1140
|
+
"path": "../../utils/broadcast-time",
|
|
1141
|
+
"id": "src/components/views/tet-tv-program/utils/broadcast-time.ts::BroadcastTiming",
|
|
1142
|
+
"referenceLocation": "BroadcastTiming"
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
},
|
|
1146
|
+
"required": false,
|
|
1147
|
+
"optional": false,
|
|
1148
|
+
"docs": {
|
|
1149
|
+
"tags": [],
|
|
1150
|
+
"text": "Broadcast status and progress supplied by the parent clock."
|
|
1151
|
+
},
|
|
1152
|
+
"getter": false,
|
|
1153
|
+
"setter": false,
|
|
1154
|
+
"defaultValue": "{}"
|
|
1155
|
+
}
|
|
1156
|
+
};
|
|
1157
|
+
}
|
|
1158
|
+
static get states() {
|
|
1159
|
+
return {
|
|
1160
|
+
"visibleRange": {},
|
|
1161
|
+
"selectedItemId": {},
|
|
1162
|
+
"focusedItemId": {},
|
|
1163
|
+
"focusedChannelId": {},
|
|
1164
|
+
"visibleChannelIds": {},
|
|
1165
|
+
"channelTooltipState": {},
|
|
1166
|
+
"canScrollPrevious": {},
|
|
1167
|
+
"canScrollNext": {},
|
|
1168
|
+
"failedChannelLogoSources": {}
|
|
1169
|
+
};
|
|
1170
|
+
}
|
|
1171
|
+
static get events() {
|
|
1172
|
+
return [{
|
|
1173
|
+
"method": "currentTimeVisibilityChanged",
|
|
1174
|
+
"name": "currentTimeVisibilityChanged",
|
|
1175
|
+
"bubbles": true,
|
|
1176
|
+
"cancelable": true,
|
|
1177
|
+
"composed": true,
|
|
1178
|
+
"docs": {
|
|
1179
|
+
"tags": [],
|
|
1180
|
+
"text": "Whether today's current-time line is visible outside the channel gutter."
|
|
1181
|
+
},
|
|
1182
|
+
"complexType": {
|
|
1183
|
+
"original": "boolean",
|
|
1184
|
+
"resolved": "boolean",
|
|
1185
|
+
"references": {}
|
|
1186
|
+
}
|
|
1187
|
+
}];
|
|
1188
|
+
}
|
|
1189
|
+
static get methods() {
|
|
1190
|
+
return {
|
|
1191
|
+
"scrollToNow": {
|
|
1192
|
+
"complexType": {
|
|
1193
|
+
"signature": "(behavior?: ScrollBehavior) => Promise<void>",
|
|
1194
|
+
"parameters": [{
|
|
1195
|
+
"name": "behavior",
|
|
1196
|
+
"type": "\"auto\" | \"instant\" | \"smooth\"",
|
|
1197
|
+
"docs": ""
|
|
1198
|
+
}],
|
|
1199
|
+
"references": {
|
|
1200
|
+
"Promise": {
|
|
1201
|
+
"location": "global",
|
|
1202
|
+
"id": "global::Promise"
|
|
1203
|
+
},
|
|
1204
|
+
"ScrollBehavior": {
|
|
1205
|
+
"location": "global",
|
|
1206
|
+
"id": "global::ScrollBehavior"
|
|
1207
|
+
}
|
|
1208
|
+
},
|
|
1209
|
+
"return": "Promise<void>"
|
|
1210
|
+
},
|
|
1211
|
+
"docs": {
|
|
1212
|
+
"text": "Centers the shared horizontal viewport on the current local time.",
|
|
1213
|
+
"tags": []
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
};
|
|
1217
|
+
}
|
|
1218
|
+
static get elementRef() { return "element"; }
|
|
1219
|
+
static get watchers() {
|
|
1220
|
+
return [{
|
|
1221
|
+
"propName": "date",
|
|
1222
|
+
"methodName": "resetRetainedItems"
|
|
1223
|
+
}, {
|
|
1224
|
+
"propName": "schedules",
|
|
1225
|
+
"methodName": "resetProgramDetails"
|
|
1226
|
+
}, {
|
|
1227
|
+
"propName": "language",
|
|
1228
|
+
"methodName": "onLanguageChange"
|
|
1229
|
+
}, {
|
|
1230
|
+
"propName": "date",
|
|
1231
|
+
"methodName": "invalidateProgramHydration"
|
|
1232
|
+
}, {
|
|
1233
|
+
"propName": "schedules",
|
|
1234
|
+
"methodName": "invalidateProgramHydration"
|
|
1235
|
+
}, {
|
|
1236
|
+
"propName": "programLoading",
|
|
1237
|
+
"methodName": "invalidateProgramHydration"
|
|
1238
|
+
}, {
|
|
1239
|
+
"propName": "visibleChannelIds",
|
|
1240
|
+
"methodName": "invalidateProgramHydration"
|
|
1241
|
+
}, {
|
|
1242
|
+
"propName": "visibleRange",
|
|
1243
|
+
"methodName": "invalidateProgramHydration"
|
|
1244
|
+
}, {
|
|
1245
|
+
"propName": "date",
|
|
1246
|
+
"methodName": "updateCurrentTimeVisibility"
|
|
1247
|
+
}, {
|
|
1248
|
+
"propName": "currentTime",
|
|
1249
|
+
"methodName": "updateCurrentTimeVisibility"
|
|
1250
|
+
}, {
|
|
1251
|
+
"propName": "channels",
|
|
1252
|
+
"methodName": "resetChannelTooltip"
|
|
1253
|
+
}, {
|
|
1254
|
+
"propName": "schedules",
|
|
1255
|
+
"methodName": "resetChannelTooltip"
|
|
1256
|
+
}];
|
|
1257
|
+
}
|
|
1258
|
+
static get listeners() {
|
|
1259
|
+
return [{
|
|
1260
|
+
"name": "click",
|
|
1261
|
+
"method": "handleClick",
|
|
1262
|
+
"target": undefined,
|
|
1263
|
+
"capture": true,
|
|
1264
|
+
"passive": false
|
|
1265
|
+
}, {
|
|
1266
|
+
"name": "keydown",
|
|
1267
|
+
"method": "handleChannelTooltipKeydown",
|
|
1268
|
+
"target": "body",
|
|
1269
|
+
"capture": false,
|
|
1270
|
+
"passive": false
|
|
1271
|
+
}, {
|
|
1272
|
+
"name": "keydown",
|
|
1273
|
+
"method": "handleScheduleKeydown",
|
|
1274
|
+
"target": undefined,
|
|
1275
|
+
"capture": false,
|
|
1276
|
+
"passive": false
|
|
1277
|
+
}, {
|
|
1278
|
+
"name": "wheel",
|
|
1279
|
+
"method": "dismissChannelTooltipOnViewportChange",
|
|
1280
|
+
"target": "window",
|
|
1281
|
+
"capture": false,
|
|
1282
|
+
"passive": true
|
|
1283
|
+
}, {
|
|
1284
|
+
"name": "resize",
|
|
1285
|
+
"method": "dismissChannelTooltipOnViewportChange",
|
|
1286
|
+
"target": "window",
|
|
1287
|
+
"capture": false,
|
|
1288
|
+
"passive": true
|
|
1289
|
+
}, {
|
|
1290
|
+
"name": "broadcastSelected",
|
|
1291
|
+
"method": "retainSelectedItem",
|
|
1292
|
+
"target": undefined,
|
|
1293
|
+
"capture": false,
|
|
1294
|
+
"passive": false
|
|
1295
|
+
}, {
|
|
1296
|
+
"name": "focusin",
|
|
1297
|
+
"method": "updateFocusedItem",
|
|
1298
|
+
"target": undefined,
|
|
1299
|
+
"capture": false,
|
|
1300
|
+
"passive": false
|
|
1301
|
+
}, {
|
|
1302
|
+
"name": "focusout",
|
|
1303
|
+
"method": "updateFocusedItem",
|
|
1304
|
+
"target": undefined,
|
|
1305
|
+
"capture": false,
|
|
1306
|
+
"passive": false
|
|
1307
|
+
}];
|
|
1308
|
+
}
|
|
1309
|
+
}
|