@pisell/materials 2.2.44 → 2.2.46
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -50
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -50
- package/es/components/cardPro/index.js +1 -4
- package/es/components/iconfont/index.js +1 -1
- package/es/components/pisellModal/components/PcModal/index.js +1 -1
- package/es/components/pisellText/components/Amount/index.js +1 -1
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
- package/es/components/productCard/components/Header/DeleteButton/index.js +21 -0
- package/es/components/productCard/components/Header/DeleteButton/index.less +15 -0
- package/es/components/productCard/components/Header/index.js +5 -15
- package/es/components/productCard/components/Header/index.less +0 -11
- package/es/components/productCard/index.js +12 -4
- package/es/components/productCard/index.less +25 -1
- package/lib/components/cardPro/index.js +0 -3
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/pisellModal/components/PcModal/index.js +1 -1
- package/lib/components/pisellText/components/Amount/index.js +2 -2
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.js +53 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.less +15 -0
- package/lib/components/productCard/components/Header/index.js +3 -14
- package/lib/components/productCard/components/Header/index.less +0 -11
- package/lib/components/productCard/index.js +93 -71
- package/lib/components/productCard/index.less +25 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { withWrap } from "../../utils/hoc";
|
|
3
3
|
import { Card, Flex } from 'antd';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -20,9 +20,6 @@ var CardPro = function CardPro(props) {
|
|
|
20
20
|
className = props.className,
|
|
21
21
|
coverHeight = props.coverHeight,
|
|
22
22
|
badge = props.badge;
|
|
23
|
-
useEffect(function () {
|
|
24
|
-
document.body.id = 'body';
|
|
25
|
-
}, []);
|
|
26
23
|
return /*#__PURE__*/React.createElement(Card, {
|
|
27
24
|
title: null,
|
|
28
25
|
style: {
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
var MyIcon = createFromIconfontCN({
|
|
5
|
-
scriptUrl: 'https://static.pisellcdn.com/
|
|
5
|
+
scriptUrl: 'https://static.pisellcdn.com/pisell2/iconfont_1.0.js' // 在 iconfont.cn 上生成
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
var IconFont = function IconFont(props) {
|
|
@@ -10,7 +10,7 @@ import { Button } from 'antd';
|
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import { isBoolean, isUndefined } from '@pisell/utils';
|
|
12
12
|
import XClose from '@pisell/icon/es/XClose';
|
|
13
|
-
import Delete_wght300_24px from '@pisell/icon/
|
|
13
|
+
import Delete_wght300_24px from '@pisell/icon/es/Delete_wght300_24px';
|
|
14
14
|
import Modal from "../../../modal";
|
|
15
15
|
import { sizeMap } from "../../constants";
|
|
16
16
|
import "./index.less";
|
|
@@ -2,7 +2,7 @@ var _excluded = ["value", "precision", "showCurrencySymbol", "useThousandsSepara
|
|
|
2
2
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
3
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
|
-
import { formatAmountWithOptions } from '@pisell/utils
|
|
5
|
+
import { formatAmountWithOptions } from '@pisell/utils';
|
|
6
6
|
import usePisellConfig from "../../../pisell-config-provider/hooks/usePisellConfig";
|
|
7
7
|
var Amount = function Amount(props) {
|
|
8
8
|
var value = props.value,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Button } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Iconfont from "../../../../iconfont";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
var prefix = 'pisell-lowcode-';
|
|
6
|
+
var DeleteButton = function DeleteButton(_ref) {
|
|
7
|
+
var onDelete = _ref.onDelete;
|
|
8
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
9
|
+
className: "".concat(prefix, "product-delete"),
|
|
10
|
+
onClick: function onClick(e) {
|
|
11
|
+
e.stopPropagation();
|
|
12
|
+
onDelete();
|
|
13
|
+
}
|
|
14
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
15
|
+
type: "text",
|
|
16
|
+
icon: /*#__PURE__*/React.createElement(Iconfont, {
|
|
17
|
+
type: "pisell2-trash-01"
|
|
18
|
+
})
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
export default DeleteButton;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Button } from 'antd';
|
|
2
1
|
import React, { useMemo } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
|
-
import Iconfont from "../../../iconfont";
|
|
5
3
|
import { image as imageAli, formatAmount } from '@pisell/utils';
|
|
6
4
|
import Options from "../Packages/components/options";
|
|
5
|
+
import DeleteButton from "./DeleteButton";
|
|
7
6
|
import "./index.less";
|
|
8
7
|
var prefix = 'pisell-lowcode-';
|
|
9
8
|
var Header = function Header(props) {
|
|
@@ -20,7 +19,7 @@ var Header = function Header(props) {
|
|
|
20
19
|
name = item.name,
|
|
21
20
|
price = item.price,
|
|
22
21
|
symbol = item.symbol,
|
|
23
|
-
|
|
22
|
+
disabled = item.disabled;
|
|
24
23
|
|
|
25
24
|
/**
|
|
26
25
|
* @title: 是否显示价格
|
|
@@ -49,18 +48,9 @@ var Header = function Header(props) {
|
|
|
49
48
|
}, [options, product_option_string]);
|
|
50
49
|
return /*#__PURE__*/React.createElement("div", {
|
|
51
50
|
className: classNames("".concat(prefix, "product-header"), headerCenterStyle && "".concat(prefix, "product-options-header"))
|
|
52
|
-
}, isShowDelete && !disabledEdit
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
e.stopPropagation();
|
|
56
|
-
onDelete();
|
|
57
|
-
}
|
|
58
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
59
|
-
type: "text",
|
|
60
|
-
icon: /*#__PURE__*/React.createElement(Iconfont, {
|
|
61
|
-
type: "pisell2-trash-01"
|
|
62
|
-
})
|
|
63
|
-
})) : null, showImage ? /*#__PURE__*/React.createElement("img", {
|
|
51
|
+
}, isShowDelete && !disabledEdit && !disabled ? /*#__PURE__*/React.createElement(DeleteButton, {
|
|
52
|
+
onDelete: onDelete
|
|
53
|
+
}) : null, showImage ? /*#__PURE__*/React.createElement("img", {
|
|
64
54
|
src: imageAli.ali(image, 64),
|
|
65
55
|
className: "".concat(prefix, "product-header-cover")
|
|
66
56
|
}) : null, id ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -12,17 +12,6 @@
|
|
|
12
12
|
align-items: normal;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
&-product-delete {
|
|
16
|
-
position: absolute;
|
|
17
|
-
padding: 0;
|
|
18
|
-
top: 0;
|
|
19
|
-
right: 0;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
.pisell-lowcode-btn {
|
|
22
|
-
padding: 0;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
15
|
&-product-header-cover {
|
|
27
16
|
width: 64px;
|
|
28
17
|
height: 64px;
|
|
@@ -14,6 +14,7 @@ import { Alert } from 'antd';
|
|
|
14
14
|
import { locales } from '@pisell/utils';
|
|
15
15
|
import CardPro from "../cardPro";
|
|
16
16
|
import Header from "./components/Header";
|
|
17
|
+
import DeleteButton from "./components/Header/DeleteButton";
|
|
17
18
|
import Time from "./components/Time";
|
|
18
19
|
import Packages from "./components/Packages";
|
|
19
20
|
import Sales from "./components/Sales";
|
|
@@ -27,7 +28,7 @@ import { defaultValue } from "./status";
|
|
|
27
28
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
28
29
|
import "./index.less";
|
|
29
30
|
var ProductCard = function ProductCard(props) {
|
|
30
|
-
var _utils$storage,
|
|
31
|
+
var _utils$storage, _classNames2, _dataSource$items;
|
|
31
32
|
var context = useEngineContext();
|
|
32
33
|
var utils = context.appHelper.utils || {};
|
|
33
34
|
var _props$dataSource = props.dataSource,
|
|
@@ -84,8 +85,15 @@ var ProductCard = function ProductCard(props) {
|
|
|
84
85
|
var hideDivider = useMemo(function () {
|
|
85
86
|
return (bundle === null || bundle === void 0 ? void 0 : bundle.length) || (relation_products === null || relation_products === void 0 ? void 0 : relation_products.length);
|
|
86
87
|
}, [bundle, relation_products]);
|
|
87
|
-
return /*#__PURE__*/React.createElement(
|
|
88
|
-
className: classNames('pisell-lowcode-product-card', (
|
|
88
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
89
|
+
className: classNames('pisell-lowcode-product-card-wrap', _defineProperty({}, 'pisell-lowcode-product-card-disabled', dataSource === null || dataSource === void 0 ? void 0 : dataSource.disabled))
|
|
90
|
+
}, (dataSource === null || dataSource === void 0 ? void 0 : dataSource.disabled) && /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
className: "delete-btn-wrapper",
|
|
92
|
+
onClick: function onClick() {
|
|
93
|
+
return _onDelete === null || _onDelete === void 0 ? void 0 : _onDelete(dataSource);
|
|
94
|
+
}
|
|
95
|
+
}, /*#__PURE__*/React.createElement(DeleteButton, null)), /*#__PURE__*/React.createElement(CardPro, {
|
|
96
|
+
className: classNames('pisell-lowcode-product-card', (_classNames2 = {}, _defineProperty(_classNames2, 'pisell-lowcode-product-card-image', !showImage), _defineProperty(_classNames2, 'pisell-lowcode-normal-product-card', !showImage && isNormalProduct), _classNames2)),
|
|
89
97
|
key: _id
|
|
90
98
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
91
99
|
onClick: function onClick(e) {
|
|
@@ -144,6 +152,6 @@ var ProductCard = function ProductCard(props) {
|
|
|
144
152
|
note: e || ''
|
|
145
153
|
}));
|
|
146
154
|
}
|
|
147
|
-
})));
|
|
155
|
+
}))));
|
|
148
156
|
};
|
|
149
157
|
export default ProductCard;
|
|
@@ -47,8 +47,32 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
.pisell-lowcode-product-card-wrap {
|
|
51
|
+
position: relative;
|
|
52
|
+
}
|
|
53
|
+
|
|
50
54
|
.pisell-lowcode-product-card-disabled {
|
|
51
|
-
opacity:
|
|
55
|
+
opacity: 1;
|
|
56
|
+
|
|
57
|
+
.pisell-lowcode-product-card {
|
|
58
|
+
opacity: 0.4;
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.delete-btn-wrapper {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
pointer-events: auto;
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 0;
|
|
67
|
+
right: 0;
|
|
68
|
+
z-index: 10;
|
|
69
|
+
|
|
70
|
+
.anticon {
|
|
71
|
+
color: red;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
opacity: 1;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
52
76
|
}
|
|
53
77
|
|
|
54
78
|
.pisell-lowcode-product-card-error {
|
|
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(iconfont_exports);
|
|
|
35
35
|
var import_icons = require("@ant-design/icons");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var MyIcon = (0, import_icons.createFromIconfontCN)({
|
|
38
|
-
scriptUrl: "https://static.pisellcdn.com/
|
|
38
|
+
scriptUrl: "https://static.pisellcdn.com/pisell2/iconfont_1.0.js"
|
|
39
39
|
// 在 iconfont.cn 上生成
|
|
40
40
|
});
|
|
41
41
|
var IconFont = (props) => {
|
|
@@ -37,7 +37,7 @@ var import_antd = require("antd");
|
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
39
|
var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
40
|
-
var import_Delete_wght300_24px = __toESM(require("@pisell/icon/
|
|
40
|
+
var import_Delete_wght300_24px = __toESM(require("@pisell/icon/es/Delete_wght300_24px"));
|
|
41
41
|
var import_modal = __toESM(require("../../../modal"));
|
|
42
42
|
var import_constants = require("../../constants");
|
|
43
43
|
var import_index = require("./index.less");
|
|
@@ -33,7 +33,7 @@ __export(Amount_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Amount_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
37
|
var import_usePisellConfig = __toESM(require("../../../pisell-config-provider/hooks/usePisellConfig"));
|
|
38
38
|
var Amount = (props) => {
|
|
39
39
|
const {
|
|
@@ -46,7 +46,7 @@ var Amount = (props) => {
|
|
|
46
46
|
} = props;
|
|
47
47
|
const config = (0, import_usePisellConfig.default)();
|
|
48
48
|
const amount = (0, import_react.useMemo)(() => {
|
|
49
|
-
return (0,
|
|
49
|
+
return (0, import_utils.formatAmountWithOptions)(value, (config == null ? void 0 : config.symbol) || "", {
|
|
50
50
|
precision,
|
|
51
51
|
showCurrencySymbol,
|
|
52
52
|
useThousandsSeparator,
|
|
@@ -0,0 +1,53 @@
|
|
|
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/Header/DeleteButton/index.tsx
|
|
30
|
+
var DeleteButton_exports = {};
|
|
31
|
+
__export(DeleteButton_exports, {
|
|
32
|
+
default: () => DeleteButton_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DeleteButton_exports);
|
|
35
|
+
var import_antd = require("antd");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_iconfont = __toESM(require("../../../../iconfont"));
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var prefix = "pisell-lowcode-";
|
|
40
|
+
var DeleteButton = ({ onDelete }) => {
|
|
41
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: `${prefix}product-delete`,
|
|
45
|
+
onClick: (e) => {
|
|
46
|
+
e.stopPropagation();
|
|
47
|
+
onDelete();
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-trash-01" }) })
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
var DeleteButton_default = DeleteButton;
|
|
@@ -32,12 +32,11 @@ __export(Header_exports, {
|
|
|
32
32
|
default: () => Header_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Header_exports);
|
|
35
|
-
var import_antd = require("antd");
|
|
36
35
|
var import_react = __toESM(require("react"));
|
|
37
36
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
-
var import_iconfont = __toESM(require("../../../iconfont"));
|
|
39
37
|
var import_utils = require("@pisell/utils");
|
|
40
38
|
var import_options = __toESM(require("../Packages/components/options"));
|
|
39
|
+
var import_DeleteButton = __toESM(require("./DeleteButton"));
|
|
41
40
|
var import_index = require("./index.less");
|
|
42
41
|
var prefix = "pisell-lowcode-";
|
|
43
42
|
var Header = (props) => {
|
|
@@ -51,7 +50,7 @@ var Header = (props) => {
|
|
|
51
50
|
name,
|
|
52
51
|
price,
|
|
53
52
|
symbol,
|
|
54
|
-
|
|
53
|
+
disabled
|
|
55
54
|
} = item;
|
|
56
55
|
const showPrice = (0, import_react.useMemo)(() => {
|
|
57
56
|
return (bundle == null ? void 0 : bundle.length) > 0 || (options == null ? void 0 : options.length) > 0;
|
|
@@ -67,17 +66,7 @@ var Header = (props) => {
|
|
|
67
66
|
headerCenterStyle && `${prefix}product-options-header`
|
|
68
67
|
)
|
|
69
68
|
},
|
|
70
|
-
isShowDelete && !disabledEdit
|
|
71
|
-
"div",
|
|
72
|
-
{
|
|
73
|
-
className: `${prefix}product-delete`,
|
|
74
|
-
onClick: (e) => {
|
|
75
|
-
e.stopPropagation();
|
|
76
|
-
onDelete();
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-trash-01" }) })
|
|
80
|
-
) : null,
|
|
69
|
+
isShowDelete && !disabledEdit && !disabled ? /* @__PURE__ */ import_react.default.createElement(import_DeleteButton.default, { onDelete }) : null,
|
|
81
70
|
showImage ? /* @__PURE__ */ import_react.default.createElement(
|
|
82
71
|
"img",
|
|
83
72
|
{
|
|
@@ -12,17 +12,6 @@
|
|
|
12
12
|
align-items: normal;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
&-product-delete {
|
|
16
|
-
position: absolute;
|
|
17
|
-
padding: 0;
|
|
18
|
-
top: 0;
|
|
19
|
-
right: 0;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
.pisell-lowcode-btn {
|
|
22
|
-
padding: 0;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
15
|
&-product-header-cover {
|
|
27
16
|
width: 64px;
|
|
28
17
|
height: 64px;
|
|
@@ -38,6 +38,7 @@ var import_antd = require("antd");
|
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
39
|
var import_cardPro = __toESM(require("../cardPro"));
|
|
40
40
|
var import_Header = __toESM(require("./components/Header"));
|
|
41
|
+
var import_DeleteButton = __toESM(require("./components/Header/DeleteButton"));
|
|
41
42
|
var import_Time = __toESM(require("./components/Time"));
|
|
42
43
|
var import_Packages = __toESM(require("./components/Packages"));
|
|
43
44
|
var import_Sales = __toESM(require("./components/Sales"));
|
|
@@ -89,89 +90,110 @@ var ProductCard = (props) => {
|
|
|
89
90
|
return (bundle == null ? void 0 : bundle.length) || (relation_products == null ? void 0 : relation_products.length);
|
|
90
91
|
}, [bundle, relation_products]);
|
|
91
92
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
92
|
-
|
|
93
|
+
"div",
|
|
93
94
|
{
|
|
94
|
-
className: (0, import_classnames.default)("pisell-lowcode-product-card", {
|
|
95
|
-
["pisell-lowcode-product-card-image"]: !showImage,
|
|
96
|
-
["pisell-lowcode-normal-product-card"]: !showImage && isNormalProduct,
|
|
95
|
+
className: (0, import_classnames.default)("pisell-lowcode-product-card-wrap", {
|
|
97
96
|
["pisell-lowcode-product-card-disabled"]: dataSource == null ? void 0 : dataSource.disabled
|
|
98
|
-
})
|
|
99
|
-
key: _id
|
|
97
|
+
})
|
|
100
98
|
},
|
|
101
|
-
|
|
99
|
+
(dataSource == null ? void 0 : dataSource.disabled) && /* @__PURE__ */ import_react.default.createElement(
|
|
102
100
|
"div",
|
|
103
101
|
{
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
className: "delete-btn-wrapper",
|
|
103
|
+
onClick: () => onDelete == null ? void 0 : onDelete(dataSource)
|
|
104
|
+
},
|
|
105
|
+
/* @__PURE__ */ import_react.default.createElement(import_DeleteButton.default, null)
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
108
|
+
import_cardPro.default,
|
|
109
|
+
{
|
|
110
|
+
className: (0, import_classnames.default)("pisell-lowcode-product-card", {
|
|
111
|
+
["pisell-lowcode-product-card-image"]: !showImage,
|
|
112
|
+
["pisell-lowcode-normal-product-card"]: !showImage && isNormalProduct
|
|
113
|
+
}),
|
|
114
|
+
key: _id
|
|
109
115
|
},
|
|
110
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
111
|
-
|
|
116
|
+
/* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
117
|
+
"div",
|
|
112
118
|
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
showImage,
|
|
118
|
-
onDelete: () => {
|
|
119
|
-
onDelete == null ? void 0 : onDelete(dataSource);
|
|
119
|
+
onClick: (e) => {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
e.stopPropagation();
|
|
122
|
+
onCard == null ? void 0 : onCard(dataSource);
|
|
120
123
|
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
124
|
+
},
|
|
125
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
126
|
+
import_Header.default,
|
|
127
|
+
{
|
|
128
|
+
...other,
|
|
129
|
+
item: dataSource,
|
|
130
|
+
isShowImage,
|
|
131
|
+
isShowDelete,
|
|
132
|
+
showImage,
|
|
133
|
+
onDelete: () => {
|
|
134
|
+
onDelete == null ? void 0 : onDelete(dataSource);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
139
|
+
import_Time.default,
|
|
140
|
+
{
|
|
141
|
+
item: dataSource,
|
|
142
|
+
isShowHolder,
|
|
143
|
+
onLike: (item) => onLike == null ? void 0 : onLike(item)
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ import_react.default.createElement(import_Packages.default, { item: dataSource, isShowPackageNote }),
|
|
147
|
+
/* @__PURE__ */ import_react.default.createElement(import_Sales.default, { item: dataSource, isShowNote }),
|
|
148
|
+
((_b = dataSource.items) == null ? void 0 : _b.length) ? /* @__PURE__ */ import_react.default.createElement(import_MultiDay.default, { dataSource, hideDivider }) : /* @__PURE__ */ import_react.default.createElement(
|
|
149
|
+
import_AmountFooter.default,
|
|
150
|
+
{
|
|
151
|
+
item: dataSource,
|
|
152
|
+
hideDivider,
|
|
153
|
+
type: "total"
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
isShowNote ? /* @__PURE__ */ import_react.default.createElement(
|
|
157
|
+
import_Note.default,
|
|
158
|
+
{
|
|
159
|
+
...other,
|
|
160
|
+
item: dataSource,
|
|
161
|
+
openNote: () => {
|
|
162
|
+
useOpenNoteRef.current.open({
|
|
163
|
+
item: dataSource
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
) : null,
|
|
168
|
+
isShowAction && actionText ? /* @__PURE__ */ import_react.default.createElement(
|
|
169
|
+
import_Action.default,
|
|
170
|
+
{
|
|
171
|
+
item: dataSource,
|
|
172
|
+
onAction: () => onAction == null ? void 0 : onAction(dataSource)
|
|
173
|
+
}
|
|
174
|
+
) : null,
|
|
175
|
+
errorMessage ? /* @__PURE__ */ import_react.default.createElement(
|
|
176
|
+
import_antd.Alert,
|
|
177
|
+
{
|
|
178
|
+
message: errorMessage,
|
|
179
|
+
type: "warning",
|
|
180
|
+
showIcon: true,
|
|
181
|
+
className: "pisell-lowcode-product-card-error"
|
|
182
|
+
}
|
|
183
|
+
) : null
|
|
184
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
185
|
+
import_useOpenNote.default,
|
|
143
186
|
{
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
187
|
+
ref: useOpenNoteRef,
|
|
188
|
+
onNoteChange: (e) => {
|
|
189
|
+
onNote == null ? void 0 : onNote({
|
|
190
|
+
...dataSource,
|
|
191
|
+
note: e || ""
|
|
149
192
|
});
|
|
150
193
|
}
|
|
151
194
|
}
|
|
152
|
-
)
|
|
153
|
-
|
|
154
|
-
errorMessage ? /* @__PURE__ */ import_react.default.createElement(
|
|
155
|
-
import_antd.Alert,
|
|
156
|
-
{
|
|
157
|
-
message: errorMessage,
|
|
158
|
-
type: "warning",
|
|
159
|
-
showIcon: true,
|
|
160
|
-
className: "pisell-lowcode-product-card-error"
|
|
161
|
-
}
|
|
162
|
-
) : null
|
|
163
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
164
|
-
import_useOpenNote.default,
|
|
165
|
-
{
|
|
166
|
-
ref: useOpenNoteRef,
|
|
167
|
-
onNoteChange: (e) => {
|
|
168
|
-
onNote == null ? void 0 : onNote({
|
|
169
|
-
...dataSource,
|
|
170
|
-
note: e || ""
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
))
|
|
195
|
+
))
|
|
196
|
+
)
|
|
175
197
|
);
|
|
176
198
|
};
|
|
177
199
|
var productCard_default = ProductCard;
|
|
@@ -47,8 +47,32 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
.pisell-lowcode-product-card-wrap {
|
|
51
|
+
position: relative;
|
|
52
|
+
}
|
|
53
|
+
|
|
50
54
|
.pisell-lowcode-product-card-disabled {
|
|
51
|
-
opacity:
|
|
55
|
+
opacity: 1;
|
|
56
|
+
|
|
57
|
+
.pisell-lowcode-product-card {
|
|
58
|
+
opacity: 0.4;
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.delete-btn-wrapper {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
pointer-events: auto;
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 0;
|
|
67
|
+
right: 0;
|
|
68
|
+
z-index: 10;
|
|
69
|
+
|
|
70
|
+
.anticon {
|
|
71
|
+
color: red;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
opacity: 1;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
52
76
|
}
|
|
53
77
|
|
|
54
78
|
.pisell-lowcode-product-card-error {
|