@fonixtree/magic-design 0.1.76 → 0.1.78
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/magic-box-iconfont.css +23 -3
- package/es/assets/fonts/magic-box-iconfont.css.bak +23 -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/layout-icon/imageTextLeft.svg +6 -0
- package/es/assets/images/layout-icon/imageTextRight.svg +6 -0
- package/es/assets/images/layout-icon/locationLayout.png +0 -0
- package/es/assets/less/modal.less +1 -1
- package/es/common/ColorPicker/index.js +4 -1
- package/es/common/Field/index.js +20 -3
- package/es/common/ImageLazy/index.js +172 -0
- package/es/common/ImageLazy/index.less +0 -0
- package/es/common/ImagePicker/index.js +50 -5
- package/es/common/ImagePicker/index.less +1 -0
- package/es/common/LinkModal/BundleCampaign/index.js +2 -2
- package/es/common/LinkModal/CatgTable/index.js +1 -1
- package/es/common/LinkModal/CouponTable/index.js +10 -2
- package/es/common/LinkModal/FilteredProductModal/index.js +12 -9
- package/es/common/LinkModal/FilteredProductModal/index.less +1 -1
- package/es/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/es/common/LinkModal/index.js +1 -1
- package/es/common/ProductModal/index.js +25 -32
- package/es/common/Video/index.js +11 -3
- package/es/common/Video/index.less +11 -7
- package/es/composite-comp/bol/components/Banner/mobile/index.js +6 -0
- package/es/composite-comp/bol/components/Carousel/index.js +27 -3
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +11 -20
- package/es/composite-comp/bol/components/Carousel/pc/index.js +4 -2
- package/es/composite-comp/bol/components/CustomCode/defaultJSON.js +39 -0
- package/es/composite-comp/bol/components/CustomCode/index.js +138 -0
- package/es/composite-comp/bol/components/ImageText/pc/index.js +95 -3
- package/es/composite-comp/bol/components/ImageText/pc/index.less +32 -0
- package/es/composite-comp/bol/components/Location/defaultJSON.js +60 -0
- package/es/composite-comp/bol/components/Location/index.js +100 -0
- package/es/composite-comp/bol/components/Location/index.less +15 -0
- package/es/composite-comp/bol/components/Video/defaultJSON.js +24 -0
- package/es/composite-comp/bol/config-panels/CustomCodeConfig/MyEditor/index.js +42 -0
- package/es/composite-comp/bol/config-panels/CustomCodeConfig/index.js +111 -0
- package/es/composite-comp/bol/config-panels/LocationConfig/index.js +149 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +182 -2
- package/es/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +114 -2
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +113 -2
- package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +53 -2
- package/es/composite-comp/common/components/ProductItem/index.js +8 -4
- package/es/composite-comp/common/components/ProductItem/index.less +30 -15
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +16 -3
- package/es/composite-comp/dito/components/Recommend/pc/index.js +2 -1
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +8 -0
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +67 -7
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +2 -2
- package/es/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +46 -37
- package/es/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
- package/es/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +39 -9
- package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
- package/es/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
- package/es/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +68 -1
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +4 -4
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
- package/es/constants/component-types.js +10 -2
- package/es/constants/index.js +10 -1
- package/es/constants/layout.js +21 -1
- package/es/core/Designer/AiImageGenerator/GenerateSize/index.js +6 -6
- package/es/core/Designer/AiImageGenerator/History/index.js +147 -0
- package/es/core/Designer/AiImageGenerator/History/index.less +75 -0
- package/es/core/Designer/AiImageGenerator/NumberSlider/index.js +31 -0
- package/es/core/Designer/AiImageGenerator/NumberSlider/index.less +8 -0
- package/es/core/Designer/AiImageGenerator/UploadReference/index.js +18 -8
- package/es/core/Designer/AiImageGenerator/UploadReference/index.less +6 -0
- package/es/core/Designer/AiImageGenerator/index.js +364 -63
- package/es/core/Designer/AiImageGenerator/index.less +70 -46
- package/es/core/Designer/ChatRobot/index.js +51 -14
- package/es/core/Designer/ChatRobot/index.less +11 -0
- package/es/core/Designer/ConfigPanel/index.js +2 -1
- package/es/core/Designer/FonixtreeGpt/index.js +32 -171
- package/es/core/Designer/LeftTitle/index.js +1 -1
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.js +96 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.js +101 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.less +60 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/CircleSVG.js +52 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/InitialSVG.js +51 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/SquareSVG.js +58 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +96 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +105 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.js +93 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.js +133 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.less +60 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/CJLDecimalSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/DecimalSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerAlphaSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerRomanSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperAlphaSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperRomanSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +105 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/BackgroundSVG.js +29 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/BoldSVG.js +29 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/FontColorSVG.js +49 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/ItalicSVG.js +29 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/LinkSVG.js +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/OrderSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/StrikeSVG.js +31 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/UnderlineSVG.js +36 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/UnorderSVG.js +41 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/index.js +151 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/index.less +25 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/type.js +1 -0
- package/es/core/Designer/ToolBarModal/index.js +366 -0
- package/es/core/Designer/ToolBarModal/index.less +32 -0
- package/es/core/Designer/index.js +33 -10
- package/es/core/Renderer/index.js +20 -21
- package/es/decorator/index.js +38 -1
- package/es/decorator/lazyLoadDecorator.js +75 -0
- package/es/locale/en/en.json +6 -1
- package/es/locale/es/es.json +6 -1
- package/es/locale/id/id.json +6 -1
- package/es/meta-comp/components/Button/index.js +7 -0
- package/es/meta-comp/components/Image/index.js +19 -3
- package/es/meta-comp/components/Text/formats/fontFamily.js +58 -0
- package/es/meta-comp/components/Text/formats/fontStyle.js +58 -0
- package/es/meta-comp/components/Text/formats/fontWeight.js +58 -0
- package/es/meta-comp/components/Text/formats/listStyleTypeStyle.js +58 -0
- package/es/meta-comp/components/Text/formats/textDecorationColor.js +58 -0
- package/es/meta-comp/components/Text/formats/textDecorationStyle.js +58 -0
- package/es/meta-comp/components/Text/index.js +110 -372
- package/es/meta-comp/components/Text/index.less +57 -0
- package/es/meta-comp/config-panels/ButtonConfig/index.js +30 -28
- package/es/meta-comp/config-panels/ImageConfig/index.js +3 -1
- package/es/meta-comp/config-panels/TextConfig/TextEditModal/index.js +100 -0
- package/es/meta-comp/config-panels/TextConfig/TextEditModal/index.less +25 -0
- package/es/meta-comp/config-panels/TextConfig/UnderlineSelect/index.js +108 -0
- package/es/meta-comp/config-panels/TextConfig/UnderlineSelect/index.less +26 -0
- package/es/meta-comp/config-panels/TextConfig/index.js +9 -30
- package/es/meta-comp/config-panels/TextConfig/index.less +12 -16
- package/es/mobx/Frame.js +7 -1
- package/es/utils/androidUtil.js +6 -0
- package/es/utils/commonUtil.js +35 -7
- package/es/utils/coreUtil.js +15 -0
- package/es/utils/currencyUtil.js +29 -10
- package/lib/assets/fonts/magic-box-iconfont.css +23 -3
- package/lib/assets/fonts/magic-box-iconfont.css.bak +23 -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/layout-icon/imageTextLeft.svg +6 -0
- package/lib/assets/images/layout-icon/imageTextRight.svg +6 -0
- package/lib/assets/images/layout-icon/locationLayout.png +0 -0
- package/lib/assets/less/modal.less +1 -1
- package/lib/common/ColorPicker/index.js +4 -1
- package/lib/common/Field/index.js +20 -3
- package/lib/common/ImageLazy/index.js +172 -0
- package/lib/common/ImageLazy/index.less +0 -0
- package/lib/common/ImagePicker/index.js +50 -5
- package/lib/common/ImagePicker/index.less +1 -0
- package/lib/common/LinkModal/BundleCampaign/index.js +2 -2
- package/lib/common/LinkModal/CatgTable/index.js +1 -1
- package/lib/common/LinkModal/CouponTable/index.js +10 -2
- package/lib/common/LinkModal/FilteredProductModal/index.js +12 -9
- package/lib/common/LinkModal/FilteredProductModal/index.less +1 -1
- package/lib/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/lib/common/LinkModal/index.js +1 -1
- package/lib/common/ProductModal/index.js +25 -32
- package/lib/common/Video/index.js +11 -3
- package/lib/common/Video/index.less +11 -7
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +6 -0
- package/lib/composite-comp/bol/components/Carousel/index.js +27 -3
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +11 -20
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +4 -2
- package/lib/composite-comp/bol/components/CustomCode/defaultJSON.js +39 -0
- package/lib/composite-comp/bol/components/CustomCode/index.js +138 -0
- package/lib/composite-comp/bol/components/ImageText/pc/index.js +95 -3
- package/lib/composite-comp/bol/components/ImageText/pc/index.less +32 -0
- package/lib/composite-comp/bol/components/Location/defaultJSON.js +60 -0
- package/lib/composite-comp/bol/components/Location/index.js +100 -0
- package/lib/composite-comp/bol/components/Location/index.less +15 -0
- package/lib/composite-comp/bol/components/Video/defaultJSON.js +24 -0
- package/lib/composite-comp/bol/config-panels/CustomCodeConfig/MyEditor/index.js +42 -0
- package/lib/composite-comp/bol/config-panels/CustomCodeConfig/index.js +111 -0
- package/lib/composite-comp/bol/config-panels/LocationConfig/index.js +149 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +182 -2
- package/lib/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +114 -2
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +113 -2
- package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +53 -2
- package/lib/composite-comp/common/components/ProductItem/index.js +8 -4
- package/lib/composite-comp/common/components/ProductItem/index.less +30 -15
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +16 -3
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +2 -1
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +8 -0
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +67 -7
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +2 -2
- package/lib/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +46 -37
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
- package/lib/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +39 -9
- package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
- package/lib/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
- package/lib/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +68 -1
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +4 -4
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
- package/lib/constants/component-types.js +10 -2
- package/lib/constants/index.js +10 -1
- package/lib/constants/layout.js +21 -1
- package/lib/core/Designer/AiImageGenerator/GenerateSize/index.js +6 -6
- package/lib/core/Designer/AiImageGenerator/History/index.js +147 -0
- package/lib/core/Designer/AiImageGenerator/History/index.less +75 -0
- package/lib/core/Designer/AiImageGenerator/NumberSlider/index.js +31 -0
- package/lib/core/Designer/AiImageGenerator/NumberSlider/index.less +8 -0
- package/lib/core/Designer/AiImageGenerator/UploadReference/index.js +18 -8
- package/lib/core/Designer/AiImageGenerator/UploadReference/index.less +6 -0
- package/lib/core/Designer/AiImageGenerator/index.js +364 -63
- package/lib/core/Designer/AiImageGenerator/index.less +70 -46
- package/lib/core/Designer/ChatRobot/index.js +51 -14
- package/lib/core/Designer/ChatRobot/index.less +11 -0
- package/lib/core/Designer/ConfigPanel/index.js +2 -1
- package/lib/core/Designer/FonixtreeGpt/index.js +32 -171
- package/lib/core/Designer/LeftTitle/index.js +1 -1
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.js +96 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.js +101 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.less +60 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/CircleSVG.js +52 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/InitialSVG.js +51 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/SquareSVG.js +58 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +96 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +105 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.js +93 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.js +133 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.less +60 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/CJLDecimalSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/DecimalSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerAlphaSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerRomanSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperAlphaSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperRomanSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +105 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/BackgroundSVG.js +29 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/BoldSVG.js +29 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/FontColorSVG.js +49 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/ItalicSVG.js +29 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/LinkSVG.js +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/OrderSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/StrikeSVG.js +31 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/UnderlineSVG.js +36 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/UnorderSVG.js +41 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.js +151 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.less +25 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/type.js +1 -0
- package/lib/core/Designer/ToolBarModal/index.js +366 -0
- package/lib/core/Designer/ToolBarModal/index.less +32 -0
- package/lib/core/Designer/index.js +33 -10
- package/lib/core/Renderer/index.js +20 -21
- package/lib/decorator/index.js +38 -1
- package/lib/decorator/lazyLoadDecorator.js +75 -0
- package/lib/locale/en/en.json +6 -1
- package/lib/locale/es/es.json +6 -1
- package/lib/locale/id/id.json +6 -1
- package/lib/meta-comp/components/Button/index.js +7 -0
- package/lib/meta-comp/components/Image/index.js +19 -3
- package/lib/meta-comp/components/Text/formats/fontFamily.js +58 -0
- package/lib/meta-comp/components/Text/formats/fontStyle.js +58 -0
- package/lib/meta-comp/components/Text/formats/fontWeight.js +58 -0
- package/lib/meta-comp/components/Text/formats/listStyleTypeStyle.js +58 -0
- package/lib/meta-comp/components/Text/formats/textDecorationColor.js +58 -0
- package/lib/meta-comp/components/Text/formats/textDecorationStyle.js +58 -0
- package/lib/meta-comp/components/Text/index.js +110 -372
- package/lib/meta-comp/components/Text/index.less +57 -0
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +30 -28
- package/lib/meta-comp/config-panels/ImageConfig/index.js +3 -1
- package/lib/meta-comp/config-panels/TextConfig/TextEditModal/index.js +100 -0
- package/lib/meta-comp/config-panels/TextConfig/TextEditModal/index.less +25 -0
- package/lib/meta-comp/config-panels/TextConfig/UnderlineSelect/index.js +108 -0
- package/lib/meta-comp/config-panels/TextConfig/UnderlineSelect/index.less +26 -0
- package/lib/meta-comp/config-panels/TextConfig/index.js +9 -30
- package/lib/meta-comp/config-panels/TextConfig/index.less +12 -16
- package/lib/mobx/Frame.js +7 -1
- package/lib/utils/androidUtil.js +6 -0
- package/lib/utils/commonUtil.js +35 -7
- package/lib/utils/coreUtil.js +15 -0
- package/lib/utils/currencyUtil.js +29 -10
- package/package.json +5 -2
|
@@ -11,20 +11,28 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _antd = require("antd");
|
|
13
13
|
|
|
14
|
+
var _uuid = require("uuid");
|
|
15
|
+
|
|
14
16
|
var _GenerateSize = _interopRequireDefault(require("./GenerateSize"));
|
|
15
17
|
|
|
16
18
|
var _GenerateArtist = _interopRequireDefault(require("./GenerateArtist"));
|
|
17
19
|
|
|
18
20
|
var _UploadReference = _interopRequireDefault(require("./UploadReference"));
|
|
19
21
|
|
|
22
|
+
var _NumberSlider = _interopRequireDefault(require("./NumberSlider"));
|
|
23
|
+
|
|
24
|
+
var _History = _interopRequireDefault(require("./History"));
|
|
25
|
+
|
|
20
26
|
var _nodata = _interopRequireDefault(require("./images/nodata.png"));
|
|
21
27
|
|
|
22
28
|
var _common = require("../../../common");
|
|
23
29
|
|
|
24
|
-
var _mobx = require("../../../mobx");
|
|
25
|
-
|
|
26
30
|
var _commonUtil = require("../../../utils/commonUtil");
|
|
27
31
|
|
|
32
|
+
var _storeUtil = require("../../../utils/storeUtil");
|
|
33
|
+
|
|
34
|
+
var _constants = require("../../../constants");
|
|
35
|
+
|
|
28
36
|
require("./index.less");
|
|
29
37
|
|
|
30
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -59,6 +67,22 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
59
67
|
};
|
|
60
68
|
}();
|
|
61
69
|
|
|
70
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
71
|
+
__assign = Object.assign || function (t) {
|
|
72
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
73
|
+
s = arguments[i];
|
|
74
|
+
|
|
75
|
+
for (var p in s) {
|
|
76
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return t;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return __assign.apply(this, arguments);
|
|
84
|
+
};
|
|
85
|
+
|
|
62
86
|
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
63
87
|
function adopt(value) {
|
|
64
88
|
return value instanceof P ? value : new P(function (resolve) {
|
|
@@ -214,13 +238,35 @@ function (_super) {
|
|
|
214
238
|
|
|
215
239
|
_this.state = {
|
|
216
240
|
loading: false,
|
|
217
|
-
|
|
218
|
-
|
|
241
|
+
selected: [],
|
|
242
|
+
prompt: '',
|
|
243
|
+
history: [],
|
|
244
|
+
hisCursor: 0
|
|
219
245
|
};
|
|
220
246
|
_this.formRef = /*#__PURE__*/_react["default"].createRef();
|
|
221
247
|
|
|
248
|
+
_this.onHisConfigClick = function () {};
|
|
249
|
+
|
|
250
|
+
_this.historyChange = function (newHis, newIndex) {
|
|
251
|
+
if (newIndex === void 0) {
|
|
252
|
+
newIndex = null;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
(0, _storeUtil.setSessionStore)(_constants.STORAGE_KEY.FONIXTREE_AI_IMG_HIS, newHis);
|
|
256
|
+
|
|
257
|
+
_this.setState({
|
|
258
|
+
history: newHis
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
if (newIndex !== null) {
|
|
262
|
+
_this.setState({
|
|
263
|
+
hisCursor: newIndex
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
|
|
222
268
|
_this.getColumnNum = function (num) {
|
|
223
|
-
if (num
|
|
269
|
+
if (num <= 1) {
|
|
224
270
|
return 1;
|
|
225
271
|
} else if (num > 1 && num <= 4) {
|
|
226
272
|
return 2;
|
|
@@ -230,42 +276,100 @@ function (_super) {
|
|
|
230
276
|
};
|
|
231
277
|
|
|
232
278
|
_this.onCloseDrawer = function () {
|
|
233
|
-
|
|
234
|
-
imgGenVisible: false
|
|
235
|
-
});
|
|
279
|
+
_this.props.onClose();
|
|
236
280
|
};
|
|
237
281
|
|
|
238
|
-
_this.
|
|
282
|
+
_this.onConfirm = function () {
|
|
283
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
284
|
+
var _a, history, hisCursor, selected, images, imageList, result;
|
|
285
|
+
|
|
286
|
+
return __generator(this, function (_b) {
|
|
287
|
+
switch (_b.label) {
|
|
288
|
+
case 0:
|
|
289
|
+
_a = this.state, history = _a.history, hisCursor = _a.hisCursor, selected = _a.selected;
|
|
290
|
+
|
|
291
|
+
if (!selected.length) {
|
|
292
|
+
return [2
|
|
293
|
+
/*return*/
|
|
294
|
+
];
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
images = history[hisCursor].images;
|
|
298
|
+
imageList = selected.map(function (sel) {
|
|
299
|
+
return images[sel];
|
|
300
|
+
});
|
|
301
|
+
return [4
|
|
302
|
+
/*yield*/
|
|
303
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/uploadImage', {
|
|
304
|
+
base64Images: imageList
|
|
305
|
+
}, 'POST')];
|
|
306
|
+
|
|
307
|
+
case 1:
|
|
308
|
+
result = _b.sent();
|
|
309
|
+
this.props.onConfirm(result[0]);
|
|
310
|
+
return [2
|
|
311
|
+
/*return*/
|
|
312
|
+
];
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
};
|
|
239
317
|
|
|
240
318
|
_this.onGenarate = function (prompt) {
|
|
241
319
|
return __awaiter(_this, void 0, void 0, function () {
|
|
242
|
-
var formVal, result, e_1;
|
|
320
|
+
var history, formVal, params, result, e_1;
|
|
243
321
|
return __generator(this, function (_a) {
|
|
244
322
|
switch (_a.label) {
|
|
245
323
|
case 0:
|
|
324
|
+
history = this.state.history;
|
|
325
|
+
|
|
326
|
+
if (!prompt) {
|
|
327
|
+
return [2
|
|
328
|
+
/*return*/
|
|
329
|
+
];
|
|
330
|
+
}
|
|
331
|
+
|
|
246
332
|
formVal = this.formRef.current.getFieldsValue(true);
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
333
|
+
params = {
|
|
334
|
+
prompt: prompt,
|
|
335
|
+
n: formVal.number || 1,
|
|
336
|
+
height: 256,
|
|
337
|
+
width: 256
|
|
338
|
+
};
|
|
250
339
|
_a.label = 1;
|
|
251
340
|
|
|
252
341
|
case 1:
|
|
253
342
|
_a.trys.push([1, 3,, 4]);
|
|
254
343
|
|
|
344
|
+
this.setState({
|
|
345
|
+
prompt: prompt,
|
|
346
|
+
loading: true
|
|
347
|
+
});
|
|
255
348
|
return [4
|
|
256
349
|
/*yield*/
|
|
257
|
-
, (0, _commonUtil.commonFetch)('/designer/v1/ai/create-image',
|
|
258
|
-
prompt: prompt,
|
|
259
|
-
n: formVal.number || 4,
|
|
260
|
-
height: 256,
|
|
261
|
-
width: 256
|
|
262
|
-
}, 'POST')];
|
|
350
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/ai/create-image', params, 'POST')];
|
|
263
351
|
|
|
264
352
|
case 2:
|
|
265
353
|
result = _a.sent();
|
|
354
|
+
|
|
355
|
+
if (!result || !result.imageList) {
|
|
356
|
+
this.setState({
|
|
357
|
+
loading: false
|
|
358
|
+
});
|
|
359
|
+
return [2
|
|
360
|
+
/*return*/
|
|
361
|
+
];
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
history.push({
|
|
365
|
+
key: (0, _uuid.v4)(),
|
|
366
|
+
images: result.imageList,
|
|
367
|
+
params: params
|
|
368
|
+
});
|
|
369
|
+
this.historyChange(history);
|
|
266
370
|
this.setState({
|
|
267
371
|
loading: false,
|
|
268
|
-
|
|
372
|
+
hisCursor: history.length - 1
|
|
269
373
|
});
|
|
270
374
|
return [3
|
|
271
375
|
/*break*/
|
|
@@ -289,29 +393,228 @@ function (_super) {
|
|
|
289
393
|
});
|
|
290
394
|
};
|
|
291
395
|
|
|
292
|
-
_this.
|
|
293
|
-
|
|
396
|
+
_this.onRegenerate = function () {
|
|
397
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
398
|
+
var _a, history, hisCursor, _b, params, key, result, e_2;
|
|
399
|
+
|
|
400
|
+
return __generator(this, function (_c) {
|
|
401
|
+
switch (_c.label) {
|
|
402
|
+
case 0:
|
|
403
|
+
_a = this.state, history = _a.history, hisCursor = _a.hisCursor;
|
|
404
|
+
_b = history[hisCursor], params = _b.params, key = _b.key;
|
|
405
|
+
_c.label = 1;
|
|
406
|
+
|
|
407
|
+
case 1:
|
|
408
|
+
_c.trys.push([1, 3,, 4]);
|
|
409
|
+
|
|
410
|
+
this.setState({
|
|
411
|
+
loading: true
|
|
412
|
+
});
|
|
413
|
+
return [4
|
|
414
|
+
/*yield*/
|
|
415
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/ai/create-image', params, 'POST')];
|
|
416
|
+
|
|
417
|
+
case 2:
|
|
418
|
+
result = _c.sent();
|
|
419
|
+
|
|
420
|
+
if (!result || !result.imageList) {
|
|
421
|
+
this.setState({
|
|
422
|
+
loading: false
|
|
423
|
+
});
|
|
424
|
+
return [2
|
|
425
|
+
/*return*/
|
|
426
|
+
];
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
history[hisCursor] = {
|
|
430
|
+
key: key,
|
|
431
|
+
images: result.imageList,
|
|
432
|
+
params: params
|
|
433
|
+
};
|
|
434
|
+
this.historyChange(history);
|
|
435
|
+
this.setState({
|
|
436
|
+
loading: false
|
|
437
|
+
});
|
|
438
|
+
return [3
|
|
439
|
+
/*break*/
|
|
440
|
+
, 4];
|
|
441
|
+
|
|
442
|
+
case 3:
|
|
443
|
+
e_2 = _c.sent();
|
|
444
|
+
this.setState({
|
|
445
|
+
loading: false
|
|
446
|
+
});
|
|
447
|
+
return [3
|
|
448
|
+
/*break*/
|
|
449
|
+
, 4];
|
|
450
|
+
|
|
451
|
+
case 4:
|
|
452
|
+
return [2
|
|
453
|
+
/*return*/
|
|
454
|
+
];
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
});
|
|
458
|
+
};
|
|
294
459
|
|
|
295
|
-
|
|
460
|
+
_this.getImageList = function (images) {
|
|
461
|
+
var selected = _this.state.selected;
|
|
462
|
+
return images.map(function (img, index) {
|
|
296
463
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
297
|
-
className: "
|
|
464
|
+
className: "aiImageItem"
|
|
298
465
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
299
466
|
alt: "",
|
|
300
467
|
src: img
|
|
301
|
-
})
|
|
468
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
469
|
+
className: "imgHandleBtnWrap"
|
|
470
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
471
|
+
className: "refreshBtnWrap"
|
|
472
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
473
|
+
color: "#232F46",
|
|
474
|
+
onClick: function onClick() {
|
|
475
|
+
return _this.onRefresh(index);
|
|
476
|
+
},
|
|
477
|
+
size: 16,
|
|
478
|
+
type: "icon-refresh"
|
|
479
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
480
|
+
className: "downloadBtnWrap"
|
|
481
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
482
|
+
color: "#232F46",
|
|
483
|
+
onClick: function onClick() {
|
|
484
|
+
return _this.onDownload(index);
|
|
485
|
+
},
|
|
486
|
+
size: 16,
|
|
487
|
+
type: "icon-download1"
|
|
488
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
489
|
+
className: "imgSelectBtnWrap"
|
|
490
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
491
|
+
color: "#2F54EB",
|
|
492
|
+
onClick: function onClick() {
|
|
493
|
+
return _this.onSelectClick(index);
|
|
494
|
+
},
|
|
495
|
+
size: 22,
|
|
496
|
+
style: {
|
|
497
|
+
cursor: 'pointer'
|
|
498
|
+
},
|
|
499
|
+
type: selected.includes(index) ? 'icon-select1' : 'icon-uncheck'
|
|
500
|
+
})));
|
|
302
501
|
});
|
|
303
502
|
};
|
|
304
503
|
|
|
305
|
-
|
|
306
|
-
|
|
504
|
+
_this.onRefresh = function (index) {
|
|
505
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
506
|
+
var _a, history, hisCursor, _b, images, params, result, e_3;
|
|
307
507
|
|
|
308
|
-
|
|
309
|
-
|
|
508
|
+
return __generator(this, function (_c) {
|
|
509
|
+
switch (_c.label) {
|
|
510
|
+
case 0:
|
|
511
|
+
_a = this.state, history = _a.history, hisCursor = _a.hisCursor;
|
|
512
|
+
_b = history[hisCursor], images = _b.images, params = _b.params;
|
|
513
|
+
_c.label = 1;
|
|
310
514
|
|
|
311
|
-
|
|
515
|
+
case 1:
|
|
516
|
+
_c.trys.push([1, 3,, 4]);
|
|
517
|
+
|
|
518
|
+
this.setState({
|
|
519
|
+
loading: true
|
|
520
|
+
});
|
|
521
|
+
return [4
|
|
522
|
+
/*yield*/
|
|
523
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/ai/create-image', __assign(__assign({}, params), {
|
|
524
|
+
n: 1
|
|
525
|
+
}), 'POST')];
|
|
526
|
+
|
|
527
|
+
case 2:
|
|
528
|
+
result = _c.sent();
|
|
529
|
+
|
|
530
|
+
if (!result || !result.imageList) {
|
|
531
|
+
this.setState({
|
|
532
|
+
loading: false
|
|
533
|
+
});
|
|
534
|
+
return [2
|
|
535
|
+
/*return*/
|
|
536
|
+
];
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
images[index] = result.imageList[0];
|
|
540
|
+
this.historyChange(history);
|
|
541
|
+
this.setState({
|
|
542
|
+
loading: false
|
|
543
|
+
});
|
|
544
|
+
return [3
|
|
545
|
+
/*break*/
|
|
546
|
+
, 4];
|
|
547
|
+
|
|
548
|
+
case 3:
|
|
549
|
+
e_3 = _c.sent();
|
|
550
|
+
this.setState({
|
|
551
|
+
loading: false
|
|
552
|
+
});
|
|
553
|
+
return [3
|
|
554
|
+
/*break*/
|
|
555
|
+
, 4];
|
|
556
|
+
|
|
557
|
+
case 4:
|
|
558
|
+
return [2
|
|
559
|
+
/*return*/
|
|
560
|
+
];
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
});
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
_this.onDownload = function (index) {
|
|
567
|
+
var _a = _this.state,
|
|
568
|
+
prompt = _a.prompt,
|
|
569
|
+
history = _a.history,
|
|
570
|
+
hisCursor = _a.hisCursor;
|
|
571
|
+
var images = history[hisCursor].images;
|
|
572
|
+
(0, _commonUtil.downloadBase64Image)(images[index], prompt + ".png");
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
_this.onSelectClick = function (index) {
|
|
576
|
+
var selected = _this.state.selected;
|
|
577
|
+
var single = _this.props.single; // 单选模式下,智能选中一个
|
|
578
|
+
|
|
579
|
+
if (single) {
|
|
580
|
+
_this.setState({
|
|
581
|
+
selected: [index]
|
|
582
|
+
});
|
|
583
|
+
|
|
584
|
+
return;
|
|
585
|
+
} // 多选模式,可以选择多个
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
if (selected.includes(index)) {
|
|
589
|
+
var newSelected = selected.filter(function (sel) {
|
|
590
|
+
return sel !== index;
|
|
591
|
+
});
|
|
592
|
+
|
|
593
|
+
_this.setState({
|
|
594
|
+
selected: newSelected
|
|
595
|
+
});
|
|
596
|
+
} else {
|
|
597
|
+
selected.push(index);
|
|
598
|
+
|
|
599
|
+
_this.setState({
|
|
600
|
+
selected: selected
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
_this.onHistoryClick = function (index) {
|
|
312
606
|
_this.setState({
|
|
313
|
-
|
|
607
|
+
hisCursor: index
|
|
314
608
|
});
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
return _this;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
AiImageGenerator.prototype.componentDidMount = function () {
|
|
615
|
+
var history = (0, _storeUtil.getSessionStore)(_constants.STORAGE_KEY.FONIXTREE_AI_IMG_HIS) || [];
|
|
616
|
+
this.setState({
|
|
617
|
+
history: history
|
|
315
618
|
});
|
|
316
619
|
};
|
|
317
620
|
|
|
@@ -321,9 +624,18 @@ function (_super) {
|
|
|
321
624
|
|
|
322
625
|
AiImageGenerator.prototype.render = function () {
|
|
323
626
|
var _a = this.state,
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
627
|
+
loading = _a.loading,
|
|
628
|
+
history = _a.history,
|
|
629
|
+
hisCursor = _a.hisCursor;
|
|
630
|
+
var visible = this.props.visible;
|
|
631
|
+
|
|
632
|
+
var _b = history[hisCursor] || {},
|
|
633
|
+
_c = _b.images,
|
|
634
|
+
images = _c === void 0 ? [] : _c,
|
|
635
|
+
_d = _b.key,
|
|
636
|
+
key = _d === void 0 ? '' : _d;
|
|
637
|
+
|
|
638
|
+
var columnNum = this.getColumnNum(images.length || []);
|
|
327
639
|
return /*#__PURE__*/_react["default"].createElement(_antd.Drawer, {
|
|
328
640
|
bodyStyle: {
|
|
329
641
|
padding: 16,
|
|
@@ -349,6 +661,7 @@ function (_super) {
|
|
|
349
661
|
type: "light"
|
|
350
662
|
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(_common.Button, {
|
|
351
663
|
className: "ml8",
|
|
664
|
+
onClick: this.onConfirm,
|
|
352
665
|
size: "small",
|
|
353
666
|
type: "primary"
|
|
354
667
|
}, "Confirm"))),
|
|
@@ -377,16 +690,7 @@ function (_super) {
|
|
|
377
690
|
}, /*#__PURE__*/_react["default"].createElement(_GenerateSize["default"], null)), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
378
691
|
label: "Number",
|
|
379
692
|
name: "number"
|
|
380
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.
|
|
381
|
-
className: "cylon-slider-sm",
|
|
382
|
-
defaultValue: 4,
|
|
383
|
-
max: 9,
|
|
384
|
-
min: 1,
|
|
385
|
-
step: 1,
|
|
386
|
-
tooltip: {
|
|
387
|
-
open: true
|
|
388
|
-
}
|
|
389
|
-
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
693
|
+
}, /*#__PURE__*/_react["default"].createElement(_NumberSlider["default"], null)), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
390
694
|
label: "Style",
|
|
391
695
|
name: "style"
|
|
392
696
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
@@ -404,19 +708,24 @@ function (_super) {
|
|
|
404
708
|
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
405
709
|
className: "middle_wrap"
|
|
406
710
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
407
|
-
className: "img_wrap"
|
|
408
|
-
|
|
711
|
+
className: "img_wrap",
|
|
712
|
+
style: {
|
|
713
|
+
gridTemplateColumns: "repeat(" + columnNum + ", 1fr)",
|
|
714
|
+
gridTemplateRows: "repeat(" + columnNum + ", 1fr)"
|
|
715
|
+
}
|
|
716
|
+
}, images.length > 0 ? this.getImageList(images) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
717
|
+
className: "noDataWrap"
|
|
718
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
409
719
|
alt: "",
|
|
410
720
|
className: "no_data",
|
|
411
721
|
src: _nodata["default"]
|
|
412
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
722
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
413
723
|
className: "btn_wrap"
|
|
414
724
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
415
725
|
className: "regenerate_btn",
|
|
416
|
-
onClick: this.
|
|
726
|
+
onClick: this.onRegenerate
|
|
417
727
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
418
728
|
color: "#232F46",
|
|
419
|
-
onClick: this.onCloseDrawer,
|
|
420
729
|
size: 16,
|
|
421
730
|
style: {
|
|
422
731
|
marginRight: 5
|
|
@@ -428,20 +737,12 @@ function (_super) {
|
|
|
428
737
|
enterButton: "Generate",
|
|
429
738
|
onSearch: this.onGenarate,
|
|
430
739
|
size: "large"
|
|
431
|
-
}))), /*#__PURE__*/_react["default"].createElement("
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
}, "History"), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
438
|
-
onClick: this.onHisConfigClick,
|
|
439
|
-
size: 20,
|
|
440
|
-
style: {
|
|
441
|
-
cursor: 'pointer'
|
|
442
|
-
},
|
|
443
|
-
type: "icon-setting1"
|
|
444
|
-
}))))));
|
|
740
|
+
}))), /*#__PURE__*/_react["default"].createElement(_History["default"], {
|
|
741
|
+
onChange: this.historyChange,
|
|
742
|
+
onClick: this.onHistoryClick,
|
|
743
|
+
selectKey: key,
|
|
744
|
+
source: history
|
|
745
|
+
}))));
|
|
445
746
|
};
|
|
446
747
|
|
|
447
748
|
return AiImageGenerator;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
.generate_drawer {
|
|
2
|
+
::-webkit-scrollbar {
|
|
3
|
+
width: 0;
|
|
4
|
+
height: 0;
|
|
5
|
+
}
|
|
2
6
|
.dialog_head {
|
|
3
7
|
display: flex;
|
|
4
8
|
align-items: center;
|
|
@@ -27,46 +31,78 @@
|
|
|
27
31
|
position: relative;
|
|
28
32
|
.img_wrap {
|
|
29
33
|
width: 492px;
|
|
30
|
-
height:
|
|
31
|
-
display:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
&:nth-child(2n - 1) {
|
|
45
|
-
margin-left: 0;
|
|
46
|
-
}
|
|
34
|
+
height: 492px;
|
|
35
|
+
display: grid;
|
|
36
|
+
grid-template-columns: repeat(2, 1fr);
|
|
37
|
+
grid-template-rows: repeat(2, 1fr);
|
|
38
|
+
grid-gap: 12px;
|
|
39
|
+
margin: 0 auto;
|
|
40
|
+
|
|
41
|
+
.aiImageItem {
|
|
42
|
+
position: relative;
|
|
43
|
+
background-color: #ccc;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
font-size: 24px;
|
|
47
48
|
img {
|
|
48
|
-
|
|
49
|
+
width: 100%;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
.imgHandleBtnWrap {
|
|
52
|
+
display: flex;
|
|
53
|
+
position: absolute;
|
|
54
|
+
bottom: 12px;
|
|
55
|
+
right: 12px;
|
|
56
|
+
.refreshBtnWrap {
|
|
57
|
+
background-color: #FFF;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
height: 28px;
|
|
60
|
+
width: 28px;
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
border-radius: 50%;
|
|
65
|
+
border: 1px solid #D2D9E5;
|
|
66
|
+
}
|
|
67
|
+
.downloadBtnWrap {
|
|
68
|
+
background-color: #FFF;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
height: 28px;
|
|
71
|
+
width: 28px;
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
margin-left: 12px;
|
|
76
|
+
border-radius: 50%;
|
|
77
|
+
border: 1px solid #D2D9E5;
|
|
78
|
+
}
|
|
60
79
|
}
|
|
61
|
-
|
|
62
|
-
|
|
80
|
+
.imgSelectBtnWrap {
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 12px;
|
|
83
|
+
right: 12px;
|
|
84
|
+
border-radius: 50%;
|
|
85
|
+
height: 19px;
|
|
86
|
+
width: 19px;
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
align-items: center;
|
|
90
|
+
background: #FFF;
|
|
91
|
+
|
|
63
92
|
}
|
|
64
93
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
height:
|
|
68
|
-
|
|
94
|
+
.noDataWrap {
|
|
95
|
+
width: 100%;
|
|
96
|
+
height: 100%;
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
.no_data {
|
|
101
|
+
height: 183px;
|
|
102
|
+
width: 212px;
|
|
103
|
+
}
|
|
69
104
|
}
|
|
105
|
+
|
|
70
106
|
}
|
|
71
107
|
.btn_wrap {
|
|
72
108
|
margin-top: 40px;
|
|
@@ -96,17 +132,5 @@
|
|
|
96
132
|
}
|
|
97
133
|
}
|
|
98
134
|
}
|
|
99
|
-
.right_wrap {
|
|
100
|
-
overflow: scroll;
|
|
101
|
-
width: 132px;
|
|
102
|
-
min-height: 100%;
|
|
103
|
-
background-color: #FFF;
|
|
104
|
-
border-radius: 4px;
|
|
105
|
-
padding: 16px;
|
|
106
|
-
.right_header {
|
|
107
|
-
display: flex;
|
|
108
|
-
justify-content: space-between;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
135
|
}
|
|
112
136
|
}
|