@accelint/design-toolkit 9.9.2 → 9.11.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/catalog-info.yaml +3 -3
- package/dist/components/accordion/context.d.ts +3 -3
- package/dist/components/accordion/context.js.map +1 -1
- package/dist/components/accordion/group.d.ts +2 -2
- package/dist/components/accordion/group.js +2 -1
- package/dist/components/accordion/group.js.map +1 -1
- package/dist/components/accordion/header.d.ts +2 -2
- package/dist/components/accordion/header.js +2 -1
- package/dist/components/accordion/header.js.map +1 -1
- package/dist/components/accordion/index.d.ts +2 -2
- package/dist/components/accordion/index.js +3 -1
- package/dist/components/accordion/index.js.map +1 -1
- package/dist/components/accordion/panel.d.ts +2 -2
- package/dist/components/accordion/panel.js +2 -1
- package/dist/components/accordion/panel.js.map +1 -1
- package/dist/components/accordion/styles.module.css +19 -3
- package/dist/components/accordion/trigger.d.ts +2 -2
- package/dist/components/accordion/trigger.js +4 -3
- package/dist/components/accordion/trigger.js.map +1 -1
- package/dist/components/accordion/types.d.ts +3 -1
- package/dist/components/action-bar/index.d.ts +2 -2
- package/dist/components/action-bar/index.js +1 -1
- package/dist/components/action-bar/index.js.map +1 -1
- package/dist/components/audio/index.d.ts +2 -2
- package/dist/components/avatar/context.d.ts +5 -5
- package/dist/components/avatar/context.js.map +1 -1
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/badge/context.d.ts +5 -5
- package/dist/components/badge/context.js.map +1 -1
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/breadcrumbs/index.d.ts +3 -3
- package/dist/components/breadcrumbs/index.js +1 -1
- package/dist/components/breadcrumbs/index.js.map +1 -1
- package/dist/components/breadcrumbs/item.d.ts +2 -2
- package/dist/components/breadcrumbs/item.js +3 -1
- package/dist/components/breadcrumbs/item.js.map +1 -1
- package/dist/components/breadcrumbs/types.d.ts +2 -1
- package/dist/components/button/__internal__/clear.js +2 -1
- package/dist/components/button/__internal__/clear.js.map +1 -1
- package/dist/components/button/context.d.ts +10 -10
- package/dist/components/button/context.js.map +1 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.js +3 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button/link.d.ts +2 -2
- package/dist/components/button/link.js +3 -1
- package/dist/components/button/link.js.map +1 -1
- package/dist/components/button/styles.module.css +16 -0
- package/dist/components/button/toggle.d.ts +2 -2
- package/dist/components/button/toggle.js +3 -1
- package/dist/components/button/toggle.js.map +1 -1
- package/dist/components/button/types.d.ts +3 -1
- package/dist/components/carousel/context.d.ts +40 -0
- package/dist/components/carousel/context.js +55 -0
- package/dist/components/carousel/context.js.map +1 -0
- package/dist/components/carousel/gallery.d.ts +38 -0
- package/dist/components/carousel/gallery.js +84 -0
- package/dist/components/carousel/gallery.js.map +1 -0
- package/dist/components/carousel/index.d.ts +56 -0
- package/dist/components/carousel/index.js +66 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/carousel/navigation.d.ts +51 -0
- package/dist/components/carousel/navigation.js +82 -0
- package/dist/components/carousel/navigation.js.map +1 -0
- package/dist/components/carousel/position.d.ts +33 -0
- package/dist/components/carousel/position.js +48 -0
- package/dist/components/carousel/position.js.map +1 -0
- package/dist/components/carousel/select.d.ts +38 -0
- package/dist/components/carousel/select.js +69 -0
- package/dist/components/carousel/select.js.map +1 -0
- package/dist/components/carousel/style.module.css +62 -0
- package/dist/components/carousel/types.d.ts +87 -0
- package/dist/components/carousel/types.js +12 -0
- package/dist/components/carousel/viewer.d.ts +40 -0
- package/dist/components/carousel/viewer.js +75 -0
- package/dist/components/carousel/viewer.js.map +1 -0
- package/dist/components/checkbox/context.d.ts +5 -5
- package/dist/components/checkbox/context.js.map +1 -1
- package/dist/components/checkbox/group.d.ts +2 -2
- package/dist/components/checkbox/group.js +5 -3
- package/dist/components/checkbox/group.js.map +1 -1
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/checkbox/index.js +3 -1
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox/types.d.ts +4 -3
- package/dist/components/chip/context.d.ts +3 -3
- package/dist/components/chip/context.js.map +1 -1
- package/dist/components/chip/deletable.d.ts +2 -2
- package/dist/components/chip/deletable.js +5 -3
- package/dist/components/chip/deletable.js.map +1 -1
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/chip/index.js +2 -1
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip/list.d.ts +4 -4
- package/dist/components/chip/list.js +3 -1
- package/dist/components/chip/list.js.map +1 -1
- package/dist/components/chip/selectable.d.ts +2 -2
- package/dist/components/chip/selectable.js +3 -1
- package/dist/components/chip/selectable.js.map +1 -1
- package/dist/components/chip/types.d.ts +3 -2
- package/dist/components/classification-badge/context.d.ts +5 -5
- package/dist/components/classification-badge/context.js.map +1 -1
- package/dist/components/classification-badge/index.d.ts +2 -2
- package/dist/components/classification-badge/index.js +1 -1
- package/dist/components/classification-badge/index.js.map +1 -1
- package/dist/components/classification-banner/context.d.ts +5 -5
- package/dist/components/classification-banner/context.js.map +1 -1
- package/dist/components/classification-banner/index.d.ts +2 -2
- package/dist/components/classification-banner/index.js +1 -1
- package/dist/components/classification-banner/index.js.map +1 -1
- package/dist/components/clock/index.d.ts +2 -2
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/color-picker/index.js +4 -3
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/color-picker/types.d.ts +2 -1
- package/dist/components/combobox-field/context.d.ts +5 -5
- package/dist/components/combobox-field/context.js.map +1 -1
- package/dist/components/combobox-field/index.d.ts +2 -2
- package/dist/components/combobox-field/index.js +12 -12
- package/dist/components/combobox-field/index.js.map +1 -1
- package/dist/components/combobox-field/styles.module.css +12 -0
- package/dist/components/combobox-field/types.d.ts +8 -4
- package/dist/components/coordinate-field/context.d.ts +7 -7
- package/dist/components/coordinate-field/context.js.map +1 -1
- package/dist/components/coordinate-field/index.d.ts +2 -2
- package/dist/components/coordinate-field/index.js +28 -23
- package/dist/components/coordinate-field/index.js.map +1 -1
- package/dist/components/coordinate-field/segment.d.ts +2 -2
- package/dist/components/coordinate-field/types.d.ts +3 -1
- package/dist/components/coordinate-field/types.js.map +1 -1
- package/dist/components/date-field/index.d.ts +2 -2
- package/dist/components/date-field/index.js +4 -3
- package/dist/components/date-field/index.js.map +1 -1
- package/dist/components/date-field/types.d.ts +1 -1
- package/dist/components/deferred-collection/index.d.ts +2 -2
- package/dist/components/details-list/context.d.ts +5 -5
- package/dist/components/details-list/context.js.map +1 -1
- package/dist/components/details-list/index.d.ts +2 -2
- package/dist/components/details-list/index.js +2 -1
- package/dist/components/details-list/index.js.map +1 -1
- package/dist/components/details-list/label.d.ts +2 -2
- package/dist/components/details-list/label.js +1 -1
- package/dist/components/details-list/label.js.map +1 -1
- package/dist/components/details-list/types.d.ts +1 -1
- package/dist/components/details-list/value.d.ts +2 -2
- package/dist/components/details-list/value.js +1 -1
- package/dist/components/details-list/value.js.map +1 -1
- package/dist/components/dialog/content.d.ts +2 -2
- package/dist/components/dialog/context.d.ts +4 -4
- package/dist/components/dialog/context.js.map +1 -1
- package/dist/components/dialog/footer.d.ts +2 -2
- package/dist/components/dialog/footer.js +1 -1
- package/dist/components/dialog/footer.js.map +1 -1
- package/dist/components/dialog/index.d.ts +2 -2
- package/dist/components/dialog/index.js +3 -1
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/dialog/styles.module.css +23 -0
- package/dist/components/dialog/title.d.ts +3 -3
- package/dist/components/dialog/title.js +1 -1
- package/dist/components/dialog/title.js.map +1 -1
- package/dist/components/dialog/trigger.d.ts +1 -1
- package/dist/components/dialog/trigger.js +1 -1
- package/dist/components/dialog/trigger.js.map +1 -1
- package/dist/components/dialog/types.d.ts +1 -1
- package/dist/components/divider/context.d.ts +5 -5
- package/dist/components/divider/context.js.map +1 -1
- package/dist/components/divider/index.d.ts +2 -2
- package/dist/components/divider/index.js +1 -1
- package/dist/components/divider/index.js.map +1 -1
- package/dist/components/drawer/back.d.ts +2 -2
- package/dist/components/drawer/close.d.ts +2 -2
- package/dist/components/drawer/content.d.ts +2 -2
- package/dist/components/drawer/context.d.ts +2 -2
- package/dist/components/drawer/footer.d.ts +2 -2
- package/dist/components/drawer/header-title.d.ts +2 -2
- package/dist/components/drawer/header-title.js +1 -1
- package/dist/components/drawer/header-title.js.map +1 -1
- package/dist/components/drawer/header.d.ts +2 -2
- package/dist/components/drawer/header.js +3 -3
- package/dist/components/drawer/header.js.map +1 -1
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/drawer/layout-main.d.ts +2 -2
- package/dist/components/drawer/layout.d.ts +2 -2
- package/dist/components/drawer/menu-item.d.ts +2 -2
- package/dist/components/drawer/menu-item.js +7 -7
- package/dist/components/drawer/menu-item.js.map +1 -1
- package/dist/components/drawer/menu.d.ts +2 -2
- package/dist/components/drawer/panel.d.ts +2 -2
- package/dist/components/drawer/styles.module.css +54 -2
- package/dist/components/drawer/trigger.d.ts +2 -2
- package/dist/components/drawer/trigger.js +1 -1
- package/dist/components/drawer/trigger.js.map +1 -1
- package/dist/components/drawer/types.d.ts +3 -3
- package/dist/components/drawer/view.d.ts +2 -2
- package/dist/components/flashcard/index.d.ts +9 -9
- package/dist/components/flashcard/index.js +2 -1
- package/dist/components/flashcard/index.js.map +1 -1
- package/dist/components/floating-card/context.d.ts +22 -15
- package/dist/components/floating-card/context.js +18 -3
- package/dist/components/floating-card/context.js.map +1 -1
- package/dist/components/floating-card/index.d.ts +32 -27
- package/dist/components/floating-card/index.js +41 -11
- package/dist/components/floating-card/index.js.map +1 -1
- package/dist/components/floating-card/provider.d.ts +30 -32
- package/dist/components/floating-card/provider.js +110 -49
- package/dist/components/floating-card/provider.js.map +1 -1
- package/dist/components/floating-card/styles.module.css +20 -2
- package/dist/components/floating-card/types.d.ts +161 -0
- package/dist/components/floating-card/types.js +12 -0
- package/dist/components/floating-card/utils.d.ts +104 -0
- package/dist/components/floating-card/utils.js +60 -0
- package/dist/components/floating-card/utils.js.map +1 -0
- package/dist/components/gantt/components/base-elements/point.d.ts +28 -0
- package/dist/components/gantt/components/base-elements/point.js +44 -0
- package/dist/components/gantt/components/base-elements/point.js.map +1 -0
- package/dist/components/gantt/components/base-elements/range.d.ts +30 -0
- package/dist/components/gantt/components/base-elements/range.js +51 -0
- package/dist/components/gantt/components/base-elements/range.js.map +1 -0
- package/dist/components/gantt/components/base-elements/use-point-element-layout/index.d.ts +12 -0
- package/dist/components/gantt/components/base-elements/use-point-element-layout/index.js +42 -0
- package/dist/components/gantt/components/base-elements/use-point-element-layout/index.js.map +1 -0
- package/dist/components/gantt/components/base-elements/use-range-element-layout/index.d.ts +23 -0
- package/dist/components/gantt/components/base-elements/use-range-element-layout/index.js +50 -0
- package/dist/components/gantt/components/base-elements/use-range-element-layout/index.js.map +1 -0
- package/dist/components/gantt/components/containers/external/gantt-content-container/index.d.ts +23 -0
- package/dist/components/gantt/components/containers/external/gantt-content-container/index.js +40 -0
- package/dist/components/gantt/components/containers/external/gantt-content-container/index.js.map +1 -0
- package/dist/components/gantt/components/containers/external/gantt-panel-container/index.d.ts +23 -0
- package/dist/components/gantt/components/containers/external/gantt-panel-container/index.js +33 -0
- package/dist/components/gantt/components/containers/external/gantt-panel-container/index.js.map +1 -0
- package/dist/components/gantt/components/containers/external/styles.module.css +32 -0
- package/dist/components/gantt/components/containers/internal/index.d.ts +22 -0
- package/dist/components/gantt/components/containers/internal/index.js +35 -0
- package/dist/components/gantt/components/containers/internal/index.js.map +1 -0
- package/dist/components/gantt/components/containers/internal/layout-container/index.d.ts +22 -0
- package/dist/components/gantt/components/containers/internal/layout-container/index.js +27 -0
- package/dist/components/gantt/components/containers/internal/layout-container/index.js.map +1 -0
- package/dist/components/gantt/components/containers/internal/styles.module.css +35 -0
- package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.d.ts +22 -0
- package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.js +38 -0
- package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.js.map +1 -0
- package/dist/components/gantt/components/content-row/block.d.ts +27 -0
- package/dist/components/gantt/components/content-row/block.js +39 -0
- package/dist/components/gantt/components/content-row/block.js.map +1 -0
- package/dist/components/gantt/components/content-row/bracket.d.ts +23 -0
- package/dist/components/gantt/components/content-row/bracket.js +48 -0
- package/dist/components/gantt/components/content-row/bracket.js.map +1 -0
- package/dist/components/gantt/components/content-row/icon-marker.d.ts +27 -0
- package/dist/components/gantt/components/content-row/icon-marker.js +41 -0
- package/dist/components/gantt/components/content-row/icon-marker.js.map +1 -0
- package/dist/components/gantt/components/content-row/index.d.ts +24 -0
- package/dist/components/gantt/components/content-row/index.js +32 -0
- package/dist/components/gantt/components/content-row/index.js.map +1 -0
- package/dist/components/gantt/components/content-row/marker.d.ts +21 -0
- package/dist/components/gantt/components/content-row/marker.js +35 -0
- package/dist/components/gantt/components/content-row/marker.js.map +1 -0
- package/dist/components/gantt/components/content-row/spacer.d.ts +23 -0
- package/dist/components/gantt/components/content-row/spacer.js +35 -0
- package/dist/components/gantt/components/content-row/spacer.js.map +1 -0
- package/dist/components/gantt/components/content-row/styles.module.css +198 -0
- package/dist/components/gantt/components/content-row/use-elapsed-percentage/index.d.ts +19 -0
- package/dist/components/gantt/components/content-row/use-elapsed-percentage/index.js +27 -0
- package/dist/components/gantt/components/content-row/use-elapsed-percentage/index.js.map +1 -0
- package/dist/components/gantt/components/content-row/use-is-elapsed/index.d.ts +10 -0
- package/dist/components/gantt/components/content-row/use-is-elapsed/index.js +24 -0
- package/dist/components/gantt/components/content-row/use-is-elapsed/index.js.map +1 -0
- package/dist/components/gantt/components/current-time/index.d.ts +28 -0
- package/dist/components/gantt/components/current-time/index.js +63 -0
- package/dist/components/gantt/components/current-time/index.js.map +1 -0
- package/dist/components/gantt/components/current-time/styles.module.css +42 -0
- package/dist/components/gantt/components/current-time/use-current-time-layout/index.d.ts +31 -0
- package/dist/components/gantt/components/current-time/use-current-time-layout/index.js +58 -0
- package/dist/components/gantt/components/current-time/use-current-time-layout/index.js.map +1 -0
- package/dist/components/gantt/components/header/index.d.ts +25 -0
- package/dist/components/gantt/components/header/index.js +41 -0
- package/dist/components/gantt/components/header/index.js.map +1 -0
- package/dist/components/gantt/components/header/styles.module.css +23 -0
- package/dist/components/gantt/components/panel-row/index.d.ts +24 -0
- package/dist/components/gantt/components/panel-row/index.js +33 -0
- package/dist/components/gantt/components/panel-row/index.js.map +1 -0
- package/dist/components/gantt/components/panel-row/styles.module.css +24 -0
- package/dist/components/gantt/components/rows-virtualizer/index.d.ts +25 -0
- package/dist/components/gantt/components/rows-virtualizer/index.js +67 -0
- package/dist/components/gantt/components/rows-virtualizer/index.js.map +1 -0
- package/dist/components/gantt/components/rows-virtualizer/styles.module.css +30 -0
- package/dist/components/gantt/components/rows-virtualizer/use-rendered-rows/index.d.ts +29 -0
- package/dist/components/gantt/components/rows-virtualizer/use-rendered-rows/index.js +57 -0
- package/dist/components/gantt/components/rows-virtualizer/use-rendered-rows/index.js.map +1 -0
- package/dist/components/gantt/components/rows-virtualizer/use-scroll-sync/index.d.ts +10 -0
- package/dist/components/gantt/components/rows-virtualizer/use-scroll-sync/index.js +58 -0
- package/dist/components/gantt/components/rows-virtualizer/use-scroll-sync/index.js.map +1 -0
- package/dist/components/gantt/components/styles.module.css +46 -0
- package/dist/components/gantt/components/timeline/index.d.ts +19 -0
- package/dist/components/gantt/components/timeline/index.js +45 -0
- package/dist/components/gantt/components/timeline/index.js.map +1 -0
- package/dist/components/gantt/components/timeline/use-timeline-transform/index.d.ts +29 -0
- package/dist/components/gantt/components/timeline/use-timeline-transform/index.js +33 -0
- package/dist/components/gantt/components/timeline/use-timeline-transform/index.js.map +1 -0
- package/dist/components/gantt/components/timeline-chunk/index.d.ts +25 -0
- package/dist/components/gantt/components/timeline-chunk/index.js +43 -0
- package/dist/components/gantt/components/timeline-chunk/index.js.map +1 -0
- package/dist/components/gantt/constants.d.ts +31 -0
- package/dist/components/gantt/constants.js +57 -0
- package/dist/components/gantt/constants.js.map +1 -0
- package/dist/components/gantt/context/index.d.ts +60 -0
- package/dist/components/gantt/context/index.js +78 -0
- package/dist/components/gantt/context/index.js.map +1 -0
- package/dist/components/gantt/context/store/index.d.ts +45 -0
- package/dist/components/gantt/context/store/index.js +42 -0
- package/dist/components/gantt/context/store/index.js.map +1 -0
- package/dist/components/gantt/context/temporal-data/index.d.ts +48 -0
- package/dist/components/gantt/context/temporal-data/index.js +80 -0
- package/dist/components/gantt/context/temporal-data/index.js.map +1 -0
- package/dist/components/gantt/gantt.d.ts +50 -0
- package/dist/components/gantt/gantt.js +51 -0
- package/dist/components/gantt/gantt.js.map +1 -0
- package/dist/components/gantt/hooks/use-horizontal-scroll-update/index.d.ts +22 -0
- package/dist/components/gantt/hooks/use-horizontal-scroll-update/index.js +36 -0
- package/dist/components/gantt/hooks/use-horizontal-scroll-update/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-layout-subscription/index.d.ts +26 -0
- package/dist/components/gantt/hooks/use-layout-subscription/index.js +45 -0
- package/dist/components/gantt/hooks/use-layout-subscription/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-resize-intersection-effect/index.d.ts +26 -0
- package/dist/components/gantt/hooks/use-resize-intersection-effect/index.js +50 -0
- package/dist/components/gantt/hooks/use-resize-intersection-effect/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-root-element-height/index.d.ts +5 -0
- package/dist/components/gantt/hooks/use-root-element-height/index.js +24 -0
- package/dist/components/gantt/hooks/use-root-element-height/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-scrollbar-height/index.d.ts +5 -0
- package/dist/components/gantt/hooks/use-scrollbar-height/index.js +40 -0
- package/dist/components/gantt/hooks/use-scrollbar-height/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-total-data-region-thresholds/index.d.ts +19 -0
- package/dist/components/gantt/hooks/use-total-data-region-thresholds/index.js +87 -0
- package/dist/components/gantt/hooks/use-total-data-region-thresholds/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-vertical-scroll-update/index.d.ts +22 -0
- package/dist/components/gantt/hooks/use-vertical-scroll-update/index.js +38 -0
- package/dist/components/gantt/hooks/use-vertical-scroll-update/index.js.map +1 -0
- package/dist/components/gantt/public-types.d.ts +31 -0
- package/dist/components/gantt/public-types.js +12 -0
- package/dist/components/gantt/store.d.ts +51 -0
- package/dist/components/gantt/store.js +46 -0
- package/dist/components/gantt/store.js.map +1 -0
- package/dist/components/gantt/styles.module.css +30 -0
- package/dist/components/gantt/types.d.ts +67 -0
- package/dist/components/gantt/types.js +12 -0
- package/dist/components/gantt/utils/conversions.d.ts +23 -0
- package/dist/components/gantt/utils/conversions.js +34 -0
- package/dist/components/gantt/utils/conversions.js.map +1 -0
- package/dist/components/gantt/utils/dates.d.ts +11 -0
- package/dist/components/gantt/utils/dates.js +41 -0
- package/dist/components/gantt/utils/dates.js.map +1 -0
- package/dist/components/gantt/utils/formatting.d.ts +5 -0
- package/dist/components/gantt/utils/formatting.js +54 -0
- package/dist/components/gantt/utils/formatting.js.map +1 -0
- package/dist/components/gantt/utils/generation.d.ts +19 -0
- package/dist/components/gantt/utils/generation.js +37 -0
- package/dist/components/gantt/utils/generation.js.map +1 -0
- package/dist/components/gantt/utils/helpers.d.ts +26 -0
- package/dist/components/gantt/utils/helpers.js +55 -0
- package/dist/components/gantt/utils/helpers.js.map +1 -0
- package/dist/components/gantt/utils/layout.d.ts +32 -0
- package/dist/components/gantt/utils/layout.js +55 -0
- package/dist/components/gantt/utils/layout.js.map +1 -0
- package/dist/components/gantt/utils/thresholds.d.ts +52 -0
- package/dist/components/gantt/utils/thresholds.js +116 -0
- package/dist/components/gantt/utils/thresholds.js.map +1 -0
- package/dist/components/hero/context.d.ts +3 -3
- package/dist/components/hero/context.js.map +1 -1
- package/dist/components/hero/index.d.ts +2 -2
- package/dist/components/hero/index.js +4 -1
- package/dist/components/hero/index.js.map +1 -1
- package/dist/components/hero/subtitle.d.ts +3 -3
- package/dist/components/hero/subtitle.js +1 -1
- package/dist/components/hero/subtitle.js.map +1 -1
- package/dist/components/hero/title.d.ts +3 -3
- package/dist/components/hero/title.js +1 -1
- package/dist/components/hero/title.js.map +1 -1
- package/dist/components/hotkey/context.d.ts +5 -5
- package/dist/components/hotkey/context.js.map +1 -1
- package/dist/components/hotkey/index.d.ts +2 -2
- package/dist/components/hotkey/index.js +2 -1
- package/dist/components/hotkey/index.js.map +1 -1
- package/dist/components/hotkey/set.d.ts +2 -2
- package/dist/components/icon/context.d.ts +5 -5
- package/dist/components/icon/context.js.map +1 -1
- package/dist/components/icon/index.d.ts +2 -2
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/input/context.d.ts +4 -4
- package/dist/components/input/context.js.map +1 -1
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/input/index.js +4 -2
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/types.d.ts +3 -3
- package/dist/components/kanban/card-body.d.ts +2 -2
- package/dist/components/kanban/card-header-actions.d.ts +2 -2
- package/dist/components/kanban/card-header-title.d.ts +2 -2
- package/dist/components/kanban/card-header.d.ts +2 -2
- package/dist/components/kanban/card.d.ts +2 -2
- package/dist/components/kanban/column-actions.d.ts +2 -2
- package/dist/components/kanban/column-container.d.ts +2 -2
- package/dist/components/kanban/column-content.d.ts +2 -2
- package/dist/components/kanban/column-header-actions.d.ts +2 -2
- package/dist/components/kanban/column-header-drag-handle.d.ts +2 -2
- package/dist/components/kanban/column-header-title.d.ts +2 -2
- package/dist/components/kanban/column-header.d.ts +2 -2
- package/dist/components/kanban/column.d.ts +2 -2
- package/dist/components/kanban/context.d.ts +2 -2
- package/dist/components/kanban/header-actions.d.ts +2 -2
- package/dist/components/kanban/header-search.d.ts +2 -2
- package/dist/components/kanban/header-title.d.ts +2 -2
- package/dist/components/kanban/header-title.js +1 -1
- package/dist/components/kanban/header-title.js.map +1 -1
- package/dist/components/kanban/header.d.ts +2 -2
- package/dist/components/kanban/kanban.d.ts +4 -4
- package/dist/components/label/context.d.ts +6 -6
- package/dist/components/label/context.js.map +1 -1
- package/dist/components/label/index.d.ts +2 -2
- package/dist/components/label/index.js +2 -1
- package/dist/components/label/index.js.map +1 -1
- package/dist/components/label/types.d.ts +1 -1
- package/dist/components/lines/index.d.ts +2 -2
- package/dist/components/link/context.d.ts +2 -2
- package/dist/components/link/context.js +1 -1
- package/dist/components/link/context.js.map +1 -1
- package/dist/components/link/index.d.ts +2 -2
- package/dist/components/link/index.js +3 -1
- package/dist/components/link/index.js.map +1 -1
- package/dist/components/link/types.d.ts +1 -1
- package/dist/components/list/context.d.ts +3 -3
- package/dist/components/list/context.js.map +1 -1
- package/dist/components/list/index.d.ts +2 -2
- package/dist/components/list/index.js +3 -1
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list/item-content.d.ts +2 -2
- package/dist/components/list/item-description.d.ts +2 -2
- package/dist/components/list/item-title.d.ts +2 -2
- package/dist/components/list/item.d.ts +2 -2
- package/dist/components/list/item.js +2 -1
- package/dist/components/list/item.js.map +1 -1
- package/dist/components/list/types.d.ts +1 -1
- package/dist/components/media-controls/context.d.ts +4 -4
- package/dist/components/media-controls/fullscreen-button.d.ts +2 -2
- package/dist/components/media-controls/index.d.ts +2 -2
- package/dist/components/media-controls/mute-button.d.ts +2 -2
- package/dist/components/media-controls/play-button.d.ts +2 -2
- package/dist/components/media-controls/playback-rate.d.ts +2 -2
- package/dist/components/media-controls/seek-button.d.ts +2 -2
- package/dist/components/media-controls/time-display.d.ts +2 -2
- package/dist/components/media-controls/time-range.d.ts +2 -2
- package/dist/components/media-controls/volume-slider.d.ts +2 -2
- package/dist/components/menu/context.d.ts +4 -4
- package/dist/components/menu/context.js.map +1 -1
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/index.js +4 -1
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/menu/item-description.d.ts +3 -3
- package/dist/components/menu/item-description.js +1 -1
- package/dist/components/menu/item-description.js.map +1 -1
- package/dist/components/menu/item-label.d.ts +3 -3
- package/dist/components/menu/item-label.js +1 -1
- package/dist/components/menu/item-label.js.map +1 -1
- package/dist/components/menu/item.d.ts +2 -2
- package/dist/components/menu/item.js +5 -1
- package/dist/components/menu/item.js.map +1 -1
- package/dist/components/menu/section.d.ts +2 -2
- package/dist/components/menu/section.js +1 -1
- package/dist/components/menu/section.js.map +1 -1
- package/dist/components/menu/separator.d.ts +3 -3
- package/dist/components/menu/separator.js +1 -1
- package/dist/components/menu/separator.js.map +1 -1
- package/dist/components/menu/styles.module.css +12 -0
- package/dist/components/menu/submenu.d.ts +3 -3
- package/dist/components/menu/submenu.js +1 -1
- package/dist/components/menu/submenu.js.map +1 -1
- package/dist/components/menu/trigger.d.ts +1 -1
- package/dist/components/menu/trigger.js +1 -1
- package/dist/components/menu/trigger.js.map +1 -1
- package/dist/components/menu/types.d.ts +1 -1
- package/dist/components/notice/index.d.ts +2 -2
- package/dist/components/notice/index.js +6 -5
- package/dist/components/notice/index.js.map +1 -1
- package/dist/components/notice/list.d.ts +2 -2
- package/dist/components/notice/list.js +16 -6
- package/dist/components/notice/list.js.map +1 -1
- package/dist/components/notice/notice-icon.d.ts +2 -2
- package/dist/components/notice/styles.module.css +27 -0
- package/dist/components/notice/types.d.ts +4 -4
- package/dist/components/options/context.d.ts +3 -3
- package/dist/components/options/context.js.map +1 -1
- package/dist/components/options/index.d.ts +2 -2
- package/dist/components/options/index.js +3 -1
- package/dist/components/options/index.js.map +1 -1
- package/dist/components/options/item-content.d.ts +3 -3
- package/dist/components/options/item-content.js.map +1 -1
- package/dist/components/options/item-description.d.ts +3 -3
- package/dist/components/options/item-description.js +1 -1
- package/dist/components/options/item-description.js.map +1 -1
- package/dist/components/options/item-label.d.ts +3 -3
- package/dist/components/options/item-label.js +2 -1
- package/dist/components/options/item-label.js.map +1 -1
- package/dist/components/options/item.d.ts +2 -2
- package/dist/components/options/item.js +2 -1
- package/dist/components/options/item.js.map +1 -1
- package/dist/components/options/section.d.ts +2 -2
- package/dist/components/options/section.js +1 -1
- package/dist/components/options/section.js.map +1 -1
- package/dist/components/options/types.d.ts +2 -2
- package/dist/components/pagination/context.d.ts +2 -2
- package/dist/components/pagination/index.d.ts +2 -2
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/index.js.map +1 -1
- package/dist/components/pagination/next.d.ts +2 -2
- package/dist/components/pagination/next.js +3 -3
- package/dist/components/pagination/next.js.map +1 -1
- package/dist/components/pagination/pages.d.ts +2 -2
- package/dist/components/pagination/pages.js +3 -3
- package/dist/components/pagination/pages.js.map +1 -1
- package/dist/components/pagination/prev.d.ts +2 -2
- package/dist/components/pagination/prev.js +3 -3
- package/dist/components/pagination/prev.js.map +1 -1
- package/dist/components/popover/content.d.ts +2 -2
- package/dist/components/popover/footer.d.ts +2 -2
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/popover/styles.module.css +34 -0
- package/dist/components/popover/title.d.ts +3 -3
- package/dist/components/popover/title.js +1 -1
- package/dist/components/popover/title.js.map +1 -1
- package/dist/components/popover/trigger.d.ts +2 -2
- package/dist/components/popover/trigger.js +3 -3
- package/dist/components/popover/trigger.js.map +1 -1
- package/dist/components/popover/types.d.ts +1 -1
- package/dist/components/query-builder/action-element.d.ts +2 -2
- package/dist/components/query-builder/actions.d.ts +4 -4
- package/dist/components/query-builder/combinator-selector.d.ts +2 -2
- package/dist/components/query-builder/index.d.ts +2 -2
- package/dist/components/query-builder/rule-group.d.ts +4 -4
- package/dist/components/query-builder/rule.d.ts +2 -2
- package/dist/components/query-builder/value-editor.d.ts +2 -2
- package/dist/components/query-builder/value-selector.d.ts +2 -2
- package/dist/components/query-builder/value-selector.js +1 -1
- package/dist/components/radio/context.d.ts +5 -5
- package/dist/components/radio/context.js.map +1 -1
- package/dist/components/radio/group.d.ts +2 -2
- package/dist/components/radio/group.js +5 -3
- package/dist/components/radio/group.js.map +1 -1
- package/dist/components/radio/index.d.ts +2 -2
- package/dist/components/radio/index.js +3 -1
- package/dist/components/radio/index.js.map +1 -1
- package/dist/components/radio/types.d.ts +3 -3
- package/dist/components/search-field/context.d.ts +6 -6
- package/dist/components/search-field/context.js.map +1 -1
- package/dist/components/search-field/index.d.ts +2 -2
- package/dist/components/search-field/index.js +3 -1
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/search-field/types.d.ts +3 -3
- package/dist/components/select-field/context.d.ts +5 -5
- package/dist/components/select-field/context.js.map +1 -1
- package/dist/components/select-field/index.d.ts +2 -2
- package/dist/components/select-field/index.js +6 -3
- package/dist/components/select-field/index.js.map +1 -1
- package/dist/components/select-field/types.d.ts +8 -5
- package/dist/components/sidenav/avatar.d.ts +2 -2
- package/dist/components/sidenav/avatar.js +3 -1
- package/dist/components/sidenav/avatar.js.map +1 -1
- package/dist/components/sidenav/content.d.ts +2 -2
- package/dist/components/sidenav/content.js +1 -1
- package/dist/components/sidenav/content.js.map +1 -1
- package/dist/components/sidenav/context.d.ts +2 -2
- package/dist/components/sidenav/footer.d.ts +2 -2
- package/dist/components/sidenav/header.d.ts +2 -2
- package/dist/components/sidenav/header.js +3 -1
- package/dist/components/sidenav/header.js.map +1 -1
- package/dist/components/sidenav/index.d.ts +2 -2
- package/dist/components/sidenav/index.js +2 -1
- package/dist/components/sidenav/index.js.map +1 -1
- package/dist/components/sidenav/item.d.ts +2 -2
- package/dist/components/sidenav/item.js +8 -5
- package/dist/components/sidenav/item.js.map +1 -1
- package/dist/components/sidenav/link.d.ts +2 -2
- package/dist/components/sidenav/link.js +8 -5
- package/dist/components/sidenav/link.js.map +1 -1
- package/dist/components/sidenav/menu-item.d.ts +2 -2
- package/dist/components/sidenav/menu-item.js +2 -1
- package/dist/components/sidenav/menu-item.js.map +1 -1
- package/dist/components/sidenav/menu.d.ts +2 -2
- package/dist/components/sidenav/menu.js +10 -5
- package/dist/components/sidenav/menu.js.map +1 -1
- package/dist/components/sidenav/styles.module.css +10 -2
- package/dist/components/sidenav/trigger.d.ts +2 -2
- package/dist/components/sidenav/trigger.js +1 -1
- package/dist/components/sidenav/trigger.js.map +1 -1
- package/dist/components/sidenav/types.d.ts +6 -1
- package/dist/components/skeleton/index.d.ts +2 -2
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/slider/index.js +9 -6
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/slider/types.d.ts +1 -1
- package/dist/components/status-indicator/index.d.ts +2 -2
- package/dist/components/switch/context.d.ts +6 -6
- package/dist/components/switch/context.js.map +1 -1
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/switch/index.js +3 -1
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/styles.module.css +8 -0
- package/dist/components/switch/types.d.ts +1 -1
- package/dist/components/table/body.d.ts +2 -2
- package/dist/components/table/cell.d.ts +2 -2
- package/dist/components/table/context.d.ts +2 -2
- package/dist/components/table/header-cell.d.ts +2 -2
- package/dist/components/table/header.d.ts +2 -2
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/index.js +4 -4
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/table/row.d.ts +2 -2
- package/dist/components/tabs/context.d.ts +8 -8
- package/dist/components/tabs/context.js.map +1 -1
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/index.js +3 -1
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/tabs/list.d.ts +3 -3
- package/dist/components/tabs/list.js +2 -1
- package/dist/components/tabs/list.js.map +1 -1
- package/dist/components/tabs/panel.d.ts +3 -3
- package/dist/components/tabs/panel.js +2 -1
- package/dist/components/tabs/panel.js.map +1 -1
- package/dist/components/tabs/tab.d.ts +2 -2
- package/dist/components/tabs/tab.js +3 -1
- package/dist/components/tabs/tab.js.map +1 -1
- package/dist/components/tabs/types.d.ts +1 -1
- package/dist/components/text-area-field/context.d.ts +5 -5
- package/dist/components/text-area-field/context.js.map +1 -1
- package/dist/components/text-area-field/index.d.ts +2 -2
- package/dist/components/text-area-field/index.js +8 -3
- package/dist/components/text-area-field/index.js.map +1 -1
- package/dist/components/text-area-field/types.d.ts +3 -1
- package/dist/components/text-field/context.d.ts +6 -6
- package/dist/components/text-field/context.js.map +1 -1
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/text-field/index.js +9 -5
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/text-field/types.d.ts +7 -6
- package/dist/components/time-field/index.d.ts +3 -3
- package/dist/components/time-field/index.js +4 -3
- package/dist/components/time-field/index.js.map +1 -1
- package/dist/components/time-field/types.d.ts +1 -1
- package/dist/components/tooltip/context.d.ts +3 -3
- package/dist/components/tooltip/context.js.map +1 -1
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/index.js +3 -2
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/components/tooltip/styles.module.css +35 -0
- package/dist/components/tooltip/trigger.d.ts +2 -2
- package/dist/components/tooltip/trigger.js +6 -3
- package/dist/components/tooltip/trigger.js.map +1 -1
- package/dist/components/tooltip/types.d.ts +8 -3
- package/dist/components/tree/context.d.ts +3 -3
- package/dist/components/tree/index.d.ts +4 -2
- package/dist/components/tree/index.js +31 -16
- package/dist/components/tree/index.js.map +1 -1
- package/dist/components/tree/item-actions.d.ts +2 -2
- package/dist/components/tree/item-content.d.ts +2 -2
- package/dist/components/tree/item-content.js +10 -9
- package/dist/components/tree/item-content.js.map +1 -1
- package/dist/components/tree/item-description.d.ts +3 -3
- package/dist/components/tree/item-description.js +1 -1
- package/dist/components/tree/item-description.js.map +1 -1
- package/dist/components/tree/item-label.d.ts +3 -3
- package/dist/components/tree/item-label.js +1 -1
- package/dist/components/tree/item-label.js.map +1 -1
- package/dist/components/tree/item-prefix-icon.d.ts +2 -2
- package/dist/components/tree/item.d.ts +2 -2
- package/dist/components/tree/item.js +14 -7
- package/dist/components/tree/item.js.map +1 -1
- package/dist/components/tree/lines.d.ts +2 -2
- package/dist/components/tree/types.d.ts +30 -15
- package/dist/components/video/index.d.ts +2 -2
- package/dist/components/view-stack/context.d.ts +2 -2
- package/dist/components/view-stack/index.d.ts +2 -2
- package/dist/components/view-stack/trigger.d.ts +2 -2
- package/dist/components/view-stack/trigger.js +1 -1
- package/dist/components/view-stack/trigger.js.map +1 -1
- package/dist/components/view-stack/types.d.ts +1 -1
- package/dist/components/view-stack/view.d.ts +2 -2
- package/dist/hooks/coordinate-field/use-coordinate-field.d.ts +1 -1
- package/dist/hooks/coordinate-field/use-coordinate-field.js +1 -1
- package/dist/hooks/coordinate-field/use-coordinate-field.js.map +1 -1
- package/dist/hooks/use-tree/actions/cache.d.ts +406 -17
- package/dist/hooks/use-tree/actions/cache.js +488 -16
- package/dist/hooks/use-tree/actions/cache.js.map +1 -1
- package/dist/hooks/use-tree/actions/index.d.ts +36 -22
- package/dist/hooks/use-tree/actions/index.js +103 -36
- package/dist/hooks/use-tree/actions/index.js.map +1 -1
- package/dist/hooks/use-tree/state/index.d.ts +25 -2
- package/dist/hooks/use-tree/state/index.js +27 -3
- package/dist/hooks/use-tree/state/index.js.map +1 -1
- package/dist/hooks/use-tree/state/utils.d.ts +28 -0
- package/dist/hooks/use-tree/state/utils.js +29 -1
- package/dist/hooks/use-tree/state/utils.js.map +1 -1
- package/dist/hooks/use-tree/types.d.ts +66 -24
- package/dist/index.d.ts +27 -7
- package/dist/index.js +27 -10
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/providers/portal.d.ts +2 -2
- package/dist/providers/portal.js +2 -2
- package/dist/providers/portal.js.map +1 -1
- package/dist/providers/theme-provider.d.ts +4 -4
- package/dist/providers/theme-provider.js +6 -7
- package/dist/providers/theme-provider.js.map +1 -1
- package/package.json +77 -36
- package/dist/node_modules/.pnpm/@react-aria_collections@3.0.0-rc.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/collections/dist/BaseCollection.js +0 -134
- package/dist/node_modules/.pnpm/@react-aria_collections@3.0.0-rc.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/collections/dist/BaseCollection.js.map +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { TIMELINE_CHUNK_WIDTH_PX, TIMESCALE_MAPPING } from "../constants.js";
|
|
15
|
+
|
|
16
|
+
//#region src/components/gantt/utils/conversions.ts
|
|
17
|
+
function getMsPerPx(timescale) {
|
|
18
|
+
return TIMESCALE_MAPPING[timescale] / TIMELINE_CHUNK_WIDTH_PX;
|
|
19
|
+
}
|
|
20
|
+
/** @throws {RangeError} If endTimeMs < startTimeMs. */
|
|
21
|
+
function getTotalTimelineMs(startTimeMs, endTimeMs) {
|
|
22
|
+
if (endTimeMs < startTimeMs) throw new RangeError(`endTimeMs (${endTimeMs}) must be >= startTimeMs (${startTimeMs})`);
|
|
23
|
+
return endTimeMs - startTimeMs;
|
|
24
|
+
}
|
|
25
|
+
function getTotalTimelineWidth(totalTimelineMs, msPerPx) {
|
|
26
|
+
return totalTimelineMs / msPerPx;
|
|
27
|
+
}
|
|
28
|
+
function getMsRepresentedInViewableRegion(viewableRegionWidth, msPerPx) {
|
|
29
|
+
return viewableRegionWidth * msPerPx;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { getMsPerPx, getMsRepresentedInViewableRegion, getTotalTimelineMs, getTotalTimelineWidth };
|
|
34
|
+
//# sourceMappingURL=conversions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversions.js","names":[],"sources":["../../../../src/components/gantt/utils/conversions.ts"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { TIMELINE_CHUNK_WIDTH_PX, TIMESCALE_MAPPING } from '../constants';\nimport type { GanttTimescale } from '../types';\n\nexport function getMsPerPx(timescale: GanttTimescale) {\n return TIMESCALE_MAPPING[timescale] / TIMELINE_CHUNK_WIDTH_PX;\n}\n\n/** @throws {RangeError} If endTimeMs < startTimeMs. */\nexport function getTotalTimelineMs(startTimeMs: number, endTimeMs: number) {\n if (endTimeMs < startTimeMs) {\n throw new RangeError(\n `endTimeMs (${endTimeMs}) must be >= startTimeMs (${startTimeMs})`,\n );\n }\n\n return endTimeMs - startTimeMs;\n}\n\nexport function getTotalTimelineWidth(\n totalTimelineMs: number,\n msPerPx: number,\n) {\n return totalTimelineMs / msPerPx;\n}\n\nexport function getMsRepresentedInViewableRegion(\n viewableRegionWidth: number,\n msPerPx: number,\n) {\n return viewableRegionWidth * msPerPx;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAgB,WAAW,WAA2B;AACpD,QAAO,kBAAkB,aAAa;;;AAIxC,SAAgB,mBAAmB,aAAqB,WAAmB;AACzE,KAAI,YAAY,YACd,OAAM,IAAI,WACR,cAAc,UAAU,4BAA4B,YAAY,GACjE;AAGH,QAAO,YAAY;;AAGrB,SAAgB,sBACd,iBACA,SACA;AACA,QAAO,kBAAkB;;AAG3B,SAAgB,iCACd,qBACA,SACA;AACA,QAAO,sBAAsB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/components/gantt/utils/dates.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Rounds a millisecond timestamp down to the nearest interval boundary.
|
|
4
|
+
* Uses pure integer arithmetic to avoid Date object allocations.
|
|
5
|
+
*
|
|
6
|
+
* @throws {RangeError} If selectedTimeIntervalMs does not match a known interval.
|
|
7
|
+
*/
|
|
8
|
+
declare function roundMsToInterval(timestampMs: number, selectedTimeIntervalMs: number): number;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { roundMsToInterval };
|
|
11
|
+
//# sourceMappingURL=dates.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { HOURS_MAPPING, MINUTES_MAPPING, MS_PER_HOUR } from "../constants.js";
|
|
15
|
+
|
|
16
|
+
//#region src/components/gantt/utils/dates.ts
|
|
17
|
+
const MS_PER_SECOND = 1e3;
|
|
18
|
+
const MS_PER_DAY = MS_PER_HOUR * 24;
|
|
19
|
+
const hoursIntervals = Object.values(HOURS_MAPPING);
|
|
20
|
+
const minutesIntervals = Object.values(MINUTES_MAPPING);
|
|
21
|
+
/**
|
|
22
|
+
* Rounds a millisecond timestamp down to the nearest interval boundary.
|
|
23
|
+
* Uses pure integer arithmetic to avoid Date object allocations.
|
|
24
|
+
*
|
|
25
|
+
* @throws {RangeError} If selectedTimeIntervalMs does not match a known interval.
|
|
26
|
+
*/
|
|
27
|
+
function roundMsToInterval(timestampMs, selectedTimeIntervalMs) {
|
|
28
|
+
const secondAligned = timestampMs - (timestampMs % MS_PER_SECOND + MS_PER_SECOND) % MS_PER_SECOND;
|
|
29
|
+
if (minutesIntervals.includes(selectedTimeIntervalMs)) return secondAligned - (secondAligned % selectedTimeIntervalMs + selectedTimeIntervalMs) % selectedTimeIntervalMs;
|
|
30
|
+
if (hoursIntervals.includes(selectedTimeIntervalMs)) {
|
|
31
|
+
const msIntoDayRaw = secondAligned % MS_PER_DAY;
|
|
32
|
+
const msIntoDay = msIntoDayRaw < 0 ? msIntoDayRaw + MS_PER_DAY : msIntoDayRaw;
|
|
33
|
+
const hourAligned = msIntoDay - msIntoDay % selectedTimeIntervalMs;
|
|
34
|
+
return secondAligned - msIntoDay + hourAligned;
|
|
35
|
+
}
|
|
36
|
+
throw new RangeError(`Unrecognized time interval: ${selectedTimeIntervalMs}ms`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { roundMsToInterval };
|
|
41
|
+
//# sourceMappingURL=dates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dates.js","names":[],"sources":["../../../../src/components/gantt/utils/dates.ts"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { HOURS_MAPPING, MINUTES_MAPPING, MS_PER_HOUR } from '../constants';\n\nconst MS_PER_SECOND = 1000;\nconst MS_PER_DAY = MS_PER_HOUR * 24;\n\nconst hoursIntervals = Object.values(HOURS_MAPPING);\nconst minutesIntervals = Object.values(MINUTES_MAPPING);\n\n/**\n * Rounds a millisecond timestamp down to the nearest interval boundary.\n * Uses pure integer arithmetic to avoid Date object allocations.\n *\n * @throws {RangeError} If selectedTimeIntervalMs does not match a known interval.\n */\nexport function roundMsToInterval(\n timestampMs: number,\n selectedTimeIntervalMs: number,\n): number {\n // Zero out sub-second precision (handle negative timestamps correctly)\n const msRemainder =\n ((timestampMs % MS_PER_SECOND) + MS_PER_SECOND) % MS_PER_SECOND;\n const secondAligned = timestampMs - msRemainder;\n\n if (minutesIntervals.includes(selectedTimeIntervalMs)) {\n const intervalRemainder =\n ((secondAligned % selectedTimeIntervalMs) + selectedTimeIntervalMs) %\n selectedTimeIntervalMs;\n return secondAligned - intervalRemainder;\n }\n\n if (hoursIntervals.includes(selectedTimeIntervalMs)) {\n // Hours interval — align to interval boundary within the day\n const msIntoDayRaw = secondAligned % MS_PER_DAY;\n const msIntoDay =\n msIntoDayRaw < 0 ? msIntoDayRaw + MS_PER_DAY : msIntoDayRaw;\n const hourAligned = msIntoDay - (msIntoDay % selectedTimeIntervalMs);\n return secondAligned - msIntoDay + hourAligned;\n }\n\n throw new RangeError(\n `Unrecognized time interval: ${selectedTimeIntervalMs}ms`,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,MAAM,gBAAgB;AACtB,MAAM,aAAa,cAAc;AAEjC,MAAM,iBAAiB,OAAO,OAAO,cAAc;AACnD,MAAM,mBAAmB,OAAO,OAAO,gBAAgB;;;;;;;AAQvD,SAAgB,kBACd,aACA,wBACQ;CAIR,MAAM,gBAAgB,eADlB,cAAc,gBAAiB,iBAAiB;AAGpD,KAAI,iBAAiB,SAAS,uBAAuB,CAInD,QAAO,iBAFH,gBAAgB,yBAA0B,0BAC5C;AAIJ,KAAI,eAAe,SAAS,uBAAuB,EAAE;EAEnD,MAAM,eAAe,gBAAgB;EACrC,MAAM,YACJ,eAAe,IAAI,eAAe,aAAa;EACjD,MAAM,cAAc,YAAa,YAAY;AAC7C,SAAO,gBAAgB,YAAY;;AAGrC,OAAM,IAAI,WACR,+BAA+B,uBAAuB,IACvD"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
//#region src/components/gantt/utils/formatting.ts
|
|
15
|
+
const formatter = new Intl.DateTimeFormat("en-US", {
|
|
16
|
+
minute: "2-digit",
|
|
17
|
+
hour: "2-digit",
|
|
18
|
+
day: "2-digit",
|
|
19
|
+
month: "short",
|
|
20
|
+
timeZone: "UTC",
|
|
21
|
+
hour12: false
|
|
22
|
+
});
|
|
23
|
+
const labelCache = /* @__PURE__ */ new Map();
|
|
24
|
+
function formatTimestampLabel(timestampMs) {
|
|
25
|
+
const cached = labelCache.get(timestampMs);
|
|
26
|
+
if (cached !== void 0) return cached;
|
|
27
|
+
const parts = formatter.formatToParts(timestampMs);
|
|
28
|
+
let minute = "";
|
|
29
|
+
let hour = "";
|
|
30
|
+
let day = "";
|
|
31
|
+
let month = "";
|
|
32
|
+
for (const part of parts) switch (part.type) {
|
|
33
|
+
case "minute":
|
|
34
|
+
minute = part.value;
|
|
35
|
+
break;
|
|
36
|
+
case "hour":
|
|
37
|
+
hour = part.value;
|
|
38
|
+
break;
|
|
39
|
+
case "day":
|
|
40
|
+
day = part.value;
|
|
41
|
+
break;
|
|
42
|
+
case "month":
|
|
43
|
+
month = part.value;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
const label = hour === "00" && minute === "00" ? `${day} ${month.toUpperCase()}` : `${hour}:${minute}`;
|
|
47
|
+
labelCache.set(timestampMs, label);
|
|
48
|
+
if (labelCache.size > 500) labelCache.clear();
|
|
49
|
+
return label;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { formatTimestampLabel };
|
|
54
|
+
//# sourceMappingURL=formatting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatting.js","names":[],"sources":["../../../../src/components/gantt/utils/formatting.ts"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// TODO: Make locale and format options configurable via GanttProviderProps\nconst DEFAULT_LOCALE = 'en-US';\nconst options: Intl.DateTimeFormatOptions = {\n minute: '2-digit',\n hour: '2-digit',\n day: '2-digit',\n month: 'short',\n timeZone: 'UTC',\n hour12: false,\n};\n\nconst formatter = new Intl.DateTimeFormat(DEFAULT_LOCALE, options);\nconst labelCache = new Map<number, string>();\n\nexport function formatTimestampLabel(timestampMs: number): string {\n const cached = labelCache.get(timestampMs);\n\n if (cached !== undefined) {\n return cached;\n }\n\n const parts = formatter.formatToParts(timestampMs);\n let minute = '';\n let hour = '';\n let day = '';\n let month = '';\n\n for (const part of parts) {\n switch (part.type) {\n case 'minute':\n minute = part.value;\n break;\n case 'hour':\n hour = part.value;\n break;\n case 'day':\n day = part.value;\n break;\n case 'month':\n month = part.value;\n break;\n }\n }\n\n const label =\n hour === '00' && minute === '00'\n ? `${day} ${month.toUpperCase()}`\n : `${hour}:${minute}`;\n\n labelCache.set(timestampMs, label);\n\n if (labelCache.size > 500) {\n labelCache.clear();\n }\n\n return label;\n}\n"],"mappings":";;;;;;;;;;;;;;AAwBA,MAAM,YAAY,IAAI,KAAK,eAVJ,SACqB;CAC1C,QAAQ;CACR,MAAM;CACN,KAAK;CACL,OAAO;CACP,UAAU;CACV,QAAQ;CACT,CAEiE;AAClE,MAAM,6BAAa,IAAI,KAAqB;AAE5C,SAAgB,qBAAqB,aAA6B;CAChE,MAAM,SAAS,WAAW,IAAI,YAAY;AAE1C,KAAI,WAAW,OACb,QAAO;CAGT,MAAM,QAAQ,UAAU,cAAc,YAAY;CAClD,IAAI,SAAS;CACb,IAAI,OAAO;CACX,IAAI,MAAM;CACV,IAAI,QAAQ;AAEZ,MAAK,MAAM,QAAQ,MACjB,SAAQ,KAAK,MAAb;EACE,KAAK;AACH,YAAS,KAAK;AACd;EACF,KAAK;AACH,UAAO,KAAK;AACZ;EACF,KAAK;AACH,SAAM,KAAK;AACX;EACF,KAAK;AACH,WAAQ,KAAK;AACb;;CAIN,MAAM,QACJ,SAAS,QAAQ,WAAW,OACxB,GAAG,IAAI,GAAG,MAAM,aAAa,KAC7B,GAAG,KAAK,GAAG;AAEjB,YAAW,IAAI,aAAa,MAAM;AAElC,KAAI,WAAW,OAAO,IACpB,YAAW,OAAO;AAGpB,QAAO"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { GanttTimelineChunkObject } from "../types.js";
|
|
14
|
+
|
|
15
|
+
//#region src/components/gantt/utils/generation.d.ts
|
|
16
|
+
declare function generateTimelineChunks(currentPositionMs: number, viewableRegionWidth: number, selectedTimeIntervalMs: number, msPerPx: number): GanttTimelineChunkObject[];
|
|
17
|
+
//#endregion
|
|
18
|
+
export { generateTimelineChunks };
|
|
19
|
+
//# sourceMappingURL=generation.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { BUFFERED_CHUNK_COUNT, TIMELINE_CHUNK_WIDTH_PX } from "../constants.js";
|
|
15
|
+
import { roundMsToInterval } from "./dates.js";
|
|
16
|
+
import { getMsRepresentedInViewableRegion } from "./conversions.js";
|
|
17
|
+
|
|
18
|
+
//#region src/components/gantt/utils/generation.ts
|
|
19
|
+
function generateTimelineChunks(currentPositionMs, viewableRegionWidth, selectedTimeIntervalMs, msPerPx) {
|
|
20
|
+
if (viewableRegionWidth === 0) return [];
|
|
21
|
+
const offsetMs = getMsRepresentedInViewableRegion(viewableRegionWidth, msPerPx) / 2;
|
|
22
|
+
const proposedChunkCount = Math.ceil(viewableRegionWidth / TIMELINE_CHUNK_WIDTH_PX) + BUFFERED_CHUNK_COUNT;
|
|
23
|
+
const chunksInViewableRegion = proposedChunkCount % 2 === 0 ? proposedChunkCount + 1 : proposedChunkCount;
|
|
24
|
+
const midpointMs = currentPositionMs + offsetMs;
|
|
25
|
+
const midpointIndex = Math.floor(chunksInViewableRegion / 2);
|
|
26
|
+
const roundedMidpointMs = roundMsToInterval(midpointMs, selectedTimeIntervalMs);
|
|
27
|
+
const chunks = [];
|
|
28
|
+
for (let i = 0; i < chunksInViewableRegion; i++) {
|
|
29
|
+
const chunkTimestampMs = roundedMidpointMs + selectedTimeIntervalMs * (i - midpointIndex);
|
|
30
|
+
chunks.push({ timestampMs: chunkTimestampMs });
|
|
31
|
+
}
|
|
32
|
+
return chunks;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { generateTimelineChunks };
|
|
37
|
+
//# sourceMappingURL=generation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generation.js","names":["chunks: GanttTimelineChunkObject[]"],"sources":["../../../../src/components/gantt/utils/generation.ts"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { BUFFERED_CHUNK_COUNT, TIMELINE_CHUNK_WIDTH_PX } from '../constants';\nimport { getMsRepresentedInViewableRegion } from './conversions';\nimport { roundMsToInterval } from './dates';\nimport type { GanttTimelineChunkObject } from '../types';\n\nexport function generateTimelineChunks(\n currentPositionMs: number,\n viewableRegionWidth: number,\n selectedTimeIntervalMs: number,\n msPerPx: number,\n): GanttTimelineChunkObject[] {\n if (viewableRegionWidth === 0) {\n return [];\n }\n\n const offsetMs =\n getMsRepresentedInViewableRegion(viewableRegionWidth, msPerPx) / 2;\n\n const proposedChunkCount =\n Math.ceil(viewableRegionWidth / TIMELINE_CHUNK_WIDTH_PX) +\n BUFFERED_CHUNK_COUNT;\n\n const chunksInViewableRegion =\n proposedChunkCount % 2 === 0 ? proposedChunkCount + 1 : proposedChunkCount;\n\n const midpointMs = currentPositionMs + offsetMs;\n const midpointIndex = Math.floor(chunksInViewableRegion / 2);\n\n const roundedMidpointMs = roundMsToInterval(\n midpointMs,\n selectedTimeIntervalMs,\n );\n\n const chunks: GanttTimelineChunkObject[] = [];\n\n for (let i = 0; i < chunksInViewableRegion; i++) {\n const chunkTimestampMs =\n roundedMidpointMs + selectedTimeIntervalMs * (i - midpointIndex);\n\n chunks.push({\n timestampMs: chunkTimestampMs,\n });\n }\n\n return chunks;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,SAAgB,uBACd,mBACA,qBACA,wBACA,SAC4B;AAC5B,KAAI,wBAAwB,EAC1B,QAAO,EAAE;CAGX,MAAM,WACJ,iCAAiC,qBAAqB,QAAQ,GAAG;CAEnE,MAAM,qBACJ,KAAK,KAAK,sBAAsB,wBAAwB,GACxD;CAEF,MAAM,yBACJ,qBAAqB,MAAM,IAAI,qBAAqB,IAAI;CAE1D,MAAM,aAAa,oBAAoB;CACvC,MAAM,gBAAgB,KAAK,MAAM,yBAAyB,EAAE;CAE5D,MAAM,oBAAoB,kBACxB,YACA,uBACD;CAED,MAAMA,SAAqC,EAAE;AAE7C,MAAK,IAAI,IAAI,GAAG,IAAI,wBAAwB,KAAK;EAC/C,MAAM,mBACJ,oBAAoB,0BAA0B,IAAI;AAEpD,SAAO,KAAK,EACV,aAAa,kBACd,CAAC;;AAGJ,QAAO"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { GanttTimeBounds, GanttTimelineChunkObject } from "../types.js";
|
|
14
|
+
import { UIEvent } from "react";
|
|
15
|
+
|
|
16
|
+
//#region src/components/gantt/utils/helpers.d.ts
|
|
17
|
+
declare function getViewableRegionWidth(element: HTMLElement | null): number;
|
|
18
|
+
declare function getHorizontalScrolledPixels(event: UIEvent<HTMLDivElement>): number;
|
|
19
|
+
declare function getVerticalScrolledPixels(event: UIEvent<HTMLDivElement>): number;
|
|
20
|
+
declare function getRenderedRegionBoundsMs(timeMarkers: GanttTimelineChunkObject[], msPerPx: number): GanttTimeBounds;
|
|
21
|
+
declare function shouldRenderRangeElement(renderedRegionBoundary: GanttTimeBounds, rangeElementTimeBounds: GanttTimeBounds): boolean;
|
|
22
|
+
declare function timestampWithinBounds(timestampMs: number, bounds: GanttTimeBounds): boolean;
|
|
23
|
+
declare function shouldRenderCurrentTime(currentTimeMs: number, renderedRegionBounds: GanttTimeBounds): boolean;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { getHorizontalScrolledPixels, getRenderedRegionBoundsMs, getVerticalScrolledPixels, getViewableRegionWidth, shouldRenderCurrentTime, shouldRenderRangeElement, timestampWithinBounds };
|
|
26
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { TIMELINE_CHUNK_WIDTH_PX } from "../constants.js";
|
|
15
|
+
|
|
16
|
+
//#region src/components/gantt/utils/helpers.ts
|
|
17
|
+
function getViewableRegionWidth(element) {
|
|
18
|
+
if (!element) return 0;
|
|
19
|
+
return element.clientWidth;
|
|
20
|
+
}
|
|
21
|
+
function getHorizontalScrolledPixels(event) {
|
|
22
|
+
const { currentTarget } = event;
|
|
23
|
+
return currentTarget.scrollLeft;
|
|
24
|
+
}
|
|
25
|
+
function getVerticalScrolledPixels(event) {
|
|
26
|
+
const { currentTarget } = event;
|
|
27
|
+
return currentTarget.scrollTop;
|
|
28
|
+
}
|
|
29
|
+
function getRenderedRegionBoundsMs(timeMarkers, msPerPx) {
|
|
30
|
+
if (timeMarkers.length === 0) return {
|
|
31
|
+
startMs: 0,
|
|
32
|
+
endMs: 0
|
|
33
|
+
};
|
|
34
|
+
const firstMarker = timeMarkers[0];
|
|
35
|
+
const lastMarker = timeMarkers[timeMarkers.length - 1];
|
|
36
|
+
return {
|
|
37
|
+
startMs: firstMarker.timestampMs,
|
|
38
|
+
endMs: lastMarker.timestampMs + TIMELINE_CHUNK_WIDTH_PX * msPerPx
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function shouldRenderRangeElement(renderedRegionBoundary, rangeElementTimeBounds) {
|
|
42
|
+
const { startMs: rangeStartMs, endMs: rangeEndMs } = rangeElementTimeBounds;
|
|
43
|
+
const { startMs, endMs } = renderedRegionBoundary;
|
|
44
|
+
return rangeStartMs < startMs && rangeEndMs > startMs || rangeStartMs >= startMs && rangeEndMs <= endMs || rangeStartMs < endMs && rangeEndMs > endMs;
|
|
45
|
+
}
|
|
46
|
+
function timestampWithinBounds(timestampMs, bounds) {
|
|
47
|
+
return timestampMs >= bounds.startMs && timestampMs <= bounds.endMs;
|
|
48
|
+
}
|
|
49
|
+
function shouldRenderCurrentTime(currentTimeMs, renderedRegionBounds) {
|
|
50
|
+
return timestampWithinBounds(currentTimeMs, renderedRegionBounds);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { getHorizontalScrolledPixels, getRenderedRegionBoundsMs, getVerticalScrolledPixels, getViewableRegionWidth, shouldRenderCurrentTime, shouldRenderRangeElement, timestampWithinBounds };
|
|
55
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","names":[],"sources":["../../../../src/components/gantt/utils/helpers.ts"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { TIMELINE_CHUNK_WIDTH_PX } from '../constants';\nimport type { UIEvent } from 'react';\nimport type { GanttTimeBounds, GanttTimelineChunkObject } from '../types';\n\nexport function getViewableRegionWidth(element: HTMLElement | null) {\n if (!element) {\n return 0;\n }\n\n return element.clientWidth;\n}\n\nexport function getHorizontalScrolledPixels(event: UIEvent<HTMLDivElement>) {\n const { currentTarget } = event;\n\n return currentTarget.scrollLeft;\n}\n\nexport function getVerticalScrolledPixels(event: UIEvent<HTMLDivElement>) {\n const { currentTarget } = event;\n\n return currentTarget.scrollTop;\n}\n\nexport function getRenderedRegionBoundsMs(\n timeMarkers: GanttTimelineChunkObject[],\n msPerPx: number,\n): GanttTimeBounds {\n if (timeMarkers.length === 0) {\n return { startMs: 0, endMs: 0 };\n }\n\n const firstMarker = timeMarkers[0] as GanttTimelineChunkObject;\n const lastMarker = timeMarkers[\n timeMarkers.length - 1\n ] as GanttTimelineChunkObject;\n\n return {\n startMs: firstMarker.timestampMs,\n endMs: lastMarker.timestampMs + TIMELINE_CHUNK_WIDTH_PX * msPerPx,\n };\n}\n\nexport function shouldRenderRangeElement(\n renderedRegionBoundary: GanttTimeBounds,\n rangeElementTimeBounds: GanttTimeBounds,\n) {\n const { startMs: rangeStartMs, endMs: rangeEndMs } = rangeElementTimeBounds;\n const { startMs, endMs } = renderedRegionBoundary;\n\n const startsBeforeRegionStart =\n rangeStartMs < startMs && rangeEndMs > startMs;\n const isEntirelyWithinRegion = rangeStartMs >= startMs && rangeEndMs <= endMs;\n const endsAfterRegionEnd = rangeStartMs < endMs && rangeEndMs > endMs;\n return (\n startsBeforeRegionStart || isEntirelyWithinRegion || endsAfterRegionEnd\n );\n}\n\nexport function timestampWithinBounds(\n timestampMs: number,\n bounds: GanttTimeBounds,\n) {\n return timestampMs >= bounds.startMs && timestampMs <= bounds.endMs;\n}\n\nexport function shouldRenderCurrentTime(\n currentTimeMs: number,\n renderedRegionBounds: GanttTimeBounds,\n) {\n return timestampWithinBounds(currentTimeMs, renderedRegionBounds);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,SAAgB,uBAAuB,SAA6B;AAClE,KAAI,CAAC,QACH,QAAO;AAGT,QAAO,QAAQ;;AAGjB,SAAgB,4BAA4B,OAAgC;CAC1E,MAAM,EAAE,kBAAkB;AAE1B,QAAO,cAAc;;AAGvB,SAAgB,0BAA0B,OAAgC;CACxE,MAAM,EAAE,kBAAkB;AAE1B,QAAO,cAAc;;AAGvB,SAAgB,0BACd,aACA,SACiB;AACjB,KAAI,YAAY,WAAW,EACzB,QAAO;EAAE,SAAS;EAAG,OAAO;EAAG;CAGjC,MAAM,cAAc,YAAY;CAChC,MAAM,aAAa,YACjB,YAAY,SAAS;AAGvB,QAAO;EACL,SAAS,YAAY;EACrB,OAAO,WAAW,cAAc,0BAA0B;EAC3D;;AAGH,SAAgB,yBACd,wBACA,wBACA;CACA,MAAM,EAAE,SAAS,cAAc,OAAO,eAAe;CACrD,MAAM,EAAE,SAAS,UAAU;AAM3B,QAHE,eAAe,WAAW,aAAa,WACV,gBAAgB,WAAW,cAAc,SAC7C,eAAe,SAAS,aAAa;;AAMlE,SAAgB,sBACd,aACA,QACA;AACA,QAAO,eAAe,OAAO,WAAW,eAAe,OAAO;;AAGhE,SAAgB,wBACd,eACA,sBACA;AACA,QAAO,sBAAsB,eAAe,qBAAqB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { GanttTimeBounds, GanttTimelineChunkObject } from "../types.js";
|
|
14
|
+
|
|
15
|
+
//#region src/components/gantt/utils/layout.d.ts
|
|
16
|
+
declare function deriveTranslateXValue(msPerPx: number, timelineChunks: GanttTimelineChunkObject[], currentPositionMs: number): number;
|
|
17
|
+
declare function deriveCurrentTimeTranslateX(currentTimeMs: number, msPerPx: number, currentPositionMs: number): number;
|
|
18
|
+
declare function deriveRangeElementLayout(renderedRegionBounds: GanttTimeBounds, rangeElementBounds: GanttTimeBounds, totalBounds: GanttTimeBounds, msPerPx: number): {
|
|
19
|
+
translateX: number;
|
|
20
|
+
widthPx: number;
|
|
21
|
+
};
|
|
22
|
+
declare function derivePointElementLayout(renderedRegionBounds: GanttTimeBounds, pointElementMs: number, totalBounds: GanttTimeBounds, msPerPx: number): {
|
|
23
|
+
translateX: number;
|
|
24
|
+
};
|
|
25
|
+
declare function deriveRenderedSlice(scrollPx: number, rowHeightPx: number, viewableRegionHeightPx: number): {
|
|
26
|
+
start: number;
|
|
27
|
+
end: number;
|
|
28
|
+
};
|
|
29
|
+
declare function deriveHorizontalScrollPosition(timestampMs: number, msPerPx: number, totalBounds: GanttTimeBounds): number;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { deriveCurrentTimeTranslateX, deriveHorizontalScrollPosition, derivePointElementLayout, deriveRangeElementLayout, deriveRenderedSlice, deriveTranslateXValue };
|
|
32
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { ROW_VIRTUALIZATION_OVERSCAN } from "../constants.js";
|
|
15
|
+
|
|
16
|
+
//#region src/components/gantt/utils/layout.ts
|
|
17
|
+
function deriveTranslateXValue(msPerPx, timelineChunks, currentPositionMs) {
|
|
18
|
+
const firstTimelineChunk = timelineChunks[0];
|
|
19
|
+
if (!firstTimelineChunk) return 0;
|
|
20
|
+
return (firstTimelineChunk.timestampMs - currentPositionMs) / msPerPx;
|
|
21
|
+
}
|
|
22
|
+
function deriveElementTranslateX(renderedRegionBounds, elementStartMs, totalBounds, msPerPx) {
|
|
23
|
+
const distanceFromTimelineStart = (elementStartMs - totalBounds.startMs) / msPerPx;
|
|
24
|
+
const offsetMs = renderedRegionBounds.startMs - elementStartMs;
|
|
25
|
+
return distanceFromTimelineStart + (offsetMs > 0 ? offsetMs / msPerPx : 0);
|
|
26
|
+
}
|
|
27
|
+
function deriveCurrentTimeTranslateX(currentTimeMs, msPerPx, currentPositionMs) {
|
|
28
|
+
return (currentTimeMs - currentPositionMs) / msPerPx;
|
|
29
|
+
}
|
|
30
|
+
function deriveRangeElementLayout(renderedRegionBounds, rangeElementBounds, totalBounds, msPerPx) {
|
|
31
|
+
const renderedStartMs = Math.max(renderedRegionBounds.startMs, rangeElementBounds.startMs);
|
|
32
|
+
const renderedEndMs = Math.min(renderedRegionBounds.endMs, rangeElementBounds.endMs);
|
|
33
|
+
return {
|
|
34
|
+
translateX: deriveElementTranslateX(renderedRegionBounds, rangeElementBounds.startMs, totalBounds, msPerPx),
|
|
35
|
+
widthPx: (renderedEndMs - renderedStartMs) / msPerPx
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function derivePointElementLayout(renderedRegionBounds, pointElementMs, totalBounds, msPerPx) {
|
|
39
|
+
return { translateX: deriveElementTranslateX(renderedRegionBounds, pointElementMs, totalBounds, msPerPx) };
|
|
40
|
+
}
|
|
41
|
+
function deriveRenderedSlice(scrollPx, rowHeightPx, viewableRegionHeightPx) {
|
|
42
|
+
const startIndex = Math.floor(scrollPx / rowHeightPx);
|
|
43
|
+
const proposedRenderedItemsCount = Math.ceil(viewableRegionHeightPx / rowHeightPx) + ROW_VIRTUALIZATION_OVERSCAN;
|
|
44
|
+
return {
|
|
45
|
+
start: startIndex,
|
|
46
|
+
end: startIndex + (proposedRenderedItemsCount % 2 === 0 ? proposedRenderedItemsCount + 1 : proposedRenderedItemsCount)
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function deriveHorizontalScrollPosition(timestampMs, msPerPx, totalBounds) {
|
|
50
|
+
return (timestampMs - totalBounds.startMs) / msPerPx;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { deriveCurrentTimeTranslateX, deriveHorizontalScrollPosition, derivePointElementLayout, deriveRangeElementLayout, deriveRenderedSlice, deriveTranslateXValue };
|
|
55
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","names":[],"sources":["../../../../src/components/gantt/utils/layout.ts"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { ROW_VIRTUALIZATION_OVERSCAN } from '../constants';\nimport type { GanttTimeBounds, GanttTimelineChunkObject } from '../types';\n\nexport function deriveTranslateXValue(\n msPerPx: number,\n timelineChunks: GanttTimelineChunkObject[],\n currentPositionMs: number,\n) {\n const firstTimelineChunk = timelineChunks[0];\n\n if (!firstTimelineChunk) {\n return 0;\n }\n\n const timeOutsideViewableRegion =\n firstTimelineChunk.timestampMs - currentPositionMs;\n\n return timeOutsideViewableRegion / msPerPx;\n}\n\nfunction deriveElementTranslateX(\n renderedRegionBounds: GanttTimeBounds,\n elementStartMs: number,\n totalBounds: GanttTimeBounds,\n msPerPx: number,\n) {\n const distanceFromTimelineStart =\n (elementStartMs - totalBounds.startMs) / msPerPx;\n const offsetMs = renderedRegionBounds.startMs - elementStartMs;\n const offsetPx = offsetMs > 0 ? offsetMs / msPerPx : 0;\n\n return distanceFromTimelineStart + offsetPx;\n}\n\nexport function deriveCurrentTimeTranslateX(\n currentTimeMs: number,\n msPerPx: number,\n currentPositionMs: number,\n) {\n return (currentTimeMs - currentPositionMs) / msPerPx;\n}\n\nexport function deriveRangeElementLayout(\n renderedRegionBounds: GanttTimeBounds,\n rangeElementBounds: GanttTimeBounds,\n totalBounds: GanttTimeBounds,\n msPerPx: number,\n) {\n const renderedStartMs = Math.max(\n renderedRegionBounds.startMs,\n rangeElementBounds.startMs,\n );\n const renderedEndMs = Math.min(\n renderedRegionBounds.endMs,\n rangeElementBounds.endMs,\n );\n\n const translateX = deriveElementTranslateX(\n renderedRegionBounds,\n rangeElementBounds.startMs,\n totalBounds,\n msPerPx,\n );\n\n const widthPx = (renderedEndMs - renderedStartMs) / msPerPx;\n\n return { translateX, widthPx };\n}\n\nexport function derivePointElementLayout(\n renderedRegionBounds: GanttTimeBounds,\n pointElementMs: number,\n totalBounds: GanttTimeBounds,\n msPerPx: number,\n) {\n const translateX = deriveElementTranslateX(\n renderedRegionBounds,\n pointElementMs,\n totalBounds,\n msPerPx,\n );\n\n return { translateX };\n}\n\nexport function deriveRenderedSlice(\n scrollPx: number,\n rowHeightPx: number,\n viewableRegionHeightPx: number,\n) {\n const startIndex = Math.floor(scrollPx / rowHeightPx);\n\n const viewableItems = Math.ceil(viewableRegionHeightPx / rowHeightPx);\n\n const proposedRenderedItemsCount =\n viewableItems + ROW_VIRTUALIZATION_OVERSCAN;\n\n const itemsCountEven = proposedRenderedItemsCount % 2 === 0;\n const itemsCount = itemsCountEven\n ? proposedRenderedItemsCount + 1\n : proposedRenderedItemsCount;\n\n return {\n start: startIndex,\n end: startIndex + itemsCount,\n };\n}\n\nexport function deriveHorizontalScrollPosition(\n timestampMs: number,\n msPerPx: number,\n totalBounds: GanttTimeBounds,\n): number {\n return (timestampMs - totalBounds.startMs) / msPerPx;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAgB,sBACd,SACA,gBACA,mBACA;CACA,MAAM,qBAAqB,eAAe;AAE1C,KAAI,CAAC,mBACH,QAAO;AAMT,SAFE,mBAAmB,cAAc,qBAEA;;AAGrC,SAAS,wBACP,sBACA,gBACA,aACA,SACA;CACA,MAAM,6BACH,iBAAiB,YAAY,WAAW;CAC3C,MAAM,WAAW,qBAAqB,UAAU;AAGhD,QAAO,6BAFU,WAAW,IAAI,WAAW,UAAU;;AAKvD,SAAgB,4BACd,eACA,SACA,mBACA;AACA,SAAQ,gBAAgB,qBAAqB;;AAG/C,SAAgB,yBACd,sBACA,oBACA,aACA,SACA;CACA,MAAM,kBAAkB,KAAK,IAC3B,qBAAqB,SACrB,mBAAmB,QACpB;CACD,MAAM,gBAAgB,KAAK,IACzB,qBAAqB,OACrB,mBAAmB,MACpB;AAWD,QAAO;EAAE,YATU,wBACjB,sBACA,mBAAmB,SACnB,aACA,QACD;EAIoB,UAFJ,gBAAgB,mBAAmB;EAEtB;;AAGhC,SAAgB,yBACd,sBACA,gBACA,aACA,SACA;AAQA,QAAO,EAAE,YAPU,wBACjB,sBACA,gBACA,aACA,QACD,EAEoB;;AAGvB,SAAgB,oBACd,UACA,aACA,wBACA;CACA,MAAM,aAAa,KAAK,MAAM,WAAW,YAAY;CAIrD,MAAM,6BAFgB,KAAK,KAAK,yBAAyB,YAAY,GAGnD;AAOlB,QAAO;EACL,OAAO;EACP,KAAK,cAPgB,6BAA6B,MAAM,IAEtD,6BAA6B,IAC7B;EAKH;;AAGH,SAAgB,+BACd,aACA,SACA,aACQ;AACR,SAAQ,cAAc,YAAY,WAAW"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { GanttDerivedThresholdValue, GanttMetThresholdData, GanttRegion, GanttThreshold, GanttTimeBounds, GanttTimescale } from "../types.js";
|
|
14
|
+
|
|
15
|
+
//#region src/components/gantt/utils/thresholds.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Derives the total data region from the total row count and bounds.
|
|
18
|
+
*/
|
|
19
|
+
declare function deriveTotalDataRegion(totalRowsCount: number, totalBounds: GanttTimeBounds): GanttRegion;
|
|
20
|
+
/**
|
|
21
|
+
* Derives the rendered region from the rendered slice and bounds.
|
|
22
|
+
*/
|
|
23
|
+
declare function deriveRenderedRegion(renderedSlice: {
|
|
24
|
+
start: number;
|
|
25
|
+
end: number;
|
|
26
|
+
}, renderedRegionBounds: GanttTimeBounds): GanttRegion;
|
|
27
|
+
/**
|
|
28
|
+
* Derives temporal threshold values from the threshold object and total data region.
|
|
29
|
+
* Returns null if the threshold values are invalid.
|
|
30
|
+
*/
|
|
31
|
+
declare function deriveTemporalThresholds(threshold: GanttThreshold, totalDataRegion: GanttRegion, timescale: GanttTimescale): GanttDerivedThresholdValue | null;
|
|
32
|
+
/**
|
|
33
|
+
* Derives row index threshold values from the threshold object and total data region.
|
|
34
|
+
* Returns null if the threshold values are invalid.
|
|
35
|
+
*/
|
|
36
|
+
declare function deriveRowIndexThresholds(threshold: GanttThreshold, totalDataRegion: GanttRegion): GanttDerivedThresholdValue | null;
|
|
37
|
+
/**
|
|
38
|
+
* Examines if any thresholds have been met by comparing the rendered region
|
|
39
|
+
* against the derived threshold values.
|
|
40
|
+
* Returns an array of GanttMetThresholdData objects for thresholds that have been met.
|
|
41
|
+
*/
|
|
42
|
+
declare function examineThresholds(renderedRegion: GanttRegion, temporalThresholds: GanttDerivedThresholdValue | null, rowIndexThresholds: GanttDerivedThresholdValue | null): GanttMetThresholdData[];
|
|
43
|
+
/**
|
|
44
|
+
* Validates if the threshold examination should proceed based on input parameters.
|
|
45
|
+
* Returns true if examination should proceed, false otherwise.
|
|
46
|
+
*/
|
|
47
|
+
declare function shouldExamineThresholds(totalRowsCount: number, verticalScrollElement: {
|
|
48
|
+
clientHeight: number;
|
|
49
|
+
} | null, threshold: GanttThreshold | undefined): boolean;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { deriveRenderedRegion, deriveRowIndexThresholds, deriveTemporalThresholds, deriveTotalDataRegion, examineThresholds, shouldExamineThresholds };
|
|
52
|
+
//# sourceMappingURL=thresholds.d.ts.map
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { TIMESCALE_MAPPING } from "../constants.js";
|
|
15
|
+
|
|
16
|
+
//#region src/components/gantt/utils/thresholds.ts
|
|
17
|
+
/**
|
|
18
|
+
* Derives the total data region from the total row count and bounds.
|
|
19
|
+
*/
|
|
20
|
+
function deriveTotalDataRegion(totalRowsCount, totalBounds) {
|
|
21
|
+
return {
|
|
22
|
+
startMs: totalBounds.startMs,
|
|
23
|
+
endMs: totalBounds.endMs,
|
|
24
|
+
startRowIndex: 0,
|
|
25
|
+
endRowIndex: totalRowsCount - 1
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Derives the rendered region from the rendered slice and bounds.
|
|
30
|
+
*/
|
|
31
|
+
function deriveRenderedRegion(renderedSlice, renderedRegionBounds) {
|
|
32
|
+
return {
|
|
33
|
+
startMs: renderedRegionBounds.startMs,
|
|
34
|
+
endMs: renderedRegionBounds.endMs,
|
|
35
|
+
startRowIndex: renderedSlice.start,
|
|
36
|
+
endRowIndex: renderedSlice.end - 1
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Derives temporal threshold values from the threshold object and total data region.
|
|
41
|
+
* Returns null if the threshold values are invalid.
|
|
42
|
+
*/
|
|
43
|
+
function deriveTemporalThresholds(threshold, totalDataRegion, timescale) {
|
|
44
|
+
if (threshold.timescaleMultipleDistance < 0) return null;
|
|
45
|
+
const timescaleMs = TIMESCALE_MAPPING[timescale];
|
|
46
|
+
const relativeValue = threshold.timescaleMultipleDistance * timescaleMs;
|
|
47
|
+
const startThreshold = totalDataRegion.startMs + relativeValue;
|
|
48
|
+
const endThreshold = totalDataRegion.endMs - relativeValue;
|
|
49
|
+
if (startThreshold > endThreshold) return null;
|
|
50
|
+
return {
|
|
51
|
+
start: startThreshold,
|
|
52
|
+
end: endThreshold
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Derives row index threshold values from the threshold object and total data region.
|
|
57
|
+
* Returns null if the threshold values are invalid.
|
|
58
|
+
*/
|
|
59
|
+
function deriveRowIndexThresholds(threshold, totalDataRegion) {
|
|
60
|
+
if (threshold.rowIndexBoundaryDistance < 0) return null;
|
|
61
|
+
const startThreshold = totalDataRegion.startRowIndex + threshold.rowIndexBoundaryDistance;
|
|
62
|
+
const endThreshold = totalDataRegion.endRowIndex - threshold.rowIndexBoundaryDistance;
|
|
63
|
+
if (startThreshold > endThreshold) return null;
|
|
64
|
+
return {
|
|
65
|
+
start: startThreshold,
|
|
66
|
+
end: endThreshold
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Examines if any thresholds have been met by comparing the rendered region
|
|
71
|
+
* against the derived threshold values.
|
|
72
|
+
* Returns an array of GanttMetThresholdData objects for thresholds that have been met.
|
|
73
|
+
*/
|
|
74
|
+
function examineThresholds(renderedRegion, temporalThresholds, rowIndexThresholds) {
|
|
75
|
+
const metThresholds = [];
|
|
76
|
+
if (temporalThresholds) {
|
|
77
|
+
if (renderedRegion.startMs <= temporalThresholds.start) metThresholds.push({
|
|
78
|
+
axis: "horizontal",
|
|
79
|
+
direction: "start",
|
|
80
|
+
value: temporalThresholds.start
|
|
81
|
+
});
|
|
82
|
+
if (renderedRegion.endMs >= temporalThresholds.end) metThresholds.push({
|
|
83
|
+
axis: "horizontal",
|
|
84
|
+
direction: "end",
|
|
85
|
+
value: temporalThresholds.end
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
if (rowIndexThresholds) {
|
|
89
|
+
if (renderedRegion.startRowIndex <= rowIndexThresholds.start) metThresholds.push({
|
|
90
|
+
axis: "vertical",
|
|
91
|
+
direction: "start",
|
|
92
|
+
value: rowIndexThresholds.start
|
|
93
|
+
});
|
|
94
|
+
if (renderedRegion.endRowIndex >= rowIndexThresholds.end) metThresholds.push({
|
|
95
|
+
axis: "vertical",
|
|
96
|
+
direction: "end",
|
|
97
|
+
value: rowIndexThresholds.end
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return metThresholds;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Validates if the threshold examination should proceed based on input parameters.
|
|
104
|
+
* Returns true if examination should proceed, false otherwise.
|
|
105
|
+
*/
|
|
106
|
+
function shouldExamineThresholds(totalRowsCount, verticalScrollElement, threshold) {
|
|
107
|
+
if (!threshold) return false;
|
|
108
|
+
if (totalRowsCount <= 0) return false;
|
|
109
|
+
if (!verticalScrollElement || verticalScrollElement.clientHeight <= 0) return false;
|
|
110
|
+
if (threshold.timescaleMultipleDistance < 0 || threshold.rowIndexBoundaryDistance < 0) return false;
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
//#endregion
|
|
115
|
+
export { deriveRenderedRegion, deriveRowIndexThresholds, deriveTemporalThresholds, deriveTotalDataRegion, examineThresholds, shouldExamineThresholds };
|
|
116
|
+
//# sourceMappingURL=thresholds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thresholds.js","names":["metThresholds: GanttMetThresholdData[]"],"sources":["../../../../src/components/gantt/utils/thresholds.ts"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { TIMESCALE_MAPPING } from '../constants';\nimport type {\n GanttDerivedThresholdValue,\n GanttRegion,\n GanttMetThresholdData,\n GanttThreshold,\n GanttTimeBounds,\n GanttTimescale,\n} from '../types';\n\n/**\n * Derives the total data region from the total row count and bounds.\n */\nexport function deriveTotalDataRegion(\n totalRowsCount: number,\n totalBounds: GanttTimeBounds,\n): GanttRegion {\n return {\n startMs: totalBounds.startMs,\n endMs: totalBounds.endMs,\n startRowIndex: 0,\n endRowIndex: totalRowsCount - 1,\n };\n}\n\n/**\n * Derives the rendered region from the rendered slice and bounds.\n */\nexport function deriveRenderedRegion(\n renderedSlice: { start: number; end: number },\n renderedRegionBounds: GanttTimeBounds,\n): GanttRegion {\n return {\n startMs: renderedRegionBounds.startMs,\n endMs: renderedRegionBounds.endMs,\n startRowIndex: renderedSlice.start,\n endRowIndex: renderedSlice.end - 1, // End index is exclusive in slice\n };\n}\n\n/**\n * Derives temporal threshold values from the threshold object and total data region.\n * Returns null if the threshold values are invalid.\n */\nexport function deriveTemporalThresholds(\n threshold: GanttThreshold,\n totalDataRegion: GanttRegion,\n timescale: GanttTimescale,\n): GanttDerivedThresholdValue | null {\n if (threshold.timescaleMultipleDistance < 0) {\n return null;\n }\n\n const timescaleMs = TIMESCALE_MAPPING[timescale];\n const relativeValue = threshold.timescaleMultipleDistance * timescaleMs;\n\n const startThreshold = totalDataRegion.startMs + relativeValue;\n const endThreshold = totalDataRegion.endMs - relativeValue;\n\n // Validate thresholds\n if (startThreshold > endThreshold) {\n return null;\n }\n\n return {\n start: startThreshold,\n end: endThreshold,\n };\n}\n\n/**\n * Derives row index threshold values from the threshold object and total data region.\n * Returns null if the threshold values are invalid.\n */\nexport function deriveRowIndexThresholds(\n threshold: GanttThreshold,\n totalDataRegion: GanttRegion,\n): GanttDerivedThresholdValue | null {\n if (threshold.rowIndexBoundaryDistance < 0) {\n return null;\n }\n\n const startThreshold =\n totalDataRegion.startRowIndex + threshold.rowIndexBoundaryDistance;\n const endThreshold =\n totalDataRegion.endRowIndex - threshold.rowIndexBoundaryDistance;\n\n // Validate thresholds\n if (startThreshold > endThreshold) {\n return null;\n }\n\n return {\n start: startThreshold,\n end: endThreshold,\n };\n}\n\n/**\n * Examines if any thresholds have been met by comparing the rendered region\n * against the derived threshold values.\n * Returns an array of GanttMetThresholdData objects for thresholds that have been met.\n */\nexport function examineThresholds(\n renderedRegion: GanttRegion,\n temporalThresholds: GanttDerivedThresholdValue | null,\n rowIndexThresholds: GanttDerivedThresholdValue | null,\n): GanttMetThresholdData[] {\n const metThresholds: GanttMetThresholdData[] = [];\n\n // Check temporal thresholds if they are valid\n if (temporalThresholds) {\n if (renderedRegion.startMs <= temporalThresholds.start) {\n metThresholds.push({\n axis: 'horizontal',\n direction: 'start',\n value: temporalThresholds.start,\n });\n }\n\n if (renderedRegion.endMs >= temporalThresholds.end) {\n metThresholds.push({\n axis: 'horizontal',\n direction: 'end',\n value: temporalThresholds.end,\n });\n }\n }\n\n // Check row index thresholds if they are valid\n if (rowIndexThresholds) {\n if (renderedRegion.startRowIndex <= rowIndexThresholds.start) {\n metThresholds.push({\n axis: 'vertical',\n direction: 'start',\n value: rowIndexThresholds.start,\n });\n }\n\n if (renderedRegion.endRowIndex >= rowIndexThresholds.end) {\n metThresholds.push({\n axis: 'vertical',\n direction: 'end',\n value: rowIndexThresholds.end,\n });\n }\n }\n\n return metThresholds;\n}\n\n/**\n * Validates if the threshold examination should proceed based on input parameters.\n * Returns true if examination should proceed, false otherwise.\n */\nexport function shouldExamineThresholds(\n totalRowsCount: number,\n verticalScrollElement: { clientHeight: number } | null,\n threshold: GanttThreshold | undefined,\n): boolean {\n if (!threshold) {\n return false;\n }\n\n if (totalRowsCount <= 0) {\n return false;\n }\n\n if (!verticalScrollElement || verticalScrollElement.clientHeight <= 0) {\n return false;\n }\n\n if (\n threshold.timescaleMultipleDistance < 0 ||\n threshold.rowIndexBoundaryDistance < 0\n ) {\n return false;\n }\n\n return true;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,sBACd,gBACA,aACa;AACb,QAAO;EACL,SAAS,YAAY;EACrB,OAAO,YAAY;EACnB,eAAe;EACf,aAAa,iBAAiB;EAC/B;;;;;AAMH,SAAgB,qBACd,eACA,sBACa;AACb,QAAO;EACL,SAAS,qBAAqB;EAC9B,OAAO,qBAAqB;EAC5B,eAAe,cAAc;EAC7B,aAAa,cAAc,MAAM;EAClC;;;;;;AAOH,SAAgB,yBACd,WACA,iBACA,WACmC;AACnC,KAAI,UAAU,4BAA4B,EACxC,QAAO;CAGT,MAAM,cAAc,kBAAkB;CACtC,MAAM,gBAAgB,UAAU,4BAA4B;CAE5D,MAAM,iBAAiB,gBAAgB,UAAU;CACjD,MAAM,eAAe,gBAAgB,QAAQ;AAG7C,KAAI,iBAAiB,aACnB,QAAO;AAGT,QAAO;EACL,OAAO;EACP,KAAK;EACN;;;;;;AAOH,SAAgB,yBACd,WACA,iBACmC;AACnC,KAAI,UAAU,2BAA2B,EACvC,QAAO;CAGT,MAAM,iBACJ,gBAAgB,gBAAgB,UAAU;CAC5C,MAAM,eACJ,gBAAgB,cAAc,UAAU;AAG1C,KAAI,iBAAiB,aACnB,QAAO;AAGT,QAAO;EACL,OAAO;EACP,KAAK;EACN;;;;;;;AAQH,SAAgB,kBACd,gBACA,oBACA,oBACyB;CACzB,MAAMA,gBAAyC,EAAE;AAGjD,KAAI,oBAAoB;AACtB,MAAI,eAAe,WAAW,mBAAmB,MAC/C,eAAc,KAAK;GACjB,MAAM;GACN,WAAW;GACX,OAAO,mBAAmB;GAC3B,CAAC;AAGJ,MAAI,eAAe,SAAS,mBAAmB,IAC7C,eAAc,KAAK;GACjB,MAAM;GACN,WAAW;GACX,OAAO,mBAAmB;GAC3B,CAAC;;AAKN,KAAI,oBAAoB;AACtB,MAAI,eAAe,iBAAiB,mBAAmB,MACrD,eAAc,KAAK;GACjB,MAAM;GACN,WAAW;GACX,OAAO,mBAAmB;GAC3B,CAAC;AAGJ,MAAI,eAAe,eAAe,mBAAmB,IACnD,eAAc,KAAK;GACjB,MAAM;GACN,WAAW;GACX,OAAO,mBAAmB;GAC3B,CAAC;;AAIN,QAAO;;;;;;AAOT,SAAgB,wBACd,gBACA,uBACA,WACS;AACT,KAAI,CAAC,UACH,QAAO;AAGT,KAAI,kBAAkB,EACpB,QAAO;AAGT,KAAI,CAAC,yBAAyB,sBAAsB,gBAAgB,EAClE,QAAO;AAGT,KACE,UAAU,4BAA4B,KACtC,UAAU,2BAA2B,EAErC,QAAO;AAGT,QAAO"}
|