@veeqo/transfigure 1.2.7 → 1.2.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/BusinessLogic/types.d.ts +1 -1
- package/dist/hooks/useViewCountsHook/useViewCountsHook.d.ts +2 -2
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +4 -4
- package/dist/index101.cjs +1 -19
- package/dist/index101.js +24 -24
- package/dist/index102.cjs +19 -1
- package/dist/index102.js +24 -21
- package/dist/index103.cjs +12 -1
- package/dist/index103.js +16 -15
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +14 -37
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +21 -29
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +49 -23
- package/dist/index107.cjs +1 -12
- package/dist/index107.js +29 -16
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index114.cjs +1 -13
- package/dist/index114.js +33 -14
- package/dist/index115.cjs +13 -1
- package/dist/index115.js +14 -33
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +63 -5
- package/dist/index118.cjs +1 -7
- package/dist/index118.js +5 -10
- package/dist/index119.cjs +7 -1
- package/dist/index119.js +10 -63
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +2 -2
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +2 -2
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +1 -1
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +7 -7
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +5 -5
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +3 -3
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +5 -5
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +2 -2
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +3 -3
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +3 -3
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +2 -2
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +11 -10
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +3 -2
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +2 -41
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +4 -8
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +41 -2
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +8 -4
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +17 -6
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +6 -17
- package/dist/types.d.ts +2 -24
- package/package.json +1 -1
package/dist/index32.js
CHANGED
|
@@ -5,9 +5,9 @@ import x from "lodash/debounce";
|
|
|
5
5
|
import { Stack as c, Text as F, Button as V, ChoiceList as f } from "@veeqo/ui";
|
|
6
6
|
import { useBusinessLogic as k } from "./index8.js";
|
|
7
7
|
import { useStores as v } from "./index61.js";
|
|
8
|
-
const
|
|
8
|
+
const j = g(({ field: e }) => {
|
|
9
9
|
var i;
|
|
10
|
-
const {
|
|
10
|
+
const { FILTERS_DEBOUNCE_INTERVAL_MS: a } = k(), {
|
|
11
11
|
Filters: { setFilter: r, filters: m }
|
|
12
12
|
} = v(), u = m.get(e.id), [p, s] = S(u), d = C(
|
|
13
13
|
x((t, o) => {
|
|
@@ -37,5 +37,5 @@ const I = g(({ field: e }) => {
|
|
|
37
37
|
] }) });
|
|
38
38
|
});
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
j as RadioFilter
|
|
41
41
|
};
|
package/dist/index34.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index8.cjs"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index8.cjs"),u=require("./index101.cjs"),c=require("./index35.cjs"),a=s.observer(()=>{const{GROUP_MAP:t}=o.useBusinessLogic();return e.jsx(u.AdaptiveHeightContainer,{style:{minWidth:"360px"},children:e.jsx(n.Stack,{alignX:"stretch",children:Array.from(t).map(([r,i])=>e.jsx(c.FilterGroup,{data:i},r))})})});exports.FiltersList=a;
|
package/dist/index34.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { observer as e } from "mobx-react";
|
|
3
3
|
import { Stack as m } from "@veeqo/ui";
|
|
4
4
|
import { useBusinessLogic as s } from "./index8.js";
|
|
5
|
-
import { AdaptiveHeightContainer as p } from "./
|
|
5
|
+
import { AdaptiveHeightContainer as p } from "./index101.js";
|
|
6
6
|
import { FilterGroup as n } from "./index35.js";
|
|
7
7
|
const u = e(() => {
|
|
8
8
|
const { GROUP_MAP: t } = s();
|
package/dist/index36.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),l=require("@veeqo/ui"),U=require("mobx-react"),z=require("./index65.cjs"),G=require("./index62.cjs"),J=require("./index40.cjs"),K=require("./index43.cjs"),Q=require("./index56.cjs"),X=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),l=require("@veeqo/ui"),U=require("mobx-react"),z=require("./index65.cjs"),G=require("./index62.cjs"),J=require("./index40.cjs"),K=require("./index43.cjs"),Q=require("./index56.cjs"),X=require("./index106.cjs"),Z=require("./index8.cjs"),$=require("./index61.cjs"),b=require("./index107.cjs"),ee=U.observer(({view:e})=>{const{VIEW_TYPE:x,IS_VIEWS_READONLY:r,SEARCH_FILTER_ID:d}=Z.useBusinessLogic(),{Filters:{activeViewId:w,initFiltersFromView:f,discardChanges:m,initFromUrl:V,filters:L,setFilter:T},Views:{draftViewsMap:y},Notifications:{notify:E}}=$.useStores(),{viewsMap:h,defaultCustomViewId:F,isLoading:N}=G.useViews(),{isLoading:j}=z.useCustomViews({type:x}),{viewCounts:M,isLoadingViewCounts:R}=X.useViewCounts(e.id),[s,P]=c.useState(null),k=o=>{const q=L.get(d);if(h.has(o)){const n=h.get(o);n&&(f(n),m(!0),V())}else{const n=y.get(o);n?(f(n),m(!0),V()):E({type:"error",text:"Failed to load view"})}q&&T(d,q)},u=(e==null?void 0:e.id)===w,t=e.originalView!==void 0,g=e.originalView===void 0,A=M,a=(e==null?void 0:e.label)||"",I=N||j,p=c.useRef(!1);!I&&!p.current&&u&&e.id===F&&s&&(p.current=!0,s&&w===e.id&&window.requestAnimationFrame(()=>{var o;(o=s.parentElement)==null||o.scrollBy({behavior:"smooth",left:s.offsetLeft})}));const C=c.useMemo(()=>t?"draft":e.editable?"saved":"fixed",[t,e.editable]),{actions:{create:{handleSaveDraft:_},menu:{toggleDropdown:D},delete:{closeDeleteConfirmation:B,handleDelete:O,handleDeleteDraftView:v}},state:{shouldShowDeleteConfirmation:H},actions:W,state:S}=Q.useDropdownManager(e),Y=c.useMemo(()=>{if(!r){if(g)return D;if(t)return v}},[v,t,g,D,r]);return i.jsxs(i.Fragment,{children:[i.jsx(l.ViewTab,{customTextColour:e.customTextColour,colourPalette:e.colourPalette,className:"act-react-listing-custom-view",active:u,id:e==null?void 0:e.id,name:a,type:r?void 0:C,count:R?i.jsx(l.Loader,{type:"ThreeDots",width:12,height:12,color:u?"#fff":l.theme.colors.neutral.ink.dark}):A,onClick:k,subAction:Y,ariaContext:"orders",ref:P,"aria-controls":"options-dropdown","aria-expanded":S.shouldShowDropdown,"aria-haspopup":"dialog"},e==null?void 0:e.id),i.jsx(b.Confirmation,{shouldShow:H,viewName:a,onCancel:B,onDelete:O}),i.jsx(J.PillNotifications,{tabType:C,isActive:u,initialViewName:a,shouldShowCreateViewNotification:t,handleSaveDraft:_}),!r&&i.jsx(K.ViewDropdowns,{referenceElement:s,tab:e,...W,...S})]})});exports.ViewTab=ee;
|
package/dist/index36.js
CHANGED
|
@@ -7,16 +7,16 @@ import { useViews as Z } from "./index62.js";
|
|
|
7
7
|
import { PillNotifications as b } from "./index40.js";
|
|
8
8
|
import { ViewDropdowns as ee } from "./index43.js";
|
|
9
9
|
import { useDropdownManager as oe } from "./index56.js";
|
|
10
|
-
import { useViewCounts as ie } from "./
|
|
10
|
+
import { useViewCounts as ie } from "./index106.js";
|
|
11
11
|
import { useBusinessLogic as te } from "./index8.js";
|
|
12
12
|
import { useStores as re } from "./index61.js";
|
|
13
|
-
import { Confirmation as se } from "./
|
|
13
|
+
import { Confirmation as se } from "./index107.js";
|
|
14
14
|
const ve = Q(({ view: e }) => {
|
|
15
15
|
const { VIEW_TYPE: L, IS_VIEWS_READONLY: n, SEARCH_FILTER_ID: c } = te(), {
|
|
16
16
|
Filters: { activeViewId: d, initFiltersFromView: f, discardChanges: m, initFromUrl: u, filters: T, setFilter: x },
|
|
17
17
|
Views: { draftViewsMap: E },
|
|
18
18
|
Notifications: { notify: F }
|
|
19
|
-
} = re(), { viewsMap: w, defaultCustomViewId: y, isLoading: N } = Z(), { isLoading: A } = X({ type: L }), { viewCounts: I, isLoadingViewCounts: R } = ie(), [i, _] = $(null), k = (o) => {
|
|
19
|
+
} = re(), { viewsMap: w, defaultCustomViewId: y, isLoading: N } = Z(), { isLoading: A } = X({ type: L }), { viewCounts: I, isLoadingViewCounts: R } = ie(e.id), [i, _] = $(null), k = (o) => {
|
|
20
20
|
const D = T.get(c);
|
|
21
21
|
if (w.has(o)) {
|
|
22
22
|
const r = w.get(o);
|
package/dist/index39.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("./index102.cjs"),g=require("./index52.cjs"),j=require("./index51.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/index39.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 "./index102.js";
|
|
3
3
|
import { useModal as k } from "./index52.js";
|
|
4
4
|
import { ModalId as T } from "./index51.js";
|
|
5
5
|
const N = ({
|
package/dist/index40.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("mobx-react"),g=require("./index62.cjs"),o=require("framer-motion"),m=require("./index61.cjs"),v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("mobx-react"),g=require("./index62.cjs"),o=require("framer-motion"),m=require("./index61.cjs"),v=require("./index105.cjs"),f=require("./index42.cjs"),h=P.observer(({tabType:s,isActive:r,shouldShowCreateViewNotification:a,handleSaveDraft:i})=>{var t;const{Filters:{hasUnsavedChanges:c,discardChanges:l,activeViewId:n}}=m.useStores(),{viewsMap:u}=g.useViews(),d=n&&((t=u.get(n))==null?void 0:t.label);return e.jsxs(e.Fragment,{children:[e.jsx(o.AnimatePresence,{children:s==="draft"&&r&&a&&e.jsx(v.DraftPill,{onClick:i})}),e.jsx(o.AnimatePresence,{children:c&&r&&s==="saved"&&e.jsx(f.UnsavedChangesPill,{viewName:d,onDiscard:()=>l(),onSaveDraft:i})})]})});exports.PillNotifications=h;
|
package/dist/index40.js
CHANGED
|
@@ -3,7 +3,7 @@ import { observer as h } from "mobx-react";
|
|
|
3
3
|
import { useViews as v } from "./index62.js";
|
|
4
4
|
import { AnimatePresence as n } from "framer-motion";
|
|
5
5
|
import { useStores as g } from "./index61.js";
|
|
6
|
-
import { DraftPill as w } from "./
|
|
6
|
+
import { DraftPill as w } from "./index105.js";
|
|
7
7
|
import { UnsavedChangesPill as C } from "./index42.js";
|
|
8
8
|
const U = h(
|
|
9
9
|
({
|
package/dist/index41.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),m=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),m=require("./index104.cjs"),g=require("./index65.cjs"),S=require("./index62.cjs"),b=require("./index4.cjs"),y=require("./index8.cjs"),V=require("./index61.cjs"),p=require("./index12.cjs"),q=()=>{const{VIEW_TYPE:u}=y.useBusinessLogic(),{sortedCustomViews:s,isLoading:a}=S.useViews(),{mutate:c}=g.useCustomViews({type:u}),[l,t]=n.useState(s);n.useEffect(()=>{t(s)},[s]);const{Notifications:{notify:w}}=V.useStores(),d=async o=>{t(o);const r=o.map(e=>e.id);try{await b.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:r}}}),await c(e=>({...e,settings:{...e.settings,custom_view_positions:{...e.settings.custom_view_positions,order:r}}}),{revalidate:!1})}catch{t(s),w({type:"error",text:"Failed to update order of views"})}};return a||!s.length?null:i.jsx(p.ErrorBoundary,{children:i.jsx(m.LegacySortableViews,{views:l,onChange:d,className:"act-sortable-views"})})};exports.SortableViews=q;
|
package/dist/index41.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f, useEffect as l } from "react";
|
|
3
|
-
import { LegacySortableViews as w } from "./
|
|
3
|
+
import { LegacySortableViews as w } from "./index104.js";
|
|
4
4
|
import { useCustomViews as d } from "./index65.js";
|
|
5
5
|
import { useViews as g } from "./index62.js";
|
|
6
6
|
import { patchCurrentUser as _ } from "./index4.js";
|
package/dist/index44.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),S=require("mobx-react"),i=require("@veeqo/ui"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),S=require("mobx-react"),i=require("@veeqo/ui"),u=require("./index103.cjs"),m=require("./index41.cjs"),q=require("./index62.cjs"),f=require("./index63.cjs"),p=require("./index37.cjs"),c=require("./index36.cjs"),v=require("./index8.cjs"),b=require("./index61.cjs"),a=require("./index12.cjs"),C=S.observer(({className:l})=>{const{IS_VIEWS_READONLY:r}=v.useBusinessLogic(),{Views:{draftViewsList:d}}=b.useStores(),{viewsArray:w,fixedViews:x}=q.useViews(),[n,o]=t.useState(!1),[V,h]=t.useState(null),j=()=>o(!1);return f.useViewUrlChange(),e.jsxs(e.Fragment,{children:[e.jsxs(i.ViewsContainer,{onClickMenu:r?void 0:()=>o(!0),ariaMenuControls:r?void 0:"views-menu",ariaMenuExpanded:r?!1:n,ref:h,className:l,children:[w.map(s=>e.jsx(a.ErrorBoundary,{children:e.jsx(c.ViewTab,{view:s})},s.id)),d.map(s=>e.jsx(a.ErrorBoundary,{children:e.jsx(c.ViewTab,{view:s})},s.id))]}),!r&&n&&e.jsx(i.Popover,{id:"views-menu",anchorElement:V,placement:"bottom",onShouldClose:()=>o(!1),children:e.jsxs(i.Card.Surface,{children:[e.jsx(u.FixedViews,{children:x.map(s=>e.jsx(i.Text,{variant:"placeholder",children:s.label},s.id||s.label))}),e.jsx(m.SortableViews,{}),e.jsx(u.Divider,{}),e.jsx(p.CreateView,{hideActionsPopover:j})]})})]})});exports.ViewList=C;
|
package/dist/index44.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as s, Fragment as w, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as n } from "react";
|
|
3
3
|
import { observer as V } from "mobx-react";
|
|
4
4
|
import { ViewsContainer as v, Popover as S, Card as x, Text as C } from "@veeqo/ui";
|
|
5
|
-
import { FixedViews as L, Divider as A } from "./
|
|
5
|
+
import { FixedViews as L, Divider as A } from "./index103.js";
|
|
6
6
|
import { SortableViews as E } from "./index41.js";
|
|
7
7
|
import { useViews as b } from "./index62.js";
|
|
8
8
|
import { useViewUrlChange as M } from "./index63.js";
|
package/dist/index47.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),h=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),h=require("./index88.cjs"),e=require("@veeqo/ui"),o=require("./index89.cjs"),d=require("./index61.cjs"),m=({isLoading:a,refetch:n,trackMetricClick:s,tooltipText:l="Refresh data",buttonProps:i={size:"sm",variant:"default"}})=>{const{hasChanges:r,acknowledgeButtonClick:u}=h.usePollData(),{Notifications:{notify:c}}=d.useStores(),f=async()=>{try{await n(),await u(),s==null||s()}catch{c({type:"error",text:"Failed to refresh data"})}};return t.jsxs(e.Tooltip,{className:o.default.refreshTooltip,text:l,children:[t.jsx(e.Button,{className:o.default.refreshButton,onClick:f,loading:a,disabled:a,iconSlot:t.jsx(e.RefreshIcon,{color:e.theme.colors.neutral.ink.base}),"aria-label":r?"refresh table with changes":"refresh table","aria-live":"polite",...i}),t.jsx(e.Indicator,{className:o.default.refreshIndicator,color:"red",size:"xs",style:{opacity:r?1:0}})]})};exports.RefreshButton=m;
|
package/dist/index47.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { usePollData as c } from "./
|
|
2
|
+
import { usePollData as c } from "./index88.js";
|
|
3
3
|
import { Tooltip as d, Button as p, RefreshIcon as u, theme as y, Indicator as x } from "@veeqo/ui";
|
|
4
|
-
import t from "./
|
|
4
|
+
import t from "./index89.js";
|
|
5
5
|
import { useStores as b } from "./index61.js";
|
|
6
6
|
const j = ({
|
|
7
7
|
isLoading: s,
|
package/dist/index78.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@internationalized/date"),f=require("./index70.cjs"),F=require("./index69.cjs"),R=require("lodash/get"),A=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@internationalized/date"),f=require("./index70.cjs"),F=require("./index69.cjs"),R=require("lodash/get"),A=require("./index92.cjs"),_=require("./index9.cjs"),T=r=>r&&r.__esModule?r:{default:r},n=T(R),h=({view:r,canUpdateCustomViews:g})=>{var u,c;const{DATE_RANGE_FILTERS:a,NUMBER_RANGE_FILTERS:o,GROUP_MAP:p}=_.BusinessLogicManager.getBusinessLogic(),s=Array.from(p.values()).flatMap(e=>e.fields),l=r.filters.filter||{},{colourPalette:m,customTextColour:b}=A.getViewTheme((u=r.view_attributes)==null?void 0:u.type);return{id:r.id,label:r.title,viewFilters:l,filterMaps:{filters:new Map(s.filter(e=>!a.includes(e.id)&&!o.includes(e.id)&&e.filterType!=="checkbox").map(e=>{const t=n.default(l,e.id);return[e.id,t!==void 0&&!Array.isArray(t)&&typeof t!="object"?String(t):""]}).filter(([,e])=>e!=="")),arrayFilters:new Map(s.filter(e=>e.filterType==="checkbox").map(e=>{const t=n.default(l,e.id);return[e.id,Array.isArray(t)?t:[]]}).filter(([,e])=>e.length>0)),rangeFilters:new Map(s.filter(e=>a.includes(e.id)).map(e=>{const t=n.default(l,e.id);if(!t)return null;let i;if(typeof t=="string")i=new f.RangeFilter(t);else if(typeof t=="object"&&t.gte&&t.lte){i=new f.RangeFilter("CUSTOM");const y=d.parseDate(t.gte),M=d.parseDate(t.lte);i.setDates(y,M)}else return null;return[e.id,i]}).filter(e=>e!==null)),numberRangeFilters:new Map(s.filter(e=>o.includes(e.id)).map(e=>{const t=n.default(l,e.id);if(!t||typeof t!="object")return null;const i=new F.NumberRangeFilter({filterId:e.id});return t.lte!==void 0&&i.setLte(Number(t.lte)),t.gte!==void 0&&i.setGte(Number(t.gte)),[e.id,i]}).filter(e=>e!==null))},page:r.filters.page,editable:r.editable&&g,isShared:r.shared,columns:r.columns,sort:(c=r.filters)==null?void 0:c.sort,colourPalette:m,customTextColour:b}};exports.viewsAdapter=h;
|
package/dist/index78.js
CHANGED
|
@@ -2,35 +2,36 @@ import { parseDate as c } from "@internationalized/date";
|
|
|
2
2
|
import { RangeFilter as p } from "./index70.js";
|
|
3
3
|
import { NumberRangeFilter as M } from "./index69.js";
|
|
4
4
|
import n from "lodash/get";
|
|
5
|
-
import { getViewTheme as F } from "./
|
|
5
|
+
import { getViewTheme as F } from "./index92.js";
|
|
6
6
|
import { BusinessLogicManager as R } from "./index9.js";
|
|
7
7
|
const S = ({
|
|
8
8
|
view: r,
|
|
9
9
|
canUpdateCustomViews: m
|
|
10
10
|
}) => {
|
|
11
11
|
var u, f;
|
|
12
|
-
const { DATE_RANGE_FILTERS: o, NUMBER_RANGE_FILTERS: a, GROUP_MAP: d } = R.getBusinessLogic(),
|
|
12
|
+
const { DATE_RANGE_FILTERS: o, NUMBER_RANGE_FILTERS: a, GROUP_MAP: d } = R.getBusinessLogic(), s = Array.from(d.values()).flatMap((e) => e.fields), l = r.filters.filter || {}, { colourPalette: g, customTextColour: b } = F((u = r.view_attributes) == null ? void 0 : u.type);
|
|
13
13
|
return {
|
|
14
14
|
id: r.id,
|
|
15
15
|
label: r.title,
|
|
16
|
+
viewFilters: l,
|
|
16
17
|
filterMaps: {
|
|
17
18
|
filters: new Map(
|
|
18
|
-
|
|
19
|
+
s.filter(
|
|
19
20
|
(e) => !o.includes(e.id) && !a.includes(e.id) && e.filterType !== "checkbox"
|
|
20
21
|
).map((e) => {
|
|
21
|
-
const t = n(
|
|
22
|
+
const t = n(l, e.id);
|
|
22
23
|
return [e.id, t !== void 0 && !Array.isArray(t) && typeof t != "object" ? String(t) : ""];
|
|
23
24
|
}).filter(([, e]) => e !== "")
|
|
24
25
|
),
|
|
25
26
|
arrayFilters: new Map(
|
|
26
|
-
|
|
27
|
-
const t = n(
|
|
27
|
+
s.filter((e) => e.filterType === "checkbox").map((e) => {
|
|
28
|
+
const t = n(l, e.id);
|
|
28
29
|
return [e.id, Array.isArray(t) ? t : []];
|
|
29
30
|
}).filter(([, e]) => e.length > 0)
|
|
30
31
|
),
|
|
31
32
|
rangeFilters: new Map(
|
|
32
|
-
|
|
33
|
-
const t = n(
|
|
33
|
+
s.filter((e) => o.includes(e.id)).map((e) => {
|
|
34
|
+
const t = n(l, e.id);
|
|
34
35
|
if (!t) return null;
|
|
35
36
|
let i;
|
|
36
37
|
if (typeof t == "string")
|
|
@@ -45,8 +46,8 @@ const S = ({
|
|
|
45
46
|
}).filter((e) => e !== null)
|
|
46
47
|
),
|
|
47
48
|
numberRangeFilters: new Map(
|
|
48
|
-
|
|
49
|
-
const t = n(
|
|
49
|
+
s.filter((e) => a.includes(e.id)).map((e) => {
|
|
50
|
+
const t = n(l, e.id);
|
|
50
51
|
if (!t || typeof t != "object") return null;
|
|
51
52
|
const i = new M({ filterId: e.id });
|
|
52
53
|
return t.lte !== void 0 && i.setLte(Number(t.lte)), t.gte !== void 0 && i.setGte(Number(t.gte)), [e.id, i];
|
package/dist/index79.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@veeqo/ui"),e="all",r=()=>({id:e,label:"All",filterMaps:{filters:new Map,arrayFilters:new Map,rangeFilters:new Map,numberRangeFilters:new Map},page:{size:10},editable:!1,isShared:!1,columns:{columnIds:[],columnWidths:{}},colourPalette:l.theme.colors.secondary.blue});exports.ALL_VIEW_ID=e;exports.createAllView=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@veeqo/ui"),e="all",r=()=>({id:e,label:"All",viewFilters:{},filterMaps:{filters:new Map,arrayFilters:new Map,rangeFilters:new Map,numberRangeFilters:new Map},page:{size:10},editable:!1,isShared:!1,columns:{columnIds:[],columnWidths:{}},colourPalette:l.theme.colors.secondary.blue});exports.ALL_VIEW_ID=e;exports.createAllView=r;
|
package/dist/index79.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { theme as e } from "@veeqo/ui";
|
|
2
|
-
const l = "all",
|
|
2
|
+
const l = "all", a = () => ({
|
|
3
3
|
id: l,
|
|
4
4
|
label: "All",
|
|
5
|
+
viewFilters: {},
|
|
5
6
|
filterMaps: {
|
|
6
7
|
filters: /* @__PURE__ */ new Map(),
|
|
7
8
|
arrayFilters: /* @__PURE__ */ new Map(),
|
|
@@ -21,5 +22,5 @@ const l = "all", r = () => ({
|
|
|
21
22
|
});
|
|
22
23
|
export {
|
|
23
24
|
l as ALL_VIEW_ID,
|
|
24
|
-
|
|
25
|
+
a as createAllView
|
|
25
26
|
};
|
package/dist/index80.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index93.cjs"),w=require("./index79.cjs"),V=require("./index78.cjs"),d=({data:n,canUpdateCustomViews:u})=>{const l={fixedViews:[...r.INITIAL_VIEWS_STATE.fixedViews],customViews:[...r.INITIAL_VIEWS_STATE.customViews],viewsMap:new Map(r.INITIAL_VIEWS_STATE.viewsMap)};if(!n)return l;let o=!1;const i=n.reduce((e,s)=>{const t=V.viewsAdapter({view:s,canUpdateCustomViews:u});return e.viewsMap.set(s.id,t),s.editable?e.customViews.push(t):e.fixedViews.push(t),s.title==="All"&&(o=!0),e},l);return o&&(i.viewsMap.delete(w.ALL_VIEW_ID),i.fixedViews.shift()),i};exports.organiseViews=d;
|
package/dist/index80.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INITIAL_VIEWS_STATE as r } from "./
|
|
1
|
+
import { INITIAL_VIEWS_STATE as r } from "./index93.js";
|
|
2
2
|
import { ALL_VIEW_ID as p } from "./index79.js";
|
|
3
3
|
import { viewsAdapter as u } from "./index78.js";
|
|
4
4
|
const m = ({ data: o, canUpdateCustomViews: w }) => {
|
package/dist/index86.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=t=>t.trim().length>=3||t.trim().length===0;exports.isTextFilterValid=e;
|
package/dist/index86.js
CHANGED
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { useInterval as P } from "react-use";
|
|
3
|
-
import { useBusinessLogic as S } from "./index8.js";
|
|
4
|
-
import { useStores as L } from "./index61.js";
|
|
5
|
-
import { useUrlParams as v } from "./index67.js";
|
|
6
|
-
import { fetcherV2 as V } from "./index55.js";
|
|
7
|
-
function T() {
|
|
8
|
-
const { TABLE_DATA_URL: h } = S(), {
|
|
9
|
-
Filters: {
|
|
10
|
-
pageSize: n,
|
|
11
|
-
activeViewId: s
|
|
12
|
-
}
|
|
13
|
-
} = L(), { queryParams: m } = v();
|
|
14
|
-
async function r() {
|
|
15
|
-
const e = `${h}?${m}`, g = await V(e);
|
|
16
|
-
return JSON.stringify(g);
|
|
17
|
-
}
|
|
18
|
-
const [c, a] = t(null), [l, u] = t(!1), [f, C] = t(s), [w, y] = t(n), i = 3e5, [D, o] = t(i);
|
|
19
|
-
return p(() => {
|
|
20
|
-
const e = () => {
|
|
21
|
-
document.hidden ? o(null) : o(i);
|
|
22
|
-
};
|
|
23
|
-
return document.addEventListener("visibilitychange", e), () => {
|
|
24
|
-
document.removeEventListener("visibilitychange", e);
|
|
25
|
-
};
|
|
26
|
-
}, []), P(
|
|
27
|
-
async () => {
|
|
28
|
-
const e = await r();
|
|
29
|
-
if (c === null || f !== s || w !== n) {
|
|
30
|
-
a(e), C(s), y(n);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const d = e !== c;
|
|
34
|
-
d && (a(e), u(d));
|
|
35
|
-
},
|
|
36
|
-
l ? null : D
|
|
37
|
-
), { hasChanges: l, acknowledgeButtonClick: async () => {
|
|
38
|
-
u(!1), o(i), a(await r());
|
|
39
|
-
} };
|
|
40
|
-
}
|
|
1
|
+
const i = (t) => t.trim().length >= 3 || t.trim().length === 0;
|
|
41
2
|
export {
|
|
42
|
-
|
|
3
|
+
i as isTextFilterValid
|
|
43
4
|
};
|
package/dist/index87.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_actionsHeaderContainer_fgqms_1",t={actionsHeaderContainer:e};exports.actionsHeaderContainer=e;exports.default=t;
|
package/dist/index87.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
const e = "
|
|
2
|
-
|
|
3
|
-
refreshButton: r,
|
|
4
|
-
refreshIndicator: t
|
|
1
|
+
const e = "_actionsHeaderContainer_fgqms_1", a = {
|
|
2
|
+
actionsHeaderContainer: e
|
|
5
3
|
};
|
|
6
4
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
t as refreshIndicator,
|
|
10
|
-
e as refreshTooltip
|
|
5
|
+
e as actionsHeaderContainer,
|
|
6
|
+
a as default
|
|
11
7
|
};
|
package/dist/index88.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=t
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),w=require("react-use"),L=require("./index8.cjs"),m=require("./index61.cjs"),v=require("./index67.cjs"),q=require("./index55.cjs");function V(){const{TABLE_DATA_URL:h}=L.useBusinessLogic(),{Filters:{pageSize:s,activeViewId:n}}=m.useStores(),{queryParams:S}=v.useUrlParams();async function c(){const e=`${h}?${S}`,g=await q.fetcherV2(e);return JSON.stringify(g)}const[u,a]=t.useState(null),[o,l]=t.useState(!1),[f,C]=t.useState(n),[y,P]=t.useState(s),i=3e5,[D,r]=t.useState(i);return t.useEffect(()=>{const e=()=>{document.hidden?r(null):r(i)};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),w.useInterval(async()=>{const e=await c();if(u===null||f!==n||y!==s){a(e),C(n),P(s);return}const d=e!==u;d&&(a(e),l(d))},o?null:D),{hasChanges:o,acknowledgeButtonClick:async()=>{l(!1),r(i),a(await c())}}}exports.usePollData=V;
|
package/dist/index88.js
CHANGED
|
@@ -1,4 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
import { useState as t, useEffect as p } from "react";
|
|
2
|
+
import { useInterval as P } from "react-use";
|
|
3
|
+
import { useBusinessLogic as S } from "./index8.js";
|
|
4
|
+
import { useStores as L } from "./index61.js";
|
|
5
|
+
import { useUrlParams as v } from "./index67.js";
|
|
6
|
+
import { fetcherV2 as V } from "./index55.js";
|
|
7
|
+
function T() {
|
|
8
|
+
const { TABLE_DATA_URL: h } = S(), {
|
|
9
|
+
Filters: {
|
|
10
|
+
pageSize: n,
|
|
11
|
+
activeViewId: s
|
|
12
|
+
}
|
|
13
|
+
} = L(), { queryParams: m } = v();
|
|
14
|
+
async function r() {
|
|
15
|
+
const e = `${h}?${m}`, g = await V(e);
|
|
16
|
+
return JSON.stringify(g);
|
|
17
|
+
}
|
|
18
|
+
const [c, a] = t(null), [l, u] = t(!1), [f, C] = t(s), [w, y] = t(n), i = 3e5, [D, o] = t(i);
|
|
19
|
+
return p(() => {
|
|
20
|
+
const e = () => {
|
|
21
|
+
document.hidden ? o(null) : o(i);
|
|
22
|
+
};
|
|
23
|
+
return document.addEventListener("visibilitychange", e), () => {
|
|
24
|
+
document.removeEventListener("visibilitychange", e);
|
|
25
|
+
};
|
|
26
|
+
}, []), P(
|
|
27
|
+
async () => {
|
|
28
|
+
const e = await r();
|
|
29
|
+
if (c === null || f !== s || w !== n) {
|
|
30
|
+
a(e), C(s), y(n);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const d = e !== c;
|
|
34
|
+
d && (a(e), u(d));
|
|
35
|
+
},
|
|
36
|
+
l ? null : D
|
|
37
|
+
), { hasChanges: l, acknowledgeButtonClick: async () => {
|
|
38
|
+
u(!1), o(i), a(await r());
|
|
39
|
+
} };
|
|
40
|
+
}
|
|
2
41
|
export {
|
|
3
|
-
|
|
42
|
+
T as usePollData
|
|
4
43
|
};
|
package/dist/index89.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_refreshTooltip_v0eu8_1",r="_refreshButton_v0eu8_5",t="_refreshIndicator_v0eu8_9",o={refreshTooltip:e,refreshButton:r,refreshIndicator:t};exports.default=o;exports.refreshButton=r;exports.refreshIndicator=t;exports.refreshTooltip=e;
|
package/dist/index89.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
const e = "
|
|
2
|
-
|
|
1
|
+
const e = "_refreshTooltip_v0eu8_1", r = "_refreshButton_v0eu8_5", t = "_refreshIndicator_v0eu8_9", o = {
|
|
2
|
+
refreshTooltip: e,
|
|
3
|
+
refreshButton: r,
|
|
4
|
+
refreshIndicator: t
|
|
3
5
|
};
|
|
4
6
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
o as default,
|
|
8
|
+
r as refreshButton,
|
|
9
|
+
t as refreshIndicator,
|
|
10
|
+
e as refreshTooltip
|
|
7
11
|
};
|
package/dist/index92.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@veeqo/ui"),r=require("./index2.cjs"),s=o=>{let e={colourPalette:t.theme.colors.secondary.blue,customTextColour:void 0};switch(o){case r.ViewStatusTypes.ERROR:e={colourPalette:t.theme.colors.secondary.red,customTextColour:void 0};break}return e};exports.getViewTheme=s;
|
package/dist/index92.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { theme as o } from "@veeqo/ui";
|
|
2
|
+
import { ViewStatusTypes as r } from "./index2.js";
|
|
3
|
+
const l = (t) => {
|
|
4
|
+
let e = {
|
|
5
|
+
colourPalette: o.colors.secondary.blue,
|
|
6
|
+
customTextColour: void 0
|
|
7
|
+
};
|
|
8
|
+
switch (t) {
|
|
9
|
+
case r.ERROR:
|
|
10
|
+
e = {
|
|
11
|
+
colourPalette: o.colors.secondary.red,
|
|
12
|
+
customTextColour: void 0
|
|
13
|
+
};
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
return e;
|
|
6
17
|
};
|
|
7
18
|
export {
|
|
8
|
-
|
|
19
|
+
l as getViewTheme
|
|
9
20
|
};
|
package/dist/index93.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 i=require("./index79.cjs"),e=i.createAllView(),t={fixedViews:[e],customViews:[],viewsMap:new Map([[e.id,e]])};exports.INITIAL_VIEWS_STATE=t;
|
package/dist/index93.js
CHANGED
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
customTextColour: void 0
|
|
7
|
-
};
|
|
8
|
-
switch (t) {
|
|
9
|
-
case r.ERROR:
|
|
10
|
-
e = {
|
|
11
|
-
colourPalette: o.colors.secondary.red,
|
|
12
|
-
customTextColour: void 0
|
|
13
|
-
};
|
|
14
|
-
break;
|
|
15
|
-
}
|
|
16
|
-
return e;
|
|
1
|
+
import { createAllView as i } from "./index79.js";
|
|
2
|
+
const e = i(), s = {
|
|
3
|
+
fixedViews: [e],
|
|
4
|
+
customViews: [],
|
|
5
|
+
viewsMap: /* @__PURE__ */ new Map([[e.id, e]])
|
|
17
6
|
};
|
|
18
7
|
export {
|
|
19
|
-
|
|
8
|
+
s as INITIAL_VIEWS_STATE
|
|
20
9
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -47,29 +47,6 @@ type UserRelationship = {
|
|
|
47
47
|
type PageFilter = {
|
|
48
48
|
size?: number;
|
|
49
49
|
};
|
|
50
|
-
type SearchFilter = {
|
|
51
|
-
number?: string;
|
|
52
|
-
};
|
|
53
|
-
type StockCountFilter = {
|
|
54
|
-
gte: number;
|
|
55
|
-
lte: number;
|
|
56
|
-
};
|
|
57
|
-
type OrderFilter = {
|
|
58
|
-
status?: string[];
|
|
59
|
-
search?: SearchFilter;
|
|
60
|
-
created?: string;
|
|
61
|
-
mergeable?: string;
|
|
62
|
-
pick_status?: string;
|
|
63
|
-
};
|
|
64
|
-
type InventoryFilter = {
|
|
65
|
-
stock_count?: StockCountFilter;
|
|
66
|
-
is_kit?: boolean;
|
|
67
|
-
};
|
|
68
|
-
type ViewFilters = {
|
|
69
|
-
page?: PageFilter;
|
|
70
|
-
filter?: OrderFilter | InventoryFilter;
|
|
71
|
-
sort?: string;
|
|
72
|
-
};
|
|
73
50
|
export declare enum ViewStatusTypes {
|
|
74
51
|
ERROR = "error"
|
|
75
52
|
}
|
|
@@ -80,7 +57,7 @@ export type View = {
|
|
|
80
57
|
user: UserRelationship;
|
|
81
58
|
};
|
|
82
59
|
title: string;
|
|
83
|
-
filters:
|
|
60
|
+
filters: Record<string, any>;
|
|
84
61
|
columns: string[] | Record<string, never>;
|
|
85
62
|
shared: boolean;
|
|
86
63
|
created_at: string;
|
|
@@ -107,6 +84,7 @@ export type TransformedView = {
|
|
|
107
84
|
id: string;
|
|
108
85
|
label: string;
|
|
109
86
|
filterMaps: FilterMaps;
|
|
87
|
+
viewFilters: Record<string, any>;
|
|
110
88
|
sort?: string;
|
|
111
89
|
page: PageFilter | undefined;
|
|
112
90
|
editable: boolean;
|