@pisell/materials 6.11.271 → 6.11.272
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 +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/PisellFields/index.js +0 -11
- package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +0 -2
- package/es/components/filter/components/FilterItem/index.js +0 -11
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +0 -2
- package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +0 -11
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +5 -2
- package/es/components/productCard/cartSkuCard/components/holders/index.js +25 -8
- package/es/components/productCard/cartSkuCard/index.js +11 -4
- package/es/components/productCard/lineItem/index.js +7 -0
- package/es/index.js +0 -11
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +5 -2
- package/lib/components/productCard/cartSkuCard/components/holders/index.js +25 -8
- package/lib/components/productCard/cartSkuCard/index.js +43 -36
- package/lib/components/productCard/lineItem/index.js +7 -0
- package/package.json +1 -1
- 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,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,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
|
|
@@ -9,7 +9,7 @@ import classNames from "classnames";
|
|
|
9
9
|
import "./index.less";
|
|
10
10
|
//#region src/components/productCard/cartSkuCard/components/basicInfo/index.tsx
|
|
11
11
|
const BasicInfo = (props) => {
|
|
12
|
-
const { isShowImage, isShowQuantityBadge = true, dataSource = {}, style, isMainProduct, type, maxSpecsCount = 1, isBundle, showFooter, isShowOriginalPrice = false, isShowEditProduct = false, onEditProduct, disabledEditClick = false } = props;
|
|
12
|
+
const { isShowImage, isShowQuantityBadge = true, dataSource = {}, style, isMainProduct, type, maxSpecsCount = 1, isBundle, showFooter, isShowOriginalPrice = false, isShowEditProduct = false, onEditProduct, onChangeHolder, disabledEditClick = false } = props;
|
|
13
13
|
const { image: image$1, bundle, options, product_option_string, name, price, symbol, total = 0, origin_total = 0, num = 1, holder_id, isFormSubject, totalDifference = 0, amountFormatter } = dataSource;
|
|
14
14
|
const formatProductAmount = (value, precision = 2) => amountFormatter ? amountFormatter(value, precision) : formatAmount(value, precision, symbol);
|
|
15
15
|
const renderNumTag = () => {
|
|
@@ -73,7 +73,10 @@ const BasicInfo = (props) => {
|
|
|
73
73
|
if (type === "a5") return /* @__PURE__ */ React.createElement("div", {
|
|
74
74
|
className: basicInfoClassName,
|
|
75
75
|
style: style || {}
|
|
76
|
-
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image$1 && !name ? /* @__PURE__ */ React.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ React.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ React.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ React.createElement("div", { className: `product-name ${renderEdit ? "product-name-edit" : ""}` }, name), renderProductMeta(), (!holder_id || !(holder_id === null || holder_id === void 0 ? void 0 : holder_id.length)) && !isFormSubject ? /* @__PURE__ */ React.createElement("div", { className: `product-price` }, renderProductPrice()) : /* @__PURE__ */ React.createElement(Holders, {
|
|
76
|
+
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image$1 && !name ? /* @__PURE__ */ React.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ React.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ React.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ React.createElement("div", { className: `product-name ${renderEdit ? "product-name-edit" : ""}` }, name), renderProductMeta(), (!holder_id || !(holder_id === null || holder_id === void 0 ? void 0 : holder_id.length)) && !isFormSubject ? /* @__PURE__ */ React.createElement("div", { className: `product-price` }, renderProductPrice()) : /* @__PURE__ */ React.createElement(Holders, {
|
|
77
|
+
dataSource,
|
|
78
|
+
onChangeHolder: onChangeHolder ? () => onChangeHolder(dataSource) : void 0
|
|
79
|
+
})), renderEdit));
|
|
77
80
|
if (type === "a9") {
|
|
78
81
|
isBundle && !showFooter && Number(price !== null && price !== void 0 ? price : 0) * num;
|
|
79
82
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -10,15 +10,33 @@ const holderIconMap = {
|
|
|
10
10
|
"waiver": "pisell2-file-lock-03"
|
|
11
11
|
};
|
|
12
12
|
const Holders = (props) => {
|
|
13
|
-
const { dataSource = {} } = props;
|
|
14
|
-
const { holders, holder_id } = dataSource;
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const { dataSource = {}, onChangeHolder } = props;
|
|
14
|
+
const { holders, holder_id, holderName, showUnassignedHolder } = dataSource;
|
|
15
|
+
const holderIds = Array.isArray(holder_id) ? holder_id : holder_id === void 0 || holder_id === null || holder_id === "" ? [] : [holder_id];
|
|
16
|
+
const missingCount = Math.max((Number(dataSource.holderMaxCount) || 1) - holderIds.length, 0);
|
|
17
|
+
const wrapContent = (content) => onChangeHolder ? /* @__PURE__ */ React.createElement("div", {
|
|
18
|
+
role: "button",
|
|
19
|
+
tabIndex: 0,
|
|
20
|
+
onClick: (event) => {
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
event.stopPropagation();
|
|
23
|
+
onChangeHolder();
|
|
24
|
+
},
|
|
25
|
+
onKeyDown: (event) => {
|
|
26
|
+
if (!["Enter", " "].includes(event.key)) return;
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
event.stopPropagation();
|
|
29
|
+
onChangeHolder();
|
|
30
|
+
}
|
|
31
|
+
}, content) : content;
|
|
32
|
+
const unassigned = /* @__PURE__ */ React.createElement("div", { className: "holder-item unassigned" }, dataSource.holderMaxCount > 1 ? /* @__PURE__ */ React.createElement("span", null, missingCount, "/", dataSource.holderMaxCount, " ") : null, /* @__PURE__ */ React.createElement("span", { className: "holder-label" }, locales.getText("pisell2.cart.sku-card.unassigned")));
|
|
33
|
+
if (!holderIds.length) {
|
|
34
|
+
if (dataSource.isFormSubject) return wrapContent(unassigned);
|
|
17
35
|
return null;
|
|
18
36
|
}
|
|
19
37
|
const renderHolder = (id) => {
|
|
20
38
|
if (!id) return null;
|
|
21
|
-
const holder = (holders || []).find((item) => item.id === id);
|
|
39
|
+
const holder = (holders || []).find((item) => String(item.id) === String(id));
|
|
22
40
|
return /* @__PURE__ */ React.createElement("div", {
|
|
23
41
|
className: "holder-item",
|
|
24
42
|
key: id
|
|
@@ -27,9 +45,8 @@ const Holders = (props) => {
|
|
|
27
45
|
type: holderIconMap[(dataSource === null || dataSource === void 0 ? void 0 : dataSource.holderType) || "minors"]
|
|
28
46
|
}), /* @__PURE__ */ React.createElement("span", { className: "holder-label" }, (holder === null || holder === void 0 ? void 0 : holder.label) || id));
|
|
29
47
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}) : renderHolder(holder_id));
|
|
48
|
+
const useSnapshot = holderName && holderIds.some((id) => !(holders || []).some((item) => String(item.id) === String(id) && item.label));
|
|
49
|
+
return wrapContent(/* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__holders` }, useSnapshot ? /* @__PURE__ */ React.createElement("div", { className: "holder-item" }, /* @__PURE__ */ React.createElement("span", { className: "holder-label" }, holderName)) : holderIds.map(renderHolder), showUnassignedHolder && missingCount > 0 ? unassigned : null));
|
|
33
50
|
};
|
|
34
51
|
//#endregion
|
|
35
52
|
export { Holders as default };
|
|
@@ -5,6 +5,7 @@ import useEngineContext from "../../../hooks/useEngineContext.js";
|
|
|
5
5
|
import Action from "../components/Action/index.js";
|
|
6
6
|
import { defaultValue } from "../status.js";
|
|
7
7
|
import locales_default from "./locales.js";
|
|
8
|
+
import Holders from "./components/holders/index.js";
|
|
8
9
|
import BasicInfo from "./components/basicInfo/index.js";
|
|
9
10
|
import DiscountReason from "./components/discountReason/index.js";
|
|
10
11
|
import TimeRange from "./components/timeRange/index.js";
|
|
@@ -132,6 +133,10 @@ const CartSkuCard = (props) => {
|
|
|
132
133
|
if (rightActionsDisplay !== "inline") return basicInfo;
|
|
133
134
|
return /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__main-row` }, /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__main-content` }, basicInfo), /* @__PURE__ */ React.createElement(InlineActions, { actions: _rightActions }));
|
|
134
135
|
};
|
|
136
|
+
const productHolders = props.isShowHolder === true && dataSource.showUnassignedHolder !== void 0 ? /* @__PURE__ */ React.createElement(Holders, {
|
|
137
|
+
dataSource,
|
|
138
|
+
onChangeHolder: onChangeHolder ? () => onChangeHolder(dataSource) : void 0
|
|
139
|
+
}) : null;
|
|
135
140
|
const renderA2 = () => {
|
|
136
141
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, renderMainProduct(/* @__PURE__ */ React.createElement(BasicInfo, {
|
|
137
142
|
isShowImage,
|
|
@@ -139,7 +144,7 @@ const CartSkuCard = (props) => {
|
|
|
139
144
|
dataSource,
|
|
140
145
|
isMainProduct: true,
|
|
141
146
|
maxSpecsCount
|
|
142
|
-
})), /* @__PURE__ */ React.createElement(DiscountReason, { dataSource }), renderPromotion, isShowNote ? /* @__PURE__ */ React.createElement(Note, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
147
|
+
})), /* @__PURE__ */ React.createElement(DiscountReason, { dataSource }), renderPromotion, productHolders, isShowNote ? /* @__PURE__ */ React.createElement(Note, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
143
148
|
item: dataSource,
|
|
144
149
|
disabledEdit: disabledNoteEdit !== null && disabledNoteEdit !== void 0 ? disabledNoteEdit : other.disabledEdit,
|
|
145
150
|
openNote: openNoteEditor
|
|
@@ -163,7 +168,8 @@ const CartSkuCard = (props) => {
|
|
|
163
168
|
isShowOriginalPrice,
|
|
164
169
|
isShowEditProduct,
|
|
165
170
|
disabledEditClick,
|
|
166
|
-
onEditProduct
|
|
171
|
+
onEditProduct,
|
|
172
|
+
onChangeHolder: productHolders ? onChangeHolder : void 0
|
|
167
173
|
})), itemType !== "booking" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(TimeRange, { dataSource }), /* @__PURE__ */ React.createElement(Resources, { dataSource })) : null, /* @__PURE__ */ React.createElement(Packages, {
|
|
168
174
|
dataSource,
|
|
169
175
|
isShowImage,
|
|
@@ -216,7 +222,7 @@ const CartSkuCard = (props) => {
|
|
|
216
222
|
item: dataSource,
|
|
217
223
|
hideDivider,
|
|
218
224
|
type: "total"
|
|
219
|
-
}) : null, /* @__PURE__ */ React.createElement(DiscountReason, { dataSource }), renderPromotion, isShowNote ? /* @__PURE__ */ React.createElement(Note, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
225
|
+
}) : null, /* @__PURE__ */ React.createElement(DiscountReason, { dataSource }), renderPromotion, productHolders, isShowNote ? /* @__PURE__ */ React.createElement(Note, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
220
226
|
item: dataSource,
|
|
221
227
|
disabledEdit: disabledNoteEdit !== null && disabledNoteEdit !== void 0 ? disabledNoteEdit : other.disabledEdit,
|
|
222
228
|
openNote: openNoteEditor
|
|
@@ -229,7 +235,8 @@ const CartSkuCard = (props) => {
|
|
|
229
235
|
disabledEdit: disabledNoteEdit !== null && disabledNoteEdit !== void 0 ? disabledNoteEdit : other.disabledEdit,
|
|
230
236
|
openNote: openNoteEditor
|
|
231
237
|
})) : null;
|
|
232
|
-
const
|
|
238
|
+
const contentFooter = note || productHolders ? () => /* @__PURE__ */ React.createElement(React.Fragment, null, productHolders, note) : void 0;
|
|
239
|
+
const slots = contentFooter ? _objectSpread2(_objectSpread2({}, a12Slots), {}, { contentFooter: (_a12Slots$contentFoot = a12Slots === null || a12Slots === void 0 ? void 0 : a12Slots.contentFooter) !== null && _a12Slots$contentFoot !== void 0 ? _a12Slots$contentFoot : contentFooter }) : a12Slots;
|
|
233
240
|
return /* @__PURE__ */ React.createElement(A12, {
|
|
234
241
|
dataSource,
|
|
235
242
|
isShowImage,
|
|
@@ -179,6 +179,13 @@ const convertProductToLineItemProduct = (product, translationOriginal, symbol, a
|
|
|
179
179
|
symbol,
|
|
180
180
|
amountFormatter,
|
|
181
181
|
note: product.note,
|
|
182
|
+
holder_id: product.holder_id,
|
|
183
|
+
holders: product.holders,
|
|
184
|
+
holderName: product.holderName,
|
|
185
|
+
holderType: product.holderType,
|
|
186
|
+
holderMaxCount: product.holderMaxCount,
|
|
187
|
+
isFormSubject: product.isFormSubject,
|
|
188
|
+
showUnassignedHolder: product.showUnassignedHolder,
|
|
182
189
|
product_sku: product.product_sku,
|
|
183
190
|
product_bundle: bundle,
|
|
184
191
|
bundle,
|
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";
|
|
@@ -12,7 +12,7 @@ classnames = require_runtime.__toESM(classnames);
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
//#region src/components/productCard/cartSkuCard/components/basicInfo/index.tsx
|
|
14
14
|
const BasicInfo = (props) => {
|
|
15
|
-
const { isShowImage, isShowQuantityBadge = true, dataSource = {}, style, isMainProduct, type, maxSpecsCount = 1, isBundle, showFooter, isShowOriginalPrice = false, isShowEditProduct = false, onEditProduct, disabledEditClick = false } = props;
|
|
15
|
+
const { isShowImage, isShowQuantityBadge = true, dataSource = {}, style, isMainProduct, type, maxSpecsCount = 1, isBundle, showFooter, isShowOriginalPrice = false, isShowEditProduct = false, onEditProduct, onChangeHolder, disabledEditClick = false } = props;
|
|
16
16
|
const { image, bundle, options, product_option_string, name, price, symbol, total = 0, origin_total = 0, num = 1, holder_id, isFormSubject, totalDifference = 0, amountFormatter } = dataSource;
|
|
17
17
|
const formatProductAmount = (value, precision = 2) => amountFormatter ? amountFormatter(value, precision) : (0, _pisell_utils.formatAmount)(value, precision, symbol);
|
|
18
18
|
const renderNumTag = () => {
|
|
@@ -76,7 +76,10 @@ const BasicInfo = (props) => {
|
|
|
76
76
|
if (type === "a5") return /* @__PURE__ */ react.default.createElement("div", {
|
|
77
77
|
className: basicInfoClassName,
|
|
78
78
|
style: style || {}
|
|
79
|
-
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ react.default.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-name ${renderEdit ? "product-name-edit" : ""}` }, name), renderProductMeta(), (!holder_id || !(holder_id === null || holder_id === void 0 ? void 0 : holder_id.length)) && !isFormSubject ? /* @__PURE__ */ react.default.createElement("div", { className: `product-price` }, renderProductPrice()) : /* @__PURE__ */ react.default.createElement(require_index$2.default, {
|
|
79
|
+
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ react.default.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-name ${renderEdit ? "product-name-edit" : ""}` }, name), renderProductMeta(), (!holder_id || !(holder_id === null || holder_id === void 0 ? void 0 : holder_id.length)) && !isFormSubject ? /* @__PURE__ */ react.default.createElement("div", { className: `product-price` }, renderProductPrice()) : /* @__PURE__ */ react.default.createElement(require_index$2.default, {
|
|
80
|
+
dataSource,
|
|
81
|
+
onChangeHolder: onChangeHolder ? () => onChangeHolder(dataSource) : void 0
|
|
82
|
+
})), renderEdit));
|
|
80
83
|
if (type === "a9") {
|
|
81
84
|
isBundle && !showFooter && Number(price !== null && price !== void 0 ? price : 0) * num;
|
|
82
85
|
return /* @__PURE__ */ react.default.createElement("div", {
|
|
@@ -12,15 +12,33 @@ const holderIconMap = {
|
|
|
12
12
|
"waiver": "pisell2-file-lock-03"
|
|
13
13
|
};
|
|
14
14
|
const Holders = (props) => {
|
|
15
|
-
const { dataSource = {} } = props;
|
|
16
|
-
const { holders, holder_id } = dataSource;
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const { dataSource = {}, onChangeHolder } = props;
|
|
16
|
+
const { holders, holder_id, holderName, showUnassignedHolder } = dataSource;
|
|
17
|
+
const holderIds = Array.isArray(holder_id) ? holder_id : holder_id === void 0 || holder_id === null || holder_id === "" ? [] : [holder_id];
|
|
18
|
+
const missingCount = Math.max((Number(dataSource.holderMaxCount) || 1) - holderIds.length, 0);
|
|
19
|
+
const wrapContent = (content) => onChangeHolder ? /* @__PURE__ */ react.default.createElement("div", {
|
|
20
|
+
role: "button",
|
|
21
|
+
tabIndex: 0,
|
|
22
|
+
onClick: (event) => {
|
|
23
|
+
event.preventDefault();
|
|
24
|
+
event.stopPropagation();
|
|
25
|
+
onChangeHolder();
|
|
26
|
+
},
|
|
27
|
+
onKeyDown: (event) => {
|
|
28
|
+
if (!["Enter", " "].includes(event.key)) return;
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
event.stopPropagation();
|
|
31
|
+
onChangeHolder();
|
|
32
|
+
}
|
|
33
|
+
}, content) : content;
|
|
34
|
+
const unassigned = /* @__PURE__ */ react.default.createElement("div", { className: "holder-item unassigned" }, dataSource.holderMaxCount > 1 ? /* @__PURE__ */ react.default.createElement("span", null, missingCount, "/", dataSource.holderMaxCount, " ") : null, /* @__PURE__ */ react.default.createElement("span", { className: "holder-label" }, _pisell_utils.locales.getText("pisell2.cart.sku-card.unassigned")));
|
|
35
|
+
if (!holderIds.length) {
|
|
36
|
+
if (dataSource.isFormSubject) return wrapContent(unassigned);
|
|
19
37
|
return null;
|
|
20
38
|
}
|
|
21
39
|
const renderHolder = (id) => {
|
|
22
40
|
if (!id) return null;
|
|
23
|
-
const holder = (holders || []).find((item) => item.id === id);
|
|
41
|
+
const holder = (holders || []).find((item) => String(item.id) === String(id));
|
|
24
42
|
return /* @__PURE__ */ react.default.createElement("div", {
|
|
25
43
|
className: "holder-item",
|
|
26
44
|
key: id
|
|
@@ -29,9 +47,8 @@ const Holders = (props) => {
|
|
|
29
47
|
type: holderIconMap[(dataSource === null || dataSource === void 0 ? void 0 : dataSource.holderType) || "minors"]
|
|
30
48
|
}), /* @__PURE__ */ react.default.createElement("span", { className: "holder-label" }, (holder === null || holder === void 0 ? void 0 : holder.label) || id));
|
|
31
49
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}) : renderHolder(holder_id));
|
|
50
|
+
const useSnapshot = holderName && holderIds.some((id) => !(holders || []).some((item) => String(item.id) === String(id) && item.label));
|
|
51
|
+
return wrapContent(/* @__PURE__ */ react.default.createElement("div", { className: `${require_index$1.PREFIX}__holders` }, useSnapshot ? /* @__PURE__ */ react.default.createElement("div", { className: "holder-item" }, /* @__PURE__ */ react.default.createElement("span", { className: "holder-label" }, holderName)) : holderIds.map(renderHolder), showUnassignedHolder && missingCount > 0 ? unassigned : null));
|
|
35
52
|
};
|
|
36
53
|
//#endregion
|
|
37
54
|
exports.default = Holders;
|
|
@@ -6,21 +6,22 @@ const require_useEngineContext = require("../../../hooks/useEngineContext.js");
|
|
|
6
6
|
const require_index$1 = require("../components/Action/index.js");
|
|
7
7
|
const require_status = require("../status.js");
|
|
8
8
|
const require_locales = require("./locales.js");
|
|
9
|
-
const require_index$2 = require("./components/
|
|
10
|
-
const require_index$3 = require("./components/
|
|
11
|
-
const require_index$4 = require("./components/
|
|
12
|
-
const require_index$5 = require("./components/
|
|
13
|
-
const require_index$6 = require("./components/
|
|
14
|
-
const require_index$7 = require("./components/
|
|
15
|
-
const require_index$8 = require("./components/
|
|
16
|
-
const require_index$9 = require("./components/
|
|
17
|
-
const require_index$10 = require("./components/
|
|
18
|
-
const require_index$11 = require("./components/
|
|
19
|
-
const require_index$12 = require("./components/
|
|
20
|
-
const require_index$13 = require("./components/
|
|
21
|
-
const require_index$14 = require("./components/
|
|
22
|
-
const require_index$15 = require("./components/
|
|
23
|
-
const require_index$16 = require("./
|
|
9
|
+
const require_index$2 = require("./components/holders/index.js");
|
|
10
|
+
const require_index$3 = require("./components/basicInfo/index.js");
|
|
11
|
+
const require_index$4 = require("./components/discountReason/index.js");
|
|
12
|
+
const require_index$5 = require("./components/timeRange/index.js");
|
|
13
|
+
const require_index$6 = require("./components/resources/index.js");
|
|
14
|
+
const require_index$7 = require("./components/packages/index.js");
|
|
15
|
+
const require_index$8 = require("./components/sales/index.js");
|
|
16
|
+
const require_index$9 = require("./components/swipeAction/index.js");
|
|
17
|
+
const require_index$10 = require("./components/Note/index.js");
|
|
18
|
+
const require_index$11 = require("./components/AmountFooter/index.js");
|
|
19
|
+
const require_index$12 = require("./components/MultiDay/index.js");
|
|
20
|
+
const require_index$13 = require("./components/Promotion/index.js");
|
|
21
|
+
const require_index$14 = require("./components/Gift/index.js");
|
|
22
|
+
const require_index$15 = require("./components/BookingItem/index.js");
|
|
23
|
+
const require_index$16 = require("./components/inlineActions/index.js");
|
|
24
|
+
const require_index$17 = require("./variants/A12/index.js");
|
|
24
25
|
let react = require("react");
|
|
25
26
|
react = require_runtime.__toESM(react);
|
|
26
27
|
let _pisell_utils = require("@pisell/utils");
|
|
@@ -126,23 +127,27 @@ const CartSkuCard = (props) => {
|
|
|
126
127
|
*/
|
|
127
128
|
const renderPromotion = (0, react.useMemo)(() => {
|
|
128
129
|
var _dataSource$promotion;
|
|
129
|
-
return (dataSource === null || dataSource === void 0 || (_dataSource$promotion = dataSource.promotions) === null || _dataSource$promotion === void 0 ? void 0 : _dataSource$promotion.length) ? /* @__PURE__ */ react.default.createElement(require_index$
|
|
130
|
+
return (dataSource === null || dataSource === void 0 || (_dataSource$promotion = dataSource.promotions) === null || _dataSource$promotion === void 0 ? void 0 : _dataSource$promotion.length) ? /* @__PURE__ */ react.default.createElement(require_index$13.default, {
|
|
130
131
|
promotions: dataSource === null || dataSource === void 0 ? void 0 : dataSource.promotions,
|
|
131
132
|
onClick: (item) => onPromotion === null || onPromotion === void 0 ? void 0 : onPromotion(item)
|
|
132
133
|
}) : null;
|
|
133
134
|
}, [dataSource === null || dataSource === void 0 ? void 0 : dataSource.promotions, dataSource === null || dataSource === void 0 ? void 0 : dataSource.num]);
|
|
134
135
|
const renderMainProduct = (basicInfo) => {
|
|
135
136
|
if (rightActionsDisplay !== "inline") return basicInfo;
|
|
136
|
-
return /* @__PURE__ */ react.default.createElement("div", { className: `${PREFIX}__main-row` }, /* @__PURE__ */ react.default.createElement("div", { className: `${PREFIX}__main-content` }, basicInfo), /* @__PURE__ */ react.default.createElement(require_index$
|
|
137
|
+
return /* @__PURE__ */ react.default.createElement("div", { className: `${PREFIX}__main-row` }, /* @__PURE__ */ react.default.createElement("div", { className: `${PREFIX}__main-content` }, basicInfo), /* @__PURE__ */ react.default.createElement(require_index$16.default, { actions: _rightActions }));
|
|
137
138
|
};
|
|
139
|
+
const productHolders = props.isShowHolder === true && dataSource.showUnassignedHolder !== void 0 ? /* @__PURE__ */ react.default.createElement(require_index$2.default, {
|
|
140
|
+
dataSource,
|
|
141
|
+
onChangeHolder: onChangeHolder ? () => onChangeHolder(dataSource) : void 0
|
|
142
|
+
}) : null;
|
|
138
143
|
const renderA2 = () => {
|
|
139
|
-
return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, renderMainProduct(/* @__PURE__ */ react.default.createElement(require_index$
|
|
144
|
+
return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, renderMainProduct(/* @__PURE__ */ react.default.createElement(require_index$3.default, {
|
|
140
145
|
isShowImage,
|
|
141
146
|
isShowQuantityBadge,
|
|
142
147
|
dataSource,
|
|
143
148
|
isMainProduct: true,
|
|
144
149
|
maxSpecsCount
|
|
145
|
-
})), /* @__PURE__ */ react.default.createElement(require_index$
|
|
150
|
+
})), /* @__PURE__ */ react.default.createElement(require_index$4.default, { dataSource }), renderPromotion, productHolders, isShowNote ? /* @__PURE__ */ react.default.createElement(require_index$10.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, other), {}, {
|
|
146
151
|
item: dataSource,
|
|
147
152
|
disabledEdit: disabledNoteEdit !== null && disabledNoteEdit !== void 0 ? disabledNoteEdit : other.disabledEdit,
|
|
148
153
|
openNote: openNoteEditor
|
|
@@ -157,7 +162,7 @@ const CartSkuCard = (props) => {
|
|
|
157
162
|
e.stopPropagation();
|
|
158
163
|
onDelete === null || onDelete === void 0 || onDelete(dataSource);
|
|
159
164
|
}
|
|
160
|
-
}, /* @__PURE__ */ react.default.createElement(require_index.default, { type: "pisell2-trash-01" })) : null, renderMainProduct(/* @__PURE__ */ react.default.createElement(require_index$
|
|
165
|
+
}, /* @__PURE__ */ react.default.createElement(require_index.default, { type: "pisell2-trash-01" })) : null, renderMainProduct(/* @__PURE__ */ react.default.createElement(require_index$3.default, {
|
|
161
166
|
isShowImage,
|
|
162
167
|
isShowQuantityBadge,
|
|
163
168
|
dataSource,
|
|
@@ -166,24 +171,25 @@ const CartSkuCard = (props) => {
|
|
|
166
171
|
isShowOriginalPrice,
|
|
167
172
|
isShowEditProduct,
|
|
168
173
|
disabledEditClick,
|
|
169
|
-
onEditProduct
|
|
170
|
-
|
|
174
|
+
onEditProduct,
|
|
175
|
+
onChangeHolder: productHolders ? onChangeHolder : void 0
|
|
176
|
+
})), itemType !== "booking" ? /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement(require_index$5.default, { dataSource }), /* @__PURE__ */ react.default.createElement(require_index$6.default, { dataSource })) : null, /* @__PURE__ */ react.default.createElement(require_index$7.default, {
|
|
171
177
|
dataSource,
|
|
172
178
|
isShowImage,
|
|
173
179
|
isShowQuantityBadge
|
|
174
|
-
}), /* @__PURE__ */ react.default.createElement(require_index$
|
|
180
|
+
}), /* @__PURE__ */ react.default.createElement(require_index$8.default, {
|
|
175
181
|
dataSource,
|
|
176
182
|
hideDivider: !!(dataSource === null || dataSource === void 0 || (_dataSource$bundle = dataSource.bundle) === null || _dataSource$bundle === void 0 ? void 0 : _dataSource$bundle.length),
|
|
177
183
|
isShowImage,
|
|
178
184
|
isShowQuantityBadge
|
|
179
|
-
}), ((_dataSource$items = dataSource.items) === null || _dataSource$items === void 0 ? void 0 : _dataSource$items.length) ? /* @__PURE__ */ react.default.createElement(require_index$
|
|
185
|
+
}), ((_dataSource$items = dataSource.items) === null || _dataSource$items === void 0 ? void 0 : _dataSource$items.length) ? /* @__PURE__ */ react.default.createElement(require_index$12.default, {
|
|
180
186
|
dataSource,
|
|
181
187
|
hideDivider
|
|
182
|
-
}) : isShowAmountFooter ? /* @__PURE__ */ react.default.createElement(require_index$
|
|
188
|
+
}) : isShowAmountFooter ? /* @__PURE__ */ react.default.createElement(require_index$11.default, {
|
|
183
189
|
item: dataSource,
|
|
184
190
|
hideDivider,
|
|
185
191
|
type: "total"
|
|
186
|
-
}) : null, renderPromotion, isShowNote ? /* @__PURE__ */ react.default.createElement(require_index$
|
|
192
|
+
}) : null, renderPromotion, isShowNote ? /* @__PURE__ */ react.default.createElement(require_index$10.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, other), {}, {
|
|
187
193
|
item: dataSource,
|
|
188
194
|
disabledEdit: disabledNoteEdit !== null && disabledNoteEdit !== void 0 ? disabledNoteEdit : other.disabledEdit,
|
|
189
195
|
openNote: openNoteEditor
|
|
@@ -200,7 +206,7 @@ const CartSkuCard = (props) => {
|
|
|
200
206
|
e.stopPropagation();
|
|
201
207
|
onDelete === null || onDelete === void 0 || onDelete(dataSource);
|
|
202
208
|
}
|
|
203
|
-
}, /* @__PURE__ */ react.default.createElement(require_index.default, { type: "pisell2-trash-01" })) : null, renderMainProduct(/* @__PURE__ */ react.default.createElement(require_index$
|
|
209
|
+
}, /* @__PURE__ */ react.default.createElement(require_index.default, { type: "pisell2-trash-01" })) : null, renderMainProduct(/* @__PURE__ */ react.default.createElement(require_index$3.default, {
|
|
204
210
|
isShowImage,
|
|
205
211
|
isShowQuantityBadge,
|
|
206
212
|
dataSource,
|
|
@@ -210,16 +216,16 @@ const CartSkuCard = (props) => {
|
|
|
210
216
|
isShowEditProduct,
|
|
211
217
|
disabledEditClick,
|
|
212
218
|
onEditProduct
|
|
213
|
-
})), /* @__PURE__ */ react.default.createElement(require_index$
|
|
219
|
+
})), /* @__PURE__ */ react.default.createElement(require_index$7.default, {
|
|
214
220
|
dataSource,
|
|
215
221
|
isShowImage,
|
|
216
222
|
isShowQuantityBadge,
|
|
217
223
|
type
|
|
218
|
-
}), isShowAmountFooter ? /* @__PURE__ */ react.default.createElement(require_index$
|
|
224
|
+
}), isShowAmountFooter ? /* @__PURE__ */ react.default.createElement(require_index$11.default, {
|
|
219
225
|
item: dataSource,
|
|
220
226
|
hideDivider,
|
|
221
227
|
type: "total"
|
|
222
|
-
}) : null, /* @__PURE__ */ react.default.createElement(require_index$
|
|
228
|
+
}) : null, /* @__PURE__ */ react.default.createElement(require_index$4.default, { dataSource }), renderPromotion, productHolders, isShowNote ? /* @__PURE__ */ react.default.createElement(require_index$10.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, other), {}, {
|
|
223
229
|
item: dataSource,
|
|
224
230
|
disabledEdit: disabledNoteEdit !== null && disabledNoteEdit !== void 0 ? disabledNoteEdit : other.disabledEdit,
|
|
225
231
|
openNote: openNoteEditor
|
|
@@ -227,13 +233,14 @@ const CartSkuCard = (props) => {
|
|
|
227
233
|
};
|
|
228
234
|
const renderA12 = () => {
|
|
229
235
|
var _a12Slots$contentFoot;
|
|
230
|
-
const note = isShowNote ? /* @__PURE__ */ react.default.createElement(require_index$
|
|
236
|
+
const note = isShowNote ? /* @__PURE__ */ react.default.createElement(require_index$10.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, other), {}, {
|
|
231
237
|
item: dataSource,
|
|
232
238
|
disabledEdit: disabledNoteEdit !== null && disabledNoteEdit !== void 0 ? disabledNoteEdit : other.disabledEdit,
|
|
233
239
|
openNote: openNoteEditor
|
|
234
240
|
})) : null;
|
|
235
|
-
const
|
|
236
|
-
|
|
241
|
+
const contentFooter = note || productHolders ? () => /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, productHolders, note) : void 0;
|
|
242
|
+
const slots = contentFooter ? require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, a12Slots), {}, { contentFooter: (_a12Slots$contentFoot = a12Slots === null || a12Slots === void 0 ? void 0 : a12Slots.contentFooter) !== null && _a12Slots$contentFoot !== void 0 ? _a12Slots$contentFoot : contentFooter }) : a12Slots;
|
|
243
|
+
return /* @__PURE__ */ react.default.createElement(require_index$17.default, {
|
|
237
244
|
dataSource,
|
|
238
245
|
isShowImage,
|
|
239
246
|
isShowDelete,
|
|
@@ -264,7 +271,7 @@ const CartSkuCard = (props) => {
|
|
|
264
271
|
e.stopPropagation();
|
|
265
272
|
onCard === null || onCard === void 0 || onCard(dataSource);
|
|
266
273
|
}
|
|
267
|
-
}, itemType === "booking" ? /* @__PURE__ */ react.default.createElement(require_index$
|
|
274
|
+
}, itemType === "booking" ? /* @__PURE__ */ react.default.createElement(require_index$15.default, {
|
|
268
275
|
dataSource,
|
|
269
276
|
isShowRelatedProduct,
|
|
270
277
|
isShowDelete
|
|
@@ -272,12 +279,12 @@ const CartSkuCard = (props) => {
|
|
|
272
279
|
return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)(`${PREFIX}-wrapper-container`, {
|
|
273
280
|
[`${PREFIX}-wrapper-container--inline`]: useIntegratedWrapper,
|
|
274
281
|
[`${PREFIX}-wrapper-container--a12`]: type === "a12"
|
|
275
|
-
}) }, useIntegratedWrapper ? /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)(`${PREFIX}-wrapper`, `${PREFIX}-wrapper--inline`, type === "a12" && `pisell-cart-sku-card-wrapper--a12`) }, cardContent) : /* @__PURE__ */ react.default.createElement(require_index$
|
|
282
|
+
}) }, useIntegratedWrapper ? /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)(`${PREFIX}-wrapper`, `${PREFIX}-wrapper--inline`, type === "a12" && `pisell-cart-sku-card-wrapper--a12`) }, cardContent) : /* @__PURE__ */ react.default.createElement(require_index$9.SwipeAction, {
|
|
276
283
|
closeOnAction: false,
|
|
277
284
|
className: (0, classnames.default)(`${PREFIX}-wrapper`),
|
|
278
285
|
rightActions: _rightActions,
|
|
279
286
|
escapeDom
|
|
280
|
-
}, cardContent), /* @__PURE__ */ react.default.createElement(require_index$
|
|
287
|
+
}, cardContent), /* @__PURE__ */ react.default.createElement(require_index$14.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, (dataSource === null || dataSource === void 0 ? void 0 : dataSource.giftData) || {}), {}, { onClick: () => onGift === null || onGift === void 0 ? void 0 : onGift(dataSource) })));
|
|
281
288
|
};
|
|
282
289
|
//#endregion
|
|
283
290
|
exports.PREFIX = PREFIX;
|
|
@@ -181,6 +181,13 @@ const convertProductToLineItemProduct = (product, translationOriginal, symbol, a
|
|
|
181
181
|
symbol,
|
|
182
182
|
amountFormatter,
|
|
183
183
|
note: product.note,
|
|
184
|
+
holder_id: product.holder_id,
|
|
185
|
+
holders: product.holders,
|
|
186
|
+
holderName: product.holderName,
|
|
187
|
+
holderType: product.holderType,
|
|
188
|
+
holderMaxCount: product.holderMaxCount,
|
|
189
|
+
isFormSubject: product.isFormSubject,
|
|
190
|
+
showUnassignedHolder: product.showUnassignedHolder,
|
|
184
191
|
product_sku: product.product_sku,
|
|
185
192
|
product_bundle: bundle,
|
|
186
193
|
bundle,
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { getText } from "../../locales/index.js";
|
|
2
|
-
import MemoizedPisellCurrency from "./PisellCurrency.js";
|
|
3
|
-
//#region src/components/pisellCurrency/index.tsx
|
|
4
|
-
/** RecordBoard 列 type 联动排序:内置 0 → 9 / 9 → 0 */
|
|
5
|
-
MemoizedPisellCurrency.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
-
key: `${fieldKey}:asc`,
|
|
7
|
-
label: getText("sort-0-9")
|
|
8
|
-
}, {
|
|
9
|
-
key: `${fieldKey}:desc`,
|
|
10
|
-
label: getText("sort-9-0")
|
|
11
|
-
}] };
|
|
12
|
-
//#endregion
|
|
13
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { getText } from "../../locales/index.js";
|
|
2
|
-
import PisellEmail_default from "./PisellEmail.js";
|
|
3
|
-
//#region src/components/pisellEmail/index.tsx
|
|
4
|
-
/** RecordBoard 列 type 联动排序:内置 A → Z / Z → A */
|
|
5
|
-
PisellEmail_default.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
-
key: `${fieldKey}:asc`,
|
|
7
|
-
label: getText("sort-a-z")
|
|
8
|
-
}, {
|
|
9
|
-
key: `${fieldKey}:desc`,
|
|
10
|
-
label: getText("sort-z-a")
|
|
11
|
-
}] };
|
|
12
|
-
//#endregion
|
|
13
|
-
export {};
|