@veeqo/transfigure 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BusinessLogic/mocks.d.ts +1 -1
- package/dist/BusinessLogic/types.d.ts +2 -1
- package/dist/hooks/useUrlParams/useUrlParams.d.ts +1 -0
- package/dist/hooks/useUrlParams/useUrlParams.test.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +160 -158
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +184 -18
- package/dist/index100.cjs +19 -1
- package/dist/index100.js +24 -21
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +15 -24
- package/dist/index102.cjs +1 -80
- package/dist/index102.js +21 -101
- package/dist/index103.cjs +80 -1
- package/dist/index103.js +101 -19
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +2 -8
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +17 -62
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +7 -29
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +64 -2
- package/dist/index108.cjs +1 -13
- package/dist/index108.js +30 -17
- package/dist/index109.cjs +13 -1
- package/dist/index109.js +14 -33
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +18 -21
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +32 -22
- package/dist/index111.cjs +1 -7
- package/dist/index111.js +26 -10
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +1 -1
- package/dist/index113.cjs +7 -1
- package/dist/index113.js +10 -47
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +49 -0
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +19 -41
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +41 -23
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +24 -36
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +37 -33
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +32 -49
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +47 -38
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +29 -29
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +41 -58
- package/dist/index2.cjs +1 -1
- package/dist/index2.js +2 -5
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +48 -42
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +50 -44
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +46 -7
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +7 -11
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +11 -64
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +40 -39
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +60 -37
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +36 -53
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +54 -51
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +50 -81
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +5 -5
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +81 -35
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +38 -33
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +33 -10
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +10 -39
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +38 -102
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +103 -19
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +17 -134
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +135 -49
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +51 -32
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +31 -53
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +5 -5
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +54 -48
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +41 -81
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +81 -41
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +48 -5
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +5 -45
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +44 -38
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +39 -19
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +19 -8
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +7 -22
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +23 -2
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +5 -9
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +2 -4
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +4 -11
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +10 -12
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +12 -11
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +11 -184
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +183 -25
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +26 -24
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +19 -22
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +25 -97
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +99 -8
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +8 -75
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +8 -51
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +50 -60
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +57 -18
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +22 -18
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +16 -26
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +26 -10
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +57 -331
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +337 -55
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +50 -47
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +51 -32
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +76 -4
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +30 -24
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +26 -32
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +37 -12
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +13 -9
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +9 -17
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +14 -16
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +18 -49
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +50 -21
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +21 -7
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +7 -2
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +4 -14
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +2 -9
- package/dist/index81.cjs +1 -3
- package/dist/index81.js +8 -13
- package/dist/index82.cjs +3 -1
- package/dist/index82.js +13 -8
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +7 -116
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +117 -18
- package/dist/index85.cjs +1 -11
- package/dist/index85.js +19 -16
- package/dist/index86.cjs +11 -1
- package/dist/index86.js +16 -41
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +40 -8
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +9 -13
- package/dist/index89.cjs +1 -104
- package/dist/index89.js +13 -120
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +13 -181
- package/dist/index90.cjs +104 -1
- package/dist/index90.js +117 -65
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +63 -24
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +29 -2
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +2 -41
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +39 -9
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +10 -14
- package/dist/index96.cjs +1 -12
- package/dist/index96.js +24 -16
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +4 -4
- package/dist/index99.cjs +11 -18
- package/dist/index99.js +12 -20
- package/dist/mobx/Filters/Filters.d.ts +1 -1
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
package/dist/index3.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { axios as t } from "./
|
|
2
|
-
import { withCSRF as
|
|
3
|
-
import { vndAPI as
|
|
4
|
-
const s = (
|
|
1
|
+
import { axios as t } from "./index7.js";
|
|
2
|
+
import { withCSRF as e } from "./index52.js";
|
|
3
|
+
import { vndAPI as i } from "./index53.js";
|
|
4
|
+
const s = (o) => t.delete(`/api/v2/custom_views/${o}`, e(i));
|
|
5
5
|
export {
|
|
6
|
-
s as
|
|
6
|
+
s as deleteCustomView
|
|
7
7
|
};
|
package/dist/index30.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),_=require("mobx-react"),j=require("lodash/debounce"),r=require("@veeqo/ui"),L=require("./index110.cjs"),R=require("./index68.cjs"),p=require("./index8.cjs"),y=require("./index60.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/index30.js
CHANGED
|
@@ -1,41 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { Stack as c,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { jsxs as R, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, useCallback as I } from "react";
|
|
3
|
+
import { observer as k } from "mobx-react";
|
|
4
|
+
import E from "lodash/debounce";
|
|
5
|
+
import { Stack as c, Button as _, TextField as p } from "@veeqo/ui";
|
|
6
|
+
import { MUISlider as A } from "./index110.js";
|
|
7
|
+
import { NumberRangeFilter as h } from "./index68.js";
|
|
8
|
+
import { useBusinessLogic as B } from "./index8.js";
|
|
9
|
+
import { useStores as T } from "./index60.js";
|
|
10
|
+
const q = k(({ field: l }) => {
|
|
11
|
+
var x;
|
|
12
|
+
const { FILTERS_DEBOUCE_INTERVAL_MS: F } = B(), {
|
|
13
|
+
Filters: { numberRangeFilters: f, setNumberRangeFilter: M, clearNumberRangeFilter: d }
|
|
14
|
+
} = T(), e = f.get(l.id), [a, r] = y({
|
|
15
|
+
gte: (e == null ? void 0 : e.gte) ?? 0,
|
|
16
|
+
lte: (e == null ? void 0 : e.lte) ?? 100
|
|
17
|
+
});
|
|
18
|
+
if (!((x = l.options) != null && x.length)) return null;
|
|
19
|
+
const m = () => {
|
|
20
|
+
const o = new h({ filterId: l.id });
|
|
21
|
+
return f.set(l.id, o), o;
|
|
22
|
+
}, g = I(
|
|
23
|
+
E(({ numberRange: o, lte: t, gte: i }) => {
|
|
24
|
+
M({ numberRange: o, lte: t, gte: i });
|
|
25
|
+
}, F),
|
|
26
|
+
[M]
|
|
27
|
+
), C = () => {
|
|
28
|
+
r({ gte: 0, lte: 100 }), d(l.id);
|
|
29
|
+
}, N = (o, t) => {
|
|
30
|
+
let i = new h({ filterId: l.id });
|
|
31
|
+
if (e || (i = m()), !Array.isArray(t) || t.length !== 2) return;
|
|
32
|
+
const [n, b] = t;
|
|
33
|
+
r({ gte: n, lte: b }), g(e ? { numberRange: e, lte: b, gte: n } : { numberRange: i, lte: b, gte: n });
|
|
34
|
+
}, S = (o) => {
|
|
35
|
+
if (e || m(), !e) return;
|
|
36
|
+
const t = Number(o);
|
|
37
|
+
if (t > e.lteMax) return;
|
|
38
|
+
let { lte: i } = e, { gte: n } = e;
|
|
39
|
+
t >= e.gteMin && t <= e.lteMax && (n = t), (!e.lte || t >= e.lte) && (i = e.lteMax), r({ gte: n, lte: i }), g({ numberRange: e, lte: i, gte: n });
|
|
40
|
+
}, L = (o) => {
|
|
41
|
+
if (e || m(), !e) return;
|
|
42
|
+
const t = Number(o);
|
|
43
|
+
if (t < e.gteMin) return;
|
|
44
|
+
let { lte: i } = e, { gte: n } = e;
|
|
45
|
+
t >= e.gteMin && t <= e.lteMax && (i = t), (!e.gte || t <= e.gte) && (n = e.gteMin), r({ gte: n, lte: i }), g({ numberRange: e, lte: i, gte: n });
|
|
46
|
+
}, v = [a.gte, a.lte];
|
|
47
|
+
return /* @__PURE__ */ R(c, { spacing: "xs", alignX: "stretch", children: [
|
|
48
|
+
/* @__PURE__ */ s(_, { variant: "link", onClick: C, children: "Clear" }),
|
|
49
|
+
/* @__PURE__ */ R(c, { direction: "horizontal", children: [
|
|
50
|
+
/* @__PURE__ */ s(
|
|
51
|
+
p,
|
|
52
|
+
{
|
|
53
|
+
label: e == null ? void 0 : e.gteMinLabel,
|
|
54
|
+
type: "number",
|
|
55
|
+
min: e == null ? void 0 : e.gteMin,
|
|
56
|
+
max: e == null ? void 0 : e.lteMax,
|
|
57
|
+
value: a.gte.toString(),
|
|
58
|
+
onChange: S
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ s(
|
|
62
|
+
p,
|
|
63
|
+
{
|
|
64
|
+
label: e == null ? void 0 : e.lteMaxLabel,
|
|
65
|
+
type: "number",
|
|
66
|
+
min: e == null ? void 0 : e.gteMin,
|
|
67
|
+
max: e == null ? void 0 : e.lteMax,
|
|
68
|
+
value: a.lte.toString(),
|
|
69
|
+
onChange: L
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ s(
|
|
74
|
+
A,
|
|
27
75
|
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
76
|
+
value: v,
|
|
77
|
+
onChange: N,
|
|
78
|
+
min: e == null ? void 0 : e.gteMin,
|
|
79
|
+
max: e == null ? void 0 : e.lteMax,
|
|
80
|
+
valueLabelDisplay: "auto"
|
|
32
81
|
}
|
|
33
82
|
)
|
|
34
|
-
] })
|
|
35
|
-
"No options available for ",
|
|
36
|
-
e.label
|
|
37
|
-
] }) });
|
|
83
|
+
] });
|
|
38
84
|
});
|
|
39
85
|
export {
|
|
40
|
-
|
|
86
|
+
q as NumberRangeFilter
|
|
41
87
|
};
|
package/dist/index31.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 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("./index60.cjs"),q=e=>e&&e.__esModule?e:{default:e},C=q(p),F=x.observer(({field:e})=>{var i;const{FILTERS_DEBOUCE_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/index31.js
CHANGED
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { observer as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
import { jsx as n, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { observer as g } from "mobx-react";
|
|
3
|
+
import { useState as S, useCallback as C } from "react";
|
|
4
|
+
import x from "lodash/debounce";
|
|
5
|
+
import { Stack as c, Text as F, Button as V, ChoiceList as f } from "@veeqo/ui";
|
|
6
|
+
import { useBusinessLogic as k } from "./index8.js";
|
|
7
|
+
import { useStores as v } from "./index60.js";
|
|
8
|
+
const I = g(({ field: e }) => {
|
|
9
|
+
var i;
|
|
10
|
+
const { FILTERS_DEBOUCE_INTERVAL_MS: a } = k(), {
|
|
11
|
+
Filters: { setFilter: r, filters: m }
|
|
12
|
+
} = v(), u = m.get(e.id), [p, s] = S(u), d = C(
|
|
13
|
+
x((t, o) => {
|
|
14
|
+
r(t, o);
|
|
15
|
+
}, a),
|
|
16
|
+
[r]
|
|
17
|
+
), h = (t) => {
|
|
18
|
+
const o = `${t[0]}`;
|
|
19
|
+
s(o), d(e.id, o);
|
|
20
|
+
}, b = () => {
|
|
21
|
+
s(""), r(e.id, "");
|
|
22
|
+
};
|
|
23
|
+
return (i = e.options) != null && i.length ? /* @__PURE__ */ l(c, { spacing: "xs", children: [
|
|
24
|
+
/* @__PURE__ */ n(V, { variant: "link", onClick: b, children: "Clear" }),
|
|
25
|
+
/* @__PURE__ */ n(
|
|
26
|
+
f,
|
|
27
|
+
{
|
|
28
|
+
title: e.label,
|
|
29
|
+
options: e.options,
|
|
30
|
+
selected: [p],
|
|
31
|
+
onChange: (t) => h(t)
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
] }) : /* @__PURE__ */ n(c, { spacing: "xs", alignX: "stretch", children: /* @__PURE__ */ l(F, { variant: "bodySmall", children: [
|
|
35
|
+
"No options available for ",
|
|
36
|
+
e.label
|
|
37
|
+
] }) });
|
|
33
38
|
});
|
|
34
39
|
export {
|
|
35
|
-
|
|
40
|
+
I as RadioFilter
|
|
36
41
|
};
|
package/dist/index32.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("mobx-react"),s=require("@veeqo/ui"),i=require("@veeqo/components"),l=require("./index60.cjs"),n=require("./index33.cjs"),{Glyph:d}=i.VeeqoCommon,c=t.observer(()=>{const{Filters:{isFiltersDropdownVisible:o,toggleFiltersDropdownVisible:r}}=l.useStores();return e.jsx(s.Dropdown,{id:"filters-dropdown",ctaProps:{iconSlot:e.jsx(d,{name:"filter"}),children:"Filters",loading:!1,disabled:!1,className:"act-toggle-filter",style:{borderRadius:s.theme.radius.base}},style:{padding:0},shouldShow:o,setShouldShow:r,children:e.jsx(n.FiltersList,{})})});exports.FiltersDropdown=c;
|
package/dist/index32.js
CHANGED
|
@@ -1,13 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { observer as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
const {
|
|
9
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { observer as s } from "mobx-react";
|
|
3
|
+
import { Dropdown as t, theme as i } from "@veeqo/ui";
|
|
4
|
+
import { VeeqoCommon as l } from "@veeqo/components";
|
|
5
|
+
import { useStores as d } from "./index60.js";
|
|
6
|
+
import { FiltersList as m } from "./index33.js";
|
|
7
|
+
const { Glyph: n } = l, b = s(() => {
|
|
8
|
+
const {
|
|
9
|
+
Filters: { isFiltersDropdownVisible: r, toggleFiltersDropdownVisible: e }
|
|
10
|
+
} = d();
|
|
11
|
+
return /* @__PURE__ */ o(
|
|
12
|
+
t,
|
|
13
|
+
{
|
|
14
|
+
id: "filters-dropdown",
|
|
15
|
+
ctaProps: {
|
|
16
|
+
iconSlot: /* @__PURE__ */ o(n, { name: "filter" }),
|
|
17
|
+
children: "Filters",
|
|
18
|
+
loading: !1,
|
|
19
|
+
// TODO needs implementing?
|
|
20
|
+
disabled: !1,
|
|
21
|
+
// TODO needs implementing?
|
|
22
|
+
className: "act-toggle-filter",
|
|
23
|
+
style: { borderRadius: i.radius.base }
|
|
24
|
+
},
|
|
25
|
+
style: {
|
|
26
|
+
padding: 0
|
|
27
|
+
},
|
|
28
|
+
shouldShow: r,
|
|
29
|
+
setShouldShow: e,
|
|
30
|
+
children: /* @__PURE__ */ o(m, {})
|
|
31
|
+
}
|
|
32
|
+
);
|
|
10
33
|
});
|
|
11
34
|
export {
|
|
12
|
-
|
|
35
|
+
b as FiltersDropdown
|
|
13
36
|
};
|
package/dist/index33.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index8.cjs"),u=require("./index96.cjs"),c=require("./index34.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/index33.js
CHANGED
|
@@ -1,42 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { observer as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { AsyncCheckboxFilter as T } from "./index24.js";
|
|
11
|
-
import { CheckboxFilter as h } from "./index26.js";
|
|
12
|
-
const k = p(({ data: i }) => {
|
|
13
|
-
const o = i.fields.filter(
|
|
14
|
-
(r) => r.filterType === t.TEXT || r.filterType === t.NUMBER
|
|
15
|
-
), n = i.fields.filter(
|
|
16
|
-
(r) => r.filterType !== t.TEXT && r.filterType !== t.NUMBER
|
|
17
|
-
);
|
|
18
|
-
return /* @__PURE__ */ e(s, { iconSlot: i.glyph, label: i.label, children: /* @__PURE__ */ l(c, { children: [
|
|
19
|
-
o.length > 0 ? /* @__PURE__ */ e(m, { fields: o, groupId: i.id }) : null,
|
|
20
|
-
n.map((r) => {
|
|
21
|
-
switch (r.filterType) {
|
|
22
|
-
case t.CHECKBOX:
|
|
23
|
-
return r.fetchAsyncFilterOptions ? /* @__PURE__ */ e(T, { field: r }) : /* @__PURE__ */ e(h, { field: r });
|
|
24
|
-
case t.RADIO:
|
|
25
|
-
return r.fetchAsyncFilterOptions ? /* @__PURE__ */ e(F, { field: r }) : /* @__PURE__ */ e(y, { field: r });
|
|
26
|
-
case t.DATE_RANGE:
|
|
27
|
-
return /* @__PURE__ */ e(u, { field: r });
|
|
28
|
-
case t.NUMBER_RANGE:
|
|
29
|
-
return /* @__PURE__ */ e(f, { field: r });
|
|
30
|
-
default:
|
|
31
|
-
return /* @__PURE__ */ l("div", { children: [
|
|
32
|
-
r.id,
|
|
33
|
-
": Unknown filter type: ",
|
|
34
|
-
r.filterType
|
|
35
|
-
] }, r.id);
|
|
36
|
-
}
|
|
37
|
-
})
|
|
38
|
-
] }) });
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { observer as e } from "mobx-react";
|
|
3
|
+
import { Stack as m } from "@veeqo/ui";
|
|
4
|
+
import { useBusinessLogic as s } from "./index8.js";
|
|
5
|
+
import { AdaptiveHeightContainer as p } from "./index96.js";
|
|
6
|
+
import { FilterGroup as n } from "./index34.js";
|
|
7
|
+
const u = e(() => {
|
|
8
|
+
const { GROUP_MAP: t } = s();
|
|
9
|
+
return /* @__PURE__ */ r(p, { style: { minWidth: "360px" }, children: /* @__PURE__ */ r(m, { alignX: "stretch", children: Array.from(t).map(([o, i]) => /* @__PURE__ */ r(n, { data: i }, o)) }) });
|
|
39
10
|
});
|
|
40
11
|
export {
|
|
41
|
-
|
|
12
|
+
u as FiltersList
|
|
42
13
|
};
|
package/dist/index34.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"),c=require("mobx-react"),s=require("@veeqo/ui"),t=require("./index48.cjs"),o=require("./index29.cjs"),u=require("./index30.cjs"),F=require("./index28.cjs"),a=require("./index26.cjs"),h=require("./index31.cjs"),x=require("./index25.cjs"),p=require("./index27.cjs"),y=c.observer(({data:i})=>{const l=i.fields.filter(e=>e.filterType===t.FilterChoiceValue.TEXT||e.filterType===t.FilterChoiceValue.NUMBER),n=i.fields.filter(e=>e.filterType!==t.FilterChoiceValue.TEXT&&e.filterType!==t.FilterChoiceValue.NUMBER);return r.jsx(s.Accordion,{iconSlot:i.glyph,label:i.label,children:r.jsxs(s.Stack,{children:[l.length>0?r.jsx(o.MultipleFieldFilter,{fields:l,groupId:i.id}):null,n.map(e=>{switch(e.filterType){case t.FilterChoiceValue.CHECKBOX:return e.fetchAsyncFilterOptions?r.jsx(x.AsyncCheckboxFilter,{field:e}):r.jsx(p.CheckboxFilter,{field:e});case t.FilterChoiceValue.RADIO:return e.fetchAsyncFilterOptions?r.jsx(a.AsyncRadioFilter,{field:e}):r.jsx(h.RadioFilter,{field:e});case t.FilterChoiceValue.DATE_RANGE:return r.jsx(F.DateRangeFilter,{field:e});case t.FilterChoiceValue.NUMBER_RANGE:return r.jsx(u.NumberRangeFilter,{field:e});default:return r.jsxs("div",{children:[e.id,": Unknown filter type: ",e.filterType]},e.id)}})]})})});exports.FilterGroup=y;
|
package/dist/index34.js
CHANGED
|
@@ -1,106 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
behavior: "smooth",
|
|
37
|
-
left: i.offsetLeft
|
|
38
|
-
});
|
|
39
|
-
}));
|
|
40
|
-
const h = C(() => t ? "draft" : e.editable ? "saved" : "fixed", [t, e.editable]), {
|
|
41
|
-
actions: {
|
|
42
|
-
create: { handleSaveDraft: j },
|
|
43
|
-
menu: { toggleDropdown: V },
|
|
44
|
-
delete: { closeDeleteConfirmation: B, handleDelete: q, handleDeleteDraftView: g }
|
|
45
|
-
},
|
|
46
|
-
state: { shouldShowDeleteConfirmation: H },
|
|
47
|
-
actions: O,
|
|
48
|
-
state: D
|
|
49
|
-
} = ee(e), U = C(() => {
|
|
50
|
-
if (w) return V;
|
|
51
|
-
if (t) return g;
|
|
52
|
-
}, [g, t, w, V]);
|
|
53
|
-
return /* @__PURE__ */ W(Y, { children: [
|
|
54
|
-
/* @__PURE__ */ s(
|
|
55
|
-
G,
|
|
56
|
-
{
|
|
57
|
-
colourPalette: L.colors.secondary.blue,
|
|
58
|
-
className: "act-react-listing-custom-view",
|
|
59
|
-
active: n,
|
|
60
|
-
id: e == null ? void 0 : e.id,
|
|
61
|
-
name: a,
|
|
62
|
-
type: h,
|
|
63
|
-
count: M ? /* @__PURE__ */ s(
|
|
64
|
-
J,
|
|
65
|
-
{
|
|
66
|
-
type: "ThreeDots",
|
|
67
|
-
width: 12,
|
|
68
|
-
height: 12,
|
|
69
|
-
color: n ? "#fff" : L.colors.neutral.ink.dark
|
|
70
|
-
}
|
|
71
|
-
) : P,
|
|
72
|
-
onClick: I,
|
|
73
|
-
subAction: U,
|
|
74
|
-
ariaContext: "orders",
|
|
75
|
-
ref: R,
|
|
76
|
-
"aria-controls": "options-dropdown",
|
|
77
|
-
"aria-expanded": D.shouldShowDropdown,
|
|
78
|
-
"aria-haspopup": "dialog"
|
|
79
|
-
},
|
|
80
|
-
e == null ? void 0 : e.id
|
|
81
|
-
),
|
|
82
|
-
/* @__PURE__ */ s(
|
|
83
|
-
re,
|
|
84
|
-
{
|
|
85
|
-
shouldShow: H,
|
|
86
|
-
viewName: a,
|
|
87
|
-
onCancel: B,
|
|
88
|
-
onDelete: q
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { observer as p } from "mobx-react";
|
|
3
|
+
import { Accordion as s, Stack as c } from "@veeqo/ui";
|
|
4
|
+
import { FilterChoiceValue as t } from "./index48.js";
|
|
5
|
+
import { MultipleFieldFilter as m } from "./index29.js";
|
|
6
|
+
import { NumberRangeFilter as f } from "./index30.js";
|
|
7
|
+
import { DateRangeFilter as u } from "./index28.js";
|
|
8
|
+
import { AsyncRadioFilter as F } from "./index26.js";
|
|
9
|
+
import { RadioFilter as y } from "./index31.js";
|
|
10
|
+
import { AsyncCheckboxFilter as T } from "./index25.js";
|
|
11
|
+
import { CheckboxFilter as h } from "./index27.js";
|
|
12
|
+
const k = p(({ data: i }) => {
|
|
13
|
+
const o = i.fields.filter(
|
|
14
|
+
(r) => r.filterType === t.TEXT || r.filterType === t.NUMBER
|
|
15
|
+
), n = i.fields.filter(
|
|
16
|
+
(r) => r.filterType !== t.TEXT && r.filterType !== t.NUMBER
|
|
17
|
+
);
|
|
18
|
+
return /* @__PURE__ */ e(s, { iconSlot: i.glyph, label: i.label, children: /* @__PURE__ */ l(c, { children: [
|
|
19
|
+
o.length > 0 ? /* @__PURE__ */ e(m, { fields: o, groupId: i.id }) : null,
|
|
20
|
+
n.map((r) => {
|
|
21
|
+
switch (r.filterType) {
|
|
22
|
+
case t.CHECKBOX:
|
|
23
|
+
return r.fetchAsyncFilterOptions ? /* @__PURE__ */ e(T, { field: r }) : /* @__PURE__ */ e(h, { field: r });
|
|
24
|
+
case t.RADIO:
|
|
25
|
+
return r.fetchAsyncFilterOptions ? /* @__PURE__ */ e(F, { field: r }) : /* @__PURE__ */ e(y, { field: r });
|
|
26
|
+
case t.DATE_RANGE:
|
|
27
|
+
return /* @__PURE__ */ e(u, { field: r });
|
|
28
|
+
case t.NUMBER_RANGE:
|
|
29
|
+
return /* @__PURE__ */ e(f, { field: r });
|
|
30
|
+
default:
|
|
31
|
+
return /* @__PURE__ */ l("div", { children: [
|
|
32
|
+
r.id,
|
|
33
|
+
": Unknown filter type: ",
|
|
34
|
+
r.filterType
|
|
35
|
+
] }, r.id);
|
|
89
36
|
}
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
Z,
|
|
93
|
-
{
|
|
94
|
-
tabType: h,
|
|
95
|
-
isActive: n,
|
|
96
|
-
initialViewName: a,
|
|
97
|
-
shouldShowCreateViewNotification: t,
|
|
98
|
-
handleSaveDraft: j
|
|
99
|
-
}
|
|
100
|
-
),
|
|
101
|
-
/* @__PURE__ */ s(b, { referenceElement: i, tab: e, ...O, ...D })
|
|
102
|
-
] });
|
|
37
|
+
})
|
|
38
|
+
] }) });
|
|
103
39
|
});
|
|
104
40
|
export {
|
|
105
|
-
|
|
41
|
+
k as FilterGroup
|
|
106
42
|
};
|
package/dist/index35.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 i=require("react/jsx-runtime"),a=require("react"),c=require("@veeqo/ui"),W=require("mobx-react"),Y=require("./index64.cjs"),z=require("./index61.cjs"),G=require("./index39.cjs"),J=require("./index42.cjs"),K=require("./index55.cjs"),Q=require("./index97.cjs"),X=require("./index8.cjs"),Z=require("./index60.cjs"),$=require("./index98.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;
|