@chlp-tech/rpa-ui 0.0.13 → 0.0.15
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.
|
@@ -23,6 +23,7 @@ export interface ICoverModalV2Props {
|
|
|
23
23
|
videoUrl: string;
|
|
24
24
|
handleUpload: (file: File) => Promise<string>;
|
|
25
25
|
onClose?: () => void;
|
|
26
|
+
zIndex?: number;
|
|
26
27
|
onSubmit?: (key: 'selectCover' | 'uploadCover' | string, data: string | number) => void;
|
|
27
28
|
}
|
|
28
29
|
declare const CoverModal: FC<CoverModalProps>;
|
|
@@ -429,7 +429,8 @@ export var CoverModalV2 = function CoverModalV2(props) {
|
|
|
429
429
|
footer: false,
|
|
430
430
|
width: 640,
|
|
431
431
|
onCancel: props.onClose,
|
|
432
|
-
maskClosable: false
|
|
432
|
+
maskClosable: false,
|
|
433
|
+
zIndex: props.zIndex
|
|
433
434
|
}, /*#__PURE__*/React.createElement(Segmented, {
|
|
434
435
|
value: value,
|
|
435
436
|
options: [{
|
|
@@ -27,6 +27,7 @@ interface AccountBlockProps {
|
|
|
27
27
|
interface PublishAccountProps {
|
|
28
28
|
accounts: SocialMediaAccounts;
|
|
29
29
|
boxWidth?: number | string;
|
|
30
|
+
defaultSelectAccount?: Account;
|
|
30
31
|
onAccountSelect: (account: Account) => void;
|
|
31
32
|
onErrorClose?: (account: Account) => void;
|
|
32
33
|
}
|
|
@@ -76,8 +76,9 @@ var PublishAccount = function PublishAccount(_ref2) {
|
|
|
76
76
|
var accounts = _ref2.accounts,
|
|
77
77
|
onAccountSelect = _ref2.onAccountSelect,
|
|
78
78
|
onErrorClose = _ref2.onErrorClose,
|
|
79
|
-
boxWidth = _ref2.boxWidth
|
|
80
|
-
|
|
79
|
+
boxWidth = _ref2.boxWidth,
|
|
80
|
+
defaultSelectAccount = _ref2.defaultSelectAccount;
|
|
81
|
+
var _useState = useState(defaultSelectAccount),
|
|
81
82
|
_useState2 = _slicedToArray(_useState, 2),
|
|
82
83
|
selectedAccount = _useState2[0],
|
|
83
84
|
setSelectedAccount = _useState2[1];
|
|
@@ -91,12 +92,16 @@ var PublishAccount = function PublishAccount(_ref2) {
|
|
|
91
92
|
return null;
|
|
92
93
|
};
|
|
93
94
|
useEffect(function () {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
if (defaultSelectAccount) {
|
|
96
|
+
setSelectedAccount(defaultSelectAccount);
|
|
97
|
+
} else {
|
|
98
|
+
var firstAccount = getFirstAvailableAccount();
|
|
99
|
+
if (firstAccount) {
|
|
100
|
+
setSelectedAccount(firstAccount);
|
|
101
|
+
onAccountSelect(firstAccount);
|
|
102
|
+
}
|
|
98
103
|
}
|
|
99
|
-
}, [accounts]);
|
|
104
|
+
}, [accounts, defaultSelectAccount]);
|
|
100
105
|
var renderAccounts = function renderAccounts(platform, icon) {
|
|
101
106
|
var _accounts$platform;
|
|
102
107
|
if (!accounts[platform] || accounts[platform].length === 0) {
|