@cloud-app-dev/vidc 3.2.14 → 3.2.16
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/es/{List/DynamicGridList → DynamicGridList}/Demo.d.ts +0 -0
- package/es/{List/DynamicGridList → DynamicGridList}/Demo.js +7 -2
- package/es/{List/DynamicGridList → DynamicGridList}/index.d.ts +1 -1
- package/es/{List/DynamicGridList → DynamicGridList}/index.js +1 -1
- package/es/DynamicList/demo.d.ts +2 -0
- package/es/DynamicList/demo.js +60 -0
- package/es/{List/DynamicList → DynamicList}/index.d.ts +18 -1
- package/es/{List/DynamicList → DynamicList}/index.js +8 -7
- package/es/{List/DynamicList → DynamicList}/index.less +0 -0
- package/es/{List/DynamicList → DynamicList}/interface.d.ts +0 -0
- package/es/{List/DynamicList → DynamicList}/utils.d.ts +0 -0
- package/es/{List/DynamicList → DynamicList}/utils.js +0 -0
- package/es/{List/GridList → GridList}/Demo.d.ts +0 -0
- package/es/{List/GridList → GridList}/Demo.js +4 -3
- package/es/GridList/data.d.ts +16 -0
- package/es/GridList/data.js +609 -0
- package/es/{List/GridList → GridList}/hook.d.ts +0 -0
- package/es/{List/GridList → GridList}/hook.js +0 -0
- package/es/{List/GridList → GridList}/index.d.ts +1 -1
- package/es/{List/GridList → GridList}/index.js +1 -1
- package/es/{List/GridList → GridList}/index.less +0 -0
- package/es/{List/GridList → GridList}/interface.d.ts +0 -0
- package/es/{List/GridList → GridList}/utils.d.ts +0 -0
- package/es/{List/GridList → GridList}/utils.js +0 -0
- package/es/List/index.d.ts +28 -5
- package/es/List/index.js +6 -5
- package/es/ListWithSizeAnimate/demo.js +130 -8
- package/es/ListWithSizeAnimate/index.d.ts +8 -2
- package/es/ListWithSizeAnimate/index.js +63 -11
- package/es/ListWithSizeAnimate/index.less +6 -0
- package/es/ScreenPlayer/Live.js +3 -3
- package/es/ScreenPlayer/LiveTools.d.ts +1 -1
- package/es/ScreenPlayer/ScreenSelect.js +1 -1
- package/es/{List/VList → VList}/index.d.ts +0 -0
- package/es/{List/VList → VList}/index.js +5 -4
- package/es/{List/VList → VList}/index.less +0 -0
- package/es/{List/VList → VList}/utils.d.ts +0 -0
- package/es/{List/VList → VList}/utils.js +0 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +4 -0
- package/package.json +1 -1
- package/es/List/GridList/data.json +0 -710
- package/es/List/interface.d.ts +0 -29
|
File without changes
|
|
@@ -10,6 +10,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
10
10
|
|
|
11
11
|
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; }
|
|
12
12
|
|
|
13
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
13
14
|
import React from 'react';
|
|
14
15
|
import GridList from "./index";
|
|
15
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -33,8 +34,12 @@ var IMAGES = function IMAGES() {
|
|
|
33
34
|
});
|
|
34
35
|
};
|
|
35
36
|
|
|
36
|
-
function loadPage() {
|
|
37
|
-
|
|
37
|
+
function loadPage(d) {
|
|
38
|
+
if (!d) {
|
|
39
|
+
// eslint-disable-next-line no-param-reassign
|
|
40
|
+
d = {};
|
|
41
|
+
}
|
|
42
|
+
|
|
38
43
|
var resultData = IMAGES();
|
|
39
44
|
d.page ? d.page++ : d.page = 1;
|
|
40
45
|
d.list ? d.list = [].concat(_toConsumableArray(d.list), _toConsumableArray(resultData)) : d.list = resultData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TData } from '../../useInfiniteScroll';
|
|
3
2
|
import { GridListCell } from '../GridList/interface';
|
|
3
|
+
import { TData } from '../useInfiniteScroll';
|
|
4
4
|
export interface IDynamicGridListProps<T> {
|
|
5
5
|
itemHeight?: number;
|
|
6
6
|
className?: string;
|
|
@@ -6,8 +6,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
6
6
|
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; }
|
|
7
7
|
|
|
8
8
|
import React, { useMemo, useRef } from 'react';
|
|
9
|
-
import useInfiniteScroll from "../../useInfiniteScroll";
|
|
10
9
|
import GridList from "../GridList";
|
|
10
|
+
import useInfiniteScroll from "../useInfiniteScroll";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
|
|
13
13
|
function DynamicGridList(_ref) {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import "antd/lib/config-provider/style";
|
|
2
|
+
import _ConfigProvider from "antd/lib/config-provider";
|
|
3
|
+
|
|
4
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
|
+
|
|
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."); }
|
|
7
|
+
|
|
8
|
+
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); }
|
|
9
|
+
|
|
10
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
+
|
|
12
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import DynamicList from "./index";
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
var resultData = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13'];
|
|
20
|
+
|
|
21
|
+
function loadPage(d) {
|
|
22
|
+
if (!d) {
|
|
23
|
+
// eslint-disable-next-line no-param-reassign
|
|
24
|
+
d = {};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
d.page ? d.page++ : d.page = 1;
|
|
28
|
+
d.list ? d.list = [].concat(_toConsumableArray(d.list), resultData) : d.list = resultData;
|
|
29
|
+
return new Promise(function (resolve) {
|
|
30
|
+
setTimeout(function () {
|
|
31
|
+
resolve(d);
|
|
32
|
+
}, 2000);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default function () {
|
|
37
|
+
return /*#__PURE__*/_jsx(_ConfigProvider, {
|
|
38
|
+
prefixCls: "cloudapp",
|
|
39
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
40
|
+
style: {
|
|
41
|
+
display: 'flex'
|
|
42
|
+
},
|
|
43
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
44
|
+
style: {
|
|
45
|
+
height: 400,
|
|
46
|
+
width: 300
|
|
47
|
+
},
|
|
48
|
+
children: /*#__PURE__*/_jsx(DynamicList, {
|
|
49
|
+
loadPage: loadPage,
|
|
50
|
+
itemHeight: 40,
|
|
51
|
+
renderItem: function renderItem(item) {
|
|
52
|
+
return /*#__PURE__*/_jsx("div", {
|
|
53
|
+
children: item.data
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { TData } from '../useInfiniteScroll';
|
|
3
3
|
import './index.less';
|
|
4
|
+
export interface IDynamicListProps<T> {
|
|
5
|
+
itemHeight?: number;
|
|
6
|
+
itemClassName?: string;
|
|
7
|
+
/**
|
|
8
|
+
* 重载条件
|
|
9
|
+
*/
|
|
10
|
+
reloadDeps?: any[];
|
|
11
|
+
/**
|
|
12
|
+
* render列表
|
|
13
|
+
* @param options
|
|
14
|
+
*/
|
|
15
|
+
renderItem(options: {
|
|
16
|
+
index: number;
|
|
17
|
+
data: T;
|
|
18
|
+
}): JSX.Element;
|
|
19
|
+
loadPage(d?: TData<T>): Promise<TData<T>>;
|
|
20
|
+
}
|
|
4
21
|
declare function DynamicList<T>({ renderItem, itemHeight, itemClassName, reloadDeps, loadPage }: IDynamicListProps<T>): JSX.Element;
|
|
5
22
|
declare namespace DynamicList {
|
|
6
23
|
var defaultProps: {
|
|
@@ -15,9 +15,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
|
|
17
17
|
import React, { useMemo, useRef } from 'react';
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
18
|
+
import useInfiniteScroll from "../useInfiniteScroll";
|
|
19
|
+
import useVirtualList from "../useVirtualList";
|
|
20
|
+
import { LIMIT, skeletonList } from "./utils"; //style
|
|
21
|
+
|
|
21
22
|
import "./index.less";
|
|
22
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
24
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -28,16 +29,16 @@ function DynamicList(_ref) {
|
|
|
28
29
|
itemClassName = _ref.itemClassName,
|
|
29
30
|
reloadDeps = _ref.reloadDeps,
|
|
30
31
|
loadPage = _ref.loadPage;
|
|
31
|
-
var containerRef = useRef();
|
|
32
|
-
var wrapperRef = useRef();
|
|
32
|
+
var containerRef = useRef(null);
|
|
33
|
+
var wrapperRef = useRef(null);
|
|
33
34
|
|
|
34
35
|
var _useInfiniteScroll = useInfiniteScroll(loadPage, {
|
|
35
36
|
target: containerRef,
|
|
36
37
|
threshold: 50,
|
|
37
38
|
isNoMore: function isNoMore(d) {
|
|
38
|
-
var _d$list;
|
|
39
|
+
var _d$list$length, _d$list;
|
|
39
40
|
|
|
40
|
-
return (d === null || d === void 0 ? void 0 : (_d$list = d.list) === null || _d$list === void 0 ? void 0 : _d$list.length) >= (d === null || d === void 0 ? void 0 : d.count);
|
|
41
|
+
return ((_d$list$length = d === null || d === void 0 ? void 0 : (_d$list = d.list) === null || _d$list === void 0 ? void 0 : _d$list.length) !== null && _d$list$length !== void 0 ? _d$list$length : 0) >= (d === null || d === void 0 ? void 0 : d.count);
|
|
41
42
|
},
|
|
42
43
|
reloadDeps: reloadDeps
|
|
43
44
|
}),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -11,8 +11,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
12
|
|
|
13
13
|
import React, { useEffect, useState } from 'react';
|
|
14
|
+
import data from "./data";
|
|
14
15
|
import GridList from "./index";
|
|
15
|
-
import data from "./data.json";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
18
|
var ITEM_WIDTH = 300;
|
|
@@ -38,7 +38,8 @@ function getItemData(image, columnWidth) {
|
|
|
38
38
|
key: image.index,
|
|
39
39
|
height: 400,
|
|
40
40
|
width: ITEM_WIDTH,
|
|
41
|
-
url: image.url
|
|
41
|
+
url: image.url,
|
|
42
|
+
columnWidth: columnWidth
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -64,7 +65,7 @@ var App = function App() {
|
|
|
64
65
|
getColumnCount: getColumnCount,
|
|
65
66
|
getWindowMargin: getWindowMargin,
|
|
66
67
|
getItemData: getItemData,
|
|
67
|
-
renderItem: function renderItem(image
|
|
68
|
+
renderItem: function renderItem(image) {
|
|
68
69
|
return /*#__PURE__*/_jsxs("div", {
|
|
69
70
|
style: {
|
|
70
71
|
border: '1px solid gray',
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
code: number;
|
|
3
|
+
codeRemark: string;
|
|
4
|
+
data: {
|
|
5
|
+
list: {
|
|
6
|
+
id: string;
|
|
7
|
+
cid: number;
|
|
8
|
+
deviceName: string;
|
|
9
|
+
captureTime: number;
|
|
10
|
+
url: string;
|
|
11
|
+
}[];
|
|
12
|
+
totalCount: number;
|
|
13
|
+
totalPage: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|