Merge branch 'feature/core_object_swift' into 'develop'
JSON updates, processing, and core object fix See merge request BPHV_MIPS/jsoncreator_ios!15
This commit is contained in:
commit
9b1536408b
@ -32,13 +32,6 @@
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
D21B3A27259B93ED001483DC /* SelfSizingCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D21B3A25259B93ED001483DC /* SelfSizingCollectionView.swift */; };
|
||||
D2431DEB25E93A4F001C7AAC /* buttimag.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2431DEA25E93A4F001C7AAC /* buttimag.swift */; };
|
||||
D27564B62590FADB003CA713 /* ListDeviceRightVariableCaretModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D27564B42590FADB003CA713 /* ListDeviceRightVariableCaretModel.swift */; };
|
||||
D27564B72590FADB003CA713 /* ListDeviceRightVariableCaret.swift in Sources */ = {isa = PBXBuildFile; fileRef = D27564B52590FADB003CA713 /* ListDeviceRightVariableCaret.swift */; };
|
||||
D27564C825939E91003CA713 /* LinkCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D27564C525939E91003CA713 /* LinkCollectionViewCell.swift */; };
|
||||
D27564C925939E91003CA713 /* Links.swift in Sources */ = {isa = PBXBuildFile; fileRef = D27564C625939E91003CA713 /* Links.swift */; };
|
||||
D27564CA25939E91003CA713 /* LinksModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D27564C725939E91003CA713 /* LinksModel.swift */; };
|
||||
D29C557825BF1F340082E7D6 /* JSONCreatorActionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D29C557725BF1F340082E7D6 /* JSONCreatorActionHandler.swift */; };
|
||||
D2B1E3F322F4A68F0065F95C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2B1E3F222F4A68F0065F95C /* AppDelegate.swift */; };
|
||||
D2B1E3F522F4A68F0065F95C /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2B1E3F422F4A68F0065F95C /* MasterViewController.swift */; };
|
||||
@ -47,10 +40,6 @@
|
||||
D2B1E3FC22F4A6930065F95C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D2B1E3FB22F4A6930065F95C /* Assets.xcassets */; };
|
||||
D2B1E3FF22F4A6930065F95C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D2B1E3FD22F4A6930065F95C /* LaunchScreen.storyboard */; };
|
||||
D2B1E40A22F4C9F00065F95C /* JSON in Resources */ = {isa = PBXBuildFile; fileRef = D2B1E40922F4C9F00065F95C /* JSON */; };
|
||||
D2FC4FAD25897ACB00061EA4 /* StepModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2FC4FA925897ACB00061EA4 /* StepModel.swift */; };
|
||||
D2FC4FAE25897ACB00061EA4 /* OrderTrackerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2FC4FAA25897ACB00061EA4 /* OrderTrackerModel.swift */; };
|
||||
D2FC4FAF25897ACB00061EA4 /* Step.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2FC4FAB25897ACB00061EA4 /* Step.swift */; };
|
||||
D2FC4FB025897ACB00061EA4 /* OrderTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2FC4FAC25897ACB00061EA4 /* OrderTracker.swift */; };
|
||||
EA09CDBD282C3FD800A7835F /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA09CDBC282C3FD800A7835F /* CoreBluetooth.framework */; };
|
||||
EA33618B288B1B630071C351 /* VDS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA33618A288B1B630071C351 /* VDS.framework */; };
|
||||
EA33618C288B1B630071C351 /* VDS.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EA33618A288B1B630071C351 /* VDS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
@ -86,13 +75,6 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
D21B3A25259B93ED001483DC /* SelfSizingCollectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelfSizingCollectionView.swift; sourceTree = "<group>"; };
|
||||
D2431DEA25E93A4F001C7AAC /* buttimag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = buttimag.swift; sourceTree = "<group>"; };
|
||||
D27564B42590FADB003CA713 /* ListDeviceRightVariableCaretModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListDeviceRightVariableCaretModel.swift; sourceTree = "<group>"; };
|
||||
D27564B52590FADB003CA713 /* ListDeviceRightVariableCaret.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListDeviceRightVariableCaret.swift; sourceTree = "<group>"; };
|
||||
D27564C525939E91003CA713 /* LinkCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinkCollectionViewCell.swift; sourceTree = "<group>"; };
|
||||
D27564C625939E91003CA713 /* Links.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Links.swift; sourceTree = "<group>"; };
|
||||
D27564C725939E91003CA713 /* LinksModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinksModel.swift; sourceTree = "<group>"; };
|
||||
D29C557725BF1F340082E7D6 /* JSONCreatorActionHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONCreatorActionHandler.swift; sourceTree = "<group>"; };
|
||||
D2B1E3EF22F4A68F0065F95C /* JSONCreator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JSONCreator.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D2B1E3F222F4A68F0065F95C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
@ -106,10 +88,6 @@
|
||||
D2B1E51222F9F9590065F95C /* MVMAnimationFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MVMAnimationFramework.framework; path = ../SharedFrameworks/MVMAnimationFramework.framework; sourceTree = "<group>"; };
|
||||
D2B1E51C22FA0DF50065F95C /* MVMCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MVMCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D2B1E51E22FA0DF80065F95C /* MVMCoreUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MVMCoreUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D2FC4FA925897ACB00061EA4 /* StepModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StepModel.swift; sourceTree = "<group>"; };
|
||||
D2FC4FAA25897ACB00061EA4 /* OrderTrackerModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderTrackerModel.swift; sourceTree = "<group>"; };
|
||||
D2FC4FAB25897ACB00061EA4 /* Step.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Step.swift; sourceTree = "<group>"; };
|
||||
D2FC4FAC25897ACB00061EA4 /* OrderTracker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderTracker.swift; sourceTree = "<group>"; };
|
||||
EA09CDBC282C3FD800A7835F /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; };
|
||||
EA2ED278285BB3F400781478 /* MVMCoreUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = MVMCoreUI.xcframework; path = ../SharedFrameworks/MVMCoreUI.xcframework; sourceTree = "<group>"; };
|
||||
EA2ED279285BB3F400781478 /* MVMCore.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = MVMCore.xcframework; path = ../SharedFrameworks/MVMCore.xcframework; sourceTree = "<group>"; };
|
||||
@ -146,9 +124,7 @@
|
||||
D288D69B26CAE26900A5C365 /* MF */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2431DEA25E93A4F001C7AAC /* buttimag.swift */,
|
||||
D29C557725BF1F340082E7D6 /* JSONCreatorActionHandler.swift */,
|
||||
D2FC4FA825897ACB00061EA4 /* Order Tracker */,
|
||||
);
|
||||
path = MF;
|
||||
sourceTree = "<group>";
|
||||
@ -209,23 +185,6 @@
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D2FC4FA825897ACB00061EA4 /* Order Tracker */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D21B3A25259B93ED001483DC /* SelfSizingCollectionView.swift */,
|
||||
D27564C525939E91003CA713 /* LinkCollectionViewCell.swift */,
|
||||
D27564C625939E91003CA713 /* Links.swift */,
|
||||
D27564C725939E91003CA713 /* LinksModel.swift */,
|
||||
D27564B52590FADB003CA713 /* ListDeviceRightVariableCaret.swift */,
|
||||
D27564B42590FADB003CA713 /* ListDeviceRightVariableCaretModel.swift */,
|
||||
D2FC4FA925897ACB00061EA4 /* StepModel.swift */,
|
||||
D2FC4FAA25897ACB00061EA4 /* OrderTrackerModel.swift */,
|
||||
D2FC4FAB25897ACB00061EA4 /* Step.swift */,
|
||||
D2FC4FAC25897ACB00061EA4 /* OrderTracker.swift */,
|
||||
);
|
||||
path = "Order Tracker";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@ -347,20 +306,9 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D2B1E3F722F4A68F0065F95C /* DetailViewController.swift in Sources */,
|
||||
D27564CA25939E91003CA713 /* LinksModel.swift in Sources */,
|
||||
D2B1E3F522F4A68F0065F95C /* MasterViewController.swift in Sources */,
|
||||
D27564B62590FADB003CA713 /* ListDeviceRightVariableCaretModel.swift in Sources */,
|
||||
D27564B72590FADB003CA713 /* ListDeviceRightVariableCaret.swift in Sources */,
|
||||
D2431DEB25E93A4F001C7AAC /* buttimag.swift in Sources */,
|
||||
D27564C825939E91003CA713 /* LinkCollectionViewCell.swift in Sources */,
|
||||
D2FC4FB025897ACB00061EA4 /* OrderTracker.swift in Sources */,
|
||||
D27564C925939E91003CA713 /* Links.swift in Sources */,
|
||||
D2FC4FAE25897ACB00061EA4 /* OrderTrackerModel.swift in Sources */,
|
||||
D21B3A27259B93ED001483DC /* SelfSizingCollectionView.swift in Sources */,
|
||||
D2B1E3F322F4A68F0065F95C /* AppDelegate.swift in Sources */,
|
||||
D29C557825BF1F340082E7D6 /* JSONCreatorActionHandler.swift in Sources */,
|
||||
D2FC4FAD25897ACB00061EA4 /* StepModel.swift in Sources */,
|
||||
D2FC4FAF25897ACB00061EA4 /* Step.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@ -22,6 +22,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
|
||||
|
||||
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
||||
// Setup our core object with the default implementation
|
||||
MVMCoreObject.sharedInstance()?.defaultInitialSetup()
|
||||
CoreUIObject.sharedInstance()?.defaultInitialSetup()
|
||||
return true
|
||||
}
|
||||
|
||||
@ -68,12 +68,21 @@ class DetailViewController: UIViewController {
|
||||
@objc func play() {
|
||||
do {
|
||||
if let data = textView.text.data(using: .utf8), let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) as? [AnyHashable: Any] {
|
||||
let page = jsonObject.optionalDictionaryForKey(KeyPage)
|
||||
let pageType = page?.optionalStringForKey(KeyPageType)
|
||||
let template = page?.optionalStringForKey("template")
|
||||
guard let page = jsonObject.optionalDictionaryForKey(KeyPage) else {
|
||||
let error = NSError(domain: ErrorDomainNative, code: ErrorCode.parsingJSON.rawValue, userInfo: [NSLocalizedDescriptionKey: "Needs a Page to show."])
|
||||
showError(error)
|
||||
return
|
||||
}
|
||||
guard let pageType = page.optionalStringForKey(KeyPageType) else {
|
||||
let error = NSError(domain: ErrorDomainNative, code: ErrorCode.parsingJSON.rawValue, userInfo: [NSLocalizedDescriptionKey: "Needs a pageType."])
|
||||
showError(error)
|
||||
return
|
||||
}
|
||||
let template = page.optionalStringForKey("template")
|
||||
let moduleMap = jsonObject.optionalDictionaryForKey(KeyModuleMap)
|
||||
var errorObject: MVMCoreErrorObject? = MVMCoreErrorObject(title: nil, message: "No Template Found", code: ErrorCode.initViewController.rawValue, domain: ErrorDomainNative, location: nil)
|
||||
if let viewController = MVMCoreUIViewControllerMappingObject.shared()?.createMFViewController(ofTemplate: template, pageType: pageType),
|
||||
let loadObject = MVMCoreLoadObject(pageJSON: page, modulesJSON: jsonObject.optionalDictionaryForKey(KeyModuleMap), requestParameters: nil, dataForPage: nil, delegateObject: nil),
|
||||
let loadObject = MVMCoreLoadObject(pageJSON: page, modulesJSON: moduleMap, requestParameters: nil, dataForPage: nil, delegateObject: nil),
|
||||
viewController.shouldFinishProcessingLoad(loadObject, error: &errorObject) {
|
||||
|
||||
Task(priority: .userInitiated) { @MainActor in
|
||||
@ -93,6 +102,9 @@ class DetailViewController: UIViewController {
|
||||
|
||||
NavigationHandler.shared().viewControllerToPresentOn = split
|
||||
UIApplication.shared.delegate?.window??.rootViewController = split
|
||||
|
||||
await MVMCoreLoadRequestOperation.processJSON(fromServer: jsonObject, loadObject: loadObject)
|
||||
|
||||
await NavigationHandler.shared().push(viewController: viewController, animated: false)
|
||||
}
|
||||
} else if let errorObject = errorObject {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
"moleculeName":"headerH2Btns",
|
||||
"moleculeName":"headerH2",
|
||||
"headlineBody": {
|
||||
"moleculeName": "headlineBody",
|
||||
"headline":{
|
||||
@ -9,21 +9,4 @@
|
||||
"moleculeName": "label",
|
||||
"text":"body"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
"moleculeName": "twoButtonView",
|
||||
"primaryButton": {
|
||||
"moleculeName": "button",
|
||||
"title": "primary",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
},
|
||||
"secondaryButton": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
"moleculeName":"headerH2",
|
||||
"moleculeName":"headerH2Btns",
|
||||
"headlineBody": {
|
||||
"moleculeName": "headlineBody",
|
||||
"headline":{
|
||||
@ -9,4 +9,21 @@
|
||||
"moleculeName": "label",
|
||||
"text":"body"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
"moleculeName": "twoButtonView",
|
||||
"primaryButton": {
|
||||
"moleculeName": "button",
|
||||
"title": "primary",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
},
|
||||
"secondaryButton": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
399
JSONCreator_iOS/JSONCreator/JSON/Samples/ButtonTest.json
Normal file
399
JSONCreator_iOS/JSONCreator/JSON/Samples/ButtonTest.json
Normal file
@ -0,0 +1,399 @@
|
||||
{
|
||||
"ResponseInfo": {},
|
||||
"Page": {
|
||||
"pageType": "contactUs",
|
||||
"screenHeading": "Select an international plan",
|
||||
"template": "list",
|
||||
"formRules": [{
|
||||
"groupName": "default",
|
||||
"rules": [{
|
||||
"type": "anyValueChanged",
|
||||
"fields": [
|
||||
"c1"
|
||||
]
|
||||
}]
|
||||
}],
|
||||
"molecules": [{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "default",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "primary",
|
||||
"style": "primary",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "large",
|
||||
"size": "large",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "standard",
|
||||
"size": "standard",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "small",
|
||||
"size": "small",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "tiny",
|
||||
"size": "tiny",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary",
|
||||
"style": "secondary",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary large",
|
||||
"style": "secondary",
|
||||
"size": "large",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary standard",
|
||||
"style": "secondary",
|
||||
"size": "standard",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary small",
|
||||
"style": "secondary",
|
||||
"size": "small",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary tiny",
|
||||
"style": "secondary",
|
||||
"size": "tiny",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "primary disabled",
|
||||
"enabled": false,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "small disabled",
|
||||
"enabled": false,
|
||||
"size": "small",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary disabled",
|
||||
"enabled": false,
|
||||
"style": "secondary",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary small disabled",
|
||||
"style": "secondary",
|
||||
"enabled": false,
|
||||
"size": "small",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "default",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "primary",
|
||||
"style": "primary",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "large",
|
||||
"size": "large",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "standard",
|
||||
"size": "standard",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "small",
|
||||
"size": "small",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "tiny",
|
||||
"size": "tiny",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary",
|
||||
"style": "secondary",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary large",
|
||||
"style": "secondary",
|
||||
"size": "large",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary standard",
|
||||
"style": "secondary",
|
||||
"size": "standard",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary small",
|
||||
"style": "secondary",
|
||||
"size": "small",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary tiny",
|
||||
"style": "secondary",
|
||||
"size": "tiny",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "primary disabled",
|
||||
"enabled": false,
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "small disabled",
|
||||
"enabled": false,
|
||||
"size": "small",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary disabled",
|
||||
"enabled": false,
|
||||
"style": "secondary",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName": "listItem",
|
||||
"backgroundColor": "black",
|
||||
"molecule": {
|
||||
"moleculeName": "button",
|
||||
"title": "secondary small disabled",
|
||||
"style": "secondary",
|
||||
"enabled": false,
|
||||
"size": "small",
|
||||
"inverted": true,
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"checkbox" : {
|
||||
"moleculeName" : "checkbox",
|
||||
"fieldKey": "c1",
|
||||
"groupName": "default",
|
||||
},
|
||||
"moleculeName" : "listLVCB",
|
||||
"eyebrowHeadlineBodyLink" : {
|
||||
"moleculeName" : "eyebrowHeadlineBodyLink",
|
||||
"headline" : {
|
||||
"moleculeName" : "label",
|
||||
"text" : "Change to enable the primary footer button."
|
||||
}
|
||||
}
|
||||
|
||||
}],
|
||||
"footer": {
|
||||
"moleculeName": "footer",
|
||||
"molecule": {
|
||||
"moleculeName":"twoButtonView",
|
||||
"primaryButton":{
|
||||
"moleculeName": "button",
|
||||
"title":"x",
|
||||
"groupName": "default",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"pageType": "rtlVisitUs"
|
||||
}
|
||||
},
|
||||
"secondaryButton":{
|
||||
"moleculeName": "button",
|
||||
"title":"y",
|
||||
"action": {
|
||||
"actionType": "back"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -86,7 +86,7 @@
|
||||
"moleculeName": "button",
|
||||
"title": "Learn more",
|
||||
"style": "secondary",
|
||||
"size": "tiny",
|
||||
"size": "small",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"pageType": "x"
|
||||
@ -147,7 +147,7 @@
|
||||
"moleculeName": "button",
|
||||
"title": "Learn more",
|
||||
"style": "secondary",
|
||||
"size": "tiny",
|
||||
"size": "small",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"pageType": "x"
|
||||
|
||||
@ -0,0 +1,931 @@
|
||||
{
|
||||
"SystemParams":{
|
||||
"googleMapsAPIKey":"AIzaSyD9-5Q4fTMYESxmbZhYpA98sy7XFK2d0BE",
|
||||
"enableGoogleMapsIOS":true
|
||||
},
|
||||
"Page":{
|
||||
"ResponseInfo":{
|
||||
"type":"Success",
|
||||
"code":"00000"
|
||||
},
|
||||
"pageType":"prospectWelcomeTrial",
|
||||
"backgroundColor":"coolGray1",
|
||||
"tabBarIndex":0,
|
||||
"navigationBar":{
|
||||
"line":{
|
||||
"moleculeName":"line",
|
||||
"type":"none"
|
||||
},
|
||||
"moleculeName":"navigationBar",
|
||||
"additionalLeftButtons":[
|
||||
{
|
||||
"accessibilityText":"Verizon logo, tap anytime to scroll to top of page",
|
||||
"moleculeName":"navigationImageButton",
|
||||
"image":"nav_vz_mark",
|
||||
"imageRenderingMode":"alwaysOriginal",
|
||||
"action":{
|
||||
"analyticsData":{
|
||||
"vzdl.page.linkName":"global black bar nav: vz icon"
|
||||
},
|
||||
"actionType":"scrollToTop"
|
||||
}
|
||||
}
|
||||
],
|
||||
"additionalRightButtons":[
|
||||
{
|
||||
"moleculeName":"navigationLabelButton",
|
||||
"title":"Sign in",
|
||||
"action":{
|
||||
"hideCloseButton":false,
|
||||
"appContext":"mobileFirstSS",
|
||||
"analyticsData":{
|
||||
"vzdl.page.id":"prospectTrailWelcome",
|
||||
"vzdl.target.engagement.intent":"customer sign in",
|
||||
"vzdl.page.displayChannel":"MVA",
|
||||
"vzdl.page.linkName":"I'm a customer",
|
||||
"vzdl.page.name":"prospectTrailWelcome"
|
||||
},
|
||||
"requestURL":"https:\/\/mobile-exp.vzw.com\/mobile\/nsa\/nos\/gw\/launchapp\/oauthSignIn?",
|
||||
"extraParameters":{
|
||||
"oAuthLaunchAppFlow":"Y"
|
||||
},
|
||||
"disableNativeAction":false,
|
||||
"customUserAgent":"MY_VZW_APP;IOS;16.3.1;iPhone15,2;10.5.0;VZW-MFA-IOS",
|
||||
"openInWebview":true,
|
||||
"disableOfflineDevice":false,
|
||||
"hideUrl":false,
|
||||
"actionType":"openPage",
|
||||
"pageType":"userSignIn",
|
||||
"presentationStyle":"root",
|
||||
"isSelected":false,
|
||||
"openOauthWebView":false,
|
||||
"hideWebNavigation":false,
|
||||
"selected":false
|
||||
}
|
||||
}
|
||||
],
|
||||
"style":"dark"
|
||||
},
|
||||
"line":{
|
||||
"moleculeName":"line",
|
||||
"type":"none"
|
||||
},
|
||||
"header":{
|
||||
"moleculeName":"header",
|
||||
"useVerticalMargins":true,
|
||||
"backgroundColor":"coolGray1",
|
||||
"topPadding":32,
|
||||
"bottomPadding":24,
|
||||
"horizontalAlignment":"center",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"Join the best mobile\nnetwork.",
|
||||
"textAlignment":"center",
|
||||
"fontStyle":"BoldTitleXLarge"
|
||||
}
|
||||
},
|
||||
"template":"list",
|
||||
"molecules":[
|
||||
{
|
||||
"moleculeName":"listItem",
|
||||
"useVerticalMargins":false,
|
||||
"backgroundColor":"coolGray1",
|
||||
"molecule":{
|
||||
"moleculeName": "stack",
|
||||
"axis": "vertical",
|
||||
"backgroundColor":"black",
|
||||
"cornerRadius":8,
|
||||
"useVerticalMargins":true,
|
||||
"topPadding":24,
|
||||
"bottomPadding":24,
|
||||
"molecules": [{
|
||||
"moleculeName":"stackItem",
|
||||
"spacing": 0,
|
||||
"horizontalAlignment":"center",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"Bring your own\ndevice",
|
||||
"fontStyle":"BoldTitleXLarge",
|
||||
"textColor":"white",
|
||||
"textAlignment":"center"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"stackItem",
|
||||
"horizontalAlignment":"center",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"Bring your device and get up to\n$540 on select plans.",
|
||||
"fontStyle":"RegularBodyLarge",
|
||||
"textColor":"white",
|
||||
"textAlignment":"center"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"stackItem",
|
||||
"horizontalAlignment":"center",
|
||||
"verticalAlignment":"center",
|
||||
"molecule":{
|
||||
"moleculeName":"button",
|
||||
"size":"small",
|
||||
"style":"primary",
|
||||
"inverted":true,
|
||||
"title":"Get started",
|
||||
"action":{
|
||||
"analyticsData":{
|
||||
"vzdl.page.id":"prospectTrailWelcome",
|
||||
"vzdl.target.engagement.intent":"prospectJoinVerizon",
|
||||
"vzdl.page.displayChannel":"MVA",
|
||||
"vzdl.page.linkName":"Join Verizon",
|
||||
"vzdl.page.name":"prospectTrailWelcome"
|
||||
},
|
||||
"presentationStyle":"root",
|
||||
"pageType":"joinByodProspect",
|
||||
"disableOfflineDevice":false,
|
||||
"showNativeNavigation":true,
|
||||
"disableAction":false,
|
||||
"hideCloseButton":true,
|
||||
"hideWebNavigation":false,
|
||||
"checkCameraPermission":false,
|
||||
"enableNativeScroll":true,
|
||||
"appContext":"mobileFirstSS",
|
||||
"disableNativeAction":false,
|
||||
"openInWebview":true,
|
||||
"isSelected":false,
|
||||
"requestURL":"https:\/\/www.verizon.com\/onedp\/api\/mva\/verifyDevice?identifier=IPHONE15,2&promptZip=true",
|
||||
"tryToReplaceFirst":false,
|
||||
"browserUrl":"https:\/\/www.verizon.com\/onedp\/api\/mva\/verifyDevice?identifier=IPHONE15,2&promptZip=true",
|
||||
"actionType":"openURL",
|
||||
"length":0,
|
||||
"openOauthWebView":true,
|
||||
"selected":false,
|
||||
"clientParameters":{
|
||||
"timeout":30,
|
||||
"list":[
|
||||
{
|
||||
"type":"eSimCapable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"customUserAgent":"MY_VZW_APP;IOS;16.3.1;iPhone15,2;10.5.0;VZW-MFA-IOS",
|
||||
"hideUrl":true
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"listItem",
|
||||
"useHorizontalMargins":false,
|
||||
"topPadding":48,
|
||||
"bottomPadding":0,
|
||||
"backgroundColor":"coolGray1",
|
||||
"molecule":{
|
||||
"moleculeName":"carousel",
|
||||
"accessibilityText":"carousel",
|
||||
"pagingMolecule":{
|
||||
"moleculeName":"barsCarouselIndicator",
|
||||
"position":-20
|
||||
},
|
||||
"height":92,
|
||||
"spacing":12,
|
||||
"itemWidthPercent":45,
|
||||
"useHorizontalMargins":true,
|
||||
"leftPadding":16,
|
||||
"rightPadding":16,
|
||||
"molecules":[
|
||||
{
|
||||
"moleculeName":"carouselItem",
|
||||
"backgroundColor":"white",
|
||||
"cornerRadius":8,
|
||||
"useVerticalMargins":true,
|
||||
"topPadding":16,
|
||||
"bottomPadding":16,
|
||||
"molecule":{
|
||||
"moleculeName":"stack",
|
||||
"axis":"vertical",
|
||||
"molecules":[
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"spacing":0,
|
||||
"horizontalAlignment":"leading",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"Deals",
|
||||
"fontStyle":"BoldTitleSmall"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"horizontalAlignment":"trailing",
|
||||
"verticalAlignment":"trailing",
|
||||
"molecule":{
|
||||
"moleculeName":"arrow"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"action":{
|
||||
"presentationStyle":"push",
|
||||
"actionType":"openPage",
|
||||
"pageType":"deals"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"carouselItem",
|
||||
"backgroundColor":"white",
|
||||
"cornerRadius":8,
|
||||
"useVerticalMargins":true,
|
||||
"topPadding":16,
|
||||
"bottomPadding":16,
|
||||
"molecule":{
|
||||
"moleculeName":"stack",
|
||||
"axis":"vertical",
|
||||
"molecules":[
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"spacing":0,
|
||||
"horizontalAlignment":"leading",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"Shop phones",
|
||||
"fontStyle":"BoldTitleSmall"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"horizontalAlignment":"trailing",
|
||||
"verticalAlignment":"trailing",
|
||||
"molecule":{
|
||||
"moleculeName":"arrow"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"action":{
|
||||
"presentationStyle":"push",
|
||||
"actionType":"openPage",
|
||||
"pageType":"smartphones"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"carouselItem",
|
||||
"backgroundColor":"white",
|
||||
"cornerRadius":8,
|
||||
"useVerticalMargins":true,
|
||||
"topPadding":16,
|
||||
"bottomPadding":16,
|
||||
"molecule":{
|
||||
"moleculeName":"stack",
|
||||
"axis":"vertical",
|
||||
"molecules":[
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"spacing":0,
|
||||
"horizontalAlignment":"leading",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"Shop plans",
|
||||
"fontStyle":"BoldTitleSmall"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"horizontalAlignment":"trailing",
|
||||
"verticalAlignment":"trailing",
|
||||
"molecule":{
|
||||
"moleculeName":"arrow"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"action":{
|
||||
"presentationStyle":"push",
|
||||
"actionType":"openPage",
|
||||
"pageType":"plans"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"listItem",
|
||||
"topPadding":48,
|
||||
"bottomPadding":0,
|
||||
"horizontalAlignment":"center",
|
||||
"backgroundColor":"coolGray1",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"The network America\nrelies on.",
|
||||
"textAlignment":"center",
|
||||
"fontStyle":"BoldTitleMedium"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"listItem",
|
||||
"topPadding":24,
|
||||
"bottomPadding":0,
|
||||
"backgroundColor":"coolGray1",
|
||||
"molecule":{
|
||||
"moleculeName":"stack",
|
||||
"axis":"horizontal",
|
||||
"molecules":[
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"molecule":{
|
||||
"moleculeName":"image",
|
||||
"image":"Prospect5GChart",
|
||||
"width":35,
|
||||
"height":32,
|
||||
"contentMode":"scaleAspectFit"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"5G Nationwide covers 200+ million people in 2,700+ cities.",
|
||||
"fontStyle":"RegularBodyLarge"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"listItem",
|
||||
"backgroundColor":"coolGray1",
|
||||
"topPadding":16,
|
||||
"bottomPadding":0,
|
||||
"molecule":{
|
||||
"moleculeName":"stack",
|
||||
"axis":"horizontal",
|
||||
"molecules":[
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"molecule":{
|
||||
"moleculeName":"image",
|
||||
"image":"ProspectDevice",
|
||||
"width":35,
|
||||
"height":32,
|
||||
"contentMode":"scaleAspectFit"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"Highest in Customer Satisfaction with Small Business Wireless Service.",
|
||||
"fontStyle":"RegularBodyLarge"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"listItem",
|
||||
"topPadding":24,
|
||||
"bottomPadding":0,
|
||||
"backgroundColor":"coolGray1",
|
||||
"horizontalAlignment":"center",
|
||||
"molecule":{
|
||||
"moleculeName":"caretLink",
|
||||
"title":"Check out the mobile coverage map",
|
||||
"action":{
|
||||
"actionType":"openPage",
|
||||
"pageType":"coverage"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"listItem",
|
||||
"topPadding":48,
|
||||
"bottomPadding":0,
|
||||
"horizontalAlignment":"center",
|
||||
"backgroundColor":"coolGray1",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"The fastest home\ninternet.",
|
||||
"textAlignment":"center",
|
||||
"fontStyle":"BoldTitleXLarge"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"listItem",
|
||||
"topPadding":24,
|
||||
"bottomPadding":0,
|
||||
"backgroundColor":"coolGray1",
|
||||
"hideArrow":true,
|
||||
"molecule":{
|
||||
"moleculeName":"stack",
|
||||
"axis":"vertical",
|
||||
"backgroundColor":"#EE0000",
|
||||
"cornerRadius":8,
|
||||
"useHorizontalMargins":true,
|
||||
"useVerticalMargins":true,
|
||||
"topPadding":16,
|
||||
"bottomPadding":16,
|
||||
"leftPadding":16,
|
||||
"rightPadding":16,
|
||||
"molecules":[
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"spacing":0,
|
||||
"horizontalAlignment":"center",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"textAlignment":"center",
|
||||
"text":"Get Verizon Home Internet and save.",
|
||||
"fontStyle":"BoldTitleSmall",
|
||||
"textColor":"white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"horizontalAlignment":"center",
|
||||
"molecule":{
|
||||
"moleculeName":"stack",
|
||||
"axis":"vertical",
|
||||
"molecules":[
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"horizontalAlignment":"leading",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"textAlignment":"center",
|
||||
"text":"Starting at",
|
||||
"fontStyle":"BoldTitleSmall",
|
||||
"textColor":"white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"spacing":4,
|
||||
"molecule":{
|
||||
"moleculeName":"stack",
|
||||
"axis":"horizontal",
|
||||
"molecules":[
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"verticalAlignment":"leading",
|
||||
"spacing":0,
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"$",
|
||||
"fontStyle":"BoldTitleXLarge",
|
||||
"textColor":"white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"verticalAlignment":"fill",
|
||||
"spacing":0,
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"25",
|
||||
"fontStyle":"BoldFeatureMedium",
|
||||
"textColor":"white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"verticalAlignment":"trailing",
|
||||
"spacing":0,
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"text":"/mo.",
|
||||
"fontStyle":"BoldBodySmall",
|
||||
"textColor":"white"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"horizontalAlignment":"center",
|
||||
"molecule":{
|
||||
"moleculeName":"label",
|
||||
"textAlignment":"center",
|
||||
"text":"Switch to Verizon Home Internet starting at a low price, guaranteed. The network America relies on, at a price you can rely on.",
|
||||
"fontStyle":"RegularBodySmall",
|
||||
"textColor":"white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName":"stackItem",
|
||||
"horizontalAlignment":"center",
|
||||
"molecule":{
|
||||
"moleculeName":"button",
|
||||
"size":"small",
|
||||
"style":"secondary",
|
||||
"inverted":true,
|
||||
"title":"Get started",
|
||||
"action":{
|
||||
"actionType":"openPage",
|
||||
"pageType":"home"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"ModuleMap":{
|
||||
"tabBar":{
|
||||
"tabs":[
|
||||
{
|
||||
"title":"Discover",
|
||||
"image":"tab_discover",
|
||||
"tabBarIndex":0,
|
||||
"action":{
|
||||
"actionType":"openPage",
|
||||
"pageType":"prospectWelcomeTrial",
|
||||
"presentationStyle":"root"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title":"Account",
|
||||
"image":"tab_account",
|
||||
"tabBarIndex":1,
|
||||
"action":{
|
||||
"actionType":"openPage",
|
||||
"pageType":"account",
|
||||
"presentationStyle":"root"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title":"Shop",
|
||||
"image":"tab_shop_3_0",
|
||||
"tabBarIndex":2,
|
||||
"action":{
|
||||
"actionType":"openPage",
|
||||
"pageType":"shop",
|
||||
"requestURL":"https:\/\/mobile-exp-qa3.vzw.com\/mobile\/nsa\/nos\/gw\/launchapp\/unauthenticatedWebview",
|
||||
"presentationStyle":"root"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title":"Stores",
|
||||
"image":"nav_stores_white",
|
||||
"tabBarIndex":3,
|
||||
"action":{
|
||||
"actionType":"openPage",
|
||||
"pageType":"rtlStoreJourney",
|
||||
"presentationStyle":"root",
|
||||
"extraParameters":{
|
||||
"fromPage":"rtlStoreJourney",
|
||||
"makeFavourite":"N"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"SearchField":{
|
||||
"searchField":{
|
||||
"moleculeName":"searchTextField",
|
||||
"placeholder":"What are you looking for?",
|
||||
"fieldKey":"searchInput"
|
||||
},
|
||||
"searchAction":{
|
||||
"actionType":"openPage",
|
||||
"pageType":"search"
|
||||
},
|
||||
"searchDoneAction":{
|
||||
"actionType":"openPage",
|
||||
"pageType":"searchDone"
|
||||
}
|
||||
},
|
||||
"HabContent":{
|
||||
"habSearch":{
|
||||
"label":{
|
||||
"moleculeName":"label",
|
||||
"text":"How can we help?"
|
||||
},
|
||||
"image":{
|
||||
"moleculeName":"image",
|
||||
"image":"hab_search_black",
|
||||
"width":17,
|
||||
"height":17
|
||||
},
|
||||
"image_inverted":{
|
||||
"moleculeName":"image",
|
||||
"image":"hab_search_white",
|
||||
"width":17,
|
||||
"height":17
|
||||
},
|
||||
"action":{
|
||||
"actionType":"openURL",
|
||||
"browserUrl":"https://www.verizon.com/onesearch/search?source=MFNative",
|
||||
"openInWebview":true,
|
||||
"showNativeNavigation":true
|
||||
}
|
||||
},
|
||||
"habAssistant":{
|
||||
"label":{
|
||||
"moleculeName":"label",
|
||||
"text":"Chat with the Verizon Assistant"
|
||||
},
|
||||
"image":{
|
||||
"moleculeName":"image",
|
||||
"image":"hab_assistant_black",
|
||||
"width":20,
|
||||
"height":20
|
||||
},
|
||||
"image_inverted":{
|
||||
"moleculeName":"image",
|
||||
"image":"hab_assistant_white",
|
||||
"width":20,
|
||||
"height":20
|
||||
},
|
||||
"action":{
|
||||
"actionType":"openPanel",
|
||||
"panel":"right"
|
||||
}
|
||||
},
|
||||
"habLiveChat":{
|
||||
"label":{
|
||||
"moleculeName":"label",
|
||||
"text":"Chat with an agent"
|
||||
},
|
||||
"image":{
|
||||
"moleculeName":"image",
|
||||
"image":"hab_live_chat_black",
|
||||
"imageFormat":"gif",
|
||||
"width":20,
|
||||
"height":20
|
||||
},
|
||||
"image_inverted":{
|
||||
"moleculeName":"image",
|
||||
"image":"hab_live_chat_white",
|
||||
"imageFormat":"gif",
|
||||
"width":20,
|
||||
"height":20
|
||||
},
|
||||
"action":{
|
||||
"actionType":"openPanel",
|
||||
"panel":"right"
|
||||
}
|
||||
},
|
||||
"habLiveChatNewMessages":{
|
||||
"label":{
|
||||
"moleculeName":"label",
|
||||
"text":"Return to chat with an agent"
|
||||
},
|
||||
"image":{
|
||||
"moleculeName":"image",
|
||||
"image":"hab_live_chat_newmessage_black",
|
||||
"imageFormat":"gif",
|
||||
"width":20,
|
||||
"height":20
|
||||
},
|
||||
"image_inverted":{
|
||||
"moleculeName":"image",
|
||||
"image":"hab_live_chat_newmessage_white",
|
||||
"imageFormat":"gif",
|
||||
"width":20,
|
||||
"height":20
|
||||
},
|
||||
"action":{
|
||||
"actionType":"openPanel",
|
||||
"panel":"right"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SavedCart":{
|
||||
"ButtonMap":{
|
||||
"PrimaryButton":{
|
||||
"actionType":"openPage",
|
||||
"pageType":"cart"
|
||||
}
|
||||
},
|
||||
"itemCount":0,
|
||||
"IS_SHARED_CART":true
|
||||
},
|
||||
"webParams":{
|
||||
"mvaServerDomainUrl":"https://mobile-exp-qa3.vzw.com",
|
||||
"lob":"vzp",
|
||||
"isTabBarFlowAllowed":"true"
|
||||
}
|
||||
},
|
||||
"PageMap":{
|
||||
"shop":{
|
||||
"pageType":"shop",
|
||||
"template":"webView",
|
||||
"browserUrl":"https:\/\/vzwqa3.verizonwireless.com\/sales\/next\/shop.html?isShopFlow=true&entrypoint=tabbar&isProspect=true",
|
||||
"cache":true,
|
||||
"tabBarIndex":1,
|
||||
"navigationBar":{
|
||||
"line":{
|
||||
"moleculeName":"line",
|
||||
"type":"none"
|
||||
},
|
||||
"moleculeName":"navigationBar",
|
||||
"additionalLeftButtons":[
|
||||
{
|
||||
"accessibilityText":"Verizon logo, tap anytime to scroll to top of page",
|
||||
"moleculeName":"navigationImageButton",
|
||||
"image":"nav_vz_mark",
|
||||
"imageRenderingMode":"alwaysOriginal",
|
||||
"action":{
|
||||
"analyticsData":{
|
||||
"vzdl.page.linkName":"global black bar nav: vz icon"
|
||||
},
|
||||
"actionType":"scrollToTop"
|
||||
}
|
||||
}
|
||||
],
|
||||
"additionalRightButtons":[
|
||||
{
|
||||
"moleculeName":"navigationLabelButton",
|
||||
"title":"Sign in",
|
||||
"action":{
|
||||
"hideCloseButton":false,
|
||||
"appContext":"mobileFirstSS",
|
||||
"analyticsData":{
|
||||
"vzdl.page.id":"prospectTrailWelcome",
|
||||
"vzdl.target.engagement.intent":"customer sign in",
|
||||
"vzdl.page.displayChannel":"MVA",
|
||||
"vzdl.page.linkName":"I'm a customer",
|
||||
"vzdl.page.name":"prospectTrailWelcome"
|
||||
},
|
||||
"requestURL":"https:\/\/mobile-exp.vzw.com\/mobile\/nsa\/nos\/gw\/launchapp\/oauthSignIn?",
|
||||
"extraParameters":{
|
||||
"oAuthLaunchAppFlow":"Y"
|
||||
},
|
||||
"disableNativeAction":false,
|
||||
"customUserAgent":"MY_VZW_APP;IOS;16.3.1;iPhone15,2;10.5.0;VZW-MFA-IOS",
|
||||
"openInWebview":true,
|
||||
"disableOfflineDevice":false,
|
||||
"hideUrl":false,
|
||||
"actionType":"openPage",
|
||||
"pageType":"userSignIn",
|
||||
"presentationStyle":"root",
|
||||
"isSelected":false,
|
||||
"openOauthWebView":false,
|
||||
"hideWebNavigation":false,
|
||||
"selected":false
|
||||
}
|
||||
}
|
||||
],
|
||||
"style":"dark"
|
||||
}
|
||||
},
|
||||
"cart":{
|
||||
"pageType":"cart",
|
||||
"template":"webView",
|
||||
"browserUrl":"https://www.verizon.com/sales/next/expresscheckout.html?pageName=cart&fromMVA=true&preConfigCart=true&isShopFlow=true&entrypoint=carticon",
|
||||
"tabBarHidden":true,
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"deals":{
|
||||
"pageType":"deals",
|
||||
"template":"webView",
|
||||
"browserUrl":"https://www.verizon.com/deals",
|
||||
"tabBarHidden":true,
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"smartphones":{
|
||||
"pageType":"smartphones",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/smartphones",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"plans":{
|
||||
"pageType":"plans",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/plans",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"coverage":{
|
||||
"pageType":"coverage",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/coverage-map",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"home":{
|
||||
"pageType":"home",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/home",
|
||||
"backgroundColor":"black",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"homeavailability":{
|
||||
"pageType":"homeavailability",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"backgroundColor":"black",
|
||||
"browserUrl":"https://www.verizon.com/home#checkAvailability",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"legal":{
|
||||
"pageType":"legal",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/about/terms-conditions/overview",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"feedback":{
|
||||
"pageType":"feedback",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/about/terms-conditions/overview",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"preowned":{
|
||||
"pageType":"preowned",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/certified-pre-owned",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"tablets":{
|
||||
"pageType":"tablets",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/tablets",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"watches":{
|
||||
"pageType":"watches",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/connected-devices",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"hotspots":{
|
||||
"pageType":"hotspots",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/internet-devices",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"accessories":{
|
||||
"pageType":"accessories",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/products",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
},
|
||||
"tradein":{
|
||||
"pageType":"tradein",
|
||||
"template":"webView",
|
||||
"tabBarHidden":true,
|
||||
"browserUrl":"https://www.verizon.com/trade-in",
|
||||
"navigationBar":{
|
||||
"moleculeName":"navigationBar",
|
||||
"style":"light"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
557
JSONCreator_iOS/JSONCreator/JSON/Samples/MVA3.0/ShopLanding.json
Normal file
557
JSONCreator_iOS/JSONCreator/JSON/Samples/MVA3.0/ShopLanding.json
Normal file
@ -0,0 +1,557 @@
|
||||
{
|
||||
"ResponseInfo": {
|
||||
"locale": "EN",
|
||||
"type": "Success"
|
||||
},
|
||||
"Page": {
|
||||
"pageType": "shopLanding",
|
||||
"template": "list",
|
||||
"presentationStyle": "root",
|
||||
"hab": {
|
||||
"configuration": "single",
|
||||
"inverted": true
|
||||
},
|
||||
"tabBarIndex": 2,
|
||||
"navigationBar": {
|
||||
"style" : "dark",
|
||||
"moleculeName" : "navigationBar",
|
||||
"additionalLeftButtons" : [
|
||||
{
|
||||
"accessibilityText" : "Verizon logo button, tap anytime to scroll to top of page",
|
||||
"moleculeName" : "navigationImageButton",
|
||||
"image" : "nav_vz_mark",
|
||||
"imageRenderingMode" : "alwaysOriginal",
|
||||
"action" : {
|
||||
"actionType" : "scrollToTop"
|
||||
}
|
||||
}
|
||||
],
|
||||
"additionalRightButtons" : [
|
||||
{
|
||||
"accessibilityText" : "Stores",
|
||||
"moleculeName" : "navigationImageButton",
|
||||
"image" : "nav_stores_white",
|
||||
"action" : {
|
||||
"analyticsData" : {
|
||||
"vzdl.page.linkName" : "global tab nav:stores"
|
||||
},
|
||||
"title" : "Stores",
|
||||
"actionType" : "openPage",
|
||||
"pageType" : "rtlStoreJourney"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"header": {
|
||||
"moleculeName" : "header",
|
||||
"backgroundColor": "white",
|
||||
"bottomPadding": 0,
|
||||
"topPadding": 16,
|
||||
"molecule": {
|
||||
"moleculeName" : "carousel",
|
||||
"accessibilityText":"carousel",
|
||||
"pagingMolecule": {
|
||||
"moleculeName":"barsCarouselIndicator",
|
||||
"position": -20
|
||||
},
|
||||
"height" : 265,
|
||||
"spacing": 16,
|
||||
"itemWidthPercent": 70,
|
||||
"molecules" : [{
|
||||
"moleculeName" : "carouselItem",
|
||||
"backgroundColor": "black",
|
||||
"useHorizontalMargins": false,
|
||||
"useVerticalMargins": false,
|
||||
"cornerRadius": 8,
|
||||
"molecule" : {
|
||||
"moleculeName": "image",
|
||||
"image": "https://mobile.vzw.com/hybridClient/is/image/VerizonWireless/vzw-191302-iconic-2022-launch-vbm-shop-tile-live-9-16-22-r2?hei=400&bgc=000000",
|
||||
"imageFormat": "jpg",
|
||||
"allowServerParameters": true
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/smartphones/apple/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName" : "carouselItem",
|
||||
"backgroundColor": "coolGray1",
|
||||
"topPadding": 12,
|
||||
"bottomPadding": 12,
|
||||
"cornerRadius": 8,
|
||||
"molecule" : {
|
||||
"moleculeName" : "stack",
|
||||
"molecules": [{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Your next phone could be on us.",
|
||||
"fontStyle": "RegularTitleLarge"
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName" : "stack",
|
||||
"axis": "horizontal",
|
||||
"molecules": [{
|
||||
"moleculeName": "stackItem",
|
||||
"verticalAlignment": "center",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Includes online exclusive deals. New smartphone line required.",
|
||||
"fontStyle": "RegularMicro"
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"verticalAlignment": "center",
|
||||
"molecule": {
|
||||
"moleculeName": "image",
|
||||
"image": "https://ss71.vzw.com/is/image/VerizonWireless/samsung-galaxy-a03s-black-sm-a037?bgc=f6f6f6&fit=fit,1",
|
||||
"height": 128,
|
||||
"imageFormat": "jpg",
|
||||
"allowServerParameters": true
|
||||
}
|
||||
}]
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"spacing": 0,
|
||||
"molecule": {
|
||||
"moleculeName": "caretLink",
|
||||
"title": "Shop",
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/shop/online/free-cell-phones/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/shop/online/free-cell-phones/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName" : "carouselItem",
|
||||
"backgroundColor": "coolGray1",
|
||||
"topPadding": 12,
|
||||
"bottomPadding": 12,
|
||||
"cornerRadius": 8,
|
||||
"molecule" : {
|
||||
"moleculeName" : "stack",
|
||||
"molecules": [{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Great deals on our best tablets.",
|
||||
"fontStyle": "RegularTitleLarge"
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName" : "stack",
|
||||
"axis": "horizontal",
|
||||
"molecules": [{
|
||||
"moleculeName": "stackItem",
|
||||
"verticalAlignment": "center",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Find incredible savings on all the latest models.",
|
||||
"fontStyle": "RegularMicro"
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"verticalAlignment": "center",
|
||||
"molecule": {
|
||||
"moleculeName": "image",
|
||||
"image": "https://ss72.vzw.com/is/image/VerizonWireless/app-189419-sidxxx-generic-tablet-shop-tile-8-19?bgColor=f6f6f6&fit=fit,1",
|
||||
"height": 128,
|
||||
"imageFormat": "jpg",
|
||||
"allowServerParameters": true
|
||||
}
|
||||
}]
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"spacing": 0,
|
||||
"molecule": {
|
||||
"moleculeName": "caretLink",
|
||||
"title": "Shop",
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/tablets/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/tablets/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName" : "carouselItem",
|
||||
"backgroundColor": "coolGray1",
|
||||
"topPadding": 12,
|
||||
"bottomPadding": 12,
|
||||
"cornerRadius": 8,
|
||||
"molecule" : {
|
||||
"moleculeName" : "stack",
|
||||
"molecules": [{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Stay connected on the go.",
|
||||
"fontStyle": "RegularTitleLarge"
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName" : "stack",
|
||||
"axis": "horizontal",
|
||||
"molecules": [{
|
||||
"moleculeName": "stackItem",
|
||||
"verticalAlignment": "center",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Save on our latest smartwatch.",
|
||||
"fontStyle": "RegularMicro"
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"verticalAlignment": "center",
|
||||
"molecule": {
|
||||
"moleculeName": "image",
|
||||
"image": "https://ss71.vzw.com/is/image/VerizonWireless/app-189420-sidxxx-generic-smartwatch-shop-tile-8-19?bgc=f6f6f6&fit=fit,1",
|
||||
"height": 128,
|
||||
"imageFormat": "jpg",
|
||||
"allowServerParameters": true
|
||||
}
|
||||
}]
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"spacing": 0,
|
||||
"molecule": {
|
||||
"moleculeName": "caretLink",
|
||||
"title": "Shop",
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/connected-smartwatches/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/connected-smartwatches/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName" : "carouselItem",
|
||||
"backgroundColor": "coolGray1",
|
||||
"topPadding": 12,
|
||||
"bottomPadding": 12,
|
||||
"cornerRadius": 8,
|
||||
"molecule" : {
|
||||
"moleculeName" : "stack",
|
||||
"molecules": [{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Bring your device. Get our best deals.",
|
||||
"fontStyle": "RegularTitleLarge"
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName" : "stack",
|
||||
"axis": "horizontal",
|
||||
"molecules": [{
|
||||
"moleculeName": "stackItem",
|
||||
"verticalAlignment": "center",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Activate your favorite device in minutes.",
|
||||
"fontStyle": "RegularMicro"
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"verticalAlignment": "center",
|
||||
"molecule": {
|
||||
"moleculeName": "image",
|
||||
"image": "https://ss71.vzw.com/is/image/VerizonWireless/app-189422-sidxxx-generic-boyd-shop-tile-8-19?bgc=f6f6f6&fit=fit,1",
|
||||
"height": 128,
|
||||
"imageFormat": "jpg",
|
||||
"allowServerParameters": true
|
||||
}
|
||||
}]
|
||||
}
|
||||
},{
|
||||
"moleculeName": "stackItem",
|
||||
"spacing": 0,
|
||||
"molecule": {
|
||||
"moleculeName": "caretLink",
|
||||
"title": "Shop",
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/sales/next/shop.html?intcmp=mva-vzw-tabbar",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/sales/next/shop.html?intcmp=mva-vzw-tabbar",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
}]
|
||||
}
|
||||
},
|
||||
"molecules": [{
|
||||
"moleculeName":"list1CTxtDiv1",
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Mobile"
|
||||
},
|
||||
"line": {
|
||||
"moleculeName": "line",
|
||||
"type": "none"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Deals"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/deals/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Smartphones"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "collection",
|
||||
"browserUrl": "https://www.verizon.com/smartphones/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Certified Pre-Owned"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/sales/next/shop.html?intcmp=mva-vzw-tabbar",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Tablets"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/tablets/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Watches"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "gridwall",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/connected-smartwatches/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Mobile accessories"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "accessories",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/sales/next/shop/accessories.html",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Bring your own devices"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "accessories",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/sales/digital/byod.html",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Trade in a device"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "byod",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/sales/digital/tradein.html#/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "My Offers"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "offers",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://myvpostpay.verizon.com/ui/hub/ao/myoffers?fromMVA=true",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CTxtDiv1",
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Home"
|
||||
},
|
||||
"line": {
|
||||
"moleculeName": "line",
|
||||
"type": "none"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Home Internets"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "offers",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/vfw/auth/fiveGLandingPage?fromApp=true",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Smart home accessories"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "offers",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/products/smart-home/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
},{
|
||||
"moleculeName":"list1CFWBdy",
|
||||
"headlineBody": {
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Home phone"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"actionType": "openURL",
|
||||
"pageType": "offers",
|
||||
"template": "webView",
|
||||
"browserUrl": "https://www.verizon.com/home-office-solutions/",
|
||||
"openInWebview": true,
|
||||
"showNativeNavigation": true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
@ -187,7 +187,7 @@
|
||||
"pageType":"manageSafeWIFI"
|
||||
},
|
||||
"style":"secondary",
|
||||
"size":"tiny",
|
||||
"size":"small",
|
||||
"validationRequired":false
|
||||
}
|
||||
}]
|
||||
@ -241,7 +241,7 @@
|
||||
"pageType":"manageSafeWIFI"
|
||||
},
|
||||
"style":"secondary",
|
||||
"size":"tiny",
|
||||
"size":"small",
|
||||
"validationRequired":false
|
||||
}
|
||||
}]
|
||||
@ -290,7 +290,7 @@
|
||||
"pageType":"manageSafeWIFI"
|
||||
},
|
||||
"style":"secondary",
|
||||
"size":"tiny",
|
||||
"size":"small",
|
||||
"validationRequired":false
|
||||
}
|
||||
}]
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
{
|
||||
"ResponseInfo" : {
|
||||
"code" : "00000",
|
||||
"type" : "Success"
|
||||
},
|
||||
"TopNotification": {
|
||||
"type": "testing",
|
||||
"molecule": {
|
||||
"moleculeName": "notification",
|
||||
"style": "warning",
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "headline"
|
||||
},
|
||||
"body": {
|
||||
"moleculeName": "label",
|
||||
"text": "body"
|
||||
},
|
||||
"button": {
|
||||
"moleculeName": "button",
|
||||
"title": "button",
|
||||
"action": {
|
||||
"actionType": "noop"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Page": {
|
||||
"pageType":"x",
|
||||
"template":"stack",
|
||||
"header": {
|
||||
"moleculeName": "headerH2",
|
||||
"headlineBody": {
|
||||
"moleculeName": "headlineBody",
|
||||
"headline":{
|
||||
"moleculeName": "label",
|
||||
"text": "Top Notification Testing!"
|
||||
}
|
||||
}
|
||||
},
|
||||
"stack": {
|
||||
"moleculeName": "stack",
|
||||
"molecules": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -9,15 +9,42 @@
|
||||
import Foundation
|
||||
import MVMCoreUI
|
||||
|
||||
public protocol MVMCoreActionScrollProtocol: MVMCoreActionDelegateProtocol {
|
||||
|
||||
@MainActor
|
||||
func handleScrollTopAction(action: ActionModelProtocol, additionalData: [AnyHashable: Any]?)
|
||||
}
|
||||
|
||||
public struct ActionScrollToTopModel: ActionModelProtocol {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
public static var identifier: String = "scrollToTop"
|
||||
public var actionType: String = ActionScrollToTopModel.identifier
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
}
|
||||
|
||||
public struct ScrollToTopActionHandler: MVMCoreActionHandlerProtocol {
|
||||
public init(){}
|
||||
public func execute(with model: ActionModelProtocol, delegateObject: DelegateObject?, additionalData: [AnyHashable : Any]?) async throws {
|
||||
guard let model = model as? ActionScrollToTopModel else { return }
|
||||
await (delegateObject?.actionDelegate as? MVMCoreActionScrollProtocol)?.handleScrollTopAction(action: model, additionalData: additionalData)
|
||||
}
|
||||
}
|
||||
|
||||
extension ScrollingViewController: MVMCoreActionScrollProtocol {
|
||||
@MainActor
|
||||
public func handleScrollTopAction(action: ActionModelProtocol, additionalData: [AnyHashable: Any]?) {
|
||||
scrollView.setContentOffset(CGPoint(x: 0, y: -scrollView.adjustedContentInset.top), animated: true)
|
||||
}
|
||||
}
|
||||
public class JSONCreatorActionHandler: MVMCoreUIActionHandler {
|
||||
|
||||
public static func doStuff() {
|
||||
MVMCoreObject.sharedInstance()?.actionHandler = JSONCreatorActionHandler()
|
||||
ModelRegistry.register(handler: ButtonWithImage.self, for: ButtonWithImageModel.self)
|
||||
ModelRegistry.register(handler: OrderTracker.self, for: OrderTrackerModel.self)
|
||||
ModelRegistry.register(handler: ListDeviceRightVariableCaret.self, for: ListDeviceRightVariableCaretModel.self)
|
||||
ModelRegistry.register(handler: Links.self, for: LinksModel.self)
|
||||
try? ModelRegistry.throwable_register(handler: neView.self, model: neViewModl.self)
|
||||
ModelRegistry.register(handler: ScrollToTopActionHandler.self, for: ActionScrollToTopModel.self)
|
||||
if let bundle = MVMCoreUIUtility.bundleForMVMCoreUI() {
|
||||
MVMCoreCache.shared()?.registerBundle(forImages: bundle)
|
||||
}
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
//
|
||||
// LinkCollectionViewCell.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Lekshmi S on 15/12/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
import MVMCoreUI
|
||||
|
||||
open class LinkCollectionViewCell: CollectionViewCell {
|
||||
public let link = Link()
|
||||
|
||||
open override func setupView() {
|
||||
super.setupView()
|
||||
isAccessibilityElement = true
|
||||
addMolecule(link)
|
||||
MVMCoreUIUtility.setMarginsFor(contentView, leading: 0, top: 0, trailing: 0, bottom: 0)
|
||||
}
|
||||
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
guard let model = model as? LinkModel else { return }
|
||||
link.set(with: model, delegateObject, additionalData)
|
||||
updateAccessibility()
|
||||
}
|
||||
|
||||
open func updateAccessibility() {
|
||||
accessibilityLabel = link.accessibilityLabel
|
||||
accessibilityHint = link.accessibilityHint
|
||||
accessibilityTraits = link.accessibilityTraits
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,108 +0,0 @@
|
||||
//
|
||||
// Links.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Lekshmi S on 15/12/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
import MVMCoreUI
|
||||
|
||||
open class Links: View, UICollectionViewDelegate {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
public var collectionView: SelfSizingCollectionView!
|
||||
public var links: [LinkModel]?
|
||||
private var size: CGFloat?
|
||||
private var delegateObject: MVMCoreUIDelegateObject?
|
||||
private let itemSpacing: CGFloat = 24.0
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Lifecycle
|
||||
//--------------------------------------------------
|
||||
|
||||
override open var intrinsicContentSize: CGSize {
|
||||
return collectionView.intrinsicContentSize
|
||||
}
|
||||
|
||||
open override func setupView() {
|
||||
super.setupView()
|
||||
collectionView = createCollectionView()
|
||||
addSubview(collectionView)
|
||||
isAccessibilityElement = false
|
||||
NSLayoutConstraint.activate(Array(NSLayoutConstraint.pinView(toSuperview: collectionView, useMargins: false).values))
|
||||
}
|
||||
|
||||
@objc override open func updateView(_ size: CGFloat) {
|
||||
super.updateView(size)
|
||||
self.size = size
|
||||
collectionView.updateView(size)
|
||||
}
|
||||
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
self.delegateObject = delegateObject
|
||||
|
||||
guard let linksModel = model as? LinksModel else { return }
|
||||
links = linksModel.links
|
||||
collectionView.reloadData()
|
||||
}
|
||||
|
||||
open override func systemLayoutSizeFitting(_ targetSize: CGSize, withHorizontalFittingPriority horizontalFittingPriority: UILayoutPriority, verticalFittingPriority: UILayoutPriority) -> CGSize {
|
||||
frame = CGRect(x: 0, y: 0, width: targetSize.width, height: CGFloat(MAXFLOAT))
|
||||
layoutIfNeeded()
|
||||
print("sssC \(targetSize.width) \(collectionView.contentSize)")
|
||||
return collectionView.contentSize
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// MARK: - Methods
|
||||
//------------------------------------------------------
|
||||
/// Creates the collection view.
|
||||
open func createCollectionView() -> SelfSizingCollectionView {
|
||||
let collection = SelfSizingCollectionView(frame: .zero, collectionViewLayout: createCollectionViewLayout())
|
||||
collection.dataSource = self
|
||||
collection.delegate = self
|
||||
collection.register(LinkCollectionViewCell.self, forCellWithReuseIdentifier: "LinkCollectionViewCell")
|
||||
return collection
|
||||
}
|
||||
|
||||
/// Creates the layout for the collection.
|
||||
func createCollectionViewLayout() -> UICollectionViewLeftAlignedLayout {
|
||||
let layout = UICollectionViewLeftAlignedLayout()
|
||||
layout.scrollDirection = .vertical
|
||||
layout.minimumLineSpacing = itemSpacing
|
||||
layout.minimumInteritemSpacing = itemSpacing
|
||||
layout.estimatedItemSize = CGSize(width: 20, height: 30)
|
||||
return layout
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// MARK: - Delegate methods
|
||||
//------------------------------------------------------
|
||||
|
||||
extension Links: UICollectionViewDataSource {
|
||||
open func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return links?.count ?? 0
|
||||
}
|
||||
|
||||
open func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
guard let molecule = links?[indexPath.item], let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "LinkCollectionViewCell", for: indexPath) as? LinkCollectionViewCell else {
|
||||
fatalError()
|
||||
}
|
||||
cell.reset()
|
||||
cell.set(with: molecule, delegateObject, nil)
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
//extension Links: MoleculeTableViewCellMoleculeProtocol {
|
||||
// public func getSystemFittingTargetSize(for targetSize: CGSize, withHorizontalFittingPriority horizontalFittingPriority: UILayoutPriority, verticalFittingPriority: UILayoutPriority, cell: MoleculeTableViewCell) -> CGSize {
|
||||
// print("sss \(targetSize.width)")
|
||||
// cell.frame = CGRect(x: 0, y: 0, width: targetSize.width, height: CGFloat(MAXFLOAT))
|
||||
// cell.layoutIfNeeded()
|
||||
//
|
||||
// return CGSize(width: collectionView.contentSize.width + cell.contentView.directionalLayoutMargins.leading + cell.contentView.directionalLayoutMargins.trailing, height: collectionView.contentSize.height + cell.contentView.directionalLayoutMargins.top + cell.contentView.directionalLayoutMargins.bottom)
|
||||
// }
|
||||
//}
|
||||
@ -1,34 +0,0 @@
|
||||
//
|
||||
// LinksModel.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Lekshmi S on 15/12/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import MVMCoreUI
|
||||
|
||||
@objcMembers public class LinksModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "links"
|
||||
public var backgroundColor: Color?
|
||||
public var links: [LinkModel]
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case backgroundColor
|
||||
case links
|
||||
}
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
links = try typeContainer.decode([LinkModel].self, forKey: .links)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encode(links, forKey: .links)
|
||||
}
|
||||
}
|
||||
@ -1,129 +0,0 @@
|
||||
//
|
||||
// ListDeviceRightVariableCaret.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Lekshmi S on 09/12/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
import MVMCoreUI
|
||||
|
||||
@objcMembers open class ListDeviceRightVariableCaret: TableViewCell {
|
||||
//-----------------------------------------------------
|
||||
// MARK: - Outlets
|
||||
//-----------------------------------------------------
|
||||
public let eyebrow = Label(fontStyle: .RegularMicro)
|
||||
public let headline = Label(fontStyle: .BoldBodySmall)
|
||||
public let body1 = Label(fontStyle: .RegularBodySmall)
|
||||
public let body2 = Label(fontStyle: .RegularBodySmall)
|
||||
public let body3 = Label(fontStyle: .RegularBodySmall)
|
||||
public let rightLabel = Label(fontStyle: .RegularBodySmall)
|
||||
public let rightImage = LoadImageView()
|
||||
public weak var rightVerticalStackTopConstraint: NSLayoutConstraint?
|
||||
|
||||
public lazy var leftVerticalStack: Stack<StackModel> = {
|
||||
return Stack<StackModel>.createStack(with: [eyebrow, headline, body1, body2, body3], axis: .vertical, spacing: 2)
|
||||
}()
|
||||
|
||||
public lazy var rightVerticalStack: Stack<StackModel> = {
|
||||
return Stack<StackModel>.createStack(with: [(view: rightLabel, model: StackItemModel(horizontalAlignment: .trailing)),
|
||||
(view: rightImage, model: StackItemModel(horizontalAlignment: .trailing))],
|
||||
axis: .vertical)
|
||||
}()
|
||||
|
||||
public lazy var stack: Stack<StackModel> = {
|
||||
return Stack<StackModel>.createStack(with: [(view: leftVerticalStack, model: StackItemModel(verticalAlignment: .top)),
|
||||
(view: rightVerticalStack, model: StackItemModel(verticalAlignment: .top))],
|
||||
axis: .horizontal)
|
||||
}()
|
||||
|
||||
//-----------------------------------------------------
|
||||
// MARK: - Lifecycle
|
||||
//-----------------------------------------------------
|
||||
|
||||
open override func setupView() {
|
||||
super.setupView()
|
||||
addMolecule(stack)
|
||||
rightImage.imageView.contentMode = .scaleAspectFit
|
||||
rightLabel.setContentCompressionResistancePriority(UILayoutPriority(rawValue: 900), for: .horizontal)
|
||||
rightLabel.setContentHuggingPriority(UILayoutPriority(rawValue: 900), for: .horizontal)
|
||||
rightLabel.numberOfLines = 1
|
||||
leftVerticalStack.restack()
|
||||
rightVerticalStack.restack()
|
||||
stack.restack()
|
||||
}
|
||||
|
||||
func alignRightStack(toHeadline: Bool) {
|
||||
if toHeadline {
|
||||
rightVerticalStack.containerHelper.topConstraint?.isActive = false
|
||||
if rightVerticalStackTopConstraint == nil {
|
||||
rightVerticalStackTopConstraint = headline.topAnchor.constraint(equalTo: rightVerticalStack.contentView.topAnchor)
|
||||
}
|
||||
rightVerticalStackTopConstraint?.isActive = true
|
||||
} else {
|
||||
rightVerticalStack.containerHelper.topConstraint?.isActive = true
|
||||
rightVerticalStackTopConstraint?.isActive = false
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// MARK: - Molecule
|
||||
//------------------------------------------------------
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
|
||||
guard let model = model as? ListDeviceRightVariableCaretModel else { return }
|
||||
leftVerticalStack.updateContainedMolecules(with: [model.eyebrow, model.headline, model.body1, model.body2, model.body3], delegateObject, additionalData)
|
||||
rightVerticalStack.updateContainedMolecules(with: [model.rightLabel, model.image], delegateObject, additionalData)
|
||||
alignRightStack(toHeadline: model.headline != nil)
|
||||
updateAccessibilityLabel()
|
||||
}
|
||||
|
||||
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return 230
|
||||
}
|
||||
|
||||
open override func reset() {
|
||||
super.reset()
|
||||
eyebrow.setFontStyle(.RegularMicro)
|
||||
headline.setFontStyle(.BoldBodySmall)
|
||||
body1.setFontStyle(.RegularBodySmall)
|
||||
body2.setFontStyle(.RegularBodySmall)
|
||||
body3.setFontStyle(.RegularBodySmall)
|
||||
rightLabel.setFontStyle(.RegularBodySmall)
|
||||
eyebrow.textColor = .mvmCoolGray6
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
// MARK: - Accessibility
|
||||
//----------------------------------------------------
|
||||
|
||||
func updateAccessibilityLabel() {
|
||||
isAccessibilityElement = true
|
||||
var message = ""
|
||||
|
||||
if let eyebrowText = eyebrow.text, !eyebrowText.isEmpty {
|
||||
message += eyebrowText + ", "
|
||||
}
|
||||
if let headlineText = headline.text, !headlineText.isEmpty {
|
||||
message += headlineText + ", "
|
||||
}
|
||||
if let body1Text = body1.text, !body1Text.isEmpty {
|
||||
message += body1Text + ", "
|
||||
}
|
||||
if let body2Text = body2.text, !body2Text.isEmpty {
|
||||
message += body2Text + ", "
|
||||
}
|
||||
if let body3Text = body3.text, !body3Text.isEmpty {
|
||||
message += body3Text + ", "
|
||||
}
|
||||
if let rightLabelText = rightLabel.text, !rightLabelText.isEmpty {
|
||||
message += rightLabelText + ", "
|
||||
}
|
||||
if let rightImageViewText = rightImage.imageView.accessibilityLabel, !rightImageViewText.isEmpty {
|
||||
message += rightImageViewText
|
||||
}
|
||||
|
||||
accessibilityLabel = message
|
||||
accessibilityTraits = (accessoryView != nil) ? .button : .none
|
||||
}
|
||||
}
|
||||
@ -1,107 +0,0 @@
|
||||
//
|
||||
// ListDeviceRightVariableCaretModel.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Lekshmi S on 09/12/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
import MVMCoreUI
|
||||
|
||||
public class ListDeviceRightVariableCaretModel: ListItemModel, MoleculeModelProtocol {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
public static var identifier: String = "listDvcRvCaret"
|
||||
public var eyebrow: LabelModel?
|
||||
public var headline: LabelModel?
|
||||
public var body1: LabelModel?
|
||||
public var body2: LabelModel?
|
||||
public var body3: LabelModel?
|
||||
public var image: ImageViewModel
|
||||
public var rightLabel: LabelModel
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Initializer
|
||||
//--------------------------------------------------
|
||||
|
||||
public init(eyebrow: LabelModel? = nil, headline: LabelModel? = nil, body1: LabelModel? = nil, body2: LabelModel? = nil, body3: LabelModel? = nil, image: ImageViewModel, rightLabel: LabelModel) {
|
||||
self.eyebrow = eyebrow
|
||||
self.headline = headline
|
||||
self.body1 = body1
|
||||
self.body2 = body2
|
||||
self.body3 = body3
|
||||
self.image = image
|
||||
self.rightLabel = rightLabel
|
||||
super.init()
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Method
|
||||
//--------------------------------------------------
|
||||
|
||||
override public func setDefaults() {
|
||||
super.setDefaults()
|
||||
rightLabel.hero = 0
|
||||
if image.width == nil, image.height == nil {
|
||||
image.width = 36
|
||||
image.height = 72
|
||||
}
|
||||
}
|
||||
|
||||
/// The left stack requires content.
|
||||
func validateContent() throws {
|
||||
if eyebrow == nil,
|
||||
headline == nil,
|
||||
body1 == nil,
|
||||
body2 == nil,
|
||||
body3 == nil {
|
||||
throw ModelRegistry.Error.decoderOther(message: "\(self) requires one left label")
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Keys
|
||||
//--------------------------------------------------
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case eyebrow
|
||||
case headline
|
||||
case body1
|
||||
case body2
|
||||
case body3
|
||||
case image
|
||||
case rightLabel
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Keys
|
||||
//--------------------------------------------------
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
eyebrow = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .eyebrow)
|
||||
headline = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .headline)
|
||||
body1 = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .body1)
|
||||
body2 = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .body2)
|
||||
body3 = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .body3)
|
||||
image = try typeContainer.decode(ImageViewModel.self, forKey: .image)
|
||||
rightLabel = try typeContainer.decode(LabelModel.self, forKey: .rightLabel)
|
||||
try super.init(from: decoder)
|
||||
try validateContent()
|
||||
}
|
||||
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
try super.encode(to: encoder)
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encodeIfPresent(eyebrow, forKey: .eyebrow)
|
||||
try container.encodeIfPresent(headline, forKey: .headline)
|
||||
try container.encodeIfPresent(body1, forKey: .body1)
|
||||
try container.encodeIfPresent(body2, forKey: .body2)
|
||||
try container.encodeIfPresent(body3, forKey: .body3)
|
||||
try container.encode(image, forKey: .image)
|
||||
try container.encode(rightLabel, forKey: .rightLabel)
|
||||
}
|
||||
}
|
||||
@ -1,138 +0,0 @@
|
||||
//
|
||||
// OrderTracker.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Kevin Christiano on 7/1/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import MVMCoreUI
|
||||
|
||||
open class OrderTracker: View {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
var steps = [Step]()
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Life Cycle
|
||||
//--------------------------------------------------
|
||||
|
||||
open override func setupView() {
|
||||
super.setupView()
|
||||
isOpaque = false
|
||||
}
|
||||
|
||||
open override func reset() {
|
||||
super.reset()
|
||||
|
||||
resetSteps()
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Methods
|
||||
//--------------------------------------------------
|
||||
|
||||
func constrain(stepModels: [StepModel]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||
|
||||
resetSteps()
|
||||
|
||||
guard let stepModels = stepModels else { return }
|
||||
|
||||
var anchor = topAnchor
|
||||
|
||||
for stepModel in stepModels {
|
||||
|
||||
let step = Step()
|
||||
step.set(with: stepModel, delegateObject, additionalData)
|
||||
addSubview(step)
|
||||
steps.append(step)
|
||||
|
||||
step.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
|
||||
trailingAnchor.constraint(equalTo: step.trailingAnchor).isActive = true
|
||||
step.topAnchor.constraint(equalTo: anchor).isActive = true
|
||||
|
||||
anchor = step.bottomAnchor
|
||||
}
|
||||
|
||||
bottomAnchor.constraint(equalTo: anchor).isActive = true
|
||||
(subviews.last as? Step)?.heightConstraint?.isActive = false
|
||||
}
|
||||
|
||||
func resetSteps() {
|
||||
|
||||
steps.forEach {
|
||||
$0.reset()
|
||||
$0.removeFromSuperview()
|
||||
}
|
||||
|
||||
steps = []
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Draw
|
||||
//--------------------------------------------------
|
||||
|
||||
open override func draw(_ rect: CGRect) {
|
||||
|
||||
guard let context = UIGraphicsGetCurrentContext(),
|
||||
let firstStep = steps.first
|
||||
else { return }
|
||||
|
||||
context.setLineWidth(1)
|
||||
let imageDimension = firstStep.stateImage.bounds.height
|
||||
let halfDimension = imageDimension / 2
|
||||
let startPoint = CGPoint(x: halfDimension, y: halfDimension)
|
||||
let defaultGrey: UIColor = .mvmCoolGray3
|
||||
context.move(to: startPoint)
|
||||
|
||||
var lineColor = (firstStep.state?.color() ?? defaultGrey).cgColor
|
||||
|
||||
for (i, step) in steps.dropFirst().enumerated() {
|
||||
|
||||
if let state = step.state, state == .incomplete {
|
||||
lineColor = defaultGrey.cgColor
|
||||
}
|
||||
|
||||
// Allows server to override the line color for a custom color.
|
||||
if let customLineColor = step.stepModel?.lineColor?.cgColor {
|
||||
lineColor = customLineColor
|
||||
}
|
||||
|
||||
context.setStrokeColor(lineColor)
|
||||
let relativeRect = convert(step.stateImage.frame, from: step.stateImage)
|
||||
let point = CGPoint(x: halfDimension, y: relativeRect.midY)
|
||||
|
||||
context.addLine(to: point)
|
||||
context.strokePath()
|
||||
|
||||
// Break out of loop since we're on the last step.
|
||||
if i == steps.count - 2 {
|
||||
break
|
||||
}
|
||||
|
||||
lineColor = (step.state?.color() ?? defaultGrey).cgColor
|
||||
context.move(to: point)
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// MARK: - MoleculeViewProtocol
|
||||
//------------------------------------------------------
|
||||
|
||||
public override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return 196
|
||||
}
|
||||
|
||||
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
|
||||
guard let model = model as? OrderTrackerModel else { return }
|
||||
|
||||
constrain(stepModels: model.steps, delegateObject: delegateObject, additionalData: additionalData)
|
||||
setNeedsLayout()
|
||||
setNeedsDisplay()
|
||||
}
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
//
|
||||
// OrderTrackerModel.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Kevin Christiano on 7/1/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import MVMCoreUI
|
||||
|
||||
open class OrderTrackerModel: MoleculeModelProtocol {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
public var backgroundColor: Color?
|
||||
|
||||
public static var identifier: String = "orderTracker"
|
||||
public var steps: [StepModel]
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Keys
|
||||
//--------------------------------------------------
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case backgroundColor
|
||||
case steps
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Codec
|
||||
//--------------------------------------------------
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
steps = try typeContainer.decode([StepModel].self, forKey: .steps)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encode(steps, forKey: .steps)
|
||||
}
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
//
|
||||
// SelfSizingCollectionView.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Dhamodaram Nandi on 24/12/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
import MVMCoreUI
|
||||
|
||||
public class SelfSizingCollectionView: CollectionView {
|
||||
|
||||
override open var intrinsicContentSize: CGSize {
|
||||
return contentSize
|
||||
}
|
||||
|
||||
override open var contentSize: CGSize {
|
||||
didSet {
|
||||
guard bounds.size.height != contentSize.height else { return }
|
||||
frame.size.height = contentSize.height
|
||||
invalidateIntrinsicContentSize()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,120 +0,0 @@
|
||||
//
|
||||
// Step.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Kevin Christiano on 7/6/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import MVMCoreUI
|
||||
|
||||
open class Step: View {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
public var headline = Label(fontStyle: .BoldMicro)
|
||||
public var bodyTop = Label(fontStyle: .RegularMicro)
|
||||
public var bodyBottom = Label(fontStyle: .RegularMicro)
|
||||
public var stateImage = ImageView()
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Constraints
|
||||
//--------------------------------------------------
|
||||
|
||||
public var heightConstraint: NSLayoutConstraint?
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Computed Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
public var stepModel: StepModel? {
|
||||
return model as? StepModel
|
||||
}
|
||||
|
||||
public var state: StepModel.State? {
|
||||
return stepModel?.state
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Life Cycle
|
||||
//--------------------------------------------------
|
||||
|
||||
open override func setupView() {
|
||||
super.setupView()
|
||||
|
||||
addSubview(stateImage)
|
||||
addSubview(headline)
|
||||
addSubview(bodyTop)
|
||||
addSubview(bodyBottom)
|
||||
|
||||
stateImage.contentMode = .scaleAspectFit
|
||||
stateImage.layer.backgroundColor = UIColor.white.cgColor
|
||||
stateImage.topAnchor.constraint(equalTo: topAnchor).isActive = true
|
||||
stateImage.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
|
||||
stateImage.heightAnchor.constraint(equalToConstant: 18).isActive = true
|
||||
stateImage.widthAnchor.constraint(equalToConstant: 18).isActive = true
|
||||
|
||||
headline.topAnchor.constraint(equalTo: topAnchor, constant: 2).isActive = true
|
||||
headline.leadingAnchor.constraint(equalTo: stateImage.trailingAnchor, constant: Padding.Four).isActive = true
|
||||
trailingAnchor.constraint(equalTo: headline.trailingAnchor).isActive = true
|
||||
|
||||
bodyTop.topAnchor.constraint(equalTo: headline.bottomAnchor).isActive = true
|
||||
bodyTop.leadingAnchor.constraint(equalTo: stateImage.trailingAnchor, constant: Padding.Four).isActive = true
|
||||
trailingAnchor.constraint(equalTo: bodyTop.trailingAnchor).isActive = true
|
||||
|
||||
bodyBottom.topAnchor.constraint(equalTo: bodyTop.bottomAnchor).isActive = true
|
||||
bodyBottom.leadingAnchor.constraint(equalTo: stateImage.trailingAnchor, constant: Padding.Four).isActive = true
|
||||
trailingAnchor.constraint(equalTo: bodyBottom.trailingAnchor).isActive = true
|
||||
let bodyBottomConstraint = bottomAnchor.constraint(greaterThanOrEqualTo: bodyBottom.bottomAnchor)
|
||||
bodyBottomConstraint.priority = .defaultHigh
|
||||
bodyBottomConstraint.isActive = true
|
||||
|
||||
heightConstraint = heightAnchor.constraint(equalToConstant: 58)
|
||||
heightConstraint?.priority = .defaultLow
|
||||
heightConstraint?.isActive = true
|
||||
}
|
||||
|
||||
public override func reset() {
|
||||
super.reset()
|
||||
|
||||
headline.reset()
|
||||
bodyTop.reset()
|
||||
bodyBottom.reset()
|
||||
stateImage.reset()
|
||||
heightConstraint?.isActive = true
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// MARK: - MoleculeViewProtocol
|
||||
//------------------------------------------------------
|
||||
|
||||
public override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return 64
|
||||
}
|
||||
|
||||
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
|
||||
guard let model = model as? StepModel else { return }
|
||||
|
||||
headline.set(with: model.headline, delegateObject, additionalData)
|
||||
|
||||
if let bodyTopModel = model.bodyTop {
|
||||
bodyTop.set(with: bodyTopModel, delegateObject, additionalData)
|
||||
}
|
||||
|
||||
if let bodyBottomModel = model.bodyBottom {
|
||||
bodyBottom.set(with: bodyBottomModel, delegateObject, additionalData)
|
||||
}
|
||||
|
||||
stateImage.image = model.state?.image()
|
||||
|
||||
if let iconColor = model.iconColor?.uiColor {
|
||||
stateImage.tintColor = iconColor
|
||||
} else {
|
||||
stateImage.tintColor = model.state?.color()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,109 +0,0 @@
|
||||
//
|
||||
// StepModel.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Kevin Christiano on 7/6/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import MVMCoreUI
|
||||
|
||||
open class StepModel: MoleculeModelProtocol {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
public var backgroundColor: Color?
|
||||
|
||||
public static var identifier: String = "step"
|
||||
public var state: State?
|
||||
public var headline: LabelModel
|
||||
public var bodyTop: LabelModel?
|
||||
public var bodyBottom: LabelModel?
|
||||
public var iconColor: Color?
|
||||
public var lineColor: Color?
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Enum
|
||||
//--------------------------------------------------
|
||||
|
||||
public enum State: String, Codable {
|
||||
case complete
|
||||
case incomplete
|
||||
case invalid
|
||||
case cancel
|
||||
|
||||
func image() -> UIImage? {
|
||||
|
||||
switch self {
|
||||
case .complete:
|
||||
return UIImage(named: "icon_tracker_complete")?.withRenderingMode(.alwaysTemplate)
|
||||
|
||||
case .incomplete:
|
||||
return UIImage(named: "icon_tracker_incomplete")?.withRenderingMode(.alwaysTemplate)
|
||||
|
||||
case .invalid:
|
||||
return UIImage(named:"icon_tracker_invalid")?.withRenderingMode(.alwaysTemplate)
|
||||
|
||||
case .cancel:
|
||||
return UIImage(named:"mf_orange_failed_checkmark")?.withRenderingMode(.alwaysTemplate)
|
||||
}
|
||||
}
|
||||
|
||||
func color() -> UIColor {
|
||||
|
||||
switch self {
|
||||
case .complete:
|
||||
return .mvmGreen
|
||||
|
||||
case .incomplete, .invalid:
|
||||
return .mvmCoolGray3
|
||||
|
||||
case .cancel:
|
||||
return .mvmOrangeAA
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Keys
|
||||
//--------------------------------------------------
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case backgroundColor
|
||||
case state
|
||||
case headline
|
||||
case bodyTop
|
||||
case bodyBottom
|
||||
case iconColor
|
||||
case lineColor
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Codec
|
||||
//--------------------------------------------------
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
state = try typeContainer.decodeIfPresent(State.self, forKey: .state)
|
||||
headline = try typeContainer.decode(LabelModel.self, forKey: .headline)
|
||||
bodyTop = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .bodyTop)
|
||||
bodyBottom = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .bodyBottom)
|
||||
iconColor = try typeContainer.decodeIfPresent(Color.self, forKey: .iconColor)
|
||||
lineColor = try typeContainer.decodeIfPresent(Color.self, forKey: .lineColor)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encode(headline, forKey: .headline)
|
||||
try container.encodeIfPresent(bodyTop, forKey: .bodyTop)
|
||||
try container.encodeIfPresent(bodyBottom, forKey: .bodyBottom)
|
||||
try container.encodeIfPresent(iconColor, forKey: .iconColor)
|
||||
try container.encodeIfPresent(lineColor, forKey: .lineColor)
|
||||
}
|
||||
}
|
||||
@ -1,339 +0,0 @@
|
||||
//
|
||||
// ButtonWithImage.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Bandaru, Krishna Kishore on 23/02/21.
|
||||
// Copyright © 2021 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import MVMCoreUI
|
||||
|
||||
public class ButtonWithImage: PillButton {
|
||||
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
|
||||
guard let model = model as? ButtonWithImageModel, var buttonImage = MVMCoreCache.shared()?.getImageFromRegisteredBundles(model.image) else {
|
||||
return
|
||||
}
|
||||
|
||||
if let tintColor = model.tintColor {
|
||||
buttonImage = buttonImage.withRenderingMode(.alwaysTemplate)
|
||||
self.tintColor = tintColor.uiColor
|
||||
}
|
||||
|
||||
setImage(buttonImage, for: .normal)
|
||||
semanticContentAttribute = model.imagePosition == .left ? .forceLeftToRight : .forceRightToLeft
|
||||
updateContentInsets(with: Padding.OneHalf)
|
||||
}
|
||||
|
||||
//Adding space between image and text & content to be centered in container
|
||||
public func updateContentInsets(with insetAmount: CGFloat) {
|
||||
|
||||
guard let imagePosition = (model as? ButtonWithImageModel)?.imagePosition else { return }
|
||||
|
||||
imageEdgeInsets = UIEdgeInsets(top: 0, left: imagePosition == .left ? -insetAmount: insetAmount, bottom: 0, right: imagePosition == .left ? insetAmount : -insetAmount)
|
||||
titleEdgeInsets = UIEdgeInsets(top: 0, left: imagePosition == .left ? insetAmount : -insetAmount, bottom: 0, right: imagePosition == .left ? -insetAmount : insetAmount)
|
||||
contentEdgeInsets = UIEdgeInsets(top: 0, left: insetAmount, bottom: 0, right: insetAmount)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// ButtonWithImageModel.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Bandaru, Krishna Kishore on 23/02/21.
|
||||
// Copyright © 2021 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
public class ButtonWithImageModel: ButtonModel {
|
||||
|
||||
public enum ImagePosition: String, Codable {
|
||||
case left, right
|
||||
}
|
||||
|
||||
public override class var identifier: String {
|
||||
"buttonWithImage"
|
||||
}
|
||||
|
||||
let image: String
|
||||
var imagePosition: ImagePosition
|
||||
var tintColor: Color?
|
||||
|
||||
public init(with title: String, image: String, imagePosition: ImagePosition = .left, action: ActionModelProtocol) {
|
||||
self.image = image
|
||||
self.imagePosition = imagePosition
|
||||
super.init(with: title, action: action)
|
||||
}
|
||||
|
||||
public init(secondaryButtonWith title: String, image: String, imagePosition: ImagePosition = .left, action: ActionModelProtocol) {
|
||||
self.image = image
|
||||
self.imagePosition = imagePosition
|
||||
super.init(secondaryButtonWith: title, action: action)
|
||||
}
|
||||
|
||||
public init(primaryButtonWith title: String, image: String, imagePosition: ImagePosition = .left, action: ActionModelProtocol) {
|
||||
self.image = image
|
||||
self.imagePosition = imagePosition
|
||||
super.init(primaryButtonWith: title, action: action)
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case image
|
||||
case imagePosition
|
||||
case tintColor
|
||||
}
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
image = try container.decode(String.self, forKey: .image)
|
||||
imagePosition = try container.decodeIfPresent(ImagePosition.self, forKey: .imagePosition) ?? .left
|
||||
tintColor = try container.decodeIfPresent(Color.self, forKey: .tintColor)
|
||||
try super.init(from: decoder)
|
||||
}
|
||||
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(image, forKey: .image)
|
||||
try container.encode(imagePosition, forKey: .imagePosition)
|
||||
try container.encodeIfPresent(tintColor, forKey: .tintColor)
|
||||
try super.encode(to: encoder)
|
||||
}
|
||||
}
|
||||
|
||||
public class neViewModl: ListItemModel, MoleculeModelProtocol {
|
||||
public static var identifier: String = "fios"
|
||||
}
|
||||
|
||||
public class neView: TableViewCell {
|
||||
public let voicemailReadView: View = {
|
||||
let view = View()
|
||||
view.backgroundColor = .mvmRed
|
||||
view.heightAnchor.constraint(equalToConstant: 10).isActive = true
|
||||
view.widthAnchor.constraint(equalToConstant: 10).isActive = true
|
||||
view.layer.cornerRadius = 5
|
||||
return view
|
||||
}()
|
||||
|
||||
public let mdn: Label = {
|
||||
let label = Label(fontStyle: .RegularBodySmall)
|
||||
label.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||
return label
|
||||
}()
|
||||
|
||||
public let contact: Label = {
|
||||
let label = Label(fontStyle: .BoldBodySmall)
|
||||
// label.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||
// label.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||
// label.setContentHuggingPriority(.required, for: .horizontal)
|
||||
return label
|
||||
}()
|
||||
|
||||
public let shortDate: Label = {
|
||||
let label = Label(fontStyle: .RegularBodySmall)
|
||||
label.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||
label.textAlignment = .right
|
||||
return label
|
||||
}()
|
||||
|
||||
public let fullDate: Label = {
|
||||
let label = Label(fontStyle: .RegularBodySmall)
|
||||
label.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||
return label
|
||||
}()
|
||||
|
||||
public let duration: Label = {
|
||||
let label = Label(fontStyle: .RegularBodySmall)
|
||||
label.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||
label.textAlignment = .right
|
||||
return label
|
||||
}()
|
||||
|
||||
public let callDetailsButton: ImageView = {
|
||||
let button = ImageView()
|
||||
button.heightAnchor.constraint(equalToConstant: 20).isActive = true
|
||||
button.widthAnchor.constraint(equalToConstant: 20).isActive = true
|
||||
button.contentMode = .scaleAspectFit
|
||||
button.backgroundColor = .blue
|
||||
return button
|
||||
}()
|
||||
|
||||
public let callBackButton: PillButton = {
|
||||
let button = PillButton()
|
||||
return button
|
||||
}()
|
||||
|
||||
public let sendTextButton: PillButton = {
|
||||
let button = PillButton()
|
||||
return button
|
||||
}()
|
||||
//
|
||||
// public lazy var leftLabelStack: UIStackView = {
|
||||
// let stack = UIStackView(arrangedSubviews: [contact, mdn])
|
||||
// stack.translatesAutoresizingMaskIntoConstraints = false
|
||||
// stack.axis = .vertical
|
||||
// stack.alignment = .leading
|
||||
// stack.distribution = .fill
|
||||
// return stack
|
||||
// }()
|
||||
|
||||
// public lazy var row1Stack: UIStackView = {
|
||||
// let stack = UIStackView(arrangedSubviews: [voicemailReadView, contact, shortDate, callDetailsButton])
|
||||
// stack.translatesAutoresizingMaskIntoConstraints = false
|
||||
// stack.axis = .horizontal
|
||||
// stack.alignment = .center
|
||||
// stack.distribution = .fill
|
||||
// return stack
|
||||
// }()
|
||||
|
||||
public lazy var row1Stack: Stack<StackModel> = {
|
||||
Stack<StackModel>.createStack(with: [(view: voicemailReadView, model: StackItemModel()),
|
||||
(view: contact, model: StackItemModel(horizontalAlignment: .leading)),
|
||||
(view: shortDate, model: StackItemModel()),
|
||||
(view: callDetailsButton, model: StackItemModel())],
|
||||
axis: .horizontal, spacing: PaddingOne)
|
||||
}()
|
||||
|
||||
// public lazy var row2Stack: UIStackView = {
|
||||
// let stack = UIStackView(arrangedSubviews: [mdn, duration])
|
||||
// stack.translatesAutoresizingMaskIntoConstraints = false
|
||||
// stack.axis = .horizontal
|
||||
// stack.alignment = .center
|
||||
// stack.distribution = .fill
|
||||
// return stack
|
||||
// }()
|
||||
public lazy var row2Stack: Stack<StackModel> = {
|
||||
Stack<StackModel>.createStack(with: [(view: mdn, model: StackItemModel(horizontalAlignment: .leading)),
|
||||
(view: duration, model: StackItemModel())],
|
||||
axis: .horizontal)
|
||||
}()
|
||||
|
||||
// public lazy var leftTopStack: Stack<StackModel> = {
|
||||
// Stack<StackModel>.createStack(with: [(view: voicemailReadView, model: StackItemModel()),
|
||||
// (view: contact, model: StackItemModel())],
|
||||
// axis: .horizontal)
|
||||
// }()
|
||||
|
||||
// public lazy var leftStack: UIStackView = {
|
||||
// let stack = UIStackView(arrangedSubviews: [leftTopStack, mdn])
|
||||
// stack.translatesAutoresizingMaskIntoConstraints = false
|
||||
// stack.axis = .vertical
|
||||
// stack.alignment = .fill
|
||||
// return stack
|
||||
// }()
|
||||
|
||||
// public lazy var leftStack: Stack<StackModel> = {
|
||||
// Stack<StackModel>.createStack(with: [(view: leftTopStack, model: StackItemModel(horizontalAlignment: .leading)),
|
||||
// (view: mdn, model: StackItemModel(horizontalAlignment: .leading))],
|
||||
// axis: .vertical)
|
||||
// }()
|
||||
|
||||
// public lazy var rightStack: UIStackView = {
|
||||
// let stack = UIStackView(arrangedSubviews: [rightLabelStack, callDetailsButton])
|
||||
// stack.translatesAutoresizingMaskIntoConstraints = false
|
||||
// stack.axis = .horizontal
|
||||
// stack.alignment = .trailing
|
||||
// return stack
|
||||
// }()
|
||||
//
|
||||
// public lazy var rightStack: Stack<StackModel> = {
|
||||
// Stack<StackModel>.createStack(with: [(view: rightLabelStack, model: StackItemModel(verticalAlignment: .leading)),
|
||||
// (view: callDetailsButton, model: StackItemModel(verticalAlignment: .leading))],
|
||||
// axis: .horizontal)
|
||||
// }()
|
||||
|
||||
// public lazy var rightLabelStack: UIStackView = {
|
||||
// let stack = UIStackView(arrangedSubviews: [shortDate, duration])
|
||||
// stack.translatesAutoresizingMaskIntoConstraints = false
|
||||
// stack.axis = .vertical
|
||||
// stack.alignment = .fill
|
||||
// return stack
|
||||
// }()
|
||||
//
|
||||
// public lazy var rightLabelStack: Stack<StackModel> = {
|
||||
// Stack<StackModel>.createStack(with: [(view: shortDate, model: StackItemModel()),
|
||||
// (view: duration, model: StackItemModel())],
|
||||
// axis: .vertical)
|
||||
// }()
|
||||
|
||||
// public lazy var topStack: UIStackView = {
|
||||
// let stack = UIStackView(arrangedSubviews: [row1Stack, row2Stack])
|
||||
// stack.translatesAutoresizingMaskIntoConstraints = false
|
||||
// stack.axis = .vertical
|
||||
// stack.alignment = .fill
|
||||
// stack.distribution = .fill
|
||||
// return stack
|
||||
// }()
|
||||
public lazy var topStack: Stack<StackModel> = {
|
||||
Stack<StackModel>.createStack(with: [(view: row1Stack, model: StackItemModel()),
|
||||
(view: row2Stack, model: StackItemModel())],
|
||||
axis: .vertical, spacing: 0)
|
||||
}()
|
||||
//
|
||||
// public lazy var topStack: Stack<StackModel> = {
|
||||
// Stack<StackModel>.createStack(with: [(view: row1Stack, model: StackItemModel(verticalAlignment: .leading)),
|
||||
// (view: row2Stack, model: StackItemModel(verticalAlignment: .leading))],
|
||||
// axis: .horizontal)
|
||||
// }()
|
||||
|
||||
// public lazy var mainStack: UIStackView = {
|
||||
// let stack = UIStackView(arrangedSubviews: [leftHeadline, leftBody])
|
||||
// stack.axis = .vertical
|
||||
// stack.alignment = .leading
|
||||
// return stack
|
||||
// }()
|
||||
|
||||
open override func setupView() {
|
||||
super.setupView()
|
||||
|
||||
addMolecule(topStack)
|
||||
row1Stack.restack()
|
||||
row2Stack.restack()
|
||||
topStack.restack()
|
||||
}
|
||||
|
||||
open override func updateView(_ size: CGFloat) {
|
||||
super.updateView(size)
|
||||
// leftLabelStack.updateView(size)
|
||||
topStack.updateView(size)
|
||||
}
|
||||
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
let mdnModel: LabelModel? = LabelModel(text: "555-555-5555")
|
||||
let contactModel: LabelModel? = LabelModel(text: "Unknown caller")
|
||||
contactModel?.fontStyle = .BoldBodySmall
|
||||
let shortDateModel: LabelModel? = LabelModel(text: "5/15/2020")
|
||||
shortDateModel?.textAlignment = .right
|
||||
let durationModel: LabelModel? = LabelModel(text: "34 sec")
|
||||
durationModel?.textAlignment = .right
|
||||
|
||||
// voicemailReadView.isHidden = false
|
||||
contact.setOptional(with: contactModel, delegateObject, additionalData)
|
||||
mdn.setOptional(with: mdnModel, delegateObject, additionalData)
|
||||
shortDate.setOptional(with: shortDateModel, delegateObject, additionalData)
|
||||
duration.setOptional(with: durationModel, delegateObject, additionalData)
|
||||
|
||||
// fullDate.setOptional(with: nil, delegateObject, additionalData)
|
||||
// audioPlayer.setOptional(with: model.audioPlayer, delegateObject, additionalData)
|
||||
// callBackButton.setOptional(with: model.callBackButton, delegateObject, additionalData)
|
||||
// sendTextButton.setOptional(with: model.sendTextButton, delegateObject, additionalData)
|
||||
// callDetailsButton.setOptional(with: model.callDetailsImageButton, delegateObject, additionalData)
|
||||
// voiceMailModel?.audioPlayer.messageID = model.messageID
|
||||
//
|
||||
// if let isHeard = model.isHeard, !isHeard, let messageNumber = model.messageID, !MFUtility.checkIfVoicemailExists(messageNumber){
|
||||
// changeVoicemailReadStatus(isHeard: false)
|
||||
// } else {
|
||||
// changeVoicemailReadStatus(isHeard: true)
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
200
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user