@veeqo/transfigure 2.3.0 → 2.4.0
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/constants/viewConstants.d.ts +2 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useCreateEmptyDraftView/index.d.ts +1 -0
- package/dist/hooks/useCreateEmptyDraftView/useCreateEmptyDraftView.d.ts +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +72 -70
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +48 -19
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +28 -17
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +15 -24
- package/dist/index103.cjs +11 -18
- package/dist/index103.js +12 -20
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +15 -14
- package/dist/index105.cjs +19 -1
- package/dist/index105.js +24 -7
- package/dist/index106.cjs +1 -12
- package/dist/index106.js +21 -16
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +23 -49
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +12 -29
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +1 -1
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +8 -18
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +2 -8
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +17 -59
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +7 -29
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +61 -2
- package/dist/index115.cjs +1 -13
- package/dist/index115.js +30 -17
- package/dist/index116.cjs +13 -1
- package/dist/index116.js +15 -24
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +22 -32
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +36 -5
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +5 -63
- package/dist/index120.cjs +1 -7
- package/dist/index120.js +63 -10
- package/dist/index121.cjs +7 -1
- package/dist/index121.js +10 -47
- package/dist/index122.cjs +1 -0
- package/dist/index122.js +49 -0
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +1 -1
- 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/index19.cjs +1 -1
- package/dist/index19.js +3 -3
- 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 +3 -3
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +2 -2
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +3 -3
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +3 -3
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.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 +3 -3
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +35 -35
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +10 -10
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +40 -37
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +3 -3
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +4 -4
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +4 -4
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +3 -3
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +3 -3
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +33 -33
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +2 -2
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +10 -23
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +19 -22
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +26 -96
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +97 -8
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +8 -33
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +33 -63
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +59 -19
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +23 -18
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +16 -29
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +30 -60
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +61 -376
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +4 -4
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +372 -53
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +48 -47
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +51 -32
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +40 -24
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +26 -32
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +38 -4
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +4 -13
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +12 -16
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +14 -16
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +18 -65
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +67 -24
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +24 -21
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +19 -6
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +7 -2
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +2 -9
- package/dist/index85.cjs +1 -3
- package/dist/index85.js +8 -13
- package/dist/index86.cjs +3 -1
- package/dist/index86.js +13 -8
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +8 -4
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +39 -115
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +9 -41
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +116 -8
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +5 -13
- package/dist/index93.cjs +1 -104
- package/dist/index93.js +13 -119
- package/dist/index94.cjs +104 -1
- package/dist/index94.js +116 -65
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +63 -23
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +28 -2
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +2 -41
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +39 -9
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +10 -8
- package/dist/mobx/Views/Views.d.ts +1 -0
- package/dist/types.d.ts +4 -7
- package/dist/utils/createEmptyTransformedView/createEmptyTransformedView.d.ts +6 -0
- package/dist/utils/createEmptyTransformedView/createEmptyTransformedView.test.d.ts +1 -0
- package/dist/utils/createEmptyTransformedView/index.d.ts +1 -0
- package/dist/utils/getViewTheme/getViewTheme.d.ts +10 -13
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/viewsAdapter/viewsAdapter.d.ts +1 -1
- package/package.json +1 -1
- package/dist/utils/createAllView/createAllView.d.ts +0 -3
- package/dist/utils/createAllView/index.d.ts +0 -1
- /package/dist/{utils/createAllView/createAllView.test.d.ts → hooks/useCreateEmptyDraftView/useCreateEmptyDraftView.test.d.ts} +0 -0
package/dist/index22.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),d=require("mobx-react"),l=require("@veeqo/ui"),m=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),d=require("mobx-react"),l=require("@veeqo/ui"),m=require("./index71.cjs"),R=require("./index120.cjs"),v=require("./index63.cjs"),N=require("./index24.cjs"),q=require("./index25.cjs"),A=d.observer(({filterData:t})=>{const{Filters:{numberRangeFilters:u,clearNumberRangeFilter:a,setNumberRangeFilter:F}}=v.useStores(),e=u.get(t.id),[n,c]=s.useState(e),o=s.useCallback(()=>{const r=new m.NumberRangeFilter({filterId:t.id});return e&&(e.gte&&r.setGte(e.gte),e.lte&&r.setLte(e.lte)),r},[t.id,e]);s.useEffect(()=>{const r=o();c(r)},[o,e]);const g=()=>{a(t.id)},b=()=>{!e||!n||F({numberRange:e,lte:n.lte,gte:n.gte})};return i.jsx(l.FilterTag,{shouldCloseOnClickAway:!0,header:i.jsx(q.ActiveFilterHeader,{filterLabel:t.label,icon:t.icon}),label:t.label,text:(e==null?void 0:e.filterLabel)||"Loading...",content:i.jsx(l.BaseContainer,{style:{padding:l.theme.sizes.md},children:i.jsx(R.FilterNumberRangeFilter,{data:t,editedValue:n,setEditedValue:c})}),footer:i.jsx(N.ActiveFilterFooter,{clearActiveFilter:g,applyActiveFilter:b})})});exports.ActiveFilterNumberRangeTag=A;
|
package/dist/index22.js
CHANGED
|
@@ -2,9 +2,9 @@ import { jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as d, useCallback as g, useEffect as F } from "react";
|
|
3
3
|
import { observer as b } from "mobx-react";
|
|
4
4
|
import { FilterTag as p, BaseContainer as f, theme as R } from "@veeqo/ui";
|
|
5
|
-
import { NumberRangeFilter as N } from "./
|
|
6
|
-
import { FilterNumberRangeFilter as v } from "./
|
|
7
|
-
import { useStores as A } from "./
|
|
5
|
+
import { NumberRangeFilter as N } from "./index71.js";
|
|
6
|
+
import { FilterNumberRangeFilter as v } from "./index120.js";
|
|
7
|
+
import { useStores as A } from "./index63.js";
|
|
8
8
|
import { ActiveFilterFooter as w } from "./index24.js";
|
|
9
9
|
import { ActiveFilterHeader as h } from "./index25.js";
|
|
10
10
|
const z = b(
|
package/dist/index23.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),b=require("react"),m=require("mobx-react"),t=require("@veeqo/ui"),p=require("swr/immutable"),y=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),b=require("react"),m=require("mobx-react"),t=require("@veeqo/ui"),p=require("swr/immutable"),y=require("./index77.cjs"),F=require("./index78.cjs"),O=require("./index50.cjs"),A=e=>e&&e.__esModule?e:{default:e},x=A(p),S=m.observer(({field:e,editedValue:o,setEditedValue:a})=>{var i,c;const l=b.useMemo(()=>{var r;return F.getFetcherFunction({fetcherName:(r=e.fetchAsyncFilterOptions)==null?void 0:r.fetcher})},[(i=e.fetchAsyncFilterOptions)==null?void 0:i.fetcher]),{isLoading:u,isValidating:h,data:g,error:d}=x.default((c=e.fetchAsyncFilterOptions)==null?void 0:c.URL,l,O.SWR_HOOK_OPTIONS),n=u||h,f=y.getAsyncOptions({data:g,config:e.fetchAsyncFilterOptions});return s.jsxs(t.Stack,{spacing:"xs",alignX:"stretch",children:[s.jsx(t.ChoiceList,{title:e.label,options:f,selected:[o],onChange:r=>a(`${r[0]}`)}),n&&s.jsx(t.Skeleton,{width:"200px",height:t.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!n&&d&&s.jsxs(t.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.ActiveAsyncRadioFilter=S;
|
package/dist/index23.js
CHANGED
|
@@ -3,8 +3,8 @@ import { useMemo as O } from "react";
|
|
|
3
3
|
import { observer as u } from "mobx-react";
|
|
4
4
|
import { Stack as F, ChoiceList as b, Skeleton as y, theme as A, Text as d } from "@veeqo/ui";
|
|
5
5
|
import x from "swr/immutable";
|
|
6
|
-
import { getAsyncOptions as S } from "./
|
|
7
|
-
import { getFetcherFunction as L } from "./
|
|
6
|
+
import { getAsyncOptions as S } from "./index77.js";
|
|
7
|
+
import { getFetcherFunction as L } from "./index78.js";
|
|
8
8
|
import { SWR_HOOK_OPTIONS as R } from "./index50.js";
|
|
9
9
|
const _ = u(
|
|
10
10
|
({ field: t, editedValue: c, setEditedValue: a }) => {
|
package/dist/index26.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("react"),j=require("mobx-react"),C=require("lodash/debounce"),s=require("@veeqo/ui"),L=require("swr/immutable"),k=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("react"),j=require("mobx-react"),C=require("lodash/debounce"),s=require("@veeqo/ui"),L=require("swr/immutable"),k=require("./index77.cjs"),R=require("./index78.cjs"),v=require("./index50.cjs"),T=require("./index8.cjs"),V=require("./index63.cjs"),b=e=>e&&e.__esModule?e:{default:e},E=b(C),I=b(L),M=j.observer(({field:e})=>{var d,g;const{FILTERS_DEBOUNCE_INTERVAL_MS:S}=T.useBusinessLogic(),F=i.useMemo(()=>{var t;return R.getFetcherFunction({fetcherName:(t=e.fetchAsyncFilterOptions)==null?void 0:t.fetcher})},[(d=e.fetchAsyncFilterOptions)==null?void 0:d.fetcher]),{isLoading:a,isValidating:x,data:p,error:l}=I.default((g=e.fetchAsyncFilterOptions)==null?void 0:g.URL,F,v.SWR_HOOK_OPTIONS),u=a||x,{Filters:{setArrayFilter:c,arrayFilters:y}}=V.useStores(),m=y.get(e.id)||[],[O,h]=i.useState(m),f=i.useCallback(E.default((t,n)=>{c(t,n)},S),[c]),_=t=>{const n=t.map(A=>`${A}`);h(n),f(e.id,n)},q=()=>{h([]),c(e.id,[])},o=k.getAsyncOptions({data:p,config:e.fetchAsyncFilterOptions});return o&&o.length===0&&!a&&!l?r.jsx(s.Stack,{spacing:"xs",alignX:"stretch",children:r.jsxs(s.Text,{variant:"bodySmall",children:["No options available for ",e.label]})}):r.jsxs(s.Stack,{spacing:"xs",alignX:"stretch",children:[r.jsx(s.Button,{variant:"link",onClick:q,children:"Clear"}),r.jsx(s.ChoiceList,{allowMultiple:!0,title:e.label,options:o,selected:O,onChange:t=>_(t)}),u&&r.jsx(s.Skeleton,{width:"200px",height:s.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!u&&l&&r.jsxs(s.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.AsyncCheckboxFilter=M;
|
package/dist/index26.js
CHANGED
|
@@ -4,11 +4,11 @@ import { observer as E } from "mobx-react";
|
|
|
4
4
|
import N from "lodash/debounce";
|
|
5
5
|
import { Stack as u, Text as g, Button as R, ChoiceList as _, Skeleton as I, theme as T } from "@veeqo/ui";
|
|
6
6
|
import w from "swr/immutable";
|
|
7
|
-
import { getAsyncOptions as B } from "./
|
|
8
|
-
import { getFetcherFunction as M } from "./
|
|
7
|
+
import { getAsyncOptions as B } from "./index77.js";
|
|
8
|
+
import { getFetcherFunction as M } from "./index78.js";
|
|
9
9
|
import { SWR_HOOK_OPTIONS as j } from "./index50.js";
|
|
10
10
|
import { useBusinessLogic as U } from "./index8.js";
|
|
11
|
-
import { useStores as W } from "./
|
|
11
|
+
import { useStores as W } from "./index63.js";
|
|
12
12
|
const Y = E(({ field: t }) => {
|
|
13
13
|
var h, p;
|
|
14
14
|
const { FILTERS_DEBOUNCE_INTERVAL_MS: f } = U(), b = k(() => {
|
package/dist/index27.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("react"),R=require("mobx-react"),j=require("lodash/debounce"),s=require("@veeqo/ui"),A=require("swr/immutable"),L=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("react"),R=require("mobx-react"),j=require("lodash/debounce"),s=require("@veeqo/ui"),A=require("swr/immutable"),L=require("./index77.cjs"),C=require("./index78.cjs"),k=require("./index50.cjs"),v=require("./index8.cjs"),T=require("./index63.cjs"),b=e=>e&&e.__esModule?e:{default:e},V=b(j),E=b(A),I=R.observer(({field:e})=>{var d,g;const{FILTERS_DEBOUNCE_INTERVAL_MS:S}=v.useBusinessLogic(),F=i.useMemo(()=>{var t;return C.getFetcherFunction({fetcherName:(t=e.fetchAsyncFilterOptions)==null?void 0:t.fetcher})},[(d=e.fetchAsyncFilterOptions)==null?void 0:d.fetcher]),{isLoading:a,isValidating:x,data:f,error:l}=E.default((g=e.fetchAsyncFilterOptions)==null?void 0:g.URL,F,k.SWR_HOOK_OPTIONS),u=a||x,{Filters:{setFilter:c,filters:p}}=T.useStores(),O=p.get(e.id),[m,h]=i.useState(O),y=i.useCallback(V.default((t,r)=>{c(t,r)},S),[c]),_=t=>{const r=`${t[0]}`;h(r),y(e.id,r)},q=()=>{h(""),c(e.id,"")},o=L.getAsyncOptions({data:f,config:e.fetchAsyncFilterOptions});return o&&o.length===0&&!a&&!l?n.jsx(s.Stack,{spacing:"xs",alignX:"stretch",children:n.jsxs(s.Text,{variant:"bodySmall",children:["No options available for ",e.label]})}):n.jsxs(s.Stack,{spacing:"xs",alignX:"stretch",children:[n.jsx(s.Button,{variant:"link",onClick:q,children:"Clear"}),n.jsx(s.ChoiceList,{title:e.label,options:o,selected:[m],onChange:t=>_(t)}),u&&n.jsx(s.Skeleton,{width:"200px",height:s.theme.sizes[5],"aria-busy":!0,"aria-label":`Loading ${e.label} filters`}),!u&&l&&n.jsxs(s.Text,{variant:"errorSmall",children:["Error: failed to load filter for ",e.label]})]})});exports.AsyncRadioFilter=I;
|
package/dist/index27.js
CHANGED
|
@@ -4,11 +4,11 @@ import { observer as k } from "mobx-react";
|
|
|
4
4
|
import v from "lodash/debounce";
|
|
5
5
|
import { Stack as u, Text as f, Button as E, ChoiceList as N, Skeleton as _, theme as I } from "@veeqo/ui";
|
|
6
6
|
import T from "swr/immutable";
|
|
7
|
-
import { getAsyncOptions as B } from "./
|
|
8
|
-
import { getFetcherFunction as j } from "./
|
|
7
|
+
import { getAsyncOptions as B } from "./index77.js";
|
|
8
|
+
import { getFetcherFunction as j } from "./index78.js";
|
|
9
9
|
import { SWR_HOOK_OPTIONS as w } from "./index50.js";
|
|
10
10
|
import { useBusinessLogic as M } from "./index8.js";
|
|
11
|
-
import { useStores as U } from "./
|
|
11
|
+
import { useStores as U } from "./index63.js";
|
|
12
12
|
const Q = k(({ field: t }) => {
|
|
13
13
|
var h, p;
|
|
14
14
|
const { FILTERS_DEBOUNCE_INTERVAL_MS: g } = M(), d = C(() => {
|
package/dist/index28.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("mobx-react"),l=require("react"),C=require("lodash/debounce"),r=require("@veeqo/ui"),F=require("./index8.cjs"),_=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("mobx-react"),l=require("react"),C=require("lodash/debounce"),r=require("@veeqo/ui"),F=require("./index8.cjs"),_=require("./index63.cjs"),j=e=>e&&e.__esModule?e:{default:e},k=j(C),q=p.observer(({field:e})=>{var i;const{FILTERS_DEBOUNCE_INTERVAL_MS:a}=F.useBusinessLogic(),{Filters:{setArrayFilter:o,arrayFilters:u}}=_.useStores(),d=u.get(e.id)||[],[b,c]=l.useState(d),h=l.useCallback(k.default((t,n)=>{o(t,n)},a),[o]),x=t=>{const n=t.map(g=>`${g}`);c(n),h(e.id,n)},S=()=>{c([]),o(e.id,[])};return(i=e.options)!=null&&i.length?s.jsxs(r.Stack,{spacing:"xs",children:[s.jsx(r.Button,{variant:"link",onClick:S,children:"Clear"}),s.jsx(r.ChoiceList,{allowMultiple:!0,title:e.label,options:e.options,selected:b,onChange:t=>x(t)})]}):s.jsx(r.Stack,{spacing:"xs",alignX:"stretch",children:s.jsxs(r.Text,{variant:"bodySmall",children:["No options available for ",e.label]})})});exports.CheckboxFilter=q;
|
package/dist/index28.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useState as S, useCallback as x } from "react";
|
|
|
4
4
|
import F from "lodash/debounce";
|
|
5
5
|
import { Stack as a, Text as k, Button as V, ChoiceList as v } from "@veeqo/ui";
|
|
6
6
|
import { useBusinessLogic as y } from "./index8.js";
|
|
7
|
-
import { useStores as E } from "./
|
|
7
|
+
import { useStores as E } from "./index63.js";
|
|
8
8
|
const j = C(({ field: e }) => {
|
|
9
9
|
var i;
|
|
10
10
|
const { FILTERS_DEBOUNCE_INTERVAL_MS: c } = y(), {
|
package/dist/index29.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("./index72.cjs"),b=require("./index8.cjs"),k=require("./index63.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/index29.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 "./index72.js";
|
|
6
6
|
import { useBusinessLogic as C } from "./index8.js";
|
|
7
|
-
import { useStores as x } from "./
|
|
7
|
+
import { useStores as x } from "./index63.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/index30.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),g=require("mobx-react"),u=require("@veeqo/ui"),h=require("lodash/debounce"),n=require("./index50.cjs"),j=require("./index91.cjs"),m=require("./index8.cjs"),y=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),g=require("mobx-react"),u=require("@veeqo/ui"),h=require("lodash/debounce"),n=require("./index50.cjs"),j=require("./index91.cjs"),m=require("./index8.cjs"),y=require("./index63.cjs"),k=r=>r&&r.__esModule?r:{default:r},B=k(h),v=g.observer(({fields:r,groupId:c})=>{const{FILTERS_DEBOUNCE_INTERVAL_MS:S}=m.useBusinessLogic(),{Filters:{getFiltersForGroup:p,setFilter:a,clearFiltersForGroup:V}}=y.useStores(),_=p(c),[d,F]=o.useState(_),[E,x]=o.useState({}),C=o.useCallback(B.default((e,t)=>{a(e,t)},S),[a]),q=(e,t)=>{const s={...d,[e]:t},i={...E},T=Object.entries(s).every(([b,M])=>j.isTextFilterValid(String(M))?(i[b]="",!0):(i[b]=n.MIN_SEARCH_ERROR_MESSAGE,!1));F(s),x(i),T&&C(e,t)},R=()=>{const e=r.reduce((t,s)=>({...t,[s.id]:""}),{});F(e),V(c)};return l.jsxs(u.FlexCol,{children:[l.jsx(u.Button,{variant:"link",onClick:R,children:"Clear"}),r.map(e=>{let t;switch(e.filterType){case n.FilterChoiceValue.NUMBER:t="number";break;case n.FilterChoiceValue.TEXT:t="text";break}return l.jsx(u.TextField,{type:t,value:d[e.id],error:E[e.id],label:e.label,onChange:s=>q(e.id,s)},e.id)})]})});exports.MultipleFieldFilter=v;
|
package/dist/index30.js
CHANGED
|
@@ -6,7 +6,7 @@ import y from "lodash/debounce";
|
|
|
6
6
|
import { FilterChoiceValue as F, MIN_SEARCH_ERROR_MESSAGE as B } from "./index50.js";
|
|
7
7
|
import { isTextFilterValid as G } from "./index91.js";
|
|
8
8
|
import { useBusinessLogic as N } from "./index8.js";
|
|
9
|
-
import { useStores as j } from "./
|
|
9
|
+
import { useStores as j } from "./index63.js";
|
|
10
10
|
const q = _(({ fields: s, groupId: i }) => {
|
|
11
11
|
const { FILTERS_DEBOUNCE_INTERVAL_MS: p } = N(), {
|
|
12
12
|
Filters: { getFiltersForGroup: E, setFilter: l, clearFiltersForGroup: b }
|
package/dist/index31.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),d=require("react"),q=require("mobx-react"),_=require("lodash/debounce"),u=require("@veeqo/ui"),j=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),d=require("react"),q=require("mobx-react"),_=require("lodash/debounce"),u=require("@veeqo/ui"),j=require("./index118.cjs"),L=require("./index71.cjs"),p=require("./index8.cjs"),y=require("./index63.cjs"),v=i=>i&&i.__esModule?i:{default:i},k=v(_),T=q.observer(({field:i})=>{var x;const{FILTERS_DEBOUNCE_INTERVAL_MS:R}=p.useBusinessLogic(),{Filters:{numberRangeFilters:m,setNumberRangeFilter:M,clearNumberRangeFilter:f}}=y.useStores(),e=m.get(i.id);if(!((x=i.options)!=null&&x.length))return null;const t=e??new L.NumberRangeFilter({filterId:i.id}),[o,c]=d.useState({gte:t.gte??t.gteMin,lte:t.lte??t.lteMax}),g=()=>(m.set(i.id,t),t),b=d.useCallback(k.default(({numberRange:a,lte:n,gte:r})=>{M({numberRange:a,lte:n,gte:r})},R),[M]),F=()=>{c({gte:t.gteMin,lte:t.lteMax}),f(i.id)},h=(a,n)=>{if(e||g(),!Array.isArray(n)||n.length!==2)return;const[r,l]=n;c({gte:r,lte:l}),b({numberRange:t,lte:l,gte:r})},S=a=>{if(e||g(),!e)return;const n=Number(a);if(n>e.lteMax)return;let{lte:r}=e,{gte:l}=e;n>=e.gteMin&&n<=e.lteMax&&(l=n),(!e.lte||n>=e.lte)&&(r=e.lteMax),c({gte:l,lte:r}),b({numberRange:e,lte:r,gte:l})},N=a=>{if(e||g(),!e)return;const n=Number(a);if(n<e.gteMin)return;let{lte:r}=e,{gte:l}=e;n>=e.gteMin&&n<=e.lteMax&&(r=n),(!e.gte||n<=e.gte)&&(l=e.gteMin),c({gte:l,lte:r}),b({numberRange:e,lte:r,gte:l})},C=[o.gte,o.lte];return s.jsxs(u.Stack,{spacing:"xs",alignX:"stretch",children:[s.jsx(u.Button,{variant:"link",onClick:F,children:"Clear"}),s.jsxs(u.Stack,{direction:"horizontal",children:[s.jsx(u.TextField,{label:t.gteMinLabel,type:"number",min:t.gteMin,max:t.lteMax,value:o.gte.toString(),onChange:S}),s.jsx(u.TextField,{label:t.lteMaxLabel,type:"number",min:t.gteMin,max:t.lteMax,value:o.lte.toString(),onChange:N})]}),s.jsx(j.MUISlider,{value:C,onChange:h,min:t.gteMin,max:t.lteMax,valueLabelDisplay:"auto"})]})});exports.NumberRangeFilter=T;
|
package/dist/index31.js
CHANGED
|
@@ -3,10 +3,10 @@ import { useState as L, useCallback as v } from "react";
|
|
|
3
3
|
import { observer as y } from "mobx-react";
|
|
4
4
|
import V from "lodash/debounce";
|
|
5
5
|
import { Stack as x, Button as k, TextField as R } from "@veeqo/ui";
|
|
6
|
-
import { MUISlider as E } from "./
|
|
7
|
-
import { NumberRangeFilter as I } from "./
|
|
6
|
+
import { MUISlider as E } from "./index118.js";
|
|
7
|
+
import { NumberRangeFilter as I } from "./index71.js";
|
|
8
8
|
import { useBusinessLogic as _ } from "./index8.js";
|
|
9
|
-
import { useStores as A } from "./
|
|
9
|
+
import { useStores as A } from "./index63.js";
|
|
10
10
|
const $ = y(({ field: a }) => {
|
|
11
11
|
var b;
|
|
12
12
|
const { FILTERS_DEBOUNCE_INTERVAL_MS: p } = _(), {
|
package/dist/index32.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),x=require("mobx-react"),l=require("react"),p=require("lodash/debounce"),n=require("@veeqo/ui"),_=require("./index8.cjs"),j=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),x=require("mobx-react"),l=require("react"),p=require("lodash/debounce"),n=require("@veeqo/ui"),_=require("./index8.cjs"),j=require("./index63.cjs"),q=e=>e&&e.__esModule?e:{default:e},C=q(p),F=x.observer(({field:e})=>{var i;const{FILTERS_DEBOUNCE_INTERVAL_MS:a}=_.useBusinessLogic(),{Filters:{setFilter:r,filters:u}}=j.useStores(),d=u.get(e.id),[b,c]=l.useState(d),S=l.useCallback(C.default((t,o)=>{r(t,o)},a),[r]),g=t=>{const o=`${t[0]}`;c(o),S(e.id,o)},h=()=>{c(""),r(e.id,"")};return(i=e.options)!=null&&i.length?s.jsxs(n.Stack,{spacing:"xs",children:[s.jsx(n.Button,{variant:"link",onClick:h,children:"Clear"}),s.jsx(n.ChoiceList,{title:e.label,options:e.options,selected:[b],onChange:t=>g(t)})]}):s.jsx(n.Stack,{spacing:"xs",alignX:"stretch",children:s.jsxs(n.Text,{variant:"bodySmall",children:["No options available for ",e.label]})})});exports.RadioFilter=F;
|
package/dist/index32.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useState as S, useCallback as C } from "react";
|
|
|
4
4
|
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
|
-
import { useStores as v } from "./
|
|
7
|
+
import { useStores as v } from "./index63.js";
|
|
8
8
|
const j = g(({ field: e }) => {
|
|
9
9
|
var i;
|
|
10
10
|
const { FILTERS_DEBOUNCE_INTERVAL_MS: a } = k(), {
|
package/dist/index33.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("mobx-react"),s=require("@veeqo/ui"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("mobx-react"),s=require("@veeqo/ui"),i=require("./index63.cjs"),l=require("./index34.cjs"),n=o.observer(()=>{const{Filters:{isFiltersDropdownVisible:r,toggleFiltersDropdownVisible:t}}=i.useStores();return e.jsx(s.Dropdown,{id:"filters-dropdown",ctaProps:{iconSlot:e.jsx(s.FilterIcon,{}),children:"Filters",loading:!1,disabled:!1,className:"act-toggle-filter",style:{borderRadius:s.theme.radius.base}},style:{padding:0},shouldShow:r,setShouldShow:t,children:e.jsx(l.FiltersList,{})})});exports.FiltersDropdown=n;
|
package/dist/index33.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { observer as s } from "mobx-react";
|
|
3
3
|
import { Dropdown as i, theme as t, FilterIcon as l } from "@veeqo/ui";
|
|
4
|
-
import { useStores as d } from "./
|
|
4
|
+
import { useStores as d } from "./index63.js";
|
|
5
5
|
import { FiltersList as n } from "./index34.js";
|
|
6
6
|
const h = s(() => {
|
|
7
7
|
const {
|
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("./index107.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 "./index107.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("./
|
|
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("./index67.cjs"),G=require("./index64.cjs"),J=require("./index40.cjs"),K=require("./index43.cjs"),Q=require("./index57.cjs"),X=require("./index100.cjs"),Z=require("./index8.cjs"),$=require("./index63.cjs"),b=require("./index101.cjs"),ee=U.observer(({view:e})=>{const{VIEW_TYPE:L,IS_VIEWS_READONLY:r,SEARCH_FILTER_ID:d}=Z.useBusinessLogic(),{Filters:{activeViewId:w,initFiltersFromView:f,discardChanges:m,initFromUrl:V,filters:T,setFilter:y},Views:{draftViewsMap:h},Notifications:{notify:E}}=$.useStores(),{viewsMap:g,defaultCustomViewId:F,isLoading:N}=G.useViews(),{isLoading:j}=z.useCustomViews({type:L}),{viewCounts:M,isLoadingViewCounts:R}=X.useViewCounts(e.id),[t,P]=c.useState(null),k=s=>{const x=T.get(d);if(g.has(s)){const n=g.get(s);n&&(f(n),m(!0),V())}else{const n=h.get(s);n?(f(n),m(!0),V()):E({type:"error",text:"Failed to load view"})}x&&y(d,x)},u=(e==null?void 0:e.id)===w,o=h.has(e.id),p=!o,A=M,a=(e==null?void 0:e.label)||"",I=N||j,C=c.useRef(!1);!I&&!C.current&&u&&e.id===F&&t&&(C.current=!0,t&&w===e.id&&window.requestAnimationFrame(()=>{var s;(s=t.parentElement)==null||s.scrollBy({behavior:"smooth",left:t.offsetLeft})}));const D=c.useMemo(()=>o?"draft":e.editable?"saved":"fixed",[o,e.editable]),{actions:{create:{handleSaveDraft:_},menu:{toggleDropdown:v},delete:{closeDeleteConfirmation:B,handleDelete:O,handleDeleteDraftView:S}},state:{shouldShowDeleteConfirmation:H},actions:W,state:q}=Q.useDropdownManager(e),Y=c.useMemo(()=>{if(!r){if(p)return v;if(o)return S}},[S,o,p,v,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:D,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":q.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:D,isActive:u,initialViewName:a,shouldShowCreateViewNotification:o,handleSaveDraft:_}),!r&&i.jsx(K.ViewDropdowns,{referenceElement:t,tab:e,...W,...q})]})});exports.ViewTab=ee;
|
package/dist/index36.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
import { jsxs as H, Fragment as U, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useState as $, useRef as z, useMemo as
|
|
2
|
+
import { useState as $, useRef as z, useMemo as L } from "react";
|
|
3
3
|
import { ViewTab as G, Loader as J, theme as K } from "@veeqo/ui";
|
|
4
4
|
import { observer as Q } from "mobx-react";
|
|
5
|
-
import { useCustomViews as X } from "./
|
|
6
|
-
import { useViews as Z } from "./
|
|
5
|
+
import { useCustomViews as X } from "./index67.js";
|
|
6
|
+
import { useViews as Z } from "./index64.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 "./index57.js";
|
|
10
|
-
import { useViewCounts as ie } from "./
|
|
10
|
+
import { useViewCounts as ie } from "./index100.js";
|
|
11
11
|
import { useBusinessLogic as te } from "./index8.js";
|
|
12
|
-
import { useStores as re } from "./
|
|
13
|
-
import { Confirmation as se } from "./
|
|
14
|
-
const
|
|
15
|
-
const { VIEW_TYPE:
|
|
16
|
-
Filters: { activeViewId: d, initFiltersFromView: f, discardChanges: m, initFromUrl: u, filters:
|
|
17
|
-
Views: { draftViewsMap:
|
|
12
|
+
import { useStores as re } from "./index63.js";
|
|
13
|
+
import { Confirmation as se } from "./index101.js";
|
|
14
|
+
const Ce = Q(({ view: e }) => {
|
|
15
|
+
const { VIEW_TYPE: T, IS_VIEWS_READONLY: n, SEARCH_FILTER_ID: c } = te(), {
|
|
16
|
+
Filters: { activeViewId: d, initFiltersFromView: f, discardChanges: m, initFromUrl: u, filters: x, setFilter: E },
|
|
17
|
+
Views: { draftViewsMap: w },
|
|
18
18
|
Notifications: { notify: F }
|
|
19
|
-
} = re(), { viewsMap:
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
const r =
|
|
19
|
+
} = re(), { viewsMap: p, defaultCustomViewId: y, isLoading: N } = Z(), { isLoading: A } = X({ type: T }), { viewCounts: I, isLoadingViewCounts: R } = ie(e.id), [t, _] = $(null), k = (i) => {
|
|
20
|
+
const S = x.get(c);
|
|
21
|
+
if (p.has(i)) {
|
|
22
|
+
const r = p.get(i);
|
|
23
23
|
r && (f(r), m(!0), u());
|
|
24
24
|
} else {
|
|
25
|
-
const r =
|
|
25
|
+
const r = w.get(i);
|
|
26
26
|
r ? (f(r), m(!0), u()) : F({
|
|
27
27
|
type: "error",
|
|
28
28
|
text: "Failed to load view"
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
}, a = (e == null ? void 0 : e.id) === d,
|
|
33
|
-
!P && !V.current && a && e.id === y &&
|
|
34
|
-
var
|
|
35
|
-
(
|
|
31
|
+
S && E(c, S);
|
|
32
|
+
}, a = (e == null ? void 0 : e.id) === d, o = w.has(e.id), h = !o, M = I, l = (e == null ? void 0 : e.label) || "", P = N || A, V = z(!1);
|
|
33
|
+
!P && !V.current && a && e.id === y && t && (V.current = !0, t && d === e.id && window.requestAnimationFrame(() => {
|
|
34
|
+
var i;
|
|
35
|
+
(i = t.parentElement) == null || i.scrollBy({
|
|
36
36
|
behavior: "smooth",
|
|
37
|
-
left:
|
|
37
|
+
left: t.offsetLeft
|
|
38
38
|
});
|
|
39
39
|
}));
|
|
40
|
-
const
|
|
40
|
+
const g = L(() => o ? "draft" : e.editable ? "saved" : "fixed", [o, e.editable]), {
|
|
41
41
|
actions: {
|
|
42
42
|
create: { handleSaveDraft: j },
|
|
43
|
-
menu: { toggleDropdown:
|
|
44
|
-
delete: { closeDeleteConfirmation: B, handleDelete: O, handleDeleteDraftView:
|
|
43
|
+
menu: { toggleDropdown: C },
|
|
44
|
+
delete: { closeDeleteConfirmation: B, handleDelete: O, handleDeleteDraftView: D }
|
|
45
45
|
},
|
|
46
46
|
state: { shouldShowDeleteConfirmation: W },
|
|
47
47
|
actions: Y,
|
|
48
|
-
state:
|
|
49
|
-
} = oe(e), q =
|
|
48
|
+
state: v
|
|
49
|
+
} = oe(e), q = L(() => {
|
|
50
50
|
if (!n) {
|
|
51
|
-
if (
|
|
52
|
-
if (
|
|
51
|
+
if (h) return C;
|
|
52
|
+
if (o) return D;
|
|
53
53
|
}
|
|
54
|
-
}, [
|
|
54
|
+
}, [D, o, h, C, n]);
|
|
55
55
|
return /* @__PURE__ */ H(U, { children: [
|
|
56
56
|
/* @__PURE__ */ s(
|
|
57
57
|
G,
|
|
@@ -62,7 +62,7 @@ const ve = Q(({ view: e }) => {
|
|
|
62
62
|
active: a,
|
|
63
63
|
id: e == null ? void 0 : e.id,
|
|
64
64
|
name: l,
|
|
65
|
-
type: n ? void 0 :
|
|
65
|
+
type: n ? void 0 : g,
|
|
66
66
|
count: R ? /* @__PURE__ */ s(
|
|
67
67
|
J,
|
|
68
68
|
{
|
|
@@ -77,7 +77,7 @@ const ve = Q(({ view: e }) => {
|
|
|
77
77
|
ariaContext: "orders",
|
|
78
78
|
ref: _,
|
|
79
79
|
"aria-controls": "options-dropdown",
|
|
80
|
-
"aria-expanded":
|
|
80
|
+
"aria-expanded": v.shouldShowDropdown,
|
|
81
81
|
"aria-haspopup": "dialog"
|
|
82
82
|
},
|
|
83
83
|
e == null ? void 0 : e.id
|
|
@@ -94,16 +94,16 @@ const ve = Q(({ view: e }) => {
|
|
|
94
94
|
/* @__PURE__ */ s(
|
|
95
95
|
b,
|
|
96
96
|
{
|
|
97
|
-
tabType:
|
|
97
|
+
tabType: g,
|
|
98
98
|
isActive: a,
|
|
99
99
|
initialViewName: l,
|
|
100
|
-
shouldShowCreateViewNotification:
|
|
100
|
+
shouldShowCreateViewNotification: o,
|
|
101
101
|
handleSaveDraft: j
|
|
102
102
|
}
|
|
103
103
|
),
|
|
104
|
-
!n && /* @__PURE__ */ s(ee, { referenceElement:
|
|
104
|
+
!n && /* @__PURE__ */ s(ee, { referenceElement: t, tab: e, ...Y, ...v })
|
|
105
105
|
] });
|
|
106
106
|
});
|
|
107
107
|
export {
|
|
108
|
-
|
|
108
|
+
Ce as ViewTab
|
|
109
109
|
};
|
package/dist/index37.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("@veeqo/ui"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("@veeqo/ui"),n=require("./index59.cjs"),o=({hideActionsPopover:r})=>{const{createEmptyDraftView:i}=n.useCreateEmptyDraftView(),s=()=>{i(),r()};return t.jsx(e.Button,{style:{width:"100%"},iconSlot:t.jsx(e.AddIcon,{width:e.theme.sizes.sm,height:e.theme.sizes.sm,color:e.theme.colors.neutral.ink.base}),variant:"flat",onClick:s,children:"Create View"})};exports.CreateView=o;
|
package/dist/index37.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Button as s, AddIcon as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
const {
|
|
6
|
-
o(),
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Button as s, AddIcon as n, theme as t } from "@veeqo/ui";
|
|
3
|
+
import { useCreateEmptyDraftView as a } from "./index59.js";
|
|
4
|
+
const h = ({ hideActionsPopover: r }) => {
|
|
5
|
+
const { createEmptyDraftView: o } = a(), i = () => {
|
|
6
|
+
o(), r();
|
|
7
7
|
};
|
|
8
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ e(
|
|
9
9
|
s,
|
|
10
10
|
{
|
|
11
11
|
style: { width: "100%" },
|
|
12
|
-
iconSlot: /* @__PURE__ */
|
|
12
|
+
iconSlot: /* @__PURE__ */ e(n, { width: t.sizes.sm, height: t.sizes.sm, color: t.colors.neutral.ink.base }),
|
|
13
13
|
variant: "flat",
|
|
14
|
-
onClick:
|
|
14
|
+
onClick: i,
|
|
15
15
|
children: "Create View"
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
h as CreateView
|
|
21
21
|
};
|
package/dist/index38.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("./index67.cjs"),D=require("./index45.cjs"),_=require("./index8.cjs"),q=require("./index63.cjs"),u=60,E=({tab:n,viewName:w,shouldShowDropdown:p,onCloseDropdown:v,onDelete:g,onSave:x,headerText:S,e2ePrefix:a,activeOption:j})=>{const{VIEW_TYPE:C}=_.useBusinessLogic(),{Views:{draftViewsMap:b}}=q.useStores(),{canDeleteCustomViews:d,canUpdateCustomViews:r,canShareCustomViews:l,defaultCustomViewId:m}=I.useCustomViews({type:C}),y=n.id===m,{handleSubmit:V,control:c,formState:h}=o.useForm({mode:"onChange",defaultValues:{viewName:w,isDefault:n.id===m,shareOption:j.key}}),k=Object.values(D.SHARING_OPTIONS).map(s=>({key:s.key,value:s.key,label:s.text}));if(!p)return null;const T=!b.has(n.id);return e.jsx("form",{onSubmit:V(x),children:e.jsxs(t.Card,{style:{width:"400px"},title:S,subtitle:"Any filters you've applied and your chosen sort direction will be stored in this view",onClose:v,renderFooter:()=>d||r||l?e.jsxs(t.Stack,{direction:"horizontal",alignX:"end",children:[d&&e.jsx(t.Button,{variant:"destructive",onClick:g,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&&T||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,{alignX:"stretch",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:u,hint:`${i.length} / ${u} characters`,required:!0})}),e.jsxs(t.Stack,{children:[e.jsx(t.Text,{variant:"inputLabel",children:"Sharing options"}),e.jsx(o.Controller,{name:"shareOption",control:c,render:({onChange:s,value:i})=>e.jsx(t.SegmentedControl,{onChange:f=>l&&s(f),options:k,selected:i})})]}),e.jsx(o.Controller,{name:"isDefault",control:c,render:({onChange:s,value:i})=>e.jsx(t.Checkbox,{disabled:y,name:"makeViewDefault",label:"Make default view",checked:i,onChange:s,hint:"This will be the view this page will always open on"})})]})]})})};exports.EditDropdown=E;exports.VIEWS_TITLE_MAX_CHAR_LIMIT=u;
|
package/dist/index38.js
CHANGED
|
@@ -1,50 +1,53 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { Card as
|
|
3
|
-
import { useForm as
|
|
4
|
-
import { useCustomViews as j } from "./
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { Card as O, Alert as _, Stack as c, TextField as $, Text as A, SegmentedControl as E, Checkbox as L, Button as p } from "@veeqo/ui";
|
|
3
|
+
import { useForm as M, Controller as d } from "react-hook-form";
|
|
4
|
+
import { useCustomViews as j } from "./index67.js";
|
|
5
5
|
import { SHARING_OPTIONS as F } from "./index45.js";
|
|
6
|
-
import { useBusinessLogic as
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { useBusinessLogic as X } from "./index8.js";
|
|
7
|
+
import { useStores as B } from "./index63.js";
|
|
8
|
+
const w = 60, J = ({
|
|
9
|
+
tab: s,
|
|
9
10
|
viewName: v,
|
|
10
|
-
shouldShowDropdown:
|
|
11
|
-
onCloseDropdown:
|
|
11
|
+
shouldShowDropdown: f,
|
|
12
|
+
onCloseDropdown: g,
|
|
12
13
|
onDelete: b,
|
|
13
14
|
onSave: y,
|
|
14
15
|
headerText: C,
|
|
15
|
-
e2ePrefix:
|
|
16
|
+
e2ePrefix: a,
|
|
16
17
|
activeOption: S
|
|
17
18
|
}) => {
|
|
18
|
-
const { VIEW_TYPE: V } =
|
|
19
|
+
const { VIEW_TYPE: V } = X(), {
|
|
20
|
+
Views: { draftViewsMap: k }
|
|
21
|
+
} = B(), { canDeleteCustomViews: m, canUpdateCustomViews: o, canShareCustomViews: r, defaultCustomViewId: u } = j({
|
|
19
22
|
type: V
|
|
20
|
-
}),
|
|
23
|
+
}), D = s.id === u, { handleSubmit: T, control: l, formState: h } = M({
|
|
21
24
|
mode: "onChange",
|
|
22
25
|
defaultValues: {
|
|
23
26
|
viewName: v,
|
|
24
|
-
isDefault:
|
|
27
|
+
isDefault: s.id === u,
|
|
25
28
|
shareOption: S.key
|
|
26
29
|
}
|
|
27
|
-
}),
|
|
30
|
+
}), I = Object.values(F).map((t) => ({
|
|
28
31
|
key: t.key,
|
|
29
32
|
value: t.key,
|
|
30
33
|
label: t.text
|
|
31
34
|
}));
|
|
32
|
-
if (!
|
|
33
|
-
const
|
|
34
|
-
return /* @__PURE__ */ e("form", { onSubmit:
|
|
35
|
-
|
|
35
|
+
if (!f) return null;
|
|
36
|
+
const N = !k.has(s.id);
|
|
37
|
+
return /* @__PURE__ */ e("form", { onSubmit: T(y), children: /* @__PURE__ */ n(
|
|
38
|
+
O,
|
|
36
39
|
{
|
|
37
40
|
style: { width: "400px" },
|
|
38
41
|
title: C,
|
|
39
42
|
subtitle: "Any filters you've applied and your chosen sort direction will be stored in this view",
|
|
40
|
-
onClose:
|
|
41
|
-
renderFooter: () => m || o || r ? /* @__PURE__ */
|
|
43
|
+
onClose: g,
|
|
44
|
+
renderFooter: () => m || o || r ? /* @__PURE__ */ n(c, { direction: "horizontal", alignX: "end", children: [
|
|
42
45
|
m && /* @__PURE__ */ e(
|
|
43
46
|
p,
|
|
44
47
|
{
|
|
45
48
|
variant: "destructive",
|
|
46
49
|
onClick: b,
|
|
47
|
-
className: `act-react-listing-custom-view-${
|
|
50
|
+
className: `act-react-listing-custom-view-${a}-delete`,
|
|
48
51
|
children: "Delete"
|
|
49
52
|
}
|
|
50
53
|
),
|
|
@@ -53,38 +56,38 @@ const w = 60, z = ({
|
|
|
53
56
|
{
|
|
54
57
|
variant: "primary",
|
|
55
58
|
type: "submit",
|
|
56
|
-
className: `act-react-listing-custom-view-${
|
|
57
|
-
disabled: !h.isDirty &&
|
|
59
|
+
className: `act-react-listing-custom-view-${a}-save`,
|
|
60
|
+
disabled: !h.isDirty && N || h.isSubmitting,
|
|
58
61
|
children: "Save"
|
|
59
62
|
}
|
|
60
63
|
)
|
|
61
64
|
] }) : null,
|
|
62
|
-
className: `act-react-listing-custom-view-${
|
|
65
|
+
className: `act-react-listing-custom-view-${a}`,
|
|
63
66
|
children: [
|
|
64
67
|
!o && /* @__PURE__ */ e(
|
|
65
|
-
|
|
68
|
+
_,
|
|
66
69
|
{
|
|
67
70
|
variant: "warning",
|
|
68
71
|
title: "You need permission to edit this view",
|
|
69
72
|
message: "This is a company shared view"
|
|
70
73
|
}
|
|
71
74
|
),
|
|
72
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ n(c, { alignX: "stretch", children: [
|
|
73
76
|
/* @__PURE__ */ e(
|
|
74
77
|
d,
|
|
75
78
|
{
|
|
76
79
|
name: "viewName",
|
|
77
80
|
control: l,
|
|
78
81
|
render: ({ onChange: t, value: i }) => /* @__PURE__ */ e(
|
|
79
|
-
|
|
82
|
+
$,
|
|
80
83
|
{
|
|
81
84
|
id: "view-name",
|
|
82
|
-
className: `act-react-listing-custom-view-${
|
|
85
|
+
className: `act-react-listing-custom-view-${a}-field`,
|
|
83
86
|
label: "View name",
|
|
84
87
|
placeholder: "View name",
|
|
85
88
|
value: i,
|
|
86
89
|
onChange: t,
|
|
87
|
-
disabled: !
|
|
90
|
+
disabled: !s.editable,
|
|
88
91
|
maxLength: w,
|
|
89
92
|
hint: `${i.length} / ${w} characters`,
|
|
90
93
|
required: !0
|
|
@@ -92,18 +95,18 @@ const w = 60, z = ({
|
|
|
92
95
|
)
|
|
93
96
|
}
|
|
94
97
|
),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */ e(
|
|
98
|
+
/* @__PURE__ */ n(c, { children: [
|
|
99
|
+
/* @__PURE__ */ e(A, { variant: "inputLabel", children: "Sharing options" }),
|
|
97
100
|
/* @__PURE__ */ e(
|
|
98
101
|
d,
|
|
99
102
|
{
|
|
100
103
|
name: "shareOption",
|
|
101
104
|
control: l,
|
|
102
105
|
render: ({ onChange: t, value: i }) => /* @__PURE__ */ e(
|
|
103
|
-
|
|
106
|
+
E,
|
|
104
107
|
{
|
|
105
|
-
onChange: (
|
|
106
|
-
options:
|
|
108
|
+
onChange: (x) => r && t(x),
|
|
109
|
+
options: I,
|
|
107
110
|
selected: i
|
|
108
111
|
}
|
|
109
112
|
)
|
|
@@ -116,9 +119,9 @@ const w = 60, z = ({
|
|
|
116
119
|
name: "isDefault",
|
|
117
120
|
control: l,
|
|
118
121
|
render: ({ onChange: t, value: i }) => /* @__PURE__ */ e(
|
|
119
|
-
|
|
122
|
+
L,
|
|
120
123
|
{
|
|
121
|
-
disabled:
|
|
124
|
+
disabled: D,
|
|
122
125
|
name: "makeViewDefault",
|
|
123
126
|
label: "Make default view",
|
|
124
127
|
checked: i,
|
|
@@ -134,6 +137,6 @@ const w = 60, z = ({
|
|
|
134
137
|
) });
|
|
135
138
|
};
|
|
136
139
|
export {
|
|
137
|
-
|
|
140
|
+
J as EditDropdown,
|
|
138
141
|
w as VIEWS_TITLE_MAX_CHAR_LIMIT
|
|
139
142
|
};
|