@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
package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface AdvancedRangePickerProps {
|
|
|
13
13
|
showTime?: boolean;
|
|
14
14
|
timezone?: string;
|
|
15
15
|
separator?: ReactNode;
|
|
16
|
+
inputStyle?: React.CSSProperties;
|
|
16
17
|
onChange?: ({ timeRange, mode }: TOnChangePayload) => void;
|
|
17
18
|
}
|
|
18
19
|
export declare const AdvancedRangePicker: React.FC<AdvancedRangePickerProps>;
|
package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js
CHANGED
|
@@ -19,7 +19,7 @@ const PATH = '@antscorp/antsomi-ui/es/components/molecules/DatePicker/components
|
|
|
19
19
|
export const AdvancedRangePicker = props => {
|
|
20
20
|
const { t } = i18nInstance;
|
|
21
21
|
// Props
|
|
22
|
-
const { valueType, timeRange, errorMessage, showLabel, startDateConfig, endDateConfig, showTime, showCalculationTypeCondition, disabled, timezone, separator, onChange, } = props;
|
|
22
|
+
const { valueType, timeRange, errorMessage, showLabel, startDateConfig, endDateConfig, showTime, showCalculationTypeCondition, disabled, timezone, separator, inputStyle, onChange, } = props;
|
|
23
23
|
const [timeRangeState, setTimeRange] = useState(timeRange);
|
|
24
24
|
useDeepCompareEffect(() => {
|
|
25
25
|
if (typeof onChange === 'function') {
|
|
@@ -55,9 +55,9 @@ export const AdvancedRangePicker = props => {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
return (React.createElement(Space, { size: 20, align: "end" },
|
|
58
|
-
React.createElement(AdvancedPicker, { valueType: valueType, disabled: disabled, label: showLabel ? t(translations.datePicker.startDate) || '' : '', date: timeRange.startDate.date, option: omit(timeRange.startDate, 'date'), operatorKey: "between", type: "startDate", format: ADVANCED_RANGE_PICKER_FORMAT.startDate, errorMessage: errorMessage, disableAfterDate: timeRange.endDate.date, showTime: showTime, calculationTypeKeysShow: startDateConfig === null || startDateConfig === void 0 ? void 0 : startDateConfig.calculationTypeKeysShow, showCalculationTypeCondition: showCalculationTypeCondition, timezone: timezone, onUpdatedNewDate: ({ date }) => onUpdateTimeRange('startDate', { date }, 'system'), onApply: ({ date, option }) => onUpdateTimeRange('startDate', Object.assign({ date }, option), 'user') }),
|
|
58
|
+
React.createElement(AdvancedPicker, { valueType: valueType, disabled: disabled, label: showLabel ? t(translations.datePicker.startDate) || '' : '', date: timeRange.startDate.date, option: omit(timeRange.startDate, 'date'), operatorKey: "between", type: "startDate", format: ADVANCED_RANGE_PICKER_FORMAT.startDate, errorMessage: errorMessage, disableAfterDate: timeRange.endDate.date, showTime: showTime, calculationTypeKeysShow: startDateConfig === null || startDateConfig === void 0 ? void 0 : startDateConfig.calculationTypeKeysShow, showCalculationTypeCondition: showCalculationTypeCondition, timezone: timezone, onUpdatedNewDate: ({ date }) => onUpdateTimeRange('startDate', { date }, 'system'), onApply: ({ date, option }) => onUpdateTimeRange('startDate', Object.assign({ date }, option), 'user'), inputStyle: inputStyle }),
|
|
59
59
|
separator || null,
|
|
60
|
-
React.createElement(AdvancedPicker, { valueType: valueType, disabled: disabled, label: showLabel ? t(translations.datePicker.endDate) || '' : '', date: timeRange.endDate.date, option: omit(timeRange.endDate, 'date'), operatorKey: "between", type: "endDate", format: ADVANCED_RANGE_PICKER_FORMAT.endDate, errorMessage: errorMessage, showTime: showTime, calculationTypeKeysShow: endDateConfig === null || endDateConfig === void 0 ? void 0 : endDateConfig.calculationTypeKeysShow, showCalculationTypeCondition: showCalculationTypeCondition, timezone: timezone, onUpdatedNewDate: ({ date }) => onUpdateTimeRange('endDate', { date }, 'system'), onApply: ({ date, option }) => onUpdateTimeRange('endDate', Object.assign({ date }, option), 'user') })));
|
|
60
|
+
React.createElement(AdvancedPicker, { valueType: valueType, disabled: disabled, label: showLabel ? t(translations.datePicker.endDate) || '' : '', date: timeRange.endDate.date, option: omit(timeRange.endDate, 'date'), operatorKey: "between", type: "endDate", format: ADVANCED_RANGE_PICKER_FORMAT.endDate, errorMessage: errorMessage, showTime: showTime, calculationTypeKeysShow: endDateConfig === null || endDateConfig === void 0 ? void 0 : endDateConfig.calculationTypeKeysShow, showCalculationTypeCondition: showCalculationTypeCondition, timezone: timezone, onUpdatedNewDate: ({ date }) => onUpdateTimeRange('endDate', { date }, 'system'), onApply: ({ date, option }) => onUpdateTimeRange('endDate', Object.assign({ date }, option), 'user'), inputStyle: inputStyle })));
|
|
61
61
|
};
|
|
62
62
|
AdvancedRangePicker.defaultProps = {
|
|
63
63
|
timeRange: {
|
|
@@ -30,7 +30,7 @@ export const DropdownLabel = React.memo(({ valueType, date, format, type, showTi
|
|
|
30
30
|
case 'YEAR_WEEK': {
|
|
31
31
|
const dayObj = dayjs(date || new Date(), format).locale('en');
|
|
32
32
|
// const dayObj = dayjs(date || new Date(), format).locale(locale || 'en');
|
|
33
|
-
formatLabel = `${WEEK_PLACEHOLDER}
|
|
33
|
+
formatLabel = `${WEEK_PLACEHOLDER}w, YYYY`;
|
|
34
34
|
subLabel = `${dayjs(dayObj).day(0).format('MMMM DD, YYYY')} - ${dayjs(dayObj)
|
|
35
35
|
.day(6)
|
|
36
36
|
.format('MMMM DD, YYYY')}`;
|
|
@@ -51,7 +51,7 @@ export const DropdownLabel = React.memo(({ valueType, date, format, type, showTi
|
|
|
51
51
|
formatLabel = 'MMMM';
|
|
52
52
|
break;
|
|
53
53
|
case 'WEEK':
|
|
54
|
-
formatLabel = `${WEEK_PLACEHOLDER}
|
|
54
|
+
formatLabel = `${WEEK_PLACEHOLDER}w`;
|
|
55
55
|
break;
|
|
56
56
|
case 'MONTH_DAY':
|
|
57
57
|
formatLabel = 'MMMM DD';
|
|
@@ -34,7 +34,7 @@ const defaultProps = {
|
|
|
34
34
|
selectColor: '#2f79bf80',
|
|
35
35
|
};
|
|
36
36
|
export const ResizeGrid = props => {
|
|
37
|
-
const { containerStyle, cellBorder, cellStyle, cellActiveStyle, isPreview, renderCell, grid: initGrid, image, imageSize, imagePosition, isCompact, onChange, delayUpdate, selectColor, } = props;
|
|
37
|
+
const { containerStyle, cellBorder, cellStyle, cellActiveStyle, isPreview, renderCell, grid: initGrid, image, imageSize, imagePosition, isCompact, onChange, delayUpdate, selectColor, reCalculateFlag, } = props;
|
|
38
38
|
const [grid, setGrid] = useState(buildGrid(initGrid || GRID_TEMPLATE.GRID_2_3));
|
|
39
39
|
const startRef = useRef(null);
|
|
40
40
|
const startCellRef = useRef(null);
|
|
@@ -106,7 +106,7 @@ export const ResizeGrid = props => {
|
|
|
106
106
|
useEffect(() => {
|
|
107
107
|
handleChangeGrid();
|
|
108
108
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
109
|
-
}, [grid]);
|
|
109
|
+
}, [grid, reCalculateFlag]);
|
|
110
110
|
useDeepCompareEffect(() => {
|
|
111
111
|
// console.log('changed grid', initGrid, acceptUpdateRef.current, initGrid?.rows, initGrid?.cols)
|
|
112
112
|
// console.log(initRef.current < 2,!initDoneRef.current, acceptUpdateRef.current)
|
|
@@ -560,11 +560,15 @@ export const ResizeGrid = props => {
|
|
|
560
560
|
};
|
|
561
561
|
const downSelect = (idx, cell) => {
|
|
562
562
|
// console.log('dow select', idx, cell);
|
|
563
|
+
if (isPreview)
|
|
564
|
+
return;
|
|
563
565
|
!cell.active && activeCell({ idx });
|
|
564
566
|
selectRef.current = { idx, cell };
|
|
565
567
|
gridRef.current = grid;
|
|
566
568
|
};
|
|
567
569
|
const unMerge = (cell, idx) => {
|
|
570
|
+
if (isPreview)
|
|
571
|
+
return;
|
|
568
572
|
const { colStart, colEnd, rowStart, rowEnd } = cell;
|
|
569
573
|
if (colStart + 1 === colEnd && rowStart + 1 === rowEnd) {
|
|
570
574
|
return;
|
|
@@ -604,6 +608,8 @@ export const ResizeGrid = props => {
|
|
|
604
608
|
});
|
|
605
609
|
}
|
|
606
610
|
const upSelect = (idx, cell) => {
|
|
611
|
+
if (isPreview)
|
|
612
|
+
return;
|
|
607
613
|
// console.log('up select', idx, cell);
|
|
608
614
|
if (selectRef.current &&
|
|
609
615
|
selectEndRef.current &&
|
|
@@ -634,6 +640,8 @@ export const ResizeGrid = props => {
|
|
|
634
640
|
selectEndRef.current = null;
|
|
635
641
|
};
|
|
636
642
|
const hoverSelect = (idx, cell) => {
|
|
643
|
+
if (isPreview)
|
|
644
|
+
return;
|
|
637
645
|
if (selectRef.current && gridRef.current) {
|
|
638
646
|
// console.log('hover select', idx, cell);
|
|
639
647
|
const { cell: cellStart, idx: idxStart } = selectRef.current;
|
|
@@ -9,5 +9,6 @@ export interface RichMenuBlockProps {
|
|
|
9
9
|
cellActiveIdx?: number;
|
|
10
10
|
onClickCell?: (cellIdx: number) => void;
|
|
11
11
|
onChange?: (richMenu: RichMenu, source?: 'user' | 'system') => void;
|
|
12
|
+
reCalculateFlag?: boolean | number;
|
|
12
13
|
}
|
|
13
14
|
export declare const RichMenuBlock: React.FC<RichMenuBlockProps>;
|
|
@@ -8,7 +8,7 @@ import { RichMenuCell } from './RichMenuCell';
|
|
|
8
8
|
import { tryCatchWrapper } from '@antscorp/antsomi-ui/es/utils';
|
|
9
9
|
const PATH = 'src/app/modules/Dashboard/containers/RichMenu/containers/Design/components/Workspace/components/RichMenuBlock/index.tsx';
|
|
10
10
|
export const RichMenuBlock = props => {
|
|
11
|
-
const { richMenu, layerActive, cellActiveIdx, isPreview, isActionLink = false, onClickCell, onChange, } = props;
|
|
11
|
+
const { richMenu, layerActive, cellActiveIdx, isPreview, isActionLink = false, onClickCell, onChange, reCalculateFlag, } = props;
|
|
12
12
|
const { gridTemplateCols = [], gridTemplateRows = [], cells = [], uploadMode, image, layoutType, rows, cols, } = richMenu || {};
|
|
13
13
|
const { imageUrl, imageStyles } = image || {};
|
|
14
14
|
const grid = {
|
|
@@ -45,7 +45,7 @@ export const RichMenuBlock = props => {
|
|
|
45
45
|
}
|
|
46
46
|
}, PATH);
|
|
47
47
|
const renderCell = (cellInfo, ctx) => (React.createElement(RichMenuCell, { context: ctx, isActionLink: isActionLink, isPreview: isPreview, layerActive: layerActive, cellActiveIdx: cellActiveIdx, cell: cellInfo, isSingleMode: isSingleUploadMode, onClick: handleClickCell }));
|
|
48
|
-
return (React.createElement(ResizeGrid, Object.assign({ grid: grid, isPreview: isPreview, containerStyle: imageStyles, isCompact: layoutType === 'compact', renderCell: renderCell, cellActiveStyle: { background: 'rgba(0, 95, 184, 0.5)' }, cellBorder: isSingleUploadMode ? '1px solid rgba(0, 95, 184, 1)' : '1px dotted #000000', onChange: handleGridChange }, Object.assign({}, (isSingleUploadMode && {
|
|
48
|
+
return (React.createElement(ResizeGrid, Object.assign({ grid: grid, isPreview: isPreview, containerStyle: imageStyles, isCompact: layoutType === 'compact', renderCell: renderCell, cellActiveStyle: { background: 'rgba(0, 95, 184, 0.5)' }, cellBorder: isSingleUploadMode ? '1px solid rgba(0, 95, 184, 1)' : '1px dotted #000000', onChange: handleGridChange, reCalculateFlag: reCalculateFlag }, Object.assign({}, (isSingleUploadMode && {
|
|
49
49
|
image: imageUrl,
|
|
50
50
|
imagePosition: imageStyles === null || imageStyles === void 0 ? void 0 : imageStyles.objectPosition,
|
|
51
51
|
imageSize: imageStyles === null || imageStyles === void 0 ? void 0 : imageStyles.objectFit,
|
|
@@ -4,6 +4,7 @@ export interface RichMenuChatBarProps extends React.HtmlHTMLAttributes<HTMLDivEl
|
|
|
4
4
|
showRichMenu?: boolean;
|
|
5
5
|
showTypingChat?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
|
+
size?: 'large' | 'medium';
|
|
7
8
|
onToggleRichMenu?: (toggle: boolean) => void;
|
|
8
9
|
onToggleTypingChat?: (toggle: boolean) => void;
|
|
9
10
|
}
|
|
@@ -19,14 +19,15 @@ import { TypingChat } from './TypingChat';
|
|
|
19
19
|
const defaultProps = {
|
|
20
20
|
label: 'Menu',
|
|
21
21
|
showRichMenu: true,
|
|
22
|
+
size: 'large',
|
|
22
23
|
showTypingChat: false,
|
|
23
24
|
};
|
|
24
25
|
export const RichMenuChatBar = props => {
|
|
25
|
-
const { disabled, label, showRichMenu, showTypingChat, className, onToggleRichMenu, onToggleTypingChat = () => { } } = props, restOfProps = __rest(props, ["disabled", "label", "showRichMenu", "showTypingChat", "className", "onToggleRichMenu", "onToggleTypingChat"]);
|
|
26
|
-
return (React.createElement(ChatBarWrapper, Object.assign({ "$showRichMenu": showRichMenu, "$showTypingChat": showTypingChat, "$disabled": disabled, className: `antsomi-chat-bar ${className}` }, restOfProps), showTypingChat ? (React.createElement(TypingChat, { onClickMenu: () => onToggleTypingChat(!showTypingChat) })) : (React.createElement(React.Fragment, null,
|
|
26
|
+
const { disabled, label, showRichMenu, showTypingChat, className, size, onToggleRichMenu, onToggleTypingChat = () => { } } = props, restOfProps = __rest(props, ["disabled", "label", "showRichMenu", "showTypingChat", "className", "size", "onToggleRichMenu", "onToggleTypingChat"]);
|
|
27
|
+
return (React.createElement(ChatBarWrapper, Object.assign({ "$showRichMenu": showRichMenu, "$showTypingChat": showTypingChat, "$disabled": disabled, "$size": size, className: `antsomi-chat-bar ${className}` }, restOfProps), showTypingChat ? (React.createElement(TypingChat, { onClickMenu: () => onToggleTypingChat(!showTypingChat) })) : (React.createElement(React.Fragment, null,
|
|
27
28
|
React.createElement(Icon, { type: "icon-ants-keyboard", className: "icon-keyboard", onClick: () => onToggleTypingChat(!showTypingChat) }),
|
|
28
29
|
React.createElement(ChatBarMenuBox, { onClick: () => onToggleRichMenu && onToggleRichMenu(!showRichMenu) },
|
|
29
30
|
React.createElement(Typography.Text, { className: "ants-text-sm" }, label),
|
|
30
|
-
React.createElement(Icon, { className: "icon-caret", type: "icon-ants-caret-down", size: 10 }))))));
|
|
31
|
+
label && React.createElement(Icon, { className: "icon-caret", type: "icon-ants-caret-down", size: 10 }))))));
|
|
31
32
|
};
|
|
32
33
|
RichMenuChatBar.defaultProps = defaultProps;
|
|
@@ -3,6 +3,7 @@ interface ChatBarWrapperProps {
|
|
|
3
3
|
$showRichMenu?: boolean;
|
|
4
4
|
$showTypingChat?: boolean;
|
|
5
5
|
$disabled?: boolean;
|
|
6
|
+
$size?: 'large' | 'medium';
|
|
6
7
|
}
|
|
7
8
|
export declare const ChatBarWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, ChatBarWrapperProps, never>;
|
|
8
9
|
export declare const ChatBarMenuBox: 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>;
|
|
@@ -4,7 +4,7 @@ import styled, { css } from 'styled-components';
|
|
|
4
4
|
import { Flex } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
5
5
|
export const ChatBarWrapper = styled(Flex) `
|
|
6
6
|
position: relative;
|
|
7
|
-
height:
|
|
7
|
+
height: ${props => (props.$size === 'medium' ? 65 : 84)}px;
|
|
8
8
|
padding: 10px 20px;
|
|
9
9
|
background-color: #fff;
|
|
10
10
|
z-index: 10;
|
|
@@ -3,8 +3,15 @@ import { RichMenu } from '@antscorp/antsomi-ui/es/types';
|
|
|
3
3
|
interface RichMenuMobileViewProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
richMenu: RichMenu;
|
|
5
5
|
isPreview?: boolean;
|
|
6
|
+
messagePreview?: {
|
|
7
|
+
show?: boolean;
|
|
8
|
+
text?: string;
|
|
9
|
+
};
|
|
6
10
|
onChangeRichMenu?: (richMenu: RichMenu, source?: 'user' | 'system') => void;
|
|
7
11
|
onClickCell?: (cellIndex: number) => void;
|
|
12
|
+
size?: 'large' | 'medium';
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
reCalculateFlag?: boolean | number;
|
|
8
15
|
}
|
|
9
16
|
export declare const RichMenuMobileView: React.FC<RichMenuMobileViewProps>;
|
|
10
17
|
export {};
|
|
@@ -13,14 +13,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
13
13
|
import React, { useState } from 'react';
|
|
14
14
|
// Assets
|
|
15
15
|
import IphoneTopBar from '@antscorp/antsomi-ui/es/assets/images/iphone-top-bar.png';
|
|
16
|
+
import TailMessage from '@antscorp/antsomi-ui/es/assets/images/tail.png';
|
|
17
|
+
import ProfileMessage from '@antscorp/antsomi-ui/es/assets/images/profile.png';
|
|
16
18
|
// Components
|
|
17
19
|
import { MobileFrame } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
18
20
|
import { RichMenuChatBar } from '../RichMenuChatBar';
|
|
19
21
|
import { RichMenuBlock } from '../RichMenuBlock';
|
|
20
22
|
// Styles
|
|
21
|
-
import { MobileContent, RichMenuWrapper, TopBar } from './styled';
|
|
23
|
+
import { Image, Message, MessageBox, MessageWrapper, Profile, MobileContent, RichMenuWrapper, TopBar, } from './styled';
|
|
22
24
|
export const RichMenuMobileView = props => {
|
|
23
|
-
const { richMenu, className, isPreview, onChangeRichMenu, onClickCell } = props, restOfProps = __rest(props, ["richMenu", "className", "isPreview", "onChangeRichMenu", "onClickCell"]);
|
|
25
|
+
const { richMenu, className, isPreview, onChangeRichMenu, onClickCell, reCalculateFlag, messagePreview, backgroundColor, size } = props, restOfProps = __rest(props, ["richMenu", "className", "isPreview", "onChangeRichMenu", "onClickCell", "reCalculateFlag", "messagePreview", "backgroundColor", "size"]);
|
|
24
26
|
// State
|
|
25
27
|
const [state, setState] = useState({
|
|
26
28
|
showRichMenu: true,
|
|
@@ -29,9 +31,26 @@ export const RichMenuMobileView = props => {
|
|
|
29
31
|
});
|
|
30
32
|
// Variables
|
|
31
33
|
const { showRichMenu, showTypingChat } = state;
|
|
32
|
-
return (React.createElement(MobileFrame, Object.assign({ className: `ants-mx-auto ${className}` }, restOfProps),
|
|
33
|
-
isPreview && React.createElement(
|
|
34
|
+
return (React.createElement(MobileFrame, Object.assign({ size: size, backgroundColor: backgroundColor, className: `ants-mx-auto ${className}` }, restOfProps),
|
|
35
|
+
isPreview && (React.createElement(React.Fragment, null,
|
|
36
|
+
React.createElement(TopBar, { src: IphoneTopBar, width: "100%", height: "auto" }),
|
|
37
|
+
(messagePreview === null || messagePreview === void 0 ? void 0 : messagePreview.show) && (React.createElement(MessageBox, null,
|
|
38
|
+
React.createElement(Profile, null,
|
|
39
|
+
React.createElement(Image, { src: ProfileMessage, alt: "profile user" })),
|
|
40
|
+
React.createElement(MessageWrapper, null,
|
|
41
|
+
React.createElement("div", { style: {
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
top: '-5px',
|
|
44
|
+
left: '-10px',
|
|
45
|
+
width: 20,
|
|
46
|
+
height: 20,
|
|
47
|
+
} },
|
|
48
|
+
React.createElement(Image, { src: TailMessage, alt: "tail decorator", style: { objectFit: 'contain' } })),
|
|
49
|
+
React.createElement(Message, null, (messagePreview === null || messagePreview === void 0 ? void 0 : messagePreview.text) ||
|
|
50
|
+
`Antsomi CDP 365 helps businesses decode their customer data, understand the
|
|
51
|
+
nuances of their customer lifecycles, and act on them – 24 hours a day, 365 days a
|
|
52
|
+
year.`)))))),
|
|
34
53
|
React.createElement(MobileContent, null,
|
|
35
|
-
React.createElement(RichMenuWrapper, { "$showRichMenu": showRichMenu && !showTypingChat, "$isPreview": !!isPreview }, richMenu && (React.createElement(RichMenuBlock, { richMenu: richMenu, isPreview: isPreview, onChange: onChangeRichMenu, onClickCell: onClickCell }))),
|
|
36
|
-
React.createElement(RichMenuChatBar, { disabled: !isPreview, label: richMenu === null || richMenu === void 0 ? void 0 : richMenu.chatBar.label, showRichMenu: showRichMenu, showTypingChat: showTypingChat, onToggleRichMenu: showRichMenu => setState(prevState => (Object.assign(Object.assign({}, prevState), { showRichMenu: !!showRichMenu }))), onToggleTypingChat: showTypingChat => setState(prevState => (Object.assign(Object.assign({}, prevState), { showTypingChat: !!showTypingChat }))) }))));
|
|
54
|
+
React.createElement(RichMenuWrapper, { "$showRichMenu": showRichMenu && !showTypingChat, "$isPreview": !!isPreview }, richMenu && (React.createElement(RichMenuBlock, { richMenu: richMenu, isPreview: isPreview, onChange: onChangeRichMenu, onClickCell: onClickCell, reCalculateFlag: reCalculateFlag }))),
|
|
55
|
+
React.createElement(RichMenuChatBar, { disabled: !isPreview, label: richMenu === null || richMenu === void 0 ? void 0 : richMenu.chatBar.label, size: size, showRichMenu: showRichMenu, showTypingChat: showTypingChat, onToggleRichMenu: showRichMenu => setState(prevState => (Object.assign(Object.assign({}, prevState), { showRichMenu: !!showRichMenu }))), onToggleTypingChat: showTypingChat => setState(prevState => (Object.assign(Object.assign({}, prevState), { showTypingChat: !!showTypingChat }))) }))));
|
|
37
56
|
};
|
|
@@ -4,3 +4,8 @@ export declare const RichMenuWrapper: import("styled-components").StyledComponen
|
|
|
4
4
|
$isPreview: boolean;
|
|
5
5
|
}, never>;
|
|
6
6
|
export declare const TopBar: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
7
|
+
export declare const MessageBox: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const Profile: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const Image: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
10
|
+
export declare const Message: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
+
export declare const MessageWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
var _a;
|
|
1
2
|
// Libraries
|
|
2
3
|
import styled, { css } from 'styled-components';
|
|
4
|
+
// Constants
|
|
5
|
+
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
3
6
|
export const MobileContent = styled.div `
|
|
4
7
|
position: absolute;
|
|
5
8
|
bottom: 0;
|
|
@@ -18,3 +21,31 @@ export const RichMenuWrapper = styled.div `
|
|
|
18
21
|
`}
|
|
19
22
|
`;
|
|
20
23
|
export const TopBar = styled.img ``;
|
|
24
|
+
export const MessageBox = styled.div `
|
|
25
|
+
display: flex;
|
|
26
|
+
gap: 10px;
|
|
27
|
+
margin: 15px 9px 0px 8px;
|
|
28
|
+
`;
|
|
29
|
+
export const Profile = styled.div `
|
|
30
|
+
width: 24px;
|
|
31
|
+
height: 24px;
|
|
32
|
+
`;
|
|
33
|
+
export const Image = styled.img `
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
object-fit: cover;
|
|
37
|
+
`;
|
|
38
|
+
export const Message = styled.div `
|
|
39
|
+
color: rgba(37, 37, 37, 1);
|
|
40
|
+
font-size: ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.fontSize}px;
|
|
41
|
+
line-height: 16px;
|
|
42
|
+
`;
|
|
43
|
+
export const MessageWrapper = styled.div `
|
|
44
|
+
position: relative;
|
|
45
|
+
flex: 1;
|
|
46
|
+
padding: 10px;
|
|
47
|
+
background-color: rgba(229, 229, 234, 1);
|
|
48
|
+
border-radius: 15px;
|
|
49
|
+
color: rgba(229, 229, 234, 1);
|
|
50
|
+
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
|
|
51
|
+
`;
|
|
@@ -46,7 +46,7 @@ export const GeneralAccess = () => {
|
|
|
46
46
|
React.createElement("div", { className: "setting" },
|
|
47
47
|
React.createElement(Icon, { className: "accessable-icon", type: isPublic ? 'icon-ants-mui-lock-open' : 'icon-ants-mui-lock' }),
|
|
48
48
|
React.createElement("div", { className: "general-info" },
|
|
49
|
-
React.createElement(Dropdown, { placement: "bottomLeft", trigger: ['click'], destroyPopupOnHide: true, disabled: !allowEdit, menu: {
|
|
49
|
+
React.createElement(Dropdown, { placement: "bottomLeft", trigger: ['click'], overlayStyle: { zIndex: 3002 }, destroyPopupOnHide: true, disabled: !allowEdit, menu: {
|
|
50
50
|
items: [
|
|
51
51
|
isPublic
|
|
52
52
|
? { key: GENERAL_ACCESS.RESTRICTED, label: React.createElement("div", null, "Restricted ") }
|
|
@@ -58,7 +58,7 @@ export const GeneralAccess = () => {
|
|
|
58
58
|
React.createElement("div", { className: "accessable-title" }, isPublic ? 'Public' : 'Restricted'),
|
|
59
59
|
allowEdit && React.createElement(Icon, { className: "icon-angle", type: "icon-ants-angle-down" }))),
|
|
60
60
|
React.createElement("div", { className: "description" }, renderDescription())),
|
|
61
|
-
!!isPublic && publicRole && (React.createElement(Dropdown, { placement: "bottomLeft", trigger: ['click'], destroyPopupOnHide: true, disabled: !allowEdit, menu: {
|
|
61
|
+
!!isPublic && publicRole && (React.createElement(Dropdown, { placement: "bottomLeft", trigger: ['click'], destroyPopupOnHide: true, disabled: !allowEdit, overlayStyle: { zIndex: 3002 }, menu: {
|
|
62
62
|
items: [
|
|
63
63
|
publicRole === PUBLIC_ROLE.ONLY_VIEWER
|
|
64
64
|
? {
|
|
@@ -6,13 +6,13 @@ import { PeopleAccess } from '../PeopleAccess';
|
|
|
6
6
|
import { SearchUser } from '../SearchUser';
|
|
7
7
|
import { StyledLayoutContentRoot } from './styled';
|
|
8
8
|
export const LayoutContent = (props) => {
|
|
9
|
-
const { getUserInfo, allowChangeOnwership = true } = props;
|
|
9
|
+
const { getUserInfo, allowChangeOnwership = true, allowAddUser = true } = props;
|
|
10
10
|
const { state } = useShareAccess();
|
|
11
11
|
const { allowEdit, allowView } = state;
|
|
12
12
|
if (!allowEdit && !allowView)
|
|
13
13
|
return null;
|
|
14
14
|
return (React.createElement(StyledLayoutContentRoot, null,
|
|
15
|
-
React.createElement(SearchUser, { getUserInfo: getUserInfo }),
|
|
15
|
+
allowAddUser && React.createElement(SearchUser, { getUserInfo: getUserInfo }),
|
|
16
16
|
React.createElement(PeopleAccess, { allowChangeOnwership: allowChangeOnwership }),
|
|
17
17
|
React.createElement(GeneralAccess, null),
|
|
18
18
|
React.createElement(ModalTransferOwnership, null)));
|
|
@@ -86,7 +86,7 @@ export const PeopleAccess = (props) => {
|
|
|
86
86
|
React.createElement("div", { className: "info" },
|
|
87
87
|
React.createElement("div", { className: "name" }, access.fullName),
|
|
88
88
|
React.createElement("div", { className: "email" }, access.email)),
|
|
89
|
-
React.createElement(Dropdown, { trigger: ['click'], disabled: !actions.length, menu: {
|
|
89
|
+
React.createElement(Dropdown, { trigger: ['click'], disabled: !actions.length, overlayStyle: { zIndex: 3002 }, menu: {
|
|
90
90
|
items: renderActionItems(actions),
|
|
91
91
|
onClick: e => handleClickAction(e.key, access.userId),
|
|
92
92
|
} },
|
|
@@ -8,6 +8,7 @@ export type UserInfo = {
|
|
|
8
8
|
user_type: number;
|
|
9
9
|
ctime: Date;
|
|
10
10
|
utime: Date;
|
|
11
|
+
[key: string]: any;
|
|
11
12
|
};
|
|
12
13
|
export type UserAccessInfo = {
|
|
13
14
|
userId: number;
|
|
@@ -33,6 +34,7 @@ export type ShareAccessProps = {
|
|
|
33
34
|
view: number;
|
|
34
35
|
};
|
|
35
36
|
accessInfo?: ObjectAccessInfo;
|
|
37
|
+
allowAddUser?: boolean;
|
|
36
38
|
allowChangeOnwership?: boolean;
|
|
37
39
|
getUserInfo?(search: string, signal: AbortSignal): Promise<UserInfo[]> | UserInfo[];
|
|
38
40
|
onChange?: (accessInfo: ObjectAccessInfo) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ObjectAccessInfo } from './types';
|
|
1
|
+
import { ObjectAccessInfo, UserInfo } from './types';
|
|
2
2
|
export declare const mergePermission: (objectPermissionAllow: boolean, menuPermissionValue: number) => boolean;
|
|
3
3
|
export declare const composeObjectMenuPermissions: (params: {
|
|
4
4
|
isPublic: boolean;
|
|
@@ -36,3 +36,4 @@ export declare const getActionsByUser: (args: {
|
|
|
36
36
|
readonly label: "Remove Access";
|
|
37
37
|
readonly key: "remove_acess";
|
|
38
38
|
})[];
|
|
39
|
+
export declare const initAccessInfoDefault: (userInfo: Partial<UserInfo>) => ObjectAccessInfo;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MENU_PERMISSION, PEOPLE_ACTIONS, PEOPLE_ACTION_KEYS, PUBLIC_ROLE, ROLE_MAPPING, } from './constants';
|
|
2
2
|
import { remove } from 'lodash';
|
|
3
|
+
import { snakeCaseToCamelCase } from '@antscorp/antsomi-ui/es/utils';
|
|
3
4
|
export const mergePermission = (objectPermissionAllow, menuPermissionValue) => {
|
|
4
5
|
const valueMapping = {
|
|
5
6
|
[`${MENU_PERMISSION.NONE}_false`]: false,
|
|
@@ -55,3 +56,11 @@ export const getActionsByUser = (args) => {
|
|
|
55
56
|
}
|
|
56
57
|
return actions.map(actKey => PEOPLE_ACTIONS[actKey]);
|
|
57
58
|
};
|
|
59
|
+
export const initAccessInfoDefault = (userInfo) => ({
|
|
60
|
+
ownerId: +(userInfo === null || userInfo === void 0 ? void 0 : userInfo.user_id),
|
|
61
|
+
listAccess: [
|
|
62
|
+
Object.assign(Object.assign({}, snakeCaseToCamelCase(userInfo)), { role: ROLE_MAPPING.OWNER, allowView: 1, allowEdit: 1, allowComment: 1 }),
|
|
63
|
+
],
|
|
64
|
+
publicRole: PUBLIC_ROLE.ONLY_VIEWER,
|
|
65
|
+
isPublic: 0,
|
|
66
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FormInstance, SelectProps } from 'antd';
|
|
3
|
+
import { ShareAccessProps } from '../ShareAccess/types';
|
|
4
|
+
export type categoriesProps = {
|
|
5
|
+
[key: string]: (string | number)[];
|
|
6
|
+
};
|
|
7
|
+
export interface TemplateValueOptions {
|
|
8
|
+
saveOption?: string;
|
|
9
|
+
templateName?: {
|
|
10
|
+
id: undefined;
|
|
11
|
+
label: string;
|
|
12
|
+
} | {
|
|
13
|
+
id: string | number;
|
|
14
|
+
label: string;
|
|
15
|
+
};
|
|
16
|
+
description?: string;
|
|
17
|
+
defaultThumbnail?: number;
|
|
18
|
+
categories?: {
|
|
19
|
+
[key: string]: (string | number)[];
|
|
20
|
+
};
|
|
21
|
+
accessInfo?: ShareAccessProps['accessInfo'];
|
|
22
|
+
}
|
|
23
|
+
export interface ImagePreviewOptions {
|
|
24
|
+
thumbnails: (string | undefined)[];
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
skeleton?: boolean;
|
|
27
|
+
previewNavigation?: boolean;
|
|
28
|
+
slidesPerView?: number;
|
|
29
|
+
hideThumbnailsList?: boolean;
|
|
30
|
+
hideDefaultButton?: boolean;
|
|
31
|
+
label?: string;
|
|
32
|
+
imageWidth?: number;
|
|
33
|
+
imageHeight?: number;
|
|
34
|
+
}
|
|
35
|
+
export interface TemplateSaveAsProps {
|
|
36
|
+
className?: string;
|
|
37
|
+
shareAccess: Omit<{
|
|
38
|
+
show: boolean;
|
|
39
|
+
} & ShareAccessProps, 'accessInfo' | 'onChange'>;
|
|
40
|
+
imageReview: ImagePreviewOptions;
|
|
41
|
+
saveOptions?: {
|
|
42
|
+
saveNewText?: string;
|
|
43
|
+
saveExistText?: string;
|
|
44
|
+
saveNewValue?: string;
|
|
45
|
+
saveExistValue?: string;
|
|
46
|
+
};
|
|
47
|
+
categories?: Array<{
|
|
48
|
+
label: string | React.ReactNode;
|
|
49
|
+
key: string | number;
|
|
50
|
+
children: Array<{
|
|
51
|
+
key: string | number;
|
|
52
|
+
label: string | React.ReactNode;
|
|
53
|
+
}>;
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* Hide categories with following key
|
|
57
|
+
*/
|
|
58
|
+
omitCategories?: string[];
|
|
59
|
+
templateNames: Array<{
|
|
60
|
+
label: string;
|
|
61
|
+
id: string | number;
|
|
62
|
+
}>;
|
|
63
|
+
templateNamesOptions?: {
|
|
64
|
+
label?: string;
|
|
65
|
+
isLoading?: boolean;
|
|
66
|
+
defaultNewTemplateName?: string;
|
|
67
|
+
onSearch?: (searchValue: string) => void;
|
|
68
|
+
onNamePopupScroll?: SelectProps['onPopupScroll'];
|
|
69
|
+
};
|
|
70
|
+
descriptionOptions?: {
|
|
71
|
+
label?: string;
|
|
72
|
+
placeholder?: string;
|
|
73
|
+
};
|
|
74
|
+
form?: FormInstance<any>;
|
|
75
|
+
value?: TemplateValueOptions;
|
|
76
|
+
onChange?: (value: Partial<TemplateValueOptions>, errors?: any[]) => void;
|
|
77
|
+
onEvent?: (value: Partial<TemplateValueOptions>) => void;
|
|
78
|
+
}
|
|
79
|
+
export declare const TemplateSaveAs: React.FC<TemplateSaveAsProps>;
|