@pisell/materials 2.2.85 → 2.2.87
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 +7 -7
- package/build/lowcode/preview.js +144 -160
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +25 -35
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +30 -40
- package/es/components/batch-editor/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +4 -5
- package/es/components/date-picker/index.d.ts +0 -1
- package/es/components/filter/index.d.ts +0 -1
- package/es/components/page/index.d.ts +0 -1
- package/es/components/pisellAdjustPrice/index.d.ts +1 -6
- package/es/components/pisellAdjustPrice/index.js +63 -8
- package/es/components/pisellAdjustPrice/index.less +35 -6
- package/es/components/pisellAdjustPrice/status.d.ts +32 -0
- package/es/components/pisellAdjustPrice/status.js +32 -0
- package/es/components/pisellAdjustPrice/type.d.ts +20 -0
- package/es/components/pisellAdjustPrice/type.js +1 -0
- package/es/components/pisellInput/index.d.ts +0 -1
- package/es/components/pisellModal/components/IpadModal/index.d.ts +0 -1
- package/es/components/pisellModal/components/MobileModal/index.d.ts +0 -1
- package/es/components/pisellModal/components/index.d.ts +0 -1
- package/es/components/pisellWalletPassCard/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Header/index.js +4 -3
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Sales/index.js +1 -1
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/index.d.ts +0 -1
- package/es/components/table/Actions/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/fields/date/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +2 -3
- package/es/components/table/Table/fields/link/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/index.d.ts +0 -1
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/es/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/versionSelect/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Amount/index.d.ts +10 -0
- package/es/components/virtual-keyboard/Amount/index.js +9 -4
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +38 -10
- package/es/components/virtual-keyboard/Keyboard/index.js +2 -2
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.js +10 -3
- package/es/utils/index.d.ts +1 -1
- package/lib/components/batch-editor/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +4 -5
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/filter/index.d.ts +0 -1
- package/lib/components/page/index.d.ts +0 -1
- package/lib/components/pisellAdjustPrice/index.d.ts +1 -6
- package/lib/components/pisellAdjustPrice/index.js +118 -57
- package/lib/components/pisellAdjustPrice/index.less +35 -6
- package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
- package/lib/components/pisellAdjustPrice/status.js +60 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +20 -0
- package/lib/components/pisellAdjustPrice/type.js +17 -0
- package/lib/components/pisellInput/index.d.ts +0 -1
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +0 -1
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +0 -1
- package/lib/components/pisellModal/components/index.d.ts +0 -1
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Header/index.js +4 -3
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Sales/index.js +1 -1
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
- package/lib/components/table/Actions/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +2 -3
- package/lib/components/table/Table/fields/link/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/index.d.ts +0 -1
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/versionSelect/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Amount/index.d.ts +10 -0
- package/lib/components/virtual-keyboard/Amount/index.js +8 -3
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +31 -8
- package/lib/components/virtual-keyboard/Keyboard/index.js +2 -1
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +34 -27
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/pisell-adjust-price/meta.ts +168 -0
- package/lowcode/pisell-adjust-price/snippets.ts +1 -0
- package/package.json +3 -3
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/es/components/drag-sort-tree/index.d.ts +0 -4
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisell-config-provider/index.d.ts +0 -12
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -93
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/es/components/productCard/locales.d.ts +0 -84
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -84
- package/es/components/table/types.d.ts +0 -251
- package/es/locales/en-US.d.ts +0 -278
- package/es/locales/zh-CN.d.ts +0 -273
- package/es/locales/zh-TW.d.ts +0 -273
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/lib/components/drag-sort-tree/index.d.ts +0 -4
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisell-config-provider/index.d.ts +0 -12
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -93
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/lib/components/productCard/locales.d.ts +0 -84
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -84
- package/lib/components/table/types.d.ts +0 -251
- package/lib/locales/en-US.d.ts +0 -278
- package/lib/locales/zh-CN.d.ts +0 -273
- package/lib/locales/zh-TW.d.ts +0 -273
|
@@ -35,13 +35,22 @@ module.exports = __toCommonJS(pisellAdjustPrice_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
38
39
|
var import_pisellText = __toESM(require("../pisellText"));
|
|
39
40
|
var import_Amount = __toESM(require("../virtual-keyboard/Amount"));
|
|
40
41
|
var import_locales = require("../../locales");
|
|
41
42
|
var import_index = require("./index.less");
|
|
42
43
|
var import_usePisellConfig = __toESM(require("../pisell-config-provider/hooks/usePisellConfig"));
|
|
44
|
+
var import_status = require("./status");
|
|
43
45
|
var PisellAdjustPrice = (props) => {
|
|
44
|
-
const {
|
|
46
|
+
const {
|
|
47
|
+
value,
|
|
48
|
+
onChange,
|
|
49
|
+
defaultValue,
|
|
50
|
+
originValue,
|
|
51
|
+
selectType = "light",
|
|
52
|
+
...others
|
|
53
|
+
} = props;
|
|
45
54
|
const config = (0, import_usePisellConfig.default)();
|
|
46
55
|
const [newValue, setNewValue] = (0, import_react.useState)(value || 0);
|
|
47
56
|
const [updateMode, setUpdateMode] = (0, import_react.useState)(
|
|
@@ -53,6 +62,16 @@ var PisellAdjustPrice = (props) => {
|
|
|
53
62
|
(0, import_react.useEffect)(() => {
|
|
54
63
|
document.body.id = "body";
|
|
55
64
|
}, []);
|
|
65
|
+
const configColor = (0, import_react.useMemo)(() => {
|
|
66
|
+
const currentConfig = import_status.defaultConfig[selectType];
|
|
67
|
+
const validProps = Object.entries(props).reduce((acc, [key, value2]) => {
|
|
68
|
+
if (value2 !== void 0 && key in currentConfig) {
|
|
69
|
+
acc[key] = value2;
|
|
70
|
+
}
|
|
71
|
+
return acc;
|
|
72
|
+
}, {});
|
|
73
|
+
return { ...currentConfig, ...validProps };
|
|
74
|
+
}, [selectType, props]);
|
|
56
75
|
const handleEnter = () => {
|
|
57
76
|
if (isDiscountError) {
|
|
58
77
|
return;
|
|
@@ -92,65 +111,107 @@ var PisellAdjustPrice = (props) => {
|
|
|
92
111
|
return `${v}%`;
|
|
93
112
|
}
|
|
94
113
|
};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
value: updateMode,
|
|
107
|
-
onChange: handleUpdateMode,
|
|
108
|
-
block: true
|
|
109
|
-
}
|
|
110
|
-
), updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement(
|
|
111
|
-
import_antd.Segmented,
|
|
112
|
-
{
|
|
113
|
-
size: "large",
|
|
114
|
-
options: [
|
|
115
|
-
{
|
|
116
|
-
label: `${(0, import_locales.getText)("pisell-adjust-price-discount-amount")}(${(config == null ? void 0 : config.symbol) || "$"})`,
|
|
117
|
-
value: "amount"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
label: `${(0, import_locales.getText)("pisell-adjust-price-discount-percentage")}(%)`,
|
|
121
|
-
value: "percentage"
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
value: discountMode,
|
|
125
|
-
onChange: (val) => {
|
|
126
|
-
setNewValue("");
|
|
127
|
-
setDiscountMode(val);
|
|
128
|
-
},
|
|
129
|
-
block: true
|
|
130
|
-
}
|
|
131
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-adjust-price-amount-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
|
132
|
-
import_Amount.default,
|
|
133
|
-
{
|
|
134
|
-
...others,
|
|
135
|
-
inputFormat,
|
|
136
|
-
defaultValue: updateMode === "priceOverride" ? defaultValue : "",
|
|
137
|
-
key: updateMode,
|
|
138
|
-
value: newValue,
|
|
139
|
-
defaultSelect: updateMode === "priceOverride",
|
|
140
|
-
onChange: handleChange,
|
|
141
|
-
onEnter: handleEnter,
|
|
142
|
-
placeholder: discountMode === "amount" ? "0" : "%"
|
|
143
|
-
}
|
|
144
|
-
)), updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-low-code-adjust-price-total" }, isDiscountError ? /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: originValue }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, newValue && (0, import_locales.getText)("pisell-adjust-price-total-after-discount"), /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: totalAfterDiscount }))), /* @__PURE__ */ import_react.default.createElement(
|
|
114
|
+
(0, import_react.useEffect)(() => {
|
|
115
|
+
(0, import_utils.setTheme)({
|
|
116
|
+
"--pisell-adjust-price-text-color": configColor.textColor,
|
|
117
|
+
"--pisell-adjust-price-background-color": configColor.backgroundColor,
|
|
118
|
+
"--pisell-adjust-price-container-background-color": configColor.containerBackgroundColor,
|
|
119
|
+
"--pisell-adjust-price-button-background-color": configColor.buttonBackgroundColor,
|
|
120
|
+
"--pisell-adjust-price-main-text-color": configColor.mainTextColor,
|
|
121
|
+
"--pisell-adjust-price-sub-text-color": configColor.subTextColor
|
|
122
|
+
});
|
|
123
|
+
}, [configColor]);
|
|
124
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
145
125
|
"div",
|
|
146
126
|
{
|
|
147
|
-
className: (0, import_classnames.default)("pisell-
|
|
148
|
-
|
|
127
|
+
className: (0, import_classnames.default)("pisell-lowcode-adjust-price-wrap", {
|
|
128
|
+
"pisell-lowcode-adjust-price-dark": selectType === "dark",
|
|
129
|
+
"pisell-lowcode-adjust-price-light": selectType === "light"
|
|
149
130
|
})
|
|
150
131
|
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
132
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
133
|
+
import_antd.Segmented,
|
|
134
|
+
{
|
|
135
|
+
size: "large",
|
|
136
|
+
options: [
|
|
137
|
+
{
|
|
138
|
+
label: (0, import_locales.getText)("pisell-adjust-price-price-override"),
|
|
139
|
+
value: "priceOverride"
|
|
140
|
+
},
|
|
141
|
+
{ label: (0, import_locales.getText)("pisell-adjust-price-discount"), value: "discount" }
|
|
142
|
+
],
|
|
143
|
+
value: updateMode,
|
|
144
|
+
onChange: handleUpdateMode,
|
|
145
|
+
block: true
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement(
|
|
149
|
+
import_antd.Segmented,
|
|
150
|
+
{
|
|
151
|
+
size: "large",
|
|
152
|
+
options: [
|
|
153
|
+
{
|
|
154
|
+
label: `${(0, import_locales.getText)("pisell-adjust-price-discount-amount")}(${(config == null ? void 0 : config.symbol) || "$"})`,
|
|
155
|
+
value: "amount"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
label: `${(0, import_locales.getText)("pisell-adjust-price-discount-percentage")}(%)`,
|
|
159
|
+
value: "percentage"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
value: discountMode,
|
|
163
|
+
onChange: (val) => {
|
|
164
|
+
setNewValue("");
|
|
165
|
+
setDiscountMode(val);
|
|
166
|
+
},
|
|
167
|
+
block: true
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-adjust-price-amount-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
|
171
|
+
import_Amount.default,
|
|
172
|
+
{
|
|
173
|
+
...others,
|
|
174
|
+
inputFormat,
|
|
175
|
+
defaultValue: updateMode === "priceOverride" ? defaultValue : "",
|
|
176
|
+
key: updateMode,
|
|
177
|
+
value: newValue,
|
|
178
|
+
defaultSelect: updateMode === "priceOverride",
|
|
179
|
+
onChange: handleChange,
|
|
180
|
+
onEnter: handleEnter,
|
|
181
|
+
placeholder: discountMode === "amount" ? "0" : "%",
|
|
182
|
+
rightItemsStyle: {
|
|
183
|
+
buttonBackgroundColor: configColor.buttonBackgroundColor,
|
|
184
|
+
textColor: configColor.textColor,
|
|
185
|
+
resetButtonBackgroundColor: configColor.resetButtonBackgroundColor,
|
|
186
|
+
resetButtonTextColor: configColor.resetButtonTextColor,
|
|
187
|
+
isDoneButtonFollowTheme: configColor.isDoneButtonFollowTheme,
|
|
188
|
+
doneButtonBackgroundColor: configColor.doneButtonBackgroundColor,
|
|
189
|
+
doneButtonTextColor: configColor.doneButtonTextColor
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
)),
|
|
193
|
+
updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement("div", null, configColor.isShowMainText ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-low-code-adjust-price-total" }, isDiscountError ? /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: originValue }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, newValue && (0, import_locales.getText)("pisell-adjust-price-total-after-discount"), /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: totalAfterDiscount }))) : null, configColor.isShowSubText ? /* @__PURE__ */ import_react.default.createElement(
|
|
194
|
+
"div",
|
|
195
|
+
{
|
|
196
|
+
className: (0, import_classnames.default)(
|
|
197
|
+
"pisell-low-code-adjust-price-amount-desc",
|
|
198
|
+
{
|
|
199
|
+
["pisell-low-code-adjust-price-amount-desc-error"]: isDiscountError
|
|
200
|
+
}
|
|
201
|
+
)
|
|
202
|
+
},
|
|
203
|
+
(0, import_locales.getText)("pisell-adjust-price-discount-can-be-maximum"),
|
|
204
|
+
" ",
|
|
205
|
+
discountMode === "amount" ? /* @__PURE__ */ import_react.default.createElement(
|
|
206
|
+
import_pisellText.default.Amount,
|
|
207
|
+
{
|
|
208
|
+
value: originValue,
|
|
209
|
+
style: {
|
|
210
|
+
color: configColor.subTextColor
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
) : "100%"
|
|
214
|
+
) : null)
|
|
215
|
+
);
|
|
155
216
|
};
|
|
156
217
|
var pisellAdjustPrice_default = PisellAdjustPrice;
|
|
@@ -1,30 +1,59 @@
|
|
|
1
1
|
.pisell-lowcode-adjust-price-wrap {
|
|
2
2
|
width: 380px;
|
|
3
3
|
border-radius: 10px;
|
|
4
|
-
background-color:
|
|
4
|
+
background-color: var(--pisell-adjust-price-background-color);
|
|
5
5
|
padding: 10px;
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
gap: 10px;
|
|
9
|
+
transition: all 0.3s ease;
|
|
10
|
+
|
|
11
|
+
// 浅色模式样式
|
|
12
|
+
&.pisell-lowcode-adjust-price-light {
|
|
13
|
+
.pisell-lowcode-segmented-item-label {
|
|
14
|
+
color: #667085;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 深色模式样式
|
|
19
|
+
&.pisell-lowcode-adjust-price-dark {
|
|
20
|
+
.pisell-lowcode-segmented-item-label {
|
|
21
|
+
color: #d0d5dd;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pisell-lowcode-segmented {
|
|
26
|
+
background: var(--pisell-adjust-price-container-background-color);
|
|
27
|
+
:hover {
|
|
28
|
+
color: var(--pisell-adjust-price-text-color);
|
|
29
|
+
}
|
|
30
|
+
.pisell-lowcode-segmented-item-selected {
|
|
31
|
+
background: var(--pisell-adjust-price-button-background-color);
|
|
32
|
+
.pisell-lowcode-segmented-item-label {
|
|
33
|
+
color: var(--pisell-adjust-price-text-color) !important;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
9
38
|
.pisell-lowcode-adjust-price-amount-wrap {
|
|
10
39
|
padding: 10px;
|
|
11
40
|
border-radius: 10px;
|
|
12
|
-
background: var(--
|
|
41
|
+
background: var(--pisell-adjust-price-container-background-color);
|
|
13
42
|
}
|
|
14
43
|
.pisell-low-code-adjust-price-total {
|
|
15
|
-
color: var(--
|
|
44
|
+
color: var(--pisell-adjust-price-main-text-color);
|
|
16
45
|
font-size: 20px;
|
|
17
46
|
font-weight: 600;
|
|
18
47
|
line-height: 30px; /* 150% */
|
|
19
48
|
}
|
|
20
49
|
.pisell-low-code-adjust-price-amount-desc {
|
|
21
|
-
color: var(--
|
|
50
|
+
color: var(--pisell-adjust-price-sub-text-color);
|
|
22
51
|
font-size: 16px;
|
|
23
52
|
font-style: normal;
|
|
24
53
|
font-weight: 400;
|
|
25
54
|
line-height: 24px; /* 150% */
|
|
26
55
|
}
|
|
27
56
|
.pisell-low-code-adjust-price-amount-desc-error {
|
|
28
|
-
color: var(--Error-600, #
|
|
57
|
+
color: var(--Error-600, #d92d20);
|
|
29
58
|
}
|
|
30
|
-
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const defaultConfig: {
|
|
2
|
+
dark: {
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
containerBackgroundColor: string;
|
|
5
|
+
buttonBackgroundColor: string;
|
|
6
|
+
textColor: string;
|
|
7
|
+
resetButtonBackgroundColor: string;
|
|
8
|
+
resetButtonTextColor: string;
|
|
9
|
+
isDoneButtonFollowTheme: boolean;
|
|
10
|
+
doneButtonBackgroundColor: string;
|
|
11
|
+
doneButtonTextColor: string;
|
|
12
|
+
isShowMainText: boolean;
|
|
13
|
+
mainTextColor: string;
|
|
14
|
+
isShowSubText: boolean;
|
|
15
|
+
subTextColor: string;
|
|
16
|
+
};
|
|
17
|
+
light: {
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
containerBackgroundColor: string;
|
|
20
|
+
buttonBackgroundColor: string;
|
|
21
|
+
textColor: string;
|
|
22
|
+
resetButtonBackgroundColor: string;
|
|
23
|
+
resetButtonTextColor: string;
|
|
24
|
+
isDoneButtonFollowTheme: boolean;
|
|
25
|
+
doneButtonBackgroundColor: string;
|
|
26
|
+
doneButtonTextColor: string;
|
|
27
|
+
isShowMainText: boolean;
|
|
28
|
+
mainTextColor: string;
|
|
29
|
+
isShowSubText: boolean;
|
|
30
|
+
subTextColor: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellAdjustPrice/status.ts
|
|
20
|
+
var status_exports = {};
|
|
21
|
+
__export(status_exports, {
|
|
22
|
+
defaultConfig: () => defaultConfig
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(status_exports);
|
|
25
|
+
var defaultConfig = {
|
|
26
|
+
dark: {
|
|
27
|
+
backgroundColor: "rgba(0, 0, 0, 0.70)",
|
|
28
|
+
containerBackgroundColor: "rgba(0, 0, 0, 0.40)",
|
|
29
|
+
buttonBackgroundColor: "#ffffff",
|
|
30
|
+
textColor: "#000000",
|
|
31
|
+
resetButtonBackgroundColor: "#ffffff",
|
|
32
|
+
resetButtonTextColor: "#d92d20",
|
|
33
|
+
isDoneButtonFollowTheme: true,
|
|
34
|
+
doneButtonBackgroundColor: "#4ca30d",
|
|
35
|
+
doneButtonTextColor: "#ffffff",
|
|
36
|
+
isShowMainText: true,
|
|
37
|
+
mainTextColor: "#ffffff",
|
|
38
|
+
isShowSubText: true,
|
|
39
|
+
subTextColor: "#d0d5dd"
|
|
40
|
+
},
|
|
41
|
+
light: {
|
|
42
|
+
backgroundColor: "#ffffff",
|
|
43
|
+
containerBackgroundColor: "#d0d5dd",
|
|
44
|
+
buttonBackgroundColor: "#ffffff",
|
|
45
|
+
textColor: "#000000",
|
|
46
|
+
resetButtonBackgroundColor: "#ffffff",
|
|
47
|
+
resetButtonTextColor: "#d92d20",
|
|
48
|
+
isDoneButtonFollowTheme: true,
|
|
49
|
+
doneButtonBackgroundColor: "#4ca30d",
|
|
50
|
+
doneButtonTextColor: "#ffffff",
|
|
51
|
+
isShowMainText: true,
|
|
52
|
+
mainTextColor: "#101828",
|
|
53
|
+
isShowSubText: true,
|
|
54
|
+
subTextColor: "#667085"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
+
0 && (module.exports = {
|
|
59
|
+
defaultConfig
|
|
60
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface PisellAdjustPriceProps {
|
|
2
|
+
value?: number;
|
|
3
|
+
originValue: number;
|
|
4
|
+
defaultValue?: number;
|
|
5
|
+
onChange?: (val: number) => void;
|
|
6
|
+
selectType?: 'light' | 'dark';
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
containerBackgroundColor?: string;
|
|
9
|
+
buttonBackgroundColor?: string;
|
|
10
|
+
textColor?: string;
|
|
11
|
+
resetButtonBackgroundColor?: string;
|
|
12
|
+
resetButtonTextColor?: string;
|
|
13
|
+
isDoneButtonFollowTheme?: boolean;
|
|
14
|
+
doneButtonBackgroundColor?: string;
|
|
15
|
+
doneButtonTextColor?: string;
|
|
16
|
+
isShowMainText?: boolean;
|
|
17
|
+
mainTextColor?: string;
|
|
18
|
+
isShowSubText?: boolean;
|
|
19
|
+
subTextColor?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/components/pisellAdjustPrice/type.ts
|
|
16
|
+
var type_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(type_exports);
|
|
@@ -59,11 +59,12 @@ var Header = (props) => {
|
|
|
59
59
|
name,
|
|
60
60
|
price,
|
|
61
61
|
symbol,
|
|
62
|
-
disabled
|
|
62
|
+
disabled,
|
|
63
|
+
relation_products
|
|
63
64
|
} = item;
|
|
64
65
|
const showPrice = (0, import_react.useMemo)(() => {
|
|
65
|
-
return (bundle == null ? void 0 : bundle.length) > 0 || (options == null ? void 0 : options.length) > 0;
|
|
66
|
-
}, [bundle, options]);
|
|
66
|
+
return (bundle == null ? void 0 : bundle.length) > 0 || (options == null ? void 0 : options.length) > 0 || ((relation_products == null ? void 0 : relation_products.length) || 0) > 0;
|
|
67
|
+
}, [bundle, options, relation_products]);
|
|
67
68
|
const headerCenterStyle = (0, import_react.useMemo)(() => {
|
|
68
69
|
return (options == null ? void 0 : options.length) > 0 || product_option_string;
|
|
69
70
|
}, [options, product_option_string]);
|
|
@@ -47,7 +47,7 @@ var Sales = ({ item, isShowNote }) => {
|
|
|
47
47
|
price: p == null ? void 0 : p.selling_price,
|
|
48
48
|
symbol: item.symbol,
|
|
49
49
|
num: p == null ? void 0 : p.product_quantity,
|
|
50
|
-
total: p == null ? void 0 : p.
|
|
50
|
+
total: p == null ? void 0 : p.selling_price
|
|
51
51
|
};
|
|
52
52
|
});
|
|
53
53
|
return (other_products == null ? void 0 : other_products.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-sales-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-sales-title` }, import_utils2.locales.getText("pisell2.product.card.sales")), /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const fieldMaps: {
|
|
3
2
|
text: {
|
|
4
3
|
field: {
|
|
@@ -198,12 +197,12 @@ export declare const fieldList: ({
|
|
|
198
197
|
field_icon: string;
|
|
199
198
|
field_name: string;
|
|
200
199
|
field_type: string;
|
|
201
|
-
default_value:
|
|
200
|
+
default_value: string;
|
|
202
201
|
} | {
|
|
203
202
|
field_icon: string;
|
|
204
203
|
field_name: string;
|
|
205
204
|
field_type: string;
|
|
206
|
-
default_value:
|
|
205
|
+
default_value: boolean;
|
|
207
206
|
} | {
|
|
208
207
|
field_icon: string;
|
|
209
208
|
field_name: string;
|