@tbox.cn/app-module-promotion 1.0.0-alpha.18 → 1.0.0-alpha.19
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/{chunk-NJGYYTGM.js → chunk-5XT654N4.js} +47 -11
- package/dist/client/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/server/index.d.ts +520 -520
- package/package.json +6 -6
- package/src/client/cards/promotion-activity-category-list/index.tsx +4 -1
- package/src/client/cards/promotion-activity-detail/index.tsx +9 -1
- package/src/client/cards/promotion-activity-list/index.tsx +3 -1
- package/src/client/cards/promotion-best-deal/index.tsx +2 -1
- package/src/client/cards/promotion-entitlement-list/index.tsx +9 -1
- package/src/client/cards/promotion-offer-detail/index.tsx +9 -1
- package/src/client/cards/promotion-offer-list/NearbyDealsPanel.tsx +1 -1
- package/src/client/cards/promotion-offer-list/index.tsx +7 -1
- package/src/client/components/CouponListToggle.tsx +1 -1
- package/src/client/components/CouponSheet.tsx +1 -1
- package/src/client/components/ImageWithFallback.tsx +1 -1
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
// src/client/cards/promotion-offer-list/index.tsx
|
|
2
|
-
import {
|
|
2
|
+
import { CalendarBlankIcon as CalendarBlank } from "@phosphor-icons/react/CalendarBlank";
|
|
3
|
+
import { CalendarDotsIcon as CalendarDots } from "@phosphor-icons/react/CalendarDots";
|
|
4
|
+
import { CaretDownIcon as CaretDown2 } from "@phosphor-icons/react/CaretDown";
|
|
5
|
+
import { LightbulbIcon as Lightbulb } from "@phosphor-icons/react/Lightbulb";
|
|
6
|
+
import { MapPinIcon as MapPin } from "@phosphor-icons/react/MapPin";
|
|
7
|
+
import { SparkleIcon as Sparkle } from "@phosphor-icons/react/Sparkle";
|
|
8
|
+
import { TicketIcon as Ticket2 } from "@phosphor-icons/react/Ticket";
|
|
3
9
|
import { useEffect as useEffect2, useState as useState5 } from "react";
|
|
4
10
|
import { ItemActionsRow, markSelfRendering, navigateToAlipayPage, sendCardAction as sendCardAction2 } from "@tbox.cn/app-agent-sdk-client";
|
|
5
11
|
|
|
6
12
|
// src/client/components/CouponSheet.tsx
|
|
7
|
-
import { X } from "@phosphor-icons/react";
|
|
13
|
+
import { XIcon as X } from "@phosphor-icons/react/X";
|
|
8
14
|
import { useState as useState2 } from "react";
|
|
9
15
|
import { Overlay } from "@tbox.cn/app-agent-ui-kit/overlay";
|
|
10
16
|
|
|
11
17
|
// src/client/components/ImageWithFallback.tsx
|
|
12
18
|
import { useState } from "react";
|
|
13
|
-
import { ImageSquare } from "@phosphor-icons/react";
|
|
19
|
+
import { ImageSquareIcon as ImageSquare } from "@phosphor-icons/react/ImageSquare";
|
|
14
20
|
import { jsx } from "react/jsx-runtime";
|
|
15
21
|
function ImageWithFallback(props) {
|
|
16
22
|
const { src, alt, className, size = 40 } = props;
|
|
@@ -212,7 +218,7 @@ function CouponListRow({ title, imageUrl, subtitle, tags, price, originalPrice,
|
|
|
212
218
|
}
|
|
213
219
|
|
|
214
220
|
// src/client/components/CouponListToggle.tsx
|
|
215
|
-
import { CaretDown } from "@phosphor-icons/react";
|
|
221
|
+
import { CaretDownIcon as CaretDown } from "@phosphor-icons/react/CaretDown";
|
|
216
222
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
217
223
|
var DEFAULT_VISIBLE_COUPONS = 4;
|
|
218
224
|
var COUPON_LIST_TOGGLE_CLASS = "promotion-list__toggle flex min-h-8 w-full cursor-pointer items-center justify-center gap-0.5 mt-0.5 border-0 bg-transparent px-0 py-0 text-xs font-normal leading-[normal] text-[#686d69] [font-family:inherit] hover:brightness-100 focus-visible:rounded-[5px] focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[rgba(9,107,250,0.28)] [&_svg]:transition-transform [&_svg]:duration-[160ms] [&_svg]:ease-[ease] [&_svg[data-rotated=true]]:rotate-180";
|
|
@@ -326,7 +332,7 @@ function useCouponListExpansion(itemCount, maxItems, isHistory, hidden = false)
|
|
|
326
332
|
}
|
|
327
333
|
|
|
328
334
|
// src/client/cards/promotion-offer-list/NearbyDealsPanel.tsx
|
|
329
|
-
import { Ticket } from "@phosphor-icons/react";
|
|
335
|
+
import { TicketIcon as Ticket } from "@phosphor-icons/react/Ticket";
|
|
330
336
|
import { httpPost, readHelloContext } from "@tbox.cn/app-agent-sdk-client";
|
|
331
337
|
import { useEffect, useRef as useRef2, useState as useState4 } from "react";
|
|
332
338
|
|
|
@@ -751,7 +757,15 @@ function Empty({ text }) {
|
|
|
751
757
|
var promotion_offer_list_default = PromotionOfferListCard;
|
|
752
758
|
|
|
753
759
|
// src/client/cards/promotion-offer-detail/index.tsx
|
|
754
|
-
import {
|
|
760
|
+
import { CalendarBlankIcon as CalendarBlank2 } from "@phosphor-icons/react/CalendarBlank";
|
|
761
|
+
import { CheckCircleIcon as CheckCircle } from "@phosphor-icons/react/CheckCircle";
|
|
762
|
+
import { ClockIcon as Clock } from "@phosphor-icons/react/Clock";
|
|
763
|
+
import { GiftIcon as Gift } from "@phosphor-icons/react/Gift";
|
|
764
|
+
import { InfoIcon as Info } from "@phosphor-icons/react/Info";
|
|
765
|
+
import { ListChecksIcon as ListChecks } from "@phosphor-icons/react/ListChecks";
|
|
766
|
+
import { MapPinIcon as MapPin2 } from "@phosphor-icons/react/MapPin";
|
|
767
|
+
import { SealCheckIcon as SealCheck } from "@phosphor-icons/react/SealCheck";
|
|
768
|
+
import { TicketIcon as Ticket3 } from "@phosphor-icons/react/Ticket";
|
|
755
769
|
import { useEffect as useEffect3, useRef as useRef3, useState as useState6 } from "react";
|
|
756
770
|
import { markSelfRendering as markSelfRendering2, navigateToAlipayPage as navigateToAlipayPage2, sendCardAction as sendCardAction3 } from "@tbox.cn/app-agent-sdk-client";
|
|
757
771
|
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
@@ -961,7 +975,15 @@ var promotion_offer_detail_default = PromotionOfferDetailCard;
|
|
|
961
975
|
markSelfRendering2(PromotionOfferDetailCard);
|
|
962
976
|
|
|
963
977
|
// src/client/cards/promotion-entitlement-list/index.tsx
|
|
964
|
-
import {
|
|
978
|
+
import { CalendarBlankIcon as CalendarBlank3 } from "@phosphor-icons/react/CalendarBlank";
|
|
979
|
+
import { CaretDownIcon as CaretDown3 } from "@phosphor-icons/react/CaretDown";
|
|
980
|
+
import { CaretRightIcon as CaretRight } from "@phosphor-icons/react/CaretRight";
|
|
981
|
+
import { CopyIcon as Copy } from "@phosphor-icons/react/Copy";
|
|
982
|
+
import { MapPinLineIcon as MapPinLine } from "@phosphor-icons/react/MapPinLine";
|
|
983
|
+
import { NavigationArrowIcon as NavigationArrow } from "@phosphor-icons/react/NavigationArrow";
|
|
984
|
+
import { ShieldCheckIcon as ShieldCheck } from "@phosphor-icons/react/ShieldCheck";
|
|
985
|
+
import { TicketIcon as Ticket4 } from "@phosphor-icons/react/Ticket";
|
|
986
|
+
import { WalletIcon as Wallet } from "@phosphor-icons/react/Wallet";
|
|
965
987
|
import { useEffect as useEffect5, useRef as useRef5, useState as useState8 } from "react";
|
|
966
988
|
import { callJsapi, httpGet, isInAlipayShell } from "@tbox.cn/app-agent-sdk-client";
|
|
967
989
|
|
|
@@ -1224,7 +1246,9 @@ function sheetFact(icon, label, value) {
|
|
|
1224
1246
|
var promotion_entitlement_list_default = PromotionEntitlementListCard;
|
|
1225
1247
|
|
|
1226
1248
|
// src/client/cards/promotion-activity-list/index.tsx
|
|
1227
|
-
import {
|
|
1249
|
+
import { CalendarDotsIcon as CalendarDots2 } from "@phosphor-icons/react/CalendarDots";
|
|
1250
|
+
import { SparkleIcon as Sparkle2 } from "@phosphor-icons/react/Sparkle";
|
|
1251
|
+
import { TicketIcon as Ticket5 } from "@phosphor-icons/react/Ticket";
|
|
1228
1252
|
import { sendCardAction as sendCardAction4 } from "@tbox.cn/app-agent-sdk-client";
|
|
1229
1253
|
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1230
1254
|
var statusText2 = { AVAILABLE: "\u53EF\u62A5\u540D", FULL: "\u5DF2\u6EE1", ENDED: "\u5DF2\u7ED3\u675F", UPCOMING: "\u5373\u5C06\u5F00\u59CB", UNKNOWN: "\u5F85\u786E\u8BA4" };
|
|
@@ -1292,7 +1316,15 @@ function PromotionActivityListCard(props) {
|
|
|
1292
1316
|
var promotion_activity_list_default = PromotionActivityListCard;
|
|
1293
1317
|
|
|
1294
1318
|
// src/client/cards/promotion-activity-detail/index.tsx
|
|
1295
|
-
import {
|
|
1319
|
+
import { ArrowSquareOutIcon as ArrowSquareOut } from "@phosphor-icons/react/ArrowSquareOut";
|
|
1320
|
+
import { CalendarDotsIcon as CalendarDots3 } from "@phosphor-icons/react/CalendarDots";
|
|
1321
|
+
import { CheckCircleIcon as CheckCircle2 } from "@phosphor-icons/react/CheckCircle";
|
|
1322
|
+
import { ClockIcon as Clock2 } from "@phosphor-icons/react/Clock";
|
|
1323
|
+
import { CrownIcon as Crown } from "@phosphor-icons/react/Crown";
|
|
1324
|
+
import { ListChecksIcon as ListChecks2 } from "@phosphor-icons/react/ListChecks";
|
|
1325
|
+
import { MapPinIcon as MapPin3 } from "@phosphor-icons/react/MapPin";
|
|
1326
|
+
import { SparkleIcon as Sparkle3 } from "@phosphor-icons/react/Sparkle";
|
|
1327
|
+
import { UsersIcon as Users } from "@phosphor-icons/react/Users";
|
|
1296
1328
|
import { sendCardAction as sendCardAction5 } from "@tbox.cn/app-agent-sdk-client";
|
|
1297
1329
|
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1298
1330
|
var ACTIVITY_HEADER_COMPACT = "flex min-w-0 items-center gap-2.5 px-4 pt-3.5 pb-2.5 max-[380px]:px-[13px] min-[760px]:pt-[15px]";
|
|
@@ -1467,7 +1499,10 @@ function ActivityHeader({ title, subtitle, icon }) {
|
|
|
1467
1499
|
var promotion_activity_detail_default = PromotionActivityDetailCard;
|
|
1468
1500
|
|
|
1469
1501
|
// src/client/cards/promotion-activity-category-list/index.tsx
|
|
1470
|
-
import {
|
|
1502
|
+
import { GameControllerIcon as GameController } from "@phosphor-icons/react/GameController";
|
|
1503
|
+
import { PaletteIcon as Palette } from "@phosphor-icons/react/Palette";
|
|
1504
|
+
import { SparkleIcon as Sparkle4 } from "@phosphor-icons/react/Sparkle";
|
|
1505
|
+
import { StorefrontIcon as Storefront } from "@phosphor-icons/react/Storefront";
|
|
1471
1506
|
import { ItemActionsRow as ItemActionsRow2 } from "@tbox.cn/app-agent-sdk-client";
|
|
1472
1507
|
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1473
1508
|
var icons = [GameController, Storefront, Palette, Sparkle4];
|
|
@@ -1502,7 +1537,8 @@ function PromotionActivityCategoryListCard(props) {
|
|
|
1502
1537
|
var promotion_activity_category_list_default = PromotionActivityCategoryListCard;
|
|
1503
1538
|
|
|
1504
1539
|
// src/client/cards/promotion-best-deal/index.tsx
|
|
1505
|
-
import { Calculator
|
|
1540
|
+
import { CalculatorIcon as Calculator } from "@phosphor-icons/react/Calculator";
|
|
1541
|
+
import { TrendUpIcon as TrendUp } from "@phosphor-icons/react/TrendUp";
|
|
1506
1542
|
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1507
1543
|
var money = (cents) => (cents / 100).toFixed(2);
|
|
1508
1544
|
function PromotionBestDealCard({ data }) {
|
package/dist/client/index.js
CHANGED