Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/vds_ios.git into mbruce/bugfix

This commit is contained in:
Matt Bruce 2024-08-21 15:32:53 -05:00
commit f2c6eb0fc2
8 changed files with 42 additions and 6 deletions

View File

@ -160,7 +160,7 @@ open class CalendarBase: Control, Changeable {
inactiveDates = [] inactiveDates = []
indicators = [] indicators = []
minDate = Date() minDate = Date()
maxDate = Date() maxDate = Calendar.current.date(byAdding: .year, value: 10, to: Date())!
selectedDate = Date() selectedDate = Date()
} }

View File

@ -93,7 +93,7 @@ open class CheckboxGroup: SelectorGroupBase<CheckboxItem>, SelectorGroupMultiSel
inputId = nil inputId = nil
} }
public override func didSelect(_ selectedControl: CheckboxItem) { open override func didSelect(_ selectedControl: CheckboxItem) {
selectedControl.toggle() selectedControl.toggle()
if selectedControl.isSelected, showError{ if selectedControl.isSelected, showError{
showError.toggle() showError.toggle()

View File

@ -221,6 +221,9 @@ extension DatePicker {
} }
let calendar = CalendarBase() let calendar = CalendarBase()
if let selectedDate, selectedDate != calendar.selectedDate {
calendar.selectedDate = selectedDate
}
calendar.activeDates = calendarModel.activeDates calendar.activeDates = calendarModel.activeDates
calendar.hideContainerBorder = calendarModel.hideContainerBorder calendar.hideContainerBorder = calendarModel.hideContainerBorder
calendar.hideCurrentDateIndicator = calendarModel.hideCurrentDateIndicator calendar.hideCurrentDateIndicator = calendarModel.hideCurrentDateIndicator

View File

@ -24,6 +24,8 @@ extension DatePicker {
/// All other dates will be active. /// All other dates will be active.
public let inactiveDates: [Date] public let inactiveDates: [Date]
public let selectedDate: Date
/// If provided, the calendar will allow a selection to be made from this date forward. Defaults to today. /// If provided, the calendar will allow a selection to be made from this date forward. Defaults to today.
public let minDate: Date public let minDate: Date
@ -37,13 +39,15 @@ extension DatePicker {
hideCurrentDateIndicator: Bool = false, hideCurrentDateIndicator: Bool = false,
activeDates: [Date] = [], activeDates: [Date] = [],
inactiveDates: [Date] = [], inactiveDates: [Date] = [],
minDate: Date = Date().startOfMonth, selectedDate: Date = Date(),
maxDate: Date = Date().endOfMonth, minDate: Date = Date(),
maxDate: Date = Calendar.current.date(byAdding: .year, value: 10, to: Date())!,
indicators: [CalendarBase.CalendarIndicatorModel] = []) { indicators: [CalendarBase.CalendarIndicatorModel] = []) {
self.hideContainerBorder = hideContainerBorder self.hideContainerBorder = hideContainerBorder
self.hideCurrentDateIndicator = hideCurrentDateIndicator self.hideCurrentDateIndicator = hideCurrentDateIndicator
self.activeDates = activeDates self.activeDates = activeDates
self.inactiveDates = inactiveDates self.inactiveDates = inactiveDates
self.selectedDate = selectedDate
self.minDate = minDate self.minDate = minDate
self.maxDate = maxDate self.maxDate = maxDate
self.indicators = indicators self.indicators = indicators

View File

@ -112,8 +112,7 @@ 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, index: IndexPath) -> 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() - (index.row == 0 ? defaultLeadingPadding:layoutPadding.horizontalValue())
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)
return estItemSize.height + (2 * layoutPadding.verticalValue()) return estItemSize.height + (2 * layoutPadding.verticalValue())

View File

@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "calendar.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Calendar" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 21.6 21.6" style="enable-background:new 0 0 21.6 21.6;" xml:space="preserve">
<path d="M1.8,1.8v18h18v-18C19.8,1.8,1.8,1.8,1.8,1.8z M18.7,18.7H2.9V5.2h15.7v13.5H18.7z M18.7,4H2.9V2.9h15.7V4H18.7z M10.7,13.8
c0-1.1-0.8-1.7-2.2-1.7H8v-0.8h0.5c1.3,0,2-0.6,2-1.5c0-0.9-0.8-1.5-1.8-1.5c-1.2,0-2,0.8-2,2h-1c0-1.7,1.1-2.8,3-2.8
c1.6,0,2.8,0.9,2.8,2.3c0,1-0.6,1.5-1.4,1.8v0c1.2,0.3,1.7,1.1,1.7,2.2c0,1.6-1.3,2.6-3.1,2.6c-1.9,0-3.4-1.1-3.4-3h1
c0,1.4,0.9,2.1,2.3,2.1C9.9,15.6,10.7,15,10.7,13.8z M14.8,10h-1.9V9.3c1,0,1.9-0.4,2.1-1.7h0.8v8.6h-1V10z"/>
</svg>

After

Width:  |  Height:  |  Size: 828 B

View File

@ -1,3 +1,9 @@
1.0.73
----------------
- CXTDT-597984 - Table - Text wrap
- CXTDT-586372 - Table - Stripes defect
- CXTDT-586383 - Table - Line style
1.0.72 1.0.72
---------------- ----------------
- ONEAPP-9311 - InputStepper - Finished - ONEAPP-9311 - InputStepper - Finished