-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Paywalls V2] Adds a StyleFactory (#1965)
- Loading branch information
1 parent
81fc790
commit 43cbbf1
Showing
33 changed files
with
1,047 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/PackageComponent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...s/src/main/kotlin/com/revenuecat/purchases/paywalls/components/PurchaseButtonComponent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
package com.revenuecat.purchases.paywalls.components | ||
|
||
import com.revenuecat.purchases.InternalRevenueCatAPI | ||
import dev.drewhamilton.poko.Poko | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@InternalRevenueCatAPI | ||
@Poko | ||
@Serializable | ||
@SerialName("purchase_button") | ||
internal data class PurchaseButtonComponent( | ||
class PurchaseButtonComponent internal constructor( | ||
@get:JvmSynthetic val stack: StackComponent, | ||
) : PaywallComponent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...ses/src/main/kotlin/com/revenuecat/purchases/paywalls/components/StickyFooterComponent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
package com.revenuecat.purchases.paywalls.components | ||
|
||
import com.revenuecat.purchases.InternalRevenueCatAPI | ||
import dev.drewhamilton.poko.Poko | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@InternalRevenueCatAPI | ||
@Poko | ||
@Serializable | ||
@SerialName("sticky_footer") | ||
internal data class StickyFooterComponent( | ||
class StickyFooterComponent internal constructor( | ||
@get:JvmSynthetic | ||
val stack: StackComponent, | ||
) : PaywallComponent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/properties/Border.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...src/main/kotlin/com/revenuecat/purchases/paywalls/components/properties/CornerRadiuses.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
...ases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/properties/MaskShape.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/properties/Shape.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
purchases/src/main/kotlin/com/revenuecat/purchases/utils/Result.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
.../main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/PresentedStackPartial.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.revenuecat.purchases.ui.revenuecatui.components | ||
|
||
import com.revenuecat.purchases.paywalls.components.PartialStackComponent | ||
import dev.drewhamilton.poko.Poko | ||
|
||
@Poko | ||
internal class PresentedStackPartial( | ||
@get:JvmSynthetic val partial: PartialStackComponent, | ||
) : PresentedPartial<PresentedStackPartial> { | ||
override fun combine(with: PresentedStackPartial?): PresentedStackPartial { | ||
val otherPartial = with?.partial | ||
|
||
return PresentedStackPartial( | ||
partial = PartialStackComponent( | ||
visible = otherPartial?.visible ?: partial.visible, | ||
dimension = otherPartial?.dimension ?: partial.dimension, | ||
size = otherPartial?.size ?: partial.size, | ||
spacing = otherPartial?.spacing ?: partial.spacing, | ||
backgroundColor = otherPartial?.backgroundColor ?: partial.backgroundColor, | ||
padding = otherPartial?.padding ?: partial.padding, | ||
margin = otherPartial?.margin ?: partial.margin, | ||
shape = otherPartial?.shape ?: partial.shape, | ||
border = otherPartial?.border ?: partial.border, | ||
shadow = otherPartial?.shadow ?: partial.shadow, | ||
), | ||
) | ||
} | ||
} |
Oops, something went wrong.