@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,18 +11,18 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _antd = require("antd");
|
|
13
13
|
|
|
14
|
-
var _marked = require("marked");
|
|
15
|
-
|
|
16
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
15
|
|
|
18
16
|
var _CopyBtn = _interopRequireDefault(require("./components/CopyBtn"));
|
|
19
17
|
|
|
20
18
|
var _common = require("../../../common");
|
|
21
19
|
|
|
22
|
-
var _mobx = require("../../../mobx");
|
|
23
|
-
|
|
24
20
|
var _FonixtreeGpt = _interopRequireDefault(require("../FonixtreeGpt"));
|
|
25
21
|
|
|
22
|
+
var _AiImageGenerator = _interopRequireDefault(require("../AiImageGenerator"));
|
|
23
|
+
|
|
24
|
+
var _commonUtil = require("../../../utils/commonUtil");
|
|
25
|
+
|
|
26
26
|
require("./index.less");
|
|
27
27
|
|
|
28
28
|
require("./markdown.less");
|
|
@@ -71,12 +71,14 @@ function (_super) {
|
|
|
71
71
|
open: false,
|
|
72
72
|
message: '',
|
|
73
73
|
context: [],
|
|
74
|
-
isGenerating: false
|
|
74
|
+
isGenerating: false,
|
|
75
|
+
aiImageVisible: false,
|
|
76
|
+
loading: true
|
|
75
77
|
};
|
|
76
78
|
|
|
77
79
|
_this.scrollBottom = function () {
|
|
78
80
|
var container = document.getElementById('content_wrap');
|
|
79
|
-
container.scrollTop = container.scrollHeight;
|
|
81
|
+
container.scrollTop = container.scrollHeight + 50;
|
|
80
82
|
};
|
|
81
83
|
|
|
82
84
|
_this.onMessageChage = function (e) {
|
|
@@ -86,7 +88,7 @@ function (_super) {
|
|
|
86
88
|
};
|
|
87
89
|
|
|
88
90
|
_this.getMarkText = function (text) {
|
|
89
|
-
return
|
|
91
|
+
return marked.parse(text);
|
|
90
92
|
};
|
|
91
93
|
|
|
92
94
|
_this.onEnter = function () {
|
|
@@ -105,6 +107,8 @@ function (_super) {
|
|
|
105
107
|
isGenerating: true,
|
|
106
108
|
context: context,
|
|
107
109
|
message: ''
|
|
110
|
+
}, function () {
|
|
111
|
+
_this.scrollBottom();
|
|
108
112
|
});
|
|
109
113
|
};
|
|
110
114
|
|
|
@@ -139,13 +143,13 @@ function (_super) {
|
|
|
139
143
|
open: false
|
|
140
144
|
});
|
|
141
145
|
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
_this.setState({
|
|
147
|
+
aiImageVisible: true
|
|
144
148
|
});
|
|
145
149
|
};
|
|
146
150
|
|
|
147
151
|
_this.copyToClipboard = function (text) {
|
|
148
|
-
|
|
152
|
+
(0, _commonUtil.copy2ClipBoard)(text);
|
|
149
153
|
};
|
|
150
154
|
|
|
151
155
|
_this.chatGpt = new _FonixtreeGpt["default"]({
|
|
@@ -169,11 +173,17 @@ function (_super) {
|
|
|
169
173
|
}
|
|
170
174
|
|
|
171
175
|
ChatRobot.prototype.componentDidMount = function () {
|
|
172
|
-
this
|
|
176
|
+
var _this = this;
|
|
177
|
+
|
|
173
178
|
var context = this.chatGpt.getContext();
|
|
174
179
|
this.setState({
|
|
175
180
|
context: context
|
|
176
181
|
});
|
|
182
|
+
(0, _commonUtil.importAsync)('https://cdn.jsdelivr.net/npm/marked/marked.min.js').then(function () {
|
|
183
|
+
return _this.setState({
|
|
184
|
+
loading: false
|
|
185
|
+
});
|
|
186
|
+
});
|
|
177
187
|
};
|
|
178
188
|
|
|
179
189
|
ChatRobot.prototype.render = function () {
|
|
@@ -183,7 +193,14 @@ function (_super) {
|
|
|
183
193
|
context = _a.context,
|
|
184
194
|
message = _a.message,
|
|
185
195
|
open = _a.open,
|
|
186
|
-
isGenerating = _a.isGenerating
|
|
196
|
+
isGenerating = _a.isGenerating,
|
|
197
|
+
aiImageVisible = _a.aiImageVisible,
|
|
198
|
+
loading = _a.loading;
|
|
199
|
+
|
|
200
|
+
if (loading) {
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
|
|
187
204
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
188
205
|
className: "chat_wrap"
|
|
189
206
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -260,7 +277,15 @@ function (_super) {
|
|
|
260
277
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
261
278
|
className: "content_wrap markdown-body",
|
|
262
279
|
id: "content_wrap"
|
|
263
|
-
},
|
|
280
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
281
|
+
className: (0, _classnames["default"])('messageOuterWrap', {
|
|
282
|
+
assistantMessage: true
|
|
283
|
+
})
|
|
284
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
285
|
+
className: "messageWrap"
|
|
286
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
287
|
+
className: "messageContentWrap"
|
|
288
|
+
}, "What would like to create?"))), context.length > 0 && context.map(function (ctxNode) {
|
|
264
289
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
265
290
|
className: (0, _classnames["default"])('messageOuterWrap', {
|
|
266
291
|
userMessage: ctxNode.role === 'user',
|
|
@@ -296,7 +321,19 @@ function (_super) {
|
|
|
296
321
|
marginRight: 5
|
|
297
322
|
},
|
|
298
323
|
type: "icon-refresh"
|
|
299
|
-
}), "Regenerate Response")))
|
|
324
|
+
}), "Regenerate Response"))), /*#__PURE__*/_react["default"].createElement(_AiImageGenerator["default"], {
|
|
325
|
+
onClose: function onClose() {
|
|
326
|
+
return _this.setState({
|
|
327
|
+
aiImageVisible: false
|
|
328
|
+
});
|
|
329
|
+
},
|
|
330
|
+
onConfirm: function onConfirm() {
|
|
331
|
+
return _this.setState({
|
|
332
|
+
aiImageVisible: false
|
|
333
|
+
});
|
|
334
|
+
},
|
|
335
|
+
visible: aiImageVisible
|
|
336
|
+
}));
|
|
300
337
|
};
|
|
301
338
|
|
|
302
339
|
return ChatRobot;
|
|
@@ -43,6 +43,13 @@
|
|
|
43
43
|
font-size: 14px;
|
|
44
44
|
font-weight: 400;
|
|
45
45
|
line-height: 22px;
|
|
46
|
+
&::-webkit-scrollbar-track {
|
|
47
|
+
background: transparent;
|
|
48
|
+
}
|
|
49
|
+
&::-webkit-scrollbar-corner {
|
|
50
|
+
background:transparent;
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
.messageOuterWrap {
|
|
47
54
|
margin-bottom: 20px;
|
|
48
55
|
.messageWrap {
|
|
@@ -89,6 +96,9 @@
|
|
|
89
96
|
padding: 7px 14px;
|
|
90
97
|
background: #F5F6F7;
|
|
91
98
|
color: #232F46;
|
|
99
|
+
p {
|
|
100
|
+
margin-bottom: 0;
|
|
101
|
+
}
|
|
92
102
|
}
|
|
93
103
|
}
|
|
94
104
|
.regenerate_btn {
|
|
@@ -110,6 +120,7 @@
|
|
|
110
120
|
}
|
|
111
121
|
.dialog_bottom {
|
|
112
122
|
position: relative;
|
|
123
|
+
font-size: 14px;
|
|
113
124
|
input {
|
|
114
125
|
padding-right: 60px !important;
|
|
115
126
|
}
|
|
@@ -285,7 +285,8 @@ function (_super) {
|
|
|
285
285
|
if (panelProps) {
|
|
286
286
|
var instance = Clazz ? /*#__PURE__*/_react["default"].createElement(Clazz, {
|
|
287
287
|
panelProps: panelProps,
|
|
288
|
-
outputType: outputType
|
|
288
|
+
outputType: outputType,
|
|
289
|
+
parentNode: selectedNode
|
|
289
290
|
}) : null;
|
|
290
291
|
return instance;
|
|
291
292
|
}
|
|
@@ -11,149 +11,6 @@ var _commonUtil = require("../../../utils/commonUtil");
|
|
|
11
11
|
|
|
12
12
|
var _storeUtil = require("../../../utils/storeUtil");
|
|
13
13
|
|
|
14
|
-
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) {
|
|
16
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
17
|
-
resolve(value);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22
|
-
function fulfilled(value) {
|
|
23
|
-
try {
|
|
24
|
-
step(generator.next(value));
|
|
25
|
-
} catch (e) {
|
|
26
|
-
reject(e);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function rejected(value) {
|
|
31
|
-
try {
|
|
32
|
-
step(generator["throw"](value));
|
|
33
|
-
} catch (e) {
|
|
34
|
-
reject(e);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function step(result) {
|
|
39
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
47
|
-
var _ = {
|
|
48
|
-
label: 0,
|
|
49
|
-
sent: function sent() {
|
|
50
|
-
if (t[0] & 1) throw t[1];
|
|
51
|
-
return t[1];
|
|
52
|
-
},
|
|
53
|
-
trys: [],
|
|
54
|
-
ops: []
|
|
55
|
-
},
|
|
56
|
-
f,
|
|
57
|
-
y,
|
|
58
|
-
t,
|
|
59
|
-
g;
|
|
60
|
-
return g = {
|
|
61
|
-
next: verb(0),
|
|
62
|
-
"throw": verb(1),
|
|
63
|
-
"return": verb(2)
|
|
64
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
65
|
-
return this;
|
|
66
|
-
}), g;
|
|
67
|
-
|
|
68
|
-
function verb(n) {
|
|
69
|
-
return function (v) {
|
|
70
|
-
return step([n, v]);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function step(op) {
|
|
75
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
76
|
-
|
|
77
|
-
while (_) {
|
|
78
|
-
try {
|
|
79
|
-
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;
|
|
80
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
81
|
-
|
|
82
|
-
switch (op[0]) {
|
|
83
|
-
case 0:
|
|
84
|
-
case 1:
|
|
85
|
-
t = op;
|
|
86
|
-
break;
|
|
87
|
-
|
|
88
|
-
case 4:
|
|
89
|
-
_.label++;
|
|
90
|
-
return {
|
|
91
|
-
value: op[1],
|
|
92
|
-
done: false
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
case 5:
|
|
96
|
-
_.label++;
|
|
97
|
-
y = op[1];
|
|
98
|
-
op = [0];
|
|
99
|
-
continue;
|
|
100
|
-
|
|
101
|
-
case 7:
|
|
102
|
-
op = _.ops.pop();
|
|
103
|
-
|
|
104
|
-
_.trys.pop();
|
|
105
|
-
|
|
106
|
-
continue;
|
|
107
|
-
|
|
108
|
-
default:
|
|
109
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
110
|
-
_ = 0;
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
115
|
-
_.label = op[1];
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
120
|
-
_.label = t[1];
|
|
121
|
-
t = op;
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (t && _.label < t[2]) {
|
|
126
|
-
_.label = t[2];
|
|
127
|
-
|
|
128
|
-
_.ops.push(op);
|
|
129
|
-
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (t[2]) _.ops.pop();
|
|
134
|
-
|
|
135
|
-
_.trys.pop();
|
|
136
|
-
|
|
137
|
-
continue;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
op = body.call(thisArg, _);
|
|
141
|
-
} catch (e) {
|
|
142
|
-
op = [6, e];
|
|
143
|
-
y = 0;
|
|
144
|
-
} finally {
|
|
145
|
-
f = t = 0;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (op[0] & 5) throw op[1];
|
|
150
|
-
return {
|
|
151
|
-
value: op[0] ? op[1] : void 0,
|
|
152
|
-
done: true
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
|
|
157
14
|
// 角色
|
|
158
15
|
var roleMap = {
|
|
159
16
|
ASSISTANT: 'assistant',
|
|
@@ -173,9 +30,9 @@ function () {
|
|
|
173
30
|
|
|
174
31
|
this.isGenerating = false; // 初始化参数
|
|
175
32
|
|
|
176
|
-
this.initParams = {}; //
|
|
33
|
+
this.initParams = {}; // 建立连接
|
|
177
34
|
|
|
178
|
-
this.
|
|
35
|
+
this.initChatConnect = function () {
|
|
179
36
|
var _a = _this.initParams,
|
|
180
37
|
onMessage = _a.onMessage,
|
|
181
38
|
onEnd = _a.onEnd;
|
|
@@ -185,6 +42,7 @@ function () {
|
|
|
185
42
|
var eventSource = new EventSource("/designer/v1/ai/sse/create?clientId=" + _this.clientId);
|
|
186
43
|
|
|
187
44
|
eventSource.onopen = function (event) {
|
|
45
|
+
console.log('onOpen');
|
|
188
46
|
sse = event.target;
|
|
189
47
|
};
|
|
190
48
|
|
|
@@ -216,6 +74,9 @@ function () {
|
|
|
216
74
|
|
|
217
75
|
eventSource.onerror = function (event) {
|
|
218
76
|
console.log('onerror', event);
|
|
77
|
+
_this.isGenerating = false;
|
|
78
|
+
|
|
79
|
+
_this.regenerate();
|
|
219
80
|
};
|
|
220
81
|
}; // 获取chat上下文
|
|
221
82
|
|
|
@@ -241,28 +102,25 @@ function () {
|
|
|
241
102
|
|
|
242
103
|
|
|
243
104
|
this.sendMessage = function (message) {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
if (!message) {
|
|
248
|
-
return [2
|
|
249
|
-
/*return*/
|
|
250
|
-
];
|
|
251
|
-
}
|
|
105
|
+
if (!message) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
252
108
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
109
|
+
_this.isGenerating = true;
|
|
110
|
+
|
|
111
|
+
_this.insertMessage2Context(message);
|
|
112
|
+
|
|
113
|
+
var messages = _this.getContext();
|
|
114
|
+
|
|
115
|
+
_this.initChatConnect();
|
|
116
|
+
|
|
117
|
+
var newMessages = messages.splice(messages.length - 5);
|
|
118
|
+
setTimeout(function () {
|
|
119
|
+
(0, _commonUtil.commonFetch)('/designer/v1/ai/stream-chat-completion', {
|
|
120
|
+
clientId: _this.clientId,
|
|
121
|
+
messages: newMessages
|
|
122
|
+
}, 'POST');
|
|
123
|
+
}, 200);
|
|
266
124
|
}; // 重新生成
|
|
267
125
|
|
|
268
126
|
|
|
@@ -279,12 +137,15 @@ function () {
|
|
|
279
137
|
(0, _storeUtil.setSessionStore)(catchKey, messages);
|
|
280
138
|
}
|
|
281
139
|
|
|
282
|
-
(
|
|
283
|
-
clientId: _this.clientId,
|
|
284
|
-
messages: messages
|
|
285
|
-
}, 'POST');
|
|
140
|
+
_this.initChatConnect();
|
|
286
141
|
|
|
287
|
-
|
|
142
|
+
var newMessages = messages.splice(messages.length - 5);
|
|
143
|
+
setTimeout(function () {
|
|
144
|
+
(0, _commonUtil.commonFetch)('/designer/v1/ai/stream-chat-completion', {
|
|
145
|
+
clientId: _this.clientId,
|
|
146
|
+
messages: newMessages
|
|
147
|
+
}, 'POST');
|
|
148
|
+
}, 200);
|
|
288
149
|
}; // setSessionStore(catchKey, []);
|
|
289
150
|
|
|
290
151
|
|
package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _AlignLeftSVG = _interopRequireDefault(require("../images/AlignLeftSVG"));
|
|
13
|
+
|
|
14
|
+
var _AlignCenterSVG = _interopRequireDefault(require("../images/AlignCenterSVG"));
|
|
15
|
+
|
|
16
|
+
var _AlignRightSVG = _interopRequireDefault(require("../images/AlignRightSVG"));
|
|
17
|
+
|
|
18
|
+
require("./index.less");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
23
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
24
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
25
|
+
__proto__: []
|
|
26
|
+
} instanceof Array && function (d, b) {
|
|
27
|
+
d.__proto__ = b;
|
|
28
|
+
} || function (d, b) {
|
|
29
|
+
for (var p in b) {
|
|
30
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return _extendStatics(d, b);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return function (d, b) {
|
|
38
|
+
_extendStatics(d, b);
|
|
39
|
+
|
|
40
|
+
function __() {
|
|
41
|
+
this.constructor = d;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
45
|
+
};
|
|
46
|
+
}();
|
|
47
|
+
|
|
48
|
+
var AlignSelectPicker =
|
|
49
|
+
/** @class */
|
|
50
|
+
function (_super) {
|
|
51
|
+
__extends(AlignSelectPicker, _super);
|
|
52
|
+
|
|
53
|
+
function AlignSelectPicker() {
|
|
54
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
AlignSelectPicker.prototype.render = function () {
|
|
58
|
+
var _a = this.props,
|
|
59
|
+
visibility = _a.visibility,
|
|
60
|
+
value = _a.value,
|
|
61
|
+
_onChange = _a.onChange;
|
|
62
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
63
|
+
className: "align-select-picker-panel"
|
|
64
|
+
}, visibility && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
|
+
className: "panel-bg"
|
|
66
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
67
|
+
className: "select-modal-content"
|
|
68
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
69
|
+
className: (0, _classnames["default"])('select-item', {
|
|
70
|
+
active: value == 'left'
|
|
71
|
+
})
|
|
72
|
+
}, /*#__PURE__*/_react["default"].createElement(_AlignLeftSVG["default"], {
|
|
73
|
+
onChange: function onChange() {
|
|
74
|
+
return _onChange('');
|
|
75
|
+
}
|
|
76
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
77
|
+
className: (0, _classnames["default"])('select-item', {
|
|
78
|
+
active: value == 'center'
|
|
79
|
+
})
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement(_AlignCenterSVG["default"], {
|
|
81
|
+
onChange: function onChange() {
|
|
82
|
+
return _onChange('center');
|
|
83
|
+
}
|
|
84
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
|
+
className: (0, _classnames["default"])('select-item', {
|
|
86
|
+
active: value == 'right'
|
|
87
|
+
})
|
|
88
|
+
}, /*#__PURE__*/_react["default"].createElement(_AlignRightSVG["default"], {
|
|
89
|
+
onChange: function onChange() {
|
|
90
|
+
return _onChange('right');
|
|
91
|
+
}
|
|
92
|
+
})))));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
return AlignSelectPicker;
|
|
96
|
+
}(_react["default"].Component);
|
|
97
|
+
|
|
98
|
+
var _default = AlignSelectPicker;
|
|
99
|
+
exports["default"] = _default;
|
package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.align-select-picker-panel {
|
|
2
|
+
z-index: 999;
|
|
3
|
+
position: absolute;
|
|
4
|
+
top: 100%;
|
|
5
|
+
left: 0;
|
|
6
|
+
|
|
7
|
+
.panel-bg {
|
|
8
|
+
position: fixed;
|
|
9
|
+
z-index: 0;
|
|
10
|
+
top: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
right: 0;
|
|
13
|
+
bottom: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.select-modal-content {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
padding: 5px;
|
|
20
|
+
background-color: #fff;
|
|
21
|
+
border: 1px solid #E7E9E8;
|
|
22
|
+
box-shadow: 0 8px 16px 4px hsla(0, 0%, 0%, 0.04);
|
|
23
|
+
color: #262626;
|
|
24
|
+
border-radius: 6px;
|
|
25
|
+
|
|
26
|
+
.select-item {
|
|
27
|
+
width: 26px;
|
|
28
|
+
height: 26px;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
border-radius: 6px;
|
|
34
|
+
padding: 0;
|
|
35
|
+
border: none;
|
|
36
|
+
transition: .2s all linear;
|
|
37
|
+
position: relative;
|
|
38
|
+
margin: 0 5px;
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
background: #f8f8f8;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.active {
|
|
45
|
+
background: #E7E9E8;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
svg {
|
|
49
|
+
height: 18px;
|
|
50
|
+
height: 18px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var _default = function _default(_a) {
|
|
13
|
+
var onChange = _a.onChange;
|
|
14
|
+
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
15
|
+
id: "ne-t-alignment-center",
|
|
16
|
+
onClick: onChange,
|
|
17
|
+
viewBox: "0 0 256 256",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
19
|
+
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
fillRule: "nonzero"
|
|
22
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
23
|
+
d: "M181 148c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L181 168H76c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L76 148h105ZM218 89c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 109H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 89h180ZM181 30c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L181 50H76c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L76 30h105ZM218 207c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 227H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 207h180Z"
|
|
24
|
+
})));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var _default = function _default(_a) {
|
|
13
|
+
var onChange = _a.onChange;
|
|
14
|
+
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
15
|
+
id: "ne-t-alignment-left",
|
|
16
|
+
onClick: onChange,
|
|
17
|
+
viewBox: "0 0 256 256",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
19
|
+
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
fillRule: "nonzero"
|
|
22
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
23
|
+
d: "M143 148c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L143 168H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 148h105ZM218 89c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 109H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 89h180ZM143 30c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L143 50H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 30h105ZM218 207c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 227H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 207h180Z"
|
|
24
|
+
})));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var _default = function _default(_a) {
|
|
13
|
+
var onChange = _a.onChange;
|
|
14
|
+
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
15
|
+
id: "ne-t-alignment-right",
|
|
16
|
+
onClick: onChange,
|
|
17
|
+
viewBox: "0 0 256 256",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
19
|
+
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
fillRule: "nonzero"
|
|
22
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
23
|
+
d: "M218 148c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 168H113c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L113 148h105ZM218 89c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 109H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 89h180ZM218 30c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 50H113c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L113 30h105ZM218 207c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 227H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 207h180Z"
|
|
24
|
+
})));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports["default"] = _default;
|