@veeqo/transfigure 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Filters/Fields/NumberRangeFilter/MuiSlider.d.ts +1 -1
- package/dist/components/TableControls/TableControls.d.ts +5 -1
- package/dist/components/Views/ViewList/ViewsList.d.ts +5 -1
- package/dist/components/Views/ViewTab/ViewTab.d.ts +4 -3
- package/dist/constants/constants.d.ts +2 -4
- package/dist/index100.cjs +1 -13
- package/dist/index100.js +63 -16
- package/dist/index101.cjs +1 -80
- package/dist/index101.js +30 -95
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +20 -20
- 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 +65 -57
- 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/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +30 -30
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +7 -5
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +7 -7
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +29 -13
- package/dist/index80.cjs +15 -100
- package/dist/index80.js +19 -115
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +19 -65
- package/dist/index82.cjs +80 -1
- package/dist/index82.js +95 -29
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +15 -2
- package/dist/index84.cjs +12 -1
- package/dist/index84.js +16 -40
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +23 -7
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +13 -24
- package/dist/index87.cjs +104 -1
- package/dist/index87.js +118 -27
- package/dist/index88.cjs +1 -19
- package/dist/index88.js +67 -23
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +28 -14
- package/dist/index90.cjs +1 -80
- package/dist/index90.js +2 -95
- package/dist/index91.cjs +1 -12
- package/dist/index91.js +41 -16
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +8 -22
- package/dist/index94.cjs +80 -1
- package/dist/index94.js +95 -19
- package/dist/index95.cjs +13 -1
- package/dist/index95.js +17 -8
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +62 -63
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +36 -30
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +19 -63
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +8 -36
- package/package.json +1 -1
package/dist/index33.js
CHANGED
|
@@ -1,97 +1,105 @@
|
|
|
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
|
|
10
|
-
import { useBusinessLogic as
|
|
11
|
-
import { useStores as
|
|
12
|
-
import { Confirmation as
|
|
13
|
-
const
|
|
14
|
-
const { VIEW_TYPE:
|
|
15
|
-
Filters: { activeViewId:
|
|
1
|
+
import { jsxs as $, Fragment as z, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as G, useRef as J, useMemo as L } from "react";
|
|
3
|
+
import { ViewTab as K, theme as y, Loader as M } from "@veeqo/ui";
|
|
4
|
+
import { observer as Q } from "mobx-react";
|
|
5
|
+
import { useCustomViews as X } from "./index60.js";
|
|
6
|
+
import { useViews as Z } from "./index58.js";
|
|
7
|
+
import { PillNotifications as b } from "./index37.js";
|
|
8
|
+
import { ViewDropdowns as ee } from "./index40.js";
|
|
9
|
+
import { useDropdownManager as ie } from "./index52.js";
|
|
10
|
+
import { useBusinessLogic as oe } from "./index7.js";
|
|
11
|
+
import { useStores as re } from "./index57.js";
|
|
12
|
+
import { Confirmation as te } from "./index79.js";
|
|
13
|
+
const ge = Q(({ view: e, viewTabSlotValueMap: l, isLoadingTableData: x }) => {
|
|
14
|
+
const { VIEW_TYPE: E, SEARCH_FILTER_ID: d } = oe(), {
|
|
15
|
+
Filters: { activeViewId: a, initFiltersFromView: f, discardChanges: m, initFromUrl: u, filters: N, setFilter: S },
|
|
16
16
|
Views: { draftViewsMap: T },
|
|
17
|
-
Notifications: { notify:
|
|
18
|
-
} =
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
|
|
17
|
+
Notifications: { notify: k }
|
|
18
|
+
} = re(), { viewsMap: w, defaultCustomViewId: A, isLoading: R } = Z(), { isLoading: I, isValidating: P } = X({ type: E }), [o, _] = G(null), j = (i) => {
|
|
19
|
+
const F = N.get(d);
|
|
20
|
+
if (w.has(i)) {
|
|
21
|
+
const t = w.get(i);
|
|
22
|
+
t && (f(t), m(!0), u());
|
|
23
23
|
} else {
|
|
24
|
-
const
|
|
25
|
-
|
|
24
|
+
const t = T.get(i);
|
|
25
|
+
t ? (f(t), m(!0), u()) : k({
|
|
26
26
|
type: "error",
|
|
27
27
|
text: "Failed to load view"
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
}, n = (e == null ? void 0 : e.id) ===
|
|
32
|
-
!
|
|
30
|
+
F && S(d, F);
|
|
31
|
+
}, n = (e == null ? void 0 : e.id) === a, r = e.originalView !== void 0, p = e.originalView === void 0, B = (l == null ? void 0 : l.get(e == null ? void 0 : e.id)) || void 0, c = (e == null ? void 0 : e.label) || "", h = R || P || I || x, g = J(!1);
|
|
32
|
+
!h && !g.current && n && e.id === A && o && (g.current = !0, o && a === e.id && window.requestAnimationFrame(() => {
|
|
33
33
|
var i;
|
|
34
34
|
(i = o.parentElement) == null || i.scrollBy({
|
|
35
35
|
behavior: "smooth",
|
|
36
36
|
left: o.offsetLeft
|
|
37
37
|
});
|
|
38
38
|
}));
|
|
39
|
-
const V =
|
|
39
|
+
const V = L(() => r ? "draft" : e.editable ? "saved" : "fixed", [r, e.editable]), {
|
|
40
40
|
actions: {
|
|
41
|
-
create: { handleSaveDraft:
|
|
42
|
-
menu: { toggleDropdown:
|
|
43
|
-
delete: { closeDeleteConfirmation:
|
|
41
|
+
create: { handleSaveDraft: q },
|
|
42
|
+
menu: { toggleDropdown: D },
|
|
43
|
+
delete: { closeDeleteConfirmation: H, handleDelete: O, handleDeleteDraftView: C }
|
|
44
44
|
},
|
|
45
|
-
state: { shouldShowDeleteConfirmation:
|
|
46
|
-
actions:
|
|
47
|
-
state:
|
|
48
|
-
} =
|
|
49
|
-
if (
|
|
50
|
-
if (
|
|
51
|
-
}, [
|
|
52
|
-
return /* @__PURE__ */
|
|
45
|
+
state: { shouldShowDeleteConfirmation: U },
|
|
46
|
+
actions: W,
|
|
47
|
+
state: v
|
|
48
|
+
} = ie(e), Y = L(() => {
|
|
49
|
+
if (p) return D;
|
|
50
|
+
if (r) return C;
|
|
51
|
+
}, [C, r, p, D]);
|
|
52
|
+
return /* @__PURE__ */ $(z, { children: [
|
|
53
53
|
/* @__PURE__ */ s(
|
|
54
|
-
|
|
54
|
+
K,
|
|
55
55
|
{
|
|
56
|
-
colourPalette:
|
|
56
|
+
colourPalette: y.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: c,
|
|
61
61
|
type: V,
|
|
62
|
-
count:
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
count: h ? /* @__PURE__ */ s(
|
|
63
|
+
M,
|
|
64
|
+
{
|
|
65
|
+
type: "ThreeDots",
|
|
66
|
+
width: 12,
|
|
67
|
+
height: 12,
|
|
68
|
+
color: n ? "#fff" : y.colors.neutral.ink.dark
|
|
69
|
+
}
|
|
70
|
+
) : B,
|
|
71
|
+
onClick: j,
|
|
72
|
+
subAction: Y,
|
|
65
73
|
ariaContext: "orders",
|
|
66
|
-
ref:
|
|
74
|
+
ref: _,
|
|
67
75
|
"aria-controls": "options-dropdown",
|
|
68
|
-
"aria-expanded":
|
|
76
|
+
"aria-expanded": v.shouldShowDropdown,
|
|
69
77
|
"aria-haspopup": "dialog"
|
|
70
78
|
},
|
|
71
79
|
e == null ? void 0 : e.id
|
|
72
80
|
),
|
|
73
81
|
/* @__PURE__ */ s(
|
|
74
|
-
|
|
82
|
+
te,
|
|
75
83
|
{
|
|
76
|
-
shouldShow:
|
|
77
|
-
viewName:
|
|
78
|
-
onCancel:
|
|
79
|
-
onDelete:
|
|
84
|
+
shouldShow: U,
|
|
85
|
+
viewName: c,
|
|
86
|
+
onCancel: H,
|
|
87
|
+
onDelete: O
|
|
80
88
|
}
|
|
81
89
|
),
|
|
82
90
|
/* @__PURE__ */ s(
|
|
83
|
-
|
|
91
|
+
b,
|
|
84
92
|
{
|
|
85
93
|
tabType: V,
|
|
86
94
|
isActive: n,
|
|
87
|
-
initialViewName:
|
|
88
|
-
shouldShowCreateViewNotification:
|
|
89
|
-
handleSaveDraft:
|
|
95
|
+
initialViewName: c,
|
|
96
|
+
shouldShowCreateViewNotification: r,
|
|
97
|
+
handleSaveDraft: q
|
|
90
98
|
}
|
|
91
99
|
),
|
|
92
|
-
/* @__PURE__ */ s(
|
|
100
|
+
/* @__PURE__ */ s(ee, { referenceElement: o, tab: e, ...W, ...v })
|
|
93
101
|
] });
|
|
94
102
|
});
|
|
95
103
|
export {
|
|
96
|
-
|
|
104
|
+
ge as ViewTab
|
|
97
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("./index80.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 "./index80.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("./index81.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 "./index81.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("./index83.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 "./index83.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/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("./index82.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 "./index82.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"),
|
|
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("./index84.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
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { jsxs as i, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { observer as
|
|
4
|
-
import { ViewsContainer as
|
|
5
|
-
import { FixedViews as
|
|
6
|
-
import { SortableViews as
|
|
7
|
-
import { useViews as
|
|
8
|
-
import { useViewUrlChange as
|
|
9
|
-
import { CreateView as
|
|
10
|
-
import { ViewTab as
|
|
11
|
-
import { useStores as
|
|
12
|
-
import { ErrorBoundary as
|
|
13
|
-
const
|
|
1
|
+
import { jsxs as i, Fragment as w, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
import { observer as V } from "mobx-react";
|
|
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 "./index84.js";
|
|
6
|
+
import { SortableViews as L } from "./index38.js";
|
|
7
|
+
import { useViews as M } from "./index58.js";
|
|
8
|
+
import { useViewUrlChange as b } from "./index59.js";
|
|
9
|
+
import { CreateView as j } from "./index34.js";
|
|
10
|
+
import { ViewTab as l } from "./index33.js";
|
|
11
|
+
import { useStores as y } from "./index57.js";
|
|
12
|
+
import { ErrorBoundary as d } from "./index10.js";
|
|
13
|
+
const H = V(({ viewTabSlotValueMap: t, isLoadingTableData: n }) => {
|
|
14
14
|
const {
|
|
15
|
-
Views: { draftViewsList:
|
|
16
|
-
} =
|
|
17
|
-
return
|
|
15
|
+
Views: { draftViewsList: c }
|
|
16
|
+
} = y(), { viewsArray: p, fixedViews: a } = M(), [s, o] = m(!1), [f, u] = m(null), h = () => o(!1);
|
|
17
|
+
return b(), /* @__PURE__ */ i(w, { children: [
|
|
18
18
|
/* @__PURE__ */ i(
|
|
19
|
-
|
|
19
|
+
v,
|
|
20
20
|
{
|
|
21
21
|
onClickMenu: () => o(!0),
|
|
22
22
|
ariaMenuControls: "views-menu",
|
|
23
|
-
ariaMenuExpanded:
|
|
24
|
-
ref:
|
|
23
|
+
ariaMenuExpanded: s,
|
|
24
|
+
ref: u,
|
|
25
25
|
children: [
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
p.map((r) => /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(l, { view: r, viewTabSlotValueMap: t, isLoadingTableData: n }) }, r.id)),
|
|
27
|
+
c.map((r) => /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(l, { view: r, viewTabSlotValueMap: t, isLoadingTableData: n }) }, r.id))
|
|
28
28
|
]
|
|
29
29
|
}
|
|
30
30
|
),
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
s && /* @__PURE__ */ e(
|
|
32
|
+
x,
|
|
33
33
|
{
|
|
34
34
|
id: "views-menu",
|
|
35
|
-
anchorElement:
|
|
35
|
+
anchorElement: f,
|
|
36
36
|
placement: "bottom",
|
|
37
37
|
onShouldClose: () => o(!1),
|
|
38
|
-
children: /* @__PURE__ */ i(
|
|
39
|
-
/* @__PURE__ */ e(
|
|
40
|
-
/* @__PURE__ */ e(
|
|
41
|
-
/* @__PURE__ */ e(
|
|
42
|
-
/* @__PURE__ */ e(
|
|
38
|
+
children: /* @__PURE__ */ i(C.Surface, { children: [
|
|
39
|
+
/* @__PURE__ */ e(A, { children: a.map((r) => /* @__PURE__ */ e(S, { variant: "placeholder", children: r.label }, r.id || r.label)) }),
|
|
40
|
+
/* @__PURE__ */ e(L, {}),
|
|
41
|
+
/* @__PURE__ */ e(E, {}),
|
|
42
|
+
/* @__PURE__ */ e(j, { hideActionsPopover: h })
|
|
43
43
|
] })
|
|
44
44
|
}
|
|
45
45
|
)
|
|
46
46
|
] });
|
|
47
47
|
});
|
|
48
48
|
export {
|
|
49
|
-
|
|
49
|
+
H as ViewList
|
|
50
50
|
};
|
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 a=(e=>(e.TEXT="text",e.NUMBER="number",e.CHECKBOX="checkbox",e.RADIO="radio",e.DATE_RANGE="date_range",e.NUMBER_RANGE="number_range",e))(a||{});const n={revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateOnMount:!1,revalidateIfStale:!1};exports.FilterChoiceValue=a;exports.SWR_HOOK_OPTIONS=n;
|
package/dist/index45.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
const
|
|
1
|
+
var n = /* @__PURE__ */ ((a) => (a.TEXT = "text", a.NUMBER = "number", a.CHECKBOX = "checkbox", a.RADIO = "radio", a.DATE_RANGE = "date_range", a.NUMBER_RANGE = "number_range", a))(n || {});
|
|
2
|
+
const e = {
|
|
3
3
|
revalidateOnFocus: !1,
|
|
4
|
-
revalidateOnReconnect: !1
|
|
4
|
+
revalidateOnReconnect: !1,
|
|
5
|
+
revalidateOnMount: !1,
|
|
6
|
+
revalidateIfStale: !1
|
|
5
7
|
};
|
|
6
8
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
n as FilterChoiceValue,
|
|
10
|
+
e as SWR_HOOK_OPTIONS
|
|
9
11
|
};
|
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"),a=require("react"),q=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"),a=require("react"),q=require("@veeqo/components"),x=require("./index86.cjs"),o=require("./index87.cjs"),M=require("./index88.cjs"),k=require("./index89.cjs"),t=require("./index90.cjs"),I=require("./index78.cjs"),T=require("./index91.cjs"),j=require("./index92.cjs"),{Glyph:w}=q.VeeqoCommon,D=({onClose:i,columnDefintions:S,hiddenColumns:h,visibleColumns:m})=>{const[c,g]=a.useState(""),s=a.useMemo(()=>new Map(S.map(n=>[n.id,n])),[]),[u,C]=a.useState(()=>({[t.ColumnGroupIds.Hidden]:h,[t.ColumnGroupIds.Visible]:m})),b=a.useMemo(()=>{const n=u[t.ColumnGroupIds.Visible].map(l=>s.get(`${l}`));return j.filterColumnsBySearch(n,c)},[u,s,c]),y=a.useMemo(()=>{const n=u[t.ColumnGroupIds.Hidden].map(l=>s.get(`${l}`));return j.filterColumnsBySearch(n,c)},[u,s,c]),{isSavingColumns:d,saveColumns:v}=T.usePersistColumns(),G=()=>{g(""),C({[t.ColumnGroupIds.Hidden]:h,[t.ColumnGroupIds.Visible]:m})},p=a.useCallback(n=>{g(n)},[]),f=a.useCallback(n=>{const l=s.get(`${n}`);return l?e.jsx(k.ColumnItem,{column:l,isDragOverlay:!0}):null},[s]);return e.jsx(r.Modal,{variant:"lg",style:{overflowY:"hidden"},shouldShow:!0,onClose:()=>i==null?void 0:i(),headerSlot:e.jsxs(o.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(I.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:i,variant:"flat",iconSlot:e.jsx(w,{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(o.ColumnSearch,{name:"column-search-query",placeholder:"Search",value:c,onChange:p,onClearClick:()=>p(""),fill:"100%"})]}),leftActions:[{label:"Reset",onClick:G,variant:"default",disabled:d}],rightActions:[{label:"Cancel",onClick:i,variant:"default",disabled:d},{label:"Save",onClick:()=>v({visibleColumns:m}),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(M.DndContainer,{items:u,setItems:C,renderDragOverlay:f,children:e.jsx(o.Container,{children:e.jsxs(o.ColumnGroupsGrid,{columns:2,spacing:"xl",children:[e.jsx(x.ColumnGroup,{id:t.ColumnGroupIds.Visible,title:"Shown columns:",columns:b}),e.jsx(o.VerticalSeparator,{children:e.jsx(o.VerticalText,{children:"Drag & Drop columns"})}),e.jsx(x.ColumnGroup,{id:t.ColumnGroupIds.Hidden,title:"Hidden columns:",columns:y})]})})})})})})};exports.TableManagementModal=D;
|
package/dist/index77.js
CHANGED
|
@@ -2,14 +2,14 @@ import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
|
2
2
|
import { Modal as G, Stack as m, Text as h, Button as H, Anchor as T } from "@veeqo/ui";
|
|
3
3
|
import { useState as b, useMemo as u, useCallback as S } from "react";
|
|
4
4
|
import { VeeqoCommon as O } from "@veeqo/components";
|
|
5
|
-
import { ColumnGroup as v } from "./
|
|
6
|
-
import { Container as X, ColumnGroupsGrid as A, VerticalSeparator as I, VerticalText as Y, HeaderContainer as $, ColumnSearch as j } from "./
|
|
7
|
-
import { DndContainer as q } from "./
|
|
8
|
-
import { ColumnItem as z } from "./
|
|
9
|
-
import { ColumnGroupIds as r } from "./
|
|
5
|
+
import { ColumnGroup as v } from "./index86.js";
|
|
6
|
+
import { Container as X, ColumnGroupsGrid as A, VerticalSeparator as I, VerticalText as Y, HeaderContainer as $, ColumnSearch as j } from "./index87.js";
|
|
7
|
+
import { DndContainer as q } from "./index88.js";
|
|
8
|
+
import { ColumnItem as z } from "./index89.js";
|
|
9
|
+
import { ColumnGroupIds as r } from "./index90.js";
|
|
10
10
|
import { TableManagementGlyph as B } from "./index78.js";
|
|
11
|
-
import { usePersistColumns as L } from "./
|
|
12
|
-
import { filterColumnsBySearch as y } from "./
|
|
11
|
+
import { usePersistColumns as L } from "./index91.js";
|
|
12
|
+
import { filterColumnsBySearch as y } from "./index92.js";
|
|
13
13
|
const { Glyph: Q } = O, ne = ({
|
|
14
14
|
onClose: i,
|
|
15
15
|
columnDefintions: w,
|
package/dist/index79.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),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,15 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
showHeaderCloseButton: !0,
|
|
26
|
+
children: /* @__PURE__ */ e(r, { variant: "body", children: "This cannot be undone." })
|
|
27
|
+
}
|
|
28
|
+
);
|
|
13
29
|
export {
|
|
14
|
-
|
|
30
|
+
s as Confirmation
|
|
15
31
|
};
|
package/dist/index80.cjs
CHANGED
|
@@ -1,104 +1,19 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
border-left: 1px solid ${e.theme.colors.neutral.grey.dark};
|
|
7
|
-
height: 100%;
|
|
8
|
-
margin-top: 40px;
|
|
9
|
-
`,c=t.default(e.Text)`
|
|
10
|
-
writing-mode: vertical-rl;
|
|
11
|
-
position: absolute;
|
|
12
|
-
top: 50%;
|
|
13
|
-
left: 50%;
|
|
14
|
-
transform: translate(-50%, -50%);
|
|
15
|
-
background: white;
|
|
16
|
-
padding: 30px 0;
|
|
17
|
-
text-align: center;
|
|
18
|
-
font-size: 10px;
|
|
19
|
-
color: ${e.theme.colors.neutral.ink.lightest};
|
|
20
|
-
height: max-content;
|
|
21
|
-
`,d=t.default(e.Text)`
|
|
22
|
-
position: sticky;
|
|
23
|
-
top: 0;
|
|
24
|
-
background: #ffffff;
|
|
25
|
-
padding-bottom: ${e.theme.sizes[2]};
|
|
26
|
-
z-index: 1;
|
|
27
|
-
`,u=t.default(e.Text)`
|
|
28
|
-
color: ${e.theme.colors.neutral.ink.light};
|
|
29
|
-
`,g=t.default(e.Grid)`
|
|
30
|
-
// overflow-y: auto;
|
|
31
|
-
position: unset;
|
|
32
|
-
`,r=t.default(n).attrs(()=>({name:"visibility-off"}))`
|
|
33
|
-
margin-left: auto;
|
|
34
|
-
`,p=t.default(e.Stack)`
|
|
35
|
-
border-radius: 4px;
|
|
36
|
-
padding: 8px 12px;
|
|
37
|
-
background: #ffffff;
|
|
38
|
-
border: 1px solid ${e.theme.colors.neutral.ink.lightest};
|
|
39
|
-
transition: all ease 200ms;
|
|
40
|
-
|
|
41
|
-
${({isHidden:o})=>o&&`
|
|
42
|
-
${e.Text} {
|
|
43
|
-
color: ${e.theme.colors.neutral.ink.light};
|
|
44
|
-
}
|
|
45
|
-
`}
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),e=require("@veeqo/ui"),s=t=>t&&t.__esModule?t:{default:t},o=s(r),i=o.default(e.Button).attrs(()=>({role:"option",variant:"flat"}))`
|
|
2
|
+
margin: ${e.theme.sizes.xs};
|
|
3
|
+
min-width: 180px;
|
|
4
|
+
justify-content: flex-start;
|
|
5
|
+
font-size: ${e.theme.text.body.fontSize};
|
|
46
6
|
|
|
47
7
|
&:hover {
|
|
8
|
+
background-color: ${e.theme.colors.neutral.grey.lightest};
|
|
48
9
|
color: ${e.theme.colors.secondary.blue.base};
|
|
49
|
-
|
|
50
|
-
border: 1px solid ${e.theme.colors.neutral.grey.light};
|
|
51
|
-
|
|
52
|
-
${e.Text} {
|
|
53
|
-
color: ${e.theme.colors.secondary.blue.base};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
${r} {
|
|
57
|
-
color: ${e.theme.colors.neutral.ink.light};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
${({isDragOverlay:o})=>o&&`
|
|
62
|
-
color: ${e.theme.colors.secondary.blue.base};
|
|
63
|
-
background: ${e.theme.colors.neutral.grey.lightest};
|
|
64
|
-
border: 1px solid ${e.theme.colors.neutral.grey.light};
|
|
65
|
-
cursor: grabbing;
|
|
66
|
-
|
|
67
|
-
${e.Text} {
|
|
68
|
-
color: ${e.theme.colors.secondary.blue.base};
|
|
69
|
-
}
|
|
70
|
-
`}
|
|
71
|
-
`,h=t.default.div`
|
|
72
|
-
position: absolute;
|
|
73
|
-
top: 0;
|
|
74
|
-
left: 0;
|
|
75
|
-
right: 0;
|
|
76
|
-
bottom: 0;
|
|
77
|
-
height: 100%;
|
|
78
|
-
width: calc(100% - 2px);
|
|
79
|
-
border-radius: 4px;
|
|
80
|
-
border: 1px dashed ${e.theme.colors.neutral.grey.dark};
|
|
81
|
-
background: ${e.theme.colors.neutral.grey.lightest};
|
|
82
|
-
`,f=t.default(e.Stack)`
|
|
83
|
-
flex: 1;
|
|
84
|
-
padding: 0;
|
|
85
|
-
`,m=t.default(e.Search)`
|
|
86
|
-
input {
|
|
87
|
-
height: 40px;
|
|
88
|
-
box-sizing: border-box;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
svg {
|
|
92
|
-
width: 16px;
|
|
10
|
+
cursor: pointer;
|
|
93
11
|
}
|
|
94
|
-
`,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
`,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
`,y=t.default.dialog`
|
|
103
|
-
display: contents;
|
|
104
|
-
`;exports.ColumnGroupsGrid=g;exports.ColumnItemWrapper=p;exports.ColumnSearch=m;exports.Container=b;exports.DetailedText=u;exports.DndDragOverlayDialog=y;exports.DraggingOverlay=h;exports.DroppableAreaStack=f;exports.HeaderContainer=x;exports.StickyText=d;exports.VerticalSeparator=s;exports.VerticalText=c;exports.VisibilityOffIcon=r;
|
|
12
|
+
`,n=o.default(e.Card.Surface).attrs(()=>({role:"listbox",elevation:4}))`
|
|
13
|
+
margin-top: ${e.theme.sizes.xs};
|
|
14
|
+
background-color: white;
|
|
15
|
+
`,l=o.default.hr`
|
|
16
|
+
width: 100%;
|
|
17
|
+
border-top: 1px solid ${e.theme.colors.neutral.grey.dark};
|
|
18
|
+
margin: 0;
|
|
19
|
+
`;exports.Divider=l;exports.Item=i;exports.MenuItems=n;
|