@veeqo/transfigure 0.0.1 → 0.0.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/README.md +2 -53
- package/dist/BusinessLogic/mocks.d.ts +3 -3
- package/dist/BusinessLogic/types.d.ts +3 -2
- package/dist/components/Filters/ActiveFilters/Categories/index.d.ts +2 -0
- package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncCheckboxFilter/ActiveAsyncCheckboxFilter.d.ts +8 -0
- package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncCheckboxFilter/index.d.ts +1 -0
- package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncRadioFilter/ActiveAsyncRadioFilter.d.ts +8 -0
- package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncRadioFilter/index.d.ts +1 -0
- package/dist/components/Filters/{Fields → ActiveFilters/Variants/ActiveFilterNumberRangeTag}/FilterNumberRangeFilter/FilterNumberRangeFilter.d.ts +1 -1
- package/dist/components/Filters/ActiveFilters/Variants/index.d.ts +5 -0
- package/dist/components/Filters/ActiveFilters/index.d.ts +2 -3
- package/dist/components/Filters/Fields/index.d.ts +0 -6
- package/dist/components/Filters/{Fields/FilterGroup → FilterGroup}/FilterGroup.d.ts +1 -1
- package/dist/components/Filters/FilterGroup/index.d.ts +1 -0
- package/dist/components/Filters/index.d.ts +1 -0
- package/dist/components/TableControls/TableControls.d.ts +1 -0
- package/dist/components/TableControls/index.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +75 -75
- package/dist/index10.js +3 -12
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +19 -19
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +42 -21
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +23 -38
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +39 -37
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +36 -54
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +32 -46
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +50 -42
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +39 -50
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +59 -37
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +53 -37
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +45 -53
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +43 -33
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +56 -57
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +57 -18
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +38 -31
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +55 -39
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +52 -34
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +81 -47
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +36 -107
- package/dist/index3.js +1 -3
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +31 -31
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +10 -30
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +40 -14
- package/dist/index33.js +49 -48
- package/dist/index34.js +12 -11
- package/dist/index35.js +104 -39
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +47 -24
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +43 -22
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +22 -27
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +67 -26
- package/dist/index4.js +1 -8
- package/dist/index40.js +71 -21
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +31 -18
- package/dist/index42.js +2 -8
- package/dist/index43.js +13 -1
- package/dist/index45.js +14 -12
- package/dist/index48.js +1 -3
- package/dist/index5.js +2 -9
- package/dist/index50.js +3 -12
- package/dist/index51.js +8 -42
- package/dist/index52.js +20 -35
- package/dist/index53.js +16 -25
- package/dist/index54.js +18 -27
- package/dist/index55.js +31 -36
- package/dist/index57.js +22 -32
- package/dist/index58.js +14 -15
- package/dist/index59.js +2 -10
- package/dist/index6.js +8 -40
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +226 -209
- package/dist/index61.js +5 -9
- package/dist/index62.js +3 -9
- package/dist/index65.js +1 -6
- package/dist/index66.js +1 -4
- package/dist/index67.js +1 -3
- package/dist/index69.js +28 -23
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +2 -4
- package/dist/index76.js +26 -16
- package/dist/index77.cjs +1 -19
- package/dist/index77.js +14 -29
- package/dist/index78.cjs +19 -1
- package/dist/index78.js +24 -16
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +22 -9
- package/dist/index80.cjs +78 -10
- package/dist/index80.js +92 -13
- package/dist/index81.cjs +10 -78
- package/dist/index81.js +13 -94
- package/dist/index83.cjs +1 -80
- package/dist/index83.js +35 -96
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +62 -35
- package/dist/index85.js +1 -3
- package/dist/index86.cjs +80 -7
- package/dist/index86.js +93 -10
- package/dist/index87.cjs +7 -0
- package/dist/index87.js +12 -0
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +99 -84
- package/dist/mobx/Filters/Filters.d.ts +5 -0
- package/dist/mocks/internal/mockUseStores/index.d.ts +1 -0
- package/dist/mocks/internal/mockUseStores/mockUseStores.d.ts +6 -0
- package/dist/types.d.ts +1 -1
- package/package.json +4 -5
- package/dist/components/Filters/Fields/AsyncInlineCheckboxFilter/AsyncInlineCheckboxFilter.d.ts +0 -8
- package/dist/components/Filters/Fields/AsyncInlineCheckboxFilter/index.d.ts +0 -1
- package/dist/components/Filters/Fields/AsyncInlineRadioFilter/AsyncInlineRadioFilter.d.ts +0 -8
- package/dist/components/Filters/Fields/AsyncInlineRadioFilter/index.d.ts +0 -1
- package/dist/components/Filters/Fields/FilterGroup/index.d.ts +0 -1
- package/dist/components/Table/Table.d.ts +0 -1
- /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterArrayField/FilterArrayField.d.ts +0 -0
- /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterArrayField/index.d.ts +0 -0
- /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterField/FilterField.d.ts +0 -0
- /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterField/index.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterArrayTag → Variants/ActiveFilterArrayTag}/ActiveFilterArrayTag.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterArrayTag → Variants/ActiveFilterArrayTag}/index.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterDateRangeTag → Variants/ActiveFilterDateRangeTag}/ActiveFilterDateRangeTag.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterDateRangeTag → Variants/ActiveFilterDateRangeTag}/index.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterNumberRangeTag → Variants/ActiveFilterNumberRangeTag}/ActiveFilterNumberRangeTag.d.ts +0 -0
- /package/dist/components/Filters/{Fields → ActiveFilters/Variants/ActiveFilterNumberRangeTag}/FilterNumberRangeFilter/index.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterNumberRangeTag → Variants/ActiveFilterNumberRangeTag}/index.d.ts +0 -0
package/dist/index29.js
CHANGED
|
@@ -1,111 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { Stack as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}) => {
|
|
37
|
-
M({
|
|
38
|
-
numberRange: o,
|
|
39
|
-
lte: t,
|
|
40
|
-
gte: i
|
|
41
|
-
});
|
|
42
|
-
}, F), [M]), C = () => {
|
|
43
|
-
r({
|
|
44
|
-
gte: 0,
|
|
45
|
-
lte: 100
|
|
46
|
-
}), d(l.id);
|
|
47
|
-
}, N = (o, t) => {
|
|
48
|
-
let i = new h({
|
|
49
|
-
filterId: l.id
|
|
50
|
-
});
|
|
51
|
-
if (e || (i = m()), !Array.isArray(t) || t.length !== 2) return;
|
|
52
|
-
const [n, b] = t;
|
|
53
|
-
r({
|
|
54
|
-
gte: n,
|
|
55
|
-
lte: b
|
|
56
|
-
}), g(e ? {
|
|
57
|
-
numberRange: e,
|
|
58
|
-
lte: b,
|
|
59
|
-
gte: n
|
|
60
|
-
} : {
|
|
61
|
-
numberRange: i,
|
|
62
|
-
lte: b,
|
|
63
|
-
gte: n
|
|
64
|
-
});
|
|
65
|
-
}, S = (o) => {
|
|
66
|
-
if (e || m(), !e) return;
|
|
67
|
-
const t = Number(o);
|
|
68
|
-
if (t > e.lteMax) return;
|
|
69
|
-
let {
|
|
70
|
-
lte: i
|
|
71
|
-
} = e, {
|
|
72
|
-
gte: n
|
|
73
|
-
} = e;
|
|
74
|
-
t >= e.gteMin && t <= e.lteMax && (n = t), (!e.lte || t >= e.lte) && (i = e.lteMax), r({
|
|
75
|
-
gte: n,
|
|
76
|
-
lte: i
|
|
77
|
-
}), g({
|
|
78
|
-
numberRange: e,
|
|
79
|
-
lte: i,
|
|
80
|
-
gte: n
|
|
81
|
-
});
|
|
82
|
-
}, L = (o) => {
|
|
83
|
-
if (e || m(), !e) return;
|
|
84
|
-
const t = Number(o);
|
|
85
|
-
if (t < e.gteMin) return;
|
|
86
|
-
let {
|
|
87
|
-
lte: i
|
|
88
|
-
} = e, {
|
|
89
|
-
gte: n
|
|
90
|
-
} = e;
|
|
91
|
-
t >= e.gteMin && t <= e.lteMax && (i = t), (!e.gte || t <= e.gte) && (n = e.gteMin), r({
|
|
92
|
-
gte: n,
|
|
93
|
-
lte: i
|
|
94
|
-
}), g({
|
|
95
|
-
numberRange: e,
|
|
96
|
-
lte: i,
|
|
97
|
-
gte: n
|
|
98
|
-
});
|
|
99
|
-
}, v = [a.gte, a.lte];
|
|
100
|
-
return /* @__PURE__ */ R(c, { spacing: "xs", alignX: "stretch", children: [
|
|
101
|
-
/* @__PURE__ */ s(_, { variant: "link", onClick: C, children: "Clear" }),
|
|
102
|
-
/* @__PURE__ */ R(c, { direction: "horizontal", children: [
|
|
103
|
-
/* @__PURE__ */ s(p, { label: e == null ? void 0 : e.gteMinLabel, type: "number", min: e == null ? void 0 : e.gteMin, max: e == null ? void 0 : e.lteMax, value: a.gte.toString(), onChange: S }),
|
|
104
|
-
/* @__PURE__ */ s(p, { label: e == null ? void 0 : e.lteMaxLabel, type: "number", min: e == null ? void 0 : e.gteMin, max: e == null ? void 0 : e.lteMax, value: a.lte.toString(), onChange: L })
|
|
105
|
-
] }),
|
|
106
|
-
/* @__PURE__ */ s(A, { value: v, onChange: N, min: e == null ? void 0 : e.gteMin, max: e == null ? void 0 : e.lteMax, valueLabelDisplay: "auto" })
|
|
1
|
+
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { observer as h } from "mobx-react";
|
|
3
|
+
import { useState as C, useCallback as F } from "react";
|
|
4
|
+
import S from "lodash/debounce";
|
|
5
|
+
import { Stack as g, Button as b, ChoiceList as V } from "@veeqo/ui";
|
|
6
|
+
import { useBusinessLogic as f } from "./index7.js";
|
|
7
|
+
import { useStores as k } from "./index56.js";
|
|
8
|
+
const I = h(({ field: e }) => {
|
|
9
|
+
var n;
|
|
10
|
+
const { FILTERS_DEBOUCE_INTERVAL_MS: c } = f(), {
|
|
11
|
+
Filters: { setFilter: r, filters: l }
|
|
12
|
+
} = k();
|
|
13
|
+
if (!((n = e.options) != null && n.length)) return null;
|
|
14
|
+
const a = l.get(e.id), [u, s] = C(a), m = F(
|
|
15
|
+
S((t, o) => {
|
|
16
|
+
r(t, o);
|
|
17
|
+
}, c),
|
|
18
|
+
[r]
|
|
19
|
+
), p = (t) => {
|
|
20
|
+
const o = `${t[0]}`;
|
|
21
|
+
s(o), m(e.id, o);
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ d(g, { spacing: "xs", children: [
|
|
24
|
+
/* @__PURE__ */ i(b, { variant: "link", onClick: () => {
|
|
25
|
+
s(""), r(e.id, "");
|
|
26
|
+
}, children: "Clear" }),
|
|
27
|
+
/* @__PURE__ */ i(
|
|
28
|
+
V,
|
|
29
|
+
{
|
|
30
|
+
title: e.label,
|
|
31
|
+
options: e.options,
|
|
32
|
+
selected: [u],
|
|
33
|
+
onChange: (t) => p(t)
|
|
34
|
+
}
|
|
35
|
+
)
|
|
107
36
|
] });
|
|
108
37
|
});
|
|
109
38
|
export {
|
|
110
|
-
|
|
39
|
+
I as RadioFilter
|
|
111
40
|
};
|
package/dist/index3.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { axios as t } from "./index6.js";
|
|
2
2
|
import { withCSRF as o } from "./index48.js";
|
|
3
3
|
import { vndAPI as e } from "./index49.js";
|
|
4
|
-
const s = (r = {}) => t.patch("/current_user", {
|
|
5
|
-
user: r
|
|
6
|
-
}, o(e));
|
|
4
|
+
const s = (r = {}) => t.patch("/current_user", { user: r }, o(e));
|
|
7
5
|
export {
|
|
8
6
|
s as patchCurrentUser
|
|
9
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 e=require("react/jsx-runtime"),t=require("mobx-react"),s=require("@veeqo/ui"),i=require("@veeqo/components"),l=require("./index31.cjs"),n=require("./index56.cjs"),{Glyph:d}=i.VeeqoCommon,c=t.observer(()=>{const{Filters:{isFiltersDropdownVisible:o,toggleFiltersDropdownVisible:r}}=n.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(l.FiltersList,{})})});exports.FiltersDropdown=c;
|
package/dist/index30.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { observer as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const I = h(({
|
|
9
|
-
field: e
|
|
10
|
-
}) => {
|
|
11
|
-
var n;
|
|
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 { FiltersList as d } from "./index31.js";
|
|
6
|
+
import { useStores as m } from "./index56.js";
|
|
7
|
+
const { Glyph: n } = l, b = s(() => {
|
|
12
8
|
const {
|
|
13
|
-
|
|
14
|
-
} =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
Filters: { isFiltersDropdownVisible: r, toggleFiltersDropdownVisible: e }
|
|
10
|
+
} = m();
|
|
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(d, {})
|
|
18
31
|
}
|
|
19
|
-
|
|
20
|
-
if (!((n = e.options) != null && n.length)) return null;
|
|
21
|
-
const a = l.get(e.id), [u, s] = C(a), m = F(S((t, o) => {
|
|
22
|
-
r(t, o);
|
|
23
|
-
}, c), [r]), p = (t) => {
|
|
24
|
-
const o = `${t[0]}`;
|
|
25
|
-
s(o), m(e.id, o);
|
|
26
|
-
};
|
|
27
|
-
return /* @__PURE__ */ d(g, { spacing: "xs", children: [
|
|
28
|
-
/* @__PURE__ */ i(b, { variant: "link", onClick: () => {
|
|
29
|
-
s(""), r(e.id, "");
|
|
30
|
-
}, children: "Clear" }),
|
|
31
|
-
/* @__PURE__ */ i(V, { title: e.label, options: e.options, selected: [u], onChange: (t) => p(t) })
|
|
32
|
-
] });
|
|
32
|
+
);
|
|
33
33
|
});
|
|
34
34
|
export {
|
|
35
|
-
|
|
35
|
+
b as FiltersDropdown
|
|
36
36
|
};
|
package/dist/index31.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"),s=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index7.cjs"),u=require("./index75.cjs"),c=require("./index32.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/index31.js
CHANGED
|
@@ -1,33 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { observer as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const {
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
const {
|
|
11
|
-
Filters: {
|
|
12
|
-
isFiltersDropdownVisible: r,
|
|
13
|
-
toggleFiltersDropdownVisible: e
|
|
14
|
-
}
|
|
15
|
-
} = m();
|
|
16
|
-
return /* @__PURE__ */ o(t, { id: "filters-dropdown", ctaProps: {
|
|
17
|
-
iconSlot: /* @__PURE__ */ o(n, { name: "filter" }),
|
|
18
|
-
children: "Filters",
|
|
19
|
-
loading: !1,
|
|
20
|
-
// TODO needs implementing?
|
|
21
|
-
disabled: !1,
|
|
22
|
-
// TODO needs implementing?
|
|
23
|
-
className: "act-toggle-filter",
|
|
24
|
-
style: {
|
|
25
|
-
borderRadius: i.radius.base
|
|
26
|
-
}
|
|
27
|
-
}, style: {
|
|
28
|
-
padding: 0
|
|
29
|
-
}, shouldShow: r, setShouldShow: e, children: /* @__PURE__ */ o(d, {}) });
|
|
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 "./index7.js";
|
|
5
|
+
import { AdaptiveHeightContainer as p } from "./index75.js";
|
|
6
|
+
import { FilterGroup as n } from "./index32.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)) }) });
|
|
30
10
|
});
|
|
31
11
|
export {
|
|
32
|
-
|
|
12
|
+
u as FiltersList
|
|
33
13
|
};
|
package/dist/index32.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"),s=require("mobx-react"),n=require("@veeqo/ui"),c=require("@veeqo/components"),u=require("./index27.cjs"),t=require("./index44.cjs"),F=require("./index25.cjs"),a=require("./index29.cjs"),h=require("./index28.cjs"),p=require("./index26.cjs"),x=require("./index24.cjs"),y=require("./index23.cjs"),{Glyph:R}=c.VeeqoCommon,C=s.observer(({data:i})=>{const l=i.fields.filter(e=>e.filterType===t.FilterChoiceValue.TEXT||e.filterType===t.FilterChoiceValue.NUMBER),o=i.fields.filter(e=>e.filterType!==t.FilterChoiceValue.TEXT&&e.filterType!==t.FilterChoiceValue.NUMBER);return r.jsx(n.Accordion,{iconSlot:r.jsx(R,{name:"product-menu"}),label:i.label,children:r.jsxs(n.Stack,{children:[l.length>0?r.jsx(u.MultipleFieldFilter,{fields:l,groupId:i.id}):null,o.map(e=>{switch(e.filterType){case t.FilterChoiceValue.CHECKBOX:return e.fetchAsyncFilterOptions?r.jsx(y.AsyncCheckboxFilter,{field:e}):r.jsx(F.CheckboxFilter,{field:e});case t.FilterChoiceValue.RADIO:return e.fetchAsyncFilterOptions?r.jsx(x.AsyncRadioFilter,{field:e}):r.jsx(a.RadioFilter,{field:e});case t.FilterChoiceValue.DATE_RANGE:return r.jsx(p.DateRangeFilter,{field:e});case t.FilterChoiceValue.NUMBER_RANGE:return r.jsx(h.NumberRangeFilter,{field:e});default:return r.jsxs("div",{children:[e.id,": Unknown filter type: ",e.filterType]},e.id)}})]})})});exports.FilterGroup=C;
|
package/dist/index32.js
CHANGED
|
@@ -1,17 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { observer as
|
|
3
|
-
import { Stack as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { observer as m } from "mobx-react";
|
|
3
|
+
import { Accordion as p, Stack as c } from "@veeqo/ui";
|
|
4
|
+
import { VeeqoCommon as s } from "@veeqo/components";
|
|
5
|
+
import { MultipleFieldFilter as f } from "./index27.js";
|
|
6
|
+
import { FilterChoiceValue as t } from "./index44.js";
|
|
7
|
+
import { CheckboxFilter as u } from "./index25.js";
|
|
8
|
+
import { RadioFilter as F } from "./index29.js";
|
|
9
|
+
import { NumberRangeFilter as a } from "./index28.js";
|
|
10
|
+
import { DateRangeFilter as y } from "./index26.js";
|
|
11
|
+
import { AsyncRadioFilter as T } from "./index24.js";
|
|
12
|
+
import { AsyncCheckboxFilter as h } from "./index23.js";
|
|
13
|
+
const { Glyph: R } = s, O = m(({ data: o }) => {
|
|
14
|
+
const i = o.fields.filter(
|
|
15
|
+
(r) => r.filterType === t.TEXT || r.filterType === t.NUMBER
|
|
16
|
+
), l = o.fields.filter(
|
|
17
|
+
(r) => r.filterType !== t.TEXT && r.filterType !== t.NUMBER
|
|
18
|
+
);
|
|
19
|
+
return /* @__PURE__ */ e(p, { iconSlot: /* @__PURE__ */ e(R, { name: "product-menu" }), label: o.label, children: /* @__PURE__ */ n(c, { children: [
|
|
20
|
+
i.length > 0 ? /* @__PURE__ */ e(f, { fields: i, groupId: o.id }) : null,
|
|
21
|
+
l.map((r) => {
|
|
22
|
+
switch (r.filterType) {
|
|
23
|
+
case t.CHECKBOX:
|
|
24
|
+
return r.fetchAsyncFilterOptions ? /* @__PURE__ */ e(h, { field: r }) : /* @__PURE__ */ e(u, { field: r });
|
|
25
|
+
case t.RADIO:
|
|
26
|
+
return r.fetchAsyncFilterOptions ? /* @__PURE__ */ e(T, { field: r }) : /* @__PURE__ */ e(F, { field: r });
|
|
27
|
+
case t.DATE_RANGE:
|
|
28
|
+
return /* @__PURE__ */ e(y, { field: r });
|
|
29
|
+
case t.NUMBER_RANGE:
|
|
30
|
+
return /* @__PURE__ */ e(a, { field: r });
|
|
31
|
+
default:
|
|
32
|
+
return /* @__PURE__ */ n("div", { children: [
|
|
33
|
+
r.id,
|
|
34
|
+
": Unknown filter type: ",
|
|
35
|
+
r.filterType
|
|
36
|
+
] }, r.id);
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
] }) });
|
|
14
40
|
});
|
|
15
41
|
export {
|
|
16
|
-
|
|
42
|
+
O as FilterGroup
|
|
17
43
|
};
|
package/dist/index33.js
CHANGED
|
@@ -10,37 +10,12 @@ import { useDropdownManager as Z } from "./index51.js";
|
|
|
10
10
|
import { useBusinessLogic as b } from "./index7.js";
|
|
11
11
|
import { useStores as ee } from "./index56.js";
|
|
12
12
|
import { Confirmation as ie } from "./index76.js";
|
|
13
|
-
const we = G(({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = b(), {
|
|
20
|
-
Filters: {
|
|
21
|
-
activeViewId: c,
|
|
22
|
-
initFiltersFromView: d,
|
|
23
|
-
discardChanges: f,
|
|
24
|
-
initFromUrl: m,
|
|
25
|
-
filters: F,
|
|
26
|
-
setFilter: L
|
|
27
|
-
},
|
|
28
|
-
Views: {
|
|
29
|
-
draftViewsMap: T
|
|
30
|
-
},
|
|
31
|
-
Notifications: {
|
|
32
|
-
notify: x
|
|
33
|
-
}
|
|
34
|
-
} = ee(), {
|
|
35
|
-
viewsMap: u,
|
|
36
|
-
defaultCustomViewId: y,
|
|
37
|
-
isLoading: E
|
|
38
|
-
} = K(), {
|
|
39
|
-
isLoading: N,
|
|
40
|
-
isValidating: A
|
|
41
|
-
} = J({
|
|
42
|
-
type: S
|
|
43
|
-
}), [o, M] = W(null), R = (i) => {
|
|
13
|
+
const we = G(({ view: e }) => {
|
|
14
|
+
const { VIEW_TYPE: S, SEARCH_FILTER_ID: l } = b(), {
|
|
15
|
+
Filters: { activeViewId: c, initFiltersFromView: d, discardChanges: f, initFromUrl: m, filters: F, setFilter: L },
|
|
16
|
+
Views: { draftViewsMap: T },
|
|
17
|
+
Notifications: { notify: x }
|
|
18
|
+
} = ee(), { viewsMap: u, defaultCustomViewId: y, isLoading: E } = K(), { isLoading: N, isValidating: A } = J({ type: S }), [o, M] = W(null), R = (i) => {
|
|
44
19
|
const v = F.get(l);
|
|
45
20
|
if (u.has(i)) {
|
|
46
21
|
const r = u.get(i);
|
|
@@ -63,21 +38,11 @@ const we = G(({
|
|
|
63
38
|
}));
|
|
64
39
|
const V = C(() => t ? "draft" : e.editable ? "saved" : "fixed", [t, e.editable]), {
|
|
65
40
|
actions: {
|
|
66
|
-
create: {
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
menu: {
|
|
70
|
-
toggleDropdown: h
|
|
71
|
-
},
|
|
72
|
-
delete: {
|
|
73
|
-
closeDeleteConfirmation: j,
|
|
74
|
-
handleDelete: k,
|
|
75
|
-
handleDeleteDraftView: g
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
state: {
|
|
79
|
-
shouldShowDeleteConfirmation: B
|
|
41
|
+
create: { handleSaveDraft: _ },
|
|
42
|
+
menu: { toggleDropdown: h },
|
|
43
|
+
delete: { closeDeleteConfirmation: j, handleDelete: k, handleDeleteDraftView: g }
|
|
80
44
|
},
|
|
45
|
+
state: { shouldShowDeleteConfirmation: B },
|
|
81
46
|
actions: q,
|
|
82
47
|
state: D
|
|
83
48
|
} = Z(e), H = C(() => {
|
|
@@ -85,9 +50,45 @@ const we = G(({
|
|
|
85
50
|
if (t) return g;
|
|
86
51
|
}, [g, t, w, h]);
|
|
87
52
|
return /* @__PURE__ */ O(U, { children: [
|
|
88
|
-
/* @__PURE__ */ s(
|
|
89
|
-
|
|
90
|
-
|
|
53
|
+
/* @__PURE__ */ s(
|
|
54
|
+
$,
|
|
55
|
+
{
|
|
56
|
+
colourPalette: z.colors.secondary.blue,
|
|
57
|
+
className: "act-react-listing-custom-view",
|
|
58
|
+
active: n,
|
|
59
|
+
id: e == null ? void 0 : e.id,
|
|
60
|
+
name: a,
|
|
61
|
+
type: V,
|
|
62
|
+
count: I,
|
|
63
|
+
onClick: R,
|
|
64
|
+
subAction: H,
|
|
65
|
+
ariaContext: "orders",
|
|
66
|
+
ref: M,
|
|
67
|
+
"aria-controls": "options-dropdown",
|
|
68
|
+
"aria-expanded": D.shouldShowDropdown,
|
|
69
|
+
"aria-haspopup": "dialog"
|
|
70
|
+
},
|
|
71
|
+
e == null ? void 0 : e.id
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ s(
|
|
74
|
+
ie,
|
|
75
|
+
{
|
|
76
|
+
shouldShow: B,
|
|
77
|
+
viewName: a,
|
|
78
|
+
onCancel: j,
|
|
79
|
+
onDelete: k
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ s(
|
|
83
|
+
Q,
|
|
84
|
+
{
|
|
85
|
+
tabType: V,
|
|
86
|
+
isActive: n,
|
|
87
|
+
initialViewName: a,
|
|
88
|
+
shouldShowCreateViewNotification: t,
|
|
89
|
+
handleSaveDraft: _
|
|
90
|
+
}
|
|
91
|
+
),
|
|
91
92
|
/* @__PURE__ */ s(X, { referenceElement: o, tab: e, ...q, ...D })
|
|
92
93
|
] });
|
|
93
94
|
});
|
package/dist/index34.js
CHANGED
|
@@ -2,19 +2,20 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { VeeqoCommon as r } from "@veeqo/components";
|
|
3
3
|
import { Button as n, theme as c } from "@veeqo/ui";
|
|
4
4
|
import { useDuplicateActiveView as l } from "./index52.js";
|
|
5
|
-
const {
|
|
6
|
-
|
|
7
|
-
} = r, u = ({
|
|
8
|
-
hideActionsPopover: o
|
|
9
|
-
}) => {
|
|
10
|
-
const {
|
|
11
|
-
duplicateView: t
|
|
12
|
-
} = l(), i = () => {
|
|
5
|
+
const { Glyph: m } = r, u = ({ hideActionsPopover: o }) => {
|
|
6
|
+
const { duplicateView: t } = l(), i = () => {
|
|
13
7
|
t(), o();
|
|
14
8
|
};
|
|
15
|
-
return /* @__PURE__ */ e(
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
return /* @__PURE__ */ e(
|
|
10
|
+
n,
|
|
11
|
+
{
|
|
12
|
+
style: { width: "100%" },
|
|
13
|
+
iconSlot: /* @__PURE__ */ e(m, { name: "add", size: "sm", color: c.colors.neutral.ink.base }),
|
|
14
|
+
variant: "flat",
|
|
15
|
+
onClick: i,
|
|
16
|
+
children: "Create View"
|
|
17
|
+
}
|
|
18
|
+
);
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
20
21
|
u as CreateView
|