@pisell/materials 1.0.798 → 1.0.800
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 +3 -3
- package/build/lowcode/preview.js +150 -150
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +24 -28
- package/es/components/DragSortList/index.js +6 -6
- package/es/components/classicLayout/index.js +4 -5
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/es/components/icon/index.js +5 -5
- package/es/components/list/index.js +6 -6
- package/es/components/productCard/components/Header/EditButton/index.d.ts +3 -0
- package/es/components/productCard/components/Header/EditButton/index.js +22 -0
- package/es/components/productCard/components/Header/EditButton/index.less +26 -0
- package/es/components/productCard/components/Header/index.js +12 -42
- package/es/components/productCard/components/Header/index.less +4 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/index.js +1 -1
- package/es/components/qrcode/index.js +1 -1
- package/es/components/sort/components/InlineMenu/index.js +1 -1
- package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
- package/es/components/table/Actions/component/ViewMode/index.js +1 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +4 -5
- package/es/components/table/Header/Buttons/index.js +5 -5
- package/es/components/table/Table/AddFieldModal/index.js +6 -6
- package/es/components/table/Table/SelectField/index.js +4 -4
- package/es/components/table/Table/fields/date/Edit/index.js +1 -1
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/fields/link/Edit/index.js +5 -5
- package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
- package/es/components/table/Table/fields/search/filterUtil/index.js +0 -1
- package/es/components/table/Table/fields/text/Show/index.js +4 -4
- package/es/components/table/Table/fields/text/filterUtil/index.js +0 -1
- package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
- package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
- package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useMergeColumnSetting.js +1 -2
- package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
- package/es/components/table/hooks/useTransFilterSetting.js +5 -5
- package/es/components/translation/index.js +10 -10
- package/es/components/translation/utils.js +5 -5
- package/es/components/walletCard/index.js +66 -45
- package/es/hooks/useResponsive.js +2 -2
- package/es/utils/hoc.js +1 -1
- package/es/utils/miniRedux.js +8 -9
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/lib/components/lowCodePage/index.js +1 -2
- package/lib/components/productCard/components/Header/{ActionButton → DeleteButton}/index.js +6 -6
- package/lib/components/productCard/components/Header/EditButton/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/EditButton/index.js +62 -0
- package/lib/components/productCard/components/Header/EditButton/index.less +26 -0
- package/lib/components/productCard/components/Header/index.js +13 -40
- package/lib/components/productCard/components/Header/index.less +4 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/index.js +2 -2
- package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +4 -8
- package/lib/components/table/Table/fields/utils/index.js +1 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/walletCard/index.js +22 -2
- package/lib/hooks/useResponsive.js +3 -6
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +3 -3
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
- /package/es/components/productCard/components/Header/{ActionButton → DeleteButton}/index.d.ts +0 -0
- /package/es/components/productCard/components/Header/{ActionButton → DeleteButton}/index.js +0 -0
- /package/es/components/productCard/components/Header/{ActionButton → DeleteButton}/index.less +0 -0
- /package/lib/components/productCard/components/Header/{ActionButton → DeleteButton}/index.d.ts +0 -0
- /package/lib/components/productCard/components/Header/{ActionButton → DeleteButton}/index.less +0 -0
|
@@ -76,13 +76,34 @@ var toBooleanValue = function toBooleanValue(value) {
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
// 自定义钩子:处理二维码/条形码模态框
|
|
79
|
-
var useCodeModal = function useCodeModal(cardNo, onCodeClick) {
|
|
79
|
+
var useCodeModal = function useCodeModal(cardNo, onCodeClick, codeType) {
|
|
80
|
+
var _context$appHelper;
|
|
80
81
|
var _useState = useState(false),
|
|
81
82
|
_useState2 = _slicedToArray(_useState, 2),
|
|
82
83
|
isModalOpen = _useState2[0],
|
|
83
84
|
setIsModalOpen = _useState2[1];
|
|
85
|
+
var context = useEngineContext();
|
|
86
|
+
var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
|
|
87
|
+
interaction = _ref.interaction;
|
|
84
88
|
var handleCodeClick = function handleCodeClick(e) {
|
|
89
|
+
var _interaction$utils, _interaction$utils$is;
|
|
85
90
|
e.stopPropagation();
|
|
91
|
+
if (interaction !== null && interaction !== void 0 && (_interaction$utils = interaction.utils) !== null && _interaction$utils !== void 0 && (_interaction$utils$is = _interaction$utils.isAppEnv) !== null && _interaction$utils$is !== void 0 && _interaction$utils$is.call(_interaction$utils)) {
|
|
92
|
+
var _interaction$utils2, _interaction$utils2$p;
|
|
93
|
+
var typeMap = {
|
|
94
|
+
orCode: "qrCode",
|
|
95
|
+
barCode: "barCode"
|
|
96
|
+
};
|
|
97
|
+
interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$p = _interaction$utils2.postMessageToApp) === null || _interaction$utils2$p === void 0 || _interaction$utils2$p.call(_interaction$utils2, {
|
|
98
|
+
module: 'global',
|
|
99
|
+
key: 'openCodeModal',
|
|
100
|
+
data: {
|
|
101
|
+
type: typeMap[codeType] || codeType,
|
|
102
|
+
value: cardNo
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
86
107
|
if (onCodeClick) {
|
|
87
108
|
onCodeClick();
|
|
88
109
|
} else {
|
|
@@ -101,32 +122,32 @@ var useCodeModal = function useCodeModal(cardNo, onCodeClick) {
|
|
|
101
122
|
};
|
|
102
123
|
|
|
103
124
|
// 子组件:卡片头部
|
|
104
|
-
var CardHeader = function CardHeader(
|
|
105
|
-
var
|
|
106
|
-
showIcon =
|
|
107
|
-
|
|
108
|
-
showWalletName =
|
|
109
|
-
|
|
110
|
-
showShopName =
|
|
111
|
-
|
|
112
|
-
showCardNo =
|
|
113
|
-
|
|
114
|
-
showCode =
|
|
115
|
-
iconImg =
|
|
116
|
-
mode =
|
|
117
|
-
|
|
118
|
-
walletName =
|
|
119
|
-
|
|
120
|
-
shopName =
|
|
121
|
-
|
|
122
|
-
cardNo =
|
|
123
|
-
|
|
124
|
-
cardStyle =
|
|
125
|
-
|
|
126
|
-
codeType =
|
|
127
|
-
onCodeClick =
|
|
128
|
-
|
|
129
|
-
isLogin =
|
|
125
|
+
var CardHeader = function CardHeader(_ref2) {
|
|
126
|
+
var _ref2$showIcon = _ref2.showIcon,
|
|
127
|
+
showIcon = _ref2$showIcon === void 0 ? true : _ref2$showIcon,
|
|
128
|
+
_ref2$showWalletName = _ref2.showWalletName,
|
|
129
|
+
showWalletName = _ref2$showWalletName === void 0 ? true : _ref2$showWalletName,
|
|
130
|
+
_ref2$showShopName = _ref2.showShopName,
|
|
131
|
+
showShopName = _ref2$showShopName === void 0 ? true : _ref2$showShopName,
|
|
132
|
+
_ref2$showCardNo = _ref2.showCardNo,
|
|
133
|
+
showCardNo = _ref2$showCardNo === void 0 ? true : _ref2$showCardNo,
|
|
134
|
+
_ref2$showCode = _ref2.showCode,
|
|
135
|
+
showCode = _ref2$showCode === void 0 ? true : _ref2$showCode,
|
|
136
|
+
iconImg = _ref2.iconImg,
|
|
137
|
+
mode = _ref2.mode,
|
|
138
|
+
_ref2$walletName = _ref2.walletName,
|
|
139
|
+
walletName = _ref2$walletName === void 0 ? 'Level' : _ref2$walletName,
|
|
140
|
+
_ref2$shopName = _ref2.shopName,
|
|
141
|
+
shopName = _ref2$shopName === void 0 ? 'Store name' : _ref2$shopName,
|
|
142
|
+
_ref2$cardNo = _ref2.cardNo,
|
|
143
|
+
cardNo = _ref2$cardNo === void 0 ? 'Wallet number' : _ref2$cardNo,
|
|
144
|
+
_ref2$cardStyle = _ref2.cardStyle,
|
|
145
|
+
cardStyle = _ref2$cardStyle === void 0 ? 'normal' : _ref2$cardStyle,
|
|
146
|
+
_ref2$codeType = _ref2.codeType,
|
|
147
|
+
codeType = _ref2$codeType === void 0 ? 'barCode' : _ref2$codeType,
|
|
148
|
+
onCodeClick = _ref2.onCodeClick,
|
|
149
|
+
_ref2$isLogin = _ref2.isLogin,
|
|
150
|
+
isLogin = _ref2$isLogin === void 0 ? false : _ref2$isLogin;
|
|
130
151
|
// 处理可能为0/1的布尔值
|
|
131
152
|
var processedShowIcon = toBooleanValue(showIcon);
|
|
132
153
|
var processedShowWalletName = toBooleanValue(showWalletName);
|
|
@@ -165,9 +186,9 @@ var CardHeader = function CardHeader(_ref) {
|
|
|
165
186
|
};
|
|
166
187
|
|
|
167
188
|
// 子组件:卡片内容项
|
|
168
|
-
var CardItem = function CardItem(
|
|
169
|
-
var item =
|
|
170
|
-
symbol =
|
|
189
|
+
var CardItem = function CardItem(_ref3) {
|
|
190
|
+
var item = _ref3.item,
|
|
191
|
+
symbol = _ref3.symbol;
|
|
171
192
|
var key = item.key,
|
|
172
193
|
label = item.label,
|
|
173
194
|
value = item.value;
|
|
@@ -188,9 +209,9 @@ var CardItem = function CardItem(_ref2) {
|
|
|
188
209
|
};
|
|
189
210
|
|
|
190
211
|
// 子组件:卡片内容
|
|
191
|
-
var CardContent = function CardContent(
|
|
192
|
-
var items =
|
|
193
|
-
symbol =
|
|
212
|
+
var CardContent = function CardContent(_ref4) {
|
|
213
|
+
var items = _ref4.items,
|
|
214
|
+
symbol = _ref4.symbol;
|
|
194
215
|
// 定义期望的顺序
|
|
195
216
|
var expectedOrder = ['piont', 'balance', 'discount', 'voucher'];
|
|
196
217
|
|
|
@@ -218,9 +239,9 @@ var CardContent = function CardContent(_ref3) {
|
|
|
218
239
|
};
|
|
219
240
|
|
|
220
241
|
// 子组件:二维码/条形码显示
|
|
221
|
-
var CodeDisplay = function CodeDisplay(
|
|
222
|
-
var codeType =
|
|
223
|
-
cardNo =
|
|
242
|
+
var CodeDisplay = function CodeDisplay(_ref5) {
|
|
243
|
+
var codeType = _ref5.codeType,
|
|
244
|
+
cardNo = _ref5.cardNo;
|
|
224
245
|
if (!cardNo) return null;
|
|
225
246
|
return /*#__PURE__*/React.createElement("div", {
|
|
226
247
|
className: "pisell-wallet-card-code"
|
|
@@ -250,12 +271,12 @@ var blockEvent = function blockEvent(e) {
|
|
|
250
271
|
};
|
|
251
272
|
|
|
252
273
|
// 子组件:二维码/条形码模态框
|
|
253
|
-
var CodeModal = function CodeModal(
|
|
254
|
-
var isOpen =
|
|
255
|
-
onClose =
|
|
256
|
-
codeType =
|
|
257
|
-
cardNo =
|
|
258
|
-
platform =
|
|
274
|
+
var CodeModal = function CodeModal(_ref6) {
|
|
275
|
+
var isOpen = _ref6.isOpen,
|
|
276
|
+
onClose = _ref6.onClose,
|
|
277
|
+
codeType = _ref6.codeType,
|
|
278
|
+
cardNo = _ref6.cardNo,
|
|
279
|
+
platform = _ref6.platform;
|
|
259
280
|
return /*#__PURE__*/React.createElement(PisellModal, {
|
|
260
281
|
title: getText(codeType === 'barCode' ? 'walletCard-barcode' : 'walletCard-qrcode'),
|
|
261
282
|
platform: platform,
|
|
@@ -316,10 +337,10 @@ var WalletCard = function WalletCard(props) {
|
|
|
316
337
|
var showCode = toBooleanValue(mergedProps.showCode);
|
|
317
338
|
var isLogin = toBooleanValue(mergedProps.isLogin);
|
|
318
339
|
var context = useEngineContext();
|
|
319
|
-
var
|
|
320
|
-
utils =
|
|
340
|
+
var _ref7 = context.appHelper || {},
|
|
341
|
+
utils = _ref7.utils;
|
|
321
342
|
// 使用自定义钩子处理模态框逻辑
|
|
322
|
-
var _useCodeModal = useCodeModal(cardNo, onCodeClick),
|
|
343
|
+
var _useCodeModal = useCodeModal(cardNo, onCodeClick, codeType),
|
|
323
344
|
isModalOpen = _useCodeModal.isModalOpen,
|
|
324
345
|
handleCodeClick = _useCodeModal.handleCodeClick,
|
|
325
346
|
closeModal = _useCodeModal.closeModal;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _iterableToArrayLimit(
|
|
3
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
4
4
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(
|
|
5
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6
6
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
7
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
8
|
import { useEffect, useState, useMemo } from 'react';
|
package/es/utils/hoc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
function _typeof(
|
|
2
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { get, set, has } from 'lodash';
|
|
5
5
|
import dayjs from "dayjs";
|
package/es/utils/miniRedux.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
function _toPropertyKey(
|
|
7
|
-
function _toPrimitive(
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
8
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
9
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
10
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
-
function _iterableToArrayLimit(
|
|
12
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
import React, { createContext, useCallback, useReducer } from 'react';
|
|
15
15
|
export default (function (_ref2) {
|
|
@@ -23,7 +23,6 @@ export default (function (_ref2) {
|
|
|
23
23
|
var Context = /*#__PURE__*/createContext({});
|
|
24
24
|
var Provider = function Provider(ComponentUi) {
|
|
25
25
|
var Components = function Components(props, ref) {
|
|
26
|
-
var _objectSpread2, _ref5;
|
|
27
26
|
var _useReducer = useReducer(function (state, _ref3) {
|
|
28
27
|
var type = _ref3.type,
|
|
29
28
|
payload = _ref3.payload;
|
|
@@ -48,14 +47,14 @@ export default (function (_ref2) {
|
|
|
48
47
|
});
|
|
49
48
|
}
|
|
50
49
|
}, []);
|
|
51
|
-
var _props = _objectSpread(_objectSpread({}, props), {}, (
|
|
50
|
+
var _props = _objectSpread(_objectSpread({}, props), {}, _defineProperty(_defineProperty({}, namespace, providerState), "dispatch", _dispatch));
|
|
52
51
|
var _ref = ref;
|
|
53
52
|
// if (_props.forwardedRef) {
|
|
54
53
|
// _ref = _props.forwardedRef;
|
|
55
54
|
// delete _props.forwardedRef;
|
|
56
55
|
// }
|
|
57
56
|
return /*#__PURE__*/React.createElement(Context.Provider, {
|
|
58
|
-
value: (
|
|
57
|
+
value: _defineProperty(_defineProperty({}, namespace, providerState), "dispatch", _dispatch)
|
|
59
58
|
}, /*#__PURE__*/React.createElement(ComponentUi, _extends({}, _props, {
|
|
60
59
|
ref: _ref
|
|
61
60
|
})));
|
package/es/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => any;
|
|
@@ -50,7 +50,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
50
50
|
* @returns
|
|
51
51
|
*/
|
|
52
52
|
width: number;
|
|
53
|
-
align: "
|
|
53
|
+
align: "left" | "center" | "right";
|
|
54
54
|
fixed: false | "left" | "right";
|
|
55
55
|
type: "link" | "button";
|
|
56
56
|
items: OperationItem[];
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
|
|
@@ -19,7 +19,7 @@ declare const formFieldMap: {
|
|
|
19
19
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
20
20
|
onChange: (value: string) => void;
|
|
21
21
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
22
|
-
rootDomain: "custom" | "
|
|
22
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
23
23
|
customDomain?: string | undefined;
|
|
24
24
|
value?: string | undefined;
|
|
25
25
|
tenantId: string;
|
|
@@ -59,7 +59,13 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
63
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
|
+
} & {
|
|
65
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
67
|
+
onChange: (value: string) => void;
|
|
68
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
63
69
|
JSON: import("react").FC<any>;
|
|
64
70
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
65
71
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -72,18 +78,14 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
72
78
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
73
79
|
onChange: (value: string) => void;
|
|
74
80
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
75
|
-
rootDomain: "custom" | "
|
|
81
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
76
82
|
customDomain?: string | undefined;
|
|
77
83
|
value?: string | undefined;
|
|
78
84
|
tenantId: string;
|
|
79
85
|
name?: string | undefined;
|
|
80
86
|
fieldKey?: string | undefined;
|
|
81
87
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
82
|
-
}) | import("react").FC<
|
|
83
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
84
|
-
} & {
|
|
85
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
86
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
88
|
+
}) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
87
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
90
|
} & {
|
|
89
91
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -95,7 +97,5 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
95
97
|
extraParams?: Record<string, any> | undefined;
|
|
96
98
|
} & {
|
|
97
99
|
dataSource?: any;
|
|
98
|
-
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("
|
|
99
|
-
onChange: (value: string) => void;
|
|
100
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
100
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -41,8 +41,7 @@ var LowCodePage = (props) => {
|
|
|
41
41
|
const context = (0, import_useEngineContext.default)();
|
|
42
42
|
const { RenderLowCodeByKey, getRenderLowCodeByKey } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
43
43
|
const Com = (0, import_utils.isFunction)(getRenderLowCodeByKey) ? getRenderLowCodeByKey() : RenderLowCodeByKey;
|
|
44
|
-
if (!Com)
|
|
45
|
-
return /* @__PURE__ */ import_react.default.createElement("div", null, "RenderLowCodeByKey is not found");
|
|
44
|
+
if (!Com) return /* @__PURE__ */ import_react.default.createElement("div", null, "RenderLowCodeByKey is not found");
|
|
46
45
|
return /* @__PURE__ */ import_react.default.createElement(Com, { ...others, id, key: id });
|
|
47
46
|
};
|
|
48
47
|
var lowCodePage_default = LowCodePage;
|
|
@@ -26,12 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
-
// src/components/productCard/components/Header/
|
|
30
|
-
var
|
|
31
|
-
__export(
|
|
32
|
-
default: () =>
|
|
29
|
+
// src/components/productCard/components/Header/DeleteButton/index.tsx
|
|
30
|
+
var DeleteButton_exports = {};
|
|
31
|
+
__export(DeleteButton_exports, {
|
|
32
|
+
default: () => DeleteButton_default
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(DeleteButton_exports);
|
|
35
35
|
var import_antd = require("antd");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var import_iconfont = __toESM(require("../../../../iconfont"));
|
|
@@ -56,4 +56,4 @@ var DeleteButton = ({ onClick, type }) => {
|
|
|
56
56
|
)
|
|
57
57
|
);
|
|
58
58
|
};
|
|
59
|
-
var
|
|
59
|
+
var DeleteButton_default = DeleteButton;
|
|
@@ -0,0 +1,62 @@
|
|
|
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/productCard/components/Header/EditButton/index.tsx
|
|
30
|
+
var EditButton_exports = {};
|
|
31
|
+
__export(EditButton_exports, {
|
|
32
|
+
default: () => EditButton_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(EditButton_exports);
|
|
35
|
+
var import_antd = require("antd");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_iconfont = __toESM(require("../../../../iconfont"));
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var prefix = "pisell-lowcode-";
|
|
41
|
+
var EditButton = ({ onEdit }) => {
|
|
42
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
43
|
+
import_antd.Button,
|
|
44
|
+
{
|
|
45
|
+
className: `${prefix}product-edit-button`,
|
|
46
|
+
onClick: (e) => {
|
|
47
|
+
e.stopPropagation();
|
|
48
|
+
onEdit == null ? void 0 : onEdit();
|
|
49
|
+
},
|
|
50
|
+
type: "text",
|
|
51
|
+
icon: /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
import_iconfont.default,
|
|
53
|
+
{
|
|
54
|
+
type: "pisell2-edit-05",
|
|
55
|
+
className: `${prefix}product-edit-button-icon`
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
},
|
|
59
|
+
import_utils.locales.getText("pisell2.product.card.edit")
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
var EditButton_default = EditButton;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@pisell-prefix: pisell-lowcode;
|
|
2
|
+
|
|
3
|
+
.@{pisell-prefix} {
|
|
4
|
+
&-product-edit-button {
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
display: flex;
|
|
7
|
+
color: var(--Blue-600, #1570EF);
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
// gap: 8px;
|
|
15
|
+
align-self: flex-start;
|
|
16
|
+
/* 或 flex-end, center */
|
|
17
|
+
width: fit-content;
|
|
18
|
+
/* 根据内容自适应宽度 */
|
|
19
|
+
padding-left: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-product-edit-button-icon {
|
|
23
|
+
color: var(--Blue-600, #1570EF);
|
|
24
|
+
font-size: 20px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -32,25 +32,23 @@ __export(Header_exports, {
|
|
|
32
32
|
default: () => Header_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Header_exports);
|
|
35
|
-
var import_antd = require("antd");
|
|
36
35
|
var import_react = __toESM(require("react"));
|
|
37
36
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
-
var import_iconfont = __toESM(require("../../../iconfont"));
|
|
39
37
|
var import_utils = require("@pisell/utils");
|
|
40
38
|
var import_options = __toESM(require("../Packages/components/options"));
|
|
41
|
-
var
|
|
42
|
-
var
|
|
39
|
+
var import_DeleteButton = __toESM(require("./DeleteButton"));
|
|
40
|
+
var import_EditButton = __toESM(require("./EditButton"));
|
|
43
41
|
var import_index = require("./index.less");
|
|
44
42
|
var prefix = "pisell-lowcode-";
|
|
45
43
|
var Header = (props) => {
|
|
46
44
|
const {
|
|
47
45
|
isShowDelete,
|
|
48
|
-
isShowEditProduct,
|
|
49
46
|
item,
|
|
50
47
|
showImage,
|
|
51
48
|
onDelete,
|
|
49
|
+
disabledEdit,
|
|
52
50
|
onEditProduct,
|
|
53
|
-
|
|
51
|
+
isShowEditProduct
|
|
54
52
|
} = props;
|
|
55
53
|
const {
|
|
56
54
|
id,
|
|
@@ -77,6 +75,7 @@ var Header = (props) => {
|
|
|
77
75
|
headerCenterStyle && `${prefix}product-options-header`
|
|
78
76
|
)
|
|
79
77
|
},
|
|
78
|
+
isShowDelete && !disabledEdit && !disabled ? /* @__PURE__ */ import_react.default.createElement(import_DeleteButton.default, { onDelete }) : null,
|
|
80
79
|
showImage ? /* @__PURE__ */ import_react.default.createElement(
|
|
81
80
|
"img",
|
|
82
81
|
{
|
|
@@ -84,44 +83,18 @@ var Header = (props) => {
|
|
|
84
83
|
className: `${prefix}product-header-cover`
|
|
85
84
|
}
|
|
86
85
|
) : null,
|
|
87
|
-
id ? /* @__PURE__ */ import_react.default.createElement(
|
|
86
|
+
id ? /* @__PURE__ */ import_react.default.createElement(
|
|
88
87
|
"div",
|
|
89
88
|
{
|
|
90
|
-
className:
|
|
91
|
-
|
|
89
|
+
className: (0, import_classnames.default)(`${prefix}product-right-wrap`, {
|
|
90
|
+
[`${prefix}product-right-wrap-stretch`]: isShowEditProduct
|
|
91
|
+
})
|
|
92
92
|
},
|
|
93
93
|
/* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-title` }, /* @__PURE__ */ import_react.default.createElement("span", null, name), showPrice ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}product-title-price` }, (0, import_utils.formatAmount)(price, 2, symbol)) : null),
|
|
94
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
onClick: (e) => {
|
|
99
|
-
e.stopPropagation();
|
|
100
|
-
onEditProduct == null ? void 0 : onEditProduct("edit");
|
|
101
|
-
},
|
|
102
|
-
style: { padding: `0 4px` }
|
|
103
|
-
},
|
|
104
|
-
import_utils2.locales.getText("pisell2.product.card.edit")
|
|
105
|
-
) : null, disabled || isShowDelete && !disabledEdit && !disabled ? /* @__PURE__ */ import_react.default.createElement(
|
|
106
|
-
import_antd.Button,
|
|
107
|
-
{
|
|
108
|
-
className: (0, import_classnames.default)({
|
|
109
|
-
["mask-delete-button"]: disabled
|
|
110
|
-
}),
|
|
111
|
-
style: {
|
|
112
|
-
position: "relative",
|
|
113
|
-
zIndex: 11,
|
|
114
|
-
opacity: disabled ? 0 : 1
|
|
115
|
-
},
|
|
116
|
-
type: "text",
|
|
117
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-trash-01" }),
|
|
118
|
-
onClick: (e) => {
|
|
119
|
-
e.stopPropagation();
|
|
120
|
-
onDelete();
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
) : null)
|
|
124
|
-
), product_option_string ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}product-title-variant` }, product_option_string) : null, /* @__PURE__ */ import_react.default.createElement(import_options.default, { options, amountSymbol: symbol })) : null
|
|
94
|
+
product_option_string ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}product-title-variant` }, product_option_string) : null,
|
|
95
|
+
/* @__PURE__ */ import_react.default.createElement(import_options.default, { options, amountSymbol: symbol }),
|
|
96
|
+
isShowEditProduct && !disabledEdit && !disabled ? /* @__PURE__ */ import_react.default.createElement(import_EditButton.default, { onEdit: onEditProduct }) : null
|
|
97
|
+
) : null
|
|
125
98
|
);
|
|
126
99
|
};
|
|
127
100
|
var Header_default = Header;
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -38,7 +38,7 @@ var import_antd = require("antd");
|
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
39
|
var import_cardPro = __toESM(require("../cardPro"));
|
|
40
40
|
var import_Header = __toESM(require("./components/Header"));
|
|
41
|
-
var
|
|
41
|
+
var import_DeleteButton = __toESM(require("./components/Header/DeleteButton"));
|
|
42
42
|
var import_Time = __toESM(require("./components/Time"));
|
|
43
43
|
var import_Packages = __toESM(require("./components/Packages"));
|
|
44
44
|
var import_Sales = __toESM(require("./components/Sales"));
|
|
@@ -99,7 +99,7 @@ var ProductCard = (props) => {
|
|
|
99
99
|
["pisell-lowcode-product-card-disabled"]: dataSource == null ? void 0 : dataSource.disabled
|
|
100
100
|
})
|
|
101
101
|
},
|
|
102
|
-
(dataSource == null ? void 0 : dataSource.disabled) && /* @__PURE__ */ import_react.default.createElement("div", { className: "delete-btn-wrapper" }, /* @__PURE__ */ import_react.default.createElement(
|
|
102
|
+
(dataSource == null ? void 0 : dataSource.disabled) && /* @__PURE__ */ import_react.default.createElement("div", { className: "delete-btn-wrapper" }, /* @__PURE__ */ import_react.default.createElement(import_DeleteButton.default, { onDelete: () => onDelete == null ? void 0 : onDelete(dataSource) })),
|
|
103
103
|
/* @__PURE__ */ import_react.default.createElement(
|
|
104
104
|
import_cardPro.default,
|
|
105
105
|
{
|