From ea73291e03fa7e83a3b525f47283e2546eb64e67 Mon Sep 17 00:00:00 2001 From: "Georgi Malkhasyan (CW)" Date: Tue, 26 Nov 2024 10:05:20 -0800 Subject: [PATCH 1/5] DTPP-11 Demo app organize folder structure --- Demo/Demo.xcodeproj/project.pbxproj | 108 +++++++++++++----- .../CardPaymentState.swift | 0 .../CardPaymentViewModel.swift | 0 .../CardApprovalResultView.swift | 0 .../CardOrderActionButton.swift | 0 .../CardOrderApproveView.swift | 0 .../CardOrderCompletionResultView.swift | 0 .../CardPaymentOrderCompletionView.swift | 0 .../CardPaymentViews/CardPaymentView.swift | 0 .../CreateOrderCardPaymentView.swift | 0 .../OrderCreateCardResultView.swift | 0 .../CardVaultViewModel.swift | 0 .../CardVaultViews/CardVaultView.swift | 0 .../UpdateSetupTokenResultView.swift | 0 .../CardVaultViews/UpdateSetupTokenView.swift | 0 .../PayPalVaultViewModel.swift | 0 .../PayPalVaultViewModel}/VaultState.swift | 0 .../VaultViewModel.swift | 0 .../PayPalVaultResultView.swift | 0 .../PayPalVaultViews/PayPalVaultView.swift | 0 .../VaultViews/CreatePaymentTokenView.swift | 0 .../VaultViews/CreateSetupTokenView.swift | 0 .../VaultViews/PaymentTokenResultView.swift | 0 .../VaultViews/SetupTokenResultView.swift | 0 .../PayPalWebButtonsView.swift | 0 .../PayPalWebCreateOrderView.swift | 0 .../PayPalWebPaymentsView.swift | 0 .../PayPalWebResultView.swift | 0 .../PayPalWebTransactionView.swift | 0 .../PayPalWebViewModel.swift | 0 30 files changed, 78 insertions(+), 30 deletions(-) rename Demo/Demo/{ViewModels => CardPayments/CardPaymentViewModel}/CardPaymentState.swift (100%) rename Demo/Demo/{ViewModels => CardPayments/CardPaymentViewModel}/CardPaymentViewModel.swift (100%) rename Demo/Demo/{SwiftUIComponents => CardPayments}/CardPaymentViews/CardApprovalResultView.swift (100%) rename Demo/Demo/{SwiftUIComponents => CardPayments}/CardPaymentViews/CardOrderActionButton.swift (100%) rename Demo/Demo/{SwiftUIComponents => CardPayments}/CardPaymentViews/CardOrderApproveView.swift (100%) rename Demo/Demo/{SwiftUIComponents => CardPayments}/CardPaymentViews/CardOrderCompletionResultView.swift (100%) rename Demo/Demo/{SwiftUIComponents => CardPayments}/CardPaymentViews/CardPaymentOrderCompletionView.swift (100%) rename Demo/Demo/{SwiftUIComponents => CardPayments}/CardPaymentViews/CardPaymentView.swift (100%) rename Demo/Demo/{SwiftUIComponents => CardPayments}/CardPaymentViews/CreateOrderCardPaymentView.swift (100%) rename Demo/Demo/{SwiftUIComponents => CardPayments}/CardPaymentViews/OrderCreateCardResultView.swift (100%) rename Demo/Demo/{ViewModels => CardVault/CardVaultViewModel}/CardVaultViewModel.swift (100%) rename Demo/Demo/{SwiftUIComponents => CardVault}/CardVaultViews/CardVaultView.swift (100%) rename Demo/Demo/{SwiftUIComponents => CardVault}/CardVaultViews/UpdateSetupTokenResultView.swift (100%) rename Demo/Demo/{SwiftUIComponents => CardVault}/CardVaultViews/UpdateSetupTokenView.swift (100%) rename Demo/Demo/{ViewModels => PayPalVault/PayPalVaultViewModel}/PayPalVaultViewModel.swift (100%) rename Demo/Demo/{ViewModels => PayPalVault/PayPalVaultViewModel}/VaultState.swift (100%) rename Demo/Demo/{ViewModels => PayPalVault/PayPalVaultViewModel}/VaultViewModel.swift (100%) rename Demo/Demo/{SwiftUIComponents => PayPalVault}/PayPalVaultViews/PayPalVaultResultView.swift (100%) rename Demo/Demo/{SwiftUIComponents => PayPalVault}/PayPalVaultViews/PayPalVaultView.swift (100%) rename Demo/Demo/{SwiftUIComponents => PayPalVault}/VaultViews/CreatePaymentTokenView.swift (100%) rename Demo/Demo/{SwiftUIComponents => PayPalVault}/VaultViews/CreateSetupTokenView.swift (100%) rename Demo/Demo/{SwiftUIComponents => PayPalVault}/VaultViews/PaymentTokenResultView.swift (100%) rename Demo/Demo/{SwiftUIComponents => PayPalVault}/VaultViews/SetupTokenResultView.swift (100%) rename Demo/Demo/{SwiftUIComponents/PayPalWebPayments => PayPalWebPayments/PayPalWebPaymentsView}/PayPalWebButtonsView.swift (100%) rename Demo/Demo/{SwiftUIComponents/PayPalWebPayments => PayPalWebPayments/PayPalWebPaymentsView}/PayPalWebCreateOrderView.swift (100%) rename Demo/Demo/{SwiftUIComponents/PayPalWebPayments => PayPalWebPayments/PayPalWebPaymentsView}/PayPalWebPaymentsView.swift (100%) rename Demo/Demo/{SwiftUIComponents/PayPalWebPayments => PayPalWebPayments/PayPalWebPaymentsView}/PayPalWebResultView.swift (100%) rename Demo/Demo/{SwiftUIComponents/PayPalWebPayments => PayPalWebPayments/PayPalWebPaymentsView}/PayPalWebTransactionView.swift (100%) rename Demo/Demo/{SwiftUIComponents/PayPalWebPayments => PayPalWebPayments/PayPalWebViewModel}/PayPalWebViewModel.swift (100%) diff --git a/Demo/Demo.xcodeproj/project.pbxproj b/Demo/Demo.xcodeproj/project.pbxproj index 74ad85889..2a25de72c 100644 --- a/Demo/Demo.xcodeproj/project.pbxproj +++ b/Demo/Demo.xcodeproj/project.pbxproj @@ -227,6 +227,78 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1001E2B62CF643270023A03C /* CardVault */ = { + isa = PBXGroup; + children = ( + 1001E2BD2CF644E00023A03C /* CardVaultViewModel */, + 3B43290F2A8FD7FD00C5441A /* CardVaultViews */, + ); + path = CardVault; + sourceTree = ""; + }; + 1001E2B72CF6432F0023A03C /* PayPalVault */ = { + isa = PBXGroup; + children = ( + 1001E2BC2CF644BE0023A03C /* PayPalVaultViewModel */, + 3B2501052B2679F000903EAB /* VaultViews */, + 3BB60B512B1F9EE400A298CF /* PayPalVaultViews */, + ); + path = PayPalVault; + sourceTree = ""; + }; + 1001E2B82CF643350023A03C /* CardPayments */ = { + isa = PBXGroup; + children = ( + 1001E2BB2CF6449B0023A03C /* CardPaymentViewModel */, + 3BA56FEA2A9DCBB30081D14F /* CardPaymentViews */, + ); + path = CardPayments; + sourceTree = ""; + }; + 1001E2B92CF6433C0023A03C /* PayPalWebPayments */ = { + isa = PBXGroup; + children = ( + 1001E2BA2CF644480023A03C /* PayPalWebViewModel */, + 3BA56FFF2A9FF6630081D14F /* PayPalWebPaymentsView */, + ); + path = PayPalWebPayments; + sourceTree = ""; + }; + 1001E2BA2CF644480023A03C /* PayPalWebViewModel */ = { + isa = PBXGroup; + children = ( + 3BA56FFB2A9FEFE90081D14F /* PayPalWebViewModel.swift */, + ); + path = PayPalWebViewModel; + sourceTree = ""; + }; + 1001E2BB2CF6449B0023A03C /* CardPaymentViewModel */ = { + isa = PBXGroup; + children = ( + 3BA56FE62A9DC9D70081D14F /* CardPaymentViewModel.swift */, + 3BA56FE82A9DCA520081D14F /* CardPaymentState.swift */, + ); + path = CardPaymentViewModel; + sourceTree = ""; + }; + 1001E2BC2CF644BE0023A03C /* PayPalVaultViewModel */ = { + isa = PBXGroup; + children = ( + 3BB60B542B1FA00C00A298CF /* PayPalVaultViewModel.swift */, + 3BA0A58A2B1E240300330681 /* VaultViewModel.swift */, + 3B2027402A8A72050007907E /* VaultState.swift */, + ); + path = PayPalVaultViewModel; + sourceTree = ""; + }; + 1001E2BD2CF644E00023A03C /* CardVaultViewModel */ = { + isa = PBXGroup; + children = ( + 3B20273E2A89F24E0007907E /* CardVaultViewModel.swift */, + ); + path = CardVaultViewModel; + sourceTree = ""; + }; 3B2501052B2679F000903EAB /* VaultViews */ = { isa = PBXGroup; children = ( @@ -263,7 +335,7 @@ path = CardPaymentViews; sourceTree = ""; }; - 3BA56FFF2A9FF6630081D14F /* PayPalWebPayments */ = { + 3BA56FFF2A9FF6630081D14F /* PayPalWebPaymentsView */ = { isa = PBXGroup; children = ( 3BA570062AA0DF330081D14F /* PayPalWebButtonsView.swift */, @@ -271,9 +343,8 @@ 3BA570002AA052E80081D14F /* PayPalWebPaymentsView.swift */, BE8117632B07E778009867B9 /* PayPalWebResultView.swift */, 3B6472A62AFAEB3A004745C4 /* PayPalWebTransactionView.swift */, - 3BA56FFB2A9FEFE90081D14F /* PayPalWebViewModel.swift */, ); - path = PayPalWebPayments; + path = PayPalWebPaymentsView; sourceTree = ""; }; 3BB60B512B1F9EE400A298CF /* PayPalVaultViews */ = { @@ -300,13 +371,6 @@ path = CommonComponents; sourceTree = ""; }; - 53B9E8E828C93B2B00719239 /* Helpers */ = { - isa = PBXGroup; - children = ( - ); - path = Helpers; - sourceTree = ""; - }; 805AB84C26B87A87003BEE0D /* Frameworks */ = { isa = PBXGroup; children = ( @@ -349,8 +413,11 @@ 806F1E3726B85367007A60E6 /* Demo */ = { isa = PBXGroup; children = ( + 1001E2B92CF6433C0023A03C /* PayPalWebPayments */, + 1001E2B82CF643350023A03C /* CardPayments */, + 1001E2B72CF6432F0023A03C /* PayPalVault */, + 1001E2B62CF643270023A03C /* CardVault */, 806C7A812C000626000E85E8 /* Demo.entitlements */, - 53B9E8E828C93B2B00719239 /* Helpers */, 806F1E4126B85369007A60E6 /* Assets.xcassets */, BED0422F2710833100C80954 /* Card */, BECD849E27036D95007CCAE4 /* DemoSettings */, @@ -360,7 +427,6 @@ 80F33CEB26F8E799006811B1 /* Models */, BE1766B526FA562B007EF438 /* Networking */, BEDE3047275E998700D275FD /* SwiftUIComponents */, - BE4876A827567D4200802EAF /* ViewModels */, 3BCCFE482A9D96CA00C5102F /* DemoApp.swift */, ); path = Demo; @@ -411,19 +477,6 @@ path = Networking; sourceTree = ""; }; - BE4876A827567D4200802EAF /* ViewModels */ = { - isa = PBXGroup; - children = ( - 3B20273E2A89F24E0007907E /* CardVaultViewModel.swift */, - 3BA0A58A2B1E240300330681 /* VaultViewModel.swift */, - 3B2027402A8A72050007907E /* VaultState.swift */, - 3BA56FE62A9DC9D70081D14F /* CardPaymentViewModel.swift */, - 3BA56FE82A9DCA520081D14F /* CardPaymentState.swift */, - 3BB60B542B1FA00C00A298CF /* PayPalVaultViewModel.swift */, - ); - path = ViewModels; - sourceTree = ""; - }; BECD849E27036D95007CCAE4 /* DemoSettings */ = { isa = PBXGroup; children = ( @@ -446,12 +499,7 @@ BEDE3047275E998700D275FD /* SwiftUIComponents */ = { isa = PBXGroup; children = ( - 3B2501052B2679F000903EAB /* VaultViews */, - 3BB60B512B1F9EE400A298CF /* PayPalVaultViews */, - 3BA56FFF2A9FF6630081D14F /* PayPalWebPayments */, - 3BA56FEA2A9DCBB30081D14F /* CardPaymentViews */, 3BCCFE472A9D962E00C5102F /* CommonComponents */, - 3B43290F2A8FD7FD00C5441A /* CardVaultViews */, CB9ED44D28411B110081F4DE /* SwiftUIPaymentButtonDemo.swift */, 3BCCFE4A2A9D985F00C5102F /* FeatureSelectionView.swift */, BE8117672B080472009867B9 /* CurrentState.swift */, diff --git a/Demo/Demo/ViewModels/CardPaymentState.swift b/Demo/Demo/CardPayments/CardPaymentViewModel/CardPaymentState.swift similarity index 100% rename from Demo/Demo/ViewModels/CardPaymentState.swift rename to Demo/Demo/CardPayments/CardPaymentViewModel/CardPaymentState.swift diff --git a/Demo/Demo/ViewModels/CardPaymentViewModel.swift b/Demo/Demo/CardPayments/CardPaymentViewModel/CardPaymentViewModel.swift similarity index 100% rename from Demo/Demo/ViewModels/CardPaymentViewModel.swift rename to Demo/Demo/CardPayments/CardPaymentViewModel/CardPaymentViewModel.swift diff --git a/Demo/Demo/SwiftUIComponents/CardPaymentViews/CardApprovalResultView.swift b/Demo/Demo/CardPayments/CardPaymentViews/CardApprovalResultView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/CardPaymentViews/CardApprovalResultView.swift rename to Demo/Demo/CardPayments/CardPaymentViews/CardApprovalResultView.swift diff --git a/Demo/Demo/SwiftUIComponents/CardPaymentViews/CardOrderActionButton.swift b/Demo/Demo/CardPayments/CardPaymentViews/CardOrderActionButton.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/CardPaymentViews/CardOrderActionButton.swift rename to Demo/Demo/CardPayments/CardPaymentViews/CardOrderActionButton.swift diff --git a/Demo/Demo/SwiftUIComponents/CardPaymentViews/CardOrderApproveView.swift b/Demo/Demo/CardPayments/CardPaymentViews/CardOrderApproveView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/CardPaymentViews/CardOrderApproveView.swift rename to Demo/Demo/CardPayments/CardPaymentViews/CardOrderApproveView.swift diff --git a/Demo/Demo/SwiftUIComponents/CardPaymentViews/CardOrderCompletionResultView.swift b/Demo/Demo/CardPayments/CardPaymentViews/CardOrderCompletionResultView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/CardPaymentViews/CardOrderCompletionResultView.swift rename to Demo/Demo/CardPayments/CardPaymentViews/CardOrderCompletionResultView.swift diff --git a/Demo/Demo/SwiftUIComponents/CardPaymentViews/CardPaymentOrderCompletionView.swift b/Demo/Demo/CardPayments/CardPaymentViews/CardPaymentOrderCompletionView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/CardPaymentViews/CardPaymentOrderCompletionView.swift rename to Demo/Demo/CardPayments/CardPaymentViews/CardPaymentOrderCompletionView.swift diff --git a/Demo/Demo/SwiftUIComponents/CardPaymentViews/CardPaymentView.swift b/Demo/Demo/CardPayments/CardPaymentViews/CardPaymentView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/CardPaymentViews/CardPaymentView.swift rename to Demo/Demo/CardPayments/CardPaymentViews/CardPaymentView.swift diff --git a/Demo/Demo/SwiftUIComponents/CardPaymentViews/CreateOrderCardPaymentView.swift b/Demo/Demo/CardPayments/CardPaymentViews/CreateOrderCardPaymentView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/CardPaymentViews/CreateOrderCardPaymentView.swift rename to Demo/Demo/CardPayments/CardPaymentViews/CreateOrderCardPaymentView.swift diff --git a/Demo/Demo/SwiftUIComponents/CardPaymentViews/OrderCreateCardResultView.swift b/Demo/Demo/CardPayments/CardPaymentViews/OrderCreateCardResultView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/CardPaymentViews/OrderCreateCardResultView.swift rename to Demo/Demo/CardPayments/CardPaymentViews/OrderCreateCardResultView.swift diff --git a/Demo/Demo/ViewModels/CardVaultViewModel.swift b/Demo/Demo/CardVault/CardVaultViewModel/CardVaultViewModel.swift similarity index 100% rename from Demo/Demo/ViewModels/CardVaultViewModel.swift rename to Demo/Demo/CardVault/CardVaultViewModel/CardVaultViewModel.swift diff --git a/Demo/Demo/SwiftUIComponents/CardVaultViews/CardVaultView.swift b/Demo/Demo/CardVault/CardVaultViews/CardVaultView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/CardVaultViews/CardVaultView.swift rename to Demo/Demo/CardVault/CardVaultViews/CardVaultView.swift diff --git a/Demo/Demo/SwiftUIComponents/CardVaultViews/UpdateSetupTokenResultView.swift b/Demo/Demo/CardVault/CardVaultViews/UpdateSetupTokenResultView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/CardVaultViews/UpdateSetupTokenResultView.swift rename to Demo/Demo/CardVault/CardVaultViews/UpdateSetupTokenResultView.swift diff --git a/Demo/Demo/SwiftUIComponents/CardVaultViews/UpdateSetupTokenView.swift b/Demo/Demo/CardVault/CardVaultViews/UpdateSetupTokenView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/CardVaultViews/UpdateSetupTokenView.swift rename to Demo/Demo/CardVault/CardVaultViews/UpdateSetupTokenView.swift diff --git a/Demo/Demo/ViewModels/PayPalVaultViewModel.swift b/Demo/Demo/PayPalVault/PayPalVaultViewModel/PayPalVaultViewModel.swift similarity index 100% rename from Demo/Demo/ViewModels/PayPalVaultViewModel.swift rename to Demo/Demo/PayPalVault/PayPalVaultViewModel/PayPalVaultViewModel.swift diff --git a/Demo/Demo/ViewModels/VaultState.swift b/Demo/Demo/PayPalVault/PayPalVaultViewModel/VaultState.swift similarity index 100% rename from Demo/Demo/ViewModels/VaultState.swift rename to Demo/Demo/PayPalVault/PayPalVaultViewModel/VaultState.swift diff --git a/Demo/Demo/ViewModels/VaultViewModel.swift b/Demo/Demo/PayPalVault/PayPalVaultViewModel/VaultViewModel.swift similarity index 100% rename from Demo/Demo/ViewModels/VaultViewModel.swift rename to Demo/Demo/PayPalVault/PayPalVaultViewModel/VaultViewModel.swift diff --git a/Demo/Demo/SwiftUIComponents/PayPalVaultViews/PayPalVaultResultView.swift b/Demo/Demo/PayPalVault/PayPalVaultViews/PayPalVaultResultView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/PayPalVaultViews/PayPalVaultResultView.swift rename to Demo/Demo/PayPalVault/PayPalVaultViews/PayPalVaultResultView.swift diff --git a/Demo/Demo/SwiftUIComponents/PayPalVaultViews/PayPalVaultView.swift b/Demo/Demo/PayPalVault/PayPalVaultViews/PayPalVaultView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/PayPalVaultViews/PayPalVaultView.swift rename to Demo/Demo/PayPalVault/PayPalVaultViews/PayPalVaultView.swift diff --git a/Demo/Demo/SwiftUIComponents/VaultViews/CreatePaymentTokenView.swift b/Demo/Demo/PayPalVault/VaultViews/CreatePaymentTokenView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/VaultViews/CreatePaymentTokenView.swift rename to Demo/Demo/PayPalVault/VaultViews/CreatePaymentTokenView.swift diff --git a/Demo/Demo/SwiftUIComponents/VaultViews/CreateSetupTokenView.swift b/Demo/Demo/PayPalVault/VaultViews/CreateSetupTokenView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/VaultViews/CreateSetupTokenView.swift rename to Demo/Demo/PayPalVault/VaultViews/CreateSetupTokenView.swift diff --git a/Demo/Demo/SwiftUIComponents/VaultViews/PaymentTokenResultView.swift b/Demo/Demo/PayPalVault/VaultViews/PaymentTokenResultView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/VaultViews/PaymentTokenResultView.swift rename to Demo/Demo/PayPalVault/VaultViews/PaymentTokenResultView.swift diff --git a/Demo/Demo/SwiftUIComponents/VaultViews/SetupTokenResultView.swift b/Demo/Demo/PayPalVault/VaultViews/SetupTokenResultView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/VaultViews/SetupTokenResultView.swift rename to Demo/Demo/PayPalVault/VaultViews/SetupTokenResultView.swift diff --git a/Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebButtonsView.swift b/Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebButtonsView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebButtonsView.swift rename to Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebButtonsView.swift diff --git a/Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebCreateOrderView.swift b/Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebCreateOrderView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebCreateOrderView.swift rename to Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebCreateOrderView.swift diff --git a/Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebPaymentsView.swift b/Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebPaymentsView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebPaymentsView.swift rename to Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebPaymentsView.swift diff --git a/Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebResultView.swift b/Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebResultView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebResultView.swift rename to Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebResultView.swift diff --git a/Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebTransactionView.swift b/Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebTransactionView.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebTransactionView.swift rename to Demo/Demo/PayPalWebPayments/PayPalWebPaymentsView/PayPalWebTransactionView.swift diff --git a/Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebViewModel.swift b/Demo/Demo/PayPalWebPayments/PayPalWebViewModel/PayPalWebViewModel.swift similarity index 100% rename from Demo/Demo/SwiftUIComponents/PayPalWebPayments/PayPalWebViewModel.swift rename to Demo/Demo/PayPalWebPayments/PayPalWebViewModel/PayPalWebViewModel.swift From edc5aae6d964b4ff6685a82cc5fd0ed321e71e7b Mon Sep 17 00:00:00 2001 From: "Georgi Malkhasyan (CW)" Date: Tue, 26 Nov 2024 11:12:30 -0800 Subject: [PATCH 2/5] Refactoring --- Demo/Demo.xcodeproj/project.pbxproj | 14 +++++++++++--- .../VaultState.swift | 0 .../VaultViewModel.swift | 0 .../VaultViews/CreatePaymentTokenView.swift | 0 .../VaultViews/CreateSetupTokenView.swift | 0 .../VaultViews/PaymentTokenResultView.swift | 0 .../VaultViews/SetupTokenResultView.swift | 0 7 files changed, 11 insertions(+), 3 deletions(-) rename Demo/Demo/PayPalVault/{PayPalVaultViewModel => VaultViewModel}/VaultState.swift (100%) rename Demo/Demo/PayPalVault/{PayPalVaultViewModel => VaultViewModel}/VaultViewModel.swift (100%) rename Demo/Demo/{PayPalVault => }/VaultViews/CreatePaymentTokenView.swift (100%) rename Demo/Demo/{PayPalVault => }/VaultViews/CreateSetupTokenView.swift (100%) rename Demo/Demo/{PayPalVault => }/VaultViews/PaymentTokenResultView.swift (100%) rename Demo/Demo/{PayPalVault => }/VaultViews/SetupTokenResultView.swift (100%) diff --git a/Demo/Demo.xcodeproj/project.pbxproj b/Demo/Demo.xcodeproj/project.pbxproj index 2a25de72c..3f4e52424 100644 --- a/Demo/Demo.xcodeproj/project.pbxproj +++ b/Demo/Demo.xcodeproj/project.pbxproj @@ -239,8 +239,8 @@ 1001E2B72CF6432F0023A03C /* PayPalVault */ = { isa = PBXGroup; children = ( + 1001E2BE2CF6548E0023A03C /* VaultViewModel */, 1001E2BC2CF644BE0023A03C /* PayPalVaultViewModel */, - 3B2501052B2679F000903EAB /* VaultViews */, 3BB60B512B1F9EE400A298CF /* PayPalVaultViews */, ); path = PayPalVault; @@ -285,8 +285,6 @@ isa = PBXGroup; children = ( 3BB60B542B1FA00C00A298CF /* PayPalVaultViewModel.swift */, - 3BA0A58A2B1E240300330681 /* VaultViewModel.swift */, - 3B2027402A8A72050007907E /* VaultState.swift */, ); path = PayPalVaultViewModel; sourceTree = ""; @@ -299,6 +297,15 @@ path = CardVaultViewModel; sourceTree = ""; }; + 1001E2BE2CF6548E0023A03C /* VaultViewModel */ = { + isa = PBXGroup; + children = ( + 3BA0A58A2B1E240300330681 /* VaultViewModel.swift */, + 3B2027402A8A72050007907E /* VaultState.swift */, + ); + path = VaultViewModel; + sourceTree = ""; + }; 3B2501052B2679F000903EAB /* VaultViews */ = { isa = PBXGroup; children = ( @@ -417,6 +424,7 @@ 1001E2B82CF643350023A03C /* CardPayments */, 1001E2B72CF6432F0023A03C /* PayPalVault */, 1001E2B62CF643270023A03C /* CardVault */, + 3B2501052B2679F000903EAB /* VaultViews */, 806C7A812C000626000E85E8 /* Demo.entitlements */, 806F1E4126B85369007A60E6 /* Assets.xcassets */, BED0422F2710833100C80954 /* Card */, diff --git a/Demo/Demo/PayPalVault/PayPalVaultViewModel/VaultState.swift b/Demo/Demo/PayPalVault/VaultViewModel/VaultState.swift similarity index 100% rename from Demo/Demo/PayPalVault/PayPalVaultViewModel/VaultState.swift rename to Demo/Demo/PayPalVault/VaultViewModel/VaultState.swift diff --git a/Demo/Demo/PayPalVault/PayPalVaultViewModel/VaultViewModel.swift b/Demo/Demo/PayPalVault/VaultViewModel/VaultViewModel.swift similarity index 100% rename from Demo/Demo/PayPalVault/PayPalVaultViewModel/VaultViewModel.swift rename to Demo/Demo/PayPalVault/VaultViewModel/VaultViewModel.swift diff --git a/Demo/Demo/PayPalVault/VaultViews/CreatePaymentTokenView.swift b/Demo/Demo/VaultViews/CreatePaymentTokenView.swift similarity index 100% rename from Demo/Demo/PayPalVault/VaultViews/CreatePaymentTokenView.swift rename to Demo/Demo/VaultViews/CreatePaymentTokenView.swift diff --git a/Demo/Demo/PayPalVault/VaultViews/CreateSetupTokenView.swift b/Demo/Demo/VaultViews/CreateSetupTokenView.swift similarity index 100% rename from Demo/Demo/PayPalVault/VaultViews/CreateSetupTokenView.swift rename to Demo/Demo/VaultViews/CreateSetupTokenView.swift diff --git a/Demo/Demo/PayPalVault/VaultViews/PaymentTokenResultView.swift b/Demo/Demo/VaultViews/PaymentTokenResultView.swift similarity index 100% rename from Demo/Demo/PayPalVault/VaultViews/PaymentTokenResultView.swift rename to Demo/Demo/VaultViews/PaymentTokenResultView.swift diff --git a/Demo/Demo/PayPalVault/VaultViews/SetupTokenResultView.swift b/Demo/Demo/VaultViews/SetupTokenResultView.swift similarity index 100% rename from Demo/Demo/PayPalVault/VaultViews/SetupTokenResultView.swift rename to Demo/Demo/VaultViews/SetupTokenResultView.swift From 325aa7441874220a56e61a8ae9f41ca5c047b28e Mon Sep 17 00:00:00 2001 From: "Georgi Malkhasyan (CW)" Date: Tue, 26 Nov 2024 11:30:20 -0800 Subject: [PATCH 3/5] refactoring --- Demo/Demo.xcodeproj/project.pbxproj | 12 ++++++++++-- .../VaultViewModel/VaultState.swift | 0 .../VaultViewModel/VaultViewModel.swift | 0 .../VaultViews/CreatePaymentTokenView.swift | 0 .../VaultViews/CreateSetupTokenView.swift | 0 .../VaultViews/PaymentTokenResultView.swift | 0 .../VaultViews/SetupTokenResultView.swift | 0 7 files changed, 10 insertions(+), 2 deletions(-) rename Demo/Demo/{PayPalVault => Vault}/VaultViewModel/VaultState.swift (100%) rename Demo/Demo/{PayPalVault => Vault}/VaultViewModel/VaultViewModel.swift (100%) rename Demo/Demo/{ => Vault}/VaultViews/CreatePaymentTokenView.swift (100%) rename Demo/Demo/{ => Vault}/VaultViews/CreateSetupTokenView.swift (100%) rename Demo/Demo/{ => Vault}/VaultViews/PaymentTokenResultView.swift (100%) rename Demo/Demo/{ => Vault}/VaultViews/SetupTokenResultView.swift (100%) diff --git a/Demo/Demo.xcodeproj/project.pbxproj b/Demo/Demo.xcodeproj/project.pbxproj index 3f4e52424..89ce0eb49 100644 --- a/Demo/Demo.xcodeproj/project.pbxproj +++ b/Demo/Demo.xcodeproj/project.pbxproj @@ -239,7 +239,6 @@ 1001E2B72CF6432F0023A03C /* PayPalVault */ = { isa = PBXGroup; children = ( - 1001E2BE2CF6548E0023A03C /* VaultViewModel */, 1001E2BC2CF644BE0023A03C /* PayPalVaultViewModel */, 3BB60B512B1F9EE400A298CF /* PayPalVaultViews */, ); @@ -306,6 +305,15 @@ path = VaultViewModel; sourceTree = ""; }; + 1001E2BF2CF6590E0023A03C /* Vault */ = { + isa = PBXGroup; + children = ( + 1001E2BE2CF6548E0023A03C /* VaultViewModel */, + 3B2501052B2679F000903EAB /* VaultViews */, + ); + path = Vault; + sourceTree = ""; + }; 3B2501052B2679F000903EAB /* VaultViews */ = { isa = PBXGroup; children = ( @@ -420,11 +428,11 @@ 806F1E3726B85367007A60E6 /* Demo */ = { isa = PBXGroup; children = ( + 1001E2BF2CF6590E0023A03C /* Vault */, 1001E2B92CF6433C0023A03C /* PayPalWebPayments */, 1001E2B82CF643350023A03C /* CardPayments */, 1001E2B72CF6432F0023A03C /* PayPalVault */, 1001E2B62CF643270023A03C /* CardVault */, - 3B2501052B2679F000903EAB /* VaultViews */, 806C7A812C000626000E85E8 /* Demo.entitlements */, 806F1E4126B85369007A60E6 /* Assets.xcassets */, BED0422F2710833100C80954 /* Card */, diff --git a/Demo/Demo/PayPalVault/VaultViewModel/VaultState.swift b/Demo/Demo/Vault/VaultViewModel/VaultState.swift similarity index 100% rename from Demo/Demo/PayPalVault/VaultViewModel/VaultState.swift rename to Demo/Demo/Vault/VaultViewModel/VaultState.swift diff --git a/Demo/Demo/PayPalVault/VaultViewModel/VaultViewModel.swift b/Demo/Demo/Vault/VaultViewModel/VaultViewModel.swift similarity index 100% rename from Demo/Demo/PayPalVault/VaultViewModel/VaultViewModel.swift rename to Demo/Demo/Vault/VaultViewModel/VaultViewModel.swift diff --git a/Demo/Demo/VaultViews/CreatePaymentTokenView.swift b/Demo/Demo/Vault/VaultViews/CreatePaymentTokenView.swift similarity index 100% rename from Demo/Demo/VaultViews/CreatePaymentTokenView.swift rename to Demo/Demo/Vault/VaultViews/CreatePaymentTokenView.swift diff --git a/Demo/Demo/VaultViews/CreateSetupTokenView.swift b/Demo/Demo/Vault/VaultViews/CreateSetupTokenView.swift similarity index 100% rename from Demo/Demo/VaultViews/CreateSetupTokenView.swift rename to Demo/Demo/Vault/VaultViews/CreateSetupTokenView.swift diff --git a/Demo/Demo/VaultViews/PaymentTokenResultView.swift b/Demo/Demo/Vault/VaultViews/PaymentTokenResultView.swift similarity index 100% rename from Demo/Demo/VaultViews/PaymentTokenResultView.swift rename to Demo/Demo/Vault/VaultViews/PaymentTokenResultView.swift diff --git a/Demo/Demo/VaultViews/SetupTokenResultView.swift b/Demo/Demo/Vault/VaultViews/SetupTokenResultView.swift similarity index 100% rename from Demo/Demo/VaultViews/SetupTokenResultView.swift rename to Demo/Demo/Vault/VaultViews/SetupTokenResultView.swift From fff5d10b8bf7eb009aa5bea75f994075ed49d122 Mon Sep 17 00:00:00 2001 From: "Georgi Malkhasyan (CW)" Date: Tue, 26 Nov 2024 13:59:54 -0800 Subject: [PATCH 4/5] Refactoring --- Demo/Demo.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Demo/Demo.xcodeproj/project.pbxproj b/Demo/Demo.xcodeproj/project.pbxproj index 89ce0eb49..c79ce16f0 100644 --- a/Demo/Demo.xcodeproj/project.pbxproj +++ b/Demo/Demo.xcodeproj/project.pbxproj @@ -338,13 +338,13 @@ 3BA56FEA2A9DCBB30081D14F /* CardPaymentViews */ = { isa = PBXGroup; children = ( + 3BA56FF32A9DCD790081D14F /* CardPaymentView.swift */, 3BA56FEB2A9DCBF30081D14F /* CreateOrderCardPaymentView.swift */, 3BA56FED2A9DCC340081D14F /* OrderCreateCardResultView.swift */, 3BA56FEF2A9DCCFD0081D14F /* CardOrderApproveView.swift */, 3BA56FF12A9DCD440081D14F /* CardApprovalResultView.swift */, - 3BA56FF32A9DCD790081D14F /* CardPaymentView.swift */, - 3BA56FF52A9E9AAB0081D14F /* CardOrderActionButton.swift */, 3BA56FF72A9FDB5A0081D14F /* CardPaymentOrderCompletionView.swift */, + 3BA56FF52A9E9AAB0081D14F /* CardOrderActionButton.swift */, 3BA56FF92A9FE4180081D14F /* CardOrderCompletionResultView.swift */, ); path = CardPaymentViews; From eb0d3bb13d845f010bbb15ac3bceea80e78186c9 Mon Sep 17 00:00:00 2001 From: "Georgi Malkhasyan (CW)" Date: Tue, 26 Nov 2024 14:54:29 -0800 Subject: [PATCH 5/5] Refactoring --- Demo/Demo.xcodeproj/project.pbxproj | 8 ++++---- .../CardApprovalResultView.swift | 0 .../CardOrderActionButton.swift | 0 .../CardOrderApproveView.swift | 0 .../CardOrderCompletionResultView.swift | 0 .../CardPaymentOrderCompletionView.swift | 0 .../CardPaymentView.swift | 0 .../CreateOrderCardPaymentView.swift | 0 .../OrderCreateCardResultView.swift | 0 9 files changed, 4 insertions(+), 4 deletions(-) rename Demo/Demo/CardPayments/{CardPaymentViews => CardViewComponents}/CardApprovalResultView.swift (100%) rename Demo/Demo/CardPayments/{CardPaymentViews => CardViewComponents}/CardOrderActionButton.swift (100%) rename Demo/Demo/CardPayments/{CardPaymentViews => CardViewComponents}/CardOrderApproveView.swift (100%) rename Demo/Demo/CardPayments/{CardPaymentViews => CardViewComponents}/CardOrderCompletionResultView.swift (100%) rename Demo/Demo/CardPayments/{CardPaymentViews => CardViewComponents}/CardPaymentOrderCompletionView.swift (100%) rename Demo/Demo/CardPayments/{CardPaymentViews => CardViewComponents}/CardPaymentView.swift (100%) rename Demo/Demo/CardPayments/{CardPaymentViews => CardViewComponents}/CreateOrderCardPaymentView.swift (100%) rename Demo/Demo/CardPayments/{CardPaymentViews => CardViewComponents}/OrderCreateCardResultView.swift (100%) diff --git a/Demo/Demo.xcodeproj/project.pbxproj b/Demo/Demo.xcodeproj/project.pbxproj index c79ce16f0..01e44b68e 100644 --- a/Demo/Demo.xcodeproj/project.pbxproj +++ b/Demo/Demo.xcodeproj/project.pbxproj @@ -249,7 +249,7 @@ isa = PBXGroup; children = ( 1001E2BB2CF6449B0023A03C /* CardPaymentViewModel */, - 3BA56FEA2A9DCBB30081D14F /* CardPaymentViews */, + 3BA56FEA2A9DCBB30081D14F /* CardViewComponents */, ); path = CardPayments; sourceTree = ""; @@ -335,7 +335,7 @@ path = CardVaultViews; sourceTree = ""; }; - 3BA56FEA2A9DCBB30081D14F /* CardPaymentViews */ = { + 3BA56FEA2A9DCBB30081D14F /* CardViewComponents */ = { isa = PBXGroup; children = ( 3BA56FF32A9DCD790081D14F /* CardPaymentView.swift */, @@ -347,7 +347,7 @@ 3BA56FF52A9E9AAB0081D14F /* CardOrderActionButton.swift */, 3BA56FF92A9FE4180081D14F /* CardOrderCompletionResultView.swift */, ); - path = CardPaymentViews; + path = CardViewComponents; sourceTree = ""; }; 3BA56FFF2A9FF6630081D14F /* PayPalWebPaymentsView */ = { @@ -430,8 +430,8 @@ children = ( 1001E2BF2CF6590E0023A03C /* Vault */, 1001E2B92CF6433C0023A03C /* PayPalWebPayments */, - 1001E2B82CF643350023A03C /* CardPayments */, 1001E2B72CF6432F0023A03C /* PayPalVault */, + 1001E2B82CF643350023A03C /* CardPayments */, 1001E2B62CF643270023A03C /* CardVault */, 806C7A812C000626000E85E8 /* Demo.entitlements */, 806F1E4126B85369007A60E6 /* Assets.xcassets */, diff --git a/Demo/Demo/CardPayments/CardPaymentViews/CardApprovalResultView.swift b/Demo/Demo/CardPayments/CardViewComponents/CardApprovalResultView.swift similarity index 100% rename from Demo/Demo/CardPayments/CardPaymentViews/CardApprovalResultView.swift rename to Demo/Demo/CardPayments/CardViewComponents/CardApprovalResultView.swift diff --git a/Demo/Demo/CardPayments/CardPaymentViews/CardOrderActionButton.swift b/Demo/Demo/CardPayments/CardViewComponents/CardOrderActionButton.swift similarity index 100% rename from Demo/Demo/CardPayments/CardPaymentViews/CardOrderActionButton.swift rename to Demo/Demo/CardPayments/CardViewComponents/CardOrderActionButton.swift diff --git a/Demo/Demo/CardPayments/CardPaymentViews/CardOrderApproveView.swift b/Demo/Demo/CardPayments/CardViewComponents/CardOrderApproveView.swift similarity index 100% rename from Demo/Demo/CardPayments/CardPaymentViews/CardOrderApproveView.swift rename to Demo/Demo/CardPayments/CardViewComponents/CardOrderApproveView.swift diff --git a/Demo/Demo/CardPayments/CardPaymentViews/CardOrderCompletionResultView.swift b/Demo/Demo/CardPayments/CardViewComponents/CardOrderCompletionResultView.swift similarity index 100% rename from Demo/Demo/CardPayments/CardPaymentViews/CardOrderCompletionResultView.swift rename to Demo/Demo/CardPayments/CardViewComponents/CardOrderCompletionResultView.swift diff --git a/Demo/Demo/CardPayments/CardPaymentViews/CardPaymentOrderCompletionView.swift b/Demo/Demo/CardPayments/CardViewComponents/CardPaymentOrderCompletionView.swift similarity index 100% rename from Demo/Demo/CardPayments/CardPaymentViews/CardPaymentOrderCompletionView.swift rename to Demo/Demo/CardPayments/CardViewComponents/CardPaymentOrderCompletionView.swift diff --git a/Demo/Demo/CardPayments/CardPaymentViews/CardPaymentView.swift b/Demo/Demo/CardPayments/CardViewComponents/CardPaymentView.swift similarity index 100% rename from Demo/Demo/CardPayments/CardPaymentViews/CardPaymentView.swift rename to Demo/Demo/CardPayments/CardViewComponents/CardPaymentView.swift diff --git a/Demo/Demo/CardPayments/CardPaymentViews/CreateOrderCardPaymentView.swift b/Demo/Demo/CardPayments/CardViewComponents/CreateOrderCardPaymentView.swift similarity index 100% rename from Demo/Demo/CardPayments/CardPaymentViews/CreateOrderCardPaymentView.swift rename to Demo/Demo/CardPayments/CardViewComponents/CreateOrderCardPaymentView.swift diff --git a/Demo/Demo/CardPayments/CardPaymentViews/OrderCreateCardResultView.swift b/Demo/Demo/CardPayments/CardViewComponents/OrderCreateCardResultView.swift similarity index 100% rename from Demo/Demo/CardPayments/CardPaymentViews/OrderCreateCardResultView.swift rename to Demo/Demo/CardPayments/CardViewComponents/OrderCreateCardResultView.swift