@griddo/ax 12.3.0-beta.0 → 12.4.0

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 (298) hide show
  1. package/config/__tests__/webpack5-migration.test.js +442 -0
  2. package/config/{jest/componentsMock.js → tests/componentsMock.cjs} +4 -1
  3. package/config/tests/reactEasyCropMock.js +15 -0
  4. package/config/tests/reactTimezoneMock.js +14 -0
  5. package/config/tests/setup.ts +41 -0
  6. package/config/webpack.config.js +183 -189
  7. package/config/webpackDevServer.config.js +63 -93
  8. package/config/webpackSchemas.config.js +6 -1
  9. package/package.json +33 -53
  10. package/public/img/icons/markdown.svg +6 -0
  11. package/scripts/build.js +4 -0
  12. package/scripts/start.js +38 -9
  13. package/src/__tests__/components/ActionMenu/ActionMenu.test.tsx +12 -12
  14. package/src/__tests__/components/Breadcrumb/Breadcrumb.test.tsx +2 -2
  15. package/src/__tests__/components/Browser/Browser.test.tsx +17 -25
  16. package/src/__tests__/components/BulkSelectionOptions/BulkSelectionOptions.test.tsx +3 -3
  17. package/src/__tests__/components/CategoryCell/CategoryCell.test.tsx +3 -2
  18. package/src/__tests__/components/ConfigPanel/ConfigPanel.test.tsx +4 -4
  19. package/src/__tests__/components/ConfigPanel/Form/ConnectedField/ConnectedField.test.tsx +2 -2
  20. package/src/__tests__/components/ConfigPanel/Form/ConnectedField/NavConnectedField/NavConnectedField.test.tsx +2 -2
  21. package/src/__tests__/components/ConfigPanel/Form/ConnectedField/PageConnectedField/Field/Field.test.tsx +3 -3
  22. package/src/__tests__/components/ConfigPanel/Form/ConnectedField/PageConnectedField/PageConnectedField.test.tsx +17 -14
  23. package/src/__tests__/components/ConfigPanel/Form/ConnectedField/PageConnectedField/TemplateManager/TemplateManager.test.tsx +4 -4
  24. package/src/__tests__/components/ConfigPanel/Form/Form.test.tsx +7 -6
  25. package/src/__tests__/components/ConfigPanel/GlobalPageForm/GlobalPageForm.test.tsx +11 -11
  26. package/src/__tests__/components/ConfigPanel/Header/Header.test.tsx +11 -10
  27. package/src/__tests__/components/ConfigPanel/NavigationForm/Field/Field.test.tsx +2 -2
  28. package/src/__tests__/components/ConfigPanel/NavigationForm/NavigationForm.test.tsx +2 -2
  29. package/src/__tests__/components/ConfigPanel/PreviewForm/PreviewForm.test.tsx +4 -3
  30. package/src/__tests__/components/ContextMenu/ContextMenu.test.tsx +24 -24
  31. package/src/__tests__/components/DragAndDrop/DragAndDrop.test.tsx +6 -5
  32. package/src/__tests__/components/ElementsTooltip/ElementsTooltip.test.tsx +1 -1
  33. package/src/__tests__/components/EmptyState/EmptyState.test.tsx +2 -2
  34. package/src/__tests__/components/ErrorCenter/ErrorCenter.test.tsx +11 -11
  35. package/src/__tests__/components/FieldContainer/FieldContainer.test.tsx +4 -4
  36. package/src/__tests__/components/Fields/AnalyticsField/AnalyticsField.test.tsx +3 -3
  37. package/src/__tests__/components/Fields/AnalyticsField/PageAnalytics/PageAnalytics.test.tsx +4 -4
  38. package/src/__tests__/components/Fields/AnalyticsField/StructuredDataAnalytics/StructuredDataAnalytics.test.tsx +3 -3
  39. package/src/__tests__/components/Fields/ArrayFieldGroup/ArrayFieldGroup.test.tsx +6 -5
  40. package/src/__tests__/components/Fields/AsyncCheckGroup/AsyncCheckGroup.test.tsx +19 -18
  41. package/src/__tests__/components/Fields/AsyncSelect/AsyncSelect.test.tsx +4 -3
  42. package/src/__tests__/components/Fields/Button/Button.test.tsx +4 -3
  43. package/src/__tests__/components/Fields/CheckField/CheckField.test.tsx +5 -5
  44. package/src/__tests__/components/Fields/CheckGroup/CheckGroup.test.tsx +10 -10
  45. package/src/__tests__/components/Fields/ColorPicker/ColorPicker.test.tsx +7 -6
  46. package/src/__tests__/components/Fields/ComponentArray/ComponentArray.test.tsx +3 -3
  47. package/src/__tests__/components/Fields/ComponentArray/MixableComponentArray/MixableComponentArray.test.tsx +45 -45
  48. package/src/__tests__/components/Fields/ComponentArray/MixableComponentArray/PasteModuleButton/PasteModuleButton.test.tsx +7 -6
  49. package/src/__tests__/components/Fields/ComponentArray/SameComponentArray/SameComponentArray.test.tsx +7 -7
  50. package/src/__tests__/components/Fields/ComponentContainer/ComponentContainer.test.tsx +55 -55
  51. package/src/__tests__/components/Fields/ConditionalField/ConditionalField.test.tsx +1 -1
  52. package/src/__tests__/components/Fields/DateField/DateField.test.tsx +6 -5
  53. package/src/__tests__/components/Fields/FieldGroup/FieldGroup.test.tsx +2 -2
  54. package/src/__tests__/components/Fields/FileField/FileField.test.tsx +4 -4
  55. package/src/__tests__/components/Fields/HeadingField/HeadingField.test.tsx +2 -2
  56. package/src/__tests__/components/Fields/HiddenField/HiddenField.test.tsx +3 -3
  57. package/src/__tests__/components/Fields/ImageField/ImageField.test.tsx +8 -7
  58. package/src/__tests__/components/Fields/IntegrationsField/IntegrationsField.test.tsx +9 -8
  59. package/src/__tests__/components/Fields/MultiCheckSelect/MultiCheckSelect.test.tsx +1 -1
  60. package/src/__tests__/components/Fields/MultiCheckSelectGroup/MultiCheckSelectGroup.test.tsx +7 -6
  61. package/src/__tests__/components/Fields/NoteField/NoteField.test.tsx +1 -1
  62. package/src/__tests__/components/Fields/NumberField/NumberField.test.tsx +8 -8
  63. package/src/__tests__/components/Fields/RadioField/RadioField.test.tsx +2 -2
  64. package/src/__tests__/components/Fields/ReferenceField/ReferenceField.test.tsx +17 -16
  65. package/src/__tests__/components/Fields/RichText/RichText.test.tsx +1 -1
  66. package/src/__tests__/components/Fields/Select/Select.test.tsx +1 -1
  67. package/src/__tests__/components/Fields/SliderField/SliderField.test.tsx +5 -4
  68. package/src/__tests__/components/Fields/SummaryButton/SummaryButton.test.tsx +2 -2
  69. package/src/__tests__/components/Fields/TagField/TagField.test.tsx +9 -9
  70. package/src/__tests__/components/Fields/TextArea/TextArea.test.tsx +13 -9
  71. package/src/__tests__/components/Fields/TextField/TextField.test.tsx +8 -8
  72. package/src/__tests__/components/Fields/TimeField/HourInput/HourInput.test.tsx +7 -6
  73. package/src/__tests__/components/Fields/TimeField/TimeField.test.tsx +4 -3
  74. package/src/__tests__/components/Fields/ToggleField/ToggleField.test.tsx +2 -2
  75. package/src/__tests__/components/Fields/Tooltip/Tooltip.test.tsx +6 -6
  76. package/src/__tests__/components/Fields/TranslateButton/TranslateButton.test.tsx +13 -13
  77. package/src/__tests__/components/Fields/UniqueCheck/UniqueCheck.test.tsx +1 -1
  78. package/src/__tests__/components/Fields/UrlField/UrlField.test.tsx +20 -19
  79. package/src/__tests__/components/Fields/VisualUniqueSelection/ImageSelection/ImageSelection.test.tsx +3 -2
  80. package/src/__tests__/components/Fields/VisualUniqueSelection/ScrollableSelection/ScrollableSelection.test.tsx +4 -3
  81. package/src/__tests__/components/Fields/VisualUniqueSelection/VisualUniqueSelection.test.tsx +1 -1
  82. package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.atoms.test.tsx +11 -11
  83. package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.helpers.test.tsx +13 -14
  84. package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.test.tsx +28 -28
  85. package/src/__tests__/components/FieldsBehavior/FieldsBehavior.test.tsx +15 -14
  86. package/src/__tests__/components/FloatingMenu/FloatingMenu.test.tsx +36 -35
  87. package/src/__tests__/components/FloatingPanel/FloatingPanel.test.tsx +10 -10
  88. package/src/__tests__/components/GuardModal/GuardModal.test.tsx +1 -1
  89. package/src/__tests__/components/HeadingsPreviewModal/ErrorsBanner/ErrorItem/ErrorItem.test.tsx +11 -11
  90. package/src/__tests__/components/HeadingsPreviewModal/ErrorsBanner/ErrorsBanner.test.tsx +4 -4
  91. package/src/__tests__/components/HeadingsPreviewModal/HeadingsPreviewModal.test.tsx +15 -14
  92. package/src/__tests__/components/IconAction/IconAction.test.tsx +2 -2
  93. package/src/__tests__/components/ImageDragAndDrop/CropStep/CropStep.test.tsx +3 -3
  94. package/src/__tests__/components/ImageDragAndDrop/ImageDragAndDrop.test.tsx +7 -7
  95. package/src/__tests__/components/KeywordsPreviewModal/KeywordItem/KeywordItem.test.tsx +5 -5
  96. package/src/__tests__/components/KeywordsPreviewModal/KeywordsPreviewModal.test.tsx +14 -13
  97. package/src/__tests__/components/KeywordsPreviewModal/atoms.test.tsx +13 -13
  98. package/src/__tests__/components/LanguageMenu/LanguageMenu.test.tsx +6 -6
  99. package/src/__tests__/components/Lists/Lists.test.tsx +1 -1
  100. package/src/__tests__/components/Loader/Loader.test.tsx +1 -1
  101. package/src/__tests__/components/Login/Login.test.tsx +32 -32
  102. package/src/__tests__/components/Login/RecoveryModal/RecoveryModal.test.tsx +10 -9
  103. package/src/__tests__/components/MainWrapper/AppBar/AppBar.test.tsx +21 -21
  104. package/src/__tests__/components/MenuItem/MenuItem.test.tsx +5 -5
  105. package/src/__tests__/components/Modal/Modal.test.tsx +20 -20
  106. package/src/__tests__/components/Nav/Nav.test.tsx +2 -2
  107. package/src/__tests__/components/Notification/Notification.test.tsx +2 -2
  108. package/src/__tests__/components/Pagination/Pagination.test.tsx +13 -14
  109. package/src/__tests__/components/ProfileImage/ProfileImage.test.tsx +6 -7
  110. package/src/__tests__/components/ReorderArrows/ReorderArrows.test.tsx +4 -3
  111. package/src/__tests__/components/ResizePanel/ResizePanel.test.tsx +10 -11
  112. package/src/__tests__/components/RestrictionsModal/CurrentAccessList/CurrentAccessList.test.tsx +7 -6
  113. package/src/__tests__/components/RestrictionsModal/OptionsStep/OptionsStep.test.tsx +12 -11
  114. package/src/__tests__/components/RestrictionsModal/RestrictionsModal.test.tsx +11 -10
  115. package/src/__tests__/components/RestrictionsModal/RolesList/RolesList.test.tsx +8 -8
  116. package/src/__tests__/components/RestrictionsModal/UsersList/UsersList.test.tsx +16 -15
  117. package/src/__tests__/components/SearchField/SearchField.test.tsx +13 -13
  118. package/src/__tests__/components/SideModal/SideModal.test.tsx +25 -23
  119. package/src/__tests__/components/SubNav/SubNav.test.tsx +1 -1
  120. package/src/__tests__/components/TableFilters/CategoryFilter/CategoryFilter.test.tsx +9 -8
  121. package/src/__tests__/components/TableFilters/CustomizeFilters/CustomizeFilters.test.tsx +5 -5
  122. package/src/__tests__/components/TableFilters/DateFilter/DateFilter.test.tsx +8 -8
  123. package/src/__tests__/components/TableFilters/LiveFilter/LiveFilter.test.tsx +11 -10
  124. package/src/__tests__/components/TableFilters/NameFilter/NameFilter.test.tsx +10 -10
  125. package/src/__tests__/components/TableFilters/RoleFilter/RoleFilter.test.tsx +5 -5
  126. package/src/__tests__/components/TableFilters/SiteFilter/SiteFilter.test.tsx +10 -9
  127. package/src/__tests__/components/TableFilters/StatusFilter/StatusFilter.test.tsx +9 -9
  128. package/src/__tests__/components/TableFilters/TranslationsFilter/TranslationsFilter.test.tsx +8 -8
  129. package/src/__tests__/components/TableFilters/TypeFilter/TypeFilter.test.tsx +5 -5
  130. package/src/__tests__/components/TableFilters/UsersFilter/UsersFilter.test.tsx +8 -8
  131. package/src/__tests__/components/TableList/TableList.test.tsx +4 -4
  132. package/src/__tests__/components/Tabs/Tabs.test.tsx +8 -9
  133. package/src/__tests__/components/Tag/Tag.test.tsx +3 -3
  134. package/src/__tests__/components/Toast/Toast.test.tsx +6 -6
  135. package/src/__tests__/gainup-trace.test.ts +67 -0
  136. package/src/__tests__/hooks/modals.test.tsx +4 -4
  137. package/src/__tests__/hooks/users.test.tsx +6 -5
  138. package/src/__tests__/modules/FileDrive/MarkdownFormat.test.tsx +58 -0
  139. package/src/__tests__/modules/FramePreview/FramePreview.test.tsx +40 -39
  140. package/src/__tests__/modules/FramePreview/HeadingsOverlay/HeadingsOverlay.test.tsx +11 -11
  141. package/src/__tests__/modules/Settings/Integrations/Integrations.test.tsx +2 -2
  142. package/src/__tests__/modules/Settings/Social/Social.test.tsx +4 -3
  143. package/src/__tests__/modules/Sites/Sites.test.tsx +5 -4
  144. package/src/__tests__/modules/Sites/SitesList/ListView/BulkHeader/BulkHeader.test.tsx +2 -2
  145. package/src/__tests__/modules/Sites/SitesList/SitesList.test.tsx +7 -6
  146. package/src/__tests__/modules/Sites/SitesList/WelcomeModal/DataStep/DataStep.test.tsx +6 -6
  147. package/src/__tests__/modules/Sites/SitesList/WelcomeModal/FinalStep/FinalStep.test.tsx +4 -4
  148. package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/CropView/CropView.test.tsx +3 -3
  149. package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/ImageStep.test.tsx +9 -5
  150. package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/UploadView/UploadView.test.tsx +8 -6
  151. package/src/__tests__/modules/Sites/SitesList/WelcomeModal/TimezoneStep/TimezoneStep.test.tsx +7 -7
  152. package/src/__tests__/modules/Sites/SitesList/WelcomeModal/WelcomeModal.test.tsx +1 -1
  153. package/src/__tests__/modules/Sites/SitesList/WelcomeModal/WelcomeStep/WelcomeStep.test.tsx +3 -3
  154. package/src/__tests__/modules/Users/Roles/BulkHeader/BulkHeader.test.tsx +3 -3
  155. package/src/__tests__/modules/Users/Roles/Roles.test.tsx +11 -10
  156. package/src/__tests__/modules/Users/UserCreate/SiteItem/RolesModal/RoleItem/RoleItem.test.tsx +3 -3
  157. package/src/__tests__/modules/Users/UserCreate/SiteItem/RolesModal/RolesModal.test.tsx +3 -3
  158. package/src/__tests__/modules/Users/UserCreate/SiteItem/SiteItem.test.tsx +3 -3
  159. package/src/__tests__/modules/Users/UserCreate/UserCreate.test.tsx +6 -5
  160. package/src/__tests__/modules/Users/UserList/UserItem/UserItem.test.tsx +9 -9
  161. package/src/__tests__/modules/Users/UserList/UserList.test.tsx +4 -4
  162. package/src/components/Flag/components/index.ts +30 -0
  163. package/src/components/Flag/index.tsx +3 -5
  164. package/src/components/Icon/components/index.ts +229 -0
  165. package/src/components/Icon/index.tsx +3 -7
  166. package/src/constants/index.ts +1 -1
  167. package/src/helpers/files.tsx +2 -0
  168. package/src/modules/App/Routing/NavMenu/index.tsx +4 -2
  169. package/src/modules/FileDrive/FileFilters/Type/index.tsx +1 -0
  170. package/tsconfig.json +1 -1
  171. package/config/jest/cssTransform.js +0 -14
  172. package/config/jest/fileMock.js +0 -1
  173. package/config/jest/fileTransform.js +0 -40
  174. package/config/jest/reactEasyCropMock.js +0 -15
  175. package/config/jest/reactTimezoneMock.js +0 -13
  176. package/config/jest/setup.js +0 -31
  177. package/config/jest/styleMock.js +0 -1
  178. package/config/pnpTs.js +0 -15
  179. package/src/__tests__/aiup-trace.test.ts +0 -23
  180. /package/config/{jest/test-utils.js → tests/test-utils.jsx} +0 -0
  181. /package/src/components/Flag/components/{Ca_ES.js → Ca_ES.jsx} +0 -0
  182. /package/src/components/Flag/components/{De_DE.js → De_DE.jsx} +0 -0
  183. /package/src/components/Flag/components/{En_GB.js → En_GB.jsx} +0 -0
  184. /package/src/components/Flag/components/{Es_ES.js → Es_ES.jsx} +0 -0
  185. /package/src/components/Flag/components/{Eu_ES.js → Eu_ES.jsx} +0 -0
  186. /package/src/components/Flag/components/{Fr_FR.js → Fr_FR.jsx} +0 -0
  187. /package/src/components/Flag/components/{It_IT.js → It_IT.jsx} +0 -0
  188. /package/src/components/Flag/components/{Pt_PT.js → Pt_PT.jsx} +0 -0
  189. /package/src/components/Icon/components/{Active.js → Active.jsx} +0 -0
  190. /package/src/components/Icon/components/{Add.js → Add.jsx} +0 -0
  191. /package/src/components/Icon/components/{AddCircle.js → AddCircle.jsx} +0 -0
  192. /package/src/components/Icon/components/{Alert.js → Alert.jsx} +0 -0
  193. /package/src/components/Icon/components/{AlignLeft.js → AlignLeft.jsx} +0 -0
  194. /package/src/components/Icon/components/{Back.js → Back.jsx} +0 -0
  195. /package/src/components/Icon/components/{BulletList.js → BulletList.jsx} +0 -0
  196. /package/src/components/Icon/components/{Button.js → Button.jsx} +0 -0
  197. /package/src/components/Icon/components/{Calendar.js → Calendar.jsx} +0 -0
  198. /package/src/components/Icon/components/{CancelEvent.js → CancelEvent.jsx} +0 -0
  199. /package/src/components/Icon/components/{Category.js → Category.jsx} +0 -0
  200. /package/src/components/Icon/components/{Change.js → Change.jsx} +0 -0
  201. /package/src/components/Icon/components/{Close.js → Close.jsx} +0 -0
  202. /package/src/components/Icon/components/{ClosePanel.js → ClosePanel.jsx} +0 -0
  203. /package/src/components/Icon/components/{CodeBody.js → CodeBody.jsx} +0 -0
  204. /package/src/components/Icon/components/{CodeHead.js → CodeHead.jsx} +0 -0
  205. /package/src/components/Icon/components/{CodeHeadBody.js → CodeHeadBody.jsx} +0 -0
  206. /package/src/components/Icon/components/{Collapsed.js → Collapsed.jsx} +0 -0
  207. /package/src/components/Icon/components/{ColorPicker.js → ColorPicker.jsx} +0 -0
  208. /package/src/components/Icon/components/{Compose.js → Compose.jsx} +0 -0
  209. /package/src/components/Icon/components/{Copy.js → Copy.jsx} +0 -0
  210. /package/src/components/Icon/components/{Copy2.js → Copy2.jsx} +0 -0
  211. /package/src/components/Icon/components/{Data.js → Data.jsx} +0 -0
  212. /package/src/components/Icon/components/{DataAdd.js → DataAdd.jsx} +0 -0
  213. /package/src/components/Icon/components/{Deactivate.js → Deactivate.jsx} +0 -0
  214. /package/src/components/Icon/components/{Delete.js → Delete.jsx} +0 -0
  215. /package/src/components/Icon/components/{Desktop.js → Desktop.jsx} +0 -0
  216. /package/src/components/Icon/components/{Disabled.js → Disabled.jsx} +0 -0
  217. /package/src/components/Icon/components/{Done.js → Done.jsx} +0 -0
  218. /package/src/components/Icon/components/{DownArrow.js → DownArrow.jsx} +0 -0
  219. /package/src/components/Icon/components/{Download.js → Download.jsx} +0 -0
  220. /package/src/components/Icon/components/{Drag.js → Drag.jsx} +0 -0
  221. /package/src/components/Icon/components/{Duplicate.js → Duplicate.jsx} +0 -0
  222. /package/src/components/Icon/components/{Edit.js → Edit.jsx} +0 -0
  223. /package/src/components/Icon/components/{Empty.js → Empty.jsx} +0 -0
  224. /package/src/components/Icon/components/{EmptyCheck.js → EmptyCheck.jsx} +0 -0
  225. /package/src/components/Icon/components/{Extend.js → Extend.jsx} +0 -0
  226. /package/src/components/Icon/components/{File.js → File.jsx} +0 -0
  227. /package/src/components/Icon/components/{Filter.js → Filter.jsx} +0 -0
  228. /package/src/components/Icon/components/{Form.js → Form.jsx} +0 -0
  229. /package/src/components/Icon/components/{FullArrowDown.js → FullArrowDown.jsx} +0 -0
  230. /package/src/components/Icon/components/{FullArrowLeft.js → FullArrowLeft.jsx} +0 -0
  231. /package/src/components/Icon/components/{FullArrowRight.js → FullArrowRight.jsx} +0 -0
  232. /package/src/components/Icon/components/{FullArrowUp.js → FullArrowUp.jsx} +0 -0
  233. /package/src/components/Icon/components/{Grid.js → Grid.jsx} +0 -0
  234. /package/src/components/Icon/components/{Grid2.js → Grid2.jsx} +0 -0
  235. /package/src/components/Icon/components/{GriddoLogo.js → GriddoLogo.jsx} +0 -0
  236. /package/src/components/Icon/components/{HeroCard.js → HeroCard.jsx} +0 -0
  237. /package/src/components/Icon/components/{Hide.js → Hide.jsx} +0 -0
  238. /package/src/components/Icon/components/{History.js → History.jsx} +0 -0
  239. /package/src/components/Icon/components/{Home.js → Home.jsx} +0 -0
  240. /package/src/components/Icon/components/{Ia.js → Ia.jsx} +0 -0
  241. /package/src/components/Icon/components/{Image.js → Image.jsx} +0 -0
  242. /package/src/components/Icon/components/{Info.js → Info.jsx} +0 -0
  243. /package/src/components/Icon/components/{Laptop.js → Laptop.jsx} +0 -0
  244. /package/src/components/Icon/components/{LeftArrow.js → LeftArrow.jsx} +0 -0
  245. /package/src/components/Icon/components/{Link.js → Link.jsx} +0 -0
  246. /package/src/components/Icon/components/{Lock.js → Lock.jsx} +0 -0
  247. /package/src/components/Icon/components/{Log.js → Log.jsx} +0 -0
  248. /package/src/components/Icon/components/{Map.js → Map.jsx} +0 -0
  249. /package/src/components/Icon/components/{Menu.js → Menu.jsx} +0 -0
  250. /package/src/components/Icon/components/{Microsoft.js → Microsoft.jsx} +0 -0
  251. /package/src/components/Icon/components/{Modified.js → Modified.jsx} +0 -0
  252. /package/src/components/Icon/components/{Modules.js → Modules.jsx} +0 -0
  253. /package/src/components/Icon/components/{More.js → More.jsx} +0 -0
  254. /package/src/components/Icon/components/{NewFolder.js → NewFolder.jsx} +0 -0
  255. /package/src/components/Icon/components/{Offline.js → Offline.jsx} +0 -0
  256. /package/src/components/Icon/components/{OfflinePending.js → OfflinePending.jsx} +0 -0
  257. /package/src/components/Icon/components/{OpenOutside.js → OpenOutside.jsx} +0 -0
  258. /package/src/components/Icon/components/{OpenPanel.js → OpenPanel.jsx} +0 -0
  259. /package/src/components/Icon/components/{OutOfSection.js → OutOfSection.jsx} +0 -0
  260. /package/src/components/Icon/components/{Page.js → Page.jsx} +0 -0
  261. /package/src/components/Icon/components/{Party.js → Party.jsx} +0 -0
  262. /package/src/components/Icon/components/{Paste.js → Paste.jsx} +0 -0
  263. /package/src/components/Icon/components/{Phone.js → Phone.jsx} +0 -0
  264. /package/src/components/Icon/components/{PhotoLibrary.js → PhotoLibrary.jsx} +0 -0
  265. /package/src/components/Icon/components/{Power.js → Power.jsx} +0 -0
  266. /package/src/components/Icon/components/{Preview.js → Preview.jsx} +0 -0
  267. /package/src/components/Icon/components/{Project.js → Project.jsx} +0 -0
  268. /package/src/components/Icon/components/{QrCode.js → QrCode.jsx} +0 -0
  269. /package/src/components/Icon/components/{Question.js → Question.jsx} +0 -0
  270. /package/src/components/Icon/components/{Refresh.js → Refresh.jsx} +0 -0
  271. /package/src/components/Icon/components/{Republish.js → Republish.jsx} +0 -0
  272. /package/src/components/Icon/components/{RightArrow.js → RightArrow.jsx} +0 -0
  273. /package/src/components/Icon/components/{Scheduled.js → Scheduled.jsx} +0 -0
  274. /package/src/components/Icon/components/{Search.js → Search.jsx} +0 -0
  275. /package/src/components/Icon/components/{SendEmail.js → SendEmail.jsx} +0 -0
  276. /package/src/components/Icon/components/{Settings.js → Settings.jsx} +0 -0
  277. /package/src/components/Icon/components/{Share.js → Share.jsx} +0 -0
  278. /package/src/components/Icon/components/{Subsection.js → Subsection.jsx} +0 -0
  279. /package/src/components/Icon/components/{Success.js → Success.jsx} +0 -0
  280. /package/src/components/Icon/components/{SuccessSolid.js → SuccessSolid.jsx} +0 -0
  281. /package/src/components/Icon/components/{Sync.js → Sync.jsx} +0 -0
  282. /package/src/components/Icon/components/{Tablet.js → Tablet.jsx} +0 -0
  283. /package/src/components/Icon/components/{Translate.js → Translate.jsx} +0 -0
  284. /package/src/components/Icon/components/{Unlink.js → Unlink.jsx} +0 -0
  285. /package/src/components/Icon/components/{UpArrow.js → UpArrow.jsx} +0 -0
  286. /package/src/components/Icon/components/{UploadFile.js → UploadFile.jsx} +0 -0
  287. /package/src/components/Icon/components/{UploadPending.js → UploadPending.jsx} +0 -0
  288. /package/src/components/Icon/components/{UrlLink.js → UrlLink.jsx} +0 -0
  289. /package/src/components/Icon/components/{User.js → User.jsx} +0 -0
  290. /package/src/components/Icon/components/{Users.js → Users.jsx} +0 -0
  291. /package/src/components/Icon/components/{Video.js → Video.jsx} +0 -0
  292. /package/src/components/Icon/components/{View.js → View.jsx} +0 -0
  293. /package/src/components/Icon/components/{Warning.js → Warning.jsx} +0 -0
  294. /package/src/components/Icon/components/{Web.js → Web.jsx} +0 -0
  295. /package/src/components/Icon/components/{Working.js → Working.jsx} +0 -0
  296. /package/src/components/Loader/components/{Circle.js → Circle.jsx} +0 -0
  297. /package/src/components/Loader/components/{Dots.js → Dots.jsx} +0 -0
  298. /package/src/components/Loader/components/{SmallCircle.js → SmallCircle.jsx} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  } from "@ax/components/Fields/Wysiwyg/helpers";
9
9
 
10
10
  // Mock the config module
11
- jest.mock("components", () => ({
11
+ vi.mock("components", () => ({
12
12
  config: {
13
13
  schemas: {
14
14
  config: {
@@ -239,7 +239,7 @@ describe("Wysiwyg helpers", () => {
239
239
 
240
240
  it("should calculate position based on editor element bounds", () => {
241
241
  // Mock getBoundingClientRect
242
- editorEl.getBoundingClientRect = jest.fn(() => ({
242
+ editorEl.getBoundingClientRect = vi.fn(() => ({
243
243
  left: 100,
244
244
  top: 200,
245
245
  width: 400,
@@ -267,7 +267,7 @@ describe("Wysiwyg helpers", () => {
267
267
  });
268
268
 
269
269
  it("should center popup horizontally in editor", () => {
270
- editorEl.getBoundingClientRect = jest.fn(() => ({
270
+ editorEl.getBoundingClientRect = vi.fn(() => ({
271
271
  left: 0,
272
272
  top: 0,
273
273
  width: 1000,
@@ -285,7 +285,7 @@ describe("Wysiwyg helpers", () => {
285
285
  });
286
286
 
287
287
  it("should position popup 50px below editor top", () => {
288
- editorEl.getBoundingClientRect = jest.fn(() => ({
288
+ editorEl.getBoundingClientRect = vi.fn(() => ({
289
289
  left: 0,
290
290
  top: 100,
291
291
  width: 500,
@@ -309,7 +309,7 @@ describe("Wysiwyg helpers", () => {
309
309
 
310
310
  beforeEach(() => {
311
311
  editorEl = document.createElement("div");
312
- editorEl.getBoundingClientRect = jest.fn(() => ({
312
+ editorEl.getBoundingClientRect = vi.fn(() => ({
313
313
  left: 0,
314
314
  top: 0,
315
315
  width: 400,
@@ -323,10 +323,10 @@ describe("Wysiwyg helpers", () => {
323
323
 
324
324
  mockEditor = {
325
325
  popups: {
326
- create: jest.fn(),
327
- onHide: jest.fn(),
328
- show: jest.fn(),
329
- hide: jest.fn(),
326
+ create: vi.fn(),
327
+ onHide: vi.fn(),
328
+ show: vi.fn(),
329
+ hide: vi.fn(),
330
330
  },
331
331
  };
332
332
  });
@@ -377,18 +377,17 @@ describe("Wysiwyg helpers", () => {
377
377
  );
378
378
  });
379
379
 
380
- it("showErrorPopup should hide error popup after 3 seconds", (done) => {
381
- jest.useFakeTimers();
380
+ it("showErrorPopup should hide error popup after 3 seconds", () => {
381
+ vi.useFakeTimers();
382
382
  const { showErrorPopup } = createPopupFunctions(mockEditor, editorEl);
383
383
 
384
384
  showErrorPopup();
385
385
 
386
- jest.advanceTimersByTime(3000);
386
+ vi.advanceTimersByTime(3000);
387
387
 
388
388
  expect(mockEditor.popups.hide).toHaveBeenCalledWith("image.uploadError");
389
389
 
390
- jest.useRealTimers();
391
- done();
390
+ vi.useRealTimers();
392
391
  });
393
392
 
394
393
  it("showPopup should pass correct position arguments to show method", () => {
@@ -7,27 +7,27 @@ import globalTheme from "@ax/themes/theme.json";
7
7
  import configureStore from "redux-mock-store";
8
8
  import { ThemeProvider } from "styled-components";
9
9
 
10
- import { cleanup, render, screen } from "../../../../../config/jest/test-utils";
10
+ import { cleanup, render, screen } from "../../../../../config/tests/test-utils";
11
11
 
12
- jest.mock("react-froala-wysiwyg", () => {
13
- return function MockFroalaEditor(props: any) {
12
+ vi.mock("react-froala-wysiwyg", () => ({
13
+ default: function MockFroalaEditor(props: any) {
14
14
  const editorElRef = React.useRef<HTMLDivElement>(null);
15
15
 
16
16
  React.useEffect(() => {
17
17
  if (props.config?.events?.initialized && editorElRef.current) {
18
18
  const mockEditor = {
19
- $el: { get: jest.fn(() => editorElRef.current!) },
19
+ $el: { get: vi.fn(() => editorElRef.current!) },
20
20
  el: editorElRef.current,
21
- edit: { on: jest.fn(), off: jest.fn() },
22
- link: { insert: jest.fn() },
23
- image: { insert: jest.fn(), get: jest.fn(() => null) },
24
- html: { get: jest.fn(() => props.model) },
25
- selection: { save: jest.fn(), restore: jest.fn() },
21
+ edit: { on: vi.fn(), off: vi.fn() },
22
+ link: { insert: vi.fn() },
23
+ image: { insert: vi.fn(), get: vi.fn(() => null) },
24
+ html: { get: vi.fn(() => props.model) },
25
+ selection: { save: vi.fn(), restore: vi.fn() },
26
26
  popups: {
27
- create: jest.fn(),
28
- onHide: jest.fn(),
29
- show: jest.fn(),
30
- hide: jest.fn(),
27
+ create: vi.fn(),
28
+ onHide: vi.fn(),
29
+ show: vi.fn(),
30
+ hide: vi.fn(),
31
31
  },
32
32
  };
33
33
  props.config.events.initialized.call(mockEditor);
@@ -44,12 +44,12 @@ jest.mock("react-froala-wysiwyg", () => {
44
44
  />
45
45
  </div>
46
46
  );
47
- };
48
- });
47
+ },
48
+ }));
49
49
 
50
50
  afterEach(() => {
51
51
  cleanup();
52
- jest.resetAllMocks();
52
+ vi.resetAllMocks();
53
53
  delete (window as any).__froalaEditorInstance;
54
54
  });
55
55
 
@@ -65,9 +65,9 @@ const mockStore = configureStore();
65
65
  const store = mockStore(initialStore);
66
66
 
67
67
  const createMockProps = (overrides?: Partial<IWysiwygProps>): IWysiwygProps => {
68
- const mockUploadImage = jest.fn().mockResolvedValue(null);
69
- const mockOnChange = jest.fn();
70
- const mockHandleValidation = jest.fn();
68
+ const mockUploadImage = vi.fn().mockResolvedValue(null);
69
+ const mockOnChange = vi.fn();
70
+ const mockHandleValidation = vi.fn();
71
71
 
72
72
  return {
73
73
  value: "",
@@ -172,7 +172,7 @@ describe("Wysiwyg component rendering", () => {
172
172
 
173
173
  describe("Wysiwyg file handling", () => {
174
174
  it("should call onChange when content changes", async () => {
175
- const mockOnChange = jest.fn();
175
+ const mockOnChange = vi.fn();
176
176
  const props = createMockProps({ value: "Initial text", onChange: mockOnChange });
177
177
 
178
178
  render(
@@ -187,7 +187,7 @@ describe("Wysiwyg file handling", () => {
187
187
  });
188
188
 
189
189
  it("should insert file with correct URL and fileName", async () => {
190
- const mockOnChange = jest.fn();
190
+ const mockOnChange = vi.fn();
191
191
  const props = createMockProps({ value: "", onChange: mockOnChange });
192
192
 
193
193
  render(
@@ -279,7 +279,7 @@ describe("Wysiwyg editor interactions", () => {
279
279
 
280
280
  describe("Wysiwyg file and image handling", () => {
281
281
  it("should insert file link with correct URL and fileName", () => {
282
- const mockOnChange = jest.fn();
282
+ const mockOnChange = vi.fn();
283
283
  const props = createMockProps({ value: "", onChange: mockOnChange });
284
284
 
285
285
  render(
@@ -389,7 +389,7 @@ describe("Wysiwyg file and image handling", () => {
389
389
 
390
390
  describe("Wysiwyg handlers", () => {
391
391
  it("handleChange: onChange should be called when editor content changes", () => {
392
- const mockOnChange = jest.fn();
392
+ const mockOnChange = vi.fn();
393
393
  const newContent = "<p>Updated content</p>";
394
394
  const props = createMockProps({
395
395
  value: "Initial",
@@ -412,7 +412,7 @@ describe("Wysiwyg handlers", () => {
412
412
  });
413
413
 
414
414
  it("handleChange: handleValidation should be called on change", () => {
415
- const mockHandleValidation = jest.fn();
415
+ const mockHandleValidation = vi.fn();
416
416
  const props = createMockProps({
417
417
  value: "initial",
418
418
  handleValidation: mockHandleValidation,
@@ -590,7 +590,7 @@ describe("Wysiwyg handlers", () => {
590
590
  });
591
591
 
592
592
  it("should handle drop event preparation", () => {
593
- const mockUploadImage = jest.fn().mockResolvedValue({
593
+ const mockUploadImage = vi.fn().mockResolvedValue({
594
594
  url: "http://example.com/uploaded.jpg",
595
595
  alt: "",
596
596
  });
@@ -707,7 +707,7 @@ describe("Wysiwyg handlers", () => {
707
707
 
708
708
  describe("Wysiwyg handleChange - empty paragraph filtering", () => {
709
709
  it("should track last value in lastValueRef to detect real changes", () => {
710
- const mockOnChange = jest.fn();
710
+ const mockOnChange = vi.fn();
711
711
  const initialValue = "<p>Content</p>";
712
712
  const props = createMockProps({
713
713
  value: initialValue,
@@ -728,7 +728,7 @@ describe("Wysiwyg handleChange - empty paragraph filtering", () => {
728
728
  });
729
729
 
730
730
  it("should include validation callback in handleChange logic", () => {
731
- const mockHandleValidation = jest.fn();
731
+ const mockHandleValidation = vi.fn();
732
732
  const props = createMockProps({
733
733
  value: "initial",
734
734
  handleValidation: mockHandleValidation,
@@ -749,7 +749,7 @@ describe("Wysiwyg handleChange - empty paragraph filtering", () => {
749
749
 
750
750
  describe("Wysiwyg handleInsertLink - image link support", () => {
751
751
  it("should support isImageLink flag in linkData", () => {
752
- const mockOnChange = jest.fn();
752
+ const mockOnChange = vi.fn();
753
753
  const props = createMockProps({
754
754
  value: "",
755
755
  onChange: mockOnChange,
@@ -1,3 +1,4 @@
1
+ import type { MockedFunction } from "vitest";
1
2
  import "@testing-library/jest-dom";
2
3
 
3
4
  import FieldsBehavior from "@ax/components/FieldsBehavior";
@@ -9,24 +10,24 @@ import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/re
9
10
  import { ThemeProvider } from "styled-components";
10
11
 
11
12
  // Mock dependencies
12
- jest.mock("@ax/forms", () => ({
13
- getValidity: jest.fn(),
13
+ vi.mock("@ax/forms", async () => ({
14
+ getValidity: vi.fn(),
14
15
  }));
15
- jest.mock("@ax/helpers", () => ({
16
- ...jest.requireActual("@ax/helpers"),
17
- getFieldByPath: jest.fn(() => () => <div data-testid="mock-field" />),
18
- isEmptyContainer: jest.fn(() => ({ isEmpty: false })),
19
- slugify: jest.fn((text: string) => (text || "").toLowerCase().replace(/\s+/g, "-")),
16
+ vi.mock("@ax/helpers", async () => ({
17
+ ...(await vi.importActual("@ax/helpers")),
18
+ getFieldByPath: vi.fn(() => () => <div data-testid="mock-field" />),
19
+ isEmptyContainer: vi.fn(() => ({ isEmpty: false })),
20
+ slugify: vi.fn((text: string) => (text || "").toLowerCase().replace(/\s+/g, "-")),
20
21
  }));
21
22
 
22
- const mockGetValidity = getValidity as jest.MockedFunction<typeof getValidity>;
23
- const _mockGetFieldByPath = getFieldByPath as jest.MockedFunction<typeof getFieldByPath>;
24
- const mockIsEmptyContainer = isEmptyContainer as jest.MockedFunction<typeof isEmptyContainer>;
25
- const mockSlugify = slugify as jest.MockedFunction<typeof slugify>;
23
+ const mockGetValidity = getValidity as MockedFunction<typeof getValidity>;
24
+ const _mockGetFieldByPath = getFieldByPath as MockedFunction<typeof getFieldByPath>;
25
+ const mockIsEmptyContainer = isEmptyContainer as MockedFunction<typeof isEmptyContainer>;
26
+ const mockSlugify = slugify as MockedFunction<typeof slugify>;
26
27
 
27
28
  afterEach(() => {
28
29
  cleanup();
29
- jest.clearAllMocks();
30
+ vi.clearAllMocks();
30
31
  });
31
32
 
32
33
  // Default mock setup for getValidity
@@ -209,7 +210,7 @@ describe("FieldsBehavior validation", () => {
209
210
  });
210
211
 
211
212
  it("should validate on error prop change", () => {
212
- const deleteError = jest.fn();
213
+ const deleteError = vi.fn();
213
214
  const error = {
214
215
  type: "validation",
215
216
  message: "Required",
@@ -326,7 +327,7 @@ describe("FieldsBehavior slug synchronization", () => {
326
327
  });
327
328
 
328
329
  it("should have correct sync behavior for page slug", () => {
329
- const updateValue = jest.fn();
330
+ const updateValue = vi.fn();
330
331
  mockSlugify.mockReturnValue("new-title");
331
332
 
332
333
  const props = {
@@ -1,3 +1,4 @@
1
+ import type { MockedFunction } from "vitest";
1
2
  import { useRef } from "react";
2
3
 
3
4
  import { ThemeProvider } from "styled-components";
@@ -8,16 +9,16 @@ import "@testing-library/jest-dom";
8
9
  import FloatingMenu, { type IFloatingProps } from "@ax/components/FloatingMenu";
9
10
  import globalTheme from "@ax/themes/theme.json";
10
11
 
11
- jest.mock("react", () => {
12
- const originReact = jest.requireActual("react");
13
- const mUseRef = jest.fn();
12
+ vi.mock("react", async () => {
13
+ const originReact = await vi.importActual("react");
14
+ const mUseRef = vi.fn();
14
15
  return {
15
16
  ...originReact,
16
17
  useRef: mUseRef,
17
18
  };
18
19
  });
19
20
 
20
- const useMockRef = useRef as jest.MockedFunction<typeof useRef>;
21
+ const useMockRef = useRef as MockedFunction<typeof useRef>;
21
22
 
22
23
  afterEach(cleanup);
23
24
  beforeEach(() => {
@@ -75,7 +76,7 @@ describe("FloatingMenu component rendering", () => {
75
76
  Object.defineProperty(wrapperRef, "current", {
76
77
  set(_current) {
77
78
  if (_current) {
78
- jest.spyOn(_current, "contains").mockReturnValueOnce(true);
79
+ vi.spyOn(_current, "contains").mockReturnValueOnce(true);
79
80
  }
80
81
  this._current = _current;
81
82
  },
@@ -86,7 +87,7 @@ describe("FloatingMenu component rendering", () => {
86
87
  Object.defineProperty(buttonRef, "current", {
87
88
  set(_current) {
88
89
  if (_current) {
89
- jest.spyOn(_current, "contains").mockReturnValueOnce(true);
90
+ vi.spyOn(_current, "contains").mockReturnValueOnce(true);
90
91
  }
91
92
  this._current = _current;
92
93
  },
@@ -97,7 +98,7 @@ describe("FloatingMenu component rendering", () => {
97
98
  Object.defineProperty(menuOptionsRef, "current", {
98
99
  set(_current) {
99
100
  if (_current) {
100
- jest.spyOn(_current, "contains").mockReturnValueOnce(false);
101
+ vi.spyOn(_current, "contains").mockReturnValueOnce(false);
101
102
  }
102
103
  this._current = _current;
103
104
  },
@@ -155,7 +156,7 @@ describe("FloatingMenu component rendering", () => {
155
156
  Object.defineProperty(wrapperRef, "current", {
156
157
  set(_current) {
157
158
  if (_current) {
158
- jest.spyOn(_current, "contains").mockReturnValue(true);
159
+ vi.spyOn(_current, "contains").mockReturnValue(true);
159
160
  }
160
161
  this._current = _current;
161
162
  },
@@ -166,7 +167,7 @@ describe("FloatingMenu component rendering", () => {
166
167
  Object.defineProperty(buttonRef, "current", {
167
168
  set(_current) {
168
169
  if (_current) {
169
- jest.spyOn(_current, "contains").mockReturnValueOnce(true);
170
+ vi.spyOn(_current, "contains").mockReturnValueOnce(true);
170
171
  }
171
172
  this._current = _current;
172
173
  },
@@ -177,7 +178,7 @@ describe("FloatingMenu component rendering", () => {
177
178
  Object.defineProperty(menuOptionsRef, "current", {
178
179
  set(_current) {
179
180
  if (_current) {
180
- jest.spyOn(_current, "contains").mockReturnValueOnce(false);
181
+ vi.spyOn(_current, "contains").mockReturnValueOnce(false);
181
182
  }
182
183
  this._current = _current;
183
184
  },
@@ -205,7 +206,7 @@ describe("FloatingMenu component rendering", () => {
205
206
  Object.defineProperty(wrapperRef, "current", {
206
207
  set(_current) {
207
208
  if (_current) {
208
- jest.spyOn(_current, "contains").mockReturnValue(false);
209
+ vi.spyOn(_current, "contains").mockReturnValue(false);
209
210
  }
210
211
  this._current = _current;
211
212
  },
@@ -245,7 +246,7 @@ describe("FloatingMenu component rendering", () => {
245
246
  Object.defineProperty(wrapperRef, "current", {
246
247
  set(_current) {
247
248
  if (_current) {
248
- jest.spyOn(_current, "contains").mockReturnValue(true);
249
+ vi.spyOn(_current, "contains").mockReturnValue(true);
249
250
  }
250
251
  this._current = _current;
251
252
  },
@@ -256,7 +257,7 @@ describe("FloatingMenu component rendering", () => {
256
257
  Object.defineProperty(buttonRef, "current", {
257
258
  set(_current) {
258
259
  if (_current) {
259
- jest.spyOn(_current, "contains").mockReturnValueOnce(true);
260
+ vi.spyOn(_current, "contains").mockReturnValueOnce(true);
260
261
  }
261
262
  this._current = _current;
262
263
  },
@@ -267,7 +268,7 @@ describe("FloatingMenu component rendering", () => {
267
268
  Object.defineProperty(menuOptionsRef, "current", {
268
269
  set(_current) {
269
270
  if (_current) {
270
- jest.spyOn(_current, "contains").mockReturnValueOnce(false);
271
+ vi.spyOn(_current, "contains").mockReturnValueOnce(false);
271
272
  }
272
273
  this._current = _current;
273
274
  },
@@ -295,7 +296,7 @@ describe("FloatingMenu component rendering", () => {
295
296
  Object.defineProperty(wrapperRef, "current", {
296
297
  set(_current) {
297
298
  if (_current) {
298
- jest.spyOn(_current, "contains").mockReturnValue(true);
299
+ vi.spyOn(_current, "contains").mockReturnValue(true);
299
300
  }
300
301
  this._current = _current;
301
302
  },
@@ -306,7 +307,7 @@ describe("FloatingMenu component rendering", () => {
306
307
  Object.defineProperty(buttonRef, "current", {
307
308
  set(_current) {
308
309
  if (_current) {
309
- jest.spyOn(_current, "contains").mockReturnValueOnce(false);
310
+ vi.spyOn(_current, "contains").mockReturnValueOnce(false);
310
311
  }
311
312
  this._current = _current;
312
313
  },
@@ -317,7 +318,7 @@ describe("FloatingMenu component rendering", () => {
317
318
  Object.defineProperty(menuOptionsRef, "current", {
318
319
  set(_current) {
319
320
  if (_current) {
320
- jest.spyOn(_current, "contains").mockReturnValueOnce(true);
321
+ vi.spyOn(_current, "contains").mockReturnValueOnce(true);
321
322
  }
322
323
  this._current = _current;
323
324
  },
@@ -385,7 +386,7 @@ describe("FloatingMenu component rendering", () => {
385
386
  Object.defineProperty(wrapperRef, "current", {
386
387
  set(_current) {
387
388
  if (_current) {
388
- jest.spyOn(_current, "contains").mockReturnValue(true);
389
+ vi.spyOn(_current, "contains").mockReturnValue(true);
389
390
  }
390
391
  this._current = _current;
391
392
  },
@@ -396,7 +397,7 @@ describe("FloatingMenu component rendering", () => {
396
397
  Object.defineProperty(buttonRef, "current", {
397
398
  set(_current) {
398
399
  if (_current) {
399
- jest.spyOn(_current, "contains").mockReturnValueOnce(true);
400
+ vi.spyOn(_current, "contains").mockReturnValueOnce(true);
400
401
  }
401
402
  this._current = _current;
402
403
  },
@@ -407,7 +408,7 @@ describe("FloatingMenu component rendering", () => {
407
408
  Object.defineProperty(menuOptionsRef, "current", {
408
409
  set(_current) {
409
410
  if (_current) {
410
- jest.spyOn(_current, "contains").mockReturnValueOnce(false);
411
+ vi.spyOn(_current, "contains").mockReturnValueOnce(false);
411
412
  }
412
413
  this._current = _current;
413
414
  },
@@ -435,7 +436,7 @@ describe("FloatingMenu component rendering", () => {
435
436
  Object.defineProperty(wrapperRef, "current", {
436
437
  set(_current) {
437
438
  if (_current) {
438
- jest.spyOn(_current, "contains").mockReturnValue(true);
439
+ vi.spyOn(_current, "contains").mockReturnValue(true);
439
440
  }
440
441
  this._current = _current;
441
442
  },
@@ -446,7 +447,7 @@ describe("FloatingMenu component rendering", () => {
446
447
  Object.defineProperty(buttonRef, "current", {
447
448
  set(_current) {
448
449
  if (_current) {
449
- jest.spyOn(_current, "contains").mockReturnValueOnce(false);
450
+ vi.spyOn(_current, "contains").mockReturnValueOnce(false);
450
451
  }
451
452
  this._current = _current;
452
453
  },
@@ -457,7 +458,7 @@ describe("FloatingMenu component rendering", () => {
457
458
  Object.defineProperty(menuOptionsRef, "current", {
458
459
  set(_current) {
459
460
  if (_current) {
460
- jest.spyOn(_current, "contains").mockReturnValueOnce(true);
461
+ vi.spyOn(_current, "contains").mockReturnValueOnce(true);
461
462
  }
462
463
  this._current = _current;
463
464
  },
@@ -532,7 +533,7 @@ describe("FloatingMenu component rendering", () => {
532
533
  Object.defineProperty(wrapperRef, "current", {
533
534
  set(_current) {
534
535
  if (_current) {
535
- jest.spyOn(_current, "contains").mockReturnValue(true);
536
+ vi.spyOn(_current, "contains").mockReturnValue(true);
536
537
  }
537
538
  this._current = _current;
538
539
  },
@@ -543,7 +544,7 @@ describe("FloatingMenu component rendering", () => {
543
544
  Object.defineProperty(buttonRef, "current", {
544
545
  set(_current) {
545
546
  if (_current) {
546
- jest.spyOn(_current, "contains").mockReturnValueOnce(true);
547
+ vi.spyOn(_current, "contains").mockReturnValueOnce(true);
547
548
  }
548
549
  this._current = _current;
549
550
  },
@@ -554,7 +555,7 @@ describe("FloatingMenu component rendering", () => {
554
555
  Object.defineProperty(menuOptionsRef, "current", {
555
556
  set(_current) {
556
557
  if (_current) {
557
- jest.spyOn(_current, "contains").mockReturnValueOnce(false);
558
+ vi.spyOn(_current, "contains").mockReturnValueOnce(false);
558
559
  }
559
560
  this._current = _current;
560
561
  },
@@ -601,7 +602,7 @@ describe("FloatingMenu component rendering", () => {
601
602
  Object.defineProperty(wrapperRef, "current", {
602
603
  set(_current) {
603
604
  if (_current) {
604
- jest.spyOn(_current, "contains").mockReturnValue(true);
605
+ vi.spyOn(_current, "contains").mockReturnValue(true);
605
606
  }
606
607
  this._current = _current;
607
608
  },
@@ -612,7 +613,7 @@ describe("FloatingMenu component rendering", () => {
612
613
  Object.defineProperty(buttonRef, "current", {
613
614
  set(_current) {
614
615
  if (_current) {
615
- jest.spyOn(_current, "contains").mockReturnValueOnce(true);
616
+ vi.spyOn(_current, "contains").mockReturnValueOnce(true);
616
617
  }
617
618
  this._current = _current;
618
619
  },
@@ -623,7 +624,7 @@ describe("FloatingMenu component rendering", () => {
623
624
  Object.defineProperty(menuOptionsRef, "current", {
624
625
  set(_current) {
625
626
  if (_current) {
626
- jest.spyOn(_current, "contains").mockReturnValueOnce(false);
627
+ vi.spyOn(_current, "contains").mockReturnValueOnce(false);
627
628
  }
628
629
  this._current = _current;
629
630
  },
@@ -675,7 +676,7 @@ describe("FloatingMenu component rendering", () => {
675
676
  Object.defineProperty(wrapperRef, "current", {
676
677
  set(_current) {
677
678
  if (_current) {
678
- jest.spyOn(_current, "contains").mockReturnValue(true);
679
+ vi.spyOn(_current, "contains").mockReturnValue(true);
679
680
  }
680
681
  this._current = _current;
681
682
  },
@@ -687,7 +688,7 @@ describe("FloatingMenu component rendering", () => {
687
688
  set(_current) {
688
689
  if (_current) {
689
690
  // true for button click (open), false for option click
690
- jest.spyOn(_current, "contains").mockReturnValueOnce(true).mockReturnValueOnce(false);
691
+ vi.spyOn(_current, "contains").mockReturnValueOnce(true).mockReturnValueOnce(false);
691
692
  }
692
693
  this._current = _current;
693
694
  },
@@ -699,7 +700,7 @@ describe("FloatingMenu component rendering", () => {
699
700
  set(_current) {
700
701
  if (_current) {
701
702
  // true when clicking menu-children (optionWasSelected)
702
- jest.spyOn(_current, "contains").mockReturnValueOnce(true);
703
+ vi.spyOn(_current, "contains").mockReturnValueOnce(true);
703
704
  }
704
705
  this._current = _current;
705
706
  },
@@ -778,7 +779,7 @@ describe("FloatingMenu component rendering", () => {
778
779
  });
779
780
 
780
781
  it("should call actionOnClose when clicking outside", () => {
781
- const actionOnClose = jest.fn();
782
+ const actionOnClose = vi.fn();
782
783
  const buttonContent = () => <span>trigger</span>;
783
784
 
784
785
  const defaultProps: IFloatingProps = {
@@ -806,7 +807,7 @@ describe("FloatingMenu component rendering", () => {
806
807
  });
807
808
 
808
809
  it("should call actionOnClose when closing via button toggle", () => {
809
- const actionOnClose = jest.fn();
810
+ const actionOnClose = vi.fn();
810
811
  const buttonContent = () => <span>trigger</span>;
811
812
 
812
813
  const defaultProps: IFloatingProps = {
@@ -833,7 +834,7 @@ describe("FloatingMenu component rendering", () => {
833
834
  });
834
835
 
835
836
  it("should call actionOnClose when closing via mouseLeave", () => {
836
- const actionOnClose = jest.fn();
837
+ const actionOnClose = vi.fn();
837
838
  const buttonContent = () => <span>trigger</span>;
838
839
 
839
840
  const defaultProps: IFloatingProps = {
@@ -17,8 +17,8 @@ describe("FloatingPanel component rendering", () => {
17
17
  isOpenedSecond: false,
18
18
  children: false,
19
19
  title: "title",
20
- toggleModal: jest.fn(),
21
- handlePanel: jest.fn(),
20
+ toggleModal: vi.fn(),
21
+ handlePanel: vi.fn(),
22
22
  secondary: true,
23
23
  };
24
24
 
@@ -38,8 +38,8 @@ describe("FloatingPanel component rendering", () => {
38
38
  isOpenedSecond: false,
39
39
  children: false,
40
40
  title: "title",
41
- toggleModal: jest.fn(),
42
- handlePanel: jest.fn(),
41
+ toggleModal: vi.fn(),
42
+ handlePanel: vi.fn(),
43
43
  secondary: true,
44
44
  closeOnOutsideClick: false,
45
45
  };
@@ -59,8 +59,8 @@ describe("FloatingPanel component rendering", () => {
59
59
 
60
60
  describe("FloatingPanel component events trigger", () => {
61
61
  it("should trigger the handleOnClick", () => {
62
- const handlePanelMock = jest.fn();
63
- const toggleModalMock = jest.fn();
62
+ const handlePanelMock = vi.fn();
63
+ const toggleModalMock = vi.fn();
64
64
  const defaultProps: IFloatingPanelProps = {
65
65
  isOpen: true,
66
66
  isOpenedSecond: false,
@@ -88,8 +88,8 @@ describe("FloatingPanel component events trigger", () => {
88
88
  });
89
89
 
90
90
  it("should trigger the handleClickOutside and trigger handlePanel", () => {
91
- const handlePanelMock = jest.fn();
92
- const toggleModalMock = jest.fn();
91
+ const handlePanelMock = vi.fn();
92
+ const toggleModalMock = vi.fn();
93
93
  const defaultProps: IFloatingPanelProps = {
94
94
  isOpen: true,
95
95
  isOpenedSecond: false,
@@ -118,8 +118,8 @@ describe("FloatingPanel component events trigger", () => {
118
118
  });
119
119
 
120
120
  it("should trigger the handleClickOutside and not trigger handlePanel", () => {
121
- const handlePanelMock = jest.fn();
122
- const toggleModalMock = jest.fn();
121
+ const handlePanelMock = vi.fn();
122
+ const toggleModalMock = vi.fn();
123
123
  const defaultProps: IFloatingPanelProps = {
124
124
  isOpen: true,
125
125
  isOpenedSecond: false,
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
 
3
3
  import { ThemeProvider } from "styled-components";
4
- import { mock } from "jest-mock-extended";
4
+ import { mock } from "vitest-mock-extended";
5
5
  import { render, cleanup, screen } from "@testing-library/react";
6
6
  import { parseTheme } from "@ax/helpers";
7
7
  import "@testing-library/jest-dom";