pixuireactcomponents 1.3.24 → 1.3.26

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 (59) hide show
  1. package/index.d.ts +1 -1
  2. package/lib/check/{util.jsx → util.js} +33 -39
  3. package/lib/preact-router/match/src/index.js +16 -7
  4. package/package.json +1 -1
  5. package/src/components/react/app/bulletscreen/BulletItemAnimation.d.ts +2 -2
  6. package/src/components/react/app/bulletscreen/{BulletItemAnimation.jsx → BulletItemAnimation.js} +7 -8
  7. package/src/components/react/app/bulletscreen/BulletScreenAnimation.d.ts +2 -2
  8. package/src/components/react/app/bulletscreen/{BulletScreenAnimation.jsx → BulletScreenAnimation.js} +8 -11
  9. package/src/components/react/app/button/{Button.jsx → Button.js} +6 -8
  10. package/src/components/react/app/carousel/Carousel.d.ts +1 -1
  11. package/src/components/react/app/carousel/{Carousel.jsx → Carousel.js} +29 -70
  12. package/src/components/react/app/checkBox/{CheckBox.jsx → CheckBox.js} +1 -1
  13. package/src/components/react/app/dropdown/{Dropdown.jsx → Dropdown.js} +5 -9
  14. package/src/components/react/app/imageViewer/{imageViewer.jsx → imageViewer.js} +7 -11
  15. package/src/components/react/app/slider/Slider.d.ts +55 -21
  16. package/src/components/react/app/slider/{Slider.jsx → Slider.js} +152 -96
  17. package/src/components/react/app/togglegroup/{ToggleGroup.jsx → ToggleGroup.js} +16 -18
  18. package/src/components/react/base/gradient/{GradientText.jsx → GradientText.js} +1 -1
  19. package/src/components/react/base/outlinetext/{OutlineText.jsx → OutlineText.js} +2 -3
  20. package/src/components/react/base/pixVideo/PixPlaceHolder.d.ts +2 -2
  21. package/src/components/react/base/pixVideo/{PixPlaceHolder.jsx → PixPlaceHolder.js} +3 -5
  22. package/src/sample/Images.d.ts +0 -31
  23. package/src/sample/Images.js +0 -60
  24. package/src/sample/OutlineText/OutlineDemo.d.ts +0 -20
  25. package/src/sample/OutlineText/OutlineDemo.jsx +0 -60
  26. package/src/sample/bulletscreen/BulletDemo.d.ts +0 -12
  27. package/src/sample/bulletscreen/BulletDemo.jsx +0 -83
  28. package/src/sample/button/ButtonDemo.d.ts +0 -4
  29. package/src/sample/button/ButtonDemo.jsx +0 -30
  30. package/src/sample/carousel/carouselDemo.d.ts +0 -1
  31. package/src/sample/carousel/carouselDemo.jsx +0 -107
  32. package/src/sample/checkBox/checkBoxDemo.d.ts +0 -1
  33. package/src/sample/checkBox/checkBoxDemo.jsx +0 -23
  34. package/src/sample/dropdown/DropdownDemo.d.ts +0 -6
  35. package/src/sample/dropdown/DropdownDemo.jsx +0 -65
  36. package/src/sample/dropdown/MoneyDropdownOption.d.ts +0 -6
  37. package/src/sample/dropdown/MoneyDropdownOption.jsx +0 -57
  38. package/src/sample/dropdown/MoneyDropdownSpreadMain.d.ts +0 -5
  39. package/src/sample/dropdown/MoneyDropdownSpreadMain.jsx +0 -50
  40. package/src/sample/dropdown/MoneyDropdownUnspreadMain.d.ts +0 -5
  41. package/src/sample/dropdown/MoneyDropdownUnspreadMain.jsx +0 -50
  42. package/src/sample/gradient/GradientDemo.d.ts +0 -16
  43. package/src/sample/gradient/GradientDemo.jsx +0 -53
  44. package/src/sample/imageViewer/Images.d.ts +0 -4
  45. package/src/sample/imageViewer/Images.jsx +0 -6
  46. package/src/sample/imageViewer/imageViewerDemo.d.ts +0 -10
  47. package/src/sample/imageViewer/imageViewerDemo.jsx +0 -70
  48. package/src/sample/slider/SliderDemo.d.ts +0 -10
  49. package/src/sample/slider/SliderDemo.jsx +0 -117
  50. package/src/sample/togglegroup/ToggleGroupDemo.d.ts +0 -4
  51. package/src/sample/togglegroup/ToggleGroupDemo.jsx +0 -64
  52. package/tsconfig.json +0 -55
  53. /package/lib/check/{main.jsx → main.js} +0 -0
  54. /package/lib/pi_component/tinyList/{tinyList.jsx → tinyList.js} +0 -0
  55. /package/src/components/react/app/dropdown/{DropdownOptionUI.jsx → DropdownOptionUI.js} +0 -0
  56. /package/src/components/react/app/dropdown/{DropdownSpreadMainUI.jsx → DropdownSpreadMainUI.js} +0 -0
  57. /package/src/components/react/app/dropdown/{DropdownUnspreadMainUI.jsx → DropdownUnspreadMainUI.js} +0 -0
  58. /package/src/components/react/base/pixVideo/{PixVideo.jsx → PixVideo.js} +0 -0
  59. /package/src/components/tools/{Logger.jsx → Logger.js} +0 -0
@@ -1,6 +0,0 @@
1
- import bg1 from './asset/bg1.png';
2
- import bg2 from './asset/bg2.png';
3
- export var Images = {
4
- bg1: bg1,
5
- bg2: bg2,
6
- };
@@ -1,10 +0,0 @@
1
- import { Component } from 'preact';
2
- export declare class ImageViewerDemo extends Component<any, {
3
- isViewerOpen: boolean;
4
- imageUrl: string;
5
- }> {
6
- constructor(props: any);
7
- onOpenImageViewer(url: any): void;
8
- onCloseImageViewer: () => void;
9
- render(): any;
10
- }
@@ -1,70 +0,0 @@
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
- import { Images } from './Images';
18
- import { ImageViewer } from 'src/components/react/app/imageViewer/imageViewer';
19
- var ImageViewerDemo = /** @class */ (function (_super) {
20
- __extends(ImageViewerDemo, _super);
21
- function ImageViewerDemo(props) {
22
- var _this = _super.call(this, props) || this;
23
- _this.onCloseImageViewer = function () {
24
- console.log('onClose');
25
- _this.setState({
26
- isViewerOpen: false,
27
- });
28
- };
29
- _this.state = {
30
- isViewerOpen: false,
31
- imageUrl: '',
32
- };
33
- return _this;
34
- }
35
- ImageViewerDemo.prototype.onOpenImageViewer = function (url) {
36
- console.log('onOpen');
37
- this.setState({
38
- isViewerOpen: true,
39
- imageUrl: url,
40
- });
41
- };
42
- ImageViewerDemo.prototype.render = function () {
43
- var _this = this;
44
- return (<div style={{
45
- width: '100%',
46
- height: '100%',
47
- }}>
48
- {/* <ImageViewer>应在root节点下才能保证全屏居中展示 */}
49
- {this.state.isViewerOpen && <ImageViewer src={this.state.imageUrl} onClose={this.onCloseImageViewer} imageAreaStyle={{
50
- width: '80%',
51
- height: '80%',
52
- }}/>}
53
-
54
- <div style={{
55
- backgroundColor: 'rgba(125,0,0,0.8)',
56
- display: 'flex',
57
- flexDirection: 'row',
58
- justifyContent: 'center',
59
- alignItems: 'center',
60
- width: '50%',
61
- height: '50%',
62
- }}>
63
- <img src={Images.bg1} style={{ width: '166px', height: '102.4px' }} onClick={function () { return _this.onOpenImageViewer(Images.bg1); }}/>
64
- <img src={Images.bg2} style={{ width: '166px', height: '102.4px' }} onClick={function () { return _this.onOpenImageViewer(Images.bg2); }}/>
65
- </div>
66
- </div>);
67
- };
68
- return ImageViewerDemo;
69
- }(Component));
70
- export { ImageViewerDemo };
@@ -1,10 +0,0 @@
1
- import { Component, h } from 'preact';
2
- export declare class SliderDemo extends Component<any, {
3
- percent: number;
4
- }> {
5
- constructor(props: any);
6
- onDrag: (value: number) => void;
7
- onDecClick: (value: number) => void;
8
- onIncClick: (value: number) => void;
9
- render(): h.JSX.Element;
10
- }
@@ -1,117 +0,0 @@
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
- import { Slider } from 'src/components/react/app/slider/Slider';
18
- var Images = {
19
- inner: 'https://game.gtimg.cn/images/gamelet/cp/pxidePreView-slider/inner.png',
20
- outer: 'https://game.gtimg.cn/images/gamelet/cp/pxidePreView-slider/outer.png',
21
- dot: 'https://game.gtimg.cn/images/gamelet/cp/pxidePreView-slider/dot.png',
22
- };
23
- var SliderWrapperStyle = {
24
- position: 'absolute',
25
- width: '376px',
26
- height: '34px',
27
- marginLeft: '32px',
28
- marginTop: '14px',
29
- };
30
- var SliderData = {
31
- percent: 0,
32
- wrapperHeight: 34,
33
- wrapperWidth: 376,
34
- height: 5,
35
- innerHeight: 15,
36
- dotWidth: 26,
37
- dotHeight: 27,
38
- dotWrapperWidth: 56,
39
- dotWrapperHeight: 57,
40
- outerBg: Images.outer,
41
- innerBg: Images.inner,
42
- dotBg: Images.dot,
43
- onDragStart: null,
44
- onDrag: null,
45
- onDragEnd: null,
46
- isDiscrete: true,
47
- discrete: 0,
48
- maxDiscrete: 300,
49
- hasIncDecButton: true,
50
- incButtonWidth: 30,
51
- incButtonHeight: 30,
52
- decButtonWidth: 30,
53
- decButtonHeight: 30,
54
- incButtonBg: Images.dot,
55
- decButtonBg: Images.dot,
56
- overallWidth: 500,
57
- //控制可拖拽范围
58
- rangeControl: false,
59
- startRange: 0,
60
- endRange: 10,
61
- hasDot: true,
62
- };
63
- var percentTextStyle = {
64
- position: 'absolute',
65
- width: '60px',
66
- height: '34px',
67
- marginLeft: '600px',
68
- color: '#ffffff',
69
- fontSize: '20px',
70
- // backgroundColor: '#FF000055'
71
- };
72
- var SliderDemo = /** @class */ (function (_super) {
73
- __extends(SliderDemo, _super);
74
- function SliderDemo(props) {
75
- var _this = _super.call(this, props) || this;
76
- _this.onDrag = function (value) {
77
- var formatPercent = Math.floor(value + 0.5);
78
- formatPercent = Math.max(0, formatPercent);
79
- formatPercent = Math.min(10000, formatPercent);
80
- _this.setState({
81
- percent: formatPercent
82
- });
83
- };
84
- _this.onDecClick = function (value) {
85
- var formatPercent = Math.floor(value + 0.5);
86
- formatPercent = Math.max(0, formatPercent);
87
- formatPercent = Math.min(10000, formatPercent);
88
- _this.setState({
89
- percent: formatPercent
90
- });
91
- };
92
- _this.onIncClick = function (value) {
93
- var formatPercent = Math.floor(value + 0.5);
94
- formatPercent = Math.max(0, formatPercent);
95
- formatPercent = Math.min(10000, formatPercent);
96
- _this.setState({
97
- percent: formatPercent
98
- });
99
- };
100
- _this.state = {
101
- percent: (SliderData.isDiscrete && SliderData.discrete) ? SliderData.discrete : SliderData.percent
102
- };
103
- SliderData.percent = _this.state.percent;
104
- SliderData.onDrag = _this.onDrag;
105
- SliderData.onDecClick = _this.onDecClick;
106
- SliderData.onIncClick = _this.onIncClick;
107
- return _this;
108
- }
109
- SliderDemo.prototype.render = function () {
110
- return (<div style={SliderWrapperStyle}>
111
- <Slider {...SliderData}/>
112
- <text style={percentTextStyle}>{this.state.percent + '%'}</text>
113
- </div>);
114
- };
115
- return SliderDemo;
116
- }(Component));
117
- export { SliderDemo };
@@ -1,4 +0,0 @@
1
- import { Component } from 'preact';
2
- export declare class ToggleGroupDemo extends Component<any, any> {
3
- render(): any;
4
- }
@@ -1,64 +0,0 @@
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
- import { ToggleGroup } from 'src/components/react/app/togglegroup/ToggleGroup';
18
- import { Images } from '../Images';
19
- var togglePic = {
20
- selectedPic: Images.checkbox1,
21
- notSelectedPic: Images.checkbox0,
22
- };
23
- var toggleArray = [
24
- {
25
- toggleText: '111',
26
- selectedFun: function () {
27
- console.log('111');
28
- },
29
- notSelectedFun: function () {
30
- console.log('-111');
31
- },
32
- },
33
- {
34
- toggleText: '222',
35
- selectedFun: function () {
36
- console.log('222');
37
- },
38
- notSelectedFun: function () {
39
- console.log('-222');
40
- },
41
- },
42
- {
43
- toggleText: '333',
44
- selectedFun: function () {
45
- console.log('333');
46
- },
47
- notSelectedFun: function () {
48
- console.log('-333');
49
- },
50
- },
51
- ];
52
- var ToggleGroupDemo = /** @class */ (function (_super) {
53
- __extends(ToggleGroupDemo, _super);
54
- function ToggleGroupDemo() {
55
- return _super !== null && _super.apply(this, arguments) || this;
56
- }
57
- ToggleGroupDemo.prototype.render = function () {
58
- return (<div>
59
- <ToggleGroup togglePic={togglePic} toggleArray={toggleArray} isMultiOption={false}/>
60
- </div>);
61
- };
62
- return ToggleGroupDemo;
63
- }(Component));
64
- export { ToggleGroupDemo };
package/tsconfig.json DELETED
@@ -1,55 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es5",
4
- "module": "ES2022",
5
- "lib": [
6
- "dom",
7
- "dom.iterable",
8
- "esnext"
9
- ],
10
- "baseUrl": ".",
11
- "paths": {
12
- "preact": [
13
- "lib/preact/src"
14
- ],
15
- "preact/hooks": [
16
- "lib/preact/hooks/src"
17
- ],
18
- "preact-router": [
19
- "lib/preact-router"
20
- ],
21
- "preact-router/match": [
22
- "lib/preact-router/match"
23
- ]
24
- },
25
- "outDir": "./publish_components",
26
- "allowJs": true,
27
- "skipLibCheck": true,
28
- "esModuleInterop": true,
29
- "allowSyntheticDefaultImports": true,
30
- "strict": true,
31
- "forceConsistentCasingInFileNames": true,
32
- "moduleResolution": "node",
33
- "resolveJsonModule": true,
34
- "noImplicitAny": false,
35
- "jsx": "preserve",
36
- "jsxFactory": "h",
37
- // "sourceMap": false,
38
- "declaration": true,
39
- "declarationDir": "./publish_components"
40
- },
41
- "files": [
42
- "index.js",
43
- "package.json",
44
- "tsconfig.json",
45
- ],
46
- "include": [
47
- "lib",
48
- "src",
49
- ],
50
- "exclude": [
51
- "lib/react-window/",
52
- "node_modules",
53
- "**/test"
54
- ]
55
- }
File without changes
File without changes