@veeqo/transfigure 1.1.8 → 1.2.0

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 (79) hide show
  1. package/dist/index10.cjs +1 -1
  2. package/dist/index10.js +57 -39
  3. package/dist/index100.cjs +1 -1
  4. package/dist/index100.js +14 -32
  5. package/dist/index101.cjs +19 -1
  6. package/dist/index101.js +23 -28
  7. package/dist/index102.cjs +1 -19
  8. package/dist/index102.js +24 -24
  9. package/dist/index103.cjs +12 -1
  10. package/dist/index103.js +16 -21
  11. package/dist/index104.cjs +1 -1
  12. package/dist/index104.js +1 -1
  13. package/dist/index105.cjs +1 -1
  14. package/dist/index105.js +2 -19
  15. package/dist/index106.cjs +1 -1
  16. package/dist/index106.js +18 -7
  17. package/dist/index107.cjs +1 -1
  18. package/dist/index107.js +7 -63
  19. package/dist/index108.cjs +1 -1
  20. package/dist/index108.js +60 -26
  21. package/dist/index109.cjs +1 -13
  22. package/dist/index109.js +30 -17
  23. package/dist/index11.cjs +1 -1
  24. package/dist/index11.js +1 -1
  25. package/dist/index110.cjs +13 -1
  26. package/dist/index110.js +14 -33
  27. package/dist/index111.cjs +1 -1
  28. package/dist/index111.js +26 -2
  29. package/dist/index112.cjs +1 -1
  30. package/dist/index112.js +32 -22
  31. package/dist/index114.cjs +1 -1
  32. package/dist/index114.js +1 -1
  33. package/dist/index31.cjs +1 -1
  34. package/dist/index31.js +1 -1
  35. package/dist/index34.cjs +1 -1
  36. package/dist/index34.js +1 -1
  37. package/dist/index36.cjs +1 -1
  38. package/dist/index36.js +2 -2
  39. package/dist/index39.cjs +1 -1
  40. package/dist/index39.js +1 -1
  41. package/dist/index40.cjs +1 -1
  42. package/dist/index40.js +1 -1
  43. package/dist/index41.cjs +1 -1
  44. package/dist/index41.js +1 -1
  45. package/dist/index44.cjs +1 -1
  46. package/dist/index44.js +1 -1
  47. package/dist/index47.cjs +1 -1
  48. package/dist/index47.js +2 -2
  49. package/dist/index68.cjs +1 -1
  50. package/dist/index68.js +80 -73
  51. package/dist/index75.cjs +1 -1
  52. package/dist/index75.js +13 -9
  53. package/dist/index83.cjs +1 -1
  54. package/dist/index83.js +1 -1
  55. package/dist/index84.cjs +1 -1
  56. package/dist/index84.js +1 -1
  57. package/dist/index85.cjs +1 -1
  58. package/dist/index85.js +5 -41
  59. package/dist/index86.cjs +1 -1
  60. package/dist/index86.js +41 -9
  61. package/dist/index87.cjs +1 -1
  62. package/dist/index87.js +8 -4
  63. package/dist/index90.cjs +1 -1
  64. package/dist/index90.js +2 -2
  65. package/dist/index92.cjs +1 -1
  66. package/dist/index92.js +2 -2
  67. package/dist/index97.cjs +1 -1
  68. package/dist/index97.js +32 -23
  69. package/dist/index98.cjs +1 -12
  70. package/dist/index98.js +29 -16
  71. package/dist/index99.cjs +1 -1
  72. package/dist/index99.js +20 -14
  73. package/dist/storybookHelpers/apiMocks/brands.d.ts +17 -0
  74. package/dist/storybookHelpers/apiMocks/channels.d.ts +701 -0
  75. package/dist/storybookHelpers/apiMocks/custom_views.d.ts +26 -0
  76. package/dist/storybookHelpers/handlers.d.ts +2 -0
  77. package/dist/types.d.ts +1 -0
  78. package/dist/utils/getAsyncOptions/getAsyncOptions.d.ts +1 -1
  79. package/package.json +1 -1
package/dist/index92.js CHANGED
@@ -4,8 +4,8 @@ import { sortableKeyboardCoordinates as M } from "@dnd-kit/sortable";
4
4
  import { DndDragOverlayDialog as v } from "./index91.js";
5
5
  import { Alert as b } from "@veeqo/ui";
6
6
  import { useModal as x } from "./index52.js";
7
- import { useDragHandlers as O } from "./index107.js";
8
- import { useCollisionDetectionStrategy as I } from "./index108.js";
7
+ import { useDragHandlers as O } from "./index108.js";
8
+ import { useCollisionDetectionStrategy as I } from "./index109.js";
9
9
  import { ErrorBoundary as R } from "./index12.js";
10
10
  import { ModalId as j } from "./index51.js";
11
11
  const B = {
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("./index113.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 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/index97.js CHANGED
@@ -1,26 +1,35 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { useRef as a, useState as d, useEffect as m } from "react";
3
- import { AdaptiveStyledContainer as v } from "./index113.js";
4
- const R = ({
5
- children: o,
6
- style: s,
7
- className: f
8
- }) => {
9
- const r = a(null), [i, c] = d(0);
10
- return m(() => {
11
- const e = r.current, n = () => {
12
- if (e) {
13
- const { top: u } = e.getBoundingClientRect();
14
- c(u);
15
- }
16
- };
17
- n();
18
- const t = new ResizeObserver(n);
19
- return e && t.observe(e), () => {
20
- e && t.unobserve(e), t.disconnect();
21
- };
22
- }, []), /* @__PURE__ */ p(v, { style: s, className: f, offset: i, ref: r, children: o });
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
+ };
23
32
  };
24
33
  export {
25
- R as AdaptiveHeightContainer
34
+ V as useViewCounts
26
35
  };
package/dist/index98.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 e=require("react/jsx-runtime"),i=require("@veeqo/ui"),r=({shouldShow:a,viewName:n,onCancel:t,onDelete:o})=>e.jsx(i.Modal,{headerTitle:`Delete '${n}' view?`,"data-testid":"act-react-listing-custom-confirmation-popup",variant:"sm",shouldShow:a,onClose:t,rightActions:[{className:"act-react-listing-custom-confirmation-popup-cancel",label:"Cancel",onClick:t,variant:"default"},{className:"act-react-listing-custom-confirmation-popup-delete",label:"Delete",onClick:o,variant:"primaryDestructive"}],showHeaderCloseButton:!0,children:e.jsx(i.Text,{variant:"body",children:"This cannot be undone."})});exports.Confirmation=r;
package/dist/index98.js CHANGED
@@ -1,18 +1,31 @@
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 { jsx as e } from "react/jsx-runtime";
2
+ import { Modal as n, Text as r } from "@veeqo/ui";
3
+ const s = ({ shouldShow: a, viewName: i, onCancel: t, onDelete: o }) => /* @__PURE__ */ e(
4
+ n,
5
+ {
6
+ headerTitle: `Delete '${i}' view?`,
7
+ "data-testid": "act-react-listing-custom-confirmation-popup",
8
+ variant: "sm",
9
+ shouldShow: a,
10
+ onClose: t,
11
+ rightActions: [
12
+ {
13
+ className: "act-react-listing-custom-confirmation-popup-cancel",
14
+ label: "Cancel",
15
+ onClick: t,
16
+ variant: "default"
17
+ },
18
+ {
19
+ className: "act-react-listing-custom-confirmation-popup-delete",
20
+ label: "Delete",
21
+ onClick: o,
22
+ variant: "primaryDestructive"
23
+ }
24
+ ],
25
+ showHeaderCloseButton: !0,
26
+ children: /* @__PURE__ */ e(r, { variant: "body", children: "This cannot be undone." })
27
+ }
28
+ );
15
29
  export {
16
- l as Divider,
17
- d as FixedViews
30
+ s as Confirmation
18
31
  };
package/dist/index99.cjs CHANGED
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@veeqo/ui"),i=require("./index104.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;
package/dist/index99.js CHANGED
@@ -1,17 +1,23 @@
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);
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 "./index104.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"
12
18
  }
13
- }
14
- );
19
+ )
20
+ ] }) }) });
15
21
  export {
16
- h as LegacySortableViews
22
+ b as DraftPill
17
23
  };
@@ -0,0 +1,17 @@
1
+ export declare const brands: {
2
+ brands: {
3
+ seller_account_id: string;
4
+ name: string;
5
+ uuid: string;
6
+ id: string;
7
+ }[];
8
+ total_count: number;
9
+ meta: {
10
+ page: {
11
+ current: number;
12
+ size: number;
13
+ total_pages: number;
14
+ total_count: number;
15
+ };
16
+ };
17
+ };