From c3a89270f578c1c9dda3bce1378fac869c1a9fde Mon Sep 17 00:00:00 2001 From: Hengyi Zhang Date: Mon, 9 Dec 2024 09:00:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20[JIRA:HCPSDKFIORIUIK?= =?UTF-8?q?IT-2880]=20ActivityItemModel=20Refactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Examples.xcodeproj/project.pbxproj | 12 +++ .../ActivityItem/ActivityItemExample.swift | 49 ++++++++++++ .../FioriSwiftUICore/CoreContentView.swift | 6 ++ .../Models/ModelDefinitions.swift | 6 +- .../Views/ActivityItem+View.swift | 4 +- .../CompositeComponentProtocols.swift | 9 +++ .../ActivityItemStyle.fiori.swift | 57 ++++++++++++++ .../ActivityItem/ActivityItem.generated.swift | 76 +++++++++++++++++++ .../ActivityItemStyle.generated.swift | 39 ++++++++++ .../ObjectItem/ObjectItem.generated.swift | 1 + .../ValuePicker/ValuePicker.generated.swift | 11 +-- ...entStyleProtocol+Extension.generated.swift | 56 ++++++++++++++ .../EnvironmentVariables.generated.swift | 21 +++++ .../ModifiedStyle.generated.swift | 28 +++++++ .../ResolvedStyle.generated.swift | 16 ++++ .../View+Extension_.generated.swift | 17 +++++ ...iewEmptyChecking+Extension.generated.swift | 7 ++ .../API/ObjectHeader+API.generated.swift | 6 +- .../SearchListPickerItem+API.generated.swift | 16 ++-- .../SearchableListView+API.generated.swift | 2 +- .../SignatureCaptureView+API.generated.swift | 42 +++++----- .../API/SingleStep+API.generated.swift | 10 +-- .../API/SortFilterView+API.generated.swift | 2 +- .../StepProgressIndicator+API.generated.swift | 2 +- .../API/UserConsentView+API.generated.swift | 2 +- ...wift => _ActivityItem+API.generated.swift} | 14 ++-- ...ift => _ActivityItem+View.generated.swift} | 16 ++-- ...ift => _ActivityItem+Init.generated.swift} | 6 +- .../.lib/Sources/utils/Type+Extensions.swift | 1 + sourcery/allPhasesNoCache.sh | 0 30 files changed, 464 insertions(+), 70 deletions(-) create mode 100644 Apps/Examples/Examples/FioriSwiftUICore/ActivityItem/ActivityItemExample.swift create mode 100644 Sources/FioriSwiftUICore/_FioriStyles/ActivityItemStyle.fiori.swift create mode 100644 Sources/FioriSwiftUICore/_generated/StyleableComponents/ActivityItem/ActivityItem.generated.swift create mode 100644 Sources/FioriSwiftUICore/_generated/StyleableComponents/ActivityItem/ActivityItemStyle.generated.swift rename Sources/FioriSwiftUICore/_generated/ViewModels/API/{ActivityItem+API.generated.swift => _ActivityItem+API.generated.swift} (72%) rename Sources/FioriSwiftUICore/_generated/ViewModels/Boilerplate/{ActivityItem+View.generated.swift => _ActivityItem+View.generated.swift} (81%) rename Sources/FioriSwiftUICore/_generated/ViewModels/Init+Extensions/{ActivityItem+Init.generated.swift => _ActivityItem+Init.generated.swift} (75%) mode change 100644 => 100755 sourcery/allPhasesNoCache.sh diff --git a/Apps/Examples/Examples.xcodeproj/project.pbxproj b/Apps/Examples/Examples.xcodeproj/project.pbxproj index b9150687d..4dba94588 100644 --- a/Apps/Examples/Examples.xcodeproj/project.pbxproj +++ b/Apps/Examples/Examples.xcodeproj/project.pbxproj @@ -41,6 +41,7 @@ 6D10F8A02C7DB3F50071DD3E /* BannerMultiMessageExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D10F89F2C7DB3F50071DD3E /* BannerMultiMessageExample.swift */; }; 6D14F05E2C9290F20053BA98 /* BannerMultiMessageCustomInitExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D14F05D2C9290F20053BA98 /* BannerMultiMessageCustomInitExample.swift */; }; 6D3A3DE92CDB5F1E004D4597 /* ObjectCellEnhancementExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3A3DE82CDB5F1E004D4597 /* ObjectCellEnhancementExample.swift */; }; + 6D66D7F12D02FC7B00F7A97D /* ActivityItemExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D66D7EF2D02FC7B00F7A97D /* ActivityItemExample.swift */; }; 6D6E86252C50D42000EDB6F4 /* FioriButtonInListExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D6E86242C50D42000EDB6F4 /* FioriButtonInListExample.swift */; }; 6D6E86292C50E5F900EDB6F4 /* FioriButtonInListMultipleLineExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D6E86282C50E5F900EDB6F4 /* FioriButtonInListMultipleLineExample.swift */; }; 6D6E86672C50FDBE00EDB6F4 /* FioriButtonInCollectionExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D6E86662C50FDBE00EDB6F4 /* FioriButtonInCollectionExample.swift */; }; @@ -262,6 +263,7 @@ 6D10F89F2C7DB3F50071DD3E /* BannerMultiMessageExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BannerMultiMessageExample.swift; sourceTree = ""; }; 6D14F05D2C9290F20053BA98 /* BannerMultiMessageCustomInitExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BannerMultiMessageCustomInitExample.swift; sourceTree = ""; }; 6D3A3DE82CDB5F1E004D4597 /* ObjectCellEnhancementExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ObjectCellEnhancementExample.swift; sourceTree = ""; }; + 6D66D7EF2D02FC7B00F7A97D /* ActivityItemExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityItemExample.swift; sourceTree = ""; }; 6D6E86242C50D42000EDB6F4 /* FioriButtonInListExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FioriButtonInListExample.swift; sourceTree = ""; }; 6D6E86282C50E5F900EDB6F4 /* FioriButtonInListMultipleLineExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FioriButtonInListMultipleLineExample.swift; sourceTree = ""; }; 6D6E86662C50FDBE00EDB6F4 /* FioriButtonInCollectionExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FioriButtonInCollectionExample.swift; sourceTree = ""; }; @@ -569,6 +571,14 @@ path = SideBar; sourceTree = ""; }; + 6D66D7F02D02FC7B00F7A97D /* ActivityItem */ = { + isa = PBXGroup; + children = ( + 6D66D7EF2D02FC7B00F7A97D /* ActivityItemExample.swift */, + ); + path = ActivityItem; + sourceTree = ""; + }; 8732C2C32C35092D002110E9 /* Timeline */ = { isa = PBXGroup; children = ( @@ -662,6 +672,7 @@ 8A5579C824C1293C0098003A /* FioriSwiftUICore */ = { isa = PBXGroup; children = ( + 6D66D7F02D02FC7B00F7A97D /* ActivityItem */, 87F14B192CD86F65004A69A0 /* DocumentScannerView */, 3CD71F272CDB625000B037EB /* CheckoutIndicator */, 3CC870942CB6F4E20081909C /* ToastMessage */, @@ -1197,6 +1208,7 @@ B846F94A26815DF30085044B /* ContactItemCompactExamples.swift in Sources */, C106AD442B33710800FE8B35 /* SearchWithScope.swift in Sources */, 6D14F05E2C9290F20053BA98 /* BannerMultiMessageCustomInitExample.swift in Sources */, + 6D66D7F12D02FC7B00F7A97D /* ActivityItemExample.swift in Sources */, 6DEC32042C4E49C70084DD20 /* CardFixedWidthButtonsExample.swift in Sources */, B1C7DC8129FBB13F00DC5EEB /* SPIModelExample.swift in Sources */, C106AD462B338D1300FE8B35 /* SearchWithToken.swift in Sources */, diff --git a/Apps/Examples/Examples/FioriSwiftUICore/ActivityItem/ActivityItemExample.swift b/Apps/Examples/Examples/FioriSwiftUICore/ActivityItem/ActivityItemExample.swift new file mode 100644 index 000000000..894f9797f --- /dev/null +++ b/Apps/Examples/Examples/FioriSwiftUICore/ActivityItem/ActivityItemExample.swift @@ -0,0 +1,49 @@ +import FioriSwiftUICore +import SwiftUI + +struct ActivityItemExample: View { + var body: some View { + List { + Section { + ActivityItem(icon: Image(systemName: "phone"), subtitle: AttributedString("phone")) + ActivityItem(icon: Image(systemName: "envelope"), subtitle: AttributedString("envelope")) + ActivityItem(icon: Image(systemName: "message"), subtitle: AttributedString("message")) + ActivityItem(icon: Image(systemName: "video"), subtitle: AttributedString("video")) + } header: { + Text("Normal-Vertical") + } + + Section { + ActivityItem(icon: Image(systemName: "phone"), subtitle: AttributedString("phone"), layout: .horizontal) + ActivityItem(icon: Image(systemName: "envelope"), subtitle: AttributedString("envelope"), layout: .horizontal) + ActivityItem(icon: Image(systemName: "message"), subtitle: AttributedString("message"), layout: .horizontal) + ActivityItem(icon: Image(systemName: "video"), subtitle: AttributedString("video"), layout: .horizontal) + } header: { + Text("Normal-Horizontal") + } + + Section { + ActivityItem(icon: Image(systemName: "phone")) + ActivityItem(icon: Image(systemName: "envelope")) + ActivityItem(icon: Image(systemName: "message")) + ActivityItem(icon: Image(systemName: "video")) + } header: { + Text("Only Icon") + } + + Section { + ActivityItem(subtitle: AttributedString("phone")) + ActivityItem(subtitle: AttributedString("envelope")) + ActivityItem(subtitle: AttributedString("message")) + ActivityItem(subtitle: AttributedString("video")) + } header: { + Text("Only Subtitle") + } + } + .navigationTitle(Text("ActivityItemExample")) + } +} + +#Preview { + ActivityItemExample() +} diff --git a/Apps/Examples/Examples/FioriSwiftUICore/CoreContentView.swift b/Apps/Examples/Examples/FioriSwiftUICore/CoreContentView.swift index 4e350880c..1f26f2d50 100644 --- a/Apps/Examples/Examples/FioriSwiftUICore/CoreContentView.swift +++ b/Apps/Examples/Examples/FioriSwiftUICore/CoreContentView.swift @@ -7,6 +7,12 @@ struct CoreContentView: View { var body: some View { List { Section(header: Text("Views")) { + NavigationLink { + ActivityItemExample() + } label: { + Text("ActivityItem") + } + NavigationLink( destination: AvatarStackExample(), label: { diff --git a/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift b/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift index d15ab7c5c..8081c3e6f 100644 --- a/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift +++ b/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift @@ -97,7 +97,11 @@ public protocol ActionModel: ActionComponent {} public protocol TextInputModel: TextInputComponent {} // sourcery: generated_component -public protocol ActivityItemModel: IconComponent, SubtitleComponent {} +public protocol _ActivityItemModel: IconComponent, SubtitleComponent {} + +/// Deprecated ActivityItemModel +@available(*, unavailable, renamed: "_ActivityItemModel", message: "Will be removed in the future release. Please create ActivityItemModel with other initializers instead.") +public protocol ActivityItemModel {} // sourcery: generated_component_not_configurable public protocol ActivityItemsModel: ActionItemsComponent {} diff --git a/Sources/FioriSwiftUICore/Views/ActivityItem+View.swift b/Sources/FioriSwiftUICore/Views/ActivityItem+View.swift index 1c513a6c4..265239b1e 100644 --- a/Sources/FioriSwiftUICore/Views/ActivityItem+View.swift +++ b/Sources/FioriSwiftUICore/Views/ActivityItem+View.swift @@ -3,7 +3,7 @@ import SwiftUI // FIXME: - Implement Fiori style definitions extension Fiori { - enum ActivityItem { + enum _ActivityItem { typealias Icon = EmptyModifier typealias Subtitle = EmptyModifier typealias IconCumulative = EmptyModifier @@ -30,7 +30,7 @@ extension Fiori { // FIXME: - Implement ActivityItem View body -extension ActivityItem: View { +extension _ActivityItem: View { public var body: some View { VStack { icon diff --git a/Sources/FioriSwiftUICore/_ComponentProtocols/CompositeComponentProtocols.swift b/Sources/FioriSwiftUICore/_ComponentProtocols/CompositeComponentProtocols.swift index aac3d749f..8a4987bc3 100755 --- a/Sources/FioriSwiftUICore/_ComponentProtocols/CompositeComponentProtocols.swift +++ b/Sources/FioriSwiftUICore/_ComponentProtocols/CompositeComponentProtocols.swift @@ -1,6 +1,8 @@ import Foundation import SwiftUI +// swiftlint:disable file_length + /// A view that displays information of an object. // sourcery: CompositeComponent protocol _ObjectItemComponent: _TitleComponent, _SubtitleComponent, _FootnoteComponent, _DescriptionComponent, _StatusComponent, _SubstatusComponent, _DetailImageComponent, _IconsComponent, _AvatarsComponent, _FootnoteIconsComponent, _FootnoteIconsTextComponent, _TagsComponent, _ActionComponent { @@ -726,3 +728,10 @@ protocol _ProgressIndicatorComponent: _ProgressIndicatorProtocol {} /// ``` // sourcery: CompositeComponent protocol _ProcessingIndicatorComponent: _OptionalTitleComponent {} + +// sourcery: CompositeComponent +protocol _ActivityItemComponent: _IconComponent, _SubtitleComponent { + /// Activity item layout. The default is .vertical + // sourcery: defaultValue = .vertical + var layout: ActivityItemLayout { get } +} diff --git a/Sources/FioriSwiftUICore/_FioriStyles/ActivityItemStyle.fiori.swift b/Sources/FioriSwiftUICore/_FioriStyles/ActivityItemStyle.fiori.swift new file mode 100644 index 000000000..09d2e866d --- /dev/null +++ b/Sources/FioriSwiftUICore/_FioriStyles/ActivityItemStyle.fiori.swift @@ -0,0 +1,57 @@ +import FioriThemeManager +import Foundation +import SwiftUI + +/// Activity item layout +public enum ActivityItemLayout { + /// Vertical layout for ActivityItem. + case vertical + /// Horizontal layout for ActivityItem. + case horizontal +} + +// Base Layout style +public struct ActivityItemBaseStyle: ActivityItemStyle { + public func makeBody(_ configuration: ActivityItemConfiguration) -> some View { + // Add default layout here + switch configuration.layout { + case .vertical: + VStack { + configuration.icon + configuration.subtitle + } + .typeErased + case .horizontal: + HStack { + configuration.icon + configuration.subtitle + } + .typeErased + } + } +} + +// Default fiori styles +extension ActivityItemFioriStyle { + struct ContentFioriStyle: ActivityItemStyle { + func makeBody(_ configuration: ActivityItemConfiguration) -> some View { + ActivityItem(configuration) + } + } + + struct IconFioriStyle: IconStyle { + let activityItemConfiguration: ActivityItemConfiguration + + func makeBody(_ configuration: IconConfiguration) -> some View { + Icon(configuration) + } + } + + struct SubtitleFioriStyle: SubtitleStyle { + let activityItemConfiguration: ActivityItemConfiguration + + func makeBody(_ configuration: SubtitleConfiguration) -> some View { + Subtitle(configuration) + } + } +} diff --git a/Sources/FioriSwiftUICore/_generated/StyleableComponents/ActivityItem/ActivityItem.generated.swift b/Sources/FioriSwiftUICore/_generated/StyleableComponents/ActivityItem/ActivityItem.generated.swift new file mode 100644 index 000000000..2618cf2be --- /dev/null +++ b/Sources/FioriSwiftUICore/_generated/StyleableComponents/ActivityItem/ActivityItem.generated.swift @@ -0,0 +1,76 @@ +// Generated using Sourcery 2.1.7 — https://github.com/krzysztofzablocki/Sourcery +// DO NOT EDIT +import Foundation +import SwiftUI + +public struct ActivityItem { + let icon: any View + let subtitle: any View + /// Activity item layout. The default is .vertical + let layout: ActivityItemLayout + + @Environment(\.activityItemStyle) var style + + fileprivate var _shouldApplyDefaultStyle = true + + public init(@ViewBuilder icon: () -> any View = { EmptyView() }, + @ViewBuilder subtitle: () -> any View = { EmptyView() }, + layout: ActivityItemLayout = .vertical) + { + self.icon = Icon(icon: icon) + self.subtitle = Subtitle(subtitle: subtitle) + self.layout = layout + } +} + +public extension ActivityItem { + init(icon: Image? = nil, + subtitle: AttributedString? = nil, + layout: ActivityItemLayout = .vertical) + { + self.init(icon: { icon }, subtitle: { OptionalText(subtitle) }, layout: layout) + } +} + +public extension ActivityItem { + init(_ configuration: ActivityItemConfiguration) { + self.init(configuration, shouldApplyDefaultStyle: false) + } + + internal init(_ configuration: ActivityItemConfiguration, shouldApplyDefaultStyle: Bool) { + self.icon = configuration.icon + self.subtitle = configuration.subtitle + self.layout = configuration.layout + self._shouldApplyDefaultStyle = shouldApplyDefaultStyle + } +} + +extension ActivityItem: View { + public var body: some View { + if self._shouldApplyDefaultStyle { + self.defaultStyle() + } else { + self.style.resolve(configuration: .init(icon: .init(self.icon), subtitle: .init(self.subtitle), layout: self.layout)).typeErased + .transformEnvironment(\.activityItemStyleStack) { stack in + if !stack.isEmpty { + stack.removeLast() + } + } + } + } +} + +private extension ActivityItem { + func shouldApplyDefaultStyle(_ bool: Bool) -> some View { + var s = self + s._shouldApplyDefaultStyle = bool + return s + } + + func defaultStyle() -> some View { + ActivityItem(.init(icon: .init(self.icon), subtitle: .init(self.subtitle), layout: self.layout)) + .shouldApplyDefaultStyle(false) + .activityItemStyle(ActivityItemFioriStyle.ContentFioriStyle()) + .typeErased + } +} diff --git a/Sources/FioriSwiftUICore/_generated/StyleableComponents/ActivityItem/ActivityItemStyle.generated.swift b/Sources/FioriSwiftUICore/_generated/StyleableComponents/ActivityItem/ActivityItemStyle.generated.swift new file mode 100644 index 000000000..7ff56ed08 --- /dev/null +++ b/Sources/FioriSwiftUICore/_generated/StyleableComponents/ActivityItem/ActivityItemStyle.generated.swift @@ -0,0 +1,39 @@ +// Generated using Sourcery 2.1.7 — https://github.com/krzysztofzablocki/Sourcery +// DO NOT EDIT +import Foundation +import SwiftUI + +public protocol ActivityItemStyle: DynamicProperty { + associatedtype Body: View + + func makeBody(_ configuration: ActivityItemConfiguration) -> Body +} + +struct AnyActivityItemStyle: ActivityItemStyle { + let content: (ActivityItemConfiguration) -> any View + + init(@ViewBuilder _ content: @escaping (ActivityItemConfiguration) -> any View) { + self.content = content + } + + public func makeBody(_ configuration: ActivityItemConfiguration) -> some View { + self.content(configuration).typeErased + } +} + +public struct ActivityItemConfiguration { + public let icon: Icon + public let subtitle: Subtitle + public let layout: ActivityItemLayout + + public typealias Icon = ConfigurationViewWrapper + public typealias Subtitle = ConfigurationViewWrapper +} + +public struct ActivityItemFioriStyle: ActivityItemStyle { + public func makeBody(_ configuration: ActivityItemConfiguration) -> some View { + ActivityItem(configuration) + .iconStyle(IconFioriStyle(activityItemConfiguration: configuration)) + .subtitleStyle(SubtitleFioriStyle(activityItemConfiguration: configuration)) + } +} diff --git a/Sources/FioriSwiftUICore/_generated/StyleableComponents/ObjectItem/ObjectItem.generated.swift b/Sources/FioriSwiftUICore/_generated/StyleableComponents/ObjectItem/ObjectItem.generated.swift index 0b235f1f9..bed739d03 100755 --- a/Sources/FioriSwiftUICore/_generated/StyleableComponents/ObjectItem/ObjectItem.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/StyleableComponents/ObjectItem/ObjectItem.generated.swift @@ -18,6 +18,7 @@ public struct ObjectItem { let footnoteIconsText: any View let tags: any View let action: any View + /// For accessory enhancement let objectItemButton: any View @Environment(\.objectItemStyle) var style diff --git a/Sources/FioriSwiftUICore/_generated/StyleableComponents/ValuePicker/ValuePicker.generated.swift b/Sources/FioriSwiftUICore/_generated/StyleableComponents/ValuePicker/ValuePicker.generated.swift index d8c54f6f2..0dfb2bf0c 100644 --- a/Sources/FioriSwiftUICore/_generated/StyleableComponents/ValuePicker/ValuePicker.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/StyleableComponents/ValuePicker/ValuePicker.generated.swift @@ -3,8 +3,7 @@ import Foundation import SwiftUI -/// `ValuePicker` provides a title and value label with Fiori styling and a wheel-style`Picker`. -/// +/// `ValuePicker` provides a title and value label with Fiori styling and a wheel-style `Picker`. /// ## Usage /// ```swift /// let valueOptions :[AttributedString] = ["1", "20", "300"] @@ -13,10 +12,6 @@ import SwiftUI /// @State var stateIndex: Int = 0 /// @State var isTrackingLiveChanges = true /// @State var showsErrorMessage = false -/// -/// ValuePicker(title: "Picker Title(Default Style)", isRequired: self.isRequired, options: self.valueOptions, selectedIndex: self.$selectedIndex, isTrackingLiveChanges: self.isTrackingLiveChanges) -/// .informationView(isPresented: self.$showsErrorMessage, description: AttributedString("Please choose one available data")) -/// .informationViewStyle(.informational) /// ``` public struct ValuePicker { let title: any View @@ -24,13 +19,13 @@ public struct ValuePicker { let mandatoryFieldIndicator: any View let isRequired: Bool let options: [AttributedString] - /// The selected value index of the Value Picker + /// The index for the selected value in the valueOptions. @Binding var selectedIndex: Int /// When `isTrackingLiveChanges` is true, the value will be shown every time a selection is made. If it is set to false, the value will only be displayed when the value picker is collapsed. The default setting is true. var isTrackingLiveChanges: Bool /// This property indicates whether the picker is to always be displayed. The default is false. var alwaysShowPicker: Bool - /// The `ControlState` of the view. The default is `normal` + /// The `ControlState` of the view. Currently, `.disabled`, `.normal` and `.readOnly` are supported. The default is `normal`. let controlState: ControlState @Environment(\.valuePickerStyle) var style diff --git a/Sources/FioriSwiftUICore/_generated/SupportingFiles/ComponentStyleProtocol+Extension.generated.swift b/Sources/FioriSwiftUICore/_generated/SupportingFiles/ComponentStyleProtocol+Extension.generated.swift index f3d382ca6..27750a0fe 100755 --- a/Sources/FioriSwiftUICore/_generated/SupportingFiles/ComponentStyleProtocol+Extension.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/SupportingFiles/ComponentStyleProtocol+Extension.generated.swift @@ -31,6 +31,62 @@ public extension ActionStyle where Self == ActionFioriStyle { } } +// MARK: ActivityItemStyle + +public extension ActivityItemStyle where Self == ActivityItemBaseStyle { + static var base: ActivityItemBaseStyle { + ActivityItemBaseStyle() + } +} + +public extension ActivityItemStyle where Self == ActivityItemFioriStyle { + static var fiori: ActivityItemFioriStyle { + ActivityItemFioriStyle() + } +} + +public struct ActivityItemIconStyle: ActivityItemStyle { + let style: any IconStyle + + public func makeBody(_ configuration: ActivityItemConfiguration) -> some View { + ActivityItem(configuration) + .iconStyle(self.style) + .typeErased + } +} + +public extension ActivityItemStyle where Self == ActivityItemIconStyle { + static func iconStyle(_ style: some IconStyle) -> ActivityItemIconStyle { + ActivityItemIconStyle(style: style) + } + + static func iconStyle(@ViewBuilder content: @escaping (IconConfiguration) -> some View) -> ActivityItemIconStyle { + let style = AnyIconStyle(content) + return ActivityItemIconStyle(style: style) + } +} + +public struct ActivityItemSubtitleStyle: ActivityItemStyle { + let style: any SubtitleStyle + + public func makeBody(_ configuration: ActivityItemConfiguration) -> some View { + ActivityItem(configuration) + .subtitleStyle(self.style) + .typeErased + } +} + +public extension ActivityItemStyle where Self == ActivityItemSubtitleStyle { + static func subtitleStyle(_ style: some SubtitleStyle) -> ActivityItemSubtitleStyle { + ActivityItemSubtitleStyle(style: style) + } + + static func subtitleStyle(@ViewBuilder content: @escaping (SubtitleConfiguration) -> some View) -> ActivityItemSubtitleStyle { + let style = AnySubtitleStyle(content) + return ActivityItemSubtitleStyle(style: style) + } +} + // MARK: AllEntriesSectionTitleStyle public extension AllEntriesSectionTitleStyle where Self == AllEntriesSectionTitleBaseStyle { diff --git a/Sources/FioriSwiftUICore/_generated/SupportingFiles/EnvironmentVariables.generated.swift b/Sources/FioriSwiftUICore/_generated/SupportingFiles/EnvironmentVariables.generated.swift index ee7cc3b96..08e85bf44 100755 --- a/Sources/FioriSwiftUICore/_generated/SupportingFiles/EnvironmentVariables.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/SupportingFiles/EnvironmentVariables.generated.swift @@ -45,6 +45,27 @@ extension EnvironmentValues { } } +// MARK: ActivityItemStyle + +struct ActivityItemStyleStackKey: EnvironmentKey { + static let defaultValue: [any ActivityItemStyle] = [] +} + +extension EnvironmentValues { + var activityItemStyle: any ActivityItemStyle { + self.activityItemStyleStack.last ?? .base.concat(.fiori) + } + + var activityItemStyleStack: [any ActivityItemStyle] { + get { + self[ActivityItemStyleStackKey.self] + } + set { + self[ActivityItemStyleStackKey.self] = newValue + } + } +} + // MARK: AllEntriesSectionTitleStyle struct AllEntriesSectionTitleStyleStackKey: EnvironmentKey { diff --git a/Sources/FioriSwiftUICore/_generated/SupportingFiles/ModifiedStyle.generated.swift b/Sources/FioriSwiftUICore/_generated/SupportingFiles/ModifiedStyle.generated.swift index 28bfbf018..9918dfd41 100755 --- a/Sources/FioriSwiftUICore/_generated/SupportingFiles/ModifiedStyle.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/SupportingFiles/ModifiedStyle.generated.swift @@ -64,6 +64,34 @@ public extension ActionStyle { } } +// MARK: ActivityItemStyle + +extension ModifiedStyle: ActivityItemStyle where Style: ActivityItemStyle { + public func makeBody(_ configuration: ActivityItemConfiguration) -> some View { + ActivityItem(configuration) + .activityItemStyle(self.style) + .modifier(self.modifier) + } +} + +public struct ActivityItemStyleModifier: ViewModifier { + let style: Style + + public func body(content: Content) -> some View { + content.activityItemStyle(self.style) + } +} + +public extension ActivityItemStyle { + func modifier(_ modifier: some ViewModifier) -> some ActivityItemStyle { + ModifiedStyle(style: self, modifier: modifier) + } + + func concat(_ style: some ActivityItemStyle) -> some ActivityItemStyle { + style.modifier(ActivityItemStyleModifier(style: self)) + } +} + // MARK: AllEntriesSectionTitleStyle extension ModifiedStyle: AllEntriesSectionTitleStyle where Style: AllEntriesSectionTitleStyle { diff --git a/Sources/FioriSwiftUICore/_generated/SupportingFiles/ResolvedStyle.generated.swift b/Sources/FioriSwiftUICore/_generated/SupportingFiles/ResolvedStyle.generated.swift index c7e2c8671..467a47997 100755 --- a/Sources/FioriSwiftUICore/_generated/SupportingFiles/ResolvedStyle.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/SupportingFiles/ResolvedStyle.generated.swift @@ -35,6 +35,22 @@ extension ActionStyle { } } +// MARK: ActivityItemStyle + +struct ResolvedActivityItemStyle: View { + let style: Style + let configuration: ActivityItemConfiguration + var body: some View { + self.style.makeBody(self.configuration) + } +} + +extension ActivityItemStyle { + func resolve(configuration: ActivityItemConfiguration) -> some View { + ResolvedActivityItemStyle(style: self, configuration: configuration) + } +} + // MARK: AllEntriesSectionTitleStyle struct ResolvedAllEntriesSectionTitleStyle: View { diff --git a/Sources/FioriSwiftUICore/_generated/SupportingFiles/View+Extension_.generated.swift b/Sources/FioriSwiftUICore/_generated/SupportingFiles/View+Extension_.generated.swift index bdf5287b7..97a3892a8 100755 --- a/Sources/FioriSwiftUICore/_generated/SupportingFiles/View+Extension_.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/SupportingFiles/View+Extension_.generated.swift @@ -37,6 +37,23 @@ public extension View { } } +// MARK: ActivityItemStyle + +public extension View { + func activityItemStyle(_ style: some ActivityItemStyle) -> some View { + self.transformEnvironment(\.activityItemStyleStack) { stack in + stack.append(style) + } + } + + func activityItemStyle(@ViewBuilder content: @escaping (ActivityItemConfiguration) -> some View) -> some View { + self.transformEnvironment(\.activityItemStyleStack) { stack in + let style = AnyActivityItemStyle(content) + stack.append(style) + } + } +} + // MARK: AllEntriesSectionTitleStyle public extension View { diff --git a/Sources/FioriSwiftUICore/_generated/SupportingFiles/ViewEmptyChecking+Extension.generated.swift b/Sources/FioriSwiftUICore/_generated/SupportingFiles/ViewEmptyChecking+Extension.generated.swift index a9d3b6671..8df0a195f 100755 --- a/Sources/FioriSwiftUICore/_generated/SupportingFiles/ViewEmptyChecking+Extension.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/SupportingFiles/ViewEmptyChecking+Extension.generated.swift @@ -15,6 +15,13 @@ extension Action: _ViewEmptyChecking { } } +extension ActivityItem: _ViewEmptyChecking { + public var isEmpty: Bool { + icon.isEmpty && + subtitle.isEmpty + } +} + extension AllEntriesSectionTitle: _ViewEmptyChecking { public var isEmpty: Bool { allEntriesSectionTitle.isEmpty diff --git a/Sources/FioriSwiftUICore/_generated/ViewModels/API/ObjectHeader+API.generated.swift b/Sources/FioriSwiftUICore/_generated/ViewModels/API/ObjectHeader+API.generated.swift index ce9e41f37..c629f96c7 100644 --- a/Sources/FioriSwiftUICore/_generated/ViewModels/API/ObjectHeader+API.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/ViewModels/API/ObjectHeader+API.generated.swift @@ -25,12 +25,12 @@ public struct ObjectHeader Void)? = nil - var barItemFrame: CGRect = .zero - var disableListEntriesSection: Bool = false - var isSearchBarHidden: Bool = false - var allowsMultipleSelection: Bool = false var allowsEmptySelection: Bool = false - @State var _searchViewCornerRadius: CGFloat = 18 - var selectAll: ((Bool) -> ())? = nil - let popoverWidth = 393.0 - var allowsDisplaySelectionCount: Bool = true @State var _searchText: String = "" var updateSearchListPickerHeight: ((CGFloat) -> ())? = nil + var allowsDisplaySelectionCount: Bool = true @State var _height: CGFloat = 44 + @State var _searchViewCornerRadius: CGFloat = 18 + var allowsMultipleSelection: Bool = false + var disableListEntriesSection: Bool = false + var barItemFrame: CGRect = .zero + var selectAll: ((Bool) -> ())? = nil + var isSearchBarHidden: Bool = false @State var _keyboardHeight: CGFloat = 0.0 + let popoverWidth = 393.0 public init(model: SearchListPickerItemModel) { self.init(value: Binding<[Int]>(get: { model.value }, set: { model.value = $0 }), valueOptions: model.valueOptions, hint: model.hint, onTap: model.onTap) } diff --git a/Sources/FioriSwiftUICore/_generated/ViewModels/API/SearchableListView+API.generated.swift b/Sources/FioriSwiftUICore/_generated/ViewModels/API/SearchableListView+API.generated.swift index 6a16d441d..1af272b12 100644 --- a/Sources/FioriSwiftUICore/_generated/ViewModels/API/SearchableListView+API.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/ViewModels/API/SearchableListView+API.generated.swift @@ -12,8 +12,8 @@ public struct SearchableListView { let _cancelAction: CancelActionView let _doneAction: DoneActionView - var isTopLevel: Bool = true var contentView: AnyView? = nil + var isTopLevel: Bool = true var dataHandler: (() -> ())? = nil private var isModelInit: Bool = false diff --git a/Sources/FioriSwiftUICore/_generated/ViewModels/API/SignatureCaptureView+API.generated.swift b/Sources/FioriSwiftUICore/_generated/ViewModels/API/SignatureCaptureView+API.generated.swift index 57d68dd0e..3bd73cd1c 100644 --- a/Sources/FioriSwiftUICore/_generated/ViewModels/API/SignatureCaptureView+API.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/ViewModels/API/SignatureCaptureView+API.generated.swift @@ -20,35 +20,35 @@ public struct SignatureCaptureView Void)? let _onDelete: (() -> Void)? - var watermarkText: String? - var titleFont = Font.fiori(forTextStyle: .subheadline).weight(.semibold) - var xmarkColor = Color.preferredColor(.quaternaryLabel) - public private(set) var _heightDidChangePublisher = CurrentValueSubject(0) - var drawingViewBackgroundColor = Color.preferredColor(.primaryBackground) - var isRequired = false var indicatorColor = Color.preferredColor(.primaryLabel) + @State var isSaved = false + var appliesTintColorToImage = true + var drawingViewBackgroundColor = Color.preferredColor(.primaryBackground) + var indicatorFont = Font.fiori(forTextStyle: .subheadline).weight(.semibold) @State var currentDrawing = Drawing() - var watermarkTextFont: UIFont = .preferredFont(forTextStyle: .caption1) - var hidesSignatureLine = false - @State var isEditing = false - var hidesXmark = false + let _drawingViewMinHeight: CGFloat = 256 + var signatureLineColor = Color.preferredColor(.quaternaryLabel) @State var drawings = [Drawing]() + var timestampFormatter: DateFormatter? + var watermarkTextColor: Color = .preferredColor(.tertiaryLabel) + var titleFont = Font.fiori(forTextStyle: .subheadline).weight(.semibold) + var hidesXmark = false + var hidesSignatureLine = false var cropsImage = false @State var isReenterTapped = false - var strokeWidth: CGFloat = 3.0 - let _drawingViewMinHeight: CGFloat = 256 - var strokeColor = Color.preferredColor(.primaryLabel) - var titleColor = Color.preferredColor(.primaryLabel) + var isRequired = false + var xmarkColor = Color.preferredColor(.quaternaryLabel) @State var fullSignatureImage: UIImage? - var signatureLineColor = Color.preferredColor(.quaternaryLabel) - var timestampFormatter: DateFormatter? + var strokeWidth: CGFloat = 3.0 var addsTimestampInImage: Bool = false - @State var isSaved = false - var _drawingViewMaxHeight: CGFloat? - var appliesTintColorToImage = true - var watermarkTextColor: Color = .preferredColor(.tertiaryLabel) + var watermarkText: String? var watermarkTextAlignment: NSTextAlignment = .natural - var indicatorFont = Font.fiori(forTextStyle: .subheadline).weight(.semibold) + var watermarkTextFont: UIFont = .preferredFont(forTextStyle: .caption1) + var titleColor = Color.preferredColor(.primaryLabel) + var _drawingViewMaxHeight: CGFloat? + public private(set) var _heightDidChangePublisher = CurrentValueSubject(0) + @State var isEditing = false + var strokeColor = Color.preferredColor(.primaryLabel) private var isModelInit: Bool = false private var isTitleNil: Bool = false diff --git a/Sources/FioriSwiftUICore/_generated/ViewModels/API/SingleStep+API.generated.swift b/Sources/FioriSwiftUICore/_generated/ViewModels/API/SingleStep+API.generated.swift index ef4158909..2dd398a18 100644 --- a/Sources/FioriSwiftUICore/_generated/ViewModels/API/SingleStep+API.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/ViewModels/API/SingleStep+API.generated.swift @@ -14,15 +14,15 @@ public struct SingleStep Void)? - @State var size: CGSize = .zero let popoverWidth = 393.0 + @State var size: CGSize = .zero @StateObject var context: SortFilterContext = SortFilterContext() private var isModelInit: Bool = false diff --git a/Sources/FioriSwiftUICore/_generated/ViewModels/API/StepProgressIndicator+API.generated.swift b/Sources/FioriSwiftUICore/_generated/ViewModels/API/StepProgressIndicator+API.generated.swift index d91508341..2c2a3f1b6 100644 --- a/Sources/FioriSwiftUICore/_generated/ViewModels/API/StepProgressIndicator+API.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/ViewModels/API/StepProgressIndicator+API.generated.swift @@ -14,9 +14,9 @@ public struct StepProgressIndicator { let _didDeny: ((Int, Bool) -> Void)? let _didCancel: ((Int) -> Void)? let _didFinish: (([Int]) -> Void)? - @State var _formIndex = 0 @State var _allowedFormIndexes: [Int] = [] + @State var _formIndex = 0 private var isModelInit: Bool = false private var isDidAllowNil: Bool = false diff --git a/Sources/FioriSwiftUICore/_generated/ViewModels/API/ActivityItem+API.generated.swift b/Sources/FioriSwiftUICore/_generated/ViewModels/API/_ActivityItem+API.generated.swift similarity index 72% rename from Sources/FioriSwiftUICore/_generated/ViewModels/API/ActivityItem+API.generated.swift rename to Sources/FioriSwiftUICore/_generated/ViewModels/API/_ActivityItem+API.generated.swift index 66bb0fe63..c7667ea4e 100644 --- a/Sources/FioriSwiftUICore/_generated/ViewModels/API/ActivityItem+API.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/ViewModels/API/_ActivityItem+API.generated.swift @@ -2,7 +2,7 @@ // DO NOT EDIT import SwiftUI -public struct ActivityItem { +public struct _ActivityItem { @Environment(\.iconModifier) private var iconModifier @Environment(\.subtitleModifier) private var subtitleModifier @@ -23,16 +23,16 @@ public struct ActivityItem { @ViewBuilder var icon: some View { if isModelInit { - _icon.modifier(iconModifier.concat(Fiori.ActivityItem.icon).concat(Fiori.ActivityItem.iconCumulative)) + _icon.modifier(iconModifier.concat(Fiori._ActivityItem.icon).concat(Fiori._ActivityItem.iconCumulative)) } else { - _icon.modifier(iconModifier.concat(Fiori.ActivityItem.icon)) + _icon.modifier(iconModifier.concat(Fiori._ActivityItem.icon)) } } @ViewBuilder var subtitle: some View { if isModelInit { - _subtitle.modifier(subtitleModifier.concat(Fiori.ActivityItem.subtitle).concat(Fiori.ActivityItem.subtitleCumulative)) + _subtitle.modifier(subtitleModifier.concat(Fiori._ActivityItem.subtitle).concat(Fiori._ActivityItem.subtitleCumulative)) } else { - _subtitle.modifier(subtitleModifier.concat(Fiori.ActivityItem.subtitle)) + _subtitle.modifier(subtitleModifier.concat(Fiori._ActivityItem.subtitle)) } } @@ -45,10 +45,10 @@ public struct ActivityItem { } } -extension ActivityItem where Icon == _ConditionalContent, +extension _ActivityItem where Icon == _ConditionalContent, Subtitle == _ConditionalContent { - public init(model: ActivityItemModel) { + public init(model: _ActivityItemModel) { self.init(icon: model.icon, subtitle: model.subtitle) } diff --git a/Sources/FioriSwiftUICore/_generated/ViewModels/Boilerplate/ActivityItem+View.generated.swift b/Sources/FioriSwiftUICore/_generated/ViewModels/Boilerplate/_ActivityItem+View.generated.swift similarity index 81% rename from Sources/FioriSwiftUICore/_generated/ViewModels/Boilerplate/ActivityItem+View.generated.swift rename to Sources/FioriSwiftUICore/_generated/ViewModels/Boilerplate/_ActivityItem+View.generated.swift index cc1bf8f1d..6b9fced29 100644 --- a/Sources/FioriSwiftUICore/_generated/ViewModels/Boilerplate/ActivityItem+View.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/ViewModels/Boilerplate/_ActivityItem+View.generated.swift @@ -1,8 +1,8 @@ // Generated using Sourcery 2.1.7 — https://github.com/krzysztofzablocki/Sourcery // DO NOT EDIT -//TODO: Copy commented code to new file: `FioriSwiftUICore/Views/ActivityItem+View.swift` +//TODO: Copy commented code to new file: `FioriSwiftUICore/Views/_ActivityItem+View.swift` //TODO: Implement default Fiori style definitions as `ViewModifier` -//TODO: Implement ActivityItem `View` body +//TODO: Implement _ActivityItem `View` body //TODO: Implement LibraryContentProvider /// - Important: to make `@Environment` properties (e.g. `horizontalSizeClass`), internally accessible @@ -16,7 +16,7 @@ import SwiftUI // FIXME: - Implement Fiori style definitions extension Fiori { - enum ActivityItem { + enum _ActivityItem { typealias Icon = EmptyModifier typealias IconCumulative = EmptyModifier typealias Subtitle = EmptyModifier @@ -41,21 +41,21 @@ extension Fiori { } } -// FIXME: - Implement ActivityItem View body +// FIXME: - Implement _ActivityItem View body -extension ActivityItem: View { +extension _ActivityItem: View { public var body: some View { <# View body #> } } -// FIXME: - Implement ActivityItem specific LibraryContentProvider +// FIXME: - Implement _ActivityItem specific LibraryContentProvider @available(iOS 14.0, macOS 11.0, *) -struct ActivityItemLibraryContent: LibraryContentProvider { +struct _ActivityItemLibraryContent: LibraryContentProvider { @LibraryContentBuilder var views: [LibraryItem] { - LibraryItem(ActivityItem(model: LibraryPreviewData.Person.laurelosborn), + LibraryItem(_ActivityItem(model: LibraryPreviewData.Person.laurelosborn), category: .control) } } diff --git a/Sources/FioriSwiftUICore/_generated/ViewModels/Init+Extensions/ActivityItem+Init.generated.swift b/Sources/FioriSwiftUICore/_generated/ViewModels/Init+Extensions/_ActivityItem+Init.generated.swift similarity index 75% rename from Sources/FioriSwiftUICore/_generated/ViewModels/Init+Extensions/ActivityItem+Init.generated.swift rename to Sources/FioriSwiftUICore/_generated/ViewModels/Init+Extensions/_ActivityItem+Init.generated.swift index a8f6af945..ff65f698f 100644 --- a/Sources/FioriSwiftUICore/_generated/ViewModels/Init+Extensions/ActivityItem+Init.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/ViewModels/Init+Extensions/_ActivityItem+Init.generated.swift @@ -2,7 +2,7 @@ // DO NOT EDIT import SwiftUI -extension ActivityItem where Icon == EmptyView { +extension _ActivityItem where Icon == EmptyView { public init( @ViewBuilder subtitle: () -> Subtitle ) { @@ -13,7 +13,7 @@ extension ActivityItem where Icon == EmptyView { } } -extension ActivityItem where Subtitle == EmptyView { +extension _ActivityItem where Subtitle == EmptyView { public init( @ViewBuilder icon: () -> Icon ) { @@ -24,7 +24,7 @@ extension ActivityItem where Subtitle == EmptyView { } } -extension ActivityItem where Icon == EmptyView, Subtitle == EmptyView { +extension _ActivityItem where Icon == EmptyView, Subtitle == EmptyView { public init( ) { diff --git a/sourcery/.lib/Sources/utils/Type+Extensions.swift b/sourcery/.lib/Sources/utils/Type+Extensions.swift index 31c29bb2b..b700f461d 100644 --- a/sourcery/.lib/Sources/utils/Type+Extensions.swift +++ b/sourcery/.lib/Sources/utils/Type+Extensions.swift @@ -73,6 +73,7 @@ public extension Type { "_ObjectItemModel", "_SideBarModel", "_SideBarListItemModel", + "_ActivityItemModel", "_ProgressIndicatorModel"] if deprecatedComponents.contains(name) { diff --git a/sourcery/allPhasesNoCache.sh b/sourcery/allPhasesNoCache.sh old mode 100644 new mode 100755 From 46d38191a4569f67347aa04bb3c1cc960931679a Mon Sep 17 00:00:00 2001 From: Hengyi Zhang Date: Mon, 9 Dec 2024 09:14:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20[JIRA:HCPSDKFIORIUIK?= =?UTF-8?q?IT-2880]=20ActivityItemModel=20Refactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_ComponentProtocols/CompositeComponentProtocols.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/FioriSwiftUICore/_ComponentProtocols/CompositeComponentProtocols.swift b/Sources/FioriSwiftUICore/_ComponentProtocols/CompositeComponentProtocols.swift index 8a4987bc3..7882d407a 100755 --- a/Sources/FioriSwiftUICore/_ComponentProtocols/CompositeComponentProtocols.swift +++ b/Sources/FioriSwiftUICore/_ComponentProtocols/CompositeComponentProtocols.swift @@ -729,6 +729,12 @@ protocol _ProgressIndicatorComponent: _ProgressIndicatorProtocol {} // sourcery: CompositeComponent protocol _ProcessingIndicatorComponent: _OptionalTitleComponent {} +/// `ActivityItem` is a View that provides a customizable activity item with icon and subtitle. +/// +/// ## Usage +/// ```swift +/// ActivityItem(icon: Image(systemName: "phone"), subtitle: AttributedString("phone")) +/// ``` // sourcery: CompositeComponent protocol _ActivityItemComponent: _IconComponent, _SubtitleComponent { /// Activity item layout. The default is .vertical From 58a218e709675818acf03f90ca8130d68537c574 Mon Sep 17 00:00:00 2001 From: Hengyi Zhang Date: Tue, 10 Dec 2024 09:36:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20[JIRA:HCPSDKFIORIUIK?= =?UTF-8?q?IT-2880]=20ActivityItemModel=20Refactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/FioriSwiftUICore/Models/ModelDefinitions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift b/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift index 5197b3dc3..a80dd2c2d 100644 --- a/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift +++ b/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift @@ -100,7 +100,7 @@ public protocol TextInputModel: TextInputComponent {} public protocol _ActivityItemModel: IconComponent, SubtitleComponent {} /// Deprecated ActivityItemModel -@available(*, unavailable, renamed: "_ActivityItemModel", message: "Will be removed in the future release. Please create ActivityItemModel with other initializers instead.") +@available(*, unavailable, renamed: "_ActivityItemModel", message: "Will be removed in the future release. Please create ActivityItem with other initializers instead.") public protocol ActivityItemModel {} // sourcery: generated_component_not_configurable