@veeqo/transfigure 0.0.12 → 0.0.14
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/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index28.cjs +1 -1
- package/dist/index28.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 +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/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +6 -5
- 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 +28 -23
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +22 -29
- package/dist/index81.cjs +75 -14
- package/dist/index81.js +91 -20
- package/dist/index83.cjs +12 -1
- package/dist/index83.js +16 -22
- package/dist/index84.cjs +19 -1
- package/dist/index84.js +24 -13
- package/dist/index85.cjs +1 -104
- package/dist/index85.js +23 -119
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +13 -68
- package/dist/index87.cjs +104 -1
- package/dist/index87.js +119 -28
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +68 -2
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +27 -39
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +2 -8
- package/dist/index91.cjs +1 -80
- package/dist/index91.js +41 -95
- package/dist/index92.cjs +1 -12
- package/dist/index92.js +8 -16
- package/dist/index94.cjs +80 -1
- package/dist/index94.js +94 -62
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +62 -35
- package/dist/index97.cjs +1 -80
- package/dist/index97.js +35 -94
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +1 -1
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +1 -1
- package/package.json +1 -1
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("./index97.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 "./index97.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/index31.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("./index85.cjs"),c=require("./index32.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/index31.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 "./index85.js";
|
|
6
6
|
import { FilterGroup as n } from "./index32.js";
|
|
7
7
|
const u = e(() => {
|
|
8
8
|
const { GROUP_MAP: t } = s();
|
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("./index79.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 "./index79.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("./index84.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 "./index84.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("./index80.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 "./index80.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/index39.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"),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"),n=require("./index81.cjs"),u=require("./index56.cjs"),g=s.theme.colors.secondary.blue.base,v=h.observer(({onDiscard:i,viewName:t,onSaveDraft:c})=>{const{saveChanges:o,isSubmitting:r}=u.usePersistUnsavedChanges(),[d,a]=l.useState(!1);return e.jsx(n.Notification,{children:e.jsx(n.Container,{className:"act-react-listing-custom-notification-unsaved-changes",children:e.jsxs(s.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(n.Glyph,{name:"attention",color:g}),e.jsxs(n.Wrap,{children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"You have unsaved changes to"}),e.jsx(n.Bold,{variant:"bodyBoldDark",children:`'${t}'`})]}),e.jsx(n.Button,{className:"act-react-listing-custom-notification-unsaved-changes-discard",onClick:i,size:"sm",children:"Discard changes"}),e.jsxs(s.AnimatedDropdown,{reversed:!0,shouldShowDropdown:d,onClickAway:()=>a(!1),cta:e.jsx(n.Button,{className:"act-react-listing-custom-notification-unsaved-changes-toggle-dropdown",variant:"primary",onClick:()=>a(!0),size:"sm",dropdown:!0,children:"Save changes"}),children:[e.jsx(n.Item,{onClick:c,className:"act-react-listing-custom-notification-unsaved-changes-create-new-view",children:e.jsx(n.Text,{variant:"body",children:"Create new view"})}),e.jsxs(n.Item,{onClick:o,disabled:r,className:"act-react-listing-custom-notification-unsaved-changes-save-to-existing-view",children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"Save changes to"}),e.jsx(n.Text,{variant:"bodyBoldDark",children:t})]})]})]})})})});exports.UnsavedChangesPill=v;
|
package/dist/index39.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as m } from "react";
|
|
3
3
|
import { Stack as g, theme as u, AnimatedDropdown as v } from "@veeqo/ui";
|
|
4
4
|
import { observer as p } from "mobx-react";
|
|
5
|
-
import { Notification as f, Container as w, Glyph as C, Wrap as b, Text as a, Bold as y, Button as o, Item as r } from "./
|
|
5
|
+
import { Notification as f, Container as w, Glyph as C, Wrap as b, Text as a, Bold as y, Button as o, Item as r } from "./index81.js";
|
|
6
6
|
import { usePersistUnsavedChanges as k } from "./index56.js";
|
|
7
7
|
const S = u.colors.secondary.blue.base, A = p(
|
|
8
8
|
({
|
package/dist/index41.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),m=require("mobx-react"),s=require("@veeqo/ui"),c=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),m=require("mobx-react"),s=require("@veeqo/ui"),c=require("./index83.cjs"),q=require("./index38.cjs"),S=require("./index58.cjs"),f=require("./index59.cjs"),p=require("./index34.cjs"),l=require("./index33.cjs"),C=require("./index57.cjs"),a=require("./index10.cjs"),b=m.observer(({viewTabSlotValueMap:n,isLoadingTableData:o})=>{const{Views:{draftViewsList:d}}=C.useStores(),{viewsArray:w,fixedViews:x}=S.useViews(),[t,i]=u.useState(!1),[h,V]=u.useState(null),j=()=>i(!1);return f.useViewUrlChange(),e.jsxs(e.Fragment,{children:[e.jsxs(s.ViewsContainer,{onClickMenu:()=>i(!0),ariaMenuControls:"views-menu",ariaMenuExpanded:t,ref:V,children:[w.map(r=>e.jsx(a.ErrorBoundary,{children:e.jsx(l.ViewTab,{view:r,viewTabSlotValueMap:n,isLoadingTableData:o})},r.id)),d.map(r=>e.jsx(a.ErrorBoundary,{children:e.jsx(l.ViewTab,{view:r,viewTabSlotValueMap:n,isLoadingTableData:o})},r.id))]}),t&&e.jsx(s.Popover,{id:"views-menu",anchorElement:h,placement:"bottom",onShouldClose:()=>i(!1),children:e.jsxs(s.Card.Surface,{children:[e.jsx(c.FixedViews,{children:x.map(r=>e.jsx(s.Text,{variant:"placeholder",children:r.label},r.id||r.label))}),e.jsx(q.SortableViews,{}),e.jsx(c.Divider,{}),e.jsx(p.CreateView,{hideActionsPopover:j})]})})]})});exports.ViewList=b;
|
package/dist/index41.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as i, Fragment as w, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as m } from "react";
|
|
3
3
|
import { observer as V } from "mobx-react";
|
|
4
4
|
import { ViewsContainer as v, Popover as x, Card as C, Text as S } from "@veeqo/ui";
|
|
5
|
-
import { FixedViews as A, Divider as E } from "./
|
|
5
|
+
import { FixedViews as A, Divider as E } from "./index83.js";
|
|
6
6
|
import { SortableViews as L } from "./index38.js";
|
|
7
7
|
import { useViews as M } from "./index58.js";
|
|
8
8
|
import { useViewUrlChange as b } from "./index59.js";
|
package/dist/index45.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var O=(e=>(e.TEXT="text",e.NUMBER="number",e.CHECKBOX="checkbox",e.RADIO="radio",e.DATE_RANGE="date_range",e.NUMBER_RANGE="number_range",e))(O||{});const n={revalidateOnFocus:!1,revalidateOnReconnect:!1,keepPreviousData:!0};exports.FilterChoiceValue=O;exports.SWR_HOOK_OPTIONS=n;
|
package/dist/index45.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
const
|
|
1
|
+
var a = /* @__PURE__ */ ((n) => (n.TEXT = "text", n.NUMBER = "number", n.CHECKBOX = "checkbox", n.RADIO = "radio", n.DATE_RANGE = "date_range", n.NUMBER_RANGE = "number_range", n))(a || {});
|
|
2
|
+
const r = {
|
|
3
3
|
revalidateOnFocus: !1,
|
|
4
|
-
revalidateOnReconnect: !1
|
|
4
|
+
revalidateOnReconnect: !1,
|
|
5
|
+
keepPreviousData: !0
|
|
5
6
|
};
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
a as FilterChoiceValue,
|
|
9
|
+
r as SWR_HOOK_OPTIONS
|
|
9
10
|
};
|
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;
|
package/dist/index58.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import g from "swr";
|
|
2
2
|
import { useMemo as d } from "react";
|
|
3
|
-
import { createAllView as
|
|
4
|
-
import { viewsAdapter as
|
|
5
|
-
import { useCustomViews as
|
|
6
|
-
import { SWR_HOOK_OPTIONS as
|
|
7
|
-
import { useBusinessLogic as
|
|
8
|
-
import { fetcherV2 as
|
|
9
|
-
const s =
|
|
10
|
-
const { DEFAULT_PAGE_NUMBER: V, DEFAULT_PAGE_SIZE: c, VIEW_TYPE:
|
|
3
|
+
import { createAllView as O } from "./index72.js";
|
|
4
|
+
import { viewsAdapter as v } from "./index71.js";
|
|
5
|
+
import { useCustomViews as C } from "./index60.js";
|
|
6
|
+
import { SWR_HOOK_OPTIONS as I } from "./index45.js";
|
|
7
|
+
import { useBusinessLogic as y } from "./index7.js";
|
|
8
|
+
import { fetcherV2 as S } from "./index51.js";
|
|
9
|
+
const s = O(), B = () => {
|
|
10
|
+
const { DEFAULT_PAGE_NUMBER: V, DEFAULT_PAGE_SIZE: c, VIEW_TYPE: a } = y(), {
|
|
11
11
|
canUpdateCustomViews: w,
|
|
12
12
|
orderedListOfCustomViews: o,
|
|
13
13
|
defaultCustomViewId: l,
|
|
14
|
-
isLoading:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
S
|
|
14
|
+
isLoading: x
|
|
15
|
+
} = C({ type: a }), { data: n, isLoading: A, error: L, mutate: E } = g(
|
|
16
|
+
`/api/v2/custom_views?filter[type]=${a}&page[number]=${V}&page[size]=${c}`,
|
|
17
|
+
S,
|
|
18
|
+
I
|
|
20
19
|
), f = d(
|
|
21
20
|
() => ({
|
|
22
21
|
fixedViews: [s],
|
|
@@ -24,9 +23,9 @@ const s = v(), F = () => {
|
|
|
24
23
|
viewsMap: /* @__PURE__ */ new Map([[s.id, s]])
|
|
25
24
|
}),
|
|
26
25
|
[]
|
|
27
|
-
), { viewsMap:
|
|
26
|
+
), { viewsMap: M, customViews: r, fixedViews: p } = d(() => n ? n.reduce(
|
|
28
27
|
(e, t) => {
|
|
29
|
-
const i =
|
|
28
|
+
const i = v({ view: t, canUpdateCustomViews: w });
|
|
30
29
|
return e.viewsMap.set(t.id, i), t.editable ? e.customViews.push(i) : e.fixedViews.push(i), e;
|
|
31
30
|
},
|
|
32
31
|
{
|
|
@@ -34,22 +33,22 @@ const s = v(), F = () => {
|
|
|
34
33
|
customViews: [],
|
|
35
34
|
viewsMap: /* @__PURE__ */ new Map([[s.id, s]])
|
|
36
35
|
}
|
|
37
|
-
) : f, [n, f, w]),
|
|
38
|
-
const i = Array.isArray(o) ? o : [],
|
|
39
|
-
return
|
|
36
|
+
) : f, [n, f, w]), _ = d(() => r.sort((e, t) => {
|
|
37
|
+
const i = Array.isArray(o) ? o : [], u = i.indexOf(e.id), m = i.indexOf(t.id);
|
|
38
|
+
return u === -1 && m === -1 ? 0 : u === -1 ? 1 : m === -1 ? -1 : u - m;
|
|
40
39
|
}), [r, o]);
|
|
41
40
|
return {
|
|
42
41
|
defaultCustomViewId: l,
|
|
43
42
|
viewsArray: [...p, ...r],
|
|
44
43
|
fixedViews: p,
|
|
45
44
|
customViews: r,
|
|
46
|
-
sortedCustomViews:
|
|
47
|
-
viewsMap:
|
|
48
|
-
isLoading: A ||
|
|
49
|
-
error:
|
|
50
|
-
mutate:
|
|
45
|
+
sortedCustomViews: _,
|
|
46
|
+
viewsMap: M,
|
|
47
|
+
isLoading: A || x,
|
|
48
|
+
error: L,
|
|
49
|
+
mutate: E
|
|
51
50
|
};
|
|
52
51
|
};
|
|
53
52
|
export {
|
|
54
|
-
|
|
53
|
+
B as useViews
|
|
55
54
|
};
|
package/dist/index59.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("react"),h=require("./index72.cjs"),E=require("./index60.cjs"),I=require("./index58.cjs"),C=require("./index7.cjs"),S=require("./index57.cjs"),F=()=>{const{VIEW_TYPE:m,SEARCH_FILTER_ID:c}=C.useBusinessLogic(),{Filters:{activeViewId:d,initFiltersFromView:e,initFromUrl:t,discardChanges:u,updateUrl:L,setFilter:f}}=S.useStores(),{isLoading:v}=E.useCustomViews({type:m}),{viewsMap:s,defaultCustomViewId:w,isLoading:p}=I.useViews(),g=p||v;V.useEffect(()=>{if(g)return;const i=new URLSearchParams(window.location.search),l=i.get("view"),o=i.get(c),n=i.size>0;if(!d){if(l){const r=s.get(l);if(r)e(r),n&&t();else{const a=s.get(w);a&&(e(a),n&&t(!1))}}else{const r=s.get(w);if(r)e(r),u(!0),n&&t();else{const a=s.get(h.ALL_VIEW_ID);a&&e(a)}}o&&f(c,o)}},[c,d,w,u,e,t,g,f,L,s]),V.useEffect(()=>{const i=()=>{const o=new URLSearchParams(window.location.search).get("view");if(!o)return;const n=s.get(o);n&&(e(n),t())};return window.addEventListener("popstate",i),()=>window.removeEventListener("popstate",i)},[u,e,t,s])};exports.useViewUrlChange=F;
|
package/dist/index59.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useEffect as u } from "react";
|
|
2
|
-
import { ALL_VIEW_ID as
|
|
3
|
-
import { useCustomViews as
|
|
4
|
-
import { useViews as
|
|
5
|
-
import { useBusinessLogic as
|
|
6
|
-
import { useStores as
|
|
7
|
-
const
|
|
8
|
-
const { VIEW_TYPE: g, SEARCH_FILTER_ID: c } =
|
|
2
|
+
import { ALL_VIEW_ID as h } from "./index72.js";
|
|
3
|
+
import { useCustomViews as I } from "./index60.js";
|
|
4
|
+
import { useViews as E } from "./index58.js";
|
|
5
|
+
import { useBusinessLogic as F } from "./index7.js";
|
|
6
|
+
import { useStores as C } from "./index57.js";
|
|
7
|
+
const A = () => {
|
|
8
|
+
const { VIEW_TYPE: g, SEARCH_FILTER_ID: c } = F(), {
|
|
9
9
|
Filters: {
|
|
10
10
|
activeViewId: d,
|
|
11
11
|
initFiltersFromView: e,
|
|
@@ -14,7 +14,7 @@ const T = () => {
|
|
|
14
14
|
updateUrl: L,
|
|
15
15
|
setFilter: l
|
|
16
16
|
}
|
|
17
|
-
} =
|
|
17
|
+
} = C(), { isLoading: v } = I({ type: g }), { viewsMap: t, defaultCustomViewId: f, isLoading: V } = E(), p = V || v;
|
|
18
18
|
u(() => {
|
|
19
19
|
if (p) return;
|
|
20
20
|
const s = new URLSearchParams(window.location.search), m = s.get("view"), a = s.get(c), o = s.size > 0;
|
|
@@ -32,7 +32,7 @@ const T = () => {
|
|
|
32
32
|
if (r)
|
|
33
33
|
e(r), w(!0), o && i();
|
|
34
34
|
else {
|
|
35
|
-
const n = t.get(
|
|
35
|
+
const n = t.get(h);
|
|
36
36
|
n && e(n);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -60,5 +60,5 @@ const T = () => {
|
|
|
60
60
|
}, [w, e, i, t]);
|
|
61
61
|
};
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
A as useViewUrlChange
|
|
64
64
|
};
|
package/dist/index77.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@veeqo/ui"),s=require("react"),k=require("@veeqo/components"),x=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@veeqo/ui"),s=require("react"),k=require("@veeqo/components"),x=require("./index86.cjs"),i=require("./index87.cjs"),I=require("./index88.cjs"),T=require("./index89.cjs"),t=require("./index90.cjs"),w=require("./index78.cjs"),D=require("./index91.cjs"),b=require("./index92.cjs"),{Glyph:V}=k.VeeqoCommon,H=({onClose:c,columnDefintions:j,hiddenColumns:m,visibleColumns:h,pinnedLeftColumnIds:S,pinnedRightColumnIds:y})=>{const[u,g]=s.useState(""),a=s.useMemo(()=>new Map(j.map(n=>[n.id,n])),[]),[l,C]=s.useState(()=>({[t.ColumnGroupIds.Hidden]:m,[t.ColumnGroupIds.Visible]:h})),v=s.useMemo(()=>{const n=l[t.ColumnGroupIds.Visible].map(o=>a.get(`${o}`));return b.filterColumnsBySearch(n,u)},[l,a,u]),G=s.useMemo(()=>{const n=l[t.ColumnGroupIds.Hidden].map(o=>a.get(`${o}`));return b.filterColumnsBySearch(n,u)},[l,a,u]),{isSavingColumns:d,saveColumns:f}=D.usePersistColumns({pinnedLeftColumnIds:S,pinnedRightColumnIds:y}),q=()=>{g(""),C({[t.ColumnGroupIds.Hidden]:m,[t.ColumnGroupIds.Visible]:h})},p=s.useCallback(n=>{g(n)},[]),M=s.useCallback(n=>{const o=a.get(`${n}`);return o?e.jsx(T.ColumnItem,{column:o,isDragOverlay:!0}):null},[a]);return e.jsx(r.Modal,{variant:"lg",style:{overflowY:"hidden"},shouldShow:!0,onClose:()=>c==null?void 0:c(),headerSlot:e.jsxs(i.HeaderContainer,{children:[e.jsxs(r.Stack,{direction:"horizontal",alignX:"between",alignY:"center",children:[e.jsxs(r.Stack,{direction:"horizontal",alignX:"start",alignY:"center",spacing:"sm",children:[e.jsx(w.TableManagementGlyph,{height:32,width:32}),e.jsx(r.Text,{variant:"headingLarge",as:"h1",children:"Table management"})]}),e.jsx(r.Button,{"aria-label":"Close modal",onClick:c,variant:"flat",iconSlot:e.jsx(V,{name:"close"})})]}),e.jsxs(r.Text,{variant:"subheadingMedium",children:["Show, hide, or change the order of the columns in the view, so you always see the data that's most important to you. Learn more with our"," ",e.jsx(r.Anchor,{href:"#",target:"_blank",children:"help guide (TODO)"}),"."]}),e.jsx(r.Text,{variant:"headingSmall",children:"Column management"}),e.jsx(i.ColumnSearch,{name:"column-search-query",placeholder:"Search",value:u,onChange:p,onClearClick:()=>p(""),fill:"100%"})]}),leftActions:[{label:"Reset",onClick:q,variant:"default",disabled:d}],rightActions:[{label:"Cancel",onClick:c,variant:"default",disabled:d},{label:"Save",onClick:()=>f({visibleColumns:l[t.ColumnGroupIds.Visible]}),variant:"primary",disabled:d,loading:d}],children:e.jsx(r.Stack,{spacing:"md",alignX:"stretch",children:e.jsx(r.Stack,{spacing:4,alignX:"stretch",children:e.jsx(I.DndContainer,{items:l,setItems:C,renderDragOverlay:M,children:e.jsx(i.Container,{children:e.jsxs(i.ColumnGroupsGrid,{columns:2,spacing:"xl",children:[e.jsx(x.ColumnGroup,{id:t.ColumnGroupIds.Visible,title:"Shown columns:",columns:v}),e.jsx(i.VerticalSeparator,{children:e.jsx(i.VerticalText,{children:"Drag & Drop columns"})}),e.jsx(x.ColumnGroup,{id:t.ColumnGroupIds.Hidden,title:"Hidden columns:",columns:G})]})})})})})})};exports.TableManagementModal=H;
|
package/dist/index77.js
CHANGED
|
@@ -2,14 +2,14 @@ import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { Modal as T, Stack as m, Text as d, Button as O, Anchor as X } from "@veeqo/ui";
|
|
3
3
|
import { useState as b, useMemo as h, useCallback as v } from "react";
|
|
4
4
|
import { VeeqoCommon as A } from "@veeqo/components";
|
|
5
|
-
import { ColumnGroup as S } from "./
|
|
6
|
-
import { Container as I, ColumnGroupsGrid as Y, VerticalSeparator as $, VerticalText as j, HeaderContainer as q, ColumnSearch as z } from "./
|
|
7
|
-
import { DndContainer as B } from "./
|
|
8
|
-
import { ColumnItem as L } from "./
|
|
9
|
-
import { ColumnGroupIds as r } from "./
|
|
5
|
+
import { ColumnGroup as S } from "./index86.js";
|
|
6
|
+
import { Container as I, ColumnGroupsGrid as Y, VerticalSeparator as $, VerticalText as j, HeaderContainer as q, ColumnSearch as z } from "./index87.js";
|
|
7
|
+
import { DndContainer as B } from "./index88.js";
|
|
8
|
+
import { ColumnItem as L } from "./index89.js";
|
|
9
|
+
import { ColumnGroupIds as r } from "./index90.js";
|
|
10
10
|
import { TableManagementGlyph as Q } from "./index78.js";
|
|
11
|
-
import { usePersistColumns as R } from "./
|
|
12
|
-
import { filterColumnsBySearch as y } from "./
|
|
11
|
+
import { usePersistColumns as R } from "./index91.js";
|
|
12
|
+
import { filterColumnsBySearch as y } from "./index92.js";
|
|
13
13
|
const { Glyph: P } = A, ae = ({
|
|
14
14
|
onClose: l,
|
|
15
15
|
columnDefintions: w,
|
package/dist/index79.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 e=require("react/jsx-runtime"),i=require("@veeqo/ui"),r=({shouldShow:a,viewName:n,onCancel:t,onDelete:o})=>e.jsx(i.Modal,{headerTitle:`Delete '${n}' view?`,"data-testid":"act-react-listing-custom-confirmation-popup",variant:"sm",shouldShow:a,onClose:t,rightActions:[{className:"act-react-listing-custom-confirmation-popup-cancel",label:"Cancel",onClick:t,variant:"default"},{className:"act-react-listing-custom-confirmation-popup-delete",label:"Delete",onClick:o,variant:"primaryDestructive"}],showHeaderCloseButton:!0,children:e.jsx(i.Text,{variant:"body",children:"This cannot be undone."})});exports.Confirmation=r;
|
package/dist/index79.js
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Modal as n, Text as r } from "@veeqo/ui";
|
|
3
|
+
const s = ({ shouldShow: a, viewName: i, onCancel: t, onDelete: o }) => /* @__PURE__ */ e(
|
|
4
|
+
n,
|
|
5
|
+
{
|
|
6
|
+
headerTitle: `Delete '${i}' view?`,
|
|
7
|
+
"data-testid": "act-react-listing-custom-confirmation-popup",
|
|
8
|
+
variant: "sm",
|
|
9
|
+
shouldShow: a,
|
|
10
|
+
onClose: t,
|
|
11
|
+
rightActions: [
|
|
12
|
+
{
|
|
13
|
+
className: "act-react-listing-custom-confirmation-popup-cancel",
|
|
14
|
+
label: "Cancel",
|
|
15
|
+
onClick: t,
|
|
16
|
+
variant: "default"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
className: "act-react-listing-custom-confirmation-popup-delete",
|
|
20
|
+
label: "Delete",
|
|
21
|
+
onClick: o,
|
|
22
|
+
variant: "primaryDestructive"
|
|
15
23
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
}, []), /* @__PURE__ */ p(v, { style: s, className: f, offset: i, ref: r, children: o });
|
|
23
|
-
};
|
|
24
|
+
],
|
|
25
|
+
showHeaderCloseButton: !0,
|
|
26
|
+
children: /* @__PURE__ */ e(r, { variant: "body", children: "This cannot be undone." })
|
|
27
|
+
}
|
|
28
|
+
);
|
|
24
29
|
export {
|
|
25
|
-
|
|
30
|
+
s as Confirmation
|
|
26
31
|
};
|
package/dist/index80.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("@veeqo/ui"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("@veeqo/ui"),t=require("./index94.cjs"),a=i.theme.colors.secondary.blue.base,o=({mainEntityLabelPlural:r="",onClick:n})=>e.jsx(t.Notification,{className:"act-react-listing-custom-notification-new-draft",children:e.jsx(t.Pill,{children:e.jsxs(i.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(t.Glyph,{name:"info",color:a}),e.jsxs(t.Wrap,{children:[e.jsx(t.Text,{variant:"body",margin:"0 4px 0 0",children:"You are currently in a"}),e.jsx(t.Bold,{variant:"bodyBoldDark",children:"draft view"}),e.jsx(t.Hint,{variant:"hintText",children:`Apply filters and create a custom view of your ${r.toLowerCase()}`})]}),e.jsx(t.Button,{className:"act-react-listing-custom-notification-save-draft-btn",variant:"primary",onClick:n,size:"sm",children:"Create view"})]})})});exports.InfoPill=o;
|