@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/index67.js CHANGED
@@ -1,34 +1,40 @@
1
- var m = Object.defineProperty;
2
- var r = (o, t, s) => t in o ? m(o, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : o[t] = s;
3
- var e = (o, t, s) => r(o, typeof t != "symbol" ? t + "" : t, s);
4
- import { makeObservable as h, action as i, observable as n } from "mobx";
5
- import { uid as c } from "uid/secure";
6
- class y {
1
+ var f = Object.defineProperty;
2
+ var w = (a, t, e) => t in a ? f(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
+ var r = (a, t, e) => w(a, typeof t != "symbol" ? t + "" : t, e);
4
+ import { makeObservable as V, action as i, observable as d, computed as u } from "mobx";
5
+ class h {
7
6
  constructor() {
8
- e(this, "toasts");
9
- e(this, "timeouts");
10
- e(this, "notify", (t) => {
11
- const s = {
7
+ r(this, "draftCount");
8
+ r(this, "draftViewsMap");
9
+ r(this, "addDraftView", (t) => {
10
+ const e = t.originalView || t, s = `${e.id}-draft${this.draftCount}`, o = `${e.label} (Copy ${this.draftCount + 1})`, n = {
12
11
  ...t,
13
- key: c()
12
+ id: s,
13
+ label: o,
14
+ editable: !0,
15
+ originalView: e
14
16
  };
15
- this.toasts = [...this.toasts, s];
17
+ return this.draftViewsMap.set(s, n), this.incrementDraftViewCount(), n;
16
18
  });
17
- e(this, "setToasts", (t) => {
18
- this.toasts = t;
19
+ r(this, "removeDraftViewById", (t) => {
20
+ this.draftViewsMap.has(t) && this.draftViewsMap.delete(t);
19
21
  });
20
- e(this, "removeByKey", (t) => {
21
- const s = this.timeouts.get(t);
22
- s && (clearTimeout(s), this.timeouts.delete(t)), this.toasts = this.toasts.filter((a) => a.key !== t);
22
+ r(this, "incrementDraftViewCount", () => {
23
+ this.draftCount += 1;
23
24
  });
24
- h(this, {
25
- toasts: n,
26
- notify: i,
27
- setToasts: i,
28
- removeByKey: i
29
- }), this.toasts = [], this.timeouts = /* @__PURE__ */ new Map();
25
+ V(this, {
26
+ draftViewsList: u,
27
+ draftViewsMap: d,
28
+ draftCount: d,
29
+ addDraftView: i,
30
+ removeDraftViewById: i,
31
+ incrementDraftViewCount: i
32
+ }), this.draftCount = 0, this.draftViewsMap = /* @__PURE__ */ new Map();
33
+ }
34
+ get draftViewsList() {
35
+ return Array.from(this.draftViewsMap.entries()).map(([, t]) => t);
30
36
  }
31
37
  }
32
38
  export {
33
- y as Notifications
39
+ h as Views
34
40
  };
package/dist/index68.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("mobx-react"),n=({children:e,Filters:i,Views:r,Notifications:t})=>o.jsx(s.Provider,{Filters:i,Views:r,Notifications:t,children:e});exports.MobXProvider=n;
1
+ "use strict";var r=Object.defineProperty;var c=(e,t,s)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var o=(e,t,s)=>c(e,typeof t!="symbol"?t+"":t,s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("mobx"),n=require("uid/secure");class u{constructor(){o(this,"toasts");o(this,"timeouts");o(this,"notify",t=>{const s={...t,key:n.uid()};this.toasts=[...this.toasts,s]});o(this,"setToasts",t=>{this.toasts=t});o(this,"removeByKey",t=>{const s=this.timeouts.get(t);s&&(clearTimeout(s),this.timeouts.delete(t)),this.toasts=this.toasts.filter(a=>a.key!==t)});i.makeObservable(this,{toasts:i.observable,notify:i.action,setToasts:i.action,removeByKey:i.action}),this.toasts=[],this.timeouts=new Map}}exports.Notifications=u;
package/dist/index68.js CHANGED
@@ -1,6 +1,34 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { Provider as s } from "mobx-react";
3
- const n = ({ children: i, Filters: o, Views: r, Notifications: t }) => /* @__PURE__ */ e(s, { Filters: o, Views: r, Notifications: t, children: i });
1
+ var m = Object.defineProperty;
2
+ var r = (o, t, s) => t in o ? m(o, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : o[t] = s;
3
+ var e = (o, t, s) => r(o, typeof t != "symbol" ? t + "" : t, s);
4
+ import { makeObservable as h, action as i, observable as n } from "mobx";
5
+ import { uid as c } from "uid/secure";
6
+ class y {
7
+ constructor() {
8
+ e(this, "toasts");
9
+ e(this, "timeouts");
10
+ e(this, "notify", (t) => {
11
+ const s = {
12
+ ...t,
13
+ key: c()
14
+ };
15
+ this.toasts = [...this.toasts, s];
16
+ });
17
+ e(this, "setToasts", (t) => {
18
+ this.toasts = t;
19
+ });
20
+ e(this, "removeByKey", (t) => {
21
+ const s = this.timeouts.get(t);
22
+ s && (clearTimeout(s), this.timeouts.delete(t)), this.toasts = this.toasts.filter((a) => a.key !== t);
23
+ });
24
+ h(this, {
25
+ toasts: n,
26
+ notify: i,
27
+ setToasts: i,
28
+ removeByKey: i
29
+ }), this.toasts = [], this.timeouts = /* @__PURE__ */ new Map();
30
+ }
31
+ }
4
32
  export {
5
- n as MobXProvider
33
+ y as Notifications
6
34
  };
package/dist/index69.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash/get"),s=t=>t&&t.__esModule?t:{default:t},l=s(o),a=({data:t,config:e})=>!e||!t?[]:t.map(r=>{const u=l.default(r,e.labelProperty),n=l.default(r,e.valueProperty);return{label:u,value:n.toString()}});exports.getAsyncOptions=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("mobx-react"),n=({children:e,Filters:i,Views:r,Notifications:t})=>o.jsx(s.Provider,{Filters:i,Views:r,Notifications:t,children:e});exports.MobXProvider=n;
package/dist/index69.js CHANGED
@@ -1,11 +1,6 @@
1
- import o from "lodash/get";
2
- const u = ({ data: t, config: r }) => !r || !t ? [] : t.map((e) => {
3
- const l = o(e, r.labelProperty), n = o(e, r.valueProperty);
4
- return {
5
- label: l,
6
- value: n.toString()
7
- };
8
- });
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { Provider as s } from "mobx-react";
3
+ const n = ({ children: i, Filters: o, Views: r, Notifications: t }) => /* @__PURE__ */ e(s, { Filters: o, Views: r, Notifications: t, children: i });
9
4
  export {
10
- u as getAsyncOptions
5
+ n as MobXProvider
11
6
  };
package/dist/index70.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index52.cjs"),c=({fetcherName:r})=>{let e;switch(r){case"fetcherV1":e=t.fetcherV1;break;case"fetcherV2":e=t.fetcherV2;break;default:e=t.fetcherV1;break}return e};exports.getFetcherFunction=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash/get"),s=t=>t&&t.__esModule?t:{default:t},l=s(o),a=({data:t,config:e})=>!e||!t?[]:t.map(r=>{const u=l.default(r,e.labelProperty),n=l.default(r,e.valueProperty);return{label:u,value:n.toString()}});exports.getAsyncOptions=a;
package/dist/index70.js CHANGED
@@ -1,19 +1,11 @@
1
- import { fetcherV1 as t, fetcherV2 as c } from "./index52.js";
2
- const h = ({ fetcherName: r }) => {
3
- let e;
4
- switch (r) {
5
- case "fetcherV1":
6
- e = t;
7
- break;
8
- case "fetcherV2":
9
- e = c;
10
- break;
11
- default:
12
- e = t;
13
- break;
14
- }
15
- return e;
16
- };
1
+ import o from "lodash/get";
2
+ const u = ({ data: t, config: r }) => !r || !t ? [] : t.map((e) => {
3
+ const l = o(e, r.labelProperty), n = o(e, r.valueProperty);
4
+ return {
5
+ label: l,
6
+ value: n.toString()
7
+ };
8
+ });
17
9
  export {
18
- h as getFetcherFunction
10
+ u as getAsyncOptions
19
11
  };
package/dist/index71.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@veeqo/ui"),s=a=>{switch(a){case e.DateRanges.TODAY:case e.DateRanges.YESTERDAY:case e.DateRanges.LAST_7_DAYS:case e.DateRanges.LAST_30_DAYS:case e.DateRanges.LAST_90_DAYS:case e.DateRanges.LAST_MONTH:case e.DateRanges.LAST_12_MONTHS:case e.DateRanges.WEEK_TO_DATE:case e.DateRanges.MONTH_TO_DATE:case e.DateRanges.YEAR_TO_DATE:return!0;default:return!1}};exports.isValidDateRange=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index53.cjs"),c=({fetcherName:r})=>{let e;switch(r){case"fetcherV1":e=t.fetcherV1;break;case"fetcherV2":e=t.fetcherV2;break;default:e=t.fetcherV1;break}return e};exports.getFetcherFunction=c;
package/dist/index71.js CHANGED
@@ -1,21 +1,19 @@
1
- import { DateRanges as e } from "@veeqo/ui";
2
- const s = (a) => {
3
- switch (a) {
4
- case e.TODAY:
5
- case e.YESTERDAY:
6
- case e.LAST_7_DAYS:
7
- case e.LAST_30_DAYS:
8
- case e.LAST_90_DAYS:
9
- case e.LAST_MONTH:
10
- case e.LAST_12_MONTHS:
11
- case e.WEEK_TO_DATE:
12
- case e.MONTH_TO_DATE:
13
- case e.YEAR_TO_DATE:
14
- return !0;
1
+ import { fetcherV1 as t, fetcherV2 as c } from "./index53.js";
2
+ const h = ({ fetcherName: r }) => {
3
+ let e;
4
+ switch (r) {
5
+ case "fetcherV1":
6
+ e = t;
7
+ break;
8
+ case "fetcherV2":
9
+ e = c;
10
+ break;
15
11
  default:
16
- return !1;
12
+ e = t;
13
+ break;
17
14
  }
15
+ return e;
18
16
  };
19
17
  export {
20
- s as isValidDateRange
18
+ h as getFetcherFunction
21
19
  };
package/dist/index72.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@internationalized/date"),l=require("./index65.cjs"),g=require("./index64.cjs"),d=require("./index8.cjs"),u=({view:r,canUpdateCustomViews:c})=>{const{DATE_RANGE_FILTERS:i,NUMBER_RANGE_FILTERS:n}=d.BusinessLogicManager.getBusinessLogic();return{id:r.id,label:r.title,filterMaps:{filters:new Map(Object.entries(r.filters.filter||{}).filter(([e,t])=>!Array.isArray(t)&&!i.includes(e)&&!n.includes(e)).map(([e,t])=>[e,t])),arrayFilters:new Map(Object.entries(r.filters.filter||{}).filter(([,e])=>Array.isArray(e)).map(([e,t])=>[e,t])),rangeFilters:new Map(Object.entries(r.filters.filter||{}).filter(([e])=>i.includes(e)).map(([e,t])=>{let s;if(typeof t=="string")s=new l.RangeFilter(t);else{s=new l.RangeFilter("CUSTOM");const f=a.parseDate(t.gte),o=a.parseDate(t.lte);s.setDates(f,o)}return[e,s]})),numberRangeFilters:new Map(Object.entries(r.filters.filter||{}).filter(([e])=>n.includes(e)).map(([e,t])=>{const s=new g.NumberRangeFilter({filterId:e});return t.lte!==void 0&&s.setLte(Number(t.lte)),t.gte!==void 0&&s.setGte(Number(t.gte)),[e,s]}))},page:r.filters.page,editable:r.editable&&c,isShared:r.shared,columns:r.columns}};exports.viewsAdapter=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@veeqo/ui"),s=a=>{switch(a){case e.DateRanges.TODAY:case e.DateRanges.YESTERDAY:case e.DateRanges.LAST_7_DAYS:case e.DateRanges.LAST_30_DAYS:case e.DateRanges.LAST_90_DAYS:case e.DateRanges.LAST_MONTH:case e.DateRanges.LAST_12_MONTHS:case e.DateRanges.WEEK_TO_DATE:case e.DateRanges.MONTH_TO_DATE:case e.DateRanges.YEAR_TO_DATE:return!0;default:return!1}};exports.isValidDateRange=s;
package/dist/index72.js CHANGED
@@ -1,50 +1,21 @@
1
- import { parseDate as l } from "@internationalized/date";
2
- import { RangeFilter as a } from "./index65.js";
3
- import { NumberRangeFilter as p } from "./index64.js";
4
- import { BusinessLogicManager as c } from "./index8.js";
5
- const M = ({
6
- view: r,
7
- canUpdateCustomViews: f
8
- }) => {
9
- const { DATE_RANGE_FILTERS: i, NUMBER_RANGE_FILTERS: n } = c.getBusinessLogic();
10
- return {
11
- id: r.id,
12
- label: r.title,
13
- filterMaps: {
14
- filters: new Map(
15
- Object.entries(r.filters.filter || {}).filter(
16
- ([e, t]) => !Array.isArray(t) && !i.includes(e) && !n.includes(e)
17
- ).map(([e, t]) => [e, t])
18
- ),
19
- arrayFilters: new Map(
20
- Object.entries(r.filters.filter || {}).filter(([, e]) => Array.isArray(e)).map(([e, t]) => [e, t])
21
- ),
22
- rangeFilters: new Map(
23
- Object.entries(r.filters.filter || {}).filter(([e]) => i.includes(e)).map(([e, t]) => {
24
- let s;
25
- if (typeof t == "string")
26
- s = new a(t);
27
- else {
28
- s = new a("CUSTOM");
29
- const o = l(t.gte), m = l(t.lte);
30
- s.setDates(o, m);
31
- }
32
- return [e, s];
33
- })
34
- ),
35
- numberRangeFilters: new Map(
36
- Object.entries(r.filters.filter || {}).filter(([e]) => n.includes(e)).map(([e, t]) => {
37
- const s = new p({ filterId: e });
38
- return t.lte !== void 0 && s.setLte(Number(t.lte)), t.gte !== void 0 && s.setGte(Number(t.gte)), [e, s];
39
- })
40
- )
41
- },
42
- page: r.filters.page,
43
- editable: r.editable && f,
44
- isShared: r.shared,
45
- columns: r.columns
46
- };
1
+ import { DateRanges as e } from "@veeqo/ui";
2
+ const s = (a) => {
3
+ switch (a) {
4
+ case e.TODAY:
5
+ case e.YESTERDAY:
6
+ case e.LAST_7_DAYS:
7
+ case e.LAST_30_DAYS:
8
+ case e.LAST_90_DAYS:
9
+ case e.LAST_MONTH:
10
+ case e.LAST_12_MONTHS:
11
+ case e.WEEK_TO_DATE:
12
+ case e.MONTH_TO_DATE:
13
+ case e.YEAR_TO_DATE:
14
+ return !0;
15
+ default:
16
+ return !1;
17
+ }
47
18
  };
48
19
  export {
49
- M as viewsAdapter
20
+ s as isValidDateRange
50
21
  };
package/dist/index73.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="all",l=()=>({id:e,label:"All",filterMaps:{filters:new Map,arrayFilters:new Map,rangeFilters:new Map,numberRangeFilters:new Map},page:{size:10},editable:!1,isShared:!1,columns:{columnIds:[],columnWidths:{}}});exports.ALL_VIEW_ID=e;exports.createAllView=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@internationalized/date"),l=require("./index66.cjs"),g=require("./index65.cjs"),d=require("./index8.cjs"),u=({view:r,canUpdateCustomViews:c})=>{const{DATE_RANGE_FILTERS:i,NUMBER_RANGE_FILTERS:n}=d.BusinessLogicManager.getBusinessLogic();return{id:r.id,label:r.title,filterMaps:{filters:new Map(Object.entries(r.filters.filter||{}).filter(([e,t])=>!Array.isArray(t)&&!i.includes(e)&&!n.includes(e)).map(([e,t])=>[e,t])),arrayFilters:new Map(Object.entries(r.filters.filter||{}).filter(([,e])=>Array.isArray(e)).map(([e,t])=>[e,t])),rangeFilters:new Map(Object.entries(r.filters.filter||{}).filter(([e])=>i.includes(e)).map(([e,t])=>{let s;if(typeof t=="string")s=new l.RangeFilter(t);else{s=new l.RangeFilter("CUSTOM");const f=a.parseDate(t.gte),o=a.parseDate(t.lte);s.setDates(f,o)}return[e,s]})),numberRangeFilters:new Map(Object.entries(r.filters.filter||{}).filter(([e])=>n.includes(e)).map(([e,t])=>{const s=new g.NumberRangeFilter({filterId:e});return t.lte!==void 0&&s.setLte(Number(t.lte)),t.gte!==void 0&&s.setGte(Number(t.gte)),[e,s]}))},page:r.filters.page,editable:r.editable&&c,isShared:r.shared,columns:r.columns}};exports.viewsAdapter=u;
package/dist/index73.js CHANGED
@@ -1,23 +1,50 @@
1
- const e = "all", l = () => ({
2
- id: e,
3
- label: "All",
4
- filterMaps: {
5
- filters: /* @__PURE__ */ new Map(),
6
- arrayFilters: /* @__PURE__ */ new Map(),
7
- rangeFilters: /* @__PURE__ */ new Map(),
8
- numberRangeFilters: /* @__PURE__ */ new Map()
9
- },
10
- page: {
11
- size: 10
12
- },
13
- editable: !1,
14
- isShared: !1,
15
- columns: {
16
- columnIds: [],
17
- columnWidths: {}
18
- }
19
- });
1
+ import { parseDate as l } from "@internationalized/date";
2
+ import { RangeFilter as a } from "./index66.js";
3
+ import { NumberRangeFilter as p } from "./index65.js";
4
+ import { BusinessLogicManager as c } from "./index8.js";
5
+ const M = ({
6
+ view: r,
7
+ canUpdateCustomViews: f
8
+ }) => {
9
+ const { DATE_RANGE_FILTERS: i, NUMBER_RANGE_FILTERS: n } = c.getBusinessLogic();
10
+ return {
11
+ id: r.id,
12
+ label: r.title,
13
+ filterMaps: {
14
+ filters: new Map(
15
+ Object.entries(r.filters.filter || {}).filter(
16
+ ([e, t]) => !Array.isArray(t) && !i.includes(e) && !n.includes(e)
17
+ ).map(([e, t]) => [e, t])
18
+ ),
19
+ arrayFilters: new Map(
20
+ Object.entries(r.filters.filter || {}).filter(([, e]) => Array.isArray(e)).map(([e, t]) => [e, t])
21
+ ),
22
+ rangeFilters: new Map(
23
+ Object.entries(r.filters.filter || {}).filter(([e]) => i.includes(e)).map(([e, t]) => {
24
+ let s;
25
+ if (typeof t == "string")
26
+ s = new a(t);
27
+ else {
28
+ s = new a("CUSTOM");
29
+ const o = l(t.gte), m = l(t.lte);
30
+ s.setDates(o, m);
31
+ }
32
+ return [e, s];
33
+ })
34
+ ),
35
+ numberRangeFilters: new Map(
36
+ Object.entries(r.filters.filter || {}).filter(([e]) => n.includes(e)).map(([e, t]) => {
37
+ const s = new p({ filterId: e });
38
+ return t.lte !== void 0 && s.setLte(Number(t.lte)), t.gte !== void 0 && s.setGte(Number(t.gte)), [e, s];
39
+ })
40
+ )
41
+ },
42
+ page: r.filters.page,
43
+ editable: r.editable && f,
44
+ isShared: r.shared,
45
+ columns: r.columns
46
+ };
47
+ };
20
48
  export {
21
- e as ALL_VIEW_ID,
22
- l as createAllView
49
+ M as viewsAdapter
23
50
  };
package/dist/index74.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var P=(t=>(t.GET="AxiosGet",t.DELETE="AxiosDelete",t.POST="AxiosPost",t.PATCH="AxiosPatch",t.PUT="AxiosPut",t.POST_FORM="AxioPostForm",t.PUT_FORM="AxiosPutForm",t.PATCH_FORM="AxiosPatchForm",t))(P||{});exports.AxiosErrorType=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="all",l=()=>({id:e,label:"All",filterMaps:{filters:new Map,arrayFilters:new Map,rangeFilters:new Map,numberRangeFilters:new Map},page:{size:10},editable:!1,isShared:!1,columns:{columnIds:[],columnWidths:{}}});exports.ALL_VIEW_ID=e;exports.createAllView=l;
package/dist/index74.js CHANGED
@@ -1,4 +1,23 @@
1
- var t = /* @__PURE__ */ ((P) => (P.GET = "AxiosGet", P.DELETE = "AxiosDelete", P.POST = "AxiosPost", P.PATCH = "AxiosPatch", P.PUT = "AxiosPut", P.POST_FORM = "AxioPostForm", P.PUT_FORM = "AxiosPutForm", P.PATCH_FORM = "AxiosPatchForm", P))(t || {});
1
+ const e = "all", l = () => ({
2
+ id: e,
3
+ label: "All",
4
+ filterMaps: {
5
+ filters: /* @__PURE__ */ new Map(),
6
+ arrayFilters: /* @__PURE__ */ new Map(),
7
+ rangeFilters: /* @__PURE__ */ new Map(),
8
+ numberRangeFilters: /* @__PURE__ */ new Map()
9
+ },
10
+ page: {
11
+ size: 10
12
+ },
13
+ editable: !1,
14
+ isShared: !1,
15
+ columns: {
16
+ columnIds: [],
17
+ columnWidths: {}
18
+ }
19
+ });
2
20
  export {
3
- t as AxiosErrorType
21
+ e as ALL_VIEW_ID,
22
+ l as createAllView
4
23
  };
package/dist/index75.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=(r,t)=>{const e=[r];return t!==void 0&&e.push(t),e},l=(r,t,e)=>{const i=[r];return t!==void 0&&i.push(t),e!==void 0&&i.push(e),i};exports.filterOptionalArgs=l;exports.filterOptionalArgsGetDelete=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var P=(t=>(t.GET="AxiosGet",t.DELETE="AxiosDelete",t.POST="AxiosPost",t.PATCH="AxiosPatch",t.PUT="AxiosPut",t.POST_FORM="AxioPostForm",t.PUT_FORM="AxiosPutForm",t.PATCH_FORM="AxiosPatchForm",t))(P||{});exports.AxiosErrorType=P;
package/dist/index75.js CHANGED
@@ -1,11 +1,4 @@
1
- const i = (s, t) => {
2
- const r = [s];
3
- return t !== void 0 && r.push(t), r;
4
- }, o = (s, t, r) => {
5
- const e = [s];
6
- return t !== void 0 && e.push(t), r !== void 0 && e.push(r), e;
7
- };
1
+ var t = /* @__PURE__ */ ((P) => (P.GET = "AxiosGet", P.DELETE = "AxiosDelete", P.POST = "AxiosPost", P.PATCH = "AxiosPatch", P.PUT = "AxiosPut", P.POST_FORM = "AxioPostForm", P.PUT_FORM = "AxiosPutForm", P.PATCH_FORM = "AxiosPatchForm", P))(t || {});
8
2
  export {
9
- o as filterOptionalArgs,
10
- i as filterOptionalArgsGetDelete
3
+ t as AxiosErrorType
11
4
  };
package/dist/index76.cjs CHANGED
@@ -1,3 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index99.cjs"),s=e=>{if(!l.isError(e))return e;if(e.stack){const t=e.stack.split(`
2
- `);if(t.length<=10)return e;const n=t==null?void 0:t[0],i=t==null?void 0:t.splice(9),r=[n,...i].join(`
3
- `);e.stack=r}return e};exports.filterErrorStack=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=(r,t)=>{const e=[r];return t!==void 0&&e.push(t),e},l=(r,t,e)=>{const i=[r];return t!==void 0&&i.push(t),e!==void 0&&i.push(e),i};exports.filterOptionalArgs=l;exports.filterOptionalArgsGetDelete=s;
package/dist/index76.js CHANGED
@@ -1,16 +1,11 @@
1
- import { isError as l } from "./index99.js";
2
- const s = (e) => {
3
- if (!l(e)) return e;
4
- if (e.stack) {
5
- const n = e.stack.split(`
6
- `);
7
- if (n.length <= 10) return e;
8
- const i = n == null ? void 0 : n[0], t = n == null ? void 0 : n.splice(9), f = [i, ...t].join(`
9
- `);
10
- e.stack = f;
11
- }
12
- return e;
1
+ const i = (s, t) => {
2
+ const r = [s];
3
+ return t !== void 0 && r.push(t), r;
4
+ }, o = (s, t, r) => {
5
+ const e = [s];
6
+ return t !== void 0 && e.push(t), r !== void 0 && e.push(r), e;
13
7
  };
14
8
  export {
15
- s as filterErrorStack
9
+ o as filterOptionalArgs,
10
+ i as filterOptionalArgsGetDelete
16
11
  };
package/dist/index77.cjs CHANGED
@@ -1 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index99.cjs"),n=({customError:t,originalError:e,type:c})=>{!s.isError(e)||!s.isError(t)||(e.stack&&(e.stack=t.stack),e.name&&(e.name=`${c} (${e.name})`))};exports.injectIntoError=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index100.cjs"),s=e=>{if(!l.isError(e))return e;if(e.stack){const t=e.stack.split(`
2
+ `);if(t.length<=10)return e;const n=t==null?void 0:t[0],i=t==null?void 0:t.splice(9),r=[n,...i].join(`
3
+ `);e.stack=r}return e};exports.filterErrorStack=s;
package/dist/index77.js CHANGED
@@ -1,11 +1,16 @@
1
- import { isError as c } from "./index99.js";
2
- const s = ({
3
- customError: e,
4
- originalError: t,
5
- type: f
6
- }) => {
7
- !c(t) || !c(e) || (t.stack && (t.stack = e.stack), t.name && (t.name = `${f} (${t.name})`));
1
+ import { isError as l } from "./index100.js";
2
+ const s = (e) => {
3
+ if (!l(e)) return e;
4
+ if (e.stack) {
5
+ const n = e.stack.split(`
6
+ `);
7
+ if (n.length <= 10) return e;
8
+ const i = n == null ? void 0 : n[0], t = n == null ? void 0 : n.splice(9), f = [i, ...t].join(`
9
+ `);
10
+ e.stack = f;
11
+ }
12
+ return e;
8
13
  };
9
14
  export {
10
- s as injectIntoError
15
+ s as filterErrorStack
11
16
  };
package/dist/index78.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("@veeqo/ui"),s=require("react"),w=require("@veeqo/components"),S=require("./index84.cjs"),i=require("./index85.cjs"),T=require("./index86.cjs"),V=require("./index87.cjs"),n=require("./index88.cjs"),D=require("./index79.cjs"),H=require("./index89.cjs"),j=require("./index90.cjs"),{Glyph:O}=w.VeeqoCommon,$=({onClose:u,columnDefintions:G,hiddenColumns:d,visibleColumns:m,pinnedLeftColumnIds:y,pinnedRightColumnIds:f})=>{const[c,p]=s.useState(""),a=s.useMemo(()=>new Map(G.map(r=>[r.id,r])),[]),[o,g]=s.useState(()=>({[n.ColumnGroupIds.Hidden]:d,[n.ColumnGroupIds.Visible]:m})),I=s.useMemo(()=>{const r=o[n.ColumnGroupIds.Visible].map(t=>a.get(`${t}`));return j.filterColumnsBySearch(r,c)},[o,a,c]),v=s.useMemo(()=>{const r=o[n.ColumnGroupIds.Hidden].map(t=>a.get(`${t}`));return j.filterColumnsBySearch(r,c)},[o,a,c]),{isSavingColumns:h,saveColumns:M}=H.usePersistColumns({pinnedLeftColumnIds:y,pinnedRightColumnIds:f}),q=()=>{p(""),g({[n.ColumnGroupIds.Hidden]:d,[n.ColumnGroupIds.Visible]:m})},x=s.useCallback(r=>{if(p(r),!r){const t=new Set([...d,...m]);g(b=>({[n.ColumnGroupIds.Hidden]:b[n.ColumnGroupIds.Hidden].filter(C=>t.has(`${C}`)),[n.ColumnGroupIds.Visible]:b[n.ColumnGroupIds.Visible].filter(C=>t.has(`${C}`))}))}},[d,m]),k=s.useCallback(r=>{const t=a.get(`${r}`);return t?e.jsx(V.ColumnItem,{column:t,isDragOverlay:!0}):null},[a]);return e.jsx(l.Modal,{variant:"lg",style:{overflowY:"hidden"},shouldShow:!0,onClose:()=>u==null?void 0:u(),headerSlot:e.jsxs(i.HeaderContainer,{children:[e.jsxs(l.Stack,{direction:"horizontal",alignX:"between",alignY:"center",children:[e.jsxs(l.Stack,{direction:"horizontal",alignX:"start",alignY:"center",spacing:"sm",children:[e.jsx(D.TableManagementGlyph,{height:32,width:32}),e.jsx(l.Text,{variant:"headingLarge",as:"h1",children:"Table management"})]}),e.jsx(l.Button,{"aria-label":"Close modal",onClick:u,variant:"flat",iconSlot:e.jsx(O,{name:"close"})})]}),e.jsxs(l.Text,{variant:"subheadingMedium",children:["Show, hide, or change the order of the columns in the view, so you always see the data that's most important to you. Learn more with our"," ",e.jsx(l.Anchor,{href:"#",target:"_blank",children:"help guide (TODO)"}),"."]}),e.jsx(l.Text,{variant:"headingSmall",children:"Column management"}),e.jsx(i.ColumnSearch,{name:"column-search-query",placeholder:"Search",value:c,onChange:x,onClearClick:()=>x(""),fill:"100%"})]}),leftActions:[{label:"Reset",onClick:q,variant:"default",disabled:h}],rightActions:[{label:"Cancel",onClick:u,variant:"default",disabled:h},{label:"Save",onClick:()=>M({visibleColumns:o[n.ColumnGroupIds.Visible]}),variant:"primary",disabled:h,loading:h}],children:e.jsx(l.Stack,{spacing:"md",alignX:"stretch",children:e.jsx(l.Stack,{spacing:4,alignX:"stretch",children:e.jsx(T.DndContainer,{items:o,setItems:g,renderDragOverlay:k,children:e.jsx(i.Container,{children:e.jsxs(i.ColumnGroupsGrid,{columns:2,spacing:"xl",children:[e.jsx(S.ColumnGroup,{id:n.ColumnGroupIds.Visible,title:"Shown columns:",columns:I}),e.jsx(i.VerticalSeparator,{children:e.jsx(i.VerticalText,{children:"Drag & Drop columns"})}),e.jsx(S.ColumnGroup,{id:n.ColumnGroupIds.Hidden,title:"Hidden columns:",columns:v})]})})})})})})};exports.TableManagementModal=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index100.cjs"),n=({customError:t,originalError:e,type:c})=>{!s.isError(e)||!s.isError(t)||(e.stack&&(e.stack=t.stack),e.name&&(e.name=`${c} (${e.name})`))};exports.injectIntoError=n;