component-shipinlv 2.0.18 → 2.1.1

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.
Files changed (61) hide show
  1. package/dist/ActiveAccountMode/hour-enabled.d.ts +9 -0
  2. package/dist/ActiveAccountMode/hour-enabled.js +42 -0
  3. package/dist/ActiveAccountMode/hour-enabled.less +24 -0
  4. package/dist/ActiveAccountMode/index.d.ts +7 -0
  5. package/dist/ActiveAccountMode/index.js +12 -0
  6. package/dist/ActiveAccountMode/index.less +0 -0
  7. package/dist/ActiveAccountMode/setting.d.ts +8 -0
  8. package/dist/ActiveAccountMode/setting.js +235 -0
  9. package/dist/ActiveAccountMode/setting.less +39 -0
  10. package/dist/ActiveAccountMode/task/index.d.ts +36 -0
  11. package/dist/ActiveAccountMode/task/index.js +819 -0
  12. package/dist/Auth/index.js +2 -0
  13. package/dist/VideoPublish/account-manage/home.js +1 -0
  14. package/dist/VideoPublish/account-manage/list.js +3 -2
  15. package/dist/VideoPublish/create-task/base/index.js +1 -1
  16. package/dist/VideoPublish/index.js +11 -1
  17. package/dist/VideoPublish/index.less +2 -2
  18. package/dist/VideoPublish/proxy/list.js +2 -1
  19. package/dist/VideoPublish/proxy/select.js +2 -1
  20. package/dist/VideoPublish/publish-task-plan/tool.js +1 -1
  21. package/dist/VideoPublish/task-list/index.js +3 -2
  22. package/dist/VideoPublish/task-list/plan/list.js +3 -2
  23. package/dist/VideoPublish/task-list/plan/query.js +15 -11
  24. package/dist/VideoPublish/video-account/create.js +1 -1
  25. package/dist/VideoPublish/video-account/group.js +1 -1
  26. package/dist/VideoPublish/video-account/index.js +58 -7
  27. package/dist/VideoPublish/video-publish-statistic/operation/list.js +2 -1
  28. package/dist/VideoPublish/video-publish-statistic/publish-plan/list.js +4 -2
  29. package/dist/VideoPublish/video-publish-statistic/publish-plan/query.d.ts +1 -0
  30. package/dist/VideoPublish/video-publish-statistic/publish-plan/query.js +4 -1
  31. package/dist/VideoPublish/video-topic/index.js +2 -2
  32. package/dist/VipCompare/index.js +2 -2
  33. package/dist/config/apiUrls.js +1 -1
  34. package/dist/lib/Tool.js +7 -0
  35. package/dist/lib/allow-mine-type.d.ts +4 -0
  36. package/dist/lib/allow-mine-type.js +19 -0
  37. package/dist/lib/file-type.d.ts +2 -0
  38. package/dist/lib/file-type.js +156 -0
  39. package/dist/lib/fs.d.ts +14 -0
  40. package/dist/lib/fs.js +479 -0
  41. package/dist/lib/getFileExt.d.ts +2 -0
  42. package/dist/lib/getFileExt.js +6 -0
  43. package/dist/lib/save-path.d.ts +17 -0
  44. package/dist/lib/save-path.js +173 -0
  45. package/dist/lib/save-path.less +21 -0
  46. package/dist/service/api/ActiveAccountModeSettingController.d.ts +2 -0
  47. package/dist/service/api/ActiveAccountModeSettingController.js +53 -0
  48. package/dist/service/api/PublishTaskPlanStatisticController.d.ts +1 -0
  49. package/dist/service/api/PublishTaskPlanStatisticController.js +28 -0
  50. package/dist/service/api/VideoPublishController.d.ts +4 -0
  51. package/dist/service/api/VideoPublishController.js +23 -0
  52. package/dist/types/AutoMakeTaskSetting.d.ts +18 -0
  53. package/dist/types/AutoMakeTaskSetting.js +0 -0
  54. package/dist/types/PublishTaskPlanStatistic.d.ts +15 -0
  55. package/dist/types/PublishTaskPlanStatistic.js +0 -0
  56. package/dist/types/VideoPublish.d.ts +1 -0
  57. package/dist/typings/VideoPublishVideoAccount.d.ts +1 -0
  58. package/dist/typings.d.ts +1 -0
  59. package/dist/video-study/index.js +2 -1
  60. package/dist/window.d.ts +5 -0
  61. package/package.json +1 -1
@@ -0,0 +1,173 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ import React, { useEffect, useRef, useState } from 'react';
5
+ import { Input, Button, Space } from 'antd';
6
+ import "./save-path.less";
7
+ import { FolderOpenOutlined, FolderOutlined } from '@ant-design/icons';
8
+ import Tool from "./Tool";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
+ export var getSavePath = function getSavePath(productType) {};
12
+ var SavePath = function SavePath(_ref) {
13
+ var _ref$isDefaultEmpty = _ref.isDefaultEmpty,
14
+ isDefaultEmpty = _ref$isDefaultEmpty === void 0 ? false : _ref$isDefaultEmpty,
15
+ size = _ref.size,
16
+ _ref$label = _ref.label,
17
+ label = _ref$label === void 0 ? '' : _ref$label,
18
+ _ref$disabled = _ref.disabled,
19
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
20
+ _ref$path = _ref.path,
21
+ path = _ref$path === void 0 ? '' : _ref$path,
22
+ _ref$placeholder = _ref.placeholder,
23
+ placeholder = _ref$placeholder === void 0 ? '' : _ref$placeholder,
24
+ _ref$hiddenOpenDir = _ref.hiddenOpenDir,
25
+ hiddenOpenDir = _ref$hiddenOpenDir === void 0 ? false : _ref$hiddenOpenDir,
26
+ _ref$onChange = _ref.onChange,
27
+ onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
28
+ onBeforeSelect = _ref.onBeforeSelect;
29
+ var idRef = useRef('');
30
+ // const [ path, setPath ] = useState( defaultPath Tool.getFileResultDir( productType, isDefaultEmpty ) )
31
+ // const [ path, setPath ] = useState( dirPath );
32
+ var _useState = useState(false),
33
+ _useState2 = _slicedToArray(_useState, 2),
34
+ loadingOpenDir = _useState2[0],
35
+ setLoadingOpenDir = _useState2[1];
36
+ var _useState3 = useState(false),
37
+ _useState4 = _slicedToArray(_useState3, 2),
38
+ loadingSelectDir = _useState4[0],
39
+ setLoadingSelectDir = _useState4[1];
40
+ var onSelectDir = /*#__PURE__*/function () {
41
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
42
+ var before, selectResult, storagePath;
43
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
44
+ while (1) switch (_context.prev = _context.next) {
45
+ case 0:
46
+ if (!onBeforeSelect) {
47
+ _context.next = 7;
48
+ break;
49
+ }
50
+ _context.next = 3;
51
+ return onBeforeSelect();
52
+ case 3:
53
+ before = _context.sent;
54
+ if (before) {
55
+ _context.next = 7;
56
+ break;
57
+ }
58
+ console.log('onSelectDir onBeforeSelect false!');
59
+ return _context.abrupt("return");
60
+ case 7:
61
+ setLoadingSelectDir(true);
62
+ // Tool.bridge.sendIpc('open-dialog', produc tType );
63
+ setLoadingSelectDir(false);
64
+ _context.next = 11;
65
+ return window.getBridge().getIpc('open-dialog', {
66
+ from: idRef.current
67
+ });
68
+ case 11:
69
+ selectResult = _context.sent;
70
+ console.log('save path selectResult:', selectResult);
71
+ storagePath = selectResult[0];
72
+ if (storagePath) {
73
+ onPathChange(storagePath);
74
+ }
75
+ case 15:
76
+ case "end":
77
+ return _context.stop();
78
+ }
79
+ }, _callee);
80
+ }));
81
+ return function onSelectDir() {
82
+ return _ref2.apply(this, arguments);
83
+ };
84
+ }();
85
+ var onOpenDir = function onOpenDir() {
86
+ setLoadingOpenDir(true);
87
+ window.getBridge().openDir(path);
88
+ setTimeout(function () {
89
+ setLoadingOpenDir(false);
90
+ }, 1e3);
91
+ };
92
+ var onPathChange = function onPathChange(path) {
93
+ onChange(path);
94
+ // Tool.setFileResultDir( productType, path, isDefaultEmpty );
95
+ };
96
+
97
+ var onInit = /*#__PURE__*/function () {
98
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
99
+ var id;
100
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
101
+ while (1) switch (_context2.prev = _context2.next) {
102
+ case 0:
103
+ id = Tool.math.randWord(16);
104
+ idRef.current = id;
105
+
106
+ // console.log('selectResult:', selectResult );
107
+ return _context2.abrupt("return");
108
+ case 3:
109
+ case "end":
110
+ return _context2.stop();
111
+ }
112
+ }, _callee2);
113
+ }));
114
+ return function onInit() {
115
+ return _ref3.apply(this, arguments);
116
+ };
117
+ }();
118
+ useEffect(function () {
119
+ onInit();
120
+ }, []);
121
+
122
+ // useEffect(() => {
123
+ // onChange( path );
124
+ // }, [path]);
125
+
126
+ return /*#__PURE__*/_jsx("div", {
127
+ className: "savePath",
128
+ children: /*#__PURE__*/_jsx("div", {
129
+ className: "savePathContent",
130
+ children: /*#__PURE__*/_jsxs("div", {
131
+ className: "savePathWarp",
132
+ children: [/*#__PURE__*/_jsx(Input, {
133
+ value: path,
134
+ size: size
135
+ // readOnly={ true }
136
+ ,
137
+ allowClear: true,
138
+ disabled: disabled,
139
+ addonBefore: label,
140
+ placeholder: placeholder,
141
+ onChange: function onChange(e) {
142
+ var inputPath = e.target.value;
143
+ // 只允许 清空
144
+ if (!inputPath) {
145
+ onPathChange(inputPath);
146
+ }
147
+ },
148
+ className: "input"
149
+ }), /*#__PURE__*/_jsx("div", {
150
+ className: "option",
151
+ children: /*#__PURE__*/_jsxs(Space, {
152
+ children: [/*#__PURE__*/_jsx(Button, {
153
+ size: size,
154
+ onClick: onSelectDir,
155
+ loading: loadingSelectDir,
156
+ icon: /*#__PURE__*/_jsx(FolderOutlined, {}),
157
+ disabled: disabled,
158
+ children: path ? '更改' : '选择'
159
+ }), !hiddenOpenDir && /*#__PURE__*/_jsx(Button, {
160
+ size: size,
161
+ onClick: onOpenDir,
162
+ loading: loadingOpenDir,
163
+ disabled: !path || disabled,
164
+ icon: /*#__PURE__*/_jsx(FolderOpenOutlined, {}),
165
+ children: "\u6253\u5F00"
166
+ })]
167
+ })
168
+ })]
169
+ })
170
+ })
171
+ });
172
+ };
173
+ export default SavePath;
@@ -0,0 +1,21 @@
1
+ .savePath{
2
+ .savePathContent{
3
+ z-index: 30;
4
+ .savePathWarp{
5
+ display: flex;
6
+ flex-direction: row;
7
+ .option{
8
+ padding: 0 0 0 8px;
9
+ }
10
+ }
11
+ :global{
12
+ .ant-input{
13
+ font-size: 12px;
14
+ color: #555;
15
+
16
+
17
+ }
18
+ }
19
+ }
20
+ }
21
+
@@ -0,0 +1,2 @@
1
+ export declare function detail(body?: {}, options?: Global.RequestOptions): Promise<ActiveAccountModeSetting.Detail>;
2
+ export declare function create(body: ActiveAccountModeSetting.SettingForm, options?: Global.RequestOptions): Promise<ActiveAccountModeSetting.Detail>;
@@ -0,0 +1,53 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
+ import request from "../../lib/request";
5
+ import { PublishDomainApi } from "./VideoPublishController";
6
+ export function detail(_x, _x2) {
7
+ return _detail.apply(this, arguments);
8
+ }
9
+ function _detail() {
10
+ _detail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(body, options) {
11
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
12
+ while (1) switch (_context.prev = _context.next) {
13
+ case 0:
14
+ return _context.abrupt("return", request(
15
+ // `user/activeAccountModeSetting/detail`,
16
+ PublishDomainApi("user/activeAccountModeSetting/detail", options === null || options === void 0 ? void 0 : options.env), _objectSpread({
17
+ method: 'GET',
18
+ headers: {
19
+ 'Content-Type': 'application/json'
20
+ },
21
+ data: body
22
+ }, options || {})));
23
+ case 1:
24
+ case "end":
25
+ return _context.stop();
26
+ }
27
+ }, _callee);
28
+ }));
29
+ return _detail.apply(this, arguments);
30
+ }
31
+ export function create(_x3, _x4) {
32
+ return _create.apply(this, arguments);
33
+ }
34
+ function _create() {
35
+ _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body, options) {
36
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
37
+ while (1) switch (_context2.prev = _context2.next) {
38
+ case 0:
39
+ return _context2.abrupt("return", request(PublishDomainApi("user/activeAccountModeSetting/create", options === null || options === void 0 ? void 0 : options.env), _objectSpread({
40
+ method: 'POST',
41
+ headers: {
42
+ 'Content-Type': 'application/json'
43
+ },
44
+ data: body
45
+ }, options || {})));
46
+ case 1:
47
+ case "end":
48
+ return _context2.stop();
49
+ }
50
+ }, _callee2);
51
+ }));
52
+ return _create.apply(this, arguments);
53
+ }
@@ -0,0 +1 @@
1
+ export declare function list(body: PublishTaskPlanStatistic.ListQuery, options?: Global.RequestOptions): Promise<PublishTaskPlanStatistic.List[]>;
@@ -0,0 +1,28 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
+ import request from "../../lib/request";
5
+ import { PublishDomainApi } from "./VideoPublishController";
6
+ export function list(_x, _x2) {
7
+ return _list.apply(this, arguments);
8
+ }
9
+ function _list() {
10
+ _list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(body, options) {
11
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
12
+ while (1) switch (_context.prev = _context.next) {
13
+ case 0:
14
+ return _context.abrupt("return", request(PublishDomainApi("user/publishTaskPlanStatistic/list", options === null || options === void 0 ? void 0 : options.env), _objectSpread({
15
+ method: 'POST',
16
+ headers: {
17
+ 'Content-Type': 'application/json'
18
+ },
19
+ data: body
20
+ }, options || {})));
21
+ case 1:
22
+ case "end":
23
+ return _context.stop();
24
+ }
25
+ }, _callee);
26
+ }));
27
+ return _list.apply(this, arguments);
28
+ }
@@ -12,4 +12,8 @@ interface TaskListQuery extends VideoPublish.TaskListQuery {
12
12
  pageSize: number;
13
13
  }
14
14
  export declare function taskList(body: TaskListQuery, options?: Global.RequestOptions): Promise<VideoPublish.TaskListResult>;
15
+ export declare function videoFromFolderCreate(body: {
16
+ id: number;
17
+ videoFromFolder: string;
18
+ }, options?: Global.RequestOptions): Promise<VideoPublish.VideoAccountList>;
15
19
  export {};
@@ -84,4 +84,27 @@ function _taskList() {
84
84
  }, _callee3);
85
85
  }));
86
86
  return _taskList.apply(this, arguments);
87
+ }
88
+ export function videoFromFolderCreate(_x7, _x8) {
89
+ return _videoFromFolderCreate.apply(this, arguments);
90
+ }
91
+ function _videoFromFolderCreate() {
92
+ _videoFromFolderCreate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(body, options) {
93
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
94
+ while (1) switch (_context4.prev = _context4.next) {
95
+ case 0:
96
+ return _context4.abrupt("return", request(PublishDomainApi("user/videoAccount/videoFromFolderCreate", options === null || options === void 0 ? void 0 : options.env), _objectSpread({
97
+ method: 'POST',
98
+ headers: {
99
+ 'Content-Type': 'application/json'
100
+ },
101
+ data: _objectSpread({}, body)
102
+ }, options || {})));
103
+ case 1:
104
+ case "end":
105
+ return _context4.stop();
106
+ }
107
+ }, _callee4);
108
+ }));
109
+ return _videoFromFolderCreate.apply(this, arguments);
87
110
  }
@@ -0,0 +1,18 @@
1
+ declare namespace ActiveAccountModeSetting {
2
+ interface Detail {
3
+ dayTimeHourList: string[];
4
+ dayPublishMaxAmount: number;
5
+ timeAreaRandOffsetPercent: number;
6
+ publishMaxDay: number;
7
+ enabled: boolean;
8
+ isPublishFinishDelVideo: boolean;
9
+ }
10
+ interface SettingForm {
11
+ dayTimeHourList: string[];
12
+ dayPublishMaxAmount: number;
13
+ timeAreaRandOffsetPercent: number;
14
+ publishMaxDay: number;
15
+ enabled: boolean;
16
+ isPublishFinishDelVideo: boolean;
17
+ }
18
+ }
File without changes
@@ -0,0 +1,15 @@
1
+ declare namespace PublishTaskPlanStatistic {
2
+ interface List {
3
+ videoAccountId: number;
4
+ platform: string;
5
+ status: string;
6
+ publishTime: number;
7
+ videoUrl: string;
8
+ }
9
+ interface ListQuery {
10
+ productType: string;
11
+ platform: string;
12
+ startTime: number;
13
+ endTime: number;
14
+ }
15
+ }
File without changes
@@ -79,6 +79,7 @@ declare namespace VideoPublish {
79
79
  favoritedCount: number;
80
80
  videoAccountProxyId: number;
81
81
  videoCount: number;
82
+ videoFromFolder: string;
82
83
  created: number;
83
84
  updated: number;
84
85
  }
@@ -51,6 +51,7 @@ declare namespace VideoPublishVideoAccount {
51
51
  created: number;
52
52
  updated: number;
53
53
  chromeProfileName: string;
54
+ videoFromFolder: string;
54
55
  proxyInfo: Global.ProxyInfo;
55
56
  }
56
57
  interface Detail {
package/dist/typings.d.ts CHANGED
@@ -3,6 +3,7 @@ declare namespace Global {
3
3
  type AuthClientLoginType = 'wechat' | 'account-login' | 'account-reg' | 'alipay';
4
4
  export type ProductKind = 'vip' | 'vip-card' | string;
5
5
  type OsName = '' | 'darwin' | 'windows' | 'linux' | 'other';
6
+ type MineTypeKind = 'video' | 'image' | 'sound' | '';
6
7
 
7
8
  type VideoPlatformKind = string;
8
9
  interface RequestResult{
@@ -1,3 +1,4 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
1
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
3
  import React, { useState } from "react";
3
4
  import "./index.less";
@@ -27,7 +28,7 @@ var VideoStudyPage = function VideoStudyPage(_ref) {
27
28
  });
28
29
  }, {
29
30
  onSuccess: function onSuccess(result) {
30
- setListData(result);
31
+ setListData(_toConsumableArray(result));
31
32
  }
32
33
  }),
33
34
  run = _useRequest.run,
package/dist/window.d.ts CHANGED
@@ -12,6 +12,7 @@ declare interface Window{
12
12
  fn: ( data?: any ) => void
13
13
  }[];
14
14
  getBridge: () => {
15
+ path: any;
15
16
  ipcRenderer: {
16
17
  invoke: ( name: string, ...arg) => Promise<any>;
17
18
  },
@@ -19,6 +20,10 @@ declare interface Window{
19
20
  onLog: ( log: ( query: any ) => void ) => void;
20
21
  getChromiumPath: () => string;
21
22
  getClientUniqueKey: () => string;
23
+ getFileText: ( dir: string ) => Promise<string>;
24
+ fs: any;
25
+ getIpc: any;
26
+ openDir: ( dir: string ) => Promise<string>
22
27
 
23
28
  openVideoAccountBrowser: ( platform: string, subPlatform: string, accountId: string, url: string , proxyInfo?: Global.ProxyInfo ) => void;
24
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "2.0.18",
3
+ "version": "2.1.1",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",