Digital ACT-191 ONEAPP-6827 story: removed unused and commented code.
This commit is contained in:
parent
87bb4eac1e
commit
e7e4fadbdb
@ -33,7 +33,6 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1832AC5B2BA1347B008AE476 /* BreadcrumbsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1832AC5A2BA1347B008AE476 /* BreadcrumbsViewController.swift */; };
|
||||
1832AC5D2BA13499008AE476 /* BreadcrumbItemViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1832AC5C2BA13499008AE476 /* BreadcrumbItemViewController.swift */; };
|
||||
445BA07A29C088470036A7C5 /* NotificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445BA07929C088470036A7C5 /* NotificationViewController.swift */; };
|
||||
44604AD929CE1CF900E62B51 /* LineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44604AD829CE1CF900E62B51 /* LineViewController.swift */; };
|
||||
5FC35BE928D5235A004EBEAC /* ButtonViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FC35BE828D5235A004EBEAC /* ButtonViewController.swift */; };
|
||||
@ -130,7 +129,6 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1832AC5A2BA1347B008AE476 /* BreadcrumbsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreadcrumbsViewController.swift; sourceTree = "<group>"; };
|
||||
1832AC5C2BA13499008AE476 /* BreadcrumbItemViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreadcrumbItemViewController.swift; sourceTree = "<group>"; };
|
||||
445BA07929C088470036A7C5 /* NotificationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationViewController.swift; sourceTree = "<group>"; };
|
||||
44604AD829CE1CF900E62B51 /* LineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LineViewController.swift; sourceTree = "<group>"; };
|
||||
5FC35BE828D5235A004EBEAC /* ButtonViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonViewController.swift; sourceTree = "<group>"; };
|
||||
@ -318,7 +316,6 @@
|
||||
EAB1D2C828AAAA1D00DAE764 /* BaseViewController.swift */,
|
||||
EA4DB30328DCD25B00103EE3 /* BadgeViewController.swift */,
|
||||
EAD062AC2A3B86950015965D /* BadgeIndicatorViewController.swift */,
|
||||
1832AC5C2BA13499008AE476 /* BreadcrumbItemViewController.swift */,
|
||||
1832AC5A2BA1347B008AE476 /* BreadcrumbsViewController.swift */,
|
||||
EA81410D2A0ED8DC004F60D2 /* ButtonIconViewController.swift */,
|
||||
EAB5FEEE2927E28400998C17 /* ButtonGroupViewController.swift */,
|
||||
@ -506,7 +503,6 @@
|
||||
EA5E3050294D11540082B959 /* TileContainerViewController.swift in Sources */,
|
||||
445BA07A29C088470036A7C5 /* NotificationViewController.swift in Sources */,
|
||||
EAEEEC942B1F824500531FC2 /* Bundle.swift in Sources */,
|
||||
1832AC5D2BA13499008AE476 /* BreadcrumbItemViewController.swift in Sources */,
|
||||
EAF7F11A28A14A0E00B287F5 /* RadioButtonGroupViewController.swift in Sources */,
|
||||
EA89204628B66CE2006B9984 /* ScrollViewController.swift in Sources */,
|
||||
EA471F402A97BEAA00CE9E58 /* CustomRotorable.swift in Sources */,
|
||||
|
||||
@ -1,82 +0,0 @@
|
||||
//
|
||||
// BreadcrumbItemViewController.swift
|
||||
// VDSSample
|
||||
//
|
||||
// Created by Kanamarlapudi, Vasavi on 11/03/24.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDS
|
||||
import VDSColorTokens
|
||||
|
||||
class BreadcrumbItemViewController: BaseViewController<BreadcrumbItem> {
|
||||
|
||||
var label = Label()
|
||||
var disabledSwitch = Toggle()
|
||||
var selectedSwitch = Toggle()
|
||||
var textField = TextField()
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
addContentTopView(view: .makeWrapper(for: component, edgeSpacing: 16.0), edgeSpacing: 0.0)
|
||||
|
||||
setupPicker()
|
||||
setupModel()
|
||||
}
|
||||
|
||||
override func allTextFields() -> [TextField]? { [textField] }
|
||||
|
||||
override func setupForm(){
|
||||
super.setupForm()
|
||||
addFormRow(label: "Action", view: label)
|
||||
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
||||
addFormRow(label: "Disabled", view: disabledSwitch)
|
||||
addFormRow(label: "Label", view: textField)
|
||||
addFormRow(label: "selected", view: selectedSwitch)
|
||||
|
||||
disabledSwitch.onChange = { [weak self] sender in
|
||||
self?.component.isEnabled = !sender.isOn
|
||||
}
|
||||
|
||||
selectedSwitch.onChange = { [weak self] sender in
|
||||
guard let self else { return }
|
||||
self.component.selectable = !self.component.selectable
|
||||
}
|
||||
|
||||
textField
|
||||
.textPublisher
|
||||
.sink { [weak self] text in
|
||||
self?.component.text = text
|
||||
}.store(in: &subscribers)
|
||||
}
|
||||
|
||||
func setupModel() {
|
||||
component.text = "Billing statement FAQs"
|
||||
component.labelPublisher(label)
|
||||
// component.selectable = selectedSwitch.isOn
|
||||
|
||||
//setup UI
|
||||
surfacePickerSelectorView.text = component.surface.rawValue
|
||||
disabledSwitch.isOn = !component.isEnabled
|
||||
// selectedSwitch.isOn = !component.isSelected
|
||||
textField.text = component.text
|
||||
}
|
||||
|
||||
func setupPicker(){
|
||||
|
||||
surfacePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||
self?.component.surface = item
|
||||
self?.contentTopView.backgroundColor = item.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension BreadcrumbItemViewController: ComponentSampleable {
|
||||
static func makeSample() -> ComponentSample {
|
||||
let component = Self.makeComponent()
|
||||
component.text = "Billing statement FAQs"
|
||||
component.onClick = { c in print("\(c.text!) Click")}
|
||||
return ComponentSample(component: component, trailingPinningType: .lessThanOrEqual)
|
||||
}
|
||||
}
|
||||
@ -14,7 +14,6 @@ import Combine
|
||||
class BreadcrumbsViewController: BaseViewController<Breadcrumbs> {
|
||||
|
||||
var selectedSwitch = Toggle()
|
||||
let breadCrumbs = Breadcrumbs()
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
@ -41,22 +40,19 @@ class BreadcrumbsViewController: BaseViewController<Breadcrumbs> {
|
||||
|
||||
selectedSwitch.onChange = { [weak self] sender in
|
||||
guard let self else { return }
|
||||
// self.component.selected = !self.component.selected
|
||||
let label = actionLabel
|
||||
print("switch flag: \(sender.isOn)")
|
||||
component.breadcrumbItems = [
|
||||
makeBreadcrumbItem("Home", label: label).with{ $0.link = "https://www.verizon.com/" },
|
||||
makeBreadcrumbItem("Support", label: label).with{ $0.link = "https://www.verizon.com/"; $0.selectable = false },
|
||||
makeBreadcrumbItem("Servie & Apps", label: label).with{ $0.link = "https://www.verizon.com/" },
|
||||
makeBreadcrumbItem("My Verizon", label: label).with{ $0.link = "https://www.verizon.com/"; $0.selectable = false },
|
||||
makeBreadcrumbItem("Bill", label: label).with{ $0.link = "https://www.verizon.com/" },
|
||||
makeBreadcrumbItem("Bill History ", label: label).with{ $0.link = "https://www.verizon.com/"; $0.selectable = sender.isOn}
|
||||
makeBreadcrumbItem("Billing statement FAQs", label: label).with{ $0.link = "https://www.verizon.com/"; $0.selectable = sender.isOn}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
func setupPicker(){
|
||||
|
||||
surfacePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||
self?.component.surface = item
|
||||
self?.contentTopView.backgroundColor = item.color
|
||||
@ -69,19 +65,3 @@ class BreadcrumbsViewController: BaseViewController<Breadcrumbs> {
|
||||
surfacePickerSelectorView.text = component.surface.rawValue
|
||||
}
|
||||
}
|
||||
//
|
||||
//extension BreadcrumbsViewController: ComponentSampleable {
|
||||
// static func makeSample() -> ComponentSample {
|
||||
// let component = Self.makeComponent()
|
||||
// let onClick: (ButtonBase) -> Void = { button in print("\(button.text!) clicked")}
|
||||
// component.breadcrumbItems = [
|
||||
// BreadcrumbItem().with { $0.text = "Home"; $0.onClick = onClick },
|
||||
// BreadcrumbItem().with { $0.text = "Support"; $0.onClick = onClick },
|
||||
// BreadcrumbItem().with { $0.text = "Servie & Apps"; $0.onClick = onClick },
|
||||
// BreadcrumbItem().with { $0.text = "My Verizon"; $0.onClick = onClick },
|
||||
// BreadcrumbItem().with { $0.text = "Bill"; $0.onClick = onClick },
|
||||
// BreadcrumbItem().with { $0.text = "Billing statement FAQs"; $0.onClick = onClick }
|
||||
// ]
|
||||
// return ComponentSample(component: component)
|
||||
// }
|
||||
//}
|
||||
|
||||
@ -70,7 +70,6 @@ class MenuViewController: UITableViewController, TooltipLaunchable {
|
||||
MenuComponent(title: "TableView Tester", completed: true, viewController: TableViewTestController.self),
|
||||
MenuComponent(title: "Badge", completed: true, viewController: BadgeViewController.self),
|
||||
MenuComponent(title: "Badge Indicator", completed: true, viewController: BadgeIndicatorViewController.self),
|
||||
MenuComponent(title: "Breadcrumb Item", completed: false, viewController: BreadcrumbItemViewController.self),
|
||||
MenuComponent(title: "Breadcrumbs", completed: false, viewController: BreadcrumbsViewController.self),
|
||||
MenuComponent(title: "Button", completed: true, viewController: ButtonViewController.self),
|
||||
MenuComponent(title: "ButtonGroup", completed: true, viewController: ButtonGroupViewController.self),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user