@pisell/materials 1.0.486 → 1.0.488
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +26 -26
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +17 -17
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/collapse/index.js +27 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +1 -1
- package/es/components/pisellQrcode/index.js +3 -2
- package/es/components/pisellWalletPassCard/index.less +3 -1
- package/es/components/productCard/components/Action/index.js +1 -1
- package/es/components/productCard/components/AmountFooter/index.d.ts +1 -1
- package/es/components/productCard/components/AmountFooter/index.js +30 -10
- package/es/components/productCard/components/AmountFooter/index.less +11 -0
- package/es/components/productCard/components/Header/index.js +22 -14
- package/es/components/productCard/components/MultiDay/index.d.ts +4 -0
- package/es/components/productCard/components/MultiDay/index.js +81 -0
- package/es/components/productCard/components/MultiDay/index.less +34 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +11 -5
- package/es/components/productCard/components/Packages/components/options/index.js +2 -2
- package/es/components/productCard/components/Packages/index.js +1 -2
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/components/Time/index.js +15 -13
- package/es/components/productCard/index.d.ts +1 -1
- package/es/components/productCard/index.js +34 -20
- package/es/components/productCard/index.less +3 -2
- package/es/components/productCard/status.d.ts +24 -1
- package/es/components/productCard/status.js +52 -2
- package/es/components/productCard/types.d.ts +60 -1
- package/es/components/productCard/utils.d.ts +10 -144
- package/es/components/productCard/utils.js +36 -673
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/locales/en-US.d.ts +2 -0
- package/es/locales/en-US.js +4 -1
- package/es/locales/zh-CN.d.ts +2 -0
- package/es/locales/zh-CN.js +4 -1
- package/es/locales/zh-TW.d.ts +2 -0
- package/es/locales/zh-TW.js +4 -1
- package/lib/components/collapse/index.js +30 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +1 -1
- package/lib/components/pisellQrcode/index.js +3 -2
- package/lib/components/pisellWalletPassCard/index.less +3 -1
- package/lib/components/productCard/components/Action/index.js +1 -1
- package/lib/components/productCard/components/AmountFooter/index.d.ts +1 -1
- package/lib/components/productCard/components/AmountFooter/index.js +33 -9
- package/lib/components/productCard/components/AmountFooter/index.less +11 -0
- package/lib/components/productCard/components/Header/index.js +16 -8
- package/lib/components/productCard/components/MultiDay/index.d.ts +4 -0
- package/lib/components/productCard/components/MultiDay/index.js +77 -0
- package/lib/components/productCard/components/MultiDay/index.less +34 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -1
- package/lib/components/productCard/components/Packages/components/options/index.js +2 -2
- package/lib/components/productCard/components/Packages/index.js +1 -1
- package/lib/components/productCard/components/Sales/index.js +1 -2
- package/lib/components/productCard/components/Time/index.js +14 -11
- package/lib/components/productCard/index.d.ts +1 -1
- package/lib/components/productCard/index.js +32 -20
- package/lib/components/productCard/index.less +3 -2
- package/lib/components/productCard/status.d.ts +24 -1
- package/lib/components/productCard/status.js +35 -2
- package/lib/components/productCard/types.d.ts +60 -1
- package/lib/components/productCard/utils.d.ts +10 -144
- package/lib/components/productCard/utils.js +30 -567
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/locales/en-US.d.ts +2 -0
- package/lib/locales/en-US.js +4 -1
- package/lib/locales/zh-CN.d.ts +2 -0
- package/lib/locales/zh-CN.js +4 -1
- package/lib/locales/zh-TW.d.ts +2 -0
- package/lib/locales/zh-TW.js +4 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.707 4.293a1 1 0 0 1 0 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l5.293 5.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L16.586 13H5a1 1 0 1 1 0-2h11.586l-5.293-5.293a1 1 0 0 1 0-1.414Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18ZM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11.258-3.976a2 2 0 0 0-2.225 1.308 1 1 0 1 1-1.886-.664 4 4 0 0 1 7.773 1.333c0 1.53-1.135 2.54-1.945 3.081a8.044 8.044 0 0 1-1.686.848l-.035.013-.011.003-.004.002h-.002L11.92 13l.316.949a1 1 0 0 1-.633-1.897l.016-.006.074-.027a6.051 6.051 0 0 0 1.172-.6c.69-.46 1.055-.95 1.055-1.419v-.001a2 2 0 0 0-1.662-1.975ZM11 17a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.293 3.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L8 6.414V20a1 1 0 1 1-2 0V6.414L3.707 8.707a1 1 0 0 1-1.414-1.414l4-4ZM16 17.586V4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L16 17.586Z"/></svg>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
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
2
|
var _excluded = ["panelBackground", "panelMarginBottom", "panelBorderRadius", "items", "showHeader", "headerColor", "headerFontSize", "expandIcon"];
|
|
3
|
+
var _templateObject;
|
|
3
4
|
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
5
|
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; }
|
|
5
6
|
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; }
|
|
@@ -8,9 +9,26 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
8
9
|
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
10
|
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
11
|
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; }
|
|
12
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
13
|
import React, { useMemo } from 'react';
|
|
12
14
|
import { Collapse as OriginalCollapse } from 'antd';
|
|
15
|
+
import styled from 'styled-components';
|
|
13
16
|
import "./index.less";
|
|
17
|
+
var CustomCollapse = styled(OriginalCollapse)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.custom-collapse {\n background-color: ", ";\n }\n\n // .ant-collapse-item {\n // background-color: ", ";\n // margin-bottom: ", ";\n // border-radius: ", ";\n // }\n\n // .pisell-lowcode-collapse-header {\n // background-color: ", ";\n // border-radius: ", " !important;\n // }\n\n .pisell-lowcode-collapse-content {\n background-color: ", ";\n }\n"])), function (props) {
|
|
18
|
+
return props.panelBackground || '#ffffff';
|
|
19
|
+
}, function (props) {
|
|
20
|
+
return props.panelBackground || '#ffffff';
|
|
21
|
+
}, function (props) {
|
|
22
|
+
return props.panelMarginBottom || '0';
|
|
23
|
+
}, function (props) {
|
|
24
|
+
return props.panelBorderRadius || '0';
|
|
25
|
+
}, function (props) {
|
|
26
|
+
return props.panelBackground || '#ffffff';
|
|
27
|
+
}, function (props) {
|
|
28
|
+
return props.panelBorderRadius || '0';
|
|
29
|
+
}, function (props) {
|
|
30
|
+
return props.panelBackground || '#ffffff';
|
|
31
|
+
});
|
|
14
32
|
var Collapse = function Collapse(props) {
|
|
15
33
|
var panelBackground = props.panelBackground,
|
|
16
34
|
panelMarginBottom = props.panelMarginBottom,
|
|
@@ -65,15 +83,20 @@ var Collapse = function Collapse(props) {
|
|
|
65
83
|
fontSize: headerFontSize
|
|
66
84
|
}
|
|
67
85
|
}, item === null || item === void 0 ? void 0 : item.label) : null,
|
|
68
|
-
|
|
86
|
+
children: item.children,
|
|
87
|
+
className: 'custom-collapse-panel'
|
|
69
88
|
});
|
|
70
89
|
});
|
|
71
|
-
}, [items, headerColor, showHeader, headerFontSize
|
|
72
|
-
return /*#__PURE__*/React.createElement(
|
|
90
|
+
}, [items, headerColor, showHeader, headerFontSize]);
|
|
91
|
+
return /*#__PURE__*/React.createElement(CustomCollapse, _extends({}, rest, {
|
|
73
92
|
expandIcon: expandIcon ? function () {
|
|
74
93
|
return expandIcon;
|
|
75
94
|
} : undefined,
|
|
76
|
-
items: itemsMap
|
|
95
|
+
items: itemsMap,
|
|
96
|
+
className: "custom-collapse",
|
|
97
|
+
panelBackground: panelBackground,
|
|
98
|
+
panelMarginBottom: panelMarginBottom,
|
|
99
|
+
panelBorderRadius: panelBorderRadius
|
|
77
100
|
}));
|
|
78
101
|
};
|
|
79
102
|
Collapse.Panel = OriginalCollapse.Panel;
|
|
@@ -40,7 +40,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
40
40
|
width: number;
|
|
41
41
|
align: "center" | "left" | "right";
|
|
42
42
|
fixed: false | "left" | "right";
|
|
43
|
-
type: "
|
|
43
|
+
type: "button" | "link";
|
|
44
44
|
items: OperationItem[];
|
|
45
45
|
} | undefined;
|
|
46
46
|
operationContent?: {
|
|
@@ -58,7 +58,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
58
58
|
useCustomAction: boolean;
|
|
59
59
|
actionType: string;
|
|
60
60
|
openMode: "modal" | "drawer";
|
|
61
|
-
openContentSize: "small" | "
|
|
61
|
+
openContentSize: "small" | "middle" | "large";
|
|
62
62
|
openTitle: string;
|
|
63
63
|
key: string;
|
|
64
64
|
} | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const ColorPicker: React.FC<import("
|
|
2
|
+
declare const ColorPicker: React.FC<import("./type").ColorPickerProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
|
|
3
3
|
export default ColorPicker;
|
|
@@ -39,7 +39,7 @@ declare const formFieldMap: {
|
|
|
39
39
|
FormItemDateRangePicker: import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
40
40
|
FormItemUpload: import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
41
41
|
};
|
|
42
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> |
|
|
42
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
43
43
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
44
44
|
} & {
|
|
45
45
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -8,6 +8,7 @@ import React, { useEffect, useState, useRef } from 'react';
|
|
|
8
8
|
import { QRCode, Button, Divider } from 'antd';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import PisellModal from "./../pisellModal";
|
|
11
|
+
import { getText } from "../../locales/index";
|
|
11
12
|
import "./index.less";
|
|
12
13
|
var PisellQrcode = function PisellQrcode(props) {
|
|
13
14
|
var size = props.size,
|
|
@@ -26,7 +27,7 @@ var PisellQrcode = function PisellQrcode(props) {
|
|
|
26
27
|
if (open) {}
|
|
27
28
|
}, [open]);
|
|
28
29
|
var modalProps = {
|
|
29
|
-
title: '
|
|
30
|
+
title: getText('pisellQrcode-qrcode'),
|
|
30
31
|
platform: platform,
|
|
31
32
|
onCancel: function onCancel() {
|
|
32
33
|
return setOpen(false);
|
|
@@ -63,6 +64,6 @@ var PisellQrcode = function PisellQrcode(props) {
|
|
|
63
64
|
return setOpen(false);
|
|
64
65
|
},
|
|
65
66
|
className: classNames('pisell-qrcode-modal-button')
|
|
66
|
-
},
|
|
67
|
+
}, getText('pisellQrcode-done'))));
|
|
67
68
|
};
|
|
68
69
|
export default PisellQrcode;
|
|
@@ -9,11 +9,13 @@
|
|
|
9
9
|
background-size: cover;
|
|
10
10
|
height: 190px;
|
|
11
11
|
background-position: center center;
|
|
12
|
-
border-width:
|
|
12
|
+
border-width: 1px;
|
|
13
13
|
border-style: solid;
|
|
14
14
|
border-color: var(--Gray-300, #d0d5dd);
|
|
15
15
|
cursor: pointer;
|
|
16
|
+
box-sizing: border-box;
|
|
16
17
|
&.pisell-card-active {
|
|
18
|
+
border-width: 2px;
|
|
17
19
|
border-color: var(--theme-color, #7f56d9);
|
|
18
20
|
}
|
|
19
21
|
.pisell-card-name-wrap {
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
+
import { Tooltip } from 'antd';
|
|
4
|
+
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
3
5
|
import { _formatAmount } from "../Packages/utils";
|
|
4
6
|
import Divider from "../Divider";
|
|
5
7
|
import "./index.less";
|
|
6
8
|
import { locales } from '@pisell/utils';
|
|
7
9
|
var prefix = 'pisell-lowcode-';
|
|
8
10
|
var Footer = function Footer(_ref) {
|
|
9
|
-
var _item$_extend, _item$_extend2;
|
|
10
11
|
var item = _ref.item,
|
|
11
12
|
hideDivider = _ref.hideDivider,
|
|
12
|
-
type = _ref.type
|
|
13
|
+
type = _ref.type,
|
|
14
|
+
isOnlyTotal = _ref.isOnlyTotal;
|
|
15
|
+
var total = item.total,
|
|
16
|
+
origin_total = item.origin_total,
|
|
17
|
+
symbol = item.symbol,
|
|
18
|
+
tip = item.tip,
|
|
19
|
+
num = item.num,
|
|
20
|
+
discount_reason = item.discount_reason;
|
|
13
21
|
/**
|
|
14
22
|
* @title: 折扣
|
|
15
23
|
* @description:
|
|
@@ -20,19 +28,31 @@ var Footer = function Footer(_ref) {
|
|
|
20
28
|
*/
|
|
21
29
|
var isDiscount = useMemo(function () {
|
|
22
30
|
// item中没有该属性则不展示
|
|
23
|
-
if (!
|
|
24
|
-
return Number(
|
|
25
|
-
}, [
|
|
31
|
+
if (!origin_total) return false;
|
|
32
|
+
return Number(total) != Number(origin_total);
|
|
33
|
+
}, [total, origin_total]);
|
|
26
34
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !hideDivider ? /*#__PURE__*/React.createElement(Divider, {
|
|
27
35
|
type: type !== 'total' ? 'inside' : ''
|
|
28
36
|
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
29
|
-
className: classNames("".concat(prefix, "packages-product-footer"), hideDivider && "".concat(prefix, "packages-product-hide-divider-footer"))
|
|
30
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
37
|
+
className: classNames("".concat(prefix, "packages-product-footer"), hideDivider && "".concat(prefix, "packages-product-hide-divider-footer"), isOnlyTotal && "".concat(prefix, "packages-product-only-total-footer"))
|
|
38
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: classNames("".concat(prefix, "packages-product-footer-price-wrap"))
|
|
40
|
+
}, !isOnlyTotal ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: classNames("".concat(prefix, "packages-product-footer-price"))
|
|
42
|
+
}, /*#__PURE__*/React.createElement("span", null, _formatAmount(total, symbol)), tip ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
43
|
+
title: locales.getText(tip),
|
|
44
|
+
destroyTooltipOnHide: true
|
|
45
|
+
}, /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
46
|
+
style: {
|
|
47
|
+
fontSize: '16px',
|
|
48
|
+
color: '#1570ef'
|
|
49
|
+
}
|
|
50
|
+
})) : null), /*#__PURE__*/React.createElement("span", null, "\xD7".concat(num))) : null, /*#__PURE__*/React.createElement("span", {
|
|
31
51
|
className: "".concat(prefix, "packages-product-footer-total")
|
|
32
|
-
}, _formatAmount(
|
|
52
|
+
}, _formatAmount(total * num, symbol))), isDiscount ? /*#__PURE__*/React.createElement("div", {
|
|
33
53
|
className: "".concat(prefix, "packages-product-footer-discount")
|
|
34
|
-
}, /*#__PURE__*/React.createElement("span", null, _formatAmount(
|
|
54
|
+
}, !isOnlyTotal ? /*#__PURE__*/React.createElement("span", null, _formatAmount(origin_total, symbol)) : null, /*#__PURE__*/React.createElement("span", null, _formatAmount(origin_total * num, symbol, 2))) : null), isDiscount && discount_reason && type === 'total' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", {
|
|
35
55
|
className: "".concat(prefix, "product-item-discount-reason")
|
|
36
|
-
}, /*#__PURE__*/React.createElement("span", null, "".concat(locales.getText('pisell2.product.card.discount.reason'), ": ").concat(
|
|
56
|
+
}, /*#__PURE__*/React.createElement("span", null, "".concat(locales.getText('pisell2.product.card.discount.reason'), ": ").concat(discount_reason)))) : null);
|
|
37
57
|
};
|
|
38
58
|
export default Footer;
|
|
@@ -12,6 +12,17 @@
|
|
|
12
12
|
justify-content: space-between;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
&-packages-product-only-total-footer {
|
|
16
|
+
> div {
|
|
17
|
+
justify-content: end !important;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-packages-product-footer-price {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 4px;
|
|
25
|
+
}
|
|
15
26
|
|
|
16
27
|
&-packages-product-footer-discount {
|
|
17
28
|
font-size: 12px;
|
|
@@ -2,7 +2,7 @@ import { Button } from 'antd';
|
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import Iconfont from "../../../iconfont";
|
|
5
|
-
import { image, formatAmount } from '@pisell/utils';
|
|
5
|
+
import { image as imageAli, formatAmount } from '@pisell/utils';
|
|
6
6
|
import Options from "../Packages/components/options";
|
|
7
7
|
import "./index.less";
|
|
8
8
|
var prefix = 'pisell-lowcode-';
|
|
@@ -12,6 +12,14 @@ var Header = function Header(props) {
|
|
|
12
12
|
showImage = props.showImage,
|
|
13
13
|
onDelete = props.onDelete,
|
|
14
14
|
disabledEdit = props.disabledEdit;
|
|
15
|
+
var id = item.id,
|
|
16
|
+
options = item.options,
|
|
17
|
+
bundle = item.bundle,
|
|
18
|
+
product_option_string = item.product_option_string,
|
|
19
|
+
image = item.image,
|
|
20
|
+
name = item.name,
|
|
21
|
+
price = item.price,
|
|
22
|
+
symbol = item.symbol;
|
|
15
23
|
|
|
16
24
|
/**
|
|
17
25
|
* @title: 是否显示价格
|
|
@@ -22,9 +30,10 @@ var Header = function Header(props) {
|
|
|
22
30
|
* @Date: 2024-11-23 16:13
|
|
23
31
|
*/
|
|
24
32
|
var showPrice = useMemo(function () {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
// 如果有报价单则不需要显示价格
|
|
34
|
+
|
|
35
|
+
return (bundle === null || bundle === void 0 ? void 0 : bundle.length) > 0 || (options === null || options === void 0 ? void 0 : options.length) > 0;
|
|
36
|
+
}, [bundle, options]);
|
|
28
37
|
|
|
29
38
|
/**
|
|
30
39
|
* @title: 样式是否居中
|
|
@@ -35,9 +44,8 @@ var Header = function Header(props) {
|
|
|
35
44
|
* @Date: 2024-11-23 17:37
|
|
36
45
|
*/
|
|
37
46
|
var headerCenterStyle = useMemo(function () {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}, [item === null || item === void 0 ? void 0 : item.options, item === null || item === void 0 ? void 0 : item.product_option_string]);
|
|
47
|
+
return (options === null || options === void 0 ? void 0 : options.length) > 0 || product_option_string;
|
|
48
|
+
}, [options, product_option_string]);
|
|
41
49
|
return /*#__PURE__*/React.createElement("div", {
|
|
42
50
|
className: classNames("".concat(prefix, "product-header"), headerCenterStyle && "".concat(prefix, "product-options-header"))
|
|
43
51
|
}, isShowDelete && !disabledEdit ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -52,19 +60,19 @@ var Header = function Header(props) {
|
|
|
52
60
|
type: "pisell2-trash-01"
|
|
53
61
|
})
|
|
54
62
|
})) : null, showImage ? /*#__PURE__*/React.createElement("img", {
|
|
55
|
-
src:
|
|
63
|
+
src: imageAli.ali(image, 64),
|
|
56
64
|
className: "".concat(prefix, "product-header-cover")
|
|
57
|
-
}) : null,
|
|
65
|
+
}) : null, id ? /*#__PURE__*/React.createElement("div", {
|
|
58
66
|
className: "".concat(prefix, "product-right-wrap")
|
|
59
67
|
}, /*#__PURE__*/React.createElement("div", {
|
|
60
68
|
className: "".concat(prefix, "product-title")
|
|
61
|
-
}, /*#__PURE__*/React.createElement("span", null,
|
|
69
|
+
}, /*#__PURE__*/React.createElement("span", null, name), showPrice ? /*#__PURE__*/React.createElement("span", {
|
|
62
70
|
className: "".concat(prefix, "product-title-price")
|
|
63
|
-
}, formatAmount(
|
|
71
|
+
}, formatAmount(price, 2, symbol)) : null), product_option_string ? /*#__PURE__*/React.createElement("span", {
|
|
64
72
|
className: "".concat(prefix, "product-title-variant")
|
|
65
|
-
},
|
|
66
|
-
options:
|
|
67
|
-
amountSymbol:
|
|
73
|
+
}, product_option_string) : null, /*#__PURE__*/React.createElement(Options, {
|
|
74
|
+
options: options,
|
|
75
|
+
amountSymbol: symbol
|
|
68
76
|
})) : null);
|
|
69
77
|
};
|
|
70
78
|
export default Header;
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
|
+
import React, { useMemo } from 'react';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import Divider from "../Divider";
|
|
10
|
+
import AmountFooter from "../AmountFooter";
|
|
11
|
+
import { formatMultiDayDate } from "../../utils";
|
|
12
|
+
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
13
|
+
import "./index.less";
|
|
14
|
+
var prefix = 'pisell-lowcode-';
|
|
15
|
+
var MultiDay = function MultiDay(_ref) {
|
|
16
|
+
var _context$appHelper, _context$appHelper$ut;
|
|
17
|
+
var dataSource = _ref.dataSource,
|
|
18
|
+
hideDivider = _ref.hideDivider;
|
|
19
|
+
var items = dataSource.items,
|
|
20
|
+
symbol = dataSource.symbol,
|
|
21
|
+
locale = dataSource.locale;
|
|
22
|
+
var translationOriginal = function translationOriginal(text) {
|
|
23
|
+
return '';
|
|
24
|
+
};
|
|
25
|
+
var context = useEngineContext();
|
|
26
|
+
translationOriginal = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.translationOriginal;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @title: 商品单价 + 套餐价格
|
|
30
|
+
* @description:
|
|
31
|
+
* @param {*} useMemo
|
|
32
|
+
* @return {*}
|
|
33
|
+
* @Author: WangHan
|
|
34
|
+
* @Date: 2024-12-28 23:00
|
|
35
|
+
*/
|
|
36
|
+
var lists = useMemo(function () {
|
|
37
|
+
if (!(items !== null && items !== void 0 && items.length)) return [];
|
|
38
|
+
|
|
39
|
+
// // 套餐明细
|
|
40
|
+
// const bundleDetails = bundle
|
|
41
|
+
// ?.map(
|
|
42
|
+
// (b: any) =>
|
|
43
|
+
// `${translationOriginal(b?.title)} (${symbol}${
|
|
44
|
+
// Number(b.price) * Number(b.num)
|
|
45
|
+
// })`
|
|
46
|
+
// )
|
|
47
|
+
// ?.join('+');
|
|
48
|
+
|
|
49
|
+
var _lists = items.map(function (m) {
|
|
50
|
+
return _objectSpread({}, m);
|
|
51
|
+
});
|
|
52
|
+
return _lists;
|
|
53
|
+
}, [items]);
|
|
54
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
55
|
+
className: classNames("".concat(prefix, "multi-day-wrap"))
|
|
56
|
+
}, lists === null || lists === void 0 ? void 0 : lists.map(function (m, index) {
|
|
57
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
key: index
|
|
59
|
+
}, /*#__PURE__*/React.createElement(Divider, {
|
|
60
|
+
type: "inside"
|
|
61
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: classNames("".concat(prefix, "multi-day"))
|
|
63
|
+
}, /*#__PURE__*/React.createElement("div", null, formatMultiDayDate(_objectSpread(_objectSpread({}, m), {}, {
|
|
64
|
+
locale: locale
|
|
65
|
+
}))), /*#__PURE__*/React.createElement(AmountFooter, {
|
|
66
|
+
item: _objectSpread(_objectSpread({}, m), {}, {
|
|
67
|
+
symbol: symbol
|
|
68
|
+
}),
|
|
69
|
+
hideDivider: true
|
|
70
|
+
})));
|
|
71
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
className: classNames("".concat(prefix, "multi-day-total-wrap"))
|
|
73
|
+
}, /*#__PURE__*/React.createElement(AmountFooter, {
|
|
74
|
+
item: _objectSpread(_objectSpread({}, dataSource), {}, {
|
|
75
|
+
num: 1
|
|
76
|
+
}),
|
|
77
|
+
type: "total",
|
|
78
|
+
isOnlyTotal: true
|
|
79
|
+
})));
|
|
80
|
+
};
|
|
81
|
+
export default MultiDay;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@pisell-prefix: pisell-lowcode;
|
|
2
|
+
|
|
3
|
+
.@{pisell-prefix} {
|
|
4
|
+
&-multi-day-wrap {
|
|
5
|
+
margin-top: 16px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&-multi-day {
|
|
9
|
+
color: var(--Gray-500, #667085);
|
|
10
|
+
font-size: 14px;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
line-height: 20px;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&-multi-day-total {
|
|
18
|
+
color: var(--Gray-900, #101828);
|
|
19
|
+
text-align: right;
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
line-height: 20px;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-multi-day-total-discount {
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
font-weight: 400;
|
|
30
|
+
line-height: 18px;
|
|
31
|
+
text-decoration-line: line-through;
|
|
32
|
+
color: var(--Gray-500, #667085);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -12,18 +12,24 @@ export var renderBundles = function renderBundles(item, hidePrice, isShowPackage
|
|
|
12
12
|
};
|
|
13
13
|
var context = useEngineContext();
|
|
14
14
|
translationOriginal = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.translationOriginal;
|
|
15
|
+
var title = item.title,
|
|
16
|
+
name = item.name,
|
|
17
|
+
id = item.id,
|
|
18
|
+
price = item.price,
|
|
19
|
+
symbol = item.symbol,
|
|
20
|
+
option = item.option;
|
|
15
21
|
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
-
key:
|
|
22
|
+
key: id,
|
|
17
23
|
className: "".concat(prefix, "packages-product-bundle-item")
|
|
18
24
|
}, /*#__PURE__*/React.createElement("div", {
|
|
19
25
|
className: "".concat(prefix, "packages-product-bundle-info")
|
|
20
26
|
}, /*#__PURE__*/React.createElement("div", {
|
|
21
27
|
className: "".concat(prefix, "packages-product-bundle-info-title")
|
|
22
|
-
}, translationOriginal(
|
|
28
|
+
}, translationOriginal(title || name)), !hidePrice ? /*#__PURE__*/React.createElement("div", {
|
|
23
29
|
className: "".concat(prefix, "packages-product-bundle-info-num")
|
|
24
|
-
}, _formatAmount(
|
|
25
|
-
options:
|
|
26
|
-
amountSymbol:
|
|
30
|
+
}, _formatAmount(price, symbol)) : null), /*#__PURE__*/React.createElement(Options, {
|
|
31
|
+
options: option,
|
|
32
|
+
amountSymbol: symbol
|
|
27
33
|
}), /*#__PURE__*/React.createElement(Footer, {
|
|
28
34
|
item: item
|
|
29
35
|
}), isShowPackageNote ? /*#__PURE__*/React.createElement(Note, {
|
|
@@ -15,9 +15,9 @@ var Options = function Options(_ref) {
|
|
|
15
15
|
className: "".concat(prefix, "packages-product-bundle-option-item-left")
|
|
16
16
|
}, /*#__PURE__*/React.createElement("span", null, option === null || option === void 0 ? void 0 : option.name), /*#__PURE__*/React.createElement("div", {
|
|
17
17
|
className: "".concat(prefix, "packages-product-bundle-option-item-left-amount")
|
|
18
|
-
}, /*#__PURE__*/React.createElement("span", null, _formatAmount(option === null || option === void 0 ? void 0 : option.
|
|
18
|
+
}, /*#__PURE__*/React.createElement("span", null, _formatAmount(option === null || option === void 0 ? void 0 : option.price, amountSymbol)), /*#__PURE__*/React.createElement("span", null, "\xD7"), /*#__PURE__*/React.createElement("span", null, option === null || option === void 0 ? void 0 : option.num))), /*#__PURE__*/React.createElement("span", {
|
|
19
19
|
className: "".concat(prefix, "packages-product-bundle-option-item-amount")
|
|
20
|
-
}, _formatAmount((option === null || option === void 0 ? void 0 : option.
|
|
20
|
+
}, _formatAmount((option === null || option === void 0 ? void 0 : option.price) * (option === null || option === void 0 ? void 0 : option.num), amountSymbol)));
|
|
21
21
|
})) : null;
|
|
22
22
|
};
|
|
23
23
|
export default Options;
|
|
@@ -23,8 +23,7 @@ var Packages = function Packages(_ref) {
|
|
|
23
23
|
list: bundle || [],
|
|
24
24
|
renderItem: function renderItem(items) {
|
|
25
25
|
return renderBundles(_objectSpread(_objectSpread({}, items), {}, {
|
|
26
|
-
symbol: item === null || item === void 0 ? void 0 : item.symbol
|
|
27
|
-
total: items === null || items === void 0 ? void 0 : items.price
|
|
26
|
+
symbol: item === null || item === void 0 ? void 0 : item.symbol
|
|
28
27
|
}), false, isShowPackageNote);
|
|
29
28
|
}
|
|
30
29
|
}))) : null;
|
|
@@ -10,10 +10,10 @@ import { renderBundles } from "../Packages/components/collapsibleList/utils";
|
|
|
10
10
|
import "./index.less";
|
|
11
11
|
var prefix = 'pisell-lowcode-';
|
|
12
12
|
var Sales = function Sales(_ref) {
|
|
13
|
-
var
|
|
13
|
+
var _other_products;
|
|
14
14
|
var item = _ref.item,
|
|
15
15
|
isShowNote = _ref.isShowNote;
|
|
16
|
-
var other_products = (item === null || item === void 0 ? void 0 :
|
|
16
|
+
var other_products = (item === null || item === void 0 ? void 0 : item.relation_products) || [];
|
|
17
17
|
|
|
18
18
|
// 格式化商品数据
|
|
19
19
|
other_products = other_products.map(function (p) {
|
|
@@ -11,34 +11,36 @@ import Like from "./components/Like";
|
|
|
11
11
|
import "./index.less";
|
|
12
12
|
var prefix = 'pisell-lowcode-';
|
|
13
13
|
var Time = function Time(_ref) {
|
|
14
|
-
var _item$_extend5, _item$_extend5$date, _item$_extend6, _item$_extend7, _item$_extend8, _item$_extend9, _item$_extend10, _item$_extend11, _item$_extend12;
|
|
15
14
|
var item = _ref.item,
|
|
16
15
|
isShowHolder = _ref.isShowHolder,
|
|
17
16
|
_onLike = _ref.onLike;
|
|
17
|
+
var start_date = item.start_date,
|
|
18
|
+
end_date = item.end_date,
|
|
19
|
+
holder_title = item.holder_title,
|
|
20
|
+
resource_id = item.resource_id,
|
|
21
|
+
relation_form_name = item.relation_form_name,
|
|
22
|
+
like_status = item.like_status;
|
|
18
23
|
var isShow = useMemo(function () {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, [item === null || item === void 0 ? void 0 : item._extend, isShowHolder]);
|
|
24
|
+
return start_date && end_date || isShowHolder && holder_title || resource_id || relation_form_name;
|
|
25
|
+
}, [start_date, isShowHolder, holder_title, resource_id]);
|
|
22
26
|
return isShow ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", {
|
|
23
27
|
className: "".concat(prefix, "product-time-wrap")
|
|
24
|
-
},
|
|
28
|
+
}, start_date && end_date ? /*#__PURE__*/React.createElement("div", {
|
|
25
29
|
className: "".concat(prefix, "product-date")
|
|
26
|
-
}, getServiceTime(item,
|
|
30
|
+
}, getServiceTime(item, start_date)) : null, isShowHolder && holder_title ? /*#__PURE__*/React.createElement("div", {
|
|
27
31
|
className: "".concat(prefix, "product-holder-wrap")
|
|
28
|
-
},
|
|
32
|
+
}, holder_title) : null, resource_id || relation_form_name ? /*#__PURE__*/React.createElement("div", {
|
|
29
33
|
className: "".concat(prefix, "product-technician")
|
|
30
|
-
},
|
|
34
|
+
}, resource_id ? /*#__PURE__*/React.createElement(Like, {
|
|
31
35
|
style: {
|
|
32
36
|
marginRight: 4
|
|
33
37
|
},
|
|
34
|
-
status:
|
|
38
|
+
status: like_status,
|
|
35
39
|
onLike: function onLike(e) {
|
|
36
40
|
_onLike(_objectSpread(_objectSpread({}, item), {}, {
|
|
37
|
-
|
|
38
|
-
like_status: e
|
|
39
|
-
})
|
|
41
|
+
like_status: e
|
|
40
42
|
}));
|
|
41
43
|
}
|
|
42
|
-
}) : null,
|
|
44
|
+
}) : null, relation_form_name) : null)) : null;
|
|
43
45
|
};
|
|
44
46
|
export default Time;
|