diff --git a/VDS/Components/Calendar/Calendar.swift b/VDS/Components/Calendar/Calendar.swift index 0a6ba18c..bdb5b8a9 100644 --- a/VDS/Components/Calendar/Calendar.swift +++ b/VDS/Components/Calendar/Calendar.swift @@ -160,7 +160,7 @@ open class CalendarBase: Control, Changeable { inactiveDates = [] indicators = [] minDate = Date() - maxDate = Date() + maxDate = Calendar.current.date(byAdding: .year, value: 10, to: Date())! selectedDate = Date() } diff --git a/VDS/Components/Checkbox/CheckboxGroup.swift b/VDS/Components/Checkbox/CheckboxGroup.swift index 226083fe..8268f90f 100644 --- a/VDS/Components/Checkbox/CheckboxGroup.swift +++ b/VDS/Components/Checkbox/CheckboxGroup.swift @@ -93,7 +93,7 @@ open class CheckboxGroup: SelectorGroupBase, SelectorGroupMultiSel inputId = nil } - public override func didSelect(_ selectedControl: CheckboxItem) { + open override func didSelect(_ selectedControl: CheckboxItem) { selectedControl.toggle() if selectedControl.isSelected, showError{ showError.toggle() diff --git a/VDS/Components/DatePicker/DatePicker.swift b/VDS/Components/DatePicker/DatePicker.swift index e8802c69..e9137ad9 100644 --- a/VDS/Components/DatePicker/DatePicker.swift +++ b/VDS/Components/DatePicker/DatePicker.swift @@ -221,6 +221,9 @@ extension DatePicker { } let calendar = CalendarBase() + if let selectedDate, selectedDate != calendar.selectedDate { + calendar.selectedDate = selectedDate + } calendar.activeDates = calendarModel.activeDates calendar.hideContainerBorder = calendarModel.hideContainerBorder calendar.hideCurrentDateIndicator = calendarModel.hideCurrentDateIndicator diff --git a/VDS/Components/DatePicker/DatePickerCalendarModel.swift b/VDS/Components/DatePicker/DatePickerCalendarModel.swift index 16a46e61..da18ab2f 100644 --- a/VDS/Components/DatePicker/DatePickerCalendarModel.swift +++ b/VDS/Components/DatePicker/DatePickerCalendarModel.swift @@ -24,6 +24,8 @@ extension DatePicker { /// All other dates will be active. 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. public let minDate: Date @@ -37,13 +39,15 @@ extension DatePicker { hideCurrentDateIndicator: Bool = false, activeDates: [Date] = [], inactiveDates: [Date] = [], - minDate: Date = Date().startOfMonth, - maxDate: Date = Date().endOfMonth, + selectedDate: Date = Date(), + minDate: Date = Date(), + maxDate: Date = Calendar.current.date(byAdding: .year, value: 10, to: Date())!, indicators: [CalendarBase.CalendarIndicatorModel] = []) { self.hideContainerBorder = hideContainerBorder self.hideCurrentDateIndicator = hideCurrentDateIndicator self.activeDates = activeDates self.inactiveDates = inactiveDates + self.selectedDate = selectedDate self.minDate = minDate self.maxDate = maxDate self.indicators = indicators diff --git a/VDS/Components/Table/TableFlowLayout.swift b/VDS/Components/Table/TableFlowLayout.swift index 2567f947..7af3621a 100644 --- a/VDS/Components/Table/TableFlowLayout.swift +++ b/VDS/Components/Table/TableFlowLayout.swift @@ -112,8 +112,7 @@ class MatrixFlowLayout : UICollectionViewFlowLayout { /// 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 { - let horizontalPadding = (index.row == 0 && !striped) ? (VDSLayout.space1X + layoutPadding.horizontalValue()) : (2 * layoutPadding.horizontalValue()) - let itemWidth = width - layoutPadding.horizontalValue() - defaultLeadingPadding + let itemWidth = width - layoutPadding.horizontalValue() - (index.row == 0 ? defaultLeadingPadding:layoutPadding.horizontalValue()) let maxSize = CGSize(width: itemWidth, height: CGFloat.greatestFiniteMagnitude) let estItemSize = item.component?.systemLayoutSizeFitting(maxSize, withHorizontalFittingPriority: .required, verticalFittingPriority: .fittingSizeLevel) ?? CGSize(width: itemWidth, height: item.defaultHeight) return estItemSize.height + (2 * layoutPadding.verticalValue()) diff --git a/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/Contents.json b/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/Contents.json new file mode 100644 index 00000000..86c7f835 --- /dev/null +++ b/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "calendar.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/calendar.svg b/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/calendar.svg new file mode 100644 index 00000000..4cf118e3 --- /dev/null +++ b/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/calendar.svg @@ -0,0 +1,9 @@ + + + + + diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index ec14a5f7..c201359e 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -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 ---------------- - ONEAPP-9311 - InputStepper - Finished