@splunk/react-ui 4.40.0 → 4.41.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/CHANGELOG.md +21 -0
- package/Calendar.js +548 -744
- package/Date.js +158 -161
- package/FormRows.js +93 -97
- package/Link.js +21 -19
- package/MIGRATION.mdx +24 -3
- package/Menu.js +1 -1
- package/MessageBar.js +59 -57
- package/Multiselect.js +1161 -1278
- package/RadioBar.js +19 -15
- package/ResultsMenu.js +1208 -1028
- package/Select.js +857 -957
- package/Slider.js +346 -300
- package/SlidingPanels.js +166 -148
- package/TabBar.js +187 -172
- package/TabLayout.js +8 -8
- package/Table.js +7 -3
- package/TransitionOpen.js +44 -65
- package/package.json +2 -2
- package/types/src/ButtonSimple/ButtonSimple.d.ts +1 -1
- package/types/src/Calendar/Calendar.d.ts +28 -30
- package/types/src/Calendar/MonthHeader.d.ts +12 -22
- package/types/src/Color/Color.d.ts +2 -2
- package/types/src/Date/Date.d.ts +18 -19
- package/types/src/File/File.d.ts +1 -1
- package/types/src/FormRows/FormRows.d.ts +5 -60
- package/types/src/FormRows/Row.d.ts +1 -1
- package/types/src/Link/Link.d.ts +7 -0
- package/types/src/Link/index.d.ts +1 -0
- package/types/src/Menu/Item.d.ts +1 -1
- package/types/src/Menu/Menu.d.ts +1 -1
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Number/Number.d.ts +2 -2
- package/types/src/RadioBar/RadioBar.d.ts +2 -2
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ResultsMenu/VirtualizedResultsMenu/injectVirtualizedItem.d.ts +2 -0
- package/types/src/Search/Option.d.ts +1 -1
- package/types/src/Select/Option.d.ts +5 -1
- package/types/src/Select/OptionBase.d.ts +41 -23
- package/types/src/Select/SelectAllOption.d.ts +6 -2
- package/types/src/Select/SelectBase.d.ts +2 -30
- package/types/src/Slider/Slider.d.ts +7 -16
- package/types/src/SlidingPanels/SlidingPanels.d.ts +4 -3
- package/types/src/TabBar/TabBar.d.ts +10 -2
- package/types/src/TabBar/TabBarContext.d.ts +1 -0
- package/types/src/TabBar/docs/examples/IconsAbove.d.ts +2 -0
- package/types/src/TabBar/docs/examples/IconsLeft.d.ts +2 -0
- package/types/src/TabBar/docs/examples/VerticalIconsAbove.d.ts +2 -0
- package/types/src/TabBar/docs/examples/VerticalIconsLeft.d.ts +2 -0
- package/types/src/TabLayout/TabLayout.d.ts +4 -2
- package/types/src/Table/Row.d.ts +0 -2
- package/types/src/Table/Table.d.ts +0 -2
- package/types/src/Table/docs/examples/Complex.d.ts +14 -3
- package/types/src/Text/Text.d.ts +2 -2
- package/types/src/TextArea/TextArea.d.ts +2 -2
- package/types/src/Typography/Typography.d.ts +4 -2
- package/types/src/TabBar/docs/examples/IconsInline.d.ts +0 -2
- package/types/src/TabBar/docs/examples/IconsSmall.d.ts +0 -2
- package/types/src/TabBar/docs/examples/VerticalSmallIcons.d.ts +0 -2
- package/types/src/Table/docs/examples/prisma/Complex.d.ts +0 -48
- /package/types/src/Table/docs/examples/{prisma/RowActions.d.ts → RowActions.d.ts} +0 -0
package/SlidingPanels.js
CHANGED
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
Panel: () => /* reexport */
|
|
65
|
-
default: () => /* reexport */
|
|
64
|
+
Panel: () => /* reexport */ L,
|
|
65
|
+
default: () => /* reexport */ be
|
|
66
66
|
});
|
|
67
67
|
// CONCATENATED MODULE: external "react"
|
|
68
68
|
const n = require("react");
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
displayName: "SlidingPanelsStyles__StyledBox",
|
|
100
100
|
componentId: "su6isq-0"
|
|
101
101
|
})([ "overflow:hidden;position:relative;" ]);
|
|
102
|
-
var
|
|
102
|
+
var j = m()(v.animated.div).withConfig({
|
|
103
103
|
displayName: "SlidingPanelsStyles__Styled",
|
|
104
104
|
componentId: "su6isq-1"
|
|
105
105
|
})([ "", ";", ";" ], O.mixins.reset("block"), O.mixins.clearfix());
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
111
111
|
* @param current - The new value of the ref.
|
|
112
112
|
*/
|
|
113
|
-
function
|
|
113
|
+
function w(e, t) {
|
|
114
114
|
if (e) {
|
|
115
115
|
if (typeof e === "function") {
|
|
116
116
|
e(t);
|
|
@@ -131,8 +131,8 @@
|
|
|
131
131
|
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
132
132
|
}, S(e);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
return
|
|
134
|
+
function I() {
|
|
135
|
+
return I = Object.assign ? Object.assign.bind() : function(e) {
|
|
136
136
|
for (var t = 1; t < arguments.length; t++) {
|
|
137
137
|
var n = arguments[t];
|
|
138
138
|
for (var r in n) {
|
|
@@ -140,16 +140,16 @@
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
return e;
|
|
143
|
-
},
|
|
143
|
+
}, I.apply(null, arguments);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function E(e, t) {
|
|
146
146
|
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
147
147
|
}
|
|
148
148
|
function _(e, t) {
|
|
149
149
|
for (var n = 0; n < t.length; n++) {
|
|
150
150
|
var r = t[n];
|
|
151
151
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
|
|
152
|
-
Object.defineProperty(e,
|
|
152
|
+
Object.defineProperty(e, N(r.key), r);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
function k(e, t, n) {
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
}, q(e, t);
|
|
176
176
|
}
|
|
177
177
|
function A(e) {
|
|
178
|
-
var t =
|
|
178
|
+
var t = R();
|
|
179
179
|
return function() {
|
|
180
180
|
var n, r = x(e);
|
|
181
181
|
if (t) {
|
|
@@ -188,17 +188,17 @@
|
|
|
188
188
|
function C(e, t) {
|
|
189
189
|
if (t && ("object" == S(t) || "function" == typeof t)) return t;
|
|
190
190
|
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
191
|
-
return
|
|
191
|
+
return M(e);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function M(e) {
|
|
194
194
|
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
195
195
|
return e;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function R() {
|
|
198
198
|
try {
|
|
199
199
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
200
200
|
} catch (e) {}
|
|
201
|
-
return (
|
|
201
|
+
return (R = function t() {
|
|
202
202
|
return !!e;
|
|
203
203
|
})();
|
|
204
204
|
}
|
|
@@ -207,15 +207,15 @@
|
|
|
207
207
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
208
208
|
}, x(e);
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
return (t =
|
|
210
|
+
function U(e, t, n) {
|
|
211
|
+
return (t = N(t)) in e ? Object.defineProperty(e, t, {
|
|
212
212
|
value: n,
|
|
213
213
|
enumerable: !0,
|
|
214
214
|
configurable: !0,
|
|
215
215
|
writable: !0
|
|
216
216
|
}) : e[t] = n, e;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function N(e) {
|
|
219
219
|
var t = D(e, "string");
|
|
220
220
|
return "symbol" == S(t) ? t : t + "";
|
|
221
221
|
}
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
}
|
|
230
230
|
return ("string" === t ? String : Number)(e);
|
|
231
231
|
}
|
|
232
|
-
var
|
|
232
|
+
var W = {
|
|
233
233
|
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
234
234
|
panelId: i().any.isRequired,
|
|
235
235
|
/**
|
|
@@ -245,23 +245,23 @@
|
|
|
245
245
|
*/
|
|
246
246
|
onUnmount: i().func
|
|
247
247
|
};
|
|
248
|
-
var
|
|
248
|
+
var B = {};
|
|
249
249
|
/**
|
|
250
250
|
* Container for arbitrary content.
|
|
251
|
-
*/ var
|
|
251
|
+
*/ var X = function(e) {
|
|
252
252
|
T(n, e);
|
|
253
253
|
var t = A(n);
|
|
254
254
|
function n() {
|
|
255
255
|
var e;
|
|
256
|
-
|
|
256
|
+
E(this, n);
|
|
257
257
|
for (var r = arguments.length, o = new Array(r), i = 0; i < r; i++) {
|
|
258
258
|
o[i] = arguments[i];
|
|
259
259
|
}
|
|
260
260
|
e = t.call.apply(t, [ this ].concat(o));
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
U(M(e), "el", null);
|
|
262
|
+
U(M(e), "handleMount", (function(t) {
|
|
263
263
|
e.el = t;
|
|
264
|
-
|
|
264
|
+
w(e.props.elementRef, t);
|
|
265
265
|
}));
|
|
266
266
|
return e;
|
|
267
267
|
}
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
value: function e() {
|
|
298
298
|
var t = this.props.panelId;
|
|
299
299
|
|
|
300
|
-
return r().createElement(
|
|
300
|
+
return r().createElement(j, I({
|
|
301
301
|
"data-test": "panel",
|
|
302
302
|
"data-test-panel-id": t
|
|
303
303
|
}, f()(this.props, c()(n.propTypes)), {
|
|
@@ -307,9 +307,9 @@
|
|
|
307
307
|
} ]);
|
|
308
308
|
return n;
|
|
309
309
|
}(n.Component);
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
/* harmony default export */ const
|
|
310
|
+
U(X, "propTypes", W);
|
|
311
|
+
U(X, "defaultProps", B);
|
|
312
|
+
/* harmony default export */ const L = X;
|
|
313
313
|
// CONCATENATED MODULE: ./src/SlidingPanels/SlidingPanels.tsx
|
|
314
314
|
function H(e) {
|
|
315
315
|
"@babel/helpers - typeof";
|
|
@@ -331,42 +331,21 @@
|
|
|
331
331
|
}, V.apply(null, arguments);
|
|
332
332
|
}
|
|
333
333
|
function F(e, t) {
|
|
334
|
-
var n = Object.keys(e);
|
|
335
|
-
if (Object.getOwnPropertySymbols) {
|
|
336
|
-
var r = Object.getOwnPropertySymbols(e);
|
|
337
|
-
t && (r = r.filter((function(t) {
|
|
338
|
-
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
339
|
-
}))), n.push.apply(n, r);
|
|
340
|
-
}
|
|
341
|
-
return n;
|
|
342
|
-
}
|
|
343
|
-
function z(e) {
|
|
344
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
345
|
-
var n = null != arguments[t] ? arguments[t] : {};
|
|
346
|
-
t % 2 ? F(Object(n), !0).forEach((function(t) {
|
|
347
|
-
re(e, t, n[t]);
|
|
348
|
-
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : F(Object(n)).forEach((function(t) {
|
|
349
|
-
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
350
|
-
}));
|
|
351
|
-
}
|
|
352
|
-
return e;
|
|
353
|
-
}
|
|
354
|
-
function G(e, t) {
|
|
355
334
|
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
356
335
|
}
|
|
357
|
-
function
|
|
336
|
+
function z(e, t) {
|
|
358
337
|
for (var n = 0; n < t.length; n++) {
|
|
359
338
|
var r = t[n];
|
|
360
339
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
|
|
361
340
|
Object.defineProperty(e, oe(r.key), r);
|
|
362
341
|
}
|
|
363
342
|
}
|
|
364
|
-
function
|
|
365
|
-
return t &&
|
|
343
|
+
function G(e, t, n) {
|
|
344
|
+
return t && z(e.prototype, t), n && z(e, n), Object.defineProperty(e, "prototype", {
|
|
366
345
|
writable: !1
|
|
367
346
|
}), e;
|
|
368
347
|
}
|
|
369
|
-
function
|
|
348
|
+
function J(e, t) {
|
|
370
349
|
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
371
350
|
e.prototype = Object.create(t && t.prototype, {
|
|
372
351
|
constructor: {
|
|
@@ -376,45 +355,66 @@
|
|
|
376
355
|
}
|
|
377
356
|
}), Object.defineProperty(e, "prototype", {
|
|
378
357
|
writable: !1
|
|
379
|
-
}), t &&
|
|
358
|
+
}), t && K(e, t);
|
|
380
359
|
}
|
|
381
|
-
function
|
|
382
|
-
return
|
|
360
|
+
function K(e, t) {
|
|
361
|
+
return K = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
383
362
|
return e.__proto__ = t, e;
|
|
384
|
-
},
|
|
363
|
+
}, K(e, t);
|
|
385
364
|
}
|
|
386
|
-
function
|
|
387
|
-
var t =
|
|
365
|
+
function Q(e) {
|
|
366
|
+
var t = $();
|
|
388
367
|
return function() {
|
|
389
|
-
var n, r =
|
|
368
|
+
var n, r = ee(e);
|
|
390
369
|
if (t) {
|
|
391
|
-
var o =
|
|
370
|
+
var o = ee(this).constructor;
|
|
392
371
|
n = Reflect.construct(r, arguments, o);
|
|
393
372
|
} else n = r.apply(this, arguments);
|
|
394
|
-
return
|
|
373
|
+
return Y(this, n);
|
|
395
374
|
};
|
|
396
375
|
}
|
|
397
|
-
function
|
|
376
|
+
function Y(e, t) {
|
|
398
377
|
if (t && ("object" == H(t) || "function" == typeof t)) return t;
|
|
399
378
|
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
400
|
-
return
|
|
379
|
+
return Z(e);
|
|
401
380
|
}
|
|
402
|
-
function
|
|
381
|
+
function Z(e) {
|
|
403
382
|
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
404
383
|
return e;
|
|
405
384
|
}
|
|
406
|
-
function
|
|
385
|
+
function $() {
|
|
407
386
|
try {
|
|
408
387
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
409
388
|
} catch (e) {}
|
|
410
|
-
return (
|
|
389
|
+
return ($ = function t() {
|
|
411
390
|
return !!e;
|
|
412
391
|
})();
|
|
413
392
|
}
|
|
414
|
-
function
|
|
415
|
-
return
|
|
393
|
+
function ee(e) {
|
|
394
|
+
return ee = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
416
395
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
417
|
-
},
|
|
396
|
+
}, ee(e);
|
|
397
|
+
}
|
|
398
|
+
function te(e, t) {
|
|
399
|
+
var n = Object.keys(e);
|
|
400
|
+
if (Object.getOwnPropertySymbols) {
|
|
401
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
402
|
+
t && (r = r.filter((function(t) {
|
|
403
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
404
|
+
}))), n.push.apply(n, r);
|
|
405
|
+
}
|
|
406
|
+
return n;
|
|
407
|
+
}
|
|
408
|
+
function ne(e) {
|
|
409
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
410
|
+
var n = null != arguments[t] ? arguments[t] : {};
|
|
411
|
+
t % 2 ? te(Object(n), !0).forEach((function(t) {
|
|
412
|
+
re(e, t, n[t]);
|
|
413
|
+
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : te(Object(n)).forEach((function(t) {
|
|
414
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
415
|
+
}));
|
|
416
|
+
}
|
|
417
|
+
return e;
|
|
418
418
|
}
|
|
419
419
|
function re(e, t, n) {
|
|
420
420
|
return (t = oe(t)) in e ? Object.defineProperty(e, t, {
|
|
@@ -452,10 +452,66 @@
|
|
|
452
452
|
var le = {
|
|
453
453
|
transition: "forward"
|
|
454
454
|
};
|
|
455
|
-
var ue =
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
455
|
+
var ue = {
|
|
456
|
+
precision: 1
|
|
457
|
+
};
|
|
458
|
+
var ce = function e(t) {
|
|
459
|
+
var n = t.animating, r = t.outerStyle, o = t.interpolatedOuterStyle;
|
|
460
|
+
return ne(ne({}, r), n ? o : {});
|
|
461
|
+
};
|
|
462
|
+
var se = function e(t) {
|
|
463
|
+
return t ? {
|
|
464
|
+
translateX: 1
|
|
465
|
+
} : {};
|
|
466
|
+
};
|
|
467
|
+
var fe = function e(t) {
|
|
468
|
+
var n = t ? t.getWidth() : 0;
|
|
469
|
+
var r = t ? t.getHeight() : 0;
|
|
470
|
+
return {
|
|
471
|
+
width: n,
|
|
472
|
+
height: r
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
var pe = function e(t) {
|
|
476
|
+
var o;
|
|
477
|
+
var i = t.activePanelId, a = t.children, l = t.maxWidth, u = t.onMount, c = t.onUnmount, s = t.transition, f = t.transitionStyle;
|
|
478
|
+
var p = n.Children.toArray(a).filter(n.isValidElement).find((function(e) {
|
|
479
|
+
return e.props.panelId === i;
|
|
480
|
+
}));
|
|
481
|
+
// TODO: Fix Interpolation<string | number> can't be cast to string
|
|
482
|
+
var d = (o = f.translateX) === null || o === void 0 ? void 0 : o.to((function(e) {
|
|
483
|
+
return "translateX(".concat(e * l * (s === "forward" ? 1 : -1), "px)");
|
|
484
|
+
}));
|
|
485
|
+
var y = p ? r().createElement(v.animated.div, {
|
|
486
|
+
style: f
|
|
487
|
+
}, (0, n.cloneElement)(p, {
|
|
488
|
+
style: ne(ne({}, p.props.style), {}, {
|
|
489
|
+
transform: d
|
|
490
|
+
}),
|
|
491
|
+
onMount: u,
|
|
492
|
+
onUnmount: c
|
|
493
|
+
})) : null;
|
|
494
|
+
return y;
|
|
495
|
+
};
|
|
496
|
+
var de = function e() {
|
|
497
|
+
return {
|
|
498
|
+
translateX: 0
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
var ve = function e(t) {
|
|
502
|
+
return t ? {
|
|
503
|
+
translateX: -1,
|
|
504
|
+
position: "absolute",
|
|
505
|
+
left: 0,
|
|
506
|
+
top: 0
|
|
507
|
+
} : {
|
|
508
|
+
translateX: -1
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
var ye = function(e) {
|
|
512
|
+
J(o, e);
|
|
513
|
+
var t = Q(o);
|
|
514
|
+
G(o, null, [ {
|
|
459
515
|
key: "getDerivedStateFromProps",
|
|
460
516
|
// @docs-props-type SlidingPanelsPropsBase
|
|
461
517
|
value: function e(t, n) {
|
|
@@ -475,26 +531,11 @@
|
|
|
475
531
|
} ]);
|
|
476
532
|
function o(e) {
|
|
477
533
|
var i;
|
|
478
|
-
|
|
534
|
+
F(this, o);
|
|
479
535
|
i = t.call(this, e);
|
|
480
|
-
re(
|
|
481
|
-
re(
|
|
482
|
-
re(
|
|
483
|
-
return {
|
|
484
|
-
translateX: 0
|
|
485
|
-
};
|
|
486
|
-
}));
|
|
487
|
-
re(ee(i), "willLeave", (function(e) {
|
|
488
|
-
return e ? {
|
|
489
|
-
translateX: -1,
|
|
490
|
-
position: "absolute",
|
|
491
|
-
left: 0,
|
|
492
|
-
top: 0
|
|
493
|
-
} : {
|
|
494
|
-
translateX: -1
|
|
495
|
-
};
|
|
496
|
-
}));
|
|
497
|
-
re(ee(i), "handlePanelMount", (function(e) {
|
|
536
|
+
re(Z(i), "panelInstances", {});
|
|
537
|
+
re(Z(i), "allowAnimationUpdates", true);
|
|
538
|
+
re(Z(i), "handlePanelMount", (function(e) {
|
|
498
539
|
i.panelInstances[e.props.panelId] = e;
|
|
499
540
|
if (e.props.panelId === i.props.activePanelId) {
|
|
500
541
|
i.setState({
|
|
@@ -503,10 +544,10 @@
|
|
|
503
544
|
});
|
|
504
545
|
}
|
|
505
546
|
}));
|
|
506
|
-
re(
|
|
547
|
+
re(Z(i), "handlePanelUnmount", (function(e) {
|
|
507
548
|
delete i.panelInstances[e.props.panelId];
|
|
508
549
|
}));
|
|
509
|
-
re(
|
|
550
|
+
re(Z(i), "handleAnimationEnd", (function() {
|
|
510
551
|
var e, t;
|
|
511
552
|
if (i.allowAnimationUpdates) {
|
|
512
553
|
i.setState({
|
|
@@ -515,45 +556,22 @@
|
|
|
515
556
|
}
|
|
516
557
|
(e = (t = i.props).onAnimationEnd) === null || e === void 0 ? void 0 : e.call(t);
|
|
517
558
|
}));
|
|
518
|
-
re(
|
|
519
|
-
var a;
|
|
520
|
-
var l = i.props, u = l.children, c = l.transition;
|
|
521
|
-
var s = n.Children.toArray(u).filter(n.isValidElement).find((function(e) {
|
|
522
|
-
return e.props.panelId === t;
|
|
523
|
-
}));
|
|
524
|
-
// TODO: Fix Interplation<string | number> can't be cast to string
|
|
525
|
-
var f = (a = e.translateX) === null || a === void 0 ? void 0 : a.to((function(e) {
|
|
526
|
-
return "translateX(".concat(e * o * (c === "forward" ? 1 : -1), "px)");
|
|
527
|
-
}));
|
|
528
|
-
var p = s ? r().createElement(v.animated.div, {
|
|
529
|
-
style: e
|
|
530
|
-
}, (0, n.cloneElement)(s, {
|
|
531
|
-
style: z(z({}, s.props.style), {}, {
|
|
532
|
-
transform: f
|
|
533
|
-
}),
|
|
534
|
-
onMount: i.handlePanelMount,
|
|
535
|
-
onUnmount: i.handlePanelUnmount
|
|
536
|
-
})) : null;
|
|
537
|
-
return p;
|
|
538
|
-
}));
|
|
539
|
-
re(ee(i), "renderOuterContainer", (function(e) {
|
|
559
|
+
re(Z(i), "renderOuterContainer", (function(e) {
|
|
540
560
|
var t = i.props, a = t.activePanelId, u = t.children, s = t.elementRef, p = t.outerClassName, b = t.outerStyle, m = t.innerClassName, h = t.innerStyle;
|
|
541
561
|
var g = i.state.animating;
|
|
542
|
-
var O =
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
562
|
+
var O = ce({
|
|
563
|
+
animating: g,
|
|
564
|
+
outerStyle: b,
|
|
565
|
+
interpolatedOuterStyle: e
|
|
566
|
+
});
|
|
567
|
+
var j = n.Children.toArray(u).filter(n.isValidElement).find((function(e) {
|
|
547
568
|
return e.props.panelId === a;
|
|
548
569
|
}));
|
|
549
570
|
if (false) {}
|
|
550
|
-
var
|
|
551
|
-
translateX: 1
|
|
552
|
-
} : {};
|
|
553
|
-
var S = l()(d()(i.panelInstances), (function(e) {
|
|
571
|
+
var w = l()(d()(i.panelInstances), (function(e) {
|
|
554
572
|
return !!e;
|
|
555
573
|
}));
|
|
556
|
-
var
|
|
574
|
+
var S = w.map((function(e) {
|
|
557
575
|
var t;
|
|
558
576
|
var n = i.panelInstances[e.props.panelId];
|
|
559
577
|
return n ? (t = n.getWidth()) !== null && t !== void 0 ? t : 0 : 0;
|
|
@@ -568,9 +586,9 @@
|
|
|
568
586
|
elementRef: s,
|
|
569
587
|
style: O
|
|
570
588
|
}, f()(i.props, c()(o.propTypes))), r().createElement(y.Transition, {
|
|
571
|
-
from:
|
|
572
|
-
enter:
|
|
573
|
-
leave:
|
|
589
|
+
from: se(g),
|
|
590
|
+
enter: de(),
|
|
591
|
+
leave: ve(g),
|
|
574
592
|
items: a
|
|
575
593
|
}, (
|
|
576
594
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -579,7 +597,15 @@
|
|
|
579
597
|
return r().createElement(v.animated.div, {
|
|
580
598
|
style: h,
|
|
581
599
|
className: m
|
|
582
|
-
},
|
|
600
|
+
}, pe({
|
|
601
|
+
activePanelId: t,
|
|
602
|
+
children: u,
|
|
603
|
+
maxWidth: S,
|
|
604
|
+
onMount: i.handlePanelMount,
|
|
605
|
+
onUnmount: i.handlePanelUnmount,
|
|
606
|
+
transition: i.props.transition,
|
|
607
|
+
transitionStyle: e
|
|
608
|
+
}));
|
|
583
609
|
})));
|
|
584
610
|
}));
|
|
585
611
|
i.state = {
|
|
@@ -591,7 +617,7 @@
|
|
|
591
617
|
};
|
|
592
618
|
return i;
|
|
593
619
|
}
|
|
594
|
-
|
|
620
|
+
G(o, [ {
|
|
595
621
|
key: "componentWillUnmount",
|
|
596
622
|
value: function e() {
|
|
597
623
|
this.allowAnimationUpdates = false;
|
|
@@ -600,34 +626,26 @@
|
|
|
600
626
|
key: "render",
|
|
601
627
|
value: function e() {
|
|
602
628
|
var t = this.state, n = t.activePanel, o = t.panelLoading;
|
|
603
|
-
|
|
604
|
-
var a = n ? n.getHeight() : 0;
|
|
605
|
-
// When a new panel is loading, the activePanel is about to be removed. The height and/or
|
|
629
|
+
// When a new panel is loading, the activePanel is about to be removed. The height and/or
|
|
606
630
|
// width of that panel may have changed since the last render. To ensure that the next
|
|
607
631
|
// panel animates from the current height and width (rather than the previously loaded one),
|
|
608
632
|
// we only set the style when panelLoading is true (immediate prop prevents animation if true).
|
|
609
|
-
|
|
610
|
-
width: i,
|
|
611
|
-
height: a
|
|
612
|
-
};
|
|
613
|
-
|
|
633
|
+
|
|
614
634
|
return r().createElement(y.Spring, {
|
|
615
|
-
to:
|
|
635
|
+
to: fe(n),
|
|
616
636
|
onRest: this.handleAnimationEnd,
|
|
617
637
|
immediate: o,
|
|
618
|
-
config:
|
|
619
|
-
precision: 1
|
|
620
|
-
}
|
|
638
|
+
config: ue
|
|
621
639
|
}, /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
622
640
|
this.renderOuterContainer);
|
|
623
641
|
}
|
|
624
642
|
} ]);
|
|
625
643
|
return o;
|
|
626
644
|
}(n.Component);
|
|
627
|
-
re(
|
|
628
|
-
re(
|
|
629
|
-
re(
|
|
630
|
-
/* harmony default export */ const
|
|
645
|
+
re(ye, "propTypes", ae);
|
|
646
|
+
re(ye, "defaultProps", le);
|
|
647
|
+
re(ye, "Panel", L);
|
|
648
|
+
/* harmony default export */ const be = ye;
|
|
631
649
|
// CONCATENATED MODULE: ./src/SlidingPanels/index.ts
|
|
632
650
|
module.exports = t;
|
|
633
651
|
/******/})();
|