@apps-in-toss/framework 0.0.0-dev.1764816865438 → 0.0.0-dev.1765876894045
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 +292 -323
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +118 -145
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -50,9 +50,9 @@ var import_analytics2 = require("@apps-in-toss/analytics");
|
|
|
50
50
|
|
|
51
51
|
// src/core/registerApp.tsx
|
|
52
52
|
var import_analytics = require("@apps-in-toss/analytics");
|
|
53
|
-
var
|
|
53
|
+
var import_native_modules13 = require("@apps-in-toss/native-modules");
|
|
54
54
|
var import_react_native23 = require("@granite-js/react-native");
|
|
55
|
-
var
|
|
55
|
+
var import_tds_react_native10 = require("@toss/tds-react-native");
|
|
56
56
|
var import_react_native24 = require("react-native");
|
|
57
57
|
|
|
58
58
|
// src/core/components/AppEvent.tsx
|
|
@@ -250,45 +250,17 @@ function useNavigationBarContext() {
|
|
|
250
250
|
return context;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
// src/core/hooks/useAppsInTossBridge.ts
|
|
254
|
-
var import_native_modules3 = require("@apps-in-toss/native-modules");
|
|
255
|
-
var import_tds_react_native = require("@toss/tds-react-native");
|
|
256
|
-
var import_react6 = require("react");
|
|
257
|
-
|
|
258
|
-
// src/core/utils/toIcon.ts
|
|
259
|
-
function toIcon(source) {
|
|
260
|
-
return source.startsWith("http") ? { source: { uri: source } } : { name: source };
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// src/core/hooks/useAppsInTossBridge.ts
|
|
264
|
-
function useAppsInTossBridge() {
|
|
265
|
-
const controller = (0, import_tds_react_native.useBridge)();
|
|
266
|
-
const appsInTossGlobals = getAppsInTossGlobals();
|
|
267
|
-
(0, import_react6.useEffect)(() => {
|
|
268
|
-
const isGameApp = appsInTossGlobals.webViewType === "game" || appsInTossGlobals.appType === "game";
|
|
269
|
-
controller.open({
|
|
270
|
-
serviceName: appsInTossGlobals.brandDisplayName,
|
|
271
|
-
icon: toIcon(appsInTossGlobals.brandIcon),
|
|
272
|
-
color: appsInTossGlobals.brandPrimaryColor,
|
|
273
|
-
colorMode: isGameApp ? "inverted" : appsInTossGlobals.brandBridgeColorMode,
|
|
274
|
-
onExited: () => {
|
|
275
|
-
import_native_modules3.appsInTossEvent.emit("entryMessageExited", void 0);
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
}, []);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
253
|
// src/components/RNAppContainer.tsx
|
|
282
|
-
var
|
|
283
|
-
var
|
|
254
|
+
var import_native_modules12 = require("@apps-in-toss/native-modules");
|
|
255
|
+
var import_react17 = require("react");
|
|
284
256
|
var import_react_native22 = require("react-native");
|
|
285
257
|
|
|
286
258
|
// src/components/GameInitializer.tsx
|
|
287
|
-
var
|
|
259
|
+
var import_native_modules6 = require("@apps-in-toss/native-modules");
|
|
288
260
|
var import_react_native10 = require("@granite-js/react-native");
|
|
289
|
-
var
|
|
261
|
+
var import_tds_react_native4 = require("@toss/tds-react-native");
|
|
290
262
|
var import_es_hangul = require("es-hangul");
|
|
291
|
-
var
|
|
263
|
+
var import_react11 = require("react");
|
|
292
264
|
var import_react_native11 = require("react-native");
|
|
293
265
|
|
|
294
266
|
// src/constant/game-center.ts
|
|
@@ -299,10 +271,10 @@ var GAME_MIN_VERSION = {
|
|
|
299
271
|
};
|
|
300
272
|
|
|
301
273
|
// src/hooks/useAppUpdateDialog.tsx
|
|
302
|
-
var
|
|
274
|
+
var import_native_modules3 = require("@apps-in-toss/native-modules");
|
|
303
275
|
var import_react_native7 = require("@granite-js/react-native");
|
|
304
|
-
var
|
|
305
|
-
var
|
|
276
|
+
var import_tds_react_native = require("@toss/tds-react-native");
|
|
277
|
+
var import_react6 = require("react");
|
|
306
278
|
|
|
307
279
|
// src/utils/market.ts
|
|
308
280
|
var import_react_native6 = require("react-native");
|
|
@@ -314,9 +286,9 @@ var getMarketLink = () => {
|
|
|
314
286
|
|
|
315
287
|
// src/hooks/useAppUpdateDialog.tsx
|
|
316
288
|
function useAppUpdateDialog() {
|
|
317
|
-
const { openConfirm } = (0,
|
|
289
|
+
const { openConfirm } = (0, import_tds_react_native.useDialog)();
|
|
318
290
|
const logging = useAppUpdateDialogLogging();
|
|
319
|
-
const openAppUpdateDialog = (0,
|
|
291
|
+
const openAppUpdateDialog = (0, import_react6.useCallback)(
|
|
320
292
|
async ({
|
|
321
293
|
title,
|
|
322
294
|
description,
|
|
@@ -358,7 +330,7 @@ function useAppUpdateDialogLogging() {
|
|
|
358
330
|
app_name: import_react_native7.Granite.appName
|
|
359
331
|
};
|
|
360
332
|
const logUpdateClick = () => {
|
|
361
|
-
|
|
333
|
+
import_native_modules3.INTERNAL__module.tossCoreEventLog({
|
|
362
334
|
log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
|
|
363
335
|
log_type: "event",
|
|
364
336
|
params: {
|
|
@@ -370,7 +342,7 @@ function useAppUpdateDialogLogging() {
|
|
|
370
342
|
});
|
|
371
343
|
};
|
|
372
344
|
const logCloseClick = () => {
|
|
373
|
-
|
|
345
|
+
import_native_modules3.INTERNAL__module.tossCoreEventLog({
|
|
374
346
|
log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
|
|
375
347
|
log_type: "event",
|
|
376
348
|
params: {
|
|
@@ -382,7 +354,7 @@ function useAppUpdateDialogLogging() {
|
|
|
382
354
|
});
|
|
383
355
|
};
|
|
384
356
|
const logDialogShow = () => {
|
|
385
|
-
|
|
357
|
+
import_native_modules3.INTERNAL__module.tossCoreEventLog({
|
|
386
358
|
log_name: UPDATE_DIALOG_LOG_NAME,
|
|
387
359
|
log_type: "popup",
|
|
388
360
|
params: {
|
|
@@ -395,13 +367,13 @@ function useAppUpdateDialogLogging() {
|
|
|
395
367
|
}
|
|
396
368
|
|
|
397
369
|
// src/hooks/useGameCenterProfile.ts
|
|
398
|
-
var
|
|
399
|
-
var
|
|
370
|
+
var import_native_modules5 = require("@apps-in-toss/native-modules");
|
|
371
|
+
var import_react10 = require("react");
|
|
400
372
|
|
|
401
373
|
// src/hooks/useErrorAlert.ts
|
|
402
374
|
var import_react_native8 = require("@granite-js/react-native");
|
|
403
|
-
var
|
|
404
|
-
var
|
|
375
|
+
var import_tds_react_native2 = require("@toss/tds-react-native");
|
|
376
|
+
var import_react7 = require("react");
|
|
405
377
|
|
|
406
378
|
// src/utils/error.ts
|
|
407
379
|
var DEFAULT_ERROR = {
|
|
@@ -411,8 +383,8 @@ var DEFAULT_ERROR = {
|
|
|
411
383
|
|
|
412
384
|
// src/hooks/useErrorAlert.ts
|
|
413
385
|
var useErrorAlert = () => {
|
|
414
|
-
const { openAlert } = (0,
|
|
415
|
-
const openErrorAlert = (0,
|
|
386
|
+
const { openAlert } = (0, import_tds_react_native2.useDialog)();
|
|
387
|
+
const openErrorAlert = (0, import_react7.useCallback)(async () => {
|
|
416
388
|
await openAlert({
|
|
417
389
|
title: DEFAULT_ERROR.title,
|
|
418
390
|
description: DEFAULT_ERROR.description
|
|
@@ -423,14 +395,14 @@ var useErrorAlert = () => {
|
|
|
423
395
|
};
|
|
424
396
|
|
|
425
397
|
// src/hooks/useTransparentWebview.tsx
|
|
426
|
-
var
|
|
398
|
+
var import_react8 = require("react");
|
|
427
399
|
|
|
428
400
|
// src/utils/openTransparentWebView.ts
|
|
429
401
|
var import_react_native9 = require("@granite-js/react-native");
|
|
430
402
|
|
|
431
403
|
// src/private.ts
|
|
432
|
-
var
|
|
433
|
-
var INTERNAL__onVisibilityChangedByTransparentServiceWeb =
|
|
404
|
+
var import_native_modules4 = require("@apps-in-toss/native-modules");
|
|
405
|
+
var INTERNAL__onVisibilityChangedByTransparentServiceWeb = import_native_modules4.onVisibilityChangedByTransparentServiceWeb;
|
|
434
406
|
|
|
435
407
|
// src/utils/openTransparentWebView.ts
|
|
436
408
|
var openTransparentWebView = ({
|
|
@@ -465,9 +437,9 @@ var openTransparentWebView = ({
|
|
|
465
437
|
|
|
466
438
|
// src/hooks/useTransparentWebview.tsx
|
|
467
439
|
var useTransparentWebview = () => {
|
|
468
|
-
const [isWebviewLoading, setIsWebviewLoading] = (0,
|
|
440
|
+
const [isWebviewLoading, setIsWebviewLoading] = (0, import_react8.useState)(false);
|
|
469
441
|
const { open: openErrorAlert } = useErrorAlert();
|
|
470
|
-
const _openTransparentWebview = (0,
|
|
442
|
+
const _openTransparentWebview = (0, import_react8.useCallback)(
|
|
471
443
|
({ webUrl, onClose, onError }) => {
|
|
472
444
|
if (isWebviewLoading) {
|
|
473
445
|
return;
|
|
@@ -499,18 +471,18 @@ var useTransparentWebview = () => {
|
|
|
499
471
|
};
|
|
500
472
|
|
|
501
473
|
// src/components/GameProfileToast.tsx
|
|
502
|
-
var
|
|
474
|
+
var import_tds_react_native3 = require("@toss/tds-react-native");
|
|
503
475
|
var import_private2 = require("@toss/tds-react-native/private");
|
|
504
|
-
var
|
|
476
|
+
var import_react9 = require("react");
|
|
505
477
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
506
478
|
var useGameProfileToast = () => {
|
|
507
479
|
const overlay = (0, import_private2.useOverlay)();
|
|
508
|
-
const openGameProfileToast = (0,
|
|
480
|
+
const openGameProfileToast = (0, import_react9.useCallback)(
|
|
509
481
|
(nickname, profileImageUri) => {
|
|
510
482
|
return new Promise((resolve) => {
|
|
511
483
|
overlay.open(({ isOpen, close, exit }) => {
|
|
512
484
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_private2.ColorPreferenceProvider, { colorPreference: "dark", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_private2.AdaptiveColorProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
513
|
-
|
|
485
|
+
import_tds_react_native3.Toast,
|
|
514
486
|
{
|
|
515
487
|
open: isOpen,
|
|
516
488
|
onClose: () => {
|
|
@@ -521,10 +493,10 @@ var useGameProfileToast = () => {
|
|
|
521
493
|
position: "top",
|
|
522
494
|
text: `${nickname}\uB2D8 \uBC18\uAC00\uC6CC\uC694!`,
|
|
523
495
|
icon: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
524
|
-
|
|
496
|
+
import_tds_react_native3.Asset.Image,
|
|
525
497
|
{
|
|
526
498
|
style: { borderRadius: 64, overflow: "hidden" },
|
|
527
|
-
frameShape:
|
|
499
|
+
frameShape: import_tds_react_native3.Asset.frameShape.CleanW32,
|
|
528
500
|
source: { uri: profileImageUri }
|
|
529
501
|
}
|
|
530
502
|
)
|
|
@@ -539,19 +511,19 @@ var useGameProfileToast = () => {
|
|
|
539
511
|
};
|
|
540
512
|
|
|
541
513
|
// src/hooks/useGameCenterProfile.ts
|
|
542
|
-
var useGameCenterProfile = (
|
|
543
|
-
const [profileData, setProfileData] = (0,
|
|
544
|
-
const [isProfileDataLoading, setIsProfileDataLoading] = (0,
|
|
545
|
-
const [isProfileDataRefetching, setIsProfileDataRefetching] = (0,
|
|
546
|
-
const shouldShowProfileLoadingOverlay = isProfileDataLoading
|
|
547
|
-
const shouldShowProfileNotFoundOverlay = profileData?.statusCode === "PROFILE_NOT_FOUND" &&
|
|
548
|
-
const canShowBottomSheetOrToast = !isProfileDataLoading
|
|
514
|
+
var useGameCenterProfile = () => {
|
|
515
|
+
const [profileData, setProfileData] = (0, import_react10.useState)(void 0);
|
|
516
|
+
const [isProfileDataLoading, setIsProfileDataLoading] = (0, import_react10.useState)(true);
|
|
517
|
+
const [isProfileDataRefetching, setIsProfileDataRefetching] = (0, import_react10.useState)(false);
|
|
518
|
+
const shouldShowProfileLoadingOverlay = isProfileDataLoading || isProfileDataRefetching;
|
|
519
|
+
const shouldShowProfileNotFoundOverlay = profileData?.statusCode === "PROFILE_NOT_FOUND" && !isProfileDataRefetching;
|
|
520
|
+
const canShowBottomSheetOrToast = !isProfileDataLoading;
|
|
549
521
|
const { openGameProfileToast } = useGameProfileToast();
|
|
550
522
|
const { open: openErrorAlert } = useErrorAlert();
|
|
551
523
|
const { open: openTransparentWebView2 } = useTransparentWebview();
|
|
552
|
-
const fetchProfileData = (0,
|
|
524
|
+
const fetchProfileData = (0, import_react10.useCallback)(async () => {
|
|
553
525
|
try {
|
|
554
|
-
const data = await (0,
|
|
526
|
+
const data = await (0, import_native_modules5.getGameCenterGameProfile)();
|
|
555
527
|
setProfileData(data);
|
|
556
528
|
setIsProfileDataLoading(false);
|
|
557
529
|
} catch (_) {
|
|
@@ -559,10 +531,10 @@ var useGameCenterProfile = (isReadyForProfileUI) => {
|
|
|
559
531
|
setIsProfileDataLoading(false);
|
|
560
532
|
}
|
|
561
533
|
}, [openErrorAlert]);
|
|
562
|
-
const refetchProfileData = (0,
|
|
534
|
+
const refetchProfileData = (0, import_react10.useCallback)(async () => {
|
|
563
535
|
try {
|
|
564
536
|
setIsProfileDataRefetching(true);
|
|
565
|
-
const data = await (0,
|
|
537
|
+
const data = await (0, import_native_modules5.getGameCenterGameProfile)();
|
|
566
538
|
setProfileData(data);
|
|
567
539
|
setIsProfileDataRefetching(false);
|
|
568
540
|
if (data?.statusCode === "SUCCESS") {
|
|
@@ -573,7 +545,7 @@ var useGameCenterProfile = (isReadyForProfileUI) => {
|
|
|
573
545
|
openErrorAlert();
|
|
574
546
|
}
|
|
575
547
|
}, [openErrorAlert, openGameProfileToast]);
|
|
576
|
-
const openProfileWebview = (0,
|
|
548
|
+
const openProfileWebview = (0, import_react10.useCallback)(() => {
|
|
577
549
|
openTransparentWebView2({
|
|
578
550
|
webUrl: `${GAME_PROFILE_WEBVIEW_URL}?appName=${getAppName()}&referrer=appsintoss.${getAppName()}`,
|
|
579
551
|
onClose: async () => {
|
|
@@ -607,7 +579,7 @@ var Z_INDEX = {
|
|
|
607
579
|
|
|
608
580
|
// src/components/GameInitializer.tsx
|
|
609
581
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
610
|
-
var GameInitializer = ({ children
|
|
582
|
+
var GameInitializer = ({ children }) => {
|
|
611
583
|
const {
|
|
612
584
|
profileData,
|
|
613
585
|
shouldShowProfileLoadingOverlay,
|
|
@@ -616,13 +588,13 @@ var GameInitializer = ({ children, isReadyForProfileUI }) => {
|
|
|
616
588
|
openProfileWebview,
|
|
617
589
|
openGameProfileToast,
|
|
618
590
|
fetchProfileData
|
|
619
|
-
} = useGameCenterProfile(
|
|
620
|
-
const isCompletedFlow = (0,
|
|
591
|
+
} = useGameCenterProfile();
|
|
592
|
+
const isCompletedFlow = (0, import_react11.useRef)(false);
|
|
621
593
|
const { open: openAppUpdateDialog } = useAppUpdateDialog();
|
|
622
|
-
(0,
|
|
594
|
+
(0, import_react11.useEffect)(() => {
|
|
623
595
|
fetchProfileData();
|
|
624
596
|
}, []);
|
|
625
|
-
(0,
|
|
597
|
+
(0, import_react11.useEffect)(() => {
|
|
626
598
|
const handleGameProfileFlow = async () => {
|
|
627
599
|
if (!canShowBottomSheetOrToast) {
|
|
628
600
|
return;
|
|
@@ -631,7 +603,7 @@ var GameInitializer = ({ children, isReadyForProfileUI }) => {
|
|
|
631
603
|
return;
|
|
632
604
|
}
|
|
633
605
|
isCompletedFlow.current = true;
|
|
634
|
-
if (!(0,
|
|
606
|
+
if (!(0, import_native_modules6.isMinVersionSupported)(GAME_MIN_VERSION)) {
|
|
635
607
|
openAppUpdateDialog({
|
|
636
608
|
title: `${(0, import_es_hangul.josa)(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
|
|
637
609
|
\uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
|
|
@@ -658,7 +630,7 @@ var GameInitializer = ({ children, isReadyForProfileUI }) => {
|
|
|
658
630
|
openProfileWebview,
|
|
659
631
|
profileData
|
|
660
632
|
]);
|
|
661
|
-
if (!(0,
|
|
633
|
+
if (!(0, import_native_modules6.isMinVersionSupported)(GAME_MIN_VERSION)) {
|
|
662
634
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
663
635
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native11.View, { style: { flex: 1, position: "relative" }, children }),
|
|
664
636
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
@@ -692,7 +664,7 @@ var GameInitializer = ({ children, isReadyForProfileUI }) => {
|
|
|
692
664
|
alignItems: "center",
|
|
693
665
|
backgroundColor: "rgba(0, 0, 0, 0.2)"
|
|
694
666
|
},
|
|
695
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
667
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_tds_react_native4.Loader, { size: "large", type: "light" })
|
|
696
668
|
}
|
|
697
669
|
)
|
|
698
670
|
] });
|
|
@@ -728,10 +700,10 @@ var overlayStyle = {
|
|
|
728
700
|
var import_private5 = require("@toss/tds-react-native/private");
|
|
729
701
|
|
|
730
702
|
// src/components/NavigationBar/RNNavigationBar/hooks/useHardwareBackPress.ts
|
|
731
|
-
var
|
|
703
|
+
var import_react12 = require("react");
|
|
732
704
|
var import_react_native12 = require("react-native");
|
|
733
705
|
function useHardwareBackPress(handler) {
|
|
734
|
-
(0,
|
|
706
|
+
(0, import_react12.useEffect)(() => {
|
|
735
707
|
const handleBackPress = () => {
|
|
736
708
|
handler();
|
|
737
709
|
return true;
|
|
@@ -743,16 +715,16 @@ function useHardwareBackPress(handler) {
|
|
|
743
715
|
|
|
744
716
|
// src/components/NavigationBar/RNNavigationBar/hooks/useNavigationEvent.ts
|
|
745
717
|
var import_react_native14 = require("@granite-js/react-native");
|
|
746
|
-
var
|
|
718
|
+
var import_react14 = require("react");
|
|
747
719
|
|
|
748
720
|
// src/components/NavigationBar/RNNavigationBar/hooks/useCloseConfirm.ts
|
|
749
|
-
var
|
|
721
|
+
var import_tds_react_native5 = require("@toss/tds-react-native");
|
|
750
722
|
var import_es_hangul2 = require("es-hangul");
|
|
751
|
-
var
|
|
723
|
+
var import_react13 = require("react");
|
|
752
724
|
function useCloseConfirm() {
|
|
753
725
|
const { brandDisplayName } = getAppsInTossGlobals();
|
|
754
|
-
const { openConfirm } = (0,
|
|
755
|
-
return (0,
|
|
726
|
+
const { openConfirm } = (0, import_tds_react_native5.useDialog)();
|
|
727
|
+
return (0, import_react13.useCallback)(async ({ onEntered }) => {
|
|
756
728
|
return await openConfirm({
|
|
757
729
|
title: `${(0, import_es_hangul2.josa)(brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
|
|
758
730
|
leftButton: "\uCDE8\uC18C",
|
|
@@ -764,7 +736,7 @@ function useCloseConfirm() {
|
|
|
764
736
|
}
|
|
765
737
|
|
|
766
738
|
// src/components/NavigationBar/common/useNavigationBarLogging.tsx
|
|
767
|
-
var
|
|
739
|
+
var import_native_modules7 = require("@apps-in-toss/native-modules");
|
|
768
740
|
var import_react_native13 = require("@granite-js/react-native");
|
|
769
741
|
var NAVI_BAR_IMPRESSION_SCHEMA_ID = 1596837;
|
|
770
742
|
var NAVI_BAR_IMPRESSION_LOG_NAME = "appsintoss_app_visit__common_module::impression__navigation_bar";
|
|
@@ -783,7 +755,7 @@ function useNavigationBarLogging() {
|
|
|
783
755
|
app_name: import_react_native13.Granite.appName
|
|
784
756
|
};
|
|
785
757
|
const logNavBarImpression = (naviBarConfig) => {
|
|
786
|
-
|
|
758
|
+
import_native_modules7.INTERNAL__module.tossCoreEventLog({
|
|
787
759
|
log_name: NAVI_BAR_IMPRESSION_LOG_NAME,
|
|
788
760
|
log_type: "event",
|
|
789
761
|
params: {
|
|
@@ -795,7 +767,7 @@ function useNavigationBarLogging() {
|
|
|
795
767
|
});
|
|
796
768
|
};
|
|
797
769
|
const logHomeButtonClick = () => {
|
|
798
|
-
|
|
770
|
+
import_native_modules7.INTERNAL__module.tossCoreEventLog({
|
|
799
771
|
log_name: HOME_BUTTON_CLICK_LOG_NAME,
|
|
800
772
|
log_type: "event",
|
|
801
773
|
params: {
|
|
@@ -806,7 +778,7 @@ function useNavigationBarLogging() {
|
|
|
806
778
|
});
|
|
807
779
|
};
|
|
808
780
|
const logCloseButtonClick = () => {
|
|
809
|
-
|
|
781
|
+
import_native_modules7.INTERNAL__module.tossCoreEventLog({
|
|
810
782
|
log_name: CLOSE_BUTTON_CLICK_LOG_NAME,
|
|
811
783
|
log_type: "event",
|
|
812
784
|
params: {
|
|
@@ -817,7 +789,7 @@ function useNavigationBarLogging() {
|
|
|
817
789
|
});
|
|
818
790
|
};
|
|
819
791
|
const logClosePopupShow = () => {
|
|
820
|
-
|
|
792
|
+
import_native_modules7.INTERNAL__module.tossCoreEventLog({
|
|
821
793
|
log_name: CLOSE_POPUP_SHOW_LOG_NAME,
|
|
822
794
|
log_type: "popup",
|
|
823
795
|
params: {
|
|
@@ -827,7 +799,7 @@ function useNavigationBarLogging() {
|
|
|
827
799
|
});
|
|
828
800
|
};
|
|
829
801
|
const logClosePopupCtaClick = (confirm) => {
|
|
830
|
-
|
|
802
|
+
import_native_modules7.INTERNAL__module.tossCoreEventLog({
|
|
831
803
|
log_name: CLOSE_POPUP_CTA_CLICK_LOG_NAME,
|
|
832
804
|
log_type: "event",
|
|
833
805
|
params: {
|
|
@@ -854,7 +826,7 @@ function useNavigationEvent() {
|
|
|
854
826
|
const navigation = (0, import_react_native14.useNavigation)();
|
|
855
827
|
const closeConfirm = useCloseConfirm();
|
|
856
828
|
const { captureExitLog } = useCaptureExitLog();
|
|
857
|
-
return (0,
|
|
829
|
+
return (0, import_react14.useMemo)(() => {
|
|
858
830
|
const close = async () => {
|
|
859
831
|
const hasConfirmed = await closeConfirm({
|
|
860
832
|
onEntered: logging.closePopupShow
|
|
@@ -888,25 +860,25 @@ function useNavigationEvent() {
|
|
|
888
860
|
}
|
|
889
861
|
|
|
890
862
|
// src/core/hooks/useMoreButtonBottomSheet/index.tsx
|
|
891
|
-
var
|
|
863
|
+
var import_native_modules11 = require("@apps-in-toss/native-modules");
|
|
892
864
|
var import_react_native20 = require("@granite-js/react-native");
|
|
893
|
-
var
|
|
865
|
+
var import_tds_react_native8 = require("@toss/tds-react-native");
|
|
894
866
|
var import_private4 = require("@toss/tds-react-native/private");
|
|
895
|
-
var
|
|
867
|
+
var import_react15 = require("react");
|
|
896
868
|
|
|
897
869
|
// src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
|
|
898
|
-
var
|
|
870
|
+
var import_native_modules9 = require("@apps-in-toss/native-modules");
|
|
899
871
|
var import_react_native17 = require("@granite-js/react-native");
|
|
900
|
-
var
|
|
872
|
+
var import_tds_react_native7 = require("@toss/tds-react-native");
|
|
901
873
|
var import_react_native18 = require("react-native");
|
|
902
874
|
|
|
903
875
|
// src/core/hooks/useMoreButtonBottomSheet/Menu.tsx
|
|
904
|
-
var
|
|
876
|
+
var import_tds_react_native6 = require("@toss/tds-react-native");
|
|
905
877
|
var import_private3 = require("@toss/tds-react-native/private");
|
|
906
878
|
var import_react_native16 = require("react-native");
|
|
907
879
|
|
|
908
880
|
// src/core/hooks/useMoreButtonBottomSheet/useMoreButtonBottomSheetLogging.tsx
|
|
909
|
-
var
|
|
881
|
+
var import_native_modules8 = require("@apps-in-toss/native-modules");
|
|
910
882
|
var import_react_native15 = require("@granite-js/react-native");
|
|
911
883
|
var BOTTOM_SHEET_SCHEMA_ID = 1596825;
|
|
912
884
|
var BOTTOM_SHEET_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__more";
|
|
@@ -923,7 +895,7 @@ function useMoreButtonBottomSheetLogging() {
|
|
|
923
895
|
app_name: import_react_native15.Granite.appName
|
|
924
896
|
};
|
|
925
897
|
const logBottomSheetShow = () => {
|
|
926
|
-
|
|
898
|
+
import_native_modules8.INTERNAL__module.tossCoreEventLog({
|
|
927
899
|
log_name: BOTTOM_SHEET_LOG_NAME,
|
|
928
900
|
log_type: "popup",
|
|
929
901
|
params: {
|
|
@@ -933,7 +905,7 @@ function useMoreButtonBottomSheetLogging() {
|
|
|
933
905
|
});
|
|
934
906
|
};
|
|
935
907
|
const logBottomSheetOpen = () => {
|
|
936
|
-
|
|
908
|
+
import_native_modules8.INTERNAL__module.tossCoreEventLog({
|
|
937
909
|
log_name: BOTTOM_SHEET_OPEN_LOG_NAME,
|
|
938
910
|
log_type: "event",
|
|
939
911
|
params: {
|
|
@@ -944,7 +916,7 @@ function useMoreButtonBottomSheetLogging() {
|
|
|
944
916
|
});
|
|
945
917
|
};
|
|
946
918
|
const logBottomSheetCloseClick = () => {
|
|
947
|
-
|
|
919
|
+
import_native_modules8.INTERNAL__module.tossCoreEventLog({
|
|
948
920
|
log_name: BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME,
|
|
949
921
|
log_type: "event",
|
|
950
922
|
params: {
|
|
@@ -955,7 +927,7 @@ function useMoreButtonBottomSheetLogging() {
|
|
|
955
927
|
});
|
|
956
928
|
};
|
|
957
929
|
const logBottomSheetMenuClick = ({ title }) => {
|
|
958
|
-
|
|
930
|
+
import_native_modules8.INTERNAL__module.tossCoreEventLog({
|
|
959
931
|
log_name: BOTTOM_SHEET_MENU_CLICK_LOG_NAME,
|
|
960
932
|
log_type: "event",
|
|
961
933
|
params: {
|
|
@@ -984,7 +956,7 @@ function Menu({ title, iconURL, onPress }) {
|
|
|
984
956
|
const brandPrimaryColorRGB = hexToRGB(globals.brandPrimaryColor);
|
|
985
957
|
const iconBackgroundColor = brandPrimaryColorRGB ? `rgba(${brandPrimaryColorRGB.join(",")},0.1)` : adaptive.grey100;
|
|
986
958
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
987
|
-
|
|
959
|
+
import_tds_react_native6.ListRow,
|
|
988
960
|
{
|
|
989
961
|
left: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
990
962
|
import_react_native16.View,
|
|
@@ -1000,14 +972,14 @@ function Menu({ title, iconURL, onPress }) {
|
|
|
1000
972
|
backgroundColor: iconBackgroundColor
|
|
1001
973
|
},
|
|
1002
974
|
children: iconName ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1003
|
-
|
|
975
|
+
import_tds_react_native6.Asset.Icon,
|
|
1004
976
|
{
|
|
1005
977
|
frameShape: { width: 20, height: 20 },
|
|
1006
978
|
color: globals.brandPrimaryColor,
|
|
1007
979
|
name: iconName
|
|
1008
980
|
}
|
|
1009
981
|
) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1010
|
-
|
|
982
|
+
import_tds_react_native6.Asset.Image,
|
|
1011
983
|
{
|
|
1012
984
|
frameShape: { width: 20, height: 20 },
|
|
1013
985
|
source: { uri: iconURL }
|
|
@@ -1016,7 +988,7 @@ function Menu({ title, iconURL, onPress }) {
|
|
|
1016
988
|
}
|
|
1017
989
|
),
|
|
1018
990
|
contents: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1019
|
-
|
|
991
|
+
import_tds_react_native6.ListRow.Texts,
|
|
1020
992
|
{
|
|
1021
993
|
type: "1RowTypeA",
|
|
1022
994
|
top: title,
|
|
@@ -1068,8 +1040,8 @@ var APP_SHARE_MENU_INFO = {
|
|
|
1068
1040
|
};
|
|
1069
1041
|
function AppShareListMenu() {
|
|
1070
1042
|
const initialScheme = (0, import_react_native17.getSchemeUri)();
|
|
1071
|
-
const isSandbox = (0,
|
|
1072
|
-
const { openConfirm } = (0,
|
|
1043
|
+
const isSandbox = (0, import_native_modules9.getOperationalEnvironment)() === "sandbox";
|
|
1044
|
+
const { openConfirm } = (0, import_tds_react_native7.useDialog)();
|
|
1073
1045
|
const schemeForShare = addParamsToUrl(initialScheme, {
|
|
1074
1046
|
referrer: SHARE_SCHEME_REFERRER
|
|
1075
1047
|
});
|
|
@@ -1099,12 +1071,12 @@ function AppShareListMenu() {
|
|
|
1099
1071
|
}
|
|
1100
1072
|
|
|
1101
1073
|
// src/core/hooks/useMoreButtonBottomSheet/PermissionsMenu.tsx
|
|
1102
|
-
var
|
|
1074
|
+
var import_native_modules10 = require("@apps-in-toss/native-modules");
|
|
1103
1075
|
var import_react_native19 = require("@granite-js/react-native");
|
|
1104
1076
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1105
1077
|
function PermissionsMenu() {
|
|
1106
1078
|
const globals = getAppsInTossGlobals();
|
|
1107
|
-
if ((0,
|
|
1079
|
+
if ((0, import_native_modules10.getOperationalEnvironment)() === "sandbox") {
|
|
1108
1080
|
return null;
|
|
1109
1081
|
}
|
|
1110
1082
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
@@ -1145,19 +1117,19 @@ var MIN_VERSION = {
|
|
|
1145
1117
|
function useMoreButtonBottomSheet() {
|
|
1146
1118
|
const globals = getAppsInTossGlobals();
|
|
1147
1119
|
const adaptive = (0, import_private4.useAdaptive)();
|
|
1148
|
-
const [itemList, setItemList] = (0,
|
|
1120
|
+
const [itemList, setItemList] = (0, import_react15.useState)([]);
|
|
1149
1121
|
const appUpdateDialog = useAppUpdateDialog();
|
|
1150
1122
|
const logging = useMoreButtonBottomSheetLogging();
|
|
1151
1123
|
const overlay = (0, import_private4.useOverlay)();
|
|
1152
1124
|
const title = ensureValue(globals.brandDisplayName, "displayName");
|
|
1153
|
-
const isBottomSheetSupported = (0,
|
|
1154
|
-
const isShareListMenuSupported = (0,
|
|
1155
|
-
const [isPermissionsMenuSupported, setIsPermissionsMenuSupported] = (0,
|
|
1156
|
-
(0,
|
|
1125
|
+
const isBottomSheetSupported = (0, import_native_modules11.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
|
|
1126
|
+
const isShareListMenuSupported = (0, import_native_modules11.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
|
|
1127
|
+
const [isPermissionsMenuSupported, setIsPermissionsMenuSupported] = (0, import_react15.useState)(false);
|
|
1128
|
+
(0, import_react15.useEffect)(() => {
|
|
1157
1129
|
if (!isBottomSheetSupported) {
|
|
1158
1130
|
return;
|
|
1159
1131
|
}
|
|
1160
|
-
|
|
1132
|
+
import_native_modules11.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
|
|
1161
1133
|
APP_BRIDGE_METHOD_NAME,
|
|
1162
1134
|
{},
|
|
1163
1135
|
{
|
|
@@ -1165,8 +1137,8 @@ function useMoreButtonBottomSheet() {
|
|
|
1165
1137
|
onError: (error) => console.error("\uBA54\uB274 \uBAA9\uB85D\uC744 \uAC00\uC838\uC624\uB294 \uB370 \uC2E4\uD328\uD588\uC5B4\uC694:", error)
|
|
1166
1138
|
}
|
|
1167
1139
|
);
|
|
1168
|
-
if ((0,
|
|
1169
|
-
|
|
1140
|
+
if ((0, import_native_modules11.isMinVersionSupported)(MIN_VERSION.PERMISSIONS_MENU)) {
|
|
1141
|
+
import_native_modules11.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
|
|
1170
1142
|
"getAllPermission",
|
|
1171
1143
|
{},
|
|
1172
1144
|
{
|
|
@@ -1191,17 +1163,17 @@ function useMoreButtonBottomSheet() {
|
|
|
1191
1163
|
close();
|
|
1192
1164
|
};
|
|
1193
1165
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(BottomSheetImpressionArea, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1194
|
-
|
|
1166
|
+
import_tds_react_native8.BottomSheet.Root,
|
|
1195
1167
|
{
|
|
1196
1168
|
header: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1197
|
-
|
|
1169
|
+
import_tds_react_native8.ListHeader,
|
|
1198
1170
|
{
|
|
1199
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1171
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tds_react_native8.ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
|
|
1200
1172
|
}
|
|
1201
1173
|
),
|
|
1202
1174
|
open: isOpen,
|
|
1203
1175
|
cta: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1204
|
-
|
|
1176
|
+
import_tds_react_native8.BottomSheet.CTA,
|
|
1205
1177
|
{
|
|
1206
1178
|
size: "large",
|
|
1207
1179
|
type: "dark",
|
|
@@ -1214,7 +1186,7 @@ function useMoreButtonBottomSheet() {
|
|
|
1214
1186
|
),
|
|
1215
1187
|
onClose: handleClose,
|
|
1216
1188
|
onExited: exit,
|
|
1217
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1189
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_tds_react_native8.List, { rowSeparator: "none", children: [
|
|
1218
1190
|
itemList.map(
|
|
1219
1191
|
(item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1220
1192
|
Menu,
|
|
@@ -1237,22 +1209,27 @@ function useMoreButtonBottomSheet() {
|
|
|
1237
1209
|
}
|
|
1238
1210
|
function BottomSheetImpressionArea({ children }) {
|
|
1239
1211
|
const logging = useMoreButtonBottomSheetLogging();
|
|
1240
|
-
(0,
|
|
1212
|
+
(0, import_react15.useEffect)(() => {
|
|
1241
1213
|
logging.show();
|
|
1242
1214
|
}, [logging]);
|
|
1243
1215
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children });
|
|
1244
1216
|
}
|
|
1245
1217
|
|
|
1218
|
+
// src/core/utils/toIcon.ts
|
|
1219
|
+
function toIcon(source) {
|
|
1220
|
+
return source.startsWith("http") ? { source: { uri: source } } : { name: source };
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1246
1223
|
// src/components/NavigationBar/common/NavigationBarImpressionArea.tsx
|
|
1247
|
-
var
|
|
1224
|
+
var import_react16 = require("react");
|
|
1248
1225
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1249
1226
|
function NavigationBarImpressionArea({
|
|
1250
1227
|
children,
|
|
1251
1228
|
withHomeButton
|
|
1252
1229
|
}) {
|
|
1253
|
-
const hasLogged = (0,
|
|
1230
|
+
const hasLogged = (0, import_react16.useRef)(false);
|
|
1254
1231
|
const logging = useNavigationBarLogging();
|
|
1255
|
-
(0,
|
|
1232
|
+
(0, import_react16.useEffect)(() => {
|
|
1256
1233
|
if (hasLogged.current === false) {
|
|
1257
1234
|
logging.navBarImpression({ home_icon_yn: withHomeButton ? "Y" : "N" });
|
|
1258
1235
|
hasLogged.current = true;
|
|
@@ -1291,7 +1268,7 @@ function DefaultNavigationBar() {
|
|
|
1291
1268
|
|
|
1292
1269
|
// src/components/NavigationBar/RNNavigationBar/Game.tsx
|
|
1293
1270
|
var import_react_native_safe_area_context = require("@granite-js/native/react-native-safe-area-context");
|
|
1294
|
-
var
|
|
1271
|
+
var import_tds_react_native9 = require("@toss/tds-react-native");
|
|
1295
1272
|
var import_private6 = require("@toss/tds-react-native/private");
|
|
1296
1273
|
var import_react_native21 = require("react-native");
|
|
1297
1274
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
@@ -1303,7 +1280,7 @@ function GameNavigationBar() {
|
|
|
1303
1280
|
const { right: safeAreaRight } = (0, import_react_native_safe_area_context.useSafeAreaInsets)();
|
|
1304
1281
|
useHardwareBackPress(navigationEvent.handleBack);
|
|
1305
1282
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1306
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1283
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tds_react_native9.PageNavbar, { preference: { type: "none" } }),
|
|
1307
1284
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1308
1285
|
import_react_native21.View,
|
|
1309
1286
|
{
|
|
@@ -1359,26 +1336,18 @@ function RNAppContainer({ children }) {
|
|
|
1359
1336
|
}
|
|
1360
1337
|
}
|
|
1361
1338
|
function GameAppContainer({ children }) {
|
|
1362
|
-
|
|
1363
|
-
(0, import_react18.useEffect)(() => {
|
|
1339
|
+
(0, import_react17.useEffect)(() => {
|
|
1364
1340
|
if (import_react_native22.Platform.OS === "ios") {
|
|
1365
|
-
(0,
|
|
1341
|
+
(0, import_native_modules12.setIosSwipeGestureEnabled)({ isEnabled: false });
|
|
1366
1342
|
return () => {
|
|
1367
|
-
(0,
|
|
1343
|
+
(0, import_native_modules12.setIosSwipeGestureEnabled)({ isEnabled: true });
|
|
1368
1344
|
};
|
|
1369
1345
|
}
|
|
1370
1346
|
return;
|
|
1371
1347
|
}, []);
|
|
1372
|
-
(0, import_react18.useEffect)(() => {
|
|
1373
|
-
import_native_modules13.appsInTossEvent.addEventListener("entryMessageExited", {
|
|
1374
|
-
onEvent: () => {
|
|
1375
|
-
setIsEntryMessageExited(true);
|
|
1376
|
-
}
|
|
1377
|
-
});
|
|
1378
|
-
}, []);
|
|
1379
1348
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1380
1349
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RNNavigationBar.Game, {}),
|
|
1381
|
-
(0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GameInitializer, {
|
|
1350
|
+
(0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GameInitializer, { children }) : children
|
|
1382
1351
|
] });
|
|
1383
1352
|
}
|
|
1384
1353
|
function GeneralAppContainer({ children }) {
|
|
@@ -1391,7 +1360,7 @@ function GeneralAppContainer({ children }) {
|
|
|
1391
1360
|
// src/core/registerApp.tsx
|
|
1392
1361
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1393
1362
|
function AppsInTossContainer(Container, { children, ...initialProps }) {
|
|
1394
|
-
if (!(0,
|
|
1363
|
+
if (!(0, import_native_modules13.isMinVersionSupported)({
|
|
1395
1364
|
android: "5.220.0",
|
|
1396
1365
|
ios: "5.221.0"
|
|
1397
1366
|
})) {
|
|
@@ -1405,25 +1374,21 @@ function AppsInTossContainer(Container, { children, ...initialProps }) {
|
|
|
1405
1374
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppEvent.StayTime, {}),
|
|
1406
1375
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppEvent.Entry, {}),
|
|
1407
1376
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppEvent.System, { ...initialProps }),
|
|
1408
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Container, { ...initialProps, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1377
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Container, { ...initialProps, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tds_react_native10.TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children }) })
|
|
1409
1378
|
] });
|
|
1410
1379
|
}
|
|
1411
|
-
function TDSContainer({ children }) {
|
|
1412
|
-
useAppsInTossBridge();
|
|
1413
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children });
|
|
1414
|
-
}
|
|
1415
1380
|
function registerApp(container, { context, analytics }) {
|
|
1416
1381
|
const appName = getAppName();
|
|
1417
1382
|
const isRegistered = import_react_native24.AppRegistry.getAppKeys().includes(appName);
|
|
1418
1383
|
if (!isRegistered) {
|
|
1419
1384
|
import_analytics.Analytics.init({
|
|
1420
|
-
logger: (params) => void (0,
|
|
1385
|
+
logger: (params) => void (0, import_native_modules13.eventLog)(params),
|
|
1421
1386
|
debug: analytics?.debug ?? __DEV__
|
|
1422
1387
|
});
|
|
1423
1388
|
const App = import_react_native23.Granite.registerApp(AppsInTossContainer.bind(null, container), {
|
|
1424
1389
|
appName,
|
|
1425
1390
|
context,
|
|
1426
|
-
setIosSwipeGestureEnabled:
|
|
1391
|
+
setIosSwipeGestureEnabled: import_native_modules13.setIosSwipeGestureEnabled,
|
|
1427
1392
|
router: {
|
|
1428
1393
|
screenContainer: AppsInTossScreenContainer,
|
|
1429
1394
|
defaultScreenOption: {
|
|
@@ -1454,42 +1419,42 @@ var AppsInToss = {
|
|
|
1454
1419
|
};
|
|
1455
1420
|
|
|
1456
1421
|
// src/components/WebView.tsx
|
|
1457
|
-
var
|
|
1422
|
+
var import_native_modules22 = require("@apps-in-toss/native-modules");
|
|
1458
1423
|
var appsInTossAsyncBridges = __toESM(require("@apps-in-toss/native-modules/async-bridges"), 1);
|
|
1459
1424
|
var appsInTossConstantBridges = __toESM(require("@apps-in-toss/native-modules/constant-bridges"), 1);
|
|
1460
1425
|
var appsInTossEventBridges = __toESM(require("@apps-in-toss/native-modules/event-bridges"), 1);
|
|
1461
1426
|
var import_react_native_safe_area_context4 = require("@granite-js/native/react-native-safe-area-context");
|
|
1462
1427
|
var import_react_native37 = require("@granite-js/react-native");
|
|
1463
|
-
var
|
|
1428
|
+
var import_tds_react_native14 = require("@toss/tds-react-native");
|
|
1464
1429
|
var import_private9 = require("@toss/tds-react-native/private");
|
|
1465
|
-
var
|
|
1430
|
+
var import_react28 = require("react");
|
|
1466
1431
|
var import_react_native38 = require("react-native");
|
|
1467
1432
|
|
|
1468
1433
|
// src/components/GameWebView.tsx
|
|
1469
|
-
var
|
|
1434
|
+
var import_native_modules14 = require("@apps-in-toss/native-modules");
|
|
1470
1435
|
var import_react_native_webview = require("@granite-js/native/react-native-webview");
|
|
1471
|
-
var
|
|
1436
|
+
var import_react19 = require("react");
|
|
1472
1437
|
var import_react_native27 = require("react-native");
|
|
1473
1438
|
|
|
1474
1439
|
// src/components/NavigationBar/GameWebviewNavigationBar.tsx
|
|
1475
1440
|
var import_react_native_safe_area_context2 = require("@granite-js/native/react-native-safe-area-context");
|
|
1476
1441
|
var import_react_native25 = require("@granite-js/react-native");
|
|
1477
|
-
var
|
|
1442
|
+
var import_tds_react_native11 = require("@toss/tds-react-native");
|
|
1478
1443
|
var import_private7 = require("@toss/tds-react-native/private");
|
|
1479
1444
|
var import_es_hangul3 = require("es-hangul");
|
|
1480
|
-
var
|
|
1445
|
+
var import_react18 = require("react");
|
|
1481
1446
|
var import_react_native26 = require("react-native");
|
|
1482
1447
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1483
1448
|
function GameWebviewNavigationBar() {
|
|
1484
1449
|
const safeAreaTop = (0, import_private7.useSafeAreaTop)();
|
|
1485
|
-
const { openConfirm } = (0,
|
|
1450
|
+
const { openConfirm } = (0, import_tds_react_native11.useDialog)();
|
|
1486
1451
|
const { captureExitLog } = useCaptureExitLog();
|
|
1487
1452
|
const global2 = getAppsInTossGlobals();
|
|
1488
1453
|
const logging = useNavigationBarLogging();
|
|
1489
1454
|
const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
|
|
1490
1455
|
const { navigationRightButton } = useNavigationBarContext();
|
|
1491
1456
|
const { right: safeAreaRight } = (0, import_react_native_safe_area_context2.useSafeAreaInsets)();
|
|
1492
|
-
const handleGameWebviewClose = (0,
|
|
1457
|
+
const handleGameWebviewClose = (0, import_react18.useCallback)(async () => {
|
|
1493
1458
|
logging.closeButtonClick();
|
|
1494
1459
|
const isConfirmed = await openConfirm({
|
|
1495
1460
|
title: `${(0, import_es_hangul3.josa)(global2.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
|
|
@@ -1505,7 +1470,7 @@ function GameWebviewNavigationBar() {
|
|
|
1505
1470
|
}
|
|
1506
1471
|
}, [captureExitLog, global2.brandDisplayName, logging, openConfirm]);
|
|
1507
1472
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
1508
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1473
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tds_react_native11.PageNavbar, { preference: { type: "none" } }),
|
|
1509
1474
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1510
1475
|
import_react_native26.View,
|
|
1511
1476
|
{
|
|
@@ -1540,52 +1505,44 @@ function GameWebviewNavigationBar() {
|
|
|
1540
1505
|
|
|
1541
1506
|
// src/components/GameWebView.tsx
|
|
1542
1507
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1543
|
-
var GameWebView = (0,
|
|
1544
|
-
|
|
1545
|
-
(0, import_react20.useEffect)(() => {
|
|
1508
|
+
var GameWebView = (0, import_react19.forwardRef)(function GameWebView2(props, ref) {
|
|
1509
|
+
(0, import_react19.useEffect)(() => {
|
|
1546
1510
|
if (import_react_native27.Platform.OS === "ios") {
|
|
1547
|
-
(0,
|
|
1511
|
+
(0, import_native_modules14.setIosSwipeGestureEnabled)({ isEnabled: false });
|
|
1548
1512
|
return () => {
|
|
1549
|
-
(0,
|
|
1513
|
+
(0, import_native_modules14.setIosSwipeGestureEnabled)({ isEnabled: true });
|
|
1550
1514
|
};
|
|
1551
1515
|
}
|
|
1552
1516
|
return;
|
|
1553
1517
|
}, []);
|
|
1554
|
-
(0, import_react20.useEffect)(() => {
|
|
1555
|
-
import_native_modules15.appsInTossEvent.addEventListener("entryMessageExited", {
|
|
1556
|
-
onEvent: () => {
|
|
1557
|
-
setIsEntryMessageExited(true);
|
|
1558
|
-
}
|
|
1559
|
-
});
|
|
1560
|
-
}, []);
|
|
1561
1518
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1562
1519
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GameWebviewNavigationBar, {}),
|
|
1563
|
-
(0,
|
|
1520
|
+
(0, import_native_modules14.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GameInitializer, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native_webview.WebView, { ref, ...props }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native_webview.WebView, { ref, ...props })
|
|
1564
1521
|
] });
|
|
1565
1522
|
});
|
|
1566
1523
|
|
|
1567
1524
|
// src/components/PartnerWebView.tsx
|
|
1568
1525
|
var import_react_native_webview2 = require("@granite-js/native/react-native-webview");
|
|
1569
|
-
var
|
|
1526
|
+
var import_react21 = require("react");
|
|
1570
1527
|
|
|
1571
1528
|
// src/components/NavigationBar/PartnerWebviewNavigationBar.tsx
|
|
1572
1529
|
var import_react_native28 = require("@granite-js/react-native");
|
|
1573
|
-
var
|
|
1530
|
+
var import_tds_react_native12 = require("@toss/tds-react-native");
|
|
1574
1531
|
var import_private8 = require("@toss/tds-react-native/private");
|
|
1575
1532
|
var import_es_hangul4 = require("es-hangul");
|
|
1576
|
-
var
|
|
1533
|
+
var import_react20 = require("react");
|
|
1577
1534
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1578
1535
|
function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
|
|
1579
1536
|
const globals = getAppsInTossGlobals();
|
|
1580
1537
|
const { captureExitLog } = useCaptureExitLog();
|
|
1581
1538
|
const logging = useNavigationBarLogging();
|
|
1582
|
-
const { openConfirm } = (0,
|
|
1539
|
+
const { openConfirm } = (0, import_tds_react_native12.useDialog)();
|
|
1583
1540
|
const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
|
|
1584
1541
|
const parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
|
|
1585
1542
|
const withHomeButton = parsedNavigationBar?.withHomeButton ?? false;
|
|
1586
1543
|
const withBackButton = parsedNavigationBar?.withBackButton ?? true;
|
|
1587
1544
|
const { navigationRightButton } = useNavigationBarContext();
|
|
1588
|
-
const handleClose = (0,
|
|
1545
|
+
const handleClose = (0, import_react20.useCallback)(async () => {
|
|
1589
1546
|
logging.closeButtonClick();
|
|
1590
1547
|
const isConfirmed = await openConfirm({
|
|
1591
1548
|
title: `${(0, import_es_hangul4.josa)(globals.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
|
|
@@ -1619,7 +1576,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
|
|
|
1619
1576
|
|
|
1620
1577
|
// src/components/PartnerWebView.tsx
|
|
1621
1578
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1622
|
-
var PartnerWebView = (0,
|
|
1579
|
+
var PartnerWebView = (0, import_react21.forwardRef)(function PartnerWebViewScreen({ onBackButtonClick, onHomeButtonClick, ...webViewProps }, ref) {
|
|
1623
1580
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
1624
1581
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PartnerWebviewNavigationBar, { onBackButtonClick, onHomeButtonClick }),
|
|
1625
1582
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native_webview2.WebView, { ref, ...webViewProps, style: { flex: 1 } })
|
|
@@ -1640,7 +1597,7 @@ function convertIntentURL(url) {
|
|
|
1640
1597
|
}
|
|
1641
1598
|
|
|
1642
1599
|
// src/ads/fetchTossAd.ts
|
|
1643
|
-
var
|
|
1600
|
+
var import_native_modules15 = require("@apps-in-toss/native-modules");
|
|
1644
1601
|
|
|
1645
1602
|
// ../../.yarn/cache/es-toolkit-npm-1.34.1-4cd6371dcb-aab6d07be3.zip/node_modules/es-toolkit/dist/function/noop.mjs
|
|
1646
1603
|
function noop() {
|
|
@@ -1659,10 +1616,10 @@ function generateSessionId() {
|
|
|
1659
1616
|
var sessionId = generateSessionId();
|
|
1660
1617
|
|
|
1661
1618
|
// src/ads/fetchTossAd.ts
|
|
1662
|
-
var ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.
|
|
1663
|
-
var IOS_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.
|
|
1619
|
+
var ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
|
|
1620
|
+
var IOS_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
|
|
1664
1621
|
var UNSUPPORTED_ERROR_MESSAGE = "This feature is not supported in the current environment";
|
|
1665
|
-
var ENVIRONMENT = (0,
|
|
1622
|
+
var ENVIRONMENT = (0, import_native_modules15.getOperationalEnvironment)();
|
|
1666
1623
|
function fetchTossAd(params) {
|
|
1667
1624
|
if (!fetchTossAd.isSupported()) {
|
|
1668
1625
|
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE));
|
|
@@ -1670,9 +1627,9 @@ function fetchTossAd(params) {
|
|
|
1670
1627
|
}
|
|
1671
1628
|
const { onEvent, onError, options } = params;
|
|
1672
1629
|
const { adGroupId } = options;
|
|
1673
|
-
const unregisterCallbacks =
|
|
1630
|
+
const unregisterCallbacks = import_native_modules15.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
|
|
1674
1631
|
"fetchTossAd",
|
|
1675
|
-
{ spaceUnitId: adGroupId, sessionId },
|
|
1632
|
+
{ spaceUnitId: adGroupId, sessionId, sdkId: options.sdkId, availableStyleIds: options.availableStyleIds },
|
|
1676
1633
|
{
|
|
1677
1634
|
onSuccess: (response) => {
|
|
1678
1635
|
onEvent(response);
|
|
@@ -1688,14 +1645,14 @@ fetchTossAd.isSupported = () => {
|
|
|
1688
1645
|
if (ENVIRONMENT !== "toss") {
|
|
1689
1646
|
return false;
|
|
1690
1647
|
}
|
|
1691
|
-
return (0,
|
|
1648
|
+
return (0, import_native_modules15.isMinVersionSupported)({
|
|
1692
1649
|
android: ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION,
|
|
1693
1650
|
ios: IOS_FETCH_TOSS_AD_SUPPORTED_VERSION
|
|
1694
1651
|
});
|
|
1695
1652
|
};
|
|
1696
1653
|
|
|
1697
1654
|
// src/ads/integratedAd.ts
|
|
1698
|
-
var
|
|
1655
|
+
var import_native_modules17 = require("@apps-in-toss/native-modules");
|
|
1699
1656
|
|
|
1700
1657
|
// src/ads/generateRequestId.ts
|
|
1701
1658
|
function generateRequestId() {
|
|
@@ -1715,7 +1672,7 @@ function getReferrer() {
|
|
|
1715
1672
|
}
|
|
1716
1673
|
|
|
1717
1674
|
// src/ads/remotes.ts
|
|
1718
|
-
var
|
|
1675
|
+
var import_native_modules16 = require("@apps-in-toss/native-modules");
|
|
1719
1676
|
|
|
1720
1677
|
// src/ads/getIsDev.ts
|
|
1721
1678
|
var import_react_native30 = require("@granite-js/react-native");
|
|
@@ -1728,9 +1685,9 @@ function getIsDev() {
|
|
|
1728
1685
|
}
|
|
1729
1686
|
|
|
1730
1687
|
// src/ads/remotes.ts
|
|
1731
|
-
var OPERATIONAL_ENVIRONMENT = (0,
|
|
1732
|
-
var OS = (0,
|
|
1733
|
-
var APP_VER = (0,
|
|
1688
|
+
var OPERATIONAL_ENVIRONMENT = (0, import_native_modules16.getOperationalEnvironment)();
|
|
1689
|
+
var OS = (0, import_native_modules16.getPlatformOS)();
|
|
1690
|
+
var APP_VER = (0, import_native_modules16.getTossAppVersion)();
|
|
1734
1691
|
var ALPHA_EVENT_TRACKER_HTTP_ENDPOINT = "https://alpha-trillion.toss.im/trk/sdk-mediation/event";
|
|
1735
1692
|
var LIVE_EVENT_TRACKER_HTTP_ENDPOINT = "https://trillion.toss.im/trk/sdk-mediation/event";
|
|
1736
1693
|
function getPostEventTrackingUrl() {
|
|
@@ -1763,82 +1720,87 @@ function postEventTracking(params) {
|
|
|
1763
1720
|
|
|
1764
1721
|
// src/ads/integratedAd.ts
|
|
1765
1722
|
var INTEGRATED_AD_SDK_VERSION = "0.0.0";
|
|
1766
|
-
var ANDROID_INTEGRATED_AD_SUPPORTED_VERSION = "5.
|
|
1767
|
-
var IOS_INTEGRATED_AD_SUPPORTED_VERSION = "5.
|
|
1723
|
+
var ANDROID_INTEGRATED_AD_SUPPORTED_VERSION = "5.241.0";
|
|
1724
|
+
var IOS_INTEGRATED_AD_SUPPORTED_VERSION = "5.241.0";
|
|
1768
1725
|
var UNSUPPORTED_ERROR_MESSAGE2 = "This feature is not supported in the current environment";
|
|
1769
1726
|
var INTG_AD_ADM_FALLBACK_RID_MAP = {};
|
|
1770
1727
|
function integratedAdIsSupported() {
|
|
1771
|
-
return (0,
|
|
1728
|
+
return (0, import_native_modules17.isMinVersionSupported)({
|
|
1772
1729
|
android: ANDROID_INTEGRATED_AD_SUPPORTED_VERSION,
|
|
1773
1730
|
ios: IOS_INTEGRATED_AD_SUPPORTED_VERSION
|
|
1774
1731
|
});
|
|
1775
1732
|
}
|
|
1776
|
-
function
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1733
|
+
function generateLoadFullScreenAd(sdkId) {
|
|
1734
|
+
const fn = (params) => {
|
|
1735
|
+
if (!import_native_modules17.GoogleAdMob.loadAppsInTossAdMob.isSupported()) {
|
|
1736
|
+
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
|
|
1737
|
+
return noop;
|
|
1738
|
+
}
|
|
1739
|
+
if (!integratedAdIsSupported()) {
|
|
1740
|
+
return import_native_modules17.GoogleAdMob.loadAppsInTossAdMob({
|
|
1741
|
+
...params,
|
|
1742
|
+
onEvent: (event) => {
|
|
1743
|
+
if (event.type === "loaded") {
|
|
1744
|
+
const requestId = generateRequestId();
|
|
1745
|
+
INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] = requestId;
|
|
1746
|
+
postEventTracking({
|
|
1747
|
+
eventName: "LOAD",
|
|
1748
|
+
spaceUnitId: params.options.adGroupId,
|
|
1749
|
+
requestId,
|
|
1750
|
+
responseId: event.data.responseInfo.responseId,
|
|
1751
|
+
mediationType: "ADMOB",
|
|
1752
|
+
format: "",
|
|
1753
|
+
adSourceName: event.data.responseInfo.loadedAdNetworkInfo?.adSourceName ?? "",
|
|
1754
|
+
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1755
|
+
});
|
|
1756
|
+
}
|
|
1757
|
+
return params.onEvent(event);
|
|
1758
|
+
},
|
|
1759
|
+
onError: (error) => {
|
|
1760
|
+
const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
|
|
1788
1761
|
postEventTracking({
|
|
1789
|
-
eventName: "
|
|
1762
|
+
eventName: "FAILED_TO_LOAD",
|
|
1790
1763
|
spaceUnitId: params.options.adGroupId,
|
|
1791
1764
|
requestId,
|
|
1792
|
-
responseId:
|
|
1765
|
+
responseId: "",
|
|
1793
1766
|
mediationType: "ADMOB",
|
|
1794
1767
|
format: "",
|
|
1795
|
-
adSourceName:
|
|
1768
|
+
adSourceName: "",
|
|
1796
1769
|
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1797
1770
|
});
|
|
1771
|
+
return params.onError(error);
|
|
1798
1772
|
}
|
|
1799
|
-
|
|
1800
|
-
},
|
|
1801
|
-
onError: (error) => {
|
|
1802
|
-
const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
|
|
1803
|
-
postEventTracking({
|
|
1804
|
-
eventName: "FAILED_TO_LOAD",
|
|
1805
|
-
spaceUnitId: params.options.adGroupId,
|
|
1806
|
-
requestId,
|
|
1807
|
-
responseId: "",
|
|
1808
|
-
mediationType: "ADMOB",
|
|
1809
|
-
format: "",
|
|
1810
|
-
adSourceName: "",
|
|
1811
|
-
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
1812
|
-
});
|
|
1813
|
-
return params.onError(error);
|
|
1814
|
-
}
|
|
1815
|
-
});
|
|
1816
|
-
}
|
|
1817
|
-
const { onEvent, onError, options } = params;
|
|
1818
|
-
const { adGroupId } = options;
|
|
1819
|
-
const referrer = getReferrer();
|
|
1820
|
-
const unregisterCallbacks = import_native_modules18.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
|
|
1821
|
-
"loadTossAdOrAdmob",
|
|
1822
|
-
{ spaceUnitId: adGroupId, referrer, sessionId },
|
|
1823
|
-
{
|
|
1824
|
-
onSuccess: () => {
|
|
1825
|
-
onEvent({ type: "loaded" });
|
|
1826
|
-
},
|
|
1827
|
-
onError: (error) => {
|
|
1828
|
-
onError(error);
|
|
1829
|
-
}
|
|
1773
|
+
});
|
|
1830
1774
|
}
|
|
1831
|
-
|
|
1832
|
-
|
|
1775
|
+
const { onEvent, onError, options } = params;
|
|
1776
|
+
const { adGroupId } = options;
|
|
1777
|
+
const referrer = getReferrer();
|
|
1778
|
+
const unregisterCallbacks = import_native_modules17.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
|
|
1779
|
+
"loadTossAdOrAdmob",
|
|
1780
|
+
{ spaceUnitId: adGroupId, referrer, sessionId, sdkId },
|
|
1781
|
+
{
|
|
1782
|
+
onSuccess: () => {
|
|
1783
|
+
onEvent({ type: "loaded" });
|
|
1784
|
+
},
|
|
1785
|
+
onError: (error) => {
|
|
1786
|
+
onError(error);
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
);
|
|
1790
|
+
return unregisterCallbacks;
|
|
1791
|
+
};
|
|
1792
|
+
fn.isSupported = import_native_modules17.GoogleAdMob.loadAppsInTossAdMob.isSupported;
|
|
1793
|
+
return fn;
|
|
1833
1794
|
}
|
|
1834
|
-
loadFullScreenAd
|
|
1795
|
+
var loadFullScreenAd = generateLoadFullScreenAd("107");
|
|
1796
|
+
var loadFullScreenAdForWeb = generateLoadFullScreenAd("107");
|
|
1835
1797
|
function showFullScreenAd(params) {
|
|
1836
|
-
if (!
|
|
1798
|
+
if (!import_native_modules17.GoogleAdMob.showAppsInTossAdMob.isSupported()) {
|
|
1837
1799
|
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
|
|
1838
1800
|
return noop;
|
|
1839
1801
|
}
|
|
1840
1802
|
if (!integratedAdIsSupported()) {
|
|
1841
|
-
return
|
|
1803
|
+
return import_native_modules17.GoogleAdMob.showAppsInTossAdMob({
|
|
1842
1804
|
...params,
|
|
1843
1805
|
onEvent: (event) => {
|
|
1844
1806
|
const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
|
|
@@ -1937,7 +1899,7 @@ function showFullScreenAd(params) {
|
|
|
1937
1899
|
const { onEvent, onError, options } = params;
|
|
1938
1900
|
const { adGroupId } = options;
|
|
1939
1901
|
const referrer = getReferrer();
|
|
1940
|
-
const unregisterCallbacks =
|
|
1902
|
+
const unregisterCallbacks = import_native_modules17.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
|
|
1941
1903
|
"showTossAdOrAdmob",
|
|
1942
1904
|
{ spaceUnitId: adGroupId, referrer, sessionId },
|
|
1943
1905
|
{
|
|
@@ -1969,10 +1931,10 @@ function showFullScreenAd(params) {
|
|
|
1969
1931
|
);
|
|
1970
1932
|
return unregisterCallbacks;
|
|
1971
1933
|
}
|
|
1972
|
-
showFullScreenAd.isSupported =
|
|
1934
|
+
showFullScreenAd.isSupported = import_native_modules17.GoogleAdMob.showAppsInTossAdMob.isSupported;
|
|
1973
1935
|
|
|
1974
1936
|
// src/ads/tossAdEventLog.ts
|
|
1975
|
-
var
|
|
1937
|
+
var import_native_modules18 = require("@apps-in-toss/native-modules");
|
|
1976
1938
|
var import_react_native31 = require("@granite-js/react-native");
|
|
1977
1939
|
async function tossAdEventLog(params) {
|
|
1978
1940
|
const referrer = getReferrer();
|
|
@@ -1985,11 +1947,11 @@ async function tossAdEventLog(params) {
|
|
|
1985
1947
|
app_name: appName
|
|
1986
1948
|
}
|
|
1987
1949
|
};
|
|
1988
|
-
return
|
|
1950
|
+
return import_native_modules18.INTERNAL__module.tossCoreEventLog(eventLogParams);
|
|
1989
1951
|
}
|
|
1990
1952
|
|
|
1991
1953
|
// src/bridge-handler/useBridgeHandler.tsx
|
|
1992
|
-
var
|
|
1954
|
+
var import_react22 = require("react");
|
|
1993
1955
|
function serializeError(error) {
|
|
1994
1956
|
return JSON.stringify(error, (_, value) => {
|
|
1995
1957
|
if (value instanceof Error) {
|
|
@@ -2041,8 +2003,8 @@ function useBridgeHandler({
|
|
|
2041
2003
|
asyncHandlerMap,
|
|
2042
2004
|
eventListenerMap
|
|
2043
2005
|
}) {
|
|
2044
|
-
const ref = (0,
|
|
2045
|
-
const injectedJavaScript = (0,
|
|
2006
|
+
const ref = (0, import_react22.useRef)(null);
|
|
2007
|
+
const injectedJavaScript = (0, import_react22.useMemo)(
|
|
2046
2008
|
() => `window.__CONSTANT_HANDLER_MAP = ${JSON.stringify(
|
|
2047
2009
|
Object.entries(constantHandlerMap).reduce(
|
|
2048
2010
|
(acc, [key, value]) => {
|
|
@@ -2054,7 +2016,7 @@ function useBridgeHandler({
|
|
|
2054
2016
|
)};`,
|
|
2055
2017
|
[constantHandlerMap]
|
|
2056
2018
|
);
|
|
2057
|
-
(0,
|
|
2019
|
+
(0, import_react22.useEffect)(() => {
|
|
2058
2020
|
ref.current?.injectJavaScript(injectedJavaScript);
|
|
2059
2021
|
}, [injectedJavaScript]);
|
|
2060
2022
|
const createHandleOnEvent = (functionName, eventId) => (response) => {
|
|
@@ -2068,7 +2030,7 @@ function useBridgeHandler({
|
|
|
2068
2030
|
window.__GRANITE_NATIVE_EMITTER.emit('${functionName}/onError/${eventId}', ${serializedError});
|
|
2069
2031
|
`);
|
|
2070
2032
|
};
|
|
2071
|
-
const $onMessage = (0,
|
|
2033
|
+
const $onMessage = (0, import_react22.useCallback)(
|
|
2072
2034
|
async (e) => {
|
|
2073
2035
|
onMessage?.(e);
|
|
2074
2036
|
const data = parseNativeEventData(e.nativeEvent.data);
|
|
@@ -2128,7 +2090,7 @@ function parseNativeEventData(data) {
|
|
|
2128
2090
|
|
|
2129
2091
|
// src/core/hooks/useSafeAreaInsetsEmitter.tsx
|
|
2130
2092
|
var import_react_native_safe_area_context3 = require("@granite-js/native/react-native-safe-area-context");
|
|
2131
|
-
var
|
|
2093
|
+
var import_react23 = require("react");
|
|
2132
2094
|
var EventEmitter = class {
|
|
2133
2095
|
listeners = {};
|
|
2134
2096
|
on(event, listener) {
|
|
@@ -2152,8 +2114,8 @@ var EventEmitter = class {
|
|
|
2152
2114
|
};
|
|
2153
2115
|
function useSafeAreaInsetsEmitter() {
|
|
2154
2116
|
const insets = (0, import_react_native_safe_area_context3.useSafeAreaInsets)();
|
|
2155
|
-
const emitter = (0,
|
|
2156
|
-
(0,
|
|
2117
|
+
const emitter = (0, import_react23.useMemo)(() => new EventEmitter(), []);
|
|
2118
|
+
(0, import_react23.useEffect)(() => {
|
|
2157
2119
|
emitter.emit("safeAreaInsetsChange", insets);
|
|
2158
2120
|
return () => {
|
|
2159
2121
|
emitter.off("safeAreaInsetsChange", (listener) => listener(insets));
|
|
@@ -2164,12 +2126,12 @@ function useSafeAreaInsetsEmitter() {
|
|
|
2164
2126
|
|
|
2165
2127
|
// src/core/hooks/useWebBackHandler.tsx
|
|
2166
2128
|
var import_react_native32 = require("@granite-js/react-native");
|
|
2167
|
-
var
|
|
2129
|
+
var import_tds_react_native13 = require("@toss/tds-react-native");
|
|
2168
2130
|
var import_es_hangul5 = require("es-hangul");
|
|
2169
|
-
var
|
|
2131
|
+
var import_react25 = require("react");
|
|
2170
2132
|
|
|
2171
2133
|
// src/hooks/useWebviewHistoryStack.tsx
|
|
2172
|
-
var
|
|
2134
|
+
var import_react24 = require("react");
|
|
2173
2135
|
var INITIAL_STATE = { stack: [], index: -1 };
|
|
2174
2136
|
function reducer(state, action) {
|
|
2175
2137
|
switch (action.type) {
|
|
@@ -2200,11 +2162,11 @@ function reducer(state, action) {
|
|
|
2200
2162
|
}
|
|
2201
2163
|
}
|
|
2202
2164
|
function useWebViewHistory() {
|
|
2203
|
-
const [state, dispatch] = (0,
|
|
2204
|
-
const onNavigationStateChange = (0,
|
|
2165
|
+
const [state, dispatch] = (0, import_react24.useReducer)(reducer, INITIAL_STATE);
|
|
2166
|
+
const onNavigationStateChange = (0, import_react24.useCallback)(({ url, canGoForward: canGoForward2 }) => {
|
|
2205
2167
|
dispatch({ type: "NAVIGATION_CHANGE", url, canGoForward: canGoForward2 });
|
|
2206
2168
|
}, []);
|
|
2207
|
-
const { canGoBack, canGoForward } = (0,
|
|
2169
|
+
const { canGoBack, canGoForward } = (0, import_react24.useMemo)(() => {
|
|
2208
2170
|
const canBack = state.index > 0;
|
|
2209
2171
|
const canFwd = state.index >= 0 && state.index < state.stack.length - 1;
|
|
2210
2172
|
return { canGoBack: canBack, canGoForward: canFwd };
|
|
@@ -2235,21 +2197,21 @@ function useWebBackHandler(webViewRef) {
|
|
|
2235
2197
|
removeEventListener: removeWebBackEventListener
|
|
2236
2198
|
} = (0, import_react_native32.useBackEventState)();
|
|
2237
2199
|
const logging = useNavigationBarLogging();
|
|
2238
|
-
const { openConfirm } = (0,
|
|
2200
|
+
const { openConfirm } = (0, import_tds_react_native13.useDialog)();
|
|
2239
2201
|
const global2 = getAppsInTossGlobals();
|
|
2240
|
-
const addEventListener = (0,
|
|
2202
|
+
const addEventListener = (0, import_react25.useCallback)(
|
|
2241
2203
|
(handler) => {
|
|
2242
2204
|
addWebBackEventListener(handler);
|
|
2243
2205
|
},
|
|
2244
2206
|
[addWebBackEventListener]
|
|
2245
2207
|
);
|
|
2246
|
-
const removeEventListener = (0,
|
|
2208
|
+
const removeEventListener = (0, import_react25.useCallback)(
|
|
2247
2209
|
(handler) => {
|
|
2248
2210
|
removeWebBackEventListener(handler);
|
|
2249
2211
|
},
|
|
2250
2212
|
[removeWebBackEventListener]
|
|
2251
2213
|
);
|
|
2252
|
-
const handleWebBack = (0,
|
|
2214
|
+
const handleWebBack = (0, import_react25.useCallback)(async () => {
|
|
2253
2215
|
if (hasWebBackEvent) {
|
|
2254
2216
|
for (const handler of webBackHandlersRef) {
|
|
2255
2217
|
handler();
|
|
@@ -2282,7 +2244,7 @@ function useWebBackHandler(webViewRef) {
|
|
|
2282
2244
|
openConfirm,
|
|
2283
2245
|
webViewRef
|
|
2284
2246
|
]);
|
|
2285
|
-
const handleWebHome = (0,
|
|
2247
|
+
const handleWebHome = (0, import_react25.useCallback)(() => {
|
|
2286
2248
|
logging.homeButtonClick();
|
|
2287
2249
|
if (hasWebBackEvent) {
|
|
2288
2250
|
for (const handler of webBackHandlersRef) {
|
|
@@ -2292,7 +2254,7 @@ function useWebBackHandler(webViewRef) {
|
|
|
2292
2254
|
}
|
|
2293
2255
|
webViewRef.current?.injectJavaScript(HISTORY_HOME_SCRIPT);
|
|
2294
2256
|
}, [hasWebBackEvent, webBackHandlersRef, logging, webViewRef]);
|
|
2295
|
-
return (0,
|
|
2257
|
+
return (0, import_react25.useMemo)(
|
|
2296
2258
|
() => ({ addEventListener, removeEventListener, handleWebBack, handleWebHome, onNavigationStateChange }),
|
|
2297
2259
|
[addEventListener, removeEventListener, handleWebBack, handleWebHome, onNavigationStateChange]
|
|
2298
2260
|
);
|
|
@@ -2312,7 +2274,7 @@ function mergeRefs(...refs) {
|
|
|
2312
2274
|
}
|
|
2313
2275
|
|
|
2314
2276
|
// src/hooks/useCreateUserAgent.ts
|
|
2315
|
-
var
|
|
2277
|
+
var import_native_modules19 = require("@apps-in-toss/native-modules");
|
|
2316
2278
|
var import_react_native33 = require("react-native");
|
|
2317
2279
|
var FontA11yCategory = {
|
|
2318
2280
|
Large: "Large",
|
|
@@ -2446,8 +2408,8 @@ function useCreateUserAgent({
|
|
|
2446
2408
|
safeArea,
|
|
2447
2409
|
safeAreaBottomTransparency
|
|
2448
2410
|
}) {
|
|
2449
|
-
const platform = (0,
|
|
2450
|
-
const appVersion = (0,
|
|
2411
|
+
const platform = (0, import_native_modules19.getPlatformOS)();
|
|
2412
|
+
const appVersion = (0, import_native_modules19.getTossAppVersion)();
|
|
2451
2413
|
const { fontScale } = (0, import_react_native33.useWindowDimensions)();
|
|
2452
2414
|
const platformString = platform === "ios" ? "iPhone" : "Android phone";
|
|
2453
2415
|
const fontA11y = mapFontScaleToCategory(fontScale, platform);
|
|
@@ -2469,17 +2431,17 @@ function useCreateUserAgent({
|
|
|
2469
2431
|
}
|
|
2470
2432
|
|
|
2471
2433
|
// src/hooks/useGeolocation.ts
|
|
2472
|
-
var
|
|
2434
|
+
var import_native_modules20 = require("@apps-in-toss/native-modules");
|
|
2473
2435
|
var import_react_native34 = require("@granite-js/react-native");
|
|
2474
|
-
var
|
|
2436
|
+
var import_react26 = require("react");
|
|
2475
2437
|
function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
|
|
2476
2438
|
const isVisible = (0, import_react_native34.useVisibility)();
|
|
2477
|
-
const [location, setLocation] = (0,
|
|
2478
|
-
(0,
|
|
2439
|
+
const [location, setLocation] = (0, import_react26.useState)(null);
|
|
2440
|
+
(0, import_react26.useEffect)(() => {
|
|
2479
2441
|
if (!isVisible) {
|
|
2480
2442
|
return;
|
|
2481
2443
|
}
|
|
2482
|
-
return (0,
|
|
2444
|
+
return (0, import_native_modules20.startUpdateLocation)({
|
|
2483
2445
|
options: {
|
|
2484
2446
|
accuracy,
|
|
2485
2447
|
distanceInterval,
|
|
@@ -2494,11 +2456,11 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
|
|
|
2494
2456
|
|
|
2495
2457
|
// src/hooks/useWaitForReturnNavigator.tsx
|
|
2496
2458
|
var import_react_native35 = require("@granite-js/react-native");
|
|
2497
|
-
var
|
|
2459
|
+
var import_react27 = require("react");
|
|
2498
2460
|
function useWaitForReturnNavigator() {
|
|
2499
|
-
const callbacks = (0,
|
|
2461
|
+
const callbacks = (0, import_react27.useRef)([]).current;
|
|
2500
2462
|
const navigation = (0, import_react_native35.useNavigation)();
|
|
2501
|
-
const startNavigating = (0,
|
|
2463
|
+
const startNavigating = (0, import_react27.useCallback)(
|
|
2502
2464
|
(route, params) => {
|
|
2503
2465
|
return new Promise((resolve) => {
|
|
2504
2466
|
callbacks.push(resolve);
|
|
@@ -2507,7 +2469,7 @@ function useWaitForReturnNavigator() {
|
|
|
2507
2469
|
},
|
|
2508
2470
|
[callbacks, navigation]
|
|
2509
2471
|
);
|
|
2510
|
-
const handleVisibilityChange = (0,
|
|
2472
|
+
const handleVisibilityChange = (0, import_react27.useCallback)(
|
|
2511
2473
|
(state) => {
|
|
2512
2474
|
if (state === "visible" && callbacks.length > 0) {
|
|
2513
2475
|
for (const callback of callbacks) {
|
|
@@ -2532,7 +2494,7 @@ function useTopNavigation() {
|
|
|
2532
2494
|
}
|
|
2533
2495
|
|
|
2534
2496
|
// src/utils/log.ts
|
|
2535
|
-
var
|
|
2497
|
+
var import_native_modules21 = require("@apps-in-toss/native-modules");
|
|
2536
2498
|
var import_react_native36 = require("@granite-js/react-native");
|
|
2537
2499
|
|
|
2538
2500
|
// src/utils/extractDateFromUUIDv7.ts
|
|
@@ -2577,7 +2539,7 @@ var trackScreen = (url) => {
|
|
|
2577
2539
|
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
2578
2540
|
}
|
|
2579
2541
|
};
|
|
2580
|
-
return (0,
|
|
2542
|
+
return (0, import_native_modules21.eventLog)(log);
|
|
2581
2543
|
};
|
|
2582
2544
|
|
|
2583
2545
|
// src/components/WebView.tsx
|
|
@@ -2586,7 +2548,7 @@ var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment
|
|
|
2586
2548
|
var TYPES = ["partner", "external", "game"];
|
|
2587
2549
|
var WEBVIEW_TYPES = {
|
|
2588
2550
|
partner: PartnerWebView,
|
|
2589
|
-
external:
|
|
2551
|
+
external: import_tds_react_native14.ExternalWebViewScreen,
|
|
2590
2552
|
game: GameWebView
|
|
2591
2553
|
};
|
|
2592
2554
|
function mergeSchemeQueryParamsInto(url) {
|
|
@@ -2603,7 +2565,7 @@ function getWebViewUri(local) {
|
|
|
2603
2565
|
const devUrl = `http://${local.host}:${local.port}`;
|
|
2604
2566
|
return mergeSchemeQueryParamsInto(devUrl).toString();
|
|
2605
2567
|
}
|
|
2606
|
-
const { url: rawUrl } =
|
|
2568
|
+
const { url: rawUrl } = import_native_modules22.AppsInTossModule.getWebBundleURL({});
|
|
2607
2569
|
const url = mergeSchemeQueryParamsInto(rawUrl);
|
|
2608
2570
|
const deploymentId = env.getDeploymentId();
|
|
2609
2571
|
if (deploymentId) {
|
|
@@ -2615,31 +2577,30 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2615
2577
|
if (!TYPES.includes(type)) {
|
|
2616
2578
|
throw new Error(`Invalid WebView type: '${type}'`);
|
|
2617
2579
|
}
|
|
2618
|
-
const webViewRef = (0,
|
|
2580
|
+
const webViewRef = (0, import_react28.useRef)(null);
|
|
2619
2581
|
const webBackHandler = useWebBackHandler(webViewRef);
|
|
2620
|
-
const uri = (0,
|
|
2582
|
+
const uri = (0, import_react28.useMemo)(() => getWebViewUri(local), [local]);
|
|
2621
2583
|
const top = (0, import_private9.useSafeAreaTop)();
|
|
2622
2584
|
const bottom = (0, import_private9.useSafeAreaBottom)();
|
|
2623
2585
|
const insets = (0, import_react_native_safe_area_context4.useSafeAreaInsets)();
|
|
2624
2586
|
const global2 = getAppsInTossGlobals();
|
|
2625
2587
|
const navigationBarContext = useNavigationBarContext();
|
|
2626
2588
|
const safeAreaInsetsEmitter = useSafeAreaInsetsEmitter();
|
|
2627
|
-
const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = (0,
|
|
2589
|
+
const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = (0, import_react28.useState)(
|
|
2628
2590
|
props.allowsBackForwardNavigationGestures
|
|
2629
2591
|
);
|
|
2630
2592
|
const handler = useBridgeHandler({
|
|
2631
2593
|
onMessage,
|
|
2632
2594
|
eventListenerMap: {
|
|
2633
2595
|
...appsInTossEventBridges,
|
|
2634
|
-
navigationAccessoryEvent: ({ onEvent, onError }) =>
|
|
2596
|
+
navigationAccessoryEvent: ({ onEvent, onError }) => import_tds_react_native14.tdsEvent.addEventListener("navigationAccessoryEvent", { onEvent, onError }),
|
|
2635
2597
|
backEvent: ({ onEvent }) => {
|
|
2636
2598
|
webBackHandler.addEventListener(onEvent);
|
|
2637
2599
|
return () => {
|
|
2638
2600
|
webBackHandler.removeEventListener(onEvent);
|
|
2639
2601
|
};
|
|
2640
2602
|
},
|
|
2641
|
-
|
|
2642
|
-
updateLocationEvent: ({ onEvent, onError, options }) => import_native_modules23.appsInTossEvent.addEventListener("updateLocationEvent", { onEvent, onError, options }),
|
|
2603
|
+
updateLocationEvent: ({ onEvent, onError, options }) => import_native_modules22.appsInTossEvent.addEventListener("updateLocationEvent", { onEvent, onError, options }),
|
|
2643
2604
|
safeAreaInsetsChange: ({ onEvent }) => {
|
|
2644
2605
|
safeAreaInsetsEmitter.on("safeAreaInsetsChange", onEvent);
|
|
2645
2606
|
return () => {
|
|
@@ -2647,23 +2608,23 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2647
2608
|
};
|
|
2648
2609
|
},
|
|
2649
2610
|
/** @internal */
|
|
2650
|
-
appBridgeCallbackEvent: ({ onEvent, onError, options }) =>
|
|
2611
|
+
appBridgeCallbackEvent: ({ onEvent, onError, options }) => import_native_modules22.appsInTossEvent.addEventListener("appBridgeCallbackEvent", { onEvent, onError, options }),
|
|
2651
2612
|
/** AdMob */
|
|
2652
|
-
loadAdMobInterstitialAd:
|
|
2653
|
-
showAdMobInterstitialAd:
|
|
2654
|
-
loadAdMobRewardedAd:
|
|
2655
|
-
showAdMobRewardedAd:
|
|
2613
|
+
loadAdMobInterstitialAd: import_native_modules22.GoogleAdMob.loadAdMobInterstitialAd,
|
|
2614
|
+
showAdMobInterstitialAd: import_native_modules22.GoogleAdMob.showAdMobInterstitialAd,
|
|
2615
|
+
loadAdMobRewardedAd: import_native_modules22.GoogleAdMob.loadAdMobRewardedAd,
|
|
2616
|
+
showAdMobRewardedAd: import_native_modules22.GoogleAdMob.showAdMobRewardedAd,
|
|
2656
2617
|
/** AdMobV2 */
|
|
2657
|
-
loadAppsInTossAdMob:
|
|
2658
|
-
showAppsInTossAdMob:
|
|
2618
|
+
loadAppsInTossAdMob: import_native_modules22.GoogleAdMob.loadAppsInTossAdMob,
|
|
2619
|
+
showAppsInTossAdMob: import_native_modules22.GoogleAdMob.showAppsInTossAdMob,
|
|
2659
2620
|
/** IntegratedAd */
|
|
2660
|
-
loadFullScreenAd,
|
|
2621
|
+
loadFullScreenAd: loadFullScreenAdForWeb,
|
|
2661
2622
|
showFullScreenAd,
|
|
2662
2623
|
/** TossAd */
|
|
2663
2624
|
fetchTossAd,
|
|
2664
2625
|
/** IAP */
|
|
2665
|
-
iapCreateOneTimePurchaseOrder:
|
|
2666
|
-
requestOneTimePurchase:
|
|
2626
|
+
iapCreateOneTimePurchaseOrder: import_native_modules22.IAP.createOneTimePurchaseOrder,
|
|
2627
|
+
requestOneTimePurchase: import_native_modules22.requestOneTimePurchase
|
|
2667
2628
|
},
|
|
2668
2629
|
constantHandlerMap: {
|
|
2669
2630
|
...appsInTossConstantBridges,
|
|
@@ -2673,15 +2634,15 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2673
2634
|
getSafeAreaRight: () => insets.right,
|
|
2674
2635
|
...Object.fromEntries(Object.entries(global2).map(([key, value]) => [key, () => value])),
|
|
2675
2636
|
/** AdMob */
|
|
2676
|
-
loadAdMobInterstitialAd_isSupported:
|
|
2677
|
-
showAdMobInterstitialAd_isSupported:
|
|
2678
|
-
loadAdMobRewardedAd_isSupported:
|
|
2679
|
-
showAdMobRewardedAd_isSupported:
|
|
2637
|
+
loadAdMobInterstitialAd_isSupported: import_native_modules22.GoogleAdMob.loadAdMobInterstitialAd.isSupported,
|
|
2638
|
+
showAdMobInterstitialAd_isSupported: import_native_modules22.GoogleAdMob.showAdMobInterstitialAd.isSupported,
|
|
2639
|
+
loadAdMobRewardedAd_isSupported: import_native_modules22.GoogleAdMob.loadAdMobRewardedAd.isSupported,
|
|
2640
|
+
showAdMobRewardedAd_isSupported: import_native_modules22.GoogleAdMob.showAdMobRewardedAd.isSupported,
|
|
2680
2641
|
/** AdMobV2 */
|
|
2681
|
-
loadAppsInTossAdMob_isSupported:
|
|
2682
|
-
showAppsInTossAdMob_isSupported:
|
|
2642
|
+
loadAppsInTossAdMob_isSupported: import_native_modules22.GoogleAdMob.loadAppsInTossAdMob.isSupported,
|
|
2643
|
+
showAppsInTossAdMob_isSupported: import_native_modules22.GoogleAdMob.showAppsInTossAdMob.isSupported,
|
|
2683
2644
|
/** IntegratedAd */
|
|
2684
|
-
loadFullScreenAd_isSupported:
|
|
2645
|
+
loadFullScreenAd_isSupported: loadFullScreenAdForWeb.isSupported,
|
|
2685
2646
|
showFullScreenAd_isSupported: showFullScreenAd.isSupported,
|
|
2686
2647
|
/** TossAd */
|
|
2687
2648
|
fetchTossAd_isSupported: fetchTossAd.isSupported,
|
|
@@ -2707,22 +2668,22 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2707
2668
|
getCurrentLocation: appsInTossAsyncBridges.getCurrentLocation,
|
|
2708
2669
|
openCamera: appsInTossAsyncBridges.openCamera,
|
|
2709
2670
|
/** Storage */
|
|
2710
|
-
getStorageItem:
|
|
2711
|
-
setStorageItem:
|
|
2712
|
-
removeStorageItem:
|
|
2713
|
-
clearItems:
|
|
2671
|
+
getStorageItem: import_native_modules22.Storage.getItem,
|
|
2672
|
+
setStorageItem: import_native_modules22.Storage.setItem,
|
|
2673
|
+
removeStorageItem: import_native_modules22.Storage.removeItem,
|
|
2674
|
+
clearItems: import_native_modules22.Storage.clearItems,
|
|
2714
2675
|
/** IAP */
|
|
2715
|
-
iapGetProductItemList:
|
|
2716
|
-
iapCreateOneTimePurchaseOrder:
|
|
2717
|
-
processProductGrant:
|
|
2718
|
-
getPendingOrders:
|
|
2719
|
-
getCompletedOrRefundedOrders:
|
|
2720
|
-
completeProductGrant:
|
|
2676
|
+
iapGetProductItemList: import_native_modules22.IAP.getProductItemList,
|
|
2677
|
+
iapCreateOneTimePurchaseOrder: import_native_modules22.iapCreateOneTimePurchaseOrder,
|
|
2678
|
+
processProductGrant: import_native_modules22.processProductGrant,
|
|
2679
|
+
getPendingOrders: import_native_modules22.IAP.getPendingOrders,
|
|
2680
|
+
getCompletedOrRefundedOrders: import_native_modules22.IAP.getCompletedOrRefundedOrders,
|
|
2681
|
+
completeProductGrant: import_native_modules22.IAP.completeProductGrant,
|
|
2721
2682
|
/** Toss Ads */
|
|
2722
2683
|
tossAdEventLog
|
|
2723
2684
|
}
|
|
2724
2685
|
});
|
|
2725
|
-
const headerPropForExternalWebView = (0,
|
|
2686
|
+
const headerPropForExternalWebView = (0, import_react28.useMemo)(() => {
|
|
2726
2687
|
const parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
|
|
2727
2688
|
const initialAccessoryButton = parsedNavigationBar?.initialAccessoryButton;
|
|
2728
2689
|
const withBackButton = parsedNavigationBar?.withBackButton ?? true;
|
|
@@ -2743,7 +2704,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2743
2704
|
colorPreference: "light"
|
|
2744
2705
|
});
|
|
2745
2706
|
const refs = mergeRefs(handler.ref, webViewRef);
|
|
2746
|
-
(0,
|
|
2707
|
+
(0, import_react28.useEffect)(() => {
|
|
2747
2708
|
const callback = () => {
|
|
2748
2709
|
webBackHandler.handleWebBack();
|
|
2749
2710
|
return true;
|
|
@@ -2797,7 +2758,15 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2797
2758
|
return false;
|
|
2798
2759
|
}
|
|
2799
2760
|
},
|
|
2800
|
-
originWhitelist: [
|
|
2761
|
+
originWhitelist: [
|
|
2762
|
+
"https://*",
|
|
2763
|
+
"http://*",
|
|
2764
|
+
"intoss://*",
|
|
2765
|
+
"intoss-private://*",
|
|
2766
|
+
"servicetoss://*",
|
|
2767
|
+
"supertoss://*",
|
|
2768
|
+
"intent://*"
|
|
2769
|
+
]
|
|
2801
2770
|
}
|
|
2802
2771
|
);
|
|
2803
2772
|
}
|