grommet 2.24.0 → 2.25.2
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/all/stories/AllComponents.js +2 -7
- package/components/Accordion/Accordion.js +1 -1
- package/components/Accordion/propTypes.js +1 -1
- package/components/Accordion/stories/CustomThemed/Custom.js +3 -2
- package/components/AccordionPanel/AccordionPanel.js +2 -1
- package/components/Anchor/Anchor.js +15 -2
- package/components/Anchor/propTypes.js +1 -1
- package/components/Avatar/Avatar.js +1 -1
- package/components/Box/Box.js +1 -1
- package/components/Box/StyledBox.js +1 -1
- package/components/Box/propTypes.js +1 -1
- package/components/Button/Button.js +83 -10
- package/components/Button/StyledButtonKind.js +9 -3
- package/components/Button/index.d.ts +1 -1
- package/components/Button/propTypes.js +3 -3
- package/components/Button/stories/Basic.js +1 -1
- package/components/Button/stories/Fill.js +1 -1
- package/components/Button/stories/Kind.js +1 -1
- package/components/Calendar/Calendar.js +233 -293
- package/components/Calendar/index.d.ts +2 -2
- package/components/Calendar/propTypes.js +1 -1
- package/components/Calendar/stories/ShowAdjacentDays.js +1 -1
- package/components/Calendar/utils.js +16 -129
- package/components/Card/Card.js +1 -1
- package/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/components/Card/stories/CustomThemed/RichFooter.js +1 -1
- package/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/components/CardBody/CardBody.js +1 -1
- package/components/CardFooter/CardFooter.js +1 -1
- package/components/CardHeader/CardHeader.js +1 -1
- package/components/Carousel/Carousel.js +1 -1
- package/components/Carousel/propTypes.js +1 -1
- package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/components/Chart/Chart.js +1 -1
- package/components/Chart/calcs.js +44 -27
- package/components/Chart/index.d.ts +28 -2
- package/components/Chart/propTypes.js +1 -1
- package/components/Chart/stories/Rich.js +1 -1
- package/components/Chart/stories/Scan.js +11 -9
- package/components/Chart/stories/Window.js +1 -1
- package/components/Chart/stories/data.js +16 -17
- package/components/CheckBox/CheckBox.js +4 -3
- package/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
- package/components/CheckBox/stories/NoLabel.js +1 -1
- package/components/CheckBox/stories/Simple.js +1 -1
- package/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/components/Clock/Analog.js +1 -1
- package/components/Clock/Clock.js +1 -1
- package/components/Clock/Digital.js +1 -1
- package/components/Clock/propTypes.js +1 -1
- package/components/Collapsible/stories/Nested.js +1 -1
- package/components/Collapsible/stories/Simple.js +1 -1
- package/components/DataChart/DataChart.js +22 -55
- package/components/DataChart/Detail.js +18 -11
- package/components/DataChart/Legend.js +1 -1
- package/components/DataChart/Swatch.js +64 -23
- package/components/DataChart/XAxis.js +30 -19
- package/components/DataChart/YGuide.js +1 -1
- package/components/DataChart/propTypes.js +1 -1
- package/components/DataChart/stories/Legend.js +6 -2
- package/components/DataChart/stories/Pad.js +54 -0
- package/components/DataChart/utils.js +11 -1
- package/components/DataTable/Body.js +11 -5
- package/components/DataTable/Cell.js +1 -1
- package/components/DataTable/DataTable.js +14 -10
- package/components/DataTable/ExpanderCell.js +1 -1
- package/components/DataTable/Footer.js +1 -1
- package/components/DataTable/GroupedBody.js +1 -1
- package/components/DataTable/Header.js +1 -1
- package/components/DataTable/Resizer.js +1 -1
- package/components/DataTable/Sorter.js +1 -1
- package/components/DataTable/buildState.js +2 -2
- package/components/DataTable/index.d.ts +4 -1
- package/components/DataTable/propTypes.js +1 -1
- package/components/DataTable/stories/Controlled.js +1 -1
- package/components/DataTable/stories/ControlledGrouped.js +1 -1
- package/components/DataTable/stories/CustomThemed/Fill.js +1 -1
- package/components/DataTable/stories/GroupedOnSelect.js +1 -1
- package/components/DataTable/stories/OnUpdate.js +1 -1
- package/components/DataTable/stories/Served.js +1 -1
- package/components/DataTable/stories/Sort.js +1 -1
- package/components/DataTable/stories/SpaceX.js +3 -1
- package/components/DataTable/stories/SpaceXUngrouped.js +6 -2
- package/components/DataTable/stories/Tunable.js +1 -1
- package/components/DataTable/stories/data.js +1 -1
- package/components/DataTable/stories/rowDetails.js +1 -1
- package/components/DateInput/DateInput.js +89 -92
- package/components/DateInput/index.d.ts +1 -0
- package/components/DateInput/propTypes.js +1 -0
- package/components/DateInput/stories/Format.js +14 -1
- package/components/DateInput/utils.js +31 -6
- package/components/Diagram/Diagram.js +1 -1
- package/components/Diagram/stories/Animated.js +1 -1
- package/components/Diagram/stories/Progressing.js +1 -1
- package/components/Distribution/Distribution.js +1 -1
- package/components/Distribution/propTypes.js +1 -1
- package/components/Drop/Drop.js +1 -1
- package/components/Drop/DropContainer.js +1 -1
- package/components/DropButton/DropButton.js +1 -1
- package/components/DropButton/propTypes.js +1 -1
- package/components/FileInput/FileInput.js +28 -9
- package/components/FileInput/StyledFileInput.js +1 -1
- package/components/FileInput/stories/Multiple.js +1 -0
- package/components/FocusedContainer.js +1 -1
- package/components/Footer/Footer.js +1 -1
- package/components/Footer/stories/DoubleFooter.js +1 -1
- package/components/Footer/stories/Sitemap.js +1 -1
- package/components/Form/Form.js +79 -6
- package/components/Form/stories/ArrayOfFormFields.js +1 -1
- package/components/Form/stories/CustomThemed/FieldSpacingOptions.js +1 -1
- package/components/FormField/FormField.js +30 -30
- package/components/Grid/Grid.js +5 -3
- package/components/Grid/README.md +0 -2
- package/components/Grid/index.d.ts +4 -2
- package/components/Grid/propTypes.js +1 -1
- package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/components/Grid/stories/typescript/App.tsx +42 -48
- package/components/Grommet/Grommet.js +8 -3
- package/components/Grommet/index.d.ts +1 -0
- package/components/Grommet/propTypes.js +2 -1
- package/components/Header/Header.js +1 -1
- package/components/Heading/Heading.js +5 -3
- package/components/Heading/StyledHeading.js +1 -1
- package/components/Heading/index.d.ts +1 -0
- package/components/Heading/propTypes.js +3 -2
- package/components/Image/Image.js +5 -3
- package/components/Image/propTypes.js +1 -1
- package/components/InfiniteScroll/stories/Basics.js +1 -1
- package/components/InfiniteScroll/stories/ClassChildren.js +1 -1
- package/components/InfiniteScroll/stories/Marker.js +1 -1
- package/components/InfiniteScroll/stories/Show.js +1 -1
- package/components/InfiniteScroll/stories/ShowAfter.js +1 -1
- package/components/InfiniteScroll/stories/ShowBefore.js +1 -1
- package/components/Layer/Layer.js +1 -1
- package/components/Layer/LayerContainer.js +19 -1
- package/components/List/List.js +1 -1
- package/components/List/propTypes.js +1 -1
- package/components/Main/Main.js +1 -1
- package/components/Markdown/Markdown.js +1 -1
- package/components/MaskedInput/MaskedInput.js +37 -28
- package/components/Menu/Menu.js +109 -62
- package/components/Menu/index.d.ts +2 -2
- package/components/Menu/propTypes.js +2 -2
- package/components/Menu/stories/CustomThemed/Themed.tsx +6 -0
- package/components/Menu/stories/Grouped.js +52 -0
- package/components/Meter/Bar.js +1 -1
- package/components/Meter/Circle.js +9 -3
- package/components/Meter/Meter.js +1 -1
- package/components/Meter/propTypes.js +1 -1
- package/components/NameValueList/NameValueList.js +1 -1
- package/components/NameValuePair/NameValuePair.js +1 -1
- package/components/Nav/Nav.js +1 -1
- package/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/components/Nav/stories/Sidebar.js +1 -1
- package/components/Notification/Notification.js +1 -1
- package/components/Notification/index.d.ts +1 -1
- package/components/Notification/propTypes.js +1 -1
- package/components/Page/Page.js +1 -1
- package/components/PageContent/PageContent.js +1 -1
- package/components/PageHeader/PageHeader.js +23 -14
- package/components/PageHeader/index.d.ts +10 -1
- package/components/PageHeader/propTypes.js +2 -1
- package/components/PageHeader/stories/Size.js +55 -0
- package/components/Pagination/PageControl.js +1 -1
- package/components/Pagination/Pagination.js +1 -1
- package/components/Pagination/propTypes.js +1 -1
- package/components/Paragraph/Paragraph.js +1 -1
- package/components/Paragraph/StyledParagraph.js +7 -1
- package/components/Paragraph/index.d.ts +1 -0
- package/components/Paragraph/propTypes.js +2 -1
- package/components/Paragraph/stories/MaxLines.js +37 -0
- package/components/RadioButton/RadioButton.js +1 -1
- package/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/components/RangeInput/RangeInput.js +1 -1
- package/components/RangeSelector/EdgeControl.js +1 -1
- package/components/RangeSelector/RangeSelector.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/components/RangeSelector/stories/Step.js +1 -1
- package/components/RangeSelector/stories/Vertical.js +1 -1
- package/components/RoutedAnchor/RoutedAnchor.js +2 -2
- package/components/RoutedButton/RoutedButton.js +2 -2
- package/components/Select/Select.js +11 -30
- package/components/Select/SelectContainer.js +97 -76
- package/components/Select/propTypes.js +1 -1
- package/components/Select/stories/Clear.js +7 -1
- package/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/components/Select/stories/components/SearchInput.js +1 -1
- package/components/Select/utils.js +1 -0
- package/components/Sidebar/Sidebar.js +1 -1
- package/components/Sidebar/stories/Labels.js +1 -1
- package/components/SkipLink/SkipLink.js +1 -1
- package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/components/Spinner/Spinner.js +2 -1
- package/components/Stack/Stack.js +1 -1
- package/components/Stack/propTypes.js +1 -1
- package/components/Tab/StyledTab.js +2 -2
- package/components/Tab/Tab.js +35 -17
- package/components/Table/propTypes.js +1 -1
- package/components/TableBody/TableBody.js +1 -1
- package/components/TableCell/TableCell.js +1 -1
- package/components/TableFooter/TableFooter.js +1 -1
- package/components/TableHeader/TableHeader.js +1 -1
- package/components/TableRow/TableRow.js +1 -1
- package/components/Tabs/Tabs.js +241 -11
- package/components/Tabs/propTypes.js +1 -1
- package/components/Tabs/stories/Responsive.js +18 -0
- package/components/Tag/Tag.js +1 -1
- package/components/Tag/propTypes.js +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/propTypes.js +1 -1
- package/components/TextArea/TextArea.js +1 -1
- package/components/TextArea/stories/NonResizable.js +1 -1
- package/components/TextArea/stories/Simple.js +1 -1
- package/components/TextInput/TextInput.js +1 -1
- package/components/TextInput/stories/InsideFormField.js +1 -1
- package/components/TextInput/stories/WithTags.js +1 -1
- package/components/Tip/Tip.js +4 -23
- package/components/Video/StyledVideo.js +2 -2
- package/components/Video/Video.js +1 -1
- package/components/Video/propTypes.js +1 -1
- package/components/WorldMap/WorldMap.js +1 -1
- package/components/WorldMap/propTypes.js +1 -1
- package/components/WorldMap/stories/Places.js +1 -1
- package/contexts/AnalyticsContext/AnalyticsContext.js +65 -0
- package/contexts/AnalyticsContext/index.d.ts +7 -0
- package/contexts/AnalyticsContext/index.js +11 -0
- package/contexts/AnnounceContext/stories/Assertive.js +1 -1
- package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/contexts/index.js +8 -0
- package/es6/all/stories/AllComponents.js +2 -7
- package/es6/components/Accordion/Accordion.js +1 -1
- package/es6/components/Accordion/propTypes.js +1 -1
- package/es6/components/Accordion/stories/CustomThemed/Custom.js +3 -2
- package/es6/components/AccordionPanel/AccordionPanel.js +2 -1
- package/es6/components/Anchor/Anchor.js +15 -3
- package/es6/components/Anchor/propTypes.js +1 -1
- package/es6/components/Avatar/Avatar.js +1 -1
- package/es6/components/Box/Box.js +1 -1
- package/es6/components/Box/StyledBox.js +1 -1
- package/es6/components/Box/propTypes.js +1 -1
- package/es6/components/Button/Button.js +84 -12
- package/es6/components/Button/StyledButtonKind.js +9 -3
- package/es6/components/Button/index.d.ts +1 -1
- package/es6/components/Button/propTypes.js +3 -3
- package/es6/components/Button/stories/Basic.js +1 -1
- package/es6/components/Button/stories/Fill.js +1 -1
- package/es6/components/Button/stories/Kind.js +1 -1
- package/es6/components/Calendar/Calendar.js +231 -293
- package/es6/components/Calendar/index.d.ts +2 -2
- package/es6/components/Calendar/propTypes.js +1 -1
- package/es6/components/Calendar/stories/ShowAdjacentDays.js +1 -1
- package/es6/components/Calendar/utils.js +13 -114
- package/es6/components/Card/Card.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/es6/components/Card/stories/CustomThemed/RichFooter.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/CardBody/CardBody.js +1 -1
- package/es6/components/CardFooter/CardFooter.js +1 -1
- package/es6/components/CardHeader/CardHeader.js +1 -1
- package/es6/components/Carousel/Carousel.js +1 -1
- package/es6/components/Carousel/propTypes.js +1 -1
- package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Chart/Chart.js +1 -1
- package/es6/components/Chart/calcs.js +44 -27
- package/es6/components/Chart/index.d.ts +28 -2
- package/es6/components/Chart/propTypes.js +1 -1
- package/es6/components/Chart/stories/Rich.js +1 -1
- package/es6/components/Chart/stories/Scan.js +10 -9
- package/es6/components/Chart/stories/Window.js +1 -1
- package/es6/components/Chart/stories/data.js +16 -17
- package/es6/components/CheckBox/CheckBox.js +4 -3
- package/es6/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
- package/es6/components/CheckBox/stories/NoLabel.js +1 -1
- package/es6/components/CheckBox/stories/Simple.js +1 -1
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/es6/components/Clock/Analog.js +1 -1
- package/es6/components/Clock/Clock.js +1 -1
- package/es6/components/Clock/Digital.js +1 -1
- package/es6/components/Clock/propTypes.js +1 -1
- package/es6/components/Collapsible/stories/Nested.js +1 -1
- package/es6/components/Collapsible/stories/Simple.js +1 -1
- package/es6/components/DataChart/DataChart.js +24 -57
- package/es6/components/DataChart/Detail.js +20 -10
- package/es6/components/DataChart/Legend.js +1 -1
- package/es6/components/DataChart/Swatch.js +64 -23
- package/es6/components/DataChart/XAxis.js +30 -20
- package/es6/components/DataChart/YGuide.js +1 -1
- package/es6/components/DataChart/propTypes.js +1 -1
- package/es6/components/DataChart/stories/Legend.js +6 -2
- package/es6/components/DataChart/stories/Pad.js +42 -0
- package/es6/components/DataChart/utils.js +7 -0
- package/es6/components/DataTable/Body.js +10 -5
- package/es6/components/DataTable/Cell.js +1 -1
- package/es6/components/DataTable/DataTable.js +14 -10
- package/es6/components/DataTable/ExpanderCell.js +1 -1
- package/es6/components/DataTable/Footer.js +1 -1
- package/es6/components/DataTable/GroupedBody.js +1 -1
- package/es6/components/DataTable/Header.js +1 -1
- package/es6/components/DataTable/Resizer.js +1 -1
- package/es6/components/DataTable/Sorter.js +1 -1
- package/es6/components/DataTable/buildState.js +2 -2
- package/es6/components/DataTable/index.d.ts +4 -1
- package/es6/components/DataTable/propTypes.js +1 -1
- package/es6/components/DataTable/stories/Controlled.js +1 -1
- package/es6/components/DataTable/stories/ControlledGrouped.js +1 -1
- package/es6/components/DataTable/stories/CustomThemed/Fill.js +1 -1
- package/es6/components/DataTable/stories/GroupedOnSelect.js +1 -1
- package/es6/components/DataTable/stories/OnUpdate.js +1 -1
- package/es6/components/DataTable/stories/Served.js +1 -1
- package/es6/components/DataTable/stories/Sort.js +1 -1
- package/es6/components/DataTable/stories/SpaceX.js +3 -1
- package/es6/components/DataTable/stories/SpaceXUngrouped.js +6 -2
- package/es6/components/DataTable/stories/Tunable.js +1 -1
- package/es6/components/DataTable/stories/data.js +1 -1
- package/es6/components/DataTable/stories/rowDetails.js +1 -1
- package/es6/components/DateInput/DateInput.js +85 -88
- package/es6/components/DateInput/index.d.ts +1 -0
- package/es6/components/DateInput/propTypes.js +1 -0
- package/es6/components/DateInput/stories/Format.js +14 -1
- package/es6/components/DateInput/utils.js +30 -8
- package/es6/components/Diagram/Diagram.js +1 -1
- package/es6/components/Diagram/stories/Animated.js +1 -1
- package/es6/components/Diagram/stories/Progressing.js +1 -1
- package/es6/components/Distribution/Distribution.js +1 -1
- package/es6/components/Distribution/propTypes.js +1 -1
- package/es6/components/Drop/Drop.js +1 -1
- package/es6/components/Drop/DropContainer.js +1 -1
- package/es6/components/DropButton/DropButton.js +1 -1
- package/es6/components/DropButton/propTypes.js +1 -1
- package/es6/components/FileInput/FileInput.js +28 -9
- package/es6/components/FileInput/StyledFileInput.js +1 -1
- package/es6/components/FileInput/stories/Multiple.js +1 -0
- package/es6/components/FocusedContainer.js +1 -1
- package/es6/components/Footer/Footer.js +1 -1
- package/es6/components/Footer/stories/DoubleFooter.js +1 -1
- package/es6/components/Footer/stories/Sitemap.js +1 -1
- package/es6/components/Form/Form.js +77 -6
- package/es6/components/Form/stories/ArrayOfFormFields.js +1 -1
- package/es6/components/Form/stories/CustomThemed/FieldSpacingOptions.js +1 -1
- package/es6/components/FormField/FormField.js +30 -31
- package/es6/components/Grid/Grid.js +5 -3
- package/es6/components/Grid/README.md +0 -2
- package/es6/components/Grid/index.d.ts +4 -2
- package/es6/components/Grid/propTypes.js +1 -1
- package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/es6/components/Grid/stories/typescript/App.tsx +42 -48
- package/es6/components/Grommet/Grommet.js +7 -3
- package/es6/components/Grommet/index.d.ts +1 -0
- package/es6/components/Grommet/propTypes.js +2 -1
- package/es6/components/Header/Header.js +1 -1
- package/es6/components/Heading/Heading.js +5 -3
- package/es6/components/Heading/StyledHeading.js +1 -1
- package/es6/components/Heading/index.d.ts +1 -0
- package/es6/components/Heading/propTypes.js +3 -2
- package/es6/components/Image/Image.js +5 -3
- package/es6/components/Image/propTypes.js +1 -1
- package/es6/components/InfiniteScroll/stories/Basics.js +1 -1
- package/es6/components/InfiniteScroll/stories/ClassChildren.js +1 -1
- package/es6/components/InfiniteScroll/stories/Marker.js +1 -1
- package/es6/components/InfiniteScroll/stories/Show.js +1 -1
- package/es6/components/InfiniteScroll/stories/ShowAfter.js +1 -1
- package/es6/components/InfiniteScroll/stories/ShowBefore.js +1 -1
- package/es6/components/Layer/Layer.js +1 -1
- package/es6/components/Layer/LayerContainer.js +18 -1
- package/es6/components/List/List.js +1 -1
- package/es6/components/List/propTypes.js +1 -1
- package/es6/components/Main/Main.js +1 -1
- package/es6/components/Markdown/Markdown.js +1 -1
- package/es6/components/MaskedInput/MaskedInput.js +38 -29
- package/es6/components/Menu/Menu.js +110 -62
- package/es6/components/Menu/index.d.ts +2 -2
- package/es6/components/Menu/propTypes.js +2 -2
- package/es6/components/Menu/stories/CustomThemed/Themed.tsx +6 -0
- package/es6/components/Menu/stories/Grouped.js +40 -0
- package/es6/components/Meter/Bar.js +1 -1
- package/es6/components/Meter/Circle.js +9 -3
- package/es6/components/Meter/Meter.js +1 -1
- package/es6/components/Meter/propTypes.js +1 -1
- package/es6/components/NameValueList/NameValueList.js +1 -1
- package/es6/components/NameValuePair/NameValuePair.js +1 -1
- package/es6/components/Nav/Nav.js +1 -1
- package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/es6/components/Nav/stories/Sidebar.js +1 -1
- package/es6/components/Notification/Notification.js +1 -1
- package/es6/components/Notification/index.d.ts +1 -1
- package/es6/components/Notification/propTypes.js +1 -1
- package/es6/components/Page/Page.js +1 -1
- package/es6/components/PageContent/PageContent.js +1 -1
- package/es6/components/PageHeader/PageHeader.js +24 -14
- package/es6/components/PageHeader/index.d.ts +10 -1
- package/es6/components/PageHeader/propTypes.js +2 -1
- package/es6/components/PageHeader/stories/Size.js +43 -0
- package/es6/components/Pagination/PageControl.js +1 -1
- package/es6/components/Pagination/Pagination.js +1 -1
- package/es6/components/Pagination/propTypes.js +1 -1
- package/es6/components/Paragraph/Paragraph.js +1 -1
- package/es6/components/Paragraph/StyledParagraph.js +8 -1
- package/es6/components/Paragraph/index.d.ts +1 -0
- package/es6/components/Paragraph/propTypes.js +2 -1
- package/es6/components/Paragraph/stories/MaxLines.js +24 -0
- package/es6/components/RadioButton/RadioButton.js +1 -1
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/es6/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/es6/components/RangeInput/RangeInput.js +1 -1
- package/es6/components/RangeSelector/EdgeControl.js +1 -1
- package/es6/components/RangeSelector/RangeSelector.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/es6/components/RangeSelector/stories/Step.js +1 -1
- package/es6/components/RangeSelector/stories/Vertical.js +1 -1
- package/es6/components/RoutedAnchor/RoutedAnchor.js +2 -2
- package/es6/components/RoutedButton/RoutedButton.js +2 -2
- package/es6/components/Select/Select.js +12 -31
- package/es6/components/Select/SelectContainer.js +97 -78
- package/es6/components/Select/propTypes.js +1 -1
- package/es6/components/Select/stories/Clear.js +7 -1
- package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/es6/components/Select/stories/components/SearchInput.js +1 -1
- package/es6/components/Select/utils.js +1 -0
- package/es6/components/Sidebar/Sidebar.js +1 -1
- package/es6/components/Sidebar/stories/Labels.js +1 -1
- package/es6/components/SkipLink/SkipLink.js +1 -1
- package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/es6/components/Spinner/Spinner.js +2 -1
- package/es6/components/Stack/Stack.js +1 -1
- package/es6/components/Stack/propTypes.js +1 -1
- package/es6/components/Tab/StyledTab.js +2 -2
- package/es6/components/Tab/Tab.js +35 -18
- package/es6/components/Table/propTypes.js +1 -1
- package/es6/components/TableBody/TableBody.js +1 -1
- package/es6/components/TableCell/TableCell.js +1 -1
- package/es6/components/TableFooter/TableFooter.js +1 -1
- package/es6/components/TableHeader/TableHeader.js +1 -1
- package/es6/components/TableRow/TableRow.js +1 -1
- package/es6/components/Tabs/Tabs.js +236 -12
- package/es6/components/Tabs/propTypes.js +1 -1
- package/es6/components/Tabs/stories/Responsive.js +18 -0
- package/es6/components/Tag/Tag.js +1 -1
- package/es6/components/Tag/propTypes.js +1 -1
- package/es6/components/Text/Text.js +1 -1
- package/es6/components/Text/propTypes.js +1 -1
- package/es6/components/TextArea/TextArea.js +1 -1
- package/es6/components/TextArea/stories/NonResizable.js +1 -1
- package/es6/components/TextArea/stories/Simple.js +1 -1
- package/es6/components/TextInput/TextInput.js +1 -1
- package/es6/components/TextInput/stories/InsideFormField.js +1 -1
- package/es6/components/TextInput/stories/WithTags.js +1 -1
- package/es6/components/Tip/Tip.js +4 -23
- package/es6/components/Video/StyledVideo.js +2 -2
- package/es6/components/Video/Video.js +1 -1
- package/es6/components/Video/propTypes.js +1 -1
- package/es6/components/WorldMap/WorldMap.js +1 -1
- package/es6/components/WorldMap/propTypes.js +1 -1
- package/es6/components/WorldMap/stories/Places.js +1 -1
- package/es6/contexts/AnalyticsContext/AnalyticsContext.js +47 -0
- package/es6/contexts/AnalyticsContext/index.d.ts +7 -0
- package/es6/contexts/AnalyticsContext/index.js +1 -0
- package/es6/contexts/AnnounceContext/stories/Assertive.js +1 -1
- package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/contexts/index.js +1 -0
- package/es6/index.d.ts +1 -0
- package/es6/themes/base.d.ts +65 -33
- package/es6/themes/base.js +70 -2
- package/es6/utils/index.js +2 -1
- package/es6/utils/mixins.js +3 -0
- package/es6/utils/object.js +1 -1
- package/es6/utils/pagination.js +1 -1
- package/es6/utils/use-keyboard.js +25 -0
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +63 -55
- package/themes/base.d.ts +65 -33
- package/themes/base.js +70 -2
- package/tools/pack.js +20 -13
- package/tools/release-stable.js +2 -4
- package/utils/index.js +8 -0
- package/utils/mixins.js +7 -1
- package/utils/object.js +1 -1
- package/utils/pagination.js +1 -1
- package/utils/use-keyboard.js +34 -0
|
@@ -14,7 +14,7 @@ export interface RenderProps {
|
|
|
14
14
|
isSelected: boolean;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export interface
|
|
17
|
+
export interface CalendarHeaderProps {
|
|
18
18
|
date: Date;
|
|
19
19
|
locale?: string;
|
|
20
20
|
onPreviousMonth: () => void;
|
|
@@ -38,7 +38,7 @@ export interface CalendarProps {
|
|
|
38
38
|
disabled?: (string | string[])[];
|
|
39
39
|
fill?: boolean;
|
|
40
40
|
firstDayOfWeek?: 0 | 1;
|
|
41
|
-
header?: (args:
|
|
41
|
+
header?: (args: CalendarHeaderProps) => React.ReactNode;
|
|
42
42
|
locale?: string;
|
|
43
43
|
messages?: {
|
|
44
44
|
previous?: string;
|
|
@@ -9,7 +9,7 @@ var _generalPropTypes = require("../../utils/general-prop-types");
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
11
|
|
|
12
|
-
function _extends() { _extends = Object.assign
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
13
|
|
|
14
14
|
var PropType = {};
|
|
15
15
|
|
|
@@ -13,7 +13,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
17
|
|
|
18
18
|
var Container = function Container(_ref) {
|
|
19
19
|
var rest = _extends({}, _ref);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.withinDates = exports.subtractMonths = exports.subtractDays = exports.startOfMonth = exports.sameDayOrBefore = exports.sameDayOrAfter = exports.sameDay = exports.
|
|
4
|
+
exports.withinDates = exports.subtractMonths = exports.subtractDays = exports.startOfMonth = exports.sameDayOrBefore = exports.sameDayOrAfter = exports.sameDay = exports.handleOffset = exports.endOfMonth = exports.daysApart = exports.betweenDates = exports.addMonths = exports.addDays = void 0;
|
|
5
5
|
// Utility functions for the Calendar.
|
|
6
6
|
// Just what's needed to avoid having to include a dependency like momentjs.
|
|
7
7
|
var DAY_MILLISECONDS = 24 * 60 * 60 * 1000;
|
|
@@ -87,30 +87,22 @@ exports.sameDayOrBefore = sameDayOrBefore;
|
|
|
87
87
|
|
|
88
88
|
var daysApart = function daysApart(date1, date2) {
|
|
89
89
|
return Math.floor((date1.getTime() - date2.getTime()) / DAY_MILLISECONDS);
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
exports.daysApart = daysApart;
|
|
93
|
-
|
|
94
|
-
var formatToLocalYYYYMMDD = function formatToLocalYYYYMMDD(date, normalize) {
|
|
95
|
-
var adjustedDate = new Date(date);
|
|
96
|
-
var nextDate = normalize ? new Date(adjustedDate.getTime() - adjustedDate.getTimezoneOffset() * 60000) : new Date(adjustedDate.getTime());
|
|
97
|
-
return nextDate.toISOString().split('T')[0];
|
|
98
90
|
}; // betweenDates takes an array of two elements and checks if the
|
|
99
91
|
// supplied date lies between them, inclusive.
|
|
100
92
|
// returns 2 if exact match to one end, 1 if between, undefined otherwise
|
|
101
93
|
|
|
102
94
|
|
|
103
|
-
exports.
|
|
95
|
+
exports.daysApart = daysApart;
|
|
104
96
|
|
|
105
97
|
var betweenDates = function betweenDates(date, dates) {
|
|
106
98
|
var result;
|
|
107
99
|
|
|
108
100
|
if (dates) {
|
|
109
|
-
var
|
|
101
|
+
var _ref = Array.isArray(dates) ? dates.map(function (d) {
|
|
110
102
|
return d ? new Date(d) : undefined;
|
|
111
|
-
}),
|
|
112
|
-
from =
|
|
113
|
-
to =
|
|
103
|
+
}) : [dates, undefined],
|
|
104
|
+
from = _ref[0],
|
|
105
|
+
to = _ref[1];
|
|
114
106
|
|
|
115
107
|
if (from && sameDay(date, from) || to && sameDay(date, to)) {
|
|
116
108
|
result = 2;
|
|
@@ -136,8 +128,8 @@ var withinDates = function withinDates(date, dates) {
|
|
|
136
128
|
if (dates) {
|
|
137
129
|
if (Array.isArray(dates)) {
|
|
138
130
|
dates.some(function (d) {
|
|
139
|
-
if (
|
|
140
|
-
if (sameDay(date,
|
|
131
|
+
if (d instanceof Date) {
|
|
132
|
+
if (sameDay(date, d)) {
|
|
141
133
|
result = 2;
|
|
142
134
|
}
|
|
143
135
|
} else {
|
|
@@ -146,7 +138,7 @@ var withinDates = function withinDates(date, dates) {
|
|
|
146
138
|
|
|
147
139
|
return result;
|
|
148
140
|
});
|
|
149
|
-
} else if (sameDay(date,
|
|
141
|
+
} else if (sameDay(date, dates)) {
|
|
150
142
|
result = 2;
|
|
151
143
|
}
|
|
152
144
|
}
|
|
@@ -156,118 +148,13 @@ var withinDates = function withinDates(date, dates) {
|
|
|
156
148
|
|
|
157
149
|
exports.withinDates = withinDates;
|
|
158
150
|
|
|
159
|
-
var
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}; // Checks if daylight savings is in effect for a timezone and date
|
|
164
|
-
// Reference: https://stackoverflow.com/questions/11887934/how-to-check-if-dst-daylight-saving-time-is-in-effect-and-if-so-the-offset
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
exports.getTimestamp = getTimestamp;
|
|
168
|
-
|
|
169
|
-
var inDaylightSavings = function inDaylightSavings(day) {
|
|
170
|
-
var jan = new Date(day.getFullYear(), 0, 1).getTimezoneOffset();
|
|
171
|
-
var july = new Date(day.getFullYear(), 6, 1).getTimezoneOffset();
|
|
172
|
-
return Math.max(jan, july) !== day.getTimezoneOffset();
|
|
173
|
-
}; // Adjust for differences between timestamp on value and
|
|
174
|
-
// local timezone of user. Internal Calendar logic relies
|
|
175
|
-
// on Javascript date contructor which translates the provided
|
|
176
|
-
// date into the equivalent moment for the user's timezone, which
|
|
177
|
-
// can create undesired results. The standardizes the input value
|
|
178
|
-
// for internal calculations
|
|
179
|
-
// Reference: https://www.ursahealth.com/new-insights/dates-and-timezones-in-javascript
|
|
180
|
-
// If normalize is false just convert the value toISOString(),
|
|
181
|
-
// valueOffset/localOffset will be 0.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
var normalizeForTimezone = function normalizeForTimezone(value, timestamp, normalize) {
|
|
185
|
-
if (normalize === void 0) {
|
|
186
|
-
normalize = true;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
var adjustedDate;
|
|
190
|
-
var hourDelta = 0;
|
|
191
|
-
var valueOffset = 0;
|
|
192
|
-
var localOffset = 0;
|
|
193
|
-
|
|
194
|
-
if (normalize) {
|
|
195
|
-
if (timestamp && typeof timestamp === 'string') {
|
|
196
|
-
hourDelta = parseInt(timestamp == null ? void 0 : timestamp.split(':')[0], 10);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
var today = new Date();
|
|
200
|
-
adjustedDate = value && (Array.isArray(value) ? value : [value]).map(function (v) {
|
|
201
|
-
var day = new Date(v); // If one of the days either day or today is in daylight savings and the
|
|
202
|
-
// other is not the timezoneOffset will be different. If they are both
|
|
203
|
-
// in or out of daylight savings the timezoneOffset will be the same.
|
|
204
|
-
|
|
205
|
-
if (day && !inDaylightSavings(day) && day.getTimezoneOffset() > today.getTimezoneOffset()) {
|
|
206
|
-
// today is in daylight savings but the selected day is not
|
|
207
|
-
hourDelta -= 1;
|
|
208
|
-
} else if (day && inDaylightSavings(day) && day.getTimezoneOffset() < today.getTimezoneOffset()) {
|
|
209
|
-
// the selected day is in daylight savings but today is not
|
|
210
|
-
hourDelta += 1;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
valueOffset = hourDelta === 0 ? 0 : hourDelta * 60 * 60 * 1000;
|
|
214
|
-
localOffset = new Date().getTimezoneOffset() * 60 * 1000;
|
|
215
|
-
return new Date(new Date(v).getTime() - valueOffset + localOffset).toISOString();
|
|
216
|
-
});
|
|
217
|
-
} else {
|
|
218
|
-
adjustedDate = value && (Array.isArray(value) ? value : [value]).map(function (v) {
|
|
219
|
-
return new Date(new Date(v).getTime()).toISOString();
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
if (typeof value === 'string') {
|
|
224
|
-
var _adjustedDate = adjustedDate;
|
|
225
|
-
adjustedDate = _adjustedDate[0];
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
return adjustedDate;
|
|
229
|
-
}; // format the date to align with date format caller passed in
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
exports.normalizeForTimezone = normalizeForTimezone;
|
|
233
|
-
|
|
234
|
-
var formatDateToPropStructure = function formatDateToPropStructure(date, timestamp, normalize) {
|
|
235
|
-
var adjustedDate;
|
|
236
|
-
|
|
237
|
-
if (date) {
|
|
238
|
-
if (timestamp) {
|
|
239
|
-
adjustedDate = formatToLocalYYYYMMDD(date, normalize).split('T')[0] + "T" + timestamp;
|
|
240
|
-
} else if (timestamp === false) {
|
|
241
|
-
var _formatToLocalYYYYMMD = formatToLocalYYYYMMDD(date, normalize).split('T');
|
|
242
|
-
|
|
243
|
-
adjustedDate = _formatToLocalYYYYMMD[0];
|
|
244
|
-
} else adjustedDate = date;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
return adjustedDate;
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
exports.formatDateToPropStructure = formatDateToPropStructure;
|
|
251
|
-
|
|
252
|
-
var getFormattedDate = function getFormattedDate(nextDate, nextDates, normalize, range, timestamp) {
|
|
253
|
-
var adjustedDate;
|
|
254
|
-
var adjustedDates;
|
|
255
|
-
|
|
256
|
-
if (nextDates && Array.isArray(nextDates[0]) && (!nextDates[0][0] || !nextDates[0][1]) && range === true) {
|
|
257
|
-
// return string for backwards compatibility
|
|
258
|
-
var _nextDates$0$filter = nextDates[0].filter(function (d) {
|
|
259
|
-
return d;
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
adjustedDates = _nextDates$0$filter[0];
|
|
263
|
-
adjustedDates = formatDateToPropStructure(adjustedDates, timestamp, normalize);
|
|
264
|
-
} else if (nextDates) {
|
|
265
|
-
adjustedDates = [[formatDateToPropStructure(nextDates[0][0], timestamp, normalize), formatDateToPropStructure(nextDates[0][1], timestamp, normalize)]];
|
|
266
|
-
} else {
|
|
267
|
-
adjustedDate = formatDateToPropStructure(nextDate, timestamp, normalize);
|
|
268
|
-
}
|
|
151
|
+
var handleOffset = function handleOffset(date) {
|
|
152
|
+
var normalizedDate = new Date(date);
|
|
153
|
+
var offset = normalizedDate.getTimezoneOffset();
|
|
154
|
+
var hour = normalizedDate.getHours(); // add back offset
|
|
269
155
|
|
|
270
|
-
|
|
156
|
+
normalizedDate.setHours(hour, offset < 0 ? -offset : offset);
|
|
157
|
+
return normalizedDate;
|
|
271
158
|
};
|
|
272
159
|
|
|
273
|
-
exports.
|
|
160
|
+
exports.handleOffset = handleOffset;
|
package/components/Card/Card.js
CHANGED
|
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
20
|
var Card = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
21
21
|
var _theme$card$hover;
|
|
@@ -13,7 +13,7 @@ var _excluded = ["children", "title", "subTitle", "size"];
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
17
|
|
|
18
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
19
|
|
|
@@ -11,7 +11,7 @@ var _grommetIcons = require("grommet-icons");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
13
|
|
|
14
|
-
function _extends() { _extends = Object.assign
|
|
14
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
15
|
|
|
16
16
|
var theme = {
|
|
17
17
|
global: {
|
|
@@ -13,7 +13,7 @@ var _excluded = ["children", "title", "subTitle", "size"];
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
17
|
|
|
18
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
19
|
|
|
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
20
|
var CardBody = function CardBody(_ref) {
|
|
21
21
|
var rest = _extends({}, _ref);
|
|
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
20
|
// Needs to have a CardBody or a flex container when Card uses a fixed height.
|
|
21
21
|
var CardFooter = function CardFooter(_ref) {
|
|
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
20
|
var CardHeader = function CardHeader(_ref) {
|
|
21
21
|
var rest = _extends({}, _ref);
|
|
@@ -31,7 +31,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
31
31
|
|
|
32
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
33
|
|
|
34
|
-
function _extends() { _extends = Object.assign
|
|
34
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
35
|
|
|
36
36
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
37
37
|
|
|
@@ -9,7 +9,7 @@ var _generalPropTypes = require("../../utils/general-prop-types");
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
11
|
|
|
12
|
-
function _extends() { _extends = Object.assign
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
13
|
|
|
14
14
|
var CarouselPropType;
|
|
15
15
|
|
|
@@ -13,7 +13,7 @@ var _excluded = ["controls"];
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
17
|
|
|
18
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
19
|
|
|
@@ -27,7 +27,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
29
|
|
|
30
|
-
function _extends() { _extends = Object.assign
|
|
30
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
31
|
|
|
32
32
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
33
|
|
|
@@ -39,9 +39,12 @@ var calcBounds = function calcBounds(values, options) {
|
|
|
39
39
|
// coarseness influences the rounding of the bounds, the smaller the
|
|
40
40
|
// number, the more the bounds will be rounded. e.g. 111 -> 110 -> 100
|
|
41
41
|
// Normalize to an array. Backwards compatible has no coarseness for x-axis
|
|
42
|
-
var coarseness = Array.isArray(options.coarseness) && options.coarseness || options.coarseness && [undefined, options.coarseness] || [undefined, 5];
|
|
42
|
+
var coarseness = Array.isArray(options.coarseness) && options.coarseness || options.coarseness && [undefined, options.coarseness] || [undefined, 5];
|
|
43
|
+
var coarseX = coarseness[0],
|
|
44
|
+
coarseY = coarseness[1]; // the number of steps is one less than the number of labels
|
|
43
45
|
|
|
44
46
|
var steps = options.steps || [1, 1];
|
|
47
|
+
var stepsY = steps[1];
|
|
45
48
|
var calcValues = (0, _utils.normalizeValues)(values || []); // min and max values
|
|
46
49
|
|
|
47
50
|
var minX;
|
|
@@ -88,19 +91,16 @@ var calcBounds = function calcBounds(values, options) {
|
|
|
88
91
|
// graph axis labels.
|
|
89
92
|
|
|
90
93
|
|
|
91
|
-
|
|
92
|
-
cY = coarseness[1];
|
|
93
|
-
|
|
94
|
-
if (cX) {
|
|
94
|
+
if (coarseX) {
|
|
95
95
|
var deltaX = maxX - minX;
|
|
96
|
-
var intervalX = Number.parseFloat((deltaX /
|
|
96
|
+
var intervalX = Number.parseFloat((deltaX / coarseX).toPrecision(1));
|
|
97
97
|
minX = alignMin(minX, intervalX);
|
|
98
98
|
maxX = alignMax(maxX, intervalX);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
if (
|
|
101
|
+
if (coarseY) {
|
|
102
102
|
var deltaY = maxY - minY;
|
|
103
|
-
var intervalY = Number.parseFloat((deltaY /
|
|
103
|
+
var intervalY = Number.parseFloat((deltaY / coarseY).toPrecision(1));
|
|
104
104
|
minY = alignMin(minY, intervalY);
|
|
105
105
|
maxY = alignMax(maxY, intervalY);
|
|
106
106
|
}
|
|
@@ -108,19 +108,26 @@ var calcBounds = function calcBounds(values, options) {
|
|
|
108
108
|
if (minY < 0 && maxY > 0 && Math.abs(minY) !== Math.abs(maxY)) {
|
|
109
109
|
// Adjust min and max when crossing 0 to ensure 0 will be shown on
|
|
110
110
|
// the Y axis based on the number of steps.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (Math.abs(minSteps) < Math.abs(maxSteps)) {
|
|
117
|
-
stepInterval = maxY / Math.floor(maxSteps);
|
|
118
|
-
maxY = stepInterval * Math.floor(maxSteps);
|
|
119
|
-
minY = stepInterval * Math.floor(minSteps);
|
|
111
|
+
if (stepsY === 1) {
|
|
112
|
+
var largest = Math.max(Math.abs(minY), Math.abs(maxY));
|
|
113
|
+
minY = -largest;
|
|
114
|
+
maxY = largest;
|
|
120
115
|
} else {
|
|
121
|
-
stepInterval =
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
var stepInterval = (maxY - minY) / stepsY;
|
|
117
|
+
var minSteps = minY / stepInterval;
|
|
118
|
+
var maxSteps = maxY / stepInterval;
|
|
119
|
+
|
|
120
|
+
if (Math.abs(minSteps) < Math.abs(maxSteps)) {
|
|
121
|
+
// more above than below
|
|
122
|
+
stepInterval = maxY / Math.floor(maxSteps);
|
|
123
|
+
maxY = stepInterval * Math.floor(maxSteps);
|
|
124
|
+
minY = stepInterval * Math.floor(minSteps);
|
|
125
|
+
} else {
|
|
126
|
+
// more below than above
|
|
127
|
+
stepInterval = Math.abs(minY / Math.ceil(minSteps));
|
|
128
|
+
minY = stepInterval * Math.ceil(minSteps);
|
|
129
|
+
maxY = stepInterval * Math.ceil(maxSteps);
|
|
130
|
+
}
|
|
124
131
|
}
|
|
125
132
|
}
|
|
126
133
|
}
|
|
@@ -143,27 +150,37 @@ var calcs = function calcs(values, options) {
|
|
|
143
150
|
|
|
144
151
|
// the number of steps is one less than the number of labels
|
|
145
152
|
var steps = options.steps || [1, 1];
|
|
153
|
+
var stepsX = steps[0],
|
|
154
|
+
stepsY = steps[1];
|
|
146
155
|
var bounds = options.bounds || calcBounds(values, options);
|
|
147
156
|
if (options.min !== undefined) bounds[1][0] = options.min;
|
|
148
157
|
if (options.max !== undefined) bounds[1][1] = options.max;
|
|
149
|
-
var
|
|
158
|
+
var boundsX = bounds[0],
|
|
159
|
+
boundsY = bounds[1];
|
|
160
|
+
var boundsXmin = boundsX[0],
|
|
161
|
+
boundsXmax = boundsX[1];
|
|
162
|
+
var boundsYmin = boundsY[0],
|
|
163
|
+
boundsYmax = boundsY[1];
|
|
164
|
+
var dimensions = [round(boundsXmax - boundsXmin, 2), round(boundsYmax - boundsYmin, 2)];
|
|
165
|
+
var dimensionsX = dimensions[0],
|
|
166
|
+
dimensionsY = dimensions[1]; // Calculate x and y axis values across the specfied number of steps.
|
|
150
167
|
|
|
151
168
|
var yAxis = [];
|
|
152
|
-
var y =
|
|
169
|
+
var y = boundsYmax; // To deal with javascript math limitations, round the step with 4 decimal
|
|
153
170
|
// places and then push the values with 2 decimal places
|
|
154
171
|
|
|
155
|
-
var yStepInterval = round(
|
|
172
|
+
var yStepInterval = round(dimensionsY / stepsY, 4);
|
|
156
173
|
|
|
157
|
-
while (round(y, 2) >=
|
|
174
|
+
while (round(y, 2) >= boundsYmin) {
|
|
158
175
|
yAxis.push(round(y, 2));
|
|
159
176
|
y -= yStepInterval;
|
|
160
177
|
}
|
|
161
178
|
|
|
162
179
|
var xAxis = [];
|
|
163
|
-
var x =
|
|
164
|
-
var xStepInterval = round(
|
|
180
|
+
var x = boundsXmin;
|
|
181
|
+
var xStepInterval = round(dimensionsX / stepsX, 4);
|
|
165
182
|
|
|
166
|
-
while (round(x, 2) <=
|
|
183
|
+
while (round(x, 2) <= boundsXmax) {
|
|
167
184
|
xAxis.push(round(x, 2));
|
|
168
185
|
x += xStepInterval;
|
|
169
186
|
}
|
|
@@ -96,6 +96,32 @@ export interface ChartProps {
|
|
|
96
96
|
)[];
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
export interface ChartExtendedProps
|
|
100
|
+
extends ChartProps,
|
|
101
|
+
Omit<JSX.IntrinsicElements['svg'], keyof ChartProps> {}
|
|
100
102
|
|
|
101
|
-
|
|
103
|
+
declare const Chart: React.FC<ChartExtendedProps>;
|
|
104
|
+
|
|
105
|
+
type Bounds = [[number, number], [number, number]] | [[], []];
|
|
106
|
+
|
|
107
|
+
interface CalcsResult {
|
|
108
|
+
axis: [number[], number[]];
|
|
109
|
+
bounds: Bounds;
|
|
110
|
+
dimensions: [number, number];
|
|
111
|
+
pad: string;
|
|
112
|
+
thickness: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
interface CalcsOptions {
|
|
116
|
+
min?: number;
|
|
117
|
+
max?: number;
|
|
118
|
+
bounds?: Bounds;
|
|
119
|
+
thickness?: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
declare const calcs: (
|
|
123
|
+
values: number[] | number[][],
|
|
124
|
+
options?: CalcsOptions,
|
|
125
|
+
) => CalcsResult;
|
|
126
|
+
|
|
127
|
+
export { Chart, calcs };
|
|
@@ -9,7 +9,7 @@ var _generalPropTypes = require("../../utils/general-prop-types");
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
11
|
|
|
12
|
-
function _extends() { _extends = Object.assign
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
13
|
|
|
14
14
|
var thicknessType = _propTypes["default"].oneOfType([_propTypes["default"].oneOf(['hair', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'none']), _propTypes["default"].string, _propTypes["default"].number]);
|
|
15
15
|
|
|
@@ -13,7 +13,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
17
|
|
|
18
18
|
var Rich = function Rich() {
|
|
19
19
|
var _useState = (0, _react.useState)({
|
|
@@ -15,23 +15,28 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var count = 30,
|
|
19
|
+
max = 100,
|
|
20
|
+
min = 0;
|
|
21
|
+
|
|
22
|
+
var ScanChart = function ScanChart() {
|
|
19
23
|
var _useState = (0, _react.useState)(undefined),
|
|
20
24
|
active = _useState[0],
|
|
21
25
|
setActive = _useState[1];
|
|
22
26
|
|
|
23
|
-
var data =
|
|
24
|
-
|
|
27
|
+
var data = (0, _react.useMemo)(function () {
|
|
28
|
+
return (0, _data.generateData)(count, max, min);
|
|
29
|
+
}, []);
|
|
25
30
|
var values = data.map(function (d) {
|
|
26
31
|
return [d.time, d.value];
|
|
27
32
|
});
|
|
28
33
|
|
|
29
34
|
var _useMemo = (0, _react.useMemo)(function () {
|
|
30
35
|
return (0, _calcs.calcs)(values, {
|
|
31
|
-
min:
|
|
36
|
+
min: min,
|
|
32
37
|
max: max
|
|
33
38
|
});
|
|
34
|
-
}, [values
|
|
39
|
+
}, [values]),
|
|
35
40
|
axis = _useMemo.axis,
|
|
36
41
|
bounds = _useMemo.bounds,
|
|
37
42
|
pad = _useMemo.pad,
|
|
@@ -157,10 +162,7 @@ var ScanChart = function ScanChart(props) {
|
|
|
157
162
|
};
|
|
158
163
|
|
|
159
164
|
var Scan = function Scan() {
|
|
160
|
-
return /*#__PURE__*/_react["default"].createElement(ScanChart,
|
|
161
|
-
data: (0, _data.generateData)(30, 100),
|
|
162
|
-
max: 100
|
|
163
|
-
});
|
|
165
|
+
return /*#__PURE__*/_react["default"].createElement(ScanChart, null);
|
|
164
166
|
};
|
|
165
167
|
|
|
166
168
|
exports.Scan = Scan;
|
|
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
20
|
// compress data for outer control chart
|
|
21
21
|
var compressData = function compressData(data, max, count) {
|