@veeqo/transfigure 0.0.5 → 0.0.6
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/useHiddenColumns/useHiddenColumns.d.ts +5 -1
- package/dist/index100.cjs +13 -1
- package/dist/index100.js +16 -63
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +36 -30
- package/dist/index102.cjs +1 -7
- package/dist/index102.js +42 -10
- package/dist/index103.cjs +7 -1
- package/dist/index103.js +10 -42
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +1 -1
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +1 -1
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +1 -1
- 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/index61.cjs +1 -1
- package/dist/index61.js +24 -13
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +7 -7
- package/dist/index79.cjs +80 -1
- package/dist/index79.js +95 -24
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +13 -29
- package/dist/index81.cjs +100 -15
- package/dist/index81.js +115 -19
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +56 -20
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +28 -14
- package/dist/index84.cjs +1 -80
- package/dist/index84.js +2 -95
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +34 -13
- package/dist/index86.cjs +1 -104
- package/dist/index86.js +8 -120
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +28 -57
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +20 -27
- package/dist/index89.cjs +19 -1
- package/dist/index89.js +24 -2
- package/dist/index90.cjs +12 -1
- package/dist/index90.js +16 -34
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +15 -8
- package/dist/index92.cjs +1 -12
- package/dist/index92.js +24 -16
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +19 -63
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +8 -36
- package/dist/index96.cjs +1 -80
- package/dist/index96.js +64 -95
- package/dist/index97.cjs +1 -13
- package/dist/index97.js +30 -17
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +63 -19
- package/dist/index99.cjs +80 -1
- package/dist/index99.js +95 -8
- package/package.json +1 -1
package/dist/index100.cjs
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@veeqo/components"),o=require("@veeqo/ui"),s=require("styled-components"),l=e=>e&&e.__esModule?e:{default:e},r=l(s),{SortableViews:i}=t.VeeqoUI,n=r.default(i)`
|
|
2
|
+
.rst__rowTitle {
|
|
3
|
+
span {
|
|
4
|
+
white-space: nowrap;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
text-overflow: ellipsis;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.rst__rowTitle > div:first-child {
|
|
11
|
+
gap: ${o.theme.sizes.sm};
|
|
12
|
+
}
|
|
13
|
+
`;exports.StyledSortableViews=n;
|
package/dist/index100.js
CHANGED
|
@@ -1,66 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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);
|
|
1
|
+
import { VeeqoUI as e } from "@veeqo/components";
|
|
2
|
+
import { theme as o } from "@veeqo/ui";
|
|
3
|
+
import t from "styled-components";
|
|
4
|
+
const { SortableViews: r } = e, p = t(r)`
|
|
5
|
+
.rst__rowTitle {
|
|
6
|
+
span {
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
text-overflow: ellipsis;
|
|
61
10
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.rst__rowTitle > div:first-child {
|
|
14
|
+
gap: ${o.sizes.sm};
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
64
17
|
export {
|
|
65
|
-
|
|
18
|
+
p as StyledSortableViews
|
|
66
19
|
};
|
package/dist/index101.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 r=require("@veeqo/ui"),o=require("@material-ui/core/styles"),t=require("@material-ui/core/Slider"),l=e=>e&&e.__esModule?e:{default:e},i=l(t),a=o.withStyles({root:{color:r.theme.colors.secondary.blue.base,height:4},thumb:{height:20,width:20,backgroundColor:"#fff",border:"3px solid currentColor",marginTop:-8,marginLeft:-10,"&:focus, &:hover, &$active":{boxShadow:"inherit"}},valueLabel:{left:"calc(-50% - 1px)"},track:{height:4,borderRadius:4,backgroundColor:r.theme.colors.secondary.blue.light,opacity:1},rail:{height:4,borderRadius:4,backgroundColor:r.theme.colors.neutral.grey.dark,opacity:1}})(i.default);exports.MUISlider=a;
|
package/dist/index101.js
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import { theme as o } from "@veeqo/ui";
|
|
2
|
+
import { withStyles as r } from "@material-ui/core/styles";
|
|
3
|
+
import e from "@material-ui/core/Slider";
|
|
4
|
+
const l = r({
|
|
5
|
+
root: {
|
|
6
|
+
color: o.colors.secondary.blue.base,
|
|
7
|
+
height: 4
|
|
8
|
+
},
|
|
9
|
+
thumb: {
|
|
10
|
+
height: 20,
|
|
11
|
+
width: 20,
|
|
12
|
+
backgroundColor: "#fff",
|
|
13
|
+
border: "3px solid currentColor",
|
|
14
|
+
marginTop: -8,
|
|
15
|
+
marginLeft: -10,
|
|
16
|
+
"&:focus, &:hover, &$active": {
|
|
17
|
+
boxShadow: "inherit"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
valueLabel: {
|
|
21
|
+
left: "calc(-50% - 1px)"
|
|
22
|
+
},
|
|
23
|
+
track: {
|
|
24
|
+
height: 4,
|
|
25
|
+
borderRadius: 4,
|
|
26
|
+
backgroundColor: o.colors.secondary.blue.light,
|
|
27
|
+
opacity: 1
|
|
28
|
+
},
|
|
29
|
+
rail: {
|
|
30
|
+
height: 4,
|
|
31
|
+
borderRadius: 4,
|
|
32
|
+
backgroundColor: o.colors.neutral.grey.dark,
|
|
33
|
+
opacity: 1
|
|
34
|
+
}
|
|
35
|
+
})(e);
|
|
30
36
|
export {
|
|
31
|
-
|
|
37
|
+
l as MUISlider
|
|
32
38
|
};
|
package/dist/index102.cjs
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
padding: ${e.theme.sizes.sm};
|
|
3
|
-
// This calculation limits the height to a max of 100% of the viewport and uses offset as the position of the CTA button
|
|
4
|
-
// with an additional sizes.base offset at the bottom.
|
|
5
|
-
max-height: calc(100vh ${({offset:t})=>t&&`- ${t}px`} - ${e.theme.sizes.base});
|
|
6
|
-
overflow-y: auto;
|
|
7
|
-
`;exports.AdaptiveStyledContainer=s;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react");const n=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:r}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:r}=t;return"scaleX("+e+") scaleY("+r+")"}},Transform:{toString(t){if(t)return[n.Translate.toString(t),n.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:r,easing:i}=t;return e+" "+r+"ms "+i}}});exports.CSS=n;
|
package/dist/index102.js
CHANGED
|
@@ -1,12 +1,44 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import "react";
|
|
2
|
+
const n = /* @__PURE__ */ Object.freeze({
|
|
3
|
+
Translate: {
|
|
4
|
+
toString(t) {
|
|
5
|
+
if (!t)
|
|
6
|
+
return;
|
|
7
|
+
const {
|
|
8
|
+
x: r,
|
|
9
|
+
y: e
|
|
10
|
+
} = t;
|
|
11
|
+
return "translate3d(" + (r ? Math.round(r) : 0) + "px, " + (e ? Math.round(e) : 0) + "px, 0)";
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
Scale: {
|
|
15
|
+
toString(t) {
|
|
16
|
+
if (!t)
|
|
17
|
+
return;
|
|
18
|
+
const {
|
|
19
|
+
scaleX: r,
|
|
20
|
+
scaleY: e
|
|
21
|
+
} = t;
|
|
22
|
+
return "scaleX(" + r + ") scaleY(" + e + ")";
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
Transform: {
|
|
26
|
+
toString(t) {
|
|
27
|
+
if (t)
|
|
28
|
+
return [n.Translate.toString(t), n.Scale.toString(t)].join(" ");
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
Transition: {
|
|
32
|
+
toString(t) {
|
|
33
|
+
let {
|
|
34
|
+
property: r,
|
|
35
|
+
duration: e,
|
|
36
|
+
easing: i
|
|
37
|
+
} = t;
|
|
38
|
+
return r + " " + e + "ms " + i;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
10
42
|
export {
|
|
11
|
-
|
|
43
|
+
n as CSS
|
|
12
44
|
};
|
package/dist/index103.cjs
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("styled-components"),e=require("@veeqo/ui"),a=t=>t&&t.__esModule?t:{default:t},i=a(o),s=i.default(e.BaseContainer)`
|
|
2
|
+
padding: ${e.theme.sizes.sm};
|
|
3
|
+
// This calculation limits the height to a max of 100% of the viewport and uses offset as the position of the CTA button
|
|
4
|
+
// with an additional sizes.base offset at the bottom.
|
|
5
|
+
max-height: calc(100vh ${({offset:t})=>t&&`- ${t}px`} - ${e.theme.sizes.base});
|
|
6
|
+
overflow-y: auto;
|
|
7
|
+
`;exports.AdaptiveStyledContainer=s;
|
package/dist/index103.js
CHANGED
|
@@ -1,44 +1,12 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} = t;
|
|
11
|
-
return "translate3d(" + (r ? Math.round(r) : 0) + "px, " + (e ? Math.round(e) : 0) + "px, 0)";
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
Scale: {
|
|
15
|
-
toString(t) {
|
|
16
|
-
if (!t)
|
|
17
|
-
return;
|
|
18
|
-
const {
|
|
19
|
-
scaleX: r,
|
|
20
|
-
scaleY: e
|
|
21
|
-
} = t;
|
|
22
|
-
return "scaleX(" + r + ") scaleY(" + e + ")";
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
Transform: {
|
|
26
|
-
toString(t) {
|
|
27
|
-
if (t)
|
|
28
|
-
return [n.Translate.toString(t), n.Scale.toString(t)].join(" ");
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
Transition: {
|
|
32
|
-
toString(t) {
|
|
33
|
-
let {
|
|
34
|
-
property: r,
|
|
35
|
-
duration: e,
|
|
36
|
-
easing: i
|
|
37
|
-
} = t;
|
|
38
|
-
return r + " " + e + "ms " + i;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
});
|
|
1
|
+
import o from "styled-components";
|
|
2
|
+
import { theme as e, BaseContainer as i } from "@veeqo/ui";
|
|
3
|
+
const h = o(i)`
|
|
4
|
+
padding: ${e.sizes.sm};
|
|
5
|
+
// This calculation limits the height to a max of 100% of the viewport and uses offset as the position of the CTA button
|
|
6
|
+
// with an additional sizes.base offset at the bottom.
|
|
7
|
+
max-height: calc(100vh ${({ offset: t }) => t && `- ${t}px`} - ${e.sizes.base});
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
`;
|
|
42
10
|
export {
|
|
43
|
-
|
|
11
|
+
h as AdaptiveStyledContainer
|
|
44
12
|
};
|
package/dist/index20.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("react"),b=require("mobx-react"),r=require("@veeqo/ui"),F=require("./index63.cjs"),R=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("react"),b=require("mobx-react"),r=require("@veeqo/ui"),F=require("./index63.cjs"),R=require("./index98.cjs"),h=require("./index57.cjs"),x=b.observer(({filterData:i})=>{const{Filters:{numberRangeFilters:o,clearNumberRangeFilter:u,setNumberRangeFilter:d}}=h.useStores(),e=o.get(i.id),[s,a]=l.useState(e),c=l.useCallback(()=>{const n=new F.NumberRangeFilter({filterId:i.id});return e&&(e.gte&&n.setGte(e.gte),e.lte&&n.setLte(e.lte)),n},[i.id,e]);l.useEffect(()=>{const n=c();a(n)},[c,e]);const g=()=>{u(i.id)},m=()=>{!e||!s||d({numberRange:e,lte:s.lte,gte:s.gte})};return t.jsx(r.FilterTag,{shouldCloseOnClickAway:!0,header:t.jsx("div",{children:"Edit filter (style and semant me pls)"}),label:i.label,text:(e==null?void 0:e.filterLabel)||"Loading...",content:t.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.md},children:t.jsx(R.FilterNumberRangeFilter,{data:i,editedValue:s,setEditedValue:a})}),footer:t.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.sm,width:"200px"},children:t.jsxs(r.Stack,{direction:"horizontal",alignX:"end",children:[t.jsx(r.Button,{variant:"default",size:"sm",onClick:g,children:"Clear"}),t.jsx(r.Button,{variant:"primary",size:"sm",onClick:m,children:"Apply"})]})})})});exports.ActiveFilterNumberRangeTag=x;
|
package/dist/index20.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useState as b, useCallback as f, useEffect as h } from "react";
|
|
|
3
3
|
import { observer as R } from "mobx-react";
|
|
4
4
|
import { FilterTag as v, BaseContainer as o, theme as a, Stack as y, Button as d } from "@veeqo/ui";
|
|
5
5
|
import { NumberRangeFilter as C } from "./index63.js";
|
|
6
|
-
import { FilterNumberRangeFilter as N } from "./
|
|
6
|
+
import { FilterNumberRangeFilter as N } from "./index98.js";
|
|
7
7
|
import { useStores as w } from "./index57.js";
|
|
8
8
|
const j = R(
|
|
9
9
|
({ filterData: r }) => {
|
package/dist/index28.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),_=require("mobx-react"),j=require("lodash/debounce"),r=require("@veeqo/ui"),L=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),_=require("mobx-react"),j=require("lodash/debounce"),r=require("@veeqo/ui"),L=require("./index101.cjs"),R=require("./index63.cjs"),p=require("./index7.cjs"),y=require("./index57.cjs"),v=i=>i&&i.__esModule?i:{default:i},k=v(j),I=_.observer(({field:i})=>{var M;const{FILTERS_DEBOUCE_INTERVAL_MS:f}=p.useBusinessLogic(),{Filters:{numberRangeFilters:u,setNumberRangeFilter:x,clearNumberRangeFilter:F}}=y.useStores(),e=u.get(i.id),[o,g]=d.useState({gte:(e==null?void 0:e.gte)??0,lte:(e==null?void 0:e.lte)??100});if(!((M=i.options)!=null&&M.length))return null;const b=()=>{const l=new R.NumberRangeFilter({filterId:i.id});return u.set(i.id,l),l},c=d.useCallback(k.default(({numberRange:l,lte:t,gte:n})=>{x({numberRange:l,lte:t,gte:n})},f),[x]),h=()=>{g({gte:0,lte:100}),F(i.id)},S=(l,t)=>{let n=new R.NumberRangeFilter({filterId:i.id});if(e||(n=b()),!Array.isArray(t)||t.length!==2)return;const[s,m]=t;g({gte:s,lte:m}),c(e?{numberRange:e,lte:m,gte:s}:{numberRange:n,lte:m,gte:s})},N=l=>{if(e||b(),!e)return;const t=Number(l);if(t>e.lteMax)return;let{lte:n}=e,{gte:s}=e;t>=e.gteMin&&t<=e.lteMax&&(s=t),(!e.lte||t>=e.lte)&&(n=e.lteMax),g({gte:s,lte:n}),c({numberRange:e,lte:n,gte:s})},C=l=>{if(e||b(),!e)return;const t=Number(l);if(t<e.gteMin)return;let{lte:n}=e,{gte:s}=e;t>=e.gteMin&&t<=e.lteMax&&(n=t),(!e.gte||t<=e.gte)&&(s=e.gteMin),g({gte:s,lte:n}),c({numberRange:e,lte:n,gte:s})},q=[o.gte,o.lte];return a.jsxs(r.Stack,{spacing:"xs",alignX:"stretch",children:[a.jsx(r.Button,{variant:"link",onClick:h,children:"Clear"}),a.jsxs(r.Stack,{direction:"horizontal",children:[a.jsx(r.TextField,{label:e==null?void 0:e.gteMinLabel,type:"number",min:e==null?void 0:e.gteMin,max:e==null?void 0:e.lteMax,value:o.gte.toString(),onChange:N}),a.jsx(r.TextField,{label:e==null?void 0:e.lteMaxLabel,type:"number",min:e==null?void 0:e.gteMin,max:e==null?void 0:e.lteMax,value:o.lte.toString(),onChange:C})]}),a.jsx(L.MUISlider,{value:q,onChange:S,min:e==null?void 0:e.gteMin,max:e==null?void 0:e.lteMax,valueLabelDisplay:"auto"})]})});exports.NumberRangeFilter=I;
|
package/dist/index28.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useState as y, useCallback as I } from "react";
|
|
|
3
3
|
import { observer as k } from "mobx-react";
|
|
4
4
|
import E from "lodash/debounce";
|
|
5
5
|
import { Stack as c, Button as _, TextField as p } from "@veeqo/ui";
|
|
6
|
-
import { MUISlider as A } from "./
|
|
6
|
+
import { MUISlider as A } from "./index101.js";
|
|
7
7
|
import { NumberRangeFilter as h } from "./index63.js";
|
|
8
8
|
import { useBusinessLogic as B } from "./index7.js";
|
|
9
9
|
import { useStores as T } from "./index57.js";
|
package/dist/index31.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index7.cjs"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index7.cjs"),u=require("./index92.cjs"),c=require("./index32.cjs"),a=s.observer(()=>{const{GROUP_MAP:t}=o.useBusinessLogic();return e.jsx(u.AdaptiveHeightContainer,{style:{minWidth:"360px"},children:e.jsx(n.Stack,{alignX:"stretch",children:Array.from(t).map(([r,i])=>e.jsx(c.FilterGroup,{data:i},r))})})});exports.FiltersList=a;
|
package/dist/index31.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { observer as e } from "mobx-react";
|
|
3
3
|
import { Stack as m } from "@veeqo/ui";
|
|
4
4
|
import { useBusinessLogic as s } from "./index7.js";
|
|
5
|
-
import { AdaptiveHeightContainer as p } from "./
|
|
5
|
+
import { AdaptiveHeightContainer as p } from "./index92.js";
|
|
6
6
|
import { FilterGroup as n } from "./index32.js";
|
|
7
7
|
const u = e(() => {
|
|
8
8
|
const { GROUP_MAP: t } = s();
|
package/dist/index33.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("react"),q=require("@veeqo/ui"),U=require("mobx-react"),W=require("./index60.cjs"),Y=require("./index58.cjs"),z=require("./index37.cjs"),G=require("./index40.cjs"),J=require("./index52.cjs"),K=require("./index7.cjs"),Q=require("./index57.cjs"),X=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("react"),q=require("@veeqo/ui"),U=require("mobx-react"),W=require("./index60.cjs"),Y=require("./index58.cjs"),z=require("./index37.cjs"),G=require("./index40.cjs"),J=require("./index52.cjs"),K=require("./index7.cjs"),Q=require("./index57.cjs"),X=require("./index87.cjs"),Z=U.observer(({view:e})=>{const{VIEW_TYPE:S,SEARCH_FILTER_ID:l}=K.useBusinessLogic(),{Filters:{activeViewId:u,initFiltersFromView:d,discardChanges:w,initFromUrl:f,filters:x,setFilter:y},Views:{draftViewsMap:F},Notifications:{notify:L}}=Q.useStores(),{viewsMap:m,defaultCustomViewId:T,isLoading:N}=Y.useViews(),{isLoading:j,isValidating:E}=W.useCustomViews({type:S}),[s,M]=r.useState(null),R=i=>{const C=x.get(l);if(m.has(i)){const n=m.get(i);n&&(d(n),w(!0),f())}else{const n=F.get(i);n?(d(n),w(!0),f()):L({type:"error",text:"Failed to load view"})}C&&y(l,C)},a=(e==null?void 0:e.id)===u,t=e.originalView!==void 0,V=e.originalView===void 0,P="100",c=(e==null?void 0:e.label)||"",A=N||E||j,g=r.useRef(!1);!A&&!g.current&&a&&e.id===T&&s&&(g.current=!0,s&&u===e.id&&window.requestAnimationFrame(()=>{var i;(i=s.parentElement)==null||i.scrollBy({behavior:"smooth",left:s.offsetLeft})}));const h=r.useMemo(()=>t?"draft":e.editable?"saved":"fixed",[t,e.editable]),{actions:{create:{handleSaveDraft:B},menu:{toggleDropdown:p},delete:{closeDeleteConfirmation:I,handleDelete:_,handleDeleteDraftView:D}},state:{shouldShowDeleteConfirmation:k},actions:O,state:v}=J.useDropdownManager(e),H=r.useMemo(()=>{if(V)return p;if(t)return D},[D,t,V,p]);return o.jsxs(o.Fragment,{children:[o.jsx(q.ViewTab,{colourPalette:q.theme.colors.secondary.blue,className:"act-react-listing-custom-view",active:a,id:e==null?void 0:e.id,name:c,type:h,count:P,onClick:R,subAction:H,ariaContext:"orders",ref:M,"aria-controls":"options-dropdown","aria-expanded":v.shouldShowDropdown,"aria-haspopup":"dialog"},e==null?void 0:e.id),o.jsx(X.Confirmation,{shouldShow:k,viewName:c,onCancel:I,onDelete:_}),o.jsx(z.PillNotifications,{tabType:h,isActive:a,initialViewName:c,shouldShowCreateViewNotification:t,handleSaveDraft:B}),o.jsx(G.ViewDropdowns,{referenceElement:s,tab:e,...O,...v})]})});exports.ViewTab=Z;
|
package/dist/index33.js
CHANGED
|
@@ -9,7 +9,7 @@ import { ViewDropdowns as X } from "./index40.js";
|
|
|
9
9
|
import { useDropdownManager as Z } from "./index52.js";
|
|
10
10
|
import { useBusinessLogic as b } from "./index7.js";
|
|
11
11
|
import { useStores as ee } from "./index57.js";
|
|
12
|
-
import { Confirmation as ie } from "./
|
|
12
|
+
import { Confirmation as ie } from "./index87.js";
|
|
13
13
|
const we = G(({ view: e }) => {
|
|
14
14
|
const { VIEW_TYPE: S, SEARCH_FILTER_ID: l } = b(), {
|
|
15
15
|
Filters: { activeViewId: c, initFiltersFromView: d, discardChanges: f, initFromUrl: m, filters: F, setFilter: L },
|
package/dist/index36.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("./index89.cjs"),g=require("./index48.cjs"),j=require("./index47.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/index36.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 "./index89.js";
|
|
3
3
|
import { useModal as k } from "./index48.js";
|
|
4
4
|
import { ModalId as T } from "./index47.js";
|
|
5
5
|
const N = ({
|
package/dist/index37.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react-transition-group"),f=require("mobx-react"),x=require("./index58.cjs"),v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react-transition-group"),f=require("mobx-react"),x=require("./index58.cjs"),v=require("./index88.cjs"),g=require("./index39.cjs"),h=require("./index57.cjs"),S=f.observer(({tabType:i,isActive:n,shouldShowCreateViewNotification:c,handleSaveDraft:s})=>{var r;const{Filters:{hasUnsavedChanges:l,discardChanges:u,activeViewId:t}}=h.useStores(),d=window.location.pathname==="/orders"?"orders":"variants",{viewsMap:m}=x.useViews(),o=t&&((r=m.get(t))==null?void 0:r.label)||"failure";return e.jsxs(e.Fragment,{children:[e.jsx(a.CSSTransition,{in:i==="draft"&&n&&c,timeout:200,classNames:"notification",unmountOnExit:!0,children:e.jsx(v.InfoPill,{onClick:s,mainEntityLabelPlural:d})}),i!=="fixed"&&o&&e.jsx(a.CSSTransition,{in:l&&n&&i==="saved",timeout:200,classNames:"notification",unmountOnExit:!0,children:e.jsx(g.UnsavedChangesPill,{viewName:o,onDiscard:()=>u(),onSaveDraft:s})})]})});exports.PillNotifications=S;
|
package/dist/index37.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as u, Fragment as p, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { CSSTransition as a } from "react-transition-group";
|
|
3
3
|
import { observer as h } from "mobx-react";
|
|
4
4
|
import { useViews as v } from "./index58.js";
|
|
5
|
-
import { InfoPill as w } from "./
|
|
5
|
+
import { InfoPill as w } from "./index88.js";
|
|
6
6
|
import { UnsavedChangesPill as x } from "./index39.js";
|
|
7
7
|
import { useStores as g } from "./index57.js";
|
|
8
8
|
const F = h(
|
package/dist/index38.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react"),m=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react"),m=require("./index91.cjs"),g=require("./index60.cjs"),S=require("./index58.cjs"),b=require("./index3.cjs"),y=require("./index7.cjs"),V=require("./index57.cjs"),p=require("./index10.cjs"),q=()=>{const{VIEW_TYPE:n}=y.useBusinessLogic(),{sortedCustomViews:s,isLoading:u}=S.useViews(),{mutate:a}=g.useCustomViews({type:n}),[c,t]=d.useState(s),{Notifications:{notify:l}}=V.useStores(),w=async o=>{t(o);const r=o.map(e=>e.id);try{await b.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:r}}}),await a(e=>({...e,settings:{...e.settings,custom_view_positions:{...e.settings.custom_view_positions,order:r}}}),{revalidate:!1})}catch{t(s),l({type:"error",text:"Failed to update order of views"})}};return u||!s.length?null:i.jsx(p.ErrorBoundary,{children:i.jsx(m.LegacySortableViews,{views:c,onChange:w,className:"act-sortable-views"})})};exports.SortableViews=q;
|
package/dist/index38.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f } from "react";
|
|
3
|
-
import { LegacySortableViews as l } from "./
|
|
3
|
+
import { LegacySortableViews as l } from "./index91.js";
|
|
4
4
|
import { useCustomViews as w } from "./index60.js";
|
|
5
5
|
import { useViews as d } from "./index58.js";
|
|
6
6
|
import { patchCurrentUser as g } from "./index3.js";
|
package/dist/index39.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),s=require("@veeqo/ui"),h=require("mobx-react"),n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),s=require("@veeqo/ui"),h=require("mobx-react"),n=require("./index79.cjs"),u=require("./index56.cjs"),g=s.theme.colors.secondary.blue.base,v=h.observer(({onDiscard:i,viewName:t,onSaveDraft:c})=>{const{saveChanges:o,isSubmitting:r}=u.usePersistUnsavedChanges(),[d,a]=l.useState(!1);return e.jsx(n.Notification,{children:e.jsx(n.Container,{className:"act-react-listing-custom-notification-unsaved-changes",children:e.jsxs(s.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(n.Glyph,{name:"attention",color:g}),e.jsxs(n.Wrap,{children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"You have unsaved changes to"}),e.jsx(n.Bold,{variant:"bodyBoldDark",children:`'${t}'`})]}),e.jsx(n.Button,{className:"act-react-listing-custom-notification-unsaved-changes-discard",onClick:i,size:"sm",children:"Discard changes"}),e.jsxs(s.AnimatedDropdown,{reversed:!0,shouldShowDropdown:d,onClickAway:()=>a(!1),cta:e.jsx(n.Button,{className:"act-react-listing-custom-notification-unsaved-changes-toggle-dropdown",variant:"primary",onClick:()=>a(!0),size:"sm",dropdown:!0,children:"Save changes"}),children:[e.jsx(n.Item,{onClick:c,className:"act-react-listing-custom-notification-unsaved-changes-create-new-view",children:e.jsx(n.Text,{variant:"body",children:"Create new view"})}),e.jsxs(n.Item,{onClick:o,disabled:r,className:"act-react-listing-custom-notification-unsaved-changes-save-to-existing-view",children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"Save changes to"}),e.jsx(n.Text,{variant:"bodyBoldDark",children:t})]})]})]})})})});exports.UnsavedChangesPill=v;
|
package/dist/index39.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as m } from "react";
|
|
3
3
|
import { Stack as g, theme as u, AnimatedDropdown as v } from "@veeqo/ui";
|
|
4
4
|
import { observer as p } from "mobx-react";
|
|
5
|
-
import { Notification as f, Container as w, Glyph as C, Wrap as b, Text as a, Bold as y, Button as o, Item as r } from "./
|
|
5
|
+
import { Notification as f, Container as w, Glyph as C, Wrap as b, Text as a, Bold as y, Button as o, Item as r } from "./index79.js";
|
|
6
6
|
import { usePersistUnsavedChanges as k } from "./index56.js";
|
|
7
7
|
const S = u.colors.secondary.blue.base, A = p(
|
|
8
8
|
({
|
package/dist/index41.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),V=require("mobx-react"),s=require("@veeqo/ui"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),V=require("mobx-react"),s=require("@veeqo/ui"),t=require("./index90.cjs"),j=require("./index38.cjs"),m=require("./index58.cjs"),S=require("./index59.cjs"),q=require("./index34.cjs"),u=require("./index33.cjs"),p=require("./index57.cjs"),a=require("./index10.cjs"),b=V.observer(()=>{const{Views:{draftViewsList:c}}=p.useStores(),{viewsArray:l,fixedViews:d}=m.useViews(),[o,i]=n.useState(!1),[w,x]=n.useState(null),h=()=>i(!1);return S.useViewUrlChange(),e.jsxs(e.Fragment,{children:[e.jsxs(s.ViewsContainer,{onClickMenu:()=>i(!0),ariaMenuControls:"views-menu",ariaMenuExpanded:o,ref:x,children:[l.map(r=>e.jsx(a.ErrorBoundary,{children:e.jsx(u.ViewTab,{view:r})},r.id)),c.map(r=>e.jsx(a.ErrorBoundary,{children:e.jsx(u.ViewTab,{view:r})},r.id))]}),o&&e.jsx(s.Popover,{id:"views-menu",anchorElement:w,placement:"bottom",onShouldClose:()=>i(!1),children:e.jsxs(s.Card.Surface,{children:[e.jsx(t.FixedViews,{children:d.map(r=>e.jsx(s.Text,{variant:"placeholder",children:r.label},r.id||r.label))}),e.jsx(j.SortableViews,{}),e.jsx(t.Divider,{}),e.jsx(q.CreateView,{hideActionsPopover:h})]})})]})});exports.ViewList=b;
|
package/dist/index41.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as i, Fragment as u, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as n } from "react";
|
|
3
3
|
import { observer as h } from "mobx-react";
|
|
4
4
|
import { ViewsContainer as w, Popover as V, Card as v, Text as S } from "@veeqo/ui";
|
|
5
|
-
import { FixedViews as x, Divider as C } from "./
|
|
5
|
+
import { FixedViews as x, Divider as C } from "./index90.js";
|
|
6
6
|
import { SortableViews as b } from "./index38.js";
|
|
7
7
|
import { useViews as A } from "./index58.js";
|
|
8
8
|
import { useViewUrlChange as L } from "./index59.js";
|
package/dist/index61.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("lodash"),m=require("./index7.cjs"),C=require("./index57.cjs"),a=require("./index58.cjs"),I=()=>{var u;const{DEFAULT_HIDDEN_COLUMNS:o,DEFAULT_VISIBLE_COLUMNS:t}=m.useBusinessLogic(),{Filters:{activeViewId:i}}=C.useStores(),{viewsMap:l,isLoading:s}=a.useViews();if(!i||s)return{isLoading:s,hiddenColumnIds:[]};const e=l.get(i),n=(u=e==null?void 0:e.columns)==null?void 0:u.columnIds;if(c.isArray(n)&&n.length>0){const r=[...o,...t].filter(d=>!n.includes(d));return{isLoading:s,hiddenColumnIds:r}}return{isLoading:s,hiddenColumnIds:o}};exports.useHiddenColumns=I;
|
package/dist/index61.js
CHANGED
|
@@ -1,17 +1,28 @@
|
|
|
1
|
-
import { isArray as
|
|
2
|
-
import { useBusinessLogic as
|
|
3
|
-
import { useStores as
|
|
4
|
-
import { useViews as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { isArray as d } from "lodash";
|
|
2
|
+
import { useBusinessLogic as c } from "./index7.js";
|
|
3
|
+
import { useStores as C } from "./index57.js";
|
|
4
|
+
import { useViews as I } from "./index58.js";
|
|
5
|
+
const g = () => {
|
|
6
|
+
var t;
|
|
7
|
+
const { DEFAULT_HIDDEN_COLUMNS: e, DEFAULT_VISIBLE_COLUMNS: l } = c(), { Filters: { activeViewId: i } } = C(), { viewsMap: r, isLoading: s } = I();
|
|
8
|
+
if (!i || s)
|
|
9
|
+
return {
|
|
10
|
+
isLoading: s,
|
|
11
|
+
hiddenColumnIds: []
|
|
12
|
+
};
|
|
13
|
+
const o = r.get(i), n = (t = o == null ? void 0 : o.columns) == null ? void 0 : t.columnIds;
|
|
14
|
+
if (d(n) && n.length > 0) {
|
|
15
|
+
const m = [...e, ...l].filter((u) => !n.includes(u));
|
|
16
|
+
return {
|
|
17
|
+
isLoading: s,
|
|
18
|
+
hiddenColumnIds: m
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
isLoading: s,
|
|
23
|
+
hiddenColumnIds: e
|
|
13
24
|
};
|
|
14
25
|
};
|
|
15
26
|
export {
|
|
16
|
-
|
|
27
|
+
g as useHiddenColumns
|
|
17
28
|
};
|
package/dist/index77.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@veeqo/ui"),a=require("react"),k=require("@veeqo/components"),S=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@veeqo/ui"),a=require("react"),k=require("@veeqo/components"),S=require("./index80.cjs"),u=require("./index81.cjs"),T=require("./index82.cjs"),V=require("./index83.cjs"),s=require("./index84.cjs"),D=require("./index78.cjs"),H=require("./index85.cjs"),y=require("./index86.cjs"),O=require("./index57.cjs"),B=require("./index58.cjs"),{Glyph:X}=k.VeeqoCommon,Y=({onClose:r,columnDefintions:j,hiddenColumns:m,visibleColumns:h})=>{const[c,g]=a.useState(""),i=a.useMemo(()=>new Map(j.map(n=>[n.id,n])),[]),[l,p]=a.useState(()=>({[s.ColumnGroupIds.Hidden]:m,[s.ColumnGroupIds.Visible]:h})),v=a.useMemo(()=>{const n=l[s.ColumnGroupIds.Visible].map(o=>i.get(`${o}`));return y.filterColumnsBySearch(n,c)},[l,i,c]),f=a.useMemo(()=>{const n=l[s.ColumnGroupIds.Hidden].map(o=>i.get(`${o}`));return y.filterColumnsBySearch(n,c)},[l,i,c]),{Notifications:{notify:C}}=O.useStores(),{saveColumns:G}=H.usePersistColumns(),{mutate:q}=B.useViews(),[d,x]=a.useState(!1),w=()=>{g(""),p({[s.ColumnGroupIds.Hidden]:m,[s.ColumnGroupIds.Visible]:h})},M=async()=>{try{x(!0);const n=l[s.ColumnGroupIds.Visible];if(n.length<1){C({type:"error",text:"You must have at least one visible column."});return}await G({visibleColumns:n}),await q(),r==null||r()}catch{C({type:"error",text:"Failed to save columns"})}finally{x(!1)}},b=a.useCallback(n=>{g(n)},[]),I=a.useCallback(n=>{const o=i.get(`${n}`);return o?e.jsx(V.ColumnItem,{column:o,isDragOverlay:!0}):null},[i]);return e.jsx(t.Modal,{variant:"lg",style:{overflowY:"hidden"},shouldShow:!0,onClose:()=>r==null?void 0:r(),headerSlot:e.jsxs(u.HeaderContainer,{children:[e.jsxs(t.Stack,{direction:"horizontal",alignX:"between",alignY:"center",children:[e.jsxs(t.Stack,{direction:"horizontal",alignX:"start",alignY:"center",spacing:"sm",children:[e.jsx(D.TableManagementGlyph,{height:32,width:32}),e.jsx(t.Text,{variant:"headingLarge",as:"h1",children:"Table management"})]}),e.jsx(t.Button,{"aria-label":"Close modal",onClick:r,variant:"flat",iconSlot:e.jsx(X,{name:"close"})})]}),e.jsxs(t.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(t.Anchor,{href:"#",target:"_blank",children:"help guide (TODO)"}),"."]}),e.jsx(t.Text,{variant:"headingSmall",children:"Column management"}),e.jsx(u.ColumnSearch,{name:"column-search-query",placeholder:"Search",value:c,onChange:b,onClearClick:()=>b(""),fill:"100%"})]}),leftActions:[{label:"Reset",onClick:w,variant:"default",disabled:d}],rightActions:[{label:"Cancel",onClick:r,variant:"default",disabled:d},{label:"Save",onClick:M,variant:"primary",disabled:d,loading:d}],children:e.jsx(t.Stack,{spacing:"md",alignX:"stretch",children:e.jsx(t.Stack,{spacing:4,alignX:"stretch",children:e.jsx(T.DndContainer,{items:l,setItems:p,renderDragOverlay:I,children:e.jsx(u.Container,{children:e.jsxs(u.ColumnGroupsGrid,{columns:2,spacing:"xl",children:[e.jsx(S.ColumnGroup,{id:s.ColumnGroupIds.Visible,title:"Shown columns:",columns:v}),e.jsx(u.VerticalSeparator,{children:e.jsx(u.VerticalText,{children:"Drag & Drop columns"})}),e.jsx(S.ColumnGroup,{id:s.ColumnGroupIds.Hidden,title:"Hidden columns:",columns:f})]})})})})})})};exports.TableManagementModal=Y;
|
package/dist/index77.js
CHANGED
|
@@ -2,14 +2,14 @@ import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { Modal as O, Stack as m, Text as d, Button as X, Anchor as Y } from "@veeqo/ui";
|
|
3
3
|
import { useState as h, useMemo as u, useCallback as C } from "react";
|
|
4
4
|
import { VeeqoCommon as A } from "@veeqo/components";
|
|
5
|
-
import { ColumnGroup as w } from "./
|
|
6
|
-
import { Container as $, ColumnGroupsGrid as j, VerticalSeparator as q, VerticalText as z, HeaderContainer as B, ColumnSearch as L } from "./
|
|
7
|
-
import { DndContainer as Q } from "./
|
|
8
|
-
import { ColumnItem as R } from "./
|
|
9
|
-
import { ColumnGroupIds as n } from "./
|
|
5
|
+
import { ColumnGroup as w } from "./index80.js";
|
|
6
|
+
import { Container as $, ColumnGroupsGrid as j, VerticalSeparator as q, VerticalText as z, HeaderContainer as B, ColumnSearch as L } from "./index81.js";
|
|
7
|
+
import { DndContainer as Q } from "./index82.js";
|
|
8
|
+
import { ColumnItem as R } from "./index83.js";
|
|
9
|
+
import { ColumnGroupIds as n } from "./index84.js";
|
|
10
10
|
import { TableManagementGlyph as F } from "./index78.js";
|
|
11
|
-
import { usePersistColumns as N } from "./
|
|
12
|
-
import { filterColumnsBySearch as V } from "./
|
|
11
|
+
import { usePersistColumns as N } from "./index85.js";
|
|
12
|
+
import { filterColumnsBySearch as V } from "./index86.js";
|
|
13
13
|
import { useStores as P } from "./index57.js";
|
|
14
14
|
import { useViews as _ } from "./index58.js";
|
|
15
15
|
const { Glyph: E } = A, ce = ({
|