@pisell/materials 1.0.458 → 1.0.460
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 +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.js +16 -16
- package/build/lowcode/view.js +20 -20
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +0 -2
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +6 -6
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +38 -30
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +6 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +17 -0
- package/es/components/dataSourceComponents/hooks/useActions.js +1 -1
- package/es/components/dataSourceComponents/provider/fields/DataSourceProvider.js +3 -1
- package/es/components/productCard/components/AmountFooter/index.js +1 -1
- package/es/components/productCard/components/Header/index.d.ts +1 -1
- package/es/components/productCard/components/Header/index.js +8 -6
- package/es/components/productCard/components/Note/index.d.ts +1 -1
- package/es/components/productCard/components/Note/index.js +8 -7
- package/es/components/productCard/components/Packages/index.js +2 -1
- package/es/components/productCard/hooks/useOpenNote.js +10 -4
- package/es/components/productCard/index.js +10 -5
- package/es/components/productCard/locales.d.ts +9 -3
- package/es/components/productCard/locales.js +9 -3
- package/es/components/productCard/status.d.ts +9 -0
- package/es/components/productCard/status.js +15 -0
- package/es/components/productCard/types.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +0 -2
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +4 -4
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +30 -17
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +6 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +50 -0
- package/lib/components/dataSourceComponents/hooks/useActions.js +1 -1
- package/lib/components/dataSourceComponents/provider/fields/DataSourceProvider.js +2 -1
- package/lib/components/productCard/components/AmountFooter/index.js +1 -1
- package/lib/components/productCard/components/Header/index.d.ts +1 -1
- package/lib/components/productCard/components/Header/index.js +3 -2
- package/lib/components/productCard/components/Note/index.d.ts +1 -1
- package/lib/components/productCard/components/Note/index.js +4 -3
- package/lib/components/productCard/components/Packages/index.js +4 -3
- package/lib/components/productCard/hooks/useOpenNote.js +6 -3
- package/lib/components/productCard/index.js +4 -1
- package/lib/components/productCard/locales.d.ts +9 -3
- package/lib/components/productCard/locales.js +9 -3
- package/lib/components/productCard/status.d.ts +9 -0
- package/lib/components/productCard/status.js +36 -0
- package/lib/components/productCard/types.d.ts +1 -0
- package/package.json +3 -3
|
@@ -42,10 +42,10 @@ var import_ActionsProvider = __toESM(require("../provider/actions/ActionsProvide
|
|
|
42
42
|
var import_useDrawerState = __toESM(require("./hooks/useDrawerState"));
|
|
43
43
|
var import_useDesignMode = __toESM(require("./hooks/useDesignMode"));
|
|
44
44
|
var import_useTableQuery = __toESM(require("./hooks/useTableQuery"));
|
|
45
|
-
var import_useSetRequest = __toESM(require("../../../hooks/useSetRequest"));
|
|
46
45
|
var import_locales = require("../../../locales");
|
|
47
46
|
var import_useDataSource = __toESM(require("../hooks/useDataSource"));
|
|
48
47
|
var import_TableSettingProvider = __toESM(require("./provider/tableSetting/TableSettingProvider"));
|
|
48
|
+
var import_useDataSourceKey = __toESM(require("./hooks/useDataSourceKey"));
|
|
49
49
|
var DRAWER_TITLES = {
|
|
50
50
|
detail: (0, import_locales.getText)("pisell-data-source-table-detail"),
|
|
51
51
|
edit: (0, import_locales.getText)("pisell-data-source-table-edit"),
|
|
@@ -65,10 +65,10 @@ var BaseTable = (props) => {
|
|
|
65
65
|
__designMode,
|
|
66
66
|
...others
|
|
67
67
|
} = props;
|
|
68
|
-
(0, import_useSetRequest.default)();
|
|
69
68
|
const { registerVariable } = (0, import_useVariables.default)();
|
|
70
69
|
const { list, destroy } = (0, import_useDataSource.default)();
|
|
71
70
|
const { data } = list;
|
|
71
|
+
const { dataSourceKey, dataSourceKeyRef } = (0, import_useDataSourceKey.default)();
|
|
72
72
|
const {
|
|
73
73
|
drawerVisible,
|
|
74
74
|
setDrawerVisible,
|
|
@@ -77,14 +77,22 @@ var BaseTable = (props) => {
|
|
|
77
77
|
closeDrawer
|
|
78
78
|
} = (0, import_useDrawerState.default)();
|
|
79
79
|
const { queryPageConfig, handleValuesChange, refreshData } = (0, import_useTableQuery.default)();
|
|
80
|
-
(0, import_useDesignMode.default)(props, {
|
|
80
|
+
(0, import_useDesignMode.default)(props, {
|
|
81
|
+
registerVariable,
|
|
82
|
+
openDrawer,
|
|
83
|
+
closeDrawer,
|
|
84
|
+
data: data == null ? void 0 : data.data
|
|
85
|
+
});
|
|
86
|
+
(0, import_react.useEffect)(() => {
|
|
87
|
+
refreshData();
|
|
88
|
+
}, [dataSourceKey]);
|
|
81
89
|
(0, import_react.useEffect)(() => {
|
|
82
|
-
if (
|
|
90
|
+
if (dataSourceKeyRef.current) {
|
|
83
91
|
list == null ? void 0 : list.run(queryPageConfig);
|
|
84
92
|
} else {
|
|
85
93
|
list == null ? void 0 : list.mutate([]);
|
|
86
94
|
}
|
|
87
|
-
}, [
|
|
95
|
+
}, [queryPageConfig]);
|
|
88
96
|
const handleOpenDrawer = (record, type) => {
|
|
89
97
|
openDrawer(type);
|
|
90
98
|
registerVariable == null ? void 0 : registerVariable({
|
|
@@ -98,13 +106,18 @@ var BaseTable = (props) => {
|
|
|
98
106
|
});
|
|
99
107
|
};
|
|
100
108
|
const handleDelete = async (record) => {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
try {
|
|
110
|
+
registerVariable == null ? void 0 : registerVariable({
|
|
111
|
+
currentRecord: record
|
|
112
|
+
});
|
|
113
|
+
setTimeout(async () => {
|
|
114
|
+
await (destroy == null ? void 0 : destroy.run(record.id));
|
|
115
|
+
refreshData();
|
|
116
|
+
});
|
|
117
|
+
} catch (error) {
|
|
118
|
+
console.error(error);
|
|
119
|
+
import_antd.message.error("删除失败,请重试");
|
|
120
|
+
}
|
|
108
121
|
};
|
|
109
122
|
const actionsColumns = (0, import_react.useMemo)(() => {
|
|
110
123
|
return [
|
|
@@ -140,15 +153,15 @@ var BaseTable = (props) => {
|
|
|
140
153
|
// 操作列
|
|
141
154
|
actionsColumns
|
|
142
155
|
});
|
|
143
|
-
const pagination = (0, import_usePagination.default)({ data
|
|
144
|
-
const
|
|
156
|
+
const pagination = (0, import_usePagination.default)({ data });
|
|
157
|
+
const drawerContent = (0, import_react.useMemo)(() => {
|
|
145
158
|
const contentMap = {
|
|
146
159
|
detail: detailContent,
|
|
147
160
|
edit: editContent,
|
|
148
161
|
add: addContent
|
|
149
162
|
};
|
|
150
|
-
return contentMap[
|
|
151
|
-
};
|
|
163
|
+
return contentMap[drawerType];
|
|
164
|
+
}, [drawerType, detailContent, editContent, addContent]);
|
|
152
165
|
return /* @__PURE__ */ import_react.default.createElement(import_TableSettingProvider.default, null, showAddButton && /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 16 } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "primary", onClick: () => handleOpenDrawer(null, "add") }, (0, import_locales.getText)("pisell-data-source-table-add"))), /* @__PURE__ */ import_react.default.createElement(
|
|
153
166
|
import_table.default,
|
|
154
167
|
{
|
|
@@ -174,7 +187,7 @@ var BaseTable = (props) => {
|
|
|
174
187
|
onClose: handleCloseDrawer,
|
|
175
188
|
destroyOnClose: true
|
|
176
189
|
},
|
|
177
|
-
|
|
190
|
+
drawerContent
|
|
178
191
|
)
|
|
179
192
|
));
|
|
180
193
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.ts
|
|
30
|
+
var useDataSourceKey_exports = {};
|
|
31
|
+
__export(useDataSourceKey_exports, {
|
|
32
|
+
default: () => useDataSourceKey_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(useDataSourceKey_exports);
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_useDataSource = __toESM(require("../../hooks/useDataSource"));
|
|
38
|
+
var useDataSourceKey = () => {
|
|
39
|
+
const { dataSource } = (0, import_useDataSource.default)();
|
|
40
|
+
const dataSourceKey = (0, import_react.useMemo)(() => {
|
|
41
|
+
return (0, import_utils.isString)(dataSource) ? dataSource : dataSource == null ? void 0 : dataSource.key;
|
|
42
|
+
}, [dataSource]);
|
|
43
|
+
const dataSourceKeyRef = (0, import_react.useRef)(dataSourceKey);
|
|
44
|
+
dataSourceKeyRef.current = dataSourceKey;
|
|
45
|
+
return {
|
|
46
|
+
dataSourceKey,
|
|
47
|
+
dataSourceKeyRef
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
var useDataSourceKey_default = useDataSourceKey;
|
|
@@ -39,8 +39,10 @@ var import_DataSourceContext = __toESM(require("./DataSourceContext"));
|
|
|
39
39
|
var import_useActions = __toESM(require("../../hooks/useActions"));
|
|
40
40
|
var import_useVariables = __toESM(require("../../hooks/useVariables"));
|
|
41
41
|
var import_useDataSource = __toESM(require("../../hooks/useDataSource"));
|
|
42
|
+
var import_useSetRequest = __toESM(require("../../../../hooks/useSetRequest"));
|
|
42
43
|
var DataSourceProvider = (props) => {
|
|
43
44
|
const { children, dataSource: propsDataSource, currentValue } = props;
|
|
45
|
+
(0, import_useSetRequest.default)();
|
|
44
46
|
const { parseVariable } = (0, import_useVariables.default)();
|
|
45
47
|
const { dataSource: ctxDataSource } = (0, import_useDataSource.default)();
|
|
46
48
|
const dataSource = (0, import_utils.isString)(propsDataSource) ? parseVariable == null ? void 0 : parseVariable(propsDataSource, {
|
|
@@ -48,7 +50,6 @@ var DataSourceProvider = (props) => {
|
|
|
48
50
|
currentDataSource: ctxDataSource
|
|
49
51
|
}
|
|
50
52
|
}) : propsDataSource;
|
|
51
|
-
console.log(dataSource, "dataSource");
|
|
52
53
|
const { list, get, update, create, destroy } = (0, import_useActions.default)({
|
|
53
54
|
dataSource,
|
|
54
55
|
currentValue
|
|
@@ -54,7 +54,7 @@ var Footer = ({ item, hideDivider, type }) => {
|
|
|
54
54
|
hideDivider && `${prefix}packages-product-hide-divider-footer`
|
|
55
55
|
)
|
|
56
56
|
},
|
|
57
|
-
/* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(item == null ? void 0 : item.total, item == null ? void 0 : item.symbol)), /* @__PURE__ */ import_react.default.createElement("span", null, `×${item == null ? void 0 : item.num}`), /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-total` },
|
|
57
|
+
/* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(item == null ? void 0 : item.total, item == null ? void 0 : item.symbol)), /* @__PURE__ */ import_react.default.createElement("span", null, `×${item == null ? void 0 : item.num}`), /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-total` }, (0, import_utils._formatAmount)((item == null ? void 0 : item.total) * (item == null ? void 0 : item.num), item == null ? void 0 : item.symbol))),
|
|
58
58
|
isDiscount ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}packages-product-footer-discount` }, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(item == null ? void 0 : item.origin_total, item == null ? void 0 : item.symbol)), /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)((item == null ? void 0 : item.origin_total) * (item == null ? void 0 : item.num), item == null ? void 0 : item.symbol, 2))) : null
|
|
59
59
|
), isDiscount && ((_a = item._extend) == null ? void 0 : _a.discount_reason) && type === "total" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Divider.default, null), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-item-discount-reason` }, /* @__PURE__ */ import_react.default.createElement("span", null, `${import_utils2.locales.getText("pisell2.product.card.discount.reason")}: ${(_b = item._extend) == null ? void 0 : _b.discount_reason}`))) : null);
|
|
60
60
|
};
|
|
@@ -40,7 +40,8 @@ var import_utils = require("@pisell/utils");
|
|
|
40
40
|
var import_options = __toESM(require("../Packages/components/options"));
|
|
41
41
|
var import_index = require("./index.less");
|
|
42
42
|
var prefix = "pisell-lowcode-";
|
|
43
|
-
var Header = (
|
|
43
|
+
var Header = (props) => {
|
|
44
|
+
const { isShowDelete, item, showImage, onDelete, disabledEdit } = props;
|
|
44
45
|
const showPrice = (0, import_react.useMemo)(() => {
|
|
45
46
|
var _a, _b;
|
|
46
47
|
return ((_a = item == null ? void 0 : item.bundle) == null ? void 0 : _a.length) > 0 || ((_b = item == null ? void 0 : item.options) == null ? void 0 : _b.length) > 0;
|
|
@@ -57,7 +58,7 @@ var Header = ({ isShowDelete, item, showImage, onDelete }) => {
|
|
|
57
58
|
headerCenterStyle && `${prefix}product-options-header`
|
|
58
59
|
)
|
|
59
60
|
},
|
|
60
|
-
isShowDelete ? /* @__PURE__ */ import_react.default.createElement(
|
|
61
|
+
isShowDelete && !disabledEdit ? /* @__PURE__ */ import_react.default.createElement(
|
|
61
62
|
"div",
|
|
62
63
|
{
|
|
63
64
|
className: `${prefix}product-delete`,
|
|
@@ -38,8 +38,9 @@ var import_utils = require("@pisell/utils");
|
|
|
38
38
|
var import_Divider = __toESM(require("../Divider"));
|
|
39
39
|
var import_index = require("./index.less");
|
|
40
40
|
var prefix = "pisell-lowcode-";
|
|
41
|
-
var Note = (
|
|
42
|
-
|
|
41
|
+
var Note = (props) => {
|
|
42
|
+
const { item, type, openNote, disabledEdit } = props;
|
|
43
|
+
return (item == null ? void 0 : item.note) || !disabledEdit ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Divider.default, { type }), /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${prefix}product-note-wrap`) }, (item == null ? void 0 : item.note) ? /* @__PURE__ */ import_react.default.createElement("div", null, import_utils.locales.getText("pisell2.product.card.discount.note"), ": ", item.note) : null, !disabledEdit ? /* @__PURE__ */ import_react.default.createElement(
|
|
43
44
|
"span",
|
|
44
45
|
{
|
|
45
46
|
className: `${prefix}product-note-btn`,
|
|
@@ -50,6 +51,6 @@ var Note = ({ item, type, openNote }) => {
|
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
(item == null ? void 0 : item.note) ? import_utils.locales.getText("pisell2.product.card.discount.edit.note") : import_utils.locales.getText("pisell2.product.card.discount.add.note")
|
|
53
|
-
)));
|
|
54
|
+
) : null)) : null;
|
|
54
55
|
};
|
|
55
56
|
var Note_default = Note;
|
|
@@ -34,17 +34,18 @@ __export(Packages_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(Packages_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_Divider = __toESM(require("../Divider"));
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
37
38
|
var import_collapsibleList = __toESM(require("./components/collapsibleList"));
|
|
38
|
-
var
|
|
39
|
+
var import_utils2 = require("./components/collapsibleList/utils");
|
|
39
40
|
var import_index = require("./index.less");
|
|
40
41
|
var prefix = "pisell-lowcode-";
|
|
41
42
|
var Packages = ({ item, isShowPackageNote }) => {
|
|
42
43
|
const bundle = (item == null ? void 0 : item.bundle) || [];
|
|
43
|
-
return (bundle == null ? void 0 : bundle.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Divider.default, null), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-packages-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-packages-title` }, "
|
|
44
|
+
return (bundle == null ? void 0 : bundle.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Divider.default, null), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-packages-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-packages-title` }, import_utils.locales.getText("pisell2.product.card.items.package")), /* @__PURE__ */ import_react.default.createElement(
|
|
44
45
|
import_collapsibleList.default,
|
|
45
46
|
{
|
|
46
47
|
list: bundle || [],
|
|
47
|
-
renderItem: (items) => (0,
|
|
48
|
+
renderItem: (items) => (0, import_utils2.renderBundles)(
|
|
48
49
|
{ ...items, symbol: item == null ? void 0 : item.symbol, total: items == null ? void 0 : items.price },
|
|
49
50
|
false,
|
|
50
51
|
isShowPackageNote
|
|
@@ -37,11 +37,13 @@ var import_utils = require("@pisell/utils");
|
|
|
37
37
|
var import__ = require("../../../index");
|
|
38
38
|
var useOpenNote = ({ onNoteChange }, ref) => {
|
|
39
39
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
40
|
+
const [item, setItem] = (0, import_react.useState)({});
|
|
40
41
|
const [value, setValue] = (0, import_react.useState)();
|
|
41
42
|
(0, import_react.useImperativeHandle)(ref, () => {
|
|
42
43
|
return {
|
|
43
|
-
open: ({ item }) => {
|
|
44
|
-
|
|
44
|
+
open: ({ item: item2 }) => {
|
|
45
|
+
setItem(item2);
|
|
46
|
+
setValue(item2 == null ? void 0 : item2.note);
|
|
45
47
|
setOpen(true);
|
|
46
48
|
}
|
|
47
49
|
};
|
|
@@ -55,7 +57,7 @@ var useOpenNote = ({ onNoteChange }, ref) => {
|
|
|
55
57
|
{
|
|
56
58
|
open,
|
|
57
59
|
bodyStyle: { padding: 0 },
|
|
58
|
-
title:
|
|
60
|
+
title: (item == null ? void 0 : item.note) ? import_utils.locales.getText("pisell2.product.card.discount.edit.note") : import_utils.locales.getText("pisell2.product.card.discount.add.note"),
|
|
59
61
|
onCancel: () => setOpen(false),
|
|
60
62
|
onOk: handleOk,
|
|
61
63
|
destroyOnClose: true,
|
|
@@ -67,6 +69,7 @@ var useOpenNote = ({ onNoteChange }, ref) => {
|
|
|
67
69
|
import__.Input.TextArea,
|
|
68
70
|
{
|
|
69
71
|
size: "large",
|
|
72
|
+
placeholder: import_utils.locales.getText("pisell2.product.card.note.pla"),
|
|
70
73
|
autoSize: { minRows: 4 },
|
|
71
74
|
allowClear: true,
|
|
72
75
|
value,
|
|
@@ -61,7 +61,8 @@ var ProductCard = (props) => {
|
|
|
61
61
|
onDelete,
|
|
62
62
|
onNote,
|
|
63
63
|
onLike,
|
|
64
|
-
onCard
|
|
64
|
+
onCard,
|
|
65
|
+
...other
|
|
65
66
|
} = props;
|
|
66
67
|
const useOpenNoteRef = (0, import_react.useRef)();
|
|
67
68
|
const showImage = (0, import_react.useMemo)(() => {
|
|
@@ -92,6 +93,7 @@ var ProductCard = (props) => {
|
|
|
92
93
|
/* @__PURE__ */ import_react.default.createElement(
|
|
93
94
|
import_Header.default,
|
|
94
95
|
{
|
|
96
|
+
...other,
|
|
95
97
|
item: dataSource,
|
|
96
98
|
isShowImage,
|
|
97
99
|
isShowDelete,
|
|
@@ -122,6 +124,7 @@ var ProductCard = (props) => {
|
|
|
122
124
|
isShowNote ? /* @__PURE__ */ import_react.default.createElement(
|
|
123
125
|
import_Note.default,
|
|
124
126
|
{
|
|
127
|
+
...other,
|
|
125
128
|
item: dataSource,
|
|
126
129
|
openNote: () => {
|
|
127
130
|
useOpenNoteRef.current.open({
|
|
@@ -6,7 +6,9 @@ declare const _default: {
|
|
|
6
6
|
'pisell2.product.card.discount.add.note': string;
|
|
7
7
|
'pisell2.product.card.discount.edit.note': string;
|
|
8
8
|
'pisell2.product.card.confirm': string;
|
|
9
|
-
'pisell2.product.card.
|
|
9
|
+
'pisell2.product.card.cancel': string;
|
|
10
|
+
'pisell2.product.card.note.pla': string;
|
|
11
|
+
'pisell2.product.card.items.package': string;
|
|
10
12
|
};
|
|
11
13
|
'zh-CN': {
|
|
12
14
|
'pisell2.product.card.day': (val: number) => string;
|
|
@@ -15,7 +17,9 @@ declare const _default: {
|
|
|
15
17
|
'pisell2.product.card.discount.add.note': string;
|
|
16
18
|
'pisell2.product.card.discount.edit.note': string;
|
|
17
19
|
'pisell2.product.card.confirm': string;
|
|
18
|
-
'pisell2.product.card.
|
|
20
|
+
'pisell2.product.card.cancel': string;
|
|
21
|
+
'pisell2.product.card.note.pla': string;
|
|
22
|
+
'pisell2.product.card.items.package': string;
|
|
19
23
|
};
|
|
20
24
|
'zh-HK': {
|
|
21
25
|
'pisell2.product.card.day': (val: number) => string;
|
|
@@ -24,7 +28,9 @@ declare const _default: {
|
|
|
24
28
|
'pisell2.product.card.discount.add.note': string;
|
|
25
29
|
'pisell2.product.card.discount.edit.note': string;
|
|
26
30
|
'pisell2.product.card.confirm': string;
|
|
27
|
-
'pisell2.product.card.
|
|
31
|
+
'pisell2.product.card.cancel': string;
|
|
32
|
+
'pisell2.product.card.note.pla': string;
|
|
33
|
+
'pisell2.product.card.items.package': string;
|
|
28
34
|
};
|
|
29
35
|
};
|
|
30
36
|
export default _default;
|
|
@@ -30,7 +30,9 @@ var locales_default = {
|
|
|
30
30
|
"pisell2.product.card.discount.add.note": "Add note",
|
|
31
31
|
"pisell2.product.card.discount.edit.note": "Edit note",
|
|
32
32
|
"pisell2.product.card.confirm": "Confirm",
|
|
33
|
-
"pisell2.product.card.
|
|
33
|
+
"pisell2.product.card.cancel": "Cancel",
|
|
34
|
+
"pisell2.product.card.note.pla": "Please enter the note",
|
|
35
|
+
"pisell2.product.card.items.package": "Items in package"
|
|
34
36
|
},
|
|
35
37
|
"zh-CN": {
|
|
36
38
|
"pisell2.product.card.day": (val) => "天",
|
|
@@ -39,7 +41,9 @@ var locales_default = {
|
|
|
39
41
|
"pisell2.product.card.discount.add.note": "添加备注",
|
|
40
42
|
"pisell2.product.card.discount.edit.note": "编辑备注",
|
|
41
43
|
"pisell2.product.card.confirm": "确定",
|
|
42
|
-
"pisell2.product.card.
|
|
44
|
+
"pisell2.product.card.cancel": "取消",
|
|
45
|
+
"pisell2.product.card.note.pla": "请输入备注",
|
|
46
|
+
"pisell2.product.card.items.package": "包含的商品"
|
|
43
47
|
},
|
|
44
48
|
"zh-HK": {
|
|
45
49
|
"pisell2.product.card.day": (val) => "天",
|
|
@@ -48,6 +52,8 @@ var locales_default = {
|
|
|
48
52
|
"pisell2.product.card.discount.add.note": "添加備註",
|
|
49
53
|
"pisell2.product.card.discount.edit.note": "編輯備註",
|
|
50
54
|
"pisell2.product.card.confirm": "確定",
|
|
51
|
-
"pisell2.product.card.
|
|
55
|
+
"pisell2.product.card.cancel": "取消",
|
|
56
|
+
"pisell2.product.card.note.pla": "請輸入備註",
|
|
57
|
+
"pisell2.product.card.items.package": "包含的商品"
|
|
52
58
|
}
|
|
53
59
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
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/productCard/status.ts
|
|
20
|
+
var status_exports = {};
|
|
21
|
+
__export(status_exports, {
|
|
22
|
+
defaultValue: () => defaultValue
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(status_exports);
|
|
25
|
+
var defaultValue = {
|
|
26
|
+
dataSource: {},
|
|
27
|
+
isShowImage: true,
|
|
28
|
+
isShowHolder: true,
|
|
29
|
+
isShowNote: true,
|
|
30
|
+
isShowDelete: true,
|
|
31
|
+
isShowPackageNote: true
|
|
32
|
+
};
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
defaultValue
|
|
36
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.460",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
66
66
|
"react-window": "^1.8.10",
|
|
67
67
|
"styled-components": "^6.0.0-rc.3",
|
|
68
|
-
"@pisell/
|
|
68
|
+
"@pisell/date-picker": "1.0.112",
|
|
69
69
|
"@pisell/utils": "1.0.43",
|
|
70
|
-
"@pisell/
|
|
70
|
+
"@pisell/icon": "0.0.10"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": "^18.0.0",
|