@apps-in-toss/framework 2.5.0 → 2.5.2
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/dist/index.cjs +76 -41
- package/dist/index.js +49 -14
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -1391,7 +1391,25 @@ function registerApp(container, { context, analytics }) {
|
|
|
1391
1391
|
}
|
|
1392
1392
|
function AppsInTossScreenContainer({ children }) {
|
|
1393
1393
|
const isRNApp = getAppsInTossGlobals().webViewType == null;
|
|
1394
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(NavigationBarContextProvider, { children: isRNApp ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(NavigationBarContextProvider, { children: isRNApp ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1395
|
+
import_analytics.Analytics.Screen,
|
|
1396
|
+
{
|
|
1397
|
+
onLog: (params) => sendLog(
|
|
1398
|
+
{
|
|
1399
|
+
log_type: params.log_type,
|
|
1400
|
+
log_name: "appsintoss_app_visit__appssintoss_systemlog",
|
|
1401
|
+
params: {
|
|
1402
|
+
...params.params,
|
|
1403
|
+
schema_id: 5175906,
|
|
1404
|
+
app_name: import_react_native21.Granite.appName,
|
|
1405
|
+
log_name: params.log_name
|
|
1406
|
+
}
|
|
1407
|
+
},
|
|
1408
|
+
{ pipelines: ["core"] }
|
|
1409
|
+
),
|
|
1410
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RNAppContainer, { children })
|
|
1411
|
+
}
|
|
1412
|
+
) : children });
|
|
1395
1413
|
}
|
|
1396
1414
|
function getAppName() {
|
|
1397
1415
|
try {
|
|
@@ -1408,7 +1426,7 @@ var AppsInToss = {
|
|
|
1408
1426
|
};
|
|
1409
1427
|
|
|
1410
1428
|
// src/components/WebView.tsx
|
|
1411
|
-
var
|
|
1429
|
+
var import_native_modules18 = require("@apps-in-toss/native-modules");
|
|
1412
1430
|
var appsInTossAsyncBridges = __toESM(require("@apps-in-toss/native-modules/async-bridges"), 1);
|
|
1413
1431
|
var appsInTossConstantBridges = __toESM(require("@apps-in-toss/native-modules/constant-bridges"), 1);
|
|
1414
1432
|
var appsInTossEventBridges = __toESM(require("@apps-in-toss/native-modules/event-bridges"), 1);
|
|
@@ -2507,7 +2525,6 @@ function webViewDebugLog(logName, params) {
|
|
|
2507
2525
|
}
|
|
2508
2526
|
|
|
2509
2527
|
// src/utils/log.ts
|
|
2510
|
-
var import_native_modules18 = require("@apps-in-toss/native-modules");
|
|
2511
2528
|
var import_react_native35 = require("@granite-js/react-native");
|
|
2512
2529
|
|
|
2513
2530
|
// src/utils/extractDateFromUUIDv7.ts
|
|
@@ -2542,18 +2559,36 @@ var getReferrer2 = () => {
|
|
|
2542
2559
|
};
|
|
2543
2560
|
var trackScreen = (url, title) => {
|
|
2544
2561
|
const { groupId, search } = getGroupId(url);
|
|
2545
|
-
const
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
}
|
|
2562
|
+
const logType = "screen";
|
|
2563
|
+
const logName = `${groupId}::screen`;
|
|
2564
|
+
const params = {
|
|
2565
|
+
search,
|
|
2566
|
+
referrer: getReferrer2(),
|
|
2567
|
+
document_title: title,
|
|
2568
|
+
app_name: import_react_native35.Granite.appName,
|
|
2569
|
+
deployment_id: env.getDeploymentId(),
|
|
2570
|
+
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
2555
2571
|
};
|
|
2556
|
-
|
|
2572
|
+
sendLog(
|
|
2573
|
+
{
|
|
2574
|
+
log_type: logType,
|
|
2575
|
+
log_name: logName,
|
|
2576
|
+
params
|
|
2577
|
+
},
|
|
2578
|
+
{ pipelines: ["partner"] }
|
|
2579
|
+
);
|
|
2580
|
+
sendLog(
|
|
2581
|
+
{
|
|
2582
|
+
log_type: logType,
|
|
2583
|
+
log_name: "appsintoss_app_visit__appssintoss_systemlog",
|
|
2584
|
+
params: {
|
|
2585
|
+
...params,
|
|
2586
|
+
schema_id: 5175906,
|
|
2587
|
+
log_name: logName
|
|
2588
|
+
}
|
|
2589
|
+
},
|
|
2590
|
+
{ pipelines: ["core"] }
|
|
2591
|
+
);
|
|
2557
2592
|
};
|
|
2558
2593
|
|
|
2559
2594
|
// src/components/WebView.tsx
|
|
@@ -2582,7 +2617,7 @@ function getWebViewURL(local) {
|
|
|
2582
2617
|
const devUrl = `http://${local.host}:${local.port}`;
|
|
2583
2618
|
return mergeSchemeQueryParamsInto(devUrl);
|
|
2584
2619
|
}
|
|
2585
|
-
const { url: rawUrl } = (0,
|
|
2620
|
+
const { url: rawUrl } = (0, import_native_modules18.safeSyncPostMessage)("getWebBundleURL", {});
|
|
2586
2621
|
const url = mergeSchemeQueryParamsInto(rawUrl);
|
|
2587
2622
|
const deploymentId = env.getDeploymentId();
|
|
2588
2623
|
if (deploymentId) {
|
|
@@ -2618,23 +2653,23 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2618
2653
|
};
|
|
2619
2654
|
},
|
|
2620
2655
|
homeEvent: ({ onEvent }) => homeEvent.subscribe(onEvent),
|
|
2621
|
-
updateLocationEvent: ({ onEvent, onError, options }) =>
|
|
2656
|
+
updateLocationEvent: ({ onEvent, onError, options }) => import_native_modules18.appsInTossEvent.addEventListener("updateLocationEvent", { onEvent, onError, options }),
|
|
2622
2657
|
safeAreaInsetsChange: ({ onEvent }) => safeAreaInsetsEvent.subscribe(onEvent),
|
|
2623
2658
|
/** @internal */
|
|
2624
|
-
appBridgeCallbackEvent: ({ onEvent, onError, options }) =>
|
|
2659
|
+
appBridgeCallbackEvent: ({ onEvent, onError, options }) => import_native_modules18.appsInTossEvent.addEventListener("appBridgeCallbackEvent", { onEvent, onError, options }),
|
|
2625
2660
|
/** AdMobV2 */
|
|
2626
|
-
loadAppsInTossAdMob:
|
|
2627
|
-
showAppsInTossAdMob:
|
|
2661
|
+
loadAppsInTossAdMob: import_native_modules18.GoogleAdMob.loadAppsInTossAdMob,
|
|
2662
|
+
showAppsInTossAdMob: import_native_modules18.GoogleAdMob.showAppsInTossAdMob,
|
|
2628
2663
|
/** IntegratedAd */
|
|
2629
2664
|
loadFullScreenAd: loadFullScreenAdForWeb,
|
|
2630
2665
|
showFullScreenAd,
|
|
2631
2666
|
/** TossAd */
|
|
2632
2667
|
fetchTossAd,
|
|
2633
2668
|
/** IAP */
|
|
2634
|
-
iapCreateOneTimePurchaseOrder:
|
|
2635
|
-
requestSubscriptionPurchase:
|
|
2636
|
-
requestOneTimePurchase:
|
|
2637
|
-
requestNotificationAgreement:
|
|
2669
|
+
iapCreateOneTimePurchaseOrder: import_native_modules18.IAP.createOneTimePurchaseOrder,
|
|
2670
|
+
requestSubscriptionPurchase: import_native_modules18.IAP.createSubscriptionPurchaseOrder,
|
|
2671
|
+
requestOneTimePurchase: import_native_modules18.requestOneTimePurchase,
|
|
2672
|
+
requestNotificationAgreement: import_native_modules18.requestNotificationAgreement
|
|
2638
2673
|
},
|
|
2639
2674
|
constantHandlerMap: {
|
|
2640
2675
|
...appsInTossConstantBridges,
|
|
@@ -2645,12 +2680,12 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2645
2680
|
right: insets.right
|
|
2646
2681
|
}),
|
|
2647
2682
|
...Object.fromEntries(Object.entries(global2).map(([key, value]) => [key, () => value])),
|
|
2648
|
-
getServerTime_isSupported:
|
|
2649
|
-
requestReview_isSupported:
|
|
2683
|
+
getServerTime_isSupported: import_native_modules18.getServerTime.isSupported,
|
|
2684
|
+
requestReview_isSupported: import_native_modules18.requestReview.isSupported,
|
|
2650
2685
|
/** AdMobV2 */
|
|
2651
|
-
loadAppsInTossAdMob_isSupported:
|
|
2652
|
-
showAppsInTossAdMob_isSupported:
|
|
2653
|
-
isAppsInTossAdMobLoaded_isSupported:
|
|
2686
|
+
loadAppsInTossAdMob_isSupported: import_native_modules18.GoogleAdMob.loadAppsInTossAdMob.isSupported,
|
|
2687
|
+
showAppsInTossAdMob_isSupported: import_native_modules18.GoogleAdMob.showAppsInTossAdMob.isSupported,
|
|
2688
|
+
isAppsInTossAdMobLoaded_isSupported: import_native_modules18.GoogleAdMob.isAppsInTossAdMobLoaded.isSupported,
|
|
2654
2689
|
/** IntegratedAd */
|
|
2655
2690
|
loadFullScreenAd_isSupported: loadFullScreenAdForWeb.isSupported,
|
|
2656
2691
|
showFullScreenAd_isSupported: showFullScreenAd.isSupported,
|
|
@@ -2663,7 +2698,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2663
2698
|
},
|
|
2664
2699
|
asyncHandlerMap: {
|
|
2665
2700
|
...appsInTossAsyncBridges,
|
|
2666
|
-
getServerTime:
|
|
2701
|
+
getServerTime: import_native_modules18.getServerTime,
|
|
2667
2702
|
setIosSwipeGestureEnabled: (options) => {
|
|
2668
2703
|
setAllowsBackForwardNavigationGestures(options.isEnabled);
|
|
2669
2704
|
return appsInTossAsyncBridges.setIosSwipeGestureEnabled(options);
|
|
@@ -2681,20 +2716,20 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2681
2716
|
getCurrentLocation: appsInTossAsyncBridges.getCurrentLocation,
|
|
2682
2717
|
openCamera: appsInTossAsyncBridges.openCamera,
|
|
2683
2718
|
/** Storage */
|
|
2684
|
-
getStorageItem:
|
|
2685
|
-
setStorageItem:
|
|
2686
|
-
removeStorageItem:
|
|
2687
|
-
clearItems:
|
|
2719
|
+
getStorageItem: import_native_modules18.Storage.getItem,
|
|
2720
|
+
setStorageItem: import_native_modules18.Storage.setItem,
|
|
2721
|
+
removeStorageItem: import_native_modules18.Storage.removeItem,
|
|
2722
|
+
clearItems: import_native_modules18.Storage.clearItems,
|
|
2688
2723
|
/** IAP */
|
|
2689
|
-
iapGetProductItemList:
|
|
2690
|
-
iapCreateOneTimePurchaseOrder:
|
|
2691
|
-
processProductGrant:
|
|
2692
|
-
getPendingOrders:
|
|
2693
|
-
getCompletedOrRefundedOrders:
|
|
2694
|
-
completeProductGrant:
|
|
2695
|
-
getSubscriptionInfo:
|
|
2724
|
+
iapGetProductItemList: import_native_modules18.IAP.getProductItemList,
|
|
2725
|
+
iapCreateOneTimePurchaseOrder: import_native_modules18.iapCreateOneTimePurchaseOrder,
|
|
2726
|
+
processProductGrant: import_native_modules18.processProductGrant,
|
|
2727
|
+
getPendingOrders: import_native_modules18.IAP.getPendingOrders,
|
|
2728
|
+
getCompletedOrRefundedOrders: import_native_modules18.IAP.getCompletedOrRefundedOrders,
|
|
2729
|
+
completeProductGrant: import_native_modules18.IAP.completeProductGrant,
|
|
2730
|
+
getSubscriptionInfo: import_native_modules18.IAP.getSubscriptionInfo,
|
|
2696
2731
|
/** AdMobV2 */
|
|
2697
|
-
isAppsInTossAdMobLoaded:
|
|
2732
|
+
isAppsInTossAdMobLoaded: import_native_modules18.GoogleAdMob.isAppsInTossAdMobLoaded,
|
|
2698
2733
|
/** Toss Ads */
|
|
2699
2734
|
tossAdEventLog,
|
|
2700
2735
|
/** Private */
|
package/dist/index.js
CHANGED
|
@@ -1357,7 +1357,25 @@ function registerApp(container, { context, analytics }) {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
function AppsInTossScreenContainer({ children }) {
|
|
1359
1359
|
const isRNApp = getAppsInTossGlobals().webViewType == null;
|
|
1360
|
-
return /* @__PURE__ */ jsx14(NavigationBarContextProvider, { children: isRNApp ? /* @__PURE__ */ jsx14(
|
|
1360
|
+
return /* @__PURE__ */ jsx14(NavigationBarContextProvider, { children: isRNApp ? /* @__PURE__ */ jsx14(
|
|
1361
|
+
Analytics.Screen,
|
|
1362
|
+
{
|
|
1363
|
+
onLog: (params) => sendLog(
|
|
1364
|
+
{
|
|
1365
|
+
log_type: params.log_type,
|
|
1366
|
+
log_name: "appsintoss_app_visit__appssintoss_systemlog",
|
|
1367
|
+
params: {
|
|
1368
|
+
...params.params,
|
|
1369
|
+
schema_id: 5175906,
|
|
1370
|
+
app_name: Granite6.appName,
|
|
1371
|
+
log_name: params.log_name
|
|
1372
|
+
}
|
|
1373
|
+
},
|
|
1374
|
+
{ pipelines: ["core"] }
|
|
1375
|
+
),
|
|
1376
|
+
children: /* @__PURE__ */ jsx14(RNAppContainer, { children })
|
|
1377
|
+
}
|
|
1378
|
+
) : children });
|
|
1361
1379
|
}
|
|
1362
1380
|
function getAppName() {
|
|
1363
1381
|
try {
|
|
@@ -2493,8 +2511,7 @@ function webViewDebugLog(logName, params) {
|
|
|
2493
2511
|
}
|
|
2494
2512
|
|
|
2495
2513
|
// src/utils/log.ts
|
|
2496
|
-
import {
|
|
2497
|
-
import { getSchemeUri as getSchemeUri8 } from "@granite-js/react-native";
|
|
2514
|
+
import { getSchemeUri as getSchemeUri8, Granite as Granite9 } from "@granite-js/react-native";
|
|
2498
2515
|
|
|
2499
2516
|
// src/utils/extractDateFromUUIDv7.ts
|
|
2500
2517
|
var extractDateFromUUIDv7 = (uuid) => {
|
|
@@ -2528,18 +2545,36 @@ var getReferrer2 = () => {
|
|
|
2528
2545
|
};
|
|
2529
2546
|
var trackScreen = (url, title) => {
|
|
2530
2547
|
const { groupId, search } = getGroupId(url);
|
|
2531
|
-
const
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
}
|
|
2548
|
+
const logType = "screen";
|
|
2549
|
+
const logName = `${groupId}::screen`;
|
|
2550
|
+
const params = {
|
|
2551
|
+
search,
|
|
2552
|
+
referrer: getReferrer2(),
|
|
2553
|
+
document_title: title,
|
|
2554
|
+
app_name: Granite9.appName,
|
|
2555
|
+
deployment_id: env.getDeploymentId(),
|
|
2556
|
+
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
2541
2557
|
};
|
|
2542
|
-
|
|
2558
|
+
sendLog(
|
|
2559
|
+
{
|
|
2560
|
+
log_type: logType,
|
|
2561
|
+
log_name: logName,
|
|
2562
|
+
params
|
|
2563
|
+
},
|
|
2564
|
+
{ pipelines: ["partner"] }
|
|
2565
|
+
);
|
|
2566
|
+
sendLog(
|
|
2567
|
+
{
|
|
2568
|
+
log_type: logType,
|
|
2569
|
+
log_name: "appsintoss_app_visit__appssintoss_systemlog",
|
|
2570
|
+
params: {
|
|
2571
|
+
...params,
|
|
2572
|
+
schema_id: 5175906,
|
|
2573
|
+
log_name: logName
|
|
2574
|
+
}
|
|
2575
|
+
},
|
|
2576
|
+
{ pipelines: ["core"] }
|
|
2577
|
+
);
|
|
2543
2578
|
};
|
|
2544
2579
|
|
|
2545
2580
|
// src/components/WebView.tsx
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/framework",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.5.
|
|
4
|
+
"version": "2.5.2",
|
|
5
5
|
"description": "The framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"ait": "./bin/ait.js"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@apps-in-toss/analytics": "2.5.
|
|
59
|
-
"@apps-in-toss/cli": "2.5.
|
|
60
|
-
"@apps-in-toss/native-modules": "2.5.
|
|
61
|
-
"@apps-in-toss/plugins": "2.5.
|
|
62
|
-
"@apps-in-toss/types": "2.5.
|
|
63
|
-
"@apps-in-toss/user-scripts": "^2.5.
|
|
58
|
+
"@apps-in-toss/analytics": "2.5.2",
|
|
59
|
+
"@apps-in-toss/cli": "2.5.2",
|
|
60
|
+
"@apps-in-toss/native-modules": "2.5.2",
|
|
61
|
+
"@apps-in-toss/plugins": "2.5.2",
|
|
62
|
+
"@apps-in-toss/types": "2.5.2",
|
|
63
|
+
"@apps-in-toss/user-scripts": "^2.5.2",
|
|
64
64
|
"es-hangul": "^2.3.2"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|