@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.
Files changed (74) hide show
  1. package/dist/components/Filters/Fields/NumberRangeFilter/MuiSlider.d.ts +1 -1
  2. package/dist/components/TableControls/TableControls.d.ts +5 -1
  3. package/dist/components/Views/ViewList/ViewsList.d.ts +5 -1
  4. package/dist/components/Views/ViewTab/ViewTab.d.ts +4 -3
  5. package/dist/constants/constants.d.ts +2 -4
  6. package/dist/index100.cjs +1 -13
  7. package/dist/index100.js +63 -16
  8. package/dist/index101.cjs +1 -80
  9. package/dist/index101.js +30 -95
  10. package/dist/index12.cjs +1 -1
  11. package/dist/index12.js +20 -20
  12. package/dist/index20.cjs +1 -1
  13. package/dist/index20.js +1 -1
  14. package/dist/index28.cjs +1 -1
  15. package/dist/index28.js +1 -1
  16. package/dist/index31.cjs +1 -1
  17. package/dist/index31.js +1 -1
  18. package/dist/index33.cjs +1 -1
  19. package/dist/index33.js +65 -57
  20. package/dist/index36.cjs +1 -1
  21. package/dist/index36.js +1 -1
  22. package/dist/index37.cjs +1 -1
  23. package/dist/index37.js +1 -1
  24. package/dist/index38.cjs +1 -1
  25. package/dist/index38.js +1 -1
  26. package/dist/index39.cjs +1 -1
  27. package/dist/index39.js +1 -1
  28. package/dist/index41.cjs +1 -1
  29. package/dist/index41.js +30 -30
  30. package/dist/index45.cjs +1 -1
  31. package/dist/index45.js +7 -5
  32. package/dist/index77.cjs +1 -1
  33. package/dist/index77.js +7 -7
  34. package/dist/index79.cjs +1 -1
  35. package/dist/index79.js +29 -13
  36. package/dist/index80.cjs +15 -100
  37. package/dist/index80.js +19 -115
  38. package/dist/index81.cjs +1 -1
  39. package/dist/index81.js +19 -65
  40. package/dist/index82.cjs +80 -1
  41. package/dist/index82.js +95 -29
  42. package/dist/index83.cjs +1 -1
  43. package/dist/index83.js +15 -2
  44. package/dist/index84.cjs +12 -1
  45. package/dist/index84.js +16 -40
  46. package/dist/index85.cjs +1 -1
  47. package/dist/index85.js +23 -7
  48. package/dist/index86.cjs +1 -1
  49. package/dist/index86.js +13 -24
  50. package/dist/index87.cjs +104 -1
  51. package/dist/index87.js +118 -27
  52. package/dist/index88.cjs +1 -19
  53. package/dist/index88.js +67 -23
  54. package/dist/index89.cjs +1 -1
  55. package/dist/index89.js +28 -14
  56. package/dist/index90.cjs +1 -80
  57. package/dist/index90.js +2 -95
  58. package/dist/index91.cjs +1 -12
  59. package/dist/index91.js +41 -16
  60. package/dist/index92.cjs +1 -1
  61. package/dist/index92.js +8 -22
  62. package/dist/index94.cjs +80 -1
  63. package/dist/index94.js +95 -19
  64. package/dist/index95.cjs +13 -1
  65. package/dist/index95.js +17 -8
  66. package/dist/index96.cjs +1 -1
  67. package/dist/index96.js +62 -63
  68. package/dist/index97.cjs +1 -1
  69. package/dist/index97.js +36 -30
  70. package/dist/index98.cjs +1 -1
  71. package/dist/index98.js +19 -63
  72. package/dist/index99.cjs +1 -1
  73. package/dist/index99.js +8 -36
  74. package/package.json +1 -1
package/dist/index33.js CHANGED
@@ -1,97 +1,105 @@
1
- import { jsxs as O, Fragment as U, jsx as s } from "react/jsx-runtime";
2
- import { useState as W, useRef as Y, useMemo as C } from "react";
3
- import { ViewTab as $, theme as z } from "@veeqo/ui";
4
- import { observer as G } from "mobx-react";
5
- import { useCustomViews as J } from "./index60.js";
6
- import { useViews as K } from "./index58.js";
7
- import { PillNotifications as Q } from "./index37.js";
8
- import { ViewDropdowns as X } from "./index40.js";
9
- import { useDropdownManager as Z } from "./index52.js";
10
- import { useBusinessLogic as b } from "./index7.js";
11
- import { useStores as ee } from "./index57.js";
12
- import { Confirmation as ie } from "./index87.js";
13
- const we = G(({ view: e }) => {
14
- const { VIEW_TYPE: S, SEARCH_FILTER_ID: l } = b(), {
15
- Filters: { activeViewId: c, initFiltersFromView: d, discardChanges: f, initFromUrl: m, filters: F, setFilter: L },
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: x }
18
- } = ee(), { viewsMap: u, defaultCustomViewId: y, isLoading: E } = K(), { isLoading: N, isValidating: A } = J({ type: S }), [o, M] = W(null), R = (i) => {
19
- const v = F.get(l);
20
- if (u.has(i)) {
21
- const r = u.get(i);
22
- r && (d(r), f(!0), m());
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 r = T.get(i);
25
- r ? (d(r), f(!0), m()) : x({
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
- v && L(l, v);
31
- }, n = (e == null ? void 0 : e.id) === c, t = e.originalView !== void 0, w = e.originalView === void 0, I = "100", a = (e == null ? void 0 : e.label) || "", P = E || A || N, p = Y(!1);
32
- !P && !p.current && n && e.id === y && o && (p.current = !0, o && c === e.id && window.requestAnimationFrame(() => {
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 = C(() => t ? "draft" : e.editable ? "saved" : "fixed", [t, e.editable]), {
39
+ const V = L(() => r ? "draft" : e.editable ? "saved" : "fixed", [r, e.editable]), {
40
40
  actions: {
41
- create: { handleSaveDraft: _ },
42
- menu: { toggleDropdown: h },
43
- delete: { closeDeleteConfirmation: j, handleDelete: k, handleDeleteDraftView: g }
41
+ create: { handleSaveDraft: q },
42
+ menu: { toggleDropdown: D },
43
+ delete: { closeDeleteConfirmation: H, handleDelete: O, handleDeleteDraftView: C }
44
44
  },
45
- state: { shouldShowDeleteConfirmation: B },
46
- actions: q,
47
- state: D
48
- } = Z(e), H = C(() => {
49
- if (w) return h;
50
- if (t) return g;
51
- }, [g, t, w, h]);
52
- return /* @__PURE__ */ O(U, { children: [
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: z.colors.secondary.blue,
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: a,
60
+ name: c,
61
61
  type: V,
62
- count: I,
63
- onClick: R,
64
- subAction: H,
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: M,
74
+ ref: _,
67
75
  "aria-controls": "options-dropdown",
68
- "aria-expanded": D.shouldShowDropdown,
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
- ie,
82
+ te,
75
83
  {
76
- shouldShow: B,
77
- viewName: a,
78
- onCancel: j,
79
- onDelete: k
84
+ shouldShow: U,
85
+ viewName: c,
86
+ onCancel: H,
87
+ onDelete: O
80
88
  }
81
89
  ),
82
90
  /* @__PURE__ */ s(
83
- Q,
91
+ b,
84
92
  {
85
93
  tabType: V,
86
94
  isActive: n,
87
- initialViewName: a,
88
- shouldShowCreateViewNotification: t,
89
- handleSaveDraft: _
95
+ initialViewName: c,
96
+ shouldShowCreateViewNotification: r,
97
+ handleSaveDraft: q
90
98
  }
91
99
  ),
92
- /* @__PURE__ */ s(X, { referenceElement: o, tab: e, ...q, ...D })
100
+ /* @__PURE__ */ s(ee, { referenceElement: o, tab: e, ...W, ...v })
93
101
  ] });
94
102
  });
95
103
  export {
96
- we as ViewTab
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("./index88.cjs"),g=require("./index48.cjs"),j=require("./index47.cjs"),M=({tab:i,onMakeDefault:l,onEdit:n,onDuplicate:s,onDelete:o,shouldShowDropdown:a,handleCloseDropdown:c})=>{const{openModal:r}=g.useModal(),d=()=>{r(j.ModalId.ORDERS_TABLE_MANAGEMENT),c()},m=i.label!=="Picking In Progress"&&i.editable,u=i.default!==!1&&i.editable,p=i.editable,b=i.editable;return a?e.jsxs(t.MenuItems,{children:[u&&e.jsx(t.Item,{onClick:l,className:"act-react-listing-custom-view-make-default-menu-item",children:"Make default view"}),b&&e.jsx(t.Item,{onClick:n,className:"act-react-listing-custom-view-edit-menu-item",role:"option",children:"Edit"}),e.jsx(t.Item,{onClick:s,className:"act-react-listing-custom-view-duplicate-menu-item",role:"option",children:"Duplicate"}),m&&e.jsx(t.Item,{onClick:o,className:"act-react-listing-custom-view-delete-menu-item",role:"option",children:"Delete"}),p&&e.jsxs(e.Fragment,{children:[e.jsx(t.Divider,{}),e.jsx(t.Item,{onClick:d,role:"option",children:"Table management"})]})]}):null};exports.OptionsDropdown=M;
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 "./index88.js";
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("./index92.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;
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 "./index92.js";
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("./index89.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;
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 "./index89.js";
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("./index90.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;
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 "./index90.js";
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"),n=require("react"),V=require("mobx-react"),s=require("@veeqo/ui"),t=require("./index91.cjs"),j=require("./index38.cjs"),m=require("./index58.cjs"),S=require("./index59.cjs"),q=require("./index34.cjs"),u=require("./index33.cjs"),p=require("./index57.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;
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 u, jsx as e } from "react/jsx-runtime";
2
- import { useState as n } from "react";
3
- import { observer as h } from "mobx-react";
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 "./index91.js";
6
- import { SortableViews as b } from "./index38.js";
7
- import { useViews as A } from "./index58.js";
8
- import { useViewUrlChange as L } from "./index59.js";
9
- import { CreateView as M } from "./index34.js";
10
- import { ViewTab as s } from "./index33.js";
11
- import { useStores as T } from "./index57.js";
12
- import { ErrorBoundary as m } from "./index10.js";
13
- const z = h(() => {
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: l }
16
- } = T(), { viewsArray: a, fixedViews: d } = A(), [t, o] = n(!1), [p, c] = n(null), f = () => o(!1);
17
- return L(), /* @__PURE__ */ i(u, { children: [
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
- w,
19
+ v,
20
20
  {
21
21
  onClickMenu: () => o(!0),
22
22
  ariaMenuControls: "views-menu",
23
- ariaMenuExpanded: t,
24
- ref: c,
23
+ ariaMenuExpanded: s,
24
+ ref: u,
25
25
  children: [
26
- a.map((r) => /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(s, { view: r }) }, r.id)),
27
- l.map((r) => /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(s, { view: r }) }, r.id))
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
- t && /* @__PURE__ */ e(
32
- V,
31
+ s && /* @__PURE__ */ e(
32
+ x,
33
33
  {
34
34
  id: "views-menu",
35
- anchorElement: p,
35
+ anchorElement: f,
36
36
  placement: "bottom",
37
37
  onShouldClose: () => o(!1),
38
- children: /* @__PURE__ */ i(v.Surface, { children: [
39
- /* @__PURE__ */ e(x, { children: d.map((r) => /* @__PURE__ */ e(S, { variant: "placeholder", children: r.label }, r.id || r.label)) }),
40
- /* @__PURE__ */ e(b, {}),
41
- /* @__PURE__ */ e(C, {}),
42
- /* @__PURE__ */ e(M, { hideActionsPopover: f })
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
- z as ViewList
49
+ H as ViewList
50
50
  };
package/dist/index45.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var n=(O=>(O.TEXT="text",O.NUMBER="number",O.CHECKBOX="checkbox",O.RADIO="radio",O.DATE_RANGE="date_range",O.NUMBER_RANGE="number_range",O))(n||{});const e={revalidateOnFocus:!1,revalidateOnReconnect:!1};exports.FilterChoiceValue=n;exports.SWR_HOOK_OPTIONS=e;
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 O = /* @__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))(O || {});
2
- const E = {
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
- O as FilterChoiceValue,
8
- E as SWR_HOOK_OPTIONS
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("./index79.cjs"),o=require("./index80.cjs"),M=require("./index81.cjs"),k=require("./index82.cjs"),t=require("./index83.cjs"),I=require("./index78.cjs"),T=require("./index84.cjs"),j=require("./index85.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;
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 "./index79.js";
6
- import { Container as X, ColumnGroupsGrid as A, VerticalSeparator as I, VerticalText as Y, HeaderContainer as $, ColumnSearch as j } from "./index80.js";
7
- import { DndContainer as q } from "./index81.js";
8
- import { ColumnItem as z } from "./index82.js";
9
- import { ColumnGroupIds as r } from "./index83.js";
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 "./index84.js";
12
- import { filterColumnsBySearch as y } from "./index85.js";
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"),o=require("@veeqo/ui"),s=require("@dnd-kit/sortable"),a=require("./index94.cjs"),l=require("./index95.cjs"),c=require("./index82.cjs"),u=require("./index83.cjs"),d=require("./index80.cjs"),m=({id:r,title:n,columns:i})=>e.jsxs(o.Stack,{spacing:"sm",alignX:"stretch",children:[e.jsx(d.StickyText,{variant:"bodyBold",children:n}),e.jsx(s.SortableContext,{id:r,items:i,strategy:s.verticalListSortingStrategy,children:e.jsx(l.DroppableArea,{id:r,spacing:"sm",alignX:"stretch",children:i.map(t=>e.jsx(a.SortableItem,{id:t.id,children:e.jsx(c.ColumnItem,{column:t,isHidden:r===u.ColumnGroupIds.Hidden})},t.id))})})]});exports.ColumnGroup=m;
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 { jsxs as m, jsx as r } from "react/jsx-runtime";
2
- import { Stack as n } from "@veeqo/ui";
3
- import { SortableContext as p, verticalListSortingStrategy as a } from "@dnd-kit/sortable";
4
- import { SortableItem as s } from "./index94.js";
5
- import { DroppableArea as d } from "./index95.js";
6
- import { ColumnItem as l } from "./index82.js";
7
- import { ColumnGroupIds as c } from "./index83.js";
8
- import { StickyText as f } from "./index80.js";
9
- const I = ({ id: t, title: e, columns: o }) => /* @__PURE__ */ m(n, { spacing: "sm", alignX: "stretch", children: [
10
- /* @__PURE__ */ r(f, { variant: "bodyBold", children: e }),
11
- /* @__PURE__ */ r(p, { id: t, items: o, strategy: a, children: /* @__PURE__ */ r(d, { id: t, spacing: "sm", alignX: "stretch", children: o.map((i) => /* @__PURE__ */ r(s, { id: i.id, children: /* @__PURE__ */ r(l, { column: i, isHidden: t === c.Hidden }) }, i.id)) }) })
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
- I as ColumnGroup
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 l=require("styled-components"),e=require("@veeqo/ui"),a=require("@veeqo/components"),i=o=>o&&o.__esModule?o:{default:o},t=i(l),{Glyph:n}=a.VeeqoCommon,s=t.default.div`
2
- width: 1px;
3
- position: absolute;
4
- left: 50%;
5
- transform: translateX(-50%);
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
- background: ${e.theme.colors.neutral.grey.lightest};
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
- `,b=t.default.div`
95
- position: relative;
96
- min-height: 500px;
97
- `,x=t.default(e.BaseContainer)`
98
- display: flex;
99
- flex-direction: column;
100
- gap: ${e.theme.sizes.base};
101
- padding: ${e.theme.sizes.md};
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;