@veeqo/transfigure 0.0.21 → 0.0.22

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 (256) hide show
  1. package/dist/components/Filters/ActiveFilters/Variants/common/ActiveFilterFooter/ActiveFilterFooter.d.ts +6 -0
  2. package/dist/components/Filters/ActiveFilters/Variants/common/ActiveFilterFooter/index.d.ts +1 -0
  3. package/dist/components/Filters/ActiveFilters/Variants/common/ActiveFilterHeader/ActiveFilterHeader.d.ts +5 -0
  4. package/dist/components/Filters/ActiveFilters/Variants/common/ActiveFilterHeader/index.d.ts +1 -0
  5. package/dist/components/Filters/ActiveFilters/Variants/common/index.d.ts +2 -0
  6. package/dist/components/Filters/ActiveFilters/Variants/index.d.ts +3 -1
  7. package/dist/components/Filters/ActiveFilters/index.d.ts +0 -1
  8. package/dist/components/RefreshButton/RefreshButton.d.ts +2 -1
  9. package/dist/components/RefreshButton/{usePollListOrders.d.ts → usePollData.d.ts} +1 -1
  10. package/dist/components/Views/PillNotifications/constants.d.ts +25 -0
  11. package/dist/components/Views/PillNotifications/variants/DraftPill/DraftPill.d.ts +5 -0
  12. package/dist/components/Views/PillNotifications/variants/DraftPill/index.d.ts +1 -0
  13. package/dist/components/Views/PillNotifications/variants/UnsavedChangesPill/UnsavedChangesPill.d.ts +7 -0
  14. package/dist/components/Views/PillNotifications/variants/UnsavedChangesPill/index.d.ts +1 -0
  15. package/dist/components/Views/PillNotifications/variants/styled.d.ts +324 -0
  16. package/dist/components/Views/index.d.ts +1 -1
  17. package/dist/context/ModalContext/mocks/mockUseModal.d.ts +4 -4
  18. package/dist/hooks/useViewCountsHook/useViewCountsHook.d.ts +1 -1
  19. package/dist/hooks/useViews/mocks.d.ts +2 -0
  20. package/dist/hooks/useViews/useViews.d.ts +1 -2
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +121 -119
  23. package/dist/index100.cjs +1 -1
  24. package/dist/index100.js +2 -36
  25. package/dist/index101.cjs +1 -1
  26. package/dist/index101.js +36 -19
  27. package/dist/index102.cjs +1 -1
  28. package/dist/index102.js +25 -7
  29. package/dist/index103.cjs +13 -1
  30. package/dist/index103.js +16 -63
  31. package/dist/index104.cjs +1 -1
  32. package/dist/index104.js +18 -29
  33. package/dist/index105.cjs +1 -1
  34. package/dist/index105.js +8 -63
  35. package/dist/index106.cjs +1 -13
  36. package/dist/index106.js +63 -16
  37. package/dist/index107.cjs +1 -1
  38. package/dist/index107.js +30 -42
  39. package/dist/index108.cjs +1 -7
  40. package/dist/index108.js +63 -10
  41. package/dist/index109.cjs +1 -0
  42. package/dist/index109.js +49 -0
  43. package/dist/index11.cjs +1 -1
  44. package/dist/index11.js +1 -1
  45. package/dist/index110.cjs +7 -0
  46. package/dist/index110.js +12 -0
  47. package/dist/index111.cjs +1 -0
  48. package/dist/index111.js +44 -0
  49. package/dist/index12.cjs +1 -1
  50. package/dist/index12.js +1 -1
  51. package/dist/index13.cjs +1 -1
  52. package/dist/index13.js +14 -14
  53. package/dist/index14.cjs +1 -1
  54. package/dist/index14.js +36 -41
  55. package/dist/index15.cjs +1 -1
  56. package/dist/index15.js +33 -37
  57. package/dist/index16.cjs +1 -1
  58. package/dist/index16.js +49 -32
  59. package/dist/index17.cjs +1 -1
  60. package/dist/index17.js +38 -48
  61. package/dist/index18.cjs +1 -1
  62. package/dist/index18.js +27 -28
  63. package/dist/index19.cjs +1 -1
  64. package/dist/index19.js +37 -38
  65. package/dist/index2.cjs +1 -1
  66. package/dist/index2.js +2 -2
  67. package/dist/index20.cjs +1 -1
  68. package/dist/index20.js +36 -37
  69. package/dist/index21.cjs +1 -1
  70. package/dist/index21.js +20 -21
  71. package/dist/index22.cjs +1 -1
  72. package/dist/index22.js +7 -46
  73. package/dist/index23.cjs +1 -1
  74. package/dist/index23.js +12 -61
  75. package/dist/index24.cjs +1 -1
  76. package/dist/index24.js +36 -35
  77. package/dist/index25.cjs +1 -1
  78. package/dist/index25.js +55 -34
  79. package/dist/index26.cjs +1 -1
  80. package/dist/index26.js +34 -52
  81. package/dist/index27.cjs +1 -1
  82. package/dist/index27.js +54 -51
  83. package/dist/index28.cjs +1 -1
  84. package/dist/index28.js +50 -81
  85. package/dist/index29.cjs +1 -1
  86. package/dist/index29.js +80 -33
  87. package/dist/index3.cjs +1 -1
  88. package/dist/index3.js +2 -2
  89. package/dist/index30.cjs +1 -1
  90. package/dist/index30.js +37 -33
  91. package/dist/index31.cjs +1 -1
  92. package/dist/index31.js +33 -10
  93. package/dist/index32.cjs +1 -1
  94. package/dist/index32.js +10 -40
  95. package/dist/index33.cjs +1 -1
  96. package/dist/index33.js +39 -102
  97. package/dist/index34.cjs +1 -1
  98. package/dist/index34.js +103 -19
  99. package/dist/index35.cjs +1 -1
  100. package/dist/index35.js +17 -135
  101. package/dist/index36.cjs +1 -1
  102. package/dist/index36.js +135 -49
  103. package/dist/index37.cjs +1 -1
  104. package/dist/index37.js +51 -50
  105. package/dist/index38.cjs +1 -1
  106. package/dist/index38.js +31 -49
  107. package/dist/index39.cjs +1 -1
  108. package/dist/index39.js +48 -71
  109. package/dist/index4.cjs +1 -1
  110. package/dist/index4.js +2 -2
  111. package/dist/index40.cjs +1 -1
  112. package/dist/index40.js +58 -79
  113. package/dist/index41.cjs +1 -1
  114. package/dist/index41.js +81 -41
  115. package/dist/index42.cjs +1 -1
  116. package/dist/index42.js +48 -5
  117. package/dist/index43.cjs +1 -1
  118. package/dist/index43.js +5 -42
  119. package/dist/index44.cjs +1 -1
  120. package/dist/index44.js +42 -25
  121. package/dist/index45.cjs +1 -1
  122. package/dist/index45.js +30 -19
  123. package/dist/index46.cjs +1 -1
  124. package/dist/index46.js +19 -8
  125. package/dist/index47.cjs +1 -1
  126. package/dist/index47.js +7 -22
  127. package/dist/index48.cjs +1 -1
  128. package/dist/index48.js +23 -2
  129. package/dist/index49.cjs +1 -1
  130. package/dist/index49.js +2 -4
  131. package/dist/index5.cjs +1 -1
  132. package/dist/index5.js +2 -2
  133. package/dist/index50.cjs +1 -1
  134. package/dist/index50.js +4 -11
  135. package/dist/index51.cjs +1 -1
  136. package/dist/index51.js +10 -12
  137. package/dist/index52.cjs +1 -1
  138. package/dist/index52.js +12 -11
  139. package/dist/index53.cjs +1 -1
  140. package/dist/index53.js +11 -184
  141. package/dist/index54.cjs +1 -1
  142. package/dist/index54.js +183 -25
  143. package/dist/index55.cjs +1 -1
  144. package/dist/index55.js +26 -24
  145. package/dist/index56.cjs +1 -1
  146. package/dist/index56.js +19 -22
  147. package/dist/index57.cjs +1 -1
  148. package/dist/index57.js +25 -90
  149. package/dist/index58.cjs +1 -1
  150. package/dist/index58.js +93 -8
  151. package/dist/index59.cjs +1 -1
  152. package/dist/index59.js +8 -51
  153. package/dist/index6.cjs +1 -1
  154. package/dist/index6.js +4 -4
  155. package/dist/index60.cjs +1 -1
  156. package/dist/index60.js +50 -60
  157. package/dist/index61.cjs +1 -1
  158. package/dist/index61.js +61 -18
  159. package/dist/index62.cjs +1 -1
  160. package/dist/index62.js +16 -23
  161. package/dist/index63.cjs +1 -1
  162. package/dist/index63.js +25 -315
  163. package/dist/index64.cjs +1 -1
  164. package/dist/index64.js +311 -55
  165. package/dist/index65.cjs +1 -1
  166. package/dist/index65.js +50 -47
  167. package/dist/index66.cjs +1 -1
  168. package/dist/index66.js +51 -32
  169. package/dist/index67.cjs +1 -1
  170. package/dist/index67.js +30 -24
  171. package/dist/index68.cjs +1 -1
  172. package/dist/index68.js +32 -4
  173. package/dist/index69.cjs +1 -1
  174. package/dist/index69.js +4 -9
  175. package/dist/index70.cjs +1 -1
  176. package/dist/index70.js +9 -17
  177. package/dist/index71.cjs +1 -1
  178. package/dist/index71.js +14 -16
  179. package/dist/index72.cjs +1 -1
  180. package/dist/index72.js +18 -47
  181. package/dist/index73.cjs +1 -1
  182. package/dist/index73.js +48 -21
  183. package/dist/index74.cjs +1 -1
  184. package/dist/index74.js +21 -2
  185. package/dist/index75.cjs +1 -1
  186. package/dist/index75.js +2 -9
  187. package/dist/index76.cjs +1 -3
  188. package/dist/index76.js +8 -13
  189. package/dist/index77.cjs +3 -1
  190. package/dist/index77.js +13 -8
  191. package/dist/index78.cjs +1 -1
  192. package/dist/index78.js +7 -141
  193. package/dist/index79.cjs +1 -1
  194. package/dist/index79.js +142 -18
  195. package/dist/index80.cjs +1 -8
  196. package/dist/index80.js +19 -12
  197. package/dist/index81.cjs +8 -1
  198. package/dist/index81.js +12 -41
  199. package/dist/index82.cjs +1 -1
  200. package/dist/index82.js +40 -8
  201. package/dist/index83.cjs +1 -1
  202. package/dist/index83.js +9 -18
  203. package/dist/index84.cjs +1 -1
  204. package/dist/index84.js +31 -13
  205. package/dist/index85.cjs +1 -104
  206. package/dist/index85.js +27 -118
  207. package/dist/index86.cjs +1 -1
  208. package/dist/index86.js +14 -67
  209. package/dist/index87.cjs +19 -1
  210. package/dist/index87.js +24 -29
  211. package/dist/index88.cjs +1 -1
  212. package/dist/index88.js +21 -2
  213. package/dist/index89.cjs +12 -1
  214. package/dist/index89.js +16 -41
  215. package/dist/index90.cjs +80 -1
  216. package/dist/index90.js +103 -11
  217. package/dist/index91.cjs +1 -1
  218. package/dist/index91.js +13 -24
  219. package/dist/index92.cjs +100 -15
  220. package/dist/index92.js +115 -19
  221. package/dist/index93.cjs +1 -1
  222. package/dist/index93.js +65 -30
  223. package/dist/index94.cjs +1 -1
  224. package/dist/index94.js +29 -29
  225. package/dist/index95.cjs +1 -1
  226. package/dist/index95.js +2 -22
  227. package/dist/index96.cjs +1 -80
  228. package/dist/index96.js +41 -96
  229. package/dist/index97.cjs +1 -12
  230. package/dist/index97.js +11 -16
  231. package/dist/index98.cjs +1 -1
  232. package/dist/index98.js +17 -14
  233. package/dist/index99.cjs +1 -1
  234. package/dist/index99.js +24 -2
  235. package/dist/mobx/Filters/tests/Filters.arrayFilters.test.d.ts +1 -0
  236. package/dist/mobx/Filters/tests/Filters.clearOperations.test.d.ts +1 -0
  237. package/dist/mobx/Filters/tests/Filters.dateRangeFilters.test.d.ts +1 -0
  238. package/dist/mobx/Filters/tests/Filters.hasUnsavedChanges.test.d.ts +1 -0
  239. package/dist/mobx/Filters/tests/Filters.numberRangeFilters.test.d.ts +1 -0
  240. package/dist/mobx/Filters/tests/Filters.pagination.test.d.ts +1 -0
  241. package/dist/mobx/Filters/tests/Filters.textFilters.test.d.ts +1 -0
  242. package/dist/mobx/Filters/tests/Filters.urlHandling.test.d.ts +1 -0
  243. package/dist/mobx/Filters/tests/Filters.views.test.d.ts +1 -0
  244. package/dist/mobx/Notifications/Notifications.d.ts +7 -8
  245. package/dist/mobx/Notifications/Notifications.test.d.ts +1 -0
  246. package/dist/mobx/Notifications/index.d.ts +1 -0
  247. package/dist/mobx/NumberRangeFilter/NumberRangeFilter.test.d.ts +1 -0
  248. package/dist/mobx/RangeFilter/RangeFilter.test.d.ts +1 -0
  249. package/dist/mobx/Views/Views.test.d.ts +1 -0
  250. package/package.json +1 -1
  251. package/dist/components/Views/PillNotifications/InfoPill.d.ts +0 -1
  252. package/dist/components/Views/PillNotifications/styled.d.ts +0 -34
  253. package/dist/components/Views/UnsavedChanges/UnsavedChanges.d.ts +0 -5
  254. package/dist/components/Views/UnsavedChanges/index.d.ts +0 -1
  255. /package/dist/components/Filters/ActiveFilters/{ActiveFilterTag → Variants/ActiveFilterTag}/ActiveFilterTag.d.ts +0 -0
  256. /package/dist/components/Filters/ActiveFilters/{ActiveFilterTag → Variants/ActiveFilterTag}/index.d.ts +0 -0
package/dist/index14.js CHANGED
@@ -1,44 +1,39 @@
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 "./index56.js";
6
- import { FilterField as x } from "./index17.js";
7
- import { useStores as z } from "./index58.js";
8
- const w = v(({ filterData: e }) => {
9
- const {
10
- Filters: { filters: l, clearFilter: c, setFilter: a }
11
- } = z(), i = l.get(e.id), { filterLabel: m } = b({ filterData: e }), [r, s] = F(i || "");
12
- g(() => {
13
- r !== i && s(i || "");
14
- }, [e.id, i, l]);
15
- const p = () => {
16
- c(e.id);
17
- }, u = () => {
18
- a(e.id, r);
19
- };
20
- return /* @__PURE__ */ t(
21
- y,
22
- {
23
- shouldCloseOnClickAway: !0,
24
- header: /* @__PURE__ */ t("div", { children: "Edit filter (style and semant me pls)" }),
25
- label: e.label,
26
- text: m || "Loading...",
27
- content: /* @__PURE__ */ t(o, { style: { padding: n.sizes.md }, children: /* @__PURE__ */ t(
28
- x,
29
- {
30
- data: e,
31
- editedValue: r,
32
- setEditedValue: (h) => s(h)
33
- }
34
- ) }),
35
- footer: /* @__PURE__ */ t(o, { style: { padding: n.sizes.sm, width: "200px" }, 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
- );
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, theme as p, Button as A, Alert as u } from "@veeqo/ui";
4
+ import { FilterChoiceValue as e } from "./index47.js";
5
+ import { useBusinessLogic as F } from "./index7.js";
6
+ import { useStores as h } from "./index59.js";
7
+ import { ActiveFilterTag as d } from "./index17.js";
8
+ import { ActiveFilterNumberRangeTag as g } from "./index20.js";
9
+ import { ActiveFilterDateRangeTag as v } from "./index19.js";
10
+ import { ActiveFilterArrayTag as D } from "./index18.js";
11
+ const M = m(() => {
12
+ const { FIELDS_MAP: o } = F(), {
13
+ Filters: { hasActiveFilters: s, activeFilterKeysList: a, clearAllFilters: l }
14
+ } = h();
15
+ if (!s) return null;
16
+ const n = Array.from(o).filter(([r]) => a.includes(r));
17
+ return /* @__PURE__ */ c(f, { direction: "horizontal", alignY: "center", style: { flexWrap: "wrap", rowGap: p.sizes.sm }, children: [
18
+ /* @__PURE__ */ t(A, { variant: "link", onClick: () => l(), children: "Clear all" }),
19
+ n.map(([r, i]) => /* @__PURE__ */ t("div", { children: (() => {
20
+ switch (i.filterType) {
21
+ case e.CHECKBOX:
22
+ return /* @__PURE__ */ t(D, { filterData: i }, r);
23
+ case e.DATE_RANGE:
24
+ return /* @__PURE__ */ t(v, { filterData: i }, r);
25
+ case e.NUMBER_RANGE:
26
+ return /* @__PURE__ */ t(g, { filterData: i }, r);
27
+ case e.TEXT:
28
+ case e.NUMBER:
29
+ case e.RADIO:
30
+ return /* @__PURE__ */ t(d, { filterData: i }, r);
31
+ default:
32
+ return /* @__PURE__ */ t(u, { size: "xs", variant: "error", title: `Unsupport filter "${r}"` }, r);
33
+ }
34
+ })() }))
35
+ ] });
41
36
  });
42
37
  export {
43
- w as ActiveFilterTag
38
+ M as ActiveFilters
44
39
  };
package/dist/index15.cjs CHANGED
@@ -1 +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("./index46.cjs"),A=require("./index18.cjs"),g=require("./index19.cjs"),h=require("./index20.cjs"),v=require("./index14.cjs"),T=require("./index7.cjs"),f=require("./index58.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",style:{flexWrap:"wrap",rowGap:s.theme.sizes.sm},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(h.ActiveFilterNumberRangeTag,{filterData:i},e);case r.FilterChoiceValue.TEXT:case r.FilterChoiceValue.NUMBER:case r.FilterChoiceValue.RADIO:return t.jsx(v.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("mobx-react"),s=require("@veeqo/ui"),c=require("./index47.cjs"),u=require("./index109.cjs"),h=l.observer(({data:e,editedValue:r,setEditedValue:t})=>{var i;switch(e.filterType){case c.FilterChoiceValue.CHECKBOX:return e.fetchAsyncFilterOptions?o.jsx(u.ActiveAsyncCheckboxFilter,{field:e,setEditedValue:t,editedValue:r}):o.jsx(s.ChoiceList,{allowMultiple:!0,title:e.label,options:(i=e.options)!=null&&i.length?e.options:[],selected:r,onChange:n=>t(n)});default:return null}});exports.FilterArrayField=h;
package/dist/index15.js CHANGED
@@ -1,39 +1,35 @@
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, theme as p, Button as A, Alert as u } from "@veeqo/ui";
4
- import { FilterChoiceValue as e } from "./index46.js";
5
- import { ActiveFilterArrayTag as F } from "./index18.js";
6
- import { ActiveFilterDateRangeTag as h } from "./index19.js";
7
- import { ActiveFilterNumberRangeTag as d } from "./index20.js";
8
- import { ActiveFilterTag as g } from "./index14.js";
9
- import { useBusinessLogic as v } from "./index7.js";
10
- import { useStores as D } from "./index58.js";
11
- const M = m(() => {
12
- const { FIELDS_MAP: o } = v(), {
13
- Filters: { hasActiveFilters: s, activeFilterKeysList: a, clearAllFilters: l }
14
- } = D();
15
- if (!s) return null;
16
- const n = Array.from(o).filter(([r]) => a.includes(r));
17
- return /* @__PURE__ */ c(f, { direction: "horizontal", alignY: "center", style: { flexWrap: "wrap", rowGap: p.sizes.sm }, children: [
18
- /* @__PURE__ */ t(A, { variant: "link", onClick: () => l(), children: "Clear all" }),
19
- n.map(([r, i]) => /* @__PURE__ */ t("div", { children: (() => {
20
- switch (i.filterType) {
21
- case e.CHECKBOX:
22
- return /* @__PURE__ */ t(F, { filterData: i }, r);
23
- case e.DATE_RANGE:
24
- return /* @__PURE__ */ t(h, { filterData: i }, r);
25
- case e.NUMBER_RANGE:
26
- return /* @__PURE__ */ t(d, { filterData: i }, r);
27
- case e.TEXT:
28
- case e.NUMBER:
29
- case e.RADIO:
30
- return /* @__PURE__ */ t(g, { filterData: i }, r);
31
- default:
32
- return /* @__PURE__ */ t(u, { size: "xs", variant: "error", title: `Unsupport filter "${r}"` }, r);
33
- }
34
- })() }))
35
- ] });
36
- });
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { observer as n } from "mobx-react";
3
+ import { ChoiceList as p } from "@veeqo/ui";
4
+ import { FilterChoiceValue as s } from "./index47.js";
5
+ import { ActiveAsyncCheckboxFilter as c } from "./index109.js";
6
+ const F = n(
7
+ ({ data: r, editedValue: e, setEditedValue: o }) => {
8
+ var i;
9
+ switch (r.filterType) {
10
+ case s.CHECKBOX:
11
+ return r.fetchAsyncFilterOptions ? /* @__PURE__ */ t(
12
+ c,
13
+ {
14
+ field: r,
15
+ setEditedValue: o,
16
+ editedValue: e
17
+ }
18
+ ) : /* @__PURE__ */ t(
19
+ p,
20
+ {
21
+ allowMultiple: !0,
22
+ title: r.label,
23
+ options: (i = r.options) != null && i.length ? r.options : [],
24
+ selected: e,
25
+ onChange: (l) => o(l)
26
+ }
27
+ );
28
+ default:
29
+ return null;
30
+ }
31
+ }
32
+ );
37
33
  export {
38
- M as ActiveFilters
34
+ F as FilterArrayField
39
35
  };
package/dist/index16.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("mobx-react"),s=require("@veeqo/ui"),c=require("./index46.cjs"),u=require("./index21.cjs"),h=l.observer(({data:e,editedValue:r,setEditedValue:t})=>{var i;switch(e.filterType){case c.FilterChoiceValue.CHECKBOX:return e.fetchAsyncFilterOptions?o.jsx(u.ActiveAsyncCheckboxFilter,{field:e,setEditedValue:t,editedValue:r}):o.jsx(s.ChoiceList,{allowMultiple:!0,title:e.label,options:(i=e.options)!=null&&i.length?e.options:[],selected:r,onChange:n=>t(n)});default:return null}});exports.FilterArrayField=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("mobx-react"),s=require("@veeqo/ui"),i=require("./index47.cjs"),F=require("./index21.cjs"),h=u.observer(({data:e,editedValue:r,setEditedValue:t})=>{var n;let l;switch(e.filterType){case i.FilterChoiceValue.NUMBER:l="number";break;case i.FilterChoiceValue.TEXT:l="text";break}switch(e.filterType){case i.FilterChoiceValue.TEXT:case i.FilterChoiceValue.NUMBER:return o.jsx(s.TextField,{label:e.label,type:l,value:r,onChange:c=>t(c)});case i.FilterChoiceValue.RADIO:return e.fetchAsyncFilterOptions?o.jsx(F.ActiveAsyncRadioFilter,{field:e,setEditedValue:t,editedValue:r}):o.jsx(s.ChoiceList,{title:e.label,options:(n=e.options)!=null&&n.length?e.options:[],selected:[r],onChange:c=>t(`${c[0]}`)});default:return null}});exports.FilterField=h;
package/dist/index16.js CHANGED
@@ -1,35 +1,52 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { observer as n } from "mobx-react";
3
- import { ChoiceList as p } from "@veeqo/ui";
4
- import { FilterChoiceValue as s } from "./index46.js";
5
- import { ActiveAsyncCheckboxFilter as c } from "./index21.js";
6
- const F = n(
7
- ({ data: r, editedValue: e, setEditedValue: o }) => {
8
- var i;
9
- switch (r.filterType) {
10
- case s.CHECKBOX:
11
- return r.fetchAsyncFilterOptions ? /* @__PURE__ */ t(
12
- c,
13
- {
14
- field: r,
15
- setEditedValue: o,
16
- editedValue: e
17
- }
18
- ) : /* @__PURE__ */ t(
19
- p,
20
- {
21
- allowMultiple: !0,
22
- title: r.label,
23
- options: (i = r.options) != null && i.length ? r.options : [],
24
- selected: e,
25
- onChange: (l) => o(l)
26
- }
27
- );
28
- default:
29
- return null;
30
- }
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { observer as c } from "mobx-react";
3
+ import { ChoiceList as p, TextField as f } from "@veeqo/ui";
4
+ import { FilterChoiceValue as r } from "./index47.js";
5
+ import { ActiveAsyncRadioFilter as m } from "./index21.js";
6
+ const y = c(({ data: e, editedValue: o, setEditedValue: i }) => {
7
+ var s;
8
+ let t;
9
+ switch (e.filterType) {
10
+ case r.NUMBER:
11
+ t = "number";
12
+ break;
13
+ case r.TEXT:
14
+ t = "text";
15
+ break;
31
16
  }
32
- );
17
+ switch (e.filterType) {
18
+ case r.TEXT:
19
+ case r.NUMBER:
20
+ return /* @__PURE__ */ n(
21
+ f,
22
+ {
23
+ label: e.label,
24
+ type: t,
25
+ value: o,
26
+ onChange: (l) => i(l)
27
+ }
28
+ );
29
+ case r.RADIO:
30
+ return e.fetchAsyncFilterOptions ? /* @__PURE__ */ n(
31
+ m,
32
+ {
33
+ field: e,
34
+ setEditedValue: i,
35
+ editedValue: o
36
+ }
37
+ ) : /* @__PURE__ */ n(
38
+ p,
39
+ {
40
+ title: e.label,
41
+ options: (s = e.options) != null && s.length ? e.options : [],
42
+ selected: [o],
43
+ onChange: (l) => i(`${l[0]}`)
44
+ }
45
+ );
46
+ default:
47
+ return null;
48
+ }
49
+ });
33
50
  export {
34
- F as FilterArrayField
51
+ y as FilterField
35
52
  };
package/dist/index17.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("mobx-react"),n=require("@veeqo/ui"),i=require("./index46.cjs"),F=require("./index22.cjs"),h=u.observer(({data:e,editedValue:r,setEditedValue:t})=>{var s;let l;switch(e.filterType){case i.FilterChoiceValue.NUMBER:l="number";break;case i.FilterChoiceValue.TEXT:l="text";break}switch(e.filterType){case i.FilterChoiceValue.TEXT:case i.FilterChoiceValue.NUMBER:return o.jsx(n.TextField,{label:e.label,type:l,value:r,onChange:c=>t(c)});case i.FilterChoiceValue.RADIO:case i.FilterChoiceValue.DATE_RANGE:return e.fetchAsyncFilterOptions?o.jsx(F.ActiveAsyncRadioFilter,{field:e,setEditedValue:t,editedValue:r}):o.jsx(n.ChoiceList,{title:e.label,options:(s=e.options)!=null&&s.length?e.options:[],selected:[r],onChange:c=>t(`${c[0]}`)});default:return null}});exports.FilterField=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("react"),v=require("mobx-react"),s=require("@veeqo/ui"),q=require("./index59.cjs"),A=require("./index57.cjs"),g=require("./index22.cjs"),x=require("./index16.cjs"),j=require("./index23.cjs"),m=v.observer(({filterData:e})=>{const{Filters:{filters:l,clearFilter:n,setFilter:u}}=q.useStores(),r=l.get(e.id),{filterLabel:d}=A.useFilterLabel({filterData:e}),[i,o]=c.useState(r||"");c.useEffect(()=>{i!==r&&o(r||"")},[e.id,r,l]);const F=()=>{n(e.id)},a=()=>{u(e.id,i)};return t.jsx(s.FilterTag,{shouldCloseOnClickAway:!0,header:t.jsx(j.ActiveFilterHeader,{filterLabel:e.label}),label:e.label,text:d||"Loading...",content:t.jsx(s.BaseContainer,{style:{padding:s.theme.sizes.md},children:t.jsx(x.FilterField,{data:e,editedValue:i,setEditedValue:b=>o(b)})}),footer:t.jsx(g.ActiveFilterFooter,{clearActiveFilter:F,applyActiveFilter:a})})});exports.ActiveFilterTag=m;
package/dist/index17.js CHANGED
@@ -1,53 +1,43 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { observer as c } from "mobx-react";
3
- import { ChoiceList as p, TextField as f } from "@veeqo/ui";
4
- import { FilterChoiceValue as r } from "./index46.js";
5
- import { ActiveAsyncRadioFilter as m } from "./index22.js";
6
- const u = c(({ data: e, editedValue: o, setEditedValue: i }) => {
7
- var s;
8
- let t;
9
- switch (e.filterType) {
10
- case r.NUMBER:
11
- t = "number";
12
- break;
13
- case r.TEXT:
14
- t = "text";
15
- break;
16
- }
17
- switch (e.filterType) {
18
- case r.TEXT:
19
- case r.NUMBER:
20
- return /* @__PURE__ */ n(
21
- f,
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { useState as F, useEffect as u } from "react";
3
+ import { observer as a } from "mobx-react";
4
+ import { FilterTag as f, BaseContainer as b, theme as v } from "@veeqo/ui";
5
+ import { useStores as A } from "./index59.js";
6
+ import { useFilterLabel as g } from "./index57.js";
7
+ import { ActiveFilterFooter as h } from "./index22.js";
8
+ import { FilterField as L } from "./index16.js";
9
+ import { ActiveFilterHeader as V } from "./index23.js";
10
+ const z = a(({ filterData: e }) => {
11
+ const {
12
+ Filters: { filters: o, clearFilter: s, setFilter: d }
13
+ } = A(), r = o.get(e.id), { filterLabel: m } = g({ filterData: e }), [i, l] = F(r || "");
14
+ u(() => {
15
+ i !== r && l(r || "");
16
+ }, [e.id, r, o]);
17
+ const c = () => {
18
+ s(e.id);
19
+ }, n = () => {
20
+ d(e.id, i);
21
+ };
22
+ return /* @__PURE__ */ t(
23
+ f,
24
+ {
25
+ shouldCloseOnClickAway: !0,
26
+ header: /* @__PURE__ */ t(V, { filterLabel: e.label }),
27
+ label: e.label,
28
+ text: m || "Loading...",
29
+ content: /* @__PURE__ */ t(b, { style: { padding: v.sizes.md }, children: /* @__PURE__ */ t(
30
+ L,
22
31
  {
23
- label: e.label,
24
- type: t,
25
- value: o,
26
- onChange: (l) => i(l)
32
+ data: e,
33
+ editedValue: i,
34
+ setEditedValue: (p) => l(p)
27
35
  }
28
- );
29
- case r.RADIO:
30
- case r.DATE_RANGE:
31
- return e.fetchAsyncFilterOptions ? /* @__PURE__ */ n(
32
- m,
33
- {
34
- field: e,
35
- setEditedValue: i,
36
- editedValue: o
37
- }
38
- ) : /* @__PURE__ */ n(
39
- p,
40
- {
41
- title: e.label,
42
- options: (s = e.options) != null && s.length ? e.options : [],
43
- selected: [o],
44
- onChange: (l) => i(`${l[0]}`)
45
- }
46
- );
47
- default:
48
- return null;
49
- }
36
+ ) }),
37
+ footer: /* @__PURE__ */ t(h, { clearActiveFilter: c, applyActiveFilter: n })
38
+ }
39
+ );
50
40
  });
51
41
  export {
52
- u as FilterField
42
+ z as ActiveFilterTag
53
43
  };
package/dist/index18.cjs CHANGED
@@ -1 +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("./index55.cjs"),m=require("./index16.cjs"),x=require("./index58.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),o=require("react"),y=require("mobx-react"),s=require("@veeqo/ui"),b=require("./index56.cjs"),v=require("./index15.cjs"),q=require("./index59.cjs"),x=require("./index22.cjs"),g=require("./index23.cjs"),j=y.observer(({filterData:e})=>{const{Filters:{arrayFilters:l,clearArrayFilter:u,setArrayFilter:a}}=q.useStores(),t=l.get(e.id),[i,c]=o.useState(t||[]);o.useEffect(()=>{i!==t&&c(t||[])},[e.id,t,l]);const n=()=>{u(e.id)},d=()=>{a(e.id,i)},{filterLabel:F}=b.useFilterArrayLabel({filterData:e});return r.jsx(s.FilterTag,{shouldCloseOnClickAway:!0,header:r.jsx(g.ActiveFilterHeader,{filterLabel:e.label}),label:e.label,text:F||"",content:r.jsx(s.BaseContainer,{style:{padding:s.theme.sizes.md},children:r.jsx(v.FilterArrayField,{data:e,editedValue:i||[],setEditedValue:A=>c(A)})}),footer:r.jsx(x.ActiveFilterFooter,{clearActiveFilter:n,applyActiveFilter:d})})});exports.ActiveFilterArrayTag=j;
package/dist/index18.js CHANGED
@@ -1,44 +1,43 @@
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 "./index55.js";
6
- import { FilterArrayField as b } from "./index16.js";
7
- import { useStores as x } from "./index58.js";
8
- const B = f(({ filterData: e }) => {
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useState as F, useEffect as p } from "react";
3
+ import { observer as u } from "mobx-react";
4
+ import { FilterTag as A, BaseContainer as f, theme as y } from "@veeqo/ui";
5
+ import { useFilterArrayLabel as b } from "./index56.js";
6
+ import { FilterArrayField as v } from "./index15.js";
7
+ import { useStores as V } from "./index59.js";
8
+ import { ActiveFilterFooter as g } from "./index22.js";
9
+ import { ActiveFilterHeader as h } from "./index23.js";
10
+ const z = u(({ filterData: e }) => {
9
11
  const {
10
- Filters: { arrayFilters: l, clearArrayFilter: a, setArrayFilter: c }
11
- } = x(), t = l.get(e.id), [i, s] = F(t || []);
12
- A(() => {
13
- i !== t && s(t || []);
14
- }, [e.id, t, l]);
12
+ Filters: { arrayFilters: o, clearArrayFilter: s, setArrayFilter: d }
13
+ } = V(), t = o.get(e.id), [i, l] = F(t || []);
14
+ p(() => {
15
+ i !== t && l(t || []);
16
+ }, [e.id, t, o]);
15
17
  const m = () => {
16
- a(e.id);
17
- }, p = () => {
18
- c(e.id, i);
19
- }, { filterLabel: u } = C({ filterData: e });
18
+ s(e.id);
19
+ }, a = () => {
20
+ d(e.id, i);
21
+ }, { filterLabel: c } = b({ filterData: e });
20
22
  return /* @__PURE__ */ r(
21
- v,
23
+ A,
22
24
  {
23
25
  shouldCloseOnClickAway: !0,
24
- header: /* @__PURE__ */ r("div", { children: "Edit filter (style and semant me pls)" }),
26
+ header: /* @__PURE__ */ r(h, { filterLabel: e.label }),
25
27
  label: e.label,
26
- text: u || "",
27
- content: /* @__PURE__ */ r(o, { style: { padding: d.sizes.md }, children: /* @__PURE__ */ r(
28
- b,
28
+ text: c || "",
29
+ content: /* @__PURE__ */ r(f, { style: { padding: y.sizes.md }, children: /* @__PURE__ */ r(
30
+ v,
29
31
  {
30
32
  data: e,
31
33
  editedValue: i || [],
32
- setEditedValue: (y) => s(y)
34
+ setEditedValue: (n) => l(n)
33
35
  }
34
36
  ) }),
35
- footer: /* @__PURE__ */ r(o, { style: { padding: d.sizes.sm, width: "200px" }, 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
- ] }) })
37
+ footer: /* @__PURE__ */ r(g, { clearActiveFilter: m, applyActiveFilter: a })
39
38
  }
40
39
  );
41
40
  });
42
41
  export {
43
- B as ActiveFilterArrayTag
42
+ z as ActiveFilterArrayTag
44
43
  };
package/dist/index19.cjs CHANGED
@@ -1 +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("./index65.cjs"),A=require("./index7.cjs"),j=require("./index58.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),f=require("mobx-react"),i=require("@veeqo/ui"),a=require("./index66.cjs"),q=require("./index7.cjs"),E=require("./index59.cjs"),S=require("./index22.cjs"),h=require("./index23.cjs"),x=f.observer(({filterData:s})=>{const{DEFAULT_DATE_PRESET:g,DEFAULT_DATE_RANGE:F}=q.useBusinessLogic(),{Filters:{dateRangeFilters:c,clearRangeFilter:u,setRangeFilter:R}}=E.useStores(),t=c.get(s.id),[e,l]=o.useState(c.get(s.id)),T=()=>{const r=new a.RangeFilter;return r.setFilterType(t==null?void 0:t.filterType),l(r),r};o.useEffect(()=>{if(!t)return;const r=new a.RangeFilter;r.setFilterType(t.filterType),t.gte&&t.lte&&r.setDates(t.gte,t.lte),l(r)},[t]);const d=()=>{u(s.id)},A=()=>{t&&(e!=null&&e.filterType)&&R({dates:{start:e.gte,end:e.lte},key:e.filterType,range:t})},y=(e==null?void 0:e.filterSelection)||g,b=r=>{r&&(e||T(),e==null||e.setFilterType(r.value))},p=r=>{!r||!e||e.setDates(r.start,r.end)},v=e?e.selectedRange:F;return n.jsx(i.FilterTag,{shouldCloseOnClickAway:!0,header:n.jsx(h.ActiveFilterHeader,{filterLabel:s.label}),label:s.label,text:(t==null?void 0:t.filterLabel)||"",content:n.jsx(i.BaseContainer,{style:{padding:i.theme.sizes.md},children:n.jsx(i.DateRangePicker,{"aria-label":`date range for ${s.label}`,selectedPreset:y,setSelectedPreset:b,selectedRange:v,setSelectedRange:p})}),footer:n.jsx(S.ActiveFilterFooter,{clearActiveFilter:d,applyActiveFilter:A})})});exports.ActiveFilterDateRangeTag=x;
package/dist/index19.js CHANGED
@@ -1,61 +1,60 @@
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 "./index65.js";
6
- import { useBusinessLogic as w } from "./index7.js";
7
- import { useStores as x } from "./index58.js";
8
- const G = S(
9
- ({ filterData: i }) => {
10
- const { DEFAULT_DATE_PRESET: d, DEFAULT_DATE_RANGE: p } = w(), {
11
- Filters: { dateRangeFilters: s, clearRangeFilter: m, setRangeFilter: f }
12
- } = x(), t = s.get(i.id), [e, l] = v(s.get(i.id)), F = () => {
13
- const r = new g();
14
- return r.setFilterType(t == null ? void 0 : t.filterType), l(r), r;
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { useState as A, useEffect as E } from "react";
3
+ import { observer as b } from "mobx-react";
4
+ import { FilterTag as h, BaseContainer as u, theme as v, DateRangePicker as P } from "@veeqo/ui";
5
+ import { RangeFilter as l } from "./index66.js";
6
+ import { useBusinessLogic as S } from "./index7.js";
7
+ import { useStores as C } from "./index59.js";
8
+ import { ActiveFilterFooter as L } from "./index22.js";
9
+ import { ActiveFilterHeader as w } from "./index23.js";
10
+ const H = b(
11
+ ({ filterData: n }) => {
12
+ const { DEFAULT_DATE_PRESET: a, DEFAULT_DATE_RANGE: c } = S(), {
13
+ Filters: { dateRangeFilters: i, clearRangeFilter: g, setRangeFilter: m }
14
+ } = C(), t = i.get(n.id), [e, o] = A(i.get(n.id)), p = () => {
15
+ const r = new l();
16
+ return r.setFilterType(t == null ? void 0 : t.filterType), o(r), r;
15
17
  };
16
- C(() => {
18
+ E(() => {
17
19
  if (!t) return;
18
- const r = new g();
19
- r.setFilterType(t.filterType), t.gte && t.lte && r.setDates(t.gte, t.lte), l(r);
20
+ const r = new l();
21
+ r.setFilterType(t.filterType), t.gte && t.lte && r.setDates(t.gte, t.lte), o(r);
20
22
  }, [t]);
21
- const h = () => {
22
- m(i.id);
23
- }, y = () => {
24
- t && (e != null && e.filterType) && f({
23
+ const F = () => {
24
+ g(n.id);
25
+ }, f = () => {
26
+ t && (e != null && e.filterType) && m({
25
27
  dates: { start: e.gte, end: e.lte },
26
28
  key: e.filterType,
27
29
  range: t
28
30
  });
29
- }, R = (e == null ? void 0 : e.filterSelection) || d, T = (r) => {
30
- r && (e || F(), e == null || e.setFilterType(r.value));
31
- }, A = (r) => {
31
+ }, R = (e == null ? void 0 : e.filterSelection) || a, T = (r) => {
32
+ r && (e || p(), e == null || e.setFilterType(r.value));
33
+ }, d = (r) => {
32
34
  !r || !e || e.setDates(r.start, r.end);
33
- }, E = e ? e.selectedRange : p;
34
- return /* @__PURE__ */ n(
35
- b,
35
+ }, y = e ? e.selectedRange : c;
36
+ return /* @__PURE__ */ s(
37
+ h,
36
38
  {
37
39
  shouldCloseOnClickAway: !0,
38
- header: /* @__PURE__ */ n("div", { children: "Edit filter (style and semant me pls)" }),
39
- label: i.label,
40
+ header: /* @__PURE__ */ s(w, { filterLabel: n.label }),
41
+ label: n.label,
40
42
  text: (t == null ? void 0 : t.filterLabel) || "",
41
- content: /* @__PURE__ */ n(a, { style: { padding: o.sizes.md }, children: /* @__PURE__ */ n(
43
+ content: /* @__PURE__ */ s(u, { style: { padding: v.sizes.md }, children: /* @__PURE__ */ s(
42
44
  P,
43
45
  {
44
- "aria-label": `date range for ${i.label}`,
46
+ "aria-label": `date range for ${n.label}`,
45
47
  selectedPreset: R,
46
48
  setSelectedPreset: T,
47
- selectedRange: E,
48
- setSelectedRange: A
49
+ selectedRange: y,
50
+ setSelectedRange: d
49
51
  }
50
52
  ) }),
51
- footer: /* @__PURE__ */ n(a, { style: { padding: o.sizes.sm, width: "200px" }, children: /* @__PURE__ */ u(k, { direction: "horizontal", alignX: "end", children: [
52
- /* @__PURE__ */ n(c, { variant: "default", size: "sm", onClick: h, children: "Clear" }),
53
- /* @__PURE__ */ n(c, { variant: "primary", size: "sm", onClick: y, children: "Apply" })
54
- ] }) })
53
+ footer: /* @__PURE__ */ s(L, { clearActiveFilter: F, applyActiveFilter: f })
55
54
  }
56
55
  );
57
56
  }
58
57
  );
59
58
  export {
60
- G as ActiveFilterDateRangeTag
59
+ H as ActiveFilterDateRangeTag
61
60
  };
package/dist/index2.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index6.cjs"),s=require("./index50.cjs"),i=require("./index51.cjs"),o=e=>t.axios.delete(`/api/v2/custom_views/${e}`,s.withCSRF(i.vndAPI));exports.deleteCustomView=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index6.cjs"),s=require("./index51.cjs"),i=require("./index52.cjs"),o=e=>t.axios.delete(`/api/v2/custom_views/${e}`,s.withCSRF(i.vndAPI));exports.deleteCustomView=o;
package/dist/index2.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { axios as t } from "./index6.js";
2
- import { withCSRF as e } from "./index50.js";
3
- import { vndAPI as i } from "./index51.js";
2
+ import { withCSRF as e } from "./index51.js";
3
+ import { vndAPI as i } from "./index52.js";
4
4
  const s = (o) => t.delete(`/api/v2/custom_views/${o}`, e(i));
5
5
  export {
6
6
  s as deleteCustomView
package/dist/index20.cjs CHANGED
@@ -1 +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("./index64.cjs"),R=require("./index105.cjs"),h=require("./index58.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),d=require("mobx-react"),l=require("@veeqo/ui"),m=require("./index65.cjs"),R=require("./index108.cjs"),v=require("./index59.cjs"),N=require("./index22.cjs"),q=require("./index23.cjs"),A=d.observer(({filterData:t})=>{const{Filters:{numberRangeFilters:u,clearNumberRangeFilter:a,setNumberRangeFilter:F}}=v.useStores(),e=u.get(t.id),[n,c]=s.useState(e),o=s.useCallback(()=>{const r=new m.NumberRangeFilter({filterId:t.id});return e&&(e.gte&&r.setGte(e.gte),e.lte&&r.setLte(e.lte)),r},[t.id,e]);s.useEffect(()=>{const r=o();c(r)},[o,e]);const g=()=>{a(t.id)},b=()=>{!e||!n||F({numberRange:e,lte:n.lte,gte:n.gte})};return i.jsx(l.FilterTag,{shouldCloseOnClickAway:!0,header:i.jsx(q.ActiveFilterHeader,{filterLabel:t.label}),label:t.label,text:(e==null?void 0:e.filterLabel)||"Loading...",content:i.jsx(l.BaseContainer,{style:{padding:l.theme.sizes.md},children:i.jsx(R.FilterNumberRangeFilter,{data:t,editedValue:n,setEditedValue:c})}),footer:i.jsx(N.ActiveFilterFooter,{clearActiveFilter:g,applyActiveFilter:b})})});exports.ActiveFilterNumberRangeTag=A;