Changes for file movement
This commit is contained in:
parent
fa00f792c5
commit
213e0d2ce0
@ -506,23 +506,26 @@
|
||||
D2ED27ED254B0CE700A1C293 /* ActionPopupModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2ED27E8254B0CE600A1C293 /* ActionPopupModel.swift */; };
|
||||
D2ED27EE254B0CE700A1C293 /* ActionAlertModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2ED27E9254B0CE600A1C293 /* ActionAlertModel.swift */; };
|
||||
D2ED27EF254B0CE700A1C293 /* AlertModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2ED27EA254B0CE700A1C293 /* AlertModel.swift */; };
|
||||
D2ED27FB254B0E0300A1C293 /* MVMCoreAlertDelegateProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED27F2254B0E0200A1C293 /* MVMCoreAlertDelegateProtocol.h */; };
|
||||
D2ED27FB254B0E0300A1C293 /* MVMCoreAlertDelegateProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED27F2254B0E0200A1C293 /* MVMCoreAlertDelegateProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED27FC254B0E0300A1C293 /* MVMCoreAlertObject+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2ED27F3254B0E0200A1C293 /* MVMCoreAlertObject+Swift.swift */; };
|
||||
D2ED27FD254B0E0300A1C293 /* MVMCoreAlertOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = D2ED27F4254B0E0200A1C293 /* MVMCoreAlertOperation.m */; };
|
||||
D2ED27FE254B0E0300A1C293 /* MVMCoreAlertObject.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED27F5254B0E0200A1C293 /* MVMCoreAlertObject.h */; };
|
||||
D2ED27FF254B0E0300A1C293 /* MVMCoreAlertHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED27F6254B0E0200A1C293 /* MVMCoreAlertHandler.h */; };
|
||||
D2ED27FE254B0E0300A1C293 /* MVMCoreAlertObject.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED27F5254B0E0200A1C293 /* MVMCoreAlertObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED27FF254B0E0300A1C293 /* MVMCoreAlertHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED27F6254B0E0200A1C293 /* MVMCoreAlertHandler.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED2800254B0E0300A1C293 /* MVMCoreAlertHandler+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2ED27F7254B0E0200A1C293 /* MVMCoreAlertHandler+Extension.swift */; };
|
||||
D2ED2801254B0E0300A1C293 /* MVMCoreAlertOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED27F8254B0E0200A1C293 /* MVMCoreAlertOperation.h */; };
|
||||
D2ED2801254B0E0300A1C293 /* MVMCoreAlertOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED27F8254B0E0200A1C293 /* MVMCoreAlertOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED2802254B0E0300A1C293 /* MVMCoreAlertObject.m in Sources */ = {isa = PBXBuildFile; fileRef = D2ED27F9254B0E0200A1C293 /* MVMCoreAlertObject.m */; };
|
||||
D2ED2803254B0E0300A1C293 /* MVMCoreAlertHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = D2ED27FA254B0E0300A1C293 /* MVMCoreAlertHandler.m */; };
|
||||
D2ED280C254B0EB800A1C293 /* MVMCoreTopAlertAnimationDelegateProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED2805254B0EB700A1C293 /* MVMCoreTopAlertAnimationDelegateProtocol.h */; };
|
||||
D2ED280D254B0EB800A1C293 /* MVMCoreTopAlertOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED2806254B0EB700A1C293 /* MVMCoreTopAlertOperation.h */; };
|
||||
D2ED280C254B0EB800A1C293 /* MVMCoreTopAlertAnimationDelegateProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED2805254B0EB700A1C293 /* MVMCoreTopAlertAnimationDelegateProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED280D254B0EB800A1C293 /* MVMCoreTopAlertOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED2806254B0EB700A1C293 /* MVMCoreTopAlertOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED280E254B0EB800A1C293 /* MVMCoreTopAlertOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = D2ED2807254B0EB700A1C293 /* MVMCoreTopAlertOperation.m */; };
|
||||
D2ED280F254B0EB800A1C293 /* MVMCoreTopAlertViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED2808254B0EB700A1C293 /* MVMCoreTopAlertViewProtocol.h */; };
|
||||
D2ED2810254B0EB800A1C293 /* MVMCoreTopAlertDelegateProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED2809254B0EB700A1C293 /* MVMCoreTopAlertDelegateProtocol.h */; };
|
||||
D2ED2811254B0EB800A1C293 /* MVMCoreTopAlertObject.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED280A254B0EB700A1C293 /* MVMCoreTopAlertObject.h */; };
|
||||
D2ED280F254B0EB800A1C293 /* MVMCoreTopAlertViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED2808254B0EB700A1C293 /* MVMCoreTopAlertViewProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED2810254B0EB800A1C293 /* MVMCoreTopAlertDelegateProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED2809254B0EB700A1C293 /* MVMCoreTopAlertDelegateProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED2811254B0EB800A1C293 /* MVMCoreTopAlertObject.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED280A254B0EB700A1C293 /* MVMCoreTopAlertObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED2812254B0EB800A1C293 /* MVMCoreTopAlertObject.m in Sources */ = {isa = PBXBuildFile; fileRef = D2ED280B254B0EB800A1C293 /* MVMCoreTopAlertObject.m */; };
|
||||
D2ED2815254B0EE400A1C293 /* MVMCoreGlobalTopAlertDelegateProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED2814254B0EE400A1C293 /* MVMCoreGlobalTopAlertDelegateProtocol.h */; };
|
||||
D2ED2815254B0EE400A1C293 /* MVMCoreGlobalTopAlertDelegateProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED2814254B0EE400A1C293 /* MVMCoreGlobalTopAlertDelegateProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED2818254B115400A1C293 /* MVMCoreUIActionDelegateProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED2817254B112900A1C293 /* MVMCoreUIActionDelegateProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED281D254B119D00A1C293 /* MVMCoreUIActionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = D2ED281B254B119D00A1C293 /* MVMCoreUIActionHandler.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2ED281E254B119D00A1C293 /* MVMCoreUIActionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = D2ED281C254B119D00A1C293 /* MVMCoreUIActionHandler.m */; };
|
||||
D2FA83D22513EA6900564112 /* NotificationXButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2FA83D12513EA6900564112 /* NotificationXButton.swift */; };
|
||||
D2FA83D42514F80C00564112 /* CollapsableNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2FA83D32514F80C00564112 /* CollapsableNotification.swift */; };
|
||||
D2FA83D62515021F00564112 /* CollapsableNotificationTopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2FA83D52515021F00564112 /* CollapsableNotificationTopView.swift */; };
|
||||
@ -1058,6 +1061,9 @@
|
||||
D2ED280A254B0EB700A1C293 /* MVMCoreTopAlertObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MVMCoreTopAlertObject.h; sourceTree = "<group>"; };
|
||||
D2ED280B254B0EB800A1C293 /* MVMCoreTopAlertObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MVMCoreTopAlertObject.m; sourceTree = "<group>"; };
|
||||
D2ED2814254B0EE400A1C293 /* MVMCoreGlobalTopAlertDelegateProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MVMCoreGlobalTopAlertDelegateProtocol.h; sourceTree = "<group>"; };
|
||||
D2ED2817254B112900A1C293 /* MVMCoreUIActionDelegateProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreUIActionDelegateProtocol.h; sourceTree = "<group>"; };
|
||||
D2ED281B254B119D00A1C293 /* MVMCoreUIActionHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreUIActionHandler.h; sourceTree = "<group>"; };
|
||||
D2ED281C254B119D00A1C293 /* MVMCoreUIActionHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MVMCoreUIActionHandler.m; sourceTree = "<group>"; };
|
||||
D2FA83D12513EA6900564112 /* NotificationXButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationXButton.swift; sourceTree = "<group>"; };
|
||||
D2FA83D32514F80C00564112 /* CollapsableNotification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollapsableNotification.swift; sourceTree = "<group>"; };
|
||||
D2FA83D52515021F00564112 /* CollapsableNotificationTopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollapsableNotificationTopView.swift; sourceTree = "<group>"; };
|
||||
@ -2045,6 +2051,9 @@
|
||||
D2C5001721F8ECDD001DA659 /* MVMCoreUIViewControllerMappingObject.m */,
|
||||
D2092352244F7D630044AD09 /* MVMCoreUIViewControllerMappingObject+Extension.swift */,
|
||||
D296E14622A597490051EBE7 /* MVMCoreUIViewConstrainingProtocol.h */,
|
||||
D2ED2817254B112900A1C293 /* MVMCoreUIActionDelegateProtocol.h */,
|
||||
D2ED281B254B119D00A1C293 /* MVMCoreUIActionHandler.h */,
|
||||
D2ED281C254B119D00A1C293 /* MVMCoreUIActionHandler.m */,
|
||||
);
|
||||
path = OtherHandlers;
|
||||
sourceTree = "<group>";
|
||||
@ -2262,18 +2271,14 @@
|
||||
9458C3172406C8FD00930963 /* UIFont+FontWrapping.h in Headers */,
|
||||
D29DF0D121E404D4003B2FB9 /* MVMCoreUI.h in Headers */,
|
||||
D29DF11521E6805F003B2FB9 /* UIColor+MFConvenience.h in Headers */,
|
||||
D2ED2811254B0EB800A1C293 /* MVMCoreTopAlertObject.h in Headers */,
|
||||
D29DF25921E6A22D003B2FB9 /* MFButtonProtocol.h in Headers */,
|
||||
D29DF28421E7AB24003B2FB9 /* MVMCoreUICommonViewsUtility.h in Headers */,
|
||||
D2ED27FE254B0E0300A1C293 /* MVMCoreAlertObject.h in Headers */,
|
||||
D29DF2CE21E7C104003B2FB9 /* MFLoadingViewController.h in Headers */,
|
||||
D29DF12A21E6851E003B2FB9 /* MVMCoreUITopAlertView.h in Headers */,
|
||||
D2ED280F254B0EB800A1C293 /* MVMCoreTopAlertViewProtocol.h in Headers */,
|
||||
D29DF27521E79E81003B2FB9 /* MVMCoreUILoggingHandler.h in Headers */,
|
||||
D29DF2B321E7B76D003B2FB9 /* MFLoadingSpinner.h in Headers */,
|
||||
D20492A424329A2800A5EED6 /* MVMCoreUIPagingProtocol.h in Headers */,
|
||||
D296E14722A5984C0051EBE7 /* MVMCoreUIViewConstrainingProtocol.h in Headers */,
|
||||
D2ED280C254B0EB800A1C293 /* MVMCoreTopAlertAnimationDelegateProtocol.h in Headers */,
|
||||
D29DF17521E69E1F003B2FB9 /* ButtonDelegateProtocol.h in Headers */,
|
||||
D29DF26E21E6AA0B003B2FB9 /* FLAnimatedImage.h in Headers */,
|
||||
D29DF11621E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.h in Headers */,
|
||||
@ -2281,11 +2286,16 @@
|
||||
D29DF13121E6851E003B2FB9 /* MVMCoreUITopAlertExpandableView.h in Headers */,
|
||||
D29DF2CA21E7BFC8003B2FB9 /* MFSizeThreshold.h in Headers */,
|
||||
D29DF28021E7AA51003B2FB9 /* MVMCoreUIDetailViewProtocol.h in Headers */,
|
||||
D2ED280D254B0EB800A1C293 /* MVMCoreTopAlertOperation.h in Headers */,
|
||||
D29DF2EE21ECEADF003B2FB9 /* MFFonts.h in Headers */,
|
||||
D29DF12D21E6851E003B2FB9 /* MVMCoreUITopAlertBaseView.h in Headers */,
|
||||
D2C5001821F8ECDD001DA659 /* MVMCoreUIViewControllerMappingObject.h in Headers */,
|
||||
D2ED2811254B0EB800A1C293 /* MVMCoreTopAlertObject.h in Headers */,
|
||||
D2ED27FE254B0E0300A1C293 /* MVMCoreAlertObject.h in Headers */,
|
||||
D2ED280F254B0EB800A1C293 /* MVMCoreTopAlertViewProtocol.h in Headers */,
|
||||
D2ED280C254B0EB800A1C293 /* MVMCoreTopAlertAnimationDelegateProtocol.h in Headers */,
|
||||
D2ED280D254B0EB800A1C293 /* MVMCoreTopAlertOperation.h in Headers */,
|
||||
D2ED2801254B0E0300A1C293 /* MVMCoreAlertOperation.h in Headers */,
|
||||
D2ED2818254B115400A1C293 /* MVMCoreUIActionDelegateProtocol.h in Headers */,
|
||||
D2ED27FB254B0E0300A1C293 /* MVMCoreAlertDelegateProtocol.h in Headers */,
|
||||
D2ED2810254B0EB800A1C293 /* MVMCoreTopAlertDelegateProtocol.h in Headers */,
|
||||
D2ED27FF254B0E0300A1C293 /* MVMCoreAlertHandler.h in Headers */,
|
||||
@ -2295,6 +2305,7 @@
|
||||
D29DF2C821E7BFC1003B2FB9 /* MFSizeObject.h in Headers */,
|
||||
D29DF2E121E9240B003B2FB9 /* MVMCoreUIPanelProtocol.h in Headers */,
|
||||
D29DF12921E6851E003B2FB9 /* MVMCoreUITopAlertMainView.h in Headers */,
|
||||
D2ED281D254B119D00A1C293 /* MVMCoreUIActionHandler.h in Headers */,
|
||||
D29DF12C21E6851E003B2FB9 /* MVMCoreUITopAlertShortView.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -2700,6 +2711,7 @@
|
||||
BB2FB3BD247E7EF200DF73CD /* Tags.swift in Sources */,
|
||||
AA104ADC244734EA004D2810 /* HeadersH1LandingPageHeaderModel.swift in Sources */,
|
||||
BBAA4F03243D8E3B005AAD5F /* RadioBoxes.swift in Sources */,
|
||||
D2ED281E254B119D00A1C293 /* MVMCoreUIActionHandler.m in Sources */,
|
||||
323AC96A24C837F000F8E4C4 /* ListThreeColumnBillChangesModel.swift in Sources */,
|
||||
D2E1FAE12268E81D00AEFD8C /* MoleculeListTemplate.swift in Sources */,
|
||||
525019E72406853600EED91C /* ListFourColumnDataUsageDivider.swift in Sources */,
|
||||
|
||||
@ -9,6 +9,8 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
@class MVMCoreAlertObject;
|
||||
@class MVMCoreLoadObject;
|
||||
@class MVMCoreErrorObject;
|
||||
|
||||
@protocol MVMCoreAlertDelegateProtocol
|
||||
|
||||
@ -24,5 +26,11 @@
|
||||
- (void)alertPaused:(nonnull UIAlertController *)alertController;
|
||||
- (void)alertUnpaused:(nonnull UIAlertController *)alertController;
|
||||
|
||||
@end
|
||||
/** Get the alert object whose data will be presented. Overwrite this to alter how you want the alert to show.
|
||||
* @param loadObject The load object.
|
||||
* @param errorObject An error object if there was an error.
|
||||
* @return Returns the alert object.
|
||||
* Details: Gets the alert that will display to the screen. Easier to subclass here to avoid subclassing the displaying logic. */
|
||||
- (nullable MVMCoreAlertObject *)alertObjectToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)errorObject;
|
||||
|
||||
@end
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCore/MVMCoreTopAlertObject.h>
|
||||
#import <MVMCore/MVMCoreAlertDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertObject.h>
|
||||
#import <MVMCoreUI/MVMCoreAlertDelegateProtocol.h>
|
||||
|
||||
@class MVMCoreAlertObject;
|
||||
@class MVMCoreTopAlertOperation;
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
|
||||
#import "MVMCoreAlertHandler.h"
|
||||
#import "MVMCoreAlertObject.h"
|
||||
#import "MVMCoreAlertController.h"
|
||||
#import <MVMCore/MVMCoreAlertController.h>
|
||||
#import "MVMCoreAlertOperation.h"
|
||||
#import "MVMCoreTopAlertOperation.h"
|
||||
#import "MVMCoreJSONConstants.h"
|
||||
#import "NSDictionary+MFConvenience.h"
|
||||
#import "NSArray+MFConvenience.h"
|
||||
#import <MVMCore/MVMCoreJSONConstants.h>
|
||||
#import <MVMCore/NSDictionary+MFConvenience.h>
|
||||
#import <MVMCore/NSArray+MFConvenience.h>
|
||||
#import <MVMCore/MVMCore-Swift.h>
|
||||
|
||||
@interface MVMCoreAlertHandler ()
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#import <MVMCore/MVMCoreActionDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreLoadDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCorePresentationDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreAlertDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreAlertDelegateProtocol.h>
|
||||
|
||||
@class MVMCoreErrorObject;
|
||||
@class MVMCoreLoadObject;
|
||||
|
||||
@ -9,16 +9,17 @@
|
||||
#import "MVMCoreAlertObject.h"
|
||||
#import "MVMCoreAlertHandler.h"
|
||||
#import "MVMCoreTopAlertObject.h"
|
||||
#import "MVMCoreCache.h"
|
||||
#import "MVMCoreErrorConstants.h"
|
||||
#import "MVMCoreErrorObject.h"
|
||||
#import "MVMCoreLoadObject.h"
|
||||
#import "MVMCoreGetterUtility.h"
|
||||
#import "NSDictionary+MFConvenience.h"
|
||||
#import "MVMCoreHardcodedStringsConstants.h"
|
||||
#import "MVMCoreJSONConstants.h"
|
||||
#import <MVMCore/MVMCoreCache.h>
|
||||
#import <MVMCore/MVMCoreErrorConstants.h>
|
||||
#import <MVMCore/MVMCoreErrorObject.h>
|
||||
#import <MVMCore/MVMCoreLoadObject.h>
|
||||
#import <MVMCore/MVMCoreGetterUtility.h>
|
||||
#import <MVMCore/NSDictionary+MFConvenience.h>
|
||||
#import <MVMCore/MVMCoreHardcodedStringsConstants.h>
|
||||
#import <MVMCore/MVMCoreJSONConstants.h>
|
||||
#import <MVMCore/MVMCoreActionHandler.h>
|
||||
#import <MVMCore/MVMCore-Swift.h>
|
||||
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
||||
|
||||
@interface MVMCoreAlertObject ()
|
||||
|
||||
@ -47,6 +48,10 @@
|
||||
}
|
||||
|
||||
+ (nullable instancetype)alertObjectForPageType:(nullable NSString *)pageType responseInfo:(nullable NSDictionary *)responseInfo additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
||||
MVMCoreUIDelegateObject *alertDelegateObject = nil;
|
||||
if ([delegateObject isKindOfClass:[MVMCoreUIDelegateObject class]]) {
|
||||
alertDelegateObject = (MVMCoreUIDelegateObject *)delegateObject;
|
||||
}
|
||||
|
||||
__block MVMCoreAlertObject *alert = [[MVMCoreAlertObject alloc] init];
|
||||
alert.title = [responseInfo stringForKey:KeyErrorHeading];
|
||||
@ -64,7 +69,7 @@
|
||||
if ([messageStyle isEqualToString:ValueMessageStyleTopPersistent] || [messageStyle isEqualToString:ValueMessageStyleTop]) {
|
||||
|
||||
alert.topAlertObject = [[MVMCoreTopAlertObject alloc] initWithResponseInfo:responseInfo];
|
||||
alert.topAlertObject.delegate = delegateObject.topAlertDelegate;
|
||||
alert.topAlertObject.delegate = alertDelegateObject.topAlertDelegate;
|
||||
alert.topAlertObject.pageType = pageType;
|
||||
alert.type = MFAlertTypeTop;
|
||||
} else if ([messageStyle isEqualToString:ValueMessageStylePopup]) {
|
||||
@ -100,7 +105,7 @@
|
||||
alert.alertStyle = UIAlertControllerStyleAlert;
|
||||
}
|
||||
}
|
||||
alert.alertDelegate = delegateObject.alertDelegate;
|
||||
alert.alertDelegate = alertDelegateObject.alertDelegate;
|
||||
return alert;
|
||||
}
|
||||
|
||||
@ -166,7 +171,8 @@
|
||||
return alert;
|
||||
} else {
|
||||
if (error) {
|
||||
*error = [[MVMCoreErrorObject alloc] initWithTitle:nil messageToLog:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorUnableToProcess] code:ErrorCodePopupFailed domain:ErrorDomainNative location:[NSString stringWithFormat:@"%@_Popup_pageType:%@",NSStringFromClass([delegateObject.alertDelegate class]),[page stringForKey:KeyPageType]]];
|
||||
id delegate = [delegateObject isKindOfClass:[MVMCoreUIDelegateObject class]] ? ((MVMCoreUIDelegateObject *)delegateObject).alertDelegate : nil;
|
||||
*error = [[MVMCoreErrorObject alloc] initWithTitle:nil message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorUnableToProcess] code:ErrorCodePopupFailed domain:ErrorDomainNative location:[NSString stringWithFormat:@"%@_Popup_pageType:%@",NSStringFromClass([delegate class]),[page stringForKey:KeyPageType]]];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "MVMCoreOperation.h"
|
||||
#import "MVMCoreAlertDelegateProtocol.h"
|
||||
#import <MVMCore/MVMCoreOperation.h>
|
||||
#import <MVMCoreUI/MVMCoreAlertDelegateProtocol.h>
|
||||
|
||||
@interface MVMCoreAlertOperation : MVMCoreOperation
|
||||
|
||||
|
||||
@ -7,9 +7,9 @@
|
||||
//
|
||||
|
||||
#import "MVMCoreAlertOperation.h"
|
||||
#import "MVMCoreAlertHandler.h"
|
||||
#import "MVMCoreAlertController.h"
|
||||
#import "MVMCoreNavigationHandler.h"
|
||||
#import <MVMCoreUI/MVMCoreAlertHandler.h>
|
||||
#import <MVMCore/MVMCoreAlertController.h>
|
||||
#import <MVMCore/MVMCoreNavigationHandler.h>
|
||||
|
||||
@interface MVMCoreAlertOperation () {
|
||||
__block BOOL _paused;
|
||||
|
||||
@ -251,6 +251,8 @@ import Foundation
|
||||
try? ModelRegistry.register(RuleRegexModel.self)
|
||||
|
||||
// MARK:- Actions
|
||||
try? ModelRegistry.register(ActionPopupModel.self)
|
||||
try? ModelRegistry.register(ActionAlertModel.self)
|
||||
try? ModelRegistry.register(ActionTopAlertModel.self)
|
||||
try? ModelRegistry.register(ActionCollapseNotificationModel.self)
|
||||
try? ModelRegistry.register(ActionOpenPanelModel.self)
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
@import MVMCore.MVMCoreNavigationHandler;
|
||||
@import MVMCore.MVMCoreDispatchUtility;
|
||||
@import MVMCore.MVMCoreViewManagerProtocol;
|
||||
@import MVMCore.MVMCoreObject;
|
||||
@import MVMCore.MVMCoreActionUtility;
|
||||
@import MVMCore.NSDictionary_MFConvenience;
|
||||
#import "MVMCoreUIUtility.h"
|
||||
@ -847,8 +846,8 @@ CGFloat const PanelAnimationDuration = 0.2;
|
||||
|
||||
// Top Alert
|
||||
MVMCoreUITopAlertView *topAlertView = nil;
|
||||
if ([[MVMCoreObject sharedInstance].globalTopAlertDelegate respondsToSelector:@selector(getTopAlertView)]) {
|
||||
topAlertView = (MVMCoreUITopAlertView *)[[MVMCoreObject sharedInstance].globalTopAlertDelegate getTopAlertView];
|
||||
if ([[CoreUIObject sharedInstance].globalTopAlertDelegate respondsToSelector:@selector(getTopAlertView)]) {
|
||||
topAlertView = (MVMCoreUITopAlertView *)[[CoreUIObject sharedInstance].globalTopAlertDelegate getTopAlertView];
|
||||
if (topAlertView) {
|
||||
self.topAlertView = topAlertView;
|
||||
[self.view addSubview:topAlertView];
|
||||
|
||||
@ -20,8 +20,22 @@ FOUNDATION_EXPORT const unsigned char MVMCoreUIVersionString[];
|
||||
#import <MVMCoreUI/MVMCoreUILoggingHandler.h>
|
||||
#import <MVMCoreUI/MVMCoreUIViewControllerMappingObject.h>
|
||||
#import <MVMCoreUI/MVMCoreUIViewConstrainingProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreUIActionDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreUIActionHandler.h>
|
||||
|
||||
// Alert Handling
|
||||
#import <MVMCoreUI/MVMCoreAlertObject.h>
|
||||
#import <MVMCoreUI/MVMCoreAlertOperation.h>
|
||||
#import <MVMCoreUI/MVMCoreAlertHandler.h>
|
||||
#import <MVMCoreUI/MVMCoreAlertDelegateProtocol.h>
|
||||
|
||||
#pragma mark - TopAlert
|
||||
#import <MVMCoreUI/MVMCoreGlobalTopAlertDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertObject.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertViewProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertOperation.h>
|
||||
#import <MVMCoreUI/MVMCoreUITopAlertView.h>
|
||||
#import <MVMCoreUI/MVMCoreUITopAlertBaseView.h>
|
||||
#import <MVMCoreUI/MVMCoreUITopAlertMainView.h>
|
||||
|
||||
@ -10,6 +10,7 @@ import UIKit
|
||||
|
||||
@objcMembers open class CoreUIObject: MVMCoreObject {
|
||||
public var moleculeMap: MoleculeObjectMapping?
|
||||
public var globalTopAlertDelegate: MVMCoreGlobalTopAlertDelegateProtocol?
|
||||
|
||||
open override func defaultInitialSetup() {
|
||||
cache = MVMCoreCache()
|
||||
|
||||
19
MVMCoreUI/OtherHandlers/MVMCoreUIActionDelegateProtocol.h
Normal file
19
MVMCoreUI/OtherHandlers/MVMCoreUIActionDelegateProtocol.h
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// MVMCoreUIActionDelegateProtocol.h
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Scott Pfeil on 10/28/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
#import <MVMCore/MVMCoreActionDelegateProtocol.h>
|
||||
@class MVMCoreAlertObject;
|
||||
|
||||
@protocol MVMCoreUIActionDelegateProtocol <MVMCoreActionDelegateProtocol>
|
||||
|
||||
// Gives the delegate a chance to alter the alert object
|
||||
- (void)willShowPopupWithAlertObject:(nonnull MVMCoreAlertObject *)alertObject alertJson:(nonnull NSDictionary *)alertJson;
|
||||
|
||||
// Gives the delegate a chance to alter the alert object
|
||||
- (nullable MVMCoreAlertObject *)willShowTopAlertWithAlertObject:(nonnull MVMCoreAlertObject *)alertObject alertJson:(nonnull NSDictionary *)alertJson;
|
||||
|
||||
@end
|
||||
40
MVMCoreUI/OtherHandlers/MVMCoreUIActionHandler.h
Normal file
40
MVMCoreUI/OtherHandlers/MVMCoreUIActionHandler.h
Normal file
@ -0,0 +1,40 @@
|
||||
//
|
||||
// MVMCoreUIActionHandler.h
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Scott Pfeil on 10/28/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MVMCore/MVMCoreActionHandler.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MVMCoreUIActionHandler : MVMCoreActionHandler
|
||||
|
||||
// Shows a popup alert by grabbing the content from the page map.
|
||||
- (void)popupAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Shows popup alert from the alert object in the action map. The actionType of the action is 'alert'
|
||||
- (void)showAlert:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Shows a top alert
|
||||
- (void)topAlertAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Collapses the current top notification
|
||||
- (void)collapseNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
#pragma mark - Deprecated
|
||||
|
||||
// Shows a popup
|
||||
- (void)popupAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Shows a top alert
|
||||
- (void)topAlertAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Collapses the current top notification
|
||||
- (void)collapseNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
164
MVMCoreUI/OtherHandlers/MVMCoreUIActionHandler.m
Normal file
164
MVMCoreUI/OtherHandlers/MVMCoreUIActionHandler.m
Normal file
@ -0,0 +1,164 @@
|
||||
//
|
||||
// MVMCoreUIActionHandler.m
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Scott Pfeil on 10/28/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MVMCoreUIActionHandler.h"
|
||||
#import "MVMCoreUIConstants.h"
|
||||
#import "MVMCoreAlertObject.h"
|
||||
#import <MVMCoreUI/MVMCoreUIActionDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
||||
@import MVMCore.MVMCoreActionHandler;
|
||||
@import MVMCore.NSDictionary_MFConvenience;
|
||||
@import MVMCore.MVMCoreJSONConstants;
|
||||
@import MVMCore.MVMCoreCache;
|
||||
|
||||
@implementation MVMCoreUIActionHandler
|
||||
|
||||
- (BOOL)handleOtherActions:(NSString *)actionType actionInformation:(NSDictionary *)actionInformation additionalData:(NSDictionary *)additionalData delegateObject:(DelegateObject *)delegateObject {
|
||||
if ([actionType isEqualToString:KeyActionTypePopup]) {
|
||||
[self popupAction:actionInformation additionalData:additionalData delegateObject:delegateObject];
|
||||
return YES;
|
||||
} else if ([actionType isEqualToString:KeyActionTypeTopAlert]) {
|
||||
[self topAlertAction:actionInformation additionalData:additionalData delegateObject:delegateObject];
|
||||
return YES;
|
||||
} else if ([actionType isEqualToString:KeyActionTypeCollapseNotification]) {
|
||||
[self collapseNotificationAction:actionInformation additionalData:additionalData delegateObject:delegateObject];
|
||||
return YES;
|
||||
} else if ([actionType isEqualToString:KeyActionTypeAlert]) {
|
||||
[self showAlert:actionInformation additionalData:additionalData delegateObject:delegateObject];
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)popupAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
||||
// Perform a popup.
|
||||
NSString *pageTypeForPopup = [actionInformation stringForKey:KeyPageType];
|
||||
[[MVMCoreCache sharedCache] fetchJSONForPageType:pageTypeForPopup queue:nil waitUntilFinished:YES completionHandler:^(NSDictionary * _Nullable jsonDictionary) {
|
||||
|
||||
MVMCoreErrorObject *error = nil;
|
||||
MVMCoreAlertObject *alertObject = [MVMCoreAlertObject alertObjectWithPage:jsonDictionary isGreedy:NO additionalData:additionalData delegateObject:delegateObject error:&error];
|
||||
if ([delegateObject.actionDelegate respondsToSelector:@selector(willShowPopupWithAlertObject:alertJson:)]) {
|
||||
[((id <MVMCoreUIActionDelegateProtocol>)delegateObject.actionDelegate) willShowPopupWithAlertObject:alertObject alertJson:jsonDictionary];
|
||||
}
|
||||
|
||||
if (alertObject) {
|
||||
[[MVMCoreAlertHandler sharedAlertHandler] showAlertWithAlertObject:alertObject];
|
||||
} else {
|
||||
[self handleActionError:error actionInformation:actionInformation additionalData:additionalData delegateObject:delegateObject ];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)showAlert:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
||||
|
||||
MVMCoreErrorObject *error = nil;
|
||||
MVMCoreAlertObject *alertObject = [MVMCoreAlertObject alertObjectWithAction:actionInformation additionalData:additionalData delegateObject:delegateObject error:&error];
|
||||
if ([delegateObject.actionDelegate respondsToSelector:@selector(willShowPopupWithAlertObject:alertJson:)]) {
|
||||
[((id <MVMCoreUIActionDelegateProtocol>)delegateObject.actionDelegate) willShowPopupWithAlertObject:alertObject alertJson:actionInformation];
|
||||
}
|
||||
|
||||
if (alertObject) {
|
||||
[[MVMCoreAlertHandler sharedAlertHandler] showAlertWithAlertObject:alertObject];
|
||||
} else {
|
||||
[self handleActionError:error actionInformation:actionInformation additionalData:additionalData delegateObject:delegateObject];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)topAlertAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
||||
// Perform a top alert.
|
||||
NSString *pageTypeForTopAlert = [actionInformation stringForKey:KeyPageType];
|
||||
[[MVMCoreCache sharedCache] fetchJSONForPageType:pageTypeForTopAlert queue:nil waitUntilFinished:YES completionHandler:^(NSDictionary * _Nullable jsonDictionary) {
|
||||
|
||||
NSDictionary *responseInfo = [jsonDictionary dict:KeyResponseInfo];
|
||||
if (responseInfo) {
|
||||
MVMCoreAlertObject *alertObject = [MVMCoreAlertObject alertObjectForPageType:pageTypeForTopAlert responseInfo:responseInfo additionalData:additionalData delegateObject:delegateObject];
|
||||
if ([delegateObject.actionDelegate respondsToSelector:@selector(willShowTopAlertWithAlertObject:alertJson:)]) {
|
||||
[((id <MVMCoreUIActionDelegateProtocol>)delegateObject.actionDelegate) willShowTopAlertWithAlertObject:alertObject alertJson:actionInformation];
|
||||
}
|
||||
[alertObject showAlert];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)collapseNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
||||
// Collapse the current notification.
|
||||
if ([[CoreUIObject sharedInstance].globalTopAlertDelegate respondsToSelector:@selector(getTopAlertView)]) {
|
||||
[[[CoreUIObject sharedInstance].globalTopAlertDelegate getTopAlertView] collapseNotification];
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)defaultHandleActionError:(nonnull MVMCoreErrorObject *)error additionalData:(nullable NSDictionary *)additionalData {
|
||||
[super defaultHandleActionError:error additionalData:additionalData];
|
||||
if (!error.silentError) {
|
||||
|
||||
// Show alert
|
||||
[MVMCoreDispatchUtility performBlockOnMainThread:^{
|
||||
MVMCoreAlertObject *alertObject = [[MVMCoreAlertObject alloc] initPopupAlertWithError:error isGreedy:NO];
|
||||
[[MVMCoreAlertHandler sharedAlertHandler] showAlertWithAlertObject:alertObject];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Deprecated
|
||||
|
||||
- (BOOL)handleOtherActions:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate {
|
||||
if ([actionType isEqualToString:KeyActionTypePopup]) {
|
||||
[self popupAction:actionInformation additionalData:additionalData delegate:delegate];
|
||||
} else if ([actionType isEqualToString:KeyActionTypeTopAlert]) {
|
||||
[self topAlertAction:actionInformation additionalData:additionalData delegate:delegate];
|
||||
return YES;
|
||||
} else if ([actionType isEqualToString:KeyActionTypeCollapseNotification]) {
|
||||
[self collapseNotificationAction:actionInformation additionalData:additionalData delegate:delegate];
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)popupAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate {
|
||||
// Perform a popup.
|
||||
NSString *pageTypeForPopup = [actionInformation stringForKey:KeyPageType];
|
||||
[[MVMCoreCache sharedCache] fetchJSONForPageType:pageTypeForPopup queue:nil waitUntilFinished:YES completionHandler:^(NSDictionary * _Nullable jsonDictionary) {
|
||||
|
||||
MVMCoreErrorObject *error = nil;
|
||||
MVMCoreAlertObject *alertObject = [MVMCoreAlertObject alertObjectWithPage:jsonDictionary isGreedy:NO additionalData:additionalData delegate:delegate error:&error];
|
||||
if ([delegate respondsToSelector:@selector(willShowPopupWithAlertObject:alertJson:)]) {
|
||||
[((id <MVMCoreUIActionDelegateProtocol>)delegate) willShowPopupWithAlertObject:alertObject alertJson:jsonDictionary];
|
||||
}
|
||||
|
||||
if (alertObject) {
|
||||
[[MVMCoreAlertHandler sharedAlertHandler] showAlertWithAlertObject:alertObject];
|
||||
} else {
|
||||
[self handleActionError:error actionInformation:actionInformation additionalData:additionalData delegate:delegate];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)topAlertAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate {
|
||||
// Perform a top alert.
|
||||
NSString *pageTypeForTopAlert = [actionInformation stringForKey:KeyPageType];
|
||||
[[MVMCoreCache sharedCache] fetchJSONForPageType:pageTypeForTopAlert queue:nil waitUntilFinished:YES completionHandler:^(NSDictionary * _Nullable jsonDictionary) {
|
||||
|
||||
NSDictionary *responseInfo = [jsonDictionary dict:KeyResponseInfo];
|
||||
if (responseInfo) {
|
||||
MVMCoreAlertObject *alertObject = [MVMCoreAlertObject alertObjectForPageType:pageTypeForTopAlert responseInfo:responseInfo additionalData:additionalData actionDelegate:delegate];
|
||||
if ([delegate respondsToSelector:@selector(willShowTopAlertWithAlertObject:alertJson:)]) {
|
||||
alertObject = [((id <MVMCoreUIActionDelegateProtocol>)delegate) willShowTopAlertWithAlertObject:alertObject alertJson:jsonDictionary];
|
||||
}
|
||||
[alertObject showAlert];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)collapseNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate {
|
||||
// Collapse the current notification.
|
||||
if ([[CoreUIObject sharedInstance].globalTopAlertDelegate respondsToSelector:@selector(getTopAlertView)]) {
|
||||
[[[CoreUIObject sharedInstance].globalTopAlertDelegate getTopAlertView] collapseNotification];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@ -17,6 +17,8 @@ open class MVMCoreUIDelegateObject: DelegateObject {
|
||||
public weak var uiTextViewDelegate: UITextViewDelegate?
|
||||
public weak var observingTextFieldDelegate: ObservingTextFieldDelegate?
|
||||
public weak var moleculeDelegate: MoleculeDelegateProtocol?
|
||||
public weak var alertDelegate: (MVMCoreAlertDelegateProtocol & NSObjectProtocol)?
|
||||
public weak var topAlertDelegate: (MVMCoreTopAlertDelegateProtocol & NSObjectProtocol)?
|
||||
|
||||
open override func setAll(withDelegate delegate: Any) {
|
||||
super.setAll(withDelegate: delegate)
|
||||
@ -26,6 +28,8 @@ open class MVMCoreUIDelegateObject: DelegateObject {
|
||||
uiTextViewDelegate = delegate as? UITextViewDelegate
|
||||
observingTextFieldDelegate = delegate as? ObservingTextFieldDelegate
|
||||
moleculeDelegate = delegate as? MoleculeDelegateProtocol
|
||||
alertDelegate = delegate as? (MVMCoreAlertDelegateProtocol & NSObjectProtocol)
|
||||
topAlertDelegate = delegate as? (MVMCoreTopAlertDelegateProtocol & NSObjectProtocol)
|
||||
}
|
||||
|
||||
class func delegateObject(from controller: MVMCoreViewControllerProtocol?) -> MVMCoreUIDelegateObject? {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCore/MVMCoreTopAlertViewProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertViewProtocol.h>
|
||||
@class MVMCoreTopAlertObject;
|
||||
|
||||
@protocol MVMCoreGlobalTopAlertDelegateProtocol <NSObject>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCore/MVMCoreTopAlertDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertDelegateProtocol.h>
|
||||
|
||||
extern NSUInteger const TopAlertDismissTime;
|
||||
|
||||
|
||||
@ -8,10 +8,9 @@
|
||||
|
||||
#import "MVMCoreTopAlertObject.h"
|
||||
#import <MVMCore/NSDictionary+MFConvenience.h>
|
||||
#import "MVMCoreGetterUtility.h"
|
||||
#import <MVMCore/MVMCoreGetterUtility.h>
|
||||
#import <MVMCore/MVMCoreJSONConstants.h>
|
||||
#import "MVMCoreAlertHandler.h"
|
||||
#import "MVMCoreJSONConstants.h"
|
||||
|
||||
|
||||
NSUInteger const TopAlertDismissTime = 5;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
// Copyright © 2018 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MVMCore/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
@class MVMCoreTopAlertObject;
|
||||
|
||||
@protocol MVMCoreTopAlertViewProtocol
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCore/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreViewProtocol.h>
|
||||
|
||||
@class Button;
|
||||
|
||||
@ -19,8 +19,7 @@
|
||||
#import "MFStyler.h"
|
||||
#import "MVMCoreUISession.h"
|
||||
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
||||
|
||||
@import MVMCore.MVMCoreTopAlertDelegateProtocol;
|
||||
#import "MVMCoreTopAlertDelegateProtocol.h"
|
||||
|
||||
@implementation MVMCoreUITopAlertBaseView
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCoreUI/MVMCoreUITopAlertBaseView.h>
|
||||
#import <MVMCore/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
|
||||
@class PrimaryButton;
|
||||
@class MVMCoreUITopAlertShortView;
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
#import "MVMCoreUITopAlertShortView.h"
|
||||
#import "MVMCoreUITopAlertMainView.h"
|
||||
#import <MVMCore/MVMCoreDispatchUtility.h>
|
||||
#import <MVMCore/MVMCoreTopAlertObject.h>
|
||||
#import <MVMCore/MVMCoreAlertHandler.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertObject.h>
|
||||
#import <MVMCoreUI/MVMCoreAlertHandler.h>
|
||||
#import <MVMCore/MVMCoreBlockOperation.h>
|
||||
#import <MVMCore/MVMCoreNavigationHandler.h>
|
||||
#import "MFStyler.h"
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCoreUI/MVMCoreUITopAlertBaseView.h>
|
||||
#import <MVMCore/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
|
||||
@class PillButton;
|
||||
@class MVMCoreTopAlertObject;
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
#import "NSLayoutConstraint+MFConvenience.h"
|
||||
#import <MVMCore/NSDictionary+MFConvenience.h>
|
||||
#import <MVMCore/MVMCoreDispatchUtility.h>
|
||||
#import <MVMCore/MVMCoreTopAlertObject.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertObject.h>
|
||||
#import "UIColor+MFConvenience.h"
|
||||
#import <MVMCore/MVMCoreAlertHandler.h>
|
||||
#import <MVMCoreUI/MVMCoreAlertHandler.h>
|
||||
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
||||
#import <MVMCore/MVMCoreJSONConstants.h>
|
||||
#import "MVMCoreUICommonViewsUtility.h"
|
||||
|
||||
@ -28,7 +28,15 @@ public extension MVMCoreUITopAlertView {
|
||||
|
||||
/// Checks for new top alert json
|
||||
@objc private func responseJSONUpdated(notification: Notification) {
|
||||
guard let responseJSON = (notification.userInfo?[String(describing: MVMCoreLoadObject.self)] as? MVMCoreLoadObject)?.responseJSON,
|
||||
guard let loadObject = (notification.userInfo?[String(describing: MVMCoreLoadObject.self)] as? MVMCoreLoadObject) else { return }
|
||||
|
||||
// Dismiss any top alerts that server wants us to dismiss/
|
||||
if let disableType = loadObject.responseInfoMap?.optionalStringForKey("disableType") {
|
||||
MVMCoreAlertHandler.shared()?.hidePersistentTopAlertView(ofType: disableType)
|
||||
}
|
||||
|
||||
// Show any new top alert.
|
||||
guard let responseJSON = loadObject.responseJSON,
|
||||
let json = responseJSON.optionalDictionaryForKey("TopNotification"),
|
||||
let model = decodeTopNotification(with: json, delegateObject: getDelegateObject()) else { return }
|
||||
showTopAlert(with: model)
|
||||
|
||||
@ -7,12 +7,12 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@import MVMCore.MVMCoreTopAlertAnimationDelegateProtocol;
|
||||
@import MVMCore.MVMCoreLoadDelegateProtocol;
|
||||
@import MVMCore.MVMCoreActionDelegateProtocol;
|
||||
@import MVMCore.MVMCorePresentationDelegateProtocol;
|
||||
@import MVMCore.MVMCoreTopAlertViewProtocol;
|
||||
@import MVMCore.MVMCoreViewProtocol;
|
||||
#import <MVMCoreUI/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreTopAlertViewProtocol.h>
|
||||
#import <MVMCoreUI/ButtonDelegateProtocol.h>
|
||||
|
||||
@class MVMCoreTopAlertObject;
|
||||
|
||||
@ -17,13 +17,13 @@
|
||||
#import "MVMCoreUISession.h"
|
||||
#import "MVMCoreUIUtility.h"
|
||||
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
||||
@import MVMCore.MVMCoreTopAlertObject;
|
||||
#import <MVMCoreUI/MVMCoreTopAlertObject.h>
|
||||
@import MVMCore.MVMCoreLoadHandler;
|
||||
@import MVMCore.MVMCoreNavigationHandler;
|
||||
@import MVMCore.MVMCoreBlockOperation;
|
||||
@import MVMCore.MVMCoreAlertObject;
|
||||
#import <MVMCoreUI/MVMCoreAlertObject.h>
|
||||
@import MVMCore.MVMCoreActionHandler;
|
||||
@import MVMCore.MVMCoreAlertHandler;
|
||||
#import <MVMCoreUI/MVMCoreAlertHandler.h>
|
||||
@import MVMCore.NSDictionary_MFConvenience;
|
||||
@import MVMCore.MVMCoreRequestParameters;
|
||||
@import MVMCore.MVMCoreJSONConstants;
|
||||
@ -274,7 +274,9 @@ NSString * const MFAccTopAlertClosed = @"Top alert notification is closed.";
|
||||
[weakSelf.topAlertObject.delegate topAlertViewDismissed:view];
|
||||
}
|
||||
[operation markAsFinished];
|
||||
completionHandler(finished);
|
||||
if (completionHandler) {
|
||||
completionHandler(finished);
|
||||
}
|
||||
weakSelf.topAlertObject = nil;
|
||||
[MVMCoreDispatchUtility performBlockOnMainThread:^{
|
||||
[weakSelf setStatusBarColor:[UIColor whiteColor] statusBarStyle:UIStatusBarStyleDefault];
|
||||
|
||||
@ -44,6 +44,11 @@ extern NSString * const KeyFieldKey;
|
||||
extern NSString * const KeyRequired;
|
||||
extern NSString * const KeySourceModel;
|
||||
|
||||
extern NSString * const KeyActionTypePopup;
|
||||
extern NSString * const KeyActionTypeAlert;
|
||||
extern NSString * const KeyActionTypeTopAlert;
|
||||
extern NSString * const KeyActionTypeCollapseNotification;
|
||||
|
||||
#pragma mark - Values
|
||||
|
||||
extern NSString * const StringY;
|
||||
|
||||
@ -42,6 +42,10 @@ NSString * const KeyIsHidden = @"isHidden";
|
||||
NSString * const KeyIsOpaque = @"isOpaque";
|
||||
NSString * const KeySourceModel = @"sourceModel";
|
||||
|
||||
NSString * const KeyActionTypePopup = @"popup";
|
||||
NSString * const KeyActionTypeAlert = @"alert";
|
||||
NSString * const KeyActionTypeTopAlert = @"topAlert";
|
||||
NSString * const KeyActionTypeCollapseNotification = @"collapseNotification";
|
||||
|
||||
#pragma mark - Values
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user