@veeqo/transfigure 0.0.4 → 0.0.6
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/BusinessLogic/types.d.ts +2 -0
- package/dist/components/TableManagement/DndContainer.d.ts +11 -0
- package/dist/components/TableManagement/TableManagement.d.ts +6 -0
- package/dist/components/TableManagement/TableManagementGlyph.d.ts +4 -0
- package/dist/components/TableManagement/TableManagementModal.d.ts +2 -0
- package/dist/components/TableManagement/components/ColumnGroup.d.ts +2 -0
- package/dist/components/TableManagement/components/ColumnItem.d.ts +2 -0
- package/dist/components/TableManagement/components/DroppableArea.d.ts +8 -0
- package/dist/components/TableManagement/components/SortableItem.d.ts +7 -0
- package/dist/components/TableManagement/components/styled.d.ts +28 -0
- package/dist/components/TableManagement/components/types.d.ts +11 -0
- package/dist/components/TableManagement/hooks/useCollisionDetectionStrategy/index.d.ts +1 -0
- package/dist/components/TableManagement/hooks/useCollisionDetectionStrategy/types.d.ts +4 -0
- package/dist/components/TableManagement/hooks/useCollisionDetectionStrategy/useCollisionDetectionStrategy.d.ts +5 -0
- package/dist/components/TableManagement/hooks/useDragHandlers/index.d.ts +1 -0
- package/dist/components/TableManagement/hooks/useDragHandlers/types.d.ts +6 -0
- package/dist/components/TableManagement/hooks/useDragHandlers/useDragHandlers.d.ts +9 -0
- package/dist/components/TableManagement/index.d.ts +1 -0
- package/dist/components/TableManagement/types.d.ts +17 -0
- package/dist/components/TableManagement/utils/filterColumnsBySearch/filterColumnsBySearch.d.ts +2 -0
- package/dist/components/TableManagement/utils/filterColumnsBySearch/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useHiddenColumns/index.d.ts +1 -0
- package/dist/hooks/useHiddenColumns/useHiddenColumns.d.ts +7 -0
- package/dist/hooks/usePersistColumns/index.d.ts +1 -0
- package/dist/hooks/usePersistColumns/usePersistColumns.d.ts +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +79 -75
- package/dist/index100.cjs +13 -0
- package/dist/index100.js +19 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +38 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +44 -0
- package/dist/index103.cjs +7 -0
- package/dist/index103.js +12 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +1 -1
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +2 -2
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +2 -2
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +1 -1
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +2 -2
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +2 -2
- package/dist/index2.cjs +1 -1
- package/dist/index2.js +2 -2
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +3 -3
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +2 -2
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +2 -2
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +3 -3
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +3 -3
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +1 -1
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +2 -2
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +2 -2
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +3 -3
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +1 -1
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +5 -5
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +3 -3
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +3 -3
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +4 -4
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +2 -2
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +4 -4
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +46 -19
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +19 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +2 -23
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +23 -2
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +2 -4
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +4 -11
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +10 -12
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +2 -2
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +12 -11
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +11 -184
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +183 -25
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +26 -24
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +19 -22
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +25 -90
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +92 -8
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +8 -50
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +49 -60
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +61 -17
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +4 -4
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +18 -316
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +25 -59
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +309 -50
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +54 -31
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +52 -27
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +37 -4
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +32 -9
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +4 -17
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +9 -19
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +16 -46
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +19 -17
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +48 -2
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +21 -9
- package/dist/index73.cjs +1 -3
- package/dist/index73.js +2 -14
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +8 -8
- package/dist/index75.cjs +3 -1
- package/dist/index75.js +13 -28
- package/dist/index76.cjs +1 -19
- package/dist/index76.js +9 -24
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +154 -14
- package/dist/index78.cjs +1 -12
- package/dist/index78.js +19 -16
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +13 -22
- package/dist/index81.cjs +104 -1
- package/dist/index81.js +119 -23
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +58 -2
- package/dist/index83.cjs +1 -13
- package/dist/index83.js +28 -16
- package/dist/index84.cjs +1 -80
- package/dist/index84.js +2 -95
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +33 -35
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +8 -63
- package/dist/index87.cjs +1 -7
- package/dist/index87.js +29 -10
- package/dist/index88.cjs +1 -0
- package/dist/index88.js +24 -0
- package/dist/index89.cjs +19 -0
- package/dist/index89.js +26 -0
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +17 -15
- package/dist/index90.cjs +12 -0
- package/dist/index90.js +18 -0
- package/dist/index91.cjs +1 -0
- package/dist/index91.js +17 -0
- package/dist/index92.cjs +1 -0
- package/dist/index92.js +26 -0
- package/dist/index93.cjs +1 -0
- package/dist/index93.js +4 -0
- package/dist/index94.cjs +1 -0
- package/dist/index94.js +21 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +10 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +66 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +32 -0
- package/dist/index98.cjs +1 -0
- package/dist/index98.js +65 -0
- package/dist/index99.cjs +80 -0
- package/dist/index99.js +97 -0
- package/dist/types.d.ts +8 -0
- package/package.json +11 -2
package/dist/index36.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 "./
|
|
3
|
-
import { useModal as k } from "./
|
|
4
|
-
import { ModalId as T } from "./
|
|
2
|
+
import { MenuItems as M, Item as l, Divider as h } from "./index89.js";
|
|
3
|
+
import { useModal as k } from "./index48.js";
|
|
4
|
+
import { ModalId as T } from "./index47.js";
|
|
5
5
|
const N = ({
|
|
6
6
|
tab: e,
|
|
7
7
|
onMakeDefault: 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("./
|
|
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("./index88.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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
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
|
-
import { useViews as v } from "./
|
|
5
|
-
import { InfoPill as w } from "./
|
|
4
|
+
import { useViews as v } from "./index58.js";
|
|
5
|
+
import { InfoPill as w } from "./index88.js";
|
|
6
6
|
import { UnsavedChangesPill as x } from "./index39.js";
|
|
7
|
-
import { useStores as g } from "./
|
|
7
|
+
import { useStores as g } from "./index57.js";
|
|
8
8
|
const F = h(
|
|
9
9
|
({
|
|
10
10
|
tabType: o,
|
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("./index91.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,11 +1,11 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f } from "react";
|
|
3
|
-
import { LegacySortableViews as l } from "./
|
|
4
|
-
import { useCustomViews as w } from "./
|
|
5
|
-
import { useViews as d } from "./
|
|
3
|
+
import { LegacySortableViews as l } from "./index91.js";
|
|
4
|
+
import { useCustomViews as w } from "./index60.js";
|
|
5
|
+
import { useViews as d } from "./index58.js";
|
|
6
6
|
import { patchCurrentUser as g } from "./index3.js";
|
|
7
7
|
import { useBusinessLogic as _ } from "./index7.js";
|
|
8
|
-
import { useStores as S } from "./
|
|
8
|
+
import { useStores as S } from "./index57.js";
|
|
9
9
|
import { ErrorBoundary as b } from "./index10.js";
|
|
10
10
|
const N = () => {
|
|
11
11
|
const { VIEW_TYPE: m } = _(), { sortedCustomViews: s, isLoading: a } = d(), { mutate: n } = w({ type: m }), [u, o] = f(s), { Notifications: { notify: c } } = S(), p = async (e) => {
|
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("./index79.cjs"),u=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("./index79.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
|
@@ -3,7 +3,7 @@ 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
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 "./index79.js";
|
|
6
|
-
import { usePersistUnsavedChanges as k } from "./
|
|
6
|
+
import { usePersistUnsavedChanges as k } from "./index56.js";
|
|
7
7
|
const S = u.colors.secondary.blue.base, A = p(
|
|
8
8
|
({
|
|
9
9
|
onDiscard: s,
|
package/dist/index4.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index6.cjs"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index6.cjs"),i=require("./index49.cjs"),o=require("./index50.cjs"),a=(t,{attributes:e})=>s.axios.patch(`/api/v2/custom_views/${t}`,{data:{attributes:e,type:"custom_view"}},i.withCSRF(o.vndAPI));exports.patchCustomView=a;
|
package/dist/index4.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { axios as i } from "./index6.js";
|
|
2
|
-
import { withCSRF as m } from "./
|
|
3
|
-
import { vndAPI as p } from "./
|
|
2
|
+
import { withCSRF as m } from "./index49.js";
|
|
3
|
+
import { vndAPI as p } from "./index50.js";
|
|
4
4
|
const c = (t, { attributes: o }) => i.patch(`/api/v2/custom_views/${t}`, { data: { attributes: o, type: "custom_view" } }, m(p));
|
|
5
5
|
export {
|
|
6
6
|
c as patchCustomView
|
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("./
|
|
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("./index90.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;
|
package/dist/index41.js
CHANGED
|
@@ -2,13 +2,13 @@ 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 "./index90.js";
|
|
6
6
|
import { SortableViews as b } from "./index38.js";
|
|
7
|
-
import { useViews as A } from "./
|
|
8
|
-
import { useViewUrlChange as L } from "./
|
|
7
|
+
import { useViews as A } from "./index58.js";
|
|
8
|
+
import { useViewUrlChange as L } from "./index59.js";
|
|
9
9
|
import { CreateView as M } from "./index34.js";
|
|
10
10
|
import { ViewTab as s } from "./index33.js";
|
|
11
|
-
import { useStores as T } from "./
|
|
11
|
+
import { useStores as T } from "./index57.js";
|
|
12
12
|
import { ErrorBoundary as m } from "./index10.js";
|
|
13
13
|
const z = h(() => {
|
|
14
14
|
const {
|
package/dist/index43.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 s=require("react/jsx-runtime"),S=require("./index77.cjs"),u=require("@veeqo/ui"),q=require("./index78.cjs"),A=require("mobx-react"),I=require("./index7.cjs"),L=require("./index48.cjs"),p=require("./index57.cjs"),x=require("./index58.cjs"),c=require("./index47.cjs"),C=A.observer(({columnDefinitions:r})=>{var i;const{DEFAULT_HIDDEN_COLUMNS:o,DEFAULT_VISIBLE_COLUMNS:n}=I.useBusinessLogic(),m=[...o,...n],{closeModal:d,isModalOpen:M,openModal:b}=L.useModal(),{Filters:{activeViewId:t}}=p.useStores(),{viewsMap:T}=x.useViews();if(!t)return null;const e=T.get(t),a=Array.isArray((i=e==null?void 0:e.columns)==null?void 0:i.columnIds),l=a?e.columns.columnIds:n,g=a?m.filter(E=>!l.includes(E)):o;return s.jsxs(s.Fragment,{children:[s.jsx(u.Tooltip,{text:e!=null&&e.editable?"Table management":"Go to a custom view to use Table management",children:s.jsx(u.Button,{"aria-label":"Open table management",onClick:()=>b(c.ModalId.ORDERS_TABLE_MANAGEMENT),size:"sm",iconSlot:s.jsx(q.TableManagementGlyph,{}),disabled:!(e!=null&&e.editable)})}),M(c.ModalId.ORDERS_TABLE_MANAGEMENT)&&s.jsx(S.TableManagementModal,{visibleColumns:l,hiddenColumns:g,columnDefintions:r,onClose:d})]})});exports.TableManagement=C;
|
package/dist/index43.js
CHANGED
|
@@ -1,21 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsxs as E, Fragment as T, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { TableManagementModal as A } from "./index77.js";
|
|
3
|
+
import { Tooltip as g, Button as C } from "@veeqo/ui";
|
|
4
|
+
import { TableManagementGlyph as L } from "./index78.js";
|
|
5
|
+
import { observer as S } from "mobx-react";
|
|
6
|
+
import { useBusinessLogic as _ } from "./index7.js";
|
|
7
|
+
import { useModal as D } from "./index48.js";
|
|
8
|
+
import { useStores as I } from "./index57.js";
|
|
9
|
+
import { useViews as N } from "./index58.js";
|
|
10
|
+
import { ModalId as i } from "./index47.js";
|
|
11
|
+
const j = S(({ columnDefinitions: r }) => {
|
|
12
|
+
var a;
|
|
13
|
+
const { DEFAULT_HIDDEN_COLUMNS: s, DEFAULT_VISIBLE_COLUMNS: n } = _(), c = [...s, ...n], { closeModal: d, isModalOpen: p, openModal: u } = D(), { Filters: { activeViewId: t } } = I(), { viewsMap: M } = N();
|
|
14
|
+
if (!t) return null;
|
|
15
|
+
const o = M.get(t), m = Array.isArray((a = o == null ? void 0 : o.columns) == null ? void 0 : a.columnIds), l = m ? o.columns.columnIds : n, b = m ? c.filter(
|
|
16
|
+
(f) => !l.includes(f)
|
|
17
|
+
) : s;
|
|
18
|
+
return /* @__PURE__ */ E(T, { children: [
|
|
19
|
+
/* @__PURE__ */ e(
|
|
20
|
+
g,
|
|
21
|
+
{
|
|
22
|
+
text: o != null && o.editable ? "Table management" : "Go to a custom view to use Table management",
|
|
23
|
+
children: /* @__PURE__ */ e(
|
|
24
|
+
C,
|
|
25
|
+
{
|
|
26
|
+
"aria-label": "Open table management",
|
|
27
|
+
onClick: () => u(i.ORDERS_TABLE_MANAGEMENT),
|
|
28
|
+
size: "sm",
|
|
29
|
+
iconSlot: /* @__PURE__ */ e(L, {}),
|
|
30
|
+
disabled: !(o != null && o.editable)
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
p(i.ORDERS_TABLE_MANAGEMENT) && /* @__PURE__ */ e(
|
|
36
|
+
A,
|
|
37
|
+
{
|
|
38
|
+
visibleColumns: l,
|
|
39
|
+
hiddenColumns: b,
|
|
40
|
+
columnDefintions: r,
|
|
41
|
+
onClose: d
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] });
|
|
45
|
+
});
|
|
18
46
|
export {
|
|
19
|
-
|
|
20
|
-
_ as DateValue
|
|
47
|
+
j as TableManagement
|
|
21
48
|
};
|
package/dist/index44.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("@veeqo/ui"),_={...T.DateRanges,CUSTOM:"CUSTOM"},A=new Map([["CUSTOM",T.DATE_RANGE_OPTIONS[0]],[_.TODAY,T.DATE_RANGE_OPTIONS[1]],[_.YESTERDAY,T.DATE_RANGE_OPTIONS[2]],[_.LAST_7_DAYS,T.DATE_RANGE_OPTIONS[3]],[_.LAST_30_DAYS,T.DATE_RANGE_OPTIONS[4]],[_.LAST_90_DAYS,T.DATE_RANGE_OPTIONS[5]],[_.LAST_MONTH,T.DATE_RANGE_OPTIONS[6]],[_.LAST_12_MONTHS,T.DATE_RANGE_OPTIONS[7]],[_.WEEK_TO_DATE,T.DATE_RANGE_OPTIONS[8]],[_.MONTH_TO_DATE,T.DATE_RANGE_OPTIONS[9]],[_.YEAR_TO_DATE,T.DATE_RANGE_OPTIONS[10]]]);exports.DateOptionMap=A;exports.DateValue=_;
|
package/dist/index44.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { DateRanges as A, DATE_RANGE_OPTIONS as T } from "@veeqo/ui";
|
|
2
|
+
const _ = {
|
|
3
|
+
...A,
|
|
4
|
+
CUSTOM: "CUSTOM"
|
|
5
|
+
}, O = /* @__PURE__ */ new Map([
|
|
6
|
+
["CUSTOM", T[0]],
|
|
7
|
+
[_.TODAY, T[1]],
|
|
8
|
+
[_.YESTERDAY, T[2]],
|
|
9
|
+
[_.LAST_7_DAYS, T[3]],
|
|
10
|
+
[_.LAST_30_DAYS, T[4]],
|
|
11
|
+
[_.LAST_90_DAYS, T[5]],
|
|
12
|
+
[_.LAST_MONTH, T[6]],
|
|
13
|
+
[_.LAST_12_MONTHS, T[7]],
|
|
14
|
+
[_.WEEK_TO_DATE, T[8]],
|
|
15
|
+
[_.MONTH_TO_DATE, T[9]],
|
|
16
|
+
[_.YEAR_TO_DATE, T[10]]
|
|
17
|
+
]);
|
|
2
18
|
export {
|
|
3
|
-
|
|
19
|
+
O as DateOptionMap,
|
|
20
|
+
_ as DateValue
|
|
4
21
|
};
|
package/dist/index45.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var n=(r=>(r.TEXT="text",r.NUMBER="number",r.CHECKBOX="checkbox",r.RADIO="radio",r.DATE_RANGE="date_range",r.NUMBER_RANGE="number_range",r))(n||{});exports.FilterChoiceValue=n;
|
package/dist/index45.js
CHANGED
|
@@ -1,25 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { useState as i, useCallback as n, useMemo as u, createContext as p } from "react";
|
|
3
|
-
const v = p(null), f = ({ children: r }) => {
|
|
4
|
-
const [s, a] = i(null), e = n(
|
|
5
|
-
(o) => o === s,
|
|
6
|
-
[s]
|
|
7
|
-
), t = n(() => {
|
|
8
|
-
a(null);
|
|
9
|
-
}, []), l = n((o) => {
|
|
10
|
-
a(o);
|
|
11
|
-
}, []), c = n(
|
|
12
|
-
(o) => {
|
|
13
|
-
e(o) ? t() : l(o);
|
|
14
|
-
},
|
|
15
|
-
[t, e, l]
|
|
16
|
-
), M = u(
|
|
17
|
-
() => ({ closeModal: t, isModalOpen: e, openModal: l, toggleModal: c }),
|
|
18
|
-
[t, e, l, c]
|
|
19
|
-
);
|
|
20
|
-
return /* @__PURE__ */ d(v.Provider, { value: M, children: r });
|
|
21
|
-
};
|
|
1
|
+
var n = /* @__PURE__ */ ((E) => (E.TEXT = "text", E.NUMBER = "number", E.CHECKBOX = "checkbox", E.RADIO = "radio", E.DATE_RANGE = "date_range", E.NUMBER_RANGE = "number_range", E))(n || {});
|
|
22
2
|
export {
|
|
23
|
-
|
|
24
|
-
f as ModalProvider
|
|
3
|
+
n as FilterChoiceValue
|
|
25
4
|
};
|
package/dist/index46.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),e=require("react"),r=e.createContext(null),M=({children:u})=>{const[s,n]=e.useState(null),t=e.useCallback(o=>o===s,[s]),l=e.useCallback(()=>{n(null)},[]),a=e.useCallback(o=>{n(o)},[]),c=e.useCallback(o=>{t(o)?l():a(o)},[l,t,a]),d=e.useMemo(()=>({closeModal:l,isModalOpen:t,openModal:a,toggleModal:c}),[l,t,a,c]);return i.jsx(r.Provider,{value:d,children:u})};exports.ModalContext=r;exports.ModalProvider=M;
|
package/dist/index46.js
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useState as i, useCallback as n, useMemo as u, createContext as p } from "react";
|
|
3
|
+
const v = p(null), f = ({ children: r }) => {
|
|
4
|
+
const [s, a] = i(null), e = n(
|
|
5
|
+
(o) => o === s,
|
|
6
|
+
[s]
|
|
7
|
+
), t = n(() => {
|
|
8
|
+
a(null);
|
|
9
|
+
}, []), l = n((o) => {
|
|
10
|
+
a(o);
|
|
11
|
+
}, []), c = n(
|
|
12
|
+
(o) => {
|
|
13
|
+
e(o) ? t() : l(o);
|
|
14
|
+
},
|
|
15
|
+
[t, e, l]
|
|
16
|
+
), M = u(
|
|
17
|
+
() => ({ closeModal: t, isModalOpen: e, openModal: l, toggleModal: c }),
|
|
18
|
+
[t, e, l, c]
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ d(v.Provider, { value: M, children: r });
|
|
21
|
+
};
|
|
2
22
|
export {
|
|
3
|
-
|
|
23
|
+
v as ModalContext,
|
|
24
|
+
f as ModalProvider
|
|
4
25
|
};
|
package/dist/index47.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=(e=>(e.ORDERS_TABLE_MANAGEMENT="ORDERS_TABLE_MANAGEMENT",e))(E||{});exports.ModalId=E;
|
package/dist/index47.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { ModalContext as t } from "./index45.js";
|
|
3
|
-
const m = () => o(t);
|
|
1
|
+
var A = /* @__PURE__ */ ((E) => (E.ORDERS_TABLE_MANAGEMENT = "ORDERS_TABLE_MANAGEMENT", E))(A || {});
|
|
4
2
|
export {
|
|
5
|
-
|
|
3
|
+
A as ModalId
|
|
6
4
|
};
|
package/dist/index48.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"),t=require("./index46.cjs"),o=()=>e.useContext(t.ModalContext);exports.useModal=o;
|
package/dist/index48.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
...t,
|
|
5
|
-
headers: {
|
|
6
|
-
...n,
|
|
7
|
-
"x-csrf-token": o
|
|
8
|
-
}
|
|
9
|
-
} : t;
|
|
10
|
-
};
|
|
1
|
+
import { useContext as o } from "react";
|
|
2
|
+
import { ModalContext as t } from "./index46.js";
|
|
3
|
+
const m = () => o(t);
|
|
11
4
|
export {
|
|
12
|
-
|
|
5
|
+
m as useModal
|
|
13
6
|
};
|
package/dist/index49.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 c=(t={})=>{const{headers:r={}}=t,e=document.querySelector('meta[name="csrf-token"]'),n=e?e.content:null,o=window.localStorage.csrf||n;return o?{...t,headers:{...r,"x-csrf-token":o}}:t};exports.withCSRF=c;
|
package/dist/index49.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
const
|
|
2
|
-
headers: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
1
|
+
const a = (t = {}) => {
|
|
2
|
+
const { headers: n = {} } = t, e = document.querySelector('meta[name="csrf-token"]'), r = e ? e.content : null, o = window.localStorage.csrf || r;
|
|
3
|
+
return o ? {
|
|
4
|
+
...t,
|
|
5
|
+
headers: {
|
|
6
|
+
...n,
|
|
7
|
+
"x-csrf-token": o
|
|
8
|
+
}
|
|
9
|
+
} : t;
|
|
11
10
|
};
|
|
12
11
|
export {
|
|
13
|
-
|
|
14
|
-
p as vndAPI
|
|
12
|
+
a as withCSRF
|
|
15
13
|
};
|
package/dist/index5.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("kitsu-core"),r=require("./index6.cjs"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("kitsu-core"),r=require("./index6.cjs"),i=require("./index49.cjs"),o=require("./index50.cjs"),a=async({attributes:e})=>{const t=await r.axios.post("/api/v2/custom_views",{data:{attributes:e,type:"custom_view"}},i.withCSRF(o.vndAPI));return s.deserialise(t.data)};exports.createCustomView=a;
|
package/dist/index5.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { deserialise as r } from "kitsu-core";
|
|
2
2
|
import { axios as e } from "./index6.js";
|
|
3
|
-
import { withCSRF as i } from "./
|
|
4
|
-
import { vndAPI as s } from "./
|
|
3
|
+
import { withCSRF as i } from "./index49.js";
|
|
4
|
+
import { vndAPI as s } from "./index50.js";
|
|
5
5
|
const n = async ({ attributes: t }) => {
|
|
6
6
|
const o = await e.post("/api/v2/custom_views", { data: { attributes: t, type: "custom_view" } }, i(s));
|
|
7
7
|
return r(o.data);
|
package/dist/index50.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 n={headers:{Accept:"application/json","Content-Type":"application/json"}},o={headers:{"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"}};exports.onlyJSON=n;exports.vndAPI=o;
|
package/dist/index50.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
const n = {
|
|
2
|
+
headers: {
|
|
3
|
+
Accept: "application/json",
|
|
4
|
+
"Content-Type": "application/json"
|
|
5
|
+
}
|
|
6
|
+
}, p = {
|
|
7
|
+
headers: {
|
|
8
|
+
"Content-Type": "application/vnd.api+json",
|
|
9
|
+
Accept: "application/vnd.api+json"
|
|
10
|
+
}
|
|
10
11
|
};
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
n as onlyJSON,
|
|
14
|
+
p as vndAPI
|
|
14
15
|
};
|
package/dist/index51.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 d=require("kitsu-core"),a=require("./index49.cjs"),n=require("./index50.cjs"),i=require("./index6.cjs"),f=async e=>(await i.axios.get(e,a.withCSRF(n.onlyJSON))).data,l=async(e,t={})=>{const{serialize:o=!0,includeMeta:c=!1}=t,r=await i.axios.get(e,a.withCSRF(n.vndAPI));if(!o)return r.data;const{data:s,meta:u}=d.deserialise(r.data);return c?{data:s,meta:u}:s};exports.fetcherV1=f;exports.fetcherV2=l;
|