@fonixtree/magic-design 1.0.53 → 1.0.55
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/es/assets/fonts/Trueno-Light.otf +0 -0
- package/es/assets/fonts/Trueno-Regular.otf +0 -0
- package/es/assets/fonts/TruenoBd.otf +0 -0
- package/es/assets/fonts/magic-box-iconfont.css +62 -6
- package/es/assets/fonts/magic-box-iconfont.css.bak +35 -3
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/assets/images/base64/index.js +36 -2
- package/es/assets/images/layout-icon/walletLayout2.png +0 -0
- package/es/assets/images/layout-icon/walletNuriLayout1.png +0 -0
- package/es/assets/less/button.less +5 -0
- package/es/assets/less/cylon-antd.less +7246 -1686
- package/es/assets/less/font.less +22 -0
- package/es/common/AffiliateProductModal/index.js +582 -0
- package/es/common/AffiliateProductModal/index.less +146 -0
- package/es/common/Button/index.less +0 -1
- package/es/common/CardCarousel/index.js +171 -0
- package/es/common/CardCarousel/index.less +28 -0
- package/es/common/GroupList/index.js +7 -2
- package/es/common/ImagePicker/index.js +1 -3
- package/es/common/LinkModal/CouponTable/index.js +3 -3
- package/es/common/LinkModal/CustomTable/index.js +1 -0
- package/es/common/LinkModal/FunctionTable/index.js +2 -1
- package/es/common/LinkModal/index.js +14 -2
- package/es/common/MagicLink/index.js +2 -2
- package/es/common/MyModal/index.js +417 -0
- package/es/common/MyModal/index.less +74 -0
- package/es/common/ProductModal/index.js +38 -3
- package/es/common/ProductSource/index.js +59 -18
- package/es/common/UrlPicker/AnchorModal/index.js +170 -0
- package/es/common/UrlPicker/AnchorModal/index.less +21 -0
- package/es/common/UrlPicker/index.js +62 -10
- package/es/common/index.js +16 -0
- package/es/composite-comp/bol/components/Banner/mobile/index.js +1 -2
- package/es/composite-comp/bol/components/Banner/mobile/index.less +52 -78
- package/es/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
- package/es/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
- package/es/composite-comp/bol/components/Video/index.js +1 -2
- package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
- package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
- package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -54
- package/es/composite-comp/bol/components/Video/mobile/index.less +2 -3
- package/es/composite-comp/bol/components/Wallet/defaultJSON.js +112 -88
- package/es/composite-comp/bol/components/Wallet/index.js +11 -15
- package/es/composite-comp/bol/components/Wallet/mobile/index.js +314 -64
- package/es/composite-comp/bol/components/Wallet/mobile/index.less +103 -40
- package/es/composite-comp/bol/components/Wallet/pc/index.js +0 -2
- package/es/composite-comp/bol/components/Wallet/pc/index.less +1 -40
- package/es/composite-comp/bol/components/WalletNuri/defaultJSON.js +148 -0
- package/es/composite-comp/bol/components/WalletNuri/index.js +84 -0
- package/es/composite-comp/bol/components/WalletNuri/mobile/index.js +366 -0
- package/es/composite-comp/bol/components/WalletNuri/mobile/index.less +22 -0
- package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +1 -6
- package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.js +201 -0
- package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.less +9 -0
- package/es/composite-comp/bol/config-panels/WalletConfig/index.js +11 -2
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/index.js +61 -0
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +2 -2
- package/es/composite-comp/bol/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
- package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +58 -82
- package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.less +2 -0
- package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
- package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
- package/es/composite-comp/common/components/AffiliateProductItem/index.js +168 -0
- package/es/composite-comp/common/components/AffiliateProductItem/index.less +129 -0
- package/es/composite-comp/common/components/ProductItem/index.js +22 -20
- package/es/composite-comp/common/components/ProductItem/index.less +2 -12
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.less +3 -2
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +660 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +84 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.js +728 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
- package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +92 -0
- package/es/composite-comp/dito/components/CommonFunctions/index.js +84 -0
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +107 -0
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +30 -0
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
- package/es/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
- package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +102 -0
- package/es/composite-comp/dito/components/HeadNavigation/index.js +84 -0
- package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
- package/es/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
- package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
- package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
- package/es/composite-comp/dito/components/MenuNavigation/defaultJSON.js +107 -0
- package/es/composite-comp/dito/components/MenuNavigation/index.js +84 -0
- package/es/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
- package/es/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
- package/es/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
- package/es/composite-comp/dito/components/Orders/index.js +84 -0
- package/es/composite-comp/dito/components/Orders/mobile/index.js +345 -0
- package/es/composite-comp/dito/components/Orders/mobile/index.less +87 -0
- package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
- package/es/composite-comp/dito/components/PersonalInformation/index.js +84 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +467 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +132 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +6 -5
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
- package/es/composite-comp/dito/components/Recommend/pc/index.js +6 -5
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +6 -9
- package/es/composite-comp/dito/components/SignBoard/mobile/index.less +62 -66
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +148 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +121 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
- package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +131 -0
- package/es/composite-comp/dito/config-panels/OrdersConfig/index.js +114 -0
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +131 -0
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +118 -0
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +10 -9
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +1 -0
- package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
- package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
- package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
- package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
- package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
- package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
- package/es/constants/component-types.js +45 -3
- package/es/constants/index.js +74 -5
- package/es/constants/layout.js +48 -1
- package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +128 -0
- package/es/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
- package/es/core/Designer/ChatRobot/index.js +84 -17
- package/es/core/Designer/ChatRobot/index.less +69 -28
- package/es/core/Designer/ConfigPanel/index.js +14 -3
- package/es/core/Designer/FonixtreeGpt/index.js +222 -29
- package/es/core/Designer/PageCompList/index.js +6 -5
- package/es/core/Designer/QuickMenuBar/index.js +11 -5
- package/es/core/Designer/QuickMenuBar/index.less +4 -0
- package/es/core/Designer/RenderHtml/index.js +18 -15
- package/es/core/Designer/RenderHtml/index.less +1 -1
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +19 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +19 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +19 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +27 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +4 -20
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.js +77 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.less +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +36 -5
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +17 -16
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +27 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +4 -20
- package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignCenterSVG.js +40 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignLeftSVG.js +40 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignRightSVG.js +40 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/index.js +28 -3
- package/es/core/Designer/ToolBarModal/ToolBtn/index.less +2 -1
- package/es/core/Designer/ToolBarModal/index.js +68 -22
- package/es/core/Designer/ToolBarModal/index.less +3 -2
- package/es/core/Designer/index.js +26 -2
- package/es/core/Renderer/index.js +74 -29
- package/es/decorator/compositeDecorator.js +24 -1
- package/es/decorator/metaDecorator.js +1 -1
- package/es/locale/en/en.json +16 -2
- package/es/locale/es/es.json +16 -2
- package/es/locale/id/id.json +16 -2
- package/es/meta-comp/components/Image/index.js +31 -25
- package/es/meta-comp/components/Text/formats/textAlign.js +58 -0
- package/es/meta-comp/components/Text/index.js +4 -1
- package/es/meta-comp/components/Text/index.less +8 -0
- package/es/meta-comp/config-panels/ImageConfig/index.js +48 -44
- package/es/mobx/Frame.js +17 -2
- package/es/mobx/UserState.js +144 -0
- package/es/mobx/index.js +9 -3
- package/es/utils/androidUtil.js +13 -2
- package/es/utils/businessUtil.js +25 -3
- package/es/utils/commonUtil.js +167 -19
- package/es/utils/coreUtil.js +45 -2
- package/es/utils/currencyUtil.js +9 -2
- package/lib/assets/fonts/Trueno-Light.otf +0 -0
- package/lib/assets/fonts/Trueno-Regular.otf +0 -0
- package/lib/assets/fonts/TruenoBd.otf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.css +62 -6
- package/lib/assets/fonts/magic-box-iconfont.css.bak +35 -3
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/assets/images/base64/index.js +36 -2
- package/lib/assets/images/layout-icon/walletLayout2.png +0 -0
- package/lib/assets/images/layout-icon/walletNuriLayout1.png +0 -0
- package/lib/assets/less/button.less +5 -0
- package/lib/assets/less/cylon-antd.less +7246 -1686
- package/lib/assets/less/font.less +22 -0
- package/lib/common/AffiliateProductModal/index.js +582 -0
- package/lib/common/AffiliateProductModal/index.less +146 -0
- package/lib/common/Button/index.less +0 -1
- package/lib/common/CardCarousel/index.js +171 -0
- package/lib/common/CardCarousel/index.less +28 -0
- package/lib/common/GroupList/index.js +7 -2
- package/lib/common/ImagePicker/index.js +1 -3
- package/lib/common/LinkModal/CouponTable/index.js +3 -3
- package/lib/common/LinkModal/CustomTable/index.js +1 -0
- package/lib/common/LinkModal/FunctionTable/index.js +2 -1
- package/lib/common/LinkModal/index.js +14 -2
- package/lib/common/MagicLink/index.js +2 -2
- package/lib/common/MyModal/index.js +417 -0
- package/lib/common/MyModal/index.less +74 -0
- package/lib/common/ProductModal/index.js +38 -3
- package/lib/common/ProductSource/index.js +59 -18
- package/lib/common/UrlPicker/AnchorModal/index.js +170 -0
- package/lib/common/UrlPicker/AnchorModal/index.less +21 -0
- package/lib/common/UrlPicker/index.js +62 -10
- package/lib/common/index.js +16 -0
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +1 -2
- package/lib/composite-comp/bol/components/Banner/mobile/index.less +52 -78
- package/lib/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
- package/lib/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
- package/lib/composite-comp/bol/components/Video/index.js +1 -2
- package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
- package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
- package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -54
- package/lib/composite-comp/bol/components/Video/mobile/index.less +2 -3
- package/lib/composite-comp/bol/components/Wallet/defaultJSON.js +112 -88
- package/lib/composite-comp/bol/components/Wallet/index.js +11 -15
- package/lib/composite-comp/bol/components/Wallet/mobile/index.js +314 -64
- package/lib/composite-comp/bol/components/Wallet/mobile/index.less +103 -40
- package/lib/composite-comp/bol/components/Wallet/pc/index.js +0 -2
- package/lib/composite-comp/bol/components/Wallet/pc/index.less +1 -40
- package/lib/composite-comp/bol/components/WalletNuri/defaultJSON.js +148 -0
- package/lib/composite-comp/bol/components/WalletNuri/index.js +84 -0
- package/lib/composite-comp/bol/components/WalletNuri/mobile/index.js +366 -0
- package/lib/composite-comp/bol/components/WalletNuri/mobile/index.less +22 -0
- package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +1 -6
- package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.js +201 -0
- package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.less +9 -0
- package/lib/composite-comp/bol/config-panels/WalletConfig/index.js +11 -2
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/index.js +61 -0
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +2 -2
- package/lib/composite-comp/bol/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
- package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +58 -82
- package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.less +2 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/index.js +168 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/index.less +129 -0
- package/lib/composite-comp/common/components/ProductItem/index.js +22 -20
- package/lib/composite-comp/common/components/ProductItem/index.less +2 -12
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.less +3 -2
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +660 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +84 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.js +728 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
- package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +92 -0
- package/lib/composite-comp/dito/components/CommonFunctions/index.js +84 -0
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +107 -0
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +30 -0
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
- package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +102 -0
- package/lib/composite-comp/dito/components/HeadNavigation/index.js +84 -0
- package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
- package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
- package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
- package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
- package/lib/composite-comp/dito/components/MenuNavigation/defaultJSON.js +107 -0
- package/lib/composite-comp/dito/components/MenuNavigation/index.js +84 -0
- package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
- package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
- package/lib/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
- package/lib/composite-comp/dito/components/Orders/index.js +84 -0
- package/lib/composite-comp/dito/components/Orders/mobile/index.js +345 -0
- package/lib/composite-comp/dito/components/Orders/mobile/index.less +87 -0
- package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
- package/lib/composite-comp/dito/components/PersonalInformation/index.js +84 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +467 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +132 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +6 -5
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +6 -5
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +6 -9
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +62 -66
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +148 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +121 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
- package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +131 -0
- package/lib/composite-comp/dito/config-panels/OrdersConfig/index.js +114 -0
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +131 -0
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +118 -0
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +10 -9
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +1 -0
- package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
- package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
- package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
- package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
- package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
- package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
- package/lib/constants/component-types.js +45 -3
- package/lib/constants/index.js +74 -5
- package/lib/constants/layout.js +48 -1
- package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +128 -0
- package/lib/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
- package/lib/core/Designer/ChatRobot/index.js +84 -17
- package/lib/core/Designer/ChatRobot/index.less +69 -28
- package/lib/core/Designer/ConfigPanel/index.js +14 -3
- package/lib/core/Designer/FonixtreeGpt/index.js +222 -29
- package/lib/core/Designer/PageCompList/index.js +6 -5
- package/lib/core/Designer/QuickMenuBar/index.js +11 -5
- package/lib/core/Designer/QuickMenuBar/index.less +4 -0
- package/lib/core/Designer/RenderHtml/index.js +18 -15
- package/lib/core/Designer/RenderHtml/index.less +1 -1
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +19 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +19 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +19 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +27 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +4 -20
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.js +77 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.less +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +36 -5
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +17 -16
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +27 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +4 -20
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignCenterSVG.js +40 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignLeftSVG.js +40 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignRightSVG.js +40 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.js +28 -3
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.less +2 -1
- package/lib/core/Designer/ToolBarModal/index.js +68 -22
- package/lib/core/Designer/ToolBarModal/index.less +3 -2
- package/lib/core/Designer/index.js +26 -2
- package/lib/core/Renderer/index.js +74 -29
- package/lib/decorator/compositeDecorator.js +24 -1
- package/lib/decorator/metaDecorator.js +1 -1
- package/lib/locale/en/en.json +16 -2
- package/lib/locale/es/es.json +16 -2
- package/lib/locale/id/id.json +16 -2
- package/lib/meta-comp/components/Image/index.js +31 -25
- package/lib/meta-comp/components/Text/formats/textAlign.js +58 -0
- package/lib/meta-comp/components/Text/index.js +4 -1
- package/lib/meta-comp/components/Text/index.less +8 -0
- package/lib/meta-comp/config-panels/ImageConfig/index.js +48 -44
- package/lib/mobx/Frame.js +17 -2
- package/lib/mobx/UserState.js +144 -0
- package/lib/mobx/index.js +9 -3
- package/lib/utils/androidUtil.js +13 -2
- package/lib/utils/businessUtil.js +25 -3
- package/lib/utils/commonUtil.js +167 -19
- package/lib/utils/coreUtil.js +45 -2
- package/lib/utils/currencyUtil.js +9 -2
- package/package.json +1 -1
|
@@ -15,6 +15,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
15
15
|
|
|
16
16
|
var _CopyBtn = _interopRequireDefault(require("./components/CopyBtn"));
|
|
17
17
|
|
|
18
|
+
var _SearchCondition = _interopRequireDefault(require("./components/SearchCondition"));
|
|
19
|
+
|
|
18
20
|
var _common = require("../../../common");
|
|
19
21
|
|
|
20
22
|
var _FonixtreeGpt = _interopRequireDefault(require("../FonixtreeGpt"));
|
|
@@ -59,6 +61,8 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
59
61
|
};
|
|
60
62
|
}();
|
|
61
63
|
|
|
64
|
+
var TextArea = _antd.Input.TextArea;
|
|
65
|
+
|
|
62
66
|
var ChatRobot =
|
|
63
67
|
/** @class */
|
|
64
68
|
function (_super) {
|
|
@@ -67,13 +71,15 @@ function (_super) {
|
|
|
67
71
|
function ChatRobot(props) {
|
|
68
72
|
var _this = _super.call(this, props) || this;
|
|
69
73
|
|
|
74
|
+
_this.condRef = /*#__PURE__*/_react["default"].createRef();
|
|
70
75
|
_this.state = {
|
|
71
76
|
open: false,
|
|
72
77
|
message: '',
|
|
73
78
|
context: [],
|
|
74
79
|
isGenerating: false,
|
|
75
80
|
aiImageVisible: false,
|
|
76
|
-
loading: true
|
|
81
|
+
loading: true,
|
|
82
|
+
showCondition: true
|
|
77
83
|
};
|
|
78
84
|
|
|
79
85
|
_this.scrollBottom = function () {
|
|
@@ -91,15 +97,57 @@ function (_super) {
|
|
|
91
97
|
return marked.parse(text);
|
|
92
98
|
};
|
|
93
99
|
|
|
100
|
+
_this.getMessageObj = function (msg) {
|
|
101
|
+
var showCondition = _this.state.showCondition;
|
|
102
|
+
|
|
103
|
+
if (!showCondition) {
|
|
104
|
+
return {
|
|
105
|
+
content: msg,
|
|
106
|
+
showContent: msg
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
var newMsg = msg;
|
|
111
|
+
|
|
112
|
+
if (msg.endsWith('.')) {
|
|
113
|
+
newMsg += '.';
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
var cond = _this.condRef.current.getValues();
|
|
117
|
+
|
|
118
|
+
if (cond.tone) {
|
|
119
|
+
newMsg += " The tone should be " + cond.tone + ".";
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (cond.count) {
|
|
123
|
+
newMsg += " Within " + cond.count + " words.";
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (cond.features) {
|
|
127
|
+
newMsg += " The description should cover key features " + cond.features + ".";
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (cond.keyDetail) {
|
|
131
|
+
newMsg += " Emphasize " + cond.keyDetail + ".";
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
content: newMsg,
|
|
136
|
+
showContent: msg
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
|
|
94
140
|
_this.onEnter = function () {
|
|
95
141
|
var message = _this.state.message;
|
|
96
142
|
|
|
97
143
|
if (!message) {
|
|
98
144
|
return;
|
|
99
|
-
}
|
|
145
|
+
}
|
|
100
146
|
|
|
147
|
+
var messageObj = _this.getMessageObj(message); // chat
|
|
101
148
|
|
|
102
|
-
|
|
149
|
+
|
|
150
|
+
_this.chatGpt.sendMessage(messageObj);
|
|
103
151
|
|
|
104
152
|
var context = _this.chatGpt.getContext();
|
|
105
153
|
|
|
@@ -195,7 +243,8 @@ function (_super) {
|
|
|
195
243
|
open = _a.open,
|
|
196
244
|
isGenerating = _a.isGenerating,
|
|
197
245
|
aiImageVisible = _a.aiImageVisible,
|
|
198
|
-
loading = _a.loading
|
|
246
|
+
loading = _a.loading,
|
|
247
|
+
showCondition = _a.showCondition;
|
|
199
248
|
|
|
200
249
|
if (loading) {
|
|
201
250
|
return null;
|
|
@@ -218,14 +267,17 @@ function (_super) {
|
|
|
218
267
|
closable: false,
|
|
219
268
|
footer: /*#__PURE__*/_react["default"].createElement("div", {
|
|
220
269
|
className: "dialog_bottom"
|
|
221
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
270
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
271
|
+
className: "bottom_input"
|
|
272
|
+
}, /*#__PURE__*/_react["default"].createElement(TextArea, {
|
|
273
|
+
autoSize: true,
|
|
274
|
+
className: "text_area",
|
|
222
275
|
onChange: this.onMessageChage,
|
|
223
276
|
onPressEnter: this.onEnter,
|
|
224
277
|
placeholder: "Send a message",
|
|
225
278
|
value: message
|
|
226
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
227
|
-
className: "
|
|
228
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
279
|
+
}), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
280
|
+
className: "image_btn",
|
|
229
281
|
color: "#2F54EB",
|
|
230
282
|
onClick: this.generateImage,
|
|
231
283
|
size: 20,
|
|
@@ -234,14 +286,21 @@ function (_super) {
|
|
|
234
286
|
},
|
|
235
287
|
type: "icon-image"
|
|
236
288
|
}), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
289
|
+
className: "toggle_btn",
|
|
290
|
+
color: "#2F54EB",
|
|
291
|
+
onClick: function onClick() {
|
|
292
|
+
return _this.setState({
|
|
293
|
+
showCondition: !showCondition
|
|
294
|
+
});
|
|
242
295
|
},
|
|
243
|
-
|
|
244
|
-
|
|
296
|
+
size: 24,
|
|
297
|
+
type: showCondition ? 'icon-circle-down' : 'icon-circle-up'
|
|
298
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
299
|
+
className: (0, _classnames["default"])('generate_btn', {
|
|
300
|
+
disable_btn: message.length === 0
|
|
301
|
+
}),
|
|
302
|
+
onClick: this.onEnter
|
|
303
|
+
}, "Generate")),
|
|
245
304
|
footerStyle: {
|
|
246
305
|
padding: 12
|
|
247
306
|
},
|
|
@@ -296,7 +355,7 @@ function (_super) {
|
|
|
296
355
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
297
356
|
className: "messageContentWrap",
|
|
298
357
|
dangerouslySetInnerHTML: {
|
|
299
|
-
__html: _this.getMarkText(ctxNode.content)
|
|
358
|
+
__html: _this.getMarkText(ctxNode.showContent || ctxNode.content)
|
|
300
359
|
}
|
|
301
360
|
}), ctxNode.role === 'assistant' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
302
361
|
className: "msgIconWrap"
|
|
@@ -311,6 +370,8 @@ function (_super) {
|
|
|
311
370
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Spin, {
|
|
312
371
|
spinning: true
|
|
313
372
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
373
|
+
className: "regenerate_btn_wrap"
|
|
374
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
314
375
|
className: "regenerate_btn",
|
|
315
376
|
onClick: this.onRegenarate
|
|
316
377
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
@@ -321,7 +382,13 @@ function (_super) {
|
|
|
321
382
|
marginRight: 5
|
|
322
383
|
},
|
|
323
384
|
type: "icon-refresh"
|
|
324
|
-
}), "Regenerate Response"))
|
|
385
|
+
}), "Regenerate Response")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
386
|
+
className: (0, _classnames["default"])('more_condition', {
|
|
387
|
+
more_condition_hide: !showCondition
|
|
388
|
+
})
|
|
389
|
+
}, /*#__PURE__*/_react["default"].createElement(_SearchCondition["default"], {
|
|
390
|
+
onRef: this.condRef
|
|
391
|
+
})))), /*#__PURE__*/_react["default"].createElement(_AiImageGenerator["default"], {
|
|
325
392
|
onClose: function onClose() {
|
|
326
393
|
return _this.setState({
|
|
327
394
|
aiImageVisible: false
|
|
@@ -32,12 +32,15 @@
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
.chat_content_wrap {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
35
37
|
position: relative;
|
|
36
|
-
padding-bottom: 40px;
|
|
37
38
|
height: 100%;
|
|
38
39
|
.content_wrap {
|
|
40
|
+
background: #F5F6F7;
|
|
41
|
+
flex: 1;
|
|
39
42
|
padding: 16px;
|
|
40
|
-
height: 100%;
|
|
43
|
+
// height: 100%;
|
|
41
44
|
overflow: scroll;
|
|
42
45
|
font-family: 'Open Sans';
|
|
43
46
|
font-size: 14px;
|
|
@@ -78,16 +81,18 @@
|
|
|
78
81
|
display: flex;
|
|
79
82
|
justify-content: flex-end;
|
|
80
83
|
.messageWrap {
|
|
84
|
+
border: 1px solid #E6EAF0;
|
|
81
85
|
border-radius: 4px;
|
|
82
|
-
background: #
|
|
83
|
-
color: #
|
|
86
|
+
background: #FFF;
|
|
87
|
+
color: #232F46;
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
90
|
.assistantMessage {
|
|
87
91
|
.messageWrap {
|
|
88
92
|
border-radius: 4px;
|
|
89
|
-
background: #
|
|
90
|
-
color: #
|
|
93
|
+
background: #E9F0FF;
|
|
94
|
+
color: #2F54EB;
|
|
95
|
+
border: 1px solid #D6E4FF;
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
98
|
.recent_response {
|
|
@@ -101,38 +106,74 @@
|
|
|
101
106
|
}
|
|
102
107
|
}
|
|
103
108
|
}
|
|
104
|
-
|
|
109
|
+
|
|
110
|
+
.regenerate_btn_wrap {
|
|
111
|
+
background: #F5F6F7;
|
|
105
112
|
display: flex;
|
|
106
113
|
align-items: center;
|
|
107
|
-
|
|
108
|
-
bottom:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
justify-content: center;
|
|
115
|
+
padding-bottom: 12px;
|
|
116
|
+
.regenerate_btn {
|
|
117
|
+
background-color: #FFF;
|
|
118
|
+
bottom: 10px;
|
|
119
|
+
border: 1px solid #E6EAF0;
|
|
120
|
+
border-radius: 4px;
|
|
121
|
+
padding: 4px 12px;
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
font-family: 'Open Sans';
|
|
124
|
+
font-style: normal;
|
|
125
|
+
font-weight: 400;
|
|
126
|
+
font-size: 13px;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.more_condition {
|
|
131
|
+
transition: all 0.4s;
|
|
132
|
+
max-height: 400px;
|
|
133
|
+
overflow: hidden;
|
|
134
|
+
box-shadow: 3px 3px 8px 0px #2D304008;
|
|
135
|
+
box-shadow: -3px -3px 8px 0px #2D304008;
|
|
136
|
+
}
|
|
137
|
+
.more_condition_hide {
|
|
138
|
+
max-height: 0;
|
|
119
139
|
}
|
|
120
140
|
}
|
|
121
141
|
.dialog_bottom {
|
|
122
142
|
position: relative;
|
|
123
143
|
font-size: 14px;
|
|
124
|
-
|
|
125
|
-
|
|
144
|
+
.bottom_input{
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: flex-start;
|
|
147
|
+
.text_area {
|
|
148
|
+
max-height: 200px;
|
|
149
|
+
padding-right: 30px;
|
|
150
|
+
}
|
|
151
|
+
.image_btn {
|
|
152
|
+
position: absolute;
|
|
153
|
+
right: 40px;
|
|
154
|
+
top: 6px;
|
|
155
|
+
}
|
|
156
|
+
.toggle_btn {
|
|
157
|
+
padding: 4px 0 4px 10px;
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
}
|
|
126
160
|
}
|
|
127
|
-
.
|
|
128
|
-
position: absolute;
|
|
129
|
-
right: 15px;
|
|
130
|
-
top: 0px;
|
|
131
|
-
width: 50px;
|
|
132
|
-
height: 36px;
|
|
161
|
+
.generate_btn {
|
|
133
162
|
display: flex;
|
|
134
163
|
align-items: center;
|
|
135
|
-
justify-content:
|
|
164
|
+
justify-content: center;
|
|
165
|
+
margin-top: 8px;
|
|
166
|
+
height: 36px;
|
|
167
|
+
background: #2F54EB;
|
|
168
|
+
border-radius: 6px;
|
|
169
|
+
color:#FFF;
|
|
170
|
+
font-family: Open Sans;
|
|
171
|
+
font-size: 14px;
|
|
172
|
+
font-weight: 600;
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
}
|
|
175
|
+
.disable_btn {
|
|
176
|
+
background: #C1C9D7;
|
|
136
177
|
}
|
|
137
178
|
}
|
|
138
179
|
}
|
|
@@ -81,7 +81,6 @@ var getSecondConfigName = function getSecondConfigName(selectedNode, clickedGrou
|
|
|
81
81
|
|
|
82
82
|
switch (selectedNode.type) {
|
|
83
83
|
case 'IMAGE_GALLERY':
|
|
84
|
-
case 'WALLET':
|
|
85
84
|
case 'BANNER':
|
|
86
85
|
groupName = ''; // if (!groupName) {
|
|
87
86
|
// groupName = isPc() ? panelProps.image?.content?.pcName : panelProps.image?.content?.h5Name;
|
|
@@ -109,10 +108,14 @@ var getSecondConfigName = function getSecondConfigName(selectedNode, clickedGrou
|
|
|
109
108
|
break;
|
|
110
109
|
|
|
111
110
|
case 'TEXT':
|
|
111
|
+
case 'WALLET':
|
|
112
|
+
case 'COMMON_FUNCTIONS':
|
|
112
113
|
groupName = panelProps.title.text;
|
|
113
114
|
break;
|
|
114
115
|
|
|
115
116
|
case 'RECOMMEND':
|
|
117
|
+
case 'AFFILIATE_RECOMMEND':
|
|
118
|
+
// console.log('RECOMMEND ---panelProps.groupName.text', panelProps.groupName.text);
|
|
116
119
|
groupName = panelProps.groupName.text;
|
|
117
120
|
break;
|
|
118
121
|
|
|
@@ -127,6 +130,11 @@ var getSecondConfigName = function getSecondConfigName(selectedNode, clickedGrou
|
|
|
127
130
|
case 'TAG':
|
|
128
131
|
groupName = panelProps.button.text;
|
|
129
132
|
break;
|
|
133
|
+
|
|
134
|
+
case 'PERSONAL_INFOMATION':
|
|
135
|
+
case 'ORDERS':
|
|
136
|
+
groupName = panelProps.sourceType;
|
|
137
|
+
break;
|
|
130
138
|
}
|
|
131
139
|
|
|
132
140
|
return groupName || 'Group Name';
|
|
@@ -374,8 +382,11 @@ function (_super) {
|
|
|
374
382
|
onClick: this.onSecConfigBack,
|
|
375
383
|
type: "icon"
|
|
376
384
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
377
|
-
className: "title"
|
|
378
|
-
|
|
385
|
+
className: "title",
|
|
386
|
+
dangerouslySetInnerHTML: {
|
|
387
|
+
__html: getSecondConfigName(selectedNode, clickedGroup)
|
|
388
|
+
}
|
|
389
|
+
})), this.getSecondConfigInstance()));
|
|
379
390
|
};
|
|
380
391
|
|
|
381
392
|
return ConfigPanel;
|
|
@@ -11,6 +11,165 @@ var _commonUtil = require("../../../utils/commonUtil");
|
|
|
11
11
|
|
|
12
12
|
var _storeUtil = require("../../../utils/storeUtil");
|
|
13
13
|
|
|
14
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
15
|
+
__assign = Object.assign || function (t) {
|
|
16
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
17
|
+
s = arguments[i];
|
|
18
|
+
|
|
19
|
+
for (var p in s) {
|
|
20
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return __assign.apply(this, arguments);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
31
|
+
function adopt(value) {
|
|
32
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
33
|
+
resolve(value);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) {
|
|
39
|
+
try {
|
|
40
|
+
step(generator.next(value));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function rejected(value) {
|
|
47
|
+
try {
|
|
48
|
+
step(generator["throw"](value));
|
|
49
|
+
} catch (e) {
|
|
50
|
+
reject(e);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function step(result) {
|
|
55
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
63
|
+
var _ = {
|
|
64
|
+
label: 0,
|
|
65
|
+
sent: function sent() {
|
|
66
|
+
if (t[0] & 1) throw t[1];
|
|
67
|
+
return t[1];
|
|
68
|
+
},
|
|
69
|
+
trys: [],
|
|
70
|
+
ops: []
|
|
71
|
+
},
|
|
72
|
+
f,
|
|
73
|
+
y,
|
|
74
|
+
t,
|
|
75
|
+
g;
|
|
76
|
+
return g = {
|
|
77
|
+
next: verb(0),
|
|
78
|
+
"throw": verb(1),
|
|
79
|
+
"return": verb(2)
|
|
80
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
81
|
+
return this;
|
|
82
|
+
}), g;
|
|
83
|
+
|
|
84
|
+
function verb(n) {
|
|
85
|
+
return function (v) {
|
|
86
|
+
return step([n, v]);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function step(op) {
|
|
91
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
92
|
+
|
|
93
|
+
while (_) {
|
|
94
|
+
try {
|
|
95
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
96
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
97
|
+
|
|
98
|
+
switch (op[0]) {
|
|
99
|
+
case 0:
|
|
100
|
+
case 1:
|
|
101
|
+
t = op;
|
|
102
|
+
break;
|
|
103
|
+
|
|
104
|
+
case 4:
|
|
105
|
+
_.label++;
|
|
106
|
+
return {
|
|
107
|
+
value: op[1],
|
|
108
|
+
done: false
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
case 5:
|
|
112
|
+
_.label++;
|
|
113
|
+
y = op[1];
|
|
114
|
+
op = [0];
|
|
115
|
+
continue;
|
|
116
|
+
|
|
117
|
+
case 7:
|
|
118
|
+
op = _.ops.pop();
|
|
119
|
+
|
|
120
|
+
_.trys.pop();
|
|
121
|
+
|
|
122
|
+
continue;
|
|
123
|
+
|
|
124
|
+
default:
|
|
125
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
126
|
+
_ = 0;
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
131
|
+
_.label = op[1];
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
136
|
+
_.label = t[1];
|
|
137
|
+
t = op;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (t && _.label < t[2]) {
|
|
142
|
+
_.label = t[2];
|
|
143
|
+
|
|
144
|
+
_.ops.push(op);
|
|
145
|
+
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (t[2]) _.ops.pop();
|
|
150
|
+
|
|
151
|
+
_.trys.pop();
|
|
152
|
+
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
op = body.call(thisArg, _);
|
|
157
|
+
} catch (e) {
|
|
158
|
+
op = [6, e];
|
|
159
|
+
y = 0;
|
|
160
|
+
} finally {
|
|
161
|
+
f = t = 0;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (op[0] & 5) throw op[1];
|
|
166
|
+
return {
|
|
167
|
+
value: op[0] ? op[1] : void 0,
|
|
168
|
+
done: true
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
|
|
14
173
|
// 角色
|
|
15
174
|
var roleMap = {
|
|
16
175
|
ASSISTANT: 'assistant',
|
|
@@ -33,6 +192,7 @@ function () {
|
|
|
33
192
|
this.initParams = {}; // 建立连接
|
|
34
193
|
|
|
35
194
|
this.initChatConnect = function () {
|
|
195
|
+
// return new Promise((resolve, reject) => {
|
|
36
196
|
var _a = _this.initParams,
|
|
37
197
|
onMessage = _a.onMessage,
|
|
38
198
|
onEnd = _a.onEnd;
|
|
@@ -43,14 +203,16 @@ function () {
|
|
|
43
203
|
|
|
44
204
|
eventSource.onopen = function (event) {
|
|
45
205
|
console.log('onOpen');
|
|
46
|
-
sse = event.target;
|
|
206
|
+
sse = event.target; // resolve();
|
|
47
207
|
};
|
|
48
208
|
|
|
49
209
|
eventSource.onmessage = function (event) {
|
|
50
210
|
if (event.data == '[DONE]') {
|
|
51
211
|
_this.isGenerating = false;
|
|
52
212
|
|
|
53
|
-
_this.insertMessage2Context(
|
|
213
|
+
_this.insertMessage2Context({
|
|
214
|
+
content: text
|
|
215
|
+
}, roleMap.ASSISTANT);
|
|
54
216
|
|
|
55
217
|
text = '';
|
|
56
218
|
onEnd();
|
|
@@ -77,50 +239,80 @@ function () {
|
|
|
77
239
|
_this.isGenerating = false;
|
|
78
240
|
|
|
79
241
|
_this.regenerate();
|
|
80
|
-
};
|
|
81
|
-
|
|
242
|
+
}; // });
|
|
243
|
+
|
|
244
|
+
}; // 获取全部对话上下文
|
|
82
245
|
|
|
83
246
|
|
|
84
247
|
this.getContext = function () {
|
|
85
248
|
var messages = (0, _storeUtil.getSessionStore)(catchKey) || [];
|
|
86
249
|
return messages;
|
|
250
|
+
}; // 获取发送消息上下文
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
this.getSendContext = function () {
|
|
254
|
+
var context = (0, _storeUtil.getSessionStore)(catchKey) || [];
|
|
255
|
+
context = context.splice(context.length - 5).map(function (ctx) {
|
|
256
|
+
return {
|
|
257
|
+
role: ctx.role,
|
|
258
|
+
content: ctx.content
|
|
259
|
+
};
|
|
260
|
+
});
|
|
261
|
+
return context;
|
|
87
262
|
}; // 消息插入上下文中
|
|
88
263
|
|
|
89
264
|
|
|
90
|
-
this.insertMessage2Context = function (
|
|
265
|
+
this.insertMessage2Context = function (messageObj, role) {
|
|
91
266
|
if (role === void 0) {
|
|
92
267
|
role = roleMap.USER;
|
|
93
268
|
}
|
|
94
269
|
|
|
95
270
|
var messages = (0, _storeUtil.getSessionStore)(catchKey) || [];
|
|
96
|
-
messages.push({
|
|
97
|
-
content: message,
|
|
271
|
+
messages.push(__assign({
|
|
98
272
|
role: role
|
|
99
|
-
});
|
|
273
|
+
}, messageObj));
|
|
100
274
|
(0, _storeUtil.setSessionStore)(catchKey, messages);
|
|
101
275
|
}; // 发送消息
|
|
102
276
|
|
|
103
277
|
|
|
104
|
-
this.sendMessage = function (
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
278
|
+
this.sendMessage = function (messageObj) {
|
|
279
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
280
|
+
var messages, newMessages;
|
|
281
|
+
|
|
282
|
+
var _this = this;
|
|
283
|
+
|
|
284
|
+
return __generator(this, function (_a) {
|
|
285
|
+
switch (_a.label) {
|
|
286
|
+
case 0:
|
|
287
|
+
if (!messageObj.content) {
|
|
288
|
+
return [2
|
|
289
|
+
/*return*/
|
|
290
|
+
];
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
this.isGenerating = true;
|
|
294
|
+
this.insertMessage2Context(messageObj);
|
|
295
|
+
messages = this.getSendContext();
|
|
296
|
+
return [4
|
|
297
|
+
/*yield*/
|
|
298
|
+
, this.initChatConnect()];
|
|
299
|
+
|
|
300
|
+
case 1:
|
|
301
|
+
_a.sent();
|
|
302
|
+
|
|
303
|
+
newMessages = messages.splice(messages.length - 5);
|
|
304
|
+
setTimeout(function () {
|
|
305
|
+
(0, _commonUtil.commonFetch)('/designer/v1/ai/stream-chat-completion', {
|
|
306
|
+
clientId: _this.clientId,
|
|
307
|
+
messages: newMessages
|
|
308
|
+
}, 'POST');
|
|
309
|
+
}, 200);
|
|
310
|
+
return [2
|
|
311
|
+
/*return*/
|
|
312
|
+
];
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
});
|
|
124
316
|
}; // 重新生成
|
|
125
317
|
|
|
126
318
|
|
|
@@ -139,7 +331,8 @@ function () {
|
|
|
139
331
|
|
|
140
332
|
_this.initChatConnect();
|
|
141
333
|
|
|
142
|
-
var newMessages =
|
|
334
|
+
var newMessages = _this.getSendContext();
|
|
335
|
+
|
|
143
336
|
setTimeout(function () {
|
|
144
337
|
(0, _commonUtil.commonFetch)('/designer/v1/ai/stream-chat-completion', {
|
|
145
338
|
clientId: _this.clientId,
|