@veeqo/transfigure 0.0.17 → 0.0.19
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 -0
- package/dist/components/RefreshButton/RefreshButton.d.ts +7 -0
- package/dist/components/RefreshButton/RefreshIcon.d.ts +1 -0
- package/dist/components/RefreshButton/index.d.ts +1 -0
- package/dist/components/RefreshButton/styled.d.ts +10 -0
- package/dist/components/RefreshButton/usePollListOrders.d.ts +4 -0
- package/dist/components/Views/PillNotifications/styled.d.ts +13 -12
- package/dist/components/Views/ViewList/ViewsList.d.ts +1 -5
- package/dist/components/Views/ViewTab/ViewTab.d.ts +2 -3
- package/dist/hooks/useViewCountsHook/useViewCountsHook.d.ts +16 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +71 -69
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +62 -63
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +36 -30
- package/dist/index102.cjs +13 -7
- package/dist/index102.js +16 -9
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +19 -42
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +10 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +66 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +32 -0
- package/dist/index107.cjs +7 -0
- package/dist/index107.js +12 -0
- package/dist/index108.cjs +1 -0
- package/dist/index108.js +44 -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 +3 -3
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +3 -3
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +4 -4
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +4 -4
- 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 +50 -49
- 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 +8 -8
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +2 -2
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +30 -30
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +34 -40
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +25 -19
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +19 -8
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +7 -22
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +23 -2
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +2 -4
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +4 -11
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +2 -2
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +10 -12
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +12 -11
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +11 -184
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +183 -25
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +26 -24
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +19 -22
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +25 -90
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +92 -8
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +8 -51
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +50 -60
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +4 -4
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +61 -18
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +16 -23
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +25 -315
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +311 -55
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +50 -47
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +51 -31
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +30 -24
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +32 -4
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +4 -9
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +9 -17
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +14 -16
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +18 -47
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +48 -21
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +21 -2
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +2 -9
- package/dist/index75.cjs +1 -3
- package/dist/index75.js +8 -13
- package/dist/index76.cjs +3 -1
- package/dist/index76.js +13 -8
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +7 -141
- package/dist/index78.cjs +8 -1
- package/dist/index78.js +12 -19
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +40 -21
- package/dist/index80.cjs +1 -80
- package/dist/index80.js +9 -95
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +142 -28
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +16 -12
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +17 -23
- package/dist/index84.cjs +1 -19
- package/dist/index84.js +33 -24
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +29 -13
- package/dist/index86.cjs +15 -100
- package/dist/index86.js +19 -115
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +21 -65
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +20 -27
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +15 -2
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +13 -12
- package/dist/index90.cjs +80 -1
- package/dist/index90.js +96 -41
- package/dist/index91.cjs +12 -1
- package/dist/index91.js +16 -11
- package/dist/index92.cjs +1 -12
- package/dist/index92.js +13 -16
- package/dist/index93.cjs +104 -1
- package/dist/index93.js +120 -2
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +66 -61
- package/dist/index95.cjs +1 -80
- package/dist/index95.js +29 -95
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +2 -36
- package/dist/index97.cjs +1 -13
- package/dist/index97.js +40 -16
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +10 -18
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +2 -8
- package/dist/storybookHelpers/apiMocks/v2ordersapi.d.ts +335 -0
- package/dist/storybookHelpers/constants.d.ts +2 -5
- package/package.json +1 -1
- package/dist/components/Views/UnsavedChanges/styled.d.ts +0 -33
package/dist/index24.js
CHANGED
|
@@ -4,11 +4,11 @@ import { observer as R } from "mobx-react";
|
|
|
4
4
|
import V from "lodash/debounce";
|
|
5
5
|
import { Stack as k, Button as E, ChoiceList as _, Skeleton as I, theme as T, Text as v } from "@veeqo/ui";
|
|
6
6
|
import B from "swr/immutable";
|
|
7
|
-
import { getAsyncOptions as N } from "./
|
|
8
|
-
import { getFetcherFunction as j } from "./
|
|
9
|
-
import { SWR_HOOK_OPTIONS as w } from "./
|
|
7
|
+
import { getAsyncOptions as N } from "./index69.js";
|
|
8
|
+
import { getFetcherFunction as j } from "./index70.js";
|
|
9
|
+
import { SWR_HOOK_OPTIONS as w } from "./index46.js";
|
|
10
10
|
import { useBusinessLogic as M } from "./index7.js";
|
|
11
|
-
import { useStores as U } from "./
|
|
11
|
+
import { useStores as U } from "./index58.js";
|
|
12
12
|
const Q = R(({ field: t }) => {
|
|
13
13
|
var c, a;
|
|
14
14
|
const { FILTERS_DEBOUCE_INTERVAL_MS: m } = M(), h = A(() => {
|
package/dist/index25.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 r=require("react/jsx-runtime"),p=require("mobx-react"),i=require("react"),x=require("lodash/debounce"),o=require("@veeqo/ui"),F=require("./index7.cjs"),_=require("./index58.cjs"),q=e=>e&&e.__esModule?e:{default:e},k=q(x),j=p.observer(({field:e})=>{var u;const{FILTERS_DEBOUCE_INTERVAL_MS:l}=F.useBusinessLogic(),{Filters:{setArrayFilter:n,arrayFilters:a}}=_.useStores();if(!((u=e.options)!=null&&u.length))return null;const d=a.get(e.id)||[],[b,c]=i.useState(d),S=i.useCallback(k.default((t,s)=>{n(t,s)},l),[n]),g=t=>{const s=t.map(C=>`${C}`);c(s),S(e.id,s)},h=()=>{c([]),n(e.id,[])};return r.jsxs(o.Stack,{spacing:"xs",children:[r.jsx(o.Button,{variant:"link",onClick:h,children:"Clear"}),r.jsx(o.ChoiceList,{allowMultiple:!0,title:e.label,options:e.options,selected:b,onChange:t=>g(t)})]})});exports.CheckboxFilter=j;
|
package/dist/index25.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useState as d, useCallback as S } from "react";
|
|
|
4
4
|
import b from "lodash/debounce";
|
|
5
5
|
import { Stack as g, Button as k, ChoiceList as x } from "@veeqo/ui";
|
|
6
6
|
import { useBusinessLogic as V } from "./index7.js";
|
|
7
|
-
import { useStores as E } from "./
|
|
7
|
+
import { useStores as E } from "./index58.js";
|
|
8
8
|
const w = F(({ field: e }) => {
|
|
9
9
|
var n;
|
|
10
10
|
const { FILTERS_DEBOUCE_INTERVAL_MS: i } = V(), {
|
package/dist/index26.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),P=require("react"),q=require("mobx-react"),n=require("@veeqo/ui"),E=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),P=require("react"),q=require("mobx-react"),n=require("@veeqo/ui"),E=require("./index65.cjs"),b=require("./index7.cjs"),k=require("./index58.cjs"),v=q.observer(({field:s})=>{const{DEFAULT_DATE_PRESET:c,DEFAULT_DATE_RANGE:l}=b.useBusinessLogic(),{Filters:{dateRangeFilters:i,setRangeFilter:o,clearRangeFilter:g}}=k.useStores(),e=i.get(s.id),[u,R]=P.useState(!1),d=(e==null?void 0:e.filterSelection)||c,a=()=>{const t=new E.RangeFilter;i.set(s.id,t)},F=t=>{const T=t.value===n.DateRanges.TODAY&&e&&(e==null?void 0:e.filterType)===void 0;if(!t||T)return;if(!u){R(!0);return}if(!e){a();return}if(!e)return;const f=t.value;o({dates:{start:e.gte,end:e.lte},key:f,range:e})},S=t=>{if(t){if(!e){a();return}e.setDates(t.start,t.end)}},D=()=>{g(s.id)},h=e?e.selectedRange:l;return r.jsxs(n.Stack,{spacing:"xs",children:[r.jsx(n.Button,{variant:"link",onClick:D,children:"Clear"}),r.jsx(n.DateRangePicker,{"aria-label":`date range for ${s.label}`,selectedPreset:d,setSelectedPreset:F,selectedRange:h,setSelectedRange:S})]})});exports.DateRangeFilter=v;
|
package/dist/index26.js
CHANGED
|
@@ -2,9 +2,9 @@ import { jsxs as D, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as S } from "react";
|
|
3
3
|
import { observer as T } from "mobx-react";
|
|
4
4
|
import { Stack as E, Button as P, DateRangePicker as k, DateRanges as A } from "@veeqo/ui";
|
|
5
|
-
import { RangeFilter as v } from "./
|
|
5
|
+
import { RangeFilter as v } from "./index65.js";
|
|
6
6
|
import { useBusinessLogic as C } from "./index7.js";
|
|
7
|
-
import { useStores as x } from "./
|
|
7
|
+
import { useStores as x } from "./index58.js";
|
|
8
8
|
const U = T(({ field: r }) => {
|
|
9
9
|
const { DEFAULT_DATE_PRESET: a, DEFAULT_DATE_RANGE: o } = C(), {
|
|
10
10
|
Filters: { dateRangeFilters: n, setRangeFilter: l, clearRangeFilter: c }
|
package/dist/index27.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),h=require("mobx-react"),o=require("@veeqo/ui"),x=require("lodash/debounce"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),h=require("mobx-react"),o=require("@veeqo/ui"),x=require("lodash/debounce"),a=require("./index46.cjs"),E=require("./index7.cjs"),T=require("./index58.cjs"),g=s=>s&&s.__esModule?s:{default:s},k=g(x),m=h.observer(({fields:s,groupId:u})=>{const{FILTERS_DEBOUCE_INTERVAL_MS:d}=E.useBusinessLogic(),{Filters:{getFiltersForGroup:F,setFilter:l,clearFiltersForGroup:b}}=T.useStores(),p=F(u),[S,n]=c.useState(p),q=c.useCallback(k.default((e,t)=>{l(e,t)},d),[l]),C=(e,t)=>{n(r=>({...r,[e]:t})),q(e,t)},_=()=>{const e=s.reduce((t,r)=>({...t,[r.id]:""}),{});n(e),b(u)};return i.jsxs(o.Stack,{children:[i.jsx(o.Button,{variant:"link",onClick:_,children:"Clear"}),s.map(e=>{let t;switch(e.filterType){case a.FilterChoiceValue.NUMBER:t="number";break;case a.FilterChoiceValue.TEXT:t="text";break}return i.jsx(o.TextField,{type:t,value:S[e.id],label:e.label,onChange:r=>C(e.id,r)},e.id)})]})});exports.MultipleFieldFilter=m;
|
package/dist/index27.js
CHANGED
|
@@ -3,9 +3,9 @@ import { useState as E, useCallback as h } from "react";
|
|
|
3
3
|
import { observer as k } from "mobx-react";
|
|
4
4
|
import { Stack as S, Button as T, TextField as x } from "@veeqo/ui";
|
|
5
5
|
import V from "lodash/debounce";
|
|
6
|
-
import { FilterChoiceValue as n } from "./
|
|
6
|
+
import { FilterChoiceValue as n } from "./index46.js";
|
|
7
7
|
import { useBusinessLogic as f } from "./index7.js";
|
|
8
|
-
import { useStores as B } from "./
|
|
8
|
+
import { useStores as B } from "./index58.js";
|
|
9
9
|
const N = k(({ fields: o, groupId: s }) => {
|
|
10
10
|
const { FILTERS_DEBOUCE_INTERVAL_MS: a } = f(), {
|
|
11
11
|
Filters: { getFiltersForGroup: u, setFilter: i, clearFiltersForGroup: m }
|
package/dist/index28.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),R=require("react"),_=require("mobx-react"),j=require("lodash/debounce"),o=require("@veeqo/ui"),L=require("./index101.cjs"),d=require("./index64.cjs"),p=require("./index7.cjs"),y=require("./index58.cjs"),v=i=>i&&i.__esModule?i:{default:i},k=v(j),I=_.observer(({field:i})=>{var M;const{FILTERS_DEBOUCE_INTERVAL_MS:f}=p.useBusinessLogic(),{Filters:{numberRangeFilters:u,setNumberRangeFilter:x,clearNumberRangeFilter:F}}=y.useStores(),e=u.get(i.id),[r,g]=R.useState({gte:(e==null?void 0:e.gte)??0,lte:(e==null?void 0:e.lte)??100});if(!((M=i.options)!=null&&M.length))return null;const b=()=>{const l=new d.NumberRangeFilter({filterId:i.id});return u.set(i.id,l),l},c=R.useCallback(k.default(({numberRange:l,lte:t,gte:n})=>{x({numberRange:l,lte:t,gte:n})},f),[x]),h=()=>{g({gte:0,lte:100}),F(i.id)},S=(l,t)=>{let n=new d.NumberRangeFilter({filterId:i.id});if(e||(n=b()),!Array.isArray(t)||t.length!==2)return;const[s,m]=t;g({gte:s,lte:m}),c(e?{numberRange:e,lte:m,gte:s}:{numberRange:n,lte:m,gte:s})},N=l=>{if(e||b(),!e)return;const t=Number(l);if(t>e.lteMax)return;let{lte:n}=e,{gte:s}=e;t>=e.gteMin&&t<=e.lteMax&&(s=t),(!e.lte||t>=e.lte)&&(n=e.lteMax),g({gte:s,lte:n}),c({numberRange:e,lte:n,gte:s})},C=l=>{if(e||b(),!e)return;const t=Number(l);if(t<e.gteMin)return;let{lte:n}=e,{gte:s}=e;t>=e.gteMin&&t<=e.lteMax&&(n=t),(!e.gte||t<=e.gte)&&(s=e.gteMin),g({gte:s,lte:n}),c({numberRange:e,lte:n,gte:s})},q=[r.gte,r.lte];return a.jsxs(o.Stack,{spacing:"xs",alignX:"stretch",children:[a.jsx(o.Button,{variant:"link",onClick:h,children:"Clear"}),a.jsxs(o.Stack,{direction:"horizontal",children:[a.jsx(o.TextField,{label:e==null?void 0:e.gteMinLabel,type:"number",min:e==null?void 0:e.gteMin,max:e==null?void 0:e.lteMax,value:r.gte.toString(),onChange:N}),a.jsx(o.TextField,{label:e==null?void 0:e.lteMaxLabel,type:"number",min:e==null?void 0:e.gteMin,max:e==null?void 0:e.lteMax,value:r.lte.toString(),onChange:C})]}),a.jsx(L.MUISlider,{value:q,onChange:S,min:e==null?void 0:e.gteMin,max:e==null?void 0:e.lteMax,valueLabelDisplay:"auto"})]})});exports.NumberRangeFilter=I;
|
package/dist/index28.js
CHANGED
|
@@ -3,10 +3,10 @@ import { useState as y, useCallback as I } from "react";
|
|
|
3
3
|
import { observer as k } from "mobx-react";
|
|
4
4
|
import E from "lodash/debounce";
|
|
5
5
|
import { Stack as c, Button as _, TextField as p } from "@veeqo/ui";
|
|
6
|
-
import { MUISlider as A } from "./
|
|
7
|
-
import { NumberRangeFilter as h } from "./
|
|
6
|
+
import { MUISlider as A } from "./index101.js";
|
|
7
|
+
import { NumberRangeFilter as h } from "./index64.js";
|
|
8
8
|
import { useBusinessLogic as B } from "./index7.js";
|
|
9
|
-
import { useStores as T } from "./
|
|
9
|
+
import { useStores as T } from "./index58.js";
|
|
10
10
|
const q = k(({ field: l }) => {
|
|
11
11
|
var x;
|
|
12
12
|
const { FILTERS_DEBOUCE_INTERVAL_MS: F } = B(), {
|
package/dist/index29.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("mobx-react"),u=require("react"),q=require("lodash/debounce"),r=require("@veeqo/ui"),C=require("./index7.cjs"),F=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("mobx-react"),u=require("react"),q=require("lodash/debounce"),r=require("@veeqo/ui"),C=require("./index7.cjs"),F=require("./index58.cjs"),R=e=>e&&e.__esModule?e:{default:e},p=R(q),x=h.observer(({field:e})=>{var i;const{FILTERS_DEBOUCE_INTERVAL_MS:l}=C.useBusinessLogic(),{Filters:{setFilter:n,filters:a}}=F.useStores();if(!((i=e.options)!=null&&i.length))return null;const d=a.get(e.id),[S,c]=u.useState(d),b=u.useCallback(p.default((t,s)=>{n(t,s)},l),[n]),g=t=>{const s=`${t[0]}`;c(s),b(e.id,s)},_=()=>{c(""),n(e.id,"")};return o.jsxs(r.Stack,{spacing:"xs",children:[o.jsx(r.Button,{variant:"link",onClick:_,children:"Clear"}),o.jsx(r.ChoiceList,{title:e.label,options:e.options,selected:[S],onChange:t=>g(t)})]})});exports.RadioFilter=x;
|
package/dist/index29.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useState as C, useCallback as F } from "react";
|
|
|
4
4
|
import S from "lodash/debounce";
|
|
5
5
|
import { Stack as g, Button as b, ChoiceList as V } from "@veeqo/ui";
|
|
6
6
|
import { useBusinessLogic as f } from "./index7.js";
|
|
7
|
-
import { useStores as k } from "./
|
|
7
|
+
import { useStores as k } from "./index58.js";
|
|
8
8
|
const I = h(({ field: e }) => {
|
|
9
9
|
var n;
|
|
10
10
|
const { FILTERS_DEBOUCE_INTERVAL_MS: c } = f(), {
|
package/dist/index3.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index6.cjs"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index6.cjs"),t=require("./index50.cjs"),s=require("./index51.cjs"),n=(r={})=>e.axios.patch("/current_user",{user:r},t.withCSRF(s.vndAPI));exports.patchCurrentUser=n;
|
package/dist/index3.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { axios as t } from "./index6.js";
|
|
2
|
-
import { withCSRF as o } from "./
|
|
3
|
-
import { vndAPI as e } from "./
|
|
2
|
+
import { withCSRF as o } from "./index50.js";
|
|
3
|
+
import { vndAPI as e } from "./index51.js";
|
|
4
4
|
const s = (r = {}) => t.patch("/current_user", { user: r }, o(e));
|
|
5
5
|
export {
|
|
6
6
|
s as patchCurrentUser
|
package/dist/index30.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("mobx-react"),s=require("@veeqo/ui"),i=require("@veeqo/components"),l=require("./index31.cjs"),n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("mobx-react"),s=require("@veeqo/ui"),i=require("@veeqo/components"),l=require("./index31.cjs"),n=require("./index58.cjs"),{Glyph:d}=i.VeeqoCommon,c=t.observer(()=>{const{Filters:{isFiltersDropdownVisible:o,toggleFiltersDropdownVisible:r}}=n.useStores();return e.jsx(s.Dropdown,{id:"filters-dropdown",ctaProps:{iconSlot:e.jsx(d,{name:"filter"}),children:"Filters",loading:!1,disabled:!1,className:"act-toggle-filter",style:{borderRadius:s.theme.radius.base}},style:{padding:0},shouldShow:o,setShouldShow:r,children:e.jsx(l.FiltersList,{})})});exports.FiltersDropdown=c;
|
package/dist/index30.js
CHANGED
|
@@ -3,7 +3,7 @@ import { observer as s } from "mobx-react";
|
|
|
3
3
|
import { Dropdown as t, theme as i } from "@veeqo/ui";
|
|
4
4
|
import { VeeqoCommon as l } from "@veeqo/components";
|
|
5
5
|
import { FiltersList as d } from "./index31.js";
|
|
6
|
-
import { useStores as m } from "./
|
|
6
|
+
import { useStores as m } from "./index58.js";
|
|
7
7
|
const { Glyph: n } = l, b = s(() => {
|
|
8
8
|
const {
|
|
9
9
|
Filters: { isFiltersDropdownVisible: r, toggleFiltersDropdownVisible: e }
|
package/dist/index31.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("./index7.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("./index7.cjs"),u=require("./index87.cjs"),c=require("./index32.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/index31.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 "./index7.js";
|
|
5
|
-
import { AdaptiveHeightContainer as p } from "./
|
|
5
|
+
import { AdaptiveHeightContainer as p } from "./index87.js";
|
|
6
6
|
import { FilterGroup as n } from "./index32.js";
|
|
7
7
|
const u = e(() => {
|
|
8
8
|
const { GROUP_MAP: t } = s();
|
package/dist/index32.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("mobx-react"),n=require("@veeqo/ui"),c=require("@veeqo/components"),u=require("./index27.cjs"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("mobx-react"),n=require("@veeqo/ui"),c=require("@veeqo/components"),u=require("./index27.cjs"),t=require("./index46.cjs"),F=require("./index25.cjs"),a=require("./index29.cjs"),h=require("./index28.cjs"),p=require("./index26.cjs"),x=require("./index24.cjs"),y=require("./index23.cjs"),{Glyph:R}=c.VeeqoCommon,C=s.observer(({data:i})=>{const l=i.fields.filter(e=>e.filterType===t.FilterChoiceValue.TEXT||e.filterType===t.FilterChoiceValue.NUMBER),o=i.fields.filter(e=>e.filterType!==t.FilterChoiceValue.TEXT&&e.filterType!==t.FilterChoiceValue.NUMBER);return r.jsx(n.Accordion,{iconSlot:r.jsx(R,{name:"product-menu"}),label:i.label,children:r.jsxs(n.Stack,{children:[l.length>0?r.jsx(u.MultipleFieldFilter,{fields:l,groupId:i.id}):null,o.map(e=>{switch(e.filterType){case t.FilterChoiceValue.CHECKBOX:return e.fetchAsyncFilterOptions?r.jsx(y.AsyncCheckboxFilter,{field:e}):r.jsx(F.CheckboxFilter,{field:e});case t.FilterChoiceValue.RADIO:return e.fetchAsyncFilterOptions?r.jsx(x.AsyncRadioFilter,{field:e}):r.jsx(a.RadioFilter,{field:e});case t.FilterChoiceValue.DATE_RANGE:return r.jsx(p.DateRangeFilter,{field:e});case t.FilterChoiceValue.NUMBER_RANGE:return r.jsx(h.NumberRangeFilter,{field:e});default:return r.jsxs("div",{children:[e.id,": Unknown filter type: ",e.filterType]},e.id)}})]})})});exports.FilterGroup=C;
|
package/dist/index32.js
CHANGED
|
@@ -3,7 +3,7 @@ import { observer as m } from "mobx-react";
|
|
|
3
3
|
import { Accordion as p, Stack as c } from "@veeqo/ui";
|
|
4
4
|
import { VeeqoCommon as s } from "@veeqo/components";
|
|
5
5
|
import { MultipleFieldFilter as f } from "./index27.js";
|
|
6
|
-
import { FilterChoiceValue as t } from "./
|
|
6
|
+
import { FilterChoiceValue as t } from "./index46.js";
|
|
7
7
|
import { CheckboxFilter as u } from "./index25.js";
|
|
8
8
|
import { RadioFilter as F } from "./index29.js";
|
|
9
9
|
import { NumberRangeFilter as a } from "./index28.js";
|
package/dist/index33.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),a=require("react"),c=require("@veeqo/ui"),W=require("mobx-react"),Y=require("./index61.cjs"),z=require("./index59.cjs"),G=require("./index37.cjs"),J=require("./index40.cjs"),K=require("./index53.cjs"),Q=require("./index84.cjs"),X=require("./index7.cjs"),Z=require("./index58.cjs"),$=require("./index85.cjs"),b=W.observer(({view:e})=>{const{VIEW_TYPE:S,SEARCH_FILTER_ID:l}=X.useBusinessLogic(),{Filters:{activeViewId:d,initFiltersFromView:w,discardChanges:f,initFromUrl:m,filters:x,setFilter:L},Views:{draftViewsMap:T},Notifications:{notify:y}}=Z.useStores(),{viewsMap:V,defaultCustomViewId:F,isLoading:j}=z.useViews(),{isLoading:N}=Y.useCustomViews({type:S}),{viewCounts:E,isLoadingTableData:M}=Q.useViewCounts(e.id),[s,R]=a.useState(null),k=o=>{const q=x.get(l);if(V.has(o)){const n=V.get(o);n&&(w(n),f(!0),m())}else{const n=T.get(o);n?(w(n),f(!0),m()):y({type:"error",text:"Failed to load view"})}q&&L(l,q)},r=(e==null?void 0:e.id)===d,t=e.originalView!==void 0,h=e.originalView===void 0,P=E,u=(e==null?void 0:e.label)||"",A=j||N,g=a.useRef(!1);!A&&!g.current&&r&&e.id===F&&s&&(g.current=!0,s&&d===e.id&&window.requestAnimationFrame(()=>{var o;(o=s.parentElement)==null||o.scrollBy({behavior:"smooth",left:s.offsetLeft})}));const p=a.useMemo(()=>t?"draft":e.editable?"saved":"fixed",[t,e.editable]),{actions:{create:{handleSaveDraft:B},menu:{toggleDropdown:D},delete:{closeDeleteConfirmation:I,handleDelete:_,handleDeleteDraftView:C}},state:{shouldShowDeleteConfirmation:H},actions:O,state:v}=K.useDropdownManager(e),U=a.useMemo(()=>{if(h)return D;if(t)return C},[C,t,h,D]);return i.jsxs(i.Fragment,{children:[i.jsx(c.ViewTab,{colourPalette:c.theme.colors.secondary.blue,className:"act-react-listing-custom-view",active:r,id:e==null?void 0:e.id,name:u,type:p,count:M?i.jsx(c.Loader,{type:"ThreeDots",width:12,height:12,color:r?"#fff":c.theme.colors.neutral.ink.dark}):P,onClick:k,subAction:U,ariaContext:"orders",ref:R,"aria-controls":"options-dropdown","aria-expanded":v.shouldShowDropdown,"aria-haspopup":"dialog"},e==null?void 0:e.id),i.jsx($.Confirmation,{shouldShow:H,viewName:u,onCancel:I,onDelete:_}),i.jsx(G.PillNotifications,{tabType:p,isActive:r,initialViewName:u,shouldShowCreateViewNotification:t,handleSaveDraft:B}),i.jsx(J.ViewDropdowns,{referenceElement:s,tab:e,...O,...v})]})});exports.ViewTab=b;
|
package/dist/index33.js
CHANGED
|
@@ -1,79 +1,80 @@
|
|
|
1
1
|
import { jsxs as W, Fragment as Y, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ViewTab as
|
|
4
|
-
import { observer as
|
|
5
|
-
import { useCustomViews as Q } from "./
|
|
6
|
-
import { useViews as X } from "./
|
|
2
|
+
import { useState as $, useRef as z, useMemo as C } from "react";
|
|
3
|
+
import { ViewTab as G, theme as L, Loader as J } from "@veeqo/ui";
|
|
4
|
+
import { observer as K } from "mobx-react";
|
|
5
|
+
import { useCustomViews as Q } from "./index61.js";
|
|
6
|
+
import { useViews as X } from "./index59.js";
|
|
7
7
|
import { PillNotifications as Z } from "./index37.js";
|
|
8
8
|
import { ViewDropdowns as b } from "./index40.js";
|
|
9
|
-
import { useDropdownManager as ee } from "./
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
import { useDropdownManager as ee } from "./index53.js";
|
|
10
|
+
import { useViewCounts as oe } from "./index84.js";
|
|
11
|
+
import { useBusinessLogic as ie } from "./index7.js";
|
|
12
|
+
import { useStores as te } from "./index58.js";
|
|
13
|
+
import { Confirmation as re } from "./index85.js";
|
|
14
|
+
const ge = K(({ view: e }) => {
|
|
15
|
+
const { VIEW_TYPE: S, SEARCH_FILTER_ID: l } = ie(), {
|
|
16
|
+
Filters: { activeViewId: c, initFiltersFromView: d, discardChanges: f, initFromUrl: m, filters: T, setFilter: F },
|
|
17
|
+
Views: { draftViewsMap: y },
|
|
18
|
+
Notifications: { notify: x }
|
|
19
|
+
} = te(), { viewsMap: u, defaultCustomViewId: E, isLoading: N } = X(), { isLoading: k } = Q({ type: S }), { viewCounts: A, isLoadingTableData: M } = oe(e.id), [i, R] = $(null), I = (o) => {
|
|
20
|
+
const v = T.get(l);
|
|
21
|
+
if (u.has(o)) {
|
|
22
|
+
const r = u.get(o);
|
|
23
|
+
r && (d(r), f(!0), m());
|
|
23
24
|
} else {
|
|
24
|
-
const
|
|
25
|
-
|
|
25
|
+
const r = y.get(o);
|
|
26
|
+
r ? (d(r), f(!0), m()) : x({
|
|
26
27
|
type: "error",
|
|
27
28
|
text: "Failed to load view"
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
|
-
v &&
|
|
31
|
-
}, n = (e == null ? void 0 : e.id) ===
|
|
32
|
-
!
|
|
31
|
+
v && F(l, v);
|
|
32
|
+
}, n = (e == null ? void 0 : e.id) === c, t = e.originalView !== void 0, w = e.originalView === void 0, P = A, a = (e == null ? void 0 : e.label) || "", _ = N || k, p = z(!1);
|
|
33
|
+
!_ && !p.current && n && e.id === E && i && (p.current = !0, i && c === e.id && window.requestAnimationFrame(() => {
|
|
33
34
|
var o;
|
|
34
35
|
(o = i.parentElement) == null || o.scrollBy({
|
|
35
36
|
behavior: "smooth",
|
|
36
37
|
left: i.offsetLeft
|
|
37
38
|
});
|
|
38
39
|
}));
|
|
39
|
-
const
|
|
40
|
+
const h = C(() => t ? "draft" : e.editable ? "saved" : "fixed", [t, e.editable]), {
|
|
40
41
|
actions: {
|
|
41
|
-
create: { handleSaveDraft:
|
|
42
|
+
create: { handleSaveDraft: j },
|
|
42
43
|
menu: { toggleDropdown: V },
|
|
43
|
-
delete: { closeDeleteConfirmation:
|
|
44
|
+
delete: { closeDeleteConfirmation: B, handleDelete: q, handleDeleteDraftView: g }
|
|
44
45
|
},
|
|
45
46
|
state: { shouldShowDeleteConfirmation: H },
|
|
46
47
|
actions: O,
|
|
47
|
-
state:
|
|
48
|
-
} = ee(e), U =
|
|
49
|
-
if (
|
|
50
|
-
if (
|
|
51
|
-
}, [
|
|
48
|
+
state: D
|
|
49
|
+
} = ee(e), U = C(() => {
|
|
50
|
+
if (w) return V;
|
|
51
|
+
if (t) return g;
|
|
52
|
+
}, [g, t, w, V]);
|
|
52
53
|
return /* @__PURE__ */ W(Y, { children: [
|
|
53
54
|
/* @__PURE__ */ s(
|
|
54
|
-
|
|
55
|
+
G,
|
|
55
56
|
{
|
|
56
57
|
colourPalette: L.colors.secondary.blue,
|
|
57
58
|
className: "act-react-listing-custom-view",
|
|
58
59
|
active: n,
|
|
59
60
|
id: e == null ? void 0 : e.id,
|
|
60
|
-
name:
|
|
61
|
-
type:
|
|
62
|
-
count:
|
|
63
|
-
|
|
61
|
+
name: a,
|
|
62
|
+
type: h,
|
|
63
|
+
count: M ? /* @__PURE__ */ s(
|
|
64
|
+
J,
|
|
64
65
|
{
|
|
65
66
|
type: "ThreeDots",
|
|
66
67
|
width: 12,
|
|
67
68
|
height: 12,
|
|
68
69
|
color: n ? "#fff" : L.colors.neutral.ink.dark
|
|
69
70
|
}
|
|
70
|
-
) :
|
|
71
|
-
onClick:
|
|
71
|
+
) : P,
|
|
72
|
+
onClick: I,
|
|
72
73
|
subAction: U,
|
|
73
74
|
ariaContext: "orders",
|
|
74
|
-
ref:
|
|
75
|
+
ref: R,
|
|
75
76
|
"aria-controls": "options-dropdown",
|
|
76
|
-
"aria-expanded":
|
|
77
|
+
"aria-expanded": D.shouldShowDropdown,
|
|
77
78
|
"aria-haspopup": "dialog"
|
|
78
79
|
},
|
|
79
80
|
e == null ? void 0 : e.id
|
|
@@ -82,24 +83,24 @@ const he = M(({ view: e, viewTabSlotValueMap: c, isLoadingTableData: y }) => {
|
|
|
82
83
|
re,
|
|
83
84
|
{
|
|
84
85
|
shouldShow: H,
|
|
85
|
-
viewName:
|
|
86
|
-
onCancel:
|
|
86
|
+
viewName: a,
|
|
87
|
+
onCancel: B,
|
|
87
88
|
onDelete: q
|
|
88
89
|
}
|
|
89
90
|
),
|
|
90
91
|
/* @__PURE__ */ s(
|
|
91
92
|
Z,
|
|
92
93
|
{
|
|
93
|
-
tabType:
|
|
94
|
+
tabType: h,
|
|
94
95
|
isActive: n,
|
|
95
|
-
initialViewName:
|
|
96
|
-
shouldShowCreateViewNotification:
|
|
97
|
-
handleSaveDraft:
|
|
96
|
+
initialViewName: a,
|
|
97
|
+
shouldShowCreateViewNotification: t,
|
|
98
|
+
handleSaveDraft: j
|
|
98
99
|
}
|
|
99
100
|
),
|
|
100
|
-
/* @__PURE__ */ s(b, { referenceElement: i, tab: e, ...O, ...
|
|
101
|
+
/* @__PURE__ */ s(b, { referenceElement: i, tab: e, ...O, ...D })
|
|
101
102
|
] });
|
|
102
103
|
});
|
|
103
104
|
export {
|
|
104
|
-
|
|
105
|
+
ge as ViewTab
|
|
105
106
|
};
|
package/dist/index34.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@veeqo/components"),t=require("@veeqo/ui"),r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@veeqo/components"),t=require("@veeqo/ui"),r=require("./index54.cjs"),{Glyph:s}=c.VeeqoCommon,l=({hideActionsPopover:i})=>{const{duplicateView:o}=r.useDuplicateActiveView(),n=()=>{o(),i()};return e.jsx(t.Button,{style:{width:"100%"},iconSlot:e.jsx(s,{name:"add",size:"sm",color:t.theme.colors.neutral.ink.base}),variant:"flat",onClick:n,children:"Create View"})};exports.CreateView=l;
|
package/dist/index34.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { VeeqoCommon as r } from "@veeqo/components";
|
|
3
3
|
import { Button as n, theme as c } from "@veeqo/ui";
|
|
4
|
-
import { useDuplicateActiveView as l } from "./
|
|
4
|
+
import { useDuplicateActiveView as l } from "./index54.js";
|
|
5
5
|
const { Glyph: m } = r, u = ({ hideActionsPopover: o }) => {
|
|
6
6
|
const { duplicateView: t } = l(), i = () => {
|
|
7
7
|
t(), o();
|
package/dist/index35.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@veeqo/ui"),o=require("react-hook-form"),I=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@veeqo/ui"),o=require("react-hook-form"),I=require("./index61.cjs"),f=require("./index42.cjs"),D=require("./index7.cjs"),d=60,_=({tab:n,viewName:w,shouldShowDropdown:v,onCloseDropdown:g,onDelete:p,onSave:x,headerText:j,e2ePrefix:a,activeOption:b})=>{const{VIEW_TYPE:C}=D.useBusinessLogic(),{canDeleteCustomViews:u,canUpdateCustomViews:r,canShareCustomViews:l,defaultCustomViewId:m}=I.useCustomViews({type:C}),S=n.id===m,{handleSubmit:y,control:c,formState:h}=o.useForm({mode:"onChange",defaultValues:{viewName:w,isDefault:n.id===m,shareOption:b.key}}),V=Object.values(f.SHARING_OPTIONS).map(s=>({key:s.key,value:s.key,label:s.text}));if(!v)return null;const k=n.originalView===void 0;return e.jsx("form",{onSubmit:y(x),children:e.jsxs(t.Card,{style:{width:"400px"},title:j,subtitle:"Active filters and sort direction will be saved in your view",onClose:g,renderFooter:()=>u||r||l?e.jsxs(t.Stack,{direction:"horizontal",alignX:"end",children:[u&&e.jsx(t.Button,{variant:"destructive",onClick:p,className:`act-react-listing-custom-view-${a}-delete`,children:"Delete"}),(r||l)&&e.jsx(t.Button,{variant:"primary",type:"submit",className:`act-react-listing-custom-view-${a}-save`,disabled:!h.isDirty&&k||h.isSubmitting,children:"Save"})]}):null,className:`act-react-listing-custom-view-${a}`,children:[!r&&e.jsx(t.Alert,{variant:"warning",title:"You need permission to edit this view",message:"This is a company shared view"}),e.jsxs(t.Stack,{children:[e.jsx(o.Controller,{name:"viewName",control:c,render:({onChange:s,value:i})=>e.jsx(t.TextField,{id:"view-name",className:`act-react-listing-custom-view-${a}-field`,label:"View name",placeholder:"View name",value:i,onChange:s,disabled:!n.editable,maxLength:d,hint:`${i.length} / ${d} characters`,required:!0})}),e.jsxs(t.Stack,{children:[e.jsx(t.Text,{variant:"inputLabel",children:"Sharing options"}),e.jsx("br",{}),e.jsx(o.Controller,{name:"shareOption",control:c,render:({onChange:s,value:i})=>e.jsx(t.SegmentedControl,{onChange:T=>l&&s(T),options:V,selected:i})})]}),e.jsx(o.Controller,{name:"isDefault",control:c,render:({onChange:s,value:i})=>e.jsx(t.Checkbox,{disabled:S,name:"makeViewDefault",label:"Make default view",checked:i,onChange:s,hint:"This will be the tab this page will always open on"})})]})]})})};exports.EditDropdown=_;exports.VIEWS_TITLE_MAX_CHAR_LIMIT=d;
|
package/dist/index35.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { Card as x, Alert as O, Stack as c, TextField as _, Text as $, SegmentedControl as A, Checkbox as E, Button as w } from "@veeqo/ui";
|
|
3
3
|
import { useForm as L, Controller as d } from "react-hook-form";
|
|
4
|
-
import { useCustomViews as j } from "./
|
|
4
|
+
import { useCustomViews as j } from "./index61.js";
|
|
5
5
|
import { SHARING_OPTIONS as F } from "./index42.js";
|
|
6
6
|
import { useBusinessLogic as M } from "./index7.js";
|
|
7
7
|
const p = 60, z = ({
|
package/dist/index36.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index86.cjs"),g=require("./index49.cjs"),j=require("./index48.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,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 "./index86.js";
|
|
3
|
+
import { useModal as k } from "./index49.js";
|
|
4
|
+
import { ModalId as T } from "./index48.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("./index59.cjs"),v=require("./index88.cjs"),g=require("./index39.cjs"),h=require("./index58.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 "./index59.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 "./index58.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("./index89.cjs"),g=require("./index61.cjs"),S=require("./index59.cjs"),b=require("./index3.cjs"),y=require("./index7.cjs"),V=require("./index58.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 "./index89.js";
|
|
4
|
+
import { useCustomViews as w } from "./index61.js";
|
|
5
|
+
import { useViews as d } from "./index59.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 "./index58.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"),
|
|
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"),u=require("./index57.cjs"),n=require("./index90.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(s.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(s.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
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { useState as m } from "react";
|
|
3
|
-
import { Stack as g, theme as u, AnimatedDropdown as v } from "@veeqo/ui";
|
|
3
|
+
import { Stack as g, theme as u, Button as o, AnimatedDropdown as v } from "@veeqo/ui";
|
|
4
4
|
import { observer as p } from "mobx-react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { usePersistUnsavedChanges as f } from "./index57.js";
|
|
6
|
+
import { Notification as w, Container as C, Glyph as b, Wrap as y, Text as a, Bold as k, Item as r } from "./index90.js";
|
|
7
7
|
const S = u.colors.secondary.blue.base, A = p(
|
|
8
8
|
({
|
|
9
9
|
onDiscard: s,
|
|
10
10
|
viewName: i,
|
|
11
11
|
onSaveDraft: c
|
|
12
12
|
}) => {
|
|
13
|
-
const { saveChanges: d, isSubmitting: l } =
|
|
14
|
-
return /* @__PURE__ */ e(
|
|
15
|
-
/* @__PURE__ */ e(
|
|
16
|
-
/* @__PURE__ */ n(
|
|
13
|
+
const { saveChanges: d, isSubmitting: l } = f(), [h, t] = m(!1);
|
|
14
|
+
return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(C, { className: "act-react-listing-custom-notification-unsaved-changes", children: /* @__PURE__ */ n(g, { direction: "horizontal", alignY: "center", children: [
|
|
15
|
+
/* @__PURE__ */ e(b, { name: "attention", color: S }),
|
|
16
|
+
/* @__PURE__ */ n(y, { children: [
|
|
17
17
|
/* @__PURE__ */ e(a, { variant: "body", margin: "0 4px 0 0", children: "You have unsaved changes to" }),
|
|
18
|
-
/* @__PURE__ */ e(
|
|
18
|
+
/* @__PURE__ */ e(k, { variant: "bodyBoldDark", children: `'${i}'` })
|
|
19
19
|
] }),
|
|
20
20
|
/* @__PURE__ */ e(
|
|
21
21
|
o,
|
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("./index50.cjs"),o=require("./index51.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 "./index50.js";
|
|
3
|
+
import { vndAPI as p } from "./index51.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"),
|
|
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("./index59.cjs"),S=require("./index60.cjs"),q=require("./index34.cjs"),u=require("./index33.cjs"),p=require("./index58.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;
|