@mxtommy/kip 3.0.0-alpha.55 → 3.0.0-alpha.56
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/package.json +1 -1
- package/public/main.js +17 -8
- package/public/main.js.map +1 -1
package/package.json
CHANGED
package/public/main.js
CHANGED
|
@@ -127281,7 +127281,7 @@ var WidgetIframeComponent = class _WidgetIframeComponent extends BaseWidgetCompo
|
|
|
127281
127281
|
this.widgetUrl = this.widgetProperties.config.widgetUrl = config2.widgetUrl;
|
|
127282
127282
|
}
|
|
127283
127283
|
handleIframeGesture = (event) => {
|
|
127284
|
-
if (!event.data || !event.data.gesture)
|
|
127284
|
+
if (!event.data || !event.data.gesture || event.data.instanceId !== this.widgetProperties.uuid)
|
|
127285
127285
|
return;
|
|
127286
127286
|
switch (event.data.gesture) {
|
|
127287
127287
|
case "swipeup":
|
|
@@ -127336,10 +127336,13 @@ var WidgetIframeComponent = class _WidgetIframeComponent extends BaseWidgetCompo
|
|
|
127336
127336
|
}
|
|
127337
127337
|
const script = iframeDocument.createElement("script");
|
|
127338
127338
|
script.textContent = `
|
|
127339
|
-
|
|
127339
|
+
if (!window.hammerInstance) {
|
|
127340
127340
|
const hammer = new Hammer(document.body);
|
|
127341
127341
|
hammer.get('swipe').set({ direction: Hammer.DIRECTION_ALL, velocity: 0.3, threshold: 10, domEvents: true });
|
|
127342
127342
|
hammer.get('press').set({ time: 500 });
|
|
127343
|
+
hammer.get('doubletap').set({ taps: 2 });
|
|
127344
|
+
|
|
127345
|
+
const instanceId = '${this.widgetProperties.uuid}'; // Include the instance ID in the script to prevent multiple listeners
|
|
127343
127346
|
|
|
127344
127347
|
hammer.on('swipeleft', (ev) => {
|
|
127345
127348
|
ev.preventDefault();
|
|
@@ -127356,7 +127359,8 @@ var WidgetIframeComponent = class _WidgetIframeComponent extends BaseWidgetCompo
|
|
|
127356
127359
|
offsetDirection: ev.offsetDirection,
|
|
127357
127360
|
scale: ev.scale,
|
|
127358
127361
|
rotation: ev.rotation,
|
|
127359
|
-
isFinal: ev.isFinal
|
|
127362
|
+
isFinal: ev.isFinal,
|
|
127363
|
+
instanceId: instanceId // Include the instance ID in the event data
|
|
127360
127364
|
};
|
|
127361
127365
|
window.parent.postMessage({ gesture: 'swipeleft', eventData: eventData }, '*');
|
|
127362
127366
|
});
|
|
@@ -127376,7 +127380,8 @@ var WidgetIframeComponent = class _WidgetIframeComponent extends BaseWidgetCompo
|
|
|
127376
127380
|
offsetDirection: ev.offsetDirection,
|
|
127377
127381
|
scale: ev.scale,
|
|
127378
127382
|
rotation: ev.rotation,
|
|
127379
|
-
isFinal: ev.isFinal
|
|
127383
|
+
isFinal: ev.isFinal,
|
|
127384
|
+
instanceId: instanceId // Include the instance ID in the event data
|
|
127380
127385
|
};
|
|
127381
127386
|
window.parent.postMessage({ gesture: 'swiperight', eventData: eventData }, '*');
|
|
127382
127387
|
});
|
|
@@ -127396,7 +127401,8 @@ var WidgetIframeComponent = class _WidgetIframeComponent extends BaseWidgetCompo
|
|
|
127396
127401
|
offsetDirection: ev.offsetDirection,
|
|
127397
127402
|
scale: ev.scale,
|
|
127398
127403
|
rotation: ev.rotation,
|
|
127399
|
-
isFinal: ev.isFinal
|
|
127404
|
+
isFinal: ev.isFinal,
|
|
127405
|
+
instanceId: instanceId // Include the instance ID in the event data
|
|
127400
127406
|
};
|
|
127401
127407
|
window.parent.postMessage({ gesture: 'swipeup', eventData: eventData }, '*');
|
|
127402
127408
|
});
|
|
@@ -127416,7 +127422,8 @@ var WidgetIframeComponent = class _WidgetIframeComponent extends BaseWidgetCompo
|
|
|
127416
127422
|
offsetDirection: ev.offsetDirection,
|
|
127417
127423
|
scale: ev.scale,
|
|
127418
127424
|
rotation: ev.rotation,
|
|
127419
|
-
isFinal: ev.isFinal
|
|
127425
|
+
isFinal: ev.isFinal,
|
|
127426
|
+
instanceId: instanceId // Include the instance ID in the event data
|
|
127420
127427
|
};
|
|
127421
127428
|
window.parent.postMessage({ gesture: 'swipedown', eventData: eventData }, '*');
|
|
127422
127429
|
});
|
|
@@ -127436,7 +127443,8 @@ var WidgetIframeComponent = class _WidgetIframeComponent extends BaseWidgetCompo
|
|
|
127436
127443
|
offsetDirection: ev.offsetDirection,
|
|
127437
127444
|
scale: ev.scale,
|
|
127438
127445
|
rotation: ev.rotation,
|
|
127439
|
-
isFinal: ev.isFinal
|
|
127446
|
+
isFinal: ev.isFinal,
|
|
127447
|
+
instanceId: instanceId // Include the instance ID in the event data
|
|
127440
127448
|
};
|
|
127441
127449
|
window.parent.postMessage({ gesture: 'press', eventData: eventData }, '*');
|
|
127442
127450
|
});
|
|
@@ -127456,7 +127464,8 @@ var WidgetIframeComponent = class _WidgetIframeComponent extends BaseWidgetCompo
|
|
|
127456
127464
|
offsetDirection: ev.offsetDirection,
|
|
127457
127465
|
scale: ev.scale,
|
|
127458
127466
|
rotation: ev.rotation,
|
|
127459
|
-
isFinal: ev.isFinal
|
|
127467
|
+
isFinal: ev.isFinal,
|
|
127468
|
+
instanceId: instanceId // Include the instance ID in the event data
|
|
127460
127469
|
};
|
|
127461
127470
|
window.parent.postMessage({ gesture: 'doubletap', eventData: eventData }, '*');
|
|
127462
127471
|
});
|