@micromag/screen-keypad 0.3.766 → 0.3.769
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/es/index.js +11 -8
- package/package.json +18 -18
package/es/index.js
CHANGED
|
@@ -322,11 +322,14 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
322
322
|
});
|
|
323
323
|
}, [setPopup, setShowPopup, trackScreenEvent, openWebView, isNotInteractive]);
|
|
324
324
|
var onCloseModal = useCallback(function () {
|
|
325
|
+
var isShowPopup = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
325
326
|
if (isNotInteractive) {
|
|
326
327
|
return;
|
|
327
328
|
}
|
|
329
|
+
if (isShowPopup) {
|
|
330
|
+
trackScreenEvent('close_modal');
|
|
331
|
+
}
|
|
328
332
|
setShowPopup(false);
|
|
329
|
-
trackScreenEvent('close_modal');
|
|
330
333
|
}, [setShowPopup, trackScreenEvent, isNotInteractive]);
|
|
331
334
|
var onClickClose = useCallback(function (e) {
|
|
332
335
|
if (isNotInteractive) {
|
|
@@ -334,8 +337,8 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
334
337
|
}
|
|
335
338
|
e.preventDefault();
|
|
336
339
|
e.stopPropagation();
|
|
337
|
-
onCloseModal();
|
|
338
|
-
}, [onCloseModal, isNotInteractive]);
|
|
340
|
+
onCloseModal(showPopup);
|
|
341
|
+
}, [onCloseModal, isNotInteractive, showPopup]);
|
|
339
342
|
var onClickCta = useCallback(function () {
|
|
340
343
|
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
341
344
|
if (e !== null) {
|
|
@@ -372,7 +375,7 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
372
375
|
}
|
|
373
376
|
if (!dragActive) {
|
|
374
377
|
if (reachedThreshold) {
|
|
375
|
-
onCloseModal();
|
|
378
|
+
onCloseModal(true);
|
|
376
379
|
return 1;
|
|
377
380
|
}
|
|
378
381
|
return 0;
|
|
@@ -391,7 +394,7 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
391
394
|
if (!current && isView || popupInnerRef.current && !popupInnerRef.current.contains(e.target) && containerRef.current && containerRef.current.contains(e.target) && !isInteractivePreview && !isEdit && showPopup) {
|
|
392
395
|
e.preventDefault();
|
|
393
396
|
e.stopPropagation();
|
|
394
|
-
onCloseModal();
|
|
397
|
+
onCloseModal(showPopup);
|
|
395
398
|
}
|
|
396
399
|
}
|
|
397
400
|
document.addEventListener('mouseup', handleClickOutside);
|
|
@@ -410,8 +413,8 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
410
413
|
setPopupDragDisabled(true);
|
|
411
414
|
}, [setPopupDragDisabled]);
|
|
412
415
|
var onTap = useCallback(function () {
|
|
413
|
-
onCloseModal();
|
|
414
|
-
}, [onCloseModal]);
|
|
416
|
+
onCloseModal(showPopup);
|
|
417
|
+
}, [onCloseModal, showPopup]);
|
|
415
418
|
var _useDragProgress = useDragProgress({
|
|
416
419
|
disabled: !isView || popupDragDisabled,
|
|
417
420
|
progress: showPopup ? 0 : 1,
|
|
@@ -435,7 +438,7 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
435
438
|
var keyup = function keyup(e) {
|
|
436
439
|
if (e.key === 'Escape') {
|
|
437
440
|
if (showPopup) {
|
|
438
|
-
onCloseModal();
|
|
441
|
+
onCloseModal(showPopup);
|
|
439
442
|
}
|
|
440
443
|
}
|
|
441
444
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-keypad",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.769",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -65,22 +65,22 @@
|
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@babel/runtime": "^7.13.10",
|
|
68
|
-
"@micromag/core": "^0.3.
|
|
69
|
-
"@micromag/element-background": "^0.3.
|
|
70
|
-
"@micromag/element-button": "^0.3.
|
|
71
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
72
|
-
"@micromag/element-container": "^0.3.
|
|
73
|
-
"@micromag/element-footer": "^0.3.
|
|
74
|
-
"@micromag/element-grid": "^0.3.
|
|
75
|
-
"@micromag/element-header": "^0.3.
|
|
76
|
-
"@micromag/element-heading": "^0.3.
|
|
77
|
-
"@micromag/element-keypad": "^0.3.
|
|
78
|
-
"@micromag/element-layout": "^0.3.
|
|
79
|
-
"@micromag/element-scroll": "^0.3.
|
|
80
|
-
"@micromag/element-text": "^0.3.
|
|
81
|
-
"@micromag/element-urbania-author": "^0.3.
|
|
82
|
-
"@micromag/element-visual": "^0.3.
|
|
83
|
-
"@micromag/transforms": "^0.3.
|
|
68
|
+
"@micromag/core": "^0.3.769",
|
|
69
|
+
"@micromag/element-background": "^0.3.769",
|
|
70
|
+
"@micromag/element-button": "^0.3.769",
|
|
71
|
+
"@micromag/element-call-to-action": "^0.3.769",
|
|
72
|
+
"@micromag/element-container": "^0.3.769",
|
|
73
|
+
"@micromag/element-footer": "^0.3.769",
|
|
74
|
+
"@micromag/element-grid": "^0.3.769",
|
|
75
|
+
"@micromag/element-header": "^0.3.769",
|
|
76
|
+
"@micromag/element-heading": "^0.3.769",
|
|
77
|
+
"@micromag/element-keypad": "^0.3.769",
|
|
78
|
+
"@micromag/element-layout": "^0.3.769",
|
|
79
|
+
"@micromag/element-scroll": "^0.3.769",
|
|
80
|
+
"@micromag/element-text": "^0.3.769",
|
|
81
|
+
"@micromag/element-urbania-author": "^0.3.769",
|
|
82
|
+
"@micromag/element-visual": "^0.3.769",
|
|
83
|
+
"@micromag/transforms": "^0.3.769",
|
|
84
84
|
"@react-spring/core": "^9.6.1",
|
|
85
85
|
"@react-spring/web": "^9.6.1",
|
|
86
86
|
"@use-gesture/react": "^10.3.0",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"access": "public",
|
|
96
96
|
"registry": "https://registry.npmjs.org/"
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "a009106ec28c6e34288f0b3292f1bc6826812dd0"
|
|
99
99
|
}
|