@antscorp/antsomi-ui 1.3.5-beta.7 → 1.3.5-beta.71
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/images/background/skeleton-background.png +0 -0
- package/es/assets/images/components/PreviewModal/Banner/skeletonBackground.png +0 -0
- package/es/assets/images/components/PreviewModal/Information/buttonText.png +0 -0
- package/es/assets/images/components/PreviewModal/Information/clickButton.png +0 -0
- package/es/assets/images/components/PreviewModal/Information/description.png +0 -0
- package/es/assets/images/components/PreviewModal/Information/deviceRadio.png +0 -0
- package/es/assets/images/components/PreviewModal/Information/itemName.png +0 -0
- package/es/assets/images/components/PreviewModal/banner.png +0 -0
- package/es/assets/images/components/PreviewModal/information.png +0 -0
- package/es/assets/images/components/PreviewModal/similarTemplate.png +0 -0
- package/es/assets/images/components/PreviewModal/thumbnails.png +0 -0
- package/es/assets/images/components/TemplateListing/blankTemplate.png +0 -0
- package/es/assets/images/components/TemplateListing/categoryListing.png +0 -0
- package/es/assets/images/components/TemplateListing/empty.png +0 -0
- package/es/assets/images/components/TemplateListing/previewModal.png +0 -0
- package/es/assets/images/components/TemplateListing/templateItem.png +0 -0
- package/es/assets/images/components/TemplateListing/templates.png +0 -0
- package/es/assets/images/profile.png +0 -0
- package/es/assets/images/skeleton_bg.png +0 -0
- package/es/assets/images/tail.png +0 -0
- package/es/assets/svg/mobile-frame.svg +3 -0
- package/es/components/atoms/MobileFrame/MobileFrame.d.ts +2 -0
- package/es/components/atoms/MobileFrame/MobileFrame.js +1 -1
- package/es/components/atoms/MobileFrame/styled.d.ts +2 -1
- package/es/components/atoms/MobileFrame/styled.js +11 -6
- package/es/components/atoms/SlideBar/SlideBar.js +1 -1
- package/es/components/atoms/Spin/Spin.js +2 -2
- package/es/components/common/ConfigProvider/ConfigProvider.js +4 -3
- package/es/components/common/ConfigProvider/GlobalStyle.js +85 -16
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +3 -2
- package/es/components/molecules/CalendarSelection/CalendarSelection.d.ts +3 -0
- package/es/components/molecules/CalendarSelection/CalendarSelection.js +45 -0
- package/es/components/molecules/CalendarSelection/actions.d.ts +55 -0
- package/es/components/molecules/CalendarSelection/actions.js +39 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/AutoUpdateTo.d.ts +7 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/AutoUpdateTo.js +24 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/styled.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/styled.js +10 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/CustomPicker.d.ts +3 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/CustomPicker.js +108 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/styled.d.ts +6 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/styled.js +152 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/types.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/types.js +1 -0
- package/es/components/molecules/CalendarSelection/components/Footer/Footer.d.ts +2 -0
- package/es/components/molecules/CalendarSelection/components/Footer/Footer.js +11 -0
- package/es/components/molecules/CalendarSelection/components/Footer/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/Footer/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/Footer/styled.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/Footer/styled.js +6 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/RangePicker.d.ts +5 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/RangePicker.js +4 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/styled.d.ts +5 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/styled.js +13 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/RangeSelectOptions.d.ts +3 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/RangeSelectOptions.js +23 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/NumOfDaysRanges.d.ts +2 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/NumOfDaysRanges.js +41 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/Option.d.ts +11 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/Option.js +40 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/styled.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/styled.js +29 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/index.d.ts +2 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/index.js +2 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/styled.d.ts +3 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/styled.js +34 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/types.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/types.js +1 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/TimeRangeDisplay.d.ts +8 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/TimeRangeDisplay.js +49 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/index.d.ts +2 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/index.js +2 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/styled.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/styled.js +70 -0
- package/es/components/molecules/CalendarSelection/components/index.d.ts +5 -0
- package/es/components/molecules/CalendarSelection/components/index.js +5 -0
- package/es/components/molecules/CalendarSelection/constants.d.ts +97 -0
- package/es/components/molecules/CalendarSelection/constants.js +183 -0
- package/es/components/molecules/CalendarSelection/context.d.ts +4 -0
- package/es/components/molecules/CalendarSelection/context.js +6 -0
- package/es/components/molecules/CalendarSelection/hooks/index.d.ts +2 -0
- package/es/components/molecules/CalendarSelection/hooks/index.js +2 -0
- package/es/components/molecules/CalendarSelection/hooks/useStateContext.d.ts +4 -0
- package/es/components/molecules/CalendarSelection/hooks/useStateContext.js +13 -0
- package/es/components/molecules/CalendarSelection/hooks/useTriggerOut.d.ts +9 -0
- package/es/components/molecules/CalendarSelection/hooks/useTriggerOut.js +19 -0
- package/es/components/molecules/CalendarSelection/index.d.ts +25 -0
- package/es/components/molecules/CalendarSelection/index.js +6 -0
- package/es/components/molecules/CalendarSelection/reducer.d.ts +3 -0
- package/es/components/molecules/CalendarSelection/reducer.js +121 -0
- package/es/components/molecules/CalendarSelection/styled.d.ts +6 -0
- package/es/components/molecules/CalendarSelection/styled.js +13 -0
- package/es/components/molecules/CalendarSelection/types.d.ts +98 -0
- package/es/components/molecules/CalendarSelection/types.js +1 -0
- package/es/components/molecules/CalendarSelection/utils.d.ts +52 -0
- package/es/components/molecules/CalendarSelection/utils.js +304 -0
- package/es/components/molecules/ColorPicker/CustomPicker/index.js +3 -3
- package/es/components/molecules/ColorPicker/index.d.ts +1 -0
- package/es/components/molecules/ColorPicker/index.js +3 -2
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +20 -16
- package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.d.ts +3 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +23 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +1 -1
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +2 -2
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts +1 -0
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js +3 -3
- package/es/components/molecules/DatePicker/components/DropdownLabel/DropdownLabel.js +2 -2
- package/es/components/molecules/ModalV2/styled.js +4 -0
- package/es/components/molecules/ResizeGrid/ResizeGrid.js +10 -2
- package/es/components/molecules/ResizeGrid/types.d.ts +1 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.d.ts +1 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.js +2 -2
- package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.d.ts +1 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.js +4 -3
- package/es/components/molecules/RichMenu/RichMenuChatBar/styled.d.ts +1 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/styled.js +1 -1
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.d.ts +7 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.js +25 -6
- package/es/components/molecules/RichMenu/RichMenuMobileView/styled.d.ts +5 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/styled.js +31 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +2 -2
- package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.js +1 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.js +2 -2
- package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.js +1 -1
- package/es/components/molecules/ShareAccess/index.d.ts +2 -3
- package/es/components/molecules/ShareAccess/index.js +2 -3
- package/es/components/molecules/ShareAccess/types.d.ts +2 -0
- package/es/components/molecules/ShareAccess/utils.d.ts +2 -1
- package/es/components/molecules/ShareAccess/utils.js +9 -0
- package/es/components/molecules/TemplateSaveAs/TemplateSaveAs.d.ts +79 -0
- package/es/components/molecules/TemplateSaveAs/TemplateSaveAs.js +184 -0
- package/es/components/molecules/TemplateSaveAs/TemplateSaveAsModal.d.ts +10 -0
- package/es/components/molecules/TemplateSaveAs/TemplateSaveAsModal.js +50 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/ImageSlider.d.ts +20 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/ImageSlider.js +57 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/index.d.ts +1 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/index.js +1 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/styled.d.ts +9 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/styled.js +182 -0
- package/es/components/molecules/TemplateSaveAs/components/index.d.ts +1 -0
- package/es/components/molecules/TemplateSaveAs/components/index.js +1 -0
- package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.d.ts +65 -0
- package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.js +121 -0
- package/es/components/molecules/TemplateSaveAs/index.d.ts +4 -0
- package/es/components/molecules/TemplateSaveAs/index.js +3 -0
- package/es/components/molecules/TemplateSaveAs/styled.d.ts +4 -0
- package/es/components/molecules/TemplateSaveAs/styled.js +73 -0
- package/es/components/molecules/ThumbnailCard/ThumbnailCard.js +29 -13
- package/es/components/molecules/ThumbnailCard/constants.d.ts +2 -2
- package/es/components/molecules/ThumbnailCard/constants.js +2 -2
- package/es/components/molecules/ThumbnailCard/styled.js +2 -1
- package/es/components/molecules/ThumbnailCard/types.d.ts +12 -6
- package/es/components/molecules/UploadImage/index.js +1 -1
- package/es/components/molecules/index.d.ts +3 -0
- package/es/components/molecules/index.js +2 -0
- package/es/components/organism/Help/Help.js +30 -1
- package/es/components/organism/Menu/Menu.d.ts +2 -0
- package/es/components/organism/Menu/Menu.js +2 -0
- package/es/components/organism/Menu/index.d.ts +1 -0
- package/es/components/organism/Menu/index.js +1 -0
- package/es/components/organism/PreviewTemplateModal/components/Banner/index.d.ts +3 -0
- package/es/components/organism/PreviewTemplateModal/components/Banner/index.js +13 -0
- package/es/components/organism/PreviewTemplateModal/components/Banner/styled.d.ts +4 -0
- package/es/components/organism/PreviewTemplateModal/components/Banner/styled.js +98 -0
- package/es/components/organism/PreviewTemplateModal/components/Information/index.d.ts +3 -0
- package/es/components/organism/PreviewTemplateModal/components/Information/index.js +29 -0
- package/es/components/organism/PreviewTemplateModal/components/Information/styled.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/components/Information/styled.js +41 -0
- package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/index.d.ts +3 -0
- package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/index.js +32 -0
- package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/styled.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/styled.js +12 -0
- package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/index.d.ts +6 -0
- package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/index.js +77 -0
- package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/styled.d.ts +3 -0
- package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/styled.js +62 -0
- package/es/components/organism/PreviewTemplateModal/components/index.d.ts +4 -0
- package/es/components/organism/PreviewTemplateModal/components/index.js +4 -0
- package/es/components/organism/PreviewTemplateModal/constants/dataSample.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/constants/dataSample.js +9 -0
- package/es/components/organism/PreviewTemplateModal/constants/defaultProps.d.ts +8 -0
- package/es/components/organism/PreviewTemplateModal/constants/defaultProps.js +12 -0
- package/es/components/organism/PreviewTemplateModal/constants/html.d.ts +1 -0
- package/es/components/organism/PreviewTemplateModal/constants/html.js +1 -0
- package/es/components/organism/PreviewTemplateModal/constants/index.d.ts +4 -0
- package/es/components/organism/PreviewTemplateModal/constants/index.js +4 -0
- package/es/components/organism/PreviewTemplateModal/constants/variables.d.ts +12 -0
- package/es/components/organism/PreviewTemplateModal/constants/variables.js +12 -0
- package/es/components/organism/PreviewTemplateModal/index.d.ts +3 -0
- package/es/components/organism/PreviewTemplateModal/index.js +34 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/BannerPropsTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/BannerPropsTable/index.js +34 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/DataTypeTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/DataTypeTable/index.js +62 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/InformationPropsTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/InformationPropsTable/index.js +76 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/SimilarTemplatePropsTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/SimilarTemplatePropsTable/index.js +40 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/TThumbnailTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/TThumbnailTable/index.js +30 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/ThumbnailPropsTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/ThumbnailPropsTable/index.js +46 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/index.d.ts +6 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/index.js +6 -0
- package/es/components/organism/PreviewTemplateModal/styled.d.ts +4 -0
- package/es/components/organism/PreviewTemplateModal/styled.js +26 -0
- package/es/components/organism/PreviewTemplateModal/types.d.ts +38 -0
- package/es/components/organism/PreviewTemplateModal/types.js +1 -0
- package/es/components/organism/index.d.ts +1 -0
- package/es/components/organism/index.js +1 -0
- package/es/components/template/TemplateListing/Loadable.d.ts +6 -0
- package/es/components/template/TemplateListing/Loadable.js +7 -0
- package/es/components/template/TemplateListing/components/BlankTemplate/index.js +3 -1
- package/es/components/template/TemplateListing/components/CategoryListing/index.js +19 -10
- package/es/components/template/TemplateListing/components/CategoryListing/styled.d.ts +2 -0
- package/es/components/template/TemplateListing/components/CategoryListing/styled.js +50 -8
- package/es/components/template/TemplateListing/components/Empty/index.d.ts +3 -0
- package/es/components/template/TemplateListing/components/Empty/index.js +18 -0
- package/es/components/template/TemplateListing/components/Empty/styled.d.ts +3 -0
- package/es/components/template/TemplateListing/components/Empty/styled.js +35 -0
- package/es/components/template/TemplateListing/components/index.d.ts +1 -0
- package/es/components/template/TemplateListing/components/index.js +1 -0
- package/es/components/template/TemplateListing/constants/defaultProps.d.ts +5 -3
- package/es/components/template/TemplateListing/constants/defaultProps.js +8 -7
- package/es/components/template/TemplateListing/hooks/index.d.ts +1 -0
- package/es/components/template/TemplateListing/hooks/index.js +1 -0
- package/es/components/template/TemplateListing/hooks/useTemplateListing.d.ts +62 -0
- package/es/components/template/TemplateListing/hooks/useTemplateListing.js +230 -0
- package/es/components/template/TemplateListing/index.js +75 -14
- package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.js +46 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.js +57 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.js +78 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.js +30 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TCategoryItemTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TCategoryItemTable/index.js +46 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TTemplateItemTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TTemplateItemTable/index.js +38 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.js +50 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/index.d.ts +7 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/index.js +7 -0
- package/es/components/template/TemplateListing/stories/demo/styled.d.ts +1 -0
- package/es/components/template/TemplateListing/stories/demo/styled.js +7 -0
- package/es/components/template/TemplateListing/styled/index.d.ts +1 -0
- package/es/components/template/TemplateListing/styled/index.js +24 -5
- package/es/components/template/TemplateListing/types/BlankTemplate.d.ts +1 -1
- package/es/components/template/TemplateListing/types/CategoryListing.d.ts +5 -2
- package/es/components/template/TemplateListing/types/Empty.d.ts +5 -0
- package/es/components/template/TemplateListing/types/Empty.js +1 -0
- package/es/components/template/TemplateListing/types/TemplateListing.d.ts +16 -6
- package/es/components/template/index.d.ts +2 -1
- package/es/components/template/index.js +5 -1
- package/es/constants/datetime.d.ts +8 -0
- package/es/constants/datetime.js +1594 -0
- package/es/constants/index.d.ts +5 -1
- package/es/constants/index.js +5 -1
- package/es/constants/queries.d.ts +4 -0
- package/es/constants/queries.js +5 -0
- package/es/constants/templateListing.d.ts +50 -0
- package/es/constants/templateListing.js +52 -0
- package/es/constants/theme.js +1 -1
- package/es/constants/variables.d.ts +19 -0
- package/es/constants/variables.js +19 -0
- package/es/hooks/index.d.ts +4 -0
- package/es/hooks/index.js +4 -0
- package/es/hooks/useEffectOnlyOnce.d.ts +2 -0
- package/es/hooks/useEffectOnlyOnce.js +12 -0
- package/es/hooks/useForceUpdate.d.ts +1 -0
- package/es/hooks/useForceUpdate.js +5 -0
- package/es/hooks/useIntersectionObserver.d.ts +57 -0
- package/es/hooks/useIntersectionObserver.js +97 -0
- package/es/hooks/useListingItemResize.d.ts +12 -0
- package/es/hooks/useListingItemResize.js +58 -0
- package/es/hooks/useScrollToEnd.d.ts +1 -0
- package/es/hooks/useScrollToEnd.js +30 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +3 -0
- package/es/locales/en/translation.json +9 -1
- package/es/locales/i18n.d.ts +16 -0
- package/es/locales/translations.d.ts +8 -0
- package/es/locales/vi/translation.json +9 -1
- package/es/models/ObjectTemplate.d.ts +56 -0
- package/es/models/ObjectTemplate.js +82 -0
- package/es/models/TemplateCategory.d.ts +13 -0
- package/es/models/TemplateCategory.js +28 -0
- package/es/queries/CustomFunction/useCustomFunction.js +35 -35
- package/es/queries/TemplateListing/index.d.ts +52 -0
- package/es/queries/TemplateListing/index.js +105 -0
- package/es/queries/index.d.ts +1 -0
- package/es/queries/index.js +1 -0
- package/es/services/TemplateListing/index.d.ts +70 -0
- package/es/services/TemplateListing/index.js +161 -0
- package/es/test.js +65 -11
- package/es/types/index.d.ts +5 -0
- package/es/types/index.js +3 -0
- package/es/types/service.d.ts +22 -0
- package/es/types/service.js +1 -0
- package/es/types/share-access.d.ts +18 -0
- package/es/types/share-access.js +1 -0
- package/es/types/templateListing.d.ts +13 -0
- package/es/types/templateListing.js +1 -0
- package/es/types/variables.d.ts +3 -0
- package/es/utils/common.d.ts +4 -0
- package/es/utils/common.js +38 -0
- package/es/utils/commonComponent.d.ts +7 -0
- package/es/utils/commonComponent.js +28 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/es/utils/templateListing.d.ts +2 -0
- package/es/utils/templateListing.js +12 -0
- package/package.json +6 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
3
|
+
import { useGetTemplateCategoryList, useGetObjectTemplateList, } from '@antscorp/antsomi-ui/es/queries/TemplateListing';
|
|
4
|
+
// Hooks
|
|
5
|
+
import { useDeepCompareEffect, useDeepCompareMemo } from '@antscorp/antsomi-ui/es/hooks';
|
|
6
|
+
import { Form } from 'antd';
|
|
7
|
+
import { camelCaseToSnakeCase, snakeCaseToCamelCase } from '@antscorp/antsomi-ui/es/utils';
|
|
8
|
+
/**
|
|
9
|
+
* Custom React Hook for managing state and data fetching logic related to a template listing.
|
|
10
|
+
*
|
|
11
|
+
* @param {Object} options - The options object for configuring the hook.
|
|
12
|
+
* @param {PayloadInfo} options.service - Payload information for making API requests.
|
|
13
|
+
* @param {TTemplateListingConfig} options.config - Configuration options for the template listing.
|
|
14
|
+
*
|
|
15
|
+
* @property {TCategoryItem[]} categoryItems - An array of category items for rendering the template listing's category structure.
|
|
16
|
+
* @property {Array<{ id: string | number; label: string; thumbnail?: string }>} templateItems - An array of template items representing the templates available for the specified configuration.
|
|
17
|
+
* @property {boolean} isLoading - A boolean indicating whether data is currently being loaded.
|
|
18
|
+
*
|
|
19
|
+
* @property {Function} onLoadMore - A function to load more template data when scrolling in the template listing.
|
|
20
|
+
*/
|
|
21
|
+
export const useTemplateSave = (options) => {
|
|
22
|
+
const { service, config, queriesOptions, defaultValue: valueArg } = options;
|
|
23
|
+
const { objectType, categoryCodes, publicLevel, limitListPerPage = 10, getListType } = config;
|
|
24
|
+
const { categoryList: categoryListOptions, templateList: templateListOptions } = queriesOptions || {};
|
|
25
|
+
const [searchName, setSearchName] = useState('');
|
|
26
|
+
const [value, setValue] = useState(valueArg || {});
|
|
27
|
+
const [errors, setErrors] = useState();
|
|
28
|
+
const handleFormatCategories = (categories) => {
|
|
29
|
+
const snakeCase = camelCaseToSnakeCase(categories || {});
|
|
30
|
+
const camelCase = snakeCaseToCamelCase(categories || {});
|
|
31
|
+
return { camelCase, snakeCase };
|
|
32
|
+
};
|
|
33
|
+
const formattedCategoriesValue = useMemo(() => handleFormatCategories(value.categories), [value]);
|
|
34
|
+
useDeepCompareEffect(() => {
|
|
35
|
+
setValue(valueArg || {});
|
|
36
|
+
}, [valueArg]);
|
|
37
|
+
const [form] = Form.useForm();
|
|
38
|
+
const { data: categoryList, isLoading: isLoadingCategoryList, refetch: refetchCategoryList, } = useGetTemplateCategoryList({
|
|
39
|
+
args: {
|
|
40
|
+
auth: service,
|
|
41
|
+
params: {
|
|
42
|
+
objectTypes: [objectType],
|
|
43
|
+
categoryCodes,
|
|
44
|
+
publicLevel,
|
|
45
|
+
getListType,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
options: categoryListOptions,
|
|
49
|
+
});
|
|
50
|
+
// Queries
|
|
51
|
+
const { data: infiniteObjectTemplate, isFetchingNextPage, isFetching, hasNextPage, fetchNextPage, refetch: refetchTemplateList, } = useGetObjectTemplateList({
|
|
52
|
+
args: {
|
|
53
|
+
auth: service,
|
|
54
|
+
params: Object.assign({ get_list_type: getListType, object_type: objectType, public_level: publicLevel, limit: limitListPerPage }, (searchName
|
|
55
|
+
? { filter: JSON.stringify([{ TEMPLATE_NAME: { contain: searchName } }]) }
|
|
56
|
+
: {})),
|
|
57
|
+
},
|
|
58
|
+
options: templateListOptions,
|
|
59
|
+
});
|
|
60
|
+
// Variables
|
|
61
|
+
const isLoadingTemplateList = isFetching || isFetchingNextPage;
|
|
62
|
+
// Memo
|
|
63
|
+
const categoryItems = useDeepCompareMemo(() => {
|
|
64
|
+
const recursiveCategory = (categories = []) => categories.map(category => {
|
|
65
|
+
const { categoryCode, categoryId, categoryName, children } = category;
|
|
66
|
+
const key = Array.isArray(children) && children.length ? categoryCode : categoryId;
|
|
67
|
+
return Object.assign({ key, label: categoryName }, ((children === null || children === void 0 ? void 0 : children.length) > 0 ? { children: recursiveCategory(children) } : {}));
|
|
68
|
+
});
|
|
69
|
+
return recursiveCategory(categoryList || []);
|
|
70
|
+
}, [categoryList]);
|
|
71
|
+
const templateItems = useMemo(() => {
|
|
72
|
+
if (infiniteObjectTemplate) {
|
|
73
|
+
const { pages } = infiniteObjectTemplate;
|
|
74
|
+
return pages.flatMap(({ entities }) => entities.flatMap(({ id, name, thumbnail }) => ({
|
|
75
|
+
id,
|
|
76
|
+
label: name,
|
|
77
|
+
thumbnail,
|
|
78
|
+
})));
|
|
79
|
+
}
|
|
80
|
+
return [];
|
|
81
|
+
}, [infiniteObjectTemplate]);
|
|
82
|
+
const onLoadMore = useCallback(() => {
|
|
83
|
+
if (!isFetchingNextPage && hasNextPage) {
|
|
84
|
+
fetchNextPage();
|
|
85
|
+
}
|
|
86
|
+
}, [fetchNextPage, hasNextPage, isFetchingNextPage]);
|
|
87
|
+
const onChange = (newValue) => {
|
|
88
|
+
var _a, _b;
|
|
89
|
+
setErrors((_b = (_a = form === null || form === void 0 ? void 0 : form.getFieldsError()) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.errors);
|
|
90
|
+
setValue(newValue);
|
|
91
|
+
};
|
|
92
|
+
const reset = () => {
|
|
93
|
+
setValue(valueArg || {});
|
|
94
|
+
};
|
|
95
|
+
return {
|
|
96
|
+
// MapKeys
|
|
97
|
+
categoryItems,
|
|
98
|
+
templateItems,
|
|
99
|
+
// State value
|
|
100
|
+
value,
|
|
101
|
+
setValue,
|
|
102
|
+
reset,
|
|
103
|
+
// formattedValue
|
|
104
|
+
formattedCategoriesValue,
|
|
105
|
+
handleFormatCategories,
|
|
106
|
+
// Values
|
|
107
|
+
isLoadingCategoryList,
|
|
108
|
+
isLoadingTemplateList,
|
|
109
|
+
// Handle Search template name
|
|
110
|
+
searchName,
|
|
111
|
+
onSearchName: setSearchName,
|
|
112
|
+
// Form handler
|
|
113
|
+
form,
|
|
114
|
+
errors,
|
|
115
|
+
// Functions
|
|
116
|
+
refetchCategoryList,
|
|
117
|
+
refetchTemplateList,
|
|
118
|
+
onLoadMore,
|
|
119
|
+
onChange,
|
|
120
|
+
};
|
|
121
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const TemplateSaveAsStyled: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {
|
|
3
|
+
$skeleton?: boolean | undefined;
|
|
4
|
+
}, never>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
// Libraries
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
// Components
|
|
5
|
+
import { Flex } from '@antscorp/antsomi-ui/es/components';
|
|
6
|
+
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
7
|
+
export const TemplateSaveAsStyled = styled(Flex) `
|
|
8
|
+
padding: 10px;
|
|
9
|
+
/* max-width: 1177px; */
|
|
10
|
+
|
|
11
|
+
.save-options-container {
|
|
12
|
+
padding: 15px 0;
|
|
13
|
+
margin-bottom: 20px;
|
|
14
|
+
border-bottom: 1px dashed #e5e5e5;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.template-container {
|
|
18
|
+
width: 698px;
|
|
19
|
+
/* max-height: 567px; */
|
|
20
|
+
max-height: 50vh;
|
|
21
|
+
padding-right: 28px;
|
|
22
|
+
overflow-y: auto;
|
|
23
|
+
}
|
|
24
|
+
.share-access-container {
|
|
25
|
+
flex: 1;
|
|
26
|
+
padding: 0 28px;
|
|
27
|
+
border-left: 1px solid #e5e5e5;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.field-container {
|
|
31
|
+
gap: 10px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.field-title {
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
width: 150px;
|
|
37
|
+
/* background-color: violet; */
|
|
38
|
+
span {
|
|
39
|
+
color: ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.red6};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--middle {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
div:has(> .field-input) {
|
|
49
|
+
width: 330px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.category-container {
|
|
53
|
+
flex: 1;
|
|
54
|
+
display: grid;
|
|
55
|
+
grid-template-columns: repeat(2, 1fr);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.selected-category {
|
|
59
|
+
/* width: 240px; */
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
height: 30px;
|
|
62
|
+
border: 1px solid #b8cfe6;
|
|
63
|
+
padding: 0 5px;
|
|
64
|
+
border-radius: 3px;
|
|
65
|
+
|
|
66
|
+
& > span.remove-btn {
|
|
67
|
+
font-size: 20px;
|
|
68
|
+
font-weight: bold;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
user-select: none;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
@@ -30,10 +30,13 @@ import { Button, Flex, Typography } from '../../atoms';
|
|
|
30
30
|
import { THUMBNAIL_CARD_DEFAULT_HEIGHT, THUMBNAIL_CARD_DEFAULT_WIDTH } from './constants';
|
|
31
31
|
export const ThumbnailCard = memo(props => {
|
|
32
32
|
const [modal, contextHolder] = Modal.useModal();
|
|
33
|
-
const { id, width = THUMBNAIL_CARD_DEFAULT_WIDTH, height = THUMBNAIL_CARD_DEFAULT_HEIGHT, thumbnail, removable = true,
|
|
33
|
+
const { id, name, width = THUMBNAIL_CARD_DEFAULT_WIDTH, height = THUMBNAIL_CARD_DEFAULT_HEIGHT, thumbnail, removable = true, actionAvailable = true, removeModalProps, editBtnProps, previewBtnProps, onClickWrapper } = props, restOfProps = __rest(props, ["id", "name", "width", "height", "thumbnail", "removable", "actionAvailable", "removeModalProps", "editBtnProps", "previewBtnProps", "onClickWrapper"]);
|
|
34
34
|
const _a = removeModalProps || {}, { onOk } = _a, restOfRemoveTemplateModalProps = __rest(_a, ["onOk"]);
|
|
35
|
+
const _b = editBtnProps || {}, { text: editText = 'Edit thumbnail', onClick: onClickEdit } = _b, restOfEditBtnProps = __rest(_b, ["text", "onClick"]);
|
|
36
|
+
const _c = previewBtnProps || {}, { text: previewText = 'Preview', onClick: onClickPreview } = _c, restOfPreviewBtnProps = __rest(_c, ["text", "onClick"]);
|
|
35
37
|
// Handlers
|
|
36
|
-
const handleRemoveThumbnail =
|
|
38
|
+
const handleRemoveThumbnail = e => {
|
|
39
|
+
e.stopPropagation();
|
|
37
40
|
modal.confirm(Object.assign(Object.assign({ title: 'Remove Template', centered: true, icon: React.createElement(Icon, { type: "icon-ants-info", style: { fontSize: 16, lineHeight: '25px' } }), content: (React.createElement("div", null,
|
|
38
41
|
React.createElement("p", null, "Are you sure you want to remove the template?"),
|
|
39
42
|
React.createElement("p", null, "This action cant not be undone."))), okText: 'Remove', cancelText: 'Cancel', closable: true }, restOfRemoveTemplateModalProps), { onOk: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -41,16 +44,29 @@ export const ThumbnailCard = memo(props => {
|
|
|
41
44
|
onOk(id);
|
|
42
45
|
}) }));
|
|
43
46
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
const handleWrapperClick = e => {
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
onClickWrapper === null || onClickWrapper === void 0 ? void 0 : onClickWrapper(id);
|
|
50
|
+
};
|
|
51
|
+
return (React.createElement(Flex, Object.assign({ gap: 10, vertical: true }, restOfProps, { style: Object.assign({ width }, restOfProps.style) }),
|
|
52
|
+
React.createElement(ThumbnailCardWrapper, { style: { height, cursor: actionAvailable ? 'default' : 'pointer' }, onClick: handleWrapperClick },
|
|
53
|
+
React.createElement("div", { className: "screen" }, thumbnail && React.createElement("img", { src: thumbnail, alt: "" })),
|
|
54
|
+
actionAvailable && (React.createElement(React.Fragment, null,
|
|
55
|
+
React.createElement(Flex, { className: "center-action", align: "center", gap: 10, vertical: true },
|
|
56
|
+
React.createElement(Button, Object.assign({ type: "primary", className: "animate__animated animate__fadeIn" }, restOfEditBtnProps, { onClick: e => {
|
|
57
|
+
e.stopPropagation();
|
|
58
|
+
onClickEdit === null || onClickEdit === void 0 ? void 0 : onClickEdit(id);
|
|
59
|
+
} }),
|
|
60
|
+
React.createElement(Typography.Text, { ellipsis: { tooltip: editText }, style: { maxWidth: '100%', color: 'inherit' } }, editText)),
|
|
61
|
+
React.createElement(Button, Object.assign({ className: "animate__animated animate__fadeIn", onClick: e => {
|
|
62
|
+
e.stopPropagation();
|
|
63
|
+
onClickPreview === null || onClickPreview === void 0 ? void 0 : onClickPreview(id);
|
|
64
|
+
} }, restOfPreviewBtnProps),
|
|
65
|
+
React.createElement(Typography.Text, { ellipsis: { tooltip: previewText }, style: { maxWidth: '100%', color: 'inherit' } }, previewText))),
|
|
66
|
+
removable && (React.createElement("div", { className: "top-right-corner-action animate__animated animate__fadeIn" },
|
|
67
|
+
React.createElement(Button, { type: "primary", icon: React.createElement(Icon, { type: "icon-ants-trash-outline", style: { fontSize: 24, color: '#FFFFFF' } }), onClick: handleRemoveThumbnail }))),
|
|
68
|
+
React.createElement("div", { className: "backdrop" }),
|
|
69
|
+
React.createElement("div", null, contextHolder)))),
|
|
70
|
+
!!name && (React.createElement(Typography.Text, { ellipsis: { tooltip: name }, style: { maxWidth: '100%' } }, name))));
|
|
55
71
|
});
|
|
56
72
|
ThumbnailCard.displayName = 'ThumbnailCard';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const THUMBNAIL_CARD_DEFAULT_WIDTH =
|
|
2
|
-
export declare const THUMBNAIL_CARD_DEFAULT_HEIGHT =
|
|
1
|
+
export declare const THUMBNAIL_CARD_DEFAULT_WIDTH = 330;
|
|
2
|
+
export declare const THUMBNAIL_CARD_DEFAULT_HEIGHT = 230;
|
|
3
3
|
export declare const THUMBNAIL_URL = "https://st-media-template.antsomi.com/base64-img/37563.png";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const THUMBNAIL_CARD_DEFAULT_WIDTH =
|
|
2
|
-
export const THUMBNAIL_CARD_DEFAULT_HEIGHT =
|
|
1
|
+
export const THUMBNAIL_CARD_DEFAULT_WIDTH = 330;
|
|
2
|
+
export const THUMBNAIL_CARD_DEFAULT_HEIGHT = 230;
|
|
3
3
|
export const THUMBNAIL_URL = 'https://st-media-template.antsomi.com/base64-img/37563.png';
|
|
@@ -9,6 +9,7 @@ export const ThumbnailCardWrapper = styled.div `
|
|
|
9
9
|
border-radius: ${THUMBNAIL_CARD_RADIUS}px;
|
|
10
10
|
position: relative;
|
|
11
11
|
box-sizing: border-box;
|
|
12
|
+
width: 100%;
|
|
12
13
|
|
|
13
14
|
:hover {
|
|
14
15
|
.center-action {
|
|
@@ -32,7 +33,7 @@ export const ThumbnailCardWrapper = styled.div `
|
|
|
32
33
|
.screen {
|
|
33
34
|
width: 100%;
|
|
34
35
|
height: 100%;
|
|
35
|
-
background
|
|
36
|
+
background: center / cover no-repeat url(${skeletonBackground});
|
|
36
37
|
|
|
37
38
|
img {
|
|
38
39
|
width: 100%;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import { ModalFuncProps } from 'antd';
|
|
1
|
+
import { ModalFuncProps, ButtonProps } from 'antd';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
2
3
|
export type TThumbnailCardId = string | number;
|
|
3
4
|
export type TRemoveModalProps = Omit<ModalFuncProps, 'onOk'> & {
|
|
4
5
|
onOk?: (id: TThumbnailCardId) => void;
|
|
5
6
|
};
|
|
6
|
-
export
|
|
7
|
+
export type TThumbnailButton = Omit<ButtonProps, 'onClick'> & {
|
|
8
|
+
text?: string;
|
|
9
|
+
onClick?: (id: TThumbnailCardId) => void;
|
|
10
|
+
};
|
|
11
|
+
export interface ThumbnailCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'id'> {
|
|
7
12
|
id: TThumbnailCardId;
|
|
13
|
+
name?: string;
|
|
8
14
|
width?: number;
|
|
9
15
|
height?: number;
|
|
10
16
|
thumbnail?: string;
|
|
11
17
|
removable?: boolean;
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
editBtnProps?: TThumbnailButton;
|
|
19
|
+
previewBtnProps?: TThumbnailButton;
|
|
20
|
+
actionAvailable?: boolean;
|
|
14
21
|
removeModalProps?: TRemoveModalProps;
|
|
15
|
-
|
|
16
|
-
onClickPreview?: (id: TThumbnailCardId) => void;
|
|
22
|
+
onClickWrapper?: (id: TThumbnailCardId) => void;
|
|
17
23
|
}
|
|
@@ -312,7 +312,7 @@ export const UploadImage = props => {
|
|
|
312
312
|
React.createElement(Input, { label: mode === 'video' ? 'Video URL' : 'Image URL', required: required, placeholder: placeholder, value: selectedMedia.url ? selectedMedia.url : '', focused: focused, onAfterChange: value => handleSelectMedia({
|
|
313
313
|
url: value,
|
|
314
314
|
}) }))))),
|
|
315
|
-
React.createElement(Modal, { title: labelModalDelete, visible: isOpenConfirmDelete, onOk: () => handleRemoveUploadedMedia(deleteMediaRef.current, false), onCancel: () => setOpenConfirmDelete(prev => !prev), okText: "OK", cancelText: "Cancel" },
|
|
315
|
+
React.createElement(Modal, { title: labelModalDelete, visible: isOpenConfirmDelete, onOk: () => handleRemoveUploadedMedia(deleteMediaRef.current, false), onCancel: () => setOpenConfirmDelete(prev => !prev), okText: "OK", cancelText: "Cancel", destroyOnClose: true },
|
|
316
316
|
React.createElement("p", null,
|
|
317
317
|
"Are you sure you want to delete ", (_d = deleteMediaRef.current) === null || _d === void 0 ? void 0 :
|
|
318
318
|
_d.name,
|
|
@@ -35,9 +35,11 @@ export { Form } from './Form';
|
|
|
35
35
|
export { ResizeGrid } from './ResizeGrid';
|
|
36
36
|
export * from './RichMenu';
|
|
37
37
|
export { ModalV2 } from './ModalV2';
|
|
38
|
+
export { TemplateSaveAs, TemplateSaveAsModal, useTemplateSave } from './TemplateSaveAs';
|
|
38
39
|
export * from './PreviewModal';
|
|
39
40
|
export * from './Drawer';
|
|
40
41
|
export { EditorScript } from './EditorScript';
|
|
42
|
+
export { CalendarSelection, CalendarSelectionConstants } from './CalendarSelection';
|
|
41
43
|
export type { AdvancedPickerProps, TAdvancedPickerOption, TAdvancedRangePickerTimeRange, } from './DatePicker';
|
|
42
44
|
export type { ColorPickerProps } from './ColorPicker';
|
|
43
45
|
export type { AlignEditProps, AlignSettingProps } from './AlignSetting';
|
|
@@ -45,3 +47,4 @@ export type { TFontSettingProps, TFontSettingEditProps } from './FontSetting';
|
|
|
45
47
|
export type { IResizeGridProps, TCell, TGrid } from './ResizeGrid';
|
|
46
48
|
export type { ModalProps } from './ModalV2';
|
|
47
49
|
export type { ThumbnailCardProps } from './ThumbnailCard';
|
|
50
|
+
export type { TemplateValueOptions } from './TemplateSaveAs';
|
|
@@ -35,6 +35,8 @@ export { Form } from './Form';
|
|
|
35
35
|
export { ResizeGrid } from './ResizeGrid';
|
|
36
36
|
export * from './RichMenu';
|
|
37
37
|
export { ModalV2 } from './ModalV2';
|
|
38
|
+
export { TemplateSaveAs, TemplateSaveAsModal, useTemplateSave } from './TemplateSaveAs';
|
|
38
39
|
export * from './PreviewModal';
|
|
39
40
|
export * from './Drawer';
|
|
40
41
|
export { EditorScript } from './EditorScript';
|
|
42
|
+
export { CalendarSelection, CalendarSelectionConstants } from './CalendarSelection';
|
|
@@ -100,6 +100,7 @@ const Help = props => {
|
|
|
100
100
|
const [isLoadingListHelp, setIsLoadingHelp] = useState(true);
|
|
101
101
|
const recorderRef = useRef();
|
|
102
102
|
const streamTracks = useRef();
|
|
103
|
+
const allAppOptionsRef = useRef([]);
|
|
103
104
|
// const showModal = (captureKey: CaptureTypeProps) => {
|
|
104
105
|
// setOpen(true);
|
|
105
106
|
// setCaptureType(captureKey);
|
|
@@ -218,6 +219,7 @@ const Help = props => {
|
|
|
218
219
|
}));
|
|
219
220
|
setAppTargeting(temp[0]);
|
|
220
221
|
setAllAppOptions(temp);
|
|
222
|
+
allAppOptionsRef.current = temp;
|
|
221
223
|
}
|
|
222
224
|
}
|
|
223
225
|
}
|
|
@@ -281,7 +283,6 @@ const Help = props => {
|
|
|
281
283
|
setAutoExpandParent(false);
|
|
282
284
|
setExpandedKeys([]);
|
|
283
285
|
};
|
|
284
|
-
useEffect(() => () => handleResetData(), []);
|
|
285
286
|
useEffect(() => {
|
|
286
287
|
if (dataRecorded) {
|
|
287
288
|
const dataRecordedBlob = new Blob(dataRecorded, { type: 'video/mp4' });
|
|
@@ -531,6 +532,34 @@ const Help = props => {
|
|
|
531
532
|
}
|
|
532
533
|
}
|
|
533
534
|
};
|
|
535
|
+
useEffect(() => {
|
|
536
|
+
const handleEvent = e => {
|
|
537
|
+
const { type, helpType, helpInfo } = e.data;
|
|
538
|
+
if (!type || !helpType || !helpInfo) {
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
switch (type) {
|
|
542
|
+
case 'open_antsomi_help':
|
|
543
|
+
if (REPORT_TYPES[helpType]) {
|
|
544
|
+
setIsShowPopup(true);
|
|
545
|
+
callback(REPORT_TYPES[helpType]);
|
|
546
|
+
setValueInput(prev => (Object.assign(Object.assign({}, prev), helpInfo)));
|
|
547
|
+
if (helpInfo.feature && Array.isArray(allAppOptions)) {
|
|
548
|
+
const targetApp = allAppOptionsRef.current.find(item => item.value === helpInfo.feature);
|
|
549
|
+
if (targetApp)
|
|
550
|
+
setAppTargeting(targetApp);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
break;
|
|
554
|
+
default:
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
window.addEventListener('message', handleEvent);
|
|
558
|
+
return () => {
|
|
559
|
+
handleResetData();
|
|
560
|
+
window.removeEventListener('message', handleEvent);
|
|
561
|
+
};
|
|
562
|
+
}, []);
|
|
534
563
|
const handleCreateTicket = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
535
564
|
try {
|
|
536
565
|
setIsMainLoading(true);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Menu } from './Menu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Menu } from './Menu';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import React, { memo } from 'react';
|
|
3
|
+
// Styled
|
|
4
|
+
import { BannerWrapper } from './styled';
|
|
5
|
+
export const Banner = memo(props => {
|
|
6
|
+
const { deviceType, showBackgroundSkeleton = false, children } = props;
|
|
7
|
+
return (React.createElement(BannerWrapper, { deviceType: deviceType, showBackgroundSkeleton: showBackgroundSkeleton },
|
|
8
|
+
React.createElement("div", { className: "device-type" },
|
|
9
|
+
React.createElement("div", { className: "device-type__background" }),
|
|
10
|
+
React.createElement("div", { className: "device-type__wrapper" },
|
|
11
|
+
React.createElement("div", { className: "content-wrapper" }, children || null),
|
|
12
|
+
React.createElement("div", { className: "backdrop" })))));
|
|
13
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
// Images
|
|
3
|
+
import skeletonBackground from '../../../../../assets/images/background/skeleton-background.png';
|
|
4
|
+
import MobileFrame from '../../../../../assets/svg/mobile-frame.svg';
|
|
5
|
+
// Constants
|
|
6
|
+
import { DEVICE_TYPE } from '../../constants';
|
|
7
|
+
const THUMBNAIL_CARD_RADIUS = 5;
|
|
8
|
+
const { MOBILE } = DEVICE_TYPE;
|
|
9
|
+
const MOBILE_BORDER_RADIUS = '19px 19px 19px 21px / 21px 21px 21px 21px';
|
|
10
|
+
export const BannerWrapper = styled.div `
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 762px;
|
|
13
|
+
max-height: 762px;
|
|
14
|
+
overflow-y: hidden;
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
background-color: #0000001a;
|
|
19
|
+
|
|
20
|
+
.device-type {
|
|
21
|
+
position: relative;
|
|
22
|
+
height: 750px;
|
|
23
|
+
border-radius: ${THUMBNAIL_CARD_RADIUS}px;
|
|
24
|
+
width: 100%;
|
|
25
|
+
|
|
26
|
+
.device-type__wrapper,
|
|
27
|
+
.device-type__background {
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100%;
|
|
30
|
+
position: absolute;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
${p => {
|
|
34
|
+
switch (p.deviceType) {
|
|
35
|
+
case MOBILE.value:
|
|
36
|
+
return `
|
|
37
|
+
width: 416.004px;
|
|
38
|
+
height: 713px;
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
align-items: center;
|
|
42
|
+
|
|
43
|
+
.device-type__background {
|
|
44
|
+
background: url(${MobileFrame}) no-repeat center center;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.device-type__wrapper {
|
|
48
|
+
width: 391px;
|
|
49
|
+
left: 11px;
|
|
50
|
+
height: 661px;
|
|
51
|
+
top: 11px;
|
|
52
|
+
z-index: 1;
|
|
53
|
+
border-radius: ${MOBILE_BORDER_RADIUS};
|
|
54
|
+
|
|
55
|
+
.content-wrapper {
|
|
56
|
+
border-radius: inherit;
|
|
57
|
+
|
|
58
|
+
& > * {
|
|
59
|
+
border-radius: inherit;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
default:
|
|
65
|
+
return p.showBackgroundSkeleton
|
|
66
|
+
? `
|
|
67
|
+
.device-type__background {
|
|
68
|
+
background: center / cover no-repeat url(${skeletonBackground});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.device-type__wrapper {
|
|
72
|
+
.backdrop {
|
|
73
|
+
border-radius: ${THUMBNAIL_CARD_RADIUS}px;
|
|
74
|
+
position: absolute;
|
|
75
|
+
width: 100%;
|
|
76
|
+
height: 100%;
|
|
77
|
+
background-color: black;
|
|
78
|
+
opacity: 0.5;
|
|
79
|
+
z-index: 10;
|
|
80
|
+
top: 0;
|
|
81
|
+
left: 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
`
|
|
85
|
+
: '';
|
|
86
|
+
}
|
|
87
|
+
}}
|
|
88
|
+
|
|
89
|
+
.content-wrapper {
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: 0;
|
|
92
|
+
left: 0;
|
|
93
|
+
z-index: 12;
|
|
94
|
+
width: 100%;
|
|
95
|
+
height: 100%;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
`;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import React, { memo } from 'react';
|
|
3
|
+
import Icon from '@antscorp/icons';
|
|
4
|
+
// Styled
|
|
5
|
+
import { InformationWrapper } from './styled';
|
|
6
|
+
// Components
|
|
7
|
+
import { Button, Radio, Typography, Flex } from '../../../../atoms';
|
|
8
|
+
// Constants
|
|
9
|
+
import { DEVICE_TYPE } from '../../constants';
|
|
10
|
+
export const Information = memo(props => {
|
|
11
|
+
const { deviceType, itemName = 'Template name', buttonText = 'Use template', description = '', categoryListing, showDeviceRadios = true, onButtonClick, onDeviceTypeChange, } = props;
|
|
12
|
+
return (React.createElement(InformationWrapper, { gap: 20, vertical: true },
|
|
13
|
+
React.createElement("div", { style: { flexShrink: 0 }, className: "title" }, itemName),
|
|
14
|
+
React.createElement(Flex, { gap: 20, vertical: true, className: "content-information" },
|
|
15
|
+
React.createElement("div", null, description), categoryListing === null || categoryListing === void 0 ? void 0 :
|
|
16
|
+
categoryListing.map(({ key, label, children }) => (React.createElement("div", { key: key },
|
|
17
|
+
React.createElement("div", null,
|
|
18
|
+
label,
|
|
19
|
+
":"),
|
|
20
|
+
React.createElement("div", { style: { fontWeight: 'bold' } }, children === null || children === void 0 ? void 0 : children.map(({ label }) => label).join(', ')))))),
|
|
21
|
+
showDeviceRadios && (React.createElement(Radio.Group, { options: Object.values(DEVICE_TYPE).map(({ value, label, icon }) => ({
|
|
22
|
+
label: (React.createElement(Flex, { gap: 5, align: "center" },
|
|
23
|
+
React.createElement(Icon, { type: icon }),
|
|
24
|
+
label)),
|
|
25
|
+
value,
|
|
26
|
+
})), onChange: e => onDeviceTypeChange(e.target.value), value: deviceType, optionType: "button", style: { flexShrink: 0 } })),
|
|
27
|
+
React.createElement(Button, { type: "primary", style: { width: '100%', flexShrink: 0 }, onClick: onButtonClick },
|
|
28
|
+
React.createElement(Typography.Text, { ellipsis: { tooltip: buttonText }, style: { maxWidth: '100%', color: 'inherit' } }, buttonText))));
|
|
29
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InformationWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
// Components
|
|
4
|
+
import { Flex } from '../../../../atoms';
|
|
5
|
+
export const InformationWrapper = styled(Flex) `
|
|
6
|
+
width: 350px;
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
font-size: 12px;
|
|
9
|
+
max-height: 762px;
|
|
10
|
+
|
|
11
|
+
.title {
|
|
12
|
+
font-size: 16px;
|
|
13
|
+
font-weight: 700;
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
color: inherit;
|
|
16
|
+
padding-right: 20px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.antsomi-radio-group {
|
|
20
|
+
width: 100%;
|
|
21
|
+
display: flex;
|
|
22
|
+
|
|
23
|
+
.antsomi-radio-button-wrapper {
|
|
24
|
+
flex: 1 1 0%;
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
align-items: center;
|
|
28
|
+
height: 30px;
|
|
29
|
+
|
|
30
|
+
i {
|
|
31
|
+
height: fit-content;
|
|
32
|
+
font-size: 24px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.content-information {
|
|
37
|
+
flex: 1 1 0%;
|
|
38
|
+
overflow-y: auto;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`;
|