@ringcentral/juno 2.12.0 → 2.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@ var _RcDialog = react_1.forwardRef(function (inProps, ref) {
22
22
  },
23
23
  ]);
24
24
  }
25
- var classesProp = props.classes, _a = props.size, size = _a === void 0 ? 'medium' : _a, maxWidthProp = props.maxWidth, _b = props.fullWidth, fullWidth = _b === void 0 ? true : _b, childrenSize = props.childrenSize, children = props.children, TransitionPropsProp = props.TransitionProps, rest = tslib_1.__rest(props, ["classes", "size", "maxWidth", "fullWidth", "childrenSize", "children", "TransitionProps"]);
25
+ var classesProp = props.classes, _a = props.size, size = _a === void 0 ? 'medium' : _a, maxWidthProp = props.maxWidth, _b = props.fullWidth, fullWidth = _b === void 0 ? true : _b, childrenSize = props.childrenSize, children = props.children, TransitionPropsProp = props.TransitionProps, PaperPropsProp = props.PaperProps, rest = tslib_1.__rest(props, ["classes", "size", "maxWidth", "fullWidth", "childrenSize", "children", "TransitionProps", "PaperProps"]);
26
26
  var classes = react_1.useMemo(function () { return foundation_1.combineClasses(utils_1.RcDialogClasses, classesProp); }, [classesProp]);
27
27
  var externalWindow = foundation_1.useRcPortalWindowContext().externalWindow;
28
28
  var maxWidth = react_1.useMemo(function () {
@@ -46,8 +46,9 @@ var _RcDialog = react_1.forwardRef(function (inProps, ref) {
46
46
  var TransitionProps = tslib_1.__assign(tslib_1.__assign({
47
47
  // TODO: remove after upgrade to mui v5
48
48
  role: 'presentation' }, TransitionPropsProp), { onExited: onExited });
49
+ var PaperProps = tslib_1.__assign({ 'aria-modal': true }, PaperPropsProp);
49
50
  return (react_1.default.createElement(HasPortalParentContext_1.HasPortalParentProvider, null,
50
- react_1.default.createElement(Dialog_1.default, tslib_1.__assign({ ref: ref, fullWidth: fullWidth, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, maxWidth: maxWidth, fullScreen: size === 'fullScreen' ? true : undefined, classes: classes, TransitionProps: TransitionProps }, rest),
51
+ react_1.default.createElement(Dialog_1.default, tslib_1.__assign({ ref: ref, fullWidth: fullWidth, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, maxWidth: maxWidth, fullScreen: size === 'fullScreen' ? true : undefined, classes: classes, TransitionProps: TransitionProps, PaperProps: PaperProps }, rest),
51
52
  react_1.default.createElement(DialogContext_1.RcDialogContext.Provider, { value: contextValue }, children))));
52
53
  });
53
54
  var RcDialog = foundation_1.styled(_RcDialog)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.DialogStyle);
@@ -222,6 +222,7 @@ var PortalManager = /** @class */ (function (_super) {
222
222
  },
223
223
  onUnmounted: function () {
224
224
  var feedback = _this._feedbackMap.get(id);
225
+ _this._feedbackMap.delete(id);
225
226
  resolveOnClosed(feedback);
226
227
  },
227
228
  props: props,
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
+ // TODO: framer still not have flushSync in there framer version, skip that temporarily
3
+ // import { flushSync } from 'react-dom';
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var react_dom_1 = require("react-dom");
4
- function conditionalFlushSync(flag) {
5
- return flag ? react_dom_1.flushSync : function (cb) { return cb(); };
5
+ function conditionalFlushSync(
6
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
7
+ flag) {
8
+ // return flag ? flushSync : (cb: () => void) => cb();
9
+ return function (cb) { return cb(); };
6
10
  }
7
11
  exports.default = conditionalFlushSync;
@@ -19,7 +19,7 @@ var _RcDialog = forwardRef(function (inProps, ref) {
19
19
  },
20
20
  ]);
21
21
  }
22
- var classesProp = props.classes, _a = props.size, size = _a === void 0 ? 'medium' : _a, maxWidthProp = props.maxWidth, _b = props.fullWidth, fullWidth = _b === void 0 ? true : _b, childrenSize = props.childrenSize, children = props.children, TransitionPropsProp = props.TransitionProps, rest = __rest(props, ["classes", "size", "maxWidth", "fullWidth", "childrenSize", "children", "TransitionProps"]);
22
+ var classesProp = props.classes, _a = props.size, size = _a === void 0 ? 'medium' : _a, maxWidthProp = props.maxWidth, _b = props.fullWidth, fullWidth = _b === void 0 ? true : _b, childrenSize = props.childrenSize, children = props.children, TransitionPropsProp = props.TransitionProps, PaperPropsProp = props.PaperProps, rest = __rest(props, ["classes", "size", "maxWidth", "fullWidth", "childrenSize", "children", "TransitionProps", "PaperProps"]);
23
23
  var classes = useMemo(function () { return combineClasses(RcDialogClasses, classesProp); }, [classesProp]);
24
24
  var externalWindow = useRcPortalWindowContext().externalWindow;
25
25
  var maxWidth = useMemo(function () {
@@ -43,8 +43,9 @@ var _RcDialog = forwardRef(function (inProps, ref) {
43
43
  var TransitionProps = __assign(__assign({
44
44
  // TODO: remove after upgrade to mui v5
45
45
  role: 'presentation' }, TransitionPropsProp), { onExited: onExited });
46
+ var PaperProps = __assign({ 'aria-modal': true }, PaperPropsProp);
46
47
  return (React.createElement(HasPortalParentProvider, null,
47
- React.createElement(MuiDialog, __assign({ ref: ref, fullWidth: fullWidth, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, maxWidth: maxWidth, fullScreen: size === 'fullScreen' ? true : undefined, classes: classes, TransitionProps: TransitionProps }, rest),
48
+ React.createElement(MuiDialog, __assign({ ref: ref, fullWidth: fullWidth, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, maxWidth: maxWidth, fullScreen: size === 'fullScreen' ? true : undefined, classes: classes, TransitionProps: TransitionProps, PaperProps: PaperProps }, rest),
48
49
  React.createElement(RcDialogContext.Provider, { value: contextValue }, children))));
49
50
  });
50
51
  var RcDialog = styled(_RcDialog)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), DialogStyle);
@@ -220,6 +220,7 @@ var PortalManager = /** @class */ (function (_super) {
220
220
  },
221
221
  onUnmounted: function () {
222
222
  var feedback = _this._feedbackMap.get(id);
223
+ _this._feedbackMap.delete(id);
223
224
  resolveOnClosed(feedback);
224
225
  },
225
226
  props: props,
@@ -1,4 +1,8 @@
1
- import { flushSync } from 'react-dom';
2
- export default function conditionalFlushSync(flag) {
3
- return flag ? flushSync : function (cb) { return cb(); };
1
+ // TODO: framer still not have flushSync in there framer version, skip that temporarily
2
+ // import { flushSync } from 'react-dom';
3
+ export default function conditionalFlushSync(
4
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+ flag) {
6
+ // return flag ? flushSync : (cb: () => void) => cb();
7
+ return function (cb) { return cb(); };
4
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ringcentral/juno",
3
- "version": "2.12.0",
3
+ "version": "2.12.3",
4
4
  "author": "RingCentral",
5
5
  "license": "MIT",
6
6
  "main": "./index.js",