@pisell/materials 2.2.80 → 2.2.82
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 +2 -2
- package/build/lowcode/preview.js +145 -145
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +41 -31
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +37 -27
- package/es/components/batch-editor/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +7 -6
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/iconfont/index.js +1 -1
- package/es/components/page/index.d.ts +1 -0
- package/es/components/pisellInput/index.d.ts +1 -0
- package/es/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/pisellToast/index.js +3 -0
- package/es/components/pisellWalletPassCard/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +61 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.js +32 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.less +32 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.js +52 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.js +40 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.js +44 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +11 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.js +55 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.js +43 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +7 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +53 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +8 -0
- package/es/components/productCard/cartSkuCard/index.js +195 -0
- package/es/components/productCard/cartSkuCard/index.less +69 -0
- package/es/components/productCard/cartSkuCard/locales.d.ts +93 -0
- package/es/components/productCard/cartSkuCard/locales.js +27 -0
- package/es/components/productCard/components/AmountFooter/index.js +22 -6
- package/es/components/productCard/components/AmountFooter/index.less +28 -1
- package/es/components/productCard/components/Packages/utils.d.ts +2 -2
- package/es/components/productCard/components/Warning/index.d.ts +7 -0
- package/es/components/productCard/components/Warning/index.js +48 -0
- package/es/components/productCard/index.d.ts +3 -1
- package/es/components/productCard/index.js +10 -8
- package/es/components/productCard/locales.d.ts +3 -0
- package/es/components/productCard/locales.js +6 -3
- package/es/components/productCard/status.js +3 -1
- package/es/components/productCard/types.d.ts +1 -0
- package/es/components/productCard/utils.js +8 -6
- package/es/components/select-time/index.d.ts +1 -0
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/Group/index.d.ts +1 -0
- package/es/components/table/Actions/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/versionSelect/index.d.ts +1 -0
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/batch-editor/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +7 -6
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/pisellInput/index.d.ts +1 -0
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/pisellToast/index.js +3 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +71 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.js +52 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.less +32 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +73 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.js +44 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.js +73 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +11 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +76 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +65 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +7 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +67 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +8 -0
- package/lib/components/productCard/cartSkuCard/index.js +216 -0
- package/lib/components/productCard/cartSkuCard/index.less +69 -0
- package/lib/components/productCard/cartSkuCard/locales.d.ts +93 -0
- package/lib/components/productCard/cartSkuCard/locales.js +58 -0
- package/lib/components/productCard/components/AmountFooter/index.js +16 -6
- package/lib/components/productCard/components/AmountFooter/index.less +28 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +2 -2
- package/lib/components/productCard/components/Warning/index.d.ts +7 -0
- package/lib/components/productCard/components/Warning/index.js +68 -0
- package/lib/components/productCard/index.d.ts +3 -1
- package/lib/components/productCard/index.js +6 -11
- package/lib/components/productCard/locales.d.ts +3 -0
- package/lib/components/productCard/locales.js +6 -3
- package/lib/components/productCard/status.js +3 -1
- package/lib/components/productCard/types.d.ts +1 -0
- package/lib/components/productCard/utils.js +7 -6
- package/lib/components/select-time/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/index.d.ts +1 -0
- package/lib/components/table/Actions/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/versionSelect/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +8 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/_setters/antd-icon-setter/index.tsx +3 -2
- package/package.json +1 -1
- package/es/components/appVersionControl/index.d.ts +0 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/es/components/drag-sort-tree/index.d.ts +0 -4
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/media/index.d.ts +0 -4
- package/es/components/media/index.js +0 -340
- package/es/components/media/index.less +0 -100
- package/es/components/pisell-config-provider/index.d.ts +0 -12
- package/es/components/pisellAdjustPrice/index.d.ts +0 -9
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/pisellInformationEntry/hooks/useTerminalPeripherals.d.ts +0 -8
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/es/components/productCard/components/Time/index.d.ts +0 -3
- package/es/components/table/Table/index.d.ts +0 -4
- package/es/components/table/hooks/useTableSetting.d.ts +0 -22
- package/es/components/table/types.d.ts +0 -251
- package/es/components/versionModal/index.d.ts +0 -23
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -22
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/walletCard/index.d.ts +0 -67
- package/es/locales/en-US.d.ts +0 -278
- package/es/locales/zh-CN.d.ts +0 -273
- package/es/locales/zh-TW.d.ts +0 -273
- package/lib/components/appVersionControl/index.d.ts +0 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/lib/components/drag-sort-tree/index.d.ts +0 -4
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/media/index.d.ts +0 -4
- package/lib/components/media/index.js +0 -265
- package/lib/components/media/index.less +0 -100
- package/lib/components/pisell-config-provider/index.d.ts +0 -12
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -9
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/pisellInformationEntry/hooks/useTerminalPeripherals.d.ts +0 -8
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/lib/components/productCard/components/Time/index.d.ts +0 -3
- package/lib/components/table/Table/index.d.ts +0 -4
- package/lib/components/table/hooks/useTableSetting.d.ts +0 -22
- package/lib/components/table/types.d.ts +0 -251
- package/lib/components/versionModal/index.d.ts +0 -23
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -22
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/walletCard/index.d.ts +0 -67
- package/lib/locales/en-US.d.ts +0 -278
- package/lib/locales/zh-CN.d.ts +0 -273
- package/lib/locales/zh-TW.d.ts +0 -273
|
@@ -0,0 +1,216 @@
|
|
|
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/cartSkuCard/index.tsx
|
|
30
|
+
var cartSkuCard_exports = {};
|
|
31
|
+
__export(cartSkuCard_exports, {
|
|
32
|
+
PREFIX: () => PREFIX,
|
|
33
|
+
default: () => cartSkuCard_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(cartSkuCard_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_antd_mobile = require("antd-mobile");
|
|
39
|
+
var import_utils = require("@pisell/utils");
|
|
40
|
+
var import_locales = __toESM(require("./locales"));
|
|
41
|
+
var import_basicInfo = __toESM(require("./components/basicInfo"));
|
|
42
|
+
var import_discountReason = __toESM(require("./components/discountReason"));
|
|
43
|
+
var import_holders = __toESM(require("./components/holders"));
|
|
44
|
+
var import_timeRange = __toESM(require("./components/timeRange"));
|
|
45
|
+
var import_resources = __toESM(require("./components/resources"));
|
|
46
|
+
var import_packages = __toESM(require("./components/packages"));
|
|
47
|
+
var import_sales = __toESM(require("./components/sales"));
|
|
48
|
+
var import_index = require("./index.less");
|
|
49
|
+
var import_iconfont = __toESM(require("../../iconfont"));
|
|
50
|
+
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
51
|
+
var import_MultiDay = __toESM(require("../components/MultiDay"));
|
|
52
|
+
var import_AmountFooter = __toESM(require("../components/AmountFooter"));
|
|
53
|
+
var import_useOpenNote = __toESM(require("../hooks/useOpenNote"));
|
|
54
|
+
var import_Note = __toESM(require("../components/Note"));
|
|
55
|
+
var import_Action = __toESM(require("../components/Action"));
|
|
56
|
+
var import_status = require("../status");
|
|
57
|
+
var PREFIX = "pisell-cart-sku-card";
|
|
58
|
+
var CartSkuCard = (props) => {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
const {
|
|
61
|
+
dataSource = import_status.defaultValue.dataSource,
|
|
62
|
+
isShowImage = import_status.defaultValue.isShowImage,
|
|
63
|
+
isShowHolder = import_status.defaultValue.isShowHolder,
|
|
64
|
+
isShowNote = import_status.defaultValue.isShowNote,
|
|
65
|
+
isShowDelete = import_status.defaultValue.isShowDelete,
|
|
66
|
+
isShowPackageNote = import_status.defaultValue.isShowPackageNote,
|
|
67
|
+
isShowEditProduct = import_status.defaultValue.isShowEditProduct,
|
|
68
|
+
onEditProduct,
|
|
69
|
+
onAction,
|
|
70
|
+
onDelete,
|
|
71
|
+
onNote,
|
|
72
|
+
onLike,
|
|
73
|
+
onCard,
|
|
74
|
+
onChangeResource,
|
|
75
|
+
onChangeHolder,
|
|
76
|
+
type,
|
|
77
|
+
...other
|
|
78
|
+
} = props;
|
|
79
|
+
const useOpenNoteRef = (0, import_react.useRef)();
|
|
80
|
+
const context = (0, import_useEngineContext.default)();
|
|
81
|
+
import_utils.locales.init(
|
|
82
|
+
import_locales.default,
|
|
83
|
+
((_b = (_a = context.appHelper.utils) == null ? void 0 : _a.storage) == null ? void 0 : _b.get("umi_locale")) || "en"
|
|
84
|
+
);
|
|
85
|
+
console.log("prodcut props", props);
|
|
86
|
+
const { isShowAction, actionText } = dataSource;
|
|
87
|
+
const rightActions = (0, import_react.useMemo)(() => {
|
|
88
|
+
const deleteAction = {
|
|
89
|
+
key: "delete",
|
|
90
|
+
text: /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
91
|
+
import_iconfont.default,
|
|
92
|
+
{
|
|
93
|
+
type: "pisell2-trash-01",
|
|
94
|
+
style: { fontSize: 20, marginRight: 4 }
|
|
95
|
+
}
|
|
96
|
+
), /* @__PURE__ */ import_react.default.createElement("span", { style: { fontSize: 12 } }, "删除")),
|
|
97
|
+
color: "danger",
|
|
98
|
+
onClick: (e) => {
|
|
99
|
+
e.preventDefault();
|
|
100
|
+
e.stopPropagation();
|
|
101
|
+
onDelete == null ? void 0 : onDelete(dataSource);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const actions = [];
|
|
105
|
+
if (isShowDelete) {
|
|
106
|
+
actions.push(deleteAction);
|
|
107
|
+
}
|
|
108
|
+
return actions;
|
|
109
|
+
}, [dataSource, onDelete, isShowDelete]);
|
|
110
|
+
const hideDivider = (0, import_react.useMemo)(() => {
|
|
111
|
+
const { bundle, relation_products } = dataSource;
|
|
112
|
+
return (bundle == null ? void 0 : bundle.length) || (relation_products == null ? void 0 : relation_products.length);
|
|
113
|
+
}, [dataSource]);
|
|
114
|
+
const renderA2 = () => {
|
|
115
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
116
|
+
import_basicInfo.default,
|
|
117
|
+
{
|
|
118
|
+
isShowImage,
|
|
119
|
+
dataSource,
|
|
120
|
+
isMainProduct: true
|
|
121
|
+
}
|
|
122
|
+
), /* @__PURE__ */ import_react.default.createElement(import_discountReason.default, { dataSource }), isShowNote ? /* @__PURE__ */ import_react.default.createElement(
|
|
123
|
+
import_Note.default,
|
|
124
|
+
{
|
|
125
|
+
...other,
|
|
126
|
+
item: dataSource,
|
|
127
|
+
openNote: () => {
|
|
128
|
+
useOpenNoteRef.current.open({
|
|
129
|
+
item: dataSource
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
) : null);
|
|
134
|
+
};
|
|
135
|
+
const renderA5 = () => {
|
|
136
|
+
var _a2, _b2;
|
|
137
|
+
const { image, name } = dataSource;
|
|
138
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, isShowDelete ? /* @__PURE__ */ import_react.default.createElement(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
className: `${PREFIX}__delete-btn`,
|
|
142
|
+
onClick: (e) => {
|
|
143
|
+
e.preventDefault();
|
|
144
|
+
e.stopPropagation();
|
|
145
|
+
onDelete == null ? void 0 : onDelete(dataSource);
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
/* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-trash-01" })
|
|
149
|
+
) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__content` }, isShowImage && image && /* @__PURE__ */ import_react.default.createElement("img", { src: import_utils.image.ali(image, 64), className: `product-cover` }), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), /* @__PURE__ */ import_react.default.createElement(import_holders.default, { dataSource }))), /* @__PURE__ */ import_react.default.createElement(import_timeRange.default, { dataSource }), /* @__PURE__ */ import_react.default.createElement(import_resources.default, { dataSource }), /* @__PURE__ */ import_react.default.createElement(import_packages.default, { dataSource, isShowImage }), /* @__PURE__ */ import_react.default.createElement(
|
|
150
|
+
import_sales.default,
|
|
151
|
+
{
|
|
152
|
+
dataSource,
|
|
153
|
+
hideDivider: !!((_a2 = dataSource == null ? void 0 : dataSource.bundle) == null ? void 0 : _a2.length)
|
|
154
|
+
}
|
|
155
|
+
), ((_b2 = dataSource.items) == null ? void 0 : _b2.length) ? /* @__PURE__ */ import_react.default.createElement(import_MultiDay.default, { dataSource, hideDivider }) : /* @__PURE__ */ import_react.default.createElement(
|
|
156
|
+
import_AmountFooter.default,
|
|
157
|
+
{
|
|
158
|
+
item: dataSource,
|
|
159
|
+
hideDivider,
|
|
160
|
+
type: "total"
|
|
161
|
+
}
|
|
162
|
+
), /* @__PURE__ */ import_react.default.createElement(import_discountReason.default, { dataSource }), isShowNote ? /* @__PURE__ */ import_react.default.createElement(
|
|
163
|
+
import_Note.default,
|
|
164
|
+
{
|
|
165
|
+
...other,
|
|
166
|
+
item: dataSource,
|
|
167
|
+
openNote: () => {
|
|
168
|
+
useOpenNoteRef.current.open({
|
|
169
|
+
item: dataSource
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
) : null, isShowAction && actionText ? /* @__PURE__ */ import_react.default.createElement(import_Action.default, { item: dataSource, onAction: () => onAction == null ? void 0 : onAction(dataSource) }) : null);
|
|
174
|
+
};
|
|
175
|
+
const renderContent = () => {
|
|
176
|
+
if (type === "a5") {
|
|
177
|
+
return renderA5();
|
|
178
|
+
}
|
|
179
|
+
return renderA2();
|
|
180
|
+
};
|
|
181
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
182
|
+
import_antd_mobile.SwipeAction,
|
|
183
|
+
{
|
|
184
|
+
className: (0, import_classnames.default)(`${PREFIX}-wrapper`),
|
|
185
|
+
rightActions
|
|
186
|
+
},
|
|
187
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
188
|
+
"div",
|
|
189
|
+
{
|
|
190
|
+
className: (0, import_classnames.default)(PREFIX, `${PREFIX}--${type}`),
|
|
191
|
+
onClick: (e) => {
|
|
192
|
+
e.preventDefault();
|
|
193
|
+
e.stopPropagation();
|
|
194
|
+
onCard == null ? void 0 : onCard(dataSource);
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
renderContent()
|
|
198
|
+
)
|
|
199
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
200
|
+
import_useOpenNote.default,
|
|
201
|
+
{
|
|
202
|
+
ref: useOpenNoteRef,
|
|
203
|
+
onNoteChange: (e) => {
|
|
204
|
+
onNote == null ? void 0 : onNote({
|
|
205
|
+
...dataSource,
|
|
206
|
+
note: e || ""
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
));
|
|
211
|
+
};
|
|
212
|
+
var cartSkuCard_default = CartSkuCard;
|
|
213
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
214
|
+
0 && (module.exports = {
|
|
215
|
+
PREFIX
|
|
216
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.pisell-cart-sku-card-wrapper {
|
|
2
|
+
border-radius: 4px;
|
|
3
|
+
background: var(--Base-White, #fff);
|
|
4
|
+
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.pisell-cart-sku-card {
|
|
8
|
+
padding: 4px 8px 4px 4px;
|
|
9
|
+
border-radius: inherit;
|
|
10
|
+
user-select: none;
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
&__delete-btn {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
position: absolute;
|
|
16
|
+
padding: 10px;
|
|
17
|
+
top: 0;
|
|
18
|
+
right: 0;
|
|
19
|
+
|
|
20
|
+
> span {
|
|
21
|
+
color: #667085;
|
|
22
|
+
font-size: 20px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__content {
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: 4px;
|
|
29
|
+
|
|
30
|
+
img {
|
|
31
|
+
width: 48px;
|
|
32
|
+
height: 48px;
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
border-radius: 6px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.product-info {
|
|
38
|
+
flex: 1;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 4px;
|
|
42
|
+
flex: 1 0 0;
|
|
43
|
+
flex-wrap: wrap;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
min-height: 30px;
|
|
46
|
+
|
|
47
|
+
.product-name {
|
|
48
|
+
color: var(--Gray-900, #101828);
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
font-style: normal;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
line-height: 20px;
|
|
53
|
+
width: 100%;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.product-price {
|
|
60
|
+
color: var(--Gray-900, #101828);
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
font-style: normal;
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
line-height: 20px;
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.product.card.discount.reason': string;
|
|
4
|
+
'pisell2.cart.sku-card.more': string;
|
|
5
|
+
'pisell2.cart.sku-card.packages.title': string;
|
|
6
|
+
'pisell2.cart.sku-card.sales.title': string;
|
|
7
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
8
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
9
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
10
|
+
'pisell2.product.card.discount.note': string;
|
|
11
|
+
'pisell2.product.card.edit': string;
|
|
12
|
+
'pisell2.product.card.discount.add.note': string;
|
|
13
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
14
|
+
'pisell2.product.card.confirm': string;
|
|
15
|
+
'pisell2.product.card.cancel': string;
|
|
16
|
+
'pisell2.product.card.note.pla': string;
|
|
17
|
+
'pisell2.product.card.items.package': string;
|
|
18
|
+
'pisell2.product.card.view-all': string;
|
|
19
|
+
'pisell2.product.card.view-less': string;
|
|
20
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
21
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
22
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
23
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
24
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
25
|
+
'pisell2.product.card.sales': string;
|
|
26
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
27
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
28
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
29
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
30
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
31
|
+
};
|
|
32
|
+
'zh-CN': {
|
|
33
|
+
'pisell2.product.card.discount.reason': string;
|
|
34
|
+
'pisell2.cart.sku-card.more': string;
|
|
35
|
+
'pisell2.cart.sku-card.packages.title': string;
|
|
36
|
+
'pisell2.cart.sku-card.sales.title': string;
|
|
37
|
+
'pisell2.product.card.edit': string;
|
|
38
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
39
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
40
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
41
|
+
'pisell2.product.card.discount.note': string;
|
|
42
|
+
'pisell2.product.card.discount.add.note': string;
|
|
43
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
44
|
+
'pisell2.product.card.confirm': string;
|
|
45
|
+
'pisell2.product.card.cancel': string;
|
|
46
|
+
'pisell2.product.card.note.pla': string;
|
|
47
|
+
'pisell2.product.card.items.package': string;
|
|
48
|
+
'pisell2.product.card.view-all': string;
|
|
49
|
+
'pisell2.product.card.view-less': string;
|
|
50
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
51
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
52
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
53
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
54
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
55
|
+
'pisell2.product.card.sales': string;
|
|
56
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
57
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
58
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
59
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
60
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
61
|
+
};
|
|
62
|
+
'zh-HK': {
|
|
63
|
+
'pisell2.product.card.discount.reason': string;
|
|
64
|
+
'pisell2.cart.sku-card.more': string;
|
|
65
|
+
'pisell2.cart.sku-card.packages.title': string;
|
|
66
|
+
'pisell2.cart.sku-card.sales.title': string;
|
|
67
|
+
'pisell2.product.card.edit': string;
|
|
68
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
69
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
70
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
71
|
+
'pisell2.product.card.discount.note': string;
|
|
72
|
+
'pisell2.product.card.discount.add.note': string;
|
|
73
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
74
|
+
'pisell2.product.card.confirm': string;
|
|
75
|
+
'pisell2.product.card.cancel': string;
|
|
76
|
+
'pisell2.product.card.note.pla': string;
|
|
77
|
+
'pisell2.product.card.items.package': string;
|
|
78
|
+
'pisell2.product.card.view-all': string;
|
|
79
|
+
'pisell2.product.card.view-less': string;
|
|
80
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
81
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
82
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
83
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
84
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
85
|
+
'pisell2.product.card.sales': string;
|
|
86
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
87
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
88
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
89
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
90
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
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/cartSkuCard/locales.ts
|
|
30
|
+
var locales_exports = {};
|
|
31
|
+
__export(locales_exports, {
|
|
32
|
+
default: () => locales_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(locales_exports);
|
|
35
|
+
var import_locales = __toESM(require("../locales"));
|
|
36
|
+
var locales_default = {
|
|
37
|
+
en: {
|
|
38
|
+
...import_locales.default.en,
|
|
39
|
+
"pisell2.product.card.discount.reason": "Discount reason",
|
|
40
|
+
"pisell2.cart.sku-card.more": "more...",
|
|
41
|
+
"pisell2.cart.sku-card.packages.title": "Items in package",
|
|
42
|
+
"pisell2.cart.sku-card.sales.title": "Sales"
|
|
43
|
+
},
|
|
44
|
+
"zh-CN": {
|
|
45
|
+
...import_locales.default["zh-CN"],
|
|
46
|
+
"pisell2.product.card.discount.reason": "折扣原因",
|
|
47
|
+
"pisell2.cart.sku-card.more": "更多……",
|
|
48
|
+
"pisell2.cart.sku-card.packages.title": "包含的商品",
|
|
49
|
+
"pisell2.cart.sku-card.sales.title": "销售"
|
|
50
|
+
},
|
|
51
|
+
"zh-HK": {
|
|
52
|
+
...import_locales.default["zh-HK"],
|
|
53
|
+
"pisell2.product.card.discount.reason": "折扣原因",
|
|
54
|
+
"pisell2.cart.sku-card.more": "更多……",
|
|
55
|
+
"pisell2.cart.sku-card.packages.title": "包含的商品",
|
|
56
|
+
"pisell2.cart.sku-card.sales.title": "銷售"
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -47,6 +47,19 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
47
47
|
if (!origin_total) return false;
|
|
48
48
|
return Number(total) != Number(origin_total);
|
|
49
49
|
}, [total, origin_total]);
|
|
50
|
+
const renderDiscountReason = () => {
|
|
51
|
+
if (isDiscount && discount_reason && type === "total") {
|
|
52
|
+
if (Array.isArray(discount_reason)) {
|
|
53
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-item-discount-reason` }, discount_reason.map((reason, index) => {
|
|
54
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, { key: index, color: "red" }, reason);
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
return /* @__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(
|
|
58
|
+
"pisell2.product.card.discount.reason"
|
|
59
|
+
)}: ${discount_reason}`)));
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
};
|
|
50
63
|
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(
|
|
51
64
|
"div",
|
|
52
65
|
{
|
|
@@ -74,11 +87,8 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
74
87
|
}
|
|
75
88
|
)) : null
|
|
76
89
|
), /* @__PURE__ */ import_react.default.createElement("span", null, `×${num}`)) : null,
|
|
77
|
-
/* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-total` }, (0, import_utils._formatAmount)(total * num, symbol))
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
), 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(
|
|
81
|
-
"pisell2.product.card.discount.reason"
|
|
82
|
-
)}: ${discount_reason}`))) : null);
|
|
90
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-origin-total` }, (0, import_utils._formatAmount)(origin_total * num, symbol, 2)) : null, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total * num, symbol)))
|
|
91
|
+
)
|
|
92
|
+
), renderDiscountReason());
|
|
83
93
|
};
|
|
84
94
|
var AmountFooter_default = Footer;
|
|
@@ -35,6 +35,19 @@
|
|
|
35
35
|
color: var(--Gray-900, #101828);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
&-packages-product-footer-origin-total {
|
|
39
|
+
color: var(--Gray-500, #667085);
|
|
40
|
+
text-align: center;
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
font-style: normal;
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
line-height: 18px; /* 150% */
|
|
45
|
+
text-decoration-line: line-through;
|
|
46
|
+
margin-right: 8px;
|
|
47
|
+
display: inline-block;
|
|
48
|
+
transform: translateY(-1px);
|
|
49
|
+
}
|
|
50
|
+
|
|
38
51
|
&-packages-product-hide-divider-footer {
|
|
39
52
|
margin-top: 8px;
|
|
40
53
|
}
|
|
@@ -45,6 +58,20 @@
|
|
|
45
58
|
font-style: normal;
|
|
46
59
|
font-weight: 400;
|
|
47
60
|
line-height: 20px;
|
|
48
|
-
|
|
61
|
+
margin-top: 4px;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-wrap: wrap;
|
|
64
|
+
gap: 4px;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
|
|
67
|
+
>span {
|
|
68
|
+
display: inline-block;
|
|
69
|
+
max-width: 100%;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
border-radius: 4px;
|
|
74
|
+
margin: 0;
|
|
75
|
+
}
|
|
49
76
|
}
|
|
50
77
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @Author: WangHan
|
|
7
7
|
* @Date: 2024-11-22 10:01
|
|
8
8
|
*/
|
|
9
|
-
export declare const minusSign: (item: any, type?: string) => "" | "
|
|
9
|
+
export declare const minusSign: (item: any, type?: string) => "-" | "";
|
|
10
10
|
/**
|
|
11
11
|
* @title: 金额格式化
|
|
12
12
|
* @description:
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
|
|
@@ -0,0 +1,68 @@
|
|
|
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/Warning/index.tsx
|
|
30
|
+
var Warning_exports = {};
|
|
31
|
+
__export(Warning_exports, {
|
|
32
|
+
default: () => Warning_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Warning_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import__ = require("../../index.less");
|
|
39
|
+
var Warning = ({ errorMessage, osWarnTips }) => {
|
|
40
|
+
const errorLists = (0, import_react.useMemo)(() => {
|
|
41
|
+
if (errorMessage) {
|
|
42
|
+
if (Array.isArray(errorMessage)) {
|
|
43
|
+
return errorMessage;
|
|
44
|
+
}
|
|
45
|
+
if (typeof errorMessage === "string") {
|
|
46
|
+
return [errorMessage];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if ((osWarnTips == null ? void 0 : osWarnTips.length) > 0) {
|
|
50
|
+
return osWarnTips.map((item) => import_utils.locales.getText(item));
|
|
51
|
+
}
|
|
52
|
+
return [];
|
|
53
|
+
}, [errorMessage, osWarnTips]);
|
|
54
|
+
if ((errorLists == null ? void 0 : errorLists.length) === 0) {
|
|
55
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null);
|
|
56
|
+
}
|
|
57
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, errorLists.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
58
|
+
import_antd.Alert,
|
|
59
|
+
{
|
|
60
|
+
key: index,
|
|
61
|
+
message: item,
|
|
62
|
+
type: "warning",
|
|
63
|
+
showIcon: true,
|
|
64
|
+
className: "pisell-lowcode-product-card-error"
|
|
65
|
+
}
|
|
66
|
+
)));
|
|
67
|
+
};
|
|
68
|
+
var Warning_default = Warning;
|
|
@@ -34,7 +34,6 @@ __export(productCard_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(productCard_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_classnames = __toESM(require("classnames"));
|
|
37
|
-
var import_antd = require("antd");
|
|
38
37
|
var import_utils = require("@pisell/utils");
|
|
39
38
|
var import_cardPro = __toESM(require("../cardPro"));
|
|
40
39
|
var import_Header = __toESM(require("./components/Header"));
|
|
@@ -50,7 +49,9 @@ var import_useOpenNote = __toESM(require("./hooks/useOpenNote"));
|
|
|
50
49
|
var import_locales = __toESM(require("./locales"));
|
|
51
50
|
var import_status = require("./status");
|
|
52
51
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
52
|
+
var import_Warning = __toESM(require("./components/Warning"));
|
|
53
53
|
var import_index = require("./index.less");
|
|
54
|
+
var import_cartSkuCard = __toESM(require("./cartSkuCard"));
|
|
54
55
|
var ProductCard = (props) => {
|
|
55
56
|
var _a, _b;
|
|
56
57
|
const context = (0, import_useEngineContext.default)();
|
|
@@ -84,7 +85,8 @@ var ProductCard = (props) => {
|
|
|
84
85
|
isShowAction,
|
|
85
86
|
actionText,
|
|
86
87
|
errorMessage,
|
|
87
|
-
isNormalProduct
|
|
88
|
+
isNormalProduct,
|
|
89
|
+
osWarnTips = []
|
|
88
90
|
} = dataSource;
|
|
89
91
|
const showImage = (0, import_react.useMemo)(() => {
|
|
90
92
|
return isShowImage && image;
|
|
@@ -180,15 +182,7 @@ var ProductCard = (props) => {
|
|
|
180
182
|
onAction: () => onAction == null ? void 0 : onAction(dataSource)
|
|
181
183
|
}
|
|
182
184
|
) : null,
|
|
183
|
-
|
|
184
|
-
import_antd.Alert,
|
|
185
|
-
{
|
|
186
|
-
message: errorMessage,
|
|
187
|
-
type: "warning",
|
|
188
|
-
showIcon: true,
|
|
189
|
-
className: "pisell-lowcode-product-card-error"
|
|
190
|
-
}
|
|
191
|
-
) : null
|
|
185
|
+
/* @__PURE__ */ import_react.default.createElement(import_Warning.default, { errorMessage, osWarnTips })
|
|
192
186
|
), /* @__PURE__ */ import_react.default.createElement(
|
|
193
187
|
import_useOpenNote.default,
|
|
194
188
|
{
|
|
@@ -204,4 +198,5 @@ var ProductCard = (props) => {
|
|
|
204
198
|
)
|
|
205
199
|
);
|
|
206
200
|
};
|
|
201
|
+
ProductCard.V2 = import_cartSkuCard.default;
|
|
207
202
|
var productCard_default = ProductCard;
|