@apps-in-toss/web-framework 0.0.38 → 0.0.40
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.
|
@@ -157289,50 +157289,54 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157289
157289
|
var global2 = getAppsInTossGlobals();
|
|
157290
157290
|
var partner = (0, import_react_native20.usePartnerNavigation)();
|
|
157291
157291
|
var disableTextSelectionCSS = "\n (function() {\n const style = document.createElement('style');\n style.textContent = '*:not(input):not(textarea) { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }';\n document.head.appendChild(style);\n })();\n ";
|
|
157292
|
+
var _ref46 = (0, import_react10.useState)(props.allowsBackForwardNavigationGestures),
|
|
157293
|
+
_ref47 = _slicedToArray(_ref46, 2),
|
|
157294
|
+
allowsBackForwardNavigationGestures = _ref47[0],
|
|
157295
|
+
setAllowsBackForwardNavigationGestures = _ref47[1];
|
|
157292
157296
|
var handler = useBridgeHandler({
|
|
157293
157297
|
onMessage: onMessage,
|
|
157294
157298
|
injectedJavaScript: [disableTextSelectionCSS].join("\n"),
|
|
157295
157299
|
eventListenerMap: _objectSpread(_objectSpread({}, event_bridges_exports), {}, {
|
|
157296
|
-
navigationAccessoryEvent: function navigationAccessoryEvent(
|
|
157297
|
-
var onEvent =
|
|
157298
|
-
onError =
|
|
157300
|
+
navigationAccessoryEvent: function navigationAccessoryEvent(_ref48) {
|
|
157301
|
+
var onEvent = _ref48.onEvent,
|
|
157302
|
+
onError = _ref48.onError;
|
|
157299
157303
|
return import_react_native20.tdsEvent.addEventListener("navigationAccessoryEvent", {
|
|
157300
157304
|
onEvent: onEvent,
|
|
157301
157305
|
onError: onError
|
|
157302
157306
|
});
|
|
157303
157307
|
},
|
|
157304
|
-
backEvent: function backEvent(
|
|
157305
|
-
var onEvent =
|
|
157306
|
-
onError =
|
|
157307
|
-
options =
|
|
157308
|
+
backEvent: function backEvent(_ref49) {
|
|
157309
|
+
var onEvent = _ref49.onEvent,
|
|
157310
|
+
onError = _ref49.onError,
|
|
157311
|
+
options = _ref49.options;
|
|
157308
157312
|
return bedrockEvent.addEventListener("backEvent", {
|
|
157309
157313
|
onEvent: onEvent,
|
|
157310
157314
|
onError: onError,
|
|
157311
157315
|
options: options
|
|
157312
157316
|
});
|
|
157313
157317
|
},
|
|
157314
|
-
entryMessageExited: function entryMessageExited(
|
|
157315
|
-
var onEvent =
|
|
157316
|
-
onError =
|
|
157318
|
+
entryMessageExited: function entryMessageExited(_ref50) {
|
|
157319
|
+
var onEvent = _ref50.onEvent,
|
|
157320
|
+
onError = _ref50.onError;
|
|
157317
157321
|
return _appsInTossEvent.addEventListener("entryMessageExited", {
|
|
157318
157322
|
onEvent: onEvent,
|
|
157319
157323
|
onError: onError
|
|
157320
157324
|
});
|
|
157321
157325
|
},
|
|
157322
|
-
updateLocationEvent: function updateLocationEvent(
|
|
157323
|
-
var onEvent =
|
|
157324
|
-
onError =
|
|
157325
|
-
options =
|
|
157326
|
+
updateLocationEvent: function updateLocationEvent(_ref51) {
|
|
157327
|
+
var onEvent = _ref51.onEvent,
|
|
157328
|
+
onError = _ref51.onError,
|
|
157329
|
+
options = _ref51.options;
|
|
157326
157330
|
return _appsInTossEvent.addEventListener("updateLocationEvent", {
|
|
157327
157331
|
onEvent: onEvent,
|
|
157328
157332
|
onError: onError,
|
|
157329
157333
|
options: options
|
|
157330
157334
|
});
|
|
157331
157335
|
},
|
|
157332
|
-
appBridgeCallbackEvent: function appBridgeCallbackEvent(
|
|
157333
|
-
var onEvent =
|
|
157334
|
-
onError =
|
|
157335
|
-
options =
|
|
157336
|
+
appBridgeCallbackEvent: function appBridgeCallbackEvent(_ref52) {
|
|
157337
|
+
var onEvent = _ref52.onEvent,
|
|
157338
|
+
onError = _ref52.onError,
|
|
157339
|
+
options = _ref52.options;
|
|
157336
157340
|
return _appsInTossEvent.addEventListener("appBridgeCallbackEvent", {
|
|
157337
157341
|
onEvent: onEvent,
|
|
157338
157342
|
onError: onError,
|
|
@@ -157351,10 +157355,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157351
157355
|
getSafeAreaBottom: function getSafeAreaBottom() {
|
|
157352
157356
|
return bottom;
|
|
157353
157357
|
}
|
|
157354
|
-
}, Object.fromEntries(Object.entries(global2).map(function (
|
|
157355
|
-
var
|
|
157356
|
-
key =
|
|
157357
|
-
value =
|
|
157358
|
+
}, Object.fromEntries(Object.entries(global2).map(function (_ref53) {
|
|
157359
|
+
var _ref54 = _slicedToArray(_ref53, 2),
|
|
157360
|
+
key = _ref54[0],
|
|
157361
|
+
value = _ref54[1];
|
|
157358
157362
|
return [key, function () {
|
|
157359
157363
|
return value;
|
|
157360
157364
|
}];
|
|
@@ -157366,6 +157370,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157366
157370
|
getDeploymentId: _env.getDeploymentId
|
|
157367
157371
|
}),
|
|
157368
157372
|
asyncHandlerMap: _objectSpread(_objectSpread(_objectSpread({}, bedrockAsyncBridges), async_bridges_exports), {}, {
|
|
157373
|
+
setIosSwipeGestureEnabled: function setIosSwipeGestureEnabled(options) {
|
|
157374
|
+
setAllowsBackForwardNavigationGestures(options.isEnabled);
|
|
157375
|
+
return bedrockAsyncBridges.setIosSwipeGestureEnabled(options);
|
|
157376
|
+
},
|
|
157369
157377
|
addAccessoryButton: function () {
|
|
157370
157378
|
var _addAccessoryButton = _asyncToGenerator(_regeneratorRuntime().mark(function _callee9(params) {
|
|
157371
157379
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
@@ -157439,10 +157447,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157439
157447
|
}, [type, props]);
|
|
157440
157448
|
var BaseWebView = WEBVIEW_TYPES[type];
|
|
157441
157449
|
var webViewDebuggingEnabled = operationalEnvironment === "sandbox";
|
|
157442
|
-
var
|
|
157443
|
-
|
|
157444
|
-
canHistoryGoBack =
|
|
157445
|
-
setCanHistoryGoBack =
|
|
157450
|
+
var _ref55 = (0, import_react10.useState)(false),
|
|
157451
|
+
_ref56 = _slicedToArray(_ref55, 2),
|
|
157452
|
+
canHistoryGoBack = _ref56[0],
|
|
157453
|
+
setCanHistoryGoBack = _ref56[1];
|
|
157446
157454
|
var handleNavigationStateChange = (0, import_react10.useCallback)(function (event) {
|
|
157447
157455
|
if (event.url) {
|
|
157448
157456
|
trackScreen(event.url);
|
|
@@ -157452,21 +157460,21 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157452
157460
|
var userAgent = _useCreateUserAgent({
|
|
157453
157461
|
colorPreference: "light"
|
|
157454
157462
|
});
|
|
157455
|
-
var backEvent = (0, import_react_native_bedrock18.useBackEvent)();
|
|
157456
157463
|
var handleBackEvent = (0, import_react10.useCallback)(function () {
|
|
157457
157464
|
if (canHistoryGoBack) {
|
|
157458
157465
|
var _handler$ref$current;
|
|
157459
157466
|
(_handler$ref$current = handler.ref.current) === null || _handler$ref$current === void 0 || _handler$ref$current.goBack();
|
|
157467
|
+
return true;
|
|
157460
157468
|
} else {
|
|
157461
|
-
|
|
157469
|
+
return false;
|
|
157462
157470
|
}
|
|
157463
157471
|
}, [canHistoryGoBack, handler]);
|
|
157464
157472
|
(0, import_react10.useEffect)(function () {
|
|
157465
|
-
|
|
157473
|
+
import_react_native21.BackHandler.addEventListener("hardwareBackPress", handleBackEvent);
|
|
157466
157474
|
return function () {
|
|
157467
|
-
return
|
|
157475
|
+
return import_react_native21.BackHandler.removeEventListener("hardwareBackPress", handleBackEvent);
|
|
157468
157476
|
};
|
|
157469
|
-
}, [
|
|
157477
|
+
}, [handleBackEvent]);
|
|
157470
157478
|
return (0, import_jsx_runtime7.jsx)(BaseWebView, _objectSpread(_objectSpread(_objectSpread({
|
|
157471
157479
|
ref: handler.ref
|
|
157472
157480
|
}, props), baseProps), {}, {
|
|
@@ -157484,7 +157492,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157484
157492
|
onNavigationStateChange: handleNavigationStateChange,
|
|
157485
157493
|
injectedJavaScript: handler.injectedJavaScript,
|
|
157486
157494
|
injectedJavaScriptBeforeContentLoaded: handler.injectedJavaScript,
|
|
157487
|
-
decelerationRate: import_react_native21.Platform.OS === "ios" ? 1 : void 0
|
|
157495
|
+
decelerationRate: import_react_native21.Platform.OS === "ios" ? 1 : void 0,
|
|
157496
|
+
allowsBackForwardNavigationGestures: allowsBackForwardNavigationGestures
|
|
157488
157497
|
}));
|
|
157489
157498
|
}
|
|
157490
157499
|
function ensureValue(value, name) {
|
package/dist/prebuilt/dev.ios.js
CHANGED
|
@@ -157078,50 +157078,54 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157078
157078
|
var global2 = getAppsInTossGlobals();
|
|
157079
157079
|
var partner = (0, import_react_native20.usePartnerNavigation)();
|
|
157080
157080
|
var disableTextSelectionCSS = "\n (function() {\n const style = document.createElement('style');\n style.textContent = '*:not(input):not(textarea) { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }';\n document.head.appendChild(style);\n })();\n ";
|
|
157081
|
+
var _ref46 = (0, import_react10.useState)(props.allowsBackForwardNavigationGestures),
|
|
157082
|
+
_ref47 = _slicedToArray(_ref46, 2),
|
|
157083
|
+
allowsBackForwardNavigationGestures = _ref47[0],
|
|
157084
|
+
setAllowsBackForwardNavigationGestures = _ref47[1];
|
|
157081
157085
|
var handler = useBridgeHandler({
|
|
157082
157086
|
onMessage: onMessage,
|
|
157083
157087
|
injectedJavaScript: [disableTextSelectionCSS].join("\n"),
|
|
157084
157088
|
eventListenerMap: _objectSpread(_objectSpread({}, event_bridges_exports), {}, {
|
|
157085
|
-
navigationAccessoryEvent: function navigationAccessoryEvent(
|
|
157086
|
-
var onEvent =
|
|
157087
|
-
onError =
|
|
157089
|
+
navigationAccessoryEvent: function navigationAccessoryEvent(_ref48) {
|
|
157090
|
+
var onEvent = _ref48.onEvent,
|
|
157091
|
+
onError = _ref48.onError;
|
|
157088
157092
|
return import_react_native20.tdsEvent.addEventListener("navigationAccessoryEvent", {
|
|
157089
157093
|
onEvent: onEvent,
|
|
157090
157094
|
onError: onError
|
|
157091
157095
|
});
|
|
157092
157096
|
},
|
|
157093
|
-
backEvent: function backEvent(
|
|
157094
|
-
var onEvent =
|
|
157095
|
-
onError =
|
|
157096
|
-
options =
|
|
157097
|
+
backEvent: function backEvent(_ref49) {
|
|
157098
|
+
var onEvent = _ref49.onEvent,
|
|
157099
|
+
onError = _ref49.onError,
|
|
157100
|
+
options = _ref49.options;
|
|
157097
157101
|
return bedrockEvent.addEventListener("backEvent", {
|
|
157098
157102
|
onEvent: onEvent,
|
|
157099
157103
|
onError: onError,
|
|
157100
157104
|
options: options
|
|
157101
157105
|
});
|
|
157102
157106
|
},
|
|
157103
|
-
entryMessageExited: function entryMessageExited(
|
|
157104
|
-
var onEvent =
|
|
157105
|
-
onError =
|
|
157107
|
+
entryMessageExited: function entryMessageExited(_ref50) {
|
|
157108
|
+
var onEvent = _ref50.onEvent,
|
|
157109
|
+
onError = _ref50.onError;
|
|
157106
157110
|
return _appsInTossEvent.addEventListener("entryMessageExited", {
|
|
157107
157111
|
onEvent: onEvent,
|
|
157108
157112
|
onError: onError
|
|
157109
157113
|
});
|
|
157110
157114
|
},
|
|
157111
|
-
updateLocationEvent: function updateLocationEvent(
|
|
157112
|
-
var onEvent =
|
|
157113
|
-
onError =
|
|
157114
|
-
options =
|
|
157115
|
+
updateLocationEvent: function updateLocationEvent(_ref51) {
|
|
157116
|
+
var onEvent = _ref51.onEvent,
|
|
157117
|
+
onError = _ref51.onError,
|
|
157118
|
+
options = _ref51.options;
|
|
157115
157119
|
return _appsInTossEvent.addEventListener("updateLocationEvent", {
|
|
157116
157120
|
onEvent: onEvent,
|
|
157117
157121
|
onError: onError,
|
|
157118
157122
|
options: options
|
|
157119
157123
|
});
|
|
157120
157124
|
},
|
|
157121
|
-
appBridgeCallbackEvent: function appBridgeCallbackEvent(
|
|
157122
|
-
var onEvent =
|
|
157123
|
-
onError =
|
|
157124
|
-
options =
|
|
157125
|
+
appBridgeCallbackEvent: function appBridgeCallbackEvent(_ref52) {
|
|
157126
|
+
var onEvent = _ref52.onEvent,
|
|
157127
|
+
onError = _ref52.onError,
|
|
157128
|
+
options = _ref52.options;
|
|
157125
157129
|
return _appsInTossEvent.addEventListener("appBridgeCallbackEvent", {
|
|
157126
157130
|
onEvent: onEvent,
|
|
157127
157131
|
onError: onError,
|
|
@@ -157140,10 +157144,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157140
157144
|
getSafeAreaBottom: function getSafeAreaBottom() {
|
|
157141
157145
|
return bottom;
|
|
157142
157146
|
}
|
|
157143
|
-
}, Object.fromEntries(Object.entries(global2).map(function (
|
|
157144
|
-
var
|
|
157145
|
-
key =
|
|
157146
|
-
value =
|
|
157147
|
+
}, Object.fromEntries(Object.entries(global2).map(function (_ref53) {
|
|
157148
|
+
var _ref54 = _slicedToArray(_ref53, 2),
|
|
157149
|
+
key = _ref54[0],
|
|
157150
|
+
value = _ref54[1];
|
|
157147
157151
|
return [key, function () {
|
|
157148
157152
|
return value;
|
|
157149
157153
|
}];
|
|
@@ -157155,6 +157159,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157155
157159
|
getDeploymentId: _env.getDeploymentId
|
|
157156
157160
|
}),
|
|
157157
157161
|
asyncHandlerMap: _objectSpread(_objectSpread(_objectSpread({}, bedrockAsyncBridges), async_bridges_exports), {}, {
|
|
157162
|
+
setIosSwipeGestureEnabled: function setIosSwipeGestureEnabled(options) {
|
|
157163
|
+
setAllowsBackForwardNavigationGestures(options.isEnabled);
|
|
157164
|
+
return bedrockAsyncBridges.setIosSwipeGestureEnabled(options);
|
|
157165
|
+
},
|
|
157158
157166
|
addAccessoryButton: function () {
|
|
157159
157167
|
var _addAccessoryButton = _asyncToGenerator(_regeneratorRuntime().mark(function _callee9(params) {
|
|
157160
157168
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
@@ -157228,10 +157236,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157228
157236
|
}, [type, props]);
|
|
157229
157237
|
var BaseWebView = WEBVIEW_TYPES[type];
|
|
157230
157238
|
var webViewDebuggingEnabled = operationalEnvironment === "sandbox";
|
|
157231
|
-
var
|
|
157232
|
-
|
|
157233
|
-
canHistoryGoBack =
|
|
157234
|
-
setCanHistoryGoBack =
|
|
157239
|
+
var _ref55 = (0, import_react10.useState)(false),
|
|
157240
|
+
_ref56 = _slicedToArray(_ref55, 2),
|
|
157241
|
+
canHistoryGoBack = _ref56[0],
|
|
157242
|
+
setCanHistoryGoBack = _ref56[1];
|
|
157235
157243
|
var handleNavigationStateChange = (0, import_react10.useCallback)(function (event) {
|
|
157236
157244
|
if (event.url) {
|
|
157237
157245
|
trackScreen(event.url);
|
|
@@ -157241,21 +157249,21 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157241
157249
|
var userAgent = _useCreateUserAgent({
|
|
157242
157250
|
colorPreference: "light"
|
|
157243
157251
|
});
|
|
157244
|
-
var backEvent = (0, import_react_native_bedrock18.useBackEvent)();
|
|
157245
157252
|
var handleBackEvent = (0, import_react10.useCallback)(function () {
|
|
157246
157253
|
if (canHistoryGoBack) {
|
|
157247
157254
|
var _handler$ref$current;
|
|
157248
157255
|
(_handler$ref$current = handler.ref.current) === null || _handler$ref$current === void 0 || _handler$ref$current.goBack();
|
|
157256
|
+
return true;
|
|
157249
157257
|
} else {
|
|
157250
|
-
|
|
157258
|
+
return false;
|
|
157251
157259
|
}
|
|
157252
157260
|
}, [canHistoryGoBack, handler]);
|
|
157253
157261
|
(0, import_react10.useEffect)(function () {
|
|
157254
|
-
|
|
157262
|
+
import_react_native21.BackHandler.addEventListener("hardwareBackPress", handleBackEvent);
|
|
157255
157263
|
return function () {
|
|
157256
|
-
return
|
|
157264
|
+
return import_react_native21.BackHandler.removeEventListener("hardwareBackPress", handleBackEvent);
|
|
157257
157265
|
};
|
|
157258
|
-
}, [
|
|
157266
|
+
}, [handleBackEvent]);
|
|
157259
157267
|
return (0, import_jsx_runtime7.jsx)(BaseWebView, _objectSpread(_objectSpread(_objectSpread({
|
|
157260
157268
|
ref: handler.ref
|
|
157261
157269
|
}, props), baseProps), {}, {
|
|
@@ -157273,7 +157281,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
157273
157281
|
onNavigationStateChange: handleNavigationStateChange,
|
|
157274
157282
|
injectedJavaScript: handler.injectedJavaScript,
|
|
157275
157283
|
injectedJavaScriptBeforeContentLoaded: handler.injectedJavaScript,
|
|
157276
|
-
decelerationRate: import_react_native21.Platform.OS === "ios" ? 1 : void 0
|
|
157284
|
+
decelerationRate: import_react_native21.Platform.OS === "ios" ? 1 : void 0,
|
|
157285
|
+
allowsBackForwardNavigationGestures: allowsBackForwardNavigationGestures
|
|
157277
157286
|
}));
|
|
157278
157287
|
}
|
|
157279
157288
|
function ensureValue(value, name) {
|
|
@@ -39874,6 +39874,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
39874
39874
|
var global2 = getAppsInTossGlobals();
|
|
39875
39875
|
var partner = usePartnerNavigation();
|
|
39876
39876
|
var disableTextSelectionCSS = "\n (function() {\n const style = document.createElement('style');\n style.textContent = '*:not(input):not(textarea) { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }';\n document.head.appendChild(style);\n })();\n ";
|
|
39877
|
+
var _useState4 = _sliced_to_array((0, import_react161.useState)(props.allowsBackForwardNavigationGestures), 2), allowsBackForwardNavigationGestures = _useState4[0], setAllowsBackForwardNavigationGestures = _useState4[1];
|
|
39877
39878
|
var handler = useBridgeHandler({
|
|
39878
39879
|
onMessage,
|
|
39879
39880
|
injectedJavaScript: [
|
|
@@ -39951,6 +39952,10 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
39951
39952
|
getDeploymentId: env.getDeploymentId
|
|
39952
39953
|
}),
|
|
39953
39954
|
asyncHandlerMap: _object_spread_props(_object_spread({}, async_bridges_exports, async_bridges_exports2), {
|
|
39955
|
+
setIosSwipeGestureEnabled: function(options) {
|
|
39956
|
+
setAllowsBackForwardNavigationGestures(options.isEnabled);
|
|
39957
|
+
return setIosSwipeGestureEnabled(options);
|
|
39958
|
+
},
|
|
39954
39959
|
addAccessoryButton: function() {
|
|
39955
39960
|
var _ref = _async_to_generator(function(params) {
|
|
39956
39961
|
return __generator(this, function(_state) {
|
|
@@ -40014,7 +40019,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40014
40019
|
]);
|
|
40015
40020
|
var BaseWebView = WEBVIEW_TYPES[type];
|
|
40016
40021
|
var webViewDebuggingEnabled = operationalEnvironment === "sandbox";
|
|
40017
|
-
var
|
|
40022
|
+
var _useState41 = _sliced_to_array((0, import_react161.useState)(false), 2), canHistoryGoBack = _useState41[0], setCanHistoryGoBack = _useState41[1];
|
|
40018
40023
|
var handleNavigationStateChange = (0, import_react161.useCallback)(function(event) {
|
|
40019
40024
|
if (event.url) {
|
|
40020
40025
|
trackScreen(event.url);
|
|
@@ -40026,25 +40031,24 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40026
40031
|
var userAgent = useCreateUserAgent({
|
|
40027
40032
|
colorPreference: "light"
|
|
40028
40033
|
});
|
|
40029
|
-
var backEvent = useBackEvent();
|
|
40030
40034
|
var handleBackEvent = (0, import_react161.useCallback)(function() {
|
|
40031
40035
|
if (canHistoryGoBack) {
|
|
40032
40036
|
var _handler_ref_current;
|
|
40033
40037
|
(_handler_ref_current = handler.ref.current) === null || _handler_ref_current === void 0 ? void 0 : _handler_ref_current.goBack();
|
|
40038
|
+
return true;
|
|
40034
40039
|
} else {
|
|
40035
|
-
|
|
40040
|
+
return false;
|
|
40036
40041
|
}
|
|
40037
40042
|
}, [
|
|
40038
40043
|
canHistoryGoBack,
|
|
40039
40044
|
handler
|
|
40040
40045
|
]);
|
|
40041
40046
|
(0, import_react161.useEffect)(function() {
|
|
40042
|
-
|
|
40047
|
+
import_react_native143.BackHandler.addEventListener("hardwareBackPress", handleBackEvent);
|
|
40043
40048
|
return function() {
|
|
40044
|
-
return
|
|
40049
|
+
return import_react_native143.BackHandler.removeEventListener("hardwareBackPress", handleBackEvent);
|
|
40045
40050
|
};
|
|
40046
40051
|
}, [
|
|
40047
|
-
backEvent,
|
|
40048
40052
|
handleBackEvent
|
|
40049
40053
|
]);
|
|
40050
40054
|
return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(BaseWebView, _object_spread_props(_object_spread({
|
|
@@ -40065,7 +40069,8 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40065
40069
|
onNavigationStateChange: handleNavigationStateChange,
|
|
40066
40070
|
injectedJavaScript: handler.injectedJavaScript,
|
|
40067
40071
|
injectedJavaScriptBeforeContentLoaded: handler.injectedJavaScript,
|
|
40068
|
-
decelerationRate: import_react_native143.Platform.OS === "ios" ? 1 : void 0
|
|
40072
|
+
decelerationRate: import_react_native143.Platform.OS === "ios" ? 1 : void 0,
|
|
40073
|
+
allowsBackForwardNavigationGestures
|
|
40069
40074
|
}));
|
|
40070
40075
|
}
|
|
40071
40076
|
function ensureValue(value, name2) {
|
|
@@ -39929,6 +39929,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
39929
39929
|
var global2 = getAppsInTossGlobals();
|
|
39930
39930
|
var partner = usePartnerNavigation();
|
|
39931
39931
|
var disableTextSelectionCSS = "\n (function() {\n const style = document.createElement('style');\n style.textContent = '*:not(input):not(textarea) { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }';\n document.head.appendChild(style);\n })();\n ";
|
|
39932
|
+
var _useState4 = _sliced_to_array((0, import_react161.useState)(props.allowsBackForwardNavigationGestures), 2), allowsBackForwardNavigationGestures = _useState4[0], setAllowsBackForwardNavigationGestures = _useState4[1];
|
|
39932
39933
|
var handler = useBridgeHandler({
|
|
39933
39934
|
onMessage,
|
|
39934
39935
|
injectedJavaScript: [
|
|
@@ -40006,6 +40007,10 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40006
40007
|
getDeploymentId: env.getDeploymentId
|
|
40007
40008
|
}),
|
|
40008
40009
|
asyncHandlerMap: _object_spread_props(_object_spread({}, async_bridges_exports, async_bridges_exports2), {
|
|
40010
|
+
setIosSwipeGestureEnabled: function(options) {
|
|
40011
|
+
setAllowsBackForwardNavigationGestures(options.isEnabled);
|
|
40012
|
+
return setIosSwipeGestureEnabled(options);
|
|
40013
|
+
},
|
|
40009
40014
|
addAccessoryButton: function() {
|
|
40010
40015
|
var _ref = _async_to_generator(function(params) {
|
|
40011
40016
|
return __generator(this, function(_state) {
|
|
@@ -40069,7 +40074,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40069
40074
|
]);
|
|
40070
40075
|
var BaseWebView = WEBVIEW_TYPES[type];
|
|
40071
40076
|
var webViewDebuggingEnabled = operationalEnvironment === "sandbox";
|
|
40072
|
-
var
|
|
40077
|
+
var _useState41 = _sliced_to_array((0, import_react161.useState)(false), 2), canHistoryGoBack = _useState41[0], setCanHistoryGoBack = _useState41[1];
|
|
40073
40078
|
var handleNavigationStateChange = (0, import_react161.useCallback)(function(event) {
|
|
40074
40079
|
if (event.url) {
|
|
40075
40080
|
trackScreen(event.url);
|
|
@@ -40081,25 +40086,24 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40081
40086
|
var userAgent = useCreateUserAgent({
|
|
40082
40087
|
colorPreference: "light"
|
|
40083
40088
|
});
|
|
40084
|
-
var backEvent = useBackEvent();
|
|
40085
40089
|
var handleBackEvent = (0, import_react161.useCallback)(function() {
|
|
40086
40090
|
if (canHistoryGoBack) {
|
|
40087
40091
|
var _handler_ref_current;
|
|
40088
40092
|
(_handler_ref_current = handler.ref.current) === null || _handler_ref_current === void 0 ? void 0 : _handler_ref_current.goBack();
|
|
40093
|
+
return true;
|
|
40089
40094
|
} else {
|
|
40090
|
-
|
|
40095
|
+
return false;
|
|
40091
40096
|
}
|
|
40092
40097
|
}, [
|
|
40093
40098
|
canHistoryGoBack,
|
|
40094
40099
|
handler
|
|
40095
40100
|
]);
|
|
40096
40101
|
(0, import_react161.useEffect)(function() {
|
|
40097
|
-
|
|
40102
|
+
import_react_native144.BackHandler.addEventListener("hardwareBackPress", handleBackEvent);
|
|
40098
40103
|
return function() {
|
|
40099
|
-
return
|
|
40104
|
+
return import_react_native144.BackHandler.removeEventListener("hardwareBackPress", handleBackEvent);
|
|
40100
40105
|
};
|
|
40101
40106
|
}, [
|
|
40102
|
-
backEvent,
|
|
40103
40107
|
handleBackEvent
|
|
40104
40108
|
]);
|
|
40105
40109
|
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(BaseWebView, _object_spread_props(_object_spread({
|
|
@@ -40120,7 +40124,8 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40120
40124
|
onNavigationStateChange: handleNavigationStateChange,
|
|
40121
40125
|
injectedJavaScript: handler.injectedJavaScript,
|
|
40122
40126
|
injectedJavaScriptBeforeContentLoaded: handler.injectedJavaScript,
|
|
40123
|
-
decelerationRate: import_react_native144.Platform.OS === "ios" ? 1 : void 0
|
|
40127
|
+
decelerationRate: import_react_native144.Platform.OS === "ios" ? 1 : void 0,
|
|
40128
|
+
allowsBackForwardNavigationGestures
|
|
40124
40129
|
}));
|
|
40125
40130
|
}
|
|
40126
40131
|
function ensureValue(value, name2) {
|
package/dist/prebuilt/prod.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
{
|
|
3
3
|
"platform": "ios",
|
|
4
4
|
"totalModuleCount": 1622,
|
|
5
|
-
"duration":
|
|
6
|
-
"size":
|
|
5
|
+
"duration": 1024.1609169999997,
|
|
6
|
+
"size": 1616600
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
"platform": "android",
|
|
10
10
|
"totalModuleCount": 1622,
|
|
11
|
-
"duration":
|
|
12
|
-
"size":
|
|
11
|
+
"duration": 1010.9102500000004,
|
|
12
|
+
"size": 1614959
|
|
13
13
|
}
|
|
14
14
|
]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/web-framework",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.40",
|
|
5
5
|
"description": "Web Framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"config.d.ts"
|
|
52
52
|
],
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@apps-in-toss/framework": "0.0.
|
|
54
|
+
"@apps-in-toss/framework": "0.0.40",
|
|
55
55
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
56
56
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
|
|
57
57
|
"@babel/plugin-proposal-numeric-separator": "^7.16.7",
|
|
@@ -104,16 +104,16 @@
|
|
|
104
104
|
"zod": "3.24.4"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@apps-in-toss/bridge-core": "0.0.
|
|
108
|
-
"@apps-in-toss/cli": "0.0.
|
|
109
|
-
"@apps-in-toss/plugins": "0.0.
|
|
110
|
-
"@apps-in-toss/web-analytics": "0.0.
|
|
111
|
-
"@apps-in-toss/web-bridge": "0.0.
|
|
107
|
+
"@apps-in-toss/bridge-core": "0.0.40",
|
|
108
|
+
"@apps-in-toss/cli": "0.0.40",
|
|
109
|
+
"@apps-in-toss/plugins": "0.0.40",
|
|
110
|
+
"@apps-in-toss/web-analytics": "0.0.40",
|
|
111
|
+
"@apps-in-toss/web-bridge": "0.0.40",
|
|
112
112
|
"@babel/core": "7.23.9",
|
|
113
113
|
"@react-native-bedrock/utils": "0.0.25"
|
|
114
114
|
},
|
|
115
115
|
"publishConfig": {
|
|
116
116
|
"access": "public"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "3a5a037ebbe1292238d007a3e8f6a5bdb0681a72"
|
|
119
119
|
}
|