updated sample
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
7d3fef48c4
commit
394a21bf53
@ -19,46 +19,67 @@
|
|||||||
"stack": {
|
"stack": {
|
||||||
"moleculeName": "stack",
|
"moleculeName": "stack",
|
||||||
"molecules": [
|
"molecules": [
|
||||||
{
|
{
|
||||||
"moleculeName": "stackItem",
|
"moleculeName": "stackItem",
|
||||||
"molecule": {
|
"molecule": {
|
||||||
"moleculeName": "toggle",
|
"moleculeName": "textView",
|
||||||
"fieldKey": "isActive"
|
"fieldKey": "firstName",
|
||||||
}
|
"type": "text",
|
||||||
},
|
"errorMessage": "Please enter a valid first name.",
|
||||||
{
|
"placeholder": "John A",
|
||||||
"moleculeName": "stackItem",
|
"titleLabel": {
|
||||||
"molecule": {
|
"moleculeName": "label",
|
||||||
"moleculeName":"labelToggle",
|
"text": "First Name"
|
||||||
"label":{
|
|
||||||
"moleculeName": "label",
|
|
||||||
"text":"Label Text Goes Here"
|
|
||||||
},
|
|
||||||
"toggle":{
|
|
||||||
"moleculeName": "toggle"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moleculeName": "stackItem",
|
|
||||||
"molecule": {
|
|
||||||
"moleculeName":"headlineBodyToggle",
|
|
||||||
"headlineBody":{
|
|
||||||
"moleculeName": "headlineBody",
|
|
||||||
"headline":{
|
|
||||||
"moleculeName": "label",
|
|
||||||
"text": "Headline Text Goes Here"
|
|
||||||
},
|
|
||||||
"body":{
|
|
||||||
"moleculeName": "label",
|
|
||||||
"text": "Body Text Goes Here"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"toggle":{
|
|
||||||
"moleculeName": "toggle"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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": {
|
"footer": {
|
||||||
@ -84,7 +105,36 @@
|
|||||||
{
|
{
|
||||||
"groupName": "default",
|
"groupName": "default",
|
||||||
"rules": [
|
"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"
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
110
JSONCreator_iOS/JSONCreator/JSON/Samples/TileleListSample.json
Normal file
110
JSONCreator_iOS/JSONCreator/JSON/Samples/TileleListSample.json
Normal 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": "You’re 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": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
64
JSONCreator_iOS/JSONCreator/JSON/Samples/TileletSample.json
Normal file
64
JSONCreator_iOS/JSONCreator/JSON/Samples/TileletSample.json
Normal 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": "You’re 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": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"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": {
|
|
||||||
"moleculeName": "tilet",
|
|
||||||
"surface": "light",
|
|
||||||
"title": {
|
|
||||||
"text": "Save $XX on your monthly bill.",
|
|
||||||
"typographicalStyle": "BoldTitleSmall"
|
|
||||||
},
|
|
||||||
"subTitle": {
|
|
||||||
"text": "Enroll in Auto Pay & paper-free billing to save on your monthly bill.",
|
|
||||||
"typographicalStyle": "BodySmall",
|
|
||||||
"textColor": "primary"
|
|
||||||
},
|
|
||||||
"directionalIcon": {
|
|
||||||
"size": "medium",
|
|
||||||
"surface": "dark"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"footer": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -20,7 +20,7 @@ import VDS
|
|||||||
Container: The background of the toggle control.
|
Container: The background of the toggle control.
|
||||||
Knob: The circular indicator that slides on the container.
|
Knob: The circular indicator that slides on the container.
|
||||||
*/
|
*/
|
||||||
open class TestToggle: ToggleBase, VDSMoleculeViewProtocol {
|
open class TestToggle: VDS.Toggle, VDSMoleculeViewProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -33,30 +33,25 @@ open class TestToggle: ToggleBase, VDSMoleculeViewProtocol {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
public override func initialSetup() {
|
public override func initialSetup() {
|
||||||
super.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)
|
publisher(for: .valueChanged)
|
||||||
.sink {[weak self] toggle in
|
.sink {[weak self] toggle in
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
self.valueChanged(isOn: toggle.isOn)
|
self.valueChanged(isOn: toggle.isOn)
|
||||||
}.store(in: &subscribers)
|
}.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
|
// MARK:- MVMCoreViewProtocol
|
||||||
open func updateView(_ size: CGFloat) {}
|
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() {
|
open func viewModelDidUpdate() {
|
||||||
guard let viewModel else { return }
|
guard let viewModel else { return }
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user