@fle-ui/plus-im-record 0.0.6-beta.0 → 0.0.8-beta.0
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/package.json +2 -2
- package/es/@types/index.d.ts +0 -620
- package/es/CardTag/index.d.ts +0 -3
- package/es/CardTag/index.js +0 -18
- package/es/ChatMessageItem/index.d.ts +0 -17
- package/es/ChatMessageItem/index.js +0 -130
- package/es/ChatMessageItem/index.less +0 -108
- package/es/ChatMessageList/index.d.ts +0 -26
- package/es/ChatMessageList/index.js +0 -56
- package/es/ChatMessageList/index.less +0 -33
- package/es/GoodsCard/index.d.ts +0 -14
- package/es/GoodsCard/index.js +0 -93
- package/es/GoodsCard/index.less +0 -49
- package/es/GoodsOrderCard/index.d.ts +0 -17
- package/es/GoodsOrderCard/index.js +0 -161
- package/es/GoodsOrderCard/index.less +0 -81
- package/es/Icon/index.d.ts +0 -8
- package/es/Icon/index.js +0 -11
- package/es/ParseSession/index.d.ts +0 -21
- package/es/ParseSession/index.js +0 -454
- package/es/ParseSession/index.less +0 -181
- package/es/api/index.d.ts +0 -29
- package/es/api/index.js +0 -48
- package/es/common/const/index.d.ts +0 -46
- package/es/common/const/index.js +0 -82
- package/es/common/utils/index.d.ts +0 -33
- package/es/common/utils/index.js +0 -169
- package/es/index.d.ts +0 -25
- package/es/index.js +0 -76
- package/es/styles/extends.less +0 -50
- package/es/styles/index.less +0 -35
- package/es/styles/vars.less +0 -8
- package/es/utils/index.d.ts +0 -14
- package/es/utils/index.js +0 -50
- package/lib/@types/index.d.ts +0 -620
- package/lib/CardTag/index.d.ts +0 -3
- package/lib/CardTag/index.js +0 -25
- package/lib/ChatMessageItem/index.d.ts +0 -17
- package/lib/ChatMessageItem/index.js +0 -136
- package/lib/ChatMessageItem/index.less +0 -108
- package/lib/ChatMessageList/index.d.ts +0 -26
- package/lib/ChatMessageList/index.js +0 -63
- package/lib/ChatMessageList/index.less +0 -33
- package/lib/GoodsCard/index.d.ts +0 -14
- package/lib/GoodsCard/index.js +0 -103
- package/lib/GoodsCard/index.less +0 -49
- package/lib/GoodsOrderCard/index.d.ts +0 -17
- package/lib/GoodsOrderCard/index.js +0 -169
- package/lib/GoodsOrderCard/index.less +0 -81
- package/lib/Icon/index.d.ts +0 -8
- package/lib/Icon/index.js +0 -18
- package/lib/ParseSession/index.d.ts +0 -21
- package/lib/ParseSession/index.js +0 -456
- package/lib/ParseSession/index.less +0 -181
- package/lib/api/index.d.ts +0 -29
- package/lib/api/index.js +0 -55
- package/lib/common/const/index.d.ts +0 -46
- package/lib/common/const/index.js +0 -88
- package/lib/common/utils/index.d.ts +0 -33
- package/lib/common/utils/index.js +0 -183
- package/lib/index.d.ts +0 -25
- package/lib/index.js +0 -85
- package/lib/styles/extends.less +0 -50
- package/lib/styles/index.less +0 -35
- package/lib/styles/vars.less +0 -8
- package/lib/utils/index.d.ts +0 -14
- package/lib/utils/index.js +0 -56
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
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); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
exports.fitUrl = fitUrl;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _icons = require("@ant-design/icons");
|
|
11
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
-
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
13
|
-
var _CardTag = _interopRequireDefault(require("../CardTag"));
|
|
14
|
-
var _antd = require("antd");
|
|
15
|
-
var _const = require("../common/const");
|
|
16
|
-
var _utils = require("../common/utils");
|
|
17
|
-
var _ = require("..");
|
|
18
|
-
require("./index.less");
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
-
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); }
|
|
23
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
24
|
-
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."); }
|
|
25
|
-
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); }
|
|
26
|
-
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; }
|
|
27
|
-
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; } }
|
|
28
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
|
-
var ORDER_STATUS_MAP = {
|
|
30
|
-
1: {
|
|
31
|
-
text: '待付款'
|
|
32
|
-
},
|
|
33
|
-
2: {
|
|
34
|
-
text: '待发货'
|
|
35
|
-
},
|
|
36
|
-
3: {
|
|
37
|
-
text: '已发货'
|
|
38
|
-
},
|
|
39
|
-
4: {
|
|
40
|
-
text: '已完成'
|
|
41
|
-
},
|
|
42
|
-
5: {
|
|
43
|
-
text: '已关闭'
|
|
44
|
-
},
|
|
45
|
-
6: {
|
|
46
|
-
text: '售后'
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
function fitUrl(url) {
|
|
50
|
-
if (!url) return '';
|
|
51
|
-
return url.startsWith('http') ? url : "http://".concat(url);
|
|
52
|
-
}
|
|
53
|
-
var GoodsOrderCard = function GoodsOrderCard(props) {
|
|
54
|
-
var _ref2, _ORDER_STATUS_MAP$dat;
|
|
55
|
-
var _useContext = (0, _react.useContext)(_.ImContext),
|
|
56
|
-
api = _useContext.api;
|
|
57
|
-
var _props$prefix = props.prefix,
|
|
58
|
-
prefix = _props$prefix === void 0 ? 'chart-messages-item' : _props$prefix,
|
|
59
|
-
_props$suspend = props.suspend,
|
|
60
|
-
suspend = _props$suspend === void 0 ? false : _props$suspend,
|
|
61
|
-
_props$orderSn = props.orderSn,
|
|
62
|
-
orderSn = _props$orderSn === void 0 ? '' : _props$orderSn,
|
|
63
|
-
orderId = props.orderId,
|
|
64
|
-
recordSession = props.recordSession;
|
|
65
|
-
var relationId = recordSession === null || recordSession === void 0 ? void 0 : recordSession.relationId;
|
|
66
|
-
var relationType = recordSession === null || recordSession === void 0 ? void 0 : recordSession.relationType;
|
|
67
|
-
var accid = recordSession === null || recordSession === void 0 ? void 0 : recordSession.accid;
|
|
68
|
-
var _useState = (0, _react.useState)({}),
|
|
69
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
70
|
-
data = _useState2[0],
|
|
71
|
-
setData = _useState2[1];
|
|
72
|
-
(0, _react.useEffect)(function () {
|
|
73
|
-
if ((orderId || orderSn) && relationId && accid) {
|
|
74
|
-
api.getCSOrder({
|
|
75
|
-
orderSn: orderSn,
|
|
76
|
-
orderId: Number(orderId) || orderId,
|
|
77
|
-
accid: accid,
|
|
78
|
-
relationId: relationId,
|
|
79
|
-
relationType: relationType
|
|
80
|
-
}).then(function (_ref) {
|
|
81
|
-
var data = _ref.data;
|
|
82
|
-
setData(data || {});
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
}, [orderSn, orderId, relationId, accid]);
|
|
86
|
-
function onCardClick() {
|
|
87
|
-
// 现金
|
|
88
|
-
// https://cash.koudaiqifu.cn/1002855/order/order_detail?order_id=12128707
|
|
89
|
-
// 积分
|
|
90
|
-
// https://jifen.koudaiqifu.cn/1003408/order/order_detail?order_id=12128708
|
|
91
|
-
// 卡券
|
|
92
|
-
// http://cardjs.ufuly.cn/index.html#/8JmeYWGzdyI=/exchangeHistory
|
|
93
|
-
if (data.applicationId === 7) {
|
|
94
|
-
if (data.siteUrl) {
|
|
95
|
-
window.open(fitUrl(data.siteUrl), '_blank');
|
|
96
|
-
}
|
|
97
|
-
} else if (data.siteUrl) {
|
|
98
|
-
window.open("".concat(fitUrl(data.siteUrl), "/order/order_detail?order_id=").concat(data.orderId), '_blank');
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
function formatOrderPrice() {
|
|
102
|
-
var price = '';
|
|
103
|
-
if (data.applicationId === 6) {
|
|
104
|
-
price = "".concat(data.totalPrice || 0, "\u5143");
|
|
105
|
-
}
|
|
106
|
-
if (Number(data.totalScore) > 0 && Number(data.totalPrice) > 0) {
|
|
107
|
-
price = "".concat(data.totalPrice, "\u5143+").concat(data.totalScore).concat(data.currencyStr || '积分');
|
|
108
|
-
} else if (Number(data.totalScore) > 0) {
|
|
109
|
-
price = "".concat(data.totalScore).concat(data.currencyStr);
|
|
110
|
-
} else if (Number(data.totalPrice) > 0) {
|
|
111
|
-
price = "".concat(data.totalPrice, "\u5143");
|
|
112
|
-
}
|
|
113
|
-
if (price) {
|
|
114
|
-
price = "\uFF0C\u5408\u8BA1".concat(price);
|
|
115
|
-
}
|
|
116
|
-
return price;
|
|
117
|
-
}
|
|
118
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
119
|
-
className: (0, _classnames.default)("".concat(prefix, "-order"), {
|
|
120
|
-
suspend: suspend
|
|
121
|
-
}),
|
|
122
|
-
onClick: function onClick() {
|
|
123
|
-
return onCardClick();
|
|
124
|
-
}
|
|
125
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
126
|
-
className: "".concat(prefix, "-order-info")
|
|
127
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
128
|
-
className: "".concat(prefix, "-order-info-img"),
|
|
129
|
-
style: {
|
|
130
|
-
background: "url(".concat(data.pic || _const.fallbackImg, ") 0 0 / cover no-repeat")
|
|
131
|
-
}
|
|
132
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
133
|
-
className: "".concat(prefix, "-order-info-right")
|
|
134
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
135
|
-
className: "".concat(prefix, "-order-info-title")
|
|
136
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
137
|
-
className: "one-line-text"
|
|
138
|
-
}, "\u8BA2\u5355\u7F16\u53F7: ", data.orderSn), /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
139
|
-
title: "\u590D\u5236"
|
|
140
|
-
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
141
|
-
type: "icon-fuzhi",
|
|
142
|
-
onClick: function onClick(e) {
|
|
143
|
-
e.stopPropagation();
|
|
144
|
-
e.preventDefault();
|
|
145
|
-
(0, _utils.copyText)(data.orderSn).then(function () {
|
|
146
|
-
_antd.message.success('复制成功');
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}))), data.applicationId === 7 ? null : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
-
className: "".concat(prefix, "-order-info-price")
|
|
151
|
-
}, "\u5171\u8BA1", data.itemCount || 0, "\u4EF6\u5546\u54C1", formatOrderPrice())), /*#__PURE__*/_react.default.createElement("div", {
|
|
152
|
-
className: "".concat(prefix, "-order-info-bottom")
|
|
153
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
154
|
-
className: "".concat(prefix, "-order-info-tags")
|
|
155
|
-
}, Array.isArray(data.tagList) ? data.tagList.map(function (item, idx) {
|
|
156
|
-
if (item.supplierType && _const.cardTagMap[item.supplierType]) {
|
|
157
|
-
return /*#__PURE__*/_react.default.createElement(_CardTag.default, _extends({}, _const.cardTagMap[item.supplierType], {
|
|
158
|
-
key: idx
|
|
159
|
-
}));
|
|
160
|
-
} else {
|
|
161
|
-
return null;
|
|
162
|
-
}
|
|
163
|
-
}) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
164
|
-
className: "".concat(prefix, "-order-info-state")
|
|
165
|
-
}, (_ref2 = data.state && ((_ORDER_STATUS_MAP$dat = ORDER_STATUS_MAP[data.state]) === null || _ORDER_STATUS_MAP$dat === void 0 ? void 0 : _ORDER_STATUS_MAP$dat.text)) !== null && _ref2 !== void 0 ? _ref2 : '')))), !suspend && !data.isCurrentSite && /*#__PURE__*/_react.default.createElement("div", {
|
|
166
|
-
className: "".concat(prefix, "-order-tip")
|
|
167
|
-
}, /*#__PURE__*/_react.default.createElement(_icons.ExclamationCircleOutlined, null), "\xA0 \u5F53\u524D\u8BA2\u5355\u5E76\u4E0D\u662F\u672C\u7AD9\u70B9\u5185\u8BA2\u5355\uFF0C\u8BF7\u6838\u5BF9\uFF01"));
|
|
168
|
-
};
|
|
169
|
-
var _default = exports.default = GoodsOrderCard;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
@prefix: chart-messages-item;
|
|
2
|
-
|
|
3
|
-
.@{prefix}-order {
|
|
4
|
-
width: 272px;
|
|
5
|
-
padding-bottom: 2px;
|
|
6
|
-
|
|
7
|
-
&-info {
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-flow: row;
|
|
10
|
-
padding: 12px;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
border-radius: 4px;
|
|
13
|
-
background-color: #fff;
|
|
14
|
-
&-img {
|
|
15
|
-
flex-shrink: 0;
|
|
16
|
-
border-radius: 3px;
|
|
17
|
-
width: 72px;
|
|
18
|
-
height: 72px;
|
|
19
|
-
margin-right: 6px;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
object-fit: fill;
|
|
22
|
-
background: url() no-repeat;
|
|
23
|
-
}
|
|
24
|
-
img {
|
|
25
|
-
width: 100%;
|
|
26
|
-
object-fit: contain;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&-right {
|
|
30
|
-
flex: 1;
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
}
|
|
33
|
-
&-title {
|
|
34
|
-
display: flex;
|
|
35
|
-
justify-content: space-between;
|
|
36
|
-
align-items: center;
|
|
37
|
-
margin-bottom: 5px;
|
|
38
|
-
|
|
39
|
-
.one-line-text {
|
|
40
|
-
flex: 1;
|
|
41
|
-
padding-right: 3px;
|
|
42
|
-
}
|
|
43
|
-
.anticon {
|
|
44
|
-
color: #aaa;
|
|
45
|
-
}
|
|
46
|
-
.anticon:hover {
|
|
47
|
-
color: #2c6bffff;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&-price {
|
|
52
|
-
font-size: 12px;
|
|
53
|
-
color: #aaa;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&-bottom {
|
|
57
|
-
display: flex;
|
|
58
|
-
}
|
|
59
|
-
&-tags {
|
|
60
|
-
flex: 1;
|
|
61
|
-
}
|
|
62
|
-
&-state {
|
|
63
|
-
margin-bottom: 2px;
|
|
64
|
-
align-self: flex-end;
|
|
65
|
-
font-size: 12px;
|
|
66
|
-
color: #8c8c8c;
|
|
67
|
-
line-height: 16px;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&-tip {
|
|
72
|
-
margin-top: 5px;
|
|
73
|
-
height: 24px;
|
|
74
|
-
padding-left: 5px;
|
|
75
|
-
line-height: 24px;
|
|
76
|
-
background: rgba(225, 11, 25, 0.06);
|
|
77
|
-
border-radius: 4px;
|
|
78
|
-
color: #e10b19;
|
|
79
|
-
font-size: 12px;
|
|
80
|
-
}
|
|
81
|
-
}
|
package/lib/Icon/index.d.ts
DELETED
package/lib/Icon/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _icons = require("@ant-design/icons");
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
// antd 字体图标
|
|
11
|
-
var IconFont = (0, _icons.createFromIconfontCN)({
|
|
12
|
-
scriptUrl: ['//at.alicdn.com/t/c/font_4411856_i5o5y30jwrr.js' // 小鲤客服
|
|
13
|
-
]
|
|
14
|
-
});
|
|
15
|
-
var Icon = function Icon(props) {
|
|
16
|
-
return /*#__PURE__*/_react.default.createElement(IconFont, props);
|
|
17
|
-
};
|
|
18
|
-
var _default = exports.default = Icon;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IMMessage } from '../@types';
|
|
3
|
-
import './index.less';
|
|
4
|
-
export interface IParseSessionProps {
|
|
5
|
-
prefix?: string;
|
|
6
|
-
keyword?: string;
|
|
7
|
-
h5?: boolean;
|
|
8
|
-
msg: IMMessage;
|
|
9
|
-
isSessionEnd?: boolean;
|
|
10
|
-
onChartHistoryClick?: Function;
|
|
11
|
-
recordSession?: {
|
|
12
|
-
relationId: string | number;
|
|
13
|
-
accid: string;
|
|
14
|
-
relationType?: number;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export declare const pauseAllAudio: () => HTMLAudioElement;
|
|
18
|
-
export declare const pauseOtherVideo: (idClient: string) => void;
|
|
19
|
-
export declare const pauseAllVideo: () => void;
|
|
20
|
-
declare const ParseSession: React.FC<IParseSessionProps>;
|
|
21
|
-
export default ParseSession;
|