Skip to content

Commit 30419a2

Browse files
authored
feat: Add simple cards for slider and digitalcrown views (#55)
* feat: Add simple cards for slider and digitalcrown views * nits * Expose new views in public API * expose ChartView * fix project
1 parent 1f81b17 commit 30419a2

18 files changed

+504
-56
lines changed

CareKitEssentials.xcodeproj/project.pbxproj

+28-16
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
7068BD412D62788E00212E4A /* OCKHealthKitLinkage+Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7068BD402D62788A00212E4A /* OCKHealthKitLinkage+Hashable.swift */; };
4646
70721CE42D658EC300270799 /* OCKOutcomeValue+Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70721CE32D658EBC00270799 /* OCKOutcomeValue+Sequence.swift */; };
4747
70721CE62D65990700270799 /* OCKOutcomeValueExtensionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70721CE52D65990700270799 /* OCKOutcomeValueExtensionsTests.swift */; };
48+
707D28A22DC815F300980253 /* CareKitEssentialSliderLogView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 707D28A12DC815DA00980253 /* CareKitEssentialSliderLogView.swift */; };
49+
707D28A72DC9116E00980253 /* CareKitEssentialSliderLogView+EventViewable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 707D28A62DC9116200980253 /* CareKitEssentialSliderLogView+EventViewable.swift */; };
50+
707D28A92DC93EE100980253 /* CareKitEssentialDigitalCrownLogView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 707D28A82DC93EE100980253 /* CareKitEssentialDigitalCrownLogView.swift */; };
4851
7081E0212D050136004937F6 /* CareStoreFetchedResults+Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7081E0202D050136004937F6 /* CareStoreFetchedResults+Sequence.swift */; };
4952
708D74092DC4995F0049B592 /* OCKOutcomeValue+Plottable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 708D74082DC4995A0049B592 /* OCKOutcomeValue+Plottable.swift */; };
5053
7094DD0F2DC477EE0039CA64 /* CareKitEssentialVersionable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7094DD0E2DC477E70039CA64 /* CareKitEssentialVersionable.swift */; };
@@ -86,10 +89,10 @@
8689
70EBE30D2D19FC0F00517D5E /* EventViewable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70EBE30A2D19FC0F00517D5E /* EventViewable.swift */; };
8790
70EBE3102D19FC2A00517D5E /* EventQueryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70EBE30F2D19FC2A00517D5E /* EventQueryView.swift */; };
8891
70EBE3112D19FC2A00517D5E /* EventQueryContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70EBE30E2D19FC2A00517D5E /* EventQueryContentView.swift */; };
89-
70EBE3132D19FF0200517D5E /* SimpleTaskView+CareStoreFetchedViewable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70EBE3122D19FEE600517D5E /* SimpleTaskView+CareStoreFetchedViewable.swift */; };
90-
70EBE3152D19FF9700517D5E /* InstructionsTaskView+CareStoreFetchedViewable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70EBE3142D19FF8D00517D5E /* InstructionsTaskView+CareStoreFetchedViewable.swift */; };
91-
70EBE3172D19FFE900517D5E /* LabeledValueTaskView+CareStoreFetchedViewable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70EBE3162D19FFE900517D5E /* LabeledValueTaskView+CareStoreFetchedViewable.swift */; };
92-
70EBE3192D19FFF700517D5E /* NumericProgressTaskView+CareStoreFetchedViewable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70EBE3182D19FFF700517D5E /* NumericProgressTaskView+CareStoreFetchedViewable.swift */; };
92+
70EBE3132D19FF0200517D5E /* SimpleTaskView+EventViewable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70EBE3122D19FEE600517D5E /* SimpleTaskView+EventViewable.swift */; };
93+
70EBE3152D19FF9700517D5E /* InstructionsTaskView+EventViewable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70EBE3142D19FF8D00517D5E /* InstructionsTaskView+EventViewable.swift */; };
94+
70EBE3172D19FFE900517D5E /* LabeledValueTaskView+EventViewable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70EBE3162D19FFE900517D5E /* LabeledValueTaskView+EventViewable.swift */; };
95+
70EBE3192D19FFF700517D5E /* NumericProgressTaskView+EventViewable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70EBE3182D19FFF700517D5E /* NumericProgressTaskView+EventViewable.swift */; };
9396
70FDC6162C387C9F00A32137 /* NSImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70FDC6152C387C9F00A32137 /* NSImage.swift */; };
9497
911BDB262A11C437004F8442 /* View+Default.swift in Sources */ = {isa = PBXBuildFile; fileRef = 911BDB252A11C437004F8442 /* View+Default.swift */; };
9598
911BDB282A11C491004F8442 /* CGFloat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 911BDB272A11C491004F8442 /* CGFloat.swift */; };
@@ -206,6 +209,9 @@
206209
7068BD402D62788A00212E4A /* OCKHealthKitLinkage+Hashable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OCKHealthKitLinkage+Hashable.swift"; sourceTree = "<group>"; };
207210
70721CE32D658EBC00270799 /* OCKOutcomeValue+Sequence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OCKOutcomeValue+Sequence.swift"; sourceTree = "<group>"; };
208211
70721CE52D65990700270799 /* OCKOutcomeValueExtensionsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OCKOutcomeValueExtensionsTests.swift; sourceTree = "<group>"; };
212+
707D28A12DC815DA00980253 /* CareKitEssentialSliderLogView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CareKitEssentialSliderLogView.swift; sourceTree = "<group>"; };
213+
707D28A62DC9116200980253 /* CareKitEssentialSliderLogView+EventViewable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CareKitEssentialSliderLogView+EventViewable.swift"; sourceTree = "<group>"; };
214+
707D28A82DC93EE100980253 /* CareKitEssentialDigitalCrownLogView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CareKitEssentialDigitalCrownLogView.swift; sourceTree = "<group>"; };
209215
7081E0202D050136004937F6 /* CareStoreFetchedResults+Sequence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CareStoreFetchedResults+Sequence.swift"; sourceTree = "<group>"; };
210216
708D74082DC4995A0049B592 /* OCKOutcomeValue+Plottable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OCKOutcomeValue+Plottable.swift"; sourceTree = "<group>"; };
211217
7094DD0E2DC477E70039CA64 /* CareKitEssentialVersionable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CareKitEssentialVersionable.swift; sourceTree = "<group>"; };
@@ -247,10 +253,10 @@
247253
70EBE30B2D19FC0F00517D5E /* EventWithContentViewable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventWithContentViewable.swift; sourceTree = "<group>"; };
248254
70EBE30E2D19FC2A00517D5E /* EventQueryContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventQueryContentView.swift; sourceTree = "<group>"; };
249255
70EBE30F2D19FC2A00517D5E /* EventQueryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventQueryView.swift; sourceTree = "<group>"; };
250-
70EBE3122D19FEE600517D5E /* SimpleTaskView+CareStoreFetchedViewable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SimpleTaskView+CareStoreFetchedViewable.swift"; sourceTree = "<group>"; };
251-
70EBE3142D19FF8D00517D5E /* InstructionsTaskView+CareStoreFetchedViewable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "InstructionsTaskView+CareStoreFetchedViewable.swift"; sourceTree = "<group>"; };
252-
70EBE3162D19FFE900517D5E /* LabeledValueTaskView+CareStoreFetchedViewable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LabeledValueTaskView+CareStoreFetchedViewable.swift"; sourceTree = "<group>"; };
253-
70EBE3182D19FFF700517D5E /* NumericProgressTaskView+CareStoreFetchedViewable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NumericProgressTaskView+CareStoreFetchedViewable.swift"; sourceTree = "<group>"; };
256+
70EBE3122D19FEE600517D5E /* SimpleTaskView+EventViewable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SimpleTaskView+EventViewable.swift"; sourceTree = "<group>"; };
257+
70EBE3142D19FF8D00517D5E /* InstructionsTaskView+EventViewable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "InstructionsTaskView+EventViewable.swift"; sourceTree = "<group>"; };
258+
70EBE3162D19FFE900517D5E /* LabeledValueTaskView+EventViewable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LabeledValueTaskView+EventViewable.swift"; sourceTree = "<group>"; };
259+
70EBE3182D19FFF700517D5E /* NumericProgressTaskView+EventViewable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NumericProgressTaskView+EventViewable.swift"; sourceTree = "<group>"; };
254260
70FDC6152C387C9F00A32137 /* NSImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSImage.swift; sourceTree = "<group>"; };
255261
911BDB252A11C437004F8442 /* View+Default.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "View+Default.swift"; sourceTree = "<group>"; };
256262
911BDB272A11C491004F8442 /* CGFloat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGFloat.swift; sourceTree = "<group>"; };
@@ -407,15 +413,16 @@
407413
isa = PBXGroup;
408414
children = (
409415
70116B3F2DC06DBC0024BB89 /* CareKitEssentialChartBodyView+ChartContent.swift */,
416+
707D28A62DC9116200980253 /* CareKitEssentialSliderLogView+EventViewable.swift */,
410417
70116AF02DBC632E0024BB89 /* CKEDataSeries+AXChartDescriptorRepresentable.swift */,
411418
91A9E7E12A197A7300F3414D /* InstructionsTaskView.swift */,
412-
70EBE3142D19FF8D00517D5E /* InstructionsTaskView+CareStoreFetchedViewable.swift */,
419+
70EBE3142D19FF8D00517D5E /* InstructionsTaskView+EventViewable.swift */,
413420
91A9E7DF2A19784800F3414D /* LabeledValueTaskView.swift */,
414-
70EBE3162D19FFE900517D5E /* LabeledValueTaskView+CareStoreFetchedViewable.swift */,
421+
70EBE3162D19FFE900517D5E /* LabeledValueTaskView+EventViewable.swift */,
415422
91A9E7DD2A19758300F3414D /* NumericProgressTaskView.swift */,
416-
70EBE3182D19FFF700517D5E /* NumericProgressTaskView+CareStoreFetchedViewable.swift */,
423+
70EBE3182D19FFF700517D5E /* NumericProgressTaskView+EventViewable.swift */,
417424
91A9E7E32A197A9300F3414D /* SimpleTaskView.swift */,
418-
70EBE3122D19FEE600517D5E /* SimpleTaskView+CareStoreFetchedViewable.swift */,
425+
70EBE3122D19FEE600517D5E /* SimpleTaskView+EventViewable.swift */,
419426
);
420427
path = Extensions;
421428
sourceTree = "<group>";
@@ -458,6 +465,7 @@
458465
70BBCB4F2A12BD2500759A9C /* SliderLog */ = {
459466
isa = PBXGroup;
460467
children = (
468+
707D28A12DC815DA00980253 /* CareKitEssentialSliderLogView.swift */,
461469
70BBCB522A12BDAC00759A9C /* Slider.swift */,
462470
70BBCB542A12BDBD00759A9C /* SliderLogButton.swift */,
463471
70BBCB4D2A12BB0500759A9C /* SliderLogTaskView.swift */,
@@ -516,6 +524,7 @@
516524
OBJ_14 /* DigitalCrown */ = {
517525
isa = PBXGroup;
518526
children = (
527+
707D28A82DC93EE100980253 /* CareKitEssentialDigitalCrownLogView.swift */,
519528
OBJ_15 /* DigitalCrownView.swift */,
520529
OBJ_16 /* DigitalCrownViewFooter.swift */,
521530
OBJ_17 /* DigitalCrownViewHeader.swift */,
@@ -834,6 +843,7 @@
834843
70EBE3102D19FC2A00517D5E /* EventQueryView.swift in Sources */,
835844
70EBE3112D19FC2A00517D5E /* EventQueryContentView.swift in Sources */,
836845
702FF7712CFAA96B00B26710 /* CKEPoint.swift in Sources */,
846+
707D28A72DC9116E00980253 /* CareKitEssentialSliderLogView+EventViewable.swift in Sources */,
837847
70721CE42D658EC300270799 /* OCKOutcomeValue+Sequence.swift in Sources */,
838848
700DA9052C2A609600435E2C /* CareKitEssentialView.swift in Sources */,
839849
70B49A602D06A2520023E5B3 /* SimpleLabelView.swift in Sources */,
@@ -845,7 +855,7 @@
845855
708D74092DC4995F0049B592 /* OCKOutcomeValue+Plottable.swift in Sources */,
846856
7026DDF72D0D2B33002EACAA /* OCKAnyEvent+Equatable.swift in Sources */,
847857
OBJ_742 /* DetailsView.swift in Sources */,
848-
70EBE3172D19FFE900517D5E /* LabeledValueTaskView+CareStoreFetchedViewable.swift in Sources */,
858+
70EBE3172D19FFE900517D5E /* LabeledValueTaskView+EventViewable.swift in Sources */,
849859
91A9E7E02A19784800F3414D /* LabeledValueTaskView.swift in Sources */,
850860
70116AF92DBDF5E30024BB89 /* CareKitEssentialChartable.swift in Sources */,
851861
70B49A7D2D0A53FA0023E5B3 /* OCKAnyEvent+Hashable.swift in Sources */,
@@ -864,17 +874,18 @@
864874
OBJ_750 /* CardViewModel.swift in Sources */,
865875
7094DD172DC47DC80039CA64 /* OCKHealthKitOutcome+Hashable.swift in Sources */,
866876
702FF76B2CFAA93C00B26710 /* CareKitEssentialChartView.swift in Sources */,
867-
70EBE3192D19FFF700517D5E /* NumericProgressTaskView+CareStoreFetchedViewable.swift in Sources */,
877+
70EBE3192D19FFF700517D5E /* NumericProgressTaskView+EventViewable.swift in Sources */,
868878
702FF7752CFAA97800B26710 /* TemporalTaskProgress.swift in Sources */,
869879
7068BD3F2D6277C500212E4A /* OCKHealthKitTask+Hashable.swift in Sources */,
870-
70EBE3152D19FF9700517D5E /* InstructionsTaskView+CareStoreFetchedViewable.swift in Sources */,
880+
70EBE3152D19FF9700517D5E /* InstructionsTaskView+EventViewable.swift in Sources */,
871881
702FF76D2CFAA96100B26710 /* CKEDataSeries.swift in Sources */,
872882
91A9E7E22A197A7300F3414D /* InstructionsTaskView.swift in Sources */,
873883
OBJ_752 /* Calendar+Dates.swift in Sources */,
874884
70B49A852D0A56C10023E5B3 /* OCKOutcomeValue+Hashable.swift in Sources */,
875885
OBJ_753 /* Image.swift in Sources */,
876886
70EBE30C2D19FC0F00517D5E /* EventWithContentViewable.swift in Sources */,
877887
70EBE30D2D19FC0F00517D5E /* EventViewable.swift in Sources */,
888+
707D28A92DC93EE100980253 /* CareKitEssentialDigitalCrownLogView.swift in Sources */,
878889
709530B62DAC3CA300E18A59 /* OCKTask+ResearchKitSwiftUI.swift in Sources */,
879890
70B49A892D0A83E10023E5B3 /* Double.swift in Sources */,
880891
702FF7732CFAA97500B26710 /* TemporalProgress.swift in Sources */,
@@ -899,7 +910,7 @@
899910
70C422CA2C3B681A00E6DC51 /* OCKAnyOutcome+Sequence.swift in Sources */,
900911
911BDB342A130AF9004F8442 /* OCKStore.swift in Sources */,
901912
70116B3C2DC067240024BB89 /* BinaryCareTaskProgress+Math.swift in Sources */,
902-
70EBE3132D19FF0200517D5E /* SimpleTaskView+CareStoreFetchedViewable.swift in Sources */,
913+
70EBE3132D19FF0200517D5E /* SimpleTaskView+EventViewable.swift in Sources */,
903914
OBJ_757 /* OCKBiologicalSex+Hashable.swift in Sources */,
904915
7026DDED2D0CD600002EACAA /* OCKSemanticVersion+Hashable.swift in Sources */,
905916
7068BD412D62788E00212E4A /* OCKHealthKitLinkage+Hashable.swift in Sources */,
@@ -914,6 +925,7 @@
914925
702FF7812CFE5B0400B26710 /* ChartContent+Default.swift in Sources */,
915926
911BDB262A11C437004F8442 /* View+Default.swift in Sources */,
916927
70116AF52DBDC5B10024BB89 /* DateComponentsForProgress.swift in Sources */,
928+
707D28A22DC815F300980253 /* CareKitEssentialSliderLogView.swift in Sources */,
917929
911BDB322A130A2B004F8442 /* Utility.swift in Sources */,
918930
709530B32DAC3AFB00E18A59 /* SurveyQuestion.swift in Sources */,
919931
709530B42DAC3AFB00E18A59 /* SurveyStep.swift in Sources */,

Sources/CareKitEssentials/Cards/Shared/Chart/CareKitEssentialChartView.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import Foundation
1313
import os.log
1414
import SwiftUI
1515

16+
public typealias ChartView = CareKitEssentialChartView
17+
1618
/// Displays a SwiftUI Chart above an axis. The initializer takes an an array of
1719
/// `CKEDataSeriesConfiguration`'s which each support
1820
/// `CKEDataSeries.MarkType` that allows you to overlay from several
@@ -179,7 +181,7 @@ struct CareKitEssentialChartView_Previews: PreviewProvider {
179181

180182
NavigationStack {
181183
ScrollView {
182-
CareKitEssentialChartView(
184+
ChartView(
183185
title: task.title ?? "",
184186
subtitle: "Chart",
185187
dateInterval: $dateInterval,

Sources/CareKitEssentials/Cards/Shared/Chart/Data/CKEDataSeriesConfiguration.swift

+11-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,18 @@ import Charts
1515
/// A configuration object that specifies which data should be queried and how it should be displayed by the graph.
1616
public struct CKEDataSeriesConfiguration: Identifiable, Hashable {
1717

18+
/// The type of strategy used to produce each data point in the plot.
1819
public enum DataStrategy: Hashable {
20+
/// Take the sum of all `OCKOutcomeValues` to produce each data point.
1921
case sum
22+
/// Take the maximum of all `OCKOutcomeValues` to produce each data point.
23+
case max
24+
/// Take the mean of all `OCKOutcomeValues` to produce each data point.
2025
case mean
26+
/// Take the median of all `OCKOutcomeValues` to produce each data point.
2127
case median
28+
/// Take the minimum of all `OCKOutcomeValues` to produce each data point.
29+
case min
2230
}
2331

2432
public var id: String {
@@ -28,7 +36,7 @@ public struct CKEDataSeriesConfiguration: Identifiable, Hashable {
2836
/// The type of mark to display for this configuration.
2937
public var mark: CKEDataSeries.MarkType
3038

31-
/// The type of strategy used to combine the date the plot.
39+
/// The type of strategy used to produce each data point in the plot.
3240
public var dataStrategy: DataStrategy
3341

3442
/// A user-provided unique id for a task.
@@ -85,8 +93,8 @@ public struct CKEDataSeriesConfiguration: Identifiable, Hashable {
8593
/// Initialize a new `CareKitEssentialsDataSeriesConfiguration`.
8694
///
8795
/// - Parameters:
88-
/// - taskID: A user-provided unique id for a task.
89-
/// - dataStrategy: The type of strategy used to combine the date the plot. Be sure
96+
/// - taskID: A user-provided unique id for a task.
97+
/// - dataStrategy: The type of strategy used to produce each data point in the plot. Be sure
9098
/// the `dataStrategy` matches the same strategy used for `computeProgress`.
9199
/// - kind: The kind property of the OCKOutcomeValue to graph.
92100
/// - mark: The type of mark to display for this configuration.

Sources/CareKitEssentials/Cards/Shared/Chart/Protocols/CareKitEssentialChartable.swift

+22
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,28 @@ extension CareKitEssentialChartable {
131131
period: progress.period
132132
)
133133
return combined
134+
case .max:
135+
let combinedProgressValue = combinedProgressValues.max() ?? 0
136+
let combined = CombinedProgress(
137+
value: combinedProgressValue,
138+
originalValues: combinedProgressValues,
139+
originalOutcomeValues: progress.originalOutcomeValues,
140+
unit: combinedProgressUnit,
141+
date: progress.date,
142+
period: progress.period
143+
)
144+
return combined
145+
case .min:
146+
let combinedProgressValue = combinedProgressValues.min() ?? 0
147+
let combined = CombinedProgress(
148+
value: combinedProgressValue,
149+
originalValues: combinedProgressValues,
150+
originalOutcomeValues: progress.originalOutcomeValues,
151+
unit: combinedProgressUnit,
152+
date: progress.date,
153+
period: progress.period
154+
)
155+
return combined
134156
case .mean:
135157
let combinedProgressValue = LinearCareTaskProgress.computeProgressByAveraging(for: combinedProgressValues).value
136158

Sources/CareKitEssentials/Cards/Shared/DismissableView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct DismissableView<Content: View>: View {
1313
@ViewBuilder var content: Content
1414

1515
var body: some View {
16-
NavigationStack {
16+
NavigationView {
1717
content
1818
#if !os(watchOS) && !os(macOS)
1919
.toolbar {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//
2+
// CareKitEssentialSliderLogView+EventViewable.swift
3+
// CareKitEssentials
4+
//
5+
// Created by Corey Baker on 5/5/25.
6+
// Copyright © 2025 Network Reconnaissance Lab. All rights reserved.
7+
//
8+
9+
#if !os(watchOS)
10+
11+
import CareKitStore
12+
13+
extension CareKitEssentialSliderLogView: EventViewable {
14+
15+
public init?(
16+
event: OCKAnyEvent,
17+
store: any OCKAnyStoreProtocol
18+
) {
19+
self.init(
20+
event: event
21+
)
22+
}
23+
}
24+
25+
#endif
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
//
2-
// InstructionsTaskView+CareStoreFetchedViewable.swift
2+
// InstructionsTaskView+EventViewable.swift
33
// CareKitEssentials
44
//
55
// Created by Corey Baker on 12/23/24.
66
// Copyright © 2024 Network Reconnaissance Lab. All rights reserved.
77
//
88

9+
#if !os(watchOS)
10+
911
import CareKit
1012
import CareKitStore
1113
import CareKitUI
1214
import Foundation
1315
import SwiftUI
1416
import os.log
1517

16-
#if !os(watchOS)
17-
1818
extension InstructionsTaskView: EventViewable where Header == InformationHeaderView {
1919
public init?(
2020
event: OCKAnyEvent,
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// LabeledValueTaskView+CareStoreFetchedViewable.swift
2+
// LabeledValueTaskView+EventViewable.swift
33
// CareKitEssentials
44
//
55
// Created by Corey Baker on 12/10/24.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// NumericProgressTaskView+CareStoreFetchedViewable.swift
2+
// NumericProgressTaskView+EventViewable.swift
33
// CareKitEssentials
44
//
55
// Created by Corey Baker on 12/10/24.

0 commit comments

Comments
 (0)