pb-sxp-ui 1.0.0
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/LICENSE +21 -0
- package/README.md +111 -0
- package/dist/index.cjs +10752 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +1782 -0
- package/dist/index.js +10721 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.cjs +9 -0
- package/dist/index.min.cjs.map +1 -0
- package/dist/index.min.js +9 -0
- package/dist/index.min.js.map +1 -0
- package/dist/pb-ui.js +10748 -0
- package/dist/pb-ui.js.map +1 -0
- package/dist/pb-ui.min.js +9 -0
- package/dist/pb-ui.min.js.map +1 -0
- package/es/core/Pagebuilder/PagebuilderClass.d.ts +15 -0
- package/es/core/Pagebuilder/PagebuilderClass.js +42 -0
- package/es/core/Pagebuilder/index.d.ts +3 -0
- package/es/core/Pagebuilder/index.js +96 -0
- package/es/core/Pagebuilder/type.d.ts +55 -0
- package/es/core/Pagebuilder/type.js +1 -0
- package/es/core/components/SxpPageCore/index.d.ts +11 -0
- package/es/core/components/SxpPageCore/index.js +26 -0
- package/es/core/components/SxpPageRender/ExpandableText.d.ts +12 -0
- package/es/core/components/SxpPageRender/ExpandableText.js +54 -0
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +6 -0
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +19 -0
- package/es/core/components/SxpPageRender/Hashtag/index.d.ts +11 -0
- package/es/core/components/SxpPageRender/Hashtag/index.js +40 -0
- package/es/core/components/SxpPageRender/LikeButton/index.d.ts +10 -0
- package/es/core/components/SxpPageRender/LikeButton/index.js +58 -0
- package/es/core/components/SxpPageRender/Modal/index.d.ts +9 -0
- package/es/core/components/SxpPageRender/Modal/index.js +44 -0
- package/es/core/components/SxpPageRender/Navbar.d.ts +8 -0
- package/es/core/components/SxpPageRender/Navbar.js +9 -0
- package/es/core/components/SxpPageRender/PictureGroup/Picture.d.ts +8 -0
- package/es/core/components/SxpPageRender/PictureGroup/Picture.js +19 -0
- package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +13 -0
- package/es/core/components/SxpPageRender/PictureGroup/index.js +27 -0
- package/es/core/components/SxpPageRender/Popup/index.d.ts +3 -0
- package/es/core/components/SxpPageRender/Popup/index.js +60 -0
- package/es/core/components/SxpPageRender/ProductInfo/index.d.ts +14 -0
- package/es/core/components/SxpPageRender/ProductInfo/index.js +55 -0
- package/es/core/components/SxpPageRender/RenderCard.d.ts +11 -0
- package/es/core/components/SxpPageRender/RenderCard.js +40 -0
- package/es/core/components/SxpPageRender/ToggleButton/index.d.ts +10 -0
- package/es/core/components/SxpPageRender/ToggleButton/index.js +13 -0
- package/es/core/components/SxpPageRender/VideoWidget/index.d.ts +12 -0
- package/es/core/components/SxpPageRender/VideoWidget/index.js +219 -0
- package/es/core/components/SxpPageRender/WaterFall/List.d.ts +3 -0
- package/es/core/components/SxpPageRender/WaterFall/List.js +173 -0
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +3 -0
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +317 -0
- package/es/core/components/SxpPageRender/WaterFall/index.d.ts +6 -0
- package/es/core/components/SxpPageRender/WaterFall/index.js +100 -0
- package/es/core/components/SxpPageRender/fakeData.d.ts +130 -0
- package/es/core/components/SxpPageRender/fakeData.js +899 -0
- package/es/core/components/SxpPageRender/index.d.ts +35 -0
- package/es/core/components/SxpPageRender/index.js +345 -0
- package/es/core/components/SxpPageRender/typing.d.ts +65 -0
- package/es/core/components/SxpPageRender/typing.js +1 -0
- package/es/core/components/SxpPageRender/useIconLink.d.ts +1 -0
- package/es/core/components/SxpPageRender/useIconLink.js +8 -0
- package/es/core/context/DataSourceProvider.d.ts +17 -0
- package/es/core/context/DataSourceProvider.js +45 -0
- package/es/core/context/EditorContext.d.ts +76 -0
- package/es/core/context/EditorContext.js +142 -0
- package/es/core/context/EditorDataProvider.d.ts +18 -0
- package/es/core/context/EditorDataProvider.js +20 -0
- package/es/core/context/SxpDataSourceProvider.d.ts +90 -0
- package/es/core/context/SxpDataSourceProvider.js +204 -0
- package/es/core/create.d.ts +37 -0
- package/es/core/create.js +4 -0
- package/es/core/hoc/withBindDataSource.d.ts +6 -0
- package/es/core/hoc/withBindDataSource.js +61 -0
- package/es/core/hooks/index.d.ts +4 -0
- package/es/core/hooks/index.js +4 -0
- package/es/core/hooks/useCurrentNode.d.ts +10 -0
- package/es/core/hooks/useCurrentNode.js +11 -0
- package/es/core/hooks/useDataSource.d.ts +2 -0
- package/es/core/hooks/useDataSource.js +6 -0
- package/es/core/hooks/useEditor.d.ts +1 -0
- package/es/core/hooks/useEditor.js +5 -0
- package/es/core/hooks/useEventReport.d.ts +5 -0
- package/es/core/hooks/useEventReport.js +73 -0
- package/es/core/hooks/useOnScreen.d.ts +2 -0
- package/es/core/hooks/useOnScreen.js +19 -0
- package/es/core/hooks/useSxpDataSource.d.ts +1 -0
- package/es/core/hooks/useSxpDataSource.js +5 -0
- package/es/core/index.d.ts +3 -0
- package/es/core/index.js +1 -0
- package/es/core/schema.d.ts +58 -0
- package/es/core/schema.js +1 -0
- package/es/core/utils/event.d.ts +7 -0
- package/es/core/utils/event.js +8 -0
- package/es/core/utils/getDataByDS.d.ts +6 -0
- package/es/core/utils/getDataByDS.js +39 -0
- package/es/core/utils/getSxpTokenInfo.d.ts +2 -0
- package/es/core/utils/getSxpTokenInfo.js +26 -0
- package/es/core/utils/localStore.d.ts +3 -0
- package/es/core/utils/localStore.js +14 -0
- package/es/core/utils/materials.d.ts +11 -0
- package/es/core/utils/materials.js +31 -0
- package/es/core/utils/sessionStore.d.ts +3 -0
- package/es/core/utils/sessionStore.js +26 -0
- package/es/core/utils/tool.d.ts +5 -0
- package/es/core/utils/tool.js +48 -0
- package/es/core/utils/unzip.d.ts +1 -0
- package/es/core/utils/unzip.js +10 -0
- package/es/index.d.ts +10 -0
- package/es/index.js +12 -0
- package/es/materials/index.d.ts +1 -0
- package/es/materials/index.js +1 -0
- package/es/materials/sxp/index.d.ts +2 -0
- package/es/materials/sxp/index.js +2 -0
- package/es/materials/sxp/popup/AppointForm/index.d.ts +18 -0
- package/es/materials/sxp/popup/AppointForm/index.js +77 -0
- package/es/materials/sxp/popup/AppointForm/interactionRender.d.ts +8 -0
- package/es/materials/sxp/popup/AppointForm/interactionRender.js +11 -0
- package/es/materials/sxp/popup/AppointForm/material.d.ts +2 -0
- package/es/materials/sxp/popup/AppointForm/material.js +36 -0
- package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +65 -0
- package/es/materials/sxp/popup/AppointForm/settingRender.js +90 -0
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +14 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +85 -0
- package/es/materials/sxp/popup/CommodityDetail/material.d.ts +2 -0
- package/es/materials/sxp/popup/CommodityDetail/material.js +16 -0
- package/es/materials/sxp/popup/CommodityDetailDiro/index.d.ts +18 -0
- package/es/materials/sxp/popup/CommodityDetailDiro/index.js +162 -0
- package/es/materials/sxp/popup/CommodityDetailDiro/material.d.ts +2 -0
- package/es/materials/sxp/popup/CommodityDetailDiro/material.js +16 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +22 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +129 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.d.ts +2 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +16 -0
- package/es/materials/sxp/popup/Prompt/index.d.ts +11 -0
- package/es/materials/sxp/popup/Prompt/index.js +22 -0
- package/es/materials/sxp/popup/Prompt/interactionRender.d.ts +8 -0
- package/es/materials/sxp/popup/Prompt/interactionRender.js +11 -0
- package/es/materials/sxp/popup/Prompt/material.d.ts +2 -0
- package/es/materials/sxp/popup/Prompt/material.js +28 -0
- package/es/materials/sxp/popup/Prompt/settingRender.d.ts +12 -0
- package/es/materials/sxp/popup/Prompt/settingRender.js +18 -0
- package/es/materials/sxp/popup/index.d.ts +5 -0
- package/es/materials/sxp/popup/index.js +5 -0
- package/es/materials/sxp/template/Appoint/index.d.ts +11 -0
- package/es/materials/sxp/template/Appoint/index.js +30 -0
- package/es/materials/sxp/template/Appoint/interactionRender.d.ts +8 -0
- package/es/materials/sxp/template/Appoint/interactionRender.js +11 -0
- package/es/materials/sxp/template/Appoint/material.d.ts +2 -0
- package/es/materials/sxp/template/Appoint/material.js +29 -0
- package/es/materials/sxp/template/Commodity/index.d.ts +11 -0
- package/es/materials/sxp/template/Commodity/index.js +44 -0
- package/es/materials/sxp/template/Commodity/interactionRender.d.ts +8 -0
- package/es/materials/sxp/template/Commodity/interactionRender.js +11 -0
- package/es/materials/sxp/template/Commodity/material.d.ts +2 -0
- package/es/materials/sxp/template/Commodity/material.js +26 -0
- package/es/materials/sxp/template/CommodityDiro/index.d.ts +11 -0
- package/es/materials/sxp/template/CommodityDiro/index.js +46 -0
- package/es/materials/sxp/template/CommodityDiro/interactionRender.d.ts +8 -0
- package/es/materials/sxp/template/CommodityDiro/interactionRender.js +11 -0
- package/es/materials/sxp/template/CommodityDiro/material.d.ts +2 -0
- package/es/materials/sxp/template/CommodityDiro/material.js +26 -0
- package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +11 -0
- package/es/materials/sxp/template/CommodityDiroNew/index.js +46 -0
- package/es/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +8 -0
- package/es/materials/sxp/template/CommodityDiroNew/interactionRender.js +11 -0
- package/es/materials/sxp/template/CommodityDiroNew/material.d.ts +2 -0
- package/es/materials/sxp/template/CommodityDiroNew/material.js +26 -0
- package/es/materials/sxp/template/Link/index.d.ts +11 -0
- package/es/materials/sxp/template/Link/index.js +41 -0
- package/es/materials/sxp/template/Link/material.d.ts +2 -0
- package/es/materials/sxp/template/Link/material.js +26 -0
- package/es/materials/sxp/template/MultiCommodity/index.d.ts +12 -0
- package/es/materials/sxp/template/MultiCommodity/index.js +58 -0
- package/es/materials/sxp/template/MultiCommodity/interactionRender.d.ts +8 -0
- package/es/materials/sxp/template/MultiCommodity/interactionRender.js +11 -0
- package/es/materials/sxp/template/MultiCommodity/material.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodity/material.js +26 -0
- package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +12 -0
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +60 -0
- package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +8 -0
- package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.js +11 -0
- package/es/materials/sxp/template/MultiCommodityDiro/material.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodityDiro/material.js +26 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +12 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +59 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +8 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +11 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +26 -0
- package/es/materials/sxp/template/components/EventProvider.d.ts +10 -0
- package/es/materials/sxp/template/components/EventProvider.js +33 -0
- package/es/materials/sxp/template/components/Img.d.ts +9 -0
- package/es/materials/sxp/template/components/Img.js +19 -0
- package/es/materials/sxp/template/components/Scroll.d.ts +9 -0
- package/es/materials/sxp/template/components/Scroll.js +10 -0
- package/es/materials/sxp/template/index.d.ts +8 -0
- package/es/materials/sxp/template/index.js +8 -0
- package/lib/core/Pagebuilder/PagebuilderClass.d.ts +15 -0
- package/lib/core/Pagebuilder/PagebuilderClass.js +45 -0
- package/lib/core/Pagebuilder/index.d.ts +3 -0
- package/lib/core/Pagebuilder/index.js +99 -0
- package/lib/core/Pagebuilder/type.d.ts +55 -0
- package/lib/core/Pagebuilder/type.js +2 -0
- package/lib/core/components/SxpPageCore/index.d.ts +11 -0
- package/lib/core/components/SxpPageCore/index.js +29 -0
- package/lib/core/components/SxpPageRender/ExpandableText.d.ts +12 -0
- package/lib/core/components/SxpPageRender/ExpandableText.js +57 -0
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +6 -0
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +22 -0
- package/lib/core/components/SxpPageRender/Hashtag/index.d.ts +11 -0
- package/lib/core/components/SxpPageRender/Hashtag/index.js +43 -0
- package/lib/core/components/SxpPageRender/LikeButton/index.d.ts +10 -0
- package/lib/core/components/SxpPageRender/LikeButton/index.js +60 -0
- package/lib/core/components/SxpPageRender/Modal/index.d.ts +9 -0
- package/lib/core/components/SxpPageRender/Modal/index.js +47 -0
- package/lib/core/components/SxpPageRender/Navbar.d.ts +8 -0
- package/lib/core/components/SxpPageRender/Navbar.js +12 -0
- package/lib/core/components/SxpPageRender/PictureGroup/Picture.d.ts +8 -0
- package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +22 -0
- package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +13 -0
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +30 -0
- package/lib/core/components/SxpPageRender/Popup/index.d.ts +3 -0
- package/lib/core/components/SxpPageRender/Popup/index.js +63 -0
- package/lib/core/components/SxpPageRender/ProductInfo/index.d.ts +14 -0
- package/lib/core/components/SxpPageRender/ProductInfo/index.js +58 -0
- package/lib/core/components/SxpPageRender/RenderCard.d.ts +11 -0
- package/lib/core/components/SxpPageRender/RenderCard.js +43 -0
- package/lib/core/components/SxpPageRender/ToggleButton/index.d.ts +10 -0
- package/lib/core/components/SxpPageRender/ToggleButton/index.js +16 -0
- package/lib/core/components/SxpPageRender/VideoWidget/index.d.ts +12 -0
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +222 -0
- package/lib/core/components/SxpPageRender/WaterFall/List.d.ts +3 -0
- package/lib/core/components/SxpPageRender/WaterFall/List.js +177 -0
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +3 -0
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +321 -0
- package/lib/core/components/SxpPageRender/WaterFall/index.d.ts +6 -0
- package/lib/core/components/SxpPageRender/WaterFall/index.js +103 -0
- package/lib/core/components/SxpPageRender/fakeData.d.ts +130 -0
- package/lib/core/components/SxpPageRender/fakeData.js +902 -0
- package/lib/core/components/SxpPageRender/index.d.ts +35 -0
- package/lib/core/components/SxpPageRender/index.js +348 -0
- package/lib/core/components/SxpPageRender/typing.d.ts +65 -0
- package/lib/core/components/SxpPageRender/typing.js +2 -0
- package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -0
- package/lib/core/components/SxpPageRender/useIconLink.js +12 -0
- package/lib/core/context/DataSourceProvider.d.ts +17 -0
- package/lib/core/context/DataSourceProvider.js +48 -0
- package/lib/core/context/EditorContext.d.ts +76 -0
- package/lib/core/context/EditorContext.js +146 -0
- package/lib/core/context/EditorDataProvider.d.ts +18 -0
- package/lib/core/context/EditorDataProvider.js +25 -0
- package/lib/core/context/SxpDataSourceProvider.d.ts +90 -0
- package/lib/core/context/SxpDataSourceProvider.js +207 -0
- package/lib/core/create.d.ts +37 -0
- package/lib/core/create.js +8 -0
- package/lib/core/hoc/withBindDataSource.d.ts +6 -0
- package/lib/core/hoc/withBindDataSource.js +63 -0
- package/lib/core/hooks/index.d.ts +4 -0
- package/lib/core/hooks/index.js +7 -0
- package/lib/core/hooks/useCurrentNode.d.ts +10 -0
- package/lib/core/hooks/useCurrentNode.js +14 -0
- package/lib/core/hooks/useDataSource.d.ts +2 -0
- package/lib/core/hooks/useDataSource.js +9 -0
- package/lib/core/hooks/useEditor.d.ts +1 -0
- package/lib/core/hooks/useEditor.js +9 -0
- package/lib/core/hooks/useEventReport.d.ts +5 -0
- package/lib/core/hooks/useEventReport.js +77 -0
- package/lib/core/hooks/useOnScreen.d.ts +2 -0
- package/lib/core/hooks/useOnScreen.js +22 -0
- package/lib/core/hooks/useSxpDataSource.d.ts +1 -0
- package/lib/core/hooks/useSxpDataSource.js +9 -0
- package/lib/core/index.d.ts +3 -0
- package/lib/core/index.js +5 -0
- package/lib/core/schema.d.ts +58 -0
- package/lib/core/schema.js +2 -0
- package/lib/core/utils/event.d.ts +7 -0
- package/lib/core/utils/event.js +12 -0
- package/lib/core/utils/getDataByDS.d.ts +6 -0
- package/lib/core/utils/getDataByDS.js +41 -0
- package/lib/core/utils/getSxpTokenInfo.d.ts +2 -0
- package/lib/core/utils/getSxpTokenInfo.js +30 -0
- package/lib/core/utils/localStore.d.ts +3 -0
- package/lib/core/utils/localStore.js +19 -0
- package/lib/core/utils/materials.d.ts +11 -0
- package/lib/core/utils/materials.js +37 -0
- package/lib/core/utils/sessionStore.d.ts +3 -0
- package/lib/core/utils/sessionStore.js +32 -0
- package/lib/core/utils/tool.d.ts +5 -0
- package/lib/core/utils/tool.js +54 -0
- package/lib/core/utils/unzip.d.ts +1 -0
- package/lib/core/utils/unzip.js +15 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +20 -0
- package/lib/materials/index.d.ts +1 -0
- package/lib/materials/index.js +4 -0
- package/lib/materials/sxp/index.d.ts +2 -0
- package/lib/materials/sxp/index.js +5 -0
- package/lib/materials/sxp/popup/AppointForm/index.d.ts +18 -0
- package/lib/materials/sxp/popup/AppointForm/index.js +79 -0
- package/lib/materials/sxp/popup/AppointForm/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/popup/AppointForm/interactionRender.js +13 -0
- package/lib/materials/sxp/popup/AppointForm/material.d.ts +2 -0
- package/lib/materials/sxp/popup/AppointForm/material.js +40 -0
- package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +65 -0
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +92 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +14 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +87 -0
- package/lib/materials/sxp/popup/CommodityDetail/material.d.ts +2 -0
- package/lib/materials/sxp/popup/CommodityDetail/material.js +20 -0
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.d.ts +18 -0
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +164 -0
- package/lib/materials/sxp/popup/CommodityDetailDiro/material.d.ts +2 -0
- package/lib/materials/sxp/popup/CommodityDetailDiro/material.js +20 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +22 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +131 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.d.ts +2 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +20 -0
- package/lib/materials/sxp/popup/Prompt/index.d.ts +11 -0
- package/lib/materials/sxp/popup/Prompt/index.js +24 -0
- package/lib/materials/sxp/popup/Prompt/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/popup/Prompt/interactionRender.js +13 -0
- package/lib/materials/sxp/popup/Prompt/material.d.ts +2 -0
- package/lib/materials/sxp/popup/Prompt/material.js +32 -0
- package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +12 -0
- package/lib/materials/sxp/popup/Prompt/settingRender.js +20 -0
- package/lib/materials/sxp/popup/index.d.ts +5 -0
- package/lib/materials/sxp/popup/index.js +8 -0
- package/lib/materials/sxp/template/Appoint/index.d.ts +11 -0
- package/lib/materials/sxp/template/Appoint/index.js +32 -0
- package/lib/materials/sxp/template/Appoint/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/template/Appoint/interactionRender.js +13 -0
- package/lib/materials/sxp/template/Appoint/material.d.ts +2 -0
- package/lib/materials/sxp/template/Appoint/material.js +33 -0
- package/lib/materials/sxp/template/Commodity/index.d.ts +11 -0
- package/lib/materials/sxp/template/Commodity/index.js +46 -0
- package/lib/materials/sxp/template/Commodity/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/template/Commodity/interactionRender.js +13 -0
- package/lib/materials/sxp/template/Commodity/material.d.ts +2 -0
- package/lib/materials/sxp/template/Commodity/material.js +30 -0
- package/lib/materials/sxp/template/CommodityDiro/index.d.ts +11 -0
- package/lib/materials/sxp/template/CommodityDiro/index.js +48 -0
- package/lib/materials/sxp/template/CommodityDiro/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/template/CommodityDiro/interactionRender.js +13 -0
- package/lib/materials/sxp/template/CommodityDiro/material.d.ts +2 -0
- package/lib/materials/sxp/template/CommodityDiro/material.js +30 -0
- package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +11 -0
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +48 -0
- package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.js +13 -0
- package/lib/materials/sxp/template/CommodityDiroNew/material.d.ts +2 -0
- package/lib/materials/sxp/template/CommodityDiroNew/material.js +30 -0
- package/lib/materials/sxp/template/Link/index.d.ts +11 -0
- package/lib/materials/sxp/template/Link/index.js +43 -0
- package/lib/materials/sxp/template/Link/material.d.ts +2 -0
- package/lib/materials/sxp/template/Link/material.js +30 -0
- package/lib/materials/sxp/template/MultiCommodity/index.d.ts +12 -0
- package/lib/materials/sxp/template/MultiCommodity/index.js +60 -0
- package/lib/materials/sxp/template/MultiCommodity/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/template/MultiCommodity/interactionRender.js +13 -0
- package/lib/materials/sxp/template/MultiCommodity/material.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodity/material.js +30 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +12 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +62 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.js +13 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/material.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/material.js +30 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +12 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +61 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +13 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +30 -0
- package/lib/materials/sxp/template/components/EventProvider.d.ts +10 -0
- package/lib/materials/sxp/template/components/EventProvider.js +35 -0
- package/lib/materials/sxp/template/components/Img.d.ts +9 -0
- package/lib/materials/sxp/template/components/Img.js +22 -0
- package/lib/materials/sxp/template/components/Scroll.d.ts +9 -0
- package/lib/materials/sxp/template/components/Scroll.js +13 -0
- package/lib/materials/sxp/template/index.d.ts +8 -0
- package/lib/materials/sxp/template/index.js +11 -0
- package/package.json +113 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { IEditorContext } from '../../../../core/context/EditorContext';
|
3
|
+
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
4
|
+
import './index.less';
|
5
|
+
export interface ICommodityDetailDiroNewProps {
|
6
|
+
content?: string;
|
7
|
+
style?: Record<string, any>;
|
8
|
+
bgImg?: Record<string, any> | string;
|
9
|
+
onClick?: () => void;
|
10
|
+
schema?: IEditorContext['schema'];
|
11
|
+
isDefault?: boolean;
|
12
|
+
rec?: RecItemType;
|
13
|
+
viewTime?: any;
|
14
|
+
isPost?: boolean;
|
15
|
+
bottom_image?: string;
|
16
|
+
tipText?: {
|
17
|
+
foldText?: string;
|
18
|
+
unfoldText?: string;
|
19
|
+
};
|
20
|
+
}
|
21
|
+
declare const _default: React.NamedExoticComponent<ICommodityDetailDiroNewProps>;
|
22
|
+
export default _default;
|
@@ -0,0 +1,131 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
const css_1 = require("@emotion/css");
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
6
|
+
const hooks_1 = require("../../../../core/hooks");
|
7
|
+
require("./index.less");
|
8
|
+
const modules_1 = require("swiper/modules");
|
9
|
+
const react_2 = require("swiper/react");
|
10
|
+
const Modal_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/Modal"));
|
11
|
+
const ExpandableText_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/ExpandableText"));
|
12
|
+
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
13
|
+
const CommodityDetailDiroNew = (_a) => {
|
14
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
15
|
+
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText"]);
|
16
|
+
const [spread, setSpread] = (0, react_1.useState)(true);
|
17
|
+
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
18
|
+
const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = (0, hooks_1.useSxpDataSource)();
|
19
|
+
const { jumpToWeb, productView } = (0, useEventReport_1.useEventReport)();
|
20
|
+
const scrollRef = (0, react_1.useRef)(null);
|
21
|
+
const touchRef = (0, react_1.useRef)(null);
|
22
|
+
const touchMoveRef = (0, react_1.useRef)(null);
|
23
|
+
const [stopSlide, setStopSlide] = (0, react_1.useState)(false);
|
24
|
+
const [isBottom, setIsBottom] = (0, react_1.useState)(false);
|
25
|
+
const [isTop, setIsTop] = (0, react_1.useState)(true);
|
26
|
+
const [showModal, setShowModal] = (0, react_1.useState)(false);
|
27
|
+
const curTimeRef = (0, react_1.useRef)(null);
|
28
|
+
const data = isPost ? rec : popupDetailData;
|
29
|
+
const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
30
|
+
const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
|
31
|
+
const handleLink = () => {
|
32
|
+
if (product === null || product === void 0 ? void 0 : product.link) {
|
33
|
+
jumpToWeb(data, product, cta);
|
34
|
+
if (!isPost) {
|
35
|
+
productView(data, product, cta, viewTime || curTimeRef.current);
|
36
|
+
}
|
37
|
+
window.location.href = window.getJointUtmLink(product.link);
|
38
|
+
}
|
39
|
+
};
|
40
|
+
(0, react_1.useEffect)(() => {
|
41
|
+
const initTime = () => {
|
42
|
+
curTimeRef.current = new Date();
|
43
|
+
};
|
44
|
+
initTime();
|
45
|
+
window.addEventListener('pageshow', initTime);
|
46
|
+
return () => {
|
47
|
+
window.removeEventListener('pageshow', initTime);
|
48
|
+
};
|
49
|
+
}, []);
|
50
|
+
const priceText = (0, react_1.useMemo)(() => {
|
51
|
+
var _a, _b, _c, _d, _e;
|
52
|
+
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
53
|
+
return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
|
54
|
+
minimumFractionDigits: 0
|
55
|
+
})) !== null && _e !== void 0 ? _e : ''}`;
|
56
|
+
}
|
57
|
+
else {
|
58
|
+
return '£102,300.00';
|
59
|
+
}
|
60
|
+
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
61
|
+
const width = isPreview ? 375 : window.innerWidth;
|
62
|
+
const handleClickCollapse = () => {
|
63
|
+
setSpread(!spread);
|
64
|
+
};
|
65
|
+
const handleTouchStart = (event) => {
|
66
|
+
event.stopPropagation();
|
67
|
+
touchRef.current = event.touches[0].clientY;
|
68
|
+
touchMoveRef.current = true;
|
69
|
+
};
|
70
|
+
const handleTouchMove = (event) => {
|
71
|
+
var _a, _b, _c, _d;
|
72
|
+
if (touchMoveRef.current) {
|
73
|
+
touchMoveRef.current = false;
|
74
|
+
const currentY = event.touches[0].clientY;
|
75
|
+
const diff = touchRef.current - currentY;
|
76
|
+
if (diff > 0 && (isBottom || !stopSlide)) {
|
77
|
+
(_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.slideNext();
|
78
|
+
}
|
79
|
+
else if (diff < 0 && (isTop || !stopSlide)) {
|
80
|
+
(_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slidePrev();
|
81
|
+
}
|
82
|
+
}
|
83
|
+
};
|
84
|
+
return (react_1.default.createElement("div", { className: 'pb-commondityDiroNew' },
|
85
|
+
react_1.default.createElement("div", Object.assign({ ref: scrollRef, className: (0, css_1.css)(Object.assign({}, style)) }, props),
|
86
|
+
product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (react_1.default.createElement(react_2.Swiper, { height: width, modules: [modules_1.Pagination, modules_1.Autoplay], pagination: {
|
87
|
+
clickable: true,
|
88
|
+
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
89
|
+
clickableClass: 'commondityDiroNew-swiper-clickable'
|
90
|
+
}, loop: true, autoplay: {
|
91
|
+
delay: 3000
|
92
|
+
} }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
|
93
|
+
return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
|
94
|
+
react_1.default.createElement("div", { style: {
|
95
|
+
overflow: 'hidden',
|
96
|
+
width,
|
97
|
+
height: width
|
98
|
+
} },
|
99
|
+
react_1.default.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
|
100
|
+
}))),
|
101
|
+
!((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
|
102
|
+
position: 'relative',
|
103
|
+
height: 0,
|
104
|
+
width: '100%',
|
105
|
+
paddingBottom: '100%',
|
106
|
+
overflow: 'hidden'
|
107
|
+
}) },
|
108
|
+
react_1.default.createElement("img", { className: (0, css_1.css)({
|
109
|
+
position: 'absolute',
|
110
|
+
left: 0,
|
111
|
+
top: 0,
|
112
|
+
objectFit: 'cover',
|
113
|
+
width: '100%'
|
114
|
+
}), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
|
115
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
116
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
117
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-title' }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
|
118
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText)),
|
119
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === '') }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin'),
|
120
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn' }, (_l = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _l !== void 0 ? _l : 'Shop now')),
|
121
|
+
react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') }, isPost ? (react_1.default.createElement(ExpandableText_1.default, { onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-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) ||
|
122
|
+
`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
|
123
|
+
Made in Italy` })) : (react_1.default.createElement("div", { className: 'pb-commondityDiroNew-info' }, (product === null || product === void 0 ? void 0 : product.info) ||
|
124
|
+
`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
|
125
|
+
Made in Italy`))))),
|
126
|
+
react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) },
|
127
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-info', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') }, (product === null || product === void 0 ? void 0 : product.info) ||
|
128
|
+
`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
|
129
|
+
Made in Italy`))));
|
130
|
+
};
|
131
|
+
exports.default = (0, react_1.memo)(CommodityDetailDiroNew);
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CommodityDetailDiroNew = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const _1 = tslib_1.__importDefault(require("."));
|
6
|
+
const create_1 = require("../../../../core/create");
|
7
|
+
const CommodityDetailDiroNew = (0, create_1.createMaterial)(_1.default, {
|
8
|
+
displayName: '商品详情',
|
9
|
+
icon: '',
|
10
|
+
category: 'popup',
|
11
|
+
type: 'CommodityDetailDiroNew',
|
12
|
+
defaulSetting: {
|
13
|
+
props: {},
|
14
|
+
style: {}
|
15
|
+
},
|
16
|
+
w: 100,
|
17
|
+
h: 40,
|
18
|
+
sort: 1
|
19
|
+
});
|
20
|
+
exports.CommodityDetailDiroNew = CommodityDetailDiroNew;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './index.less';
|
3
|
+
export interface IPromptProps {
|
4
|
+
content?: string;
|
5
|
+
btnText?: string;
|
6
|
+
style?: Record<string, any>;
|
7
|
+
icon?: Record<string, any> | string;
|
8
|
+
onClick?: () => void;
|
9
|
+
}
|
10
|
+
declare const _default: React.NamedExoticComponent<IPromptProps>;
|
11
|
+
export default _default;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
const css_1 = require("@emotion/css");
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
6
|
+
const success_png_1 = tslib_1.__importDefault(require("./success.png"));
|
7
|
+
const materials_1 = require("../../../../core/utils/materials");
|
8
|
+
const hooks_1 = require("../../../../core/hooks");
|
9
|
+
require("./index.less");
|
10
|
+
const Prompt = (_a) => {
|
11
|
+
var { content, btnText, style, icon, onClick } = _a, props = tslib_1.__rest(_a, ["content", "btnText", "style", "icon", "onClick"]);
|
12
|
+
const { setPopup } = (0, hooks_1.useEditor)();
|
13
|
+
const iconSrc = typeof icon === 'string' ? icon : (0, materials_1.getMediaValueByMode)(icon);
|
14
|
+
const handleOk = () => {
|
15
|
+
window === null || window === void 0 ? void 0 : window.sxpPopup('');
|
16
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
17
|
+
};
|
18
|
+
return (react_1.default.createElement("div", Object.assign({ className: `pb-prompt ${(0, css_1.css)(Object.assign({}, style))}` }, props),
|
19
|
+
react_1.default.createElement("div", { className: 'pb-prompt-icon' },
|
20
|
+
react_1.default.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : success_png_1.default })),
|
21
|
+
react_1.default.createElement("div", { className: 'pb-prompt-content' }, content),
|
22
|
+
react_1.default.createElement("button", { className: 'pb-prompt-btn', onClick: handleOk }, btnText)));
|
23
|
+
};
|
24
|
+
exports.default = (0, react_1.memo)(Prompt);
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Prompt = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
|
6
|
+
const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
|
7
|
+
const success_png_1 = tslib_1.__importDefault(require("./success.png"));
|
8
|
+
const _1 = tslib_1.__importDefault(require("."));
|
9
|
+
const create_1 = require("../../../../core/create");
|
10
|
+
const Prompt = (0, create_1.createMaterial)(_1.default, {
|
11
|
+
displayName: '提交成功',
|
12
|
+
icon: '',
|
13
|
+
category: 'popup',
|
14
|
+
type: 'Prompt',
|
15
|
+
related: {
|
16
|
+
settingRender: settingRender_1.default,
|
17
|
+
bindableProps: [],
|
18
|
+
interactionRender: interactionRender_1.default
|
19
|
+
},
|
20
|
+
defaulSetting: {
|
21
|
+
props: {
|
22
|
+
icon: success_png_1.default,
|
23
|
+
content: 'You have successfully completed the appointment!',
|
24
|
+
btnText: 'OK'
|
25
|
+
},
|
26
|
+
style: {}
|
27
|
+
},
|
28
|
+
w: 100,
|
29
|
+
h: 40,
|
30
|
+
sort: 3
|
31
|
+
});
|
32
|
+
exports.Prompt = Prompt;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = [
|
4
|
+
{
|
5
|
+
type: 'Media',
|
6
|
+
label: '图标',
|
7
|
+
name: ['props', 'icon'],
|
8
|
+
mediaType: 'Image'
|
9
|
+
},
|
10
|
+
{
|
11
|
+
type: 'TextArea',
|
12
|
+
label: '内容',
|
13
|
+
name: ['props', 'content']
|
14
|
+
},
|
15
|
+
{
|
16
|
+
type: 'Text',
|
17
|
+
label: '按钮文案',
|
18
|
+
name: ['props', 'btnText']
|
19
|
+
}
|
20
|
+
];
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
tslib_1.__exportStar(require("./AppointForm/material"), exports);
|
5
|
+
tslib_1.__exportStar(require("./CommodityDetail/material"), exports);
|
6
|
+
tslib_1.__exportStar(require("./Prompt/material"), exports);
|
7
|
+
tslib_1.__exportStar(require("./CommodityDetailDiro/material"), exports);
|
8
|
+
tslib_1.__exportStar(require("./CommodityDetailDiroNew/material"), exports);
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
3
|
+
export interface IAppointProps {
|
4
|
+
content?: string;
|
5
|
+
style?: Record<string, any>;
|
6
|
+
bgImg?: Record<string, any> | string;
|
7
|
+
recData?: RecItemType;
|
8
|
+
bottom_image?: string;
|
9
|
+
}
|
10
|
+
declare const _default: React.NamedExoticComponent<IAppointProps>;
|
11
|
+
export default _default;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
const css_1 = require("@emotion/css");
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
6
|
+
const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
|
7
|
+
const hooks_1 = require("../../../../core/hooks");
|
8
|
+
const Appoint = (_a) => {
|
9
|
+
var _b, _c, _d, _e;
|
10
|
+
var { content, style, bgImg, recData, bottom_image } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
|
11
|
+
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
12
|
+
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
13
|
+
return (react_1.default.createElement(EventProvider_1.default, Object.assign({ rec: recData, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
|
14
|
+
react_1.default.createElement("div", { className: (0, css_1.css)({
|
15
|
+
width: '30px',
|
16
|
+
height: '30px',
|
17
|
+
marginRight: '8px',
|
18
|
+
borderRadius: '3px',
|
19
|
+
overflow: 'hidden',
|
20
|
+
flexShrink: 0,
|
21
|
+
backgroundColor: '#f2f2f2'
|
22
|
+
}) },
|
23
|
+
react_1.default.createElement("img", { className: (0, css_1.css)({ width: '100%', objectFit: 'cover', height: '100%' }), src: (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, alt: '' })),
|
24
|
+
react_1.default.createElement("div", { className: (0, css_1.css)({
|
25
|
+
color: '#fff',
|
26
|
+
width: '100%',
|
27
|
+
overflow: 'hidden',
|
28
|
+
fontSize: '12px',
|
29
|
+
textOverflow: 'ellipsis'
|
30
|
+
}) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
|
31
|
+
};
|
32
|
+
exports.default = (0, react_1.memo)(Appoint);
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Appoint = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
|
6
|
+
const _1 = tslib_1.__importDefault(require("."));
|
7
|
+
const create_1 = require("../../../../core/create");
|
8
|
+
const Appoint = (0, create_1.createMaterial)(_1.default, {
|
9
|
+
displayName: '预约表单',
|
10
|
+
icon: '',
|
11
|
+
category: 'template',
|
12
|
+
type: 'Appoint',
|
13
|
+
related: {
|
14
|
+
interactionRender: interactionRender_1.default,
|
15
|
+
bindableProps: []
|
16
|
+
},
|
17
|
+
defaulSetting: {
|
18
|
+
props: {
|
19
|
+
content: '按钮'
|
20
|
+
},
|
21
|
+
style: {
|
22
|
+
padding: '7px',
|
23
|
+
display: 'flex',
|
24
|
+
alignItems: 'center',
|
25
|
+
background: 'rgba(0,0,0,.3)',
|
26
|
+
borderRadius: '3px'
|
27
|
+
}
|
28
|
+
},
|
29
|
+
w: 100,
|
30
|
+
h: 40,
|
31
|
+
sort: 6
|
32
|
+
});
|
33
|
+
exports.Appoint = Appoint;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
3
|
+
export interface ICommodityProps {
|
4
|
+
content?: string;
|
5
|
+
style?: Record<string, any>;
|
6
|
+
bgImg?: Record<string, any> | string;
|
7
|
+
recData?: RecItemType;
|
8
|
+
bottom_image?: string;
|
9
|
+
}
|
10
|
+
declare const _default: React.NamedExoticComponent<ICommodityProps>;
|
11
|
+
export default _default;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
const css_1 = require("@emotion/css");
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
6
|
+
const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
|
7
|
+
const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
|
8
|
+
const hooks_1 = require("../../../../core/hooks");
|
9
|
+
const Commodity = (_a) => {
|
10
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
11
|
+
var { content, style, bgImg, recData, bottom_image } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
|
12
|
+
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
13
|
+
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
14
|
+
const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
15
|
+
return (react_1.default.createElement(EventProvider_1.default, Object.assign({ rec: recData, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
|
16
|
+
react_1.default.createElement("div", { className: (0, css_1.css)({
|
17
|
+
width: '60px',
|
18
|
+
height: '60px',
|
19
|
+
marginRight: '8px',
|
20
|
+
borderRadius: '3px',
|
21
|
+
overflow: 'hidden',
|
22
|
+
flexShrink: 0,
|
23
|
+
backgroundColor: '#f2f2f2'
|
24
|
+
}) },
|
25
|
+
react_1.default.createElement("img", { className: (0, css_1.css)({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
|
26
|
+
react_1.default.createElement("div", { className: (0, css_1.css)({
|
27
|
+
color: '#fff',
|
28
|
+
display: 'flex',
|
29
|
+
flexDirection: 'column',
|
30
|
+
justifyContent: 'space-between',
|
31
|
+
width: '100%',
|
32
|
+
overflow: 'hidden'
|
33
|
+
}) },
|
34
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'] }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
|
35
|
+
react_1.default.createElement("div", { className: (0, css_1.css)({
|
36
|
+
background: 'rgba(0,0,0,.5)',
|
37
|
+
fontSize: '10px',
|
38
|
+
padding: '2px 7px',
|
39
|
+
width: 'auto',
|
40
|
+
textAlign: 'center',
|
41
|
+
textOverflow: 'ellipsis',
|
42
|
+
overflow: 'hidden',
|
43
|
+
whiteSpace: 'nowrap'
|
44
|
+
}) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
|
45
|
+
};
|
46
|
+
exports.default = (0, react_1.memo)(Commodity);
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Commodity = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
|
6
|
+
const _1 = tslib_1.__importDefault(require("."));
|
7
|
+
const create_1 = require("../../../../core/create");
|
8
|
+
const Commodity = (0, create_1.createMaterial)(_1.default, {
|
9
|
+
displayName: '推荐单商品-透明底',
|
10
|
+
icon: '',
|
11
|
+
category: 'template',
|
12
|
+
type: 'Commodity',
|
13
|
+
related: {
|
14
|
+
interactionRender: interactionRender_1.default,
|
15
|
+
bindableProps: []
|
16
|
+
},
|
17
|
+
defaulSetting: {
|
18
|
+
props: {},
|
19
|
+
style: {
|
20
|
+
padding: '7px',
|
21
|
+
display: 'flex',
|
22
|
+
background: 'rgba(0,0,0,.3)',
|
23
|
+
borderRadius: '3px'
|
24
|
+
}
|
25
|
+
},
|
26
|
+
w: 100,
|
27
|
+
h: 40,
|
28
|
+
sort: 1
|
29
|
+
});
|
30
|
+
exports.Commodity = Commodity;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
3
|
+
export interface ICommodityDiroProps {
|
4
|
+
content?: string;
|
5
|
+
style?: Record<string, any>;
|
6
|
+
bgImg?: Record<string, any> | string;
|
7
|
+
recData?: RecItemType;
|
8
|
+
bottom_image?: string;
|
9
|
+
}
|
10
|
+
declare const _default: React.NamedExoticComponent<ICommodityDiroProps>;
|
11
|
+
export default _default;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
const css_1 = require("@emotion/css");
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
6
|
+
const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
|
7
|
+
const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
|
8
|
+
const hooks_1 = require("../../../../core/hooks");
|
9
|
+
const CommodityDiro = (_a) => {
|
10
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
11
|
+
var { content, style, bgImg, recData, bottom_image } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
|
12
|
+
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
13
|
+
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
14
|
+
const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
15
|
+
return (react_1.default.createElement(EventProvider_1.default, Object.assign({ rec: recData, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
|
16
|
+
react_1.default.createElement("div", { className: (0, css_1.css)({
|
17
|
+
width: '60px',
|
18
|
+
height: '60px',
|
19
|
+
marginRight: '8px',
|
20
|
+
borderRadius: '3px',
|
21
|
+
overflow: 'hidden',
|
22
|
+
flexShrink: 0,
|
23
|
+
backgroundColor: '#f2f2f2'
|
24
|
+
}) },
|
25
|
+
react_1.default.createElement("img", { className: (0, css_1.css)({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
|
26
|
+
react_1.default.createElement("div", { className: (0, css_1.css)({
|
27
|
+
color: '#fff',
|
28
|
+
display: 'flex',
|
29
|
+
flexDirection: 'column',
|
30
|
+
justifyContent: 'space-between',
|
31
|
+
width: '100%',
|
32
|
+
overflow: 'hidden'
|
33
|
+
}) },
|
34
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'] }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
|
35
|
+
react_1.default.createElement("div", { className: (0, css_1.css)({
|
36
|
+
background: 'rgba(0,0,0,1)',
|
37
|
+
fontSize: '10px',
|
38
|
+
padding: '2px 7px',
|
39
|
+
textAlign: 'center',
|
40
|
+
textOverflow: 'ellipsis',
|
41
|
+
overflow: 'hidden',
|
42
|
+
borderRadius: '25px',
|
43
|
+
width: 'fit-content',
|
44
|
+
maxWidth: '100%',
|
45
|
+
whiteSpace: 'nowrap'
|
46
|
+
}) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
|
47
|
+
};
|
48
|
+
exports.default = (0, react_1.memo)(CommodityDiro);
|