Merge branch 'update/tilelet-sample' into 'develop'

updated for tilet

See merge request BPHV_MIPS/jsoncreator_ios!8
This commit is contained in:
Hedden, Kyle Matthew 2023-04-06 20:37:00 +00:00
commit 32ac60f8a4
7 changed files with 276 additions and 61 deletions

View File

@ -88,7 +88,6 @@
EA5B696F2866BC1000B17D2E /* MVMCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EA5B696C2866BC1000B17D2E /* MVMCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
EA5B69702866BC1000B17D2E /* MVMCoreUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA5B696D2866BC1000B17D2E /* MVMCoreUI.framework */; };
EA5B69712866BC1000B17D2E /* MVMCoreUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EA5B696D2866BC1000B17D2E /* MVMCoreUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
EA797B2C2902D4BB00DBAFE6 /* TestToggle.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA797B2B2902D4BB00DBAFE6 /* TestToggle.swift */; };
EAA658152875FA5E00484A7D /* VDSFormControlsTokens.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAA658142875FA5E00484A7D /* VDSFormControlsTokens.xcframework */; };
EAA658162875FA5E00484A7D /* VDSFormControlsTokens.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EAA658142875FA5E00484A7D /* VDSFormControlsTokens.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
EACA5E5E2853DBC900CBA65B /* VDSColorTokens.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = EACA5E5D2853DBC900CBA65B /* VDSColorTokens.xcframework */; };
@ -176,7 +175,6 @@
EA3361FA2891D54A0071C351 /* VDSTypographyTokens.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = VDSTypographyTokens.xcframework; path = ../SharedFrameworks/VDSTypographyTokens.xcframework; sourceTree = "<group>"; };
EA5B696C2866BC1000B17D2E /* MVMCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MVMCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
EA5B696D2866BC1000B17D2E /* MVMCoreUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MVMCoreUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
EA797B2B2902D4BB00DBAFE6 /* TestToggle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestToggle.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; };
EAA658142875FA5E00484A7D /* VDSFormControlsTokens.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = VDSFormControlsTokens.xcframework; path = ../SharedFrameworks/VDSFormControlsTokens.xcframework; sourceTree = "<group>"; };
@ -241,7 +239,6 @@
D2B1E3FB22F4A6930065F95C /* Assets.xcassets */,
D2B1E3FD22F4A6930065F95C /* LaunchScreen.storyboard */,
D2B1E40022F4A6930065F95C /* Info.plist */,
EA797B2B2902D4BB00DBAFE6 /* TestToggle.swift */,
);
path = JSONCreator;
sourceTree = "<group>";
@ -514,7 +511,6 @@
D2FC4FB025897ACB00061EA4 /* OrderTracker.swift in Sources */,
EA09CDD8282C40CC00A7835F /* GMFGBLEHandlerProtocol.swift in Sources */,
EA09CDDC282C40CC00A7835F /* GMFGFotaHandler.swift in Sources */,
EA797B2C2902D4BB00DBAFE6 /* TestToggle.swift in Sources */,
EA09CDD6282C40CC00A7835F /* GMFGConstant.swift in Sources */,
D27564C925939E91003CA713 /* Links.swift in Sources */,
EA09CDE6282C416C00A7835F /* BluetoothDebuggableProtocol.swift in Sources */,

View File

@ -88,7 +88,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
// MARK: - Split view
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewControlller:UIViewController, onto primaryViewController:UIViewController) -> Bool {
//guard let secondaryAsNavController = secondaryViewController as? UINavigationController else { return false }
//guard let _ = secondaryAsNavController.topViewController as? DetailViewController else { return false }
return true
@ -122,6 +122,6 @@ extension AppDelegate: MVMCoreGlobalTopAlertDelegateProtocol {
extension AppDelegate {
func register(){
ModelRegistry.register(handler: TestToggle.self, for: TestToggleModel.self)
//ModelRegistry.register(handler: AtomicClass.self, for: AtomicClasseModel.self)
}
}

View File

@ -22,41 +22,62 @@
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName": "toggle",
"fieldKey": "isActive"
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName":"labelToggle",
"label":{
"moleculeName": "textView",
"fieldKey": "firstName",
"type": "text",
"errorMessage": "Please enter a valid first name.",
"placeholder": "John A",
"titleLabel": {
"moleculeName": "label",
"text":"Label Text Goes Here"
},
"toggle":{
"moleculeName": "toggle"
"text": "First Name"
}
}
},
{
"moleculeName": "stackItem",
"molecule": {
"moleculeName":"headlineBodyToggle",
"headlineBody":{
"moleculeName": "headlineBody",
"headline":{
"moleculeName": "textField",
"fieldKey": "lastName",
"type": "text",
"placeholder": "Smith",
"errorMessage": "Please enter a valid last name.",
"titleLabel": {
"moleculeName": "label",
"text": "Headline Text Goes Here"
},
"body":{
"moleculeName": "label",
"text": "Body Text Goes Here"
"text": "Last Name"
}
}
},
"toggle":{
"moleculeName": "toggle"
{
"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."
}
}
]
@ -84,7 +105,36 @@
{
"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,110 @@
{
"ResponseInfo": {},
"Page": {
"pageType": "contactUs",
"screenHeading": "Select an international plan",
"template": "list",
"molecules": [
{
"moleculeName": "listItem",
"molecule": {
"directionalIcon": {
"size": "medium"
},
"moleculeName": "tilelet",
"subTitle": {
"text": "You are enrolled in Auto Pay & paper-free billing."
},
"title": {
"text": "Youre getting $50 off on your monthly bill."
},
"action": {
"actionType": "openPage",
"analyticsData": {
"vzdl.page.displayChannel": "mva",
"vzwi.mvmapp.pageTypeLink": "settingsLanding|Auto Pay discount",
"vzdl.page.id": "settingslanding",
"vzdl.page.linkName": "Auto Pay discount",
"vzdl.page.sourceChannel": "mva",
"vzdl.page.name": "settings landing"
},
"pageType": "managePmts",
"presentationStyle": "push",
"requestURL": "https://mobile-exp-qa2.vzw.com/mobile/nsa/nos/gw/launchapp/l2/webview",
"extraParameters": {
"pageTitle": "Auto Pay discount",
"screenHeading": "Auto Pay discount",
"browserUrl": "https://vzwqa2.verizonwireless.com/digital/nsa/secure/ui/payment/settings#/enrollAandP",
"locale": "EN",
"flowName": "accountsettings"
},
"title": "Auto Pay discount"
}
}
},
{
"moleculeName":"listItem",
"molecule": {
"moleculeName": "twoButtonView",
"primaryButton": {
"moleculeName": "button",
"title": "Edit",
"groupName": "default",
"action": {
"actionType": "openPage",
"pageType": "updateProfile",
"extraParameters": {
"from": "none"
},
"presentationStyle": "push"
}
}
}
},{
"moleculeName":"listItem",
"molecule": {
"moleculeName": "label",
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf"
}
},{
"moleculeName":"listItem",
"molecule": {
"moleculeName": "label",
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf"
}
},{
"moleculeName":"listItem",
"molecule": {
"moleculeName": "label",
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf\ndafsdssfafs"
}
},{
"moleculeName":"listItem",
"molecule": {
"moleculeName": "label",
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf\n\nadsfa\nadfs"
}
},{
"moleculeName":"listItem",
"molecule": {
"moleculeName": "label",
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafafttttt"
}
},{
"moleculeName":"listItem",
"molecule": {
"moleculeName": "label",
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf\n\nadsfa\nadfs"
}
},{
"moleculeName":"listItem",
"molecule": {
"moleculeName": "label",
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafafttttt"
}
}
],
"middle": {
}
}
}

View File

@ -0,0 +1,64 @@
{
"Page": {
"template": "stack",
"pageType": "moleculeStack",
"screenHeading": "Tilet Sample",
"hideFabOverlay": true,
"suppressPostLaunchRequests": false,
"tabBarHidden": true,
"header": {
"moleculeName": "header",
"molecule": {
"moleculeName": "headlineBody",
"headline": {
"moleculeName": "label",
"text": "Tilet Variations"
}
}
},
"stack": {
"moleculeName": "stack",
"molecules": [
{
"moleculeName": "stackItem",
"molecule":
{
"directionalIcon": {
"size": "medium"
},
"moleculeName": "tilelet",
"subTitle": {
"text": "You are enrolled in Auto Pay & paper-free billing."
},
"title": {
"text": "Youre getting $50 off on your monthly bill."
},
"action": {
"actionType": "openPage",
"analyticsData": {
"vzdl.page.displayChannel": "mva",
"vzwi.mvmapp.pageTypeLink": "settingsLanding|Auto Pay discount",
"vzdl.page.id": "settingslanding",
"vzdl.page.linkName": "Auto Pay discount",
"vzdl.page.sourceChannel": "mva",
"vzdl.page.name": "settings landing"
},
"pageType": "managePmts",
"presentationStyle": "push",
"requestURL": "https://mobile-exp-qa2.vzw.com/mobile/nsa/nos/gw/launchapp/l2/webview",
"extraParameters": {
"pageTitle": "Auto Pay discount",
"screenHeading": "Auto Pay discount",
"browserUrl": "https://vzwqa2.verizonwireless.com/digital/nsa/secure/ui/payment/settings#/enrollAandP",
"locale": "EN",
"flowName": "accountsettings"
},
"title": "Auto Pay discount"
}
}
}
]
},
"footer": {}
}
}

View File

@ -20,7 +20,7 @@ import VDS
Container: The background of the toggle control.
Knob: The circular indicator that slides on the container.
*/
open class TestToggle: ToggleBase, VDSMoleculeViewProtocol {
open class TestToggle: VDS.Toggle, VDSMoleculeViewProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
@ -33,30 +33,25 @@ open class TestToggle: ToggleBase, VDSMoleculeViewProtocol {
//--------------------------------------------------
public override func initialSetup() {
super.initialSetup()
publisher(for: .touchUpInside)
.sink {[weak self] toggle in
guard let self = self else { return }
self.toggle()
}.store(in: &subscribers)
publisher(for: .valueChanged)
.sink {[weak self] toggle in
guard let self = self else { return }
self.valueChanged(isOn: toggle.isOn)
}.store(in: &subscribers)
accessibilityLabelEnabled = MVMCoreUIUtility.hardcodedString(withKey: "Toggle_buttonlabel")
accessibilityLabelDisabled = MVMCoreUIUtility.hardcodedString(withKey: "Toggle_buttonlabel")
accessibilityHintEnabled = MVMCoreUIUtility.hardcodedString(withKey: "AccToggleHint")
accessibilityHintDisabled = MVMCoreUIUtility.hardcodedString(withKey: "AccDisabled")
accessibilityValueEnabled = MVMCoreUIUtility.hardcodedString(withKey: "AccOn")
accessibilityValueDisabled = MVMCoreUIUtility.hardcodedString(withKey: "AccOff")
}
// MARK:- MVMCoreViewProtocol
open func updateView(_ size: CGFloat) {}
override open func updateView() {
super.updateView()
//accessibility
accessibilityLabel = MVMCoreUIUtility.hardcodedString(withKey: "Toggle_buttonlabel")
accessibilityHint = isEnabled ? MVMCoreUIUtility.hardcodedString(withKey: "AccToggleHint") : MVMCoreUIUtility.hardcodedString(withKey: "AccDisabled")
accessibilityValue = isOn ? MVMCoreUIUtility.hardcodedString(withKey: "AccOn") : MVMCoreUIUtility.hardcodedString(withKey: "AccOff")
}
open func viewModelDidUpdate() {
guard let viewModel else { return }

View File

@ -1,6 +1,6 @@
mvm_core https://gitlab.verizon.com/BPHV_MIPS/mvm_core.git develop
mvm_core_ui https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui.git develop
mvm_core_ui https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui.git feature/ONEAPP-2811-Tilet
vds_ios https://gitlab.verizon.com/BPHV_MIPS/vds_ios.git develop