@veeqo/transfigure 0.0.18 → 0.0.20
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/components/RefreshButton/RefreshButton.d.ts +7 -0
- package/dist/components/RefreshButton/RefreshIcon.d.ts +1 -0
- package/dist/components/RefreshButton/index.d.ts +1 -0
- package/dist/components/RefreshButton/styled.d.ts +10 -0
- package/dist/components/RefreshButton/usePollListOrders.d.ts +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +71 -69
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +19 -63
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +8 -36
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +61 -39
- package/dist/index103.cjs +1 -7
- package/dist/index103.js +30 -10
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +65 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +38 -0
- package/dist/index106.cjs +13 -0
- package/dist/index106.js +19 -0
- package/dist/index107.cjs +1 -0
- package/dist/index107.js +44 -0
- package/dist/index108.cjs +7 -0
- package/dist/index108.js +12 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +1 -1
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +2 -2
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +2 -2
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +1 -1
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +2 -2
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +2 -2
- package/dist/index2.cjs +1 -1
- package/dist/index2.js +2 -2
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +3 -3
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +3 -3
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +3 -3
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +4 -4
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +4 -4
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +1 -1
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +2 -2
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +2 -2
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +3 -3
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +1 -1
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +6 -6
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +3 -3
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +3 -3
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +4 -4
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +2 -2
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +2 -2
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +4 -4
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +6 -6
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +25 -19
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +19 -8
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +7 -22
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +23 -2
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +2 -4
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +4 -11
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +2 -2
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +10 -12
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +12 -11
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +11 -184
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +183 -25
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +26 -24
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +19 -22
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +25 -90
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +92 -8
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +8 -51
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +50 -60
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +4 -4
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +61 -18
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +16 -23
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +25 -315
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +311 -55
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +50 -47
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +51 -32
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +30 -24
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +32 -4
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +4 -9
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +9 -17
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +14 -16
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +18 -47
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +48 -21
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +21 -2
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +2 -9
- package/dist/index75.cjs +1 -3
- package/dist/index75.js +8 -13
- package/dist/index76.cjs +3 -1
- package/dist/index76.js +13 -8
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +7 -141
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +142 -18
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +19 -33
- package/dist/index80.cjs +8 -1
- package/dist/index80.js +12 -29
- package/dist/index81.cjs +1 -19
- package/dist/index81.js +40 -23
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +6 -12
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +13 -22
- package/dist/index84.cjs +104 -1
- package/dist/index84.js +120 -13
- package/dist/index85.cjs +1 -104
- package/dist/index85.js +65 -117
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +24 -63
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +2 -29
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +41 -2
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +9 -39
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +16 -9
- package/dist/index91.cjs +1 -80
- package/dist/index91.js +24 -96
- package/dist/index92.cjs +1 -12
- package/dist/index92.js +33 -16
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +28 -23
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +22 -2
- package/dist/index95.cjs +17 -11
- package/dist/index95.js +20 -13
- package/dist/index96.cjs +12 -1
- package/dist/index96.js +16 -19
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +15 -8
- package/dist/index98.cjs +80 -1
- package/dist/index98.js +96 -64
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +2 -30
- package/dist/storybookHelpers/constants.d.ts +2 -5
- package/package.json +1 -1
package/dist/index104.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs as b, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { observer as N } from "mobx-react";
|
|
3
|
+
import { Stack as h, TextField as u } from "@veeqo/ui";
|
|
4
|
+
import { MUISlider as L } from "./index105.js";
|
|
5
|
+
const j = N(
|
|
6
|
+
({ data: g, editedValue: t, setEditedValue: l }) => {
|
|
7
|
+
var f;
|
|
8
|
+
if (!((f = g.options) != null && f.length)) return null;
|
|
9
|
+
const [i, x] = g.options, s = Number(i.value), c = Number(x.value), p = (e, n) => {
|
|
10
|
+
if (!Array.isArray(n) || n.length !== 2 || !t) return;
|
|
11
|
+
const [r, y] = n, m = t == null ? void 0 : t.clone();
|
|
12
|
+
m.setGte(r), m.setLte(y), l(m);
|
|
13
|
+
}, o = {
|
|
14
|
+
gte: (t == null ? void 0 : t.gte) || 0,
|
|
15
|
+
lte: (t == null ? void 0 : t.lte) || 100
|
|
16
|
+
}, M = (e) => {
|
|
17
|
+
if (!t) return;
|
|
18
|
+
const n = t.clone(), r = Number(e);
|
|
19
|
+
r > n.lteMax || (r >= n.gteMin && r <= n.lteMax && n.setGte(r), (!n.lte || r >= n.lte) && n.setLte(n.lteMax), l(n));
|
|
20
|
+
}, v = (e) => {
|
|
21
|
+
if (!t) return;
|
|
22
|
+
const n = t.clone(), r = Number(e);
|
|
23
|
+
r < n.gteMin || (r >= n.gteMin && r <= n.lteMax && n.setLte(r), (!n.gte || r <= n.gte) && n.setGte(n.gteMin), l(n));
|
|
24
|
+
}, C = [o.gte, o.lte];
|
|
25
|
+
return /* @__PURE__ */ b(h, { spacing: "xs", alignX: "stretch", children: [
|
|
26
|
+
/* @__PURE__ */ b(h, { direction: "horizontal", children: [
|
|
27
|
+
/* @__PURE__ */ a(
|
|
28
|
+
u,
|
|
29
|
+
{
|
|
30
|
+
label: i.label,
|
|
31
|
+
type: "number",
|
|
32
|
+
min: s,
|
|
33
|
+
max: c,
|
|
34
|
+
value: o.gte.toString(),
|
|
35
|
+
onChange: M
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ a(
|
|
39
|
+
u,
|
|
40
|
+
{
|
|
41
|
+
label: x.label,
|
|
42
|
+
type: "number",
|
|
43
|
+
min: s,
|
|
44
|
+
max: c,
|
|
45
|
+
value: o.lte.toString(),
|
|
46
|
+
onChange: v
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ a(
|
|
51
|
+
L,
|
|
52
|
+
{
|
|
53
|
+
value: C,
|
|
54
|
+
onChange: p,
|
|
55
|
+
min: s,
|
|
56
|
+
max: c,
|
|
57
|
+
valueLabelDisplay: "auto"
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
export {
|
|
64
|
+
j as FilterNumberRangeFilter
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@veeqo/ui"),o=require("@material-ui/core/styles"),t=require("@material-ui/core/Slider"),l=e=>e&&e.__esModule?e:{default:e},i=l(t),a=o.withStyles({root:{color:r.theme.colors.secondary.blue.base,height:4},thumb:{height:20,width:20,backgroundColor:"#fff",border:"3px solid currentColor",marginTop:-8,marginLeft:-10,"&:focus, &:hover, &$active":{boxShadow:"inherit"}},valueLabel:{left:"calc(-50% - 1px)"},track:{height:4,borderRadius:4,backgroundColor:r.theme.colors.secondary.blue.light,opacity:1},rail:{height:4,borderRadius:4,backgroundColor:r.theme.colors.neutral.grey.dark,opacity:1}})(i.default);exports.MUISlider=a;
|
package/dist/index105.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { theme as o } from "@veeqo/ui";
|
|
2
|
+
import { withStyles as r } from "@material-ui/core/styles";
|
|
3
|
+
import e from "@material-ui/core/Slider";
|
|
4
|
+
const l = r({
|
|
5
|
+
root: {
|
|
6
|
+
color: o.colors.secondary.blue.base,
|
|
7
|
+
height: 4
|
|
8
|
+
},
|
|
9
|
+
thumb: {
|
|
10
|
+
height: 20,
|
|
11
|
+
width: 20,
|
|
12
|
+
backgroundColor: "#fff",
|
|
13
|
+
border: "3px solid currentColor",
|
|
14
|
+
marginTop: -8,
|
|
15
|
+
marginLeft: -10,
|
|
16
|
+
"&:focus, &:hover, &$active": {
|
|
17
|
+
boxShadow: "inherit"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
valueLabel: {
|
|
21
|
+
left: "calc(-50% - 1px)"
|
|
22
|
+
},
|
|
23
|
+
track: {
|
|
24
|
+
height: 4,
|
|
25
|
+
borderRadius: 4,
|
|
26
|
+
backgroundColor: o.colors.secondary.blue.light,
|
|
27
|
+
opacity: 1
|
|
28
|
+
},
|
|
29
|
+
rail: {
|
|
30
|
+
height: 4,
|
|
31
|
+
borderRadius: 4,
|
|
32
|
+
backgroundColor: o.colors.neutral.grey.dark,
|
|
33
|
+
opacity: 1
|
|
34
|
+
}
|
|
35
|
+
})(e);
|
|
36
|
+
export {
|
|
37
|
+
l as MUISlider
|
|
38
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@veeqo/components"),o=require("@veeqo/ui"),s=require("styled-components"),l=e=>e&&e.__esModule?e:{default:e},r=l(s),{SortableViews:i}=t.VeeqoUI,n=r.default(i)`
|
|
2
|
+
.rst__rowTitle {
|
|
3
|
+
span {
|
|
4
|
+
white-space: nowrap;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
text-overflow: ellipsis;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.rst__rowTitle > div:first-child {
|
|
11
|
+
gap: ${o.theme.sizes.sm};
|
|
12
|
+
}
|
|
13
|
+
`;exports.StyledSortableViews=n;
|
package/dist/index106.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { VeeqoUI as e } from "@veeqo/components";
|
|
2
|
+
import { theme as o } from "@veeqo/ui";
|
|
3
|
+
import t from "styled-components";
|
|
4
|
+
const { SortableViews: r } = e, p = t(r)`
|
|
5
|
+
.rst__rowTitle {
|
|
6
|
+
span {
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
text-overflow: ellipsis;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.rst__rowTitle > div:first-child {
|
|
14
|
+
gap: ${o.sizes.sm};
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
export {
|
|
18
|
+
p as StyledSortableViews
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react");const n=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:r}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:r}=t;return"scaleX("+e+") scaleY("+r+")"}},Transform:{toString(t){if(t)return[n.Translate.toString(t),n.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:r,easing:i}=t;return e+" "+r+"ms "+i}}});exports.CSS=n;
|
package/dist/index107.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
const n = /* @__PURE__ */ Object.freeze({
|
|
3
|
+
Translate: {
|
|
4
|
+
toString(t) {
|
|
5
|
+
if (!t)
|
|
6
|
+
return;
|
|
7
|
+
const {
|
|
8
|
+
x: r,
|
|
9
|
+
y: e
|
|
10
|
+
} = t;
|
|
11
|
+
return "translate3d(" + (r ? Math.round(r) : 0) + "px, " + (e ? Math.round(e) : 0) + "px, 0)";
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
Scale: {
|
|
15
|
+
toString(t) {
|
|
16
|
+
if (!t)
|
|
17
|
+
return;
|
|
18
|
+
const {
|
|
19
|
+
scaleX: r,
|
|
20
|
+
scaleY: e
|
|
21
|
+
} = t;
|
|
22
|
+
return "scaleX(" + r + ") scaleY(" + e + ")";
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
Transform: {
|
|
26
|
+
toString(t) {
|
|
27
|
+
if (t)
|
|
28
|
+
return [n.Translate.toString(t), n.Scale.toString(t)].join(" ");
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
Transition: {
|
|
32
|
+
toString(t) {
|
|
33
|
+
let {
|
|
34
|
+
property: r,
|
|
35
|
+
duration: e,
|
|
36
|
+
easing: i
|
|
37
|
+
} = t;
|
|
38
|
+
return r + " " + e + "ms " + i;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export {
|
|
43
|
+
n as CSS
|
|
44
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("styled-components"),e=require("@veeqo/ui"),a=t=>t&&t.__esModule?t:{default:t},i=a(o),s=i.default(e.BaseContainer)`
|
|
2
|
+
padding: ${e.theme.sizes.sm};
|
|
3
|
+
// This calculation limits the height to a max of 100% of the viewport and uses offset as the position of the CTA button
|
|
4
|
+
// with an additional sizes.base offset at the bottom.
|
|
5
|
+
max-height: calc(100vh ${({offset:t})=>t&&`- ${t}px`} - ${e.theme.sizes.base});
|
|
6
|
+
overflow-y: auto;
|
|
7
|
+
`;exports.AdaptiveStyledContainer=s;
|
package/dist/index108.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import o from "styled-components";
|
|
2
|
+
import { theme as e, BaseContainer as i } from "@veeqo/ui";
|
|
3
|
+
const h = o(i)`
|
|
4
|
+
padding: ${e.sizes.sm};
|
|
5
|
+
// This calculation limits the height to a max of 100% of the viewport and uses offset as the position of the CTA button
|
|
6
|
+
// with an additional sizes.base offset at the bottom.
|
|
7
|
+
max-height: calc(100vh ${({ offset: t }) => t && `- ${t}px`} - ${e.sizes.base});
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
`;
|
|
10
|
+
export {
|
|
11
|
+
h as AdaptiveStyledContainer
|
|
12
|
+
};
|
package/dist/index11.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),S=require("mobx-react"),d=require("@veeqo/ui"),_=require("lodash/debounce"),o=require("react"),h=require("./index7.cjs"),b=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),S=require("mobx-react"),d=require("@veeqo/ui"),_=require("lodash/debounce"),o=require("react"),h=require("./index7.cjs"),b=require("./index58.cjs"),f=e=>e&&e.__esModule?e:{default:e},g=f(_),q=S.observer(()=>{const{SEARCH_FILTER_ID:e,FILTERS_DEBOUCE_INTERVAL_MS:u}=h.useBusinessLogic(),{Filters:{setFilter:t,filters:c}}=b.useStores(),[n,a]=o.useState(c.get(e)||""),i=o.useCallback(g.default(s=>{t(e,s)},u),[t,e]),l=s=>{a(s),i(s)};return r.jsx("div",{style:{flexGrow:1},children:r.jsx(d.Search,{value:n,onChange:l})})});exports.SearchBar=q;
|
package/dist/index11.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Search as l } from "@veeqo/ui";
|
|
|
4
4
|
import u from "lodash/debounce";
|
|
5
5
|
import { useState as h, useCallback as f } from "react";
|
|
6
6
|
import { useBusinessLogic as S } from "./index7.js";
|
|
7
|
-
import { useStores as p } from "./
|
|
7
|
+
import { useStores as p } from "./index58.js";
|
|
8
8
|
const L = m(() => {
|
|
9
9
|
const { SEARCH_FILTER_ID: r, FILTERS_DEBOUCE_INTERVAL_MS: s } = S(), {
|
|
10
10
|
Filters: { setFilter: o, filters: n }
|
package/dist/index12.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("mobx-react"),s=require("@veeqo/ui"),h=require("react"),d=require("./index7.cjs"),P=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("mobx-react"),s=require("@veeqo/ui"),h=require("react"),d=require("./index7.cjs"),P=require("./index58.cjs"),S=g.observer(({totalPagesCount:i})=>{const{PAGE_SIZE_OPTIONS:a}=d.useBusinessLogic(),{Filters:{setCurrentPage:c,currentPage:o,pageSize:t,setPageSize:r}}=P.useStores(),u=e=>{c(e)},l=h.useCallback(e=>{t!==e&&r(e)},[t,r]);return n.jsxs(s.Stack,{direction:"horizontal",children:[n.jsx(s.Pagination,{currentPage:o,totalPagesCount:i,handleChangePage:u}),n.jsx(s.ActionMenu,{menuLabel:"items per page",ctaProps:{children:`${t} / page`,style:{marginLeft:s.theme.sizes.xs}},children:a.map(e=>n.jsxs(s.ActionMenu.Item,{onAction:()=>l(e),children:[e," / page"]},e))})]})});exports.TableControls=S;
|
package/dist/index12.js
CHANGED
|
@@ -3,7 +3,7 @@ import { observer as h } from "mobx-react";
|
|
|
3
3
|
import { Stack as p, Pagination as u, ActionMenu as s, theme as P } from "@veeqo/ui";
|
|
4
4
|
import { useCallback as d } from "react";
|
|
5
5
|
import { useBusinessLogic as f } from "./index7.js";
|
|
6
|
-
import { useStores as S } from "./
|
|
6
|
+
import { useStores as S } from "./index58.js";
|
|
7
7
|
const L = h(({ totalPagesCount: o }) => {
|
|
8
8
|
const { PAGE_SIZE_OPTIONS: i } = f(), {
|
|
9
9
|
Filters: { setCurrentPage: m, currentPage: c, pageSize: r, setPageSize: t }
|
package/dist/index13.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("@veeqo/ui"),n=require("mobx-react"),u=require("react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("@veeqo/ui"),n=require("mobx-react"),u=require("react"),a=require("./index58.cjs"),c=n.observer(()=>{const{Notifications:{toasts:e,removeByKey:t}}=a.useStores();return u.useEffect(()=>{if(e.length>0){const s=e[0],o=setTimeout(()=>{t(s.key)},2e3);return()=>clearTimeout(o)}},[e,t]),r.jsx(i.ToastsLayout,{max:10,minWidth:"",toasts:e,onClose:t})});exports.ToastsManager=c;
|
package/dist/index13.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { ToastsLayout as m } from "@veeqo/ui";
|
|
3
3
|
import { observer as i } from "mobx-react";
|
|
4
4
|
import { useEffect as n } from "react";
|
|
5
|
-
import { useStores as a } from "./
|
|
5
|
+
import { useStores as a } from "./index58.js";
|
|
6
6
|
const y = i(() => {
|
|
7
7
|
const { Notifications: { toasts: o, removeByKey: t } } = a();
|
|
8
8
|
return n(() => {
|
package/dist/index14.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),m=require("mobx-react"),t=require("@veeqo/ui"),x=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),m=require("mobx-react"),t=require("@veeqo/ui"),x=require("./index56.cjs"),g=require("./index17.cjs"),j=require("./index58.cjs"),p=m.observer(({filterData:i})=>{const{Filters:{filters:l,clearFilter:o,setFilter:d}}=j.useStores(),s=l.get(i.id),{filterLabel:a}=x.useFilterLabel({filterData:i}),[r,n]=c.useState(s||"");c.useEffect(()=>{r!==s&&n(s||"")},[i.id,s,l]);const u=()=>{o(i.id)},F=()=>{d(i.id,r)};return e.jsx(t.FilterTag,{shouldCloseOnClickAway:!0,header:e.jsx("div",{children:"Edit filter (style and semant me pls)"}),label:i.label,text:a||"Loading...",content:e.jsx(t.BaseContainer,{style:{padding:t.theme.sizes.md},children:e.jsx(g.FilterField,{data:i,editedValue:r,setEditedValue:h=>n(h)})}),footer:e.jsx(t.BaseContainer,{style:{padding:t.theme.sizes.sm,width:"200px"},children:e.jsxs(t.Stack,{direction:"horizontal",alignX:"end",children:[e.jsx(t.Button,{variant:"default",size:"sm",onClick:u,children:"Clear"}),e.jsx(t.Button,{variant:"primary",size:"sm",onClick:F,children:"Apply"})]})})})});exports.ActiveFilterTag=p;
|
package/dist/index14.js
CHANGED
|
@@ -2,9 +2,9 @@ import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as F, useEffect as g } from "react";
|
|
3
3
|
import { observer as v } from "mobx-react";
|
|
4
4
|
import { FilterTag as y, BaseContainer as o, theme as n, Stack as C, Button as d } from "@veeqo/ui";
|
|
5
|
-
import { useFilterLabel as b } from "./
|
|
5
|
+
import { useFilterLabel as b } from "./index56.js";
|
|
6
6
|
import { FilterField as x } from "./index17.js";
|
|
7
|
-
import { useStores as z } from "./
|
|
7
|
+
import { useStores as z } from "./index58.js";
|
|
8
8
|
const w = v(({ filterData: e }) => {
|
|
9
9
|
const {
|
|
10
10
|
Filters: { filters: l, clearFilter: c, setFilter: a }
|
package/dist/index15.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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("./
|
|
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("./index46.cjs"),A=require("./index18.cjs"),g=require("./index19.cjs"),v=require("./index20.cjs"),h=require("./index14.cjs"),T=require("./index7.cjs"),f=require("./index58.cjs"),x=F.observer(()=>{const{FIELDS_MAP:c}=T.useBusinessLogic(),{Filters:{hasActiveFilters:a,activeFilterKeysList:l,clearAllFilters:n}}=f.useStores();if(!a)return null;const o=Array.from(c).filter(([e])=>l.includes(e));return t.jsxs(s.Stack,{direction:"horizontal",alignY:"center",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(A.ActiveFilterArrayTag,{filterData:i},e);case r.FilterChoiceValue.DATE_RANGE:return t.jsx(g.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,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { observer as m } from "mobx-react";
|
|
3
3
|
import { Stack as f, Button as p, Alert as A } from "@veeqo/ui";
|
|
4
|
-
import { FilterChoiceValue as e } from "./
|
|
4
|
+
import { FilterChoiceValue as e } from "./index46.js";
|
|
5
5
|
import { ActiveFilterArrayTag as u } from "./index18.js";
|
|
6
6
|
import { ActiveFilterDateRangeTag as F } from "./index19.js";
|
|
7
7
|
import { ActiveFilterNumberRangeTag as h } from "./index20.js";
|
|
8
8
|
import { ActiveFilterTag as d } from "./index14.js";
|
|
9
9
|
import { useBusinessLogic as g } from "./index7.js";
|
|
10
|
-
import { useStores as v } from "./
|
|
10
|
+
import { useStores as v } from "./index58.js";
|
|
11
11
|
const U = m(() => {
|
|
12
12
|
const { FIELDS_MAP: o } = g(), {
|
|
13
13
|
Filters: { hasActiveFilters: s, activeFilterKeysList: a, clearAllFilters: n }
|
package/dist/index16.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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("./
|
|
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("./index46.cjs"),u=require("./index21.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,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { observer as n } from "mobx-react";
|
|
3
3
|
import { ChoiceList as p } from "@veeqo/ui";
|
|
4
|
-
import { FilterChoiceValue as s } from "./
|
|
4
|
+
import { FilterChoiceValue as s } from "./index46.js";
|
|
5
5
|
import { ActiveAsyncCheckboxFilter as c } from "./index21.js";
|
|
6
6
|
const F = n(
|
|
7
7
|
({ data: r, editedValue: e, setEditedValue: o }) => {
|
package/dist/index17.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("mobx-react"),n=require("@veeqo/ui"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("mobx-react"),n=require("@veeqo/ui"),i=require("./index46.cjs"),F=require("./index22.cjs"),h=u.observer(({data:e,editedValue:r,setEditedValue:t})=>{var s;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(n.TextField,{label:e.label,type:l,value:r,onChange:c=>t(c)});case i.FilterChoiceValue.RADIO:case i.FilterChoiceValue.DATE_RANGE:return e.fetchAsyncFilterOptions?o.jsx(F.ActiveAsyncRadioFilter,{field:e,setEditedValue:t,editedValue:r}):o.jsx(n.ChoiceList,{title:e.label,options:(s=e.options)!=null&&s.length?e.options:[],selected:[r],onChange:c=>t(`${c[0]}`)});default:return null}});exports.FilterField=h;
|
package/dist/index17.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { observer as c } from "mobx-react";
|
|
3
3
|
import { ChoiceList as p, TextField as f } from "@veeqo/ui";
|
|
4
|
-
import { FilterChoiceValue as r } from "./
|
|
4
|
+
import { FilterChoiceValue as r } from "./index46.js";
|
|
5
5
|
import { ActiveAsyncRadioFilter as m } from "./index22.js";
|
|
6
6
|
const u = c(({ data: e, editedValue: o, setEditedValue: i }) => {
|
|
7
7
|
var s;
|
package/dist/index18.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),A=require("mobx-react"),r=require("@veeqo/ui"),h=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),A=require("mobx-react"),r=require("@veeqo/ui"),h=require("./index55.cjs"),m=require("./index16.cjs"),x=require("./index58.cjs"),j=A.observer(({filterData:t})=>{const{Filters:{arrayFilters:l,clearArrayFilter:c,setArrayFilter:d}}=x.useStores(),i=l.get(t.id),[s,n]=a.useState(i||[]);a.useEffect(()=>{s!==i&&n(i||[])},[t.id,i,l]);const o=()=>{c(t.id)},u=()=>{d(t.id,s)},{filterLabel:y}=h.useFilterArrayLabel({filterData:t});return e.jsx(r.FilterTag,{shouldCloseOnClickAway:!0,header:e.jsx("div",{children:"Edit filter (style and semant me pls)"}),label:t.label,text:y||"",content:e.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.md},children:e.jsx(m.FilterArrayField,{data:t,editedValue:s||[],setEditedValue:F=>n(F)})}),footer:e.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.sm,width:"200px"},children:e.jsxs(r.Stack,{direction:"horizontal",alignX:"end",children:[e.jsx(r.Button,{variant:"default",size:"sm",onClick:o,children:"Clear"}),e.jsx(r.Button,{variant:"primary",size:"sm",onClick:u,children:"Apply"})]})})})});exports.ActiveFilterArrayTag=j;
|
package/dist/index18.js
CHANGED
|
@@ -2,9 +2,9 @@ import { jsx as r, jsxs as h } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as F, useEffect as A } from "react";
|
|
3
3
|
import { observer as f } from "mobx-react";
|
|
4
4
|
import { FilterTag as v, BaseContainer as o, theme as d, Stack as g, Button as n } from "@veeqo/ui";
|
|
5
|
-
import { useFilterArrayLabel as C } from "./
|
|
5
|
+
import { useFilterArrayLabel as C } from "./index55.js";
|
|
6
6
|
import { FilterArrayField as b } from "./index16.js";
|
|
7
|
-
import { useStores as x } from "./
|
|
7
|
+
import { useStores as x } from "./index58.js";
|
|
8
8
|
const B = f(({ filterData: e }) => {
|
|
9
9
|
const {
|
|
10
10
|
Filters: { arrayFilters: l, clearArrayFilter: a, setArrayFilter: c }
|
package/dist/index19.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),x=require("mobx-react"),n=require("@veeqo/ui"),o=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),x=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index65.cjs"),A=require("./index7.cjs"),j=require("./index58.cjs"),v=x.observer(({filterData:i})=>{const{DEFAULT_DATE_PRESET:g,DEFAULT_DATE_RANGE:d}=A.useBusinessLogic(),{Filters:{dateRangeFilters:l,clearRangeFilter:u,setRangeFilter:F}}=j.useStores(),t=l.get(i.id),[e,a]=c.useState(l.get(i.id)),R=()=>{const s=new o.RangeFilter;return s.setFilterType(t==null?void 0:t.filterType),a(s),s};c.useEffect(()=>{if(!t)return;const s=new o.RangeFilter;s.setFilterType(t.filterType),t.gte&&t.lte&&s.setDates(t.gte,t.lte),a(s)},[t]);const p=()=>{u(i.id)},y=()=>{t&&(e!=null&&e.filterType)&&F({dates:{start:e.gte,end:e.lte},key:e.filterType,range:t})},h=(e==null?void 0:e.filterSelection)||g,T=s=>{s&&(e||R(),e==null||e.setFilterType(s.value))},f=s=>{!s||!e||e.setDates(s.start,s.end)},m=e?e.selectedRange:d;return r.jsx(n.FilterTag,{shouldCloseOnClickAway:!0,header:r.jsx("div",{children:"Edit filter (style and semant me pls)"}),label:i.label,text:(t==null?void 0:t.filterLabel)||"",content:r.jsx(n.BaseContainer,{style:{padding:n.theme.sizes.md},children:r.jsx(n.DateRangePicker,{"aria-label":`date range for ${i.label}`,selectedPreset:h,setSelectedPreset:T,selectedRange:m,setSelectedRange:f})}),footer:r.jsx(n.BaseContainer,{style:{padding:n.theme.sizes.sm,width:"200px"},children:r.jsxs(n.Stack,{direction:"horizontal",alignX:"end",children:[r.jsx(n.Button,{variant:"default",size:"sm",onClick:p,children:"Clear"}),r.jsx(n.Button,{variant:"primary",size:"sm",onClick:y,children:"Apply"})]})})})});exports.ActiveFilterDateRangeTag=v;
|
package/dist/index19.js
CHANGED
|
@@ -2,9 +2,9 @@ import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as v, useEffect as C } from "react";
|
|
3
3
|
import { observer as S } from "mobx-react";
|
|
4
4
|
import { FilterTag as b, BaseContainer as a, theme as o, Stack as k, Button as c, DateRangePicker as P } from "@veeqo/ui";
|
|
5
|
-
import { RangeFilter as g } from "./
|
|
5
|
+
import { RangeFilter as g } from "./index65.js";
|
|
6
6
|
import { useBusinessLogic as w } from "./index7.js";
|
|
7
|
-
import { useStores as x } from "./
|
|
7
|
+
import { useStores as x } from "./index58.js";
|
|
8
8
|
const G = S(
|
|
9
9
|
({ filterData: i }) => {
|
|
10
10
|
const { DEFAULT_DATE_PRESET: d, DEFAULT_DATE_RANGE: p } = w(), {
|
package/dist/index2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index6.cjs"),s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index6.cjs"),s=require("./index50.cjs"),i=require("./index51.cjs"),o=e=>t.axios.delete(`/api/v2/custom_views/${e}`,s.withCSRF(i.vndAPI));exports.deleteCustomView=o;
|
package/dist/index2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { axios as t } from "./index6.js";
|
|
2
|
-
import { withCSRF as e } from "./
|
|
3
|
-
import { vndAPI as i } from "./
|
|
2
|
+
import { withCSRF as e } from "./index50.js";
|
|
3
|
+
import { vndAPI as i } from "./index51.js";
|
|
4
4
|
const s = (o) => t.delete(`/api/v2/custom_views/${o}`, e(i));
|
|
5
5
|
export {
|
|
6
6
|
s as deleteCustomView
|
package/dist/index20.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("react"),b=require("mobx-react"),r=require("@veeqo/ui"),F=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("react"),b=require("mobx-react"),r=require("@veeqo/ui"),F=require("./index64.cjs"),R=require("./index104.cjs"),h=require("./index58.cjs"),x=b.observer(({filterData:i})=>{const{Filters:{numberRangeFilters:o,clearNumberRangeFilter:u,setNumberRangeFilter:d}}=h.useStores(),e=o.get(i.id),[s,a]=l.useState(e),c=l.useCallback(()=>{const n=new F.NumberRangeFilter({filterId:i.id});return e&&(e.gte&&n.setGte(e.gte),e.lte&&n.setLte(e.lte)),n},[i.id,e]);l.useEffect(()=>{const n=c();a(n)},[c,e]);const g=()=>{u(i.id)},m=()=>{!e||!s||d({numberRange:e,lte:s.lte,gte:s.gte})};return t.jsx(r.FilterTag,{shouldCloseOnClickAway:!0,header:t.jsx("div",{children:"Edit filter (style and semant me pls)"}),label:i.label,text:(e==null?void 0:e.filterLabel)||"Loading...",content:t.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.md},children:t.jsx(R.FilterNumberRangeFilter,{data:i,editedValue:s,setEditedValue:a})}),footer:t.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.sm,width:"200px"},children:t.jsxs(r.Stack,{direction:"horizontal",alignX:"end",children:[t.jsx(r.Button,{variant:"default",size:"sm",onClick:g,children:"Clear"}),t.jsx(r.Button,{variant:"primary",size:"sm",onClick:m,children:"Apply"})]})})})});exports.ActiveFilterNumberRangeTag=x;
|
package/dist/index20.js
CHANGED
|
@@ -2,9 +2,9 @@ import { jsx as t, jsxs as F } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as b, useCallback as f, useEffect as h } from "react";
|
|
3
3
|
import { observer as R } from "mobx-react";
|
|
4
4
|
import { FilterTag as v, BaseContainer as o, theme as a, Stack as y, Button as d } from "@veeqo/ui";
|
|
5
|
-
import { NumberRangeFilter as C } from "./
|
|
6
|
-
import { FilterNumberRangeFilter as N } from "./
|
|
7
|
-
import { useStores as w } from "./
|
|
5
|
+
import { NumberRangeFilter as C } from "./index64.js";
|
|
6
|
+
import { FilterNumberRangeFilter as N } from "./index104.js";
|
|
7
|
+
import { useStores as w } from "./index58.js";
|
|
8
8
|
const j = R(
|
|
9
9
|
({ filterData: r }) => {
|
|
10
10
|
const {
|
package/dist/index21.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("react"),d=require("mobx-react"),t=require("@veeqo/ui"),m=require("swr/immutable"),x=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("react"),d=require("mobx-react"),t=require("@veeqo/ui"),m=require("swr/immutable"),x=require("./index69.cjs"),y=require("./index70.cjs"),F=require("./index46.cjs"),O=e=>e&&e.__esModule?e:{default:e},A=O(m),S=d.observer(({field:e,editedValue:o,setEditedValue:a})=>{var c,i;const l=p.useMemo(()=>{var r;return y.getFetcherFunction({fetcherName:(r=e.fetchAsyncFilterOptions)==null?void 0:r.fetcher})},[(c=e.fetchAsyncFilterOptions)==null?void 0:c.fetcher]),{isLoading:u,isValidating:h,data:g,error:b}=A.default((i=e.fetchAsyncFilterOptions)==null?void 0:i.URL,l,F.SWR_HOOK_OPTIONS),n=u||h,f=x.getAsyncOptions({data:g,config:e.fetchAsyncFilterOptions});return s.jsxs(t.Stack,{spacing:"xs",alignX:"stretch",children:[s.jsx(t.ChoiceList,{allowMultiple:!0,title:e.label,options:f,selected:o,onChange:r=>a(r)}),n&&s.jsx(t.Skeleton,{width:"200px",height:t.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!n&&b&&s.jsxs(t.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.ActiveAsyncCheckboxFilter=S;
|
package/dist/index21.js
CHANGED
|
@@ -3,9 +3,9 @@ import { useMemo as u } from "react";
|
|
|
3
3
|
import { observer as O } from "mobx-react";
|
|
4
4
|
import { Stack as b, ChoiceList as F, Skeleton as x, theme as y, Text as A } from "@veeqo/ui";
|
|
5
5
|
import S from "swr/immutable";
|
|
6
|
-
import { getAsyncOptions as d } from "./
|
|
7
|
-
import { getFetcherFunction as L } from "./
|
|
8
|
-
import { SWR_HOOK_OPTIONS as k } from "./
|
|
6
|
+
import { getAsyncOptions as d } from "./index69.js";
|
|
7
|
+
import { getFetcherFunction as L } from "./index70.js";
|
|
8
|
+
import { SWR_HOOK_OPTIONS as k } from "./index46.js";
|
|
9
9
|
const T = O(
|
|
10
10
|
({ field: t, editedValue: c, setEditedValue: a }) => {
|
|
11
11
|
var o, i;
|
package/dist/index22.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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("./
|
|
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("./index69.cjs"),F=require("./index70.cjs"),O=require("./index46.cjs"),A=e=>e&&e.__esModule?e:{default:e},x=A(p),R=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=R;
|
package/dist/index22.js
CHANGED
|
@@ -3,9 +3,9 @@ import { useMemo as O } from "react";
|
|
|
3
3
|
import { observer as u } from "mobx-react";
|
|
4
4
|
import { Stack as F, ChoiceList as b, Skeleton as y, theme as A, Text as d } from "@veeqo/ui";
|
|
5
5
|
import x from "swr/immutable";
|
|
6
|
-
import { getAsyncOptions as S } from "./
|
|
7
|
-
import { getFetcherFunction as L } from "./
|
|
8
|
-
import { SWR_HOOK_OPTIONS as R } from "./
|
|
6
|
+
import { getAsyncOptions as S } from "./index69.js";
|
|
7
|
+
import { getFetcherFunction as L } from "./index70.js";
|
|
8
|
+
import { SWR_HOOK_OPTIONS as R } from "./index46.js";
|
|
9
9
|
const _ = u(
|
|
10
10
|
({ field: t, editedValue: c, setEditedValue: a }) => {
|
|
11
11
|
var o, i;
|
package/dist/index23.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),o=require("react"),C=require("mobx-react"),L=require("lodash/debounce"),s=require("@veeqo/ui"),R=require("swr/immutable"),j=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),o=require("react"),C=require("mobx-react"),L=require("lodash/debounce"),s=require("@veeqo/ui"),R=require("swr/immutable"),j=require("./index69.cjs"),k=require("./index70.cjs"),V=require("./index46.cjs"),E=require("./index7.cjs"),I=require("./index58.cjs"),h=e=>e&&e.__esModule?e:{default:e},M=h(L),T=h(R),v=C.observer(({field:e})=>{var l,u;const{FILTERS_DEBOUCE_INTERVAL_MS:d}=E.useBusinessLogic(),g=o.useMemo(()=>{var t;return k.getFetcherFunction({fetcherName:(t=e.fetchAsyncFilterOptions)==null?void 0:t.fetcher})},[(l=e.fetchAsyncFilterOptions)==null?void 0:l.fetcher]),{isLoading:b,isValidating:F,data:S,error:y}=T.default((u=e.fetchAsyncFilterOptions)==null?void 0:u.URL,g,V.SWR_HOOK_OPTIONS),i=b||F,{Filters:{setArrayFilter:c,arrayFilters:p}}=I.useStores(),O=p.get(e.id)||[],[m,a]=o.useState(O),x=o.useCallback(M.default((t,n)=>{c(t,n)},d),[c]),_=t=>{const n=t.map(A=>`${A}`);a(n),x(e.id,n)},f=()=>{a([]),c(e.id,[])},q=j.getAsyncOptions({data:S,config:e.fetchAsyncFilterOptions});return r.jsxs(s.Stack,{spacing:"xs",alignX:"stretch",children:[r.jsx(s.Button,{variant:"link",onClick:f,children:"Clear"}),r.jsx(s.ChoiceList,{allowMultiple:!0,title:e.label,options:q,selected:m,onChange:t=>_(t)}),i&&r.jsx(s.Skeleton,{width:"200px",height:s.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!i&&y&&r.jsxs(s.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.AsyncCheckboxFilter=v;
|
package/dist/index23.js
CHANGED
|
@@ -4,11 +4,11 @@ import { observer as V } from "mobx-react";
|
|
|
4
4
|
import E from "lodash/debounce";
|
|
5
5
|
import { Stack as R, Button as _, ChoiceList as I, Skeleton as T, theme as v, Text as w } from "@veeqo/ui";
|
|
6
6
|
import B from "swr/immutable";
|
|
7
|
-
import { getAsyncOptions as M } from "./
|
|
8
|
-
import { getFetcherFunction as N } from "./
|
|
9
|
-
import { SWR_HOOK_OPTIONS as j } from "./
|
|
7
|
+
import { getAsyncOptions as M } from "./index69.js";
|
|
8
|
+
import { getFetcherFunction as N } from "./index70.js";
|
|
9
|
+
import { SWR_HOOK_OPTIONS as j } from "./index46.js";
|
|
10
10
|
import { useBusinessLogic as U } from "./index7.js";
|
|
11
|
-
import { useStores as W } from "./
|
|
11
|
+
import { useStores as W } from "./index58.js";
|
|
12
12
|
const Y = V(({ field: t }) => {
|
|
13
13
|
var c, a;
|
|
14
14
|
const { FILTERS_DEBOUCE_INTERVAL_MS: m } = U(), u = L(() => {
|
package/dist/index24.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),x=require("mobx-react"),A=require("lodash/debounce"),s=require("@veeqo/ui"),L=require("swr/immutable"),j=require("./index69.cjs"),C=require("./index70.cjs"),V=require("./index46.cjs"),k=require("./index7.cjs"),E=require("./index58.cjs"),d=e=>e&&e.__esModule?e:{default:e},I=d(A),T=d(L),v=x.observer(({field:e})=>{var u,l;const{FILTERS_DEBOUCE_INTERVAL_MS:h}=k.useBusinessLogic(),g=o.useMemo(()=>{var t;return C.getFetcherFunction({fetcherName:(t=e.fetchAsyncFilterOptions)==null?void 0:t.fetcher})},[(u=e.fetchAsyncFilterOptions)==null?void 0:u.fetcher]),{isLoading:F,isValidating:S,data:b,error:O}=T.default((l=e.fetchAsyncFilterOptions)==null?void 0:l.URL,g,V.SWR_HOOK_OPTIONS),i=F||S,{Filters:{setFilter:c,filters:f}}=E.useStores(),_=f.get(e.id),[m,a]=o.useState(_),p=o.useCallback(I.default((t,r)=>{c(t,r)},h),[c]),q=t=>{const r=`${t[0]}`;a(r),p(e.id,r)},y=()=>{a(""),c(e.id,"")},R=j.getAsyncOptions({data:b,config:e.fetchAsyncFilterOptions});return n.jsxs(s.Stack,{spacing:"xs",alignX:"stretch",children:[n.jsx(s.Button,{variant:"link",onClick:y,children:"Clear"}),n.jsx(s.ChoiceList,{title:e.label,options:R,selected:[m],onChange:t=>q(t)}),i&&n.jsx(s.Skeleton,{width:"200px",height:s.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!i&&O&&n.jsxs(s.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.AsyncRadioFilter=v;
|
package/dist/index24.js
CHANGED
|
@@ -4,11 +4,11 @@ import { observer as R } from "mobx-react";
|
|
|
4
4
|
import V from "lodash/debounce";
|
|
5
5
|
import { Stack as k, Button as E, ChoiceList as _, Skeleton as I, theme as T, Text as v } from "@veeqo/ui";
|
|
6
6
|
import B from "swr/immutable";
|
|
7
|
-
import { getAsyncOptions as N } from "./
|
|
8
|
-
import { getFetcherFunction as j } from "./
|
|
9
|
-
import { SWR_HOOK_OPTIONS as w } from "./
|
|
7
|
+
import { getAsyncOptions as N } from "./index69.js";
|
|
8
|
+
import { getFetcherFunction as j } from "./index70.js";
|
|
9
|
+
import { SWR_HOOK_OPTIONS as w } from "./index46.js";
|
|
10
10
|
import { useBusinessLogic as M } from "./index7.js";
|
|
11
|
-
import { useStores as U } from "./
|
|
11
|
+
import { useStores as U } from "./index58.js";
|
|
12
12
|
const Q = R(({ field: t }) => {
|
|
13
13
|
var c, a;
|
|
14
14
|
const { FILTERS_DEBOUCE_INTERVAL_MS: m } = M(), h = A(() => {
|
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"),p=require("mobx-react"),i=require("react"),x=require("lodash/debounce"),o=require("@veeqo/ui"),F=require("./index7.cjs"),_=require("./index58.cjs"),q=e=>e&&e.__esModule?e:{default:e},k=q(x),j=p.observer(({field:e})=>{var u;const{FILTERS_DEBOUCE_INTERVAL_MS:l}=F.useBusinessLogic(),{Filters:{setArrayFilter:n,arrayFilters:a}}=_.useStores();if(!((u=e.options)!=null&&u.length))return null;const d=a.get(e.id)||[],[b,c]=i.useState(d),S=i.useCallback(k.default((t,s)=>{n(t,s)},l),[n]),g=t=>{const s=t.map(C=>`${C}`);c(s),S(e.id,s)},h=()=>{c([]),n(e.id,[])};return r.jsxs(o.Stack,{spacing:"xs",children:[r.jsx(o.Button,{variant:"link",onClick:h,children:"Clear"}),r.jsx(o.ChoiceList,{allowMultiple:!0,title:e.label,options:e.options,selected:b,onChange:t=>g(t)})]})});exports.CheckboxFilter=j;
|
package/dist/index25.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useState as d, useCallback as S } from "react";
|
|
|
4
4
|
import b from "lodash/debounce";
|
|
5
5
|
import { Stack as g, Button as k, ChoiceList as x } from "@veeqo/ui";
|
|
6
6
|
import { useBusinessLogic as V } from "./index7.js";
|
|
7
|
-
import { useStores as E } from "./
|
|
7
|
+
import { useStores as E } from "./index58.js";
|
|
8
8
|
const w = F(({ field: e }) => {
|
|
9
9
|
var n;
|
|
10
10
|
const { FILTERS_DEBOUCE_INTERVAL_MS: i } = V(), {
|
package/dist/index26.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),P=require("react"),q=require("mobx-react"),n=require("@veeqo/ui"),E=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),P=require("react"),q=require("mobx-react"),n=require("@veeqo/ui"),E=require("./index65.cjs"),b=require("./index7.cjs"),k=require("./index58.cjs"),v=q.observer(({field:s})=>{const{DEFAULT_DATE_PRESET:c,DEFAULT_DATE_RANGE:l}=b.useBusinessLogic(),{Filters:{dateRangeFilters:i,setRangeFilter:o,clearRangeFilter:g}}=k.useStores(),e=i.get(s.id),[u,R]=P.useState(!1),d=(e==null?void 0:e.filterSelection)||c,a=()=>{const t=new E.RangeFilter;i.set(s.id,t)},F=t=>{const T=t.value===n.DateRanges.TODAY&&e&&(e==null?void 0:e.filterType)===void 0;if(!t||T)return;if(!u){R(!0);return}if(!e){a();return}if(!e)return;const f=t.value;o({dates:{start:e.gte,end:e.lte},key:f,range:e})},S=t=>{if(t){if(!e){a();return}e.setDates(t.start,t.end)}},D=()=>{g(s.id)},h=e?e.selectedRange:l;return r.jsxs(n.Stack,{spacing:"xs",children:[r.jsx(n.Button,{variant:"link",onClick:D,children:"Clear"}),r.jsx(n.DateRangePicker,{"aria-label":`date range for ${s.label}`,selectedPreset:d,setSelectedPreset:F,selectedRange:h,setSelectedRange:S})]})});exports.DateRangeFilter=v;
|
package/dist/index26.js
CHANGED
|
@@ -2,9 +2,9 @@ import { jsxs as D, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as S } from "react";
|
|
3
3
|
import { observer as T } from "mobx-react";
|
|
4
4
|
import { Stack as E, Button as P, DateRangePicker as k, DateRanges as A } from "@veeqo/ui";
|
|
5
|
-
import { RangeFilter as v } from "./
|
|
5
|
+
import { RangeFilter as v } from "./index65.js";
|
|
6
6
|
import { useBusinessLogic as C } from "./index7.js";
|
|
7
|
-
import { useStores as x } from "./
|
|
7
|
+
import { useStores as x } from "./index58.js";
|
|
8
8
|
const U = T(({ field: r }) => {
|
|
9
9
|
const { DEFAULT_DATE_PRESET: a, DEFAULT_DATE_RANGE: o } = C(), {
|
|
10
10
|
Filters: { dateRangeFilters: n, setRangeFilter: l, clearRangeFilter: c }
|
package/dist/index27.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),h=require("mobx-react"),o=require("@veeqo/ui"),x=require("lodash/debounce"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),h=require("mobx-react"),o=require("@veeqo/ui"),x=require("lodash/debounce"),a=require("./index46.cjs"),E=require("./index7.cjs"),T=require("./index58.cjs"),g=s=>s&&s.__esModule?s:{default:s},k=g(x),m=h.observer(({fields:s,groupId:u})=>{const{FILTERS_DEBOUCE_INTERVAL_MS:d}=E.useBusinessLogic(),{Filters:{getFiltersForGroup:F,setFilter:l,clearFiltersForGroup:b}}=T.useStores(),p=F(u),[S,n]=c.useState(p),q=c.useCallback(k.default((e,t)=>{l(e,t)},d),[l]),C=(e,t)=>{n(r=>({...r,[e]:t})),q(e,t)},_=()=>{const e=s.reduce((t,r)=>({...t,[r.id]:""}),{});n(e),b(u)};return i.jsxs(o.Stack,{children:[i.jsx(o.Button,{variant:"link",onClick:_,children:"Clear"}),s.map(e=>{let t;switch(e.filterType){case a.FilterChoiceValue.NUMBER:t="number";break;case a.FilterChoiceValue.TEXT:t="text";break}return i.jsx(o.TextField,{type:t,value:S[e.id],label:e.label,onChange:r=>C(e.id,r)},e.id)})]})});exports.MultipleFieldFilter=m;
|