@anker-in/campaign-ui 0.4.5-beta.9 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/LiveChatWidget/components/MessageContent/CartCard.js +1 -1
- package/dist/cjs/components/LiveChatWidget/components/MessageContent/CartCard.js.map +3 -3
- package/dist/cjs/components/LiveChatWidget/components/MessageContent/ProductCard.js +1 -1
- package/dist/cjs/components/LiveChatWidget/components/MessageContent/ProductCard.js.map +2 -2
- package/dist/cjs/components/LiveChatWidget/components/MessageContent/ProductComparison.js +1 -1
- package/dist/cjs/components/LiveChatWidget/components/MessageContent/ProductComparison.js.map +2 -2
- package/dist/cjs/components/LiveChatWidget/components/MessageContent/ProductList.js +1 -1
- package/dist/cjs/components/LiveChatWidget/components/MessageContent/ProductList.js.map +2 -2
- package/dist/cjs/components/LiveChatWidget/constants.d.ts +1 -0
- package/dist/cjs/components/LiveChatWidget/constants.js +1 -1
- package/dist/cjs/components/LiveChatWidget/constants.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useAlpcFetch.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useAlpcFetch.js.map +2 -2
- package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.js.map +3 -3
- package/dist/cjs/components/credits/creditsCash/CreditsCash.js +1 -1
- package/dist/cjs/components/credits/creditsCash/CreditsCash.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/RedeemVirtualProductModal.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/RedeemVirtualProductModal.js.map +2 -2
- package/dist/cjs/components/credits/modal/ActivitiesModal.js +1 -1
- package/dist/cjs/components/credits/modal/ActivitiesModal.js.map +2 -2
- package/dist/cjs/components/credits/modal/RewardsModal.js +1 -1
- package/dist/cjs/components/credits/modal/RewardsModal.js.map +2 -2
- package/dist/cjs/stories/CartCard.stories.d.ts +33 -0
- package/dist/cjs/stories/CartCard.stories.js +21 -0
- package/dist/cjs/stories/CartCard.stories.js.map +7 -0
- package/dist/esm/components/LiveChatWidget/components/MessageContent/CartCard.js +1 -1
- package/dist/esm/components/LiveChatWidget/components/MessageContent/CartCard.js.map +3 -3
- package/dist/esm/components/LiveChatWidget/components/MessageContent/ProductCard.js +1 -1
- package/dist/esm/components/LiveChatWidget/components/MessageContent/ProductCard.js.map +3 -3
- package/dist/esm/components/LiveChatWidget/components/MessageContent/ProductComparison.js +1 -1
- package/dist/esm/components/LiveChatWidget/components/MessageContent/ProductComparison.js.map +3 -3
- package/dist/esm/components/LiveChatWidget/components/MessageContent/ProductList.js +1 -1
- package/dist/esm/components/LiveChatWidget/components/MessageContent/ProductList.js.map +3 -3
- package/dist/esm/components/LiveChatWidget/constants.d.ts +1 -0
- package/dist/esm/components/LiveChatWidget/constants.js +1 -1
- package/dist/esm/components/LiveChatWidget/constants.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useAlpcFetch.js +1 -1
- package/dist/esm/components/credits/context/hooks/useAlpcFetch.js.map +2 -2
- package/dist/esm/components/credits/context/hooks/useRedeemAndBuy.js +1 -1
- package/dist/esm/components/credits/context/hooks/useRedeemAndBuy.js.map +3 -3
- package/dist/esm/components/credits/creditsCash/CreditsCash.js +1 -1
- package/dist/esm/components/credits/creditsCash/CreditsCash.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/RedeemVirtualProductModal.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemVirtualProductModal.js.map +2 -2
- package/dist/esm/components/credits/modal/ActivitiesModal.js +1 -1
- package/dist/esm/components/credits/modal/ActivitiesModal.js.map +2 -2
- package/dist/esm/components/credits/modal/RewardsModal.js +1 -1
- package/dist/esm/components/credits/modal/RewardsModal.js.map +2 -2
- package/dist/esm/stories/CartCard.stories.d.ts +33 -0
- package/dist/esm/stories/CartCard.stories.js +21 -0
- package/dist/esm/stories/CartCard.stories.js.map +7 -0
- package/package.json +1 -1
- package/src/components/LiveChatWidget/components/MessageContent/CartCard.tsx +2 -6
- package/src/components/LiveChatWidget/components/MessageContent/ProductCard.tsx +3 -6
- package/src/components/LiveChatWidget/components/MessageContent/ProductComparison.tsx +5 -5
- package/src/components/LiveChatWidget/components/MessageContent/ProductList.tsx +3 -6
- package/src/components/LiveChatWidget/constants.ts +9 -0
- package/src/components/credits/context/hooks/useAlpcFetch.ts +12 -5
- package/src/components/credits/context/hooks/useRedeemAndBuy.ts +2 -3
- package/src/components/credits/creditsCash/CreditsCash.tsx +12 -5
- package/src/components/credits/creditsRedeemList/RedeemCouponModal.tsx +2 -3
- package/src/components/credits/creditsRedeemList/RedeemVirtualProductModal.tsx +3 -3
- package/src/components/credits/modal/ActivitiesModal.tsx +53 -51
- package/src/components/credits/modal/RewardsModal.tsx +5 -5
|
@@ -108,7 +108,7 @@ function ActivitiesModal({ data, ...props }: ActivitiesModalProps) {
|
|
|
108
108
|
// 新增的部分任务都使用了 alpc 同一个任务类型,需要用任务 id 来区分
|
|
109
109
|
return item.task_name.replace('Refund', data.productUnApprovedTask)
|
|
110
110
|
} else if (taskIdToTypeMapping?.[String(item.task_rule_id)]) {
|
|
111
|
-
return dtcTaskTypeToNameMap[taskIdToTypeMapping?.[String(item.task_rule_id)]]
|
|
111
|
+
return dtcTaskTypeToNameMap[taskIdToTypeMapping?.[String(item.task_rule_id)]] || item.task_name
|
|
112
112
|
} else {
|
|
113
113
|
return taskNameMap[item.task_sub_type] || item.task_name
|
|
114
114
|
}
|
|
@@ -174,7 +174,7 @@ function ActivitiesModal({ data, ...props }: ActivitiesModalProps) {
|
|
|
174
174
|
className={cn('h-[800px] w-[640px]')}
|
|
175
175
|
useAnimation
|
|
176
176
|
animationClassName="md:translate-y-[100vh]"
|
|
177
|
-
scrollClassName=""
|
|
177
|
+
scrollClassName="flex flex-col"
|
|
178
178
|
{...props}
|
|
179
179
|
onScrollEnd={handleScrollEnd}
|
|
180
180
|
>
|
|
@@ -198,62 +198,64 @@ function ActivitiesModal({ data, ...props }: ActivitiesModalProps) {
|
|
|
198
198
|
</Tabs>
|
|
199
199
|
</div>
|
|
200
200
|
|
|
201
|
-
<div className="
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
<
|
|
205
|
-
|
|
206
|
-
|
|
201
|
+
<div className="flex-1 overflow-auto overscroll-contain">
|
|
202
|
+
<div className="grid gap-[18px] md:gap-[12px]">
|
|
203
|
+
{isLoading && (
|
|
204
|
+
<div className="flex flex-1 flex-col items-center justify-center">
|
|
205
|
+
<LoadingDots />
|
|
206
|
+
</div>
|
|
207
|
+
)}
|
|
207
208
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
<div
|
|
213
|
-
key={index}
|
|
214
|
-
className={cn(
|
|
215
|
-
'flex h-fit items-center justify-between rounded-[8px] bg-[#f2f0f1] px-[16px] py-[20px] text-[16px]',
|
|
216
|
-
!rounded && 'rounded-none'
|
|
217
|
-
)}
|
|
218
|
-
>
|
|
219
|
-
<div className="grid gap-[6px]">
|
|
220
|
-
<div className="font-bold">{item.title}</div>
|
|
221
|
-
<div className="text-[14px] font-semibold text-[#999]">
|
|
222
|
-
{dayjs(item.date).format('YYYY-MM-DD HH:mm').toString()}
|
|
223
|
-
</div>
|
|
224
|
-
{!data.pendingTips && (
|
|
225
|
-
<div
|
|
226
|
-
className={`hidden text-[14px] font-semibold text-[#777] ${item.status === 2 && item.credit_type === 1 ? '!flex' : ''}`}
|
|
227
|
-
>
|
|
228
|
-
<Text html={data.pendingTips} />
|
|
229
|
-
<span>{dayjs.unix(item.pending_time).add(1, 'day').format('YYYY-MM-DD')}</span>
|
|
230
|
-
{data.pendingTips2 && <Text html={data.pendingTips2} />}
|
|
231
|
-
</div>
|
|
232
|
-
)}
|
|
233
|
-
</div>
|
|
209
|
+
{!isLoading && (
|
|
210
|
+
<>
|
|
211
|
+
{list.length > 0 ? (
|
|
212
|
+
list.map((item, index) => (
|
|
234
213
|
<div
|
|
214
|
+
key={index}
|
|
235
215
|
className={cn(
|
|
236
|
-
'
|
|
237
|
-
|
|
216
|
+
'flex h-fit items-center justify-between rounded-[8px] bg-[#f2f0f1] px-[16px] py-[20px] text-[16px]',
|
|
217
|
+
!rounded && 'rounded-none'
|
|
238
218
|
)}
|
|
239
219
|
>
|
|
240
|
-
|
|
241
|
-
|
|
220
|
+
<div className="grid gap-[6px]">
|
|
221
|
+
<div className="font-bold">{item.title}</div>
|
|
222
|
+
<div className="text-[14px] font-semibold text-[#999]">
|
|
223
|
+
{dayjs(item.date).format('YYYY-MM-DD HH:mm').toString()}
|
|
224
|
+
</div>
|
|
225
|
+
{!data.pendingTips && (
|
|
226
|
+
<div
|
|
227
|
+
className={`hidden text-[14px] font-semibold text-[#777] ${item.status === 2 && item.credit_type === 1 ? '!flex' : ''}`}
|
|
228
|
+
>
|
|
229
|
+
<Text html={data.pendingTips} />
|
|
230
|
+
<span>{dayjs.unix(item.pending_time).add(1, 'day').format('YYYY-MM-DD')}</span>
|
|
231
|
+
{data.pendingTips2 && <Text html={data.pendingTips2} />}
|
|
232
|
+
</div>
|
|
233
|
+
)}
|
|
234
|
+
</div>
|
|
235
|
+
<div
|
|
236
|
+
className={cn(
|
|
237
|
+
'font-bold',
|
|
238
|
+
item.value >= 0 || item.credit_type === CreditType.Expired ? 'text-[#52C41A]' : 'text-[#F84D4F]'
|
|
239
|
+
)}
|
|
240
|
+
>
|
|
241
|
+
{item.value >= 0 && '+'}
|
|
242
|
+
{item.value}
|
|
243
|
+
</div>
|
|
242
244
|
</div>
|
|
245
|
+
))
|
|
246
|
+
) : (
|
|
247
|
+
<div className="flex flex-col items-center justify-center py-[40px]">
|
|
248
|
+
<Picture
|
|
249
|
+
className="mb-[16px] h-[120px] w-[160px]"
|
|
250
|
+
source={data?.emptyListImage?.url}
|
|
251
|
+
alt={data?.emptyListImage?.alt || 'empty list image'}
|
|
252
|
+
></Picture>
|
|
253
|
+
<div className="leading-1.4 text-[16px] font-semibold">{data?.emptyListLabel}</div>
|
|
243
254
|
</div>
|
|
244
|
-
)
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
className="mb-[16px] h-[120px] w-[160px]"
|
|
249
|
-
source={data?.emptyListImage?.url}
|
|
250
|
-
alt={data?.emptyListImage?.alt || 'empty list image'}
|
|
251
|
-
></Picture>
|
|
252
|
-
<div className="leading-1.4 text-[16px] font-semibold">{data?.emptyListLabel}</div>
|
|
253
|
-
</div>
|
|
254
|
-
)}
|
|
255
|
-
</>
|
|
256
|
-
)}
|
|
255
|
+
)}
|
|
256
|
+
</>
|
|
257
|
+
)}
|
|
258
|
+
</div>
|
|
257
259
|
</div>
|
|
258
260
|
{/* 积分到账时间提醒 */}
|
|
259
261
|
{list.length > 0 && <div className="mt-[12px] pb-[24px] text-[14px] font-semibold text-[#999]">{data.tips}</div>}
|
|
@@ -251,11 +251,11 @@ function RewardsModal({ data, ...props }: RewardsModalProps) {
|
|
|
251
251
|
className={classNames('h-[800px] w-[640px]')}
|
|
252
252
|
useAnimation
|
|
253
253
|
animationClassName="md:translate-y-[100vh]"
|
|
254
|
-
scrollClassName="md:mb-0"
|
|
255
|
-
|
|
254
|
+
scrollClassName="md:mb-0 flex flex-col"
|
|
255
|
+
{...props}
|
|
256
256
|
onScrollEnd={handleScrollEnd}
|
|
257
257
|
>
|
|
258
|
-
<div className="">
|
|
258
|
+
<div className="shrink-0">
|
|
259
259
|
<Tabs
|
|
260
260
|
align="left"
|
|
261
261
|
shape={rounded ? 'rounded' : 'square'}
|
|
@@ -275,13 +275,13 @@ function RewardsModal({ data, ...props }: RewardsModalProps) {
|
|
|
275
275
|
</div>
|
|
276
276
|
|
|
277
277
|
{isLoading && (
|
|
278
|
-
<div className="flex
|
|
278
|
+
<div className="flex flex-1 flex-col items-center justify-center">
|
|
279
279
|
<LoadingDots />
|
|
280
280
|
</div>
|
|
281
281
|
)}
|
|
282
282
|
|
|
283
283
|
{!isLoading && (
|
|
284
|
-
<div className="mt-[24px] overflow-auto overscroll-contain">
|
|
284
|
+
<div className="mt-[24px] flex-1 overflow-auto overscroll-contain pb-[24px] md:pb-[48px]">
|
|
285
285
|
{list.length > 0 ? (
|
|
286
286
|
<div className="grid gap-[18px] md:gap-[12px]">
|
|
287
287
|
{list.map((item, index) => (
|