react-easy-bundle-page 0.0.1
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/README.md +124 -0
- package/dist/api/api.d.ts +34 -0
- package/dist/api/api.d.ts.map +1 -0
- package/dist/api/createRequest.d.ts +21 -0
- package/dist/api/createRequest.d.ts.map +1 -0
- package/dist/api/fetchAllProductsInCollection.d.ts +50 -0
- package/dist/api/fetchAllProductsInCollection.d.ts.map +1 -0
- package/dist/api/fetchProductsByIds.d.ts +135 -0
- package/dist/api/fetchProductsByIds.d.ts.map +1 -0
- package/dist/api/request.d.ts +3 -0
- package/dist/api/request.d.ts.map +1 -0
- package/dist/assets/svg/ChevronDownSvg.d.ts +3 -0
- package/dist/assets/svg/ChevronDownSvg.d.ts.map +1 -0
- package/dist/assets/svg/CloseSvg.d.ts +3 -0
- package/dist/assets/svg/CloseSvg.d.ts.map +1 -0
- package/dist/assets/svg/DecreaseSvg.d.ts +3 -0
- package/dist/assets/svg/DecreaseSvg.d.ts.map +1 -0
- package/dist/assets/svg/DeleteSvg.d.ts +3 -0
- package/dist/assets/svg/DeleteSvg.d.ts.map +1 -0
- package/dist/assets/svg/IncreaseSvg.d.ts +3 -0
- package/dist/assets/svg/IncreaseSvg.d.ts.map +1 -0
- package/dist/components/CartMaxProgressBar/index.d.ts +6 -0
- package/dist/components/CartMaxProgressBar/index.d.ts.map +1 -0
- package/dist/components/CartmaxBadge/index.d.ts +7 -0
- package/dist/components/CartmaxBadge/index.d.ts.map +1 -0
- package/dist/components/CartmaxButton/index.d.ts +19 -0
- package/dist/components/CartmaxButton/index.d.ts.map +1 -0
- package/dist/components/CartmaxCarouselMobile/index.d.ts +18 -0
- package/dist/components/CartmaxCarouselMobile/index.d.ts.map +1 -0
- package/dist/components/CartmaxFormatTemplatePrice/index.d.ts +11 -0
- package/dist/components/CartmaxFormatTemplatePrice/index.d.ts.map +1 -0
- package/dist/components/CartmaxLoading/index.d.ts +9 -0
- package/dist/components/CartmaxLoading/index.d.ts.map +1 -0
- package/dist/components/CartmaxModal/index.d.ts +19 -0
- package/dist/components/CartmaxModal/index.d.ts.map +1 -0
- package/dist/components/CartmaxProduct/index.d.ts +14 -0
- package/dist/components/CartmaxProduct/index.d.ts.map +1 -0
- package/dist/components/CartmaxProductCart/index.d.ts +19 -0
- package/dist/components/CartmaxProductCart/index.d.ts.map +1 -0
- package/dist/components/CartmaxQuantity/index.d.ts +26 -0
- package/dist/components/CartmaxQuantity/index.d.ts.map +1 -0
- package/dist/components/CartmaxSelect/index.d.ts +25 -0
- package/dist/components/CartmaxSelect/index.d.ts.map +1 -0
- package/dist/components/CartmaxSkeleton/index.d.ts +2 -0
- package/dist/components/CartmaxSkeleton/index.d.ts.map +1 -0
- package/dist/components/CartmaxSpinner/index.d.ts +10 -0
- package/dist/components/CartmaxSpinner/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/data.d.ts +749 -0
- package/dist/data.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery.d.ts +15 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/useVisibleChange.d.ts +2 -0
- package/dist/hooks/useVisibleChange.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +6350 -0
- package/dist/main.d.ts +5 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/page/CartmaxCartPage/CartSkeleton.d.ts +2 -0
- package/dist/page/CartmaxCartPage/CartSkeleton.d.ts.map +1 -0
- package/dist/page/CartmaxCartPage/index.d.ts +26 -0
- package/dist/page/CartmaxCartPage/index.d.ts.map +1 -0
- package/dist/page/CartmaxCartPageByMobile/index.d.ts +11 -0
- package/dist/page/CartmaxCartPageByMobile/index.d.ts.map +1 -0
- package/dist/page/ProductDetailModal/index.d.ts +12 -0
- package/dist/page/ProductDetailModal/index.d.ts.map +1 -0
- package/dist/page/ThemeA/index.d.ts +10 -0
- package/dist/page/ThemeA/index.d.ts.map +1 -0
- package/dist/page/ThemeAByAdmin/index.d.ts +11 -0
- package/dist/page/ThemeAByAdmin/index.d.ts.map +1 -0
- package/dist/page/hooks/clickCommon.d.ts +12 -0
- package/dist/page/hooks/clickCommon.d.ts.map +1 -0
- package/dist/store/commonStore.d.ts +22 -0
- package/dist/store/commonStore.d.ts.map +1 -0
- package/dist/store/index.d.ts +2 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/dist/utils/cartpageSession.d.ts +5 -0
- package/dist/utils/cartpageSession.d.ts.map +1 -0
- package/dist/utils/common.d.ts +6 -0
- package/dist/utils/common.d.ts.map +1 -0
- package/dist/utils/device.d.ts +8 -0
- package/dist/utils/device.d.ts.map +1 -0
- package/dist/utils/formatNumber.d.ts +20 -0
- package/dist/utils/formatNumber.d.ts.map +1 -0
- package/dist/utils/formatReplaceAll.d.ts +14 -0
- package/dist/utils/formatReplaceAll.d.ts.map +1 -0
- package/dist/utils/formatTemplae.d.ts +20 -0
- package/dist/utils/formatTemplae.d.ts.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/loadScriptConfig.d.ts +2 -0
- package/dist/utils/loadScriptConfig.d.ts.map +1 -0
- package/dist/utils/setGlobalStyles.d.ts +4 -0
- package/dist/utils/setGlobalStyles.d.ts.map +1 -0
- package/package.json +92 -0
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.tsx"],"names":[],"mappings":"AAEA,OAAO,sBAAsB,CAAC;AAO9B,OAAO,EAAmB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG5D,QAAA,MAAM,GAAG,GAAI,QAAQ,SAAS,4CAoG7B,CAAC;AAIF,OAAO,EAAE,GAAG,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartSkeleton.d.ts","sourceRoot":"","sources":["../../../src/page/CartmaxCartPage/CartSkeleton.tsx"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,+CAuBxB,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ConfigOther, IConfigProps, DiscountRuleItem } from '../../types/config';
|
|
2
|
+
import { IProductVariantWithDiscount } from '../../types/common.d.ts';
|
|
3
|
+
|
|
4
|
+
/** 根据购物车总数量与 discount_rules 选出适用的规则(总和 >= rule.quantity 时取 quantity 最大的那条) */
|
|
5
|
+
export declare function getApplicableRule(totalQuantity: number, discountRules: DiscountRuleItem[]): DiscountRuleItem | null;
|
|
6
|
+
/**
|
|
7
|
+
* 根据 discount_rules(按 quantity 升序)计算进度条目标与对应规则:
|
|
8
|
+
* - 目标 = 「第一个 quantity 严格大于 当前数量」的档位,表示“还差几件到下一档”;
|
|
9
|
+
* - 若当前数量已 >= 最高档,则目标为最后一档(进度视为已满)。
|
|
10
|
+
* - 返回 { targetQuantity, targetRule },targetRule 即该目标档位对应的规则(用于 discountValue)。
|
|
11
|
+
*/
|
|
12
|
+
export declare function getProgressTargetAndRule(cartTotalQuantity: number, discountRules: DiscountRuleItem[]): {
|
|
13
|
+
targetQuantity: number;
|
|
14
|
+
targetRule: DiscountRuleItem | null;
|
|
15
|
+
};
|
|
16
|
+
/** 为每个购物车项计算 discountPrice(固定金额 / 百分比 / 一口价 三种类型区分处理) */
|
|
17
|
+
export declare function buildCartVariantListWithDiscount(list: import('../../types/config').IProductVariant[], totalAmount: number, rule: DiscountRuleItem | null, cartCheckoutDiscountType: number): IProductVariantWithDiscount[];
|
|
18
|
+
declare const _default: ((props: {
|
|
19
|
+
commonInfo: ConfigOther;
|
|
20
|
+
config: IConfigProps;
|
|
21
|
+
isEasyBundleAdmin: boolean;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/page/CartmaxCartPage/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAI7E,OAAO,EAAE,2BAA2B,EAAgB,MAAM,qBAAqB,CAAC;AAIhF,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,GAAG,IAAI,CAMnH;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,iBAAiB,EAAE,MAAM,EACzB,aAAa,EAAE,gBAAgB,EAAE,GAChC;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAAE,CAgBjE;AAED,yDAAyD;AACzD,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,OAAO,gBAAgB,EAAE,eAAe,EAAE,EAChD,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,gBAAgB,GAAG,IAAI,EAC7B,wBAAwB,EAAE,MAAM,GAC/B,2BAA2B,EAAE,CA6C/B;iCAE+B;IAAE,UAAU,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,YAAY,CAAC;IAAC,iBAAiB,EAAE,OAAO,CAAA;CAAE;;;AA4M7G,wBAAyC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ConfigOther, IConfigProps } from '../../types/config';
|
|
2
|
+
|
|
3
|
+
declare const _default: ((props: {
|
|
4
|
+
commonInfo: ConfigOther;
|
|
5
|
+
config: IConfigProps;
|
|
6
|
+
isEasyBundleAdmin: boolean;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/page/CartmaxCartPageByMobile/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;iCAOnB;IAAE,UAAU,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,YAAY,CAAC;IAAC,iBAAiB,EAAE,OAAO,CAAA;CAAE;;;AA8LrH,wBAAiD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IProductListProps, ConfigOther, IConfigProps } from '../../types/config';
|
|
2
|
+
|
|
3
|
+
interface IProductDetailModalProps {
|
|
4
|
+
commonInfo: ConfigOther;
|
|
5
|
+
open: boolean;
|
|
6
|
+
config: IConfigProps;
|
|
7
|
+
info: IProductListProps | null;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const ProductDetailModal: (props: IProductDetailModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/page/ProductDetailModal/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,UAAU,wBAAwB;IAChC,UAAU,EAAE,WAAW,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AA8BD,eAAO,MAAM,kBAAkB,GAAI,OAAO,wBAAwB,4CA+TjE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IConfigProps } from '../../types/config';
|
|
2
|
+
|
|
3
|
+
declare const _default: ((props: {
|
|
4
|
+
config: IConfigProps;
|
|
5
|
+
isEasyBundleAdmin: boolean;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/page/ThemeA/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;iCAI1C;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,iBAAiB,EAAE,OAAO,CAAA;CAAE;;;AAkK3E,wBAAgC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IConfigProps, IProductListProps } from '../../types/config';
|
|
2
|
+
|
|
3
|
+
declare const _default: ((props: {
|
|
4
|
+
config: IConfigProps;
|
|
5
|
+
productList: IProductListProps[];
|
|
6
|
+
isEasyBundleAdmin: boolean;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/page/ThemeAByAdmin/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;iCAEnC;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,WAAW,EAAE,iBAAiB,EAAE,CAAC;IAAC,iBAAiB,EAAE,OAAO,CAAA;CAAE;;;AAsCpH,wBAAuC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConfigData, IConfigProps, IProductVariant } from '../../types/config';
|
|
2
|
+
|
|
3
|
+
export interface IProAddProduct {
|
|
4
|
+
config: IConfigProps;
|
|
5
|
+
cartVariantList: IProductVariant[];
|
|
6
|
+
}
|
|
7
|
+
export declare const clickCommon: () => {
|
|
8
|
+
handleReportClick: (config: ConfigData) => void;
|
|
9
|
+
handleAddProduct: (data: IProAddProduct) => Promise<void>;
|
|
10
|
+
addProductLoading: boolean;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=clickCommon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clickCommon.d.ts","sourceRoot":"","sources":["../../../src/page/hooks/clickCommon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAE,YAAY,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAGzE,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,YAAY,CAAA;IACpB,eAAe,EAAE,eAAe,EAAE,CAAA;CACrC;AAED,eAAO,MAAM,WAAW;gCAIc,UAAU;6BAYR,cAAc;;CAwCrD,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IProductVariant } from '../types/config';
|
|
2
|
+
|
|
3
|
+
export declare class CommonStoreClass {
|
|
4
|
+
loading: {
|
|
5
|
+
product: boolean;
|
|
6
|
+
cart: boolean;
|
|
7
|
+
};
|
|
8
|
+
/** 购物车的产品列表 */
|
|
9
|
+
cartVariantList: IProductVariant[];
|
|
10
|
+
/** 购物车总金额:cartVariantList 每项 quantity * price.amount 之和 */
|
|
11
|
+
get cartTotalAmount(): number;
|
|
12
|
+
/** 购物车总数量:cartVariantList 所有 quantity 之和 */
|
|
13
|
+
get cartTotalQuantity(): number;
|
|
14
|
+
constructor();
|
|
15
|
+
setLoading(path: 'product' | 'cart', loading: boolean): void;
|
|
16
|
+
setCartVariantList(list: IProductVariant[]): void;
|
|
17
|
+
addToCartVariantList(item: IProductVariant): void;
|
|
18
|
+
deleteFromCartVariantList(id: string): void;
|
|
19
|
+
updateQuantityToCartVariantList(id: string, quantity: number): void;
|
|
20
|
+
}
|
|
21
|
+
export declare const CommonStore: CommonStoreClass;
|
|
22
|
+
//# sourceMappingURL=commonStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonStore.d.ts","sourceRoot":"","sources":["../../src/store/commonStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,qBAAa,gBAAgB;IAEf,OAAO;;;MAGjB;IACF,eAAe;IACH,eAAe,EAAE,eAAe,EAAE,CAAM;IAEpD,2DAA2D;IAC3D,IAAc,eAAe,IAAI,MAAM,CAMtC;IAED,4CAA4C;IAC5C,IAAc,iBAAiB,IAAI,MAAM,CAExC;;IAcD,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,EAAE,OAAO,EAAE,OAAO;IAKrD,kBAAkB,CAAC,IAAI,EAAE,eAAe,EAAE;IAK1C,oBAAoB,CAAC,IAAI,EAAE,eAAe;IAc1C,yBAAyB,CAAC,EAAE,EAAE,MAAM;IAIpC,+BAA+B,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAG7D;AAED,eAAO,MAAM,WAAW,kBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";:root{--cartmax-bg-color: #fff;--cartmax-page-title-text-color: #131313;--cartmax-page-title-text-color-size: 24px;--cartmax-page-description-text-color: #131313;--cartmax-page-description-text-size: 14px;--cartmax-product-title-text-size: 13px;--cartmax-page-product-title-text-color: #131313;--cartmax-price-text-color: #131313;--cartmax-price-text-size: 13px;--cartmax-compare-title-text-color: #616161;--cartmax-compare-title-text-size: 13px;--cartmax-cart-button-text-color: #fff;--cartmax-page-button-text-size: 14px;--cartmax-cart-button-bg-color: #1F473E;--cartmax-cart-title-color: #131313;--cartmax-cart-title-size: 14px;--border-color: "#E1E2E3" --cartmax-pc-row-count: 4;--cartmax-mobile-row-count: 2;--cartmax-product-image-aspect-ratio: "1 / 1";--cartmax-progress-bar-bg-color: #1F473E;--cartmax-progress-bar-text-color: #fff;--cartmax-primary-color: #1F473E;--cartmax-discount-badge-color: #1F473E;--cartmax-cart-bg-color: #fff;--cartmax-cart-border-color: #E1E2E3;--cartmax-variant-bg-color: #fff;--cartmax-variant-border-color: #E1E2E3;--cartmax-icon-color: #fff;--cartmax-quantity-border-color: #E1E2E3;--cartmax-estimated-total-text-color: #131313;--cartmax-product-name-text-color: #131313;--cartmax-primary-button-text-size: 14px;--cartmax-page-pc-horizontal-margin: 24px;--cartmax-page-mobile-horizontal-margin: 20px;--cartmax-page-pc-vertical-margin: 24px;--cartmax-page-mobile-vertical-margin: 20px;--cartmax-product-card-pc-horizontal-gap: 20px;--cartmax-product-card-mobile-horizontal-gap: 16px;--cartmax-product-card-pc-vertical-gap: 24px;--cartmax-product-card-mobile-vertical-gap: 20px;--cartmax-button-border-radius: 8px;--cartmax-cart-border-radius: 16px;--cartmax-variant-and-quantity-border-radius: 30px;--cartmax-discount-badge-border-radius: 16px;--cartmax-display-page-product-border-radius: 16px;--cartmax-cart-page-product-border-radius: 16px;--cartmax-variant-text-color: #131313;--cartmax-product-name-text-size: 13px;--cartmax-variant-text-size: 13px;--cartmax-cart-page-description-text-size: 13px;--cartmax-cart-estimated-total-text-size: 13px}._wrapper_necwu_2{--qty-border: var(--cartmax-quantity-border-color, #E1E2E3);--qty-bg: var(--background-color, #fff);--qty-color: var(--button-color, #1a1a1a);--qty-font-size: var(--button-font-size, 16px);--qty-font-weight: var(--button-font-weight, 600);--qty-padding: var(--padding, 1.108px 0);display:inline-flex;align-items:center;border-radius:var(--cartmax-variant-and-quantity-border-radius);border:1px solid var(--qty-border);background:var(--qty-bg);color:var(--qty-color);padding:0;height:32px}._wrapper_necwu_2 ._button_necwu_18{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:none;background:transparent;border-radius:var(--cartmax-variant-and-quantity-border-radius);font-size:var(--cartmax-quantity-font-size);font-weight:var(--qty-font-weight, 600);color:inherit;cursor:pointer;transition:background-color .15s ease,color .15s ease}._wrapper_necwu_2 ._button_necwu_18:disabled{opacity:.4;cursor:auto}._wrapper_necwu_2 ._button_necwu_18 span{color:var(--cartmax-icon-color, #83847f)!important}._wrapper_necwu_2 ._button_necwu_18 svg{display:block}._wrapper_necwu_2 ._prev_necwu_43{margin-left:2px}._wrapper_necwu_2 ._next_necwu_46{margin-right:2px}._wrapper_necwu_2 ._input_necwu_49{width:62px;text-align:center;border:none;background:transparent;font-size:var(-cartmax-product-name-text-size);color:var(--cartmax-product-name-text-color);padding:8px 0 6px;cursor:text;-moz-appearance:textfield}._wrapper_necwu_2 ._input_necwu_49:focus{outline:none}._wrapper_necwu_2 ._input_necwu_49:disabled{opacity:.4;cursor:auto}._wrapper_necwu_2 ._input_necwu_49::-webkit-outer-spin-button,._wrapper_necwu_2 ._input_necwu_49::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}._overlay_10pml_3{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;display:flex;justify-content:center;align-items:center;z-index:9999}._modal_10pml_14{width:620px;max-width:90vw;background:#fff;border-radius:12px;box-shadow:0 10px 28px #00000026;display:flex;flex-direction:column;animation:_popIn_10pml_1 .18s ease-out}._header_10pml_26{padding:12px 16px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e1e3e5;font-weight:500;font-size:16px;background-color:#e1e2e3;border-radius:12px 12px 0 0;color:var(--cartmax-product-name-text-color)}._closeBtn_10pml_40{background:none;border:none;cursor:pointer;font-size:18px;color:#616161}._body_10pml_49{padding:16px;color:#1a1a1a;line-height:1.6;flex:1;min-height:0;overflow-y:auto}._footer_10pml_59{padding:16px;display:flex;justify-content:flex-end;gap:10px;border-top:1px solid #e1e3e5}._footerMobile_10pml_67{padding:16px;display:flex;justify-content:center;gap:10px;border-top:1px solid #e1e3e5}._footerMobile_10pml_67 button{width:80vw}._primaryBtn_10pml_79{background:#008060;color:#fff;border:none;border-radius:8px;padding:8px 14px;cursor:pointer;font-weight:600}._secondaryBtn_10pml_90{background:#f1f2f3;color:#202223;border:1px solid #c9cccf;border-radius:8px;padding:8px 14px;cursor:pointer}@keyframes _popIn_10pml_1{0%{transform:scale(.96);opacity:0}to{transform:scale(1);opacity:1}}@media (max-width: 768px){._overlay_10pml_3{align-items:flex-end}._modal_10pml_14{width:100%;max-width:100%;border-radius:16px 16px 0 0;animation:_slideUp_10pml_1 .22s ease-out}}@keyframes _slideUp_10pml_1{0%{transform:translateY(40%);opacity:.6}to{transform:translateY(0);opacity:1}}._loading_34nk8_1{height:100%}._loadingSpan_34nk8_5{height:100%;display:flex;justify-content:center;align-items:center}._loadingSvg_34nk8_12{width:100%;height:100%;animation:_rotate_34nk8_1 .5s linear infinite;fill:var(--fill-color, #000000)}@keyframes _rotate_34nk8_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._cartmaxButton_8grgj_2{width:100%;display:flex;justify-content:center;align-items:center;line-height:1.58;font-size:var(--cartmax-button-font-size, 13px);color:var(--cartmax-button-color, #fff);font-weight:var(--cartmax-button-font-weight, bold);border:1px solid var(--cartmax-button-border-color, transparent);padding:var(--cartmax-button-padding, 4px 12px);border-radius:var(--cartmax-button-border-radius);position:relative;overflow:hidden;font-family:unset}._loadingWrap_8grgj_19{position:absolute;background-color:transparent;width:100%;height:100%;display:flex;justify-content:center;align-items:center}._buttonHide_8grgj_29{background-color:var(--cartmax-button-background-color, #131313)}._buttonDefault_8grgj_33{cursor:pointer;transition:box-shadow .2s ease,filter .2s ease;background-color:var(--cartmax-button-background-color, #131313)}@media (hover: hover) and (pointer: fine){._buttonDefault_8grgj_33:hover{box-shadow:0 0 1px 1px var(--cartmax-button-hover-background-color);filter:brightness(.92)}}._root_1rsl2_2{display:inline-block;width:var(--select-width, 100%)}._root_1rsl2_2[data-disabled=true]{opacity:.5}._root_1rsl2_2[data-disabled=true] ._customSelectItself_1rsl2_10,._root_1rsl2_2[data-no-hover=true] ._customSelectItself_1rsl2_10{cursor:default}._root_1rsl2_2[data-no-hover=true] ._customSelectItself_1rsl2_10{pointer-events:none}._customSelect_1rsl2_10{position:relative;width:100%}._customSelectItself_1rsl2_10{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-color:var(--cartmax-variant-bg-color);border:1px solid var(--cartmax-variant-border-color);border-radius:var(--cartmax-variant-and-quantity-border-radius);padding:var(--padding, 5px 30px 6px 10px);font-size:var(--cartmax-variant-text-size);color:var(--text-color, #303030);width:100%;cursor:pointer;box-sizing:border-box;font-family:unset;line-height:1.25}._customSelectItself_1rsl2_10:focus{outline:none;border-color:var(--border-color, #8a8a8a)}._chevron_1rsl2_46{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;pointer-events:none;color:var(--cartmax-primary-color)}._cartmaxProductCartRoot_42qgr_3{min-width:0;width:100%;overflow:hidden}._cartmaxProductCartImage_42qgr_9{position:relative;width:100%;aspect-ratio:var(--cartmax-product-image-aspect-ratio);border-radius:var(--cartmax-display-page-product-border-radius);overflow:hidden}._cartmaxProductCartImage_42qgr_9 img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;border-radius:var(--cartmax-display-page-product-border-radius)}._cartmaxProductCartImage_42qgr_9 ._cartmaxProductCartImageDefault_42qgr_22{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-o-object-fit:contain;object-fit:contain}._cartmaxProductCartImage_42qgr_9 ._cartmaxProductCartImageHover_42qgr_29{position:absolute;top:0;left:0;opacity:0;transition:opacity .25s ease;pointer-events:none}._cartmaxProductCartImage_42qgr_9:hover ._cartmaxProductCartImageHover_42qgr_29{opacity:1}._cartmaxProductCartTitle_42qgr_41{font-size:var(--cartmax-product-name-text-size);color:var(--cartmax-page-product-title-text-color);font-weight:var(--font-body-weight, 400);margin-top:8px;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.54}._cartmaxProductCartTitle_42qgr_41 span{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--cartmax-product-name-text-color)}._cartmaxProductCartPrice_42qgr_64{font-weight:var(--font-body-weight, 400);margin-top:8px;display:flex;align-items:center;gap:8px;min-width:0;line-height:1.25}._cartmaxProductCartSelect_42qgr_74{margin-top:12px;min-width:0}._cartmaxProductCartButton_42qgr_79{margin-top:8px;min-width:0}._cartmaxProductCartPriceOriginal_42qgr_84{text-decoration:line-through;font-size:var(--cartmax-compare-title-text-size);color:var(--cartmax-compare-title-text-color)}._cartmaxProductCartPriceAmount_42qgr_90{font-size:var(--cartmax-price-text-size);color:var(--cartmax-price-text-color)}._skeleton_1at8t_1{margin-bottom:24px;min-width:0;max-width:100%}._skeletonBox_1at8t_7{width:100%;max-width:100%;height:360px;background-color:#e1e2e3;border-radius:16px}@media (max-width: 768px){._skeletonBox_1at8t_7{height:180px}}._skeletonText_1at8t_20{margin-top:12px}._skeletonTextOne_1at8t_24{width:181px;max-width:100%;height:8px;border-radius:4px;background-color:#e1e2e3}._skeletonTextTwo_1at8t_32{width:80px;max-width:100%;height:8px;border-radius:4px;background-color:#e1e2e3;margin-top:8px}._skeletonContent_1at8t_41{width:180px;max-width:100%;height:28px;border-radius:8px;background-color:#e1e2e3;margin-top:12px}._cartmaxProductCart_euqrq_2{display:flex;gap:16px;margin-top:16px}._cartmaxProductCartImage_euqrq_8{width:64px;height:64px;border-radius:var(--cartmax-cart-page-product-border-radius);border:1px solid #E5E7EB;-o-object-fit:contain;object-fit:contain}._cartmaxProductCartImage_euqrq_8 img{width:62px;height:62px;-o-object-fit:contain;object-fit:contain;border-radius:var(--cartmax-cart-page-product-border-radius)}._cartmaxProductCartContent_euqrq_22{display:flex;flex-direction:column;gap:8px;min-width:0}._cartmaxProductCartContentTitle_euqrq_29{font-size:var(--cartmax-product-name-text-size);color:var(--cartmax-product-name-text-color);font-weight:var(--font-body-weight, 400);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.43}._cartmaxProductCartVariantTitle_euqrq_40{font-size:var(--cartmax-variant-text-size);color:var(--cartmax-variant-text-color);font-weight:var(--font-body-weight, 400);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.67}._cartmaxProductCartContentPrice_euqrq_51{display:flex;gap:4px;align-items:center;line-height:1.25}._cartmaxProductCartContentPriceText_euqrq_58{font-size:var(--cartmax-price-text-size);color:var(--cartmax-price-text-color);font-weight:var(--font-body-weight, 400)}._cartmaxProductCartContentComparePriceText_euqrq_64{font-size:var(--cartmax-compare-title-text-size);color:var(--cartmax-compare-title-text-color);font-weight:var(--font-body-weight, 400);text-decoration:line-through}._cartmaxProductCartQuantity_euqrq_71{display:flex;align-items:center;gap:16px;margin-top:4px}._cartmaxProductCartQuantityDelete_euqrq_78{cursor:pointer;align-items:center;justify-content:center}._cartmaxProductCartQuantityDelete_euqrq_78 span{color:var(--cartmax-icon-color, #E1E2E3)!important}._cartmaxProductCartLine_euqrq_87{width:100%;margin-top:16px;border-top:1px dashed #E5E7EB}._cartmaxBadge_1894u_1{display:inline-flex;align-items:center;justify-content:center;width:-moz-fit-content;width:fit-content;padding:0 8px;font-size:13px;font-weight:500;color:var(--cartmax-discount-badge-text-color);border-radius:var(--cartmax-discount-badge-border-radius);height:20px;background-color:var(--cartmax-discount-badge-color)}._cartMaxProgressBar_1vkvh_1{width:100%;height:8px;border-radius:4px;background-color:#e1e2e3;overflow:hidden}._fill_1vkvh_9{height:100%;border-radius:4px;transition:width .2s ease;background-color:var(--cartmax-progress-bar-bg-color, #1F473E)}@keyframes _spin_apa7v_1{to{transform:rotate(1turn)}}._cartmaxSpinner_apa7v_6{display:inline-flex;align-items:center;justify-content:center;color:currentColor;animation:_spin_apa7v_1 .8s linear infinite}._svg_apa7v_14{display:block;width:100%;height:100%}._sizeSmall_apa7v_20{width:20px;height:20px}._sizeLarge_apa7v_25{width:30px;height:30px}._carousel_za3ts_1{position:relative;width:100%;height:100%;overflow:hidden;touch-action:pan-y pinch-zoom}._track_za3ts_9{display:flex;height:100%;transition:transform .25s ease-out;will-change:transform}._slide_za3ts_16{flex:0 0 100%;width:100%;height:100%;min-height:0;position:relative}._slide_za3ts_16 img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;display:block;pointer-events:none}._slide_za3ts_16 ._cartmaxProductCartImageDefault_za3ts_30{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-o-object-fit:contain;object-fit:contain}._dots_za3ts_38{position:absolute;left:0;right:0;bottom:4px;display:flex;justify-content:center;align-items:center;gap:6px}._dot_za3ts_38,._dotActive_za3ts_50{width:6px;height:6px;border-radius:50%;border:none;padding:0;cursor:pointer;transition:background-color .2s}._dot_za3ts_38{background-color:#ccc}._dotActive_za3ts_50{background-color:var(--cartmax-primary-color)}._cartmaxContentCartTitle_129w0_2{font-size:var(--cartmax-cart-title-size);font-weight:550;color:var(--cartmax-cart-title-color)}._cartmaxContentCartDescription_129w0_8{font-size:var(--cartmax-cart-page-description-text-size);font-weight:550;margin-top:8px;color:var(--cartmax-progress-bar-text-color)}._cartmaxContentCartButton_129w0_15{margin-top:16px}._cartmaxContentCartTotal_129w0_19{display:flex;justify-content:space-between;align-items:center;margin-top:16px}._cartmaxContentCartTotalText_129w0_26{color:var(--cartmax-estimated-total-text-color);font-size:var(--cartmax-cart-estimated-total-text-size)}._cartmaxContentCartTotalPrice_129w0_31{font-size:var(--cartmax-cart-estimated-total-text-size);color:var(--cartmax-estimated-total-text-color)}._CartSkeleton_129w0_37{margin-top:4px}._CartSkeletonText_129w0_41{width:248px;height:8px;border-radius:4px;background-color:#e3e3e3}._CartSkeletonCart_129w0_48{display:flex;gap:16px;margin-top:16px}._CartSkeletonCartImage_129w0_54{width:64px;height:64px;border-radius:16px;background-color:#e3e3e3}._CartSkeletonCartContent_129w0_61{display:flex;flex-direction:column;gap:8px}._CartSkeletonCartContentTitle_129w0_67{width:120px;height:8px;border-radius:4px;background-color:#e3e3e3}._CartSkeletonCartContentDescription_129w0_74{width:68px;height:8px;border-radius:4px;background-color:#e3e3e3}._CartSkeletonCartLine_129w0_81{width:100%;border-top:1px dashed #E3E3E3;margin-top:16px}._CartSkeletonCartButton_129w0_87{width:120px;height:28px;border-radius:8px;background-color:#e3e3e3;margin-top:16px}._cartmaxContentCartList_129w0_95{height:404px;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}._cartmaxContentCartList_129w0_95::-webkit-scrollbar{display:none}._cartmaxProductCartQuantityDelete_129w0_106{display:grid}._productDetailModalContent_18m6m_3{display:flex;gap:24px}._productDetailModalLeft_18m6m_9{position:sticky;top:0;align-self:flex-start;flex-shrink:0}._productDetailModalRight_18m6m_17{display:flex;flex-direction:column;flex:1;min-width:0}._productDetailModalImage_18m6m_24{position:relative;width:300px;height:300px;overflow:hidden}._productDetailModalImage_18m6m_24 img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}._productDetailModalImage_18m6m_24 ._cartmaxProductCartImageDefault_18m6m_35{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-o-object-fit:contain;object-fit:contain}._productDetailModalImageList_18m6m_43{display:flex;gap:12px;width:64px;height:64px;margin-top:12px}._productDetailModalImageList_18m6m_43 img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;cursor:pointer}._productDetailModalInfo_18m6m_58{position:sticky;top:0;z-index:1;flex-shrink:0;background:#fff;display:flex;flex-direction:column;gap:8px;padding-top:12px}._productDetailModalInfoTitle_18m6m_70{font-size:var(--cartmax-product-name-text-size);color:var(--cartmax-product-name-text-color);font-weight:500}._productDetailModalInfoPriceContainer_18m6m_76{display:flex;gap:8px;align-items:baseline}._productDetailModalInfoPrice_18m6m_76{font-size:var(--cartmax-price-text-size);color:var(--cartmax-price-text-color);font-weight:500}._productDetailModalInfoComparePrice_18m6m_88{font-size:var(--cartmax-compare-title-text-size);color:var(--cartmax-compare-title-text-color);font-weight:var(--font-body-weight, 400);text-decoration:line-through}._productDetailModalOptions_18m6m_96{display:flex;flex-direction:column;gap:16px;margin-top:12px}._optionRow_18m6m_103{display:flex;flex-direction:column;gap:8px}._optionName_18m6m_109{font-size:var(--cartmax-variant-text-size);font-weight:500;color:var(--cartmax-variant-text-color)}._optionValues_18m6m_115{display:flex;flex-wrap:wrap;gap:8px;align-items:center}._optionBtn_18m6m_122,._optionBtnSelected_18m6m_123{padding:4px 12px;font-size:12px;border:1px solid var(--cartmax-variant-border-color);border-radius:4px;background:#fff;cursor:pointer}._optionBtn_18m6m_122:disabled,._optionBtnSelected_18m6m_123:disabled{opacity:.5;cursor:not-allowed}._optionBtnSelected_18m6m_123{border-color:#000;background:#000;color:#fff}._optionSwatch_18m6m_144{width:26px;height:26px;border-radius:50%;padding:2px;border:1px solid transparent;background-clip:content-box;box-sizing:border-box;cursor:pointer;flex-shrink:0}._optionSwatch_18m6m_144:disabled{opacity:.1;cursor:not-allowed}._optionSwatchDisabled_18m6m_160{opacity:.5;cursor:not-allowed}@media (max-width: 768px){._productDetailModalBody_18m6m_167{padding-top:0!important}._productDetailModalContent_18m6m_3{margin:0 -16px;padding:0 16px 16px}}._root_tuh0u_1{position:fixed;left:12px;right:12px;bottom:32px;z-index:100;border-radius:var(--cartmax-cart-border-radius);padding:12px 16px;background:var(--cartmax-cart-bg-color);border:1px solid var(--cartmax-cart-border-color);box-shadow:0 4px 20px #00000014}._titleRow_tuh0u_14{display:flex;align-items:center;justify-content:space-between;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}._title_tuh0u_14{color:var(--cartmax-cart-title-color);font-size:var(--cartmax-cart-title-size);font-weight:550}._chevron_tuh0u_28{display:inline-flex;align-items:center;justify-content:center;transition:transform .2s ease;color:var(--cartmax-icon-color)}._description_tuh0u_36{font-size:var(--cartmax-cart-page-description-text-size);font-weight:500;margin-top:4px;color:var(--cartmax-progress-bar-text-color)}._progressWrap_tuh0u_43{margin-top:8px}._cartList_tuh0u_47{max-height:396px;overflow-y:auto;margin-top:8px;scrollbar-width:none;-ms-overflow-style:none}._cartList_tuh0u_47::-webkit-scrollbar{display:none}._total_tuh0u_58{display:flex;justify-content:space-between;align-items:center;margin-top:12px;font-size:13px}._totalText_tuh0u_66{font-weight:500;color:var(--cartmax-estimated-total-text-color);font-size:var(--cartmax-cart-estimated-total-text-size)}._totalPrice_tuh0u_72{font-weight:600;font-size:var(--cartmax-cart-estimated-total-text-size);color:var(--cartmax-estimated-total-text-color)}._buttonWrap_tuh0u_78{margin-top:12px}._cartmaxBody_l9aqb_2{padding:var(--cartmax-page-pc-vertical-margin) var(--cartmax-page-pc-horizontal-margin);color:#131313}@media (max-width: 639px){._cartmaxBody_l9aqb_2{padding:var(--cartmax-page-mobile-vertical-margin) var(--cartmax-page-mobile-horizontal-margin)}}._cartmaxBody_l9aqb_2 ._cartmaxHeaderTitleText_l9aqb_11{font-size:var(--cartmax-page-title-text-color-size);color:var(--cartmax-product-name-text-color);font-weight:500}._cartmaxBody_l9aqb_2 ._cartmaxHeaderDescriptionText_l9aqb_16{font-size:var(--cartmax-page-description-text-size);color:var(--cartmax-page-description-text-color);font-weight:var(--font-body-weight, 400);margin-top:8px}._cartmaxBody_l9aqb_2 ._cartmaxContent_l9aqb_22{margin-top:24px;display:flex;gap:var(--cartmax-page-pc-horizontal-margin);justify-content:space-between;min-width:0}@media (max-width: 639px){._cartmaxBody_l9aqb_2 ._cartmaxContent_l9aqb_22{overflow-x:hidden;gap:0}}._cartmaxBody_l9aqb_2 ._cartmaxContentProductsCart_l9aqb_35{display:grid;grid-template-columns:repeat(var(--cartmax-pc-row-count),minmax(0,1fr));row-gap:var(--cartmax-product-card-pc-vertical-gap);-moz-column-gap:var(--cartmax-product-card-pc-horizontal-gap);column-gap:var(--cartmax-product-card-pc-horizontal-gap);flex:1;min-width:0}@media (max-width: 639px){._cartmaxBody_l9aqb_2 ._cartmaxContentProductsCart_l9aqb_35{grid-template-columns:repeat(var(--cartmax-mobile-row-count),minmax(0,1fr));row-gap:var(--cartmax-product-card-mobile-vertical-gap);-moz-column-gap:var(--cartmax-product-card-mobile-horizontal-gap);column-gap:var(--cartmax-product-card-mobile-horizontal-gap);margin-right:0}}._cartmaxBody_l9aqb_2 ._cartmaxContentProductsCartItem_l9aqb_51{cursor:pointer;min-width:0;width:100%;overflow:hidden}._cartmaxBody_l9aqb_2 ._cartmaxContentProductsCartItem_l9aqb_51._noPointer_l9aqb_58{cursor:default}._cartmaxBody_l9aqb_2 ._cartmaxContentProductsCartItem_l9aqb_51>*{min-width:0;width:100%}._cartmaxBody_l9aqb_2 ._cartmaxContentProductsCartItem_l9aqb_51._cartmaxContentProductsCartItemCenter_l9aqb_65{display:flex;align-items:center;justify-content:center;min-height:200px}._cartmaxBody_l9aqb_2 ._cartmaxContentCart_l9aqb_71{position:sticky;top:106px;align-self:flex-start;width:320px;height:auto;border-radius:var(--cartmax-cart-border-radius);padding:20px;border:1px solid var(--cartmax-cart-border-color);background-color:var(--cartmax-cart-bg-color)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cartpageSession.d.ts","sourceRoot":"","sources":["../../src/utils/cartpageSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItD,wBAAgB,kBAAkB,IAAI,eAAe,EAAE,CAUtD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,eAAe,EAAE,QAOvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const isMobile: () => boolean;
|
|
2
|
+
export declare const roundUpTwoDecimals: (num: number) => number;
|
|
3
|
+
export declare const getTypeEmu: (type: string) => {
|
|
4
|
+
type: number;
|
|
5
|
+
config_type: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function adjustBrightness(hexColor: string, percent: number): string;
|
|
8
|
+
//# sourceMappingURL=device.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/utils/device.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,QAAO,OAO3B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,WAK7C,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM;;;CAqBtC,CAAC;AAGF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAO1E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 处理金额数值,精确到分(cents)
|
|
3
|
+
* 如果没有小数点,保持原值
|
|
4
|
+
* 如果小数位数小于等于2位,保持原值
|
|
5
|
+
* 如果第三位小数不为0,第二位小数进1
|
|
6
|
+
* 如果第三位小数为0,但第四位小数不为0,第二位小数进1
|
|
7
|
+
* 如果第三位小数为0,且第四位小数也为0,直接截取前两位
|
|
8
|
+
* @param num 数值
|
|
9
|
+
* @returns 处理后的数字
|
|
10
|
+
*/
|
|
11
|
+
declare const formatPrice: (num: number | string) => number;
|
|
12
|
+
/**
|
|
13
|
+
* 格式化使用逗号作为小数分隔符的金额(欧洲格式)
|
|
14
|
+
* 确保金额始终显示两位小数
|
|
15
|
+
* @param input 使用逗号分隔符的金额字符串(如 "12,5" 或 "12," 或 "12")
|
|
16
|
+
* @returns 格式化后的字符串,始终包含两位小数(如 "12,50")
|
|
17
|
+
*/
|
|
18
|
+
declare const formatCommaDecimal: (input: string) => string;
|
|
19
|
+
export { formatCommaDecimal, formatPrice, };
|
|
20
|
+
//# sourceMappingURL=formatNumber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatNumber.d.ts","sourceRoot":"","sources":["../../src/utils/formatNumber.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,QAAA,MAAM,WAAW,GAAI,KAAK,MAAM,GAAG,MAAM,WAiCxC,CAAA;AACD;;;;;GAKG;AACH,QAAA,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,MAK3C,CAAA;AAED,OAAO,EACL,kBAAkB,EAClB,WAAW,GACZ,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface ReplaceRule {
|
|
2
|
+
key: string;
|
|
3
|
+
value: string | number | null | undefined;
|
|
4
|
+
escapeRegex?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 批量替换文本
|
|
8
|
+
* @param text - 原始文本
|
|
9
|
+
* @param rules - 替换规则数组
|
|
10
|
+
* @returns 替换后的文本
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatReplaceAll(text: string, rules: ReplaceRule[]): string;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=formatReplaceAll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatReplaceAll.d.ts","sourceRoot":"","sources":["../../src/utils/formatReplaceAll.ts"],"names":[],"mappings":"AAAA,UAAU,WAAW;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,WAAW,EAAE,GACnB,MAAM,CAeR"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare enum currencyEnum {
|
|
2
|
+
Amount = "[amount]",
|
|
3
|
+
AmountNoDecimals = "[amount_no_decimals]",
|
|
4
|
+
AmountWithCommaSeparator = "[amount_with_comma_separator]",
|
|
5
|
+
AmountNoDecimalsWithCommaSeparator = "[amount_no_decimals_with_comma_separator]",
|
|
6
|
+
AmountWithApostropheSeparator = "[amount_with_apostrophe_separator]",
|
|
7
|
+
AmountNoDecimalsWithSpaceSeparator = "[amount_no_decimals_with_space_separator]",
|
|
8
|
+
AmountWithSpaceSeparator = "[amount_with_space_separator]",
|
|
9
|
+
AmountWithPeriodAndSpaceSeparator = "[amount_with_period_and_space_separator]"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* shopify 货币格式
|
|
13
|
+
* [amount] 1,134.65
|
|
14
|
+
* [amount_no_decimals] ✓ 1,135
|
|
15
|
+
* [amount_with_comma_separator] 1.134,65
|
|
16
|
+
* [amount_no_decimals_with_comma_separator] ✓ 1.135
|
|
17
|
+
* [amount_with_apostrophe_separator] 1'134.65
|
|
18
|
+
*/
|
|
19
|
+
export declare const formatByCurrency: (formatType: currencyEnum | string, value: number | string, currency: string, retainDecimals?: boolean) => string;
|
|
20
|
+
//# sourceMappingURL=formatTemplae.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatTemplae.d.ts","sourceRoot":"","sources":["../../src/utils/formatTemplae.ts"],"names":[],"mappings":"AAmDA,oBAAY,YAAY;IACtB,MAAM,aAAa;IACnB,gBAAgB,yBAAyB;IACzC,wBAAwB,kCAAkC;IAC1D,kCAAkC,8CAA8C;IAChF,6BAA6B,uCAAuC;IACpE,kCAAkC,8CAA8C;IAChF,wBAAwB,kCAAkC;IAC1D,iCAAiC,6CAA6C;CAC/E;AAED;;;;;;;GAOG;AAEH,eAAO,MAAM,gBAAgB,GAC3B,YAAY,YAAY,GAAG,MAAM,EACjC,OAAO,MAAM,GAAG,MAAM,EACtB,UAAU,MAAM,EAChB,iBAAgB,OAAc,KAC7B,MAkNF,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './loadScriptConfig';
|
|
2
|
+
export * from './device';
|
|
3
|
+
export * from './setGlobalStyles';
|
|
4
|
+
export * from './common';
|
|
5
|
+
export * from './formatReplaceAll';
|
|
6
|
+
export * from './formatTemplae';
|
|
7
|
+
export * from './formatNumber';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadScriptConfig.d.ts","sourceRoot":"","sources":["../../src/utils/loadScriptConfig.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,GAAI,IAAI,MAAM,QAa1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setGlobalStyles.d.ts","sourceRoot":"","sources":["../../src/utils/setGlobalStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,eAAO,MAAM,eAAe,GAAI,OAAO,YAAY,SAgElD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-easy-bundle-page",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Bundle Page Widget",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.es.js",
|
|
7
|
+
"module": "dist/index.es.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"dev": "vite",
|
|
14
|
+
"watch-test": "vite build -m watch -c vite.config.cf.ts -w",
|
|
15
|
+
"watch-production": "vite build --mode=production -m watch -c vite.config.cf.ts -w",
|
|
16
|
+
"build": "vite build --mode=production",
|
|
17
|
+
"build:test": "vite build -c vite.config.ts --mode=test",
|
|
18
|
+
"build:widget-test": "vite build -c vite.config.widget.ts --mode=test",
|
|
19
|
+
"build:widget-production": "vite build -c vite.config.widget.ts --mode=production",
|
|
20
|
+
"preview": "vite preview",
|
|
21
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
22
|
+
"release": "release-it",
|
|
23
|
+
"translate": "npx i18n-ai-trans translate",
|
|
24
|
+
"deploy:test": "wrangler pages deploy dist --project-name=cartmax-bundle-page-test --branch=main",
|
|
25
|
+
"deploy:prod": "wrangler pages deploy dist --project-name=cartmax-bundle-page-online --branch=main",
|
|
26
|
+
"publish:test": "npm run build:test && npm run deploy:test",
|
|
27
|
+
"publish:prod": "npm run build && npm run deploy:prod",
|
|
28
|
+
"publish:npm": "npm publish --access public"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"react",
|
|
32
|
+
"typescript",
|
|
33
|
+
"components"
|
|
34
|
+
],
|
|
35
|
+
"author": "",
|
|
36
|
+
"license": "ISC",
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"axios": ">=0.26.0",
|
|
39
|
+
"lodash-es": ">=4.0.0",
|
|
40
|
+
"react": ">=16.8.0",
|
|
41
|
+
"react-dom": ">=16.8.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^22.10.1",
|
|
45
|
+
"@eslint/js": "^9.30.1",
|
|
46
|
+
"@types/react": "^18.2.66",
|
|
47
|
+
"@types/react-dom": "^18.2.22",
|
|
48
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
49
|
+
"autoprefixer": "^10.4.21",
|
|
50
|
+
"classnames": "^2.5.1",
|
|
51
|
+
"eslint": "^9.30.1",
|
|
52
|
+
"eslint-config-prettier": "^10.1.5",
|
|
53
|
+
"eslint-plugin-react": "^7.37.5",
|
|
54
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
55
|
+
"globals": "^16.3.0",
|
|
56
|
+
|
|
57
|
+
"postcss": "^8.5.6",
|
|
58
|
+
"release-it": "^19.0.4",
|
|
59
|
+
"rollup-plugin-visualizer": "^6.0.3",
|
|
60
|
+
"sass": "^1.72.0",
|
|
61
|
+
"typescript": "^5.2.2",
|
|
62
|
+
"typescript-eslint": "^8.35.1",
|
|
63
|
+
"vite": "^5.2.0",
|
|
64
|
+
"vite-plugin-dts": "^3.9.1",
|
|
65
|
+
"wrangler": "^4.32.0"
|
|
66
|
+
},
|
|
67
|
+
"release-it": {
|
|
68
|
+
"git": {
|
|
69
|
+
"commitMessage": "chore: release v${version}",
|
|
70
|
+
"commit": true,
|
|
71
|
+
"tag": true,
|
|
72
|
+
"push": true
|
|
73
|
+
},
|
|
74
|
+
"npm": {
|
|
75
|
+
"publish": true,
|
|
76
|
+
"publishConfig": {
|
|
77
|
+
"registry": "https://registry.npmjs.org/"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"hooks": {
|
|
81
|
+
"after:bump": "npm run build"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"dependencies": {
|
|
85
|
+
"eslint-formatter-pretty": "^6.0.1",
|
|
86
|
+
"mobx": "^6.3.13",
|
|
87
|
+
"mobx-persist": "^0.4.1",
|
|
88
|
+
"mobx-react": "^7.5.0",
|
|
89
|
+
"mobx-utils": "^6.0.5",
|
|
90
|
+
"query-string": "^9.2.2"
|
|
91
|
+
}
|
|
92
|
+
}
|