pb-sxp-ui 1.0.42 → 1.0.43

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 (60) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +111 -111
  3. package/dist/index.cjs +237 -600
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +4 -54
  6. package/dist/index.js +237 -599
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.min.cjs +3 -4
  9. package/dist/index.min.cjs.map +1 -1
  10. package/dist/index.min.js +3 -4
  11. package/dist/index.min.js.map +1 -1
  12. package/dist/pb-ui.js +241 -603
  13. package/dist/pb-ui.js.map +1 -1
  14. package/dist/pb-ui.min.js +3 -4
  15. package/dist/pb-ui.min.js.map +1 -1
  16. package/es/core/components/SxpPageCore/index.js +2 -2
  17. package/es/core/components/SxpPageRender/Nudge/index.js +5 -6
  18. package/es/core/components/SxpPageRender/VideoWidget/index.d.ts +1 -0
  19. package/es/core/components/SxpPageRender/VideoWidget/index.js +119 -88
  20. package/es/core/components/SxpPageRender/WaterFall/index.js +1 -1
  21. package/es/core/components/SxpPageRender/index.d.ts +0 -2
  22. package/es/core/components/SxpPageRender/index.js +63 -25
  23. package/es/core/context/SxpDataSourceProvider.d.ts +2 -3
  24. package/es/core/context/SxpDataSourceProvider.js +7 -28
  25. package/es/core/hooks/useEventReport.js +4 -4
  26. package/es/index.d.ts +0 -1
  27. package/es/index.js +0 -1
  28. package/es/materials/sxp/popup/CommodityDetail/index.js +10 -10
  29. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +10 -10
  30. package/lib/core/components/SxpPageCore/index.js +2 -2
  31. package/lib/core/components/SxpPageRender/Nudge/index.js +5 -6
  32. package/lib/core/components/SxpPageRender/VideoWidget/index.d.ts +1 -0
  33. package/lib/core/components/SxpPageRender/VideoWidget/index.js +119 -88
  34. package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -1
  35. package/lib/core/components/SxpPageRender/index.d.ts +0 -2
  36. package/lib/core/components/SxpPageRender/index.js +63 -25
  37. package/lib/core/context/SxpDataSourceProvider.d.ts +2 -3
  38. package/lib/core/context/SxpDataSourceProvider.js +7 -28
  39. package/lib/core/hooks/useEventReport.js +4 -4
  40. package/lib/index.d.ts +0 -1
  41. package/lib/index.js +1 -3
  42. package/lib/materials/sxp/popup/CommodityDetail/index.js +10 -10
  43. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +10 -10
  44. package/package.json +114 -115
  45. package/es/core/components/DiyPortalPreview/PictureGroup.d.ts +0 -13
  46. package/es/core/components/DiyPortalPreview/PictureGroup.js +0 -11
  47. package/es/core/components/DiyPortalPreview/VideoWidget.d.ts +0 -15
  48. package/es/core/components/DiyPortalPreview/VideoWidget.js +0 -236
  49. package/es/core/components/DiyPortalPreview/index.d.ts +0 -6
  50. package/es/core/components/DiyPortalPreview/index.js +0 -127
  51. package/es/core/components/SxpPageRender/Tagbar.d.ts +0 -7
  52. package/es/core/components/SxpPageRender/Tagbar.js +0 -37
  53. package/lib/core/components/DiyPortalPreview/PictureGroup.d.ts +0 -13
  54. package/lib/core/components/DiyPortalPreview/PictureGroup.js +0 -14
  55. package/lib/core/components/DiyPortalPreview/VideoWidget.d.ts +0 -15
  56. package/lib/core/components/DiyPortalPreview/VideoWidget.js +0 -239
  57. package/lib/core/components/DiyPortalPreview/index.d.ts +0 -6
  58. package/lib/core/components/DiyPortalPreview/index.js +0 -130
  59. package/lib/core/components/SxpPageRender/Tagbar.d.ts +0 -7
  60. package/lib/core/components/SxpPageRender/Tagbar.js +0 -40
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 ChatLabs
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2023 ChatLabs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,111 +1,111 @@
1
- <!--
2
- * @Author : haocanweng@chatlabs.cn
3
- * @Date : 2023-08-23 18:25:31
4
- * @LastEditors: binruan@chatlabs.com
5
- * @LastEditTime: 2024-03-20 16:26:29
6
- * @FilePath: \pb-sxp-ui\README.md
7
- -->
8
- <h1 align="center">Page Builder SXP UI</h1>
9
-
10
- <div align="center">
11
- React enterprise-class UI components
12
- </div>
13
-
14
- ## 📦 安装
15
-
16
- ```bash
17
- npm install pb-sxp-ui
18
- # or
19
- yarn add pb-sxp-ui
20
- ```
21
-
22
- ## 🔨 使用
23
- 以 Next.js 框架为例子:
24
-
25
- ```jsx
26
- import { GetServerSideProps } from 'next';
27
- import React, { FC } from 'react'
28
- import Pagebuilder, { PageView } from 'pb-sxp-ui';
29
-
30
- // 初始化 PageBuilder 配置
31
- Pagebuilder.init({
32
- tenantId: 'xxxxxxxxxx',
33
- appId: 'xxxxxxxxx',
34
- env: 'live' // 可选参数,默认是 live 环境
35
- });
36
-
37
-
38
- interface IProps {
39
- path: string;
40
- data: any
41
- }
42
-
43
- const ContentPage: FC<IProps> = ({ data ,path}) => {
44
- return (
45
- <PageView data={data?.data} isSsr path={path}/>
46
- )
47
- }
48
-
49
- export const getServerSideProps: GetServerSideProps<IProps> = async (
50
- context
51
- ) => {
52
- // 接收传来的路径
53
- const path = context.query.path as string;
54
- // 获取页面数据
55
- const result = await Pagebuilder.getDetail(path)
56
- return {
57
- props: {
58
- path,
59
- data: result.data
60
- },
61
- };
62
- };
63
-
64
- export default ContentPage;
65
-
66
- ```
67
-
68
- ## ⌨️ 本地调试
69
-
70
- ### 运行开发环境
71
-
72
- ```bash
73
- $ npm install
74
- $ npm run start
75
- ```
76
-
77
- ### 生成本地开发全局链接
78
-
79
- ```bash
80
- npm link
81
- # or
82
- yarn link
83
- ```
84
-
85
- ### 在使用该包的项目中安装调试
86
-
87
- ```bash
88
- npm link pb-sxp-ui
89
- # or
90
- yarn link pb-sxp-ui
91
- ```
92
-
93
- ## 👾 发布
94
-
95
- ### 打包线上安装包
96
-
97
- ```bash
98
- npm run package
99
- # or
100
- yarn package
101
- ```
102
-
103
- ### 发布 npm
104
-
105
- ```bash
106
- $ npm version patch|minor|major
107
- $ npm publish
108
-
109
- # 自动化发布包
110
- $ npm run pub patch|minor|major|xx.xx.xx
111
- ```
1
+ <!--
2
+ * @Author : haocanweng@chatlabs.cn
3
+ * @Date : 2023-08-23 18:25:31
4
+ * @LastEditors: binruan@chatlabs.com
5
+ * @LastEditTime: 2024-03-20 16:26:29
6
+ * @FilePath: \pb-sxp-ui\README.md
7
+ -->
8
+ <h1 align="center">Page Builder SXP UI</h1>
9
+
10
+ <div align="center">
11
+ React enterprise-class UI components
12
+ </div>
13
+
14
+ ## 📦 安装
15
+
16
+ ```bash
17
+ npm install pb-sxp-ui
18
+ # or
19
+ yarn add pb-sxp-ui
20
+ ```
21
+
22
+ ## 🔨 使用
23
+ 以 Next.js 框架为例子:
24
+
25
+ ```jsx
26
+ import { GetServerSideProps } from 'next';
27
+ import React, { FC } from 'react'
28
+ import Pagebuilder, { PageView } from 'pb-sxp-ui';
29
+
30
+ // 初始化 PageBuilder 配置
31
+ Pagebuilder.init({
32
+ tenantId: 'xxxxxxxxxx',
33
+ appId: 'xxxxxxxxx',
34
+ env: 'live' // 可选参数,默认是 live 环境
35
+ });
36
+
37
+
38
+ interface IProps {
39
+ path: string;
40
+ data: any
41
+ }
42
+
43
+ const ContentPage: FC<IProps> = ({ data ,path}) => {
44
+ return (
45
+ <PageView data={data?.data} isSsr path={path}/>
46
+ )
47
+ }
48
+
49
+ export const getServerSideProps: GetServerSideProps<IProps> = async (
50
+ context
51
+ ) => {
52
+ // 接收传来的路径
53
+ const path = context.query.path as string;
54
+ // 获取页面数据
55
+ const result = await Pagebuilder.getDetail(path)
56
+ return {
57
+ props: {
58
+ path,
59
+ data: result.data
60
+ },
61
+ };
62
+ };
63
+
64
+ export default ContentPage;
65
+
66
+ ```
67
+
68
+ ## ⌨️ 本地调试
69
+
70
+ ### 运行开发环境
71
+
72
+ ```bash
73
+ $ npm install
74
+ $ npm run start
75
+ ```
76
+
77
+ ### 生成本地开发全局链接
78
+
79
+ ```bash
80
+ npm link
81
+ # or
82
+ yarn link
83
+ ```
84
+
85
+ ### 在使用该包的项目中安装调试
86
+
87
+ ```bash
88
+ npm link pb-sxp-ui
89
+ # or
90
+ yarn link pb-sxp-ui
91
+ ```
92
+
93
+ ## 👾 发布
94
+
95
+ ### 打包线上安装包
96
+
97
+ ```bash
98
+ npm run package
99
+ # or
100
+ yarn package
101
+ ```
102
+
103
+ ### 发布 npm
104
+
105
+ ```bash
106
+ $ npm version patch|minor|major
107
+ $ npm publish
108
+
109
+ # 自动化发布包
110
+ $ npm run pub patch|minor|major|xx.xx.xx
111
+ ```