@pisell/materials 6.11.103 → 6.11.105
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/build/lowcode/3.js +1 -1
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +6 -6
- package/build/lowcode/render/default/1.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/buttonGroupPreview/index.js +2 -1
- package/es/components/productCard/cartSkuCard/index.js +0 -3
- package/es/components/productCard/cartSkuCard/index.less +2 -0
- package/lib/components/buttonGroupPreview/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/index.js +0 -3
- package/lib/components/productCard/cartSkuCard/index.less +2 -0
- package/package.json +3 -3
- package/es/components/pisellFind/index.d.ts +0 -40
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +0 -14
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -36
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -12
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -22
- package/es/components/productCard/cartSkuCard/hooks/useCompensatedPhysicalTextStyle.js +0 -66
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +0 -18
- package/es/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
- package/es/components/productCard/lineItem/index.d.ts +0 -66
- package/es/components/productCard/lineItem/types.d.ts +0 -9
- package/es/components/productCard/types.d.ts +0 -95
- package/lib/components/pisellFind/index.d.ts +0 -40
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +0 -14
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -36
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -12
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -22
- package/lib/components/productCard/cartSkuCard/hooks/useCompensatedPhysicalTextStyle.js +0 -82
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +0 -18
- package/lib/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
- package/lib/components/productCard/lineItem/index.d.ts +0 -66
- package/lib/components/productCard/lineItem/types.d.ts +0 -9
- package/lib/components/productCard/types.d.ts +0 -95
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/components/productCard/cartSkuCard/hooks/useCompensatedPhysicalTextStyle.ts
|
|
20
|
-
var useCompensatedPhysicalTextStyle_exports = {};
|
|
21
|
-
__export(useCompensatedPhysicalTextStyle_exports, {
|
|
22
|
-
useCompensatedPhysicalTextStyle: () => useCompensatedPhysicalTextStyle
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(useCompensatedPhysicalTextStyle_exports);
|
|
25
|
-
var import_react = require("react");
|
|
26
|
-
var CSS_PX_PER_MM = 96 / 25.4;
|
|
27
|
-
var PHYSICAL_TEXT_HEIGHT_MM = 4;
|
|
28
|
-
var PHYSICAL_TEXT_HEIGHT_VAR = "--pisell-cart-sku-card-physical-text-height";
|
|
29
|
-
var getBodyScaleY = () => {
|
|
30
|
-
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
31
|
-
return 1;
|
|
32
|
-
}
|
|
33
|
-
const transform = window.getComputedStyle(document.body).transform;
|
|
34
|
-
if (!transform || transform === "none") {
|
|
35
|
-
return 1;
|
|
36
|
-
}
|
|
37
|
-
const matrix = new DOMMatrixReadOnly(transform);
|
|
38
|
-
return Math.sqrt(matrix.c * matrix.c + matrix.d * matrix.d) || 1;
|
|
39
|
-
};
|
|
40
|
-
var useBodyScaleY = () => {
|
|
41
|
-
const [bodyScaleY, setBodyScaleY] = (0, import_react.useState)(getBodyScaleY);
|
|
42
|
-
(0, import_react.useEffect)(() => {
|
|
43
|
-
var _a;
|
|
44
|
-
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
45
|
-
return void 0;
|
|
46
|
-
}
|
|
47
|
-
const updateBodyScaleY = () => {
|
|
48
|
-
setBodyScaleY(getBodyScaleY());
|
|
49
|
-
};
|
|
50
|
-
updateBodyScaleY();
|
|
51
|
-
window.addEventListener("resize", updateBodyScaleY);
|
|
52
|
-
(_a = window.visualViewport) == null ? void 0 : _a.addEventListener("resize", updateBodyScaleY);
|
|
53
|
-
const bodyObserver = new MutationObserver(updateBodyScaleY);
|
|
54
|
-
bodyObserver.observe(document.body, {
|
|
55
|
-
attributes: true,
|
|
56
|
-
attributeFilter: ["style", "class"]
|
|
57
|
-
});
|
|
58
|
-
return () => {
|
|
59
|
-
var _a2;
|
|
60
|
-
window.removeEventListener("resize", updateBodyScaleY);
|
|
61
|
-
(_a2 = window.visualViewport) == null ? void 0 : _a2.removeEventListener("resize", updateBodyScaleY);
|
|
62
|
-
bodyObserver.disconnect();
|
|
63
|
-
};
|
|
64
|
-
}, []);
|
|
65
|
-
return bodyScaleY;
|
|
66
|
-
};
|
|
67
|
-
var useCompensatedPhysicalTextStyle = () => {
|
|
68
|
-
const bodyScaleY = useBodyScaleY();
|
|
69
|
-
return (0, import_react.useMemo)(
|
|
70
|
-
() => {
|
|
71
|
-
const compensatedHeight = PHYSICAL_TEXT_HEIGHT_MM * CSS_PX_PER_MM / bodyScaleY;
|
|
72
|
-
return {
|
|
73
|
-
[PHYSICAL_TEXT_HEIGHT_VAR]: `${compensatedHeight}px`
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
[bodyScaleY]
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
80
|
-
0 && (module.exports = {
|
|
81
|
-
useCompensatedPhysicalTextStyle
|
|
82
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ProductCardTypes } from '../types';
|
|
3
|
-
import type { LineItemStatusOption, LineItemType } from './types';
|
|
4
|
-
interface BookingLineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
5
|
-
dataSource: any;
|
|
6
|
-
type: LineItemType;
|
|
7
|
-
cartSkuType: 'a2' | 'a5' | 'a9';
|
|
8
|
-
relatedProductDataSource?: any;
|
|
9
|
-
rightActions?: any[];
|
|
10
|
-
escapeDom?: string;
|
|
11
|
-
statusOptions?: LineItemStatusOption[];
|
|
12
|
-
statusLoading?: boolean;
|
|
13
|
-
statusDisabled?: boolean;
|
|
14
|
-
isShowRelatedProduct?: boolean;
|
|
15
|
-
onBookingStatusChange?: (status: string, item: any) => void;
|
|
16
|
-
}
|
|
17
|
-
declare const BookingLineItem: (props: BookingLineItemProps) => React.JSX.Element | null;
|
|
18
|
-
export default BookingLineItem;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '../../../cartSkuCard/components/resources/index.less';
|
|
3
|
-
interface LineItemResourcesProps {
|
|
4
|
-
dataSource?: any;
|
|
5
|
-
}
|
|
6
|
-
declare const LineItemResources: (props: LineItemResourcesProps) => React.JSX.Element | null;
|
|
7
|
-
export default LineItemResources;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ProductCardTypes } from '../types';
|
|
3
|
-
import type { itemType, LineItemStatusOption, LineItemType } from './types';
|
|
4
|
-
import './index.less';
|
|
5
|
-
export declare const PREFIX = "pisell-line-item";
|
|
6
|
-
export type { itemType, LineItemStatusOption, LineItemType } from './types';
|
|
7
|
-
declare type LocalizedText = string | Record<string, unknown> | null | undefined;
|
|
8
|
-
export interface LineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
9
|
-
dataSource: any;
|
|
10
|
-
itemType?: itemType;
|
|
11
|
-
type?: LineItemType;
|
|
12
|
-
rightActions?: any[];
|
|
13
|
-
escapeDom?: string;
|
|
14
|
-
statusOptions?: LineItemStatusOption[];
|
|
15
|
-
statusLoading?: boolean;
|
|
16
|
-
statusDisabled?: boolean;
|
|
17
|
-
isShowRelatedProduct?: boolean;
|
|
18
|
-
onBookingStatusChange?: (status: string, item: any) => void;
|
|
19
|
-
}
|
|
20
|
-
export declare const convertProductToLineItemProduct: (product: any, translationOriginal: (text: LocalizedText) => string, symbol: string) => {
|
|
21
|
-
_id: any;
|
|
22
|
-
id: any;
|
|
23
|
-
product_id: any;
|
|
24
|
-
product_variant_id: any;
|
|
25
|
-
title: string;
|
|
26
|
-
product_title: string;
|
|
27
|
-
name: string;
|
|
28
|
-
cover: any;
|
|
29
|
-
image: any;
|
|
30
|
-
num: any;
|
|
31
|
-
quantity: any;
|
|
32
|
-
price: any;
|
|
33
|
-
total: any;
|
|
34
|
-
origin_total: any;
|
|
35
|
-
original_total: any;
|
|
36
|
-
source_product_price: any;
|
|
37
|
-
selling_price: any;
|
|
38
|
-
payment_price: any;
|
|
39
|
-
tax_fee: any;
|
|
40
|
-
symbol: string;
|
|
41
|
-
note: any;
|
|
42
|
-
product_sku: any;
|
|
43
|
-
product_bundle: any;
|
|
44
|
-
bundle: any;
|
|
45
|
-
product_option_string: string;
|
|
46
|
-
discount_list: any;
|
|
47
|
-
promotions: any;
|
|
48
|
-
isGift: boolean;
|
|
49
|
-
giftData: any;
|
|
50
|
-
_origin: any;
|
|
51
|
-
_extend: {
|
|
52
|
-
other: {
|
|
53
|
-
product_id: any;
|
|
54
|
-
option: any;
|
|
55
|
-
bundle: any;
|
|
56
|
-
product_variant_id: any;
|
|
57
|
-
quantity: any;
|
|
58
|
-
};
|
|
59
|
-
note: any;
|
|
60
|
-
total: any;
|
|
61
|
-
origin_total: any;
|
|
62
|
-
payment_price: any;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
declare const LineItem: (props: LineItemProps) => React.JSX.Element;
|
|
66
|
-
export default LineItem;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
export declare type LineItemType = 'a2' | 'a5' | 'a9';
|
|
3
|
-
export declare type itemType = 'booking' | 'product';
|
|
4
|
-
export interface LineItemStatusOption {
|
|
5
|
-
key: string;
|
|
6
|
-
label: ReactNode;
|
|
7
|
-
color?: string;
|
|
8
|
-
danger?: boolean;
|
|
9
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
export declare type bundleType = {
|
|
2
|
-
id: number;
|
|
3
|
-
name: string;
|
|
4
|
-
num: number;
|
|
5
|
-
price: number;
|
|
6
|
-
total: number;
|
|
7
|
-
origin_total?: number;
|
|
8
|
-
price_type?: string;
|
|
9
|
-
options?: optionType[];
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* @description:
|
|
13
|
-
* @return {*}
|
|
14
|
-
* @Author: WangHan
|
|
15
|
-
* @Date: 2025-01-02 23:00
|
|
16
|
-
*/
|
|
17
|
-
export declare type optionType = {
|
|
18
|
-
id: number;
|
|
19
|
-
name: string;
|
|
20
|
-
num: number;
|
|
21
|
-
price: number;
|
|
22
|
-
total: number;
|
|
23
|
-
origin_total?: number;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* @title: 商品商品类型
|
|
27
|
-
* @description:
|
|
28
|
-
* @return {*}
|
|
29
|
-
* @Author: WangHan
|
|
30
|
-
* @Date: 2025-01-02 22:48
|
|
31
|
-
*/
|
|
32
|
-
export declare type productType = {
|
|
33
|
-
_id: string | number;
|
|
34
|
-
id: number;
|
|
35
|
-
name: string;
|
|
36
|
-
price: number;
|
|
37
|
-
total: number;
|
|
38
|
-
num: number;
|
|
39
|
-
origin_total?: number;
|
|
40
|
-
image?: string;
|
|
41
|
-
isShowNote?: boolean;
|
|
42
|
-
note?: string;
|
|
43
|
-
like_status?: string;
|
|
44
|
-
bundle?: bundleType[];
|
|
45
|
-
options?: optionType[];
|
|
46
|
-
isShowAction?: boolean;
|
|
47
|
-
actionText?: string;
|
|
48
|
-
errorMessage?: string;
|
|
49
|
-
product_option_string?: string;
|
|
50
|
-
discount_reason?: string;
|
|
51
|
-
relation_products?: any[];
|
|
52
|
-
resource_id?: string | number;
|
|
53
|
-
relation_form_name?: string;
|
|
54
|
-
holder_title?: string;
|
|
55
|
-
start_date?: string;
|
|
56
|
-
end_date?: string;
|
|
57
|
-
is_show_duration?: boolean;
|
|
58
|
-
is_show_week?: boolean;
|
|
59
|
-
promotions?: any[];
|
|
60
|
-
isGift?: boolean;
|
|
61
|
-
giftData?: any;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* 排序总配置
|
|
65
|
-
*/
|
|
66
|
-
export declare type ProductCardTypes = {
|
|
67
|
-
dataSource: productType;
|
|
68
|
-
isShowImage?: boolean;
|
|
69
|
-
isShowOriginalPrice?: boolean;
|
|
70
|
-
isShowHolder?: boolean;
|
|
71
|
-
isShowNote?: boolean;
|
|
72
|
-
isShowPackageNote?: boolean;
|
|
73
|
-
isShowDelete?: boolean;
|
|
74
|
-
isShowEditProduct?: boolean;
|
|
75
|
-
isShowAmountFooter?: boolean;
|
|
76
|
-
disabledEdit?: boolean;
|
|
77
|
-
locale?: string;
|
|
78
|
-
symbol?: string;
|
|
79
|
-
isShowChangeHolder?: boolean;
|
|
80
|
-
isShowChangeResource?: boolean;
|
|
81
|
-
isShowChangeDate?: boolean;
|
|
82
|
-
disabledClick?: boolean;
|
|
83
|
-
disabledEditClick?: boolean;
|
|
84
|
-
onAction?: (val: any) => void;
|
|
85
|
-
onDelete?: (val: any) => void;
|
|
86
|
-
onNote?: (val: any) => void;
|
|
87
|
-
onLike?: (val: any) => void;
|
|
88
|
-
onCard?: (val: any) => void;
|
|
89
|
-
onChangeResource?: (val: any) => void;
|
|
90
|
-
onPromotion?: (val: any) => void;
|
|
91
|
-
onEditProduct?: (val: any) => void;
|
|
92
|
-
onGift?: (val: any) => void;
|
|
93
|
-
osWarnTips?: Array<string>;
|
|
94
|
-
[key: string]: any;
|
|
95
|
-
};
|