@unchainedshop/admin-ui 4.8.31 → 4.8.32

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 (458) hide show
  1. package/out/403/index.html +3 -3
  2. package/out/404/index.html +3 -3
  3. package/out/404.html +3 -3
  4. package/out/423/index.html +3 -3
  5. package/out/500/index.html +3 -3
  6. package/out/_next/static/chunks/{0696190awbl-j.js → 0a5nr3-_q7xx1.js} +10 -10
  7. package/out/_next/static/chunks/{1m85ne6w_6tei.js → 11go520d1hcm5.js} +1 -1
  8. package/out/_next/static/chunks/{2-kvt9e7irukm.js → 182l1mlbf0glb.js} +1 -1
  9. package/out/_next/static/chunks/{09avk6mqdin_1.js → 1wnuiwsbi70eq.js} +1 -1
  10. package/out/_next/static/chunks/{0uls4bq8a7gyh.js → 2wmsx4gjbgvfv.js} +3 -3
  11. package/out/_next/static/chunks/{1_3e6x79fcyv3.js → 41p3ng89i5lem.js} +1 -1
  12. package/out/_next/static/{4ESrB8YpR2n44PFePtbgX → jOx5PlckLwWIJ5yrvePdU}/_buildManifest.js +2 -2
  13. package/out/_offline/index.html +3 -3
  14. package/out/account/forgot-password/index.html +3 -3
  15. package/out/account/index.html +3 -3
  16. package/out/assortments/AssortmentDetailPage/index.html +3 -3
  17. package/out/assortments/index.html +3 -3
  18. package/out/assortments/new/index.html +3 -3
  19. package/out/copilot/index.html +3 -3
  20. package/out/country/CountryDetailPage/index.html +3 -3
  21. package/out/country/index.html +3 -3
  22. package/out/country/new/index.html +3 -3
  23. package/out/currency/CurrencyDetailPage/index.html +3 -3
  24. package/out/currency/index.html +3 -3
  25. package/out/currency/new/index.html +3 -3
  26. package/out/delivery-provider/DeliveryProviderDetailPage/index.html +3 -3
  27. package/out/delivery-provider/index.html +3 -3
  28. package/out/delivery-provider/new/index.html +3 -3
  29. package/out/enrollments/EnrollmentDetailPage/index.html +3 -3
  30. package/out/enrollments/index.html +3 -3
  31. package/out/events/EventDetailPage/index.html +3 -3
  32. package/out/events/index.html +3 -3
  33. package/out/exports/index.html +3 -3
  34. package/out/external/index.html +3 -3
  35. package/out/filters/FilterDetailPage/index.html +3 -3
  36. package/out/filters/index.html +3 -3
  37. package/out/filters/new/index.html +3 -3
  38. package/out/index.html +3 -3
  39. package/out/install/index.html +3 -3
  40. package/out/language/LanguageDetailPage/index.html +3 -3
  41. package/out/language/index.html +3 -3
  42. package/out/language/new/index.html +3 -3
  43. package/out/log-in/index.html +3 -3
  44. package/out/orders/OrderDetailPage/index.html +3 -3
  45. package/out/orders/index.html +3 -3
  46. package/out/payment-provider/PaymentProviderDetailPage/index.html +3 -3
  47. package/out/payment-provider/index.html +3 -3
  48. package/out/payment-provider/new/index.html +3 -3
  49. package/out/products/ProductDetailPage/index.html +3 -3
  50. package/out/products/index.html +3 -3
  51. package/out/products/new/index.html +3 -3
  52. package/out/quotations/QuotationDetailPage/index.html +3 -3
  53. package/out/quotations/index.html +3 -3
  54. package/out/reset-password/index.html +3 -3
  55. package/out/sign-up/index.html +3 -3
  56. package/out/styleguide/index.html +3 -3
  57. package/out/tokens/TokenDetailPage/index.html +3 -3
  58. package/out/tokens/index.html +3 -3
  59. package/out/users/UserDetailPage/index.html +3 -3
  60. package/out/users/index.html +3 -3
  61. package/out/users/new/index.html +3 -3
  62. package/out/verify-email/index.html +3 -3
  63. package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +3 -3
  64. package/out/warehousing-provider/index.html +3 -3
  65. package/out/warehousing-provider/new/index.html +3 -3
  66. package/out/works/WorkDetailPage/index.html +3 -3
  67. package/out/works/WorkQueueListView/index.html +3 -3
  68. package/out/works/index.html +3 -3
  69. package/out/works/management/index.html +3 -3
  70. package/package.json +31 -31
  71. package/dist/chunk-3L6EZQ6P.js +0 -135
  72. package/dist/chunk-54DKBWXV.js +0 -33
  73. package/dist/chunk-5WPFHQZN.js +0 -388
  74. package/dist/chunk-6UGLNLJG.js +0 -44
  75. package/dist/chunk-BMDNY67T.js +0 -22547
  76. package/dist/chunk-BOMSMJF2.js +0 -77
  77. package/dist/chunk-COV7BREX.js +0 -50
  78. package/dist/chunk-E77YIMGR.js +0 -2083
  79. package/dist/chunk-EJDZRZSZ.js +0 -59
  80. package/dist/chunk-ELPURWDC.js +0 -75
  81. package/dist/chunk-F6LBNV3H.js +0 -9
  82. package/dist/chunk-FDHXLNZQ.js +0 -44
  83. package/dist/chunk-GY2DRQGW.js +0 -166
  84. package/dist/chunk-HERLM47Z.js +0 -309
  85. package/dist/chunk-HJKRGBDG.js +0 -694
  86. package/dist/chunk-I64TXIE7.js +0 -618
  87. package/dist/chunk-IAQPLRXZ.js +0 -16
  88. package/dist/chunk-ICJH36K4.js +0 -326
  89. package/dist/chunk-ILYPJE4N.js +0 -57
  90. package/dist/chunk-IWKDBADX.js +0 -73
  91. package/dist/chunk-IXBMHOB5.js +0 -13
  92. package/dist/chunk-IYKPRAWC.js +0 -26
  93. package/dist/chunk-J23QSWDL.js +0 -8
  94. package/dist/chunk-KH5MK6ZW.js +0 -18
  95. package/dist/chunk-KRIRF7F6.js +0 -76
  96. package/dist/chunk-NT7RB7AK.js +0 -70
  97. package/dist/chunk-OKGJ6HDE.js +0 -26
  98. package/dist/chunk-OTXM2UCD.js +0 -19
  99. package/dist/chunk-PJLYVMUM.js +0 -3308
  100. package/dist/chunk-PUI5BIKO.js +0 -41
  101. package/dist/chunk-Q6S3LBUF.js +0 -180
  102. package/dist/chunk-QHR23GVH.js +0 -1099
  103. package/dist/chunk-QWQ3WJJN.js +0 -1
  104. package/dist/chunk-RAQV2GYF.js +0 -70
  105. package/dist/chunk-VBO377AY.js +0 -14
  106. package/dist/chunk-VYEXPG3M.js +0 -107
  107. package/dist/chunk-WPLOTFGW.js +0 -36
  108. package/dist/chunk-YO6PT7KD.js +0 -13
  109. package/dist/chunk-ZUOVKRKC.js +0 -957
  110. package/dist/components/ui/Accordion/Accordion.d.ts +0 -11
  111. package/dist/components/ui/Accordion/Accordion.d.ts.map +0 -1
  112. package/dist/components/ui/Accordion/AccordionHeader.d.ts +0 -6
  113. package/dist/components/ui/Accordion/AccordionHeader.d.ts.map +0 -1
  114. package/dist/components/ui/Accordion/AccordionItem.d.ts +0 -11
  115. package/dist/components/ui/Accordion/AccordionItem.d.ts.map +0 -1
  116. package/dist/components/ui/ActiveInActive.d.ts +0 -10
  117. package/dist/components/ui/ActiveInActive.d.ts.map +0 -1
  118. package/dist/components/ui/AnimatedCounter.d.ts +0 -7
  119. package/dist/components/ui/AnimatedCounter.d.ts.map +0 -1
  120. package/dist/components/ui/Badge.d.ts +0 -10
  121. package/dist/components/ui/Badge.d.ts.map +0 -1
  122. package/dist/components/ui/BreadCrumbs.d.ts +0 -7
  123. package/dist/components/ui/BreadCrumbs.d.ts.map +0 -1
  124. package/dist/components/ui/Button.d.ts +0 -36
  125. package/dist/components/ui/Button.d.ts.map +0 -1
  126. package/dist/components/ui/CopyableText.d.ts +0 -5
  127. package/dist/components/ui/CopyableText.d.ts.map +0 -1
  128. package/dist/components/ui/DateInput.d.ts +0 -15
  129. package/dist/components/ui/DateInput.d.ts.map +0 -1
  130. package/dist/components/ui/DateRangeFilterInput.d.ts +0 -4
  131. package/dist/components/ui/DateRangeFilterInput.d.ts.map +0 -1
  132. package/dist/components/ui/DetailHeader.d.ts +0 -6
  133. package/dist/components/ui/DetailHeader.d.ts.map +0 -1
  134. package/dist/components/ui/DraggableIcon.d.ts +0 -3
  135. package/dist/components/ui/DraggableIcon.d.ts.map +0 -1
  136. package/dist/components/ui/ErrorBoundary.d.ts +0 -18
  137. package/dist/components/ui/ErrorBoundary.d.ts.map +0 -1
  138. package/dist/components/ui/ErrorFallback.d.ts +0 -6
  139. package/dist/components/ui/ErrorFallback.d.ts.map +0 -1
  140. package/dist/components/ui/HelpText.d.ts +0 -11
  141. package/dist/components/ui/HelpText.d.ts.map +0 -1
  142. package/dist/components/ui/ImageWithFallback.d.ts +0 -7
  143. package/dist/components/ui/ImageWithFallback.d.ts.map +0 -1
  144. package/dist/components/ui/InfoTextBanner.d.ts +0 -6
  145. package/dist/components/ui/InfoTextBanner.d.ts.map +0 -1
  146. package/dist/components/ui/JSONView.d.ts +0 -6
  147. package/dist/components/ui/JSONView.d.ts.map +0 -1
  148. package/dist/components/ui/ListHeader.d.ts +0 -6
  149. package/dist/components/ui/ListHeader.d.ts.map +0 -1
  150. package/dist/components/ui/Loading.d.ts +0 -10
  151. package/dist/components/ui/Loading.d.ts.map +0 -1
  152. package/dist/components/ui/NoData.d.ts +0 -7
  153. package/dist/components/ui/NoData.d.ts.map +0 -1
  154. package/dist/components/ui/NoImage.d.ts +0 -7
  155. package/dist/components/ui/NoImage.d.ts.map +0 -1
  156. package/dist/components/ui/NoImageSvg.d.ts +0 -8
  157. package/dist/components/ui/NoImageSvg.d.ts.map +0 -1
  158. package/dist/components/ui/PageHeader.d.ts +0 -11
  159. package/dist/components/ui/PageHeader.d.ts.map +0 -1
  160. package/dist/components/ui/Pagination.d.ts +0 -8
  161. package/dist/components/ui/Pagination.d.ts.map +0 -1
  162. package/dist/components/ui/Portal/Portal.d.ts +0 -16
  163. package/dist/components/ui/Portal/Portal.d.ts.map +0 -1
  164. package/dist/components/ui/Portal/Portal.types.d.ts +0 -16
  165. package/dist/components/ui/Portal/Portal.types.d.ts.map +0 -1
  166. package/dist/components/ui/SaveAndCancelButtons.d.ts +0 -10
  167. package/dist/components/ui/SaveAndCancelButtons.d.ts.map +0 -1
  168. package/dist/components/ui/SearchField.d.ts +0 -7
  169. package/dist/components/ui/SearchField.d.ts.map +0 -1
  170. package/dist/components/ui/Tab.d.ts +0 -18
  171. package/dist/components/ui/Tab.d.ts.map +0 -1
  172. package/dist/components/ui/Tag/TagInput.d.ts +0 -19
  173. package/dist/components/ui/Tag/TagInput.d.ts.map +0 -1
  174. package/dist/components/ui/Tag/TagList.d.ts +0 -8
  175. package/dist/components/ui/Tag/TagList.d.ts.map +0 -1
  176. package/dist/components/ui/Tag/TagListForm.d.ts +0 -8
  177. package/dist/components/ui/Tag/TagListForm.d.ts.map +0 -1
  178. package/dist/components/ui/Toggle.d.ts +0 -11
  179. package/dist/components/ui/Toggle.d.ts.map +0 -1
  180. package/dist/components/ui/ToolTip.d.ts +0 -7
  181. package/dist/components/ui/ToolTip.d.ts.map +0 -1
  182. package/dist/components/ui/card.d.ts +0 -9
  183. package/dist/components/ui/card.d.ts.map +0 -1
  184. package/dist/components/ui/chart.d.ts +0 -42
  185. package/dist/components/ui/chart.d.ts.map +0 -1
  186. package/dist/components/ui/form/CheckboxField.d.ts +0 -4
  187. package/dist/components/ui/form/CheckboxField.d.ts.map +0 -1
  188. package/dist/components/ui/form/ChoicesField.d.ts +0 -12
  189. package/dist/components/ui/form/ChoicesField.d.ts.map +0 -1
  190. package/dist/components/ui/form/Combobox.d.ts +0 -20
  191. package/dist/components/ui/form/Combobox.d.ts.map +0 -1
  192. package/dist/components/ui/form/DatePickerField.d.ts +0 -4
  193. package/dist/components/ui/form/DatePickerField.d.ts.map +0 -1
  194. package/dist/components/ui/form/EmailField.d.ts +0 -7
  195. package/dist/components/ui/form/EmailField.d.ts.map +0 -1
  196. package/dist/components/ui/form/FieldWithHelp.d.ts +0 -10
  197. package/dist/components/ui/form/FieldWithHelp.d.ts.map +0 -1
  198. package/dist/components/ui/form/FieldWrapper.d.ts +0 -8
  199. package/dist/components/ui/form/FieldWrapper.d.ts.map +0 -1
  200. package/dist/components/ui/form/FormErrors.d.ts +0 -6
  201. package/dist/components/ui/form/FormErrors.d.ts.map +0 -1
  202. package/dist/components/ui/form/JSONAreaField.d.ts +0 -7
  203. package/dist/components/ui/form/JSONAreaField.d.ts.map +0 -1
  204. package/dist/components/ui/form/MarkdownTextAreaField.d.ts +0 -8
  205. package/dist/components/ui/form/MarkdownTextAreaField.d.ts.map +0 -1
  206. package/dist/components/ui/form/PasswordField.d.ts +0 -3
  207. package/dist/components/ui/form/PasswordField.d.ts.map +0 -1
  208. package/dist/components/ui/form/SelectField.d.ts +0 -11
  209. package/dist/components/ui/form/SelectField.d.ts.map +0 -1
  210. package/dist/components/ui/form/SubmitButton.d.ts +0 -9
  211. package/dist/components/ui/form/SubmitButton.d.ts.map +0 -1
  212. package/dist/components/ui/form/TagInputField.d.ts +0 -7
  213. package/dist/components/ui/form/TagInputField.d.ts.map +0 -1
  214. package/dist/components/ui/form/TextAreaField.d.ts +0 -8
  215. package/dist/components/ui/form/TextAreaField.d.ts.map +0 -1
  216. package/dist/components/ui/form/TextField.d.ts +0 -10
  217. package/dist/components/ui/form/TextField.d.ts.map +0 -1
  218. package/dist/components/ui/form/index.d.ts +0 -18
  219. package/dist/components/ui/form/index.d.ts.map +0 -1
  220. package/dist/components/ui/icons.d.ts +0 -4
  221. package/dist/components/ui/icons.d.ts.map +0 -1
  222. package/dist/components/ui/index.d.ts +0 -47
  223. package/dist/components/ui/index.d.ts.map +0 -1
  224. package/dist/form.js +0 -2617
  225. package/dist/gql/operation-types.d.ts +0 -13239
  226. package/dist/gql/operation-types.d.ts.map +0 -1
  227. package/dist/gql/schema-types.d.ts +0 -3876
  228. package/dist/gql/schema-types.d.ts.map +0 -1
  229. package/dist/gql/types.d.ts +0 -3
  230. package/dist/gql/types.d.ts.map +0 -1
  231. package/dist/hooks.js +0 -49
  232. package/dist/lib/utils.d.ts +0 -3
  233. package/dist/lib/utils.d.ts.map +0 -1
  234. package/dist/modal.js +0 -51
  235. package/dist/modules/Auth/AuthContext.d.ts +0 -9
  236. package/dist/modules/Auth/AuthContext.d.ts.map +0 -1
  237. package/dist/modules/Auth/useAuth.d.ts +0 -6
  238. package/dist/modules/Auth/useAuth.d.ts.map +0 -1
  239. package/dist/modules/UnchainedContext/UnchainedContext.d.ts +0 -8
  240. package/dist/modules/UnchainedContext/UnchainedContext.d.ts.map +0 -1
  241. package/dist/modules/UnchainedContext/useUnchainedContext.d.ts +0 -7
  242. package/dist/modules/UnchainedContext/useUnchainedContext.d.ts.map +0 -1
  243. package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts +0 -3
  244. package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts.map +0 -1
  245. package/dist/modules/accounts/fragment/UserFragment.d.ts +0 -3
  246. package/dist/modules/accounts/fragment/UserFragment.d.ts.map +0 -1
  247. package/dist/modules/accounts/hooks/useCurrentUser.d.ts +0 -10
  248. package/dist/modules/accounts/hooks/useCurrentUser.d.ts.map +0 -1
  249. package/dist/modules/accounts/hooks/useUsersCount.d.ts +0 -8
  250. package/dist/modules/accounts/hooks/useUsersCount.d.ts.map +0 -1
  251. package/dist/modules/accounts.js +0 -1349
  252. package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts +0 -8
  253. package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts.map +0 -1
  254. package/dist/modules/assortment.js +0 -1205
  255. package/dist/modules/common/components/AppContext.d.ts +0 -18
  256. package/dist/modules/common/components/AppContext.d.ts.map +0 -1
  257. package/dist/modules/common/components/FormWrapper.d.ts +0 -8
  258. package/dist/modules/common/components/FormWrapper.d.ts.map +0 -1
  259. package/dist/modules/common/components/LocaleWrapper.d.ts +0 -7
  260. package/dist/modules/common/components/LocaleWrapper.d.ts.map +0 -1
  261. package/dist/modules/common/components/MediaAvatar.d.ts +0 -6
  262. package/dist/modules/common/components/MediaAvatar.d.ts.map +0 -1
  263. package/dist/modules/common/components/SelectOptions.d.ts +0 -17
  264. package/dist/modules/common/components/SelectOptions.d.ts.map +0 -1
  265. package/dist/modules/common/components/Table.d.ts +0 -25
  266. package/dist/modules/common/components/Table.d.ts.map +0 -1
  267. package/dist/modules/common/components/TableCell.d.ts +0 -12
  268. package/dist/modules/common/components/TableCell.d.ts.map +0 -1
  269. package/dist/modules/common/components/TableRow.d.ts +0 -10
  270. package/dist/modules/common/components/TableRow.d.ts.map +0 -1
  271. package/dist/modules/common/components/ThemeWrapper.d.ts +0 -10
  272. package/dist/modules/common/components/ThemeWrapper.d.ts.map +0 -1
  273. package/dist/modules/common/data/iso-codes.d.ts +0 -4
  274. package/dist/modules/common/data/iso-codes.d.ts.map +0 -1
  275. package/dist/modules/common/data/miscellaneous.d.ts +0 -52
  276. package/dist/modules/common/data/miscellaneous.d.ts.map +0 -1
  277. package/dist/modules/common/fragments/AddressFragment.d.ts +0 -3
  278. package/dist/modules/common/fragments/AddressFragment.d.ts.map +0 -1
  279. package/dist/modules/common/hooks/useApp.d.ts +0 -11
  280. package/dist/modules/common/hooks/useApp.d.ts.map +0 -1
  281. package/dist/modules/common/hooks/useBulkResultHandler.d.ts +0 -8
  282. package/dist/modules/common/hooks/useBulkResultHandler.d.ts.map +0 -1
  283. package/dist/modules/common/hooks/useBulkSelection.d.ts +0 -12
  284. package/dist/modules/common/hooks/useBulkSelection.d.ts.map +0 -1
  285. package/dist/modules/common/hooks/useCSVExport.d.ts +0 -10
  286. package/dist/modules/common/hooks/useCSVExport.d.ts.map +0 -1
  287. package/dist/modules/common/hooks/useCSVImport.d.ts +0 -18
  288. package/dist/modules/common/hooks/useCSVImport.d.ts.map +0 -1
  289. package/dist/modules/common/hooks/useChatEndpointChecker.d.ts +0 -5
  290. package/dist/modules/common/hooks/useChatEndpointChecker.d.ts.map +0 -1
  291. package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts +0 -10
  292. package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts.map +0 -1
  293. package/dist/modules/common/hooks/useDashboardMetrics.d.ts +0 -23
  294. package/dist/modules/common/hooks/useDashboardMetrics.d.ts.map +0 -1
  295. package/dist/modules/common/hooks/useLocalStorage.d.ts +0 -3
  296. package/dist/modules/common/hooks/useLocalStorage.d.ts.map +0 -1
  297. package/dist/modules/common/hooks/useOrderAnalytics.d.ts +0 -25
  298. package/dist/modules/common/hooks/useOrderAnalytics.d.ts.map +0 -1
  299. package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts +0 -16
  300. package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts.map +0 -1
  301. package/dist/modules/common/hooks/useOutsideClick.d.ts +0 -3
  302. package/dist/modules/common/hooks/useOutsideClick.d.ts.map +0 -1
  303. package/dist/modules/common/hooks/usePortal.d.ts +0 -20
  304. package/dist/modules/common/hooks/usePortal.d.ts.map +0 -1
  305. package/dist/modules/common/hooks/useScrollRestoration.d.ts +0 -8
  306. package/dist/modules/common/hooks/useScrollRestoration.d.ts.map +0 -1
  307. package/dist/modules/common/hooks/useShopConfiguration.d.ts +0 -8
  308. package/dist/modules/common/hooks/useShopConfiguration.d.ts.map +0 -1
  309. package/dist/modules/common/hooks/useShopInfo.d.ts +0 -41
  310. package/dist/modules/common/hooks/useShopInfo.d.ts.map +0 -1
  311. package/dist/modules/common/hooks/useStatusTypes.d.ts +0 -10
  312. package/dist/modules/common/hooks/useStatusTypes.d.ts.map +0 -1
  313. package/dist/modules/common/hooks/useSystemRoles.d.ts +0 -7
  314. package/dist/modules/common/hooks/useSystemRoles.d.ts.map +0 -1
  315. package/dist/modules/common/hooks/useTheme.d.ts +0 -7
  316. package/dist/modules/common/hooks/useTheme.d.ts.map +0 -1
  317. package/dist/modules/common/utils/deBounce.d.ts +0 -3
  318. package/dist/modules/common/utils/deBounce.d.ts.map +0 -1
  319. package/dist/modules/common/utils/defaultNextImageLoader.d.ts +0 -7
  320. package/dist/modules/common/utils/defaultNextImageLoader.d.ts.map +0 -1
  321. package/dist/modules/common/utils/formatUsername.d.ts +0 -3
  322. package/dist/modules/common/utils/formatUsername.d.ts.map +0 -1
  323. package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts +0 -30
  324. package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts.map +0 -1
  325. package/dist/modules/common/utils/normalizeFilterKeys.d.ts +0 -4
  326. package/dist/modules/common/utils/normalizeFilterKeys.d.ts.map +0 -1
  327. package/dist/modules/common/utils/sharedContext.d.ts +0 -9
  328. package/dist/modules/common/utils/sharedContext.d.ts.map +0 -1
  329. package/dist/modules/common/utils/useFormatDateTime.d.ts +0 -16
  330. package/dist/modules/common/utils/useFormatDateTime.d.ts.map +0 -1
  331. package/dist/modules/common/utils/utils.d.ts +0 -21
  332. package/dist/modules/common/utils/utils.d.ts.map +0 -1
  333. package/dist/modules/country/fragments/CountryFragment.d.ts +0 -3
  334. package/dist/modules/country/fragments/CountryFragment.d.ts.map +0 -1
  335. package/dist/modules/country/hooks/useCountries.d.ts +0 -22
  336. package/dist/modules/country/hooks/useCountries.d.ts.map +0 -1
  337. package/dist/modules/country.js +0 -108
  338. package/dist/modules/currency.js +0 -119
  339. package/dist/modules/delivery-provider.js +0 -269
  340. package/dist/modules/enrollment.js +0 -431
  341. package/dist/modules/event.js +0 -123
  342. package/dist/modules/filter.js +0 -497
  343. package/dist/modules/forms/components/Form.d.ts +0 -8
  344. package/dist/modules/forms/components/Form.d.ts.map +0 -1
  345. package/dist/modules/forms/hooks/useField.d.ts +0 -35
  346. package/dist/modules/forms/hooks/useField.d.ts.map +0 -1
  347. package/dist/modules/forms/hooks/useForm.d.ts +0 -44
  348. package/dist/modules/forms/hooks/useForm.d.ts.map +0 -1
  349. package/dist/modules/forms/hooks/useFormContext.d.ts +0 -3
  350. package/dist/modules/forms/hooks/useFormContext.d.ts.map +0 -1
  351. package/dist/modules/forms/lib/FormContext.d.ts +0 -13
  352. package/dist/modules/forms/lib/FormContext.d.ts.map +0 -1
  353. package/dist/modules/forms/lib/clean.d.ts +0 -3
  354. package/dist/modules/forms/lib/clean.d.ts.map +0 -1
  355. package/dist/modules/forms/lib/validators.d.ts +0 -20
  356. package/dist/modules/forms/lib/validators.d.ts.map +0 -1
  357. package/dist/modules/language/fragments/LanguageFragment.d.ts +0 -3
  358. package/dist/modules/language/fragments/LanguageFragment.d.ts.map +0 -1
  359. package/dist/modules/language/hooks/useLanguages.d.ts +0 -19
  360. package/dist/modules/language/hooks/useLanguages.d.ts.map +0 -1
  361. package/dist/modules/language.js +0 -106
  362. package/dist/modules/modal/components/AlertMessage.d.ts +0 -9
  363. package/dist/modules/modal/components/AlertMessage.d.ts.map +0 -1
  364. package/dist/modules/modal/components/DangerMessage.d.ts +0 -13
  365. package/dist/modules/modal/components/DangerMessage.d.ts.map +0 -1
  366. package/dist/modules/modal/components/ImportResultMessage.d.ts +0 -14
  367. package/dist/modules/modal/components/ImportResultMessage.d.ts.map +0 -1
  368. package/dist/modules/modal/components/Modal.d.ts +0 -10
  369. package/dist/modules/modal/components/Modal.d.ts.map +0 -1
  370. package/dist/modules/modal/components/ModalWrapper.d.ts +0 -6
  371. package/dist/modules/modal/components/ModalWrapper.d.ts.map +0 -1
  372. package/dist/modules/modal/hooks/useModal.d.ts +0 -7
  373. package/dist/modules/modal/hooks/useModal.d.ts.map +0 -1
  374. package/dist/modules/modal/utils/ModalContext.d.ts +0 -9
  375. package/dist/modules/modal/utils/ModalContext.d.ts.map +0 -1
  376. package/dist/modules/order/fragments/OrderDetailFragment.d.ts +0 -3
  377. package/dist/modules/order/fragments/OrderDetailFragment.d.ts.map +0 -1
  378. package/dist/modules/order/fragments/OrderFragment.d.ts +0 -3
  379. package/dist/modules/order/fragments/OrderFragment.d.ts.map +0 -1
  380. package/dist/modules/order/hooks/useOrders.d.ts +0 -46
  381. package/dist/modules/order/hooks/useOrders.d.ts.map +0 -1
  382. package/dist/modules/order.js +0 -569
  383. package/dist/modules/payment-providers.js +0 -206
  384. package/dist/modules/product/hooks/useProductsCount.d.ts +0 -8
  385. package/dist/modules/product/hooks/useProductsCount.d.ts.map +0 -1
  386. package/dist/modules/product-review.js +0 -270
  387. package/dist/modules/product.js +0 -6914
  388. package/dist/modules/quotation.js +0 -324
  389. package/dist/modules/token.js +0 -143
  390. package/dist/modules/warehousing-providers.js +0 -206
  391. package/dist/modules/work/fragments/WorkFragment.d.ts +0 -3
  392. package/dist/modules/work/fragments/WorkFragment.d.ts.map +0 -1
  393. package/dist/modules/work/hooks/useAddWork.d.ts +0 -6
  394. package/dist/modules/work/hooks/useAddWork.d.ts.map +0 -1
  395. package/dist/modules/work/hooks/useWork.d.ts +0 -32
  396. package/dist/modules/work/hooks/useWork.d.ts.map +0 -1
  397. package/dist/modules/work.js +0 -232
  398. package/dist/plugins.js +0 -13
  399. package/dist/providers.js +0 -9
  400. package/dist/sdk/hooks.d.ts +0 -12
  401. package/dist/sdk/hooks.d.ts.map +0 -1
  402. package/dist/sdk/modal.d.ts +0 -7
  403. package/dist/sdk/modal.d.ts.map +0 -1
  404. package/dist/sdk/plugins.d.ts +0 -78
  405. package/dist/sdk/plugins.d.ts.map +0 -1
  406. package/dist/sdk/providers.d.ts +0 -5
  407. package/dist/sdk/providers.d.ts.map +0 -1
  408. package/dist/sdk/shims/admin-ui-plugins.d.ts +0 -3
  409. package/dist/sdk/shims/admin-ui-plugins.d.ts.map +0 -1
  410. package/dist/sdk/shims/apollo-client-react.d.ts +0 -3
  411. package/dist/sdk/shims/apollo-client-react.d.ts.map +0 -1
  412. package/dist/sdk/shims/apollo-client.d.ts +0 -3
  413. package/dist/sdk/shims/apollo-client.d.ts.map +0 -1
  414. package/dist/sdk/shims/host.d.ts +0 -17
  415. package/dist/sdk/shims/host.d.ts.map +0 -1
  416. package/dist/sdk/shims/next-head.d.ts +0 -3
  417. package/dist/sdk/shims/next-head.d.ts.map +0 -1
  418. package/dist/sdk/shims/next-image.d.ts +0 -3
  419. package/dist/sdk/shims/next-image.d.ts.map +0 -1
  420. package/dist/sdk/shims/next-link.d.ts +0 -3
  421. package/dist/sdk/shims/next-link.d.ts.map +0 -1
  422. package/dist/sdk/shims/next-router.d.ts +0 -3
  423. package/dist/sdk/shims/next-router.d.ts.map +0 -1
  424. package/dist/sdk/shims/react-dom-client.d.ts +0 -3
  425. package/dist/sdk/shims/react-dom-client.d.ts.map +0 -1
  426. package/dist/sdk/shims/react-dom.d.ts +0 -3
  427. package/dist/sdk/shims/react-dom.d.ts.map +0 -1
  428. package/dist/sdk/shims/react-hook-form.d.ts +0 -3
  429. package/dist/sdk/shims/react-hook-form.d.ts.map +0 -1
  430. package/dist/sdk/shims/react-intl.d.ts +0 -3
  431. package/dist/sdk/shims/react-intl.d.ts.map +0 -1
  432. package/dist/sdk/shims/react-jsx-runtime.d.ts +0 -3
  433. package/dist/sdk/shims/react-jsx-runtime.d.ts.map +0 -1
  434. package/dist/sdk/shims/react-toastify.d.ts +0 -3
  435. package/dist/sdk/shims/react-toastify.d.ts.map +0 -1
  436. package/dist/sdk/shims/react.d.ts +0 -3
  437. package/dist/sdk/shims/react.d.ts.map +0 -1
  438. package/dist/sdk/theme.d.ts +0 -26
  439. package/dist/sdk/theme.d.ts.map +0 -1
  440. package/dist/shims/admin-ui-plugins.js +0 -9
  441. package/dist/shims/apollo-client-react.js +0 -25
  442. package/dist/shims/apollo-client.js +0 -55
  443. package/dist/shims/next-head.js +0 -9
  444. package/dist/shims/next-image.js +0 -9
  445. package/dist/shims/next-link.js +0 -9
  446. package/dist/shims/next-router.js +0 -13
  447. package/dist/shims/react-dom-client.js +0 -11
  448. package/dist/shims/react-dom.js +0 -22
  449. package/dist/shims/react-hook-form.js +0 -25
  450. package/dist/shims/react-intl.js +0 -37
  451. package/dist/shims/react-jsx-runtime.js +0 -11
  452. package/dist/shims/react-toastify.js +0 -16
  453. package/dist/shims/react.js +0 -52
  454. package/dist/theme.js +0 -34
  455. package/dist/ui.js +0 -19764
  456. package/out/manifest.json +0 -48
  457. /package/out/_next/static/{4ESrB8YpR2n44PFePtbgX → jOx5PlckLwWIJ5yrvePdU}/_clientMiddlewareManifest.js +0 -0
  458. /package/out/_next/static/{4ESrB8YpR2n44PFePtbgX → jOx5PlckLwWIJ5yrvePdU}/_ssgManifest.js +0 -0
@@ -1,1349 +0,0 @@
1
- import { useConfirmMediaUpload_default, PUTMedia_default } from '../chunk-COV7BREX.js';
2
- import { useCSVExport } from '../chunk-IWKDBADX.js';
3
- import '../chunk-VYEXPG3M.js';
4
- import '../chunk-QWQ3WJJN.js';
5
- import { UserFragment_default, MD5MetaDataFragment_default } from '../chunk-GY2DRQGW.js';
6
- export { useCurrentUser_default as useCurrentUser } from '../chunk-GY2DRQGW.js';
7
- import { useUnchainedContext_default } from '../chunk-IAQPLRXZ.js';
8
- import '../chunk-WPLOTFGW.js';
9
- import { gql } from '@apollo/client';
10
- import { useMutation, useQuery } from '@apollo/client/react';
11
- import { useCallback } from 'react';
12
-
13
- var logOut = async (apollo, router = null) => {
14
- await apollo.mutate({
15
- mutation: gql`
16
- mutation Logout {
17
- logout {
18
- success
19
- }
20
- }
21
- `
22
- });
23
- try {
24
- await apollo.resetStore();
25
- } catch (e) {
26
- if (e?.name !== "AbortError") throw e;
27
- }
28
- if (router) {
29
- router.push("/log-in");
30
- } else if (typeof window !== "undefined") {
31
- window.location.href = "/log-in";
32
- }
33
- };
34
- var logOut_default = logOut;
35
- var AddEmailMutation = gql`
36
- mutation AddEmail($email: String!, $userId: ID) {
37
- addEmail(email: $email, userId: $userId) {
38
- _id
39
- }
40
- }
41
- `;
42
- var useAddEmail = () => {
43
- const [addEmailMutation] = useMutation(AddEmailMutation);
44
- const addEmail = async ({ email, userId }) => {
45
- return addEmailMutation({
46
- variables: { email, userId },
47
- refetchQueries: ["UserPermissions", "User", "CurrentUser"]
48
- });
49
- };
50
- return {
51
- addEmail
52
- };
53
- };
54
- var useAddEmail_default = useAddEmail;
55
- var AddWeb3AddressMutation = gql`
56
- mutation AddWeb3Address($address: String!) {
57
- addWeb3Address(address: $address) {
58
- ...UserFragment
59
- }
60
- }
61
- ${UserFragment_default}
62
- `;
63
- var useAddWeb3Address = () => {
64
- const [addWeb3AddressMutation] = useMutation(AddWeb3AddressMutation);
65
- const addWeb3Address = async ({
66
- address
67
- }) => {
68
- return addWeb3AddressMutation({
69
- variables: {
70
- address
71
- }
72
- });
73
- };
74
- return {
75
- addWeb3Address
76
- };
77
- };
78
- var useAddWeb3Address_default = useAddWeb3Address;
79
- var AddWebAuthnCredentialsMutation = gql`
80
- mutation AddWebAuthnCredentials($credentials: JSON!) {
81
- addWebAuthnCredentials(credentials: $credentials) {
82
- ...UserFragment
83
- webAuthnCredentials {
84
- _id
85
- created
86
- aaguid
87
- counter
88
- mdsMetadata {
89
- ...MD5MetaDataFragment
90
- }
91
- }
92
- }
93
- }
94
- ${UserFragment_default}
95
- ${MD5MetaDataFragment_default}
96
- `;
97
- var useAddWebAuthnCredentials = () => {
98
- const [addWebAuthnCredentialsMutation] = useMutation(AddWebAuthnCredentialsMutation);
99
- const addWebAuthnCredentials = async ({
100
- credentials
101
- }) => {
102
- return addWebAuthnCredentialsMutation({
103
- variables: { credentials }
104
- });
105
- };
106
- return {
107
- addWebAuthnCredentials
108
- };
109
- };
110
- var useAddWebAuthnCredentials_default = useAddWebAuthnCredentials;
111
- var BulkUpdateUserTagsMutation = gql`
112
- mutation BulkUpdateUserTags(
113
- $userIds: [ID!]!
114
- $add: [LowerCaseString!]
115
- $remove: [LowerCaseString!]
116
- ) {
117
- bulkUpdateUserTags(userIds: $userIds, add: $add, remove: $remove) {
118
- successCount
119
- failedCount
120
- failedIds
121
- }
122
- }
123
- `;
124
- var BulkRemoveUsersMutation = gql`
125
- mutation BulkRemoveUsers($userIds: [ID!]!) {
126
- bulkRemoveUsers(userIds: $userIds) {
127
- successCount
128
- failedCount
129
- failedIds
130
- }
131
- }
132
- `;
133
- var BulkSetUserRolesMutation = gql`
134
- mutation BulkSetUserRoles($userIds: [ID!]!, $roles: [String!]!) {
135
- bulkSetUserRoles(userIds: $userIds, roles: $roles) {
136
- successCount
137
- failedCount
138
- failedIds
139
- }
140
- }
141
- `;
142
- var refetchQueries = ["Users", "UsersCount"];
143
- var setRolesRefetchQueries = [...refetchQueries, "CurrentUser"];
144
- var useBulkUserOperations = () => {
145
- const [bulkUpdateTagsMutation] = useMutation(BulkUpdateUserTagsMutation);
146
- const [bulkRemoveMutation] = useMutation(BulkRemoveUsersMutation);
147
- const [bulkSetRolesMutation] = useMutation(BulkSetUserRolesMutation);
148
- return {
149
- bulkUpdateUserTags: (userIds, add, remove) => bulkUpdateTagsMutation({
150
- variables: { userIds, add, remove },
151
- refetchQueries,
152
- awaitRefetchQueries: true
153
- }),
154
- bulkRemoveUsers: (userIds) => bulkRemoveMutation({
155
- variables: { userIds },
156
- refetchQueries,
157
- awaitRefetchQueries: true
158
- }),
159
- bulkSetUserRoles: (userIds, roles) => bulkSetRolesMutation({
160
- variables: { userIds, roles },
161
- refetchQueries: setRolesRefetchQueries,
162
- awaitRefetchQueries: true
163
- })
164
- };
165
- };
166
- var useBulkUserOperations_default = useBulkUserOperations;
167
- var ChangePasswordMutation = gql`
168
- mutation ChangePassword($oldPassword: String!, $newPassword: String!) {
169
- changePassword(oldPassword: $oldPassword, newPassword: $newPassword) {
170
- success
171
- }
172
- }
173
- `;
174
- var useChangePassword = () => {
175
- const [changePasswordMutation] = useMutation(ChangePasswordMutation);
176
- const changePassword = async ({
177
- oldPassword = void 0,
178
- newPassword = void 0
179
- }) => {
180
- return changePasswordMutation({
181
- variables: { oldPassword, newPassword }
182
- });
183
- };
184
- return {
185
- changePassword
186
- };
187
- };
188
- var useChangePassword_default = useChangePassword;
189
- var CreateUserMutation = gql`
190
- mutation CreateUser(
191
- $username: String
192
- $email: String
193
- $plainPassword: String
194
- $profile: UserProfileInput
195
- $webAuthnPublicKeyCredentials: JSON
196
- ) {
197
- createUser(
198
- username: $username
199
- email: $email
200
- password: $plainPassword
201
- profile: $profile
202
- webAuthnPublicKeyCredentials: $webAuthnPublicKeyCredentials
203
- ) {
204
- _id
205
- tokenExpires
206
- }
207
- }
208
- `;
209
- var useCreateUser = () => {
210
- const [createUserMutation, { data, error, loading, client }] = useMutation(CreateUserMutation);
211
- const createUser = async ({
212
- username,
213
- email,
214
- plainPassword,
215
- profile,
216
- webAuthnPublicKeyCredentials
217
- }) => {
218
- const variables = {
219
- username: null,
220
- email: null,
221
- profile,
222
- plainPassword: null,
223
- webAuthnPublicKeyCredentials
224
- };
225
- if (email) {
226
- variables.email = email;
227
- }
228
- if (username) {
229
- variables.username = username;
230
- }
231
- variables.plainPassword = plainPassword;
232
- const result = await createUserMutation({
233
- variables,
234
- refetchQueries: ["Users", "ShopStatus", "ShopInfo"]
235
- });
236
- await client.resetStore();
237
- return result;
238
- };
239
- const newUser = data?.createUser;
240
- return {
241
- createUser,
242
- newUser,
243
- error,
244
- loading
245
- };
246
- };
247
- var useCreateUser_default = useCreateUser;
248
- var CreateWebAuthnCredentialCreationOptionsMutation = gql`
249
- mutation CreateWebAuthnCredentialCreationOptions($username: String!) {
250
- createWebAuthnCredentialCreationOptions(username: $username)
251
- }
252
- `;
253
- var useCreateWebAuthnCredentialCreationOptions = () => {
254
- const [createWebAuthnCredentialCreationOptionsMutation] = useMutation(CreateWebAuthnCredentialCreationOptionsMutation);
255
- const createWebAuthnCredentialCreationOptions = async ({
256
- username
257
- }) => {
258
- return createWebAuthnCredentialCreationOptionsMutation({
259
- variables: { username }
260
- });
261
- };
262
- return { createWebAuthnCredentialCreationOptions };
263
- };
264
- var useCreateWebAuthnCredentialCreationOptions_default = useCreateWebAuthnCredentialCreationOptions;
265
- var CreateWebAuthnCredentialRequestOptionsMutation = gql`
266
- mutation CreateWebAuthnCredentialRequestOptions($username: String) {
267
- createWebAuthnCredentialRequestOptions(username: $username)
268
- }
269
- `;
270
- var useCreateWebAuthnCredentialRequestOptions = () => {
271
- const [createWebAuthnCredentialRequestOptionsMutation] = useMutation(CreateWebAuthnCredentialRequestOptionsMutation);
272
- const createWebAuthnCredentialRequestOptions = async ({
273
- username
274
- }) => {
275
- return createWebAuthnCredentialRequestOptionsMutation({
276
- variables: { username }
277
- });
278
- };
279
- return { createWebAuthnCredentialRequestOptions };
280
- };
281
- var useCreateWebAuthnCredentialRequestOptions_default = useCreateWebAuthnCredentialRequestOptions;
282
- var DeleteUserMutation = gql`
283
- mutation DeleteUser($userId: ID) {
284
- removeUser(userId: $userId) {
285
- _id
286
- }
287
- }
288
- `;
289
- var useDeleteUser = () => {
290
- const [deleteUserMutation] = useMutation(DeleteUserMutation);
291
- const deleteUser = async (userId = void 0) => {
292
- return deleteUserMutation({
293
- variables: {
294
- userId
295
- }
296
- });
297
- };
298
- return {
299
- deleteUser
300
- };
301
- };
302
- var useDeleteUser_default = useDeleteUser;
303
- var EnrollUserMutation = gql`
304
- mutation EnrollUser(
305
- $email: String!
306
- $plainPassword: String
307
- $profile: UserProfileInput!
308
- ) {
309
- enrollUser(email: $email, password: $plainPassword, profile: $profile) {
310
- _id
311
- }
312
- }
313
- `;
314
- var useEnrollUser = () => {
315
- const [enrollUserMutation, { data, error, loading }] = useMutation(EnrollUserMutation);
316
- const enrollUser = async ({ email, password, profile }) => {
317
- const variables = {
318
- email,
319
- profile,
320
- plainPassword: null
321
- };
322
- variables.plainPassword = password;
323
- return enrollUserMutation({
324
- variables,
325
- refetchQueries: ["Users"]
326
- });
327
- };
328
- const newUser = data?.enrollUser;
329
- return {
330
- enrollUser,
331
- newUser,
332
- error,
333
- loading
334
- };
335
- };
336
- var useEnrollUser_default = useEnrollUser;
337
- var ForgotPasswordMutation = gql`
338
- mutation ForgotPassword($email: String!) {
339
- forgotPassword(email: $email) {
340
- success
341
- }
342
- }
343
- `;
344
- var useForgotPassword = () => {
345
- const [forgotPasswordMutation] = useMutation(ForgotPasswordMutation);
346
- const forgotPassword = async ({
347
- email
348
- }) => {
349
- return forgotPasswordMutation({
350
- variables: { email }
351
- });
352
- };
353
- return {
354
- forgotPassword
355
- };
356
- };
357
- var useForgotPassword_default = useForgotPassword;
358
-
359
- // src/modules/common/utils/base64ToArrayBuffer.ts
360
- var base64ToArrayBuffer = (b64) => {
361
- if (window.atob && Uint8Array) {
362
- const base64 = b64.replace(/-/g, "+").replace(/_/g, "/");
363
- const padded = base64 + "=".repeat((4 - base64.length % 4) % 4);
364
- const binaryString = window.atob(padded);
365
- const len = binaryString.length;
366
- const bytes = new Uint8Array(len);
367
- for (let i = 0; i < len; i += 1) {
368
- bytes[i] = binaryString.charCodeAt(i);
369
- }
370
- return bytes.buffer;
371
- }
372
- throw new Error("The atob and Uint8Array methods are not available");
373
- };
374
- var base64ToArrayBuffer_default = base64ToArrayBuffer;
375
-
376
- // src/modules/accounts/hooks/useGenerateLoginCredentials.ts
377
- var arrayBufferToBase64url = (buffer) => {
378
- const bytes = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer);
379
- const base64 = window.btoa(String.fromCharCode(...bytes));
380
- return base64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
381
- };
382
- var useGenerateLoginCredentials = () => {
383
- const { createWebAuthnCredentialRequestOptions } = useCreateWebAuthnCredentialRequestOptions_default();
384
- const generateLoginCredentials = async ({ username }) => {
385
- const { data } = await createWebAuthnCredentialRequestOptions({
386
- username
387
- });
388
- const publicKey = data?.createWebAuthnCredentialRequestOptions;
389
- if (!publicKey?.allowCredentials?.length) return null;
390
- const preparedKey = {
391
- challenge: base64ToArrayBuffer_default(publicKey.challenge),
392
- allowCredentials: publicKey.allowCredentials?.map(({ id: id2, type, ...rest }) => ({
393
- id: base64ToArrayBuffer_default(id2),
394
- type: type || "public-key",
395
- ...rest
396
- })) || []
397
- };
398
- const PublicKeyCredentials = await navigator.credentials.get({
399
- publicKey: preparedKey
400
- });
401
- if (!PublicKeyCredentials) return null;
402
- const response = PublicKeyCredentials.response;
403
- const authenticatorData = arrayBufferToBase64url(
404
- response.authenticatorData
405
- );
406
- const signature = arrayBufferToBase64url(response.signature);
407
- const userHandle = response.userHandle ? arrayBufferToBase64url(response.userHandle) : arrayBufferToBase64url(new TextEncoder().encode(username));
408
- const clientDataJSON = arrayBufferToBase64url(response.clientDataJSON);
409
- const id = arrayBufferToBase64url(PublicKeyCredentials.rawId);
410
- return {
411
- requestId: publicKey.requestId,
412
- id,
413
- response: {
414
- clientDataJSON,
415
- authenticatorData,
416
- signature,
417
- userHandle
418
- }
419
- };
420
- };
421
- return { generateLoginCredentials };
422
- };
423
- var useGenerateLoginCredentials_default = useGenerateLoginCredentials;
424
-
425
- // src/modules/accounts/hooks/useGenerateWebAuthCredentials.ts
426
- var arrayBufferToBase64url2 = (buffer) => {
427
- const base64 = window.btoa(String.fromCharCode(...new Uint8Array(buffer)));
428
- return base64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
429
- };
430
- var useGenerateWebAuthCredentials = () => {
431
- const { createWebAuthnCredentialCreationOptions } = useCreateWebAuthnCredentialCreationOptions_default();
432
- const generateWebAuthCredentials = async ({ username }) => {
433
- const { data } = await createWebAuthnCredentialCreationOptions({
434
- username
435
- });
436
- const options = data.createWebAuthnCredentialCreationOptions;
437
- const textEncoder = new TextEncoder();
438
- const publicKey = {
439
- ...options,
440
- challenge: base64ToArrayBuffer_default(options.challenge),
441
- user: {
442
- id: textEncoder.encode(username),
443
- name: username,
444
- displayName: username
445
- }
446
- };
447
- const publicKeyCredentials = await navigator.credentials.create({
448
- publicKey
449
- });
450
- if (!publicKeyCredentials) return null;
451
- const response = publicKeyCredentials.response;
452
- const attestationObject = arrayBufferToBase64url2(
453
- response.attestationObject
454
- );
455
- const clientDataJSON = arrayBufferToBase64url2(response.clientDataJSON);
456
- const rawId = arrayBufferToBase64url2(publicKeyCredentials.rawId);
457
- const authenticatorData = response.getAuthenticatorData ? arrayBufferToBase64url2(response.getAuthenticatorData()) : "";
458
- const responsePublicKey = response.getPublicKey ? arrayBufferToBase64url2(response.getPublicKey()) : "";
459
- const publicKeyAlgorithm = response.getPublicKeyAlgorithm ? response.getPublicKeyAlgorithm() : -7;
460
- const transports = response.getTransports ? response.getTransports() : ["internal"];
461
- return {
462
- id: rawId,
463
- rawId,
464
- response: {
465
- clientDataJSON,
466
- attestationObject,
467
- authenticatorData,
468
- publicKey: responsePublicKey,
469
- publicKeyAlgorithm,
470
- transports
471
- },
472
- authenticatorAttachment: publicKeyCredentials.authenticatorAttachment || "platform",
473
- clientExtensionResults: publicKeyCredentials.getClientExtensionResults?.() || {},
474
- type: "public-key",
475
- user: {
476
- id: username,
477
- name: username,
478
- displayName: username
479
- }
480
- };
481
- };
482
- return { generateWebAuthCredentials };
483
- };
484
- var useGenerateWebAuthCredentials_default = useGenerateWebAuthCredentials;
485
-
486
- // src/modules/common/utils/isEmail.ts
487
- var regexExp = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z]{2,})+$/i;
488
- var isEmail = (str) => typeof str === "string" && regexExp.test(str.trim());
489
- var isEmail_default = isEmail;
490
-
491
- // src/modules/accounts/hooks/useLoginWithPassword.ts
492
- var LogInWithPasswordMutation = gql`
493
- mutation LoginWithPassword(
494
- $username: String
495
- $email: String
496
- $password: String!
497
- ) {
498
- loginWithPassword(username: $username, email: $email, password: $password) {
499
- _id
500
- tokenExpires
501
- user {
502
- _id
503
- allowedActions
504
- roles
505
- }
506
- }
507
- }
508
- `;
509
- var useLoginWithPassword = () => {
510
- const [logInWithPasswordMutation, { client }] = useMutation(LogInWithPasswordMutation, {
511
- errorPolicy: "all"
512
- });
513
- const logInWithPassword = async ({ usernameOrEmail, password }) => {
514
- const variables = {
515
- username: null,
516
- email: null,
517
- password: null
518
- };
519
- if (isEmail_default(usernameOrEmail)) {
520
- const normalizedEmail = usernameOrEmail?.trim();
521
- variables.email = normalizedEmail;
522
- } else {
523
- variables.username = usernameOrEmail;
524
- }
525
- variables.password = password;
526
- const result = await logInWithPasswordMutation({
527
- variables,
528
- awaitRefetchQueries: true
529
- });
530
- if (result?.data?.loginWithPassword) {
531
- await client.resetStore();
532
- }
533
- return result;
534
- };
535
- return {
536
- logInWithPassword
537
- };
538
- };
539
- var useLoginWithPassword_default = useLoginWithPassword;
540
- var LogWithWebAuthnMutation = gql`
541
- mutation LoginWithWebAuthn($webAuthnPublicKeyCredentials: JSON!) {
542
- loginWithWebAuthn(
543
- webAuthnPublicKeyCredentials: $webAuthnPublicKeyCredentials
544
- ) {
545
- _id
546
- tokenExpires
547
- }
548
- }
549
- `;
550
- var useLoginWithWebAuthn = () => {
551
- const [loginWithWebAuthnMutation, { client }] = useMutation(LogWithWebAuthnMutation);
552
- const loginWithWebAuthn = async ({
553
- webAuthnPublicKeyCredentials
554
- }) => {
555
- const result = await loginWithWebAuthnMutation({
556
- variables: { webAuthnPublicKeyCredentials },
557
- awaitRefetchQueries: true
558
- });
559
- await client.resetStore();
560
- return result;
561
- };
562
- return { loginWithWebAuthn };
563
- };
564
- var useLoginWithWebAuthn_default = useLoginWithWebAuthn;
565
- var LogoutAllSessionsMutation = gql`
566
- mutation LogoutAllSessions($userId: ID) {
567
- logoutAllSessions(userId: $userId) {
568
- success
569
- }
570
- }
571
- `;
572
- var useLogoutAllSessions = () => {
573
- const [logoutAllSessionsMutation] = useMutation(LogoutAllSessionsMutation);
574
- const logoutAllSessions = async ({ userId } = {}) => {
575
- return logoutAllSessionsMutation({ variables: { userId } });
576
- };
577
- return {
578
- logoutAllSessions
579
- };
580
- };
581
- var useLogoutAllSessions_default = useLogoutAllSessions;
582
- var RemoveBookmarkMutation = gql`
583
- mutation RemoveBookmark($bookmarkId: ID!) {
584
- removeBookmark(bookmarkId: $bookmarkId) {
585
- _id
586
- }
587
- }
588
- `;
589
- var useRemoveBookmark = () => {
590
- const [removeBookmarkMutation] = useMutation(RemoveBookmarkMutation);
591
- const removeBookmark = async (bookmarkId) => {
592
- return removeBookmarkMutation({
593
- variables: {
594
- bookmarkId
595
- },
596
- refetchQueries: ["UserBookmarks"]
597
- });
598
- };
599
- return {
600
- removeBookmark
601
- };
602
- };
603
- var useRemoveBookmark_default = useRemoveBookmark;
604
- var RemoveEmailMutation = gql`
605
- mutation RemoveEmail($email: String!, $userId: ID) {
606
- removeEmail(email: $email, userId: $userId) {
607
- _id
608
- }
609
- }
610
- `;
611
- var useRemoveEmail = () => {
612
- const [removeEmailMutation] = useMutation(RemoveEmailMutation);
613
- const removeEmail = async ({
614
- email,
615
- userId
616
- }) => {
617
- return removeEmailMutation({
618
- variables: {
619
- email,
620
- userId
621
- },
622
- refetchQueries: ["UserPermissions", "User", "CurrentUser"]
623
- });
624
- };
625
- return {
626
- removeEmail
627
- };
628
- };
629
- var useRemoveEmail_default = useRemoveEmail;
630
- var RemoveWeb3AddressMutation = gql`
631
- mutation RemoveWeb3Address($address: String!) {
632
- removeWeb3Address(address: $address) {
633
- ...UserFragment
634
- }
635
- }
636
- ${UserFragment_default}
637
- `;
638
- var useRemoveWeb3Address = () => {
639
- const [removeWeb3AddressMutation] = useMutation(RemoveWeb3AddressMutation);
640
- const removeWeb3Address = async ({
641
- address
642
- }) => {
643
- return removeWeb3AddressMutation({
644
- variables: {
645
- address
646
- }
647
- });
648
- };
649
- return {
650
- removeWeb3Address
651
- };
652
- };
653
- var useRemoveWeb3Address_default = useRemoveWeb3Address;
654
- var RemoveWebAuthCredentialsMutation = gql`
655
- mutation removeWebAuthCredentials($credentialsId: ID!) {
656
- removeWebAuthnCredentials(credentialsId: $credentialsId) {
657
- ...UserFragment
658
- }
659
- }
660
- ${UserFragment_default}
661
- `;
662
- var useRemoveWebAuthCredentials = () => {
663
- const [removeWebAuthCredentialsMutation] = useMutation(RemoveWebAuthCredentialsMutation);
664
- const removeWebAuthCredentials = async ({
665
- credentialsId
666
- }) => {
667
- return removeWebAuthCredentialsMutation({
668
- variables: { credentialsId }
669
- });
670
- };
671
- return {
672
- removeWebAuthCredentials
673
- };
674
- };
675
- var useRemoveWebAuthCredentials_default = useRemoveWebAuthCredentials;
676
- var ResetPasswordMutation = gql`
677
- mutation ResetPassword($newPlainPassword: String!, $token: String!) {
678
- resetPassword(newPassword: $newPlainPassword, token: $token) {
679
- _id
680
- tokenExpires
681
- }
682
- }
683
- `;
684
- var useResetPassword = () => {
685
- const [resetPasswordMutation, { client }] = useMutation(ResetPasswordMutation);
686
- const resetPassword = async ({
687
- newPlainPassword,
688
- token
689
- }) => {
690
- const variables = {
691
- token,
692
- newPlainPassword: null
693
- };
694
- variables.newPlainPassword = newPlainPassword;
695
- const result = await resetPasswordMutation({
696
- variables,
697
- awaitRefetchQueries: true
698
- });
699
- await client.resetStore();
700
- return result;
701
- };
702
- return {
703
- resetPassword
704
- };
705
- };
706
- var useResetPassword_default = useResetPassword;
707
- var SendVerificationEmailMutation = gql`
708
- mutation SendVerificationEmail($email: String) {
709
- sendVerificationEmail(email: $email) {
710
- success
711
- }
712
- }
713
- `;
714
- var useSendVerificationEmail = () => {
715
- const [sendVerificationEmailMutation] = useMutation(SendVerificationEmailMutation);
716
- const sendVerificationEmail = async ({
717
- email
718
- }) => {
719
- return sendVerificationEmailMutation({
720
- variables: { email }
721
- });
722
- };
723
- return {
724
- sendVerificationEmail
725
- };
726
- };
727
- var useSendVerificationEmail_default = useSendVerificationEmail;
728
- var SetPasswordMutation = gql`
729
- mutation SetPassword($newPlainPassword: String!, $userId: ID!) {
730
- setPassword(newPassword: $newPlainPassword, userId: $userId) {
731
- _id
732
- }
733
- }
734
- `;
735
- var useSetPassword = () => {
736
- const [setPasswordMutation] = useMutation(SetPasswordMutation);
737
- const setPassword = async ({
738
- newPlainPassword = void 0,
739
- userId
740
- }) => {
741
- const variables = { newPlainPassword, userId };
742
- return setPasswordMutation({
743
- variables,
744
- refetchQueries: ["UserPermissions", "User", "CurrentUser"]
745
- });
746
- };
747
- return {
748
- setPassword
749
- };
750
- };
751
- var useSetPassword_default = useSetPassword;
752
- var SetRoleMutation = gql`
753
- mutation SetRoles($roles: [String!]!, $userId: ID!) {
754
- setRoles(roles: $roles, userId: $userId) {
755
- _id
756
- }
757
- }
758
- `;
759
- var useSetRoles = () => {
760
- const [setRoleMutation] = useMutation(SetRoleMutation);
761
- const setRoles = async ({
762
- roles = [],
763
- userId = null
764
- }) => {
765
- return setRoleMutation({
766
- variables: {
767
- roles,
768
- userId
769
- },
770
- refetchQueries: ["UserPermissions", "User", "CurrentUser"]
771
- });
772
- };
773
- return {
774
- setRoles
775
- };
776
- };
777
- var useSetRoles_default = useSetRoles;
778
- var SetUserTagsMutation = gql`
779
- mutation SetUserTags($tags: [LowerCaseString]!, $userId: ID!) {
780
- setUserTags(tags: $tags, userId: $userId) {
781
- _id
782
- tags
783
- }
784
- }
785
- `;
786
- var useSetUserTags = () => {
787
- const [setUserTagsMutation] = useMutation(SetUserTagsMutation);
788
- const setUserTags = async ({
789
- tags = [],
790
- userId = null
791
- }) => {
792
- return setUserTagsMutation({
793
- variables: {
794
- tags,
795
- userId
796
- },
797
- refetchQueries: [
798
- "Users",
799
- "UserPermissions",
800
- "User",
801
- "CurrentUser",
802
- "ShopStatus",
803
- "ShopInfo"
804
- ]
805
- });
806
- };
807
- return {
808
- setUserTags
809
- };
810
- };
811
- var useSetUserTags_default = useSetUserTags;
812
- var SetUserNameMutation = gql`
813
- mutation SetUsername($username: String!, $userId: ID!) {
814
- setUsername(username: $username, userId: $userId) {
815
- _id
816
- }
817
- }
818
- `;
819
- var useSetUserName = () => {
820
- const [setUserNameMutation] = useMutation(SetUserNameMutation);
821
- const setUserName = async ({
822
- username,
823
- userId
824
- }) => {
825
- return setUserNameMutation({
826
- variables: {
827
- username,
828
- userId
829
- },
830
- refetchQueries: ["UserPermissions", "User", "CurrentUser"]
831
- });
832
- };
833
- return {
834
- setUserName
835
- };
836
- };
837
- var useSetUsername_default = useSetUserName;
838
- var PrepareUserAvatarUploadMutation = gql`
839
- mutation PrepareUserAvatarUpload($mediaName: String!, $userId: ID) {
840
- prepareUserAvatarUpload(mediaName: $mediaName, userId: $userId) {
841
- _id
842
- putURL
843
- expires
844
- }
845
- }
846
- `;
847
- var useUpdateUserAvatar = () => {
848
- const [prepareUserAvatarUploadMutation] = useMutation(PrepareUserAvatarUploadMutation);
849
- const { confirmMediaUpload } = useConfirmMediaUpload_default({
850
- refetchQueries: ["User", "CurrentUser"]
851
- });
852
- const updateUserAvatar = async ({ avatar, userId = null }) => {
853
- const { data } = await prepareUserAvatarUploadMutation({
854
- variables: {
855
- mediaName: avatar.name,
856
- userId
857
- }
858
- });
859
- const { prepareUserAvatarUpload } = data;
860
- await PUTMedia_default(avatar, prepareUserAvatarUpload.putURL);
861
- await confirmMediaUpload({
862
- mediaUploadTicketId: prepareUserAvatarUpload._id,
863
- size: avatar.size,
864
- type: avatar.type
865
- });
866
- };
867
- return {
868
- updateUserAvatar
869
- };
870
- };
871
- var useUpdateUserAvatar_default = useUpdateUserAvatar;
872
- var UpdateUserProfileMutation = gql`
873
- mutation UpdateUserProfile($profile: UserProfileInput!, $userId: ID) {
874
- updateUserProfile(profile: $profile, userId: $userId) {
875
- _id
876
- }
877
- }
878
- `;
879
- var useUpdateUserProfile = () => {
880
- const [updateUserProfileMutation] = useMutation(UpdateUserProfileMutation);
881
- const updateUserProfile = async ({
882
- profile,
883
- userId = null
884
- }) => {
885
- return updateUserProfileMutation({
886
- variables: {
887
- profile,
888
- userId
889
- },
890
- refetchQueries: ["UserPermissions", "User", "CurrentUser"]
891
- });
892
- };
893
- return {
894
- updateUserProfile
895
- };
896
- };
897
- var useUpdateUserProfile_default = useUpdateUserProfile;
898
- var GetUserPermissionsQuery = gql`
899
- query UserPermissions($userId: ID!) {
900
- user(userId: $userId) {
901
- _id
902
- viewerAllowedActions
903
- }
904
- }
905
- `;
906
- var GetUserQuery = (inlineFragment = "") => gql`
907
- query User(
908
- $userId: ID!
909
- $includePrivateInfos: Boolean!
910
- $includeRoles: Boolean!
911
- $includeOrders: Boolean!
912
- ) {
913
- user(userId: $userId) {
914
- _id
915
- name
916
- avatar {
917
- _id
918
- name
919
- size
920
- type
921
- url
922
- }
923
- ... @include(if: $includePrivateInfos) {
924
- ${inlineFragment}
925
- lastBillingAddress {
926
- firstName
927
- lastName
928
- company
929
- addressLine
930
- addressLine2
931
- postalCode
932
- countryCode
933
- regionCode
934
- city
935
- }
936
- lastContact {
937
- emailAddress
938
- telNumber
939
- }
940
- lastLogin {
941
- countryCode
942
- locale
943
- remoteAddress
944
- remotePort
945
- timestamp
946
- userAgent
947
- }
948
- paymentCredentials {
949
- _id
950
- isValid
951
- isPreferred
952
- paymentProvider {
953
- _id
954
- type
955
- interface {
956
- _id
957
- label
958
- version
959
- }
960
- }
961
- }
962
- emails {
963
- verified
964
- address
965
- }
966
- web3Addresses {
967
- address
968
- nonce
969
- verified
970
- }
971
- webAuthnCredentials {
972
- _id
973
- created
974
- aaguid
975
- counter
976
- mdsMetadata {
977
- ...MD5MetaDataFragment
978
- }
979
- }
980
- profile {
981
- displayName
982
- phoneMobile
983
- gender
984
- address {
985
- firstName
986
- lastName
987
- company
988
- addressLine
989
- addressLine2
990
- postalCode
991
- countryCode
992
- regionCode
993
- city
994
- }
995
- birthday
996
- }
997
- username
998
- primaryEmail {
999
- verified
1000
- address
1001
- }
1002
- isGuest
1003
- isInitialPassword
1004
- tags
1005
- deleted
1006
- }
1007
- ... @include(if: $includeRoles) {
1008
- roles
1009
- }
1010
- ... @include(if: $includeOrders) {
1011
- cart {
1012
- _id
1013
- items {
1014
- _id
1015
- }
1016
- }
1017
- orders {
1018
- _id
1019
- items {
1020
- _id
1021
- }
1022
- }
1023
- }
1024
- }
1025
- }
1026
- ${MD5MetaDataFragment_default}
1027
- `;
1028
- var useUser = ({ userId = null } = {}) => {
1029
- const { customProperties, hydrateFragment } = useUnchainedContext_default();
1030
- const skip = !userId;
1031
- const {
1032
- data: permissionsData,
1033
- loading: permissionsLoading,
1034
- error: permissionsError
1035
- } = useQuery(
1036
- GetUserPermissionsQuery,
1037
- {
1038
- skip,
1039
- variables: { userId },
1040
- fetchPolicy: "network-only"
1041
- }
1042
- );
1043
- const permissionTarget = permissionsData?.user?._id === userId ? permissionsData.user : null;
1044
- const viewerAllowedActions = permissionTarget?.viewerAllowedActions;
1045
- const hasPermission = (action) => viewerAllowedActions?.includes(action) ?? false;
1046
- const {
1047
- data: userData,
1048
- loading: userLoading,
1049
- error: userError
1050
- } = useQuery(
1051
- GetUserQuery(customProperties?.User),
1052
- {
1053
- skip: skip || !permissionTarget,
1054
- variables: {
1055
- userId,
1056
- includePrivateInfos: hasPermission("viewUserPrivateInfos" /* ViewUserPrivateInfos */),
1057
- includeRoles: hasPermission("viewUserRoles" /* ViewUserRoles */),
1058
- includeOrders: hasPermission("viewUserOrders" /* ViewUserOrders */)
1059
- }
1060
- }
1061
- );
1062
- const user = permissionTarget && userData?.user?._id === userId ? { ...permissionTarget, ...userData.user } : null;
1063
- const extendedData = hasPermission("viewUserPrivateInfos" /* ViewUserPrivateInfos */) ? hydrateFragment(customProperties?.User, user) : null;
1064
- return {
1065
- user,
1066
- loading: permissionsLoading || userLoading,
1067
- error: permissionsError || userError,
1068
- extendedData
1069
- };
1070
- };
1071
- var useUser_default = useUser;
1072
- var UserBookmarksQuery = gql`
1073
- query UserBookmarks($userId: ID!) {
1074
- user(userId: $userId) {
1075
- _id
1076
- bookmarks {
1077
- _id
1078
- created
1079
- product {
1080
- _id
1081
- texts {
1082
- _id
1083
- title
1084
- }
1085
- media {
1086
- _id
1087
- file {
1088
- _id
1089
- url
1090
- }
1091
- }
1092
- }
1093
- }
1094
- }
1095
- }
1096
- `;
1097
- var useUserBookmarks = ({ userId = null }) => {
1098
- const { data, loading, error } = useQuery(UserBookmarksQuery, {
1099
- skip: !userId,
1100
- variables: { userId }
1101
- });
1102
- const bookmarks = data?.user?.bookmarks || [];
1103
- return {
1104
- bookmarks,
1105
- loading,
1106
- error
1107
- };
1108
- };
1109
- var useUserBookmarks_default = useUserBookmarks;
1110
- var useUserExport = () => {
1111
- const { exportCSV, isExporting } = useCSVExport();
1112
- const exportUser = useCallback(
1113
- async (data) => {
1114
- await exportCSV({ type: "User", ...data });
1115
- },
1116
- [exportCSV]
1117
- );
1118
- return { exportUser, isExporting };
1119
- };
1120
- var UserWebAuthnCredentialsQuery = gql`
1121
- query UserWebAuthnCredentials($userId: ID!) {
1122
- user(userId: $userId) {
1123
- _id
1124
- webAuthnCredentials {
1125
- _id
1126
- created
1127
- aaguid
1128
- counter
1129
- mdsMetadata {
1130
- ...MD5MetaDataFragment
1131
- }
1132
- }
1133
- }
1134
- }
1135
- ${MD5MetaDataFragment_default}
1136
- `;
1137
- var useUserWebAuthnCredentials = ({
1138
- userId
1139
- }) => {
1140
- const { data, loading, error } = useQuery(UserWebAuthnCredentialsQuery, {
1141
- variables: { userId }
1142
- });
1143
- return {
1144
- webAuthnCredentials: data?.user?.webAuthnCredentials,
1145
- loading,
1146
- error
1147
- };
1148
- };
1149
- var useUserWebAuthnCredentials_default = useUserWebAuthnCredentials;
1150
- var UsersQuery = gql`
1151
- query Users(
1152
- $limit: Int
1153
- $offset: Int
1154
- $includeGuests: Boolean
1155
- $queryString: String
1156
- $lastLogin: DateFilterInput
1157
- $emailVerified: Boolean
1158
- $tags: [LowerCaseString!]
1159
- ) {
1160
- users(
1161
- limit: $limit
1162
- offset: $offset
1163
- includeGuests: $includeGuests
1164
- queryString: $queryString
1165
- lastLogin: $lastLogin
1166
- emailVerified: $emailVerified
1167
- tags: $tags
1168
- ) {
1169
- ...UserFragment
1170
- }
1171
- usersCount(
1172
- includeGuests: $includeGuests
1173
- queryString: $queryString
1174
- lastLogin: $lastLogin
1175
- emailVerified: $emailVerified
1176
- tags: $tags
1177
- )
1178
- }
1179
- ${UserFragment_default}
1180
- `;
1181
- var useUsers = ({
1182
- limit = 20,
1183
- offset = 0,
1184
- includeGuests = false,
1185
- queryString = null,
1186
- lastLogin = null,
1187
- emailVerified = null,
1188
- tags = null
1189
- }) => {
1190
- const { data, loading, error, fetchMore } = useQuery(UsersQuery, {
1191
- variables: {
1192
- limit,
1193
- offset,
1194
- includeGuests,
1195
- queryString,
1196
- lastLogin,
1197
- emailVerified,
1198
- tags
1199
- }
1200
- });
1201
- const users = data?.users || [];
1202
- const usersCount = data?.usersCount;
1203
- const hasMore = users?.length < usersCount;
1204
- const loadMore = () => {
1205
- fetchMore({
1206
- variables: { offset: users?.length }
1207
- });
1208
- };
1209
- return {
1210
- users,
1211
- usersCount,
1212
- hasMore,
1213
- loading,
1214
- error,
1215
- loadMore
1216
- };
1217
- };
1218
- var useUsers_default = useUsers;
1219
- var UsersCountQuery = gql`
1220
- query UsersCount(
1221
- $includeGuests: Boolean
1222
- $queryString: String
1223
- $lastLogin: DateFilterInput
1224
- $emailVerified: Boolean
1225
- ) {
1226
- usersCount(
1227
- includeGuests: $includeGuests
1228
- queryString: $queryString
1229
- lastLogin: $lastLogin
1230
- emailVerified: $emailVerified
1231
- )
1232
- }
1233
- `;
1234
- var useUsersCount = ({
1235
- includeGuests = false,
1236
- queryString = null,
1237
- lastLogin = null,
1238
- emailVerified = null
1239
- } = {}) => {
1240
- const { data, loading, error } = useQuery(UsersCountQuery, {
1241
- errorPolicy: "all",
1242
- variables: {
1243
- includeGuests,
1244
- queryString,
1245
- lastLogin,
1246
- emailVerified
1247
- }
1248
- });
1249
- return {
1250
- usersCount: data?.usersCount || 0,
1251
- loading,
1252
- error
1253
- };
1254
- };
1255
- var useUsersCount_default = useUsersCount;
1256
- var ValidateVerifyEmailToken = gql`
1257
- query ValidateVerifyEmailToken($token: String!) {
1258
- validateVerifyEmailToken(token: $token)
1259
- }
1260
- `;
1261
- var useValidateEmailVerificationToken = ({ token }) => {
1262
- const { data, loading, error, previousData } = useQuery(ValidateVerifyEmailToken, {
1263
- skip: !token,
1264
- variables: {
1265
- token
1266
- },
1267
- fetchPolicy: "network-only"
1268
- });
1269
- return {
1270
- loading,
1271
- error,
1272
- isValid: previousData?.validateVerifyEmailToken || data?.validateVerifyEmailToken
1273
- };
1274
- };
1275
- var useValidateEmailVerificationToken_default = useValidateEmailVerificationToken;
1276
- var VALIDATE_RESET_PASSWORD_TOKEN_QUERY = gql`
1277
- query ValidateResetPasswordToken($token: String!) {
1278
- validateResetPasswordToken(token: $token)
1279
- }
1280
- `;
1281
- var useValidateResetPasswordToken = ({ token }) => {
1282
- const { data, loading, error, previousData } = useQuery(VALIDATE_RESET_PASSWORD_TOKEN_QUERY, {
1283
- skip: !token,
1284
- variables: {
1285
- token
1286
- },
1287
- fetchPolicy: "network-only"
1288
- });
1289
- return {
1290
- loading,
1291
- error,
1292
- isValid: previousData?.validateResetPasswordToken || data?.validateResetPasswordToken
1293
- };
1294
- };
1295
- var useValidateResetPasswordToken_default = useValidateResetPasswordToken;
1296
- var VerifyEmailMutation = gql`
1297
- mutation VerifyEmail($token: String!) {
1298
- verifyEmail(token: $token) {
1299
- _id
1300
- tokenExpires
1301
- user {
1302
- ...UserFragment
1303
- }
1304
- }
1305
- }
1306
- ${UserFragment_default}
1307
- `;
1308
- var useVerifyEmail = () => {
1309
- const [verifyEmailMutation, { client }] = useMutation(VerifyEmailMutation);
1310
- const verifyEmail = async ({ token }) => {
1311
- const result = await verifyEmailMutation({
1312
- variables: { token }
1313
- });
1314
- await client.resetStore();
1315
- return result;
1316
- };
1317
- return {
1318
- verifyEmail
1319
- };
1320
- };
1321
- var useVerifyEmail_default = useVerifyEmail;
1322
- var VerifyWeb3AddressMutation = gql`
1323
- mutation VerifyWeb3Address($address: String!, $hash: String!) {
1324
- verifyWeb3Address(address: $address, hash: $hash) {
1325
- ...UserFragment
1326
- }
1327
- }
1328
- ${UserFragment_default}
1329
- `;
1330
- var useVerifyWeb3Address = () => {
1331
- const [verifyWeb3AddressMutation] = useMutation(VerifyWeb3AddressMutation);
1332
- const verifyWeb3Address = async ({
1333
- address,
1334
- hash
1335
- }) => {
1336
- return verifyWeb3AddressMutation({
1337
- variables: {
1338
- address,
1339
- hash
1340
- }
1341
- });
1342
- };
1343
- return {
1344
- verifyWeb3Address
1345
- };
1346
- };
1347
- var useVerifyWeb3Address_default = useVerifyWeb3Address;
1348
-
1349
- export { logOut_default as logOut, useAddEmail_default as useAddEmail, useAddWeb3Address_default as useAddWeb3Address, useAddWebAuthnCredentials_default as useAddWebAuthnCredentials, useBulkUserOperations_default as useBulkUserOperations, useChangePassword_default as useChangePassword, useCreateUser_default as useCreateUser, useCreateWebAuthnCredentialCreationOptions_default as useCreateWebAuthnCredentialCreationOptions, useCreateWebAuthnCredentialRequestOptions_default as useCreateWebAuthnCredentialRequestOptions, useDeleteUser_default as useDeleteUser, useEnrollUser_default as useEnrollUser, useForgotPassword_default as useForgotPassword, useGenerateLoginCredentials_default as useGenerateLoginCredentials, useGenerateWebAuthCredentials_default as useGenerateWebAuthCredentials, useLoginWithPassword_default as useLoginWithPassword, useLoginWithWebAuthn_default as useLoginWithWebAuthn, useLogoutAllSessions_default as useLogoutAllSessions, useRemoveBookmark_default as useRemoveBookmark, useRemoveEmail_default as useRemoveEmail, useRemoveWeb3Address_default as useRemoveWeb3Address, useRemoveWebAuthCredentials_default as useRemoveWebAuthCredentials, useResetPassword_default as useResetPassword, useSendVerificationEmail_default as useSendVerificationEmail, useSetPassword_default as useSetPassword, useSetRoles_default as useSetRoles, useSetUserTags_default as useSetUserTags, useSetUsername_default as useSetUsername, useUpdateUserAvatar_default as useUpdateUserAvatar, useUpdateUserProfile_default as useUpdateUserProfile, useUser_default as useUser, useUserBookmarks_default as useUserBookmarks, useUserExport, useUserWebAuthnCredentials_default as useUserWebAuthnCredentials, useUsers_default as useUsers, useUsersCount_default as useUsersCount, useValidateEmailVerificationToken_default as useValidateEmailVerificationToken, useValidateResetPasswordToken_default as useValidateResetPasswordToken, useVerifyEmail_default as useVerifyEmail, useVerifyWeb3Address_default as useVerifyWeb3Address };