From a671765e80a4a04db6f9305d2e740f324cf4b81a Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 23 Aug 2022 12:54:57 -0500 Subject: [PATCH] moved selectable into own protocol Signed-off-by: Matt Bruce --- VDS.xcodeproj/project.pbxproj | 16 ++++++++++++++++ VDS/Components/Selector/SelectorModel.swift | 4 ---- VDS/Protocols/Selectable.swift | 12 ++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 VDS/Protocols/Selectable.swift diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index 82246022..9f854c25 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -41,6 +41,8 @@ EA89200428AECF4B006B9984 /* UITextField+Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA89200328AECF4B006B9984 /* UITextField+Publisher.swift */; }; EA89200628B526D6006B9984 /* CheckboxGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA89200528B526D6006B9984 /* CheckboxGroup.swift */; }; EA89200828B526E0006B9984 /* CheckboxGroupModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA89200728B526E0006B9984 /* CheckboxGroupModel.swift */; }; + EA89200D28B530FD006B9984 /* RadioBoxModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA89200C28B530FD006B9984 /* RadioBoxModel.swift */; }; + EA89200F28B53921006B9984 /* Selectable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA89200E28B53921006B9984 /* Selectable.swift */; }; EAB1D29428A3ECF700DAE764 /* SelectorGroupBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAF7F13028A17FAB00B287F5 /* SelectorGroupBase.swift */; }; EAB1D29A28A5611D00DAE764 /* SelectorGroupModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D29928A5611D00DAE764 /* SelectorGroupModel.swift */; }; EAB1D29C28A5618900DAE764 /* RadioButtonGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D29B28A5618900DAE764 /* RadioButtonGroup.swift */; }; @@ -128,6 +130,8 @@ EA89200328AECF4B006B9984 /* UITextField+Publisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextField+Publisher.swift"; sourceTree = ""; }; EA89200528B526D6006B9984 /* CheckboxGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckboxGroup.swift; sourceTree = ""; }; EA89200728B526E0006B9984 /* CheckboxGroupModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckboxGroupModel.swift; sourceTree = ""; }; + EA89200C28B530FD006B9984 /* RadioBoxModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioBoxModel.swift; sourceTree = ""; }; + EA89200E28B53921006B9984 /* Selectable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Selectable.swift; sourceTree = ""; }; EAB1D29928A5611D00DAE764 /* SelectorGroupModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectorGroupModel.swift; sourceTree = ""; }; EAB1D29B28A5618900DAE764 /* RadioButtonGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioButtonGroup.swift; sourceTree = ""; }; EAB1D29D28A5619500DAE764 /* RadioButtonGroupModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioButtonGroupModel.swift; sourceTree = ""; }; @@ -252,6 +256,7 @@ EA33619D288B1E330071C351 /* Components */ = { isa = PBXGroup; children = ( + EA89200B28B530F0006B9984 /* RadioBox */, EAF7F11428A1470D00B287F5 /* RadioButton */, EAF7F092289985E200B287F5 /* Checkbox */, EA3361A0288B1E6F0071C351 /* Toggle */, @@ -297,6 +302,7 @@ EAF7F0BA289D80ED00B287F5 /* Modelable.swift */, EA3361BE288B2EA60071C351 /* ModelHandlerable.swift */, EAF7F0A5289B0CE000B287F5 /* Resetable.swift */, + EA89200E28B53921006B9984 /* Selectable.swift */, EA3361C8289054C50071C351 /* Surfaceable.swift */, EA3361B7288B2AAA0071C351 /* ViewProtocol.swift */, EAB1D2CC28ABE76000DAE764 /* Withable.swift */, @@ -361,6 +367,14 @@ path = Label; sourceTree = ""; }; + EA89200B28B530F0006B9984 /* RadioBox */ = { + isa = PBXGroup; + children = ( + EA89200C28B530FD006B9984 /* RadioBoxModel.swift */, + ); + path = RadioBox; + sourceTree = ""; + }; EAB1D29F28A598D000DAE764 /* PropertyWrappers */ = { isa = PBXGroup; children = ( @@ -559,6 +573,7 @@ EAF7F12C28A1617600B287F5 /* SelectorBase.swift in Sources */, EAF7F0A0289AB7EC00B287F5 /* View.swift in Sources */, EAF7F11828A1475A00B287F5 /* RadioButtonModel.swift in Sources */, + EA89200D28B530FD006B9984 /* RadioBoxModel.swift in Sources */, EAF7F12F28A1619600B287F5 /* SelectorModel.swift in Sources */, EA3362402892EF6C0071C351 /* Label.swift in Sources */, EAF7F0B3289B1ADC00B287F5 /* LabelAttributeAction.swift in Sources */, @@ -583,6 +598,7 @@ EA3361BD288B2C760071C351 /* TypeAlias.swift in Sources */, EAB1D2CF28ABEF2B00DAE764 /* Typography.swift in Sources */, EAF7F09A2899B17200B287F5 /* CATransaction.swift in Sources */, + EA89200F28B53921006B9984 /* Selectable.swift in Sources */, EAB1D29E28A5619500DAE764 /* RadioButtonGroupModel.swift in Sources */, EAF7F0A2289AFB3900B287F5 /* Errorable.swift in Sources */, EA3C3B4C2894823E000CA526 /* AnyProxy.swift in Sources */, diff --git a/VDS/Components/Selector/SelectorModel.swift b/VDS/Components/Selector/SelectorModel.swift index 83c7cd5f..4cf59732 100644 --- a/VDS/Components/Selector/SelectorModel.swift +++ b/VDS/Components/Selector/SelectorModel.swift @@ -7,10 +7,6 @@ import Foundation -public protocol Selectable { - var selected: Bool { get set } -} - public protocol SelectorModel: Modelable, FormFieldable, Errorable, DataTrackable, Accessable, Selectable { var labelText: String? { get set } var labelTextAttributes: [LabelAttributeModel]? { get set } diff --git a/VDS/Protocols/Selectable.swift b/VDS/Protocols/Selectable.swift new file mode 100644 index 00000000..fa7777cd --- /dev/null +++ b/VDS/Protocols/Selectable.swift @@ -0,0 +1,12 @@ +// +// Selectable.swift +// VDS +// +// Created by Matt Bruce on 8/23/22. +// + +import Foundation + +public protocol Selectable { + var selected: Bool { get set } +}