@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.
Files changed (327) hide show
  1. package/es/assets/images/background/skeleton-background.png +0 -0
  2. package/es/assets/images/components/PreviewModal/Banner/skeletonBackground.png +0 -0
  3. package/es/assets/images/components/PreviewModal/Information/buttonText.png +0 -0
  4. package/es/assets/images/components/PreviewModal/Information/clickButton.png +0 -0
  5. package/es/assets/images/components/PreviewModal/Information/description.png +0 -0
  6. package/es/assets/images/components/PreviewModal/Information/deviceRadio.png +0 -0
  7. package/es/assets/images/components/PreviewModal/Information/itemName.png +0 -0
  8. package/es/assets/images/components/PreviewModal/banner.png +0 -0
  9. package/es/assets/images/components/PreviewModal/information.png +0 -0
  10. package/es/assets/images/components/PreviewModal/similarTemplate.png +0 -0
  11. package/es/assets/images/components/PreviewModal/thumbnails.png +0 -0
  12. package/es/assets/images/components/TemplateListing/blankTemplate.png +0 -0
  13. package/es/assets/images/components/TemplateListing/categoryListing.png +0 -0
  14. package/es/assets/images/components/TemplateListing/empty.png +0 -0
  15. package/es/assets/images/components/TemplateListing/previewModal.png +0 -0
  16. package/es/assets/images/components/TemplateListing/templateItem.png +0 -0
  17. package/es/assets/images/components/TemplateListing/templates.png +0 -0
  18. package/es/assets/images/profile.png +0 -0
  19. package/es/assets/images/skeleton_bg.png +0 -0
  20. package/es/assets/images/tail.png +0 -0
  21. package/es/assets/svg/mobile-frame.svg +3 -0
  22. package/es/components/atoms/MobileFrame/MobileFrame.d.ts +2 -0
  23. package/es/components/atoms/MobileFrame/MobileFrame.js +1 -1
  24. package/es/components/atoms/MobileFrame/styled.d.ts +2 -1
  25. package/es/components/atoms/MobileFrame/styled.js +11 -6
  26. package/es/components/atoms/SlideBar/SlideBar.js +1 -1
  27. package/es/components/atoms/Spin/Spin.js +2 -2
  28. package/es/components/common/ConfigProvider/ConfigProvider.js +4 -3
  29. package/es/components/common/ConfigProvider/GlobalStyle.js +85 -16
  30. package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +3 -2
  31. package/es/components/molecules/CalendarSelection/CalendarSelection.d.ts +3 -0
  32. package/es/components/molecules/CalendarSelection/CalendarSelection.js +45 -0
  33. package/es/components/molecules/CalendarSelection/actions.d.ts +55 -0
  34. package/es/components/molecules/CalendarSelection/actions.js +39 -0
  35. package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/AutoUpdateTo.d.ts +7 -0
  36. package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/AutoUpdateTo.js +24 -0
  37. package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/index.d.ts +1 -0
  38. package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/index.js +1 -0
  39. package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/styled.d.ts +1 -0
  40. package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/styled.js +10 -0
  41. package/es/components/molecules/CalendarSelection/components/CustomPicker/CustomPicker.d.ts +3 -0
  42. package/es/components/molecules/CalendarSelection/components/CustomPicker/CustomPicker.js +108 -0
  43. package/es/components/molecules/CalendarSelection/components/CustomPicker/index.d.ts +1 -0
  44. package/es/components/molecules/CalendarSelection/components/CustomPicker/index.js +1 -0
  45. package/es/components/molecules/CalendarSelection/components/CustomPicker/styled.d.ts +6 -0
  46. package/es/components/molecules/CalendarSelection/components/CustomPicker/styled.js +152 -0
  47. package/es/components/molecules/CalendarSelection/components/CustomPicker/types.d.ts +1 -0
  48. package/es/components/molecules/CalendarSelection/components/CustomPicker/types.js +1 -0
  49. package/es/components/molecules/CalendarSelection/components/Footer/Footer.d.ts +2 -0
  50. package/es/components/molecules/CalendarSelection/components/Footer/Footer.js +11 -0
  51. package/es/components/molecules/CalendarSelection/components/Footer/index.d.ts +1 -0
  52. package/es/components/molecules/CalendarSelection/components/Footer/index.js +1 -0
  53. package/es/components/molecules/CalendarSelection/components/Footer/styled.d.ts +1 -0
  54. package/es/components/molecules/CalendarSelection/components/Footer/styled.js +6 -0
  55. package/es/components/molecules/CalendarSelection/components/RangePicker/RangePicker.d.ts +5 -0
  56. package/es/components/molecules/CalendarSelection/components/RangePicker/RangePicker.js +4 -0
  57. package/es/components/molecules/CalendarSelection/components/RangePicker/index.d.ts +1 -0
  58. package/es/components/molecules/CalendarSelection/components/RangePicker/index.js +1 -0
  59. package/es/components/molecules/CalendarSelection/components/RangePicker/styled.d.ts +5 -0
  60. package/es/components/molecules/CalendarSelection/components/RangePicker/styled.js +13 -0
  61. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/RangeSelectOptions.d.ts +3 -0
  62. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/RangeSelectOptions.js +23 -0
  63. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/NumOfDaysRanges.d.ts +2 -0
  64. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/NumOfDaysRanges.js +41 -0
  65. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/index.d.ts +1 -0
  66. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/index.js +1 -0
  67. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/Option.d.ts +11 -0
  68. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/Option.js +40 -0
  69. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/index.d.ts +1 -0
  70. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/index.js +1 -0
  71. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/styled.d.ts +1 -0
  72. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/styled.js +29 -0
  73. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/index.d.ts +2 -0
  74. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/index.js +2 -0
  75. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/index.d.ts +1 -0
  76. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/index.js +1 -0
  77. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/styled.d.ts +3 -0
  78. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/styled.js +34 -0
  79. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/types.d.ts +1 -0
  80. package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/types.js +1 -0
  81. package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/TimeRangeDisplay.d.ts +8 -0
  82. package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/TimeRangeDisplay.js +49 -0
  83. package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/index.d.ts +2 -0
  84. package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/index.js +2 -0
  85. package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/styled.d.ts +1 -0
  86. package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/styled.js +70 -0
  87. package/es/components/molecules/CalendarSelection/components/index.d.ts +5 -0
  88. package/es/components/molecules/CalendarSelection/components/index.js +5 -0
  89. package/es/components/molecules/CalendarSelection/constants.d.ts +97 -0
  90. package/es/components/molecules/CalendarSelection/constants.js +183 -0
  91. package/es/components/molecules/CalendarSelection/context.d.ts +4 -0
  92. package/es/components/molecules/CalendarSelection/context.js +6 -0
  93. package/es/components/molecules/CalendarSelection/hooks/index.d.ts +2 -0
  94. package/es/components/molecules/CalendarSelection/hooks/index.js +2 -0
  95. package/es/components/molecules/CalendarSelection/hooks/useStateContext.d.ts +4 -0
  96. package/es/components/molecules/CalendarSelection/hooks/useStateContext.js +13 -0
  97. package/es/components/molecules/CalendarSelection/hooks/useTriggerOut.d.ts +9 -0
  98. package/es/components/molecules/CalendarSelection/hooks/useTriggerOut.js +19 -0
  99. package/es/components/molecules/CalendarSelection/index.d.ts +25 -0
  100. package/es/components/molecules/CalendarSelection/index.js +6 -0
  101. package/es/components/molecules/CalendarSelection/reducer.d.ts +3 -0
  102. package/es/components/molecules/CalendarSelection/reducer.js +121 -0
  103. package/es/components/molecules/CalendarSelection/styled.d.ts +6 -0
  104. package/es/components/molecules/CalendarSelection/styled.js +13 -0
  105. package/es/components/molecules/CalendarSelection/types.d.ts +98 -0
  106. package/es/components/molecules/CalendarSelection/types.js +1 -0
  107. package/es/components/molecules/CalendarSelection/utils.d.ts +52 -0
  108. package/es/components/molecules/CalendarSelection/utils.js +304 -0
  109. package/es/components/molecules/ColorPicker/CustomPicker/index.js +3 -3
  110. package/es/components/molecules/ColorPicker/index.d.ts +1 -0
  111. package/es/components/molecules/ColorPicker/index.js +3 -2
  112. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +20 -16
  113. package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.d.ts +3 -0
  114. package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +23 -0
  115. package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +1 -1
  116. package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +2 -2
  117. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts +1 -0
  118. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js +3 -3
  119. package/es/components/molecules/DatePicker/components/DropdownLabel/DropdownLabel.js +2 -2
  120. package/es/components/molecules/ModalV2/styled.js +4 -0
  121. package/es/components/molecules/ResizeGrid/ResizeGrid.js +10 -2
  122. package/es/components/molecules/ResizeGrid/types.d.ts +1 -0
  123. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.d.ts +1 -0
  124. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.js +2 -2
  125. package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.d.ts +1 -0
  126. package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.js +4 -3
  127. package/es/components/molecules/RichMenu/RichMenuChatBar/styled.d.ts +1 -0
  128. package/es/components/molecules/RichMenu/RichMenuChatBar/styled.js +1 -1
  129. package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.d.ts +7 -0
  130. package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.js +25 -6
  131. package/es/components/molecules/RichMenu/RichMenuMobileView/styled.d.ts +5 -0
  132. package/es/components/molecules/RichMenu/RichMenuMobileView/styled.js +31 -0
  133. package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +2 -2
  134. package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.js +1 -0
  135. package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.js +2 -2
  136. package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.js +1 -1
  137. package/es/components/molecules/ShareAccess/index.d.ts +2 -3
  138. package/es/components/molecules/ShareAccess/index.js +2 -3
  139. package/es/components/molecules/ShareAccess/types.d.ts +2 -0
  140. package/es/components/molecules/ShareAccess/utils.d.ts +2 -1
  141. package/es/components/molecules/ShareAccess/utils.js +9 -0
  142. package/es/components/molecules/TemplateSaveAs/TemplateSaveAs.d.ts +79 -0
  143. package/es/components/molecules/TemplateSaveAs/TemplateSaveAs.js +184 -0
  144. package/es/components/molecules/TemplateSaveAs/TemplateSaveAsModal.d.ts +10 -0
  145. package/es/components/molecules/TemplateSaveAs/TemplateSaveAsModal.js +50 -0
  146. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/ImageSlider.d.ts +20 -0
  147. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/ImageSlider.js +57 -0
  148. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/index.d.ts +1 -0
  149. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/index.js +1 -0
  150. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/styled.d.ts +9 -0
  151. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/styled.js +182 -0
  152. package/es/components/molecules/TemplateSaveAs/components/index.d.ts +1 -0
  153. package/es/components/molecules/TemplateSaveAs/components/index.js +1 -0
  154. package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.d.ts +65 -0
  155. package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.js +121 -0
  156. package/es/components/molecules/TemplateSaveAs/index.d.ts +4 -0
  157. package/es/components/molecules/TemplateSaveAs/index.js +3 -0
  158. package/es/components/molecules/TemplateSaveAs/styled.d.ts +4 -0
  159. package/es/components/molecules/TemplateSaveAs/styled.js +73 -0
  160. package/es/components/molecules/ThumbnailCard/ThumbnailCard.js +29 -13
  161. package/es/components/molecules/ThumbnailCard/constants.d.ts +2 -2
  162. package/es/components/molecules/ThumbnailCard/constants.js +2 -2
  163. package/es/components/molecules/ThumbnailCard/styled.js +2 -1
  164. package/es/components/molecules/ThumbnailCard/types.d.ts +12 -6
  165. package/es/components/molecules/UploadImage/index.js +1 -1
  166. package/es/components/molecules/index.d.ts +3 -0
  167. package/es/components/molecules/index.js +2 -0
  168. package/es/components/organism/Help/Help.js +30 -1
  169. package/es/components/organism/Menu/Menu.d.ts +2 -0
  170. package/es/components/organism/Menu/Menu.js +2 -0
  171. package/es/components/organism/Menu/index.d.ts +1 -0
  172. package/es/components/organism/Menu/index.js +1 -0
  173. package/es/components/organism/PreviewTemplateModal/components/Banner/index.d.ts +3 -0
  174. package/es/components/organism/PreviewTemplateModal/components/Banner/index.js +13 -0
  175. package/es/components/organism/PreviewTemplateModal/components/Banner/styled.d.ts +4 -0
  176. package/es/components/organism/PreviewTemplateModal/components/Banner/styled.js +98 -0
  177. package/es/components/organism/PreviewTemplateModal/components/Information/index.d.ts +3 -0
  178. package/es/components/organism/PreviewTemplateModal/components/Information/index.js +29 -0
  179. package/es/components/organism/PreviewTemplateModal/components/Information/styled.d.ts +2 -0
  180. package/es/components/organism/PreviewTemplateModal/components/Information/styled.js +41 -0
  181. package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/index.d.ts +3 -0
  182. package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/index.js +32 -0
  183. package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/styled.d.ts +2 -0
  184. package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/styled.js +12 -0
  185. package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/index.d.ts +6 -0
  186. package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/index.js +77 -0
  187. package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/styled.d.ts +3 -0
  188. package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/styled.js +62 -0
  189. package/es/components/organism/PreviewTemplateModal/components/index.d.ts +4 -0
  190. package/es/components/organism/PreviewTemplateModal/components/index.js +4 -0
  191. package/es/components/organism/PreviewTemplateModal/constants/dataSample.d.ts +2 -0
  192. package/es/components/organism/PreviewTemplateModal/constants/dataSample.js +9 -0
  193. package/es/components/organism/PreviewTemplateModal/constants/defaultProps.d.ts +8 -0
  194. package/es/components/organism/PreviewTemplateModal/constants/defaultProps.js +12 -0
  195. package/es/components/organism/PreviewTemplateModal/constants/html.d.ts +1 -0
  196. package/es/components/organism/PreviewTemplateModal/constants/html.js +1 -0
  197. package/es/components/organism/PreviewTemplateModal/constants/index.d.ts +4 -0
  198. package/es/components/organism/PreviewTemplateModal/constants/index.js +4 -0
  199. package/es/components/organism/PreviewTemplateModal/constants/variables.d.ts +12 -0
  200. package/es/components/organism/PreviewTemplateModal/constants/variables.js +12 -0
  201. package/es/components/organism/PreviewTemplateModal/index.d.ts +3 -0
  202. package/es/components/organism/PreviewTemplateModal/index.js +34 -0
  203. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/BannerPropsTable/index.d.ts +2 -0
  204. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/BannerPropsTable/index.js +34 -0
  205. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/DataTypeTable/index.d.ts +2 -0
  206. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/DataTypeTable/index.js +62 -0
  207. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/InformationPropsTable/index.d.ts +2 -0
  208. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/InformationPropsTable/index.js +76 -0
  209. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/SimilarTemplatePropsTable/index.d.ts +2 -0
  210. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/SimilarTemplatePropsTable/index.js +40 -0
  211. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/TThumbnailTable/index.d.ts +2 -0
  212. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/TThumbnailTable/index.js +30 -0
  213. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/ThumbnailPropsTable/index.d.ts +2 -0
  214. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/ThumbnailPropsTable/index.js +46 -0
  215. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/index.d.ts +6 -0
  216. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/index.js +6 -0
  217. package/es/components/organism/PreviewTemplateModal/styled.d.ts +4 -0
  218. package/es/components/organism/PreviewTemplateModal/styled.js +26 -0
  219. package/es/components/organism/PreviewTemplateModal/types.d.ts +38 -0
  220. package/es/components/organism/PreviewTemplateModal/types.js +1 -0
  221. package/es/components/organism/index.d.ts +1 -0
  222. package/es/components/organism/index.js +1 -0
  223. package/es/components/template/TemplateListing/Loadable.d.ts +6 -0
  224. package/es/components/template/TemplateListing/Loadable.js +7 -0
  225. package/es/components/template/TemplateListing/components/BlankTemplate/index.js +3 -1
  226. package/es/components/template/TemplateListing/components/CategoryListing/index.js +19 -10
  227. package/es/components/template/TemplateListing/components/CategoryListing/styled.d.ts +2 -0
  228. package/es/components/template/TemplateListing/components/CategoryListing/styled.js +50 -8
  229. package/es/components/template/TemplateListing/components/Empty/index.d.ts +3 -0
  230. package/es/components/template/TemplateListing/components/Empty/index.js +18 -0
  231. package/es/components/template/TemplateListing/components/Empty/styled.d.ts +3 -0
  232. package/es/components/template/TemplateListing/components/Empty/styled.js +35 -0
  233. package/es/components/template/TemplateListing/components/index.d.ts +1 -0
  234. package/es/components/template/TemplateListing/components/index.js +1 -0
  235. package/es/components/template/TemplateListing/constants/defaultProps.d.ts +5 -3
  236. package/es/components/template/TemplateListing/constants/defaultProps.js +8 -7
  237. package/es/components/template/TemplateListing/hooks/index.d.ts +1 -0
  238. package/es/components/template/TemplateListing/hooks/index.js +1 -0
  239. package/es/components/template/TemplateListing/hooks/useTemplateListing.d.ts +62 -0
  240. package/es/components/template/TemplateListing/hooks/useTemplateListing.js +230 -0
  241. package/es/components/template/TemplateListing/index.js +75 -14
  242. package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.d.ts +2 -0
  243. package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.js +46 -0
  244. package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.d.ts +2 -0
  245. package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.js +57 -0
  246. package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.d.ts +2 -0
  247. package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.js +78 -0
  248. package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.d.ts +2 -0
  249. package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.js +30 -0
  250. package/es/components/template/TemplateListing/stories/dataTypes/components/TCategoryItemTable/index.d.ts +2 -0
  251. package/es/components/template/TemplateListing/stories/dataTypes/components/TCategoryItemTable/index.js +46 -0
  252. package/es/components/template/TemplateListing/stories/dataTypes/components/TTemplateItemTable/index.d.ts +2 -0
  253. package/es/components/template/TemplateListing/stories/dataTypes/components/TTemplateItemTable/index.js +38 -0
  254. package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.d.ts +2 -0
  255. package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.js +50 -0
  256. package/es/components/template/TemplateListing/stories/dataTypes/components/index.d.ts +7 -0
  257. package/es/components/template/TemplateListing/stories/dataTypes/components/index.js +7 -0
  258. package/es/components/template/TemplateListing/stories/demo/styled.d.ts +1 -0
  259. package/es/components/template/TemplateListing/stories/demo/styled.js +7 -0
  260. package/es/components/template/TemplateListing/styled/index.d.ts +1 -0
  261. package/es/components/template/TemplateListing/styled/index.js +24 -5
  262. package/es/components/template/TemplateListing/types/BlankTemplate.d.ts +1 -1
  263. package/es/components/template/TemplateListing/types/CategoryListing.d.ts +5 -2
  264. package/es/components/template/TemplateListing/types/Empty.d.ts +5 -0
  265. package/es/components/template/TemplateListing/types/Empty.js +1 -0
  266. package/es/components/template/TemplateListing/types/TemplateListing.d.ts +16 -6
  267. package/es/components/template/index.d.ts +2 -1
  268. package/es/components/template/index.js +5 -1
  269. package/es/constants/datetime.d.ts +8 -0
  270. package/es/constants/datetime.js +1594 -0
  271. package/es/constants/index.d.ts +5 -1
  272. package/es/constants/index.js +5 -1
  273. package/es/constants/queries.d.ts +4 -0
  274. package/es/constants/queries.js +5 -0
  275. package/es/constants/templateListing.d.ts +50 -0
  276. package/es/constants/templateListing.js +52 -0
  277. package/es/constants/theme.js +1 -1
  278. package/es/constants/variables.d.ts +19 -0
  279. package/es/constants/variables.js +19 -0
  280. package/es/hooks/index.d.ts +4 -0
  281. package/es/hooks/index.js +4 -0
  282. package/es/hooks/useEffectOnlyOnce.d.ts +2 -0
  283. package/es/hooks/useEffectOnlyOnce.js +12 -0
  284. package/es/hooks/useForceUpdate.d.ts +1 -0
  285. package/es/hooks/useForceUpdate.js +5 -0
  286. package/es/hooks/useIntersectionObserver.d.ts +57 -0
  287. package/es/hooks/useIntersectionObserver.js +97 -0
  288. package/es/hooks/useListingItemResize.d.ts +12 -0
  289. package/es/hooks/useListingItemResize.js +58 -0
  290. package/es/hooks/useScrollToEnd.d.ts +1 -0
  291. package/es/hooks/useScrollToEnd.js +30 -0
  292. package/es/index.d.ts +3 -0
  293. package/es/index.js +3 -0
  294. package/es/locales/en/translation.json +9 -1
  295. package/es/locales/i18n.d.ts +16 -0
  296. package/es/locales/translations.d.ts +8 -0
  297. package/es/locales/vi/translation.json +9 -1
  298. package/es/models/ObjectTemplate.d.ts +56 -0
  299. package/es/models/ObjectTemplate.js +82 -0
  300. package/es/models/TemplateCategory.d.ts +13 -0
  301. package/es/models/TemplateCategory.js +28 -0
  302. package/es/queries/CustomFunction/useCustomFunction.js +35 -35
  303. package/es/queries/TemplateListing/index.d.ts +52 -0
  304. package/es/queries/TemplateListing/index.js +105 -0
  305. package/es/queries/index.d.ts +1 -0
  306. package/es/queries/index.js +1 -0
  307. package/es/services/TemplateListing/index.d.ts +70 -0
  308. package/es/services/TemplateListing/index.js +161 -0
  309. package/es/test.js +65 -11
  310. package/es/types/index.d.ts +5 -0
  311. package/es/types/index.js +3 -0
  312. package/es/types/service.d.ts +22 -0
  313. package/es/types/service.js +1 -0
  314. package/es/types/share-access.d.ts +18 -0
  315. package/es/types/share-access.js +1 -0
  316. package/es/types/templateListing.d.ts +13 -0
  317. package/es/types/templateListing.js +1 -0
  318. package/es/types/variables.d.ts +3 -0
  319. package/es/utils/common.d.ts +4 -0
  320. package/es/utils/common.js +38 -0
  321. package/es/utils/commonComponent.d.ts +7 -0
  322. package/es/utils/commonComponent.js +28 -0
  323. package/es/utils/index.d.ts +1 -0
  324. package/es/utils/index.js +1 -0
  325. package/es/utils/templateListing.d.ts +2 -0
  326. package/es/utils/templateListing.js +12 -0
  327. package/package.json +6 -1
Binary file
Binary file
Binary file
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="416.004" height="713" viewBox="0 0 416.004 713">
2
+ <path id="mobile_frame" data-name="mobile frame" d="M17657,3124a32.975,32.975,0,0,1-33-33V2444a32.977,32.977,0,0,1,33-33H18004a32.97,32.97,0,0,1,33,33v122.032a3.5,3.5,0,0,1,3,3.464v110a3.5,3.5,0,0,1-3,3.469v31.07a3.5,3.5,0,0,1,3,3.464v44a3.5,3.5,0,0,1-3,3.464V3091a32.97,32.97,0,0,1-33,33Zm-22-681v618a21.022,21.022,0,0,0,21,21h349.008a21.022,21.022,0,0,0,21-21V2443a21.022,21.022,0,0,0-21-21H17656A21.022,21.022,0,0,0,17635,2443Z" transform="translate(-17623.998 -2411)" fill="black"/>
3
+ </svg>
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
2
  export interface MobileFrameProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
3
+ size?: 'large' | 'medium';
4
+ backgroundColor?: string;
3
5
  }
4
6
  export declare const MobileFrame: React.FC<React.PropsWithChildren<MobileFrameProps>>;
@@ -16,7 +16,7 @@ import { MobileWrapper, MobileInner, MobileBottomLine } from './styled';
16
16
  export const MobileFrame = (_a) => {
17
17
  var { children } = _a, restOfProps = __rest(_a, ["children"]);
18
18
  return (React.createElement(MobileWrapper, Object.assign({}, restOfProps),
19
- React.createElement(MobileInner, null,
19
+ React.createElement(MobileInner, { backgroundColor: restOfProps.backgroundColor, size: restOfProps.size },
20
20
  children,
21
21
  React.createElement(MobileBottomLine, null))));
22
22
  };
@@ -1,3 +1,4 @@
1
+ import type { MobileFrameProps } from './MobileFrame';
1
2
  export declare const MobileWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const MobileInner: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const MobileInner: import("styled-components").StyledComponent<"div", any, MobileFrameProps, never>;
3
4
  export declare const MobileBottomLine: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,5 +1,5 @@
1
1
  // Libraries
2
- import styled from 'styled-components';
2
+ import styled, { css } from 'styled-components';
3
3
  // Assets
4
4
  import MobileFrame from '@antscorp/antsomi-ui/es/assets/images/iphone.png';
5
5
  export const MobileWrapper = styled.div `
@@ -12,12 +12,17 @@ export const MobileWrapper = styled.div `
12
12
  export const MobileInner = styled.div `
13
13
  position: relative;
14
14
  width: 100%;
15
- max-width: 336px;
16
- height: 695px;
17
- margin: 61px 23px 20px 24px;
18
- border-bottom-left-radius: 50px;
19
- border-bottom-right-radius: 50px;
15
+ max-width: ${props => (props.size === 'medium' ? 290 : 336)}px;
16
+ height: ${props => (props.size === 'medium' ? 600 : 695)}px;
17
+ margin: ${props => (props.size === 'medium' ? '52px 23px 18px 24px' : '61px 23px 20px 24px')};
18
+ border-bottom-left-radius: ${props => (props.size === 'medium' ? 37 : 50)}px;
19
+ border-bottom-right-radius: ${props => (props.size === 'medium' ? 37 : 50)}px;
20
20
  overflow: hidden;
21
+
22
+ ${props => props.backgroundColor &&
23
+ css `
24
+ background-color: ${props.backgroundColor};
25
+ `}
21
26
  `;
22
27
  export const MobileBottomLine = styled.div `
23
28
  width: 145px;
@@ -264,7 +264,7 @@ export const SlideBar = props => {
264
264
  fontSize: `${BTN_ADD_SIZE}px`,
265
265
  cursor: disabledAdd ? 'not-allowed' : 'pointer',
266
266
  color: disabledAdd ? (_c = THEME.token) === null || _c === void 0 ? void 0 : _c.colorTextDisabled : (_d = THEME.token) === null || _d === void 0 ? void 0 : _d.colorPrimary,
267
- }, disabled: disabledAdd, onClick: (e) => {
267
+ }, onClick: (e) => {
268
268
  e.stopPropagation();
269
269
  if (!disabledAdd) {
270
270
  handleAddSlide();
@@ -19,10 +19,10 @@ import { StyledSpin } from './styled';
19
19
  import { THEME } from '@antscorp/antsomi-ui/es/constants';
20
20
  export const Spin = (props) => {
21
21
  var _a;
22
- const { indicatorSize } = props, restOf = __rest(props, ["indicatorSize"]);
22
+ const { indicatorSize, children } = props, restOf = __rest(props, ["indicatorSize", "children"]);
23
23
  return (React.createElement(StyledSpin, Object.assign({}, Object.assign({ indicator: (React.createElement(LoadingOutlined, { style: {
24
24
  fontSize: indicatorSize || 30,
25
25
  color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorPrimary,
26
- }, spin: true })) }, restOf)), props.children));
26
+ }, spin: true })) }, restOf)), children));
27
27
  };
28
28
  Spin.defaultProps = {};
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  // Libraries
13
13
  import { StyleProvider } from '@ant-design/cssinjs';
14
- import { ConfigProvider as AntdConfigProvider } from 'antd';
14
+ import { ConfigProvider as AntdConfigProvider, App } from 'antd';
15
15
  import dayjs from 'dayjs';
16
16
  import React, { useEffect } from 'react';
17
17
  import weekday from 'dayjs/plugin/weekday';
@@ -43,8 +43,9 @@ const ConfigProvider = props => {
43
43
  }
44
44
  }, [locale]);
45
45
  return (React.createElement(AntdConfigProvider, Object.assign({}, restOfProps),
46
- React.createElement(GlobalStyle, null),
47
- React.createElement(StyleProvider, { hashPriority: "high" }, children)));
46
+ React.createElement(App, null,
47
+ React.createElement(GlobalStyle, null),
48
+ React.createElement(StyleProvider, { hashPriority: "high" }, children))));
48
49
  };
49
50
  ConfigProvider.defaultProps = {
50
51
  theme: THEME,
@@ -11,7 +11,7 @@ import { fab } from '@fortawesome/free-brands-svg-icons';
11
11
  library.add(fas, far, fab);
12
12
  const { accent6, accent7, scrollBarSize } = THEME.token || {};
13
13
  export const GlobalStyle = () => {
14
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36;
14
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37;
15
15
  return (React.createElement(Global, { styles: css `
16
16
  @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap');
17
17
 
@@ -291,25 +291,24 @@ export const GlobalStyle = () => {
291
291
  }
292
292
  }
293
293
 
294
- .antsomi-picker-date-panel {
294
+ /* .antsomi-picker-date-panel {
295
295
  position: relative;
296
- }
296
+ } */
297
297
 
298
- .antsomi-picker-date-panel::before {
298
+ /* .antsomi-picker-date-panel::before {
299
299
  content: 'Hours';
300
300
  position: absolute;
301
301
  top: 0;
302
302
  right: 0;
303
303
  transform: translateX(100%);
304
304
  width: 61px;
305
- /* width: 53.5px; */
306
305
  font-weight: bold;
307
306
  border-right: 1px solid rgba(5, 5, 5, 0.06);
308
307
  height: 38px;
309
308
  display: flex;
310
309
  align-items: center;
311
310
  justify-content: center;
312
- }
311
+ } */
313
312
 
314
313
  .antsomi-picker-time-panel {
315
314
  .antsomi-picker-time-panel-column:after {
@@ -336,43 +335,94 @@ export const GlobalStyle = () => {
336
335
  display: none;
337
336
  }
338
337
 
339
- .antsomi-picker-content {
338
+ .antsomi-picker-time-panel-column {
339
+ width: 60px;
340
+ margin-top: 38px;
341
+ /* margin-top: 0; */
342
+ scrollbar-width: unset;
343
+ scrollbar-color: unset;
344
+
345
+ &::-webkit-scrollbar {
346
+ width: 6px;
347
+ background: transparent;
348
+ }
349
+ &::-webkit-scrollbar-track {
350
+ /* margin-top: 38px; */
351
+ border-radius: 10px;
352
+ }
353
+ }
354
+
355
+ /* ul.antsomi-picker-time-panel-column::before {
356
+ content: '';
357
+ position: absolute;
358
+ background: red;
359
+ top: 0;
360
+ right: 0;
361
+ width: 1px;
362
+ bottom: 0;
363
+ } */
364
+
365
+ /* .antsomi-picker-time-panel-column::before {
366
+ content: 'Hours';
367
+ position: sticky;
368
+ display: block;
369
+ top: 0;
370
+ height: 38px;
371
+ line-height: 38px;
372
+ text-align: center;
373
+ font-weight: bold;
374
+ background-color: #fff;
375
+ }
376
+
377
+ .antsomi-picker-time-panel-column:nth-child(1)::before {
378
+ content: 'Hours';
379
+ }
380
+ .antsomi-picker-time-panel-column:nth-child(2)::before {
381
+ content: 'Minutes';
382
+ }
383
+ .antsomi-picker-time-panel-column:nth-child(3)::before {
384
+ content: 'Seconds';
385
+ } */
386
+
387
+ /* .antsomi-picker-content {
340
388
  position: relative;
341
389
 
342
390
  .antsomi-picker-time-panel-column {
343
391
  margin-top: 38px;
344
392
  width: 60px;
345
393
  }
394
+ } */
395
+
396
+ .antsomi-picker-content {
397
+ position: relative;
346
398
  }
347
399
 
348
- .antsomi-picker-content::after,
400
+ /* .antsomi-picker-content::after,
349
401
  .antsomi-picker-content::before {
350
402
  content: 'Minutes';
351
403
  position: absolute;
352
404
  top: 0;
353
405
  left: 61px;
354
- /* left: 53.5px; */
355
406
  width: 60px;
356
- /* width: 52.5px; */
357
407
  height: 38px;
358
408
  display: flex;
359
409
  align-items: center;
360
410
  justify-content: center;
361
411
  font-weight: bold;
362
- }
412
+ } */
363
413
 
364
- .antsomi-picker-content::before {
414
+ /* .antsomi-picker-content::before {
365
415
  border-right: 1px solid rgba(5, 5, 5, 0.06);
366
- }
367
- .antsomi-picker-content::after {
416
+ } */
417
+ /* .antsomi-picker-content::after {
368
418
  content: 'Seconds';
369
419
  left: 120px;
370
- }
420
+ } */
371
421
  }
372
422
 
373
423
  /* Custom css scrollbar */
374
424
  ul {
375
- padding-left: 8px;
425
+ padding-left: 6px;
376
426
  scrollbar-gutter: stable;
377
427
  }
378
428
  }
@@ -415,6 +465,16 @@ export const GlobalStyle = () => {
415
465
  content: 'Hours';
416
466
  border: none;
417
467
  left: 0;
468
+
469
+ position: absolute;
470
+ top: 0;
471
+ /* left: 61px; */
472
+ width: 60px;
473
+ height: 38px;
474
+ display: flex;
475
+ align-items: center;
476
+ justify-content: center;
477
+ font-weight: bold;
418
478
  }
419
479
  }
420
480
  &.is-minutes-picker {
@@ -769,5 +829,14 @@ export const GlobalStyle = () => {
769
829
  }
770
830
  }
771
831
  }
832
+
833
+ /* Menu */
834
+ .antsomi-menu {
835
+ .antsomi-menu-submenu.antsomi-menu-submenu-selected {
836
+ .antsomi-menu-item.antsomi-menu-item-selected {
837
+ background-color: ${(_37 = THEME.token) === null || _37 === void 0 ? void 0 : _37.blue};
838
+ }
839
+ }
840
+ }
772
841
  ` }));
773
842
  };
@@ -14,6 +14,7 @@ var __rest = (this && this.__rest) || function (s, e) {
14
14
  // Libraries
15
15
  import React, { useCallback, useEffect, useLayoutEffect, useMemo, useState } from 'react';
16
16
  import { omit, isEmpty, flatMapDeep, set, get, isNaN } from 'lodash';
17
+ import { useQueryClient } from '@tanstack/react-query';
17
18
  // Hooks
18
19
  import { useDeepCompareEffect, useDeepCompareMemo } from '@antscorp/antsomi-ui/es/hooks';
19
20
  // Components
@@ -27,7 +28,6 @@ import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
27
28
  import { useGetDynamicContentAttr, useGetListPromotionPool, useGetListEventAttr, useGetListPromotionCodeAttr, useGetListBO, useGetListAllEvents, useGetListSourceByEvent, useGetListAttributeBO, useGetCustomFunction, useAddSavedCSFunction, useUpdateCSFunction, } from '@antscorp/antsomi-ui/es/queries';
28
29
  import { useGetEventTrackingAttributes } from '@antscorp/antsomi-ui/es/queries/ThirdParty';
29
30
  // Queries config
30
- import { queryClientAntsomiUI } from '@antscorp/antsomi-ui/es/queries/configs';
31
31
  import { QUERY_KEYS } from '@antscorp/antsomi-ui/es/constants/queries';
32
32
  import { dateExample } from './components/FormatDatetime';
33
33
  import DisplayFormat from './components/DisplayFormat';
@@ -126,6 +126,7 @@ export const AddDynamicContent = props => {
126
126
  const [attrDFOptions, setAttrDFOptions] = useState([]);
127
127
  // Template Custom
128
128
  const [templateId, settemplateId] = useState();
129
+ const queryClient = useQueryClient();
129
130
  const { data: listBoAttributes = [], isFetching: isFetchingListBoAttr, isError: isErrorBoAttr, } = useGetListAttributeBO({
130
131
  url,
131
132
  itemTypeIds: itemTypeId ? [itemTypeId] : [],
@@ -911,7 +912,7 @@ export const AddDynamicContent = props => {
911
912
  break;
912
913
  setItemTypeId(Number(selectedItemTypeId));
913
914
  const key = [QUERY_KEYS.GET_EVENT_ATTRIBUTE_BO, [selectedItemTypeId]];
914
- const listAttBOByItemTypeId = serilizeBOAttr(queryClientAntsomiUI.getQueryData(key));
915
+ const listAttBOByItemTypeId = serilizeBOAttr(queryClient.getQueryData(key));
915
916
  if (listAttBOByItemTypeId.length) {
916
917
  form.setFieldsValue({
917
918
  [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: listAttBOByItemTypeId[0],
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { CalendarSelectionProps } from './types';
3
+ export declare const CalendarSelection: React.FC<CalendarSelectionProps>;
@@ -0,0 +1,45 @@
1
+ /* eslint-disable react/jsx-no-constructed-context-values */
2
+ import React, { useLayoutEffect, useReducer, useRef } from 'react';
3
+ import { Divider } from 'antd';
4
+ import { ActionContext, StateContext } from './context';
5
+ import { reducer, INITIAL_STATE } from './reducer';
6
+ import { StyledPopover, StyledPopoverBody, StyledPopoverContainer } from './styled';
7
+ import { CustomPicker, Footer, RangeSelectOptions, TimeRangeDisplay } from './components';
8
+ import { LOCAL_TIMEZONE, RANGE_LIMIT } from './constants';
9
+ import { initState, resetValue } from './actions';
10
+ import { useTriggerOut } from './hooks/useTriggerOut';
11
+ export const CalendarSelection = props => {
12
+ const initialed = useRef(false);
13
+ const { value, rangeLimit = RANGE_LIMIT, timezone = LOCAL_TIMEZONE, timeDisplayProps, popoverProps, rangePickerProps, onChange, } = props;
14
+ const [state, dispatch] = useReducer(reducer, INITIAL_STATE);
15
+ useLayoutEffect(() => {
16
+ if (!value)
17
+ return;
18
+ dispatch(initState(value, !initialed.current));
19
+ initialed.current = true;
20
+ }, [value]);
21
+ useLayoutEffect(() => {
22
+ if (!state.open) {
23
+ return () => {
24
+ dispatch(resetValue());
25
+ };
26
+ }
27
+ }, [state.open]);
28
+ useTriggerOut({ state, dispatch, onChange });
29
+ const popoverContent = (React.createElement(StyledPopoverContainer, null,
30
+ React.createElement(StyledPopoverBody, null,
31
+ React.createElement(RangeSelectOptions, null),
32
+ React.createElement(Divider, { type: "vertical", style: { margin: 0, height: 'auto' } }),
33
+ React.createElement(CustomPicker, Object.assign({}, rangePickerProps))),
34
+ React.createElement(Divider, { style: { margin: 0 } }),
35
+ React.createElement(Footer, null)));
36
+ // console.log(state.value.current.rangeValue);
37
+ return (React.createElement(StateContext.Provider, { value: Object.assign(Object.assign({}, state), { rangeLimit,
38
+ timezone }) },
39
+ React.createElement(ActionContext.Provider, { value: { dispatch } },
40
+ React.createElement(StyledPopover, Object.assign({}, popoverProps, { open: state.open, arrow: false, trigger: ['click'], content: popoverContent, destroyTooltipOnHide: true, overlayInnerStyle: { padding: 0 }, onOpenChange: isOpen => {
41
+ if (!isOpen)
42
+ dispatch({ type: 'toggle_popover' });
43
+ } }),
44
+ React.createElement(TimeRangeDisplay, Object.assign({}, timeDisplayProps))))));
45
+ };
@@ -0,0 +1,55 @@
1
+ import { Custom, RangeInfo, CalendarSelectionValue, RangeValue } from './types';
2
+ export declare const ACTION_TYPES: {
3
+ readonly initState: "init_state";
4
+ readonly changeRangeType: "change_range_type";
5
+ readonly updateRangeInfo: "update_range_info";
6
+ readonly updateRangeValue: "update_range_value";
7
+ readonly changeAutoUpdateTo: "change_auto_update_to";
8
+ readonly togglePopover: "toggle_popover";
9
+ readonly apply: "apply";
10
+ readonly resetValue: "reset_value";
11
+ };
12
+ export declare const changeRangeType: (rangeType: string, callback?: ((rangeInfo: RangeInfo) => void) | undefined) => {
13
+ type: "change_range_type";
14
+ payload: {
15
+ rangeType: string;
16
+ callback: ((rangeInfo: RangeInfo) => void) | undefined;
17
+ };
18
+ };
19
+ export declare const updateRangeInfo: (updateValue: Partial<RangeInfo>) => {
20
+ type: "update_range_info";
21
+ payload: {
22
+ updateValue: Partial<RangeInfo>;
23
+ };
24
+ };
25
+ export declare const updateRangeValue: (rangeValue: RangeValue[], options?: {
26
+ isManual: boolean;
27
+ }) => {
28
+ type: "update_range_value";
29
+ payload: {
30
+ rangeValue: RangeValue[];
31
+ options: {
32
+ isManual: boolean;
33
+ } | undefined;
34
+ };
35
+ };
36
+ export declare const changeAutoUpdateTo: (value: Custom['autoUpdateTo']) => {
37
+ type: "change_auto_update_to";
38
+ payload: import("./types").AutoUpdateTo;
39
+ };
40
+ export declare const initState: (initData: CalendarSelectionValue, needTriggerOut?: boolean) => {
41
+ type: "init_state";
42
+ payload: {
43
+ initData: CalendarSelectionValue;
44
+ needTriggerOut: boolean;
45
+ };
46
+ };
47
+ export declare const togglePopover: () => {
48
+ type: "toggle_popover";
49
+ };
50
+ export declare const apply: () => {
51
+ type: "apply";
52
+ };
53
+ export declare const resetValue: () => {
54
+ type: "reset_value";
55
+ };
@@ -0,0 +1,39 @@
1
+ export const ACTION_TYPES = {
2
+ initState: 'init_state',
3
+ changeRangeType: 'change_range_type',
4
+ updateRangeInfo: 'update_range_info',
5
+ updateRangeValue: 'update_range_value',
6
+ changeAutoUpdateTo: 'change_auto_update_to',
7
+ togglePopover: 'toggle_popover',
8
+ apply: 'apply',
9
+ resetValue: 'reset_value',
10
+ };
11
+ export const changeRangeType = (rangeType, callback) => ({
12
+ type: ACTION_TYPES.changeRangeType,
13
+ payload: { rangeType, callback },
14
+ });
15
+ export const updateRangeInfo = (updateValue) => ({
16
+ type: ACTION_TYPES.updateRangeInfo,
17
+ payload: { updateValue },
18
+ });
19
+ export const updateRangeValue = (rangeValue, options) => ({
20
+ type: ACTION_TYPES.updateRangeValue,
21
+ payload: { rangeValue, options },
22
+ });
23
+ export const changeAutoUpdateTo = (value) => ({
24
+ type: ACTION_TYPES.changeAutoUpdateTo,
25
+ payload: value,
26
+ });
27
+ export const initState = (initData, needTriggerOut = false) => ({
28
+ type: ACTION_TYPES.initState,
29
+ payload: { initData, needTriggerOut },
30
+ });
31
+ export const togglePopover = () => ({
32
+ type: ACTION_TYPES.togglePopover,
33
+ });
34
+ export const apply = () => ({
35
+ type: ACTION_TYPES.apply,
36
+ });
37
+ export const resetValue = () => ({
38
+ type: ACTION_TYPES.resetValue,
39
+ });
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ className?: string;
4
+ id?: string;
5
+ };
6
+ export declare const AutoUpdateTo: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { Select } from '@antscorp/antsomi-ui/es/components/molecules/Select';
3
+ import { updateRangeInfo } from '../../actions';
4
+ import { AUTO_UPDATE_TO_KEY, AUTO_UPDATE_TO_OPTIONS, SELECTION_KEY } from '../../constants';
5
+ import { useCalendarSelectionContext } from '../../hooks';
6
+ import { isAutoUpdateToOption } from '../../utils';
7
+ import { StyledAutoUpdateToRoot } from './styled';
8
+ export const AutoUpdateTo = props => {
9
+ const { className, id } = props;
10
+ const { state, action } = useCalendarSelectionContext();
11
+ const { rangeInfo } = state.value.current;
12
+ const value = AUTO_UPDATE_TO_OPTIONS[rangeInfo.type === 'custom' ? rangeInfo.autoUpdateTo : AUTO_UPDATE_TO_KEY.fixed].label;
13
+ const handleChangeUpdateTo = (value) => {
14
+ if (!isAutoUpdateToOption(value))
15
+ return;
16
+ action.dispatch(updateRangeInfo({
17
+ type: SELECTION_KEY.custom,
18
+ autoUpdateTo: value,
19
+ }));
20
+ };
21
+ return (React.createElement(StyledAutoUpdateToRoot, { className: className },
22
+ React.createElement("div", { className: "label" }, "Auto update to"),
23
+ React.createElement(Select, { id: id, options: Object.values(AUTO_UPDATE_TO_OPTIONS).map(i => (Object.assign(Object.assign({}, i), { value: i.key }))), value: value, onChange: handleChangeUpdateTo })));
24
+ };
@@ -0,0 +1 @@
1
+ export * from './AutoUpdateTo';
@@ -0,0 +1 @@
1
+ export * from './AutoUpdateTo';
@@ -0,0 +1 @@
1
+ export declare const StyledAutoUpdateToRoot: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,10 @@
1
+ import styled from 'styled-components';
2
+ export const StyledAutoUpdateToRoot = styled.div `
3
+ display: flex;
4
+ justify-content: space-between;
5
+ align-items: center;
6
+
7
+ .antsomi-select-selector {
8
+ min-width: 80px;
9
+ }
10
+ `;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { CustomPickerProps } from './types';
3
+ export declare const CustomPicker: React.FC<CustomPickerProps>;