@ringcentral/juno 2.11.0 → 2.12.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/Dialer/DialPad/DialPad.js +1 -1
- package/components/Dialer/DialPadButton/DialPadButton.d.ts +3 -1
- package/components/Dialer/DialPadButton/DialPadButton.js +3 -3
- package/components/PortalHost/context/index.d.ts +1 -0
- package/components/PortalHost/context/index.js +1 -0
- package/components/PortalHost/index.d.ts +1 -0
- package/components/PortalHost/index.js +2 -0
- package/es6/components/Dialer/DialPad/DialPad.js +1 -1
- package/es6/components/Dialer/DialPadButton/DialPadButton.js +3 -3
- package/es6/components/PortalHost/context/index.js +1 -0
- package/es6/components/PortalHost/index.js +1 -0
- package/package.json +1 -1
|
@@ -107,7 +107,7 @@ var _RcDialPad = react_1.forwardRef(function (inProps, ref) {
|
|
|
107
107
|
var ariaLabelArr = additionLabel
|
|
108
108
|
? [key, additionLabel]
|
|
109
109
|
: [key];
|
|
110
|
-
return (react_1.default.createElement(DialPadButton_1.RcDialPadButton, tslib_1.__assign({ classes: classes, symbol: symbol, key: key, value: key, onKeyEffect: handleKeyEffect }, getItemProps(index), { "aria-label": ariaLabelArr.join(','), onKeyDown: onKeyFocusedIndexHandle }, (_b = {}, _b[dialButtonKey] = key, _b), getDialPadButtonProps === null || getDialPadButtonProps === void 0 ? void 0 : getDialPadButtonProps(key), (key === '0'
|
|
110
|
+
return (react_1.default.createElement(DialPadButton_1.RcDialPadButton, tslib_1.__assign({ classes: classes, symbol: symbol, key: key, value: key, onKeyEffect: handleKeyEffect, externalWindow: externalWindow }, getItemProps(index), { "aria-label": ariaLabelArr.join(','), onKeyDown: onKeyFocusedIndexHandle }, (_b = {}, _b[dialButtonKey] = key, _b), getDialPadButtonProps === null || getDialPadButtonProps === void 0 ? void 0 : getDialPadButtonProps(key), (key === '0'
|
|
111
111
|
? {
|
|
112
112
|
longPressValue: utils_3.DIALER_PAD_PLUS,
|
|
113
113
|
longPressDelay: longPressDelay,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { RcIconButtonProps } from '../../Buttons';
|
|
2
2
|
import { RcDialPadOnChangeReason } from '../DialPad';
|
|
3
3
|
export declare type RcDialPadButtonProps = {
|
|
4
|
+
/** for custom window */
|
|
5
|
+
externalWindow?: Window;
|
|
4
6
|
/** output value when press */
|
|
5
7
|
value: string;
|
|
6
8
|
/** output value when long press */
|
|
@@ -10,7 +12,7 @@ export declare type RcDialPadButtonProps = {
|
|
|
10
12
|
/** emit effect when trigger number enter */
|
|
11
13
|
onKeyEffect: (value: string, reason: RcDialPadOnChangeReason) => void;
|
|
12
14
|
} & Pick<RcIconButtonProps, 'shouldPersistBg' | 'symbol' | 'classes' | 'tabIndex' | 'onKeyDown' | 'onFocus'>;
|
|
13
|
-
declare const RcDialPadButton: import("styled-components").StyledComponentClass<RcDialPadButtonProps, import("../../../foundation").RcTheme, Pick<RcDialPadButtonProps, "symbol" | "tabIndex" | "onFocus" | "onKeyDown" | "classes" | "value" | "shouldPersistBg" | "longPressValue" | "longPressDelay" | "onKeyEffect"> & {
|
|
15
|
+
declare const RcDialPadButton: import("styled-components").StyledComponentClass<RcDialPadButtonProps, import("../../../foundation").RcTheme, Pick<RcDialPadButtonProps, "symbol" | "tabIndex" | "onFocus" | "onKeyDown" | "classes" | "value" | "shouldPersistBg" | "externalWindow" | "longPressValue" | "longPressDelay" | "onKeyEffect"> & {
|
|
14
16
|
theme?: import("../../../foundation").RcTheme | undefined;
|
|
15
17
|
}>;
|
|
16
18
|
export { RcDialPadButton };
|
|
@@ -6,9 +6,9 @@ var foundation_1 = require("../../../foundation");
|
|
|
6
6
|
var Buttons_1 = require("../../Buttons");
|
|
7
7
|
var styles_1 = require("./styles");
|
|
8
8
|
var _RcDialPadButton = function (props) {
|
|
9
|
-
var value = props.value, longPressValue = props.longPressValue, longPressDelay = props.longPressDelay, onKeyEffect = props.onKeyEffect, rest = tslib_1.__rest(props, ["value", "longPressValue", "longPressDelay", "onKeyEffect"]);
|
|
9
|
+
var value = props.value, longPressValue = props.longPressValue, longPressDelay = props.longPressDelay, onKeyEffect = props.onKeyEffect, _a = props.externalWindow, externalWindow = _a === void 0 ? window : _a, rest = tslib_1.__rest(props, ["value", "longPressValue", "longPressDelay", "onKeyEffect", "externalWindow"]);
|
|
10
10
|
var isPressEvent = typeof longPressDelay === 'number' && typeof longPressValue === 'string';
|
|
11
|
-
var
|
|
11
|
+
var _b = foundation_1.useLongPress({
|
|
12
12
|
onTap: function (e, reason) {
|
|
13
13
|
onKeyEffect(value, reason);
|
|
14
14
|
},
|
|
@@ -17,7 +17,7 @@ var _RcDialPadButton = function (props) {
|
|
|
17
17
|
onKeyEffect(longPressValue, reason);
|
|
18
18
|
}
|
|
19
19
|
: undefined,
|
|
20
|
-
}, rest, { delay: longPressDelay }), ref =
|
|
20
|
+
}, rest, { delay: longPressDelay, externalWindow: externalWindow }), ref = _b.ref, events = tslib_1.__rest(_b, ["ref"]);
|
|
21
21
|
return (react_1.default.createElement(Buttons_1.RcIconButton, tslib_1.__assign({ ref: ref, variant: "round", stretchIcon: true }, rest, events)));
|
|
22
22
|
};
|
|
23
23
|
var RcDialPadButton = foundation_1.styled(_RcDialPadButton)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.buttonWrapperStyle);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./HasPortalParentContext"), exports);
|
|
4
5
|
tslib_1.__exportStar(require("./PortalIDContext"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./PortalManagerContext"), exports);
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./Connectable"), exports);
|
|
5
|
+
var context_1 = require("./context");
|
|
6
|
+
exports.HasPortalParentProvider = context_1.HasPortalParentProvider;
|
|
5
7
|
tslib_1.__exportStar(require("./PortalHost"), exports);
|
|
6
8
|
tslib_1.__exportStar(require("./PortalManager"), exports);
|
|
7
9
|
tslib_1.__exportStar(require("./utils"), exports);
|
|
@@ -105,7 +105,7 @@ var _RcDialPad = forwardRef(function (inProps, ref) {
|
|
|
105
105
|
var ariaLabelArr = additionLabel
|
|
106
106
|
? [key, additionLabel]
|
|
107
107
|
: [key];
|
|
108
|
-
return (React.createElement(RcDialPadButton, __assign({ classes: classes, symbol: symbol, key: key, value: key, onKeyEffect: handleKeyEffect }, getItemProps(index), { "aria-label": ariaLabelArr.join(','), onKeyDown: onKeyFocusedIndexHandle }, (_b = {}, _b[dialButtonKey] = key, _b), getDialPadButtonProps === null || getDialPadButtonProps === void 0 ? void 0 : getDialPadButtonProps(key), (key === '0'
|
|
108
|
+
return (React.createElement(RcDialPadButton, __assign({ classes: classes, symbol: symbol, key: key, value: key, onKeyEffect: handleKeyEffect, externalWindow: externalWindow }, getItemProps(index), { "aria-label": ariaLabelArr.join(','), onKeyDown: onKeyFocusedIndexHandle }, (_b = {}, _b[dialButtonKey] = key, _b), getDialPadButtonProps === null || getDialPadButtonProps === void 0 ? void 0 : getDialPadButtonProps(key), (key === '0'
|
|
109
109
|
? {
|
|
110
110
|
longPressValue: DIALER_PAD_PLUS,
|
|
111
111
|
longPressDelay: longPressDelay,
|
|
@@ -4,9 +4,9 @@ import { styled, useLongPress } from '../../../foundation';
|
|
|
4
4
|
import { RcIconButton } from '../../Buttons';
|
|
5
5
|
import { buttonWrapperStyle } from './styles';
|
|
6
6
|
var _RcDialPadButton = function (props) {
|
|
7
|
-
var value = props.value, longPressValue = props.longPressValue, longPressDelay = props.longPressDelay, onKeyEffect = props.onKeyEffect, rest = __rest(props, ["value", "longPressValue", "longPressDelay", "onKeyEffect"]);
|
|
7
|
+
var value = props.value, longPressValue = props.longPressValue, longPressDelay = props.longPressDelay, onKeyEffect = props.onKeyEffect, _a = props.externalWindow, externalWindow = _a === void 0 ? window : _a, rest = __rest(props, ["value", "longPressValue", "longPressDelay", "onKeyEffect", "externalWindow"]);
|
|
8
8
|
var isPressEvent = typeof longPressDelay === 'number' && typeof longPressValue === 'string';
|
|
9
|
-
var
|
|
9
|
+
var _b = useLongPress({
|
|
10
10
|
onTap: function (e, reason) {
|
|
11
11
|
onKeyEffect(value, reason);
|
|
12
12
|
},
|
|
@@ -15,7 +15,7 @@ var _RcDialPadButton = function (props) {
|
|
|
15
15
|
onKeyEffect(longPressValue, reason);
|
|
16
16
|
}
|
|
17
17
|
: undefined,
|
|
18
|
-
}, rest, { delay: longPressDelay }), ref =
|
|
18
|
+
}, rest, { delay: longPressDelay, externalWindow: externalWindow }), ref = _b.ref, events = __rest(_b, ["ref"]);
|
|
19
19
|
return (React.createElement(RcIconButton, __assign({ ref: ref, variant: "round", stretchIcon: true }, rest, events)));
|
|
20
20
|
};
|
|
21
21
|
var RcDialPadButton = styled(_RcDialPadButton)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), buttonWrapperStyle);
|