@veeqo/transfigure 1.2.7 → 1.2.8
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.
- package/dist/hooks/useViewCountsHook/useViewCountsHook.d.ts +2 -2
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +48 -9
- package/dist/index101.cjs +1 -19
- package/dist/index101.js +28 -23
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +7 -15
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +22 -36
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +17 -28
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +15 -24
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +19 -2
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +7 -18
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +63 -7
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +26 -60
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +2 -30
- package/dist/index114.cjs +1 -13
- package/dist/index114.js +33 -14
- package/dist/index115.cjs +13 -1
- package/dist/index115.js +14 -33
- package/dist/index118.cjs +1 -7
- package/dist/index118.js +63 -10
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +42 -58
- package/dist/index120.cjs +7 -1
- package/dist/index120.js +10 -47
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +1 -1
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +3 -3
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +2 -2
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +11 -10
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +3 -2
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +1 -1
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +5 -41
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +2 -9
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +41 -2
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +8 -4
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +7 -7
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +13 -7
- package/dist/index93.cjs +104 -1
- package/dist/index93.js +119 -17
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +68 -13
- package/dist/index95.cjs +1 -104
- package/dist/index95.js +28 -119
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +2 -68
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +39 -27
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +11 -2
- package/dist/index99.cjs +19 -1
- package/dist/index99.js +24 -41
- package/dist/types.d.ts +2 -24
- package/package.json +1 -1
package/dist/index97.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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/index97.js
CHANGED
|
@@ -1,31 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
]
|
|
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
|
|
26
14
|
}
|
|
27
|
-
);
|
|
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
|
+
};
|
|
28
40
|
};
|
|
29
41
|
export {
|
|
30
|
-
|
|
42
|
+
b as usePersistColumns
|
|
31
43
|
};
|
package/dist/index98.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
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/index98.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
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
|
+
};
|
|
2
11
|
export {
|
|
3
|
-
|
|
12
|
+
a as filterColumnsBySearch
|
|
4
13
|
};
|
package/dist/index99.cjs
CHANGED
|
@@ -1 +1,19 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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;
|
package/dist/index99.js
CHANGED
|
@@ -1,43 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
};
|
|
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
|
+
`;
|
|
41
22
|
export {
|
|
42
|
-
|
|
23
|
+
l as Divider,
|
|
24
|
+
n as Item,
|
|
25
|
+
a as MenuItems
|
|
43
26
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -47,29 +47,6 @@ type UserRelationship = {
|
|
|
47
47
|
type PageFilter = {
|
|
48
48
|
size?: number;
|
|
49
49
|
};
|
|
50
|
-
type SearchFilter = {
|
|
51
|
-
number?: string;
|
|
52
|
-
};
|
|
53
|
-
type StockCountFilter = {
|
|
54
|
-
gte: number;
|
|
55
|
-
lte: number;
|
|
56
|
-
};
|
|
57
|
-
type OrderFilter = {
|
|
58
|
-
status?: string[];
|
|
59
|
-
search?: SearchFilter;
|
|
60
|
-
created?: string;
|
|
61
|
-
mergeable?: string;
|
|
62
|
-
pick_status?: string;
|
|
63
|
-
};
|
|
64
|
-
type InventoryFilter = {
|
|
65
|
-
stock_count?: StockCountFilter;
|
|
66
|
-
is_kit?: boolean;
|
|
67
|
-
};
|
|
68
|
-
type ViewFilters = {
|
|
69
|
-
page?: PageFilter;
|
|
70
|
-
filter?: OrderFilter | InventoryFilter;
|
|
71
|
-
sort?: string;
|
|
72
|
-
};
|
|
73
50
|
export declare enum ViewStatusTypes {
|
|
74
51
|
ERROR = "error"
|
|
75
52
|
}
|
|
@@ -80,7 +57,7 @@ export type View = {
|
|
|
80
57
|
user: UserRelationship;
|
|
81
58
|
};
|
|
82
59
|
title: string;
|
|
83
|
-
filters:
|
|
60
|
+
filters: Record<string, any>;
|
|
84
61
|
columns: string[] | Record<string, never>;
|
|
85
62
|
shared: boolean;
|
|
86
63
|
created_at: string;
|
|
@@ -107,6 +84,7 @@ export type TransformedView = {
|
|
|
107
84
|
id: string;
|
|
108
85
|
label: string;
|
|
109
86
|
filterMaps: FilterMaps;
|
|
87
|
+
viewFilters: Record<string, any>;
|
|
110
88
|
sort?: string;
|
|
111
89
|
page: PageFilter | undefined;
|
|
112
90
|
editable: boolean;
|