@pisell/materials 1.0.486 → 1.0.488
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/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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +26 -26
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +17 -17
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/collapse/index.js +27 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +1 -1
- package/es/components/pisellQrcode/index.js +3 -2
- package/es/components/pisellWalletPassCard/index.less +3 -1
- package/es/components/productCard/components/Action/index.js +1 -1
- package/es/components/productCard/components/AmountFooter/index.d.ts +1 -1
- package/es/components/productCard/components/AmountFooter/index.js +30 -10
- package/es/components/productCard/components/AmountFooter/index.less +11 -0
- package/es/components/productCard/components/Header/index.js +22 -14
- package/es/components/productCard/components/MultiDay/index.d.ts +4 -0
- package/es/components/productCard/components/MultiDay/index.js +81 -0
- package/es/components/productCard/components/MultiDay/index.less +34 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +11 -5
- package/es/components/productCard/components/Packages/components/options/index.js +2 -2
- package/es/components/productCard/components/Packages/index.js +1 -2
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/components/Time/index.js +15 -13
- package/es/components/productCard/index.d.ts +1 -1
- package/es/components/productCard/index.js +34 -20
- package/es/components/productCard/index.less +3 -2
- package/es/components/productCard/status.d.ts +24 -1
- package/es/components/productCard/status.js +52 -2
- package/es/components/productCard/types.d.ts +60 -1
- package/es/components/productCard/utils.d.ts +10 -144
- package/es/components/productCard/utils.js +36 -673
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/locales/en-US.d.ts +2 -0
- package/es/locales/en-US.js +4 -1
- package/es/locales/zh-CN.d.ts +2 -0
- package/es/locales/zh-CN.js +4 -1
- package/es/locales/zh-TW.d.ts +2 -0
- package/es/locales/zh-TW.js +4 -1
- package/lib/components/collapse/index.js +30 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +1 -1
- package/lib/components/pisellQrcode/index.js +3 -2
- package/lib/components/pisellWalletPassCard/index.less +3 -1
- package/lib/components/productCard/components/Action/index.js +1 -1
- package/lib/components/productCard/components/AmountFooter/index.d.ts +1 -1
- package/lib/components/productCard/components/AmountFooter/index.js +33 -9
- package/lib/components/productCard/components/AmountFooter/index.less +11 -0
- package/lib/components/productCard/components/Header/index.js +16 -8
- package/lib/components/productCard/components/MultiDay/index.d.ts +4 -0
- package/lib/components/productCard/components/MultiDay/index.js +77 -0
- package/lib/components/productCard/components/MultiDay/index.less +34 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -1
- package/lib/components/productCard/components/Packages/components/options/index.js +2 -2
- package/lib/components/productCard/components/Packages/index.js +1 -1
- package/lib/components/productCard/components/Sales/index.js +1 -2
- package/lib/components/productCard/components/Time/index.js +14 -11
- package/lib/components/productCard/index.d.ts +1 -1
- package/lib/components/productCard/index.js +32 -20
- package/lib/components/productCard/index.less +3 -2
- package/lib/components/productCard/status.d.ts +24 -1
- package/lib/components/productCard/status.js +35 -2
- package/lib/components/productCard/types.d.ts +60 -1
- package/lib/components/productCard/utils.d.ts +10 -144
- package/lib/components/productCard/utils.js +30 -567
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/locales/en-US.d.ts +2 -0
- package/lib/locales/en-US.js +4 -1
- package/lib/locales/zh-CN.d.ts +2 -0
- package/lib/locales/zh-CN.js +4 -1
- package/lib/locales/zh-TW.d.ts +2 -0
- package/lib/locales/zh-TW.js +4 -1
- package/package.json +3 -3
|
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
167
167
|
sort?: SortType | undefined;
|
|
168
168
|
mode: "" | "localStorage" | "remote";
|
|
169
169
|
currentViewMode: ModeType;
|
|
170
|
-
}) => ("
|
|
170
|
+
}) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
|
|
171
171
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
172
172
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
173
173
|
export {};
|
package/es/locales/en-US.d.ts
CHANGED
package/es/locales/en-US.js
CHANGED
|
@@ -199,5 +199,8 @@ export default {
|
|
|
199
199
|
'walletCard-points': 'Points',
|
|
200
200
|
'walletCard-rechargeable': 'Recharge',
|
|
201
201
|
'walletCard-voucher': 'Voucher',
|
|
202
|
-
'walletCard-discount': 'Discount'
|
|
202
|
+
'walletCard-discount': 'Discount',
|
|
203
|
+
//PisellQrcode组件
|
|
204
|
+
'pisellQrcode-done': 'Done',
|
|
205
|
+
'pisellQrcode-qrcode': 'QR code'
|
|
203
206
|
};
|
package/es/locales/zh-CN.d.ts
CHANGED
package/es/locales/zh-CN.js
CHANGED
|
@@ -198,5 +198,8 @@ export default {
|
|
|
198
198
|
'walletCard-points': '积分卡',
|
|
199
199
|
'walletCard-rechargeable': '充值卡',
|
|
200
200
|
'walletCard-voucher': '代金券',
|
|
201
|
-
'walletCard-discount': '折扣卡'
|
|
201
|
+
'walletCard-discount': '折扣卡',
|
|
202
|
+
//PisellQrcode组件
|
|
203
|
+
'pisellQrcode-done': '完成',
|
|
204
|
+
'pisellQrcode-qrcode': '二维码'
|
|
202
205
|
};
|
package/es/locales/zh-TW.d.ts
CHANGED
package/es/locales/zh-TW.js
CHANGED
|
@@ -199,5 +199,8 @@ export default {
|
|
|
199
199
|
'walletCard-points': '積分卡',
|
|
200
200
|
'walletCard-rechargeable': '充值卡',
|
|
201
201
|
'walletCard-voucher': '代金券',
|
|
202
|
-
'walletCard-discount': '折扣卡'
|
|
202
|
+
'walletCard-discount': '折扣卡',
|
|
203
|
+
//PisellQrcode组件
|
|
204
|
+
'pisellQrcode-done': '完成',
|
|
205
|
+
'pisellQrcode-qrcode': '二維碼'
|
|
203
206
|
};
|
|
@@ -34,7 +34,28 @@ __export(collapse_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(collapse_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
37
38
|
var import_index = require("./index.less");
|
|
39
|
+
var CustomCollapse = (0, import_styled_components.default)(import_antd.Collapse)`
|
|
40
|
+
&.custom-collapse {
|
|
41
|
+
background-color: ${(props) => props.panelBackground || "#ffffff"};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// .ant-collapse-item {
|
|
45
|
+
// background-color: ${(props) => props.panelBackground || "#ffffff"};
|
|
46
|
+
// margin-bottom: ${(props) => props.panelMarginBottom || "0"};
|
|
47
|
+
// border-radius: ${(props) => props.panelBorderRadius || "0"};
|
|
48
|
+
// }
|
|
49
|
+
|
|
50
|
+
// .pisell-lowcode-collapse-header {
|
|
51
|
+
// background-color: ${(props) => props.panelBackground || "#ffffff"};
|
|
52
|
+
// border-radius: ${(props) => props.panelBorderRadius || "0"} !important;
|
|
53
|
+
// }
|
|
54
|
+
|
|
55
|
+
.pisell-lowcode-collapse-content {
|
|
56
|
+
background-color: ${(props) => props.panelBackground || "#ffffff"};
|
|
57
|
+
}
|
|
58
|
+
`;
|
|
38
59
|
var Collapse = (props) => {
|
|
39
60
|
const {
|
|
40
61
|
panelBackground,
|
|
@@ -66,16 +87,21 @@ var Collapse = (props) => {
|
|
|
66
87
|
},
|
|
67
88
|
item == null ? void 0 : item.label
|
|
68
89
|
) : null,
|
|
69
|
-
|
|
90
|
+
children: item.children,
|
|
91
|
+
className: "custom-collapse-panel"
|
|
70
92
|
};
|
|
71
93
|
});
|
|
72
|
-
}, [items, headerColor, showHeader, headerFontSize
|
|
94
|
+
}, [items, headerColor, showHeader, headerFontSize]);
|
|
73
95
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
74
|
-
|
|
96
|
+
CustomCollapse,
|
|
75
97
|
{
|
|
76
98
|
...rest,
|
|
77
99
|
expandIcon: expandIcon ? () => expandIcon : void 0,
|
|
78
|
-
items: itemsMap
|
|
100
|
+
items: itemsMap,
|
|
101
|
+
className: "custom-collapse",
|
|
102
|
+
panelBackground,
|
|
103
|
+
panelMarginBottom,
|
|
104
|
+
panelBorderRadius
|
|
79
105
|
}
|
|
80
106
|
);
|
|
81
107
|
};
|
|
@@ -40,7 +40,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
40
40
|
width: number;
|
|
41
41
|
align: "center" | "left" | "right";
|
|
42
42
|
fixed: false | "left" | "right";
|
|
43
|
-
type: "
|
|
43
|
+
type: "button" | "link";
|
|
44
44
|
items: OperationItem[];
|
|
45
45
|
} | undefined;
|
|
46
46
|
operationContent?: {
|
|
@@ -58,7 +58,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
58
58
|
useCustomAction: boolean;
|
|
59
59
|
actionType: string;
|
|
60
60
|
openMode: "modal" | "drawer";
|
|
61
|
-
openContentSize: "small" | "
|
|
61
|
+
openContentSize: "small" | "middle" | "large";
|
|
62
62
|
openTitle: string;
|
|
63
63
|
key: string;
|
|
64
64
|
} | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const ColorPicker: React.FC<import("
|
|
2
|
+
declare const ColorPicker: React.FC<import("./type").ColorPickerProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
|
|
3
3
|
export default ColorPicker;
|
|
@@ -39,7 +39,7 @@ declare const formFieldMap: {
|
|
|
39
39
|
FormItemDateRangePicker: import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
40
40
|
FormItemUpload: import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
41
41
|
};
|
|
42
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> |
|
|
42
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
43
43
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
44
44
|
} & {
|
|
45
45
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
38
|
var import_pisellModal = __toESM(require("./../pisellModal"));
|
|
39
|
+
var import_locales = require("../../locales/index");
|
|
39
40
|
var import_index = require("./index.less");
|
|
40
41
|
var PisellQrcode = (props) => {
|
|
41
42
|
const { size, platform, value = "" } = props;
|
|
@@ -49,7 +50,7 @@ var PisellQrcode = (props) => {
|
|
|
49
50
|
}
|
|
50
51
|
}, [open]);
|
|
51
52
|
const modalProps = {
|
|
52
|
-
title:
|
|
53
|
+
title: (0, import_locales.getText)("pisellQrcode-qrcode"),
|
|
53
54
|
platform,
|
|
54
55
|
onCancel: () => setOpen(false),
|
|
55
56
|
open,
|
|
@@ -75,7 +76,7 @@ var PisellQrcode = (props) => {
|
|
|
75
76
|
onClick: () => setOpen(false),
|
|
76
77
|
className: (0, import_classnames.default)("pisell-qrcode-modal-button")
|
|
77
78
|
},
|
|
78
|
-
"
|
|
79
|
+
(0, import_locales.getText)("pisellQrcode-done")
|
|
79
80
|
)));
|
|
80
81
|
};
|
|
81
82
|
var pisellQrcode_default = PisellQrcode;
|
|
@@ -9,11 +9,13 @@
|
|
|
9
9
|
background-size: cover;
|
|
10
10
|
height: 190px;
|
|
11
11
|
background-position: center center;
|
|
12
|
-
border-width:
|
|
12
|
+
border-width: 1px;
|
|
13
13
|
border-style: solid;
|
|
14
14
|
border-color: var(--Gray-300, #d0d5dd);
|
|
15
15
|
cursor: pointer;
|
|
16
|
+
box-sizing: border-box;
|
|
16
17
|
&.pisell-card-active {
|
|
18
|
+
border-width: 2px;
|
|
17
19
|
border-color: var(--theme-color, #7f56d9);
|
|
18
20
|
}
|
|
19
21
|
.pisell-card-name-wrap {
|
|
@@ -34,28 +34,52 @@ __export(AmountFooter_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(AmountFooter_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_icons = require("@ant-design/icons");
|
|
37
39
|
var import_utils = require("../Packages/utils");
|
|
38
40
|
var import_Divider = __toESM(require("../Divider"));
|
|
39
41
|
var import_index = require("./index.less");
|
|
40
42
|
var import_utils2 = require("@pisell/utils");
|
|
41
43
|
var prefix = "pisell-lowcode-";
|
|
42
|
-
var Footer = ({ item, hideDivider, type }) => {
|
|
43
|
-
|
|
44
|
+
var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
45
|
+
const { total, origin_total, symbol, tip, num, discount_reason } = item;
|
|
44
46
|
const isDiscount = (0, import_react.useMemo)(() => {
|
|
45
|
-
if (!
|
|
47
|
+
if (!origin_total)
|
|
46
48
|
return false;
|
|
47
|
-
return Number(
|
|
48
|
-
}, [
|
|
49
|
+
return Number(total) != Number(origin_total);
|
|
50
|
+
}, [total, origin_total]);
|
|
49
51
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !hideDivider ? /* @__PURE__ */ import_react.default.createElement(import_Divider.default, { type: type !== "total" ? "inside" : "" }) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
50
52
|
"div",
|
|
51
53
|
{
|
|
52
54
|
className: (0, import_classnames.default)(
|
|
53
55
|
`${prefix}packages-product-footer`,
|
|
54
|
-
hideDivider && `${prefix}packages-product-hide-divider-footer
|
|
56
|
+
hideDivider && `${prefix}packages-product-hide-divider-footer`,
|
|
57
|
+
isOnlyTotal && `${prefix}packages-product-only-total-footer`
|
|
55
58
|
)
|
|
56
59
|
},
|
|
57
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
className: (0, import_classnames.default)(`${prefix}packages-product-footer-price-wrap`)
|
|
64
|
+
},
|
|
65
|
+
!isOnlyTotal ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: (0, import_classnames.default)(`${prefix}packages-product-footer-price`)
|
|
69
|
+
},
|
|
70
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total, symbol)),
|
|
71
|
+
tip ? /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: import_utils2.locales.getText(tip), destroyTooltipOnHide: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
72
|
+
import_icons.QuestionCircleOutlined,
|
|
73
|
+
{
|
|
74
|
+
style: { fontSize: "16px", color: "#1570ef" }
|
|
75
|
+
}
|
|
76
|
+
)) : null
|
|
77
|
+
), /* @__PURE__ */ import_react.default.createElement("span", null, `×${num}`)) : null,
|
|
78
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-total` }, (0, import_utils._formatAmount)(total * num, symbol))
|
|
79
|
+
),
|
|
80
|
+
isDiscount ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}packages-product-footer-discount` }, !isOnlyTotal ? /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(origin_total, symbol)) : null, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(origin_total * num, symbol, 2))) : null
|
|
81
|
+
), isDiscount && discount_reason && type === "total" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Divider.default, null), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-item-discount-reason` }, /* @__PURE__ */ import_react.default.createElement("span", null, `${import_utils2.locales.getText(
|
|
82
|
+
"pisell2.product.card.discount.reason"
|
|
83
|
+
)}: ${discount_reason}`))) : null);
|
|
60
84
|
};
|
|
61
85
|
var AmountFooter_default = Footer;
|
|
@@ -12,6 +12,17 @@
|
|
|
12
12
|
justify-content: space-between;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
&-packages-product-only-total-footer {
|
|
16
|
+
> div {
|
|
17
|
+
justify-content: end !important;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-packages-product-footer-price {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 4px;
|
|
25
|
+
}
|
|
15
26
|
|
|
16
27
|
&-packages-product-footer-discount {
|
|
17
28
|
font-size: 12px;
|
|
@@ -42,14 +42,22 @@ var import_index = require("./index.less");
|
|
|
42
42
|
var prefix = "pisell-lowcode-";
|
|
43
43
|
var Header = (props) => {
|
|
44
44
|
const { isShowDelete, item, showImage, onDelete, disabledEdit } = props;
|
|
45
|
+
const {
|
|
46
|
+
id,
|
|
47
|
+
options,
|
|
48
|
+
bundle,
|
|
49
|
+
product_option_string,
|
|
50
|
+
image,
|
|
51
|
+
name,
|
|
52
|
+
price,
|
|
53
|
+
symbol
|
|
54
|
+
} = item;
|
|
45
55
|
const showPrice = (0, import_react.useMemo)(() => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, [item == null ? void 0 : item.bundle, item == null ? void 0 : item.options]);
|
|
56
|
+
return (bundle == null ? void 0 : bundle.length) > 0 || (options == null ? void 0 : options.length) > 0;
|
|
57
|
+
}, [bundle, options]);
|
|
49
58
|
const headerCenterStyle = (0, import_react.useMemo)(() => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}, [item == null ? void 0 : item.options, item == null ? void 0 : item.product_option_string]);
|
|
59
|
+
return (options == null ? void 0 : options.length) > 0 || product_option_string;
|
|
60
|
+
}, [options, product_option_string]);
|
|
53
61
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
54
62
|
"div",
|
|
55
63
|
{
|
|
@@ -72,11 +80,11 @@ var Header = (props) => {
|
|
|
72
80
|
showImage ? /* @__PURE__ */ import_react.default.createElement(
|
|
73
81
|
"img",
|
|
74
82
|
{
|
|
75
|
-
src: import_utils.image.ali(
|
|
83
|
+
src: import_utils.image.ali(image, 64),
|
|
76
84
|
className: `${prefix}product-header-cover`
|
|
77
85
|
}
|
|
78
86
|
) : null,
|
|
79
|
-
|
|
87
|
+
id ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-right-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-title` }, /* @__PURE__ */ import_react.default.createElement("span", null, name), showPrice ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}product-title-price` }, (0, import_utils.formatAmount)(price, 2, symbol)) : null), product_option_string ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}product-title-variant` }, product_option_string) : null, /* @__PURE__ */ import_react.default.createElement(import_options.default, { options, amountSymbol: symbol })) : null
|
|
80
88
|
);
|
|
81
89
|
};
|
|
82
90
|
var Header_default = Header;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/productCard/components/MultiDay/index.tsx
|
|
30
|
+
var MultiDay_exports = {};
|
|
31
|
+
__export(MultiDay_exports, {
|
|
32
|
+
default: () => MultiDay_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(MultiDay_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_Divider = __toESM(require("../Divider"));
|
|
38
|
+
var import_AmountFooter = __toESM(require("../AmountFooter"));
|
|
39
|
+
var import_utils = require("../../utils");
|
|
40
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
41
|
+
var import_index = require("./index.less");
|
|
42
|
+
var prefix = "pisell-lowcode-";
|
|
43
|
+
var MultiDay = ({ dataSource, hideDivider }) => {
|
|
44
|
+
var _a, _b;
|
|
45
|
+
const { items, symbol, locale } = dataSource;
|
|
46
|
+
let translationOriginal = (text) => "";
|
|
47
|
+
const context = (0, import_useEngineContext.default)();
|
|
48
|
+
translationOriginal = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.translationOriginal;
|
|
49
|
+
const lists = (0, import_react.useMemo)(() => {
|
|
50
|
+
if (!(items == null ? void 0 : items.length))
|
|
51
|
+
return [];
|
|
52
|
+
const _lists = items.map((m) => {
|
|
53
|
+
return {
|
|
54
|
+
...m
|
|
55
|
+
// tip: `${symbol}${price}=${name} (${symbol}${m?.total})+${bundleDetails}`,
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
return _lists;
|
|
59
|
+
}, [items]);
|
|
60
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${prefix}multi-day-wrap`) }, lists == null ? void 0 : lists.map((m, index) => {
|
|
61
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: index }, /* @__PURE__ */ import_react.default.createElement(import_Divider.default, { type: "inside" }), /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${prefix}multi-day`) }, /* @__PURE__ */ import_react.default.createElement("div", null, (0, import_utils.formatMultiDayDate)({ ...m, locale })), /* @__PURE__ */ import_react.default.createElement(
|
|
62
|
+
import_AmountFooter.default,
|
|
63
|
+
{
|
|
64
|
+
item: { ...m, symbol },
|
|
65
|
+
hideDivider: true
|
|
66
|
+
}
|
|
67
|
+
)));
|
|
68
|
+
}), /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${prefix}multi-day-total-wrap`) }, /* @__PURE__ */ import_react.default.createElement(
|
|
69
|
+
import_AmountFooter.default,
|
|
70
|
+
{
|
|
71
|
+
item: { ...dataSource, num: 1 },
|
|
72
|
+
type: "total",
|
|
73
|
+
isOnlyTotal: true
|
|
74
|
+
}
|
|
75
|
+
)));
|
|
76
|
+
};
|
|
77
|
+
var MultiDay_default = MultiDay;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@pisell-prefix: pisell-lowcode;
|
|
2
|
+
|
|
3
|
+
.@{pisell-prefix} {
|
|
4
|
+
&-multi-day-wrap {
|
|
5
|
+
margin-top: 16px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&-multi-day {
|
|
9
|
+
color: var(--Gray-500, #667085);
|
|
10
|
+
font-size: 14px;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
line-height: 20px;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&-multi-day-total {
|
|
18
|
+
color: var(--Gray-900, #101828);
|
|
19
|
+
text-align: right;
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
line-height: 20px;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-multi-day-total-discount {
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
font-weight: 400;
|
|
30
|
+
line-height: 18px;
|
|
31
|
+
text-decoration-line: line-through;
|
|
32
|
+
color: var(--Gray-500, #667085);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -44,7 +44,8 @@ var renderBundles = (item, hidePrice, isShowPackageNote) => {
|
|
|
44
44
|
let translationOriginal = (text) => "";
|
|
45
45
|
const context = (0, import_useEngineContext.default)();
|
|
46
46
|
translationOriginal = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.translationOriginal;
|
|
47
|
-
|
|
47
|
+
const { title, name, id, price, symbol, option } = item;
|
|
48
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: id, className: `${prefix}packages-product-bundle-item` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}packages-product-bundle-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}packages-product-bundle-info-title` }, translationOriginal(title || name)), !hidePrice ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}packages-product-bundle-info-num` }, (0, import_utils._formatAmount)(price, symbol)) : null), /* @__PURE__ */ import_react.default.createElement(import_options.default, { options: option, amountSymbol: symbol }), /* @__PURE__ */ import_react.default.createElement(import_AmountFooter.default, { item }), isShowPackageNote ? /* @__PURE__ */ import_react.default.createElement(import_Note.default, { item, type: "inside" }) : null);
|
|
48
49
|
};
|
|
49
50
|
// Annotate the CommonJS export names for ESM import in node:
|
|
50
51
|
0 && (module.exports = {
|
|
@@ -55,7 +55,7 @@ var Options = ({ options, amountSymbol }) => {
|
|
|
55
55
|
{
|
|
56
56
|
className: `${prefix}packages-product-bundle-option-item-left-amount`
|
|
57
57
|
},
|
|
58
|
-
/* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(option == null ? void 0 : option.
|
|
58
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(option == null ? void 0 : option.price, amountSymbol)),
|
|
59
59
|
/* @__PURE__ */ import_react.default.createElement("span", null, "×"),
|
|
60
60
|
/* @__PURE__ */ import_react.default.createElement("span", null, option == null ? void 0 : option.num)
|
|
61
61
|
)
|
|
@@ -65,7 +65,7 @@ var Options = ({ options, amountSymbol }) => {
|
|
|
65
65
|
{
|
|
66
66
|
className: `${prefix}packages-product-bundle-option-item-amount`
|
|
67
67
|
},
|
|
68
|
-
(0, import_utils._formatAmount)((option == null ? void 0 : option.
|
|
68
|
+
(0, import_utils._formatAmount)((option == null ? void 0 : option.price) * (option == null ? void 0 : option.num), amountSymbol)
|
|
69
69
|
)
|
|
70
70
|
);
|
|
71
71
|
})) : null;
|
|
@@ -46,7 +46,7 @@ var Packages = ({ item, isShowPackageNote }) => {
|
|
|
46
46
|
{
|
|
47
47
|
list: bundle || [],
|
|
48
48
|
renderItem: (items) => (0, import_utils2.renderBundles)(
|
|
49
|
-
{ ...items, symbol: item == null ? void 0 : item.symbol
|
|
49
|
+
{ ...items, symbol: item == null ? void 0 : item.symbol },
|
|
50
50
|
false,
|
|
51
51
|
isShowPackageNote
|
|
52
52
|
)
|
|
@@ -38,8 +38,7 @@ var import_utils = require("../Packages/components/collapsibleList/utils");
|
|
|
38
38
|
var import_index = require("./index.less");
|
|
39
39
|
var prefix = "pisell-lowcode-";
|
|
40
40
|
var Sales = ({ item, isShowNote }) => {
|
|
41
|
-
|
|
42
|
-
let other_products = ((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.relation_details) || [];
|
|
41
|
+
let other_products = (item == null ? void 0 : item.relation_products) || [];
|
|
43
42
|
other_products = other_products.map((p) => {
|
|
44
43
|
return {
|
|
45
44
|
...p,
|
|
@@ -39,26 +39,29 @@ var import_Like = __toESM(require("./components/Like"));
|
|
|
39
39
|
var import_index = require("./index.less");
|
|
40
40
|
var prefix = "pisell-lowcode-";
|
|
41
41
|
var Time = ({ item, isShowHolder, onLike }) => {
|
|
42
|
-
|
|
42
|
+
const {
|
|
43
|
+
start_date,
|
|
44
|
+
end_date,
|
|
45
|
+
holder_title,
|
|
46
|
+
resource_id,
|
|
47
|
+
relation_form_name,
|
|
48
|
+
like_status
|
|
49
|
+
} = item;
|
|
43
50
|
const isShow = (0, import_react.useMemo)(() => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
return isShow ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Divider.default, null), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-time-wrap` }, ((_b = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.date) == null ? void 0 : _b.value) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-date` }, (0, import_utils.getServiceTime)(item, (_c = item._extend) == null ? void 0 : _c.start_date)) : null, isShowHolder && ((_d = item == null ? void 0 : item._extend) == null ? void 0 : _d.holder_title) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-holder-wrap` }, item._extend.holder_title) : null, ((_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.resource) || ((_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.relation_form_name) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-technician` }, ((_g = item == null ? void 0 : item._extend) == null ? void 0 : _g.resource) ? /* @__PURE__ */ import_react.default.createElement(
|
|
51
|
+
return start_date && end_date || isShowHolder && holder_title || resource_id || relation_form_name;
|
|
52
|
+
}, [start_date, isShowHolder, holder_title, resource_id]);
|
|
53
|
+
return isShow ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Divider.default, null), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-time-wrap` }, start_date && end_date ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-date` }, (0, import_utils.getServiceTime)(item, start_date)) : null, isShowHolder && holder_title ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-holder-wrap` }, holder_title) : null, resource_id || relation_form_name ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-technician` }, resource_id ? /* @__PURE__ */ import_react.default.createElement(
|
|
48
54
|
import_Like.default,
|
|
49
55
|
{
|
|
50
56
|
style: { marginRight: 4 },
|
|
51
|
-
status:
|
|
57
|
+
status: like_status,
|
|
52
58
|
onLike: (e) => {
|
|
53
59
|
onLike({
|
|
54
60
|
...item,
|
|
55
|
-
|
|
56
|
-
...item._extend,
|
|
57
|
-
like_status: e
|
|
58
|
-
}
|
|
61
|
+
like_status: e
|
|
59
62
|
});
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
|
-
) : null,
|
|
65
|
+
) : null, relation_form_name) : null)) : null;
|
|
63
66
|
};
|
|
64
67
|
var Time_default = Time;
|