moved around

This commit is contained in:
Kevin G Christiano 2021-02-10 13:02:01 -05:00
parent ebfedb351c
commit ee95db5116
11 changed files with 73 additions and 21 deletions

View File

@ -62,6 +62,8 @@
01EB369323609801006832FA /* HeaderModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368C23609801006832FA /* HeaderModel.swift */; };
01EB369423609801006832FA /* HeadlineBodyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368D23609801006832FA /* HeadlineBodyModel.swift */; };
01F2A03223A4498200D954D8 /* CaretLinkModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F2A03123A4498200D954D8 /* CaretLinkModel.swift */; };
0A0FEC7425D42A5E00AF2548 /* BaseItemPickerField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A0FEC7325D42A5E00AF2548 /* BaseItemPickerField.swift */; };
0A0FEC7825D42A8500AF2548 /* BaseItemPickerFieldModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A0FEC7725D42A8500AF2548 /* BaseItemPickerFieldModel.swift */; };
0A1214A022C11A18007C7030 /* ActionDetailWithImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A12149F22C11A17007C7030 /* ActionDetailWithImage.swift */; };
0A1B4A96233BB18F005B3FB4 /* CheckboxLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7BAFA2232BE63400FB8E22 /* CheckboxLabel.swift */; };
0A21DB7F235DECC500C160A2 /* EntryField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A21DB7E235DECC500C160A2 /* EntryField.swift */; };
@ -94,7 +96,7 @@
0A7EF85D23D8A95600B2AAD1 /* TextEntryFieldModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7EF85C23D8A95600B2AAD1 /* TextEntryFieldModel.swift */; };
0A7EF85F23D8ABC500B2AAD1 /* MdnEntryFieldModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7EF85E23D8ABC500B2AAD1 /* MdnEntryFieldModel.swift */; };
0A7EF86123D8AC2500B2AAD1 /* DigitEntryFieldModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7EF86023D8AC2500B2AAD1 /* DigitEntryFieldModel.swift */; };
0A7EF86323D8AFA000B2AAD1 /* BaseDropdownEntryFieldModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7EF86223D8AFA000B2AAD1 /* BaseDropdownEntryFieldModel.swift */; };
0A7EF86323D8AFA000B2AAD1 /* BaseDropdownFieldModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7EF86223D8AFA000B2AAD1 /* BaseDropdownFieldModel.swift */; };
0A7EF86523D8AFFF00B2AAD1 /* ItemDropdownEntryFieldModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7EF86423D8AFFF00B2AAD1 /* ItemDropdownEntryFieldModel.swift */; };
0A7EF86723D8B0AE00B2AAD1 /* DateDropdownEntryFieldModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7EF86623D8B0AE00B2AAD1 /* DateDropdownEntryFieldModel.swift */; };
0A849EFE246F1775009F277F /* RuleEqualsIgnoreCaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A849EFD246F1775009F277F /* RuleEqualsIgnoreCaseModel.swift */; };
@ -607,6 +609,8 @@
01EB368C23609801006832FA /* HeaderModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeaderModel.swift; sourceTree = "<group>"; };
01EB368D23609801006832FA /* HeadlineBodyModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeadlineBodyModel.swift; sourceTree = "<group>"; };
01F2A03123A4498200D954D8 /* CaretLinkModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CaretLinkModel.swift; sourceTree = "<group>"; };
0A0FEC7325D42A5E00AF2548 /* BaseItemPickerField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseItemPickerField.swift; sourceTree = "<group>"; };
0A0FEC7725D42A8500AF2548 /* BaseItemPickerFieldModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseItemPickerFieldModel.swift; sourceTree = "<group>"; };
0A12149F22C11A17007C7030 /* ActionDetailWithImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActionDetailWithImage.swift; sourceTree = "<group>"; };
0A209CD223A7E2810068F8B0 /* UIStackViewAlignment+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIStackViewAlignment+Extension.swift"; sourceTree = "<group>"; };
0A21DB7E235DECC500C160A2 /* EntryField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryField.swift; sourceTree = "<group>"; };
@ -640,7 +644,7 @@
0A7EF85C23D8A95600B2AAD1 /* TextEntryFieldModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextEntryFieldModel.swift; sourceTree = "<group>"; };
0A7EF85E23D8ABC500B2AAD1 /* MdnEntryFieldModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MdnEntryFieldModel.swift; sourceTree = "<group>"; };
0A7EF86023D8AC2500B2AAD1 /* DigitEntryFieldModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DigitEntryFieldModel.swift; sourceTree = "<group>"; };
0A7EF86223D8AFA000B2AAD1 /* BaseDropdownEntryFieldModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseDropdownEntryFieldModel.swift; sourceTree = "<group>"; };
0A7EF86223D8AFA000B2AAD1 /* BaseDropdownFieldModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseDropdownFieldModel.swift; sourceTree = "<group>"; };
0A7EF86423D8AFFF00B2AAD1 /* ItemDropdownEntryFieldModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemDropdownEntryFieldModel.swift; sourceTree = "<group>"; };
0A7EF86623D8B0AE00B2AAD1 /* DateDropdownEntryFieldModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateDropdownEntryFieldModel.swift; sourceTree = "<group>"; };
0A8321AE2355FE9500CB7F00 /* DigitBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DigitBox.swift; sourceTree = "<group>"; };
@ -1176,16 +1180,34 @@
0A0FEC7125D4246000AF2548 /* Dropdown Fields */ = {
isa = PBXGroup;
children = (
0A7EF86223D8AFA000B2AAD1 /* BaseDropdownEntryFieldModel.swift */,
0A7EF86223D8AFA000B2AAD1 /* BaseDropdownFieldModel.swift */,
0A6BF4712360C56C0028F841 /* BaseDropdownEntryField.swift */,
0A7EF86623D8B0AE00B2AAD1 /* DateDropdownEntryFieldModel.swift */,
0ABD136C237CAD1E0081388D /* DateDropdownEntryField.swift */,
0A0FEC8D25D4487F00AF2548 /* Date Dropdown */,
0A0FEC8A25D4486F00AF2548 /* Item Dropdown */,
);
path = "Dropdown Fields";
sourceTree = "<group>";
};
0A0FEC8A25D4486F00AF2548 /* Item Dropdown */ = {
isa = PBXGroup;
children = (
0A0FEC7725D42A8500AF2548 /* BaseItemPickerFieldModel.swift */,
0A0FEC7325D42A5E00AF2548 /* BaseItemPickerField.swift */,
0A7EF86423D8AFFF00B2AAD1 /* ItemDropdownEntryFieldModel.swift */,
0ABD1370237DB0450081388D /* ItemDropdownEntryField.swift */,
0AE277EB25D2EE310048A38D /* MultiItemDropdownEntryFieldModel.swift */,
0AE277E825D2ED4B0048A38D /* MultiItemDropdownEntryField.swift */,
);
path = "Dropdown Fields";
path = "Item Dropdown";
sourceTree = "<group>";
};
0A0FEC8D25D4487F00AF2548 /* Date Dropdown */ = {
isa = PBXGroup;
children = (
0A7EF86623D8B0AE00B2AAD1 /* DateDropdownEntryFieldModel.swift */,
0ABD136C237CAD1E0081388D /* DateDropdownEntryField.swift */,
);
path = "Date Dropdown";
sourceTree = "<group>";
};
0A5D59C323AD488600EFD9E9 /* Protocols */ = {
@ -2582,6 +2604,7 @@
D2CAC7CB251104E100C75681 /* NotificationXButtonModel.swift in Sources */,
014AA73123C5059B006F3E93 /* ListPageTemplateModel.swift in Sources */,
AAC23FAF24D92A1E009208DF /* ListThreeColumnSpeedTest.swift in Sources */,
0A0FEC7425D42A5E00AF2548 /* BaseItemPickerField.swift in Sources */,
D29DF2A221E7AF4E003B2FB9 /* MVMCoreUIUtility.m in Sources */,
D29DF12B21E6851E003B2FB9 /* MVMCoreUITopAlertExpandableView.m in Sources */,
D2ED27ED254B0CE700A1C293 /* ActionPopupModel.swift in Sources */,
@ -2697,6 +2720,7 @@
BB55B51D244482C1002001AD /* ListRightVariablePriceChangeBodyText.swift in Sources */,
017BEB382360C6AC0024EF95 /* RadioButtonLabel.swift in Sources */,
323AC96C24C837FF00F8E4C4 /* ListThreeColumnBillChanges.swift in Sources */,
0A0FEC7825D42A8500AF2548 /* BaseItemPickerFieldModel.swift in Sources */,
D28A837923C7D5BC00DFE4FC /* PageModelProtocol.swift in Sources */,
D2351C7C24A4D4C3007DF0BC /* ListRightVariableToggleAllTextAndLinks.swift in Sources */,
017BEB7B236763000024EF95 /* LineModel.swift in Sources */,
@ -2879,7 +2903,7 @@
D2D2FCF0252B72AF0033EAAA /* MoleculeSectionFooterModel.swift in Sources */,
BB1D17E2244EAA46001D2002 /* ListDeviceComplexButtonMedium.swift in Sources */,
D2FA83D42514F80C00564112 /* CollapsableNotification.swift in Sources */,
0A7EF86323D8AFA000B2AAD1 /* BaseDropdownEntryFieldModel.swift in Sources */,
0A7EF86323D8AFA000B2AAD1 /* BaseDropdownFieldModel.swift in Sources */,
0A1214A022C11A18007C7030 /* ActionDetailWithImage.swift in Sources */,
D236E5B5241FEB1000C38625 /* ListTwoColumnPriceDescriptionModel.swift in Sources */,
D2B18B922361E65A00A9AEDC /* CoreUIObject.swift in Sources */,

View File

@ -1,5 +1,5 @@
//
// BaseDropdownEntryField.swift
// BaseDropdownField.swift
// MVMCoreUI
//
// Created by Kevin Christiano on 10/23/19.
@ -12,7 +12,7 @@ import UIKit
This class is intended to be subclassed.
See ItemDropdownEntryField and DateDropdownEntryField.
*/
@objcMembers open class BaseDropdownEntryField: TextEntryField {
@objcMembers open class BaseDropdownField: TextEntryField {
//--------------------------------------------------
// MARK: - Outlets
//--------------------------------------------------

View File

@ -9,7 +9,7 @@
import UIKit
@objcMembers open class DateDropdownEntryField: BaseDropdownEntryField {
@objcMembers open class DateDropdownEntryField: BaseDropdownField {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------

View File

@ -0,0 +1,15 @@
//
// ItemPickerDropdownField.swift
// MVMCoreUI
//
// Created by Kevin Christiano on 2/10/21.
// Copyright © 2021 Verizon Wireless. All rights reserved.
//
import UIKit
class BaseItemPickerField: BaseDropdownField {
}

View File

@ -0,0 +1,13 @@
//
// BaseItemPickerFieldModel.swift
// MVMCoreUI
//
// Created by Kevin Christiano on 2/10/21.
// Copyright © 2021 Verizon Wireless. All rights reserved.
//
import UIKit
class BaseItemPickerFieldModel: BaseDropdownEntryFieldModel {
}

View File

@ -1,5 +1,5 @@
//
// ItemDropdownEntryField.swift
// ItemDropdownField.swift
// MVMCoreUI
//
// Created by Kevin Christiano on 11/14/19.
@ -11,7 +11,7 @@ import UIKit
public typealias TextFieldAndPickerDelegate = (UITextFieldDelegate & UIPickerViewDelegate & UIPickerViewDataSource)
open class ItemDropdownEntryField: BaseDropdownEntryField {
open class ItemDropdownEntryField: BaseDropdownField {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------

View File

@ -9,7 +9,7 @@
import UIKit
open class MultiItemDropdownEntryField: BaseDropdownEntryField {
open class MultiItemDropdownEntryField: BaseDropdownField {
//--------------------------------------------------
// MARK: - Outlets
//--------------------------------------------------
@ -22,7 +22,7 @@ open class MultiItemDropdownEntryField: BaseDropdownEntryField {
/// Datasource of the picker view.
open var pickerComponents: [[String]] {
dropdownModel?.options ?? [[]]
dropdownModel?.components ?? [[]]
}
/// When selecting for first responder, allow initial selected value to appear in empty text field.

View File

@ -16,7 +16,7 @@ import Foundation
public override class var identifier: String { "multiDropdown" }
public var options: [[String]] = [[]]
public var components: [[String]] = [[]]
public var selectedIndexes: [Int: Int] = [:]
//--------------------------------------------------
@ -25,7 +25,7 @@ import Foundation
public override func formFieldValue() -> AnyHashable? {
guard !options.isEmpty && !selectedIndexes.isEmpty else { return nil }
guard !components.isEmpty && !selectedIndexes.isEmpty else { return nil }
return selectedRowText
}
@ -35,9 +35,9 @@ import Foundation
var text = ""
for i in 0..<options.count {
for i in 0..<components.count {
let pickerIndex = selectedIndexes[i] ?? 0
text += options[i][pickerIndex] + (i == options.count - 1 ? "" : " ")
text += components[i][pickerIndex] + (i == components.count - 1 ? "" : " ")
}
return text
@ -60,7 +60,7 @@ import Foundation
//--------------------------------------------------
private enum CodingKeys: String, CodingKey {
case options
case components
case selectedIndex // Deprecated: for backwards compatability
case selectedIndexes
}
@ -73,7 +73,7 @@ import Foundation
try super.init(from: decoder)
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
options = try typeContainer.decode([[String]].self, forKey: .options)
components = try typeContainer.decode([[String]].self, forKey: .components)
if let indicies = try typeContainer.decodeIfPresent([Int].self, forKey: .selectedIndexes) {
for (component, index) in indicies.enumerated() {
@ -87,7 +87,7 @@ import Foundation
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(options, forKey: .options)
try container.encode(components, forKey: .components)
try container.encode(selectedIndexesArray, forKey: .selectedIndexes)
}
}