grommet 2.25.0 → 2.25.3
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/components/Anchor/Anchor.js +14 -1
- package/components/Button/Button.js +81 -8
- package/components/Button/StyledButtonKind.js +9 -3
- package/components/Button/index.d.ts +1 -1
- package/components/Button/propTypes.js +1 -1
- package/components/Calendar/Calendar.js +232 -292
- package/components/Calendar/utils.js +16 -129
- package/components/Chart/calcs.js +44 -27
- package/components/Chart/stories/Scan.js +11 -9
- package/components/Chart/stories/data.js +16 -17
- package/components/CheckBox/CheckBox.js +3 -2
- package/components/DataChart/DataChart.js +14 -28
- package/components/DataChart/Detail.js +18 -11
- package/components/DataChart/XAxis.js +29 -18
- package/components/DataChart/stories/Pad.js +54 -0
- package/components/DataTable/DataTable.js +13 -9
- package/components/DataTable/buildState.js +2 -2
- package/components/DataTable/index.d.ts +4 -1
- package/components/DataTable/stories/SpaceX.js +3 -1
- package/components/DataTable/stories/SpaceXUngrouped.js +6 -2
- package/components/DateInput/DateInput.js +60 -68
- package/components/DateInput/utils.js +30 -5
- package/components/FileInput/FileInput.js +2 -1
- package/components/FileInput/StyledFileInput.js +1 -1
- package/components/Form/Form.js +78 -5
- package/components/FormField/FormField.js +29 -29
- package/components/Grommet/Grommet.js +7 -2
- package/components/Grommet/index.d.ts +1 -0
- package/components/Grommet/propTypes.js +2 -1
- package/components/Heading/Heading.js +4 -2
- package/components/Heading/StyledHeading.js +1 -1
- package/components/Heading/index.d.ts +1 -0
- package/components/Heading/propTypes.js +2 -1
- package/components/Image/Image.js +4 -2
- package/components/Layer/LayerContainer.js +25 -0
- package/components/List/List.js +17 -0
- package/components/Menu/Menu.js +7 -4
- package/components/Menu/index.d.ts +2 -2
- package/components/Menu/stories/CustomThemed/Themed.tsx +6 -0
- package/components/Meter/Circle.js +5 -1
- package/components/PageHeader/PageHeader.js +22 -13
- package/components/PageHeader/index.d.ts +10 -1
- package/components/PageHeader/propTypes.js +1 -0
- package/components/PageHeader/stories/Size.js +55 -0
- package/components/Select/SelectContainer.js +96 -75
- package/components/Select/stories/Clear.js +7 -1
- package/components/Select/utils.js +1 -0
- package/components/Spinner/Spinner.js +1 -0
- package/components/Tab/Tab.js +1 -1
- package/components/Tabs/Tabs.js +11 -2
- package/components/Video/StyledVideo.js +2 -2
- package/contexts/AnalyticsContext/AnalyticsContext.js +65 -0
- package/contexts/AnalyticsContext/index.d.ts +7 -0
- package/contexts/AnalyticsContext/index.js +11 -0
- package/contexts/index.js +8 -0
- package/es6/components/Anchor/Anchor.js +15 -3
- package/es6/components/Button/Button.js +83 -11
- package/es6/components/Button/StyledButtonKind.js +9 -3
- package/es6/components/Button/index.d.ts +1 -1
- package/es6/components/Button/propTypes.js +1 -1
- package/es6/components/Calendar/Calendar.js +230 -292
- package/es6/components/Calendar/utils.js +13 -114
- package/es6/components/Chart/calcs.js +44 -27
- package/es6/components/Chart/stories/Scan.js +10 -9
- package/es6/components/Chart/stories/data.js +16 -17
- package/es6/components/CheckBox/CheckBox.js +3 -2
- package/es6/components/DataChart/DataChart.js +15 -28
- package/es6/components/DataChart/Detail.js +20 -10
- package/es6/components/DataChart/XAxis.js +29 -19
- package/es6/components/DataChart/stories/Pad.js +42 -0
- package/es6/components/DataTable/DataTable.js +13 -9
- package/es6/components/DataTable/buildState.js +2 -2
- package/es6/components/DataTable/index.d.ts +4 -1
- package/es6/components/DataTable/stories/SpaceX.js +3 -1
- package/es6/components/DataTable/stories/SpaceXUngrouped.js +6 -2
- package/es6/components/DateInput/DateInput.js +57 -64
- package/es6/components/DateInput/utils.js +29 -7
- package/es6/components/FileInput/FileInput.js +2 -1
- package/es6/components/FileInput/StyledFileInput.js +1 -1
- package/es6/components/Form/Form.js +76 -5
- package/es6/components/FormField/FormField.js +29 -30
- package/es6/components/Grommet/Grommet.js +6 -2
- package/es6/components/Grommet/index.d.ts +1 -0
- package/es6/components/Grommet/propTypes.js +2 -1
- package/es6/components/Heading/Heading.js +4 -2
- package/es6/components/Heading/StyledHeading.js +1 -1
- package/es6/components/Heading/index.d.ts +1 -0
- package/es6/components/Heading/propTypes.js +2 -1
- package/es6/components/Image/Image.js +4 -2
- package/es6/components/Layer/LayerContainer.js +24 -0
- package/es6/components/List/List.js +16 -0
- package/es6/components/Menu/Menu.js +7 -4
- package/es6/components/Menu/index.d.ts +2 -2
- package/es6/components/Menu/stories/CustomThemed/Themed.tsx +6 -0
- package/es6/components/Meter/Circle.js +5 -1
- package/es6/components/PageHeader/PageHeader.js +24 -14
- package/es6/components/PageHeader/index.d.ts +10 -1
- package/es6/components/PageHeader/propTypes.js +1 -0
- package/es6/components/PageHeader/stories/Size.js +43 -0
- package/es6/components/Select/SelectContainer.js +96 -77
- package/es6/components/Select/stories/Clear.js +7 -1
- package/es6/components/Select/utils.js +1 -0
- package/es6/components/Spinner/Spinner.js +1 -0
- package/es6/components/Tab/Tab.js +1 -1
- package/es6/components/Tabs/Tabs.js +10 -2
- package/es6/components/Video/StyledVideo.js +2 -2
- package/es6/contexts/AnalyticsContext/AnalyticsContext.js +47 -0
- package/es6/contexts/AnalyticsContext/index.d.ts +7 -0
- package/es6/contexts/AnalyticsContext/index.js +1 -0
- package/es6/contexts/index.js +1 -0
- package/es6/themes/base.d.ts +51 -33
- package/es6/themes/base.js +49 -1
- package/es6/utils/DOM.js +4 -0
- package/es6/utils/mixins.js +3 -0
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/package.json +56 -48
- package/themes/base.d.ts +51 -33
- package/themes/base.js +49 -1
- package/tools/pack.js +20 -13
- package/tools/release-stable.js +2 -4
- package/utils/DOM.js +9 -2
- package/utils/mixins.js +7 -1
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
GridAreaType,
|
|
6
6
|
MarginType,
|
|
7
7
|
} from '../../utils';
|
|
8
|
+
import { BoxProps } from '../Box/index';
|
|
8
9
|
|
|
9
10
|
import { GridProps } from '../Grid';
|
|
10
11
|
export interface PageHeaderProps {
|
|
@@ -16,11 +17,19 @@ export interface PageHeaderProps {
|
|
|
16
17
|
gridProps?: GridProps;
|
|
17
18
|
parent?: JSX.Element;
|
|
18
19
|
responsive?: boolean;
|
|
20
|
+
size?: 'small' | 'medium' | 'large';
|
|
19
21
|
subtitle?: string | JSX.Element;
|
|
20
22
|
title?: string | JSX.Element;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
type divProps = Omit<JSX.IntrinsicElements['div'], 'onClick' | 'title'>;
|
|
26
|
+
|
|
27
|
+
export interface PageHeaderExtendedProps
|
|
28
|
+
extends BoxProps,
|
|
29
|
+
PageHeaderProps,
|
|
30
|
+
divProps {}
|
|
31
|
+
|
|
32
|
+
declare const PageHeader: React.FC<PageHeaderExtendedProps>;
|
|
24
33
|
export type PageHeaderType = PageHeaderProps;
|
|
25
34
|
|
|
26
35
|
export { PageHeader };
|
|
@@ -21,6 +21,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
21
21
|
gridProps: _propTypes2.GridPropTypes,
|
|
22
22
|
parent: _propTypes["default"].element,
|
|
23
23
|
responsive: _propTypes["default"].bool,
|
|
24
|
+
size: _propTypes["default"].oneOf(['small', 'medium', 'large']),
|
|
24
25
|
subtitle: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].element]),
|
|
25
26
|
title: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].element])
|
|
26
27
|
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = exports.Size = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _grommet = require("grommet");
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var Size = function Size() {
|
|
13
|
+
return (
|
|
14
|
+
/*#__PURE__*/
|
|
15
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
16
|
+
// <Grommet theme={...}>
|
|
17
|
+
_react["default"].createElement(_grommet.Page, null, /*#__PURE__*/_react["default"].createElement(_grommet.PageContent, null, /*#__PURE__*/_react["default"].createElement(_grommet.PageHeader, {
|
|
18
|
+
title: "Small PageHeader",
|
|
19
|
+
subtitle: "Grommet helps you build responsive and accessible \n mobile-first projects for the web with an easy to use component \n library.",
|
|
20
|
+
actions: /*#__PURE__*/_react["default"].createElement(_grommet.Button, {
|
|
21
|
+
label: "Page-level action"
|
|
22
|
+
}),
|
|
23
|
+
parent: /*#__PURE__*/_react["default"].createElement(_grommet.Anchor, {
|
|
24
|
+
label: "Parent Page"
|
|
25
|
+
}),
|
|
26
|
+
size: "small"
|
|
27
|
+
}), /*#__PURE__*/_react["default"].createElement(_grommet.PageHeader, {
|
|
28
|
+
title: "Medium PageHeader (default)",
|
|
29
|
+
subtitle: "Grommet helps you build responsive and accessible \n mobile-first projects for the web with an easy to use component \n library.",
|
|
30
|
+
actions: /*#__PURE__*/_react["default"].createElement(_grommet.Button, {
|
|
31
|
+
label: "Page-level action"
|
|
32
|
+
}),
|
|
33
|
+
parent: /*#__PURE__*/_react["default"].createElement(_grommet.Anchor, {
|
|
34
|
+
label: "Parent Page"
|
|
35
|
+
})
|
|
36
|
+
}), /*#__PURE__*/_react["default"].createElement(_grommet.PageHeader, {
|
|
37
|
+
title: "Large PageHeader",
|
|
38
|
+
subtitle: "Grommet helps you build responsive and accessible \n mobile-first projects for the web with an easy to use component \n library.",
|
|
39
|
+
actions: /*#__PURE__*/_react["default"].createElement(_grommet.Button, {
|
|
40
|
+
label: "Page-level action"
|
|
41
|
+
}),
|
|
42
|
+
parent: /*#__PURE__*/_react["default"].createElement(_grommet.Anchor, {
|
|
43
|
+
label: "Parent Page"
|
|
44
|
+
}),
|
|
45
|
+
size: "large"
|
|
46
|
+
}))) // </Grommet>
|
|
47
|
+
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports.Size = Size;
|
|
52
|
+
var _default = {
|
|
53
|
+
title: 'Layout/PageHeader/Size'
|
|
54
|
+
};
|
|
55
|
+
exports["default"] = _default;
|
|
@@ -27,12 +27,18 @@ var _StyledSelect = require("./StyledSelect");
|
|
|
27
27
|
|
|
28
28
|
var _utils2 = require("./utils");
|
|
29
29
|
|
|
30
|
+
var _DOM = require("../../utils/DOM");
|
|
31
|
+
|
|
32
|
+
var _excluded = ["clear", "onClear", "name", "theme"];
|
|
33
|
+
|
|
30
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
35
|
|
|
32
36
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
37
|
|
|
34
38
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
39
|
|
|
40
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
41
|
+
|
|
36
42
|
// position relative is so scroll can be managed correctly
|
|
37
43
|
var OptionsBox = _styledComponents["default"].div.withConfig({
|
|
38
44
|
displayName: "SelectContainer__OptionsBox",
|
|
@@ -42,24 +48,38 @@ var OptionsBox = _styledComponents["default"].div.withConfig({
|
|
|
42
48
|
var SelectOption = (0, _styledComponents["default"])(_Button.Button).withConfig({
|
|
43
49
|
displayName: "SelectContainer__SelectOption",
|
|
44
50
|
componentId: "sc-1wi0ul8-1"
|
|
45
|
-
})(["", " display:block;width:100%;"], function (props) {
|
|
51
|
+
})(["", " ", " &:focus{", "}display:block;width:100%;"], function (props) {
|
|
46
52
|
return props.selected && props.textComponent && _utils.selectedStyle;
|
|
53
|
+
}, function (props) {
|
|
54
|
+
return props.active && (0, _utils.getHoverIndicatorStyle)(!props.children && !props.theme.select.options ? undefined : 'background', props.theme);
|
|
55
|
+
}, function (props) {
|
|
56
|
+
return props.active && (0, _utils.getHoverIndicatorStyle)(!props.children && !props.theme.select.options ? undefined : 'background', props.theme);
|
|
57
|
+
}); // ensure ClearButton receives visual indication of keyboard
|
|
58
|
+
|
|
59
|
+
var StyledButton = (0, _styledComponents["default"])(_Button.Button).withConfig({
|
|
60
|
+
displayName: "SelectContainer__StyledButton",
|
|
61
|
+
componentId: "sc-1wi0ul8-2"
|
|
62
|
+
})(["&:focus{", "}"], function (props) {
|
|
63
|
+
return (0, _utils.getHoverIndicatorStyle)('background', props.theme);
|
|
47
64
|
});
|
|
48
65
|
var ClearButton = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
49
66
|
var clear = _ref.clear,
|
|
50
67
|
onClear = _ref.onClear,
|
|
51
68
|
name = _ref.name,
|
|
52
|
-
theme = _ref.theme
|
|
69
|
+
theme = _ref.theme,
|
|
70
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
71
|
+
|
|
53
72
|
var label = clear.label,
|
|
54
73
|
position = clear.position;
|
|
55
74
|
var align = position !== 'bottom' ? 'start' : 'center';
|
|
56
75
|
var buttonLabel = label || "Clear " + (name || 'selection');
|
|
57
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
76
|
+
return /*#__PURE__*/_react["default"].createElement(StyledButton, _extends({
|
|
77
|
+
a11yTitle: buttonLabel + ". Or, press " + (position === 'bottom' ? 'shift tab' : 'down arrow') + " to move to select options",
|
|
58
78
|
fill: "horizontal",
|
|
59
79
|
ref: ref,
|
|
60
80
|
onClick: onClear,
|
|
61
81
|
focusIndicator: false
|
|
62
|
-
}, /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({}, theme.select.clear.container, {
|
|
82
|
+
}, rest), /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({}, theme.select.clear.container, {
|
|
63
83
|
align: align
|
|
64
84
|
}), /*#__PURE__*/_react["default"].createElement(_Text.Text, theme.select.clear.text, buttonLabel)));
|
|
65
85
|
});
|
|
@@ -96,28 +116,30 @@ var SelectContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
96
116
|
|
|
97
117
|
var theme = (0, _react.useContext)(_styledComponents.ThemeContext) || _defaultProps.defaultProps.theme;
|
|
98
118
|
|
|
99
|
-
var
|
|
119
|
+
var shouldShowClearButton = (0, _react.useCallback)(function (position) {
|
|
120
|
+
var hasValue = Boolean(multiple ? value.length : value);
|
|
121
|
+
var showAtPosition = position === 'bottom' ? (clear == null ? void 0 : clear.position) === 'bottom' : (clear == null ? void 0 : clear.position) !== 'bottom';
|
|
122
|
+
return clear && hasValue && showAtPosition;
|
|
123
|
+
}, [clear, multiple, value]);
|
|
124
|
+
|
|
125
|
+
var _useState = (0, _react.useState)(usingKeyboard && !shouldShowClearButton('top') ? 0 : -1),
|
|
100
126
|
activeIndex = _useState[0],
|
|
101
127
|
setActiveIndex = _useState[1];
|
|
102
128
|
|
|
103
|
-
var _useState2 = (0, _react.useState)(),
|
|
129
|
+
var _useState2 = (0, _react.useState)(usingKeyboard),
|
|
104
130
|
keyboardNavigation = _useState2[0],
|
|
105
131
|
setKeyboardNavigation = _useState2[1];
|
|
106
132
|
|
|
107
133
|
var searchRef = (0, _react.useRef)();
|
|
108
134
|
var optionsRef = (0, _react.useRef)();
|
|
109
135
|
var clearRef = (0, _react.useRef)();
|
|
136
|
+
var activeRef = (0, _react.useRef)(); // for keyboard/screenreader, keep the active option in focus
|
|
137
|
+
|
|
110
138
|
(0, _react.useEffect)(function () {
|
|
111
|
-
var
|
|
139
|
+
var _activeRef$current;
|
|
112
140
|
|
|
113
|
-
if (
|
|
114
|
-
|
|
115
|
-
var index = activeIndex;
|
|
116
|
-
if (clear && clear.position !== 'bottom' && clearButton) index += 1;
|
|
117
|
-
var optionNode = optionsNode.children[index];
|
|
118
|
-
if (optionNode) optionNode.focus();
|
|
119
|
-
}
|
|
120
|
-
}, [activeIndex, clear]); // set initial focus
|
|
141
|
+
if (activeIndex >= 0) (_activeRef$current = activeRef.current) == null ? void 0 : _activeRef$current.focus();
|
|
142
|
+
}, [activeIndex]); // set initial focus
|
|
121
143
|
|
|
122
144
|
(0, _react.useEffect)(function () {
|
|
123
145
|
// need to wait for Drop to be ready
|
|
@@ -133,11 +155,8 @@ var SelectContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
133
155
|
}
|
|
134
156
|
} else if (clear && clearButton && clearButton.focus && clear.position !== 'bottom') {
|
|
135
157
|
(0, _utils.setFocusWithoutScroll)(clearButton);
|
|
136
|
-
} else if (
|
|
137
|
-
|
|
138
|
-
// first child as the active index when the drop opens
|
|
139
|
-
(0, _utils.setFocusWithoutScroll)(optionsNode.children[0]);
|
|
140
|
-
setActiveIndex(0);
|
|
158
|
+
} else if (usingKeyboard && activeRef.current) {
|
|
159
|
+
(0, _utils.setFocusWithoutScroll)(activeRef.current);
|
|
141
160
|
} else if (optionsNode) {
|
|
142
161
|
(0, _utils.setFocusWithoutScroll)(optionsNode);
|
|
143
162
|
}
|
|
@@ -145,27 +164,13 @@ var SelectContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
145
164
|
return function () {
|
|
146
165
|
return clearTimeout(timer);
|
|
147
166
|
};
|
|
148
|
-
}, [onSearch, usingKeyboard, clear]);
|
|
149
|
-
|
|
150
|
-
(0, _react.useEffect)(function () {
|
|
151
|
-
if (keyboardNavigation) {
|
|
152
|
-
// 100ms was empirically determined
|
|
153
|
-
var timer = setTimeout(function () {
|
|
154
|
-
return setKeyboardNavigation(false);
|
|
155
|
-
}, 100);
|
|
156
|
-
return function () {
|
|
157
|
-
return clearTimeout(timer);
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
return undefined;
|
|
162
|
-
}, [keyboardNavigation]);
|
|
167
|
+
}, [onSearch, usingKeyboard, clear]);
|
|
163
168
|
var optionLabel = (0, _react.useCallback)(function (index) {
|
|
164
|
-
return (0, _utils2.applyKey)(options[index], labelKey);
|
|
165
|
-
}, [labelKey, options]);
|
|
169
|
+
return (0, _utils2.applyKey)(options[index], labelKey || valueKey);
|
|
170
|
+
}, [labelKey, options, valueKey]);
|
|
166
171
|
var optionValue = (0, _react.useCallback)(function (index) {
|
|
167
|
-
return (0, _utils2.applyKey)(options[index], valueKey);
|
|
168
|
-
}, [options, valueKey]);
|
|
172
|
+
return (0, _utils2.applyKey)(options[index], valueKey || labelKey);
|
|
173
|
+
}, [options, valueKey, labelKey]);
|
|
169
174
|
var isDisabled = (0, _react.useCallback)(function (index) {
|
|
170
175
|
var option = options[index];
|
|
171
176
|
var result;
|
|
@@ -257,7 +262,6 @@ var SelectContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
257
262
|
var onNextOption = (0, _react.useCallback)(function (event) {
|
|
258
263
|
event.preventDefault();
|
|
259
264
|
var nextActiveIndex = activeIndex + 1;
|
|
260
|
-
var clearButton = clearRef.current;
|
|
261
265
|
|
|
262
266
|
while (nextActiveIndex < options.length && isDisabled(nextActiveIndex)) {
|
|
263
267
|
nextActiveIndex += 1;
|
|
@@ -267,21 +271,19 @@ var SelectContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
267
271
|
setActiveIndex(nextActiveIndex);
|
|
268
272
|
setKeyboardNavigation(true);
|
|
269
273
|
}
|
|
270
|
-
|
|
271
|
-
if (clear && clear.position === 'bottom' && clearButton && nextActiveIndex >= options.length) {
|
|
272
|
-
setActiveIndex(options.length);
|
|
273
|
-
(0, _utils.setFocusWithoutScroll)(clearButton);
|
|
274
|
-
}
|
|
275
|
-
}, [activeIndex, isDisabled, options, clear]);
|
|
274
|
+
}, [activeIndex, isDisabled, options]);
|
|
276
275
|
var onPreviousOption = (0, _react.useCallback)(function (event) {
|
|
277
276
|
event.preventDefault();
|
|
278
277
|
var nextActiveIndex = activeIndex - 1;
|
|
279
|
-
var clearButton = clearRef.current;
|
|
280
278
|
|
|
281
279
|
if (nextActiveIndex === -1) {
|
|
282
280
|
var searchInput = searchRef.current;
|
|
281
|
+
var clearButton = clearRef.current;
|
|
283
282
|
|
|
284
|
-
if (
|
|
283
|
+
if (clearButton && clearButton.focus && shouldShowClearButton('top')) {
|
|
284
|
+
setActiveIndex(nextActiveIndex);
|
|
285
|
+
(0, _utils.setFocusWithoutScroll)(clearButton);
|
|
286
|
+
} else if (searchInput && searchInput.focus) {
|
|
285
287
|
setActiveIndex(nextActiveIndex);
|
|
286
288
|
(0, _utils.setFocusWithoutScroll)(searchInput);
|
|
287
289
|
}
|
|
@@ -295,11 +297,7 @@ var SelectContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
295
297
|
setActiveIndex(nextActiveIndex);
|
|
296
298
|
setKeyboardNavigation(true);
|
|
297
299
|
}
|
|
298
|
-
|
|
299
|
-
if (clear && clear.position !== 'bottom' && clearButton && activeIndex === 0) {
|
|
300
|
-
setActiveIndex(-1);
|
|
301
|
-
}
|
|
302
|
-
}, [activeIndex, isDisabled, clear]);
|
|
300
|
+
}, [activeIndex, isDisabled, shouldShowClearButton]);
|
|
303
301
|
var onKeyDownOption = (0, _react.useCallback)(function (event) {
|
|
304
302
|
if (!onSearch) {
|
|
305
303
|
var nextActiveIndex = options.findIndex(function (e, index) {
|
|
@@ -331,19 +329,18 @@ var SelectContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
331
329
|
};
|
|
332
330
|
}, [keyboardNavigation]);
|
|
333
331
|
var onSelectOption = (0, _react.useCallback)(function (event) {
|
|
334
|
-
if (
|
|
332
|
+
if ((shouldShowClearButton('bottom') || shouldShowClearButton('top')) && (0, _DOM.containsFocus)(clearRef.current)) {
|
|
333
|
+
onChange(event, {
|
|
334
|
+
option: undefined,
|
|
335
|
+
value: '',
|
|
336
|
+
selected: ''
|
|
337
|
+
});
|
|
338
|
+
} else if (activeIndex >= 0 && activeIndex < options.length) {
|
|
335
339
|
event.preventDefault(); // prevent submitting forms
|
|
336
340
|
|
|
337
341
|
selectOption(activeIndex)(event);
|
|
338
342
|
}
|
|
339
|
-
}, [activeIndex, selectOption, options]);
|
|
340
|
-
|
|
341
|
-
var shouldShowClearButton = function shouldShowClearButton(position) {
|
|
342
|
-
var hasValue = Boolean(multiple ? value.length : value);
|
|
343
|
-
var showAtPosition = position === 'bottom' ? (clear == null ? void 0 : clear.position) === 'bottom' : (clear == null ? void 0 : clear.position) !== 'bottom';
|
|
344
|
-
return clear && hasValue && showAtPosition;
|
|
345
|
-
};
|
|
346
|
-
|
|
343
|
+
}, [activeIndex, selectOption, options, onChange, shouldShowClearButton]);
|
|
347
344
|
var customSearchInput = theme.select.searchInput;
|
|
348
345
|
var SelectTextInput = customSearchInput || _TextInput.TextInput;
|
|
349
346
|
var selectOptionsStyle = theme.select.options ? _extends({}, theme.select.options.box, theme.select.options.container) : {};
|
|
@@ -374,18 +371,27 @@ var SelectContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
374
371
|
setActiveIndex(-1);
|
|
375
372
|
onSearch(nextSearch);
|
|
376
373
|
}
|
|
377
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
378
|
-
role: "listbox",
|
|
379
|
-
tabIndex: "-1",
|
|
380
|
-
ref: optionsRef,
|
|
381
|
-
"aria-multiselectable": multiple
|
|
382
|
-
}, shouldShowClearButton('top') && /*#__PURE__*/_react["default"].createElement(ClearButton, {
|
|
374
|
+
})), shouldShowClearButton('top') && /*#__PURE__*/_react["default"].createElement(ClearButton, {
|
|
383
375
|
ref: clearRef,
|
|
384
376
|
clear: clear,
|
|
385
377
|
name: name,
|
|
386
378
|
onClear: onClear,
|
|
379
|
+
onFocus: function onFocus() {
|
|
380
|
+
return setActiveIndex(-1);
|
|
381
|
+
},
|
|
382
|
+
onMouseOver: function onMouseOver() {
|
|
383
|
+
return setActiveIndex(-1);
|
|
384
|
+
},
|
|
387
385
|
theme: theme
|
|
388
|
-
}),
|
|
386
|
+
}), /*#__PURE__*/_react["default"].createElement(OptionsBox, {
|
|
387
|
+
role: "listbox",
|
|
388
|
+
tabIndex: "-1",
|
|
389
|
+
ref: optionsRef,
|
|
390
|
+
"aria-multiselectable": multiple,
|
|
391
|
+
onMouseMove: function onMouseMove() {
|
|
392
|
+
return setKeyboardNavigation(false);
|
|
393
|
+
}
|
|
394
|
+
}, options.length > 0 ? /*#__PURE__*/_react["default"].createElement(_InfiniteScroll.InfiniteScroll, {
|
|
389
395
|
items: options,
|
|
390
396
|
step: theme.select.step,
|
|
391
397
|
onMore: onMore,
|
|
@@ -415,8 +421,13 @@ var SelectContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
415
421
|
|
|
416
422
|
return /*#__PURE__*/_react["default"].createElement(SelectOption // eslint-disable-next-line react/no-array-index-key
|
|
417
423
|
, {
|
|
418
|
-
key: index
|
|
419
|
-
|
|
424
|
+
key: index // merge optionRef and activeRef
|
|
425
|
+
,
|
|
426
|
+
ref: function ref(node) {
|
|
427
|
+
// eslint-disable-next-line no-param-reassign
|
|
428
|
+
if (optionRef) optionRef.current = node;
|
|
429
|
+
if (optionActive) activeRef.current = node;
|
|
430
|
+
},
|
|
420
431
|
tabIndex: optionSelected ? '0' : '-1',
|
|
421
432
|
role: "option",
|
|
422
433
|
"aria-setsize": options.length,
|
|
@@ -427,11 +438,15 @@ var SelectContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
427
438
|
plain: !child ? undefined : true,
|
|
428
439
|
align: "start",
|
|
429
440
|
kind: !child ? 'option' : undefined,
|
|
430
|
-
hoverIndicator: !child ? undefined : 'background',
|
|
431
441
|
label: !child ? optionLabel(index) : undefined,
|
|
432
442
|
disabled: optionDisabled || undefined,
|
|
433
443
|
active: optionActive,
|
|
434
|
-
selected: optionSelected
|
|
444
|
+
selected: optionSelected // allow keyboard navigation to start from
|
|
445
|
+
// selected option after tabbing to it
|
|
446
|
+
,
|
|
447
|
+
onFocus: function onFocus() {
|
|
448
|
+
return setActiveIndex(index);
|
|
449
|
+
},
|
|
435
450
|
onMouseOver: !optionDisabled ? onActiveOption(index) : undefined,
|
|
436
451
|
onClick: !optionDisabled ? selectOption(index) : undefined,
|
|
437
452
|
textComponent: textComponent
|
|
@@ -442,12 +457,18 @@ var SelectContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
442
457
|
role: "menuitem",
|
|
443
458
|
hoverIndicator: "background",
|
|
444
459
|
disabled: true
|
|
445
|
-
}, /*#__PURE__*/_react["default"].createElement(_Box.Box, selectOptionsStyle, /*#__PURE__*/_react["default"].createElement(_Text.Text, theme.select.container.text, emptySearchMessage))), shouldShowClearButton('bottom') && /*#__PURE__*/_react["default"].createElement(ClearButton, {
|
|
460
|
+
}, /*#__PURE__*/_react["default"].createElement(_Box.Box, selectOptionsStyle, /*#__PURE__*/_react["default"].createElement(_Text.Text, theme.select.container.text, emptySearchMessage)))), shouldShowClearButton('bottom') && /*#__PURE__*/_react["default"].createElement(ClearButton, {
|
|
446
461
|
ref: clearRef,
|
|
447
462
|
clear: clear,
|
|
448
463
|
name: name,
|
|
449
464
|
onClear: onClear,
|
|
465
|
+
onFocus: function onFocus() {
|
|
466
|
+
return setActiveIndex(-1);
|
|
467
|
+
},
|
|
468
|
+
onMouseOver: function onMouseOver() {
|
|
469
|
+
return setActiveIndex(-1);
|
|
470
|
+
},
|
|
450
471
|
theme: theme
|
|
451
|
-
})))
|
|
472
|
+
})));
|
|
452
473
|
});
|
|
453
474
|
exports.SelectContainer = SelectContainer;
|
|
@@ -11,7 +11,11 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
|
|
14
|
-
var options = [
|
|
14
|
+
var options = [];
|
|
15
|
+
|
|
16
|
+
for (var i = 0; i < 500; i += 1) {
|
|
17
|
+
options.push("Number " + i);
|
|
18
|
+
}
|
|
15
19
|
|
|
16
20
|
var ClearTop = function ClearTop() {
|
|
17
21
|
var _useState = (0, _react.useState)(),
|
|
@@ -32,6 +36,7 @@ var ClearTop = function ClearTop() {
|
|
|
32
36
|
var nextValue = _ref.value;
|
|
33
37
|
return setValue(nextValue);
|
|
34
38
|
},
|
|
39
|
+
dropHeight: "large",
|
|
35
40
|
clear: true
|
|
36
41
|
}));
|
|
37
42
|
};
|
|
@@ -55,6 +60,7 @@ var ClearBottom = function ClearBottom() {
|
|
|
55
60
|
var nextValue = _ref2.value;
|
|
56
61
|
return setValue(nextValue);
|
|
57
62
|
},
|
|
63
|
+
dropHeight: "large",
|
|
58
64
|
clear: {
|
|
59
65
|
position: 'bottom'
|
|
60
66
|
}
|
|
@@ -8,6 +8,7 @@ var applyKey = function applyKey(option, key) {
|
|
|
8
8
|
if (typeof key === 'object') return applyKey(option, key.key);
|
|
9
9
|
if (typeof key === 'function') return key(option);
|
|
10
10
|
if (key !== undefined) return option[key];
|
|
11
|
+
if (typeof option === 'object' && Object.keys(option)) return option[Object.keys(option)[0]];
|
|
11
12
|
return option;
|
|
12
13
|
};
|
|
13
14
|
|
package/components/Tab/Tab.js
CHANGED
|
@@ -70,7 +70,7 @@ var Tab = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
70
70
|
var tabStyles = {};
|
|
71
71
|
var tabRef = (0, _utils.useForwardedRef)(ref);
|
|
72
72
|
(0, _useIsomorphicLayoutEffect.useLayoutEffect)(function () {
|
|
73
|
-
if (tabRef.current) {
|
|
73
|
+
if (tabRef.current && tabsContextRef) {
|
|
74
74
|
tabsContextRef.current = tabRef.current;
|
|
75
75
|
}
|
|
76
76
|
});
|
package/components/Tabs/Tabs.js
CHANGED
|
@@ -31,6 +31,8 @@ var _MessageContext = require("../../contexts/MessageContext");
|
|
|
31
31
|
|
|
32
32
|
var _propTypes = require("./propTypes");
|
|
33
33
|
|
|
34
|
+
var _AnalyticsContext = require("../../contexts/AnalyticsContext/AnalyticsContext");
|
|
35
|
+
|
|
34
36
|
var _excluded = ["alignControls", "children", "flex", "justify", "messages", "responsive"];
|
|
35
37
|
|
|
36
38
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -90,6 +92,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
90
92
|
|
|
91
93
|
var headerRef = (0, _react.useRef)();
|
|
92
94
|
var size = (0, _react.useContext)(_ResponsiveContext.ResponsiveContext);
|
|
95
|
+
var sendAnalytics = (0, _AnalyticsContext.useAnalytics)();
|
|
93
96
|
|
|
94
97
|
if (activeIndex !== propsActiveIndex && propsActiveIndex !== undefined) {
|
|
95
98
|
setActiveIndex(propsActiveIndex);
|
|
@@ -256,6 +259,11 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
256
259
|
}, [tabRefs, disableLeftArrow, disableRightArrow, activeIndex, headerRef, overflow, updateArrowState]);
|
|
257
260
|
var getTabsContext = (0, _react.useCallback)(function (index) {
|
|
258
261
|
var activateTab = function activateTab(nextIndex) {
|
|
262
|
+
sendAnalytics({
|
|
263
|
+
type: 'activateTab',
|
|
264
|
+
element: tabRefs[nextIndex].current
|
|
265
|
+
});
|
|
266
|
+
|
|
259
267
|
if (propsActiveIndex === undefined) {
|
|
260
268
|
setActiveIndex(nextIndex);
|
|
261
269
|
}
|
|
@@ -277,7 +285,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
277
285
|
setActiveTitle: setActiveTitle,
|
|
278
286
|
setFocusIndex: setFocusIndex
|
|
279
287
|
};
|
|
280
|
-
}, [activeIndex, onActive, propsActiveIndex, tabRefs]);
|
|
288
|
+
}, [activeIndex, onActive, propsActiveIndex, sendAnalytics, tabRefs]);
|
|
281
289
|
|
|
282
290
|
var tabs = _react["default"].Children.map(children, function (child, index) {
|
|
283
291
|
return /*#__PURE__*/_react["default"].createElement(_TabsContext.TabsContext.Provider, {
|
|
@@ -318,6 +326,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
318
326
|
}, rest, {
|
|
319
327
|
background: theme.tabs.background
|
|
320
328
|
}), /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({
|
|
329
|
+
flex: false,
|
|
321
330
|
direction: overflow ? 'row' : 'column'
|
|
322
331
|
}, tabsHeaderStyles), overflow && /*#__PURE__*/_react["default"].createElement(_Button.Button, {
|
|
323
332
|
a11yTitle: "Previous Tab",
|
|
@@ -338,7 +347,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
338
347
|
ref: headerRef,
|
|
339
348
|
as: _Box.Box,
|
|
340
349
|
direction: "row",
|
|
341
|
-
justify: justify,
|
|
350
|
+
justify: overflow ? 'start' : justify,
|
|
342
351
|
alignSelf: alignControls,
|
|
343
352
|
flex: !!overflow,
|
|
344
353
|
wrap: false,
|
|
@@ -70,9 +70,9 @@ var headStyle = (0, _styledComponents.css)(["::after{content:'';height:100%;widt
|
|
|
70
70
|
var StyledVideoScrubber = _styledComponents["default"].div.withConfig({
|
|
71
71
|
displayName: "StyledVideo__StyledVideoScrubber",
|
|
72
72
|
componentId: "sc-w4v8h9-3"
|
|
73
|
-
})(["cursor:pointer;width:100%;height:100%;", "
|
|
73
|
+
})(["cursor:pointer;width:100%;height:100%;", ";&:focus{", "}"], function (props) {
|
|
74
74
|
return props.value && headStyle;
|
|
75
|
-
});
|
|
75
|
+
}, (0, _utils.focusStyle)());
|
|
76
76
|
|
|
77
77
|
exports.StyledVideoScrubber = StyledVideoScrubber;
|
|
78
78
|
StyledVideoScrubber.defaultProps = {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.useAnalytics = exports.AnalyticsProvider = exports.AnalyticsContext = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
+
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
|
|
10
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
|
|
12
|
+
var AnalyticsContext = /*#__PURE__*/_react["default"].createContext(function () {});
|
|
13
|
+
|
|
14
|
+
exports.AnalyticsContext = AnalyticsContext;
|
|
15
|
+
|
|
16
|
+
var useAnalytics = function useAnalytics() {
|
|
17
|
+
return (0, _react.useContext)(AnalyticsContext);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.useAnalytics = useAnalytics;
|
|
21
|
+
|
|
22
|
+
var AnalyticsProvider = function AnalyticsProvider(_ref) {
|
|
23
|
+
var onAnalytics = _ref.onAnalytics,
|
|
24
|
+
children = _ref.children;
|
|
25
|
+
var lastUrlRef = (0, _react.useRef)();
|
|
26
|
+
var sendAnalytics = (0, _react.useCallback)(function (data) {
|
|
27
|
+
return onAnalytics && onAnalytics(data);
|
|
28
|
+
}, [onAnalytics]);
|
|
29
|
+
(0, _react.useEffect)(function () {
|
|
30
|
+
var observer;
|
|
31
|
+
|
|
32
|
+
if (onAnalytics) {
|
|
33
|
+
observer = new window.MutationObserver(function () {
|
|
34
|
+
var _window, _window$location;
|
|
35
|
+
|
|
36
|
+
var url = (_window = window) == null ? void 0 : (_window$location = _window.location) == null ? void 0 : _window$location.href;
|
|
37
|
+
var previousUrl = lastUrlRef.current;
|
|
38
|
+
|
|
39
|
+
if (url !== previousUrl) {
|
|
40
|
+
lastUrlRef.current = url;
|
|
41
|
+
sendAnalytics({
|
|
42
|
+
type: 'pageView',
|
|
43
|
+
url: url,
|
|
44
|
+
previousUrl: previousUrl
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
observer.observe(document, {
|
|
49
|
+
subtree: true,
|
|
50
|
+
childList: true
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return function () {
|
|
55
|
+
var _observer;
|
|
56
|
+
|
|
57
|
+
return (_observer = observer) == null ? void 0 : _observer.disconnect();
|
|
58
|
+
};
|
|
59
|
+
}, [sendAnalytics, onAnalytics]);
|
|
60
|
+
return /*#__PURE__*/_react["default"].createElement(AnalyticsContext.Provider, {
|
|
61
|
+
value: sendAnalytics
|
|
62
|
+
}, children);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
exports.AnalyticsProvider = AnalyticsProvider;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _AnalyticsContext = require("./AnalyticsContext");
|
|
6
|
+
|
|
7
|
+
Object.keys(_AnalyticsContext).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _AnalyticsContext[key]) return;
|
|
10
|
+
exports[key] = _AnalyticsContext[key];
|
|
11
|
+
});
|
package/contexts/index.js
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
|
|
5
|
+
var _AnalyticsContext = require("./AnalyticsContext");
|
|
6
|
+
|
|
7
|
+
Object.keys(_AnalyticsContext).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _AnalyticsContext[key]) return;
|
|
10
|
+
exports[key] = _AnalyticsContext[key];
|
|
11
|
+
});
|
|
12
|
+
|
|
5
13
|
var _AnnounceContext = require("./AnnounceContext");
|
|
6
14
|
|
|
7
15
|
Object.keys(_AnnounceContext).forEach(function (key) {
|