Mercurial > public > lazybear
changeset 434:277197ce1416
Delete CompanyView and Helpers
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Sun, 20 Jun 2021 12:36:55 +0200 |
parents | 95abeedbad38 |
children | afec807ef076 |
files | LazyBear.xcodeproj/project.pbxproj LazyBear.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate LazyBear/Views/Company/Chart.swift LazyBear/Views/Company/CompanyView.swift LazyBear/Views/Company/Helpers/CompanyHeader.swift LazyBear/Views/Company/Helpers/DatePicker.swift LazyBear/Views/Company/Helpers/InsiderList.swift LazyBear/Views/Company/Helpers/InsiderRow.swift LazyBear/Views/Company/Helpers/NewsRow.swift LazyBear/Views/Company/Helpers/SFSafariViewWrapper.swift LazyBear/Views/Company/Helpers/StatsView.swift LazyBear/Views/Company/Helpers/TransactionList.swift LazyBear/Views/Company/Helpers/TransactionRow.swift LazyBear/Views/Company/Insiders.swift LazyBear/Views/Company/Networking/ChartResponse.swift LazyBear/Views/Company/Networking/Company.swift LazyBear/Views/Company/Networking/InsidersResponse.swift |
diffstat | 17 files changed, 7 insertions(+), 869 deletions(-) [+] |
line wrap: on
line diff
--- a/LazyBear.xcodeproj/project.pbxproj Sat Jun 19 20:40:33 2021 +0200 +++ b/LazyBear.xcodeproj/project.pbxproj Sun Jun 20 12:36:55 2021 +0200 @@ -7,9 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 9502BBF5267F5194003B0A59 /* CompanyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9502BBF4267F5194003B0A59 /* CompanyView.swift */; }; 950857A7266BD12D005357BA /* BetterSafariView in Frameworks */ = {isa = PBXBuildFile; productRef = 950857A6266BD12D005357BA /* BetterSafariView */; }; - 950857A9266BD2C6005357BA /* SFSafariViewWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 950857A8266BD2C6005357BA /* SFSafariViewWrapper.swift */; }; - 950857D1266BE54B005357BA /* InsiderRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 950857D0266BE54B005357BA /* InsiderRow.swift */; }; 950857D3266BE55F005357BA /* RowShape.swift in Sources */ = {isa = PBXBuildFile; fileRef = 950857D2266BE55F005357BA /* RowShape.swift */; }; 950B6F3D267643460029E447 /* Purchases in Frameworks */ = {isa = PBXBuildFile; productRef = 950B6F3C267643460029E447 /* Purchases */; }; 950B6F3F267643640029E447 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 950B6F3E267643640029E447 /* StoreKit.framework */; }; @@ -57,13 +56,8 @@ 9550444926111FC9000E0BCB /* StockRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9550444826111FC9000E0BCB /* StockRow.swift */; }; 955E73392623568F005652FF /* Home.swift in Sources */ = {isa = PBXBuildFile; fileRef = 955E73382623568F005652FF /* Home.swift */; }; 955E733C262356F3005652FF /* HomeResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 955E733B262356F3005652FF /* HomeResponse.swift */; }; - 95602702265ABB440046F97E /* InsidersResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95602701265ABB440046F97E /* InsidersResponse.swift */; }; 95602704265ABB990046F97E /* InsiderRosterModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95602703265ABB990046F97E /* InsiderRosterModel.swift */; }; - 95602706265ABC660046F97E /* Insiders.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95602705265ABC660046F97E /* Insiders.swift */; }; - 95613AD9264FC5A900D4CE8F /* Company.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95613AD8264FC5A900D4CE8F /* Company.swift */; }; - 95613ADD264FC6A200D4CE8F /* ChartResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95613ADC264FC6A200D4CE8F /* ChartResponse.swift */; }; 95613ADF264FC6FD00D4CE8F /* LatestNewsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95613ADE264FC6FD00D4CE8F /* LatestNewsModel.swift */; }; - 95613AE1264FD34100D4CE8F /* NewsRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95613AE0264FD34100D4CE8F /* NewsRow.swift */; }; 9562404C263C766D00C6C511 /* WatchlistCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9562404B263C766D00C6C511 /* WatchlistCreator.swift */; }; 9562404E263C7D8800C6C511 /* WatchlistCreatorClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9562404D263C7D8800C6C511 /* WatchlistCreatorClass.swift */; }; 95629DA02645298E007AF020 /* Profile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95629D9F2645298E007AF020 /* Profile.swift */; }; @@ -91,20 +85,12 @@ 95BB05B22670B8C3005A2029 /* KeyStatsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95BB05B12670B8C3005A2029 /* KeyStatsModel.swift */; }; 95BD2FB326341D36008B6752 /* BlurBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95BD2FB226341D36008B6752 /* BlurBackground.swift */; }; 95C22F3F26776F010014C98A /* CompanyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C22F3E26776F010014C98A /* CompanyModel.swift */; }; - 95C6CCD92670C3BB00E60517 /* StatsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C6CCD82670C3BB00E60517 /* StatsView.swift */; }; 95C8C0E0262A369F0082D1D9 /* ProfileResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C8C0DF262A369F0082D1D9 /* ProfileResponse.swift */; }; 95CCFB56266E7A0F00C384A1 /* InsiderTransactionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95CCFB55266E7A0F00C384A1 /* InsiderTransactionModel.swift */; }; - 95CCFB58266E7F4F00C384A1 /* InsiderList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95CCFB57266E7F4F00C384A1 /* InsiderList.swift */; }; - 95CCFB5A266E841B00C384A1 /* TransactionRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95CCFB59266E841B00C384A1 /* TransactionRow.swift */; }; - 95CCFB5C266E842000C384A1 /* TransactionList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95CCFB5B266E842000C384A1 /* TransactionList.swift */; }; 95CCFB5E266E855800C384A1 /* GetDateComponents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95CCFB5D266E855800C384A1 /* GetDateComponents.swift */; }; 95CCFB60266E864C00C384A1 /* ConvertStringToDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95CCFB5F266E864C00C384A1 /* ConvertStringToDate.swift */; }; 95D308F82624B3A400A39F77 /* CurrencyItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95D308F72624B3A400A39F77 /* CurrencyItem.swift */; }; 95E2DBF82673752F007FCCB4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 95E2DBF72673752F007FCCB4 /* LaunchScreen.storyboard */; }; - 95E31C0D26472CA000106B98 /* CompanyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95E31C0C26472CA000106B98 /* CompanyView.swift */; }; - 95E31C142647363800106B98 /* Chart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95E31C132647363800106B98 /* Chart.swift */; }; - 95E31C16264736BE00106B98 /* DatePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95E31C15264736BE00106B98 /* DatePicker.swift */; }; - 95E31C1826473A4D00106B98 /* CompanyHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95E31C1726473A4D00106B98 /* CompanyHeader.swift */; }; 95E8BAA32656D86E0016AE72 /* RequestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95E8BAA22656D86E0016AE72 /* RequestType.swift */; }; 95FBE0DC2619CA7200440386 /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95FBE0DB2619CA7200440386 /* ProfileView.swift */; }; /* End PBXBuildFile section */ @@ -180,8 +166,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 950857A8266BD2C6005357BA /* SFSafariViewWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SFSafariViewWrapper.swift; sourceTree = "<group>"; }; - 950857D0266BE54B005357BA /* InsiderRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InsiderRow.swift; sourceTree = "<group>"; }; + 9502BBF4267F5194003B0A59 /* CompanyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompanyView.swift; sourceTree = "<group>"; }; 950857D2266BE55F005357BA /* RowShape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RowShape.swift; sourceTree = "<group>"; }; 950B6F3E267643640029E447 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; 950B6F412676454A0029E447 /* RevenueCatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RevenueCatTest.swift; sourceTree = "<group>"; }; @@ -238,13 +223,8 @@ 9550444826111FC9000E0BCB /* StockRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StockRow.swift; sourceTree = "<group>"; }; 955E73382623568F005652FF /* Home.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Home.swift; sourceTree = "<group>"; }; 955E733B262356F3005652FF /* HomeResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeResponse.swift; sourceTree = "<group>"; }; - 95602701265ABB440046F97E /* InsidersResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InsidersResponse.swift; sourceTree = "<group>"; }; 95602703265ABB990046F97E /* InsiderRosterModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InsiderRosterModel.swift; sourceTree = "<group>"; }; - 95602705265ABC660046F97E /* Insiders.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Insiders.swift; sourceTree = "<group>"; }; - 95613AD8264FC5A900D4CE8F /* Company.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Company.swift; sourceTree = "<group>"; }; - 95613ADC264FC6A200D4CE8F /* ChartResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartResponse.swift; sourceTree = "<group>"; }; 95613ADE264FC6FD00D4CE8F /* LatestNewsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LatestNewsModel.swift; sourceTree = "<group>"; }; - 95613AE0264FD34100D4CE8F /* NewsRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsRow.swift; sourceTree = "<group>"; }; 9562404A263C72E800C6C511 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; }; 9562404B263C766D00C6C511 /* WatchlistCreator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchlistCreator.swift; sourceTree = "<group>"; }; 9562404D263C7D8800C6C511 /* WatchlistCreatorClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchlistCreatorClass.swift; sourceTree = "<group>"; }; @@ -274,20 +254,12 @@ 95BB05B12670B8C3005A2029 /* KeyStatsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyStatsModel.swift; sourceTree = "<group>"; }; 95BD2FB226341D36008B6752 /* BlurBackground.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlurBackground.swift; sourceTree = "<group>"; }; 95C22F3E26776F010014C98A /* CompanyModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompanyModel.swift; sourceTree = "<group>"; }; - 95C6CCD82670C3BB00E60517 /* StatsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatsView.swift; sourceTree = "<group>"; }; 95C8C0DF262A369F0082D1D9 /* ProfileResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileResponse.swift; sourceTree = "<group>"; }; 95CCFB55266E7A0F00C384A1 /* InsiderTransactionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InsiderTransactionModel.swift; sourceTree = "<group>"; }; - 95CCFB57266E7F4F00C384A1 /* InsiderList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InsiderList.swift; sourceTree = "<group>"; }; - 95CCFB59266E841B00C384A1 /* TransactionRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionRow.swift; sourceTree = "<group>"; }; - 95CCFB5B266E842000C384A1 /* TransactionList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionList.swift; sourceTree = "<group>"; }; 95CCFB5D266E855800C384A1 /* GetDateComponents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetDateComponents.swift; sourceTree = "<group>"; }; 95CCFB5F266E864C00C384A1 /* ConvertStringToDate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConvertStringToDate.swift; sourceTree = "<group>"; }; 95D308F72624B3A400A39F77 /* CurrencyItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurrencyItem.swift; sourceTree = "<group>"; }; 95E2DBF72673752F007FCCB4 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; }; - 95E31C0C26472CA000106B98 /* CompanyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompanyView.swift; sourceTree = "<group>"; }; - 95E31C132647363800106B98 /* Chart.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Chart.swift; sourceTree = "<group>"; }; - 95E31C15264736BE00106B98 /* DatePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatePicker.swift; sourceTree = "<group>"; }; - 95E31C1726473A4D00106B98 /* CompanyHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompanyHeader.swift; sourceTree = "<group>"; }; 95E8BAA22656D86E0016AE72 /* RequestType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RequestType.swift; sourceTree = "<group>"; }; 95FBE0DB2619CA7200440386 /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = "<group>"; }; /* End PBXFileReference section */ @@ -657,11 +629,9 @@ 95E31C0B26472C8500106B98 /* Company */ = { isa = PBXGroup; children = ( - 95E31C0C26472CA000106B98 /* CompanyView.swift */, - 95E31C132647363800106B98 /* Chart.swift */, - 95602705265ABC660046F97E /* Insiders.swift */, 95E31C0E26472CB600106B98 /* Helpers */, 95E31C0F26472CC000106B98 /* Networking */, + 9502BBF4267F5194003B0A59 /* CompanyView.swift */, ); path = Company; sourceTree = "<group>"; @@ -669,15 +639,6 @@ 95E31C0E26472CB600106B98 /* Helpers */ = { isa = PBXGroup; children = ( - 95E31C1726473A4D00106B98 /* CompanyHeader.swift */, - 95E31C15264736BE00106B98 /* DatePicker.swift */, - 95613AE0264FD34100D4CE8F /* NewsRow.swift */, - 950857A8266BD2C6005357BA /* SFSafariViewWrapper.swift */, - 95CCFB57266E7F4F00C384A1 /* InsiderList.swift */, - 950857D0266BE54B005357BA /* InsiderRow.swift */, - 95CCFB5B266E842000C384A1 /* TransactionList.swift */, - 95CCFB59266E841B00C384A1 /* TransactionRow.swift */, - 95C6CCD82670C3BB00E60517 /* StatsView.swift */, ); path = Helpers; sourceTree = "<group>"; @@ -685,9 +646,6 @@ 95E31C0F26472CC000106B98 /* Networking */ = { isa = PBXGroup; children = ( - 95613AD8264FC5A900D4CE8F /* Company.swift */, - 95613ADC264FC6A200D4CE8F /* ChartResponse.swift */, - 95602701265ABB440046F97E /* InsidersResponse.swift */, ); path = Networking; sourceTree = "<group>"; @@ -1020,28 +978,22 @@ 950C36E3260FB6180081CF53 /* HapticsManager.swift in Sources */, 95FBE0DC2619CA7200440386 /* ProfileView.swift in Sources */, 95131D4B267A15490055C6DE /* WatchlistSheet.swift in Sources */, - 95CCFB5C266E842000C384A1 /* TransactionList.swift in Sources */, - 95613AE1264FD34100D4CE8F /* NewsRow.swift in Sources */, - 95613ADD264FC6A200D4CE8F /* ChartResponse.swift in Sources */, 9550444926111FC9000E0BCB /* StockRow.swift in Sources */, 952FC0B8267C97BA001406B1 /* WatchlistSheetRow.swift in Sources */, 9550444326111E7A000E0BCB /* SectorRow.swift in Sources */, 95123ABE267669C6001BFAF3 /* StockSheetRow.swift in Sources */, - 95613AD9264FC5A900D4CE8F /* Company.swift in Sources */, 9550443A26111B2B000E0BCB /* HomeView.swift in Sources */, 95672B9825DDA54700DCBE4A /* Persistence.swift in Sources */, 95123ABC2676676B001BFAF3 /* CurrencySheetRow.swift in Sources */, - 950857D1266BE54B005357BA /* InsiderRow.swift in Sources */, 95A7C0742616409D003E2EC1 /* ParseJSON.swift in Sources */, 95E8BAA32656D86E0016AE72 /* RequestType.swift in Sources */, 95CCFB56266E7A0F00C384A1 /* InsiderTransactionModel.swift in Sources */, 951566E72613A2B6007C0F36 /* TradingDates.swift in Sources */, + 9502BBF5267F5194003B0A59 /* CompanyView.swift in Sources */, 955E73392623568F005652FF /* Home.swift in Sources */, 95721DA6262761E700EC527B /* CurrencyRow.swift in Sources */, - 95CCFB58266E7F4F00C384A1 /* InsiderList.swift in Sources */, 9562404C263C766D00C6C511 /* WatchlistCreator.swift in Sources */, 95BB05B22670B8C3005A2029 /* KeyStatsModel.swift in Sources */, - 95C6CCD92670C3BB00E60517 /* StatsView.swift in Sources */, 950B6F422676454A0029E447 /* RevenueCatTest.swift in Sources */, 95672B8F25DDA54700DCBE4A /* LazyBearApp.swift in Sources */, 95A7C066261639E0003E2EC1 /* SearchView.swift in Sources */, @@ -1049,23 +1001,16 @@ 950D0E192618AA4900D17AD7 /* CompanyList.swift in Sources */, 952994822629CA46005F0AB0 /* SearchResponse.swift in Sources */, 95A07F6C26305AC6009865AA /* QuoteModel.swift in Sources */, - 95E31C1826473A4D00106B98 /* CompanyHeader.swift in Sources */, 95A07F6226305A9B009865AA /* CurrencyModel.swift in Sources */, 9529947E2629CA3E005F0AB0 /* Search.swift in Sources */, 95613ADF264FC6FD00D4CE8F /* LatestNewsModel.swift in Sources */, 950D0E292618AEC800D17AD7 /* SearchedCompanyItem.swift in Sources */, 955E733C262356F3005652FF /* HomeResponse.swift in Sources */, 95BD2FB326341D36008B6752 /* BlurBackground.swift in Sources */, - 95E31C16264736BE00106B98 /* DatePicker.swift in Sources */, - 95E31C142647363800106B98 /* Chart.swift in Sources */, 951566EA2613A37C007C0F36 /* TradingDatesItem.swift in Sources */, 951490552610BD2B00BDEEB5 /* WelcomeView.swift in Sources */, - 95602702265ABB440046F97E /* InsidersResponse.swift in Sources */, 95D308F82624B3A400A39F77 /* CurrencyItem.swift in Sources */, - 95602706265ABC660046F97E /* Insiders.swift in Sources */, 95131D47267A03020055C6DE /* WatchlistCompany+CoreDataClass.swift in Sources */, - 95E31C0D26472CA000106B98 /* CompanyView.swift in Sources */, - 950857A9266BD2C6005357BA /* SFSafariViewWrapper.swift in Sources */, 95A07F7126305AD5009865AA /* SectorPerformanceModel.swift in Sources */, 9594F0402651355B00CFA8D4 /* HistoricalPricesModel.swift in Sources */, 95123AC026767370001BFAF3 /* StockItem.swift in Sources */, @@ -1077,7 +1022,6 @@ 95123AB826766497001BFAF3 /* CurrencySheet.swift in Sources */, 95AF0FF92671342E0049C4AB /* DisplayWordsModel.swift in Sources */, 95AD4A2D26078C1400498079 /* ContentView.swift in Sources */, - 95CCFB5A266E841B00C384A1 /* TransactionRow.swift in Sources */, 95629DA02645298E007AF020 /* Profile.swift in Sources */, 95CCFB5E266E855800C384A1 /* GetDateComponents.swift in Sources */, 95C22F3F26776F010014C98A /* CompanyModel.swift in Sources */,
Binary file LazyBear.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed
--- a/LazyBear/Views/Company/Chart.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -// -// Chart.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 8/5/21. -// - -import SwiftUI -import StockCharts - -struct Chart: View { - @ObservedObject var company: Company - var symbol: String - var ranges = ["1D", "5D", "1M", "3M", "6M", "1Y", "5Y"] /// DatePicker ranges - - @State private var selectedRange = "3M" /// Selected DatePicker range - @State private var timer = Timer.publish(every: 10, on: .main, in: .common).autoconnect() /// Set recurrent price request - @State private var showingStatistics = false /// Show StatisticsView of the company - - var body: some View { - if company.showChartView { - VStack { - DatePicker(ranges: ranges, selectedRange: $selectedRange) - .onChange(of: selectedRange, perform: { range in - let url = "https://api.lazybear.app/company/chart/symbol=\(symbol)/type=refresh/range=\(range.lowercased())" - company.request(url, .refresh, "chart") - }) - - RoundedRectangle(cornerRadius: 15) - .foregroundColor(Color(.secondarySystemBackground)) - .frame(height: 270) - .overlay( - /* - Show PriceView and Chart - */ - VStack { - HStack { - if let quote = company.chartData.quote![symbol.uppercased()] { - if let latestPrice = quote.latestPrice, let changePercent = quote.changePercent { - HStack(alignment: .center) { - Text("\(latestPrice, specifier: "%.2f")") - .foregroundColor(changePercent < 0 ? .red: .green) - .fontWeight(.semibold) - - Text("\(changePercent * 100, specifier: "%.2f")%") - .foregroundColor(changePercent < 0 ? .red: .green) - .font(.callout) - .fontWeight(.semibold) - } - .padding(.top) - } - } - Spacer() - - if let _ = company.chartData.keyStats { /// Check if keyStats is empty -> Hide button - Button("See stats", action: { showingStatistics = true }) - } - } - .padding([.top, .leading, .trailing]) - - Spacer() - if let historicalPrices = company.chartData.historicalPrices { - let prices = historicalPrices.compactMap { $0.close } - let dates = historicalPrices.compactMap { $0.date } - LineChartView(data: prices, dates: dates, hours: nil, dragGesture: true) - .padding(.bottom) - } - } - ) - - /* - Show latest news - */ - if let latestNews = company.chartData.latestNews { - VStack(spacing: 20) { - ForEach(latestNews, id: \.self) { new in - NewsRow(new: new) - } - } - .padding(.top) - } - } - .sheet(isPresented: $showingStatistics) { - StatsView(keyStats: company.chartData.keyStats!) - } - .onAppear { self.timer = Timer.publish(every: 10, on: .main, in: .common).autoconnect() } // Start timer - .onDisappear { self.timer.upstream.connect().cancel() } /// Stop timer - .onReceive(timer) { _ in - let url = "https://api.lazybear.app/company/chart/symbol=\(symbol)/type=streaming" - company.request(url, .streaming, "chart") } /// Receive timer notification - } else { - ProgressView() - .onAppear { - let url = "https://api.lazybear.app/company/chart/symbol=\(symbol)/type=init" - company.request(url, .initial, "chart") - } - } - } - - /* - Price data is cached, so when the view disappears and appears again in a few seconds, the cached data is shown up. But the date range - is incorrect because, always when this view appears, selectedRange is "3M". - */ - private func checkDateRange() { - - } -} - -struct Chart_Previews: PreviewProvider { - static var previews: some View { - Chart(company: Company(), symbol: "aapl") - } -}
--- a/LazyBear/Views/Company/CompanyView.swift Sat Jun 19 20:40:33 2021 +0200 +++ b/LazyBear/Views/Company/CompanyView.swift Sun Jun 20 12:36:55 2021 +0200 @@ -2,57 +2,19 @@ // CompanyView.swift // LazyBear // -// Created by Dennis Concepción Martín on 8/5/21. +// Created by Dennis Concepción Martín on 20/6/21. // import SwiftUI -import StockCharts struct CompanyView: View { - var symbol: String - @ObservedObject var company = Company() - @State private var showViewSelector = false - - /* - Views - */ - @State private var showChartView = true - @State private var showInsiderView = false - var body: some View { - ScrollView { - VStack { - CompanyHeader(symbol: symbol, showViewSelector: $showViewSelector) - .padding(.bottom) - - if showChartView { - Chart(company: company, symbol: symbol) - } else if showInsiderView { - Insiders(company: company, symbol: symbol) - } - } - .padding() - } - .actionSheet(isPresented: $showViewSelector) { - ActionSheet(title: Text("Select an option"), buttons: [ - .default(Text("Chart & News")) { resetViews(); showChartView = true }, - .default(Text("Insiders")) { resetViews(); showInsiderView = true }, - .cancel() - ]) - } - } - - /* - Hide all views to show the one selected by user - */ - private func resetViews() { - showChartView = false - showInsiderView = false + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) } } struct CompanyView_Previews: PreviewProvider { static var previews: some View { - CompanyView(symbol: "AAPL") + CompanyView() } }
--- a/LazyBear/Views/Company/Helpers/CompanyHeader.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -// -// CompanyHeader.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 8/5/21. -// - -import SwiftUI - -struct CompanyHeader: View { - var symbol: String - @Binding var showViewSelector: Bool - - var body: some View { - HStack { - Text(symbol.uppercased()) - .font(.title) - .fontWeight(.semibold) - - Spacer() - - Button(action: { showViewSelector = true }) { - Text("See more ") - Image(systemName: "chevron.down") - } - } - } -} - -struct CompanyHeader_Previews: PreviewProvider { - static var previews: some View { - CompanyHeader(symbol: "AAPL", showViewSelector: .constant(false)) - } -}
--- a/LazyBear/Views/Company/Helpers/DatePicker.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -// -// DatePicker.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 8/5/21. -// - -import SwiftUI - -struct DatePicker: View { - var ranges: [String] - @Binding var selectedRange: String - - var body: some View { - VStack { - Picker("Please choose a range", selection: $selectedRange) { - ForEach(ranges, id: \.self) { - Text($0) - } - } - .pickerStyle(SegmentedPickerStyle()) - } - } -} - -struct DatePicker_Previews: PreviewProvider { - static var previews: some View { - DatePicker(ranges: ["1D", "5D", "1M", "3M", "6M", "1Y", "5Y"], selectedRange: .constant("3M")) - } -}
--- a/LazyBear/Views/Company/Helpers/InsiderList.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -// -// InsiderList.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 7/6/21. -// - -import SwiftUI - -struct InsiderList: View { - var insiderSummary: [InsiderRosterModel] - @State private var showFullList = false - - var body: some View { - VStack(alignment: .leading) { - HStack { - Text("Top 10 insiders") - .font(.title3) - .fontWeight(.semibold) - - Spacer() - Button("See all", action: { showFullList = true }) - } - - let totalPositions = insiderSummary.map { $0.position ?? 0 }.reduce(0, +) /// Get total shares owned by the top 10 insiders - VStack(alignment: .leading, spacing: 20) { - ForEach(insiderSummary.prefix(3), id: \.self) { insider in - let percentage = Double(insider.position ?? 0) / Double(totalPositions) /// Compute percentage of ownership for each insider - InsiderRow(percentageOfWidth: CGFloat(percentage), insiderRoster: insider) - } - } - } - .sheet(isPresented: $showFullList) { - InsiderFullList(insiderSummary: insiderSummary) - } - } -} - -struct InsiderList_Previews: PreviewProvider { - static var previews: some View { - InsiderList(insiderSummary: - [ - InsiderRosterModel( - entityName: "Dennis Concepcion", - position: 1234, - reportDate: 1234567 - ) - ] - ) - } -} - -struct InsiderFullList: View { - var insiderSummary: [InsiderRosterModel] - @Environment(\.presentationMode) private var insiderFullListPresentation - - var body: some View { - NavigationView { - ScrollView { - let totalPositions = insiderSummary.map { $0.position ?? 0 }.reduce(0, +) /// Get total shares owned by the top 10 insiders - VStack(alignment: .leading, spacing: 20) { - ForEach(insiderSummary, id: \.self) { insider in - let percentage = Double(insider.position ?? 0) / Double(totalPositions) /// Compute percentage of ownership for each insider - InsiderRow(percentageOfWidth: CGFloat(percentage), insiderRoster: insider) - } - } - .padding() - } - .navigationTitle("Top 10 insiders") - .navigationBarTitleDisplayMode(.inline) - .toolbar { - ToolbarItem(placement: .navigationBarLeading) { - Button(action: { insiderFullListPresentation.wrappedValue.dismiss() }) { - Image(systemName: "multiply") - .imageScale(.large) - } - } - } - } - } -}
--- a/LazyBear/Views/Company/Helpers/InsiderRow.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -// -// InsiderRow.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 5/6/21. -// - -import SwiftUI -import StockCharts - -struct InsiderRow: View { - var percentageOfWidth: CGFloat - var insiderRoster: InsiderRosterModel - - var body: some View { - RowShape() - .frame(height: 105) - .overlay( - VStack(alignment: .leading) { - Text(insiderRoster.entityName.capitalized) - .lineLimit(1) - .font(.headline) - - Text("Last updated: \(convertEpoch(insiderRoster.reportDate, false))") - .opacity(0.5) - .font(.subheadline) - - HStack { - Spacer() - Text("\(insiderRoster.position ?? 0) shares owned") - .font(.caption) - .opacity(0.5) - } - - CapsuleChartView(percentageOfWidth: percentageOfWidth) - } - .padding() - ,alignment: .leading - ) - } -} - -struct InsiderRow_Previews: PreviewProvider { - static var previews: some View { - InsiderRow( - percentageOfWidth: 0.6, - insiderRoster: - InsiderRosterModel( - entityName: "Dennis Concepcion", - position: 1230, - reportDate: 1234567 - ) - ) - } -}
--- a/LazyBear/Views/Company/Helpers/NewsRow.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -// -// NewsRow.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 15/5/21. -// - -import SwiftUI - -struct NewsRow: View { - var new: LatestNewsModel - @State private var showingSafariView = false - - var body: some View { - Button(action: { showingSafariView = true }) { - RowShape() - .frame(height: 140) - .overlay( - HStack { - VStack(alignment: .leading) { - Text(new.source.uppercased()) - .font(.caption) - .opacity(0.5) - - Text(new.headline) - .font(.headline) - - Text(new.summary) - .opacity(0.5) - .font(.subheadline) - .lineLimit(1) - .padding(.bottom, 5) - - let humanDate = convertEpoch(new.datetime, true) - Text("\(humanDate) ago") - .font(.caption2) - .opacity(0.5) - - } - .padding() - - Spacer() - Image(systemName: "chevron.right") - .imageScale(.large) - .opacity(0.5) - .padding() - } - ,alignment: .leading - ) - } - .buttonStyle(PlainButtonStyle()) - .sheet(isPresented: $showingSafariView) { - SFSafariViewWrapper(url: URL(string: new.url)!) - } - } -} - -struct NewsRow_Previews: PreviewProvider { - static var previews: some View { - NewsRow(new: LatestNewsModel( - datetime: 1621037430000, - headline: "Chaos Monkeys' author calls Apple's statement on his departure defamatory", - image: "https://cloud.iexapis.com/v1/news/image/99abeb99-6d9e-47c8-ae7b-53404eacccec", - source: "Investing.com", - summary: "https://www.investing.com/news/stock-market-news", - url: "https://cloud.iexapis.com/v1/news/article/99abeb99-6d9e-47c8-ae7b-53404eacccec")) - } -}
--- a/LazyBear/Views/Company/Helpers/SFSafariViewWrapper.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -// -// SFSafariViewWrapper.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 5/6/21. -// - -import SwiftUI -import SafariServices - -struct SFSafariViewWrapper: UIViewControllerRepresentable { - let url: URL - func makeUIViewController(context: UIViewControllerRepresentableContext<Self>) -> SFSafariViewController { - return SFSafariViewController(url: url) - } - func updateUIViewController(_ uiViewController: SFSafariViewController, context: UIViewControllerRepresentableContext<SFSafariViewWrapper>) { - return - } -}
--- a/LazyBear/Views/Company/Helpers/StatsView.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -// -// StatsView.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 9/6/21. -// - -import SwiftUI - -struct StatsView: View { - var keyStats: KeyStatsModel - - @Environment(\.presentationMode) private var statsPresentation - - let displayWords: DisplayWordsModel = parseJSON("DisplayWords.json") - - var body: some View { - NavigationView { - Form { - let mirror = Mirror(reflecting: keyStats) - ForEach(Array(mirror.children), id: \.label) { child in /// Iterate over each variable within the class - if let unwrappedValue = unwrapAnyOptional(value: child.value) { - HStack { - let label = String(child.label!) - Text("\(displayWords.keyStats[label]!):") - .font(.callout) - .fontWeight(.semibold) - - Spacer() - Text(unwrappedValue) - .font(.callout) - .lineLimit(1) - } - } - } - } - .navigationTitle("Key statistics") - .navigationBarTitleDisplayMode(.inline) - .toolbar { - ToolbarItem(placement: .navigationBarLeading) { - Button(action: { statsPresentation.wrappedValue.dismiss() }) { - Image(systemName: "multiply") - .imageScale(.large) - } - } - } - } - } - - /* - Unwrap optional Int, Double, String into String - */ - private func unwrapAnyOptional(value: Any) -> String? { - if let value = value as? Int { - return "\(value)" - } else if let value = value as? Double { - return String(format: "%.3f", value) - } else { - return value as? String - } - } -} - - -struct StatsView_Previews: PreviewProvider { - static var previews: some View { - StatsView(keyStats: - KeyStatsModel( - companyName: "Apple inc", - employees: 123, - marketcap: 123, - float: 123, - sharesOutstanding: 123, - beta: 123.12, - peRatio: 123.4, - dividendYield: 123.4, - ttmDividendRate: 123.4, - ttmEPS: 123.4, - avg10Volume: 123, - avg30Volume: 123, - day50MovingAvg: 123.4, - day200MovingAvg: 123.4, - week52Change: 123.4, - week52High: 123.4, - week52Low: 123.4, - week52HighSplitAdjustOnly: 123.4, - week52LowSplitAdjustOnly: 123.4, - maxChangePercent: 123.4, - ytdChangePercent: 123.4, - day5ChangePercent: 123.4, - day30ChangePercent: 123.4, - month1ChangePercent: 123.4, - month3ChangePercent: 123.4, - month6ChangePercent: 123.4, - year1ChangePercent: 123.4, - year2ChangePercent: 123.4, - year5ChangePercent: 123.4, - exDividendDate: "2020-01-01", - nextDividendDate: "2020-01-01", - nextEarningsDate: "2020-01-01" - ) - ) - } -}
--- a/LazyBear/Views/Company/Helpers/TransactionList.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -// -// TransactionList.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 7/6/21. -// - -import SwiftUI - -struct TransactionList: View { - var transactions: [InsiderTransactionModel] - - @State private var showFullList = false - - var body: some View { - VStack(alignment: .leading) { - HStack { - Text("Latest transactions") - .font(.title3) - .fontWeight(.semibold) - - Spacer() - Button("See all", action: { showFullList = true }) - } - - VStack(alignment: .leading, spacing: 20) { - ForEach(transactions.prefix(3), id: \.self) { transaction in - TransactionRow(transaction: transaction) - } - } - } - .sheet(isPresented: $showFullList) { - TransactionFullList(transactions: transactions) - } - } -} - -struct TransactionList_Previews: PreviewProvider { - static var previews: some View { - TransactionList(transactions: - [ - InsiderTransactionModel( - filingDate: "2020-01-01", - fullName: "Dennis Concepcion", - postShares: 1234, - reportedTitle: "Director", - transactionCode: "S", - transactionPrice: 20.08, - transactionShares: 12345, - transactionValue: 1234567.0 - ) - ] - ) - } -} - -struct TransactionFullList: View { - var transactions: [InsiderTransactionModel] - @Environment(\.presentationMode) private var transactionFullListPresentation - - var body: some View { - NavigationView { - ScrollView { - VStack(alignment: .leading, spacing: 20) { - ForEach(transactions, id: \.self) { transaction in - TransactionRow(transaction: transaction) - } - } - .padding() - } - .navigationTitle("Latest transactions") - .navigationBarTitleDisplayMode(.inline) - .toolbar { - ToolbarItem(placement: .navigationBarLeading) { - Button(action: { transactionFullListPresentation.wrappedValue.dismiss() }) { - Image(systemName: "multiply") - .imageScale(.large) - } - } - } - } - } -}
--- a/LazyBear/Views/Company/Helpers/TransactionRow.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -// -// TransactionRow.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 7/6/21. -// - -import SwiftUI - -struct TransactionRow: View { - var transaction: InsiderTransactionModel - - var body: some View { - RowShape() - .frame(height: 105) - .overlay( - HStack { - VStack { - let date = convertStringToDate(transaction.filingDate) - Text(getDateComponents(.month, date)) - .fontWeight(.semibold) - - Text(getDateComponents(.day, date)) - .font(.title) - .fontWeight(.semibold) - .foregroundColor(Color(.systemBlue)) - - Text(getDateComponents(.year, date)) - .font(.caption) - .fontWeight(.semibold) - } - .padding(.trailing) - - VStack(alignment: .leading) { - Text(transaction.fullName.capitalized) - .lineLimit(1) - .font(.headline) - - Text(transaction.reportedTitle?.capitalized ?? "-") - } - - Spacer() - if let transactionShares = transaction.transactionShares { - VStack(alignment: .trailing) { - Text("\(transactionShares)") - .foregroundColor(transactionShares < 0 ? Color(.systemRed): Color(.systemGreen)) - } - .padding(.leading) - } - } - .padding() - ) - } -} - -struct TransactionRow_Previews: PreviewProvider { - static var previews: some View { - TransactionRow(transaction: - InsiderTransactionModel( - filingDate: "2020-01-01", - fullName: "Dennis Concepcion", - postShares: 1234, - reportedTitle: "Director", - transactionCode: "S", - transactionPrice: 20.08, - transactionShares: 12345, - transactionValue: 1234567.0 - ) - ) - } -}
--- a/LazyBear/Views/Company/Insiders.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -// -// Insiders.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 23/5/21. -// - -import SwiftUI - -struct Insiders: View { - @ObservedObject var company: Company - var symbol: String - - var body: some View { - if company.showInsidersView { - VStack { - if let insiderSummary = company.insidersData.insiderRoster { - InsiderList(insiderSummary: insiderSummary) - .padding(.bottom) - } - - if let transactions = company.insidersData.insiderTransactions { - TransactionList(transactions: transactions) - } - } - } else { - ProgressView() - .onAppear { - let url = "https://api.lazybear.app/company/insiders/symbol=\(symbol)" - company.request(url, .initial, "insider") - } - } - } -} - -struct Insiders_Previews: PreviewProvider { - static var previews: some View { - Insiders(company: Company(), symbol: "aapl") - } -}
--- a/LazyBear/Views/Company/Networking/ChartResponse.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -// -// ChartResponse.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 15/5/21. -// - -import SwiftUI - -struct ChartResponse: Codable { - var historicalPrices: [HistoricalPricesModel]? - var quote: [String: QuoteModel]? - var latestNews: [LatestNewsModel]? - var keyStats: KeyStatsModel? -} -
--- a/LazyBear/Views/Company/Networking/Company.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -// -// Company.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 15/5/21. -// - -import SwiftUI -import Bazooka - -class Company: ObservableObject { - @Published var showChartView = false - @Published var chartData = ChartResponse() - - @Published var showInsidersView = false - @Published var insidersData = InsidersResponse() - - func request(_ url: String, _ requestType: RequestType, _ view: String) { - let bazooka = Bazooka() - if view == "chart" { - bazooka.request(url: url, model: ChartResponse.self) { response in - switch requestType { - case .initial: - self.chartData = response - case .refresh: - self.chartData.historicalPrices = response.historicalPrices - case .streaming: - self.chartData.quote = response.quote - } - - self.showChartView = true - } - } else if view == "insider" { - bazooka.request(url: url, model: InsidersResponse.self) { response in - self.insidersData = response - - self.showInsidersView = true - } - } - } -}
--- a/LazyBear/Views/Company/Networking/InsidersResponse.swift Sat Jun 19 20:40:33 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -// -// InsidersResponse.swift -// LazyBear -// -// Created by Dennis Concepción Martín on 23/5/21. -// - -import SwiftUI - -struct InsidersResponse: Codable { - var insiderRoster: [InsiderRosterModel]? - var insiderTransactions: [InsiderTransactionModel]? -}