Merge branch 'feature/testing' into 'develop'
Feature/testing See merge request BPHV_MIPS/mvm_core_ui!286
This commit is contained in:
commit
52d7a31d49
@ -1072,7 +1072,6 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
525019E3240684E500EED91C /* FourColumn */,
|
525019E3240684E500EED91C /* FourColumn */,
|
||||||
52267A0523FFE0A900906CBA /* OneColumn */,
|
|
||||||
D22B38ED23F4E11100490EF6 /* ThreeColumn */,
|
D22B38ED23F4E11100490EF6 /* ThreeColumn */,
|
||||||
);
|
);
|
||||||
path = SectionDividers;
|
path = SectionDividers;
|
||||||
|
|||||||
@ -96,8 +96,8 @@ import UIKit
|
|||||||
super.layoutSubviews()
|
super.layoutSubviews()
|
||||||
|
|
||||||
// Ensures accessory view aligns to the center y derived from the
|
// Ensures accessory view aligns to the center y derived from the
|
||||||
if let center = heroAccessoryCenter {
|
if let _ = heroAccessoryCenter {
|
||||||
accessoryView?.center.y = center.y
|
alignAccessoryToHero()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public class ContainerModel: ContainerModelProtocol, Codable {
|
open class ContainerModel: ContainerModelProtocol, Codable {
|
||||||
public var horizontalAlignment: UIStackView.Alignment?
|
public var horizontalAlignment: UIStackView.Alignment?
|
||||||
public var verticalAlignment: UIStackView.Alignment?
|
public var verticalAlignment: UIStackView.Alignment?
|
||||||
public var useHorizontalMargins: Bool?
|
public var useHorizontalMargins: Bool?
|
||||||
@ -48,7 +48,7 @@ public class ContainerModel: ContainerModelProtocol, Codable {
|
|||||||
bottomMarginPadding = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .bottomMarginPadding)
|
bottomMarginPadding = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .bottomMarginPadding)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func encode(to encoder: Encoder) throws {
|
open func encode(to encoder: Encoder) throws {
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
try container.encodeIfPresent(ContainerHelper.getAlignmentString(for: verticalAlignment), forKey: .verticalAlignment)
|
try container.encodeIfPresent(ContainerHelper.getAlignmentString(for: verticalAlignment), forKey: .verticalAlignment)
|
||||||
try container.encodeIfPresent(ContainerHelper.getAlignmentString(for: horizontalAlignment), forKey: .horizontalAlignment)
|
try container.encodeIfPresent(ContainerHelper.getAlignmentString(for: horizontalAlignment), forKey: .horizontalAlignment)
|
||||||
|
|||||||
@ -8,8 +8,10 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public class ListLeftVariableCheckboxAllTextAndLinksModel: ListItemModel, MoleculeModelProtocol {
|
open class ListLeftVariableCheckboxAllTextAndLinksModel: ListItemModel, MoleculeModelProtocol {
|
||||||
public static var identifier: String = "listLVCB"
|
open class var identifier: String {
|
||||||
|
return "listLVCB"
|
||||||
|
}
|
||||||
public var checkbox: CheckboxModel
|
public var checkbox: CheckboxModel
|
||||||
public var eyebrowHeadlineBodyLink: EyebrowHeadlineBodyLinkModel
|
public var eyebrowHeadlineBodyLink: EyebrowHeadlineBodyLinkModel
|
||||||
|
|
||||||
|
|||||||
@ -12,8 +12,6 @@ import UIKit
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
var dropDownListItemModel: DropDownListItemModel?
|
|
||||||
let dropDown = ItemDropdownEntryField()
|
let dropDown = ItemDropdownEntryField()
|
||||||
var delegateObject: MVMCoreUIDelegateObject?
|
var delegateObject: MVMCoreUIDelegateObject?
|
||||||
var previousIndex = NSNotFound
|
var previousIndex = NSNotFound
|
||||||
@ -31,7 +29,7 @@ import UIKit
|
|||||||
guard newValue != oldValue,
|
guard newValue != oldValue,
|
||||||
let self = self,
|
let self = self,
|
||||||
let index = self.dropDown.pickerData.firstIndex(of: newValue),
|
let index = self.dropDown.pickerData.firstIndex(of: newValue),
|
||||||
let dropListItemJSON = self.dropDownListItemModel.toJSON(),
|
let dropListItemJSON = (self.listItemModel as? DropDownListItemModel).toJSON(),
|
||||||
let json2d = dropListItemJSON.optionalArrayForKey("molecules") as? [[[AnyHashable: Any]]]
|
let json2d = dropListItemJSON.optionalArrayForKey("molecules") as? [[[AnyHashable: Any]]]
|
||||||
else { return }
|
else { return }
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
@objcMembers public class ListItemModel: ContainerModel, ListItemModelProtocol {
|
@objcMembers open class ListItemModel: ContainerModel, ListItemModelProtocol {
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var action: ActionModelProtocol?
|
public var action: ActionModelProtocol?
|
||||||
public var hideArrow: Bool?
|
public var hideArrow: Bool?
|
||||||
@ -25,7 +25,7 @@ import Foundation
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Defaults to set
|
/// Defaults to set
|
||||||
public func setDefaults() {
|
open func setDefaults() {
|
||||||
if useHorizontalMargins == nil {
|
if useHorizontalMargins == nil {
|
||||||
useHorizontalMargins = true
|
useHorizontalMargins = true
|
||||||
}
|
}
|
||||||
@ -53,7 +53,7 @@ import Foundation
|
|||||||
setDefaults()
|
setDefaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func encode(to encoder: Encoder) throws {
|
open override func encode(to encoder: Encoder) throws {
|
||||||
try super.encode(to: encoder)
|
try super.encode(to: encoder)
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||||
|
|||||||
@ -13,11 +13,11 @@ import UIKit
|
|||||||
// MARK: - Outlets
|
// MARK: - Outlets
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
let stack = Stack<StackModel>(frame: .zero)
|
public let stack = Stack<StackModel>(frame: .zero)
|
||||||
let eyebrow = Label.commonLabelB3(true)
|
public let eyebrow = Label.commonLabelB3(true)
|
||||||
let headline = Label.commonLabelB1(true)
|
public let headline = Label.commonLabelB1(true)
|
||||||
let body = Label.commonLabelB2(true)
|
public let body = Label.commonLabelB2(true)
|
||||||
let link = Link()
|
public let link = Link()
|
||||||
|
|
||||||
var casteModel: EyebrowHeadlineBodyLinkModel? {
|
var casteModel: EyebrowHeadlineBodyLinkModel? {
|
||||||
get { return model as? EyebrowHeadlineBodyLinkModel }
|
get { return model as? EyebrowHeadlineBodyLinkModel }
|
||||||
@ -72,7 +72,7 @@ import UIKit
|
|||||||
stack.restack()
|
stack.restack()
|
||||||
}
|
}
|
||||||
|
|
||||||
public override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||||
return 65
|
return 65
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
open class MoleculeStackView: Stack<MoleculeStackModel> {
|
open class MoleculeStackView: Stack<MoleculeStackModel> {
|
||||||
override var stackModel: MoleculeStackModel? {
|
open override var stackModel: MoleculeStackModel? {
|
||||||
get { return model as? MoleculeStackModel }
|
get { return model as? MoleculeStackModel }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,11 +14,11 @@ open class Stack<T>: Container where T: (StackModelProtocol & MoleculeModelProto
|
|||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
var contentView: UIView = MVMCoreUICommonViewsUtility.commonView()
|
open var contentView: UIView = MVMCoreUICommonViewsUtility.commonView()
|
||||||
var stackModel: T? {
|
open var stackModel: T? {
|
||||||
get { return model as? T }
|
get { return model as? T }
|
||||||
}
|
}
|
||||||
var stackItems: [UIView] = []
|
open var stackItems: [UIView] = []
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Helpers
|
// MARK: - Helpers
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user