@veeqo/transfigure 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useUrlChange/index.d.ts +1 -0
- package/dist/hooks/useUrlChange/useUrlChange.d.ts +7 -0
- package/dist/hooks/useViewCountsHook/useViewCountsHook.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +52 -50
- package/dist/index100.cjs +1 -19
- package/dist/index100.js +28 -23
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +24 -2
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +1 -1
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +1 -1
- package/dist/index107.cjs +1 -13
- package/dist/index107.js +2 -17
- package/dist/index108.cjs +13 -1
- package/dist/index108.js +14 -33
- package/dist/index110.cjs +1 -7
- package/dist/index110.js +36 -10
- package/dist/index111.cjs +7 -1
- package/dist/index111.js +10 -63
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +58 -42
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +49 -0
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +1 -1
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +2 -2
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +2 -2
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +2 -2
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +2 -2
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +4 -4
- 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 +2 -2
- 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 +3 -3
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +3 -3
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +2 -2
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +2 -2
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +2 -2
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +4 -4
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +3 -3
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +2 -2
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +22 -18
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +16 -26
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +26 -10
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +13 -326
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +321 -55
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +50 -47
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +51 -32
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +30 -24
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +26 -32
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +37 -12
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +13 -9
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +9 -17
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +14 -16
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +18 -49
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +50 -21
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +21 -7
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +7 -2
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +2 -9
- package/dist/index80.cjs +1 -3
- package/dist/index80.js +8 -13
- package/dist/index81.cjs +3 -1
- package/dist/index81.js +13 -8
- package/dist/index82.cjs +1 -11
- package/dist/index82.js +9 -16
- package/dist/index83.cjs +11 -1
- package/dist/index83.js +16 -41
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +40 -8
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +9 -118
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +117 -18
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +19 -13
- package/dist/index88.cjs +1 -104
- package/dist/index88.js +13 -120
- package/dist/index89.cjs +104 -1
- package/dist/index89.js +117 -65
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +63 -24
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +29 -2
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +2 -41
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +39 -9
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +10 -23
- package/dist/index95.cjs +1 -12
- package/dist/index95.js +21 -16
- package/dist/index96.cjs +19 -1
- package/dist/index96.js +24 -33
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +12 -26
- package/dist/index98.cjs +12 -1
- package/dist/index98.js +16 -21
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +32 -14
- 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/index112.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("react/jsx-runtime"),p=require("mobx-react"),l=require("@veeqo/ui"),v=require("./index110.cjs"),y=p.observer(({data:m,editedValue:t,setEditedValue:c})=>{var b;if(!((b=m.options)!=null&&b.length))return null;const[u,x]=m.options,i=Number(u.value),a=Number(x.value),h=(s,n)=>{if(!Array.isArray(n)||n.length!==2||!t)return;const[e,j]=n,g=t==null?void 0:t.clone();g.setGte(e),g.setLte(j),c(g)},o={gte:(t==null?void 0:t.gte)||0,lte:(t==null?void 0:t.lte)||100},M=s=>{if(!t)return;const n=t.clone(),e=Number(s);e>n.lteMax||(e>=n.gteMin&&e<=n.lteMax&&n.setGte(e),(!n.lte||e>=n.lte)&&n.setLte(n.lteMax),c(n))},f=s=>{if(!t)return;const n=t.clone(),e=Number(s);e<n.gteMin||(e>=n.gteMin&&e<=n.lteMax&&n.setLte(e),(!n.gte||e<=n.gte)&&n.setGte(n.gteMin),c(n))},S=[o.gte,o.lte];return r.jsxs(l.Stack,{spacing:"xs",alignX:"stretch",children:[r.jsxs(l.Stack,{direction:"horizontal",children:[r.jsx(l.TextField,{label:u.label,type:"number",min:i,max:a,value:o.gte.toString(),onChange:M}),r.jsx(l.TextField,{label:x.label,type:"number",min:i,max:a,value:o.lte.toString(),onChange:f})]}),r.jsx(v.MUISlider,{value:S,onChange:h,min:i,max:a,valueLabelDisplay:"auto"})]})});exports.FilterNumberRangeFilter=y;
|
package/dist/index112.js
CHANGED
|
@@ -1,49 +1,65 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { jsxs as b, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { observer as N } from "mobx-react";
|
|
3
|
+
import { Stack as h, TextField as u } from "@veeqo/ui";
|
|
4
|
+
import { MUISlider as L } from "./index110.js";
|
|
5
|
+
const j = N(
|
|
6
|
+
({ data: g, editedValue: t, setEditedValue: l }) => {
|
|
7
|
+
var f;
|
|
8
|
+
if (!((f = g.options) != null && f.length)) return null;
|
|
9
|
+
const [i, x] = g.options, s = Number(i.value), c = Number(x.value), p = (e, n) => {
|
|
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,
|
|
23
52
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
53
|
+
value: C,
|
|
54
|
+
onChange: p,
|
|
55
|
+
min: s,
|
|
56
|
+
max: c,
|
|
57
|
+
valueLabelDisplay: "auto"
|
|
29
58
|
}
|
|
30
|
-
)
|
|
31
|
-
r && /* @__PURE__ */ n(
|
|
32
|
-
x,
|
|
33
|
-
{
|
|
34
|
-
width: "200px",
|
|
35
|
-
height: y.sizes[5],
|
|
36
|
-
"aria-busy": !0,
|
|
37
|
-
"aria-label": `Loading ${t.label} filters`
|
|
38
|
-
}
|
|
39
|
-
),
|
|
40
|
-
!r && f && /* @__PURE__ */ s(A, { variant: "errorSmall", children: [
|
|
41
|
-
"Error: failed to load filter for ",
|
|
42
|
-
t.label
|
|
43
|
-
] })
|
|
59
|
+
)
|
|
44
60
|
] });
|
|
45
61
|
}
|
|
46
62
|
);
|
|
47
63
|
export {
|
|
48
|
-
|
|
64
|
+
j as FilterNumberRangeFilter
|
|
49
65
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("react"),d=require("mobx-react"),t=require("@veeqo/ui"),m=require("swr/immutable"),x=require("./index73.cjs"),y=require("./index74.cjs"),F=require("./index47.cjs"),O=e=>e&&e.__esModule?e:{default:e},A=O(m),S=d.observer(({field:e,editedValue:o,setEditedValue:a})=>{var c,i;const l=p.useMemo(()=>{var r;return y.getFetcherFunction({fetcherName:(r=e.fetchAsyncFilterOptions)==null?void 0:r.fetcher})},[(c=e.fetchAsyncFilterOptions)==null?void 0:c.fetcher]),{isLoading:u,isValidating:h,data:g,error:b}=A.default((i=e.fetchAsyncFilterOptions)==null?void 0:i.URL,l,F.SWR_HOOK_OPTIONS),n=u||h,f=x.getAsyncOptions({data:g,config:e.fetchAsyncFilterOptions});return s.jsxs(t.Stack,{spacing:"xs",alignX:"stretch",children:[s.jsx(t.ChoiceList,{allowMultiple:!0,title:e.label,options:f,selected:o,onChange:r=>a(r)}),n&&s.jsx(t.Skeleton,{width:"200px",height:t.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!n&&b&&s.jsxs(t.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.ActiveAsyncCheckboxFilter=S;
|
package/dist/index113.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as u } from "react";
|
|
3
|
+
import { observer as O } from "mobx-react";
|
|
4
|
+
import { Stack as b, ChoiceList as F, Skeleton as x, theme as y, Text as A } from "@veeqo/ui";
|
|
5
|
+
import S from "swr/immutable";
|
|
6
|
+
import { getAsyncOptions as d } from "./index73.js";
|
|
7
|
+
import { getFetcherFunction as L } from "./index74.js";
|
|
8
|
+
import { SWR_HOOK_OPTIONS as k } from "./index47.js";
|
|
9
|
+
const T = O(
|
|
10
|
+
({ field: t, editedValue: c, setEditedValue: a }) => {
|
|
11
|
+
var o, i;
|
|
12
|
+
const l = u(() => {
|
|
13
|
+
var e;
|
|
14
|
+
return L({ fetcherName: (e = t.fetchAsyncFilterOptions) == null ? void 0 : e.fetcher });
|
|
15
|
+
}, [(o = t.fetchAsyncFilterOptions) == null ? void 0 : o.fetcher]), { isLoading: m, isValidating: h, data: p, error: f } = S(
|
|
16
|
+
(i = t.fetchAsyncFilterOptions) == null ? void 0 : i.URL,
|
|
17
|
+
l,
|
|
18
|
+
k
|
|
19
|
+
), r = m || h, g = d({ data: p, config: t.fetchAsyncFilterOptions });
|
|
20
|
+
return /* @__PURE__ */ s(b, { spacing: "xs", alignX: "stretch", children: [
|
|
21
|
+
/* @__PURE__ */ n(
|
|
22
|
+
F,
|
|
23
|
+
{
|
|
24
|
+
allowMultiple: !0,
|
|
25
|
+
title: t.label,
|
|
26
|
+
options: g,
|
|
27
|
+
selected: c,
|
|
28
|
+
onChange: (e) => a(e)
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
r && /* @__PURE__ */ n(
|
|
32
|
+
x,
|
|
33
|
+
{
|
|
34
|
+
width: "200px",
|
|
35
|
+
height: y.sizes[5],
|
|
36
|
+
"aria-busy": !0,
|
|
37
|
+
"aria-label": `Loading ${t.label} filters`
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
!r && f && /* @__PURE__ */ s(A, { variant: "errorSmall", children: [
|
|
41
|
+
"Error: failed to load filter for ",
|
|
42
|
+
t.label
|
|
43
|
+
] })
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
export {
|
|
48
|
+
T as ActiveAsyncCheckboxFilter
|
|
49
|
+
};
|
package/dist/index15.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("mobx-react"),s=require("@veeqo/ui"),c=require("./index47.cjs"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("mobx-react"),s=require("@veeqo/ui"),c=require("./index47.cjs"),u=require("./index113.cjs"),h=l.observer(({data:e,editedValue:r,setEditedValue:t})=>{var i;switch(e.filterType){case c.FilterChoiceValue.CHECKBOX:return e.fetchAsyncFilterOptions?o.jsx(u.ActiveAsyncCheckboxFilter,{field:e,setEditedValue:t,editedValue:r}):o.jsx(s.ChoiceList,{allowMultiple:!0,title:e.label,options:(i=e.options)!=null&&i.length?e.options:[],selected:r,onChange:n=>t(n)});default:return null}});exports.FilterArrayField=h;
|
package/dist/index15.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { observer as n } from "mobx-react";
|
|
3
3
|
import { ChoiceList as p } from "@veeqo/ui";
|
|
4
4
|
import { FilterChoiceValue as s } from "./index47.js";
|
|
5
|
-
import { ActiveAsyncCheckboxFilter as c } from "./
|
|
5
|
+
import { ActiveAsyncCheckboxFilter as c } from "./index113.js";
|
|
6
6
|
const F = n(
|
|
7
7
|
({ data: r, editedValue: e, setEditedValue: o }) => {
|
|
8
8
|
var i;
|
package/dist/index19.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),h=require("mobx-react"),i=require("@veeqo/ui"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),h=require("mobx-react"),i=require("@veeqo/ui"),a=require("./index68.cjs"),f=require("./index7.cjs"),q=require("./index59.cjs"),E=require("./index22.cjs"),S=require("./index23.cjs"),x=h.observer(({filterData:s})=>{const{DEFAULT_DATE_PRESET:g,DEFAULT_DATE_RANGE:F}=f.useBusinessLogic(),{Filters:{dateRangeFilters:l,clearRangeFilter:u,setRangeFilter:R}}=q.useStores(),t=l.get(s.id),[e,c]=o.useState(l.get(s.id)),T=()=>{const r=new a.RangeFilter;return r.setFilterType(t==null?void 0:t.filterType),c(r),r};o.useEffect(()=>{if(!t)return;const r=new a.RangeFilter;r.setFilterType(t.filterType),t.gte&&t.lte&&r.setDates(t.gte,t.lte),c(r)},[t]);const d=()=>{u(s.id)},y=()=>{t&&(e!=null&&e.filterType)&&R({dates:{start:e.gte,end:e.lte},key:e.filterType,range:t})},A=(e==null?void 0:e.filterSelection)||g,p=r=>{r&&(e||T(),e==null||e.setFilterType(r.value))},b=r=>{!r||!e||e.setDates(r.start,r.end)},v=e?e.selectedRange:F;return n.jsx(i.FilterTag,{shouldCloseOnClickAway:!0,header:n.jsx(S.ActiveFilterHeader,{filterLabel:s.label,glyph:s.glyph}),label:s.label,text:(t==null?void 0:t.filterLabel)||"",content:n.jsx(i.BaseContainer,{style:{padding:i.theme.sizes.md},children:n.jsx(i.DateRangePicker,{"aria-label":`date range for ${s.label}`,selectedPreset:A,setSelectedPreset:p,selectedRange:v,setSelectedRange:b})}),footer:n.jsx(E.ActiveFilterFooter,{clearActiveFilter:d,applyActiveFilter:y})})});exports.ActiveFilterDateRangeTag=x;
|
package/dist/index19.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as A, useEffect as h } from "react";
|
|
3
3
|
import { observer as E } from "mobx-react";
|
|
4
4
|
import { FilterTag as b, BaseContainer as u, theme as v, DateRangePicker as P } from "@veeqo/ui";
|
|
5
|
-
import { RangeFilter as l } from "./
|
|
5
|
+
import { RangeFilter as l } from "./index68.js";
|
|
6
6
|
import { useBusinessLogic as S } from "./index7.js";
|
|
7
7
|
import { useStores as C } from "./index59.js";
|
|
8
8
|
import { ActiveFilterFooter as L } from "./index22.js";
|
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("./
|
|
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("./index67.cjs"),R=require("./index112.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
|
@@ -2,8 +2,8 @@ import { jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
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
|
-
import { NumberRangeFilter as N } from "./
|
|
6
|
-
import { FilterNumberRangeFilter as h } from "./
|
|
5
|
+
import { NumberRangeFilter as N } from "./index67.js";
|
|
6
|
+
import { FilterNumberRangeFilter as h } from "./index112.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/index21.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),b=require("react"),m=require("mobx-react"),t=require("@veeqo/ui"),p=require("swr/immutable"),y=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),b=require("react"),m=require("mobx-react"),t=require("@veeqo/ui"),p=require("swr/immutable"),y=require("./index73.cjs"),F=require("./index74.cjs"),O=require("./index47.cjs"),A=e=>e&&e.__esModule?e:{default:e},x=A(p),S=m.observer(({field:e,editedValue:o,setEditedValue:a})=>{var i,c;const l=b.useMemo(()=>{var r;return F.getFetcherFunction({fetcherName:(r=e.fetchAsyncFilterOptions)==null?void 0:r.fetcher})},[(i=e.fetchAsyncFilterOptions)==null?void 0:i.fetcher]),{isLoading:u,isValidating:h,data:g,error:d}=x.default((c=e.fetchAsyncFilterOptions)==null?void 0:c.URL,l,O.SWR_HOOK_OPTIONS),n=u||h,f=y.getAsyncOptions({data:g,config:e.fetchAsyncFilterOptions});return s.jsxs(t.Stack,{spacing:"xs",alignX:"stretch",children:[s.jsx(t.ChoiceList,{title:e.label,options:f,selected:[o],onChange:r=>a(`${r[0]}`)}),n&&s.jsx(t.Skeleton,{width:"200px",height:t.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!n&&d&&s.jsxs(t.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.ActiveAsyncRadioFilter=S;
|
package/dist/index21.js
CHANGED
|
@@ -3,8 +3,8 @@ import { useMemo as O } from "react";
|
|
|
3
3
|
import { observer as u } from "mobx-react";
|
|
4
4
|
import { Stack as F, ChoiceList as b, Skeleton as y, theme as A, Text as d } from "@veeqo/ui";
|
|
5
5
|
import x from "swr/immutable";
|
|
6
|
-
import { getAsyncOptions as S } from "./
|
|
7
|
-
import { getFetcherFunction as L } from "./
|
|
6
|
+
import { getAsyncOptions as S } from "./index73.js";
|
|
7
|
+
import { getFetcherFunction as L } from "./index74.js";
|
|
8
8
|
import { SWR_HOOK_OPTIONS as R } from "./index47.js";
|
|
9
9
|
const _ = u(
|
|
10
10
|
({ field: t, editedValue: c, setEditedValue: a }) => {
|
package/dist/index24.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("react"),j=require("mobx-react"),C=require("lodash/debounce"),s=require("@veeqo/ui"),L=require("swr/immutable"),k=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("react"),j=require("mobx-react"),C=require("lodash/debounce"),s=require("@veeqo/ui"),L=require("swr/immutable"),k=require("./index73.cjs"),R=require("./index74.cjs"),v=require("./index47.cjs"),T=require("./index7.cjs"),V=require("./index59.cjs"),b=e=>e&&e.__esModule?e:{default:e},E=b(C),I=b(L),M=j.observer(({field:e})=>{var d,g;const{FILTERS_DEBOUCE_INTERVAL_MS:S}=T.useBusinessLogic(),F=i.useMemo(()=>{var t;return R.getFetcherFunction({fetcherName:(t=e.fetchAsyncFilterOptions)==null?void 0:t.fetcher})},[(d=e.fetchAsyncFilterOptions)==null?void 0:d.fetcher]),{isLoading:a,isValidating:x,data:p,error:l}=I.default((g=e.fetchAsyncFilterOptions)==null?void 0:g.URL,F,v.SWR_HOOK_OPTIONS),u=a||x,{Filters:{setArrayFilter:c,arrayFilters:y}}=V.useStores(),m=y.get(e.id)||[],[O,h]=i.useState(m),f=i.useCallback(E.default((t,n)=>{c(t,n)},S),[c]),_=t=>{const n=t.map(A=>`${A}`);h(n),f(e.id,n)},q=()=>{h([]),c(e.id,[])},o=k.getAsyncOptions({data:p,config:e.fetchAsyncFilterOptions});return o&&o.length===0&&!a&&!l?r.jsx(s.Stack,{spacing:"xs",alignX:"stretch",children:r.jsxs(s.Text,{variant:"bodySmall",children:["No options available for ",e.label]})}):r.jsxs(s.Stack,{spacing:"xs",alignX:"stretch",children:[r.jsx(s.Button,{variant:"link",onClick:q,children:"Clear"}),r.jsx(s.ChoiceList,{allowMultiple:!0,title:e.label,options:o,selected:O,onChange:t=>_(t)}),u&&r.jsx(s.Skeleton,{width:"200px",height:s.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!u&&l&&r.jsxs(s.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.AsyncCheckboxFilter=M;
|
package/dist/index24.js
CHANGED
|
@@ -4,8 +4,8 @@ import { observer as E } from "mobx-react";
|
|
|
4
4
|
import R from "lodash/debounce";
|
|
5
5
|
import { Stack as u, Text as g, Button as _, ChoiceList as I, Skeleton as N, theme as T } from "@veeqo/ui";
|
|
6
6
|
import w from "swr/immutable";
|
|
7
|
-
import { getAsyncOptions as B } from "./
|
|
8
|
-
import { getFetcherFunction as M } from "./
|
|
7
|
+
import { getAsyncOptions as B } from "./index73.js";
|
|
8
|
+
import { getFetcherFunction as M } from "./index74.js";
|
|
9
9
|
import { SWR_HOOK_OPTIONS as j } from "./index47.js";
|
|
10
10
|
import { useBusinessLogic as U } from "./index7.js";
|
|
11
11
|
import { useStores as W } from "./index59.js";
|
package/dist/index25.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("react"),R=require("mobx-react"),j=require("lodash/debounce"),s=require("@veeqo/ui"),A=require("swr/immutable"),L=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("react"),R=require("mobx-react"),j=require("lodash/debounce"),s=require("@veeqo/ui"),A=require("swr/immutable"),L=require("./index73.cjs"),C=require("./index74.cjs"),k=require("./index47.cjs"),v=require("./index7.cjs"),T=require("./index59.cjs"),b=e=>e&&e.__esModule?e:{default:e},V=b(j),E=b(A),I=R.observer(({field:e})=>{var d,g;const{FILTERS_DEBOUCE_INTERVAL_MS:S}=v.useBusinessLogic(),F=i.useMemo(()=>{var t;return C.getFetcherFunction({fetcherName:(t=e.fetchAsyncFilterOptions)==null?void 0:t.fetcher})},[(d=e.fetchAsyncFilterOptions)==null?void 0:d.fetcher]),{isLoading:a,isValidating:x,data:f,error:l}=E.default((g=e.fetchAsyncFilterOptions)==null?void 0:g.URL,F,k.SWR_HOOK_OPTIONS),u=a||x,{Filters:{setFilter:c,filters:p}}=T.useStores(),O=p.get(e.id),[m,h]=i.useState(O),y=i.useCallback(V.default((t,r)=>{c(t,r)},S),[c]),_=t=>{const r=`${t[0]}`;h(r),y(e.id,r)},q=()=>{h(""),c(e.id,"")},o=L.getAsyncOptions({data:f,config:e.fetchAsyncFilterOptions});return o&&o.length===0&&!a&&!l?n.jsx(s.Stack,{spacing:"xs",alignX:"stretch",children:n.jsxs(s.Text,{variant:"bodySmall",children:["No options available for ",e.label]})}):n.jsxs(s.Stack,{spacing:"xs",alignX:"stretch",children:[n.jsx(s.Button,{variant:"link",onClick:q,children:"Clear"}),n.jsx(s.ChoiceList,{title:e.label,options:o,selected:[m],onChange:t=>_(t)}),u&&n.jsx(s.Skeleton,{width:"200px",height:s.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!u&&l&&n.jsxs(s.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.AsyncRadioFilter=I;
|
package/dist/index25.js
CHANGED
|
@@ -4,8 +4,8 @@ import { observer as k } from "mobx-react";
|
|
|
4
4
|
import v from "lodash/debounce";
|
|
5
5
|
import { Stack as u, Text as f, Button as E, ChoiceList as _, Skeleton as I, theme as N } from "@veeqo/ui";
|
|
6
6
|
import T from "swr/immutable";
|
|
7
|
-
import { getAsyncOptions as B } from "./
|
|
8
|
-
import { getFetcherFunction as j } from "./
|
|
7
|
+
import { getAsyncOptions as B } from "./index73.js";
|
|
8
|
+
import { getFetcherFunction as j } from "./index74.js";
|
|
9
9
|
import { SWR_HOOK_OPTIONS as w } from "./index47.js";
|
|
10
10
|
import { useBusinessLogic as M } from "./index7.js";
|
|
11
11
|
import { useStores as U } from "./index59.js";
|
package/dist/index27.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),P=require("react"),q=require("mobx-react"),n=require("@veeqo/ui"),E=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),P=require("react"),q=require("mobx-react"),n=require("@veeqo/ui"),E=require("./index68.cjs"),b=require("./index7.cjs"),k=require("./index59.cjs"),v=q.observer(({field:s})=>{const{DEFAULT_DATE_PRESET:c,DEFAULT_DATE_RANGE:l}=b.useBusinessLogic(),{Filters:{dateRangeFilters:i,setRangeFilter:o,clearRangeFilter:g}}=k.useStores(),e=i.get(s.id),[u,R]=P.useState(!1),d=(e==null?void 0:e.filterSelection)||c,a=()=>{const t=new E.RangeFilter;i.set(s.id,t)},F=t=>{const T=t.value===n.DateRanges.TODAY&&e&&(e==null?void 0:e.filterType)===void 0;if(!t||T)return;if(!u){R(!0);return}if(!e){a();return}if(!e)return;const f=t.value;o({dates:{start:e.gte,end:e.lte},key:f,range:e})},S=t=>{if(t){if(!e){a();return}e.setDates(t.start,t.end)}},D=()=>{g(s.id)},h=e?e.selectedRange:l;return r.jsxs(n.Stack,{spacing:"xs",children:[r.jsx(n.Button,{variant:"link",onClick:D,children:"Clear"}),r.jsx(n.DateRangePicker,{"aria-label":`date range for ${s.label}`,selectedPreset:d,setSelectedPreset:F,selectedRange:h,setSelectedRange:S})]})});exports.DateRangeFilter=v;
|
package/dist/index27.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as D, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as S } from "react";
|
|
3
3
|
import { observer as T } from "mobx-react";
|
|
4
4
|
import { Stack as E, Button as P, DateRangePicker as k, DateRanges as A } from "@veeqo/ui";
|
|
5
|
-
import { RangeFilter as v } from "./
|
|
5
|
+
import { RangeFilter as v } from "./index68.js";
|
|
6
6
|
import { useBusinessLogic as C } from "./index7.js";
|
|
7
7
|
import { useStores as x } from "./index59.js";
|
|
8
8
|
const U = T(({ field: r }) => {
|
package/dist/index29.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("./index110.cjs"),R=require("./index67.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),[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/index29.js
CHANGED
|
@@ -3,8 +3,8 @@ 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 "./
|
|
7
|
-
import { NumberRangeFilter as h } from "./
|
|
6
|
+
import { MUISlider as A } from "./index110.js";
|
|
7
|
+
import { NumberRangeFilter as h } from "./index67.js";
|
|
8
8
|
import { useBusinessLogic as B } from "./index7.js";
|
|
9
9
|
import { useStores as T } from "./index59.js";
|
|
10
10
|
const q = k(({ field: l }) => {
|
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("./index102.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 "./index102.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"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),a=require("react"),c=require("@veeqo/ui"),W=require("mobx-react"),Y=require("./index63.cjs"),z=require("./index60.cjs"),G=require("./index38.cjs"),J=require("./index41.cjs"),K=require("./index54.cjs"),Q=require("./index99.cjs"),X=require("./index7.cjs"),Z=require("./index59.cjs"),$=require("./index100.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(),[s,R]=a.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=a.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=a.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=a.useMemo(()=>{if(h)return C;if(t)return D},[D,t,h,C]);return i.jsxs(i.Fragment,{children:[i.jsx(c.ViewTab,{colourPalette:c.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(c.Loader,{type:"ThreeDots",width:12,height:12,color:r?"#fff":c.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
|
@@ -2,21 +2,21 @@ import { jsxs as W, Fragment as Y, jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as $, useRef as z, useMemo as C } from "react";
|
|
3
3
|
import { ViewTab as G, theme as L, Loader as J } from "@veeqo/ui";
|
|
4
4
|
import { observer as K } from "mobx-react";
|
|
5
|
-
import { useCustomViews as Q } from "./
|
|
5
|
+
import { useCustomViews as Q } from "./index63.js";
|
|
6
6
|
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 "./index99.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 "./index100.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 },
|
|
17
17
|
Views: { draftViewsMap: y },
|
|
18
18
|
Notifications: { notify: x }
|
|
19
|
-
} = te(), { viewsMap: u, defaultCustomViewId: E, isLoading: N } = X(), { isLoading: k } = Q({ type: S }), { viewCounts: A, isLoadingViewCounts: M } = oe(
|
|
19
|
+
} = te(), { viewsMap: u, defaultCustomViewId: E, isLoading: N } = X(), { isLoading: k } = Q({ type: S }), { viewCounts: A, isLoadingViewCounts: M } = oe(), [i, R] = $(null), I = (o) => {
|
|
20
20
|
const v = F.get(l);
|
|
21
21
|
if (u.has(o)) {
|
|
22
22
|
const r = u.get(o);
|
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("@veeqo/ui"),o=require("react-hook-form"),I=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@veeqo/ui"),o=require("react-hook-form"),I=require("./index63.cjs"),f=require("./index43.cjs"),D=require("./index7.cjs"),d=60,_=({tab:n,viewName:w,shouldShowDropdown:p,onCloseDropdown:v,onDelete:g,onSave:x,headerText:j,e2ePrefix:a,activeOption:C})=>{const{VIEW_TYPE:S}=D.useBusinessLogic(),{canDeleteCustomViews:u,canUpdateCustomViews:r,canShareCustomViews:l,defaultCustomViewId:m}=I.useCustomViews({type:S}),b=n.id===m,{handleSubmit:y,control:c,formState:h}=o.useForm({mode:"onChange",defaultValues:{viewName:w,isDefault:n.id===m,shareOption:C.key}}),V=Object.values(f.SHARING_OPTIONS).map(s=>({key:s.key,value:s.key,label:s.text}));if(!p)return null;const k=n.originalView===void 0;return e.jsx("form",{onSubmit:y(x),children:e.jsxs(t.Card,{style:{width:"400px"},title:j,subtitle:"Any filters you've applied and your chosen sort direction will be stored in this view",onClose:v,renderFooter:()=>u||r||l?e.jsxs(t.Stack,{direction:"horizontal",alignX:"end",children:[u&&e.jsx(t.Button,{variant:"destructive",onClick:g,className:`act-react-listing-custom-view-${a}-delete`,children:"Delete"}),(r||l)&&e.jsx(t.Button,{variant:"primary",type:"submit",className:`act-react-listing-custom-view-${a}-save`,disabled:!h.isDirty&&k||h.isSubmitting,children:"Save"})]}):null,className:`act-react-listing-custom-view-${a}`,children:[!r&&e.jsx(t.Alert,{variant:"warning",title:"You need permission to edit this view",message:"This is a company shared view"}),e.jsxs(t.Stack,{alignX:"stretch",children:[e.jsx(o.Controller,{name:"viewName",control:c,render:({onChange:s,value:i})=>e.jsx(t.TextField,{id:"view-name",className:`act-react-listing-custom-view-${a}-field`,label:"View name",placeholder:"View name",value:i,onChange:s,disabled:!n.editable,maxLength:d,hint:`${i.length} / ${d} characters`,required:!0})}),e.jsxs(t.Stack,{children:[e.jsx(t.Text,{variant:"inputLabel",children:"Sharing options"}),e.jsx(o.Controller,{name:"shareOption",control:c,render:({onChange:s,value:i})=>e.jsx(t.SegmentedControl,{onChange:T=>l&&s(T),options:V,selected:i})})]}),e.jsx(o.Controller,{name:"isDefault",control:c,render:({onChange:s,value:i})=>e.jsx(t.Checkbox,{disabled:b,name:"makeViewDefault",label:"Make default view",checked:i,onChange:s,hint:"This will be the view this page will always open on"})})]})]})})};exports.EditDropdown=_;exports.VIEWS_TITLE_MAX_CHAR_LIMIT=d;
|
package/dist/index36.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { Card as x, Alert as O, Stack as c, TextField as _, Text as $, SegmentedControl as A, Checkbox as E, Button as p } from "@veeqo/ui";
|
|
3
3
|
import { useForm as L, Controller as d } from "react-hook-form";
|
|
4
|
-
import { useCustomViews as j } from "./
|
|
4
|
+
import { useCustomViews as j } from "./index63.js";
|
|
5
5
|
import { SHARING_OPTIONS as F } from "./index43.js";
|
|
6
6
|
import { useBusinessLogic as M } from "./index7.js";
|
|
7
7
|
const w = 60, z = ({
|
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("./index96.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 "./index96.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("./index95.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 "./index95.js";
|
|
7
7
|
import { UnsavedChangesPill as C } from "./index40.js";
|
|
8
8
|
const U = h(
|
|
9
9
|
({
|
package/dist/index39.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("./index97.cjs"),g=require("./index63.cjs"),S=require("./index60.cjs"),b=require("./index3.cjs"),y=require("./index7.cjs"),V=require("./index59.cjs"),p=require("./index10.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/index39.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 "./
|
|
4
|
-
import { useCustomViews as d } from "./
|
|
3
|
+
import { LegacySortableViews as w } from "./index97.js";
|
|
4
|
+
import { useCustomViews as d } from "./index63.js";
|
|
5
5
|
import { useViews as g } from "./index60.js";
|
|
6
6
|
import { patchCurrentUser as _ } from "./index3.js";
|
|
7
7
|
import { useBusinessLogic as S } from "./index7.js";
|
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("./index98.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 "./index98.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";
|