@veeqo/transfigure 0.0.12 → 0.0.13
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/index100.cjs +80 -1
- package/dist/index100.js +95 -64
- package/dist/index101.cjs +7 -1
- package/dist/index101.js +10 -30
- package/dist/index102.cjs +13 -7
- package/dist/index102.js +16 -9
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +44 -44
- package/dist/index36.cjs +1 -1
- package/dist/index36.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/index58.cjs +1 -1
- package/dist/index58.js +25 -26
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +10 -10
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +7 -7
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +1 -1
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +13 -29
- package/dist/index81.cjs +100 -15
- package/dist/index81.js +115 -19
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +67 -14
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +27 -20
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +2 -13
- package/dist/index85.cjs +1 -104
- package/dist/index85.js +40 -119
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +7 -67
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +29 -29
- package/dist/index88.cjs +19 -1
- package/dist/index88.js +24 -2
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +21 -40
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +15 -8
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +35 -62
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +62 -35
- package/dist/index96.cjs +1 -13
- package/dist/index96.js +19 -17
- package/dist/index97.cjs +1 -80
- package/dist/index97.js +8 -95
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +62 -17
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +29 -7
- package/package.json +1 -1
package/dist/index100.cjs
CHANGED
|
@@ -1 +1,80 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),t=require("@veeqo/ui"),a=require("@veeqo/components"),r=e=>e&&e.__esModule?e:{default:e},o=r(i),{Glyph:l}=a.VeeqoCommon,s=o.default(t.BaseContainer)`
|
|
2
|
+
display: flex;
|
|
3
|
+
position: fixed;
|
|
4
|
+
width: 100vw;
|
|
5
|
+
left: 0;
|
|
6
|
+
bottom: 24px;
|
|
7
|
+
z-index: 18;
|
|
8
|
+
|
|
9
|
+
&.notification-enter {
|
|
10
|
+
opacity: 0;
|
|
11
|
+
transform: translateY(-16px);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&.notification-enter-active {
|
|
15
|
+
opacity: 1;
|
|
16
|
+
transform: translateY(0);
|
|
17
|
+
transition: 350ms ease;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.notification-exit {
|
|
21
|
+
opacity: 0;
|
|
22
|
+
transform: translateY(16px);
|
|
23
|
+
transition: 350ms ease;
|
|
24
|
+
}
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
`;o.default(t.BaseContainer)`
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
align-items: center;
|
|
30
|
+
padding: 20px 24px 24px 24px;
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
margin: 0 auto;
|
|
33
|
+
background-color: #fff;
|
|
34
|
+
box-shadow: ${t.theme.shadows.lg};
|
|
35
|
+
pointer-events: all;
|
|
36
|
+
`;const d=o.default(t.Banner)`
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
flex-direction: row;
|
|
39
|
+
align-items: center;
|
|
40
|
+
margin: 0 auto;
|
|
41
|
+
background-color: #fff;
|
|
42
|
+
box-shadow: ${t.theme.shadows.lg};
|
|
43
|
+
pointer-events: all;
|
|
44
|
+
`,c=o.default(t.Button)`
|
|
45
|
+
margin-right: 16px;
|
|
46
|
+
`,f=o.default(t.Text)`
|
|
47
|
+
line-height: 20px;
|
|
48
|
+
`,n=o.default(t.Text)`
|
|
49
|
+
margin: ${e=>e.margin?e.margin:""};
|
|
50
|
+
color: ${e=>e.color};
|
|
51
|
+
`,p=o.default(t.Text)`
|
|
52
|
+
margin-right: 8px;
|
|
53
|
+
color: ${e=>e.color};
|
|
54
|
+
`,u=o.default(l)``,x=o.default(t.BaseContainer)`
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: row;
|
|
57
|
+
align-items: flex-end;
|
|
58
|
+
flex-grow: 2;
|
|
59
|
+
margin-left: 24px;
|
|
60
|
+
margin-right: 24px;
|
|
61
|
+
`;o.default(t.AnimatedDropdown)``;o.default.button`
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: row;
|
|
64
|
+
width: 100%;
|
|
65
|
+
padding: 12px 16px;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
|
|
68
|
+
& > ${n} {
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
user-select: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
background-color: ${t.theme.colors.neutral.grey.lightest};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:hover > ${n} {
|
|
78
|
+
color: ${t.theme.colors.secondary.blue.base};
|
|
79
|
+
}
|
|
80
|
+
`;exports.Bold=p;exports.Button=c;exports.Glyph=u;exports.Hint=f;exports.Notification=s;exports.Pill=d;exports.Text=n;exports.Wrap=x;
|
package/dist/index100.js
CHANGED
|
@@ -1,66 +1,97 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
1
|
+
import o from "styled-components";
|
|
2
|
+
import { BaseContainer as e, theme as n, Banner as a, Text as i, Button as l, AnimatedDropdown as s } from "@veeqo/ui";
|
|
3
|
+
import { VeeqoCommon as c } from "@veeqo/components";
|
|
4
|
+
const { Glyph: p } = c, m = o(e)`
|
|
5
|
+
display: flex;
|
|
6
|
+
position: fixed;
|
|
7
|
+
width: 100vw;
|
|
8
|
+
left: 0;
|
|
9
|
+
bottom: 24px;
|
|
10
|
+
z-index: 18;
|
|
11
|
+
|
|
12
|
+
&.notification-enter {
|
|
13
|
+
opacity: 0;
|
|
14
|
+
transform: translateY(-16px);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.notification-enter-active {
|
|
18
|
+
opacity: 1;
|
|
19
|
+
transform: translateY(0);
|
|
20
|
+
transition: 350ms ease;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.notification-exit {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
transform: translateY(16px);
|
|
26
|
+
transition: 350ms ease;
|
|
27
|
+
}
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
`;
|
|
30
|
+
o(e)`
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
flex-direction: row;
|
|
33
|
+
align-items: center;
|
|
34
|
+
padding: 20px 24px 24px 24px;
|
|
35
|
+
border-radius: 4px;
|
|
36
|
+
margin: 0 auto;
|
|
37
|
+
background-color: #fff;
|
|
38
|
+
box-shadow: ${n.shadows.lg};
|
|
39
|
+
pointer-events: all;
|
|
40
|
+
`;
|
|
41
|
+
const g = o(a)`
|
|
42
|
+
display: inline-flex;
|
|
43
|
+
flex-direction: row;
|
|
44
|
+
align-items: center;
|
|
45
|
+
margin: 0 auto;
|
|
46
|
+
background-color: #fff;
|
|
47
|
+
box-shadow: ${n.shadows.lg};
|
|
48
|
+
pointer-events: all;
|
|
49
|
+
`, h = o(l)`
|
|
50
|
+
margin-right: 16px;
|
|
51
|
+
`, w = o(i)`
|
|
52
|
+
line-height: 20px;
|
|
53
|
+
`, r = o(i)`
|
|
54
|
+
margin: ${(t) => t.margin ? t.margin : ""};
|
|
55
|
+
color: ${(t) => t.color};
|
|
56
|
+
`, u = o(i)`
|
|
57
|
+
margin-right: 8px;
|
|
58
|
+
color: ${(t) => t.color};
|
|
59
|
+
`, y = o(p)``, $ = o(e)`
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: row;
|
|
62
|
+
align-items: flex-end;
|
|
63
|
+
flex-grow: 2;
|
|
64
|
+
margin-left: 24px;
|
|
65
|
+
margin-right: 24px;
|
|
66
|
+
`;
|
|
67
|
+
o(s)``;
|
|
68
|
+
o.button`
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: row;
|
|
71
|
+
width: 100%;
|
|
72
|
+
padding: 12px 16px;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
|
|
75
|
+
& > ${r} {
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
user-select: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
background-color: ${n.colors.neutral.grey.lightest};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:hover > ${r} {
|
|
85
|
+
color: ${n.colors.secondary.blue.base};
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
64
88
|
export {
|
|
65
|
-
|
|
89
|
+
u as Bold,
|
|
90
|
+
h as Button,
|
|
91
|
+
y as Glyph,
|
|
92
|
+
w as Hint,
|
|
93
|
+
m as Notification,
|
|
94
|
+
g as Pill,
|
|
95
|
+
r as Text,
|
|
96
|
+
$ as Wrap
|
|
66
97
|
};
|
package/dist/index101.cjs
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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/index101.js
CHANGED
|
@@ -1,32 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
const h = (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
o
|
|
11
|
-
) : a(e);
|
|
12
|
-
let t = f(s, "id");
|
|
13
|
-
if (t != null) {
|
|
14
|
-
if (t in n) {
|
|
15
|
-
const l = n[t];
|
|
16
|
-
l.length > 0 && (t = ((r = C({
|
|
17
|
-
...e,
|
|
18
|
-
droppableContainers: e.droppableContainers.filter(
|
|
19
|
-
(c) => c.id !== t && l.includes(c.id)
|
|
20
|
-
)
|
|
21
|
-
})[0]) == null ? void 0 : r.id) ?? t);
|
|
22
|
-
}
|
|
23
|
-
return i.current = t, [{ id: t }];
|
|
24
|
-
}
|
|
25
|
-
return i.current ? [{ id: i.current }] : [];
|
|
26
|
-
},
|
|
27
|
-
[n]
|
|
28
|
-
) };
|
|
29
|
-
};
|
|
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
|
+
`;
|
|
30
10
|
export {
|
|
31
|
-
h as
|
|
11
|
+
h as AdaptiveStyledContainer
|
|
32
12
|
};
|
package/dist/index102.cjs
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@veeqo/components"),o=require("@veeqo/ui"),s=require("styled-components"),l=e=>e&&e.__esModule?e:{default:e},r=l(s),{SortableViews:i}=t.VeeqoUI,n=r.default(i)`
|
|
2
|
+
.rst__rowTitle {
|
|
3
|
+
span {
|
|
4
|
+
white-space: nowrap;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
text-overflow: ellipsis;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.rst__rowTitle > div:first-child {
|
|
11
|
+
gap: ${o.theme.sizes.sm};
|
|
12
|
+
}
|
|
13
|
+
`;exports.StyledSortableViews=n;
|
package/dist/index102.js
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { theme as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { VeeqoUI as e } from "@veeqo/components";
|
|
2
|
+
import { theme as o } from "@veeqo/ui";
|
|
3
|
+
import t from "styled-components";
|
|
4
|
+
const { SortableViews: r } = e, p = t(r)`
|
|
5
|
+
.rst__rowTitle {
|
|
6
|
+
span {
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
text-overflow: ellipsis;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.rst__rowTitle > div:first-child {
|
|
14
|
+
gap: ${o.sizes.sm};
|
|
15
|
+
}
|
|
9
16
|
`;
|
|
10
17
|
export {
|
|
11
|
-
|
|
18
|
+
p as StyledSortableViews
|
|
12
19
|
};
|
package/dist/index20.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("react"),b=require("mobx-react"),r=require("@veeqo/ui"),F=require("./index63.cjs"),R=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("react"),b=require("mobx-react"),r=require("@veeqo/ui"),F=require("./index63.cjs"),R=require("./index95.cjs"),h=require("./index57.cjs"),x=b.observer(({filterData:i})=>{const{Filters:{numberRangeFilters:o,clearNumberRangeFilter:u,setNumberRangeFilter:d}}=h.useStores(),e=o.get(i.id),[s,a]=l.useState(e),c=l.useCallback(()=>{const n=new F.NumberRangeFilter({filterId:i.id});return e&&(e.gte&&n.setGte(e.gte),e.lte&&n.setLte(e.lte)),n},[i.id,e]);l.useEffect(()=>{const n=c();a(n)},[c,e]);const g=()=>{u(i.id)},m=()=>{!e||!s||d({numberRange:e,lte:s.lte,gte:s.gte})};return t.jsx(r.FilterTag,{shouldCloseOnClickAway:!0,header:t.jsx("div",{children:"Edit filter (style and semant me pls)"}),label:i.label,text:(e==null?void 0:e.filterLabel)||"Loading...",content:t.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.md},children:t.jsx(R.FilterNumberRangeFilter,{data:i,editedValue:s,setEditedValue:a})}),footer:t.jsx(r.BaseContainer,{style:{padding:r.theme.sizes.sm,width:"200px"},children:t.jsxs(r.Stack,{direction:"horizontal",alignX:"end",children:[t.jsx(r.Button,{variant:"default",size:"sm",onClick:g,children:"Clear"}),t.jsx(r.Button,{variant:"primary",size:"sm",onClick:m,children:"Apply"})]})})})});exports.ActiveFilterNumberRangeTag=x;
|
package/dist/index20.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useState as b, useCallback as f, useEffect as h } from "react";
|
|
|
3
3
|
import { observer as R } from "mobx-react";
|
|
4
4
|
import { FilterTag as v, BaseContainer as o, theme as a, Stack as y, Button as d } from "@veeqo/ui";
|
|
5
5
|
import { NumberRangeFilter as C } from "./index63.js";
|
|
6
|
-
import { FilterNumberRangeFilter as N } from "./
|
|
6
|
+
import { FilterNumberRangeFilter as N } from "./index95.js";
|
|
7
7
|
import { useStores as w } from "./index57.js";
|
|
8
8
|
const j = R(
|
|
9
9
|
({ filterData: r }) => {
|
package/dist/index28.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("./index94.cjs"),R=require("./index63.cjs"),p=require("./index7.cjs"),y=require("./index57.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),[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/index28.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 "./index94.js";
|
|
7
7
|
import { NumberRangeFilter as h } from "./index63.js";
|
|
8
8
|
import { useBusinessLogic as B } from "./index7.js";
|
|
9
9
|
import { useStores as T } from "./index57.js";
|
package/dist/index33.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),u=require("@veeqo/ui"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),u=require("@veeqo/ui"),W=require("mobx-react"),Y=require("./index60.cjs"),$=require("./index58.cjs"),z=require("./index37.cjs"),G=require("./index40.cjs"),J=require("./index52.cjs"),K=require("./index7.cjs"),Q=require("./index57.cjs"),X=require("./index87.cjs"),Z=W.observer(({view:e,viewTabSlotValueMap:l,isLoadingTableData:y})=>{const{VIEW_TYPE:L,SEARCH_FILTER_ID:a}=K.useBusinessLogic(),{Filters:{activeViewId:f,initFiltersFromView:w,discardChanges:m,initFromUrl:h,filters:F,setFilter:S},Views:{draftViewsMap:j},Notifications:{notify:N}}=Q.useStores(),{viewsMap:g,defaultCustomViewId:E,isLoading:R}=$.useViews(),{isLoading:T}=Y.useCustomViews({type:L}),[s,P]=c.useState(null),k=o=>{const x=F.get(a);if(g.has(o)){const r=g.get(o);r&&(w(r),m(!0),h())}else{const r=j.get(o);r?(w(r),m(!0),h()):N({type:"error",text:"Failed to load view"})}x&&S(a,x)},n=(e==null?void 0:e.id)===f,t=e.originalView!==void 0,V=e.originalView===void 0,A=(l==null?void 0:l.get(`${e==null?void 0:e.id}`))||void 0,d=(e==null?void 0:e.label)||"",B=R||T,D=c.useRef(!1);!B&&!D.current&&n&&e.id===E&&s&&(D.current=!0,s&&f===e.id&&window.requestAnimationFrame(()=>{var o;(o=s.parentElement)==null||o.scrollBy({behavior:"smooth",left:s.offsetLeft})}));const p=c.useMemo(()=>t?"draft":e.editable?"saved":"fixed",[t,e.editable]),{actions:{create:{handleSaveDraft:I},menu:{toggleDropdown:C},delete:{closeDeleteConfirmation:M,handleDelete:_,handleDeleteDraftView:q}},state:{shouldShowDeleteConfirmation:O},actions:H,state:v}=J.useDropdownManager(e),U=c.useMemo(()=>{if(V)return C;if(t)return q},[q,t,V,C]);return i.jsxs(i.Fragment,{children:[i.jsx(u.ViewTab,{colourPalette:u.theme.colors.secondary.blue,className:"act-react-listing-custom-view",active:n,id:e==null?void 0:e.id,name:d,type:p,count:y?i.jsx(u.Loader,{type:"ThreeDots",width:12,height:12,color:n?"#fff":u.theme.colors.neutral.ink.dark}):A,onClick:k,subAction:U,ariaContext:"orders",ref:P,"aria-controls":"options-dropdown","aria-expanded":v.shouldShowDropdown,"aria-haspopup":"dialog"},e==null?void 0:e.id),i.jsx(X.Confirmation,{shouldShow:O,viewName:d,onCancel:M,onDelete:_}),i.jsx(z.PillNotifications,{tabType:p,isActive:n,initialViewName:d,shouldShowCreateViewNotification:t,handleSaveDraft:I}),i.jsx(G.ViewDropdowns,{referenceElement:s,tab:e,...H,...v})]})});exports.ViewTab=Z;
|
package/dist/index33.js
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ViewTab as
|
|
4
|
-
import { observer as
|
|
5
|
-
import { useCustomViews as
|
|
6
|
-
import { useViews as
|
|
7
|
-
import { PillNotifications as
|
|
8
|
-
import { ViewDropdowns as
|
|
9
|
-
import { useDropdownManager as
|
|
1
|
+
import { jsxs as W, Fragment as Y, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as z, useRef as G, useMemo as F } from "react";
|
|
3
|
+
import { ViewTab as J, theme as L, Loader as K } from "@veeqo/ui";
|
|
4
|
+
import { observer as M } from "mobx-react";
|
|
5
|
+
import { useCustomViews as Q } from "./index60.js";
|
|
6
|
+
import { useViews as X } from "./index58.js";
|
|
7
|
+
import { PillNotifications as Z } from "./index37.js";
|
|
8
|
+
import { ViewDropdowns as b } from "./index40.js";
|
|
9
|
+
import { useDropdownManager as ee } from "./index52.js";
|
|
10
10
|
import { useBusinessLogic as oe } from "./index7.js";
|
|
11
|
-
import { useStores as
|
|
12
|
-
import { Confirmation as
|
|
13
|
-
const
|
|
11
|
+
import { useStores as ie } from "./index57.js";
|
|
12
|
+
import { Confirmation as re } from "./index87.js";
|
|
13
|
+
const he = M(({ view: e, viewTabSlotValueMap: c, isLoadingTableData: y }) => {
|
|
14
14
|
const { VIEW_TYPE: x, SEARCH_FILTER_ID: d } = oe(), {
|
|
15
15
|
Filters: { activeViewId: a, initFiltersFromView: f, discardChanges: m, initFromUrl: u, filters: E, setFilter: N },
|
|
16
16
|
Views: { draftViewsMap: S },
|
|
17
17
|
Notifications: { notify: T }
|
|
18
|
-
} =
|
|
18
|
+
} = ie(), { viewsMap: w, defaultCustomViewId: k, isLoading: A } = X(), { isLoading: R } = Q({ type: x }), [i, I] = z(null), P = (o) => {
|
|
19
19
|
const v = E.get(d);
|
|
20
|
-
if (w.has(
|
|
21
|
-
const t = w.get(
|
|
20
|
+
if (w.has(o)) {
|
|
21
|
+
const t = w.get(o);
|
|
22
22
|
t && (f(t), m(!0), u());
|
|
23
23
|
} else {
|
|
24
|
-
const t = S.get(
|
|
24
|
+
const t = S.get(o);
|
|
25
25
|
t ? (f(t), m(!0), u()) : T({
|
|
26
26
|
type: "error",
|
|
27
27
|
text: "Failed to load view"
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
v && N(d, v);
|
|
31
|
-
}, n = (e == null ? void 0 : e.id) === a, r = e.originalView !== void 0, p = e.originalView === void 0,
|
|
32
|
-
!
|
|
33
|
-
var
|
|
34
|
-
(
|
|
31
|
+
}, n = (e == null ? void 0 : e.id) === a, r = e.originalView !== void 0, p = e.originalView === void 0, _ = (c == null ? void 0 : c.get(`${e == null ? void 0 : e.id}`)) || void 0, l = (e == null ? void 0 : e.label) || "", j = A || R, h = G(!1);
|
|
32
|
+
!j && !h.current && n && e.id === k && i && (h.current = !0, i && a === e.id && window.requestAnimationFrame(() => {
|
|
33
|
+
var o;
|
|
34
|
+
(o = i.parentElement) == null || o.scrollBy({
|
|
35
35
|
behavior: "smooth",
|
|
36
|
-
left:
|
|
36
|
+
left: i.offsetLeft
|
|
37
37
|
});
|
|
38
38
|
}));
|
|
39
39
|
const g = F(() => r ? "draft" : e.editable ? "saved" : "fixed", [r, e.editable]), {
|
|
40
40
|
actions: {
|
|
41
|
-
create: { handleSaveDraft:
|
|
41
|
+
create: { handleSaveDraft: B },
|
|
42
42
|
menu: { toggleDropdown: V },
|
|
43
|
-
delete: { closeDeleteConfirmation:
|
|
43
|
+
delete: { closeDeleteConfirmation: $, handleDelete: q, handleDeleteDraftView: D }
|
|
44
44
|
},
|
|
45
|
-
state: { shouldShowDeleteConfirmation:
|
|
46
|
-
actions:
|
|
45
|
+
state: { shouldShowDeleteConfirmation: H },
|
|
46
|
+
actions: O,
|
|
47
47
|
state: C
|
|
48
|
-
} =
|
|
48
|
+
} = ee(e), U = F(() => {
|
|
49
49
|
if (p) return V;
|
|
50
50
|
if (r) return D;
|
|
51
51
|
}, [D, r, p, V]);
|
|
52
|
-
return /* @__PURE__ */ Y
|
|
52
|
+
return /* @__PURE__ */ W(Y, { children: [
|
|
53
53
|
/* @__PURE__ */ s(
|
|
54
|
-
|
|
54
|
+
J,
|
|
55
55
|
{
|
|
56
56
|
colourPalette: L.colors.secondary.blue,
|
|
57
57
|
className: "act-react-listing-custom-view",
|
|
58
58
|
active: n,
|
|
59
59
|
id: e == null ? void 0 : e.id,
|
|
60
|
-
name:
|
|
60
|
+
name: l,
|
|
61
61
|
type: g,
|
|
62
62
|
count: y ? /* @__PURE__ */ s(
|
|
63
|
-
|
|
63
|
+
K,
|
|
64
64
|
{
|
|
65
65
|
type: "ThreeDots",
|
|
66
66
|
width: 12,
|
|
67
67
|
height: 12,
|
|
68
68
|
color: n ? "#fff" : L.colors.neutral.ink.dark
|
|
69
69
|
}
|
|
70
|
-
) :
|
|
71
|
-
onClick:
|
|
72
|
-
subAction:
|
|
70
|
+
) : _,
|
|
71
|
+
onClick: P,
|
|
72
|
+
subAction: U,
|
|
73
73
|
ariaContext: "orders",
|
|
74
|
-
ref:
|
|
74
|
+
ref: I,
|
|
75
75
|
"aria-controls": "options-dropdown",
|
|
76
76
|
"aria-expanded": C.shouldShowDropdown,
|
|
77
77
|
"aria-haspopup": "dialog"
|
|
@@ -79,27 +79,27 @@ const ge = Q(({ view: e, viewTabSlotValueMap: l, isLoadingTableData: y }) => {
|
|
|
79
79
|
e == null ? void 0 : e.id
|
|
80
80
|
),
|
|
81
81
|
/* @__PURE__ */ s(
|
|
82
|
-
|
|
82
|
+
re,
|
|
83
83
|
{
|
|
84
|
-
shouldShow:
|
|
85
|
-
viewName:
|
|
86
|
-
onCancel:
|
|
87
|
-
onDelete:
|
|
84
|
+
shouldShow: H,
|
|
85
|
+
viewName: l,
|
|
86
|
+
onCancel: $,
|
|
87
|
+
onDelete: q
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
90
|
/* @__PURE__ */ s(
|
|
91
|
-
|
|
91
|
+
Z,
|
|
92
92
|
{
|
|
93
93
|
tabType: g,
|
|
94
94
|
isActive: n,
|
|
95
|
-
initialViewName:
|
|
95
|
+
initialViewName: l,
|
|
96
96
|
shouldShowCreateViewNotification: r,
|
|
97
|
-
handleSaveDraft:
|
|
97
|
+
handleSaveDraft: B
|
|
98
98
|
}
|
|
99
99
|
),
|
|
100
|
-
/* @__PURE__ */ s(
|
|
100
|
+
/* @__PURE__ */ s(b, { referenceElement: i, tab: e, ...O, ...C })
|
|
101
101
|
] });
|
|
102
102
|
});
|
|
103
103
|
export {
|
|
104
|
-
|
|
104
|
+
he as ViewTab
|
|
105
105
|
};
|
package/dist/index36.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("./index88.cjs"),g=require("./index48.cjs"),j=require("./index47.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/index36.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 "./index88.js";
|
|
3
3
|
import { useModal as k } from "./index48.js";
|
|
4
4
|
import { ModalId as T } from "./index47.js";
|
|
5
5
|
const N = ({
|
package/dist/index37.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react-transition-group"),f=require("mobx-react"),x=require("./index58.cjs"),v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react-transition-group"),f=require("mobx-react"),x=require("./index58.cjs"),v=require("./index89.cjs"),g=require("./index39.cjs"),h=require("./index57.cjs"),S=f.observer(({tabType:i,isActive:n,shouldShowCreateViewNotification:c,handleSaveDraft:s})=>{var r;const{Filters:{hasUnsavedChanges:l,discardChanges:u,activeViewId:t}}=h.useStores(),d=window.location.pathname==="/orders"?"orders":"variants",{viewsMap:m}=x.useViews(),o=t&&((r=m.get(t))==null?void 0:r.label)||"failure";return e.jsxs(e.Fragment,{children:[e.jsx(a.CSSTransition,{in:i==="draft"&&n&&c,timeout:200,classNames:"notification",unmountOnExit:!0,children:e.jsx(v.InfoPill,{onClick:s,mainEntityLabelPlural:d})}),i!=="fixed"&&o&&e.jsx(a.CSSTransition,{in:l&&n&&i==="saved",timeout:200,classNames:"notification",unmountOnExit:!0,children:e.jsx(g.UnsavedChangesPill,{viewName:o,onDiscard:()=>u(),onSaveDraft:s})})]})});exports.PillNotifications=S;
|
package/dist/index37.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as u, Fragment as p, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { CSSTransition as a } from "react-transition-group";
|
|
3
3
|
import { observer as h } from "mobx-react";
|
|
4
4
|
import { useViews as v } from "./index58.js";
|
|
5
|
-
import { InfoPill as w } from "./
|
|
5
|
+
import { InfoPill as w } from "./index89.js";
|
|
6
6
|
import { UnsavedChangesPill as x } from "./index39.js";
|
|
7
7
|
import { useStores as g } from "./index57.js";
|
|
8
8
|
const F = h(
|
package/dist/index38.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react"),m=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react"),m=require("./index90.cjs"),g=require("./index60.cjs"),S=require("./index58.cjs"),b=require("./index3.cjs"),y=require("./index7.cjs"),V=require("./index57.cjs"),p=require("./index10.cjs"),q=()=>{const{VIEW_TYPE:n}=y.useBusinessLogic(),{sortedCustomViews:s,isLoading:u}=S.useViews(),{mutate:a}=g.useCustomViews({type:n}),[c,t]=d.useState(s),{Notifications:{notify:l}}=V.useStores(),w=async o=>{t(o);const r=o.map(e=>e.id);try{await b.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:r}}}),await a(e=>({...e,settings:{...e.settings,custom_view_positions:{...e.settings.custom_view_positions,order:r}}}),{revalidate:!1})}catch{t(s),l({type:"error",text:"Failed to update order of views"})}};return u||!s.length?null:i.jsx(p.ErrorBoundary,{children:i.jsx(m.LegacySortableViews,{views:c,onChange:w,className:"act-sortable-views"})})};exports.SortableViews=q;
|
package/dist/index38.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f } from "react";
|
|
3
|
-
import { LegacySortableViews as l } from "./
|
|
3
|
+
import { LegacySortableViews as l } from "./index90.js";
|
|
4
4
|
import { useCustomViews as w } from "./index60.js";
|
|
5
5
|
import { useViews as d } from "./index58.js";
|
|
6
6
|
import { patchCurrentUser as g } from "./index3.js";
|
package/dist/index58.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 v=require("swr"),c=require("react"),x=require("./index72.cjs"),E=require("./index71.cjs"),O=require("./index60.cjs"),S=require("./index45.cjs"),y=require("./index7.cjs"),C=require("./index51.cjs"),I=e=>e&&e.__esModule?e:{default:e},b=I(v),i=x.createAllView(),P=()=>{const{DEFAULT_PAGE_NUMBER:e,DEFAULT_PAGE_SIZE:m,VIEW_TYPE:w}=y.useBusinessLogic(),{canUpdateCustomViews:V,orderedListOfCustomViews:u,defaultCustomViewId:p,isLoading:_}=O.useCustomViews({type:w}),{data:n,isLoading:M,error:A,mutate:g}=b.default(`/api/v2/custom_views?filter[type]=${w}&page[number]=${e}&page[size]=${m}`,C.fetcherV2,S.SWR_HOOK_OPTIONS),f=c.useMemo(()=>({fixedViews:[i],customViews:[],viewsMap:new Map([[i.id,i]])}),[]),{viewsMap:L,customViews:o,fixedViews:l}=c.useMemo(()=>n?n.reduce((s,r)=>{const t=E.viewsAdapter({view:r,canUpdateCustomViews:V});return s.viewsMap.set(r.id,t),r.editable?s.customViews.push(t):s.fixedViews.push(t),s},{fixedViews:[i],customViews:[],viewsMap:new Map([[i.id,i]])}):f,[n,f,V]),q=c.useMemo(()=>o.sort((s,r)=>{const t=Array.isArray(u)?u:[],a=t.indexOf(s.id),d=t.indexOf(r.id);return a===-1&&d===-1?0:a===-1?1:d===-1?-1:a-d}),[o,u]);return{defaultCustomViewId:p,viewsArray:[...l,...o],fixedViews:l,customViews:o,sortedCustomViews:q,viewsMap:L,isLoading:M||_,error:A,mutate:g}};exports.useViews=P;
|