@apps-in-toss/framework 1.9.1 → 1.9.3
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 +214 -181
- package/dist/index.js +92 -59
- package/package.json +6 -6
- package/CHANGELOG.md +0 -66
package/dist/index.js
CHANGED
|
@@ -1020,16 +1020,43 @@ function AppShareListMenu() {
|
|
|
1020
1020
|
);
|
|
1021
1021
|
}
|
|
1022
1022
|
|
|
1023
|
-
// src/core/hooks/useMoreButtonBottomSheet/
|
|
1023
|
+
// src/core/hooks/useMoreButtonBottomSheet/HomeShortcutMenu.tsx
|
|
1024
1024
|
import { getOperationalEnvironment as getOperationalEnvironment2 } from "@apps-in-toss/native-modules";
|
|
1025
|
-
import {
|
|
1025
|
+
import { NativeModules as NativeModules2 } from "react-native";
|
|
1026
1026
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1027
|
-
function
|
|
1027
|
+
function HomeShortcutMenu() {
|
|
1028
|
+
const isSandbox = getOperationalEnvironment2() === "sandbox";
|
|
1028
1029
|
const globals = getAppsInTossGlobals();
|
|
1029
|
-
if (
|
|
1030
|
+
if (isSandbox) {
|
|
1030
1031
|
return null;
|
|
1031
1032
|
}
|
|
1032
1033
|
return /* @__PURE__ */ jsx7(
|
|
1034
|
+
Menu,
|
|
1035
|
+
{
|
|
1036
|
+
title: "\uD648 \uD654\uBA74\uC5D0 \uCD94\uAC00",
|
|
1037
|
+
iconURL: "https://static.toss.im/icons/png/4x/icon-plus-circle-mono.png",
|
|
1038
|
+
onPress: () => {
|
|
1039
|
+
NativeModules2.AppsInTossModule.addMiniAppShortcut({
|
|
1040
|
+
title: globals.brandDisplayName,
|
|
1041
|
+
appName: global.__granite.app.name,
|
|
1042
|
+
iconUrl: globals.brandIcon,
|
|
1043
|
+
guideUrl: "https://service.toss.im/app-mini-home/shortcut"
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
// src/core/hooks/useMoreButtonBottomSheet/PermissionsMenu.tsx
|
|
1051
|
+
import { getOperationalEnvironment as getOperationalEnvironment3 } from "@apps-in-toss/native-modules";
|
|
1052
|
+
import { Granite as Granite6, openURL as openURL4 } from "@granite-js/react-native";
|
|
1053
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1054
|
+
function PermissionsMenu() {
|
|
1055
|
+
const globals = getAppsInTossGlobals();
|
|
1056
|
+
if (getOperationalEnvironment3() === "sandbox") {
|
|
1057
|
+
return null;
|
|
1058
|
+
}
|
|
1059
|
+
return /* @__PURE__ */ jsx8(
|
|
1033
1060
|
Menu,
|
|
1034
1061
|
{
|
|
1035
1062
|
title: "\uAD8C\uD55C \uC124\uC815",
|
|
@@ -1050,7 +1077,7 @@ function ensureValue(value, name) {
|
|
|
1050
1077
|
}
|
|
1051
1078
|
|
|
1052
1079
|
// src/core/hooks/useMoreButtonBottomSheet/index.tsx
|
|
1053
|
-
import { Fragment as Fragment3, jsx as
|
|
1080
|
+
import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1054
1081
|
var APP_BRIDGE_METHOD_NAME = "getMiniAppsSupportContact";
|
|
1055
1082
|
var MIN_VERSION = {
|
|
1056
1083
|
BOTTOM_SHEET: {
|
|
@@ -1061,6 +1088,10 @@ var MIN_VERSION = {
|
|
|
1061
1088
|
android: "5.230.0",
|
|
1062
1089
|
ios: "5.230.0"
|
|
1063
1090
|
},
|
|
1091
|
+
HOME_SHORTCUT_MENU: {
|
|
1092
|
+
android: "5.246.0",
|
|
1093
|
+
ios: "5.246.0"
|
|
1094
|
+
},
|
|
1064
1095
|
PERMISSIONS_MENU: {
|
|
1065
1096
|
android: "5.238.0",
|
|
1066
1097
|
ios: "5.237.0"
|
|
@@ -1074,6 +1105,7 @@ function useMoreButtonBottomSheet() {
|
|
|
1074
1105
|
const logging = useMoreButtonBottomSheetLogging();
|
|
1075
1106
|
const overlay = useOverlay2();
|
|
1076
1107
|
const title = ensureValue(globals.brandDisplayName, "displayName");
|
|
1108
|
+
const isHomeShortcutSupported = isMinVersionSupported2(MIN_VERSION.HOME_SHORTCUT_MENU);
|
|
1077
1109
|
const isBottomSheetSupported = isMinVersionSupported2(MIN_VERSION.BOTTOM_SHEET);
|
|
1078
1110
|
const isShareListMenuSupported = isMinVersionSupported2(MIN_VERSION.SHARE_LIST_MENU);
|
|
1079
1111
|
const [isPermissionsMenuSupported, setIsPermissionsMenuSupported] = useState4(false);
|
|
@@ -1114,17 +1146,17 @@ function useMoreButtonBottomSheet() {
|
|
|
1114
1146
|
logging.close();
|
|
1115
1147
|
close();
|
|
1116
1148
|
};
|
|
1117
|
-
return /* @__PURE__ */
|
|
1149
|
+
return /* @__PURE__ */ jsx9(BottomSheetImpressionArea, { children: /* @__PURE__ */ jsx9(
|
|
1118
1150
|
BottomSheet.Root,
|
|
1119
1151
|
{
|
|
1120
|
-
header: /* @__PURE__ */
|
|
1152
|
+
header: /* @__PURE__ */ jsx9(
|
|
1121
1153
|
ListHeader,
|
|
1122
1154
|
{
|
|
1123
|
-
title: /* @__PURE__ */
|
|
1155
|
+
title: /* @__PURE__ */ jsx9(ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
|
|
1124
1156
|
}
|
|
1125
1157
|
),
|
|
1126
1158
|
open: isOpen,
|
|
1127
|
-
cta: /* @__PURE__ */
|
|
1159
|
+
cta: /* @__PURE__ */ jsx9(
|
|
1128
1160
|
BottomSheet.CTA,
|
|
1129
1161
|
{
|
|
1130
1162
|
size: "large",
|
|
@@ -1139,7 +1171,7 @@ function useMoreButtonBottomSheet() {
|
|
|
1139
1171
|
onClose: handleClose,
|
|
1140
1172
|
onExited: exit,
|
|
1141
1173
|
children: /* @__PURE__ */ jsxs2(List, { rowSeparator: "none", children: [
|
|
1142
|
-
itemList.map((item) => /* @__PURE__ */
|
|
1174
|
+
itemList.map((item) => /* @__PURE__ */ jsx9(
|
|
1143
1175
|
Menu,
|
|
1144
1176
|
{
|
|
1145
1177
|
title: item.contactItemName,
|
|
@@ -1148,8 +1180,9 @@ function useMoreButtonBottomSheet() {
|
|
|
1148
1180
|
},
|
|
1149
1181
|
item.contactItemName
|
|
1150
1182
|
)),
|
|
1151
|
-
|
|
1152
|
-
|
|
1183
|
+
isHomeShortcutSupported && /* @__PURE__ */ jsx9(HomeShortcutMenu, {}),
|
|
1184
|
+
isShareListMenuSupported && /* @__PURE__ */ jsx9(AppShareListMenu, {}),
|
|
1185
|
+
isPermissionsMenuSupported && /* @__PURE__ */ jsx9(PermissionsMenu, {})
|
|
1153
1186
|
] })
|
|
1154
1187
|
}
|
|
1155
1188
|
) });
|
|
@@ -1162,7 +1195,7 @@ function BottomSheetImpressionArea({ children }) {
|
|
|
1162
1195
|
useEffect6(() => {
|
|
1163
1196
|
logging.show();
|
|
1164
1197
|
}, [logging]);
|
|
1165
|
-
return /* @__PURE__ */
|
|
1198
|
+
return /* @__PURE__ */ jsx9(Fragment3, { children });
|
|
1166
1199
|
}
|
|
1167
1200
|
|
|
1168
1201
|
// src/core/utils/toIcon.ts
|
|
@@ -1172,7 +1205,7 @@ function toIcon(source) {
|
|
|
1172
1205
|
|
|
1173
1206
|
// src/components/NavigationBar/common/NavigationBarImpressionArea.tsx
|
|
1174
1207
|
import { useEffect as useEffect7, useRef as useRef3 } from "react";
|
|
1175
|
-
import { Fragment as Fragment4, jsx as
|
|
1208
|
+
import { Fragment as Fragment4, jsx as jsx10 } from "react/jsx-runtime";
|
|
1176
1209
|
function NavigationBarImpressionArea({
|
|
1177
1210
|
children,
|
|
1178
1211
|
withHomeButton
|
|
@@ -1185,11 +1218,11 @@ function NavigationBarImpressionArea({
|
|
|
1185
1218
|
hasLogged.current = true;
|
|
1186
1219
|
}
|
|
1187
1220
|
}, [logging, withHomeButton]);
|
|
1188
|
-
return /* @__PURE__ */
|
|
1221
|
+
return /* @__PURE__ */ jsx10(Fragment4, { children });
|
|
1189
1222
|
}
|
|
1190
1223
|
|
|
1191
1224
|
// src/components/NavigationBar/RNNavigationBar/Default.tsx
|
|
1192
|
-
import { jsx as
|
|
1225
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1193
1226
|
function DefaultNavigationBar() {
|
|
1194
1227
|
const globals = getAppsInTossGlobals();
|
|
1195
1228
|
const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
|
|
@@ -1199,7 +1232,7 @@ function DefaultNavigationBar() {
|
|
|
1199
1232
|
const { navigationRightButton } = useNavigationBarContext();
|
|
1200
1233
|
const navigationEvent = useNavigationEvent();
|
|
1201
1234
|
useHardwareBackPress(navigationEvent.handleBack);
|
|
1202
|
-
return /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ jsx11(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx11(
|
|
1203
1236
|
TopNavigation,
|
|
1204
1237
|
{
|
|
1205
1238
|
title: globals.brandDisplayName,
|
|
@@ -1211,7 +1244,7 @@ function DefaultNavigationBar() {
|
|
|
1211
1244
|
withHome: withHomeButton,
|
|
1212
1245
|
fixedRightButton: navigationRightButton,
|
|
1213
1246
|
leftVisible: withBackButton,
|
|
1214
|
-
children: /* @__PURE__ */
|
|
1247
|
+
children: /* @__PURE__ */ jsx11(NavigationLeft, { visible: withBackButton, children: /* @__PURE__ */ jsx11(NavigationBackButton, { onPress: navigationEvent.handleBack, canGoBack: false }) })
|
|
1215
1248
|
}
|
|
1216
1249
|
) });
|
|
1217
1250
|
}
|
|
@@ -1221,7 +1254,7 @@ import { useSafeAreaInsets } from "@granite-js/native/react-native-safe-area-con
|
|
|
1221
1254
|
import { PageNavbar } from "@toss/tds-react-native";
|
|
1222
1255
|
import { NavigationRightContent, useSafeAreaTop } from "@toss/tds-react-native/private";
|
|
1223
1256
|
import { Platform as Platform2, View as View3 } from "react-native";
|
|
1224
|
-
import { Fragment as Fragment5, jsx as
|
|
1257
|
+
import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1225
1258
|
function GameNavigationBar() {
|
|
1226
1259
|
const safeAreaTop = useSafeAreaTop();
|
|
1227
1260
|
const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
|
|
@@ -1230,8 +1263,8 @@ function GameNavigationBar() {
|
|
|
1230
1263
|
const { right: safeAreaRight } = useSafeAreaInsets();
|
|
1231
1264
|
useHardwareBackPress(navigationEvent.handleBack);
|
|
1232
1265
|
return /* @__PURE__ */ jsxs3(Fragment5, { children: [
|
|
1233
|
-
/* @__PURE__ */
|
|
1234
|
-
/* @__PURE__ */
|
|
1266
|
+
/* @__PURE__ */ jsx12(PageNavbar, { preference: { type: "none" } }),
|
|
1267
|
+
/* @__PURE__ */ jsx12(
|
|
1235
1268
|
View3,
|
|
1236
1269
|
{
|
|
1237
1270
|
style: {
|
|
@@ -1247,7 +1280,7 @@ function GameNavigationBar() {
|
|
|
1247
1280
|
paddingRight: safeAreaRight + 10
|
|
1248
1281
|
},
|
|
1249
1282
|
pointerEvents: "box-none",
|
|
1250
|
-
children: /* @__PURE__ */
|
|
1283
|
+
children: /* @__PURE__ */ jsx12(
|
|
1251
1284
|
NavigationRightContent,
|
|
1252
1285
|
{
|
|
1253
1286
|
fixedRightButton: navigationRightButton,
|
|
@@ -1277,15 +1310,15 @@ import * as constant_bridges_star from "@apps-in-toss/native-modules/constant-br
|
|
|
1277
1310
|
import * as event_bridges_star from "@apps-in-toss/native-modules/event-bridges";
|
|
1278
1311
|
|
|
1279
1312
|
// src/components/RNAppContainer.tsx
|
|
1280
|
-
import { Fragment as Fragment6, jsx as
|
|
1313
|
+
import { Fragment as Fragment6, jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1281
1314
|
function RNAppContainer({ children }) {
|
|
1282
1315
|
const global2 = getAppsInTossGlobals();
|
|
1283
1316
|
switch (global2.appType) {
|
|
1284
1317
|
case "game":
|
|
1285
|
-
return /* @__PURE__ */
|
|
1318
|
+
return /* @__PURE__ */ jsx13(GameAppContainer, { children });
|
|
1286
1319
|
case "general":
|
|
1287
1320
|
default:
|
|
1288
|
-
return /* @__PURE__ */
|
|
1321
|
+
return /* @__PURE__ */ jsx13(GeneralAppContainer, { children });
|
|
1289
1322
|
}
|
|
1290
1323
|
}
|
|
1291
1324
|
function GameAppContainer({ children }) {
|
|
@@ -1299,35 +1332,35 @@ function GameAppContainer({ children }) {
|
|
|
1299
1332
|
return;
|
|
1300
1333
|
}, []);
|
|
1301
1334
|
return /* @__PURE__ */ jsxs4(Fragment6, { children: [
|
|
1302
|
-
/* @__PURE__ */
|
|
1303
|
-
(0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */
|
|
1335
|
+
/* @__PURE__ */ jsx13(RNNavigationBar.Game, {}),
|
|
1336
|
+
(0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ jsx13(GameInitializer, { children }) : children
|
|
1304
1337
|
] });
|
|
1305
1338
|
}
|
|
1306
1339
|
function GeneralAppContainer({ children }) {
|
|
1307
1340
|
return /* @__PURE__ */ jsxs4(Fragment6, { children: [
|
|
1308
|
-
/* @__PURE__ */
|
|
1341
|
+
/* @__PURE__ */ jsx13(RNNavigationBar.Default, {}),
|
|
1309
1342
|
children
|
|
1310
1343
|
] });
|
|
1311
1344
|
}
|
|
1312
1345
|
|
|
1313
1346
|
// src/core/registerApp.tsx
|
|
1314
|
-
import { Fragment as Fragment7, jsx as
|
|
1347
|
+
import { Fragment as Fragment7, jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1315
1348
|
function AppsInTossContainer(Container, { children, ...initialProps }) {
|
|
1316
1349
|
if (!isMinVersionSupported3({
|
|
1317
1350
|
android: "5.220.0",
|
|
1318
1351
|
ios: "5.221.0"
|
|
1319
1352
|
})) {
|
|
1320
1353
|
return /* @__PURE__ */ jsxs5(Fragment7, { children: [
|
|
1321
|
-
/* @__PURE__ */
|
|
1322
|
-
/* @__PURE__ */
|
|
1323
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ jsx14(AppEvent.Entry, {}),
|
|
1355
|
+
/* @__PURE__ */ jsx14(AppEvent.System, { ...initialProps }),
|
|
1356
|
+
/* @__PURE__ */ jsx14(AppUpdate, {})
|
|
1324
1357
|
] });
|
|
1325
1358
|
}
|
|
1326
1359
|
return /* @__PURE__ */ jsxs5(Fragment7, { children: [
|
|
1327
|
-
/* @__PURE__ */
|
|
1328
|
-
/* @__PURE__ */
|
|
1329
|
-
/* @__PURE__ */
|
|
1330
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ jsx14(AppEvent.StayTime, {}),
|
|
1361
|
+
/* @__PURE__ */ jsx14(AppEvent.Entry, {}),
|
|
1362
|
+
/* @__PURE__ */ jsx14(AppEvent.System, { ...initialProps }),
|
|
1363
|
+
/* @__PURE__ */ jsx14(Container, { ...initialProps, children: /* @__PURE__ */ jsx14(TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children }) })
|
|
1331
1364
|
] });
|
|
1332
1365
|
}
|
|
1333
1366
|
function registerApp(container, { context, analytics }) {
|
|
@@ -1355,7 +1388,7 @@ function registerApp(container, { context, analytics }) {
|
|
|
1355
1388
|
}
|
|
1356
1389
|
function AppsInTossScreenContainer({ children }) {
|
|
1357
1390
|
const isRNApp = getAppsInTossGlobals().webViewType == null;
|
|
1358
|
-
return /* @__PURE__ */
|
|
1391
|
+
return /* @__PURE__ */ jsx14(NavigationBarContextProvider, { children: /* @__PURE__ */ jsx14(Analytics.Screen, { children: isRNApp ? /* @__PURE__ */ jsx14(RNAppContainer, { children }) : children }) });
|
|
1359
1392
|
}
|
|
1360
1393
|
function getAppName() {
|
|
1361
1394
|
try {
|
|
@@ -1394,7 +1427,7 @@ import { useEffect as useEffect13, useMemo as useMemo7, useRef as useRef6, useSt
|
|
|
1394
1427
|
import { BackHandler as BackHandler2, Linking, Platform as Platform6 } from "react-native";
|
|
1395
1428
|
|
|
1396
1429
|
// src/components/GameWebView.tsx
|
|
1397
|
-
import { setIosSwipeGestureEnabled as setIosSwipeGestureEnabled3, getOperationalEnvironment as
|
|
1430
|
+
import { setIosSwipeGestureEnabled as setIosSwipeGestureEnabled3, getOperationalEnvironment as getOperationalEnvironment5 } from "@apps-in-toss/native-modules";
|
|
1398
1431
|
import {
|
|
1399
1432
|
WebView as PlainWebView
|
|
1400
1433
|
} from "@granite-js/native/react-native-webview";
|
|
@@ -1409,7 +1442,7 @@ import { NavigationRightContent as NavigationRightContent2, useSafeAreaTop as us
|
|
|
1409
1442
|
import { josa as josa3 } from "es-hangul";
|
|
1410
1443
|
import { useCallback as useCallback8 } from "react";
|
|
1411
1444
|
import { Platform as Platform4, View as View4 } from "react-native";
|
|
1412
|
-
import { Fragment as Fragment8, jsx as
|
|
1445
|
+
import { Fragment as Fragment8, jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1413
1446
|
function GameWebviewNavigationBar() {
|
|
1414
1447
|
const safeAreaTop = useSafeAreaTop2();
|
|
1415
1448
|
const { openConfirm } = useDialog5();
|
|
@@ -1435,8 +1468,8 @@ function GameWebviewNavigationBar() {
|
|
|
1435
1468
|
}
|
|
1436
1469
|
}, [captureExitLog, global2.brandDisplayName, logging, openConfirm]);
|
|
1437
1470
|
return /* @__PURE__ */ jsxs6(Fragment8, { children: [
|
|
1438
|
-
/* @__PURE__ */
|
|
1439
|
-
/* @__PURE__ */
|
|
1471
|
+
/* @__PURE__ */ jsx15(PageNavbar2, { preference: { type: "none" } }),
|
|
1472
|
+
/* @__PURE__ */ jsx15(
|
|
1440
1473
|
View4,
|
|
1441
1474
|
{
|
|
1442
1475
|
style: {
|
|
@@ -1452,7 +1485,7 @@ function GameWebviewNavigationBar() {
|
|
|
1452
1485
|
paddingRight: safeAreaRight + 10
|
|
1453
1486
|
},
|
|
1454
1487
|
pointerEvents: "box-none",
|
|
1455
|
-
children: /* @__PURE__ */
|
|
1488
|
+
children: /* @__PURE__ */ jsx15(
|
|
1456
1489
|
NavigationRightContent2,
|
|
1457
1490
|
{
|
|
1458
1491
|
fixedRightButton: navigationRightButton,
|
|
@@ -1469,7 +1502,7 @@ function GameWebviewNavigationBar() {
|
|
|
1469
1502
|
}
|
|
1470
1503
|
|
|
1471
1504
|
// src/components/GameWebView.tsx
|
|
1472
|
-
import { Fragment as Fragment9, jsx as
|
|
1505
|
+
import { Fragment as Fragment9, jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1473
1506
|
var GameWebView = forwardRef(function GameWebView2(props, ref) {
|
|
1474
1507
|
useEffect9(() => {
|
|
1475
1508
|
if (Platform5.OS === "ios") {
|
|
@@ -1481,8 +1514,8 @@ var GameWebView = forwardRef(function GameWebView2(props, ref) {
|
|
|
1481
1514
|
return;
|
|
1482
1515
|
}, []);
|
|
1483
1516
|
return /* @__PURE__ */ jsxs7(Fragment9, { children: [
|
|
1484
|
-
/* @__PURE__ */
|
|
1485
|
-
|
|
1517
|
+
/* @__PURE__ */ jsx16(GameWebviewNavigationBar, {}),
|
|
1518
|
+
getOperationalEnvironment5() === "toss" ? /* @__PURE__ */ jsx16(GameInitializer, { children: /* @__PURE__ */ jsx16(PlainWebView, { ref, ...props }) }) : /* @__PURE__ */ jsx16(PlainWebView, { ref, ...props })
|
|
1486
1519
|
] });
|
|
1487
1520
|
});
|
|
1488
1521
|
|
|
@@ -1498,7 +1531,7 @@ import { useDialog as useDialog6 } from "@toss/tds-react-native";
|
|
|
1498
1531
|
import { NavigationBackButton as NavigationBackButton2, NavigationLeft as NavigationLeft2, TopNavigation as TopNavigation2 } from "@toss/tds-react-native/private";
|
|
1499
1532
|
import { josa as josa4 } from "es-hangul";
|
|
1500
1533
|
import { useCallback as useCallback9 } from "react";
|
|
1501
|
-
import { jsx as
|
|
1534
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1502
1535
|
function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
|
|
1503
1536
|
const globals = getAppsInTossGlobals();
|
|
1504
1537
|
const { captureExitLog } = useCaptureExitLog();
|
|
@@ -1524,7 +1557,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
|
|
|
1524
1557
|
closeView5();
|
|
1525
1558
|
}
|
|
1526
1559
|
}, [captureExitLog, globals.brandDisplayName, logging, openConfirm]);
|
|
1527
|
-
return /* @__PURE__ */
|
|
1560
|
+
return /* @__PURE__ */ jsx17(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx17(
|
|
1528
1561
|
TopNavigation2,
|
|
1529
1562
|
{
|
|
1530
1563
|
title: globals.brandDisplayName,
|
|
@@ -1536,17 +1569,17 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
|
|
|
1536
1569
|
withHome: withHomeButton,
|
|
1537
1570
|
fixedRightButton: navigationRightButton,
|
|
1538
1571
|
leftVisible: withBackButton,
|
|
1539
|
-
children: /* @__PURE__ */
|
|
1572
|
+
children: /* @__PURE__ */ jsx17(NavigationLeft2, { visible: withBackButton, children: /* @__PURE__ */ jsx17(NavigationBackButton2, { onPress: onBackButtonClick, canGoBack: false }) })
|
|
1540
1573
|
}
|
|
1541
1574
|
) });
|
|
1542
1575
|
}
|
|
1543
1576
|
|
|
1544
1577
|
// src/components/PartnerWebView.tsx
|
|
1545
|
-
import { Fragment as Fragment10, jsx as
|
|
1578
|
+
import { Fragment as Fragment10, jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1546
1579
|
var PartnerWebView = forwardRef2(function PartnerWebViewScreen({ onBackButtonClick, onHomeButtonClick, ...webViewProps }, ref) {
|
|
1547
1580
|
return /* @__PURE__ */ jsxs8(Fragment10, { children: [
|
|
1548
|
-
/* @__PURE__ */
|
|
1549
|
-
/* @__PURE__ */
|
|
1581
|
+
/* @__PURE__ */ jsx18(PartnerWebviewNavigationBar, { onBackButtonClick, onHomeButtonClick }),
|
|
1582
|
+
/* @__PURE__ */ jsx18(PlainWebView2, { ref, ...webViewProps, style: { flex: 1 } })
|
|
1550
1583
|
] });
|
|
1551
1584
|
});
|
|
1552
1585
|
|
|
@@ -1565,7 +1598,7 @@ function convertIntentURL(url) {
|
|
|
1565
1598
|
|
|
1566
1599
|
// src/ads/fetchTossAd.ts
|
|
1567
1600
|
import {
|
|
1568
|
-
getOperationalEnvironment as
|
|
1601
|
+
getOperationalEnvironment as getOperationalEnvironment6,
|
|
1569
1602
|
INTERNAL__appBridgeHandler as INTERNAL__appBridgeHandler2,
|
|
1570
1603
|
isMinVersionSupported as isMinVersionSupported4
|
|
1571
1604
|
} from "@apps-in-toss/native-modules";
|
|
@@ -1590,7 +1623,7 @@ var sessionId = generateSessionId();
|
|
|
1590
1623
|
var ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
|
|
1591
1624
|
var IOS_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
|
|
1592
1625
|
var UNSUPPORTED_ERROR_MESSAGE = "This feature is not supported in the current environment";
|
|
1593
|
-
var ENVIRONMENT =
|
|
1626
|
+
var ENVIRONMENT = getOperationalEnvironment6();
|
|
1594
1627
|
function fetchTossAd(params) {
|
|
1595
1628
|
if (!fetchTossAd.isSupported()) {
|
|
1596
1629
|
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE));
|
|
@@ -1643,7 +1676,7 @@ function getReferrer() {
|
|
|
1643
1676
|
}
|
|
1644
1677
|
|
|
1645
1678
|
// src/ads/remotes.ts
|
|
1646
|
-
import { getOperationalEnvironment as
|
|
1679
|
+
import { getOperationalEnvironment as getOperationalEnvironment7, getPlatformOS, getTossAppVersion } from "@apps-in-toss/native-modules";
|
|
1647
1680
|
|
|
1648
1681
|
// src/ads/getIsDev.ts
|
|
1649
1682
|
import { getSchemeUri as getSchemeUri6 } from "@granite-js/react-native";
|
|
@@ -1656,7 +1689,7 @@ function getIsDev() {
|
|
|
1656
1689
|
}
|
|
1657
1690
|
|
|
1658
1691
|
// src/ads/remotes.ts
|
|
1659
|
-
var OPERATIONAL_ENVIRONMENT =
|
|
1692
|
+
var OPERATIONAL_ENVIRONMENT = getOperationalEnvironment7();
|
|
1660
1693
|
var OS = getPlatformOS();
|
|
1661
1694
|
var APP_VER = getTossAppVersion();
|
|
1662
1695
|
var ALPHA_EVENT_TRACKER_HTTP_ENDPOINT = "https://alpha-trillion.toss.im/trk/sdk-mediation/event";
|
|
@@ -2455,7 +2488,7 @@ function useTopNavigation() {
|
|
|
2455
2488
|
}
|
|
2456
2489
|
|
|
2457
2490
|
// src/hooks/useWebViewMemoryDebug.tsx
|
|
2458
|
-
import { getOperationalEnvironment as
|
|
2491
|
+
import { getOperationalEnvironment as getOperationalEnvironment8, INTERNAL__module as INTERNAL__module7 } from "@apps-in-toss/native-modules";
|
|
2459
2492
|
import { Granite as Granite9 } from "@granite-js/react-native";
|
|
2460
2493
|
import { useToast } from "@toss/tds-react-native";
|
|
2461
2494
|
function useHandleWebViewProcessDidTerminate(webViewRef) {
|
|
@@ -2483,7 +2516,7 @@ function webViewDebugLog(logName, params) {
|
|
|
2483
2516
|
deployment_id: global2.deploymentId
|
|
2484
2517
|
}
|
|
2485
2518
|
};
|
|
2486
|
-
if (
|
|
2519
|
+
if (getOperationalEnvironment8() === "toss") {
|
|
2487
2520
|
INTERNAL__module7.tossCoreEventLog(event);
|
|
2488
2521
|
} else {
|
|
2489
2522
|
console.log("[webViewDebugLog]", event);
|
|
@@ -2540,7 +2573,7 @@ var trackScreen = (url) => {
|
|
|
2540
2573
|
};
|
|
2541
2574
|
|
|
2542
2575
|
// src/components/WebView.tsx
|
|
2543
|
-
import { jsx as
|
|
2576
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2544
2577
|
var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment();
|
|
2545
2578
|
var TYPES = ["partner", "external", "game"];
|
|
2546
2579
|
var WEBVIEW_TYPES = {
|
|
@@ -2710,7 +2743,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2710
2743
|
}, [webBackHandler]);
|
|
2711
2744
|
const globalScripts = useGlobalScripts();
|
|
2712
2745
|
const handleWebViewProcessDidTerminate = useHandleWebViewProcessDidTerminate(webViewRef);
|
|
2713
|
-
return /* @__PURE__ */
|
|
2746
|
+
return /* @__PURE__ */ jsx19(
|
|
2714
2747
|
BaseWebView,
|
|
2715
2748
|
{
|
|
2716
2749
|
ref: refs,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/framework",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.3",
|
|
5
5
|
"description": "The framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"ait": "./bin/ait.js"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@apps-in-toss/analytics": "1.9.
|
|
59
|
-
"@apps-in-toss/cli": "1.9.
|
|
60
|
-
"@apps-in-toss/native-modules": "1.9.
|
|
61
|
-
"@apps-in-toss/plugins": "1.9.
|
|
62
|
-
"@apps-in-toss/types": "1.9.
|
|
58
|
+
"@apps-in-toss/analytics": "1.9.3",
|
|
59
|
+
"@apps-in-toss/cli": "1.9.3",
|
|
60
|
+
"@apps-in-toss/native-modules": "1.9.3",
|
|
61
|
+
"@apps-in-toss/plugins": "1.9.3",
|
|
62
|
+
"@apps-in-toss/types": "1.9.3",
|
|
63
63
|
"es-hangul": "^2.3.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
package/CHANGELOG.md
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# @apps-in-toss/framework
|
|
2
|
-
|
|
3
|
-
## 1.9.1
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
[[AIT-3945] getServerTime web-bridge 배포](https://github.toss.bz/toss/apps-in-toss-sdk/pull/31)
|
|
8
|
-
|
|
9
|
-
getServerTime 브릿지에 isSupported 를 추가합니다
|
|
10
|
-
|
|
11
|
-
## 1.9.0
|
|
12
|
-
|
|
13
|
-
### Minor Changes
|
|
14
|
-
|
|
15
|
-
[[AIT-3902] getServerTime 앱브릿지 추가](https://github.toss.bz/toss/apps-in-toss-sdk/pull/24)
|
|
16
|
-
|
|
17
|
-
서버 시간을 가져오는 getServerTime 브릿지를 추가합니다.
|
|
18
|
-
|
|
19
|
-
## 1.8.1
|
|
20
|
-
|
|
21
|
-
### Patch Changes
|
|
22
|
-
|
|
23
|
-
[[AIT-3844]: 외부 사이트에서 네비바 홈 버튼을 누르면 해당 사이트의 루트가 아닌 미니앱의 루트로 이동하도록 수정](https://github.toss.bz/toss/apps-in-toss-sdk/pull/22)
|
|
24
|
-
|
|
25
|
-
외부 사이트에서 네비바 홈 버튼을 누르면 미니앱 루트 페이지로 이동하도록 수정합니다.
|
|
26
|
-
|
|
27
|
-
## 1.8.0
|
|
28
|
-
|
|
29
|
-
### Minor Changes
|
|
30
|
-
|
|
31
|
-
[[AIT-3762]: GoogleAdMob 로딩 여부 확인하는 브릿지 추가](https://github.toss.bz/toss/apps-in-toss-sdk/pull/18)
|
|
32
|
-
|
|
33
|
-
구글 광고가 로딩되었는지 확인하는 isAdMobLoaded를 추가합니다.
|
|
34
|
-
|
|
35
|
-
### Patch Changes
|
|
36
|
-
|
|
37
|
-
[[AP-2118] 토스애즈 integrated ad 최소 앱버전 5.244.1로 변경 - changeset 생성](https://github.toss.bz/toss/apps-in-toss-sdk/pull/21)
|
|
38
|
-
|
|
39
|
-
토스애즈 integrated ad 최소 앱버전을 5.244.1로 변경
|
|
40
|
-
|
|
41
|
-
## 1.7.1
|
|
42
|
-
|
|
43
|
-
### Patch Changes
|
|
44
|
-
|
|
45
|
-
[[AIT-3691]: Unable to open URL: about:blank 이슈 해결](https://github.toss.bz/toss/apps-in-toss-sdk/pull/13)
|
|
46
|
-
|
|
47
|
-
Unable to open URL: about:blank 이슈를 해결합니다.
|
|
48
|
-
|
|
49
|
-
## 1.7.0
|
|
50
|
-
|
|
51
|
-
## 1.6.2
|
|
52
|
-
|
|
53
|
-
### Patch Changes
|
|
54
|
-
|
|
55
|
-
[[AIT-3577] bridgeColorMode 삭제](https://github.toss.bz/toss/apps-in-toss-sdk/pull/6)
|
|
56
|
-
|
|
57
|
-
bridgeColorMode 옵션을 삭제합니다.
|
|
58
|
-
|
|
59
|
-
## 1.6.1
|
|
60
|
-
|
|
61
|
-
### Patch Changes
|
|
62
|
-
|
|
63
|
-
- WebView 프로세스가 죽는 상황의 유저 경험을 개선합니다.
|
|
64
|
-
- OOM 등으로 인해 웹뷰가 죽으면 계속 흰화면이 보여지는 문제가 있었습니다.
|
|
65
|
-
- 따라서 토스트로 안내 메시지를 띄운 후 웹뷰를 재시작하여, 유저가 서비스를 다시 사용할 수 있게 만듭니다.
|
|
66
|
-
- 또한 키바나에 AppsInTossWebViewProcessDidTerminate 라는 이름의 디버그 로그도 함께 남깁니다.
|