@prolibu-suite/cobalt-core 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +7924 -3799
- package/dist/cjs/co-accordion.cjs.entry.js +1 -1
- package/dist/cjs/co-action-bar.cjs.entry.js +89 -0
- package/dist/cjs/co-app-shell.cjs.entry.js +3 -3
- package/dist/cjs/co-audio-player.cjs.entry.js +279 -0
- package/dist/cjs/co-autocomplete.cjs.entry.js +3 -3
- package/dist/cjs/co-avatar-group.cjs.entry.js +3 -3
- package/dist/cjs/{co-tooltip.cjs.entry.js → co-avatar_2.cjs.entry.js} +96 -4
- package/dist/cjs/co-badge.cjs.entry.js +2 -2
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +4 -4
- package/dist/cjs/co-breadcrumb-item.cjs.entry.js +3 -3
- package/dist/cjs/co-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/co-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-button.cjs.entry.js +13 -6
- package/dist/cjs/co-calendar-month_2.cjs.entry.js +1601 -0
- package/dist/cjs/co-calendar_3.cjs.entry.js +12 -12
- package/dist/cjs/co-card.cjs.entry.js +3 -3
- package/dist/cjs/co-carousel-item.cjs.entry.js +17 -0
- package/dist/cjs/co-carousel.cjs.entry.js +368 -0
- package/dist/cjs/co-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/co-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/co-chip_2.cjs.entry.js +96 -7
- package/dist/cjs/co-color-picker.cjs.entry.js +5 -5
- package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-combobox.cjs.entry.js +3 -3
- package/dist/cjs/co-command-search.cjs.entry.js +1 -1
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table.cjs.entry.js +2 -2
- package/dist/cjs/co-date-picker.cjs.entry.js +12 -5
- package/dist/cjs/co-date-range-picker.cjs.entry.js +11 -5
- package/dist/cjs/co-date-range.cjs.entry.js +2 -2
- package/dist/cjs/co-date-time-picker.cjs.entry.js +409 -0
- package/dist/cjs/co-drive-card.cjs.entry.js +2 -2
- package/dist/cjs/co-drop-zone.cjs.entry.js +2 -2
- package/dist/cjs/co-empty-state.cjs.entry.js +3 -3
- package/dist/cjs/co-event-calendar.cjs.entry.js +119 -18
- package/dist/cjs/co-event-popover.cjs.entry.js +132 -0
- package/dist/cjs/co-fab.cjs.entry.js +21 -6
- package/dist/cjs/co-file-field.cjs.entry.js +8 -8
- package/dist/cjs/co-file-type-tile.cjs.entry.js +3 -3
- package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
- package/dist/cjs/co-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/co-icon.cjs.entry.js +3 -3
- package/dist/cjs/co-input.cjs.entry.js +9 -3
- package/dist/cjs/co-json-field.cjs.entry.js +6 -6
- package/dist/cjs/co-lightbox.cjs.entry.js +34 -7
- package/dist/cjs/co-list-footer.cjs.entry.js +2 -2
- package/dist/cjs/co-list-item.cjs.entry.js +5 -5
- package/dist/cjs/co-loader.cjs.entry.js +1 -1
- package/dist/cjs/co-media-thumb.cjs.entry.js +3 -3
- package/dist/cjs/co-menu-divider.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-item.cjs.entry.js +3 -3
- package/dist/cjs/co-menu.cjs.entry.js +2 -2
- package/dist/cjs/co-modal.cjs.entry.js +3 -3
- package/dist/cjs/co-navbar.cjs.entry.js +3 -3
- package/dist/cjs/co-number-field.cjs.entry.js +5 -5
- package/dist/cjs/co-overlay.cjs.entry.js +2 -2
- package/dist/cjs/co-page-header.cjs.entry.js +2 -2
- package/dist/cjs/co-phone-field.cjs.entry.js +4 -4
- package/dist/cjs/co-popover.cjs.entry.js +2 -2
- package/dist/cjs/co-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/co-progress-circle.cjs.entry.js +3 -3
- package/dist/cjs/co-provider-logo_2.cjs.entry.js +72 -0
- package/dist/cjs/co-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/co-radio.cjs.entry.js +4 -4
- package/dist/cjs/co-rating.cjs.entry.js +4 -4
- package/dist/cjs/co-ref-field.cjs.entry.js +16 -6
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +22 -7
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +37 -5
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +36 -6
- package/dist/cjs/co-row.cjs.entry.js +3 -3
- package/dist/cjs/co-segmented-bar.cjs.entry.js +1 -1
- package/dist/cjs/co-select.cjs.entry.js +13 -7
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +13 -3
- package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/co-slider.cjs.entry.js +3 -3
- package/dist/cjs/co-switch.cjs.entry.js +5 -5
- package/dist/cjs/co-tab-group.cjs.entry.js +20 -4
- package/dist/cjs/co-tab.cjs.entry.js +3 -3
- package/dist/cjs/co-tags-field.cjs.entry.js +9 -9
- package/dist/cjs/co-textarea.cjs.entry.js +13 -7
- package/dist/cjs/co-toast.cjs.entry.js +1 -1
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/co-transfer-list.cjs.entry.js +1 -1
- package/dist/cjs/co-video.cjs.entry.js +3 -3
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/{dateI18n-BdiNAl0_.js → dateI18n-wblvKRq_.js} +21 -0
- package/dist/cjs/{dates-D8D-aS5d.js → dates-TQLHlFd2.js} +64 -13
- package/dist/cjs/{fieldChip-D8YJCyQF.js → fieldChip-B_npd9rL.js} +1 -1
- package/dist/cjs/{index-4y1Dm145.js → index-DFZ5YhIT.js} +171 -11
- package/dist/cjs/{index-DxEFsH_t.js → index-kBiXCEE7.js} +41 -21
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{positioning-DwHW399W.js → positioning-DCj_AJ2T.js} +10 -0
- package/dist/cjs/{requiredMark-B3pKyqYI.js → requiredMark-DuMIcKtt.js} +1 -1
- package/dist/cjs/{richTextI18n-B7ktXg3M.js → richTextI18n-B28uAhh4.js} +3 -0
- package/dist/cjs/time-LBHtzLHe.js +42 -0
- package/dist/cjs/{toolbar-config-3PlT-3zm.js → toolbar-config-BQfWTW6P.js} +2 -0
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-075eed3d.entry.js → p-00830b8c.entry.js} +1 -1
- package/dist/cobalt/{p-cc0a4617.entry.js → p-0769eee9.entry.js} +1 -1
- package/dist/cobalt/p-0f18c4d2.entry.js +1 -0
- package/dist/cobalt/{p-5c3101b5.entry.js → p-0fc1edca.entry.js} +1 -1
- package/dist/cobalt/p-15852fec.entry.js +1 -0
- package/dist/cobalt/p-195c67ee.entry.js +1 -0
- package/dist/cobalt/{p-B6JZk8fL.js → p-1EK-COrb.js} +1 -1
- package/dist/cobalt/{p-d9608046.entry.js → p-1e9c9d46.entry.js} +1 -1
- package/dist/cobalt/{p-02c5a9a9.entry.js → p-202eadfc.entry.js} +1 -1
- package/dist/cobalt/{p-b4bed98b.entry.js → p-20bd3702.entry.js} +1 -1
- package/dist/cobalt/p-25f59046.entry.js +1 -0
- package/dist/cobalt/{p-809015dd.entry.js → p-260196cb.entry.js} +1 -1
- package/dist/cobalt/{p-771bc8fe.entry.js → p-27dce0ac.entry.js} +1 -1
- package/dist/cobalt/p-2bf44b2b.entry.js +1 -0
- package/dist/cobalt/{p-3f06d373.entry.js → p-2c100914.entry.js} +1 -1
- package/dist/cobalt/p-2e1d930f.entry.js +1 -0
- package/dist/cobalt/{p-47a2dd67.entry.js → p-35518aee.entry.js} +1 -1
- package/dist/cobalt/{p-c3462def.entry.js → p-38ae8bff.entry.js} +1 -1
- package/dist/cobalt/p-38cf47b6.entry.js +1 -0
- package/dist/cobalt/p-39dea0c0.entry.js +1 -0
- package/dist/cobalt/p-3a746267.entry.js +1 -0
- package/dist/cobalt/{p-9c6ca902.entry.js → p-3ae69426.entry.js} +1 -1
- package/dist/cobalt/{p-8dfb6886.entry.js → p-3af74ab8.entry.js} +1 -1
- package/dist/cobalt/{p-9a587867.entry.js → p-3d4e697e.entry.js} +1 -1
- package/dist/cobalt/{p-1681ce1d.entry.js → p-445acc4c.entry.js} +1 -1
- package/dist/cobalt/p-48fbf051.entry.js +1 -0
- package/dist/cobalt/p-4de9232a.entry.js +1 -0
- package/dist/cobalt/{p-fd27c2bd.entry.js → p-50bbfad8.entry.js} +1 -1
- package/dist/cobalt/{p-85eed52c.entry.js → p-51a1ad38.entry.js} +1 -1
- package/dist/cobalt/{p-1726ce07.entry.js → p-523aca9f.entry.js} +1 -1
- package/dist/cobalt/p-52af222b.entry.js +1 -0
- package/dist/cobalt/{p-81cfd951.entry.js → p-5319ac3f.entry.js} +1 -1
- package/dist/cobalt/{p-ba66584f.entry.js → p-53a276a8.entry.js} +1 -1
- package/dist/cobalt/{p-f0de4415.entry.js → p-543cc00d.entry.js} +1 -1
- package/dist/cobalt/{p-a9afbaa6.entry.js → p-59f7d44b.entry.js} +1 -1
- package/dist/cobalt/{p-e420d5c9.entry.js → p-5b984323.entry.js} +1 -1
- package/dist/cobalt/{p-e710b9ea.entry.js → p-5bfaca70.entry.js} +1 -1
- package/dist/cobalt/p-5c1328ff.entry.js +1 -0
- package/dist/cobalt/{p-0d7536a8.entry.js → p-5c250889.entry.js} +1 -1
- package/dist/cobalt/p-5e21ca17.entry.js +1 -0
- package/dist/cobalt/p-61d5ca3c.entry.js +1 -0
- package/dist/cobalt/{p-8e823c15.entry.js → p-6357d9dd.entry.js} +1 -1
- package/dist/cobalt/{p-495c9b99.entry.js → p-69723cc1.entry.js} +1 -1
- package/dist/cobalt/{p-8128e84a.entry.js → p-6985a964.entry.js} +1 -1
- package/dist/cobalt/p-69b8d98e.entry.js +1 -0
- package/dist/cobalt/p-6b089060.entry.js +1 -0
- package/dist/cobalt/{p-627d2d1a.entry.js → p-6b256d01.entry.js} +1 -1
- package/dist/cobalt/{p-c1e53e4c.entry.js → p-7c6b3175.entry.js} +1 -1
- package/dist/cobalt/p-7d077a7c.entry.js +1 -0
- package/dist/cobalt/{p-20ba59a2.entry.js → p-7f4bf341.entry.js} +1 -1
- package/dist/cobalt/p-869c338a.entry.js +1 -0
- package/dist/cobalt/p-890296f9.entry.js +1 -0
- package/dist/cobalt/{p-5c43d30e.entry.js → p-8fe08257.entry.js} +1 -1
- package/dist/cobalt/p-913b2a14.entry.js +1 -0
- package/dist/cobalt/{p-2d1cbd7f.entry.js → p-959556f4.entry.js} +1 -1
- package/dist/cobalt/p-97875bde.entry.js +1 -0
- package/dist/cobalt/p-9824c478.entry.js +1 -0
- package/dist/cobalt/p-99c1ff0f.entry.js +1 -0
- package/dist/cobalt/p-BCEz3S-z.js +2 -0
- package/dist/cobalt/{p-Bgxofdfb.js → p-BL0sCfMH.js} +1 -1
- package/dist/cobalt/p-BMdapAL8.js +1 -0
- package/dist/cobalt/p-BU7SQCje.js +1 -0
- package/dist/cobalt/p-BYKAgwq3.js +1 -0
- package/dist/cobalt/p-C-d15gih.js +1 -0
- package/dist/cobalt/p-CF8OB_TM.js +1 -0
- package/dist/cobalt/p-CnNpoKwg.js +1 -0
- package/dist/cobalt/p-D5gr2ent.js +1 -0
- package/dist/cobalt/p-WeuPA9Rw.js +1 -0
- package/dist/cobalt/{p-fb251497.entry.js → p-a04feb70.entry.js} +1 -1
- package/dist/cobalt/{p-77d01b39.entry.js → p-a252f8c5.entry.js} +1 -1
- package/dist/cobalt/p-a4f39ba2.entry.js +1 -0
- package/dist/cobalt/{p-5e9a9caf.entry.js → p-a7c23027.entry.js} +1 -1
- package/dist/cobalt/p-ab8e150e.entry.js +1 -0
- package/dist/cobalt/{p-6ad1625a.entry.js → p-acdb68a7.entry.js} +1 -1
- package/dist/cobalt/{p-c6fedc59.entry.js → p-afd957c0.entry.js} +1 -1
- package/dist/cobalt/{p-c750b2d2.entry.js → p-b45ea918.entry.js} +1 -1
- package/dist/cobalt/p-bad7ce84.entry.js +1 -0
- package/dist/cobalt/{p-5edd0d3f.entry.js → p-bebacee2.entry.js} +1 -1
- package/dist/cobalt/{p-bb534985.entry.js → p-c237add6.entry.js} +1 -1
- package/dist/cobalt/p-c32949a5.entry.js +1 -0
- package/dist/cobalt/{p-3f68fd2e.entry.js → p-cd5555d2.entry.js} +1 -1
- package/dist/cobalt/p-cd96aabf.entry.js +1 -0
- package/dist/cobalt/{p-b8ec0cc1.entry.js → p-ce961fba.entry.js} +1 -1
- package/dist/cobalt/p-d56b8a1f.entry.js +1 -0
- package/dist/cobalt/p-d6fff135.entry.js +1 -0
- package/dist/cobalt/{p-b1197c08.entry.js → p-d71b87d3.entry.js} +1 -1
- package/dist/cobalt/{p-af4cb263.entry.js → p-d83e5189.entry.js} +1 -1
- package/dist/cobalt/p-dc269096.entry.js +1 -0
- package/dist/cobalt/{p-0d6a562d.entry.js → p-dc8e88f4.entry.js} +1 -1
- package/dist/cobalt/p-de5a05fc.entry.js +1 -0
- package/dist/cobalt/{p-86e60cfa.entry.js → p-df63f23c.entry.js} +1 -1
- package/dist/cobalt/p-e2188319.entry.js +1 -0
- package/dist/cobalt/p-f0c589ad.entry.js +1 -0
- package/dist/cobalt/{p-e9aaeaf7.entry.js → p-f4370423.entry.js} +1 -1
- package/dist/cobalt/p-f4e4bebf.entry.js +1 -0
- package/dist/cobalt/p-f53b9536.entry.js +1 -0
- package/dist/cobalt/{p-373cd08e.entry.js → p-f7ae0228.entry.js} +1 -1
- package/dist/collection/collection-manifest.json +8 -0
- package/dist/collection/components/co-action-bar/co-action-bar.css +148 -0
- package/dist/collection/components/co-action-bar/co-action-bar.js +247 -0
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-audio-player/co-audio-player.css +58 -0
- package/dist/collection/components/co-audio-player/co-audio-player.js +453 -0
- package/dist/collection/components/co-audio-player/co-audio-player.utils.js +44 -0
- package/dist/collection/components/co-autocomplete/co-autocomplete.css +1 -1
- package/dist/collection/components/co-avatar/co-avatar.css +23 -0
- package/dist/collection/components/co-avatar/co-avatar.js +24 -1
- package/dist/collection/components/co-avatar-group/co-avatar-group.css +9 -5
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +2 -2
- package/dist/collection/components/co-badge/co-badge.js +1 -1
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.js +3 -3
- package/dist/collection/components/co-breadcrumb/co-breadcrumb.js +1 -1
- package/dist/collection/components/co-breadcrumb-item/co-breadcrumb-item.js +2 -2
- package/dist/collection/components/co-button/co-button.css +19 -0
- package/dist/collection/components/co-button/co-button.js +31 -5
- package/dist/collection/components/co-button-group/co-button-group.js +2 -2
- package/dist/collection/components/co-calendar/co-calendar.js +1 -1
- package/dist/collection/components/co-calendar-month/co-calendar-month.css +52 -3
- package/dist/collection/components/co-calendar-month/co-calendar-month.js +238 -55
- package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.css +265 -0
- package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.js +1305 -0
- package/dist/collection/components/co-card/co-card.js +2 -2
- package/dist/collection/components/co-carousel/co-carousel.css +152 -0
- package/dist/collection/components/co-carousel/co-carousel.js +633 -0
- package/dist/collection/components/co-carousel-item/co-carousel-item.css +6 -0
- package/dist/collection/components/co-carousel-item/co-carousel-item.js +25 -0
- package/dist/collection/components/co-checkbox/co-checkbox.css +1 -1
- package/dist/collection/components/co-checkbox/co-checkbox.js +3 -3
- package/dist/collection/components/co-chip/co-chip.js +2 -2
- package/dist/collection/components/co-color-picker/co-color-picker.css +11 -10
- package/dist/collection/components/co-color-picker/co-color-picker.js +2 -2
- package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
- package/dist/collection/components/co-combobox/co-combobox.css +6 -8
- package/dist/collection/components/co-data-table/co-data-table.css +23 -8
- package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +4 -4
- package/dist/collection/components/co-date-field/co-date-field.css +6 -7
- package/dist/collection/components/co-date-field/co-date-field.js +4 -4
- package/dist/collection/components/co-date-picker/co-date-picker.css +16 -0
- package/dist/collection/components/co-date-picker/co-date-picker.js +28 -1
- package/dist/collection/components/co-date-range/co-date-range.js +1 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.css +13 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +26 -0
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.css +325 -0
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.js +1079 -0
- package/dist/collection/components/co-drawer/co-drawer.css +46 -0
- package/dist/collection/components/co-drawer/co-drawer.js +1 -1
- package/dist/collection/components/co-drive-card/co-drive-card.js +1 -1
- package/dist/collection/components/co-drop-zone/co-drop-zone.js +1 -1
- package/dist/collection/components/co-empty-state/co-empty-state.js +2 -2
- package/dist/collection/components/co-event-calendar/co-event-calendar.css +19 -7
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +342 -39
- package/dist/collection/components/co-event-popover/co-event-popover.css +26 -0
- package/dist/collection/components/co-event-popover/co-event-popover.js +326 -0
- package/dist/collection/components/co-fab/co-fab.css +70 -10
- package/dist/collection/components/co-fab/co-fab.js +39 -4
- package/dist/collection/components/co-file-field/co-file-field.css +2 -2
- package/dist/collection/components/co-file-field/co-file-field.js +5 -5
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +2 -2
- package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
- package/dist/collection/components/co-icon/co-icon.js +2 -2
- package/dist/collection/components/co-icon-button/co-icon-button.js +1 -1
- package/dist/collection/components/co-input/co-input.css +13 -1
- package/dist/collection/components/co-input/co-input.js +26 -0
- package/dist/collection/components/co-json-field/co-json-field.css +4 -8
- package/dist/collection/components/co-json-field/co-json-field.js +3 -3
- package/dist/collection/components/co-lightbox/co-lightbox.css +12 -1
- package/dist/collection/components/co-lightbox/co-lightbox.js +31 -4
- package/dist/collection/components/co-list-footer/co-list-footer.js +1 -1
- package/dist/collection/components/co-list-item/co-list-item.js +4 -4
- package/dist/collection/components/co-media-thumb/co-media-thumb.js +2 -2
- package/dist/collection/components/co-menu/co-menu.js +1 -1
- package/dist/collection/components/co-menu-divider/co-menu-divider.js +1 -1
- package/dist/collection/components/co-menu-item/co-menu-item.css +21 -0
- package/dist/collection/components/co-menu-item/co-menu-item.js +20 -1
- package/dist/collection/components/co-modal/co-modal.js +2 -2
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.css +1 -1
- package/dist/collection/components/co-number-field/co-number-field.js +2 -2
- package/dist/collection/components/co-option-list/co-option-list.css +18 -0
- package/dist/collection/components/co-option-list/co-option-list.js +127 -5
- package/dist/collection/components/co-option-list/optionListLogic.js +13 -0
- package/dist/collection/components/co-overlay/co-overlay.js +1 -1
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.css +2 -2
- package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
- package/dist/collection/components/co-provider-logo/co-provider-logo.css +23 -0
- package/dist/collection/components/co-provider-logo/co-provider-logo.js +124 -0
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.css +17 -1
- package/dist/collection/components/co-ref-field/co-ref-field.js +32 -2
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +32 -3
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +97 -4
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +8 -0
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +93 -3
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.css +19 -0
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +53 -4
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-select/co-select.css +12 -1
- package/dist/collection/components/co-select/co-select.js +30 -4
- package/dist/collection/components/co-separator/co-separator.js +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +12 -2
- package/dist/collection/components/co-skeleton/co-skeleton.js +1 -1
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.js +3 -3
- package/dist/collection/components/co-tab/co-tab.js +2 -2
- package/dist/collection/components/co-tab-group/co-tab-group.css +32 -4
- package/dist/collection/components/co-tab-group/co-tab-group.js +18 -2
- package/dist/collection/components/co-tags-field/co-tags-field.css +12 -21
- package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
- package/dist/collection/components/co-textarea/co-textarea.css +18 -8
- package/dist/collection/components/co-textarea/co-textarea.js +30 -4
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +2 -2
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.js +2 -2
- package/dist/collection/components/co-video/co-video.js +2 -2
- package/dist/collection/utils/carouselI18n.js +36 -0
- package/dist/collection/utils/dateI18n.js +21 -0
- package/dist/collection/utils/eventColor.js +52 -0
- package/dist/collection/utils/positioning.js +10 -0
- package/dist/collection/utils/richTextI18n.js +3 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-action-bar.d.ts +11 -0
- package/dist/components/co-action-bar.js +1 -0
- package/dist/components/co-app-shell.js +1 -1
- package/dist/components/co-audio-player.d.ts +11 -0
- package/dist/components/co-audio-player.js +1 -0
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.js +1 -1
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-badge.js +1 -1
- package/dist/components/co-bottom-sheet.js +1 -1
- package/dist/components/co-breadcrumb-item.js +1 -1
- package/dist/components/co-breadcrumb.js +1 -1
- package/dist/components/co-button-group.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar-month.js +1 -1
- package/dist/components/co-calendar-timegrid.d.ts +11 -0
- package/dist/components/co-calendar-timegrid.js +1 -0
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-card.js +1 -1
- package/dist/components/co-carousel-item.d.ts +11 -0
- package/dist/components/co-carousel-item.js +1 -0
- package/dist/components/co-carousel.d.ts +11 -0
- package/dist/components/co-carousel.js +1 -0
- package/dist/components/co-checkbox-group.js +1 -1
- package/dist/components/co-checkbox.js +1 -1
- package/dist/components/co-chip.js +1 -1
- package/dist/components/co-color-picker.js +1 -1
- package/dist/components/co-column-picker.js +1 -1
- package/dist/components/co-combobox.js +1 -1
- package/dist/components/co-command-search.js +1 -1
- package/dist/components/co-data-table-pagination.js +1 -1
- package/dist/components/co-data-table.js +1 -1
- package/dist/components/co-date-field.js +1 -1
- package/dist/components/co-date-picker.js +1 -1
- package/dist/components/co-date-range-picker.js +1 -1
- package/dist/components/co-date-range.js +1 -1
- package/dist/components/co-date-time-picker.d.ts +11 -0
- package/dist/components/co-date-time-picker.js +1 -0
- package/dist/components/co-drawer.js +1 -1
- package/dist/components/co-drive-card.js +1 -1
- package/dist/components/co-drop-zone.js +1 -1
- package/dist/components/co-empty-state.js +1 -1
- package/dist/components/co-event-calendar.js +1 -1
- package/dist/components/co-event-popover.d.ts +11 -0
- package/dist/components/co-event-popover.js +1 -0
- package/dist/components/co-fab.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-file-type-tile.js +1 -1
- package/dist/components/co-helper-text.js +1 -1
- package/dist/components/co-icon-button.js +1 -1
- package/dist/components/co-icon.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-json-field.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-footer.js +1 -1
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-media-thumb.js +1 -1
- package/dist/components/co-menu-divider.js +1 -1
- package/dist/components/co-menu-item.js +1 -1
- package/dist/components/co-menu.js +1 -1
- package/dist/components/co-modal.js +1 -1
- package/dist/components/co-navbar.js +1 -1
- package/dist/components/co-number-field.js +1 -1
- package/dist/components/co-option-list.js +1 -1
- package/dist/components/co-overlay.js +1 -1
- package/dist/components/co-page-header.js +1 -1
- package/dist/components/co-phone-field.js +1 -1
- package/dist/components/co-popover.js +1 -1
- package/dist/components/co-progress-bar.js +1 -1
- package/dist/components/co-progress-circle.js +1 -1
- package/dist/components/co-provider-logo.d.ts +11 -0
- package/dist/components/co-provider-logo.js +1 -0
- package/dist/components/co-radio-group.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.js +1 -1
- package/dist/components/co-rich-text-toolbar.js +1 -1
- package/dist/components/co-rich-text-viewer.js +1 -1
- package/dist/components/co-row.js +1 -1
- package/dist/components/co-select.js +1 -1
- package/dist/components/co-separator.js +1 -1
- package/dist/components/co-sidebar-nav.js +1 -1
- package/dist/components/co-sidebar.js +1 -1
- package/dist/components/co-skeleton.js +1 -1
- package/dist/components/co-slider.js +1 -1
- package/dist/components/co-switch.js +1 -1
- package/dist/components/co-tab-group.js +1 -1
- package/dist/components/co-tab.js +1 -1
- package/dist/components/co-tags-field.js +1 -1
- package/dist/components/co-textarea.js +1 -1
- package/dist/components/co-toast.js +1 -1
- package/dist/components/co-toggle-button-group.js +1 -1
- package/dist/components/co-toggle-button.js +1 -1
- package/dist/components/co-tooltip.js +1 -1
- package/dist/components/co-transfer-list.js +1 -1
- package/dist/components/co-video.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-B21rOC2Y.js +1 -0
- package/dist/components/{p-DvL2TcDG.js → p-BC6sxVVr.js} +1 -1
- package/dist/components/{p-Bgxofdfb.js → p-BL0sCfMH.js} +1 -1
- package/dist/components/p-BMdapAL8.js +1 -0
- package/dist/components/p-BQFperIX.js +1 -0
- package/dist/components/{p-Cam92sWP.js → p-BXtiFFM2.js} +1 -1
- package/dist/components/{p-CmCsm4L-.js → p-BdArvV6T.js} +1 -1
- package/dist/components/p-BnkGlFYy.js +1 -0
- package/dist/components/p-C-5cLeKr.js +1 -0
- package/dist/components/p-CDWXNRpo.js +1 -0
- package/dist/components/p-CF8OB_TM.js +1 -0
- package/dist/components/{p-_k-j03K-.js → p-CIWoKlGj.js} +1 -1
- package/dist/components/{p-lus32JrB.js → p-CVCEiwOS.js} +1 -1
- package/dist/components/{p-QWi9AmnD.js → p-CfeNhAHW.js} +1 -1
- package/dist/components/p-Ch837Ggl.js +1 -0
- package/dist/components/p-ChLib-si.js +1 -0
- package/dist/components/p-ChPooamL.js +1 -0
- package/dist/components/p-CnNpoKwg.js +1 -0
- package/dist/components/p-D-3BTFRs.js +1 -0
- package/dist/components/p-D0wrmRH8.js +1 -0
- package/dist/components/p-DZX7cEqP.js +1 -0
- package/dist/components/{p-D4SOCy8I.js → p-DbISGXT_.js} +1 -1
- package/dist/components/p-Dxa7c4Ap.js +1 -0
- package/dist/components/p-T0MdU7sb.js +1 -0
- package/dist/components/p-W8Y8ZuPs.js +1 -0
- package/dist/components/p-WeuPA9Rw.js +1 -0
- package/dist/components/{p-CNIs9j-h.js → p-cteJszd-.js} +1 -1
- package/dist/components/p-e5KibEs8.js +1 -0
- package/dist/components/{p-COb8X_fE.js → p-mUoTCiYa.js} +1 -1
- package/dist/components/p-uZ2D6ESV.js +1 -0
- package/dist/components/p-ySi6UG0O.js +1 -0
- package/dist/esm/co-accordion.entry.js +1 -1
- package/dist/esm/co-action-bar.entry.js +87 -0
- package/dist/esm/co-app-shell.entry.js +3 -3
- package/dist/esm/co-audio-player.entry.js +277 -0
- package/dist/esm/co-autocomplete.entry.js +3 -3
- package/dist/esm/co-avatar-group.entry.js +3 -3
- package/dist/esm/{co-tooltip.entry.js → co-avatar_2.entry.js} +96 -5
- package/dist/esm/co-badge.entry.js +2 -2
- package/dist/esm/co-bottom-sheet.entry.js +4 -4
- package/dist/esm/co-breadcrumb-item.entry.js +3 -3
- package/dist/esm/co-breadcrumb.entry.js +2 -2
- package/dist/esm/co-button-group.entry.js +3 -3
- package/dist/esm/co-button.entry.js +13 -6
- package/dist/esm/co-calendar-month_2.entry.js +1598 -0
- package/dist/esm/co-calendar_3.entry.js +12 -12
- package/dist/esm/co-card.entry.js +3 -3
- package/dist/esm/co-carousel-item.entry.js +15 -0
- package/dist/esm/co-carousel.entry.js +366 -0
- package/dist/esm/co-checkbox-group.entry.js +1 -1
- package/dist/esm/co-checkbox.entry.js +5 -5
- package/dist/esm/co-chip_2.entry.js +96 -7
- package/dist/esm/co-color-picker.entry.js +5 -5
- package/dist/esm/co-column-picker.entry.js +3 -3
- package/dist/esm/co-combobox.entry.js +3 -3
- package/dist/esm/co-command-search.entry.js +1 -1
- package/dist/esm/co-data-table-pagination.entry.js +5 -5
- package/dist/esm/co-data-table.entry.js +2 -2
- package/dist/esm/co-date-picker.entry.js +12 -5
- package/dist/esm/co-date-range-picker.entry.js +11 -5
- package/dist/esm/co-date-range.entry.js +2 -2
- package/dist/esm/co-date-time-picker.entry.js +407 -0
- package/dist/esm/co-drive-card.entry.js +2 -2
- package/dist/esm/co-drop-zone.entry.js +2 -2
- package/dist/esm/co-empty-state.entry.js +3 -3
- package/dist/esm/co-event-calendar.entry.js +120 -19
- package/dist/esm/co-event-popover.entry.js +130 -0
- package/dist/esm/co-fab.entry.js +21 -6
- package/dist/esm/co-file-field.entry.js +8 -8
- package/dist/esm/co-file-type-tile.entry.js +3 -3
- package/dist/esm/co-helper-text.entry.js +3 -3
- package/dist/esm/co-icon-button.entry.js +2 -2
- package/dist/esm/co-icon.entry.js +3 -3
- package/dist/esm/co-input.entry.js +9 -3
- package/dist/esm/co-json-field.entry.js +6 -6
- package/dist/esm/co-lightbox.entry.js +34 -7
- package/dist/esm/co-list-footer.entry.js +2 -2
- package/dist/esm/co-list-item.entry.js +5 -5
- package/dist/esm/co-loader.entry.js +1 -1
- package/dist/esm/co-media-thumb.entry.js +3 -3
- package/dist/esm/co-menu-divider.entry.js +2 -2
- package/dist/esm/co-menu-item.entry.js +3 -3
- package/dist/esm/co-menu.entry.js +2 -2
- package/dist/esm/co-modal.entry.js +3 -3
- package/dist/esm/co-navbar.entry.js +3 -3
- package/dist/esm/co-number-field.entry.js +5 -5
- package/dist/esm/co-overlay.entry.js +2 -2
- package/dist/esm/co-page-header.entry.js +2 -2
- package/dist/esm/co-phone-field.entry.js +4 -4
- package/dist/esm/co-popover.entry.js +2 -2
- package/dist/esm/co-progress-bar.entry.js +3 -3
- package/dist/esm/co-progress-circle.entry.js +3 -3
- package/dist/esm/co-provider-logo_2.entry.js +69 -0
- package/dist/esm/co-radio-group.entry.js +1 -1
- package/dist/esm/co-radio.entry.js +4 -4
- package/dist/esm/co-rating.entry.js +4 -4
- package/dist/esm/co-ref-field.entry.js +16 -6
- package/dist/esm/co-rich-text-editor.entry.js +22 -7
- package/dist/esm/co-rich-text-toolbar.entry.js +37 -5
- package/dist/esm/co-rich-text-viewer.entry.js +36 -6
- package/dist/esm/co-row.entry.js +3 -3
- package/dist/esm/co-segmented-bar.entry.js +1 -1
- package/dist/esm/co-select.entry.js +13 -7
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +13 -3
- package/dist/esm/co-sidebar.entry.js +3 -3
- package/dist/esm/co-slider.entry.js +3 -3
- package/dist/esm/co-switch.entry.js +5 -5
- package/dist/esm/co-tab-group.entry.js +20 -4
- package/dist/esm/co-tab.entry.js +3 -3
- package/dist/esm/co-tags-field.entry.js +9 -9
- package/dist/esm/co-textarea.entry.js +13 -7
- package/dist/esm/co-toast.entry.js +1 -1
- package/dist/esm/co-toggle-button-group.entry.js +3 -3
- package/dist/esm/co-toggle-button.entry.js +3 -3
- package/dist/esm/co-transfer-list.entry.js +1 -1
- package/dist/esm/co-video.entry.js +3 -3
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/{dateI18n-C1DCLOEl.js → dateI18n-CnNpoKwg.js} +21 -0
- package/dist/esm/{dates-tPYikBRJ.js → dates-BU7SQCje.js} +64 -13
- package/dist/esm/{fieldChip-ChXW__C5.js → fieldChip-Bb8YIN0J.js} +1 -1
- package/dist/esm/{index-tT-aZV0-.js → index-BCEz3S-z.js} +41 -21
- package/dist/esm/{index-Cyrxk8Qq.js → index-RuXxdKzC.js} +171 -11
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{positioning-C2mZ7x_Y.js → positioning-BMdapAL8.js} +10 -0
- package/dist/esm/{requiredMark-C7-_2UhB.js → requiredMark-D7kAMXHM.js} +1 -1
- package/dist/esm/{richTextI18n-B-ckjCUA.js → richTextI18n-BYKAgwq3.js} +3 -0
- package/dist/esm/time-CF8OB_TM.js +37 -0
- package/dist/esm/{toolbar-config-ChibIpZv.js → toolbar-config-WeuPA9Rw.js} +2 -0
- package/dist/esm/{tz-B6JZk8fL.js → tz-1EK-COrb.js} +1 -1
- package/dist/types/components/co-action-bar/co-action-bar.d.ts +66 -0
- package/dist/types/components/co-audio-player/co-audio-player.d.ts +62 -0
- package/dist/types/components/co-audio-player/co-audio-player.utils.d.ts +11 -0
- package/dist/types/components/co-avatar/co-avatar.d.ts +5 -0
- package/dist/types/components/co-button/co-button.d.ts +18 -1
- package/dist/types/components/co-calendar-month/co-calendar-month.d.ts +33 -1
- package/dist/types/components/co-calendar-timegrid/co-calendar-timegrid.d.ts +178 -0
- package/dist/types/components/co-carousel/co-carousel.d.ts +85 -0
- package/dist/types/components/co-carousel-item/co-carousel-item.d.ts +10 -0
- package/dist/types/components/co-date-picker/co-date-picker.d.ts +7 -0
- package/dist/types/components/co-date-range-picker/co-date-range-picker.d.ts +5 -0
- package/dist/types/components/co-date-time-picker/co-date-time-picker.d.ts +131 -0
- package/dist/types/components/co-event-calendar/co-event-calendar.d.ts +61 -8
- package/dist/types/components/co-event-popover/co-event-popover.d.ts +45 -0
- package/dist/types/components/co-fab/co-fab.d.ts +6 -0
- package/dist/types/components/co-input/co-input.d.ts +5 -0
- package/dist/types/components/co-lightbox/co-lightbox.d.ts +7 -0
- package/dist/types/components/co-menu-item/co-menu-item.d.ts +3 -0
- package/dist/types/components/co-option-list/co-option-list.d.ts +23 -0
- package/dist/types/components/co-option-list/optionListLogic.d.ts +3 -0
- package/dist/types/components/co-provider-logo/co-provider-logo.d.ts +17 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +6 -0
- package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +17 -0
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +12 -1
- package/dist/types/components/co-rich-text-viewer/co-rich-text-viewer.d.ts +10 -0
- package/dist/types/components/co-select/co-select.d.ts +5 -0
- package/dist/types/components/co-tab-group/co-tab-group.d.ts +5 -0
- package/dist/types/components/co-textarea/co-textarea.d.ts +5 -0
- package/dist/types/components.d.ts +1632 -103
- package/dist/types/utils/carouselI18n.d.ts +10 -0
- package/dist/types/utils/dateI18n.d.ts +7 -0
- package/dist/types/utils/eventColor.d.ts +20 -0
- package/dist/types/utils/richTextI18n.d.ts +1 -0
- package/package.json +4 -4
- package/dist/cjs/co-avatar.cjs.entry.js +0 -92
- package/dist/cjs/co-calendar-month.cjs.entry.js +0 -381
- package/dist/cjs/co-skeleton.cjs.entry.js +0 -26
- package/dist/cobalt/p-002e5beb.entry.js +0 -1
- package/dist/cobalt/p-0c0621a7.entry.js +0 -1
- package/dist/cobalt/p-13fc9c8a.entry.js +0 -1
- package/dist/cobalt/p-14d4c5c7.entry.js +0 -1
- package/dist/cobalt/p-4a075257.entry.js +0 -1
- package/dist/cobalt/p-5647ca9d.entry.js +0 -1
- package/dist/cobalt/p-5b31d45b.entry.js +0 -1
- package/dist/cobalt/p-6911a034.entry.js +0 -1
- package/dist/cobalt/p-70f70e02.entry.js +0 -1
- package/dist/cobalt/p-73b30ebb.entry.js +0 -1
- package/dist/cobalt/p-75dcaeb0.entry.js +0 -1
- package/dist/cobalt/p-7780ddb5.entry.js +0 -1
- package/dist/cobalt/p-7FZXeBK4.js +0 -1
- package/dist/cobalt/p-86d4e016.entry.js +0 -1
- package/dist/cobalt/p-8a9ed2da.entry.js +0 -1
- package/dist/cobalt/p-8f194753.entry.js +0 -1
- package/dist/cobalt/p-9c873a6a.entry.js +0 -1
- package/dist/cobalt/p-B-ckjCUA.js +0 -1
- package/dist/cobalt/p-BAA4ln31.js +0 -1
- package/dist/cobalt/p-C1DCLOEl.js +0 -1
- package/dist/cobalt/p-C2mZ7x_Y.js +0 -1
- package/dist/cobalt/p-ChibIpZv.js +0 -1
- package/dist/cobalt/p-a6900010.entry.js +0 -1
- package/dist/cobalt/p-aa20ffca.entry.js +0 -1
- package/dist/cobalt/p-ac5df270.entry.js +0 -1
- package/dist/cobalt/p-c0f39ddd.entry.js +0 -1
- package/dist/cobalt/p-c2e2eee9.entry.js +0 -1
- package/dist/cobalt/p-cc8e2f16.entry.js +0 -1
- package/dist/cobalt/p-e1957078.entry.js +0 -1
- package/dist/cobalt/p-e2762263.entry.js +0 -1
- package/dist/cobalt/p-e33853fa.entry.js +0 -1
- package/dist/cobalt/p-e4a539da.entry.js +0 -1
- package/dist/cobalt/p-e7085f08.entry.js +0 -1
- package/dist/cobalt/p-f073b467.entry.js +0 -1
- package/dist/cobalt/p-f36e461f.entry.js +0 -1
- package/dist/cobalt/p-f6ac5301.entry.js +0 -1
- package/dist/cobalt/p-f6b0c4a0.entry.js +0 -1
- package/dist/cobalt/p-f86ccb38.entry.js +0 -1
- package/dist/cobalt/p-tPYikBRJ.js +0 -1
- package/dist/cobalt/p-tT-aZV0-.js +0 -2
- package/dist/components/p-BHqdcGDh.js +0 -1
- package/dist/components/p-BJTMFYax.js +0 -1
- package/dist/components/p-Ba5lW0pA.js +0 -1
- package/dist/components/p-Bsq90mo4.js +0 -1
- package/dist/components/p-C1DCLOEl.js +0 -1
- package/dist/components/p-C2mZ7x_Y.js +0 -1
- package/dist/components/p-ChibIpZv.js +0 -1
- package/dist/components/p-CyYF8IJE.js +0 -1
- package/dist/components/p-D3ts7oo9.js +0 -1
- package/dist/components/p-Dh-h40mY.js +0 -1
- package/dist/components/p-DrQh1Cb8.js +0 -1
- package/dist/components/p-OKwHt2i9.js +0 -1
- package/dist/components/p-Xwo2HQmt.js +0 -1
- package/dist/components/p-eSq2ze8W.js +0 -1
- package/dist/esm/co-avatar.entry.js +0 -90
- package/dist/esm/co-calendar-month.entry.js +0 -379
- package/dist/esm/co-skeleton.entry.js +0 -24
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, } from "@stencil/core";
|
|
2
2
|
import { addDays, compareYMD, getMonthMatrix, getWeekdayLabels, isDisabled, parseISO, todayYMD, } from "@prolibu-suite/cobalt-date-utils";
|
|
3
3
|
import { layoutMonth, getWallClock, wallClockToEpoch, toUtcISO, zonedDateKey, zonedMinutesOfDay, } from "@prolibu-suite/cobalt-calendar-utils";
|
|
4
|
+
import { readableTextToken } from "../../utils/eventColor";
|
|
4
5
|
/**
|
|
5
6
|
* Month grid for the event calendar. Forks the day grid, roving-tabindex and
|
|
6
7
|
* keyboard model from `co-calendar`, then overlays multi-day event bars laid out
|
|
@@ -27,11 +28,20 @@ export class CoCalendarMonth {
|
|
|
27
28
|
this.selectable = true;
|
|
28
29
|
/** Max event lanes per day before "+N more". */
|
|
29
30
|
this.maxLanes = 3;
|
|
31
|
+
/** Cargando: en vez de los chips pinta bloques skeleton en sus carriles. La
|
|
32
|
+
* grilla del mes (cabecera de días, celdas, números, bordes) no se toca. */
|
|
33
|
+
this.loading = false;
|
|
30
34
|
/** Day currently hovered while dragging an event. */
|
|
31
35
|
this.dragOverDate = null;
|
|
32
36
|
/** Id of the event being dragged. */
|
|
33
37
|
this.dragId = null;
|
|
38
|
+
/** Epoch ms of "now", refreshed on a 60s timer so `past` styling stays live. */
|
|
39
|
+
this.nowMs = 0;
|
|
34
40
|
this.onPointerUp = () => this.finishDrag();
|
|
41
|
+
// ── Selection / activation ──────────────────────────────────────────────
|
|
42
|
+
/** Día seleccionado que PERSISTE resaltado mientras el host tiene abierto su
|
|
43
|
+
* form/bubble de creación (referencia visual, paridad Google). */
|
|
44
|
+
this.selectedDate = null;
|
|
35
45
|
this.handleKeyDown = (e) => {
|
|
36
46
|
const cur = this.focused;
|
|
37
47
|
let handled = true;
|
|
@@ -63,12 +73,20 @@ export class CoCalendarMonth {
|
|
|
63
73
|
}
|
|
64
74
|
componentWillLoad() {
|
|
65
75
|
this.focused = this.defaultFocus();
|
|
76
|
+
this.nowMs = Date.now();
|
|
77
|
+
}
|
|
78
|
+
componentDidLoad() {
|
|
79
|
+
// setInterval acá (no en connectedCallback): componentDidLoad corre una sola
|
|
80
|
+
// vez por instancia → sin timer duplicado en reconexión (espeja co-calendar-timegrid).
|
|
81
|
+
this.nowTimer = window.setInterval(() => (this.nowMs = Date.now()), 60000);
|
|
66
82
|
}
|
|
67
83
|
connectedCallback() {
|
|
68
84
|
window.addEventListener('pointerup', this.onPointerUp);
|
|
69
85
|
}
|
|
70
86
|
disconnectedCallback() {
|
|
71
87
|
window.removeEventListener('pointerup', this.onPointerUp);
|
|
88
|
+
if (this.nowTimer)
|
|
89
|
+
window.clearInterval(this.nowTimer);
|
|
72
90
|
}
|
|
73
91
|
defaultFocus() {
|
|
74
92
|
const first = `${pad4(this.year)}-${pad2(this.month)}-01`;
|
|
@@ -76,23 +94,29 @@ export class CoCalendarMonth {
|
|
|
76
94
|
const t = parseISO(today);
|
|
77
95
|
return t.year === this.year && t.month === this.month ? today : first;
|
|
78
96
|
}
|
|
79
|
-
get matrix() {
|
|
80
|
-
return getMonthMatrix(this.year, this.month, this.firstDayOfWeek).map((row) => row.map((c) => c.value));
|
|
81
|
-
}
|
|
82
97
|
eventById(id) {
|
|
83
|
-
|
|
98
|
+
var _a, _b;
|
|
99
|
+
return (_b = (_a = this._layoutCache) === null || _a === void 0 ? void 0 : _a.byId.get(id)) !== null && _b !== void 0 ? _b : this.events.find((e) => e.id === id);
|
|
84
100
|
}
|
|
85
101
|
isDayInteractable(date) {
|
|
86
102
|
return !isDisabled(date, { min: this.minDate, max: this.maxDate });
|
|
87
103
|
}
|
|
88
|
-
|
|
89
|
-
selectDay(date) {
|
|
104
|
+
selectDay(date, rect) {
|
|
90
105
|
if (!this.selectable || !this.isDayInteractable(date))
|
|
91
106
|
return;
|
|
92
|
-
this.
|
|
107
|
+
this.selectedDate = date;
|
|
108
|
+
this.coDaySelect.emit({ date, rect });
|
|
93
109
|
}
|
|
94
|
-
|
|
95
|
-
|
|
110
|
+
/** Limpia el resaltado persistente (lo llama el host al cerrar su form). */
|
|
111
|
+
async clearSelection() {
|
|
112
|
+
this.selectedDate = null;
|
|
113
|
+
}
|
|
114
|
+
/** Un refetch (post-save) invalida la referencia visual. */
|
|
115
|
+
onEventsChange() {
|
|
116
|
+
this.selectedDate = null;
|
|
117
|
+
}
|
|
118
|
+
activateEvent(id, rect) {
|
|
119
|
+
this.coEventClick.emit({ id, rect });
|
|
96
120
|
}
|
|
97
121
|
// ── Keyboard (WAI-ARIA grid, forked from co-calendar) ───────────────────
|
|
98
122
|
moveFocus(next) {
|
|
@@ -104,20 +128,30 @@ export class CoCalendarMonth {
|
|
|
104
128
|
(_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`[data-date="${this.focused}"]`)) === null || _b === void 0 ? void 0 : _b.focus();
|
|
105
129
|
}
|
|
106
130
|
// ── Drag-move (day granularity) ─────────────────────────────────────────
|
|
131
|
+
/** Marca la interacción en el root (pointer-events:none en los chips durante el
|
|
132
|
+
* drag — mata el hover/hit-testing de las barras all-day barridas en cada
|
|
133
|
+
* celda cruzada). No es @State a propósito: no debe disparar un render. */
|
|
134
|
+
setInteracting(on) {
|
|
135
|
+
var _a;
|
|
136
|
+
(_a = this.rootEl) === null || _a === void 0 ? void 0 : _a.classList.toggle('cal-month--interacting', on);
|
|
137
|
+
}
|
|
107
138
|
startDrag(e, id) {
|
|
108
139
|
const ev = this.eventById(id);
|
|
109
140
|
if (!ev || !this.editable || ev.editable === false || ev.startEditable === false)
|
|
110
141
|
return;
|
|
111
|
-
|
|
142
|
+
// Ver la nota en co-calendar-timegrid#startMove: preventDefault en
|
|
143
|
+
// pointerdown mata el click y el chip arrastrable no podía activarse.
|
|
112
144
|
e.stopPropagation();
|
|
113
145
|
this.dragId = id;
|
|
114
146
|
this.dragOverDate = null;
|
|
147
|
+
this.setInteracting(true);
|
|
115
148
|
}
|
|
116
149
|
finishDrag() {
|
|
117
150
|
const id = this.dragId;
|
|
118
151
|
const target = this.dragOverDate;
|
|
119
152
|
this.dragId = null;
|
|
120
153
|
this.dragOverDate = null;
|
|
154
|
+
this.setInteracting(false);
|
|
121
155
|
if (!id || !target)
|
|
122
156
|
return;
|
|
123
157
|
const ev = this.eventById(id);
|
|
@@ -142,6 +176,46 @@ export class CoCalendarMonth {
|
|
|
142
176
|
});
|
|
143
177
|
}
|
|
144
178
|
// ── Render ──────────────────────────────────────────────────────────────
|
|
179
|
+
getLayouts() {
|
|
180
|
+
var _a;
|
|
181
|
+
const c = this._layoutCache;
|
|
182
|
+
if (c &&
|
|
183
|
+
c.events === this.events &&
|
|
184
|
+
c.year === this.year &&
|
|
185
|
+
c.month === this.month &&
|
|
186
|
+
c.firstDayOfWeek === this.firstDayOfWeek &&
|
|
187
|
+
c.timeZone === this.timeZone &&
|
|
188
|
+
c.maxLanes === this.maxLanes) {
|
|
189
|
+
return c;
|
|
190
|
+
}
|
|
191
|
+
const matrix = getMonthMatrix(this.year, this.month, this.firstDayOfWeek).map((row) => row.map((cell) => cell.value));
|
|
192
|
+
const layout = layoutMonth(this.events, matrix, {
|
|
193
|
+
maxLanes: this.maxLanes,
|
|
194
|
+
timeZone: this.timeZone,
|
|
195
|
+
});
|
|
196
|
+
const segByWeek = new Map();
|
|
197
|
+
for (const seg of layout.segments) {
|
|
198
|
+
if (seg.lane >= this.maxLanes)
|
|
199
|
+
continue;
|
|
200
|
+
const arr = (_a = segByWeek.get(seg.weekIndex)) !== null && _a !== void 0 ? _a : [];
|
|
201
|
+
arr.push(seg);
|
|
202
|
+
segByWeek.set(seg.weekIndex, arr);
|
|
203
|
+
}
|
|
204
|
+
const byId = new Map(this.events.map((e) => [e.id, e]));
|
|
205
|
+
this._layoutCache = {
|
|
206
|
+
events: this.events,
|
|
207
|
+
year: this.year,
|
|
208
|
+
month: this.month,
|
|
209
|
+
firstDayOfWeek: this.firstDayOfWeek,
|
|
210
|
+
timeZone: this.timeZone,
|
|
211
|
+
maxLanes: this.maxLanes,
|
|
212
|
+
matrix,
|
|
213
|
+
layout,
|
|
214
|
+
segByWeek,
|
|
215
|
+
byId,
|
|
216
|
+
};
|
|
217
|
+
return this._layoutCache;
|
|
218
|
+
}
|
|
145
219
|
renderChip(seg, weekDays) {
|
|
146
220
|
var _a;
|
|
147
221
|
const ev = this.eventById(seg.eventId);
|
|
@@ -150,7 +224,7 @@ export class CoCalendarMonth {
|
|
|
150
224
|
const cols = weekDays.length;
|
|
151
225
|
const left = (seg.startCol / cols) * 100;
|
|
152
226
|
const width = ((seg.endCol - seg.startCol + 1) / cols) * 100;
|
|
153
|
-
const isPast = ev.endMs <=
|
|
227
|
+
const isPast = ev.endMs <= this.nowMs;
|
|
154
228
|
const isExternal = ((_a = ev.extendedProps) === null || _a === void 0 ? void 0 : _a.isExternal) === true;
|
|
155
229
|
const locked = !this.editable || ev.editable === false;
|
|
156
230
|
const timeText = ev.allDay || !seg.isStart
|
|
@@ -163,7 +237,9 @@ export class CoCalendarMonth {
|
|
|
163
237
|
};
|
|
164
238
|
if (ev.backgroundColor) {
|
|
165
239
|
style['--co-cal-event-bg'] = ev.backgroundColor;
|
|
166
|
-
|
|
240
|
+
const textToken = readableTextToken(this.rootEl, ev.backgroundColor);
|
|
241
|
+
if (textToken)
|
|
242
|
+
style['--co-cal-event-text'] = textToken;
|
|
167
243
|
}
|
|
168
244
|
if (ev.borderColor)
|
|
169
245
|
style['--co-cal-event-border'] = ev.borderColor;
|
|
@@ -176,31 +252,24 @@ export class CoCalendarMonth {
|
|
|
176
252
|
'cal-chip--dragging': this.dragId === ev.id,
|
|
177
253
|
'cal-chip--continues-before': seg.continuesBefore,
|
|
178
254
|
'cal-chip--continues-after': seg.continuesAfter,
|
|
255
|
+
'cal-chip--tentative': ev.responseState === 'tentative',
|
|
256
|
+
'cal-chip--cancelled': ev.responseState === 'cancelled' || ev.responseState === 'declined',
|
|
179
257
|
}, style: style, title: ev.title, "aria-label": ev.title, onClick: (e) => {
|
|
180
258
|
e.stopPropagation();
|
|
181
|
-
this.activateEvent(ev.id);
|
|
182
|
-
},
|
|
259
|
+
this.activateEvent(ev.id, e.currentTarget.getBoundingClientRect());
|
|
260
|
+
}, onDblClick: (e) => {
|
|
261
|
+
e.stopPropagation();
|
|
262
|
+
this.coEventDblClick.emit({ id: ev.id, rect: e.currentTarget.getBoundingClientRect() });
|
|
263
|
+
}, onPointerDown: (e) => this.startDrag(e, ev.id) }, !ev.allDay && h("span", { class: "cal-chip__dot", "aria-hidden": "true" }), timeText && h("span", { class: "cal-chip__time" }, timeText), h("span", { class: "cal-chip__title" }, ev.title || '—'), isExternal && (providerBrand(ev)
|
|
264
|
+
? h("co-provider-logo", { provider: providerBrand(ev), size: 11, plated: true, class: "cal-chip__ext" })
|
|
265
|
+
: h("co-icon", { name: "link", size: 11, class: "cal-chip__ext" }))));
|
|
183
266
|
}
|
|
184
267
|
render() {
|
|
185
|
-
|
|
186
|
-
const matrix = this.matrix;
|
|
187
|
-
const normalized = this.events;
|
|
188
|
-
const layout = layoutMonth(normalized, matrix, {
|
|
189
|
-
maxLanes: this.maxLanes,
|
|
190
|
-
timeZone: this.timeZone,
|
|
191
|
-
});
|
|
192
|
-
const segByWeek = new Map();
|
|
193
|
-
for (const seg of layout.segments) {
|
|
194
|
-
if (seg.lane >= this.maxLanes)
|
|
195
|
-
continue;
|
|
196
|
-
const arr = (_a = segByWeek.get(seg.weekIndex)) !== null && _a !== void 0 ? _a : [];
|
|
197
|
-
arr.push(seg);
|
|
198
|
-
segByWeek.set(seg.weekIndex, arr);
|
|
199
|
-
}
|
|
268
|
+
const { matrix, layout, segByWeek } = this.getLayouts();
|
|
200
269
|
const short = getWeekdayLabels(this.locale, this.firstDayOfWeek, 'short');
|
|
201
270
|
const long = getWeekdayLabels(this.locale, this.firstDayOfWeek, 'long');
|
|
202
271
|
const today = todayYMD();
|
|
203
|
-
return (h("div", { key: '
|
|
272
|
+
return (h("div", { key: 'f8bcb53b7ef7c47a1ff59caee0305dfc1a3f1fc2', class: "cal-month", part: "grid", role: "grid", onKeyDown: this.handleKeyDown, ref: (el) => (this.rootEl = el) }, h("div", { key: '11acf9973a13ad661590a04dd934c86ceaa10f5d', class: "cal-month__dow", role: "row" }, short.map((lbl, i) => (h("span", { class: "cal-month__dow-cell", role: "columnheader", "aria-label": long[i] }, lbl)))), matrix.map((week, wi) => {
|
|
204
273
|
var _a;
|
|
205
274
|
return (h("div", { class: "cal-month__week", role: "row" }, h("div", { class: "cal-month__days" }, week.map((date) => {
|
|
206
275
|
const ymd = parseISO(date);
|
|
@@ -214,11 +283,16 @@ export class CoCalendarMonth {
|
|
|
214
283
|
'cal-month__day--today': isToday,
|
|
215
284
|
'cal-month__day--disabled': !interactable,
|
|
216
285
|
'cal-month__day--drag-over': this.dragId !== null && this.dragOverDate === date,
|
|
217
|
-
|
|
286
|
+
'cal-month__day--selected': this.selectedDate === date,
|
|
287
|
+
}, onClick: (e) => this.selectDay(date, e.currentTarget.getBoundingClientRect()), onPointerEnter: () => {
|
|
218
288
|
if (this.dragId)
|
|
219
289
|
this.dragOverDate = date;
|
|
220
290
|
} }, h("span", { class: "cal-month__daynum" }, ymd.day)));
|
|
221
|
-
})), h("div", { class: "cal-month__events" },
|
|
291
|
+
})), h("div", { class: "cal-month__events" }, this.loading && SKELETON_CHIPS[wi % SKELETON_CHIPS.length].map(([col, span, lane]) => (h("div", { class: "cal-month__chip-skeleton", "aria-hidden": "true", style: {
|
|
292
|
+
left: `${(col / week.length) * 100}%`,
|
|
293
|
+
width: `${(span / week.length) * 100}%`,
|
|
294
|
+
top: `calc(var(--co-cal-daynum-h) + ${lane} * var(--co-cal-lane-h))`,
|
|
295
|
+
} }, h("co-skeleton", { variant: "rect", width: "100%", height: "100%" })))), !this.loading && ((_a = segByWeek.get(wi)) !== null && _a !== void 0 ? _a : []).map((seg) => this.renderChip(seg, week)), !this.loading && week.map((date, col) => {
|
|
222
296
|
var _a;
|
|
223
297
|
const more = (_a = layout.overflow[date]) !== null && _a !== void 0 ? _a : 0;
|
|
224
298
|
if (more <= 0)
|
|
@@ -467,6 +541,26 @@ export class CoCalendarMonth {
|
|
|
467
541
|
"reflect": false,
|
|
468
542
|
"attribute": "max-lanes",
|
|
469
543
|
"defaultValue": "3"
|
|
544
|
+
},
|
|
545
|
+
"loading": {
|
|
546
|
+
"type": "boolean",
|
|
547
|
+
"mutable": false,
|
|
548
|
+
"complexType": {
|
|
549
|
+
"original": "boolean",
|
|
550
|
+
"resolved": "boolean",
|
|
551
|
+
"references": {}
|
|
552
|
+
},
|
|
553
|
+
"required": false,
|
|
554
|
+
"optional": false,
|
|
555
|
+
"docs": {
|
|
556
|
+
"tags": [],
|
|
557
|
+
"text": "Cargando: en vez de los chips pinta bloques skeleton en sus carriles. La\ngrilla del mes (cabecera de d\u00EDas, celdas, n\u00FAmeros, bordes) no se toca."
|
|
558
|
+
},
|
|
559
|
+
"getter": false,
|
|
560
|
+
"setter": false,
|
|
561
|
+
"reflect": false,
|
|
562
|
+
"attribute": "loading",
|
|
563
|
+
"defaultValue": "false"
|
|
470
564
|
}
|
|
471
565
|
};
|
|
472
566
|
}
|
|
@@ -474,7 +568,9 @@ export class CoCalendarMonth {
|
|
|
474
568
|
return {
|
|
475
569
|
"focused": {},
|
|
476
570
|
"dragOverDate": {},
|
|
477
|
-
"dragId": {}
|
|
571
|
+
"dragId": {},
|
|
572
|
+
"nowMs": {},
|
|
573
|
+
"selectedDate": {}
|
|
478
574
|
};
|
|
479
575
|
}
|
|
480
576
|
static get events() {
|
|
@@ -483,37 +579,47 @@ export class CoCalendarMonth {
|
|
|
483
579
|
"name": "coDaySelect",
|
|
484
580
|
"bubbles": false,
|
|
485
581
|
"cancelable": true,
|
|
486
|
-
"composed":
|
|
582
|
+
"composed": false,
|
|
487
583
|
"docs": {
|
|
488
584
|
"tags": [],
|
|
489
585
|
"text": "Emitted when an empty day is selected (create request). Detail = \"YYYY-MM-DD\"."
|
|
490
586
|
},
|
|
491
587
|
"complexType": {
|
|
492
|
-
"original": "{ date: string }",
|
|
493
|
-
"resolved": "{ date: string; }",
|
|
494
|
-
"references": {
|
|
588
|
+
"original": "{ date: string; rect?: DOMRect }",
|
|
589
|
+
"resolved": "{ date: string; rect?: DOMRect | undefined; }",
|
|
590
|
+
"references": {
|
|
591
|
+
"DOMRect": {
|
|
592
|
+
"location": "global",
|
|
593
|
+
"id": "global::DOMRect"
|
|
594
|
+
}
|
|
595
|
+
}
|
|
495
596
|
}
|
|
496
597
|
}, {
|
|
497
598
|
"method": "coEventClick",
|
|
498
599
|
"name": "coEventClick",
|
|
499
600
|
"bubbles": false,
|
|
500
601
|
"cancelable": true,
|
|
501
|
-
"composed":
|
|
602
|
+
"composed": false,
|
|
502
603
|
"docs": {
|
|
503
604
|
"tags": [],
|
|
504
605
|
"text": "Emitted when an event chip is activated."
|
|
505
606
|
},
|
|
506
607
|
"complexType": {
|
|
507
|
-
"original": "{ id: string }",
|
|
508
|
-
"resolved": "{ id: string; }",
|
|
509
|
-
"references": {
|
|
608
|
+
"original": "{ id: string; rect?: DOMRect }",
|
|
609
|
+
"resolved": "{ id: string; rect?: DOMRect | undefined; }",
|
|
610
|
+
"references": {
|
|
611
|
+
"DOMRect": {
|
|
612
|
+
"location": "global",
|
|
613
|
+
"id": "global::DOMRect"
|
|
614
|
+
}
|
|
615
|
+
}
|
|
510
616
|
}
|
|
511
617
|
}, {
|
|
512
618
|
"method": "coEventDrop",
|
|
513
619
|
"name": "coEventDrop",
|
|
514
620
|
"bubbles": false,
|
|
515
621
|
"cancelable": true,
|
|
516
|
-
"composed":
|
|
622
|
+
"composed": false,
|
|
517
623
|
"docs": {
|
|
518
624
|
"tags": [],
|
|
519
625
|
"text": "Emitted on a completed drag-move (day granularity)."
|
|
@@ -528,7 +634,7 @@ export class CoCalendarMonth {
|
|
|
528
634
|
"name": "coMoreClick",
|
|
529
635
|
"bubbles": false,
|
|
530
636
|
"cancelable": true,
|
|
531
|
-
"composed":
|
|
637
|
+
"composed": false,
|
|
532
638
|
"docs": {
|
|
533
639
|
"tags": [],
|
|
534
640
|
"text": "Emitted when the \"+N more\" affordance is activated."
|
|
@@ -538,11 +644,68 @@ export class CoCalendarMonth {
|
|
|
538
644
|
"resolved": "{ date: string; }",
|
|
539
645
|
"references": {}
|
|
540
646
|
}
|
|
647
|
+
}, {
|
|
648
|
+
"method": "coEventDblClick",
|
|
649
|
+
"name": "coEventDblClick",
|
|
650
|
+
"bubbles": false,
|
|
651
|
+
"cancelable": true,
|
|
652
|
+
"composed": false,
|
|
653
|
+
"docs": {
|
|
654
|
+
"tags": [],
|
|
655
|
+
"text": "Doble activaci\u00F3n de un chip (direct-edit request del host)."
|
|
656
|
+
},
|
|
657
|
+
"complexType": {
|
|
658
|
+
"original": "{ id: string; rect?: DOMRect }",
|
|
659
|
+
"resolved": "{ id: string; rect?: DOMRect | undefined; }",
|
|
660
|
+
"references": {
|
|
661
|
+
"DOMRect": {
|
|
662
|
+
"location": "global",
|
|
663
|
+
"id": "global::DOMRect"
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
541
667
|
}];
|
|
542
668
|
}
|
|
669
|
+
static get methods() {
|
|
670
|
+
return {
|
|
671
|
+
"clearSelection": {
|
|
672
|
+
"complexType": {
|
|
673
|
+
"signature": "() => Promise<void>",
|
|
674
|
+
"parameters": [],
|
|
675
|
+
"references": {
|
|
676
|
+
"Promise": {
|
|
677
|
+
"location": "global",
|
|
678
|
+
"id": "global::Promise"
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
"return": "Promise<void>"
|
|
682
|
+
},
|
|
683
|
+
"docs": {
|
|
684
|
+
"text": "Limpia el resaltado persistente (lo llama el host al cerrar su form).",
|
|
685
|
+
"tags": []
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
}
|
|
543
690
|
static get elementRef() { return "el"; }
|
|
691
|
+
static get watchers() {
|
|
692
|
+
return [{
|
|
693
|
+
"propName": "events",
|
|
694
|
+
"methodName": "onEventsChange"
|
|
695
|
+
}];
|
|
696
|
+
}
|
|
544
697
|
}
|
|
545
698
|
// ── helpers ─────────────────────────────────────────────────────────────────
|
|
699
|
+
/** Chips del skeleton por semana: `[columna, ancho en días, carril]`. Patrón
|
|
700
|
+
* FIJO (nada de random) y desparejo, como se ve un mes real. */
|
|
701
|
+
const SKELETON_CHIPS = [
|
|
702
|
+
[[0, 2, 0], [3, 1, 0], [5, 1, 1]],
|
|
703
|
+
[[1, 1, 0], [2, 3, 1]],
|
|
704
|
+
[[0, 1, 0], [2, 1, 0], [4, 2, 1], [6, 1, 0]],
|
|
705
|
+
[[1, 2, 0], [4, 1, 1]],
|
|
706
|
+
[[2, 1, 0], [3, 2, 1], [6, 1, 0]],
|
|
707
|
+
[[0, 3, 0], [5, 1, 1]],
|
|
708
|
+
];
|
|
546
709
|
function pad2(n) {
|
|
547
710
|
return String(n).padStart(2, '0');
|
|
548
711
|
}
|
|
@@ -574,21 +737,41 @@ function shiftInstant(ms, deltaDays, timeZone) {
|
|
|
574
737
|
const [y, m, d] = newDate.split('-').map(Number);
|
|
575
738
|
return wallClockToEpoch({ year: y, month: m, day: d, hour: wc.hour, minute: wc.minute, second: wc.second }, timeZone);
|
|
576
739
|
}
|
|
740
|
+
// Intl.DateTimeFormat es caro de construir y este label se recalcula por chip
|
|
741
|
+
// por render sobre un dominio ACOTADO (≤96 minutos distintos, 1-2 locales):
|
|
742
|
+
// cacheamos el RESULTADO (y el formatter, para el miss). Higiene: clear a las
|
|
743
|
+
// 2000 entradas — inalcanzable en uso normal, solo protege de iteración
|
|
744
|
+
// patológica. Mismo patrón que co-calendar-timegrid.tsx (duplicado a propósito:
|
|
745
|
+
// componentes Stencil separados, consistencia > DRY entre ellos).
|
|
746
|
+
const MINUTE_LABEL_CACHE = new Map();
|
|
747
|
+
const MINUTE_FMT_CACHE = new Map();
|
|
577
748
|
/** Short localized time label, e.g. "9:00 a. m." / "09:00". */
|
|
578
749
|
function minutesToLabel(minutes, locale) {
|
|
750
|
+
const key = `${locale}|${minutes}`;
|
|
751
|
+
const hit = MINUTE_LABEL_CACHE.get(key);
|
|
752
|
+
if (hit !== undefined)
|
|
753
|
+
return hit;
|
|
754
|
+
let fmt = MINUTE_FMT_CACHE.get(locale);
|
|
755
|
+
if (!fmt) {
|
|
756
|
+
fmt = new Intl.DateTimeFormat(locale, { hour: 'numeric', minute: '2-digit' });
|
|
757
|
+
MINUTE_FMT_CACHE.set(locale, fmt);
|
|
758
|
+
}
|
|
579
759
|
const h = Math.floor(minutes / 60);
|
|
580
760
|
const m = minutes % 60;
|
|
581
|
-
|
|
761
|
+
const out = fmt.format(new Date(2000, 0, 1, h, m));
|
|
762
|
+
if (MINUTE_LABEL_CACHE.size > 2000)
|
|
763
|
+
MINUTE_LABEL_CACHE.clear();
|
|
764
|
+
MINUTE_LABEL_CACHE.set(key, out);
|
|
765
|
+
return out;
|
|
582
766
|
}
|
|
583
|
-
/**
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
return yiq >= 150 ? 'var(--co-cal-event-text-dark)' : 'var(--co-cal-event-text-light)';
|
|
767
|
+
/** Marca del evento externo (`co-provider-logo`), o '' si no se reconoce — el
|
|
768
|
+
* llamador cae al ícono genérico de enlace. */
|
|
769
|
+
function providerBrand(ev) {
|
|
770
|
+
var _a, _b;
|
|
771
|
+
const p = String((_b = (_a = ev.extendedProps) === null || _a === void 0 ? void 0 : _a.provider) !== null && _b !== void 0 ? _b : '').toLowerCase();
|
|
772
|
+
if (p.includes('google'))
|
|
773
|
+
return 'google';
|
|
774
|
+
if (p.includes('microsoft') || p.includes('outlook'))
|
|
775
|
+
return 'microsoft';
|
|
776
|
+
return '';
|
|
594
777
|
}
|