@veeqo/transfigure 1.1.2 → 1.1.3
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.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 +32 -23
- package/dist/index102.cjs +1 -80
- package/dist/index102.js +28 -100
- 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/index111.cjs +1 -7
- package/dist/index111.js +36 -10
- package/dist/index112.cjs +7 -1
- package/dist/index112.js +10 -63
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +3 -3
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +65 -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 +21 -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/index97.cjs +1 -1
- package/dist/index97.js +19 -31
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +23 -28
- package/dist/index99.cjs +1 -19
- package/dist/index99.js +14 -23
- package/dist/mobx/Filters/Filters.d.ts +1 -1
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
package/dist/index13.js
CHANGED
|
@@ -1,27 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
max: 10,
|
|
19
|
-
minWidth: "",
|
|
20
|
-
toasts: o,
|
|
21
|
-
onClose: r
|
|
22
|
-
}
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { observer as h } from "mobx-react";
|
|
3
|
+
import { Stack as p, Pagination as u, ActionMenu as s, theme as P } from "@veeqo/ui";
|
|
4
|
+
import { useCallback as d } from "react";
|
|
5
|
+
import { useBusinessLogic as f } from "./index8.js";
|
|
6
|
+
import { useStores as S } from "./index60.js";
|
|
7
|
+
const L = h(({ totalPagesCount: o }) => {
|
|
8
|
+
const { PAGE_SIZE_OPTIONS: i } = f(), {
|
|
9
|
+
Filters: { setCurrentPage: m, currentPage: c, pageSize: r, setPageSize: t }
|
|
10
|
+
} = S(), g = (e) => {
|
|
11
|
+
m(e);
|
|
12
|
+
}, l = d(
|
|
13
|
+
(e) => {
|
|
14
|
+
r !== e && t(e);
|
|
15
|
+
},
|
|
16
|
+
[r, t]
|
|
23
17
|
);
|
|
18
|
+
return /* @__PURE__ */ n(p, { direction: "horizontal", children: [
|
|
19
|
+
/* @__PURE__ */ a(
|
|
20
|
+
u,
|
|
21
|
+
{
|
|
22
|
+
currentPage: c,
|
|
23
|
+
totalPagesCount: o,
|
|
24
|
+
handleChangePage: g
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ a(
|
|
28
|
+
s,
|
|
29
|
+
{
|
|
30
|
+
menuLabel: "items per page",
|
|
31
|
+
ctaProps: {
|
|
32
|
+
children: `${r} / page`,
|
|
33
|
+
style: { marginLeft: P.sizes.xs }
|
|
34
|
+
},
|
|
35
|
+
children: i.map((e) => /* @__PURE__ */ n(s.Item, { onAction: () => l(e), children: [
|
|
36
|
+
e,
|
|
37
|
+
" / page"
|
|
38
|
+
] }, e))
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] });
|
|
24
42
|
});
|
|
25
43
|
export {
|
|
26
|
-
|
|
44
|
+
L as TableControls
|
|
27
45
|
};
|
package/dist/index14.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 o=require("react/jsx-runtime"),i=require("@veeqo/ui"),n=require("mobx-react"),u=require("react"),a=require("./index60.cjs"),c=n.observer(()=>{const{Notifications:{toasts:t,removeByKey:r}}=a.useStores();return u.useEffect(()=>{const s=t.filter(e=>!e.persistent).map(e=>setTimeout(()=>{r(e.key)},2e3));return()=>{s.forEach(e=>clearTimeout(e))}},[t,r]),o.jsx(i.ToastsLayout,{max:10,minWidth:"",toasts:t,onClose:r})});exports.ToastsManager=c;
|
package/dist/index14.js
CHANGED
|
@@ -1,39 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return /* @__PURE__ */ t(v, { filterData: i }, r);
|
|
25
|
-
case e.NUMBER_RANGE:
|
|
26
|
-
return /* @__PURE__ */ t(g, { filterData: i }, r);
|
|
27
|
-
case e.TEXT:
|
|
28
|
-
case e.NUMBER:
|
|
29
|
-
case e.RADIO:
|
|
30
|
-
return /* @__PURE__ */ t(d, { filterData: i }, r);
|
|
31
|
-
default:
|
|
32
|
-
return /* @__PURE__ */ t(u, { size: "xs", variant: "error", title: `Unsupport filter "${r}"` }, r);
|
|
33
|
-
}
|
|
34
|
-
})() }))
|
|
35
|
-
] });
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { ToastsLayout as m } from "@veeqo/ui";
|
|
3
|
+
import { observer as i } from "mobx-react";
|
|
4
|
+
import { useEffect as a } from "react";
|
|
5
|
+
import { useStores as n } from "./index60.js";
|
|
6
|
+
const T = i(() => {
|
|
7
|
+
const { Notifications: { toasts: o, removeByKey: r } } = n();
|
|
8
|
+
return a(() => {
|
|
9
|
+
const e = o.filter((t) => !t.persistent).map((t) => setTimeout(() => {
|
|
10
|
+
r(t.key);
|
|
11
|
+
}, 2e3));
|
|
12
|
+
return () => {
|
|
13
|
+
e.forEach((t) => clearTimeout(t));
|
|
14
|
+
};
|
|
15
|
+
}, [o, r]), /* @__PURE__ */ s(
|
|
16
|
+
m,
|
|
17
|
+
{
|
|
18
|
+
max: 10,
|
|
19
|
+
minWidth: "",
|
|
20
|
+
toasts: o,
|
|
21
|
+
onClose: r
|
|
22
|
+
}
|
|
23
|
+
);
|
|
36
24
|
});
|
|
37
25
|
export {
|
|
38
|
-
|
|
26
|
+
T as ToastsManager
|
|
39
27
|
};
|
package/dist/index15.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"),F=require("mobx-react"),s=require("@veeqo/ui"),r=require("./index48.cjs"),A=require("./index8.cjs"),g=require("./index60.cjs"),h=require("./index18.cjs"),v=require("./index21.cjs"),T=require("./index20.cjs"),f=require("./index19.cjs"),x=F.observer(()=>{const{FIELDS_MAP:c}=A.useBusinessLogic(),{Filters:{hasActiveFilters:a,activeFilterKeysList:l,clearAllFilters:n}}=g.useStores();if(!a)return null;const o=Array.from(c).filter(([e])=>l.includes(e));return t.jsxs(s.Stack,{direction:"horizontal",alignY:"center",style:{flexWrap:"wrap",rowGap:s.theme.sizes.sm},children:[t.jsx(s.Button,{variant:"link",onClick:()=>n(),children:"Clear all"}),o.map(([e,i])=>{const u=()=>{switch(i.filterType){case r.FilterChoiceValue.CHECKBOX:return t.jsx(f.ActiveFilterArrayTag,{filterData:i},e);case r.FilterChoiceValue.DATE_RANGE:return t.jsx(T.ActiveFilterDateRangeTag,{filterData:i},e);case r.FilterChoiceValue.NUMBER_RANGE:return t.jsx(v.ActiveFilterNumberRangeTag,{filterData:i},e);case r.FilterChoiceValue.TEXT:case r.FilterChoiceValue.NUMBER:case r.FilterChoiceValue.RADIO:return t.jsx(h.ActiveFilterTag,{filterData:i},e);default:return t.jsx(s.Alert,{size:"xs",variant:"error",title:`Unsupport filter "${e}"`},e)}};return t.jsx("div",{children:u()})})]})});exports.ActiveFilters=x;
|
package/dist/index15.js
CHANGED
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { observer as
|
|
3
|
-
import {
|
|
4
|
-
import { FilterChoiceValue as
|
|
5
|
-
import {
|
|
6
|
-
|
|
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 { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { observer as m } from "mobx-react";
|
|
3
|
+
import { Stack as f, theme as p, Button as A, Alert as u } from "@veeqo/ui";
|
|
4
|
+
import { FilterChoiceValue as e } from "./index48.js";
|
|
5
|
+
import { useBusinessLogic as F } from "./index8.js";
|
|
6
|
+
import { useStores as h } from "./index60.js";
|
|
7
|
+
import { ActiveFilterTag as d } from "./index18.js";
|
|
8
|
+
import { ActiveFilterNumberRangeTag as g } from "./index21.js";
|
|
9
|
+
import { ActiveFilterDateRangeTag as v } from "./index20.js";
|
|
10
|
+
import { ActiveFilterArrayTag as D } from "./index19.js";
|
|
11
|
+
const M = m(() => {
|
|
12
|
+
const { FIELDS_MAP: o } = F(), {
|
|
13
|
+
Filters: { hasActiveFilters: s, activeFilterKeysList: a, clearAllFilters: l }
|
|
14
|
+
} = h();
|
|
15
|
+
if (!s) return null;
|
|
16
|
+
const n = Array.from(o).filter(([r]) => a.includes(r));
|
|
17
|
+
return /* @__PURE__ */ c(f, { direction: "horizontal", alignY: "center", style: { flexWrap: "wrap", rowGap: p.sizes.sm }, children: [
|
|
18
|
+
/* @__PURE__ */ t(A, { variant: "link", onClick: () => l(), children: "Clear all" }),
|
|
19
|
+
n.map(([r, i]) => /* @__PURE__ */ t("div", { children: (() => {
|
|
20
|
+
switch (i.filterType) {
|
|
21
|
+
case e.CHECKBOX:
|
|
22
|
+
return /* @__PURE__ */ t(D, { filterData: i }, r);
|
|
23
|
+
case e.DATE_RANGE:
|
|
24
|
+
return /* @__PURE__ */ t(v, { filterData: i }, r);
|
|
25
|
+
case e.NUMBER_RANGE:
|
|
26
|
+
return /* @__PURE__ */ t(g, { filterData: i }, r);
|
|
27
|
+
case e.TEXT:
|
|
28
|
+
case e.NUMBER:
|
|
29
|
+
case e.RADIO:
|
|
30
|
+
return /* @__PURE__ */ t(d, { filterData: i }, r);
|
|
31
|
+
default:
|
|
32
|
+
return /* @__PURE__ */ t(u, { size: "xs", variant: "error", title: `Unsupport filter "${r}"` }, r);
|
|
33
|
+
}
|
|
34
|
+
})() }))
|
|
35
|
+
] });
|
|
36
|
+
});
|
|
33
37
|
export {
|
|
34
|
-
|
|
38
|
+
M as ActiveFilters
|
|
35
39
|
};
|
package/dist/index16.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("mobx-react"),s=require("@veeqo/ui"),c=require("./index48.cjs"),u=require("./index113.cjs"),h=l.observer(({data:e,editedValue:r,setEditedValue:t})=>{var i;switch(e.filterType){case c.FilterChoiceValue.CHECKBOX:return e.fetchAsyncFilterOptions?o.jsx(u.ActiveAsyncCheckboxFilter,{field:e,setEditedValue:t,editedValue:r}):o.jsx(s.ChoiceList,{allowMultiple:!0,title:e.label,options:(i=e.options)!=null&&i.length?e.options:[],selected:r,onChange:n=>t(n)});default:return null}});exports.FilterArrayField=h;
|
package/dist/index16.js
CHANGED
|
@@ -1,52 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { observer as
|
|
3
|
-
import { ChoiceList as p
|
|
4
|
-
import { FilterChoiceValue as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { observer as n } from "mobx-react";
|
|
3
|
+
import { ChoiceList as p } from "@veeqo/ui";
|
|
4
|
+
import { FilterChoiceValue as s } from "./index48.js";
|
|
5
|
+
import { ActiveAsyncCheckboxFilter as c } from "./index113.js";
|
|
6
|
+
const F = n(
|
|
7
|
+
({ data: r, editedValue: e, setEditedValue: o }) => {
|
|
8
|
+
var i;
|
|
9
|
+
switch (r.filterType) {
|
|
10
|
+
case s.CHECKBOX:
|
|
11
|
+
return r.fetchAsyncFilterOptions ? /* @__PURE__ */ t(
|
|
12
|
+
c,
|
|
13
|
+
{
|
|
14
|
+
field: r,
|
|
15
|
+
setEditedValue: o,
|
|
16
|
+
editedValue: e
|
|
17
|
+
}
|
|
18
|
+
) : /* @__PURE__ */ t(
|
|
19
|
+
p,
|
|
20
|
+
{
|
|
21
|
+
allowMultiple: !0,
|
|
22
|
+
title: r.label,
|
|
23
|
+
options: (i = r.options) != null && i.length ? r.options : [],
|
|
24
|
+
selected: e,
|
|
25
|
+
onChange: (l) => o(l)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
default:
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
16
31
|
}
|
|
17
|
-
|
|
18
|
-
case r.TEXT:
|
|
19
|
-
case r.NUMBER:
|
|
20
|
-
return /* @__PURE__ */ n(
|
|
21
|
-
f,
|
|
22
|
-
{
|
|
23
|
-
label: e.label,
|
|
24
|
-
type: t,
|
|
25
|
-
value: o,
|
|
26
|
-
onChange: (l) => i(l)
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
case r.RADIO:
|
|
30
|
-
return e.fetchAsyncFilterOptions ? /* @__PURE__ */ n(
|
|
31
|
-
m,
|
|
32
|
-
{
|
|
33
|
-
field: e,
|
|
34
|
-
setEditedValue: i,
|
|
35
|
-
editedValue: o
|
|
36
|
-
}
|
|
37
|
-
) : /* @__PURE__ */ n(
|
|
38
|
-
p,
|
|
39
|
-
{
|
|
40
|
-
title: e.label,
|
|
41
|
-
options: (s = e.options) != null && s.length ? e.options : [],
|
|
42
|
-
selected: [o],
|
|
43
|
-
onChange: (l) => i(`${l[0]}`)
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
default:
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
32
|
+
);
|
|
50
33
|
export {
|
|
51
|
-
|
|
34
|
+
F as FilterArrayField
|
|
52
35
|
};
|
package/dist/index17.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 o=require("react/jsx-runtime"),u=require("mobx-react"),s=require("@veeqo/ui"),i=require("./index48.cjs"),F=require("./index22.cjs"),h=u.observer(({data:e,editedValue:r,setEditedValue:t})=>{var n;let l;switch(e.filterType){case i.FilterChoiceValue.NUMBER:l="number";break;case i.FilterChoiceValue.TEXT:l="text";break}switch(e.filterType){case i.FilterChoiceValue.TEXT:case i.FilterChoiceValue.NUMBER:return o.jsx(s.TextField,{label:e.label,type:l,value:r,onChange:c=>t(c)});case i.FilterChoiceValue.RADIO:return e.fetchAsyncFilterOptions?o.jsx(F.ActiveAsyncRadioFilter,{field:e,setEditedValue:t,editedValue:r}):o.jsx(s.ChoiceList,{title:e.label,options:(n=e.options)!=null&&n.length?e.options:[],selected:[r],onChange:c=>t(`${c[0]}`)});default:return null}});exports.FilterField=h;
|
package/dist/index17.js
CHANGED
|
@@ -1,43 +1,52 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return /* @__PURE__ */ t(
|
|
23
|
-
f,
|
|
24
|
-
{
|
|
25
|
-
shouldCloseOnClickAway: !0,
|
|
26
|
-
header: /* @__PURE__ */ t(L, { filterLabel: e.label, glyph: e.glyph }),
|
|
27
|
-
label: e.label,
|
|
28
|
-
text: m || "Loading...",
|
|
29
|
-
content: /* @__PURE__ */ t(b, { style: { padding: g.sizes.md }, children: /* @__PURE__ */ t(
|
|
30
|
-
y,
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { observer as c } from "mobx-react";
|
|
3
|
+
import { ChoiceList as p, TextField as f } from "@veeqo/ui";
|
|
4
|
+
import { FilterChoiceValue as r } from "./index48.js";
|
|
5
|
+
import { ActiveAsyncRadioFilter as m } from "./index22.js";
|
|
6
|
+
const y = c(({ data: e, editedValue: o, setEditedValue: i }) => {
|
|
7
|
+
var s;
|
|
8
|
+
let t;
|
|
9
|
+
switch (e.filterType) {
|
|
10
|
+
case r.NUMBER:
|
|
11
|
+
t = "number";
|
|
12
|
+
break;
|
|
13
|
+
case r.TEXT:
|
|
14
|
+
t = "text";
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
switch (e.filterType) {
|
|
18
|
+
case r.TEXT:
|
|
19
|
+
case r.NUMBER:
|
|
20
|
+
return /* @__PURE__ */ n(
|
|
21
|
+
f,
|
|
31
22
|
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
label: e.label,
|
|
24
|
+
type: t,
|
|
25
|
+
value: o,
|
|
26
|
+
onChange: (l) => i(l)
|
|
35
27
|
}
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
);
|
|
29
|
+
case r.RADIO:
|
|
30
|
+
return e.fetchAsyncFilterOptions ? /* @__PURE__ */ n(
|
|
31
|
+
m,
|
|
32
|
+
{
|
|
33
|
+
field: e,
|
|
34
|
+
setEditedValue: i,
|
|
35
|
+
editedValue: o
|
|
36
|
+
}
|
|
37
|
+
) : /* @__PURE__ */ n(
|
|
38
|
+
p,
|
|
39
|
+
{
|
|
40
|
+
title: e.label,
|
|
41
|
+
options: (s = e.options) != null && s.length ? e.options : [],
|
|
42
|
+
selected: [o],
|
|
43
|
+
onChange: (l) => i(`${l[0]}`)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
default:
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
40
49
|
});
|
|
41
50
|
export {
|
|
42
|
-
|
|
51
|
+
y as FilterField
|
|
43
52
|
};
|
package/dist/index18.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"),c=require("react"),g=require("mobx-react"),s=require("@veeqo/ui"),v=require("./index60.cjs"),q=require("./index58.cjs"),A=require("./index23.cjs"),x=require("./index17.cjs"),j=require("./index24.cjs"),y=g.observer(({filterData:e})=>{const{Filters:{filters:l,clearFilter:n,setFilter:u}}=v.useStores(),r=l.get(e.id),{filterLabel:d}=q.useFilterLabel({filterData:e}),[i,o]=c.useState(r||"");c.useEffect(()=>{i!==r&&o(r||"")},[e.id,r,l]);const F=()=>{n(e.id)},a=()=>{u(e.id,i)};return t.jsx(s.FilterTag,{shouldCloseOnClickAway:!0,header:t.jsx(j.ActiveFilterHeader,{filterLabel:e.label,glyph:e.glyph}),label:e.label,text:d||"Loading...",content:t.jsx(s.BaseContainer,{style:{padding:s.theme.sizes.md},children:t.jsx(x.FilterField,{data:e,editedValue:i,setEditedValue:b=>o(b)})}),footer:t.jsx(A.ActiveFilterFooter,{clearActiveFilter:F,applyActiveFilter:a})})});exports.ActiveFilterTag=y;
|
package/dist/index18.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { observer as
|
|
4
|
-
import { FilterTag as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { ActiveFilterHeader as
|
|
10
|
-
const z =
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as F, useEffect as u } from "react";
|
|
3
|
+
import { observer as a } from "mobx-react";
|
|
4
|
+
import { FilterTag as f, BaseContainer as b, theme as g } from "@veeqo/ui";
|
|
5
|
+
import { useStores as h } from "./index60.js";
|
|
6
|
+
import { useFilterLabel as v } from "./index58.js";
|
|
7
|
+
import { ActiveFilterFooter as A } from "./index23.js";
|
|
8
|
+
import { FilterField as y } from "./index17.js";
|
|
9
|
+
import { ActiveFilterHeader as L } from "./index24.js";
|
|
10
|
+
const z = a(({ filterData: e }) => {
|
|
11
11
|
const {
|
|
12
|
-
Filters: {
|
|
13
|
-
} = h(),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}, [e.id,
|
|
17
|
-
const
|
|
12
|
+
Filters: { filters: i, clearFilter: s, setFilter: d }
|
|
13
|
+
} = h(), r = i.get(e.id), { filterLabel: m } = v({ filterData: e }), [o, l] = F(r || "");
|
|
14
|
+
u(() => {
|
|
15
|
+
o !== r && l(r || "");
|
|
16
|
+
}, [e.id, r, i]);
|
|
17
|
+
const c = () => {
|
|
18
18
|
s(e.id);
|
|
19
|
-
},
|
|
20
|
-
d(e.id,
|
|
21
|
-
}
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
19
|
+
}, n = () => {
|
|
20
|
+
d(e.id, o);
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ t(
|
|
23
|
+
f,
|
|
24
24
|
{
|
|
25
25
|
shouldCloseOnClickAway: !0,
|
|
26
|
-
header: /* @__PURE__ */
|
|
26
|
+
header: /* @__PURE__ */ t(L, { filterLabel: e.label, glyph: e.glyph }),
|
|
27
27
|
label: e.label,
|
|
28
|
-
text:
|
|
29
|
-
content: /* @__PURE__ */
|
|
30
|
-
|
|
28
|
+
text: m || "Loading...",
|
|
29
|
+
content: /* @__PURE__ */ t(b, { style: { padding: g.sizes.md }, children: /* @__PURE__ */ t(
|
|
30
|
+
y,
|
|
31
31
|
{
|
|
32
32
|
data: e,
|
|
33
|
-
editedValue:
|
|
34
|
-
setEditedValue: (
|
|
33
|
+
editedValue: o,
|
|
34
|
+
setEditedValue: (p) => l(p)
|
|
35
35
|
}
|
|
36
36
|
) }),
|
|
37
|
-
footer: /* @__PURE__ */
|
|
37
|
+
footer: /* @__PURE__ */ t(A, { clearActiveFilter: c, applyActiveFilter: n })
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
});
|
|
41
41
|
export {
|
|
42
|
-
z as
|
|
42
|
+
z as ActiveFilterTag
|
|
43
43
|
};
|
package/dist/index19.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"),o=require("react"),y=require("mobx-react"),s=require("@veeqo/ui"),b=require("./index57.cjs"),v=require("./index16.cjs"),g=require("./index60.cjs"),q=require("./index23.cjs"),x=require("./index24.cjs"),j=y.observer(({filterData:e})=>{const{Filters:{arrayFilters:l,clearArrayFilter:u,setArrayFilter:n}}=g.useStores(),t=l.get(e.id),[i,c]=o.useState(t||[]);o.useEffect(()=>{i!==t&&c(t||[])},[e.id,t,l]);const a=()=>{u(e.id)},d=()=>{n(e.id,i)},{filterLabel:F}=b.useFilterArrayLabel({filterData:e});return r.jsx(s.FilterTag,{shouldCloseOnClickAway:!0,header:r.jsx(x.ActiveFilterHeader,{filterLabel:e.label,glyph:e.glyph}),label:e.label,text:F||"",content:r.jsx(s.BaseContainer,{style:{padding:s.theme.sizes.md},children:r.jsx(v.FilterArrayField,{data:e,editedValue:i||[],setEditedValue:A=>c(A)})}),footer:r.jsx(q.ActiveFilterFooter,{clearActiveFilter:a,applyActiveFilter:d})})});exports.ActiveFilterArrayTag=j;
|
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;
|