@chlp-tech/rpa-ui 0.0.11-beta.4 → 0.0.11-beta.6
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/dist/account-select/index.js +16 -9
- package/dist/account-select/index.module.less +14 -2
- package/dist/account-select/type.d.ts +2 -0
- package/dist/release-video-card/index.d.ts +2 -0
- package/dist/release-video-card/index.js +7 -0
- package/dist/release-video-card/index.module.less +1 -0
- package/package.json +1 -1
|
@@ -2,13 +2,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
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
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
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
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
6
|
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."); }
|
|
10
7
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
8
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9
|
+
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; }
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
+
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); }
|
|
12
12
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
13
|
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."); }
|
|
14
14
|
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); }
|
|
@@ -73,8 +73,13 @@ var AccountSelect = function AccountSelect(props) {
|
|
|
73
73
|
}, info !== null && info !== void 0 && info.languageCnName && (info === null || info === void 0 || (_info$languageCnName2 = info.languageCnName) === null || _info$languageCnName2 === void 0 ? void 0 : _info$languageCnName2.length) > 4 ? "".concat(info === null || info === void 0 || (_info$languageCnName3 = info.languageCnName) === null || _info$languageCnName3 === void 0 ? void 0 : _info$languageCnName3.slice(0, 4), "...") : (info === null || info === void 0 ? void 0 : info.languageCnName) || '--'))));
|
|
74
74
|
};
|
|
75
75
|
var renderAccountView = function renderAccountView() {
|
|
76
|
-
return /*#__PURE__*/React.createElement(
|
|
77
|
-
|
|
76
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
77
|
+
open: !!props.disabledPopContent,
|
|
78
|
+
content: props.disabledPopContent ? /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
className: styles.defaultDisablePopContent
|
|
80
|
+
}, props.disabledPopContent) : null
|
|
81
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: classNames(styles.box, _defineProperty({}, styles.boxDisabled, props.disabled))
|
|
78
83
|
}, props.disabled && typeof props.disabledIcon === "string" || !props.disabled && typeof props.icon === 'string' ? /*#__PURE__*/React.createElement("img", {
|
|
79
84
|
width: 48,
|
|
80
85
|
height: 48,
|
|
@@ -94,7 +99,7 @@ var AccountSelect = function AccountSelect(props) {
|
|
|
94
99
|
handleClearAll === null || handleClearAll === void 0 || handleClearAll();
|
|
95
100
|
}
|
|
96
101
|
}
|
|
97
|
-
}));
|
|
102
|
+
})));
|
|
98
103
|
};
|
|
99
104
|
var onClickItem = function onClickItem(item) {
|
|
100
105
|
// const newList = [];
|
|
@@ -149,7 +154,7 @@ var AccountSelect = function AccountSelect(props) {
|
|
|
149
154
|
placement: "bottomLeft",
|
|
150
155
|
open: open,
|
|
151
156
|
content: function content() {
|
|
152
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
|
|
157
|
+
return !props.disabled ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
|
|
153
158
|
style: {
|
|
154
159
|
height: '36px',
|
|
155
160
|
color: '#142A51'
|
|
@@ -170,7 +175,9 @@ var AccountSelect = function AccountSelect(props) {
|
|
|
170
175
|
key: item.id,
|
|
171
176
|
className: classNames(styles.rowBox, _defineProperty(_defineProperty(_defineProperty({}, styles.rowBoxClick, true), styles.rowBoxSelect, selectedKeys.includes(item.id)), styles.rowBoxDisable, item.disabled)),
|
|
172
177
|
onClick: function onClick() {
|
|
173
|
-
|
|
178
|
+
if (!item.disabled) {
|
|
179
|
+
onClickItem(item);
|
|
180
|
+
}
|
|
174
181
|
}
|
|
175
182
|
}, /*#__PURE__*/React.createElement("div", {
|
|
176
183
|
className: styles.name
|
|
@@ -197,7 +204,7 @@ var AccountSelect = function AccountSelect(props) {
|
|
|
197
204
|
}), optionList.length <= 0 && /*#__PURE__*/React.createElement(Empty, {
|
|
198
205
|
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
199
206
|
description: "\u6682\u65E0\u6570\u636E"
|
|
200
|
-
})));
|
|
207
|
+
}))) : null;
|
|
201
208
|
}
|
|
202
209
|
}, renderAccountView());
|
|
203
210
|
};
|
|
@@ -44,6 +44,18 @@
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
.defaultDisablePopContent {
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
color: #FA4441;
|
|
51
|
+
line-height: 20px;
|
|
52
|
+
text-align: left;
|
|
53
|
+
font-style: normal;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.boxDisabled {
|
|
57
|
+
cursor: not-allowed;
|
|
58
|
+
}
|
|
47
59
|
|
|
48
60
|
.popBox {
|
|
49
61
|
width: 481px;
|
|
@@ -131,9 +143,9 @@
|
|
|
131
143
|
|
|
132
144
|
.rowBoxDisable {
|
|
133
145
|
cursor: not-allowed;
|
|
134
|
-
|
|
146
|
+
background-color: rgb(254, 236, 236);
|
|
135
147
|
&:hover {
|
|
136
|
-
background-color:
|
|
148
|
+
background-color: rgb(254, 236, 236);
|
|
137
149
|
}
|
|
138
150
|
}
|
|
139
151
|
}
|
|
@@ -20,6 +20,7 @@ export interface IAccountSelectProps {
|
|
|
20
20
|
* 是否禁用
|
|
21
21
|
*/
|
|
22
22
|
disabled?: boolean;
|
|
23
|
+
disabledPopContent?: string | React.ReactElement;
|
|
23
24
|
/**
|
|
24
25
|
* 是否多选
|
|
25
26
|
*/
|
|
@@ -56,6 +57,7 @@ export interface IAccountOptionModel {
|
|
|
56
57
|
* 国家
|
|
57
58
|
*/
|
|
58
59
|
countryCnName?: string;
|
|
60
|
+
languageCode?: string;
|
|
59
61
|
/**
|
|
60
62
|
* 语言
|
|
61
63
|
*/
|
|
@@ -17,8 +17,10 @@ interface Props {
|
|
|
17
17
|
createTime: string;
|
|
18
18
|
isNew?: boolean;
|
|
19
19
|
isAd?: boolean;
|
|
20
|
+
isPaused?: boolean;
|
|
20
21
|
id: string | number;
|
|
21
22
|
onDelete?: (id: string | number) => void;
|
|
23
|
+
onPauseOrStart?: (id: string | number) => void;
|
|
22
24
|
mediaInfo: {
|
|
23
25
|
url: string[];
|
|
24
26
|
type: string;
|
|
@@ -198,6 +198,13 @@ var ReleaseVideoCard = function ReleaseVideoCard(props) {
|
|
|
198
198
|
trigger: ['click'],
|
|
199
199
|
menu: {
|
|
200
200
|
items: [{
|
|
201
|
+
label: /*#__PURE__*/React.createElement("div", null, props.isPaused ? '启用' : '暂停'),
|
|
202
|
+
key: 'pause',
|
|
203
|
+
onClick: function onClick() {
|
|
204
|
+
var _props$onPauseOrStart;
|
|
205
|
+
return props === null || props === void 0 || (_props$onPauseOrStart = props.onPauseOrStart) === null || _props$onPauseOrStart === void 0 ? void 0 : _props$onPauseOrStart.call(props, props.id);
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
201
208
|
label: '删除',
|
|
202
209
|
key: 'delete',
|
|
203
210
|
onClick: function onClick() {
|