NTP-41100 | UAT fixes (#15172)
This commit is contained in:
@@ -20,6 +20,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.alpha
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.navi.base.utils.isNotNull
|
||||
import com.navi.insurance.pre.purchase.journey.theme.LocalDimensions
|
||||
import com.navi.naviwidgets.composewidget.reusable.colorBorderAlt
|
||||
@@ -39,7 +40,10 @@ fun HeaderTrackerComposable(
|
||||
) {
|
||||
Box(modifier = modifier) {
|
||||
headerTitle?.let {
|
||||
NaviTextWidgetized(textFieldData = it, modifier = Modifier.fillMaxWidth())
|
||||
NaviTextWidgetized(
|
||||
textFieldData = it,
|
||||
modifier = Modifier.fillMaxWidth().padding(top = 4.dp),
|
||||
)
|
||||
}
|
||||
?: run {
|
||||
HeaderTrackerItemComposable(
|
||||
|
||||
@@ -25,7 +25,6 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.DisposableEffect
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
@@ -78,7 +77,7 @@ fun PolicyReviewScreen(
|
||||
val scrollState = rememberLazyListState()
|
||||
val expandFAB = scrollState.isFirstItemVisible()
|
||||
val scaffoldState = rememberScaffoldState()
|
||||
val showBottomSheet = remember { !viewModel.isBottomSheetShown.value }
|
||||
val showBottomSheet = viewModel.isBottomSheetShown.value.not()
|
||||
val pageResponseState = viewModel.policyReviewPageDataFlow.collectAsStateWithLifecycle()
|
||||
val apiCallMade = rememberSaveable { mutableStateOf(false) }
|
||||
val nextPageResponseState = viewModel.policyReviewTransitionFlow.collectAsStateWithLifecycle()
|
||||
@@ -132,7 +131,7 @@ fun PolicyReviewScreen(
|
||||
} else {
|
||||
val header = successResponse?.header
|
||||
val backCta = successResponse?.backCta
|
||||
if (backCta != null) {
|
||||
if (backCta?.url != null || backCta?.type != null) {
|
||||
viewModel.setBackCta(backCta)
|
||||
}
|
||||
val policyDetails = successResponse?.policyDetails
|
||||
|
||||
@@ -22,6 +22,7 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.shadow
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.navi.base.utils.isNotNullAndNotEmpty
|
||||
import com.navi.insurance.review_policy.model.response.PolicyReviewPageResponse
|
||||
import com.navi.naviwidgets.callbacks.WidgetCallback
|
||||
import com.navi.naviwidgets.composewidget.reusable.darkShadowColor
|
||||
@@ -35,7 +36,7 @@ fun BenefitsWithDividers(
|
||||
widgetCallback: WidgetCallback,
|
||||
) {
|
||||
val items = planBenefitsDetails.benefits
|
||||
items?.let {
|
||||
if (items.isNotNullAndNotEmpty()) {
|
||||
TitleWithSubtitleComposable(
|
||||
title = planBenefitsDetails.headerTitle,
|
||||
modifier = Modifier.padding(16.dp, 40.dp, 16.dp, 16.dp),
|
||||
@@ -61,7 +62,7 @@ fun BenefitsWithDividers(
|
||||
)
|
||||
.padding(16.dp)
|
||||
) {
|
||||
items.forEachIndexed { index, item ->
|
||||
items?.forEachIndexed { index, item ->
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
verticalAlignment = androidx.compose.ui.Alignment.CenterVertically,
|
||||
|
||||
@@ -20,6 +20,7 @@ import androidx.compose.material3.HorizontalDivider
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.navi.base.utils.isNotNullAndNotEmpty
|
||||
import com.navi.design.theme.GreyE3E5E5
|
||||
import com.navi.insurance.review_policy.model.response.PolicyReviewPageResponse
|
||||
import com.navi.naviwidgets.callbacks.WidgetCallback
|
||||
@@ -34,7 +35,7 @@ fun DocumentsWithDividers(
|
||||
widgetCallback: WidgetCallback,
|
||||
) {
|
||||
val items = policyDocumentDetails.documents
|
||||
items?.let {
|
||||
if (items.isNotNullAndNotEmpty()) {
|
||||
TitleWithSubtitleComposable(
|
||||
title = policyDocumentDetails.headerTitle,
|
||||
modifier = Modifier.padding(16.dp, 40.dp, 16.dp, 8.dp),
|
||||
@@ -55,7 +56,7 @@ fun DocumentsWithDividers(
|
||||
)
|
||||
.padding(16.dp)
|
||||
) {
|
||||
items.forEachIndexed { index, item ->
|
||||
items?.forEachIndexed { index, item ->
|
||||
Row(
|
||||
modifier =
|
||||
Modifier.debounceClickable(
|
||||
|
||||
@@ -23,6 +23,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.shadow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.navi.base.utils.isNotNullAndNotEmpty
|
||||
import com.navi.design.theme.GreyEBEBEB
|
||||
import com.navi.insurance.review_policy.model.response.PolicyReviewPageResponse
|
||||
import com.navi.insurance.review_policy.model.response.PolicyReviewPageResponse.MemberDetails.Member
|
||||
@@ -39,7 +40,7 @@ fun MemberDetailsComposable(
|
||||
memberDetails: PolicyReviewPageResponse.MemberDetails,
|
||||
widgetCallback: WidgetCallback,
|
||||
) {
|
||||
memberDetails.members?.let {
|
||||
if (memberDetails.members.isNotNullAndNotEmpty()) {
|
||||
TitleWithSubtitleComposable(
|
||||
title = memberDetails.headerTitle,
|
||||
subTitle = memberDetails.headerSubTitle,
|
||||
@@ -64,7 +65,7 @@ fun MemberDetailsComposable(
|
||||
)
|
||||
.padding(top = 16.dp),
|
||||
) {
|
||||
memberDetails.members.forEachIndexed { _, item ->
|
||||
memberDetails.members?.forEachIndexed { _, item ->
|
||||
MemberDetailsItemComposable(item, widgetCallback)
|
||||
}
|
||||
Column(
|
||||
@@ -119,40 +120,44 @@ fun HealthDetailsDeclarationComposable(
|
||||
redirectionFooter: RedirectionFooter,
|
||||
widgetCallback: WidgetCallback,
|
||||
) {
|
||||
Row(
|
||||
modifier =
|
||||
Modifier.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp)
|
||||
.padding(bottom = 16.dp)
|
||||
.debounceClickable(
|
||||
onClick = { redirectionFooter.cta?.let { cta -> widgetCallback.onClick(cta) } }
|
||||
),
|
||||
verticalAlignment = androidx.compose.ui.Alignment.CenterVertically,
|
||||
) {
|
||||
redirectionFooter.title?.text?.let {
|
||||
Row(
|
||||
modifier = Modifier.weight(1f),
|
||||
modifier =
|
||||
Modifier.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp)
|
||||
.padding(bottom = 16.dp)
|
||||
.debounceClickable(
|
||||
onClick = {
|
||||
redirectionFooter.cta?.let { cta -> widgetCallback.onClick(cta) }
|
||||
}
|
||||
),
|
||||
verticalAlignment = androidx.compose.ui.Alignment.CenterVertically,
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier.weight(1f),
|
||||
verticalAlignment = androidx.compose.ui.Alignment.CenterVertically,
|
||||
) {
|
||||
NaviImage(
|
||||
modifier = Modifier.padding(end = 12.dp).size(24.dp),
|
||||
imageFieldData = redirectionFooter.icon,
|
||||
widgetCallback = widgetCallback,
|
||||
)
|
||||
Column {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = redirectionFooter.title,
|
||||
widgetCallback = widgetCallback,
|
||||
)
|
||||
NaviTextWidgetized(
|
||||
textFieldData = redirectionFooter.description,
|
||||
widgetCallback = widgetCallback,
|
||||
)
|
||||
}
|
||||
}
|
||||
NaviImage(
|
||||
modifier = Modifier.padding(end = 12.dp).size(24.dp),
|
||||
imageFieldData = redirectionFooter.icon,
|
||||
modifier = Modifier.padding(start = 24.dp).size(16.dp),
|
||||
imageFieldData = redirectionFooter.rightIcon,
|
||||
widgetCallback = widgetCallback,
|
||||
)
|
||||
Column {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = redirectionFooter.title,
|
||||
widgetCallback = widgetCallback,
|
||||
)
|
||||
NaviTextWidgetized(
|
||||
textFieldData = redirectionFooter.description,
|
||||
widgetCallback = widgetCallback,
|
||||
)
|
||||
}
|
||||
}
|
||||
NaviImage(
|
||||
modifier = Modifier.padding(start = 24.dp).size(16.dp),
|
||||
imageFieldData = redirectionFooter.rightIcon,
|
||||
widgetCallback = widgetCallback,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ fun PolicyDetailsComposable(
|
||||
) {
|
||||
NaviImage(
|
||||
modifier =
|
||||
Modifier.weight(0.35f)
|
||||
Modifier.weight(0.4f)
|
||||
.fillMaxWidth()
|
||||
.wrapContentSize(Alignment.Center)
|
||||
.height(44.dp)
|
||||
@@ -80,7 +80,7 @@ fun PolicyDetailsComposable(
|
||||
)
|
||||
VerticalDivider(modifier = Modifier.height(40.dp), color = GreyEBEBEB, thickness = 1.dp)
|
||||
Row(
|
||||
modifier = Modifier.weight(0.65f).wrapContentHeight(),
|
||||
modifier = Modifier.weight(0.6f).wrapContentHeight(),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.SpaceAround,
|
||||
) {
|
||||
|
||||
@@ -15,6 +15,7 @@ import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.wrapContentHeight
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.navi.insurance.review_policy.model.response.PolicyReviewPageResponse
|
||||
@@ -30,6 +31,7 @@ fun PolicyReviewHeaderComposable(
|
||||
) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier =
|
||||
Modifier.fillMaxWidth()
|
||||
.wrapContentHeight()
|
||||
|
||||
@@ -24,14 +24,14 @@ fun TitleWithSubtitleComposable(
|
||||
widgetCallback: WidgetCallback? = null,
|
||||
) {
|
||||
Row(modifier = modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) {
|
||||
title?.let {
|
||||
title?.text?.let {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = title,
|
||||
widgetCallback = widgetCallback,
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
subTitle?.let {
|
||||
subTitle?.text?.let {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = subTitle,
|
||||
widgetCallback = widgetCallback,
|
||||
|
||||
@@ -191,6 +191,7 @@ constructor(private val repository: PolicyReviewRepository, actionHandler: Actio
|
||||
viewModelScope.launch(
|
||||
Dispatchers.IO + exceptionHandler(ApiErrorTagType.POLICY_REVIEW_ADDON_LOAD_ERROR.value)
|
||||
) {
|
||||
setBottomSheetShown(true)
|
||||
_policyReviewAddonDataFlow.emit(ResponseState.Loading)
|
||||
val request =
|
||||
PolicyReviewAddonRequest(
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<corners
|
||||
android:topLeftRadius="20dp"
|
||||
android:topRightRadius="20dp" />
|
||||
android:topLeftRadius="8dp"
|
||||
android:topRightRadius="8dp" />
|
||||
</shape>
|
||||
@@ -32,6 +32,7 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.navi.design.decorator.DashedDivider
|
||||
import com.navi.design.theme.GreyE3E5E5
|
||||
import com.navi.design.utils.BackgroundDrawableData
|
||||
import com.navi.naviwidgets.callbacks.WidgetCallback
|
||||
import com.navi.naviwidgets.composewidget.reusable.FooterButtonComposable
|
||||
@@ -90,35 +91,54 @@ fun CardWithProgressListHorizontalWidgetComposable(
|
||||
verticalArrangement = Arrangement.Center,
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier.padding(horizontal = 54.dp),
|
||||
modifier = Modifier.padding(horizontal = 16.dp),
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
) {
|
||||
for (index in 0..listData.lastIndex) {
|
||||
Column(verticalArrangement = Arrangement.Center) {
|
||||
NaviImage(
|
||||
imageFieldData =
|
||||
listData[index]
|
||||
.content
|
||||
?.textDrawableData
|
||||
?.top,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.size(20.dp),
|
||||
)
|
||||
}
|
||||
if (index != listData.lastIndex) {
|
||||
if (listData[index].isCompleted == true) {
|
||||
Row(modifier = Modifier.weight(1f)) {
|
||||
if (index == 0) {
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
} else {
|
||||
val isCompleted =
|
||||
listData[index - 1].isCompleted == true
|
||||
DashedDivider(
|
||||
thickness = 2.dp,
|
||||
color = colorSuccessGreen,
|
||||
intervals = floatArrayOf(20f, 0f),
|
||||
thickness = if (isCompleted) 2.dp else 1.dp,
|
||||
color =
|
||||
if (isCompleted) colorSuccessGreen
|
||||
else GreyE3E5E5,
|
||||
intervals =
|
||||
if (isCompleted) floatArrayOf(20f, 0f)
|
||||
else floatArrayOf(20f, 10f),
|
||||
modifier =
|
||||
Modifier.fillMaxHeight()
|
||||
.weight(1f)
|
||||
.padding(top = 10.dp),
|
||||
)
|
||||
}
|
||||
Column(verticalArrangement = Arrangement.Center) {
|
||||
NaviImage(
|
||||
imageFieldData =
|
||||
listData[index]
|
||||
.content
|
||||
?.textDrawableData
|
||||
?.top,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.size(20.dp),
|
||||
)
|
||||
}
|
||||
if (index == listData.lastIndex) {
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
} else {
|
||||
val isCompleted =
|
||||
listData[index].isCompleted == true
|
||||
DashedDivider(
|
||||
thickness = 1.dp,
|
||||
thickness = if (isCompleted) 2.dp else 1.dp,
|
||||
color =
|
||||
if (isCompleted) colorSuccessGreen
|
||||
else GreyE3E5E5,
|
||||
intervals =
|
||||
if (isCompleted) floatArrayOf(20f, 0f)
|
||||
else floatArrayOf(20f, 10f),
|
||||
modifier =
|
||||
Modifier.fillMaxHeight()
|
||||
.weight(1f)
|
||||
|
||||
@@ -43,6 +43,7 @@ import com.navi.naviwidgets.extensions.NaviTextWidgetized
|
||||
import com.navi.naviwidgets.extensions.debounceClickable
|
||||
import com.navi.naviwidgets.extensions.getBackground
|
||||
import com.navi.naviwidgets.extensions.getColorFromHexCode
|
||||
import com.navi.naviwidgets.extensions.setWidgetLayoutParams
|
||||
import com.navi.naviwidgets.models.response.PolicyCardWidgetData
|
||||
|
||||
@Composable
|
||||
@@ -52,204 +53,216 @@ fun PolicyCardWidgetComposable(
|
||||
) {
|
||||
val widgetData by remember(key1 = data, calculation = { mutableStateOf(data) })
|
||||
widgetData?.widgetData()?.let { card ->
|
||||
Box(modifier = Modifier.fillMaxWidth().wrapContentHeight()) {
|
||||
card?.topTagTitle?.text?.let {
|
||||
Box(
|
||||
modifier =
|
||||
Modifier.zIndex(1f)
|
||||
.padding(start = 2.dp)
|
||||
.getBackground(card.topTagBackground)
|
||||
.padding(horizontal = 8.dp, vertical = 4.dp)
|
||||
.align(Alignment.TopEnd)
|
||||
) {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.topTagTitle,
|
||||
widgetCallback = widgetCallback,
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
}
|
||||
Column {
|
||||
Column(
|
||||
modifier =
|
||||
Modifier.border(
|
||||
1.dp,
|
||||
Color(0xFFEBEBEB),
|
||||
RoundedCornerShape(topEnd = 4.dp, topStart = 4.dp),
|
||||
)
|
||||
.fillMaxWidth()
|
||||
.wrapContentHeight()
|
||||
.padding(top = 16.dp, bottom = 24.dp)
|
||||
.padding(horizontal = 16.dp)
|
||||
) {
|
||||
card?.topId?.text?.let {
|
||||
setWidgetLayoutParams(widgetLayoutParams = data?.widgetLayoutParams) {
|
||||
Box(modifier = Modifier.fillMaxWidth().wrapContentHeight()) {
|
||||
card?.topTagTitle?.text?.let {
|
||||
Box(
|
||||
modifier =
|
||||
Modifier.zIndex(1f)
|
||||
.padding(start = 2.dp)
|
||||
.getBackground(card.topTagBackground)
|
||||
.padding(horizontal = 8.dp, vertical = 4.dp)
|
||||
.align(Alignment.TopEnd)
|
||||
) {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.topId,
|
||||
modifier = Modifier.widthIn(max = (screenWidth / 2.5f)),
|
||||
textFieldData = card.topTagTitle,
|
||||
widgetCallback = widgetCallback,
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
Row(modifier = Modifier.padding(top = 24.dp).fillMaxWidth()) {
|
||||
card?.primaryContentTitle?.text?.let {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Row(verticalAlignment = Alignment.Top) {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.primaryContentTitle,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.weight(1f),
|
||||
debounceDelay = 600,
|
||||
)
|
||||
card.primaryContentTag?.text?.let {
|
||||
Box(
|
||||
modifier =
|
||||
Modifier.widthIn(max = 60.dp, min = 55.dp)
|
||||
.padding(start = 4.dp)
|
||||
.getBackground(card.primaryContentTagBackground)
|
||||
.padding(horizontal = 6.dp, vertical = 1.dp)
|
||||
) {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.primaryContentTag,
|
||||
widgetCallback = widgetCallback,
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
Column {
|
||||
Column(
|
||||
modifier =
|
||||
Modifier.border(
|
||||
1.dp,
|
||||
Color(0xFFEBEBEB),
|
||||
RoundedCornerShape(topEnd = 4.dp, topStart = 4.dp),
|
||||
)
|
||||
.fillMaxWidth()
|
||||
.wrapContentHeight()
|
||||
.padding(top = 16.dp, bottom = 24.dp)
|
||||
.padding(horizontal = 16.dp)
|
||||
) {
|
||||
card?.topId?.text?.let {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.topId,
|
||||
modifier = Modifier.widthIn(max = (screenWidth / 2.5f)),
|
||||
widgetCallback = widgetCallback,
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
Row(modifier = Modifier.padding(top = 24.dp).fillMaxWidth()) {
|
||||
card?.primaryContentTitle?.text?.let {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Row(verticalAlignment = Alignment.Top) {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.primaryContentTitle,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.weight(1f),
|
||||
debounceDelay = 600,
|
||||
)
|
||||
card.primaryContentTag?.text?.let {
|
||||
Box(
|
||||
modifier =
|
||||
Modifier.widthIn(max = 60.dp, min = 55.dp)
|
||||
.padding(start = 4.dp)
|
||||
.getBackground(
|
||||
card.primaryContentTagBackground
|
||||
)
|
||||
.padding(horizontal = 6.dp, vertical = 1.dp)
|
||||
) {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.primaryContentTag,
|
||||
widgetCallback = widgetCallback,
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
card.primaryContentSubtitle?.text?.let {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.primaryContentSubtitle,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.padding(top = 4.dp),
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
}
|
||||
card.primaryContentSubtitle?.text?.let {
|
||||
}
|
||||
card?.primaryContentTitle?.text?.let {
|
||||
card.secondaryContentTitle?.text?.let {
|
||||
Spacer(modifier = Modifier.width(16.dp))
|
||||
}
|
||||
}
|
||||
card?.secondaryContentTitle?.text?.let {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.primaryContentSubtitle,
|
||||
textFieldData = card.secondaryContentTitle,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.padding(top = 4.dp),
|
||||
debounceDelay = 600,
|
||||
)
|
||||
card.secondaryContentSubtitle?.text?.let {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.secondaryContentSubtitle,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.padding(top = 4.dp),
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Row(modifier = Modifier.padding(top = 24.dp).fillMaxWidth()) {
|
||||
card?.primaryButton?.title?.text?.let {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
FooterButtonComposable(
|
||||
data = card.primaryButton,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.height(40.dp),
|
||||
)
|
||||
}
|
||||
}
|
||||
card?.primaryButton?.title?.text?.let {
|
||||
card.secondaryButton?.title?.text?.let {
|
||||
Spacer(modifier = Modifier.width(16.dp))
|
||||
}
|
||||
}
|
||||
card?.secondaryButton?.title?.text?.let {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
FooterButtonComposable(
|
||||
data = card.secondaryButton,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.height(40.dp),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
card?.primaryContentTitle?.text?.let {
|
||||
card.secondaryContentTitle?.text?.let {
|
||||
}
|
||||
card?.bottomTagTitle?.text?.let {
|
||||
Row(
|
||||
modifier =
|
||||
Modifier.fillMaxWidth()
|
||||
.wrapContentHeight()
|
||||
.heightIn(min = 68.dp)
|
||||
.debounceClickable(
|
||||
delayMillis = 600,
|
||||
onClick = {
|
||||
card.bottomTagCta?.let { it ->
|
||||
widgetCallback?.onClick(it)
|
||||
}
|
||||
},
|
||||
)
|
||||
.offset(y = (-1).dp)
|
||||
.border(
|
||||
1.dp,
|
||||
card.bottomTagBorderColor?.let {
|
||||
getColorFromHexCode(hex = it)
|
||||
} ?: Color.Transparent,
|
||||
RoundedCornerShape(bottomStart = 4.dp, bottomEnd = 4.dp),
|
||||
)
|
||||
.getBackground(card.bottomTagBackground)
|
||||
.padding(16.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
card.bottomTagIcon?.url?.let {
|
||||
NaviImage(
|
||||
imageFieldData = card.bottomTagIcon,
|
||||
modifier = Modifier.size(24.dp),
|
||||
)
|
||||
}
|
||||
card.bottomTagIcon?.url?.let {
|
||||
Spacer(modifier = Modifier.width(16.dp))
|
||||
}
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.bottomTagTitle,
|
||||
widgetCallback = widgetCallback,
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
card?.secondaryContentTitle?.text?.let {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
}
|
||||
card?.bottomTagLottie?.lottieUrl?.let {
|
||||
Row(
|
||||
modifier =
|
||||
Modifier.fillMaxWidth()
|
||||
.heightIn(min = 68.dp)
|
||||
.height(IntrinsicSize.Max)
|
||||
.debounceClickable(
|
||||
delayMillis = 600,
|
||||
onClick = {
|
||||
card.bottomTagCta?.let { it ->
|
||||
widgetCallback?.onClick(it)
|
||||
}
|
||||
},
|
||||
)
|
||||
.offset(y = (-1).dp)
|
||||
.getBackground(card.bottomTagBackground)
|
||||
.padding(start = 16.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
) {
|
||||
Column(
|
||||
modifier =
|
||||
Modifier.padding(vertical = 12.dp)
|
||||
.widthIn(max = screenWidth / 2f)
|
||||
) {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.secondaryContentTitle,
|
||||
textFieldData = card.bottomTagLottieTitle,
|
||||
widgetCallback = widgetCallback,
|
||||
debounceDelay = 600,
|
||||
)
|
||||
card.secondaryContentSubtitle?.text?.let {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.secondaryContentSubtitle,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.padding(top = 4.dp),
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Row(modifier = Modifier.padding(top = 24.dp).fillMaxWidth()) {
|
||||
card?.primaryButton?.title?.text?.let {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
FooterButtonComposable(
|
||||
data = card.primaryButton,
|
||||
Spacer(modifier = Modifier.height(2.dp))
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.bottomTagLottieSubtitle,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.height(40.dp),
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
}
|
||||
card?.primaryButton?.title?.text?.let {
|
||||
card.secondaryButton?.title?.text?.let {
|
||||
Spacer(modifier = Modifier.width(16.dp))
|
||||
}
|
||||
}
|
||||
card?.secondaryButton?.title?.text?.let {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
FooterButtonComposable(
|
||||
data = card.secondaryButton,
|
||||
widgetCallback = widgetCallback,
|
||||
modifier = Modifier.height(40.dp),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
card?.bottomTagTitle?.text?.let {
|
||||
Row(
|
||||
modifier =
|
||||
Modifier.fillMaxWidth()
|
||||
.wrapContentHeight()
|
||||
.heightIn(min = 68.dp)
|
||||
.debounceClickable(
|
||||
delayMillis = 600,
|
||||
onClick = {
|
||||
card.bottomTagCta?.let { it -> widgetCallback?.onClick(it) }
|
||||
},
|
||||
)
|
||||
.offset(y = (-1).dp)
|
||||
.border(
|
||||
1.dp,
|
||||
card.bottomTagBorderColor?.let { getColorFromHexCode(hex = it) }
|
||||
?: Color.Transparent,
|
||||
RoundedCornerShape(bottomStart = 4.dp, bottomEnd = 4.dp),
|
||||
)
|
||||
.getBackground(card.bottomTagBackground)
|
||||
.padding(16.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
card.bottomTagIcon?.url?.let {
|
||||
NaviImage(
|
||||
imageFieldData = card.bottomTagIcon,
|
||||
modifier = Modifier.size(24.dp),
|
||||
NaviLottie(
|
||||
modifier = Modifier.fillMaxHeight().aspectRatio(1.31f),
|
||||
lottie = card.bottomTagLottie,
|
||||
)
|
||||
}
|
||||
card.bottomTagIcon?.url?.let { Spacer(modifier = Modifier.width(16.dp)) }
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.bottomTagTitle,
|
||||
widgetCallback = widgetCallback,
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
}
|
||||
card?.bottomTagLottie?.lottieUrl?.let {
|
||||
Row(
|
||||
modifier =
|
||||
Modifier.fillMaxWidth()
|
||||
.heightIn(min = 68.dp)
|
||||
.height(IntrinsicSize.Max)
|
||||
.debounceClickable(
|
||||
delayMillis = 600,
|
||||
onClick = {
|
||||
card.bottomTagCta?.let { it -> widgetCallback?.onClick(it) }
|
||||
},
|
||||
)
|
||||
.offset(y = (-1).dp)
|
||||
.getBackground(card.bottomTagBackground)
|
||||
.padding(start = 16.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
) {
|
||||
Column(
|
||||
modifier =
|
||||
Modifier.padding(vertical = 12.dp).widthIn(max = screenWidth / 2f)
|
||||
) {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.bottomTagLottieTitle,
|
||||
widgetCallback = widgetCallback,
|
||||
debounceDelay = 600,
|
||||
)
|
||||
Spacer(modifier = Modifier.height(2.dp))
|
||||
NaviTextWidgetized(
|
||||
textFieldData = card.bottomTagLottieSubtitle,
|
||||
widgetCallback = widgetCallback,
|
||||
debounceDelay = 600,
|
||||
)
|
||||
}
|
||||
NaviLottie(
|
||||
modifier = Modifier.fillMaxHeight().aspectRatio(1.31f),
|
||||
lottie = card.bottomTagLottie,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.navi.base.utils.orZero
|
||||
import com.navi.design.customview.DashedDivider
|
||||
import com.navi.naviwidgets.callbacks.WidgetCallback
|
||||
import com.navi.naviwidgets.composewidget.reusable.FooterButtonComposable
|
||||
@@ -97,7 +96,7 @@ fun TitleCardCtaWidgetComposable(
|
||||
NaviCard(cardProperties = cardData.cardProperties) {
|
||||
Column {
|
||||
Row {
|
||||
Column {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
cardData.leftTitle?.text.let {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = cardData.leftTitle,
|
||||
@@ -111,8 +110,8 @@ fun TitleCardCtaWidgetComposable(
|
||||
)
|
||||
}
|
||||
}
|
||||
Spacer(modifier = Modifier.width(cardData.spacing.orZero().dp))
|
||||
Column {
|
||||
Spacer(modifier = Modifier.width(16.dp))
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
cardData.rightTitle?.text.let {
|
||||
NaviTextWidgetized(
|
||||
textFieldData = cardData.rightTitle,
|
||||
|
||||
Reference in New Issue
Block a user