@apps-in-toss/framework 0.0.0-dev.1763036638916 → 0.0.0-dev.1764816865438
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 +693 -220
- package/dist/index.d.cts +66 -2
- package/dist/index.d.ts +66 -2
- package/dist/index.js +605 -134
- package/package.json +15 -15
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import { Analytics as InternalAnalytics } from "@apps-in-toss/analytics";
|
|
|
18
18
|
// src/core/registerApp.tsx
|
|
19
19
|
import { Analytics } from "@apps-in-toss/analytics";
|
|
20
20
|
import { isMinVersionSupported as isMinVersionSupported3, setIosSwipeGestureEnabled as setIosSwipeGestureEnabled2, eventLog } from "@apps-in-toss/native-modules";
|
|
21
|
-
import { Granite as
|
|
21
|
+
import { Granite as Granite7 } from "@granite-js/react-native";
|
|
22
22
|
import { TDSProvider } from "@toss/tds-react-native";
|
|
23
23
|
import { AppRegistry } from "react-native";
|
|
24
24
|
|
|
@@ -856,18 +856,22 @@ function useNavigationEvent() {
|
|
|
856
856
|
|
|
857
857
|
// src/core/hooks/useMoreButtonBottomSheet/index.tsx
|
|
858
858
|
import { INTERNAL__appBridgeHandler, isMinVersionSupported as isMinVersionSupported2 } from "@apps-in-toss/native-modules";
|
|
859
|
-
import { openURL as
|
|
860
|
-
import { BottomSheet, List, ListHeader
|
|
859
|
+
import { openURL as openURL5 } from "@granite-js/react-native";
|
|
860
|
+
import { BottomSheet, List, ListHeader } from "@toss/tds-react-native";
|
|
861
861
|
import { useAdaptive as useAdaptive2, useOverlay as useOverlay2 } from "@toss/tds-react-native/private";
|
|
862
862
|
import { useEffect as useEffect7, useState as useState4 } from "react";
|
|
863
863
|
|
|
864
864
|
// src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
|
|
865
865
|
import { getOperationalEnvironment } from "@apps-in-toss/native-modules";
|
|
866
866
|
import { getSchemeUri as getSchemeUri4 } from "@granite-js/react-native";
|
|
867
|
-
import {
|
|
868
|
-
import { useAdaptive } from "@toss/tds-react-native/private";
|
|
867
|
+
import { useDialog as useDialog4 } from "@toss/tds-react-native";
|
|
869
868
|
import { NativeModules } from "react-native";
|
|
870
869
|
|
|
870
|
+
// src/core/hooks/useMoreButtonBottomSheet/Menu.tsx
|
|
871
|
+
import { ListRow, Asset as Asset2 } from "@toss/tds-react-native";
|
|
872
|
+
import { useAdaptive } from "@toss/tds-react-native/private";
|
|
873
|
+
import { View as View2 } from "react-native";
|
|
874
|
+
|
|
871
875
|
// src/core/hooks/useMoreButtonBottomSheet/useMoreButtonBottomSheetLogging.tsx
|
|
872
876
|
import { INTERNAL__module as INTERNAL__module5 } from "@apps-in-toss/native-modules";
|
|
873
877
|
import { Granite as Granite5 } from "@granite-js/react-native";
|
|
@@ -937,6 +941,82 @@ function useMoreButtonBottomSheetLogging() {
|
|
|
937
941
|
};
|
|
938
942
|
}
|
|
939
943
|
|
|
944
|
+
// src/core/hooks/useMoreButtonBottomSheet/Menu.tsx
|
|
945
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
946
|
+
function Menu({ title, iconURL, onPress }) {
|
|
947
|
+
const globals = getAppsInTossGlobals();
|
|
948
|
+
const adaptive = useAdaptive();
|
|
949
|
+
const iconName = getIconName(iconURL);
|
|
950
|
+
const logging = useMoreButtonBottomSheetLogging();
|
|
951
|
+
const brandPrimaryColorRGB = hexToRGB(globals.brandPrimaryColor);
|
|
952
|
+
const iconBackgroundColor = brandPrimaryColorRGB ? `rgba(${brandPrimaryColorRGB.join(",")},0.1)` : adaptive.grey100;
|
|
953
|
+
return /* @__PURE__ */ jsx5(
|
|
954
|
+
ListRow,
|
|
955
|
+
{
|
|
956
|
+
left: /* @__PURE__ */ jsx5(
|
|
957
|
+
View2,
|
|
958
|
+
{
|
|
959
|
+
style: {
|
|
960
|
+
width: 30,
|
|
961
|
+
height: 30,
|
|
962
|
+
borderRadius: 10,
|
|
963
|
+
flexDirection: "row",
|
|
964
|
+
alignItems: "center",
|
|
965
|
+
justifyContent: "center",
|
|
966
|
+
marginRight: 16,
|
|
967
|
+
backgroundColor: iconBackgroundColor
|
|
968
|
+
},
|
|
969
|
+
children: iconName ? /* @__PURE__ */ jsx5(
|
|
970
|
+
Asset2.Icon,
|
|
971
|
+
{
|
|
972
|
+
frameShape: { width: 20, height: 20 },
|
|
973
|
+
color: globals.brandPrimaryColor,
|
|
974
|
+
name: iconName
|
|
975
|
+
}
|
|
976
|
+
) : /* @__PURE__ */ jsx5(
|
|
977
|
+
Asset2.Image,
|
|
978
|
+
{
|
|
979
|
+
frameShape: { width: 20, height: 20 },
|
|
980
|
+
source: { uri: iconURL }
|
|
981
|
+
}
|
|
982
|
+
)
|
|
983
|
+
}
|
|
984
|
+
),
|
|
985
|
+
contents: /* @__PURE__ */ jsx5(
|
|
986
|
+
ListRow.Texts,
|
|
987
|
+
{
|
|
988
|
+
type: "1RowTypeA",
|
|
989
|
+
top: title,
|
|
990
|
+
topProps: { color: adaptive.grey700 }
|
|
991
|
+
}
|
|
992
|
+
),
|
|
993
|
+
verticalPadding: "extraSmall",
|
|
994
|
+
onPress: () => {
|
|
995
|
+
logging.menuClick({ title });
|
|
996
|
+
onPress?.();
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
);
|
|
1000
|
+
}
|
|
1001
|
+
var iconNameRegExp = /^(icon-|icn-(?!(car|sec|bank-(fill|square|horizontal))-))(.+)/i;
|
|
1002
|
+
var iconURLRegExp = /^https:\/\/static\.toss\.im\/icons\/(png\/\dx|svg|pdf)\/((icon-|icn-(?!(car|sec|bank-(fill|square|horizontal))-))(.+))\.(png|svg|pdf)$/i;
|
|
1003
|
+
function isIconUrl(url) {
|
|
1004
|
+
return iconNameRegExp.test(url) || iconURLRegExp.test(url);
|
|
1005
|
+
}
|
|
1006
|
+
function getIconName(url) {
|
|
1007
|
+
if (!isIconUrl(url)) {
|
|
1008
|
+
return null;
|
|
1009
|
+
}
|
|
1010
|
+
if (iconNameRegExp.test(url)) {
|
|
1011
|
+
return url;
|
|
1012
|
+
}
|
|
1013
|
+
return url.match(iconURLRegExp)?.[2];
|
|
1014
|
+
}
|
|
1015
|
+
function hexToRGB(hex) {
|
|
1016
|
+
const rgb = hex.toLowerCase().match(/[0-9,a-f]{2}/g)?.map((str) => parseInt(str, 16));
|
|
1017
|
+
return rgb?.length === 3 ? rgb : void 0;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
940
1020
|
// src/core/utils/url.ts
|
|
941
1021
|
function addParamsToUrl(url, params) {
|
|
942
1022
|
const urlObj = new URL(url);
|
|
@@ -947,42 +1027,24 @@ function addParamsToUrl(url, params) {
|
|
|
947
1027
|
}
|
|
948
1028
|
|
|
949
1029
|
// src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
|
|
950
|
-
import { jsx as
|
|
1030
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
951
1031
|
var SHARE_SCHEME_REFERRER = "appsintoss.common_module_share";
|
|
952
1032
|
var APP_SHARE_MENU_INFO = {
|
|
953
1033
|
contactItemName: "\uACF5\uC720\uD558\uAE30",
|
|
954
1034
|
contactIconUrl: "https://static.toss.im/icons/png/4x/icon-share-dots-mono.png"
|
|
955
1035
|
};
|
|
956
1036
|
function AppShareListMenu() {
|
|
957
|
-
const globals = getAppsInTossGlobals();
|
|
958
|
-
const adaptive = useAdaptive();
|
|
959
|
-
const logging = useMoreButtonBottomSheetLogging();
|
|
960
1037
|
const initialScheme = getSchemeUri4();
|
|
961
1038
|
const isSandbox = getOperationalEnvironment() === "sandbox";
|
|
962
1039
|
const { openConfirm } = useDialog4();
|
|
963
1040
|
const schemeForShare = addParamsToUrl(initialScheme, {
|
|
964
1041
|
referrer: SHARE_SCHEME_REFERRER
|
|
965
1042
|
});
|
|
966
|
-
return /* @__PURE__ */
|
|
967
|
-
|
|
1043
|
+
return /* @__PURE__ */ jsx6(
|
|
1044
|
+
Menu,
|
|
968
1045
|
{
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
{
|
|
972
|
-
color: globals.brandPrimaryColor,
|
|
973
|
-
source: { uri: APP_SHARE_MENU_INFO.contactIconUrl },
|
|
974
|
-
type: "background"
|
|
975
|
-
}
|
|
976
|
-
),
|
|
977
|
-
contents: /* @__PURE__ */ jsx5(
|
|
978
|
-
ListRow.Texts,
|
|
979
|
-
{
|
|
980
|
-
type: "1RowTypeA",
|
|
981
|
-
top: APP_SHARE_MENU_INFO.contactItemName,
|
|
982
|
-
topProps: { color: adaptive.grey700 }
|
|
983
|
-
}
|
|
984
|
-
),
|
|
985
|
-
verticalPadding: "extraSmall",
|
|
1046
|
+
title: APP_SHARE_MENU_INFO.contactItemName,
|
|
1047
|
+
iconURL: APP_SHARE_MENU_INFO.contactIconUrl,
|
|
986
1048
|
onPress: () => {
|
|
987
1049
|
if (isSandbox) {
|
|
988
1050
|
openConfirm({
|
|
@@ -993,7 +1055,6 @@ function AppShareListMenu() {
|
|
|
993
1055
|
});
|
|
994
1056
|
return;
|
|
995
1057
|
}
|
|
996
|
-
logging.menuClick({ title: APP_SHARE_MENU_INFO.contactItemName });
|
|
997
1058
|
NativeModules.AppsInTossModule.shareWithScheme({
|
|
998
1059
|
params: {
|
|
999
1060
|
schemeURL: schemeForShare
|
|
@@ -1004,6 +1065,25 @@ function AppShareListMenu() {
|
|
|
1004
1065
|
);
|
|
1005
1066
|
}
|
|
1006
1067
|
|
|
1068
|
+
// src/core/hooks/useMoreButtonBottomSheet/PermissionsMenu.tsx
|
|
1069
|
+
import { getOperationalEnvironment as getOperationalEnvironment2 } from "@apps-in-toss/native-modules";
|
|
1070
|
+
import { Granite as Granite6, openURL as openURL4 } from "@granite-js/react-native";
|
|
1071
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1072
|
+
function PermissionsMenu() {
|
|
1073
|
+
const globals = getAppsInTossGlobals();
|
|
1074
|
+
if (getOperationalEnvironment2() === "sandbox") {
|
|
1075
|
+
return null;
|
|
1076
|
+
}
|
|
1077
|
+
return /* @__PURE__ */ jsx7(
|
|
1078
|
+
Menu,
|
|
1079
|
+
{
|
|
1080
|
+
title: "\uAD8C\uD55C \uC124\uC815",
|
|
1081
|
+
iconURL: "https://static.toss.im/icons/png/4x/icon-setting-mono.png",
|
|
1082
|
+
onPress: () => openURL4(`servicetoss://apps-in-toss-menu/permissions?appName=${Granite6.appName}&displayAppName=${globals.brandDisplayName}`)
|
|
1083
|
+
}
|
|
1084
|
+
);
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1007
1087
|
// src/core/utils/ensureValue.ts
|
|
1008
1088
|
function ensureValue(value, name) {
|
|
1009
1089
|
if (value === void 0) {
|
|
@@ -1013,7 +1093,7 @@ function ensureValue(value, name) {
|
|
|
1013
1093
|
}
|
|
1014
1094
|
|
|
1015
1095
|
// src/core/hooks/useMoreButtonBottomSheet/index.tsx
|
|
1016
|
-
import { Fragment as Fragment3, jsx as
|
|
1096
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1017
1097
|
var APP_BRIDGE_METHOD_NAME = "getMiniAppsSupportContact";
|
|
1018
1098
|
var MIN_VERSION = {
|
|
1019
1099
|
BOTTOM_SHEET: {
|
|
@@ -1023,6 +1103,10 @@ var MIN_VERSION = {
|
|
|
1023
1103
|
SHARE_LIST_MENU: {
|
|
1024
1104
|
android: "5.230.0",
|
|
1025
1105
|
ios: "5.230.0"
|
|
1106
|
+
},
|
|
1107
|
+
PERMISSIONS_MENU: {
|
|
1108
|
+
android: "5.238.0",
|
|
1109
|
+
ios: "5.237.0"
|
|
1026
1110
|
}
|
|
1027
1111
|
};
|
|
1028
1112
|
function useMoreButtonBottomSheet() {
|
|
@@ -1035,6 +1119,7 @@ function useMoreButtonBottomSheet() {
|
|
|
1035
1119
|
const title = ensureValue(globals.brandDisplayName, "displayName");
|
|
1036
1120
|
const isBottomSheetSupported = isMinVersionSupported2(MIN_VERSION.BOTTOM_SHEET);
|
|
1037
1121
|
const isShareListMenuSupported = isMinVersionSupported2(MIN_VERSION.SHARE_LIST_MENU);
|
|
1122
|
+
const [isPermissionsMenuSupported, setIsPermissionsMenuSupported] = useState4(false);
|
|
1038
1123
|
useEffect7(() => {
|
|
1039
1124
|
if (!isBottomSheetSupported) {
|
|
1040
1125
|
return;
|
|
@@ -1047,6 +1132,16 @@ function useMoreButtonBottomSheet() {
|
|
|
1047
1132
|
onError: (error) => console.error("\uBA54\uB274 \uBAA9\uB85D\uC744 \uAC00\uC838\uC624\uB294 \uB370 \uC2E4\uD328\uD588\uC5B4\uC694:", error)
|
|
1048
1133
|
}
|
|
1049
1134
|
);
|
|
1135
|
+
if (isMinVersionSupported2(MIN_VERSION.PERMISSIONS_MENU)) {
|
|
1136
|
+
INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
|
|
1137
|
+
"getAllPermission",
|
|
1138
|
+
{},
|
|
1139
|
+
{
|
|
1140
|
+
onSuccess: (permissions) => setIsPermissionsMenuSupported(permissions.length > 0),
|
|
1141
|
+
onError: (error) => console.error("\uAD8C\uD55C \uBAA9\uB85D\uC744 \uAC00\uC838\uC624\uB294 \uB370 \uC2E4\uD328\uD588\uC5B4\uC694:", error)
|
|
1142
|
+
}
|
|
1143
|
+
);
|
|
1144
|
+
}
|
|
1050
1145
|
}, [isBottomSheetSupported]);
|
|
1051
1146
|
const onClickHandler = async () => {
|
|
1052
1147
|
logging.open();
|
|
@@ -1062,17 +1157,17 @@ function useMoreButtonBottomSheet() {
|
|
|
1062
1157
|
logging.close();
|
|
1063
1158
|
close();
|
|
1064
1159
|
};
|
|
1065
|
-
return /* @__PURE__ */
|
|
1160
|
+
return /* @__PURE__ */ jsx8(BottomSheetImpressionArea, { children: /* @__PURE__ */ jsx8(
|
|
1066
1161
|
BottomSheet.Root,
|
|
1067
1162
|
{
|
|
1068
|
-
header: /* @__PURE__ */
|
|
1163
|
+
header: /* @__PURE__ */ jsx8(
|
|
1069
1164
|
ListHeader,
|
|
1070
1165
|
{
|
|
1071
|
-
title: /* @__PURE__ */
|
|
1166
|
+
title: /* @__PURE__ */ jsx8(ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
|
|
1072
1167
|
}
|
|
1073
1168
|
),
|
|
1074
1169
|
open: isOpen,
|
|
1075
|
-
cta: /* @__PURE__ */
|
|
1170
|
+
cta: /* @__PURE__ */ jsx8(
|
|
1076
1171
|
BottomSheet.CTA,
|
|
1077
1172
|
{
|
|
1078
1173
|
size: "large",
|
|
@@ -1087,36 +1182,19 @@ function useMoreButtonBottomSheet() {
|
|
|
1087
1182
|
onClose: handleClose,
|
|
1088
1183
|
onExited: exit,
|
|
1089
1184
|
children: /* @__PURE__ */ jsxs2(List, { rowSeparator: "none", children: [
|
|
1090
|
-
itemList.map(
|
|
1091
|
-
|
|
1092
|
-
|
|
1185
|
+
itemList.map(
|
|
1186
|
+
(item) => /* @__PURE__ */ jsx8(
|
|
1187
|
+
Menu,
|
|
1093
1188
|
{
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
color: globals.brandPrimaryColor,
|
|
1098
|
-
source: { uri: item.contactIconUrl },
|
|
1099
|
-
type: "background"
|
|
1100
|
-
}
|
|
1101
|
-
),
|
|
1102
|
-
contents: /* @__PURE__ */ jsx6(
|
|
1103
|
-
ListRow2.Texts,
|
|
1104
|
-
{
|
|
1105
|
-
type: "1RowTypeA",
|
|
1106
|
-
top: item.contactItemName,
|
|
1107
|
-
topProps: { color: adaptive.grey700 }
|
|
1108
|
-
}
|
|
1109
|
-
),
|
|
1110
|
-
verticalPadding: "extraSmall",
|
|
1111
|
-
onPress: () => {
|
|
1112
|
-
logging.menuClick({ title: item.contactItemName });
|
|
1113
|
-
openURL4(item.contactUri);
|
|
1114
|
-
}
|
|
1189
|
+
title: item.contactItemName,
|
|
1190
|
+
iconURL: item.contactIconUrl,
|
|
1191
|
+
onPress: () => openURL5(item.contactUri)
|
|
1115
1192
|
},
|
|
1116
1193
|
item.contactItemName
|
|
1117
|
-
)
|
|
1118
|
-
|
|
1119
|
-
isShareListMenuSupported && /* @__PURE__ */
|
|
1194
|
+
)
|
|
1195
|
+
),
|
|
1196
|
+
isShareListMenuSupported && /* @__PURE__ */ jsx8(AppShareListMenu, {}),
|
|
1197
|
+
isPermissionsMenuSupported && /* @__PURE__ */ jsx8(PermissionsMenu, {})
|
|
1120
1198
|
] })
|
|
1121
1199
|
}
|
|
1122
1200
|
) });
|
|
@@ -1129,12 +1207,12 @@ function BottomSheetImpressionArea({ children }) {
|
|
|
1129
1207
|
useEffect7(() => {
|
|
1130
1208
|
logging.show();
|
|
1131
1209
|
}, [logging]);
|
|
1132
|
-
return /* @__PURE__ */
|
|
1210
|
+
return /* @__PURE__ */ jsx8(Fragment3, { children });
|
|
1133
1211
|
}
|
|
1134
1212
|
|
|
1135
1213
|
// src/components/NavigationBar/common/NavigationBarImpressionArea.tsx
|
|
1136
1214
|
import { useEffect as useEffect8, useRef as useRef3 } from "react";
|
|
1137
|
-
import { Fragment as Fragment4, jsx as
|
|
1215
|
+
import { Fragment as Fragment4, jsx as jsx9 } from "react/jsx-runtime";
|
|
1138
1216
|
function NavigationBarImpressionArea({
|
|
1139
1217
|
children,
|
|
1140
1218
|
withHomeButton
|
|
@@ -1147,11 +1225,11 @@ function NavigationBarImpressionArea({
|
|
|
1147
1225
|
hasLogged.current = true;
|
|
1148
1226
|
}
|
|
1149
1227
|
}, [logging, withHomeButton]);
|
|
1150
|
-
return /* @__PURE__ */
|
|
1228
|
+
return /* @__PURE__ */ jsx9(Fragment4, { children });
|
|
1151
1229
|
}
|
|
1152
1230
|
|
|
1153
1231
|
// src/components/NavigationBar/RNNavigationBar/Default.tsx
|
|
1154
|
-
import { jsx as
|
|
1232
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1155
1233
|
function DefaultNavigationBar() {
|
|
1156
1234
|
const globals = getAppsInTossGlobals();
|
|
1157
1235
|
const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
|
|
@@ -1161,7 +1239,7 @@ function DefaultNavigationBar() {
|
|
|
1161
1239
|
const { navigationRightButton } = useNavigationBarContext();
|
|
1162
1240
|
const navigationEvent = useNavigationEvent();
|
|
1163
1241
|
useHardwareBackPress(navigationEvent.handleBack);
|
|
1164
|
-
return /* @__PURE__ */
|
|
1242
|
+
return /* @__PURE__ */ jsx10(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx10(
|
|
1165
1243
|
TopNavigation,
|
|
1166
1244
|
{
|
|
1167
1245
|
title: globals.brandDisplayName,
|
|
@@ -1172,7 +1250,8 @@ function DefaultNavigationBar() {
|
|
|
1172
1250
|
onPressClose: navigationEvent.handleCloseButtonClick,
|
|
1173
1251
|
withHome: withHomeButton,
|
|
1174
1252
|
fixedRightButton: navigationRightButton,
|
|
1175
|
-
|
|
1253
|
+
leftVisible: withBackButton,
|
|
1254
|
+
children: /* @__PURE__ */ jsx10(NavigationLeft, { visible: withBackButton, children: /* @__PURE__ */ jsx10(NavigationBackButton, { onPress: navigationEvent.handleBack, canGoBack: false }) })
|
|
1176
1255
|
}
|
|
1177
1256
|
) });
|
|
1178
1257
|
}
|
|
@@ -1181,8 +1260,8 @@ function DefaultNavigationBar() {
|
|
|
1181
1260
|
import { useSafeAreaInsets } from "@granite-js/native/react-native-safe-area-context";
|
|
1182
1261
|
import { PageNavbar } from "@toss/tds-react-native";
|
|
1183
1262
|
import { NavigationRightContent, useSafeAreaTop } from "@toss/tds-react-native/private";
|
|
1184
|
-
import { Platform as Platform2, View as
|
|
1185
|
-
import { Fragment as Fragment5, jsx as
|
|
1263
|
+
import { Platform as Platform2, View as View3 } from "react-native";
|
|
1264
|
+
import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1186
1265
|
function GameNavigationBar() {
|
|
1187
1266
|
const safeAreaTop = useSafeAreaTop();
|
|
1188
1267
|
const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
|
|
@@ -1191,9 +1270,9 @@ function GameNavigationBar() {
|
|
|
1191
1270
|
const { right: safeAreaRight } = useSafeAreaInsets();
|
|
1192
1271
|
useHardwareBackPress(navigationEvent.handleBack);
|
|
1193
1272
|
return /* @__PURE__ */ jsxs3(Fragment5, { children: [
|
|
1194
|
-
/* @__PURE__ */
|
|
1195
|
-
/* @__PURE__ */
|
|
1196
|
-
|
|
1273
|
+
/* @__PURE__ */ jsx11(PageNavbar, { preference: { type: "none" } }),
|
|
1274
|
+
/* @__PURE__ */ jsx11(
|
|
1275
|
+
View3,
|
|
1197
1276
|
{
|
|
1198
1277
|
style: {
|
|
1199
1278
|
width: "100%",
|
|
@@ -1208,7 +1287,7 @@ function GameNavigationBar() {
|
|
|
1208
1287
|
paddingRight: safeAreaRight + 10
|
|
1209
1288
|
},
|
|
1210
1289
|
pointerEvents: "box-none",
|
|
1211
|
-
children: /* @__PURE__ */
|
|
1290
|
+
children: /* @__PURE__ */ jsx11(
|
|
1212
1291
|
NavigationRightContent,
|
|
1213
1292
|
{
|
|
1214
1293
|
fixedRightButton: navigationRightButton,
|
|
@@ -1238,15 +1317,15 @@ import * as constant_bridges_star from "@apps-in-toss/native-modules/constant-br
|
|
|
1238
1317
|
import * as event_bridges_star from "@apps-in-toss/native-modules/event-bridges";
|
|
1239
1318
|
|
|
1240
1319
|
// src/components/RNAppContainer.tsx
|
|
1241
|
-
import { Fragment as Fragment6, jsx as
|
|
1320
|
+
import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1242
1321
|
function RNAppContainer({ children }) {
|
|
1243
1322
|
const global2 = getAppsInTossGlobals();
|
|
1244
1323
|
switch (global2.appType) {
|
|
1245
1324
|
case "game":
|
|
1246
|
-
return /* @__PURE__ */
|
|
1325
|
+
return /* @__PURE__ */ jsx12(GameAppContainer, { children });
|
|
1247
1326
|
case "general":
|
|
1248
1327
|
default:
|
|
1249
|
-
return /* @__PURE__ */
|
|
1328
|
+
return /* @__PURE__ */ jsx12(GeneralAppContainer, { children });
|
|
1250
1329
|
}
|
|
1251
1330
|
}
|
|
1252
1331
|
function GameAppContainer({ children }) {
|
|
@@ -1268,40 +1347,40 @@ function GameAppContainer({ children }) {
|
|
|
1268
1347
|
});
|
|
1269
1348
|
}, []);
|
|
1270
1349
|
return /* @__PURE__ */ jsxs4(Fragment6, { children: [
|
|
1271
|
-
/* @__PURE__ */
|
|
1272
|
-
(0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */
|
|
1350
|
+
/* @__PURE__ */ jsx12(RNNavigationBar.Game, {}),
|
|
1351
|
+
(0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ jsx12(GameInitializer, { isReadyForProfileUI: isEntryMessageExited, children }) : children
|
|
1273
1352
|
] });
|
|
1274
1353
|
}
|
|
1275
1354
|
function GeneralAppContainer({ children }) {
|
|
1276
1355
|
return /* @__PURE__ */ jsxs4(Fragment6, { children: [
|
|
1277
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ jsx12(RNNavigationBar.Default, {}),
|
|
1278
1357
|
children
|
|
1279
1358
|
] });
|
|
1280
1359
|
}
|
|
1281
1360
|
|
|
1282
1361
|
// src/core/registerApp.tsx
|
|
1283
|
-
import { Fragment as Fragment7, jsx as
|
|
1362
|
+
import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1284
1363
|
function AppsInTossContainer(Container, { children, ...initialProps }) {
|
|
1285
1364
|
if (!isMinVersionSupported3({
|
|
1286
1365
|
android: "5.220.0",
|
|
1287
1366
|
ios: "5.221.0"
|
|
1288
1367
|
})) {
|
|
1289
1368
|
return /* @__PURE__ */ jsxs5(Fragment7, { children: [
|
|
1290
|
-
/* @__PURE__ */
|
|
1291
|
-
/* @__PURE__ */
|
|
1292
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ jsx13(AppEvent.Entry, {}),
|
|
1370
|
+
/* @__PURE__ */ jsx13(AppEvent.System, { ...initialProps }),
|
|
1371
|
+
/* @__PURE__ */ jsx13(AppUpdate, {})
|
|
1293
1372
|
] });
|
|
1294
1373
|
}
|
|
1295
1374
|
return /* @__PURE__ */ jsxs5(Fragment7, { children: [
|
|
1296
|
-
/* @__PURE__ */
|
|
1297
|
-
/* @__PURE__ */
|
|
1298
|
-
/* @__PURE__ */
|
|
1299
|
-
/* @__PURE__ */
|
|
1375
|
+
/* @__PURE__ */ jsx13(AppEvent.StayTime, {}),
|
|
1376
|
+
/* @__PURE__ */ jsx13(AppEvent.Entry, {}),
|
|
1377
|
+
/* @__PURE__ */ jsx13(AppEvent.System, { ...initialProps }),
|
|
1378
|
+
/* @__PURE__ */ jsx13(Container, { ...initialProps, children: /* @__PURE__ */ jsx13(TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children: /* @__PURE__ */ jsx13(TDSContainer, { ...initialProps, children }) }) })
|
|
1300
1379
|
] });
|
|
1301
1380
|
}
|
|
1302
1381
|
function TDSContainer({ children }) {
|
|
1303
1382
|
useAppsInTossBridge();
|
|
1304
|
-
return /* @__PURE__ */
|
|
1383
|
+
return /* @__PURE__ */ jsx13(Fragment7, { children });
|
|
1305
1384
|
}
|
|
1306
1385
|
function registerApp(container, { context, analytics }) {
|
|
1307
1386
|
const appName = getAppName();
|
|
@@ -1311,7 +1390,7 @@ function registerApp(container, { context, analytics }) {
|
|
|
1311
1390
|
logger: (params) => void eventLog(params),
|
|
1312
1391
|
debug: analytics?.debug ?? __DEV__
|
|
1313
1392
|
});
|
|
1314
|
-
const App =
|
|
1393
|
+
const App = Granite7.registerApp(AppsInTossContainer.bind(null, container), {
|
|
1315
1394
|
appName,
|
|
1316
1395
|
context,
|
|
1317
1396
|
setIosSwipeGestureEnabled: setIosSwipeGestureEnabled2,
|
|
@@ -1328,7 +1407,7 @@ function registerApp(container, { context, analytics }) {
|
|
|
1328
1407
|
}
|
|
1329
1408
|
function AppsInTossScreenContainer({ children }) {
|
|
1330
1409
|
const isRNApp = getAppsInTossGlobals().webViewType == null;
|
|
1331
|
-
return /* @__PURE__ */
|
|
1410
|
+
return /* @__PURE__ */ jsx13(NavigationBarContextProvider, { children: /* @__PURE__ */ jsx13(Analytics.Screen, { children: isRNApp ? /* @__PURE__ */ jsx13(RNAppContainer, { children }) : children }) });
|
|
1332
1411
|
}
|
|
1333
1412
|
function getAppName() {
|
|
1334
1413
|
try {
|
|
@@ -1347,7 +1426,7 @@ var AppsInToss = {
|
|
|
1347
1426
|
// src/components/WebView.tsx
|
|
1348
1427
|
import {
|
|
1349
1428
|
AppsInTossModule,
|
|
1350
|
-
GoogleAdMob,
|
|
1429
|
+
GoogleAdMob as GoogleAdMob2,
|
|
1351
1430
|
IAP,
|
|
1352
1431
|
Storage,
|
|
1353
1432
|
appsInTossEvent as appsInTossEvent4,
|
|
@@ -1359,14 +1438,14 @@ import * as appsInTossAsyncBridges from "@apps-in-toss/native-modules/async-brid
|
|
|
1359
1438
|
import * as appsInTossConstantBridges from "@apps-in-toss/native-modules/constant-bridges";
|
|
1360
1439
|
import * as appsInTossEventBridges from "@apps-in-toss/native-modules/event-bridges";
|
|
1361
1440
|
import { useSafeAreaInsets as useSafeAreaInsets4 } from "@granite-js/native/react-native-safe-area-context";
|
|
1362
|
-
import { getSchemeUri as
|
|
1441
|
+
import { getSchemeUri as getSchemeUri8 } from "@granite-js/react-native";
|
|
1363
1442
|
import { ExternalWebViewScreen, tdsEvent } from "@toss/tds-react-native";
|
|
1364
1443
|
import { useSafeAreaBottom, useSafeAreaTop as useSafeAreaTop3 } from "@toss/tds-react-native/private";
|
|
1365
1444
|
import { useEffect as useEffect14, useMemo as useMemo7, useRef as useRef6, useState as useState8 } from "react";
|
|
1366
|
-
import { BackHandler as BackHandler2, Platform as Platform6 } from "react-native";
|
|
1445
|
+
import { BackHandler as BackHandler2, Linking, Platform as Platform6 } from "react-native";
|
|
1367
1446
|
|
|
1368
1447
|
// src/components/GameWebView.tsx
|
|
1369
|
-
import { setIosSwipeGestureEnabled as setIosSwipeGestureEnabled3, appsInTossEvent as appsInTossEvent3, getOperationalEnvironment as
|
|
1448
|
+
import { setIosSwipeGestureEnabled as setIosSwipeGestureEnabled3, appsInTossEvent as appsInTossEvent3, getOperationalEnvironment as getOperationalEnvironment4 } from "@apps-in-toss/native-modules";
|
|
1370
1449
|
import {
|
|
1371
1450
|
WebView as PlainWebView
|
|
1372
1451
|
} from "@granite-js/native/react-native-webview";
|
|
@@ -1380,8 +1459,8 @@ import { PageNavbar as PageNavbar2, useDialog as useDialog5 } from "@toss/tds-re
|
|
|
1380
1459
|
import { NavigationRightContent as NavigationRightContent2, useSafeAreaTop as useSafeAreaTop2 } from "@toss/tds-react-native/private";
|
|
1381
1460
|
import { josa as josa3 } from "es-hangul";
|
|
1382
1461
|
import { useCallback as useCallback8 } from "react";
|
|
1383
|
-
import { Platform as Platform4, View as
|
|
1384
|
-
import { Fragment as Fragment8, jsx as
|
|
1462
|
+
import { Platform as Platform4, View as View4 } from "react-native";
|
|
1463
|
+
import { Fragment as Fragment8, jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1385
1464
|
function GameWebviewNavigationBar() {
|
|
1386
1465
|
const safeAreaTop = useSafeAreaTop2();
|
|
1387
1466
|
const { openConfirm } = useDialog5();
|
|
@@ -1407,9 +1486,9 @@ function GameWebviewNavigationBar() {
|
|
|
1407
1486
|
}
|
|
1408
1487
|
}, [captureExitLog, global2.brandDisplayName, logging, openConfirm]);
|
|
1409
1488
|
return /* @__PURE__ */ jsxs6(Fragment8, { children: [
|
|
1410
|
-
/* @__PURE__ */
|
|
1411
|
-
/* @__PURE__ */
|
|
1412
|
-
|
|
1489
|
+
/* @__PURE__ */ jsx14(PageNavbar2, { preference: { type: "none" } }),
|
|
1490
|
+
/* @__PURE__ */ jsx14(
|
|
1491
|
+
View4,
|
|
1413
1492
|
{
|
|
1414
1493
|
style: {
|
|
1415
1494
|
width: "100%",
|
|
@@ -1424,7 +1503,7 @@ function GameWebviewNavigationBar() {
|
|
|
1424
1503
|
paddingRight: safeAreaRight + 10
|
|
1425
1504
|
},
|
|
1426
1505
|
pointerEvents: "box-none",
|
|
1427
|
-
children: /* @__PURE__ */
|
|
1506
|
+
children: /* @__PURE__ */ jsx14(
|
|
1428
1507
|
NavigationRightContent2,
|
|
1429
1508
|
{
|
|
1430
1509
|
fixedRightButton: navigationRightButton,
|
|
@@ -1441,7 +1520,7 @@ function GameWebviewNavigationBar() {
|
|
|
1441
1520
|
}
|
|
1442
1521
|
|
|
1443
1522
|
// src/components/GameWebView.tsx
|
|
1444
|
-
import { Fragment as Fragment9, jsx as
|
|
1523
|
+
import { Fragment as Fragment9, jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1445
1524
|
var GameWebView = forwardRef(function GameWebView2(props, ref) {
|
|
1446
1525
|
const [isEntryMessageExited, setIsEntryMessageExited] = useState6(false);
|
|
1447
1526
|
useEffect10(() => {
|
|
@@ -1461,8 +1540,8 @@ var GameWebView = forwardRef(function GameWebView2(props, ref) {
|
|
|
1461
1540
|
});
|
|
1462
1541
|
}, []);
|
|
1463
1542
|
return /* @__PURE__ */ jsxs7(Fragment9, { children: [
|
|
1464
|
-
/* @__PURE__ */
|
|
1465
|
-
|
|
1543
|
+
/* @__PURE__ */ jsx15(GameWebviewNavigationBar, {}),
|
|
1544
|
+
getOperationalEnvironment4() === "toss" ? /* @__PURE__ */ jsx15(GameInitializer, { isReadyForProfileUI: isEntryMessageExited, children: /* @__PURE__ */ jsx15(PlainWebView, { ref, ...props }) }) : /* @__PURE__ */ jsx15(PlainWebView, { ref, ...props })
|
|
1466
1545
|
] });
|
|
1467
1546
|
});
|
|
1468
1547
|
|
|
@@ -1478,7 +1557,7 @@ import { useDialog as useDialog6 } from "@toss/tds-react-native";
|
|
|
1478
1557
|
import { NavigationBackButton as NavigationBackButton2, NavigationLeft as NavigationLeft2, TopNavigation as TopNavigation2 } from "@toss/tds-react-native/private";
|
|
1479
1558
|
import { josa as josa4 } from "es-hangul";
|
|
1480
1559
|
import { useCallback as useCallback9 } from "react";
|
|
1481
|
-
import { jsx as
|
|
1560
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1482
1561
|
function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
|
|
1483
1562
|
const globals = getAppsInTossGlobals();
|
|
1484
1563
|
const { captureExitLog } = useCaptureExitLog();
|
|
@@ -1504,7 +1583,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
|
|
|
1504
1583
|
closeView5();
|
|
1505
1584
|
}
|
|
1506
1585
|
}, [captureExitLog, globals.brandDisplayName, logging, openConfirm]);
|
|
1507
|
-
return /* @__PURE__ */
|
|
1586
|
+
return /* @__PURE__ */ jsx16(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx16(
|
|
1508
1587
|
TopNavigation2,
|
|
1509
1588
|
{
|
|
1510
1589
|
title: globals.brandDisplayName,
|
|
@@ -1515,20 +1594,383 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
|
|
|
1515
1594
|
onPressClose: handleClose,
|
|
1516
1595
|
withHome: withHomeButton,
|
|
1517
1596
|
fixedRightButton: navigationRightButton,
|
|
1518
|
-
|
|
1597
|
+
leftVisible: withBackButton,
|
|
1598
|
+
children: /* @__PURE__ */ jsx16(NavigationLeft2, { visible: withBackButton, children: /* @__PURE__ */ jsx16(NavigationBackButton2, { onPress: onBackButtonClick, canGoBack: false }) })
|
|
1519
1599
|
}
|
|
1520
1600
|
) });
|
|
1521
1601
|
}
|
|
1522
1602
|
|
|
1523
1603
|
// src/components/PartnerWebView.tsx
|
|
1524
|
-
import { Fragment as Fragment10, jsx as
|
|
1604
|
+
import { Fragment as Fragment10, jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1525
1605
|
var PartnerWebView = forwardRef2(function PartnerWebViewScreen({ onBackButtonClick, onHomeButtonClick, ...webViewProps }, ref) {
|
|
1526
1606
|
return /* @__PURE__ */ jsxs8(Fragment10, { children: [
|
|
1527
|
-
/* @__PURE__ */
|
|
1528
|
-
/* @__PURE__ */
|
|
1607
|
+
/* @__PURE__ */ jsx17(PartnerWebviewNavigationBar, { onBackButtonClick, onHomeButtonClick }),
|
|
1608
|
+
/* @__PURE__ */ jsx17(PlainWebView2, { ref, ...webViewProps, style: { flex: 1 } })
|
|
1529
1609
|
] });
|
|
1530
1610
|
});
|
|
1531
1611
|
|
|
1612
|
+
// src/components/utils/url.ts
|
|
1613
|
+
function convertIntentURL(url) {
|
|
1614
|
+
if (url.protocol !== "intent:") {
|
|
1615
|
+
return null;
|
|
1616
|
+
}
|
|
1617
|
+
const components = url.hash.replace("#Intent;", "").split(";").map((component) => component.split("="));
|
|
1618
|
+
const scheme = components.find(([key]) => key === "scheme")?.[1];
|
|
1619
|
+
if (!scheme) {
|
|
1620
|
+
return null;
|
|
1621
|
+
}
|
|
1622
|
+
return `${scheme}://${url.hostname}${url.pathname}${url.search}`;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
// src/ads/fetchTossAd.ts
|
|
1626
|
+
import { getOperationalEnvironment as getOperationalEnvironment5, INTERNAL__appBridgeHandler as INTERNAL__appBridgeHandler2, isMinVersionSupported as isMinVersionSupported4 } from "@apps-in-toss/native-modules";
|
|
1627
|
+
|
|
1628
|
+
// ../../.yarn/cache/es-toolkit-npm-1.34.1-4cd6371dcb-aab6d07be3.zip/node_modules/es-toolkit/dist/function/noop.mjs
|
|
1629
|
+
function noop() {
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
// src/ads/generateSessionId.ts
|
|
1633
|
+
function generateSessionId() {
|
|
1634
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
1635
|
+
const r = Math.random() * 16 | 0;
|
|
1636
|
+
const v = c === "x" ? r : r & 3 | 8;
|
|
1637
|
+
return v.toString(16);
|
|
1638
|
+
});
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
// src/ads/constants.ts
|
|
1642
|
+
var sessionId = generateSessionId();
|
|
1643
|
+
|
|
1644
|
+
// src/ads/fetchTossAd.ts
|
|
1645
|
+
var ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.239.0";
|
|
1646
|
+
var IOS_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.239.0";
|
|
1647
|
+
var UNSUPPORTED_ERROR_MESSAGE = "This feature is not supported in the current environment";
|
|
1648
|
+
var ENVIRONMENT = getOperationalEnvironment5();
|
|
1649
|
+
function fetchTossAd(params) {
|
|
1650
|
+
if (!fetchTossAd.isSupported()) {
|
|
1651
|
+
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE));
|
|
1652
|
+
return noop;
|
|
1653
|
+
}
|
|
1654
|
+
const { onEvent, onError, options } = params;
|
|
1655
|
+
const { adGroupId } = options;
|
|
1656
|
+
const unregisterCallbacks = INTERNAL__appBridgeHandler2.invokeAppBridgeMethod(
|
|
1657
|
+
"fetchTossAd",
|
|
1658
|
+
{ spaceUnitId: adGroupId, sessionId },
|
|
1659
|
+
{
|
|
1660
|
+
onSuccess: (response) => {
|
|
1661
|
+
onEvent(response);
|
|
1662
|
+
},
|
|
1663
|
+
onError: (error) => {
|
|
1664
|
+
onError(error);
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
);
|
|
1668
|
+
return unregisterCallbacks;
|
|
1669
|
+
}
|
|
1670
|
+
fetchTossAd.isSupported = () => {
|
|
1671
|
+
if (ENVIRONMENT !== "toss") {
|
|
1672
|
+
return false;
|
|
1673
|
+
}
|
|
1674
|
+
return isMinVersionSupported4({
|
|
1675
|
+
android: ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION,
|
|
1676
|
+
ios: IOS_FETCH_TOSS_AD_SUPPORTED_VERSION
|
|
1677
|
+
});
|
|
1678
|
+
};
|
|
1679
|
+
|
|
1680
|
+
// src/ads/integratedAd.ts
|
|
1681
|
+
import { GoogleAdMob, INTERNAL__appBridgeHandler as INTERNAL__appBridgeHandler3, isMinVersionSupported as isMinVersionSupported5 } from "@apps-in-toss/native-modules";
|
|
1682
|
+
|
|
1683
|
+
// src/ads/generateRequestId.ts
|
|
1684
|
+
function generateRequestId() {
|
|
1685
|
+
const timestamp = Date.now().toString(36).toUpperCase();
|
|
1686
|
+
const random = Math.random().toString(36).substring(2, 7).toUpperCase();
|
|
1687
|
+
return `ait-${timestamp}${random}`;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
// src/ads/getReferrer.ts
|
|
1691
|
+
import { getSchemeUri as getSchemeUri5 } from "@granite-js/react-native";
|
|
1692
|
+
function getReferrer() {
|
|
1693
|
+
try {
|
|
1694
|
+
return new URL(getSchemeUri5()).searchParams.get("referrer");
|
|
1695
|
+
} catch {
|
|
1696
|
+
return null;
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
// src/ads/remotes.ts
|
|
1701
|
+
import { getOperationalEnvironment as getOperationalEnvironment6, getPlatformOS, getTossAppVersion } from "@apps-in-toss/native-modules";
|
|
1702
|
+
|
|
1703
|
+
// src/ads/getIsDev.ts
|
|
1704
|
+
import { getSchemeUri as getSchemeUri6 } from "@granite-js/react-native";
|
|
1705
|
+
function getIsDev() {
|
|
1706
|
+
try {
|
|
1707
|
+
return new URL(getSchemeUri6()).searchParams.get("isDev") === "true";
|
|
1708
|
+
} catch {
|
|
1709
|
+
return false;
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
// src/ads/remotes.ts
|
|
1714
|
+
var OPERATIONAL_ENVIRONMENT = getOperationalEnvironment6();
|
|
1715
|
+
var OS = getPlatformOS();
|
|
1716
|
+
var APP_VER = getTossAppVersion();
|
|
1717
|
+
var ALPHA_EVENT_TRACKER_HTTP_ENDPOINT = "https://alpha-trillion.toss.im/trk/sdk-mediation/event";
|
|
1718
|
+
var LIVE_EVENT_TRACKER_HTTP_ENDPOINT = "https://trillion.toss.im/trk/sdk-mediation/event";
|
|
1719
|
+
function getPostEventTrackingUrl() {
|
|
1720
|
+
const isDev = getIsDev();
|
|
1721
|
+
if (OPERATIONAL_ENVIRONMENT === "sandbox" || isDev) {
|
|
1722
|
+
return ALPHA_EVENT_TRACKER_HTTP_ENDPOINT;
|
|
1723
|
+
}
|
|
1724
|
+
return LIVE_EVENT_TRACKER_HTTP_ENDPOINT;
|
|
1725
|
+
}
|
|
1726
|
+
function postEventTracking(params) {
|
|
1727
|
+
const endpoint = getPostEventTrackingUrl();
|
|
1728
|
+
const bodyJSON = JSON.stringify({
|
|
1729
|
+
...params,
|
|
1730
|
+
os: OS,
|
|
1731
|
+
appVer: APP_VER,
|
|
1732
|
+
deviceIdType: "NONE",
|
|
1733
|
+
platform: "RN"
|
|
1734
|
+
});
|
|
1735
|
+
return fetch(
|
|
1736
|
+
endpoint,
|
|
1737
|
+
{
|
|
1738
|
+
method: "POST",
|
|
1739
|
+
headers: {
|
|
1740
|
+
"Content-Type": "application/json"
|
|
1741
|
+
},
|
|
1742
|
+
body: bodyJSON
|
|
1743
|
+
}
|
|
1744
|
+
).catch(noop);
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
// src/ads/integratedAd.ts
|
|
1748
|
+
var INTEGRATED_AD_SDK_VERSION = "0.0.0";
|
|
1749
|
+
var ANDROID_INTEGRATED_AD_SUPPORTED_VERSION = "5.239.0";
|
|
1750
|
+
var IOS_INTEGRATED_AD_SUPPORTED_VERSION = "5.239.0";
|
|
1751
|
+
var UNSUPPORTED_ERROR_MESSAGE2 = "This feature is not supported in the current environment";
|
|
1752
|
+
var INTG_AD_ADM_FALLBACK_RID_MAP = {};
|
|
1753
|
+
function integratedAdIsSupported() {
|
|
1754
|
+
return isMinVersionSupported5({
|
|
1755
|
+
android: ANDROID_INTEGRATED_AD_SUPPORTED_VERSION,
|
|
1756
|
+
ios: IOS_INTEGRATED_AD_SUPPORTED_VERSION
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
function loadFullScreenAd(params) {
|
|
1760
|
+
if (!GoogleAdMob.loadAppsInTossAdMob.isSupported()) {
|
|
1761
|
+
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
|
|
1762
|
+
return noop;
|
|
1763
|
+
}
|
|
1764
|
+
if (!integratedAdIsSupported()) {
|
|
1765
|
+
return GoogleAdMob.loadAppsInTossAdMob({
|
|
1766
|
+
...params,
|
|
1767
|
+
onEvent: (event) => {
|
|
1768
|
+
if (event.type === "loaded") {
|
|
1769
|
+
const requestId = generateRequestId();
|
|
1770
|
+
INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] = requestId;
|
|
1771
|
+
postEventTracking({
|
|
1772
|
+
eventName: "LOAD",
|
|
1773
|
+
spaceUnitId: params.options.adGroupId,
|
|
1774
|
+
requestId,
|
|
1775
|
+
responseId: event.data.responseInfo.responseId,
|
|
1776
|
+
mediationType: "ADMOB",
|
|
1777
|
+
format: "",
|
|
1778
|
+
adSourceName: event.data.responseInfo.loadedAdNetworkInfo?.adSourceName ?? "",
|
|
1779
|
+
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1780
|
+
});
|
|
1781
|
+
}
|
|
1782
|
+
return params.onEvent(event);
|
|
1783
|
+
},
|
|
1784
|
+
onError: (error) => {
|
|
1785
|
+
const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
|
|
1786
|
+
postEventTracking({
|
|
1787
|
+
eventName: "FAILED_TO_LOAD",
|
|
1788
|
+
spaceUnitId: params.options.adGroupId,
|
|
1789
|
+
requestId,
|
|
1790
|
+
responseId: "",
|
|
1791
|
+
mediationType: "ADMOB",
|
|
1792
|
+
format: "",
|
|
1793
|
+
adSourceName: "",
|
|
1794
|
+
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1795
|
+
});
|
|
1796
|
+
return params.onError(error);
|
|
1797
|
+
}
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
const { onEvent, onError, options } = params;
|
|
1801
|
+
const { adGroupId } = options;
|
|
1802
|
+
const referrer = getReferrer();
|
|
1803
|
+
const unregisterCallbacks = INTERNAL__appBridgeHandler3.invokeAppBridgeMethod(
|
|
1804
|
+
"loadTossAdOrAdmob",
|
|
1805
|
+
{ spaceUnitId: adGroupId, referrer, sessionId },
|
|
1806
|
+
{
|
|
1807
|
+
onSuccess: () => {
|
|
1808
|
+
onEvent({ type: "loaded" });
|
|
1809
|
+
},
|
|
1810
|
+
onError: (error) => {
|
|
1811
|
+
onError(error);
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
);
|
|
1815
|
+
return unregisterCallbacks;
|
|
1816
|
+
}
|
|
1817
|
+
loadFullScreenAd.isSupported = GoogleAdMob.loadAppsInTossAdMob.isSupported;
|
|
1818
|
+
function showFullScreenAd(params) {
|
|
1819
|
+
if (!GoogleAdMob.showAppsInTossAdMob.isSupported()) {
|
|
1820
|
+
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
|
|
1821
|
+
return noop;
|
|
1822
|
+
}
|
|
1823
|
+
if (!integratedAdIsSupported()) {
|
|
1824
|
+
return GoogleAdMob.showAppsInTossAdMob({
|
|
1825
|
+
...params,
|
|
1826
|
+
onEvent: (event) => {
|
|
1827
|
+
const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
|
|
1828
|
+
switch (event.type) {
|
|
1829
|
+
case "show":
|
|
1830
|
+
postEventTracking({
|
|
1831
|
+
eventName: "SHOW",
|
|
1832
|
+
spaceUnitId: params.options.adGroupId,
|
|
1833
|
+
requestId,
|
|
1834
|
+
responseId: "",
|
|
1835
|
+
mediationType: "ADMOB",
|
|
1836
|
+
format: "",
|
|
1837
|
+
adSourceName: "",
|
|
1838
|
+
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1839
|
+
});
|
|
1840
|
+
break;
|
|
1841
|
+
case "failedToShow":
|
|
1842
|
+
postEventTracking({
|
|
1843
|
+
eventName: "FAILED_TO_SHOW",
|
|
1844
|
+
spaceUnitId: params.options.adGroupId,
|
|
1845
|
+
requestId,
|
|
1846
|
+
responseId: "",
|
|
1847
|
+
mediationType: "ADMOB",
|
|
1848
|
+
format: "",
|
|
1849
|
+
adSourceName: "",
|
|
1850
|
+
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1851
|
+
});
|
|
1852
|
+
break;
|
|
1853
|
+
case "impression":
|
|
1854
|
+
postEventTracking({
|
|
1855
|
+
eventName: "IMP",
|
|
1856
|
+
spaceUnitId: params.options.adGroupId,
|
|
1857
|
+
requestId,
|
|
1858
|
+
responseId: "",
|
|
1859
|
+
mediationType: "ADMOB",
|
|
1860
|
+
format: "",
|
|
1861
|
+
adSourceName: "",
|
|
1862
|
+
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1863
|
+
});
|
|
1864
|
+
break;
|
|
1865
|
+
case "clicked":
|
|
1866
|
+
postEventTracking({
|
|
1867
|
+
eventName: "CLICK",
|
|
1868
|
+
spaceUnitId: params.options.adGroupId,
|
|
1869
|
+
requestId,
|
|
1870
|
+
responseId: "",
|
|
1871
|
+
mediationType: "ADMOB",
|
|
1872
|
+
format: "",
|
|
1873
|
+
adSourceName: "",
|
|
1874
|
+
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1875
|
+
});
|
|
1876
|
+
break;
|
|
1877
|
+
case "dismissed":
|
|
1878
|
+
postEventTracking({
|
|
1879
|
+
eventName: "DISMISS",
|
|
1880
|
+
spaceUnitId: params.options.adGroupId,
|
|
1881
|
+
requestId,
|
|
1882
|
+
responseId: "",
|
|
1883
|
+
mediationType: "ADMOB",
|
|
1884
|
+
format: "",
|
|
1885
|
+
adSourceName: "",
|
|
1886
|
+
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1887
|
+
});
|
|
1888
|
+
break;
|
|
1889
|
+
case "userEarnedReward":
|
|
1890
|
+
postEventTracking({
|
|
1891
|
+
eventName: "USER_EARNED_REWARD",
|
|
1892
|
+
spaceUnitId: params.options.adGroupId,
|
|
1893
|
+
requestId,
|
|
1894
|
+
responseId: "",
|
|
1895
|
+
mediationType: "ADMOB",
|
|
1896
|
+
format: "",
|
|
1897
|
+
adSourceName: "",
|
|
1898
|
+
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1899
|
+
});
|
|
1900
|
+
break;
|
|
1901
|
+
}
|
|
1902
|
+
return params.onEvent(event);
|
|
1903
|
+
},
|
|
1904
|
+
onError: (error) => {
|
|
1905
|
+
const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
|
|
1906
|
+
postEventTracking({
|
|
1907
|
+
eventName: "FAILED_TO_SHOW",
|
|
1908
|
+
spaceUnitId: params.options.adGroupId,
|
|
1909
|
+
requestId,
|
|
1910
|
+
responseId: "",
|
|
1911
|
+
mediationType: "ADMOB",
|
|
1912
|
+
format: "",
|
|
1913
|
+
adSourceName: "",
|
|
1914
|
+
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1915
|
+
});
|
|
1916
|
+
return params.onError(error);
|
|
1917
|
+
}
|
|
1918
|
+
});
|
|
1919
|
+
}
|
|
1920
|
+
const { onEvent, onError, options } = params;
|
|
1921
|
+
const { adGroupId } = options;
|
|
1922
|
+
const referrer = getReferrer();
|
|
1923
|
+
const unregisterCallbacks = INTERNAL__appBridgeHandler3.invokeAppBridgeMethod(
|
|
1924
|
+
"showTossAdOrAdmob",
|
|
1925
|
+
{ spaceUnitId: adGroupId, referrer, sessionId },
|
|
1926
|
+
{
|
|
1927
|
+
onAdClicked: () => {
|
|
1928
|
+
onEvent({ type: "clicked" });
|
|
1929
|
+
},
|
|
1930
|
+
onAdDismissed: () => {
|
|
1931
|
+
onEvent({ type: "dismissed" });
|
|
1932
|
+
},
|
|
1933
|
+
onAdFailedToShow: () => {
|
|
1934
|
+
onEvent({ type: "failedToShow" });
|
|
1935
|
+
},
|
|
1936
|
+
onAdImpression: () => {
|
|
1937
|
+
onEvent({ type: "impression" });
|
|
1938
|
+
},
|
|
1939
|
+
onAdShow: () => {
|
|
1940
|
+
onEvent({ type: "show" });
|
|
1941
|
+
},
|
|
1942
|
+
onUserEarnedReward: (data) => {
|
|
1943
|
+
onEvent({ type: "userEarnedReward", data });
|
|
1944
|
+
},
|
|
1945
|
+
onSuccess: () => {
|
|
1946
|
+
onEvent({ type: "requested" });
|
|
1947
|
+
},
|
|
1948
|
+
onError: (error) => {
|
|
1949
|
+
onError(error);
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
);
|
|
1953
|
+
return unregisterCallbacks;
|
|
1954
|
+
}
|
|
1955
|
+
showFullScreenAd.isSupported = GoogleAdMob.showAppsInTossAdMob.isSupported;
|
|
1956
|
+
|
|
1957
|
+
// src/ads/tossAdEventLog.ts
|
|
1958
|
+
import { INTERNAL__module as INTERNAL__module6 } from "@apps-in-toss/native-modules";
|
|
1959
|
+
import { Granite as Granite8 } from "@granite-js/react-native";
|
|
1960
|
+
async function tossAdEventLog(params) {
|
|
1961
|
+
const referrer = getReferrer();
|
|
1962
|
+
const appName = Granite8.appName;
|
|
1963
|
+
const eventLogParams = {
|
|
1964
|
+
...params,
|
|
1965
|
+
params: {
|
|
1966
|
+
...params.params,
|
|
1967
|
+
referrer,
|
|
1968
|
+
app_name: appName
|
|
1969
|
+
}
|
|
1970
|
+
};
|
|
1971
|
+
return INTERNAL__module6.tossCoreEventLog(eventLogParams);
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1532
1974
|
// src/bridge-handler/useBridgeHandler.tsx
|
|
1533
1975
|
import { useCallback as useCallback10, useEffect as useEffect11, useMemo as useMemo3, useRef as useRef4 } from "react";
|
|
1534
1976
|
function serializeError(error) {
|
|
@@ -1853,7 +2295,7 @@ function mergeRefs(...refs) {
|
|
|
1853
2295
|
}
|
|
1854
2296
|
|
|
1855
2297
|
// src/hooks/useCreateUserAgent.ts
|
|
1856
|
-
import { getPlatformOS, getTossAppVersion } from "@apps-in-toss/native-modules";
|
|
2298
|
+
import { getPlatformOS as getPlatformOS2, getTossAppVersion as getTossAppVersion2 } from "@apps-in-toss/native-modules";
|
|
1857
2299
|
import { useWindowDimensions } from "react-native";
|
|
1858
2300
|
var FontA11yCategory = {
|
|
1859
2301
|
Large: "Large",
|
|
@@ -1987,13 +2429,14 @@ function useCreateUserAgent({
|
|
|
1987
2429
|
safeArea,
|
|
1988
2430
|
safeAreaBottomTransparency
|
|
1989
2431
|
}) {
|
|
1990
|
-
const platform =
|
|
1991
|
-
const appVersion =
|
|
2432
|
+
const platform = getPlatformOS2();
|
|
2433
|
+
const appVersion = getTossAppVersion2();
|
|
1992
2434
|
const { fontScale } = useWindowDimensions();
|
|
1993
2435
|
const platformString = platform === "ios" ? "iPhone" : "Android phone";
|
|
1994
2436
|
const fontA11y = mapFontScaleToCategory(fontScale, platform);
|
|
1995
2437
|
const normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
|
|
1996
2438
|
return [
|
|
2439
|
+
"AppsInToss",
|
|
1997
2440
|
`TossApp/${appVersion}`,
|
|
1998
2441
|
batteryModePreference && `TossBatteryModePreference/${batteryModePreference}`,
|
|
1999
2442
|
colorPreference && `TossColorPreference/${colorPreference}`,
|
|
@@ -2073,7 +2516,7 @@ function useTopNavigation() {
|
|
|
2073
2516
|
|
|
2074
2517
|
// src/utils/log.ts
|
|
2075
2518
|
import { eventLog as eventLogNative } from "@apps-in-toss/native-modules";
|
|
2076
|
-
import { getSchemeUri as
|
|
2519
|
+
import { getSchemeUri as getSchemeUri7 } from "@granite-js/react-native";
|
|
2077
2520
|
|
|
2078
2521
|
// src/utils/extractDateFromUUIDv7.ts
|
|
2079
2522
|
var extractDateFromUUIDv7 = (uuid) => {
|
|
@@ -2097,9 +2540,9 @@ var getGroupId = (url) => {
|
|
|
2097
2540
|
};
|
|
2098
2541
|
}
|
|
2099
2542
|
};
|
|
2100
|
-
var
|
|
2543
|
+
var getReferrer2 = () => {
|
|
2101
2544
|
try {
|
|
2102
|
-
const referrer = new URL(
|
|
2545
|
+
const referrer = new URL(getSchemeUri7());
|
|
2103
2546
|
return referrer.searchParams.get("referrer");
|
|
2104
2547
|
} catch {
|
|
2105
2548
|
return "";
|
|
@@ -2112,7 +2555,7 @@ var trackScreen = (url) => {
|
|
|
2112
2555
|
log_name: `${groupId}::screen`,
|
|
2113
2556
|
params: {
|
|
2114
2557
|
search,
|
|
2115
|
-
referrer:
|
|
2558
|
+
referrer: getReferrer2(),
|
|
2116
2559
|
deployment_id: env.getDeploymentId(),
|
|
2117
2560
|
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
2118
2561
|
}
|
|
@@ -2121,7 +2564,7 @@ var trackScreen = (url) => {
|
|
|
2121
2564
|
};
|
|
2122
2565
|
|
|
2123
2566
|
// src/components/WebView.tsx
|
|
2124
|
-
import { jsx as
|
|
2567
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2125
2568
|
var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment();
|
|
2126
2569
|
var TYPES = ["partner", "external", "game"];
|
|
2127
2570
|
var WEBVIEW_TYPES = {
|
|
@@ -2131,7 +2574,7 @@ var WEBVIEW_TYPES = {
|
|
|
2131
2574
|
};
|
|
2132
2575
|
function mergeSchemeQueryParamsInto(url) {
|
|
2133
2576
|
const baseUrl = new URL(url);
|
|
2134
|
-
const schemeUrl = new URL(
|
|
2577
|
+
const schemeUrl = new URL(getSchemeUri8());
|
|
2135
2578
|
baseUrl.pathname = schemeUrl.pathname;
|
|
2136
2579
|
for (const [key, value] of schemeUrl.searchParams.entries()) {
|
|
2137
2580
|
baseUrl.searchParams.set(key, value);
|
|
@@ -2169,7 +2612,6 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2169
2612
|
);
|
|
2170
2613
|
const handler = useBridgeHandler({
|
|
2171
2614
|
onMessage,
|
|
2172
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2173
2615
|
eventListenerMap: {
|
|
2174
2616
|
...appsInTossEventBridges,
|
|
2175
2617
|
navigationAccessoryEvent: ({ onEvent, onError }) => tdsEvent.addEventListener("navigationAccessoryEvent", { onEvent, onError }),
|
|
@@ -2190,13 +2632,18 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2190
2632
|
/** @internal */
|
|
2191
2633
|
appBridgeCallbackEvent: ({ onEvent, onError, options }) => appsInTossEvent4.addEventListener("appBridgeCallbackEvent", { onEvent, onError, options }),
|
|
2192
2634
|
/** AdMob */
|
|
2193
|
-
loadAdMobInterstitialAd:
|
|
2194
|
-
showAdMobInterstitialAd:
|
|
2195
|
-
loadAdMobRewardedAd:
|
|
2196
|
-
showAdMobRewardedAd:
|
|
2635
|
+
loadAdMobInterstitialAd: GoogleAdMob2.loadAdMobInterstitialAd,
|
|
2636
|
+
showAdMobInterstitialAd: GoogleAdMob2.showAdMobInterstitialAd,
|
|
2637
|
+
loadAdMobRewardedAd: GoogleAdMob2.loadAdMobRewardedAd,
|
|
2638
|
+
showAdMobRewardedAd: GoogleAdMob2.showAdMobRewardedAd,
|
|
2197
2639
|
/** AdMobV2 */
|
|
2198
|
-
loadAppsInTossAdMob:
|
|
2199
|
-
showAppsInTossAdMob:
|
|
2640
|
+
loadAppsInTossAdMob: GoogleAdMob2.loadAppsInTossAdMob,
|
|
2641
|
+
showAppsInTossAdMob: GoogleAdMob2.showAppsInTossAdMob,
|
|
2642
|
+
/** IntegratedAd */
|
|
2643
|
+
loadFullScreenAd,
|
|
2644
|
+
showFullScreenAd,
|
|
2645
|
+
/** TossAd */
|
|
2646
|
+
fetchTossAd,
|
|
2200
2647
|
/** IAP */
|
|
2201
2648
|
iapCreateOneTimePurchaseOrder: IAP.createOneTimePurchaseOrder,
|
|
2202
2649
|
requestOneTimePurchase
|
|
@@ -2209,13 +2656,18 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2209
2656
|
getSafeAreaRight: () => insets.right,
|
|
2210
2657
|
...Object.fromEntries(Object.entries(global2).map(([key, value]) => [key, () => value])),
|
|
2211
2658
|
/** AdMob */
|
|
2212
|
-
loadAdMobInterstitialAd_isSupported:
|
|
2213
|
-
showAdMobInterstitialAd_isSupported:
|
|
2214
|
-
loadAdMobRewardedAd_isSupported:
|
|
2215
|
-
showAdMobRewardedAd_isSupported:
|
|
2659
|
+
loadAdMobInterstitialAd_isSupported: GoogleAdMob2.loadAdMobInterstitialAd.isSupported,
|
|
2660
|
+
showAdMobInterstitialAd_isSupported: GoogleAdMob2.showAdMobInterstitialAd.isSupported,
|
|
2661
|
+
loadAdMobRewardedAd_isSupported: GoogleAdMob2.loadAdMobRewardedAd.isSupported,
|
|
2662
|
+
showAdMobRewardedAd_isSupported: GoogleAdMob2.showAdMobRewardedAd.isSupported,
|
|
2216
2663
|
/** AdMobV2 */
|
|
2217
|
-
loadAppsInTossAdMob_isSupported:
|
|
2218
|
-
showAppsInTossAdMob_isSupported:
|
|
2664
|
+
loadAppsInTossAdMob_isSupported: GoogleAdMob2.loadAppsInTossAdMob.isSupported,
|
|
2665
|
+
showAppsInTossAdMob_isSupported: GoogleAdMob2.showAppsInTossAdMob.isSupported,
|
|
2666
|
+
/** IntegratedAd */
|
|
2667
|
+
loadFullScreenAd_isSupported: loadFullScreenAd.isSupported,
|
|
2668
|
+
showFullScreenAd_isSupported: showFullScreenAd.isSupported,
|
|
2669
|
+
/** TossAd */
|
|
2670
|
+
fetchTossAd_isSupported: fetchTossAd.isSupported,
|
|
2219
2671
|
/** env */
|
|
2220
2672
|
getDeploymentId: env.getDeploymentId
|
|
2221
2673
|
},
|
|
@@ -2248,7 +2700,9 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2248
2700
|
processProductGrant,
|
|
2249
2701
|
getPendingOrders: IAP.getPendingOrders,
|
|
2250
2702
|
getCompletedOrRefundedOrders: IAP.getCompletedOrRefundedOrders,
|
|
2251
|
-
completeProductGrant: IAP.completeProductGrant
|
|
2703
|
+
completeProductGrant: IAP.completeProductGrant,
|
|
2704
|
+
/** Toss Ads */
|
|
2705
|
+
tossAdEventLog
|
|
2252
2706
|
}
|
|
2253
2707
|
});
|
|
2254
2708
|
const headerPropForExternalWebView = useMemo7(() => {
|
|
@@ -2281,7 +2735,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2281
2735
|
return () => BackHandler2.removeEventListener("hardwareBackPress", callback);
|
|
2282
2736
|
}, [webBackHandler]);
|
|
2283
2737
|
const globalScripts = useGlobalScripts();
|
|
2284
|
-
return /* @__PURE__ */
|
|
2738
|
+
return /* @__PURE__ */ jsx18(
|
|
2285
2739
|
BaseWebView,
|
|
2286
2740
|
{
|
|
2287
2741
|
ref: refs,
|
|
@@ -2311,7 +2765,22 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2311
2765
|
injectedJavaScript: globalScripts.afterLoad,
|
|
2312
2766
|
injectedJavaScriptBeforeContentLoaded: mergeScripts(handler.injectedJavaScript, globalScripts.beforeLoad),
|
|
2313
2767
|
decelerationRate: Platform6.OS === "ios" ? 1 : void 0,
|
|
2314
|
-
allowsBackForwardNavigationGestures
|
|
2768
|
+
allowsBackForwardNavigationGestures,
|
|
2769
|
+
onShouldStartLoadWithRequest: (event) => {
|
|
2770
|
+
try {
|
|
2771
|
+
const url = new URL(event.url);
|
|
2772
|
+
if (["https:", "http:"].includes(url.protocol)) {
|
|
2773
|
+
return true;
|
|
2774
|
+
} else {
|
|
2775
|
+
Linking.openURL(convertIntentURL(url) ?? url.href);
|
|
2776
|
+
return false;
|
|
2777
|
+
}
|
|
2778
|
+
} catch (error) {
|
|
2779
|
+
console.error(error);
|
|
2780
|
+
return false;
|
|
2781
|
+
}
|
|
2782
|
+
},
|
|
2783
|
+
originWhitelist: ["https://*", "http://*", "intoss://*", "intoss-private://*", "servicetoss://*", "supertoss://*", "intent://*"]
|
|
2315
2784
|
}
|
|
2316
2785
|
);
|
|
2317
2786
|
}
|
|
@@ -2395,6 +2864,8 @@ export {
|
|
|
2395
2864
|
OverlayProvider,
|
|
2396
2865
|
WebView,
|
|
2397
2866
|
env,
|
|
2867
|
+
loadFullScreenAd,
|
|
2868
|
+
showFullScreenAd,
|
|
2398
2869
|
useCreateUserAgent,
|
|
2399
2870
|
useGeolocation,
|
|
2400
2871
|
useOverlay3 as useOverlay,
|