intergalactic 15.51.0-prerelease.0-prerelease-677bb0c2 → 15.52.0-prerelease-e6d2b891
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/CHANGELOG.md +7 -1
- package/accordion/lib/cjs/Accordion.js +6 -6
- package/accordion/lib/es6/Accordion.js +6 -6
- package/animation/lib/cjs/Animation.js +11 -11
- package/animation/lib/cjs/Collapse.js +28 -28
- package/animation/lib/cjs/FadeInOut.js +28 -28
- package/animation/lib/cjs/Scale.js +28 -28
- package/animation/lib/cjs/Slide.js +28 -28
- package/animation/lib/cjs/Transform.js +28 -28
- package/animation/lib/es6/Animation.js +11 -11
- package/animation/lib/es6/Collapse.js +28 -28
- package/animation/lib/es6/FadeInOut.js +28 -28
- package/animation/lib/es6/Scale.js +28 -28
- package/animation/lib/es6/Slide.js +28 -28
- package/animation/lib/es6/Transform.js +28 -28
- package/badge/lib/cjs/Badge.js +6 -6
- package/badge/lib/es6/Badge.js +6 -6
- package/base-trigger/lib/cjs/BaseTrigger.js +18 -18
- package/base-trigger/lib/cjs/ButtonTrigger.js +3 -3
- package/base-trigger/lib/cjs/FilterTrigger.js +7 -7
- package/base-trigger/lib/cjs/LinkTrigger.js +12 -12
- package/base-trigger/lib/es6/BaseTrigger.js +18 -18
- package/base-trigger/lib/es6/ButtonTrigger.js +3 -3
- package/base-trigger/lib/es6/FilterTrigger.js +7 -7
- package/base-trigger/lib/es6/LinkTrigger.js +12 -12
- package/breadcrumbs/lib/cjs/Breadcrumbs.js +6 -6
- package/breadcrumbs/lib/es6/Breadcrumbs.js +6 -6
- package/button/lib/cjs/Button.js +26 -26
- package/button/lib/es6/Button.js +26 -26
- package/card/lib/cjs/Card.js +8 -8
- package/card/lib/es6/Card.js +8 -8
- package/carousel/lib/cjs/Carousel.js +16 -16
- package/carousel/lib/es6/Carousel.js +16 -16
- package/checkbox/lib/cjs/Checkbox.js +16 -16
- package/checkbox/lib/es6/Checkbox.js +16 -16
- package/color-picker/lib/cjs/ColorPicker.js +23 -23
- package/color-picker/lib/cjs/PaletteManager.js +23 -23
- package/color-picker/lib/cjs/components/InputColor.js +23 -23
- package/color-picker/lib/es6/ColorPicker.js +23 -23
- package/color-picker/lib/es6/PaletteManager.js +23 -23
- package/color-picker/lib/es6/components/InputColor.js +23 -23
- package/components.json +73 -72
- package/counter/lib/cjs/Counter.js +10 -10
- package/counter/lib/es6/Counter.js +10 -10
- package/d3-chart/lib/cjs/Area.js +9 -9
- package/d3-chart/lib/cjs/Axis.js +14 -14
- package/d3-chart/lib/cjs/Bar.js +8 -8
- package/d3-chart/lib/cjs/Bubble.js +10 -10
- package/d3-chart/lib/cjs/Donut.js +7 -7
- package/d3-chart/lib/cjs/Dots.js +8 -8
- package/d3-chart/lib/cjs/HorizontalBar.js +8 -8
- package/d3-chart/lib/cjs/Hover.js +3 -3
- package/d3-chart/lib/cjs/Line.js +9 -9
- package/d3-chart/lib/cjs/Plot.js +3 -3
- package/d3-chart/lib/cjs/Radar.js +17 -17
- package/d3-chart/lib/cjs/RadialTree.js +10 -10
- package/d3-chart/lib/cjs/ReferenceLine.js +9 -9
- package/d3-chart/lib/cjs/ScatterPlot.js +7 -7
- package/d3-chart/lib/cjs/Tooltip.js +8 -8
- package/d3-chart/lib/cjs/Venn.js +7 -7
- package/d3-chart/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/d3-chart/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/d3-chart/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +15 -15
- package/d3-chart/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/d3-chart/lib/es6/Area.js +9 -9
- package/d3-chart/lib/es6/Axis.js +14 -14
- package/d3-chart/lib/es6/Bar.js +8 -8
- package/d3-chart/lib/es6/Bubble.js +10 -10
- package/d3-chart/lib/es6/Donut.js +7 -7
- package/d3-chart/lib/es6/Dots.js +8 -8
- package/d3-chart/lib/es6/HorizontalBar.js +8 -8
- package/d3-chart/lib/es6/Hover.js +3 -3
- package/d3-chart/lib/es6/Line.js +9 -9
- package/d3-chart/lib/es6/Plot.js +3 -3
- package/d3-chart/lib/es6/Radar.js +17 -17
- package/d3-chart/lib/es6/RadialTree.js +10 -10
- package/d3-chart/lib/es6/ReferenceLine.js +9 -9
- package/d3-chart/lib/es6/ScatterPlot.js +7 -7
- package/d3-chart/lib/es6/Tooltip.js +8 -8
- package/d3-chart/lib/es6/Venn.js +7 -7
- package/d3-chart/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/d3-chart/lib/es6/a11y/PlotA11yView.js +2 -2
- package/d3-chart/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +15 -15
- package/d3-chart/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/data-table/lib/cjs/Body.js +4 -4
- package/data-table/lib/cjs/DataTable.js +41 -41
- package/data-table/lib/cjs/Head.js +4 -4
- package/data-table/lib/es6/Body.js +4 -4
- package/data-table/lib/es6/DataTable.js +41 -41
- package/data-table/lib/es6/Head.js +4 -4
- package/date-picker/lib/cjs/components/ButtonTrigger.js +1 -5
- package/date-picker/lib/cjs/components/ButtonTrigger.js.map +1 -1
- package/date-picker/lib/cjs/components/Calendar.js +21 -21
- package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js +65 -42
- package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
- package/date-picker/lib/cjs/components/InputTrigger.js +26 -26
- package/date-picker/lib/cjs/components/PickerAbstract.js +80 -72
- package/date-picker/lib/cjs/components/PickerAbstract.js.map +1 -1
- package/date-picker/lib/cjs/components/RangePickerAbstract.js +97 -86
- package/date-picker/lib/cjs/components/RangePickerAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/ButtonTrigger.js +1 -5
- package/date-picker/lib/es6/components/ButtonTrigger.js.map +1 -1
- package/date-picker/lib/es6/components/Calendar.js +21 -21
- package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js +65 -42
- package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/InputTrigger.js +26 -26
- package/date-picker/lib/es6/components/PickerAbstract.js +80 -72
- package/date-picker/lib/es6/components/PickerAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/RangePickerAbstract.js +97 -86
- package/date-picker/lib/es6/components/RangePickerAbstract.js.map +1 -1
- package/divider/lib/cjs/Divider.js +9 -9
- package/divider/lib/es6/Divider.js +9 -9
- package/dot/lib/cjs/Dot.js +10 -10
- package/dot/lib/es6/Dot.js +10 -10
- package/drag-and-drop/lib/cjs/DragAndDrop.js +12 -12
- package/drag-and-drop/lib/es6/DragAndDrop.js +12 -12
- package/dropdown/lib/cjs/Dropdown.js +2 -2
- package/dropdown/lib/es6/Dropdown.js +2 -2
- package/dropdown-menu/lib/cjs/DropdownMenu.js +12 -12
- package/dropdown-menu/lib/cjs/styleScrollArea.js +6 -6
- package/dropdown-menu/lib/es6/DropdownMenu.js +12 -12
- package/dropdown-menu/lib/es6/styleScrollArea.js +6 -6
- package/ellipsis/lib/cjs/Ellipsis.js +10 -10
- package/ellipsis/lib/es6/Ellipsis.js +10 -10
- package/errors/lib/cjs/Error.js +9 -9
- package/errors/lib/es6/Error.js +9 -9
- package/feature-popover/lib/cjs/FeaturePopover.js +10 -10
- package/feature-popover/lib/es6/FeaturePopover.js +10 -10
- package/feedback-form/lib/cjs/FeedbackForm.js +7 -7
- package/feedback-form/lib/es6/FeedbackForm.js +7 -7
- package/flags/lib/cjs/Flags.js +3 -3
- package/flags/lib/cjs/Flags.js.map +1 -1
- package/flags/lib/es6/Flags.js +3 -3
- package/flags/lib/es6/Flags.js.map +1 -1
- package/flags/lib/sprites/sprite@1x.css +256 -256
- package/flags/lib/sprites/sprite@2x.css +257 -257
- package/flex-box/lib/cjs/Box/useBox.js +3 -3
- package/flex-box/lib/cjs/Flex/useFlex.js +3 -3
- package/flex-box/lib/es6/Box/useBox.js +3 -3
- package/flex-box/lib/es6/Flex/useFlex.js +3 -3
- package/format-text/lib/cjs/FormatText.js +5 -5
- package/format-text/lib/es6/FormatText.js +5 -5
- package/fullscreen-modal/lib/cjs/FullscreenModal.js +13 -13
- package/fullscreen-modal/lib/es6/FullscreenModal.js +13 -13
- package/grid/lib/cjs/Grid.js +114 -114
- package/grid/lib/es6/Grid.js +114 -114
- package/icon/color/Confluence/l/index.js +4 -4
- package/icon/color/Confluence/l/index.mjs +4 -4
- package/icon/color/Confluence/m/index.js +4 -4
- package/icon/color/Confluence/m/index.mjs +4 -4
- package/icon/color/MicrosoftOffice/l/index.js +10 -10
- package/icon/color/MicrosoftOffice/l/index.mjs +10 -10
- package/icon/color/MicrosoftOffice/m/index.js +10 -10
- package/icon/color/MicrosoftOffice/m/index.mjs +10 -10
- package/icon/lib/cjs/Icon.js +5 -5
- package/icon/lib/es6/Icon.js +5 -5
- package/icon/pay/Discover/l/index.js +1 -1
- package/icon/pay/Discover/l/index.mjs +1 -1
- package/icon/pay/Discover/m/index.js +1 -1
- package/icon/pay/Discover/m/index.mjs +1 -1
- package/icon/pay/JCB/l/index.js +10 -10
- package/icon/pay/JCB/l/index.mjs +10 -10
- package/icon/pay/JCB/m/index.js +10 -10
- package/icon/pay/JCB/m/index.mjs +10 -10
- package/icon/pay/Visa/l/index.js +2 -2
- package/icon/pay/Visa/l/index.mjs +2 -2
- package/icon/pay/Visa/m/index.js +2 -2
- package/icon/pay/Visa/m/index.mjs +2 -2
- package/illustration/lib/cjs/index.js +1 -1
- package/illustration/lib/cjs/index.js.map +1 -1
- package/illustration/lib/es6/index.js +1 -1
- package/illustration/lib/es6/index.js.map +1 -1
- package/inline-edit/lib/cjs/InlineEdit.js +4 -4
- package/inline-edit/lib/es6/InlineEdit.js +4 -4
- package/inline-input/lib/cjs/InlineInput.js +18 -18
- package/inline-input/lib/es6/InlineInput.js +18 -18
- package/input/lib/cjs/Input.js +17 -17
- package/input/lib/es6/Input.js +17 -17
- package/input-mask/lib/cjs/InputMask.js +6 -6
- package/input-mask/lib/es6/InputMask.js +6 -6
- package/input-number/lib/cjs/InputNumber.js +9 -9
- package/input-number/lib/es6/InputNumber.js +9 -9
- package/input-tags/lib/cjs/InputTags.js +12 -12
- package/input-tags/lib/es6/InputTags.js +12 -12
- package/link/lib/cjs/Link.js +12 -12
- package/link/lib/es6/Link.js +12 -12
- package/mini-chart/component/score/Donut.d.ts +12 -0
- package/mini-chart/component/score/Line.d.ts +15 -0
- package/mini-chart/component/score/Score.d.ts +20 -0
- package/mini-chart/component/score/index.d.ts +3 -0
- package/mini-chart/component/trend/Bar.d.ts +26 -0
- package/mini-chart/component/trend/Line.d.ts +29 -0
- package/mini-chart/component/trend/Trend.d.ts +36 -0
- package/mini-chart/component/trend/index.d.ts +3 -0
- package/mini-chart/index.d.ts +12 -0
- package/mini-chart/index.js +8 -0
- package/mini-chart/index.mjs +2 -0
- package/mini-chart/lib/cjs/component/score/Donut.js +123 -0
- package/mini-chart/lib/cjs/component/score/Donut.js.map +1 -0
- package/mini-chart/lib/cjs/component/score/Line.js +94 -0
- package/mini-chart/lib/cjs/component/score/Line.js.map +1 -0
- package/mini-chart/lib/cjs/component/score/Score.js +2 -0
- package/mini-chart/lib/cjs/component/score/Score.js.map +1 -0
- package/mini-chart/lib/cjs/component/score/donut.shadow.css +17 -0
- package/mini-chart/lib/cjs/component/score/index.js +26 -0
- package/mini-chart/lib/cjs/component/score/index.js.map +1 -0
- package/mini-chart/lib/cjs/component/score/line.shadow.css +66 -0
- package/mini-chart/lib/cjs/component/skeleton/skeleton.shadow.css +24 -0
- package/mini-chart/lib/cjs/component/trend/Bar.js +124 -0
- package/mini-chart/lib/cjs/component/trend/Bar.js.map +1 -0
- package/mini-chart/lib/cjs/component/trend/Line.js +166 -0
- package/mini-chart/lib/cjs/component/trend/Line.js.map +1 -0
- package/mini-chart/lib/cjs/component/trend/Trend.js +87 -0
- package/mini-chart/lib/cjs/component/trend/Trend.js.map +1 -0
- package/mini-chart/lib/cjs/component/trend/index.js +32 -0
- package/mini-chart/lib/cjs/component/trend/index.js.map +1 -0
- package/mini-chart/lib/cjs/index.js +20 -0
- package/mini-chart/lib/cjs/index.js.map +1 -0
- package/mini-chart/lib/es6/component/score/Donut.js +116 -0
- package/mini-chart/lib/es6/component/score/Donut.js.map +1 -0
- package/mini-chart/lib/es6/component/score/Line.js +87 -0
- package/mini-chart/lib/es6/component/score/Line.js.map +1 -0
- package/mini-chart/lib/es6/component/score/Score.js +2 -0
- package/mini-chart/lib/es6/component/score/Score.js.map +1 -0
- package/mini-chart/lib/es6/component/score/donut.shadow.css +17 -0
- package/mini-chart/lib/es6/component/score/index.js +4 -0
- package/mini-chart/lib/es6/component/score/index.js.map +1 -0
- package/mini-chart/lib/es6/component/score/line.shadow.css +66 -0
- package/mini-chart/lib/es6/component/skeleton/skeleton.shadow.css +24 -0
- package/mini-chart/lib/es6/component/trend/Bar.js +116 -0
- package/mini-chart/lib/es6/component/trend/Bar.js.map +1 -0
- package/mini-chart/lib/es6/component/trend/Line.js +158 -0
- package/mini-chart/lib/es6/component/trend/Line.js.map +1 -0
- package/mini-chart/lib/es6/component/trend/Trend.js +79 -0
- package/mini-chart/lib/es6/component/trend/Trend.js.map +1 -0
- package/mini-chart/lib/es6/component/trend/index.js +4 -0
- package/mini-chart/lib/es6/component/trend/index.js.map +1 -0
- package/mini-chart/lib/es6/index.js +13 -0
- package/mini-chart/lib/es6/index.js.map +1 -0
- package/mini-chart/lib/types/component/score/Donut.d.ts +12 -0
- package/mini-chart/lib/types/component/score/Line.d.ts +15 -0
- package/mini-chart/lib/types/component/score/Score.d.ts +20 -0
- package/mini-chart/lib/types/component/score/index.d.ts +3 -0
- package/mini-chart/lib/types/component/trend/Bar.d.ts +26 -0
- package/mini-chart/lib/types/component/trend/Line.d.ts +29 -0
- package/mini-chart/lib/types/component/trend/Trend.d.ts +36 -0
- package/mini-chart/lib/types/component/trend/index.d.ts +3 -0
- package/mini-chart/lib/types/index.d.ts +12 -0
- package/modal/lib/cjs/Modal.js +7 -7
- package/modal/lib/es6/Modal.js +7 -7
- package/notice/lib/cjs/Notice.js +13 -13
- package/notice/lib/es6/Notice.js +13 -13
- package/notice-bubble/lib/cjs/NoticeBubble.js +12 -12
- package/notice-bubble/lib/es6/NoticeBubble.js +12 -12
- package/notice-global/lib/cjs/NoticeGlobal.js +11 -11
- package/notice-global/lib/es6/NoticeGlobal.js +11 -11
- package/package.json +1 -1
- package/pagination/lib/cjs/Pagination.js +10 -10
- package/pagination/lib/es6/Pagination.js +10 -10
- package/pills/lib/cjs/Pills.js +17 -17
- package/pills/lib/es6/Pills.js +17 -17
- package/popper/lib/cjs/Popper.js +6 -6
- package/popper/lib/es6/Popper.js +6 -6
- package/product-head/lib/cjs/Info.js +4 -4
- package/product-head/lib/cjs/ProductHead.js +5 -5
- package/product-head/lib/cjs/Title.js +4 -4
- package/product-head/lib/es6/Info.js +4 -4
- package/product-head/lib/es6/ProductHead.js +5 -5
- package/product-head/lib/es6/Title.js +4 -4
- package/progress-bar/lib/cjs/ProgressBar.js +15 -15
- package/progress-bar/lib/es6/ProgressBar.js +15 -15
- package/radio/lib/cjs/Radio.js +14 -14
- package/radio/lib/es6/Radio.js +14 -14
- package/scroll-area/lib/cjs/ScrollArea.js +9 -9
- package/scroll-area/lib/cjs/ScrollBar.js +5 -5
- package/scroll-area/lib/es6/ScrollArea.js +9 -9
- package/scroll-area/lib/es6/ScrollBar.js +5 -5
- package/select/lib/cjs/InputSearch.js +6 -6
- package/select/lib/cjs/Select.js +7 -7
- package/select/lib/es6/InputSearch.js +6 -6
- package/select/lib/es6/Select.js +7 -7
- package/side-panel/lib/cjs/SidePanel.js +15 -15
- package/side-panel/lib/es6/SidePanel.js +15 -15
- package/skeleton/lib/cjs/Charts/Area.js +9 -9
- package/skeleton/lib/cjs/Charts/Bar.js +9 -9
- package/skeleton/lib/cjs/Charts/Bubble.js +9 -9
- package/skeleton/lib/cjs/Charts/Donut.js +9 -9
- package/skeleton/lib/cjs/Charts/Histogram.js +9 -9
- package/skeleton/lib/cjs/Charts/Line.js +9 -9
- package/skeleton/lib/cjs/Charts/RadialTree.js +9 -9
- package/skeleton/lib/cjs/Charts/ScatterPlot.js +9 -9
- package/skeleton/lib/cjs/Charts/Venn.js +9 -9
- package/skeleton/lib/cjs/Skeleton.js +8 -8
- package/skeleton/lib/es6/Charts/Area.js +9 -9
- package/skeleton/lib/es6/Charts/Bar.js +9 -9
- package/skeleton/lib/es6/Charts/Bubble.js +9 -9
- package/skeleton/lib/es6/Charts/Donut.js +9 -9
- package/skeleton/lib/es6/Charts/Histogram.js +9 -9
- package/skeleton/lib/es6/Charts/Line.js +9 -9
- package/skeleton/lib/es6/Charts/RadialTree.js +9 -9
- package/skeleton/lib/es6/Charts/ScatterPlot.js +9 -9
- package/skeleton/lib/es6/Charts/Venn.js +9 -9
- package/skeleton/lib/es6/Skeleton.js +8 -8
- package/slider/lib/cjs/Slider.js +7 -7
- package/slider/lib/es6/Slider.js +7 -7
- package/spin/lib/cjs/Spin.js +13 -13
- package/spin/lib/es6/Spin.js +13 -13
- package/spin-container/lib/cjs/SpinContainer.js +8 -8
- package/spin-container/lib/es6/SpinContainer.js +8 -8
- package/sticky/lib/cjs/Sticky.js +2 -2
- package/sticky/lib/es6/Sticky.js +2 -2
- package/switch/lib/cjs/Switch.js +21 -21
- package/switch/lib/es6/Switch.js +21 -21
- package/tab-line/lib/cjs/TabLine.js +13 -13
- package/tab-line/lib/es6/TabLine.js +13 -13
- package/tab-panel/lib/cjs/TabPanel.js +8 -8
- package/tab-panel/lib/es6/TabPanel.js +8 -8
- package/tag/lib/cjs/Tag.js +19 -19
- package/tag/lib/es6/Tag.js +19 -19
- package/textarea/lib/cjs/Textarea.js +8 -8
- package/textarea/lib/es6/Textarea.js +8 -8
- package/time-picker/lib/cjs/TimePicker.js +12 -12
- package/time-picker/lib/es6/TimePicker.js +12 -12
- package/tooltip/lib/cjs/Tooltip.js +6 -6
- package/tooltip/lib/es6/Tooltip.js +6 -6
- package/typography/lib/cjs/Blockquote.js +4 -4
- package/typography/lib/cjs/Hint.js +7 -7
- package/typography/lib/cjs/List.js +5 -5
- package/typography/lib/cjs/Text.js +34 -34
- package/typography/lib/es6/Blockquote.js +4 -4
- package/typography/lib/es6/Hint.js +7 -7
- package/typography/lib/es6/List.js +5 -5
- package/typography/lib/es6/Text.js +34 -34
- package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.js +2 -2
- package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.mjs +2 -2
- package/utils/lib/injectStyle.js +1 -1
- package/utils/lib/injectStyle.js.map +1 -1
- package/utils/lib/injectStyle.mjs +1 -1
- package/utils/lib/injectStyle.mjs.map +1 -1
- package/widget-empty/lib/cjs/WidgetEmpty.js +5 -5
- package/widget-empty/lib/es6/WidgetEmpty.js +5 -5
- package/wizard/lib/cjs/Wizard.js +11 -11
- package/wizard/lib/es6/Wizard.js +11 -11
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RangePickerAbstract.js","names":["_core","require","_react","_interopRequireDefault","_dayjs","_button","_flexBox","_divider","_dropdown","_i18nEnhance","_intergalacticDynamicLocales","_includesDate","style","sstyled","insert","INTERACTION_TAGS","defaultDisplayedPeriod","Date","setHours","getEndDate","value","Array","isArray","_value","_slicedToArray2","startDate","_value$","endDate","RangePickerAbstract","_Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","defaultInteraction","direction","displayedPeriod","asProps","action","date","dayjs","navigateStep","toDate","handlers","navigateView","e","target","currentTarget","_this$asProps","highlighted","preselectedValue","day","keyDiff","code","setNextDisplayedPeriod","next_highlighted","_next_highlighted","left_period","right_period","monthDisplayedPeriod","getMonth","period","subtract","highlightedDate","isDisabled","handleChange","preventDefault","includes","tagName","add","keyStep","_value2","_value2$","state","setState","_createClass2","key","uncontrolledProps","_this2","visible","_this2$asProps","undefined","props","_value$2","_value$3","disabled","some","includesDate","getDefaultPeriods","getButtonTriggerProps","_this$asProps2","size","empty","onKeyDown","handlerKeyDown","setDefaultInteractionToClick","getPopperProps","Picker","CORE_INSTANCE","_this$asProps3","_this$asProps3$period","periods","unclearable","buttons","createElement","Fragment","Apply","Reset","ml","tabIndex","children","Flex","Box","mr","Header","Prev","Title","Calendar","Next","m","orientation","h","Period","mt","getHeaderProps","getTitleProps","index","_this$asProps4","locale","Intl","DateTimeFormat","month","year","format","startOf","getNextProps","onClick","bindHandlerNavigateClick","getI18nText","getPrevProps","getCalendarProps","_props","_this$asProps5","onHighlightedChange","onVisibleChange","onChange","getPeriodProps","_this$asProps6","_this$asProps6$period","onDisplayedPeriodChange","handleApply","getApplyProps","_this3","_this$asProps7","getResetProps","_this4","render","_ref","_ref4","_this$asProps8","Children","styles","providedAriaLabel","Dropdown","assignProps","cn","defaultProps","_ref5","defaultValue","i18n","localizedMessages","defaultHighlighted","defaultVisible","defaultPreselectedValue","Component","i18nEnhance","amount","unit","_ref2","arguments[0]","Button","_ref3","_default","exports"],"sources":["../../../src/components/RangePickerAbstract.jsx"],"sourcesContent":["import React from 'react';\nimport dayjs from 'dayjs';\nimport { Component, Root, CORE_INSTANCE, sstyled } from '@semcore/core';\nimport Button from '@semcore/button';\nimport { Box, Flex } from '@semcore/flex-box';\nimport Divider from '@semcore/divider';\nimport Dropdown from '@semcore/dropdown';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport { localizedMessages } from '../translations/__intergalactic-dynamic-locales';\nimport includesDate from '../utils/includesDate';\n\nimport style from '../style/date-picker.shadow.css';\n\nconst INTERACTION_TAGS = ['INPUT'];\n\nconst defaultDisplayedPeriod = new Date(new Date().setHours(0, 0, 0, 0));\n\nfunction getEndDate(value) {\n if (!Array.isArray(value)) return null;\n const [startDate, endDate = startDate] = value;\n return endDate;\n}\n\nclass RangePickerAbstract extends Component {\n static displayName = 'DatePicker';\n static style = style;\n\n static defaultProps({ value, defaultValue }) {\n return {\n i18n: localizedMessages,\n locale: 'en',\n defaultDisplayedPeriod:\n getEndDate(value) || getEndDate(defaultValue) || defaultDisplayedPeriod,\n defaultValue: [],\n defaultHighlighted: [],\n defaultVisible: false,\n defaultPreselectedValue: [],\n disabled: [],\n size: 'm',\n };\n }\n\n static enhance = [i18nEnhance(localizedMessages)];\n\n static add = (date, amount, unit) => {\n return dayjs(date).add(amount, unit).toDate();\n };\n\n static subtract = (date, amount, unit) => {\n return dayjs(date).subtract(amount, unit).toDate();\n };\n\n navigateStep;\n keyDiff;\n keyStep;\n\n state = {\n // To remove after removing button trigger\n defaultInteraction: 'focus',\n };\n\n uncontrolledProps() {\n return {\n displayedPeriod: null,\n visible: [\n null,\n (visible) => {\n const { value, displayedPeriod } = this.asProps;\n\n if (!visible) {\n this.handlers.highlighted([]);\n this.handlers.preselectedValue([]);\n this.handlers.displayedPeriod(\n getEndDate(value ?? undefined) || this.props.defaultDisplayedPeriod,\n );\n }\n\n if (visible && value && value !== displayedPeriod) {\n this.handlers.displayedPeriod(getEndDate(value));\n }\n },\n ],\n highlighted: null,\n preselectedValue: null,\n value: [\n null,\n (value) => {\n this.handlers.visible(false);\n this.handlers.displayedPeriod(getEndDate([value[0] ?? undefined, value[1] ?? undefined]));\n },\n ],\n };\n }\n navigateView = (direction) => {\n const { displayedPeriod } = this.asProps;\n const action = direction >= 1 ? 'add' : 'subtract';\n const date = dayjs(displayedPeriod)[action](1, this.navigateStep).toDate();\n this.handlers.displayedPeriod(date);\n };\n\n bindHandlerNavigateClick = (direction) => () => this.navigateView(direction);\n\n handlerKeyDown = (e) => {\n if (e.target !== e.currentTarget) return;\n const { displayedPeriod, highlighted, preselectedValue } = this.asProps;\n const day = this.keyDiff[e.code];\n\n const setNextDisplayedPeriod = (next_highlighted) => {\n const [left_period, right_period] = next_highlighted;\n\n const monthDisplayedPeriod = displayedPeriod?.getMonth();\n const period = right_period || left_period;\n\n if (period) {\n if (!monthDisplayedPeriod) {\n return period;\n }\n\n if (period.getMonth() - monthDisplayedPeriod > 1) {\n return RangePickerAbstract.subtract(period, 1, 'month');\n } else if (period.getMonth() - monthDisplayedPeriod < 0) {\n return period;\n }\n }\n return displayedPeriod;\n };\n\n if (e.code === 'Space' && highlighted.length) {\n const highlightedDate = highlighted[1] || highlighted[0];\n\n if (!this.isDisabled(highlightedDate)) {\n this.handleChange(highlightedDate);\n }\n e.preventDefault();\n }\n if (day) {\n if (INTERACTION_TAGS.includes(e.target.tagName)) return;\n if (highlighted.length) {\n let next_highlighted;\n if (preselectedValue.length === 1) {\n next_highlighted = [\n preselectedValue[0],\n dayjs(highlighted[1] || highlighted[0])\n .add(day, this.keyStep)\n .toDate(),\n ];\n } else {\n next_highlighted = [\n dayjs(highlighted[0])\n .add(day, this.keyStep)\n .toDate(),\n ];\n }\n this.handlers.highlighted(next_highlighted);\n this.handlers.displayedPeriod(setNextDisplayedPeriod(next_highlighted));\n } else {\n this.handlers.highlighted([displayedPeriod ? displayedPeriod : dayjs().toDate()]);\n }\n e.preventDefault();\n }\n };\n\n isDisabled(date) {\n const { disabled } = this.asProps;\n\n return disabled.some(includesDate(dayjs(date), 'date'));\n }\n\n handleApply = (value) => {\n const [startDate, endDate = startDate] = value;\n this.handleChange([]);\n this.handlers.value([startDate, endDate]);\n };\n\n handleChange = (date) => {\n let { preselectedValue } = this.asProps;\n let highlighted = [];\n if (Array.isArray(date)) {\n preselectedValue = date;\n } else if (!preselectedValue.length) {\n preselectedValue = [date];\n highlighted = [date];\n } else if (preselectedValue.length >= 2) {\n preselectedValue = [date];\n highlighted = [date];\n } else if (preselectedValue[0] > date) {\n preselectedValue = [date, preselectedValue[0]];\n } else {\n preselectedValue = [preselectedValue[0], date];\n }\n\n this.handlers.preselectedValue(preselectedValue);\n this.handlers.highlighted(highlighted);\n };\n\n getDefaultPeriods() {\n return [];\n }\n\n setDefaultInteractionToClick = () => {\n if (this.state.defaultInteraction === 'click') return;\n this.setState({ defaultInteraction: 'click' });\n };\n\n getButtonTriggerProps() {\n const { value, size } = this.asProps;\n\n return {\n size,\n empty: !value[0] && !value[1],\n onKeyDown: this.handlerKeyDown,\n setDefaultInteractionToClick: this.setDefaultInteractionToClick,\n };\n }\n\n getPopperProps() {\n const Picker = this[CORE_INSTANCE];\n const { periods = this.getDefaultPeriods(), unclearable } = this.asProps;\n\n const buttons = (\n <>\n <Picker.Apply />\n {!unclearable && <Picker.Reset ml={2} />}\n </>\n );\n\n return {\n tabIndex: 0,\n onKeyDown: this.handlerKeyDown,\n children: (\n <>\n <Flex>\n <Box mr={2}>\n <Picker.Header>\n <Picker.Prev />\n <Picker.Title />\n </Picker.Header>\n <Picker.Calendar />\n </Box>\n <Box ml={2}>\n <Picker.Header>\n <Picker.Title />\n <Picker.Next />\n </Picker.Header>\n <Picker.Calendar />\n </Box>\n {periods.length ? (\n <>\n <Divider m='-16px 16px' orientation='vertical' h='auto' />\n <Flex direction='column'>\n <Picker.Period />\n <Flex mt='auto'>{buttons}</Flex>\n </Flex>\n </>\n ) : (\n <Flex mt={4}>{buttons}</Flex>\n )}\n </Flex>\n </>\n ),\n };\n }\n\n getHeaderProps() {\n const Picker = this[CORE_INSTANCE];\n return {\n children: (\n <>\n <Picker.Prev />\n <Picker.Title />\n <Picker.Next />\n </>\n ),\n };\n }\n\n getTitleProps(props, index) {\n const { locale, displayedPeriod } = this.asProps;\n return {\n children: new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' }).format(\n dayjs(displayedPeriod).add(index, this.navigateStep).startOf(this.navigateStep).toDate(),\n ),\n };\n }\n\n getNextProps() {\n return {\n onClick: this.bindHandlerNavigateClick(1),\n getI18nText: this.asProps.getI18nText,\n };\n }\n\n getPrevProps() {\n return {\n onClick: this.bindHandlerNavigateClick(-1),\n getI18nText: this.asProps.getI18nText,\n };\n }\n\n getCalendarProps(_props, index) {\n const {\n locale,\n displayedPeriod,\n disabled,\n value,\n highlighted,\n onHighlightedChange,\n onVisibleChange,\n preselectedValue,\n } = this.asProps;\n\n return {\n locale,\n displayedPeriod: dayjs(displayedPeriod)\n .add(index, this.navigateStep)\n .startOf(this.navigateStep)\n .toDate(),\n disabled,\n highlighted,\n onHighlightedChange,\n onVisibleChange,\n value: preselectedValue.length ? preselectedValue : value,\n onChange: this.handleChange,\n };\n }\n\n getPeriodProps() {\n const {\n periods = this.getDefaultPeriods(),\n value,\n onHighlightedChange,\n onDisplayedPeriodChange,\n preselectedValue,\n } = this.asProps;\n return {\n periods,\n value: preselectedValue.length ? preselectedValue : value,\n onChange: this.handleApply,\n onHighlightedChange,\n onDisplayedPeriodChange,\n };\n }\n\n getApplyProps() {\n const { value, getI18nText, preselectedValue } = this.asProps;\n return {\n getI18nText,\n onClick: () => this.handleApply(preselectedValue.length ? preselectedValue : value),\n };\n }\n\n getResetProps() {\n const { getI18nText } = this.asProps;\n return {\n getI18nText,\n onClick: () => this.handleApply([]),\n };\n }\n\n render() {\n const { Children, styles, 'aria-label': providedAriaLabel } = this.asProps;\n const { defaultInteraction } = this.state;\n\n return (\n <>\n {sstyled(styles)(\n <Root\n render={Dropdown}\n use:aria-label={providedAriaLabel}\n interaction={defaultInteraction}\n __excludeProps={['onChange', 'value']}\n >\n <Children />\n </Root>,\n )}\n </>\n );\n }\n}\n\nfunction Apply(props) {\n const { getI18nText } = props;\n return <Root render={Button} use='primary' children={getI18nText('apply')} />;\n}\n\nfunction Reset(props) {\n const { getI18nText } = props;\n return <Root render={Button} use='tertiary' theme='muted' children={getI18nText('reset')} />;\n}\n\nexport { Apply, Reset };\n\nexport default RangePickerAbstract;\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,OAAA,GAAAF,sBAAA,CAAAF,O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L,KAAA,CAAA+K,WAAA;IAAA,OAAM,SAAS;IAAA,YAAW1B,WAAW,CAAC,OAAO;EAAC,GAAAwC,KAAA,EAAI;AAC/E;AAEA,SAASvE,KAAKA,CAACzB,KAAK,EAAE;EAAA,IAAAmG,KAAA,GAAAF,YAAA;EACpB,IAAQzC,WAAW,GAAKxD,KAAK,CAArBwD,WAAW;EACnB,oBAAOnJ,MAAA,YAAAiH,aAAA,CAAc4E,kBAAM,MAAA/L,KAAA,CAAA+K,WAAA;IAAA,OAAM,UAAU;IAAA,SAAO,OAAO;IAAA,YAAW1B,WAAW,CAAC,OAAO;EAAC,GAAA2C,KAAA,EAAI;AAC9F;AAAC,IAAAC,QAAA,GAIcrK,mBAAmB;AAAAsK,OAAA,cAAAD,QAAA"}
|
1
|
+
{"version":3,"file":"RangePickerAbstract.js","names":["_core","require","_react","_interopRequireDefault","_dayjs","_button","_flexBox","_divider","_dropdown","_i18nEnhance","_intergalacticDynamicLocales","_includesDate","style","sstyled","insert","INTERACTION_TAGS","INTERACTION_KEYS","defaultDisplayedPeriod","Date","setHours","getEndDate","value","Array","isArray","_value","_slicedToArray2","startDate","_value$","endDate","RangePickerAbstract","_Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","React","createRef","direction","displayedPeriod","asProps","action","date","dayjs","navigateStep","toDate","handlers","navigateView","place","e","_this$asProps","highlighted","preselectedValue","visible","key","code","includes","stopPropagation","setTimeout","popper","popperRef","current","focus","target","currentTarget","day","keyDiff","setNextDisplayedPeriod","next_highlighted","_next_highlighted","left_period","right_period","monthDisplayedPeriod","getMonth","period","subtract","highlightedDate","isDisabled","handleChange","preventDefault","tagName","add","keyStep","_value2","_value2$","_createClass2","uncontrolledProps","_this2","_this2$asProps","undefined","_this2$props","props","_value$2","_value$3","disabled","some","includesDate","getDefaultPeriods","getButtonTriggerProps","_this$asProps2","size","empty","onKeyDown","handlerKeyDown","getPopperProps","Picker","CORE_INSTANCE","_this$asProps3","_this$asProps3$period","periods","unclearable","buttons","createElement","Fragment","Apply","Reset","ml","tabIndex","ref","children","Flex","Box","mr","Header","Prev","Title","Calendar","Next","m","orientation","h","Period","mt","getHeaderProps","getTitleProps","index","_this$asProps4","locale","Intl","DateTimeFormat","month","year","format","startOf","getNextProps","onClick","bindHandlerNavigateClick","getI18nText","getPrevProps","getCalendarProps","_props","_this$asProps5","onHighlightedChange","onVisibleChange","onChange","getPeriodProps","_this$asProps6","_this$asProps6$period","onDisplayedPeriodChange","handleApply","getApplyProps","_this3","_this$asProps7","getResetProps","_this4","render","_ref","_ref4","_this$asProps8","Children","styles","providedAriaLabel","Dropdown","assignProps","cn","defaultProps","_ref5","defaultValue","i18n","localizedMessages","defaultHighlighted","defaultVisible","defaultPreselectedValue","Component","i18nEnhance","amount","unit","_ref2","arguments[0]","Button","_ref3","_default","exports"],"sources":["../../../src/components/RangePickerAbstract.jsx"],"sourcesContent":["import React from 'react';\nimport dayjs from 'dayjs';\nimport { Component, Root, CORE_INSTANCE, sstyled } from '@semcore/core';\nimport Button from '@semcore/button';\nimport { Box, Flex } from '@semcore/flex-box';\nimport Divider from '@semcore/divider';\nimport Dropdown from '@semcore/dropdown';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport { localizedMessages } from '../translations/__intergalactic-dynamic-locales';\nimport includesDate from '../utils/includesDate';\n\nimport style from '../style/date-picker.shadow.css';\n\nconst INTERACTION_TAGS = ['INPUT'];\nconst INTERACTION_KEYS = ['ArrowDown', 'Enter', 'Space'];\n\nconst defaultDisplayedPeriod = new Date(new Date().setHours(0, 0, 0, 0));\n\nfunction getEndDate(value) {\n if (!Array.isArray(value)) return null;\n const [startDate, endDate = startDate] = value;\n return endDate;\n}\n\nclass RangePickerAbstract extends Component {\n static displayName = 'DatePicker';\n static style = style;\n\n static defaultProps({ value, defaultValue }) {\n return {\n i18n: localizedMessages,\n locale: 'en',\n defaultDisplayedPeriod:\n getEndDate(value) || getEndDate(defaultValue) || defaultDisplayedPeriod,\n defaultValue: [],\n defaultHighlighted: [],\n defaultVisible: false,\n defaultPreselectedValue: [],\n disabled: [],\n size: 'm',\n };\n }\n\n static enhance = [i18nEnhance(localizedMessages)];\n\n static add = (date, amount, unit) => {\n return dayjs(date).add(amount, unit).toDate();\n };\n\n static subtract = (date, amount, unit) => {\n return dayjs(date).subtract(amount, unit).toDate();\n };\n\n popperRef = React.createRef();\n\n navigateStep;\n keyDiff;\n keyStep;\n\n uncontrolledProps() {\n return {\n displayedPeriod: null,\n visible: [\n null,\n (visible) => {\n const { value, displayedPeriod } = this.asProps;\n const endDate = getEndDate(value ?? undefined);\n\n if (!visible) {\n this.handlers.highlighted([]);\n this.handlers.preselectedValue([]);\n }\n\n if (visible) {\n if (endDate && endDate !== displayedPeriod) {\n this.handlers.displayedPeriod(endDate);\n } else if (!endDate) {\n const { displayedPeriod, defaultDisplayedPeriod } = this.props;\n this.handlers.displayedPeriod(displayedPeriod || defaultDisplayedPeriod);\n }\n }\n },\n ],\n highlighted: null,\n preselectedValue: null,\n value: [\n null,\n (value) => {\n this.handlers.visible(false);\n this.handlers.displayedPeriod(getEndDate([value[0] ?? undefined, value[1] ?? undefined]));\n },\n ],\n };\n }\n navigateView = (direction) => {\n const { displayedPeriod } = this.asProps;\n const action = direction >= 1 ? 'add' : 'subtract';\n const date = dayjs(displayedPeriod)[action](1, this.navigateStep).toDate();\n this.handlers.displayedPeriod(date);\n };\n\n bindHandlerNavigateClick = (direction) => () => this.navigateView(direction);\n\n handlerKeyDown = (place) => (e) => {\n const { displayedPeriod, highlighted, preselectedValue, visible } = this.asProps;\n const key = e.code;\n\n if (place === 'trigger' && INTERACTION_KEYS.includes(key)) {\n e.stopPropagation();\n this.handlers.visible(!visible);\n\n setTimeout(() => {\n const popper = this.popperRef.current;\n\n if (popper) {\n popper.focus();\n }\n }, 0);\n }\n\n if (e.target !== e.currentTarget) return;\n const day = this.keyDiff[key];\n\n const setNextDisplayedPeriod = (next_highlighted) => {\n const [left_period, right_period] = next_highlighted;\n\n const monthDisplayedPeriod = displayedPeriod?.getMonth();\n const period = right_period || left_period;\n\n if (period) {\n if (!monthDisplayedPeriod) {\n return period;\n }\n\n if (period.getMonth() - monthDisplayedPeriod > 1) {\n return RangePickerAbstract.subtract(period, 1, 'month');\n } else if (period.getMonth() - monthDisplayedPeriod < 0) {\n return period;\n }\n }\n return displayedPeriod;\n };\n\n if (place === 'popper' && e.code === 'Space' && highlighted.length) {\n const highlightedDate = highlighted[1] || highlighted[0];\n\n if (!this.isDisabled(highlightedDate)) {\n this.handleChange(highlightedDate);\n }\n e.preventDefault();\n }\n if (day) {\n if (INTERACTION_TAGS.includes(e.target.tagName)) return;\n if (highlighted.length) {\n let next_highlighted;\n if (preselectedValue.length === 1) {\n next_highlighted = [\n preselectedValue[0],\n dayjs(highlighted[1] || highlighted[0])\n .add(day, this.keyStep)\n .toDate(),\n ];\n } else {\n next_highlighted = [\n dayjs(highlighted[0])\n .add(day, this.keyStep)\n .toDate(),\n ];\n }\n this.handlers.highlighted(next_highlighted);\n this.handlers.displayedPeriod(setNextDisplayedPeriod(next_highlighted));\n } else {\n this.handlers.highlighted([displayedPeriod ? displayedPeriod : dayjs().toDate()]);\n }\n e.preventDefault();\n }\n };\n\n isDisabled(date) {\n const { disabled } = this.asProps;\n\n return disabled.some(includesDate(dayjs(date), 'date'));\n }\n\n handleApply = (value) => {\n const [startDate, endDate = startDate] = value;\n this.handleChange([]);\n this.handlers.value([startDate, endDate]);\n };\n\n handleChange = (date) => {\n let { preselectedValue } = this.asProps;\n let highlighted = [];\n if (Array.isArray(date)) {\n preselectedValue = date;\n } else if (!preselectedValue.length) {\n preselectedValue = [date];\n highlighted = [date];\n } else if (preselectedValue.length >= 2) {\n preselectedValue = [date];\n highlighted = [date];\n } else if (preselectedValue[0] > date) {\n preselectedValue = [date, preselectedValue[0]];\n } else {\n preselectedValue = [preselectedValue[0], date];\n }\n\n this.handlers.preselectedValue(preselectedValue);\n this.handlers.highlighted(highlighted);\n };\n\n getDefaultPeriods() {\n return [];\n }\n\n getButtonTriggerProps() {\n const { value, size } = this.asProps;\n\n return {\n size,\n empty: !value[0] && !value[1],\n onKeyDown: this.handlerKeyDown('trigger'),\n };\n }\n\n getPopperProps() {\n const Picker = this[CORE_INSTANCE];\n const { periods = this.getDefaultPeriods(), unclearable } = this.asProps;\n\n const buttons = (\n <>\n <Picker.Apply />\n {!unclearable && <Picker.Reset ml={2} />}\n </>\n );\n\n return {\n tabIndex: 0,\n ref: this.popperRef,\n onKeyDown: this.handlerKeyDown('popper'),\n children: (\n <>\n <Flex>\n <Box mr={2}>\n <Picker.Header>\n <Picker.Prev />\n <Picker.Title />\n </Picker.Header>\n <Picker.Calendar />\n </Box>\n <Box ml={2}>\n <Picker.Header>\n <Picker.Title />\n <Picker.Next />\n </Picker.Header>\n <Picker.Calendar />\n </Box>\n {periods.length ? (\n <>\n <Divider m='-16px 16px' orientation='vertical' h='auto' />\n <Flex direction='column'>\n <Picker.Period />\n <Flex mt='auto'>{buttons}</Flex>\n </Flex>\n </>\n ) : (\n <Flex mt={4}>{buttons}</Flex>\n )}\n </Flex>\n </>\n ),\n };\n }\n\n getHeaderProps() {\n const Picker = this[CORE_INSTANCE];\n return {\n children: (\n <>\n <Picker.Prev />\n <Picker.Title />\n <Picker.Next />\n </>\n ),\n };\n }\n\n getTitleProps(props, index) {\n const { locale, displayedPeriod } = this.asProps;\n return {\n children: new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' }).format(\n dayjs(displayedPeriod).add(index, this.navigateStep).startOf(this.navigateStep).toDate(),\n ),\n };\n }\n\n getNextProps() {\n return {\n onClick: this.bindHandlerNavigateClick(1),\n getI18nText: this.asProps.getI18nText,\n };\n }\n\n getPrevProps() {\n return {\n onClick: this.bindHandlerNavigateClick(-1),\n getI18nText: this.asProps.getI18nText,\n };\n }\n\n getCalendarProps(_props, index) {\n const {\n locale,\n displayedPeriod,\n disabled,\n value,\n highlighted,\n onHighlightedChange,\n onVisibleChange,\n preselectedValue,\n } = this.asProps;\n\n return {\n locale,\n displayedPeriod: dayjs(displayedPeriod)\n .add(index, this.navigateStep)\n .startOf(this.navigateStep)\n .toDate(),\n disabled,\n highlighted,\n onHighlightedChange,\n onVisibleChange,\n value: preselectedValue.length ? preselectedValue : value,\n onChange: this.handleChange,\n };\n }\n\n getPeriodProps() {\n const {\n periods = this.getDefaultPeriods(),\n value,\n onHighlightedChange,\n onDisplayedPeriodChange,\n preselectedValue,\n } = this.asProps;\n return {\n periods,\n value: preselectedValue.length ? preselectedValue : value,\n onChange: this.handleApply,\n onHighlightedChange,\n onDisplayedPeriodChange,\n };\n }\n\n getApplyProps() {\n const { value, getI18nText, preselectedValue } = this.asProps;\n return {\n getI18nText,\n onClick: () => this.handleApply(preselectedValue.length ? preselectedValue : value),\n };\n }\n\n getResetProps() {\n const { getI18nText } = this.asProps;\n return {\n getI18nText,\n onClick: () => this.handleApply([]),\n };\n }\n\n render() {\n const { Children, styles, 'aria-label': providedAriaLabel } = this.asProps;\n\n return (\n <>\n {sstyled(styles)(\n <Root\n render={Dropdown}\n use:aria-label={providedAriaLabel}\n __excludeProps={['onChange', 'value']}\n >\n <Children />\n </Root>,\n )}\n </>\n );\n }\n}\n\nfunction Apply(props) {\n const { getI18nText } = props;\n return <Root render={Button} use='primary' children={getI18nText('apply')} />;\n}\n\nfunction Reset(props) {\n const { getI18nText } = props;\n return <Root render={Button} use='tertiary' theme='muted' children={getI18nText('reset')} />;\n}\n\nexport { Apply, Reset };\n\nexport default RangePickerAbstract;\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,OAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,QA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I,MAAM,EAAE;AAC/C,CAAC;AAAA,IAAAX,gBAAA,aAvBGf,mBAAmB,cAyBL,UAACuB,IAAI,EAAE+I,MAAM,EAAEC,IAAI,EAAK;EACxC,OAAO,IAAA/I,iBAAK,EAACD,IAAI,CAAC,CAACiC,QAAQ,CAAC8G,MAAM,EAAEC,IAAI,CAAC,CAAC7I,MAAM,EAAE;AACpD,CAAC;AAkVH,SAASqE,KAAKA,CAACvB,KAAK,EAAE;EAAA,IAAAgG,KAAA,GAAAC,YAAA;EACpB,IAAQzC,WAAW,GAAKxD,KAAK,CAArBwD,WAAW;EACnB,oBAAO3J,MAAA,YAAAwH,aAAA,CAAc6E,kBAAM,MAAAvM,KAAA,CAAAuL,WAAA;IAAA,OAAM,SAAS;IAAA,YAAW1B,WAAW,CAAC,OAAO;EAAC,GAAAwC,KAAA,EAAI;AAC/E;AAEA,SAASxE,KAAKA,CAACxB,KAAK,EAAE;EAAA,IAAAmG,KAAA,GAAAF,YAAA;EACpB,IAAQzC,WAAW,GAAKxD,KAAK,CAArBwD,WAAW;EACnB,oBAAO3J,MAAA,YAAAwH,aAAA,CAAc6E,kBAAM,MAAAvM,KAAA,CAAAuL,WAAA;IAAA,OAAM,UAAU;IAAA,SAAO,OAAO;IAAA,YAAW1B,WAAW,CAAC,OAAO;EAAC,GAAA2C,KAAA,EAAI;AAC9F;AAAC,IAAAC,QAAA,GAIc5K,mBAAmB;AAAA6K,OAAA,cAAAD,QAAA"}
|
@@ -6,11 +6,7 @@ import Calendar from 'intergalactic/icon/Calendar/m';
|
|
6
6
|
import createComponent, { Root } from 'intergalactic/core';
|
7
7
|
var ButtonTriggerRoot = function ButtonTriggerRoot(_ref2) {
|
8
8
|
var _ref = arguments[0];
|
9
|
-
var Children = _ref2.Children
|
10
|
-
setDefaultInteractionToClick = _ref2.setDefaultInteractionToClick;
|
11
|
-
React.useEffect(function () {
|
12
|
-
setDefaultInteractionToClick === null || setDefaultInteractionToClick === void 0 ? void 0 : setDefaultInteractionToClick();
|
13
|
-
}, [setDefaultInteractionToClick]);
|
9
|
+
var Children = _ref2.Children;
|
14
10
|
return /*#__PURE__*/React.createElement(BaseTrigger, _assignProps({}, _ref), /*#__PURE__*/React.createElement(ButtonTrigger.Addon, {
|
15
11
|
tag: Calendar
|
16
12
|
}), addonTextChildren(Children, ButtonTrigger.Text, ButtonTrigger.Addon, true));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ButtonTrigger.js","names":["React","BaseTrigger","addonTextChildren","Calendar","createComponent","Root","ButtonTriggerRoot","_ref2","_ref","arguments[0]","Children","
|
1
|
+
{"version":3,"file":"ButtonTrigger.js","names":["React","BaseTrigger","addonTextChildren","Calendar","createComponent","Root","ButtonTriggerRoot","_ref2","_ref","arguments[0]","Children","createElement","_assignProps","ButtonTrigger","Addon","tag","Text","displayName"],"sources":["../../../src/components/ButtonTrigger.jsx"],"sourcesContent":["import React from 'react';\nimport BaseTrigger from '@semcore/base-trigger';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\nimport Calendar from '@semcore/icon/Calendar/m';\nimport createComponent, { Root } from '@semcore/core';\n\nconst ButtonTriggerRoot = ({ Children }) => {\n return (\n <Root render={BaseTrigger}>\n <ButtonTrigger.Addon tag={Calendar} />\n {addonTextChildren(Children, ButtonTrigger.Text, ButtonTrigger.Addon, true)}\n </Root>\n );\n};\n\nButtonTriggerRoot.displayName = 'ButtonTrigger';\n\nconst ButtonTrigger = createComponent(ButtonTriggerRoot, {\n Text: BaseTrigger.Text,\n Addon: BaseTrigger.Addon,\n});\n\nexport default ButtonTrigger;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,WAAW,MAAM,uBAAuB;AAC/C,OAAOC,iBAAiB,MAAM,sCAAsC;AACpE,OAAOC,QAAQ,MAAM,0BAA0B;AAC/C,OAAOC,eAAe,IAAIC,IAAI,QAAQ,eAAe;AAErD,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,KAAA,EAAqB;EAAA,IAAAC,IAAA,GAAAC,YAAA;EAAA,IAAfC,QAAQ,GAAAH,KAAA,CAARG,QAAQ;EACnC,oBACEV,KAAA,CAAAW,aAAA,CAAcV,WAAW,EAAAW,YAAA,KAAAJ,IAAA,gBACvBR,KAAA,CAAAW,aAAA,CAACE,aAAa,CAACC,KAAK;IAACC,GAAG,EAAEZ;EAAS,EAAG,EACrCD,iBAAiB,CAACQ,QAAQ,EAAEG,aAAa,CAACG,IAAI,EAAEH,aAAa,CAACC,KAAK,EAAE,IAAI,CAAC,CACtE;AAEX,CAAC;AAEDR,iBAAiB,CAACW,WAAW,GAAG,eAAe;AAE/C,IAAMJ,aAAa,GAAGT,eAAe,CAACE,iBAAiB,EAAE;EACvDU,IAAI,EAAEf,WAAW,CAACe,IAAI;EACtBF,KAAK,EAAEb,WAAW,CAACa;AACrB,CAAC,CAAC;AAEF,eAAeD,aAAa"}
|
@@ -24,27 +24,27 @@ import fire from 'intergalactic/utils/lib/fire';
|
|
24
24
|
import includesDate from '../utils/includesDate';
|
25
25
|
import { getLocaleDate } from '../utils/formatDate';
|
26
26
|
/*__reshadow-styles__:"../style/calendar.shadow.css"*/
|
27
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
28
|
-
"__SCalendar": "
|
29
|
-
"__SGridDays": "
|
30
|
-
"__SGridMonths": "
|
31
|
-
"__SWeekDays": "
|
32
|
-
"__SWeekDay": "
|
33
|
-
"__SCalendarUnit": "
|
34
|
-
"_startHighlighted": "
|
35
|
-
"_selected": "
|
36
|
-
"_endHighlighted": "
|
37
|
-
"_startSelected": "
|
38
|
-
"_endSelected": "
|
39
|
-
"_compareHighlighted": "
|
40
|
-
"_compareStartHighlighted": "
|
41
|
-
"_compareEndHighlighted": "
|
42
|
-
"_compareStart": "
|
43
|
-
"_compareEnd": "
|
44
|
-
"_outdated": "
|
45
|
-
"_disabled": "
|
46
|
-
"_highlighted": "
|
47
|
-
"_today": "
|
27
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SCalendar_1szch_gg_{display:flex;flex-direction:column}.___SGridDays_1szch_gg_{display:grid;grid-template-columns:repeat(7,minmax(32px,auto));grid-template-rows:repeat(auto-fit,minmax(32px,auto))}.___SGridMonths_1szch_gg_{display:grid;grid-row-gap:var(--intergalactic-spacing-2x, 8px);grid-template-columns:repeat(3,minmax(60px,auto));grid-template-rows:repeat(4,minmax(32px,auto))}.___SWeekDays_1szch_gg_{display:grid;grid-template-columns:repeat(7,minmax(32px,auto))}.___SCalendarUnit_1szch_gg_,.___SWeekDay_1szch_gg_{align-items:center;display:flex;font-size:var(--intergalactic-fs-200, 14px);justify-content:center;min-height:32px;min-width:32px}.___SWeekDay_1szch_gg_{color:var(--intergalactic-text-secondary, #6c6e79);font-weight:var(--intergalactic-regular, 400);overflow:hidden}.___SCalendarUnit_1szch_gg_{font-family:inherit;font-weight:400;line-height:normal;-webkit-text-decoration:none;text-decoration:none;text-align:center;vertical-align:middle;border:1px solid transparent;color:var(--intergalactic-text-primary, #191b23);box-shadow:none;overflow:visible;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;background-color:var(--intergalactic-date-picker-cell, #ffffff);border-radius:var(--intergalactic-control-rounded, 6px);box-sizing:border-box;cursor:pointer;position:relative;transition:color .15s,background .15s,border-radius .15s .15s;outline:0;margin:4px 0 0}@media (hover:hover){.___SCalendarUnit_1szch_gg_:hover{color:var(--intergalactic-text-primary, #191b23);background-color:var(--intergalactic-date-picker-cell-hover, #e0e1e9)}}.___SCalendarUnit_1szch_gg_:focus-visible{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SCalendarUnit_1szch_gg_.__today_1szch_gg_:before{content:\"\";position:absolute;display:block;top:1px;left:1px;border-radius:var(--intergalactic-control-rounded, 6px);width:calc(100% - 2px);height:calc(100% - 2px);box-sizing:border-box;border:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SCalendarUnit_1szch_gg_.___SCalendarUnit_1szch_gg_.__today_1szch_gg_.__endSelected_1szch_gg_:before,.___SCalendarUnit_1szch_gg_.___SCalendarUnit_1szch_gg_.__today_1szch_gg_.__startSelected_1szch_gg_:before{border-color:var(--intergalactic-border-secondary, #e0e1e9)}.___SCalendarUnit_1szch_gg_.__highlighted_1szch_gg_,.___SCalendarUnit_1szch_gg_.__selected_1szch_gg_{border-radius:0;transition:color .15s,background .15s,border-radius 0s 0s;color:var(--intergalactic-text-primary, #191b23)}.___SCalendarUnit_1szch_gg_.__selected_1szch_gg_{background-color:var(--intergalactic-date-picker-cell-range, #c4e5fe)}@media (hover:hover){.___SCalendarUnit_1szch_gg_.__selected_1szch_gg_:hover{background-color:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}}.___SCalendarUnit_1szch_gg_.__highlighted_1szch_gg_{background-color:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}@media (hover:hover){.___SCalendarUnit_1szch_gg_.__highlighted_1szch_gg_:hover{background-color:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}}.___SCalendarUnit_1szch_gg_.__startSelected_1szch_gg_{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SCalendarUnit_1szch_gg_.__startSelected_1szch_gg_:not(.__highlighted_1szch_gg_){border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:0;border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-top-right-radius:0}@media (hover:hover){.___SCalendarUnit_1szch_gg_.__startSelected_1szch_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-active-hover, #008ff8)}}.___SCalendarUnit_1szch_gg_.__endSelected_1szch_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff);color:var(--intergalactic-text-primary-invert, #ffffff)}.___SCalendarUnit_1szch_gg_.__endSelected_1szch_gg_:not(.__highlighted_1szch_gg_){border-bottom-left-radius:0;border-bottom-right-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:0;border-top-right-radius:var(--intergalactic-control-rounded, 6px)}@media (hover:hover){.___SCalendarUnit_1szch_gg_.__endSelected_1szch_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-active-hover, #008ff8)}}.___SCalendarUnit_1szch_gg_.__startHighlighted_1szch_gg_:not(.__selected_1szch_gg_){border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:0;border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-top-right-radius:0}.___SCalendarUnit_1szch_gg_.__endHighlighted_1szch_gg_:not(.__selected_1szch_gg_){border-bottom-left-radius:0;border-bottom-right-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:0;border-top-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_1szch_gg_.__startHighlighted_1szch_gg_.___SCalendarUnit_1szch_gg_.__endHighlighted_1szch_gg_,.___SCalendarUnit_1szch_gg_.__startSelected_1szch_gg_.___SCalendarUnit_1szch_gg_.__endSelected_1szch_gg_{border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-top-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_1szch_gg_.__compareHighlighted_1szch_gg_{border-top:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);border-bottom:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);border-radius:0;transition:none}.___SCalendarUnit_1szch_gg_.__compareEndHighlighted_1szch_gg_,.___SCalendarUnit_1szch_gg_.__compareStartHighlighted_1szch_gg_{border-left:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);border-right:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SCalendarUnit_1szch_gg_.__compareEnd_1szch_gg_,.___SCalendarUnit_1szch_gg_.__compareStart_1szch_gg_{border-radius:0;background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1);color:var(--intergalactic-text-primary-invert, #ffffff)}@media (hover:hover){.___SCalendarUnit_1szch_gg_.__compareEnd_1szch_gg_:hover,.___SCalendarUnit_1szch_gg_.__compareStart_1szch_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-comparison-active-hover, #5925ab)}}.___SCalendarUnit_1szch_gg_.__compareStartHighlighted_1szch_gg_{border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-left-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_1szch_gg_.__compareEndHighlighted_1szch_gg_{border-top-right-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_1szch_gg_.__compareStart_1szch_gg_:not(.__compareHighlighted_1szch_gg_){border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-left-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_1szch_gg_.__compareEnd_1szch_gg_:not(.__compareHighlighted_1szch_gg_){border-top-right-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_1szch_gg_.__outdated_1szch_gg_{opacity:.2}.___SCalendarUnit_1szch_gg_.__disabled_1szch_gg_{opacity:.4;cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SCalendarUnit_1szch_gg_,.___SCalendarUnit_1szch_gg_.__highlighted_1szch_gg_,.___SCalendarUnit_1szch_gg_.__selected_1szch_gg_{transition:none}}" /*__inner_css_end__*/, "1szch_gg_") /*__reshadow_css_end__*/, {
|
28
|
+
"__SCalendar": "___SCalendar_1szch_gg_",
|
29
|
+
"__SGridDays": "___SGridDays_1szch_gg_",
|
30
|
+
"__SGridMonths": "___SGridMonths_1szch_gg_",
|
31
|
+
"__SWeekDays": "___SWeekDays_1szch_gg_",
|
32
|
+
"__SWeekDay": "___SWeekDay_1szch_gg_",
|
33
|
+
"__SCalendarUnit": "___SCalendarUnit_1szch_gg_",
|
34
|
+
"_startHighlighted": "__startHighlighted_1szch_gg_",
|
35
|
+
"_selected": "__selected_1szch_gg_",
|
36
|
+
"_endHighlighted": "__endHighlighted_1szch_gg_",
|
37
|
+
"_startSelected": "__startSelected_1szch_gg_",
|
38
|
+
"_endSelected": "__endSelected_1szch_gg_",
|
39
|
+
"_compareHighlighted": "__compareHighlighted_1szch_gg_",
|
40
|
+
"_compareStartHighlighted": "__compareStartHighlighted_1szch_gg_",
|
41
|
+
"_compareEndHighlighted": "__compareEndHighlighted_1szch_gg_",
|
42
|
+
"_compareStart": "__compareStart_1szch_gg_",
|
43
|
+
"_compareEnd": "__compareEnd_1szch_gg_",
|
44
|
+
"_outdated": "__outdated_1szch_gg_",
|
45
|
+
"_disabled": "__disabled_1szch_gg_",
|
46
|
+
"_highlighted": "__highlighted_1szch_gg_",
|
47
|
+
"_today": "__today_1szch_gg_"
|
48
48
|
});
|
49
49
|
dayjs.extend(isBetween);
|
50
50
|
var range = function range(N, cb) {
|
@@ -20,33 +20,34 @@ import shortDateRangeFormat from '../utils/shortDateRangeFormat';
|
|
20
20
|
import Checkbox from 'intergalactic/checkbox';
|
21
21
|
import { LinkTrigger } from 'intergalactic/base-trigger';
|
22
22
|
/*__reshadow-styles__:"../style/date-picker.shadow.css"*/
|
23
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
24
|
-
"__SHeader": "
|
25
|
-
"__STitle": "
|
26
|
-
"__SToday": "
|
27
|
-
"__SPeriod": "
|
28
|
-
"__SButton": "
|
29
|
-
"__SInner": "
|
30
|
-
"__SInputMask": "
|
31
|
-
"__SIndicator": "
|
32
|
-
"__SRangeIndicator": "
|
33
|
-
"_range_value": "
|
34
|
-
"_range_compare": "
|
35
|
-
"_disabled": "
|
36
|
-
"__SHumanizedDate": "
|
37
|
-
"__SSingleDateInput": "
|
38
|
-
"__SValue": "
|
39
|
-
"__SDateRange": "
|
40
|
-
"__SMask": "
|
41
|
-
"_noHumanizedDate": "
|
42
|
-
"__SRangeSep": "
|
43
|
-
"_fulfilled": "
|
44
|
-
"__SRangeComparatorHeader": "
|
45
|
-
"__SRangeCalendar": "
|
46
|
-
"__SFooter": "
|
47
|
-
"__SPeriodsList": "
|
48
|
-
"__SPopper": "
|
23
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPopper_1hpbh_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_1hpbh_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_1hpbh_gg_:active,.___SPopper_1hpbh_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_1hpbh_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___SPopper_1hpbh_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_1hpbh_gg_,.___STitle_1hpbh_gg_{display:flex;align-items:center}.___STitle_1hpbh_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_1hpbh_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_1hpbh_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_1hpbh_gg_ .___SInner_1hpbh_gg_{justify-content:flex-start}.___SInputMask_1hpbh_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal}.___SIndicator_1hpbh_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_1hpbh_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_1hpbh_gg_._range_value_1hpbh_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_1hpbh_gg_._range_compare_1hpbh_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_1hpbh_gg_.__disabled_1hpbh_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_1hpbh_gg_{position:absolute;pointer-events:none}.___SDateRange_1hpbh_gg_ .___SMask_1hpbh_gg_,.___SDateRange_1hpbh_gg_ .___SValue_1hpbh_gg_,.___SSingleDateInput_1hpbh_gg_ .___SMask_1hpbh_gg_,.___SSingleDateInput_1hpbh_gg_ .___SValue_1hpbh_gg_{opacity:0}.___SSingleDateInput_1hpbh_gg_:focus-within .___SHumanizedDate_1hpbh_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_1hpbh_gg_:focus-within .___SMask_1hpbh_gg_,.___SSingleDateInput_1hpbh_gg_:focus-within .___SValue_1hpbh_gg_{opacity:1}.___SDateRange_1hpbh_gg_:focus-within .___SHumanizedDate_1hpbh_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_1hpbh_gg_:focus-within .___SMask_1hpbh_gg_,.___SDateRange_1hpbh_gg_:focus-within .___SValue_1hpbh_gg_{opacity:1}.___SInputMask_1hpbh_gg_.__noHumanizedDate_1hpbh_gg_ .___SMask_1hpbh_gg_,.___SInputMask_1hpbh_gg_.__noHumanizedDate_1hpbh_gg_ .___SValue_1hpbh_gg_{opacity:1}.___SDateRange_1hpbh_gg_ .___SInputMask_1hpbh_gg_:focus-within .___SMask_1hpbh_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_1hpbh_gg_:focus-within .___SRangeSep_1hpbh_gg_,.___SRangeSep_1hpbh_gg_.__fulfilled_1hpbh_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_1hpbh_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_1hpbh_gg_,.___SRangeComparatorHeader_1hpbh_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_1hpbh_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_1hpbh_gg_,.___SPeriodsList_1hpbh_gg_{padding:var(--intergalactic-spacing-4x, 16px)}" /*__inner_css_end__*/, "1hpbh_gg_") /*__reshadow_css_end__*/, {
|
24
|
+
"__SHeader": "___SHeader_1hpbh_gg_",
|
25
|
+
"__STitle": "___STitle_1hpbh_gg_",
|
26
|
+
"__SToday": "___SToday_1hpbh_gg_",
|
27
|
+
"__SPeriod": "___SPeriod_1hpbh_gg_",
|
28
|
+
"__SButton": "___SButton_1hpbh_gg_",
|
29
|
+
"__SInner": "___SInner_1hpbh_gg_",
|
30
|
+
"__SInputMask": "___SInputMask_1hpbh_gg_",
|
31
|
+
"__SIndicator": "___SIndicator_1hpbh_gg_",
|
32
|
+
"__SRangeIndicator": "___SRangeIndicator_1hpbh_gg_",
|
33
|
+
"_range_value": "_range_value_1hpbh_gg_",
|
34
|
+
"_range_compare": "_range_compare_1hpbh_gg_",
|
35
|
+
"_disabled": "__disabled_1hpbh_gg_",
|
36
|
+
"__SHumanizedDate": "___SHumanizedDate_1hpbh_gg_",
|
37
|
+
"__SSingleDateInput": "___SSingleDateInput_1hpbh_gg_",
|
38
|
+
"__SValue": "___SValue_1hpbh_gg_",
|
39
|
+
"__SDateRange": "___SDateRange_1hpbh_gg_",
|
40
|
+
"__SMask": "___SMask_1hpbh_gg_",
|
41
|
+
"_noHumanizedDate": "__noHumanizedDate_1hpbh_gg_",
|
42
|
+
"__SRangeSep": "___SRangeSep_1hpbh_gg_",
|
43
|
+
"_fulfilled": "__fulfilled_1hpbh_gg_",
|
44
|
+
"__SRangeComparatorHeader": "___SRangeComparatorHeader_1hpbh_gg_",
|
45
|
+
"__SRangeCalendar": "___SRangeCalendar_1hpbh_gg_",
|
46
|
+
"__SFooter": "___SFooter_1hpbh_gg_",
|
47
|
+
"__SPeriodsList": "___SPeriodsList_1hpbh_gg_",
|
48
|
+
"__SPopper": "___SPopper_1hpbh_gg_"
|
49
49
|
});
|
50
|
+
var INTERACTION_KEYS = ['ArrowDown', 'Enter', 'Space'];
|
50
51
|
var defaultDisplayedPeriod = new Date(new Date().setHours(0, 0, 0, 0));
|
51
52
|
var getLatestDate = function getLatestDate() {
|
52
53
|
for (var _len = arguments.length, dateRanges = new Array(_len), _key = 0; _key < _len; _key++) {
|
@@ -72,6 +73,7 @@ var DateRangeComparatorAbstract = /*#__PURE__*/function (_Component) {
|
|
72
73
|
args[_key2] = arguments[_key2];
|
73
74
|
}
|
74
75
|
_this = _super.call.apply(_super, [this].concat(args));
|
76
|
+
_defineProperty(_assertThisInitialized(_this), "popperRef", /*#__PURE__*/React.createRef());
|
75
77
|
_defineProperty(_assertThisInitialized(_this), "navigateView", function (direction) {
|
76
78
|
var displayedPeriod = _this.asProps.displayedPeriod;
|
77
79
|
var action = direction >= 1 ? 'add' : 'subtract';
|
@@ -90,6 +92,20 @@ var DateRangeComparatorAbstract = /*#__PURE__*/function (_Component) {
|
|
90
92
|
});
|
91
93
|
_this.handlers.visible(false);
|
92
94
|
});
|
95
|
+
_defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (e) {
|
96
|
+
var visible = _this.asProps.visible;
|
97
|
+
var key = e.code;
|
98
|
+
if (INTERACTION_KEYS.includes(key)) {
|
99
|
+
e.stopPropagation();
|
100
|
+
_this.handlers.visible(!visible);
|
101
|
+
setTimeout(function () {
|
102
|
+
var popper = _this.popperRef.current;
|
103
|
+
if (popper) {
|
104
|
+
popper.focus();
|
105
|
+
}
|
106
|
+
}, 0);
|
107
|
+
}
|
108
|
+
});
|
93
109
|
_defineProperty(_assertThisInitialized(_this), "handleChange", function (date) {
|
94
110
|
var _value, _value2, _value3;
|
95
111
|
var _this$asProps = _this.asProps,
|
@@ -182,21 +198,26 @@ var DateRangeComparatorAbstract = /*#__PURE__*/function (_Component) {
|
|
182
198
|
displayedPeriod: null,
|
183
199
|
visible: [null, function (visible) {
|
184
200
|
if (!visible) {
|
185
|
-
var _ref10, _this3$asProps$value$, _this3$asProps$value, _this3$asProps$value2;
|
186
201
|
_this3.handlers.highlighted([]);
|
187
202
|
_this3.handlers.compareHighlighted([]);
|
188
203
|
_this3.handlers.preselectedValue(undefined);
|
189
204
|
_this3.handlers.preselectedCompare(undefined);
|
190
205
|
_this3.handlers.compareToggle(undefined);
|
191
206
|
_this3.handlers.focusedRange('value');
|
192
|
-
_this3.handlers.displayedPeriod(getLatestDate((_ref10 = (_this3$asProps$value$ = (_this3$asProps$value = _this3.asProps.value) === null || _this3$asProps$value === void 0 ? void 0 : _this3$asProps$value.value) !== null && _this3$asProps$value$ !== void 0 ? _this3$asProps$value$ : (_this3$asProps$value2 = _this3.asProps.value) === null || _this3$asProps$value2 === void 0 ? void 0 : _this3$asProps$value2.compare) !== null && _ref10 !== void 0 ? _ref10 : []) || _this3.props.defaultDisplayedPeriod);
|
193
207
|
}
|
194
208
|
var _this3$asProps = _this3.asProps,
|
195
209
|
value = _this3$asProps.value,
|
196
210
|
displayedPeriod = _this3$asProps.displayedPeriod;
|
197
211
|
var newDisplayedPeriod = value ? getLatestDate(value.value, value.compare) : undefined;
|
198
|
-
if (visible
|
199
|
-
|
212
|
+
if (visible) {
|
213
|
+
if (newDisplayedPeriod && newDisplayedPeriod !== displayedPeriod) {
|
214
|
+
_this3.handlers.displayedPeriod(newDisplayedPeriod);
|
215
|
+
} else if (!newDisplayedPeriod) {
|
216
|
+
var _this3$props = _this3.props,
|
217
|
+
_displayedPeriod = _this3$props.displayedPeriod,
|
218
|
+
_defaultDisplayedPeriod = _this3$props.defaultDisplayedPeriod;
|
219
|
+
_this3.handlers.displayedPeriod(_displayedPeriod || _defaultDisplayedPeriod);
|
220
|
+
}
|
200
221
|
}
|
201
222
|
}],
|
202
223
|
highlighted: null,
|
@@ -276,14 +297,14 @@ var DateRangeComparatorAbstract = /*#__PURE__*/function (_Component) {
|
|
276
297
|
}
|
277
298
|
}, {
|
278
299
|
key: "getTriggerProps",
|
279
|
-
value: function getTriggerProps(
|
300
|
+
value: function getTriggerProps(_ref10) {
|
280
301
|
var _this$asProps$value3,
|
281
302
|
_this$asProps$value4,
|
282
303
|
_this6 = this;
|
283
|
-
var
|
284
|
-
placeholder =
|
285
|
-
|
286
|
-
separator =
|
304
|
+
var _ref10$placeholder = _ref10.placeholder,
|
305
|
+
placeholder = _ref10$placeholder === void 0 ? 'Select date ranges' : _ref10$placeholder,
|
306
|
+
_ref10$separator = _ref10.separator,
|
307
|
+
separator = _ref10$separator === void 0 ? 'vs.' : _ref10$separator;
|
287
308
|
var _this$asProps5 = this.asProps,
|
288
309
|
locale = _this$asProps5.locale,
|
289
310
|
visible = _this$asProps5.visible;
|
@@ -307,7 +328,8 @@ var DateRangeComparatorAbstract = /*#__PURE__*/function (_Component) {
|
|
307
328
|
visible: visible,
|
308
329
|
onClick: function onClick() {
|
309
330
|
return _this6.handlers.visible(!visible);
|
310
|
-
}
|
331
|
+
},
|
332
|
+
onKeyDown: this.handleKeyDown
|
311
333
|
};
|
312
334
|
}
|
313
335
|
}, {
|
@@ -436,7 +458,8 @@ var DateRangeComparatorAbstract = /*#__PURE__*/function (_Component) {
|
|
436
458
|
key: "getPopperProps",
|
437
459
|
value: function getPopperProps() {
|
438
460
|
return {
|
439
|
-
p: 0
|
461
|
+
p: 0,
|
462
|
+
ref: this.popperRef
|
440
463
|
};
|
441
464
|
}
|
442
465
|
}, {
|
@@ -455,11 +478,11 @@ var DateRangeComparatorAbstract = /*#__PURE__*/function (_Component) {
|
|
455
478
|
}
|
456
479
|
}], [{
|
457
480
|
key: "defaultProps",
|
458
|
-
value: function defaultProps(
|
459
|
-
var primaryRange =
|
460
|
-
defaultPrimaryRange =
|
461
|
-
secondaryRange =
|
462
|
-
defaultSecondaryRange =
|
481
|
+
value: function defaultProps(_ref11) {
|
482
|
+
var primaryRange = _ref11.primaryRange,
|
483
|
+
defaultPrimaryRange = _ref11.defaultPrimaryRange,
|
484
|
+
secondaryRange = _ref11.secondaryRange,
|
485
|
+
defaultSecondaryRange = _ref11.defaultSecondaryRange;
|
463
486
|
return {
|
464
487
|
i18n: localizedMessages,
|
465
488
|
locale: 'en',
|