@enact/ui 5.0.0-alpha.3 → 5.0.0-alpha.5
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/AnnounceDecorator/AnnounceDecorator.js +2 -2
- package/AnnounceDecorator/tests/Announce-specs.js +2 -2
- package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +2 -2
- package/AnnounceDecorator/tests/useAnnounce-specs.js +3 -3
- package/BodyText/BodyText.js +2 -2
- package/BodyText/tests/BodyText-specs.js +6 -6
- package/Button/Button.js +2 -2
- package/Button/tests/Button-specs.js +10 -10
- package/CHANGELOG.md +22 -1
- package/Cancelable/tests/Cancelable-specs.js +19 -19
- package/Card/Card.d.ts +77 -0
- package/Card/Card.js +215 -0
- package/Card/Card.module.css +31 -0
- package/Card/package.json +3 -0
- package/Card/tests/Card-specs.js +90 -0
- package/Changeable/tests/Changeable-specs.js +25 -25
- package/ComponentOverride/ComponentOverride.js +3 -3
- package/FloatingLayer/FloatingLayer.js +3 -3
- package/FloatingLayer/FloatingLayerDecorator.js +3 -3
- package/FloatingLayer/Scrim.js +2 -2
- package/FloatingLayer/tests/FloatingLayer-specs.js +6 -6
- package/FloatingLayer/tests/Scrim-specs.js +2 -2
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +3 -3
- package/Group/Group.js +2 -2
- package/Group/GroupItem.js +2 -2
- package/Group/tests/Group-specs.js +11 -11
- package/Heading/Heading.js +2 -2
- package/Heading/tests/Heading-specs.js +14 -14
- package/Icon/Icon.js +3 -2
- package/Icon/tests/Icon-specs.js +9 -9
- package/Image/Image.js +2 -2
- package/Image/tests/Image-specs.js +5 -5
- package/ImageItem/ImageItem.js +2 -2
- package/ImageItem/tests/ImageItem-specs.js +11 -11
- package/Item/Item.js +2 -2
- package/Item/tests/Item-specs.js +7 -7
- package/LabeledIcon/LabeledIcon.js +3 -3
- package/LabeledIcon/tests/LabeledIcon-specs.js +4 -4
- package/Layout/Cell.js +2 -2
- package/Layout/Layout.js +2 -2
- package/Layout/tests/Layout-specs.js +10 -10
- package/Marquee/MarqueeBase.js +2 -2
- package/Marquee/MarqueeController.js +1 -1
- package/Marquee/MarqueeDecorator.js +2 -2
- package/Marquee/tests/Marquee-specs.js +44 -44
- package/Measurable/tests/Measurable-specs.js +3 -3
- package/Media/Media.js +3 -3
- package/Media/tests/Media-specs.js +12 -12
- package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +1 -1
- package/Placeholder/tests/PlaceholderDecorator-specs.js +1 -1
- package/ProgressBar/ProgressBar.js +2 -2
- package/ProgressBar/tests/ProgressBar-specs.js +7 -7
- package/Repeater/Repeater.js +2 -2
- package/Repeater/tests/Repeater-specs.js +14 -14
- package/Resizable/tests/Resizable-specs.js +1 -1
- package/Resizable/tests/useResize-specs.js +1 -1
- package/Routable/Link.js +2 -2
- package/Routable/Routable.js +2 -2
- package/Routable/Router.js +2 -2
- package/Routable/tests/Routable-specs.js +1 -1
- package/Routable/tests/Router-specs.js +10 -10
- package/Routable/util.js +3 -3
- package/Scroller/ScrollerBasic.js +2 -2
- package/Scroller/tests/Scroller-specs.js +3 -3
- package/Skinnable/Skinnable.js +3 -3
- package/Skinnable/tests/Skinnable-specs.js +19 -19
- package/Skinnable/tests/useSkins-specs.js +14 -14
- package/Slider/Knob.js +2 -2
- package/Slider/Slider.js +2 -2
- package/Slider/tests/Slider-specs.js +7 -7
- package/Slottable/tests/Slottable-specs.js +10 -10
- package/Slottable/tests/useSlots-specs.js +10 -10
- package/Slottable/useSlots.js +2 -2
- package/Spinner/Spinner.js +2 -2
- package/Spinner/tests/Spinner-specs.js +5 -5
- package/ToggleIcon/ToggleIcon.js +2 -2
- package/ToggleIcon/tests/ToggleIcon-specs.js +5 -5
- package/Toggleable/Toggleable.js +2 -2
- package/Toggleable/tests/Toggleable-specs.js +41 -41
- package/Toggleable/useToggle.js +2 -2
- package/Touchable/Touchable.js +2 -2
- package/Touchable/tests/Touchable-specs.js +38 -38
- package/Touchable/tests/useTouch-specs.js +17 -17
- package/Transition/Transition.js +2 -2
- package/Transition/tests/Transition-specs.js +11 -11
- package/ViewManager/ViewManager.js +2 -2
- package/ViewManager/tests/View-specs.js +13 -13
- package/ViewManager/tests/ViewManager-specs.js +50 -50
- package/VirtualList/VirtualListBasic.js +3 -3
- package/VirtualList/tests/VirtualGridList-native-specs.js +8 -8
- package/VirtualList/tests/VirtualGridList-specs.js +25 -25
- package/VirtualList/tests/VirtualList-native-specs.js +9 -9
- package/VirtualList/tests/VirtualList-specs.js +31 -31
- package/internal/IdProvider/tests/IdProvider-specs.js +2 -2
- package/internal/IdProvider/tests/useId-specs.js +6 -6
- package/internal/Pure/tests/Pure-specs.js +5 -5
- package/package.json +7 -7
- package/resolution/index.d.ts +5 -1
- package/resolution/resolution.js +5 -1
- package/resolution/tests/ResolutionDecorator-specs.js +2 -2
- package/resolution/tests/resolution-specs.js +46 -19
- package/styles/mixins.less +0 -2
- package/useControlledState/tests/useControlledState-specs.js +10 -10
- package/useScroll/ScrollAnimator.js +3 -3
- package/useScroll/Scrollbar.js +2 -2
- package/useScroll/ScrollbarTrack.js +2 -2
- package/useScroll/useScroll.js +5 -2
|
@@ -35,7 +35,7 @@ describe('Skinnable Specs', function () {
|
|
|
35
35
|
light: 'lightSkin'
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
(0, _react.render)(
|
|
38
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
39
39
|
config: config
|
|
40
40
|
}));
|
|
41
41
|
var expected = 'darkSkin';
|
|
@@ -50,7 +50,7 @@ describe('Skinnable Specs', function () {
|
|
|
50
50
|
light: 'lightSkin'
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
(0, _react.render)(
|
|
53
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
54
54
|
config: config
|
|
55
55
|
}));
|
|
56
56
|
var expected = 'lightSkin';
|
|
@@ -65,7 +65,7 @@ describe('Skinnable Specs', function () {
|
|
|
65
65
|
light: 'lightSkin'
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
(0, _react.render)(
|
|
68
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
69
69
|
config: config
|
|
70
70
|
}));
|
|
71
71
|
var expected = '';
|
|
@@ -80,7 +80,7 @@ describe('Skinnable Specs', function () {
|
|
|
80
80
|
light: 'lightSkin'
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
|
-
(0, _react.render)(
|
|
83
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
84
84
|
config: config
|
|
85
85
|
}));
|
|
86
86
|
var expected = 'darkSkin';
|
|
@@ -96,7 +96,7 @@ describe('Skinnable Specs', function () {
|
|
|
96
96
|
},
|
|
97
97
|
variants: ['normal', 'smallCaps', 'unicase']
|
|
98
98
|
};
|
|
99
|
-
(0, _react.render)(
|
|
99
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
100
100
|
config: config
|
|
101
101
|
}));
|
|
102
102
|
var expected = 'darkSkin normal unicase';
|
|
@@ -113,7 +113,7 @@ describe('Skinnable Specs', function () {
|
|
|
113
113
|
},
|
|
114
114
|
variants: ['normal', 'smallCaps', 'unicase']
|
|
115
115
|
};
|
|
116
|
-
(0, _react.render)(
|
|
116
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
117
117
|
config: config
|
|
118
118
|
}));
|
|
119
119
|
var expected = 'darkSkin normal';
|
|
@@ -130,7 +130,7 @@ describe('Skinnable Specs', function () {
|
|
|
130
130
|
},
|
|
131
131
|
variants: ['normal', 'smallCaps', 'unicase']
|
|
132
132
|
};
|
|
133
|
-
(0, _react.render)(
|
|
133
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
134
134
|
config: config
|
|
135
135
|
}));
|
|
136
136
|
var expected = 'darkSkin normal unicase';
|
|
@@ -146,13 +146,13 @@ describe('Skinnable Specs', function () {
|
|
|
146
146
|
},
|
|
147
147
|
variants: ['normal', 'smallCaps', 'unicase']
|
|
148
148
|
};
|
|
149
|
-
(0, _react.render)(
|
|
149
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
150
150
|
config: _objectSpread(_objectSpread({}, config), {}, {
|
|
151
151
|
skinVariants: 'normal unicase'
|
|
152
152
|
})
|
|
153
153
|
}));
|
|
154
154
|
var component1Class = data.className;
|
|
155
|
-
(0, _react.render)(
|
|
155
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
156
156
|
config: _objectSpread(_objectSpread({}, config), {}, {
|
|
157
157
|
skinVariants: ['normal', 'unicase']
|
|
158
158
|
})
|
|
@@ -174,7 +174,7 @@ describe('Skinnable Specs', function () {
|
|
|
174
174
|
},
|
|
175
175
|
variants: ['normal', 'smallCaps', 'unicase']
|
|
176
176
|
};
|
|
177
|
-
(0, _react.render)(
|
|
177
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
178
178
|
config: config
|
|
179
179
|
}));
|
|
180
180
|
var expected = 'darkSkin unicase';
|
|
@@ -195,7 +195,7 @@ describe('Skinnable Specs', function () {
|
|
|
195
195
|
},
|
|
196
196
|
variants: ['normal', 'smallCaps', 'unicase']
|
|
197
197
|
};
|
|
198
|
-
(0, _react.render)(
|
|
198
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
199
199
|
config: config
|
|
200
200
|
}));
|
|
201
201
|
var expected = 'darkSkin normal';
|
|
@@ -211,7 +211,7 @@ describe('Skinnable Specs', function () {
|
|
|
211
211
|
},
|
|
212
212
|
variants: ['normal', 'smallCaps', 'unicase']
|
|
213
213
|
};
|
|
214
|
-
(0, _react.render)(
|
|
214
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Parent, {
|
|
215
215
|
config: _objectSpread(_objectSpread({}, config), {}, {
|
|
216
216
|
skinVariants: 'unicase'
|
|
217
217
|
}),
|
|
@@ -234,7 +234,7 @@ describe('Skinnable Specs', function () {
|
|
|
234
234
|
},
|
|
235
235
|
variants: ['normal', 'smallCaps', 'unicase']
|
|
236
236
|
};
|
|
237
|
-
(0, _react.render)(
|
|
237
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Parent, {
|
|
238
238
|
config: _objectSpread(_objectSpread({}, config), {}, {
|
|
239
239
|
skinVariants: 'smallCaps unicase'
|
|
240
240
|
}),
|
|
@@ -259,7 +259,7 @@ describe('Skinnable Specs', function () {
|
|
|
259
259
|
},
|
|
260
260
|
variants: ['normal', 'smallCaps', 'unicase']
|
|
261
261
|
};
|
|
262
|
-
(0, _react.render)(
|
|
262
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Parent, {
|
|
263
263
|
config: config,
|
|
264
264
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Parent, {
|
|
265
265
|
config: _objectSpread(_objectSpread({}, config), {}, {
|
package/Slider/Knob.js
CHANGED
|
@@ -24,8 +24,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
24
24
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
25
25
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
26
26
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
27
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
28
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
27
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
28
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
29
29
|
var Knob = exports.Knob = (0, _kind["default"])({
|
|
30
30
|
name: 'Knob',
|
|
31
31
|
propTypes: /** @lends ui/Slider.Knob.prototype */{
|
package/Slider/Slider.js
CHANGED
|
@@ -25,8 +25,8 @@ var _utils = require("./utils");
|
|
|
25
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
26
|
var _excluded = ["backgroundProgress", "componentRef", "css", "disabled", "knobComponent", "min", "orientation", "percent", "progressBarComponent", "progressAnchor", "tooltipComponent", "value"];
|
|
27
27
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
28
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
29
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
28
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
29
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
30
30
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31
31
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32
32
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -13,7 +13,7 @@ describe('Slider', function () {
|
|
|
13
13
|
}
|
|
14
14
|
test('should return a DOM node reference for `componentRef`', function () {
|
|
15
15
|
var ref = jest.fn();
|
|
16
|
-
(0, _react.render)(
|
|
16
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider["default"], {
|
|
17
17
|
progressBarComponent: CustomProgressBar,
|
|
18
18
|
ref: ref
|
|
19
19
|
}));
|
|
@@ -23,7 +23,7 @@ describe('Slider', function () {
|
|
|
23
23
|
});
|
|
24
24
|
test('should set \'ui-slider-proportion-end-knob\' to 0 when \'defaultValue\' is smaller than min value', function () {
|
|
25
25
|
jest.spyOn(console, 'warn').mockImplementation(function () {});
|
|
26
|
-
(0, _react.render)(
|
|
26
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider["default"], {
|
|
27
27
|
defaultValue: -10,
|
|
28
28
|
knobComponent: _Knob["default"],
|
|
29
29
|
max: 100,
|
|
@@ -39,7 +39,7 @@ describe('Slider', function () {
|
|
|
39
39
|
});
|
|
40
40
|
test('should set \'ui-slider-proportion-end-knob\' to 1 when \'defaultValue\' is bigger than max value', function () {
|
|
41
41
|
jest.spyOn(console, 'warn').mockImplementation(function () {});
|
|
42
|
-
(0, _react.render)(
|
|
42
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider["default"], {
|
|
43
43
|
defaultValue: 110,
|
|
44
44
|
knobComponent: _Knob["default"],
|
|
45
45
|
max: 100,
|
|
@@ -54,7 +54,7 @@ describe('Slider', function () {
|
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
56
|
test('should set \'ui-slider-proportion-end-knob\' to 0.5 when \'defaultValue\' is half of the range between min and max value', function () {
|
|
57
|
-
(0, _react.render)(
|
|
57
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider["default"], {
|
|
58
58
|
defaultValue: 50,
|
|
59
59
|
knobComponent: _Knob["default"],
|
|
60
60
|
max: 100,
|
|
@@ -70,7 +70,7 @@ describe('Slider', function () {
|
|
|
70
70
|
});
|
|
71
71
|
test('should fire `onChange` with `onChange` type of horizontal slider when value changed', function () {
|
|
72
72
|
var handleChange = jest.fn();
|
|
73
|
-
(0, _react.render)(
|
|
73
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider["default"], {
|
|
74
74
|
defaultValue: 50,
|
|
75
75
|
onChange: handleChange,
|
|
76
76
|
progressBarComponent: _ProgressBar["default"],
|
|
@@ -86,7 +86,7 @@ describe('Slider', function () {
|
|
|
86
86
|
});
|
|
87
87
|
test('should fire `onChange` with `onChange` type of vertical slider when value changed', function () {
|
|
88
88
|
var handleChange = jest.fn();
|
|
89
|
-
(0, _react.render)(
|
|
89
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider["default"], {
|
|
90
90
|
defaultValue: 50,
|
|
91
91
|
onChange: handleChange,
|
|
92
92
|
progressBarComponent: _ProgressBar["default"],
|
|
@@ -104,7 +104,7 @@ describe('Slider', function () {
|
|
|
104
104
|
});
|
|
105
105
|
describe('Knob', function () {
|
|
106
106
|
test('should render a knob', function () {
|
|
107
|
-
(0, _react.render)(
|
|
107
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Knob["default"], {
|
|
108
108
|
role: "knob"
|
|
109
109
|
}));
|
|
110
110
|
var knob = _react.screen.queryByRole('knob');
|
|
@@ -21,7 +21,7 @@ describe('Slottable Specs', function () {
|
|
|
21
21
|
children: [c, b, a]
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
|
-
(0, _react.render)(
|
|
24
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
25
25
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
26
26
|
slot: "a",
|
|
27
27
|
children: "A"
|
|
@@ -50,7 +50,7 @@ describe('Slottable Specs', function () {
|
|
|
50
50
|
children: [c, b, a, custom]
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
|
-
(0, _react.render)(
|
|
53
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
54
54
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
55
|
slot: "a",
|
|
56
56
|
children: "A"
|
|
@@ -90,7 +90,7 @@ describe('Slottable Specs', function () {
|
|
|
90
90
|
children: [c, b, a]
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
|
-
(0, _react.render)(
|
|
93
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
94
94
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
95
95
|
slot: "a",
|
|
96
96
|
children: "A"
|
|
@@ -117,7 +117,7 @@ describe('Slottable Specs', function () {
|
|
|
117
117
|
children: [children, b, a]
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
|
-
(0, _react.render)(
|
|
120
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
121
121
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
122
122
|
slot: "a",
|
|
123
123
|
children: "A"
|
|
@@ -147,7 +147,7 @@ describe('Slottable Specs', function () {
|
|
|
147
147
|
children: [c, b, a]
|
|
148
148
|
});
|
|
149
149
|
});
|
|
150
|
-
(0, _react.render)(
|
|
150
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
151
151
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
152
152
|
slot: "a",
|
|
153
153
|
children: "A"
|
|
@@ -185,7 +185,7 @@ describe('Slottable Specs', function () {
|
|
|
185
185
|
children: [c, b, a, custom]
|
|
186
186
|
});
|
|
187
187
|
});
|
|
188
|
-
(0, _react.render)(
|
|
188
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
189
189
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
190
190
|
slot: "a",
|
|
191
191
|
title: "Div A"
|
|
@@ -219,7 +219,7 @@ describe('Slottable Specs', function () {
|
|
|
219
219
|
children: a
|
|
220
220
|
});
|
|
221
221
|
});
|
|
222
|
-
(0, _react.render)(
|
|
222
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
223
223
|
a: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
224
224
|
children: "X"
|
|
225
225
|
}, "X"),
|
|
@@ -244,7 +244,7 @@ describe('Slottable Specs', function () {
|
|
|
244
244
|
});
|
|
245
245
|
|
|
246
246
|
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
247
|
-
(0, _react.render)(
|
|
247
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
248
248
|
a: ['a', 'b'],
|
|
249
249
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
250
250
|
children: "c"
|
|
@@ -267,7 +267,7 @@ describe('Slottable Specs', function () {
|
|
|
267
267
|
var Component = (0, _Slottable["default"])({
|
|
268
268
|
slots: ['a']
|
|
269
269
|
}, ComponentBase);
|
|
270
|
-
(0, _react.render)(
|
|
270
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
271
271
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
272
272
|
slot: "a",
|
|
273
273
|
children: "A"
|
|
@@ -295,7 +295,7 @@ describe('Slottable Specs', function () {
|
|
|
295
295
|
var Component = (0, _Slottable["default"])({
|
|
296
296
|
slots: ['a']
|
|
297
297
|
}, ComponentBase);
|
|
298
|
-
(0, _react.render)(
|
|
298
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {}));
|
|
299
299
|
var actual = _react.screen.getByTestId('slottable');
|
|
300
300
|
expect(actual).toHaveTextContent('Default A');
|
|
301
301
|
});
|
|
@@ -25,7 +25,7 @@ describe('useSlots', function () {
|
|
|
25
25
|
children: [slots.c, slots.b, slots.a]
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
(0, _react.render)(
|
|
28
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
29
29
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
30
|
slot: "a",
|
|
31
31
|
children: "A"
|
|
@@ -58,7 +58,7 @@ describe('useSlots', function () {
|
|
|
58
58
|
children: slots.children
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
(0, _react.render)(
|
|
61
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
62
62
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
63
63
|
slot: "a",
|
|
64
64
|
children: "A"
|
|
@@ -93,7 +93,7 @@ describe('useSlots', function () {
|
|
|
93
93
|
children: [slots.c, slots.b, slots.a, slots.custom]
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
(0, _react.render)(
|
|
96
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
97
97
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
98
98
|
slot: "a",
|
|
99
99
|
children: "A"
|
|
@@ -134,7 +134,7 @@ describe('useSlots', function () {
|
|
|
134
134
|
children: [slots.c, slots.b, slots.a]
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
(0, _react.render)(
|
|
137
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
138
138
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
139
139
|
slot: "a",
|
|
140
140
|
children: "A"
|
|
@@ -164,7 +164,7 @@ describe('useSlots', function () {
|
|
|
164
164
|
children: [slots.children, slots.b, slots.a]
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
-
(0, _react.render)(
|
|
167
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
168
168
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
169
169
|
slot: "a",
|
|
170
170
|
children: "A"
|
|
@@ -197,7 +197,7 @@ describe('useSlots', function () {
|
|
|
197
197
|
children: [slots.c, slots.b, slots.a]
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
(0, _react.render)(
|
|
200
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
201
201
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
202
202
|
slot: "a",
|
|
203
203
|
children: "A"
|
|
@@ -242,7 +242,7 @@ describe('useSlots', function () {
|
|
|
242
242
|
children: [slots.c, slots.b, slots.a, slots.custom]
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
(0, _react.render)(
|
|
245
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
246
246
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
247
247
|
slot: "a",
|
|
248
248
|
title: "Div A"
|
|
@@ -276,7 +276,7 @@ describe('useSlots', function () {
|
|
|
276
276
|
children: slots.a
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
|
-
(0, _react.render)(
|
|
279
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(Component, {
|
|
280
280
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
281
281
|
slot: "a",
|
|
282
282
|
children: "A"
|
|
@@ -305,7 +305,7 @@ describe('useSlots', function () {
|
|
|
305
305
|
children: slots.a
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
(0, _react.render)(
|
|
308
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
309
309
|
a: "B",
|
|
310
310
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
311
311
|
slot: "a",
|
|
@@ -328,7 +328,7 @@ describe('useSlots', function () {
|
|
|
328
328
|
children: slots.a
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
|
-
(0, _react.render)(
|
|
331
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
332
332
|
a: "B"
|
|
333
333
|
}));
|
|
334
334
|
var actual = _react.screen.getByTestId('useSlots');
|
package/Slottable/useSlots.js
CHANGED
|
@@ -14,8 +14,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
14
14
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
16
16
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
18
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
17
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
18
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
19
19
|
// ** WARNING ** This is an intentional but likely dangerous hack necessary to clone a child while
|
|
20
20
|
// omitting the `slot` property. It relies on the black box structure of a React element which could
|
|
21
21
|
// change breaking this code. Without it, the slot property will cascade to a DOM node causing a
|
package/Spinner/Spinner.js
CHANGED
|
@@ -42,8 +42,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
42
42
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
43
43
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
44
44
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
45
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
46
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
45
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
46
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
47
47
|
var SpinnerBase = exports.SpinnerBase = (0, _kind["default"])({
|
|
48
48
|
name: 'ui:Spinner',
|
|
49
49
|
propTypes: /** @lends ui/Spinner.SpinnerBase.prototype */{
|
|
@@ -7,7 +7,7 @@ var _FloatingLayer = require("../../FloatingLayer");
|
|
|
7
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
8
|
describe('Spinner Specs', function () {
|
|
9
9
|
test('should have centered class when centered prop equals true', function () {
|
|
10
|
-
(0, _react.render)(
|
|
10
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Spinner.SpinnerBase, {
|
|
11
11
|
centered: true,
|
|
12
12
|
component: "div",
|
|
13
13
|
children: "Loading..."
|
|
@@ -17,7 +17,7 @@ describe('Spinner Specs', function () {
|
|
|
17
17
|
expect(spinner).toHaveClass(expected);
|
|
18
18
|
});
|
|
19
19
|
test('should not have content class when Spinner has no children', function () {
|
|
20
|
-
(0, _react.render)(
|
|
20
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Spinner.SpinnerBase, {
|
|
21
21
|
component: "div",
|
|
22
22
|
"data-testid": "spinner"
|
|
23
23
|
}));
|
|
@@ -26,7 +26,7 @@ describe('Spinner Specs', function () {
|
|
|
26
26
|
expect(spinner).not.toHaveClass(expected);
|
|
27
27
|
});
|
|
28
28
|
test('should have no scrim class when blockClickOn prop equals container', function () {
|
|
29
|
-
(0, _react.render)(
|
|
29
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Spinner.SpinnerBase, {
|
|
30
30
|
blockClickOn: "container",
|
|
31
31
|
component: "div",
|
|
32
32
|
"data-testid": "spinner"
|
|
@@ -36,7 +36,7 @@ describe('Spinner Specs', function () {
|
|
|
36
36
|
expect(spinnerContainer).not.toHaveClass(expected);
|
|
37
37
|
});
|
|
38
38
|
test('should have scrim class when blockClickOn prop equals container and when scrim prop equals true', function () {
|
|
39
|
-
(0, _react.render)(
|
|
39
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Spinner.SpinnerBase, {
|
|
40
40
|
blockClickOn: "container",
|
|
41
41
|
component: "div",
|
|
42
42
|
"data-testid": "spinner",
|
|
@@ -48,7 +48,7 @@ describe('Spinner Specs', function () {
|
|
|
48
48
|
});
|
|
49
49
|
test('should have FloatingLayer when blockClickOn prop equals screen', function () {
|
|
50
50
|
var Root = (0, _FloatingLayer.FloatingLayerDecorator)('div');
|
|
51
|
-
(0, _react.render)(
|
|
51
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Root, {
|
|
52
52
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Spinner.SpinnerBase, {
|
|
53
53
|
blockClickOn: "screen",
|
|
54
54
|
component: "div",
|
package/ToggleIcon/ToggleIcon.js
CHANGED
|
@@ -40,8 +40,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
40
40
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
41
41
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
42
42
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
43
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
44
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
43
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
44
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
45
45
|
var ToggleIconBase = exports.ToggleIconBase = (0, _kind["default"])({
|
|
46
46
|
name: 'ui:ToggleIcon',
|
|
47
47
|
propTypes: /** @lends ui/ToggleIcon.ToggleIconBase.prototype */{
|
|
@@ -14,7 +14,7 @@ var tap = function tap(node) {
|
|
|
14
14
|
describe('ToggleIcon Specs', function () {
|
|
15
15
|
test('should call onToggle when tapped', function () {
|
|
16
16
|
var handleToggle = jest.fn();
|
|
17
|
-
(0, _react.render)(
|
|
17
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ToggleIcon["default"], {
|
|
18
18
|
onToggle: handleToggle,
|
|
19
19
|
children: "star"
|
|
20
20
|
}));
|
|
@@ -26,7 +26,7 @@ describe('ToggleIcon Specs', function () {
|
|
|
26
26
|
test('should call onClick when clicked', /*#__PURE__*/_asyncToGenerator(function* () {
|
|
27
27
|
var handleClick = jest.fn();
|
|
28
28
|
var user = _userEvent["default"].setup();
|
|
29
|
-
(0, _react.render)(
|
|
29
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ToggleIcon["default"], {
|
|
30
30
|
onClick: handleClick,
|
|
31
31
|
children: "star"
|
|
32
32
|
}));
|
|
@@ -37,7 +37,7 @@ describe('ToggleIcon Specs', function () {
|
|
|
37
37
|
}));
|
|
38
38
|
test('should call onTap when tapped', function () {
|
|
39
39
|
var handleTap = jest.fn();
|
|
40
|
-
(0, _react.render)(
|
|
40
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ToggleIcon["default"], {
|
|
41
41
|
onTap: handleTap,
|
|
42
42
|
children: "star"
|
|
43
43
|
}));
|
|
@@ -48,7 +48,7 @@ describe('ToggleIcon Specs', function () {
|
|
|
48
48
|
});
|
|
49
49
|
test('should call both onToggle and onTap when tapped', function () {
|
|
50
50
|
var handleBoth = jest.fn();
|
|
51
|
-
(0, _react.render)(
|
|
51
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ToggleIcon["default"], {
|
|
52
52
|
onTap: handleBoth,
|
|
53
53
|
onToggle: handleBoth,
|
|
54
54
|
children: "star"
|
|
@@ -60,7 +60,7 @@ describe('ToggleIcon Specs', function () {
|
|
|
60
60
|
});
|
|
61
61
|
test('should return a DOM node reference for `componentRef`', function () {
|
|
62
62
|
var ref = jest.fn();
|
|
63
|
-
(0, _react.render)(
|
|
63
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ToggleIcon["default"], {
|
|
64
64
|
ref: ref,
|
|
65
65
|
children: "star"
|
|
66
66
|
}));
|
package/Toggleable/Toggleable.js
CHANGED
|
@@ -24,8 +24,8 @@ var _excluded = ["disabled"];
|
|
|
24
24
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
27
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
28
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
27
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
28
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
29
29
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
30
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
31
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|