pixuireactcomponents 1.0.3 → 1.0.4

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 (64) hide show
  1. package/index.d.ts +8 -1
  2. package/index.js +10 -1
  3. package/package.json +9 -9
  4. package/tools/EventDispatcherJs.d.ts +10 -0
  5. package/tools/EventDispatcherJs.js +71 -0
  6. package/tools/Logger.d.ts +6 -0
  7. package/tools/Logger.js +133 -0
  8. package/ui/components/dropdown/Dropdown.d.ts +30 -0
  9. package/ui/components/dropdown/Dropdown.js +82 -0
  10. package/ui/components/dropdown/DropdownOptionUI.d.ts +10 -0
  11. package/ui/components/dropdown/DropdownOptionUI.js +27 -0
  12. package/ui/components/dropdown/DropdownSpreadMainUI.d.ts +9 -0
  13. package/ui/components/dropdown/DropdownSpreadMainUI.js +27 -0
  14. package/ui/components/dropdown/DropdownUnspreadMainUI.d.ts +9 -0
  15. package/ui/components/dropdown/DropdownUnspreadMainUI.js +27 -0
  16. package/ui/components/progress/Progress.d.ts +34 -0
  17. package/ui/components/progress/Progress.js +142 -0
  18. package/ui/components/tab/Tab.d.ts +6 -0
  19. package/ui/components/tab/Tab.js +27 -0
  20. package/ui/components/tab/Tabs.d.ts +12 -0
  21. package/ui/components/tab/Tabs.js +54 -0
  22. package/ui/components/bulletscreen/BulletItemAnimation.tsx +0 -117
  23. package/ui/components/bulletscreen/BulletScreenAnimation.tsx +0 -278
  24. package/ui/components/bulletscreen/bullet.less +0 -17
  25. package/ui/components/dropdown/Dropdown.tsx +0 -115
  26. package/ui/components/dropdown/DropdownOptionUI.tsx +0 -13
  27. package/ui/components/dropdown/DropdownSpreadMainUI.tsx +0 -11
  28. package/ui/components/dropdown/DropdownUnspreadMainUI.tsx +0 -11
  29. package/ui/components/progress/Progress.tsx +0 -166
  30. package/ui/components/tab/Tab.tsx +0 -12
  31. package/ui/components/tab/Tabs.tsx +0 -56
  32. package/ui/components/videoplayer/VideoPlayer.tsx +0 -200
  33. package/ui/sample/Images.tsx +0 -34
  34. package/ui/sample/asset/data_arrow_down.png +0 -0
  35. package/ui/sample/asset/data_arrow_up.png +0 -0
  36. package/ui/sample/asset/dot.png +0 -0
  37. package/ui/sample/asset/inner.png +0 -0
  38. package/ui/sample/asset/item_reddot.png +0 -0
  39. package/ui/sample/asset/loading.png +0 -0
  40. package/ui/sample/asset/money_dropdown.png +0 -0
  41. package/ui/sample/asset/money_dropdownall.png +0 -0
  42. package/ui/sample/asset/outer.png +0 -0
  43. package/ui/sample/asset/tab_choosed.png +0 -0
  44. package/ui/sample/asset/tabs_bg.png +0 -0
  45. package/ui/sample/asset/video_pause.png +0 -0
  46. package/ui/sample/asset/video_play.png +0 -0
  47. package/ui/sample/asset/video_reload.png +0 -0
  48. package/ui/sample/bulletscreen/BulletDemo.tsx +0 -86
  49. package/ui/sample/dropdown/DropdownDemo.tsx +0 -65
  50. package/ui/sample/dropdown/MoneyDropdownOption.tsx +0 -49
  51. package/ui/sample/dropdown/MoneyDropdownSpreadMain.tsx +0 -42
  52. package/ui/sample/dropdown/MoneyDropdownUnspreadMain.tsx +0 -44
  53. package/ui/sample/less/video.less +0 -143
  54. package/ui/sample/progress/ProgressDemo.tsx +0 -74
  55. package/ui/sample/tab/TabDemo.tsx +0 -67
  56. package/ui/sample/tab/TopTab.tsx +0 -74
  57. package/ui/sample/videoplayer/VideoPlayerDemo.tsx +0 -57
  58. package/utils/EventDispatcherJs.tsx +0 -74
  59. package/utils/GenerateConstructorAndGeterSeter.js +0 -223
  60. package/utils/Logger.tsx +0 -158
  61. package/utils/MakeImage.js +0 -204
  62. package/utils/img/logger.png +0 -0
  63. package/utils/img/makeImage.png +0 -0
  64. package/utils/utils.md +0 -145
package/index.d.ts CHANGED
@@ -1,2 +1,9 @@
1
- export { Tab } from "./ui/components/tab/Tab";
2
1
  export { Tabs } from "./ui/components/tab/Tabs";
2
+ export { Tab } from "./ui/components/tab/Tab";
3
+ export { Progress } from "./ui/components/progress/Progress";
4
+ export { DropdownOptionUI } from "./ui/components/dropdown/DropdownOptionUI";
5
+ export { DropdownSpreadMainUI } from "./ui/components/dropdown/DropdownSpreadMainUI";
6
+ export { DropdownUnspreadMainUI } from "./ui/components/dropdown/DropdownUnspreadMainUI";
7
+ export { Logger } from "./tools/Logger";
8
+ export { EventDispatcherJs } from "./tools/EventDispatcherJs";
9
+ export { Dropdown, DropdownConfig } from "./ui/components/dropdown/Dropdown";
package/index.js CHANGED
@@ -1 +1,10 @@
1
- console.log("Hello, 欢迎使用PixUI React Components")
1
+ export { Tabs } from "./ui/components/tab/Tabs";
2
+ export { Tab } from "./ui/components/tab/Tab";
3
+ export { Progress } from "./ui/components/progress/Progress";
4
+ export { Dropdown } from "./ui/components/dropdown/Dropdown";
5
+ export { DropdownOptionUI } from "./ui/components/dropdown/DropdownOptionUI";
6
+ export { DropdownSpreadMainUI } from "./ui/components/dropdown/DropdownSpreadMainUI";
7
+ export { DropdownUnspreadMainUI } from "./ui/components/dropdown/DropdownUnspreadMainUI";
8
+ export { Logger } from "./tools/Logger";
9
+ export { EventDispatcherJs } from "./tools/EventDispatcherJs";
10
+ console.log("Hello, 欢迎使用PixUI React Components");
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
- "name": "pixuireactcomponents",
3
- "version": "1.0.3",
4
- "description": "pixui react components",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "author": "hardenzheng",
10
- "license": "ISC"
2
+ "name": "pixuireactcomponents",
3
+ "version": "1.0.4",
4
+ "description": "pixui react components",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "hardenzheng",
10
+ "license": "ISC"
11
11
  }
@@ -0,0 +1,10 @@
1
+ declare class EventDispatcherCls {
2
+ listeners: {};
3
+ AddEventListener(eventName: string, listener: any, ...args: any[]): void;
4
+ HasEventListener(eventName: string): boolean;
5
+ RemoveEventListener(eventName: string, listener: any): void;
6
+ RemoveEventAllListener(eventName: string): void;
7
+ DispatchEvent(eventName: string, ...args: any[]): void;
8
+ }
9
+ export declare let EventDispatcherJs: Readonly<EventDispatcherCls>;
10
+ export {};
@@ -0,0 +1,71 @@
1
+ var EventDispatcherCls = /** @class */ (function () {
2
+ function EventDispatcherCls() {
3
+ this.listeners = {};
4
+ }
5
+ EventDispatcherCls.prototype.AddEventListener = function (eventName, listener) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ if (listener == undefined) {
11
+ console.warn("listener为空, eventName: " + eventName);
12
+ return;
13
+ }
14
+ var listeners = this.listeners;
15
+ if (listeners[eventName] == undefined) {
16
+ listeners[eventName] = [];
17
+ }
18
+ var eventList = listeners[eventName];
19
+ eventList.forEach(function (v) {
20
+ if (v.eventName == eventName && v.listener == listener) {
21
+ console.warn("重复添加的事件监听, eventName: " + eventName);
22
+ return;
23
+ }
24
+ });
25
+ eventList.push({ "eventName": eventName, "listener": listener, "args": args, });
26
+ };
27
+ EventDispatcherCls.prototype.HasEventListener = function (eventName) {
28
+ if (this.listeners[eventName] == undefined || this.listeners[eventName].length == 0) {
29
+ return false;
30
+ }
31
+ return true;
32
+ };
33
+ EventDispatcherCls.prototype.RemoveEventListener = function (eventName, listener) {
34
+ if (this.HasEventListener(eventName) == false) {
35
+ return;
36
+ }
37
+ var eventList = this.listeners[eventName];
38
+ for (var i = eventList.length - 1; i >= 0; --i) {
39
+ var event_1 = eventList[i];
40
+ if (event_1.eventName == eventName && event_1.listener == listener) {
41
+ eventList.splice(i, 1);
42
+ }
43
+ }
44
+ if (eventList.length == 0) {
45
+ this.listeners[eventName] = null;
46
+ }
47
+ };
48
+ EventDispatcherCls.prototype.RemoveEventAllListener = function (eventName) {
49
+ if (this.HasEventListener(eventName)) {
50
+ this.listeners[eventName] = null;
51
+ }
52
+ };
53
+ EventDispatcherCls.prototype.DispatchEvent = function (eventName) {
54
+ var args = [];
55
+ for (var _i = 1; _i < arguments.length; _i++) {
56
+ args[_i - 1] = arguments[_i];
57
+ }
58
+ if (eventName == undefined || this.HasEventListener(eventName) == false) {
59
+ return;
60
+ }
61
+ var eventList = this.listeners[eventName].slice(0);
62
+ for (var i = 0; i < eventList.length; ++i) {
63
+ var obj = eventList[i];
64
+ var listener = obj.listener;
65
+ // listener.apply(this, obj.args.concat(args));
66
+ listener.apply(void 0, obj.args.concat(args));
67
+ }
68
+ };
69
+ return EventDispatcherCls;
70
+ }());
71
+ export var EventDispatcherJs = Object.freeze(new EventDispatcherCls());
@@ -0,0 +1,6 @@
1
+ export declare function Logger(): void;
2
+ export declare namespace Logger {
3
+ var ObjectPrinter: (object: any, name: any) => void;
4
+ var ObjectPrinter2: (object: any, name: any) => void;
5
+ var HierarchyPrinter: (object: any, name: any) => void;
6
+ }
@@ -0,0 +1,133 @@
1
+ export function Logger() {
2
+ }
3
+ /**
4
+ * printer1: 完整打印,用4个空格缩进
5
+ */
6
+ // 移除最后一个(key, value)后面的 ','
7
+ var regex = new RegExp("(,)(\n$)");
8
+ Logger.ObjectPrinter = function (object, name) {
9
+ var strResult = "";
10
+ strResult += name + " = ";
11
+ strResult += getTreeStyleStr(object, 1);
12
+ strResult = strResult.replace(regex, "$2");
13
+ console.warn(strResult);
14
+ };
15
+ function getTreeStyleStr(object, level) {
16
+ var isArray = object instanceof Array;
17
+ var str = isArray ? "[\n" : "{\n";
18
+ for (var key in object) {
19
+ var value = object[key];
20
+ var curSeparation = getSeparation1(level);
21
+ if (typeof (value) != 'object') {
22
+ str += curSeparation + key + " : " + value + ",\n";
23
+ }
24
+ else {
25
+ str += curSeparation + key + " : " + getTreeStyleStr(value, level + 1);
26
+ }
27
+ }
28
+ str = str.replace(regex, "$2");
29
+ str += getSeparation1(level - 1) + (isArray ? "],\n" : "},\n");
30
+ return str;
31
+ }
32
+ var SEPARARION1 = " ";
33
+ function getSeparation1(level) {
34
+ var totalSeparation = "";
35
+ while (level > 0) {
36
+ totalSeparation += SEPARARION1;
37
+ level--;
38
+ }
39
+ return totalSeparation;
40
+ }
41
+ /**
42
+ printer2: 完整打印,用\t
43
+ *
44
+ */
45
+ var regexForLine = new RegExp(",$");
46
+ Logger.ObjectPrinter2 = function (object, name) {
47
+ var lines = [];
48
+ lines.push("".concat(name, " = "));
49
+ getTreeStyleLines(object, 1, lines);
50
+ console.warn(lines.join("\n"));
51
+ };
52
+ function getTreeStyleLines(object, level, lines) {
53
+ var isArray = object instanceof Array;
54
+ var linePostFix = isArray ? "[" : "{";
55
+ var lastLine = lines.pop();
56
+ lines.push(lastLine + linePostFix);
57
+ for (var key in object) {
58
+ var value = object[key];
59
+ var curSeparation = getSeparation2(level);
60
+ if (typeof (value) != 'object') {
61
+ var curLine = curSeparation + key + " : " + value + ",";
62
+ lines.push(curLine);
63
+ }
64
+ else {
65
+ var curLinePreFix = curSeparation + key + " : ";
66
+ lines.push(curLinePreFix);
67
+ getTreeStyleLines(value, level + 1, lines);
68
+ }
69
+ }
70
+ lastLine = lines.pop();
71
+ if (lastLine)
72
+ lines.push(lastLine.replace(regexForLine, "")); // 一定执行
73
+ lines.push(getSeparation2(level - 1) + (isArray ? "]" : "}"));
74
+ }
75
+ var SEPARARION2 = "\t";
76
+ function getSeparation2(level) {
77
+ var totalSeparation = "";
78
+ while (level > 0) {
79
+ totalSeparation += SEPARARION2;
80
+ level--;
81
+ }
82
+ return totalSeparation;
83
+ }
84
+ /**
85
+ printer3: 打印关键层级信息,如果是数组,只打印第一个,后续用 ...len 代替(PS: 假定数组中每个元素都是一样的格式)
86
+ *
87
+ */
88
+ Logger.HierarchyPrinter = function (object, name) {
89
+ var lines = [];
90
+ lines.push("".concat(name, " = "));
91
+ getTreeStyleHierarchyLines(object, 1, lines);
92
+ console.warn(lines.join("\n"));
93
+ };
94
+ function getTreeStyleHierarchyLines(object, level, lines) {
95
+ var isArray = object instanceof Array;
96
+ var linePostFix = isArray ? "[" : "{";
97
+ var lastLine = lines.pop();
98
+ lines.push(lastLine + linePostFix);
99
+ if (isArray) {
100
+ var key = 0;
101
+ var value = object[key];
102
+ var curSeparation = getSeparation2(level);
103
+ if (typeof (value) != 'object') {
104
+ var curLine = curSeparation + key + " : " + value + ",";
105
+ lines.push(curLine);
106
+ }
107
+ else {
108
+ var curLinePreFix = curSeparation + key + " : ";
109
+ lines.push(curLinePreFix);
110
+ getTreeStyleHierarchyLines(value, level + 1, lines);
111
+ }
112
+ lines.push(curSeparation + "...len=" + object.length);
113
+ }
114
+ else {
115
+ for (var key in object) {
116
+ var value = object[key];
117
+ var curSeparation = getSeparation2(level);
118
+ if (typeof (value) != 'object') {
119
+ var curLine = curSeparation + key + " : " + value + ",";
120
+ lines.push(curLine);
121
+ }
122
+ else {
123
+ var curLinePreFix = curSeparation + key + " : ";
124
+ lines.push(curLinePreFix);
125
+ getTreeStyleHierarchyLines(value, level + 1, lines);
126
+ }
127
+ }
128
+ lastLine = lines.pop();
129
+ if (lastLine)
130
+ lines.push(lastLine.replace(regexForLine, "")); // 一定执行
131
+ }
132
+ lines.push(getSeparation2(level - 1) + (isArray ? "]" : "}"));
133
+ }
@@ -0,0 +1,30 @@
1
+ import { Component, CSSProperties, h } from "preact";
2
+ import { DropdownOptionUI } from "./DropdownOptionUI";
3
+ import { DropdownSpreadMainUI } from "./DropdownSpreadMainUI";
4
+ import { DropdownUnspreadMainUI } from "./DropdownUnspreadMainUI";
5
+ export interface DropdownConfig<T> {
6
+ spreadStyle: CSSProperties;
7
+ datas: T[];
8
+ }
9
+ export declare class Dropdown<T, DDUnspreadMainUI extends DropdownUnspreadMainUI<T>, DDSpreadMainUI extends DropdownSpreadMainUI<T>, DDOptionUI extends DropdownOptionUI<T>> extends Component<{
10
+ config: DropdownConfig<T>;
11
+ onChoose: Function;
12
+ defaultIndex: number | null;
13
+ unspreadMainUI: DDUnspreadMainUI;
14
+ spreadMainUI: DDSpreadMainUI;
15
+ optionsUI: DDOptionUI[];
16
+ }, {
17
+ selectedIndex: number;
18
+ isSpread: boolean;
19
+ }> {
20
+ constructor(props: any);
21
+ componentWillUnmount(): void;
22
+ addNetEvents: () => void;
23
+ removeNetEvents: () => void;
24
+ addLogicEvents: () => void;
25
+ removeLogicEvents: () => void;
26
+ openList: () => void;
27
+ closeList: () => void;
28
+ onChoose: (index: number) => void;
29
+ render(): h.JSX.Element;
30
+ }
@@ -0,0 +1,82 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ import { Component, h } from "preact";
17
+ var Dropdown = /** @class */ (function (_super) {
18
+ __extends(Dropdown, _super);
19
+ function Dropdown(props) {
20
+ var _this = _super.call(this, props) || this;
21
+ _this.addNetEvents = function () {
22
+ };
23
+ _this.removeNetEvents = function () {
24
+ };
25
+ _this.addLogicEvents = function () {
26
+ };
27
+ _this.removeLogicEvents = function () {
28
+ };
29
+ _this.openList = function () {
30
+ // console.warn("open dropdown====")
31
+ _this.setState({
32
+ isSpread: true
33
+ });
34
+ };
35
+ _this.closeList = function () {
36
+ // console.warn("close dropdown====")
37
+ _this.setState({
38
+ isSpread: false
39
+ });
40
+ };
41
+ _this.onChoose = function (index) {
42
+ _this.props.onChoose(index);
43
+ // console.warn('dropdown-=----', index)
44
+ _this.setState({
45
+ selectedIndex: index,
46
+ isSpread: false
47
+ });
48
+ };
49
+ _this.addNetEvents();
50
+ _this.addLogicEvents();
51
+ var initIndex = _this.props.defaultIndex == null ? 0 : _this.props.defaultIndex;
52
+ _this.state = {
53
+ selectedIndex: initIndex,
54
+ isSpread: false
55
+ };
56
+ return _this;
57
+ }
58
+ Dropdown.prototype.componentWillUnmount = function () {
59
+ this.removeLogicEvents();
60
+ this.removeNetEvents();
61
+ };
62
+ Dropdown.prototype.render = function () {
63
+ var _this = this;
64
+ if (!this.state.isSpread) {
65
+ this.props.unspreadMainUI.props.info = this.props.config.datas[this.state.selectedIndex];
66
+ this.props.unspreadMainUI.props.openList = this.openList;
67
+ return (h("div", null, this.props.unspreadMainUI));
68
+ }
69
+ this.props.spreadMainUI.props.info = this.props.config.datas[this.state.selectedIndex];
70
+ this.props.spreadMainUI.props.closeList = this.closeList;
71
+ this.props.optionsUI.forEach(function (v, index) { v.props.onChoose = function () { _this.onChoose(index); }; });
72
+ var _optionsUI = this.props.optionsUI.filter(function (v) { return v.props.index != _this.state.selectedIndex; });
73
+ if (_optionsUI.length > 0)
74
+ _optionsUI[_optionsUI.length - 1].props["isLast"] = true;
75
+ return (h("div", null,
76
+ h("div", { style: this.props.config.spreadStyle },
77
+ this.props.spreadMainUI,
78
+ _optionsUI)));
79
+ };
80
+ return Dropdown;
81
+ }(Component));
82
+ export { Dropdown };
@@ -0,0 +1,10 @@
1
+ import { Component } from "preact";
2
+ /**
3
+ * dropdown 打开时options列表的单个Item UI
4
+ */
5
+ export declare abstract class DropdownOptionUI<T> extends Component<{
6
+ info: T;
7
+ onChoose: Function;
8
+ index: number;
9
+ }, any> {
10
+ }
@@ -0,0 +1,27 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ import { Component } from "preact";
17
+ /**
18
+ * dropdown 打开时options列表的单个Item UI
19
+ */
20
+ var DropdownOptionUI = /** @class */ (function (_super) {
21
+ __extends(DropdownOptionUI, _super);
22
+ function DropdownOptionUI() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ return DropdownOptionUI;
26
+ }(Component));
27
+ export { DropdownOptionUI };
@@ -0,0 +1,9 @@
1
+ import { Component } from "preact";
2
+ /**
3
+ * dropdown 打开时选中框的UI
4
+ */
5
+ export declare abstract class DropdownSpreadMainUI<T> extends Component<{
6
+ info: T;
7
+ closeList: Function;
8
+ }, any> {
9
+ }
@@ -0,0 +1,27 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ import { Component } from "preact";
17
+ /**
18
+ * dropdown 打开时选中框的UI
19
+ */
20
+ var DropdownSpreadMainUI = /** @class */ (function (_super) {
21
+ __extends(DropdownSpreadMainUI, _super);
22
+ function DropdownSpreadMainUI() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ return DropdownSpreadMainUI;
26
+ }(Component));
27
+ export { DropdownSpreadMainUI };
@@ -0,0 +1,9 @@
1
+ import { Component } from "preact";
2
+ /**
3
+ * dropdown 未打开时选中框的UI
4
+ */
5
+ export declare abstract class DropdownUnspreadMainUI<T> extends Component<{
6
+ info: T;
7
+ openList: Function;
8
+ }, any> {
9
+ }
@@ -0,0 +1,27 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ import { Component } from "preact";
17
+ /**
18
+ * dropdown 未打开时选中框的UI
19
+ */
20
+ var DropdownUnspreadMainUI = /** @class */ (function (_super) {
21
+ __extends(DropdownUnspreadMainUI, _super);
22
+ function DropdownUnspreadMainUI() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ return DropdownUnspreadMainUI;
26
+ }(Component));
27
+ export { DropdownUnspreadMainUI };
@@ -0,0 +1,34 @@
1
+ import { Component, h } from "preact";
2
+ export interface ProgressProps {
3
+ percent: number;
4
+ wrapperWidth: number;
5
+ wrapperHeight: number;
6
+ height: number;
7
+ dotWidth: number;
8
+ dotHeight: number;
9
+ dotWrapperWidth: number;
10
+ dotWrapperHeight: number;
11
+ outerBg: string;
12
+ innerBg: string;
13
+ dotBg: string;
14
+ onDragStart: Function | null;
15
+ onDrag: Function | null;
16
+ onDragEnd: Function | null;
17
+ }
18
+ export declare class Progress extends Component<ProgressProps, {
19
+ percent: number;
20
+ }> {
21
+ private refWrapper;
22
+ constructor(props: any);
23
+ componentDidMount(): void;
24
+ componentWillReceiveProps(nextProps: any): void;
25
+ onDragStart: (event: any) => void;
26
+ onDrag: (event: any) => void;
27
+ onDragEnd: (event: any) => void;
28
+ computeWrapperStyle: () => void;
29
+ computeOuterStyle: () => void;
30
+ computeInnerStyle: () => void;
31
+ computeDotWrapperStyle: () => void;
32
+ computeDotStyle: () => void;
33
+ render(): h.JSX.Element;
34
+ }