@veeqo/transfigure 0.0.1

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 (357) hide show
  1. package/README.md +54 -0
  2. package/dist/BusinessLogic/BusinessLogicManager.d.ts +6 -0
  3. package/dist/BusinessLogic/index.d.ts +4 -0
  4. package/dist/BusinessLogic/mocks.d.ts +10 -0
  5. package/dist/BusinessLogic/types.d.ts +18 -0
  6. package/dist/BusinessLogic/useBusinessLogic.d.ts +1 -0
  7. package/dist/api/createCustomView/createCustomView.d.ts +6 -0
  8. package/dist/api/createCustomView/index.d.ts +1 -0
  9. package/dist/api/deleteCustomView/deleteCustomView.d.ts +1 -0
  10. package/dist/api/deleteCustomView/index.d.ts +1 -0
  11. package/dist/api/index.d.ts +5 -0
  12. package/dist/api/patchCurrentUser/index.d.ts +1 -0
  13. package/dist/api/patchCurrentUser/patchCurrentUser.d.ts +1 -0
  14. package/dist/api/patchCustomView/index.d.ts +1 -0
  15. package/dist/api/patchCustomView/patchCustomView.d.ts +6 -0
  16. package/dist/api/types.d.ts +16 -0
  17. package/dist/axiosWrappers/axiosWrappers.d.ts +15 -0
  18. package/dist/axiosWrappers/axiosWrappers.test.d.ts +1 -0
  19. package/dist/axiosWrappers/constants.d.ts +10 -0
  20. package/dist/axiosWrappers/index.d.ts +1 -0
  21. package/dist/axiosWrappers/types.d.ts +6 -0
  22. package/dist/axiosWrappers/utils/filterErrorStack/filterErrorStack.d.ts +14 -0
  23. package/dist/axiosWrappers/utils/filterErrorStack/filterErrorStack.test.d.ts +1 -0
  24. package/dist/axiosWrappers/utils/filterErrorStack/index.d.ts +1 -0
  25. package/dist/axiosWrappers/utils/filteringUtils/filteringUtils.d.ts +3 -0
  26. package/dist/axiosWrappers/utils/filteringUtils/filteringUtils.test.d.ts +1 -0
  27. package/dist/axiosWrappers/utils/filteringUtils/index.d.ts +1 -0
  28. package/dist/axiosWrappers/utils/injectIntoError/index.d.ts +1 -0
  29. package/dist/axiosWrappers/utils/injectIntoError/injectIntoError.d.ts +18 -0
  30. package/dist/axiosWrappers/utils/injectIntoError/injectIntoError.test.d.ts +1 -0
  31. package/dist/axiosWrappers/utils/isError/index.d.ts +1 -0
  32. package/dist/axiosWrappers/utils/isError/isError.d.ts +4 -0
  33. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +17 -0
  34. package/dist/components/ErrorBoundary/index.d.ts +1 -0
  35. package/dist/components/Filters/ActiveFilters/ActiveFilterArrayTag/ActiveFilterArrayTag.d.ts +6 -0
  36. package/dist/components/Filters/ActiveFilters/ActiveFilterArrayTag/index.d.ts +1 -0
  37. package/dist/components/Filters/ActiveFilters/ActiveFilterDateRangeTag/ActiveFilterDateRangeTag.d.ts +6 -0
  38. package/dist/components/Filters/ActiveFilters/ActiveFilterDateRangeTag/index.d.ts +1 -0
  39. package/dist/components/Filters/ActiveFilters/ActiveFilterNumberRangeTag/ActiveFilterNumberRangeTag.d.ts +6 -0
  40. package/dist/components/Filters/ActiveFilters/ActiveFilterNumberRangeTag/index.d.ts +1 -0
  41. package/dist/components/Filters/ActiveFilters/ActiveFilterTag/ActiveFilterTag.d.ts +6 -0
  42. package/dist/components/Filters/ActiveFilters/ActiveFilterTag/index.d.ts +1 -0
  43. package/dist/components/Filters/ActiveFilters/ActiveFilters.d.ts +1 -0
  44. package/dist/components/Filters/ActiveFilters/index.d.ts +5 -0
  45. package/dist/components/Filters/AdaptiveHeightContainer/AdaptiveHeightContainer.d.ts +8 -0
  46. package/dist/components/Filters/AdaptiveHeightContainer/index.d.ts +1 -0
  47. package/dist/components/Filters/AdaptiveHeightContainer/styled.d.ts +3 -0
  48. package/dist/components/Filters/Fields/AsyncCheckboxFilter/AsyncCheckboxFilter.d.ts +6 -0
  49. package/dist/components/Filters/Fields/AsyncCheckboxFilter/index.d.ts +1 -0
  50. package/dist/components/Filters/Fields/AsyncInlineCheckboxFilter/AsyncInlineCheckboxFilter.d.ts +8 -0
  51. package/dist/components/Filters/Fields/AsyncInlineCheckboxFilter/index.d.ts +1 -0
  52. package/dist/components/Filters/Fields/AsyncInlineRadioFilter/AsyncInlineRadioFilter.d.ts +8 -0
  53. package/dist/components/Filters/Fields/AsyncInlineRadioFilter/index.d.ts +1 -0
  54. package/dist/components/Filters/Fields/AsyncRadioFilter/AsyncRadioFilter.d.ts +6 -0
  55. package/dist/components/Filters/Fields/AsyncRadioFilter/index.d.ts +1 -0
  56. package/dist/components/Filters/Fields/CheckboxFilter/CheckboxFilter.d.ts +6 -0
  57. package/dist/components/Filters/Fields/CheckboxFilter/index.d.ts +1 -0
  58. package/dist/components/Filters/Fields/DateRangeFilter/DateRangeFilter.d.ts +6 -0
  59. package/dist/components/Filters/Fields/DateRangeFilter/index.d.ts +1 -0
  60. package/dist/components/Filters/Fields/FilterArrayField/FilterArrayField.d.ts +8 -0
  61. package/dist/components/Filters/Fields/FilterArrayField/index.d.ts +1 -0
  62. package/dist/components/Filters/Fields/FilterField/FilterField.d.ts +8 -0
  63. package/dist/components/Filters/Fields/FilterField/index.d.ts +1 -0
  64. package/dist/components/Filters/Fields/FilterGroup/FilterGroup.d.ts +6 -0
  65. package/dist/components/Filters/Fields/FilterGroup/index.d.ts +1 -0
  66. package/dist/components/Filters/Fields/FilterNumberRangeFilter/FilterNumberRangeFilter.d.ts +9 -0
  67. package/dist/components/Filters/Fields/FilterNumberRangeFilter/index.d.ts +1 -0
  68. package/dist/components/Filters/Fields/MultipleFieldFilter/MultipleFieldFilter.d.ts +7 -0
  69. package/dist/components/Filters/Fields/MultipleFieldFilter/index.d.ts +1 -0
  70. package/dist/components/Filters/Fields/NumberRangeFilter/MuiSlider.d.ts +27 -0
  71. package/dist/components/Filters/Fields/NumberRangeFilter/NumberRangeFilter.d.ts +6 -0
  72. package/dist/components/Filters/Fields/NumberRangeFilter/index.d.ts +1 -0
  73. package/dist/components/Filters/Fields/RadioFilter/RadioFilter.d.ts +6 -0
  74. package/dist/components/Filters/Fields/RadioFilter/index.d.ts +1 -0
  75. package/dist/components/Filters/Fields/index.d.ts +13 -0
  76. package/dist/components/Filters/FiltersDropdown/FiltersDropdown.d.ts +2 -0
  77. package/dist/components/Filters/FiltersDropdown/index.d.ts +1 -0
  78. package/dist/components/Filters/FiltersList/FiltersList.d.ts +2 -0
  79. package/dist/components/Filters/FiltersList/index.d.ts +1 -0
  80. package/dist/components/Filters/index.d.ts +4 -0
  81. package/dist/components/SearchBar/SearchBar.d.ts +1 -0
  82. package/dist/components/SearchBar/index.d.ts +1 -0
  83. package/dist/components/Table/Table.d.ts +1 -0
  84. package/dist/components/ToastsManager/ToastsManager.d.ts +1 -0
  85. package/dist/components/ToastsManager/index.d.ts +1 -0
  86. package/dist/components/Views/CreateView/CreateView.d.ts +5 -0
  87. package/dist/components/Views/CreateView/index.d.ts +1 -0
  88. package/dist/components/Views/EditDropdown/EditDropdown.d.ts +7 -0
  89. package/dist/components/Views/EditDropdown/index.d.ts +1 -0
  90. package/dist/components/Views/OptionsDropdown/OptionsDropdown.d.ts +10 -0
  91. package/dist/components/Views/OptionsDropdown/index.d.ts +1 -0
  92. package/dist/components/Views/OptionsDropdown/styled.d.ts +17 -0
  93. package/dist/components/Views/PillNotifications/InfoPill.d.ts +1 -0
  94. package/dist/components/Views/PillNotifications/PillNotifications.d.ts +9 -0
  95. package/dist/components/Views/PillNotifications/index.d.ts +1 -0
  96. package/dist/components/Views/PillNotifications/styled.d.ts +33 -0
  97. package/dist/components/Views/SortableViews/LegacySortableViews.d.ts +3 -0
  98. package/dist/components/Views/SortableViews/SortableViews.d.ts +1 -0
  99. package/dist/components/Views/SortableViews/index.d.ts +1 -0
  100. package/dist/components/Views/SortableViews/styled.d.ts +8 -0
  101. package/dist/components/Views/UnsavedChanges/UnsavedChanges.d.ts +5 -0
  102. package/dist/components/Views/UnsavedChanges/index.d.ts +1 -0
  103. package/dist/components/Views/UnsavedChanges/styled.d.ts +33 -0
  104. package/dist/components/Views/ViewDropdowns/ViewDropdowns.d.ts +1 -0
  105. package/dist/components/Views/ViewDropdowns/index.d.ts +1 -0
  106. package/dist/components/Views/ViewList/ViewsList.d.ts +1 -0
  107. package/dist/components/Views/ViewList/index.d.ts +1 -0
  108. package/dist/components/Views/ViewList/styled.d.ts +2 -0
  109. package/dist/components/Views/ViewTab/Confirmation/Confirmation.d.ts +8 -0
  110. package/dist/components/Views/ViewTab/Confirmation/index.d.ts +1 -0
  111. package/dist/components/Views/ViewTab/ViewTab.d.ts +6 -0
  112. package/dist/components/Views/ViewTab/index.d.ts +1 -0
  113. package/dist/components/Views/constants.d.ts +10 -0
  114. package/dist/components/Views/index.d.ts +10 -0
  115. package/dist/constants/constants.d.ts +8 -0
  116. package/dist/constants/dateConstants.d.ts +17 -0
  117. package/dist/constants/index.d.ts +2 -0
  118. package/dist/context/ModalContext/ModalContext.d.ts +6 -0
  119. package/dist/context/ModalContext/hooks.d.ts +1 -0
  120. package/dist/context/ModalContext/index.d.ts +3 -0
  121. package/dist/context/ModalContext/mocks/mockUseModal.d.ts +6 -0
  122. package/dist/context/ModalContext/modalId.d.ts +3 -0
  123. package/dist/context/ModalContext/types.d.ts +7 -0
  124. package/dist/context/index.d.ts +1 -0
  125. package/dist/fetchers/constants.d.ts +12 -0
  126. package/dist/fetchers/fetchers.d.ts +12 -0
  127. package/dist/fetchers/index.d.ts +3 -0
  128. package/dist/fetchers/withCSRF.d.ts +2 -0
  129. package/dist/hooks/index.d.ts +9 -0
  130. package/dist/hooks/useCustomViews/index.d.ts +1 -0
  131. package/dist/hooks/useCustomViews/useCustomViews.d.ts +16 -0
  132. package/dist/hooks/useDropdownManager/index.d.ts +1 -0
  133. package/dist/hooks/useDropdownManager/useDropdownManager.d.ts +35 -0
  134. package/dist/hooks/useDuplicateActiveView/index.d.ts +1 -0
  135. package/dist/hooks/useDuplicateActiveView/useDuplicateActiveView.d.ts +3 -0
  136. package/dist/hooks/useFilterArrayLabel/index.d.ts +1 -0
  137. package/dist/hooks/useFilterArrayLabel/useFilterArrayLabel.d.ts +8 -0
  138. package/dist/hooks/useFilterLabel/index.d.ts +1 -0
  139. package/dist/hooks/useFilterLabel/useFilterLabel.d.ts +8 -0
  140. package/dist/hooks/usePersistUnsavedChanges/index.d.ts +1 -0
  141. package/dist/hooks/usePersistUnsavedChanges/usePersistUnsavedChanges.d.ts +18 -0
  142. package/dist/hooks/useStores/index.d.ts +1 -0
  143. package/dist/hooks/useStores/types.d.ts +8 -0
  144. package/dist/hooks/useStores/useStores.d.ts +2 -0
  145. package/dist/hooks/useViewUrlChange/index.d.ts +1 -0
  146. package/dist/hooks/useViewUrlChange/useViewUrlChange.d.ts +1 -0
  147. package/dist/hooks/useViews/index.d.ts +1 -0
  148. package/dist/hooks/useViews/useViews.d.ts +15 -0
  149. package/dist/index.cjs +1 -0
  150. package/dist/index.d.ts +15 -0
  151. package/dist/index.js +143 -0
  152. package/dist/index10.cjs +1 -0
  153. package/dist/index10.js +29 -0
  154. package/dist/index11.cjs +1 -0
  155. package/dist/index11.js +23 -0
  156. package/dist/index12.cjs +1 -0
  157. package/dist/index12.js +24 -0
  158. package/dist/index13.cjs +1 -0
  159. package/dist/index13.js +42 -0
  160. package/dist/index14.cjs +1 -0
  161. package/dist/index14.js +42 -0
  162. package/dist/index15.cjs +1 -0
  163. package/dist/index15.js +57 -0
  164. package/dist/index16.cjs +1 -0
  165. package/dist/index16.js +49 -0
  166. package/dist/index17.cjs +1 -0
  167. package/dist/index17.js +45 -0
  168. package/dist/index18.cjs +1 -0
  169. package/dist/index18.js +55 -0
  170. package/dist/index19.cjs +1 -0
  171. package/dist/index19.js +39 -0
  172. package/dist/index2.cjs +1 -0
  173. package/dist/index2.js +7 -0
  174. package/dist/index20.cjs +1 -0
  175. package/dist/index20.js +39 -0
  176. package/dist/index21.cjs +1 -0
  177. package/dist/index21.js +55 -0
  178. package/dist/index22.cjs +1 -0
  179. package/dist/index22.js +36 -0
  180. package/dist/index23.cjs +1 -0
  181. package/dist/index23.js +62 -0
  182. package/dist/index24.cjs +1 -0
  183. package/dist/index24.js +21 -0
  184. package/dist/index25.cjs +1 -0
  185. package/dist/index25.js +34 -0
  186. package/dist/index26.cjs +1 -0
  187. package/dist/index26.js +43 -0
  188. package/dist/index27.cjs +1 -0
  189. package/dist/index27.js +38 -0
  190. package/dist/index28.cjs +1 -0
  191. package/dist/index28.js +53 -0
  192. package/dist/index29.cjs +1 -0
  193. package/dist/index29.js +111 -0
  194. package/dist/index3.cjs +1 -0
  195. package/dist/index3.js +9 -0
  196. package/dist/index30.cjs +1 -0
  197. package/dist/index30.js +36 -0
  198. package/dist/index31.cjs +1 -0
  199. package/dist/index31.js +33 -0
  200. package/dist/index32.cjs +1 -0
  201. package/dist/index32.js +17 -0
  202. package/dist/index33.cjs +1 -0
  203. package/dist/index33.js +96 -0
  204. package/dist/index34.cjs +1 -0
  205. package/dist/index34.js +21 -0
  206. package/dist/index35.cjs +1 -0
  207. package/dist/index35.js +75 -0
  208. package/dist/index36.cjs +1 -0
  209. package/dist/index36.js +30 -0
  210. package/dist/index37.cjs +1 -0
  211. package/dist/index37.js +31 -0
  212. package/dist/index38.cjs +1 -0
  213. package/dist/index38.js +57 -0
  214. package/dist/index39.cjs +1 -0
  215. package/dist/index39.js +34 -0
  216. package/dist/index4.cjs +1 -0
  217. package/dist/index4.js +14 -0
  218. package/dist/index40.cjs +1 -0
  219. package/dist/index40.js +40 -0
  220. package/dist/index41.cjs +1 -0
  221. package/dist/index41.js +37 -0
  222. package/dist/index42.cjs +1 -0
  223. package/dist/index42.js +13 -0
  224. package/dist/index43.cjs +1 -0
  225. package/dist/index43.js +9 -0
  226. package/dist/index44.cjs +1 -0
  227. package/dist/index44.js +4 -0
  228. package/dist/index45.cjs +1 -0
  229. package/dist/index45.js +23 -0
  230. package/dist/index46.cjs +1 -0
  231. package/dist/index46.js +4 -0
  232. package/dist/index47.cjs +1 -0
  233. package/dist/index47.js +6 -0
  234. package/dist/index48.cjs +1 -0
  235. package/dist/index48.js +15 -0
  236. package/dist/index49.cjs +1 -0
  237. package/dist/index49.js +15 -0
  238. package/dist/index5.cjs +1 -0
  239. package/dist/index5.js +18 -0
  240. package/dist/index50.cjs +1 -0
  241. package/dist/index50.js +23 -0
  242. package/dist/index51.cjs +1 -0
  243. package/dist/index51.js +221 -0
  244. package/dist/index52.cjs +1 -0
  245. package/dist/index52.js +44 -0
  246. package/dist/index53.cjs +1 -0
  247. package/dist/index53.js +36 -0
  248. package/dist/index54.cjs +1 -0
  249. package/dist/index54.js +39 -0
  250. package/dist/index55.cjs +1 -0
  251. package/dist/index55.js +100 -0
  252. package/dist/index56.cjs +1 -0
  253. package/dist/index56.js +11 -0
  254. package/dist/index57.cjs +1 -0
  255. package/dist/index57.js +63 -0
  256. package/dist/index58.cjs +1 -0
  257. package/dist/index58.js +65 -0
  258. package/dist/index59.cjs +1 -0
  259. package/dist/index59.js +28 -0
  260. package/dist/index6.cjs +1 -0
  261. package/dist/index6.js +110 -0
  262. package/dist/index60.cjs +1 -0
  263. package/dist/index60.js +301 -0
  264. package/dist/index61.cjs +1 -0
  265. package/dist/index61.js +66 -0
  266. package/dist/index62.cjs +1 -0
  267. package/dist/index62.js +65 -0
  268. package/dist/index63.cjs +1 -0
  269. package/dist/index63.js +39 -0
  270. package/dist/index64.cjs +1 -0
  271. package/dist/index64.js +34 -0
  272. package/dist/index65.cjs +1 -0
  273. package/dist/index65.js +11 -0
  274. package/dist/index66.cjs +1 -0
  275. package/dist/index66.js +14 -0
  276. package/dist/index67.cjs +1 -0
  277. package/dist/index67.js +21 -0
  278. package/dist/index68.cjs +1 -0
  279. package/dist/index68.js +21 -0
  280. package/dist/index69.cjs +1 -0
  281. package/dist/index69.js +44 -0
  282. package/dist/index7.cjs +1 -0
  283. package/dist/index7.js +6 -0
  284. package/dist/index70.cjs +1 -0
  285. package/dist/index70.js +19 -0
  286. package/dist/index71.cjs +1 -0
  287. package/dist/index71.js +4 -0
  288. package/dist/index72.cjs +1 -0
  289. package/dist/index72.js +11 -0
  290. package/dist/index73.cjs +3 -0
  291. package/dist/index73.js +16 -0
  292. package/dist/index74.cjs +1 -0
  293. package/dist/index74.js +11 -0
  294. package/dist/index75.cjs +1 -0
  295. package/dist/index75.js +28 -0
  296. package/dist/index76.cjs +1 -0
  297. package/dist/index76.js +21 -0
  298. package/dist/index77.cjs +19 -0
  299. package/dist/index77.js +32 -0
  300. package/dist/index78.cjs +1 -0
  301. package/dist/index78.js +18 -0
  302. package/dist/index79.cjs +1 -0
  303. package/dist/index79.js +11 -0
  304. package/dist/index8.cjs +1 -0
  305. package/dist/index8.js +16 -0
  306. package/dist/index80.cjs +12 -0
  307. package/dist/index80.js +18 -0
  308. package/dist/index81.cjs +80 -0
  309. package/dist/index81.js +99 -0
  310. package/dist/index82.cjs +1 -0
  311. package/dist/index82.js +4 -0
  312. package/dist/index83.cjs +80 -0
  313. package/dist/index83.js +99 -0
  314. package/dist/index84.cjs +1 -0
  315. package/dist/index84.js +38 -0
  316. package/dist/index85.cjs +13 -0
  317. package/dist/index85.js +21 -0
  318. package/dist/index86.cjs +7 -0
  319. package/dist/index86.js +14 -0
  320. package/dist/index9.cjs +1 -0
  321. package/dist/index9.js +149 -0
  322. package/dist/mobx/Filters/Filters.d.ts +51 -0
  323. package/dist/mobx/Filters/index.d.ts +1 -0
  324. package/dist/mobx/MobXProvider/MobXProvider.d.ts +12 -0
  325. package/dist/mobx/MobXProvider/index.d.ts +1 -0
  326. package/dist/mobx/Notifications/Notifications.d.ts +13 -0
  327. package/dist/mobx/Notifications/index.d.ts +1 -0
  328. package/dist/mobx/NumberRangeFilter/NumberRangeFilter.d.ts +20 -0
  329. package/dist/mobx/NumberRangeFilter/index.d.ts +1 -0
  330. package/dist/mobx/RangeFilter/RangeFilter.d.ts +18 -0
  331. package/dist/mobx/RangeFilter/index.d.ts +1 -0
  332. package/dist/mobx/Views/Views.d.ts +10 -0
  333. package/dist/mobx/Views/index.d.ts +1 -0
  334. package/dist/mobx/index.d.ts +6 -0
  335. package/dist/setupTests.d.ts +0 -0
  336. package/dist/storybookHelpers/StoryWrapper.d.ts +13 -0
  337. package/dist/storybookHelpers/apiMocks/current_user.d.ts +272 -0
  338. package/dist/storybookHelpers/apiMocks/custom_views.d.ts +53 -0
  339. package/dist/storybookHelpers/constants.d.ts +5 -0
  340. package/dist/types.d.ts +93 -0
  341. package/dist/utils/createAllView/createAllView.d.ts +3 -0
  342. package/dist/utils/createAllView/createAllView.test.d.ts +1 -0
  343. package/dist/utils/createAllView/index.d.ts +1 -0
  344. package/dist/utils/getAsyncOptions/getAsyncOptions.d.ts +10 -0
  345. package/dist/utils/getAsyncOptions/getAsyncOptions.test.d.ts +1 -0
  346. package/dist/utils/getAsyncOptions/index.d.ts +1 -0
  347. package/dist/utils/getFetcherFunction/getFetcherFunction.d.ts +5 -0
  348. package/dist/utils/getFetcherFunction/getFetcherFunction.test.d.ts +1 -0
  349. package/dist/utils/getFetcherFunction/index.d.ts +1 -0
  350. package/dist/utils/index.d.ts +5 -0
  351. package/dist/utils/isValidDateRange/index.d.ts +1 -0
  352. package/dist/utils/isValidDateRange/isValidDateRange.d.ts +2 -0
  353. package/dist/utils/isValidDateRange/isValidDateRange.test.d.ts +1 -0
  354. package/dist/utils/viewsAdapter/index.d.ts +1 -0
  355. package/dist/utils/viewsAdapter/viewsAdapter.d.ts +7 -0
  356. package/dist/utils/viewsAdapter/viewsAdapter.test.d.ts +1 -0
  357. package/package.json +126 -0
@@ -0,0 +1,17 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { observer as e } from "mobx-react";
3
+ import { Stack as m } from "@veeqo/ui";
4
+ import { FilterGroup as s } from "./index26.js";
5
+ import { useBusinessLogic as p } from "./index7.js";
6
+ import { AdaptiveHeightContainer as n } from "./index75.js";
7
+ const u = e(() => {
8
+ const {
9
+ GROUP_MAP: t
10
+ } = p();
11
+ return /* @__PURE__ */ r(n, { style: {
12
+ minWidth: "360px"
13
+ }, children: /* @__PURE__ */ r(m, { alignX: "stretch", children: Array.from(t).map(([o, i]) => /* @__PURE__ */ r(s, { data: i }, o)) }) });
14
+ });
15
+ export {
16
+ u as FiltersList
17
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("react"),q=require("@veeqo/ui"),U=require("mobx-react"),W=require("./index59.cjs"),Y=require("./index57.cjs"),z=require("./index37.cjs"),G=require("./index40.cjs"),J=require("./index51.cjs"),K=require("./index7.cjs"),Q=require("./index56.cjs"),X=require("./index76.cjs"),Z=U.observer(({view:e})=>{const{VIEW_TYPE:S,SEARCH_FILTER_ID:l}=K.useBusinessLogic(),{Filters:{activeViewId:u,initFiltersFromView:d,discardChanges:w,initFromUrl:f,filters:x,setFilter:y},Views:{draftViewsMap:F},Notifications:{notify:L}}=Q.useStores(),{viewsMap:m,defaultCustomViewId:T,isLoading:N}=Y.useViews(),{isLoading:j,isValidating:E}=W.useCustomViews({type:S}),[s,M]=r.useState(null),R=i=>{const C=x.get(l);if(m.has(i)){const n=m.get(i);n&&(d(n),w(!0),f())}else{const n=F.get(i);n?(d(n),w(!0),f()):L({type:"error",text:"Failed to load view"})}C&&y(l,C)},a=(e==null?void 0:e.id)===u,t=e.originalView!==void 0,V=e.originalView===void 0,P="100",c=(e==null?void 0:e.label)||"",A=N||E||j,g=r.useRef(!1);!A&&!g.current&&a&&e.id===T&&s&&(g.current=!0,s&&u===e.id&&window.requestAnimationFrame(()=>{var i;(i=s.parentElement)==null||i.scrollBy({behavior:"smooth",left:s.offsetLeft})}));const h=r.useMemo(()=>t?"draft":e.editable?"saved":"fixed",[t,e.editable]),{actions:{create:{handleSaveDraft:B},menu:{toggleDropdown:p},delete:{closeDeleteConfirmation:I,handleDelete:_,handleDeleteDraftView:D}},state:{shouldShowDeleteConfirmation:k},actions:O,state:v}=J.useDropdownManager(e),H=r.useMemo(()=>{if(V)return p;if(t)return D},[D,t,V,p]);return o.jsxs(o.Fragment,{children:[o.jsx(q.ViewTab,{colourPalette:q.theme.colors.secondary.blue,className:"act-react-listing-custom-view",active:a,id:e==null?void 0:e.id,name:c,type:h,count:P,onClick:R,subAction:H,ariaContext:"orders",ref:M,"aria-controls":"options-dropdown","aria-expanded":v.shouldShowDropdown,"aria-haspopup":"dialog"},e==null?void 0:e.id),o.jsx(X.Confirmation,{shouldShow:k,viewName:c,onCancel:I,onDelete:_}),o.jsx(z.PillNotifications,{tabType:h,isActive:a,initialViewName:c,shouldShowCreateViewNotification:t,handleSaveDraft:B}),o.jsx(G.ViewDropdowns,{referenceElement:s,tab:e,...O,...v})]})});exports.ViewTab=Z;
@@ -0,0 +1,96 @@
1
+ import { jsxs as O, Fragment as U, jsx as s } from "react/jsx-runtime";
2
+ import { useState as W, useRef as Y, useMemo as C } from "react";
3
+ import { ViewTab as $, theme as z } from "@veeqo/ui";
4
+ import { observer as G } from "mobx-react";
5
+ import { useCustomViews as J } from "./index59.js";
6
+ import { useViews as K } from "./index57.js";
7
+ import { PillNotifications as Q } from "./index37.js";
8
+ import { ViewDropdowns as X } from "./index40.js";
9
+ import { useDropdownManager as Z } from "./index51.js";
10
+ import { useBusinessLogic as b } from "./index7.js";
11
+ import { useStores as ee } from "./index56.js";
12
+ import { Confirmation as ie } from "./index76.js";
13
+ const we = G(({
14
+ view: e
15
+ }) => {
16
+ const {
17
+ VIEW_TYPE: S,
18
+ SEARCH_FILTER_ID: l
19
+ } = b(), {
20
+ Filters: {
21
+ activeViewId: c,
22
+ initFiltersFromView: d,
23
+ discardChanges: f,
24
+ initFromUrl: m,
25
+ filters: F,
26
+ setFilter: L
27
+ },
28
+ Views: {
29
+ draftViewsMap: T
30
+ },
31
+ Notifications: {
32
+ notify: x
33
+ }
34
+ } = ee(), {
35
+ viewsMap: u,
36
+ defaultCustomViewId: y,
37
+ isLoading: E
38
+ } = K(), {
39
+ isLoading: N,
40
+ isValidating: A
41
+ } = J({
42
+ type: S
43
+ }), [o, M] = W(null), R = (i) => {
44
+ const v = F.get(l);
45
+ if (u.has(i)) {
46
+ const r = u.get(i);
47
+ r && (d(r), f(!0), m());
48
+ } else {
49
+ const r = T.get(i);
50
+ r ? (d(r), f(!0), m()) : x({
51
+ type: "error",
52
+ text: "Failed to load view"
53
+ });
54
+ }
55
+ v && L(l, v);
56
+ }, n = (e == null ? void 0 : e.id) === c, t = e.originalView !== void 0, w = e.originalView === void 0, I = "100", a = (e == null ? void 0 : e.label) || "", P = E || A || N, p = Y(!1);
57
+ !P && !p.current && n && e.id === y && o && (p.current = !0, o && c === e.id && window.requestAnimationFrame(() => {
58
+ var i;
59
+ (i = o.parentElement) == null || i.scrollBy({
60
+ behavior: "smooth",
61
+ left: o.offsetLeft
62
+ });
63
+ }));
64
+ const V = C(() => t ? "draft" : e.editable ? "saved" : "fixed", [t, e.editable]), {
65
+ actions: {
66
+ create: {
67
+ handleSaveDraft: _
68
+ },
69
+ menu: {
70
+ toggleDropdown: h
71
+ },
72
+ delete: {
73
+ closeDeleteConfirmation: j,
74
+ handleDelete: k,
75
+ handleDeleteDraftView: g
76
+ }
77
+ },
78
+ state: {
79
+ shouldShowDeleteConfirmation: B
80
+ },
81
+ actions: q,
82
+ state: D
83
+ } = Z(e), H = C(() => {
84
+ if (w) return h;
85
+ if (t) return g;
86
+ }, [g, t, w, h]);
87
+ return /* @__PURE__ */ O(U, { children: [
88
+ /* @__PURE__ */ s($, { colourPalette: z.colors.secondary.blue, className: "act-react-listing-custom-view", active: n, id: e == null ? void 0 : e.id, name: a, type: V, count: I, onClick: R, subAction: H, ariaContext: "orders", ref: M, "aria-controls": "options-dropdown", "aria-expanded": D.shouldShowDropdown, "aria-haspopup": "dialog" }, e == null ? void 0 : e.id),
89
+ /* @__PURE__ */ s(ie, { shouldShow: B, viewName: a, onCancel: j, onDelete: k }),
90
+ /* @__PURE__ */ s(Q, { tabType: V, isActive: n, initialViewName: a, shouldShowCreateViewNotification: t, handleSaveDraft: _ }),
91
+ /* @__PURE__ */ s(X, { referenceElement: o, tab: e, ...q, ...D })
92
+ ] });
93
+ });
94
+ export {
95
+ we as ViewTab
96
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@veeqo/components"),t=require("@veeqo/ui"),r=require("./index52.cjs"),{Glyph:s}=c.VeeqoCommon,l=({hideActionsPopover:i})=>{const{duplicateView:o}=r.useDuplicateActiveView(),n=()=>{o(),i()};return e.jsx(t.Button,{style:{width:"100%"},iconSlot:e.jsx(s,{name:"add",size:"sm",color:t.theme.colors.neutral.ink.base}),variant:"flat",onClick:n,children:"Create View"})};exports.CreateView=l;
@@ -0,0 +1,21 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { VeeqoCommon as r } from "@veeqo/components";
3
+ import { Button as n, theme as c } from "@veeqo/ui";
4
+ import { useDuplicateActiveView as l } from "./index52.js";
5
+ const {
6
+ Glyph: m
7
+ } = r, u = ({
8
+ hideActionsPopover: o
9
+ }) => {
10
+ const {
11
+ duplicateView: t
12
+ } = l(), i = () => {
13
+ t(), o();
14
+ };
15
+ return /* @__PURE__ */ e(n, { style: {
16
+ width: "100%"
17
+ }, iconSlot: /* @__PURE__ */ e(m, { name: "add", size: "sm", color: c.colors.neutral.ink.base }), variant: "flat", onClick: i, children: "Create View" });
18
+ };
19
+ export {
20
+ u as CreateView
21
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@veeqo/ui"),o=require("react-hook-form"),I=require("./index59.cjs"),f=require("./index42.cjs"),D=require("./index7.cjs"),d=60,_=({tab:n,viewName:w,shouldShowDropdown:v,onCloseDropdown:g,onDelete:p,onSave:x,headerText:j,e2ePrefix:a,activeOption:b})=>{const{VIEW_TYPE:C}=D.useBusinessLogic(),{canDeleteCustomViews:u,canUpdateCustomViews:r,canShareCustomViews:l,defaultCustomViewId:m}=I.useCustomViews({type:C}),S=n.id===m,{handleSubmit:y,control:c,formState:h}=o.useForm({mode:"onChange",defaultValues:{viewName:w,isDefault:n.id===m,shareOption:b.key}}),V=Object.values(f.SHARING_OPTIONS).map(s=>({key:s.key,value:s.key,label:s.text}));if(!v)return null;const k=n.originalView===void 0;return e.jsx("form",{onSubmit:y(x),children:e.jsxs(t.Card,{style:{width:"400px"},title:j,subtitle:"Active filters and sort direction will be saved in your view",onClose:g,renderFooter:()=>u||r||l?e.jsxs(t.Stack,{direction:"horizontal",alignX:"end",children:[u&&e.jsx(t.Button,{variant:"destructive",onClick:p,className:`act-react-listing-custom-view-${a}-delete`,children:"Delete"}),(r||l)&&e.jsx(t.Button,{variant:"primary",type:"submit",className:`act-react-listing-custom-view-${a}-save`,disabled:!h.isDirty&&k||h.isSubmitting,children:"Save"})]}):null,className:`act-react-listing-custom-view-${a}`,children:[!r&&e.jsx(t.Alert,{variant:"warning",title:"You need permission to edit this view",message:"This is a company shared view"}),e.jsxs(t.Stack,{children:[e.jsx(o.Controller,{name:"viewName",control:c,render:({onChange:s,value:i})=>e.jsx(t.TextField,{id:"view-name",className:`act-react-listing-custom-view-${a}-field`,label:"View name",placeholder:"View name",value:i,onChange:s,disabled:!n.editable,maxLength:d,hint:`${i.length} / ${d} characters`,required:!0})}),e.jsxs(t.Stack,{children:[e.jsx(t.Text,{variant:"inputLabel",children:"Sharing options"}),e.jsx("br",{}),e.jsx(o.Controller,{name:"shareOption",control:c,render:({onChange:s,value:i})=>e.jsx(t.SegmentedControl,{onChange:T=>l&&s(T),options:V,selected:i})})]}),e.jsx(o.Controller,{name:"isDefault",control:c,render:({onChange:s,value:i})=>e.jsx(t.Checkbox,{disabled:S,name:"makeViewDefault",label:"Make default view",checked:i,onChange:s,hint:"This will be the tab this page will always open on"})})]})]})})};exports.EditDropdown=_;exports.VIEWS_TITLE_MAX_CHAR_LIMIT=d;
@@ -0,0 +1,75 @@
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import { Card as x, Alert as O, Stack as c, TextField as _, Text as $, SegmentedControl as A, Checkbox as E, Button as w } from "@veeqo/ui";
3
+ import { useForm as L, Controller as d } from "react-hook-form";
4
+ import { useCustomViews as j } from "./index59.js";
5
+ import { SHARING_OPTIONS as F } from "./index42.js";
6
+ import { useBusinessLogic as M } from "./index7.js";
7
+ const p = 60, z = ({
8
+ tab: a,
9
+ viewName: v,
10
+ shouldShowDropdown: g,
11
+ onCloseDropdown: b,
12
+ onDelete: f,
13
+ onSave: C,
14
+ headerText: y,
15
+ e2ePrefix: n,
16
+ activeOption: S
17
+ }) => {
18
+ const {
19
+ VIEW_TYPE: V
20
+ } = M(), {
21
+ canDeleteCustomViews: m,
22
+ canUpdateCustomViews: o,
23
+ canShareCustomViews: r,
24
+ defaultCustomViewId: u
25
+ } = j({
26
+ type: V
27
+ }), k = a.id === u, {
28
+ handleSubmit: D,
29
+ control: l,
30
+ formState: h
31
+ } = L({
32
+ mode: "onChange",
33
+ defaultValues: {
34
+ viewName: v,
35
+ isDefault: a.id === u,
36
+ shareOption: S.key
37
+ }
38
+ }), T = Object.values(F).map((t) => ({
39
+ key: t.key,
40
+ value: t.key,
41
+ label: t.text
42
+ }));
43
+ if (!g) return null;
44
+ const I = a.originalView === void 0;
45
+ return /* @__PURE__ */ e("form", { onSubmit: D(C), children: /* @__PURE__ */ s(x, { style: {
46
+ width: "400px"
47
+ }, title: y, subtitle: "Active filters and sort direction will be saved in your view", onClose: b, renderFooter: () => m || o || r ? /* @__PURE__ */ s(c, { direction: "horizontal", alignX: "end", children: [
48
+ m && /* @__PURE__ */ e(w, { variant: "destructive", onClick: f, className: `act-react-listing-custom-view-${n}-delete`, children: "Delete" }),
49
+ (o || r) && /* @__PURE__ */ e(w, { variant: "primary", type: "submit", className: `act-react-listing-custom-view-${n}-save`, disabled: !h.isDirty && I || h.isSubmitting, children: "Save" })
50
+ ] }) : null, className: `act-react-listing-custom-view-${n}`, children: [
51
+ !o && /* @__PURE__ */ e(O, { variant: "warning", title: "You need permission to edit this view", message: "This is a company shared view" }),
52
+ /* @__PURE__ */ s(c, { children: [
53
+ /* @__PURE__ */ e(d, { name: "viewName", control: l, render: ({
54
+ onChange: t,
55
+ value: i
56
+ }) => /* @__PURE__ */ e(_, { id: "view-name", className: `act-react-listing-custom-view-${n}-field`, label: "View name", placeholder: "View name", value: i, onChange: t, disabled: !a.editable, maxLength: p, hint: `${i.length} / ${p} characters`, required: !0 }) }),
57
+ /* @__PURE__ */ s(c, { children: [
58
+ /* @__PURE__ */ e($, { variant: "inputLabel", children: "Sharing options" }),
59
+ /* @__PURE__ */ e("br", {}),
60
+ /* @__PURE__ */ e(d, { name: "shareOption", control: l, render: ({
61
+ onChange: t,
62
+ value: i
63
+ }) => /* @__PURE__ */ e(A, { onChange: (N) => r && t(N), options: T, selected: i }) })
64
+ ] }),
65
+ /* @__PURE__ */ e(d, { name: "isDefault", control: l, render: ({
66
+ onChange: t,
67
+ value: i
68
+ }) => /* @__PURE__ */ e(E, { disabled: k, name: "makeViewDefault", label: "Make default view", checked: i, onChange: t, hint: "This will be the tab this page will always open on" }) })
69
+ ] })
70
+ ] }) });
71
+ };
72
+ export {
73
+ z as EditDropdown,
74
+ p as VIEWS_TITLE_MAX_CHAR_LIMIT
75
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index77.cjs"),d=require("./index47.cjs"),u=require("./index46.cjs"),p=({tab:i,onMakeDefault:n,onEdit:o,onDuplicate:l,onDelete:s,shouldShowDropdown:c,handleCloseDropdown:a})=>{const{openModal:r}=d.useModal(),m=()=>{r(u.ModalId.ORDERS_TABLE_MANAGEMENT),a()};return c?e.jsxs(t.MenuItems,{children:[!i.default&&e.jsx(t.Item,{onClick:n,className:"act-react-listing-custom-view-make-default-menu-item",children:"Make default view"}),e.jsx(t.Item,{onClick:o,className:"act-react-listing-custom-view-edit-menu-item",role:"option",children:"Edit"}),e.jsx(t.Item,{onClick:l,className:"act-react-listing-custom-view-duplicate-menu-item",role:"option",children:"Duplicate"}),i.label!=="Picking In Progress"&&e.jsx(t.Item,{onClick:s,className:"act-react-listing-custom-view-delete-menu-item",role:"option",children:"Delete"}),e.jsx(t.Divider,{}),e.jsx(t.Item,{onClick:m,role:"option",children:"Table management"})]}):null};exports.OptionsDropdown=p;
@@ -0,0 +1,30 @@
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
+ import { MenuItems as u, Item as t, Divider as p } from "./index77.js";
3
+ import { useModal as g } from "./index47.js";
4
+ import { ModalId as k } from "./index46.js";
5
+ const w = ({
6
+ tab: i,
7
+ onMakeDefault: o,
8
+ onEdit: l,
9
+ onDuplicate: n,
10
+ onDelete: a,
11
+ shouldShowDropdown: c,
12
+ handleCloseDropdown: r
13
+ }) => {
14
+ const {
15
+ openModal: m
16
+ } = g(), s = () => {
17
+ m(k.ORDERS_TABLE_MANAGEMENT), r();
18
+ };
19
+ return c ? /* @__PURE__ */ d(u, { children: [
20
+ !i.default && /* @__PURE__ */ e(t, { onClick: o, className: "act-react-listing-custom-view-make-default-menu-item", children: "Make default view" }),
21
+ /* @__PURE__ */ e(t, { onClick: l, className: "act-react-listing-custom-view-edit-menu-item", role: "option", children: "Edit" }),
22
+ /* @__PURE__ */ e(t, { onClick: n, className: "act-react-listing-custom-view-duplicate-menu-item", role: "option", children: "Duplicate" }),
23
+ i.label !== "Picking In Progress" && /* @__PURE__ */ e(t, { onClick: a, className: "act-react-listing-custom-view-delete-menu-item", role: "option", children: "Delete" }),
24
+ /* @__PURE__ */ e(p, {}),
25
+ /* @__PURE__ */ e(t, { onClick: s, role: "option", children: "Table management" })
26
+ ] }) : null;
27
+ };
28
+ export {
29
+ w as OptionsDropdown
30
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react-transition-group"),f=require("mobx-react"),x=require("./index57.cjs"),v=require("./index78.cjs"),g=require("./index39.cjs"),h=require("./index56.cjs"),S=f.observer(({tabType:i,isActive:n,shouldShowCreateViewNotification:c,handleSaveDraft:s})=>{var r;const{Filters:{hasUnsavedChanges:l,discardChanges:u,activeViewId:t}}=h.useStores(),d=window.location.pathname==="/orders"?"orders":"variants",{viewsMap:m}=x.useViews(),o=t&&((r=m.get(t))==null?void 0:r.label)||"failure";return e.jsxs(e.Fragment,{children:[e.jsx(a.CSSTransition,{in:i==="draft"&&n&&c,timeout:200,classNames:"notification",unmountOnExit:!0,children:e.jsx(v.InfoPill,{onClick:s,mainEntityLabelPlural:d})}),i!=="fixed"&&o&&e.jsx(a.CSSTransition,{in:l&&n&&i==="saved",timeout:200,classNames:"notification",unmountOnExit:!0,children:e.jsx(g.UnsavedChangesPill,{viewName:o,onDiscard:()=>u(),onSaveDraft:s})})]})});exports.PillNotifications=S;
@@ -0,0 +1,31 @@
1
+ import { jsxs as u, Fragment as p, jsx as i } from "react/jsx-runtime";
2
+ import { CSSTransition as a } from "react-transition-group";
3
+ import { observer as h } from "mobx-react";
4
+ import { useViews as v } from "./index57.js";
5
+ import { InfoPill as w } from "./index78.js";
6
+ import { UnsavedChangesPill as x } from "./index39.js";
7
+ import { useStores as g } from "./index56.js";
8
+ const F = h(({
9
+ tabType: o,
10
+ isActive: n,
11
+ shouldShowCreateViewNotification: m,
12
+ handleSaveDraft: t
13
+ }) => {
14
+ var s;
15
+ const {
16
+ Filters: {
17
+ hasUnsavedChanges: l,
18
+ discardChanges: c,
19
+ activeViewId: r
20
+ }
21
+ } = g(), f = window.location.pathname === "/orders" ? "orders" : "variants", {
22
+ viewsMap: d
23
+ } = v(), e = r && ((s = d.get(r)) == null ? void 0 : s.label) || "failure";
24
+ return /* @__PURE__ */ u(p, { children: [
25
+ /* @__PURE__ */ i(a, { in: o === "draft" && n && m, timeout: 200, classNames: "notification", unmountOnExit: !0, children: /* @__PURE__ */ i(w, { onClick: t, mainEntityLabelPlural: f }) }),
26
+ o !== "fixed" && e && /* @__PURE__ */ i(a, { in: l && n && o === "saved", timeout: 200, classNames: "notification", unmountOnExit: !0, children: /* @__PURE__ */ i(x, { viewName: e, onDiscard: () => c(), onSaveDraft: t }) })
27
+ ] });
28
+ });
29
+ export {
30
+ F as PillNotifications
31
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react"),m=require("./index79.cjs"),g=require("./index59.cjs"),S=require("./index57.cjs"),b=require("./index3.cjs"),y=require("./index7.cjs"),V=require("./index56.cjs"),p=require("./index10.cjs"),q=()=>{const{VIEW_TYPE:n}=y.useBusinessLogic(),{sortedCustomViews:s,isLoading:u}=S.useViews(),{mutate:a}=g.useCustomViews({type:n}),[c,t]=d.useState(s),{Notifications:{notify:l}}=V.useStores(),w=async o=>{t(o);const r=o.map(e=>e.id);try{await b.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:r}}}),await a(e=>({...e,settings:{...e.settings,custom_view_positions:{...e.settings.custom_view_positions,order:r}}}),{revalidate:!1})}catch{t(s),l({type:"error",text:"Failed to update order of views"})}};return u||!s.length?null:i.jsx(p.ErrorBoundary,{children:i.jsx(m.LegacySortableViews,{views:c,onChange:w,className:"act-sortable-views"})})};exports.SortableViews=q;
@@ -0,0 +1,57 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useState as f } from "react";
3
+ import { LegacySortableViews as l } from "./index79.js";
4
+ import { useCustomViews as w } from "./index59.js";
5
+ import { useViews as d } from "./index57.js";
6
+ import { patchCurrentUser as g } from "./index3.js";
7
+ import { useBusinessLogic as _ } from "./index7.js";
8
+ import { useStores as S } from "./index56.js";
9
+ import { ErrorBoundary as b } from "./index10.js";
10
+ const N = () => {
11
+ const {
12
+ VIEW_TYPE: m
13
+ } = _(), {
14
+ sortedCustomViews: s,
15
+ isLoading: a
16
+ } = d(), {
17
+ mutate: n
18
+ } = w({
19
+ type: m
20
+ }), [u, o] = f(s), {
21
+ Notifications: {
22
+ notify: c
23
+ }
24
+ } = S(), p = async (e) => {
25
+ o(e);
26
+ const i = e.map((t) => t.id);
27
+ try {
28
+ await g({
29
+ user_setting_attributes: {
30
+ custom_view_positions: {
31
+ order: i
32
+ }
33
+ }
34
+ }), await n((t) => ({
35
+ ...t,
36
+ settings: {
37
+ ...t.settings,
38
+ custom_view_positions: {
39
+ ...t.settings.custom_view_positions,
40
+ order: i
41
+ }
42
+ }
43
+ }), {
44
+ revalidate: !1
45
+ });
46
+ } catch {
47
+ o(s), c({
48
+ type: "error",
49
+ text: "Failed to update order of views"
50
+ });
51
+ }
52
+ };
53
+ return a || !s.length ? null : /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(l, { views: u, onChange: p, className: "act-sortable-views" }) });
54
+ };
55
+ export {
56
+ N as SortableViews
57
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),s=require("@veeqo/ui"),h=require("mobx-react"),n=require("./index81.cjs"),u=require("./index55.cjs"),g=s.theme.colors.secondary.blue.base,v=h.observer(({onDiscard:i,viewName:t,onSaveDraft:c})=>{const{saveChanges:o,isSubmitting:r}=u.usePersistUnsavedChanges(),[d,a]=l.useState(!1);return e.jsx(n.Notification,{children:e.jsx(n.Container,{className:"act-react-listing-custom-notification-unsaved-changes",children:e.jsxs(s.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(n.Glyph,{name:"attention",color:g}),e.jsxs(n.Wrap,{children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"You have unsaved changes to"}),e.jsx(n.Bold,{variant:"bodyBoldDark",children:`'${t}'`})]}),e.jsx(n.Button,{className:"act-react-listing-custom-notification-unsaved-changes-discard",onClick:i,size:"sm",children:"Discard changes"}),e.jsxs(s.AnimatedDropdown,{reversed:!0,shouldShowDropdown:d,onClickAway:()=>a(!1),cta:e.jsx(n.Button,{className:"act-react-listing-custom-notification-unsaved-changes-toggle-dropdown",variant:"primary",onClick:()=>a(!0),size:"sm",dropdown:!0,children:"Save changes"}),children:[e.jsx(n.Item,{onClick:c,className:"act-react-listing-custom-notification-unsaved-changes-create-new-view",children:e.jsx(n.Text,{variant:"body",children:"Create new view"})}),e.jsxs(n.Item,{onClick:o,disabled:r,className:"act-react-listing-custom-notification-unsaved-changes-save-to-existing-view",children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"Save changes to"}),e.jsx(n.Text,{variant:"bodyBoldDark",children:t})]})]})]})})})});exports.UnsavedChangesPill=v;
@@ -0,0 +1,34 @@
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { useState as m } from "react";
3
+ import { Stack as g, theme as u, AnimatedDropdown as v } from "@veeqo/ui";
4
+ import { observer as p } from "mobx-react";
5
+ import { Notification as f, Container as w, Glyph as C, Wrap as b, Text as a, Bold as y, Button as o, Item as r } from "./index81.js";
6
+ import { usePersistUnsavedChanges as k } from "./index55.js";
7
+ const S = u.colors.secondary.blue.base, A = p(({
8
+ onDiscard: s,
9
+ viewName: i,
10
+ onSaveDraft: c
11
+ }) => {
12
+ const {
13
+ saveChanges: d,
14
+ isSubmitting: l
15
+ } = k(), [h, t] = m(!1);
16
+ return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(w, { className: "act-react-listing-custom-notification-unsaved-changes", children: /* @__PURE__ */ n(g, { direction: "horizontal", alignY: "center", children: [
17
+ /* @__PURE__ */ e(C, { name: "attention", color: S }),
18
+ /* @__PURE__ */ n(b, { children: [
19
+ /* @__PURE__ */ e(a, { variant: "body", margin: "0 4px 0 0", children: "You have unsaved changes to" }),
20
+ /* @__PURE__ */ e(y, { variant: "bodyBoldDark", children: `'${i}'` })
21
+ ] }),
22
+ /* @__PURE__ */ e(o, { className: "act-react-listing-custom-notification-unsaved-changes-discard", onClick: s, size: "sm", children: "Discard changes" }),
23
+ /* @__PURE__ */ n(v, { reversed: !0, shouldShowDropdown: h, onClickAway: () => t(!1), cta: /* @__PURE__ */ e(o, { className: "act-react-listing-custom-notification-unsaved-changes-toggle-dropdown", variant: "primary", onClick: () => t(!0), size: "sm", dropdown: !0, children: "Save changes" }), children: [
24
+ /* @__PURE__ */ e(r, { onClick: c, className: "act-react-listing-custom-notification-unsaved-changes-create-new-view", children: /* @__PURE__ */ e(a, { variant: "body", children: "Create new view" }) }),
25
+ /* @__PURE__ */ n(r, { onClick: d, disabled: l, className: "act-react-listing-custom-notification-unsaved-changes-save-to-existing-view", children: [
26
+ /* @__PURE__ */ e(a, { variant: "body", margin: "0 4px 0 0", children: "Save changes to" }),
27
+ /* @__PURE__ */ e(a, { variant: "bodyBoldDark", children: i })
28
+ ] })
29
+ ] })
30
+ ] }) }) });
31
+ });
32
+ export {
33
+ A as UnsavedChangesPill
34
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index6.cjs"),i=require("./index48.cjs"),o=require("./index49.cjs"),a=(t,{attributes:e})=>s.axios.patch(`/api/v2/custom_views/${t}`,{data:{attributes:e,type:"custom_view"}},i.withCSRF(o.vndAPI));exports.patchCustomView=a;
package/dist/index4.js ADDED
@@ -0,0 +1,14 @@
1
+ import { axios as i } from "./index6.js";
2
+ import { withCSRF as m } from "./index48.js";
3
+ import { vndAPI as p } from "./index49.js";
4
+ const c = (t, {
5
+ attributes: o
6
+ }) => i.patch(`/api/v2/custom_views/${t}`, {
7
+ data: {
8
+ attributes: o,
9
+ type: "custom_view"
10
+ }
11
+ }, m(p));
12
+ export {
13
+ c as patchCustomView
14
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@veeqo/ui"),p=require("./index42.cjs"),O=require("./index36.cjs"),c=require("./index35.cjs"),P=({referenceElement:t,tab:o,create:{handleCreate:w,closeCreateDropdown:u},menu:{handleSave:v,handleDuplicate:m,handleMakeDefault:x,closeDropdown:n},edit:{handleShowEditDropdown:S,closeEditDropdown:h},delete:{handleShowDeleteConfirmation:i,handleDelete:D},shouldShowDropdown:d,shouldShowEditDropdown:s,shouldShowCreateDropdown:l})=>{const a=o.isShared?p.SHARING_OPTIONS.COMPANY:p.SHARING_OPTIONS.PERSONAL;return e.jsxs(e.Fragment,{children:[d&&e.jsx(r.Popover,{anchorElement:t,placement:"bottom-start",onShouldClose:n,id:"options-dropdown",children:e.jsx(O.OptionsDropdown,{tab:o,onMakeDefault:x,onDelete:i,onDuplicate:m,onEdit:S,shouldShowDropdown:d,handleCloseDropdown:n})}),s&&e.jsx(r.Popover,{anchorElement:t,placement:"bottom-start",onShouldClose:n,id:"edit-dropdown",children:e.jsx(c.EditDropdown,{e2ePrefix:"edit-view-dropdown",viewName:o.label,shouldShowDropdown:s,onCloseDropdown:h,onSave:v,onDelete:D,headerText:"Edit view",tab:o,activeOption:a})}),l&&e.jsx(r.Popover,{anchorElement:t,placement:"bottom-start",onShouldClose:n,id:"create-dropdown",children:e.jsx(c.EditDropdown,{e2ePrefix:"create-view-dropdown",viewName:o.label,shouldShowDropdown:l,onCloseDropdown:u,onSave:w,onDelete:i,headerText:"Create new view",tab:o,activeOption:a})})]})};exports.ViewDropdowns=P;
@@ -0,0 +1,40 @@
1
+ import { jsxs as D, Fragment as N, jsx as o } from "react/jsx-runtime";
2
+ import { Popover as r } from "@veeqo/ui";
3
+ import { SHARING_OPTIONS as m } from "./index42.js";
4
+ import { OptionsDropdown as O } from "./index36.js";
5
+ import { EditDropdown as s } from "./index35.js";
6
+ const j = ({
7
+ referenceElement: n,
8
+ tab: e,
9
+ create: {
10
+ handleCreate: w,
11
+ closeCreateDropdown: c
12
+ },
13
+ menu: {
14
+ handleSave: h,
15
+ handleDuplicate: v,
16
+ handleMakeDefault: x,
17
+ closeDropdown: t
18
+ },
19
+ edit: {
20
+ handleShowEditDropdown: S,
21
+ closeEditDropdown: u
22
+ },
23
+ delete: {
24
+ handleShowDeleteConfirmation: d,
25
+ handleDelete: C
26
+ },
27
+ shouldShowDropdown: i,
28
+ shouldShowEditDropdown: l,
29
+ shouldShowCreateDropdown: p
30
+ }) => {
31
+ const a = e.isShared ? m.COMPANY : m.PERSONAL;
32
+ return /* @__PURE__ */ D(N, { children: [
33
+ i && /* @__PURE__ */ o(r, { anchorElement: n, placement: "bottom-start", onShouldClose: t, id: "options-dropdown", children: /* @__PURE__ */ o(O, { tab: e, onMakeDefault: x, onDelete: d, onDuplicate: v, onEdit: S, shouldShowDropdown: i, handleCloseDropdown: t }) }),
34
+ l && /* @__PURE__ */ o(r, { anchorElement: n, placement: "bottom-start", onShouldClose: t, id: "edit-dropdown", children: /* @__PURE__ */ o(s, { e2ePrefix: "edit-view-dropdown", viewName: e.label, shouldShowDropdown: l, onCloseDropdown: u, onSave: h, onDelete: C, headerText: "Edit view", tab: e, activeOption: a }) }),
35
+ p && /* @__PURE__ */ o(r, { anchorElement: n, placement: "bottom-start", onShouldClose: t, id: "create-dropdown", children: /* @__PURE__ */ o(s, { e2ePrefix: "create-view-dropdown", viewName: e.label, shouldShowDropdown: p, onCloseDropdown: c, onSave: w, onDelete: d, headerText: "Create new view", tab: e, activeOption: a }) })
36
+ ] });
37
+ };
38
+ export {
39
+ j as ViewDropdowns
40
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),V=require("mobx-react"),s=require("@veeqo/ui"),t=require("./index80.cjs"),j=require("./index38.cjs"),m=require("./index57.cjs"),S=require("./index58.cjs"),q=require("./index34.cjs"),u=require("./index33.cjs"),p=require("./index56.cjs"),a=require("./index10.cjs"),b=V.observer(()=>{const{Views:{draftViewsList:c}}=p.useStores(),{viewsArray:l,fixedViews:d}=m.useViews(),[o,i]=n.useState(!1),[w,x]=n.useState(null),h=()=>i(!1);return S.useViewUrlChange(),e.jsxs(e.Fragment,{children:[e.jsxs(s.ViewsContainer,{onClickMenu:()=>i(!0),ariaMenuControls:"views-menu",ariaMenuExpanded:o,ref:x,children:[l.map(r=>e.jsx(a.ErrorBoundary,{children:e.jsx(u.ViewTab,{view:r})},r.id)),c.map(r=>e.jsx(a.ErrorBoundary,{children:e.jsx(u.ViewTab,{view:r})},r.id))]}),o&&e.jsx(s.Popover,{id:"views-menu",anchorElement:w,placement:"bottom",onShouldClose:()=>i(!1),children:e.jsxs(s.Card.Surface,{children:[e.jsx(t.FixedViews,{children:d.map(r=>e.jsx(s.Text,{variant:"placeholder",children:r.label},r.id||r.label))}),e.jsx(j.SortableViews,{}),e.jsx(t.Divider,{}),e.jsx(q.CreateView,{hideActionsPopover:h})]})})]})});exports.ViewList=b;
@@ -0,0 +1,37 @@
1
+ import { jsxs as i, Fragment as u, jsx as e } from "react/jsx-runtime";
2
+ import { useState as n } from "react";
3
+ import { observer as h } from "mobx-react";
4
+ import { ViewsContainer as w, Popover as V, Card as v, Text as S } from "@veeqo/ui";
5
+ import { FixedViews as x, Divider as C } from "./index80.js";
6
+ import { SortableViews as b } from "./index38.js";
7
+ import { useViews as A } from "./index57.js";
8
+ import { useViewUrlChange as L } from "./index58.js";
9
+ import { CreateView as M } from "./index34.js";
10
+ import { ViewTab as s } from "./index33.js";
11
+ import { useStores as T } from "./index56.js";
12
+ import { ErrorBoundary as m } from "./index10.js";
13
+ const z = h(() => {
14
+ const {
15
+ Views: {
16
+ draftViewsList: l
17
+ }
18
+ } = T(), {
19
+ viewsArray: a,
20
+ fixedViews: d
21
+ } = A(), [t, o] = n(!1), [p, c] = n(null), f = () => o(!1);
22
+ return L(), /* @__PURE__ */ i(u, { children: [
23
+ /* @__PURE__ */ i(w, { onClickMenu: () => o(!0), ariaMenuControls: "views-menu", ariaMenuExpanded: t, ref: c, children: [
24
+ a.map((r) => /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(s, { view: r }) }, r.id)),
25
+ l.map((r) => /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(s, { view: r }) }, r.id))
26
+ ] }),
27
+ t && /* @__PURE__ */ e(V, { id: "views-menu", anchorElement: p, placement: "bottom", onShouldClose: () => o(!1), children: /* @__PURE__ */ i(v.Surface, { children: [
28
+ /* @__PURE__ */ e(x, { children: d.map((r) => /* @__PURE__ */ e(S, { variant: "placeholder", children: r.label }, r.id || r.label)) }),
29
+ /* @__PURE__ */ e(b, {}),
30
+ /* @__PURE__ */ e(C, {}),
31
+ /* @__PURE__ */ e(M, { hideActionsPopover: f })
32
+ ] }) })
33
+ ] });
34
+ });
35
+ export {
36
+ z as ViewList
37
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={PERSONAL:{key:"personal",text:"Personal"},COMPANY:{key:"company",text:"Company"}};exports.SHARING_OPTIONS=e;
@@ -0,0 +1,13 @@
1
+ const e = {
2
+ PERSONAL: {
3
+ key: "personal",
4
+ text: "Personal"
5
+ },
6
+ COMPANY: {
7
+ key: "company",
8
+ text: "Company"
9
+ }
10
+ };
11
+ export {
12
+ e as SHARING_OPTIONS
13
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("@veeqo/ui"),_={...T.DateRanges,CUSTOM:"CUSTOM"},A=new Map([["CUSTOM",T.DATE_RANGE_OPTIONS[0]],[_.TODAY,T.DATE_RANGE_OPTIONS[1]],[_.YESTERDAY,T.DATE_RANGE_OPTIONS[2]],[_.LAST_7_DAYS,T.DATE_RANGE_OPTIONS[3]],[_.LAST_30_DAYS,T.DATE_RANGE_OPTIONS[4]],[_.LAST_90_DAYS,T.DATE_RANGE_OPTIONS[5]],[_.LAST_MONTH,T.DATE_RANGE_OPTIONS[6]],[_.LAST_12_MONTHS,T.DATE_RANGE_OPTIONS[7]],[_.WEEK_TO_DATE,T.DATE_RANGE_OPTIONS[8]],[_.MONTH_TO_DATE,T.DATE_RANGE_OPTIONS[9]],[_.YEAR_TO_DATE,T.DATE_RANGE_OPTIONS[10]]]);exports.DateOptionMap=A;exports.DateValue=_;
@@ -0,0 +1,9 @@
1
+ import { DateRanges as A, DATE_RANGE_OPTIONS as T } from "@veeqo/ui";
2
+ const _ = {
3
+ ...A,
4
+ CUSTOM: "CUSTOM"
5
+ }, O = /* @__PURE__ */ new Map([["CUSTOM", T[0]], [_.TODAY, T[1]], [_.YESTERDAY, T[2]], [_.LAST_7_DAYS, T[3]], [_.LAST_30_DAYS, T[4]], [_.LAST_90_DAYS, T[5]], [_.LAST_MONTH, T[6]], [_.LAST_12_MONTHS, T[7]], [_.WEEK_TO_DATE, T[8]], [_.MONTH_TO_DATE, T[9]], [_.YEAR_TO_DATE, T[10]]]);
6
+ export {
7
+ O as DateOptionMap,
8
+ _ as DateValue
9
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var n=(r=>(r.TEXT="text",r.NUMBER="number",r.CHECKBOX="checkbox",r.RADIO="radio",r.DATE_RANGE="date_range",r.NUMBER_RANGE="number_range",r))(n||{});exports.FilterChoiceValue=n;
@@ -0,0 +1,4 @@
1
+ var n = /* @__PURE__ */ ((E) => (E.TEXT = "text", E.NUMBER = "number", E.CHECKBOX = "checkbox", E.RADIO = "radio", E.DATE_RANGE = "date_range", E.NUMBER_RANGE = "number_range", E))(n || {});
2
+ export {
3
+ n as FilterChoiceValue
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),e=require("react"),r=e.createContext(null),M=({children:u})=>{const[s,n]=e.useState(null),t=e.useCallback(o=>o===s,[s]),l=e.useCallback(()=>{n(null)},[]),a=e.useCallback(o=>{n(o)},[]),c=e.useCallback(o=>{t(o)?l():a(o)},[l,t,a]),d=e.useMemo(()=>({closeModal:l,isModalOpen:t,openModal:a,toggleModal:c}),[l,t,a,c]);return i.jsx(r.Provider,{value:d,children:u})};exports.ModalContext=r;exports.ModalProvider=M;
@@ -0,0 +1,23 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { useState as i, useCallback as n, useMemo as u, createContext as p } from "react";
3
+ const v = p(null), f = ({
4
+ children: r
5
+ }) => {
6
+ const [s, a] = i(null), e = n((o) => o === s, [s]), t = n(() => {
7
+ a(null);
8
+ }, []), l = n((o) => {
9
+ a(o);
10
+ }, []), c = n((o) => {
11
+ e(o) ? t() : l(o);
12
+ }, [t, e, l]), M = u(() => ({
13
+ closeModal: t,
14
+ isModalOpen: e,
15
+ openModal: l,
16
+ toggleModal: c
17
+ }), [t, e, l, c]);
18
+ return /* @__PURE__ */ d(v.Provider, { value: M, children: r });
19
+ };
20
+ export {
21
+ v as ModalContext,
22
+ f as ModalProvider
23
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=(e=>(e.ORDERS_TABLE_MANAGEMENT="ORDERS_TABLE_MANAGEMENT",e))(E||{});exports.ModalId=E;
@@ -0,0 +1,4 @@
1
+ var A = /* @__PURE__ */ ((E) => (E.ORDERS_TABLE_MANAGEMENT = "ORDERS_TABLE_MANAGEMENT", E))(A || {});
2
+ export {
3
+ A as ModalId
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index45.cjs"),o=()=>e.useContext(t.ModalContext);exports.useModal=o;
@@ -0,0 +1,6 @@
1
+ import { useContext as o } from "react";
2
+ import { ModalContext as t } from "./index45.js";
3
+ const m = () => o(t);
4
+ export {
5
+ m as useModal
6
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=(t={})=>{const{headers:r={}}=t,e=document.querySelector('meta[name="csrf-token"]'),n=e?e.content:null,o=window.localStorage.csrf||n;return o?{...t,headers:{...r,"x-csrf-token":o}}:t};exports.withCSRF=c;
@@ -0,0 +1,15 @@
1
+ const a = (t = {}) => {
2
+ const {
3
+ headers: n = {}
4
+ } = t, e = document.querySelector('meta[name="csrf-token"]'), r = e ? e.content : null, o = window.localStorage.csrf || r;
5
+ return o ? {
6
+ ...t,
7
+ headers: {
8
+ ...n,
9
+ "x-csrf-token": o
10
+ }
11
+ } : t;
12
+ };
13
+ export {
14
+ a as withCSRF
15
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n={headers:{Accept:"application/json","Content-Type":"application/json"}},o={headers:{"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"}};exports.onlyJSON=n;exports.vndAPI=o;