@unchainedshop/admin-ui 4.8.32 → 4.9.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 (475) hide show
  1. package/dist/chunk-3L6EZQ6P.js +135 -0
  2. package/dist/chunk-54DKBWXV.js +33 -0
  3. package/dist/chunk-5WPFHQZN.js +388 -0
  4. package/dist/chunk-6UGLNLJG.js +44 -0
  5. package/dist/chunk-BMDNY67T.js +22547 -0
  6. package/dist/chunk-BOMSMJF2.js +77 -0
  7. package/dist/chunk-COV7BREX.js +50 -0
  8. package/dist/chunk-E77YIMGR.js +2083 -0
  9. package/dist/chunk-EJDZRZSZ.js +59 -0
  10. package/dist/chunk-ELPURWDC.js +75 -0
  11. package/dist/chunk-F6LBNV3H.js +9 -0
  12. package/dist/chunk-FDHXLNZQ.js +44 -0
  13. package/dist/chunk-GY2DRQGW.js +166 -0
  14. package/dist/chunk-HERLM47Z.js +309 -0
  15. package/dist/chunk-HJKRGBDG.js +694 -0
  16. package/dist/chunk-I64TXIE7.js +618 -0
  17. package/dist/chunk-IAQPLRXZ.js +16 -0
  18. package/dist/chunk-ICJH36K4.js +326 -0
  19. package/dist/chunk-ILYPJE4N.js +57 -0
  20. package/dist/chunk-IWKDBADX.js +73 -0
  21. package/dist/chunk-IXBMHOB5.js +13 -0
  22. package/dist/chunk-IYKPRAWC.js +26 -0
  23. package/dist/chunk-J23QSWDL.js +8 -0
  24. package/dist/chunk-KH5MK6ZW.js +18 -0
  25. package/dist/chunk-KRIRF7F6.js +76 -0
  26. package/dist/chunk-NT7RB7AK.js +70 -0
  27. package/dist/chunk-OKGJ6HDE.js +26 -0
  28. package/dist/chunk-OTXM2UCD.js +19 -0
  29. package/dist/chunk-PJLYVMUM.js +3308 -0
  30. package/dist/chunk-PUI5BIKO.js +41 -0
  31. package/dist/chunk-Q6S3LBUF.js +180 -0
  32. package/dist/chunk-QHR23GVH.js +1099 -0
  33. package/dist/chunk-QWQ3WJJN.js +1 -0
  34. package/dist/chunk-RAQV2GYF.js +70 -0
  35. package/dist/chunk-VBO377AY.js +14 -0
  36. package/dist/chunk-VYEXPG3M.js +107 -0
  37. package/dist/chunk-WPLOTFGW.js +36 -0
  38. package/dist/chunk-YO6PT7KD.js +13 -0
  39. package/dist/chunk-ZUOVKRKC.js +957 -0
  40. package/dist/components/ui/Accordion/Accordion.d.ts +11 -0
  41. package/dist/components/ui/Accordion/Accordion.d.ts.map +1 -0
  42. package/dist/components/ui/Accordion/AccordionHeader.d.ts +6 -0
  43. package/dist/components/ui/Accordion/AccordionHeader.d.ts.map +1 -0
  44. package/dist/components/ui/Accordion/AccordionItem.d.ts +11 -0
  45. package/dist/components/ui/Accordion/AccordionItem.d.ts.map +1 -0
  46. package/dist/components/ui/ActiveInActive.d.ts +10 -0
  47. package/dist/components/ui/ActiveInActive.d.ts.map +1 -0
  48. package/dist/components/ui/AnimatedCounter.d.ts +7 -0
  49. package/dist/components/ui/AnimatedCounter.d.ts.map +1 -0
  50. package/dist/components/ui/Badge.d.ts +10 -0
  51. package/dist/components/ui/Badge.d.ts.map +1 -0
  52. package/dist/components/ui/BreadCrumbs.d.ts +7 -0
  53. package/dist/components/ui/BreadCrumbs.d.ts.map +1 -0
  54. package/dist/components/ui/Button.d.ts +36 -0
  55. package/dist/components/ui/Button.d.ts.map +1 -0
  56. package/dist/components/ui/CopyableText.d.ts +5 -0
  57. package/dist/components/ui/CopyableText.d.ts.map +1 -0
  58. package/dist/components/ui/DateInput.d.ts +15 -0
  59. package/dist/components/ui/DateInput.d.ts.map +1 -0
  60. package/dist/components/ui/DateRangeFilterInput.d.ts +4 -0
  61. package/dist/components/ui/DateRangeFilterInput.d.ts.map +1 -0
  62. package/dist/components/ui/DetailHeader.d.ts +6 -0
  63. package/dist/components/ui/DetailHeader.d.ts.map +1 -0
  64. package/dist/components/ui/DraggableIcon.d.ts +3 -0
  65. package/dist/components/ui/DraggableIcon.d.ts.map +1 -0
  66. package/dist/components/ui/ErrorBoundary.d.ts +18 -0
  67. package/dist/components/ui/ErrorBoundary.d.ts.map +1 -0
  68. package/dist/components/ui/ErrorFallback.d.ts +6 -0
  69. package/dist/components/ui/ErrorFallback.d.ts.map +1 -0
  70. package/dist/components/ui/HelpText.d.ts +11 -0
  71. package/dist/components/ui/HelpText.d.ts.map +1 -0
  72. package/dist/components/ui/ImageWithFallback.d.ts +7 -0
  73. package/dist/components/ui/ImageWithFallback.d.ts.map +1 -0
  74. package/dist/components/ui/InfoTextBanner.d.ts +6 -0
  75. package/dist/components/ui/InfoTextBanner.d.ts.map +1 -0
  76. package/dist/components/ui/JSONView.d.ts +6 -0
  77. package/dist/components/ui/JSONView.d.ts.map +1 -0
  78. package/dist/components/ui/ListHeader.d.ts +6 -0
  79. package/dist/components/ui/ListHeader.d.ts.map +1 -0
  80. package/dist/components/ui/Loading.d.ts +10 -0
  81. package/dist/components/ui/Loading.d.ts.map +1 -0
  82. package/dist/components/ui/NoData.d.ts +7 -0
  83. package/dist/components/ui/NoData.d.ts.map +1 -0
  84. package/dist/components/ui/NoImage.d.ts +7 -0
  85. package/dist/components/ui/NoImage.d.ts.map +1 -0
  86. package/dist/components/ui/NoImageSvg.d.ts +8 -0
  87. package/dist/components/ui/NoImageSvg.d.ts.map +1 -0
  88. package/dist/components/ui/PageHeader.d.ts +11 -0
  89. package/dist/components/ui/PageHeader.d.ts.map +1 -0
  90. package/dist/components/ui/Pagination.d.ts +8 -0
  91. package/dist/components/ui/Pagination.d.ts.map +1 -0
  92. package/dist/components/ui/Portal/Portal.d.ts +16 -0
  93. package/dist/components/ui/Portal/Portal.d.ts.map +1 -0
  94. package/dist/components/ui/Portal/Portal.types.d.ts +16 -0
  95. package/dist/components/ui/Portal/Portal.types.d.ts.map +1 -0
  96. package/dist/components/ui/SaveAndCancelButtons.d.ts +10 -0
  97. package/dist/components/ui/SaveAndCancelButtons.d.ts.map +1 -0
  98. package/dist/components/ui/SearchField.d.ts +7 -0
  99. package/dist/components/ui/SearchField.d.ts.map +1 -0
  100. package/dist/components/ui/Tab.d.ts +18 -0
  101. package/dist/components/ui/Tab.d.ts.map +1 -0
  102. package/dist/components/ui/Tag/TagInput.d.ts +19 -0
  103. package/dist/components/ui/Tag/TagInput.d.ts.map +1 -0
  104. package/dist/components/ui/Tag/TagList.d.ts +8 -0
  105. package/dist/components/ui/Tag/TagList.d.ts.map +1 -0
  106. package/dist/components/ui/Tag/TagListForm.d.ts +8 -0
  107. package/dist/components/ui/Tag/TagListForm.d.ts.map +1 -0
  108. package/dist/components/ui/Toggle.d.ts +11 -0
  109. package/dist/components/ui/Toggle.d.ts.map +1 -0
  110. package/dist/components/ui/ToolTip.d.ts +7 -0
  111. package/dist/components/ui/ToolTip.d.ts.map +1 -0
  112. package/dist/components/ui/card.d.ts +9 -0
  113. package/dist/components/ui/card.d.ts.map +1 -0
  114. package/dist/components/ui/chart.d.ts +42 -0
  115. package/dist/components/ui/chart.d.ts.map +1 -0
  116. package/dist/components/ui/form/CheckboxField.d.ts +4 -0
  117. package/dist/components/ui/form/CheckboxField.d.ts.map +1 -0
  118. package/dist/components/ui/form/ChoicesField.d.ts +12 -0
  119. package/dist/components/ui/form/ChoicesField.d.ts.map +1 -0
  120. package/dist/components/ui/form/Combobox.d.ts +20 -0
  121. package/dist/components/ui/form/Combobox.d.ts.map +1 -0
  122. package/dist/components/ui/form/DatePickerField.d.ts +4 -0
  123. package/dist/components/ui/form/DatePickerField.d.ts.map +1 -0
  124. package/dist/components/ui/form/EmailField.d.ts +7 -0
  125. package/dist/components/ui/form/EmailField.d.ts.map +1 -0
  126. package/dist/components/ui/form/FieldWithHelp.d.ts +10 -0
  127. package/dist/components/ui/form/FieldWithHelp.d.ts.map +1 -0
  128. package/dist/components/ui/form/FieldWrapper.d.ts +8 -0
  129. package/dist/components/ui/form/FieldWrapper.d.ts.map +1 -0
  130. package/dist/components/ui/form/FormErrors.d.ts +6 -0
  131. package/dist/components/ui/form/FormErrors.d.ts.map +1 -0
  132. package/dist/components/ui/form/JSONAreaField.d.ts +7 -0
  133. package/dist/components/ui/form/JSONAreaField.d.ts.map +1 -0
  134. package/dist/components/ui/form/MarkdownTextAreaField.d.ts +8 -0
  135. package/dist/components/ui/form/MarkdownTextAreaField.d.ts.map +1 -0
  136. package/dist/components/ui/form/PasswordField.d.ts +3 -0
  137. package/dist/components/ui/form/PasswordField.d.ts.map +1 -0
  138. package/dist/components/ui/form/SelectField.d.ts +11 -0
  139. package/dist/components/ui/form/SelectField.d.ts.map +1 -0
  140. package/dist/components/ui/form/SubmitButton.d.ts +9 -0
  141. package/dist/components/ui/form/SubmitButton.d.ts.map +1 -0
  142. package/dist/components/ui/form/TagInputField.d.ts +7 -0
  143. package/dist/components/ui/form/TagInputField.d.ts.map +1 -0
  144. package/dist/components/ui/form/TextAreaField.d.ts +8 -0
  145. package/dist/components/ui/form/TextAreaField.d.ts.map +1 -0
  146. package/dist/components/ui/form/TextField.d.ts +10 -0
  147. package/dist/components/ui/form/TextField.d.ts.map +1 -0
  148. package/dist/components/ui/form/index.d.ts +18 -0
  149. package/dist/components/ui/form/index.d.ts.map +1 -0
  150. package/dist/components/ui/icons.d.ts +4 -0
  151. package/dist/components/ui/icons.d.ts.map +1 -0
  152. package/dist/components/ui/index.d.ts +47 -0
  153. package/dist/components/ui/index.d.ts.map +1 -0
  154. package/dist/form.js +2617 -0
  155. package/dist/gql/operation-types.d.ts +13239 -0
  156. package/dist/gql/operation-types.d.ts.map +1 -0
  157. package/dist/gql/schema-types.d.ts +3876 -0
  158. package/dist/gql/schema-types.d.ts.map +1 -0
  159. package/dist/gql/types.d.ts +3 -0
  160. package/dist/gql/types.d.ts.map +1 -0
  161. package/dist/hooks.js +49 -0
  162. package/dist/lib/utils.d.ts +3 -0
  163. package/dist/lib/utils.d.ts.map +1 -0
  164. package/dist/modal.js +51 -0
  165. package/dist/modules/Auth/AuthContext.d.ts +9 -0
  166. package/dist/modules/Auth/AuthContext.d.ts.map +1 -0
  167. package/dist/modules/Auth/useAuth.d.ts +6 -0
  168. package/dist/modules/Auth/useAuth.d.ts.map +1 -0
  169. package/dist/modules/UnchainedContext/UnchainedContext.d.ts +8 -0
  170. package/dist/modules/UnchainedContext/UnchainedContext.d.ts.map +1 -0
  171. package/dist/modules/UnchainedContext/useUnchainedContext.d.ts +7 -0
  172. package/dist/modules/UnchainedContext/useUnchainedContext.d.ts.map +1 -0
  173. package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts +3 -0
  174. package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts.map +1 -0
  175. package/dist/modules/accounts/fragment/UserFragment.d.ts +3 -0
  176. package/dist/modules/accounts/fragment/UserFragment.d.ts.map +1 -0
  177. package/dist/modules/accounts/hooks/useCurrentUser.d.ts +10 -0
  178. package/dist/modules/accounts/hooks/useCurrentUser.d.ts.map +1 -0
  179. package/dist/modules/accounts/hooks/useUsersCount.d.ts +8 -0
  180. package/dist/modules/accounts/hooks/useUsersCount.d.ts.map +1 -0
  181. package/dist/modules/accounts.js +1349 -0
  182. package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts +8 -0
  183. package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts.map +1 -0
  184. package/dist/modules/assortment.js +1205 -0
  185. package/dist/modules/common/components/AppContext.d.ts +18 -0
  186. package/dist/modules/common/components/AppContext.d.ts.map +1 -0
  187. package/dist/modules/common/components/FormWrapper.d.ts +8 -0
  188. package/dist/modules/common/components/FormWrapper.d.ts.map +1 -0
  189. package/dist/modules/common/components/LocaleWrapper.d.ts +7 -0
  190. package/dist/modules/common/components/LocaleWrapper.d.ts.map +1 -0
  191. package/dist/modules/common/components/MediaAvatar.d.ts +6 -0
  192. package/dist/modules/common/components/MediaAvatar.d.ts.map +1 -0
  193. package/dist/modules/common/components/SelectOptions.d.ts +17 -0
  194. package/dist/modules/common/components/SelectOptions.d.ts.map +1 -0
  195. package/dist/modules/common/components/Table.d.ts +25 -0
  196. package/dist/modules/common/components/Table.d.ts.map +1 -0
  197. package/dist/modules/common/components/TableCell.d.ts +12 -0
  198. package/dist/modules/common/components/TableCell.d.ts.map +1 -0
  199. package/dist/modules/common/components/TableRow.d.ts +10 -0
  200. package/dist/modules/common/components/TableRow.d.ts.map +1 -0
  201. package/dist/modules/common/components/ThemeWrapper.d.ts +10 -0
  202. package/dist/modules/common/components/ThemeWrapper.d.ts.map +1 -0
  203. package/dist/modules/common/data/iso-codes.d.ts +4 -0
  204. package/dist/modules/common/data/iso-codes.d.ts.map +1 -0
  205. package/dist/modules/common/data/miscellaneous.d.ts +52 -0
  206. package/dist/modules/common/data/miscellaneous.d.ts.map +1 -0
  207. package/dist/modules/common/fragments/AddressFragment.d.ts +3 -0
  208. package/dist/modules/common/fragments/AddressFragment.d.ts.map +1 -0
  209. package/dist/modules/common/hooks/useApp.d.ts +11 -0
  210. package/dist/modules/common/hooks/useApp.d.ts.map +1 -0
  211. package/dist/modules/common/hooks/useBulkResultHandler.d.ts +8 -0
  212. package/dist/modules/common/hooks/useBulkResultHandler.d.ts.map +1 -0
  213. package/dist/modules/common/hooks/useBulkSelection.d.ts +12 -0
  214. package/dist/modules/common/hooks/useBulkSelection.d.ts.map +1 -0
  215. package/dist/modules/common/hooks/useCSVExport.d.ts +10 -0
  216. package/dist/modules/common/hooks/useCSVExport.d.ts.map +1 -0
  217. package/dist/modules/common/hooks/useCSVImport.d.ts +18 -0
  218. package/dist/modules/common/hooks/useCSVImport.d.ts.map +1 -0
  219. package/dist/modules/common/hooks/useChatEndpointChecker.d.ts +5 -0
  220. package/dist/modules/common/hooks/useChatEndpointChecker.d.ts.map +1 -0
  221. package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts +10 -0
  222. package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts.map +1 -0
  223. package/dist/modules/common/hooks/useDashboardMetrics.d.ts +23 -0
  224. package/dist/modules/common/hooks/useDashboardMetrics.d.ts.map +1 -0
  225. package/dist/modules/common/hooks/useLocalStorage.d.ts +3 -0
  226. package/dist/modules/common/hooks/useLocalStorage.d.ts.map +1 -0
  227. package/dist/modules/common/hooks/useOrderAnalytics.d.ts +25 -0
  228. package/dist/modules/common/hooks/useOrderAnalytics.d.ts.map +1 -0
  229. package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts +16 -0
  230. package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts.map +1 -0
  231. package/dist/modules/common/hooks/useOutsideClick.d.ts +3 -0
  232. package/dist/modules/common/hooks/useOutsideClick.d.ts.map +1 -0
  233. package/dist/modules/common/hooks/usePortal.d.ts +20 -0
  234. package/dist/modules/common/hooks/usePortal.d.ts.map +1 -0
  235. package/dist/modules/common/hooks/useScrollRestoration.d.ts +8 -0
  236. package/dist/modules/common/hooks/useScrollRestoration.d.ts.map +1 -0
  237. package/dist/modules/common/hooks/useShopConfiguration.d.ts +8 -0
  238. package/dist/modules/common/hooks/useShopConfiguration.d.ts.map +1 -0
  239. package/dist/modules/common/hooks/useShopInfo.d.ts +41 -0
  240. package/dist/modules/common/hooks/useShopInfo.d.ts.map +1 -0
  241. package/dist/modules/common/hooks/useStatusTypes.d.ts +10 -0
  242. package/dist/modules/common/hooks/useStatusTypes.d.ts.map +1 -0
  243. package/dist/modules/common/hooks/useSystemRoles.d.ts +7 -0
  244. package/dist/modules/common/hooks/useSystemRoles.d.ts.map +1 -0
  245. package/dist/modules/common/hooks/useTheme.d.ts +7 -0
  246. package/dist/modules/common/hooks/useTheme.d.ts.map +1 -0
  247. package/dist/modules/common/utils/deBounce.d.ts +3 -0
  248. package/dist/modules/common/utils/deBounce.d.ts.map +1 -0
  249. package/dist/modules/common/utils/defaultNextImageLoader.d.ts +7 -0
  250. package/dist/modules/common/utils/defaultNextImageLoader.d.ts.map +1 -0
  251. package/dist/modules/common/utils/formatUsername.d.ts +3 -0
  252. package/dist/modules/common/utils/formatUsername.d.ts.map +1 -0
  253. package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts +30 -0
  254. package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts.map +1 -0
  255. package/dist/modules/common/utils/normalizeFilterKeys.d.ts +4 -0
  256. package/dist/modules/common/utils/normalizeFilterKeys.d.ts.map +1 -0
  257. package/dist/modules/common/utils/sharedContext.d.ts +9 -0
  258. package/dist/modules/common/utils/sharedContext.d.ts.map +1 -0
  259. package/dist/modules/common/utils/useFormatDateTime.d.ts +16 -0
  260. package/dist/modules/common/utils/useFormatDateTime.d.ts.map +1 -0
  261. package/dist/modules/common/utils/utils.d.ts +21 -0
  262. package/dist/modules/common/utils/utils.d.ts.map +1 -0
  263. package/dist/modules/country/fragments/CountryFragment.d.ts +3 -0
  264. package/dist/modules/country/fragments/CountryFragment.d.ts.map +1 -0
  265. package/dist/modules/country/hooks/useCountries.d.ts +22 -0
  266. package/dist/modules/country/hooks/useCountries.d.ts.map +1 -0
  267. package/dist/modules/country.js +108 -0
  268. package/dist/modules/currency.js +119 -0
  269. package/dist/modules/delivery-provider.js +269 -0
  270. package/dist/modules/enrollment.js +431 -0
  271. package/dist/modules/event.js +123 -0
  272. package/dist/modules/filter.js +497 -0
  273. package/dist/modules/forms/components/Form.d.ts +8 -0
  274. package/dist/modules/forms/components/Form.d.ts.map +1 -0
  275. package/dist/modules/forms/hooks/useField.d.ts +35 -0
  276. package/dist/modules/forms/hooks/useField.d.ts.map +1 -0
  277. package/dist/modules/forms/hooks/useForm.d.ts +44 -0
  278. package/dist/modules/forms/hooks/useForm.d.ts.map +1 -0
  279. package/dist/modules/forms/hooks/useFormContext.d.ts +3 -0
  280. package/dist/modules/forms/hooks/useFormContext.d.ts.map +1 -0
  281. package/dist/modules/forms/lib/FormContext.d.ts +13 -0
  282. package/dist/modules/forms/lib/FormContext.d.ts.map +1 -0
  283. package/dist/modules/forms/lib/clean.d.ts +3 -0
  284. package/dist/modules/forms/lib/clean.d.ts.map +1 -0
  285. package/dist/modules/forms/lib/validators.d.ts +20 -0
  286. package/dist/modules/forms/lib/validators.d.ts.map +1 -0
  287. package/dist/modules/language/fragments/LanguageFragment.d.ts +3 -0
  288. package/dist/modules/language/fragments/LanguageFragment.d.ts.map +1 -0
  289. package/dist/modules/language/hooks/useLanguages.d.ts +19 -0
  290. package/dist/modules/language/hooks/useLanguages.d.ts.map +1 -0
  291. package/dist/modules/language.js +106 -0
  292. package/dist/modules/modal/components/AlertMessage.d.ts +9 -0
  293. package/dist/modules/modal/components/AlertMessage.d.ts.map +1 -0
  294. package/dist/modules/modal/components/DangerMessage.d.ts +13 -0
  295. package/dist/modules/modal/components/DangerMessage.d.ts.map +1 -0
  296. package/dist/modules/modal/components/ImportResultMessage.d.ts +14 -0
  297. package/dist/modules/modal/components/ImportResultMessage.d.ts.map +1 -0
  298. package/dist/modules/modal/components/Modal.d.ts +10 -0
  299. package/dist/modules/modal/components/Modal.d.ts.map +1 -0
  300. package/dist/modules/modal/components/ModalWrapper.d.ts +6 -0
  301. package/dist/modules/modal/components/ModalWrapper.d.ts.map +1 -0
  302. package/dist/modules/modal/hooks/useModal.d.ts +7 -0
  303. package/dist/modules/modal/hooks/useModal.d.ts.map +1 -0
  304. package/dist/modules/modal/utils/ModalContext.d.ts +9 -0
  305. package/dist/modules/modal/utils/ModalContext.d.ts.map +1 -0
  306. package/dist/modules/order/fragments/OrderDetailFragment.d.ts +3 -0
  307. package/dist/modules/order/fragments/OrderDetailFragment.d.ts.map +1 -0
  308. package/dist/modules/order/fragments/OrderFragment.d.ts +3 -0
  309. package/dist/modules/order/fragments/OrderFragment.d.ts.map +1 -0
  310. package/dist/modules/order/hooks/useOrders.d.ts +46 -0
  311. package/dist/modules/order/hooks/useOrders.d.ts.map +1 -0
  312. package/dist/modules/order.js +569 -0
  313. package/dist/modules/payment-providers.js +206 -0
  314. package/dist/modules/product/hooks/useProductsCount.d.ts +8 -0
  315. package/dist/modules/product/hooks/useProductsCount.d.ts.map +1 -0
  316. package/dist/modules/product-review.js +270 -0
  317. package/dist/modules/product.js +6914 -0
  318. package/dist/modules/quotation.js +324 -0
  319. package/dist/modules/token.js +143 -0
  320. package/dist/modules/warehousing-providers.js +206 -0
  321. package/dist/modules/work/fragments/WorkFragment.d.ts +3 -0
  322. package/dist/modules/work/fragments/WorkFragment.d.ts.map +1 -0
  323. package/dist/modules/work/hooks/useAddWork.d.ts +6 -0
  324. package/dist/modules/work/hooks/useAddWork.d.ts.map +1 -0
  325. package/dist/modules/work/hooks/useWork.d.ts +32 -0
  326. package/dist/modules/work/hooks/useWork.d.ts.map +1 -0
  327. package/dist/modules/work.js +232 -0
  328. package/dist/plugins.js +13 -0
  329. package/dist/providers.js +9 -0
  330. package/dist/sdk/hooks.d.ts +12 -0
  331. package/dist/sdk/hooks.d.ts.map +1 -0
  332. package/dist/sdk/modal.d.ts +7 -0
  333. package/dist/sdk/modal.d.ts.map +1 -0
  334. package/dist/sdk/plugins.d.ts +78 -0
  335. package/dist/sdk/plugins.d.ts.map +1 -0
  336. package/dist/sdk/providers.d.ts +5 -0
  337. package/dist/sdk/providers.d.ts.map +1 -0
  338. package/dist/sdk/shims/admin-ui-plugins.d.ts +3 -0
  339. package/dist/sdk/shims/admin-ui-plugins.d.ts.map +1 -0
  340. package/dist/sdk/shims/apollo-client-react.d.ts +3 -0
  341. package/dist/sdk/shims/apollo-client-react.d.ts.map +1 -0
  342. package/dist/sdk/shims/apollo-client.d.ts +3 -0
  343. package/dist/sdk/shims/apollo-client.d.ts.map +1 -0
  344. package/dist/sdk/shims/host.d.ts +17 -0
  345. package/dist/sdk/shims/host.d.ts.map +1 -0
  346. package/dist/sdk/shims/next-head.d.ts +3 -0
  347. package/dist/sdk/shims/next-head.d.ts.map +1 -0
  348. package/dist/sdk/shims/next-image.d.ts +3 -0
  349. package/dist/sdk/shims/next-image.d.ts.map +1 -0
  350. package/dist/sdk/shims/next-link.d.ts +3 -0
  351. package/dist/sdk/shims/next-link.d.ts.map +1 -0
  352. package/dist/sdk/shims/next-router.d.ts +3 -0
  353. package/dist/sdk/shims/next-router.d.ts.map +1 -0
  354. package/dist/sdk/shims/react-dom-client.d.ts +3 -0
  355. package/dist/sdk/shims/react-dom-client.d.ts.map +1 -0
  356. package/dist/sdk/shims/react-dom.d.ts +3 -0
  357. package/dist/sdk/shims/react-dom.d.ts.map +1 -0
  358. package/dist/sdk/shims/react-hook-form.d.ts +3 -0
  359. package/dist/sdk/shims/react-hook-form.d.ts.map +1 -0
  360. package/dist/sdk/shims/react-intl.d.ts +3 -0
  361. package/dist/sdk/shims/react-intl.d.ts.map +1 -0
  362. package/dist/sdk/shims/react-jsx-runtime.d.ts +3 -0
  363. package/dist/sdk/shims/react-jsx-runtime.d.ts.map +1 -0
  364. package/dist/sdk/shims/react-toastify.d.ts +3 -0
  365. package/dist/sdk/shims/react-toastify.d.ts.map +1 -0
  366. package/dist/sdk/shims/react.d.ts +3 -0
  367. package/dist/sdk/shims/react.d.ts.map +1 -0
  368. package/dist/sdk/theme.d.ts +26 -0
  369. package/dist/sdk/theme.d.ts.map +1 -0
  370. package/dist/shims/admin-ui-plugins.js +9 -0
  371. package/dist/shims/apollo-client-react.js +25 -0
  372. package/dist/shims/apollo-client.js +55 -0
  373. package/dist/shims/next-head.js +9 -0
  374. package/dist/shims/next-image.js +9 -0
  375. package/dist/shims/next-link.js +9 -0
  376. package/dist/shims/next-router.js +13 -0
  377. package/dist/shims/react-dom-client.js +11 -0
  378. package/dist/shims/react-dom.js +22 -0
  379. package/dist/shims/react-hook-form.js +25 -0
  380. package/dist/shims/react-intl.js +37 -0
  381. package/dist/shims/react-jsx-runtime.js +11 -0
  382. package/dist/shims/react-toastify.js +16 -0
  383. package/dist/shims/react.js +52 -0
  384. package/dist/theme.js +34 -0
  385. package/dist/ui.js +19764 -0
  386. package/out/403/index.html +3 -3
  387. package/out/404/index.html +3 -3
  388. package/out/404.html +3 -3
  389. package/out/423/index.html +3 -3
  390. package/out/500/index.html +3 -3
  391. package/out/_next/static/chunks/{2wmsx4gjbgvfv.js → 0bc8hmxlcg6h5.js} +5 -5
  392. package/out/_next/static/chunks/{07o9g5hqfpvjc.js → 0djb38xrt32ao.js} +1 -1
  393. package/out/_next/static/chunks/{41p3ng89i5lem.js → 0drw_p7p-jjq1.js} +2 -2
  394. package/out/_next/static/chunks/{2rb1-3t3-sv5s.js → 0hz0qu27uks3z.js} +2 -2
  395. package/out/_next/static/chunks/{1s9v5dndopkuz.js → 0rzjz052fwjjc.js} +1 -1
  396. package/out/_next/static/chunks/170d-jbu8ilzu.js +100 -0
  397. package/out/_next/static/chunks/1a9-pdm78ri7r.js +1 -0
  398. package/out/_next/static/chunks/{3q3m075m4bxz1.js → 1epju6xepfqtq.js} +2 -2
  399. package/out/_next/static/chunks/{1qi5yjvzxspwv.js → 1r0w-hk6d2kqw.js} +1 -1
  400. package/out/_next/static/chunks/25frktmrq-xu0.js +1 -0
  401. package/out/_next/static/chunks/{2jonbba27xy3u.js → 2cclew3l28rc4.js} +1 -1
  402. package/out/_next/static/chunks/{1f7-0l47bx76m.js → 2olb298bph2yc.js} +1 -1
  403. package/out/_next/static/chunks/{11go520d1hcm5.js → 33_-2ne9ecvay.js} +1 -1
  404. package/out/_next/static/chunks/33qeilxkl3ckn.js +116 -0
  405. package/out/_next/static/chunks/{33yzdcbu7w60l.js → 33tewe5d_lfl-.js} +1 -1
  406. package/out/_next/static/chunks/{0qj3xdz043z8l.js → 3i9q2-4e0mix5.js} +1 -1
  407. package/out/_next/static/chunks/3m4smrmdqi2-3.js +5 -0
  408. package/out/_next/static/chunks/{1g96s7-fwvokd.js → 3zw4-oie-f7_0.js} +1 -1
  409. package/out/_next/static/{jOx5PlckLwWIJ5yrvePdU → nrNmgRi1nHylx_8lvjG2D}/_buildManifest.js +10 -10
  410. package/out/_offline/index.html +3 -3
  411. package/out/account/forgot-password/index.html +3 -3
  412. package/out/account/index.html +3 -3
  413. package/out/assortments/AssortmentDetailPage/index.html +3 -3
  414. package/out/assortments/index.html +3 -3
  415. package/out/assortments/new/index.html +3 -3
  416. package/out/copilot/index.html +3 -3
  417. package/out/country/CountryDetailPage/index.html +3 -3
  418. package/out/country/index.html +3 -3
  419. package/out/country/new/index.html +3 -3
  420. package/out/currency/CurrencyDetailPage/index.html +3 -3
  421. package/out/currency/index.html +3 -3
  422. package/out/currency/new/index.html +3 -3
  423. package/out/delivery-provider/DeliveryProviderDetailPage/index.html +3 -3
  424. package/out/delivery-provider/index.html +3 -3
  425. package/out/delivery-provider/new/index.html +3 -3
  426. package/out/enrollments/EnrollmentDetailPage/index.html +3 -3
  427. package/out/enrollments/index.html +3 -3
  428. package/out/events/EventDetailPage/index.html +3 -3
  429. package/out/events/index.html +3 -3
  430. package/out/exports/index.html +3 -3
  431. package/out/external/index.html +3 -3
  432. package/out/filters/FilterDetailPage/index.html +3 -3
  433. package/out/filters/index.html +3 -3
  434. package/out/filters/new/index.html +3 -3
  435. package/out/index.html +3 -3
  436. package/out/install/index.html +3 -3
  437. package/out/language/LanguageDetailPage/index.html +3 -3
  438. package/out/language/index.html +3 -3
  439. package/out/language/new/index.html +3 -3
  440. package/out/log-in/index.html +3 -3
  441. package/out/manifest.json +48 -0
  442. package/out/orders/OrderDetailPage/index.html +3 -3
  443. package/out/orders/index.html +3 -3
  444. package/out/payment-provider/PaymentProviderDetailPage/index.html +3 -3
  445. package/out/payment-provider/index.html +3 -3
  446. package/out/payment-provider/new/index.html +3 -3
  447. package/out/products/ProductDetailPage/index.html +3 -3
  448. package/out/products/index.html +3 -3
  449. package/out/products/new/index.html +3 -3
  450. package/out/quotations/QuotationDetailPage/index.html +3 -3
  451. package/out/quotations/index.html +3 -3
  452. package/out/reset-password/index.html +3 -3
  453. package/out/sign-up/index.html +3 -3
  454. package/out/styleguide/index.html +3 -3
  455. package/out/tokens/TokenDetailPage/index.html +3 -3
  456. package/out/tokens/index.html +3 -3
  457. package/out/users/UserDetailPage/index.html +3 -3
  458. package/out/users/index.html +3 -3
  459. package/out/users/new/index.html +3 -3
  460. package/out/verify-email/index.html +3 -3
  461. package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +3 -3
  462. package/out/warehousing-provider/index.html +3 -3
  463. package/out/warehousing-provider/new/index.html +3 -3
  464. package/out/works/WorkDetailPage/index.html +3 -3
  465. package/out/works/WorkQueueListView/index.html +3 -3
  466. package/out/works/index.html +3 -3
  467. package/out/works/management/index.html +3 -3
  468. package/package.json +19 -19
  469. package/out/_next/static/chunks/0a5nr3-_q7xx1.js +0 -100
  470. package/out/_next/static/chunks/1sksqjru86hlm.js +0 -1
  471. package/out/_next/static/chunks/1wnuiwsbi70eq.js +0 -116
  472. package/out/_next/static/chunks/2cj8g3fxmitaa.js +0 -1
  473. package/out/_next/static/chunks/3wlvio5id54ow.js +0 -5
  474. /package/out/_next/static/{jOx5PlckLwWIJ5yrvePdU → nrNmgRi1nHylx_8lvjG2D}/_clientMiddlewareManifest.js +0 -0
  475. /package/out/_next/static/{jOx5PlckLwWIJ5yrvePdU → nrNmgRi1nHylx_8lvjG2D}/_ssgManifest.js +0 -0
@@ -0,0 +1,1205 @@
1
+ import { parseUniqueId, parseSlug } from '../chunk-IXBMHOB5.js';
2
+ import { ProductBriefFragment_default } from '../chunk-EJDZRZSZ.js';
3
+ import { FilterFragment_default } from '../chunk-OKGJ6HDE.js';
4
+ import { parseMeta_default } from '../chunk-YO6PT7KD.js';
5
+ import { useApp_default } from '../chunk-BOMSMJF2.js';
6
+ import '../chunk-ELPURWDC.js';
7
+ import '../chunk-RAQV2GYF.js';
8
+ import '../chunk-54DKBWXV.js';
9
+ import '../chunk-J23QSWDL.js';
10
+ import { useConfirmMediaUpload_default, PUTMedia_default } from '../chunk-COV7BREX.js';
11
+ import { useCSVExport } from '../chunk-IWKDBADX.js';
12
+ import '../chunk-VYEXPG3M.js';
13
+ import '../chunk-QWQ3WJJN.js';
14
+ import '../chunk-GY2DRQGW.js';
15
+ import { useUnchainedContext_default } from '../chunk-IAQPLRXZ.js';
16
+ import '../chunk-WPLOTFGW.js';
17
+ import { gql } from '@apollo/client';
18
+ import { useMutation, useQuery } from '@apollo/client/react';
19
+ import { useCallback } from 'react';
20
+
21
+ var AddAssortmentFilterMutation = gql`
22
+ mutation AddAssortmentFilter(
23
+ $assortmentId: ID!
24
+ $filterId: ID!
25
+ $tags: [LowerCaseString!]
26
+ ) {
27
+ addAssortmentFilter(
28
+ assortmentId: $assortmentId
29
+ filterId: $filterId
30
+ tags: $tags
31
+ ) {
32
+ _id
33
+ }
34
+ }
35
+ `;
36
+ var useAddAssortmentFilter = () => {
37
+ const [addAssortmentFilterMutation] = useMutation(AddAssortmentFilterMutation);
38
+ const addAssortmentFilter = async ({
39
+ assortmentId,
40
+ filterId,
41
+ tags
42
+ }) => {
43
+ return addAssortmentFilterMutation({
44
+ variables: { assortmentId, filterId, tags },
45
+ refetchQueries: ["AssortmentFilters"]
46
+ });
47
+ };
48
+ return {
49
+ addAssortmentFilter
50
+ };
51
+ };
52
+ var useAddAssortmentFilter_default = useAddAssortmentFilter;
53
+ var AddAssortmentLinkMutation = gql`
54
+ mutation AddAssortmentLink(
55
+ $parentAssortmentId: ID!
56
+ $childAssortmentId: ID!
57
+ $tags: [LowerCaseString!]
58
+ ) {
59
+ addAssortmentLink(
60
+ parentAssortmentId: $parentAssortmentId
61
+ childAssortmentId: $childAssortmentId
62
+ tags: $tags
63
+ ) {
64
+ _id
65
+ }
66
+ }
67
+ `;
68
+ var useAddAssortmentLink = () => {
69
+ const [addAssortmentLinkMutation] = useMutation(AddAssortmentLinkMutation);
70
+ const addAssortmentLink = async ({
71
+ parentAssortmentId,
72
+ childAssortmentId,
73
+ tags
74
+ }) => {
75
+ return addAssortmentLinkMutation({
76
+ variables: { parentAssortmentId, childAssortmentId, tags },
77
+ refetchQueries: ["AssortmentLinks"]
78
+ });
79
+ };
80
+ return {
81
+ addAssortmentLink
82
+ };
83
+ };
84
+ var useAddAssortmentLink_default = useAddAssortmentLink;
85
+ var PrepareAssortmentMediaUploadMutation = gql`
86
+ mutation PrepareAssortmentMediaUpload(
87
+ $mediaName: String!
88
+ $assortmentId: ID!
89
+ ) {
90
+ prepareAssortmentMediaUpload(
91
+ mediaName: $mediaName
92
+ assortmentId: $assortmentId
93
+ ) {
94
+ _id
95
+ putURL
96
+ expires
97
+ }
98
+ }
99
+ `;
100
+ var useAddAssortmentMedia = () => {
101
+ const [prepareAssortmentMediaUploadMutation] = useMutation(PrepareAssortmentMediaUploadMutation);
102
+ const { confirmMediaUpload } = useConfirmMediaUpload_default({
103
+ refetchQueries: ["Assortment"]
104
+ });
105
+ const addAssortmentMedia = async ({ assortmentId, media }) => {
106
+ const { data } = await prepareAssortmentMediaUploadMutation({
107
+ variables: { assortmentId, mediaName: media.name }
108
+ });
109
+ const { prepareAssortmentMediaUpload } = data;
110
+ await PUTMedia_default(media, prepareAssortmentMediaUpload.putURL);
111
+ await confirmMediaUpload({
112
+ mediaUploadTicketId: prepareAssortmentMediaUpload._id,
113
+ size: media?.size,
114
+ type: media?.type
115
+ });
116
+ };
117
+ return {
118
+ addAssortmentMedia
119
+ };
120
+ };
121
+ var useAddAssortmentMedia_default = useAddAssortmentMedia;
122
+ var AddAssortmentProductMutation = gql`
123
+ mutation AddAssortmentProduct(
124
+ $assortmentId: ID!
125
+ $productId: ID!
126
+ $tags: [LowerCaseString!]
127
+ ) {
128
+ addAssortmentProduct(
129
+ assortmentId: $assortmentId
130
+ productId: $productId
131
+ tags: $tags
132
+ ) {
133
+ _id
134
+ }
135
+ }
136
+ `;
137
+ var useAddAssortmentProduct = () => {
138
+ const [addAssortmentProductMutation] = useMutation(AddAssortmentProductMutation);
139
+ const addAssortmentProduct = async ({
140
+ productId,
141
+ assortmentId,
142
+ tags
143
+ }) => {
144
+ return addAssortmentProductMutation({
145
+ variables: { productId, assortmentId, tags },
146
+ refetchQueries: ["AssortmentProducts"]
147
+ });
148
+ };
149
+ return {
150
+ addAssortmentProduct
151
+ };
152
+ };
153
+ var useAddAssortmentProduct_default = useAddAssortmentProduct;
154
+ var AssortmentFragment = gql`
155
+ fragment AssortmentFragment on Assortment {
156
+ _id
157
+ isActive
158
+ created
159
+ updated
160
+ sequence
161
+ isRoot
162
+ tags
163
+ texts(forceLocale: $forceLocale) {
164
+ _id
165
+ slug
166
+ title
167
+ subtitle
168
+ description
169
+ }
170
+ childrenCount
171
+ media {
172
+ _id
173
+ tags
174
+ file {
175
+ _id
176
+ url
177
+ }
178
+ }
179
+ }
180
+ `;
181
+ var AssortmentFragment_default = AssortmentFragment;
182
+
183
+ // src/modules/assortment/hooks/useAssortment.ts
184
+ var GetAssortmentQuery = (inlineFragment = "") => gql`
185
+ query Assortment($assortmentId: ID, $slug: String, $forceLocale: Locale) {
186
+ assortment(assortmentId: $assortmentId, slug: $slug) {
187
+ ...AssortmentFragment
188
+ ${inlineFragment}
189
+ }
190
+ }
191
+ ${AssortmentFragment_default}
192
+ `;
193
+ var useAssortment = ({
194
+ assortmentId: id = null,
195
+ slug = null
196
+ } = {}) => {
197
+ const parsedId = parseUniqueId(slug);
198
+ const { customProperties, hydrateFragment } = useUnchainedContext_default();
199
+ const { selectedLocale } = useApp_default();
200
+ const { data, loading, error } = useQuery(
201
+ GetAssortmentQuery(customProperties?.Assortment),
202
+ {
203
+ skip: !id && !slug,
204
+ variables: {
205
+ assortmentId: id || parsedId,
206
+ forceLocale: selectedLocale
207
+ }
208
+ }
209
+ );
210
+ const assortment = data?.assortment;
211
+ const extendedData = hydrateFragment(
212
+ customProperties?.Assortment,
213
+ assortment
214
+ );
215
+ return {
216
+ loading,
217
+ error,
218
+ assortment,
219
+ extendedData
220
+ };
221
+ };
222
+ var useAssortment_default = useAssortment;
223
+ var AssortmentChildrenFragment = gql`
224
+ fragment AssortmentChildrenFragment on Assortment {
225
+ _id
226
+ texts {
227
+ _id
228
+ slug
229
+ title
230
+ subtitle
231
+ }
232
+ childrenCount
233
+ }
234
+ `;
235
+ var AssortmentChildrenFragment_default = AssortmentChildrenFragment;
236
+
237
+ // src/modules/assortment/hooks/useAssortmentChildren.ts
238
+ var AssortmentChildrenQuery = gql`
239
+ query AssortmentChildren(
240
+ $slugs: [String!]
241
+ $includeInactive: Boolean
242
+ $includeLeaves: Boolean
243
+ ) {
244
+ assortments(
245
+ slugs: $slugs
246
+ includeInactive: $includeInactive
247
+ includeLeaves: $includeLeaves
248
+ ) {
249
+ ...AssortmentChildrenFragment
250
+ children {
251
+ ...AssortmentChildrenFragment
252
+ }
253
+ }
254
+ }
255
+ ${AssortmentChildrenFragment_default}
256
+ `;
257
+ var useAssortmentChildren = ({
258
+ slugs,
259
+ includeInactive = false,
260
+ includeLeaves = false,
261
+ forceLocale
262
+ }) => {
263
+ const normalizedSlug = slugs?.map((slug) => parseSlug(slug));
264
+ const { data, loading, error } = useQuery(
265
+ AssortmentChildrenQuery,
266
+ {
267
+ variables: {
268
+ slugs: normalizedSlug,
269
+ includeInactive,
270
+ includeLeaves
271
+ },
272
+ context: {
273
+ headers: {
274
+ forceLocale
275
+ }
276
+ }
277
+ }
278
+ );
279
+ const assortments = data?.assortments || [];
280
+ return { assortments, loading, error };
281
+ };
282
+ var useAssortmentChildren_default = useAssortmentChildren;
283
+ var useAssortmentExport = () => {
284
+ const { exportCSV, isExporting } = useCSVExport();
285
+ const exportAssortments = useCallback(
286
+ async (data) => {
287
+ await exportCSV({ type: "ASSORTMENTS", ...data });
288
+ },
289
+ [exportCSV]
290
+ );
291
+ return { exportAssortments, isExporting };
292
+ };
293
+ var AssortmentFiltersQuery = gql`
294
+ query AssortmentFilters($assortmentId: ID, $slug: String) {
295
+ assortment(assortmentId: $assortmentId, slug: $slug) {
296
+ _id
297
+ filterAssignments {
298
+ _id
299
+ sortKey
300
+ tags
301
+ filter {
302
+ ...FilterFragment
303
+ }
304
+ }
305
+ }
306
+ }
307
+ ${FilterFragment_default}
308
+ `;
309
+ var useAssortmentFilters = ({
310
+ assortmentId: id = null,
311
+ slug = null
312
+ } = {}) => {
313
+ const parsedId = parseUniqueId(slug);
314
+ const { data, loading, error } = useQuery(
315
+ AssortmentFiltersQuery,
316
+ {
317
+ skip: !id && !parsedId,
318
+ variables: {
319
+ assortmentId: id || parsedId
320
+ }
321
+ }
322
+ );
323
+ const assortment = data?.assortment;
324
+ const assortmentFilters = assortment?.filterAssignments || [];
325
+ return {
326
+ loading,
327
+ error,
328
+ assortmentFilters
329
+ };
330
+ };
331
+ var useAssortmentFilters_default = useAssortmentFilters;
332
+ var AssortmentLinksQuery = gql`
333
+ query AssortmentLinks(
334
+ $assortmentId: ID
335
+ $slug: String
336
+ $forceLocale: Locale
337
+ ) {
338
+ assortment(assortmentId: $assortmentId, slug: $slug) {
339
+ _id
340
+ linkedAssortments {
341
+ _id
342
+ sortKey
343
+ parent {
344
+ ...AssortmentFragment
345
+ }
346
+ child {
347
+ ...AssortmentFragment
348
+ }
349
+ }
350
+ }
351
+ }
352
+ ${AssortmentFragment_default}
353
+ `;
354
+ var useAssortmentLinks = ({ assortmentId: id = null, slug = null } = {}) => {
355
+ const parsedId = parseUniqueId(slug);
356
+ const { selectedLocale } = useApp_default();
357
+ const { data, loading, error } = useQuery(
358
+ AssortmentLinksQuery,
359
+ {
360
+ skip: !id && !parsedId,
361
+ variables: {
362
+ assortmentId: id || parsedId,
363
+ forceLocale: selectedLocale
364
+ }
365
+ }
366
+ );
367
+ const assortment = data?.assortment;
368
+ const linkedAssortments = assortment?.linkedAssortments || [];
369
+ return {
370
+ loading,
371
+ error,
372
+ linkedAssortments
373
+ };
374
+ };
375
+ var useAssortmentLinks_default = useAssortmentLinks;
376
+ var AssortmentMediaQuery = gql`
377
+ query AssortmentMedia($assortmentId: ID, $slug: String) {
378
+ assortment(assortmentId: $assortmentId, slug: $slug) {
379
+ _id
380
+ media {
381
+ _id
382
+ tags
383
+ texts {
384
+ _id
385
+ locale
386
+ title
387
+ subtitle
388
+ }
389
+ file {
390
+ _id
391
+ url
392
+ name
393
+ size
394
+ type
395
+ }
396
+ sortKey
397
+ }
398
+ }
399
+ }
400
+ `;
401
+ var useAssortmentMedia = ({
402
+ assortmentId: id = null,
403
+ slug = null
404
+ } = {}) => {
405
+ const parsedId = parseUniqueId(slug);
406
+ const { data, loading, error } = useQuery(
407
+ AssortmentMediaQuery,
408
+ {
409
+ skip: !id && !parsedId,
410
+ variables: {
411
+ assortmentId: id || parsedId
412
+ }
413
+ }
414
+ );
415
+ return {
416
+ loading,
417
+ error,
418
+ assortmentMedia: data?.assortment?.media || []
419
+ };
420
+ };
421
+ var useAssortmentMedia_default = useAssortmentMedia;
422
+ var AssortmentPathsQuery = gql`
423
+ query AssortmentPaths($assortmentId: ID!) {
424
+ assortment(assortmentId: $assortmentId) {
425
+ assortmentPaths {
426
+ links {
427
+ assortmentId
428
+ }
429
+ }
430
+ }
431
+ }
432
+ `;
433
+ var useAssortmentPaths = ({
434
+ assortmentId
435
+ }) => {
436
+ const { data, loading, error } = useQuery(
437
+ AssortmentPathsQuery,
438
+ {
439
+ variables: {
440
+ assortmentId
441
+ }
442
+ }
443
+ );
444
+ const assortmentsPaths = (data?.assortment?.assortmentPaths || [])?.flatMap(
445
+ ({ links }) => links
446
+ );
447
+ return { assortmentsPaths, loading, error };
448
+ };
449
+ var useAssortmentPaths_default = useAssortmentPaths;
450
+ var AssortmentProductsQuery = gql`
451
+ query AssortmentProducts(
452
+ $assortmentId: ID
453
+ $slug: String
454
+ $forceLocale: Locale
455
+ ) {
456
+ assortment(assortmentId: $assortmentId, slug: $slug) {
457
+ _id
458
+ productAssignments {
459
+ _id
460
+ sortKey
461
+ tags
462
+ product {
463
+ ...ProductBriefFragment
464
+ }
465
+ }
466
+ }
467
+ }
468
+ ${ProductBriefFragment_default}
469
+ `;
470
+ var useAssortmentProducts = ({
471
+ assortmentId: id = null,
472
+ slug = null
473
+ } = {}) => {
474
+ const { selectedLocale } = useApp_default();
475
+ const parsedId = parseUniqueId(slug);
476
+ const { data, loading, error } = useQuery(
477
+ AssortmentProductsQuery,
478
+ {
479
+ skip: !id && !parsedId,
480
+ variables: {
481
+ assortmentId: id || parsedId,
482
+ forceLocale: selectedLocale
483
+ },
484
+ context: {
485
+ headers: {
486
+ forceLocale: selectedLocale
487
+ }
488
+ }
489
+ }
490
+ );
491
+ const assortment = data?.assortment;
492
+ const linkedProducts = assortment?.productAssignments || [];
493
+ return {
494
+ loading,
495
+ error,
496
+ linkedProducts
497
+ };
498
+ };
499
+ var useAssortmentProducts_default = useAssortmentProducts;
500
+ var AssortmentsQuery = gql`
501
+ query Assortments(
502
+ $queryString: String
503
+ $tags: [LowerCaseString!]
504
+ $slugs: [String!]
505
+ $limit: Int
506
+ $offset: Int
507
+ $includeInactive: Boolean
508
+ $includeLeaves: Boolean
509
+ $sort: [SortOptionInput!]
510
+ $forceLocale: Locale
511
+ ) {
512
+ assortments(
513
+ queryString: $queryString
514
+ tags: $tags
515
+ slugs: $slugs
516
+ limit: $limit
517
+ offset: $offset
518
+ includeInactive: $includeInactive
519
+ includeLeaves: $includeLeaves
520
+ sort: $sort
521
+ ) {
522
+ ...AssortmentFragment
523
+ linkedAssortments {
524
+ child {
525
+ _id
526
+ }
527
+ }
528
+ }
529
+ assortmentsCount(
530
+ tags: $tags
531
+ slugs: $slugs
532
+ includeInactive: $includeInactive
533
+ includeLeaves: $includeLeaves
534
+ queryString: $queryString
535
+ )
536
+ }
537
+ ${AssortmentFragment_default}
538
+ `;
539
+ var useAssortments = ({
540
+ queryString = "",
541
+ tags = null,
542
+ slugs = null,
543
+ limit = 20,
544
+ offset = 0,
545
+ includeInactive = true,
546
+ includeLeaves = false,
547
+ sort: sortOptions = [],
548
+ forceLocale = ""
549
+ } = {}) => {
550
+ const { data, loading, error, fetchMore, client } = useQuery(AssortmentsQuery, {
551
+ variables: {
552
+ queryString,
553
+ tags,
554
+ slugs: slugs || null,
555
+ limit,
556
+ offset,
557
+ includeInactive,
558
+ includeLeaves,
559
+ sort: sortOptions.length ? sortOptions : [{ key: "sequence", value: "ASC" }],
560
+ forceLocale
561
+ },
562
+ context: {
563
+ headers: { forceLocale }
564
+ }
565
+ });
566
+ const assortments = data?.assortments || [];
567
+ const assortmentsCount = data?.assortmentsCount;
568
+ const hasMore = assortments?.length < assortmentsCount;
569
+ const loadMore = () => {
570
+ fetchMore({
571
+ variables: { offset: assortments?.length }
572
+ });
573
+ };
574
+ return {
575
+ loading,
576
+ error,
577
+ assortmentsCount,
578
+ hasMore,
579
+ assortments: data?.assortments || [],
580
+ loadMore,
581
+ client
582
+ };
583
+ };
584
+ var useAssortments_default = useAssortments;
585
+ var AssortmentsCountQuery = gql`
586
+ query AssortmentsCount(
587
+ $queryString: String
588
+ $tags: [LowerCaseString!]
589
+ $includeInactive: Boolean
590
+ $includeLeaves: Boolean
591
+ ) {
592
+ assortmentsCount(
593
+ tags: $tags
594
+ includeInactive: $includeInactive
595
+ includeLeaves: $includeLeaves
596
+ queryString: $queryString
597
+ )
598
+ }
599
+ `;
600
+ var useAssortmentsCount = ({
601
+ queryString = "",
602
+ tags = null,
603
+ includeInactive = true,
604
+ includeLeaves = false
605
+ }) => {
606
+ const { data, loading, error } = useQuery(AssortmentsCountQuery, {
607
+ errorPolicy: "all",
608
+ variables: {
609
+ queryString,
610
+ tags,
611
+ includeInactive,
612
+ includeLeaves
613
+ }
614
+ });
615
+ const assortmentsCount = data?.assortmentsCount;
616
+ return {
617
+ loading,
618
+ error,
619
+ assortmentsCount
620
+ };
621
+ };
622
+ var useAssortmentsCount_default = useAssortmentsCount;
623
+ var BulkRemoveAssortmentsMutation = gql`
624
+ mutation BulkRemoveAssortments($assortmentIds: [ID!]!) {
625
+ bulkRemoveAssortments(assortmentIds: $assortmentIds) {
626
+ successCount
627
+ failedCount
628
+ failedIds
629
+ }
630
+ }
631
+ `;
632
+ var BulkUpdateAssortmentTagsMutation = gql`
633
+ mutation BulkUpdateAssortmentTags(
634
+ $assortmentIds: [ID!]!
635
+ $add: [LowerCaseString!]
636
+ $remove: [LowerCaseString!]
637
+ ) {
638
+ bulkUpdateAssortmentTags(
639
+ assortmentIds: $assortmentIds
640
+ add: $add
641
+ remove: $remove
642
+ ) {
643
+ successCount
644
+ failedCount
645
+ failedIds
646
+ }
647
+ }
648
+ `;
649
+ var BulkSetAssortmentActiveMutation = gql`
650
+ mutation BulkSetAssortmentActive(
651
+ $assortmentIds: [ID!]!
652
+ $isActive: Boolean!
653
+ ) {
654
+ bulkSetAssortmentActive(
655
+ assortmentIds: $assortmentIds
656
+ isActive: $isActive
657
+ ) {
658
+ successCount
659
+ failedCount
660
+ failedIds
661
+ }
662
+ }
663
+ `;
664
+ var refetchQueries = ["Assortments", "AssortmentsCount"];
665
+ var useBulkAssortmentOperations = () => {
666
+ const [bulkRemoveMutation] = useMutation(BulkRemoveAssortmentsMutation);
667
+ const [bulkUpdateTagsMutation] = useMutation(BulkUpdateAssortmentTagsMutation);
668
+ const [bulkSetActiveMutation] = useMutation(BulkSetAssortmentActiveMutation);
669
+ return {
670
+ bulkRemoveAssortments: (assortmentIds) => bulkRemoveMutation({
671
+ variables: { assortmentIds },
672
+ refetchQueries,
673
+ awaitRefetchQueries: true
674
+ }),
675
+ bulkUpdateAssortmentTags: (assortmentIds, add, remove) => bulkUpdateTagsMutation({
676
+ variables: { assortmentIds, add, remove },
677
+ refetchQueries,
678
+ awaitRefetchQueries: true
679
+ }),
680
+ bulkSetAssortmentActive: (assortmentIds, isActive) => bulkSetActiveMutation({
681
+ variables: { assortmentIds, isActive },
682
+ refetchQueries,
683
+ awaitRefetchQueries: true
684
+ })
685
+ };
686
+ };
687
+ var useBulkAssortmentOperations_default = useBulkAssortmentOperations;
688
+ var CreateAssortmentMutation = gql`
689
+ mutation CreateAssortment(
690
+ $assortment: CreateAssortmentInput!
691
+ $texts: [AssortmentTextInput!]
692
+ ) {
693
+ createAssortment(assortment: $assortment, texts: $texts) {
694
+ _id
695
+ texts {
696
+ _id
697
+ slug
698
+ }
699
+ }
700
+ }
701
+ `;
702
+ var useCreateAssortment = () => {
703
+ const [createAssortmentMutation, { data, error, loading }] = useMutation(CreateAssortmentMutation);
704
+ const createAssortment = async ({
705
+ isRoot = false,
706
+ tags = [],
707
+ texts
708
+ }) => {
709
+ return createAssortmentMutation({
710
+ variables: { assortment: { isRoot, tags }, texts },
711
+ refetchQueries: [
712
+ "Assortments",
713
+ "TranslatedAssortmentTexts",
714
+ "ShopStatus",
715
+ "ShopInfo"
716
+ ]
717
+ });
718
+ };
719
+ const newAssortment = data?.createAssortment;
720
+ return {
721
+ createAssortment,
722
+ loading,
723
+ newAssortment,
724
+ error
725
+ };
726
+ };
727
+ var useCreateAssortment_default = useCreateAssortment;
728
+
729
+ // src/modules/assortment/hooks/usePrepareAssortmentImport.ts
730
+ var normalizeAssortmentContent = (row) => {
731
+ const content = {};
732
+ const textPrefix = "texts.";
733
+ Object.entries(row).forEach(([key, value]) => {
734
+ if (!key.startsWith(textPrefix)) return;
735
+ const [, locale, field] = key.split(".");
736
+ content[locale] ||= {};
737
+ content[locale][field] = value || "";
738
+ });
739
+ Object.keys(content).forEach((locale) => {
740
+ if (!Object.values(content[locale]).every((v) => !v)) {
741
+ delete content[locale];
742
+ }
743
+ });
744
+ return Object.keys(content).length ? content : null;
745
+ };
746
+ var assortmentMapper = (row) => {
747
+ const content = normalizeAssortmentContent(row);
748
+ const meta = parseMeta_default(row["meta"]);
749
+ return {
750
+ _id: row["_id"] || void 0,
751
+ sequence: typeof row["sequence"] === "string" ? parseInt(row["sequence"] || "0", 10) : row["sequence"] || 0,
752
+ isActive: row["isActive"] === "true",
753
+ isRoot: row["isRoot"] === "true",
754
+ meta,
755
+ tags: row["tags"] ? row["tags"].split(";") : [],
756
+ content
757
+ };
758
+ };
759
+ var buildAssortmentEvents = ({
760
+ children,
761
+ products,
762
+ filters,
763
+ ...assortment
764
+ }) => {
765
+ return {
766
+ entity: "assortment",
767
+ operation: "CREATE",
768
+ payload: {
769
+ _id: assortment._id,
770
+ specification: {
771
+ ...assortment
772
+ },
773
+ products,
774
+ filters,
775
+ children
776
+ }
777
+ };
778
+ };
779
+ var usePrepareAssortmentImport = () => {
780
+ const prepareAssortmentImport = async ({
781
+ assortmentCSV,
782
+ assortmentProductsCSV,
783
+ assortmentChildrenCSV,
784
+ assortmentFiltersCSV
785
+ }) => {
786
+ return assortmentCSV.map((assortment) => {
787
+ const assortmentProducts = (assortmentProductsCSV || [])?.filter(
788
+ (p) => p.assortmentId === assortment._id
789
+ );
790
+ const assortmentLinks = (assortmentChildrenCSV || [])?.filter(
791
+ (l) => l.assortmentId === assortment._id
792
+ );
793
+ const assortmentFilters = (assortmentFiltersCSV || [])?.filter(
794
+ (f) => f.assortmentId === assortment._id
795
+ );
796
+ let children = void 0;
797
+ let filters = void 0;
798
+ let products = void 0;
799
+ if (assortmentProducts.length) {
800
+ products = assortmentProducts.map(
801
+ ({ productId, tags, sortKey, _id }) => ({
802
+ productId,
803
+ tags: tags ? tags.split(";") : [],
804
+ sortKey: sortKey ? Number(sortKey) : void 0,
805
+ _id
806
+ })
807
+ );
808
+ }
809
+ if (assortmentLinks.length) {
810
+ children = assortmentLinks.map(
811
+ ({ childAssortmentId, tags, sortKey, _id }) => ({
812
+ assortmentId: childAssortmentId,
813
+ tags: tags ? tags.split(";") : [],
814
+ sortKey: sortKey ? Number(sortKey) : void 0,
815
+ _id
816
+ })
817
+ );
818
+ }
819
+ if (assortmentFilters.length) {
820
+ filters = assortmentFilters.map(({ filterId, tags, sortKey, _id }) => ({
821
+ filterId,
822
+ tags: tags ? tags.split(";") : [],
823
+ sortKey: sortKey ? Number(sortKey) : void 0,
824
+ _id
825
+ }));
826
+ }
827
+ return buildAssortmentEvents({
828
+ ...assortmentMapper(assortment),
829
+ filters,
830
+ products,
831
+ children
832
+ });
833
+ });
834
+ };
835
+ return { prepareAssortmentImport };
836
+ };
837
+ var usePrepareAssortmentImport_default = usePrepareAssortmentImport;
838
+ var RemoveAssortmentMutation = gql`
839
+ mutation RemoveAssortment($assortmentId: ID!) {
840
+ removeAssortment(assortmentId: $assortmentId) {
841
+ _id
842
+ }
843
+ }
844
+ `;
845
+ var useRemoveAssortment = () => {
846
+ const [removeAssortmentMutation] = useMutation(RemoveAssortmentMutation);
847
+ const removeAssortment = async ({
848
+ assortmentId
849
+ }) => {
850
+ return removeAssortmentMutation({
851
+ variables: { assortmentId },
852
+ refetchQueries: ["Assortments", "Assortment", "ShopStatus", "ShopInfo"]
853
+ });
854
+ };
855
+ return {
856
+ removeAssortment
857
+ };
858
+ };
859
+ var useRemoveAssortment_default = useRemoveAssortment;
860
+ var RemoveAssortmentFilterMutation = gql`
861
+ mutation RemoveAssortmentFilter($assortmentFilterId: ID!) {
862
+ removeAssortmentFilter(assortmentFilterId: $assortmentFilterId) {
863
+ _id
864
+ }
865
+ }
866
+ `;
867
+ var useRemoveAssortmentFilter = () => {
868
+ const [removeAssortmentFilterMutation] = useMutation(RemoveAssortmentFilterMutation);
869
+ const removeAssortmentFilter = async ({
870
+ assortmentFilterId
871
+ }) => {
872
+ return removeAssortmentFilterMutation({
873
+ variables: { assortmentFilterId },
874
+ refetchQueries: ["AssortmentFilters"]
875
+ });
876
+ };
877
+ return {
878
+ removeAssortmentFilter
879
+ };
880
+ };
881
+ var useRemoveAssortmentFilter_default = useRemoveAssortmentFilter;
882
+ var RemoveAssortmentLinkMutation = gql`
883
+ mutation RemoveAssortmentLink($assortmentLinkId: ID!) {
884
+ removeAssortmentLink(assortmentLinkId: $assortmentLinkId) {
885
+ _id
886
+ }
887
+ }
888
+ `;
889
+ var useRemoveAssortmentLink = () => {
890
+ const [removeAssortmentLinkMutation] = useMutation(RemoveAssortmentLinkMutation);
891
+ const removeAssortmentLink = async ({
892
+ assortmentLinkId
893
+ }) => {
894
+ return removeAssortmentLinkMutation({
895
+ variables: { assortmentLinkId },
896
+ refetchQueries: ["AssortmentLinks"]
897
+ });
898
+ };
899
+ return {
900
+ removeAssortmentLink
901
+ };
902
+ };
903
+ var useRemoveAssortmentLink_default = useRemoveAssortmentLink;
904
+ var RemoveAssortmentMediaMutation = gql`
905
+ mutation RemoveAssortmentMedia($assortmentMediaId: ID!) {
906
+ removeAssortmentMedia(assortmentMediaId: $assortmentMediaId) {
907
+ _id
908
+ }
909
+ }
910
+ `;
911
+ var useRemoveAssortmentMedia = () => {
912
+ const [removeAssortmentMediaMutation] = useMutation(RemoveAssortmentMediaMutation);
913
+ const removeAssortmentMedia = async ({
914
+ assortmentMediaId
915
+ }) => {
916
+ return removeAssortmentMediaMutation({
917
+ variables: { assortmentMediaId },
918
+ refetchQueries: ["AssortmentMedia"]
919
+ });
920
+ };
921
+ return {
922
+ removeAssortmentMedia
923
+ };
924
+ };
925
+ var useRemoveAssortmentMedia_default = useRemoveAssortmentMedia;
926
+ var RemoveAssortmentProductMutation = gql`
927
+ mutation RemoveAssortmentProduct($assortmentProductId: ID!) {
928
+ removeAssortmentProduct(assortmentProductId: $assortmentProductId) {
929
+ _id
930
+ }
931
+ }
932
+ `;
933
+ var useRemoveAssortmentProduct = () => {
934
+ const [removeAssortmentProductMutation] = useMutation(RemoveAssortmentProductMutation);
935
+ const removeAssortmentProduct = async ({
936
+ assortmentProductId
937
+ }) => {
938
+ return removeAssortmentProductMutation({
939
+ variables: { assortmentProductId },
940
+ refetchQueries: ["AssortmentProducts"]
941
+ });
942
+ };
943
+ return {
944
+ removeAssortmentProduct
945
+ };
946
+ };
947
+ var useRemoveAssortmentProduct_default = useRemoveAssortmentProduct;
948
+ var ReorderAssortmentFiltersMutation = gql`
949
+ mutation ReorderAssortmentFilters(
950
+ $sortKeys: [ReorderAssortmentFilterInput!]!
951
+ ) {
952
+ reorderAssortmentFilters(sortKeys: $sortKeys) {
953
+ _id
954
+ sortKey
955
+ }
956
+ }
957
+ `;
958
+ var useReorderAssortmentFilters = () => {
959
+ const [reorderAssortmentFiltersMutation] = useMutation(ReorderAssortmentFiltersMutation);
960
+ const reorderAssortmentFilters = async ({
961
+ sortKeys
962
+ }) => {
963
+ return reorderAssortmentFiltersMutation({
964
+ variables: { sortKeys },
965
+ refetchQueries: ["AssortmentFilters"]
966
+ });
967
+ };
968
+ return {
969
+ reorderAssortmentFilters
970
+ };
971
+ };
972
+ var useReorderAssortmentFilters_default = useReorderAssortmentFilters;
973
+ var ReorderAssortmentLinkMutation = gql`
974
+ mutation ReorderAssortmentLinks($sortKeys: [ReorderAssortmentLinkInput!]!) {
975
+ reorderAssortmentLinks(sortKeys: $sortKeys) {
976
+ _id
977
+ sortKey
978
+ }
979
+ }
980
+ `;
981
+ var useReorderAssortmentLink = () => {
982
+ const [reorderAssortmentLinkMutation] = useMutation(ReorderAssortmentLinkMutation);
983
+ const reorderAssortmentLink = async ({
984
+ sortKeys
985
+ }) => {
986
+ return reorderAssortmentLinkMutation({
987
+ variables: { sortKeys },
988
+ refetchQueries: ["AssortmentLinks"]
989
+ });
990
+ };
991
+ return {
992
+ reorderAssortmentLink
993
+ };
994
+ };
995
+ var useReorderAssortmentLinks_default = useReorderAssortmentLink;
996
+ var ReorderAssortmentMediaMutation = gql`
997
+ mutation ReorderAssortmentMedia($sortKeys: [ReorderAssortmentMediaInput!]!) {
998
+ reorderAssortmentMedia(sortKeys: $sortKeys) {
999
+ _id
1000
+ sortKey
1001
+ }
1002
+ }
1003
+ `;
1004
+ var useReorderAssortmentMedia = () => {
1005
+ const [reorderAssortmentMediaMutation] = useMutation(ReorderAssortmentMediaMutation);
1006
+ const reorderAssortmentMedia = async ({
1007
+ sortKeys
1008
+ }) => {
1009
+ return reorderAssortmentMediaMutation({
1010
+ variables: { sortKeys },
1011
+ refetchQueries: ["AssortmentMedia"]
1012
+ });
1013
+ };
1014
+ return {
1015
+ reorderAssortmentMedia
1016
+ };
1017
+ };
1018
+ var useReorderAssortmentMedia_default = useReorderAssortmentMedia;
1019
+ var ReorderAssortmentProductsMutation = gql`
1020
+ mutation ReorderAssortmentProducts(
1021
+ $sortKeys: [ReorderAssortmentProductInput!]!
1022
+ ) {
1023
+ reorderAssortmentProducts(sortKeys: $sortKeys) {
1024
+ _id
1025
+ sortKey
1026
+ }
1027
+ }
1028
+ `;
1029
+ var useReorderAssortmentProducts = () => {
1030
+ const [reorderAssortmentProductsMutation] = useMutation(ReorderAssortmentProductsMutation);
1031
+ const reorderAssortmentProducts = async ({
1032
+ sortKeys
1033
+ }) => {
1034
+ return reorderAssortmentProductsMutation({
1035
+ variables: { sortKeys },
1036
+ refetchQueries: ["AssortmentProducts"]
1037
+ });
1038
+ };
1039
+ return {
1040
+ reorderAssortmentProducts
1041
+ };
1042
+ };
1043
+ var useReorderAssortmentProducts_default = useReorderAssortmentProducts;
1044
+ var AssortmentMediaTextsFragment = gql`
1045
+ fragment AssortmentMediaTextsFragment on AssortmentMediaTexts {
1046
+ _id
1047
+ locale
1048
+ title
1049
+ subtitle
1050
+ }
1051
+ `;
1052
+ var AssortmentMediaTextsFragment_default = AssortmentMediaTextsFragment;
1053
+
1054
+ // src/modules/assortment/hooks/useTranslatedAssortmentMediaTexts.ts
1055
+ var TranslatedAssortmentMediaTextsQuery = gql`
1056
+ query TranslatedAssortmentMediaTexts($assortmentMediaId: ID!) {
1057
+ translatedAssortmentMediaTexts(assortmentMediaId: $assortmentMediaId) {
1058
+ ...AssortmentMediaTextsFragment
1059
+ }
1060
+ }
1061
+ ${AssortmentMediaTextsFragment_default}
1062
+ `;
1063
+ var useTranslatedAssortmentMediaTexts = ({
1064
+ assortmentMediaId = null
1065
+ }) => {
1066
+ const { data, loading, error } = useQuery(TranslatedAssortmentMediaTextsQuery, {
1067
+ skip: !assortmentMediaId,
1068
+ variables: {
1069
+ assortmentMediaId
1070
+ }
1071
+ });
1072
+ const translatedAssortmentMediaTexts = data?.translatedAssortmentMediaTexts || [];
1073
+ return {
1074
+ loading,
1075
+ error,
1076
+ translatedAssortmentMediaTexts
1077
+ };
1078
+ };
1079
+ var useTranslatedAssortmentMediaTexts_default = useTranslatedAssortmentMediaTexts;
1080
+ var AssortmentTextsFragment = gql`
1081
+ fragment AssortmentTextsFragment on AssortmentTexts {
1082
+ _id
1083
+ locale
1084
+ slug
1085
+ title
1086
+ subtitle
1087
+ description
1088
+ }
1089
+ `;
1090
+ var AssortmentTextsFragment_default = AssortmentTextsFragment;
1091
+
1092
+ // src/modules/assortment/hooks/useTranslatedAssortmentTexts.ts
1093
+ var TranslatedAssortmentTextsQuery = gql`
1094
+ query TranslatedAssortmentTexts($assortmentId: ID!) {
1095
+ translatedAssortmentTexts(assortmentId: $assortmentId) {
1096
+ ...AssortmentTextsFragment
1097
+ }
1098
+ }
1099
+ ${AssortmentTextsFragment_default}
1100
+ `;
1101
+ var useTranslatedAssortmentTexts = ({
1102
+ assortmentId = null
1103
+ }) => {
1104
+ const { data, loading, error } = useQuery(TranslatedAssortmentTextsQuery, {
1105
+ skip: !assortmentId,
1106
+ variables: {
1107
+ assortmentId
1108
+ }
1109
+ });
1110
+ const translatedAssortmentTexts = data?.translatedAssortmentTexts || [];
1111
+ return {
1112
+ loading,
1113
+ error,
1114
+ translatedAssortmentTexts
1115
+ };
1116
+ };
1117
+ var useTranslatedAssortmentTexts_default = useTranslatedAssortmentTexts;
1118
+ var UpdateAssortmentMutation = gql`
1119
+ mutation UpdateAssortment(
1120
+ $assortment: UpdateAssortmentInput!
1121
+ $assortmentId: ID!
1122
+ ) {
1123
+ updateAssortment(assortment: $assortment, assortmentId: $assortmentId) {
1124
+ _id
1125
+ }
1126
+ }
1127
+ `;
1128
+ var useUpdateAssortment = () => {
1129
+ const [updateAssortmentMutation] = useMutation(UpdateAssortmentMutation);
1130
+ const updateAssortment = async ({
1131
+ assortmentId,
1132
+ assortment: { isRoot, tags, sequence, isActive }
1133
+ }) => {
1134
+ return updateAssortmentMutation({
1135
+ variables: {
1136
+ assortment: { isRoot, tags, sequence, isActive },
1137
+ assortmentId
1138
+ },
1139
+ refetchQueries: ["Assortments", "Assortment"]
1140
+ });
1141
+ };
1142
+ return {
1143
+ updateAssortment
1144
+ };
1145
+ };
1146
+ var useUpdateAssortment_default = useUpdateAssortment;
1147
+ var UpdateAssortmentMediaTextsMutation = gql`
1148
+ mutation UpdateAssortmentMediaTexts(
1149
+ $assortmentMediaId: ID!
1150
+ $texts: [AssortmentMediaTextInput!]!
1151
+ ) {
1152
+ updateAssortmentMediaTexts(
1153
+ assortmentMediaId: $assortmentMediaId
1154
+ texts: $texts
1155
+ ) {
1156
+ ...AssortmentMediaTextsFragment
1157
+ }
1158
+ }
1159
+ ${AssortmentMediaTextsFragment_default}
1160
+ `;
1161
+ var useUpdateAssortmentMediaTexts = () => {
1162
+ const [updateAssortmentMediaTextsMutation] = useMutation(UpdateAssortmentMediaTextsMutation);
1163
+ const updateAssortmentMediaTexts = async ({
1164
+ assortmentMediaId,
1165
+ texts
1166
+ }) => {
1167
+ return updateAssortmentMediaTextsMutation({
1168
+ variables: { assortmentMediaId, texts },
1169
+ refetchQueries: ["TranslatedAssortmentMediaTexts"]
1170
+ });
1171
+ };
1172
+ return {
1173
+ updateAssortmentMediaTexts
1174
+ };
1175
+ };
1176
+ var useUpdateAssortmentMediaTexts_default = useUpdateAssortmentMediaTexts;
1177
+ var UpdateAssortmentTextsMutation = gql`
1178
+ mutation updateAssortmentTexts(
1179
+ $assortmentId: ID!
1180
+ $texts: [AssortmentTextInput!]!
1181
+ ) {
1182
+ updateAssortmentTexts(assortmentId: $assortmentId, texts: $texts) {
1183
+ ...AssortmentTextsFragment
1184
+ }
1185
+ }
1186
+ ${AssortmentTextsFragment_default}
1187
+ `;
1188
+ var useUpdateAssortmentTexts = () => {
1189
+ const [updateAssortmentTextsMutation] = useMutation(UpdateAssortmentTextsMutation);
1190
+ const updateAssortmentTexts = async ({
1191
+ assortmentId,
1192
+ texts
1193
+ }) => {
1194
+ return updateAssortmentTextsMutation({
1195
+ variables: { assortmentId, texts },
1196
+ refetchQueries: ["TranslatedAssortmentTexts", "Assortment"]
1197
+ });
1198
+ };
1199
+ return {
1200
+ updateAssortmentTexts
1201
+ };
1202
+ };
1203
+ var useUpdateAssortmentTexts_default = useUpdateAssortmentTexts;
1204
+
1205
+ export { useAddAssortmentFilter_default as useAddAssortmentFilter, useAddAssortmentLink_default as useAddAssortmentLink, useAddAssortmentMedia_default as useAddAssortmentMedia, useAddAssortmentProduct_default as useAddAssortmentProduct, useAssortment_default as useAssortment, useAssortmentChildren_default as useAssortmentChildren, useAssortmentExport, useAssortmentFilters_default as useAssortmentFilters, useAssortmentLinks_default as useAssortmentLinks, useAssortmentMedia_default as useAssortmentMedia, useAssortmentPaths_default as useAssortmentPaths, useAssortmentProducts_default as useAssortmentProducts, useAssortments_default as useAssortments, useAssortmentsCount_default as useAssortmentsCount, useBulkAssortmentOperations_default as useBulkAssortmentOperations, useCreateAssortment_default as useCreateAssortment, usePrepareAssortmentImport_default as usePrepareAssortmentImport, useRemoveAssortment_default as useRemoveAssortment, useRemoveAssortmentFilter_default as useRemoveAssortmentFilter, useRemoveAssortmentLink_default as useRemoveAssortmentLink, useRemoveAssortmentMedia_default as useRemoveAssortmentMedia, useRemoveAssortmentProduct_default as useRemoveAssortmentProduct, useReorderAssortmentFilters_default as useReorderAssortmentFilters, useReorderAssortmentLinks_default as useReorderAssortmentLinks, useReorderAssortmentMedia_default as useReorderAssortmentMedia, useReorderAssortmentProducts_default as useReorderAssortmentProducts, useTranslatedAssortmentMediaTexts_default as useTranslatedAssortmentMediaTexts, useTranslatedAssortmentTexts_default as useTranslatedAssortmentTexts, useUpdateAssortment_default as useUpdateAssortment, useUpdateAssortmentMediaTexts_default as useUpdateAssortmentMediaTexts, useUpdateAssortmentTexts_default as useUpdateAssortmentTexts };