@veeqo/transfigure 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BusinessLogic/types.d.ts +1 -1
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +4 -4
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +9 -48
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +23 -28
- package/dist/index102.cjs +19 -1
- package/dist/index102.js +24 -21
- package/dist/index103.cjs +12 -1
- package/dist/index103.js +16 -7
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +15 -24
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +21 -18
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +49 -14
- package/dist/index107.cjs +1 -12
- package/dist/index107.js +29 -16
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +2 -19
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +18 -7
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +7 -63
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +60 -26
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +30 -2
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +63 -5
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +5 -63
- package/dist/index119.cjs +7 -1
- package/dist/index119.js +10 -47
- package/dist/index120.cjs +1 -7
- package/dist/index120.js +47 -10
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +2 -2
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +2 -2
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +1 -1
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +7 -7
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +5 -5
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +3 -3
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +5 -5
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +3 -3
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +2 -2
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +1 -1
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +1 -1
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +2 -5
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +5 -2
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +7 -7
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +18 -13
- package/dist/index93.cjs +1 -104
- package/dist/index93.js +7 -120
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +13 -68
- package/dist/index95.cjs +104 -1
- package/dist/index95.js +119 -28
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +68 -2
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +27 -39
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +2 -11
- package/dist/index99.cjs +1 -19
- package/dist/index99.js +41 -24
- package/package.json +1 -1
package/dist/index20.js
CHANGED
|
@@ -4,7 +4,7 @@ import { observer as u } from "mobx-react";
|
|
|
4
4
|
import { FilterTag as y } from "@veeqo/ui";
|
|
5
5
|
import { useFilterArrayLabel as A } from "./index58.js";
|
|
6
6
|
import { FilterArrayField as f } from "./index17.js";
|
|
7
|
-
import b from "./
|
|
7
|
+
import b from "./index118.js";
|
|
8
8
|
import { useStores as v } from "./index61.js";
|
|
9
9
|
import { ActiveFilterFooter as g } from "./index24.js";
|
|
10
10
|
import { ActiveFilterHeader as h } from "./index25.js";
|
package/dist/index22.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("./index69.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("./index69.cjs"),R=require("./index117.cjs"),v=require("./index61.cjs"),N=require("./index24.cjs"),q=require("./index25.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/index22.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 "./index69.js";
|
|
6
|
-
import { FilterNumberRangeFilter as h } from "./
|
|
6
|
+
import { FilterNumberRangeFilter as h } from "./index117.js";
|
|
7
7
|
import { useStores as v } from "./index61.js";
|
|
8
8
|
import { ActiveFilterFooter as A } from "./index24.js";
|
|
9
9
|
import { ActiveFilterHeader as w } from "./index25.js";
|
package/dist/index26.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("./index75.cjs"),R=require("./index76.cjs"),v=require("./index49.cjs"),T=require("./index8.cjs"),V=require("./index61.cjs"),b=e=>e&&e.__esModule?e:{default:e},E=b(C),I=b(L),M=j.observer(({field:e})=>{var d,g;const{
|
|
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("./index75.cjs"),R=require("./index76.cjs"),v=require("./index49.cjs"),T=require("./index8.cjs"),V=require("./index61.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_DEBOUNCE_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/index26.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as k, useState as V, useCallback as v } from "react";
|
|
3
3
|
import { observer as E } from "mobx-react";
|
|
4
|
-
import
|
|
5
|
-
import { Stack as u, Text as g, Button as
|
|
4
|
+
import N from "lodash/debounce";
|
|
5
|
+
import { Stack as u, Text as g, Button as R, ChoiceList as _, Skeleton as I, theme as T } from "@veeqo/ui";
|
|
6
6
|
import w from "swr/immutable";
|
|
7
7
|
import { getAsyncOptions as B } from "./index75.js";
|
|
8
8
|
import { getFetcherFunction as M } from "./index76.js";
|
|
@@ -11,7 +11,7 @@ import { useBusinessLogic as U } from "./index8.js";
|
|
|
11
11
|
import { useStores as W } from "./index61.js";
|
|
12
12
|
const Y = E(({ field: t }) => {
|
|
13
13
|
var h, p;
|
|
14
|
-
const {
|
|
14
|
+
const { FILTERS_DEBOUNCE_INTERVAL_MS: f } = U(), b = k(() => {
|
|
15
15
|
var e;
|
|
16
16
|
return M({ fetcherName: (e = t.fetchAsyncFilterOptions) == null ? void 0 : e.fetcher });
|
|
17
17
|
}, [(h = t.fetchAsyncFilterOptions) == null ? void 0 : h.fetcher]), { isLoading: a, isValidating: d, data: F, error: c } = w(
|
|
@@ -21,7 +21,7 @@ const Y = E(({ field: t }) => {
|
|
|
21
21
|
), l = a || d, {
|
|
22
22
|
Filters: { setArrayFilter: s, arrayFilters: S }
|
|
23
23
|
} = W(), y = S.get(t.id) || [], [O, m] = V(y), A = v(
|
|
24
|
-
|
|
24
|
+
N((e, r) => {
|
|
25
25
|
s(e, r);
|
|
26
26
|
}, f),
|
|
27
27
|
[s]
|
|
@@ -35,9 +35,9 @@ const Y = E(({ field: t }) => {
|
|
|
35
35
|
"No options available for ",
|
|
36
36
|
t.label
|
|
37
37
|
] }) }) : /* @__PURE__ */ i(u, { spacing: "xs", alignX: "stretch", children: [
|
|
38
|
-
/* @__PURE__ */ o(
|
|
38
|
+
/* @__PURE__ */ o(R, { variant: "link", onClick: C, children: "Clear" }),
|
|
39
39
|
/* @__PURE__ */ o(
|
|
40
|
-
|
|
40
|
+
_,
|
|
41
41
|
{
|
|
42
42
|
allowMultiple: !0,
|
|
43
43
|
title: t.label,
|
|
@@ -47,7 +47,7 @@ const Y = E(({ field: t }) => {
|
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
49
|
l && /* @__PURE__ */ o(
|
|
50
|
-
|
|
50
|
+
I,
|
|
51
51
|
{
|
|
52
52
|
width: "200px",
|
|
53
53
|
height: T.sizes[5],
|
package/dist/index27.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("./index75.cjs"),C=require("./index76.cjs"),k=require("./index49.cjs"),v=require("./index8.cjs"),T=require("./index61.cjs"),b=e=>e&&e.__esModule?e:{default:e},V=b(j),E=b(A),I=R.observer(({field:e})=>{var d,g;const{
|
|
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("./index75.cjs"),C=require("./index76.cjs"),k=require("./index49.cjs"),v=require("./index8.cjs"),T=require("./index61.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_DEBOUNCE_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/index27.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo as C, useState as R, useCallback as V } from "react";
|
|
3
3
|
import { observer as k } from "mobx-react";
|
|
4
4
|
import v from "lodash/debounce";
|
|
5
|
-
import { Stack as u, Text as f, Button as E, ChoiceList as
|
|
5
|
+
import { Stack as u, Text as f, Button as E, ChoiceList as N, Skeleton as _, theme as I } from "@veeqo/ui";
|
|
6
6
|
import T from "swr/immutable";
|
|
7
7
|
import { getAsyncOptions as B } from "./index75.js";
|
|
8
8
|
import { getFetcherFunction as j } from "./index76.js";
|
|
@@ -11,7 +11,7 @@ import { useBusinessLogic as M } from "./index8.js";
|
|
|
11
11
|
import { useStores as U } from "./index61.js";
|
|
12
12
|
const Q = k(({ field: t }) => {
|
|
13
13
|
var h, p;
|
|
14
|
-
const {
|
|
14
|
+
const { FILTERS_DEBOUNCE_INTERVAL_MS: g } = M(), d = C(() => {
|
|
15
15
|
var e;
|
|
16
16
|
return j({ fetcherName: (e = t.fetchAsyncFilterOptions) == null ? void 0 : e.fetcher });
|
|
17
17
|
}, [(h = t.fetchAsyncFilterOptions) == null ? void 0 : h.fetcher]), { isLoading: c, isValidating: b, data: F, error: a } = T(
|
|
@@ -37,7 +37,7 @@ const Q = k(({ field: t }) => {
|
|
|
37
37
|
] }) }) : /* @__PURE__ */ s(u, { spacing: "xs", alignX: "stretch", children: [
|
|
38
38
|
/* @__PURE__ */ o(E, { variant: "link", onClick: A, children: "Clear" }),
|
|
39
39
|
/* @__PURE__ */ o(
|
|
40
|
-
|
|
40
|
+
N,
|
|
41
41
|
{
|
|
42
42
|
title: t.label,
|
|
43
43
|
options: i,
|
|
@@ -46,10 +46,10 @@ const Q = k(({ field: t }) => {
|
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
48
|
l && /* @__PURE__ */ o(
|
|
49
|
-
|
|
49
|
+
_,
|
|
50
50
|
{
|
|
51
51
|
width: "200px",
|
|
52
|
-
height:
|
|
52
|
+
height: I.sizes[5],
|
|
53
53
|
"aria-busy": !0,
|
|
54
54
|
"aria-label": `Loading ${t.label} filters`
|
|
55
55
|
}
|
package/dist/index28.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("mobx-react"),l=require("react"),C=require("lodash/debounce"),r=require("@veeqo/ui"),F=require("./index8.cjs"),_=require("./index61.cjs"),j=e=>e&&e.__esModule?e:{default:e},k=j(C),q=p.observer(({field:e})=>{var i;const{
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("mobx-react"),l=require("react"),C=require("lodash/debounce"),r=require("@veeqo/ui"),F=require("./index8.cjs"),_=require("./index61.cjs"),j=e=>e&&e.__esModule?e:{default:e},k=j(C),q=p.observer(({field:e})=>{var i;const{FILTERS_DEBOUNCE_INTERVAL_MS:a}=F.useBusinessLogic(),{Filters:{setArrayFilter:o,arrayFilters:u}}=_.useStores(),d=u.get(e.id)||[],[b,c]=l.useState(d),h=l.useCallback(k.default((t,n)=>{o(t,n)},a),[o]),x=t=>{const n=t.map(g=>`${g}`);c(n),h(e.id,n)},S=()=>{c([]),o(e.id,[])};return(i=e.options)!=null&&i.length?s.jsxs(r.Stack,{spacing:"xs",children:[s.jsx(r.Button,{variant:"link",onClick:S,children:"Clear"}),s.jsx(r.ChoiceList,{allowMultiple:!0,title:e.label,options:e.options,selected:b,onChange:t=>x(t)})]}):s.jsx(r.Stack,{spacing:"xs",alignX:"stretch",children:s.jsxs(r.Text,{variant:"bodySmall",children:["No options available for ",e.label]})})});exports.CheckboxFilter=q;
|
package/dist/index28.js
CHANGED
|
@@ -5,9 +5,9 @@ import F from "lodash/debounce";
|
|
|
5
5
|
import { Stack as a, Text as k, Button as V, ChoiceList as v } from "@veeqo/ui";
|
|
6
6
|
import { useBusinessLogic as y } from "./index8.js";
|
|
7
7
|
import { useStores as E } from "./index61.js";
|
|
8
|
-
const
|
|
8
|
+
const j = C(({ field: e }) => {
|
|
9
9
|
var i;
|
|
10
|
-
const {
|
|
10
|
+
const { FILTERS_DEBOUNCE_INTERVAL_MS: c } = y(), {
|
|
11
11
|
Filters: { setArrayFilter: o, arrayFilters: u }
|
|
12
12
|
} = E(), m = u.get(e.id) || [], [p, n] = S(m), h = x(
|
|
13
13
|
F((t, r) => {
|
|
@@ -38,5 +38,5 @@ const w = C(({ field: e }) => {
|
|
|
38
38
|
] }) });
|
|
39
39
|
});
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
j as CheckboxFilter
|
|
42
42
|
};
|
package/dist/index30.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),g=require("mobx-react"),u=require("@veeqo/ui"),h=require("lodash/debounce"),n=require("./index49.cjs"),j=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),g=require("mobx-react"),u=require("@veeqo/ui"),h=require("lodash/debounce"),n=require("./index49.cjs"),j=require("./index86.cjs"),m=require("./index8.cjs"),y=require("./index61.cjs"),k=r=>r&&r.__esModule?r:{default:r},B=k(h),v=g.observer(({fields:r,groupId:c})=>{const{FILTERS_DEBOUNCE_INTERVAL_MS:S}=m.useBusinessLogic(),{Filters:{getFiltersForGroup:p,setFilter:a,clearFiltersForGroup:V}}=y.useStores(),_=p(c),[d,F]=o.useState(_),[E,x]=o.useState({}),C=o.useCallback(B.default((e,t)=>{a(e,t)},S),[a]),q=(e,t)=>{const s={...d,[e]:t},i={...E},T=Object.entries(s).every(([b,M])=>j.isTextFilterValid(String(M))?(i[b]="",!0):(i[b]=n.MIN_SEARCH_ERROR_MESSAGE,!1));F(s),x(i),T&&C(e,t)},R=()=>{const e=r.reduce((t,s)=>({...t,[s.id]:""}),{});F(e),V(c)};return l.jsxs(u.FlexCol,{children:[l.jsx(u.Button,{variant:"link",onClick:R,children:"Clear"}),r.map(e=>{let t;switch(e.filterType){case n.FilterChoiceValue.NUMBER:t="number";break;case n.FilterChoiceValue.TEXT:t="text";break}return l.jsx(u.TextField,{type:t,value:d[e.id],error:E[e.id],label:e.label,onChange:s=>q(e.id,s)},e.id)})]})});exports.MultipleFieldFilter=v;
|
package/dist/index30.js
CHANGED
|
@@ -4,13 +4,13 @@ import { observer as _ } from "mobx-react";
|
|
|
4
4
|
import { FlexCol as k, Button as M, TextField as g } from "@veeqo/ui";
|
|
5
5
|
import y from "lodash/debounce";
|
|
6
6
|
import { FilterChoiceValue as F, MIN_SEARCH_ERROR_MESSAGE as B } from "./index49.js";
|
|
7
|
-
import { isTextFilterValid as G } from "./
|
|
8
|
-
import { useBusinessLogic as
|
|
9
|
-
import { useStores as
|
|
7
|
+
import { isTextFilterValid as G } from "./index86.js";
|
|
8
|
+
import { useBusinessLogic as N } from "./index8.js";
|
|
9
|
+
import { useStores as j } from "./index61.js";
|
|
10
10
|
const q = _(({ fields: s, groupId: i }) => {
|
|
11
|
-
const {
|
|
11
|
+
const { FILTERS_DEBOUNCE_INTERVAL_MS: p } = N(), {
|
|
12
12
|
Filters: { getFiltersForGroup: E, setFilter: l, clearFiltersForGroup: b }
|
|
13
|
-
} =
|
|
13
|
+
} = j(), C = E(i), [n, a] = m(C), [c, S] = m({}), V = h(
|
|
14
14
|
y((e, r) => {
|
|
15
15
|
l(e, r);
|
|
16
16
|
}, p),
|
package/dist/index31.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("./index114.cjs"),R=require("./index69.cjs"),p=require("./index8.cjs"),y=require("./index61.cjs"),v=i=>i&&i.__esModule?i:{default:i},k=v(j),I=_.observer(({field:i})=>{var M;const{
|
|
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("./index114.cjs"),R=require("./index69.cjs"),p=require("./index8.cjs"),y=require("./index61.cjs"),v=i=>i&&i.__esModule?i:{default:i},k=v(j),I=_.observer(({field:i})=>{var M;const{FILTERS_DEBOUNCE_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/index31.js
CHANGED
|
@@ -9,7 +9,7 @@ import { useBusinessLogic as B } from "./index8.js";
|
|
|
9
9
|
import { useStores as T } from "./index61.js";
|
|
10
10
|
const q = k(({ field: l }) => {
|
|
11
11
|
var x;
|
|
12
|
-
const {
|
|
12
|
+
const { FILTERS_DEBOUNCE_INTERVAL_MS: F } = B(), {
|
|
13
13
|
Filters: { numberRangeFilters: f, setNumberRangeFilter: M, clearNumberRangeFilter: d }
|
|
14
14
|
} = T(), e = f.get(l.id), [a, r] = y({
|
|
15
15
|
gte: (e == null ? void 0 : e.gte) ?? 0,
|
package/dist/index32.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),x=require("mobx-react"),l=require("react"),p=require("lodash/debounce"),n=require("@veeqo/ui"),_=require("./index8.cjs"),j=require("./index61.cjs"),q=e=>e&&e.__esModule?e:{default:e},C=q(p),F=x.observer(({field:e})=>{var i;const{
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),x=require("mobx-react"),l=require("react"),p=require("lodash/debounce"),n=require("@veeqo/ui"),_=require("./index8.cjs"),j=require("./index61.cjs"),q=e=>e&&e.__esModule?e:{default:e},C=q(p),F=x.observer(({field:e})=>{var i;const{FILTERS_DEBOUNCE_INTERVAL_MS:a}=_.useBusinessLogic(),{Filters:{setFilter:r,filters:u}}=j.useStores(),d=u.get(e.id),[b,c]=l.useState(d),S=l.useCallback(C.default((t,o)=>{r(t,o)},a),[r]),g=t=>{const o=`${t[0]}`;c(o),S(e.id,o)},h=()=>{c(""),r(e.id,"")};return(i=e.options)!=null&&i.length?s.jsxs(n.Stack,{spacing:"xs",children:[s.jsx(n.Button,{variant:"link",onClick:h,children:"Clear"}),s.jsx(n.ChoiceList,{title:e.label,options:e.options,selected:[b],onChange:t=>g(t)})]}):s.jsx(n.Stack,{spacing:"xs",alignX:"stretch",children:s.jsxs(n.Text,{variant:"bodySmall",children:["No options available for ",e.label]})})});exports.RadioFilter=F;
|
package/dist/index32.js
CHANGED
|
@@ -5,9 +5,9 @@ import x from "lodash/debounce";
|
|
|
5
5
|
import { Stack as c, Text as F, Button as V, ChoiceList as f } from "@veeqo/ui";
|
|
6
6
|
import { useBusinessLogic as k } from "./index8.js";
|
|
7
7
|
import { useStores as v } from "./index61.js";
|
|
8
|
-
const
|
|
8
|
+
const j = g(({ field: e }) => {
|
|
9
9
|
var i;
|
|
10
|
-
const {
|
|
10
|
+
const { FILTERS_DEBOUNCE_INTERVAL_MS: a } = k(), {
|
|
11
11
|
Filters: { setFilter: r, filters: m }
|
|
12
12
|
} = v(), u = m.get(e.id), [p, s] = S(u), d = C(
|
|
13
13
|
x((t, o) => {
|
|
@@ -37,5 +37,5 @@ const I = g(({ field: e }) => {
|
|
|
37
37
|
] }) });
|
|
38
38
|
});
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
j as RadioFilter
|
|
41
41
|
};
|
package/dist/index34.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("./index8.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("./index8.cjs"),u=require("./index101.cjs"),c=require("./index35.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/index34.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 "./index8.js";
|
|
5
|
-
import { AdaptiveHeightContainer as p } from "./
|
|
5
|
+
import { AdaptiveHeightContainer as p } from "./index101.js";
|
|
6
6
|
import { FilterGroup as n } from "./index35.js";
|
|
7
7
|
const u = e(() => {
|
|
8
8
|
const { GROUP_MAP: t } = s();
|
package/dist/index36.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),l=require("@veeqo/ui"),U=require("mobx-react"),z=require("./index65.cjs"),G=require("./index62.cjs"),J=require("./index40.cjs"),K=require("./index43.cjs"),Q=require("./index56.cjs"),X=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),l=require("@veeqo/ui"),U=require("mobx-react"),z=require("./index65.cjs"),G=require("./index62.cjs"),J=require("./index40.cjs"),K=require("./index43.cjs"),Q=require("./index56.cjs"),X=require("./index106.cjs"),Z=require("./index8.cjs"),$=require("./index61.cjs"),b=require("./index107.cjs"),ee=U.observer(({view:e})=>{const{VIEW_TYPE:x,IS_VIEWS_READONLY:r,SEARCH_FILTER_ID:d}=Z.useBusinessLogic(),{Filters:{activeViewId:w,initFiltersFromView:f,discardChanges:m,initFromUrl:V,filters:L,setFilter:T},Views:{draftViewsMap:y},Notifications:{notify:E}}=$.useStores(),{viewsMap:h,defaultCustomViewId:F,isLoading:N}=G.useViews(),{isLoading:j}=z.useCustomViews({type:x}),{viewCounts:M,isLoadingViewCounts:R}=X.useViewCounts(e.id),[s,P]=c.useState(null),k=o=>{const q=L.get(d);if(h.has(o)){const n=h.get(o);n&&(f(n),m(!0),V())}else{const n=y.get(o);n?(f(n),m(!0),V()):E({type:"error",text:"Failed to load view"})}q&&T(d,q)},u=(e==null?void 0:e.id)===w,t=e.originalView!==void 0,g=e.originalView===void 0,A=M,a=(e==null?void 0:e.label)||"",I=N||j,p=c.useRef(!1);!I&&!p.current&&u&&e.id===F&&s&&(p.current=!0,s&&w===e.id&&window.requestAnimationFrame(()=>{var o;(o=s.parentElement)==null||o.scrollBy({behavior:"smooth",left:s.offsetLeft})}));const C=c.useMemo(()=>t?"draft":e.editable?"saved":"fixed",[t,e.editable]),{actions:{create:{handleSaveDraft:_},menu:{toggleDropdown:D},delete:{closeDeleteConfirmation:B,handleDelete:O,handleDeleteDraftView:v}},state:{shouldShowDeleteConfirmation:H},actions:W,state:S}=Q.useDropdownManager(e),Y=c.useMemo(()=>{if(!r){if(g)return D;if(t)return v}},[v,t,g,D,r]);return i.jsxs(i.Fragment,{children:[i.jsx(l.ViewTab,{customTextColour:e.customTextColour,colourPalette:e.colourPalette,className:"act-react-listing-custom-view",active:u,id:e==null?void 0:e.id,name:a,type:r?void 0:C,count:R?i.jsx(l.Loader,{type:"ThreeDots",width:12,height:12,color:u?"#fff":l.theme.colors.neutral.ink.dark}):A,onClick:k,subAction:Y,ariaContext:"orders",ref:P,"aria-controls":"options-dropdown","aria-expanded":S.shouldShowDropdown,"aria-haspopup":"dialog"},e==null?void 0:e.id),i.jsx(b.Confirmation,{shouldShow:H,viewName:a,onCancel:B,onDelete:O}),i.jsx(J.PillNotifications,{tabType:C,isActive:u,initialViewName:a,shouldShowCreateViewNotification:t,handleSaveDraft:_}),!r&&i.jsx(K.ViewDropdowns,{referenceElement:s,tab:e,...W,...S})]})});exports.ViewTab=ee;
|
package/dist/index36.js
CHANGED
|
@@ -7,10 +7,10 @@ import { useViews as Z } from "./index62.js";
|
|
|
7
7
|
import { PillNotifications as b } from "./index40.js";
|
|
8
8
|
import { ViewDropdowns as ee } from "./index43.js";
|
|
9
9
|
import { useDropdownManager as oe } from "./index56.js";
|
|
10
|
-
import { useViewCounts as ie } from "./
|
|
10
|
+
import { useViewCounts as ie } from "./index106.js";
|
|
11
11
|
import { useBusinessLogic as te } from "./index8.js";
|
|
12
12
|
import { useStores as re } from "./index61.js";
|
|
13
|
-
import { Confirmation as se } from "./
|
|
13
|
+
import { Confirmation as se } from "./index107.js";
|
|
14
14
|
const ve = Q(({ view: e }) => {
|
|
15
15
|
const { VIEW_TYPE: L, IS_VIEWS_READONLY: n, SEARCH_FILTER_ID: c } = te(), {
|
|
16
16
|
Filters: { activeViewId: d, initFiltersFromView: f, discardChanges: m, initFromUrl: u, filters: T, setFilter: x },
|
package/dist/index39.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index102.cjs"),g=require("./index52.cjs"),j=require("./index51.cjs"),M=({tab:i,onMakeDefault:l,onEdit:n,onDuplicate:s,onDelete:o,shouldShowDropdown:a,handleCloseDropdown:c})=>{const{openModal:r}=g.useModal(),d=()=>{r(j.ModalId.ORDERS_TABLE_MANAGEMENT),c()},m=i.label!=="Picking In Progress"&&i.editable,u=i.default!==!1&&i.editable,p=i.editable,b=i.editable;return a?e.jsxs(t.MenuItems,{children:[u&&e.jsx(t.Item,{onClick:l,className:"act-react-listing-custom-view-make-default-menu-item",children:"Make default view"}),b&&e.jsx(t.Item,{onClick:n,className:"act-react-listing-custom-view-edit-menu-item",role:"option",children:"Edit"}),e.jsx(t.Item,{onClick:s,className:"act-react-listing-custom-view-duplicate-menu-item",role:"option",children:"Duplicate"}),m&&e.jsx(t.Item,{onClick:o,className:"act-react-listing-custom-view-delete-menu-item",role:"option",children:"Delete"}),p&&e.jsxs(e.Fragment,{children:[e.jsx(t.Divider,{}),e.jsx(t.Item,{onClick:d,role:"option",children:"Table management"})]})]}):null};exports.OptionsDropdown=M;
|
package/dist/index39.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as t, jsx as i, Fragment as f } from "react/jsx-runtime";
|
|
2
|
-
import { MenuItems as M, Item as l, Divider as h } from "./
|
|
2
|
+
import { MenuItems as M, Item as l, Divider as h } from "./index102.js";
|
|
3
3
|
import { useModal as k } from "./index52.js";
|
|
4
4
|
import { ModalId as T } from "./index51.js";
|
|
5
5
|
const N = ({
|
package/dist/index40.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("mobx-react"),g=require("./index62.cjs"),o=require("framer-motion"),m=require("./index61.cjs"),v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("mobx-react"),g=require("./index62.cjs"),o=require("framer-motion"),m=require("./index61.cjs"),v=require("./index105.cjs"),f=require("./index42.cjs"),h=P.observer(({tabType:s,isActive:r,shouldShowCreateViewNotification:a,handleSaveDraft:i})=>{var t;const{Filters:{hasUnsavedChanges:c,discardChanges:l,activeViewId:n}}=m.useStores(),{viewsMap:u}=g.useViews(),d=n&&((t=u.get(n))==null?void 0:t.label);return e.jsxs(e.Fragment,{children:[e.jsx(o.AnimatePresence,{children:s==="draft"&&r&&a&&e.jsx(v.DraftPill,{onClick:i})}),e.jsx(o.AnimatePresence,{children:c&&r&&s==="saved"&&e.jsx(f.UnsavedChangesPill,{viewName:d,onDiscard:()=>l(),onSaveDraft:i})})]})});exports.PillNotifications=h;
|
package/dist/index40.js
CHANGED
|
@@ -3,7 +3,7 @@ import { observer as h } from "mobx-react";
|
|
|
3
3
|
import { useViews as v } from "./index62.js";
|
|
4
4
|
import { AnimatePresence as n } from "framer-motion";
|
|
5
5
|
import { useStores as g } from "./index61.js";
|
|
6
|
-
import { DraftPill as w } from "./
|
|
6
|
+
import { DraftPill as w } from "./index105.js";
|
|
7
7
|
import { UnsavedChangesPill as C } from "./index42.js";
|
|
8
8
|
const U = h(
|
|
9
9
|
({
|
package/dist/index41.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),m=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),m=require("./index104.cjs"),g=require("./index65.cjs"),S=require("./index62.cjs"),b=require("./index4.cjs"),y=require("./index8.cjs"),V=require("./index61.cjs"),p=require("./index12.cjs"),q=()=>{const{VIEW_TYPE:u}=y.useBusinessLogic(),{sortedCustomViews:s,isLoading:a}=S.useViews(),{mutate:c}=g.useCustomViews({type:u}),[l,t]=n.useState(s);n.useEffect(()=>{t(s)},[s]);const{Notifications:{notify:w}}=V.useStores(),d=async o=>{t(o);const r=o.map(e=>e.id);try{await b.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:r}}}),await c(e=>({...e,settings:{...e.settings,custom_view_positions:{...e.settings.custom_view_positions,order:r}}}),{revalidate:!1})}catch{t(s),w({type:"error",text:"Failed to update order of views"})}};return a||!s.length?null:i.jsx(p.ErrorBoundary,{children:i.jsx(m.LegacySortableViews,{views:l,onChange:d,className:"act-sortable-views"})})};exports.SortableViews=q;
|
package/dist/index41.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f, useEffect as l } from "react";
|
|
3
|
-
import { LegacySortableViews as w } from "./
|
|
3
|
+
import { LegacySortableViews as w } from "./index104.js";
|
|
4
4
|
import { useCustomViews as d } from "./index65.js";
|
|
5
5
|
import { useViews as g } from "./index62.js";
|
|
6
6
|
import { patchCurrentUser as _ } from "./index4.js";
|
package/dist/index44.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),S=require("mobx-react"),i=require("@veeqo/ui"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),S=require("mobx-react"),i=require("@veeqo/ui"),u=require("./index103.cjs"),m=require("./index41.cjs"),q=require("./index62.cjs"),f=require("./index63.cjs"),p=require("./index37.cjs"),c=require("./index36.cjs"),v=require("./index8.cjs"),b=require("./index61.cjs"),a=require("./index12.cjs"),C=S.observer(({className:l})=>{const{IS_VIEWS_READONLY:r}=v.useBusinessLogic(),{Views:{draftViewsList:d}}=b.useStores(),{viewsArray:w,fixedViews:x}=q.useViews(),[n,o]=t.useState(!1),[V,h]=t.useState(null),j=()=>o(!1);return f.useViewUrlChange(),e.jsxs(e.Fragment,{children:[e.jsxs(i.ViewsContainer,{onClickMenu:r?void 0:()=>o(!0),ariaMenuControls:r?void 0:"views-menu",ariaMenuExpanded:r?!1:n,ref:h,className:l,children:[w.map(s=>e.jsx(a.ErrorBoundary,{children:e.jsx(c.ViewTab,{view:s})},s.id)),d.map(s=>e.jsx(a.ErrorBoundary,{children:e.jsx(c.ViewTab,{view:s})},s.id))]}),!r&&n&&e.jsx(i.Popover,{id:"views-menu",anchorElement:V,placement:"bottom",onShouldClose:()=>o(!1),children:e.jsxs(i.Card.Surface,{children:[e.jsx(u.FixedViews,{children:x.map(s=>e.jsx(i.Text,{variant:"placeholder",children:s.label},s.id||s.label))}),e.jsx(m.SortableViews,{}),e.jsx(u.Divider,{}),e.jsx(p.CreateView,{hideActionsPopover:j})]})})]})});exports.ViewList=C;
|
package/dist/index44.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as s, Fragment as w, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as n } from "react";
|
|
3
3
|
import { observer as V } from "mobx-react";
|
|
4
4
|
import { ViewsContainer as v, Popover as S, Card as x, Text as C } from "@veeqo/ui";
|
|
5
|
-
import { FixedViews as L, Divider as A } from "./
|
|
5
|
+
import { FixedViews as L, Divider as A } from "./index103.js";
|
|
6
6
|
import { SortableViews as E } from "./index41.js";
|
|
7
7
|
import { useViews as b } from "./index62.js";
|
|
8
8
|
import { useViewUrlChange as M } from "./index63.js";
|
package/dist/index78.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@internationalized/date"),f=require("./index70.cjs"),F=require("./index69.cjs"),R=require("lodash/get"),A=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@internationalized/date"),f=require("./index70.cjs"),F=require("./index69.cjs"),R=require("lodash/get"),A=require("./index92.cjs"),_=require("./index9.cjs"),T=r=>r&&r.__esModule?r:{default:r},n=T(R),h=({view:r,canUpdateCustomViews:g})=>{var u,c;const{DATE_RANGE_FILTERS:a,NUMBER_RANGE_FILTERS:o,GROUP_MAP:p}=_.BusinessLogicManager.getBusinessLogic(),s=Array.from(p.values()).flatMap(e=>e.fields),l=r.filters.filter||{},{colourPalette:m,customTextColour:b}=A.getViewTheme((u=r.view_attributes)==null?void 0:u.type);return{id:r.id,label:r.title,viewFilters:l,filterMaps:{filters:new Map(s.filter(e=>!a.includes(e.id)&&!o.includes(e.id)&&e.filterType!=="checkbox").map(e=>{const t=n.default(l,e.id);return[e.id,t!==void 0&&!Array.isArray(t)&&typeof t!="object"?String(t):""]}).filter(([,e])=>e!=="")),arrayFilters:new Map(s.filter(e=>e.filterType==="checkbox").map(e=>{const t=n.default(l,e.id);return[e.id,Array.isArray(t)?t:[]]}).filter(([,e])=>e.length>0)),rangeFilters:new Map(s.filter(e=>a.includes(e.id)).map(e=>{const t=n.default(l,e.id);if(!t)return null;let i;if(typeof t=="string")i=new f.RangeFilter(t);else if(typeof t=="object"&&t.gte&&t.lte){i=new f.RangeFilter("CUSTOM");const y=d.parseDate(t.gte),M=d.parseDate(t.lte);i.setDates(y,M)}else return null;return[e.id,i]}).filter(e=>e!==null)),numberRangeFilters:new Map(s.filter(e=>o.includes(e.id)).map(e=>{const t=n.default(l,e.id);if(!t||typeof t!="object")return null;const i=new F.NumberRangeFilter({filterId:e.id});return t.lte!==void 0&&i.setLte(Number(t.lte)),t.gte!==void 0&&i.setGte(Number(t.gte)),[e.id,i]}).filter(e=>e!==null))},page:r.filters.page,editable:r.editable&&g,isShared:r.shared,columns:r.columns,sort:(c=r.filters)==null?void 0:c.sort,colourPalette:m,customTextColour:b}};exports.viewsAdapter=h;
|
package/dist/index78.js
CHANGED
|
@@ -2,7 +2,7 @@ import { parseDate as c } from "@internationalized/date";
|
|
|
2
2
|
import { RangeFilter as p } from "./index70.js";
|
|
3
3
|
import { NumberRangeFilter as M } from "./index69.js";
|
|
4
4
|
import n from "lodash/get";
|
|
5
|
-
import { getViewTheme as F } from "./
|
|
5
|
+
import { getViewTheme as F } from "./index92.js";
|
|
6
6
|
import { BusinessLogicManager as R } from "./index9.js";
|
|
7
7
|
const S = ({
|
|
8
8
|
view: r,
|
package/dist/index80.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index93.cjs"),w=require("./index79.cjs"),V=require("./index78.cjs"),d=({data:n,canUpdateCustomViews:u})=>{const l={fixedViews:[...r.INITIAL_VIEWS_STATE.fixedViews],customViews:[...r.INITIAL_VIEWS_STATE.customViews],viewsMap:new Map(r.INITIAL_VIEWS_STATE.viewsMap)};if(!n)return l;let o=!1;const i=n.reduce((e,s)=>{const t=V.viewsAdapter({view:s,canUpdateCustomViews:u});return e.viewsMap.set(s.id,t),s.editable?e.customViews.push(t):e.fixedViews.push(t),s.title==="All"&&(o=!0),e},l);return o&&(i.viewsMap.delete(w.ALL_VIEW_ID),i.fixedViews.shift()),i};exports.organiseViews=d;
|
package/dist/index80.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INITIAL_VIEWS_STATE as r } from "./
|
|
1
|
+
import { INITIAL_VIEWS_STATE as r } from "./index93.js";
|
|
2
2
|
import { ALL_VIEW_ID as p } from "./index79.js";
|
|
3
3
|
import { viewsAdapter as u } from "./index78.js";
|
|
4
4
|
const m = ({ data: o, canUpdateCustomViews: w }) => {
|
package/dist/index84.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index109.cjs"),s=e=>{if(!l.isError(e))return e;if(e.stack){const t=e.stack.split(`
|
|
2
2
|
`);if(t.length<=10)return e;const n=t==null?void 0:t[0],i=t==null?void 0:t.splice(9),r=[n,...i].join(`
|
|
3
3
|
`);e.stack=r}return e};exports.filterErrorStack=s;
|
package/dist/index84.js
CHANGED
package/dist/index85.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index109.cjs"),n=({customError:t,originalError:e,type:c})=>{!s.isError(e)||!s.isError(t)||(e.stack&&(e.stack=t.stack),e.name&&(e.name=`${c} (${e.name})`))};exports.injectIntoError=n;
|
package/dist/index85.js
CHANGED
package/dist/index86.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=t=>t.trim().length>=3||t.trim().length===0;exports.isTextFilterValid=e;
|
package/dist/index86.js
CHANGED
package/dist/index87.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_actionsHeaderContainer_fgqms_1",t={actionsHeaderContainer:e};exports.actionsHeaderContainer=e;exports.default=t;
|
package/dist/index87.js
CHANGED
package/dist/index90.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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("./
|
|
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("./index94.cjs"),i=require("./index95.cjs"),T=require("./index96.cjs"),V=require("./index97.cjs"),n=require("./index98.cjs"),D=require("./index91.cjs"),H=require("./index99.cjs"),j=require("./index100.cjs"),{Glyph:O}=w.VeeqoCommon,$=({onClose:u,columnDefinitions: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/index90.js
CHANGED
|
@@ -2,14 +2,14 @@ import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
|
2
2
|
import { Modal as O, Stack as h, Text as p, Button as X, Anchor as A } from "@veeqo/ui";
|
|
3
3
|
import { useState as v, useMemo as f, useCallback as y } from "react";
|
|
4
4
|
import { VeeqoCommon as I } from "@veeqo/components";
|
|
5
|
-
import { ColumnGroup as w } from "./
|
|
6
|
-
import { Container as Y, ColumnGroupsGrid as j, VerticalSeparator as z, VerticalText as B, HeaderContainer as L, ColumnSearch as Q } from "./
|
|
7
|
-
import { DndContainer as R } from "./
|
|
8
|
-
import { ColumnItem as q } from "./
|
|
9
|
-
import { ColumnGroupIds as n } from "./
|
|
5
|
+
import { ColumnGroup as w } from "./index94.js";
|
|
6
|
+
import { Container as Y, ColumnGroupsGrid as j, VerticalSeparator as z, VerticalText as B, HeaderContainer as L, ColumnSearch as Q } from "./index95.js";
|
|
7
|
+
import { DndContainer as R } from "./index96.js";
|
|
8
|
+
import { ColumnItem as q } from "./index97.js";
|
|
9
|
+
import { ColumnGroupIds as n } from "./index98.js";
|
|
10
10
|
import { TableManagementGlyph as P } from "./index91.js";
|
|
11
|
-
import { usePersistColumns as _ } from "./
|
|
12
|
-
import { filterColumnsBySearch as V } from "./
|
|
11
|
+
import { usePersistColumns as _ } from "./index99.js";
|
|
12
|
+
import { filterColumnsBySearch as V } from "./index100.js";
|
|
13
13
|
const { Glyph: E } = I, te = ({
|
|
14
14
|
onClose: l,
|
|
15
15
|
columnDefinitions: k,
|
package/dist/index92.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 t=require("@veeqo/ui"),r=require("./index2.cjs"),s=o=>{let e={colourPalette:t.theme.colors.secondary.blue,customTextColour:void 0};switch(o){case r.ViewStatusTypes.ERROR:e={colourPalette:t.theme.colors.secondary.red,customTextColour:void 0};break}return e};exports.getViewTheme=s;
|
package/dist/index92.js
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { theme as o } from "@veeqo/ui";
|
|
2
|
+
import { ViewStatusTypes as r } from "./index2.js";
|
|
3
|
+
const l = (t) => {
|
|
4
|
+
let e = {
|
|
5
|
+
colourPalette: o.colors.secondary.blue,
|
|
6
|
+
customTextColour: void 0
|
|
7
|
+
};
|
|
8
|
+
switch (t) {
|
|
9
|
+
case r.ERROR:
|
|
10
|
+
e = {
|
|
11
|
+
colourPalette: o.colors.secondary.red,
|
|
12
|
+
customTextColour: void 0
|
|
13
|
+
};
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
return e;
|
|
17
|
+
};
|
|
13
18
|
export {
|
|
14
|
-
|
|
19
|
+
l as getViewTheme
|
|
15
20
|
};
|