@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/index19.js
CHANGED
|
@@ -1,60 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { observer as
|
|
4
|
-
import { FilterTag as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useStores as
|
|
8
|
-
import { ActiveFilterFooter as
|
|
9
|
-
import { ActiveFilterHeader as
|
|
10
|
-
const
|
|
11
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
label: n.label,
|
|
42
|
-
text: (t == null ? void 0 : t.filterLabel) || "",
|
|
43
|
-
content: /* @__PURE__ */ s(u, { style: { padding: v.sizes.md }, children: /* @__PURE__ */ s(
|
|
44
|
-
P,
|
|
45
|
-
{
|
|
46
|
-
"aria-label": `date range for ${n.label}`,
|
|
47
|
-
selectedPreset: R,
|
|
48
|
-
setSelectedPreset: T,
|
|
49
|
-
selectedRange: d,
|
|
50
|
-
setSelectedRange: y
|
|
51
|
-
}
|
|
52
|
-
) }),
|
|
53
|
-
footer: /* @__PURE__ */ s(L, { clearActiveFilter: F, applyActiveFilter: f })
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
);
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useEffect as F } from "react";
|
|
3
|
+
import { observer as u } from "mobx-react";
|
|
4
|
+
import { FilterTag as y, BaseContainer as A, theme as f } from "@veeqo/ui";
|
|
5
|
+
import { useFilterArrayLabel as b } from "./index57.js";
|
|
6
|
+
import { FilterArrayField as g } from "./index16.js";
|
|
7
|
+
import { useStores as h } from "./index60.js";
|
|
8
|
+
import { ActiveFilterFooter as v } from "./index23.js";
|
|
9
|
+
import { ActiveFilterHeader as V } from "./index24.js";
|
|
10
|
+
const z = u(({ filterData: e }) => {
|
|
11
|
+
const {
|
|
12
|
+
Filters: { arrayFilters: o, clearArrayFilter: s, setArrayFilter: d }
|
|
13
|
+
} = h(), t = o.get(e.id), [i, l] = p(t || []);
|
|
14
|
+
F(() => {
|
|
15
|
+
i !== t && l(t || []);
|
|
16
|
+
}, [e.id, t, o]);
|
|
17
|
+
const m = () => {
|
|
18
|
+
s(e.id);
|
|
19
|
+
}, c = () => {
|
|
20
|
+
d(e.id, i);
|
|
21
|
+
}, { filterLabel: a } = b({ filterData: e });
|
|
22
|
+
return /* @__PURE__ */ r(
|
|
23
|
+
y,
|
|
24
|
+
{
|
|
25
|
+
shouldCloseOnClickAway: !0,
|
|
26
|
+
header: /* @__PURE__ */ r(V, { filterLabel: e.label, glyph: e.glyph }),
|
|
27
|
+
label: e.label,
|
|
28
|
+
text: a || "",
|
|
29
|
+
content: /* @__PURE__ */ r(A, { style: { padding: f.sizes.md }, children: /* @__PURE__ */ r(
|
|
30
|
+
g,
|
|
31
|
+
{
|
|
32
|
+
data: e,
|
|
33
|
+
editedValue: i || [],
|
|
34
|
+
setEditedValue: (n) => l(n)
|
|
35
|
+
}
|
|
36
|
+
) }),
|
|
37
|
+
footer: /* @__PURE__ */ r(v, { clearActiveFilter: m, applyActiveFilter: c })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
});
|
|
58
41
|
export {
|
|
59
|
-
|
|
42
|
+
z as ActiveFilterArrayTag
|
|
60
43
|
};
|
package/dist/index2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var r=(e=>(e.MONOLITH="MONOLITH",e.CORAL="CORAL",e))(r||{});exports.SortingMode=r;
|
package/dist/index2.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { withCSRF as e } from "./index51.js";
|
|
3
|
-
import { vndAPI as i } from "./index52.js";
|
|
4
|
-
const s = (o) => t.delete(`/api/v2/custom_views/${o}`, e(i));
|
|
1
|
+
var L = /* @__PURE__ */ ((O) => (O.MONOLITH = "MONOLITH", O.CORAL = "CORAL", O))(L || {});
|
|
5
2
|
export {
|
|
6
|
-
|
|
3
|
+
L as SortingMode
|
|
7
4
|
};
|
package/dist/index20.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 n=require("react/jsx-runtime"),o=require("react"),h=require("mobx-react"),i=require("@veeqo/ui"),a=require("./index69.cjs"),f=require("./index8.cjs"),q=require("./index60.cjs"),E=require("./index23.cjs"),S=require("./index24.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/index20.js
CHANGED
|
@@ -1,54 +1,60 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { observer as
|
|
4
|
-
import { FilterTag as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useStores as
|
|
8
|
-
import { ActiveFilterFooter as
|
|
9
|
-
import { ActiveFilterHeader as w } from "./
|
|
10
|
-
const
|
|
11
|
-
({ filterData:
|
|
12
|
-
const {
|
|
13
|
-
Filters: {
|
|
14
|
-
} =
|
|
15
|
-
const r = new
|
|
16
|
-
return
|
|
17
|
-
}, [t.id, e]);
|
|
18
|
-
F(() => {
|
|
19
|
-
const r = n();
|
|
20
|
-
l(r);
|
|
21
|
-
}, [n, e]);
|
|
22
|
-
const g = () => {
|
|
23
|
-
s(t.id);
|
|
24
|
-
}, u = () => {
|
|
25
|
-
!e || !o || c({
|
|
26
|
-
numberRange: e,
|
|
27
|
-
// update the original value
|
|
28
|
-
lte: o.lte,
|
|
29
|
-
gte: o.gte
|
|
30
|
-
});
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as A, useEffect as h } from "react";
|
|
3
|
+
import { observer as E } from "mobx-react";
|
|
4
|
+
import { FilterTag as b, BaseContainer as u, theme as v, DateRangePicker as P } from "@veeqo/ui";
|
|
5
|
+
import { RangeFilter as l } from "./index69.js";
|
|
6
|
+
import { useBusinessLogic as S } from "./index8.js";
|
|
7
|
+
import { useStores as C } from "./index60.js";
|
|
8
|
+
import { ActiveFilterFooter as L } from "./index23.js";
|
|
9
|
+
import { ActiveFilterHeader as w } from "./index24.js";
|
|
10
|
+
const H = E(
|
|
11
|
+
({ filterData: n }) => {
|
|
12
|
+
const { DEFAULT_DATE_PRESET: a, DEFAULT_DATE_RANGE: c } = S(), {
|
|
13
|
+
Filters: { dateRangeFilters: i, clearRangeFilter: g, setRangeFilter: p }
|
|
14
|
+
} = C(), t = i.get(n.id), [e, o] = A(i.get(n.id)), m = () => {
|
|
15
|
+
const r = new l();
|
|
16
|
+
return r.setFilterType(t == null ? void 0 : t.filterType), o(r), r;
|
|
31
17
|
};
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
h(() => {
|
|
19
|
+
if (!t) return;
|
|
20
|
+
const r = new l();
|
|
21
|
+
r.setFilterType(t.filterType), t.gte && t.lte && r.setDates(t.gte, t.lte), o(r);
|
|
22
|
+
}, [t]);
|
|
23
|
+
const F = () => {
|
|
24
|
+
g(n.id);
|
|
25
|
+
}, f = () => {
|
|
26
|
+
t && (e != null && e.filterType) && p({
|
|
27
|
+
dates: { start: e.gte, end: e.lte },
|
|
28
|
+
key: e.filterType,
|
|
29
|
+
range: t
|
|
30
|
+
});
|
|
31
|
+
}, R = (e == null ? void 0 : e.filterSelection) || a, T = (r) => {
|
|
32
|
+
r && (e || m(), e == null || e.setFilterType(r.value));
|
|
33
|
+
}, y = (r) => {
|
|
34
|
+
!r || !e || e.setDates(r.start, r.end);
|
|
35
|
+
}, d = e ? e.selectedRange : c;
|
|
36
|
+
return /* @__PURE__ */ s(
|
|
37
|
+
b,
|
|
34
38
|
{
|
|
35
39
|
shouldCloseOnClickAway: !0,
|
|
36
|
-
header: /* @__PURE__ */
|
|
37
|
-
label:
|
|
38
|
-
text: (
|
|
39
|
-
content: /* @__PURE__ */
|
|
40
|
-
|
|
40
|
+
header: /* @__PURE__ */ s(w, { filterLabel: n.label, glyph: n.glyph }),
|
|
41
|
+
label: n.label,
|
|
42
|
+
text: (t == null ? void 0 : t.filterLabel) || "",
|
|
43
|
+
content: /* @__PURE__ */ s(u, { style: { padding: v.sizes.md }, children: /* @__PURE__ */ s(
|
|
44
|
+
P,
|
|
41
45
|
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
"aria-label": `date range for ${n.label}`,
|
|
47
|
+
selectedPreset: R,
|
|
48
|
+
setSelectedPreset: T,
|
|
49
|
+
selectedRange: d,
|
|
50
|
+
setSelectedRange: y
|
|
45
51
|
}
|
|
46
52
|
) }),
|
|
47
|
-
footer: /* @__PURE__ */
|
|
53
|
+
footer: /* @__PURE__ */ s(L, { clearActiveFilter: F, applyActiveFilter: f })
|
|
48
54
|
}
|
|
49
55
|
);
|
|
50
56
|
}
|
|
51
57
|
);
|
|
52
58
|
export {
|
|
53
|
-
|
|
59
|
+
H as ActiveFilterDateRangeTag
|
|
54
60
|
};
|
package/dist/index21.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"),s=require("react"),d=require("mobx-react"),l=require("@veeqo/ui"),m=require("./index68.cjs"),R=require("./index112.cjs"),v=require("./index60.cjs"),N=require("./index23.cjs"),q=require("./index24.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/index21.js
CHANGED
|
@@ -1,48 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { observer as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as a, useCallback as d, useEffect as F } from "react";
|
|
3
|
+
import { observer as b } from "mobx-react";
|
|
4
|
+
import { FilterTag as p, BaseContainer as f, theme as R } from "@veeqo/ui";
|
|
5
|
+
import { NumberRangeFilter as N } from "./index68.js";
|
|
6
|
+
import { FilterNumberRangeFilter as h } from "./index112.js";
|
|
7
|
+
import { useStores as v } from "./index60.js";
|
|
8
|
+
import { ActiveFilterFooter as A } from "./index23.js";
|
|
9
|
+
import { ActiveFilterHeader as w } from "./index24.js";
|
|
10
|
+
const z = b(
|
|
11
|
+
({ filterData: t }) => {
|
|
12
|
+
const {
|
|
13
|
+
Filters: { numberRangeFilters: m, clearNumberRangeFilter: s, setNumberRangeFilter: c }
|
|
14
|
+
} = v(), e = m.get(t.id), [o, l] = a(e), n = d(() => {
|
|
15
|
+
const r = new N({ filterId: t.id });
|
|
16
|
+
return e && (e.gte && r.setGte(e.gte), e.lte && r.setLte(e.lte)), r;
|
|
17
|
+
}, [t.id, e]);
|
|
18
|
+
F(() => {
|
|
19
|
+
const r = n();
|
|
20
|
+
l(r);
|
|
21
|
+
}, [n, e]);
|
|
22
|
+
const g = () => {
|
|
23
|
+
s(t.id);
|
|
24
|
+
}, u = () => {
|
|
25
|
+
!e || !o || c({
|
|
26
|
+
numberRange: e,
|
|
27
|
+
// update the original value
|
|
28
|
+
lte: o.lte,
|
|
29
|
+
gte: o.gte
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ i(
|
|
33
|
+
p,
|
|
34
|
+
{
|
|
35
|
+
shouldCloseOnClickAway: !0,
|
|
36
|
+
header: /* @__PURE__ */ i(w, { filterLabel: t.label, glyph: t.glyph }),
|
|
37
|
+
label: t.label,
|
|
38
|
+
text: (e == null ? void 0 : e.filterLabel) || "Loading...",
|
|
39
|
+
content: /* @__PURE__ */ i(f, { style: { padding: R.sizes.md }, children: /* @__PURE__ */ i(
|
|
40
|
+
h,
|
|
41
|
+
{
|
|
42
|
+
data: t,
|
|
43
|
+
editedValue: o,
|
|
44
|
+
setEditedValue: l
|
|
45
|
+
}
|
|
46
|
+
) }),
|
|
47
|
+
footer: /* @__PURE__ */ i(A, { clearActiveFilter: g, applyActiveFilter: u })
|
|
48
|
+
}
|
|
49
|
+
);
|
|
44
50
|
}
|
|
45
51
|
);
|
|
46
52
|
export {
|
|
47
|
-
|
|
53
|
+
z as ActiveFilterNumberRangeTag
|
|
48
54
|
};
|
package/dist/index22.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"),b=require("react"),m=require("mobx-react"),t=require("@veeqo/ui"),p=require("swr/immutable"),y=require("./index74.cjs"),F=require("./index75.cjs"),O=require("./index48.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/index22.js
CHANGED
|
@@ -1,9 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as O } from "react";
|
|
3
|
+
import { observer as u } from "mobx-react";
|
|
4
|
+
import { Stack as F, ChoiceList as b, Skeleton as y, theme as A, Text as d } from "@veeqo/ui";
|
|
5
|
+
import x from "swr/immutable";
|
|
6
|
+
import { getAsyncOptions as S } from "./index74.js";
|
|
7
|
+
import { getFetcherFunction as L } from "./index75.js";
|
|
8
|
+
import { SWR_HOOK_OPTIONS as R } from "./index48.js";
|
|
9
|
+
const _ = u(
|
|
10
|
+
({ field: t, editedValue: c, setEditedValue: a }) => {
|
|
11
|
+
var o, i;
|
|
12
|
+
const l = O(() => {
|
|
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 } = x(
|
|
16
|
+
(i = t.fetchAsyncFilterOptions) == null ? void 0 : i.URL,
|
|
17
|
+
l,
|
|
18
|
+
R
|
|
19
|
+
), r = m || h, g = S({ data: p, config: t.fetchAsyncFilterOptions });
|
|
20
|
+
return /* @__PURE__ */ s(F, { spacing: "xs", alignX: "stretch", children: [
|
|
21
|
+
/* @__PURE__ */ n(
|
|
22
|
+
b,
|
|
23
|
+
{
|
|
24
|
+
title: t.label,
|
|
25
|
+
options: g,
|
|
26
|
+
selected: [c],
|
|
27
|
+
onChange: (e) => a(`${e[0]}`)
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
r && /* @__PURE__ */ n(
|
|
31
|
+
y,
|
|
32
|
+
{
|
|
33
|
+
width: "200px",
|
|
34
|
+
height: A.sizes[5],
|
|
35
|
+
"aria-busy": !0,
|
|
36
|
+
"aria-label": `Loading ${t.label} filters`
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
!r && f && /* @__PURE__ */ s(d, { variant: "errorSmall", children: [
|
|
40
|
+
"Error: failed to load filter for ",
|
|
41
|
+
t.label
|
|
42
|
+
] })
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
);
|
|
7
46
|
export {
|
|
8
|
-
|
|
47
|
+
_ as ActiveAsyncRadioFilter
|
|
9
48
|
};
|
package/dist/index23.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("@veeqo/ui"),n=({clearActiveFilter:i,applyActiveFilter:r})=>t.jsx(e.Card.Footer,{style:{padding:e.theme.sizes.base,margin:0,minWidth:"200px",boxShadow:`0px 10px 15px 0px ${e.theme.colors.neutral.ink.dark}`},children:t.jsxs(e.Stack,{direction:"horizontal",alignX:"end",children:[t.jsx(e.Button,{variant:"default",size:"sm",onClick:i,children:"Clear"}),t.jsx(e.Button,{variant:"primary",size:"sm",onClick:r,children:"Apply"})]})});exports.ActiveFilterFooter=n;
|
package/dist/index23.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
e,
|
|
6
|
-
|
|
7
|
-
"Edit ",
|
|
8
|
-
m(t)
|
|
9
|
-
] })
|
|
10
|
-
] });
|
|
1
|
+
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Card as a, theme as i, Stack as l, Button as e } from "@veeqo/ui";
|
|
3
|
+
const p = ({ clearActiveFilter: t, applyActiveFilter: n }) => /* @__PURE__ */ r(a.Footer, { style: { padding: i.sizes.base, margin: 0, minWidth: "200px", boxShadow: `0px 10px 15px 0px ${i.colors.neutral.ink.dark}` }, children: /* @__PURE__ */ o(l, { direction: "horizontal", alignX: "end", children: [
|
|
4
|
+
/* @__PURE__ */ r(e, { variant: "default", size: "sm", onClick: t, children: "Clear" }),
|
|
5
|
+
/* @__PURE__ */ r(e, { variant: "primary", size: "sm", onClick: n, children: "Apply" })
|
|
6
|
+
] }) });
|
|
11
7
|
export {
|
|
12
|
-
|
|
8
|
+
p as ActiveFilterFooter
|
|
13
9
|
};
|
package/dist/index24.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("react/jsx-runtime"),i=require("@veeqo/ui"),n=require("lodash/toLower"),o=e=>e&&e.__esModule?e:{default:e},s=o(n),a=({filterLabel:e,glyph:r})=>t.jsxs(t.Fragment,{children:[r,t.jsxs(i.Text,{variant:"headingSmall",as:"h2",children:["Edit ",s.default(e)]})]});exports.ActiveFilterHeader=a;
|
package/dist/index24.js
CHANGED
|
@@ -1,66 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { useStores as W } from "./index59.js";
|
|
12
|
-
const Y = E(({ field: t }) => {
|
|
13
|
-
var h, p;
|
|
14
|
-
const { FILTERS_DEBOUCE_INTERVAL_MS: f } = U(), b = k(() => {
|
|
15
|
-
var e;
|
|
16
|
-
return M({ fetcherName: (e = t.fetchAsyncFilterOptions) == null ? void 0 : e.fetcher });
|
|
17
|
-
}, [(h = t.fetchAsyncFilterOptions) == null ? void 0 : h.fetcher]), { isLoading: a, isValidating: d, data: F, error: c } = w(
|
|
18
|
-
(p = t.fetchAsyncFilterOptions) == null ? void 0 : p.URL,
|
|
19
|
-
b,
|
|
20
|
-
j
|
|
21
|
-
), l = a || d, {
|
|
22
|
-
Filters: { setArrayFilter: s, arrayFilters: S }
|
|
23
|
-
} = W(), y = S.get(t.id) || [], [O, m] = V(y), A = v(
|
|
24
|
-
R((e, r) => {
|
|
25
|
-
s(e, r);
|
|
26
|
-
}, f),
|
|
27
|
-
[s]
|
|
28
|
-
), x = (e) => {
|
|
29
|
-
const r = e.map((L) => `${L}`);
|
|
30
|
-
m(r), A(t.id, r);
|
|
31
|
-
}, C = () => {
|
|
32
|
-
m([]), s(t.id, []);
|
|
33
|
-
}, n = B({ data: F, config: t.fetchAsyncFilterOptions });
|
|
34
|
-
return n && n.length === 0 && !a && !c ? /* @__PURE__ */ o(u, { spacing: "xs", alignX: "stretch", children: /* @__PURE__ */ i(g, { variant: "bodySmall", children: [
|
|
35
|
-
"No options available for ",
|
|
36
|
-
t.label
|
|
37
|
-
] }) }) : /* @__PURE__ */ i(u, { spacing: "xs", alignX: "stretch", children: [
|
|
38
|
-
/* @__PURE__ */ o(_, { variant: "link", onClick: C, children: "Clear" }),
|
|
39
|
-
/* @__PURE__ */ o(
|
|
40
|
-
I,
|
|
41
|
-
{
|
|
42
|
-
allowMultiple: !0,
|
|
43
|
-
title: t.label,
|
|
44
|
-
options: n,
|
|
45
|
-
selected: O,
|
|
46
|
-
onChange: (e) => x(e)
|
|
47
|
-
}
|
|
48
|
-
),
|
|
49
|
-
l && /* @__PURE__ */ o(
|
|
50
|
-
N,
|
|
51
|
-
{
|
|
52
|
-
width: "200px",
|
|
53
|
-
height: T.sizes[5],
|
|
54
|
-
"aria-busy": !0,
|
|
55
|
-
"aria-label": `Loading ${t.label} filters`
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
!l && c && /* @__PURE__ */ i(g, { variant: "errorSmall", children: [
|
|
59
|
-
"Error: failed to load filter for ",
|
|
60
|
-
t.label
|
|
61
|
-
] })
|
|
62
|
-
] });
|
|
63
|
-
});
|
|
1
|
+
import { jsxs as r, Fragment as i } from "react/jsx-runtime";
|
|
2
|
+
import { Text as o } from "@veeqo/ui";
|
|
3
|
+
import m from "lodash/toLower";
|
|
4
|
+
const l = ({ filterLabel: t, glyph: e }) => /* @__PURE__ */ r(i, { children: [
|
|
5
|
+
e,
|
|
6
|
+
/* @__PURE__ */ r(o, { variant: "headingSmall", as: "h2", children: [
|
|
7
|
+
"Edit ",
|
|
8
|
+
m(t)
|
|
9
|
+
] })
|
|
10
|
+
] });
|
|
64
11
|
export {
|
|
65
|
-
|
|
12
|
+
l as ActiveFilterHeader
|
|
66
13
|
};
|
package/dist/index25.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"),i=require("react"),j=require("mobx-react"),C=require("lodash/debounce"),s=require("@veeqo/ui"),L=require("swr/immutable"),k=require("./index74.cjs"),R=require("./index75.cjs"),v=require("./index48.cjs"),T=require("./index8.cjs"),V=require("./index60.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;
|