@veeqo/transfigure 1.2.3 → 1.2.4
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/BusinessLogic/mocks.d.ts +10 -0
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +88 -78
- package/dist/index100.cjs +19 -1
- package/dist/index100.js +24 -33
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +12 -26
- package/dist/index102.cjs +1 -12
- package/dist/index102.js +21 -16
- package/dist/index103.cjs +1 -19
- package/dist/index103.js +38 -24
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +29 -21
- package/dist/index105.cjs +12 -1
- package/dist/index105.js +16 -15
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +19 -2
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +7 -18
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +63 -7
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +26 -60
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +2 -30
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +2 -2
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +36 -35
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +11 -10
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +46 -44
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +202 -201
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +41 -29
- 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/index89.cjs +1 -1
- package/dist/index89.js +7 -7
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +7 -13
- package/dist/index92.cjs +1 -104
- package/dist/index92.js +13 -120
- package/dist/index93.cjs +104 -1
- package/dist/index93.js +117 -65
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +63 -24
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +29 -2
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +2 -41
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +39 -9
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +10 -6
- package/dist/mobx/Filters/Filters.d.ts +1 -1
- package/dist/storybookHelpers/apiMocks/views/custom_views.d.ts +45 -4
- package/package.json +5 -2
package/dist/index105.cjs
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("
|
|
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;
|
package/dist/index105.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+
`;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
l as Divider,
|
|
17
|
+
d as FixedViews
|
|
17
18
|
};
|
package/dist/index107.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=r=>r
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@dnd-kit/sortable"),g=require("@dnd-kit/utilities"),b=require("./index93.cjs"),f=({id:t,children:r})=>{const{attributes:s,listeners:o,setNodeRef:i,transform:n,transition:a,isDragging:l}=c.useSortable({id:t}),u={transform:g.CSS.Transform.toString(n),transition:a,cursor:"grab",outlineOffset:"-1px"};return e.jsxs("div",{ref:i,style:u,...s,...o,children:[r,l&&e.jsx(b.DraggingOverlay,{})]})};exports.SortableItem=f;
|
package/dist/index107.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsxs as f, jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { useSortable as l } from "@dnd-kit/sortable";
|
|
3
|
+
import { CSS as p } from "@dnd-kit/utilities";
|
|
4
|
+
import { DraggingOverlay as c } from "./index93.js";
|
|
5
|
+
const d = ({ id: r, children: t }) => {
|
|
6
|
+
const { attributes: o, listeners: s, setNodeRef: e, transform: i, transition: n, isDragging: m } = l({
|
|
7
|
+
id: r
|
|
8
|
+
}), a = {
|
|
9
|
+
transform: p.Transform.toString(i),
|
|
10
|
+
transition: n,
|
|
11
|
+
cursor: "grab",
|
|
12
|
+
outlineOffset: "-1px"
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ f("div", { ref: e, style: a, ...o, ...s, children: [
|
|
15
|
+
t,
|
|
16
|
+
m && /* @__PURE__ */ g(c, {})
|
|
17
|
+
] });
|
|
18
|
+
};
|
|
2
19
|
export {
|
|
3
|
-
|
|
20
|
+
d as SortableItem
|
|
4
21
|
};
|
package/dist/index108.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 a=require("react"),c=require("@dnd-kit/core"),s=require("./index93.cjs"),l=({id:e,children:r,...t})=>{const{setNodeRef:o}=c.useDroppable({id:e});return a.createElement(s.DroppableAreaStack,{...t,key:e,ref:o},r)};exports.DroppableArea=l;
|
package/dist/index108.js
CHANGED
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
id: r
|
|
8
|
-
}), a = {
|
|
9
|
-
transform: p.Transform.toString(i),
|
|
10
|
-
transition: n,
|
|
11
|
-
cursor: "grab",
|
|
12
|
-
outlineOffset: "-1px"
|
|
13
|
-
};
|
|
14
|
-
return /* @__PURE__ */ f("div", { ref: e, style: a, ...o, ...s, children: [
|
|
15
|
-
t,
|
|
16
|
-
m && /* @__PURE__ */ g(c, {})
|
|
17
|
-
] });
|
|
1
|
+
import { createElement as p } from "react";
|
|
2
|
+
import { useDroppable as a } from "@dnd-kit/core";
|
|
3
|
+
import { DroppableAreaStack as m } from "./index93.js";
|
|
4
|
+
const n = ({ id: e, children: r, ...o }) => {
|
|
5
|
+
const { setNodeRef: t } = a({ id: e });
|
|
6
|
+
return /* @__PURE__ */ p(m, { ...o, key: e, ref: t }, r);
|
|
18
7
|
};
|
|
19
8
|
export {
|
|
20
|
-
|
|
9
|
+
n as DroppableArea
|
|
21
10
|
};
|
package/dist/index109.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 O=require("react"),b=require("@dnd-kit/sortable"),w=({items:d,setItems:g})=>{const[C,i]=O.useState(null),[h,v]=O.useState(null),s=n=>{var e;return n&&(n.id in d?n.id:(e=n==null?void 0:n.data.current)==null?void 0:e.sortable.containerId)};return{activeId:C,handleDragStart:n=>{const{active:e}=n;i(e.id),v(d)},handleDragOver:n=>{const{active:e,over:t}=n,o=t==null?void 0:t.id;if(o==null)return;const c=s(t),a=s(e);!c||!a||a!==c&&g(r=>{const u=r[a],l=r[c],D=l.indexOf(o),S=u.indexOf(e.id);let f;if(o in r)f=l.length+1;else{const I=t&&e.rect.current.translated&&e.rect.current.translated.top>t.rect.top+t.rect.height?1:0;f=D>=0?D+I:l.length+1}return{...r,[a]:r[a].filter(x=>x!==e.id),[c]:[...r[c].slice(0,f),r[a][S],...r[c].slice(f,r[c].length)]}})},handleDragEnd:n=>{const{active:e,over:t}=n,o=s(e);if(!o){i(null);return}const c=t==null?void 0:t.id;if(c==null){i(null);return}const a=s(t);if(a){const r=d[o].indexOf(e.id),u=d[a].indexOf(c);r!==u&&g(l=>({...l,[a]:b.arrayMove(l[a],r,u)}))}i(null)},handleDragCancel:()=>{h&&g(h),i(null),v(null)}}};exports.useDragHandlers=w;
|
package/dist/index109.js
CHANGED
|
@@ -1,10 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { useState as C } from "react";
|
|
2
|
+
import { arrayMove as S } from "@dnd-kit/sortable";
|
|
3
|
+
const M = ({ items: d, setItems: g }) => {
|
|
4
|
+
const [O, i] = C(null), [h, v] = C(null), s = (n) => {
|
|
5
|
+
var t;
|
|
6
|
+
return n && (n.id in d ? n.id : (t = n == null ? void 0 : n.data.current) == null ? void 0 : t.sortable.containerId);
|
|
7
|
+
};
|
|
8
|
+
return {
|
|
9
|
+
activeId: O,
|
|
10
|
+
handleDragStart: (n) => {
|
|
11
|
+
const { active: t } = n;
|
|
12
|
+
i(t.id), v(d);
|
|
13
|
+
},
|
|
14
|
+
handleDragOver: (n) => {
|
|
15
|
+
const { active: t, over: e } = n, a = e == null ? void 0 : e.id;
|
|
16
|
+
if (a == null) return;
|
|
17
|
+
const c = s(e), o = s(t);
|
|
18
|
+
!c || !o || o !== c && g((r) => {
|
|
19
|
+
const u = r[o], l = r[c], x = l.indexOf(a), I = u.indexOf(t.id);
|
|
20
|
+
let f;
|
|
21
|
+
if (a in r)
|
|
22
|
+
f = l.length + 1;
|
|
23
|
+
else {
|
|
24
|
+
const w = e && t.rect.current.translated && t.rect.current.translated.top > e.rect.top + e.rect.height ? 1 : 0;
|
|
25
|
+
f = x >= 0 ? x + w : l.length + 1;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
...r,
|
|
29
|
+
[o]: r[o].filter((D) => D !== t.id),
|
|
30
|
+
[c]: [
|
|
31
|
+
...r[c].slice(0, f),
|
|
32
|
+
r[o][I],
|
|
33
|
+
...r[c].slice(f, r[c].length)
|
|
34
|
+
]
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
handleDragEnd: (n) => {
|
|
39
|
+
const { active: t, over: e } = n, a = s(t);
|
|
40
|
+
if (!a) {
|
|
41
|
+
i(null);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const c = e == null ? void 0 : e.id;
|
|
45
|
+
if (c == null) {
|
|
46
|
+
i(null);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const o = s(e);
|
|
50
|
+
if (o) {
|
|
51
|
+
const r = d[a].indexOf(t.id), u = d[o].indexOf(c);
|
|
52
|
+
r !== u && g((l) => ({
|
|
53
|
+
...l,
|
|
54
|
+
[o]: S(l[o], r, u)
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
i(null);
|
|
58
|
+
},
|
|
59
|
+
handleDragCancel: () => {
|
|
60
|
+
h && g(h), i(null), v(null);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
7
63
|
};
|
|
8
64
|
export {
|
|
9
|
-
|
|
65
|
+
M as useDragHandlers
|
|
10
66
|
};
|
package/dist/index110.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 u=require("react"),n=require("@dnd-kit/core"),a=({items:i})=>{const o=u.useRef(null);return{collisionDetectionStrategy:u.useCallback(t=>{var c;const r=n.pointerWithin(t),d=r.length>0?r:n.rectIntersection(t);let e=n.getFirstCollision(d,"id");if(e!=null){if(e in i){const l=i[e];l.length>0&&(e=((c=n.closestCenter({...t,droppableContainers:t.droppableContainers.filter(s=>s.id!==e&&l.includes(s.id))})[0])==null?void 0:c.id)??e)}return o.current=e,[{id:e}]}return o.current?[{id:o.current}]:[]},[i])}};exports.useCollisionDetectionStrategy=a;
|
package/dist/index110.js
CHANGED
|
@@ -1,66 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
f = l.length + 1;
|
|
23
|
-
else {
|
|
24
|
-
const w = e && t.rect.current.translated && t.rect.current.translated.top > e.rect.top + e.rect.height ? 1 : 0;
|
|
25
|
-
f = x >= 0 ? x + w : l.length + 1;
|
|
1
|
+
import { useRef as u, useCallback as d } from "react";
|
|
2
|
+
import { pointerWithin as p, rectIntersection as a, getFirstCollision as f, closestCenter as C } from "@dnd-kit/core";
|
|
3
|
+
const h = ({ items: n }) => {
|
|
4
|
+
const i = u(null);
|
|
5
|
+
return { collisionDetectionStrategy: d(
|
|
6
|
+
(e) => {
|
|
7
|
+
var r;
|
|
8
|
+
const o = p(e), s = o.length > 0 ? (
|
|
9
|
+
// If there are droppables intersecting with the pointer, return those
|
|
10
|
+
o
|
|
11
|
+
) : a(e);
|
|
12
|
+
let t = f(s, "id");
|
|
13
|
+
if (t != null) {
|
|
14
|
+
if (t in n) {
|
|
15
|
+
const l = n[t];
|
|
16
|
+
l.length > 0 && (t = ((r = C({
|
|
17
|
+
...e,
|
|
18
|
+
droppableContainers: e.droppableContainers.filter(
|
|
19
|
+
(c) => c.id !== t && l.includes(c.id)
|
|
20
|
+
)
|
|
21
|
+
})[0]) == null ? void 0 : r.id) ?? t);
|
|
26
22
|
}
|
|
27
|
-
return {
|
|
28
|
-
...r,
|
|
29
|
-
[o]: r[o].filter((D) => D !== t.id),
|
|
30
|
-
[c]: [
|
|
31
|
-
...r[c].slice(0, f),
|
|
32
|
-
r[o][I],
|
|
33
|
-
...r[c].slice(f, r[c].length)
|
|
34
|
-
]
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
},
|
|
38
|
-
handleDragEnd: (n) => {
|
|
39
|
-
const { active: t, over: e } = n, a = s(t);
|
|
40
|
-
if (!a) {
|
|
41
|
-
i(null);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const c = e == null ? void 0 : e.id;
|
|
45
|
-
if (c == null) {
|
|
46
|
-
i(null);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
const o = s(e);
|
|
50
|
-
if (o) {
|
|
51
|
-
const r = d[a].indexOf(t.id), u = d[o].indexOf(c);
|
|
52
|
-
r !== u && g((l) => ({
|
|
53
|
-
...l,
|
|
54
|
-
[o]: S(l[o], r, u)
|
|
55
|
-
}));
|
|
23
|
+
return i.current = t, [{ id: t }];
|
|
56
24
|
}
|
|
57
|
-
i
|
|
25
|
+
return i.current ? [{ id: i.current }] : [];
|
|
58
26
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
};
|
|
27
|
+
[n]
|
|
28
|
+
) };
|
|
63
29
|
};
|
|
64
30
|
export {
|
|
65
|
-
|
|
31
|
+
h as useCollisionDetectionStrategy
|
|
66
32
|
};
|
package/dist/index111.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 e=r=>r instanceof Error;exports.isError=e;
|
package/dist/index111.js
CHANGED
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { pointerWithin as p, rectIntersection as a, getFirstCollision as f, closestCenter as C } from "@dnd-kit/core";
|
|
3
|
-
const h = ({ items: n }) => {
|
|
4
|
-
const i = u(null);
|
|
5
|
-
return { collisionDetectionStrategy: d(
|
|
6
|
-
(e) => {
|
|
7
|
-
var r;
|
|
8
|
-
const o = p(e), s = o.length > 0 ? (
|
|
9
|
-
// If there are droppables intersecting with the pointer, return those
|
|
10
|
-
o
|
|
11
|
-
) : a(e);
|
|
12
|
-
let t = f(s, "id");
|
|
13
|
-
if (t != null) {
|
|
14
|
-
if (t in n) {
|
|
15
|
-
const l = n[t];
|
|
16
|
-
l.length > 0 && (t = ((r = C({
|
|
17
|
-
...e,
|
|
18
|
-
droppableContainers: e.droppableContainers.filter(
|
|
19
|
-
(c) => c.id !== t && l.includes(c.id)
|
|
20
|
-
)
|
|
21
|
-
})[0]) == null ? void 0 : r.id) ?? t);
|
|
22
|
-
}
|
|
23
|
-
return i.current = t, [{ id: t }];
|
|
24
|
-
}
|
|
25
|
-
return i.current ? [{ id: i.current }] : [];
|
|
26
|
-
},
|
|
27
|
-
[n]
|
|
28
|
-
) };
|
|
29
|
-
};
|
|
1
|
+
const o = (r) => r instanceof Error;
|
|
30
2
|
export {
|
|
31
|
-
|
|
3
|
+
o as isError
|
|
32
4
|
};
|
package/dist/index36.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),u=require("@veeqo/ui"),U=require("mobx-react"),z=require("./index65.cjs"),G=require("./index62.cjs"),J=require("./index40.cjs"),K=require("./index43.cjs"),Q=require("./index56.cjs"),X=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),u=require("@veeqo/ui"),U=require("mobx-react"),z=require("./index65.cjs"),G=require("./index62.cjs"),J=require("./index40.cjs"),K=require("./index43.cjs"),Q=require("./index56.cjs"),X=require("./index103.cjs"),Z=require("./index8.cjs"),$=require("./index61.cjs"),b=require("./index104.cjs"),ee=U.observer(({view:e})=>{const{VIEW_TYPE:x,IS_VIEWS_READONLY:r,SEARCH_FILTER_ID:d}=Z.useBusinessLogic(),{Filters:{activeViewId:w,initFiltersFromView:f,discardChanges:m,initFromUrl:V,filters:L,setFilter:y},Views:{draftViewsMap:T},Notifications:{notify:E}}=$.useStores(),{viewsMap:h,defaultCustomViewId:F,isLoading:N}=G.useViews(),{isLoading:j}=z.useCustomViews({type:x}),{viewCounts:M,isLoadingViewCounts:R}=X.useViewCounts(),[s,k]=c.useState(null),A=o=>{const q=L.get(d);if(h.has(o)){const n=h.get(o);n&&(f(n),m(!0),V())}else{const n=T.get(o);n?(f(n),m(!0),V()):E({type:"error",text:"Failed to load view"})}q&&y(d,q)},a=(e==null?void 0:e.id)===w,t=e.originalView!==void 0,g=e.originalView===void 0,I=M,l=(e==null?void 0:e.label)||"",P=N||j,p=c.useRef(!1);!P&&!p.current&&a&&e.id===F&&s&&(p.current=!0,s&&w===e.id&&window.requestAnimationFrame(()=>{var o;(o=s.parentElement)==null||o.scrollBy({behavior:"smooth",left:s.offsetLeft})}));const D=c.useMemo(()=>t?"draft":e.editable?"saved":"fixed",[t,e.editable]),{actions:{create:{handleSaveDraft:_},menu:{toggleDropdown:v},delete:{closeDeleteConfirmation:B,handleDelete:O,handleDeleteDraftView:C}},state:{shouldShowDeleteConfirmation:H},actions:W,state:S}=Q.useDropdownManager(e),Y=c.useMemo(()=>{if(!r){if(g)return v;if(t)return C}},[C,t,g,v,r]);return i.jsxs(i.Fragment,{children:[i.jsx(u.ViewTab,{colourPalette:u.theme.colors.secondary.blue,className:"act-react-listing-custom-view",active:a,id:e==null?void 0:e.id,name:l,type:r?void 0:D,count:R?i.jsx(u.Loader,{type:"ThreeDots",width:12,height:12,color:a?"#fff":u.theme.colors.neutral.ink.dark}):I,onClick:A,subAction:Y,ariaContext:"orders",ref:k,"aria-controls":"options-dropdown","aria-expanded":S.shouldShowDropdown,"aria-haspopup":"dialog"},e==null?void 0:e.id),i.jsx(b.Confirmation,{shouldShow:H,viewName:l,onCancel:B,onDelete:O}),i.jsx(J.PillNotifications,{tabType:D,isActive:a,initialViewName:l,shouldShowCreateViewNotification:t,handleSaveDraft:_}),!r&&i.jsx(K.ViewDropdowns,{referenceElement:s,tab:e,...W,...S})]})});exports.ViewTab=ee;
|
package/dist/index36.js
CHANGED
|
@@ -7,10 +7,10 @@ import { useViews as Z } from "./index62.js";
|
|
|
7
7
|
import { PillNotifications as b } from "./index40.js";
|
|
8
8
|
import { ViewDropdowns as ee } from "./index43.js";
|
|
9
9
|
import { useDropdownManager as oe } from "./index56.js";
|
|
10
|
-
import { useViewCounts as ie } from "./
|
|
10
|
+
import { useViewCounts as ie } from "./index103.js";
|
|
11
11
|
import { useBusinessLogic as te } from "./index8.js";
|
|
12
12
|
import { useStores as re } from "./index61.js";
|
|
13
|
-
import { Confirmation as se } from "./
|
|
13
|
+
import { Confirmation as se } from "./index104.js";
|
|
14
14
|
const ve = Q(({ view: e }) => {
|
|
15
15
|
const { VIEW_TYPE: y, IS_VIEWS_READONLY: n, SEARCH_FILTER_ID: c } = te(), {
|
|
16
16
|
Filters: { activeViewId: d, initFiltersFromView: f, discardChanges: m, initFromUrl: u, filters: E, setFilter: F },
|
package/dist/index39.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index100.cjs"),g=require("./index52.cjs"),j=require("./index51.cjs"),M=({tab:i,onMakeDefault:l,onEdit:n,onDuplicate:s,onDelete:o,shouldShowDropdown:a,handleCloseDropdown:c})=>{const{openModal:r}=g.useModal(),d=()=>{r(j.ModalId.ORDERS_TABLE_MANAGEMENT),c()},m=i.label!=="Picking In Progress"&&i.editable,u=i.default!==!1&&i.editable,p=i.editable,b=i.editable;return a?e.jsxs(t.MenuItems,{children:[u&&e.jsx(t.Item,{onClick:l,className:"act-react-listing-custom-view-make-default-menu-item",children:"Make default view"}),b&&e.jsx(t.Item,{onClick:n,className:"act-react-listing-custom-view-edit-menu-item",role:"option",children:"Edit"}),e.jsx(t.Item,{onClick:s,className:"act-react-listing-custom-view-duplicate-menu-item",role:"option",children:"Duplicate"}),m&&e.jsx(t.Item,{onClick:o,className:"act-react-listing-custom-view-delete-menu-item",role:"option",children:"Delete"}),p&&e.jsxs(e.Fragment,{children:[e.jsx(t.Divider,{}),e.jsx(t.Item,{onClick:d,role:"option",children:"Table management"})]})]}):null};exports.OptionsDropdown=M;
|
package/dist/index39.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as t, jsx as i, Fragment as f } from "react/jsx-runtime";
|
|
2
|
-
import { MenuItems as M, Item as l, Divider as h } from "./
|
|
2
|
+
import { MenuItems as M, Item as l, Divider as h } from "./index100.js";
|
|
3
3
|
import { useModal as k } from "./index52.js";
|
|
4
4
|
import { ModalId as T } from "./index51.js";
|
|
5
5
|
const N = ({
|
package/dist/index40.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("mobx-react"),g=require("./index62.cjs"),o=require("framer-motion"),m=require("./index61.cjs"),v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("mobx-react"),g=require("./index62.cjs"),o=require("framer-motion"),m=require("./index61.cjs"),v=require("./index102.cjs"),f=require("./index42.cjs"),h=P.observer(({tabType:s,isActive:r,shouldShowCreateViewNotification:a,handleSaveDraft:i})=>{var t;const{Filters:{hasUnsavedChanges:c,discardChanges:l,activeViewId:n}}=m.useStores(),{viewsMap:u}=g.useViews(),d=n&&((t=u.get(n))==null?void 0:t.label);return e.jsxs(e.Fragment,{children:[e.jsx(o.AnimatePresence,{children:s==="draft"&&r&&a&&e.jsx(v.DraftPill,{onClick:i})}),e.jsx(o.AnimatePresence,{children:c&&r&&s==="saved"&&e.jsx(f.UnsavedChangesPill,{viewName:d,onDiscard:()=>l(),onSaveDraft:i})})]})});exports.PillNotifications=h;
|
package/dist/index40.js
CHANGED
|
@@ -3,7 +3,7 @@ import { observer as h } from "mobx-react";
|
|
|
3
3
|
import { useViews as v } from "./index62.js";
|
|
4
4
|
import { AnimatePresence as n } from "framer-motion";
|
|
5
5
|
import { useStores as g } from "./index61.js";
|
|
6
|
-
import { DraftPill as w } from "./
|
|
6
|
+
import { DraftPill as w } from "./index102.js";
|
|
7
7
|
import { UnsavedChangesPill as C } from "./index42.js";
|
|
8
8
|
const U = h(
|
|
9
9
|
({
|
package/dist/index41.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),m=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),m=require("./index101.cjs"),g=require("./index65.cjs"),S=require("./index62.cjs"),b=require("./index4.cjs"),y=require("./index8.cjs"),V=require("./index61.cjs"),p=require("./index12.cjs"),q=()=>{const{VIEW_TYPE:u}=y.useBusinessLogic(),{sortedCustomViews:s,isLoading:a}=S.useViews(),{mutate:c}=g.useCustomViews({type:u}),[l,t]=n.useState(s);n.useEffect(()=>{t(s)},[s]);const{Notifications:{notify:w}}=V.useStores(),d=async o=>{t(o);const r=o.map(e=>e.id);try{await b.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:r}}}),await c(e=>({...e,settings:{...e.settings,custom_view_positions:{...e.settings.custom_view_positions,order:r}}}),{revalidate:!1})}catch{t(s),w({type:"error",text:"Failed to update order of views"})}};return a||!s.length?null:i.jsx(p.ErrorBoundary,{children:i.jsx(m.LegacySortableViews,{views:l,onChange:d,className:"act-sortable-views"})})};exports.SortableViews=q;
|
package/dist/index41.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f, useEffect as l } from "react";
|
|
3
|
-
import { LegacySortableViews as w } from "./
|
|
3
|
+
import { LegacySortableViews as w } from "./index101.js";
|
|
4
4
|
import { useCustomViews as d } from "./index65.js";
|
|
5
5
|
import { useViews as g } from "./index62.js";
|
|
6
6
|
import { patchCurrentUser as _ } from "./index4.js";
|
package/dist/index44.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),S=require("mobx-react"),i=require("@veeqo/ui"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),S=require("mobx-react"),i=require("@veeqo/ui"),u=require("./index105.cjs"),m=require("./index41.cjs"),q=require("./index62.cjs"),f=require("./index63.cjs"),p=require("./index37.cjs"),c=require("./index36.cjs"),v=require("./index8.cjs"),b=require("./index61.cjs"),a=require("./index12.cjs"),C=S.observer(({className:l})=>{const{IS_VIEWS_READONLY:r}=v.useBusinessLogic(),{Views:{draftViewsList:d}}=b.useStores(),{viewsArray:w,fixedViews:x}=q.useViews(),[n,o]=t.useState(!1),[V,h]=t.useState(null),j=()=>o(!1);return f.useViewUrlChange(),e.jsxs(e.Fragment,{children:[e.jsxs(i.ViewsContainer,{onClickMenu:r?void 0:()=>o(!0),ariaMenuControls:r?void 0:"views-menu",ariaMenuExpanded:r?!1:n,ref:h,className:l,children:[w.map(s=>e.jsx(a.ErrorBoundary,{children:e.jsx(c.ViewTab,{view:s})},s.id)),d.map(s=>e.jsx(a.ErrorBoundary,{children:e.jsx(c.ViewTab,{view:s})},s.id))]}),!r&&n&&e.jsx(i.Popover,{id:"views-menu",anchorElement:V,placement:"bottom",onShouldClose:()=>o(!1),children:e.jsxs(i.Card.Surface,{children:[e.jsx(u.FixedViews,{children:x.map(s=>e.jsx(i.Text,{variant:"placeholder",children:s.label},s.id||s.label))}),e.jsx(m.SortableViews,{}),e.jsx(u.Divider,{}),e.jsx(p.CreateView,{hideActionsPopover:j})]})})]})});exports.ViewList=C;
|
package/dist/index44.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as s, Fragment as w, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as n } from "react";
|
|
3
3
|
import { observer as V } from "mobx-react";
|
|
4
4
|
import { ViewsContainer as v, Popover as S, Card as x, Text as C } from "@veeqo/ui";
|
|
5
|
-
import { FixedViews as L, Divider as A } from "./
|
|
5
|
+
import { FixedViews as L, Divider as A } from "./index105.js";
|
|
6
6
|
import { SortableViews as E } from "./index41.js";
|
|
7
7
|
import { useViews as b } from "./index62.js";
|
|
8
8
|
import { useViewUrlChange as M } from "./index63.js";
|
package/dist/index63.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),E=require("./index79.cjs"),I=require("./index65.cjs"),C=require("./index62.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),q=require("qs"),E=require("./index79.cjs"),I=require("./index65.cjs"),C=require("./index62.cjs"),D=require("./index8.cjs"),F=require("./index61.cjs"),P=t=>t&&t.__esModule?t:{default:t},v=P(q),S=()=>{const{VIEW_TYPE:t,SEARCH_FILTER_ID:l}=D.useBusinessLogic(),{Filters:{activeViewId:g,initFiltersFromView:e,initFromUrl:i,discardChanges:f,updateUrl:L,setFilter:V}}=F.useStores(),{isLoading:_}=I.useCustomViews({type:t}),{viewsMap:s,defaultCustomViewId:w,isLoading:h,viewsArray:n}=C.useViews(),p=h||_;m.useEffect(()=>{if(p)return;const o=v.default.parse(window.location.search,{ignoreQueryPrefix:!0}),d=o.view,a=o[l],r=Object.keys(o).length>0;if(!g){if(d){const u=s.get(d);if(u)e(u),r&&i();else{const c=s.get(w);c&&(e(c),r&&i(!1))}}else{const u=s.get(w);if(u)e(u),f(!0),r&&i();else{const c=s.get(E.ALL_VIEW_ID);c?e(c):n!=null&&n[0]&&e(n[0])}}a&&V(l,a)}},[l,g,w,f,e,i,p,V,L,s,n]),m.useEffect(()=>{const o=()=>{const a=v.default.parse(window.location.search,{ignoreQueryPrefix:!0}).view;if(!a)return;const r=s.get(a);r&&(e(r),i())};return window.addEventListener("popstate",o),()=>window.removeEventListener("popstate",o)},[f,e,i,s])};exports.useViewUrlChange=S;
|
package/dist/index63.js
CHANGED
|
@@ -1,65 +1,66 @@
|
|
|
1
1
|
import { useEffect as g } from "react";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import V from "qs";
|
|
3
|
+
import { ALL_VIEW_ID as E } from "./index79.js";
|
|
4
|
+
import { useCustomViews as F } from "./index65.js";
|
|
5
|
+
import { useViews as C } from "./index62.js";
|
|
6
|
+
import { useBusinessLogic as D } from "./index8.js";
|
|
7
|
+
import { useStores as P } from "./index61.js";
|
|
8
|
+
const R = () => {
|
|
9
|
+
const { VIEW_TYPE: v, SEARCH_FILTER_ID: c } = D(), {
|
|
9
10
|
Filters: {
|
|
10
|
-
activeViewId:
|
|
11
|
+
activeViewId: d,
|
|
11
12
|
initFiltersFromView: e,
|
|
12
13
|
initFromUrl: i,
|
|
13
|
-
discardChanges:
|
|
14
|
-
updateUrl:
|
|
14
|
+
discardChanges: w,
|
|
15
|
+
updateUrl: L,
|
|
15
16
|
setFilter: p
|
|
16
17
|
}
|
|
17
|
-
} =
|
|
18
|
+
} = P(), { isLoading: I } = F({ type: v }), { viewsMap: t, defaultCustomViewId: m, isLoading: h, viewsArray: r } = C(), l = h || I;
|
|
18
19
|
g(() => {
|
|
19
|
-
if (
|
|
20
|
-
const s =
|
|
21
|
-
if (!
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
25
|
-
e(
|
|
20
|
+
if (l) return;
|
|
21
|
+
const s = V.parse(window.location.search, { ignoreQueryPrefix: !0 }), u = s.view, n = s[c], o = Object.keys(s).length > 0;
|
|
22
|
+
if (!d) {
|
|
23
|
+
if (u) {
|
|
24
|
+
const a = t.get(u);
|
|
25
|
+
if (a)
|
|
26
|
+
e(a), o && i();
|
|
26
27
|
else {
|
|
27
|
-
const
|
|
28
|
-
|
|
28
|
+
const f = t.get(m);
|
|
29
|
+
f && (e(f), o && i(!1));
|
|
29
30
|
}
|
|
30
31
|
} else {
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
e(
|
|
32
|
+
const a = t.get(m);
|
|
33
|
+
if (a)
|
|
34
|
+
e(a), w(!0), o && i();
|
|
34
35
|
else {
|
|
35
|
-
const
|
|
36
|
-
|
|
36
|
+
const f = t.get(E);
|
|
37
|
+
f ? e(f) : r != null && r[0] && e(r[0]);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
n && p(
|
|
40
|
+
n && p(c, n);
|
|
40
41
|
}
|
|
41
42
|
}, [
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
c,
|
|
44
|
+
d,
|
|
44
45
|
m,
|
|
45
|
-
|
|
46
|
+
w,
|
|
46
47
|
e,
|
|
47
48
|
i,
|
|
48
|
-
|
|
49
|
+
l,
|
|
49
50
|
p,
|
|
50
|
-
|
|
51
|
+
L,
|
|
51
52
|
t,
|
|
52
|
-
|
|
53
|
+
r
|
|
53
54
|
]), g(() => {
|
|
54
55
|
const s = () => {
|
|
55
|
-
const n =
|
|
56
|
+
const n = V.parse(window.location.search, { ignoreQueryPrefix: !0 }).view;
|
|
56
57
|
if (!n) return;
|
|
57
58
|
const o = t.get(n);
|
|
58
59
|
o && (e(o), i());
|
|
59
60
|
};
|
|
60
61
|
return window.addEventListener("popstate", s), () => window.removeEventListener("popstate", s);
|
|
61
|
-
}, [
|
|
62
|
+
}, [w, e, i, t]);
|
|
62
63
|
};
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
+
R as useViewUrlChange
|
|
65
66
|
};
|
package/dist/index64.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 n=require("react"),i=require("qs"),u=require("./index8.cjs"),a=require("./index61.cjs"),c=e=>e&&e.__esModule?e:{default:e},l=c(i),d=()=>{const{SEARCH_FILTER_ID:e}=u.useBusinessLogic(),{Filters:{initFromUrl:t,setFilter:r}}=a.useStores();n.useEffect(()=>{const o=l.default.parse(window.location.search,{ignoreQueryPrefix:!0})[e];t(),o&&r(e,o)},[e,t,r]),n.useEffect(()=>{const s=()=>t();return window.addEventListener("popstate",s),()=>window.removeEventListener("popstate",s)},[t])};exports.useUrlChange=d;
|
package/dist/index64.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { useEffect as n } from "react";
|
|
2
|
+
import i from "qs";
|
|
2
3
|
import { useBusinessLogic as a } from "./index8.js";
|
|
3
|
-
import { useStores as
|
|
4
|
-
const
|
|
4
|
+
import { useStores as p } from "./index61.js";
|
|
5
|
+
const d = () => {
|
|
5
6
|
const { SEARCH_FILTER_ID: t } = a(), {
|
|
6
7
|
Filters: {
|
|
7
8
|
initFromUrl: e,
|
|
8
|
-
setFilter:
|
|
9
|
+
setFilter: o
|
|
9
10
|
}
|
|
10
|
-
} =
|
|
11
|
+
} = p();
|
|
11
12
|
n(() => {
|
|
12
|
-
const
|
|
13
|
-
e(),
|
|
13
|
+
const s = i.parse(window.location.search, { ignoreQueryPrefix: !0 })[t];
|
|
14
|
+
e(), s && o(t, s);
|
|
14
15
|
}, [
|
|
15
16
|
t,
|
|
16
17
|
e,
|
|
17
|
-
|
|
18
|
+
o
|
|
18
19
|
]), n(() => {
|
|
19
|
-
const
|
|
20
|
-
return window.addEventListener("popstate",
|
|
20
|
+
const r = () => e();
|
|
21
|
+
return window.addEventListener("popstate", r), () => window.removeEventListener("popstate", r);
|
|
21
22
|
}, [e]);
|
|
22
23
|
};
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
d as useUrlChange
|
|
25
26
|
};
|
package/dist/index67.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 n=require("react"),c=require("./index2.cjs"),M=require("qs"),y=require("./index8.cjs"),_=require("./index61.cjs"),k=e=>e&&e.__esModule?e:{default:e},i=k(M),w=()=>{const{SORT_FILTER_ID:e,SORTING_MODE:a}=y.useBusinessLogic(),{Filters:{queryParamsObject:d},Table:{sortParam:o,sortState:t,setSortState:u}}=_.useStores(),g=n.useMemo(()=>{const r={...d};switch(a){case c.SortingMode.CORAL:t.columnId&&(r.sort_order=t.direction,r.sort=t.columnId);break;case c.SortingMode.MONOLITH:default:o&&(r[e]=o)}return i.default.stringify(r,{arrayFormat:"brackets"})},[d,o,a,e,t]),l=n.useCallback(()=>{const r=i.default.parse(window.location.search,{ignoreQueryPrefix:!0});switch(a){case c.SortingMode.CORAL:if(!t.columnId||r.sort_order===t.direction&&r.sort===t.columnId)break;r.sort_order=t.direction,r.sort=t.columnId;break;case c.SortingMode.MONOLITH:default:if(!o)break;if(r[e]===o)return;r[e]=o}const s=i.default.stringify(r,{arrayFormat:"brackets"});s&&window.history.replaceState({},"",`${window.location.pathname}?${s}`)},[a,e,o,t]),f=n.useCallback(()=>{const r=i.default.parse(window.location.search,{ignoreQueryPrefix:!0}),s=r[e],S=r.sort_order,m=r.sort;switch(a){case c.SortingMode.CORAL:S&&m&&u({columnId:m,direction:S});break;case c.SortingMode.MONOLITH:default:{if(!s)break;const b=s.startsWith("-"),I=b?"desc":"asc",O=b?s.slice(1):s;u({columnId:O,direction:I})}}},[a,e,u]);return n.useEffect(()=>{f()},[f]),n.useEffect(()=>{l()},[t,l]),{queryParams:g,updateCurrentUrlWithTableSort:l}};exports.useUrlParams=w;
|