@antscorp/antsomi-ui 1.3.15 → 1.3.16

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 (286) 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/ip14-pro-camera.png +0 -0
  19. package/es/assets/images/ip14-pro-mobile-frame.png +0 -0
  20. package/es/assets/images/profile.png +0 -0
  21. package/es/assets/images/skeleton_bg.png +0 -0
  22. package/es/assets/images/tail.png +0 -0
  23. package/es/assets/svg/mobile-frame.svg +3 -0
  24. package/es/components/atoms/InputDynamic/EditCaretPositioning.js +15 -0
  25. package/es/components/atoms/InputDynamic/InputDynamic.js +11 -9
  26. package/es/components/atoms/MobileFrame/MobileFrame.d.ts +2 -0
  27. package/es/components/atoms/MobileFrame/MobileFrame.js +1 -1
  28. package/es/components/atoms/MobileFrame/styled.d.ts +2 -1
  29. package/es/components/atoms/MobileFrame/styled.js +11 -6
  30. package/es/components/atoms/MobileFrameV2/MobileFrameV2.d.ts +4 -0
  31. package/es/components/atoms/MobileFrameV2/MobileFrameV2.js +22 -0
  32. package/es/components/atoms/MobileFrameV2/constants.d.ts +4 -0
  33. package/es/components/atoms/MobileFrameV2/constants.js +4 -0
  34. package/es/components/atoms/MobileFrameV2/index.d.ts +2 -0
  35. package/es/components/atoms/MobileFrameV2/index.js +1 -0
  36. package/es/components/atoms/MobileFrameV2/styled.d.ts +3 -0
  37. package/es/components/atoms/MobileFrameV2/styled.js +43 -0
  38. package/es/components/atoms/SlideBar/SlideBar.js +3 -1
  39. package/es/components/atoms/Spin/Spin.js +2 -2
  40. package/es/components/atoms/index.d.ts +1 -0
  41. package/es/components/atoms/index.js +1 -0
  42. package/es/components/common/ConfigProvider/ConfigProvider.d.ts +1 -0
  43. package/es/components/common/ConfigProvider/ConfigProvider.js +5 -3
  44. package/es/components/common/ConfigProvider/GlobalStyle.js +38 -4
  45. package/es/components/index.d.ts +1 -0
  46. package/es/components/index.js +1 -0
  47. package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +3 -2
  48. package/es/components/molecules/ModalV2/styled.js +4 -0
  49. package/es/components/molecules/ResizeGrid/ResizeGrid.js +26 -13
  50. package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +2 -2
  51. package/es/components/molecules/ResizeGrid/types.d.ts +2 -0
  52. package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.d.ts +1 -0
  53. package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.js +4 -3
  54. package/es/components/molecules/RichMenu/RichMenuChatBar/styled.d.ts +1 -0
  55. package/es/components/molecules/RichMenu/RichMenuChatBar/styled.js +1 -1
  56. package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.d.ts +6 -0
  57. package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.js +24 -5
  58. package/es/components/molecules/RichMenu/RichMenuMobileView/styled.d.ts +5 -0
  59. package/es/components/molecules/RichMenu/RichMenuMobileView/styled.js +31 -0
  60. package/es/components/molecules/ShareAccess/ShareAccess.js +5 -4
  61. package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.d.ts +5 -2
  62. package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +5 -4
  63. package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.js +1 -0
  64. package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.d.ts +1 -1
  65. package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.js +7 -9
  66. package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.d.ts +1 -1
  67. package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.js +20 -9
  68. package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.d.ts +1 -1
  69. package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.js +13 -4
  70. package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +1 -0
  71. package/es/components/molecules/ShareAccess/types.d.ts +10 -1
  72. package/es/components/molecules/ShareAccess/utils.d.ts +2 -1
  73. package/es/components/molecules/ShareAccess/utils.js +9 -0
  74. package/es/components/molecules/TemplateSaveAs/TemplateSaveAs.d.ts +73 -0
  75. package/es/components/molecules/TemplateSaveAs/TemplateSaveAs.js +167 -0
  76. package/es/components/molecules/TemplateSaveAs/TemplateSaveAsModal.d.ts +10 -0
  77. package/es/components/molecules/TemplateSaveAs/TemplateSaveAsModal.js +50 -0
  78. package/es/components/molecules/TemplateSaveAs/components/Category/Category.d.ts +18 -0
  79. package/es/components/molecules/TemplateSaveAs/components/Category/Category.js +24 -0
  80. package/es/components/molecules/TemplateSaveAs/components/Category/index.d.ts +2 -0
  81. package/es/components/molecules/TemplateSaveAs/components/Category/index.js +1 -0
  82. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/BigImage.d.ts +10 -0
  83. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/BigImage.js +12 -0
  84. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/ImageSlider.d.ts +19 -0
  85. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/ImageSlider.js +66 -0
  86. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/SmallImage.d.ts +9 -0
  87. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/SmallImage.js +6 -0
  88. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/index.d.ts +2 -0
  89. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/index.js +1 -0
  90. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/styled.d.ts +9 -0
  91. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/styled.js +184 -0
  92. package/es/components/molecules/TemplateSaveAs/components/index.d.ts +4 -0
  93. package/es/components/molecules/TemplateSaveAs/components/index.js +2 -0
  94. package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.d.ts +71 -0
  95. package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.js +121 -0
  96. package/es/components/molecules/TemplateSaveAs/index.d.ts +4 -0
  97. package/es/components/molecules/TemplateSaveAs/index.js +3 -0
  98. package/es/components/molecules/TemplateSaveAs/styled.d.ts +4 -0
  99. package/es/components/molecules/TemplateSaveAs/styled.js +73 -0
  100. package/es/components/molecules/ThumbnailCard/ThumbnailCard.d.ts +3 -0
  101. package/es/components/molecules/ThumbnailCard/ThumbnailCard.js +72 -0
  102. package/es/components/molecules/ThumbnailCard/constants.d.ts +3 -0
  103. package/es/components/molecules/ThumbnailCard/constants.js +3 -0
  104. package/es/components/molecules/ThumbnailCard/index.d.ts +2 -0
  105. package/es/components/molecules/ThumbnailCard/index.js +2 -0
  106. package/es/components/molecules/ThumbnailCard/styled.d.ts +5 -0
  107. package/es/components/molecules/ThumbnailCard/styled.js +90 -0
  108. package/es/components/molecules/ThumbnailCard/types.d.ts +24 -0
  109. package/es/components/molecules/ThumbnailCard/types.js +1 -0
  110. package/es/components/molecules/index.d.ts +4 -0
  111. package/es/components/molecules/index.js +2 -0
  112. package/es/components/organism/Menu/Menu.d.ts +2 -0
  113. package/es/components/organism/Menu/Menu.js +2 -0
  114. package/es/components/organism/Menu/index.d.ts +1 -0
  115. package/es/components/organism/Menu/index.js +1 -0
  116. package/es/components/organism/PreviewTemplateModal/components/Banner/index.d.ts +3 -0
  117. package/es/components/organism/PreviewTemplateModal/components/Banner/index.js +32 -0
  118. package/es/components/organism/PreviewTemplateModal/components/Banner/styled.d.ts +1 -0
  119. package/es/components/organism/PreviewTemplateModal/components/Banner/styled.js +71 -0
  120. package/es/components/organism/PreviewTemplateModal/components/Information/index.d.ts +3 -0
  121. package/es/components/organism/PreviewTemplateModal/components/Information/index.js +30 -0
  122. package/es/components/organism/PreviewTemplateModal/components/Information/styled.d.ts +2 -0
  123. package/es/components/organism/PreviewTemplateModal/components/Information/styled.js +45 -0
  124. package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/index.d.ts +3 -0
  125. package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/index.js +32 -0
  126. package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/styled.d.ts +5 -0
  127. package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/styled.js +17 -0
  128. package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/index.d.ts +6 -0
  129. package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/index.js +79 -0
  130. package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/styled.d.ts +3 -0
  131. package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/styled.js +72 -0
  132. package/es/components/organism/PreviewTemplateModal/components/index.d.ts +4 -0
  133. package/es/components/organism/PreviewTemplateModal/components/index.js +4 -0
  134. package/es/components/organism/PreviewTemplateModal/constants/dataSample.d.ts +2 -0
  135. package/es/components/organism/PreviewTemplateModal/constants/dataSample.js +9 -0
  136. package/es/components/organism/PreviewTemplateModal/constants/defaultProps.d.ts +8 -0
  137. package/es/components/organism/PreviewTemplateModal/constants/defaultProps.js +12 -0
  138. package/es/components/organism/PreviewTemplateModal/constants/html.d.ts +1 -0
  139. package/es/components/organism/PreviewTemplateModal/constants/html.js +1 -0
  140. package/es/components/organism/PreviewTemplateModal/constants/index.d.ts +4 -0
  141. package/es/components/organism/PreviewTemplateModal/constants/index.js +4 -0
  142. package/es/components/organism/PreviewTemplateModal/constants/variables.d.ts +12 -0
  143. package/es/components/organism/PreviewTemplateModal/constants/variables.js +12 -0
  144. package/es/components/organism/PreviewTemplateModal/index.d.ts +3 -0
  145. package/es/components/organism/PreviewTemplateModal/index.js +34 -0
  146. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/BannerPropsTable/index.d.ts +2 -0
  147. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/BannerPropsTable/index.js +34 -0
  148. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/DataTypeTable/index.d.ts +2 -0
  149. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/DataTypeTable/index.js +62 -0
  150. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/InformationPropsTable/index.d.ts +2 -0
  151. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/InformationPropsTable/index.js +76 -0
  152. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/SimilarTemplatePropsTable/index.d.ts +2 -0
  153. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/SimilarTemplatePropsTable/index.js +40 -0
  154. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/TThumbnailTable/index.d.ts +2 -0
  155. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/TThumbnailTable/index.js +30 -0
  156. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/ThumbnailPropsTable/index.d.ts +2 -0
  157. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/ThumbnailPropsTable/index.js +46 -0
  158. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/index.d.ts +6 -0
  159. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/index.js +6 -0
  160. package/es/components/organism/PreviewTemplateModal/styled.d.ts +4 -0
  161. package/es/components/organism/PreviewTemplateModal/styled.js +26 -0
  162. package/es/components/organism/PreviewTemplateModal/types.d.ts +38 -0
  163. package/es/components/organism/PreviewTemplateModal/types.js +1 -0
  164. package/es/components/organism/index.d.ts +1 -0
  165. package/es/components/organism/index.js +1 -0
  166. package/es/components/template/TemplateListing/Loadable.d.ts +6 -0
  167. package/es/components/template/TemplateListing/Loadable.js +7 -0
  168. package/es/components/template/TemplateListing/components/BlankTemplate/index.d.ts +3 -0
  169. package/es/components/template/TemplateListing/components/BlankTemplate/index.js +19 -0
  170. package/es/components/template/TemplateListing/components/BlankTemplate/styled.d.ts +2 -0
  171. package/es/components/template/TemplateListing/components/BlankTemplate/styled.js +26 -0
  172. package/es/components/template/TemplateListing/components/CategoryListing/index.d.ts +3 -0
  173. package/es/components/template/TemplateListing/components/CategoryListing/index.js +127 -0
  174. package/es/components/template/TemplateListing/components/CategoryListing/styled.d.ts +7 -0
  175. package/es/components/template/TemplateListing/components/CategoryListing/styled.js +97 -0
  176. package/es/components/template/TemplateListing/components/CategoryListing/types.d.ts +11 -0
  177. package/es/components/template/TemplateListing/components/CategoryListing/types.js +1 -0
  178. package/es/components/template/TemplateListing/components/Empty/index.d.ts +3 -0
  179. package/es/components/template/TemplateListing/components/Empty/index.js +18 -0
  180. package/es/components/template/TemplateListing/components/Empty/styled.d.ts +3 -0
  181. package/es/components/template/TemplateListing/components/Empty/styled.js +35 -0
  182. package/es/components/template/TemplateListing/components/index.d.ts +3 -0
  183. package/es/components/template/TemplateListing/components/index.js +3 -0
  184. package/es/components/template/TemplateListing/constants/defaultProps.d.ts +13 -0
  185. package/es/components/template/TemplateListing/constants/defaultProps.js +24 -0
  186. package/es/components/template/TemplateListing/constants/index.d.ts +2 -0
  187. package/es/components/template/TemplateListing/constants/index.js +2 -0
  188. package/es/components/template/TemplateListing/constants/mockData.d.ts +2 -0
  189. package/es/components/template/TemplateListing/constants/mockData.js +101 -0
  190. package/es/components/template/TemplateListing/hooks/index.d.ts +1 -0
  191. package/es/components/template/TemplateListing/hooks/index.js +1 -0
  192. package/es/components/template/TemplateListing/hooks/useTemplateListing.d.ts +62 -0
  193. package/es/components/template/TemplateListing/hooks/useTemplateListing.js +246 -0
  194. package/es/components/template/TemplateListing/index.d.ts +3 -0
  195. package/es/components/template/TemplateListing/index.js +84 -0
  196. package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.d.ts +2 -0
  197. package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.js +42 -0
  198. package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.d.ts +2 -0
  199. package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.js +66 -0
  200. package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.d.ts +2 -0
  201. package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.js +78 -0
  202. package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.d.ts +2 -0
  203. package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.js +28 -0
  204. package/es/components/template/TemplateListing/stories/dataTypes/components/TCategoryItemTable/index.d.ts +2 -0
  205. package/es/components/template/TemplateListing/stories/dataTypes/components/TCategoryItemTable/index.js +42 -0
  206. package/es/components/template/TemplateListing/stories/dataTypes/components/TTemplateItemTable/index.d.ts +2 -0
  207. package/es/components/template/TemplateListing/stories/dataTypes/components/TTemplateItemTable/index.js +35 -0
  208. package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.d.ts +2 -0
  209. package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.js +47 -0
  210. package/es/components/template/TemplateListing/stories/dataTypes/components/index.d.ts +7 -0
  211. package/es/components/template/TemplateListing/stories/dataTypes/components/index.js +7 -0
  212. package/es/components/template/TemplateListing/stories/demo/styled.d.ts +1 -0
  213. package/es/components/template/TemplateListing/stories/demo/styled.js +7 -0
  214. package/es/components/template/TemplateListing/styled/index.d.ts +3 -0
  215. package/es/components/template/TemplateListing/styled/index.js +35 -0
  216. package/es/components/template/TemplateListing/types/BlankTemplate.d.ts +9 -0
  217. package/es/components/template/TemplateListing/types/BlankTemplate.js +1 -0
  218. package/es/components/template/TemplateListing/types/CategoryListing.d.ts +22 -0
  219. package/es/components/template/TemplateListing/types/CategoryListing.js +1 -0
  220. package/es/components/template/TemplateListing/types/Empty.d.ts +5 -0
  221. package/es/components/template/TemplateListing/types/Empty.js +1 -0
  222. package/es/components/template/TemplateListing/types/TemplateListing.d.ts +27 -0
  223. package/es/components/template/TemplateListing/types/TemplateListing.js +1 -0
  224. package/es/components/template/TemplateListing/types/index.d.ts +3 -0
  225. package/es/components/template/TemplateListing/types/index.js +3 -0
  226. package/es/components/template/index.d.ts +3 -0
  227. package/es/components/template/index.js +6 -0
  228. package/es/constants/datetime.d.ts +8 -0
  229. package/es/constants/datetime.js +1594 -0
  230. package/es/constants/index.d.ts +5 -1
  231. package/es/constants/index.js +5 -1
  232. package/es/constants/queries.d.ts +4 -0
  233. package/es/constants/queries.js +5 -0
  234. package/es/constants/templateListing.d.ts +50 -0
  235. package/es/constants/templateListing.js +52 -0
  236. package/es/constants/theme.js +1 -1
  237. package/es/constants/variables.d.ts +19 -0
  238. package/es/constants/variables.js +19 -0
  239. package/es/hooks/index.d.ts +4 -0
  240. package/es/hooks/index.js +4 -0
  241. package/es/hooks/useEffectOnlyOnce.d.ts +2 -0
  242. package/es/hooks/useEffectOnlyOnce.js +12 -0
  243. package/es/hooks/useForceUpdate.d.ts +1 -0
  244. package/es/hooks/useForceUpdate.js +5 -0
  245. package/es/hooks/useIntersectionObserver.d.ts +57 -0
  246. package/es/hooks/useIntersectionObserver.js +97 -0
  247. package/es/hooks/useListingItemResize.d.ts +12 -0
  248. package/es/hooks/useListingItemResize.js +58 -0
  249. package/es/hooks/useScrollToEnd.d.ts +1 -0
  250. package/es/hooks/useScrollToEnd.js +30 -0
  251. package/es/index.d.ts +3 -0
  252. package/es/index.js +3 -0
  253. package/es/locales/en/translation.json +9 -1
  254. package/es/locales/i18n.d.ts +16 -0
  255. package/es/locales/translations.d.ts +8 -0
  256. package/es/locales/vi/translation.json +9 -1
  257. package/es/models/ObjectTemplate.d.ts +83 -0
  258. package/es/models/ObjectTemplate.js +107 -0
  259. package/es/models/TemplateCategory.d.ts +13 -0
  260. package/es/models/TemplateCategory.js +28 -0
  261. package/es/queries/CustomFunction/useCustomFunction.js +35 -35
  262. package/es/queries/TemplateListing/index.d.ts +52 -0
  263. package/es/queries/TemplateListing/index.js +105 -0
  264. package/es/queries/index.d.ts +1 -0
  265. package/es/queries/index.js +1 -0
  266. package/es/services/TemplateListing/index.d.ts +71 -0
  267. package/es/services/TemplateListing/index.js +161 -0
  268. package/es/test.js +203 -55
  269. package/es/types/index.d.ts +5 -0
  270. package/es/types/index.js +3 -0
  271. package/es/types/service.d.ts +22 -0
  272. package/es/types/service.js +1 -0
  273. package/es/types/share-access.d.ts +18 -0
  274. package/es/types/share-access.js +1 -0
  275. package/es/types/templateListing.d.ts +14 -0
  276. package/es/types/templateListing.js +1 -0
  277. package/es/types/variables.d.ts +3 -0
  278. package/es/utils/common.d.ts +3 -0
  279. package/es/utils/common.js +35 -0
  280. package/es/utils/commonComponent.d.ts +7 -0
  281. package/es/utils/commonComponent.js +28 -0
  282. package/es/utils/index.d.ts +1 -0
  283. package/es/utils/index.js +1 -0
  284. package/es/utils/templateListing.d.ts +2 -0
  285. package/es/utils/templateListing.js +12 -0
  286. package/package.json +6 -2
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>
@@ -59,6 +59,21 @@ if (window.getSelection && document.createRange) {
59
59
  }
60
60
  }
61
61
  let sel = window.getSelection();
62
+ // NOTE: add new text node after span contain shortlink content
63
+ if (range.endContainer) {
64
+ const { parentNode } = range.endContainer;
65
+ if (parentNode && parentNode.classList && parentNode.classList.contains('detect-url')) {
66
+ const textNode = document.createTextNode('\u00A0'); // Create a text node with a non-breaking space
67
+ if (parentNode.nextSibling) {
68
+ parentNode.parentNode.insertBefore(textNode, parentNode.nextSibling);
69
+ }
70
+ else {
71
+ parentNode.parentNode.appendChild(textNode);
72
+ }
73
+ range.setStart(textNode, textNode.length);
74
+ range.collapse(true);
75
+ }
76
+ }
62
77
  sel === null || sel === void 0 ? void 0 : sel.removeAllRanges();
63
78
  sel === null || sel === void 0 ? void 0 : sel.addRange(range);
64
79
  };
@@ -144,15 +144,17 @@ export const InputDynamic = (props) => {
144
144
  if (innerHTML) {
145
145
  // remove span url và focus vào vị trí remove để add tag shortlink vào vị trí này.
146
146
  const index = Array.from((_a = personalizationInputRef.current) === null || _a === void 0 ? void 0 : _a.childNodes).findIndex((element) => element.id === data.id);
147
- const range = document.createRange(); // Tạo một đối tượng Range
148
- const sel = window.getSelection(); // Lấy đối tượng Selection hiện tại
149
- range.setStart((_b = personalizationInputRef.current) === null || _b === void 0 ? void 0 : _b.childNodes[index], 0); // Đặt điểm bắt đầu của Range
150
- range.collapse(true); // Thu gọn Range để tập trung vào điểm bắt đầu
151
- sel === null || sel === void 0 ? void 0 : sel.removeAllRanges(); // Xóa tất cả các Range hiện
152
- sel === null || sel === void 0 ? void 0 : sel.addRange(range); // Thêm Range mới vào Selection
153
- caretPositionRef.current = CaretPositioning.saveSelection(personalizationInputRef.current);
154
- const newDataUpdate = innerHTML.replace(data.outerHTML, '');
155
- personalizationInputRef.current.innerHTML = newDataUpdate;
147
+ if (index !== -1) {
148
+ const range = document.createRange(); // Tạo một đối tượng Range
149
+ const sel = window.getSelection(); // Lấy đối tượng Selection hiện tại
150
+ range.setStart((_b = personalizationInputRef.current) === null || _b === void 0 ? void 0 : _b.childNodes[index], 0); // Đặt điểm bắt đầu của Range
151
+ range.collapse(true); // Thu gọn Range để tập trung vào điểm bắt đầu
152
+ sel === null || sel === void 0 ? void 0 : sel.removeAllRanges(); // Xóa tất cả các Range hiện
153
+ sel === null || sel === void 0 ? void 0 : sel.addRange(range); // Thêm Range mới vào Selection
154
+ caretPositionRef.current = CaretPositioning.saveSelection(personalizationInputRef.current);
155
+ const newDataUpdate = innerHTML.replace(data.outerHTML, '');
156
+ personalizationInputRef.current.innerHTML = newDataUpdate;
157
+ }
156
158
  }
157
159
  break;
158
160
  }
@@ -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;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export interface MobileFrameV2Props extends React.HtmlHTMLAttributes<HTMLDivElement> {
3
+ }
4
+ export declare const MobileFrameV2: React.FC<React.PropsWithChildren<MobileFrameV2Props>>;
@@ -0,0 +1,22 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ // Libraries
13
+ import React from 'react';
14
+ // Styled
15
+ import { MobileWrapper, MobileInner, MobileCamera } from './styled';
16
+ export const MobileFrameV2 = (_a) => {
17
+ var { children } = _a, restOfProps = __rest(_a, ["children"]);
18
+ return (React.createElement(MobileWrapper, Object.assign({}, restOfProps),
19
+ React.createElement(MobileInner, null,
20
+ React.createElement("div", { className: "mobile-inner-content" }, children),
21
+ React.createElement(MobileCamera, null))));
22
+ };
@@ -0,0 +1,4 @@
1
+ export declare const MOBILE_VIEWPORT: {
2
+ width: number;
3
+ height: number;
4
+ };
@@ -0,0 +1,4 @@
1
+ export const MOBILE_VIEWPORT = {
2
+ width: 352.5,
3
+ height: 764.2,
4
+ };
@@ -0,0 +1,2 @@
1
+ export { MobileFrameV2 } from './MobileFrameV2';
2
+ export type { MobileFrameV2Props } from './MobileFrameV2';
@@ -0,0 +1 @@
1
+ export { MobileFrameV2 } from './MobileFrameV2';
@@ -0,0 +1,3 @@
1
+ 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 MobileCamera: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,43 @@
1
+ // Libraries
2
+ import styled from 'styled-components';
3
+ // Assets
4
+ import MobileFrameV2 from '@antscorp/antsomi-ui/es/assets/images/ip14-pro-mobile-frame.png';
5
+ import cameraImage from '@antscorp/antsomi-ui/es/assets/images/ip14-pro-camera.png';
6
+ // Constants
7
+ import { MOBILE_VIEWPORT } from './constants';
8
+ export const MobileWrapper = styled.div `
9
+ position: relative;
10
+ display: flex;
11
+ justify-content: center;
12
+ background: url(${MobileFrameV2}) no-repeat center center;
13
+ background-size: contain;
14
+ `;
15
+ export const MobileInner = styled.div `
16
+ position: relative;
17
+ width: ${MOBILE_VIEWPORT.width}px;
18
+ max-width: ${MOBILE_VIEWPORT.width}px;
19
+ height: ${MOBILE_VIEWPORT.height}px;
20
+ margin: 18px 21px;
21
+ border-radius: 50px;
22
+ overflow: hidden;
23
+
24
+ .mobile-inner-content {
25
+ position: absolute;
26
+ z-index: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ }
30
+ `;
31
+ export const MobileCamera = styled.div `
32
+ position: absolute;
33
+ pointer-events: none;
34
+ width: 112.11px;
35
+ height: 32.29px;
36
+ margin: auto;
37
+ top: 10px;
38
+ left: 50%;
39
+ z-index: 1;
40
+ transform: translateX(-50%);
41
+ background: url(${cameraImage}) no-repeat center center;
42
+ background-size: contain;
43
+ `;
@@ -264,7 +264,9 @@ 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
- }, onClick: (e) => {
267
+ },
268
+ // disabled={disabledAdd}
269
+ onClick: (e) => {
268
270
  e.stopPropagation();
269
271
  if (!disabledAdd) {
270
272
  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 = {};
@@ -35,6 +35,7 @@ export { InputDynamic } from './InputDynamic';
35
35
  export * from './Flex';
36
36
  export * from './PreviewTabs';
37
37
  export * from './MobileFrame';
38
+ export * from './MobileFrameV2';
38
39
  export * from './SlideBar';
39
40
  export type { SliderProps } from './Slider';
40
41
  export type { PaginationProps } from './Pagination';
@@ -35,4 +35,5 @@ export { InputDynamic } from './InputDynamic';
35
35
  export * from './Flex';
36
36
  export * from './PreviewTabs';
37
37
  export * from './MobileFrame';
38
+ export * from './MobileFrameV2';
38
39
  export * from './SlideBar';
@@ -2,6 +2,7 @@ import { ConfigProviderProps as AntdConfigProviderProps } from 'antd/es/config-p
2
2
  import React, { ReactNode } from 'react';
3
3
  import '@antscorp/antsomi-ui/es/assets/css/main.scss';
4
4
  import { TLocale } from '@antscorp/antsomi-ui/es/types';
5
+ import 'animate.css';
5
6
  interface ConfigProviderProps extends Omit<AntdConfigProviderProps, 'locale'> {
6
7
  children?: ReactNode;
7
8
  locale?: TLocale;
@@ -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';
@@ -27,6 +27,7 @@ import '@antscorp/antsomi-ui/es/assets/css/main.scss';
27
27
  // Initialize languages
28
28
  // import '@antscorp/antsomi-ui/es/locales/i18n';
29
29
  import i18next from '@antscorp/antsomi-ui/es/locales/i18n';
30
+ import 'animate.css';
30
31
  // NOTE: HOT fix DatePicker Advanced
31
32
  dayjs.extend(weekday);
32
33
  dayjs.extend(localeData);
@@ -42,8 +43,9 @@ const ConfigProvider = props => {
42
43
  }
43
44
  }, [locale]);
44
45
  return (React.createElement(AntdConfigProvider, Object.assign({}, restOfProps),
45
- React.createElement(GlobalStyle, null),
46
- React.createElement(StyleProvider, { hashPriority: "high" }, children)));
46
+ React.createElement(App, null,
47
+ React.createElement(GlobalStyle, null),
48
+ React.createElement(StyleProvider, { hashPriority: "high" }, children))));
47
49
  };
48
50
  ConfigProvider.defaultProps = {
49
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;
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
 
@@ -714,6 +714,10 @@ export const GlobalStyle = () => {
714
714
  height: unset !important;
715
715
  top: 0px !important;
716
716
  right: 0 !important;
717
+
718
+ .antsomi-modal-close-x {
719
+ padding: 20px;
720
+ }
717
721
  }
718
722
  .antsomi-modal-content {
719
723
  .antsomi-modal-header {
@@ -729,6 +733,27 @@ export const GlobalStyle = () => {
729
733
  p {
730
734
  margin: 0;
731
735
  }
736
+ .antsomi-modal-confirm-body-wrapper {
737
+ padding: 20px;
738
+
739
+ .antsomi-modal-confirm-body {
740
+ display: flex;
741
+ gap: 13px;
742
+ color: ${(_33 = THEME.token) === null || _33 === void 0 ? void 0 : _33.colorPrimary};
743
+ }
744
+
745
+ .antsomi-modal-confirm-btns {
746
+ display: flex;
747
+ flex-direction: row-reverse;
748
+ justify-content: start;
749
+ gap: 8px;
750
+ padding-left: 30px;
751
+
752
+ .antsomi-btn {
753
+ margin: 0px;
754
+ }
755
+ }
756
+ }
732
757
  }
733
758
  .antsomi-modal-footer {
734
759
  padding: 15px !important;
@@ -751,7 +776,7 @@ export const GlobalStyle = () => {
751
776
 
752
777
  .antsomi-collapse {
753
778
  &.antsomi-collapse-borderless {
754
- border-bottom: 1px solid ${(_33 = THEME.token) === null || _33 === void 0 ? void 0 : _33.gray5};
779
+ border-bottom: 1px solid ${(_34 = THEME.token) === null || _34 === void 0 ? void 0 : _34.gray5};
755
780
  }
756
781
 
757
782
  > .antsomi-collapse-item > .antsomi-collapse-header .antsomi-collapse-arrow {
@@ -761,12 +786,12 @@ export const GlobalStyle = () => {
761
786
 
762
787
  /* Switch */
763
788
  .antsomi-switch {
764
- border: 2px solid ${(_34 = THEME.token) === null || _34 === void 0 ? void 0 : _34.colorPrimary} !important;
789
+ border: 2px solid ${(_35 = THEME.token) === null || _35 === void 0 ? void 0 : _35.colorPrimary} !important;
765
790
 
766
791
  &.antsomi-switch-checked {
767
792
  > .antsomi-switch-handle {
768
793
  &::before {
769
- background-color: ${(_35 = THEME.token) === null || _35 === void 0 ? void 0 : _35.bw0} !important;
794
+ background-color: ${(_36 = THEME.token) === null || _36 === void 0 ? void 0 : _36.bw0} !important;
770
795
  }
771
796
  }
772
797
  }
@@ -804,5 +829,14 @@ export const GlobalStyle = () => {
804
829
  }
805
830
  }
806
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
+ }
807
841
  ` }));
808
842
  };
@@ -2,3 +2,4 @@ export * from './atoms';
2
2
  export * from './molecules';
3
3
  export * from './common';
4
4
  export * from './organism';
5
+ export * from './template';
@@ -2,3 +2,4 @@ export * from './atoms';
2
2
  export * from './molecules';
3
3
  export * from './common';
4
4
  export * from './organism';
5
+ export * from './template';
@@ -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],
@@ -9,6 +9,10 @@ export const StyledModal = styled(Modal) `
9
9
  right: 10px !important;
10
10
  width: 24px !important;
11
11
  height: 24px !important;
12
+
13
+ .antsomi-modal-close-x {
14
+ padding: 0px;
15
+ }
12
16
  }
13
17
 
14
18
  .antsomi-modal-body {
@@ -32,9 +32,10 @@ const defaultProps = {
32
32
  isCompact: false,
33
33
  delayUpdate: 200,
34
34
  selectColor: '#2f79bf80',
35
+ allowActive: true,
35
36
  };
36
37
  export const ResizeGrid = props => {
37
- const { containerStyle, cellBorder, cellStyle, cellActiveStyle, isPreview, renderCell, grid: initGrid, image, imageSize, imagePosition, isCompact, onChange, delayUpdate, selectColor, reCalculateFlag, } = props;
38
+ const { containerStyle, cellBorder, cellStyle, cellActiveStyle, isPreview, renderCell, grid: initGrid, image, imageSize, imagePosition, isCompact, onChange, delayUpdate, selectColor, reCalculateFlag, allowActive, } = props;
38
39
  const [grid, setGrid] = useState(buildGrid(initGrid || GRID_TEMPLATE.GRID_2_3));
39
40
  const startRef = useRef(null);
40
41
  const startCellRef = useRef(null);
@@ -54,6 +55,7 @@ export const ResizeGrid = props => {
54
55
  const ctrlKeyRef = useRef(false);
55
56
  const initRef = useRef(0);
56
57
  const initDoneRef = useRef(false);
58
+ const cachedMergeCellRef = useRef({});
57
59
  // console.log('grid', grid)
58
60
  function lineVertical(isShow = true, left = 0) {
59
61
  if (verticalLineRef.current && layersRef.current) {
@@ -103,7 +105,7 @@ export const ResizeGrid = props => {
103
105
  : (cell.rowEnd !== line || !cell.sizeY) && (cell.rowStart !== line || !cell.sizeY);
104
106
  const notFollow = (cell, line, isCol = true) => !isFollow(cell, line, isCol);
105
107
  const floorSize = size => Math.floor(size);
106
- useEffect(() => {
108
+ useDeepCompareEffect(() => {
107
109
  handleChangeGrid();
108
110
  // eslint-disable-next-line react-hooks/exhaustive-deps
109
111
  }, [grid, reCalculateFlag]);
@@ -158,9 +160,7 @@ export const ResizeGrid = props => {
158
160
  }
159
161
  }
160
162
  else {
161
- child.transformY &&
162
- !child.movedBottom &&
163
- (child.sizeY = +child.sizeY + yDistant);
163
+ child.transformY && !child.movedBottom && (child.sizeY = +child.sizeY + yDistant);
164
164
  }
165
165
  // console.log('check...', startRef.current.line, child.transformY, yDistant, +child.transformY - yDistant)
166
166
  if (child.sizeY < MIN_SIZE) {
@@ -560,9 +560,8 @@ 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;
565
- !cell.active && activeCell({ idx });
563
+ // if (isPreview) return;
564
+ // !cell.active && activeCell({ idx });
566
565
  selectRef.current = { idx, cell };
567
566
  gridRef.current = grid;
568
567
  };
@@ -574,12 +573,14 @@ export const ResizeGrid = props => {
574
573
  return;
575
574
  }
576
575
  const newChilds = [...grid.childs];
576
+ const insertArr = [];
577
577
  for (let i = rowStart; i < rowEnd; i++) {
578
578
  for (let j = colStart; j < colEnd; j++) {
579
579
  const rStart = i;
580
580
  const cStart = j;
581
581
  const rEnd = rStart + 1;
582
582
  const cEnd = cStart + 1;
583
+ const insertIdx = cachedMergeCellRef.current[`${rStart}-${cStart}`] || idx;
583
584
  // console.log('merge', i, j, rStart, cStart, rEnd, cEnd)
584
585
  const newChild = {
585
586
  colStart: cStart,
@@ -588,21 +589,25 @@ export const ResizeGrid = props => {
588
589
  rowEnd: rEnd,
589
590
  };
590
591
  if (i === rowStart && j === colStart) {
591
- newChilds[idx] = newChild;
592
+ newChilds[idx] = Object.assign(Object.assign({}, newChilds[idx]), newChild);
592
593
  }
593
594
  else if (rStart !== rowStart ||
594
595
  rEnd !== rowEnd ||
595
596
  cStart !== colStart ||
596
597
  cEnd !== colEnd) {
597
- newChilds.splice(idx, 0, newChild);
598
+ insertArr.push({ idx: insertIdx, cell: newChild });
598
599
  }
599
600
  }
600
601
  }
602
+ insertArr.sort((a, b) => a.idx - b.idx);
603
+ insertArr.forEach(({ idx, cell }) => {
604
+ newChilds.splice(idx, 0, cell);
605
+ });
601
606
  setGrid(prev => (Object.assign(Object.assign({}, prev), { childs: newChilds })));
602
607
  };
603
608
  function resetBackgroundCellRef() {
604
- Object.values(cellsRef.current).forEach(r => {
605
- if (r.current) {
609
+ Object.entries(cellsRef.current).forEach(([idx, r]) => {
610
+ if (r.current && grid.childs[idx] && !grid.childs[idx].active) {
606
611
  r.current.style.background = 'unset';
607
612
  }
608
613
  });
@@ -628,6 +633,8 @@ export const ResizeGrid = props => {
628
633
  delete newChilds[idxStart].sizeY;
629
634
  hCells.reverse().forEach(i => {
630
635
  if (i !== idxStart) {
636
+ const deleteChild = newChilds[i];
637
+ cachedMergeCellRef.current[`${deleteChild.rowStart}-${deleteChild.colStart}`] = i;
631
638
  newChilds.splice(i, 1);
632
639
  delete cellsRef.current[i];
633
640
  delete cordinatesRef.current[i];
@@ -636,6 +643,12 @@ export const ResizeGrid = props => {
636
643
  });
637
644
  setGrid(Object.assign(Object.assign({}, gridRef.current), { childs: newChilds }));
638
645
  }
646
+ else {
647
+ if (!isPreview) {
648
+ !cell.active && activeCell({ idx });
649
+ // cellsRef.current[idx]?.style.background = cellActiveStyle?.background;
650
+ }
651
+ }
639
652
  selectRef.current = null;
640
653
  selectEndRef.current = null;
641
654
  };
@@ -698,7 +711,7 @@ export const ResizeGrid = props => {
698
711
  const renderGrid = (style) => {
699
712
  const { gridTemplateColumns, gridTemplateRows, childs } = grid;
700
713
  // console.log('grid', { gridTemplateColumns, gridTemplateRows, childs });
701
- return (React.createElement("div", { className: "grid-container", ref: containerRef, style: Object.assign({ gridTemplateColumns: gridTemplateColumns.map(fr => `${fr}%`).join(' '), gridTemplateRows: gridTemplateRows.map(fr => `${fr}%`).join(' ') }, style) }, childs.map((cell, idx) => (React.createElement(Cell, { key: `${cell.rowStart}-${cell.colStart}-${cell.rowEnd}-${cell.colEnd}`, idx: idx, cell: cell, down: handleDown, downCell: handleDownCell, up: handleUp, setRef: setRef, setCordinate: setCordinate, downSelect: downSelect, upSelect: upSelect, hoverSelect: hoverSelect, unMerge: unMerge, renderCell: renderCell, borderStyle: cellBorder, style: cellStyle, activeStyle: cellActiveStyle, isPreview: isPreview, rowPercentage: grid.gridTemplateRows[cell.rowStart - 1], colPercentage: grid.gridTemplateColumns[cell.colStart - 1], ctrlKeyRef: ctrlKeyRef })))));
714
+ return (React.createElement("div", { className: "grid-container", ref: containerRef, style: Object.assign({ gridTemplateColumns: gridTemplateColumns.map(fr => `${fr}%`).join(' '), gridTemplateRows: gridTemplateRows.map(fr => `${fr}%`).join(' ') }, style) }, childs.map((cell, idx) => (React.createElement(Cell, { key: `${cell.rowStart}-${cell.colStart}-${cell.rowEnd}-${cell.colEnd}`, idx: idx, cell: cell, down: handleDown, downCell: handleDownCell, up: handleUp, setRef: setRef, setCordinate: setCordinate, downSelect: downSelect, upSelect: upSelect, hoverSelect: hoverSelect, unMerge: unMerge, renderCell: renderCell, borderStyle: cellBorder, style: cellStyle, activeStyle: cellActiveStyle, isPreview: isPreview, rowPercentage: grid.gridTemplateRows[cell.rowStart - 1], colPercentage: grid.gridTemplateColumns[cell.colStart - 1], ctrlKeyRef: ctrlKeyRef, allowActive: allowActive })))));
702
715
  };
703
716
  const handleUpLine = () => {
704
717
  lineVertical(false);