@pisell/materials 2.2.35 → 2.2.37
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 +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +30 -30
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -23
- package/es/components/cardPro/index.d.ts +4 -0
- package/es/components/cardPro/index.js +69 -0
- package/es/components/cardPro/index.less +55 -0
- package/es/components/collapse/index.d.ts +15 -0
- package/es/components/collapse/index.js +80 -0
- package/es/components/collapse/index.less +0 -0
- package/es/components/productCard/components/Action/index.d.ts +4 -0
- package/es/components/productCard/components/Action/index.js +21 -0
- package/es/components/productCard/components/Action/index.less +14 -0
- package/es/components/productCard/components/AmountFooter/index.d.ts +4 -0
- package/es/components/productCard/components/AmountFooter/index.js +38 -0
- package/es/components/productCard/components/AmountFooter/index.less +39 -0
- package/es/components/productCard/components/Divider/index.d.ts +4 -0
- package/es/components/productCard/components/Divider/index.js +11 -0
- package/es/components/productCard/components/Divider/index.less +13 -0
- package/es/components/productCard/components/Header/index.d.ts +4 -0
- package/es/components/productCard/components/Header/index.js +70 -0
- package/es/components/productCard/components/Header/index.less +63 -0
- package/es/components/productCard/components/Note/index.d.ts +4 -0
- package/es/components/productCard/components/Note/index.js +25 -0
- package/es/components/productCard/components/Note/index.less +20 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/index.js +96 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/index.less +53 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +33 -0
- package/es/components/productCard/components/Packages/components/options/index.d.ts +4 -0
- package/es/components/productCard/components/Packages/components/options/index.js +23 -0
- package/es/components/productCard/components/Packages/components/options/index.less +29 -0
- package/es/components/productCard/components/Packages/index.d.ts +4 -0
- package/es/components/productCard/components/Packages/index.js +32 -0
- package/es/components/productCard/components/Packages/index.less +17 -0
- package/es/components/productCard/components/Packages/utils.d.ts +20 -0
- package/es/components/productCard/components/Packages/utils.js +40 -0
- package/es/components/productCard/components/Sales/index.d.ts +4 -0
- package/es/components/productCard/components/Sales/index.js +39 -0
- package/es/components/productCard/components/Sales/index.less +18 -0
- package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/es/components/productCard/components/Time/components/Like/index.js +26 -0
- package/es/components/productCard/components/Time/components/Like/index.less +6 -0
- package/es/components/productCard/components/Time/components/Like/like-heart.png +0 -0
- package/es/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
- package/es/components/productCard/components/Time/index.d.ts +4 -0
- package/es/components/productCard/components/Time/index.js +44 -0
- package/es/components/productCard/components/Time/index.less +35 -0
- package/es/components/productCard/hooks/useOpenNote.d.ts +3 -0
- package/es/components/productCard/hooks/useOpenNote.js +66 -0
- package/es/components/productCard/index.d.ts +5 -0
- package/es/components/productCard/index.js +131 -0
- package/es/components/productCard/index.less +53 -0
- package/es/components/productCard/locales.d.ts +42 -0
- package/es/components/productCard/locales.js +47 -0
- package/es/components/productCard/status.d.ts +9 -0
- package/es/components/productCard/status.js +15 -0
- package/es/components/productCard/types.d.ts +17 -0
- package/es/components/productCard/types.js +1 -0
- package/es/components/productCard/utils.d.ts +162 -0
- package/es/components/productCard/utils.js +700 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/index.d.ts +4 -2
- package/es/index.js +7 -2
- package/lib/components/cardPro/index.d.ts +4 -0
- package/lib/components/cardPro/index.js +101 -0
- package/lib/components/cardPro/index.less +55 -0
- package/lib/components/collapse/index.d.ts +15 -0
- package/lib/components/collapse/index.js +83 -0
- package/lib/components/collapse/index.less +0 -0
- package/lib/components/productCard/components/Action/index.d.ts +4 -0
- package/lib/components/productCard/components/Action/index.js +55 -0
- package/lib/components/productCard/components/Action/index.less +14 -0
- package/lib/components/productCard/components/AmountFooter/index.d.ts +4 -0
- package/lib/components/productCard/components/AmountFooter/index.js +61 -0
- package/lib/components/productCard/components/AmountFooter/index.less +39 -0
- package/lib/components/productCard/components/Divider/index.d.ts +4 -0
- package/lib/components/productCard/components/Divider/index.js +50 -0
- package/lib/components/productCard/components/Divider/index.less +13 -0
- package/lib/components/productCard/components/Header/index.d.ts +4 -0
- package/lib/components/productCard/components/Header/index.js +82 -0
- package/lib/components/productCard/components/Header/index.less +63 -0
- package/lib/components/productCard/components/Note/index.d.ts +4 -0
- package/lib/components/productCard/components/Note/index.js +56 -0
- package/lib/components/productCard/components/Note/index.less +20 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.js +93 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.less +53 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +52 -0
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +4 -0
- package/lib/components/productCard/components/Packages/components/options/index.js +73 -0
- package/lib/components/productCard/components/Packages/components/options/index.less +29 -0
- package/lib/components/productCard/components/Packages/index.d.ts +4 -0
- package/lib/components/productCard/components/Packages/index.js +56 -0
- package/lib/components/productCard/components/Packages/index.less +17 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +20 -0
- package/lib/components/productCard/components/Packages/utils.js +44 -0
- package/lib/components/productCard/components/Sales/index.d.ts +4 -0
- package/lib/components/productCard/components/Sales/index.js +61 -0
- package/lib/components/productCard/components/Sales/index.less +18 -0
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/lib/components/productCard/components/Time/components/Like/index.js +64 -0
- package/lib/components/productCard/components/Time/components/Like/index.less +6 -0
- package/lib/components/productCard/components/Time/components/Like/like-heart.png +0 -0
- package/lib/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
- package/lib/components/productCard/components/Time/index.d.ts +4 -0
- package/lib/components/productCard/components/Time/index.js +64 -0
- package/lib/components/productCard/components/Time/index.less +35 -0
- package/lib/components/productCard/hooks/useOpenNote.d.ts +3 -0
- package/lib/components/productCard/hooks/useOpenNote.js +84 -0
- package/lib/components/productCard/index.d.ts +5 -0
- package/lib/components/productCard/index.js +160 -0
- package/lib/components/productCard/index.less +53 -0
- package/lib/components/productCard/locales.d.ts +42 -0
- package/lib/components/productCard/locales.js +65 -0
- package/lib/components/productCard/status.d.ts +9 -0
- package/lib/components/productCard/status.js +36 -0
- package/lib/components/productCard/types.d.ts +17 -0
- package/lib/components/productCard/types.js +17 -0
- package/lib/components/productCard/utils.d.ts +162 -0
- package/lib/components/productCard/utils.js +613 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.js +38 -32
- package/lowcode/card-pro/meta.ts +338 -0
- package/lowcode/card-pro/snippe.ts +39 -0
- package/lowcode/collapse/meta.ts +85 -1
- package/lowcode/date-picker.range-picker/meta.ts +20 -0
- package/lowcode/product-card/meta.ts +92 -0
- package/lowcode/product-card/snippets.ts +23 -0
- package/package.json +2 -2
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["dataSource", "isShowImage", "isShowHolder", "isShowNote", "isShowDelete", "isShowPackageNote", "onAction", "onDelete", "onNote", "onLike", "onCard"];
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
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); }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
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 { Alert } from 'antd';
|
|
14
|
+
import { locales } from '@pisell/utils';
|
|
15
|
+
import CardPro from "../cardPro";
|
|
16
|
+
import Header from "./components/Header";
|
|
17
|
+
import Time from "./components/Time";
|
|
18
|
+
import Packages from "./components/Packages";
|
|
19
|
+
import Sales from "./components/Sales";
|
|
20
|
+
import AmountFooter from "./components/AmountFooter";
|
|
21
|
+
import Note from "./components/Note";
|
|
22
|
+
import Action from "./components/Action";
|
|
23
|
+
import UseOpenNote from "./hooks/useOpenNote";
|
|
24
|
+
import localeTexts from "./locales";
|
|
25
|
+
import "./index.less";
|
|
26
|
+
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
27
|
+
var ProductCard = function ProductCard(props) {
|
|
28
|
+
var _dataSource$_extend, _dataSource$_extend$d, _classNames;
|
|
29
|
+
var dataSource = props.dataSource,
|
|
30
|
+
_props$isShowImage = props.isShowImage,
|
|
31
|
+
isShowImage = _props$isShowImage === void 0 ? true : _props$isShowImage,
|
|
32
|
+
_props$isShowHolder = props.isShowHolder,
|
|
33
|
+
isShowHolder = _props$isShowHolder === void 0 ? true : _props$isShowHolder,
|
|
34
|
+
_props$isShowNote = props.isShowNote,
|
|
35
|
+
isShowNote = _props$isShowNote === void 0 ? true : _props$isShowNote,
|
|
36
|
+
_props$isShowDelete = props.isShowDelete,
|
|
37
|
+
isShowDelete = _props$isShowDelete === void 0 ? true : _props$isShowDelete,
|
|
38
|
+
_props$isShowPackageN = props.isShowPackageNote,
|
|
39
|
+
isShowPackageNote = _props$isShowPackageN === void 0 ? true : _props$isShowPackageN,
|
|
40
|
+
_onAction = props.onAction,
|
|
41
|
+
_onDelete = props.onDelete,
|
|
42
|
+
onNote = props.onNote,
|
|
43
|
+
_onLike = props.onLike,
|
|
44
|
+
onCard = props.onCard,
|
|
45
|
+
other = _objectWithoutProperties(props, _excluded);
|
|
46
|
+
var useOpenNoteRef = useRef();
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @title: 显示图片
|
|
50
|
+
* @description:
|
|
51
|
+
* @param {*} useMemo
|
|
52
|
+
* @return {*}
|
|
53
|
+
* @Author: WangHan
|
|
54
|
+
* @Date: 2024-11-21 19:33
|
|
55
|
+
*/
|
|
56
|
+
var showImage = useMemo(function () {
|
|
57
|
+
return isShowImage && (dataSource === null || dataSource === void 0 ? void 0 : dataSource.cover);
|
|
58
|
+
}, [isShowImage, dataSource === null || dataSource === void 0 ? void 0 : dataSource.cover]);
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @title: 是否隐藏footer分割线
|
|
62
|
+
* @description:
|
|
63
|
+
* @param {*} useMemo
|
|
64
|
+
* @return {*}
|
|
65
|
+
* @Author: WangHan
|
|
66
|
+
* @Date: 2024-11-23 13:30
|
|
67
|
+
*/
|
|
68
|
+
var hideDivider = useMemo(function () {
|
|
69
|
+
var _dataSource$bundle, _dataSource$relation_;
|
|
70
|
+
return (dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$bundle = dataSource.bundle) === null || _dataSource$bundle === void 0 ? void 0 : _dataSource$bundle.length) || (dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$relation_ = dataSource.relation_details) === null || _dataSource$relation_ === void 0 ? void 0 : _dataSource$relation_.length);
|
|
71
|
+
}, [dataSource === null || dataSource === void 0 ? void 0 : dataSource.bundle, dataSource === null || dataSource === void 0 ? void 0 : dataSource.relation_details]);
|
|
72
|
+
return /*#__PURE__*/React.createElement(CardPro, {
|
|
73
|
+
className: classNames('pisell-lowcode-product-card', (_classNames = {}, _defineProperty(_classNames, 'pisell-lowcode-product-card-image', !showImage), _defineProperty(_classNames, 'pisell-lowcode-normal-product-card', !showImage && !(dataSource !== null && dataSource !== void 0 && (_dataSource$_extend = dataSource._extend) !== null && _dataSource$_extend !== void 0 && (_dataSource$_extend$d = _dataSource$_extend.date) !== null && _dataSource$_extend$d !== void 0 && _dataSource$_extend$d.value)), _classNames)),
|
|
74
|
+
key: dataSource === null || dataSource === void 0 ? void 0 : dataSource._id
|
|
75
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
onClick: function onClick(e) {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
e.stopPropagation();
|
|
79
|
+
onCard === null || onCard === void 0 ? void 0 : onCard(dataSource);
|
|
80
|
+
}
|
|
81
|
+
}, /*#__PURE__*/React.createElement(Header, _extends({}, other, {
|
|
82
|
+
item: dataSource,
|
|
83
|
+
isShowImage: isShowImage,
|
|
84
|
+
isShowDelete: isShowDelete,
|
|
85
|
+
showImage: showImage,
|
|
86
|
+
onDelete: function onDelete() {
|
|
87
|
+
_onDelete === null || _onDelete === void 0 ? void 0 : _onDelete(dataSource);
|
|
88
|
+
}
|
|
89
|
+
})), dataSource !== null && dataSource !== void 0 && dataSource._extend ? /*#__PURE__*/React.createElement(Time, {
|
|
90
|
+
item: dataSource,
|
|
91
|
+
isShowHolder: isShowHolder,
|
|
92
|
+
onLike: function onLike(item) {
|
|
93
|
+
return _onLike === null || _onLike === void 0 ? void 0 : _onLike(item);
|
|
94
|
+
}
|
|
95
|
+
}) : null, /*#__PURE__*/React.createElement(Packages, {
|
|
96
|
+
item: dataSource,
|
|
97
|
+
isShowPackageNote: isShowPackageNote
|
|
98
|
+
}), /*#__PURE__*/React.createElement(Sales, {
|
|
99
|
+
item: dataSource,
|
|
100
|
+
isShowNote: isShowNote
|
|
101
|
+
}), /*#__PURE__*/React.createElement(AmountFooter, {
|
|
102
|
+
item: dataSource,
|
|
103
|
+
hideDivider: hideDivider,
|
|
104
|
+
type: "total"
|
|
105
|
+
}), isShowNote ? /*#__PURE__*/React.createElement(Note, _extends({}, other, {
|
|
106
|
+
item: dataSource,
|
|
107
|
+
openNote: function openNote() {
|
|
108
|
+
useOpenNoteRef.current.open({
|
|
109
|
+
item: dataSource
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
})) : null, dataSource !== null && dataSource !== void 0 && dataSource._showAction && dataSource !== null && dataSource !== void 0 && dataSource._actionText ? /*#__PURE__*/React.createElement(Action, {
|
|
113
|
+
item: dataSource,
|
|
114
|
+
onAction: function onAction() {
|
|
115
|
+
return _onAction === null || _onAction === void 0 ? void 0 : _onAction(dataSource);
|
|
116
|
+
}
|
|
117
|
+
}) : null, dataSource !== null && dataSource !== void 0 && dataSource._errorMessage ? /*#__PURE__*/React.createElement(Alert, {
|
|
118
|
+
message: dataSource._errorMessage,
|
|
119
|
+
type: "warning",
|
|
120
|
+
showIcon: true,
|
|
121
|
+
className: "pisell-lowcode-product-card-error"
|
|
122
|
+
}) : null), /*#__PURE__*/React.createElement(UseOpenNote, {
|
|
123
|
+
ref: useOpenNoteRef,
|
|
124
|
+
onNoteChange: function onNoteChange(e) {
|
|
125
|
+
onNote === null || onNote === void 0 ? void 0 : onNote(_objectSpread(_objectSpread({}, dataSource), {}, {
|
|
126
|
+
note: e || ''
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
})));
|
|
130
|
+
};
|
|
131
|
+
export default ProductCard;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.pisell-lowcode-product-card {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
4
|
+
&:hover,
|
|
5
|
+
&:active {
|
|
6
|
+
border: 1px solid var(--Gray-400, #98a2b3);
|
|
7
|
+
background: var(--Gray-50, #f9fafb);
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&:active {
|
|
12
|
+
background: var(--Gray-100, #f2f4f7);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.pisell-lowcode-card-body {
|
|
16
|
+
padding: 0;
|
|
17
|
+
border-radius: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pisell-cardPro-content {
|
|
21
|
+
margin-top: 0 !important;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
position: relative;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
padding: 8px 16px;
|
|
26
|
+
border-radius: 8px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.pisell-lowcode-product-card-image {
|
|
31
|
+
&::before {
|
|
32
|
+
content: '';
|
|
33
|
+
position: absolute;
|
|
34
|
+
left: 0;
|
|
35
|
+
top: 0;
|
|
36
|
+
width: 6px;
|
|
37
|
+
height: 100%;
|
|
38
|
+
background: var(--Blue-400, #53b1fd);
|
|
39
|
+
z-index: 2;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.pisell-lowcode-normal-product-card {
|
|
44
|
+
&::before {
|
|
45
|
+
background: var(--Gray-cool-400, #7d89b0) !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.pisell-lowcode-product-card-error {
|
|
50
|
+
border: none !important;
|
|
51
|
+
margin: 8px -16px -8px;
|
|
52
|
+
border-radius: 0 0 8px 8px;
|
|
53
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
4
|
+
'pisell2.product.card.discount.reason': string;
|
|
5
|
+
'pisell2.product.card.discount.note': string;
|
|
6
|
+
'pisell2.product.card.discount.add.note': string;
|
|
7
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
8
|
+
'pisell2.product.card.confirm': string;
|
|
9
|
+
'pisell2.product.card.cancel': string;
|
|
10
|
+
'pisell2.product.card.note.pla': string;
|
|
11
|
+
'pisell2.product.card.items.package': string;
|
|
12
|
+
'pisell2.product.card.view-all': string;
|
|
13
|
+
'pisell2.product.card.view-less': string;
|
|
14
|
+
};
|
|
15
|
+
'zh-CN': {
|
|
16
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
17
|
+
'pisell2.product.card.discount.reason': string;
|
|
18
|
+
'pisell2.product.card.discount.note': string;
|
|
19
|
+
'pisell2.product.card.discount.add.note': string;
|
|
20
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
21
|
+
'pisell2.product.card.confirm': string;
|
|
22
|
+
'pisell2.product.card.cancel': string;
|
|
23
|
+
'pisell2.product.card.note.pla': string;
|
|
24
|
+
'pisell2.product.card.items.package': string;
|
|
25
|
+
'pisell2.product.card.view-all': string;
|
|
26
|
+
'pisell2.product.card.view-less': string;
|
|
27
|
+
};
|
|
28
|
+
'zh-HK': {
|
|
29
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
30
|
+
'pisell2.product.card.discount.reason': string;
|
|
31
|
+
'pisell2.product.card.discount.note': string;
|
|
32
|
+
'pisell2.product.card.discount.add.note': string;
|
|
33
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
34
|
+
'pisell2.product.card.confirm': string;
|
|
35
|
+
'pisell2.product.card.cancel': string;
|
|
36
|
+
'pisell2.product.card.note.pla': string;
|
|
37
|
+
'pisell2.product.card.items.package': string;
|
|
38
|
+
'pisell2.product.card.view-all': string;
|
|
39
|
+
'pisell2.product.card.view-less': string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'en': {
|
|
3
|
+
'pisell2.product.card.day': function pisell2ProductCardDay(val) {
|
|
4
|
+
return "".concat(val > 1 ? 'days' : 'day');
|
|
5
|
+
},
|
|
6
|
+
'pisell2.product.card.discount.reason': 'Discount reason',
|
|
7
|
+
'pisell2.product.card.discount.note': 'Note',
|
|
8
|
+
'pisell2.product.card.discount.add.note': 'Add note',
|
|
9
|
+
'pisell2.product.card.discount.edit.note': 'Edit note',
|
|
10
|
+
'pisell2.product.card.confirm': 'Confirm',
|
|
11
|
+
'pisell2.product.card.cancel': 'Cancel',
|
|
12
|
+
'pisell2.product.card.note.pla': 'Please enter the note',
|
|
13
|
+
'pisell2.product.card.items.package': 'Items in package',
|
|
14
|
+
'pisell2.product.card.view-all': 'View all',
|
|
15
|
+
'pisell2.product.card.view-less': 'View less'
|
|
16
|
+
},
|
|
17
|
+
'zh-CN': {
|
|
18
|
+
'pisell2.product.card.day': function pisell2ProductCardDay(val) {
|
|
19
|
+
return '天';
|
|
20
|
+
},
|
|
21
|
+
'pisell2.product.card.discount.reason': '折扣原因',
|
|
22
|
+
'pisell2.product.card.discount.note': '备注',
|
|
23
|
+
'pisell2.product.card.discount.add.note': '添加备注',
|
|
24
|
+
'pisell2.product.card.discount.edit.note': '编辑备注',
|
|
25
|
+
'pisell2.product.card.confirm': '确定',
|
|
26
|
+
'pisell2.product.card.cancel': '取消',
|
|
27
|
+
'pisell2.product.card.note.pla': '请输入备注',
|
|
28
|
+
'pisell2.product.card.items.package': '包含的商品',
|
|
29
|
+
'pisell2.product.card.view-all': '查看全部',
|
|
30
|
+
'pisell2.product.card.view-less': '收起'
|
|
31
|
+
},
|
|
32
|
+
'zh-HK': {
|
|
33
|
+
'pisell2.product.card.day': function pisell2ProductCardDay(val) {
|
|
34
|
+
return '天';
|
|
35
|
+
},
|
|
36
|
+
'pisell2.product.card.discount.reason': '折扣原因',
|
|
37
|
+
'pisell2.product.card.discount.note': '備註',
|
|
38
|
+
'pisell2.product.card.discount.add.note': '添加備註',
|
|
39
|
+
'pisell2.product.card.discount.edit.note': '編輯備註',
|
|
40
|
+
'pisell2.product.card.confirm': '確定',
|
|
41
|
+
'pisell2.product.card.cancel': '取消',
|
|
42
|
+
'pisell2.product.card.note.pla': '請輸入備註',
|
|
43
|
+
'pisell2.product.card.items.package': '包含的商品',
|
|
44
|
+
'pisell2.product.card.view-all': '查看全部',
|
|
45
|
+
'pisell2.product.card.view-less': '收起'
|
|
46
|
+
}
|
|
47
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 默认数据
|
|
3
|
+
* @description:
|
|
4
|
+
* @return {*}
|
|
5
|
+
* @Author: WangHan
|
|
6
|
+
* @Date: 2024-12-12 16:49
|
|
7
|
+
*/
|
|
8
|
+
export var defaultValue = {
|
|
9
|
+
dataSource: {},
|
|
10
|
+
isShowImage: true,
|
|
11
|
+
isShowHolder: true,
|
|
12
|
+
isShowNote: true,
|
|
13
|
+
isShowDelete: true,
|
|
14
|
+
isShowPackageNote: true
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 排序总配置
|
|
3
|
+
*/
|
|
4
|
+
export declare type ProductCardTypes = {
|
|
5
|
+
dataSource: any;
|
|
6
|
+
isShowImage?: boolean;
|
|
7
|
+
isShowHolder?: boolean;
|
|
8
|
+
isShowNote?: boolean;
|
|
9
|
+
isShowPackageNote?: boolean;
|
|
10
|
+
isShowDelete?: boolean;
|
|
11
|
+
disabledEdit?: boolean;
|
|
12
|
+
onAction?: (val: any) => void;
|
|
13
|
+
onDelete?: (val: any) => void;
|
|
14
|
+
onNote?: (val: any) => void;
|
|
15
|
+
onLike?: (val: any) => void;
|
|
16
|
+
onCard?: (val: any) => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
declare type RType = (url: string, data?: {} | undefined, config?: {} | undefined) => Promise<any>;
|
|
3
|
+
declare class Request {
|
|
4
|
+
private request;
|
|
5
|
+
constructor();
|
|
6
|
+
setRequest(val: any): void;
|
|
7
|
+
getRequest(): {
|
|
8
|
+
get: RType;
|
|
9
|
+
post: RType;
|
|
10
|
+
put: RType;
|
|
11
|
+
remove: RType;
|
|
12
|
+
custom: RType;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const request: Request;
|
|
16
|
+
/**
|
|
17
|
+
* @title: 格式化持续时长用于展示
|
|
18
|
+
* @description:
|
|
19
|
+
* @param {number} service_times
|
|
20
|
+
* @return {*}
|
|
21
|
+
* @Author: zhiwei.Wang
|
|
22
|
+
* @Date: 2024-04-26 14:00
|
|
23
|
+
*/
|
|
24
|
+
export declare const getDiscountTime: (service_times: number) => string;
|
|
25
|
+
/**
|
|
26
|
+
* @title: 时间切片
|
|
27
|
+
* @description:
|
|
28
|
+
* @param {any} config
|
|
29
|
+
* @param {string} locale
|
|
30
|
+
* @return {*}
|
|
31
|
+
* @Author: zhiwei.Wang
|
|
32
|
+
* @Date: 2024-04-26 13:59
|
|
33
|
+
*/
|
|
34
|
+
export declare const sliceDayIntoFiveMinutes: (config: any, locale: string) => {
|
|
35
|
+
timeSlices: {
|
|
36
|
+
label: string;
|
|
37
|
+
value: string;
|
|
38
|
+
}[];
|
|
39
|
+
durationSlicesBasedOnTime: {
|
|
40
|
+
label: string;
|
|
41
|
+
value: number;
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
44
|
+
export declare const getNowTime: () => string;
|
|
45
|
+
export declare const isNowTime: (time: string) => boolean;
|
|
46
|
+
/**
|
|
47
|
+
* @title: 获取服务的开始时间, 如果是now 转换为当前的时间
|
|
48
|
+
* @description:
|
|
49
|
+
* @param {string} start_time
|
|
50
|
+
* @return {*}
|
|
51
|
+
* @Author: zhiwei.Wang
|
|
52
|
+
* @Date: 2024-04-26 14:03
|
|
53
|
+
*/
|
|
54
|
+
export declare const getServeStartTime: (start_time: string) => string;
|
|
55
|
+
/**
|
|
56
|
+
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
57
|
+
* @description:
|
|
58
|
+
* @param {any} item
|
|
59
|
+
* @param {any} currentDate
|
|
60
|
+
* @return {*}
|
|
61
|
+
* @Author: zhiwei.Wang
|
|
62
|
+
* @Date: 2024-04-26 14:04
|
|
63
|
+
*/
|
|
64
|
+
export declare const getServiceTime: (item: any, currentDate: any) => string;
|
|
65
|
+
export declare const findNextSlice: ({ timeSlices, index, date, }: {
|
|
66
|
+
timeSlices: any[];
|
|
67
|
+
index?: number | undefined;
|
|
68
|
+
date?: string | undefined;
|
|
69
|
+
}) => any;
|
|
70
|
+
export declare const findNextDuration: (current: any, array: any, defaultValue?: any) => any;
|
|
71
|
+
export declare const formatProductListByCategory: (list: any, filterItem: any) => unknown[];
|
|
72
|
+
export declare const getResourceTimeIsUsable: (item: any, cacheItem: any) => any;
|
|
73
|
+
/**
|
|
74
|
+
* @title: 查找是否有可用的time
|
|
75
|
+
* @description:
|
|
76
|
+
* @param {any} resourceItem
|
|
77
|
+
* @return {*}
|
|
78
|
+
* @Author: zhiwei.Wang
|
|
79
|
+
* @Date: 2024-01-09 13:57
|
|
80
|
+
*/
|
|
81
|
+
export declare const formatTimes: (resourceItem: any, cacheItem: any) => any;
|
|
82
|
+
/**
|
|
83
|
+
* @title: 获取店铺的营业结束时间
|
|
84
|
+
* @description:
|
|
85
|
+
* @return {*}
|
|
86
|
+
* @Author: zhiwei.Wang
|
|
87
|
+
* @Date: 2024-02-23 10:00
|
|
88
|
+
*/
|
|
89
|
+
export declare const getShopOpeningHours: () => string;
|
|
90
|
+
/**
|
|
91
|
+
* @title: 对灵活时长进行处理
|
|
92
|
+
* @description:
|
|
93
|
+
* @return {*}
|
|
94
|
+
* @Author: zhiwei.Wang
|
|
95
|
+
* @Date: 2024-02-23 10:00
|
|
96
|
+
*/
|
|
97
|
+
export declare const flexibleObj: {
|
|
98
|
+
create: (num: number) => any;
|
|
99
|
+
getValue: (str: string | number) => number;
|
|
100
|
+
isFlexible: (str: string | number) => boolean;
|
|
101
|
+
add: (current: number | string, duration: number) => any;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* @title: 获取结束时间
|
|
105
|
+
* @description: 取 endDate | 店铺营业时间 最小的那一个
|
|
106
|
+
* @param {any} startDate
|
|
107
|
+
* @param {string} duration
|
|
108
|
+
* @param {any} endDate
|
|
109
|
+
* @return {*}
|
|
110
|
+
* @Author: zhiwei.Wang
|
|
111
|
+
* @Date: 2024-02-23 10:01
|
|
112
|
+
*/
|
|
113
|
+
export declare const getEndDate: (startDate: any, duration: string | number, endDate: any) => any;
|
|
114
|
+
export declare const getServiceTimes: (service: any) => {
|
|
115
|
+
startDate: dayjs.Dayjs;
|
|
116
|
+
endDate: dayjs.Dayjs;
|
|
117
|
+
};
|
|
118
|
+
export declare const getErrorList: (resource: any, cacheItem: any) => {
|
|
119
|
+
label: any;
|
|
120
|
+
type: string;
|
|
121
|
+
}[];
|
|
122
|
+
/**
|
|
123
|
+
* @title: 格式化资源, 添加自定义参数
|
|
124
|
+
* @description:
|
|
125
|
+
* @param {any} resourceItem
|
|
126
|
+
* @return {*}
|
|
127
|
+
* @Author: zhiwei.Wang
|
|
128
|
+
* @Date: 2024-01-09 13:40
|
|
129
|
+
*/
|
|
130
|
+
export declare const formatResource: (resourceItem: any, cacheItem?: any, formatLabel?: any) => any;
|
|
131
|
+
export declare const getLastServer: (list: any) => any;
|
|
132
|
+
export declare const getCacheParams: () => any;
|
|
133
|
+
export declare const deleteCacheParams: () => void;
|
|
134
|
+
/**
|
|
135
|
+
* @title: 创建一个服务商品
|
|
136
|
+
* @description:
|
|
137
|
+
* @param {any} state
|
|
138
|
+
* @param {any} item
|
|
139
|
+
* @return {*}
|
|
140
|
+
* @Author: zhiwei.Wang
|
|
141
|
+
* @Date: 2024-01-26 14:09
|
|
142
|
+
*/
|
|
143
|
+
export declare const getServerItemExtend: (state: any, cacheItem: any, timeObj: any) => any;
|
|
144
|
+
export declare const getProductTotalPrice: (item: any) => number;
|
|
145
|
+
/**
|
|
146
|
+
* @title: 判断 duration
|
|
147
|
+
* @description: 用于处理不同格式的duration
|
|
148
|
+
* @param {number} duration
|
|
149
|
+
* @return {*}
|
|
150
|
+
* @Author: zhiwei.Wang
|
|
151
|
+
* @Date: 2024-02-23 10:02
|
|
152
|
+
*/
|
|
153
|
+
export declare const getDuration: (duration: number | {
|
|
154
|
+
type: string;
|
|
155
|
+
value: number;
|
|
156
|
+
}) => number | {
|
|
157
|
+
type: string;
|
|
158
|
+
value: number;
|
|
159
|
+
} | "flexible";
|
|
160
|
+
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
161
|
+
export declare const getIsEdit: (state: any) => boolean;
|
|
162
|
+
export {};
|