grommet 2.39.0 → 2.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/all/stories/AllComponents.js +1 -1
  2. package/components/Accordion/Accordion.js +1 -1
  3. package/components/Accordion/stories/CustomThemed/Custom.js +1 -1
  4. package/components/Accordion/stories/Simple.js +1 -1
  5. package/components/AccordionPanel/AccordionPanel.js +1 -1
  6. package/components/Anchor/Anchor.js +1 -1
  7. package/components/Avatar/Avatar.js +1 -1
  8. package/components/Box/Box.js +1 -1
  9. package/components/Box/StyledBox.js +3 -3
  10. package/components/Button/Button.js +1 -1
  11. package/components/Calendar/Calendar.js +15 -15
  12. package/components/Card/stories/CustomThemed/Clickable.js +1 -1
  13. package/components/Card/stories/CustomThemed/Themed.js +1 -1
  14. package/components/Cards/Cards.js +1 -1
  15. package/components/Carousel/Carousel.js +1 -1
  16. package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
  17. package/components/Chart/Chart.js +1 -1
  18. package/components/CheckBox/CheckBox.js +1 -1
  19. package/components/CheckBox/stories/NoLabel.js +1 -1
  20. package/components/CheckBox/stories/Simple.js +1 -1
  21. package/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
  22. package/components/Clock/Analog.js +1 -1
  23. package/components/Clock/Clock.js +1 -1
  24. package/components/Clock/Digital.js +1 -1
  25. package/components/Collapsible/stories/Nested.js +1 -1
  26. package/components/Data/Data.js +1 -1
  27. package/components/Data/DataForm.js +5 -5
  28. package/components/Data/filter.js +6 -6
  29. package/components/Data/index.d.ts +1 -3
  30. package/components/Data/propTypes.js +2 -1
  31. package/components/Data/stories/ComposedToolbar.js +2 -1
  32. package/components/Data/stories/Inline.js +1 -1
  33. package/components/Data/stories/Views.js +3 -0
  34. package/components/DataChart/DataChart.js +1 -1
  35. package/components/DataChart/XAxis.js +1 -1
  36. package/components/DataClearFilters/DataClearFilters.js +1 -1
  37. package/components/DataFilter/DataFilter.js +4 -4
  38. package/components/DataFilters/DataFilters.js +1 -1
  39. package/components/DataSearch/DataSearch.js +1 -1
  40. package/components/DataSort/DataSort.js +1 -1
  41. package/components/DataSummary/DataSummary.js +1 -1
  42. package/components/DataTable/Body.js +1 -1
  43. package/components/DataTable/Cell.js +1 -1
  44. package/components/DataTable/DataTable.js +1 -1
  45. package/components/DataTable/ExpanderCell.js +1 -1
  46. package/components/DataTable/Footer.js +1 -1
  47. package/components/DataTable/GroupedBody.js +1 -1
  48. package/components/DataTable/Header.js +1 -1
  49. package/components/DataTable/buildState.js +10 -10
  50. package/components/DataTableColumns/DataTableColumns.js +1 -1
  51. package/components/DataTableColumns/stories/DefaultValue.js +49 -0
  52. package/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
  53. package/components/DataView/DataView.js +1 -1
  54. package/components/DateInput/DateInput.js +1 -1
  55. package/components/Diagram/Diagram.js +1 -1
  56. package/components/Diagram/stories/Progressing.js +1 -1
  57. package/components/Distribution/Distribution.js +5 -5
  58. package/components/Drop/Drop.js +1 -1
  59. package/components/Drop/DropContainer.js +1 -1
  60. package/components/DropButton/DropButton.js +1 -1
  61. package/components/FileInput/FileInput.js +1 -1
  62. package/components/FocusedContainer.js +1 -1
  63. package/components/Form/Form.js +7 -7
  64. package/components/FormField/FormField.js +1 -1
  65. package/components/Grid/Grid.js +1 -1
  66. package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
  67. package/components/Grommet/Grommet.js +1 -1
  68. package/components/Header/Header.js +1 -1
  69. package/components/Heading/Heading.js +1 -1
  70. package/components/Image/Image.js +1 -1
  71. package/components/InfiniteScroll/InfiniteScroll.js +1 -0
  72. package/components/Keyboard/Keyboard.js +1 -1
  73. package/components/Layer/LayerContainer.js +1 -1
  74. package/components/List/List.js +5 -3
  75. package/components/List/index.d.ts +1 -0
  76. package/components/List/propTypes.js +1 -0
  77. package/components/Markdown/Markdown.js +1 -1
  78. package/components/MaskedInput/MaskedInput.js +1 -1
  79. package/components/Menu/Menu.js +1 -1
  80. package/components/Meter/Bar.js +1 -1
  81. package/components/Meter/Circle.js +1 -1
  82. package/components/Meter/Meter.js +1 -1
  83. package/components/NameValueList/NameValueList.js +1 -1
  84. package/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
  85. package/components/Nav/stories/Sidebar.js +1 -1
  86. package/components/Notification/Notification.js +1 -1
  87. package/components/Page/Page.js +1 -1
  88. package/components/PageContent/PageContent.js +1 -1
  89. package/components/PageHeader/PageHeader.js +1 -1
  90. package/components/Pagination/PageControl.js +1 -1
  91. package/components/Pagination/Pagination.js +1 -1
  92. package/components/Pagination/PaginationStep.js +1 -1
  93. package/components/Pagination/PaginationSummary.js +1 -1
  94. package/components/Paragraph/Paragraph.js +1 -1
  95. package/components/RadioButton/RadioButton.js +1 -1
  96. package/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  97. package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
  98. package/components/RadioButtonGroup/stories/Disabled.js +1 -1
  99. package/components/RangeInput/RangeInput.js +1 -1
  100. package/components/RangeSelector/EdgeControl.js +1 -1
  101. package/components/RangeSelector/RangeSelector.js +1 -1
  102. package/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
  103. package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
  104. package/components/RangeSelector/stories/Step.js +1 -1
  105. package/components/RangeSelector/stories/Vertical.js +1 -1
  106. package/components/RoutedAnchor/RoutedAnchor.js +1 -1
  107. package/components/RoutedButton/RoutedButton.js +1 -1
  108. package/components/Select/DefaultSelectTextInput.js +1 -1
  109. package/components/Select/Select.js +1 -1
  110. package/components/Select/SelectContainer.js +1 -1
  111. package/components/Select/stories/components/SearchBorderBox.js +1 -1
  112. package/components/Select/stories/components/SearchInput.js +1 -1
  113. package/components/Select/utils.js +10 -10
  114. package/components/SelectMultiple/SelectMultiple.js +1 -1
  115. package/components/Sidebar/Sidebar.js +1 -1
  116. package/components/Sidebar/stories/Labels.js +1 -1
  117. package/components/Skeleton/Skeleton.js +1 -1
  118. package/components/Skeleton/stories/GridContainer.js +1 -1
  119. package/components/Skeleton/stories/Individual.js +1 -1
  120. package/components/SkipLink/SkipLink.js +1 -1
  121. package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
  122. package/components/Spinner/Spinner.js +1 -1
  123. package/components/Stack/Stack.js +1 -1
  124. package/components/StarRating/StarRating.js +1 -1
  125. package/components/Tab/Tab.js +1 -1
  126. package/components/Table/Table.js +1 -1
  127. package/components/TableCell/TableCell.js +1 -1
  128. package/components/Tabs/Tabs.js +1 -1
  129. package/components/Tag/Tag.js +1 -1
  130. package/components/Text/Text.js +1 -1
  131. package/components/Text/TextSkeleton.js +1 -1
  132. package/components/TextArea/TextArea.js +1 -1
  133. package/components/TextInput/TextInput.js +1 -1
  134. package/components/TextInput/stories/WithTags.js +1 -1
  135. package/components/Tip/Tip.js +5 -0
  136. package/components/Tip/index.d.ts +1 -0
  137. package/components/Tip/propTypes.js +2 -1
  138. package/components/ToggleGroup/ToggleGroup.js +1 -1
  139. package/components/Toolbar/Toolbar.js +1 -1
  140. package/components/Video/StyledVideo.js +1 -1
  141. package/components/Video/Video.js +1 -1
  142. package/components/WorldMap/WorldMap.js +1 -1
  143. package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
  144. package/es6/all/stories/AllComponents.js +1 -1
  145. package/es6/components/Accordion/Accordion.js +1 -1
  146. package/es6/components/Accordion/stories/CustomThemed/Custom.js +1 -1
  147. package/es6/components/Accordion/stories/Simple.js +1 -1
  148. package/es6/components/AccordionPanel/AccordionPanel.js +1 -1
  149. package/es6/components/Anchor/Anchor.js +1 -1
  150. package/es6/components/Avatar/Avatar.js +1 -1
  151. package/es6/components/Box/Box.js +1 -1
  152. package/es6/components/Box/StyledBox.js +3 -3
  153. package/es6/components/Button/Button.js +1 -1
  154. package/es6/components/Calendar/Calendar.js +16 -15
  155. package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
  156. package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
  157. package/es6/components/Cards/Cards.js +1 -1
  158. package/es6/components/Carousel/Carousel.js +1 -1
  159. package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
  160. package/es6/components/Chart/Chart.js +1 -1
  161. package/es6/components/CheckBox/CheckBox.js +1 -1
  162. package/es6/components/CheckBox/stories/NoLabel.js +1 -1
  163. package/es6/components/CheckBox/stories/Simple.js +1 -1
  164. package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
  165. package/es6/components/Clock/Analog.js +1 -1
  166. package/es6/components/Clock/Clock.js +1 -1
  167. package/es6/components/Clock/Digital.js +1 -1
  168. package/es6/components/Collapsible/stories/Nested.js +1 -1
  169. package/es6/components/Data/Data.js +1 -1
  170. package/es6/components/Data/DataForm.js +5 -5
  171. package/es6/components/Data/filter.js +6 -6
  172. package/es6/components/Data/index.d.ts +1 -3
  173. package/es6/components/Data/propTypes.js +2 -1
  174. package/es6/components/Data/stories/ComposedToolbar.js +2 -1
  175. package/es6/components/Data/stories/Inline.js +1 -1
  176. package/es6/components/Data/stories/Views.js +3 -0
  177. package/es6/components/DataChart/DataChart.js +1 -1
  178. package/es6/components/DataChart/XAxis.js +1 -1
  179. package/es6/components/DataClearFilters/DataClearFilters.js +1 -1
  180. package/es6/components/DataFilter/DataFilter.js +4 -4
  181. package/es6/components/DataFilters/DataFilters.js +1 -1
  182. package/es6/components/DataSearch/DataSearch.js +1 -1
  183. package/es6/components/DataSort/DataSort.js +1 -1
  184. package/es6/components/DataSummary/DataSummary.js +1 -1
  185. package/es6/components/DataTable/Body.js +1 -1
  186. package/es6/components/DataTable/Cell.js +1 -1
  187. package/es6/components/DataTable/DataTable.js +1 -1
  188. package/es6/components/DataTable/ExpanderCell.js +1 -1
  189. package/es6/components/DataTable/Footer.js +1 -1
  190. package/es6/components/DataTable/GroupedBody.js +1 -1
  191. package/es6/components/DataTable/Header.js +1 -1
  192. package/es6/components/DataTable/buildState.js +11 -10
  193. package/es6/components/DataTableColumns/DataTableColumns.js +1 -1
  194. package/es6/components/DataTableColumns/stories/DefaultValue.js +45 -0
  195. package/es6/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
  196. package/es6/components/DataView/DataView.js +1 -1
  197. package/es6/components/DateInput/DateInput.js +1 -1
  198. package/es6/components/Diagram/Diagram.js +1 -1
  199. package/es6/components/Diagram/stories/Progressing.js +1 -1
  200. package/es6/components/Distribution/Distribution.js +6 -6
  201. package/es6/components/Drop/Drop.js +1 -1
  202. package/es6/components/Drop/DropContainer.js +1 -1
  203. package/es6/components/DropButton/DropButton.js +1 -1
  204. package/es6/components/FileInput/FileInput.js +1 -1
  205. package/es6/components/FocusedContainer.js +1 -1
  206. package/es6/components/Form/Form.js +7 -7
  207. package/es6/components/FormField/FormField.js +1 -1
  208. package/es6/components/Grid/Grid.js +1 -1
  209. package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
  210. package/es6/components/Grommet/Grommet.js +1 -1
  211. package/es6/components/Header/Header.js +1 -1
  212. package/es6/components/Heading/Heading.js +1 -1
  213. package/es6/components/Image/Image.js +1 -1
  214. package/es6/components/InfiniteScroll/InfiniteScroll.js +1 -0
  215. package/es6/components/Keyboard/Keyboard.js +1 -1
  216. package/es6/components/Layer/LayerContainer.js +1 -1
  217. package/es6/components/List/List.js +5 -3
  218. package/es6/components/List/index.d.ts +1 -0
  219. package/es6/components/List/propTypes.js +1 -0
  220. package/es6/components/Markdown/Markdown.js +1 -1
  221. package/es6/components/MaskedInput/MaskedInput.js +1 -1
  222. package/es6/components/Menu/Menu.js +1 -1
  223. package/es6/components/Meter/Bar.js +1 -1
  224. package/es6/components/Meter/Circle.js +1 -1
  225. package/es6/components/Meter/Meter.js +1 -1
  226. package/es6/components/NameValueList/NameValueList.js +1 -1
  227. package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
  228. package/es6/components/Nav/stories/Sidebar.js +1 -1
  229. package/es6/components/Notification/Notification.js +1 -1
  230. package/es6/components/Page/Page.js +1 -1
  231. package/es6/components/PageContent/PageContent.js +1 -1
  232. package/es6/components/PageHeader/PageHeader.js +1 -1
  233. package/es6/components/Pagination/PageControl.js +1 -1
  234. package/es6/components/Pagination/Pagination.js +1 -1
  235. package/es6/components/Pagination/PaginationStep.js +1 -1
  236. package/es6/components/Pagination/PaginationSummary.js +1 -1
  237. package/es6/components/Paragraph/Paragraph.js +1 -1
  238. package/es6/components/RadioButton/RadioButton.js +1 -1
  239. package/es6/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  240. package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
  241. package/es6/components/RadioButtonGroup/stories/Disabled.js +1 -1
  242. package/es6/components/RangeInput/RangeInput.js +1 -1
  243. package/es6/components/RangeSelector/EdgeControl.js +1 -1
  244. package/es6/components/RangeSelector/RangeSelector.js +1 -1
  245. package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
  246. package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
  247. package/es6/components/RangeSelector/stories/Step.js +1 -1
  248. package/es6/components/RangeSelector/stories/Vertical.js +1 -1
  249. package/es6/components/RoutedAnchor/RoutedAnchor.js +1 -1
  250. package/es6/components/RoutedButton/RoutedButton.js +1 -1
  251. package/es6/components/Select/DefaultSelectTextInput.js +1 -1
  252. package/es6/components/Select/Select.js +1 -1
  253. package/es6/components/Select/SelectContainer.js +1 -1
  254. package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
  255. package/es6/components/Select/stories/components/SearchInput.js +1 -1
  256. package/es6/components/Select/utils.js +11 -10
  257. package/es6/components/SelectMultiple/SelectMultiple.js +1 -1
  258. package/es6/components/Sidebar/Sidebar.js +1 -1
  259. package/es6/components/Sidebar/stories/Labels.js +1 -1
  260. package/es6/components/Skeleton/Skeleton.js +1 -1
  261. package/es6/components/Skeleton/stories/GridContainer.js +1 -1
  262. package/es6/components/Skeleton/stories/Individual.js +1 -1
  263. package/es6/components/SkipLink/SkipLink.js +1 -1
  264. package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
  265. package/es6/components/Spinner/Spinner.js +1 -1
  266. package/es6/components/Stack/Stack.js +1 -1
  267. package/es6/components/StarRating/StarRating.js +1 -1
  268. package/es6/components/Tab/Tab.js +1 -1
  269. package/es6/components/Table/Table.js +1 -1
  270. package/es6/components/TableCell/TableCell.js +1 -1
  271. package/es6/components/Tabs/Tabs.js +1 -1
  272. package/es6/components/Tag/Tag.js +1 -1
  273. package/es6/components/Text/Text.js +1 -1
  274. package/es6/components/Text/TextSkeleton.js +1 -1
  275. package/es6/components/TextArea/TextArea.js +1 -1
  276. package/es6/components/TextInput/TextInput.js +1 -1
  277. package/es6/components/TextInput/stories/WithTags.js +1 -1
  278. package/es6/components/Tip/Tip.js +6 -1
  279. package/es6/components/Tip/index.d.ts +1 -0
  280. package/es6/components/Tip/propTypes.js +2 -1
  281. package/es6/components/ToggleGroup/ToggleGroup.js +1 -1
  282. package/es6/components/Toolbar/Toolbar.js +1 -1
  283. package/es6/components/Video/StyledVideo.js +1 -1
  284. package/es6/components/Video/Video.js +1 -1
  285. package/es6/components/WorldMap/WorldMap.js +1 -1
  286. package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
  287. package/es6/utils/DOM.js +7 -5
  288. package/es6/utils/background.js +4 -4
  289. package/es6/utils/colors.js +3 -2
  290. package/es6/utils/mixins.js +3 -2
  291. package/es6/utils/object.js +3 -2
  292. package/es6/utils/pagination.js +1 -1
  293. package/es6/utils/styles.js +1 -1
  294. package/grommet.min.js +1 -1
  295. package/grommet.min.js.map +1 -1
  296. package/package.json +33 -34
  297. package/utils/DOM.js +4 -4
  298. package/utils/background.js +4 -4
  299. package/utils/colors.js +2 -2
  300. package/utils/mixins.js +2 -2
  301. package/utils/object.js +2 -2
  302. package/utils/pagination.js +1 -1
  303. package/utils/styles.js +1 -1
@@ -1,5 +1,5 @@
1
1
  var _excluded = ["activeDate", "animate", "bounds", "children", "date", "dates", "daysOfWeek", "disabled", "initialFocus", "fill", "firstDayOfWeek", "header", "locale", "messages", "onReference", "onSelect", "range", "reference", "showAdjacentDays", "size", "timestamp"];
2
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
2
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
4
  import React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
5
5
  import { AnnounceContext } from '../../contexts/AnnounceContext';
@@ -51,7 +51,7 @@ var currentlySelectedString = function currentlySelectedString(value, locale) {
51
51
 
52
52
  // calendar value may be a single date, multiple dates, a range of dates
53
53
  // supplied as ISOstrings.
54
- var normalizeInput = function normalizeInput(dateValue) {
54
+ var _normalizeInput = function normalizeInput(dateValue) {
55
55
  var result;
56
56
  if (dateValue instanceof Date) {
57
57
  result = dateValue;
@@ -61,12 +61,12 @@ var normalizeInput = function normalizeInput(dateValue) {
61
61
  result = setHoursWithOffset(dateValue);
62
62
  } else if (Array.isArray(dateValue)) {
63
63
  result = dateValue.map(function (d) {
64
- return normalizeInput(d);
64
+ return _normalizeInput(d);
65
65
  });
66
66
  }
67
67
  return result;
68
68
  };
69
- var normalizeOutput = function normalizeOutput(dateValue, outputFormat) {
69
+ var _normalizeOutput = function normalizeOutput(dateValue, outputFormat) {
70
70
  var result;
71
71
  var normalize = function normalize(value) {
72
72
  var normalizedValue = value.toISOString();
@@ -82,7 +82,7 @@ var normalizeOutput = function normalizeOutput(dateValue, outputFormat) {
82
82
  result = undefined;
83
83
  } else {
84
84
  result = dateValue.map(function (d) {
85
- return normalizeOutput(d, outputFormat);
85
+ return _normalizeOutput(d, outputFormat);
86
86
  });
87
87
  }
88
88
  return result;
@@ -138,15 +138,16 @@ var disabledCalendarNextMonthButton = function disabledCalendarNextMonthButton(d
138
138
  var firstBound = new Date(bounds[0]);
139
139
  return !sameDayOrAfter(firstBound, reference) && !betweenDates(date, bounds);
140
140
  };
141
- export var getOutputFormat = function getOutputFormat(dates) {
141
+ var _getOutputFormat = function getOutputFormat(dates) {
142
142
  if (typeof dates === 'string' && (dates == null ? void 0 : dates.indexOf('T')) === -1) {
143
143
  return 'no timezone';
144
144
  }
145
145
  if (Array.isArray(dates)) {
146
- return getOutputFormat(dates[0]);
146
+ return _getOutputFormat(dates[0]);
147
147
  }
148
148
  return 'date timezone';
149
149
  };
150
+ export { _getOutputFormat as getOutputFormat };
150
151
  var millisecondsPerYear = 31557600000;
151
152
  var CalendarDayButton = function CalendarDayButton(props) {
152
153
  return /*#__PURE__*/React.createElement(Button, _extends({
@@ -259,26 +260,26 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref3, ref) {
259
260
  useEffect(function () {
260
261
  if (activeDateProp) setActiveDate(activeDateProp);
261
262
  }, [activeDateProp]);
262
- var _useState3 = useState(normalizeInput(dateProp || datesProp)),
263
+ var _useState3 = useState(_normalizeInput(dateProp || datesProp)),
263
264
  value = _useState3[0],
264
265
  setValue = _useState3[1];
265
266
  useEffect(function () {
266
267
  var val = dateProp || datesProp;
267
- setValue(normalizeInput(val));
268
+ setValue(_normalizeInput(val));
268
269
  }, [dateProp, datesProp]);
269
- var _useState4 = useState(getReference(normalizeInput(referenceProp), value)),
270
+ var _useState4 = useState(getReference(_normalizeInput(referenceProp), value)),
270
271
  reference = _useState4[0],
271
272
  setReference = _useState4[1];
272
273
  useEffect(function () {
273
274
  if (value) {
274
- setReference(getReference(normalizeInput(referenceProp), value));
275
+ setReference(getReference(_normalizeInput(referenceProp), value));
275
276
  }
276
277
  }, [referenceProp, value]);
277
- var _useState5 = useState(getOutputFormat(dateProp || datesProp)),
278
+ var _useState5 = useState(_getOutputFormat(dateProp || datesProp)),
278
279
  outputFormat = _useState5[0],
279
280
  setOutputFormat = _useState5[1];
280
281
  useEffect(function () {
281
- setOutputFormat(getOutputFormat(dateProp || datesProp));
282
+ setOutputFormat(_getOutputFormat(dateProp || datesProp));
282
283
  }, [dateProp, datesProp]);
283
284
 
284
285
  // normalize bounds
@@ -482,7 +483,7 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref3, ref) {
482
483
  nextValue = selectedDate;
483
484
  }
484
485
  if (onSelect) {
485
- nextValue = normalizeOutput(nextValue, outputFormat);
486
+ nextValue = _normalizeOutput(nextValue, outputFormat);
486
487
  onSelect(nextValue);
487
488
  }
488
489
  }, [handleRange, onSelect, outputFormat, range, value]);
@@ -643,7 +644,7 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref3, ref) {
643
644
  } else if (selectedState === 1) {
644
645
  inRange = true;
645
646
  }
646
- var dayDisabled = withinDates(day, normalizeInput(disabled)) || bounds && !betweenDates(day, normalizeInput(bounds));
647
+ var dayDisabled = withinDates(day, _normalizeInput(disabled)) || bounds && !betweenDates(day, _normalizeInput(bounds));
647
648
  if (!firstDayInMonth && !dayDisabled && day.getMonth() === reference.getMonth()) {
648
649
  firstDayInMonth = dateObject;
649
650
  }
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["children", "title", "subTitle", "size"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React from 'react';
5
5
  import { Bluetooth as Memory } from "grommet-icons/es6/icons/Bluetooth";
6
6
  import { Storage } from "grommet-icons/es6/icons/Storage";
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["children", "title", "subTitle", "size"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React from 'react';
5
5
  import { Location } from "grommet-icons/es6/icons/Location";
6
6
  import { System } from "grommet-icons/es6/icons/System";
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["as", "children", "data", "margin", "onMore", "pad", "paginate", "show", "size", "step"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { Fragment, useContext } from 'react';
5
5
  import { DataContext } from '../../contexts/DataContext';
6
6
  import { Box } from '../Box';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["activeChild", "initialChild", "onChild", "play", "children", "controls", "height", "fill", "width", "onFocus", "onBlur", "wrap"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { Children, useCallback, useContext, useEffect, useMemo, useState, useRef } from 'react';
5
5
  import { normalizeColor } from '../../utils';
6
6
  import { MessageContext } from '../../contexts/MessageContext';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["controls"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React from 'react';
5
5
  import { Attraction } from "grommet-icons/es6/icons/Attraction";
6
6
  import { Car } from "grommet-icons/es6/icons/Car";
@@ -2,7 +2,7 @@ var _excluded = ["a11yTitle", "bounds", "color", "dash", "direction", "gap", "id
2
2
  _excluded2 = ["color", "label", "onHover", "opacity", "thickness", "value"],
3
3
  _excluded3 = ["color", "label", "onHover", "opacity", "thickness", "value"];
4
4
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
5
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
5
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
6
6
  import React, { useEffect, useMemo, useState } from 'react';
7
7
  import { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';
8
8
  import { normalizeColor, parseMetricToNum, useForwardedRef } from '../../utils';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["a11yTitle", "aria-label", "checked", "children", "defaultChecked", "disabled", "fill", "focus", "focusIndicator", "id", "label", "name", "onBlur", "onChange", "onFocus", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver", "pad", "reverse", "toggle", "indeterminate"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useContext, useEffect, useState } from 'react';
5
5
  import { removeUndefined } from '../../utils/object';
6
6
  import { FormContext } from '../Form/FormContext';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["checked"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useState } from 'react';
5
5
  import { Box, CheckBox } from 'grommet';
6
6
  var SimpleCheckBox = function SimpleCheckBox(_ref) {
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["checked"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useState } from 'react';
5
5
  import { Box, CheckBox } from 'grommet';
6
6
  var SimpleCheckBox = function SimpleCheckBox(_ref) {
@@ -1,7 +1,7 @@
1
1
  var _excluded = ["children", "defaultValue", "value", "disabled", "focusIndicator", "gap", "labelKey", "valueKey", "onChange", "options", "name"],
2
2
  _excluded2 = ["value"];
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
5
5
  import React, { forwardRef, useContext } from 'react';
6
6
  import { CheckBox } from '../CheckBox';
7
7
  import { FormContext } from '../Form/FormContext';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["elements", "precision"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useMemo } from 'react';
5
5
  import { parseMetricToNum } from '../../utils';
6
6
  import { StyledAnalog, StyledHour, StyledMinute, StyledSecond } from './StyledClock';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["hourLimit", "onChange", "precision", "run", "size", "time", "type"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useEffect, useState } from 'react';
5
5
  import { Analog } from './Analog';
6
6
  import { Digital } from './Digital';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["elements", "precision", "run", "size"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useEffect, useState } from 'react';
5
5
  import { Box } from '../Box';
6
6
  import { StyledDigitalDigit, StyledDigitalNext, StyledDigitalPrevious } from './StyledClock';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["label", "open", "submenu"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React from 'react';
5
5
  import { FormDown } from "grommet-icons/es6/icons/FormDown";
6
6
  import { FormNext } from "grommet-icons/es6/icons/FormNext";
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["children", "data", "defaultView", "filteredTotal", "id", "messages", "onView", "properties", "toolbar", "total", "view", "views"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useContext, useEffect, useMemo, useState } from 'react';
5
5
  import { AnnounceContext } from '../../contexts';
6
6
  import { Box } from '../Box';
@@ -1,5 +1,5 @@
1
1
  var _excluded = ["children", "footer", "onDone", "pad", "updateOn"];
2
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
2
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
4
  import React, { useMemo, useCallback, useContext, useEffect, useRef, useState } from 'react';
5
5
  import styled from 'styled-components';
@@ -41,7 +41,7 @@ var viewFormKeyMap = {
41
41
 
42
42
  // flatten nested objects.
43
43
  // For example: { a: { b: v, c: z } } -> { 'a.b': v, 'a.c': z }
44
- var flatten = function flatten(formValue, options) {
44
+ var _flatten = function flatten(formValue, options) {
45
45
  var result = JSON.parse(JSON.stringify(formValue));
46
46
  Object.keys(result).forEach(function (i) {
47
47
  // We check the type of the i using
@@ -49,7 +49,7 @@ var flatten = function flatten(formValue, options) {
49
49
  // call the function again
50
50
  // ignore _range situations
51
51
  if (typeof result[i] === 'object' && !Array.isArray(result[i]) && (options != null && options.full || !result[i][formRangeKey])) {
52
- var temp = flatten(result[i], options);
52
+ var temp = _flatten(result[i], options);
53
53
  Object.keys(temp).forEach(function (j) {
54
54
  // Store temp in result
55
55
  // ignore empty arrays
@@ -124,7 +124,7 @@ var formValueToView = function formValueToView(value, views) {
124
124
  });
125
125
 
126
126
  // flatten any nested objects
127
- var flatValue = flatten(valueCopy);
127
+ var flatValue = _flatten(valueCopy);
128
128
  result.properties = _extends({}, result.properties || {}, flatValue);
129
129
 
130
130
  // convert any ranges
@@ -150,7 +150,7 @@ var clearEmpty = function clearEmpty(formValue, pendingReset) {
150
150
  // { a: b: { _range: [0, 100] } } ==> a.b._range: [0, 100]
151
151
  if (typeof value[k] === 'object' && !Array.isArray(value[k])) {
152
152
  var _pendingReset$current;
153
- var filterName = k + "." + Object.keys(flatten(value[k], {
153
+ var filterName = k + "." + Object.keys(_flatten(value[k], {
154
154
  full: true
155
155
  }))[0];
156
156
  if (pendingReset != null && (_pendingReset$current = pendingReset.current) != null && _pendingReset$current.has(filterName)) {
@@ -1,10 +1,10 @@
1
1
  // TODO: share with DataTable, List, Cards, etc.
2
- var datumValue = function datumValue(datum, property) {
2
+ var _datumValue = function datumValue(datum, property) {
3
3
  if (!property) return undefined;
4
4
  var parts = property.split('.');
5
5
  if (parts.length === 1) return datum[property];
6
6
  if (!datum[parts[0]]) return undefined;
7
- return datumValue(datum[parts[0]], parts.slice(1).join('.'));
7
+ return _datumValue(datum[parts[0]], parts.slice(1).join('.'));
8
8
  };
9
9
 
10
10
  // This is where we filter the data internally, when the caller doesn't
@@ -29,7 +29,7 @@ export var filter = function filter(data, view, properties) {
29
29
  // check whether it matches any search
30
30
  if (searchExp) {
31
31
  var searchWith = function searchWith(property) {
32
- var value = datumValue(datum, property);
32
+ var value = _datumValue(datum, property);
33
33
  if (value === undefined) return false;
34
34
  return searchExp.test(value);
35
35
  };
@@ -42,7 +42,7 @@ export var filter = function filter(data, view, properties) {
42
42
  matched = !Object.keys(view.properties).some(function (property) {
43
43
  // returning true means it doesn't match the filter,
44
44
  var filterValue = view.properties[property];
45
- var value = datumValue(datum, property);
45
+ var value = _datumValue(datum, property);
46
46
 
47
47
  // range case
48
48
  if (typeof (filterValue == null ? void 0 : filterValue.min) === 'number' || typeof (filterValue == null ? void 0 : filterValue.max) === 'number') return typeof value !== 'number' || value < filterValue.min || value > filterValue.max;
@@ -79,8 +79,8 @@ export var filter = function filter(data, view, properties) {
79
79
  var before = sortDesc ? -1 : 1;
80
80
  var after = sortDesc ? 1 : -1;
81
81
  filteredData.sort(function (d1, d2) {
82
- var d1Val = datumValue(d1, prop);
83
- var d2Val = datumValue(d2, prop);
82
+ var d1Val = _datumValue(d1, prop);
83
+ var d2Val = _datumValue(d2, prop);
84
84
  // sort strings via locale case insensitive
85
85
  if (typeof d1Val === 'string' && typeof d2Val === 'string' || typeof d1Val === 'string' && !d2Val || typeof d2Val === 'string' && !d1Val) {
86
86
  var sortResult = (d1Val || '').localeCompare(d2Val || '', undefined, {
@@ -19,9 +19,7 @@ export interface View {
19
19
  direction: 'asc' | 'desc';
20
20
  };
21
21
  step?: number; // page size
22
-
23
- // Future column ordering, requires 'properties' property on Data
24
- // columns?: string[];
22
+ columns?: string[];
25
23
  }
26
24
 
27
25
  export interface DataProps {
@@ -5,7 +5,8 @@ var viewType = PropTypes.shape({
5
5
  sort: PropTypes.shape({
6
6
  direction: PropTypes.oneOf(['asc', 'desc']),
7
7
  property: PropTypes.string
8
- })
8
+ }),
9
+ columns: PropTypes.arrayOf(PropTypes.string)
9
10
  });
10
11
  var PropType = {};
11
12
  if (process.env.NODE_ENV !== 'production') {
@@ -55,7 +55,8 @@ export var ComposedToolbar = function ComposedToolbar() {
55
55
  }, /*#__PURE__*/React.createElement(DataTable, {
56
56
  alignSelf: "start",
57
57
  columns: columns,
58
- sortable: true
58
+ sortable: true,
59
+ primaryKey: "name"
59
60
  }))))
60
61
  // </Grommet>
61
62
  );
@@ -1,5 +1,5 @@
1
1
  var _excluded = ["search"];
2
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
2
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
3
  import React, { useContext } from 'react';
4
4
  import { Box, DataFilters, DataFilter, DataSearch, DataSummary, DataTable, DataTableGroupBy, Grid, Heading, ResponsiveContext, Toolbar } from 'grommet';
5
5
  import { Data } from '../Data';
@@ -25,6 +25,9 @@ export var Views = function Views() {
25
25
  },
26
26
  location: ['San Francisco']
27
27
  }
28
+ }, {
29
+ name: 'Fewer Columns',
30
+ columns: ['name', 'location']
28
31
  }],
29
32
  toolbar: true
30
33
  }, /*#__PURE__*/React.createElement(DataTable, {
@@ -3,7 +3,7 @@ var _excluded = ["a11yTitle", "axis", "bounds", "chart", "data", "detail", "dire
3
3
  _excluded3 = ["property", "type", "x", "y"],
4
4
  _excluded4 = ["property"];
5
5
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
6
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
6
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
7
7
  import React, { forwardRef, useMemo, useState } from 'react';
8
8
  import { Box } from '../Box';
9
9
  import { Chart, calcs, calcBounds } from '../Chart';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["values", "pad", "renderValue", "serie", "theme", "thickness"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useMemo } from 'react';
5
5
  import { edgeToNum } from '../../utils';
6
6
  import { Box } from '../Box';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["onClick"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useContext } from 'react';
5
5
  import { DataClearFiltersPropTypes } from './propTypes';
6
6
  import { Button } from '../Button';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["children", "options", "property", "range"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useContext, useMemo, useState } from 'react';
5
5
  import { DataContext } from '../../contexts/DataContext';
6
6
  import { DataForm } from '../Data/DataForm';
@@ -16,15 +16,15 @@ import { DataFormContext } from '../../contexts/DataFormContext';
16
16
  var maxCheckBoxGroupOptions = 4;
17
17
  var minSelectSearchOptions = 10;
18
18
  var defaultRangeSteps = 20;
19
- var getValueAt = function getValueAt(valueObject, pathArg) {
19
+ var _getValueAt = function getValueAt(valueObject, pathArg) {
20
20
  if (!pathArg || valueObject === undefined) return undefined;
21
21
  var path = Array.isArray(pathArg) ? pathArg : pathArg.split('.');
22
22
  if (path.length === 1) return valueObject[path];
23
- return getValueAt(valueObject[path.shift()], path);
23
+ return _getValueAt(valueObject[path.shift()], path);
24
24
  };
25
25
  var generateOptions = function generateOptions(data, property) {
26
26
  return Array.from(new Set(data.map(function (d) {
27
- return getValueAt(d, property);
27
+ return _getValueAt(d, property);
28
28
  }))).filter(function (v) {
29
29
  return v !== undefined && v !== '';
30
30
  })
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["drop", "children", "clearFilters", "heading", "layer", "updateOn"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { Children, useContext, useEffect, useMemo, useState } from 'react';
5
5
  import { Filter } from 'grommet-icons/icons/Filter';
6
6
  import { Close } from 'grommet-icons/icons/Close';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["drop", "id", "responsive", "updateOn"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useContext, useEffect, useState } from 'react';
5
5
  import { Search } from 'grommet-icons/icons/Search';
6
6
  import { Box } from '../Box';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["drop", "options"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useContext, useMemo, useState } from 'react';
5
5
  import { Descend } from 'grommet-icons/icons/Descend';
6
6
  import { DataContext } from '../../contexts/DataContext';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["messages"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useContext } from 'react';
5
5
  import { Text } from '../Text';
6
6
  import { DataContext } from '../../contexts/DataContext';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["cellProps", "columns", "data", "disabled", "onMore", "replace", "onClickRow", "onSelect", "pinnedOffset", "primaryProperty", "rowProps", "selected", "rowDetails", "show", "size", "step", "rowExpand", "setRowExpand", "verticalAlign"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  /* eslint-disable no-underscore-dangle */
5
5
  import React, { forwardRef, memo } from 'react';
6
6
  import { useKeyboard } from '../../utils';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["background", "border", "column", "datum", "pad", "pin", "pinnedOffset", "primaryProperty", "scope", "verticalAlign"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { isValidElement, memo, useContext } from 'react';
5
5
  import { Text } from '../Text';
6
6
  import { StyledDataTableCell } from './StyledDataTable';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["allowSelectAll", "background", "border", "columns", "data", "disabled", "fill", "groupBy", "onClickRow", "onMore", "onSearch", "onSelect", "onSort", "onUpdate", "replace", "pad", "paginate", "pin", "placeholder", "primaryKey", "resizeable", "rowProps", "select", "show", "size", "sort", "sortable", "rowDetails", "step", "verticalAlign"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useCallback, useContext, useEffect, useMemo, useRef, useState, Fragment } from 'react';
5
5
  import { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';
6
6
  import { DataContext } from '../../contexts/DataContext';
@@ -1,7 +1,7 @@
1
1
  var _excluded = ["context", "expanded", "onToggle", "pad"],
2
2
  _excluded2 = ["background", "border", "context"];
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
5
5
  import React from 'react';
6
6
  import { Blank } from 'grommet-icons/icons/Blank';
7
7
  import { Box } from '../Box';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["cellProps", "columns", "fill", "footerValues", "groups", "onSelect", "pin", "pinnedOffset", "primaryProperty", "selected", "verticalAlign"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef } from 'react';
5
5
  import { TableRow } from '../TableRow';
6
6
  import { TableCell } from '../TableCell';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["cellProps", "columns", "data", "disabled", "groupBy", "groups", "groupState", "pinnedOffset", "primaryProperty", "onMore", "onSelect", "onToggle", "onUpdate", "replace", "rowProps", "selected", "size", "step", "verticalAlign"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useMemo } from 'react';
5
5
  import { Cell } from './Cell';
6
6
  import { ExpanderCell } from './ExpanderCell';
@@ -1,7 +1,7 @@
1
1
  var _excluded = ["background", "border", "color", "font", "gap", "pad", "units"],
2
2
  _excluded2 = ["allowSelectAll", "cellProps", "columns", "data", "disabled", "fill", "filtering", "filters", "groupBy", "groups", "groupState", "onFilter", "onFiltering", "onResize", "onSelect", "onSort", "onToggle", "onWidths", "pin", "pinnedOffset", "primaryProperty", "selected", "rowDetails", "sort", "widths", "verticalAlign"];
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
5
5
  /* eslint-disable no-underscore-dangle */
6
6
  import React, { forwardRef, useCallback, useContext, useEffect, useState } from 'react';
7
7
  import styled, { css } from 'styled-components';