@veeqo/transfigure 1.2.13 → 2.0.0
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/ActiveFilterHeader/ActiveFilterHeader.d.ts +2 -2
- package/dist/components/Filters/Fields/NumberRangeFilter/MuiSlider.d.ts +1 -1
- package/dist/components/TableManagement/components/styled.d.ts +1 -3
- package/dist/components/Views/OptionsDropdown/styled.d.ts +1 -1
- package/dist/components/Views/PillNotifications/variants/UnsavedChangesPill/UnsavedChangesPill.d.ts +1 -1
- package/dist/components/Views/PillNotifications/variants/styled.d.ts +1 -5
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +73 -74
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +15 -7
- package/dist/index101.cjs +12 -1
- package/dist/index101.js +16 -18
- package/dist/index102.cjs +19 -1
- package/dist/index102.js +24 -21
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +49 -14
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +29 -50
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +7 -29
- package/dist/index106.cjs +1 -19
- package/dist/index106.js +24 -24
- package/dist/index107.cjs +78 -10
- package/dist/index107.js +95 -13
- package/dist/index108.cjs +1 -80
- package/dist/index108.js +2 -101
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +1 -1
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +1 -1
- package/dist/index113.cjs +13 -1
- package/dist/index113.js +17 -2
- package/dist/index114.cjs +1 -13
- package/dist/index114.js +24 -15
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +32 -22
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +5 -36
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +63 -5
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +42 -58
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +18 -18
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +20 -20
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +21 -21
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +15 -15
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +8 -9
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +5 -5
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +2 -2
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +11 -12
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +11 -22
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +24 -25
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +2 -2
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +1 -1
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +1 -1
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +5 -41
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +2 -9
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +115 -4
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +39 -116
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +9 -19
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +13 -2
- package/dist/index92.cjs +104 -1
- package/dist/index92.js +119 -13
- package/dist/index93.cjs +1 -104
- package/dist/index93.js +65 -117
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +23 -63
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +2 -29
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +41 -2
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +9 -39
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +17 -10
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +21 -24
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
- package/dist/components/TableManagement/TableManagementGlyph.d.ts +0 -4
- package/dist/index120.cjs +0 -1
- package/dist/index120.js +0 -49
package/dist/index20.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as F, useEffect as p } from "react";
|
|
3
3
|
import { observer as u } from "mobx-react";
|
|
4
|
-
import { FilterTag as
|
|
5
|
-
import { useFilterArrayLabel as
|
|
6
|
-
import { FilterArrayField as
|
|
7
|
-
import b from "./
|
|
4
|
+
import { FilterTag as A } from "@veeqo/ui";
|
|
5
|
+
import { useFilterArrayLabel as f } from "./index58.js";
|
|
6
|
+
import { FilterArrayField as y } from "./index17.js";
|
|
7
|
+
import b from "./index116.js";
|
|
8
8
|
import { useStores as v } from "./index61.js";
|
|
9
|
-
import { ActiveFilterFooter as
|
|
10
|
-
import { ActiveFilterHeader as
|
|
9
|
+
import { ActiveFilterFooter as V } from "./index24.js";
|
|
10
|
+
import { ActiveFilterHeader as g } from "./index25.js";
|
|
11
11
|
const H = u(({ filterData: e }) => {
|
|
12
12
|
const {
|
|
13
|
-
Filters: { arrayFilters: i, clearArrayFilter: s, setArrayFilter:
|
|
14
|
-
} = v(), t = i.get(e.id), [o, l] =
|
|
15
|
-
|
|
13
|
+
Filters: { arrayFilters: i, clearArrayFilter: s, setArrayFilter: c }
|
|
14
|
+
} = v(), t = i.get(e.id), [o, l] = F(t || []);
|
|
15
|
+
p(() => {
|
|
16
16
|
o !== t && l(t || []);
|
|
17
17
|
}, [e.id, t, i]);
|
|
18
|
-
const
|
|
18
|
+
const m = () => {
|
|
19
19
|
s(e.id);
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
}, { filterLabel:
|
|
20
|
+
}, d = () => {
|
|
21
|
+
c(e.id, o);
|
|
22
|
+
}, { filterLabel: n } = f({ filterData: e });
|
|
23
23
|
return /* @__PURE__ */ r(
|
|
24
|
-
|
|
24
|
+
A,
|
|
25
25
|
{
|
|
26
26
|
shouldCloseOnClickAway: !0,
|
|
27
|
-
header: /* @__PURE__ */ r(
|
|
27
|
+
header: /* @__PURE__ */ r(g, { filterLabel: e.label, icon: e.icon }),
|
|
28
28
|
label: e.label,
|
|
29
|
-
text:
|
|
29
|
+
text: n || "",
|
|
30
30
|
content: /* @__PURE__ */ r("div", { className: b.fieldContainer, children: /* @__PURE__ */ r(
|
|
31
|
-
|
|
31
|
+
y,
|
|
32
32
|
{
|
|
33
33
|
data: e,
|
|
34
34
|
editedValue: o || [],
|
|
35
|
-
setEditedValue: (
|
|
35
|
+
setEditedValue: (a) => l(a)
|
|
36
36
|
}
|
|
37
37
|
) }),
|
|
38
|
-
footer: /* @__PURE__ */ r(
|
|
38
|
+
footer: /* @__PURE__ */ r(V, { clearActiveFilter: m, applyActiveFilter: d })
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
});
|
package/dist/index21.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),f=require("mobx-react"),i=require("@veeqo/ui"),a=require("./index70.cjs"),q=require("./index8.cjs"),E=require("./index61.cjs"),S=require("./index24.cjs"),h=require("./index25.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,icon:s.icon}),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/index21.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as A, useEffect as
|
|
3
|
-
import { observer as
|
|
4
|
-
import { FilterTag as
|
|
1
|
+
import { jsx as i } 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
5
|
import { RangeFilter as l } from "./index70.js";
|
|
6
6
|
import { useBusinessLogic as S } from "./index8.js";
|
|
7
7
|
import { useStores as C } from "./index61.js";
|
|
8
8
|
import { ActiveFilterFooter as L } from "./index24.js";
|
|
9
9
|
import { ActiveFilterHeader as w } from "./index25.js";
|
|
10
|
-
const H =
|
|
10
|
+
const H = b(
|
|
11
11
|
({ filterData: n }) => {
|
|
12
|
-
const { DEFAULT_DATE_PRESET:
|
|
13
|
-
Filters: { dateRangeFilters:
|
|
14
|
-
} = C(), t =
|
|
12
|
+
const { DEFAULT_DATE_PRESET: c, DEFAULT_DATE_RANGE: a } = S(), {
|
|
13
|
+
Filters: { dateRangeFilters: s, clearRangeFilter: g, setRangeFilter: m }
|
|
14
|
+
} = C(), t = s.get(n.id), [e, o] = A(s.get(n.id)), p = () => {
|
|
15
15
|
const r = new l();
|
|
16
16
|
return r.setFilterType(t == null ? void 0 : t.filterType), o(r), r;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
E(() => {
|
|
19
19
|
if (!t) return;
|
|
20
20
|
const r = new l();
|
|
21
21
|
r.setFilterType(t.filterType), t.gte && t.lte && r.setDates(t.gte, t.lte), o(r);
|
|
@@ -23,34 +23,34 @@ const H = E(
|
|
|
23
23
|
const F = () => {
|
|
24
24
|
g(n.id);
|
|
25
25
|
}, f = () => {
|
|
26
|
-
t && (e != null && e.filterType) &&
|
|
26
|
+
t && (e != null && e.filterType) && m({
|
|
27
27
|
dates: { start: e.gte, end: e.lte },
|
|
28
28
|
key: e.filterType,
|
|
29
29
|
range: t
|
|
30
30
|
});
|
|
31
|
-
}, R = (e == null ? void 0 : e.filterSelection) ||
|
|
32
|
-
r && (e ||
|
|
33
|
-
},
|
|
31
|
+
}, R = (e == null ? void 0 : e.filterSelection) || c, T = (r) => {
|
|
32
|
+
r && (e || p(), e == null || e.setFilterType(r.value));
|
|
33
|
+
}, d = (r) => {
|
|
34
34
|
!r || !e || e.setDates(r.start, r.end);
|
|
35
|
-
},
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
|
|
35
|
+
}, y = e ? e.selectedRange : a;
|
|
36
|
+
return /* @__PURE__ */ i(
|
|
37
|
+
h,
|
|
38
38
|
{
|
|
39
39
|
shouldCloseOnClickAway: !0,
|
|
40
|
-
header: /* @__PURE__ */
|
|
40
|
+
header: /* @__PURE__ */ i(w, { filterLabel: n.label, icon: n.icon }),
|
|
41
41
|
label: n.label,
|
|
42
42
|
text: (t == null ? void 0 : t.filterLabel) || "",
|
|
43
|
-
content: /* @__PURE__ */
|
|
43
|
+
content: /* @__PURE__ */ i(u, { style: { padding: v.sizes.md }, children: /* @__PURE__ */ i(
|
|
44
44
|
P,
|
|
45
45
|
{
|
|
46
46
|
"aria-label": `date range for ${n.label}`,
|
|
47
47
|
selectedPreset: R,
|
|
48
48
|
setSelectedPreset: T,
|
|
49
|
-
selectedRange:
|
|
50
|
-
setSelectedRange:
|
|
49
|
+
selectedRange: y,
|
|
50
|
+
setSelectedRange: d
|
|
51
51
|
}
|
|
52
52
|
) }),
|
|
53
|
-
footer: /* @__PURE__ */
|
|
53
|
+
footer: /* @__PURE__ */ i(L, { clearActiveFilter: F, applyActiveFilter: f })
|
|
54
54
|
}
|
|
55
55
|
);
|
|
56
56
|
}
|
package/dist/index22.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("./index69.cjs"),R=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("./index69.cjs"),R=require("./index117.cjs"),v=require("./index61.cjs"),N=require("./index24.cjs"),q=require("./index25.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,icon:t.icon}),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;
|
package/dist/index22.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as d, useCallback as g, 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
5
|
import { NumberRangeFilter as N } from "./index69.js";
|
|
6
|
-
import { FilterNumberRangeFilter as
|
|
7
|
-
import { useStores as
|
|
8
|
-
import { ActiveFilterFooter as
|
|
9
|
-
import { ActiveFilterHeader as
|
|
6
|
+
import { FilterNumberRangeFilter as v } from "./index117.js";
|
|
7
|
+
import { useStores as A } from "./index61.js";
|
|
8
|
+
import { ActiveFilterFooter as w } from "./index24.js";
|
|
9
|
+
import { ActiveFilterHeader as h } from "./index25.js";
|
|
10
10
|
const z = b(
|
|
11
11
|
({ filterData: t }) => {
|
|
12
12
|
const {
|
|
13
13
|
Filters: { numberRangeFilters: m, clearNumberRangeFilter: s, setNumberRangeFilter: c }
|
|
14
|
-
} =
|
|
14
|
+
} = A(), e = m.get(t.id), [o, n] = d(e), l = g(() => {
|
|
15
15
|
const r = new N({ filterId: t.id });
|
|
16
16
|
return e && (e.gte && r.setGte(e.gte), e.lte && r.setLte(e.lte)), r;
|
|
17
17
|
}, [t.id, e]);
|
|
18
18
|
F(() => {
|
|
19
|
-
const r =
|
|
20
|
-
|
|
21
|
-
}, [
|
|
22
|
-
const
|
|
19
|
+
const r = l();
|
|
20
|
+
n(r);
|
|
21
|
+
}, [l, e]);
|
|
22
|
+
const u = () => {
|
|
23
23
|
s(t.id);
|
|
24
|
-
},
|
|
24
|
+
}, a = () => {
|
|
25
25
|
!e || !o || c({
|
|
26
26
|
numberRange: e,
|
|
27
27
|
// update the original value
|
|
@@ -33,18 +33,18 @@ const z = b(
|
|
|
33
33
|
p,
|
|
34
34
|
{
|
|
35
35
|
shouldCloseOnClickAway: !0,
|
|
36
|
-
header: /* @__PURE__ */ i(
|
|
36
|
+
header: /* @__PURE__ */ i(h, { filterLabel: t.label, icon: t.icon }),
|
|
37
37
|
label: t.label,
|
|
38
38
|
text: (e == null ? void 0 : e.filterLabel) || "Loading...",
|
|
39
39
|
content: /* @__PURE__ */ i(f, { style: { padding: R.sizes.md }, children: /* @__PURE__ */ i(
|
|
40
|
-
|
|
40
|
+
v,
|
|
41
41
|
{
|
|
42
42
|
data: t,
|
|
43
43
|
editedValue: o,
|
|
44
|
-
setEditedValue:
|
|
44
|
+
setEditedValue: n
|
|
45
45
|
}
|
|
46
46
|
) }),
|
|
47
|
-
footer: /* @__PURE__ */ i(
|
|
47
|
+
footer: /* @__PURE__ */ i(w, { clearActiveFilter: u, applyActiveFilter: a })
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
50
|
}
|
package/dist/index25.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("@veeqo/ui"),n=require("lodash/toLower"),o=e=>e&&e.__esModule?e:{default:e},s=o(n),a=({filterLabel:e,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("@veeqo/ui"),n=require("lodash/toLower"),o=e=>e&&e.__esModule?e:{default:e},s=o(n),a=({filterLabel:e,icon:r})=>t.jsxs(t.Fragment,{children:[r,t.jsxs(i.Text,{variant:"headingSmall",as:"h2",children:["Edit ",s.default(e)]})]});exports.ActiveFilterHeader=a;
|
package/dist/index25.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as r, Fragment as i } from "react/jsx-runtime";
|
|
2
2
|
import { Text as o } from "@veeqo/ui";
|
|
3
3
|
import m from "lodash/toLower";
|
|
4
|
-
const l = ({ filterLabel: t,
|
|
4
|
+
const l = ({ filterLabel: t, icon: e }) => /* @__PURE__ */ r(i, { children: [
|
|
5
5
|
e,
|
|
6
6
|
/* @__PURE__ */ r(o, { variant: "headingSmall", as: "h2", children: [
|
|
7
7
|
"Edit ",
|
package/dist/index30.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),g=require("mobx-react"),u=require("@veeqo/ui"),h=require("lodash/debounce"),n=require("./index49.cjs"),j=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),g=require("mobx-react"),u=require("@veeqo/ui"),h=require("lodash/debounce"),n=require("./index49.cjs"),j=require("./index87.cjs"),m=require("./index8.cjs"),y=require("./index61.cjs"),k=r=>r&&r.__esModule?r:{default:r},B=k(h),v=g.observer(({fields:r,groupId:c})=>{const{FILTERS_DEBOUNCE_INTERVAL_MS:S}=m.useBusinessLogic(),{Filters:{getFiltersForGroup:p,setFilter:a,clearFiltersForGroup:V}}=y.useStores(),_=p(c),[d,F]=o.useState(_),[E,x]=o.useState({}),C=o.useCallback(B.default((e,t)=>{a(e,t)},S),[a]),q=(e,t)=>{const s={...d,[e]:t},i={...E},T=Object.entries(s).every(([b,M])=>j.isTextFilterValid(String(M))?(i[b]="",!0):(i[b]=n.MIN_SEARCH_ERROR_MESSAGE,!1));F(s),x(i),T&&C(e,t)},R=()=>{const e=r.reduce((t,s)=>({...t,[s.id]:""}),{});F(e),V(c)};return l.jsxs(u.FlexCol,{children:[l.jsx(u.Button,{variant:"link",onClick:R,children:"Clear"}),r.map(e=>{let t;switch(e.filterType){case n.FilterChoiceValue.NUMBER:t="number";break;case n.FilterChoiceValue.TEXT:t="text";break}return l.jsx(u.TextField,{type:t,value:d[e.id],error:E[e.id],label:e.label,onChange:s=>q(e.id,s)},e.id)})]})});exports.MultipleFieldFilter=v;
|
package/dist/index30.js
CHANGED
|
@@ -4,7 +4,7 @@ import { observer as _ } from "mobx-react";
|
|
|
4
4
|
import { FlexCol as k, Button as M, TextField as g } from "@veeqo/ui";
|
|
5
5
|
import y from "lodash/debounce";
|
|
6
6
|
import { FilterChoiceValue as F, MIN_SEARCH_ERROR_MESSAGE as B } from "./index49.js";
|
|
7
|
-
import { isTextFilterValid as G } from "./
|
|
7
|
+
import { isTextFilterValid as G } from "./index87.js";
|
|
8
8
|
import { useBusinessLogic as N } from "./index8.js";
|
|
9
9
|
import { useStores as j } from "./index61.js";
|
|
10
10
|
const q = _(({ fields: s, groupId: i }) => {
|
package/dist/index31.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),_=require("mobx-react"),j=require("lodash/debounce"),r=require("@veeqo/ui"),L=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),_=require("mobx-react"),j=require("lodash/debounce"),r=require("@veeqo/ui"),L=require("./index115.cjs"),R=require("./index69.cjs"),p=require("./index8.cjs"),y=require("./index61.cjs"),v=i=>i&&i.__esModule?i:{default:i},k=v(j),I=_.observer(({field:i})=>{var M;const{FILTERS_DEBOUNCE_INTERVAL_MS:f}=p.useBusinessLogic(),{Filters:{numberRangeFilters:u,setNumberRangeFilter:x,clearNumberRangeFilter:F}}=y.useStores(),e=u.get(i.id),[o,g]=d.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 R.NumberRangeFilter({filterId:i.id});return u.set(i.id,l),l},c=d.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 R.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=[o.gte,o.lte];return a.jsxs(r.Stack,{spacing:"xs",alignX:"stretch",children:[a.jsx(r.Button,{variant:"link",onClick:h,children:"Clear"}),a.jsxs(r.Stack,{direction:"horizontal",children:[a.jsx(r.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:o.gte.toString(),onChange:N}),a.jsx(r.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:o.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/index31.js
CHANGED
|
@@ -3,7 +3,7 @@ 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 "./
|
|
6
|
+
import { MUISlider as A } from "./index115.js";
|
|
7
7
|
import { NumberRangeFilter as h } from "./index69.js";
|
|
8
8
|
import { useBusinessLogic as B } from "./index8.js";
|
|
9
9
|
import { useStores as T } from "./index61.js";
|
package/dist/index33.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("mobx-react"),s=require("@veeqo/ui"),i=require("./index61.cjs"),l=require("./index34.cjs"),n=o.observer(()=>{const{Filters:{isFiltersDropdownVisible:r,toggleFiltersDropdownVisible:t}}=i.useStores();return e.jsx(s.Dropdown,{id:"filters-dropdown",ctaProps:{iconSlot:e.jsx(s.FilterIcon,{}),children:"Filters",loading:!1,disabled:!1,className:"act-toggle-filter",style:{borderRadius:s.theme.radius.base}},style:{padding:0},shouldShow:r,setShouldShow:t,children:e.jsx(l.FiltersList,{})})});exports.FiltersDropdown=n;
|
package/dist/index33.js
CHANGED
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { observer as s } from "mobx-react";
|
|
3
|
-
import { Dropdown as
|
|
4
|
-
import { VeeqoCommon as l } from "@veeqo/components";
|
|
3
|
+
import { Dropdown as i, theme as t, FilterIcon as l } from "@veeqo/ui";
|
|
5
4
|
import { useStores as d } from "./index61.js";
|
|
6
|
-
import { FiltersList as
|
|
7
|
-
const
|
|
5
|
+
import { FiltersList as n } from "./index34.js";
|
|
6
|
+
const h = s(() => {
|
|
8
7
|
const {
|
|
9
8
|
Filters: { isFiltersDropdownVisible: r, toggleFiltersDropdownVisible: e }
|
|
10
9
|
} = d();
|
|
11
10
|
return /* @__PURE__ */ o(
|
|
12
|
-
|
|
11
|
+
i,
|
|
13
12
|
{
|
|
14
13
|
id: "filters-dropdown",
|
|
15
14
|
ctaProps: {
|
|
16
|
-
iconSlot: /* @__PURE__ */ o(
|
|
15
|
+
iconSlot: /* @__PURE__ */ o(l, {}),
|
|
17
16
|
children: "Filters",
|
|
18
17
|
loading: !1,
|
|
19
18
|
// TODO needs implementing?
|
|
20
19
|
disabled: !1,
|
|
21
20
|
// TODO needs implementing?
|
|
22
21
|
className: "act-toggle-filter",
|
|
23
|
-
style: { borderRadius:
|
|
22
|
+
style: { borderRadius: t.radius.base }
|
|
24
23
|
},
|
|
25
24
|
style: {
|
|
26
25
|
padding: 0
|
|
27
26
|
},
|
|
28
27
|
shouldShow: r,
|
|
29
28
|
setShouldShow: e,
|
|
30
|
-
children: /* @__PURE__ */ o(
|
|
29
|
+
children: /* @__PURE__ */ o(n, {})
|
|
31
30
|
}
|
|
32
31
|
);
|
|
33
32
|
});
|
|
34
33
|
export {
|
|
35
|
-
|
|
34
|
+
h as FiltersDropdown
|
|
36
35
|
};
|
package/dist/index34.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("./index8.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("./index8.cjs"),u=require("./index106.cjs"),c=require("./index35.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/index34.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 "./index8.js";
|
|
5
|
-
import { AdaptiveHeightContainer as p } from "./
|
|
5
|
+
import { AdaptiveHeightContainer as p } from "./index106.js";
|
|
6
6
|
import { FilterGroup as n } from "./index35.js";
|
|
7
7
|
const u = e(() => {
|
|
8
8
|
const { GROUP_MAP: t } = s();
|
package/dist/index35.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("mobx-react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("mobx-react"),n=require("@veeqo/ui"),t=require("./index49.cjs"),o=require("./index30.cjs"),u=require("./index31.cjs"),F=require("./index29.cjs"),a=require("./index27.cjs"),h=require("./index32.cjs"),x=require("./index26.cjs"),p=require("./index28.cjs"),R=c.observer(({data:i})=>{const l=i.fields.filter(e=>e.filterType===t.FilterChoiceValue.TEXT||e.filterType===t.FilterChoiceValue.NUMBER),s=i.fields.filter(e=>e.filterType!==t.FilterChoiceValue.TEXT&&e.filterType!==t.FilterChoiceValue.NUMBER);return r.jsx(n.Accordion,{iconSlot:i.icon,label:i.label,children:r.jsxs(n.FlexCol,{children:[l.length>0?r.jsx(o.MultipleFieldFilter,{fields:l,groupId:i.id}):null,s.map(e=>{switch(e.filterType){case t.FilterChoiceValue.CHECKBOX:return e.fetchAsyncFilterOptions?r.jsx(x.AsyncCheckboxFilter,{field:e}):r.jsx(p.CheckboxFilter,{field:e});case t.FilterChoiceValue.RADIO:return e.fetchAsyncFilterOptions?r.jsx(a.AsyncRadioFilter,{field:e}):r.jsx(h.RadioFilter,{field:e});case t.FilterChoiceValue.DATE_RANGE:return r.jsx(F.DateRangeFilter,{field:e});case t.FilterChoiceValue.NUMBER_RANGE:return r.jsx(u.NumberRangeFilter,{field:e});default:return r.jsxs("div",{children:[e.id,": Unknown filter type: ",e.filterType]},e.id)}})]})})});exports.FilterGroup=R;
|
package/dist/index35.js
CHANGED
|
@@ -6,8 +6,8 @@ import { MultipleFieldFilter as m } from "./index30.js";
|
|
|
6
6
|
import { NumberRangeFilter as f } from "./index31.js";
|
|
7
7
|
import { DateRangeFilter as u } from "./index29.js";
|
|
8
8
|
import { AsyncRadioFilter as F } from "./index27.js";
|
|
9
|
-
import { RadioFilter as
|
|
10
|
-
import { AsyncCheckboxFilter as
|
|
9
|
+
import { RadioFilter as T } from "./index32.js";
|
|
10
|
+
import { AsyncCheckboxFilter as y } from "./index26.js";
|
|
11
11
|
import { CheckboxFilter as h } from "./index28.js";
|
|
12
12
|
const M = p(({ data: o }) => {
|
|
13
13
|
const i = o.fields.filter(
|
|
@@ -15,14 +15,14 @@ const M = p(({ data: o }) => {
|
|
|
15
15
|
), n = o.fields.filter(
|
|
16
16
|
(r) => r.filterType !== t.TEXT && r.filterType !== t.NUMBER
|
|
17
17
|
);
|
|
18
|
-
return /* @__PURE__ */ e(s, { iconSlot: o.
|
|
18
|
+
return /* @__PURE__ */ e(s, { iconSlot: o.icon, label: o.label, children: /* @__PURE__ */ l(c, { children: [
|
|
19
19
|
i.length > 0 ? /* @__PURE__ */ e(m, { fields: i, groupId: o.id }) : null,
|
|
20
20
|
n.map((r) => {
|
|
21
21
|
switch (r.filterType) {
|
|
22
22
|
case t.CHECKBOX:
|
|
23
|
-
return r.fetchAsyncFilterOptions ? /* @__PURE__ */ e(
|
|
23
|
+
return r.fetchAsyncFilterOptions ? /* @__PURE__ */ e(y, { field: r }) : /* @__PURE__ */ e(h, { field: r });
|
|
24
24
|
case t.RADIO:
|
|
25
|
-
return r.fetchAsyncFilterOptions ? /* @__PURE__ */ e(F, { field: r }) : /* @__PURE__ */ e(
|
|
25
|
+
return r.fetchAsyncFilterOptions ? /* @__PURE__ */ e(F, { field: r }) : /* @__PURE__ */ e(T, { field: r });
|
|
26
26
|
case t.DATE_RANGE:
|
|
27
27
|
return /* @__PURE__ */ e(u, { field: r });
|
|
28
28
|
case t.NUMBER_RANGE:
|
package/dist/index36.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),l=require("@veeqo/ui"),U=require("mobx-react"),z=require("./index65.cjs"),G=require("./index62.cjs"),J=require("./index40.cjs"),K=require("./index43.cjs"),Q=require("./index56.cjs"),X=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),l=require("@veeqo/ui"),U=require("mobx-react"),z=require("./index65.cjs"),G=require("./index62.cjs"),J=require("./index40.cjs"),K=require("./index43.cjs"),Q=require("./index56.cjs"),X=require("./index103.cjs"),Z=require("./index8.cjs"),$=require("./index61.cjs"),b=require("./index104.cjs"),ee=U.observer(({view:e})=>{const{VIEW_TYPE:x,IS_VIEWS_READONLY:r,SEARCH_FILTER_ID:d}=Z.useBusinessLogic(),{Filters:{activeViewId:w,initFiltersFromView:f,discardChanges:m,initFromUrl:V,filters:L,setFilter:T},Views:{draftViewsMap:y},Notifications:{notify:E}}=$.useStores(),{viewsMap:h,defaultCustomViewId:F,isLoading:N}=G.useViews(),{isLoading:j}=z.useCustomViews({type:x}),{viewCounts:M,isLoadingViewCounts:R}=X.useViewCounts(e.id),[s,P]=c.useState(null),k=o=>{const q=L.get(d);if(h.has(o)){const n=h.get(o);n&&(f(n),m(!0),V())}else{const n=y.get(o);n?(f(n),m(!0),V()):E({type:"error",text:"Failed to load view"})}q&&T(d,q)},u=(e==null?void 0:e.id)===w,t=e.originalView!==void 0,g=e.originalView===void 0,A=M,a=(e==null?void 0:e.label)||"",I=N||j,p=c.useRef(!1);!I&&!p.current&&u&&e.id===F&&s&&(p.current=!0,s&&w===e.id&&window.requestAnimationFrame(()=>{var o;(o=s.parentElement)==null||o.scrollBy({behavior:"smooth",left:s.offsetLeft})}));const C=c.useMemo(()=>t?"draft":e.editable?"saved":"fixed",[t,e.editable]),{actions:{create:{handleSaveDraft:_},menu:{toggleDropdown:D},delete:{closeDeleteConfirmation:B,handleDelete:O,handleDeleteDraftView:v}},state:{shouldShowDeleteConfirmation:H},actions:W,state:S}=Q.useDropdownManager(e),Y=c.useMemo(()=>{if(!r){if(g)return D;if(t)return v}},[v,t,g,D,r]);return i.jsxs(i.Fragment,{children:[i.jsx(l.ViewTab,{customTextColour:e.customTextColour,colourPalette:e.colourPalette,className:"act-react-listing-custom-view",active:u,id:e==null?void 0:e.id,name:a,type:r?void 0:C,count:R?i.jsx(l.Loader,{type:"ThreeDots",width:12,height:12,color:u?"#fff":l.theme.colors.neutral.ink.dark}):A,onClick:k,subAction:Y,ariaContext:"orders",ref:P,"aria-controls":"options-dropdown","aria-expanded":S.shouldShowDropdown,"aria-haspopup":"dialog"},e==null?void 0:e.id),i.jsx(b.Confirmation,{shouldShow:H,viewName:a,onCancel:B,onDelete:O}),i.jsx(J.PillNotifications,{tabType:C,isActive:u,initialViewName:a,shouldShowCreateViewNotification:t,handleSaveDraft:_}),!r&&i.jsx(K.ViewDropdowns,{referenceElement:s,tab:e,...W,...S})]})});exports.ViewTab=ee;
|
package/dist/index36.js
CHANGED
|
@@ -7,10 +7,10 @@ import { useViews as Z } from "./index62.js";
|
|
|
7
7
|
import { PillNotifications as b } from "./index40.js";
|
|
8
8
|
import { ViewDropdowns as ee } from "./index43.js";
|
|
9
9
|
import { useDropdownManager as oe } from "./index56.js";
|
|
10
|
-
import { useViewCounts as ie } from "./
|
|
10
|
+
import { useViewCounts as ie } from "./index103.js";
|
|
11
11
|
import { useBusinessLogic as te } from "./index8.js";
|
|
12
12
|
import { useStores as re } from "./index61.js";
|
|
13
|
-
import { Confirmation as se } from "./
|
|
13
|
+
import { Confirmation as se } from "./index104.js";
|
|
14
14
|
const ve = Q(({ view: e }) => {
|
|
15
15
|
const { VIEW_TYPE: L, IS_VIEWS_READONLY: n, SEARCH_FILTER_ID: c } = te(), {
|
|
16
16
|
Filters: { activeViewId: d, initFiltersFromView: f, discardChanges: m, initFromUrl: u, filters: T, setFilter: x },
|
package/dist/index37.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"),r=require("./index57.cjs"),n=({hideActionsPopover:i})=>{const{duplicateView:s}=r.useDuplicateActiveView(),c=()=>{s(),i()};return t.jsx(e.Button,{style:{width:"100%"},iconSlot:t.jsx(e.AddIcon,{width:e.theme.sizes.sm,height:e.theme.sizes.sm,color:e.theme.colors.neutral.ink.base}),variant:"flat",onClick:c,children:"Create View"})};exports.CreateView=n;
|
package/dist/index37.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const {
|
|
6
|
-
|
|
7
|
-
t(), o();
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Button as s, AddIcon as c, theme as e } from "@veeqo/ui";
|
|
3
|
+
import { useDuplicateActiveView as n } from "./index57.js";
|
|
4
|
+
const d = ({ hideActionsPopover: i }) => {
|
|
5
|
+
const { duplicateView: o } = n(), r = () => {
|
|
6
|
+
o(), i();
|
|
8
7
|
};
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
|
|
8
|
+
return /* @__PURE__ */ t(
|
|
9
|
+
s,
|
|
11
10
|
{
|
|
12
11
|
style: { width: "100%" },
|
|
13
|
-
iconSlot: /* @__PURE__ */
|
|
12
|
+
iconSlot: /* @__PURE__ */ t(c, { width: e.sizes.sm, height: e.sizes.sm, color: e.colors.neutral.ink.base }),
|
|
14
13
|
variant: "flat",
|
|
15
|
-
onClick:
|
|
14
|
+
onClick: r,
|
|
16
15
|
children: "Create View"
|
|
17
16
|
}
|
|
18
17
|
);
|
|
19
18
|
};
|
|
20
19
|
export {
|
|
21
|
-
|
|
20
|
+
d as CreateView
|
|
22
21
|
};
|
package/dist/index39.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("./index102.cjs"),g=require("./index52.cjs"),j=require("./index51.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/index39.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 "./index102.js";
|
|
3
3
|
import { useModal as k } from "./index52.js";
|
|
4
4
|
import { ModalId as T } from "./index51.js";
|
|
5
5
|
const N = ({
|
package/dist/index40.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("./index62.cjs"),o=require("framer-motion"),m=require("./index61.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("./index62.cjs"),o=require("framer-motion"),m=require("./index61.cjs"),v=require("./index99.cjs"),f=require("./index42.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/index40.js
CHANGED
|
@@ -3,7 +3,7 @@ import { observer as h } from "mobx-react";
|
|
|
3
3
|
import { useViews as v } from "./index62.js";
|
|
4
4
|
import { AnimatePresence as n } from "framer-motion";
|
|
5
5
|
import { useStores as g } from "./index61.js";
|
|
6
|
-
import { DraftPill as w } from "./
|
|
6
|
+
import { DraftPill as w } from "./index99.js";
|
|
7
7
|
import { UnsavedChangesPill as C } from "./index42.js";
|
|
8
8
|
const U = h(
|
|
9
9
|
({
|
package/dist/index41.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),m=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),m=require("./index100.cjs"),g=require("./index65.cjs"),S=require("./index62.cjs"),b=require("./index4.cjs"),y=require("./index8.cjs"),V=require("./index61.cjs"),p=require("./index12.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/index41.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f, useEffect as l } from "react";
|
|
3
|
-
import { LegacySortableViews as w } from "./
|
|
3
|
+
import { LegacySortableViews as w } from "./index100.js";
|
|
4
4
|
import { useCustomViews as d } from "./index65.js";
|
|
5
5
|
import { useViews as g } from "./index62.js";
|
|
6
6
|
import { patchCurrentUser as _ } from "./index4.js";
|
package/dist/index42.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("@veeqo/ui"),c=require("mobx-react"),l=require("./index60.cjs"),n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("@veeqo/ui"),c=require("mobx-react"),l=require("./index60.cjs"),n=require("./index107.cjs"),d=i.theme.colors.secondary.blue.base,h=c.observer(({onDiscard:r,viewName:s,onSaveDraft:a})=>{const{saveChanges:o,isSubmitting:t}=l.usePersistUnsavedChanges();return e.jsx(n.Notification,{children:e.jsx(n.Container,{children:e.jsxs(i.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(i.AttentionIcon,{role:"img","aria-label":"attention",color:d}),e.jsxs(n.Wrap,{children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"You have unsaved changes to"}),s&&e.jsxs(n.Bold,{variant:"bodyBoldDark",children:["'",s,"'"]})]}),e.jsx(i.Button,{onClick:r,size:"sm",children:"Discard changes"}),e.jsxs(i.ActionMenu,{ctaProps:{children:"Save changes",variant:"primary"},children:[e.jsx(i.ActionMenu.Item,{onAction:a,isDisabled:t,children:e.jsx(n.Text,{variant:"body",children:"Create new view"})}),e.jsx(i.ActionMenu.Item,{onAction:o,isDisabled:t,children:e.jsxs(i.Stack,{direction:"horizontal",spacing:1,alignY:"center",children:[e.jsx(n.Text,{variant:"body",children:"Save changes to"}),e.jsx(n.Text,{variant:"bodyBold",children:s})]})})]})]})})})});exports.UnsavedChangesPill=h;
|
package/dist/index42.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { jsx as n, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
import { Stack as
|
|
3
|
-
import { observer as
|
|
2
|
+
import { Stack as a, AttentionIcon as d, theme as h, Button as m, ActionMenu as o } from "@veeqo/ui";
|
|
3
|
+
import { observer as g } from "mobx-react";
|
|
4
4
|
import { usePersistUnsavedChanges as v } from "./index60.js";
|
|
5
|
-
import { Notification as b, Container as
|
|
6
|
-
const C =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}) => {
|
|
11
|
-
const { saveChanges: l, isSubmitting: a } = v();
|
|
12
|
-
return /* @__PURE__ */ n(b, { children: /* @__PURE__ */ n(g, { children: /* @__PURE__ */ e(t, { direction: "horizontal", alignY: "center", children: [
|
|
13
|
-
/* @__PURE__ */ n(p, { ariaLabel: "attention", name: "attention", color: C }),
|
|
5
|
+
import { Notification as b, Container as p, Wrap as u, Text as i, Bold as y } from "./index107.js";
|
|
6
|
+
const C = h.colors.secondary.blue.base, S = g(({ onDiscard: c, viewName: r, onSaveDraft: l }) => {
|
|
7
|
+
const { saveChanges: s, isSubmitting: t } = v();
|
|
8
|
+
return /* @__PURE__ */ n(b, { children: /* @__PURE__ */ n(p, { children: /* @__PURE__ */ e(a, { direction: "horizontal", alignY: "center", children: [
|
|
9
|
+
/* @__PURE__ */ n(d, { role: "img", "aria-label": "attention", color: C }),
|
|
14
10
|
/* @__PURE__ */ e(u, { children: [
|
|
15
11
|
/* @__PURE__ */ n(i, { variant: "body", margin: "0 4px 0 0", children: "You have unsaved changes to" }),
|
|
16
12
|
r && /* @__PURE__ */ e(y, { variant: "bodyBoldDark", children: [
|
|
@@ -19,14 +15,7 @@ const C = d.colors.secondary.blue.base, k = m(({
|
|
|
19
15
|
"'"
|
|
20
16
|
] })
|
|
21
17
|
] }),
|
|
22
|
-
/* @__PURE__ */ n(
|
|
23
|
-
h,
|
|
24
|
-
{
|
|
25
|
-
onClick: c,
|
|
26
|
-
size: "sm",
|
|
27
|
-
children: "Discard changes"
|
|
28
|
-
}
|
|
29
|
-
),
|
|
18
|
+
/* @__PURE__ */ n(m, { onClick: c, size: "sm", children: "Discard changes" }),
|
|
30
19
|
/* @__PURE__ */ e(
|
|
31
20
|
o,
|
|
32
21
|
{
|
|
@@ -35,8 +24,8 @@ const C = d.colors.secondary.blue.base, k = m(({
|
|
|
35
24
|
variant: "primary"
|
|
36
25
|
},
|
|
37
26
|
children: [
|
|
38
|
-
/* @__PURE__ */ n(o.Item, { onAction:
|
|
39
|
-
/* @__PURE__ */ n(o.Item, { onAction:
|
|
27
|
+
/* @__PURE__ */ n(o.Item, { onAction: l, isDisabled: t, children: /* @__PURE__ */ n(i, { variant: "body", children: "Create new view" }) }),
|
|
28
|
+
/* @__PURE__ */ n(o.Item, { onAction: s, isDisabled: t, children: /* @__PURE__ */ e(a, { direction: "horizontal", spacing: 1, alignY: "center", children: [
|
|
40
29
|
/* @__PURE__ */ n(i, { variant: "body", children: "Save changes to" }),
|
|
41
30
|
/* @__PURE__ */ n(i, { variant: "bodyBold", children: r })
|
|
42
31
|
] }) })
|
|
@@ -46,5 +35,5 @@ const C = d.colors.secondary.blue.base, k = m(({
|
|
|
46
35
|
] }) }) });
|
|
47
36
|
});
|
|
48
37
|
export {
|
|
49
|
-
|
|
38
|
+
S as UnsavedChangesPill
|
|
50
39
|
};
|
package/dist/index44.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),m=require("mobx-react"),i=require("@veeqo/ui"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),m=require("mobx-react"),i=require("@veeqo/ui"),u=require("./index101.cjs"),q=require("./index41.cjs"),f=require("./index62.cjs"),p=require("./index63.cjs"),v=require("./index37.cjs"),c=require("./index36.cjs"),b=require("./index8.cjs"),C=require("./index61.cjs"),a=require("./index12.cjs"),L=m.observer(({className:l,appearance:d})=>{const{IS_VIEWS_READONLY:r}=b.useBusinessLogic(),{Views:{draftViewsList:w}}=C.useStores(),{viewsArray:x,fixedViews:V}=f.useViews(),[n,o]=t.useState(!1),[h,j]=t.useState(null),S=()=>o(!1);return p.useViewUrlChange(),e.jsxs(e.Fragment,{children:[e.jsxs(i.ViewsContainer,{onClickMenu:r?void 0:()=>o(!0),ariaMenuControls:r?void 0:"views-menu",ariaMenuExpanded:r?!1:n,ref:j,className:l,appearance:d,children:[x.map(s=>e.jsx(a.ErrorBoundary,{children:e.jsx(c.ViewTab,{view:s})},s.id)),w.map(s=>e.jsx(a.ErrorBoundary,{children:e.jsx(c.ViewTab,{view:s})},s.id))]}),!r&&n&&e.jsx(i.Popover,{id:"views-menu",anchorElement:h,placement:"bottom",onShouldClose:()=>o(!1),children:e.jsxs(i.Card.Surface,{children:[e.jsx(u.FixedViews,{children:V.map(s=>e.jsx(i.Text,{variant:"placeholder",children:s.label},s.id||s.label))}),e.jsx(q.SortableViews,{}),e.jsx(u.Divider,{}),e.jsx(v.CreateView,{hideActionsPopover:S})]})})]})});exports.ViewsList=L;
|