@globalpayments/vega 2.15.0 → 2.17.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/dist/cjs/{app-globals-6b5136b1.js → app-globals-4e0416c1.js} +15 -8
- package/dist/cjs/{childNodesEventPreventSlimmer-5b352793.js → childNodesEventPreventSlimmer-6848c3cf.js} +13 -1
- package/dist/cjs/{eventEmitSlimmer-ea57144a.js → eventEmitSlimmer-1d70a720.js} +1 -1
- package/dist/cjs/{formFieldControllerSlimmer-9271a8b8.js → formFieldControllerSlimmer-8b54f14d.js} +1 -1
- package/dist/cjs/index.cjs.js +11 -10
- package/dist/cjs/{internalVegaEventManager-543c20cb.js → internalVegaEventManager-743a124d.js} +2 -2
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{subStateObserverSlimmer-48ad20a1.js → subStateObserverSlimmer-60e4d6da.js} +28 -14
- package/dist/cjs/vega-accordion.cjs.entry.js +4 -4
- package/dist/cjs/vega-app-header-button.cjs.entry.js +4 -4
- package/dist/cjs/vega-banner.cjs.entry.js +3 -3
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +4 -4
- package/dist/cjs/vega-button-circle.cjs.entry.js +4 -4
- package/dist/cjs/vega-button-group_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-link.cjs.entry.js +4 -4
- package/dist/cjs/vega-button.cjs.entry.js +57 -12
- package/dist/cjs/vega-calendar_2.cjs.entry.js +830 -90
- package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-chip.cjs.entry.js +4 -4
- package/dist/cjs/vega-color-picker.cjs.entry.js +5 -5
- package/dist/cjs/vega-combo-box.cjs.entry.js +6 -6
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-dialog_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +310 -184
- package/dist/cjs/vega-field-label.cjs.entry.js +4 -4
- package/dist/cjs/vega-form.cjs.entry.js +6 -6
- package/dist/cjs/vega-image-uploader.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-range.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-select.cjs.entry.js +217 -105
- package/dist/cjs/vega-input.cjs.entry.js +5 -5
- package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +4 -4
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
- package/dist/cjs/vega-popover_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +3 -3
- package/dist/cjs/vega-radio_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +7 -7
- package/dist/cjs/{index-b8881ddc.js → vega-skeleton-loader-controller-8932c0ed.js} +91 -3
- package/dist/cjs/vega-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/vega-stepper.cjs.entry.js +6 -6
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-table_8.cjs.entry.js +6 -6
- package/dist/cjs/vega-textarea.cjs.entry.js +6 -6
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +3 -3
- package/dist/cjs/vega.cjs.js +5 -5
- package/dist/cjs/{vegaEventId-d7774262.js → vegaEventId-f375a6a3.js} +2 -0
- package/dist/cjs/{vegaInternalEventId-173c4941.js → vegaInternalEventId-ac38dd4b.js} +2 -0
- package/dist/collection/components/vega-button/slimmers/renderers/vega-button-loading-renderer.js +24 -0
- package/dist/collection/components/vega-button/vega-button.css +9 -1
- package/dist/collection/components/vega-button/vega-button.js +49 -7
- package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-current-period-controller.js +38 -24
- package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-event-controller.js +54 -1
- package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-view-controller.js +13 -21
- package/dist/collection/components/vega-calendar/slimmers/common/helpers/repeatPattern/baseRepeatPattern.js +61 -0
- package/dist/collection/components/vega-calendar/slimmers/common/helpers/repeatPattern/calendarEventDailyRepeatPattern.js +70 -0
- package/dist/collection/components/vega-calendar/slimmers/common/helpers/repeatPattern/calendarEventMonthlyRepeatPattern.js +90 -0
- package/dist/collection/components/vega-calendar/slimmers/common/helpers/repeatPattern/calendarEventRepeatPatternFactory.js +60 -0
- package/dist/collection/components/vega-calendar/slimmers/common/helpers/repeatPattern/calendarEventWeeklyRepeatPattern.js +163 -0
- package/dist/collection/components/vega-calendar/slimmers/common/helpers/repeatPattern/calendarEventYearlyRepeatPattern.js +92 -0
- package/dist/collection/components/vega-calendar/slimmers/common/helpers/test/calendarEventRepeatPatternFactory.test.js +105 -0
- package/dist/collection/components/vega-calendar/slimmers/common/layout/test/longEventLayoutGenerator.test.js +0 -5
- package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.js +1 -1
- package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/timed-event/layout/test/dayViewEventLayoutGenerator.test.js +0 -5
- package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.js +21 -4
- package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +45 -2
- package/dist/collection/components/vega-calendar/vega-calendar.css +2 -1
- package/dist/collection/components/vega-calendar/vega-calendar.js +51 -4
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.js +0 -4
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-children-controller.js +14 -1
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-scrollable-controller.js +142 -0
- package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.js +16 -50
- package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-renderer.js +8 -2
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/controllers/vega-dropdown-item-state-controller.js +1 -0
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +7 -5
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.js +1 -1
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +5 -2
- package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-dropdown-controller.js +22 -40
- package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-items-slot-controler.js +62 -0
- package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-lazy-load-controller.js +2 -2
- package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.js +48 -0
- package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-value-controller.js +7 -10
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +25 -6
- package/dist/collection/components/vega-input-select/vega-input-select.js +10 -2
- package/dist/collection/components/vega-loading-indicator/vega-loading-indicator.js +2 -2
- package/dist/collection/components/vega-skeleton/vega-skeleton.css +5 -2
- package/dist/collection/constants/ui.js +1 -1
- package/dist/collection/global/scripts/beforeVegaLoad.js +8 -0
- package/dist/collection/helpers/calendar/calendar-date.js +11 -0
- package/dist/collection/helpers/calendar/calendar-event.js +73 -24
- package/dist/collection/helpers/calendar/calendar-period/calendar-period.abstract.js +8 -0
- package/dist/collection/helpers/calendar/calendar-period/day-period.js +1 -0
- package/dist/collection/helpers/calendar/calendar-period/month-period.js +16 -3
- package/dist/collection/helpers/calendar/calendar-period/week-period.js +1 -0
- package/dist/collection/helpers/calendar/test/calendar-event.test.js +23 -20
- package/dist/collection/helpers/event-manager/eventID/componentEventIdMap.js +2 -2
- package/dist/collection/helpers/event-manager/eventID/vegaEventId.js +1 -1
- package/dist/collection/helpers/event-manager/eventID/vegaInternalEventId.js +1 -0
- package/dist/collection/helpers/event-manager/slimmers/childNodesEventPreventSlimmer.js +12 -0
- package/dist/collection/helpers/event-manager/test/childNodesEventPreventSlimmer.test.js +14 -0
- package/dist/collection/helpers/publicApi.js +1 -0
- package/dist/collection/helpers/skeleton-loader/tests/vega-skeleton-loader-controller.test.js +139 -0
- package/dist/collection/helpers/skeleton-loader/vega-skeleton-loader-controller.js +87 -0
- package/dist/collection/helpers/slimmers/sub-state/subStateObserverSlimmer.js +27 -13
- package/dist/collection/helpers/slimmers/sub-state/test/sub-state-observer-slimmer.test.js +15 -3
- package/dist/collection/helpers/vega-telemetry-helper/test/vegaEnvManager.test.js +1 -1
- package/dist/collection/helpers/vega-telemetry-helper/vegaEnvManager.js +2 -2
- package/dist/esm/{app-globals-cf903368.js → app-globals-ba85a900.js} +9 -2
- package/dist/esm/{childNodesEventPreventSlimmer-ca73e6c1.js → childNodesEventPreventSlimmer-d0da4527.js} +13 -1
- package/dist/esm/{eventEmitSlimmer-9c33f04e.js → eventEmitSlimmer-7b16eef9.js} +1 -1
- package/dist/esm/{formFieldControllerSlimmer-85ff874e.js → formFieldControllerSlimmer-ea050a17.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/{internalVegaEventManager-e1501923.js → internalVegaEventManager-71d00966.js} +2 -2
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{subStateObserverSlimmer-354b33f6.js → subStateObserverSlimmer-2a8a615e.js} +28 -14
- package/dist/esm/vega-accordion.entry.js +4 -4
- package/dist/esm/vega-app-header-button.entry.js +4 -4
- package/dist/esm/vega-banner.entry.js +3 -3
- package/dist/esm/vega-breadcrumb.entry.js +4 -4
- package/dist/esm/vega-button-circle.entry.js +4 -4
- package/dist/esm/vega-button-group_2.entry.js +6 -6
- package/dist/esm/vega-button-link.entry.js +4 -4
- package/dist/esm/vega-button.entry.js +59 -14
- package/dist/esm/vega-calendar_2.entry.js +830 -90
- package/dist/esm/vega-carousel.entry.js +3 -3
- package/dist/esm/vega-checkbox_2.entry.js +6 -6
- package/dist/esm/vega-chip.entry.js +4 -4
- package/dist/esm/vega-color-picker.entry.js +5 -5
- package/dist/esm/vega-combo-box.entry.js +6 -6
- package/dist/esm/vega-date-picker_2.entry.js +6 -6
- package/dist/esm/vega-dialog_2.entry.js +4 -4
- package/dist/esm/vega-dropdown_5.entry.js +310 -184
- package/dist/esm/vega-field-label.entry.js +4 -4
- package/dist/esm/vega-form.entry.js +6 -6
- package/dist/esm/vega-image-uploader.entry.js +6 -6
- package/dist/esm/vega-input-credit-card.entry.js +6 -6
- package/dist/esm/vega-input-range.entry.js +6 -6
- package/dist/esm/vega-input-select.entry.js +217 -105
- package/dist/esm/vega-input.entry.js +5 -5
- package/dist/esm/vega-item-toggle.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +4 -4
- package/dist/esm/vega-loader-wrapper_2.entry.js +1 -1
- package/dist/esm/vega-page-notification_2.entry.js +1 -1
- package/dist/esm/vega-pagination.entry.js +4 -4
- package/dist/esm/vega-popover_2.entry.js +3 -3
- package/dist/esm/vega-progress-tracker.entry.js +3 -3
- package/dist/esm/vega-radio_2.entry.js +6 -6
- package/dist/esm/vega-segment-control.entry.js +3 -3
- package/dist/esm/vega-selection-tile_2.entry.js +7 -7
- package/dist/esm/{index-dd06e5e7.js → vega-skeleton-loader-controller-778b12be.js} +91 -4
- package/dist/esm/vega-skeleton.entry.js +1 -1
- package/dist/esm/vega-stepper.entry.js +6 -6
- package/dist/esm/vega-tab-group_2.entry.js +4 -4
- package/dist/esm/vega-table_8.entry.js +6 -6
- package/dist/esm/vega-textarea.entry.js +6 -6
- package/dist/esm/vega-time-picker_2.entry.js +6 -6
- package/dist/esm/vega-toggle-switch.entry.js +3 -3
- package/dist/esm/vega.js +5 -5
- package/dist/esm/{vegaEventId-680887e1.js → vegaEventId-f279bb62.js} +2 -1
- package/dist/esm/{vegaInternalEventId-600b3751.js → vegaInternalEventId-bde5d617.js} +2 -1
- package/dist/types/components/vega-button/slimmers/renderers/vega-button-loading-renderer.d.ts +13 -0
- package/dist/types/components/vega-button/vega-button.d.ts +16 -0
- package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-current-period-controller.d.ts +12 -9
- package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-event-controller.d.ts +20 -0
- package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-view-controller.d.ts +8 -12
- package/dist/types/components/vega-calendar/slimmers/common/helpers/repeatPattern/baseRepeatPattern.d.ts +50 -0
- package/dist/types/components/vega-calendar/slimmers/common/helpers/repeatPattern/calendarEventDailyRepeatPattern.d.ts +43 -0
- package/dist/types/components/vega-calendar/slimmers/common/helpers/repeatPattern/calendarEventMonthlyRepeatPattern.d.ts +55 -0
- package/dist/types/components/vega-calendar/slimmers/common/helpers/repeatPattern/calendarEventRepeatPatternFactory.d.ts +34 -0
- package/dist/types/components/vega-calendar/slimmers/common/helpers/repeatPattern/calendarEventWeeklyRepeatPattern.d.ts +99 -0
- package/dist/types/components/vega-calendar/slimmers/common/helpers/repeatPattern/calendarEventYearlyRepeatPattern.d.ts +57 -0
- package/dist/types/components/vega-calendar/slimmers/common/helpers/test/calendarEventRepeatPatternFactory.test.d.ts +1 -0
- package/dist/types/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.d.ts +8 -0
- package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +23 -0
- package/dist/types/components/vega-calendar/types.d.ts +14 -2
- package/dist/types/components/vega-calendar/vega-calendar.d.ts +15 -3
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.d.ts +0 -1
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-children-controller.d.ts +4 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-scrollable-controller.d.ts +57 -0
- package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.d.ts +7 -17
- package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-renderer.d.ts +3 -0
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +2 -1
- package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-dropdown-controller.d.ts +2 -19
- package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-items-slot-controler.d.ts +19 -0
- package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-lazy-load-controller.d.ts +1 -1
- package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.d.ts +29 -0
- package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-value-controller.d.ts +1 -1
- package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +7 -1
- package/dist/types/components/vega-input-select/vega-input-select.d.ts +4 -2
- package/dist/types/components.d.ts +17 -1
- package/dist/types/constants/ui.d.ts +1 -1
- package/dist/types/helpers/calendar/calendar-date.d.ts +8 -0
- package/dist/types/helpers/calendar/calendar-event.d.ts +44 -2
- package/dist/types/helpers/calendar/calendar-period/calendar-period.abstract.d.ts +10 -2
- package/dist/types/helpers/calendar/calendar-period/day-period.d.ts +1 -0
- package/dist/types/helpers/calendar/calendar-period/month-period.d.ts +12 -0
- package/dist/types/helpers/calendar/calendar-period/week-period.d.ts +1 -0
- package/dist/types/helpers/event-manager/eventID/vegaEventId.d.ts +1 -1
- package/dist/types/helpers/event-manager/eventID/vegaInternalEventId.d.ts +1 -0
- package/dist/types/helpers/event-manager/slimmers/childNodesEventPreventSlimmer.d.ts +6 -0
- package/dist/types/helpers/publicApi.d.ts +1 -0
- package/dist/types/helpers/skeleton-loader/interface.d.ts +16 -0
- package/dist/types/helpers/skeleton-loader/tests/vega-skeleton-loader-controller.test.d.ts +1 -0
- package/dist/types/helpers/skeleton-loader/vega-skeleton-loader-controller.d.ts +48 -0
- package/dist/types/helpers/slimmers/sub-state/subStateObserverSlimmer.d.ts +9 -0
- package/dist/types/types/components.type.d.ts +1 -0
- package/dist/types/types/publicApi.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-692df03d.entry.js → p-0ef3d3fd.entry.js} +1 -1
- package/dist/vega/p-1080d80a.js +1 -0
- package/dist/vega/{p-6f7f9cda.entry.js → p-154a3145.entry.js} +1 -1
- package/dist/vega/{p-af72a212.entry.js → p-1bc3348e.entry.js} +1 -1
- package/dist/vega/{p-b58e2fae.entry.js → p-255aa39b.entry.js} +1 -1
- package/dist/vega/p-29654e12.entry.js +1 -0
- package/dist/vega/{p-77b39fe7.entry.js → p-2f905e6f.entry.js} +1 -1
- package/dist/vega/p-3490dd8a.entry.js +1 -0
- package/dist/vega/p-3fee5d7e.entry.js +1 -0
- package/dist/vega/p-44f4924b.js +1 -0
- package/dist/vega/p-4546cd3d.entry.js +1 -0
- package/dist/vega/p-4bc71294.entry.js +1 -0
- package/dist/vega/{p-77ff7c72.js → p-5141bcac.js} +1 -1
- package/dist/vega/{p-16608c5a.js → p-51e2c836.js} +1 -1
- package/dist/vega/{p-2bb1c1c1.entry.js → p-52bf3ce1.entry.js} +1 -1
- package/dist/vega/{p-cd05ab96.entry.js → p-5611cf4c.entry.js} +1 -1
- package/dist/vega/{p-1b3a0b54.entry.js → p-5e3f5e8e.entry.js} +1 -1
- package/dist/vega/p-642d58ff.js +1 -0
- package/dist/vega/{p-9047ee85.entry.js → p-6470d034.entry.js} +1 -1
- package/dist/vega/{p-3efc814a.entry.js → p-6877dc17.entry.js} +1 -1
- package/dist/vega/{p-1dfddf03.entry.js → p-69cf5269.entry.js} +1 -1
- package/dist/vega/{p-ceec3241.entry.js → p-70af1334.entry.js} +1 -1
- package/dist/vega/{p-f723790c.entry.js → p-7115c145.entry.js} +1 -1
- package/dist/vega/{p-de5db6c9.entry.js → p-795927c4.entry.js} +1 -1
- package/dist/vega/{p-6ad96891.entry.js → p-7c1d2dcf.entry.js} +1 -1
- package/dist/vega/p-7f9cb4c0.entry.js +1 -0
- package/dist/vega/p-82fd348b.entry.js +1 -0
- package/dist/vega/p-8543f9c3.entry.js +1 -0
- package/dist/vega/{p-d224e798.entry.js → p-8771bf66.entry.js} +1 -1
- package/dist/vega/{p-84787f59.entry.js → p-88cf7e56.entry.js} +1 -1
- package/dist/vega/{p-eb709bc0.entry.js → p-8e7d6700.entry.js} +1 -1
- package/dist/vega/p-9119ad95.entry.js +1 -0
- package/dist/vega/p-9799f3d8.entry.js +1 -0
- package/dist/vega/{p-61c96c79.entry.js → p-a6c43909.entry.js} +1 -1
- package/dist/vega/{p-e1a284b1.entry.js → p-b23ad436.entry.js} +1 -1
- package/dist/vega/{p-b708b0c2.entry.js → p-b570e6c7.entry.js} +1 -1
- package/dist/vega/{p-ba37eaad.entry.js → p-b6f68efd.entry.js} +1 -1
- package/dist/vega/{p-38a22eb3.entry.js → p-b8a47375.entry.js} +1 -1
- package/dist/vega/{p-2e59a4f1.entry.js → p-b8d45e28.entry.js} +1 -1
- package/dist/vega/{p-99c8fe92.js → p-bba06111.js} +1 -1
- package/dist/vega/{p-282648c1.entry.js → p-c1401fab.entry.js} +1 -1
- package/dist/vega/{p-a9f61d9e.entry.js → p-cafe75e8.entry.js} +1 -1
- package/dist/vega/{p-37d3b80c.entry.js → p-cf40587e.entry.js} +1 -1
- package/dist/vega/p-d126407a.js +1 -0
- package/dist/vega/{p-c849236f.entry.js → p-e373bc4d.entry.js} +1 -1
- package/dist/vega/p-eacf64be.js +1 -0
- package/dist/vega/{p-1d628d23.entry.js → p-ec4afdaa.entry.js} +1 -1
- package/dist/vega/p-f0330fcc.js +1 -0
- package/dist/vega/{p-c0ca1a1c.entry.js → p-f8a97354.entry.js} +1 -1
- package/dist/vega/{p-8c62c493.entry.js → p-f96ee751.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/vega/p-009405b6.entry.js +0 -1
- package/dist/vega/p-38b01f3f.entry.js +0 -1
- package/dist/vega/p-38d19c4f.entry.js +0 -1
- package/dist/vega/p-4d2859c9.entry.js +0 -1
- package/dist/vega/p-557516a4.entry.js +0 -1
- package/dist/vega/p-592e755b.entry.js +0 -1
- package/dist/vega/p-999e1318.js +0 -1
- package/dist/vega/p-a6cb10e8.entry.js +0 -1
- package/dist/vega/p-a9c3e9fd.js +0 -1
- package/dist/vega/p-aae8855d.js +0 -1
- package/dist/vega/p-b3056874.entry.js +0 -1
- package/dist/vega/p-c47d4933.js +0 -1
- package/dist/vega/p-d978ee2c.entry.js +0 -1
- package/dist/vega/p-eb461dad.entry.js +0 -1
- package/dist/vega/p-f1d8fd1c.js +0 -1
- package/dist/vega/p-fda33444.js +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** The above code defines an abstract class `CalendarEventBaseRepeatPattern` in TypeScript that represents a repeat pattern for calendar events. Here is a summary of what the code is doing: */
|
|
2
|
+
export class CalendarEventBaseRepeatPattern {
|
|
3
|
+
/**
|
|
4
|
+
* The constructor initializes the current date for a given date range and interval.
|
|
5
|
+
*
|
|
6
|
+
* @param {CalendarDate} repeatStartDate - The `repeatStartDate` parameter represents the starting date of a
|
|
7
|
+
* calendar event or interval. It is of type `CalendarDate`, which likely contains information such as
|
|
8
|
+
* the year, month, and day of the event.
|
|
9
|
+
* @param {number} interval - The `interval` parameter represents the frequency at which the event
|
|
10
|
+
* occurs. For example, if the interval is set to 2, it means the event occurs every 2 units of time
|
|
11
|
+
* (e.g., every 2 days, weeks, months, etc.).
|
|
12
|
+
* @param {Nullable<number>} count - The `count` parameter specifies the number of occurrences of the event. If `count`
|
|
13
|
+
* is provided, the event will repeat `count` times within the specified interval. If `count` is
|
|
14
|
+
* `null`, the event will repeat indefinitely until the `until` date is reached.
|
|
15
|
+
* @param {Nullable<CalendarDate>} until - The `until` parameter in the constructor represents a date until which the recurring
|
|
16
|
+
* event will occur. If this date is reached, the recurring event will stop.
|
|
17
|
+
*/
|
|
18
|
+
constructor(repeatStartDate, interval, count, until) {
|
|
19
|
+
this.repeatStartDate = repeatStartDate;
|
|
20
|
+
this.interval = interval;
|
|
21
|
+
this.count = count;
|
|
22
|
+
this.until = until;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The function `getRepeatSeries` retrieves a series of repeated events within a specified calendar period.
|
|
26
|
+
*
|
|
27
|
+
* @param {CalendarPeriod} period - The `period` parameter in the `getRepeatSeries` method represents
|
|
28
|
+
* a specific time period in the form of a `CalendarPeriod` object. This object typically contains a
|
|
29
|
+
* `startDate` and an `endDate`, which define the range of dates for which you want to generate repeat series.
|
|
30
|
+
* @param {number} eventSpansDays - the current repeat series cross days, default value is one
|
|
31
|
+
* @returns {CalendarDate[]} repeat start date array
|
|
32
|
+
*/
|
|
33
|
+
getRepeatSeries(period, eventSpansDays = 1) {
|
|
34
|
+
this.generateRepeatDateCacheUntilEndDate(period.endDate);
|
|
35
|
+
return this.cache.filter((item) => {
|
|
36
|
+
return this.isSeriesInPeriod(item, eventSpansDays, period);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The function `isSeriesInPeriod` checks if a series of dates falls within a specified date range.
|
|
41
|
+
*
|
|
42
|
+
* @param {CalendarDate} series - The `series` parameter represents a specific date in the form of a
|
|
43
|
+
* `CalendarDate` object.
|
|
44
|
+
* @param {number} seriesSpansDays - The `seriesSpansDays` parameter represents the number of days
|
|
45
|
+
* that the series spans. It is used to calculate the end date of the series based on the start date.
|
|
46
|
+
* @param {CalendarPeriod} period - Date period
|
|
47
|
+
* @returns {boolean} a boolean value indicating whether the given series falls within the specified date
|
|
48
|
+
* range.
|
|
49
|
+
*/
|
|
50
|
+
isSeriesInPeriod(series, seriesSpansDays, period) {
|
|
51
|
+
const seriesStart = series.toDate();
|
|
52
|
+
const seriesEnd = new Date(series.year, series.month - 1, series.date + seriesSpansDays - 1);
|
|
53
|
+
const { startDate, endDate } = period;
|
|
54
|
+
const rangeStart = startDate.toDate();
|
|
55
|
+
const rangeEnd = endDate.toDate();
|
|
56
|
+
return ((seriesStart >= rangeStart && seriesStart <= rangeEnd) ||
|
|
57
|
+
(seriesEnd >= rangeStart && seriesEnd <= rangeEnd) ||
|
|
58
|
+
(seriesStart <= rangeStart && seriesEnd >= rangeEnd));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
CalendarEventBaseRepeatPattern.daySeconds = 24 * 60 * 60 * 1000;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { CalendarDate } from '../../../../../../helpers/calendar';
|
|
2
|
+
import { CalendarEventBaseRepeatPattern } from './baseRepeatPattern';
|
|
3
|
+
/** The `CalendarEventDailyRepeatPattern` class in TypeScript represents a daily repeating pattern for calendar events. */
|
|
4
|
+
export class CalendarEventDailyRepeatPattern extends CalendarEventBaseRepeatPattern {
|
|
5
|
+
/**
|
|
6
|
+
* The constructor initializes the current date for a given date range and interval.
|
|
7
|
+
*
|
|
8
|
+
* @param {CalendarDate} startDate - The `startDate` parameter is of type `CalendarDate` and represents the starting date for a specific interval or range.
|
|
9
|
+
* @param {number} interval - The `interval` parameter represents the frequency at which the event
|
|
10
|
+
* occurs. For example, if the interval is set to 1, it means the event occurs every day. If the
|
|
11
|
+
* interval is set to 2, it means the event occurs every other day.
|
|
12
|
+
* @param {Nullable<number>} count - The `count` parameter specifies the number of occurrences of the event. If `count`
|
|
13
|
+
* is provided, the event will repeat `count` times within the specified interval. If `count` is
|
|
14
|
+
* `null`, the event will repeat indefinitely until the `until` date is reached.
|
|
15
|
+
* @param {Nullable<CalendarDate>} until - The `until` parameter in the constructor is of type `Nullable<CalendarDate>`, which
|
|
16
|
+
* means it can either accept a `CalendarDate` object or be `null`. This parameter is used to specify
|
|
17
|
+
* a date until which the recurring event should repeat. If `until` is provided, the event
|
|
18
|
+
*/
|
|
19
|
+
constructor(startDate, interval, count, until) {
|
|
20
|
+
super(startDate, interval, count, until);
|
|
21
|
+
this.initCache();
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The function generates and caches repeated dates before a specified end date.
|
|
25
|
+
*
|
|
26
|
+
* @param {CalendarDate} endDate - The `endDate` parameter represents the date until which you want to
|
|
27
|
+
* generate repeat dates in the cache. The function `generateRepeatDateCacheBeforeEndDate` is
|
|
28
|
+
* responsible for populating the cache with repeat dates until the specified `endDate`. It checks the
|
|
29
|
+
* last date in the cache and generates subsequent repeat dates until
|
|
30
|
+
*/
|
|
31
|
+
generateRepeatDateCacheUntilEndDate(endDate) {
|
|
32
|
+
const lastMatchDate = this.cache[this.cache.length - 1];
|
|
33
|
+
if (lastMatchDate.toDate() < endDate.toDate() &&
|
|
34
|
+
(!this.count || (typeof this.count === 'number' && this.cache.length < this.count))) {
|
|
35
|
+
let nextMatchDate = this.getNextRepeatStartDate(lastMatchDate);
|
|
36
|
+
while (nextMatchDate && nextMatchDate.toDate() < endDate.toDate()) {
|
|
37
|
+
nextMatchDate = this.getNextRepeatStartDate(nextMatchDate);
|
|
38
|
+
if (typeof this.count === 'number' && this.cache.length >= this.count) {
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The function `initCache` initializes a cache array with the `startDate` value.
|
|
46
|
+
*/
|
|
47
|
+
initCache() {
|
|
48
|
+
this.cache = [this.repeatStartDate];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The function getNextRepeatStartDate calculates the next repeat start date based on a given date and certain conditions.
|
|
52
|
+
*
|
|
53
|
+
* @param {CalendarDate} date - The `date` parameter represents the current date for which you want to
|
|
54
|
+
* calculate the next repeat start date. It is an instance of the `CalendarDate` class.
|
|
55
|
+
* @returns {Nullable<CalendarDate>} The function `getNextRepeatStartDate` returns either a `CalendarDate` object if certain
|
|
56
|
+
* conditions are met, or `null` if the conditions are not met.
|
|
57
|
+
*/
|
|
58
|
+
getNextRepeatStartDate(date) {
|
|
59
|
+
const nextDate = new Date(date.year, date.month - 1, date.date + this.interval);
|
|
60
|
+
const nextCalendarDate = CalendarDate.from(nextDate);
|
|
61
|
+
if ((this.until && nextDate > this.until.toDate()) ||
|
|
62
|
+
(typeof this.count === 'number' && this.cache.length >= this.count)) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
this.cache.push(nextCalendarDate);
|
|
67
|
+
return nextCalendarDate;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { CalendarDate } from '../../../../../../helpers/calendar';
|
|
2
|
+
import { CalendarEventBaseRepeatPattern } from './baseRepeatPattern';
|
|
3
|
+
/** The `CalendarEventMonthlyRepeatPattern` class in TypeScript represents a monthly repeat pattern for calendar events. */
|
|
4
|
+
export class CalendarEventMonthlyRepeatPattern extends CalendarEventBaseRepeatPattern {
|
|
5
|
+
/**
|
|
6
|
+
* The constructor initializes the event with specified start and end dates, interval, count, and until date, and sets the byMonthDay property to the start date's day.
|
|
7
|
+
*
|
|
8
|
+
* @param {CalendarDate} startDate - The `startDate` parameter represents the starting date of the
|
|
9
|
+
* event or interval. It is of type `CalendarDate`, which likely includes the year, month, and day
|
|
10
|
+
* components of the date.
|
|
11
|
+
* @param {number} interval - The `interval` parameter specifies the frequency of the recurring
|
|
12
|
+
* events. For example, if the interval is set to 2, the event will occur every 2 units of time (days,
|
|
13
|
+
* weeks, months, etc.).
|
|
14
|
+
* @param {Nullable<number>} count - The `count` parameter specifies the number of occurrences of the event. If `count`
|
|
15
|
+
* is provided, the event will repeat `count` times within the specified interval. If `count` is not
|
|
16
|
+
* provided (or is `null`), the event will repeat indefinitely based on the other parameters like `
|
|
17
|
+
* @param {Nullable<CalendarDate>} until - The `until` parameter is a nullable `CalendarDate` that specifies the end date for
|
|
18
|
+
* the recurring event. If provided, the event will repeat until this date. If not provided, the event
|
|
19
|
+
* will repeat indefinitely based on the other parameters like `count` or `endDate`.
|
|
20
|
+
*/
|
|
21
|
+
constructor(startDate, interval, count, until) {
|
|
22
|
+
super(startDate, interval, count, until);
|
|
23
|
+
this.byMonthDay = this.repeatStartDate.date;
|
|
24
|
+
this.initCache();
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* This function generates and caches repeated dates before a specified end date.
|
|
28
|
+
*
|
|
29
|
+
* @param {CalendarDate} endDate - The `endDate` parameter in the
|
|
30
|
+
* `generateRepeatDateCacheUntilEndDate` function is a CalendarDate object that represents the end
|
|
31
|
+
* date until which the repeat dates need to be generated and cached. The function checks if the last
|
|
32
|
+
* cached date is before the `endDate` and generates additional repeat dates until it reaches
|
|
33
|
+
*/
|
|
34
|
+
generateRepeatDateCacheUntilEndDate(endDate) {
|
|
35
|
+
const lastMatchDate = this.cache[this.cache.length - 1];
|
|
36
|
+
if (lastMatchDate.toDate() < endDate.toDate() &&
|
|
37
|
+
(!this.count || (typeof this.count === 'number' && this.cache.length < this.count))) {
|
|
38
|
+
let nextMatchDate = this.getNextRepeatStartDate(lastMatchDate);
|
|
39
|
+
while (nextMatchDate && nextMatchDate.toDate() < endDate.toDate()) {
|
|
40
|
+
nextMatchDate = this.getNextRepeatStartDate(nextMatchDate);
|
|
41
|
+
if (typeof this.count === 'number' && this.cache.length >= this.count) {
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The function `initCache` initializes a cache array with the startDate value.
|
|
49
|
+
*/
|
|
50
|
+
initCache() {
|
|
51
|
+
this.cache = [this.repeatStartDate];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The getNextRepeatStartDate function calculates the next start date based on a given date and interval, considering constraints such as end date and count limit.
|
|
55
|
+
*
|
|
56
|
+
* @param {CalendarDate} date - The `date` parameter represents the current date for which you want to
|
|
57
|
+
* calculate the next repeat start date. It is of type `CalendarDate`.
|
|
58
|
+
* @returns {Nullable<CalendarDate>} The function `getNextRepeatStartDate` returns a nullable `CalendarDate`. It either returns
|
|
59
|
+
* the next calculated `CalendarDate` based on the input date and interval, or it returns `null` if
|
|
60
|
+
* certain conditions are met (such as reaching the specified end date or count limit).
|
|
61
|
+
*/
|
|
62
|
+
getNextRepeatStartDate(date) {
|
|
63
|
+
const nextDate = this.getNextStartDate(date.year, date.month - 1 + this.interval);
|
|
64
|
+
const nextCalendarDate = CalendarDate.from(nextDate);
|
|
65
|
+
if ((this.until && nextDate > this.until.toDate()) ||
|
|
66
|
+
(typeof this.count === 'number' && this.cache.length >= this.count)) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.cache.push(nextCalendarDate);
|
|
71
|
+
return nextCalendarDate;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* get the new date with fixed date, if the date.getDate() not equal the fixed date, find the next month
|
|
76
|
+
*
|
|
77
|
+
* @param {number} year year
|
|
78
|
+
* @param {number} month month
|
|
79
|
+
* @returns {Date} the new date
|
|
80
|
+
*/
|
|
81
|
+
getNextStartDate(year, month) {
|
|
82
|
+
const nextDate = new Date(year, month, this.byMonthDay);
|
|
83
|
+
if (nextDate.getDate() === this.byMonthDay) {
|
|
84
|
+
return nextDate;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
return this.getNextStartDate(year, month + 1);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { CalendarDate } from '../../../../../../helpers/calendar';
|
|
2
|
+
import { CalendarEventDailyRepeatPattern } from '../repeatPattern/calendarEventDailyRepeatPattern';
|
|
3
|
+
import { CalendarEventMonthlyRepeatPattern } from '../repeatPattern/calendarEventMonthlyRepeatPattern';
|
|
4
|
+
import { CalendarEventWeeklyRepeatPattern } from '../repeatPattern/calendarEventWeeklyRepeatPattern';
|
|
5
|
+
import { CalendarEventYearlyRepeatPattern } from '../repeatPattern/calendarEventYearlyRepeatPattern';
|
|
6
|
+
/** This code snippet defines a TypeScript class `CalendarEventRepeatPatternFactory` that serves as a factory for creating different types of repeat patterns for calendar events. Here's a breakdown of what the class and its methods are doing: */
|
|
7
|
+
class CalendarEventRepeatPatternFactory {
|
|
8
|
+
/**
|
|
9
|
+
* This `getPattern` method within the `CalendarEventRepeatPatternFactory` class is a public method that is responsible for creating and returning a specific type of repeat pattern for a calendar event based on the input parameters provided. Here's a breakdown of what this method is doing:
|
|
10
|
+
*
|
|
11
|
+
* @param {Date} startDate repeat start date
|
|
12
|
+
* @param {VegaCalendarEventRepeatOptions|undefined} repeatOptions repeat options
|
|
13
|
+
* @returns {CalendarEventBaseRepeatPattern} the match repeat pattern
|
|
14
|
+
*/
|
|
15
|
+
getPattern(startDate, repeatOptions) {
|
|
16
|
+
const repeatStartDate = CalendarDate.from(startDate);
|
|
17
|
+
const { frequency, interval = 1, byWeekDay, until, count, } = repeatOptions;
|
|
18
|
+
const repeatEndDate = this.initDate(until);
|
|
19
|
+
return this.initRepeatPattern(frequency, repeatStartDate, interval < 1 ? 1 : interval, count, repeatEndDate, byWeekDay);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The `initDate` function initializes a `CalendarDate` object based on the input date string or Date object provided.
|
|
23
|
+
*
|
|
24
|
+
* @param {Nullable<string | Date>} date - The `date` parameter can be either a string or a Date object.
|
|
25
|
+
* @returns {Nullable<CalendarDate>} The function `initDate` returns a `Nullable<CalendarDate>`, which means it can return either a `CalendarDate` object or `null`.
|
|
26
|
+
*/
|
|
27
|
+
initDate(date) {
|
|
28
|
+
if (date && typeof date === 'object') {
|
|
29
|
+
return CalendarDate.from(date);
|
|
30
|
+
}
|
|
31
|
+
else if (date && typeof date === 'string') {
|
|
32
|
+
const [month, day, year] = date.split('/');
|
|
33
|
+
return new CalendarDate(Number(year), Number(month), Number(day));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The function `initRepeatPattern` initializes a repeat pattern based on the frequency specified for a calendar event.
|
|
38
|
+
*
|
|
39
|
+
* @param {VegaCalendarEventRepeatType} frequency event frequency
|
|
40
|
+
* @param {CalendarDate} repeatStartDate event start date
|
|
41
|
+
* @param {number} interval event repeat interval
|
|
42
|
+
* @param {Nullable<number>} count the event repeat count
|
|
43
|
+
* @param {Nullable<CalendarDate>} repeatEndDate repeat end date
|
|
44
|
+
* @param {Nullable<VegaCalendarWeekDayType[]>} byWeekDay weekly week days
|
|
45
|
+
* @returns {CalendarEventBaseRepeatPattern} calendar event repeat pattern instance
|
|
46
|
+
*/
|
|
47
|
+
initRepeatPattern(frequency, repeatStartDate, interval, count, repeatEndDate, byWeekDay) {
|
|
48
|
+
switch (frequency) {
|
|
49
|
+
case 'daily':
|
|
50
|
+
return new CalendarEventDailyRepeatPattern(repeatStartDate, interval, count, repeatEndDate);
|
|
51
|
+
case 'weekly':
|
|
52
|
+
return new CalendarEventWeeklyRepeatPattern(repeatStartDate, interval, count, repeatEndDate, byWeekDay);
|
|
53
|
+
case 'monthly':
|
|
54
|
+
return new CalendarEventMonthlyRepeatPattern(repeatStartDate, interval, count, repeatEndDate);
|
|
55
|
+
default:
|
|
56
|
+
return new CalendarEventYearlyRepeatPattern(repeatStartDate, interval, count, repeatEndDate);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export default new CalendarEventRepeatPatternFactory();
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { CalendarDate } from '../../../../../../helpers/calendar';
|
|
2
|
+
import { flatNestedArray } from '../../../../../../utils/array';
|
|
3
|
+
import { CalendarEventBaseRepeatPattern } from './baseRepeatPattern';
|
|
4
|
+
/** The `CalendarEventWeeklyRepeatPattern` class in TypeScript represents a weekly repeat pattern for calendar events, allowing for matching dates based on specific weekdays and generating future dates with optional constraints. */
|
|
5
|
+
export class CalendarEventWeeklyRepeatPattern extends CalendarEventBaseRepeatPattern {
|
|
6
|
+
/**
|
|
7
|
+
* This TypeScript constructor initializes a calendar date range with specified parameters including start date, end date, interval, count, until date, and an array of week days.
|
|
8
|
+
*
|
|
9
|
+
* @param {CalendarDate} startDate - The `startDate` parameter represents the starting date of the
|
|
10
|
+
* calendar event or schedule. It is of type `CalendarDate`, which likely includes the year, month, and day components of a date.
|
|
11
|
+
* @param {number} interval - The `interval` parameter represents the frequency of the recurrence. For
|
|
12
|
+
* example, if `interval` is set to 1, the event will occur every week. If it's set to 2, the event
|
|
13
|
+
* will occur every two weeks.
|
|
14
|
+
* @param {Nullable<number>} count - The `count` parameter specifies the number of occurrences of the rule. If `count` is
|
|
15
|
+
* provided, the recurrence will generate at most that many occurrences. If `count` is not provided,
|
|
16
|
+
* the recurrence will continue indefinitely based on other parameters like `endDate` or `until`.
|
|
17
|
+
* @param {Nullable<CalendarDate>} until - The `until` parameter specifies the end date for the recurrence rule. If provided,
|
|
18
|
+
* the recurrence will continue until this date. If not provided, the recurrence will continue
|
|
19
|
+
* indefinitely based on other parameters like `count` or `interval`.
|
|
20
|
+
* @param {Nullable<VegaCalendarWeekDayType[]>} byWeekDay - The `byWeekDay` parameter is an array of
|
|
21
|
+
* `VegaCalendarWeekDayType` values, which represent the days of the week for which the event should occur.
|
|
22
|
+
*/
|
|
23
|
+
constructor(startDate, interval, count, until, byWeekDay) {
|
|
24
|
+
super(startDate, interval, count, until);
|
|
25
|
+
this.byWeekDay = this.sortWeekDay(byWeekDay);
|
|
26
|
+
this.initCache();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The function `getRepeatSeries` retrieves a series of repeated events within a specified calendar period.
|
|
30
|
+
*
|
|
31
|
+
* @param {CalendarPeriod} period - The `period` parameter in the `getRepeatSeries` method represents
|
|
32
|
+
* a specific time period in the form of a `CalendarPeriod` object. This object typically contains a
|
|
33
|
+
* `startDate` and an `endDate`, which define the range of dates for which you want to generate repeat series.
|
|
34
|
+
* @param {number} eventSpansDays - the current repeat series cross days, default value is one
|
|
35
|
+
* @returns {CalendarDate[]} repeat start date array
|
|
36
|
+
*/
|
|
37
|
+
getRepeatSeries(period, eventSpansDays = 1) {
|
|
38
|
+
this.generateRepeatDateCacheUntilEndDate(period.endDate);
|
|
39
|
+
return this.getValidCache().filter((item) => {
|
|
40
|
+
return this.isSeriesInPeriod(item, eventSpansDays, period);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* This function generates repeated dates and caches them until a specified end date.
|
|
45
|
+
*
|
|
46
|
+
* @param {CalendarDate} endDate - The `endDate` parameter is a `CalendarDate` object that represents
|
|
47
|
+
* the date until which the repeat date cache needs to be generated. The function
|
|
48
|
+
* `generateRepeatDateCacheUntilEndDate` generates repeat dates until this specified end date.
|
|
49
|
+
*/
|
|
50
|
+
generateRepeatDateCacheUntilEndDate(endDate) {
|
|
51
|
+
const lastMatchDate = this.cache[this.cache.length - 1];
|
|
52
|
+
if (lastMatchDate[0].toDate() < endDate.toDate() &&
|
|
53
|
+
(!this.count || (typeof this.count === 'number' && this.cache.length < this.count))) {
|
|
54
|
+
let nextMatchDate = this.getNextRepeatStartDate(lastMatchDate);
|
|
55
|
+
while (nextMatchDate && nextMatchDate[0].toDate() < endDate.toDate()) {
|
|
56
|
+
nextMatchDate = this.getNextRepeatStartDate(nextMatchDate);
|
|
57
|
+
if (typeof this.count === 'number' && this.getValidCache().length >= this.count) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The function getNextRepeatStartDate calculates the next start dates based on a given array of CalendarDate objects and returns them if certain conditions are met.
|
|
65
|
+
*
|
|
66
|
+
* @param {CalendarDate[]} dates - The `dates` parameter is an array of `CalendarDate` objects.
|
|
67
|
+
* @returns {Nullable<CalendarDate[]>} The `getNextRepeatStartDate` function returns a nullable array of `CalendarDate` objects.
|
|
68
|
+
* If there are no next dates available or if the cache count exceeds a specified limit, it returns
|
|
69
|
+
* `null`. Otherwise, it returns an array of `CalendarDate` objects representing the next start dates.
|
|
70
|
+
*/
|
|
71
|
+
getNextRepeatStartDate(dates) {
|
|
72
|
+
const nextDate = this.getNextStartDates(dates);
|
|
73
|
+
if (nextDate.length === 0 ||
|
|
74
|
+
(typeof this.count === 'number' && this.getValidCache().length >= this.count)) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
const nextCalendarDates = nextDate.map((item) => CalendarDate.from(item));
|
|
79
|
+
this.cache.push(nextCalendarDates);
|
|
80
|
+
return nextCalendarDates;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The function `getNextStartDates` takes an array of `CalendarDate` objects, calculates the next dates based on a specified interval, and filters out dates that are after a specified end date.
|
|
85
|
+
*
|
|
86
|
+
* @param {CalendarDate[]} dates - The `dates` parameter is an array of `CalendarDate` objects
|
|
87
|
+
* representing specific dates in a calendar. Each `CalendarDate` object has properties for the year,
|
|
88
|
+
* month, and date.
|
|
89
|
+
* @returns {Date[]} The `getNextStartDates` function returns an array of `Date` objects representing the next
|
|
90
|
+
* start dates based on the input `CalendarDate` array. The function calculates the next start dates
|
|
91
|
+
* by adding a specific interval (multiplied by 7 to represent weeks) to each date in the input array.
|
|
92
|
+
* Finally, it filters out any dates that are after a specified `until` date, if provided.
|
|
93
|
+
*/
|
|
94
|
+
getNextStartDates(dates) {
|
|
95
|
+
const nextDates = dates.map((dateItem) => new Date(dateItem.year, dateItem.month - 1, dateItem.date + this.interval * 7));
|
|
96
|
+
return nextDates.filter((item) => !this.until || item <= this.until.toDate());
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The `initCache` function initializes a cache of calendar dates based on the start date and weekly repeat pattern.
|
|
100
|
+
*/
|
|
101
|
+
initCache() {
|
|
102
|
+
const result = [];
|
|
103
|
+
const currentWeekDayIndex = this.getCurrentDayIndex(this.repeatStartDate);
|
|
104
|
+
this.byWeekDay.forEach((day) => {
|
|
105
|
+
const index = CalendarEventWeeklyRepeatPattern.weekDay.indexOf(day);
|
|
106
|
+
const days = index - currentWeekDayIndex;
|
|
107
|
+
const { year, month, date } = this.repeatStartDate;
|
|
108
|
+
const dateItem = CalendarDate.from(new Date(year, month - 1, date + days));
|
|
109
|
+
result.push(dateItem);
|
|
110
|
+
});
|
|
111
|
+
this.cache = [result];
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The function `sortWeekDay` sorts an array of week days based on their position in a predefined list.
|
|
115
|
+
*
|
|
116
|
+
* @param {boolean} weekDay - The `weekDay` parameter is an array of week day values that need to be sorted in a
|
|
117
|
+
* specific order. The function `sortWeekDay` takes this array and sorts it based on a predefined
|
|
118
|
+
* order specified in `CalendarEventWeeklyRepeatPattern.weekDay`.
|
|
119
|
+
* @returns {VegaCalendarWeekDayType[]} The `sortWeekDay` function is returning the `weekDay` array sorted based on the index of
|
|
120
|
+
* each `VegaCalendarWeekDayType` item in the `CalendarEventWeeklyRepeatPattern.weekDay` array.
|
|
121
|
+
*/
|
|
122
|
+
sortWeekDay(weekDay) {
|
|
123
|
+
if (weekDay && weekDay.length) {
|
|
124
|
+
return weekDay
|
|
125
|
+
.map((item) => item.toLocaleLowerCase())
|
|
126
|
+
.sort((itemA, itemB) => {
|
|
127
|
+
return (CalendarEventWeeklyRepeatPattern.weekDay.indexOf(itemA) -
|
|
128
|
+
CalendarEventWeeklyRepeatPattern.weekDay.indexOf(itemB));
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
return [CalendarEventWeeklyRepeatPattern.weekDay[this.getCurrentDayIndex(this.repeatStartDate)]];
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* This function returns the index of the current day in a week, with Sunday represented as 0.
|
|
137
|
+
*
|
|
138
|
+
* @param {CalendarDate} date - The `date` parameter in the `getCurrentDayIndex` function is of type
|
|
139
|
+
* `CalendarDate`, which is a custom data type representing a date in a calendar.
|
|
140
|
+
* @returns {number} The function `getCurrentDayIndex` returns the index of the current day in the week, with
|
|
141
|
+
* Sunday being represented as 0 and Saturday being represented as 6.
|
|
142
|
+
*/
|
|
143
|
+
getCurrentDayIndex(date) {
|
|
144
|
+
return date.toDate().getDay();
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* The function `getValidCache` returns a filtered and concatenated array of CalendarDate objects from the cache based on a start date.
|
|
148
|
+
*
|
|
149
|
+
* @returns {CalendarDate[]} The `getValidCache` method returns an array of `CalendarDate` objects that meet the
|
|
150
|
+
* condition of having a date greater than or equal to the `startDate` property. The method first
|
|
151
|
+
* flattens a nested array of `CalendarDate` objects stored in the `cache` property, then filters out
|
|
152
|
+
* the `CalendarDate` objects that do not meet the condition, and finally concatenates the filtered
|
|
153
|
+
* array
|
|
154
|
+
*/
|
|
155
|
+
getValidCache() {
|
|
156
|
+
const flatArr = flatNestedArray(this.cache.slice(1));
|
|
157
|
+
return this.cache[0]
|
|
158
|
+
.filter((item) => item.toDate() >= this.repeatStartDate.toDate())
|
|
159
|
+
.concat(flatArr)
|
|
160
|
+
.slice(0, typeof this.count === 'number' ? this.count : undefined);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
CalendarEventWeeklyRepeatPattern.weekDay = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'].map((item) => item.toLowerCase());
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { CalendarDate } from '../../../../../../helpers/calendar';
|
|
2
|
+
import { CalendarEventBaseRepeatPattern } from './baseRepeatPattern';
|
|
3
|
+
/** The `CalendarEventYearlyRepeatPattern` class defines a yearly repeat pattern for calendar events, checking for matches and generating future dates based on specified criteria. */
|
|
4
|
+
export class CalendarEventYearlyRepeatPattern extends CalendarEventBaseRepeatPattern {
|
|
5
|
+
/**
|
|
6
|
+
* The constructor initializes a new instance with specified start and end dates, interval, count, and until date.
|
|
7
|
+
*
|
|
8
|
+
* @param {CalendarDate} startDate - The `startDate` parameter is of type `CalendarDate` and
|
|
9
|
+
* represents the starting date of a calendar event or interval.
|
|
10
|
+
* @param {number} interval - The `interval` parameter represents the frequency at which the event
|
|
11
|
+
* occurs. For example, if the interval is set to 2, the event will occur every 2 units of time (days,
|
|
12
|
+
* weeks, months, etc.).
|
|
13
|
+
* @param {Nullable<number>} count - The `count` parameter specifies the number of occurrences of the event. If `count`
|
|
14
|
+
* is provided, the event will repeat `count` times within the specified interval. If `count` is not
|
|
15
|
+
* provided, the event will repeat indefinitely based on the other parameters like `endDate` or
|
|
16
|
+
* `until`.
|
|
17
|
+
* @param {Nullable<CalendarDate>} until - The `until` parameter in the constructor is of type `Nullable<CalendarDate>`. This
|
|
18
|
+
* means that it can either accept a `CalendarDate` object or be `null`. It is used to specify a date
|
|
19
|
+
* until which the recurring event should repeat. If `until` is provided, the event
|
|
20
|
+
*/
|
|
21
|
+
constructor(startDate, interval, count, until) {
|
|
22
|
+
super(startDate, interval, count, until);
|
|
23
|
+
this.matchDay = this.repeatStartDate.date;
|
|
24
|
+
this.matchMonth = this.repeatStartDate.month;
|
|
25
|
+
this.initCache();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The function generates repeat dates and caches them until reaching the specified end date.
|
|
29
|
+
*
|
|
30
|
+
* @param {CalendarDate} endDate - The `endDate` parameter in the
|
|
31
|
+
* `generateRepeatDateCacheUntilEndDate` function is a CalendarDate object that represents the date
|
|
32
|
+
* until which the repeat date cache should be generated. The function checks if the last date in the
|
|
33
|
+
* cache is before the `endDate`, and if so, it generates additional repeat dates
|
|
34
|
+
*/
|
|
35
|
+
generateRepeatDateCacheUntilEndDate(endDate) {
|
|
36
|
+
const lastMatchDate = this.cache[this.cache.length - 1];
|
|
37
|
+
if (lastMatchDate.toDate() < endDate.toDate() &&
|
|
38
|
+
(!this.count || (typeof this.count === 'number' && this.cache.length < this.count))) {
|
|
39
|
+
let nextMatchDate = this.getNextRepeatStartDate(lastMatchDate);
|
|
40
|
+
while (nextMatchDate && nextMatchDate.toDate() < endDate.toDate()) {
|
|
41
|
+
nextMatchDate = this.getNextRepeatStartDate(nextMatchDate);
|
|
42
|
+
if (typeof this.count === 'number' && this.cache.length >= this.count) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The function getNextRepeatStartDate calculates the next repeat start date based on a given date and certain conditions.
|
|
50
|
+
*
|
|
51
|
+
* @param {CalendarDate} date - The `date` parameter represents the current date for which you want to
|
|
52
|
+
* calculate the next repeat start date. It is of type `CalendarDate`, which seems to be a custom
|
|
53
|
+
* class or structure that holds year, month, and day information.
|
|
54
|
+
* @returns {Nullable<CalendarDate>} The function `getNextRepeatStartDate` returns either a `CalendarDate` object or `null`
|
|
55
|
+
* based on certain conditions. If the next date exceeds the `until` date or the count limit has been
|
|
56
|
+
* reached, it returns `null`. Otherwise, it adds the next date to the cache and returns it as a
|
|
57
|
+
* `CalendarDate`.
|
|
58
|
+
*/
|
|
59
|
+
getNextRepeatStartDate(date) {
|
|
60
|
+
const nextDate = this.getNextStartDate(date.year + this.interval);
|
|
61
|
+
const nextCalendarDate = CalendarDate.from(nextDate);
|
|
62
|
+
if ((this.until && nextDate > this.until.toDate()) ||
|
|
63
|
+
(typeof this.count === 'number' && this.cache.length >= this.count)) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.cache.push(nextCalendarDate);
|
|
68
|
+
return nextCalendarDate;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* get the new date with fixed month and fixed date, if the date.getDate() not equal the fixed date or fixed month, find the next year
|
|
73
|
+
*
|
|
74
|
+
* @param {number} year year
|
|
75
|
+
* @returns {Date} the new date
|
|
76
|
+
*/
|
|
77
|
+
getNextStartDate(year) {
|
|
78
|
+
const nextDate = new Date(year, this.matchMonth - 1, this.matchDay);
|
|
79
|
+
if (nextDate.getDate() === this.matchDay && nextDate.getMonth() + 1 === this.matchMonth) {
|
|
80
|
+
return nextDate;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return this.getNextStartDate(year + 1);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The function `initCache` initializes a cache array with the `startDate` value.
|
|
88
|
+
*/
|
|
89
|
+
initCache() {
|
|
90
|
+
this.cache = [this.repeatStartDate];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { CalendarDate, DayPeriod, MonthPeriod } from '../../../../../../helpers/calendar';
|
|
2
|
+
import calendarEventRepeatPatternFactory from '../repeatPattern/calendarEventRepeatPatternFactory';
|
|
3
|
+
import { CalendarEventDailyRepeatPattern } from '../repeatPattern/calendarEventDailyRepeatPattern';
|
|
4
|
+
import { CalendarEventMonthlyRepeatPattern } from '../repeatPattern/calendarEventMonthlyRepeatPattern';
|
|
5
|
+
import { CalendarEventWeeklyRepeatPattern } from '../repeatPattern/calendarEventWeeklyRepeatPattern';
|
|
6
|
+
import { CalendarEventYearlyRepeatPattern } from '../repeatPattern/calendarEventYearlyRepeatPattern';
|
|
7
|
+
const dailyRepeatOptions = {
|
|
8
|
+
frequency: 'daily',
|
|
9
|
+
interval: 1,
|
|
10
|
+
until: '01/02/2024',
|
|
11
|
+
};
|
|
12
|
+
const weeklyRepeatOptions = {
|
|
13
|
+
frequency: 'weekly',
|
|
14
|
+
interval: 1,
|
|
15
|
+
count: 2,
|
|
16
|
+
byWeekDay: ['Mon', 'Wed'],
|
|
17
|
+
};
|
|
18
|
+
const monthlyRepeatOptions = {
|
|
19
|
+
frequency: 'monthly',
|
|
20
|
+
interval: 1,
|
|
21
|
+
count: 2,
|
|
22
|
+
};
|
|
23
|
+
const yearlyRepeatOptions = {
|
|
24
|
+
frequency: 'yearly',
|
|
25
|
+
interval: 1,
|
|
26
|
+
count: 2,
|
|
27
|
+
};
|
|
28
|
+
describe('calendarEventRepeatPatternFactory', () => {
|
|
29
|
+
it('calendarEventRepeatPatternFactory#dailyPattern', () => {
|
|
30
|
+
const pattern = calendarEventRepeatPatternFactory.getPattern(new Date(2024, 0, 1), dailyRepeatOptions);
|
|
31
|
+
expect(pattern instanceof CalendarEventDailyRepeatPattern).toBeTruthy();
|
|
32
|
+
const result = pattern.getRepeatSeries(new MonthPeriod(new CalendarDate(2024, 1, 1)));
|
|
33
|
+
expect(result.length).toEqual(2);
|
|
34
|
+
expect(result[0].date).toEqual(1);
|
|
35
|
+
expect(result[1].date).toEqual(2);
|
|
36
|
+
});
|
|
37
|
+
it('calendarEventRepeatPatternFactory#dailyPattern in default options', () => {
|
|
38
|
+
const pattern = calendarEventRepeatPatternFactory.getPattern(new Date(2024, 0, 1), { frequency: 'daily' });
|
|
39
|
+
expect(pattern instanceof CalendarEventDailyRepeatPattern).toBeTruthy();
|
|
40
|
+
expect(pattern['interval']).toEqual(1);
|
|
41
|
+
});
|
|
42
|
+
it('calendarEventRepeatPatternFactory#dailyPattern interval set to zero', () => {
|
|
43
|
+
const pattern = calendarEventRepeatPatternFactory.getPattern(new Date(2024, 0, 1), { frequency: 'daily', interval: 0 });
|
|
44
|
+
expect(pattern instanceof CalendarEventDailyRepeatPattern).toBeTruthy();
|
|
45
|
+
expect(pattern['interval']).toEqual(1);
|
|
46
|
+
});
|
|
47
|
+
it('calendarEventRepeatPatternFactory#weeklyPattern', () => {
|
|
48
|
+
const pattern = calendarEventRepeatPatternFactory.getPattern(new Date(2024, 0, 1), weeklyRepeatOptions);
|
|
49
|
+
expect(pattern instanceof CalendarEventWeeklyRepeatPattern).toBeTruthy();
|
|
50
|
+
const result = pattern.getRepeatSeries(new MonthPeriod(new CalendarDate(2024, 1, 1)));
|
|
51
|
+
expect(result.length).toEqual(2);
|
|
52
|
+
expect(result[0].date).toEqual(1);
|
|
53
|
+
expect(result[1].date).toEqual(3);
|
|
54
|
+
});
|
|
55
|
+
it('calendarEventRepeatPatternFactory#weeklyPattern', () => {
|
|
56
|
+
const pattern = calendarEventRepeatPatternFactory.getPattern(new Date(2024, 0, 1), {
|
|
57
|
+
frequency: 'weekly',
|
|
58
|
+
interval: 1,
|
|
59
|
+
});
|
|
60
|
+
expect(pattern instanceof CalendarEventWeeklyRepeatPattern).toBeTruthy();
|
|
61
|
+
expect(pattern['byWeekDay']).toEqual(['Mon'.toLowerCase()]);
|
|
62
|
+
});
|
|
63
|
+
it('calendarEventRepeatPatternFactory#monthlyPattern', () => {
|
|
64
|
+
const pattern = calendarEventRepeatPatternFactory.getPattern(new Date(2024, 0, 1), Object.assign(Object.assign({}, monthlyRepeatOptions), { interval: 2 }));
|
|
65
|
+
expect(pattern instanceof CalendarEventMonthlyRepeatPattern).toBeTruthy();
|
|
66
|
+
const result = pattern.getRepeatSeries(new MonthPeriod(new CalendarDate(2024, 1, 1)), 2);
|
|
67
|
+
expect(result.length).toEqual(1);
|
|
68
|
+
expect(result[0]).toEqual(new CalendarDate(2024, 1, 1));
|
|
69
|
+
});
|
|
70
|
+
it('calendarEventRepeatPatternFactory#yearlyPattern', () => {
|
|
71
|
+
const pattern = calendarEventRepeatPatternFactory.getPattern(new Date(2024, 0, 1), yearlyRepeatOptions);
|
|
72
|
+
expect(pattern instanceof CalendarEventYearlyRepeatPattern).toBeTruthy();
|
|
73
|
+
const result = pattern.getRepeatSeries(new MonthPeriod(new CalendarDate(2024, 1, 1)), 2);
|
|
74
|
+
expect(result.length).toEqual(1);
|
|
75
|
+
expect(result[0]).toEqual(new CalendarDate(2024, 1, 1));
|
|
76
|
+
});
|
|
77
|
+
it('calendarEventRepeatPatternFactory#yearlyPattern getRepeatSeries', () => {
|
|
78
|
+
const pattern = calendarEventRepeatPatternFactory.getPattern(new Date(2024, 6, 1), { frequency: 'weekly', interval: 1, until: '07/08/2024' });
|
|
79
|
+
expect(pattern.getRepeatSeries(new MonthPeriod(new CalendarDate(2024, 7, 1)), 2)).toEqual([
|
|
80
|
+
CalendarDate.from(new Date(2024, 6, 1)),
|
|
81
|
+
CalendarDate.from(new Date(2024, 6, 8)),
|
|
82
|
+
]);
|
|
83
|
+
});
|
|
84
|
+
it('calendarEventRepeatPatternFactory#dailyPattern getRepeatSeries', () => {
|
|
85
|
+
const pattern = calendarEventRepeatPatternFactory.getPattern(new Date(2024, 5, 30), { frequency: 'daily', interval: 3, until: '07/12/2024' });
|
|
86
|
+
expect(pattern.getRepeatSeries(new MonthPeriod(new CalendarDate(2024, 7, 1)), 2)).toEqual([
|
|
87
|
+
CalendarDate.from(new Date(2024, 5, 30)),
|
|
88
|
+
CalendarDate.from(new Date(2024, 6, 3)),
|
|
89
|
+
CalendarDate.from(new Date(2024, 6, 6)),
|
|
90
|
+
CalendarDate.from(new Date(2024, 6, 9)),
|
|
91
|
+
CalendarDate.from(new Date(2024, 6, 12)),
|
|
92
|
+
]);
|
|
93
|
+
});
|
|
94
|
+
it('calendarEventRepeatPatternFactory#dailyPattern isSeriesInPeriod monthPeriod', () => {
|
|
95
|
+
const pattern = calendarEventRepeatPatternFactory.getPattern(new Date(2024, 6, 27), { frequency: 'monthly', interval: 1, count: 2 });
|
|
96
|
+
const monthPeriod = new MonthPeriod(new CalendarDate(2024, 8, 1));
|
|
97
|
+
expect(pattern['isSeriesInPeriod'](new CalendarDate(2024, 7, 27), 3, monthPeriod)).toBeTruthy();
|
|
98
|
+
expect(pattern['isSeriesInPeriod'](new CalendarDate(2024, 8, 27), 3, monthPeriod)).toBeTruthy();
|
|
99
|
+
});
|
|
100
|
+
it('calendarEventRepeatPatternFactory#dailyPattern isSeriesInPeriod dayPeriod', () => {
|
|
101
|
+
const pattern = calendarEventRepeatPatternFactory.getPattern(new Date(2024, 6, 31), { frequency: 'monthly', interval: 1, count: 2 });
|
|
102
|
+
const dayPeriod = new DayPeriod(new CalendarDate(2024, 8, 1));
|
|
103
|
+
expect(pattern['isSeriesInPeriod'](new CalendarDate(2024, 7, 31), 3, dayPeriod)).toBeTruthy();
|
|
104
|
+
});
|
|
105
|
+
});
|