@veeqo/transfigure 1.1.6 → 1.1.7

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 (230) hide show
  1. package/dist/components/ActionsDropdown/ActionsDropdown.d.ts +2 -0
  2. package/dist/components/ActionsDropdown/index.d.ts +1 -0
  3. package/dist/components/ActionsDropdown/types.d.ts +7 -0
  4. package/dist/components/Filters/Fields/NumberRangeFilter/MuiSlider.d.ts +1 -1
  5. package/dist/components/Views/PillNotifications/variants/styled.d.ts +3 -3
  6. package/dist/index.cjs +1 -1
  7. package/dist/index.css +1 -1
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.js +146 -144
  10. package/dist/index100.cjs +1 -1
  11. package/dist/index100.js +29 -33
  12. package/dist/index101.cjs +1 -1
  13. package/dist/index101.js +21 -29
  14. package/dist/index102.cjs +16 -77
  15. package/dist/index102.js +19 -96
  16. package/dist/index103.cjs +12 -1
  17. package/dist/index103.js +16 -2
  18. package/dist/index104.cjs +80 -1
  19. package/dist/index104.js +101 -19
  20. package/dist/index105.cjs +1 -1
  21. package/dist/index105.js +18 -7
  22. package/dist/index106.cjs +1 -1
  23. package/dist/index106.js +7 -63
  24. package/dist/index107.cjs +1 -1
  25. package/dist/index107.js +60 -26
  26. package/dist/index108.cjs +1 -13
  27. package/dist/index108.js +30 -17
  28. package/dist/index109.cjs +13 -1
  29. package/dist/index109.js +14 -33
  30. package/dist/index11.cjs +1 -1
  31. package/dist/index11.js +27 -18
  32. package/dist/index110.cjs +1 -1
  33. package/dist/index110.js +2 -26
  34. package/dist/index111.cjs +1 -7
  35. package/dist/index111.js +36 -10
  36. package/dist/index112.cjs +1 -1
  37. package/dist/index112.js +25 -62
  38. package/dist/index113.cjs +1 -1
  39. package/dist/index113.js +3 -3
  40. package/dist/index114.cjs +1 -0
  41. package/dist/index114.js +65 -0
  42. package/dist/index115.cjs +7 -0
  43. package/dist/index115.js +12 -0
  44. package/dist/index12.cjs +1 -1
  45. package/dist/index12.js +18 -21
  46. package/dist/index13.cjs +1 -1
  47. package/dist/index13.js +19 -41
  48. package/dist/index14.cjs +1 -1
  49. package/dist/index14.js +41 -23
  50. package/dist/index15.cjs +1 -1
  51. package/dist/index15.js +24 -36
  52. package/dist/index16.cjs +1 -1
  53. package/dist/index16.js +37 -33
  54. package/dist/index17.cjs +1 -1
  55. package/dist/index17.js +32 -49
  56. package/dist/index18.cjs +1 -1
  57. package/dist/index18.js +47 -38
  58. package/dist/index19.cjs +1 -1
  59. package/dist/index19.js +29 -29
  60. package/dist/index20.cjs +1 -1
  61. package/dist/index20.js +41 -58
  62. package/dist/index21.cjs +1 -1
  63. package/dist/index21.js +48 -42
  64. package/dist/index22.cjs +1 -1
  65. package/dist/index22.js +50 -44
  66. package/dist/index23.cjs +1 -1
  67. package/dist/index23.js +46 -7
  68. package/dist/index24.cjs +1 -1
  69. package/dist/index24.js +7 -11
  70. package/dist/index25.cjs +1 -1
  71. package/dist/index25.js +11 -64
  72. package/dist/index26.cjs +1 -1
  73. package/dist/index26.js +40 -39
  74. package/dist/index27.cjs +1 -1
  75. package/dist/index27.js +60 -37
  76. package/dist/index28.cjs +1 -1
  77. package/dist/index28.js +36 -53
  78. package/dist/index29.cjs +1 -1
  79. package/dist/index29.js +54 -51
  80. package/dist/index3.cjs +1 -1
  81. package/dist/index3.js +2 -2
  82. package/dist/index30.cjs +1 -1
  83. package/dist/index30.js +50 -81
  84. package/dist/index31.cjs +1 -1
  85. package/dist/index31.js +81 -35
  86. package/dist/index32.cjs +1 -1
  87. package/dist/index32.js +38 -33
  88. package/dist/index33.cjs +1 -1
  89. package/dist/index33.js +33 -10
  90. package/dist/index34.cjs +1 -1
  91. package/dist/index34.js +10 -39
  92. package/dist/index35.cjs +1 -1
  93. package/dist/index35.js +38 -102
  94. package/dist/index36.cjs +1 -1
  95. package/dist/index36.js +103 -19
  96. package/dist/index37.cjs +1 -1
  97. package/dist/index37.js +17 -134
  98. package/dist/index38.cjs +1 -1
  99. package/dist/index38.js +135 -49
  100. package/dist/index39.cjs +1 -1
  101. package/dist/index39.js +51 -32
  102. package/dist/index4.cjs +1 -1
  103. package/dist/index4.js +2 -2
  104. package/dist/index40.cjs +1 -1
  105. package/dist/index40.js +31 -53
  106. package/dist/index41.cjs +1 -1
  107. package/dist/index41.js +54 -48
  108. package/dist/index42.cjs +1 -1
  109. package/dist/index42.js +41 -81
  110. package/dist/index43.cjs +1 -1
  111. package/dist/index43.js +81 -41
  112. package/dist/index44.cjs +1 -1
  113. package/dist/index44.js +48 -5
  114. package/dist/index45.cjs +1 -1
  115. package/dist/index45.js +5 -45
  116. package/dist/index46.cjs +1 -1
  117. package/dist/index46.js +44 -41
  118. package/dist/index47.cjs +1 -1
  119. package/dist/index47.js +42 -19
  120. package/dist/index48.cjs +1 -1
  121. package/dist/index48.js +19 -8
  122. package/dist/index49.cjs +1 -1
  123. package/dist/index49.js +7 -22
  124. package/dist/index5.cjs +1 -1
  125. package/dist/index5.js +2 -2
  126. package/dist/index50.cjs +1 -1
  127. package/dist/index50.js +23 -2
  128. package/dist/index51.cjs +1 -1
  129. package/dist/index51.js +2 -4
  130. package/dist/index52.cjs +1 -1
  131. package/dist/index52.js +4 -11
  132. package/dist/index53.cjs +1 -1
  133. package/dist/index53.js +10 -12
  134. package/dist/index54.cjs +1 -1
  135. package/dist/index54.js +12 -11
  136. package/dist/index55.cjs +1 -1
  137. package/dist/index55.js +11 -184
  138. package/dist/index56.cjs +1 -1
  139. package/dist/index56.js +183 -25
  140. package/dist/index57.cjs +1 -1
  141. package/dist/index57.js +26 -24
  142. package/dist/index58.cjs +1 -1
  143. package/dist/index58.js +19 -22
  144. package/dist/index59.cjs +1 -1
  145. package/dist/index59.js +25 -97
  146. package/dist/index6.cjs +1 -1
  147. package/dist/index6.js +2 -2
  148. package/dist/index60.cjs +1 -1
  149. package/dist/index60.js +99 -8
  150. package/dist/index61.cjs +1 -1
  151. package/dist/index61.js +8 -51
  152. package/dist/index62.cjs +1 -1
  153. package/dist/index62.js +50 -60
  154. package/dist/index63.cjs +1 -1
  155. package/dist/index63.js +57 -18
  156. package/dist/index64.cjs +1 -1
  157. package/dist/index64.js +22 -18
  158. package/dist/index65.cjs +1 -1
  159. package/dist/index65.js +16 -26
  160. package/dist/index66.cjs +1 -1
  161. package/dist/index66.js +27 -56
  162. package/dist/index67.cjs +1 -1
  163. package/dist/index67.js +57 -341
  164. package/dist/index68.cjs +1 -1
  165. package/dist/index68.js +337 -55
  166. package/dist/index69.cjs +1 -1
  167. package/dist/index69.js +50 -47
  168. package/dist/index7.cjs +1 -1
  169. package/dist/index7.js +4 -4
  170. package/dist/index70.cjs +1 -1
  171. package/dist/index70.js +51 -32
  172. package/dist/index71.cjs +1 -1
  173. package/dist/index71.js +30 -24
  174. package/dist/index72.cjs +1 -1
  175. package/dist/index72.js +26 -32
  176. package/dist/index73.cjs +1 -1
  177. package/dist/index73.js +37 -12
  178. package/dist/index74.cjs +1 -1
  179. package/dist/index74.js +13 -9
  180. package/dist/index75.cjs +1 -1
  181. package/dist/index75.js +9 -17
  182. package/dist/index76.cjs +1 -1
  183. package/dist/index76.js +14 -16
  184. package/dist/index77.cjs +1 -1
  185. package/dist/index77.js +18 -49
  186. package/dist/index78.cjs +1 -1
  187. package/dist/index78.js +50 -21
  188. package/dist/index79.cjs +1 -1
  189. package/dist/index79.js +21 -7
  190. package/dist/index80.cjs +1 -1
  191. package/dist/index80.js +7 -2
  192. package/dist/index81.cjs +1 -1
  193. package/dist/index81.js +2 -9
  194. package/dist/index82.cjs +1 -3
  195. package/dist/index82.js +8 -13
  196. package/dist/index83.cjs +3 -1
  197. package/dist/index83.js +13 -8
  198. package/dist/index84.cjs +1 -1
  199. package/dist/index84.js +9 -41
  200. package/dist/index85.cjs +1 -1
  201. package/dist/index85.js +4 -8
  202. package/dist/index86.cjs +1 -1
  203. package/dist/index86.js +39 -116
  204. package/dist/index87.cjs +1 -1
  205. package/dist/index87.js +9 -19
  206. package/dist/index88.cjs +1 -1
  207. package/dist/index88.js +118 -13
  208. package/dist/index89.cjs +1 -104
  209. package/dist/index89.js +17 -118
  210. package/dist/index90.cjs +1 -1
  211. package/dist/index90.js +13 -68
  212. package/dist/index91.cjs +104 -1
  213. package/dist/index91.js +119 -28
  214. package/dist/index92.cjs +1 -1
  215. package/dist/index92.js +68 -2
  216. package/dist/index93.cjs +1 -1
  217. package/dist/index93.js +27 -39
  218. package/dist/index94.cjs +1 -1
  219. package/dist/index94.js +2 -11
  220. package/dist/index95.cjs +1 -12
  221. package/dist/index95.js +41 -16
  222. package/dist/index96.cjs +1 -1
  223. package/dist/index96.js +10 -14
  224. package/dist/index97.cjs +1 -1
  225. package/dist/index97.js +1 -1
  226. package/dist/index98.cjs +1 -1
  227. package/dist/index98.js +14 -20
  228. package/dist/index99.cjs +1 -19
  229. package/dist/index99.js +33 -24
  230. package/package.json +1 -1
package/dist/index93.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),f=require("./index61.cjs"),y=require("./index60.cjs"),g=require("./index51.cjs"),h=require("./index59.cjs"),p=require("./index5.cjs"),w=({pinnedLeftColumnIds:r,pinnedRightColumnIds:a})=>{const{Filters:{activeViewId:t},Notifications:{notify:e}}=y.useStores(),{closeModal:i}=g.useModal(),{mutate:c}=f.useViews(),{getActiveViewInAPIFormat:l}=h.usePersistUnsavedChanges(),[m,o]=C.useState(!1);return{saveColumns:async({visibleColumns:n})=>{if(t)try{if(o(!0),n.length<1){e({type:"error",text:"You must have at least one visible column."});return}const u=[...r,...n,...a],{arg:d,currentView:s}=l(),v={...d,columns:{...s==null?void 0:s.columns,columnIds:u}};await p.patchCustomView(t,{attributes:v}),await c(),i(),e({type:"success",text:"Columns updated successfully"})}catch{e({type:"error",text:"Failed to save columns"})}finally{o(!1)}},isSavingColumns:m}};exports.usePersistColumns=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("@veeqo/ui"),a=require("@veeqo/components"),n=require("./index91.cjs"),{Glyph:c}=a.VeeqoCommon,l=({column:t,isHidden:r,isDragOverlay:s})=>{const o=t.title||t.tooltip;return e.jsxs(n.ColumnItemWrapper,{direction:"horizontal",spacing:"sm",alignY:"center",isHidden:r,isDragOverlay:s,children:[e.jsx(c,{name:"drag-indicator",size:4}),t.detailed?e.jsxs(i.Stack,{spacing:"xs",children:[e.jsxs(i.Text,{variant:"body",children:[o," (detailed)"]}),e.jsx(n.DetailedText,{variant:"hintText",children:t.detailed})]}):e.jsx(i.Text,{variant:"body",children:o}),!s&&r&&e.jsx(n.VisibilityOffIcon,{size:4})]})};exports.ColumnItem=l;
package/dist/index93.js CHANGED
@@ -1,43 +1,31 @@
1
- import { useState as d } from "react";
2
- import { useViews as v } from "./index61.js";
3
- import { useStores as y } from "./index60.js";
4
- import { useModal as C } from "./index51.js";
5
- import { usePersistUnsavedChanges as g } from "./index59.js";
6
- import { patchCustomView as h } from "./index5.js";
7
- const b = ({ pinnedLeftColumnIds: a, pinnedRightColumnIds: i }) => {
8
- const {
9
- Filters: {
10
- activeViewId: e
11
- },
12
- Notifications: {
13
- notify: t
1
+ import { jsxs as e, jsx as i } from "react/jsx-runtime";
2
+ import { Stack as d, Text as a } from "@veeqo/ui";
3
+ import { VeeqoCommon as l } from "@veeqo/components";
4
+ import { ColumnItemWrapper as m, DetailedText as c, VisibilityOffIcon as p } from "./index91.js";
5
+ const { Glyph: s } = l, g = ({ column: t, isHidden: r, isDragOverlay: o }) => {
6
+ const n = t.title || t.tooltip;
7
+ return /* @__PURE__ */ e(
8
+ m,
9
+ {
10
+ direction: "horizontal",
11
+ spacing: "sm",
12
+ alignY: "center",
13
+ isHidden: r,
14
+ isDragOverlay: o,
15
+ children: [
16
+ /* @__PURE__ */ i(s, { name: "drag-indicator", size: 4 }),
17
+ t.detailed ? /* @__PURE__ */ e(d, { spacing: "xs", children: [
18
+ /* @__PURE__ */ e(a, { variant: "body", children: [
19
+ n,
20
+ " (detailed)"
21
+ ] }),
22
+ /* @__PURE__ */ i(c, { variant: "hintText", children: t.detailed })
23
+ ] }) : /* @__PURE__ */ i(a, { variant: "body", children: n }),
24
+ !o && r && /* @__PURE__ */ i(p, { size: 4 })
25
+ ]
14
26
  }
15
- } = y(), { closeModal: u } = C(), { mutate: m } = v(), { getActiveViewInAPIFormat: c } = g(), [l, o] = d(!1);
16
- return {
17
- saveColumns: async ({ visibleColumns: n }) => {
18
- if (e)
19
- try {
20
- if (o(!0), n.length < 1) {
21
- t({ type: "error", text: "You must have at least one visible column." });
22
- return;
23
- }
24
- const r = [...a, ...n, ...i], { arg: f, currentView: s } = c(), p = {
25
- ...f,
26
- columns: {
27
- ...s == null ? void 0 : s.columns,
28
- columnIds: r
29
- }
30
- };
31
- await h(e, { attributes: p }), await m(), u(), t({ type: "success", text: "Columns updated successfully" });
32
- } catch {
33
- t({ type: "error", text: "Failed to save columns" });
34
- } finally {
35
- o(!1);
36
- }
37
- },
38
- isSavingColumns: l
39
- };
27
+ );
40
28
  };
41
29
  export {
42
- b as usePersistColumns
30
+ g as ColumnItem
43
31
  };
package/dist/index94.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=(t,r)=>{if(!r)return t;const i=r.toLowerCase();return t.filter(e=>{var s,a;return((s=e==null?void 0:e.title)==null?void 0:s.toLowerCase().includes(i))||((a=e==null?void 0:e.id)==null?void 0:a.toLowerCase().includes(i))})};exports.filterColumnsBySearch=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var i=(e=>(e.Hidden="hidden",e.Visible="visible",e))(i||{});exports.ColumnGroupIds=i;
package/dist/index94.js CHANGED
@@ -1,13 +1,4 @@
1
- const a = (t, r) => {
2
- if (!r) return t;
3
- const i = r.toLowerCase();
4
- return t.filter(
5
- (e) => {
6
- var s, C;
7
- return ((s = e == null ? void 0 : e.title) == null ? void 0 : s.toLowerCase().includes(i)) || ((C = e == null ? void 0 : e.id) == null ? void 0 : C.toLowerCase().includes(i));
8
- }
9
- );
10
- };
1
+ var i = /* @__PURE__ */ ((e) => (e.Hidden = "hidden", e.Visible = "visible", e))(i || {});
11
2
  export {
12
- a as filterColumnsBySearch
3
+ i as ColumnGroupIds
13
4
  };
package/dist/index95.cjs CHANGED
@@ -1,12 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),t=require("@veeqo/ui"),o=e=>e&&e.__esModule?e:{default:e},r=o(i),d=r.default(t.BaseContainer)`
2
- display: flex;
3
- flex-direction: column;
4
- padding: 8px;
5
- padding-left: 35px;
6
- margin: 8px;
7
- background-color: ${t.theme.colors.neutral.grey.lightest};
8
- `,l=r.default.hr`
9
- width: 100%;
10
- border-top: 1px solid ${t.theme.colors.neutral.grey.dark};
11
- margin: 0 0 4px 0;
12
- `;exports.Divider=l;exports.FixedViews=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),f=require("./index62.cjs"),y=require("./index61.cjs"),g=require("./index52.cjs"),h=require("./index60.cjs"),p=require("./index5.cjs"),w=({pinnedLeftColumnIds:r,pinnedRightColumnIds:a})=>{const{Filters:{activeViewId:t},Notifications:{notify:e}}=y.useStores(),{closeModal:i}=g.useModal(),{mutate:c}=f.useViews(),{getActiveViewInAPIFormat:l}=h.usePersistUnsavedChanges(),[m,o]=C.useState(!1);return{saveColumns:async({visibleColumns:n})=>{if(t)try{if(o(!0),n.length<1){e({type:"error",text:"You must have at least one visible column."});return}const u=[...r,...n,...a],{arg:d,currentView:s}=l(),v={...d,columns:{...s==null?void 0:s.columns,columnIds:u}};await p.patchCustomView(t,{attributes:v}),await c(),i(),e({type:"success",text:"Columns updated successfully"})}catch{e({type:"error",text:"Failed to save columns"})}finally{o(!1)}},isSavingColumns:m}};exports.usePersistColumns=w;
package/dist/index95.js CHANGED
@@ -1,18 +1,43 @@
1
- import r from "styled-components";
2
- import { theme as o, BaseContainer as e } from "@veeqo/ui";
3
- const d = r(e)`
4
- display: flex;
5
- flex-direction: column;
6
- padding: 8px;
7
- padding-left: 35px;
8
- margin: 8px;
9
- background-color: ${o.colors.neutral.grey.lightest};
10
- `, l = r.hr`
11
- width: 100%;
12
- border-top: 1px solid ${o.colors.neutral.grey.dark};
13
- margin: 0 0 4px 0;
14
- `;
1
+ import { useState as d } from "react";
2
+ import { useViews as v } from "./index62.js";
3
+ import { useStores as y } from "./index61.js";
4
+ import { useModal as C } from "./index52.js";
5
+ import { usePersistUnsavedChanges as g } from "./index60.js";
6
+ import { patchCustomView as h } from "./index5.js";
7
+ const b = ({ pinnedLeftColumnIds: a, pinnedRightColumnIds: i }) => {
8
+ const {
9
+ Filters: {
10
+ activeViewId: e
11
+ },
12
+ Notifications: {
13
+ notify: t
14
+ }
15
+ } = y(), { closeModal: u } = C(), { mutate: m } = v(), { getActiveViewInAPIFormat: c } = g(), [l, o] = d(!1);
16
+ return {
17
+ saveColumns: async ({ visibleColumns: n }) => {
18
+ if (e)
19
+ try {
20
+ if (o(!0), n.length < 1) {
21
+ t({ type: "error", text: "You must have at least one visible column." });
22
+ return;
23
+ }
24
+ const r = [...a, ...n, ...i], { arg: f, currentView: s } = c(), p = {
25
+ ...f,
26
+ columns: {
27
+ ...s == null ? void 0 : s.columns,
28
+ columnIds: r
29
+ }
30
+ };
31
+ await h(e, { attributes: p }), await m(), u(), t({ type: "success", text: "Columns updated successfully" });
32
+ } catch {
33
+ t({ type: "error", text: "Failed to save columns" });
34
+ } finally {
35
+ o(!1);
36
+ }
37
+ },
38
+ isSavingColumns: l
39
+ };
40
+ };
15
41
  export {
16
- l as Divider,
17
- d as FixedViews
42
+ b as usePersistColumns
18
43
  };
package/dist/index96.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),l=require("./index108.cjs"),o=e=>i.jsx(l.StyledSortableViews,{...e,onChange:t=>{t.filter(r=>{var n;return(n=r.children)==null?void 0:n.length}).length||e.onChange(t)}});exports.LegacySortableViews=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=(t,r)=>{if(!r)return t;const i=r.toLowerCase();return t.filter(e=>{var s,a;return((s=e==null?void 0:e.title)==null?void 0:s.toLowerCase().includes(i))||((a=e==null?void 0:e.id)==null?void 0:a.toLowerCase().includes(i))})};exports.filterColumnsBySearch=d;
package/dist/index96.js CHANGED
@@ -1,17 +1,13 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { StyledSortableViews as i } from "./index108.js";
3
- const h = (e) => /* @__PURE__ */ o(
4
- i,
5
- {
6
- ...e,
7
- onChange: (t) => {
8
- t.filter((n) => {
9
- var r;
10
- return (r = n.children) == null ? void 0 : r.length;
11
- }).length || e.onChange(t);
1
+ const a = (t, r) => {
2
+ if (!r) return t;
3
+ const i = r.toLowerCase();
4
+ return t.filter(
5
+ (e) => {
6
+ var s, C;
7
+ return ((s = e == null ? void 0 : e.title) == null ? void 0 : s.toLowerCase().includes(i)) || ((C = e == null ? void 0 : e.id) == null ? void 0 : C.toLowerCase().includes(i));
12
8
  }
13
- }
14
- );
9
+ );
10
+ };
15
11
  export {
16
- h as LegacySortableViews
12
+ a as filterColumnsBySearch
17
13
  };
package/dist/index97.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),n=require("react"),l=require("./index111.cjs"),v=({children:i,style:o,className:c})=>{const r=n.useRef(null),[u,f]=n.useState(0);return n.useEffect(()=>{const e=r.current,s=()=>{if(e){const{top:a}=e.getBoundingClientRect();f(a)}};s();const t=new ResizeObserver(s);return e&&t.observe(e),()=>{e&&t.unobserve(e),t.disconnect()}},[]),d.jsx(l.AdaptiveStyledContainer,{style:o,className:c,offset:u,ref:r,children:i})};exports.AdaptiveHeightContainer=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),n=require("react"),l=require("./index115.cjs"),v=({children:i,style:o,className:c})=>{const r=n.useRef(null),[u,f]=n.useState(0);return n.useEffect(()=>{const e=r.current,s=()=>{if(e){const{top:a}=e.getBoundingClientRect();f(a)}};s();const t=new ResizeObserver(s);return e&&t.observe(e),()=>{e&&t.unobserve(e),t.disconnect()}},[]),d.jsx(l.AdaptiveStyledContainer,{style:o,className:c,offset:u,ref:r,children:i})};exports.AdaptiveHeightContainer=v;
package/dist/index97.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as p } from "react/jsx-runtime";
2
2
  import { useRef as a, useState as d, useEffect as m } from "react";
3
- import { AdaptiveStyledContainer as v } from "./index111.js";
3
+ import { AdaptiveStyledContainer as v } from "./index115.js";
4
4
  const R = ({
5
5
  children: o,
6
6
  style: s,
package/dist/index98.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@veeqo/ui"),i=require("./index102.cjs"),n=r.theme.colors.secondary.blue.base,a=({onClick:t})=>e.jsx(i.Notification,{children:e.jsx(i.Pill,{children:e.jsxs(r.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(i.Glyph,{ariaLabel:"info",name:"info",color:n}),e.jsxs(i.Wrap,{children:[e.jsx(i.Text,{variant:"body",margin:"0 4px 0 0",children:"You are currently in a"}),e.jsx(i.Bold,{variant:"bodyBoldDark",children:"draft view"}),e.jsx(i.Hint,{variant:"hintText",children:"Apply filters and save these by creating a custom view"})]}),e.jsx(i.Button,{variant:"primary",onClick:t,size:"sm",children:"Create view"})]})})});exports.DraftPill=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),l=require("./index109.cjs"),o=e=>i.jsx(l.StyledSortableViews,{...e,onChange:t=>{t.filter(r=>{var n;return(n=r.children)==null?void 0:n.length}).length||e.onChange(t)}});exports.LegacySortableViews=o;
package/dist/index98.js CHANGED
@@ -1,23 +1,17 @@
1
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
- import { Stack as a, theme as n } from "@veeqo/ui";
3
- import { Notification as t, Pill as o, Glyph as l, Wrap as c, Text as d, Bold as s, Hint as h, Button as m } from "./index102.js";
4
- const p = n.colors.secondary.blue.base, b = ({ onClick: e }) => /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(o, { children: /* @__PURE__ */ i(a, { direction: "horizontal", alignY: "center", children: [
5
- /* @__PURE__ */ r(l, { ariaLabel: "info", name: "info", color: p }),
6
- /* @__PURE__ */ i(c, { children: [
7
- /* @__PURE__ */ r(d, { variant: "body", margin: "0 4px 0 0", children: "You are currently in a" }),
8
- /* @__PURE__ */ r(s, { variant: "bodyBoldDark", children: "draft view" }),
9
- /* @__PURE__ */ r(h, { variant: "hintText", children: "Apply filters and save these by creating a custom view" })
10
- ] }),
11
- /* @__PURE__ */ r(
12
- m,
13
- {
14
- variant: "primary",
15
- onClick: e,
16
- size: "sm",
17
- children: "Create view"
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { StyledSortableViews as i } from "./index109.js";
3
+ const h = (e) => /* @__PURE__ */ o(
4
+ i,
5
+ {
6
+ ...e,
7
+ onChange: (t) => {
8
+ t.filter((n) => {
9
+ var r;
10
+ return (r = n.children) == null ? void 0 : r.length;
11
+ }).length || e.onChange(t);
18
12
  }
19
- )
20
- ] }) }) });
13
+ }
14
+ );
21
15
  export {
22
- b as DraftPill
16
+ h as LegacySortableViews
23
17
  };
package/dist/index99.cjs CHANGED
@@ -1,19 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),e=require("@veeqo/ui"),s=t=>t&&t.__esModule?t:{default:t},o=s(r),i=o.default(e.Button).attrs(()=>({role:"option",variant:"flat"}))`
2
- margin: ${e.theme.sizes.xs};
3
- min-width: 180px;
4
- justify-content: flex-start;
5
- font-size: ${e.theme.text.body.fontSize};
6
-
7
- &:hover {
8
- background-color: ${e.theme.colors.neutral.grey.lightest};
9
- color: ${e.theme.colors.secondary.blue.base};
10
- cursor: pointer;
11
- }
12
- `,n=o.default(e.Card.Surface).attrs(()=>({role:"listbox",elevation:4}))`
13
- margin-top: ${e.theme.sizes.xs};
14
- background-color: white;
15
- `,l=o.default.hr`
16
- width: 100%;
17
- border-top: 1px solid ${e.theme.colors.neutral.grey.dark};
18
- margin: 0;
19
- `;exports.Divider=l;exports.Item=i;exports.MenuItems=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),f=require("swr"),R=require("./index61.cjs"),S=require("./index8.cjs"),P=require("./index62.cjs"),h=require("./index55.cjs"),m=e=>e&&e.__esModule?e:{default:e},q=m(f),E=()=>{var r;const{Filters:{queryParams:e}}=R.useStores(),{TABLE_DATA_URL:i,PAGE_NUMBER_FILTER_ID:u,PAGE_SIZE_FILTER_ID:n}=S.useBusinessLogic(),{isLoading:c}=P.useViews(),a=w.useMemo(()=>{const s=new URLSearchParams(e);return s.set(u,"1"),s.set(n,"1"),s.toString()},[e,u,n]),l=!c?`${i}?${a}`:null,{data:t,error:d,isLoading:_,mutate:L}=q.default([l,{includeMeta:!0}],([s,g])=>h.fetcherV2(s,g),{revalidateOnFocus:!1,revalidateOnReconnect:!1,keepPreviousData:!0}),o=t==null?void 0:t.meta;return{viewCounts:(r=o==null?void 0:o.page)==null?void 0:r.total_count,error:d,isLoadingViewCounts:_,mutate:L}};exports.useViewCounts=E;
package/dist/index99.js CHANGED
@@ -1,26 +1,35 @@
1
- import t from "styled-components";
2
- import { theme as o, Card as r, Button as e } from "@veeqo/ui";
3
- const n = t(e).attrs(() => ({ role: "option", variant: "flat" }))`
4
- margin: ${o.sizes.xs};
5
- min-width: 180px;
6
- justify-content: flex-start;
7
- font-size: ${o.text.body.fontSize};
8
-
9
- &:hover {
10
- background-color: ${o.colors.neutral.grey.lightest};
11
- color: ${o.colors.secondary.blue.base};
12
- cursor: pointer;
13
- }
14
- `, a = t(r.Surface).attrs(() => ({ role: "listbox", elevation: 4 }))`
15
- margin-top: ${o.sizes.xs};
16
- background-color: white;
17
- `, l = t.hr`
18
- width: 100%;
19
- border-top: 1px solid ${o.colors.neutral.grey.dark};
20
- margin: 0;
21
- `;
1
+ import { useMemo as _ } from "react";
2
+ import p from "swr";
3
+ import { useStores as w } from "./index61.js";
4
+ import { useBusinessLogic as R } from "./index8.js";
5
+ import { useViews as g } from "./index62.js";
6
+ import { fetcherV2 as E } from "./index55.js";
7
+ const V = () => {
8
+ var i;
9
+ const { Filters: { queryParams: s } } = w(), { TABLE_DATA_URL: a, PAGE_NUMBER_FILTER_ID: r, PAGE_SIZE_FILTER_ID: n } = R(), { isLoading: u } = g(), c = _(() => {
10
+ const e = new URLSearchParams(s);
11
+ return e.set(r, "1"), e.set(n, "1"), e.toString();
12
+ }, [s, r, n]), m = !u ? `${a}?${c}` : null, {
13
+ data: t,
14
+ error: l,
15
+ isLoading: L,
16
+ mutate: d
17
+ } = p(
18
+ [m, { includeMeta: !0 }],
19
+ ([e, f]) => E(e, f),
20
+ {
21
+ revalidateOnFocus: !1,
22
+ revalidateOnReconnect: !1,
23
+ keepPreviousData: !0
24
+ }
25
+ ), o = t == null ? void 0 : t.meta;
26
+ return {
27
+ viewCounts: (i = o == null ? void 0 : o.page) == null ? void 0 : i.total_count,
28
+ error: l,
29
+ isLoadingViewCounts: L,
30
+ mutate: d
31
+ };
32
+ };
22
33
  export {
23
- l as Divider,
24
- n as Item,
25
- a as MenuItems
34
+ V as useViewCounts
26
35
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veeqo/transfigure",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "main": "dist/index.cjs",