@pisell/private-materials 3.0.18 → 3.0.19
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 +2 -2
- package/build/lowcode/view.js +1 -1
- package/es/components/booking/info/client/index.js +4 -1
- package/es/components/productExtension/index.d.ts +2 -1
- package/es/components/productExtension/index.js +8 -3
- package/lib/components/booking/info/client/index.js +4 -1
- package/lib/components/productExtension/index.d.ts +2 -1
- package/lib/components/productExtension/index.js +6 -3
- package/lowcode/product-extension/meta.ts +11 -0
- package/package.json +2 -2
|
@@ -179,7 +179,10 @@ var Info = function Info() {
|
|
|
179
179
|
var handleCreateItem = function handleCreateItem() {
|
|
180
180
|
state.action({
|
|
181
181
|
type: "pisell1.handleOpenAddCustomerModal",
|
|
182
|
-
data: {
|
|
182
|
+
data: {
|
|
183
|
+
showReceiveAddress: false,
|
|
184
|
+
showAcceptsMarketing: false
|
|
185
|
+
},
|
|
183
186
|
callback: function callback(customer_id) {
|
|
184
187
|
getClients(_objectSpread(_objectSpread({}, state.client.clientsParams), {}, {
|
|
185
188
|
search: "",
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import "./index.less";
|
|
3
3
|
interface ProductExtensionProps {
|
|
4
4
|
onDataChange: any;
|
|
5
|
+
type: "all" | "once" | "batch";
|
|
5
6
|
}
|
|
6
|
-
declare const ProductExtension: ({ onDataChange }: ProductExtensionProps) => React.JSX.Element;
|
|
7
|
+
declare const ProductExtension: ({ onDataChange, type }: ProductExtensionProps) => React.JSX.Element;
|
|
7
8
|
export default ProductExtension;
|
|
@@ -18,7 +18,8 @@ import localeTexts from "./locales";
|
|
|
18
18
|
locales.init(localeTexts, localStorage.getItem("umi_locale") || "en");
|
|
19
19
|
var ProductExtension = function ProductExtension(_ref) {
|
|
20
20
|
var _extension$filed;
|
|
21
|
-
var onDataChange = _ref.onDataChange
|
|
21
|
+
var onDataChange = _ref.onDataChange,
|
|
22
|
+
type = _ref.type;
|
|
22
23
|
var context = useEngineContext();
|
|
23
24
|
request.setRequest(context.appHelper.utils.request);
|
|
24
25
|
var _getProductExtensionFields = useRequest(getProductExtensionFields, {
|
|
@@ -50,14 +51,18 @@ var ProductExtension = function ProductExtension(_ref) {
|
|
|
50
51
|
round: true,
|
|
51
52
|
loading: _getProductExtensionFields.loading
|
|
52
53
|
}, (_extension$filed = extension.filed) === null || _extension$filed === void 0 ? void 0 : _extension$filed.map(function (item, index) {
|
|
53
|
-
var _item$, _item$2, _extension$extension;
|
|
54
|
+
var _item$, _item$2, _item$3, _extension$extension;
|
|
54
55
|
var isHidden = ((_item$ = item[0]) === null || _item$ === void 0 ? void 0 : _item$.key) === "event_item_type";
|
|
56
|
+
// 编辑单个活动, 不展示schedule组件
|
|
57
|
+
if (type !== "all" && ((_item$2 = item[0]) === null || _item$2 === void 0 ? void 0 : _item$2.key) === "schedule.ids") {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
55
60
|
return /*#__PURE__*/React.createElement(Card, {
|
|
56
61
|
hidden: isHidden,
|
|
57
62
|
key: index
|
|
58
63
|
// style={{ overflow: "inherit" }}
|
|
59
64
|
,
|
|
60
|
-
header: item.length === 1 ? (_item$
|
|
65
|
+
header: item.length === 1 ? (_item$3 = item[0]) === null || _item$3 === void 0 ? void 0 : _item$3.name : extension === null || extension === void 0 ? void 0 : (_extension$extension = extension.extension) === null || _extension$extension === void 0 ? void 0 : _extension$extension.name
|
|
61
66
|
}, item.map(function (child, childIndex) {
|
|
62
67
|
var name = "".concat(child.id, "|").concat(child.key);
|
|
63
68
|
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -160,7 +160,10 @@ var Info = () => {
|
|
|
160
160
|
const handleCreateItem = () => {
|
|
161
161
|
state.action({
|
|
162
162
|
type: "pisell1.handleOpenAddCustomerModal",
|
|
163
|
-
data: {
|
|
163
|
+
data: {
|
|
164
|
+
showReceiveAddress: false,
|
|
165
|
+
showAcceptsMarketing: false
|
|
166
|
+
},
|
|
164
167
|
callback: (customer_id) => {
|
|
165
168
|
getClients({
|
|
166
169
|
...state.client.clientsParams,
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import "./index.less";
|
|
3
3
|
interface ProductExtensionProps {
|
|
4
4
|
onDataChange: any;
|
|
5
|
+
type: "all" | "once" | "batch";
|
|
5
6
|
}
|
|
6
|
-
declare const ProductExtension: ({ onDataChange }: ProductExtensionProps) => React.JSX.Element;
|
|
7
|
+
declare const ProductExtension: ({ onDataChange, type }: ProductExtensionProps) => React.JSX.Element;
|
|
7
8
|
export default ProductExtension;
|
|
@@ -44,7 +44,7 @@ var import_index = require("./index.less");
|
|
|
44
44
|
var import_utils2 = require("@pisell/utils");
|
|
45
45
|
var import_locales = __toESM(require("./locales"));
|
|
46
46
|
import_utils2.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
|
|
47
|
-
var ProductExtension = ({ onDataChange }) => {
|
|
47
|
+
var ProductExtension = ({ onDataChange, type }) => {
|
|
48
48
|
var _a;
|
|
49
49
|
const context = (0, import_useEngineContext.default)();
|
|
50
50
|
import_utils.request.setRequest(context.appHelper.utils.request);
|
|
@@ -71,14 +71,17 @@ var ProductExtension = ({ onDataChange }) => {
|
|
|
71
71
|
return Component ? /* @__PURE__ */ import_react.default.createElement(Component, { ..._props }) : null;
|
|
72
72
|
};
|
|
73
73
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { active: true, round: true, loading: _getProductExtensionFields.loading }, (_a = extension.filed) == null ? void 0 : _a.map((item, index) => {
|
|
74
|
-
var _a2, _b, _c;
|
|
74
|
+
var _a2, _b, _c, _d;
|
|
75
75
|
const isHidden = ((_a2 = item[0]) == null ? void 0 : _a2.key) === "event_item_type";
|
|
76
|
+
if (type !== "all" && ((_b = item[0]) == null ? void 0 : _b.key) === "schedule.ids") {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
76
79
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
77
80
|
import_card.default,
|
|
78
81
|
{
|
|
79
82
|
hidden: isHidden,
|
|
80
83
|
key: index,
|
|
81
|
-
header: item.length === 1 ? (
|
|
84
|
+
header: item.length === 1 ? (_c = item[0]) == null ? void 0 : _c.name : (_d = extension == null ? void 0 : extension.extension) == null ? void 0 : _d.name
|
|
82
85
|
},
|
|
83
86
|
item.map((child, childIndex) => {
|
|
84
87
|
const name = `${child.id}|${child.key}`;
|
|
@@ -98,6 +98,17 @@ const ProductExtensionMeta: ComponentMetadata = {
|
|
|
98
98
|
"name": "onDataChange",
|
|
99
99
|
"setter": ["JsonSetter", "VariableSetter"],
|
|
100
100
|
},
|
|
101
|
+
{
|
|
102
|
+
"title": {
|
|
103
|
+
"label": {
|
|
104
|
+
"type": "i18n",
|
|
105
|
+
"en-US": "type",
|
|
106
|
+
"zh-CN": "type"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"name": "type",
|
|
110
|
+
"setter": ["VariableSetter"],
|
|
111
|
+
},
|
|
101
112
|
],
|
|
102
113
|
"supports": {},
|
|
103
114
|
"component": {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.19",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"ahooks": "^3.7.6",
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
|
-
"@pisell/icon": "0.0.8",
|
|
62
61
|
"@pisell/utils": "1.0.23",
|
|
62
|
+
"@pisell/icon": "0.0.8",
|
|
63
63
|
"@pisell/date-picker": "1.0.68"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|