Merge branch 'mbruce/bugfix' into 'develop'
Build 1.0.71 merge See merge request BPHV_MIPS/vds_ios!273
This commit is contained in:
commit
af58e43f6c
@ -1557,7 +1557,7 @@
|
|||||||
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
||||||
CODE_SIGN_IDENTITY = "";
|
CODE_SIGN_IDENTITY = "";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 70;
|
CURRENT_PROJECT_VERSION = 71;
|
||||||
DEFINES_MODULE = YES;
|
DEFINES_MODULE = YES;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
@ -1595,7 +1595,7 @@
|
|||||||
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
||||||
CODE_SIGN_IDENTITY = "";
|
CODE_SIGN_IDENTITY = "";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 70;
|
CURRENT_PROJECT_VERSION = 71;
|
||||||
DEFINES_MODULE = YES;
|
DEFINES_MODULE = YES;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
|||||||
@ -27,6 +27,19 @@ open class DatePicker: EntryFieldBase {
|
|||||||
/// A callback when the selected option changes. Passes parameters (option).
|
/// A callback when the selected option changes. Passes parameters (option).
|
||||||
open var onDateSelected: ((Date, DatePicker) -> Void)?
|
open var onDateSelected: ((Date, DatePicker) -> Void)?
|
||||||
|
|
||||||
|
/// Override UIControl state to add the .error state if showError is true.
|
||||||
|
open override var state: UIControl.State {
|
||||||
|
get {
|
||||||
|
var state = super.state
|
||||||
|
if isEnabled {
|
||||||
|
if isCalendarShowing {
|
||||||
|
state.insert(.focused)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return state
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Private Properties
|
// MARK: - Private Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -37,6 +50,7 @@ open class DatePicker: EntryFieldBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal override var responder: UIResponder? { hiddenView }
|
internal override var responder: UIResponder? { hiddenView }
|
||||||
|
internal var isCalendarShowing: Bool = false { didSet { setNeedsUpdate() } }
|
||||||
internal var hiddenView = Responder().with { $0.width(0) }
|
internal var hiddenView = Responder().with { $0.width(0) }
|
||||||
internal var minWidthDefault = 186.0
|
internal var minWidthDefault = 186.0
|
||||||
internal var bottomStackView: UIStackView = {
|
internal var bottomStackView: UIStackView = {
|
||||||
@ -315,6 +329,7 @@ extension DatePicker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isCalendarShowing = true
|
||||||
}
|
}
|
||||||
|
|
||||||
private func hidePopoverView() {
|
private func hidePopoverView() {
|
||||||
@ -346,6 +361,7 @@ extension DatePicker {
|
|||||||
UIAccessibility.post(notification: .layoutChanged, argument: containerView)
|
UIAccessibility.post(notification: .layoutChanged, argument: containerView)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
isCalendarShowing = false
|
||||||
}
|
}
|
||||||
|
|
||||||
private func calculatePopoverPosition(relativeTo sourceView: UIView, in parentView: UIView, size: CGSize, with spacing: CGFloat) -> CGPoint? {
|
private func calculatePopoverPosition(relativeTo sourceView: UIView, in parentView: UIView, size: CGSize, with spacing: CGFloat) -> CGPoint? {
|
||||||
|
|||||||
@ -51,10 +51,8 @@ open class Table: View {
|
|||||||
|
|
||||||
func horizontalValue() -> CGFloat {
|
func horizontalValue() -> CGFloat {
|
||||||
switch self {
|
switch self {
|
||||||
case .standard:
|
case .standard, .compact:
|
||||||
return UIDevice.isIPad ? VDSLayout.space8X : VDSLayout.space6X
|
return UIDevice.isIPad ? VDSLayout.space4X : VDSLayout.space3X
|
||||||
case .compact:
|
|
||||||
return UIDevice.isIPad ? VDSLayout.space8X : VDSLayout.space6X
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +145,10 @@ extension Table: UICollectionViewDelegate, UICollectionViewDataSource, TableColl
|
|||||||
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: TableCellItem.Identifier, for: indexPath) as? TableCellItem else { return UICollectionViewCell() }
|
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: TableCellItem.Identifier, for: indexPath) as? TableCellItem else { return UICollectionViewCell() }
|
||||||
let currentItem = tableData[indexPath.section].columns[indexPath.row]
|
let currentItem = tableData[indexPath.section].columns[indexPath.row]
|
||||||
let shouldStrip = striped ? (indexPath.section % 2 != 0) : false
|
let shouldStrip = striped ? (indexPath.section % 2 != 0) : false
|
||||||
cell.updateCell(content: currentItem, surface: surface, striped: shouldStrip, padding: padding)
|
let isHeader = tableData[indexPath.section].isHeader
|
||||||
|
var edgePadding = UIEdgeInsets(top: padding.verticalValue(), left: 0, bottom: padding.verticalValue(), right: padding.horizontalValue())
|
||||||
|
edgePadding.left = (indexPath.row == 0 && !striped) ? VDSLayout.space1X : padding.horizontalValue()
|
||||||
|
cell.updateCell(content: currentItem, surface: surface, striped: shouldStrip, padding: edgePadding, isHeader: isHeader)
|
||||||
return cell
|
return cell
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,9 +30,6 @@ final class TableCellItem: UICollectionViewCell {
|
|||||||
/// Color configuration for striped background color
|
/// Color configuration for striped background color
|
||||||
private let stripedColorConfiguration = SurfaceColorConfiguration(VDSColor.backgroundSecondaryLight, VDSColor.backgroundSecondaryDark)
|
private let stripedColorConfiguration = SurfaceColorConfiguration(VDSColor.backgroundSecondaryLight, VDSColor.backgroundSecondaryDark)
|
||||||
|
|
||||||
/// Padding parameter to maintain the edge spacing of the containerView
|
|
||||||
private var padding: Table.Padding = .standard
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializers
|
// MARK: - Initializers
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -58,10 +55,10 @@ final class TableCellItem: UICollectionViewCell {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
/// Updates the cell content with ``TableItemModel`` and styling/padding attributes from other parameters
|
/// Updates the cell content with ``TableItemModel`` and styling/padding attributes from other parameters
|
||||||
public func updateCell(content: TableItemModel, surface: Surface, striped: Bool = false, padding: Table.Padding = .standard) {
|
public func updateCell(content: TableItemModel, surface: Surface, striped: Bool = false, padding: UIEdgeInsets, isHeader: Bool = false) {
|
||||||
|
|
||||||
containerView.subviews.forEach({ $0.removeFromSuperview() })
|
containerView.subviews.forEach({ $0.removeFromSuperview() })
|
||||||
self.padding = padding
|
|
||||||
containerView.surface = surface
|
containerView.surface = surface
|
||||||
containerView.backgroundColor = striped ? stripedColorConfiguration.getColor(surface) : backgroundColorConfiguration.getColor(surface)
|
containerView.backgroundColor = striped ? stripedColorConfiguration.getColor(surface) : backgroundColorConfiguration.getColor(surface)
|
||||||
|
|
||||||
@ -82,11 +79,11 @@ final class TableCellItem: UICollectionViewCell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
component.leadingAnchor.constraint(equalTo: containerView.leadingAnchor, constant: VDSLayout.space1X),
|
component.leadingAnchor.constraint(equalTo: containerView.leadingAnchor, constant: padding.left),
|
||||||
component.topAnchor.constraint(greaterThanOrEqualTo: containerView.topAnchor, constant: padding.verticalValue()),
|
containerView.trailingAnchor.constraint(greaterThanOrEqualTo: component.trailingAnchor, constant: padding.right)
|
||||||
containerView.bottomAnchor.constraint(greaterThanOrEqualTo: component.bottomAnchor, constant: padding.verticalValue()),
|
|
||||||
containerView.trailingAnchor.constraint(greaterThanOrEqualTo: component.trailingAnchor, constant: padding.horizontalValue()),
|
|
||||||
containerView.centerYAnchor.constraint(equalTo: component.centerYAnchor)
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
component.topAnchor.constraint(equalTo: containerView.topAnchor, constant: padding.top).isActive = !isHeader
|
||||||
|
containerView.bottomAnchor.constraint(equalTo: component.bottomAnchor, constant: padding.bottom).isActive = isHeader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,6 +40,9 @@ class MatrixFlowLayout : UICollectionViewFlowLayout {
|
|||||||
///padding type to be set from Table component, which is used to calculate the size & position of the cell.
|
///padding type to be set from Table component, which is used to calculate the size & position of the cell.
|
||||||
var layoutPadding: Table.Padding = .standard
|
var layoutPadding: Table.Padding = .standard
|
||||||
|
|
||||||
|
///Striped status of Table, based on this status padding of leading attribute changes.
|
||||||
|
var striped: Bool = false
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Overrides
|
// MARK: - Overrides
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -77,7 +80,7 @@ class MatrixFlowLayout : UICollectionViewFlowLayout {
|
|||||||
let selectedItem = delegate.collectionView(collectionView, dataForItemAt: indexPath)
|
let selectedItem = delegate.collectionView(collectionView, dataForItemAt: indexPath)
|
||||||
|
|
||||||
///Calculate the estimated height of the cell
|
///Calculate the estimated height of the cell
|
||||||
let itemHeight = estimateHeightFor(item: selectedItem, with: itemWidth)
|
let itemHeight = estimateHeightFor(item: selectedItem, with: itemWidth, index: indexPath)
|
||||||
|
|
||||||
layoutWidth += itemWidth
|
layoutWidth += itemWidth
|
||||||
|
|
||||||
@ -108,8 +111,8 @@ class MatrixFlowLayout : UICollectionViewFlowLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Fetches estimated height by calling the cell's component estimated height and adding padding
|
/// Fetches estimated height by calling the cell's component estimated height and adding padding
|
||||||
private func estimateHeightFor(item: TableItemModel, with width: CGFloat) -> CGFloat {
|
private func estimateHeightFor(item: TableItemModel, with width: CGFloat, index: IndexPath) -> CGFloat {
|
||||||
|
let horizontalPadding = (index.row == 0 && !striped) ? (VDSLayout.space1X + layoutPadding.horizontalValue()) : (2 * layoutPadding.horizontalValue())
|
||||||
let itemWidth = width - layoutPadding.horizontalValue() - defaultLeadingPadding
|
let itemWidth = width - layoutPadding.horizontalValue() - defaultLeadingPadding
|
||||||
let maxSize = CGSize(width: itemWidth, height: CGFloat.greatestFiniteMagnitude)
|
let maxSize = CGSize(width: itemWidth, height: CGFloat.greatestFiniteMagnitude)
|
||||||
let estItemSize = item.component?.systemLayoutSizeFitting(maxSize, withHorizontalFittingPriority: .required, verticalFittingPriority: .fittingSizeLevel) ?? CGSize(width: itemWidth, height: item.defaultHeight)
|
let estItemSize = item.component?.systemLayoutSizeFitting(maxSize, withHorizontalFittingPriority: .required, verticalFittingPriority: .fittingSizeLevel) ?? CGSize(width: itemWidth, height: item.defaultHeight)
|
||||||
|
|||||||
@ -11,11 +11,14 @@ public struct TableRowModel {
|
|||||||
|
|
||||||
public var columns: [TableItemModel]
|
public var columns: [TableItemModel]
|
||||||
|
|
||||||
|
public var isHeader: Bool = false
|
||||||
|
|
||||||
public var columnsCount: Int {
|
public var columnsCount: Int {
|
||||||
return columns.count
|
return columns.count
|
||||||
}
|
}
|
||||||
|
|
||||||
public init(columns: [TableItemModel]) {
|
public init(columns: [TableItemModel], isHeader: Bool = false) {
|
||||||
self.columns = columns
|
self.columns = columns
|
||||||
|
self.isHeader = isHeader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -137,8 +137,8 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable {
|
|||||||
|
|
||||||
internal var borderColorConfiguration = ControlColorConfiguration().with {
|
internal var borderColorConfiguration = ControlColorConfiguration().with {
|
||||||
$0.setSurfaceColors(VDSFormControlsColor.borderOnlight, VDSFormControlsColor.borderOndark, forState: .normal)
|
$0.setSurfaceColors(VDSFormControlsColor.borderOnlight, VDSFormControlsColor.borderOndark, forState: .normal)
|
||||||
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOnlight, forState: .focused)
|
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .focused)
|
||||||
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOnlight, forState: [.focused, .error])
|
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: [.focused, .error])
|
||||||
$0.setSurfaceColors(VDSColor.interactiveDisabledOnlight, VDSColor.interactiveDisabledOndark, forState: .disabled)
|
$0.setSurfaceColors(VDSColor.interactiveDisabledOnlight, VDSColor.interactiveDisabledOndark, forState: .disabled)
|
||||||
$0.setSurfaceColors(VDSColor.feedbackErrorOnlight, VDSColor.feedbackErrorOndark, forState: .error)
|
$0.setSurfaceColors(VDSColor.feedbackErrorOnlight, VDSColor.feedbackErrorOndark, forState: .error)
|
||||||
$0.setSurfaceColors(VDSFormControlsColor.borderReadonlyOnlight, VDSFormControlsColor.borderReadonlyOndark, forState: .readonly)
|
$0.setSurfaceColors(VDSFormControlsColor.borderReadonlyOnlight, VDSFormControlsColor.borderReadonlyOndark, forState: .readonly)
|
||||||
@ -332,8 +332,6 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable {
|
|||||||
accessibilityLabels.append("error, \(errorText)")
|
accessibilityLabels.append("error, \(errorText)")
|
||||||
}
|
}
|
||||||
|
|
||||||
accessibilityLabels.append("\(Self.self)")
|
|
||||||
|
|
||||||
return accessibilityLabels.joined(separator: ", ")
|
return accessibilityLabels.joined(separator: ", ")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -437,7 +437,7 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
|||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
//Width + AspectRatio Constraint - Will exit out if set
|
//Width + AspectRatio Constraint
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
if let containerViewWidth,
|
if let containerViewWidth,
|
||||||
let multiplier,
|
let multiplier,
|
||||||
@ -450,7 +450,7 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
|||||||
|
|
||||||
}
|
}
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
//Height + AspectRatio Constraint - Will exit out if set
|
//Height + AspectRatio Constraint
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
else if let containerViewHeight,
|
else if let containerViewHeight,
|
||||||
let multiplier,
|
let multiplier,
|
||||||
|
|||||||
@ -1,7 +1,12 @@
|
|||||||
1.0.71
|
1.0.71
|
||||||
----------------
|
----------------
|
||||||
|
- CXTDT-581800 - DatePicker - Selected Error state icon
|
||||||
|
- CXTDT-581801 - DatePicker - border disappears for on dark focus state
|
||||||
- CXTDT-581803 - DatePicker - Calendar does not switch to Dark Mode
|
- CXTDT-581803 - DatePicker - Calendar does not switch to Dark Mode
|
||||||
- CXTDT-584278 – InputField - Accessibility
|
- CXTDT-584278 – InputField - Accessibility
|
||||||
|
- CXTDT-586375 - Table - Issue With Stripe
|
||||||
|
- CXTDT-577463 - InputField - Accessibility - #7
|
||||||
|
- CXTDT-565796 - DropdownSelect – Removed the "Type" from the VoiceOver
|
||||||
|
|
||||||
1.0.70
|
1.0.70
|
||||||
----------------
|
----------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user