@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
|
@@ -13,6 +13,8 @@ require("./index.less");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
16
|
+
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); }
|
|
17
|
+
|
|
16
18
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
17
19
|
var _extendStatics = function extendStatics(d, b) {
|
|
18
20
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -39,6 +41,19 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
39
41
|
};
|
|
40
42
|
}();
|
|
41
43
|
|
|
44
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
45
|
+
var t = {};
|
|
46
|
+
|
|
47
|
+
for (var p in s) {
|
|
48
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
56
|
+
|
|
42
57
|
var Field =
|
|
43
58
|
/** @class */
|
|
44
59
|
function (_super) {
|
|
@@ -53,13 +68,15 @@ function (_super) {
|
|
|
53
68
|
title = _a.title,
|
|
54
69
|
children = _a.children,
|
|
55
70
|
layout = _a.layout,
|
|
56
|
-
split = _a.split
|
|
57
|
-
|
|
71
|
+
split = _a.split,
|
|
72
|
+
rest = __rest(_a, ["title", "children", "layout", "split"]);
|
|
73
|
+
|
|
74
|
+
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
58
75
|
className: (0, _classnames["default"])('m-field', {
|
|
59
76
|
split: split,
|
|
60
77
|
bold: split === 'bold'
|
|
61
78
|
})
|
|
62
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
|
+
}, rest), /*#__PURE__*/_react["default"].createElement("div", {
|
|
63
80
|
className: (0, _classnames["default"])('field-item', {
|
|
64
81
|
horizontal: layout === 'horizontal'
|
|
65
82
|
})
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
25
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
26
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
27
|
+
__proto__: []
|
|
28
|
+
} instanceof Array && function (d, b) {
|
|
29
|
+
d.__proto__ = b;
|
|
30
|
+
} || function (d, b) {
|
|
31
|
+
for (var p in b) {
|
|
32
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return _extendStatics(d, b);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return function (d, b) {
|
|
40
|
+
_extendStatics(d, b);
|
|
41
|
+
|
|
42
|
+
function __() {
|
|
43
|
+
this.constructor = d;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
|
+
};
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
51
|
+
__assign = Object.assign || function (t) {
|
|
52
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
53
|
+
s = arguments[i];
|
|
54
|
+
|
|
55
|
+
for (var p in s) {
|
|
56
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return t;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return __assign.apply(this, arguments);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
67
|
+
var t = {};
|
|
68
|
+
|
|
69
|
+
for (var p in s) {
|
|
70
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
74
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
75
|
+
}
|
|
76
|
+
return t;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// import styles from './index.less';
|
|
80
|
+
var ImageLazy =
|
|
81
|
+
/** @class */
|
|
82
|
+
function (_super) {
|
|
83
|
+
__extends(ImageLazy, _super);
|
|
84
|
+
|
|
85
|
+
function ImageLazy() {
|
|
86
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
87
|
+
|
|
88
|
+
_this.state = {
|
|
89
|
+
show: false
|
|
90
|
+
};
|
|
91
|
+
_this.imageRef = /*#__PURE__*/_react["default"].createRef();
|
|
92
|
+
_this.intersectionObserver = null;
|
|
93
|
+
return _this;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
ImageLazy.prototype.componentDidMount = function () {
|
|
97
|
+
var _this = this;
|
|
98
|
+
|
|
99
|
+
var _a;
|
|
100
|
+
|
|
101
|
+
this.intersectionObserver = new IntersectionObserver(function (entries) {
|
|
102
|
+
if (entries[0].isIntersecting) {
|
|
103
|
+
if (!_this.state.show) {
|
|
104
|
+
_this.setState({
|
|
105
|
+
show: true
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}, {
|
|
110
|
+
root: (_a = this.props) === null || _a === void 0 ? void 0 : _a.rootContainer(),
|
|
111
|
+
// threshold: 0.8,
|
|
112
|
+
rootMargin: '0px 0px 100px 0px'
|
|
113
|
+
});
|
|
114
|
+
this.intersectionObserver.observe(this.imageRef.current);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
ImageLazy.prototype.componentWillUnmount = function () {
|
|
118
|
+
this.intersectionObserver.disconnect(this.imageRef.current);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
ImageLazy.prototype.render = function () {
|
|
122
|
+
var _this = this;
|
|
123
|
+
|
|
124
|
+
var _a = this.props,
|
|
125
|
+
_b = _a.lazy,
|
|
126
|
+
lazy = _b === void 0 ? true : _b,
|
|
127
|
+
src = _a.src,
|
|
128
|
+
onLoadFunc = _a.onLoadFunc,
|
|
129
|
+
style = _a.style,
|
|
130
|
+
className = _a.className,
|
|
131
|
+
rest = __rest(_a, ["lazy", "src", "onLoadFunc", "style", "className"]);
|
|
132
|
+
|
|
133
|
+
var show = this.state.show;
|
|
134
|
+
var isShow = lazy ? show : true;
|
|
135
|
+
return /*#__PURE__*/_react["default"].createElement("img", _extends({
|
|
136
|
+
ref: this.imageRef,
|
|
137
|
+
alt: "",
|
|
138
|
+
className: (0, _classnames["default"])(className),
|
|
139
|
+
onLoad: function onLoad() {
|
|
140
|
+
if (onLoadFunc) {
|
|
141
|
+
onLoadFunc(_this.imageRef.current.clientWidth);
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
src: isShow ? src : '',
|
|
145
|
+
style: __assign({
|
|
146
|
+
opacity: ~~isShow
|
|
147
|
+
}, style)
|
|
148
|
+
}, rest));
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
return ImageLazy;
|
|
152
|
+
}(_react.Component);
|
|
153
|
+
|
|
154
|
+
ImageLazy.propTypes = {
|
|
155
|
+
/** 外层容器 */
|
|
156
|
+
rootContainer: _propTypes["default"].func,
|
|
157
|
+
|
|
158
|
+
/** src */
|
|
159
|
+
src: _propTypes["default"].string,
|
|
160
|
+
|
|
161
|
+
/** 懒加载 */
|
|
162
|
+
lazy: _propTypes["default"].bool
|
|
163
|
+
};
|
|
164
|
+
ImageLazy.defaultProps = {
|
|
165
|
+
rootContainer: function rootContainer() {
|
|
166
|
+
return null;
|
|
167
|
+
},
|
|
168
|
+
lazy: true,
|
|
169
|
+
src: ''
|
|
170
|
+
};
|
|
171
|
+
var _default = ImageLazy;
|
|
172
|
+
exports["default"] = _default;
|
|
File without changes
|
|
@@ -17,6 +17,8 @@ var _ImageModal = _interopRequireDefault(require("../ImageModal"));
|
|
|
17
17
|
|
|
18
18
|
var _ = require("..");
|
|
19
19
|
|
|
20
|
+
var _AiImageGenerator = _interopRequireDefault(require("../../core/Designer/AiImageGenerator"));
|
|
21
|
+
|
|
20
22
|
var _Iconfont = _interopRequireDefault(require("../Iconfont"));
|
|
21
23
|
|
|
22
24
|
var _coreUtil = require("../../utils/coreUtil");
|
|
@@ -68,7 +70,8 @@ function (_super) {
|
|
|
68
70
|
|
|
69
71
|
_this.state = {
|
|
70
72
|
visible: false,
|
|
71
|
-
inputVal: ''
|
|
73
|
+
inputVal: '',
|
|
74
|
+
aiImageVisible: false
|
|
72
75
|
};
|
|
73
76
|
|
|
74
77
|
_this.onChange = function (v) {
|
|
@@ -93,9 +96,17 @@ function (_super) {
|
|
|
93
96
|
}
|
|
94
97
|
};
|
|
95
98
|
|
|
99
|
+
_this.onAiImageClick = function () {
|
|
100
|
+
_this.setState({
|
|
101
|
+
aiImageVisible: true
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
|
|
96
105
|
_this.getImagePick = function () {
|
|
97
106
|
var visible = _this.state.visible;
|
|
98
|
-
var
|
|
107
|
+
var _a = _this.props,
|
|
108
|
+
value = _a.value,
|
|
109
|
+
recommendImgSize = _a.recommendImgSize;
|
|
99
110
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
111
|
className: "m-image-picker"
|
|
101
112
|
}, value ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -129,7 +140,9 @@ function (_super) {
|
|
|
129
140
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
130
141
|
className: "btn-del",
|
|
131
142
|
onClick: function onClick() {
|
|
132
|
-
_this.props.onChange(
|
|
143
|
+
_this.props.onChange({
|
|
144
|
+
url: ''
|
|
145
|
+
});
|
|
133
146
|
}
|
|
134
147
|
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
135
148
|
color: "#fff",
|
|
@@ -140,7 +153,7 @@ function (_super) {
|
|
|
140
153
|
className: "no-img"
|
|
141
154
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
142
155
|
className: "hint-txt"
|
|
143
|
-
}, (0, _locale.i18n)('LOOKS_LIKE_YOU_DO_NOT_HAVE_ANY_IMAGES_IN_YOUR_GALLERY__CHOOSE_IMAGES_TO_FEATURE_ON_THIS_PAGE_')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
156
|
+
}, (0, _locale.i18n)('LOOKS_LIKE_YOU_DO_NOT_HAVE_ANY_IMAGES_IN_YOUR_GALLERY__CHOOSE_IMAGES_TO_FEATURE_ON_THIS_PAGE_'), recommendImgSize && recommendImgSize.width && /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('RECOMMENDED_SIZE'), ": ", recommendImgSize.width, "*", recommendImgSize.height)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
144
157
|
className: "pick-btn",
|
|
145
158
|
onClick: function onClick() {
|
|
146
159
|
_this.setState({
|
|
@@ -162,6 +175,19 @@ function (_super) {
|
|
|
162
175
|
}));
|
|
163
176
|
};
|
|
164
177
|
|
|
178
|
+
_this.onAiImageConfirm = function (data) {
|
|
179
|
+
_this.setState({
|
|
180
|
+
aiImageVisible: false
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
_this.props.onChange({
|
|
184
|
+
contentTitle: data.fileName,
|
|
185
|
+
contentType: 'File',
|
|
186
|
+
imgUrl: data.oriUrl,
|
|
187
|
+
url: data.oriUrl
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
|
|
165
191
|
_this.getImageUrl = function () {
|
|
166
192
|
var onChange = _this.props.onChange;
|
|
167
193
|
var inputVal = _this.state.inputVal;
|
|
@@ -236,6 +262,7 @@ function (_super) {
|
|
|
236
262
|
|
|
237
263
|
var imageSelectedWay = this.props.imageSelectedWay;
|
|
238
264
|
var way = (0, _coreUtil.isPc)() ? imageSelectedWay.pc : imageSelectedWay.mobile;
|
|
265
|
+
var aiImageVisible = this.state.aiImageVisible;
|
|
239
266
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
240
267
|
className: "image-picker-wrap"
|
|
241
268
|
}, /*#__PURE__*/_react["default"].createElement(_.Field, {
|
|
@@ -254,7 +281,25 @@ function (_super) {
|
|
|
254
281
|
key: v.key,
|
|
255
282
|
value: v.key
|
|
256
283
|
}, v.value);
|
|
257
|
-
}))
|
|
284
|
+
})), window.magicDesign.needAi && /*#__PURE__*/_react["default"].createElement("div", {
|
|
285
|
+
className: "ai-btn",
|
|
286
|
+
onClick: this.onAiImageClick
|
|
287
|
+
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
288
|
+
color: "#2F54EB",
|
|
289
|
+
size: 20,
|
|
290
|
+
type: "icon-ai"
|
|
291
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
292
|
+
className: "btn-txt"
|
|
293
|
+
}, (0, _locale.i18n)('AI_IMAGE'))))), way === 'url' ? this.getImageUrl() : this.getImagePick(), /*#__PURE__*/_react["default"].createElement(_AiImageGenerator["default"], {
|
|
294
|
+
onClose: function onClose() {
|
|
295
|
+
return _this.setState({
|
|
296
|
+
aiImageVisible: false
|
|
297
|
+
});
|
|
298
|
+
},
|
|
299
|
+
onConfirm: this.onAiImageConfirm,
|
|
300
|
+
single: true,
|
|
301
|
+
visible: aiImageVisible
|
|
302
|
+
}));
|
|
258
303
|
};
|
|
259
304
|
|
|
260
305
|
ImagePicker.defaultProps = {
|
|
@@ -179,7 +179,7 @@ var BundleCampaign = function BundleCampaign(props) {
|
|
|
179
179
|
campaignName = _b[0],
|
|
180
180
|
setCampaignName = _b[1];
|
|
181
181
|
|
|
182
|
-
var _c = (0, _react.useState)(''),
|
|
182
|
+
var _c = (0, _react.useState)(window.magicDesign.storeId ? window.magicDesign.storeId : ''),
|
|
183
183
|
storeId = _c[0],
|
|
184
184
|
setStoreId = _c[1];
|
|
185
185
|
|
|
@@ -241,7 +241,7 @@ var BundleCampaign = function BundleCampaign(props) {
|
|
|
241
241
|
|
|
242
242
|
var reset = function reset() {
|
|
243
243
|
setCampaignName('');
|
|
244
|
-
setStoreId('');
|
|
244
|
+
setStoreId(window.magicDesign.storeId ? window.magicDesign.storeId : '');
|
|
245
245
|
setCmpState('A,B');
|
|
246
246
|
};
|
|
247
247
|
|
|
@@ -184,7 +184,7 @@ function CatgTable(props) {
|
|
|
184
184
|
setLoading(true);
|
|
185
185
|
return [4
|
|
186
186
|
/*yield*/
|
|
187
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
187
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
|
|
188
188
|
|
|
189
189
|
case 1:
|
|
190
190
|
res = _a.sent();
|
|
@@ -246,14 +246,22 @@ function CouponTable(props) {
|
|
|
246
246
|
|
|
247
247
|
var getCoupons = function getCoupons(params) {
|
|
248
248
|
return __awaiter(_this, void 0, void 0, function () {
|
|
249
|
-
var res, list;
|
|
249
|
+
var newParams, res, list;
|
|
250
250
|
return __generator(this, function (_a) {
|
|
251
251
|
switch (_a.label) {
|
|
252
252
|
case 0:
|
|
253
253
|
setLoading(true);
|
|
254
|
+
newParams = __assign(__assign({}, params), {
|
|
255
|
+
tableFlag: 'effective',
|
|
256
|
+
isPublic: 'Y',
|
|
257
|
+
state: 'A',
|
|
258
|
+
couponLocation: 'Promotion',
|
|
259
|
+
pageTotal: false,
|
|
260
|
+
storeId: window.magicDesign.storeId ? window.magicDesign.storeId : ''
|
|
261
|
+
});
|
|
254
262
|
return [4
|
|
255
263
|
/*yield*/
|
|
256
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/coupons/couponList/page
|
|
264
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/coupons/couponList/page", newParams, 'GET')];
|
|
257
265
|
|
|
258
266
|
case 1:
|
|
259
267
|
res = _a.sent();
|
|
@@ -217,7 +217,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
217
217
|
storeName = _g[0],
|
|
218
218
|
setStoreName = _g[1];
|
|
219
219
|
|
|
220
|
-
var _h = (0, _react.useState)(''),
|
|
220
|
+
var _h = (0, _react.useState)(window.magicDesign.storeId || ''),
|
|
221
221
|
storeId = _h[0],
|
|
222
222
|
setStoreId = _h[1];
|
|
223
223
|
|
|
@@ -281,7 +281,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
281
281
|
settVal([]);
|
|
282
282
|
settBrandId([]);
|
|
283
283
|
settLabelId({});
|
|
284
|
-
setStoreId('');
|
|
284
|
+
setStoreId(window.magicDesign.storeId || '');
|
|
285
285
|
setStoreName('');
|
|
286
286
|
setProductName('');
|
|
287
287
|
setMinimum('');
|
|
@@ -346,7 +346,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
346
346
|
case 0:
|
|
347
347
|
return [4
|
|
348
348
|
/*yield*/
|
|
349
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
349
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
|
|
350
350
|
|
|
351
351
|
case 1:
|
|
352
352
|
res = _a.sent();
|
|
@@ -368,7 +368,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
368
368
|
case 0:
|
|
369
369
|
return [4
|
|
370
370
|
/*yield*/
|
|
371
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
371
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list", {}, 'GET')];
|
|
372
372
|
|
|
373
373
|
case 1:
|
|
374
374
|
res = _a.sent();
|
|
@@ -447,7 +447,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
447
447
|
switch (_a.label) {
|
|
448
448
|
case 0:
|
|
449
449
|
precision = Math.pow(10, (0, _commonUtil.ensure)(function () {
|
|
450
|
-
return window.
|
|
450
|
+
return window.systemParams.precision;
|
|
451
451
|
}, '0'));
|
|
452
452
|
params = {
|
|
453
453
|
catgIds: tValue.join(','),
|
|
@@ -471,8 +471,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
471
471
|
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
|
|
472
472
|
|
|
473
473
|
case 1:
|
|
474
|
-
res = _a.sent();
|
|
475
|
-
|
|
474
|
+
res = _a.sent();
|
|
476
475
|
setLoading(false);
|
|
477
476
|
paginationParams.total = res.total;
|
|
478
477
|
|
|
@@ -533,12 +532,14 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
533
532
|
layout: "vertical"
|
|
534
533
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
535
534
|
label: "Category"
|
|
536
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect
|
|
537
|
-
|
|
535
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect // allowClear
|
|
536
|
+
, {
|
|
538
537
|
dropdownStyle: {
|
|
539
538
|
maxHeight: 400,
|
|
540
539
|
overflow: 'auto'
|
|
541
540
|
},
|
|
541
|
+
maxTagCount: 2,
|
|
542
|
+
maxTagTextLength: 5,
|
|
542
543
|
multiple: true,
|
|
543
544
|
onChange: onChange,
|
|
544
545
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
@@ -550,6 +551,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
550
551
|
label: "Brand"
|
|
551
552
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
552
553
|
defaultValue: [],
|
|
554
|
+
maxTagCount: 2,
|
|
555
|
+
maxTagTextLength: 5,
|
|
553
556
|
mode: "multiple",
|
|
554
557
|
onChange: handleBrandChange,
|
|
555
558
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
@@ -220,7 +220,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
220
220
|
productName = _e[0],
|
|
221
221
|
setProductName = _e[1];
|
|
222
222
|
|
|
223
|
-
var _f = (0, _react.useState)(
|
|
223
|
+
var _f = (0, _react.useState)(''),
|
|
224
224
|
storeId = _f[0],
|
|
225
225
|
setStoreId = _f[1];
|
|
226
226
|
|
|
@@ -309,7 +309,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
309
309
|
case 0:
|
|
310
310
|
return [4
|
|
311
311
|
/*yield*/
|
|
312
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
312
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list")];
|
|
313
313
|
|
|
314
314
|
case 1:
|
|
315
315
|
res = _a.sent();
|
|
@@ -357,7 +357,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
357
357
|
setProductName('');
|
|
358
358
|
setProductCode('');
|
|
359
359
|
setBrandId([]);
|
|
360
|
-
setStoreId(
|
|
360
|
+
setStoreId('');
|
|
361
361
|
};
|
|
362
362
|
|
|
363
363
|
(0, _react.useEffect)(function () {
|
|
@@ -285,7 +285,7 @@ var LinkModal = function LinkModal(props) {
|
|
|
285
285
|
,
|
|
286
286
|
title: (0, _locale.i18n)('URL_SETUP'),
|
|
287
287
|
visible: visible,
|
|
288
|
-
width: "
|
|
288
|
+
width: "1000px",
|
|
289
289
|
wrapClassName: "magicLinkModal"
|
|
290
290
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Tabs, {
|
|
291
291
|
activeKey: selected,
|
|
@@ -204,8 +204,6 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
204
204
|
return r;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var precision = (0, _currencyUtil.getPrecision)();
|
|
208
|
-
|
|
209
207
|
var formatData = function formatData(list) {
|
|
210
208
|
list.map(function (item) {
|
|
211
209
|
item.preSalesPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(item.salesPrice);
|
|
@@ -271,7 +269,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
271
269
|
productCode = _m[0],
|
|
272
270
|
setProductCode = _m[1];
|
|
273
271
|
|
|
274
|
-
var _o = (0, _react.useState)(
|
|
272
|
+
var _o = (0, _react.useState)(''),
|
|
275
273
|
storeId = _o[0],
|
|
276
274
|
setStoreId = _o[1];
|
|
277
275
|
|
|
@@ -377,21 +375,18 @@ var ProductModal = function ProductModal(props) {
|
|
|
377
375
|
|
|
378
376
|
var queryOfferCatgs = function queryOfferCatgs() {
|
|
379
377
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
380
|
-
var res,
|
|
378
|
+
var res, tree;
|
|
381
379
|
return __generator(this, function (_a) {
|
|
382
380
|
switch (_a.label) {
|
|
383
381
|
case 0:
|
|
384
382
|
return [4
|
|
385
383
|
/*yield*/
|
|
386
|
-
, (0, _commonUtil.commonFetch)(
|
|
384
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
|
|
387
385
|
|
|
388
386
|
case 1:
|
|
389
387
|
res = _a.sent();
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
if (f.children) arr.push.apply(arr, f.children);
|
|
393
|
-
});
|
|
394
|
-
setCatgsList(arr);
|
|
388
|
+
tree = (0, _businessUtil.listToTree)(res);
|
|
389
|
+
setCatgsList(tree);
|
|
395
390
|
return [2
|
|
396
391
|
/*return*/
|
|
397
392
|
];
|
|
@@ -409,7 +404,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
409
404
|
case 0:
|
|
410
405
|
return [4
|
|
411
406
|
/*yield*/
|
|
412
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
407
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list", {}, 'GET')];
|
|
413
408
|
|
|
414
409
|
case 1:
|
|
415
410
|
res = _a.sent();
|
|
@@ -491,7 +486,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
491
486
|
setSelCatgsList([]);
|
|
492
487
|
setSelLabelData([]);
|
|
493
488
|
setProductName('');
|
|
494
|
-
setStoreId(
|
|
489
|
+
setStoreId('');
|
|
495
490
|
setProductCode('');
|
|
496
491
|
setMinPrice('');
|
|
497
492
|
setMaxPrice('');
|
|
@@ -565,35 +560,33 @@ var ProductModal = function ProductModal(props) {
|
|
|
565
560
|
layout: "vertical"
|
|
566
561
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
567
562
|
label: "Category"
|
|
568
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.
|
|
569
|
-
|
|
570
|
-
|
|
563
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect, {
|
|
564
|
+
dropdownStyle: {
|
|
565
|
+
maxHeight: 400,
|
|
566
|
+
overflow: 'auto'
|
|
567
|
+
},
|
|
568
|
+
maxTagCount: 2,
|
|
569
|
+
maxTagTextLength: 5,
|
|
570
|
+
multiple: true,
|
|
571
|
+
onChange: function onChange(value) {
|
|
571
572
|
setSelCatgsList(value);
|
|
572
573
|
},
|
|
573
574
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
574
575
|
size: "small",
|
|
576
|
+
treeData: catgsList,
|
|
577
|
+
treeDefaultExpandAll: true,
|
|
575
578
|
value: selCatgsList
|
|
576
|
-
},
|
|
577
|
-
return /*#__PURE__*/_react["default"].createElement(OptGroup, {
|
|
578
|
-
key: item.model.catgId,
|
|
579
|
-
label: item.model.catgName
|
|
580
|
-
}, (item.children || []).map(function (i) {
|
|
581
|
-
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
582
|
-
key: i.model.catgId,
|
|
583
|
-
value: i.model.catgId
|
|
584
|
-
}, i.model.catgName);
|
|
585
|
-
}));
|
|
586
|
-
}))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
579
|
+
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
587
580
|
label: "Brand"
|
|
588
581
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
589
582
|
mode: "multiple",
|
|
590
|
-
onChange: function onChange(value
|
|
583
|
+
onChange: function onChange(value) {
|
|
591
584
|
setSelBrandsList(value);
|
|
592
585
|
},
|
|
593
586
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
594
587
|
size: "small",
|
|
595
588
|
value: selBrandsList
|
|
596
|
-
}, brandsList.map(function (item
|
|
589
|
+
}, brandsList.map(function (item) {
|
|
597
590
|
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
598
591
|
key: item.catgId,
|
|
599
592
|
value: item.brandId
|
|
@@ -706,8 +699,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
706
699
|
productCode: productCode,
|
|
707
700
|
storeId: storeId,
|
|
708
701
|
cmpTypeId: promotions || '',
|
|
709
|
-
minPrice:
|
|
710
|
-
maxPrice:
|
|
702
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
703
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
711
704
|
catgIds: selCatgsList.join(','),
|
|
712
705
|
brandIds: selBrandsList.join(','),
|
|
713
706
|
labelIds: selLabelData.value || '',
|
|
@@ -736,8 +729,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
736
729
|
productName: productName,
|
|
737
730
|
productCode: productCode,
|
|
738
731
|
cmpTypeId: promotions || '',
|
|
739
|
-
minPrice:
|
|
740
|
-
maxPrice:
|
|
732
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
733
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
741
734
|
catgIds: selCatgsList.join(','),
|
|
742
735
|
brandIds: selBrandsList.join(','),
|
|
743
736
|
labelIds: selLabelData.value || '',
|