@pisell/materials 6.2.36 → 6.3.2
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 +3 -3
- package/build/lowcode/preview.js +164 -148
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +39 -25
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +39 -25
- 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/useDrawerState.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +11 -10
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/filter/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/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/es/components/pisellCardList/index.js +3 -1
- package/es/components/pisellCheckboxGroup/index.d.ts +1 -0
- package/es/components/pisellCheckboxGroup/index.js +15 -1
- package/es/components/pisellGoodPassCard/index.d.ts +0 -1
- package/es/components/pisellGoodPassCard/index.js +5 -17
- 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 +0 -3
- package/es/components/pisellWalletPassCard/index.d.ts +1 -0
- package/es/components/productCard/components/Action/index.js +1 -14
- package/es/components/productCard/components/Action/index.less +0 -3
- package/es/components/productCard/components/Header/index.js +8 -23
- package/es/components/productCard/components/Header/index.less +1 -16
- package/es/components/productCard/components/MultiDay/index.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/options/index.d.ts +1 -0
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.js +1 -3
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.less +0 -3
- package/es/components/productCard/index.d.ts +1 -3
- package/es/components/productCard/index.js +2 -5
- package/es/components/productCard/index.less +0 -6
- package/es/components/productCard/locales.js +0 -3
- 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/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/text/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.d.ts +1 -0
- package/es/components/versionSelect/index.d.ts +1 -0
- package/es/components/virtual-keyboard/index.d.ts +0 -11
- package/es/components/virtual-keyboard/index.js +3 -88
- package/es/components/virtual-keyboard/index.less +1 -33
- package/es/components/walletCard/Guide/index.js +12 -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/useDrawerState.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +11 -10
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/filter/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/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/lib/components/pisellCardList/index.js +3 -1
- package/lib/components/pisellCheckboxGroup/index.d.ts +1 -0
- package/lib/components/pisellCheckboxGroup/index.js +16 -0
- package/lib/components/pisellGoodPassCard/index.d.ts +0 -1
- package/lib/components/pisellGoodPassCard/index.js +4 -31
- 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 +0 -3
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
- package/lib/components/productCard/components/Action/index.js +0 -9
- package/lib/components/productCard/components/Action/index.less +0 -3
- package/lib/components/productCard/components/Header/index.js +11 -21
- package/lib/components/productCard/components/Header/index.less +1 -16
- package/lib/components/productCard/components/MultiDay/index.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +1 -0
- package/lib/components/productCard/components/Sales/index.js +2 -2
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.js +1 -1
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.less +0 -3
- package/lib/components/productCard/index.d.ts +1 -3
- package/lib/components/productCard/index.js +2 -6
- package/lib/components/productCard/index.less +0 -6
- package/lib/components/productCard/locales.js +3 -12
- 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/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/text/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/View/index.d.ts +1 -0
- package/lib/components/versionSelect/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/index.d.ts +0 -11
- package/lib/components/virtual-keyboard/index.js +2 -60
- package/lib/components/virtual-keyboard/index.less +1 -33
- package/lib/components/walletCard/Guide/index.js +11 -1
- package/lowcode/_setters/antd-icon-setter/index.tsx +2 -3
- package/lowcode/virtual-keyboard/meta.ts +0 -131
- package/package.json +4 -6
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
- package/es/components/pisellAdjustPrice/status.d.ts +0 -32
- package/es/components/pisellAdjustPrice/type.d.ts +0 -20
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +0 -76
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +0 -75
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.js +0 -82
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.less +0 -31
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.js +0 -56
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/Note/index.js +0 -29
- package/es/components/productCard/cartSkuCard/components/Note/index.less +0 -27
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +0 -93
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +0 -117
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/es/components/productCard/cartSkuCard/components/discountReason/index.js +0 -51
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/holders/index.js +0 -32
- package/es/components/productCard/cartSkuCard/components/holders/index.less +0 -32
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/components/packages/index.js +0 -52
- package/es/components/productCard/cartSkuCard/components/packages/index.less +0 -22
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/es/components/productCard/cartSkuCard/components/packages/utils.js +0 -40
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/resources/index.js +0 -39
- package/es/components/productCard/cartSkuCard/components/resources/index.less +0 -19
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/es/components/productCard/cartSkuCard/components/sales/index.js +0 -57
- package/es/components/productCard/cartSkuCard/components/sales/index.less +0 -22
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/specs/index.js +0 -44
- package/es/components/productCard/cartSkuCard/components/specs/index.less +0 -34
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -45
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +0 -292
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +0 -35
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +0 -54
- package/es/components/productCard/cartSkuCard/components/timeRange/index.less +0 -38
- package/es/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/index.js +0 -203
- package/es/components/productCard/cartSkuCard/index.less +0 -33
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/es/components/productCard/cartSkuCard/locales.js +0 -30
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Number/types.d.ts +0 -25
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/es/components/walletCard/Guide/index.d.ts +0 -3
- package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -20
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +0 -80
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +0 -75
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.js +0 -71
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.less +0 -31
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.js +0 -77
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/Note/index.js +0 -56
- package/lib/components/productCard/cartSkuCard/components/Note/index.less +0 -27
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +0 -82
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +0 -117
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +0 -70
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/holders/index.js +0 -52
- package/lib/components/productCard/cartSkuCard/components/holders/index.less +0 -32
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +0 -73
- package/lib/components/productCard/cartSkuCard/components/packages/index.less +0 -22
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/lib/components/productCard/cartSkuCard/components/packages/utils.js +0 -44
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/resources/index.js +0 -71
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +0 -19
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +0 -77
- package/lib/components/productCard/cartSkuCard/components/sales/index.less +0 -22
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +0 -66
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +0 -34
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -45
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +0 -339
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +0 -35
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +0 -68
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +0 -38
- package/lib/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/index.js +0 -239
- package/lib/components/productCard/cartSkuCard/index.less +0 -33
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/lib/components/productCard/cartSkuCard/locales.js +0 -61
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Number/types.d.ts +0 -25
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/lib/components/walletCard/Guide/index.d.ts +0 -3
|
@@ -1,80 +0,0 @@
|
|
|
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/components/AmountFooter/index.tsx
|
|
30
|
-
var AmountFooter_exports = {};
|
|
31
|
-
__export(AmountFooter_exports, {
|
|
32
|
-
default: () => AmountFooter_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(AmountFooter_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_classnames = __toESM(require("classnames"));
|
|
37
|
-
var import_antd = require("antd");
|
|
38
|
-
var import_antd2 = require("antd");
|
|
39
|
-
var import_icons = require("@ant-design/icons");
|
|
40
|
-
var import_utils = require("../packages/utils");
|
|
41
|
-
var import_index = require("./index.less");
|
|
42
|
-
var import_utils2 = require("@pisell/utils");
|
|
43
|
-
var import__ = require("../../index");
|
|
44
|
-
var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
45
|
-
const { total, origin_total, symbol, tip, num, discount_reason } = item;
|
|
46
|
-
const isDiscount = (0, import_react.useMemo)(() => {
|
|
47
|
-
if (!origin_total) return false;
|
|
48
|
-
return Number(total) != Number(origin_total);
|
|
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: `${import__.PREFIX}_discount-reason` }, discount_reason.map((reason, index) => {
|
|
54
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd2.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_antd.Divider, null), /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}_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
|
-
};
|
|
63
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !hideDivider ? /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 0 } }) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
64
|
-
"div",
|
|
65
|
-
{
|
|
66
|
-
className: (0, import_classnames.default)(
|
|
67
|
-
`${import__.PREFIX}__product-footer`,
|
|
68
|
-
hideDivider && `${import__.PREFIX}__hide-divider-footer`,
|
|
69
|
-
isOnlyTotal && `${import__.PREFIX}__only-total-footer`
|
|
70
|
-
)
|
|
71
|
-
},
|
|
72
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__footer-price-wrap`) }, !isOnlyTotal ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__footer-price`) }, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total, symbol)), tip ? /* @__PURE__ */ import_react.default.createElement(import_antd2.Tooltip, { title: import_utils2.locales.getText(tip), destroyTooltipOnHide: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
73
|
-
import_icons.QuestionCircleOutlined,
|
|
74
|
-
{
|
|
75
|
-
style: { fontSize: "16px", color: "#1570ef" }
|
|
76
|
-
}
|
|
77
|
-
)) : null), /* @__PURE__ */ import_react.default.createElement("span", null, `×${num}`)) : null, /* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__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))))
|
|
78
|
-
), renderDiscountReason());
|
|
79
|
-
};
|
|
80
|
-
var AmountFooter_default = Footer;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
.pisell-cart-sku-card {
|
|
2
|
-
&__product-footer {
|
|
3
|
-
color: var(--Gray-500, #667085);
|
|
4
|
-
font-size: 14px;
|
|
5
|
-
font-style: normal;
|
|
6
|
-
font-weight: 600;
|
|
7
|
-
line-height: 20px;
|
|
8
|
-
> div {
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: space-between;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
&__only-total-footer {
|
|
14
|
-
> div {
|
|
15
|
-
justify-content: end !important;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&__footer-price {
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
gap: 4px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&__footer-discount {
|
|
26
|
-
font-size: 12px;
|
|
27
|
-
font-weight: 400;
|
|
28
|
-
line-height: 18px;
|
|
29
|
-
text-decoration-line: line-through;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&__footer-total {
|
|
33
|
-
color: var(--Gray-900, #101828);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&__footer-origin-total {
|
|
37
|
-
color: var(--Gray-500, #667085);
|
|
38
|
-
text-align: center;
|
|
39
|
-
font-size: 12px;
|
|
40
|
-
font-style: normal;
|
|
41
|
-
font-weight: 400;
|
|
42
|
-
line-height: 18px; /* 150% */
|
|
43
|
-
text-decoration-line: line-through;
|
|
44
|
-
margin-right: 8px;
|
|
45
|
-
display: inline-block;
|
|
46
|
-
transform: translateY(-1px);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&__hide-divider-footer {
|
|
50
|
-
margin-top: 8px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&-product-item-discount-reason {
|
|
54
|
-
color: var(--gray-500, #667085);
|
|
55
|
-
font-size: 14px;
|
|
56
|
-
font-style: normal;
|
|
57
|
-
font-weight: 400;
|
|
58
|
-
line-height: 20px;
|
|
59
|
-
margin-top: 4px;
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-wrap: wrap;
|
|
62
|
-
gap: 4px;
|
|
63
|
-
overflow: hidden;
|
|
64
|
-
|
|
65
|
-
> span {
|
|
66
|
-
display: inline-block;
|
|
67
|
-
max-width: 100%;
|
|
68
|
-
text-overflow: ellipsis;
|
|
69
|
-
white-space: nowrap;
|
|
70
|
-
overflow: hidden;
|
|
71
|
-
border-radius: 4px;
|
|
72
|
-
margin: 0;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
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/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_antd = require("antd");
|
|
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 import_utils2 = require("./utils");
|
|
43
|
-
var import__ = require("../../index");
|
|
44
|
-
var MultiDay = ({ dataSource, hideDivider }) => {
|
|
45
|
-
var _a;
|
|
46
|
-
const { items, symbol, locale } = dataSource;
|
|
47
|
-
let translationOriginal = (text) => "";
|
|
48
|
-
const context = (0, import_useEngineContext.default)();
|
|
49
|
-
const utils = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils;
|
|
50
|
-
translationOriginal = (utils == null ? void 0 : utils.translationOriginal) || (utils == null ? void 0 : utils.translation);
|
|
51
|
-
const lists = (0, import_react.useMemo)(() => {
|
|
52
|
-
return (0, import_utils2.formatDateRanges)([dataSource]);
|
|
53
|
-
}, [items, dataSource]);
|
|
54
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__multi-day-wrap`) }, lists == null ? void 0 : lists.map((m, index) => {
|
|
55
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { key: index }, /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: "4px 0" } }), /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__multi-day`) }, /* @__PURE__ */ import_react.default.createElement("div", null, (0, import_utils.formatMultiDayDate)({ ...m, locale })), /* @__PURE__ */ import_react.default.createElement(
|
|
56
|
-
import_AmountFooter.default,
|
|
57
|
-
{
|
|
58
|
-
item: { ...m, symbol },
|
|
59
|
-
hideDivider: true
|
|
60
|
-
}
|
|
61
|
-
)));
|
|
62
|
-
}), /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__multi-day-total-wrap`) }, /* @__PURE__ */ import_react.default.createElement(
|
|
63
|
-
import_AmountFooter.default,
|
|
64
|
-
{
|
|
65
|
-
item: { ...dataSource, num: 1 },
|
|
66
|
-
type: "total",
|
|
67
|
-
isOnlyTotal: true
|
|
68
|
-
}
|
|
69
|
-
)));
|
|
70
|
-
};
|
|
71
|
-
var MultiDay_default = MultiDay;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
.pisell-cart-sku-card {
|
|
2
|
-
&__multi-day-wrap {
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
&__multi-day {
|
|
6
|
-
color: var(--Gray-500, #667085);
|
|
7
|
-
font-size: 14px;
|
|
8
|
-
font-weight: 400;
|
|
9
|
-
line-height: 20px;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&__multi-day-total {
|
|
15
|
-
color: var(--Gray-900, #101828);
|
|
16
|
-
text-align: right;
|
|
17
|
-
font-size: 14px;
|
|
18
|
-
font-weight: 600;
|
|
19
|
-
line-height: 20px;
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&__multi-day-total-discount {
|
|
25
|
-
font-size: 12px;
|
|
26
|
-
font-weight: 400;
|
|
27
|
-
line-height: 18px;
|
|
28
|
-
text-decoration-line: line-through;
|
|
29
|
-
color: var(--Gray-500, #667085);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface InputItem {
|
|
2
|
-
start_date: string;
|
|
3
|
-
end_date: string;
|
|
4
|
-
total: number;
|
|
5
|
-
num: number;
|
|
6
|
-
}
|
|
7
|
-
interface OutputItem {
|
|
8
|
-
start_date: string;
|
|
9
|
-
end_date: string;
|
|
10
|
-
total: number;
|
|
11
|
-
num: number;
|
|
12
|
-
}
|
|
13
|
-
export declare function formatDateRanges(list: InputItem[]): OutputItem[];
|
|
14
|
-
export {};
|
|
@@ -1,77 +0,0 @@
|
|
|
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/components/MultiDay/utils.ts
|
|
30
|
-
var utils_exports = {};
|
|
31
|
-
__export(utils_exports, {
|
|
32
|
-
formatDateRanges: () => formatDateRanges
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(utils_exports);
|
|
35
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
36
|
-
function formatDateRanges(list) {
|
|
37
|
-
const result = [];
|
|
38
|
-
let currentGroup = null;
|
|
39
|
-
list.forEach((item, index) => {
|
|
40
|
-
const currentStartDate = (0, import_dayjs.default)(item.start_date);
|
|
41
|
-
const currentEndDate = (0, import_dayjs.default)(item.end_date);
|
|
42
|
-
const currentTotal = item.total;
|
|
43
|
-
const currentNum = item.num;
|
|
44
|
-
if (!currentGroup) {
|
|
45
|
-
currentGroup = {
|
|
46
|
-
...item,
|
|
47
|
-
start_date: currentStartDate.format("YYYY-MM-DD"),
|
|
48
|
-
end_date: currentEndDate.format("YYYY-MM-DD"),
|
|
49
|
-
total: currentTotal,
|
|
50
|
-
num: currentNum
|
|
51
|
-
};
|
|
52
|
-
} else {
|
|
53
|
-
const prevEndDate = (0, import_dayjs.default)(currentGroup.end_date);
|
|
54
|
-
if (currentTotal === currentGroup.total && prevEndDate.isSame(currentStartDate, "day")) {
|
|
55
|
-
currentGroup.end_date = currentEndDate.format("YYYY-MM-DD");
|
|
56
|
-
currentGroup.num += currentNum;
|
|
57
|
-
} else {
|
|
58
|
-
result.push(currentGroup);
|
|
59
|
-
currentGroup = {
|
|
60
|
-
...item,
|
|
61
|
-
start_date: currentStartDate.format("YYYY-MM-DD"),
|
|
62
|
-
end_date: currentEndDate.format("YYYY-MM-DD"),
|
|
63
|
-
total: currentTotal,
|
|
64
|
-
num: currentNum
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (index === list.length - 1 && currentGroup) {
|
|
69
|
-
result.push(currentGroup);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
return result;
|
|
73
|
-
}
|
|
74
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
-
0 && (module.exports = {
|
|
76
|
-
formatDateRanges
|
|
77
|
-
});
|
|
@@ -1,56 +0,0 @@
|
|
|
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/components/Note/index.tsx
|
|
30
|
-
var Note_exports = {};
|
|
31
|
-
__export(Note_exports, {
|
|
32
|
-
default: () => Note_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(Note_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_classnames = __toESM(require("classnames"));
|
|
37
|
-
var import_utils = require("@pisell/utils");
|
|
38
|
-
var import_antd = require("antd");
|
|
39
|
-
var import__ = require("../../index");
|
|
40
|
-
var import_index = require("./index.less");
|
|
41
|
-
var Note = (props) => {
|
|
42
|
-
const { item, type, openNote, disabledEdit } = props;
|
|
43
|
-
return (item == null ? void 0 : item.note) || !disabledEdit ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 0 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__note-wrap`) }, (item == null ? void 0 : item.note) ? /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__note-text`) }, import_utils.locales.getText("pisell2.product.card.discount.note"), ": ", item.note) : null, !disabledEdit ? /* @__PURE__ */ import_react.default.createElement(
|
|
44
|
-
"span",
|
|
45
|
-
{
|
|
46
|
-
className: `${import__.PREFIX}__note-btn`,
|
|
47
|
-
onClick: (e) => {
|
|
48
|
-
e.preventDefault();
|
|
49
|
-
e.stopPropagation();
|
|
50
|
-
openNote();
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
(item == null ? void 0 : item.note) ? import_utils.locales.getText("pisell2.product.card.discount.edit.note") : import_utils.locales.getText("pisell2.product.card.discount.add.note")
|
|
54
|
-
) : null)) : null;
|
|
55
|
-
};
|
|
56
|
-
var Note_default = Note;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
.pisell-cart-sku-card {
|
|
2
|
-
&__note-wrap {
|
|
3
|
-
display: flex;
|
|
4
|
-
gap: 8px;
|
|
5
|
-
color: var(--Gray-900, #101828);
|
|
6
|
-
font-size: 14px;
|
|
7
|
-
font-style: normal;
|
|
8
|
-
font-weight: 400;
|
|
9
|
-
line-height: 20px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&__note-text {
|
|
13
|
-
color: #101828;
|
|
14
|
-
font-size: 14px;
|
|
15
|
-
font-weight: 400;
|
|
16
|
-
line-height: 20px;
|
|
17
|
-
word-break: keep-all;
|
|
18
|
-
word-wrap: normal;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&__note-btn {
|
|
22
|
-
color: var(--Blue-600, #1570ef);
|
|
23
|
-
font-weight: 600;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
white-space: nowrap;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
interface IProps {
|
|
4
|
-
isShowImage?: boolean;
|
|
5
|
-
dataSource: {
|
|
6
|
-
image?: string;
|
|
7
|
-
bundle?: any[];
|
|
8
|
-
options?: any[];
|
|
9
|
-
product_option_string?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
symbol?: string;
|
|
12
|
-
price?: string | number;
|
|
13
|
-
total?: number;
|
|
14
|
-
origin_total?: number;
|
|
15
|
-
num?: number;
|
|
16
|
-
holder_id?: any;
|
|
17
|
-
};
|
|
18
|
-
style?: React.CSSProperties;
|
|
19
|
-
/** 作为主商品卡片展示
|
|
20
|
-
* 1. 影响商品数量 tag 的位置
|
|
21
|
-
* 2. isMain 且 type 为 a5,展示holder
|
|
22
|
-
*/
|
|
23
|
-
isMainProduct?: boolean;
|
|
24
|
-
type?: 'a2' | 'a5';
|
|
25
|
-
}
|
|
26
|
-
declare const BasicInfo: (props: IProps) => JSX.Element;
|
|
27
|
-
export default BasicInfo;
|
|
@@ -1,82 +0,0 @@
|
|
|
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/components/basicInfo/index.tsx
|
|
30
|
-
var basicInfo_exports = {};
|
|
31
|
-
__export(basicInfo_exports, {
|
|
32
|
-
default: () => basicInfo_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(basicInfo_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_classnames = __toESM(require("classnames"));
|
|
37
|
-
var import_utils = require("@pisell/utils");
|
|
38
|
-
var import_specs = __toESM(require("../specs"));
|
|
39
|
-
var import_holders = __toESM(require("../holders"));
|
|
40
|
-
var import__ = require("../../index");
|
|
41
|
-
var import_index = require("./index.less");
|
|
42
|
-
var BasicInfo = (props) => {
|
|
43
|
-
const { isShowImage, dataSource = {}, style, isMainProduct, type } = props;
|
|
44
|
-
const {
|
|
45
|
-
image,
|
|
46
|
-
bundle,
|
|
47
|
-
options,
|
|
48
|
-
product_option_string,
|
|
49
|
-
name,
|
|
50
|
-
price,
|
|
51
|
-
symbol,
|
|
52
|
-
total = 0,
|
|
53
|
-
origin_total = 0,
|
|
54
|
-
num = 1,
|
|
55
|
-
holder_id
|
|
56
|
-
} = dataSource;
|
|
57
|
-
const renderNumTag = () => {
|
|
58
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
className: (0, import_classnames.default)(`num-tag`, {
|
|
62
|
-
"is-main": isMainProduct
|
|
63
|
-
})
|
|
64
|
-
},
|
|
65
|
-
num < 100 ? num : "99+"
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
const hasSpecs = (bundle == null ? void 0 : bundle.length) || (options == null ? void 0 : options.length) || product_option_string;
|
|
69
|
-
const renderImage = () => {
|
|
70
|
-
if (!isShowImage) return null;
|
|
71
|
-
if (image) {
|
|
72
|
-
return /* @__PURE__ */ import_react.default.createElement("img", { src: import_utils.image.ali(image, 64), className: `product-cover` });
|
|
73
|
-
}
|
|
74
|
-
const displayText = name ? name.slice(0, 2) : "";
|
|
75
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `product-cover-text` }, displayText);
|
|
76
|
-
};
|
|
77
|
-
if (type === "a5") {
|
|
78
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), !holder_id || !(holder_id == null ? void 0 : holder_id.length) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (0, import_utils.formatAmount)(price, 2, symbol)) : /* @__PURE__ */ import_react.default.createElement(import_holders.default, { dataSource })));
|
|
79
|
-
}
|
|
80
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasSpecs ? /* @__PURE__ */ import_react.default.createElement(import_specs.default, { dataSource }) : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (0, import_utils.formatAmount)(price, 2, symbol))), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num, 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
|
|
81
|
-
};
|
|
82
|
-
var basicInfo_default = BasicInfo;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
.pisell-cart-sku-card {
|
|
2
|
-
&__basic-info {
|
|
3
|
-
display: flex;
|
|
4
|
-
gap: 4px;
|
|
5
|
-
position: relative;
|
|
6
|
-
min-height: 48px;
|
|
7
|
-
|
|
8
|
-
.num-tag {
|
|
9
|
-
background-color: #7f56da;
|
|
10
|
-
position: absolute;
|
|
11
|
-
left: 0;
|
|
12
|
-
top: 0;
|
|
13
|
-
border-radius: 12px;
|
|
14
|
-
min-width: 24px;
|
|
15
|
-
height: 24px;
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
z-index: 1;
|
|
20
|
-
|
|
21
|
-
color: var(--Base-White, #fff);
|
|
22
|
-
font-size: 16px;
|
|
23
|
-
font-style: normal;
|
|
24
|
-
font-weight: 600;
|
|
25
|
-
line-height: 16px;
|
|
26
|
-
|
|
27
|
-
&.is-main {
|
|
28
|
-
left: -4px;
|
|
29
|
-
top: -4px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
img {
|
|
34
|
-
width: 48px;
|
|
35
|
-
height: 48px;
|
|
36
|
-
flex-shrink: 0;
|
|
37
|
-
border-radius: 6px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.product-cover-text {
|
|
41
|
-
width: 48px;
|
|
42
|
-
height: 48px;
|
|
43
|
-
flex-shrink: 0;
|
|
44
|
-
border-radius: 8px;
|
|
45
|
-
background-color: #DEDEDE;
|
|
46
|
-
color: #7E7E7E;
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
justify-content: center;
|
|
50
|
-
font-size: 20px;
|
|
51
|
-
font-weight: 500;
|
|
52
|
-
line-height: 1;
|
|
53
|
-
white-space: nowrap;
|
|
54
|
-
overflow: hidden;
|
|
55
|
-
text-overflow: ellipsis;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.product-info {
|
|
59
|
-
flex: 1;
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: center;
|
|
62
|
-
flex: 1 0 0;
|
|
63
|
-
flex-wrap: wrap;
|
|
64
|
-
overflow: hidden;
|
|
65
|
-
|
|
66
|
-
.product-name {
|
|
67
|
-
color: var(--Gray-900, #101828);
|
|
68
|
-
font-size: 14px;
|
|
69
|
-
font-style: normal;
|
|
70
|
-
font-weight: 600;
|
|
71
|
-
line-height: 20px;
|
|
72
|
-
width: 100%;
|
|
73
|
-
overflow: hidden;
|
|
74
|
-
text-overflow: ellipsis;
|
|
75
|
-
white-space: nowrap;
|
|
76
|
-
padding-right: 20px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.product-price {
|
|
80
|
-
color: var(--Gray-900, #101828);
|
|
81
|
-
font-size: 14px;
|
|
82
|
-
font-style: normal;
|
|
83
|
-
font-weight: 500;
|
|
84
|
-
line-height: 20px;
|
|
85
|
-
width: 100%;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.product-amount {
|
|
90
|
-
display: flex;
|
|
91
|
-
align-items: center;
|
|
92
|
-
gap: 4px;
|
|
93
|
-
flex-wrap: wrap;
|
|
94
|
-
flex-shrink: 0;
|
|
95
|
-
.total-amont {
|
|
96
|
-
color: var(--Base-Black, #000);
|
|
97
|
-
text-align: center;
|
|
98
|
-
font-size: 14px;
|
|
99
|
-
font-style: normal;
|
|
100
|
-
font-weight: 600;
|
|
101
|
-
line-height: 20px;
|
|
102
|
-
width: 100%;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.origin-amount {
|
|
106
|
-
color: var(--Gray-500, #667085);
|
|
107
|
-
text-align: center;
|
|
108
|
-
font-size: 12px;
|
|
109
|
-
font-style: normal;
|
|
110
|
-
font-weight: 400;
|
|
111
|
-
line-height: 18px;
|
|
112
|
-
text-decoration-line: line-through;
|
|
113
|
-
width: 100%;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|