@veeqo/transfigure 0.0.35 → 0.0.36
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/components/RefreshButton/styled.d.ts +1 -0
- package/dist/index100.cjs +12 -1
- package/dist/index100.js +16 -11
- package/dist/index101.cjs +80 -1
- package/dist/index101.js +101 -24
- package/dist/index103.cjs +1 -13
- package/dist/index103.js +33 -14
- package/dist/index104.cjs +13 -1
- package/dist/index104.js +15 -24
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +2 -2
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +1 -1
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +22 -32
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +62 -41
- package/dist/index111.cjs +7 -1
- package/dist/index111.js +10 -63
- package/dist/index113.cjs +1 -7
- package/dist/index113.js +42 -10
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +4 -4
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +2 -2
- 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/index40.cjs +1 -1
- package/dist/index40.js +1 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +30 -29
- package/dist/index81.cjs +1 -8
- package/dist/index81.js +143 -12
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +18 -40
- package/dist/index83.cjs +11 -1
- package/dist/index83.js +16 -9
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +39 -141
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +7 -17
- package/dist/index86.cjs +1 -19
- package/dist/index86.js +24 -24
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +31 -19
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +29 -33
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +21 -29
- package/dist/index90.cjs +19 -1
- package/dist/index90.js +24 -18
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +1 -1
- package/dist/index92.cjs +1 -12
- package/dist/index92.js +13 -16
- package/dist/index93.cjs +95 -71
- package/dist/index93.js +110 -91
- 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 +1 -1
- package/dist/index99.js +16 -39
- package/package.json +1 -1
package/dist/index111.js
CHANGED
|
@@ -1,65 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (!Array.isArray(n) || n.length !== 2 || !t) return;
|
|
11
|
-
const [r, y] = n, m = t == null ? void 0 : t.clone();
|
|
12
|
-
m.setGte(r), m.setLte(y), l(m);
|
|
13
|
-
}, o = {
|
|
14
|
-
gte: (t == null ? void 0 : t.gte) || 0,
|
|
15
|
-
lte: (t == null ? void 0 : t.lte) || 100
|
|
16
|
-
}, M = (e) => {
|
|
17
|
-
if (!t) return;
|
|
18
|
-
const n = t.clone(), r = Number(e);
|
|
19
|
-
r > n.lteMax || (r >= n.gteMin && r <= n.lteMax && n.setGte(r), (!n.lte || r >= n.lte) && n.setLte(n.lteMax), l(n));
|
|
20
|
-
}, v = (e) => {
|
|
21
|
-
if (!t) return;
|
|
22
|
-
const n = t.clone(), r = Number(e);
|
|
23
|
-
r < n.gteMin || (r >= n.gteMin && r <= n.lteMax && n.setLte(r), (!n.gte || r <= n.gte) && n.setGte(n.gteMin), l(n));
|
|
24
|
-
}, C = [o.gte, o.lte];
|
|
25
|
-
return /* @__PURE__ */ b(h, { spacing: "xs", alignX: "stretch", children: [
|
|
26
|
-
/* @__PURE__ */ b(h, { direction: "horizontal", children: [
|
|
27
|
-
/* @__PURE__ */ a(
|
|
28
|
-
u,
|
|
29
|
-
{
|
|
30
|
-
label: i.label,
|
|
31
|
-
type: "number",
|
|
32
|
-
min: s,
|
|
33
|
-
max: c,
|
|
34
|
-
value: o.gte.toString(),
|
|
35
|
-
onChange: M
|
|
36
|
-
}
|
|
37
|
-
),
|
|
38
|
-
/* @__PURE__ */ a(
|
|
39
|
-
u,
|
|
40
|
-
{
|
|
41
|
-
label: x.label,
|
|
42
|
-
type: "number",
|
|
43
|
-
min: s,
|
|
44
|
-
max: c,
|
|
45
|
-
value: o.lte.toString(),
|
|
46
|
-
onChange: v
|
|
47
|
-
}
|
|
48
|
-
)
|
|
49
|
-
] }),
|
|
50
|
-
/* @__PURE__ */ a(
|
|
51
|
-
L,
|
|
52
|
-
{
|
|
53
|
-
value: C,
|
|
54
|
-
onChange: p,
|
|
55
|
-
min: s,
|
|
56
|
-
max: c,
|
|
57
|
-
valueLabelDisplay: "auto"
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
] });
|
|
61
|
-
}
|
|
62
|
-
);
|
|
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
|
+
`;
|
|
63
10
|
export {
|
|
64
|
-
|
|
11
|
+
h as AdaptiveStyledContainer
|
|
65
12
|
};
|
package/dist/index113.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/index113.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/index20.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),d=require("mobx-react"),l=require("@veeqo/ui"),m=require("./index66.cjs"),R=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),d=require("mobx-react"),l=require("@veeqo/ui"),m=require("./index66.cjs"),R=require("./index110.cjs"),v=require("./index59.cjs"),N=require("./index22.cjs"),q=require("./index23.cjs"),A=d.observer(({filterData:t})=>{const{Filters:{numberRangeFilters:u,clearNumberRangeFilter:a,setNumberRangeFilter:g}}=v.useStores(),e=u.get(t.id),[n,c]=s.useState(e),o=s.useCallback(()=>{const r=new m.NumberRangeFilter({filterId:t.id});return e&&(e.gte&&r.setGte(e.gte),e.lte&&r.setLte(e.lte)),r},[t.id,e]);s.useEffect(()=>{const r=o();c(r)},[o,e]);const F=()=>{a(t.id)},b=()=>{!e||!n||g({numberRange:e,lte:n.lte,gte:n.gte})};return i.jsx(l.FilterTag,{shouldCloseOnClickAway:!0,header:i.jsx(q.ActiveFilterHeader,{filterLabel:t.label,glyph:t.glyph}),label:t.label,text:(e==null?void 0:e.filterLabel)||"Loading...",content:i.jsx(l.BaseContainer,{style:{padding:l.theme.sizes.md},children:i.jsx(R.FilterNumberRangeFilter,{data:t,editedValue:n,setEditedValue:c})}),footer:i.jsx(N.ActiveFilterFooter,{clearActiveFilter:F,applyActiveFilter:b})})});exports.ActiveFilterNumberRangeTag=A;
|
package/dist/index20.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useState as a, useCallback as d, useEffect as F } from "react";
|
|
|
3
3
|
import { observer as b } from "mobx-react";
|
|
4
4
|
import { FilterTag as p, BaseContainer as f, theme as R } from "@veeqo/ui";
|
|
5
5
|
import { NumberRangeFilter as N } from "./index66.js";
|
|
6
|
-
import { FilterNumberRangeFilter as h } from "./
|
|
6
|
+
import { FilterNumberRangeFilter as h } from "./index110.js";
|
|
7
7
|
import { useStores as v } from "./index59.js";
|
|
8
8
|
import { ActiveFilterFooter as A } from "./index22.js";
|
|
9
9
|
import { ActiveFilterHeader as w } from "./index23.js";
|
package/dist/index29.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),R=require("react"),_=require("mobx-react"),j=require("lodash/debounce"),o=require("@veeqo/ui"),L=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),R=require("react"),_=require("mobx-react"),j=require("lodash/debounce"),o=require("@veeqo/ui"),L=require("./index103.cjs"),d=require("./index66.cjs"),p=require("./index7.cjs"),y=require("./index59.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),[r,g]=R.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 d.NumberRangeFilter({filterId:i.id});return u.set(i.id,l),l},c=R.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 d.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=[r.gte,r.lte];return a.jsxs(o.Stack,{spacing:"xs",alignX:"stretch",children:[a.jsx(o.Button,{variant:"link",onClick:h,children:"Clear"}),a.jsxs(o.Stack,{direction:"horizontal",children:[a.jsx(o.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:r.gte.toString(),onChange:N}),a.jsx(o.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:r.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/index29.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 "./index103.js";
|
|
7
7
|
import { NumberRangeFilter as h } from "./index66.js";
|
|
8
8
|
import { useBusinessLogic as B } from "./index7.js";
|
|
9
9
|
import { useStores as T } from "./index59.js";
|
package/dist/index31.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("mobx-react"),s=require("@veeqo/ui"),i=require("@veeqo/components"),l=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("mobx-react"),s=require("@veeqo/ui"),i=require("@veeqo/components"),l=require("./index59.cjs"),n=require("./index32.cjs"),{Glyph:d}=i.VeeqoCommon,c=t.observer(()=>{const{Filters:{isFiltersDropdownVisible:o,toggleFiltersDropdownVisible:r}}=l.useStores();return e.jsx(s.Dropdown,{id:"filters-dropdown",ctaProps:{iconSlot:e.jsx(d,{name:"filter"}),children:"Filters",loading:!1,disabled:!1,className:"act-toggle-filter",style:{borderRadius:s.theme.radius.base}},style:{padding:0},shouldShow:o,setShouldShow:r,children:e.jsx(n.FiltersList,{})})});exports.FiltersDropdown=c;
|
package/dist/index31.js
CHANGED
|
@@ -2,12 +2,12 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { observer as s } from "mobx-react";
|
|
3
3
|
import { Dropdown as t, theme as i } from "@veeqo/ui";
|
|
4
4
|
import { VeeqoCommon as l } from "@veeqo/components";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useStores as d } from "./index59.js";
|
|
6
|
+
import { FiltersList as m } from "./index32.js";
|
|
7
7
|
const { Glyph: n } = l, b = s(() => {
|
|
8
8
|
const {
|
|
9
9
|
Filters: { isFiltersDropdownVisible: r, toggleFiltersDropdownVisible: e }
|
|
10
|
-
} =
|
|
10
|
+
} = d();
|
|
11
11
|
return /* @__PURE__ */ o(
|
|
12
12
|
t,
|
|
13
13
|
{
|
|
@@ -27,7 +27,7 @@ const { Glyph: n } = l, b = s(() => {
|
|
|
27
27
|
},
|
|
28
28
|
shouldShow: r,
|
|
29
29
|
setShouldShow: e,
|
|
30
|
-
children: /* @__PURE__ */ o(
|
|
30
|
+
children: /* @__PURE__ */ o(m, {})
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
});
|
package/dist/index32.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("./index86.cjs"),c=require("./index33.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/index32.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 "./index86.js";
|
|
6
6
|
import { FilterGroup as n } from "./index33.js";
|
|
7
7
|
const u = e(() => {
|
|
8
8
|
const { GROUP_MAP: t } = s();
|
package/dist/index34.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),a=require("@veeqo/ui"),W=require("mobx-react"),Y=require("./index62.cjs"),z=require("./index60.cjs"),G=require("./index38.cjs"),J=require("./index41.cjs"),K=require("./index54.cjs"),Q=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),a=require("@veeqo/ui"),W=require("mobx-react"),Y=require("./index62.cjs"),z=require("./index60.cjs"),G=require("./index38.cjs"),J=require("./index41.cjs"),K=require("./index54.cjs"),Q=require("./index87.cjs"),X=require("./index7.cjs"),Z=require("./index59.cjs"),$=require("./index88.cjs"),b=W.observer(({view:e})=>{const{VIEW_TYPE:S,SEARCH_FILTER_ID:l}=X.useBusinessLogic(),{Filters:{activeViewId:d,initFiltersFromView:w,discardChanges:f,initFromUrl:m,filters:x,setFilter:L},Views:{draftViewsMap:y},Notifications:{notify:T}}=Z.useStores(),{viewsMap:V,defaultCustomViewId:F,isLoading:j}=z.useViews(),{isLoading:N}=Y.useCustomViews({type:S}),{viewCounts:E,isLoadingViewCounts:M}=Q.useViewCounts(e.id),[s,R]=c.useState(null),k=o=>{const q=x.get(l);if(V.has(o)){const n=V.get(o);n&&(w(n),f(!0),m())}else{const n=y.get(o);n?(w(n),f(!0),m()):T({type:"error",text:"Failed to load view"})}q&&L(l,q)},r=(e==null?void 0:e.id)===d,t=e.originalView!==void 0,h=e.originalView===void 0,P=E,u=(e==null?void 0:e.label)||"",A=j||N,g=c.useRef(!1);!A&&!g.current&&r&&e.id===F&&s&&(g.current=!0,s&&d===e.id&&window.requestAnimationFrame(()=>{var o;(o=s.parentElement)==null||o.scrollBy({behavior:"smooth",left:s.offsetLeft})}));const p=c.useMemo(()=>t?"draft":e.editable?"saved":"fixed",[t,e.editable]),{actions:{create:{handleSaveDraft:B},menu:{toggleDropdown:C},delete:{closeDeleteConfirmation:I,handleDelete:_,handleDeleteDraftView:D}},state:{shouldShowDeleteConfirmation:H},actions:O,state:v}=K.useDropdownManager(e),U=c.useMemo(()=>{if(h)return C;if(t)return D},[D,t,h,C]);return i.jsxs(i.Fragment,{children:[i.jsx(a.ViewTab,{colourPalette:a.theme.colors.secondary.blue,className:"act-react-listing-custom-view",active:r,id:e==null?void 0:e.id,name:u,type:p,count:M?i.jsx(a.Loader,{type:"ThreeDots",width:12,height:12,color:r?"#fff":a.theme.colors.neutral.ink.dark}):P,onClick:k,subAction:U,ariaContext:"orders",ref:R,"aria-controls":"options-dropdown","aria-expanded":v.shouldShowDropdown,"aria-haspopup":"dialog"},e==null?void 0:e.id),i.jsx($.Confirmation,{shouldShow:H,viewName:u,onCancel:I,onDelete:_}),i.jsx(G.PillNotifications,{tabType:p,isActive:r,initialViewName:u,shouldShowCreateViewNotification:t,handleSaveDraft:B}),i.jsx(J.ViewDropdowns,{referenceElement:s,tab:e,...O,...v})]})});exports.ViewTab=b;
|
package/dist/index34.js
CHANGED
|
@@ -7,10 +7,10 @@ import { useViews as X } from "./index60.js";
|
|
|
7
7
|
import { PillNotifications as Z } from "./index38.js";
|
|
8
8
|
import { ViewDropdowns as b } from "./index41.js";
|
|
9
9
|
import { useDropdownManager as ee } from "./index54.js";
|
|
10
|
-
import { useViewCounts as oe } from "./
|
|
10
|
+
import { useViewCounts as oe } from "./index87.js";
|
|
11
11
|
import { useBusinessLogic as ie } from "./index7.js";
|
|
12
12
|
import { useStores as te } from "./index59.js";
|
|
13
|
-
import { Confirmation as re } from "./
|
|
13
|
+
import { Confirmation as re } from "./index88.js";
|
|
14
14
|
const ge = K(({ view: e }) => {
|
|
15
15
|
const { VIEW_TYPE: S, SEARCH_FILTER_ID: l } = ie(), {
|
|
16
16
|
Filters: { activeViewId: c, initFiltersFromView: d, discardChanges: f, initFromUrl: m, filters: F, setFilter: T },
|
package/dist/index37.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("./index90.cjs"),g=require("./index50.cjs"),j=require("./index49.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/index37.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 "./index90.js";
|
|
3
3
|
import { useModal as k } from "./index50.js";
|
|
4
4
|
import { ModalId as T } from "./index49.js";
|
|
5
5
|
const N = ({
|
package/dist/index38.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("./index60.cjs"),o=require("framer-motion"),m=require("./index59.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("./index60.cjs"),o=require("framer-motion"),m=require("./index59.cjs"),v=require("./index89.cjs"),f=require("./index40.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/index38.js
CHANGED
|
@@ -3,7 +3,7 @@ import { observer as h } from "mobx-react";
|
|
|
3
3
|
import { useViews as v } from "./index60.js";
|
|
4
4
|
import { AnimatePresence as n } from "framer-motion";
|
|
5
5
|
import { useStores as g } from "./index59.js";
|
|
6
|
-
import { DraftPill as w } from "./
|
|
6
|
+
import { DraftPill as w } from "./index89.js";
|
|
7
7
|
import { UnsavedChangesPill as C } from "./index40.js";
|
|
8
8
|
const U = h(
|
|
9
9
|
({
|
package/dist/index40.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("@veeqo/ui"),c=require("mobx-react"),l=require("./index58.cjs"),n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("@veeqo/ui"),c=require("mobx-react"),l=require("./index58.cjs"),n=require("./index101.cjs"),d=i.theme.colors.secondary.blue.base,h=c.observer(({onDiscard:r,viewName:s,onSaveDraft:a})=>{const{saveChanges:o,isSubmitting:t}=l.usePersistUnsavedChanges();return e.jsx(n.Notification,{children:e.jsx(n.Container,{children:e.jsxs(i.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(n.Glyph,{ariaLabel:"attention",name:"attention",color:d}),e.jsxs(n.Wrap,{children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"You have unsaved changes to"}),s&&e.jsxs(n.Bold,{variant:"bodyBoldDark",children:["'",s,"'"]})]}),e.jsx(i.Button,{onClick:r,size:"sm",children:"Discard changes"}),e.jsxs(i.ActionMenu,{ctaProps:{children:"Save changes",variant:"primary"},children:[e.jsx(i.ActionMenu.Item,{onAction:a,isDisabled:t,children:e.jsx(n.Text,{variant:"body",children:"Create new view"})}),e.jsx(i.ActionMenu.Item,{onAction:o,isDisabled:t,children:e.jsxs(i.Stack,{direction:"horizontal",spacing:1,alignY:"center",children:[e.jsx(n.Text,{variant:"body",children:"Save changes to"}),e.jsx(n.Text,{variant:"bodyBold",children:s})]})})]})]})})})});exports.UnsavedChangesPill=h;
|
package/dist/index40.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { Stack as t, theme as d, Button as h, ActionMenu as o } from "@veeqo/ui";
|
|
3
3
|
import { observer as m } from "mobx-react";
|
|
4
4
|
import { usePersistUnsavedChanges as v } from "./index58.js";
|
|
5
|
-
import { Notification as b, Container as g, Glyph as p, Wrap as u, Text as i, Bold as y } from "./
|
|
5
|
+
import { Notification as b, Container as g, Glyph as p, Wrap as u, Text as i, Bold as y } from "./index101.js";
|
|
6
6
|
const C = d.colors.secondary.blue.base, k = m(({
|
|
7
7
|
onDiscard: c,
|
|
8
8
|
viewName: r,
|
package/dist/index42.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("./index100.cjs"),j=require("./index39.cjs"),m=require("./index60.cjs"),S=require("./index61.cjs"),q=require("./index35.cjs"),u=require("./index34.cjs"),p=require("./index59.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/index42.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 "./index100.js";
|
|
6
6
|
import { SortableViews as b } from "./index39.js";
|
|
7
7
|
import { useViews as A } from "./index60.js";
|
|
8
8
|
import { useViewUrlChange as L } from "./index61.js";
|
package/dist/index44.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),N=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),N=require("./index81.cjs"),b=require("@veeqo/ui"),_=require("./index82.cjs"),j=require("mobx-react"),y=require("./index7.cjs"),B=require("./index50.cjs"),I=require("./index59.cjs"),O=require("./index60.cjs"),g=require("./index49.cjs"),w=j.observer(({columnDefinitions:T,pinnedRightColumnIds:i=[],pinnedLeftColumnIds:a=[]})=>{var M;const{DEFAULT_HIDDEN_COLUMNS:E,DEFAULT_VISIBLE_COLUMNS:p}=y.useBusinessLogic(),n=[...a,...i],l=E.filter(s=>!n.includes(s)),c=p.filter(s=>!n.includes(s)),S=[...l,...c],{closeModal:f,isModalOpen:h,openModal:q}=B.useModal(),{Filters:{activeViewId:t},Views:{draftViewsMap:A}}=I.useStores(),{viewsMap:D,isLoading:x}=O.useViews();if(!t||x)return null;const e=D.get(t),r=Array.isArray((M=e==null?void 0:e.columns)==null?void 0:M.columnIds),u=r?e.columns.columnIds.filter(s=>!n.includes(s)):c,L=r?S.filter(s=>!u.includes(s)):l,d=A.has(t),m=!(e!=null&&e.editable),v=m||d,C=d?"Please create a view to use table management":m?"Please choose a custom view to use table management":"Table management";return o.jsxs(o.Fragment,{children:[o.jsx(b.Tooltip,{text:C,children:o.jsx(b.Button,{"aria-label":"Open table management",onClick:()=>q(g.ModalId.ORDERS_TABLE_MANAGEMENT),size:"sm",iconSlot:o.jsx(_.TableManagementGlyph,{}),disabled:v})}),h(g.ModalId.ORDERS_TABLE_MANAGEMENT)&&o.jsx(N.TableManagementModal,{pinnedRightColumnIds:i,pinnedLeftColumnIds:a,visibleColumns:u,hiddenColumns:L,columnDefintions:T,onClose:f})]})});exports.TableManagement=w;
|
package/dist/index44.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as v, Fragment as B, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { TableManagementModal as O } from "./
|
|
2
|
+
import { TableManagementModal as O } from "./index81.js";
|
|
3
3
|
import { Tooltip as w, Button as x } from "@veeqo/ui";
|
|
4
|
-
import { TableManagementGlyph as F } from "./
|
|
4
|
+
import { TableManagementGlyph as F } from "./index82.js";
|
|
5
5
|
import { observer as I } from "mobx-react";
|
|
6
6
|
import { useBusinessLogic as y } from "./index7.js";
|
|
7
7
|
import { useModal as P } from "./index50.js";
|
package/dist/index45.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index83.cjs"),c=require("./index84.cjs"),h=require("./index85.cjs"),f=require("./index59.cjs"),y=({isLoading:o,refetch:a,trackMetricClick:t,tooltipText:n="Refresh data",buttonProps:l={size:"sm",variant:"default"}})=>{const{hasChanges:r,acknowledgeButtonClick:i}=c.usePollData(),{Notifications:{notify:u}}=f.useStores(),d=async()=>{try{await a(),await i(),t==null||t()}catch{u({type:"error",text:"Failed to refresh data"})}};return e.jsxs(s.StyledTooltip,{text:n,children:[e.jsx(s.StyledButton,{onClick:d,loading:o,disabled:o,iconSlot:e.jsx(h.RefreshIcon,{}),"aria-label":r?"refresh table with changes":"refresh table","aria-live":"polite",...l}),e.jsx(s.StyledIndicator,{color:"red",size:"xs",style:{opacity:r?1:0}})]})};exports.RefreshButton=y;
|
package/dist/index45.js
CHANGED
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { RefreshIcon as p } from "./index83.js";
|
|
1
|
+
import { jsxs as f, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { StyledTooltip as h, StyledButton as d, StyledIndicator as m } from "./index83.js";
|
|
3
|
+
import { usePollData as p } from "./index84.js";
|
|
4
|
+
import { RefreshIcon as y } from "./index85.js";
|
|
6
5
|
import { useStores as c } from "./index59.js";
|
|
7
|
-
const
|
|
8
|
-
isLoading:
|
|
6
|
+
const B = ({
|
|
7
|
+
isLoading: o,
|
|
9
8
|
refetch: s,
|
|
10
|
-
trackMetricClick:
|
|
9
|
+
trackMetricClick: e,
|
|
11
10
|
tooltipText: a = "Refresh data",
|
|
12
11
|
buttonProps: n = {
|
|
13
12
|
size: "sm",
|
|
14
13
|
variant: "default"
|
|
15
14
|
}
|
|
16
15
|
}) => {
|
|
17
|
-
const { hasChanges: r, acknowledgeButtonClick: i } =
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
16
|
+
const { hasChanges: r, acknowledgeButtonClick: i } = p(), { Notifications: { notify: l } } = c();
|
|
17
|
+
return /* @__PURE__ */ f(h, { text: a, children: [
|
|
18
|
+
/* @__PURE__ */ t(
|
|
19
|
+
d,
|
|
20
|
+
{
|
|
21
|
+
onClick: async () => {
|
|
22
|
+
try {
|
|
23
|
+
await s(), await i(), e == null || e();
|
|
24
|
+
} catch {
|
|
25
|
+
l({ type: "error", text: "Failed to refresh data" });
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
loading: o,
|
|
29
|
+
disabled: o,
|
|
30
|
+
iconSlot: /* @__PURE__ */ t(y, {}),
|
|
31
|
+
"aria-label": r ? "refresh table with changes" : "refresh table",
|
|
32
|
+
"aria-live": "polite",
|
|
33
|
+
...n
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ t(m, { color: "red", size: "xs", style: { opacity: r ? 1 : 0 } })
|
|
37
|
+
] });
|
|
37
38
|
};
|
|
38
39
|
export {
|
|
39
|
-
|
|
40
|
+
B as RefreshButton
|
|
40
41
|
};
|
package/dist/index81.cjs
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
padding-right: ${t.theme.sizes.sm};
|
|
3
|
-
`,n=s.default(t.Indicator)`
|
|
4
|
-
height: ${t.theme.sizes[3]};
|
|
5
|
-
min-width: ${t.theme.sizes[3]};
|
|
6
|
-
top: -${t.theme.sizes.xs};
|
|
7
|
-
right: -${t.theme.sizes.xs};
|
|
8
|
-
`;exports.StyledButton=o;exports.StyledIndicator=n;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("@veeqo/ui"),s=require("react"),w=require("@veeqo/components"),S=require("./index92.cjs"),i=require("./index93.cjs"),T=require("./index94.cjs"),V=require("./index95.cjs"),n=require("./index96.cjs"),D=require("./index82.cjs"),H=require("./index97.cjs"),j=require("./index98.cjs"),{Glyph:O}=w.VeeqoCommon,$=({onClose:u,columnDefintions:G,hiddenColumns:d,visibleColumns:m,pinnedLeftColumnIds:y,pinnedRightColumnIds:f})=>{const[c,p]=s.useState(""),a=s.useMemo(()=>new Map(G.map(r=>[r.id,r])),[]),[o,g]=s.useState(()=>({[n.ColumnGroupIds.Hidden]:d,[n.ColumnGroupIds.Visible]:m})),I=s.useMemo(()=>{const r=o[n.ColumnGroupIds.Visible].map(t=>a.get(`${t}`));return j.filterColumnsBySearch(r,c)},[o,a,c]),v=s.useMemo(()=>{const r=o[n.ColumnGroupIds.Hidden].map(t=>a.get(`${t}`));return j.filterColumnsBySearch(r,c)},[o,a,c]),{isSavingColumns:h,saveColumns:M}=H.usePersistColumns({pinnedLeftColumnIds:y,pinnedRightColumnIds:f}),q=()=>{p(""),g({[n.ColumnGroupIds.Hidden]:d,[n.ColumnGroupIds.Visible]:m})},x=s.useCallback(r=>{if(p(r),!r){const t=new Set([...d,...m]);g(b=>({[n.ColumnGroupIds.Hidden]:b[n.ColumnGroupIds.Hidden].filter(C=>t.has(`${C}`)),[n.ColumnGroupIds.Visible]:b[n.ColumnGroupIds.Visible].filter(C=>t.has(`${C}`))}))}},[d,m]),k=s.useCallback(r=>{const t=a.get(`${r}`);return t?e.jsx(V.ColumnItem,{column:t,isDragOverlay:!0}):null},[a]);return e.jsx(l.Modal,{variant:"lg",style:{overflowY:"hidden"},shouldShow:!0,onClose:()=>u==null?void 0:u(),headerSlot:e.jsxs(i.HeaderContainer,{children:[e.jsxs(l.Stack,{direction:"horizontal",alignX:"between",alignY:"center",children:[e.jsxs(l.Stack,{direction:"horizontal",alignX:"start",alignY:"center",spacing:"sm",children:[e.jsx(D.TableManagementGlyph,{height:32,width:32}),e.jsx(l.Text,{variant:"headingLarge",as:"h1",children:"Table management"})]}),e.jsx(l.Button,{"aria-label":"Close modal",onClick:u,variant:"flat",iconSlot:e.jsx(O,{name:"close"})})]}),e.jsxs(l.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(l.Anchor,{href:"#",target:"_blank",children:"help guide (TODO)"}),"."]}),e.jsx(l.Text,{variant:"headingSmall",children:"Column management"}),e.jsx(i.ColumnSearch,{name:"column-search-query",placeholder:"Search",value:c,onChange:x,onClearClick:()=>x(""),fill:"100%"})]}),leftActions:[{label:"Reset",onClick:q,variant:"default",disabled:h}],rightActions:[{label:"Cancel",onClick:u,variant:"default",disabled:h},{label:"Save",onClick:()=>M({visibleColumns:o[n.ColumnGroupIds.Visible]}),variant:"primary",disabled:h,loading:h}],children:e.jsx(l.Stack,{spacing:"md",alignX:"stretch",children:e.jsx(l.Stack,{spacing:4,alignX:"stretch",children:e.jsx(T.DndContainer,{items:o,setItems:g,renderDragOverlay:k,children:e.jsx(i.Container,{children:e.jsxs(i.ColumnGroupsGrid,{columns:2,spacing:"xl",children:[e.jsx(S.ColumnGroup,{id:n.ColumnGroupIds.Visible,title:"Shown columns:",columns:I}),e.jsx(i.VerticalSeparator,{children:e.jsx(i.VerticalText,{children:"Drag & Drop columns"})}),e.jsx(S.ColumnGroup,{id:n.ColumnGroupIds.Hidden,title:"Hidden columns:",columns:v})]})})})})})})};exports.TableManagementModal=$;
|
package/dist/index81.js
CHANGED
|
@@ -1,14 +1,145 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Modal as O, Stack as h, Text as p, Button as X, Anchor as A } from "@veeqo/ui";
|
|
3
|
+
import { useState as v, useMemo as f, useCallback as y } from "react";
|
|
4
|
+
import { VeeqoCommon as I } from "@veeqo/components";
|
|
5
|
+
import { ColumnGroup as w } from "./index92.js";
|
|
6
|
+
import { Container as Y, ColumnGroupsGrid as j, VerticalSeparator as z, VerticalText as B, HeaderContainer as L, ColumnSearch as Q } from "./index93.js";
|
|
7
|
+
import { DndContainer as R } from "./index94.js";
|
|
8
|
+
import { ColumnItem as q } from "./index95.js";
|
|
9
|
+
import { ColumnGroupIds as n } from "./index96.js";
|
|
10
|
+
import { TableManagementGlyph as P } from "./index82.js";
|
|
11
|
+
import { usePersistColumns as _ } from "./index97.js";
|
|
12
|
+
import { filterColumnsBySearch as V } from "./index98.js";
|
|
13
|
+
const { Glyph: E } = I, te = ({
|
|
14
|
+
onClose: l,
|
|
15
|
+
columnDefintions: k,
|
|
16
|
+
hiddenColumns: s,
|
|
17
|
+
visibleColumns: m,
|
|
18
|
+
pinnedLeftColumnIds: D,
|
|
19
|
+
pinnedRightColumnIds: H
|
|
20
|
+
}) => {
|
|
21
|
+
const [o, b] = v(""), i = f(
|
|
22
|
+
() => new Map(k.map((a) => [a.id, a])),
|
|
23
|
+
[]
|
|
24
|
+
), [t, u] = v(() => ({
|
|
25
|
+
[n.Hidden]: s,
|
|
26
|
+
[n.Visible]: m
|
|
27
|
+
})), M = f(() => {
|
|
28
|
+
const a = t[n.Visible].map((r) => i.get(`${r}`));
|
|
29
|
+
return V(a, o);
|
|
30
|
+
}, [t, i, o]), x = f(() => {
|
|
31
|
+
const a = t[n.Hidden].map((r) => i.get(`${r}`));
|
|
32
|
+
return V(a, o);
|
|
33
|
+
}, [t, i, o]), { isSavingColumns: d, saveColumns: G } = _({ pinnedLeftColumnIds: D, pinnedRightColumnIds: H }), T = () => {
|
|
34
|
+
b(""), u({
|
|
35
|
+
[n.Hidden]: s,
|
|
36
|
+
[n.Visible]: m
|
|
37
|
+
});
|
|
38
|
+
}, C = y(
|
|
39
|
+
(a) => {
|
|
40
|
+
if (b(a), !a) {
|
|
41
|
+
const r = /* @__PURE__ */ new Set([...s, ...m]);
|
|
42
|
+
u((S) => ({
|
|
43
|
+
[n.Hidden]: S[n.Hidden].filter((g) => r.has(`${g}`)),
|
|
44
|
+
[n.Visible]: S[n.Visible].filter((g) => r.has(`${g}`))
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
[s, m]
|
|
49
|
+
), $ = y(
|
|
50
|
+
(a) => {
|
|
51
|
+
const r = i.get(`${a}`);
|
|
52
|
+
return r ? /* @__PURE__ */ e(q, { column: r, isDragOverlay: !0 }) : null;
|
|
53
|
+
},
|
|
54
|
+
[i]
|
|
55
|
+
);
|
|
56
|
+
return /* @__PURE__ */ e(
|
|
57
|
+
O,
|
|
58
|
+
{
|
|
59
|
+
variant: "lg",
|
|
60
|
+
style: { overflowY: "hidden" },
|
|
61
|
+
shouldShow: !0,
|
|
62
|
+
onClose: () => l == null ? void 0 : l(),
|
|
63
|
+
headerSlot: /* @__PURE__ */ c(L, { children: [
|
|
64
|
+
/* @__PURE__ */ c(h, { direction: "horizontal", alignX: "between", alignY: "center", children: [
|
|
65
|
+
/* @__PURE__ */ c(h, { direction: "horizontal", alignX: "start", alignY: "center", spacing: "sm", children: [
|
|
66
|
+
/* @__PURE__ */ e(P, { height: 32, width: 32 }),
|
|
67
|
+
/* @__PURE__ */ e(p, { variant: "headingLarge", as: "h1", children: "Table management" })
|
|
68
|
+
] }),
|
|
69
|
+
/* @__PURE__ */ e(
|
|
70
|
+
X,
|
|
71
|
+
{
|
|
72
|
+
"aria-label": "Close modal",
|
|
73
|
+
onClick: l,
|
|
74
|
+
variant: "flat",
|
|
75
|
+
iconSlot: /* @__PURE__ */ e(E, { name: "close" })
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
] }),
|
|
79
|
+
/* @__PURE__ */ c(p, { variant: "subheadingMedium", children: [
|
|
80
|
+
"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",
|
|
81
|
+
" ",
|
|
82
|
+
/* @__PURE__ */ e(A, { href: "#", target: "_blank", children: "help guide (TODO)" }),
|
|
83
|
+
"."
|
|
84
|
+
] }),
|
|
85
|
+
/* @__PURE__ */ e(p, { variant: "headingSmall", children: "Column management" }),
|
|
86
|
+
/* @__PURE__ */ e(
|
|
87
|
+
Q,
|
|
88
|
+
{
|
|
89
|
+
name: "column-search-query",
|
|
90
|
+
placeholder: "Search",
|
|
91
|
+
value: o,
|
|
92
|
+
onChange: C,
|
|
93
|
+
onClearClick: () => C(""),
|
|
94
|
+
fill: "100%"
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
] }),
|
|
98
|
+
leftActions: [
|
|
99
|
+
{
|
|
100
|
+
label: "Reset",
|
|
101
|
+
onClick: T,
|
|
102
|
+
variant: "default",
|
|
103
|
+
disabled: d
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
rightActions: [
|
|
107
|
+
{
|
|
108
|
+
label: "Cancel",
|
|
109
|
+
onClick: l,
|
|
110
|
+
variant: "default",
|
|
111
|
+
disabled: d
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
label: "Save",
|
|
115
|
+
onClick: () => G({ visibleColumns: t[n.Visible] }),
|
|
116
|
+
variant: "primary",
|
|
117
|
+
disabled: d,
|
|
118
|
+
loading: d
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
children: /* @__PURE__ */ e(h, { spacing: "md", alignX: "stretch", children: /* @__PURE__ */ e(h, { spacing: 4, alignX: "stretch", children: /* @__PURE__ */ e(R, { items: t, setItems: u, renderDragOverlay: $, children: /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ c(j, { columns: 2, spacing: "xl", children: [
|
|
122
|
+
/* @__PURE__ */ e(
|
|
123
|
+
w,
|
|
124
|
+
{
|
|
125
|
+
id: n.Visible,
|
|
126
|
+
title: "Shown columns:",
|
|
127
|
+
columns: M
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(B, { children: "Drag & Drop columns" }) }),
|
|
131
|
+
/* @__PURE__ */ e(
|
|
132
|
+
w,
|
|
133
|
+
{
|
|
134
|
+
id: n.Hidden,
|
|
135
|
+
title: "Hidden columns:",
|
|
136
|
+
columns: x
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
] }) }) }) }) })
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
};
|
|
11
143
|
export {
|
|
12
|
-
|
|
13
|
-
n as StyledIndicator
|
|
144
|
+
te as TableManagementModal
|
|
14
145
|
};
|