updated project files to sort and execute cleaner
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
ff21987c1e
commit
5349c565ad
@ -36,16 +36,16 @@
|
||||
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 */,
|
||||
EA7E676E27582F2200ABF773 /* MVMCoreUI.framework in Embed Frameworks */,
|
||||
EA7E676C27582F2200ABF773 /* MVMCore.framework in Embed Frameworks */,
|
||||
D2B1E52A22FA10BA0065F95C /* MVMAnimationFramework.framework in Embed Frameworks */,
|
||||
D2B1E52122FA0EAB0065F95C /* MVMCore.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -89,6 +89,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 +98,9 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D2B1E51F22FA0DF80065F95C /* MVMCoreUI.framework in Frameworks */,
|
||||
EA7E676D27582F2200ABF773 /* MVMCoreUI.framework in Frameworks */,
|
||||
EA7E676B27582F2200ABF773 /* MVMCore.framework in Frameworks */,
|
||||
D2B1E52922FA10BA0065F95C /* MVMAnimationFramework.framework in Frameworks */,
|
||||
D2B1E52722FA0FDB0065F95C /* MVMCore.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -151,6 +153,8 @@
|
||||
D2B1E42A22F9D0D90065F95C /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA7E676927582F2200ABF773 /* MVMCore.framework */,
|
||||
EA7E676A27582F2200ABF773 /* MVMCoreUI.framework */,
|
||||
D2B1E51C22FA0DF50065F95C /* MVMCore.framework */,
|
||||
D2B1E51E22FA0DF80065F95C /* MVMCoreUI.framework */,
|
||||
D2B1E51222F9F9590065F95C /* MVMAnimationFramework.framework */,
|
||||
@ -441,7 +445,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 +469,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",
|
||||
|
||||
@ -11,7 +11,7 @@ import MVMCoreUI
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate {
|
||||
|
||||
|
||||
var window: UIWindow?
|
||||
var mvcNav: UINavigationController?
|
||||
var dvcNav: UINavigationController?
|
||||
@ -23,18 +23,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
|
||||
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)
|
||||
// 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 +47,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
|
||||
splitViewController.delegate = self
|
||||
splitViewController.preferredDisplayMode = .allVisible
|
||||
|
||||
let gr = UILongPressGestureRecognizer(target: self, action: #selector(pasteAndGo))
|
||||
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
|
||||
@ -60,40 +60,41 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
|
||||
}
|
||||
}
|
||||
}
|
||||
self.register()
|
||||
return true
|
||||
}
|
||||
|
||||
@objc func pasteAndGo(_ 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 }
|
||||
@ -125,3 +126,112 @@ extension AppDelegate: MVMCoreGlobalTopAlertDelegateProtocol {
|
||||
return object.queuePriority
|
||||
}
|
||||
}
|
||||
|
||||
extension AppDelegate {
|
||||
func register(){
|
||||
ModelRegistry.register(handler: EmailVerifyField.self, for: EmailVerifyModel.self)
|
||||
}
|
||||
}
|
||||
|
||||
@objcMembers open class EmailVerifyModel: MoleculeModelProtocol {
|
||||
|
||||
public static var identifier: String = "emailVerifyField"
|
||||
public var moleculeName: String = EmailVerifyModel.identifier
|
||||
public var emailField: TextEntryFieldModel
|
||||
public var bottomMolecule: MoleculeModelProtocol
|
||||
public var email: String
|
||||
public var backgroundColor: Color?
|
||||
|
||||
public init(emailField: TextEntryFieldModel, email: String, bottomMolecule: MoleculeModelProtocol) {
|
||||
self.emailField = emailField
|
||||
self.email = email
|
||||
self.bottomMolecule = bottomMolecule
|
||||
}
|
||||
|
||||
public required init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
emailField = try typeContainer.decode(TextEntryFieldModel.self, forKey: .emailField)
|
||||
email = try typeContainer.decode(String.self, forKey: .email)
|
||||
bottomMolecule = try typeContainer.decodeModel(codingKey: .bottomMolecule)
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encode(emailField, forKey: .emailField)
|
||||
try container.encode(email, forKey: .email)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encodeModel(bottomMolecule, forKey: .bottomMolecule)
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case emailField
|
||||
case bottomMolecule
|
||||
case backgroundColor
|
||||
case email
|
||||
}
|
||||
}
|
||||
|
||||
@objcMembers open class EmailVerifyField: View {
|
||||
|
||||
private let emailField = TextEntryField()
|
||||
|
||||
private var bottomView: MoleculeViewProtocol?
|
||||
|
||||
private var emailVerifyFieldModel: EmailVerifyModel? {
|
||||
return model as? EmailVerifyModel
|
||||
}
|
||||
|
||||
private var isBottomViewHidden: Bool {
|
||||
guard let emailVerifyFieldModel = emailVerifyFieldModel, let text = emailField.text else { return true }
|
||||
return !(emailVerifyFieldModel.email.caseInsensitiveCompare(text) == .orderedSame)
|
||||
}
|
||||
|
||||
private let containerView = MVMCoreUICommonViewsUtility.commonView()
|
||||
|
||||
open override func setupView() {
|
||||
super.setupView()
|
||||
backgroundColor = .clear
|
||||
clipsToBounds = true
|
||||
addSubview(containerView)
|
||||
NSLayoutConstraint.constraintPinSubview(toSuperview: containerView)
|
||||
containerView.addSubview(emailField)
|
||||
NSLayoutConstraint.constraintPinSubview(emailField, pinTop: true, pinBottom: false, pinLeft: true, pinRight: true)
|
||||
addEmailFieldObserver()
|
||||
}
|
||||
|
||||
private func addEmailFieldObserver() {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(onEmailValueChange), name: UITextField.textDidChangeNotification, object: emailField.textField)
|
||||
}
|
||||
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
|
||||
guard let model = model as? EmailVerifyModel else { return }
|
||||
|
||||
emailField.set(with: model.emailField, delegateObject, additionalData)
|
||||
|
||||
if let bottomView = self.bottomView ?? ModelRegistry.createMolecule(model.bottomMolecule, delegateObject: delegateObject, additionalData: additionalData) {
|
||||
bottomView.set(with: model.bottomMolecule, delegateObject, additionalData)
|
||||
self.bottomView = bottomView
|
||||
addBottomView(bottomView: bottomView)
|
||||
}
|
||||
}
|
||||
|
||||
public func onEmailValueChange() {
|
||||
bottomView?.isHidden = isBottomViewHidden
|
||||
}
|
||||
|
||||
private func addBottomView(bottomView: MoleculeViewProtocol) {
|
||||
|
||||
containerView.addSubview(bottomView)
|
||||
|
||||
bottomView.leadingAnchor.constraint(equalTo: containerView.leadingAnchor).isActive = true
|
||||
containerView.trailingAnchor.constraint(equalTo: bottomView.trailingAnchor).isActive = true
|
||||
bottomView.topAnchor.constraint(equalTo: emailField.bottomAnchor).isActive = true
|
||||
containerView.bottomAnchor.constraint(equalTo: bottomView.bottomAnchor).isActive = true
|
||||
bottomView.isHidden = isBottomViewHidden
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
195
JSONCreator_iOS/JSONCreator/JSON/Samples/FormEnabledChain.json
Normal file
195
JSONCreator_iOS/JSONCreator/JSON/Samples/FormEnabledChain.json
Normal file
@ -0,0 +1,195 @@
|
||||
{
|
||||
"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-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": "^[a-zA-Z]{1,25}$",
|
||||
"ruleId": "lettersOnly",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "allRequired",
|
||||
"ruleId": "requiredRule",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
]
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"type": "enableFormFieldEffect",
|
||||
"fieldKey": "preferredLastName",
|
||||
"ruleIds": [
|
||||
"requiredRule",
|
||||
"lettersOnly"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyRequired",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "enableFormFieldEffect",
|
||||
"fieldKey": "emailID",
|
||||
"ruleIds": [
|
||||
"requiredRule"
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyRequired",
|
||||
"fields": [
|
||||
"preferredLastName"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"navigationBar": {
|
||||
"moleculeName": "navigationBar",
|
||||
"title": "Manage Profile"
|
||||
},
|
||||
"tabBarHidden": true
|
||||
}
|
||||
}
|
||||
243
JSONCreator_iOS/JSONCreator/JSON/Samples/FormWatcher.json
Normal file
243
JSONCreator_iOS/JSONCreator/JSON/Samples/FormWatcher.json
Normal file
@ -0,0 +1,243 @@
|
||||
{
|
||||
"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",
|
||||
"ruleIds": ["requiredRule"],
|
||||
"rules": [{
|
||||
"regex": "^[a-zA-Z]{1,25}$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
]
|
||||
}]
|
||||
},
|
||||
{
|
||||
"type": "enableFormFieldEffect",
|
||||
"fieldKey": "agreement",
|
||||
"rules": [ {
|
||||
"type": "anyRequired",
|
||||
"fields": [
|
||||
"preferredFirstName",
|
||||
"preferredLastName",
|
||||
"pronoun"
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"navigationBar": {
|
||||
"moleculeName": "navigationBar",
|
||||
"title": "Manage Profile"
|
||||
},
|
||||
"tabBarHidden": true
|
||||
}
|
||||
}
|
||||
@ -30,7 +30,7 @@ public class JSONCreatorActionHandler: MVMCoreUIActionHandler {
|
||||
print(actionInformation?.stringForkey("text") ?? "fail")
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return super.handleOtherActions(actionType, actionInformation: actionInformation, additionalData: additionalData, delegateObject: delegateObject)
|
||||
}
|
||||
|
||||
public static func doStuff() {
|
||||
|
||||
@ -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 }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user