This commit is contained in:
Scott Pfeil 2023-06-27 16:23:09 -04:00
commit 55c2466eb1
13 changed files with 1120 additions and 140 deletions

View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:vds_ios/VDS.xcodeproj">
</FileRef>
<FileRef
location = "group:mvm_core_ui/MVMCoreUI.xcodeproj">
</FileRef>

View File

@ -21,6 +21,8 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
AF0EE4642A4B7AD4000DF6CF /* VDS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF0EE4632A4B7AD3000DF6CF /* VDS.framework */; };
AF0EE4652A4B7AD4000DF6CF /* VDS.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = AF0EE4632A4B7AD3000DF6CF /* VDS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
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 */; };
@ -36,16 +38,14 @@
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 */; };
D2B1E51F22FA0DF80065F95C /* MVMCoreUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2B1E51E22FA0DF80065F95C /* MVMCoreUI.framework */; };
D2B1E52122FA0EAB0065F95C /* MVMCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D2B1E51C22FA0DF50065F95C /* MVMCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D2B1E52322FA0EAB0065F95C /* MVMCoreUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D2B1E51E22FA0DF80065F95C /* MVMCoreUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D2B1E52722FA0FDB0065F95C /* MVMCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2B1E51C22FA0DF50065F95C /* MVMCore.framework */; };
D2B1E52922FA10BA0065F95C /* MVMAnimationFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2B1E51222F9F9590065F95C /* MVMAnimationFramework.framework */; };
D2B1E52A22FA10BA0065F95C /* MVMAnimationFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D2B1E51222F9F9590065F95C /* MVMAnimationFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
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 */; };
EA7E676B27582F2200ABF773 /* MVMCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA7E676927582F2200ABF773 /* MVMCore.framework */; };
EA7E676C27582F2200ABF773 /* MVMCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EA7E676927582F2200ABF773 /* MVMCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
EA7E676D27582F2200ABF773 /* MVMCoreUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA7E676A27582F2200ABF773 /* MVMCoreUI.framework */; };
EA7E676E27582F2200ABF773 /* MVMCoreUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EA7E676A27582F2200ABF773 /* MVMCoreUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@ -55,9 +55,9 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
D2B1E52322FA0EAB0065F95C /* MVMCoreUI.framework in Embed Frameworks */,
D2B1E52A22FA10BA0065F95C /* MVMAnimationFramework.framework in Embed Frameworks */,
D2B1E52122FA0EAB0065F95C /* MVMCore.framework in Embed Frameworks */,
EA7E676E27582F2200ABF773 /* MVMCoreUI.framework in Embed Frameworks */,
EA7E676C27582F2200ABF773 /* MVMCore.framework in Embed Frameworks */,
AF0EE4652A4B7AD4000DF6CF /* VDS.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@ -65,6 +65,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
AF0EE4632A4B7AD3000DF6CF /* VDS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = VDS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
@ -89,6 +90,8 @@
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>"; };
EA7E676927582F2200ABF773 /* MVMCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MVMCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
EA7E676A27582F2200ABF773 /* MVMCoreUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MVMCoreUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -96,9 +99,9 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D2B1E51F22FA0DF80065F95C /* MVMCoreUI.framework in Frameworks */,
D2B1E52922FA10BA0065F95C /* MVMAnimationFramework.framework in Frameworks */,
D2B1E52722FA0FDB0065F95C /* MVMCore.framework in Frameworks */,
EA7E676D27582F2200ABF773 /* MVMCoreUI.framework in Frameworks */,
EA7E676B27582F2200ABF773 /* MVMCore.framework in Frameworks */,
AF0EE4642A4B7AD4000DF6CF /* VDS.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -151,6 +154,9 @@
D2B1E42A22F9D0D90065F95C /* Frameworks */ = {
isa = PBXGroup;
children = (
AF0EE4632A4B7AD3000DF6CF /* VDS.framework */,
EA7E676927582F2200ABF773 /* MVMCore.framework */,
EA7E676A27582F2200ABF773 /* MVMCoreUI.framework */,
D2B1E51C22FA0DF50065F95C /* MVMCore.framework */,
D2B1E51E22FA0DF80065F95C /* MVMCoreUI.framework */,
D2B1E51222F9F9590065F95C /* MVMAnimationFramework.framework */,
@ -441,7 +447,7 @@
"$(PROJECT_DIR)/../SharedFrameworks",
);
INFOPLIST_FILE = JSONCreator/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -465,7 +471,7 @@
"$(PROJECT_DIR)/../SharedFrameworks",
);
INFOPLIST_FILE = JSONCreator/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",

View File

@ -11,7 +11,7 @@ import MVMCoreUI
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate {
var window: UIWindow?
var mvcNav: UINavigationController?
var dvcNav: UINavigationController?
@ -21,20 +21,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
// Setup our core object with the default implementation
CoreUIObject.sharedInstance()?.defaultInitialSetup()
CoreUIObject.sharedInstance()?.globalTopAlertDelegate = self
// MVMCoreCache.shared()?.addPage(toCache: [KeyPageType:"videotest","template":"stack","header":[KeyMoleculeName:"header","molecule":["moleculeName":"twoButtonView","primaryButton":["moleculeName":"button","title":"back","action":[KeyActionType:KeyActionTypeBack]],"secondaryButton":["moleculeName":"button","title":"open","action":[KeyActionType:KeyActionTypeOpen,KeyPageType:"planSelectionPageType"]]]],"stack":[KeyMoleculeName:"stack","molecules":[]]], pageType: "videotest")
//
// let path = Bundle.main.path(forResource: "Testing3", ofType: "json")!
// let string = try! String(contentsOfFile: path, encoding: .utf8)
// let dict: [AnyHashable: Any] = try! JSONSerialization.jsonObject(with: string.data(using: .utf8)!, options: .fragmentsAllowed) as! [AnyHashable: Any]
// let page: [AnyHashable: Any] = dict[KeyPage] as! [AnyHashable: Any]
// MVMCoreCache.shared()?.addPage(toCache: page, pageType: page[KeyPageType]! as! String)
return true
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let splitViewController = window!.rootViewController as! UISplitViewController
mvcNav = splitViewController.viewControllers[0] as? UINavigationController
@ -47,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
splitViewController.delegate = self
splitViewController.preferredDisplayMode = .allVisible
let gr = UILongPressGestureRecognizer(target: self, action: #selector(pasteAndPlay))
let gr = UILongPressGestureRecognizer(target: self, action: #selector(jsonPasteAndGo))
splitViewController.view.addGestureRecognizer(gr)
NotificationCenter.default.addObserver(forName: UIViewController.showDetailTargetDidChangeNotification, object: splitViewController, queue: nil) { [weak self] (notification) in
@ -63,37 +54,37 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
return true
}
@objc func pasteAndPlay(_ sender: UILongPressGestureRecognizer) {
@objc func jsonPasteAndGo(_ sender: UILongPressGestureRecognizer) {
if sender.state == .ended {
(dvc as? DetailViewController)?.textView.text = UIPasteboard.general.string
(dvc as? DetailViewController)?.play()
}
}
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
// MARK: - Split view
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
//guard let secondaryAsNavController = secondaryViewController as? UINavigationController else { return false }
//guard let _ = secondaryAsNavController.topViewController as? DetailViewController else { return false }
@ -112,16 +103,3 @@ extension AppDelegate: UINavigationControllerDelegate {
}
}
}
extension AppDelegate: MVMCoreGlobalTopAlertDelegateProtocol {
func getTopAlertView() -> UIView & MVMCoreTopAlertViewProtocol {
guard let topAlertView = MVMCoreUISplitViewController.main()?.topAlertView else {
return MVMCoreUITopAlertView()
}
return topAlertView;
}
func priorityForTopAlert(by object: MVMCoreTopAlertObject) -> Operation.QueuePriority {
return object.queuePriority
}
}

View File

@ -37,9 +37,10 @@ class DetailViewController: UIViewController {
textView.autocapitalizationType = .none
textView.autocorrectionType = .no
let clearButton = UIBarButtonItem(barButtonSystemItem: .trash, target: self, action: #selector(clearButtonPressed))
let shareButton = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(shareButtonPressed))
let buildButton = UIBarButtonItem(barButtonSystemItem: .play, target: self, action: #selector(play))
navigationItem.setRightBarButtonItems([shareButton, buildButton], animated: true)
navigationItem.setRightBarButtonItems([shareButton,clearButton, buildButton], animated: true)
JSONCreatorActionHandler.doStuff()
}
@ -50,6 +51,10 @@ class DetailViewController: UIViewController {
present(alert, animated: true, completion: nil)
}
@objc func clearButtonPressed() {
textView.text = ""
}
@objc func shareButtonPressed() {
if let text = textView.text {
let activityController = UIActivityViewController(activityItems: [text], applicationActivities: nil)

View File

@ -0,0 +1,142 @@
{
"Page": {
"template": "stack",
"pageType": "moleculeStack",
"screenHeading": "Manage Profile",
"hideFabOverlay": true,
"suppressPostLaunchRequests": false,
"tabBarHidden": true,
"header": {
"moleculeName": "header",
"molecule": {
"moleculeName": "headlineBody",
"headline": {
"moleculeName": "label",
"text": "Zenkey"
}
}
},
"stack": {
"moleculeName": "stack",
"molecules": [
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "textField",
"fieldKey": "firstName",
"type": "text",
"errorMessage": "Please enter a valid first name.",
"placeholder": "John A",
"titleLabel": {
"moleculeName": "label",
"text": "First Name"
}
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "textField",
"fieldKey": "lastName",
"type": "text",
"placeholder": "Smith",
"errorMessage": "Please enter a valid last name.",
"titleLabel": {
"moleculeName": "label",
"text": "Last Name"
}
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "textField",
"fieldKey": "phoneNumber",
"type": "phone",
"placeholder": "212-555-1234",
"title": "Contact Phone Number",
"errorMessage": "Please enter a valid phone number."
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "textField",
"fieldKey": "emailID",
"type": "text",
"placeholder": "JSMith123@gmail.com",
"title": "Email",
"errorMessage": "Please enter a valid greeting name."
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "textField",
"fieldKey": "zipcode",
"type": "number",
"placeholder": "90210",
"title": "Zip Code",
"errorMessage": "Please enter a valid zip code."
}
}
]
},
"footer": {
"moleculeName": "footer",
"molecule": {
"moleculeName": "twoButtonView",
"primaryButton": {
"moleculeName": "button",
"title": "Edit",
"groupName": "default",
"action": {
"actionType": "openPage",
"pageType": "updateProfile",
"extraParameters": {
"from": "none"
},
"presentationStyle": "push"
}
}
}
},
"formRules": [
{
"groupName": "default",
"rules": [
{
"type": "regex",
"fields": [
"emailID"
],
"regex": "^[a-zA-Z0-9](\\.?\\_?\\-?[a-zA-Z0-9]){0,}@[a-zA-Z0-9-_]+\\.([a-zA-Z0-9-_]{1,}\\.){0,}[a-zA-Z]{2,}$"
},
{
"type": "regex",
"fields": [
"zipcode"
],
"regex": "^\\d{5}(?:[-\\s]\\d{4})?$"
},
{
"regex": "^(\\d{3})[\\s.-]{0,1}(\\d{3})[\\s.-]{0,1}(\\d{4})$",
"type": "regex",
"fields": [
"phoneNumber"
]
},
{
"type": "allRequired",
"ruleId": "requiredRule",
"fields": [
"emailID",
"firstName",
"lastName"
]
}
]
}
]
}
}

View File

@ -0,0 +1,193 @@
{
"Page": {
"pageStatNames": [
"/mf/get/email/verify/indicator",
"/vision/customer/profile",
"/mf/cntrlr/mngpfl"
],
"stack": {
"moleculeName": "stack",
"molecules": [
{
"moleculeName": "stackItem",
"molecule": {
"text": "",
"fieldKey": "preferredFirstName",
"moleculeName": "textField",
"type": "text",
"title": "Preferred First Name Optional",
"errorMessage": "Please enter a valid first name."
}
},
{
"moleculeName": "stackItem",
"molecule": {
"text": "",
"fieldKey": "preferredLastName",
"moleculeName": "textField",
"type": "text",
"title": "Preferred Last Name Optional",
"errorMessage": "Please enter a valid last name."
}
},
{
"moleculeName": "stackItem",
"molecule": {
"bottomMolecule": {
"moleculeName": "label",
"attributes": [
{
"length": 6,
"type": "action",
"location": 0,
"action": {
"analyticsData": {
"vzdl.page.linkName": "Verify",
"vzdl.page.pageLinkName": "/mf/Manage Profile|Email Verify"
},
"actionType": "openPage",
"pageType": "verifyEmail"
}
}
],
"text": "Verify"
},
"email": "",
"moleculeName": "emailVerifyField",
"emailField": {
"text": "",
"fieldKey": "emailID",
"moleculeName": "textField",
"type": "email",
"title": "Email",
"errorMessage": "Please enter a valid email address."
}
}
}
]
},
"chaticon": {
"moleculeName": "chatIcon",
"hideFabOverlay": true
},
"template": "stack",
"analyticsData": {
"vzdl.events.flowinitiated": "1",
"vzdl.page.sourceChannel": "MVA",
"vzdl.target.engagement.intent": " ",
"vzdl.page.channel": " ",
"vzdl.page.displayChannel": "MVA",
"vzdl.page.id": "moleculeStack",
"vzdl.page.siteSection": " ",
"contentSquarePageName": "Manage Profile",
"vzdl.page.name": "moleculeStack"
},
"footer": {
"moleculeName": "footer",
"molecule": {
"moleculeName": "twoButtonView",
"primaryButton": {
"groupName": "default",
"moleculeName": "button",
"title": "Update",
"action": {
"extraParameters": {
"from": "none"
},
"actionType": "openPage",
"presentationStyle": "push",
"pageType": "updateProfile"
}
},
"secondaryButton": {
"moleculeName": "button",
"action": {
"presentationStyle": "push",
"actionType": "back",
"pageType": "backButton"
},
"title": "Cancel"
}
}
},
"screenHeading": "Manage Profile",
"hideFabOverlay": true,
"header": {
"moleculeName": "header",
"molecule": {
"moleculeName": "headlineBody",
"headline": {
"moleculeName": "label",
"text": "Tell us about yourself."
}
}
},
"pageType": "moleculeStack",
"suppressPostLaunchRequests": false,
"formRules": [
{
"groupName": "default",
"rules": [
{
"regex": "^[a-zA-Z]{1,25}$",
"ruleId": "lettersOnly",
"type": "regex",
"fields": [
"preferredFirstName"
]
},
{
"type": "allRequired",
"ruleId": "requiredRule",
"fields": [
"preferredFirstName"
]
}
],
"effects": [
{
"type": "enableFormFieldEffect",
"fieldKey": "preferredLastName",
"rules": [
{
"type": "anyRequired",
"fields": [
"preferredFirstName"
]
}
]
},
{
"type": "enableFormFieldEffect",
"fieldKey": "emailID",
"rules": [
{
"type": "anyRequired",
"fields": [
"preferredLastName"
]
}
]
},
{
"type": "enableFormFieldEffect",
"fieldKey": "box",
"rules": [
{
"type": "anyRequired",
"fields": [
"emailID"
]
}
]
}
]
}
],
"navigationBar": {
"moleculeName": "navigationBar",
"title": "Manage Profile"
},
"tabBarHidden": true
}
}

View File

@ -0,0 +1,267 @@
{
"Page": {
"template": "stack",
"pageType": "moleculeStack",
"screenHeading": "Manage Profile",
"hideFabOverlay": true,
"suppressPostLaunchRequests": false,
"tabBarHidden": true,
"analyticsData": {
"vzdl.events.flowinitiated": "1",
"vzdl.page.sourceChannel": "MVA",
"vzdl.target.engagement.intent": " ",
"vzdl.page.channel": " ",
"vzdl.page.displayChannel": "MVA",
"vzdl.page.id": "moleculeStack",
"vzdl.page.siteSection": " ",
"contentSquarePageName": "Manage Profile",
"vzdl.page.name": "moleculeStack"
},
"chaticon": {
"moleculeName": "chatIcon",
"hideFabOverlay": true
},
"pageStatNames": [
"/mf/get/email/verify/indicator",
"/vision/customer/profile",
"/mf/cntrlr/mngpfl"
],
"navigationBar": {
"moleculeName": "navigationBar",
"title": "Manage Profile"
},
"header": {
"moleculeName": "headerH2Link",
"headlineBody": {
"moleculeName": "headlineBody",
"headline": {
"moleculeName": "label",
"text": "Tell us about yourself."
},
"body": {
"moleculeName": "label",
"text": "We'll use your preferred name and pronouns online, in print, on the phone and in person to refer to you and your account."
}
},
"link": {
"moleculeName": "caretLink",
"title": "Why are we asking?",
"action": {
"actionType": "openPage",
"pageType": "learnMorePronouns"
}
}
},
"stack": {
"moleculeName": "stack",
"molecules": [
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "textField",
"fieldKey": "preferredFirstName",
"type": "text",
"errorMessage": "Please enter a valid first name.",
"titleLabel": {
"moleculeName": "label",
"text": "Preferred First Name Optional",
"attributes": [
{
"type": "color",
"location": 21,
"length": 8,
"textColor": "#747676"
}
]
},
"feedbackLabel": {
"moleculeName": "label",
"text": "This will replace greeting name if you have one.",
"textColor": "#747676"
}
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "textField",
"fieldKey": "preferredLastName",
"type": "text",
"text": "",
"errorMessage": "Please enter a valid last name.",
"titleLabel": {
"moleculeName": "label",
"text": "Preferred Last Name Optional",
"attributes": [
{
"type": "color",
"location": 20,
"length": 8,
"textColor": "#747676"
}
]
}
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "dropDown",
"fieldKey": "pronoun",
"accessibilityIdentifier": "pronounDropdown",
"options": [
"",
"He, Him, His",
"She, Her, Hers",
"They, Them, Theirs",
"None of these"
],
"titleLabel": {
"moleculeName": "label",
"text": "Pronouns Optional",
"attributes": [
{
"type": "color",
"location": 9,
"length": 8,
"textColor": "#747676"
}
]
}
,
"errorMessage": "Please select a pronoun"
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "textField",
"fieldKey": "greetingName",
"type": "text",
"text": "",
"title": "Greeting name",
"errorMessage": "Please enter a valid greeting name."
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "emailVerifyField",
"email": "",
"emailField": {
"text": "",
"fieldKey": "emailID",
"moleculeName": "textField",
"type": "email",
"title": "Email",
"errorMessage": "Please enter a valid email address."
},
"bottomMolecule": {
"moleculeName": "label",
"attributes": [
{
"length": 6,
"type": "action",
"location": 0,
"action": {
"analyticsData": {
"vzdl.page.linkName": "Verify",
"vzdl.page.pageLinkName": "/mf/Manage Profile|Email Verify"
},
"actionType": "openPage",
"pageType": "verifyEmail"
}
}
],
"text": "Verify"
}
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "textField",
"fieldKey": "alternateNo",
"type": "phone",
"text": "",
"title": "Alternate contact number",
"feedback" : "This is your easiest way to contact you.",
"errorMessage": "Please enter a valid phone number."
}
}
]
},
"footer": {
"moleculeName": "footer",
"molecule": {
"moleculeName": "twoButtonView",
"primaryButton": {
"moleculeName": "button",
"title": "Update",
"groupName": "default",
"action": {
"actionType": "openPage",
"pageType": "updateProfile",
"extraParameters": {
"from": "none"
},
"presentationStyle": "push"
}
},
"secondaryButton": {
"moleculeName": "button",
"title": "Cancel",
"action": {
"actionType": "back",
"presentationStyle": "push",
"pageType": "backButton"
}
}
}
},
"formRules": [
{
"groupName": "default",
"rules": [
{
"type": "regex",
"fields": [
"emailID"
],
"regex": "^[a-zA-Z0-9](\\.?\\_?\\-?[a-zA-Z0-9]){0,}@[a-zA-Z0-9-_]+\\.([a-zA-Z0-9-_]{1,}\\.){0,}[a-zA-Z]{2,}$"
},
{
"regex": "^(\\d{3})[\\s.-]{0,1}(\\d{3})[\\s.-]{0,1}(\\d{4})$",
"type": "regex",
"fields": [
"alternateNo"
]
},
{
"type": "allRequired",
"ruleId": "requiredRule",
"fields": [
"greetingName",
"emailID",
"alternateNo"
]
}
],
"effects": [
{
"type": "enableFormFieldEffect",
"fieldKey": "preferredLastName",
"rules": [
{
"type": "anyRequired",
"fields": [
"preferredFirstName"
]
}
]
}
]
}
]
}
}

View File

@ -0,0 +1,166 @@
{
"Page": {
"template": "stack",
"pageType": "moleculeStack",
"screenHeading": "Manage Profile",
"hideFabOverlay": true,
"suppressPostLaunchRequests": false,
"tabBarHidden": true,
"analyticsData": {
"vzdl.events.flowinitiated": "1",
"vzdl.page.sourceChannel": "MVA",
"vzdl.target.engagement.intent": " ",
"vzdl.page.channel": " ",
"vzdl.page.displayChannel": "MVA",
"vzdl.page.id": "moleculeStack",
"vzdl.page.siteSection": " ",
"contentSquarePageName": "Manage Profile",
"vzdl.page.name": "moleculeStack"
},
"chaticon": {
"moleculeName": "chatIcon",
"hideFabOverlay": true
},
"pageStatNames": [
"/mf/get/email/verify/indicator",
"/vision/customer/profile",
"/mf/cntrlr/mngpfl"
],
"navigationBar": {
"moleculeName": "navigationBar",
"title": "Manage Profile"
},
"header": {
"moleculeName": "headerH2Link",
"headlineBody": {
"moleculeName": "headlineBody",
"headline": {
"moleculeName": "label",
"text": "Tell us about yourself."
},
"body": {
"moleculeName": "label",
"text": "We'll use your preferred name and pronouns online, in print, on the phone and in person to refer to you and your account."
}
},
"link": {
"moleculeName": "caretLink",
"title": "Why are we asking?",
"action": {
"actionType": "openPage",
"pageType": "learnMorePronouns"
}
}
},
"stack": {
"moleculeName": "stack",
"molecules": [
{
"moleculeName": "stackItem",
"molecule": {
"enabled" : false,
"moleculeName": "textField",
"fieldKey": "preferredFirstName",
"type": "text",
"errorMessage": "Please enter a valid first name.",
"titleLabel": {
"moleculeName": "label",
"text": "Preferred First Name Optional",
"fontStyle": "RegularMicro",
"textColor": "#000000",
"attributes": [
{
"type": "color",
"location": 21,
"length": 8,
"textColor": "#747676"
}
]
},
"feedbackLabel": {
"moleculeName": "label",
"fontStyle": "RegularMicro",
"text": "This will replace greeting name if you have one.",
"textColor": "#747676"
}
}
}
]
},
"footer": {
"moleculeName": "footer",
"molecule": {
"moleculeName": "twoButtonView",
"primaryButton": {
"moleculeName": "button",
"title": "Update",
"groupName": "default",
"action": {
"actionType": "openPage",
"pageType": "updateProfile",
"extraParameters": {
"from": "none"
},
"presentationStyle": "push"
}
},
"secondaryButton": {
"moleculeName": "button",
"title": "Cancel",
"action": {
"actionType": "back",
"presentationStyle": "push",
"pageType": "backButton"
}
}
}
},
"formRules": [
{
"groupName": "default",
"rules": [
{
"type": "regex",
"fields": [
"emailID"
],
"regex": "^[a-zA-Z0-9](\\.?\\_?\\-?[a-zA-Z0-9]){0,}@[a-zA-Z0-9-_]+\\.([a-zA-Z0-9-_]{1,}\\.){0,}[a-zA-Z]{2,}$"
},
{
"regex": "^(\\d{3})[\\s.-]{0,1}(\\d{3})[\\s.-]{0,1}(\\d{4})$",
"type": "regex",
"fields": [
"alternateNo"
]
},
{
"type": "allRequired",
"ruleId": "requiredRule",
"fields": [
"greetingName",
"emailID",
"alternateNo"
]
}
],
"effects": [
{
"type": "enableFormFieldEffect",
"fieldKey": "preferredLastName",
"activatedRuleIds": [
"requiredRule"
],
"rules": [
{
"type": "anyRequired",
"fields": [
"preferredFirstName"
]
}
]
}
]
}
]
}
}

View File

@ -0,0 +1,242 @@
{
"Page": {
"pageStatNames": [
"/mf/get/email/verify/indicator",
"/vision/customer/profile",
"/mf/cntrlr/mngpfl"
],
"stack": {
"moleculeName": "stack",
"molecules": [
{
"moleculeName": "stackItem",
"molecule": {
"text": "",
"fieldKey": "preferredFirstName",
"moleculeName": "textField",
"type": "text",
"title": "Preferred First Name Optional",
"errorMessage": "Please enter a valid first name."
}
},
{
"moleculeName": "stackItem",
"molecule": {
"text": "",
"fieldKey": "preferredLastName",
"moleculeName": "textField",
"type": "text",
"title": "Preferred Last Name Optional",
"errorMessage": "Please enter a valid last name."
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "dropDown",
"accessibilityIdentifier": "pronounDropdown",
"options": [
"",
"He, Him, His",
"She, Her, Hers",
"They, Them, Theirs",
"None of these"
],
"title": "Pronouns Optional",
"fieldKey": "pronoun",
"errorMessage": "Please select a pronoun"
}
},
{
"moleculeName": "stackItem",
"molecule": {
"text": "",
"fieldKey": "greetingName",
"moleculeName": "textField",
"type": "text",
"title": "Greeting name",
"errorMessage": "Please enter a valid greeting name."
}
},
{
"moleculeName": "stackItem",
"molecule": {
"bottomMolecule": {
"moleculeName": "label",
"attributes": [
{
"length": 6,
"type": "action",
"location": 0,
"action": {
"analyticsData": {
"vzdl.page.linkName": "Verify",
"vzdl.page.pageLinkName": "/mf/Manage Profile|Email Verify"
},
"actionType": "openPage",
"pageType": "verifyEmail"
}
}
],
"text": "Verify"
},
"email": "",
"moleculeName": "emailVerifyField",
"emailField": {
"text": "",
"fieldKey": "emailID",
"moleculeName": "textField",
"type": "email",
"title": "Email",
"errorMessage": "Please enter a valid email address."
}
}
},
{
"moleculeName": "stackItem",
"molecule": {
"text": "",
"fieldKey": "alternateNo",
"moleculeName": "textField",
"type": "phone",
"title": "Alternate contact number",
"errorMessage": "Please enter a valid phone number."
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName" : "checkboxLabel",
"checkbox" : {
"moleculeName" : "checkbox",
"fieldKey" : "agreement"
},
"label" : {
"moleculeName" : "label",
"text" : "wblalaha aldfjkld fadjkladfsklj;dfsakl; adfs"
}
}
}
]
},
"chaticon": {
"moleculeName": "chatIcon",
"hideFabOverlay": true
},
"template": "stack",
"analyticsData": {
"vzdl.events.flowinitiated": "1",
"vzdl.page.sourceChannel": "MVA",
"vzdl.target.engagement.intent": " ",
"vzdl.page.channel": " ",
"vzdl.page.displayChannel": "MVA",
"vzdl.page.id": "moleculeStack",
"vzdl.page.siteSection": " ",
"contentSquarePageName": "Manage Profile",
"vzdl.page.name": "moleculeStack"
},
"footer": {
"moleculeName": "footer",
"molecule": {
"moleculeName": "twoButtonView",
"primaryButton": {
"groupName": "default",
"moleculeName": "button",
"title": "Update",
"action": {
"extraParameters": {
"from": "none"
},
"actionType": "openPage",
"presentationStyle": "push",
"pageType": "updateProfile"
}
},
"secondaryButton": {
"moleculeName": "button",
"action": {
"presentationStyle": "push",
"actionType": "back",
"pageType": "backButton"
},
"title": "Cancel"
}
}
},
"screenHeading": "Manage Profile",
"hideFabOverlay": true,
"header": {
"moleculeName": "header",
"molecule": {
"moleculeName": "headlineBody",
"headline": {
"moleculeName": "label",
"text": "Tell us about yourself."
}
}
},
"pageType": "moleculeStack",
"suppressPostLaunchRequests": false,
"formRules": [
{
"groupName": "default",
"rules": [
{
"regex": "^[a-zA-Z0-9](\\.?\\_?\\-?[a-zA-Z0-9]){0,}@[a-zA-Z0-9-_]+\\.([a-zA-Z0-9-_]{1,}\\.){0,}[a-zA-Z]{2,}$",
"type": "regex",
"fields": [
"emailID"
]
},
{
"regex": "^(\\d{3})[\\s.-]{0,1}(\\d{3})[\\s.-]{0,1}(\\d{4})$",
"type": "regex",
"fields": [
"alternateNo"
]
},
{
"type": "allRequired",
"ruleId": "requiredRule",
"fields": [
"greetingName",
"emailID",
"alternateNo",
"agreement"
]
}
],
"effects": [
{
"type": "enableFormFieldEffect",
"fieldKey": "preferredLastName",
"activatedRuleIds": ["requiredRule"],
"rules": [ {
"type": "anyRequired",
"fields": [
"preferredFirstName"
]
}]
},
{
"type": "disableFormFieldEffect",
"fieldKey": "agreement",
"rules": [ {
"type": "anyRequired",
"fields": [
"preferredFirstName",
"preferredLastName",
"pronoun"
]
}]
}
]
}
],
"navigationBar": {
"moleculeName": "navigationBar",
"title": "Manage Profile"
},
"tabBarHidden": true
}
}

View File

@ -1,91 +1,91 @@
{
"ResponseInfo" : {
"type" : "Success",
"code" : "00000"
"ResponseInfo": {
"type": "Success",
"code": "00000"
},
"Page" : {
"formRules": [{
"groupName": "default",
"rules":[{
"type": "anyValueChanged",
"fields":[
"box"
]
}]
}],
"footer" : {
"moleculeName":"footer",
"molecule": {
"moleculeName":"twoButtonView",
"primaryButton":{
"moleculeName": "button",
"title":"x",
"groupName": "default",
"action": {
"actionType": "openPage",
"pageType": "verifyZip"
}
},
"secondaryButton":{
"moleculeName": "button",
"title":"x",
"action": {
"actionType": "back"
}
}
}
},
"molecules" : [
"Page": {
"template": "list",
"pageType": "x",
"header": {},
"molecules": [
{
"moleculeName" : "listItem",
"molecule" : {
"moleculeName" : "radioBoxes",
"fieldKey":"box",
"boxes" : [
"moleculeName": "listItem",
"molecule": {
"moleculeName": "radioBoxes",
"fieldKey": "box",
"boxes": [
{
"moleculeName" : "radioBox",
"text" : "1"
"moleculeName": "radioBox",
"text": "1"
},
{
"moleculeName" : "radioBox",
"text" : "2"
"moleculeName": "radioBox",
"text": "2"
},
{
"moleculeName" : "radioBox",
"text" : "3",
"selected" : true
"moleculeName": "radioBox",
"text": "3",
"selected": true
},
{
"moleculeName" : "radioBox",
"text" : "4",
"enabled" : false
"moleculeName": "radioBox",
"text": "4",
"enabled": false
},
{
"moleculeName" : "radioBox",
"text" : "5",
"fieldValue" : "Not 5"
"moleculeName": "radioBox",
"text": "5",
"fieldValue": "Not 5"
},
{
"moleculeName" : "radioBox",
"text" : "6",
"strikethrough" : true
"moleculeName": "radioBox",
"text": "6",
"strikethrough": true
},
{
"moleculeName" : "radioBox",
"text" : "7",
"strikethrough" : true,
"enabled" : false
"moleculeName": "radioBox",
"text": "7",
"strikethrough": true,
"enabled": false
}
]
}
}
],
"header" : {
"footer": {
"moleculeName": "footer",
"molecule": {
"moleculeName": "twoButtonView",
"primaryButton": {
"moleculeName": "button",
"title": "x",
"groupName": "default",
"action": {
"actionType": "openPage",
"pageType": "verifyZip"
}
},
"secondaryButton": {
"moleculeName": "button",
"title": "x",
"action": {
"actionType": "back"
}
}
}
},
"template" : "list",
"pageType" : "x"
"formRules": [
{
"groupName": "default",
"rules": [
{
"type": "anyValueChanged",
"fields": [
"box"
]
}
]
}
]
}
}

View File

@ -9,33 +9,10 @@
import Foundation
import MVMCoreUI
@objcMembers public class ActionPrintModel: ActionModelProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
public static var identifier: String = "print"
public var actionType: String = ActionPrintModel.identifier
public var text: String
public var delay = false
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?
}
public class JSONCreatorActionHandler: MVMCoreUIActionHandler {
public override func handleOtherActions(_ actionType: String?, actionInformation: [AnyHashable : Any]?, additionalData: [AnyHashable : Any]?, delegateObject: DelegateObject?) -> Bool {
if actionType == "print" {
if actionInformation?.boolForKey("delay") ?? false {
sleep(2)
}
print(actionInformation?.stringForkey("text") ?? "fail")
return true
}
return false
}
public static func doStuff() {
MVMCoreObject.sharedInstance()?.actionHandler = JSONCreatorActionHandler()
ModelRegistry.register(ActionPrintModel.self)
ModelRegistry.register(handler: ButtonWithImage.self, for: ButtonWithImageModel.self)
ModelRegistry.register(handler: OrderTracker.self, for: OrderTrackerModel.self)
ModelRegistry.register(handler: ListDeviceRightVariableCaret.self, for: ListDeviceRightVariableCaretModel.self)

View File

@ -19,7 +19,7 @@ class MasterViewController: UITableViewController {
// setup the data
sectionsMap = [:]
let sections = try! FileManager.default.contentsOfDirectory(atPath: folderPath)
let sections = try! FileManager.default.contentsOfDirectory(atPath: folderPath).sorted { $0 < $1 }
for section in sections {
let paths = try! FileManager.default.subpathsOfDirectory(atPath: "\(folderPath)/\(section)")
var array: [String] = []
@ -28,7 +28,7 @@ class MasterViewController: UITableViewController {
array.append(path)
}
}
sectionsMap[section] = array
sectionsMap[section] = array.sorted{ $0 < $1 }
}
}

View File

@ -1,3 +1,4 @@
vds_ios https://gitlab.verizon.com/BPHV_MIPS/vds_ios.git develop
mvm_core https://gitlab.verizon.com/BPHV_MIPS/mvm_core.git develop