@pisell/materials 6.2.24 → 6.2.26
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 +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +36 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +41 -32
- package/es/components/DragSortList/index.js +6 -6
- package/es/components/classicLayout/index.js +4 -5
- 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 +8 -8
- package/es/components/icon/index.js +5 -5
- package/es/components/iconfont/index.js +1 -1
- package/es/components/list/index.js +6 -6
- package/es/components/pisellAdjustPrice/index.js +64 -8
- package/es/components/pisellAdjustPrice/index.less +35 -6
- package/es/components/pisellAdjustPrice/status.js +32 -0
- package/es/components/pisellAdjustPrice/type.js +1 -0
- package/es/components/pisellToast/index.js +3 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +61 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.js +32 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.less +32 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.js +52 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.js +40 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.js +44 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.js +55 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.js +43 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +53 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/es/components/productCard/cartSkuCard/index.js +195 -0
- package/es/components/productCard/cartSkuCard/index.less +69 -0
- package/es/components/productCard/cartSkuCard/locales.js +30 -0
- package/es/components/productCard/components/Header/index.js +4 -3
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/index.js +2 -0
- 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/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/utils.js +5 -5
- package/es/components/virtual-keyboard/Amount/index.js +79 -7
- package/es/components/virtual-keyboard/Amount/index.less +39 -0
- package/es/components/virtual-keyboard/Amount/themeConfig.js +32 -0
- package/es/components/virtual-keyboard/Amount/types.js +1 -0
- 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/Number/index.js +77 -7
- package/es/components/virtual-keyboard/Number/index.less +39 -0
- package/es/components/virtual-keyboard/Number/themeConfig.js +32 -0
- package/es/components/virtual-keyboard/Number/types.js +1 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.js +10 -3
- package/es/components/virtual-keyboard/index.js +88 -3
- package/es/components/virtual-keyboard/index.less +33 -1
- package/es/hooks/useResponsive.js +2 -2
- package/es/utils/hoc.js +1 -1
- package/es/utils/miniRedux.js +8 -9
- 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 +8 -8
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/lowCodePage/index.js +1 -2
- package/lib/components/pisellAdjustPrice/index.js +119 -57
- package/lib/components/pisellAdjustPrice/index.less +35 -6
- package/lib/components/pisellAdjustPrice/status.js +60 -0
- package/lib/components/pisellAdjustPrice/type.js +17 -0
- package/lib/components/pisellToast/index.js +3 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +71 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.js +52 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.less +32 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +73 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.js +44 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.js +73 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +76 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +65 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +67 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/lib/components/productCard/cartSkuCard/index.js +216 -0
- package/lib/components/productCard/cartSkuCard/index.less +69 -0
- package/lib/components/productCard/cartSkuCard/locales.js +61 -0
- package/lib/components/productCard/components/Header/index.js +4 -3
- package/lib/components/productCard/components/Sales/index.js +2 -2
- package/lib/components/productCard/index.js +2 -0
- package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
- 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/virtual-keyboard/Amount/index.js +72 -16
- package/lib/components/virtual-keyboard/Amount/index.less +39 -0
- package/lib/components/virtual-keyboard/Amount/themeConfig.js +60 -0
- package/lib/components/virtual-keyboard/Amount/types.js +17 -0
- 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/Number/index.js +65 -11
- package/lib/components/virtual-keyboard/Number/index.less +39 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.js +60 -0
- package/lib/components/virtual-keyboard/Number/types.js +17 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +34 -20
- package/lib/components/virtual-keyboard/index.js +60 -2
- package/lib/components/virtual-keyboard/index.less +33 -1
- package/lib/hooks/useResponsive.js +3 -6
- package/lowcode/_setters/antd-icon-setter/index.tsx +3 -2
- package/lowcode/pisell-adjust-price/meta.ts +168 -0
- package/lowcode/pisell-adjust-price/snippets.ts +1 -0
- package/lowcode/pisell-number-keyboard/meta.ts +167 -0
- package/lowcode/pisell-price-keyboard/meta.ts +167 -0
- package/lowcode/virtual-keyboard/meta.ts +131 -0
- package/package.json +1 -1
- 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/iconfont/index.d.ts +0 -8
- package/es/components/pisellAdjustPrice/index.d.ts +0 -9
- package/es/components/pisellToast/index.d.ts +0 -16
- package/es/components/productCard/components/Header/index.d.ts +0 -3
- package/es/components/productCard/components/Sales/index.d.ts +0 -3
- package/es/components/productCard/index.d.ts +0 -5
- 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/virtual-keyboard/Amount/index.d.ts +0 -22
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -19
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Number/index.d.ts +0 -13
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -11
- package/es/components/virtual-keyboard/index.d.ts +0 -14
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -9
- package/lib/components/pisellToast/index.d.ts +0 -16
- package/lib/components/productCard/components/Header/index.d.ts +0 -3
- package/lib/components/productCard/components/Sales/index.d.ts +0 -3
- package/lib/components/productCard/index.d.ts +0 -5
- 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/virtual-keyboard/Amount/index.d.ts +0 -22
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -19
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Number/index.d.ts +0 -13
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -11
- package/lib/components/virtual-keyboard/index.d.ts +0 -14
|
@@ -0,0 +1,195 @@
|
|
|
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
|
+
var _excluded = ["dataSource", "isShowImage", "isShowHolder", "isShowNote", "isShowDelete", "isShowPackageNote", "isShowEditProduct", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onChangeHolder", "type"];
|
|
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
|
+
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(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
|
+
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); }
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
import React, { useMemo, useRef } from 'react';
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import { SwipeAction } from 'antd-mobile';
|
|
14
|
+
import { image as imageAli, locales } from '@pisell/utils';
|
|
15
|
+
import localeTexts from "./locales";
|
|
16
|
+
import BasicInfo from "./components/basicInfo";
|
|
17
|
+
import DiscountReason from "./components/discountReason";
|
|
18
|
+
import Holders from "./components/holders";
|
|
19
|
+
import TimeRange from "./components/timeRange";
|
|
20
|
+
import Resources from "./components/resources";
|
|
21
|
+
import Packages from "./components/packages";
|
|
22
|
+
import Sales from "./components/sales";
|
|
23
|
+
import "./index.less";
|
|
24
|
+
import Iconfont from "../../iconfont";
|
|
25
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
26
|
+
import Items from "../components/MultiDay";
|
|
27
|
+
import AmountFooter from "../components/AmountFooter";
|
|
28
|
+
import UseOpenNote from "../hooks/useOpenNote";
|
|
29
|
+
import Note from "../components/Note";
|
|
30
|
+
import Action from "../components/Action";
|
|
31
|
+
import { defaultValue } from "../status";
|
|
32
|
+
export var PREFIX = 'pisell-cart-sku-card';
|
|
33
|
+
var CartSkuCard = function CartSkuCard(props) {
|
|
34
|
+
var _context$appHelper$ut;
|
|
35
|
+
var _props$dataSource = props.dataSource,
|
|
36
|
+
dataSource = _props$dataSource === void 0 ? defaultValue.dataSource : _props$dataSource,
|
|
37
|
+
_props$isShowImage = props.isShowImage,
|
|
38
|
+
isShowImage = _props$isShowImage === void 0 ? defaultValue.isShowImage : _props$isShowImage,
|
|
39
|
+
_props$isShowHolder = props.isShowHolder,
|
|
40
|
+
isShowHolder = _props$isShowHolder === void 0 ? defaultValue.isShowHolder : _props$isShowHolder,
|
|
41
|
+
_props$isShowNote = props.isShowNote,
|
|
42
|
+
isShowNote = _props$isShowNote === void 0 ? defaultValue.isShowNote : _props$isShowNote,
|
|
43
|
+
_props$isShowDelete = props.isShowDelete,
|
|
44
|
+
isShowDelete = _props$isShowDelete === void 0 ? defaultValue.isShowDelete : _props$isShowDelete,
|
|
45
|
+
_props$isShowPackageN = props.isShowPackageNote,
|
|
46
|
+
isShowPackageNote = _props$isShowPackageN === void 0 ? defaultValue.isShowPackageNote : _props$isShowPackageN,
|
|
47
|
+
_props$isShowEditProd = props.isShowEditProduct,
|
|
48
|
+
isShowEditProduct = _props$isShowEditProd === void 0 ? defaultValue.isShowEditProduct : _props$isShowEditProd,
|
|
49
|
+
onEditProduct = props.onEditProduct,
|
|
50
|
+
_onAction = props.onAction,
|
|
51
|
+
onDelete = props.onDelete,
|
|
52
|
+
onNote = props.onNote,
|
|
53
|
+
onLike = props.onLike,
|
|
54
|
+
onCard = props.onCard,
|
|
55
|
+
onChangeResource = props.onChangeResource,
|
|
56
|
+
onChangeHolder = props.onChangeHolder,
|
|
57
|
+
type = props.type,
|
|
58
|
+
other = _objectWithoutProperties(props, _excluded);
|
|
59
|
+
var useOpenNoteRef = useRef();
|
|
60
|
+
var context = useEngineContext();
|
|
61
|
+
locales.init(localeTexts, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale')) || 'en');
|
|
62
|
+
console.log('prodcut props', props);
|
|
63
|
+
var isShowAction = dataSource.isShowAction,
|
|
64
|
+
actionText = dataSource.actionText;
|
|
65
|
+
var rightActions = useMemo(function () {
|
|
66
|
+
var deleteAction = {
|
|
67
|
+
key: 'delete',
|
|
68
|
+
text: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Iconfont, {
|
|
69
|
+
type: "pisell2-trash-01",
|
|
70
|
+
style: {
|
|
71
|
+
fontSize: 20,
|
|
72
|
+
marginRight: 4
|
|
73
|
+
}
|
|
74
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
75
|
+
style: {
|
|
76
|
+
fontSize: 12
|
|
77
|
+
}
|
|
78
|
+
}, locales.getText('pisell2.cart.sku-card.actions.delete'))),
|
|
79
|
+
color: 'danger',
|
|
80
|
+
onClick: function onClick(e) {
|
|
81
|
+
e.preventDefault();
|
|
82
|
+
e.stopPropagation();
|
|
83
|
+
onDelete === null || onDelete === void 0 || onDelete(dataSource);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var actions = [];
|
|
87
|
+
if (isShowDelete) {
|
|
88
|
+
actions.push(deleteAction);
|
|
89
|
+
}
|
|
90
|
+
return actions;
|
|
91
|
+
}, [dataSource, onDelete, isShowDelete]);
|
|
92
|
+
var hideDivider = useMemo(function () {
|
|
93
|
+
var bundle = dataSource.bundle,
|
|
94
|
+
relation_products = dataSource.relation_products;
|
|
95
|
+
return (bundle === null || bundle === void 0 ? void 0 : bundle.length) || (relation_products === null || relation_products === void 0 ? void 0 : relation_products.length);
|
|
96
|
+
}, [dataSource]);
|
|
97
|
+
var renderA2 = function renderA2() {
|
|
98
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BasicInfo, {
|
|
99
|
+
isShowImage: isShowImage,
|
|
100
|
+
dataSource: dataSource,
|
|
101
|
+
isMainProduct: true
|
|
102
|
+
}), /*#__PURE__*/React.createElement(DiscountReason, {
|
|
103
|
+
dataSource: dataSource
|
|
104
|
+
}), isShowNote ? /*#__PURE__*/React.createElement(Note, _extends({}, other, {
|
|
105
|
+
item: dataSource,
|
|
106
|
+
openNote: function openNote() {
|
|
107
|
+
useOpenNoteRef.current.open({
|
|
108
|
+
item: dataSource
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
})) : null);
|
|
112
|
+
};
|
|
113
|
+
var renderA5 = function renderA5() {
|
|
114
|
+
var _dataSource$bundle, _dataSource$items;
|
|
115
|
+
var image = dataSource.image,
|
|
116
|
+
name = dataSource.name;
|
|
117
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isShowDelete ? /*#__PURE__*/React.createElement("div", {
|
|
118
|
+
className: "".concat(PREFIX, "__delete-btn"),
|
|
119
|
+
onClick: function onClick(e) {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
e.stopPropagation();
|
|
122
|
+
onDelete === null || onDelete === void 0 || onDelete(dataSource);
|
|
123
|
+
}
|
|
124
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
125
|
+
type: "pisell2-trash-01"
|
|
126
|
+
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
127
|
+
className: "".concat(PREFIX, "__content")
|
|
128
|
+
}, isShowImage && image && /*#__PURE__*/React.createElement("img", {
|
|
129
|
+
src: imageAli.ali(image, 64),
|
|
130
|
+
className: "product-cover"
|
|
131
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
132
|
+
className: "product-info"
|
|
133
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
134
|
+
className: "product-name"
|
|
135
|
+
}, name), /*#__PURE__*/React.createElement(Holders, {
|
|
136
|
+
dataSource: dataSource
|
|
137
|
+
}))), /*#__PURE__*/React.createElement(TimeRange, {
|
|
138
|
+
dataSource: dataSource
|
|
139
|
+
}), /*#__PURE__*/React.createElement(Resources, {
|
|
140
|
+
dataSource: dataSource
|
|
141
|
+
}), /*#__PURE__*/React.createElement(Packages, {
|
|
142
|
+
dataSource: dataSource,
|
|
143
|
+
isShowImage: isShowImage
|
|
144
|
+
}), /*#__PURE__*/React.createElement(Sales, {
|
|
145
|
+
dataSource: dataSource,
|
|
146
|
+
hideDivider: !!(dataSource !== null && dataSource !== void 0 && (_dataSource$bundle = dataSource.bundle) !== null && _dataSource$bundle !== void 0 && _dataSource$bundle.length)
|
|
147
|
+
}), (_dataSource$items = dataSource.items) !== null && _dataSource$items !== void 0 && _dataSource$items.length ? /*#__PURE__*/React.createElement(Items, {
|
|
148
|
+
dataSource: dataSource,
|
|
149
|
+
hideDivider: hideDivider
|
|
150
|
+
}) : /*#__PURE__*/React.createElement(AmountFooter, {
|
|
151
|
+
item: dataSource,
|
|
152
|
+
hideDivider: hideDivider,
|
|
153
|
+
type: "total"
|
|
154
|
+
}), /*#__PURE__*/React.createElement(DiscountReason, {
|
|
155
|
+
dataSource: dataSource
|
|
156
|
+
}), isShowNote ? /*#__PURE__*/React.createElement(Note, _extends({}, other, {
|
|
157
|
+
item: dataSource,
|
|
158
|
+
openNote: function openNote() {
|
|
159
|
+
useOpenNoteRef.current.open({
|
|
160
|
+
item: dataSource
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
})) : null, isShowAction && actionText ? /*#__PURE__*/React.createElement(Action, {
|
|
164
|
+
item: dataSource,
|
|
165
|
+
onAction: function onAction() {
|
|
166
|
+
return _onAction === null || _onAction === void 0 ? void 0 : _onAction(dataSource);
|
|
167
|
+
}
|
|
168
|
+
}) : null);
|
|
169
|
+
};
|
|
170
|
+
var renderContent = function renderContent() {
|
|
171
|
+
if (type === 'a5') {
|
|
172
|
+
return renderA5();
|
|
173
|
+
}
|
|
174
|
+
return renderA2();
|
|
175
|
+
};
|
|
176
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SwipeAction, {
|
|
177
|
+
className: classNames("".concat(PREFIX, "-wrapper")),
|
|
178
|
+
rightActions: rightActions
|
|
179
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
180
|
+
className: classNames(PREFIX, "".concat(PREFIX, "--").concat(type)),
|
|
181
|
+
onClick: function onClick(e) {
|
|
182
|
+
e.preventDefault();
|
|
183
|
+
e.stopPropagation();
|
|
184
|
+
onCard === null || onCard === void 0 || onCard(dataSource);
|
|
185
|
+
}
|
|
186
|
+
}, renderContent())), /*#__PURE__*/React.createElement(UseOpenNote, {
|
|
187
|
+
ref: useOpenNoteRef,
|
|
188
|
+
onNoteChange: function onNoteChange(e) {
|
|
189
|
+
onNote === null || onNote === void 0 || onNote(_objectSpread(_objectSpread({}, dataSource), {}, {
|
|
190
|
+
note: e || ''
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
193
|
+
}));
|
|
194
|
+
};
|
|
195
|
+
export default CartSkuCard;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.pisell-cart-sku-card-wrapper {
|
|
2
|
+
border-radius: 4px;
|
|
3
|
+
background: var(--Base-White, #fff);
|
|
4
|
+
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.pisell-cart-sku-card {
|
|
8
|
+
padding: 4px 8px 4px 4px;
|
|
9
|
+
border-radius: inherit;
|
|
10
|
+
user-select: none;
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
&__delete-btn {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
position: absolute;
|
|
16
|
+
padding: 10px;
|
|
17
|
+
top: 0;
|
|
18
|
+
right: 0;
|
|
19
|
+
|
|
20
|
+
> span {
|
|
21
|
+
color: #667085;
|
|
22
|
+
font-size: 20px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__content {
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: 4px;
|
|
29
|
+
|
|
30
|
+
img {
|
|
31
|
+
width: 48px;
|
|
32
|
+
height: 48px;
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
border-radius: 6px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.product-info {
|
|
38
|
+
flex: 1;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 4px;
|
|
42
|
+
flex: 1 0 0;
|
|
43
|
+
flex-wrap: wrap;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
min-height: 30px;
|
|
46
|
+
|
|
47
|
+
.product-name {
|
|
48
|
+
color: var(--Gray-900, #101828);
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
font-style: normal;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
line-height: 20px;
|
|
53
|
+
width: 100%;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.product-price {
|
|
60
|
+
color: var(--Gray-900, #101828);
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
font-style: normal;
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
line-height: 20px;
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
import localeTexts from "../locales";
|
|
8
|
+
export default {
|
|
9
|
+
en: _objectSpread(_objectSpread({}, localeTexts.en), {}, {
|
|
10
|
+
'pisell2.product.card.discount.reason': 'Discount reason',
|
|
11
|
+
'pisell2.cart.sku-card.more': 'more...',
|
|
12
|
+
'pisell2.cart.sku-card.packages.title': 'Items in package',
|
|
13
|
+
'pisell2.cart.sku-card.sales.title': 'Sales',
|
|
14
|
+
'pisell2.cart.sku-card.actions.delete': 'Delete'
|
|
15
|
+
}),
|
|
16
|
+
'zh-CN': _objectSpread(_objectSpread({}, localeTexts['zh-CN']), {}, {
|
|
17
|
+
'pisell2.product.card.discount.reason': '折扣原因',
|
|
18
|
+
'pisell2.cart.sku-card.more': '更多……',
|
|
19
|
+
'pisell2.cart.sku-card.packages.title': '包含的商品',
|
|
20
|
+
'pisell2.cart.sku-card.sales.title': '销售',
|
|
21
|
+
'pisell2.cart.sku-card.actions.delete': '删除'
|
|
22
|
+
}),
|
|
23
|
+
'zh-HK': _objectSpread(_objectSpread({}, localeTexts['zh-HK']), {}, {
|
|
24
|
+
'pisell2.product.card.discount.reason': '折扣原因',
|
|
25
|
+
'pisell2.cart.sku-card.more': '更多……',
|
|
26
|
+
'pisell2.cart.sku-card.packages.title': '包含的商品',
|
|
27
|
+
'pisell2.cart.sku-card.sales.title': '銷售',
|
|
28
|
+
'pisell2.cart.sku-card.actions.delete': '刪除'
|
|
29
|
+
})
|
|
30
|
+
};
|
|
@@ -26,7 +26,8 @@ var Header = function Header(props) {
|
|
|
26
26
|
name = item.name,
|
|
27
27
|
price = item.price,
|
|
28
28
|
symbol = item.symbol,
|
|
29
|
-
disabled = item.disabled
|
|
29
|
+
disabled = item.disabled,
|
|
30
|
+
relation_products = item.relation_products;
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* @title: 是否显示价格
|
|
@@ -39,8 +40,8 @@ var Header = function Header(props) {
|
|
|
39
40
|
var showPrice = useMemo(function () {
|
|
40
41
|
// 如果有报价单则不需要显示价格
|
|
41
42
|
|
|
42
|
-
return (bundle === null || bundle === void 0 ? void 0 : bundle.length) > 0 || (options === null || options === void 0 ? void 0 : options.length) > 0;
|
|
43
|
-
}, [bundle, options]);
|
|
43
|
+
return (bundle === null || bundle === void 0 ? void 0 : bundle.length) > 0 || (options === null || options === void 0 ? void 0 : options.length) > 0 || ((relation_products === null || relation_products === void 0 ? void 0 : relation_products.length) || 0) > 0;
|
|
44
|
+
}, [bundle, options, relation_products]);
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
47
|
* @title: 样式是否居中
|
|
@@ -20,10 +20,10 @@ var Sales = function Sales(_ref) {
|
|
|
20
20
|
other_products = other_products.map(function (p) {
|
|
21
21
|
return _objectSpread(_objectSpread({}, p), {}, {
|
|
22
22
|
title: p === null || p === void 0 ? void 0 : p.product_title,
|
|
23
|
-
price: p === null || p === void 0 ? void 0 : p.
|
|
23
|
+
price: p === null || p === void 0 ? void 0 : p.selling_price,
|
|
24
24
|
symbol: item.symbol,
|
|
25
25
|
num: p === null || p === void 0 ? void 0 : p.product_quantity,
|
|
26
|
-
total: p === null || p === void 0 ? void 0 : p.
|
|
26
|
+
total: p === null || p === void 0 ? void 0 : p.selling_price
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
return ((_other_products = other_products) === null || _other_products === void 0 ? void 0 : _other_products.length) > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -27,6 +27,7 @@ import { defaultValue } from "./status";
|
|
|
27
27
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
28
28
|
import Warning from "./components/Warning";
|
|
29
29
|
import "./index.less";
|
|
30
|
+
import CartSkuCard from "./cartSkuCard";
|
|
30
31
|
var ProductCard = function ProductCard(props) {
|
|
31
32
|
var _utils$storage, _dataSource$items;
|
|
32
33
|
var context = useEngineContext();
|
|
@@ -173,4 +174,5 @@ var ProductCard = function ProductCard(props) {
|
|
|
173
174
|
}
|
|
174
175
|
}))));
|
|
175
176
|
};
|
|
177
|
+
ProductCard.V2 = CartSkuCard;
|
|
176
178
|
export default ProductCard;
|
|
@@ -3,7 +3,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
3
3
|
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."); }
|
|
4
4
|
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); }
|
|
5
5
|
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; }
|
|
6
|
-
function _iterableToArrayLimit(
|
|
6
|
+
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; } }
|
|
7
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
8
|
import React, { useMemo } from "react";
|
|
9
9
|
import { QRCode as AntQRCode, Modal } from "antd";
|
|
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
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
3
|
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); }
|
|
4
4
|
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; }
|
|
5
|
-
function _iterableToArrayLimit(
|
|
5
|
+
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; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useMemo } from "react";
|
|
8
8
|
import { Menu, Divider } from "antd";
|
|
@@ -1,11 +1,11 @@
|
|
|
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
|
var _excluded = ["children", "isActive"];
|
|
3
3
|
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); }
|
|
4
|
-
function ownKeys(
|
|
5
|
-
function _objectSpread(
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
6
|
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; }
|
|
7
|
-
function _toPropertyKey(
|
|
8
|
-
function _toPrimitive(
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
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); }
|
|
9
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
11
|
import React, { Children, isValidElement, cloneElement } from "react";
|
|
@@ -30,7 +30,7 @@ var ViewMode = function ViewMode(props) {
|
|
|
30
30
|
});
|
|
31
31
|
}, [modeList]);
|
|
32
32
|
var handleClick = function handleClick(e) {
|
|
33
|
-
onChange === null || onChange === void 0
|
|
33
|
+
onChange === null || onChange === void 0 || onChange(e.key);
|
|
34
34
|
};
|
|
35
35
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
36
36
|
menu: {
|
|
@@ -1,7 +1,7 @@
|
|
|
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 _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; }
|
|
3
|
-
function _toPropertyKey(
|
|
4
|
-
function _toPrimitive(
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
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); }
|
|
5
5
|
import React, { useMemo } from "react";
|
|
6
6
|
import classNames from "classnames";
|
|
7
7
|
import { Tooltip } from "antd";
|
|
@@ -10,7 +10,6 @@ import { getValueByKeys } from "../../../../../Table/fields/utils";
|
|
|
10
10
|
import "./index.less";
|
|
11
11
|
var prefix = "pisell-lowcode-";
|
|
12
12
|
var RenderFields = function RenderFields(props) {
|
|
13
|
-
var _classNames;
|
|
14
13
|
var fields = props.fields,
|
|
15
14
|
columnsMap = props.columnsMap,
|
|
16
15
|
showMode = props.showMode,
|
|
@@ -40,7 +39,7 @@ var RenderFields = function RenderFields(props) {
|
|
|
40
39
|
return fieldsList;
|
|
41
40
|
}, [fields, columnsMap, record, isShowLabel]);
|
|
42
41
|
return /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className: classNames("".concat(prefix, "gallery-render-fields-wrap"), (
|
|
42
|
+
className: classNames("".concat(prefix, "gallery-render-fields-wrap"), _defineProperty(_defineProperty({}, "".concat(prefix, "gallery-render-fields-wrap-inline"), showMode === "inline"), "".concat(prefix, "gallery-render-fields-wrap-block"), showMode === "block"))
|
|
44
43
|
}, fieldContent);
|
|
45
44
|
};
|
|
46
45
|
export default RenderFields;
|
|
@@ -1,10 +1,10 @@
|
|
|
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
|
import React from "react";
|
|
9
9
|
import { Button } from "antd";
|
|
10
10
|
import "./index.less";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
4
|
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; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
7
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
9
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -12,7 +12,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
12
12
|
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."); }
|
|
13
13
|
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); }
|
|
14
14
|
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; }
|
|
15
|
-
function _iterableToArrayLimit(
|
|
15
|
+
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; } }
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
17
|
import IconFont from "../../../iconfont";
|
|
18
18
|
import { Form, Input, Popover, message } from "antd";
|
|
@@ -1,12 +1,12 @@
|
|
|
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 _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; }
|
|
3
|
-
function _toPropertyKey(
|
|
4
|
-
function _toPrimitive(
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
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); }
|
|
5
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
6
|
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."); }
|
|
7
7
|
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); }
|
|
8
8
|
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; }
|
|
9
|
-
function _iterableToArrayLimit(
|
|
9
|
+
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; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import IconFont from "../../../iconfont";
|
|
12
12
|
// import Search from "@/components/Search";
|
|
@@ -26,7 +26,7 @@ var Edit = function Edit(props, ref) {
|
|
|
26
26
|
ref: ref,
|
|
27
27
|
value: dayjsVal,
|
|
28
28
|
onChange: function onChange(date, dateStr) {
|
|
29
|
-
_onChange === null || _onChange === void 0
|
|
29
|
+
_onChange === null || _onChange === void 0 || _onChange(dateStr);
|
|
30
30
|
},
|
|
31
31
|
onPressEnter: onPressEnter,
|
|
32
32
|
onBlur: onBlur,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
4
|
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; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
7
|
import React, { forwardRef, useRef } from "react";
|
|
8
8
|
import { Form } from "antd";
|
|
9
9
|
import Input from "../../../../../input";
|
|
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
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
3
|
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); }
|
|
4
4
|
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; }
|
|
5
|
-
function _iterableToArrayLimit(
|
|
5
|
+
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; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import dayjs from "dayjs";
|
|
8
8
|
import { isUndefined } from "@pisell/utils";
|
|
@@ -19,10 +19,10 @@ var Show = function Show(props) {
|
|
|
19
19
|
contentClassName = props.contentClassName,
|
|
20
20
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
21
21
|
var onClick = function onClick() {
|
|
22
|
-
var _modal$state
|
|
23
|
-
if (action && modal !== null && modal !== void 0 && (_modal$state = modal.state) !== null && _modal$state !== void 0 && (_modal$state
|
|
24
|
-
var _modal$state2
|
|
25
|
-
modal === null || modal === void 0
|
|
22
|
+
var _modal$state;
|
|
23
|
+
if (action && modal !== null && modal !== void 0 && (_modal$state = modal.state) !== null && _modal$state !== void 0 && (_modal$state = _modal$state.utils) !== null && _modal$state !== void 0 && _modal$state.action) {
|
|
24
|
+
var _modal$state2;
|
|
25
|
+
modal === null || modal === void 0 || (_modal$state2 = modal.state) === null || _modal$state2 === void 0 || (_modal$state2 = _modal$state2.utils) === null || _modal$state2 === void 0 || _modal$state2.action({
|
|
26
26
|
type: action,
|
|
27
27
|
data: record
|
|
28
28
|
});
|