@veeqo/transfigure 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BusinessLogic/types.d.ts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useStores/types.d.ts +7 -5
- package/dist/hooks/useUrlParams/index.d.ts +1 -0
- package/dist/hooks/useUrlParams/useUrlParams.d.ts +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +58 -54
- package/dist/index101.cjs +80 -1
- package/dist/index101.js +102 -35
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +2 -19
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +36 -8
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +17 -62
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +7 -29
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +62 -24
- package/dist/index107.cjs +1 -13
- package/dist/index107.js +30 -17
- package/dist/index108.cjs +13 -1
- package/dist/index108.js +16 -46
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +25 -62
- package/dist/index110.cjs +1 -7
- package/dist/index110.js +63 -10
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +46 -41
- package/dist/index112.cjs +7 -0
- package/dist/index112.js +12 -0
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +44 -0
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +1 -1
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +2 -2
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +2 -2
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +2 -2
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +2 -2
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +1 -1
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +1 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +21 -17
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +3 -3
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +2 -2
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +2 -2
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +2 -2
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +2 -2
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +4 -4
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +2 -2
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +1 -1
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +13 -316
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +321 -55
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +50 -47
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +51 -32
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +30 -24
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +32 -4
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +38 -9
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +12 -16
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +9 -19
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +16 -47
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +18 -20
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +50 -2
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +21 -9
- package/dist/index77.cjs +1 -3
- package/dist/index77.js +2 -14
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +8 -8
- package/dist/index79.cjs +3 -8
- package/dist/index79.js +14 -12
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +9 -41
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +143 -9
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +18 -142
- package/dist/index83.cjs +8 -1
- package/dist/index83.js +12 -19
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +40 -17
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +9 -13
- package/dist/index86.cjs +1 -104
- package/dist/index86.js +13 -120
- package/dist/index87.cjs +104 -1
- package/dist/index87.js +117 -65
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +63 -24
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +29 -2
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +21 -20
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +2 -41
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +39 -9
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +10 -23
- package/dist/index93.cjs +1 -19
- package/dist/index93.js +18 -24
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +24 -21
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +25 -23
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +1 -1
- package/dist/index98.cjs +19 -1
- package/dist/index98.js +24 -2
- package/dist/index99.cjs +1 -80
- package/dist/index99.js +21 -103
- package/dist/mobx/Filters/Filters.d.ts +1 -0
- package/dist/mobx/MobXProvider/MobXProvider.d.ts +4 -9
- package/dist/mobx/Table/Table.d.ts +13 -0
- package/dist/mobx/Table/index.d.ts +1 -0
- package/dist/mobx/index.d.ts +1 -0
- package/dist/mockServiceWorker.js +307 -0
- package/dist/storybookHelpers/apiMocks/custom_views.d.ts +82 -80
- package/dist/storybookHelpers/handlers.d.ts +6 -0
- package/dist/types.d.ts +2 -0
- package/package.json +11 -4
package/dist/index111.js
CHANGED
|
@@ -1,44 +1,49 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as u } from "react";
|
|
3
|
+
import { observer as O } from "mobx-react";
|
|
4
|
+
import { Stack as b, ChoiceList as F, Skeleton as x, theme as y, Text as A } from "@veeqo/ui";
|
|
5
|
+
import S from "swr/immutable";
|
|
6
|
+
import { getAsyncOptions as d } from "./index72.js";
|
|
7
|
+
import { getFetcherFunction as L } from "./index73.js";
|
|
8
|
+
import { SWR_HOOK_OPTIONS as k } from "./index47.js";
|
|
9
|
+
const T = O(
|
|
10
|
+
({ field: t, editedValue: c, setEditedValue: a }) => {
|
|
11
|
+
var o, i;
|
|
12
|
+
const l = u(() => {
|
|
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 } = S(
|
|
16
|
+
(i = t.fetchAsyncFilterOptions) == null ? void 0 : i.URL,
|
|
17
|
+
l,
|
|
18
|
+
k
|
|
19
|
+
), r = m || h, g = d({ data: p, config: t.fetchAsyncFilterOptions });
|
|
20
|
+
return /* @__PURE__ */ s(b, { spacing: "xs", alignX: "stretch", children: [
|
|
21
|
+
/* @__PURE__ */ n(
|
|
22
|
+
F,
|
|
23
|
+
{
|
|
24
|
+
allowMultiple: !0,
|
|
25
|
+
title: t.label,
|
|
26
|
+
options: g,
|
|
27
|
+
selected: c,
|
|
28
|
+
onChange: (e) => a(e)
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
r && /* @__PURE__ */ n(
|
|
32
|
+
x,
|
|
33
|
+
{
|
|
34
|
+
width: "200px",
|
|
35
|
+
height: y.sizes[5],
|
|
36
|
+
"aria-busy": !0,
|
|
37
|
+
"aria-label": `Loading ${t.label} filters`
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
!r && f && /* @__PURE__ */ s(A, { variant: "errorSmall", children: [
|
|
41
|
+
"Error: failed to load filter for ",
|
|
42
|
+
t.label
|
|
43
|
+
] })
|
|
44
|
+
] });
|
|
40
45
|
}
|
|
41
|
-
|
|
46
|
+
);
|
|
42
47
|
export {
|
|
43
|
-
|
|
48
|
+
T as ActiveAsyncCheckboxFilter
|
|
44
49
|
};
|
|
@@ -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/index112.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
|
+
};
|
|
@@ -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/index113.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
|
+
};
|
package/dist/index15.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("./index47.cjs"),u=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("./index47.cjs"),u=require("./index111.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
|
@@ -2,7 +2,7 @@ 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
4
|
import { FilterChoiceValue as s } from "./index47.js";
|
|
5
|
-
import { ActiveAsyncCheckboxFilter as c } from "./
|
|
5
|
+
import { ActiveAsyncCheckboxFilter as c } from "./index111.js";
|
|
6
6
|
const F = n(
|
|
7
7
|
({ data: r, editedValue: e, setEditedValue: o }) => {
|
|
8
8
|
var i;
|
package/dist/index19.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),h=require("mobx-react"),i=require("@veeqo/ui"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),h=require("mobx-react"),i=require("@veeqo/ui"),a=require("./index67.cjs"),f=require("./index7.cjs"),q=require("./index59.cjs"),E=require("./index22.cjs"),S=require("./index23.cjs"),x=h.observer(({filterData:s})=>{const{DEFAULT_DATE_PRESET:g,DEFAULT_DATE_RANGE:F}=f.useBusinessLogic(),{Filters:{dateRangeFilters:l,clearRangeFilter:u,setRangeFilter:R}}=q.useStores(),t=l.get(s.id),[e,c]=o.useState(l.get(s.id)),T=()=>{const r=new a.RangeFilter;return r.setFilterType(t==null?void 0:t.filterType),c(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),c(r)},[t]);const d=()=>{u(s.id)},y=()=>{t&&(e!=null&&e.filterType)&&R({dates:{start:e.gte,end:e.lte},key:e.filterType,range:t})},A=(e==null?void 0:e.filterSelection)||g,p=r=>{r&&(e||T(),e==null||e.setFilterType(r.value))},b=r=>{!r||!e||e.setDates(r.start,r.end)},v=e?e.selectedRange:F;return n.jsx(i.FilterTag,{shouldCloseOnClickAway:!0,header:n.jsx(S.ActiveFilterHeader,{filterLabel:s.label,glyph:s.glyph}),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:A,setSelectedPreset:p,selectedRange:v,setSelectedRange:b})}),footer:n.jsx(E.ActiveFilterFooter,{clearActiveFilter:d,applyActiveFilter:y})})});exports.ActiveFilterDateRangeTag=x;
|
package/dist/index19.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as A, useEffect as h } from "react";
|
|
3
3
|
import { observer as E } from "mobx-react";
|
|
4
4
|
import { FilterTag as b, BaseContainer as u, theme as v, DateRangePicker as P } from "@veeqo/ui";
|
|
5
|
-
import { RangeFilter as l } from "./
|
|
5
|
+
import { RangeFilter as l } from "./index67.js";
|
|
6
6
|
import { useBusinessLogic as S } from "./index7.js";
|
|
7
7
|
import { useStores as C } from "./index59.js";
|
|
8
8
|
import { ActiveFilterFooter as L } from "./index22.js";
|
package/dist/index20.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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("./
|
|
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("./index66.cjs"),R=require("./index110.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:g}}=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 F=()=>{a(t.id)},b=()=>{!e||!n||g({numberRange:e,lte:n.lte,gte:n.gte})};return i.jsx(l.FilterTag,{shouldCloseOnClickAway:!0,header:i.jsx(q.ActiveFilterHeader,{filterLabel:t.label,glyph:t.glyph}),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:F,applyActiveFilter:b})})});exports.ActiveFilterNumberRangeTag=A;
|
package/dist/index20.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as a, useCallback as d, useEffect as F } from "react";
|
|
3
3
|
import { observer as b } from "mobx-react";
|
|
4
4
|
import { FilterTag as p, BaseContainer as f, theme as R } from "@veeqo/ui";
|
|
5
|
-
import { NumberRangeFilter as N } from "./
|
|
6
|
-
import { FilterNumberRangeFilter as h } from "./
|
|
5
|
+
import { NumberRangeFilter as N } from "./index66.js";
|
|
6
|
+
import { FilterNumberRangeFilter as h } from "./index110.js";
|
|
7
7
|
import { useStores as v } from "./index59.js";
|
|
8
8
|
import { ActiveFilterFooter as A } from "./index22.js";
|
|
9
9
|
import { ActiveFilterHeader as w } from "./index23.js";
|
package/dist/index21.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("./index72.cjs"),F=require("./index73.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
|
@@ -3,8 +3,8 @@ 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 "./
|
|
6
|
+
import { getAsyncOptions as S } from "./index72.js";
|
|
7
|
+
import { getFetcherFunction as L } from "./index73.js";
|
|
8
8
|
import { SWR_HOOK_OPTIONS as R } from "./index47.js";
|
|
9
9
|
const _ = u(
|
|
10
10
|
({ field: t, editedValue: c, setEditedValue: a }) => {
|
package/dist/index24.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("./index72.cjs"),k=require("./index73.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
|
@@ -4,8 +4,8 @@ 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 "./
|
|
7
|
+
import { getAsyncOptions as M } from "./index72.js";
|
|
8
|
+
import { getFetcherFunction as N } from "./index73.js";
|
|
9
9
|
import { SWR_HOOK_OPTIONS as j } from "./index47.js";
|
|
10
10
|
import { useBusinessLogic as U } from "./index7.js";
|
|
11
11
|
import { useStores as W } from "./index59.js";
|
package/dist/index25.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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("./
|
|
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("./index72.cjs"),C=require("./index73.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
|
@@ -4,8 +4,8 @@ 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 "./
|
|
7
|
+
import { getAsyncOptions as N } from "./index72.js";
|
|
8
|
+
import { getFetcherFunction as j } from "./index73.js";
|
|
9
9
|
import { SWR_HOOK_OPTIONS as w } from "./index47.js";
|
|
10
10
|
import { useBusinessLogic as M } from "./index7.js";
|
|
11
11
|
import { useStores as U } from "./index59.js";
|
package/dist/index27.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("./index67.cjs"),b=require("./index7.cjs"),k=require("./index59.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/index27.js
CHANGED
|
@@ -2,7 +2,7 @@ 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 "./index67.js";
|
|
6
6
|
import { useBusinessLogic as C } from "./index7.js";
|
|
7
7
|
import { useStores as x } from "./index59.js";
|
|
8
8
|
const U = T(({ field: r }) => {
|
package/dist/index29.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),R=require("react"),_=require("mobx-react"),j=require("lodash/debounce"),o=require("@veeqo/ui"),L=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),R=require("react"),_=require("mobx-react"),j=require("lodash/debounce"),o=require("@veeqo/ui"),L=require("./index103.cjs"),d=require("./index66.cjs"),p=require("./index7.cjs"),y=require("./index59.cjs"),v=i=>i&&i.__esModule?i:{default:i},k=v(j),I=_.observer(({field:i})=>{var M;const{FILTERS_DEBOUCE_INTERVAL_MS:f}=p.useBusinessLogic(),{Filters:{numberRangeFilters:u,setNumberRangeFilter:x,clearNumberRangeFilter:F}}=y.useStores(),e=u.get(i.id),[r,g]=R.useState({gte:(e==null?void 0:e.gte)??0,lte:(e==null?void 0:e.lte)??100});if(!((M=i.options)!=null&&M.length))return null;const b=()=>{const l=new d.NumberRangeFilter({filterId:i.id});return u.set(i.id,l),l},c=R.useCallback(k.default(({numberRange:l,lte:t,gte:n})=>{x({numberRange:l,lte:t,gte:n})},f),[x]),h=()=>{g({gte:0,lte:100}),F(i.id)},S=(l,t)=>{let n=new d.NumberRangeFilter({filterId:i.id});if(e||(n=b()),!Array.isArray(t)||t.length!==2)return;const[s,m]=t;g({gte:s,lte:m}),c(e?{numberRange:e,lte:m,gte:s}:{numberRange:n,lte:m,gte:s})},N=l=>{if(e||b(),!e)return;const t=Number(l);if(t>e.lteMax)return;let{lte:n}=e,{gte:s}=e;t>=e.gteMin&&t<=e.lteMax&&(s=t),(!e.lte||t>=e.lte)&&(n=e.lteMax),g({gte:s,lte:n}),c({numberRange:e,lte:n,gte:s})},C=l=>{if(e||b(),!e)return;const t=Number(l);if(t<e.gteMin)return;let{lte:n}=e,{gte:s}=e;t>=e.gteMin&&t<=e.lteMax&&(n=t),(!e.gte||t<=e.gte)&&(s=e.gteMin),g({gte:s,lte:n}),c({numberRange:e,lte:n,gte:s})},q=[r.gte,r.lte];return a.jsxs(o.Stack,{spacing:"xs",alignX:"stretch",children:[a.jsx(o.Button,{variant:"link",onClick:h,children:"Clear"}),a.jsxs(o.Stack,{direction:"horizontal",children:[a.jsx(o.TextField,{label:e==null?void 0:e.gteMinLabel,type:"number",min:e==null?void 0:e.gteMin,max:e==null?void 0:e.lteMax,value:r.gte.toString(),onChange:N}),a.jsx(o.TextField,{label:e==null?void 0:e.lteMaxLabel,type:"number",min:e==null?void 0:e.gteMin,max:e==null?void 0:e.lteMax,value:r.lte.toString(),onChange:C})]}),a.jsx(L.MUISlider,{value:q,onChange:S,min:e==null?void 0:e.gteMin,max:e==null?void 0:e.lteMax,valueLabelDisplay:"auto"})]})});exports.NumberRangeFilter=I;
|
package/dist/index29.js
CHANGED
|
@@ -3,8 +3,8 @@ import { useState as y, useCallback as I } from "react";
|
|
|
3
3
|
import { observer as k } from "mobx-react";
|
|
4
4
|
import E from "lodash/debounce";
|
|
5
5
|
import { Stack as c, Button as _, TextField as p } from "@veeqo/ui";
|
|
6
|
-
import { MUISlider as A } from "./
|
|
7
|
-
import { NumberRangeFilter as h } from "./
|
|
6
|
+
import { MUISlider as A } from "./index103.js";
|
|
7
|
+
import { NumberRangeFilter as h } from "./index66.js";
|
|
8
8
|
import { useBusinessLogic as B } from "./index7.js";
|
|
9
9
|
import { useStores as T } from "./index59.js";
|
|
10
10
|
const q = k(({ field: l }) => {
|
package/dist/index32.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index7.cjs"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index7.cjs"),u=require("./index94.cjs"),c=require("./index33.cjs"),a=s.observer(()=>{const{GROUP_MAP:t}=o.useBusinessLogic();return e.jsx(u.AdaptiveHeightContainer,{style:{minWidth:"360px"},children:e.jsx(n.Stack,{alignX:"stretch",children:Array.from(t).map(([r,i])=>e.jsx(c.FilterGroup,{data:i},r))})})});exports.FiltersList=a;
|
package/dist/index32.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { observer as e } from "mobx-react";
|
|
3
3
|
import { Stack as m } from "@veeqo/ui";
|
|
4
4
|
import { useBusinessLogic as s } from "./index7.js";
|
|
5
|
-
import { AdaptiveHeightContainer as p } from "./
|
|
5
|
+
import { AdaptiveHeightContainer as p } from "./index94.js";
|
|
6
6
|
import { FilterGroup as n } from "./index33.js";
|
|
7
7
|
const u = e(() => {
|
|
8
8
|
const { GROUP_MAP: t } = s();
|
package/dist/index37.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index98.cjs"),g=require("./index50.cjs"),j=require("./index49.cjs"),M=({tab:i,onMakeDefault:l,onEdit:n,onDuplicate:s,onDelete:o,shouldShowDropdown:a,handleCloseDropdown:c})=>{const{openModal:r}=g.useModal(),d=()=>{r(j.ModalId.ORDERS_TABLE_MANAGEMENT),c()},m=i.label!=="Picking In Progress"&&i.editable,u=i.default!==!1&&i.editable,p=i.editable,b=i.editable;return a?e.jsxs(t.MenuItems,{children:[u&&e.jsx(t.Item,{onClick:l,className:"act-react-listing-custom-view-make-default-menu-item",children:"Make default view"}),b&&e.jsx(t.Item,{onClick:n,className:"act-react-listing-custom-view-edit-menu-item",role:"option",children:"Edit"}),e.jsx(t.Item,{onClick:s,className:"act-react-listing-custom-view-duplicate-menu-item",role:"option",children:"Duplicate"}),m&&e.jsx(t.Item,{onClick:o,className:"act-react-listing-custom-view-delete-menu-item",role:"option",children:"Delete"}),p&&e.jsxs(e.Fragment,{children:[e.jsx(t.Divider,{}),e.jsx(t.Item,{onClick:d,role:"option",children:"Table management"})]})]}):null};exports.OptionsDropdown=M;
|
package/dist/index37.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as t, jsx as i, Fragment as f } from "react/jsx-runtime";
|
|
2
|
-
import { MenuItems as M, Item as l, Divider as h } from "./
|
|
2
|
+
import { MenuItems as M, Item as l, Divider as h } from "./index98.js";
|
|
3
3
|
import { useModal as k } from "./index50.js";
|
|
4
4
|
import { ModalId as T } from "./index49.js";
|
|
5
5
|
const N = ({
|
package/dist/index38.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("mobx-react"),g=require("./index60.cjs"),o=require("framer-motion"),m=require("./index59.cjs"),v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("mobx-react"),g=require("./index60.cjs"),o=require("framer-motion"),m=require("./index59.cjs"),v=require("./index99.cjs"),f=require("./index40.cjs"),h=P.observer(({tabType:s,isActive:r,shouldShowCreateViewNotification:a,handleSaveDraft:i})=>{var t;const{Filters:{hasUnsavedChanges:c,discardChanges:l,activeViewId:n}}=m.useStores(),{viewsMap:u}=g.useViews(),d=n&&((t=u.get(n))==null?void 0:t.label);return e.jsxs(e.Fragment,{children:[e.jsx(o.AnimatePresence,{children:s==="draft"&&r&&a&&e.jsx(v.DraftPill,{onClick:i})}),e.jsx(o.AnimatePresence,{children:c&&r&&s==="saved"&&e.jsx(f.UnsavedChangesPill,{viewName:d,onDiscard:()=>l(),onSaveDraft:i})})]})});exports.PillNotifications=h;
|
package/dist/index38.js
CHANGED
|
@@ -3,7 +3,7 @@ import { observer as h } from "mobx-react";
|
|
|
3
3
|
import { useViews as v } from "./index60.js";
|
|
4
4
|
import { AnimatePresence as n } from "framer-motion";
|
|
5
5
|
import { useStores as g } from "./index59.js";
|
|
6
|
-
import { DraftPill as w } from "./
|
|
6
|
+
import { DraftPill as w } from "./index99.js";
|
|
7
7
|
import { UnsavedChangesPill as C } from "./index40.js";
|
|
8
8
|
const U = h(
|
|
9
9
|
({
|
package/dist/index39.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),m=require("./index97.cjs"),g=require("./index62.cjs"),S=require("./index60.cjs"),b=require("./index3.cjs"),y=require("./index7.cjs"),V=require("./index59.cjs"),p=require("./index10.cjs"),q=()=>{const{VIEW_TYPE:u}=y.useBusinessLogic(),{sortedCustomViews:s,isLoading:a}=S.useViews(),{mutate:c}=g.useCustomViews({type:u}),[l,t]=n.useState(s);n.useEffect(()=>{t(s)},[s]);const{Notifications:{notify:w}}=V.useStores(),d=async o=>{t(o);const r=o.map(e=>e.id);try{await b.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:r}}}),await c(e=>({...e,settings:{...e.settings,custom_view_positions:{...e.settings.custom_view_positions,order:r}}}),{revalidate:!1})}catch{t(s),w({type:"error",text:"Failed to update order of views"})}};return a||!s.length?null:i.jsx(p.ErrorBoundary,{children:i.jsx(m.LegacySortableViews,{views:l,onChange:d,className:"act-sortable-views"})})};exports.SortableViews=q;
|
package/dist/index39.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as f } from "react";
|
|
3
|
-
import { LegacySortableViews as
|
|
4
|
-
import { useCustomViews as
|
|
5
|
-
import { useViews as
|
|
6
|
-
import { patchCurrentUser as
|
|
7
|
-
import { useBusinessLogic as
|
|
8
|
-
import { useStores as
|
|
9
|
-
import { ErrorBoundary as
|
|
10
|
-
const
|
|
11
|
-
const { VIEW_TYPE: m } =
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import { useState as f, useEffect as l } from "react";
|
|
3
|
+
import { LegacySortableViews as w } from "./index97.js";
|
|
4
|
+
import { useCustomViews as d } from "./index62.js";
|
|
5
|
+
import { useViews as g } from "./index60.js";
|
|
6
|
+
import { patchCurrentUser as _ } from "./index3.js";
|
|
7
|
+
import { useBusinessLogic as S } from "./index7.js";
|
|
8
|
+
import { useStores as b } from "./index59.js";
|
|
9
|
+
import { ErrorBoundary as v } from "./index10.js";
|
|
10
|
+
const T = () => {
|
|
11
|
+
const { VIEW_TYPE: m } = S(), { sortedCustomViews: s, isLoading: a } = g(), { mutate: n } = d({ type: m }), [u, e] = f(s);
|
|
12
|
+
l(() => {
|
|
13
|
+
e(s);
|
|
14
|
+
}, [s]);
|
|
15
|
+
const { Notifications: { notify: c } } = b(), p = async (o) => {
|
|
16
|
+
e(o);
|
|
17
|
+
const i = o.map((t) => t.id);
|
|
14
18
|
try {
|
|
15
|
-
await
|
|
19
|
+
await _({
|
|
16
20
|
user_setting_attributes: {
|
|
17
21
|
custom_view_positions: {
|
|
18
22
|
order: i
|
|
@@ -32,14 +36,14 @@ const N = () => {
|
|
|
32
36
|
{ revalidate: !1 }
|
|
33
37
|
);
|
|
34
38
|
} catch {
|
|
35
|
-
|
|
39
|
+
e(s), c({
|
|
36
40
|
type: "error",
|
|
37
41
|
text: "Failed to update order of views"
|
|
38
42
|
});
|
|
39
43
|
}
|
|
40
44
|
};
|
|
41
|
-
return a || !s.length ? null : /* @__PURE__ */ r(
|
|
42
|
-
|
|
45
|
+
return a || !s.length ? null : /* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(
|
|
46
|
+
w,
|
|
43
47
|
{
|
|
44
48
|
views: u,
|
|
45
49
|
onChange: p,
|
|
@@ -48,5 +52,5 @@ const N = () => {
|
|
|
48
52
|
) });
|
|
49
53
|
};
|
|
50
54
|
export {
|
|
51
|
-
|
|
55
|
+
T as SortableViews
|
|
52
56
|
};
|
package/dist/index40.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),s=require("@veeqo/ui"),h=require("mobx-react"),u=require("./index58.cjs"),n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),s=require("@veeqo/ui"),h=require("mobx-react"),u=require("./index58.cjs"),n=require("./index101.cjs"),x=s.theme.colors.secondary.blue.base,j=h.observer(({onDiscard:a,viewName:r,onSaveDraft:i})=>{const{saveChanges:o,isSubmitting:c}=u.usePersistUnsavedChanges(),[d,t]=l.useState(!1);return e.jsx(n.Notification,{children:e.jsx(n.Container,{children:e.jsxs(s.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(n.Glyph,{ariaLabel:"attention",name:"attention",color:x}),e.jsxs(n.Wrap,{children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"You have unsaved changes"}),r&&e.jsx(n.Bold,{variant:"bodyBoldDark",children:`to '${r}'`})]}),e.jsx(s.Button,{onClick:a,size:"sm",children:"Discard changes"}),e.jsxs(s.AnimatedDropdown,{reversed:!0,shouldShowDropdown:d,onClickAway:()=>t(!1),cta:e.jsx(s.Button,{variant:"primary",onClick:()=>t(!0),size:"sm",dropdown:!0,children:"Save changes"}),children:[e.jsx(n.Item,{onClick:i,children:e.jsx(n.Text,{variant:"body",children:"Create new view"})}),e.jsxs(n.Item,{onClick:o,disabled:c,children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"Save changes to"}),e.jsx(n.Text,{variant:"bodyBoldDark",children:r})]})]})]})})})});exports.UnsavedChangesPill=j;
|
package/dist/index40.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useState as m } from "react";
|
|
|
3
3
|
import { Stack as p, theme as v, Button as a, AnimatedDropdown as u } from "@veeqo/ui";
|
|
4
4
|
import { observer as b } from "mobx-react";
|
|
5
5
|
import { usePersistUnsavedChanges as g } from "./index58.js";
|
|
6
|
-
import { Notification as C, Container as f, Glyph as y, Wrap as k, Text as n, Bold as S, Item as t } from "./
|
|
6
|
+
import { Notification as C, Container as f, Glyph as y, Wrap as k, Text as n, Bold as S, Item as t } from "./index101.js";
|
|
7
7
|
const w = v.colors.secondary.blue.base, P = b(({
|
|
8
8
|
onDiscard: d,
|
|
9
9
|
viewName: o,
|
package/dist/index44.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),N=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),N=require("./index81.cjs"),b=require("@veeqo/ui"),_=require("./index82.cjs"),j=require("mobx-react"),y=require("./index7.cjs"),B=require("./index50.cjs"),I=require("./index59.cjs"),O=require("./index60.cjs"),g=require("./index49.cjs"),w=j.observer(({columnDefinitions:T,pinnedRightColumnIds:i=[],pinnedLeftColumnIds:a=[]})=>{var M;const{DEFAULT_HIDDEN_COLUMNS:E,DEFAULT_VISIBLE_COLUMNS:p}=y.useBusinessLogic(),n=[...a,...i],l=E.filter(s=>!n.includes(s)),c=p.filter(s=>!n.includes(s)),S=[...l,...c],{closeModal:f,isModalOpen:h,openModal:q}=B.useModal(),{Filters:{activeViewId:t},Views:{draftViewsMap:A}}=I.useStores(),{viewsMap:D,isLoading:x}=O.useViews();if(!t||x)return null;const e=D.get(t),r=Array.isArray((M=e==null?void 0:e.columns)==null?void 0:M.columnIds),u=r?e.columns.columnIds.filter(s=>!n.includes(s)):c,L=r?S.filter(s=>!u.includes(s)):l,d=A.has(t),m=!(e!=null&&e.editable),v=m||d,C=d?"Please create a view to use table management":m?"Please choose a custom view to use table management":"Table management";return o.jsxs(o.Fragment,{children:[o.jsx(b.Tooltip,{text:C,children:o.jsx(b.Button,{"aria-label":"Open table management",onClick:()=>q(g.ModalId.ORDERS_TABLE_MANAGEMENT),size:"sm",iconSlot:o.jsx(_.TableManagementGlyph,{}),disabled:v})}),h(g.ModalId.ORDERS_TABLE_MANAGEMENT)&&o.jsx(N.TableManagementModal,{pinnedRightColumnIds:i,pinnedLeftColumnIds:a,visibleColumns:u,hiddenColumns:L,columnDefintions:T,onClose:f})]})});exports.TableManagement=w;
|
package/dist/index44.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as v, Fragment as B, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { TableManagementModal as O } from "./
|
|
2
|
+
import { TableManagementModal as O } from "./index81.js";
|
|
3
3
|
import { Tooltip as w, Button as x } from "@veeqo/ui";
|
|
4
|
-
import { TableManagementGlyph as F } from "./
|
|
4
|
+
import { TableManagementGlyph as F } from "./index82.js";
|
|
5
5
|
import { observer as I } from "mobx-react";
|
|
6
6
|
import { useBusinessLogic as y } from "./index7.js";
|
|
7
7
|
import { useModal as P } from "./index50.js";
|
package/dist/index45.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@veeqo/ui"),r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@veeqo/ui"),r=require("./index83.cjs"),d=require("./index84.cjs"),h=require("./index85.cjs"),f=require("./index59.cjs"),y=({isLoading:s,refetch:n,trackMetricClick:t,tooltipText:a="Refresh data"})=>{const{hasChanges:o,acknowledgeButtonClick:l}=d.usePollData(),{Notifications:{notify:i}}=f.useStores(),u=async()=>{try{n(),l(),t==null||t()}catch{i({type:"error",text:"Failed to refresh data"})}};return e.jsx(c.Tooltip,{text:a,children:e.jsx(r.StyledButton,{onClick:u,variant:"default",size:"sm",loading:s,disabled:s,iconSlot:e.jsx(h.RefreshIcon,{}),"aria-label":o?"refresh table with changes":"refresh table","aria-live":"polite",children:e.jsx(r.StyledIndicator,{color:"red",size:"xs",style:{opacity:o?1:0}})})})};exports.RefreshButton=y;
|
package/dist/index45.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip as l } from "@veeqo/ui";
|
|
3
|
-
import { StyledButton as f, StyledIndicator as h } from "./
|
|
4
|
-
import { usePollData as d } from "./
|
|
5
|
-
import { RefreshIcon as m } from "./
|
|
3
|
+
import { StyledButton as f, StyledIndicator as h } from "./index83.js";
|
|
4
|
+
import { usePollData as d } from "./index84.js";
|
|
5
|
+
import { RefreshIcon as m } from "./index85.js";
|
|
6
6
|
import { useStores as p } from "./index59.js";
|
|
7
7
|
const B = ({ isLoading: t, refetch: s, trackMetricClick: o, tooltipText: a = "Refresh data" }) => {
|
|
8
8
|
const { hasChanges: r, acknowledgeButtonClick: n } = d(), { Notifications: { notify: i } } = p();
|
package/dist/index54.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),C=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),C=require("./index76.cjs"),Y=require("./index75.cjs"),k=require("./index62.cjs"),G=require("./index55.cjs"),H=require("./index58.cjs"),W=require("./index60.cjs"),a=require("./index43.cjs"),N=require("./index3.cjs"),$=require("./index2.cjs"),B=require("./index7.cjs"),b=require("./index59.cjs"),j=require("./index5.cjs"),z=require("./index4.cjs"),J=e=>{const{VIEW_TYPE:r}=B.useBusinessLogic(),{duplicateView:P}=G.useDuplicateActiveView(),{getActiveViewInAPIFormat:q}=H.usePersistUnsavedChanges(),{canDeleteCustomViews:_,defaultCustomViewId:E,canUpdateCustomViews:M,mutate:x}=k.useCustomViews({type:r}),{mutate:l,viewsMap:w,viewsArray:L}=W.useViews(),[I,o]=c.useState(!1),[A,p]=c.useState(!1),[h,n]=c.useState(!1),[R,f]=c.useState(!1),{Views:{removeDraftViewById:S,draftViewsMap:F},Filters:{initFiltersFromView:u,updateUrl:d,setActiveViewId:O},Notifications:{notify:i}}=b.useStores();return{actions:{delete:{handleDeleteDraftView:()=>{if(!e.originalView)throw Error("No draft view found");S(e.id);const t=w.get(E);if(t)t&&u(t);else{const s=w.get(C.ALL_VIEW_ID);s&&u(s)}d()},handleDelete:async()=>{try{if(_){await $.deleteCustomView(Number(e.id)),await l();const t=w.get(C.ALL_VIEW_ID);t&&u(t),d(),A&&p(!1),h&&n(h),i({type:"success",text:`'${e.label}' has been deleted`})}else i({type:"info",text:"You require additional user permissions to delete a company shared view"})}catch{i({type:"error",text:"Failed to delete view"})}},handleShowDeleteConfirmation:()=>{if(F.has(e.id)){S(e.id),e.originalView?O(e.originalView.id):O(C.ALL_VIEW_ID);return}_?p(!0):i({type:"info",text:"You require additional user permissions to delete a company shared view"})},closeDeleteConfirmation:()=>p(!1)},edit:{handleShowEditDropdown:()=>{o(!1),n(!0)},closeEditDropdown:()=>n(!1)},menu:{handleSave:async t=>{try{const{viewName:s,shareOption:D,isDefault:m}=t,V=D==="company"?a.SHARING_OPTIONS.COMPANY:a.SHARING_OPTIONS.PERSONAL,y={attributes:{title:s,shared:V.key===a.SHARING_OPTIONS.COMPANY.key}};await z.patchCustomView(e.id,y),m&&(await N.patchCurrentUser({user_setting_attributes:{default_custom_view:{id:Number(e.id),type:r}}}),await x()),await l(),d(),i({type:"success",text:`'${s}' view updated`}),n(!1)}catch{i({type:"error",text:"Failed to save view"})}},handleDuplicate:()=>{P(),o(!1)},handleMakeDefault:async()=>{try{await N.patchCurrentUser({user_setting_attributes:{default_custom_view:{id:Number(e.id),type:r}}}),i({type:"success",text:`'${e.label}' is now your default view`}),o(!1)}catch{i({type:"error",text:"Failed to set default view"})}},openDropdown:()=>o(!0),closeDropdown:()=>o(!1),toggleDropdown:()=>o(!I)},create:{handleCreate:async t=>{try{const{viewName:s,shareOption:D,isDefault:m}=t,V=D==="company"?a.SHARING_OPTIONS.COMPANY:a.SHARING_OPTIONS.PERSONAL,{arg:y}=q(),{data:v}=await j.createCustomView({attributes:{...y,title:s,shared:V.key===a.SHARING_OPTIONS.COMPANY.key}}),g=L.map(U=>U.id);g.push(v.id),await N.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:g},...m?{default_custom_view:{id:Number(v.id),type:r}}:{}}}),await l(),S(e.id);const T=Y.viewsAdapter({view:v,canUpdateCustomViews:M});u(T),d(),f(!1),i({type:"success",text:`New view '${s}' created`})}catch(s){console.log(s),i({type:"error",text:"Failed to save draft view"})}},closeCreateDropdown:()=>f(!1),handleSaveDraft:async()=>{f(!0)}}},state:{shouldShowDropdown:I,shouldShowEditDropdown:h,shouldShowCreateDropdown:R,shouldShowDeleteConfirmation:A}}};exports.useDropdownManager=J;
|
package/dist/index54.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as w } from "react";
|
|
2
|
-
import { ALL_VIEW_ID as C } from "./
|
|
3
|
-
import { viewsAdapter as R } from "./
|
|
2
|
+
import { ALL_VIEW_ID as C } from "./index76.js";
|
|
3
|
+
import { viewsAdapter as R } from "./index75.js";
|
|
4
4
|
import { useCustomViews as q } from "./index62.js";
|
|
5
5
|
import { useDuplicateActiveView as B } from "./index55.js";
|
|
6
6
|
import { usePersistUnsavedChanges as T } from "./index58.js";
|
package/dist/index56.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),u=require("./index72.cjs"),l=require("./index73.cjs"),a=require("swr/immutable"),F=require("./index59.cjs"),y=e=>e&&e.__esModule?e:{default:e},d=y(a),f=({filterData:e})=>{var r;const{Filters:{arrayFilters:o}}=F.useStores(),s=o.get(e.id),{data:c}=d.default((r=e.fetchAsyncFilterOptions)==null?void 0:r.URL,()=>{var t;return l.getFetcherFunction({fetcherName:(t=e.fetchAsyncFilterOptions)==null?void 0:t.fetcher})(e.fetchAsyncFilterOptions.URL)},{revalidateOnFocus:!1});return{filterLabel:i.useMemo(()=>{const n=c?u.getAsyncOptions({data:c,config:e.fetchAsyncFilterOptions}):e.options;return(n==null?void 0:n.filter(t=>s==null?void 0:s.includes(t.value.toString())).map(t=>t.label).join(", "))||""},[c,e.options,s,e.fetchAsyncFilterOptions])}};exports.useFilterArrayLabel=f;
|
package/dist/index56.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo as i } from "react";
|
|
2
|
-
import { getAsyncOptions as m } from "./
|
|
3
|
-
import { getFetcherFunction as p } from "./
|
|
2
|
+
import { getAsyncOptions as m } from "./index72.js";
|
|
3
|
+
import { getFetcherFunction as p } from "./index73.js";
|
|
4
4
|
import l from "swr/immutable";
|
|
5
5
|
import { useStores as f } from "./index59.js";
|
|
6
6
|
const a = ({ filterData: e }) => {
|
package/dist/index57.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),l=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),l=require("./index72.cjs"),F=require("./index73.cjs"),f=require("swr/immutable"),h=require("./index59.cjs"),p=e=>e&&e.__esModule?e:{default:e},d=p(f),y=({filterData:e})=>{var o;const{Filters:{filters:r}}=h.useStores(),t=r.get(e.id),{data:c}=d.default((o=e.fetchAsyncFilterOptions)==null?void 0:o.URL,()=>{var n;return F.getFetcherFunction({fetcherName:(n=e.fetchAsyncFilterOptions)==null?void 0:n.fetcher})(e.fetchAsyncFilterOptions.URL)},{revalidateOnFocus:!1});return{filterLabel:u.useMemo(()=>{var n;if(!e.options&&!e.fetchAsyncFilterOptions)return t;const s=c?l.getAsyncOptions({data:c,config:e.fetchAsyncFilterOptions}):e.options;return((n=s==null?void 0:s.find(i=>i.value.toString()===(t==null?void 0:t.toString())))==null?void 0:n.label)||""},[c,e.options,t,e.fetchAsyncFilterOptions])}};exports.useFilterLabel=y;
|
package/dist/index57.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo as p } from "react";
|
|
2
|
-
import { getAsyncOptions as m } from "./
|
|
3
|
-
import { getFetcherFunction as f } from "./
|
|
2
|
+
import { getAsyncOptions as m } from "./index72.js";
|
|
3
|
+
import { getFetcherFunction as f } from "./index73.js";
|
|
4
4
|
import h from "swr/immutable";
|
|
5
5
|
import { useStores as u } from "./index59.js";
|
|
6
6
|
const b = ({ filterData: t }) => {
|