pb-sxp-ui 1.0.15 → 1.0.17
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/package.json +1 -1
- package/dist/index.cjs +0 -13063
- package/dist/index.cjs.map +0 -1
- package/dist/index.css +0 -1682
- package/dist/index.js +0 -13031
- package/dist/index.js.map +0 -1
- package/dist/index.min.cjs +0 -7
- package/dist/index.min.cjs.map +0 -1
- package/dist/index.min.js +0 -7
- package/dist/index.min.js.map +0 -1
- package/dist/pb-ui.js +0 -13059
- package/dist/pb-ui.js.map +0 -1
- package/dist/pb-ui.min.js +0 -7
- package/dist/pb-ui.min.js.map +0 -1
- package/es/core/Pagebuilder/PagebuilderClass.d.ts +0 -15
- package/es/core/Pagebuilder/PagebuilderClass.js +0 -42
- package/es/core/Pagebuilder/index.d.ts +0 -3
- package/es/core/Pagebuilder/index.js +0 -96
- package/es/core/Pagebuilder/type.d.ts +0 -55
- package/es/core/Pagebuilder/type.js +0 -1
- package/es/core/components/SxpPageCore/index.d.ts +0 -12
- package/es/core/components/SxpPageCore/index.js +0 -26
- package/es/core/components/SxpPageRender/ExpandableText.d.ts +0 -14
- package/es/core/components/SxpPageRender/ExpandableText.js +0 -43
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -6
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +0 -19
- package/es/core/components/SxpPageRender/Hashtag/index.d.ts +0 -12
- package/es/core/components/SxpPageRender/Hashtag/index.js +0 -40
- package/es/core/components/SxpPageRender/LikeButton/index.d.ts +0 -11
- package/es/core/components/SxpPageRender/LikeButton/index.js +0 -58
- package/es/core/components/SxpPageRender/Modal/index.d.ts +0 -11
- package/es/core/components/SxpPageRender/Modal/index.js +0 -48
- package/es/core/components/SxpPageRender/Navbar.d.ts +0 -9
- package/es/core/components/SxpPageRender/Navbar.js +0 -10
- package/es/core/components/SxpPageRender/Nudge/index.d.ts +0 -24
- package/es/core/components/SxpPageRender/Nudge/index.js +0 -13
- package/es/core/components/SxpPageRender/PictureGroup/Picture.d.ts +0 -8
- package/es/core/components/SxpPageRender/PictureGroup/Picture.js +0 -50
- package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -13
- package/es/core/components/SxpPageRender/PictureGroup/index.js +0 -28
- package/es/core/components/SxpPageRender/Popup/index.d.ts +0 -3
- package/es/core/components/SxpPageRender/Popup/index.js +0 -62
- package/es/core/components/SxpPageRender/RenderCard.d.ts +0 -11
- package/es/core/components/SxpPageRender/RenderCard.js +0 -43
- package/es/core/components/SxpPageRender/ToggleButton/index.d.ts +0 -10
- package/es/core/components/SxpPageRender/ToggleButton/index.js +0 -13
- package/es/core/components/SxpPageRender/VideoWidget/index.d.ts +0 -12
- package/es/core/components/SxpPageRender/VideoWidget/index.js +0 -219
- package/es/core/components/SxpPageRender/WaterFall/List.d.ts +0 -4
- package/es/core/components/SxpPageRender/WaterFall/List.js +0 -183
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +0 -4
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +0 -319
- package/es/core/components/SxpPageRender/WaterFall/index.d.ts +0 -7
- package/es/core/components/SxpPageRender/WaterFall/index.js +0 -101
- package/es/core/components/SxpPageRender/WaterFall/preview.json +0 -1242
- package/es/core/components/SxpPageRender/fakeData.d.ts +0 -130
- package/es/core/components/SxpPageRender/fakeData.js +0 -899
- package/es/core/components/SxpPageRender/index.d.ts +0 -57
- package/es/core/components/SxpPageRender/index.js +0 -378
- package/es/core/components/SxpPageRender/typing.d.ts +0 -66
- package/es/core/components/SxpPageRender/typing.js +0 -1
- package/es/core/components/SxpPageRender/useIconLink.d.ts +0 -1
- package/es/core/components/SxpPageRender/useIconLink.js +0 -13
- package/es/core/context/DataSourceProvider.d.ts +0 -17
- package/es/core/context/DataSourceProvider.js +0 -45
- package/es/core/context/EditorContext.d.ts +0 -83
- package/es/core/context/EditorContext.js +0 -147
- package/es/core/context/EditorDataProvider.d.ts +0 -20
- package/es/core/context/EditorDataProvider.js +0 -23
- package/es/core/context/SxpDataSourceProvider.d.ts +0 -94
- package/es/core/context/SxpDataSourceProvider.js +0 -208
- package/es/core/create.d.ts +0 -37
- package/es/core/create.js +0 -4
- package/es/core/hoc/withBindDataSource.d.ts +0 -6
- package/es/core/hoc/withBindDataSource.js +0 -61
- package/es/core/hooks/index.d.ts +0 -4
- package/es/core/hooks/index.js +0 -4
- package/es/core/hooks/useCurrentNode.d.ts +0 -10
- package/es/core/hooks/useCurrentNode.js +0 -11
- package/es/core/hooks/useDataSource.d.ts +0 -2
- package/es/core/hooks/useDataSource.js +0 -6
- package/es/core/hooks/useEditor.d.ts +0 -1
- package/es/core/hooks/useEditor.js +0 -5
- package/es/core/hooks/useEventReport.d.ts +0 -5
- package/es/core/hooks/useEventReport.js +0 -73
- package/es/core/hooks/useOnScreen.d.ts +0 -2
- package/es/core/hooks/useOnScreen.js +0 -19
- package/es/core/hooks/useSxpDataSource.d.ts +0 -1
- package/es/core/hooks/useSxpDataSource.js +0 -5
- package/es/core/index.d.ts +0 -3
- package/es/core/index.js +0 -1
- package/es/core/schema.d.ts +0 -58
- package/es/core/schema.js +0 -1
- package/es/core/utils/event.d.ts +0 -7
- package/es/core/utils/event.js +0 -8
- package/es/core/utils/getDataByDS.d.ts +0 -6
- package/es/core/utils/getDataByDS.js +0 -39
- package/es/core/utils/getSxpTokenInfo.d.ts +0 -2
- package/es/core/utils/getSxpTokenInfo.js +0 -26
- package/es/core/utils/localStore.d.ts +0 -5
- package/es/core/utils/localStore.js +0 -22
- package/es/core/utils/materials.d.ts +0 -11
- package/es/core/utils/materials.js +0 -31
- package/es/core/utils/sessionStore.d.ts +0 -3
- package/es/core/utils/sessionStore.js +0 -26
- package/es/core/utils/tool.d.ts +0 -5
- package/es/core/utils/tool.js +0 -48
- package/es/core/utils/unzip.d.ts +0 -1
- package/es/core/utils/unzip.js +0 -10
- package/es/index.d.ts +0 -11
- package/es/index.js +0 -13
- package/es/materials/index.d.ts +0 -1
- package/es/materials/index.js +0 -1
- package/es/materials/sxp/HashTag/index.d.ts +0 -14
- package/es/materials/sxp/HashTag/index.js +0 -6
- package/es/materials/sxp/HashTag/material.d.ts +0 -2
- package/es/materials/sxp/HashTag/material.js +0 -52
- package/es/materials/sxp/HashTag/settingRender.d.ts +0 -125
- package/es/materials/sxp/HashTag/settingRender.js +0 -157
- package/es/materials/sxp/defaultSetting.d.ts +0 -11
- package/es/materials/sxp/defaultSetting.js +0 -7
- package/es/materials/sxp/index.d.ts +0 -3
- package/es/materials/sxp/index.js +0 -3
- package/es/materials/sxp/popup/AppointForm/index.d.ts +0 -18
- package/es/materials/sxp/popup/AppointForm/index.js +0 -76
- package/es/materials/sxp/popup/AppointForm/interactionRender.d.ts +0 -8
- package/es/materials/sxp/popup/AppointForm/interactionRender.js +0 -11
- package/es/materials/sxp/popup/AppointForm/material.d.ts +0 -2
- package/es/materials/sxp/popup/AppointForm/material.js +0 -35
- package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +0 -68
- package/es/materials/sxp/popup/AppointForm/settingRender.js +0 -93
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +0 -34
- package/es/materials/sxp/popup/CommodityDetail/index.js +0 -110
- package/es/materials/sxp/popup/CommodityDetail/material.d.ts +0 -2
- package/es/materials/sxp/popup/CommodityDetail/material.js +0 -51
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +0 -137
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +0 -171
- package/es/materials/sxp/popup/CommodityDetailDiro/index.d.ts +0 -19
- package/es/materials/sxp/popup/CommodityDetailDiro/index.js +0 -163
- package/es/materials/sxp/popup/CommodityDetailDiro/material.d.ts +0 -2
- package/es/materials/sxp/popup/CommodityDetailDiro/material.js +0 -16
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +0 -35
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +0 -134
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.d.ts +0 -2
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +0 -61
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +0 -137
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +0 -175
- package/es/materials/sxp/popup/Prompt/index.d.ts +0 -11
- package/es/materials/sxp/popup/Prompt/index.js +0 -20
- package/es/materials/sxp/popup/Prompt/interactionRender.d.ts +0 -8
- package/es/materials/sxp/popup/Prompt/interactionRender.js +0 -11
- package/es/materials/sxp/popup/Prompt/material.d.ts +0 -2
- package/es/materials/sxp/popup/Prompt/material.js +0 -28
- package/es/materials/sxp/popup/Prompt/settingRender.d.ts +0 -12
- package/es/materials/sxp/popup/Prompt/settingRender.js +0 -18
- package/es/materials/sxp/popup/index.d.ts +0 -4
- package/es/materials/sxp/popup/index.js +0 -4
- package/es/materials/sxp/template/Appoint/index.d.ts +0 -15
- package/es/materials/sxp/template/Appoint/index.js +0 -16
- package/es/materials/sxp/template/Appoint/interactionRender.d.ts +0 -8
- package/es/materials/sxp/template/Appoint/interactionRender.js +0 -11
- package/es/materials/sxp/template/Appoint/material.d.ts +0 -2
- package/es/materials/sxp/template/Appoint/material.js +0 -46
- package/es/materials/sxp/template/Commodity/index.d.ts +0 -15
- package/es/materials/sxp/template/Commodity/index.js +0 -27
- package/es/materials/sxp/template/Commodity/interactionRender.d.ts +0 -8
- package/es/materials/sxp/template/Commodity/interactionRender.js +0 -11
- package/es/materials/sxp/template/Commodity/material.d.ts +0 -2
- package/es/materials/sxp/template/Commodity/material.js +0 -52
- package/es/materials/sxp/template/CommodityDiro/index.d.ts +0 -15
- package/es/materials/sxp/template/CommodityDiro/index.js +0 -27
- package/es/materials/sxp/template/CommodityDiro/interactionRender.d.ts +0 -8
- package/es/materials/sxp/template/CommodityDiro/interactionRender.js +0 -11
- package/es/materials/sxp/template/CommodityDiro/material.d.ts +0 -2
- package/es/materials/sxp/template/CommodityDiro/material.js +0 -52
- package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +0 -15
- package/es/materials/sxp/template/CommodityDiroNew/index.js +0 -27
- package/es/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +0 -8
- package/es/materials/sxp/template/CommodityDiroNew/interactionRender.js +0 -11
- package/es/materials/sxp/template/CommodityDiroNew/material.d.ts +0 -2
- package/es/materials/sxp/template/CommodityDiroNew/material.js +0 -53
- package/es/materials/sxp/template/Link/index.d.ts +0 -14
- package/es/materials/sxp/template/Link/index.js +0 -32
- package/es/materials/sxp/template/Link/material.d.ts +0 -2
- package/es/materials/sxp/template/Link/material.js +0 -44
- package/es/materials/sxp/template/MultiCommodity/index.d.ts +0 -16
- package/es/materials/sxp/template/MultiCommodity/index.js +0 -52
- package/es/materials/sxp/template/MultiCommodity/interactionRender.d.ts +0 -8
- package/es/materials/sxp/template/MultiCommodity/interactionRender.js +0 -11
- package/es/materials/sxp/template/MultiCommodity/material.d.ts +0 -2
- package/es/materials/sxp/template/MultiCommodity/material.js +0 -52
- package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +0 -16
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +0 -51
- package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +0 -8
- package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.js +0 -11
- package/es/materials/sxp/template/MultiCommodityDiro/material.d.ts +0 -2
- package/es/materials/sxp/template/MultiCommodityDiro/material.js +0 -52
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +0 -16
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +0 -52
- package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +0 -8
- package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +0 -11
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.d.ts +0 -2
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +0 -53
- package/es/materials/sxp/template/components/EventProvider.d.ts +0 -13
- package/es/materials/sxp/template/components/EventProvider.js +0 -47
- package/es/materials/sxp/template/components/Img.d.ts +0 -10
- package/es/materials/sxp/template/components/Img.js +0 -19
- package/es/materials/sxp/template/components/Scroll.d.ts +0 -10
- package/es/materials/sxp/template/components/Scroll.js +0 -10
- package/es/materials/sxp/template/components/settingRender.d.ts +0 -129
- package/es/materials/sxp/template/components/settingRender.js +0 -219
- package/es/materials/sxp/template/components/typing.d.ts +0 -6
- package/es/materials/sxp/template/components/typing.js +0 -1
- package/es/materials/sxp/template/index.d.ts +0 -8
- package/es/materials/sxp/template/index.js +0 -8
- package/lib/core/Pagebuilder/PagebuilderClass.d.ts +0 -15
- package/lib/core/Pagebuilder/PagebuilderClass.js +0 -45
- package/lib/core/Pagebuilder/index.d.ts +0 -3
- package/lib/core/Pagebuilder/index.js +0 -99
- package/lib/core/Pagebuilder/type.d.ts +0 -55
- package/lib/core/Pagebuilder/type.js +0 -2
- package/lib/core/components/SxpPageCore/index.d.ts +0 -12
- package/lib/core/components/SxpPageCore/index.js +0 -29
- package/lib/core/components/SxpPageRender/ExpandableText.d.ts +0 -14
- package/lib/core/components/SxpPageRender/ExpandableText.js +0 -46
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -6
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +0 -22
- package/lib/core/components/SxpPageRender/Hashtag/index.d.ts +0 -12
- package/lib/core/components/SxpPageRender/Hashtag/index.js +0 -43
- package/lib/core/components/SxpPageRender/LikeButton/index.d.ts +0 -11
- package/lib/core/components/SxpPageRender/LikeButton/index.js +0 -60
- package/lib/core/components/SxpPageRender/Modal/index.d.ts +0 -11
- package/lib/core/components/SxpPageRender/Modal/index.js +0 -51
- package/lib/core/components/SxpPageRender/Navbar.d.ts +0 -9
- package/lib/core/components/SxpPageRender/Navbar.js +0 -13
- package/lib/core/components/SxpPageRender/Nudge/index.d.ts +0 -24
- package/lib/core/components/SxpPageRender/Nudge/index.js +0 -16
- package/lib/core/components/SxpPageRender/PictureGroup/Picture.d.ts +0 -8
- package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +0 -53
- package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -13
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +0 -31
- package/lib/core/components/SxpPageRender/Popup/index.d.ts +0 -3
- package/lib/core/components/SxpPageRender/Popup/index.js +0 -65
- package/lib/core/components/SxpPageRender/RenderCard.d.ts +0 -11
- package/lib/core/components/SxpPageRender/RenderCard.js +0 -46
- package/lib/core/components/SxpPageRender/ToggleButton/index.d.ts +0 -10
- package/lib/core/components/SxpPageRender/ToggleButton/index.js +0 -16
- package/lib/core/components/SxpPageRender/VideoWidget/index.d.ts +0 -12
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +0 -222
- package/lib/core/components/SxpPageRender/WaterFall/List.d.ts +0 -4
- package/lib/core/components/SxpPageRender/WaterFall/List.js +0 -186
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +0 -4
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +0 -322
- package/lib/core/components/SxpPageRender/WaterFall/index.d.ts +0 -7
- package/lib/core/components/SxpPageRender/WaterFall/index.js +0 -104
- package/lib/core/components/SxpPageRender/WaterFall/preview.json +0 -1242
- package/lib/core/components/SxpPageRender/fakeData.d.ts +0 -130
- package/lib/core/components/SxpPageRender/fakeData.js +0 -902
- package/lib/core/components/SxpPageRender/index.d.ts +0 -57
- package/lib/core/components/SxpPageRender/index.js +0 -381
- package/lib/core/components/SxpPageRender/typing.d.ts +0 -66
- package/lib/core/components/SxpPageRender/typing.js +0 -2
- package/lib/core/components/SxpPageRender/useIconLink.d.ts +0 -1
- package/lib/core/components/SxpPageRender/useIconLink.js +0 -17
- package/lib/core/context/DataSourceProvider.d.ts +0 -17
- package/lib/core/context/DataSourceProvider.js +0 -48
- package/lib/core/context/EditorContext.d.ts +0 -83
- package/lib/core/context/EditorContext.js +0 -151
- package/lib/core/context/EditorDataProvider.d.ts +0 -20
- package/lib/core/context/EditorDataProvider.js +0 -28
- package/lib/core/context/SxpDataSourceProvider.d.ts +0 -94
- package/lib/core/context/SxpDataSourceProvider.js +0 -211
- package/lib/core/create.d.ts +0 -37
- package/lib/core/create.js +0 -8
- package/lib/core/hoc/withBindDataSource.d.ts +0 -6
- package/lib/core/hoc/withBindDataSource.js +0 -63
- package/lib/core/hooks/index.d.ts +0 -4
- package/lib/core/hooks/index.js +0 -7
- package/lib/core/hooks/useCurrentNode.d.ts +0 -10
- package/lib/core/hooks/useCurrentNode.js +0 -14
- package/lib/core/hooks/useDataSource.d.ts +0 -2
- package/lib/core/hooks/useDataSource.js +0 -9
- package/lib/core/hooks/useEditor.d.ts +0 -1
- package/lib/core/hooks/useEditor.js +0 -9
- package/lib/core/hooks/useEventReport.d.ts +0 -5
- package/lib/core/hooks/useEventReport.js +0 -77
- package/lib/core/hooks/useOnScreen.d.ts +0 -2
- package/lib/core/hooks/useOnScreen.js +0 -22
- package/lib/core/hooks/useSxpDataSource.d.ts +0 -1
- package/lib/core/hooks/useSxpDataSource.js +0 -9
- package/lib/core/index.d.ts +0 -3
- package/lib/core/index.js +0 -5
- package/lib/core/schema.d.ts +0 -58
- package/lib/core/schema.js +0 -2
- package/lib/core/utils/event.d.ts +0 -7
- package/lib/core/utils/event.js +0 -12
- package/lib/core/utils/getDataByDS.d.ts +0 -6
- package/lib/core/utils/getDataByDS.js +0 -41
- package/lib/core/utils/getSxpTokenInfo.d.ts +0 -2
- package/lib/core/utils/getSxpTokenInfo.js +0 -30
- package/lib/core/utils/localStore.d.ts +0 -5
- package/lib/core/utils/localStore.js +0 -28
- package/lib/core/utils/materials.d.ts +0 -11
- package/lib/core/utils/materials.js +0 -37
- package/lib/core/utils/sessionStore.d.ts +0 -3
- package/lib/core/utils/sessionStore.js +0 -32
- package/lib/core/utils/tool.d.ts +0 -5
- package/lib/core/utils/tool.js +0 -54
- package/lib/core/utils/unzip.d.ts +0 -1
- package/lib/core/utils/unzip.js +0 -15
- package/lib/index.d.ts +0 -11
- package/lib/index.js +0 -22
- package/lib/materials/index.d.ts +0 -1
- package/lib/materials/index.js +0 -4
- package/lib/materials/sxp/HashTag/index.d.ts +0 -14
- package/lib/materials/sxp/HashTag/index.js +0 -9
- package/lib/materials/sxp/HashTag/material.d.ts +0 -2
- package/lib/materials/sxp/HashTag/material.js +0 -56
- package/lib/materials/sxp/HashTag/settingRender.d.ts +0 -125
- package/lib/materials/sxp/HashTag/settingRender.js +0 -159
- package/lib/materials/sxp/defaultSetting.d.ts +0 -11
- package/lib/materials/sxp/defaultSetting.js +0 -10
- package/lib/materials/sxp/index.d.ts +0 -3
- package/lib/materials/sxp/index.js +0 -6
- package/lib/materials/sxp/popup/AppointForm/index.d.ts +0 -18
- package/lib/materials/sxp/popup/AppointForm/index.js +0 -78
- package/lib/materials/sxp/popup/AppointForm/interactionRender.d.ts +0 -8
- package/lib/materials/sxp/popup/AppointForm/interactionRender.js +0 -13
- package/lib/materials/sxp/popup/AppointForm/material.d.ts +0 -2
- package/lib/materials/sxp/popup/AppointForm/material.js +0 -39
- package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +0 -68
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +0 -95
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +0 -34
- package/lib/materials/sxp/popup/CommodityDetail/index.js +0 -112
- package/lib/materials/sxp/popup/CommodityDetail/material.d.ts +0 -2
- package/lib/materials/sxp/popup/CommodityDetail/material.js +0 -55
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +0 -137
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +0 -173
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.d.ts +0 -19
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +0 -165
- package/lib/materials/sxp/popup/CommodityDetailDiro/material.d.ts +0 -2
- package/lib/materials/sxp/popup/CommodityDetailDiro/material.js +0 -20
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +0 -35
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +0 -136
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.d.ts +0 -2
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +0 -65
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +0 -137
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +0 -177
- package/lib/materials/sxp/popup/Prompt/index.d.ts +0 -11
- package/lib/materials/sxp/popup/Prompt/index.js +0 -22
- package/lib/materials/sxp/popup/Prompt/interactionRender.d.ts +0 -8
- package/lib/materials/sxp/popup/Prompt/interactionRender.js +0 -13
- package/lib/materials/sxp/popup/Prompt/material.d.ts +0 -2
- package/lib/materials/sxp/popup/Prompt/material.js +0 -32
- package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +0 -12
- package/lib/materials/sxp/popup/Prompt/settingRender.js +0 -20
- package/lib/materials/sxp/popup/index.d.ts +0 -4
- package/lib/materials/sxp/popup/index.js +0 -7
- package/lib/materials/sxp/template/Appoint/index.d.ts +0 -15
- package/lib/materials/sxp/template/Appoint/index.js +0 -18
- package/lib/materials/sxp/template/Appoint/interactionRender.d.ts +0 -8
- package/lib/materials/sxp/template/Appoint/interactionRender.js +0 -13
- package/lib/materials/sxp/template/Appoint/material.d.ts +0 -2
- package/lib/materials/sxp/template/Appoint/material.js +0 -50
- package/lib/materials/sxp/template/Commodity/index.d.ts +0 -15
- package/lib/materials/sxp/template/Commodity/index.js +0 -29
- package/lib/materials/sxp/template/Commodity/interactionRender.d.ts +0 -8
- package/lib/materials/sxp/template/Commodity/interactionRender.js +0 -13
- package/lib/materials/sxp/template/Commodity/material.d.ts +0 -2
- package/lib/materials/sxp/template/Commodity/material.js +0 -56
- package/lib/materials/sxp/template/CommodityDiro/index.d.ts +0 -15
- package/lib/materials/sxp/template/CommodityDiro/index.js +0 -29
- package/lib/materials/sxp/template/CommodityDiro/interactionRender.d.ts +0 -8
- package/lib/materials/sxp/template/CommodityDiro/interactionRender.js +0 -13
- package/lib/materials/sxp/template/CommodityDiro/material.d.ts +0 -2
- package/lib/materials/sxp/template/CommodityDiro/material.js +0 -56
- package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +0 -15
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +0 -29
- package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +0 -8
- package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.js +0 -13
- package/lib/materials/sxp/template/CommodityDiroNew/material.d.ts +0 -2
- package/lib/materials/sxp/template/CommodityDiroNew/material.js +0 -57
- package/lib/materials/sxp/template/Link/index.d.ts +0 -14
- package/lib/materials/sxp/template/Link/index.js +0 -34
- package/lib/materials/sxp/template/Link/material.d.ts +0 -2
- package/lib/materials/sxp/template/Link/material.js +0 -48
- package/lib/materials/sxp/template/MultiCommodity/index.d.ts +0 -16
- package/lib/materials/sxp/template/MultiCommodity/index.js +0 -54
- package/lib/materials/sxp/template/MultiCommodity/interactionRender.d.ts +0 -8
- package/lib/materials/sxp/template/MultiCommodity/interactionRender.js +0 -13
- package/lib/materials/sxp/template/MultiCommodity/material.d.ts +0 -2
- package/lib/materials/sxp/template/MultiCommodity/material.js +0 -56
- package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +0 -16
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +0 -53
- package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +0 -8
- package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.js +0 -13
- package/lib/materials/sxp/template/MultiCommodityDiro/material.d.ts +0 -2
- package/lib/materials/sxp/template/MultiCommodityDiro/material.js +0 -56
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +0 -16
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +0 -54
- package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +0 -8
- package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +0 -13
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.d.ts +0 -2
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +0 -57
- package/lib/materials/sxp/template/components/EventProvider.d.ts +0 -13
- package/lib/materials/sxp/template/components/EventProvider.js +0 -49
- package/lib/materials/sxp/template/components/Img.d.ts +0 -10
- package/lib/materials/sxp/template/components/Img.js +0 -22
- package/lib/materials/sxp/template/components/Scroll.d.ts +0 -10
- package/lib/materials/sxp/template/components/Scroll.js +0 -13
- package/lib/materials/sxp/template/components/settingRender.d.ts +0 -129
- package/lib/materials/sxp/template/components/settingRender.js +0 -221
- package/lib/materials/sxp/template/components/typing.d.ts +0 -6
- package/lib/materials/sxp/template/components/typing.js +0 -2
- package/lib/materials/sxp/template/index.d.ts +0 -8
- package/lib/materials/sxp/template/index.js +0 -11
@@ -1,15 +0,0 @@
|
|
1
|
-
export default class PagebuilderClass {
|
2
|
-
private appId;
|
3
|
-
private tenantId;
|
4
|
-
private apiUrl;
|
5
|
-
private env?;
|
6
|
-
constructor();
|
7
|
-
setApiUrl(apiUrl: string): void;
|
8
|
-
getApiUrl(): string;
|
9
|
-
getEnv(): 'dev' | 'staging' | 'live' | undefined;
|
10
|
-
setEnv(value: 'dev' | 'staging' | 'live' | undefined): void;
|
11
|
-
setAppId: (appId: string) => void;
|
12
|
-
setTenantId: (tenantId: string) => void;
|
13
|
-
getAppId: () => string | undefined;
|
14
|
-
getTenantId: () => string | undefined;
|
15
|
-
}
|
@@ -1,42 +0,0 @@
|
|
1
|
-
let _instance = null;
|
2
|
-
const API_URL = {
|
3
|
-
dev: 'https://clc-pagebuilder-be-dev.chatlabs.net',
|
4
|
-
staging: 'https://clc-pagebuilder-be-staging.chatlabs.net',
|
5
|
-
live: 'https://clc-pagebuilder-be.chatlabs.net'
|
6
|
-
};
|
7
|
-
export default class PagebuilderClass {
|
8
|
-
constructor() {
|
9
|
-
this.setAppId = (appId) => {
|
10
|
-
this.appId = appId;
|
11
|
-
};
|
12
|
-
this.setTenantId = (tenantId) => {
|
13
|
-
this.tenantId = tenantId;
|
14
|
-
};
|
15
|
-
this.getAppId = () => {
|
16
|
-
return this.appId;
|
17
|
-
};
|
18
|
-
this.getTenantId = () => {
|
19
|
-
return this.tenantId;
|
20
|
-
};
|
21
|
-
if (_instance) {
|
22
|
-
return _instance;
|
23
|
-
}
|
24
|
-
_instance = this;
|
25
|
-
}
|
26
|
-
setApiUrl(apiUrl) {
|
27
|
-
this.apiUrl = `https://${apiUrl}`;
|
28
|
-
}
|
29
|
-
getApiUrl() {
|
30
|
-
if (this.apiUrl)
|
31
|
-
return this.apiUrl;
|
32
|
-
if (!this.env)
|
33
|
-
return '';
|
34
|
-
return API_URL[this.env];
|
35
|
-
}
|
36
|
-
getEnv() {
|
37
|
-
return this.env;
|
38
|
-
}
|
39
|
-
setEnv(value) {
|
40
|
-
this.env = value;
|
41
|
-
}
|
42
|
-
}
|
@@ -1,96 +0,0 @@
|
|
1
|
-
import { __awaiter } from "tslib";
|
2
|
-
import { isEmpty } from 'lodash';
|
3
|
-
import getDataByDS from '../utils/getDataByDS';
|
4
|
-
import { getSxpTokenInfo } from '../utils/getSxpTokenInfo';
|
5
|
-
import { uuid } from '../utils/tool';
|
6
|
-
import { unzip } from '../utils/unzip';
|
7
|
-
import PagebuilderClass from './PagebuilderClass';
|
8
|
-
let builder = null;
|
9
|
-
const Pagebuilder = {
|
10
|
-
init: ({ appId, tenantId, env = 'live', apiUrl }) => {
|
11
|
-
if (!builder) {
|
12
|
-
builder = new PagebuilderClass();
|
13
|
-
}
|
14
|
-
if (apiUrl) {
|
15
|
-
builder.setApiUrl(apiUrl);
|
16
|
-
}
|
17
|
-
builder.setAppId(appId);
|
18
|
-
builder.setTenantId(tenantId);
|
19
|
-
builder.setEnv(env);
|
20
|
-
},
|
21
|
-
getDetail: (path) => {
|
22
|
-
if (!builder)
|
23
|
-
return;
|
24
|
-
const tenantId = builder.getTenantId();
|
25
|
-
const appId = builder.getAppId();
|
26
|
-
const apiUrl = builder.getApiUrl();
|
27
|
-
return fetch(`${apiUrl}/storefront/v1/page?path=` + path, {
|
28
|
-
method: 'get',
|
29
|
-
headers: {
|
30
|
-
'x-tenant-id': tenantId || '',
|
31
|
-
'x-app-id': appId || ''
|
32
|
-
}
|
33
|
-
}).then((res) => __awaiter(void 0, void 0, void 0, function* () {
|
34
|
-
var _a, _b;
|
35
|
-
const result = yield res.json();
|
36
|
-
const decodeData = unzip((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.data);
|
37
|
-
if (decodeData) {
|
38
|
-
const { $store: __STORE__ } = yield getDataByDS(apiUrl, (_b = decodeData === null || decodeData === void 0 ? void 0 : decodeData.dataSource) !== null && _b !== void 0 ? _b : []);
|
39
|
-
result.data.data = decodeData;
|
40
|
-
Object.assign(result.data.data, { __STORE__ });
|
41
|
-
}
|
42
|
-
return result;
|
43
|
-
}));
|
44
|
-
},
|
45
|
-
getSxpDetailByPageId: (id) => __awaiter(void 0, void 0, void 0, function* () {
|
46
|
-
if (!builder)
|
47
|
-
return;
|
48
|
-
const tenantId = builder.getTenantId();
|
49
|
-
const appId = builder.getAppId();
|
50
|
-
const apiUrl = builder.getApiUrl();
|
51
|
-
return fetch(`${apiUrl}/storefront/v1/page?id=` + id, {
|
52
|
-
method: 'get',
|
53
|
-
headers: {
|
54
|
-
'x-tenant-id': tenantId || '',
|
55
|
-
'x-app-id': appId || ''
|
56
|
-
}
|
57
|
-
}).then((res) => __awaiter(void 0, void 0, void 0, function* () {
|
58
|
-
var _a;
|
59
|
-
const result = yield res.json();
|
60
|
-
if (!result.success) {
|
61
|
-
return undefined;
|
62
|
-
}
|
63
|
-
const decodeData = unzip((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.data);
|
64
|
-
result.data.data = decodeData;
|
65
|
-
return result.data;
|
66
|
-
}));
|
67
|
-
}),
|
68
|
-
getSxpRecommendVideoData: (dataId) => __awaiter(void 0, void 0, void 0, function* () {
|
69
|
-
if (!builder)
|
70
|
-
return;
|
71
|
-
const tokenData = yield getSxpTokenInfo(builder, dataId);
|
72
|
-
const request_id = uuid(0, 0);
|
73
|
-
let fake_session_id = window.localStorage.getItem('SXP_FAKE_SESSION_ID');
|
74
|
-
if (isEmpty(fake_session_id)) {
|
75
|
-
fake_session_id = uuid(36, 62);
|
76
|
-
window.localStorage.setItem('SXP_FAKE_SESSION_ID', fake_session_id);
|
77
|
-
}
|
78
|
-
const recommendVideoRes = yield fetch('https://dev-sxp-be.chatlabs.net/platform/open/rec/v1.2', {
|
79
|
-
method: 'POST',
|
80
|
-
headers: {
|
81
|
-
'Content-Type': 'application/json',
|
82
|
-
token: tokenData.token,
|
83
|
-
channel: tokenData.channel,
|
84
|
-
userId: tokenData.userId
|
85
|
-
},
|
86
|
-
body: JSON.stringify({
|
87
|
-
productUserId: fake_session_id,
|
88
|
-
channel: tokenData.channel,
|
89
|
-
maxRecs: 10,
|
90
|
-
requestId: request_id
|
91
|
-
})
|
92
|
-
}).then((res) => res.json());
|
93
|
-
return (recommendVideoRes === null || recommendVideoRes === void 0 ? void 0 : recommendVideoRes.data) || null;
|
94
|
-
})
|
95
|
-
};
|
96
|
-
export { Pagebuilder };
|
@@ -1,55 +0,0 @@
|
|
1
|
-
interface initParams {
|
2
|
-
appId: string;
|
3
|
-
tenantId: string;
|
4
|
-
apiUrl?: string;
|
5
|
-
env?: 'dev' | 'staging' | 'live';
|
6
|
-
}
|
7
|
-
export interface PageData {
|
8
|
-
id: string;
|
9
|
-
name: string;
|
10
|
-
data: any;
|
11
|
-
page_type: PageType;
|
12
|
-
seo_parameter: SeoParameter;
|
13
|
-
utm_parameter: UtmParameter;
|
14
|
-
data_sources: Array<DataSource>;
|
15
|
-
sxp_parameter?: {
|
16
|
-
bottom_image: string;
|
17
|
-
default_recommend: number;
|
18
|
-
personalized_recommend: number;
|
19
|
-
placeholder_image: string;
|
20
|
-
hash_tag_size: number;
|
21
|
-
loading_image: string;
|
22
|
-
};
|
23
|
-
}
|
24
|
-
export interface DataSource {
|
25
|
-
type: number;
|
26
|
-
url: string;
|
27
|
-
headers: Record<string, string>;
|
28
|
-
queries: Record<string, string>;
|
29
|
-
}
|
30
|
-
export interface PageType {
|
31
|
-
id: string;
|
32
|
-
name: string;
|
33
|
-
path: string;
|
34
|
-
operator_name: string;
|
35
|
-
create_time: string;
|
36
|
-
update_time: string;
|
37
|
-
path_type: number;
|
38
|
-
}
|
39
|
-
export interface SeoParameter {
|
40
|
-
title: string;
|
41
|
-
description: string;
|
42
|
-
key_word: string;
|
43
|
-
}
|
44
|
-
export interface UtmParameter {
|
45
|
-
utm_source: string;
|
46
|
-
utm_medium: string;
|
47
|
-
utm_campaign: string;
|
48
|
-
}
|
49
|
-
interface PagebuilderProps {
|
50
|
-
init: (e: initParams) => void;
|
51
|
-
getDetail: (path: string) => Promise<any> | any;
|
52
|
-
getSxpRecommendVideoData: (dataId: string) => Promise<any> | any;
|
53
|
-
getSxpDetailByPageId: (id: string) => Promise<PageData | undefined>;
|
54
|
-
}
|
55
|
-
export default PagebuilderProps;
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { PageData } from '../../../core/Pagebuilder/type';
|
3
|
-
export interface ISxpPageCoreProps {
|
4
|
-
data?: PageData;
|
5
|
-
maxSize?: number;
|
6
|
-
defaultSize?: number;
|
7
|
-
hashTagSize?: number;
|
8
|
-
loadingImage?: string;
|
9
|
-
appDomain?: string;
|
10
|
-
}
|
11
|
-
declare const _default: React.NamedExoticComponent<ISxpPageCoreProps>;
|
12
|
-
export default _default;
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import React, { memo, useMemo } from 'react';
|
2
|
-
import SxpPageRender from '../SxpPageRender';
|
3
|
-
import Popup from '../SxpPageRender/Popup';
|
4
|
-
import * as _materials_ from '../../../materials';
|
5
|
-
import { EditorCore } from '../../../core';
|
6
|
-
import SxpDataSourceProvider from '../../../core/context/SxpDataSourceProvider';
|
7
|
-
const RESOLVER = {};
|
8
|
-
Object.values(_materials_).forEach((v) => {
|
9
|
-
RESOLVER[v.extend.type] = v;
|
10
|
-
});
|
11
|
-
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain }) => {
|
12
|
-
var _a, _b, _c, _d, _e, _f;
|
13
|
-
const utmVal = useMemo(() => {
|
14
|
-
var _a;
|
15
|
-
const searchParams = (location === null || location === void 0 ? void 0 : location.search) ? (_a = location === null || location === void 0 ? void 0 : location.search) === null || _a === void 0 ? void 0 : _a.replace('?', '') : '';
|
16
|
-
return searchParams;
|
17
|
-
}, []);
|
18
|
-
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
19
|
-
React.createElement(SxpDataSourceProvider, { 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 }) => {
|
20
|
-
var _a;
|
21
|
-
return (React.createElement(React.Fragment, null,
|
22
|
-
React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { data: rtcList, resolver: RESOLVER })),
|
23
|
-
React.createElement(Popup, null)));
|
24
|
-
} })));
|
25
|
-
};
|
26
|
-
export default memo(SxpPageCore);
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
2
|
-
interface IExpandableTextProps {
|
3
|
-
maxStr?: number;
|
4
|
-
text: string;
|
5
|
-
style?: CSSProperties;
|
6
|
-
className?: React.HTMLAttributes<HTMLParagraphElement>['className'];
|
7
|
-
onClick?: () => void;
|
8
|
-
foldText?: string;
|
9
|
-
unfoldText?: string;
|
10
|
-
isPost?: boolean;
|
11
|
-
onChange?: (bool: boolean) => void;
|
12
|
-
}
|
13
|
-
declare const _default: React.NamedExoticComponent<IExpandableTextProps>;
|
14
|
-
export default _default;
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import React, { memo, useMemo, useState, useCallback, useRef, useEffect } from 'react';
|
2
|
-
const limitTextLastWholeWord = (originalText = '', limit) => {
|
3
|
-
const chineseRegex = /[\u4e00-\u9fa5]+/;
|
4
|
-
if (chineseRegex.test(originalText)) {
|
5
|
-
return originalText.slice(0, 54);
|
6
|
-
}
|
7
|
-
const words = originalText.split(' ');
|
8
|
-
const newWords = [];
|
9
|
-
for (let i = 0; i < words.length; i++) {
|
10
|
-
newWords.push(words[i]);
|
11
|
-
const tempText = newWords.join(' ');
|
12
|
-
if (tempText.length >= limit)
|
13
|
-
break;
|
14
|
-
}
|
15
|
-
const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
|
16
|
-
return _words.join(' ') + ' ';
|
17
|
-
};
|
18
|
-
const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText, isPost, onChange }) => {
|
19
|
-
const [isShowMore, setIsShowMore] = useState(false);
|
20
|
-
const [isShow, setIsShow] = useState(false);
|
21
|
-
const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
|
22
|
-
const multiRow = useRef(null);
|
23
|
-
const handleClick = useCallback(() => {
|
24
|
-
setIsShowMore(!isShowMore);
|
25
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(!isShowMore);
|
26
|
-
}, [isShowMore, onChange]);
|
27
|
-
const renderText = useMemo(() => {
|
28
|
-
return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
|
29
|
-
}, [text, maxStr, isShowMore]);
|
30
|
-
useEffect(() => {
|
31
|
-
}, [multiRow, text, lineClamp, style, isPost]);
|
32
|
-
return (React.createElement("div", { className: className, style: Object.assign({}, style), hidden: !text || text === '' },
|
33
|
-
React.createElement("div", { ref: multiRow, style: {
|
34
|
-
overflow: 'hidden',
|
35
|
-
WebkitLineClamp: isShowMore ? '' : lineClamp,
|
36
|
-
textOverflow: 'ellipsis',
|
37
|
-
display: '-webkit-box',
|
38
|
-
WebkitBoxOrient: 'vertical',
|
39
|
-
wordBreak: 'break-word'
|
40
|
-
}, dangerouslySetInnerHTML: { __html: text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>') } }),
|
41
|
-
text && isPost && (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick }, isShowMore ? unfoldText || 'show less' : foldText || 'show more'))));
|
42
|
-
};
|
43
|
-
export default memo(ExpandableText);
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import React, { useEffect, useMemo, useState } from 'react';
|
2
|
-
import { useIconLink } from '../useIconLink';
|
3
|
-
import { useEditor } from '../../../../core/hooks';
|
4
|
-
const FingerSwipeTip = ({ imageUrl }) => {
|
5
|
-
const [show, setShow] = useState(true);
|
6
|
-
const { schema: { sxpPageConf } } = useEditor();
|
7
|
-
useEffect(() => {
|
8
|
-
setTimeout(() => {
|
9
|
-
setShow(false);
|
10
|
-
}, 2000);
|
11
|
-
}, []);
|
12
|
-
const FINGER_SWIPE_ICON = useIconLink('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
|
13
|
-
const animationCls = useMemo(() => {
|
14
|
-
return show ? 'pb-fadeIn' : 'pb-fadeOut';
|
15
|
-
}, [show]);
|
16
|
-
return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}` },
|
17
|
-
React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON })));
|
18
|
-
};
|
19
|
-
export default FingerSwipeTip;
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
2
|
-
import { RecItemType } from '../typing';
|
3
|
-
interface IHashtagProps {
|
4
|
-
tags: string[];
|
5
|
-
itemId: string;
|
6
|
-
itemType: 'VIDEO' | 'PRODUCT' | null;
|
7
|
-
index: number;
|
8
|
-
rec: RecItemType;
|
9
|
-
hashTagStyle?: CSSProperties;
|
10
|
-
}
|
11
|
-
declare const _default: React.NamedExoticComponent<IHashtagProps>;
|
12
|
-
export default _default;
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import React, { memo, useMemo, useState } from 'react';
|
2
|
-
import { SwiperSlide } from 'swiper/react';
|
3
|
-
import { useSxpDataSource } from '../../../../core/hooks';
|
4
|
-
import Scroll from '../../../../materials/sxp/template/components/Scroll';
|
5
|
-
const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
6
|
-
const [isShowMore, setIsShowMore] = useState(false);
|
7
|
-
const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
|
8
|
-
const handleClickTag = (data) => {
|
9
|
-
if (!waterFallData) {
|
10
|
-
setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(index);
|
11
|
-
}
|
12
|
-
else {
|
13
|
-
setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(true);
|
14
|
-
}
|
15
|
-
if (itemType) {
|
16
|
-
setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData({
|
17
|
-
hashTag: data,
|
18
|
-
itemId,
|
19
|
-
itemType,
|
20
|
-
rec
|
21
|
-
});
|
22
|
-
}
|
23
|
-
else {
|
24
|
-
setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData({
|
25
|
-
hashTag: data,
|
26
|
-
rec
|
27
|
-
});
|
28
|
-
}
|
29
|
-
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
|
30
|
-
};
|
31
|
-
const renderExpandButton = useMemo(() => {
|
32
|
-
if (tags.length <= 6) {
|
33
|
-
return null;
|
34
|
-
}
|
35
|
-
return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
36
|
-
}, [isShowMore, tags]);
|
37
|
-
return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag' },
|
38
|
-
React.createElement(Scroll, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item) }, `#${item}`))))));
|
39
|
-
};
|
40
|
-
export default memo(Hashtag);
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { RecItemType } from '../typing';
|
3
|
-
interface ILikeProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
4
|
-
activeIcon?: string;
|
5
|
-
unActicveIcon?: string;
|
6
|
-
active?: boolean;
|
7
|
-
recData: RecItemType;
|
8
|
-
position: number;
|
9
|
-
}
|
10
|
-
declare const _default: React.NamedExoticComponent<ILikeProps>;
|
11
|
-
export default _default;
|
@@ -1,58 +0,0 @@
|
|
1
|
-
import { __awaiter, __rest } from "tslib";
|
2
|
-
import React, { memo, useState } from 'react';
|
3
|
-
import { debounce } from 'lodash';
|
4
|
-
import { useIconLink } from '../useIconLink';
|
5
|
-
import { useSxpDataSource } from '../../../../core/hooks';
|
6
|
-
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
7
|
-
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
8
|
-
const LikeButton = (_a) => {
|
9
|
-
var { active, activeIcon, unActicveIcon, recData, position } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
|
10
|
-
const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
|
11
|
-
const [state, setState] = useState(active);
|
12
|
-
const likeIcon = useIconLink(defaultLikeIconPath);
|
13
|
-
const unlikeIcon = useIconLink(defaultUnLikeIconPath);
|
14
|
-
const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
|
15
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
16
|
-
if (state) {
|
17
|
-
setState(false);
|
18
|
-
const result = (_d = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_c = (_b = recData.video) === null || _b === void 0 ? void 0 : _b.itemId) !== null && _c !== void 0 ? _c : '' })))) !== null && _d !== void 0 ? _d : false;
|
19
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
20
|
-
eventInfo: {
|
21
|
-
eventSubject: 'favoriteContentCanceled',
|
22
|
-
eventDescription: 'This content was unfavorite by the user',
|
23
|
-
contentId: (_f = (_e = recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
|
24
|
-
contentName: (_h = (_g = recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
|
25
|
-
contentTags: JSON.stringify((_k = (_j = recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
|
26
|
-
position: position + '',
|
27
|
-
contentFormat: ((_l = recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
|
28
|
-
traceInfo: (_m = recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
|
29
|
-
}
|
30
|
-
});
|
31
|
-
if (!result) {
|
32
|
-
setState(true);
|
33
|
-
}
|
34
|
-
}
|
35
|
-
else {
|
36
|
-
setState(true);
|
37
|
-
const result = (_o = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _o !== void 0 ? _o : false;
|
38
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
39
|
-
eventInfo: {
|
40
|
-
eventSubject: 'favoriteContent',
|
41
|
-
eventDescription: 'This content was favorite by the user',
|
42
|
-
contentId: (_q = (_p = recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
|
43
|
-
contentName: (_s = (_r = recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
|
44
|
-
contentTags: JSON.stringify((_u = (_t = recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
|
45
|
-
position: position + '',
|
46
|
-
contentFormat: ((_v = recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
|
47
|
-
traceInfo: (_w = recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
|
48
|
-
}
|
49
|
-
});
|
50
|
-
if (!result) {
|
51
|
-
setState(false);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
}), 200);
|
55
|
-
return (React.createElement("button", Object.assign({}, props, { onClick: handleClick }),
|
56
|
-
React.createElement("img", { style: { width: '100%', height: '100%', objectFit: 'contain' }, src: state ? activeIcon || likeIcon : unActicveIcon || unlikeIcon, alt: 'icon' })));
|
57
|
-
};
|
58
|
-
export default memo(LikeButton);
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
2
|
-
import { IPopupType } from '../../../../core/context/EditorContext';
|
3
|
-
interface IModalProps {
|
4
|
-
visible?: boolean;
|
5
|
-
popup?: IPopupType;
|
6
|
-
padding?: number | string;
|
7
|
-
modalStyle?: CSSProperties;
|
8
|
-
onClose?: () => void;
|
9
|
-
}
|
10
|
-
declare const _default: React.NamedExoticComponent<React.PropsWithChildren<IModalProps>>;
|
11
|
-
export default _default;
|
@@ -1,48 +0,0 @@
|
|
1
|
-
import { debounce } from 'lodash';
|
2
|
-
import React, { memo, useEffect, useMemo, useRef, useState } from 'react';
|
3
|
-
import * as ReactDOM from 'react-dom';
|
4
|
-
const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
5
|
-
const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
|
6
|
-
var _a;
|
7
|
-
const [isShow, setIsShow] = useState(false);
|
8
|
-
const modalEleRef = useRef(null);
|
9
|
-
useEffect(() => {
|
10
|
-
const parentNode = document.getElementById('sxp-render');
|
11
|
-
const node = document.getElementById('pb-modal');
|
12
|
-
if (node) {
|
13
|
-
modalEleRef.current = node;
|
14
|
-
}
|
15
|
-
else {
|
16
|
-
modalEleRef.current = document.createElement('div');
|
17
|
-
modalEleRef.current.setAttribute('id', 'pb-modal');
|
18
|
-
parentNode === null || parentNode === void 0 ? void 0 : parentNode.appendChild(modalEleRef.current);
|
19
|
-
}
|
20
|
-
}, []);
|
21
|
-
const isOpen = useMemo(() => {
|
22
|
-
return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
|
23
|
-
}, [visible, popup]);
|
24
|
-
useEffect(() => {
|
25
|
-
if (isOpen) {
|
26
|
-
setIsShow(true);
|
27
|
-
}
|
28
|
-
else {
|
29
|
-
setTimeout(() => {
|
30
|
-
setIsShow(false);
|
31
|
-
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
32
|
-
}
|
33
|
-
}, [isOpen, popup]);
|
34
|
-
if (!modalEleRef.current)
|
35
|
-
return null;
|
36
|
-
const handleClose = debounce(() => {
|
37
|
-
onClose === null || onClose === void 0 ? void 0 : onClose();
|
38
|
-
}, 300);
|
39
|
-
return ReactDOM.createPortal(React.createElement(React.Fragment, null, isShow && (React.createElement("div", { className: 'modal-bg', style: Object.assign({ display: 'flex', backgroundColor: isOpen ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
|
40
|
-
React.createElement("div", { className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: { padding, animationDuration: ((_a = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _a !== void 0 ? _a : 0) / 1000 + 's' }, onClick: (e) => {
|
41
|
-
e.stopPropagation();
|
42
|
-
e.preventDefault();
|
43
|
-
} },
|
44
|
-
React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
|
45
|
-
React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
|
46
|
-
children)))), modalEleRef.current);
|
47
|
-
};
|
48
|
-
export default memo(Modal);
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
2
|
-
interface INavbarProps {
|
3
|
-
icon?: string;
|
4
|
-
styles?: CSSProperties;
|
5
|
-
textStyle?: CSSProperties;
|
6
|
-
onClose?: () => void;
|
7
|
-
}
|
8
|
-
declare const _default: React.NamedExoticComponent<INavbarProps>;
|
9
|
-
export default _default;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import React, { memo } from 'react';
|
2
|
-
import { useSxpDataSource } from '../../../core/hooks';
|
3
|
-
const Navbar = ({ icon, styles, textStyle, onClose }) => {
|
4
|
-
var _a;
|
5
|
-
const { waterFallData, setOpenHashtag } = useSxpDataSource();
|
6
|
-
return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
|
7
|
-
React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: '', onClick: onClose }),
|
8
|
-
React.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle }, `#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`)));
|
9
|
-
};
|
10
|
-
export default memo(Navbar);
|
@@ -1,24 +0,0 @@
|
|
1
|
-
import { FC } from 'react';
|
2
|
-
interface IProps {
|
3
|
-
nudge?: {
|
4
|
-
isOpen: boolean;
|
5
|
-
icon?: string;
|
6
|
-
backgroundColor: string;
|
7
|
-
content?: string;
|
8
|
-
marginBottom: number;
|
9
|
-
borderRadius: number;
|
10
|
-
size: {
|
11
|
-
height: number;
|
12
|
-
width: number;
|
13
|
-
};
|
14
|
-
textStyle: {
|
15
|
-
color: string;
|
16
|
-
fontFamily: string;
|
17
|
-
fontSize: number;
|
18
|
-
fontStyle: string;
|
19
|
-
textAlign: string;
|
20
|
-
};
|
21
|
-
};
|
22
|
-
}
|
23
|
-
declare const Nudge: FC<IProps>;
|
24
|
-
export default Nudge;
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
const Nudge = ({ nudge }) => {
|
3
|
-
return (React.createElement(React.Fragment, null, (nudge === null || nudge === void 0 ? void 0 : nudge.isOpen) && (React.createElement("div", { className: 'clc-sxp-bottom-nudge', style: {
|
4
|
-
marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
|
5
|
-
width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
|
6
|
-
height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
|
7
|
-
backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
|
8
|
-
borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
|
9
|
-
} },
|
10
|
-
(nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
|
11
|
-
React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)))));
|
12
|
-
};
|
13
|
-
export default Nudge;
|