From 3d4acf1484b9f42febb53e562497c982ba3355db Mon Sep 17 00:00:00 2001 From: Gk40002148 Date: Wed, 13 Apr 2022 16:02:44 +0900 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=82=BD=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AgileWorks.xcodeproj/project.pbxproj | 156 ---- .../App/Base.lproj/LaunchScreen.storyboard | 6 +- .../AgileWorks/Form/Builder/FormBuilder.swift | 35 - AgileWorks/AgileWorks/Form/Entity/Navi.swift | 72 -- .../View/Cell/ModalCollectionViewCell.swift | 216 ----- .../View/FormWebViewController.storyboard | 75 -- .../Form/View/FormWebViewController.swift | 824 ------------------ .../FormWebViewScriptMessageHandler.swift | 84 -- ...dalFullCollectionViewController.storyboard | 93 -- .../ModalFullCollectionViewController.swift | 112 --- .../View/SubWebView/SubWebViewStack.swift | 62 -- .../Form/View/WebViewHistoryStack.swift | 71 -- .../Strings/Chinese-Simplified.strings | 77 +- .../Strings/Chinese-Traditional.strings | 77 +- AgileWorks/AgileWorks/Strings/English.strings | 77 +- .../AgileWorks/Strings/Japanese.strings | 77 +- .../Strings/en.lproj/Localizable.strings | 77 +- .../Strings/ja.lproj/Localizable.strings | 77 +- .../Strings/zh-Hans.lproj/Localizable.strings | 77 +- .../Strings/zh-Hant.lproj/Localizable.strings | 77 +- .../Common/Entity/ApprovalResponse.swift | 47 - .../Common/Entity/DocumentResponse.swift | 46 - AgileWorks/Common/Entity/SearchRequest.swift | 21 - AgileWorks/Common/Entity/SearchResponse.swift | 60 -- .../Common/Entity/ServiceInfoResponse.swift | 18 - .../Common/Entity/SubmissionResponse.swift | 43 - .../Entity/WfActionResponse.swipt.swift | 20 - AgileWorks/Common/Utility/NumberUtility.swift | 2 - .../WebClient/GetApprovalsIDEndpoint.swift | 58 -- .../WebClient/GetDocumentInfoEndpoint.swift | 53 -- .../WebClient/GetServiceInfoEndpoint.swift | 33 - .../WebClient/GetSubmissionsEndpoint.swift | 41 - .../WebClient/GetSubmissionsIDEndpoint.swift | 49 -- .../WebClient/PostSearchItemEndpoint.swift | 61 -- .../WebClient/PostWfActionEndpoint.swift | 53 -- AgileWorks/Common/WebClient/Session.swift | 2 +- AgileWorks/Common/WfAction.swift | 40 - 37 files changed, 36 insertions(+), 3033 deletions(-) delete mode 100644 AgileWorks/AgileWorks/Form/Builder/FormBuilder.swift delete mode 100644 AgileWorks/AgileWorks/Form/Entity/Navi.swift delete mode 100644 AgileWorks/AgileWorks/Form/View/Cell/ModalCollectionViewCell.swift delete mode 100644 AgileWorks/AgileWorks/Form/View/FormWebViewController.storyboard delete mode 100644 AgileWorks/AgileWorks/Form/View/FormWebViewController.swift delete mode 100644 AgileWorks/AgileWorks/Form/View/FormWebViewScriptMessageHandler.swift delete mode 100644 AgileWorks/AgileWorks/Form/View/ModalFullCollectionViewController.storyboard delete mode 100644 AgileWorks/AgileWorks/Form/View/ModalFullCollectionViewController.swift delete mode 100644 AgileWorks/AgileWorks/Form/View/SubWebView/SubWebViewStack.swift delete mode 100644 AgileWorks/AgileWorks/Form/View/WebViewHistoryStack.swift delete mode 100644 AgileWorks/Common/Entity/DocumentResponse.swift delete mode 100644 AgileWorks/Common/Entity/SearchRequest.swift delete mode 100644 AgileWorks/Common/Entity/SearchResponse.swift delete mode 100644 AgileWorks/Common/Entity/ServiceInfoResponse.swift delete mode 100644 AgileWorks/Common/Entity/SubmissionResponse.swift delete mode 100644 AgileWorks/Common/Entity/WfActionResponse.swipt.swift delete mode 100644 AgileWorks/Common/WebClient/GetApprovalsIDEndpoint.swift delete mode 100644 AgileWorks/Common/WebClient/GetDocumentInfoEndpoint.swift delete mode 100644 AgileWorks/Common/WebClient/GetServiceInfoEndpoint.swift delete mode 100644 AgileWorks/Common/WebClient/GetSubmissionsEndpoint.swift delete mode 100644 AgileWorks/Common/WebClient/GetSubmissionsIDEndpoint.swift delete mode 100644 AgileWorks/Common/WebClient/PostSearchItemEndpoint.swift delete mode 100644 AgileWorks/Common/WebClient/PostWfActionEndpoint.swift delete mode 100644 AgileWorks/Common/WfAction.swift diff --git a/AgileWorks/AgileWorks.xcodeproj/project.pbxproj b/AgileWorks/AgileWorks.xcodeproj/project.pbxproj index 34a87a3..e6f9caf 100644 --- a/AgileWorks/AgileWorks.xcodeproj/project.pbxproj +++ b/AgileWorks/AgileWorks.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 31253D962417A56200525DB6 /* FormWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31253D952417A56200525DB6 /* FormWebViewController.swift */; }; 3127EE0C241A2A9500535CC7 /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3127EE0B241A2A9500535CC7 /* NotificationCenter.framework */; }; 3127EE0F241A2A9500535CC7 /* TodayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3127EE0E241A2A9500535CC7 /* TodayViewController.swift */; }; 3127EE12241A2A9500535CC7 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3127EE10241A2A9500535CC7 /* MainInterface.storyboard */; }; @@ -15,13 +14,6 @@ 3127EE1B241A2B4D00535CC7 /* TodayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3127EE0E241A2A9500535CC7 /* TodayViewController.swift */; }; 31AA002F24347BBD000177B4 /* ApprovalResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31AA002E24347BBD000177B4 /* ApprovalResponse.swift */; }; 31AA003024347BD1000177B4 /* ApprovalResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31AA002E24347BBD000177B4 /* ApprovalResponse.swift */; }; - 31AA003224347C98000177B4 /* SubmissionResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31AA003124347C98000177B4 /* SubmissionResponse.swift */; }; - 3A1F7CA424A9FDB3006800F2 /* ModalCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1F7CA324A9FDB3006800F2 /* ModalCollectionViewCell.swift */; }; - 3A1F975224AF2D0000AE6A42 /* ModalFullCollectionViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3A1F975124AF2D0000AE6A42 /* ModalFullCollectionViewController.storyboard */; }; - 3A1F975424AF2D6700AE6A42 /* ModalFullCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1F975324AF2D6700AE6A42 /* ModalFullCollectionViewController.swift */; }; - 3AA9579C2463AB2700AD05DC /* PostSearchItemEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA9579B2463AB2700AD05DC /* PostSearchItemEndpoint.swift */; }; - 3AA9579E2463B14700AD05DC /* SearchRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA9579D2463B14700AD05DC /* SearchRequest.swift */; }; - 3AED7EE42449387600FC6BCC /* SearchResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AED7EE32449387600FC6BCC /* SearchResponse.swift */; }; 3AF4A84524A06A73006C0C0A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3AF4A84724A06A73006C0C0A /* Localizable.strings */; }; 430C967B2E966FC047726763 /* Pods_All_AgileWorks.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CF516C40B9AA44C977664C98 /* Pods_All_AgileWorks.framework */; }; 7549FC8F27EAF42C00FF9E0C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3AF4A84724A06A73006C0C0A /* Localizable.strings */; }; @@ -95,24 +87,10 @@ 76AE530725D3652400AFA45A /* LicenseViewBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76AE530625D3652400AFA45A /* LicenseViewBuilder.swift */; }; 76AE533325D37B0200AFA45A /* LicenseViewPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76AE533225D37B0200AFA45A /* LicenseViewPresenter.swift */; }; 76C4996C24E5097200759B93 /* GoogleService-Info-Production.plist in Resources */ = {isa = PBXBuildFile; fileRef = 76C4996B24E5097200759B93 /* GoogleService-Info-Production.plist */; }; - 76C7AA02250B05CA000A0FE6 /* SubWebViewStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C7AA01250B05CA000A0FE6 /* SubWebViewStack.swift */; }; - 76CEA0542511A36E0074837A /* WfAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76CEA0532511A36E0074837A /* WfAction.swift */; }; - 76CEA0582511D1930074837A /* PostWfActionEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76CEA0572511D1930074837A /* PostWfActionEndpoint.swift */; }; - 76CEA05A2511D2EC0074837A /* WfActionResponse.swipt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76CEA0592511D2EC0074837A /* WfActionResponse.swipt.swift */; }; - 76D1C0DF25E38D0A004DF611 /* GetServiceInfoEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D1C0DE25E38D0A004DF611 /* GetServiceInfoEndpoint.swift */; }; - 76D1C0E425E38D9A004DF611 /* ServiceInfoResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D1C0E325E38D9A004DF611 /* ServiceInfoResponse.swift */; }; - 76D1DBCA258C636F00429C70 /* WebViewHistoryStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D1DBC9258C636F00429C70 /* WebViewHistoryStack.swift */; }; - 76D1DC152592FC5200429C70 /* DocumentResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D1DC142592FC5200429C70 /* DocumentResponse.swift */; }; - 76D1DC1E2592FE3400429C70 /* GetDocumentInfoEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D1DC1D2592FE3400429C70 /* GetDocumentInfoEndpoint.swift */; }; - 76F9B9452505FAA600BD2EBA /* FormWebViewScriptMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76F9B9442505FAA600BD2EBA /* FormWebViewScriptMessageHandler.swift */; }; 85X3ZXEG18PWU7J17GNGF3UG /* SplashPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = QQXONSL81W6HCI8POLPRBWGB /* SplashPresenter.swift */; }; BD0231F0242B698C000A95BB /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD5061B3242866780014F3FA /* Configuration.swift */; }; - BD1367672444279900767222 /* SubmissionResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31AA003124347C98000177B4 /* SubmissionResponse.swift */; }; BD136768244427AC00767222 /* APIResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD86A6B024067EB3007B48F1 /* APIResult.swift */; }; BD136769244427BB00767222 /* GetSessionEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAB1F70240D0E5C00EA15FD /* GetSessionEndpoint.swift */; }; - BD13676A244427C000767222 /* GetApprovalsIDEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD904169243B35E1009D0B19 /* GetApprovalsIDEndpoint.swift */; }; - BD13676B244427C300767222 /* GetSubmissionsEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD904171243B544D009D0B19 /* GetSubmissionsEndpoint.swift */; }; - BD13676C244427C600767222 /* GetSubmissionsIDEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD904173243B5507009D0B19 /* GetSubmissionsIDEndpoint.swift */; }; BD1B50DD244DABF900783FB5 /* OAuthService.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD72589E240E69E000928CE9 /* OAuthService.swift */; }; BD25F853242A05510014B726 /* Session.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD25F852242A05510014B726 /* Session.swift */; }; BD3E90822474D56100B449A7 /* WKWebViewExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD3E90812474D56100B449A7 /* WKWebViewExtensions.swift */; }; @@ -125,7 +103,6 @@ BD6C1AED24A480C70057756F /* DeviceService.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD6C1AEC24A480C70057756F /* DeviceService.swift */; }; BD6DE26F24D1079700C1479E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3AF4A84724A06A73006C0C0A /* Localizable.strings */; }; BD71FA3E24C140F900C054C9 /* MainTabBarViewBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD71FA3D24C140F900C054C9 /* MainTabBarViewBuilder.swift */; }; - BD71FA4B24C15FEE00C054C9 /* FormBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD71FA4A24C15FEE00C054C9 /* FormBuilder.swift */; }; BD72589F240E69E000928CE9 /* OAuthService.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD72589E240E69E000928CE9 /* OAuthService.swift */; }; BD774CA824A4A13F002156A1 /* Notification.NameExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD774CA724A4A13F002156A1 /* Notification.NameExtensions.swift */; }; BD7A8007241A16B90040B418 /* DeepLinkParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7A8004241A16B80040B418 /* DeepLinkParser.swift */; }; @@ -133,10 +110,8 @@ BD7A8009241A16B90040B418 /* NotificationParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7A8006241A16B80040B418 /* NotificationParser.swift */; }; BD7DC0F224C0608800C3FBED /* ErrorResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7DC0F124C0608800C3FBED /* ErrorResponse.swift */; }; BD7DC0F324C061EA00C3FBED /* ErrorResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7DC0F124C0608800C3FBED /* ErrorResponse.swift */; }; - BD7E623F247611CC0089CFA6 /* Navi.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7E623E247611CC0089CFA6 /* Navi.swift */; }; BD86A6B124067EB3007B48F1 /* APIResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD86A6B024067EB3007B48F1 /* APIResult.swift */; }; BD8D55D92420609000A667B0 /* XCGLoggerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD8D55D82420609000A667B0 /* XCGLoggerExtensions.swift */; }; - BD917FD82473C800005D2437 /* FormWebViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD917FD72473C800005D2437 /* FormWebViewController.storyboard */; }; BD928CCE2407500400ED04C2 /* UserDefaultsDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD928CCD2407500400ED04C2 /* UserDefaultsDataStore.swift */; }; BD969631240C9CD400521925 /* SessionInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD969630240C9CD400521925 /* SessionInfo.swift */; }; BD9D569F24AF14AB00C73B33 /* NotificationData.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD9D569E24AF14AB00C73B33 /* NotificationData.swift */; }; @@ -158,9 +133,6 @@ BDAB1F6F240D0D1400EA15FD /* APIEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAB1F6E240D0D1400EA15FD /* APIEndpoint.swift */; }; BDAB1F71240D0E5C00EA15FD /* GetSessionEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAB1F70240D0E5C00EA15FD /* GetSessionEndpoint.swift */; }; BDBBF838243C9EA300EEB25D /* GetApprovalsEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD904167243B2994009D0B19 /* GetApprovalsEndpoint.swift */; }; - BDBBF839243C9EA600EEB25D /* GetApprovalsIDEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD904169243B35E1009D0B19 /* GetApprovalsIDEndpoint.swift */; }; - BDBBF83A243C9EA900EEB25D /* GetSubmissionsEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD904171243B544D009D0B19 /* GetSubmissionsEndpoint.swift */; }; - BDBBF83B243C9EAB00EEB25D /* GetSubmissionsIDEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD904173243B5507009D0B19 /* GetSubmissionsIDEndpoint.swift */; }; BDBBF83C243CAB2900EEB25D /* UserDefaultsDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD928CCD2407500400ED04C2 /* UserDefaultsDataStore.swift */; }; BDBBF83D243CAB3300EEB25D /* GetApprovalsEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD904167243B2994009D0B19 /* GetApprovalsEndpoint.swift */; }; BDBBF83E243CAB3600EEB25D /* Session.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD25F852242A05510014B726 /* Session.swift */; }; @@ -245,27 +217,17 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 31253D952417A56200525DB6 /* FormWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormWebViewController.swift; sourceTree = ""; }; 3127EE0A241A2A9500535CC7 /* TodayExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = TodayExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 3127EE0B241A2A9500535CC7 /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; }; 3127EE0E241A2A9500535CC7 /* TodayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayViewController.swift; sourceTree = ""; }; 3127EE11241A2A9500535CC7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; 3127EE13241A2A9500535CC7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 31AA002E24347BBD000177B4 /* ApprovalResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApprovalResponse.swift; sourceTree = ""; }; - 31AA003124347C98000177B4 /* SubmissionResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubmissionResponse.swift; sourceTree = ""; }; - 3A1F7CA324A9FDB3006800F2 /* ModalCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalCollectionViewCell.swift; sourceTree = ""; }; - 3A1F975124AF2D0000AE6A42 /* ModalFullCollectionViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = ModalFullCollectionViewController.storyboard; sourceTree = ""; }; - 3A1F975324AF2D6700AE6A42 /* ModalFullCollectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalFullCollectionViewController.swift; sourceTree = ""; }; - 3AA9579B2463AB2700AD05DC /* PostSearchItemEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostSearchItemEndpoint.swift; sourceTree = ""; }; - 3AA9579D2463B14700AD05DC /* SearchRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchRequest.swift; sourceTree = ""; }; - 3AED7EE32449387600FC6BCC /* SearchResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResponse.swift; sourceTree = ""; }; 3AF4A84624A06A73006C0C0A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 3AF4A84824A06AD0006C0C0A /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; 7503F77D27EAF7E00074A76E /* WidgetExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = WidgetExtension.entitlements; sourceTree = ""; }; - 75917F8F27BD315A0051E201 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = ""; }; 75917F9027BD315A0051E201 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/MainInterface.strings"; sourceTree = ""; }; 75917F9227BD315A0051E201 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; - 75917F9327BD317D0051E201 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/LaunchScreen.strings"; sourceTree = ""; }; 75917F9427BD317D0051E201 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/MainInterface.strings"; sourceTree = ""; }; 75917F9627BD317E0051E201 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Localizable.strings"; sourceTree = ""; }; 75917F9B27BDF0F10051E201 /* Japanese.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = Japanese.strings; sourceTree = ""; }; @@ -302,16 +264,6 @@ 76AE530625D3652400AFA45A /* LicenseViewBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicenseViewBuilder.swift; sourceTree = ""; }; 76AE533225D37B0200AFA45A /* LicenseViewPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicenseViewPresenter.swift; sourceTree = ""; }; 76C4996B24E5097200759B93 /* GoogleService-Info-Production.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info-Production.plist"; sourceTree = ""; }; - 76C7AA01250B05CA000A0FE6 /* SubWebViewStack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubWebViewStack.swift; sourceTree = ""; }; - 76CEA0532511A36E0074837A /* WfAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WfAction.swift; sourceTree = ""; }; - 76CEA0572511D1930074837A /* PostWfActionEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostWfActionEndpoint.swift; sourceTree = ""; }; - 76CEA0592511D2EC0074837A /* WfActionResponse.swipt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WfActionResponse.swipt.swift; sourceTree = ""; }; - 76D1C0DE25E38D0A004DF611 /* GetServiceInfoEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetServiceInfoEndpoint.swift; sourceTree = ""; }; - 76D1C0E325E38D9A004DF611 /* ServiceInfoResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceInfoResponse.swift; sourceTree = ""; }; - 76D1DBC9258C636F00429C70 /* WebViewHistoryStack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewHistoryStack.swift; sourceTree = ""; }; - 76D1DC142592FC5200429C70 /* DocumentResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentResponse.swift; sourceTree = ""; }; - 76D1DC1D2592FE3400429C70 /* GetDocumentInfoEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetDocumentInfoEndpoint.swift; sourceTree = ""; }; - 76F9B9442505FAA600BD2EBA /* FormWebViewScriptMessageHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormWebViewScriptMessageHandler.swift; sourceTree = ""; }; 7DM3U8QURZZJVS9LPL62B4W7 /* LoginPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginPresenter.swift; sourceTree = ""; }; 90C270444FDCCC9A5F841DC6 /* Pods-All-AgileWorks.debug-production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-All-AgileWorks.debug-production.xcconfig"; path = "Target Support Files/Pods-All-AgileWorks/Pods-All-AgileWorks.debug-production.xcconfig"; sourceTree = ""; }; A8C7763E2AB9362FBDDF55F1 /* Pods-All-AgileWorks.release-production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-All-AgileWorks.release-production.xcconfig"; path = "Target Support Files/Pods-All-AgileWorks/Pods-All-AgileWorks.release-production.xcconfig"; sourceTree = ""; }; @@ -336,21 +288,15 @@ BD6C1AE924A4775C0057756F /* UIDeviceExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIDeviceExtensions.swift; sourceTree = ""; }; BD6C1AEC24A480C70057756F /* DeviceService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceService.swift; sourceTree = ""; }; BD71FA3D24C140F900C054C9 /* MainTabBarViewBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabBarViewBuilder.swift; sourceTree = ""; }; - BD71FA4A24C15FEE00C054C9 /* FormBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormBuilder.swift; sourceTree = ""; }; BD72589E240E69E000928CE9 /* OAuthService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuthService.swift; sourceTree = ""; }; BD774CA724A4A13F002156A1 /* Notification.NameExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notification.NameExtensions.swift; sourceTree = ""; }; BD7A8004241A16B80040B418 /* DeepLinkParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeepLinkParser.swift; sourceTree = ""; }; BD7A8005241A16B80040B418 /* LinkManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinkManager.swift; sourceTree = ""; }; BD7A8006241A16B80040B418 /* NotificationParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationParser.swift; sourceTree = ""; }; BD7DC0F124C0608800C3FBED /* ErrorResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorResponse.swift; sourceTree = ""; }; - BD7E623E247611CC0089CFA6 /* Navi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Navi.swift; sourceTree = ""; }; BD86A6B024067EB3007B48F1 /* APIResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIResult.swift; sourceTree = ""; }; BD8D55D82420609000A667B0 /* XCGLoggerExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XCGLoggerExtensions.swift; sourceTree = ""; }; BD904167243B2994009D0B19 /* GetApprovalsEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetApprovalsEndpoint.swift; sourceTree = ""; }; - BD904169243B35E1009D0B19 /* GetApprovalsIDEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetApprovalsIDEndpoint.swift; sourceTree = ""; }; - BD904171243B544D009D0B19 /* GetSubmissionsEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetSubmissionsEndpoint.swift; sourceTree = ""; }; - BD904173243B5507009D0B19 /* GetSubmissionsIDEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetSubmissionsIDEndpoint.swift; sourceTree = ""; }; - BD917FD72473C800005D2437 /* FormWebViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = FormWebViewController.storyboard; sourceTree = ""; }; BD928CCD2407500400ED04C2 /* UserDefaultsDataStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaultsDataStore.swift; sourceTree = ""; }; BD969630240C9CD400521925 /* SessionInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionInfo.swift; sourceTree = ""; }; BD9D569E24AF14AB00C73B33 /* NotificationData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationData.swift; sourceTree = ""; }; @@ -478,16 +424,6 @@ path = Login; sourceTree = ""; }; - 3107AA7B243B369900F23BFB /* Form */ = { - isa = PBXGroup; - children = ( - BD71FA4924C15FD200C054C9 /* Builder */, - BD7E623D247611B10089CFA6 /* Entity */, - BD7E6240247611F00089CFA6 /* View */, - ); - path = Form; - sourceTree = ""; - }; 3127EE0D241A2A9500535CC7 /* TodayExtension */ = { isa = PBXGroup; children = ( @@ -605,14 +541,6 @@ path = Presenter; sourceTree = ""; }; - 76C7AA00250B05B5000A0FE6 /* SubWebView */ = { - isa = PBXGroup; - children = ( - 76C7AA01250B05CA000A0FE6 /* SubWebViewStack.swift */, - ); - path = SubWebView; - sourceTree = ""; - }; 7U8ZTKXXFAFGRXKUI006L5Q0 /* View */ = { isa = PBXGroup; children = ( @@ -641,7 +569,6 @@ BD96962F240C9BBB00521925 /* Entity */, BD1367652444276900767222 /* Extension */, BDAB1F6A240D0CA800EA15FD /* WebClient */, - 76CEA0532511A36E0074837A /* WfAction.swift */, 7604950325380980000D6951 /* FirebaseSupport.swift */, C5E5A4C727853BEF00668C7D /* QRCodeReader.swift */, ); @@ -751,14 +678,6 @@ path = Service; sourceTree = ""; }; - BD71FA4924C15FD200C054C9 /* Builder */ = { - isa = PBXGroup; - children = ( - BD71FA4A24C15FEE00C054C9 /* FormBuilder.swift */, - ); - path = Builder; - sourceTree = ""; - }; BD7A800A241A16D80040B418 /* App */ = { isa = PBXGroup; children = ( @@ -782,52 +701,15 @@ path = Link; sourceTree = ""; }; - BD7E623D247611B10089CFA6 /* Entity */ = { - isa = PBXGroup; - children = ( - BD7E623E247611CC0089CFA6 /* Navi.swift */, - ); - path = Entity; - sourceTree = ""; - }; - BD7E6240247611F00089CFA6 /* View */ = { - isa = PBXGroup; - children = ( - 76C7AA00250B05B5000A0FE6 /* SubWebView */, - BD7E6245247631520089CFA6 /* Cell */, - 31253D952417A56200525DB6 /* FormWebViewController.swift */, - BD917FD72473C800005D2437 /* FormWebViewController.storyboard */, - 3A1F975124AF2D0000AE6A42 /* ModalFullCollectionViewController.storyboard */, - 3A1F975324AF2D6700AE6A42 /* ModalFullCollectionViewController.swift */, - 76F9B9442505FAA600BD2EBA /* FormWebViewScriptMessageHandler.swift */, - 76D1DBC9258C636F00429C70 /* WebViewHistoryStack.swift */, - ); - path = View; - sourceTree = ""; - }; - BD7E6245247631520089CFA6 /* Cell */ = { - isa = PBXGroup; - children = ( - 3A1F7CA324A9FDB3006800F2 /* ModalCollectionViewCell.swift */, - ); - path = Cell; - sourceTree = ""; - }; BD96962F240C9BBB00521925 /* Entity */ = { isa = PBXGroup; children = ( BD86A6B024067EB3007B48F1 /* APIResult.swift */, 31AA002E24347BBD000177B4 /* ApprovalResponse.swift */, BD969630240C9CD400521925 /* SessionInfo.swift */, - 31AA003124347C98000177B4 /* SubmissionResponse.swift */, - 3AED7EE32449387600FC6BCC /* SearchResponse.swift */, - 3AA9579D2463B14700AD05DC /* SearchRequest.swift */, BDAABA1E24A364D00077EC69 /* DeviceRequest.swift */, BDAABA1C24A3627B0077EC69 /* DeviceResponse.swift */, BD7DC0F124C0608800C3FBED /* ErrorResponse.swift */, - 76CEA0592511D2EC0074837A /* WfActionResponse.swipt.swift */, - 76D1DC142592FC5200429C70 /* DocumentResponse.swift */, - 76D1C0E325E38D9A004DF611 /* ServiceInfoResponse.swift */, ); path = Entity; sourceTree = ""; @@ -883,7 +765,6 @@ 57NGKUX7FAI41Q8MMQ9MWB6V /* Main */, C53577282754D02400EAA660 /* WebView */, C57DCAA727C8954B000A2ABC /* Profile */, - 3107AA7B243B369900F23BFB /* Form */, 76AE52DB25D358D700AFA45A /* License */, C50CF78A27D86D760042C210 /* OpenLicense */, BDEB7D8D23F5293800EFAF31 /* Podfile */, @@ -898,19 +779,12 @@ children = ( BDAB1F6E240D0D1400EA15FD /* APIEndpoint.swift */, BD904167243B2994009D0B19 /* GetApprovalsEndpoint.swift */, - BD904169243B35E1009D0B19 /* GetApprovalsIDEndpoint.swift */, BDAB1F70240D0E5C00EA15FD /* GetSessionEndpoint.swift */, - BD904171243B544D009D0B19 /* GetSubmissionsEndpoint.swift */, - BD904173243B5507009D0B19 /* GetSubmissionsIDEndpoint.swift */, BD25F852242A05510014B726 /* Session.swift */, - 3AA9579B2463AB2700AD05DC /* PostSearchItemEndpoint.swift */, BDAABA1A24A361E90077EC69 /* PostDeviceEndpoint.swift */, BD6C1AE324A471070057756F /* PutDeviceEndpoint.swift */, BD6C1AE524A474050057756F /* GetDeviceEndpoint.swift */, BD6C1AE724A475430057756F /* DeleteDeviceEndpoint.swift */, - 76CEA0572511D1930074837A /* PostWfActionEndpoint.swift */, - 76D1DC1D2592FE3400429C70 /* GetDocumentInfoEndpoint.swift */, - 76D1C0DE25E38D0A004DF611 /* GetServiceInfoEndpoint.swift */, C56E32FC27F2EDC1003455B5 /* GetLogoutEndpoint.swift */, ); path = WebClient; @@ -1284,14 +1158,12 @@ CRJ55ZZNLTXIY1R10AXQL1VZ /* LoginViewController.storyboard in Resources */, 75917FA027BDF2050051E201 /* Chinese-Simplified.strings in Resources */, BDA1832F23F40F1000C9A6DD /* Colors.xcassets in Resources */, - BD917FD82473C800005D2437 /* FormWebViewController.storyboard in Resources */, 75917F9C27BDF0F10051E201 /* Japanese.strings in Resources */, BDA6D6A52411FFAA00FA9C33 /* Settings.bundle in Resources */, 76C4996C24E5097200759B93 /* GoogleService-Info-Production.plist in Resources */, I07ZJPNVIS069WBRK1L3WPOY /* MainViewController.storyboard in Resources */, 75917FA227BDF2250051E201 /* Chinese-Traditional.strings in Resources */, C57DCAAA27C89692000A2ABC /* ProfileViewController.storyboard in Resources */, - 3A1F975224AF2D0000AE6A42 /* ModalFullCollectionViewController.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1386,20 +1258,16 @@ 764D0E1C2580ABCB00AB6617 /* URLAuthenticationUtility.swift in Sources */, BDBBF83F243CAB5600EEB25D /* SessionInfo.swift in Sources */, BDBBF841243CAB6C00EEB25D /* APIEndpoint.swift in Sources */, - BD13676B244427C300767222 /* GetSubmissionsEndpoint.swift in Sources */, - BD13676A244427C000767222 /* GetApprovalsIDEndpoint.swift in Sources */, BDBBF83C243CAB2900EEB25D /* UserDefaultsDataStore.swift in Sources */, BD136768244427AC00767222 /* APIResult.swift in Sources */, BD0231F0242B698C000A95BB /* Configuration.swift in Sources */, BDBBF83E243CAB3600EEB25D /* Session.swift in Sources */, 31AA003024347BD1000177B4 /* ApprovalResponse.swift in Sources */, - BD1367672444279900767222 /* SubmissionResponse.swift in Sources */, BDBBF83D243CAB3300EEB25D /* GetApprovalsEndpoint.swift in Sources */, BDBBF840243CAB6200EEB25D /* UserDefaultsExtensions.swift in Sources */, BDA74C5724501917000D4351 /* Log.swift in Sources */, BD7DC0F324C061EA00C3FBED /* ErrorResponse.swift in Sources */, 3127EE0F241A2A9500535CC7 /* TodayViewController.swift in Sources */, - BD13676C244427C600767222 /* GetSubmissionsIDEndpoint.swift in Sources */, 75917FB427C371390051E201 /* StringsUtility.swift in Sources */, BDA74C52245016AC000D4351 /* XCGLoggerExtensions.swift in Sources */, BD1B50DD244DABF900783FB5 /* OAuthService.swift in Sources */, @@ -1459,25 +1327,18 @@ BD6C1AE424A471070057756F /* PutDeviceEndpoint.swift in Sources */, BDA1831323F3FD7F00C9A6DD /* AppDelegate.swift in Sources */, BD3E90862474F50B00B449A7 /* IntExtensions.swift in Sources */, - 3A1F7CA424A9FDB3006800F2 /* ModalCollectionViewCell.swift in Sources */, C5848EB827BC8EBC00AA796D /* MenuViewController.swift in Sources */, BDA74C5624501917000D4351 /* Log.swift in Sources */, 85X3ZXEG18PWU7J17GNGF3UG /* SplashPresenter.swift in Sources */, KQWCT9WOHFNQBPP7I7C3OL6Q /* SplashViewController.swift in Sources */, - 31AA003224347C98000177B4 /* SubmissionResponse.swift in Sources */, BDBBF838243C9EA300EEB25D /* GetApprovalsEndpoint.swift in Sources */, BD7DC0F224C0608800C3FBED /* ErrorResponse.swift in Sources */, C52221BC27FD67EA00494390 /* SubViewStack.swift in Sources */, - 76D1DC152592FC5200429C70 /* DocumentResponse.swift in Sources */, - BD7E623F247611CC0089CFA6 /* Navi.swift in Sources */, BD7A8007241A16B90040B418 /* DeepLinkParser.swift in Sources */, BD7A8009241A16B90040B418 /* NotificationParser.swift in Sources */, BDEE85F82408A887006A6BF7 /* MainTabBarViewController.swift in Sources */, - BD71FA4B24C15FEE00C054C9 /* FormBuilder.swift in Sources */, C599740827D992A5006F5AAC /* OpenLicenseTableViewController.swift in Sources */, - 3AA9579E2463B14700AD05DC /* SearchRequest.swift in Sources */, 761F49E2255511A1007708D8 /* NumberUtility.swift in Sources */, - 76D1C0DF25E38D0A004DF611 /* GetServiceInfoEndpoint.swift in Sources */, OHC9HIGNQ5ITYM0SNOFLOAKA /* SplashBuilder.swift in Sources */, WOGRE70TXZTZ79X4CG8A8TJA /* SplashUseCase.swift in Sources */, C51EF0E92769FA2E00361B38 /* WebViewScriptMessageHandler.swift in Sources */, @@ -1489,25 +1350,18 @@ C599740D27D9E634006F5AAC /* OpenLicenseDetailViewController.swift in Sources */, BD86A6B124067EB3007B48F1 /* APIResult.swift in Sources */, BDAB1F71240D0E5C00EA15FD /* GetSessionEndpoint.swift in Sources */, - 3AA9579C2463AB2700AD05DC /* PostSearchItemEndpoint.swift in Sources */, - BDBBF83A243C9EA900EEB25D /* GetSubmissionsEndpoint.swift in Sources */, BDAABA1D24A3627B0077EC69 /* DeviceResponse.swift in Sources */, BDA1832B23F4079400C9A6DD /* RootViewController.swift in Sources */, C57DCAAE27C89823000A2ABC /* ProfileViewController.swift in Sources */, OZPVEGK5OCQVK53RHNWXAVSG /* LoginViewController.swift in Sources */, DO2X5NYERJY3QMXCZGA5H9OJ /* LoginBuilder.swift in Sources */, - BDBBF83B243C9EAB00EEB25D /* GetSubmissionsIDEndpoint.swift in Sources */, - 76D1DC1E2592FE3400429C70 /* GetDocumentInfoEndpoint.swift in Sources */, C5377F0327E07CD9004467BE /* MainTabBarViewWireframe.swift in Sources */, C57DCAB027C8AEFC000A2ABC /* ProfileTableViewController.swift in Sources */, - 3A1F975424AF2D6700AE6A42 /* ModalFullCollectionViewController.swift in Sources */, BD8D55D92420609000A667B0 /* XCGLoggerExtensions.swift in Sources */, C599740B27D992E9006F5AAC /* OpenLicenseTableViewCell.swift in Sources */, 76AE533325D37B0200AFA45A /* LicenseViewPresenter.swift in Sources */, - 76CEA0542511A36E0074837A /* WfAction.swift in Sources */, 76AE530725D3652400AFA45A /* LicenseViewBuilder.swift in Sources */, 3127EE1B241A2B4D00535CC7 /* TodayViewController.swift in Sources */, - 76CEA05A2511D2EC0074837A /* WfActionResponse.swipt.swift in Sources */, BDAABA1B24A361E90077EC69 /* PostDeviceEndpoint.swift in Sources */, 31AA002F24347BBD000177B4 /* ApprovalResponse.swift in Sources */, BD7A8008241A16B90040B418 /* LinkManager.swift in Sources */, @@ -1515,17 +1369,12 @@ C535772C2754D12600EAA660 /* WebViewBuilder.swift in Sources */, C5848EBA27BCE0F100AA796D /* MenuTableViewController.swift in Sources */, 7604950425380980000D6951 /* FirebaseSupport.swift in Sources */, - BDBBF839243C9EA600EEB25D /* GetApprovalsIDEndpoint.swift in Sources */, C5285D3927CCB3C8006A9182 /* ProfileTableViewCell.swift in Sources */, UMOPI6WFDHHR8CWFUZDQE9U2 /* LoginUseCase.swift in Sources */, - 31253D962417A56200525DB6 /* FormWebViewController.swift in Sources */, BD6C1AED24A480C70057756F /* DeviceService.swift in Sources */, - 76D1DBCA258C636F00429C70 /* WebViewHistoryStack.swift in Sources */, - 3AED7EE42449387600FC6BCC /* SearchResponse.swift in Sources */, 76AE530025D3626800AFA45A /* LicenseViewController.swift in Sources */, BDAB1F6D240D0D0000EA15FD /* UserDefaultsExtensions.swift in Sources */, C50CF78E27D86DC90042C210 /* OpenLicenseBuilder.swift in Sources */, - 76C7AA02250B05CA000A0FE6 /* SubWebViewStack.swift in Sources */, BD969631240C9CD400521925 /* SessionInfo.swift in Sources */, BD928CCE2407500400ED04C2 /* UserDefaultsDataStore.swift in Sources */, BD5061B4242866780014F3FA /* Configuration.swift in Sources */, @@ -1536,16 +1385,13 @@ 761F4A49255D15DA007708D8 /* AppShared.swift in Sources */, BD6C1AEA24A4775C0057756F /* UIDeviceExtensions.swift in Sources */, BD72589F240E69E000928CE9 /* OAuthService.swift in Sources */, - 76CEA0582511D1930074837A /* PostWfActionEndpoint.swift in Sources */, BD3E90822474D56100B449A7 /* WKWebViewExtensions.swift in Sources */, - 76F9B9452505FAA600BD2EBA /* FormWebViewScriptMessageHandler.swift in Sources */, BD25F853242A05510014B726 /* Session.swift in Sources */, 75917FB327C371390051E201 /* StringsUtility.swift in Sources */, BD9D569F24AF14AB00C73B33 /* NotificationData.swift in Sources */, BDEA2CD5246CDAEF00D3E15F /* KeychainDataStore.swift in Sources */, BDAABA1F24A364D00077EC69 /* DeviceRequest.swift in Sources */, BD774CA824A4A13F002156A1 /* Notification.NameExtensions.swift in Sources */, - 76D1C0E425E38D9A004DF611 /* ServiceInfoResponse.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1603,8 +1449,6 @@ isa = PBXVariantGroup; children = ( BDA1831E23F3FD8000C9A6DD /* Base */, - 75917F8F27BD315A0051E201 /* zh-Hans */, - 75917F9327BD317D0051E201 /* zh-Hant */, ); name = LaunchScreen.storyboard; sourceTree = ""; diff --git a/AgileWorks/AgileWorks/App/Base.lproj/LaunchScreen.storyboard b/AgileWorks/AgileWorks/App/Base.lproj/LaunchScreen.storyboard index a83d81c..1427778 100644 --- a/AgileWorks/AgileWorks/App/Base.lproj/LaunchScreen.storyboard +++ b/AgileWorks/AgileWorks/App/Base.lproj/LaunchScreen.storyboard @@ -1,9 +1,9 @@ - + - + @@ -22,12 +22,12 @@ + - diff --git a/AgileWorks/AgileWorks/Form/Builder/FormBuilder.swift b/AgileWorks/AgileWorks/Form/Builder/FormBuilder.swift deleted file mode 100644 index 4293bbc..0000000 --- a/AgileWorks/AgileWorks/Form/Builder/FormBuilder.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// FormBuilder.swift -// AgileWorks -// -// Created by 島田潤一 on 2020/07/17. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// - -import UIKit - -protocol FormBuilder { - func build() -> FormWebViewController -} - -struct FormBuilderImpl: FormBuilder { - let identifier = "FormWebViewController" - - func build() -> FormWebViewController { - let viewController = storyboard() - return viewController - } -} - -extension FormBuilderImpl { - private func storyboard() -> FormWebViewController { - let storyboard = mainStoryboard() - let viewController = storyboard.instantiateViewController(withIdentifier: identifier) as! FormWebViewController - return viewController - } - - private func mainStoryboard() -> UIStoryboard { - let storyboard = UIStoryboard(name: identifier, bundle: nil) - return storyboard - } -} diff --git a/AgileWorks/AgileWorks/Form/Entity/Navi.swift b/AgileWorks/AgileWorks/Form/Entity/Navi.swift deleted file mode 100644 index 54687ff..0000000 --- a/AgileWorks/AgileWorks/Form/Entity/Navi.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Navi.swift -// AgileWorks -// -// Created by 島田潤一 on 2020/05/21. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// - -import Foundation - -struct Navi: Codable { - var navi: [NaviBtns] = [] - - init (_ array: [Any]) { - for item in array { - self.navi.append(NaviBtns(item as! [String: Any])) - } - } -} - -class NaviBtns: Codable, CustomStringConvertible { - var index: Int - var label: String - var type: Int - var enabled: Bool - var description: String { return "\n{index:\(index), label:\"\(label)\", type:\(type), enabled:\(enabled)}" } - - init(_ dictionary: [String: Any]) { - self.index = 0 - self.label = dictionary["label"] as! String - self.type = dictionary["type"] as! Int - self.enabled = true - } -} - -// 書類制御などによるナビボタン設定の上書き情報。ボタン一つ分。 -class NaviBtnOverride { - var label: String? - var enabled: Bool? -} - -// 書類制御などによるナビボタン設定の上書き情報。 jsonNaviBtns が直接上書されるわけではない上、 -// NaviBtns 取得とは非同期に変更される場合があるので別で持っておく必要がある。 -class NaviBtnOverrides { - private var overrides = [Int: NaviBtnOverride]() - - func putLabel(index: Int, label: String) { - getOrCreate(index: index).label = label - } - - func putEnabled(index: Int, enabled: Bool) { - getOrCreate(index: index).enabled = enabled - } - - func clear() { - overrides.removeAll() - } - - func getOrNull(index: Int) -> NaviBtnOverride? { - return overrides[index] - } - - private func getOrCreate(index: Int) -> NaviBtnOverride { - if let item = overrides[index] { - return item - } else { - let newItem = NaviBtnOverride() - overrides[index] = newItem - return newItem - } - } -} diff --git a/AgileWorks/AgileWorks/Form/View/Cell/ModalCollectionViewCell.swift b/AgileWorks/AgileWorks/Form/View/Cell/ModalCollectionViewCell.swift deleted file mode 100644 index 1f8795b..0000000 --- a/AgileWorks/AgileWorks/Form/View/Cell/ModalCollectionViewCell.swift +++ /dev/null @@ -1,216 +0,0 @@ -// -// ModalCollectionViewCell.swift -// AgileWorks -// -// Created by sbc on 2020/06/29. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// - -import UIKit - -enum IconPattern: String { - case clip = "clip" - case comment = "comment" - case draft = "draft" - case duplicate = "duplicate" - case edit = "edit" - case file = "file" - case hold = "hold" - case info = "info" - case pdf = "pdf" - case redo = "redo" - case reject = "reject" - case setting = "setting" - case stamp = "stamp" - case stampBack = "stampBack" - case submit = "submit" - case next = "next" - case close = "close" - case nextPage = "rightArrow" - case prevPage = "leftArrow" - case none = "" -} - -enum IconType: Int { - case clip = 2 - case comment = 10 - case draft = 11 - case duplicate = 12 - case edit = 4 - case file = 30 - case hold = 7 - case info = 20 - case pdf = 1 - case redo = 8 - case reject = 6 - case setting = 9 - case stamp = 5 - case stampBack = 25 - case submit = 0 - case next = 15 - case close = 3 - case nextPage = 18 - case prevPage = 19 - case none = -1 -} - -class ModalCollectionViewCell: UICollectionViewCell { - @IBOutlet private var textLabel: UILabel! - @IBOutlet private var iconView: UIImageView! - private var textLabelSize: CGSize? - - // badge - private static let kBadgeUpperLimit = 9 - private static let kBadgeBorderWidth: CGFloat = 1.0 - private static let kBadgeRadius: CGFloat = 7.0 - private static let kBadgeFontSize: CGFloat = 11.0 - private weak var badgeLayer: CALayer? - - override func awakeFromNib() { - super.awakeFromNib() - - let selectedBGView = UIView(frame: frame) - selectedBGView.backgroundColor = .lightGray - selectedBackgroundView = selectedBGView - - layer.cornerRadius = 5 - layer.borderWidth = 2 - layer.borderColor = UIColor.blue.cgColor - layer.masksToBounds = true - } - - func configure(naviBtns: NaviBtns, override: NaviBtnOverride?, badge: Int) { - textLabel.text = override?.label ?? naviBtns.label - // naviBtns.enabled に override.enabled の内容も反映されているが処理の対称性のために両方見ておく。 - textLabel.isEnabled = override?.enabled ?? naviBtns.enabled - isUserInteractionEnabled = naviBtns.enabled ? true : false - layer.borderColor = naviBtns.enabled ? UIColor(named: localizadString(key: "MainColor", comment: ""))!.cgColor : UIColor(named: localizadString(key: "ClickBtnColor", comment: ""))!.cgColor - textLabel.textColor = naviBtns.enabled ? UIColor(named: localizadString(key: "MainColor", comment: ""))! : UIColor(named: localizadString(key: "ClickBtnColor", comment: ""))! - if let size = textLabelSize { - textLabel.sizeThatFits(size) - } else { - textLabelSize = textLabel.frame.size - textLabel.sizeToFit() - } - iconView.image = UIImage(named: getType(type: naviBtns.type).rawValue) - iconView.tintColor = naviBtns.enabled ? UIColor(named: localizadString(key: "MainColor", comment: ""))! : UIColor(named: localizadString(key: "ClickBtnColor", comment: ""))! - setBadge(badge) - } - - private func getType(type: Int) -> IconPattern { - if let stat = statType(type: type) { - return stat - } else if let edit = editType(type: type) { - return edit - } else if let operate = operateType(type: type) { - return operate - } else { - return .none - } - } - - private func statType(type: Int) -> IconPattern? { - switch type { - case IconType.submit.rawValue: - return .submit - case IconType.edit.rawValue: - return .edit - case IconType.draft.rawValue: - return .draft - case IconType.duplicate.rawValue: - return .duplicate - case IconType.stamp.rawValue: - return .stamp - case IconType.reject.rawValue: - return .reject - case IconType.hold.rawValue: - return .hold - case IconType.redo.rawValue: - return .redo - case IconType.stampBack.rawValue: - return .stampBack - case IconType.nextPage.rawValue: - return .nextPage - case IconType.prevPage.rawValue: - return .prevPage - default: - return nil - } - } - - private func editType(type: Int) -> IconPattern? { - switch type { - case IconType.clip.rawValue: - return .clip - case IconType.comment.rawValue: - return .comment - case IconType.file.rawValue: - return .file - case IconType.setting.rawValue: - return .setting - default: - return nil - } - } - - private func operateType(type: Int) -> IconPattern? { - switch type { - case IconType.pdf.rawValue: - return .pdf - case IconType.info.rawValue: - return .info - case IconType.close.rawValue: - return .close - case IconType.next.rawValue: - return .next - default: - return nil - } - } - - private func setBadge(_ number: Int) { - removeBadge() - if number <= 0 { - return - } - guard let view = iconView else { return } - - let borderLayer = CAShapeLayer() - let borderRadius = Self.kBadgeRadius + Self.kBadgeBorderWidth - borderLayer.bounds = CGRect(x: 0.0, y: 0.0, width: borderRadius * 2, height: borderRadius * 2) - borderLayer.path = UIBezierPath(roundedRect: borderLayer.bounds, cornerRadius: Self.kBadgeRadius).cgPath - borderLayer.fillColor = UIColor.white.cgColor - - let backgroundLayer = CAShapeLayer() - backgroundLayer.bounds = CGRect(x: 0.0, y: 0.0, width: Self.kBadgeRadius * 2, height: Self.kBadgeRadius * 2) - backgroundLayer.path = UIBezierPath(roundedRect: backgroundLayer.bounds, cornerRadius: Self.kBadgeRadius).cgPath - backgroundLayer.fillColor = UIColor.red.cgColor - - let textLayer = CATextLayer() - textLayer.frame = backgroundLayer.frame - textLayer.contentsScale = UIScreen.main.scale - textLayer.fontSize = Self.kBadgeFontSize - textLayer.foregroundColor = UIColor.white.cgColor - textLayer.alignmentMode = .center - if number <= Self.kBadgeUpperLimit { - textLayer.string = "\(number)" - } else { - textLayer.string = "\(Self.kBadgeUpperLimit)+" - } - - let badgeLayer = CALayer() - badgeLayer.bounds = CGRect(x: 0, y: 0, width: 1, height: 1) - badgeLayer.position = CGPoint(x: view.frame.width, y: 0) - - badgeLayer.addSublayer(borderLayer) - badgeLayer.addSublayer(backgroundLayer) - badgeLayer.addSublayer(textLayer) - view.layer.addSublayer(badgeLayer) - self.badgeLayer = badgeLayer - } - - private func removeBadge() { - badgeLayer?.removeFromSuperlayer() - badgeLayer = nil - } -} diff --git a/AgileWorks/AgileWorks/Form/View/FormWebViewController.storyboard b/AgileWorks/AgileWorks/Form/View/FormWebViewController.storyboard deleted file mode 100644 index b7a5b05..0000000 --- a/AgileWorks/AgileWorks/Form/View/FormWebViewController.storyboard +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AgileWorks/AgileWorks/Form/View/FormWebViewController.swift b/AgileWorks/AgileWorks/Form/View/FormWebViewController.swift deleted file mode 100644 index 4768915..0000000 --- a/AgileWorks/AgileWorks/Form/View/FormWebViewController.swift +++ /dev/null @@ -1,824 +0,0 @@ -// -// FormWebViewController.swift -// AgileWorks -// -// Created by Gk40002301 on 2020/03/10. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// -import FloatingPanel -import UIKit -import WebKit - -// navigation number -private enum NaviType: Int, CaseIterable { - case submission = 0 - case pdf = 1 - case attached = 2 - case close = 3 - case edit = 4 - case approval = 5 - case rejected = 6 - case pending = 7 - case repatriation = 8 - case settings = 9 - case comments = 10 - case draft = 11 - case copy = 12 - case next = 15 - case help = 16 - case nextPage = 18 - case previousPage = 19 - case customeButton = 20 - case reversalOfApproval = 25 - case relatedDocuments = 30 -} - - -class FormWebViewController: UIViewController { - @IBOutlet private var formView: UIView! - @IBOutlet private var containerView: UIView! - @IBOutlet private var closeButton: UIBarButtonItem! - @IBOutlet private var returnButton: UIBarButtonItem! - @IBOutlet private var backButton: UIBarButtonItem! - var floatingPanelController: FloatingPanelController! - - var formWebView: WKWebView! - // WebView 表示用 JSESSIONID - var sessionId: String! - // WebView 表示調整用 - var withFloatingPanelConstraint: NSLayoutConstraint! - var withoutFloatingPanelConstraint: NSLayoutConstraint! - // 添付ファイルアクションのポップアップ位置調整用 - var lastTappedLocation = CGPoint(x: 0, y: 0) - - var formTitle: String! - var formURL: String! - var navi: [NaviBtns]? - let naviBtnOverrides = NaviBtnOverrides() - var panelPositionPreservingButtonIndices: Set? - - let modalTipHeight: CGFloat = 70 - // モーダルビューコントローラー - var modalFullVCStoryBoard: UIStoryboard! - var modalFullVC: ModalFullCollectionViewController! - - // 戻り先ページ管理スタック - var historyStack = WebViewHistoryStack() - - // 別ウインドウで開いたときの子ウインドウスタック - var subWebViewStack = SubWebViewStack() - - // iOS 13 で「画像を保存」したとき、書類ビューごとまとめて閉じる問題の回避用 - // 参考: https://stackoverflow.com/questions/56903030/ios-13-uiactivityviewcontroller-automatically-present-previous-vc-after-image-sa - private let activityWindow: UIWindow = { - let window = UIWindow(frame: UIScreen.main.bounds) - window.rootViewController = UIViewController() - return window - }() - - let kCustomUserAgent = "AwMobileApp" - - var messageHandler: FormWebViewScriptMessageHandler! - - override func viewWillDisappear(_ animated: Bool) { - super.viewWillDisappear(animated) - AppDelegate.appShared.requstApprovalRefresh() - } - - override func viewDidDisappear(_ animated: Bool) { - super.viewDidDisappear(animated) - if floatingPanelController != nil && self.presentedViewController == nil { - floatingPanelController.removePanelFromParent(animated: true) - } - } - - // 再描写 - override func viewDidLayoutSubviews() { - if floatingPanelController != nil { - updateWebView(size: self.view.frame.size) - } - } - - override func viewDidLoad() { - super.viewDidLoad() - - self.navigationController?.navigationBar.barTintColor = UIColor(named: localizadString(key: "MainColor", comment: "")) - self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor: UIColor.white] - self.navigationController?.presentationController?.delegate = self - // モーダルDismiss設定(iOS13のみ) - if #available(iOS 13.0, *) { - self.navigationController?.presentedViewController?.isModalInPresentation = true - } - // スワイプ操作で複数枚フォームを遷移 - let directionList: [UISwipeGestureRecognizer.Direction] = [.right, .left] - for direction in directionList { - let swipeRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(self.swipePage(sender:))) - swipeRecognizer.direction = direction - formView.addGestureRecognizer(swipeRecognizer) - } - - self.navigationItem.title = self.formTitle - self.closeButton.title = localizadString(key: "Close", comment: "") - self.subWebViewStack.eventDelegate = self - self.updateSession() - } - - @objc - func swipePage(sender: UISwipeGestureRecognizer) { - let hasNextPage = modalFullVC.navi.contains { naviButton -> Bool in - return naviButton.type == IconType.nextPage.rawValue || naviButton.type == IconType.prevPage.rawValue - } - if !hasNextPage { - return - } - - var script: String! - switch sender.direction { - case UISwipeGestureRecognizer.Direction.right: - script = "nextPage();" - self.formWebView.evaluate(javaScript: script) - case UISwipeGestureRecognizer.Direction.left: - script = "prevPage();" - self.formWebView.evaluate(javaScript: script) - default: - break - } - } - - func updateSession() { - let sessionEndpoint = GetSessionEndpoint() - - Session.send(sessionEndpoint) { result in - switch result { - case .success(let response): - self.sessionId = response.sessionId - DispatchQueue.main.async { - self.setWebView() - self.loadWebView() - } - case .failure: - self.dismiss(animated: true, completion: nil) - } - } - } - - func setWebView() { - let userContentController = WKUserContentController() - let script = "document.cookie='JSESSIONID=\(sessionId!)'" - let cookieScript = WKUserScript(source: script, injectionTime: .atDocumentStart, forMainFrameOnly: false) - userContentController.addUserScript(cookieScript) - - self.messageHandler = FormWebViewScriptMessageHandler(formWebViewController: self) - self.messageHandler.registerHandlers(controller: userContentController) - - let configuration = WKWebViewConfiguration() - configuration.userContentController = userContentController - configuration.applicationNameForUserAgent = kCustomUserAgent - - formWebView = WKWebView(frame: self.formView.frame, configuration: configuration) - // スクロール設定 - formWebView.scrollView.bounces = true - formWebView.scrollView.alwaysBounceVertical = true - formWebView.scrollView.delegate = self - - // タッチイベント(iPadのみ) - formWebView.uiDelegate = self - let tapWebView = UITapGestureRecognizer() - tapWebView.numberOfTouchesRequired = 1 - tapWebView.numberOfTapsRequired = 1 - tapWebView.delegate = self - formWebView.addGestureRecognizer(tapWebView) - - self.formView.addSubview(formWebView) - - // AutoLayout - formWebView.translatesAutoresizingMaskIntoConstraints = false - formWebView.topAnchor.constraint(equalTo: self.view.topAnchor).isActive = true - // 下端はパネル有無によって切り替えるために二種類用意 - withFloatingPanelConstraint = formWebView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: -modalTipHeight) - withoutFloatingPanelConstraint = formWebView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: 0) - setMenuConstraint(menuIsEnabled: false) - formWebView.leadingAnchor.constraint(equalTo: self.view.leadingAnchor).isActive = true - formWebView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor).isActive = true - - formWebView.navigationDelegate = self - } - - func loadWebView() { - let sesstionid = "JSESSIONID=" + sessionId! - - let url = URL(string: self.formURL)! - var request = URLRequest(url: url, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 30.0) - request.httpShouldHandleCookies = false - request.setValue(sesstionid, forHTTPHeaderField: "Cookie") - log.debug(""" - Session Request: \(String(describing: request.url)) - \nHTTPMethod: \(String(describing: request.httpMethod) ) - \nHeaders: \(String(describing: request.allHTTPHeaderFields)) - \nHTTPBody: \(String(data: request.httpBody ?? Data(), encoding: .utf8)!) - """) - self.formWebView.load(request) - } - - @objc - @IBAction private func cancelProject(sender: UIBarButtonItem) { - if subWebViewStack.pop() == nil { - self.dismiss(animated: true, completion: nil) - } - } - - @IBAction private func goBackPage(_ sender: UIBarButtonItem) { - if let target = historyStack.pop() { - formWebView.go(to: target) - } - } - - @IBAction private func returnPage(_ sender: UIBarButtonItem) { - formWebView.goBack() - } - - func getNavigatorButtonList(preservePosition: Bool) { - let naviDisabledScript = "navi_isDisabled()" - let naviButtonsScript = "jsonNaviBtns" - let badgeCountScript = "getDocumentAttachedFileCount() + ':' + getDocumentCommentCount()" // "添付ファイル数:コメント数" - self.formWebView.evaluateJavaScript(naviDisabledScript) { object, error in - if let error = error { - log.e(error) - return - } - if object as? Bool ?? false { - self.disableMenu() - return - } - self.formWebView.evaluateJavaScript(naviButtonsScript) { object, error in - if let error = error { - log.e(error) - return - } - if let naviButton = object as? [String: Any], let navi = naviButton["navi"] as? [Any] { - let tempNavi = Navi(navi) - for (index, item) in tempNavi.navi.enumerated() { - item.index = index - item.enabled = self.isButtonEnabled(index: index) - } - self.navi = tempNavi.navi - let filteredNavi = tempNavi.navi.filter { $0.enabled == true && ($0.type != NaviType.close.rawValue && $0.type != NaviType.pdf.rawValue) } - self.navi = filteredNavi - self.panelPositionPreservingButtonIndices = Set(filteredNavi - .filter { $0.type == NaviType.nextPage.rawValue || $0.type == NaviType.previousPage.rawValue } - .map { $0.index }) - - log.debug(self.navi?.description) - - self.formWebView.evaluateJavaScript(badgeCountScript) { object, error in - if let error = error { - log.e(error) - // バッジ取得できないだけならそのまま処理を続ける - } - let (attachmentCount, commentCount) = self.parseBadge(badgeCountObject: object) - if self.navi?.isEmpty ?? true { - self.disableMenu() - } else if self.floatingPanelController == nil { - self.setMenu(attachmentCount: attachmentCount, commentCount: commentCount) - } else { - self.updateMenu(preservePosition: preservePosition, attachmentCount: attachmentCount, commentCount: commentCount) - } - } - } - } - } - } - - private func parseBadge(badgeCountObject: Any?) -> (Int, Int) { - guard let badgeCountString = badgeCountObject as? String else { return (0, 0) } - let counts = badgeCountString.split(separator: ":", maxSplits: 2) - .map { Int($0) ?? 0 } - if counts.count == 2 { - return (counts[0], counts[1]) - } else { - return (0, 0) - } - } - - func isButtonEnabled(index: Int) -> Bool { - // 書類制御機能やカスタム JavaScript によりナビボタンの有効状態が上書きされている場合もあるが、 - // XWEB.Navigator.isButtonEnabled は XWEB.Navigator.setButtonDisabled (setButtonEnabled) - // による上書き設定を反映するので naviBtnOverrides 参照不要 - let script = "XWEB.Navigator.isButtonEnabled(\(index));" - return (self.formWebView.evaluate(javaScript: script) as! Int).boolValue - } - - func doClick(index: Int) { - let script = "navi_doClick(\(index));" - self.formWebView.evaluateJavaScript(script) { value, error in - if let error = error { - log.e(error) - return - } - log.debug("navi_doClick(\(index)) :" + value.debugDescription) - } - } - - private func setMenuConstraint(menuIsEnabled: Bool) { - withFloatingPanelConstraint.isActive = menuIsEnabled - withoutFloatingPanelConstraint.isActive = !menuIsEnabled - } - - // モーダルメニュー非表示 - private func disableMenu() { - setMenuConstraint(menuIsEnabled: false) - if let controller = floatingPanelController { - controller.removePanelFromParent(animated: true) - floatingPanelController = nil - } - } - - // モーダルメニューを設定 - func setMenu(attachmentCount: Int, commentCount: Int) { - setMenuConstraint(menuIsEnabled: true) - floatingPanelController = FloatingPanelController() - floatingPanelController.delegate = self - floatingPanelController.surfaceView.cornerRadius = 0.0 - - setFullViewMenu(attachmentCount: attachmentCount, commentCount: commentCount) - - floatingPanelController.set(contentViewController: modalFullVC) - - floatingPanelController.isRemovalInteractionEnabled = false - floatingPanelController.addPanel(toParent: self, animated: true) - } - - // modal update - func updateMenu(preservePosition: Bool, attachmentCount: Int, commentCount: Int) { - setMenuConstraint(menuIsEnabled: true) - guard let navigator = self.navi else { return } - if !preservePosition { - floatingPanelController.move(to: .tip, animated: true) - } - modalFullVC.navi = navigator - modalFullVC.naviBtnOverrides = naviBtnOverrides - modalFullVC.attachmentCount = attachmentCount - modalFullVC.commentCount = commentCount - updateWebView(size: self.view.frame.size) - } - - // tip時のモーダルメニューを設置 - func setFullViewMenu(attachmentCount: Int, commentCount: Int) { - guard let navigator = self.navi else { return } - modalFullVCStoryBoard = UIStoryboard(name: "ModalFullCollectionViewController", bundle: nil) - modalFullVC = (modalFullVCStoryBoard.instantiateViewController(withIdentifier: "ModalFullCollectionViewController") as! ModalFullCollectionViewController) - modalFullVC.navi = navigator - modalFullVC.naviBtnOverrides = naviBtnOverrides - modalFullVC.attachmentCount = attachmentCount - modalFullVC.commentCount = commentCount - modalFullVC.viewDelegate = self - modalFullVC.width = self.view.frame.width - modalFullVC.height = floatingPanelController.layout.insetFor(position: .half) ?? 0.0 - } - - // WebView画面更新 - func updateWebView(size: CGSize) { - // webViewの表示幅を変更 - formWebView.frame.size.width = size.width - formWebView.frame.size.height = size.height - modalTipHeight - - modalFullVC.width = size.width - modalFullVC.height = floatingPanelController.layout.insetFor(position: .half) ?? 0.0 - - switch floatingPanelController.position { - case .tip: - modalFullVC.setScrollEnable(isScroll: false) - case .half: - modalFullVC.setScrollEnable(isScroll: true) - default: - break - } - - modalFullVC.viewDidLoad() - modalFullVC.scrollToTop() - } - - // ドラッグ時以外のモーダルの切り替え - private func moveModal() { - let position = floatingPanelController.position - switch position { - case .tip: - floatingPanelController.move(to: .half, animated: true) - case .half: - floatingPanelController.move(to: .tip, animated: true) - default: - break - } - updateWebView(size: self.view.frame.size) - } - - // 現在開かれているページのタイトルを必要に応じて更新する。 - private func updateTitle() { - self.formWebView.evaluateJavaScript("getDocumentId()") { object, error in - if error != nil { - // 開いているページによっては普通にエラーになるため特に記録などもしない。 - return - } - guard let docIdStr = object as? String, - let docId = Int(docIdStr) else { - return - } - let endpoint = GetDocumentInfoEndpoint(docId: docId) - Session.send(endpoint) { result in - switch result { - case .success(let response): - if let title = response.title.title1, !title.isEmpty { - DispatchQueue.main.async { - self.navigationItem.title = title - } - } - - case .failure: - // 開いているページによっては普通にエラーになるため特に記録などもしない。 - break - } - } - } - } -} - -extension FormWebViewController: SubWebViewStackEventDelegate { - func onClose(webView: WKWebView, stack: SubWebViewStack) { - if stack.isEmpty { - closeButton.title = localizadString(key: "Close", comment: "") - } - } -} - -extension FormWebViewController: WKNavigationDelegate { - func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) { - naviBtnOverrides.clear() - if subWebViewStack.isEmpty && historyStack.canGoBack { - showBackNavigation() - } else { - hideBackNavigation() - } - } - - func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { - self.getNavigatorButtonList(preservePosition: false) - if let current = webView.backForwardList.currentItem { - historyStack.put(current) - } - self.updateTitle() - } - - func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) { - log.e(error) - } - - func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) { - log.e(error) - } - - func webView(_ webView: WKWebView, decidePolicyFor navigationResponse: WKNavigationResponse, decisionHandler: @escaping (WKNavigationResponsePolicy) -> Void) { - if let attachmentFileName = attachmentFileName(ofResponce: navigationResponse), - let url = navigationResponse.response.url { - download(url: url, saveAs: attachmentFileName) - decisionHandler(.cancel) - } else { - decisionHandler(.allow) - } - } - - private func attachmentFileName(ofResponce navigationResponse: WKNavigationResponse) -> String? { - guard let response = navigationResponse.response as? HTTPURLResponse, - let contentDisposition = response.allHeaderFields["Content-Disposition"] as? String - else { return nil } - if let (fileNameStar: fileNameStar, fileName: fileName) = getAttachmentFileName(contentDisposition: contentDisposition) { - if let name = fileNameStar, let decoded = parseFilenameStar(name) { - return decoded - } else if let name = fileName { - return parseFilename(name) - } - } - return nil - } - - private func getAttachmentFileName(contentDisposition: String) -> (fileNameStar: String?, fileName: String?)? { - var isAttachment = false - var fileNameStar: String? - var fileName: String? - for keyValue in contentDisposition.split(separator: ";") { - let keyValuePair = keyValue.split(separator: "=", maxSplits: 2) - let key = keyValuePair[0].trimmingCharacters(in: .whitespaces) - switch key { - case "attachment": - isAttachment = true - - case "filename*": - if keyValuePair.count >= 2 { - fileNameStar = keyValuePair[1].trimmingCharacters(in: .whitespaces) - } - - case "filename": - if keyValuePair.count >= 2 { - fileName = keyValuePair[1].trimmingCharacters(in: .whitespaces) - } - - default: - break - } - } - if isAttachment { - return (fileNameStar: fileNameStar, fileName: fileName) - } else { - return nil - } - } - - private func parseFilenameStar(_ encoded: String) -> String? { - // RFC 5987 のパターン (ややルーズ) - guard let pattern = try? NSRegularExpression(pattern: "^([^']+)'([^']*)'(.*)$", options: []) else { return nil } - let results = pattern.matches(in: encoded, options: [], range: NSRange(0.. Substring { - let first = str.index(str.startIndex, offsetBy: nsRange.location) - let last = str.index(first, offsetBy: nsRange.length) - return str[first.. String { - // 非標準だが "" で囲まれているパターンもある - if (str.count >= 2) && str.hasPrefix("\"") && str.hasSuffix("\"") { - let first = str.index(after: str.startIndex) - let last = str.index(before: str.endIndex) - return String(str[first.. URLRequest { - var request = URLRequest(url: url) - let formHost = URL(string: formURL)!.host - // WebView と同じセッションでダウンロードできるように Cookie 設定。 - // 他サイトへのアクセス時に Cookie を漏らさないよう、ホスト名とパスを確認しておく。 - if (url.host == formHost) && url.path.starts(with: "/xpoint/x/v1/attachment/") { - request.setValue("JSESSIONID=\(sessionId!)", forHTTPHeaderField: "Cookie") - } - return request - } - - private func showBackNavigation() { - if var items = navigationItem.leftBarButtonItems { - if !items.contains(backButton) { - items.insert(backButton, at: 0) - navigationItem.leftBarButtonItems = items - } - } - } - - private func hideBackNavigation() { - if var items = navigationItem.leftBarButtonItems { - if let index = items.firstIndex(of: backButton) { - items.remove(at: index) - navigationItem.leftBarButtonItems = items - } - } - } -} - -extension FormWebViewController: WKUIDelegate { - func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { - rememverTappedLocation(gestureRecognizer) - adjustModalOnTap() - return true - } - - private func rememverTappedLocation(_ gestureRecognizer: UIGestureRecognizer) { - if let tapGestureRecognizer = gestureRecognizer as? UITapGestureRecognizer { - lastTappedLocation = tapGestureRecognizer.location(in: formWebView) - } - } - - // WebViewタップまたはタッチ時(書類操作時)に半モーダルをtip状態に変更 - private func adjustModalOnTap() { - guard let floatingPanelVC = floatingPanelController else { - return - } - switch floatingPanelVC.position { - case .tip: - break - default: - moveModal() - } - } - - func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping () -> Void) { - let alertController = UIAlertController(title: "", message: message, preferredStyle: .alert) - let okAction = UIAlertAction(title: localizadString(key: "OK", comment: ""), style: .default) { _ in - completionHandler() - } - alertController.addAction(okAction) - present(alertController, animated: true, completion: nil) - } - - func webView(_ webView: WKWebView, runJavaScriptConfirmPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping (Bool) -> Void) { - let alertController = UIAlertController(title: "", message: message, preferredStyle: .alert) - let okAction = UIAlertAction(title: localizadString(key: "OK", comment: ""), style: .default) { _ in - completionHandler(true) - } - let cancelAction = UIAlertAction(title: localizadString(key: "Cancel", comment: ""), style: .cancel) { _ in - completionHandler(false) - } - alertController.addAction(okAction) - alertController.addAction(cancelAction) - present(alertController, animated: true, completion: nil) - } - - func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? { - if navigationAction.targetFrame?.isMainFrame != true { - let webView = WKWebView(frame: view.frame, configuration: configuration) - webView.load(navigationAction.request) - subWebViewStack.push(webView, superView: view) - closeButton.title = localizadString(key: "Close Subwindow", comment: "") - return webView - } - return nil - } - - func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { - handleURLAuthenticationChallenge(challenge, completionHandler: completionHandler) - } - - @available(iOS 13.0, *) - func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, preferences: WKWebpagePreferences, decisionHandler: @escaping (WKNavigationActionPolicy, WKWebpagePreferences) -> Void) { - // 外部ページに遷移するときは戻るボタンを表示 - let url = navigationAction.request.url! - let formHost = URL(string: formURL)!.host - if url.host != nil && url.host != formHost { - self.returnButton.isEnabled = true - self.returnButton.tintColor = UIColor.white - } else if url.host != nil && url.host == formHost { - self.returnButton.isEnabled = false - self.returnButton.tintColor = UIColor.clear - } - - preferences.preferredContentMode = .mobile - decisionHandler(WKNavigationActionPolicy.allow, preferences) - } -} - -extension FormWebViewController: UIGestureRecognizerDelegate { - // WebViewでのタップイベントを有効化 - func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { - return true - } -} - -extension FormWebViewController: UIAdaptivePresentationControllerDelegate { - // モーダルが勝手に閉じないように設定 - func presentationControllerShouldDismiss(_ presentationController: UIPresentationController) -> Bool { - if floatingPanelController != nil { - self.floatingPanelController.move(to: .tip, animated: true) - updateWebView(size: self.view.frame.size) - } - return false - } -} - -extension FormWebViewController: UIPopoverPresentationControllerDelegate { - func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle { - return .none - } -} - -extension FormWebViewController: ModalFullCollectionViewControllerDelegate { - func didPresed(index: Int) { - if (floatingPanelController.position != .tip) && !(panelPositionPreservingButtonIndices?.contains(index) ?? false) { - moveModal() - } - self.doClick(index: index) - } -} - -extension FormWebViewController: UIScrollViewDelegate { - func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { - guard let floatingPanelVC = floatingPanelController else { - return - } - if case .half = floatingPanelVC.position { - self.moveModal() - } - } -} -// モーダルの動作設定 -extension FormWebViewController: FloatingPanelControllerDelegate { - // swiftlint:disable identifier_name - func floatingPanel(_ vc: FloatingPanelController, layoutFor newCollection: UITraitCollection) -> FloatingPanelLayout? { - // swiftlint:enable identifier_name - return self - } - - // swiftlint:disable identifier_name - func floatingPanelDidEndDecelerating(_ vc: FloatingPanelController) { - // swiftlint:enable identifier_name - switch vc.position { - case .tip: - updateWebView(size: self.view.frame.size) - case .half: - updateWebView(size: self.view.frame.size) - case .hidden: - floatingPanelController.move(to: .tip, animated: true) - updateWebView(size: self.view.frame.size) - default: - break - } - } -} - -// モーダルの初期設定 -extension FormWebViewController: FloatingPanelLayout { - var initialPosition: FloatingPanelPosition { - return .tip - } - - var supportedPositions: Set { - return [.half, .tip] - } - - func insetFor(position: FloatingPanelPosition) -> CGFloat? { - switch position { - case .tip: return modalTipHeight - case .half: - let height: CGFloat - if case .pad = UIDevice.current.userInterfaceIdiom { - height = UIScreen.main.bounds.height > UIScreen.main.bounds.width ? UIScreen.main.bounds.width : UIScreen.main.bounds.height - } else { - height = UIScreen.main.bounds.height - } - guard let navigationHeight = self.navigationController?.navigationBar.frame.height else { return nil } - return height * 0.5 - navigationHeight - case .full: return 0.0 - case .hidden: return 0.0 - } - } -} diff --git a/AgileWorks/AgileWorks/Form/View/FormWebViewScriptMessageHandler.swift b/AgileWorks/AgileWorks/Form/View/FormWebViewScriptMessageHandler.swift deleted file mode 100644 index 8c94f7a..0000000 --- a/AgileWorks/AgileWorks/Form/View/FormWebViewScriptMessageHandler.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// FormWebViewScriptMessageHandler.swift -// AgileWorks -// -// Created by 本多 洋平 on 2020/09/07. -// Copyright © 2020 ATLED CORP. All rights reserved. -// - -import Foundation -import WebKit - -class FormWebViewScriptMessageHandler: NSObject { - // controller, message, parameters - typealias HandlerType = (FormWebViewController, String, [String: Any?]) -> Void - - static let messageHandlers: [String: HandlerType] = [ - // パラメータ: なし - "naviStateChanged": { controller, _, _ in - controller.getNavigatorButtonList(preservePosition: false) - }, - - // パラメータ: "index": Int, "property": String, "value": String? - "naviButtonChanged": { controller, _, parameters in - let index = parameters["index"] as! Int - let property = parameters["property"] as! String - let value = parameters["value"] as! String? - - switch property { - case "label": - controller.naviBtnOverrides.putLabel(index: index, label: value ?? "") - - case "enabled": - controller.naviBtnOverrides.putEnabled(index: index, enabled: value == "true") - - default: - break - } - controller.getNavigatorButtonList(preservePosition: true) - }, - - // パラメータ: "from": Int, "to": Int - "pageMoved": { controller, _, _ in - controller.getNavigatorButtonList(preservePosition: true) - }, - - // パラメータ: "url": String - "newFormOpening": { controller, _, _ in - controller.historyStack.startWaitingNewPage() - }, - - // パラメータ: なし - "loggedOut": { controller, _, _ in - DispatchQueue.main.async { - let alertController = UIAlertController(title: localizadString(key: "LogoutAlertTitle", comment: ""), message: localizadString(key: "LogoutAlertMessage", comment: ""), preferredStyle: .alert) - let okAction = UIAlertAction(title: localizadString(key: "OK", comment: ""), style: .default) { _ in - controller.dismiss(animated: true, completion: nil) - } - alertController.addAction(okAction) - controller.present(alertController, animated: true, completion: nil) - } - } - ] - - private unowned let formWebViewController: FormWebViewController - - init(formWebViewController: FormWebViewController) { - self.formWebViewController = formWebViewController - } - - func registerHandlers(controller: WKUserContentController) { - for message in FormWebViewScriptMessageHandler.messageHandlers.keys { - controller.add(self, name: message) - } - } -} - -extension FormWebViewScriptMessageHandler: WKScriptMessageHandler { - func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { - guard let params = message.body as? [String: Any?], - let handler = FormWebViewScriptMessageHandler.messageHandlers[message.name] - else { return } - handler(self.formWebViewController, message.name, params) - } -} diff --git a/AgileWorks/AgileWorks/Form/View/ModalFullCollectionViewController.storyboard b/AgileWorks/AgileWorks/Form/View/ModalFullCollectionViewController.storyboard deleted file mode 100644 index 69913a5..0000000 --- a/AgileWorks/AgileWorks/Form/View/ModalFullCollectionViewController.storyboard +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AgileWorks/AgileWorks/Form/View/ModalFullCollectionViewController.swift b/AgileWorks/AgileWorks/Form/View/ModalFullCollectionViewController.swift deleted file mode 100644 index ef6b8f6..0000000 --- a/AgileWorks/AgileWorks/Form/View/ModalFullCollectionViewController.swift +++ /dev/null @@ -1,112 +0,0 @@ -// -// ModalFullCollectionViewController.swift -// AgileWorks -// -// Created by sbc on 2020/07/03. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// - -import UIKit - -enum ViewDidModalFull { - case showed - case none -} - -protocol ModalFullCollectionViewControllerDelegate: AnyObject { - func didPresed(index: Int) -} - -class ModalFullCollectionViewController: UIViewController { - @IBOutlet private var collectionView: UICollectionView! - @IBOutlet private var collectionViewHeight: NSLayoutConstraint! - weak var viewDelegate: ModalFullCollectionViewControllerDelegate? - var navi: [NaviBtns] = [] - var naviBtnOverrides: NaviBtnOverrides? - var attachmentCount = 0 - var commentCount = 0 - - private let padding: CGFloat = 10.0 - private let row: CGFloat = 2.0 - - var width: CGFloat! - var height: CGFloat! - - var layout: UICollectionViewFlowLayout! - - var showStatus: ViewDidModalFull = .none - - override func viewDidLoad() { - super.viewDidLoad() - verticalSetup() - showStatus = .showed - } - - private func verticalSetup() { - if layout == nil { - layout = UICollectionViewFlowLayout() - } - let cellHeight: CGFloat = 50 - - layout.scrollDirection = .vertical - - collectionViewHeight.constant = height - - layout.minimumInteritemSpacing = padding - layout.minimumLineSpacing = padding * 0.5 - layout.sectionInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) - layout.itemSize = CGSize(width: (baseWidth() - padding * row) / row, height: cellHeight) - - layout.sectionInsetReference = .fromSafeArea - collectionView.collectionViewLayout = layout - if case .showed = showStatus { - collectionView.reloadData() - } - } - - private func baseWidth() -> CGFloat { - if let insets = UIApplication.shared.keyWindow?.safeAreaInsets { - return width - (insets.left + insets.right) - } else { - return width - } - } - - func scrollToTop() { - collectionView.setContentOffset(.zero, animated: true) - } - - func setScrollEnable(isScroll: Bool) { - collectionView.isScrollEnabled = isScroll - } -} - -extension ModalFullCollectionViewController: UICollectionViewDataSource { - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return navi.count - } - - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "modalFullCollectionCell", for: indexPath) as! ModalCollectionViewCell - let naviBtns = navi[indexPath.row] - let override = naviBtnOverrides?.getOrNull(index: naviBtns.index) - let badge: Int - switch naviBtns.type { - case IconType.clip.rawValue: - badge = attachmentCount - case IconType.comment.rawValue: - badge = commentCount - default: - badge = 0 - } - cell.configure(naviBtns: naviBtns, override: override, badge: badge) - return cell - } -} - -extension ModalFullCollectionViewController: UICollectionViewDelegate { - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - viewDelegate?.didPresed(index: navi[indexPath.row].index) - collectionView.deselectItem(at: indexPath, animated: true) - } -} diff --git a/AgileWorks/AgileWorks/Form/View/SubWebView/SubWebViewStack.swift b/AgileWorks/AgileWorks/Form/View/SubWebView/SubWebViewStack.swift deleted file mode 100644 index d1a26d3..0000000 --- a/AgileWorks/AgileWorks/Form/View/SubWebView/SubWebViewStack.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// SubWebViewStack.swift -// AgileWorks -// -// Created by 本多 洋平 on 2020/09/11. -// Copyright © 2020 ATLED CORP. All rights reserved. -// - -import Foundation -import UIKit -import WebKit - -protocol SubWebViewStackEventDelegate : class { - func onClose(webView: WKWebView, stack: SubWebViewStack) -> (); -} - -class SubWebViewStack: NSObject { - private var webViews = [WKWebView]() - public weak var eventDelegate: SubWebViewStackEventDelegate? - - public var isEmpty: Bool { - return webViews.isEmpty - } - - func push(_ webView: WKWebView, superView: UIView) { - webViews.append(webView) - webView.uiDelegate = self - superView.addSubview(webView) - } - - func pop() -> WKWebView? { - if webViews.isEmpty { - return nil - } else { - let webView = webViews.removeLast() - cleanup(webView) - return webView - } - } - - func remove(_ webView: WKWebView) -> WKWebView? { - if let index = webViews.firstIndex(of: webView) { - let webView = webViews.remove(at: index) - cleanup(webView) - return webView - } else { - return nil - } - } - - private func cleanup(_ webView: WKWebView) { - webView.removeFromSuperview() - eventDelegate?.onClose(webView: webView, stack: self) - } -} - -extension SubWebViewStack: WKUIDelegate { - func webViewDidClose(_ webView: WKWebView) { - // スクリプトで閉じられる場合。最上段でなくとも削除される可能性を考慮。 - _ = remove(webView) - } -} diff --git a/AgileWorks/AgileWorks/Form/View/WebViewHistoryStack.swift b/AgileWorks/AgileWorks/Form/View/WebViewHistoryStack.swift deleted file mode 100644 index 8dc4a55..0000000 --- a/AgileWorks/AgileWorks/Form/View/WebViewHistoryStack.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// WebViewHistoryStack.swift -// AgileWorks -// -// Created by 本多 洋平 on 2020/12/18. -// Copyright © 2020 ATLED CORP. All rights reserved. -// - -import WebKit - -/// 戻るべきページを管理するスタック。 -/// 通常のページ遷移とは異なる遷移が必要なため別途管理。 -class WebViewHistoryStack { - // 次に積まれた WKNavigationListItem を新しい履歴として管理するか。 - // false の場合、navigationStack に必ずひとつ以上の要素がなければならない。 - private var waitingNewPage = true - // 遷移先管理用スタック。 - private var navigationStack = [WKBackForwardListItem]() - - /// 指定された項目を新たな遷移先として設定する。 - /// - /// 新規ページを待っている場合は新しい要素として積み、そうでなければ最後の要素を上書きする。 - /// - /// - Parameters: - /// - item: 新たに設定する遷移先 - func put(_ item: WKBackForwardListItem) { - print("putting \(item.url) [waiting new page: \(waitingNewPage)]") - if waitingNewPage { - navigationStack.append(item) - waitingNewPage = false - } else { - navigationStack[navigationStack.count - 1] = item - } - } - - /// 履歴を戻るために最新の項目を破棄し、戻るべき項目を返す。 - /// - /// - Returns: 戻るべき項目。破棄した項目ではなく、新しく最新となる項目であることに注意。 - /// これ以上戻るべきページがない場合は `null`。 - func pop() -> WKBackForwardListItem? { - if !waitingNewPage { - navigationStack.removeLast() - } - - if navigationStack.isEmpty { - // これ以上戻るページがない - waitingNewPage = true - return nil - } else { - // 戻るページがあればその項目。また、次からその項目が更新される。 - waitingNewPage = false - return navigationStack.last - } - } - - /// 新しいページ街を開始する。今までの最新履歴が次に戻るべきページになる。 - func startWaitingNewPage() { - waitingNewPage = true - } - - /// 戻り先があれば `true`、なければ `false`。 - var canGoBack: Bool { - if waitingNewPage { - // 新規ページを待っている状態なら、スタックの末尾が戻るべきページなので空かどうかで判別。 - return !navigationStack.isEmpty - } else { - // 既にどこかに遷移した後なら、更にその前があるかどうかで判別。 - return navigationStack.count > 1 - } - } -} diff --git a/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings b/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings index ad3fde4..ef1a6f5 100644 --- a/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings +++ b/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings @@ -13,7 +13,6 @@ "AppVersion" = "App ver. %@"; // Login -"Language" = "中文(簡体)"; "ServerURLPlaceholder" = "AgileWorksサーバ"; "ContextPlaceholder" = "AgileWorks"; "LoginButton" = "接続"; @@ -59,49 +58,6 @@ // Notification "DocOverrideConfirm" = "既に通知タップによる書類が表示されています。\n現在の編集内容を破棄し、新たな書類を表示しますか。"; -// Approval -"ApprovalTitle" = "承認一覧"; -"ApprovalData" = "%1$@ (%2$@)"; - -// Approval Detail, Search Result -"Number" = "No. %d"; -"Form" = "%@"; -//"Draft" = "下書き"; -"Approving" = "承認中"; -"Hold" = "保留"; -"Reject" = "却下"; -"RejectDraft" = "差し戻し"; -"RejectAuthorize" = "差し戻し"; -"SendBack" = "起票者へ差し戻し"; -"Remand" = "承認者へ差し戻し"; -"Approved" = "承認完了"; -"Request" = "申請: %1$@"; -"Update" = "更新: %1$@"; -"Approvers" = "承認者: [%@]"; -"Total" = " %@件 "; - -// Submission -"SubmissionTitle" = "提出一覧"; -"SubmissionData" = "%1$@ (%2$@)"; -"AutoSelectRoute" = "(自動選択ルート)"; - -// Submission Detail -"SubmissionName" = "%@"; -"SubmissionRoute" = "%@"; - -// Search -"FormName" = "フォーム名"; -"DocNumber" = "書類 No"; -"Subject" = "件名"; -"FalseDocButton" = "書類Noは数値のみ入力可能"; - -// Search Result -"SearchResultTitle" = "検索結果"; -"SearchNoData" = "条件に一致する結果は見つかりませんでした"; -"Loading" = "検索中"; - -"NoData" = "データがありません"; - // Refresh Token Error "RefreshTokenUpdateErrorTitle" = "アクセストークン更新エラー"; "RefreshTokenUpdateError" = "AgileWorksサーバへアクセスするためのトークンの更新が行えませんでした。\n再ログインする必要があります。"; @@ -112,22 +68,15 @@ "NotConnectNetworkError" = "インターネットにアクセスするにはモバイルデータ通信をオンにするかWi-Fiを利用してください"; "TimedOutNetworkError" = "インターネットに接続できません\nしばらく経ってから再度おためしください"; -// Setting -"SettingTitle" = "設定"; -"Domain" = "所属ドメイン"; -"Name" = "氏名"; -"Character" = "カナ"; -"primaryGroupName" = "所属"; -"PrimaryGroupPartName" = "役職"; +// logout "LogoutConfirm" = "你想登出吗?"; + +// Alert Form "YES" = "有"; "NO" = "无"; - -// Form "OK" = "OK"; "Cancel" = "キャンセル"; "Close" = "閉じる"; -"Close Subwindow" = "閉じる (サブウィンドウ)"; // Form (ログアウト通知) "LogoutAlertTitle" = "ログアウト通知"; @@ -136,29 +85,11 @@ // Color "MainColor" = "DarkMauve"; "IndicatorBackgroud" = "IndicatorBackgroud"; -"SectionColor" = "DarkGray"; "SeparatorColor" = "PastelGray"; -"SelectCellBgColor" = "PastelGray"; -"DraftColor" = "Gray"; -"ApprovingColor" = "Orange"; -"HoldColor" = "DarkMauve"; -"RejectColor" = "Red"; -"RemandColor" = "Blue"; -"ApprovedColor" = "Green"; -"ClickBtnColor" = "Mouse"; - -// Image -"HeaderIcon" = "folder"; -"HeaderRightIcon" = "right"; -"checkIcon" = "CheckIcon"; -"checkNoIcon" = "CheckNoIcon"; // TodayExtension "NotLogedin" = "アプリからログインしてください"; - -// WfAction -"WfApprove" = "承認"; -"WfSuspend" = "保留"; +"NoData" = "データがありません"; // ShareExtension "CertificateTitle" = "クライアント証明書"; diff --git a/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings b/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings index 5420cc4..d2b3841 100644 --- a/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings +++ b/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings @@ -13,7 +13,6 @@ "AppVersion" = "App ver. %@"; // Login -"Language" = "中文(繁体)"; "ServerURLPlaceholder" = "AgileWorksサーバ"; "ContextPlaceholder" = "AgileWorks"; "LoginButton" = "接続"; @@ -59,49 +58,6 @@ // Notification "DocOverrideConfirm" = "既に通知タップによる書類が表示されています。\n現在の編集内容を破棄し、新たな書類を表示しますか。"; -// Approval -"ApprovalTitle" = "承認一覧"; -"ApprovalData" = "%1$@ (%2$@)"; - -// Approval Detail, Search Result -"Number" = "No. %d"; -"Form" = "%@"; -//"Draft" = "下書き"; -"Approving" = "承認中"; -"Hold" = "保留"; -"Reject" = "却下"; -"RejectDraft" = "差し戻し"; -"RejectAuthorize" = "差し戻し"; -"SendBack" = "起票者へ差し戻し"; -"Remand" = "承認者へ差し戻し"; -"Approved" = "承認完了"; -"Request" = "申請: %1$@"; -"Update" = "更新: %1$@"; -"Approvers" = "承認者: [%@]"; -"Total" = " %@件 "; - -// Submission -"SubmissionTitle" = "提出一覧"; -"SubmissionData" = "%1$@ (%2$@)"; -"AutoSelectRoute" = "(自動選択ルート)"; - -// Submission Detail -"SubmissionName" = "%@"; -"SubmissionRoute" = "%@"; - -// Search -"FormName" = "フォーム名"; -"DocNumber" = "書類 No"; -"Subject" = "件名"; -"FalseDocButton" = "書類Noは数値のみ入力可能"; - -// Search Result -"SearchResultTitle" = "検索結果"; -"SearchNoData" = "条件に一致する結果は見つかりませんでした"; -"Loading" = "検索中"; - -"NoData" = "データがありません"; - // Refresh Token Error "RefreshTokenUpdateErrorTitle" = "アクセストークン更新エラー"; "RefreshTokenUpdateError" = "AgileWorksサーバへアクセスするためのトークンの更新が行えませんでした。\n再ログインする必要があります。"; @@ -112,22 +68,15 @@ "NotConnectNetworkError" = "インターネットにアクセスするにはモバイルデータ通信をオンにするかWi-Fiを利用してください"; "TimedOutNetworkError" = "インターネットに接続できません\nしばらく経ってから再度おためしください"; -// Setting -"SettingTitle" = "設定"; -"Domain" = "所属ドメイン"; -"Name" = "氏名"; -"Character" = "カナ"; -"primaryGroupName" = "所属"; -"PrimaryGroupPartName" = "役職"; +// logout "LogoutConfirm" = "你想登出嗎?"; + +// Alert Form "YES" = "有"; "NO" = "無"; - -// Form "OK" = "OK"; "Cancel" = "キャンセル"; "Close" = "閉じる"; -"Close Subwindow" = "閉じる (サブウィンドウ)"; // Form (ログアウト通知) "LogoutAlertTitle" = "ログアウト通知"; @@ -136,29 +85,11 @@ // Color "MainColor" = "DarkMauve"; "IndicatorBackgroud" = "IndicatorBackgroud"; -"SectionColor" = "DarkGray"; "SeparatorColor" = "PastelGray"; -"SelectCellBgColor" = "PastelGray"; -"DraftColor" = "Gray"; -"ApprovingColor" = "Orange"; -"HoldColor" = "DarkMauve"; -"RejectColor" = "Red"; -"RemandColor" = "Blue"; -"ApprovedColor" = "Green"; -"ClickBtnColor" = "Mouse"; - -// Image -"HeaderIcon" = "folder"; -"HeaderRightIcon" = "right"; -"checkIcon" = "CheckIcon"; -"checkNoIcon" = "CheckNoIcon"; // TodayExtension "NotLogedin" = "アプリからログインしてください"; - -// WfAction -"WfApprove" = "承認"; -"WfSuspend" = "保留"; +"NoData" = "データがありません"; // ShareExtension "CertificateTitle" = "クライアント証明書"; diff --git a/AgileWorks/AgileWorks/Strings/English.strings b/AgileWorks/AgileWorks/Strings/English.strings index 61e732b..5f0f00d 100644 --- a/AgileWorks/AgileWorks/Strings/English.strings +++ b/AgileWorks/AgileWorks/Strings/English.strings @@ -13,7 +13,6 @@ "AppVersion" = "App ver. %@"; // Login -"Language" = "English"; "ServerURLPlaceholder" = "AgileWorksサーバ"; "ContextPlaceholder" = "AgileWorks"; "LoginButton" = "接続"; @@ -59,49 +58,6 @@ // Notification "DocOverrideConfirm" = "既に通知タップによる書類が表示されています。\n現在の編集内容を破棄し、新たな書類を表示しますか。"; -// Approval -"ApprovalTitle" = "承認一覧"; -"ApprovalData" = "%1$@ (%2$@)"; - -// Approval Detail, Search Result -"Number" = "No. %d"; -"Form" = "%@"; -//"Draft" = "下書き"; -"Approving" = "承認中"; -"Hold" = "保留"; -"Reject" = "却下"; -"RejectDraft" = "差し戻し"; -"RejectAuthorize" = "差し戻し"; -"SendBack" = "起票者へ差し戻し"; -"Remand" = "承認者へ差し戻し"; -"Approved" = "承認完了"; -"Request" = "申請: %1$@"; -"Update" = "更新: %1$@"; -"Approvers" = "承認者: [%@]"; -"Total" = " %@件 "; - -// Submission -"SubmissionTitle" = "提出一覧"; -"SubmissionData" = "%1$@ (%2$@)"; -"AutoSelectRoute" = "(自動選択ルート)"; - -// Submission Detail -"SubmissionName" = "%@"; -"SubmissionRoute" = "%@"; - -// Search -"FormName" = "フォーム名"; -"DocNumber" = "書類 No"; -"Subject" = "件名"; -"FalseDocButton" = "書類Noは数値のみ入力可能"; - -// Search Result -"SearchResultTitle" = "検索結果"; -"SearchNoData" = "条件に一致する結果は見つかりませんでした"; -"Loading" = "検索中"; - -"NoData" = "データがありません"; - // Refresh Token Error "RefreshTokenUpdateErrorTitle" = "アクセストークン更新エラー"; "RefreshTokenUpdateError" = "AgileWorksサーバへアクセスするためのトークンの更新が行えませんでした。\n再ログインする必要があります。"; @@ -112,22 +68,15 @@ "NotConnectNetworkError" = "インターネットにアクセスするにはモバイルデータ通信をオンにするかWi-Fiを利用してください"; "TimedOutNetworkError" = "インターネットに接続できません\nしばらく経ってから再度おためしください"; -// Setting -"SettingTitle" = "設定"; -"Domain" = "所属ドメイン"; -"Name" = "氏名"; -"Character" = "カナ"; -"primaryGroupName" = "所属"; -"PrimaryGroupPartName" = "役職"; +// logout "LogoutConfirm" = "Would you like to log out?"; + +// Alert Form "YES" = "Yes"; "NO" = "No"; - -// Form "OK" = "OK"; "Cancel" = "Cancel"; "Close" = "Close"; -"Close Subwindow" = "Close Subwindow"; // Form (ログアウト通知) "LogoutAlertTitle" = "ログアウト通知"; @@ -136,29 +85,11 @@ // Color "MainColor" = "DarkMauve"; "IndicatorBackgroud" = "IndicatorBackgroud"; -"SectionColor" = "DarkGray"; "SeparatorColor" = "PastelGray"; -"SelectCellBgColor" = "PastelGray"; -"DraftColor" = "Gray"; -"ApprovingColor" = "Orange"; -"HoldColor" = "DarkMauve"; -"RejectColor" = "Red"; -"RemandColor" = "Blue"; -"ApprovedColor" = "Green"; -"ClickBtnColor" = "Mouse"; - -// Image -"HeaderIcon" = "folder"; -"HeaderRightIcon" = "right"; -"checkIcon" = "CheckIcon"; -"checkNoIcon" = "CheckNoIcon"; // TodayExtension "NotLogedin" = "アプリからログインしてください"; - -// WfAction -"WfApprove" = "Approve"; -"WfSuspend" = "Suspend"; +"NoData" = "データがありません"; // ShareExtension "CertificateTitle" = "クライアント証明書"; diff --git a/AgileWorks/AgileWorks/Strings/Japanese.strings b/AgileWorks/AgileWorks/Strings/Japanese.strings index bc3dba1..8c2cc20 100644 --- a/AgileWorks/AgileWorks/Strings/Japanese.strings +++ b/AgileWorks/AgileWorks/Strings/Japanese.strings @@ -13,7 +13,6 @@ "AppVersion" = "App ver. %@"; // Login -"Language" = "日本語"; "ServerURLPlaceholder" = "AgileWorksサーバ"; "ContextPlaceholder" = "AgileWorks"; "LoginButton" = "接続"; @@ -59,49 +58,6 @@ // Notification "DocOverrideConfirm" = "既に通知タップによる書類が表示されています。\n現在の編集内容を破棄し、新たな書類を表示しますか。"; -// Approval -"ApprovalTitle" = "承認一覧"; -"ApprovalData" = "%1$@ (%2$@)"; - -// Approval Detail, Search Result -"Number" = "No. %d"; -"Form" = "%@"; -//"Draft" = "下書き"; -"Approving" = "承認中"; -"Hold" = "保留"; -"Reject" = "却下"; -"RejectDraft" = "差し戻し"; -"RejectAuthorize" = "差し戻し"; -"SendBack" = "起票者へ差し戻し"; -"Remand" = "承認者へ差し戻し"; -"Approved" = "承認完了"; -"Request" = "申請: %1$@"; -"Update" = "更新: %1$@"; -"Approvers" = "承認者: [%@]"; -"Total" = " %@件 "; - -// Submission -"SubmissionTitle" = "提出一覧"; -"SubmissionData" = "%1$@ (%2$@)"; -"AutoSelectRoute" = "(自動選択ルート)"; - -// Submission Detail -"SubmissionName" = "%@"; -"SubmissionRoute" = "%@"; - -// Search -"FormName" = "フォーム名"; -"DocNumber" = "書類 No"; -"Subject" = "件名"; -"FalseDocButton" = "書類Noは数値のみ入力可能"; - -// Search Result -"SearchResultTitle" = "検索結果"; -"SearchNoData" = "条件に一致する結果は見つかりませんでした"; -"Loading" = "検索中"; - -"NoData" = "データがありません"; - // Refresh Token Error "RefreshTokenUpdateErrorTitle" = "アクセストークン更新エラー"; "RefreshTokenUpdateError" = "AgileWorksサーバへアクセスするためのトークンの更新が行えませんでした。\n再ログインする必要があります。"; @@ -112,22 +68,15 @@ "NotConnectNetworkError" = "インターネットにアクセスするにはモバイルデータ通信をオンにするかWi-Fiを利用してください"; "TimedOutNetworkError" = "インターネットに接続できません\nしばらく経ってから再度おためしください"; -// Setting -"SettingTitle" = "設定"; -"Domain" = "所属ドメイン"; -"Name" = "氏名"; -"Character" = "カナ"; -"primaryGroupName" = "所属"; -"PrimaryGroupPartName" = "役職"; +// logout "LogoutConfirm" = "ログアウトしますか?"; + +// Alert Form "YES" = "はい"; "NO" = "いいえ"; - -// Form "OK" = "OK"; "Cancel" = "キャンセル"; "Close" = "閉じる"; -"Close Subwindow" = "閉じる (サブウィンドウ)"; // Form (ログアウト通知) "LogoutAlertTitle" = "ログアウト通知"; @@ -136,29 +85,11 @@ // Color "MainColor" = "DarkMauve"; "IndicatorBackgroud" = "IndicatorBackgroud"; -"SectionColor" = "DarkGray"; "SeparatorColor" = "PastelGray"; -"SelectCellBgColor" = "PastelGray"; -"DraftColor" = "Gray"; -"ApprovingColor" = "Orange"; -"HoldColor" = "DarkMauve"; -"RejectColor" = "Red"; -"RemandColor" = "Blue"; -"ApprovedColor" = "Green"; -"ClickBtnColor" = "Mouse"; - -// Image -"HeaderIcon" = "folder"; -"HeaderRightIcon" = "right"; -"checkIcon" = "CheckIcon"; -"checkNoIcon" = "CheckNoIcon"; // TodayExtension "NotLogedin" = "アプリからログインしてください"; - -// WfAction -"WfApprove" = "承認"; -"WfSuspend" = "保留"; +"NoData" = "データがありません"; // ShareExtension "CertificateTitle" = "クライアント証明書"; diff --git a/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings index f2ac9c2..a4dce04 100644 --- a/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings @@ -13,7 +13,6 @@ "AppVersion" = "App ver. %@"; // Login -"Language" = "auto"; "ServerURLPlaceholder" = "AgileWorksサーバ"; "ContextPlaceholder" = "AgileWorks"; "LoginButton" = "接続"; @@ -59,49 +58,6 @@ // Notification "DocOverrideConfirm" = "既に通知タップによる書類が表示されています。\n現在の編集内容を破棄し、新たな書類を表示しますか。"; -// Approval -"ApprovalTitle" = "承認一覧"; -"ApprovalData" = "%1$@ (%2$@)"; - -// Approval Detail, Search Result -"Number" = "No. %d"; -"Form" = "%@"; -//"Draft" = "下書き"; -"Approving" = "承認中"; -"Hold" = "保留"; -"Reject" = "却下"; -"RejectDraft" = "差し戻し"; -"RejectAuthorize" = "差し戻し"; -"SendBack" = "起票者へ差し戻し"; -"Remand" = "承認者へ差し戻し"; -"Approved" = "承認完了"; -"Request" = "申請: %1$@"; -"Update" = "更新: %1$@"; -"Approvers" = "承認者: [%@]"; -"Total" = " %@件 "; - -// Submission -"SubmissionTitle" = "提出一覧"; -"SubmissionData" = "%1$@ (%2$@)"; -"AutoSelectRoute" = "(自動選択ルート)"; - -// Submission Detail -"SubmissionName" = "%@"; -"SubmissionRoute" = "%@"; - -// Search -"FormName" = "フォーム名"; -"DocNumber" = "書類 No"; -"Subject" = "件名"; -"FalseDocButton" = "書類Noは数値のみ入力可能"; - -// Search Result -"SearchResultTitle" = "検索結果"; -"SearchNoData" = "条件に一致する結果は見つかりませんでした"; -"Loading" = "検索中"; - -"NoData" = "データがありません"; - // Refresh Token Error "RefreshTokenUpdateErrorTitle" = "アクセストークン更新エラー"; "RefreshTokenUpdateError" = "AgileWorksサーバへアクセスするためのトークンの更新が行えませんでした。\n再ログインする必要があります。"; @@ -112,22 +68,15 @@ "NotConnectNetworkError" = "インターネットにアクセスするにはモバイルデータ通信をオンにするかWi-Fiを利用してください"; "TimedOutNetworkError" = "インターネットに接続できません\nしばらく経ってから再度おためしください"; -// Setting -"SettingTitle" = "設定"; -"Domain" = "所属ドメイン"; -"Name" = "氏名"; -"Character" = "カナ"; -"primaryGroupName" = "所属"; -"PrimaryGroupPartName" = "役職"; +// logout "LogoutConfirm" = "Would you like to log out?"; + +// Alert Form "YES" = "Yes"; "NO" = "No"; - -// Form "OK" = "OK"; "Cancel" = "Cancel"; "Close" = "Close"; -"Close Subwindow" = "Close Subwindow"; // Form (ログアウト通知) "LogoutAlertTitle" = "ログアウト通知"; @@ -136,29 +85,11 @@ // Color "MainColor" = "DarkMauve"; "IndicatorBackgroud" = "IndicatorBackgroud"; -"SectionColor" = "DarkGray"; "SeparatorColor" = "PastelGray"; -"SelectCellBgColor" = "PastelGray"; -"DraftColor" = "Gray"; -"ApprovingColor" = "Orange"; -"HoldColor" = "DarkMauve"; -"RejectColor" = "Red"; -"RemandColor" = "Blue"; -"ApprovedColor" = "Green"; -"ClickBtnColor" = "Mouse"; - -// Image -"HeaderIcon" = "folder"; -"HeaderRightIcon" = "right"; -"checkIcon" = "CheckIcon"; -"checkNoIcon" = "CheckNoIcon"; // TodayExtension "NotLogedin" = "アプリからログインしてください"; - -// WfAction -"WfApprove" = "Approve"; -"WfSuspend" = "Suspend"; +"NoData" = "データがありません"; // ShareExtension "CertificateTitle" = "クライアント証明書"; diff --git a/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings index d2446f2..e7e919a 100644 --- a/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings @@ -13,7 +13,6 @@ "AppVersion" = "App ver. %@"; // Login -"Language" = "自動"; "ServerURLPlaceholder" = "AgileWorksサーバ"; "ContextPlaceholder" = "AgileWorks"; "LoginButton" = "接続"; @@ -59,49 +58,6 @@ // Notification "DocOverrideConfirm" = "既に通知タップによる書類が表示されています。\n現在の編集内容を破棄し、新たな書類を表示しますか。"; -// Approval -"ApprovalTitle" = "承認一覧"; -"ApprovalData" = "%1$@ (%2$@)"; - -// Approval Detail, Search Result -"Number" = "No. %d"; -"Form" = "%@"; -//"Draft" = "下書き"; -"Approving" = "承認中"; -"Hold" = "保留"; -"Reject" = "却下"; -"RejectDraft" = "差し戻し"; -"RejectAuthorize" = "差し戻し"; -"SendBack" = "起票者へ差し戻し"; -"Remand" = "承認者へ差し戻し"; -"Approved" = "承認完了"; -"Request" = "申請: %1$@"; -"Update" = "更新: %1$@"; -"Approvers" = "承認者: [%@]"; -"Total" = " %@件 "; - -// Submission -"SubmissionTitle" = "提出一覧"; -"SubmissionData" = "%1$@ (%2$@)"; -"AutoSelectRoute" = "(自動選択ルート)"; - -// Submission Detail -"SubmissionName" = "%@"; -"SubmissionRoute" = "%@"; - -// Search -"FormName" = "フォーム名"; -"DocNumber" = "書類 No"; -"Subject" = "件名"; -"FalseDocButton" = "書類Noは数値のみ入力可能"; - -// Search Result -"SearchResultTitle" = "検索結果"; -"SearchNoData" = "条件に一致する結果は見つかりませんでした"; -"Loading" = "検索中"; - -"NoData" = "データがありません"; - // Refresh Token Error "RefreshTokenUpdateErrorTitle" = "アクセストークン更新エラー"; "RefreshTokenUpdateError" = "AgileWorksサーバへアクセスするためのトークンの更新が行えませんでした。\n再ログインする必要があります。"; @@ -112,22 +68,15 @@ "NotConnectNetworkError" = "インターネットにアクセスするにはモバイルデータ通信をオンにするかWi-Fiを利用してください"; "TimedOutNetworkError" = "インターネットに接続できません\nしばらく経ってから再度おためしください"; -// Setting -"SettingTitle" = "設定"; -"Domain" = "所属ドメイン"; -"Name" = "氏名"; -"Character" = "カナ"; -"primaryGroupName" = "所属"; -"PrimaryGroupPartName" = "役職"; +// logout "LogoutConfirm" = "ログアウトしますか?"; + +// Alert Form "YES" = "はい"; "NO" = "いいえ"; - -// Form "OK" = "OK"; "Cancel" = "キャンセル"; "Close" = "閉じる"; -"Close Subwindow" = "閉じる (サブウィンドウ)"; // Form (ログアウト通知) "LogoutAlertTitle" = "ログアウト通知"; @@ -136,29 +85,11 @@ // Color "MainColor" = "DarkMauve"; "IndicatorBackgroud" = "IndicatorBackgroud"; -"SectionColor" = "DarkGray"; "SeparatorColor" = "PastelGray"; -"SelectCellBgColor" = "PastelGray"; -"DraftColor" = "Gray"; -"ApprovingColor" = "Orange"; -"HoldColor" = "DarkMauve"; -"RejectColor" = "Red"; -"RemandColor" = "Blue"; -"ApprovedColor" = "Green"; -"ClickBtnColor" = "Mouse"; - -// Image -"HeaderIcon" = "folder"; -"HeaderRightIcon" = "right"; -"checkIcon" = "CheckIcon"; -"checkNoIcon" = "CheckNoIcon"; // TodayExtension "NotLogedin" = "アプリからログインしてください"; - -// WfAction -"WfApprove" = "承認"; -"WfSuspend" = "保留"; +"NoData" = "データがありません"; // ShareExtension "CertificateTitle" = "クライアント証明書"; diff --git a/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings index 508434f..39b212a 100644 --- a/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings @@ -13,7 +13,6 @@ "AppVersion" = "App ver. %@"; // Login -"Language" = "自动的"; "ServerURLPlaceholder" = "AgileWorksサーバ"; "ContextPlaceholder" = "AgileWorks"; "LoginButton" = "接続"; @@ -59,49 +58,6 @@ // Notification "DocOverrideConfirm" = "既に通知タップによる書類が表示されています。\n現在の編集内容を破棄し、新たな書類を表示しますか。"; -// Approval -"ApprovalTitle" = "承認一覧"; -"ApprovalData" = "%1$@ (%2$@)"; - -// Approval Detail, Search Result -"Number" = "No. %d"; -"Form" = "%@"; -//"Draft" = "下書き"; -"Approving" = "承認中"; -"Hold" = "保留"; -"Reject" = "却下"; -"RejectDraft" = "差し戻し"; -"RejectAuthorize" = "差し戻し"; -"SendBack" = "起票者へ差し戻し"; -"Remand" = "承認者へ差し戻し"; -"Approved" = "承認完了"; -"Request" = "申請: %1$@"; -"Update" = "更新: %1$@"; -"Approvers" = "承認者: [%@]"; -"Total" = " %@件 "; - -// Submission -"SubmissionTitle" = "提出一覧"; -"SubmissionData" = "%1$@ (%2$@)"; -"AutoSelectRoute" = "(自動選択ルート)"; - -// Submission Detail -"SubmissionName" = "%@"; -"SubmissionRoute" = "%@"; - -// Search -"FormName" = "フォーム名"; -"DocNumber" = "書類 No"; -"Subject" = "件名"; -"FalseDocButton" = "書類Noは数値のみ入力可能"; - -// Search Result -"SearchResultTitle" = "検索結果"; -"SearchNoData" = "条件に一致する結果は見つかりませんでした"; -"Loading" = "検索中"; - -"NoData" = "データがありません"; - // Refresh Token Error "RefreshTokenUpdateErrorTitle" = "アクセストークン更新エラー"; "RefreshTokenUpdateError" = "AgileWorksサーバへアクセスするためのトークンの更新が行えませんでした。\n再ログインする必要があります。"; @@ -112,22 +68,15 @@ "NotConnectNetworkError" = "インターネットにアクセスするにはモバイルデータ通信をオンにするかWi-Fiを利用してください"; "TimedOutNetworkError" = "インターネットに接続できません\nしばらく経ってから再度おためしください"; -// Setting -"SettingTitle" = "設定"; -"Domain" = "所属ドメイン"; -"Name" = "氏名"; -"Character" = "カナ"; -"primaryGroupName" = "所属"; -"PrimaryGroupPartName" = "役職"; +// logout "LogoutConfirm" = "你想登出吗?"; + +// Alert Form "YES" = "有"; "NO" = "无"; - -// Form "OK" = "OK"; "Cancel" = "キャンセル"; "Close" = "閉じる"; -"Close Subwindow" = "閉じる (サブウィンドウ)"; // Form (ログアウト通知) "LogoutAlertTitle" = "ログアウト通知"; @@ -136,29 +85,11 @@ // Color "MainColor" = "DarkMauve"; "IndicatorBackgroud" = "IndicatorBackgroud"; -"SectionColor" = "DarkGray"; "SeparatorColor" = "PastelGray"; -"SelectCellBgColor" = "PastelGray"; -"DraftColor" = "Gray"; -"ApprovingColor" = "Orange"; -"HoldColor" = "DarkMauve"; -"RejectColor" = "Red"; -"RemandColor" = "Blue"; -"ApprovedColor" = "Green"; -"ClickBtnColor" = "Mouse"; - -// Image -"HeaderIcon" = "folder"; -"HeaderRightIcon" = "right"; -"checkIcon" = "CheckIcon"; -"checkNoIcon" = "CheckNoIcon"; // TodayExtension "NotLogedin" = "アプリからログインしてください"; - -// WfAction -"WfApprove" = "承認"; -"WfSuspend" = "保留"; +"NoData" = "データがありません"; // ShareExtension "CertificateTitle" = "クライアント証明書"; diff --git a/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings index a35aab6..5369a0c 100644 --- a/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings @@ -13,7 +13,6 @@ "AppVersion" = "App ver. %@"; // Login -"Language" = "自動的"; "ServerURLPlaceholder" = "AgileWorksサーバ"; "ContextPlaceholder" = "AgileWorks"; "LoginButton" = "接続"; @@ -59,49 +58,6 @@ // Notification "DocOverrideConfirm" = "既に通知タップによる書類が表示されています。\n現在の編集内容を破棄し、新たな書類を表示しますか。"; -// Approval -"ApprovalTitle" = "承認一覧"; -"ApprovalData" = "%1$@ (%2$@)"; - -// Approval Detail, Search Result -"Number" = "No. %d"; -"Form" = "%@"; -//"Draft" = "下書き"; -"Approving" = "承認中"; -"Hold" = "保留"; -"Reject" = "却下"; -"RejectDraft" = "差し戻し"; -"RejectAuthorize" = "差し戻し"; -"SendBack" = "起票者へ差し戻し"; -"Remand" = "承認者へ差し戻し"; -"Approved" = "承認完了"; -"Request" = "申請: %1$@"; -"Update" = "更新: %1$@"; -"Approvers" = "承認者: [%@]"; -"Total" = " %@件 "; - -// Submission -"SubmissionTitle" = "提出一覧"; -"SubmissionData" = "%1$@ (%2$@)"; -"AutoSelectRoute" = "(自動選択ルート)"; - -// Submission Detail -"SubmissionName" = "%@"; -"SubmissionRoute" = "%@"; - -// Search -"FormName" = "フォーム名"; -"DocNumber" = "書類 No"; -"Subject" = "件名"; -"FalseDocButton" = "書類Noは数値のみ入力可能"; - -// Search Result -"SearchResultTitle" = "検索結果"; -"SearchNoData" = "条件に一致する結果は見つかりませんでした"; -"Loading" = "検索中"; - -"NoData" = "データがありません"; - // Refresh Token Error "RefreshTokenUpdateErrorTitle" = "アクセストークン更新エラー"; "RefreshTokenUpdateError" = "AgileWorksサーバへアクセスするためのトークンの更新が行えませんでした。\n再ログインする必要があります。"; @@ -112,22 +68,15 @@ "NotConnectNetworkError" = "インターネットにアクセスするにはモバイルデータ通信をオンにするかWi-Fiを利用してください"; "TimedOutNetworkError" = "インターネットに接続できません\nしばらく経ってから再度おためしください"; -// Setting -"SettingTitle" = "設定"; -"Domain" = "所属ドメイン"; -"Name" = "氏名"; -"Character" = "カナ"; -"primaryGroupName" = "所属"; -"PrimaryGroupPartName" = "役職"; +// logout "LogoutConfirm" = "你想登出嗎?"; + +// Alert Form "YES" = "有"; "NO" = "無"; - -// Form "OK" = "OK"; "Cancel" = "キャンセル"; "Close" = "閉じる"; -"Close Subwindow" = "閉じる (サブウィンドウ)"; // Form (ログアウト通知) "LogoutAlertTitle" = "ログアウト通知"; @@ -136,29 +85,11 @@ // Color "MainColor" = "DarkMauve"; "IndicatorBackgroud" = "IndicatorBackgroud"; -"SectionColor" = "DarkGray"; "SeparatorColor" = "PastelGray"; -"SelectCellBgColor" = "PastelGray"; -"DraftColor" = "Gray"; -"ApprovingColor" = "Orange"; -"HoldColor" = "DarkMauve"; -"RejectColor" = "Red"; -"RemandColor" = "Blue"; -"ApprovedColor" = "Green"; -"ClickBtnColor" = "Mouse"; - -// Image -"HeaderIcon" = "folder"; -"HeaderRightIcon" = "right"; -"checkIcon" = "CheckIcon"; -"checkNoIcon" = "CheckNoIcon"; // TodayExtension "NotLogedin" = "アプリからログインしてください"; - -// WfAction -"WfApprove" = "承認"; -"WfSuspend" = "保留"; +"NoData" = "データがありません"; // ShareExtension "CertificateTitle" = "クライアント証明書"; diff --git a/AgileWorks/Common/Entity/ApprovalResponse.swift b/AgileWorks/Common/Entity/ApprovalResponse.swift index ccb0ee5..7fa37ba 100644 --- a/AgileWorks/Common/Entity/ApprovalResponse.swift +++ b/AgileWorks/Common/Entity/ApprovalResponse.swift @@ -17,50 +17,3 @@ struct ApprovalItem: Codable { let name: String let count: Int } - -struct ApprovalSubItem: Codable { - let id: Int - let name: String - let docCount: Int -} - -struct ApprovalDetailResponse: Codable { - let totalCount: Int - let items: [ApprovalDetailItem] -} - -struct ApprovalDetailItem: Codable { - let id: Int - let hasAttachments: Bool - let title: ApprovalTitles - let form: ApprovalForm - let route: ApprovalRoute - let step: Int - let stat: Int - let writeDatetime: String - let updateDatetime: String - let writer: String - let currentApprovers: [String]? - let url: String - let actions: [String]? -} - -struct ApprovalTitles: Codable { - let title1: String? - let title2: String? - - private enum CodingKeys: String, CodingKey { - case title1 = "1" - case title2 = "2" - } -} - -struct ApprovalForm: Codable { - let id: Int - let code: String - let name: String -} - -struct ApprovalRoute: Codable { - let id: Int -} diff --git a/AgileWorks/Common/Entity/DocumentResponse.swift b/AgileWorks/Common/Entity/DocumentResponse.swift deleted file mode 100644 index cb6448a..0000000 --- a/AgileWorks/Common/Entity/DocumentResponse.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// DocumentResponse.swift -// AgileWorks -// -// Created by 本多 洋平 on 2020/12/23. -// Copyright © 2020 ATLED CORP. All rights reserved. -// - -import Foundation - -// SearchResponseItem と同様。後々変わるかもしれないため別クラス。 -struct DocumentInfo: Codable { - let id: Int - let hasAttachments: Bool - let title: DocumentInfoTitleItem - let form: DocumentInfoFormItem - let route: DocumentInfoRouteItem? - let step: Int - let stat: Int - let writeDatetime: String - let updateDatetime: String - let writer: String - let currentApprovers: [String]? - let url: String -} - -struct DocumentInfoTitleItem: Codable { - let title1: String? - let title2: String? - - private enum CodingKeys: String, CodingKey { - case title1 = "1" - case title2 = "2" - } -} - -struct DocumentInfoFormItem: Codable { - let id: Int - let code: String - let name: String -} - -struct DocumentInfoRouteItem: Codable { - let code: String? - let name: String? -} diff --git a/AgileWorks/Common/Entity/SearchRequest.swift b/AgileWorks/Common/Entity/SearchRequest.swift deleted file mode 100644 index 14f0fbc..0000000 --- a/AgileWorks/Common/Entity/SearchRequest.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// SearchRequest.swift -// AgileWorks -// -// Created by sbc on 2020/05/07. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// - -import Foundation - -struct SearchRequest: Codable { - var formName: String? - var docId: DocID? - var title: String? - var stats: [Int] -} - -struct DocID: Codable { - let max: Int - let min: Int -} diff --git a/AgileWorks/Common/Entity/SearchResponse.swift b/AgileWorks/Common/Entity/SearchResponse.swift deleted file mode 100644 index bdc2b81..0000000 --- a/AgileWorks/Common/Entity/SearchResponse.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// SearchResponse.swift -// AgileWorks -// -// Created by sbc on 2020/04/17. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// - -import Foundation - -struct SearchApprovalItem: Codable { - var approval: String - var state: Bool - - init (approval: String, state: Bool) { - self.approval = approval - self.state = state - } -} - -struct SearchResponse: Codable { - let totalCount: Int - let items: [SearchResponseItem] -} - -struct SearchResponseItem: Codable { - let id: Int - let hasAttachments: Bool - let title: SearchResponseTitleItem - let form: SearchResponseFormItem - let route: SearchResponseRouteItem? - let step: Int - let stat: Int - let writeDatetime: String - let updateDatetime: String - let writer: String - let currentApprovers: [String]? - let url: String -} - -struct SearchResponseTitleItem: Codable { - let title1: String? - let title2: String? - - private enum CodingKeys: String, CodingKey { - case title1 = "1" - case title2 = "2" - } -} - -struct SearchResponseFormItem: Codable { - let id: Int - let code: String - let name: String -} - -struct SearchResponseRouteItem: Codable { - let code: String? - let name: String? -} diff --git a/AgileWorks/Common/Entity/ServiceInfoResponse.swift b/AgileWorks/Common/Entity/ServiceInfoResponse.swift deleted file mode 100644 index 1f9b22a..0000000 --- a/AgileWorks/Common/Entity/ServiceInfoResponse.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// ServiceInfoResponse.swift -// AgileWorks -// -// Created by 本多 洋平 on 2021/02/22. -// Copyright © 2021 ATLED CORP. All rights reserved. -// - -import Foundation - -struct ServiceInfo: Codable { - let version: String - let apiLevel: Int - // API 仕様的には必ず存在するが、開発中のものの中にはこれが存在しないバージョンがある。 - // そのバージョンは RC 版として社内にデプロイ済みなので接続正を確保するため optional。 - let singleDomain: Bool? - let features: [String] -} diff --git a/AgileWorks/Common/Entity/SubmissionResponse.swift b/AgileWorks/Common/Entity/SubmissionResponse.swift deleted file mode 100644 index 6a2a905..0000000 --- a/AgileWorks/Common/Entity/SubmissionResponse.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// SubmissionResponse.swift -// AgileWorks -// -// Created by Gk40002301 on 2020/03/30. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// - -import Foundation - -struct SubmissionResponse: Codable { - let totalCount: Int - let items: [SubmissionItem] -} - -struct SubmissionItem: Codable { - let id: Int - let name: String - let count: Int -} - -struct SubmissionDetaiResponse: Codable { - let totalCount: Int - let items: [SubmissionDetaiItem] -} - -struct SubmissionDetaiItem: Codable { - let form: SubmissionForm - let route: SubmissionRoute? - let url: String - let refUrl: String? -} - -struct SubmissionForm: Codable { - let id: Int - let code: String - let name: String -} - -struct SubmissionRoute: Codable { - let id: Int - let name: String -} diff --git a/AgileWorks/Common/Entity/WfActionResponse.swipt.swift b/AgileWorks/Common/Entity/WfActionResponse.swipt.swift deleted file mode 100644 index 3628073..0000000 --- a/AgileWorks/Common/Entity/WfActionResponse.swipt.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// WfActionResponse.swipt.swift -// AgileWorks -// -// Created by 本多 洋平 on 2020/09/16. -// Copyright © 2020 ATLED CORP. All rights reserved. -// - -import Foundation - -struct WfActionResponseItem: Codable { - var docId: Int? - var success: Bool - var error: WfActionError? -} - -struct WfActionError: Codable { - var message: String - var reasons: [String?]? -} diff --git a/AgileWorks/Common/Utility/NumberUtility.swift b/AgileWorks/Common/Utility/NumberUtility.swift index 2e5d2d8..868dc7c 100644 --- a/AgileWorks/Common/Utility/NumberUtility.swift +++ b/AgileWorks/Common/Utility/NumberUtility.swift @@ -15,5 +15,3 @@ extension Int { return formatter.string(from: NSNumber(value: self)) ?? String(self) } } - - diff --git a/AgileWorks/Common/WebClient/GetApprovalsIDEndpoint.swift b/AgileWorks/Common/WebClient/GetApprovalsIDEndpoint.swift deleted file mode 100644 index 6b15d8c..0000000 --- a/AgileWorks/Common/WebClient/GetApprovalsIDEndpoint.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// GetApprovalsIDEndpoint.swift -// AgileWorks -// -// Created by 島田潤一 on 2020/04/06. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// - -import Foundation - -public enum GetApprovalsIDError: Error { - case noResponse - case noData(HTTPURLResponse) -} - -struct GetApprovalsIDEndpoint: APIEndpoint { - var requestBody: Data? - - typealias Response = ApprovalDetailResponse - - let method: HttpMethod = .GET - var path: String { - return "/xpoint/x/v1/approvals/" + id - } - - let id: String - let size: Int - let offset: Int - - var queryParameters: [String: String]? { - return ["size": size.description, - "offset": offset.description] - } - - var headerFields: [String: String]? { - return ["Authorization": "Bearer \(KeychainDataStore().readAccessToken() ?? "")", - "X-ATLED-XP-Device-Id": KeychainDataStore().readDeviceID()?.description ?? "", - "Content-Type": "application/json"] - } - - init(id: String, size: Int, offset: Int) { - self.id = id - self.size = size - self.offset = offset - } -} - -extension GetApprovalsIDEndpoint { - func response(from object: Any, urlResponse: HTTPURLResponse) throws -> Response { - do { - let decoder = JSONDecoder() - decoder.keyDecodingStrategy = .convertFromSnakeCase - return try decoder.decode(ApprovalDetailResponse.self, from: object as! Data) - } catch { - throw ResponseError.unexpectedObject(object) - } - } -} diff --git a/AgileWorks/Common/WebClient/GetDocumentInfoEndpoint.swift b/AgileWorks/Common/WebClient/GetDocumentInfoEndpoint.swift deleted file mode 100644 index 99a22a1..0000000 --- a/AgileWorks/Common/WebClient/GetDocumentInfoEndpoint.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// GetDocumentInfoEndpoint.swift -// AgileWorks -// -// Created by 本多 洋平 on 2020/12/23. -// Copyright © 2020 ATLED CORP. All rights reserved. -// - -import Foundation - -struct GetDocumentInfoEndpoint: APIEndpoint { - var requestBody: Data? - - typealias Response = DocumentInfo - - let method: HttpMethod = .GET - var path: String = "/xpoint/x/v1/document" - - var headerFields: [String: String]? { - return ["Authorization": "Bearer \(KeychainDataStore().readAccessToken() ?? "")", - "X-ATLED-XP-Device-Id": KeychainDataStore().readDeviceID()?.description ?? "", - "Content-Type": "application/json"] - } - - let docId: Int? - - var pathParameters: [String]? { - guard let docId = self.docId else { - return [] - } - return [docId.description, "info"] - } - - init(docId: Int) { - self.docId = docId - } - - init() { - self.docId = nil - } -} - -extension GetDocumentInfoEndpoint { - func response(from object: Any, urlResponse: HTTPURLResponse) throws -> Response { - do { - let decoder = JSONDecoder() - decoder.keyDecodingStrategy = .convertFromSnakeCase - return try decoder.decode(Response.self, from: object as! Data) - } catch { - throw ResponseError.unexpectedObject(object) - } - } -} diff --git a/AgileWorks/Common/WebClient/GetServiceInfoEndpoint.swift b/AgileWorks/Common/WebClient/GetServiceInfoEndpoint.swift deleted file mode 100644 index 297acff..0000000 --- a/AgileWorks/Common/WebClient/GetServiceInfoEndpoint.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// GetServiceInfoEndpoint.swift -// AgileWorks -// -// Created by 本多 洋平 on 2021/02/22. -// Copyright © 2021 ATLED CORP. All rights reserved. -// - -import Foundation - -struct GetServiceInfoEndpoint: APIEndpoint { - var requestBody: Data? - - typealias Response = ServiceInfo - - let method: HttpMethod = .GET - let path = "/xpoint/x/v1/service" - - // この API は非ログイン状態でも呼び出せるためトークン等の設定は不要。 nil のままにしておく。 - var headerFields: [String: String]? -} - -extension GetServiceInfoEndpoint { - func response(from object: Any, urlResponse: HTTPURLResponse) throws -> Response { - do { - let decoder = JSONDecoder() - decoder.keyDecodingStrategy = .convertFromSnakeCase - return try decoder.decode(Response.self, from: object as! Data) - } catch { - throw ResponseError.unexpectedObject(object) - } - } -} diff --git a/AgileWorks/Common/WebClient/GetSubmissionsEndpoint.swift b/AgileWorks/Common/WebClient/GetSubmissionsEndpoint.swift deleted file mode 100644 index 0d78daa..0000000 --- a/AgileWorks/Common/WebClient/GetSubmissionsEndpoint.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// GetSubmissionsEndpoint.swift -// AgileWorks -// -// Created by 島田潤一 on 2020/04/06. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// - -import Foundation - -public enum GetSubmissionsError: Error { - case noResponse - case noData(HTTPURLResponse) -} - -struct GetSubmissionsEndpoint: APIEndpoint { - var requestBody: Data? - - typealias Response = SubmissionResponse - - let method: HttpMethod = .GET - let path = "/xpoint/x/v1/submissions" - - var headerFields: [String: String]? { - return ["Authorization": "Bearer \(KeychainDataStore().readAccessToken() ?? "")", - "X-ATLED-XP-Device-Id": KeychainDataStore().readDeviceID()?.description ?? "", - "Content-Type": "application/json"] - } -} - -extension GetSubmissionsEndpoint { - func response(from object: Any, urlResponse: HTTPURLResponse) throws -> Response { - do { - let decoder = JSONDecoder() - decoder.keyDecodingStrategy = .convertFromSnakeCase - return try decoder.decode(SubmissionResponse.self, from: object as! Data) - } catch { - throw ResponseError.unexpectedObject(object) - } - } -} diff --git a/AgileWorks/Common/WebClient/GetSubmissionsIDEndpoint.swift b/AgileWorks/Common/WebClient/GetSubmissionsIDEndpoint.swift deleted file mode 100644 index 4ac16cc..0000000 --- a/AgileWorks/Common/WebClient/GetSubmissionsIDEndpoint.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// GetSubmissionsIDEndpoint.swift -// AgileWorks -// -// Created by 島田潤一 on 2020/04/06. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// - -import Foundation - -public enum GetSubmissionsIDError: Error { - case noResponse - case noData(HTTPURLResponse) -} - -struct GetSubmissionsIDEndpoint: APIEndpoint { - var requestBody: Data? - - typealias Response = SubmissionDetaiResponse - - let method: HttpMethod = .GET - var path: String { - return "/xpoint/x/v1/submissions/" + id - } - - let id: String - - var headerFields: [String: String]? { - return ["Authorization": "Bearer \(KeychainDataStore().readAccessToken() ?? "")", - "X-ATLED-XP-Device-Id": KeychainDataStore().readDeviceID()?.description ?? "", - "Content-Type": "application/json"] - } - - init(id: String) { - self.id = id - } -} - -extension GetSubmissionsIDEndpoint { - func response(from object: Any, urlResponse: HTTPURLResponse) throws -> Response { - do { - let decoder = JSONDecoder() - decoder.keyDecodingStrategy = .convertFromSnakeCase - return try decoder.decode(SubmissionDetaiResponse.self, from: object as! Data) - } catch { - throw ResponseError.unexpectedObject(object) - } - } -} diff --git a/AgileWorks/Common/WebClient/PostSearchItemEndpoint.swift b/AgileWorks/Common/WebClient/PostSearchItemEndpoint.swift deleted file mode 100644 index 0b82aee..0000000 --- a/AgileWorks/Common/WebClient/PostSearchItemEndpoint.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// PostSearchItemEndpoint.swift -// AgileWorks -// -// Created by sbc on 2020/05/07. -// Copyright © 2020 nttdata-sbc. All rights reserved. -// - -import Foundation - -public enum PostSearchItemError: Error { - case noResponse - case noData(HTTPURLResponse) -} - -struct PostSearchItemEndpoint: APIEndpoint { - typealias Response = SearchResponse - - let method: HttpMethod = .POST - let path = "/xpoint/x/v1/search" - - var headerFields: [String: String]? { - return ["Authorization": "Bearer \(KeychainDataStore().readAccessToken() ?? "")", - "X-ATLED-XP-Device-Id": KeychainDataStore().readDeviceID()?.description ?? "", - "Content-Type": "application/json"] - } - var requestBody: Data? - - let size: Int - let offset: Int - - var queryParameters: [String: String]? { - return ["size": size.description, - "offset": offset.description] - } - - init(reqBody: SearchRequest, size: Int, offset: Int) { - self.size = size - self.offset = offset - let encoder = JSONEncoder() - encoder.keyEncodingStrategy = .convertToSnakeCase - - do { - self.requestBody = try encoder.encode(reqBody) - } catch { - log.e(error.localizedDescription) - } - } -} - -extension PostSearchItemEndpoint { - func response(from object: Any, urlResponse: HTTPURLResponse) throws -> Response { - do { - let decoder = JSONDecoder() - decoder.keyDecodingStrategy = .convertFromSnakeCase - return try decoder.decode(SearchResponse.self, from: object as! Data) - } catch { - throw ResponseError.unexpectedObject(object) - } - } -} diff --git a/AgileWorks/Common/WebClient/PostWfActionEndpoint.swift b/AgileWorks/Common/WebClient/PostWfActionEndpoint.swift deleted file mode 100644 index 5d54fe3..0000000 --- a/AgileWorks/Common/WebClient/PostWfActionEndpoint.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// PostWfActionEndpoint.swift -// AgileWorks -// -// Created by 本多 洋平 on 2020/09/16. -// Copyright © 2020 ATLED CORP. All rights reserved. -// - -import Foundation - -/// `/xpoint/x/v1/wfaction` 各種。 -/// 呼び出し方の都合上各操作をパスパラメータとして扱っている。 -struct PostWfActionEndpoint: APIEndpoint { - typealias Response = [WfActionResponseItem] - - var requestBody: Data? - - let method: HttpMethod = .POST - let path = "/xpoint/x/v1/wfaction" - - var headerFields: [String: String]? { - return ["Authorization": "Bearer \(KeychainDataStore().readAccessToken() ?? "")", - "X-ATLED-XP-Device-Id": KeychainDataStore().readDeviceID()?.description ?? "", - "Content-Type": "application/json"] - } - - let pathParameters: [String]? - - init(action: WfAction, docIds: [Int]) { - pathParameters = [action.rawValue] - - let encoder = JSONEncoder() - encoder.keyEncodingStrategy = .convertToSnakeCase - - do { - self.requestBody = try encoder.encode(docIds) - } catch { - log.e(error.localizedDescription) - } - } -} - -extension PostWfActionEndpoint { - func response(from object: Any, urlResponse: HTTPURLResponse) throws -> Response { - do { - let decoder = JSONDecoder() - decoder.keyDecodingStrategy = .convertFromSnakeCase - return try decoder.decode([WfActionResponseItem].self, from: object as! Data) - } catch { - throw ResponseError.unexpectedObject(object) - } - } -} diff --git a/AgileWorks/Common/WebClient/Session.swift b/AgileWorks/Common/WebClient/Session.swift index 506e5fa..da0f712 100644 --- a/AgileWorks/Common/WebClient/Session.swift +++ b/AgileWorks/Common/WebClient/Session.swift @@ -34,7 +34,7 @@ class Session { class func send(_ request: T, completion: @escaping (Result) -> Void) -> URLSessionTask? { let req = request.request log.debug("Session Request: \(String(describing: req.url))\nHTTPMethod: \(String(describing: req.httpMethod) )\nHeaders: \(String(describing: req.allHTTPHeaderFields))\nHTTPBody: \(String(data: req.httpBody ?? Data(), encoding: .utf8)!)") - + let task = shared.dataTask(with: req) { data, response, error in let result: Result let res = response as? HTTPURLResponse diff --git a/AgileWorks/Common/WfAction.swift b/AgileWorks/Common/WfAction.swift deleted file mode 100644 index 4068daa..0000000 --- a/AgileWorks/Common/WfAction.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// WfAction.swift -// AgileWorks -// -// Created by 本多 洋平 on 2020/09/16. -// Copyright © 2020 ATLED CORP. All rights reserved. -// - -import Foundation - -/// 書類直接操作の種類。 -/// -/// 文字列値は /xpoint/x/v1/approvals/{major_id}[/{minor_id}/) の `items[*].actions[*]` の内容に対応する。 -/// また、 /xpoint/x/v1/wfaction/ のエントリーポイントでもある。 -enum WfAction: String, CaseIterable { - case approve = "approve" - case suspend = "suspend" - - func toLabel() -> String { - localizadString(key: "Wf\(self.rawValue.capitalized)", comment: "") - } - - static func from(name: String) -> Self? { - for value in Self.allCases { - if value.rawValue == name { - return value - } - } - return nil - } -} - -func supportedWfActions(from actions: [String]?) -> [WfAction]? { - let wfActions = actions?.map { WfAction.from(name: $0) }.compactMap { $0 } - if wfActions == nil || wfActions!.isEmpty { - return nil - } else { - return wfActions - } -} -- GitLab