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.
- package/all/stories/AllComponents.js +1 -1
- package/components/Accordion/Accordion.js +1 -1
- package/components/Accordion/stories/CustomThemed/Custom.js +1 -1
- package/components/Accordion/stories/Simple.js +1 -1
- package/components/AccordionPanel/AccordionPanel.js +1 -1
- package/components/Anchor/Anchor.js +1 -1
- package/components/Avatar/Avatar.js +1 -1
- package/components/Box/Box.js +1 -1
- package/components/Box/StyledBox.js +3 -3
- package/components/Button/Button.js +1 -1
- package/components/Calendar/Calendar.js +15 -15
- package/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/components/Cards/Cards.js +1 -1
- package/components/Carousel/Carousel.js +1 -1
- package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/components/Chart/Chart.js +1 -1
- package/components/CheckBox/CheckBox.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/Collapsible/stories/Nested.js +1 -1
- package/components/Data/Data.js +1 -1
- package/components/Data/DataForm.js +5 -5
- package/components/Data/filter.js +6 -6
- package/components/Data/index.d.ts +1 -3
- package/components/Data/propTypes.js +2 -1
- package/components/Data/stories/ComposedToolbar.js +2 -1
- package/components/Data/stories/Inline.js +1 -1
- package/components/Data/stories/Views.js +3 -0
- package/components/DataChart/DataChart.js +1 -1
- package/components/DataChart/XAxis.js +1 -1
- package/components/DataClearFilters/DataClearFilters.js +1 -1
- package/components/DataFilter/DataFilter.js +4 -4
- package/components/DataFilters/DataFilters.js +1 -1
- package/components/DataSearch/DataSearch.js +1 -1
- package/components/DataSort/DataSort.js +1 -1
- package/components/DataSummary/DataSummary.js +1 -1
- package/components/DataTable/Body.js +1 -1
- package/components/DataTable/Cell.js +1 -1
- package/components/DataTable/DataTable.js +1 -1
- 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/buildState.js +10 -10
- package/components/DataTableColumns/DataTableColumns.js +1 -1
- package/components/DataTableColumns/stories/DefaultValue.js +49 -0
- package/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
- package/components/DataView/DataView.js +1 -1
- package/components/DateInput/DateInput.js +1 -1
- package/components/Diagram/Diagram.js +1 -1
- package/components/Diagram/stories/Progressing.js +1 -1
- package/components/Distribution/Distribution.js +5 -5
- package/components/Drop/Drop.js +1 -1
- package/components/Drop/DropContainer.js +1 -1
- package/components/DropButton/DropButton.js +1 -1
- package/components/FileInput/FileInput.js +1 -1
- package/components/FocusedContainer.js +1 -1
- package/components/Form/Form.js +7 -7
- package/components/FormField/FormField.js +1 -1
- package/components/Grid/Grid.js +1 -1
- package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/components/Grommet/Grommet.js +1 -1
- package/components/Header/Header.js +1 -1
- package/components/Heading/Heading.js +1 -1
- package/components/Image/Image.js +1 -1
- package/components/InfiniteScroll/InfiniteScroll.js +1 -0
- package/components/Keyboard/Keyboard.js +1 -1
- package/components/Layer/LayerContainer.js +1 -1
- package/components/List/List.js +5 -3
- package/components/List/index.d.ts +1 -0
- package/components/List/propTypes.js +1 -0
- package/components/Markdown/Markdown.js +1 -1
- package/components/MaskedInput/MaskedInput.js +1 -1
- package/components/Menu/Menu.js +1 -1
- package/components/Meter/Bar.js +1 -1
- package/components/Meter/Circle.js +1 -1
- package/components/Meter/Meter.js +1 -1
- package/components/NameValueList/NameValueList.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/Page/Page.js +1 -1
- package/components/PageContent/PageContent.js +1 -1
- package/components/PageHeader/PageHeader.js +1 -1
- package/components/Pagination/PageControl.js +1 -1
- package/components/Pagination/Pagination.js +1 -1
- package/components/Pagination/PaginationStep.js +1 -1
- package/components/Pagination/PaginationSummary.js +1 -1
- package/components/Paragraph/Paragraph.js +1 -1
- 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 +1 -1
- package/components/RoutedButton/RoutedButton.js +1 -1
- package/components/Select/DefaultSelectTextInput.js +1 -1
- package/components/Select/Select.js +1 -1
- package/components/Select/SelectContainer.js +1 -1
- package/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/components/Select/stories/components/SearchInput.js +1 -1
- package/components/Select/utils.js +10 -10
- package/components/SelectMultiple/SelectMultiple.js +1 -1
- package/components/Sidebar/Sidebar.js +1 -1
- package/components/Sidebar/stories/Labels.js +1 -1
- package/components/Skeleton/Skeleton.js +1 -1
- package/components/Skeleton/stories/GridContainer.js +1 -1
- package/components/Skeleton/stories/Individual.js +1 -1
- package/components/SkipLink/SkipLink.js +1 -1
- package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/components/Spinner/Spinner.js +1 -1
- package/components/Stack/Stack.js +1 -1
- package/components/StarRating/StarRating.js +1 -1
- package/components/Tab/Tab.js +1 -1
- package/components/Table/Table.js +1 -1
- package/components/TableCell/TableCell.js +1 -1
- package/components/Tabs/Tabs.js +1 -1
- package/components/Tag/Tag.js +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/TextSkeleton.js +1 -1
- package/components/TextArea/TextArea.js +1 -1
- package/components/TextInput/TextInput.js +1 -1
- package/components/TextInput/stories/WithTags.js +1 -1
- package/components/Tip/Tip.js +5 -0
- package/components/Tip/index.d.ts +1 -0
- package/components/Tip/propTypes.js +2 -1
- package/components/ToggleGroup/ToggleGroup.js +1 -1
- package/components/Toolbar/Toolbar.js +1 -1
- package/components/Video/StyledVideo.js +1 -1
- package/components/Video/Video.js +1 -1
- package/components/WorldMap/WorldMap.js +1 -1
- package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/all/stories/AllComponents.js +1 -1
- package/es6/components/Accordion/Accordion.js +1 -1
- package/es6/components/Accordion/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Accordion/stories/Simple.js +1 -1
- package/es6/components/AccordionPanel/AccordionPanel.js +1 -1
- package/es6/components/Anchor/Anchor.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 +3 -3
- package/es6/components/Button/Button.js +1 -1
- package/es6/components/Calendar/Calendar.js +16 -15
- package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/Cards/Cards.js +1 -1
- package/es6/components/Carousel/Carousel.js +1 -1
- package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Chart/Chart.js +1 -1
- package/es6/components/CheckBox/CheckBox.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/Collapsible/stories/Nested.js +1 -1
- package/es6/components/Data/Data.js +1 -1
- package/es6/components/Data/DataForm.js +5 -5
- package/es6/components/Data/filter.js +6 -6
- package/es6/components/Data/index.d.ts +1 -3
- package/es6/components/Data/propTypes.js +2 -1
- package/es6/components/Data/stories/ComposedToolbar.js +2 -1
- package/es6/components/Data/stories/Inline.js +1 -1
- package/es6/components/Data/stories/Views.js +3 -0
- package/es6/components/DataChart/DataChart.js +1 -1
- package/es6/components/DataChart/XAxis.js +1 -1
- package/es6/components/DataClearFilters/DataClearFilters.js +1 -1
- package/es6/components/DataFilter/DataFilter.js +4 -4
- package/es6/components/DataFilters/DataFilters.js +1 -1
- package/es6/components/DataSearch/DataSearch.js +1 -1
- package/es6/components/DataSort/DataSort.js +1 -1
- package/es6/components/DataSummary/DataSummary.js +1 -1
- package/es6/components/DataTable/Body.js +1 -1
- package/es6/components/DataTable/Cell.js +1 -1
- package/es6/components/DataTable/DataTable.js +1 -1
- 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/buildState.js +11 -10
- package/es6/components/DataTableColumns/DataTableColumns.js +1 -1
- package/es6/components/DataTableColumns/stories/DefaultValue.js +45 -0
- package/es6/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
- package/es6/components/DataView/DataView.js +1 -1
- package/es6/components/DateInput/DateInput.js +1 -1
- package/es6/components/Diagram/Diagram.js +1 -1
- package/es6/components/Diagram/stories/Progressing.js +1 -1
- package/es6/components/Distribution/Distribution.js +6 -6
- 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/FileInput/FileInput.js +1 -1
- package/es6/components/FocusedContainer.js +1 -1
- package/es6/components/Form/Form.js +7 -7
- package/es6/components/FormField/FormField.js +1 -1
- package/es6/components/Grid/Grid.js +1 -1
- package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/es6/components/Grommet/Grommet.js +1 -1
- package/es6/components/Header/Header.js +1 -1
- package/es6/components/Heading/Heading.js +1 -1
- package/es6/components/Image/Image.js +1 -1
- package/es6/components/InfiniteScroll/InfiniteScroll.js +1 -0
- package/es6/components/Keyboard/Keyboard.js +1 -1
- package/es6/components/Layer/LayerContainer.js +1 -1
- package/es6/components/List/List.js +5 -3
- package/es6/components/List/index.d.ts +1 -0
- package/es6/components/List/propTypes.js +1 -0
- package/es6/components/Markdown/Markdown.js +1 -1
- package/es6/components/MaskedInput/MaskedInput.js +1 -1
- package/es6/components/Menu/Menu.js +1 -1
- package/es6/components/Meter/Bar.js +1 -1
- package/es6/components/Meter/Circle.js +1 -1
- package/es6/components/Meter/Meter.js +1 -1
- package/es6/components/NameValueList/NameValueList.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/Page/Page.js +1 -1
- package/es6/components/PageContent/PageContent.js +1 -1
- package/es6/components/PageHeader/PageHeader.js +1 -1
- package/es6/components/Pagination/PageControl.js +1 -1
- package/es6/components/Pagination/Pagination.js +1 -1
- package/es6/components/Pagination/PaginationStep.js +1 -1
- package/es6/components/Pagination/PaginationSummary.js +1 -1
- package/es6/components/Paragraph/Paragraph.js +1 -1
- 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 +1 -1
- package/es6/components/RoutedButton/RoutedButton.js +1 -1
- package/es6/components/Select/DefaultSelectTextInput.js +1 -1
- package/es6/components/Select/Select.js +1 -1
- package/es6/components/Select/SelectContainer.js +1 -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 +11 -10
- package/es6/components/SelectMultiple/SelectMultiple.js +1 -1
- package/es6/components/Sidebar/Sidebar.js +1 -1
- package/es6/components/Sidebar/stories/Labels.js +1 -1
- package/es6/components/Skeleton/Skeleton.js +1 -1
- package/es6/components/Skeleton/stories/GridContainer.js +1 -1
- package/es6/components/Skeleton/stories/Individual.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 +1 -1
- package/es6/components/Stack/Stack.js +1 -1
- package/es6/components/StarRating/StarRating.js +1 -1
- package/es6/components/Tab/Tab.js +1 -1
- package/es6/components/Table/Table.js +1 -1
- package/es6/components/TableCell/TableCell.js +1 -1
- package/es6/components/Tabs/Tabs.js +1 -1
- package/es6/components/Tag/Tag.js +1 -1
- package/es6/components/Text/Text.js +1 -1
- package/es6/components/Text/TextSkeleton.js +1 -1
- package/es6/components/TextArea/TextArea.js +1 -1
- package/es6/components/TextInput/TextInput.js +1 -1
- package/es6/components/TextInput/stories/WithTags.js +1 -1
- package/es6/components/Tip/Tip.js +6 -1
- package/es6/components/Tip/index.d.ts +1 -0
- package/es6/components/Tip/propTypes.js +2 -1
- package/es6/components/ToggleGroup/ToggleGroup.js +1 -1
- package/es6/components/Toolbar/Toolbar.js +1 -1
- package/es6/components/Video/StyledVideo.js +1 -1
- package/es6/components/Video/Video.js +1 -1
- package/es6/components/WorldMap/WorldMap.js +1 -1
- package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/utils/DOM.js +7 -5
- package/es6/utils/background.js +4 -4
- package/es6/utils/colors.js +3 -2
- package/es6/utils/mixins.js +3 -2
- package/es6/utils/object.js +3 -2
- package/es6/utils/pagination.js +1 -1
- package/es6/utils/styles.js +1 -1
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/package.json +33 -34
- package/utils/DOM.js +4 -4
- package/utils/background.js +4 -4
- package/utils/colors.js +2 -2
- package/utils/mixins.js +2 -2
- package/utils/object.js +2 -2
- package/utils/pagination.js +1 -1
- 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.
|
|
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
|
|
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
|
|
64
|
+
return _normalizeInput(d);
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
return result;
|
|
68
68
|
};
|
|
69
|
-
var
|
|
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
|
|
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
|
-
|
|
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
|
|
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(
|
|
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(
|
|
268
|
+
setValue(_normalizeInput(val));
|
|
268
269
|
}, [dateProp, datesProp]);
|
|
269
|
-
var _useState4 = useState(getReference(
|
|
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(
|
|
275
|
+
setReference(getReference(_normalizeInput(referenceProp), value));
|
|
275
276
|
}
|
|
276
277
|
}, [referenceProp, value]);
|
|
277
|
-
var _useState5 = useState(
|
|
278
|
+
var _useState5 = useState(_getOutputFormat(dateProp || datesProp)),
|
|
278
279
|
outputFormat = _useState5[0],
|
|
279
280
|
setOutputFormat = _useState5[1];
|
|
280
281
|
useEffect(function () {
|
|
281
|
-
setOutputFormat(
|
|
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 =
|
|
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,
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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 =
|
|
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 =
|
|
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(
|
|
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
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
83
|
-
var d2Val =
|
|
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, {
|
|
@@ -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') {
|
|
@@ -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.
|
|
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';
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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';
|