@ringcentral/juno 2.8.1 → 2.11.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/components/Buttons/IconButton/IconButton.js +5 -2
- package/components/Buttons/IconButton/styles/StyledIconButton.js +15 -7
- package/components/Dialer/DialPad/DialPad.d.ts +3 -3
- package/components/Dialer/DialPad/DialPad.js +2 -3
- package/components/Dialog/Dialog.js +4 -2
- package/components/Downshift/SuggestionList/SuggestionList.d.ts +3 -3
- package/components/Drawer/Drawer.js +8 -2
- package/components/Forms/TextField/TextField.d.ts +2 -2
- package/components/Forms/TextField/TextField.js +19 -4
- package/components/PortalHost/context/HasPortalParentContext.d.ts +3 -0
- package/components/PortalHost/context/HasPortalParentContext.js +9 -0
- package/components/PortalHost/utils/usePortalManagerWithID.js +5 -4
- package/components/Snackbar/Snackbar.js +3 -1
- package/components/Tabs/Tabs/MoreMenuTabs/MoreMenuTabs.js +17 -13
- package/components/VirtualizedMenu/VirtualizedMenu.js +4 -12
- package/components/Virtuoso/react-virtuoso/Grid.d.ts +28 -18
- package/components/Virtuoso/react-virtuoso/List.d.ts +487 -183
- package/components/Virtuoso/react-virtuoso/List.js +13 -2
- package/components/Virtuoso/react-virtuoso/Table.d.ts +434 -172
- package/components/Virtuoso/react-virtuoso/Table.js +14 -2
- package/components/Virtuoso/react-virtuoso/alignToBottomSystem.d.ts +32 -16
- package/components/Virtuoso/react-virtuoso/components.d.ts +8 -0
- package/components/Virtuoso/react-virtuoso/domIOSystem.d.ts +3 -1
- package/components/Virtuoso/react-virtuoso/domIOSystem.js +4 -2
- package/components/Virtuoso/react-virtuoso/followOutputSystem.d.ts +20 -10
- package/components/Virtuoso/react-virtuoso/followOutputSystem.js +1 -0
- package/components/Virtuoso/react-virtuoso/gridSystem.d.ts +24 -14
- package/components/Virtuoso/react-virtuoso/groupedListSystem.d.ts +4 -2
- package/components/Virtuoso/react-virtuoso/hooks/useChangedChildSizes.d.ts +2 -1
- package/components/Virtuoso/react-virtuoso/hooks/useChangedChildSizes.js +5 -10
- package/components/Virtuoso/react-virtuoso/hooks/useScrollTop.d.ts +2 -1
- package/components/Virtuoso/react-virtuoso/hooks/useScrollTop.js +16 -7
- package/components/Virtuoso/react-virtuoso/hooks/useWindowViewportRect.js +2 -2
- package/components/Virtuoso/react-virtuoso/initialItemCountSystem.d.ts +24 -12
- package/components/Virtuoso/react-virtuoso/initialScrollTopSystem.d.ts +32 -16
- package/components/Virtuoso/react-virtuoso/initialTopMostItemIndexSystem.d.ts +8 -4
- package/components/Virtuoso/react-virtuoso/initialTopMostItemIndexSystem.js +1 -1
- package/components/Virtuoso/react-virtuoso/interfaces.d.ts +22 -5
- package/components/Virtuoso/react-virtuoso/listStateSystem.d.ts +24 -12
- package/components/Virtuoso/react-virtuoso/listSystem.d.ts +287 -146
- package/components/Virtuoso/react-virtuoso/scrollIntoViewSystem.d.ts +32 -16
- package/components/Virtuoso/react-virtuoso/scrollSeekSystem.d.ts +4 -2
- package/components/Virtuoso/react-virtuoso/scrollToIndexSystem.d.ts +4 -2
- package/components/Virtuoso/react-virtuoso/sizeRangeSystem.d.ts +4 -2
- package/components/Virtuoso/react-virtuoso/stateFlagsSystem.d.ts +4 -2
- package/components/Virtuoso/react-virtuoso/stateFlagsSystem.js +5 -4
- package/components/Virtuoso/react-virtuoso/topItemCountSystem.d.ts +24 -12
- package/components/Virtuoso/react-virtuoso/totalListHeightSystem.d.ts +28 -14
- package/components/Virtuoso/react-virtuoso/totalListHeightSystem.js +4 -0
- package/components/Virtuoso/react-virtuoso/upwardScrollFixSystem.d.ts +32 -16
- package/components/Virtuoso/react-virtuoso/upwardScrollFixSystem.js +12 -35
- package/components/Virtuoso/react-virtuoso/utils/conditionalFlushSync.d.ts +1 -0
- package/components/Virtuoso/react-virtuoso/utils/conditionalFlushSync.js +7 -0
- package/components/Virtuoso/react-virtuoso/windowScrollerSystem.d.ts +6 -4
- package/components/Virtuoso/react-virtuoso/windowScrollerSystem.js +6 -2
- package/components/Virtuoso/utils/useHighlightScroll.js +1 -2
- package/es6/components/Buttons/IconButton/IconButton.js +5 -2
- package/es6/components/Buttons/IconButton/styles/StyledIconButton.js +16 -8
- package/es6/components/Dialer/DialPad/DialPad.js +3 -4
- package/es6/components/Dialog/Dialog.js +4 -2
- package/es6/components/Drawer/Drawer.js +8 -2
- package/es6/components/Forms/TextField/TextField.js +20 -5
- package/es6/components/PortalHost/context/HasPortalParentContext.js +6 -0
- package/es6/components/PortalHost/utils/usePortalManagerWithID.js +5 -4
- package/es6/components/Snackbar/Snackbar.js +3 -1
- package/es6/components/Tabs/Tabs/MoreMenuTabs/MoreMenuTabs.js +17 -13
- package/es6/components/VirtualizedMenu/VirtualizedMenu.js +6 -14
- package/es6/components/Virtuoso/react-virtuoso/List.js +14 -3
- package/es6/components/Virtuoso/react-virtuoso/Table.js +14 -2
- package/es6/components/Virtuoso/react-virtuoso/domIOSystem.js +4 -3
- package/es6/components/Virtuoso/react-virtuoso/followOutputSystem.js +1 -0
- package/es6/components/Virtuoso/react-virtuoso/hooks/useChangedChildSizes.js +5 -10
- package/es6/components/Virtuoso/react-virtuoso/hooks/useScrollTop.js +16 -7
- package/es6/components/Virtuoso/react-virtuoso/hooks/useWindowViewportRect.js +2 -2
- package/es6/components/Virtuoso/react-virtuoso/initialTopMostItemIndexSystem.js +1 -1
- package/es6/components/Virtuoso/react-virtuoso/stateFlagsSystem.js +5 -4
- package/es6/components/Virtuoso/react-virtuoso/totalListHeightSystem.js +4 -0
- package/es6/components/Virtuoso/react-virtuoso/upwardScrollFixSystem.js +12 -35
- package/es6/components/Virtuoso/react-virtuoso/utils/conditionalFlushSync.js +4 -0
- package/es6/components/Virtuoso/react-virtuoso/windowScrollerSystem.js +6 -2
- package/es6/components/Virtuoso/utils/useHighlightScroll.js +1 -2
- package/es6/foundation/theme/assets/palette.light.json +3 -3
- package/es6/foundation/theme/createTheme.js +1 -1
- package/foundation/theme/ThemeHandler.d.ts +1 -1
- package/foundation/theme/ThemeSwitcherProvider/ThemeSwitcherProvider.d.ts +2 -2
- package/foundation/theme/assets/palette.light.json +3 -3
- package/foundation/theme/theme.type.d.ts +2 -2
- package/foundation/typings/deepPartial.d.ts +1 -3
- package/foundation/utils/deepmerge.d.ts +3 -2
- package/package.json +3 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef } from 'react';
|
|
2
2
|
import * as u from '@virtuoso.dev/urx';
|
|
3
|
-
import { correctItemSize } from '../utils/correctItemSize';
|
|
4
3
|
import { useRcPortalWindowContext } from '../../../../foundation';
|
|
4
|
+
import { correctItemSize } from '../utils/correctItemSize';
|
|
5
5
|
function approximatelyEqual(num1, num2) {
|
|
6
6
|
return Math.abs(num1 - num2) < 1.01;
|
|
7
7
|
}
|
|
@@ -21,7 +21,14 @@ export default function useScrollTop(scrollContainerStateCallback, smoothScrollT
|
|
|
21
21
|
var scrollHeight = el === externalWindow
|
|
22
22
|
? externalWindow.document.documentElement.scrollHeight
|
|
23
23
|
: el.scrollHeight;
|
|
24
|
-
|
|
24
|
+
var viewportHeight = el === externalWindow
|
|
25
|
+
? externalWindow.innerHeight
|
|
26
|
+
: el.offsetHeight;
|
|
27
|
+
scrollContainerStateCallback({
|
|
28
|
+
scrollTop: Math.max(scrollTop, 0),
|
|
29
|
+
scrollHeight: scrollHeight,
|
|
30
|
+
viewportHeight: viewportHeight,
|
|
31
|
+
});
|
|
25
32
|
if (scrollTopTarget.current !== null) {
|
|
26
33
|
if (scrollTop === scrollTopTarget.current ||
|
|
27
34
|
scrollTop <= 0 ||
|
|
@@ -66,7 +73,7 @@ export default function useScrollTop(scrollContainerStateCallback, smoothScrollT
|
|
|
66
73
|
if (scrollerElement === externalWindow) {
|
|
67
74
|
// this is not a mistake
|
|
68
75
|
scrollHeight = Math.max(correctItemSize(externalWindow.document.documentElement, 'height'), externalWindow.document.documentElement.scrollHeight);
|
|
69
|
-
offsetHeight = externalWindow.
|
|
76
|
+
offsetHeight = externalWindow.innerHeight;
|
|
70
77
|
scrollTop = externalWindow.document.documentElement.scrollTop;
|
|
71
78
|
}
|
|
72
79
|
else {
|
|
@@ -81,7 +88,11 @@ export default function useScrollTop(scrollContainerStateCallback, smoothScrollT
|
|
|
81
88
|
// scroller is already at this location
|
|
82
89
|
if (approximatelyEqual(offsetHeight, scrollHeight) ||
|
|
83
90
|
location.top === scrollTop) {
|
|
84
|
-
scrollContainerStateCallback(
|
|
91
|
+
scrollContainerStateCallback({
|
|
92
|
+
scrollTop: scrollTop,
|
|
93
|
+
scrollHeight: scrollHeight,
|
|
94
|
+
viewportHeight: offsetHeight,
|
|
95
|
+
});
|
|
85
96
|
if (isSmooth) {
|
|
86
97
|
smoothScrollTargetReached(true);
|
|
87
98
|
}
|
|
@@ -104,9 +115,7 @@ export default function useScrollTop(scrollContainerStateCallback, smoothScrollT
|
|
|
104
115
|
scrollerElement.scrollTo(location);
|
|
105
116
|
}
|
|
106
117
|
function scrollByCallback(location) {
|
|
107
|
-
|
|
108
|
-
scrollerRef.current.scrollBy(location);
|
|
109
|
-
}
|
|
118
|
+
scrollerRef.current.scrollBy(location);
|
|
110
119
|
}
|
|
111
120
|
return { scrollerRef: scrollerRef, scrollByCallback: scrollByCallback, scrollToCallback: scrollToCallback };
|
|
112
121
|
}
|
|
@@ -10,8 +10,8 @@ export default function useWindowViewportRectRef(callback, customScrollParent) {
|
|
|
10
10
|
}
|
|
11
11
|
var rect = element.getBoundingClientRect();
|
|
12
12
|
var visibleWidth = rect.width;
|
|
13
|
-
var
|
|
14
|
-
var offsetTop;
|
|
13
|
+
// eslint-disable-next-line one-var
|
|
14
|
+
var visibleHeight, offsetTop;
|
|
15
15
|
if (customScrollParent) {
|
|
16
16
|
var customScrollParentRect = customScrollParent.getBoundingClientRect();
|
|
17
17
|
var deltaTop = rect.top - customScrollParentRect.top;
|
|
@@ -21,7 +21,7 @@ export var initialTopMostItemIndexSystem = u.system(function (_a) {
|
|
|
21
21
|
u.connect(u.pipe(didMount, u.withLatestFrom(initialTopMostItemIndex),
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
23
|
u.filter(function (_a) {
|
|
24
|
-
var _b = __read(_a, 2), location = _b[1];
|
|
24
|
+
var _b = __read(_a, 2), _ = _b[0], location = _b[1];
|
|
25
25
|
return !!location;
|
|
26
26
|
}), u.mapTo(false)), scrolledToInitialItem);
|
|
27
27
|
u.subscribe(u.pipe(u.combineLatest(listRefresh, didMount), u.withLatestFrom(scrolledToInitialItem, sizes, defaultItemSize), u.filter(function (_a) {
|
|
@@ -29,7 +29,7 @@ export var stateFlagsSystem = u.system(function (_a) {
|
|
|
29
29
|
u.connect(u.pipe(u.duc(scrollTop), u.map(function (top) { return top === 0; }), u.distinctUntilChanged()), isAtTop);
|
|
30
30
|
u.connect(isAtTop, atTopStateChange);
|
|
31
31
|
var atBottomState = u.streamFromEmitter(u.pipe(u.combineLatest(scrollContainerState, u.duc(viewportHeight), u.duc(headerHeight), u.duc(footerHeight), u.duc(atBottomThreshold)), u.scan(function (current, _a) {
|
|
32
|
-
var _b = __read(_a, 5), _c =
|
|
32
|
+
var _b = __read(_a, 5), _c = _b[0], scrollTop = _c.scrollTop, scrollHeight = _c.scrollHeight, viewportHeight = _b[1], _headerHeight = _b[2], _footerHeight = _b[3], atBottomThreshold = _b[4];
|
|
33
33
|
var isAtBottom = scrollTop + viewportHeight - scrollHeight > -atBottomThreshold;
|
|
34
34
|
var state = {
|
|
35
35
|
viewportHeight: viewportHeight,
|
|
@@ -78,9 +78,10 @@ export var stateFlagsSystem = u.system(function (_a) {
|
|
|
78
78
|
return prev && prev.atBottom === next.atBottom;
|
|
79
79
|
})));
|
|
80
80
|
var lastJumpDueToItemResize = u.statefulStreamFromEmitter(u.pipe(scrollContainerState, u.scan(function (current, _a) {
|
|
81
|
-
var
|
|
81
|
+
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, viewportHeight = _a.viewportHeight;
|
|
82
82
|
if (current.scrollHeight !== scrollHeight) {
|
|
83
|
-
|
|
83
|
+
var atBottom = scrollTop === scrollHeight - viewportHeight;
|
|
84
|
+
if (current.scrollTop !== scrollTop && atBottom) {
|
|
84
85
|
return {
|
|
85
86
|
scrollHeight: scrollHeight,
|
|
86
87
|
scrollTop: scrollTop,
|
|
@@ -106,7 +107,7 @@ export var stateFlagsSystem = u.system(function (_a) {
|
|
|
106
107
|
u.connect(u.pipe(isAtBottom, u.throttleTime(50)), atBottomStateChange);
|
|
107
108
|
var scrollDirection = u.statefulStream(DOWN);
|
|
108
109
|
u.connect(u.pipe(scrollContainerState, u.map(function (_a) {
|
|
109
|
-
var
|
|
110
|
+
var scrollTop = _a.scrollTop;
|
|
110
111
|
return scrollTop;
|
|
111
112
|
}), u.distinctUntilChanged(), u.scan(function (acc, scrollTop) {
|
|
112
113
|
// if things change while compensating for items, ignore,
|
|
@@ -7,6 +7,10 @@ export var totalListHeightSystem = u.system(function (_a) {
|
|
|
7
7
|
var totalListHeightChanged = u.stream();
|
|
8
8
|
var totalListHeight = u.statefulStreamFromEmitter(u.pipe(u.combineLatest(footerHeight, headerHeight, listState), u.map(function (_a) {
|
|
9
9
|
var _b = __read(_a, 3), footerHeight = _b[0], headerHeight = _b[1], listState = _b[2];
|
|
10
|
+
// FIXME: this footerHeight, headerHeight calculate is not correct, should find where to apply totalListHeightSystem
|
|
11
|
+
// console.log('-------- [totalListHeightSystem Log] --------');
|
|
12
|
+
// console.log(footerHeight, headerHeight, listState);
|
|
13
|
+
// console.log('---------------- [Log End] ----------------');
|
|
10
14
|
return (footerHeight +
|
|
11
15
|
headerHeight +
|
|
12
16
|
listState.offsetBottom +
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { __read } from "tslib";
|
|
2
|
-
/* eslint-disable no-continue */
|
|
3
2
|
import * as u from '@virtuoso.dev/urx';
|
|
4
3
|
import { domIOSystem } from './domIOSystem';
|
|
5
4
|
import { listStateSystem } from './listStateSystem';
|
|
@@ -11,49 +10,27 @@ import { stateFlagsSystem, UP } from './stateFlagsSystem';
|
|
|
11
10
|
*/
|
|
12
11
|
export var upwardScrollFixSystem = u.system(function (_a) {
|
|
13
12
|
var _b = __read(_a, 5), _c = _b[0], scrollBy = _c.scrollBy, scrollTop = _c.scrollTop, deviation = _c.deviation, scrollingInProgress = _c.scrollingInProgress, _d = _b[1], isScrolling = _d.isScrolling, isAtBottom = _d.isAtBottom, atBottomState = _d.atBottomState, scrollDirection = _d.scrollDirection, lastJumpDueToItemResize = _d.lastJumpDueToItemResize, listState = _b[2].listState, _e = _b[3], beforeUnshiftWith = _e.beforeUnshiftWith, shiftWithOffset = _e.shiftWithOffset, sizes = _e.sizes, log = _b[4].log;
|
|
14
|
-
var deviationOffset = u.streamFromEmitter(u.pipe(listState, u.withLatestFrom(lastJumpDueToItemResize), u.scan(function (_a,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var _c = __read(_a, 3), prevItems = _c[1], prevTotalCount = _c[2];
|
|
18
|
-
var
|
|
13
|
+
var deviationOffset = u.streamFromEmitter(u.pipe(listState, u.withLatestFrom(lastJumpDueToItemResize), u.scan(function (_a, _b) {
|
|
14
|
+
var _c = __read(_a, 4), prevItems = _c[1], prevTotalCount = _c[2], prevTotalHeight = _c[3];
|
|
15
|
+
var _d = __read(_b, 2),
|
|
19
16
|
// @ts-ignore
|
|
20
|
-
|
|
17
|
+
_e = _d[0], items = _e.items, totalCount = _e.totalCount, bottom = _e.bottom, offsetBottom = _e.offsetBottom, lastJumpDueToItemResize = _d[1];
|
|
18
|
+
var totalHeight = bottom + offsetBottom;
|
|
21
19
|
var newDev = 0;
|
|
22
20
|
if (prevTotalCount === totalCount) {
|
|
23
21
|
if (prevItems.length > 0 && items.length > 0) {
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
var atStart = firstItemIndex === 0 && prevFirstItemIndex === 0;
|
|
27
|
-
var onlyItem = items.length === 1;
|
|
22
|
+
var atStart = items[0].originalIndex === 0 &&
|
|
23
|
+
prevItems[0].originalIndex === 0;
|
|
28
24
|
if (!atStart) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (!prevItem) {
|
|
33
|
-
return "continue";
|
|
34
|
-
}
|
|
35
|
-
if (item.offset !== prevItem.offset || onlyItem) {
|
|
36
|
-
newDev =
|
|
37
|
-
item.offset -
|
|
38
|
-
prevItem.offset +
|
|
39
|
-
item.size -
|
|
40
|
-
prevItem.size;
|
|
41
|
-
return "break";
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
for (var index = items.length - 1; index >= 0; index--) {
|
|
45
|
-
var state_1 = _loop_1(index);
|
|
46
|
-
if (state_1 === "break")
|
|
47
|
-
break;
|
|
25
|
+
newDev = totalHeight - prevTotalHeight;
|
|
26
|
+
if (newDev !== 0) {
|
|
27
|
+
newDev += lastJumpDueToItemResize;
|
|
48
28
|
}
|
|
49
29
|
}
|
|
50
30
|
}
|
|
51
|
-
if (newDev !== 0) {
|
|
52
|
-
newDev += lastJumpDueToItemResize;
|
|
53
|
-
}
|
|
54
31
|
}
|
|
55
|
-
return [newDev, items, totalCount];
|
|
56
|
-
}, [0, [], 0]), u.filter(function (_a) {
|
|
32
|
+
return [newDev, items, totalCount, totalHeight];
|
|
33
|
+
}, [0, [], 0, 0]), u.filter(function (_a) {
|
|
57
34
|
var _b = __read(_a, 1), amount = _b[0];
|
|
58
35
|
return amount !== 0;
|
|
59
36
|
}), u.withLatestFrom(scrollTop, scrollDirection, scrollingInProgress, log, isAtBottom, atBottomState), u.filter(function (_a) {
|
|
@@ -9,8 +9,12 @@ export var windowScrollerSystem = u.system(function (_a) {
|
|
|
9
9
|
var useWindowScroll = u.statefulStream(false);
|
|
10
10
|
var customScrollParent = u.statefulStream(undefined);
|
|
11
11
|
u.connect(u.pipe(u.combineLatest(windowScrollContainerState, windowViewportRect), u.map(function (_a) {
|
|
12
|
-
var _b = __read(_a, 2), _c =
|
|
13
|
-
return
|
|
12
|
+
var _b = __read(_a, 2), _c = _b[0], viewportHeight = _c.viewportHeight, windowScrollTop = _c.scrollTop, scrollHeight = _c.scrollHeight, offsetTop = _b[1].offsetTop;
|
|
13
|
+
return {
|
|
14
|
+
scrollTop: Math.max(0, windowScrollTop - offsetTop),
|
|
15
|
+
scrollHeight: scrollHeight,
|
|
16
|
+
viewportHeight: viewportHeight,
|
|
17
|
+
};
|
|
14
18
|
})), scrollContainerState);
|
|
15
19
|
u.connect(u.pipe(scrollTo, u.withLatestFrom(windowViewportRect), u.map(function (_a) {
|
|
16
20
|
var _b = __read(_a, 2), scrollTo = _b[0], offsetTop = _b[1].offsetTop;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useRef } from 'react';
|
|
2
|
-
import { fixWebKitTransitionStyle } from '../../../foundation';
|
|
3
2
|
/**
|
|
4
3
|
* scroll into current highlight index
|
|
5
4
|
*/
|
|
@@ -105,7 +104,7 @@ export function useHighlightScroll(_a) {
|
|
|
105
104
|
export function modifyVlScrollerStyle(scrollElm, position) {
|
|
106
105
|
if (position === void 0) { position = 'absolute'; }
|
|
107
106
|
if (scrollElm) {
|
|
108
|
-
scrollElm.style.transition =
|
|
107
|
+
scrollElm.style.transition = 'all 1ms cubic-bezier(0.4, 0, 0.2, 1) 0ms';
|
|
109
108
|
if (position) {
|
|
110
109
|
var viewPortElm = scrollElm.firstChild;
|
|
111
110
|
if (viewPortElm) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import { createTheme as createMuiTheme } from '@material-ui/core/styles';
|
|
2
|
+
import { createTheme as createMuiTheme, } from '@material-ui/core/styles';
|
|
3
3
|
import { deepmerge } from '../utils';
|
|
4
4
|
import breakpoints from './assets/breakpoints.json';
|
|
5
5
|
import opacity from './assets/opacity.json';
|
|
@@ -15,7 +15,7 @@ export declare class RcThemeHandler {
|
|
|
15
15
|
setTheme(themeOptions: RcThemeInput, isEmit?: boolean): RcTheme;
|
|
16
16
|
/** Set Theme Name with read static json file */
|
|
17
17
|
setThemeName(name: string): Promise<void>;
|
|
18
|
-
read(theme: string): Promise<import("
|
|
18
|
+
read(theme: string): Promise<import("type-fest/source/partial-deep").PartialObjectDeep<Pick<RcTheme, "direction" | "opacity" | "radius" | "props" | "palette" | "typography" | "shape" | "breakpoints" | "mixins" | "overrides" | "shadows" | "transitions" | "zIndex" | "unstable_strictMode">>>;
|
|
19
19
|
loadUrl(url: string): Promise<RcThemeInput>;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { RcThemeSwitcherProviderProps } from './ThemeContext';
|
|
3
|
-
export declare const RcDefaultDarkTheme: import("
|
|
4
|
-
export declare const RcDefaultHighContrastTheme: import("
|
|
3
|
+
export declare const RcDefaultDarkTheme: import("type-fest/source/partial-deep").PartialObjectDeep<Pick<import("../theme.type").RcTheme, "direction" | "opacity" | "radius" | "props" | "palette" | "typography" | "shape" | "breakpoints" | "mixins" | "overrides" | "shadows" | "transitions" | "zIndex" | "unstable_strictMode">>;
|
|
4
|
+
export declare const RcDefaultHighContrastTheme: import("type-fest/source/partial-deep").PartialObjectDeep<Pick<import("../theme.type").RcTheme, "direction" | "opacity" | "radius" | "props" | "palette" | "typography" | "shape" | "breakpoints" | "mixins" | "overrides" | "shadows" | "transitions" | "zIndex" | "unstable_strictMode">>;
|
|
5
5
|
export declare const RcThemeSwitcherDefaultTheme: {
|
|
6
6
|
defaultTheme: string;
|
|
7
7
|
themeMap: {
|
|
@@ -79,7 +79,7 @@ export declare type RcTheme = {
|
|
|
79
79
|
zIndex: ZIndex;
|
|
80
80
|
shape: Shape;
|
|
81
81
|
breakpoints: Breakpoints;
|
|
82
|
-
} & Omit<MuiTheme, 'palette'> & DefaultTheme & {
|
|
82
|
+
} & Omit<MuiTheme, 'palette' | 'typography'> & DefaultTheme & {
|
|
83
83
|
props?: {
|
|
84
84
|
RcAccordion?: RcAccordionProps;
|
|
85
85
|
RcAccordionDetails?: RcAccordionDetailsProps;
|
|
@@ -213,5 +213,5 @@ export declare type RcThemeProps = {
|
|
|
213
213
|
theme: RcTheme;
|
|
214
214
|
};
|
|
215
215
|
export declare type RcThemedStyled<T = any, K = (themeOptions: RcThemeProps) => any> = (props: ThemedStyledProps<T, RcTheme>) => K;
|
|
216
|
-
export declare type RcThemeInput = DeepPartial<RcTheme
|
|
216
|
+
export declare type RcThemeInput = DeepPartial<Omit<RcTheme, 'spacing'>>;
|
|
217
217
|
export {};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
[P in keyof T]?: T[P] extends Array<infer U> ? Array<DeepPartial<U>> : T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T[P] extends Record<any, any> ? DeepPartial<T[P]> : T[P];
|
|
3
|
-
};
|
|
1
|
+
export type { PartialDeep as DeepPartial } from 'type-fest/source/partial-deep';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { DeepPartial } from '../typings';
|
|
1
2
|
/** deep merge two object */
|
|
2
|
-
declare function deepmerge<T>(x:
|
|
3
|
-
declare function deepmerge<T1, T2>(x:
|
|
3
|
+
declare function deepmerge<T>(x: DeepPartial<T>, y: DeepPartial<T>): T;
|
|
4
|
+
declare function deepmerge<T1, T2>(x: DeepPartial<T1>, y: DeepPartial<T2>): T1 & T2;
|
|
4
5
|
export { deepmerge };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ringcentral/juno",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"author": "RingCentral",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
"focus-visible": "^5.1.0",
|
|
28
28
|
"lodash": "^4.17.21",
|
|
29
29
|
"react-beautiful-dnd": "^13.0.0",
|
|
30
|
-
"react-virtuoso": "^2.
|
|
30
|
+
"react-virtuoso": "^2.10.1",
|
|
31
31
|
"resize-observer-polyfill": "^1.5.1",
|
|
32
32
|
"typeface-lato": "^0.0.75",
|
|
33
|
+
"type-fest": "^2.12.2",
|
|
33
34
|
"tslib": ">=2.0.0"
|
|
34
35
|
},
|
|
35
36
|
"peerDependencies": {
|