@veeqo/transfigure 0.0.31 → 0.0.32
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/Views/PillNotifications/variants/styled.d.ts +0 -1
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +24 -15
- package/dist/index101.cjs +80 -1
- package/dist/index101.js +101 -2
- package/dist/index102.cjs +1 -80
- package/dist/index102.js +2 -102
- package/dist/index103.cjs +13 -1
- package/dist/index103.js +17 -19
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +18 -7
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +7 -63
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +60 -26
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +30 -36
- package/dist/index108.cjs +1 -13
- package/dist/index108.js +33 -14
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +41 -46
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +1 -1
- package/dist/index112.cjs +7 -1
- package/dist/index112.js +10 -42
- package/dist/index113.cjs +1 -7
- package/dist/index113.js +47 -10
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +1 -1
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +2 -2
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +1 -1
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +1 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +7 -3
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +3 -3
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +1 -1
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index81.cjs +8 -1
- package/dist/index81.js +12 -143
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +40 -18
- package/dist/index83.cjs +1 -8
- package/dist/index83.js +9 -12
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +141 -39
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +17 -7
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +18 -13
- package/dist/index87.cjs +1 -104
- package/dist/index87.js +13 -118
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +19 -66
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +30 -26
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +29 -2
- package/dist/index91.cjs +19 -1
- package/dist/index91.js +24 -41
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +13 -11
- package/dist/index93.cjs +104 -1
- package/dist/index93.js +119 -17
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +65 -30
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +29 -29
- package/dist/index96.cjs +1 -12
- package/dist/index96.js +2 -16
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +40 -23
- package/dist/index98.cjs +1 -19
- package/dist/index98.js +11 -24
- package/dist/index99.cjs +12 -1
- package/dist/index99.js +16 -21
- package/package.json +1 -1
package/dist/index39.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("./index87.cjs"),g=require("./index62.cjs"),S=require("./index60.cjs"),b=require("./index3.cjs"),y=require("./index7.cjs"),V=require("./index59.cjs"),p=require("./index10.cjs"),q=()=>{const{VIEW_TYPE:u}=y.useBusinessLogic(),{sortedCustomViews:s,isLoading:a}=S.useViews(),{mutate:c}=g.useCustomViews({type:u}),[l,t]=n.useState(s);n.useEffect(()=>{t(s)},[s]);const{Notifications:{notify:w}}=V.useStores(),d=async o=>{t(o);const r=o.map(e=>e.id);try{await b.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:r}}}),await c(e=>({...e,settings:{...e.settings,custom_view_positions:{...e.settings.custom_view_positions,order:r}}}),{revalidate:!1})}catch{t(s),w({type:"error",text:"Failed to update order of views"})}};return a||!s.length?null:i.jsx(p.ErrorBoundary,{children:i.jsx(m.LegacySortableViews,{views:l,onChange:d,className:"act-sortable-views"})})};exports.SortableViews=q;
|
package/dist/index39.js
CHANGED
|
@@ -1,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 "./index87.js";
|
|
4
4
|
import { useCustomViews as d } from "./index62.js";
|
|
5
5
|
import { useViews as g } from "./index60.js";
|
|
6
6
|
import { patchCurrentUser as _ } from "./index3.js";
|
package/dist/index40.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("./index58.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("./index58.cjs"),n=require("./index101.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(n.Glyph,{ariaLabel:"attention",name:"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/index40.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { Stack as t, theme as d, Button as h, ActionMenu as o } from "@veeqo/ui";
|
|
3
3
|
import { observer as m } from "mobx-react";
|
|
4
4
|
import { usePersistUnsavedChanges as v } from "./index58.js";
|
|
5
|
-
import { Notification as b, Container as g, Glyph as p, Wrap as u, Text as i, Bold as y } from "./
|
|
5
|
+
import { Notification as b, Container as g, Glyph as p, Wrap as u, Text as i, Bold as y } from "./index101.js";
|
|
6
6
|
const C = d.colors.secondary.blue.base, k = m(({
|
|
7
7
|
onDiscard: c,
|
|
8
8
|
viewName: r,
|
|
@@ -12,8 +12,12 @@ const C = d.colors.secondary.blue.base, k = m(({
|
|
|
12
12
|
return /* @__PURE__ */ n(b, { children: /* @__PURE__ */ n(g, { children: /* @__PURE__ */ e(t, { direction: "horizontal", alignY: "center", children: [
|
|
13
13
|
/* @__PURE__ */ n(p, { ariaLabel: "attention", name: "attention", color: C }),
|
|
14
14
|
/* @__PURE__ */ e(u, { children: [
|
|
15
|
-
/* @__PURE__ */ n(i, { variant: "body", margin: "0 4px 0 0", children: "You have unsaved changes" }),
|
|
16
|
-
r && /* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */ n(i, { variant: "body", margin: "0 4px 0 0", children: "You have unsaved changes to" }),
|
|
16
|
+
r && /* @__PURE__ */ e(y, { variant: "bodyBoldDark", children: [
|
|
17
|
+
"'",
|
|
18
|
+
r,
|
|
19
|
+
"'"
|
|
20
|
+
] })
|
|
17
21
|
] }),
|
|
18
22
|
/* @__PURE__ */ n(
|
|
19
23
|
h,
|
package/dist/index42.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),V=require("mobx-react"),s=require("@veeqo/ui"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),V=require("mobx-react"),s=require("@veeqo/ui"),t=require("./index99.cjs"),j=require("./index39.cjs"),m=require("./index60.cjs"),S=require("./index61.cjs"),q=require("./index35.cjs"),u=require("./index34.cjs"),p=require("./index59.cjs"),a=require("./index10.cjs"),b=V.observer(()=>{const{Views:{draftViewsList:c}}=p.useStores(),{viewsArray:l,fixedViews:d}=m.useViews(),[o,i]=n.useState(!1),[w,x]=n.useState(null),h=()=>i(!1);return S.useViewUrlChange(),e.jsxs(e.Fragment,{children:[e.jsxs(s.ViewsContainer,{onClickMenu:()=>i(!0),ariaMenuControls:"views-menu",ariaMenuExpanded:o,ref:x,children:[l.map(r=>e.jsx(a.ErrorBoundary,{children:e.jsx(u.ViewTab,{view:r})},r.id)),c.map(r=>e.jsx(a.ErrorBoundary,{children:e.jsx(u.ViewTab,{view:r})},r.id))]}),o&&e.jsx(s.Popover,{id:"views-menu",anchorElement:w,placement:"bottom",onShouldClose:()=>i(!1),children:e.jsxs(s.Card.Surface,{children:[e.jsx(t.FixedViews,{children:d.map(r=>e.jsx(s.Text,{variant:"placeholder",children:r.label},r.id||r.label))}),e.jsx(j.SortableViews,{}),e.jsx(t.Divider,{}),e.jsx(q.CreateView,{hideActionsPopover:h})]})})]})});exports.ViewList=b;
|
package/dist/index42.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as i, Fragment as u, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as n } from "react";
|
|
3
3
|
import { observer as h } from "mobx-react";
|
|
4
4
|
import { ViewsContainer as w, Popover as V, Card as v, Text as S } from "@veeqo/ui";
|
|
5
|
-
import { FixedViews as x, Divider as C } from "./
|
|
5
|
+
import { FixedViews as x, Divider as C } from "./index99.js";
|
|
6
6
|
import { SortableViews as b } from "./index39.js";
|
|
7
7
|
import { useViews as A } from "./index60.js";
|
|
8
8
|
import { useViewUrlChange as L } from "./index61.js";
|
package/dist/index44.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),N=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),N=require("./index84.cjs"),b=require("@veeqo/ui"),_=require("./index85.cjs"),j=require("mobx-react"),y=require("./index7.cjs"),B=require("./index50.cjs"),I=require("./index59.cjs"),O=require("./index60.cjs"),g=require("./index49.cjs"),w=j.observer(({columnDefinitions:T,pinnedRightColumnIds:i=[],pinnedLeftColumnIds:a=[]})=>{var M;const{DEFAULT_HIDDEN_COLUMNS:E,DEFAULT_VISIBLE_COLUMNS:p}=y.useBusinessLogic(),n=[...a,...i],l=E.filter(s=>!n.includes(s)),c=p.filter(s=>!n.includes(s)),S=[...l,...c],{closeModal:f,isModalOpen:h,openModal:q}=B.useModal(),{Filters:{activeViewId:t},Views:{draftViewsMap:A}}=I.useStores(),{viewsMap:D,isLoading:x}=O.useViews();if(!t||x)return null;const e=D.get(t),r=Array.isArray((M=e==null?void 0:e.columns)==null?void 0:M.columnIds),u=r?e.columns.columnIds.filter(s=>!n.includes(s)):c,L=r?S.filter(s=>!u.includes(s)):l,d=A.has(t),m=!(e!=null&&e.editable),v=m||d,C=d?"Please create a view to use table management":m?"Please choose a custom view to use table management":"Table management";return o.jsxs(o.Fragment,{children:[o.jsx(b.Tooltip,{text:C,children:o.jsx(b.Button,{"aria-label":"Open table management",onClick:()=>q(g.ModalId.ORDERS_TABLE_MANAGEMENT),size:"sm",iconSlot:o.jsx(_.TableManagementGlyph,{}),disabled:v})}),h(g.ModalId.ORDERS_TABLE_MANAGEMENT)&&o.jsx(N.TableManagementModal,{pinnedRightColumnIds:i,pinnedLeftColumnIds:a,visibleColumns:u,hiddenColumns:L,columnDefintions:T,onClose:f})]})});exports.TableManagement=w;
|
package/dist/index44.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as v, Fragment as B, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { TableManagementModal as O } from "./
|
|
2
|
+
import { TableManagementModal as O } from "./index84.js";
|
|
3
3
|
import { Tooltip as w, Button as x } from "@veeqo/ui";
|
|
4
|
-
import { TableManagementGlyph as F } from "./
|
|
4
|
+
import { TableManagementGlyph as F } from "./index85.js";
|
|
5
5
|
import { observer as I } from "mobx-react";
|
|
6
6
|
import { useBusinessLogic as y } from "./index7.js";
|
|
7
7
|
import { useModal as P } from "./index50.js";
|
package/dist/index45.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@veeqo/ui"),r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@veeqo/ui"),r=require("./index81.cjs"),d=require("./index82.cjs"),h=require("./index83.cjs"),f=require("./index59.cjs"),y=({isLoading:s,refetch:n,trackMetricClick:t,tooltipText:a="Refresh data"})=>{const{hasChanges:o,acknowledgeButtonClick:l}=d.usePollData(),{Notifications:{notify:i}}=f.useStores(),u=async()=>{try{n(),l(),t==null||t()}catch{i({type:"error",text:"Failed to refresh data"})}};return e.jsx(c.Tooltip,{text:a,children:e.jsx(r.StyledButton,{onClick:u,variant:"default",size:"sm",loading:s,disabled:s,iconSlot:e.jsx(h.RefreshIcon,{}),"aria-label":o?"refresh table with changes":"refresh table","aria-live":"polite",children:e.jsx(r.StyledIndicator,{color:"red",size:"xs",style:{opacity:o?1:0}})})})};exports.RefreshButton=y;
|
package/dist/index45.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip as l } from "@veeqo/ui";
|
|
3
|
-
import { StyledButton as f, StyledIndicator as h } from "./
|
|
4
|
-
import { usePollData as d } from "./
|
|
5
|
-
import { RefreshIcon as m } from "./
|
|
3
|
+
import { StyledButton as f, StyledIndicator as h } from "./index81.js";
|
|
4
|
+
import { usePollData as d } from "./index82.js";
|
|
5
|
+
import { RefreshIcon as m } from "./index83.js";
|
|
6
6
|
import { useStores as p } from "./index59.js";
|
|
7
7
|
const B = ({ isLoading: t, refetch: s, trackMetricClick: o, tooltipText: a = "Refresh data" }) => {
|
|
8
8
|
const { hasChanges: r, acknowledgeButtonClick: n } = d(), { Notifications: { notify: i } } = p();
|
package/dist/index79.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index102.cjs"),s=e=>{if(!l.isError(e))return e;if(e.stack){const t=e.stack.split(`
|
|
2
2
|
`);if(t.length<=10)return e;const n=t==null?void 0:t[0],i=t==null?void 0:t.splice(9),r=[n,...i].join(`
|
|
3
3
|
`);e.stack=r}return e};exports.filterErrorStack=s;
|
package/dist/index79.js
CHANGED
package/dist/index80.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index102.cjs"),n=({customError:t,originalError:e,type:c})=>{!s.isError(e)||!s.isError(t)||(e.stack&&(e.stack=t.stack),e.name&&(e.name=`${c} (${e.name})`))};exports.injectIntoError=n;
|
package/dist/index80.js
CHANGED
package/dist/index81.cjs
CHANGED
|
@@ -1 +1,8 @@
|
|
|
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"),d=e=>e&&e.__esModule?e:{default:e},s=d(i),o=s.default(t.Button)`
|
|
2
|
+
padding-right: ${t.theme.sizes.sm};
|
|
3
|
+
`,n=s.default(t.Indicator)`
|
|
4
|
+
height: ${t.theme.sizes[3]};
|
|
5
|
+
min-width: ${t.theme.sizes[3]};
|
|
6
|
+
top: -${t.theme.sizes.xs};
|
|
7
|
+
right: -${t.theme.sizes.xs};
|
|
8
|
+
`;exports.StyledButton=o;exports.StyledIndicator=n;
|
package/dist/index81.js
CHANGED
|
@@ -1,145 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { usePersistColumns as _ } from "./index91.js";
|
|
12
|
-
import { filterColumnsBySearch as V } from "./index92.js";
|
|
13
|
-
const { Glyph: E } = I, te = ({
|
|
14
|
-
onClose: l,
|
|
15
|
-
columnDefintions: k,
|
|
16
|
-
hiddenColumns: s,
|
|
17
|
-
visibleColumns: m,
|
|
18
|
-
pinnedLeftColumnIds: D,
|
|
19
|
-
pinnedRightColumnIds: H
|
|
20
|
-
}) => {
|
|
21
|
-
const [o, b] = v(""), i = f(
|
|
22
|
-
() => new Map(k.map((a) => [a.id, a])),
|
|
23
|
-
[]
|
|
24
|
-
), [t, u] = v(() => ({
|
|
25
|
-
[n.Hidden]: s,
|
|
26
|
-
[n.Visible]: m
|
|
27
|
-
})), M = f(() => {
|
|
28
|
-
const a = t[n.Visible].map((r) => i.get(`${r}`));
|
|
29
|
-
return V(a, o);
|
|
30
|
-
}, [t, i, o]), x = f(() => {
|
|
31
|
-
const a = t[n.Hidden].map((r) => i.get(`${r}`));
|
|
32
|
-
return V(a, o);
|
|
33
|
-
}, [t, i, o]), { isSavingColumns: d, saveColumns: G } = _({ pinnedLeftColumnIds: D, pinnedRightColumnIds: H }), T = () => {
|
|
34
|
-
b(""), u({
|
|
35
|
-
[n.Hidden]: s,
|
|
36
|
-
[n.Visible]: m
|
|
37
|
-
});
|
|
38
|
-
}, C = y(
|
|
39
|
-
(a) => {
|
|
40
|
-
if (b(a), !a) {
|
|
41
|
-
const r = /* @__PURE__ */ new Set([...s, ...m]);
|
|
42
|
-
u((S) => ({
|
|
43
|
-
[n.Hidden]: S[n.Hidden].filter((g) => r.has(`${g}`)),
|
|
44
|
-
[n.Visible]: S[n.Visible].filter((g) => r.has(`${g}`))
|
|
45
|
-
}));
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
[s, m]
|
|
49
|
-
), $ = y(
|
|
50
|
-
(a) => {
|
|
51
|
-
const r = i.get(`${a}`);
|
|
52
|
-
return r ? /* @__PURE__ */ e(q, { column: r, isDragOverlay: !0 }) : null;
|
|
53
|
-
},
|
|
54
|
-
[i]
|
|
55
|
-
);
|
|
56
|
-
return /* @__PURE__ */ e(
|
|
57
|
-
O,
|
|
58
|
-
{
|
|
59
|
-
variant: "lg",
|
|
60
|
-
style: { overflowY: "hidden" },
|
|
61
|
-
shouldShow: !0,
|
|
62
|
-
onClose: () => l == null ? void 0 : l(),
|
|
63
|
-
headerSlot: /* @__PURE__ */ c(L, { children: [
|
|
64
|
-
/* @__PURE__ */ c(h, { direction: "horizontal", alignX: "between", alignY: "center", children: [
|
|
65
|
-
/* @__PURE__ */ c(h, { direction: "horizontal", alignX: "start", alignY: "center", spacing: "sm", children: [
|
|
66
|
-
/* @__PURE__ */ e(P, { height: 32, width: 32 }),
|
|
67
|
-
/* @__PURE__ */ e(p, { variant: "headingLarge", as: "h1", children: "Table management" })
|
|
68
|
-
] }),
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
X,
|
|
71
|
-
{
|
|
72
|
-
"aria-label": "Close modal",
|
|
73
|
-
onClick: l,
|
|
74
|
-
variant: "flat",
|
|
75
|
-
iconSlot: /* @__PURE__ */ e(E, { name: "close" })
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
] }),
|
|
79
|
-
/* @__PURE__ */ c(p, { variant: "subheadingMedium", children: [
|
|
80
|
-
"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",
|
|
81
|
-
" ",
|
|
82
|
-
/* @__PURE__ */ e(A, { href: "#", target: "_blank", children: "help guide (TODO)" }),
|
|
83
|
-
"."
|
|
84
|
-
] }),
|
|
85
|
-
/* @__PURE__ */ e(p, { variant: "headingSmall", children: "Column management" }),
|
|
86
|
-
/* @__PURE__ */ e(
|
|
87
|
-
Q,
|
|
88
|
-
{
|
|
89
|
-
name: "column-search-query",
|
|
90
|
-
placeholder: "Search",
|
|
91
|
-
value: o,
|
|
92
|
-
onChange: C,
|
|
93
|
-
onClearClick: () => C(""),
|
|
94
|
-
fill: "100%"
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
] }),
|
|
98
|
-
leftActions: [
|
|
99
|
-
{
|
|
100
|
-
label: "Reset",
|
|
101
|
-
onClick: T,
|
|
102
|
-
variant: "default",
|
|
103
|
-
disabled: d
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
rightActions: [
|
|
107
|
-
{
|
|
108
|
-
label: "Cancel",
|
|
109
|
-
onClick: l,
|
|
110
|
-
variant: "default",
|
|
111
|
-
disabled: d
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
label: "Save",
|
|
115
|
-
onClick: () => G({ visibleColumns: t[n.Visible] }),
|
|
116
|
-
variant: "primary",
|
|
117
|
-
disabled: d,
|
|
118
|
-
loading: d
|
|
119
|
-
}
|
|
120
|
-
],
|
|
121
|
-
children: /* @__PURE__ */ e(h, { spacing: "md", alignX: "stretch", children: /* @__PURE__ */ e(h, { spacing: 4, alignX: "stretch", children: /* @__PURE__ */ e(R, { items: t, setItems: u, renderDragOverlay: $, children: /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ c(j, { columns: 2, spacing: "xl", children: [
|
|
122
|
-
/* @__PURE__ */ e(
|
|
123
|
-
w,
|
|
124
|
-
{
|
|
125
|
-
id: n.Visible,
|
|
126
|
-
title: "Shown columns:",
|
|
127
|
-
columns: M
|
|
128
|
-
}
|
|
129
|
-
),
|
|
130
|
-
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(B, { children: "Drag & Drop columns" }) }),
|
|
131
|
-
/* @__PURE__ */ e(
|
|
132
|
-
w,
|
|
133
|
-
{
|
|
134
|
-
id: n.Hidden,
|
|
135
|
-
title: "Hidden columns:",
|
|
136
|
-
columns: x
|
|
137
|
-
}
|
|
138
|
-
)
|
|
139
|
-
] }) }) }) }) })
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
};
|
|
1
|
+
import s from "styled-components";
|
|
2
|
+
import { theme as t, Button as i, Indicator as e } from "@veeqo/ui";
|
|
3
|
+
const d = s(i)`
|
|
4
|
+
padding-right: ${t.sizes.sm};
|
|
5
|
+
`, n = s(e)`
|
|
6
|
+
height: ${t.sizes[3]};
|
|
7
|
+
min-width: ${t.sizes[3]};
|
|
8
|
+
top: -${t.sizes.xs};
|
|
9
|
+
right: -${t.sizes.xs};
|
|
10
|
+
`;
|
|
143
11
|
export {
|
|
144
|
-
|
|
12
|
+
d as StyledButton,
|
|
13
|
+
n as StyledIndicator
|
|
145
14
|
};
|
package/dist/index82.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"),w=require("./index7.cjs"),L=require("./index59.cjs"),m=require("./index64.cjs"),v=require("./index86.cjs"),q=require("./index53.cjs");function V(){const{TABLE_DATA_URL:h}=w.useBusinessLogic(),{Filters:{pageSize:s,activeViewId:n}}=L.useStores(),{queryParams:S}=m.useUrlParams();async function c(){const e=`${h}?${S}`,g=await q.fetcherV2(e);return JSON.stringify(g)}const[u,a]=t.useState(null),[o,l]=t.useState(!1),[f,C]=t.useState(n),[y,P]=t.useState(s),i=3e5,[D,r]=t.useState(i);return t.useEffect(()=>{const e=()=>{document.hidden?r(null):r(i)};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),v(async()=>{const e=await c();if(u===null||f!==n||y!==s){a(e),C(n),P(s);return}const d=e!==u;d&&(a(e),l(d))},o?null:D),{hasChanges:o,acknowledgeButtonClick:async()=>{l(!1),r(i),a(await c())}}}exports.usePollData=V;
|
package/dist/index82.js
CHANGED
|
@@ -1,21 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
)
|
|
1
|
+
import { useState as t, useEffect as p } from "react";
|
|
2
|
+
import { useBusinessLogic as P } from "./index7.js";
|
|
3
|
+
import { useStores as S } from "./index59.js";
|
|
4
|
+
import { useUrlParams as L } from "./index64.js";
|
|
5
|
+
import v from "./index86.js";
|
|
6
|
+
import { fetcherV2 as V } from "./index53.js";
|
|
7
|
+
function T() {
|
|
8
|
+
const { TABLE_DATA_URL: h } = P(), {
|
|
9
|
+
Filters: {
|
|
10
|
+
pageSize: n,
|
|
11
|
+
activeViewId: s
|
|
12
|
+
}
|
|
13
|
+
} = S(), { queryParams: m } = L();
|
|
14
|
+
async function r() {
|
|
15
|
+
const e = `${h}?${m}`, g = await V(e);
|
|
16
|
+
return JSON.stringify(g);
|
|
17
17
|
}
|
|
18
|
-
);
|
|
18
|
+
const [c, a] = t(null), [l, u] = t(!1), [f, C] = t(s), [w, y] = t(n), i = 3e5, [D, o] = t(i);
|
|
19
|
+
return p(() => {
|
|
20
|
+
const e = () => {
|
|
21
|
+
document.hidden ? o(null) : o(i);
|
|
22
|
+
};
|
|
23
|
+
return document.addEventListener("visibilitychange", e), () => {
|
|
24
|
+
document.removeEventListener("visibilitychange", e);
|
|
25
|
+
};
|
|
26
|
+
}, []), v(
|
|
27
|
+
async () => {
|
|
28
|
+
const e = await r();
|
|
29
|
+
if (c === null || f !== s || w !== n) {
|
|
30
|
+
a(e), C(s), y(n);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const d = e !== c;
|
|
34
|
+
d && (a(e), u(d));
|
|
35
|
+
},
|
|
36
|
+
l ? null : D
|
|
37
|
+
), { hasChanges: l, acknowledgeButtonClick: async () => {
|
|
38
|
+
u(!1), o(i), a(await r());
|
|
39
|
+
} };
|
|
40
|
+
}
|
|
19
41
|
export {
|
|
20
|
-
|
|
42
|
+
T as usePollData
|
|
21
43
|
};
|
package/dist/index83.cjs
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
padding-right: ${t.theme.sizes.sm};
|
|
3
|
-
`,n=s.default(t.Indicator)`
|
|
4
|
-
height: ${t.theme.sizes[3]};
|
|
5
|
-
min-width: ${t.theme.sizes[3]};
|
|
6
|
-
top: -${t.theme.sizes.xs};
|
|
7
|
-
right: -${t.theme.sizes.xs};
|
|
8
|
-
`;exports.StyledButton=o;exports.StyledIndicator=n;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=o=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:e.jsx("path",{d:"M17.64 6.35C16.19 4.9 14.2 4 11.99 4C7.57 4 4 7.58 4 12C4 16.42 7.57 20 11.99 20C15.72 20 18.83 17.45 19.72 14H17.64C16.82 16.33 14.6 18 11.99 18C8.68 18 5.99 15.31 5.99 12C5.99 8.69 8.68 6 11.99 6C13.65 6 15.13 6.69 16.21 7.78L12.99 11H19.99V4L17.64 6.35Z",fill:"currentColor"})});exports.RefreshIcon=r;
|
package/dist/index83.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
right: -${t.sizes.xs};
|
|
10
|
-
`;
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
const e = (r) => /* @__PURE__ */ o("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...r, children: /* @__PURE__ */ o(
|
|
3
|
+
"path",
|
|
4
|
+
{
|
|
5
|
+
d: "M17.64 6.35C16.19 4.9 14.2 4 11.99 4C7.57 4 4 7.58 4 12C4 16.42 7.57 20 11.99 20C15.72 20 18.83 17.45 19.72 14H17.64C16.82 16.33 14.6 18 11.99 18C8.68 18 5.99 15.31 5.99 12C5.99 8.69 8.68 6 11.99 6C13.65 6 15.13 6.69 16.21 7.78L12.99 11H19.99V4L17.64 6.35Z",
|
|
6
|
+
fill: "currentColor"
|
|
7
|
+
}
|
|
8
|
+
) });
|
|
11
9
|
export {
|
|
12
|
-
|
|
13
|
-
n as StyledIndicator
|
|
10
|
+
e as RefreshIcon
|
|
14
11
|
};
|
package/dist/index84.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"),l=require("@veeqo/ui"),s=require("react"),w=require("@veeqo/components"),S=require("./index92.cjs"),i=require("./index93.cjs"),T=require("./index94.cjs"),V=require("./index95.cjs"),n=require("./index96.cjs"),D=require("./index85.cjs"),H=require("./index97.cjs"),j=require("./index98.cjs"),{Glyph:O}=w.VeeqoCommon,$=({onClose:u,columnDefintions:G,hiddenColumns:d,visibleColumns:m,pinnedLeftColumnIds:y,pinnedRightColumnIds:f})=>{const[c,p]=s.useState(""),a=s.useMemo(()=>new Map(G.map(r=>[r.id,r])),[]),[o,g]=s.useState(()=>({[n.ColumnGroupIds.Hidden]:d,[n.ColumnGroupIds.Visible]:m})),I=s.useMemo(()=>{const r=o[n.ColumnGroupIds.Visible].map(t=>a.get(`${t}`));return j.filterColumnsBySearch(r,c)},[o,a,c]),v=s.useMemo(()=>{const r=o[n.ColumnGroupIds.Hidden].map(t=>a.get(`${t}`));return j.filterColumnsBySearch(r,c)},[o,a,c]),{isSavingColumns:h,saveColumns:M}=H.usePersistColumns({pinnedLeftColumnIds:y,pinnedRightColumnIds:f}),q=()=>{p(""),g({[n.ColumnGroupIds.Hidden]:d,[n.ColumnGroupIds.Visible]:m})},x=s.useCallback(r=>{if(p(r),!r){const t=new Set([...d,...m]);g(b=>({[n.ColumnGroupIds.Hidden]:b[n.ColumnGroupIds.Hidden].filter(C=>t.has(`${C}`)),[n.ColumnGroupIds.Visible]:b[n.ColumnGroupIds.Visible].filter(C=>t.has(`${C}`))}))}},[d,m]),k=s.useCallback(r=>{const t=a.get(`${r}`);return t?e.jsx(V.ColumnItem,{column:t,isDragOverlay:!0}):null},[a]);return e.jsx(l.Modal,{variant:"lg",style:{overflowY:"hidden"},shouldShow:!0,onClose:()=>u==null?void 0:u(),headerSlot:e.jsxs(i.HeaderContainer,{children:[e.jsxs(l.Stack,{direction:"horizontal",alignX:"between",alignY:"center",children:[e.jsxs(l.Stack,{direction:"horizontal",alignX:"start",alignY:"center",spacing:"sm",children:[e.jsx(D.TableManagementGlyph,{height:32,width:32}),e.jsx(l.Text,{variant:"headingLarge",as:"h1",children:"Table management"})]}),e.jsx(l.Button,{"aria-label":"Close modal",onClick:u,variant:"flat",iconSlot:e.jsx(O,{name:"close"})})]}),e.jsxs(l.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(l.Anchor,{href:"#",target:"_blank",children:"help guide (TODO)"}),"."]}),e.jsx(l.Text,{variant:"headingSmall",children:"Column management"}),e.jsx(i.ColumnSearch,{name:"column-search-query",placeholder:"Search",value:c,onChange:x,onClearClick:()=>x(""),fill:"100%"})]}),leftActions:[{label:"Reset",onClick:q,variant:"default",disabled:h}],rightActions:[{label:"Cancel",onClick:u,variant:"default",disabled:h},{label:"Save",onClick:()=>M({visibleColumns:o[n.ColumnGroupIds.Visible]}),variant:"primary",disabled:h,loading:h}],children:e.jsx(l.Stack,{spacing:"md",alignX:"stretch",children:e.jsx(l.Stack,{spacing:4,alignX:"stretch",children:e.jsx(T.DndContainer,{items:o,setItems:g,renderDragOverlay:k,children:e.jsx(i.Container,{children:e.jsxs(i.ColumnGroupsGrid,{columns:2,spacing:"xl",children:[e.jsx(S.ColumnGroup,{id:n.ColumnGroupIds.Visible,title:"Shown columns:",columns:I}),e.jsx(i.VerticalSeparator,{children:e.jsx(i.VerticalText,{children:"Drag & Drop columns"})}),e.jsx(S.ColumnGroup,{id:n.ColumnGroupIds.Hidden,title:"Hidden columns:",columns:v})]})})})})})})};exports.TableManagementModal=$;
|