@veeqo/transfigure 2.4.0 → 2.5.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/components/Views/IncludedFilters/IncludedFilters.d.ts +1 -0
- package/dist/components/Views/IncludedFilters/index.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +14 -48
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +23 -28
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +49 -14
- package/dist/index103.cjs +1 -12
- package/dist/index103.js +29 -16
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +58 -16
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +1 -1
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +15 -24
- package/dist/index109.cjs +10 -78
- package/dist/index109.js +13 -95
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index111.cjs +80 -1
- package/dist/index111.js +98 -2
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +2 -26
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +25 -4
- package/dist/index120.cjs +7 -1
- package/dist/index120.js +10 -63
- package/dist/index121.cjs +1 -7
- package/dist/index121.js +5 -10
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +5 -47
- package/dist/index123.cjs +1 -0
- package/dist/index123.js +65 -0
- package/dist/index124.cjs +1 -0
- package/dist/index124.js +49 -0
- package/dist/index13.cjs +1 -1
- package/dist/index13.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 +2 -2
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.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 +2 -2
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +21 -19
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +2 -2
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +7 -7
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +1 -1
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +1 -1
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +5 -41
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +2 -9
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +41 -2
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +8 -4
- package/dist/storybookHelpers/apiMocks/views/custom_views.d.ts +28 -0
- package/package.json +1 -1
package/dist/index20.js
CHANGED
|
@@ -4,7 +4,7 @@ import { observer as u } from "mobx-react";
|
|
|
4
4
|
import { FilterTag as A } from "@veeqo/ui";
|
|
5
5
|
import { useFilterArrayLabel as f } from "./index60.js";
|
|
6
6
|
import { FilterArrayField as y } from "./index17.js";
|
|
7
|
-
import b from "./
|
|
7
|
+
import b from "./index121.js";
|
|
8
8
|
import { useStores as v } from "./index63.js";
|
|
9
9
|
import { ActiveFilterFooter as V } from "./index24.js";
|
|
10
10
|
import { ActiveFilterHeader as g } from "./index25.js";
|
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("./index71.cjs"),R=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("./index123.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
|
@@ -3,7 +3,7 @@ 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
5
|
import { NumberRangeFilter as N } from "./index71.js";
|
|
6
|
-
import { FilterNumberRangeFilter as v } from "./
|
|
6
|
+
import { FilterNumberRangeFilter as v } from "./index123.js";
|
|
7
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";
|
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("./
|
|
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("./index89.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
|
@@ -4,7 +4,7 @@ import { observer as _ } from "mobx-react";
|
|
|
4
4
|
import { FlexCol as k, Button as M, TextField as g } from "@veeqo/ui";
|
|
5
5
|
import y from "lodash/debounce";
|
|
6
6
|
import { FilterChoiceValue as F, MIN_SEARCH_ERROR_MESSAGE as B } from "./index50.js";
|
|
7
|
-
import { isTextFilterValid as G } from "./
|
|
7
|
+
import { isTextFilterValid as G } from "./index89.js";
|
|
8
8
|
import { useBusinessLogic as N } from "./index8.js";
|
|
9
9
|
import { useStores as j } from "./index63.js";
|
|
10
10
|
const q = _(({ fields: s, groupId: i }) => {
|
package/dist/index34.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index8.cjs"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("mobx-react"),n=require("@veeqo/ui"),o=require("./index8.cjs"),u=require("./index101.cjs"),c=require("./index35.cjs"),a=s.observer(()=>{const{GROUP_MAP:t}=o.useBusinessLogic();return e.jsx(u.AdaptiveHeightContainer,{style:{minWidth:"360px"},children:e.jsx(n.Stack,{alignX:"stretch",children:Array.from(t).map(([r,i])=>e.jsx(c.FilterGroup,{data:i},r))})})});exports.FiltersList=a;
|
package/dist/index34.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { observer as e } from "mobx-react";
|
|
3
3
|
import { Stack as m } from "@veeqo/ui";
|
|
4
4
|
import { useBusinessLogic as s } from "./index8.js";
|
|
5
|
-
import { AdaptiveHeightContainer as p } from "./
|
|
5
|
+
import { AdaptiveHeightContainer as p } from "./index101.js";
|
|
6
6
|
import { FilterGroup as n } from "./index35.js";
|
|
7
7
|
const u = e(() => {
|
|
8
8
|
const { GROUP_MAP: t } = s();
|
package/dist/index36.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),l=require("@veeqo/ui"),U=require("mobx-react"),z=require("./index67.cjs"),G=require("./index64.cjs"),J=require("./index40.cjs"),K=require("./index43.cjs"),Q=require("./index57.cjs"),X=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),l=require("@veeqo/ui"),U=require("mobx-react"),z=require("./index67.cjs"),G=require("./index64.cjs"),J=require("./index40.cjs"),K=require("./index43.cjs"),Q=require("./index57.cjs"),X=require("./index102.cjs"),Z=require("./index8.cjs"),$=require("./index63.cjs"),b=require("./index103.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
|
@@ -7,10 +7,10 @@ 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 "./index102.js";
|
|
11
11
|
import { useBusinessLogic as te } from "./index8.js";
|
|
12
12
|
import { useStores as re } from "./index63.js";
|
|
13
|
-
import { Confirmation as se } from "./
|
|
13
|
+
import { Confirmation as se } from "./index103.js";
|
|
14
14
|
const Ce = Q(({ view: e }) => {
|
|
15
15
|
const { VIEW_TYPE: T, IS_VIEWS_READONLY: n, SEARCH_FILTER_ID: c } = te(), {
|
|
16
16
|
Filters: { activeViewId: d, initFiltersFromView: f, discardChanges: m, initFromUrl: u, filters: x, setFilter: E },
|
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"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@veeqo/ui"),a=require("react-hook-form"),f=require("./index67.cjs"),D=require("./index45.cjs"),_=require("./index8.cjs"),q=require("./index63.cjs"),E=require("./index104.cjs"),d=60,L=({tab:n,viewName:w,shouldShowDropdown:p,onCloseDropdown:v,onDelete:g,onSave:x,headerText:j,e2ePrefix:r,activeOption:S})=>{const{VIEW_TYPE:C}=_.useBusinessLogic(),{Views:{draftViewsMap:b}}=q.useStores(),{canDeleteCustomViews:u,canUpdateCustomViews:o,canShareCustomViews:l,defaultCustomViewId:m}=f.useCustomViews({type:C}),y=n.id===m,{handleSubmit:V,control:c,formState:h}=a.useForm({mode:"onChange",defaultValues:{viewName:w,isDefault:n.id===m,shareOption:S.key}}),I=Object.values(D.SHARING_OPTIONS).map(s=>({key:s.key,value:s.key,label:s.text}));if(!p)return null;const k=!b.has(n.id);return e.jsx("form",{onSubmit:V(x),children:e.jsxs(t.Card,{style:{width:"400px"},title:j,subtitle:"Any filters you've applied and your chosen sort direction will be stored in this view",onClose:v,renderFooter:()=>u||o||l?e.jsxs(t.Stack,{direction:"horizontal",alignX:"end",children:[u&&e.jsx(t.Button,{variant:"destructive",onClick:g,className:`act-react-listing-custom-view-${r}-delete`,children:"Delete"}),(o||l)&&e.jsx(t.Button,{variant:"primary",type:"submit",className:`act-react-listing-custom-view-${r}-save`,disabled:!h.isDirty&&k||h.isSubmitting,children:"Save"})]}):null,className:`act-react-listing-custom-view-${r}`,children:[!o&&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(a.Controller,{name:"viewName",control:c,render:({onChange:s,value:i})=>e.jsx(t.TextField,{id:"view-name",className:`act-react-listing-custom-view-${r}-field`,label:"View name",placeholder:"View name",value:i,onChange:s,disabled:!n.editable,maxLength:d,hint:`${i.length} / ${d} characters`,required:!0})}),e.jsx(E.IncludedFilters,{}),e.jsxs(t.Stack,{children:[e.jsx(t.Text,{variant:"inputLabel",children:"Sharing options"}),e.jsx(a.Controller,{name:"shareOption",control:c,render:({onChange:s,value:i})=>e.jsx(t.SegmentedControl,{onChange:T=>l&&s(T),options:I,selected:i})})]}),e.jsx(a.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=L;exports.VIEWS_TITLE_MAX_CHAR_LIMIT=d;
|
package/dist/index38.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
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
|
|
4
|
-
import { useCustomViews as
|
|
5
|
-
import { SHARING_OPTIONS as
|
|
3
|
+
import { useForm as F, Controller as d } from "react-hook-form";
|
|
4
|
+
import { useCustomViews as M } from "./index67.js";
|
|
5
|
+
import { SHARING_OPTIONS as j } from "./index45.js";
|
|
6
6
|
import { useBusinessLogic as X } from "./index8.js";
|
|
7
7
|
import { useStores as B } from "./index63.js";
|
|
8
|
-
|
|
8
|
+
import { IncludedFilters as H } from "./index104.js";
|
|
9
|
+
const w = 60, Q = ({
|
|
9
10
|
tab: s,
|
|
10
11
|
viewName: v,
|
|
11
12
|
shouldShowDropdown: f,
|
|
@@ -13,41 +14,41 @@ const w = 60, J = ({
|
|
|
13
14
|
onDelete: b,
|
|
14
15
|
onSave: y,
|
|
15
16
|
headerText: C,
|
|
16
|
-
e2ePrefix:
|
|
17
|
+
e2ePrefix: n,
|
|
17
18
|
activeOption: S
|
|
18
19
|
}) => {
|
|
19
20
|
const { VIEW_TYPE: V } = X(), {
|
|
20
21
|
Views: { draftViewsMap: k }
|
|
21
|
-
} = B(), { canDeleteCustomViews: m, canUpdateCustomViews: o, canShareCustomViews: r, defaultCustomViewId: u } =
|
|
22
|
+
} = B(), { canDeleteCustomViews: m, canUpdateCustomViews: o, canShareCustomViews: r, defaultCustomViewId: u } = M({
|
|
22
23
|
type: V
|
|
23
|
-
}), D = s.id === u, { handleSubmit:
|
|
24
|
+
}), D = s.id === u, { handleSubmit: I, control: l, formState: h } = F({
|
|
24
25
|
mode: "onChange",
|
|
25
26
|
defaultValues: {
|
|
26
27
|
viewName: v,
|
|
27
28
|
isDefault: s.id === u,
|
|
28
29
|
shareOption: S.key
|
|
29
30
|
}
|
|
30
|
-
}),
|
|
31
|
+
}), T = Object.values(j).map((t) => ({
|
|
31
32
|
key: t.key,
|
|
32
33
|
value: t.key,
|
|
33
34
|
label: t.text
|
|
34
35
|
}));
|
|
35
36
|
if (!f) return null;
|
|
36
37
|
const N = !k.has(s.id);
|
|
37
|
-
return /* @__PURE__ */ e("form", { onSubmit:
|
|
38
|
+
return /* @__PURE__ */ e("form", { onSubmit: I(y), children: /* @__PURE__ */ a(
|
|
38
39
|
O,
|
|
39
40
|
{
|
|
40
41
|
style: { width: "400px" },
|
|
41
42
|
title: C,
|
|
42
43
|
subtitle: "Any filters you've applied and your chosen sort direction will be stored in this view",
|
|
43
44
|
onClose: g,
|
|
44
|
-
renderFooter: () => m || o || r ? /* @__PURE__ */
|
|
45
|
+
renderFooter: () => m || o || r ? /* @__PURE__ */ a(c, { direction: "horizontal", alignX: "end", children: [
|
|
45
46
|
m && /* @__PURE__ */ e(
|
|
46
47
|
p,
|
|
47
48
|
{
|
|
48
49
|
variant: "destructive",
|
|
49
50
|
onClick: b,
|
|
50
|
-
className: `act-react-listing-custom-view-${
|
|
51
|
+
className: `act-react-listing-custom-view-${n}-delete`,
|
|
51
52
|
children: "Delete"
|
|
52
53
|
}
|
|
53
54
|
),
|
|
@@ -56,13 +57,13 @@ const w = 60, J = ({
|
|
|
56
57
|
{
|
|
57
58
|
variant: "primary",
|
|
58
59
|
type: "submit",
|
|
59
|
-
className: `act-react-listing-custom-view-${
|
|
60
|
+
className: `act-react-listing-custom-view-${n}-save`,
|
|
60
61
|
disabled: !h.isDirty && N || h.isSubmitting,
|
|
61
62
|
children: "Save"
|
|
62
63
|
}
|
|
63
64
|
)
|
|
64
65
|
] }) : null,
|
|
65
|
-
className: `act-react-listing-custom-view-${
|
|
66
|
+
className: `act-react-listing-custom-view-${n}`,
|
|
66
67
|
children: [
|
|
67
68
|
!o && /* @__PURE__ */ e(
|
|
68
69
|
_,
|
|
@@ -72,7 +73,7 @@ const w = 60, J = ({
|
|
|
72
73
|
message: "This is a company shared view"
|
|
73
74
|
}
|
|
74
75
|
),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ a(c, { alignX: "stretch", children: [
|
|
76
77
|
/* @__PURE__ */ e(
|
|
77
78
|
d,
|
|
78
79
|
{
|
|
@@ -82,7 +83,7 @@ const w = 60, J = ({
|
|
|
82
83
|
$,
|
|
83
84
|
{
|
|
84
85
|
id: "view-name",
|
|
85
|
-
className: `act-react-listing-custom-view-${
|
|
86
|
+
className: `act-react-listing-custom-view-${n}-field`,
|
|
86
87
|
label: "View name",
|
|
87
88
|
placeholder: "View name",
|
|
88
89
|
value: i,
|
|
@@ -95,7 +96,8 @@ const w = 60, J = ({
|
|
|
95
96
|
)
|
|
96
97
|
}
|
|
97
98
|
),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ e(H, {}),
|
|
100
|
+
/* @__PURE__ */ a(c, { children: [
|
|
99
101
|
/* @__PURE__ */ e(A, { variant: "inputLabel", children: "Sharing options" }),
|
|
100
102
|
/* @__PURE__ */ e(
|
|
101
103
|
d,
|
|
@@ -106,7 +108,7 @@ const w = 60, J = ({
|
|
|
106
108
|
E,
|
|
107
109
|
{
|
|
108
110
|
onChange: (x) => r && t(x),
|
|
109
|
-
options:
|
|
111
|
+
options: T,
|
|
110
112
|
selected: i
|
|
111
113
|
}
|
|
112
114
|
)
|
|
@@ -137,6 +139,6 @@ const w = 60, J = ({
|
|
|
137
139
|
) });
|
|
138
140
|
};
|
|
139
141
|
export {
|
|
140
|
-
|
|
142
|
+
Q as EditDropdown,
|
|
141
143
|
w as VIEWS_TITLE_MAX_CHAR_LIMIT
|
|
142
144
|
};
|
package/dist/index41.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),m=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),m=require("./index107.cjs"),g=require("./index67.cjs"),S=require("./index64.cjs"),b=require("./index4.cjs"),y=require("./index8.cjs"),V=require("./index63.cjs"),p=require("./index12.cjs"),q=()=>{const{VIEW_TYPE:u}=y.useBusinessLogic(),{sortedCustomViews:s,isLoading:a}=S.useViews(),{mutate:c}=g.useCustomViews({type:u}),[l,t]=n.useState(s);n.useEffect(()=>{t(s)},[s]);const{Notifications:{notify:w}}=V.useStores(),d=async o=>{t(o);const r=o.map(e=>e.id);try{await b.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:r}}}),await c(e=>({...e,settings:{...e.settings,custom_view_positions:{...e.settings.custom_view_positions,order:r}}}),{revalidate:!1})}catch{t(s),w({type:"error",text:"Failed to update order of views"})}};return a||!s.length?null:i.jsx(p.ErrorBoundary,{children:i.jsx(m.LegacySortableViews,{views:l,onChange:d,className:"act-sortable-views"})})};exports.SortableViews=q;
|
package/dist/index41.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f, useEffect as l } from "react";
|
|
3
|
-
import { LegacySortableViews as w } from "./
|
|
3
|
+
import { LegacySortableViews as w } from "./index107.js";
|
|
4
4
|
import { useCustomViews as d } from "./index67.js";
|
|
5
5
|
import { useViews as g } from "./index64.js";
|
|
6
6
|
import { patchCurrentUser as _ } from "./index4.js";
|
package/dist/index42.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("@veeqo/ui"),c=require("mobx-react"),l=require("./index62.cjs"),n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("@veeqo/ui"),c=require("mobx-react"),l=require("./index62.cjs"),n=require("./index111.cjs"),d=i.theme.colors.secondary.blue.base,h=c.observer(({onDiscard:r,viewName:s,onSaveDraft:a})=>{const{saveChanges:o,isSubmitting:t}=l.usePersistUnsavedChanges();return e.jsx(n.Notification,{children:e.jsx(n.Container,{children:e.jsxs(i.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(i.AttentionIcon,{role:"img","aria-label":"attention",color:d}),e.jsxs(n.Wrap,{children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"You have unsaved changes to"}),s&&e.jsxs(n.Bold,{variant:"bodyBoldDark",children:["'",s,"'"]})]}),e.jsx(i.Button,{onClick:r,size:"sm",children:"Discard changes"}),e.jsxs(i.ActionMenu,{ctaProps:{children:"Save changes",variant:"primary"},children:[e.jsx(i.ActionMenu.Item,{onAction:a,isDisabled:t,children:e.jsx(n.Text,{variant:"body",children:"Create new view"})}),e.jsx(i.ActionMenu.Item,{onAction:o,isDisabled:t,children:e.jsxs(i.Stack,{direction:"horizontal",spacing:1,alignY:"center",children:[e.jsx(n.Text,{variant:"body",children:"Save changes to"}),e.jsx(n.Text,{variant:"bodyBold",children:s})]})})]})]})})})});exports.UnsavedChangesPill=h;
|
package/dist/index42.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { Stack as a, AttentionIcon as d, theme as h, Button as m, ActionMenu as o } from "@veeqo/ui";
|
|
3
3
|
import { observer as g } from "mobx-react";
|
|
4
4
|
import { usePersistUnsavedChanges as v } from "./index62.js";
|
|
5
|
-
import { Notification as b, Container as p, Wrap as u, Text as i, Bold as y } from "./
|
|
5
|
+
import { Notification as b, Container as p, Wrap as u, Text as i, Bold as y } from "./index111.js";
|
|
6
6
|
const C = h.colors.secondary.blue.base, S = g(({ onDiscard: c, viewName: r, onSaveDraft: l }) => {
|
|
7
7
|
const { saveChanges: s, isSubmitting: t } = v();
|
|
8
8
|
return /* @__PURE__ */ n(b, { children: /* @__PURE__ */ n(p, { children: /* @__PURE__ */ e(a, { direction: "horizontal", alignY: "center", children: [
|
package/dist/index44.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),m=require("mobx-react"),i=require("@veeqo/ui"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),m=require("mobx-react"),i=require("@veeqo/ui"),u=require("./index109.cjs"),q=require("./index41.cjs"),f=require("./index64.cjs"),p=require("./index65.cjs"),v=require("./index37.cjs"),c=require("./index36.cjs"),b=require("./index8.cjs"),C=require("./index63.cjs"),a=require("./index12.cjs"),L=m.observer(({className:l,appearance:d})=>{const{IS_VIEWS_READONLY:r}=b.useBusinessLogic(),{Views:{draftViewsList:w}}=C.useStores(),{viewsArray:x,fixedViews:V}=f.useViews(),[n,o]=t.useState(!1),[h,j]=t.useState(null),S=()=>o(!1);return p.useViewUrlChange(),e.jsxs(e.Fragment,{children:[e.jsxs(i.ViewsContainer,{onClickMenu:r?void 0:()=>o(!0),ariaMenuControls:r?void 0:"views-menu",ariaMenuExpanded:r?!1:n,ref:j,className:l,appearance:d,children:[x.map(s=>e.jsx(a.ErrorBoundary,{children:e.jsx(c.ViewTab,{view:s})},s.id)),w.map(s=>e.jsx(a.ErrorBoundary,{children:e.jsx(c.ViewTab,{view:s})},s.id))]}),!r&&n&&e.jsx(i.Popover,{id:"views-menu",anchorElement:h,placement:"bottom",onShouldClose:()=>o(!1),children:e.jsxs(i.Card.Surface,{children:[e.jsx(u.FixedViews,{children:V.map(s=>e.jsx(i.Text,{variant:"placeholder",children:s.label},s.id||s.label))}),e.jsx(q.SortableViews,{}),e.jsx(u.Divider,{}),e.jsx(v.CreateView,{hideActionsPopover:S})]})})]})});exports.ViewsList=L;
|
package/dist/index44.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as s, Fragment as V, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as n } from "react";
|
|
3
3
|
import { observer as v } from "mobx-react";
|
|
4
4
|
import { ViewsContainer as S, Popover as x, Card as C, Text as L } from "@veeqo/ui";
|
|
5
|
-
import { FixedViews as A, Divider as E } from "./
|
|
5
|
+
import { FixedViews as A, Divider as E } from "./index109.js";
|
|
6
6
|
import { SortableViews as b } from "./index41.js";
|
|
7
7
|
import { useViews as M } from "./index64.js";
|
|
8
8
|
import { useViewUrlChange as T } from "./index65.js";
|
package/dist/index47.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),h=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),h=require("./index91.cjs"),e=require("@veeqo/ui"),o=require("./index92.cjs"),d=require("./index63.cjs"),m=({isLoading:a,refetch:n,trackMetricClick:s,tooltipText:l="Refresh data",buttonProps:i={size:"sm",variant:"default"}})=>{const{hasChanges:r,acknowledgeButtonClick:u}=h.usePollData(),{Notifications:{notify:c}}=d.useStores(),f=async()=>{try{await n(),await u(),s==null||s()}catch{c({type:"error",text:"Failed to refresh data"})}};return t.jsxs(e.Tooltip,{className:o.default.refreshTooltip,text:l,children:[t.jsx(e.Button,{className:o.default.refreshButton,onClick:f,loading:a,disabled:a,iconSlot:t.jsx(e.RefreshIcon,{color:e.theme.colors.neutral.ink.base}),"aria-label":r?"refresh table with changes":"refresh table","aria-live":"polite",...i}),t.jsx(e.Indicator,{className:o.default.refreshIndicator,color:"red",size:"xs",style:{opacity:r?1:0}})]})};exports.RefreshButton=m;
|
package/dist/index47.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { usePollData as c } from "./
|
|
2
|
+
import { usePollData as c } from "./index91.js";
|
|
3
3
|
import { Tooltip as d, Button as p, RefreshIcon as u, theme as y, Indicator as x } from "@veeqo/ui";
|
|
4
|
-
import t from "./
|
|
4
|
+
import t from "./index92.js";
|
|
5
5
|
import { useStores as b } from "./index63.js";
|
|
6
6
|
const j = ({
|
|
7
7
|
isLoading: s,
|
package/dist/index73.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var f=(i,t,e)=>t in i?o(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var a=(i,t,e)=>f(i,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("mobx"),w=require("./index81.cjs");class V{constructor(){a(this,"draftCount");a(this,"draftViewsMap");a(this,"addDraftView",t=>{const e=t.originalView||t,s=`${e.id}-draft${this.draftCount}`,d=`${e.label} (
|
|
1
|
+
"use strict";var o=Object.defineProperty;var f=(i,t,e)=>t in i?o(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var a=(i,t,e)=>f(i,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("mobx"),w=require("./index81.cjs");class V{constructor(){a(this,"draftCount");a(this,"draftViewsMap");a(this,"addDraftView",t=>{const e=t.originalView||t,s=`${e.id}-draft${this.draftCount}`,d=`${e.label} (copy)`,n={...t,id:s,label:d,editable:!0,originalView:e};return this.draftViewsMap.set(s,n),this.incrementDraftViewCount(),n});a(this,"addEmptyDraftView",()=>{const t=`draft-${this.draftCount}`,e=w.createEmptyTransformedView({id:t,label:"draft",editable:!0});return this.draftViewsMap.set(t,e),this.incrementDraftViewCount(),e});a(this,"removeDraftViewById",t=>{this.draftViewsMap.has(t)&&this.draftViewsMap.delete(t)});a(this,"incrementDraftViewCount",()=>{this.draftCount+=1});r.makeObservable(this,{draftViewsList:r.computed,draftViewsMap:r.observable,draftCount:r.observable,addDraftView:r.action,addEmptyDraftView:r.action,removeDraftViewById:r.action,incrementDraftViewCount:r.action}),this.draftCount=0,this.draftViewsMap=new Map}get draftViewsList(){return Array.from(this.draftViewsMap.entries()).map(([,t])=>t)}}exports.Views=V;
|
package/dist/index73.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var o = Object.defineProperty;
|
|
2
2
|
var w = (a, t, e) => t in a ? o(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
3
|
var r = (a, t, e) => w(a, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { makeObservable as V, action as i, observable as d, computed as
|
|
5
|
-
import { createEmptyTransformedView as
|
|
6
|
-
class
|
|
4
|
+
import { makeObservable as V, action as i, observable as d, computed as m } from "mobx";
|
|
5
|
+
import { createEmptyTransformedView as p } from "./index81.js";
|
|
6
|
+
class h {
|
|
7
7
|
constructor() {
|
|
8
8
|
r(this, "draftCount");
|
|
9
9
|
r(this, "draftViewsMap");
|
|
10
10
|
r(this, "addDraftView", (t) => {
|
|
11
|
-
const e = t.originalView || t, s = `${e.id}-draft${this.draftCount}`, f = `${e.label} (
|
|
11
|
+
const e = t.originalView || t, s = `${e.id}-draft${this.draftCount}`, f = `${e.label} (copy)`, n = {
|
|
12
12
|
...t,
|
|
13
13
|
id: s,
|
|
14
14
|
label: f,
|
|
@@ -18,7 +18,7 @@ class l {
|
|
|
18
18
|
return this.draftViewsMap.set(s, n), this.incrementDraftViewCount(), n;
|
|
19
19
|
});
|
|
20
20
|
r(this, "addEmptyDraftView", () => {
|
|
21
|
-
const t = `draft-${this.draftCount}`, e =
|
|
21
|
+
const t = `draft-${this.draftCount}`, e = p({
|
|
22
22
|
id: t,
|
|
23
23
|
label: "draft",
|
|
24
24
|
editable: !0
|
|
@@ -32,7 +32,7 @@ class l {
|
|
|
32
32
|
this.draftCount += 1;
|
|
33
33
|
});
|
|
34
34
|
V(this, {
|
|
35
|
-
draftViewsList:
|
|
35
|
+
draftViewsList: m,
|
|
36
36
|
draftViewsMap: d,
|
|
37
37
|
draftCount: d,
|
|
38
38
|
addDraftView: i,
|
|
@@ -46,5 +46,5 @@ class l {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
export {
|
|
49
|
-
|
|
49
|
+
h as Views
|
|
50
50
|
};
|
package/dist/index80.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@internationalized/date"),f=require("./index72.cjs"),_=require("./index71.cjs"),F=require("lodash/get"),R=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@internationalized/date"),f=require("./index72.cjs"),_=require("./index71.cjs"),F=require("lodash/get"),R=require("./index100.cjs"),A=require("./index9.cjs"),T=r=>r&&r.__esModule?r:{default:r},n=T(F),w=({view:r,canUpdateCustomViews:g})=>{var o,c;const{DATE_RANGE_FILTERS:a,NUMBER_RANGE_FILTERS:u,GROUP_MAP:p}=A.BusinessLogicManager.getBusinessLogic(),l=Array.from(p.values()).flatMap(e=>e.fields),s=r.filters.filter||{},{colourPalette:b,customTextColour:m}=R.getViewTheme((o=r.view_attributes)==null?void 0:o.type);return{id:r.id,label:r.title,viewFilters:s,filterMaps:{filters:new Map(l.filter(e=>!a.includes(e.id)&&!u.includes(e.id)&&e.filterType!=="checkbox").map(e=>{const t=n.default(s,e.id);return[e.id,t!==void 0&&!Array.isArray(t)&&typeof t!="object"?String(t):""]}).filter(([,e])=>e!=="")),arrayFilters:new Map(l.filter(e=>e.filterType==="checkbox").map(e=>{const t=n.default(s,e.id);return[e.id,Array.isArray(t)?t:[]]}).filter(([,e])=>e.length>0)),rangeFilters:new Map(l.filter(e=>a.includes(e.id)).map(e=>{const t=n.default(s,e.id);if(!t)return null;let i;if(typeof t=="string")i=new f.RangeFilter(t);else if(typeof t=="object"&&t.gte&&t.lte){i=new f.RangeFilter("CUSTOM");const y=d.parseDate(t.gte),M=d.parseDate(t.lte);i.setDates(y,M)}else return null;return[e.id,i]}).filter(e=>e!==null)),numberRangeFilters:new Map(l.filter(e=>u.includes(e.id)).map(e=>{const t=n.default(s,e.id);if(!t||typeof t!="object")return null;const i=new _.NumberRangeFilter({filterId:e.id});return t.lte!==void 0&&i.setLte(Number(t.lte)),t.gte!==void 0&&i.setGte(Number(t.gte)),[e.id,i]}).filter(e=>e!==null))},page:r.filters.page,editable:r.editable&&g,isShared:r.shared,columns:r.columns,sort:(c=r.filters)==null?void 0:c.sort,colourPalette:b,customTextColour:m,view_attributes:r.view_attributes}};exports.viewsAdapter=w;
|
package/dist/index80.js
CHANGED
|
@@ -2,7 +2,7 @@ import { parseDate as c } from "@internationalized/date";
|
|
|
2
2
|
import { RangeFilter as p } from "./index72.js";
|
|
3
3
|
import { NumberRangeFilter as M } from "./index71.js";
|
|
4
4
|
import n from "lodash/get";
|
|
5
|
-
import { getViewTheme as F } from "./
|
|
5
|
+
import { getViewTheme as F } from "./index100.js";
|
|
6
6
|
import { BusinessLogicManager as R } from "./index9.js";
|
|
7
7
|
const S = ({ view: r, canUpdateCustomViews: m }) => {
|
|
8
8
|
var u, f;
|
package/dist/index86.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index117.cjs"),s=e=>{if(!l.isError(e))return e;if(e.stack){const t=e.stack.split(`
|
|
2
2
|
`);if(t.length<=10)return e;const n=t==null?void 0:t[0],i=t==null?void 0:t.splice(9),r=[n,...i].join(`
|
|
3
3
|
`);e.stack=r}return e};exports.filterErrorStack=s;
|
package/dist/index86.js
CHANGED
package/dist/index87.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index117.cjs"),n=({customError:t,originalError:e,type:c})=>{!s.isError(e)||!s.isError(t)||(e.stack&&(e.stack=t.stack),e.name&&(e.name=`${c} (${e.name})`))};exports.injectIntoError=n;
|
package/dist/index87.js
CHANGED
package/dist/index88.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_actionsHeaderContainer_fgqms_1",t={actionsHeaderContainer:e};exports.actionsHeaderContainer=e;exports.default=t;
|
package/dist/index88.js
CHANGED
|
@@ -1,43 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { useStores as L } from "./index63.js";
|
|
5
|
-
import { useUrlParams as v } from "./index69.js";
|
|
6
|
-
import { fetcherV2 as V } from "./index56.js";
|
|
7
|
-
function T() {
|
|
8
|
-
const { TABLE_DATA_URL: h } = S(), {
|
|
9
|
-
Filters: {
|
|
10
|
-
pageSize: n,
|
|
11
|
-
activeViewId: s
|
|
12
|
-
}
|
|
13
|
-
} = L(), { queryParams: m } = v();
|
|
14
|
-
async function r() {
|
|
15
|
-
const e = `${h}?${m}`, g = await V(e);
|
|
16
|
-
return JSON.stringify(g);
|
|
17
|
-
}
|
|
18
|
-
const [c, a] = t(null), [l, u] = t(!1), [f, C] = t(s), [w, y] = t(n), i = 3e5, [D, o] = t(i);
|
|
19
|
-
return p(() => {
|
|
20
|
-
const e = () => {
|
|
21
|
-
document.hidden ? o(null) : o(i);
|
|
22
|
-
};
|
|
23
|
-
return document.addEventListener("visibilitychange", e), () => {
|
|
24
|
-
document.removeEventListener("visibilitychange", e);
|
|
25
|
-
};
|
|
26
|
-
}, []), P(
|
|
27
|
-
async () => {
|
|
28
|
-
const e = await r();
|
|
29
|
-
if (c === null || f !== s || w !== n) {
|
|
30
|
-
a(e), C(s), y(n);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const d = e !== c;
|
|
34
|
-
d && (a(e), u(d));
|
|
35
|
-
},
|
|
36
|
-
l ? null : D
|
|
37
|
-
), { hasChanges: l, acknowledgeButtonClick: async () => {
|
|
38
|
-
u(!1), o(i), a(await r());
|
|
39
|
-
} };
|
|
40
|
-
}
|
|
1
|
+
const e = "_actionsHeaderContainer_fgqms_1", a = {
|
|
2
|
+
actionsHeaderContainer: e
|
|
3
|
+
};
|
|
41
4
|
export {
|
|
42
|
-
|
|
5
|
+
e as actionsHeaderContainer,
|
|
6
|
+
a as default
|
|
43
7
|
};
|
package/dist/index89.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=t=>t.trim().length>=3||t.trim().length===0;exports.isTextFilterValid=e;
|
package/dist/index89.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
refreshTooltip: e,
|
|
3
|
-
refreshButton: r,
|
|
4
|
-
refreshIndicator: t
|
|
5
|
-
};
|
|
1
|
+
const i = (t) => t.trim().length >= 3 || t.trim().length === 0;
|
|
6
2
|
export {
|
|
7
|
-
|
|
8
|
-
r as refreshButton,
|
|
9
|
-
t as refreshIndicator,
|
|
10
|
-
e as refreshTooltip
|
|
3
|
+
i as isTextFilterValid
|
|
11
4
|
};
|
package/dist/index91.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=t
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),w=require("react-use"),L=require("./index8.cjs"),m=require("./index63.cjs"),v=require("./index69.cjs"),q=require("./index56.cjs");function V(){const{TABLE_DATA_URL:h}=L.useBusinessLogic(),{Filters:{pageSize:s,activeViewId:n}}=m.useStores(),{queryParams:S}=v.useUrlParams();async function c(){const e=`${h}?${S}`,g=await q.fetcherV2(e);return JSON.stringify(g)}const[u,a]=t.useState(null),[o,l]=t.useState(!1),[f,C]=t.useState(n),[y,P]=t.useState(s),i=3e5,[D,r]=t.useState(i);return t.useEffect(()=>{const e=()=>{document.hidden?r(null):r(i)};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),w.useInterval(async()=>{const e=await c();if(u===null||f!==n||y!==s){a(e),C(n),P(s);return}const d=e!==u;d&&(a(e),l(d))},o?null:D),{hasChanges:o,acknowledgeButtonClick:async()=>{l(!1),r(i),a(await c())}}}exports.usePollData=V;
|
package/dist/index91.js
CHANGED
|
@@ -1,4 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
import { useState as t, useEffect as p } from "react";
|
|
2
|
+
import { useInterval as P } from "react-use";
|
|
3
|
+
import { useBusinessLogic as S } from "./index8.js";
|
|
4
|
+
import { useStores as L } from "./index63.js";
|
|
5
|
+
import { useUrlParams as v } from "./index69.js";
|
|
6
|
+
import { fetcherV2 as V } from "./index56.js";
|
|
7
|
+
function T() {
|
|
8
|
+
const { TABLE_DATA_URL: h } = S(), {
|
|
9
|
+
Filters: {
|
|
10
|
+
pageSize: n,
|
|
11
|
+
activeViewId: s
|
|
12
|
+
}
|
|
13
|
+
} = L(), { queryParams: m } = v();
|
|
14
|
+
async function r() {
|
|
15
|
+
const e = `${h}?${m}`, g = await V(e);
|
|
16
|
+
return JSON.stringify(g);
|
|
17
|
+
}
|
|
18
|
+
const [c, a] = t(null), [l, u] = t(!1), [f, C] = t(s), [w, y] = t(n), i = 3e5, [D, o] = t(i);
|
|
19
|
+
return p(() => {
|
|
20
|
+
const e = () => {
|
|
21
|
+
document.hidden ? o(null) : o(i);
|
|
22
|
+
};
|
|
23
|
+
return document.addEventListener("visibilitychange", e), () => {
|
|
24
|
+
document.removeEventListener("visibilitychange", e);
|
|
25
|
+
};
|
|
26
|
+
}, []), P(
|
|
27
|
+
async () => {
|
|
28
|
+
const e = await r();
|
|
29
|
+
if (c === null || f !== s || w !== n) {
|
|
30
|
+
a(e), C(s), y(n);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const d = e !== c;
|
|
34
|
+
d && (a(e), u(d));
|
|
35
|
+
},
|
|
36
|
+
l ? null : D
|
|
37
|
+
), { hasChanges: l, acknowledgeButtonClick: async () => {
|
|
38
|
+
u(!1), o(i), a(await r());
|
|
39
|
+
} };
|
|
40
|
+
}
|
|
2
41
|
export {
|
|
3
|
-
|
|
42
|
+
T as usePollData
|
|
4
43
|
};
|
package/dist/index92.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_refreshTooltip_v0eu8_1",r="_refreshButton_v0eu8_5",t="_refreshIndicator_v0eu8_9",o={refreshTooltip:e,refreshButton:r,refreshIndicator:t};exports.default=o;exports.refreshButton=r;exports.refreshIndicator=t;exports.refreshTooltip=e;
|
package/dist/index92.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
const e = "
|
|
2
|
-
|
|
1
|
+
const e = "_refreshTooltip_v0eu8_1", r = "_refreshButton_v0eu8_5", t = "_refreshIndicator_v0eu8_9", o = {
|
|
2
|
+
refreshTooltip: e,
|
|
3
|
+
refreshButton: r,
|
|
4
|
+
refreshIndicator: t
|
|
3
5
|
};
|
|
4
6
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
o as default,
|
|
8
|
+
r as refreshButton,
|
|
9
|
+
t as refreshIndicator,
|
|
10
|
+
e as refreshTooltip
|
|
7
11
|
};
|
|
@@ -159,5 +159,33 @@ export declare const custom_views: {
|
|
|
159
159
|
columnIds?: undefined;
|
|
160
160
|
};
|
|
161
161
|
view_attributes?: undefined;
|
|
162
|
+
} | {
|
|
163
|
+
id: string;
|
|
164
|
+
title: string;
|
|
165
|
+
user_id: number;
|
|
166
|
+
shared: boolean;
|
|
167
|
+
filters: {
|
|
168
|
+
filter: {
|
|
169
|
+
status?: undefined;
|
|
170
|
+
created?: undefined;
|
|
171
|
+
mergeable?: undefined;
|
|
172
|
+
pick_status?: undefined;
|
|
173
|
+
due_date?: undefined;
|
|
174
|
+
shoe_size?: undefined;
|
|
175
|
+
max_products?: undefined;
|
|
176
|
+
search?: undefined;
|
|
177
|
+
product_count?: undefined;
|
|
178
|
+
brand_ids?: undefined;
|
|
179
|
+
};
|
|
180
|
+
page?: undefined;
|
|
181
|
+
};
|
|
182
|
+
created_at: string;
|
|
183
|
+
updated_at: string;
|
|
184
|
+
editable: boolean;
|
|
185
|
+
company_id: number;
|
|
186
|
+
columns: {
|
|
187
|
+
columnIds?: undefined;
|
|
188
|
+
};
|
|
189
|
+
view_attributes?: undefined;
|
|
162
190
|
})[];
|
|
163
191
|
};
|