@veeqo/transfigure 0.0.21 → 0.0.22
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/Filters/ActiveFilters/Variants/common/ActiveFilterFooter/ActiveFilterFooter.d.ts +6 -0
- package/dist/components/Filters/ActiveFilters/Variants/common/ActiveFilterFooter/index.d.ts +1 -0
- package/dist/components/Filters/ActiveFilters/Variants/common/ActiveFilterHeader/ActiveFilterHeader.d.ts +5 -0
- package/dist/components/Filters/ActiveFilters/Variants/common/ActiveFilterHeader/index.d.ts +1 -0
- package/dist/components/Filters/ActiveFilters/Variants/common/index.d.ts +2 -0
- package/dist/components/Filters/ActiveFilters/Variants/index.d.ts +3 -1
- package/dist/components/Filters/ActiveFilters/index.d.ts +0 -1
- package/dist/components/RefreshButton/RefreshButton.d.ts +2 -1
- package/dist/components/RefreshButton/{usePollListOrders.d.ts → usePollData.d.ts} +1 -1
- package/dist/components/Views/PillNotifications/constants.d.ts +25 -0
- package/dist/components/Views/PillNotifications/variants/DraftPill/DraftPill.d.ts +5 -0
- package/dist/components/Views/PillNotifications/variants/DraftPill/index.d.ts +1 -0
- package/dist/components/Views/PillNotifications/variants/UnsavedChangesPill/UnsavedChangesPill.d.ts +7 -0
- package/dist/components/Views/PillNotifications/variants/UnsavedChangesPill/index.d.ts +1 -0
- package/dist/components/Views/PillNotifications/variants/styled.d.ts +324 -0
- package/dist/components/Views/index.d.ts +1 -1
- package/dist/context/ModalContext/mocks/mockUseModal.d.ts +4 -4
- package/dist/hooks/useViewCountsHook/useViewCountsHook.d.ts +1 -1
- package/dist/hooks/useViews/mocks.d.ts +2 -0
- package/dist/hooks/useViews/useViews.d.ts +1 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +121 -119
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +2 -36
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +36 -19
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +25 -7
- package/dist/index103.cjs +13 -1
- package/dist/index103.js +16 -63
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +18 -29
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +8 -63
- package/dist/index106.cjs +1 -13
- package/dist/index106.js +63 -16
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +30 -42
- package/dist/index108.cjs +1 -7
- package/dist/index108.js +63 -10
- package/dist/index109.cjs +1 -0
- package/dist/index109.js +49 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.cjs +7 -0
- package/dist/index110.js +12 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +44 -0
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +1 -1
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +14 -14
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +36 -41
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +33 -37
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +49 -32
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +38 -48
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +27 -28
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +37 -38
- package/dist/index2.cjs +1 -1
- package/dist/index2.js +2 -2
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +36 -37
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +20 -21
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +7 -46
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +12 -61
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +36 -35
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +55 -34
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +34 -52
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +54 -51
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +50 -81
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +80 -33
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +37 -33
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +33 -10
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +10 -40
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +39 -102
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +103 -19
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +17 -135
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +135 -49
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +51 -50
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +31 -49
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +48 -71
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +2 -2
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +58 -79
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +81 -41
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +48 -5
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +5 -42
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +42 -25
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +30 -19
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +19 -8
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +7 -22
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +23 -2
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +2 -4
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +2 -2
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +4 -11
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +10 -12
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +12 -11
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +11 -184
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +183 -25
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +26 -24
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +19 -22
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +25 -90
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +93 -8
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +8 -51
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +4 -4
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +50 -60
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +61 -18
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +16 -23
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +25 -315
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +311 -55
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +50 -47
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +51 -32
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +30 -24
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +32 -4
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +4 -9
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +9 -17
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +14 -16
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +18 -47
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +48 -21
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +21 -2
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +2 -9
- package/dist/index76.cjs +1 -3
- package/dist/index76.js +8 -13
- package/dist/index77.cjs +3 -1
- package/dist/index77.js +13 -8
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +7 -141
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +142 -18
- package/dist/index80.cjs +1 -8
- package/dist/index80.js +19 -12
- package/dist/index81.cjs +8 -1
- package/dist/index81.js +12 -41
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +40 -8
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +9 -18
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +31 -13
- package/dist/index85.cjs +1 -104
- package/dist/index85.js +27 -118
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +14 -67
- package/dist/index87.cjs +19 -1
- package/dist/index87.js +24 -29
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +21 -2
- package/dist/index89.cjs +12 -1
- package/dist/index89.js +16 -41
- package/dist/index90.cjs +80 -1
- package/dist/index90.js +103 -11
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +13 -24
- package/dist/index92.cjs +100 -15
- package/dist/index92.js +115 -19
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +65 -30
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +29 -29
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +2 -22
- package/dist/index96.cjs +1 -80
- package/dist/index96.js +41 -96
- package/dist/index97.cjs +1 -12
- package/dist/index97.js +11 -16
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +17 -14
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +24 -2
- package/dist/mobx/Filters/tests/Filters.arrayFilters.test.d.ts +1 -0
- package/dist/mobx/Filters/tests/Filters.clearOperations.test.d.ts +1 -0
- package/dist/mobx/Filters/tests/Filters.dateRangeFilters.test.d.ts +1 -0
- package/dist/mobx/Filters/tests/Filters.hasUnsavedChanges.test.d.ts +1 -0
- package/dist/mobx/Filters/tests/Filters.numberRangeFilters.test.d.ts +1 -0
- package/dist/mobx/Filters/tests/Filters.pagination.test.d.ts +1 -0
- package/dist/mobx/Filters/tests/Filters.textFilters.test.d.ts +1 -0
- package/dist/mobx/Filters/tests/Filters.urlHandling.test.d.ts +1 -0
- package/dist/mobx/Filters/tests/Filters.views.test.d.ts +1 -0
- package/dist/mobx/Notifications/Notifications.d.ts +7 -8
- package/dist/mobx/Notifications/Notifications.test.d.ts +1 -0
- package/dist/mobx/Notifications/index.d.ts +1 -0
- package/dist/mobx/NumberRangeFilter/NumberRangeFilter.test.d.ts +1 -0
- package/dist/mobx/RangeFilter/RangeFilter.test.d.ts +1 -0
- package/dist/mobx/Views/Views.test.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/Views/PillNotifications/InfoPill.d.ts +0 -1
- package/dist/components/Views/PillNotifications/styled.d.ts +0 -34
- package/dist/components/Views/UnsavedChanges/UnsavedChanges.d.ts +0 -5
- package/dist/components/Views/UnsavedChanges/index.d.ts +0 -1
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterTag → Variants/ActiveFilterTag}/ActiveFilterTag.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterTag → Variants/ActiveFilterTag}/index.d.ts +0 -0
package/dist/index14.js
CHANGED
|
@@ -1,44 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/* @__PURE__ */ t(d, { variant: "default", size: "sm", onClick: p, children: "Clear" }),
|
|
37
|
-
/* @__PURE__ */ t(d, { variant: "primary", size: "sm", onClick: u, children: "Apply" })
|
|
38
|
-
] }) })
|
|
39
|
-
}
|
|
40
|
-
);
|
|
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 "./index47.js";
|
|
5
|
+
import { useBusinessLogic as F } from "./index7.js";
|
|
6
|
+
import { useStores as h } from "./index59.js";
|
|
7
|
+
import { ActiveFilterTag as d } from "./index17.js";
|
|
8
|
+
import { ActiveFilterNumberRangeTag as g } from "./index20.js";
|
|
9
|
+
import { ActiveFilterDateRangeTag as v } from "./index19.js";
|
|
10
|
+
import { ActiveFilterArrayTag as D } from "./index18.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
|
+
] });
|
|
41
36
|
});
|
|
42
37
|
export {
|
|
43
|
-
|
|
38
|
+
M as ActiveFilters
|
|
44
39
|
};
|
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 o=require("react/jsx-runtime"),l=require("mobx-react"),s=require("@veeqo/ui"),c=require("./index47.cjs"),u=require("./index109.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/index15.js
CHANGED
|
@@ -1,39 +1,35 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
33
|
-
}
|
|
34
|
-
})() }))
|
|
35
|
-
] });
|
|
36
|
-
});
|
|
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 "./index47.js";
|
|
5
|
+
import { ActiveAsyncCheckboxFilter as c } from "./index109.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
|
+
}
|
|
31
|
+
}
|
|
32
|
+
);
|
|
37
33
|
export {
|
|
38
|
-
|
|
34
|
+
F as FilterArrayField
|
|
39
35
|
};
|
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"),u=require("mobx-react"),s=require("@veeqo/ui"),i=require("./index47.cjs"),F=require("./index21.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/index16.js
CHANGED
|
@@ -1,35 +1,52 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { observer as
|
|
3
|
-
import { ChoiceList as p } from "@veeqo/ui";
|
|
4
|
-
import { FilterChoiceValue as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
}
|
|
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 "./index47.js";
|
|
5
|
+
import { ActiveAsyncRadioFilter as m } from "./index21.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;
|
|
31
16
|
}
|
|
32
|
-
)
|
|
17
|
+
switch (e.filterType) {
|
|
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
|
+
});
|
|
33
50
|
export {
|
|
34
|
-
|
|
51
|
+
y as FilterField
|
|
35
52
|
};
|
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 t=require("react/jsx-runtime"),c=require("react"),v=require("mobx-react"),s=require("@veeqo/ui"),q=require("./index59.cjs"),A=require("./index57.cjs"),g=require("./index22.cjs"),x=require("./index16.cjs"),j=require("./index23.cjs"),m=v.observer(({filterData:e})=>{const{Filters:{filters:l,clearFilter:n,setFilter:u}}=q.useStores(),r=l.get(e.id),{filterLabel:d}=A.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}),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(g.ActiveFilterFooter,{clearActiveFilter:F,applyActiveFilter:a})})});exports.ActiveFilterTag=m;
|
package/dist/index17.js
CHANGED
|
@@ -1,53 +1,43 @@
|
|
|
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
|
-
|
|
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 v } from "@veeqo/ui";
|
|
5
|
+
import { useStores as A } from "./index59.js";
|
|
6
|
+
import { useFilterLabel as g } from "./index57.js";
|
|
7
|
+
import { ActiveFilterFooter as h } from "./index22.js";
|
|
8
|
+
import { FilterField as L } from "./index16.js";
|
|
9
|
+
import { ActiveFilterHeader as V } from "./index23.js";
|
|
10
|
+
const z = a(({ filterData: e }) => {
|
|
11
|
+
const {
|
|
12
|
+
Filters: { filters: o, clearFilter: s, setFilter: d }
|
|
13
|
+
} = A(), r = o.get(e.id), { filterLabel: m } = g({ filterData: e }), [i, l] = F(r || "");
|
|
14
|
+
u(() => {
|
|
15
|
+
i !== r && l(r || "");
|
|
16
|
+
}, [e.id, r, o]);
|
|
17
|
+
const c = () => {
|
|
18
|
+
s(e.id);
|
|
19
|
+
}, n = () => {
|
|
20
|
+
d(e.id, i);
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ t(
|
|
23
|
+
f,
|
|
24
|
+
{
|
|
25
|
+
shouldCloseOnClickAway: !0,
|
|
26
|
+
header: /* @__PURE__ */ t(V, { filterLabel: e.label }),
|
|
27
|
+
label: e.label,
|
|
28
|
+
text: m || "Loading...",
|
|
29
|
+
content: /* @__PURE__ */ t(b, { style: { padding: v.sizes.md }, children: /* @__PURE__ */ t(
|
|
30
|
+
L,
|
|
22
31
|
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
onChange: (l) => i(l)
|
|
32
|
+
data: e,
|
|
33
|
+
editedValue: i,
|
|
34
|
+
setEditedValue: (p) => l(p)
|
|
27
35
|
}
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
m,
|
|
33
|
-
{
|
|
34
|
-
field: e,
|
|
35
|
-
setEditedValue: i,
|
|
36
|
-
editedValue: o
|
|
37
|
-
}
|
|
38
|
-
) : /* @__PURE__ */ n(
|
|
39
|
-
p,
|
|
40
|
-
{
|
|
41
|
-
title: e.label,
|
|
42
|
-
options: (s = e.options) != null && s.length ? e.options : [],
|
|
43
|
-
selected: [o],
|
|
44
|
-
onChange: (l) => i(`${l[0]}`)
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
default:
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
36
|
+
) }),
|
|
37
|
+
footer: /* @__PURE__ */ t(h, { clearActiveFilter: c, applyActiveFilter: n })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
50
40
|
});
|
|
51
41
|
export {
|
|
52
|
-
|
|
42
|
+
z as ActiveFilterTag
|
|
53
43
|
};
|
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 r=require("react/jsx-runtime"),o=require("react"),y=require("mobx-react"),s=require("@veeqo/ui"),b=require("./index56.cjs"),v=require("./index15.cjs"),q=require("./index59.cjs"),x=require("./index22.cjs"),g=require("./index23.cjs"),j=y.observer(({filterData:e})=>{const{Filters:{arrayFilters:l,clearArrayFilter:u,setArrayFilter:a}}=q.useStores(),t=l.get(e.id),[i,c]=o.useState(t||[]);o.useEffect(()=>{i!==t&&c(t||[])},[e.id,t,l]);const n=()=>{u(e.id)},d=()=>{a(e.id,i)},{filterLabel:F}=b.useFilterArrayLabel({filterData:e});return r.jsx(s.FilterTag,{shouldCloseOnClickAway:!0,header:r.jsx(g.ActiveFilterHeader,{filterLabel:e.label}),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(x.ActiveFilterFooter,{clearActiveFilter:n,applyActiveFilter:d})})});exports.ActiveFilterArrayTag=j;
|
package/dist/index18.js
CHANGED
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
import { jsx as r
|
|
2
|
-
import { useState as F, useEffect as
|
|
3
|
-
import { observer as
|
|
4
|
-
import { FilterTag as
|
|
5
|
-
import { useFilterArrayLabel as
|
|
6
|
-
import { FilterArrayField as
|
|
7
|
-
import { useStores as
|
|
8
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as F, useEffect as p } from "react";
|
|
3
|
+
import { observer as u } from "mobx-react";
|
|
4
|
+
import { FilterTag as A, BaseContainer as f, theme as y } from "@veeqo/ui";
|
|
5
|
+
import { useFilterArrayLabel as b } from "./index56.js";
|
|
6
|
+
import { FilterArrayField as v } from "./index15.js";
|
|
7
|
+
import { useStores as V } from "./index59.js";
|
|
8
|
+
import { ActiveFilterFooter as g } from "./index22.js";
|
|
9
|
+
import { ActiveFilterHeader as h } from "./index23.js";
|
|
10
|
+
const z = u(({ filterData: e }) => {
|
|
9
11
|
const {
|
|
10
|
-
Filters: { arrayFilters:
|
|
11
|
-
} =
|
|
12
|
-
|
|
13
|
-
i !== t &&
|
|
14
|
-
}, [e.id, t,
|
|
12
|
+
Filters: { arrayFilters: o, clearArrayFilter: s, setArrayFilter: d }
|
|
13
|
+
} = V(), t = o.get(e.id), [i, l] = F(t || []);
|
|
14
|
+
p(() => {
|
|
15
|
+
i !== t && l(t || []);
|
|
16
|
+
}, [e.id, t, o]);
|
|
15
17
|
const m = () => {
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
}, { filterLabel:
|
|
18
|
+
s(e.id);
|
|
19
|
+
}, a = () => {
|
|
20
|
+
d(e.id, i);
|
|
21
|
+
}, { filterLabel: c } = b({ filterData: e });
|
|
20
22
|
return /* @__PURE__ */ r(
|
|
21
|
-
|
|
23
|
+
A,
|
|
22
24
|
{
|
|
23
25
|
shouldCloseOnClickAway: !0,
|
|
24
|
-
header: /* @__PURE__ */ r(
|
|
26
|
+
header: /* @__PURE__ */ r(h, { filterLabel: e.label }),
|
|
25
27
|
label: e.label,
|
|
26
|
-
text:
|
|
27
|
-
content: /* @__PURE__ */ r(
|
|
28
|
-
|
|
28
|
+
text: c || "",
|
|
29
|
+
content: /* @__PURE__ */ r(f, { style: { padding: y.sizes.md }, children: /* @__PURE__ */ r(
|
|
30
|
+
v,
|
|
29
31
|
{
|
|
30
32
|
data: e,
|
|
31
33
|
editedValue: i || [],
|
|
32
|
-
setEditedValue: (
|
|
34
|
+
setEditedValue: (n) => l(n)
|
|
33
35
|
}
|
|
34
36
|
) }),
|
|
35
|
-
footer: /* @__PURE__ */ r(
|
|
36
|
-
/* @__PURE__ */ r(n, { variant: "default", size: "sm", onClick: m, children: "Clear" }),
|
|
37
|
-
/* @__PURE__ */ r(n, { variant: "primary", size: "sm", onClick: p, children: "Apply" })
|
|
38
|
-
] }) })
|
|
37
|
+
footer: /* @__PURE__ */ r(g, { clearActiveFilter: m, applyActiveFilter: a })
|
|
39
38
|
}
|
|
40
39
|
);
|
|
41
40
|
});
|
|
42
41
|
export {
|
|
43
|
-
|
|
42
|
+
z as ActiveFilterArrayTag
|
|
44
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 n=require("react/jsx-runtime"),o=require("react"),f=require("mobx-react"),i=require("@veeqo/ui"),a=require("./index66.cjs"),q=require("./index7.cjs"),E=require("./index59.cjs"),S=require("./index22.cjs"),h=require("./index23.cjs"),x=f.observer(({filterData:s})=>{const{DEFAULT_DATE_PRESET:g,DEFAULT_DATE_RANGE:F}=q.useBusinessLogic(),{Filters:{dateRangeFilters:c,clearRangeFilter:u,setRangeFilter:R}}=E.useStores(),t=c.get(s.id),[e,l]=o.useState(c.get(s.id)),T=()=>{const r=new a.RangeFilter;return r.setFilterType(t==null?void 0:t.filterType),l(r),r};o.useEffect(()=>{if(!t)return;const r=new a.RangeFilter;r.setFilterType(t.filterType),t.gte&&t.lte&&r.setDates(t.gte,t.lte),l(r)},[t]);const d=()=>{u(s.id)},A=()=>{t&&(e!=null&&e.filterType)&&R({dates:{start:e.gte,end:e.lte},key:e.filterType,range:t})},y=(e==null?void 0:e.filterSelection)||g,b=r=>{r&&(e||T(),e==null||e.setFilterType(r.value))},p=r=>{!r||!e||e.setDates(r.start,r.end)},v=e?e.selectedRange:F;return n.jsx(i.FilterTag,{shouldCloseOnClickAway:!0,header:n.jsx(h.ActiveFilterHeader,{filterLabel:s.label}),label:s.label,text:(t==null?void 0:t.filterLabel)||"",content:n.jsx(i.BaseContainer,{style:{padding:i.theme.sizes.md},children:n.jsx(i.DateRangePicker,{"aria-label":`date range for ${s.label}`,selectedPreset:y,setSelectedPreset:b,selectedRange:v,setSelectedRange:p})}),footer:n.jsx(S.ActiveFilterFooter,{clearActiveFilter:d,applyActiveFilter:A})})});exports.ActiveFilterDateRangeTag=x;
|
package/dist/index19.js
CHANGED
|
@@ -1,61 +1,60 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { observer as
|
|
4
|
-
import { FilterTag as
|
|
5
|
-
import { RangeFilter as
|
|
6
|
-
import { useBusinessLogic as
|
|
7
|
-
import { useStores as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as A, useEffect as E } from "react";
|
|
3
|
+
import { observer as b } from "mobx-react";
|
|
4
|
+
import { FilterTag as h, BaseContainer as u, theme as v, DateRangePicker as P } from "@veeqo/ui";
|
|
5
|
+
import { RangeFilter as l } from "./index66.js";
|
|
6
|
+
import { useBusinessLogic as S } from "./index7.js";
|
|
7
|
+
import { useStores as C } from "./index59.js";
|
|
8
|
+
import { ActiveFilterFooter as L } from "./index22.js";
|
|
9
|
+
import { ActiveFilterHeader as w } from "./index23.js";
|
|
10
|
+
const H = b(
|
|
11
|
+
({ filterData: n }) => {
|
|
12
|
+
const { DEFAULT_DATE_PRESET: a, DEFAULT_DATE_RANGE: c } = S(), {
|
|
13
|
+
Filters: { dateRangeFilters: i, clearRangeFilter: g, setRangeFilter: m }
|
|
14
|
+
} = C(), t = i.get(n.id), [e, o] = A(i.get(n.id)), p = () => {
|
|
15
|
+
const r = new l();
|
|
16
|
+
return r.setFilterType(t == null ? void 0 : t.filterType), o(r), r;
|
|
15
17
|
};
|
|
16
|
-
|
|
18
|
+
E(() => {
|
|
17
19
|
if (!t) return;
|
|
18
|
-
const r = new
|
|
19
|
-
r.setFilterType(t.filterType), t.gte && t.lte && r.setDates(t.gte, t.lte),
|
|
20
|
+
const r = new l();
|
|
21
|
+
r.setFilterType(t.filterType), t.gte && t.lte && r.setDates(t.gte, t.lte), o(r);
|
|
20
22
|
}, [t]);
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
t && (e != null && e.filterType) &&
|
|
23
|
+
const F = () => {
|
|
24
|
+
g(n.id);
|
|
25
|
+
}, f = () => {
|
|
26
|
+
t && (e != null && e.filterType) && m({
|
|
25
27
|
dates: { start: e.gte, end: e.lte },
|
|
26
28
|
key: e.filterType,
|
|
27
29
|
range: t
|
|
28
30
|
});
|
|
29
|
-
}, R = (e == null ? void 0 : e.filterSelection) ||
|
|
30
|
-
r && (e ||
|
|
31
|
-
},
|
|
31
|
+
}, R = (e == null ? void 0 : e.filterSelection) || a, T = (r) => {
|
|
32
|
+
r && (e || p(), e == null || e.setFilterType(r.value));
|
|
33
|
+
}, d = (r) => {
|
|
32
34
|
!r || !e || e.setDates(r.start, r.end);
|
|
33
|
-
},
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
35
|
+
}, y = e ? e.selectedRange : c;
|
|
36
|
+
return /* @__PURE__ */ s(
|
|
37
|
+
h,
|
|
36
38
|
{
|
|
37
39
|
shouldCloseOnClickAway: !0,
|
|
38
|
-
header: /* @__PURE__ */
|
|
39
|
-
label:
|
|
40
|
+
header: /* @__PURE__ */ s(w, { filterLabel: n.label }),
|
|
41
|
+
label: n.label,
|
|
40
42
|
text: (t == null ? void 0 : t.filterLabel) || "",
|
|
41
|
-
content: /* @__PURE__ */
|
|
43
|
+
content: /* @__PURE__ */ s(u, { style: { padding: v.sizes.md }, children: /* @__PURE__ */ s(
|
|
42
44
|
P,
|
|
43
45
|
{
|
|
44
|
-
"aria-label": `date range for ${
|
|
46
|
+
"aria-label": `date range for ${n.label}`,
|
|
45
47
|
selectedPreset: R,
|
|
46
48
|
setSelectedPreset: T,
|
|
47
|
-
selectedRange:
|
|
48
|
-
setSelectedRange:
|
|
49
|
+
selectedRange: y,
|
|
50
|
+
setSelectedRange: d
|
|
49
51
|
}
|
|
50
52
|
) }),
|
|
51
|
-
footer: /* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */ n(c, { variant: "default", size: "sm", onClick: h, children: "Clear" }),
|
|
53
|
-
/* @__PURE__ */ n(c, { variant: "primary", size: "sm", onClick: y, children: "Apply" })
|
|
54
|
-
] }) })
|
|
53
|
+
footer: /* @__PURE__ */ s(L, { clearActiveFilter: F, applyActiveFilter: f })
|
|
55
54
|
}
|
|
56
55
|
);
|
|
57
56
|
}
|
|
58
57
|
);
|
|
59
58
|
export {
|
|
60
|
-
|
|
59
|
+
H as ActiveFilterDateRangeTag
|
|
61
60
|
};
|
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("./index51.cjs"),i=require("./index52.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 "./index51.js";
|
|
3
|
+
import { vndAPI as i } from "./index52.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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),d=require("mobx-react"),l=require("@veeqo/ui"),m=require("./index65.cjs"),R=require("./index108.cjs"),v=require("./index59.cjs"),N=require("./index22.cjs"),q=require("./index23.cjs"),A=d.observer(({filterData:t})=>{const{Filters:{numberRangeFilters:u,clearNumberRangeFilter:a,setNumberRangeFilter:F}}=v.useStores(),e=u.get(t.id),[n,c]=s.useState(e),o=s.useCallback(()=>{const r=new m.NumberRangeFilter({filterId:t.id});return e&&(e.gte&&r.setGte(e.gte),e.lte&&r.setLte(e.lte)),r},[t.id,e]);s.useEffect(()=>{const r=o();c(r)},[o,e]);const g=()=>{a(t.id)},b=()=>{!e||!n||F({numberRange:e,lte:n.lte,gte:n.gte})};return i.jsx(l.FilterTag,{shouldCloseOnClickAway:!0,header:i.jsx(q.ActiveFilterHeader,{filterLabel:t.label}),label:t.label,text:(e==null?void 0:e.filterLabel)||"Loading...",content:i.jsx(l.BaseContainer,{style:{padding:l.theme.sizes.md},children:i.jsx(R.FilterNumberRangeFilter,{data:t,editedValue:n,setEditedValue:c})}),footer:i.jsx(N.ActiveFilterFooter,{clearActiveFilter:g,applyActiveFilter:b})})});exports.ActiveFilterNumberRangeTag=A;
|