@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
package/dist/index.js ADDED
@@ -0,0 +1,143 @@
1
+ import { deleteCustomView as o } from "./index2.js";
2
+ import { patchCurrentUser as i } from "./index3.js";
3
+ import { patchCustomView as m } from "./index4.js";
4
+ import { createCustomView as x } from "./index5.js";
5
+ import { axios as s } from "./index6.js";
6
+ import { useBusinessLogic as n } from "./index7.js";
7
+ import { BusinessLogicManager as u } from "./index8.js";
8
+ import { setMockedBusinessLogic as d } from "./index9.js";
9
+ import { ErrorBoundary as w } from "./index10.js";
10
+ import { SearchBar as A } from "./index11.js";
11
+ import { ToastsManager as h } from "./index12.js";
12
+ import { ActiveFilterTag as b } from "./index13.js";
13
+ import { ActiveFilterArrayTag as D } from "./index14.js";
14
+ import { ActiveFilterDateRangeTag as M } from "./index15.js";
15
+ import { ActiveFilterNumberRangeTag as L } from "./index16.js";
16
+ import { ActiveFilters as S } from "./index17.js";
17
+ import { AsyncCheckboxFilter as I } from "./index18.js";
18
+ import { AsyncInlineCheckboxFilter as B } from "./index19.js";
19
+ import { AsyncInlineRadioFilter as U } from "./index20.js";
20
+ import { AsyncRadioFilter as E } from "./index21.js";
21
+ import { CheckboxFilter as J } from "./index22.js";
22
+ import { DateRangeFilter as _ } from "./index23.js";
23
+ import { FilterArrayField as q } from "./index24.js";
24
+ import { FilterField as K } from "./index25.js";
25
+ import { FilterGroup as W } from "./index26.js";
26
+ import { FilterNumberRangeFilter as Z } from "./index27.js";
27
+ import { MultipleFieldFilter as rr } from "./index28.js";
28
+ import { NumberRangeFilter as or } from "./index29.js";
29
+ import { RadioFilter as ir } from "./index30.js";
30
+ import { FiltersDropdown as mr } from "./index31.js";
31
+ import { FiltersList as xr } from "./index32.js";
32
+ import { ViewTab as sr } from "./index33.js";
33
+ import { CreateView as nr } from "./index34.js";
34
+ import { EditDropdown as ur } from "./index35.js";
35
+ import { OptionsDropdown as dr } from "./index36.js";
36
+ import { PillNotifications as wr } from "./index37.js";
37
+ import { SortableViews as Ar } from "./index38.js";
38
+ import { UnsavedChangesPill as hr } from "./index39.js";
39
+ import { ViewDropdowns as br } from "./index40.js";
40
+ import { ViewList as Dr } from "./index41.js";
41
+ import { SHARING_OPTIONS as Mr } from "./index42.js";
42
+ import { DateOptionMap as Lr, DateValue as Pr } from "./index43.js";
43
+ import { FilterChoiceValue as Tr } from "./index44.js";
44
+ import { ModalProvider as Or } from "./index45.js";
45
+ import { ModalId as kr } from "./index46.js";
46
+ import { useModal as Gr } from "./index47.js";
47
+ import { withCSRF as Hr } from "./index48.js";
48
+ import { onlyJSON as Xr, vndAPI as _r } from "./index49.js";
49
+ import { fetcherV1 as qr, fetcherV2 as zr } from "./index50.js";
50
+ import { useDropdownManager as Qr } from "./index51.js";
51
+ import { useDuplicateActiveView as Yr } from "./index52.js";
52
+ import { useFilterArrayLabel as $r } from "./index53.js";
53
+ import { useFilterLabel as ee } from "./index54.js";
54
+ import { usePersistUnsavedChanges as te } from "./index55.js";
55
+ import { useStores as pe } from "./index56.js";
56
+ import { useViews as fe } from "./index57.js";
57
+ import { useViewUrlChange as ae } from "./index58.js";
58
+ import { useCustomViews as le } from "./index59.js";
59
+ import { Filters as Fe } from "./index60.js";
60
+ import { NumberRangeFilter as ce } from "./index61.js";
61
+ import { RangeFilter as ge } from "./index62.js";
62
+ import { Views as Ve } from "./index63.js";
63
+ import { Notifications as Ce } from "./index64.js";
64
+ import { MobXProvider as Re } from "./index65.js";
65
+ import { getAsyncOptions as ve } from "./index66.js";
66
+ import { getFetcherFunction as ye } from "./index67.js";
67
+ import { isValidDateRange as Ne } from "./index68.js";
68
+ import { viewsAdapter as Pe } from "./index69.js";
69
+ import { createAllView as Te } from "./index70.js";
70
+ export {
71
+ D as ActiveFilterArrayTag,
72
+ M as ActiveFilterDateRangeTag,
73
+ L as ActiveFilterNumberRangeTag,
74
+ b as ActiveFilterTag,
75
+ S as ActiveFilters,
76
+ I as AsyncCheckboxFilter,
77
+ B as AsyncInlineCheckboxFilter,
78
+ U as AsyncInlineRadioFilter,
79
+ E as AsyncRadioFilter,
80
+ u as BusinessLogicManager,
81
+ J as CheckboxFilter,
82
+ nr as CreateView,
83
+ Lr as DateOptionMap,
84
+ _ as DateRangeFilter,
85
+ Pr as DateValue,
86
+ ur as EditDropdown,
87
+ w as ErrorBoundary,
88
+ q as FilterArrayField,
89
+ Tr as FilterChoiceValue,
90
+ K as FilterField,
91
+ W as FilterGroupComponent,
92
+ Z as FilterNumberRangeFilter,
93
+ Fe as Filters,
94
+ mr as FiltersDropdown,
95
+ xr as FiltersList,
96
+ Re as MobXProvider,
97
+ kr as ModalId,
98
+ Or as ModalProvider,
99
+ rr as MultipleFieldFilter,
100
+ Ce as Notifications,
101
+ or as NumberRangeFilter,
102
+ ce as NumberRangeFilterClass,
103
+ dr as OptionsDropdown,
104
+ wr as PillNotifications,
105
+ ir as RadioFilter,
106
+ ge as RangeFilter,
107
+ Mr as SHARING_OPTIONS,
108
+ A as SearchBar,
109
+ Ar as SortableViews,
110
+ h as ToastsManager,
111
+ hr as UnsavedChangesPill,
112
+ br as ViewDropdowns,
113
+ Dr as ViewList,
114
+ sr as ViewTab,
115
+ Ve as Views,
116
+ s as axios,
117
+ Te as createAllView,
118
+ x as createCustomView,
119
+ o as deleteCustomView,
120
+ qr as fetcherV1,
121
+ zr as fetcherV2,
122
+ ve as getAsyncOptions,
123
+ ye as getFetcherFunction,
124
+ Ne as isValidDateRange,
125
+ Xr as onlyJSON,
126
+ i as patchCurrentUser,
127
+ m as patchCustomView,
128
+ d as setMockedBusinessLogic,
129
+ n as useBusinessLogic,
130
+ le as useCustomViews,
131
+ Qr as useDropdownManager,
132
+ Yr as useDuplicateActiveView,
133
+ $r as useFilterArrayLabel,
134
+ ee as useFilterLabel,
135
+ Gr as useModal,
136
+ te as usePersistUnsavedChanges,
137
+ pe as useStores,
138
+ ae as useViewUrlChange,
139
+ fe as useViews,
140
+ Pe as viewsAdapter,
141
+ _r as vndAPI,
142
+ Hr as withCSRF
143
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("react");class n extends s.Component{constructor(r){super(r),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,e){console.log(r,e)}render(){const{hasError:r}=this.state,{children:e,errorComponent:t}=this.props;return r?t||o.jsx("p",{children:"Error"}):e}}exports.ErrorBoundary=n;
@@ -0,0 +1,29 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { Component as s } from "react";
3
+ class i extends s {
4
+ constructor(r) {
5
+ super(r), this.state = {
6
+ hasError: !1
7
+ };
8
+ }
9
+ static getDerivedStateFromError() {
10
+ return {
11
+ hasError: !0
12
+ };
13
+ }
14
+ componentDidCatch(r, o) {
15
+ console.log(r, o);
16
+ }
17
+ render() {
18
+ const {
19
+ hasError: r
20
+ } = this.state, {
21
+ children: o,
22
+ errorComponent: t
23
+ } = this.props;
24
+ return r ? t || /* @__PURE__ */ e("p", { children: "Error" }) : o;
25
+ }
26
+ }
27
+ export {
28
+ i as ErrorBoundary
29
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("mobx-react"),i=require("@veeqo/ui"),a=require("./index7.cjs"),l=require("./index56.cjs"),S=u.observer(()=>{const{SEARCH_FILTER_ID:e}=a.useBusinessLogic(),{Filters:{setFilter:s,filters:t}}=l.useStores(),n=t.get(e),o=c=>{s(e,c)};return r.jsx("div",{style:{flexGrow:1},children:r.jsx(i.Search,{value:n,onChange:o})})});exports.SearchBar=S;
@@ -0,0 +1,23 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { observer as i } from "mobx-react";
3
+ import { Search as a } from "@veeqo/ui";
4
+ import { useBusinessLogic as c } from "./index7.js";
5
+ import { useStores as l } from "./index56.js";
6
+ const d = i(() => {
7
+ const {
8
+ SEARCH_FILTER_ID: e
9
+ } = c(), {
10
+ Filters: {
11
+ setFilter: o,
12
+ filters: t
13
+ }
14
+ } = l(), n = t.get(e);
15
+ return /* @__PURE__ */ r("div", { style: {
16
+ flexGrow: 1
17
+ }, children: /* @__PURE__ */ r(a, { value: n, onChange: (s) => {
18
+ o(e, s);
19
+ } }) });
20
+ });
21
+ export {
22
+ d as SearchBar
23
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("@veeqo/ui"),n=require("mobx-react"),u=require("react"),a=require("./index56.cjs"),c=n.observer(()=>{const{Notifications:{toasts:e,removeByKey:t}}=a.useStores();return u.useEffect(()=>{if(e.length>0){const s=e[0],o=setTimeout(()=>{t(s.key)},2e3);return()=>clearTimeout(o)}},[e,t]),r.jsx(i.ToastsLayout,{max:10,minWidth:"",toasts:e,onClose:t})});exports.ToastsManager=c;
@@ -0,0 +1,24 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { ToastsLayout as m } from "@veeqo/ui";
3
+ import { observer as i } from "mobx-react";
4
+ import { useEffect as n } from "react";
5
+ import { useStores as a } from "./index56.js";
6
+ const y = i(() => {
7
+ const {
8
+ Notifications: {
9
+ toasts: o,
10
+ removeByKey: t
11
+ }
12
+ } = a();
13
+ return n(() => {
14
+ if (o.length > 0) {
15
+ const r = o[0], e = setTimeout(() => {
16
+ t(r.key);
17
+ }, 2e3);
18
+ return () => clearTimeout(e);
19
+ }
20
+ }, [o, t]), /* @__PURE__ */ s(m, { max: 10, minWidth: "", toasts: o, onClose: t });
21
+ });
22
+ export {
23
+ y as ToastsManager
24
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),m=require("mobx-react"),t=require("@veeqo/ui"),x=require("./index54.cjs"),g=require("./index25.cjs"),j=require("./index56.cjs"),p=m.observer(({filterData:i})=>{const{Filters:{filters:l,clearFilter:o,setFilter:d}}=j.useStores(),s=l.get(i.id),{filterLabel:a}=x.useFilterLabel({filterData:i}),[r,n]=c.useState(s||"");c.useEffect(()=>{r!==s&&n(s||"")},[i.id,s,l]);const u=()=>{o(i.id)},F=()=>{d(i.id,r)};return e.jsx(t.FilterTag,{shouldCloseOnClickAway:!0,header:e.jsx("div",{children:"Edit filter (style and semant me pls)"}),label:i.label,text:a||"Loading...",content:e.jsx(t.BaseContainer,{style:{padding:t.theme.sizes.md},children:e.jsx(g.FilterField,{data:i,editedValue:r,setEditedValue:h=>n(h)})}),footer:e.jsx(t.BaseContainer,{style:{padding:t.theme.sizes.sm,width:"200px"},children:e.jsxs(t.Stack,{direction:"horizontal",alignX:"end",children:[e.jsx(t.Button,{variant:"default",size:"sm",onClick:u,children:"Clear"}),e.jsx(t.Button,{variant:"primary",size:"sm",onClick:F,children:"Apply"})]})})})});exports.ActiveFilterTag=p;
@@ -0,0 +1,42 @@
1
+ import { jsx as t, jsxs as f } from "react/jsx-runtime";
2
+ import { useState as F, useEffect as g } from "react";
3
+ import { observer as v } from "mobx-react";
4
+ import { FilterTag as y, BaseContainer as o, theme as n, Stack as C, Button as d } from "@veeqo/ui";
5
+ import { useFilterLabel as b } from "./index54.js";
6
+ import { FilterField as x } from "./index25.js";
7
+ import { useStores as z } from "./index56.js";
8
+ const w = v(({
9
+ filterData: e
10
+ }) => {
11
+ const {
12
+ Filters: {
13
+ filters: l,
14
+ clearFilter: c,
15
+ setFilter: a
16
+ }
17
+ } = z(), i = l.get(e.id), {
18
+ filterLabel: m
19
+ } = b({
20
+ filterData: e
21
+ }), [r, s] = F(i || "");
22
+ g(() => {
23
+ r !== i && s(i || "");
24
+ }, [e.id, i, l]);
25
+ const p = () => {
26
+ c(e.id);
27
+ }, u = () => {
28
+ a(e.id, r);
29
+ };
30
+ return /* @__PURE__ */ t(y, { shouldCloseOnClickAway: !0, header: /* @__PURE__ */ t("div", { children: "Edit filter (style and semant me pls)" }), label: e.label, text: m || "Loading...", content: /* @__PURE__ */ t(o, { style: {
31
+ padding: n.sizes.md
32
+ }, children: /* @__PURE__ */ t(x, { data: e, editedValue: r, setEditedValue: (h) => s(h) }) }), footer: /* @__PURE__ */ t(o, { style: {
33
+ padding: n.sizes.sm,
34
+ width: "200px"
35
+ }, children: /* @__PURE__ */ f(C, { direction: "horizontal", alignX: "end", children: [
36
+ /* @__PURE__ */ t(d, { variant: "default", size: "sm", onClick: p, children: "Clear" }),
37
+ /* @__PURE__ */ t(d, { variant: "primary", size: "sm", onClick: u, children: "Apply" })
38
+ ] }) }) });
39
+ });
40
+ export {
41
+ w as ActiveFilterTag
42
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),A=require("mobx-react"),r=require("@veeqo/ui"),h=require("./index53.cjs"),m=require("./index24.cjs"),x=require("./index56.cjs"),j=A.observer(({filterData:t})=>{const{Filters:{arrayFilters:l,clearArrayFilter:c,setArrayFilter:d}}=x.useStores(),i=l.get(t.id),[s,n]=a.useState(i||[]);a.useEffect(()=>{s!==i&&n(i||[])},[t.id,i,l]);const o=()=>{c(t.id)},u=()=>{d(t.id,s)},{filterLabel:y}=h.useFilterArrayLabel({filterData:t});return e.jsx(r.FilterTag,{shouldCloseOnClickAway:!0,header:e.jsx("div",{children:"Edit filter (style and semant me pls)"}),label:t.label,text:y||"",content:e.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.md},children:e.jsx(m.FilterArrayField,{data:t,editedValue:s||[],setEditedValue:F=>n(F)})}),footer:e.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.sm,width:"200px"},children:e.jsxs(r.Stack,{direction:"horizontal",alignX:"end",children:[e.jsx(r.Button,{variant:"default",size:"sm",onClick:o,children:"Clear"}),e.jsx(r.Button,{variant:"primary",size:"sm",onClick:u,children:"Apply"})]})})})});exports.ActiveFilterArrayTag=j;
@@ -0,0 +1,42 @@
1
+ import { jsx as r, jsxs as h } from "react/jsx-runtime";
2
+ import { useState as F, useEffect as A } from "react";
3
+ import { observer as f } from "mobx-react";
4
+ import { FilterTag as v, BaseContainer as o, theme as d, Stack as g, Button as n } from "@veeqo/ui";
5
+ import { useFilterArrayLabel as C } from "./index53.js";
6
+ import { FilterArrayField as b } from "./index24.js";
7
+ import { useStores as x } from "./index56.js";
8
+ const B = f(({
9
+ filterData: e
10
+ }) => {
11
+ const {
12
+ Filters: {
13
+ arrayFilters: l,
14
+ clearArrayFilter: a,
15
+ setArrayFilter: c
16
+ }
17
+ } = x(), t = l.get(e.id), [i, s] = F(t || []);
18
+ A(() => {
19
+ i !== t && s(t || []);
20
+ }, [e.id, t, l]);
21
+ const m = () => {
22
+ a(e.id);
23
+ }, p = () => {
24
+ c(e.id, i);
25
+ }, {
26
+ filterLabel: u
27
+ } = C({
28
+ filterData: e
29
+ });
30
+ return /* @__PURE__ */ r(v, { shouldCloseOnClickAway: !0, header: /* @__PURE__ */ r("div", { children: "Edit filter (style and semant me pls)" }), label: e.label, text: u || "", content: /* @__PURE__ */ r(o, { style: {
31
+ padding: d.sizes.md
32
+ }, children: /* @__PURE__ */ r(b, { data: e, editedValue: i || [], setEditedValue: (y) => s(y) }) }), footer: /* @__PURE__ */ r(o, { style: {
33
+ padding: d.sizes.sm,
34
+ width: "200px"
35
+ }, children: /* @__PURE__ */ h(g, { direction: "horizontal", alignX: "end", children: [
36
+ /* @__PURE__ */ r(n, { variant: "default", size: "sm", onClick: m, children: "Clear" }),
37
+ /* @__PURE__ */ r(n, { variant: "primary", size: "sm", onClick: p, children: "Apply" })
38
+ ] }) }) });
39
+ });
40
+ export {
41
+ B as ActiveFilterArrayTag
42
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),x=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index62.cjs"),A=require("./index7.cjs"),j=require("./index56.cjs"),v=x.observer(({filterData:i})=>{const{DEFAULT_DATE_PRESET:g,DEFAULT_DATE_RANGE:d}=A.useBusinessLogic(),{Filters:{dateRangeFilters:l,clearRangeFilter:u,setRangeFilter:F}}=j.useStores(),t=l.get(i.id),[e,a]=c.useState(l.get(i.id)),R=()=>{const s=new o.RangeFilter;return s.setFilterType(t==null?void 0:t.filterType),a(s),s};c.useEffect(()=>{if(!t)return;const s=new o.RangeFilter;s.setFilterType(t.filterType),t.gte&&t.lte&&s.setDates(t.gte,t.lte),a(s)},[t]);const p=()=>{u(i.id)},y=()=>{t&&(e!=null&&e.filterType)&&F({dates:{start:e.gte,end:e.lte},key:e.filterType,range:t})},h=(e==null?void 0:e.filterSelection)||g,T=s=>{s&&(e||R(),e==null||e.setFilterType(s.value))},f=s=>{!s||!e||e.setDates(s.start,s.end)},m=e?e.selectedRange:d;return r.jsx(n.FilterTag,{shouldCloseOnClickAway:!0,header:r.jsx("div",{children:"Edit filter (style and semant me pls)"}),label:i.label,text:(t==null?void 0:t.filterLabel)||"",content:r.jsx(n.BaseContainer,{style:{padding:n.theme.sizes.md},children:r.jsx(n.DateRangePicker,{"aria-label":`date range for ${i.label}`,selectedPreset:h,setSelectedPreset:T,selectedRange:m,setSelectedRange:f})}),footer:r.jsx(n.BaseContainer,{style:{padding:n.theme.sizes.sm,width:"200px"},children:r.jsxs(n.Stack,{direction:"horizontal",alignX:"end",children:[r.jsx(n.Button,{variant:"default",size:"sm",onClick:p,children:"Clear"}),r.jsx(n.Button,{variant:"primary",size:"sm",onClick:y,children:"Apply"})]})})})});exports.ActiveFilterDateRangeTag=v;
@@ -0,0 +1,57 @@
1
+ import { jsx as n, jsxs as u } from "react/jsx-runtime";
2
+ import { useState as v, useEffect as C } from "react";
3
+ import { observer as S } from "mobx-react";
4
+ import { FilterTag as b, BaseContainer as a, theme as o, Stack as k, Button as c, DateRangePicker as P } from "@veeqo/ui";
5
+ import { RangeFilter as g } from "./index62.js";
6
+ import { useBusinessLogic as w } from "./index7.js";
7
+ import { useStores as x } from "./index56.js";
8
+ const G = S(({
9
+ filterData: i
10
+ }) => {
11
+ const {
12
+ DEFAULT_DATE_PRESET: d,
13
+ DEFAULT_DATE_RANGE: p
14
+ } = w(), {
15
+ Filters: {
16
+ dateRangeFilters: s,
17
+ clearRangeFilter: m,
18
+ setRangeFilter: f
19
+ }
20
+ } = x(), t = s.get(i.id), [e, l] = v(s.get(i.id)), F = () => {
21
+ const r = new g();
22
+ return r.setFilterType(t == null ? void 0 : t.filterType), l(r), r;
23
+ };
24
+ C(() => {
25
+ if (!t) return;
26
+ const r = new g();
27
+ r.setFilterType(t.filterType), t.gte && t.lte && r.setDates(t.gte, t.lte), l(r);
28
+ }, [t]);
29
+ const h = () => {
30
+ m(i.id);
31
+ }, y = () => {
32
+ t && (e != null && e.filterType) && f({
33
+ dates: {
34
+ start: e.gte,
35
+ end: e.lte
36
+ },
37
+ key: e.filterType,
38
+ range: t
39
+ });
40
+ }, R = (e == null ? void 0 : e.filterSelection) || d, T = (r) => {
41
+ r && (e || F(), e == null || e.setFilterType(r.value));
42
+ }, A = (r) => {
43
+ !r || !e || e.setDates(r.start, r.end);
44
+ }, E = e ? e.selectedRange : p;
45
+ return /* @__PURE__ */ n(b, { shouldCloseOnClickAway: !0, header: /* @__PURE__ */ n("div", { children: "Edit filter (style and semant me pls)" }), label: i.label, text: (t == null ? void 0 : t.filterLabel) || "", content: /* @__PURE__ */ n(a, { style: {
46
+ padding: o.sizes.md
47
+ }, children: /* @__PURE__ */ n(P, { "aria-label": `date range for ${i.label}`, selectedPreset: R, setSelectedPreset: T, selectedRange: E, setSelectedRange: A }) }), footer: /* @__PURE__ */ n(a, { style: {
48
+ padding: o.sizes.sm,
49
+ width: "200px"
50
+ }, children: /* @__PURE__ */ u(k, { direction: "horizontal", alignX: "end", children: [
51
+ /* @__PURE__ */ n(c, { variant: "default", size: "sm", onClick: h, children: "Clear" }),
52
+ /* @__PURE__ */ n(c, { variant: "primary", size: "sm", onClick: y, children: "Apply" })
53
+ ] }) }) });
54
+ });
55
+ export {
56
+ G as ActiveFilterDateRangeTag
57
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("react"),b=require("mobx-react"),r=require("@veeqo/ui"),F=require("./index61.cjs"),R=require("./index27.cjs"),h=require("./index56.cjs"),x=b.observer(({filterData:i})=>{const{Filters:{numberRangeFilters:o,clearNumberRangeFilter:u,setNumberRangeFilter:d}}=h.useStores(),e=o.get(i.id),[s,a]=l.useState(e),c=l.useCallback(()=>{const n=new F.NumberRangeFilter({filterId:i.id});return e&&(e.gte&&n.setGte(e.gte),e.lte&&n.setLte(e.lte)),n},[i.id,e]);l.useEffect(()=>{const n=c();a(n)},[c,e]);const g=()=>{u(i.id)},m=()=>{!e||!s||d({numberRange:e,lte:s.lte,gte:s.gte})};return t.jsx(r.FilterTag,{shouldCloseOnClickAway:!0,header:t.jsx("div",{children:"Edit filter (style and semant me pls)"}),label:i.label,text:(e==null?void 0:e.filterLabel)||"Loading...",content:t.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.md},children:t.jsx(R.FilterNumberRangeFilter,{data:i,editedValue:s,setEditedValue:a})}),footer:t.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.sm,width:"200px"},children:t.jsxs(r.Stack,{direction:"horizontal",alignX:"end",children:[t.jsx(r.Button,{variant:"default",size:"sm",onClick:g,children:"Clear"}),t.jsx(r.Button,{variant:"primary",size:"sm",onClick:m,children:"Apply"})]})})})});exports.ActiveFilterNumberRangeTag=x;
@@ -0,0 +1,49 @@
1
+ import { jsx as t, jsxs as F } from "react/jsx-runtime";
2
+ import { useState as b, useCallback as f, useEffect as h } from "react";
3
+ import { observer as R } from "mobx-react";
4
+ import { FilterTag as v, BaseContainer as o, theme as a, Stack as y, Button as d } from "@veeqo/ui";
5
+ import { NumberRangeFilter as C } from "./index61.js";
6
+ import { FilterNumberRangeFilter as N } from "./index27.js";
7
+ import { useStores as w } from "./index56.js";
8
+ const j = R(({
9
+ filterData: r
10
+ }) => {
11
+ const {
12
+ Filters: {
13
+ numberRangeFilters: m,
14
+ clearNumberRangeFilter: c,
15
+ setNumberRangeFilter: u
16
+ }
17
+ } = w(), e = m.get(r.id), [n, l] = b(e), s = f(() => {
18
+ const i = new C({
19
+ filterId: r.id
20
+ });
21
+ return e && (e.gte && i.setGte(e.gte), e.lte && i.setLte(e.lte)), i;
22
+ }, [r.id, e]);
23
+ h(() => {
24
+ const i = s();
25
+ l(i);
26
+ }, [s, e]);
27
+ const g = () => {
28
+ c(r.id);
29
+ }, p = () => {
30
+ !e || !n || u({
31
+ numberRange: e,
32
+ // update the original value
33
+ lte: n.lte,
34
+ gte: n.gte
35
+ });
36
+ };
37
+ return /* @__PURE__ */ t(v, { shouldCloseOnClickAway: !0, header: /* @__PURE__ */ t("div", { children: "Edit filter (style and semant me pls)" }), label: r.label, text: (e == null ? void 0 : e.filterLabel) || "Loading...", content: /* @__PURE__ */ t(o, { style: {
38
+ padding: a.sizes.md
39
+ }, children: /* @__PURE__ */ t(N, { data: r, editedValue: n, setEditedValue: l }) }), footer: /* @__PURE__ */ t(o, { style: {
40
+ padding: a.sizes.sm,
41
+ width: "200px"
42
+ }, children: /* @__PURE__ */ F(y, { direction: "horizontal", alignX: "end", children: [
43
+ /* @__PURE__ */ t(d, { variant: "default", size: "sm", onClick: g, children: "Clear" }),
44
+ /* @__PURE__ */ t(d, { variant: "primary", size: "sm", onClick: p, children: "Apply" })
45
+ ] }) }) });
46
+ });
47
+ export {
48
+ j as ActiveFilterNumberRangeTag
49
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),F=require("mobx-react"),s=require("@veeqo/ui"),r=require("./index44.cjs"),A=require("./index14.cjs"),g=require("./index15.cjs"),v=require("./index16.cjs"),h=require("./index13.cjs"),T=require("./index7.cjs"),f=require("./index56.cjs"),x=F.observer(()=>{const{FIELDS_MAP:c}=T.useBusinessLogic(),{Filters:{hasActiveFilters:a,activeFilterKeysList:l,clearAllFilters:n}}=f.useStores();if(!a)return null;const o=Array.from(c).filter(([e])=>l.includes(e));return t.jsxs(s.Stack,{direction:"horizontal",alignY:"center",children:[t.jsx(s.Button,{variant:"link",onClick:()=>n(),children:"Clear all"}),o.map(([e,i])=>{const u=()=>{switch(i.filterType){case r.FilterChoiceValue.CHECKBOX:return t.jsx(A.ActiveFilterArrayTag,{filterData:i},e);case r.FilterChoiceValue.DATE_RANGE:return t.jsx(g.ActiveFilterDateRangeTag,{filterData:i},e);case r.FilterChoiceValue.NUMBER_RANGE:return t.jsx(v.ActiveFilterNumberRangeTag,{filterData:i},e);case r.FilterChoiceValue.TEXT:case r.FilterChoiceValue.NUMBER:case r.FilterChoiceValue.RADIO:return t.jsx(h.ActiveFilterTag,{filterData:i},e);default:return t.jsx(s.Alert,{size:"xs",variant:"error",title:`Unsupport filter "${e}"`},e)}};return t.jsx("div",{children:u()})})]})});exports.ActiveFilters=x;
@@ -0,0 +1,45 @@
1
+ import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
+ import { observer as m } from "mobx-react";
3
+ import { Stack as f, Button as p, Alert as A } from "@veeqo/ui";
4
+ import { FilterChoiceValue as e } from "./index44.js";
5
+ import { ActiveFilterArrayTag as u } from "./index14.js";
6
+ import { ActiveFilterDateRangeTag as F } from "./index15.js";
7
+ import { ActiveFilterNumberRangeTag as h } from "./index16.js";
8
+ import { ActiveFilterTag as d } from "./index13.js";
9
+ import { useBusinessLogic as g } from "./index7.js";
10
+ import { useStores as v } from "./index56.js";
11
+ const U = m(() => {
12
+ const {
13
+ FIELDS_MAP: o
14
+ } = g(), {
15
+ Filters: {
16
+ hasActiveFilters: s,
17
+ activeFilterKeysList: a,
18
+ clearAllFilters: n
19
+ }
20
+ } = v();
21
+ if (!s) return null;
22
+ const l = Array.from(o).filter(([r]) => a.includes(r));
23
+ return /* @__PURE__ */ c(f, { direction: "horizontal", alignY: "center", children: [
24
+ /* @__PURE__ */ t(p, { variant: "link", onClick: () => n(), children: "Clear all" }),
25
+ l.map(([r, i]) => /* @__PURE__ */ t("div", { children: (() => {
26
+ switch (i.filterType) {
27
+ case e.CHECKBOX:
28
+ return /* @__PURE__ */ t(u, { filterData: i }, r);
29
+ case e.DATE_RANGE:
30
+ return /* @__PURE__ */ t(F, { filterData: i }, r);
31
+ case e.NUMBER_RANGE:
32
+ return /* @__PURE__ */ t(h, { filterData: i }, r);
33
+ case e.TEXT:
34
+ case e.NUMBER:
35
+ case e.RADIO:
36
+ return /* @__PURE__ */ t(d, { filterData: i }, r);
37
+ default:
38
+ return /* @__PURE__ */ t(A, { size: "xs", variant: "error", title: `Unsupport filter "${r}"` }, r);
39
+ }
40
+ })() }))
41
+ ] });
42
+ });
43
+ export {
44
+ U as ActiveFilters
45
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),o=require("react"),L=require("mobx-react"),O=require("lodash/debounce"),s=require("@veeqo/ui"),j=require("swr/immutable"),k=require("./index66.cjs"),R=require("./index67.cjs"),V=require("./index7.cjs"),E=require("./index56.cjs"),h=e=>e&&e.__esModule?e:{default:e},M=h(O),v=h(j),B=L.observer(({field:e})=>{var l,u;const{FILTERS_DEBOUCE_INTERVAL_MS:d}=V.useBusinessLogic(),g=o.useMemo(()=>{var t;return R.getFetcherFunction({fetcherName:(t=e.fetchAsyncFilterOptions)==null?void 0:t.fetcher})},[(l=e.fetchAsyncFilterOptions)==null?void 0:l.fetcher]),{isLoading:b,isValidating:F,data:y,error:S}=v.default((u=e.fetchAsyncFilterOptions)==null?void 0:u.URL,g),i=b||F,{Filters:{setArrayFilter:c,arrayFilters:p}}=E.useStores(),m=p.get(e.id)||[],[x,a]=o.useState(m),f=o.useCallback(M.default((t,n)=>{c(t,n)},d),[c]),A=t=>{const n=t.map(C=>`${C}`);a(n),f(e.id,n)},q=()=>{a([]),c(e.id,[])},_=k.getAsyncOptions({data:y,config:e.fetchAsyncFilterOptions});return r.jsxs(s.Stack,{spacing:"xs",alignX:"stretch",children:[r.jsx(s.Button,{variant:"link",onClick:q,children:"Clear"}),r.jsx(s.ChoiceList,{allowMultiple:!0,title:e.label,options:_,selected:x,onChange:t=>A(t)}),i&&r.jsx(s.Skeleton,{width:"200px",height:s.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!i&&S&&r.jsxs(s.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.AsyncCheckboxFilter=B;
@@ -0,0 +1,55 @@
1
+ import { jsxs as l, jsx as s } from "react/jsx-runtime";
2
+ import { useMemo as x, useState as O, useCallback as k } from "react";
3
+ import { observer as V } from "mobx-react";
4
+ import E from "lodash/debounce";
5
+ import { Stack as R, Button as v, ChoiceList as w, Skeleton as B, theme as I, Text as M } from "@veeqo/ui";
6
+ import T from "swr/immutable";
7
+ import { getAsyncOptions as _ } from "./index66.js";
8
+ import { getFetcherFunction as j } from "./index67.js";
9
+ import { useBusinessLogic as N } from "./index7.js";
10
+ import { useStores as U } from "./index56.js";
11
+ const P = V(({
12
+ field: t
13
+ }) => {
14
+ var c, a;
15
+ const {
16
+ FILTERS_DEBOUCE_INTERVAL_MS: m
17
+ } = N(), u = x(() => {
18
+ var e;
19
+ return j({
20
+ fetcherName: (e = t.fetchAsyncFilterOptions) == null ? void 0 : e.fetcher
21
+ });
22
+ }, [(c = t.fetchAsyncFilterOptions) == null ? void 0 : c.fetcher]), {
23
+ isLoading: h,
24
+ isValidating: p,
25
+ data: f,
26
+ error: g
27
+ } = T((a = t.fetchAsyncFilterOptions) == null ? void 0 : a.URL, u), n = h || p, {
28
+ Filters: {
29
+ setArrayFilter: o,
30
+ arrayFilters: F
31
+ }
32
+ } = U(), d = F.get(t.id) || [], [b, i] = O(d), y = k(E((e, r) => {
33
+ o(e, r);
34
+ }, m), [o]), S = (e) => {
35
+ const r = e.map((L) => `${L}`);
36
+ i(r), y(t.id, r);
37
+ }, A = () => {
38
+ i([]), o(t.id, []);
39
+ }, C = _({
40
+ data: f,
41
+ config: t.fetchAsyncFilterOptions
42
+ });
43
+ return /* @__PURE__ */ l(R, { spacing: "xs", alignX: "stretch", children: [
44
+ /* @__PURE__ */ s(v, { variant: "link", onClick: A, children: "Clear" }),
45
+ /* @__PURE__ */ s(w, { allowMultiple: !0, title: t.label, options: C, selected: b, onChange: (e) => S(e) }),
46
+ n && /* @__PURE__ */ s(B, { width: "200px", height: I.sizes[5], "aria-busy": !0, "aria-label": `Loading ${t.label} filters` }),
47
+ !n && g && /* @__PURE__ */ l(M, { variant: "errorSmall", children: [
48
+ "Error: failed to load filter for ",
49
+ t.label
50
+ ] })
51
+ ] });
52
+ });
53
+ export {
54
+ P as AsyncCheckboxFilter
55
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),p=require("react"),d=require("mobx-react"),t=require("@veeqo/ui"),m=require("swr/immutable"),x=require("./index66.cjs"),y=require("./index67.cjs"),F=e=>e&&e.__esModule?e:{default:e},A=F(m),q=d.observer(({field:e,editedValue:c,setEditedValue:l})=>{var i,o;const a=p.useMemo(()=>{var r;return y.getFetcherFunction({fetcherName:(r=e.fetchAsyncFilterOptions)==null?void 0:r.fetcher})},[(i=e.fetchAsyncFilterOptions)==null?void 0:i.fetcher]),{isLoading:u,isValidating:h,data:g,error:b}=A.default((o=e.fetchAsyncFilterOptions)==null?void 0:o.URL,a),s=u||h,f=x.getAsyncOptions({data:g,config:e.fetchAsyncFilterOptions});return n.jsxs(t.Stack,{spacing:"xs",alignX:"stretch",children:[n.jsx(t.ChoiceList,{allowMultiple:!0,title:e.label,options:f,selected:c,onChange:r=>l(r)}),s&&n.jsx(t.Skeleton,{width:"200px",height:t.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!s&&b&&n.jsxs(t.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.AsyncInlineCheckboxFilter=q;
@@ -0,0 +1,39 @@
1
+ import { jsxs as n, jsx as s } from "react/jsx-runtime";
2
+ import { useMemo as u } from "react";
3
+ import { observer as b } from "mobx-react";
4
+ import { Stack as F, ChoiceList as x, Skeleton as y, theme as A, Text as d } from "@veeqo/ui";
5
+ import L from "swr/immutable";
6
+ import { getAsyncOptions as O } from "./index66.js";
7
+ import { getFetcherFunction as S } from "./index67.js";
8
+ const R = b(({
9
+ field: t,
10
+ editedValue: c,
11
+ setEditedValue: a
12
+ }) => {
13
+ var o, i;
14
+ const l = u(() => {
15
+ var e;
16
+ return S({
17
+ fetcherName: (e = t.fetchAsyncFilterOptions) == null ? void 0 : e.fetcher
18
+ });
19
+ }, [(o = t.fetchAsyncFilterOptions) == null ? void 0 : o.fetcher]), {
20
+ isLoading: m,
21
+ isValidating: h,
22
+ data: p,
23
+ error: f
24
+ } = L((i = t.fetchAsyncFilterOptions) == null ? void 0 : i.URL, l), r = m || h, g = O({
25
+ data: p,
26
+ config: t.fetchAsyncFilterOptions
27
+ });
28
+ return /* @__PURE__ */ n(F, { spacing: "xs", alignX: "stretch", children: [
29
+ /* @__PURE__ */ s(x, { allowMultiple: !0, title: t.label, options: g, selected: c, onChange: (e) => a(e) }),
30
+ r && /* @__PURE__ */ s(y, { width: "200px", height: A.sizes[5], "aria-busy": !0, "aria-label": `Loading ${t.label} filters` }),
31
+ !r && f && /* @__PURE__ */ n(d, { variant: "errorSmall", children: [
32
+ "Error: failed to load filter for ",
33
+ t.label
34
+ ] })
35
+ ] });
36
+ });
37
+ export {
38
+ R as AsyncInlineCheckboxFilter
39
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index6.cjs"),s=require("./index48.cjs"),i=require("./index49.cjs"),o=e=>t.axios.delete(`/api/v2/custom_views/${e}`,s.withCSRF(i.vndAPI));exports.deleteCustomView=o;
package/dist/index2.js ADDED
@@ -0,0 +1,7 @@
1
+ import { axios as t } from "./index6.js";
2
+ import { withCSRF as e } from "./index48.js";
3
+ import { vndAPI as i } from "./index49.js";
4
+ const s = (o) => t.delete(`/api/v2/custom_views/${o}`, e(i));
5
+ export {
6
+ s as deleteCustomView
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),b=require("react"),m=require("mobx-react"),t=require("@veeqo/ui"),p=require("swr/immutable"),y=require("./index66.cjs"),F=require("./index67.cjs"),x=e=>e&&e.__esModule?e:{default:e},A=x(p),q=m.observer(({field:e,editedValue:c,setEditedValue:a})=>{var i,o;const l=b.useMemo(()=>{var r;return F.getFetcherFunction({fetcherName:(r=e.fetchAsyncFilterOptions)==null?void 0:r.fetcher})},[(i=e.fetchAsyncFilterOptions)==null?void 0:i.fetcher]),{isLoading:u,isValidating:h,data:g,error:d}=A.default((o=e.fetchAsyncFilterOptions)==null?void 0:o.URL,l),s=u||h,f=y.getAsyncOptions({data:g,config:e.fetchAsyncFilterOptions});return n.jsxs(t.Stack,{spacing:"xs",alignX:"stretch",children:[n.jsx(t.ChoiceList,{title:e.label,options:f,selected:[c],onChange:r=>a(`${r[0]}`)}),s&&n.jsx(t.Skeleton,{width:"200px",height:t.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!s&&d&&n.jsxs(t.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.AsyncInlineRadioFilter=q;