pb-sxp-ui 1.0.45 → 1.0.47

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 (42) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +111 -111
  3. package/dist/index.cjs +103 -54
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +16 -2
  6. package/dist/index.js +103 -54
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.min.cjs +3 -3
  9. package/dist/index.min.cjs.map +1 -1
  10. package/dist/index.min.js +3 -3
  11. package/dist/index.min.js.map +1 -1
  12. package/dist/pb-ui.js +103 -54
  13. package/dist/pb-ui.js.map +1 -1
  14. package/dist/pb-ui.min.js +3 -3
  15. package/dist/pb-ui.min.js.map +1 -1
  16. package/es/core/components/DiyPortalPreview/index.js +5 -3
  17. package/es/core/components/SxpPageCore/index.d.ts +1 -0
  18. package/es/core/components/SxpPageCore/index.js +2 -2
  19. package/es/core/components/SxpPageRender/PictureGroup/Picture.js +8 -7
  20. package/es/core/components/SxpPageRender/VideoWidget/index.js +19 -18
  21. package/es/core/components/SxpPageRender/WaterFall/List.js +11 -9
  22. package/es/core/components/SxpPageRender/index.d.ts +3 -0
  23. package/es/core/components/SxpPageRender/index.js +3 -3
  24. package/es/materials/sxp/HashTag/index.d.ts +2 -0
  25. package/es/materials/sxp/HashTag/material.js +14 -0
  26. package/es/materials/sxp/HashTag/settingRender.js +28 -2
  27. package/es/materials/sxp/popup/CommodityDetail/index.js +4 -4
  28. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  29. package/lib/core/components/DiyPortalPreview/index.js +5 -3
  30. package/lib/core/components/SxpPageCore/index.d.ts +1 -0
  31. package/lib/core/components/SxpPageCore/index.js +2 -2
  32. package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +8 -7
  33. package/lib/core/components/SxpPageRender/VideoWidget/index.js +19 -18
  34. package/lib/core/components/SxpPageRender/WaterFall/List.js +11 -9
  35. package/lib/core/components/SxpPageRender/index.d.ts +3 -0
  36. package/lib/core/components/SxpPageRender/index.js +3 -3
  37. package/lib/materials/sxp/HashTag/index.d.ts +2 -0
  38. package/lib/materials/sxp/HashTag/material.js +14 -0
  39. package/lib/materials/sxp/HashTag/settingRender.js +28 -2
  40. package/lib/materials/sxp/popup/CommodityDetail/index.js +4 -4
  41. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  42. package/package.json +115 -115
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
+ ```
package/dist/index.cjs CHANGED
@@ -8417,10 +8417,10 @@ const CommodityDetail$1 = (_a) => {
8417
8417
  React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
8418
8418
  React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
8419
8419
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8420
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8421
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8422
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8423
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8420
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8421
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8422
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8423
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8424
8424
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
8425
8425
  };
8426
8426
  const renderBtn = () => {
@@ -8871,7 +8871,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
8871
8871
  const productInfoText = ({ isPost }) => {
8872
8872
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8873
8873
  React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
8874
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8874
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8875
8875
  Made in Italy` })));
8876
8876
  };
8877
8877
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
@@ -10085,7 +10085,7 @@ var _a, _b;
10085
10085
  * @Author: binruan@chatlabs.com
10086
10086
  * @Date: 2024-04-07 14:07:12
10087
10087
  * @LastEditors: binruan@chatlabs.com
10088
- * @LastEditTime: 2024-04-12 17:39:45
10088
+ * @LastEditTime: 2024-04-29 19:55:53
10089
10089
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
10090
10090
  *
10091
10091
  */
@@ -10125,6 +10125,10 @@ var settingRender = [
10125
10125
  label: 'hashtag描述',
10126
10126
  value: 'hashTagDesc'
10127
10127
  },
10128
+ {
10129
+ label: 'hashtag描述超链',
10130
+ value: 'hashTagLink'
10131
+ },
10128
10132
  {
10129
10133
  label: '标题',
10130
10134
  value: 'title'
@@ -10208,8 +10212,8 @@ var settingRender = [
10208
10212
  ]
10209
10213
  },
10210
10214
  {
10211
- type: 'TextMargin',
10212
- name: ['props', 'buttonStyle']
10215
+ type: 'TextPadding',
10216
+ name: ['props', 'buttonBgStyle']
10213
10217
  },
10214
10218
  {
10215
10219
  type: 'Group',
@@ -10242,6 +10246,28 @@ var settingRender = [
10242
10246
  name: ['props', 'buttonStyle']
10243
10247
  }
10244
10248
  ]
10249
+ },
10250
+ {
10251
+ title: '按钮背景样式',
10252
+ child: [
10253
+ {
10254
+ type: 'Color',
10255
+ label: '背景色',
10256
+ name: ['props', 'buttonBgStyle', 'backgroundColor'],
10257
+ initialValue: '#fff'
10258
+ },
10259
+ {
10260
+ type: 'Group',
10261
+ label: '尺寸',
10262
+ child: [
10263
+ {
10264
+ type: 'Number',
10265
+ name: ['props', 'buttonBgStyle', 'height'],
10266
+ addonAfter: 'H'
10267
+ }
10268
+ ]
10269
+ }
10270
+ ]
10245
10271
  }
10246
10272
  ];
10247
10273
 
@@ -11673,7 +11699,7 @@ const WaterfallFlowItem = (props) => {
11673
11699
  React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
11674
11700
  };
11675
11701
  function WaterfallList(_a) {
11676
- var _b, _c, _d, _e, _f, _g, _h;
11702
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
11677
11703
  var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
11678
11704
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
11679
11705
  const [list, setList] = React.useState();
@@ -11743,17 +11769,23 @@ function WaterfallList(_a) {
11743
11769
  };
11744
11770
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
11745
11771
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'list' },
11746
- React.createElement("div", { className: 'list-scroll', ref: containerRef, style: {
11747
- bottom: ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link) ? '100px' : 0
11748
- } },
11749
- React.createElement("div", { className: 'list-info', style: (_c = props === null || props === void 0 ? void 0 : props.textStyles) === null || _c === void 0 ? void 0 : _c.hashTagDesc }, (_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.info),
11750
- React.createElement("div", { hidden: !((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link), className: 'list-collection', onClick: handleClickLink, style: { marginBottom: props === null || props === void 0 ? void 0 : props.space } }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
11772
+ React.createElement("div", { className: 'list-scroll', ref: containerRef },
11773
+ React.createElement("div", { className: 'list-info', style: (_b = props === null || props === void 0 ? void 0 : props.textStyles) === null || _b === void 0 ? void 0 : _b.hashTagDesc }, (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.info),
11774
+ React.createElement("div", { hidden: !((_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.link), className: 'list-collection', onClick: handleClickLink, style: Object.assign(Object.assign({}, (_e = props === null || props === void 0 ? void 0 : props.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagLink), { marginBottom: props === null || props === void 0 ? void 0 : props.space }) }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
11751
11775
  React.createElement("div", { className: 'list-content' }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
11752
11776
  return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
11753
11777
  })),
11754
- React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading...")),
11755
- React.createElement("div", { className: 'list-bottom', hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link) },
11756
- React.createElement("button", { className: 'list-bottom-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection'))))));
11778
+ React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
11779
+ React.createElement("div", {
11780
+ // hidden={!data?.tag?.link}
11781
+ style: {
11782
+ height: ((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link) ? ((_h = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _h === void 0 ? void 0 : _h.height) || ((_j = props === null || props === void 0 ? void 0 : props.buttonStyle) === null || _j === void 0 ? void 0 : _j.height) || '100px' : 0
11783
+ } })),
11784
+ React.createElement("div", { className: 'list-bottom', style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
11785
+ React.createElement("div", {
11786
+ // hidden={!data?.tag?.link}
11787
+ className: 'list-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
11788
+ React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_k = data === null || data === void 0 ? void 0 : data.tag) === null || _k === void 0 ? void 0 : _k.linkTitle) || 'Shop the collection'))))));
11757
11789
  }
11758
11790
 
11759
11791
  var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
@@ -11864,7 +11896,7 @@ var WaterFall$1 = React.memo(WaterFall);
11864
11896
  * @Author: binruan@chatlabs.com
11865
11897
  * @Date: 2024-01-15 19:03:09
11866
11898
  * @LastEditors: binruan@chatlabs.com
11867
- * @LastEditTime: 2024-04-07 15:42:10
11899
+ * @LastEditTime: 2024-04-29 19:08:34
11868
11900
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\index.tsx
11869
11901
  *
11870
11902
  */
@@ -11877,7 +11909,7 @@ var HashTagComponent = React.memo(HashTag$1);
11877
11909
  * @Author: binruan@chatlabs.com
11878
11910
  * @Date: 2023-07-28 18:29:57
11879
11911
  * @LastEditors: binruan@chatlabs.com
11880
- * @LastEditTime: 2024-04-07 16:22:28
11912
+ * @LastEditTime: 2024-04-30 10:13:13
11881
11913
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\material.tsx
11882
11914
  *
11883
11915
  */
@@ -11904,6 +11936,12 @@ const HashTag = createMaterial(HashTagComponent, {
11904
11936
  textAlign: 'center',
11905
11937
  color: '#000'
11906
11938
  },
11939
+ hashTagLink: {
11940
+ textAlign: 'center',
11941
+ color: '#757575',
11942
+ fontSize: 12,
11943
+ textDecoration: 'underline'
11944
+ },
11907
11945
  title: {
11908
11946
  fontSize: 12,
11909
11947
  color: '#000'
@@ -11922,6 +11960,14 @@ const HashTag = createMaterial(HashTagComponent, {
11922
11960
  textAlign: 'center',
11923
11961
  color: '#fff',
11924
11962
  borderRadius: 25
11963
+ },
11964
+ buttonBgStyle: {
11965
+ backgroundColor: '#fff',
11966
+ height: 52,
11967
+ paddingTop: 20,
11968
+ paddingLeft: 20,
11969
+ paddingRight: 20,
11970
+ paddingBottom: 20
11925
11971
  }
11926
11972
  }
11927
11973
  },
@@ -12153,11 +12199,25 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12153
12199
  var _a;
12154
12200
  return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
12155
12201
  }, [firstFrameSrc, rec]);
12202
+ const blurStyle = React.useMemo(() => {
12203
+ return blur
12204
+ ? {
12205
+ filter: 'blur(10px)',
12206
+ transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
12207
+ }
12208
+ : {};
12209
+ }, [blur]);
12210
+ const isBgColor = React.useMemo(() => {
12211
+ return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgWay) === '1';
12212
+ }, [videoPostConfig]);
12213
+ const bgStyle = React.useMemo(() => {
12214
+ return isBgColor && (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor) ? { backgroundColor: videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor } : {};
12215
+ }, [videoPostConfig, isBgColor]);
12156
12216
  const handLoadeddata = React.useCallback(() => {
12157
12217
  var _a;
12158
- if (!videoRef)
12218
+ if (!videoRef || isBgColor)
12159
12219
  return;
12160
- const videoDomRef = document.getElementById(`${videoId}_html5_api`);
12220
+ const videoDomRef = document.getElementById('player-container-id_html5_api');
12161
12221
  if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !videoDomRef || !canvasRef.current)
12162
12222
  return;
12163
12223
  const setFrameImg = () => {
@@ -12175,7 +12235,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12175
12235
  setTimeout(() => {
12176
12236
  setFrameImg();
12177
12237
  }, 500);
12178
- }, [videoRef]);
12238
+ }, [videoRef, isBgColor, rec]);
12179
12239
  React.useEffect(() => {
12180
12240
  if (!isActive || !videoRef)
12181
12241
  return;
@@ -12262,24 +12322,11 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12262
12322
  window.removeEventListener('beforeunload', handleBeforeUnload);
12263
12323
  };
12264
12324
  }, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
12265
- const blurStyle = React.useMemo(() => {
12266
- return blur
12267
- ? {
12268
- filter: 'blur(10px)',
12269
- transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
12270
- }
12271
- : {};
12272
- }, [blur]);
12273
12325
  if (!rec.video) {
12274
12326
  return null;
12275
12327
  }
12276
- return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
12277
- position: 'relative',
12278
- width: '100%',
12279
- height,
12280
- overflow: 'hidden'
12281
- } },
12282
- React.createElement(FormatImage$1, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) }),
12328
+ return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: Object.assign({ position: 'relative', width: '100%', height, overflow: 'hidden' }, bgStyle) },
12329
+ !isBgColor && (React.createElement(FormatImage$1, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) })),
12283
12330
  React.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
12284
12331
  React.createElement("div", { style: {
12285
12332
  position: 'absolute',
@@ -12354,7 +12401,7 @@ const FingerSwipeTip = ({ imageUrl }) => {
12354
12401
  * @Author: binruan@chatlabs.com
12355
12402
  * @Date: 2024-03-20 10:27:31
12356
12403
  * @LastEditors: binruan@chatlabs.com
12357
- * @LastEditTime: 2024-04-26 14:33:25
12404
+ * @LastEditTime: 2024-04-29 18:57:05
12358
12405
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\Picture.tsx
12359
12406
  *
12360
12407
  */
@@ -12377,13 +12424,14 @@ const Picture = (props) => {
12377
12424
  }
12378
12425
  : {};
12379
12426
  }, [blur]);
12380
- return (React.createElement("div", { style: {
12381
- overflow: 'hidden',
12382
- height,
12383
- width: '100%',
12384
- position: 'relative'
12385
- } },
12386
- React.createElement(FormatImage$1, { src: src, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) }),
12427
+ const isBgColor = React.useMemo(() => {
12428
+ return (imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.bgWay) === '1';
12429
+ }, [imgUrlsPostConfig]);
12430
+ const bgStyle = React.useMemo(() => {
12431
+ return isBgColor && (imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.bgColor) ? { backgroundColor: imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.bgColor } : {};
12432
+ }, [imgUrlsPostConfig, isBgColor]);
12433
+ return (React.createElement("div", { style: Object.assign({ overflow: 'hidden', height, width: '100%', position: 'relative' }, bgStyle) },
12434
+ !isBgColor && (React.createElement(FormatImage$1, { src: src, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) })),
12387
12435
  blur && (React.createElement(FormatImage$1, { src: src, style: {
12388
12436
  width: '100%',
12389
12437
  height: '100%',
@@ -12652,7 +12700,7 @@ var Tagbar$1 = React.memo(Tagbar);
12652
12700
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12653
12701
  *
12654
12702
  */
12655
- const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [] }) => {
12703
+ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
12656
12704
  var _a, _b, _c, _d, _e, _f, _g;
12657
12705
  const { schema } = useEditor();
12658
12706
  const [activeIndex, setActiveIndex] = React.useState(0);
@@ -12708,7 +12756,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12708
12756
  if (!firstRef.current && !videoRef) {
12709
12757
  firstRef.current = true;
12710
12758
  const player = TCPlayer('player-container-id', {
12711
- licenseUrl: 'https://license.vod2.myqcloud.com/license/v2/1325816236_1/v_cube.license', // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12759
+ licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12712
12760
  controls: false,
12713
12761
  autoplay: false,
12714
12762
  loop: false,
@@ -12721,7 +12769,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12721
12769
  setVideoRef(player);
12722
12770
  });
12723
12771
  }
12724
- }, [videoRef]);
12772
+ }, [videoRef, licenseUrl]);
12725
12773
  React.useEffect(() => {
12726
12774
  if (!isInit)
12727
12775
  handleH5EnterLink();
@@ -13454,15 +13502,16 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
13454
13502
  renderBottom(rec, index),
13455
13503
  renderLikeButton(rec, index)));
13456
13504
  };
13457
- return (React.createElement("div", { style: {
13505
+ return (React.createElement("div", { className: css.css({
13458
13506
  width: '100%',
13459
13507
  height: containerHeight,
13460
13508
  display: 'flex',
13461
13509
  boxSizing: 'border-box',
13462
13510
  gap: 16,
13463
13511
  pointerEvents: 'none',
13464
- userSelect: 'none'
13465
- } }, data === null || data === void 0 ? void 0 : data.map((rec, index) => {
13512
+ userSelect: 'none',
13513
+ transform: 'scale(0.7) translateX(-22%) translateY(-140px)'
13514
+ }) }, data === null || data === void 0 ? void 0 : data.map((rec, index) => {
13466
13515
  return renderView(rec, index);
13467
13516
  })));
13468
13517
  };
@@ -13537,7 +13586,7 @@ const Popup = () => {
13537
13586
  * @Author: binruan@chatlabs.com
13538
13587
  * @Date: 2024-01-15 19:03:09
13539
13588
  * @LastEditors: binruan@chatlabs.com
13540
- * @LastEditTime: 2024-03-25 17:24:59
13589
+ * @LastEditTime: 2024-04-30 11:06:08
13541
13590
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
13542
13591
  *
13543
13592
  */
@@ -13553,7 +13602,7 @@ const RESOLVER = {};
13553
13602
  Object.values(_materials_).forEach((v) => {
13554
13603
  RESOLVER[v.extend.type] = v;
13555
13604
  });
13556
- const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain }) => {
13605
+ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl }) => {
13557
13606
  var _a, _b, _c, _d, _e, _f;
13558
13607
  const utmVal = React.useMemo(() => {
13559
13608
  var _a;
@@ -13564,7 +13613,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
13564
13613
  React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, render: ({ rtcList, tagList }) => {
13565
13614
  var _a;
13566
13615
  return (React.createElement(React.Fragment, null,
13567
- React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
13616
+ React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),
13568
13617
  React.createElement(Popup, null)));
13569
13618
  } })));
13570
13619
  };