@pisell/materials 6.11.264 → 6.11.266
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/meta.js +3 -3
- package/build/lowcode/preview.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/es/components/PisellCards/index.d.ts +1 -0
- package/es/components/PisellFields/index.d.ts +1 -0
- package/es/components/PisellFields/index.js +0 -11
- package/es/components/PisellLayouts/index.d.ts +1 -0
- package/es/components/PisellMetrics/index.d.ts +1 -0
- package/es/components/appVersionControl/types.d.ts +1 -0
- package/es/components/calendar/index.d.ts +1 -0
- package/es/components/checkbox/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Radio/WithMode.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +1 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +1 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/drag-sort-tree/types.d.ts +1 -0
- package/es/components/filter/components/FilterButton/types.d.ts +1 -0
- package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +0 -2
- package/es/components/filter/components/FilterItem/index.js +0 -11
- package/es/components/input/index.d.ts +1 -0
- package/es/components/pisell-config-provider/context.d.ts +1 -0
- package/es/components/pisellDatePicker/index.d.ts +1 -0
- package/es/components/pisellGridPro/ToolBar/type.d.ts +1 -0
- package/es/components/pisellMenu/types.d.ts +1 -0
- package/es/components/pisellQuickFilter/type.d.ts +1 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +0 -2
- package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +0 -11
- package/es/components/pisellWalletPassCard/index.d.ts +3 -0
- package/es/components/pisellWalletPassCard/index.js +15 -5
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +10 -4
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +0 -6
- package/es/components/radio/index.d.ts +1 -0
- package/es/components/section-footers/index.d.ts +1 -0
- package/es/components/skeleton/index.d.ts +1 -0
- package/es/components/time-picker/index.d.ts +1 -0
- package/es/components/upload/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Amount/types.d.ts +1 -0
- package/es/index.js +0 -11
- package/es/pisell-materials.tw.css +1 -1
- package/lib/components/PisellCards/index.d.ts +1 -0
- package/lib/components/PisellFields/index.d.ts +1 -0
- package/lib/components/PisellLayouts/index.d.ts +1 -0
- package/lib/components/PisellMetrics/index.d.ts +1 -0
- package/lib/components/appVersionControl/types.d.ts +1 -0
- package/lib/components/calendar/index.d.ts +1 -0
- package/lib/components/checkbox/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Radio/WithMode.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +1 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/types.d.ts +1 -0
- package/lib/components/filter/components/FilterButton/types.d.ts +1 -0
- package/lib/components/input/index.d.ts +1 -0
- package/lib/components/pisell-config-provider/context.d.ts +1 -0
- package/lib/components/pisellDatePicker/index.d.ts +1 -0
- package/lib/components/pisellGridPro/ToolBar/type.d.ts +1 -0
- package/lib/components/pisellMenu/types.d.ts +1 -0
- package/lib/components/pisellQuickFilter/type.d.ts +1 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +3 -0
- package/lib/components/pisellWalletPassCard/index.js +15 -5
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +10 -4
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +0 -6
- package/lib/components/radio/index.d.ts +1 -0
- package/lib/components/section-footers/index.d.ts +1 -0
- package/lib/components/skeleton/index.d.ts +1 -0
- package/lib/components/time-picker/index.d.ts +1 -0
- package/lib/components/upload/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Amount/types.d.ts +1 -0
- package/lib/pisell-materials.tw.css +1 -1
- package/package.json +4 -4
- package/es/components/pisellCurrency/index.js +0 -13
- package/es/components/pisellEmail/index.js +0 -13
- package/es/components/pisellLongText/index.js +0 -13
- package/es/components/pisellMultipleSelect/index.js +0 -13
- package/es/components/pisellNumber/index.js +0 -13
- package/es/components/pisellPercent/index.js +0 -13
- package/es/components/pisellPhone/index.js +0 -14
- package/es/components/pisellRating/index.js +0 -13
- package/es/components/pisellSingleLineText/index.js +0 -13
- package/es/components/pisellSingleSelect/index.js +0 -13
- package/es/components/pisellUrl/index.js +0 -13
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { PisellBasicCardProps } from "./types.js";
|
|
2
3
|
import { ImageDataSource, ImageFillMode, PisellImageCardProps } from "./components/PisellImageCard/types.js";
|
|
3
4
|
import { GraphicConfig, GraphicTextCardProps, GraphicTextCardSize, GraphicTextCardVariant } from "./components/GraphicTextCard/types.js";
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
import PisellSingleLineText_default from "../pisellSingleLineText/PisellSingleLineText.js";
|
|
2
|
-
import "../pisellSingleLineText/index.js";
|
|
3
2
|
import PisellLongText_default from "../pisellLongText/PisellLongText.js";
|
|
4
|
-
import "../pisellLongText/index.js";
|
|
5
3
|
import MemoizedPisellNumber from "../pisellNumber/PisellNumber.js";
|
|
6
|
-
import "../pisellNumber/index.js";
|
|
7
4
|
import MemoizedPisellCurrency from "../pisellCurrency/PisellCurrency.js";
|
|
8
|
-
import "../pisellCurrency/index.js";
|
|
9
5
|
import MemoizedPisellPercent from "../pisellPercent/PisellPercent.js";
|
|
10
|
-
import "../pisellPercent/index.js";
|
|
11
6
|
import PisellPhone_default from "../pisellPhone/PisellPhone.js";
|
|
12
|
-
import "../pisellPhone/index.js";
|
|
13
7
|
import PisellEmail_default from "../pisellEmail/PisellEmail.js";
|
|
14
|
-
import "../pisellEmail/index.js";
|
|
15
8
|
import PisellUrl_default from "../pisellUrl/PisellUrl.js";
|
|
16
|
-
import "../pisellUrl/index.js";
|
|
17
9
|
import PisellRating_default from "../pisellRating/PisellRating.js";
|
|
18
|
-
import "../pisellRating/index.js";
|
|
19
10
|
import PisellSingleSelect from "../pisellSingleSelect/PisellSingleSelect.js";
|
|
20
|
-
import "../pisellSingleSelect/index.js";
|
|
21
11
|
import PisellMultipleSelect from "../pisellMultipleSelect/PisellMultipleSelect.js";
|
|
22
|
-
import "../pisellMultipleSelect/index.js";
|
|
23
12
|
//#region src/components/PisellFields/index.tsx
|
|
24
13
|
/**
|
|
25
14
|
* PisellFields 命名空间
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { PisellBasicGridProps } from "../PisellBasicGrid/types.js";
|
|
2
3
|
import { PisellScrollViewProps, PisellScrollViewRef } from "../PisellScrollView/types.js";
|
|
3
4
|
import { FloorMapFullscreenMode, FloorMapItemBase, FloorMapLayoutContextValue, PisellFloorMapLayoutProps, PisellFloorMapLayoutRef } from "../pisellFloorMapLayout/types.js";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
3
3
|
import PisellSingleSelect from "../../../pisellSingleSelect/PisellSingleSelect.js";
|
|
4
|
-
import "../../../pisellSingleSelect/index.js";
|
|
5
4
|
import PisellMultipleSelect from "../../../pisellMultipleSelect/PisellMultipleSelect.js";
|
|
6
|
-
import "../../../pisellMultipleSelect/index.js";
|
|
7
5
|
import React, { useEffect, useState } from "react";
|
|
8
6
|
import { Spin } from "antd";
|
|
9
7
|
//#region src/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.tsx
|
|
@@ -1,28 +1,17 @@
|
|
|
1
1
|
import { getText } from "../../../../locales/index.js";
|
|
2
2
|
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
3
|
import PisellSingleLineText_default from "../../../pisellSingleLineText/PisellSingleLineText.js";
|
|
4
|
-
import "../../../pisellSingleLineText/index.js";
|
|
5
4
|
import PisellLongText_default from "../../../pisellLongText/PisellLongText.js";
|
|
6
|
-
import "../../../pisellLongText/index.js";
|
|
7
5
|
import MemoizedPisellNumber from "../../../pisellNumber/PisellNumber.js";
|
|
8
|
-
import "../../../pisellNumber/index.js";
|
|
9
6
|
import MemoizedPisellCurrency from "../../../pisellCurrency/PisellCurrency.js";
|
|
10
|
-
import "../../../pisellCurrency/index.js";
|
|
11
7
|
import MemoizedPisellPercent from "../../../pisellPercent/PisellPercent.js";
|
|
12
|
-
import "../../../pisellPercent/index.js";
|
|
13
8
|
import PisellPhone_default from "../../../pisellPhone/PisellPhone.js";
|
|
14
|
-
import "../../../pisellPhone/index.js";
|
|
15
9
|
import PisellEmail_default from "../../../pisellEmail/PisellEmail.js";
|
|
16
|
-
import "../../../pisellEmail/index.js";
|
|
17
10
|
import PisellUrl_default from "../../../pisellUrl/PisellUrl.js";
|
|
18
|
-
import "../../../pisellUrl/index.js";
|
|
19
11
|
import PisellRating_default from "../../../pisellRating/PisellRating.js";
|
|
20
|
-
import "../../../pisellRating/index.js";
|
|
21
12
|
import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
22
13
|
import PisellSingleSelect from "../../../pisellSingleSelect/PisellSingleSelect.js";
|
|
23
|
-
import "../../../pisellSingleSelect/index.js";
|
|
24
14
|
import PisellMultipleSelect from "../../../pisellMultipleSelect/PisellMultipleSelect.js";
|
|
25
|
-
import "../../../pisellMultipleSelect/index.js";
|
|
26
15
|
import { fieldMaps } from "../../../table/Table/fields/index.js";
|
|
27
16
|
import { PisellMobileDateRangePicker } from "../../../pisellMobileDateRangePicker/PisellMobileDateRangePicker.js";
|
|
28
17
|
import AsyncOptionsSelectWrapper from "./AsyncOptionsSelectWrapper.js";
|
package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { getText } from "../../../../locales/index.js";
|
|
2
2
|
import MemoizedPisellNumber from "../../../pisellNumber/PisellNumber.js";
|
|
3
|
-
import "../../../pisellNumber/index.js";
|
|
4
3
|
import PisellSingleSelect from "../../../pisellSingleSelect/PisellSingleSelect.js";
|
|
5
|
-
import "../../../pisellSingleSelect/index.js";
|
|
6
4
|
import React from "react";
|
|
7
5
|
//#region src/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.tsx
|
|
8
6
|
/** 控制台「资源 / 布局」分页:预设、自定义行列、翻页停留、主文案宽度 */
|
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
import { getText } from "../../../locales/index.js";
|
|
2
2
|
import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
3
|
import PisellSingleLineText_default from "../../pisellSingleLineText/PisellSingleLineText.js";
|
|
4
|
-
import "../../pisellSingleLineText/index.js";
|
|
5
4
|
import PisellLongText_default from "../../pisellLongText/PisellLongText.js";
|
|
6
|
-
import "../../pisellLongText/index.js";
|
|
7
5
|
import MemoizedPisellNumber from "../../pisellNumber/PisellNumber.js";
|
|
8
|
-
import "../../pisellNumber/index.js";
|
|
9
6
|
import MemoizedPisellCurrency from "../../pisellCurrency/PisellCurrency.js";
|
|
10
|
-
import "../../pisellCurrency/index.js";
|
|
11
7
|
import MemoizedPisellPercent from "../../pisellPercent/PisellPercent.js";
|
|
12
|
-
import "../../pisellPercent/index.js";
|
|
13
8
|
import PisellPhone_default from "../../pisellPhone/PisellPhone.js";
|
|
14
|
-
import "../../pisellPhone/index.js";
|
|
15
9
|
import PisellEmail_default from "../../pisellEmail/PisellEmail.js";
|
|
16
|
-
import "../../pisellEmail/index.js";
|
|
17
10
|
import PisellUrl_default from "../../pisellUrl/PisellUrl.js";
|
|
18
|
-
import "../../pisellUrl/index.js";
|
|
19
11
|
import PisellRating_default from "../../pisellRating/PisellRating.js";
|
|
20
|
-
import "../../pisellRating/index.js";
|
|
21
12
|
import PisellSingleSelect from "../../pisellSingleSelect/PisellSingleSelect.js";
|
|
22
|
-
import "../../pisellSingleSelect/index.js";
|
|
23
13
|
import PisellMultipleSelect from "../../pisellMultipleSelect/PisellMultipleSelect.js";
|
|
24
|
-
import "../../pisellMultipleSelect/index.js";
|
|
25
14
|
import PisellDateTimeDisplay_default from "../../pisellDateTimeDisplay/PisellDateTimeDisplay.js";
|
|
26
15
|
import React, { useEffect, useState } from "react";
|
|
27
16
|
//#region src/components/pisellRecordBoard/utils/recordBoardColumns.tsx
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { WalletPassValidity } from "@pisell/utils";
|
|
2
3
|
//#region src/components/pisellWalletPassCard/index.d.ts
|
|
3
4
|
interface FormatOption {
|
|
4
5
|
/** 原始 DOM 元素 */
|
|
@@ -58,6 +59,8 @@ interface PisellWalletPassCardProps {
|
|
|
58
59
|
validDateBySchedule?: boolean;
|
|
59
60
|
/** 日程列表 */
|
|
60
61
|
scheduleList?: any[];
|
|
62
|
+
/** 卡自身的原始有效日期,与使用日程共同决定展示范围 */
|
|
63
|
+
walletValidity?: WalletPassValidity;
|
|
61
64
|
/** 是否展示右上角详情按钮 */
|
|
62
65
|
showDetail?: boolean;
|
|
63
66
|
/** 是否展示qrCode */
|
|
@@ -39,7 +39,7 @@ const PisellWalletPassCard = (props) => {
|
|
|
39
39
|
if (pressTimer) clearTimeout(pressTimer);
|
|
40
40
|
};
|
|
41
41
|
}, [pressTimer]);
|
|
42
|
-
const { id, type, code, qrCode, balance, formattedBalance, disabledReason, name, storeName, redeem, validDate, disabled, active = false, cover, balanceTitle, redeemTitle, showCover = true, showDetail = true, showBalance = true, showRedeem = true, showName = true, showCode = true, showStoreName = true, showValidDate = true, showQrCode = true, showBalanceSymbol = true, showDisabledReason = true, showDiscount = false, discount, showActions, actions, beforeEdit, onBeforeEditAmount, onConfirmEdit, onConfirmEditAmount, onDetail, useExternalDetail = false, originData, style = {}, mode = "multiple", showActiveIcon, enableEditAmount, showStatus, cardStatus, nameTitleStyle, formatBalance, formatBalanceTitle, formatRedeem, formatRedeemTitle, maxRedeem, showHolderName = true, holder, onSetHolder, validDateBySchedule, scheduleList } = props;
|
|
42
|
+
const { id, type, code, qrCode, balance, formattedBalance, disabledReason, name, storeName, redeem, validDate, disabled, active = false, cover, balanceTitle, redeemTitle, showCover = true, showDetail = true, showBalance = true, showRedeem = true, showName = true, showCode = true, showStoreName = true, showValidDate = true, showQrCode = true, showBalanceSymbol = true, showDisabledReason = true, showDiscount = false, discount, showActions, actions, beforeEdit, onBeforeEditAmount, onConfirmEdit, onConfirmEditAmount, onDetail, useExternalDetail = false, originData, style = {}, mode = "multiple", showActiveIcon, enableEditAmount, showStatus, cardStatus, nameTitleStyle, formatBalance, formatBalanceTitle, formatRedeem, formatRedeemTitle, maxRedeem, showHolderName = true, holder, onSetHolder, validDateBySchedule, scheduleList, walletValidity } = props;
|
|
43
43
|
useEffect(() => {
|
|
44
44
|
document.body.id = "body";
|
|
45
45
|
}, []);
|
|
@@ -132,12 +132,22 @@ const PisellWalletPassCard = (props) => {
|
|
|
132
132
|
};
|
|
133
133
|
}();
|
|
134
134
|
const formatValidDate = useMemo(() => {
|
|
135
|
-
if (validDateBySchedule && scheduleList && (scheduleList === null || scheduleList === void 0 ? void 0 : scheduleList.length) > 0)
|
|
135
|
+
if (validDateBySchedule && scheduleList && (scheduleList === null || scheduleList === void 0 ? void 0 : scheduleList.length) > 0) {
|
|
136
|
+
var _walletValidity$start, _ref2, _walletValidity$expir, _walletValidity$expir2;
|
|
137
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, getText("pisell-wallet-pass-card-valid"), " ", getScheduleSummary(scheduleList, config === null || config === void 0 ? void 0 : config.locale, {
|
|
138
|
+
start_date: (_walletValidity$start = walletValidity === null || walletValidity === void 0 ? void 0 : walletValidity.start_date) !== null && _walletValidity$start !== void 0 ? _walletValidity$start : originData === null || originData === void 0 ? void 0 : originData.start_date,
|
|
139
|
+
expire_date: (_ref2 = (_walletValidity$expir = walletValidity === null || walletValidity === void 0 ? void 0 : walletValidity.expire_date) !== null && _walletValidity$expir !== void 0 ? _walletValidity$expir : originData === null || originData === void 0 ? void 0 : originData.expire_date) !== null && _ref2 !== void 0 ? _ref2 : validDate,
|
|
140
|
+
expire_time: (_walletValidity$expir2 = walletValidity === null || walletValidity === void 0 ? void 0 : walletValidity.expire_time) !== null && _walletValidity$expir2 !== void 0 ? _walletValidity$expir2 : originData === null || originData === void 0 ? void 0 : originData.expire_time
|
|
141
|
+
}) || validDate);
|
|
142
|
+
}
|
|
136
143
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, getText("pisell-wallet-pass-card-valid-to"), " ", !!validDate ? validDate : getText("pisell-wallet-pass-card-expireDate"));
|
|
137
144
|
}, [
|
|
138
145
|
validDateBySchedule,
|
|
139
146
|
scheduleList,
|
|
140
|
-
validDate
|
|
147
|
+
validDate,
|
|
148
|
+
walletValidity,
|
|
149
|
+
originData,
|
|
150
|
+
config === null || config === void 0 ? void 0 : config.locale
|
|
141
151
|
]);
|
|
142
152
|
const _onConfirmEdit = () => {
|
|
143
153
|
form.validateFields().then((values) => {
|
|
@@ -238,7 +248,7 @@ const PisellWalletPassCard = (props) => {
|
|
|
238
248
|
return /* @__PURE__ */ React.createElement("div", { className: classNames("pisell-card-name-info-wrap") }, /* @__PURE__ */ React.createElement("div", { className: "pisell-card-name-wrap" }, showName && name), _showHolderName && /* @__PURE__ */ React.createElement("div", { className: "pisell-card-holder-name" }, holderName), shouldShowStoreName && /* @__PURE__ */ React.createElement("div", { className: "pisell-card-store-name" }, storeName));
|
|
239
249
|
};
|
|
240
250
|
const handleEditAmount = function() {
|
|
241
|
-
var
|
|
251
|
+
var _ref3 = _asyncToGenerator(function* (e) {
|
|
242
252
|
if (active && enableEditAmount) e.stopPropagation();
|
|
243
253
|
if (!active) return;
|
|
244
254
|
if (enableEditAmount && !disabled) {
|
|
@@ -259,7 +269,7 @@ const PisellWalletPassCard = (props) => {
|
|
|
259
269
|
}
|
|
260
270
|
});
|
|
261
271
|
return function handleEditAmount(_x) {
|
|
262
|
-
return
|
|
272
|
+
return _ref3.apply(this, arguments);
|
|
263
273
|
};
|
|
264
274
|
}();
|
|
265
275
|
const createOriginalBalanceTitleDom = () => /* @__PURE__ */ React.createElement("div", { className: "pisell-card-amount-item-label" }, formatBalanceTitle ? formatBalanceTitle(balanceTitle, {
|
|
@@ -10,6 +10,7 @@ import "./index.less";
|
|
|
10
10
|
const Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
11
11
|
const { total, origin_total, symbol, tip, num, discount_reason, amountFormatter } = item;
|
|
12
12
|
const weighingInfo = resolveWeighingSnapshot(item);
|
|
13
|
+
const showOnlyTotal = isOnlyTotal || Boolean(weighingInfo);
|
|
13
14
|
const formatFooterAmount = (amount, precision = 2) => {
|
|
14
15
|
if (amountFormatter) return amountFormatter(amount, precision);
|
|
15
16
|
if (!weighingInfo) return _formatAmount(amount, symbol, precision);
|
|
@@ -27,9 +28,14 @@ const Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
27
28
|
* @Date: 2024-11-22 13:50
|
|
28
29
|
*/
|
|
29
30
|
const isDiscount = useMemo(() => {
|
|
31
|
+
if (weighingInfo) return origin_total != null && Number(total) !== Number(origin_total);
|
|
30
32
|
if (!origin_total) return false;
|
|
31
33
|
return Number(total) != Number(origin_total);
|
|
32
|
-
}, [
|
|
34
|
+
}, [
|
|
35
|
+
total,
|
|
36
|
+
origin_total,
|
|
37
|
+
weighingInfo
|
|
38
|
+
]);
|
|
33
39
|
const renderDiscountReason = () => {
|
|
34
40
|
if (isDiscount && discount_reason && type === "total") {
|
|
35
41
|
if (Array.isArray(discount_reason)) return /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}_discount-reason` }, discount_reason.map((reason, index) => {
|
|
@@ -42,13 +48,13 @@ const Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
42
48
|
}
|
|
43
49
|
return null;
|
|
44
50
|
};
|
|
45
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, !hideDivider ? /* @__PURE__ */ React.createElement(Divider, { style: { margin: 0 } }) : null, /* @__PURE__ */ React.createElement("div", { className: classNames(`${PREFIX}__product-footer`, hideDivider && `pisell-cart-sku-card__hide-divider-footer`,
|
|
51
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, !hideDivider ? /* @__PURE__ */ React.createElement(Divider, { style: { margin: 0 } }) : null, /* @__PURE__ */ React.createElement("div", { className: classNames(`${PREFIX}__product-footer`, hideDivider && `pisell-cart-sku-card__hide-divider-footer`, showOnlyTotal && `pisell-cart-sku-card__only-total-footer`) }, /* @__PURE__ */ React.createElement("div", { className: classNames(`${PREFIX}__footer-price-wrap`, weighingInfo && `pisell-cart-sku-card__footer-price-wrap--weighing`) }, !showOnlyTotal ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: classNames(`${PREFIX}__footer-price`) }, /* @__PURE__ */ React.createElement("span", null, formatFooterAmount(total)), tip ? /* @__PURE__ */ React.createElement(Tooltip, {
|
|
46
52
|
title: locales.getText(tip),
|
|
47
53
|
destroyTooltipOnHide: true
|
|
48
54
|
}, /* @__PURE__ */ React.createElement(QuestionCircleOutlined, { style: {
|
|
49
|
-
fontSize:
|
|
55
|
+
fontSize: "16px",
|
|
50
56
|
color: "#1570ef"
|
|
51
|
-
} })) : null),
|
|
57
|
+
} })) : null), /* @__PURE__ */ React.createElement("span", null, `×${num}`)) : null, /* @__PURE__ */ React.createElement("span", { className: `${PREFIX}__footer-total` }, isDiscount ? /* @__PURE__ */ React.createElement("span", { className: `${PREFIX}__footer-origin-total` }, formatFooterAmount(origin_total * num)) : null, /* @__PURE__ */ React.createElement("span", null, formatFooterAmount(total * num))))), renderDiscountReason());
|
|
52
58
|
};
|
|
53
59
|
//#endregion
|
|
54
60
|
export { Footer as default };
|
|
@@ -32,13 +32,11 @@
|
|
|
32
32
|
line-height: 1.3;
|
|
33
33
|
letter-spacing: -0.02em;
|
|
34
34
|
|
|
35
|
-
> .pisell-cart-sku-card__footer-price,
|
|
36
35
|
> span {
|
|
37
36
|
flex-shrink: 0;
|
|
38
37
|
white-space: nowrap;
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
.pisell-cart-sku-card__footer-price,
|
|
42
40
|
.pisell-cart-sku-card__footer-total,
|
|
43
41
|
.pisell-cart-sku-card__footer-origin-total,
|
|
44
42
|
.pisell-cart-sku-card__footer-discount {
|
|
@@ -46,10 +44,6 @@
|
|
|
46
44
|
line-height: inherit;
|
|
47
45
|
}
|
|
48
46
|
|
|
49
|
-
> .pisell-cart-sku-card__footer-price {
|
|
50
|
-
gap: 8px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
47
|
.pisell-cart-sku-card__footer-total {
|
|
54
48
|
display: flex;
|
|
55
49
|
flex-wrap: wrap;
|
package/es/index.js
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
import PisellContext, { globalConfig } from "./components/pisell-config-provider/context.js";
|
|
2
2
|
import PisellSingleLineText_default from "./components/pisellSingleLineText/PisellSingleLineText.js";
|
|
3
|
-
import "./components/pisellSingleLineText/index.js";
|
|
4
3
|
import PisellLongText_default from "./components/pisellLongText/PisellLongText.js";
|
|
5
|
-
import "./components/pisellLongText/index.js";
|
|
6
4
|
import MemoizedPisellNumber from "./components/pisellNumber/PisellNumber.js";
|
|
7
|
-
import "./components/pisellNumber/index.js";
|
|
8
5
|
import MemoizedPisellCurrency from "./components/pisellCurrency/PisellCurrency.js";
|
|
9
|
-
import "./components/pisellCurrency/index.js";
|
|
10
6
|
import MemoizedPisellPercent from "./components/pisellPercent/PisellPercent.js";
|
|
11
|
-
import "./components/pisellPercent/index.js";
|
|
12
7
|
import PisellPhone_default from "./components/pisellPhone/PisellPhone.js";
|
|
13
|
-
import "./components/pisellPhone/index.js";
|
|
14
8
|
import PisellEmail_default from "./components/pisellEmail/PisellEmail.js";
|
|
15
|
-
import "./components/pisellEmail/index.js";
|
|
16
9
|
import PisellUrl_default from "./components/pisellUrl/PisellUrl.js";
|
|
17
|
-
import "./components/pisellUrl/index.js";
|
|
18
10
|
import PisellRating_default from "./components/pisellRating/PisellRating.js";
|
|
19
|
-
import "./components/pisellRating/index.js";
|
|
20
11
|
import PisellSingleSelect from "./components/pisellSingleSelect/PisellSingleSelect.js";
|
|
21
|
-
import "./components/pisellSingleSelect/index.js";
|
|
22
12
|
import PisellMultipleSelect from "./components/pisellMultipleSelect/PisellMultipleSelect.js";
|
|
23
|
-
import "./components/pisellMultipleSelect/index.js";
|
|
24
13
|
import PisellFields from "./components/PisellFields/index.js";
|
|
25
14
|
import PisellCard from "./components/pisellCard/index.js";
|
|
26
15
|
import PisellMetricCard from "./components/pisellMetricCard/PisellMetricCard.js";
|