@via-profit/ui-kit 0.1.0-rc.81 → 0.1.0-rc.82
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.
|
@@ -67,7 +67,10 @@ const ModalWrapper = props => {
|
|
|
67
67
|
const keyDown = (event) => {
|
|
68
68
|
var _a, _b, _c, _d;
|
|
69
69
|
const key = ((_a = event === null || event === void 0 ? void 0 : event.key) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
|
|
70
|
-
if (key === 'escape' &&
|
|
70
|
+
if (key === 'escape' &&
|
|
71
|
+
closeOnEscape &&
|
|
72
|
+
isOpenProp &&
|
|
73
|
+
TabManager_1.default.isCurrentContainer(containerRef.current)) {
|
|
71
74
|
const portal = window.document.querySelector(`#${context_1.PORTAL_ID}`);
|
|
72
75
|
const lastID = (_d = (_b = portal === null || portal === void 0 ? void 0 : portal.children) === null || _b === void 0 ? void 0 : _b[((_c = portal === null || portal === void 0 ? void 0 : portal.childNodes) === null || _c === void 0 ? void 0 : _c.length) - 1]) === null || _d === void 0 ? void 0 : _d.id;
|
|
73
76
|
if (lastID === id) {
|
|
@@ -8,7 +8,7 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const UnknownFlag_1 = __importDefault(require("./UnknownFlag"));
|
|
9
9
|
const usePhoneUtils = (params) => {
|
|
10
10
|
const { templates } = params;
|
|
11
|
-
const templatesList = templates.concat([
|
|
11
|
+
const templatesList = react_1.default.useMemo(() => templates.concat([
|
|
12
12
|
[
|
|
13
13
|
null,
|
|
14
14
|
react_1.default.createElement(UnknownFlag_1.default, { key: "unknnown" }),
|
|
@@ -17,7 +17,7 @@ const usePhoneUtils = (params) => {
|
|
|
17
17
|
'+7 987 654-32-10',
|
|
18
18
|
/^\+{0,1}.*/,
|
|
19
19
|
],
|
|
20
|
-
]);
|
|
20
|
+
]), [templates]);
|
|
21
21
|
/**
|
|
22
22
|
* Get template info by parset value
|
|
23
23
|
*/
|