@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/index20.js
CHANGED
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { observer as
|
|
4
|
-
import { FilterTag as
|
|
5
|
-
import { NumberRangeFilter as
|
|
6
|
-
import { FilterNumberRangeFilter as
|
|
7
|
-
import { useStores as
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useCallback as g, useEffect as F } from "react";
|
|
3
|
+
import { observer as b } from "mobx-react";
|
|
4
|
+
import { FilterTag as p, BaseContainer as f, theme as R } from "@veeqo/ui";
|
|
5
|
+
import { NumberRangeFilter as N } from "./index65.js";
|
|
6
|
+
import { FilterNumberRangeFilter as v } from "./index108.js";
|
|
7
|
+
import { useStores as A } from "./index59.js";
|
|
8
|
+
import { ActiveFilterFooter as w } from "./index22.js";
|
|
9
|
+
import { ActiveFilterHeader as h } from "./index23.js";
|
|
10
|
+
const z = b(
|
|
11
|
+
({ filterData: t }) => {
|
|
10
12
|
const {
|
|
11
|
-
Filters: { numberRangeFilters: m, clearNumberRangeFilter:
|
|
12
|
-
} =
|
|
13
|
-
const
|
|
14
|
-
return e && (e.gte &&
|
|
15
|
-
}, [
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
l(
|
|
19
|
-
}, [
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
!e || !
|
|
13
|
+
Filters: { numberRangeFilters: m, clearNumberRangeFilter: s, setNumberRangeFilter: c }
|
|
14
|
+
} = A(), e = m.get(t.id), [o, l] = d(e), n = g(() => {
|
|
15
|
+
const r = new N({ filterId: t.id });
|
|
16
|
+
return e && (e.gte && r.setGte(e.gte), e.lte && r.setLte(e.lte)), r;
|
|
17
|
+
}, [t.id, e]);
|
|
18
|
+
F(() => {
|
|
19
|
+
const r = n();
|
|
20
|
+
l(r);
|
|
21
|
+
}, [n, e]);
|
|
22
|
+
const a = () => {
|
|
23
|
+
s(t.id);
|
|
24
|
+
}, u = () => {
|
|
25
|
+
!e || !o || c({
|
|
24
26
|
numberRange: e,
|
|
25
27
|
// update the original value
|
|
26
|
-
lte:
|
|
27
|
-
gte:
|
|
28
|
+
lte: o.lte,
|
|
29
|
+
gte: o.gte
|
|
28
30
|
});
|
|
29
31
|
};
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
|
|
32
|
+
return /* @__PURE__ */ i(
|
|
33
|
+
p,
|
|
32
34
|
{
|
|
33
35
|
shouldCloseOnClickAway: !0,
|
|
34
|
-
header: /* @__PURE__ */
|
|
35
|
-
label:
|
|
36
|
+
header: /* @__PURE__ */ i(h, { filterLabel: t.label }),
|
|
37
|
+
label: t.label,
|
|
36
38
|
text: (e == null ? void 0 : e.filterLabel) || "Loading...",
|
|
37
|
-
content: /* @__PURE__ */
|
|
38
|
-
|
|
39
|
+
content: /* @__PURE__ */ i(f, { style: { padding: R.sizes.md }, children: /* @__PURE__ */ i(
|
|
40
|
+
v,
|
|
39
41
|
{
|
|
40
|
-
data:
|
|
41
|
-
editedValue:
|
|
42
|
+
data: t,
|
|
43
|
+
editedValue: o,
|
|
42
44
|
setEditedValue: l
|
|
43
45
|
}
|
|
44
46
|
) }),
|
|
45
|
-
footer: /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */ t(d, { variant: "default", size: "sm", onClick: g, children: "Clear" }),
|
|
47
|
-
/* @__PURE__ */ t(d, { variant: "primary", size: "sm", onClick: p, children: "Apply" })
|
|
48
|
-
] }) })
|
|
47
|
+
footer: /* @__PURE__ */ i(w, { clearActiveFilter: a, applyActiveFilter: u })
|
|
49
48
|
}
|
|
50
49
|
);
|
|
51
50
|
}
|
|
52
51
|
);
|
|
53
52
|
export {
|
|
54
|
-
|
|
53
|
+
z as ActiveFilterNumberRangeTag
|
|
55
54
|
};
|
package/dist/index21.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
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("./index70.cjs"),F=require("./index71.cjs"),O=require("./index47.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/index21.js
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { observer as
|
|
4
|
-
import { Stack as
|
|
5
|
-
import
|
|
6
|
-
import { getAsyncOptions as
|
|
7
|
-
import { getFetcherFunction as L } from "./
|
|
8
|
-
import { SWR_HOOK_OPTIONS as
|
|
9
|
-
const
|
|
2
|
+
import { useMemo as O } from "react";
|
|
3
|
+
import { observer as u } from "mobx-react";
|
|
4
|
+
import { Stack as F, ChoiceList as b, Skeleton as y, theme as A, Text as d } from "@veeqo/ui";
|
|
5
|
+
import x from "swr/immutable";
|
|
6
|
+
import { getAsyncOptions as S } from "./index70.js";
|
|
7
|
+
import { getFetcherFunction as L } from "./index71.js";
|
|
8
|
+
import { SWR_HOOK_OPTIONS as R } from "./index47.js";
|
|
9
|
+
const _ = u(
|
|
10
10
|
({ field: t, editedValue: c, setEditedValue: a }) => {
|
|
11
11
|
var o, i;
|
|
12
|
-
const l =
|
|
12
|
+
const l = O(() => {
|
|
13
13
|
var e;
|
|
14
14
|
return L({ fetcherName: (e = t.fetchAsyncFilterOptions) == null ? void 0 : e.fetcher });
|
|
15
|
-
}, [(o = t.fetchAsyncFilterOptions) == null ? void 0 : o.fetcher]), { isLoading: m, isValidating: h, data: p, error: f } =
|
|
15
|
+
}, [(o = t.fetchAsyncFilterOptions) == null ? void 0 : o.fetcher]), { isLoading: m, isValidating: h, data: p, error: f } = x(
|
|
16
16
|
(i = t.fetchAsyncFilterOptions) == null ? void 0 : i.URL,
|
|
17
17
|
l,
|
|
18
|
-
|
|
19
|
-
), r = m || h, g =
|
|
20
|
-
return /* @__PURE__ */ s(
|
|
18
|
+
R
|
|
19
|
+
), r = m || h, g = S({ data: p, config: t.fetchAsyncFilterOptions });
|
|
20
|
+
return /* @__PURE__ */ s(F, { spacing: "xs", alignX: "stretch", children: [
|
|
21
21
|
/* @__PURE__ */ n(
|
|
22
|
-
|
|
22
|
+
b,
|
|
23
23
|
{
|
|
24
|
-
allowMultiple: !0,
|
|
25
24
|
title: t.label,
|
|
26
25
|
options: g,
|
|
27
|
-
selected: c,
|
|
28
|
-
onChange: (e) => a(e)
|
|
26
|
+
selected: [c],
|
|
27
|
+
onChange: (e) => a(`${e[0]}`)
|
|
29
28
|
}
|
|
30
29
|
),
|
|
31
30
|
r && /* @__PURE__ */ n(
|
|
32
|
-
|
|
31
|
+
y,
|
|
33
32
|
{
|
|
34
33
|
width: "200px",
|
|
35
|
-
height:
|
|
34
|
+
height: A.sizes[5],
|
|
36
35
|
"aria-busy": !0,
|
|
37
36
|
"aria-label": `Loading ${t.label} filters`
|
|
38
37
|
}
|
|
39
38
|
),
|
|
40
|
-
!r && f && /* @__PURE__ */ s(
|
|
39
|
+
!r && f && /* @__PURE__ */ s(d, { variant: "errorSmall", children: [
|
|
41
40
|
"Error: failed to load filter for ",
|
|
42
41
|
t.label
|
|
43
42
|
] })
|
|
@@ -45,5 +44,5 @@ const T = O(
|
|
|
45
44
|
}
|
|
46
45
|
);
|
|
47
46
|
export {
|
|
48
|
-
|
|
47
|
+
_ as ActiveAsyncRadioFilter
|
|
49
48
|
};
|
package/dist/index22.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("@veeqo/ui"),n=({clearActiveFilter:i,applyActiveFilter:r})=>t.jsx(e.Card.Footer,{style:{padding:e.theme.sizes.base,margin:0,minWidth:"200px",boxShadow:`0px 10px 15px 0px ${e.theme.colors.neutral.ink.dark}`},children:t.jsxs(e.Stack,{direction:"horizontal",alignX:"end",children:[t.jsx(e.Button,{variant:"default",size:"sm",onClick:i,children:"Clear"}),t.jsx(e.Button,{variant:"primary",size:"sm",onClick:r,children:"Apply"})]})});exports.ActiveFilterFooter=n;
|
package/dist/index22.js
CHANGED
|
@@ -1,48 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { getFetcherFunction as L } from "./index70.js";
|
|
8
|
-
import { SWR_HOOK_OPTIONS as R } from "./index46.js";
|
|
9
|
-
const _ = u(
|
|
10
|
-
({ field: t, editedValue: c, setEditedValue: a }) => {
|
|
11
|
-
var o, i;
|
|
12
|
-
const l = O(() => {
|
|
13
|
-
var e;
|
|
14
|
-
return L({ fetcherName: (e = t.fetchAsyncFilterOptions) == null ? void 0 : e.fetcher });
|
|
15
|
-
}, [(o = t.fetchAsyncFilterOptions) == null ? void 0 : o.fetcher]), { isLoading: m, isValidating: h, data: p, error: f } = x(
|
|
16
|
-
(i = t.fetchAsyncFilterOptions) == null ? void 0 : i.URL,
|
|
17
|
-
l,
|
|
18
|
-
R
|
|
19
|
-
), r = m || h, g = S({ data: p, config: t.fetchAsyncFilterOptions });
|
|
20
|
-
return /* @__PURE__ */ s(F, { spacing: "xs", alignX: "stretch", children: [
|
|
21
|
-
/* @__PURE__ */ n(
|
|
22
|
-
b,
|
|
23
|
-
{
|
|
24
|
-
title: t.label,
|
|
25
|
-
options: g,
|
|
26
|
-
selected: [c],
|
|
27
|
-
onChange: (e) => a(`${e[0]}`)
|
|
28
|
-
}
|
|
29
|
-
),
|
|
30
|
-
r && /* @__PURE__ */ n(
|
|
31
|
-
y,
|
|
32
|
-
{
|
|
33
|
-
width: "200px",
|
|
34
|
-
height: A.sizes[5],
|
|
35
|
-
"aria-busy": !0,
|
|
36
|
-
"aria-label": `Loading ${t.label} filters`
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
!r && f && /* @__PURE__ */ s(d, { variant: "errorSmall", children: [
|
|
40
|
-
"Error: failed to load filter for ",
|
|
41
|
-
t.label
|
|
42
|
-
] })
|
|
43
|
-
] });
|
|
44
|
-
}
|
|
45
|
-
);
|
|
1
|
+
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Card as a, theme as i, Stack as l, Button as e } from "@veeqo/ui";
|
|
3
|
+
const p = ({ clearActiveFilter: t, applyActiveFilter: n }) => /* @__PURE__ */ r(a.Footer, { style: { padding: i.sizes.base, margin: 0, minWidth: "200px", boxShadow: `0px 10px 15px 0px ${i.colors.neutral.ink.dark}` }, children: /* @__PURE__ */ o(l, { direction: "horizontal", alignX: "end", children: [
|
|
4
|
+
/* @__PURE__ */ r(e, { variant: "default", size: "sm", onClick: t, children: "Clear" }),
|
|
5
|
+
/* @__PURE__ */ r(e, { variant: "primary", size: "sm", onClick: n, children: "Apply" })
|
|
6
|
+
] }) });
|
|
46
7
|
export {
|
|
47
|
-
|
|
8
|
+
p as ActiveFilterFooter
|
|
48
9
|
};
|
package/dist/index23.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"),r=require("@veeqo/ui"),o=require("@veeqo/components"),n=require("lodash/toLower"),i=e=>e&&e.__esModule?e:{default:e},s=i(n),{Glyph:a}=o.VeeqoCommon,c=({filterLabel:e})=>t.jsxs(t.Fragment,{children:[t.jsx(a,{name:"edit"}),t.jsxs(r.Text,{variant:"headingSmall",as:"h2",children:["Edit ",s.default(e)]})]});exports.ActiveFilterHeader=c;
|
package/dist/index23.js
CHANGED
|
@@ -1,63 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const Y = V(({ field: t }) => {
|
|
13
|
-
var c, a;
|
|
14
|
-
const { FILTERS_DEBOUCE_INTERVAL_MS: m } = U(), u = L(() => {
|
|
15
|
-
var e;
|
|
16
|
-
return N({ fetcherName: (e = t.fetchAsyncFilterOptions) == null ? void 0 : e.fetcher });
|
|
17
|
-
}, [(c = t.fetchAsyncFilterOptions) == null ? void 0 : c.fetcher]), { isLoading: h, isValidating: p, data: f, error: g } = B(
|
|
18
|
-
(a = t.fetchAsyncFilterOptions) == null ? void 0 : a.URL,
|
|
19
|
-
u,
|
|
20
|
-
j
|
|
21
|
-
), i = h || p, {
|
|
22
|
-
Filters: { setArrayFilter: o, arrayFilters: F }
|
|
23
|
-
} = W(), d = F.get(t.id) || [], [S, n] = x(d), b = k(
|
|
24
|
-
E((e, r) => {
|
|
25
|
-
o(e, r);
|
|
26
|
-
}, m),
|
|
27
|
-
[o]
|
|
28
|
-
), O = (e) => {
|
|
29
|
-
const r = e.map((C) => `${C}`);
|
|
30
|
-
n(r), b(t.id, r);
|
|
31
|
-
}, y = () => {
|
|
32
|
-
n([]), o(t.id, []);
|
|
33
|
-
}, A = M({ data: f, config: t.fetchAsyncFilterOptions });
|
|
34
|
-
return /* @__PURE__ */ l(R, { spacing: "xs", alignX: "stretch", children: [
|
|
35
|
-
/* @__PURE__ */ s(_, { variant: "link", onClick: y, children: "Clear" }),
|
|
36
|
-
/* @__PURE__ */ s(
|
|
37
|
-
I,
|
|
38
|
-
{
|
|
39
|
-
allowMultiple: !0,
|
|
40
|
-
title: t.label,
|
|
41
|
-
options: A,
|
|
42
|
-
selected: S,
|
|
43
|
-
onChange: (e) => O(e)
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
i && /* @__PURE__ */ s(
|
|
47
|
-
T,
|
|
48
|
-
{
|
|
49
|
-
width: "200px",
|
|
50
|
-
height: v.sizes[5],
|
|
51
|
-
"aria-busy": !0,
|
|
52
|
-
"aria-label": `Loading ${t.label} filters`
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
!i && g && /* @__PURE__ */ l(w, { variant: "errorSmall", children: [
|
|
56
|
-
"Error: failed to load filter for ",
|
|
57
|
-
t.label
|
|
58
|
-
] })
|
|
59
|
-
] });
|
|
60
|
-
});
|
|
1
|
+
import { jsxs as r, Fragment as o, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Text as m } from "@veeqo/ui";
|
|
3
|
+
import { VeeqoCommon as i } from "@veeqo/components";
|
|
4
|
+
import n from "lodash/toLower";
|
|
5
|
+
const { Glyph: a } = i, c = ({ filterLabel: e }) => /* @__PURE__ */ r(o, { children: [
|
|
6
|
+
/* @__PURE__ */ t(a, { name: "edit" }),
|
|
7
|
+
/* @__PURE__ */ r(m, { variant: "headingSmall", as: "h2", children: [
|
|
8
|
+
"Edit ",
|
|
9
|
+
n(e)
|
|
10
|
+
] })
|
|
11
|
+
] });
|
|
61
12
|
export {
|
|
62
|
-
|
|
13
|
+
c as ActiveFilterHeader
|
|
63
14
|
};
|
package/dist/index24.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const 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("./index70.cjs"),k=require("./index71.cjs"),V=require("./index47.cjs"),E=require("./index7.cjs"),I=require("./index59.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/index24.js
CHANGED
|
@@ -1,62 +1,63 @@
|
|
|
1
1
|
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { observer as
|
|
4
|
-
import
|
|
5
|
-
import { Stack as
|
|
2
|
+
import { useMemo as L, useState as x, useCallback as k } from "react";
|
|
3
|
+
import { observer as V } from "mobx-react";
|
|
4
|
+
import E from "lodash/debounce";
|
|
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
|
|
8
|
-
import { getFetcherFunction as
|
|
9
|
-
import { SWR_HOOK_OPTIONS as
|
|
10
|
-
import { useBusinessLogic as
|
|
11
|
-
import { useStores as
|
|
12
|
-
const
|
|
7
|
+
import { getAsyncOptions as M } from "./index70.js";
|
|
8
|
+
import { getFetcherFunction as N } from "./index71.js";
|
|
9
|
+
import { SWR_HOOK_OPTIONS as j } from "./index47.js";
|
|
10
|
+
import { useBusinessLogic as U } from "./index7.js";
|
|
11
|
+
import { useStores as W } from "./index59.js";
|
|
12
|
+
const Y = V(({ field: t }) => {
|
|
13
13
|
var c, a;
|
|
14
|
-
const { FILTERS_DEBOUCE_INTERVAL_MS: m } =
|
|
14
|
+
const { FILTERS_DEBOUCE_INTERVAL_MS: m } = U(), u = L(() => {
|
|
15
15
|
var e;
|
|
16
|
-
return
|
|
17
|
-
}, [(c = t.fetchAsyncFilterOptions) == null ? void 0 : c.fetcher]), { isLoading:
|
|
16
|
+
return N({ fetcherName: (e = t.fetchAsyncFilterOptions) == null ? void 0 : e.fetcher });
|
|
17
|
+
}, [(c = t.fetchAsyncFilterOptions) == null ? void 0 : c.fetcher]), { isLoading: h, isValidating: p, data: f, error: g } = B(
|
|
18
18
|
(a = t.fetchAsyncFilterOptions) == null ? void 0 : a.URL,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
), i =
|
|
22
|
-
Filters: {
|
|
23
|
-
} =
|
|
24
|
-
|
|
19
|
+
u,
|
|
20
|
+
j
|
|
21
|
+
), i = h || p, {
|
|
22
|
+
Filters: { setArrayFilter: o, arrayFilters: F }
|
|
23
|
+
} = W(), d = F.get(t.id) || [], [S, n] = x(d), b = k(
|
|
24
|
+
E((e, r) => {
|
|
25
25
|
o(e, r);
|
|
26
26
|
}, m),
|
|
27
27
|
[o]
|
|
28
|
-
),
|
|
29
|
-
const r = `${
|
|
30
|
-
n(r),
|
|
31
|
-
},
|
|
32
|
-
n(
|
|
33
|
-
},
|
|
34
|
-
return /* @__PURE__ */ l(
|
|
35
|
-
/* @__PURE__ */ s(
|
|
28
|
+
), O = (e) => {
|
|
29
|
+
const r = e.map((C) => `${C}`);
|
|
30
|
+
n(r), b(t.id, r);
|
|
31
|
+
}, y = () => {
|
|
32
|
+
n([]), o(t.id, []);
|
|
33
|
+
}, A = M({ data: f, config: t.fetchAsyncFilterOptions });
|
|
34
|
+
return /* @__PURE__ */ l(R, { spacing: "xs", alignX: "stretch", children: [
|
|
35
|
+
/* @__PURE__ */ s(_, { variant: "link", onClick: y, children: "Clear" }),
|
|
36
36
|
/* @__PURE__ */ s(
|
|
37
|
-
|
|
37
|
+
I,
|
|
38
38
|
{
|
|
39
|
+
allowMultiple: !0,
|
|
39
40
|
title: t.label,
|
|
40
|
-
options:
|
|
41
|
-
selected:
|
|
42
|
-
onChange: (e) =>
|
|
41
|
+
options: A,
|
|
42
|
+
selected: S,
|
|
43
|
+
onChange: (e) => O(e)
|
|
43
44
|
}
|
|
44
45
|
),
|
|
45
46
|
i && /* @__PURE__ */ s(
|
|
46
|
-
|
|
47
|
+
T,
|
|
47
48
|
{
|
|
48
49
|
width: "200px",
|
|
49
|
-
height:
|
|
50
|
+
height: v.sizes[5],
|
|
50
51
|
"aria-busy": !0,
|
|
51
52
|
"aria-label": `Loading ${t.label} filters`
|
|
52
53
|
}
|
|
53
54
|
),
|
|
54
|
-
!i && g && /* @__PURE__ */ l(
|
|
55
|
+
!i && g && /* @__PURE__ */ l(w, { variant: "errorSmall", children: [
|
|
55
56
|
"Error: failed to load filter for ",
|
|
56
57
|
t.label
|
|
57
58
|
] })
|
|
58
59
|
] });
|
|
59
60
|
});
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
+
Y as AsyncCheckboxFilter
|
|
62
63
|
};
|
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 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("./index70.cjs"),C=require("./index71.cjs"),V=require("./index47.cjs"),k=require("./index7.cjs"),E=require("./index59.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/index25.js
CHANGED
|
@@ -1,41 +1,62 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { Stack as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as A, useState as C, useCallback as x } from "react";
|
|
3
|
+
import { observer as R } from "mobx-react";
|
|
4
|
+
import V from "lodash/debounce";
|
|
5
|
+
import { Stack as k, Button as E, ChoiceList as _, Skeleton as I, theme as T, Text as v } from "@veeqo/ui";
|
|
6
|
+
import B from "swr/immutable";
|
|
7
|
+
import { getAsyncOptions as N } from "./index70.js";
|
|
8
|
+
import { getFetcherFunction as j } from "./index71.js";
|
|
9
|
+
import { SWR_HOOK_OPTIONS as w } from "./index47.js";
|
|
10
|
+
import { useBusinessLogic as M } from "./index7.js";
|
|
11
|
+
import { useStores as U } from "./index59.js";
|
|
12
|
+
const Q = R(({ field: t }) => {
|
|
13
|
+
var c, a;
|
|
14
|
+
const { FILTERS_DEBOUCE_INTERVAL_MS: m } = M(), h = A(() => {
|
|
15
|
+
var e;
|
|
16
|
+
return j({ fetcherName: (e = t.fetchAsyncFilterOptions) == null ? void 0 : e.fetcher });
|
|
17
|
+
}, [(c = t.fetchAsyncFilterOptions) == null ? void 0 : c.fetcher]), { isLoading: u, isValidating: p, data: f, error: g } = B(
|
|
18
|
+
(a = t.fetchAsyncFilterOptions) == null ? void 0 : a.URL,
|
|
19
|
+
h,
|
|
20
|
+
w
|
|
21
|
+
), i = u || p, {
|
|
22
|
+
Filters: { setFilter: o, filters: d }
|
|
23
|
+
} = U(), F = d.get(t.id), [S, n] = C(F), O = x(
|
|
24
|
+
V((e, r) => {
|
|
25
|
+
o(e, r);
|
|
26
|
+
}, m),
|
|
18
27
|
[o]
|
|
19
|
-
),
|
|
20
|
-
const r =
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
28
|
+
), b = (e) => {
|
|
29
|
+
const r = `${e[0]}`;
|
|
30
|
+
n(r), O(t.id, r);
|
|
31
|
+
}, L = () => {
|
|
32
|
+
n(""), o(t.id, "");
|
|
33
|
+
}, y = N({ data: f, config: t.fetchAsyncFilterOptions });
|
|
34
|
+
return /* @__PURE__ */ l(k, { spacing: "xs", alignX: "stretch", children: [
|
|
35
|
+
/* @__PURE__ */ s(E, { variant: "link", onClick: L, children: "Clear" }),
|
|
36
|
+
/* @__PURE__ */ s(
|
|
37
|
+
_,
|
|
29
38
|
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
onChange: (t) => p(t)
|
|
39
|
+
title: t.label,
|
|
40
|
+
options: y,
|
|
41
|
+
selected: [S],
|
|
42
|
+
onChange: (e) => b(e)
|
|
35
43
|
}
|
|
36
|
-
)
|
|
44
|
+
),
|
|
45
|
+
i && /* @__PURE__ */ s(
|
|
46
|
+
I,
|
|
47
|
+
{
|
|
48
|
+
width: "200px",
|
|
49
|
+
height: T.sizes[5],
|
|
50
|
+
"aria-busy": !0,
|
|
51
|
+
"aria-label": `Loading ${t.label} filters`
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
!i && g && /* @__PURE__ */ l(v, { variant: "errorSmall", children: [
|
|
55
|
+
"Error: failed to load filter for ",
|
|
56
|
+
t.label
|
|
57
|
+
] })
|
|
37
58
|
] });
|
|
38
59
|
});
|
|
39
60
|
export {
|
|
40
|
-
|
|
61
|
+
Q as AsyncRadioFilter
|
|
41
62
|
};
|
package/dist/index26.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
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("./index59.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;
|