@fonixtree/magic-design 1.0.4 → 1.0.6
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 +67 -3
- package/es/assets/fonts/magic-box-iconfont.css.bak +67 -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/slider.less +49 -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/ImageModal/index.js +35 -2
- package/es/common/ImagePicker/index.js +76 -12
- package/es/common/ImagePicker/index.less +1 -0
- package/es/common/LinkModal/AffiliateProductTable/index.js +348 -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 +5 -6
- package/es/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/es/common/LinkModal/index.js +6 -0
- package/es/common/ProductModal/index.js +2 -2
- package/es/common/Video/index.js +11 -3
- package/es/common/Video/index.less +11 -7
- package/es/composite-comp/bol/components/Banner/defaultJSON.js +1 -1
- package/es/composite-comp/bol/components/Banner/index.js +15 -1
- package/es/composite-comp/bol/components/Banner/mobile/index.js +1 -4
- package/es/composite-comp/bol/components/Banner/mobile/index.less +52 -78
- package/es/composite-comp/bol/components/Banner/pc/index.js +1 -4
- package/es/composite-comp/bol/components/Button/index.js +3 -4
- package/es/composite-comp/bol/components/Carousel/index.js +27 -3
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +12 -24
- package/es/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
- package/es/composite-comp/bol/components/Carousel/pc/index.js +5 -6
- 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/ImageGallery/mobile/index.js +1 -4
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
- package/es/composite-comp/bol/components/ImageGallery/pc/index.js +3 -4
- package/es/composite-comp/bol/components/ImageText/defaultJSON.js +11 -2
- package/es/composite-comp/bol/components/ImageText/mobile/index.js +1 -4
- package/es/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
- package/es/composite-comp/bol/components/ImageText/pc/index.js +98 -7
- 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/Newsletter/index.js +1 -4
- package/es/composite-comp/bol/components/Tag/index.js +3 -4
- package/es/composite-comp/bol/components/Text/index.js +3 -4
- package/es/composite-comp/bol/components/Video/components/VideoTag/index.js +49 -10
- package/es/composite-comp/bol/components/Video/components/VideoTag/index.less +5 -5
- package/es/composite-comp/bol/components/Video/defaultJSON.js +10 -0
- package/es/composite-comp/bol/components/Video/index.js +23 -1
- package/es/composite-comp/bol/components/Video/mobile/Layout1/index.js +9 -12
- package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
- package/es/composite-comp/bol/components/Video/mobile/Layout2/index.js +8 -11
- package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
- package/es/composite-comp/bol/components/Video/mobile/Layout3/index.js +9 -11
- package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -50
- package/es/composite-comp/bol/components/Video/mobile/index.js +8 -49
- package/es/composite-comp/bol/components/Video/mobile/index.less +2 -3
- package/es/composite-comp/bol/components/Video/pc/Layout1/index.js +9 -12
- package/es/composite-comp/bol/components/Video/pc/Layout1/index.less +2 -2
- package/es/composite-comp/bol/components/Video/pc/Layout2/index.js +15 -16
- package/es/composite-comp/bol/components/Video/pc/Layout2/index.less +4 -4
- package/es/composite-comp/bol/components/Video/pc/Layout3/index.js +8 -11
- package/es/composite-comp/bol/components/Video/pc/Layout3/index.less +2 -2
- package/es/composite-comp/bol/components/Video/pc/Layout4/index.js +9 -12
- package/es/composite-comp/bol/components/Video/pc/Layout4/index.less +5 -4
- package/es/composite-comp/bol/components/Video/pc/Layout5/index.js +9 -12
- package/es/composite-comp/bol/components/Video/pc/Layout5/index.less +12 -10
- package/es/composite-comp/bol/components/Wallet/mobile/index.js +1 -4
- package/es/composite-comp/bol/components/Wallet/mobile/index.less +27 -40
- package/es/composite-comp/bol/components/Wallet/pc/index.js +1 -4
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +4 -0
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
- 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/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +1 -1
- package/es/composite-comp/bol/config-panels/LocationConfig/index.js +149 -0
- package/es/composite-comp/bol/config-panels/VideoConfig/VideoShareConfig/index.js +12 -2
- package/es/composite-comp/bol/config-panels/VideoConfig/index.js +3 -1
- 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 +64 -3
- package/es/composite-comp/common/config-panels/BackgroundConfig/index.js +12 -2
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +5 -3
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +2 -1
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
- 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/mobile/index.less +45 -52
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +2 -2
- package/es/composite-comp/dito/components/SignBoard/defaultJSON.js +21 -37
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +35 -24
- package/es/composite-comp/dito/components/SignBoard/mobile/index.less +71 -80
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +39 -9
- package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +0 -48
- 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 +1 -1
- package/es/constants/component-types.js +10 -2
- package/es/constants/index.js +12 -2
- package/es/constants/layout.js +21 -1
- package/es/core/Designer/AiImageGenerator/GenerateArtist/images/back1.png +0 -0
- package/es/core/Designer/AiImageGenerator/GenerateArtist/images/back2.png +0 -0
- package/es/core/Designer/AiImageGenerator/GenerateArtist/images/back3.png +0 -0
- package/es/core/Designer/AiImageGenerator/GenerateArtist/images/back4.png +0 -0
- package/es/core/Designer/AiImageGenerator/GenerateArtist/index.js +72 -0
- package/es/core/Designer/AiImageGenerator/GenerateArtist/index.less +41 -0
- package/es/core/Designer/AiImageGenerator/GenerateSize/index.js +43 -0
- package/es/core/Designer/AiImageGenerator/GenerateSize/index.less +3 -0
- 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 +55 -0
- package/es/core/Designer/AiImageGenerator/UploadReference/index.less +45 -0
- package/es/core/Designer/AiImageGenerator/images/nodata.png +0 -0
- package/es/core/Designer/AiImageGenerator/index.js +752 -0
- package/es/core/Designer/AiImageGenerator/index.less +136 -0
- package/es/core/Designer/ChatRobot/components/CopyBtn/index.js +49 -0
- package/es/core/Designer/ChatRobot/components/CopyBtn/index.less +0 -0
- package/es/core/Designer/ChatRobot/index.js +343 -0
- package/es/core/Designer/ChatRobot/index.less +138 -0
- package/es/core/Designer/ChatRobot/markdown.less +1 -0
- package/es/core/Designer/ConfigPanel/index.js +2 -1
- package/es/core/Designer/FonixtreeGpt/index.js +160 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +96 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +26 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +101 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +26 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +93 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +26 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +27 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +29 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +49 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +29 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +26 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +27 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +31 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +34 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +41 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +136 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +25 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +1 -0
- package/es/core/Designer/TextEditModal/ToolBar/index.js +219 -0
- package/es/core/Designer/TextEditModal/ToolBar/index.less +19 -0
- package/es/core/Designer/TextEditModal/index.js +100 -0
- package/es/core/Designer/TextEditModal/index.less +4 -0
- package/es/core/Designer/TextEditModal_old/index.js +142 -0
- package/es/core/Designer/TextEditModal_old/index.less +25 -0
- 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 +354 -0
- package/es/core/Designer/ToolBarModal/index.less +32 -0
- package/es/core/Designer/index.js +56 -15
- package/es/decorator/index.js +14 -0
- package/es/decorator/lazyLoadDecorator.js +75 -0
- package/es/decorator/metaDecorator.js +1 -1
- package/es/locale/en/en.json +10 -0
- package/es/locale/es/es.json +10 -0
- package/es/locale/id/id.json +10 -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/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 +103 -374
- package/es/meta-comp/components/Text/index.less +57 -0
- package/es/meta-comp/config-panels/ImageConfig/index.js +35 -12
- package/es/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/dark-playicon-01.svg +4 -0
- package/es/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/dark-playicon-02.svg +4 -0
- package/es/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/dark-playicon-03.svg +4 -0
- package/es/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/dark-playicon-04.svg +4 -0
- package/es/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/dark-playicon-05.svg +3 -0
- package/es/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/light-playicon-01.svg +4 -0
- package/es/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/light-playicon-02.svg +4 -0
- package/es/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/light-playicon-03.svg +4 -0
- package/es/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/light-playicon-04.svg +4 -0
- package/es/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/light-playicon-05.svg +3 -0
- package/es/meta-comp/config-panels/PlayIconConfig/PlaySvg/index.js +63 -0
- package/es/meta-comp/config-panels/PlayIconConfig/index.js +211 -0
- package/es/meta-comp/config-panels/PlayIconConfig/index.less +37 -2
- 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 +14 -31
- package/es/meta-comp/config-panels/TextConfig/index.less +12 -16
- package/es/mobx/Frame.js +7 -1
- package/es/mobx/Store.js +3 -0
- package/es/utils/androidUtil.js +8 -1
- package/es/utils/businessUtil.js +13 -0
- package/es/utils/commonUtil.js +156 -34
- package/es/utils/coreUtil.js +18 -4
- package/lib/assets/fonts/magic-box-iconfont.css +67 -3
- package/lib/assets/fonts/magic-box-iconfont.css.bak +67 -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/slider.less +49 -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/ImageModal/index.js +35 -2
- package/lib/common/ImagePicker/index.js +76 -12
- package/lib/common/ImagePicker/index.less +1 -0
- package/lib/common/LinkModal/AffiliateProductTable/index.js +348 -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 +5 -6
- package/lib/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/lib/common/LinkModal/index.js +6 -0
- package/lib/common/ProductModal/index.js +2 -2
- package/lib/common/Video/index.js +11 -3
- package/lib/common/Video/index.less +11 -7
- package/lib/composite-comp/bol/components/Banner/defaultJSON.js +1 -1
- package/lib/composite-comp/bol/components/Banner/index.js +15 -1
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +1 -4
- package/lib/composite-comp/bol/components/Banner/mobile/index.less +52 -78
- package/lib/composite-comp/bol/components/Banner/pc/index.js +1 -4
- package/lib/composite-comp/bol/components/Button/index.js +3 -4
- package/lib/composite-comp/bol/components/Carousel/index.js +27 -3
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +12 -24
- package/lib/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +5 -6
- 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/ImageGallery/mobile/index.js +1 -4
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
- package/lib/composite-comp/bol/components/ImageGallery/pc/index.js +3 -4
- package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +11 -2
- package/lib/composite-comp/bol/components/ImageText/mobile/index.js +1 -4
- package/lib/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
- package/lib/composite-comp/bol/components/ImageText/pc/index.js +98 -7
- 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/Newsletter/index.js +1 -4
- package/lib/composite-comp/bol/components/Tag/index.js +3 -4
- package/lib/composite-comp/bol/components/Text/index.js +3 -4
- package/lib/composite-comp/bol/components/Video/components/VideoTag/index.js +49 -10
- package/lib/composite-comp/bol/components/Video/components/VideoTag/index.less +5 -5
- package/lib/composite-comp/bol/components/Video/defaultJSON.js +10 -0
- package/lib/composite-comp/bol/components/Video/index.js +23 -1
- package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.js +9 -12
- package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
- package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.js +8 -11
- package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
- package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.js +9 -11
- package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -50
- package/lib/composite-comp/bol/components/Video/mobile/index.js +8 -49
- package/lib/composite-comp/bol/components/Video/mobile/index.less +2 -3
- package/lib/composite-comp/bol/components/Video/pc/Layout1/index.js +9 -12
- package/lib/composite-comp/bol/components/Video/pc/Layout1/index.less +2 -2
- package/lib/composite-comp/bol/components/Video/pc/Layout2/index.js +15 -16
- package/lib/composite-comp/bol/components/Video/pc/Layout2/index.less +4 -4
- package/lib/composite-comp/bol/components/Video/pc/Layout3/index.js +8 -11
- package/lib/composite-comp/bol/components/Video/pc/Layout3/index.less +2 -2
- package/lib/composite-comp/bol/components/Video/pc/Layout4/index.js +9 -12
- package/lib/composite-comp/bol/components/Video/pc/Layout4/index.less +5 -4
- package/lib/composite-comp/bol/components/Video/pc/Layout5/index.js +9 -12
- package/lib/composite-comp/bol/components/Video/pc/Layout5/index.less +12 -10
- package/lib/composite-comp/bol/components/Wallet/mobile/index.js +1 -4
- package/lib/composite-comp/bol/components/Wallet/mobile/index.less +27 -40
- package/lib/composite-comp/bol/components/Wallet/pc/index.js +1 -4
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +4 -0
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
- 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/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +1 -1
- package/lib/composite-comp/bol/config-panels/LocationConfig/index.js +149 -0
- package/lib/composite-comp/bol/config-panels/VideoConfig/VideoShareConfig/index.js +12 -2
- package/lib/composite-comp/bol/config-panels/VideoConfig/index.js +3 -1
- 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 +64 -3
- package/lib/composite-comp/common/config-panels/BackgroundConfig/index.js +12 -2
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +5 -3
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +2 -1
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
- 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/mobile/index.less +45 -52
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +2 -2
- package/lib/composite-comp/dito/components/SignBoard/defaultJSON.js +21 -37
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +35 -24
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +71 -80
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +39 -9
- package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +0 -48
- 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 +1 -1
- package/lib/constants/component-types.js +10 -2
- package/lib/constants/index.js +12 -2
- package/lib/constants/layout.js +21 -1
- package/lib/core/Designer/AiImageGenerator/GenerateArtist/images/back1.png +0 -0
- package/lib/core/Designer/AiImageGenerator/GenerateArtist/images/back2.png +0 -0
- package/lib/core/Designer/AiImageGenerator/GenerateArtist/images/back3.png +0 -0
- package/lib/core/Designer/AiImageGenerator/GenerateArtist/images/back4.png +0 -0
- package/lib/core/Designer/AiImageGenerator/GenerateArtist/index.js +72 -0
- package/lib/core/Designer/AiImageGenerator/GenerateArtist/index.less +41 -0
- package/lib/core/Designer/AiImageGenerator/GenerateSize/index.js +43 -0
- package/lib/core/Designer/AiImageGenerator/GenerateSize/index.less +3 -0
- 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 +55 -0
- package/lib/core/Designer/AiImageGenerator/UploadReference/index.less +45 -0
- package/lib/core/Designer/AiImageGenerator/images/nodata.png +0 -0
- package/lib/core/Designer/AiImageGenerator/index.js +752 -0
- package/lib/core/Designer/AiImageGenerator/index.less +136 -0
- package/lib/core/Designer/ChatRobot/components/CopyBtn/index.js +49 -0
- package/lib/core/Designer/ChatRobot/components/CopyBtn/index.less +0 -0
- package/lib/core/Designer/ChatRobot/index.js +343 -0
- package/lib/core/Designer/ChatRobot/index.less +138 -0
- package/lib/core/Designer/ChatRobot/markdown.less +1 -0
- package/lib/core/Designer/ConfigPanel/index.js +2 -1
- package/lib/core/Designer/FonixtreeGpt/index.js +160 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +96 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +26 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +101 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +26 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +93 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +26 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +27 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +29 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +49 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +29 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +26 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +27 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +31 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +34 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +41 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +136 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +25 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +1 -0
- package/lib/core/Designer/TextEditModal/ToolBar/index.js +219 -0
- package/lib/core/Designer/TextEditModal/ToolBar/index.less +19 -0
- package/lib/core/Designer/TextEditModal/index.js +100 -0
- package/lib/core/Designer/TextEditModal/index.less +4 -0
- package/lib/core/Designer/TextEditModal_old/index.js +142 -0
- package/lib/core/Designer/TextEditModal_old/index.less +25 -0
- 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 +354 -0
- package/lib/core/Designer/ToolBarModal/index.less +32 -0
- package/lib/core/Designer/index.js +56 -15
- package/lib/decorator/index.js +14 -0
- package/lib/decorator/lazyLoadDecorator.js +75 -0
- package/lib/decorator/metaDecorator.js +1 -1
- package/lib/locale/en/en.json +10 -0
- package/lib/locale/es/es.json +10 -0
- package/lib/locale/id/id.json +10 -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/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 +103 -374
- package/lib/meta-comp/components/Text/index.less +57 -0
- package/lib/meta-comp/config-panels/ImageConfig/index.js +35 -12
- package/lib/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/dark-playicon-01.svg +4 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/dark-playicon-02.svg +4 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/dark-playicon-03.svg +4 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/dark-playicon-04.svg +4 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/dark-playicon-05.svg +3 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/light-playicon-01.svg +4 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/light-playicon-02.svg +4 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/light-playicon-03.svg +4 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/light-playicon-04.svg +4 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/PlaySvg/images/light-playicon-05.svg +3 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/PlaySvg/index.js +63 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/index.js +211 -0
- package/lib/meta-comp/config-panels/PlayIconConfig/index.less +37 -2
- 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 +14 -31
- package/lib/meta-comp/config-panels/TextConfig/index.less +12 -16
- package/lib/mobx/Frame.js +7 -1
- package/lib/mobx/Store.js +3 -0
- package/lib/utils/androidUtil.js +8 -1
- package/lib/utils/businessUtil.js +13 -0
- package/lib/utils/commonUtil.js +156 -34
- package/lib/utils/coreUtil.js +18 -4
- package/package.json +5 -1
- package/es/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/.DS_Store +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
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 _BoldSVG = _interopRequireDefault(require("./images/BoldSVG"));
|
|
13
|
+
|
|
14
|
+
var _ItalicSVG = _interopRequireDefault(require("./images/ItalicSVG"));
|
|
15
|
+
|
|
16
|
+
var _StrikeSVG = _interopRequireDefault(require("./images/StrikeSVG"));
|
|
17
|
+
|
|
18
|
+
var _UnderlineSVG = _interopRequireDefault(require("./images/UnderlineSVG"));
|
|
19
|
+
|
|
20
|
+
var _ColorPickerBtn = _interopRequireDefault(require("./components/ColorPickerBtn"));
|
|
21
|
+
|
|
22
|
+
var _LinkBtn = _interopRequireDefault(require("./components/LinkBtn"));
|
|
23
|
+
|
|
24
|
+
var _AlignPicker = _interopRequireDefault(require("./components/AlignPicker"));
|
|
25
|
+
|
|
26
|
+
var _OrderSVG = _interopRequireDefault(require("./images/OrderSVG"));
|
|
27
|
+
|
|
28
|
+
var _UnorderSVG = _interopRequireDefault(require("./images/UnorderSVG"));
|
|
29
|
+
|
|
30
|
+
require("./index.less");
|
|
31
|
+
|
|
32
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
|
+
|
|
34
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
|
+
|
|
36
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
37
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
38
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
39
|
+
__proto__: []
|
|
40
|
+
} instanceof Array && function (d, b) {
|
|
41
|
+
d.__proto__ = b;
|
|
42
|
+
} || function (d, b) {
|
|
43
|
+
for (var p in b) {
|
|
44
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return _extendStatics(d, b);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return function (d, b) {
|
|
52
|
+
_extendStatics(d, b);
|
|
53
|
+
|
|
54
|
+
function __() {
|
|
55
|
+
this.constructor = d;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
59
|
+
};
|
|
60
|
+
}();
|
|
61
|
+
|
|
62
|
+
var iconTypeMap = {
|
|
63
|
+
bold: _BoldSVG["default"],
|
|
64
|
+
italic: _ItalicSVG["default"],
|
|
65
|
+
strike: _StrikeSVG["default"],
|
|
66
|
+
underline: _UnderlineSVG["default"],
|
|
67
|
+
listOrder: _OrderSVG["default"],
|
|
68
|
+
background: function background(props) {
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(_ColorPickerBtn["default"], _extends({
|
|
70
|
+
type: "background"
|
|
71
|
+
}, props));
|
|
72
|
+
},
|
|
73
|
+
listUnOrder: _UnorderSVG["default"],
|
|
74
|
+
link: function link(props) {
|
|
75
|
+
return /*#__PURE__*/_react["default"].createElement(_LinkBtn["default"], props);
|
|
76
|
+
},
|
|
77
|
+
color: function color(props) {
|
|
78
|
+
return /*#__PURE__*/_react["default"].createElement(_ColorPickerBtn["default"], props);
|
|
79
|
+
},
|
|
80
|
+
align: function align(props) {
|
|
81
|
+
return /*#__PURE__*/_react["default"].createElement(_AlignPicker["default"], props);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
var ToolBtn =
|
|
86
|
+
/** @class */
|
|
87
|
+
function (_super) {
|
|
88
|
+
__extends(ToolBtn, _super);
|
|
89
|
+
|
|
90
|
+
function ToolBtn() {
|
|
91
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
92
|
+
|
|
93
|
+
_this.state = {};
|
|
94
|
+
_this.compareData = null;
|
|
95
|
+
return _this;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
ToolBtn.prototype.shouldComponentUpdate = function (nextProps) {
|
|
99
|
+
var active = nextProps.active,
|
|
100
|
+
value = nextProps.value;
|
|
101
|
+
var compareTarget = JSON.stringify({
|
|
102
|
+
active: active,
|
|
103
|
+
value: value
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
if (this.compareData != compareTarget) {
|
|
107
|
+
this.compareData = compareTarget;
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return false;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
ToolBtn.prototype.render = function () {
|
|
115
|
+
var _a = this.props,
|
|
116
|
+
active = _a.active,
|
|
117
|
+
_b = _a.type,
|
|
118
|
+
type = _b === void 0 ? 'bold' : _b,
|
|
119
|
+
onChange = _a.onChange,
|
|
120
|
+
value = _a.value;
|
|
121
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
|
+
className: (0, _classnames["default"])('tool-btn-wrap', {
|
|
123
|
+
active: active
|
|
124
|
+
})
|
|
125
|
+
}, iconTypeMap[type]({
|
|
126
|
+
value: value,
|
|
127
|
+
onChange: onChange
|
|
128
|
+
}));
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
ToolBtn.defaultProps = {};
|
|
132
|
+
return ToolBtn;
|
|
133
|
+
}(_react["default"].Component);
|
|
134
|
+
|
|
135
|
+
var _default = ToolBtn;
|
|
136
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.tool-btn-wrap {
|
|
2
|
+
width: 26px;
|
|
3
|
+
height: 26px;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
border-radius: 6px;
|
|
9
|
+
padding: 0;
|
|
10
|
+
border: none;
|
|
11
|
+
transition: .2s all linear;
|
|
12
|
+
|
|
13
|
+
&:hover {
|
|
14
|
+
background: #f8f8f8;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.active {
|
|
18
|
+
background: #E7E9E8;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
svg {
|
|
22
|
+
height: 18px;
|
|
23
|
+
height: 18px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,219 @@
|
|
|
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
|
+
require("./index.less");
|
|
11
|
+
|
|
12
|
+
var _coreUtil = require("src/components/utils/coreUtil");
|
|
13
|
+
|
|
14
|
+
var _ToolBtn = _interopRequireDefault(require("./ToolBtn"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
19
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
20
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
21
|
+
__proto__: []
|
|
22
|
+
} instanceof Array && function (d, b) {
|
|
23
|
+
d.__proto__ = b;
|
|
24
|
+
} || function (d, b) {
|
|
25
|
+
for (var p in b) {
|
|
26
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return _extendStatics(d, b);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return function (d, b) {
|
|
34
|
+
_extendStatics(d, b);
|
|
35
|
+
|
|
36
|
+
function __() {
|
|
37
|
+
this.constructor = d;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
41
|
+
};
|
|
42
|
+
}();
|
|
43
|
+
|
|
44
|
+
var ToolBar =
|
|
45
|
+
/** @class */
|
|
46
|
+
function (_super) {
|
|
47
|
+
__extends(ToolBar, _super);
|
|
48
|
+
|
|
49
|
+
function ToolBar() {
|
|
50
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
51
|
+
|
|
52
|
+
_this.state = {
|
|
53
|
+
quillFormat: {}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
_this.onSelectionChange = function () {
|
|
57
|
+
var range = _this.props.quillRef.getSelection();
|
|
58
|
+
|
|
59
|
+
if (range) {
|
|
60
|
+
var quillFormat = _this.props.quillRef.getFormat();
|
|
61
|
+
|
|
62
|
+
console.log('quillFormat: ', quillFormat);
|
|
63
|
+
|
|
64
|
+
_this.setState({
|
|
65
|
+
quillFormat: quillFormat
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
_this.onToolBtnClick = function (type, value) {
|
|
71
|
+
window._maginc_clickUrl = _coreUtil.clickUrl;
|
|
72
|
+
console.log('value: ', value);
|
|
73
|
+
var quillFormat = _this.state.quillFormat;
|
|
74
|
+
|
|
75
|
+
if (type == 'bold') {
|
|
76
|
+
_this.props.quillRef.format('bold', !quillFormat['bold']);
|
|
77
|
+
} else if (type == 'italic') {
|
|
78
|
+
_this.props.quillRef.format('italic', !quillFormat['italic']);
|
|
79
|
+
} else if (type == 'strike') {
|
|
80
|
+
_this.props.quillRef.format('strike', !quillFormat['strike']);
|
|
81
|
+
} else if (type == 'underline') {
|
|
82
|
+
_this.props.quillRef.format('underline', !quillFormat['underline']);
|
|
83
|
+
} else if (type == 'color') {
|
|
84
|
+
_this.props.quillRef.format('color', value);
|
|
85
|
+
} else if (type == 'align') {
|
|
86
|
+
_this.props.quillRef.format('align', value);
|
|
87
|
+
} else if (type == 'listOrder') {
|
|
88
|
+
var currentListType = quillFormat['list'];
|
|
89
|
+
|
|
90
|
+
_this.props.quillRef.format('list', currentListType == 'ordered' ? '' : 'ordered');
|
|
91
|
+
} else if (type == 'listUnOrder') {
|
|
92
|
+
var currentListType = quillFormat['list'];
|
|
93
|
+
|
|
94
|
+
_this.props.quillRef.format('list', currentListType == 'bullet' ? '' : 'bullet');
|
|
95
|
+
} else if (type == 'link') {
|
|
96
|
+
_this.props.quillRef.format('link', {
|
|
97
|
+
link: value.name,
|
|
98
|
+
onclick: '_maginc_clickUrl()'
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
_this.onSelectionChange();
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
return _this;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
ToolBar.prototype.componentDidMount = function () {
|
|
109
|
+
this.props.quillRef.on('selection-change', this.onSelectionChange);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
ToolBar.prototype.componentWillUnmount = function () {
|
|
113
|
+
this.props.quillRef.off('selection-change', this.onSelectionChange);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
ToolBar.prototype.render = function () {
|
|
117
|
+
var _this = this;
|
|
118
|
+
|
|
119
|
+
var quillFormat = this.state.quillFormat;
|
|
120
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
121
|
+
className: "toolbar-wrap"
|
|
122
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
|
+
className: "tool-item"
|
|
124
|
+
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
125
|
+
active: quillFormat['bold'],
|
|
126
|
+
onChange: function onChange() {
|
|
127
|
+
_this.onToolBtnClick('bold');
|
|
128
|
+
},
|
|
129
|
+
type: "bold"
|
|
130
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
131
|
+
className: "tool-item"
|
|
132
|
+
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
133
|
+
active: quillFormat['italic'],
|
|
134
|
+
onChange: function onChange() {
|
|
135
|
+
_this.onToolBtnClick('italic');
|
|
136
|
+
},
|
|
137
|
+
type: "italic"
|
|
138
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
139
|
+
className: "tool-item"
|
|
140
|
+
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
141
|
+
active: quillFormat['strike'],
|
|
142
|
+
onChange: function onChange() {
|
|
143
|
+
_this.onToolBtnClick('strike');
|
|
144
|
+
},
|
|
145
|
+
type: "strike"
|
|
146
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
147
|
+
className: "tool-item"
|
|
148
|
+
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
149
|
+
active: quillFormat['underline'],
|
|
150
|
+
onChange: function onChange() {
|
|
151
|
+
_this.onToolBtnClick('underline');
|
|
152
|
+
},
|
|
153
|
+
type: "underline"
|
|
154
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
155
|
+
className: "tooll-line"
|
|
156
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
|
+
className: "tool-item"
|
|
158
|
+
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
159
|
+
onChange: function onChange(value) {
|
|
160
|
+
_this.onToolBtnClick('color', value);
|
|
161
|
+
},
|
|
162
|
+
type: "color",
|
|
163
|
+
value: {
|
|
164
|
+
color: quillFormat['color']
|
|
165
|
+
}
|
|
166
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
167
|
+
className: "tool-item"
|
|
168
|
+
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
169
|
+
onChange: function onChange(value) {
|
|
170
|
+
_this.onToolBtnClick('background', value);
|
|
171
|
+
},
|
|
172
|
+
type: "background",
|
|
173
|
+
value: {
|
|
174
|
+
color: quillFormat['background']
|
|
175
|
+
}
|
|
176
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
|
+
className: "tool-item"
|
|
178
|
+
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
179
|
+
onChange: function onChange(value) {
|
|
180
|
+
_this.onToolBtnClick('align', value);
|
|
181
|
+
},
|
|
182
|
+
type: "align",
|
|
183
|
+
value: {
|
|
184
|
+
align: quillFormat['align']
|
|
185
|
+
}
|
|
186
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
187
|
+
className: "tool-item"
|
|
188
|
+
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
189
|
+
active: quillFormat['list'] == 'bullet',
|
|
190
|
+
onChange: function onChange() {
|
|
191
|
+
_this.onToolBtnClick('listUnOrder');
|
|
192
|
+
},
|
|
193
|
+
type: "listUnOrder"
|
|
194
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
195
|
+
className: "tool-item"
|
|
196
|
+
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
197
|
+
active: quillFormat['list'] == 'ordered',
|
|
198
|
+
onChange: function onChange() {
|
|
199
|
+
_this.onToolBtnClick('listOrder');
|
|
200
|
+
},
|
|
201
|
+
type: "listOrder"
|
|
202
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
203
|
+
className: "tooll-line"
|
|
204
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
205
|
+
className: "tool-item"
|
|
206
|
+
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
207
|
+
onChange: function onChange(value) {
|
|
208
|
+
_this.onToolBtnClick('link', value);
|
|
209
|
+
},
|
|
210
|
+
type: "link"
|
|
211
|
+
})));
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
ToolBar.defaultProps = {};
|
|
215
|
+
return ToolBar;
|
|
216
|
+
}(_react["default"].Component);
|
|
217
|
+
|
|
218
|
+
var _default = ToolBar;
|
|
219
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.toolbar-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
height: 42px;
|
|
5
|
+
border-bottom: 1px solid rgba(0, 0, 0, .04);
|
|
6
|
+
border-top: 1px solid rgba(0, 0, 0, .04);
|
|
7
|
+
|
|
8
|
+
.tool-item {
|
|
9
|
+
margin: 0 5px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.tooll-line {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
width: 1px;
|
|
15
|
+
height: 24px;
|
|
16
|
+
background-color: rgba(0, 0, 0, .04);
|
|
17
|
+
margin: 0 5px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
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 _quill = _interopRequireDefault(require("quill"));
|
|
11
|
+
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
|
|
14
|
+
var _ToolBar = _interopRequireDefault(require("./ToolBar"));
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
21
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
22
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
23
|
+
__proto__: []
|
|
24
|
+
} instanceof Array && function (d, b) {
|
|
25
|
+
d.__proto__ = b;
|
|
26
|
+
} || function (d, b) {
|
|
27
|
+
for (var p in b) {
|
|
28
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return _extendStatics(d, b);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return function (d, b) {
|
|
36
|
+
_extendStatics(d, b);
|
|
37
|
+
|
|
38
|
+
function __() {
|
|
39
|
+
this.constructor = d;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
43
|
+
};
|
|
44
|
+
}();
|
|
45
|
+
/* eslint-disable react/no-danger */
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
var TextEditModal =
|
|
49
|
+
/** @class */
|
|
50
|
+
function (_super) {
|
|
51
|
+
__extends(TextEditModal, _super);
|
|
52
|
+
|
|
53
|
+
function TextEditModal() {
|
|
54
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
55
|
+
|
|
56
|
+
_this.state = {};
|
|
57
|
+
_this.quillRef = null;
|
|
58
|
+
|
|
59
|
+
_this.onCommit = function () {
|
|
60
|
+
_this.props.onOk(_this.quillRef.root.innerHTML);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return _this;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
TextEditModal.prototype.componentDidMount = function () {
|
|
67
|
+
this.quillRef = new _quill["default"]('#editor', {
|
|
68
|
+
placeholder: 'input text...'
|
|
69
|
+
});
|
|
70
|
+
this.setState({});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
TextEditModal.prototype.render = function () {
|
|
74
|
+
var _a = this.props,
|
|
75
|
+
onCancel = _a.onCancel,
|
|
76
|
+
value = _a.value;
|
|
77
|
+
return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
|
|
78
|
+
closable: false,
|
|
79
|
+
onCancel: onCancel,
|
|
80
|
+
onOk: this.onCommit,
|
|
81
|
+
open: true,
|
|
82
|
+
width: 1000
|
|
83
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
+
className: "text-editor-content"
|
|
85
|
+
}, this.quillRef && /*#__PURE__*/_react["default"].createElement(_ToolBar["default"], {
|
|
86
|
+
quillRef: this.quillRef
|
|
87
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
88
|
+
dangerouslySetInnerHTML: {
|
|
89
|
+
__html: value
|
|
90
|
+
},
|
|
91
|
+
id: "editor"
|
|
92
|
+
})));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
TextEditModal.defaultProps = {};
|
|
96
|
+
return TextEditModal;
|
|
97
|
+
}(_react["default"].Component);
|
|
98
|
+
|
|
99
|
+
var _default = TextEditModal;
|
|
100
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,142 @@
|
|
|
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 _reactQuill = _interopRequireDefault(require("react-quill"));
|
|
11
|
+
|
|
12
|
+
require("react-quill/dist/quill.snow.css");
|
|
13
|
+
|
|
14
|
+
var _antd = require("antd");
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
21
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
22
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
23
|
+
__proto__: []
|
|
24
|
+
} instanceof Array && function (d, b) {
|
|
25
|
+
d.__proto__ = b;
|
|
26
|
+
} || function (d, b) {
|
|
27
|
+
for (var p in b) {
|
|
28
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return _extendStatics(d, b);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return function (d, b) {
|
|
36
|
+
_extendStatics(d, b);
|
|
37
|
+
|
|
38
|
+
function __() {
|
|
39
|
+
this.constructor = d;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
43
|
+
};
|
|
44
|
+
}();
|
|
45
|
+
|
|
46
|
+
var themes = [{
|
|
47
|
+
label: 'Theme 1',
|
|
48
|
+
style: {
|
|
49
|
+
fontSize: '42px',
|
|
50
|
+
fontWeight: 'bold'
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
label: 'Theme 2',
|
|
54
|
+
style: {
|
|
55
|
+
fontSize: '24px',
|
|
56
|
+
fontWeight: 'normal'
|
|
57
|
+
}
|
|
58
|
+
}];
|
|
59
|
+
|
|
60
|
+
var CustomToolbar = function CustomToolbar(_a) {
|
|
61
|
+
var quillRefEdit = _a.quillRefEdit,
|
|
62
|
+
reactQuillRef = _a.reactQuillRef;
|
|
63
|
+
return /*#__PURE__*/_react["default"].createElement("select", {
|
|
64
|
+
onChange: function onChange(e) {
|
|
65
|
+
var theme = themes.find(function (item) {
|
|
66
|
+
return item.label === e.target.value;
|
|
67
|
+
});
|
|
68
|
+
console.log('theme: ', theme);
|
|
69
|
+
var range = reactQuillRef.getEditor().getSelection();
|
|
70
|
+
|
|
71
|
+
if (range) {
|
|
72
|
+
// reactQuillRef.getEditor().removeFormat(range.index, range.length);
|
|
73
|
+
reactQuillRef.getEditor().format('strike', 1);
|
|
74
|
+
reactQuillRef.getEditor().format('bold', theme.style.fontWeight === 'bold');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, /*#__PURE__*/_react["default"].createElement("option", null, "Choose a theme"), themes.map(function (theme, index) {
|
|
78
|
+
return /*#__PURE__*/_react["default"].createElement("option", {
|
|
79
|
+
key: index
|
|
80
|
+
}, theme.label);
|
|
81
|
+
}));
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var TextEditModal =
|
|
85
|
+
/** @class */
|
|
86
|
+
function (_super) {
|
|
87
|
+
__extends(TextEditModal, _super);
|
|
88
|
+
|
|
89
|
+
function TextEditModal() {
|
|
90
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
91
|
+
|
|
92
|
+
_this.state = {
|
|
93
|
+
value: ''
|
|
94
|
+
};
|
|
95
|
+
_this.reactQuillRef = null;
|
|
96
|
+
_this.quillRefEdit = null;
|
|
97
|
+
|
|
98
|
+
_this.onCommit = function () {
|
|
99
|
+
_this.props.onOk(_this.quillRefEdit.root.innerHTML);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
return _this;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
TextEditModal.prototype.componentDidMount = function () {
|
|
106
|
+
this.quillRefEdit = this.reactQuillRef.getEditor();
|
|
107
|
+
this.setState({
|
|
108
|
+
value: this.props.value
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
TextEditModal.prototype.render = function () {
|
|
113
|
+
var _this = this;
|
|
114
|
+
|
|
115
|
+
var onCancel = this.props.onCancel;
|
|
116
|
+
var value = this.state.value;
|
|
117
|
+
return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
|
|
118
|
+
closable: false,
|
|
119
|
+
onCancel: onCancel,
|
|
120
|
+
onOk: this.onCommit,
|
|
121
|
+
open: true,
|
|
122
|
+
width: 1000
|
|
123
|
+
}, /*#__PURE__*/_react["default"].createElement(CustomToolbar, {
|
|
124
|
+
quillRefEdit: this.quillRefEdit,
|
|
125
|
+
reactQuillRef: this.reactQuillRef
|
|
126
|
+
}), /*#__PURE__*/_react["default"].createElement(_reactQuill["default"], {
|
|
127
|
+
ref: function ref(el) {
|
|
128
|
+
_this.reactQuillRef = el;
|
|
129
|
+
},
|
|
130
|
+
style: {
|
|
131
|
+
height: 600
|
|
132
|
+
},
|
|
133
|
+
value: value
|
|
134
|
+
}));
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
TextEditModal.defaultProps = {};
|
|
138
|
+
return TextEditModal;
|
|
139
|
+
}(_react["default"].Component);
|
|
140
|
+
|
|
141
|
+
var _default = TextEditModal;
|
|
142
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.text-label-content {
|
|
2
|
+
background-color: #f5f6f7;
|
|
3
|
+
|
|
4
|
+
.label-wrap {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
|
|
9
|
+
.label-item {
|
|
10
|
+
padding: 5px 11px;
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
border-radius: 5px;
|
|
16
|
+
background-color: #fff;
|
|
17
|
+
margin: 8px;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
background-color: #f6f6f7;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|