@apps-in-toss/framework 1.1.3 → 1.2.0
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 +335 -252
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +207 -124
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -38,17 +38,17 @@ __export(src_exports, {
|
|
|
38
38
|
env: () => env,
|
|
39
39
|
useCreateUserAgent: () => useCreateUserAgent,
|
|
40
40
|
useGeolocation: () => useGeolocation,
|
|
41
|
-
useTopNavigation: () =>
|
|
41
|
+
useTopNavigation: () => import_private9.useTopNavigation
|
|
42
42
|
});
|
|
43
43
|
module.exports = __toCommonJS(src_exports);
|
|
44
44
|
var import_analytics2 = require("@apps-in-toss/analytics");
|
|
45
45
|
|
|
46
46
|
// src/core/registerApp.tsx
|
|
47
47
|
var import_analytics = require("@apps-in-toss/analytics");
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
48
|
+
var import_native_modules9 = require("@apps-in-toss/native-modules");
|
|
49
|
+
var import_react_native15 = require("@granite-js/react-native");
|
|
50
|
+
var import_tds_react_native6 = require("@toss/tds-react-native");
|
|
51
|
+
var import_react_native16 = require("react-native");
|
|
52
52
|
|
|
53
53
|
// src/core/components/AppEvent.tsx
|
|
54
54
|
var import_native_modules2 = require("@apps-in-toss/native-modules");
|
|
@@ -193,7 +193,7 @@ function AppUpdate() {
|
|
|
193
193
|
|
|
194
194
|
// src/core/hooks/useAppsInTossBridge.ts
|
|
195
195
|
var import_native_modules3 = require("@apps-in-toss/native-modules");
|
|
196
|
-
var
|
|
196
|
+
var import_tds_react_native = require("@toss/tds-react-native");
|
|
197
197
|
var import_react5 = require("react");
|
|
198
198
|
|
|
199
199
|
// src/core/utils/getAppsInTossGlobals.ts
|
|
@@ -211,7 +211,7 @@ function toIcon(source) {
|
|
|
211
211
|
|
|
212
212
|
// src/core/hooks/useAppsInTossBridge.ts
|
|
213
213
|
function useAppsInTossBridge() {
|
|
214
|
-
const controller = (0,
|
|
214
|
+
const controller = (0, import_tds_react_native.useBridge)();
|
|
215
215
|
const appsInTossGlobals = getAppsInTossGlobals();
|
|
216
216
|
(0, import_react5.useEffect)(() => {
|
|
217
217
|
const commonProps = {
|
|
@@ -230,19 +230,19 @@ function useAppsInTossBridge() {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
// src/components/NavigationBar/RNNavigationBar.tsx
|
|
233
|
-
var
|
|
234
|
-
var
|
|
235
|
-
var
|
|
233
|
+
var import_react_native13 = require("@granite-js/react-native");
|
|
234
|
+
var import_tds_react_native5 = require("@toss/tds-react-native");
|
|
235
|
+
var import_private3 = require("@toss/tds-react-native/private");
|
|
236
236
|
var import_es_hangul = require("es-hangul");
|
|
237
237
|
var import_react9 = require("react");
|
|
238
|
-
var
|
|
238
|
+
var import_react_native14 = require("react-native");
|
|
239
239
|
|
|
240
240
|
// src/components/NavigationBar/common/NavigationBarImpressionArea.tsx
|
|
241
241
|
var import_react6 = require("react");
|
|
242
242
|
|
|
243
243
|
// src/components/NavigationBar/common/useNavigationBarLogging.tsx
|
|
244
244
|
var import_native_modules4 = require("@apps-in-toss/native-modules");
|
|
245
|
-
var
|
|
245
|
+
var import_react_native6 = require("@granite-js/react-native");
|
|
246
246
|
var NAVI_BAR_IMPRESSION_SCHEMA_ID = 1596837;
|
|
247
247
|
var NAVI_BAR_IMPRESSION_LOG_NAME = "appsintoss_app_visit__common_module::impression__navigation_bar";
|
|
248
248
|
var CLOSE_POPUP_SHOW_SCHEMA_ID = 1644490;
|
|
@@ -257,7 +257,7 @@ function useNavigationBarLogging() {
|
|
|
257
257
|
const referrer = useReferrer();
|
|
258
258
|
const baseParams = {
|
|
259
259
|
referrer,
|
|
260
|
-
app_name:
|
|
260
|
+
app_name: import_react_native6.Granite.appName
|
|
261
261
|
};
|
|
262
262
|
const logNavBarImpression = (naviBarConfig) => {
|
|
263
263
|
import_native_modules4.INTERNAL__module.tossCoreEventLog({
|
|
@@ -342,15 +342,22 @@ function NavigationBarImpressionArea({
|
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
// src/core/hooks/useMoreButtonBottomSheet/index.tsx
|
|
345
|
-
var
|
|
345
|
+
var import_native_modules8 = require("@apps-in-toss/native-modules");
|
|
346
346
|
var import_react_native12 = require("@granite-js/react-native");
|
|
347
|
-
var
|
|
348
|
-
var
|
|
347
|
+
var import_tds_react_native4 = require("@toss/tds-react-native");
|
|
348
|
+
var import_private2 = require("@toss/tds-react-native/private");
|
|
349
349
|
var import_react8 = require("react");
|
|
350
350
|
|
|
351
|
+
// src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
|
|
352
|
+
var import_native_modules6 = require("@apps-in-toss/native-modules");
|
|
353
|
+
var import_react_native8 = require("@granite-js/react-native");
|
|
354
|
+
var import_tds_react_native2 = require("@toss/tds-react-native");
|
|
355
|
+
var import_private = require("@toss/tds-react-native/private");
|
|
356
|
+
var import_react_native9 = require("react-native");
|
|
357
|
+
|
|
351
358
|
// src/core/hooks/useMoreButtonBottomSheet/useMoreButtonBottomSheetLogging.tsx
|
|
352
359
|
var import_native_modules5 = require("@apps-in-toss/native-modules");
|
|
353
|
-
var
|
|
360
|
+
var import_react_native7 = require("@granite-js/react-native");
|
|
354
361
|
var BOTTOM_SHEET_SCHEMA_ID = 1596825;
|
|
355
362
|
var BOTTOM_SHEET_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__more";
|
|
356
363
|
var BOTTOM_SHEET_OPEN_SCHEMA_ID = 1596829;
|
|
@@ -363,7 +370,7 @@ function useMoreButtonBottomSheetLogging() {
|
|
|
363
370
|
const referrer = useReferrer();
|
|
364
371
|
const baseParams = {
|
|
365
372
|
referrer,
|
|
366
|
-
app_name:
|
|
373
|
+
app_name: import_react_native7.Granite.appName
|
|
367
374
|
};
|
|
368
375
|
const logBottomSheetShow = () => {
|
|
369
376
|
import_native_modules5.INTERNAL__module.tossCoreEventLog({
|
|
@@ -417,23 +424,90 @@ function useMoreButtonBottomSheetLogging() {
|
|
|
417
424
|
};
|
|
418
425
|
}
|
|
419
426
|
|
|
427
|
+
// src/core/utils/url.ts
|
|
428
|
+
function addParamsToUrl(url, params) {
|
|
429
|
+
const urlObj = new URL(url);
|
|
430
|
+
for (const [key, value] of Object.entries(params)) {
|
|
431
|
+
urlObj.searchParams.set(key, value);
|
|
432
|
+
}
|
|
433
|
+
return urlObj.toString();
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
|
|
437
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
438
|
+
var SHARE_SCHEME_REFERRER = "appsintoss.common_module_share";
|
|
439
|
+
var APP_SHARE_MENU_INFO = {
|
|
440
|
+
contactItemName: "\uACF5\uC720\uD558\uAE30",
|
|
441
|
+
contactIconUrl: "https://static.toss.im/icons/png/4x/icon-share-dots-mono.png"
|
|
442
|
+
};
|
|
443
|
+
function AppShareListMenu() {
|
|
444
|
+
const globals = getAppsInTossGlobals();
|
|
445
|
+
const adaptive = (0, import_private.useAdaptive)();
|
|
446
|
+
const logging = useMoreButtonBottomSheetLogging();
|
|
447
|
+
const initialScheme = (0, import_react_native8.getSchemeUri)();
|
|
448
|
+
const isSandbox = (0, import_native_modules6.getOperationalEnvironment)() === "sandbox";
|
|
449
|
+
const { openConfirm } = (0, import_tds_react_native2.useDialog)();
|
|
450
|
+
const schemeForShare = addParamsToUrl(initialScheme, {
|
|
451
|
+
referrer: SHARE_SCHEME_REFERRER
|
|
452
|
+
});
|
|
453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
454
|
+
import_tds_react_native2.ListRow,
|
|
455
|
+
{
|
|
456
|
+
left: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
457
|
+
import_tds_react_native2.ListRow.Icon,
|
|
458
|
+
{
|
|
459
|
+
color: globals.brandPrimaryColor,
|
|
460
|
+
source: { uri: APP_SHARE_MENU_INFO.contactIconUrl },
|
|
461
|
+
type: "background"
|
|
462
|
+
}
|
|
463
|
+
),
|
|
464
|
+
contents: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
465
|
+
import_tds_react_native2.ListRow.Texts,
|
|
466
|
+
{
|
|
467
|
+
type: "1RowTypeA",
|
|
468
|
+
top: APP_SHARE_MENU_INFO.contactItemName,
|
|
469
|
+
topProps: { color: adaptive.grey700 }
|
|
470
|
+
}
|
|
471
|
+
),
|
|
472
|
+
verticalPadding: "extraSmall",
|
|
473
|
+
onPress: () => {
|
|
474
|
+
if (isSandbox) {
|
|
475
|
+
openConfirm({
|
|
476
|
+
title: "\uACF5\uC720\uD558\uAE30 \uAE30\uB2A5 \uBBF8\uC9C0\uC6D0",
|
|
477
|
+
description: "\uC0CC\uB4DC\uBC15\uC2A4 \uD658\uACBD\uC5D0\uC11C\uB294 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4\uC694. \uCF58\uC194\uC744 \uD1B5\uD574 \uD1A0\uC2A4\uC571\uC5D0\uC11C \uD14C\uC2A4\uD2B8\uD574 \uC8FC\uC138\uC694.",
|
|
478
|
+
rightButton: "\uD655\uC778",
|
|
479
|
+
closeOnDimmerClick: true
|
|
480
|
+
});
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
logging.menuClick({ title: APP_SHARE_MENU_INFO.contactItemName });
|
|
484
|
+
import_react_native9.NativeModules.AppsInTossModule.shareWithScheme({
|
|
485
|
+
params: {
|
|
486
|
+
schemeURL: schemeForShare
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
|
|
420
494
|
// src/hooks/useAppUpdateDialog.tsx
|
|
421
|
-
var
|
|
422
|
-
var
|
|
423
|
-
var
|
|
495
|
+
var import_native_modules7 = require("@apps-in-toss/native-modules");
|
|
496
|
+
var import_react_native11 = require("@granite-js/react-native");
|
|
497
|
+
var import_tds_react_native3 = require("@toss/tds-react-native");
|
|
424
498
|
var import_react7 = require("react");
|
|
425
499
|
|
|
426
500
|
// src/utils/market.ts
|
|
427
|
-
var
|
|
501
|
+
var import_react_native10 = require("react-native");
|
|
428
502
|
var PLAYSTORE_LINK = "https://play.google.com/store/apps/details?id=viva.republica.toss";
|
|
429
503
|
var APPSTORE_LINK = "https://itunes.apple.com/app/id839333328";
|
|
430
504
|
var getMarketLink = () => {
|
|
431
|
-
return
|
|
505
|
+
return import_react_native10.Platform.OS === "android" ? PLAYSTORE_LINK : APPSTORE_LINK;
|
|
432
506
|
};
|
|
433
507
|
|
|
434
508
|
// src/hooks/useAppUpdateDialog.tsx
|
|
435
509
|
function useAppUpdateDialog() {
|
|
436
|
-
const { openConfirm } = (0,
|
|
510
|
+
const { openConfirm } = (0, import_tds_react_native3.useDialog)();
|
|
437
511
|
const logging = useAppUpdateDialogLogging();
|
|
438
512
|
const openAppUpdateDialog = (0, import_react7.useCallback)(
|
|
439
513
|
async ({
|
|
@@ -456,7 +530,7 @@ function useAppUpdateDialog() {
|
|
|
456
530
|
}
|
|
457
531
|
logging.update();
|
|
458
532
|
const STORE_SCHEME = getMarketLink();
|
|
459
|
-
(0,
|
|
533
|
+
(0, import_react_native11.openURL)(`supertoss://web?url=${STORE_SCHEME}&external=browser`);
|
|
460
534
|
},
|
|
461
535
|
[logging, openConfirm]
|
|
462
536
|
);
|
|
@@ -472,10 +546,10 @@ function useAppUpdateDialogLogging() {
|
|
|
472
546
|
const referrer = useReferrer();
|
|
473
547
|
const baseParams = {
|
|
474
548
|
referrer,
|
|
475
|
-
app_name:
|
|
549
|
+
app_name: import_react_native11.Granite.appName
|
|
476
550
|
};
|
|
477
551
|
const logUpdateClick = () => {
|
|
478
|
-
|
|
552
|
+
import_native_modules7.INTERNAL__module.tossCoreEventLog({
|
|
479
553
|
log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
|
|
480
554
|
log_type: "event",
|
|
481
555
|
params: {
|
|
@@ -487,7 +561,7 @@ function useAppUpdateDialogLogging() {
|
|
|
487
561
|
});
|
|
488
562
|
};
|
|
489
563
|
const logCloseClick = () => {
|
|
490
|
-
|
|
564
|
+
import_native_modules7.INTERNAL__module.tossCoreEventLog({
|
|
491
565
|
log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
|
|
492
566
|
log_type: "event",
|
|
493
567
|
params: {
|
|
@@ -499,7 +573,7 @@ function useAppUpdateDialogLogging() {
|
|
|
499
573
|
});
|
|
500
574
|
};
|
|
501
575
|
const logDialogShow = () => {
|
|
502
|
-
|
|
576
|
+
import_native_modules7.INTERNAL__module.tossCoreEventLog({
|
|
503
577
|
log_name: UPDATE_DIALOG_LOG_NAME,
|
|
504
578
|
log_type: "popup",
|
|
505
579
|
params: {
|
|
@@ -520,25 +594,33 @@ function ensureValue(value, name) {
|
|
|
520
594
|
}
|
|
521
595
|
|
|
522
596
|
// src/core/hooks/useMoreButtonBottomSheet/index.tsx
|
|
523
|
-
var
|
|
597
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
524
598
|
var APP_BRIDGE_METHOD_NAME = "getMiniAppsSupportContact";
|
|
599
|
+
var MIN_VERSION = {
|
|
600
|
+
BOTTOM_SHEET: {
|
|
601
|
+
android: "5.226.0",
|
|
602
|
+
ios: "5.226.0"
|
|
603
|
+
},
|
|
604
|
+
SHARE_LIST_MENU: {
|
|
605
|
+
android: "5.230.0",
|
|
606
|
+
ios: "5.230.0"
|
|
607
|
+
}
|
|
608
|
+
};
|
|
525
609
|
function useMoreButtonBottomSheet() {
|
|
526
610
|
const globals = getAppsInTossGlobals();
|
|
527
|
-
const adaptive = (0,
|
|
611
|
+
const adaptive = (0, import_private2.useAdaptive)();
|
|
528
612
|
const [itemList, setItemList] = (0, import_react8.useState)([]);
|
|
529
613
|
const appUpdateDialog = useAppUpdateDialog();
|
|
530
614
|
const logging = useMoreButtonBottomSheetLogging();
|
|
531
|
-
const overlay = (0,
|
|
615
|
+
const overlay = (0, import_private2.useOverlay)();
|
|
532
616
|
const title = ensureValue(globals.brandDisplayName, "displayName");
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
ios: "5.226.0"
|
|
536
|
-
});
|
|
617
|
+
const isBottomSheetSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
|
|
618
|
+
const isShareListMenuSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
|
|
537
619
|
(0, import_react8.useEffect)(() => {
|
|
538
|
-
if (!
|
|
620
|
+
if (!isBottomSheetSupported) {
|
|
539
621
|
return;
|
|
540
622
|
}
|
|
541
|
-
|
|
623
|
+
import_native_modules8.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
|
|
542
624
|
APP_BRIDGE_METHOD_NAME,
|
|
543
625
|
{},
|
|
544
626
|
{
|
|
@@ -546,10 +628,10 @@ function useMoreButtonBottomSheet() {
|
|
|
546
628
|
onError: (error) => console.error("\uBA54\uB274 \uBAA9\uB85D\uC744 \uAC00\uC838\uC624\uB294 \uB370 \uC2E4\uD328\uD588\uC5B4\uC694:", error)
|
|
547
629
|
}
|
|
548
630
|
);
|
|
549
|
-
}, [
|
|
631
|
+
}, [isBottomSheetSupported]);
|
|
550
632
|
const onClickHandler = async () => {
|
|
551
633
|
logging.open();
|
|
552
|
-
if (!
|
|
634
|
+
if (!isBottomSheetSupported) {
|
|
553
635
|
await appUpdateDialog.open({
|
|
554
636
|
title: `\uC774 \uAE30\uB2A5\uC744 \uC4F0\uB824\uBA74 \uC571 \uC5C5\uB370\uC774\uD2B8\uAC00 \uD544\uC694\uD574\uC694`,
|
|
555
637
|
description: `\uBB38\uC758, \uAD8C\uD55C \uC124\uC815, \uC2E0\uACE0 \uB4F1 \uAE30\uB2A5\uC744 \uC4F8 \uC218 \uC788\uC5B4\uC694`
|
|
@@ -561,18 +643,18 @@ function useMoreButtonBottomSheet() {
|
|
|
561
643
|
logging.close();
|
|
562
644
|
close();
|
|
563
645
|
};
|
|
564
|
-
return /* @__PURE__ */ (0,
|
|
565
|
-
|
|
646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BottomSheetImpressionArea, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
647
|
+
import_tds_react_native4.BottomSheet.Root,
|
|
566
648
|
{
|
|
567
|
-
header: /* @__PURE__ */ (0,
|
|
568
|
-
|
|
649
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
650
|
+
import_tds_react_native4.ListHeader,
|
|
569
651
|
{
|
|
570
|
-
title: /* @__PURE__ */ (0,
|
|
652
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_tds_react_native4.ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
|
|
571
653
|
}
|
|
572
654
|
),
|
|
573
655
|
open: isOpen,
|
|
574
|
-
cta: /* @__PURE__ */ (0,
|
|
575
|
-
|
|
656
|
+
cta: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
657
|
+
import_tds_react_native4.BottomSheet.CTA,
|
|
576
658
|
{
|
|
577
659
|
size: "large",
|
|
578
660
|
type: "dark",
|
|
@@ -585,35 +667,38 @@ function useMoreButtonBottomSheet() {
|
|
|
585
667
|
),
|
|
586
668
|
onClose: handleClose,
|
|
587
669
|
onExited: exit,
|
|
588
|
-
children: /* @__PURE__ */ (0,
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
670
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_tds_react_native4.List, { rowSeparator: "none", children: [
|
|
671
|
+
itemList.map((item) => {
|
|
672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
673
|
+
import_tds_react_native4.ListRow,
|
|
674
|
+
{
|
|
675
|
+
left: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
676
|
+
import_tds_react_native4.ListRow.Icon,
|
|
677
|
+
{
|
|
678
|
+
color: globals.brandPrimaryColor,
|
|
679
|
+
source: { uri: item.contactIconUrl },
|
|
680
|
+
type: "background"
|
|
681
|
+
}
|
|
682
|
+
),
|
|
683
|
+
contents: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
684
|
+
import_tds_react_native4.ListRow.Texts,
|
|
685
|
+
{
|
|
686
|
+
type: "1RowTypeA",
|
|
687
|
+
top: item.contactItemName,
|
|
688
|
+
topProps: { color: adaptive.grey700 }
|
|
689
|
+
}
|
|
690
|
+
),
|
|
691
|
+
verticalPadding: "extraSmall",
|
|
692
|
+
onPress: () => {
|
|
693
|
+
logging.menuClick({ title: item.contactItemName });
|
|
694
|
+
(0, import_react_native12.openURL)(item.contactUri);
|
|
606
695
|
}
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
},
|
|
614
|
-
item.contactItemName
|
|
615
|
-
);
|
|
616
|
-
}) })
|
|
696
|
+
},
|
|
697
|
+
item.contactItemName
|
|
698
|
+
);
|
|
699
|
+
}),
|
|
700
|
+
isShareListMenuSupported && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AppShareListMenu, {})
|
|
701
|
+
] })
|
|
617
702
|
}
|
|
618
703
|
) });
|
|
619
704
|
});
|
|
@@ -625,7 +710,7 @@ function BottomSheetImpressionArea({ children }) {
|
|
|
625
710
|
(0, import_react8.useEffect)(() => {
|
|
626
711
|
logging.show();
|
|
627
712
|
}, [logging]);
|
|
628
|
-
return /* @__PURE__ */ (0,
|
|
713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children });
|
|
629
714
|
}
|
|
630
715
|
|
|
631
716
|
// src/core/utils/safeParseNavigationBar.ts
|
|
@@ -641,20 +726,20 @@ function safeParseNavigationBar(navigationBar) {
|
|
|
641
726
|
}
|
|
642
727
|
|
|
643
728
|
// src/components/NavigationBar/RNNavigationBar.tsx
|
|
644
|
-
var
|
|
729
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
645
730
|
function RNNavigationBar() {
|
|
646
731
|
const globals = getAppsInTossGlobals();
|
|
647
732
|
const { captureExitLog } = useCaptureExitLog();
|
|
648
733
|
const logging = useNavigationBarLogging();
|
|
649
|
-
const { openConfirm } = (0,
|
|
734
|
+
const { openConfirm } = (0, import_tds_react_native5.useDialog)();
|
|
650
735
|
const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
|
|
651
736
|
const parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
|
|
652
737
|
const withHomeButton = parsedNavigationBar?.withHomeButton ?? false;
|
|
653
738
|
const withBackButton = parsedNavigationBar?.withBackButton ?? true;
|
|
654
739
|
const initialAccessoryButton = parsedNavigationBar?.initialAccessoryButton;
|
|
655
|
-
const backEventContext = (0,
|
|
740
|
+
const backEventContext = (0, import_react_native13.useBackEventContext)();
|
|
656
741
|
const handleBackOrClose = useBackOrCloseNavigation();
|
|
657
|
-
const navigation = (0,
|
|
742
|
+
const navigation = (0, import_react_native13.useNavigation)();
|
|
658
743
|
const handlePressTitle = (0, import_react9.useCallback)(() => {
|
|
659
744
|
logging.homeButtonClick();
|
|
660
745
|
navigation.navigate("/");
|
|
@@ -671,7 +756,7 @@ function RNNavigationBar() {
|
|
|
671
756
|
logging.closePopupCtaClick(isConfirmed);
|
|
672
757
|
if (isConfirmed) {
|
|
673
758
|
captureExitLog(Date.now());
|
|
674
|
-
(0,
|
|
759
|
+
(0, import_react_native13.closeView)();
|
|
675
760
|
}
|
|
676
761
|
}, [captureExitLog, globals.brandDisplayName, logging, openConfirm]);
|
|
677
762
|
const handleBack = (0, import_react9.useCallback)(() => {
|
|
@@ -686,13 +771,13 @@ function RNNavigationBar() {
|
|
|
686
771
|
handleBack();
|
|
687
772
|
return true;
|
|
688
773
|
};
|
|
689
|
-
|
|
774
|
+
import_react_native14.BackHandler.addEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
690
775
|
return () => {
|
|
691
|
-
|
|
776
|
+
import_react_native14.BackHandler.removeEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
692
777
|
};
|
|
693
778
|
}, [handleBack]);
|
|
694
|
-
return /* @__PURE__ */ (0,
|
|
695
|
-
|
|
779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
780
|
+
import_private3.TopNavigation,
|
|
696
781
|
{
|
|
697
782
|
title: globals.brandDisplayName,
|
|
698
783
|
icon: toIcon(globals.brandIcon),
|
|
@@ -706,59 +791,59 @@ function RNNavigationBar() {
|
|
|
706
791
|
icon: initialAccessoryButton.icon,
|
|
707
792
|
id: initialAccessoryButton.id
|
|
708
793
|
} : void 0,
|
|
709
|
-
children: /* @__PURE__ */ (0,
|
|
794
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_private3.NavigationLeft, { visible: withBackButton, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_private3.NavigationBackButton, { onPress: handleBack, canGoBack: false }) })
|
|
710
795
|
}
|
|
711
796
|
) });
|
|
712
797
|
}
|
|
713
798
|
function useBackOrCloseNavigation() {
|
|
714
|
-
const navigation = (0,
|
|
799
|
+
const navigation = (0, import_react_native13.useNavigation)();
|
|
715
800
|
const { captureExitLog } = useCaptureExitLog();
|
|
716
801
|
return (0, import_react9.useCallback)(() => {
|
|
717
802
|
if (navigation.canGoBack()) {
|
|
718
803
|
navigation.goBack();
|
|
719
804
|
} else {
|
|
720
805
|
captureExitLog(Date.now());
|
|
721
|
-
(0,
|
|
806
|
+
(0, import_react_native13.closeView)();
|
|
722
807
|
}
|
|
723
808
|
}, [captureExitLog, navigation]);
|
|
724
809
|
}
|
|
725
810
|
|
|
726
811
|
// src/core/registerApp.tsx
|
|
727
|
-
var
|
|
812
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
728
813
|
function AppsInTossContainer(Container, { children, ...initialProps }) {
|
|
729
|
-
if (!(0,
|
|
814
|
+
if (!(0, import_native_modules9.isMinVersionSupported)({
|
|
730
815
|
android: "5.220.0",
|
|
731
816
|
ios: "5.221.0"
|
|
732
817
|
})) {
|
|
733
|
-
return /* @__PURE__ */ (0,
|
|
734
|
-
/* @__PURE__ */ (0,
|
|
735
|
-
/* @__PURE__ */ (0,
|
|
736
|
-
/* @__PURE__ */ (0,
|
|
818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
819
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AppEvent.Entry, {}),
|
|
820
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AppEvent.System, { ...initialProps }),
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AppUpdate, {})
|
|
737
822
|
] });
|
|
738
823
|
}
|
|
739
|
-
return /* @__PURE__ */ (0,
|
|
740
|
-
/* @__PURE__ */ (0,
|
|
741
|
-
/* @__PURE__ */ (0,
|
|
742
|
-
/* @__PURE__ */ (0,
|
|
743
|
-
/* @__PURE__ */ (0,
|
|
824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AppEvent.StayTime, {}),
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AppEvent.Entry, {}),
|
|
827
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AppEvent.System, { ...initialProps }),
|
|
828
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Container, { ...initialProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_tds_react_native6.TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TDSContainer, { ...initialProps, children }) }) })
|
|
744
829
|
] });
|
|
745
830
|
}
|
|
746
831
|
function TDSContainer({ children }) {
|
|
747
832
|
useAppsInTossBridge();
|
|
748
|
-
return /* @__PURE__ */ (0,
|
|
833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children });
|
|
749
834
|
}
|
|
750
835
|
function registerApp(container, { context, analytics }) {
|
|
751
836
|
const appName = getAppName();
|
|
752
|
-
const isRegistered =
|
|
837
|
+
const isRegistered = import_react_native16.AppRegistry.getAppKeys().includes(appName);
|
|
753
838
|
if (!isRegistered) {
|
|
754
839
|
import_analytics.Analytics.init({
|
|
755
|
-
logger: (params) => void (0,
|
|
840
|
+
logger: (params) => void (0, import_native_modules9.eventLog)(params),
|
|
756
841
|
debug: analytics?.debug ?? __DEV__
|
|
757
842
|
});
|
|
758
|
-
const App =
|
|
843
|
+
const App = import_react_native15.Granite.registerApp(AppsInTossContainer.bind(null, container), {
|
|
759
844
|
appName,
|
|
760
845
|
context,
|
|
761
|
-
setIosSwipeGestureEnabled:
|
|
846
|
+
setIosSwipeGestureEnabled: import_native_modules9.setIosSwipeGestureEnabled,
|
|
762
847
|
router: {
|
|
763
848
|
screenContainer: AppsInTossScreenContainer,
|
|
764
849
|
defaultScreenOption: {
|
|
@@ -772,8 +857,8 @@ function registerApp(container, { context, analytics }) {
|
|
|
772
857
|
}
|
|
773
858
|
function AppsInTossScreenContainer({ children }) {
|
|
774
859
|
const isReactNativeService = getAppsInTossGlobals().webViewType == null;
|
|
775
|
-
return /* @__PURE__ */ (0,
|
|
776
|
-
isReactNativeService && /* @__PURE__ */ (0,
|
|
860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_analytics.Analytics.Screen, { children: [
|
|
861
|
+
isReactNativeService && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RNNavigationBar, {}),
|
|
777
862
|
children
|
|
778
863
|
] });
|
|
779
864
|
}
|
|
@@ -792,29 +877,27 @@ var AppsInToss = {
|
|
|
792
877
|
};
|
|
793
878
|
|
|
794
879
|
// src/components/WebView.tsx
|
|
795
|
-
var
|
|
880
|
+
var import_native_modules18 = require("@apps-in-toss/native-modules");
|
|
796
881
|
var appsInTossAsyncBridges = __toESM(require("@apps-in-toss/native-modules/async-bridges"), 1);
|
|
797
882
|
var appsInTossConstantBridges = __toESM(require("@apps-in-toss/native-modules/constant-bridges"), 1);
|
|
798
883
|
var appsInTossEventBridges = __toESM(require("@apps-in-toss/native-modules/event-bridges"), 1);
|
|
799
|
-
var
|
|
800
|
-
var
|
|
801
|
-
var
|
|
802
|
-
var import_react_native37 = require("@toss-design-system/react-native");
|
|
803
|
-
var import_private7 = require("@toss-design-system/react-native/private");
|
|
884
|
+
var import_react_native28 = require("@granite-js/react-native");
|
|
885
|
+
var import_tds_react_native12 = require("@toss/tds-react-native");
|
|
886
|
+
var import_private8 = require("@toss/tds-react-native/private");
|
|
804
887
|
var import_react19 = require("react");
|
|
805
|
-
var
|
|
888
|
+
var import_react_native29 = require("react-native");
|
|
806
889
|
|
|
807
890
|
// src/components/GameWebView.tsx
|
|
808
|
-
var
|
|
891
|
+
var import_native_modules13 = require("@apps-in-toss/native-modules");
|
|
809
892
|
var import_react_native_webview = require("@granite-js/native/react-native-webview");
|
|
810
893
|
var import_react13 = require("react");
|
|
811
|
-
var
|
|
894
|
+
var import_react_native22 = require("react-native");
|
|
812
895
|
|
|
813
896
|
// src/components/GameProfile.tsx
|
|
814
|
-
var
|
|
815
|
-
var
|
|
897
|
+
var import_native_modules12 = require("@apps-in-toss/native-modules");
|
|
898
|
+
var import_tds_react_native9 = require("@toss/tds-react-native");
|
|
816
899
|
var import_react11 = require("react");
|
|
817
|
-
var
|
|
900
|
+
var import_react_native19 = require("react-native");
|
|
818
901
|
|
|
819
902
|
// src/constant/game-center.ts
|
|
820
903
|
var GAME_PROFILE_WEBVIEW_URL = "servicetoss://game-center/profile";
|
|
@@ -824,23 +907,23 @@ var GAME_CENTER_MIN_VERSION = {
|
|
|
824
907
|
};
|
|
825
908
|
|
|
826
909
|
// src/hooks/useGameCenterProfile.ts
|
|
827
|
-
var
|
|
828
|
-
var
|
|
829
|
-
var
|
|
910
|
+
var import_native_modules11 = require("@apps-in-toss/native-modules");
|
|
911
|
+
var import_react_native18 = require("@granite-js/react-native");
|
|
912
|
+
var import_tds_react_native8 = require("@toss/tds-react-native");
|
|
830
913
|
var import_es_hangul2 = require("es-hangul");
|
|
831
914
|
var import_react10 = require("react");
|
|
832
915
|
|
|
833
916
|
// src/components/GameProfileToast.tsx
|
|
834
|
-
var
|
|
835
|
-
var
|
|
836
|
-
var
|
|
917
|
+
var import_tds_react_native7 = require("@toss/tds-react-native");
|
|
918
|
+
var import_private4 = require("@toss/tds-react-native/private");
|
|
919
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
837
920
|
var useGameProfileToast = () => {
|
|
838
|
-
const overlay = (0,
|
|
921
|
+
const overlay = (0, import_private4.useOverlay)();
|
|
839
922
|
const openGameProfileToast = (nickname, profileImageUri) => {
|
|
840
923
|
return new Promise((resolve) => {
|
|
841
924
|
overlay.open(({ isOpen, close, exit }) => {
|
|
842
|
-
return /* @__PURE__ */ (0,
|
|
843
|
-
|
|
925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_private4.ColorPreferenceProvider, { colorPreference: "dark", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_private4.AdaptiveColorProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
926
|
+
import_tds_react_native7.Toast,
|
|
844
927
|
{
|
|
845
928
|
open: isOpen,
|
|
846
929
|
onClose: () => {
|
|
@@ -850,11 +933,11 @@ var useGameProfileToast = () => {
|
|
|
850
933
|
onExited: exit,
|
|
851
934
|
position: "top",
|
|
852
935
|
text: `${nickname}\uB2D8 \uBC18\uAC00\uC6CC\uC694!`,
|
|
853
|
-
icon: /* @__PURE__ */ (0,
|
|
854
|
-
|
|
936
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
937
|
+
import_tds_react_native7.Asset.Image,
|
|
855
938
|
{
|
|
856
939
|
style: { borderRadius: 64, overflow: "hidden" },
|
|
857
|
-
frameShape:
|
|
940
|
+
frameShape: import_tds_react_native7.Asset.frameShape.CleanW32,
|
|
858
941
|
source: { uri: profileImageUri }
|
|
859
942
|
}
|
|
860
943
|
)
|
|
@@ -873,11 +956,11 @@ var DEFAULT_ERROR = {
|
|
|
873
956
|
};
|
|
874
957
|
|
|
875
958
|
// src/utils/openTransparentWebView.ts
|
|
876
|
-
var
|
|
959
|
+
var import_react_native17 = require("@granite-js/react-native");
|
|
877
960
|
|
|
878
961
|
// src/private.ts
|
|
879
|
-
var
|
|
880
|
-
var INTERNAL__onVisibilityChangedByTransparentServiceWeb =
|
|
962
|
+
var import_native_modules10 = require("@apps-in-toss/native-modules");
|
|
963
|
+
var INTERNAL__onVisibilityChangedByTransparentServiceWeb = import_native_modules10.onVisibilityChangedByTransparentServiceWeb;
|
|
881
964
|
|
|
882
965
|
// src/utils/openTransparentWebView.ts
|
|
883
966
|
var openTransparentWebView = ({
|
|
@@ -907,7 +990,7 @@ var openTransparentWebView = ({
|
|
|
907
990
|
}
|
|
908
991
|
}
|
|
909
992
|
});
|
|
910
|
-
(0,
|
|
993
|
+
(0, import_react_native17.openURL)(url.toString());
|
|
911
994
|
};
|
|
912
995
|
|
|
913
996
|
// src/hooks/useGameCenterProfile.ts
|
|
@@ -920,14 +1003,14 @@ var useGameCenterProfile = (isReadyForProfileUI) => {
|
|
|
920
1003
|
const canShowBottomSheetOrToast = !isProfileDataLoading && isReadyForProfileUI;
|
|
921
1004
|
const [isWebviewLoading, setIsWebviewLoading] = (0, import_react10.useState)(false);
|
|
922
1005
|
const isCompletedProfileFlow = (0, import_react10.useRef)(false);
|
|
923
|
-
const { openAlert, openConfirm } = (0,
|
|
1006
|
+
const { openAlert, openConfirm } = (0, import_tds_react_native8.useDialog)();
|
|
924
1007
|
const { openGameProfileToast } = useGameProfileToast();
|
|
925
1008
|
const openErrorAlert = (0, import_react10.useCallback)(async () => {
|
|
926
1009
|
await openAlert({
|
|
927
1010
|
title: DEFAULT_ERROR.title,
|
|
928
1011
|
description: DEFAULT_ERROR.description
|
|
929
1012
|
});
|
|
930
|
-
(0,
|
|
1013
|
+
(0, import_react_native18.closeView)();
|
|
931
1014
|
}, [openAlert]);
|
|
932
1015
|
const openProfileWebview = (0, import_react10.useCallback)(() => {
|
|
933
1016
|
if (isWebviewLoading) {
|
|
@@ -941,7 +1024,7 @@ var useGameCenterProfile = (isReadyForProfileUI) => {
|
|
|
941
1024
|
try {
|
|
942
1025
|
setIsWebviewLoading(false);
|
|
943
1026
|
setIsProfileDataRefetching(true);
|
|
944
|
-
const data = await (0,
|
|
1027
|
+
const data = await (0, import_native_modules11.getGameCenterGameProfile)();
|
|
945
1028
|
setProfileData(data);
|
|
946
1029
|
setIsProfileDataRefetching(false);
|
|
947
1030
|
if (data?.statusCode === "SUCCESS") {
|
|
@@ -972,11 +1055,11 @@ var useGameCenterProfile = (isReadyForProfileUI) => {
|
|
|
972
1055
|
closeOnDimmerClick: true
|
|
973
1056
|
});
|
|
974
1057
|
if (!isConfirmed) {
|
|
975
|
-
(0,
|
|
1058
|
+
(0, import_react_native18.closeView)();
|
|
976
1059
|
return;
|
|
977
1060
|
}
|
|
978
1061
|
const STORE_SCHEME = getMarketLink();
|
|
979
|
-
(0,
|
|
1062
|
+
(0, import_react_native18.openURL)(`supertoss://web?url=${STORE_SCHEME}&external=browser`);
|
|
980
1063
|
}, [openConfirm]);
|
|
981
1064
|
return {
|
|
982
1065
|
profileData,
|
|
@@ -1005,7 +1088,7 @@ var Z_INDEX = {
|
|
|
1005
1088
|
};
|
|
1006
1089
|
|
|
1007
1090
|
// src/components/GameProfile.tsx
|
|
1008
|
-
var
|
|
1091
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1009
1092
|
var GameProfile = ({ children, isReadyForProfileUI }) => {
|
|
1010
1093
|
const {
|
|
1011
1094
|
profileData,
|
|
@@ -1024,7 +1107,7 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
|
|
|
1024
1107
|
(0, import_react11.useEffect)(() => {
|
|
1025
1108
|
try {
|
|
1026
1109
|
const getProfileData = async () => {
|
|
1027
|
-
const data = await (0,
|
|
1110
|
+
const data = await (0, import_native_modules12.getGameCenterGameProfile)();
|
|
1028
1111
|
setProfileData(data);
|
|
1029
1112
|
setIsProfileDataLoading(false);
|
|
1030
1113
|
};
|
|
@@ -1043,7 +1126,7 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
|
|
|
1043
1126
|
return;
|
|
1044
1127
|
}
|
|
1045
1128
|
isCompletedProfileFlow.current = true;
|
|
1046
|
-
if (!(0,
|
|
1129
|
+
if (!(0, import_native_modules12.isMinVersionSupported)(GAME_CENTER_MIN_VERSION)) {
|
|
1047
1130
|
updateAppToSupportedMinVersion();
|
|
1048
1131
|
return;
|
|
1049
1132
|
}
|
|
@@ -1064,11 +1147,11 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
|
|
|
1064
1147
|
profileData,
|
|
1065
1148
|
updateAppToSupportedMinVersion
|
|
1066
1149
|
]);
|
|
1067
|
-
if (!(0,
|
|
1068
|
-
return /* @__PURE__ */ (0,
|
|
1069
|
-
/* @__PURE__ */ (0,
|
|
1070
|
-
/* @__PURE__ */ (0,
|
|
1071
|
-
|
|
1150
|
+
if (!(0, import_native_modules12.isMinVersionSupported)(GAME_CENTER_MIN_VERSION)) {
|
|
1151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native19.View, { style: { flex: 1, position: "relative" }, children }),
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1154
|
+
import_react_native19.Pressable,
|
|
1072
1155
|
{
|
|
1073
1156
|
style: {
|
|
1074
1157
|
...overlayStyle
|
|
@@ -1081,10 +1164,10 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
|
|
|
1081
1164
|
] });
|
|
1082
1165
|
}
|
|
1083
1166
|
if (shouldShowLoadingOverlay || isProfileDataRefetching) {
|
|
1084
|
-
return /* @__PURE__ */ (0,
|
|
1085
|
-
/* @__PURE__ */ (0,
|
|
1086
|
-
/* @__PURE__ */ (0,
|
|
1087
|
-
|
|
1167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
1168
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native19.View, { style: { flex: 1, position: "relative" }, children }),
|
|
1169
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1170
|
+
import_react_native19.View,
|
|
1088
1171
|
{
|
|
1089
1172
|
style: {
|
|
1090
1173
|
...overlayStyle,
|
|
@@ -1092,16 +1175,16 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
|
|
|
1092
1175
|
alignItems: "center",
|
|
1093
1176
|
backgroundColor: "rgba(0, 0, 0, 0.2)"
|
|
1094
1177
|
},
|
|
1095
|
-
children: /* @__PURE__ */ (0,
|
|
1178
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tds_react_native9.Loader, { size: "large", type: "light" })
|
|
1096
1179
|
}
|
|
1097
1180
|
)
|
|
1098
1181
|
] });
|
|
1099
1182
|
}
|
|
1100
1183
|
if (shouldShowProfileNotFoundOverlay) {
|
|
1101
|
-
return /* @__PURE__ */ (0,
|
|
1102
|
-
/* @__PURE__ */ (0,
|
|
1103
|
-
shouldShowProfileNotFoundOverlay && /* @__PURE__ */ (0,
|
|
1104
|
-
|
|
1184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
1185
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native19.View, { style: { flex: 1, position: "relative" }, children }),
|
|
1186
|
+
shouldShowProfileNotFoundOverlay && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1187
|
+
import_react_native19.Pressable,
|
|
1105
1188
|
{
|
|
1106
1189
|
style: {
|
|
1107
1190
|
...overlayStyle
|
|
@@ -1113,7 +1196,7 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
|
|
|
1113
1196
|
)
|
|
1114
1197
|
] });
|
|
1115
1198
|
}
|
|
1116
|
-
return /* @__PURE__ */ (0,
|
|
1199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native19.View, { style: { flex: 1, position: "relative" }, children }) });
|
|
1117
1200
|
};
|
|
1118
1201
|
var overlayStyle = {
|
|
1119
1202
|
position: "absolute",
|
|
@@ -1125,16 +1208,16 @@ var overlayStyle = {
|
|
|
1125
1208
|
};
|
|
1126
1209
|
|
|
1127
1210
|
// src/components/NavigationBar/GameWebviewNavigationBar.tsx
|
|
1128
|
-
var
|
|
1129
|
-
var
|
|
1130
|
-
var
|
|
1211
|
+
var import_react_native20 = require("@granite-js/react-native");
|
|
1212
|
+
var import_tds_react_native10 = require("@toss/tds-react-native");
|
|
1213
|
+
var import_private6 = require("@toss/tds-react-native/private");
|
|
1131
1214
|
var import_es_hangul3 = require("es-hangul");
|
|
1132
1215
|
var import_react12 = require("react");
|
|
1133
|
-
var
|
|
1134
|
-
var
|
|
1216
|
+
var import_react_native21 = require("react-native");
|
|
1217
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1135
1218
|
function GameWebviewNavigationBar() {
|
|
1136
|
-
const safeAreaTop = (0,
|
|
1137
|
-
const { openConfirm } = (0,
|
|
1219
|
+
const safeAreaTop = (0, import_private6.useSafeAreaTop)();
|
|
1220
|
+
const { openConfirm } = (0, import_tds_react_native10.useDialog)();
|
|
1138
1221
|
const { captureExitLog } = useCaptureExitLog();
|
|
1139
1222
|
const global2 = getAppsInTossGlobals();
|
|
1140
1223
|
const logging = useNavigationBarLogging();
|
|
@@ -1152,7 +1235,7 @@ function GameWebviewNavigationBar() {
|
|
|
1152
1235
|
logging.closePopupCtaClick(isConfirmed);
|
|
1153
1236
|
if (isConfirmed) {
|
|
1154
1237
|
captureExitLog(Date.now());
|
|
1155
|
-
(0,
|
|
1238
|
+
(0, import_react_native20.closeView)();
|
|
1156
1239
|
}
|
|
1157
1240
|
}, [captureExitLog, global2.brandDisplayName, logging, openConfirm]);
|
|
1158
1241
|
(0, import_react12.useEffect)(() => {
|
|
@@ -1160,18 +1243,18 @@ function GameWebviewNavigationBar() {
|
|
|
1160
1243
|
handleGameWebviewClose();
|
|
1161
1244
|
return true;
|
|
1162
1245
|
};
|
|
1163
|
-
|
|
1164
|
-
return () =>
|
|
1246
|
+
import_react_native21.BackHandler.addEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
1247
|
+
return () => import_react_native21.BackHandler.removeEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
1165
1248
|
}, [handleGameWebviewClose]);
|
|
1166
|
-
return /* @__PURE__ */ (0,
|
|
1167
|
-
/* @__PURE__ */ (0,
|
|
1168
|
-
/* @__PURE__ */ (0,
|
|
1169
|
-
|
|
1249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
1250
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_tds_react_native10.PageNavbar, { preference: { type: "none" } }),
|
|
1251
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1252
|
+
import_react_native21.View,
|
|
1170
1253
|
{
|
|
1171
1254
|
style: {
|
|
1172
1255
|
width: "100%",
|
|
1173
1256
|
// TODO: UI관련 스타일 설정은 TDS로 이관
|
|
1174
|
-
height:
|
|
1257
|
+
height: import_react_native21.Platform.OS === "ios" ? 44 : 54,
|
|
1175
1258
|
flexDirection: "row",
|
|
1176
1259
|
alignItems: "center",
|
|
1177
1260
|
justifyContent: "flex-end",
|
|
@@ -1181,8 +1264,8 @@ function GameWebviewNavigationBar() {
|
|
|
1181
1264
|
paddingRight: 10
|
|
1182
1265
|
},
|
|
1183
1266
|
pointerEvents: "box-none",
|
|
1184
|
-
children: /* @__PURE__ */ (0,
|
|
1185
|
-
|
|
1267
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1268
|
+
import_private6.NavigationRightContent,
|
|
1186
1269
|
{
|
|
1187
1270
|
fixedRightButton: initialAccessoryButton,
|
|
1188
1271
|
onPressDots: openMoreButtonBottomSheet,
|
|
@@ -1199,49 +1282,49 @@ function GameWebviewNavigationBar() {
|
|
|
1199
1282
|
}
|
|
1200
1283
|
|
|
1201
1284
|
// src/components/GameWebView.tsx
|
|
1202
|
-
var
|
|
1285
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1203
1286
|
var GameWebView = (0, import_react13.forwardRef)(function GameWebView2(props, ref) {
|
|
1204
1287
|
const [isEntryMessageExited, setIsEntryMessageExited] = (0, import_react13.useState)(false);
|
|
1205
1288
|
(0, import_react13.useEffect)(() => {
|
|
1206
|
-
if (
|
|
1207
|
-
(0,
|
|
1289
|
+
if (import_react_native22.Platform.OS === "ios") {
|
|
1290
|
+
(0, import_native_modules13.setIosSwipeGestureEnabled)({ isEnabled: false });
|
|
1208
1291
|
return () => {
|
|
1209
|
-
(0,
|
|
1292
|
+
(0, import_native_modules13.setIosSwipeGestureEnabled)({ isEnabled: true });
|
|
1210
1293
|
};
|
|
1211
1294
|
}
|
|
1212
1295
|
return;
|
|
1213
1296
|
}, []);
|
|
1214
1297
|
(0, import_react13.useEffect)(() => {
|
|
1215
|
-
|
|
1298
|
+
import_native_modules13.appsInTossEvent.addEventListener("entryMessageExited", {
|
|
1216
1299
|
onEvent: () => {
|
|
1217
1300
|
setIsEntryMessageExited(true);
|
|
1218
1301
|
}
|
|
1219
1302
|
});
|
|
1220
1303
|
}, []);
|
|
1221
|
-
return /* @__PURE__ */ (0,
|
|
1222
|
-
/* @__PURE__ */ (0,
|
|
1223
|
-
(0,
|
|
1304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
1305
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(GameWebviewNavigationBar, {}),
|
|
1306
|
+
(0, import_native_modules13.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(GameProfile, { isReadyForProfileUI: isEntryMessageExited, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native_webview.WebView, { ref, ...props }) }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native_webview.WebView, { ref, ...props })
|
|
1224
1307
|
] });
|
|
1225
1308
|
});
|
|
1226
1309
|
|
|
1227
1310
|
// src/components/PartnerWebView.tsx
|
|
1228
|
-
var
|
|
1311
|
+
var import_native_modules15 = require("@apps-in-toss/native-modules");
|
|
1229
1312
|
var import_react_native_webview2 = require("@granite-js/native/react-native-webview");
|
|
1230
1313
|
var import_react16 = require("react");
|
|
1231
|
-
var
|
|
1314
|
+
var import_react_native25 = require("react-native");
|
|
1232
1315
|
|
|
1233
1316
|
// src/components/NavigationBar/PartnerWebviewNavigationBar.tsx
|
|
1234
|
-
var
|
|
1235
|
-
var
|
|
1236
|
-
var
|
|
1317
|
+
var import_react_native23 = require("@granite-js/react-native");
|
|
1318
|
+
var import_tds_react_native11 = require("@toss/tds-react-native");
|
|
1319
|
+
var import_private7 = require("@toss/tds-react-native/private");
|
|
1237
1320
|
var import_es_hangul4 = require("es-hangul");
|
|
1238
1321
|
var import_react14 = require("react");
|
|
1239
|
-
var
|
|
1322
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1240
1323
|
function PartnerWebviewNavigationBar({ handleBackEvent, handleHomeIconButtonClick }) {
|
|
1241
1324
|
const globals = getAppsInTossGlobals();
|
|
1242
1325
|
const { captureExitLog } = useCaptureExitLog();
|
|
1243
1326
|
const logging = useNavigationBarLogging();
|
|
1244
|
-
const { openConfirm } = (0,
|
|
1327
|
+
const { openConfirm } = (0, import_tds_react_native11.useDialog)();
|
|
1245
1328
|
const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
|
|
1246
1329
|
const parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
|
|
1247
1330
|
const withHomeButton = parsedNavigationBar?.withHomeButton ?? false;
|
|
@@ -1263,11 +1346,11 @@ function PartnerWebviewNavigationBar({ handleBackEvent, handleHomeIconButtonClic
|
|
|
1263
1346
|
logging.closePopupCtaClick(isConfirmed);
|
|
1264
1347
|
if (isConfirmed) {
|
|
1265
1348
|
captureExitLog(Date.now());
|
|
1266
|
-
(0,
|
|
1349
|
+
(0, import_react_native23.closeView)();
|
|
1267
1350
|
}
|
|
1268
1351
|
}, [captureExitLog, globals.brandDisplayName, logging, openConfirm]);
|
|
1269
|
-
return /* @__PURE__ */ (0,
|
|
1270
|
-
|
|
1352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1353
|
+
import_private7.TopNavigation,
|
|
1271
1354
|
{
|
|
1272
1355
|
title: globals.brandDisplayName,
|
|
1273
1356
|
icon: toIcon(globals.brandIcon),
|
|
@@ -1277,7 +1360,7 @@ function PartnerWebviewNavigationBar({ handleBackEvent, handleHomeIconButtonClic
|
|
|
1277
1360
|
onPressClose: handleClose,
|
|
1278
1361
|
withHome: withHomeButton,
|
|
1279
1362
|
fixedRightButton: initialAccessoryButton,
|
|
1280
|
-
children: /* @__PURE__ */ (0,
|
|
1363
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_private7.NavigationLeft, { visible: withBackButton, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_private7.NavigationBackButton, { onPress: handleBackEvent, canGoBack: false }) })
|
|
1281
1364
|
}
|
|
1282
1365
|
) });
|
|
1283
1366
|
}
|
|
@@ -1340,8 +1423,8 @@ function useWebViewHistory() {
|
|
|
1340
1423
|
}
|
|
1341
1424
|
|
|
1342
1425
|
// src/utils/log.ts
|
|
1343
|
-
var
|
|
1344
|
-
var
|
|
1426
|
+
var import_native_modules14 = require("@apps-in-toss/native-modules");
|
|
1427
|
+
var import_react_native24 = require("@granite-js/react-native");
|
|
1345
1428
|
|
|
1346
1429
|
// src/utils/extractDateFromUUIDv7.ts
|
|
1347
1430
|
var extractDateFromUUIDv7 = (uuid) => {
|
|
@@ -1367,7 +1450,7 @@ var getGroupId = (url) => {
|
|
|
1367
1450
|
};
|
|
1368
1451
|
var getReferrer = () => {
|
|
1369
1452
|
try {
|
|
1370
|
-
const referrer = new URL((0,
|
|
1453
|
+
const referrer = new URL((0, import_react_native24.getSchemeUri)());
|
|
1371
1454
|
return referrer.searchParams.get("referrer");
|
|
1372
1455
|
} catch {
|
|
1373
1456
|
return "";
|
|
@@ -1385,11 +1468,11 @@ var trackScreen = (url) => {
|
|
|
1385
1468
|
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
1386
1469
|
}
|
|
1387
1470
|
};
|
|
1388
|
-
return (0,
|
|
1471
|
+
return (0, import_native_modules14.eventLog)(log);
|
|
1389
1472
|
};
|
|
1390
1473
|
|
|
1391
1474
|
// src/components/PartnerWebView.tsx
|
|
1392
|
-
var
|
|
1475
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1393
1476
|
var PartnerWebView = (0, import_react16.forwardRef)(
|
|
1394
1477
|
function PartnerWebViewScreen(webViewProps, ref) {
|
|
1395
1478
|
const webViewRef = (0, import_react16.useRef)(null);
|
|
@@ -1413,7 +1496,7 @@ var PartnerWebView = (0, import_react16.forwardRef)(
|
|
|
1413
1496
|
webViewRef.current?.injectJavaScript(historyBackScript);
|
|
1414
1497
|
} else {
|
|
1415
1498
|
captureExitLog(Date.now());
|
|
1416
|
-
(0,
|
|
1499
|
+
(0, import_native_modules15.closeView)();
|
|
1417
1500
|
}
|
|
1418
1501
|
}, [canGoBack, captureExitLog, historyBackScript]);
|
|
1419
1502
|
(0, import_react16.useEffect)(() => {
|
|
@@ -1426,8 +1509,8 @@ var PartnerWebView = (0, import_react16.forwardRef)(
|
|
|
1426
1509
|
return false;
|
|
1427
1510
|
}
|
|
1428
1511
|
};
|
|
1429
|
-
|
|
1430
|
-
return () =>
|
|
1512
|
+
import_react_native25.BackHandler.addEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
1513
|
+
return () => import_react_native25.BackHandler.removeEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
1431
1514
|
}, [canGoBack, captureExitLog, historyBackScript]);
|
|
1432
1515
|
const handleHomeIconButtonClick = (0, import_react16.useCallback)(() => {
|
|
1433
1516
|
webViewRef.current?.injectJavaScript(historyHomeScript);
|
|
@@ -1441,15 +1524,15 @@ var PartnerWebView = (0, import_react16.forwardRef)(
|
|
|
1441
1524
|
},
|
|
1442
1525
|
[onNavigationStateChange]
|
|
1443
1526
|
);
|
|
1444
|
-
return /* @__PURE__ */ (0,
|
|
1445
|
-
/* @__PURE__ */ (0,
|
|
1527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1528
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1446
1529
|
PartnerWebviewNavigationBar,
|
|
1447
1530
|
{
|
|
1448
1531
|
handleBackEvent,
|
|
1449
1532
|
handleHomeIconButtonClick
|
|
1450
1533
|
}
|
|
1451
1534
|
),
|
|
1452
|
-
/* @__PURE__ */ (0,
|
|
1535
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1453
1536
|
import_react_native_webview2.WebView,
|
|
1454
1537
|
{
|
|
1455
1538
|
ref: refs,
|
|
@@ -1598,8 +1681,8 @@ function useBridgeHandler({
|
|
|
1598
1681
|
}
|
|
1599
1682
|
|
|
1600
1683
|
// src/hooks/useCreateUserAgent.ts
|
|
1601
|
-
var
|
|
1602
|
-
var
|
|
1684
|
+
var import_native_modules16 = require("@apps-in-toss/native-modules");
|
|
1685
|
+
var import_react_native26 = require("react-native");
|
|
1603
1686
|
var FontA11yCategory = {
|
|
1604
1687
|
Large: "Large",
|
|
1605
1688
|
xLarge: "xLarge",
|
|
@@ -1732,9 +1815,9 @@ function useCreateUserAgent({
|
|
|
1732
1815
|
safeArea,
|
|
1733
1816
|
safeAreaBottomTransparency
|
|
1734
1817
|
}) {
|
|
1735
|
-
const platform = (0,
|
|
1736
|
-
const appVersion = (0,
|
|
1737
|
-
const { fontScale } = (0,
|
|
1818
|
+
const platform = (0, import_native_modules16.getPlatformOS)();
|
|
1819
|
+
const appVersion = (0, import_native_modules16.getTossAppVersion)();
|
|
1820
|
+
const { fontScale } = (0, import_react_native26.useWindowDimensions)();
|
|
1738
1821
|
const platformString = platform === "ios" ? "iPhone" : "Android";
|
|
1739
1822
|
const fontA11y = mapFontScaleToCategory(fontScale, platform);
|
|
1740
1823
|
const normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
|
|
@@ -1754,17 +1837,17 @@ function useCreateUserAgent({
|
|
|
1754
1837
|
}
|
|
1755
1838
|
|
|
1756
1839
|
// src/hooks/useGeolocation.ts
|
|
1757
|
-
var
|
|
1758
|
-
var
|
|
1840
|
+
var import_native_modules17 = require("@apps-in-toss/native-modules");
|
|
1841
|
+
var import_react_native27 = require("@granite-js/react-native");
|
|
1759
1842
|
var import_react18 = require("react");
|
|
1760
1843
|
function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
|
|
1761
|
-
const isVisible = (0,
|
|
1844
|
+
const isVisible = (0, import_react_native27.useVisibility)();
|
|
1762
1845
|
const [location, setLocation] = (0, import_react18.useState)(null);
|
|
1763
1846
|
(0, import_react18.useEffect)(() => {
|
|
1764
1847
|
if (!isVisible) {
|
|
1765
1848
|
return;
|
|
1766
1849
|
}
|
|
1767
|
-
return (0,
|
|
1850
|
+
return (0, import_native_modules17.startUpdateLocation)({
|
|
1768
1851
|
options: {
|
|
1769
1852
|
accuracy,
|
|
1770
1853
|
distanceInterval,
|
|
@@ -1778,17 +1861,17 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
|
|
|
1778
1861
|
}
|
|
1779
1862
|
|
|
1780
1863
|
// src/components/WebView.tsx
|
|
1781
|
-
var
|
|
1864
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1782
1865
|
var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment();
|
|
1783
1866
|
var TYPES = ["partner", "external", "game"];
|
|
1784
1867
|
var WEBVIEW_TYPES = {
|
|
1785
1868
|
partner: PartnerWebView,
|
|
1786
|
-
external:
|
|
1869
|
+
external: import_tds_react_native12.ExternalWebViewScreen,
|
|
1787
1870
|
game: GameWebView
|
|
1788
1871
|
};
|
|
1789
1872
|
function mergeSchemeQueryParamsInto(url) {
|
|
1790
1873
|
const baseUrl = new URL(url);
|
|
1791
|
-
const schemeUrl = new URL((0,
|
|
1874
|
+
const schemeUrl = new URL((0, import_react_native28.getSchemeUri)());
|
|
1792
1875
|
baseUrl.pathname = schemeUrl.pathname;
|
|
1793
1876
|
for (const [key, value] of schemeUrl.searchParams.entries()) {
|
|
1794
1877
|
baseUrl.searchParams.set(key, value);
|
|
@@ -1800,7 +1883,7 @@ function getWebViewUri(local) {
|
|
|
1800
1883
|
const devUrl = `http://${local.host}:${local.port}`;
|
|
1801
1884
|
return mergeSchemeQueryParamsInto(devUrl).toString();
|
|
1802
1885
|
}
|
|
1803
|
-
const { url: rawUrl } =
|
|
1886
|
+
const { url: rawUrl } = import_native_modules18.AppsInTossModule.getWebBundleURL({});
|
|
1804
1887
|
const url = mergeSchemeQueryParamsInto(rawUrl);
|
|
1805
1888
|
const deploymentId = env.getDeploymentId();
|
|
1806
1889
|
if (deploymentId) {
|
|
@@ -1812,12 +1895,12 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
1812
1895
|
if (!TYPES.includes(type)) {
|
|
1813
1896
|
throw new Error(`Invalid WebView type: '${type}'`);
|
|
1814
1897
|
}
|
|
1815
|
-
const graniteEvent = (0,
|
|
1898
|
+
const graniteEvent = (0, import_react_native28.useGraniteEvent)();
|
|
1816
1899
|
const uri = (0, import_react19.useMemo)(() => getWebViewUri(local), [local]);
|
|
1817
|
-
const top = (0,
|
|
1818
|
-
const bottom = (0,
|
|
1900
|
+
const top = (0, import_private8.useSafeAreaTop)();
|
|
1901
|
+
const bottom = (0, import_private8.useSafeAreaBottom)();
|
|
1819
1902
|
const global2 = getAppsInTossGlobals();
|
|
1820
|
-
const topNavigation = (0,
|
|
1903
|
+
const topNavigation = (0, import_private8.useTopNavigation)();
|
|
1821
1904
|
const disableTextSelectionCSS = `
|
|
1822
1905
|
(function() {
|
|
1823
1906
|
const style = document.createElement('style');
|
|
@@ -1834,43 +1917,41 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
1834
1917
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1835
1918
|
eventListenerMap: {
|
|
1836
1919
|
...appsInTossEventBridges,
|
|
1837
|
-
navigationAccessoryEvent: ({ onEvent, onError }) =>
|
|
1920
|
+
navigationAccessoryEvent: ({ onEvent, onError }) => import_tds_react_native12.tdsEvent.addEventListener("navigationAccessoryEvent", { onEvent, onError }),
|
|
1838
1921
|
backEvent: ({ onEvent, onError, options }) => graniteEvent.addEventListener("backEvent", { onEvent, onError, options }),
|
|
1839
|
-
entryMessageExited: ({ onEvent, onError }) =>
|
|
1840
|
-
updateLocationEvent: ({ onEvent, onError, options }) =>
|
|
1922
|
+
entryMessageExited: ({ onEvent, onError }) => import_native_modules18.appsInTossEvent.addEventListener("entryMessageExited", { onEvent, onError }),
|
|
1923
|
+
updateLocationEvent: ({ onEvent, onError, options }) => import_native_modules18.appsInTossEvent.addEventListener("updateLocationEvent", { onEvent, onError, options }),
|
|
1841
1924
|
/** @internal */
|
|
1842
|
-
appBridgeCallbackEvent: ({ onEvent, onError, options }) =>
|
|
1925
|
+
appBridgeCallbackEvent: ({ onEvent, onError, options }) => import_native_modules18.appsInTossEvent.addEventListener("appBridgeCallbackEvent", { onEvent, onError, options }),
|
|
1843
1926
|
/** AdMob */
|
|
1844
|
-
loadAdMobInterstitialAd:
|
|
1845
|
-
showAdMobInterstitialAd:
|
|
1846
|
-
loadAdMobRewardedAd:
|
|
1847
|
-
showAdMobRewardedAd:
|
|
1927
|
+
loadAdMobInterstitialAd: import_native_modules18.GoogleAdMob.loadAdMobInterstitialAd,
|
|
1928
|
+
showAdMobInterstitialAd: import_native_modules18.GoogleAdMob.showAdMobInterstitialAd,
|
|
1929
|
+
loadAdMobRewardedAd: import_native_modules18.GoogleAdMob.loadAdMobRewardedAd,
|
|
1930
|
+
showAdMobRewardedAd: import_native_modules18.GoogleAdMob.showAdMobRewardedAd,
|
|
1848
1931
|
/** AdMobV2 */
|
|
1849
|
-
loadAppsInTossAdMob:
|
|
1850
|
-
showAppsInTossAdMob:
|
|
1932
|
+
loadAppsInTossAdMob: import_native_modules18.GoogleAdMob.loadAppsInTossAdMob,
|
|
1933
|
+
showAppsInTossAdMob: import_native_modules18.GoogleAdMob.showAppsInTossAdMob,
|
|
1851
1934
|
/** IAP */
|
|
1852
|
-
iapCreateOneTimePurchaseOrder:
|
|
1853
|
-
requestOneTimePurchase:
|
|
1935
|
+
iapCreateOneTimePurchaseOrder: import_native_modules18.IAP.createOneTimePurchaseOrder,
|
|
1936
|
+
requestOneTimePurchase: import_native_modules18.requestOneTimePurchase
|
|
1854
1937
|
},
|
|
1855
1938
|
constantHandlerMap: {
|
|
1856
|
-
...graniteConstantBridges,
|
|
1857
1939
|
...appsInTossConstantBridges,
|
|
1858
1940
|
getSafeAreaTop: () => top,
|
|
1859
1941
|
getSafeAreaBottom: () => bottom,
|
|
1860
1942
|
...Object.fromEntries(Object.entries(global2).map(([key, value]) => [key, () => value])),
|
|
1861
1943
|
/** AdMob */
|
|
1862
|
-
loadAdMobInterstitialAd_isSupported:
|
|
1863
|
-
showAdMobInterstitialAd_isSupported:
|
|
1864
|
-
loadAdMobRewardedAd_isSupported:
|
|
1865
|
-
showAdMobRewardedAd_isSupported:
|
|
1944
|
+
loadAdMobInterstitialAd_isSupported: import_native_modules18.GoogleAdMob.loadAdMobInterstitialAd.isSupported,
|
|
1945
|
+
showAdMobInterstitialAd_isSupported: import_native_modules18.GoogleAdMob.showAdMobInterstitialAd.isSupported,
|
|
1946
|
+
loadAdMobRewardedAd_isSupported: import_native_modules18.GoogleAdMob.loadAdMobRewardedAd.isSupported,
|
|
1947
|
+
showAdMobRewardedAd_isSupported: import_native_modules18.GoogleAdMob.showAdMobRewardedAd.isSupported,
|
|
1866
1948
|
/** AdMobV2 */
|
|
1867
|
-
loadAppsInTossAdMob_isSupported:
|
|
1868
|
-
showAppsInTossAdMob_isSupported:
|
|
1949
|
+
loadAppsInTossAdMob_isSupported: import_native_modules18.GoogleAdMob.loadAppsInTossAdMob.isSupported,
|
|
1950
|
+
showAppsInTossAdMob_isSupported: import_native_modules18.GoogleAdMob.showAppsInTossAdMob.isSupported,
|
|
1869
1951
|
/** env */
|
|
1870
1952
|
getDeploymentId: env.getDeploymentId
|
|
1871
1953
|
},
|
|
1872
1954
|
asyncHandlerMap: {
|
|
1873
|
-
...graniteAsyncBridges,
|
|
1874
1955
|
...appsInTossAsyncBridges,
|
|
1875
1956
|
setIosSwipeGestureEnabled: (options) => {
|
|
1876
1957
|
setAllowsBackForwardNavigationGestures(options.isEnabled);
|
|
@@ -1889,14 +1970,16 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
1889
1970
|
getCurrentLocation: appsInTossAsyncBridges.getCurrentLocation,
|
|
1890
1971
|
openCamera: appsInTossAsyncBridges.openCamera,
|
|
1891
1972
|
/** Storage */
|
|
1892
|
-
getStorageItem:
|
|
1893
|
-
setStorageItem:
|
|
1894
|
-
removeStorageItem:
|
|
1895
|
-
clearItems:
|
|
1973
|
+
getStorageItem: import_native_modules18.Storage.getItem,
|
|
1974
|
+
setStorageItem: import_native_modules18.Storage.setItem,
|
|
1975
|
+
removeStorageItem: import_native_modules18.Storage.removeItem,
|
|
1976
|
+
clearItems: import_native_modules18.Storage.clearItems,
|
|
1896
1977
|
/** IAP */
|
|
1897
|
-
iapGetProductItemList:
|
|
1898
|
-
iapCreateOneTimePurchaseOrder:
|
|
1899
|
-
processProductGrant:
|
|
1978
|
+
iapGetProductItemList: import_native_modules18.IAP.getProductItemList,
|
|
1979
|
+
iapCreateOneTimePurchaseOrder: import_native_modules18.iapCreateOneTimePurchaseOrder,
|
|
1980
|
+
processProductGrant: import_native_modules18.processProductGrant,
|
|
1981
|
+
getPendingOrders: import_native_modules18.IAP.getPendingOrders,
|
|
1982
|
+
getCompletedOrRefundedOrders: import_native_modules18.IAP.getCompletedOrRefundedOrders
|
|
1900
1983
|
}
|
|
1901
1984
|
});
|
|
1902
1985
|
const headerPropForExternalWebView = (0, import_react19.useMemo)(() => {
|
|
@@ -1919,7 +2002,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
1919
2002
|
const userAgent = useCreateUserAgent({
|
|
1920
2003
|
colorPreference: "light"
|
|
1921
2004
|
});
|
|
1922
|
-
return /* @__PURE__ */ (0,
|
|
2005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1923
2006
|
BaseWebView,
|
|
1924
2007
|
{
|
|
1925
2008
|
ref: handler.ref,
|
|
@@ -1932,14 +2015,14 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
1932
2015
|
"User-Agent": userAgent
|
|
1933
2016
|
}
|
|
1934
2017
|
},
|
|
1935
|
-
userAgent:
|
|
2018
|
+
userAgent: import_react_native29.Platform.OS === "ios" ? userAgent : void 0,
|
|
1936
2019
|
sharedCookiesEnabled: true,
|
|
1937
2020
|
webviewDebuggingEnabled: webViewDebuggingEnabled,
|
|
1938
2021
|
thirdPartyCookiesEnabled: true,
|
|
1939
2022
|
onMessage: handler.onMessage,
|
|
1940
2023
|
injectedJavaScript: handler.injectedJavaScript,
|
|
1941
2024
|
injectedJavaScriptBeforeContentLoaded: handler.injectedJavaScript,
|
|
1942
|
-
decelerationRate:
|
|
2025
|
+
decelerationRate: import_react_native29.Platform.OS === "ios" ? 1 : void 0,
|
|
1943
2026
|
allowsBackForwardNavigationGestures
|
|
1944
2027
|
}
|
|
1945
2028
|
);
|
|
@@ -1947,7 +2030,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
1947
2030
|
|
|
1948
2031
|
// src/index.ts
|
|
1949
2032
|
__reExport(src_exports, require("@apps-in-toss/analytics"), module.exports);
|
|
1950
|
-
var
|
|
2033
|
+
var import_private9 = require("@toss/tds-react-native/private");
|
|
1951
2034
|
__reExport(src_exports, require("@apps-in-toss/native-modules"), module.exports);
|
|
1952
2035
|
__reExport(src_exports, require("@apps-in-toss/types"), module.exports);
|
|
1953
2036
|
var Analytics2 = {
|