@veeqo/transfigure 1.2.5 → 1.2.7

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.
Files changed (131) hide show
  1. package/dist/BusinessLogic/mocks.d.ts +1 -0
  2. package/dist/components/Filters/ActiveFilters/Categories/FilterField/FilterField.d.ts +3 -1
  3. package/dist/constants/constants.d.ts +1 -0
  4. package/dist/index.cjs +1 -1
  5. package/dist/index.css +1 -1
  6. package/dist/index.js +157 -155
  7. package/dist/index10.cjs +1 -1
  8. package/dist/index10.js +37 -30
  9. package/dist/index100.cjs +1 -1
  10. package/dist/index100.js +11 -29
  11. package/dist/index101.cjs +19 -1
  12. package/dist/index101.js +24 -21
  13. package/dist/index102.cjs +1 -12
  14. package/dist/index102.js +21 -16
  15. package/dist/index103.cjs +1 -1
  16. package/dist/index103.js +1 -1
  17. package/dist/index104.cjs +1 -1
  18. package/dist/index104.js +36 -22
  19. package/dist/index105.cjs +1 -1
  20. package/dist/index105.js +29 -7
  21. package/dist/index106.cjs +1 -80
  22. package/dist/index106.js +24 -101
  23. package/dist/index107.cjs +12 -1
  24. package/dist/index107.js +16 -2
  25. package/dist/index108.cjs +80 -1
  26. package/dist/index108.js +101 -19
  27. package/dist/index109.cjs +1 -1
  28. package/dist/index109.js +2 -8
  29. package/dist/index11.cjs +1 -1
  30. package/dist/index11.js +1 -1
  31. package/dist/index110.cjs +1 -1
  32. package/dist/index110.js +17 -62
  33. package/dist/index111.cjs +1 -1
  34. package/dist/index111.js +7 -29
  35. package/dist/index112.cjs +1 -13
  36. package/dist/index112.js +63 -16
  37. package/dist/index113.cjs +1 -1
  38. package/dist/index113.js +30 -36
  39. package/dist/index114.cjs +13 -1
  40. package/dist/index114.js +15 -24
  41. package/dist/index115.cjs +1 -1
  42. package/dist/index115.js +35 -62
  43. package/dist/index116.cjs +1 -7
  44. package/dist/index116.js +26 -10
  45. package/dist/index117.cjs +1 -1
  46. package/dist/index117.js +5 -47
  47. package/dist/index118.cjs +7 -0
  48. package/dist/index118.js +12 -0
  49. package/dist/index119.cjs +1 -0
  50. package/dist/index119.js +65 -0
  51. package/dist/index120.cjs +1 -0
  52. package/dist/index120.js +49 -0
  53. package/dist/index13.cjs +1 -1
  54. package/dist/index13.js +16 -15
  55. package/dist/index17.cjs +1 -1
  56. package/dist/index17.js +1 -1
  57. package/dist/index18.cjs +1 -1
  58. package/dist/index18.js +10 -9
  59. package/dist/index19.cjs +1 -1
  60. package/dist/index19.js +33 -26
  61. package/dist/index2.cjs +1 -1
  62. package/dist/index2.js +3 -2
  63. package/dist/index20.cjs +1 -1
  64. package/dist/index20.js +21 -20
  65. package/dist/index22.cjs +1 -1
  66. package/dist/index22.js +1 -1
  67. package/dist/index30.cjs +1 -1
  68. package/dist/index30.js +40 -37
  69. package/dist/index31.cjs +1 -1
  70. package/dist/index31.js +1 -1
  71. package/dist/index34.cjs +1 -1
  72. package/dist/index34.js +1 -1
  73. package/dist/index35.cjs +1 -1
  74. package/dist/index35.js +7 -7
  75. package/dist/index36.cjs +1 -1
  76. package/dist/index36.js +39 -38
  77. package/dist/index39.cjs +1 -1
  78. package/dist/index39.js +1 -1
  79. package/dist/index40.cjs +1 -1
  80. package/dist/index40.js +1 -1
  81. package/dist/index42.cjs +1 -1
  82. package/dist/index42.js +1 -1
  83. package/dist/index44.cjs +1 -1
  84. package/dist/index44.js +1 -1
  85. package/dist/index46.cjs +1 -1
  86. package/dist/index46.js +2 -2
  87. package/dist/index49.cjs +1 -1
  88. package/dist/index49.js +6 -5
  89. package/dist/index78.cjs +1 -1
  90. package/dist/index78.js +22 -19
  91. package/dist/index79.cjs +1 -1
  92. package/dist/index79.js +7 -5
  93. package/dist/index80.cjs +1 -1
  94. package/dist/index80.js +1 -1
  95. package/dist/index84.cjs +1 -1
  96. package/dist/index84.js +1 -1
  97. package/dist/index85.cjs +1 -1
  98. package/dist/index85.js +1 -1
  99. package/dist/index88.cjs +1 -1
  100. package/dist/index88.js +2 -5
  101. package/dist/index89.cjs +1 -1
  102. package/dist/index89.js +4 -117
  103. package/dist/index90.cjs +1 -1
  104. package/dist/index90.js +117 -18
  105. package/dist/index91.cjs +1 -1
  106. package/dist/index91.js +19 -13
  107. package/dist/index92.cjs +1 -104
  108. package/dist/index92.js +7 -120
  109. package/dist/index93.cjs +1 -1
  110. package/dist/index93.js +16 -66
  111. package/dist/index94.cjs +1 -1
  112. package/dist/index94.js +13 -29
  113. package/dist/index95.cjs +104 -1
  114. package/dist/index95.js +120 -2
  115. package/dist/index96.cjs +1 -1
  116. package/dist/index96.js +65 -38
  117. package/dist/index97.cjs +1 -1
  118. package/dist/index97.js +26 -8
  119. package/dist/index98.cjs +1 -19
  120. package/dist/index98.js +2 -24
  121. package/dist/index99.cjs +1 -1
  122. package/dist/index99.js +37 -34
  123. package/dist/storybookHelpers/apiMocks/views/custom_views.d.ts +7 -0
  124. package/dist/types.d.ts +14 -0
  125. package/dist/utils/getViewTheme/getViewTheme.d.ts +21 -0
  126. package/dist/utils/getViewTheme/getViewTheme.test.d.ts +1 -0
  127. package/dist/utils/getViewTheme/index.d.ts +1 -0
  128. package/dist/utils/isTextFilterValid/index.d.ts +1 -0
  129. package/dist/utils/isTextFilterValid/isTextFilterValid.d.ts +7 -0
  130. package/dist/utils/isTextFilterValid/isTextFilterValid.test.d.ts +1 -0
  131. package/package.json +1 -1
@@ -3,6 +3,7 @@ import { Filter, FilterGroupType } from '../types';
3
3
  export declare const filterIds: {
4
4
  BRAND_IDS: string;
5
5
  ORDER_NUMBER: string;
6
+ ORDER_CODE: string;
6
7
  SHOE_SIZE: string;
7
8
  SHOE: string;
8
9
  CHANNEL_ID: string;
@@ -1,8 +1,10 @@
1
1
  import { Filter } from 'src/types';
2
+ import { ReactNode } from 'react';
2
3
  type FilterGroupProps = {
3
4
  data: Filter;
4
5
  editedValue: string;
5
6
  setEditedValue: (value: string) => void;
7
+ error: ReactNode;
6
8
  };
7
- export declare const FilterField: ({ data, editedValue, setEditedValue }: FilterGroupProps) => JSX.Element | null;
9
+ export declare const FilterField: ({ data, editedValue, setEditedValue, error }: FilterGroupProps) => JSX.Element | null;
8
10
  export {};
@@ -8,3 +8,4 @@ export declare enum FilterChoiceValue {
8
8
  NUMBER_RANGE = "number_range"
9
9
  }
10
10
  export declare const SWR_HOOK_OPTIONS: SWRConfiguration;
11
+ export declare const MIN_SEARCH_ERROR_MESSAGE = "Please enter at least 3 characters";
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index2.cjs"),o=require("./index3.cjs"),n=require("./index4.cjs"),a=require("./index5.cjs"),c=require("./index6.cjs"),u=require("./index7.cjs"),l=require("./index8.cjs"),F=require("./index9.cjs"),d=require("./index10.cjs"),q=require("./index11.cjs"),g=require("./index12.cjs"),w=require("./index13.cjs"),A=require("./index14.cjs"),V=require("./index15.cjs"),p=require("./index16.cjs"),C=require("./index17.cjs"),h=require("./index18.cjs"),v=require("./index19.cjs"),b=require("./index20.cjs"),R=require("./index21.cjs"),m=require("./index22.cjs"),D=require("./index23.cjs"),M=require("./index24.cjs"),T=require("./index25.cjs"),y=require("./index26.cjs"),S=require("./index27.cjs"),P=require("./index28.cjs"),N=require("./index29.cjs"),O=require("./index30.cjs"),U=require("./index31.cjs"),L=require("./index32.cjs"),B=require("./index33.cjs"),f=require("./index34.cjs"),k=require("./index35.cjs"),I=require("./index36.cjs"),x=require("./index37.cjs"),H=require("./index38.cjs"),E=require("./index39.cjs"),_=require("./index40.cjs"),G=require("./index41.cjs"),W=require("./index42.cjs"),X=require("./index43.cjs"),$=require("./index44.cjs"),J=require("./index45.cjs"),K=require("./index46.cjs"),j=require("./index47.cjs"),e=require("./index48.cjs"),r=require("./index49.cjs"),z=require("./index50.cjs"),Q=require("./index51.cjs"),Y=require("./index52.cjs"),Z=require("./index53.cjs"),i=require("./index54.cjs"),t=require("./index55.cjs"),ee=require("./index56.cjs"),re=require("./index57.cjs"),ie=require("./index58.cjs"),te=require("./index59.cjs"),se=require("./index60.cjs"),oe=require("./index61.cjs"),ne=require("./index62.cjs"),ae=require("./index63.cjs"),ce=require("./index64.cjs"),ue=require("./index65.cjs"),le=require("./index66.cjs"),Fe=require("./index67.cjs"),de=require("./index68.cjs"),qe=require("./index69.cjs"),ge=require("./index70.cjs"),we=require("./index71.cjs"),Ae=require("./index72.cjs"),Ve=require("./index73.cjs"),pe=require("./index74.cjs"),Ce=require("./index75.cjs"),he=require("./index76.cjs"),ve=require("./index77.cjs"),be=require("./index78.cjs"),Re=require("./index79.cjs"),me=require("./index80.cjs"),De=require("./index81.cjs");exports.SortingMode=s.SortingMode;exports.deleteCustomView=o.deleteCustomView;exports.patchCurrentUser=n.patchCurrentUser;exports.patchCustomView=a.patchCustomView;exports.createCustomView=c.createCustomView;exports.axios=u.axios;exports.useBusinessLogic=l.useBusinessLogic;exports.BusinessLogicManager=F.BusinessLogicManager;exports.setMockedBusinessLogic=d.setMockedBusinessLogic;exports.ActionsDropdown=q.ActionsDropdown;exports.ErrorBoundary=g.ErrorBoundary;exports.SearchBar=w.SearchBar;exports.TableControls=A.TableControls;exports.ToastsManager=V.ToastsManager;exports.ActiveFilters=p.ActiveFilters;exports.FilterArrayField=C.FilterArrayField;exports.FilterField=h.FilterField;exports.ActiveFilterTag=v.ActiveFilterTag;exports.ActiveFilterArrayTag=b.ActiveFilterArrayTag;exports.ActiveFilterDateRangeTag=R.ActiveFilterDateRangeTag;exports.ActiveFilterNumberRangeTag=m.ActiveFilterNumberRangeTag;exports.ActiveAsyncRadioFilter=D.ActiveAsyncRadioFilter;exports.ActiveFilterFooter=M.ActiveFilterFooter;exports.ActiveFilterHeader=T.ActiveFilterHeader;exports.AsyncCheckboxFilter=y.AsyncCheckboxFilter;exports.AsyncRadioFilter=S.AsyncRadioFilter;exports.CheckboxFilter=P.CheckboxFilter;exports.DateRangeFilter=N.DateRangeFilter;exports.MultipleFieldFilter=O.MultipleFieldFilter;exports.NumberRangeFilter=U.NumberRangeFilter;exports.RadioFilter=L.RadioFilter;exports.FiltersDropdown=B.FiltersDropdown;exports.FiltersList=f.FiltersList;exports.FilterGroup=k.FilterGroup;exports.ViewTab=I.ViewTab;exports.CreateView=x.CreateView;exports.EditDropdown=H.EditDropdown;exports.OptionsDropdown=E.OptionsDropdown;exports.PillNotifications=_.PillNotifications;exports.SortableViews=G.SortableViews;exports.UnsavedChangesPill=W.UnsavedChangesPill;exports.ViewDropdowns=X.ViewDropdowns;exports.ViewList=$.ViewList;exports.SHARING_OPTIONS=J.SHARING_OPTIONS;exports.TableManagement=K.TableManagement;exports.RefreshButton=j.RefreshButton;exports.DateOptionMap=e.DateOptionMap;exports.DateValue=e.DateValue;exports.FilterChoiceValue=r.FilterChoiceValue;exports.SWR_HOOK_OPTIONS=r.SWR_HOOK_OPTIONS;exports.ModalProvider=z.ModalProvider;exports.ModalId=Q.ModalId;exports.useModal=Y.useModal;exports.withCSRF=Z.withCSRF;exports.onlyJSON=i.onlyJSON;exports.vndAPI=i.vndAPI;exports.fetcherV1=t.fetcherV1;exports.fetcherV2=t.fetcherV2;exports.useDropdownManager=ee.useDropdownManager;exports.useDuplicateActiveView=re.useDuplicateActiveView;exports.useFilterArrayLabel=ie.useFilterArrayLabel;exports.useFilterLabel=te.useFilterLabel;exports.usePersistUnsavedChanges=se.usePersistUnsavedChanges;exports.useStores=oe.useStores;exports.useViews=ne.useViews;exports.useViewUrlChange=ae.useViewUrlChange;exports.useUrlChange=ce.useUrlChange;exports.useCustomViews=ue.useCustomViews;exports.useColumns=le.useColumns;exports.useUrlParams=Fe.useUrlParams;exports.Filters=de.Filters;exports.NumberRangeFilterClass=qe.NumberRangeFilter;exports.RangeFilter=ge.RangeFilter;exports.Views=we.Views;exports.Notifications=Ae.Notifications;exports.Table=Ve.Table;exports.MobXProvider=pe.MobXProvider;exports.getAsyncOptions=Ce.getAsyncOptions;exports.getFetcherFunction=he.getFetcherFunction;exports.isValidDateRange=ve.isValidDateRange;exports.viewsAdapter=be.viewsAdapter;exports.createAllView=Re.createAllView;exports.organiseViews=me.organiseViews;exports.mockUseStores=De.mockUseStores;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index2.cjs"),o=require("./index3.cjs"),n=require("./index4.cjs"),a=require("./index5.cjs"),c=require("./index6.cjs"),u=require("./index7.cjs"),l=require("./index8.cjs"),F=require("./index9.cjs"),d=require("./index10.cjs"),q=require("./index11.cjs"),g=require("./index12.cjs"),w=require("./index13.cjs"),A=require("./index14.cjs"),V=require("./index15.cjs"),p=require("./index16.cjs"),C=require("./index17.cjs"),R=require("./index18.cjs"),h=require("./index19.cjs"),v=require("./index20.cjs"),b=require("./index21.cjs"),S=require("./index22.cjs"),m=require("./index23.cjs"),M=require("./index24.cjs"),D=require("./index25.cjs"),T=require("./index26.cjs"),y=require("./index27.cjs"),N=require("./index28.cjs"),O=require("./index29.cjs"),P=require("./index30.cjs"),U=require("./index31.cjs"),L=require("./index32.cjs"),B=require("./index33.cjs"),f=require("./index34.cjs"),E=require("./index35.cjs"),k=require("./index36.cjs"),I=require("./index37.cjs"),_=require("./index38.cjs"),x=require("./index39.cjs"),H=require("./index40.cjs"),G=require("./index41.cjs"),W=require("./index42.cjs"),X=require("./index43.cjs"),$=require("./index44.cjs"),J=require("./index45.cjs"),K=require("./index46.cjs"),j=require("./index47.cjs"),i=require("./index48.cjs"),e=require("./index49.cjs"),z=require("./index50.cjs"),Q=require("./index51.cjs"),Y=require("./index52.cjs"),Z=require("./index53.cjs"),t=require("./index54.cjs"),s=require("./index55.cjs"),ee=require("./index56.cjs"),re=require("./index57.cjs"),ie=require("./index58.cjs"),te=require("./index59.cjs"),se=require("./index60.cjs"),oe=require("./index61.cjs"),ne=require("./index62.cjs"),ae=require("./index63.cjs"),ce=require("./index64.cjs"),ue=require("./index65.cjs"),le=require("./index66.cjs"),Fe=require("./index67.cjs"),de=require("./index68.cjs"),qe=require("./index69.cjs"),ge=require("./index70.cjs"),we=require("./index71.cjs"),Ae=require("./index72.cjs"),Ve=require("./index73.cjs"),pe=require("./index74.cjs"),Ce=require("./index75.cjs"),Re=require("./index76.cjs"),he=require("./index77.cjs"),ve=require("./index78.cjs"),be=require("./index79.cjs"),Se=require("./index80.cjs"),me=require("./index81.cjs");exports.SortingMode=r.SortingMode;exports.ViewStatusTypes=r.ViewStatusTypes;exports.deleteCustomView=o.deleteCustomView;exports.patchCurrentUser=n.patchCurrentUser;exports.patchCustomView=a.patchCustomView;exports.createCustomView=c.createCustomView;exports.axios=u.axios;exports.useBusinessLogic=l.useBusinessLogic;exports.BusinessLogicManager=F.BusinessLogicManager;exports.setMockedBusinessLogic=d.setMockedBusinessLogic;exports.ActionsDropdown=q.ActionsDropdown;exports.ErrorBoundary=g.ErrorBoundary;exports.SearchBar=w.SearchBar;exports.TableControls=A.TableControls;exports.ToastsManager=V.ToastsManager;exports.ActiveFilters=p.ActiveFilters;exports.FilterArrayField=C.FilterArrayField;exports.FilterField=R.FilterField;exports.ActiveFilterTag=h.ActiveFilterTag;exports.ActiveFilterArrayTag=v.ActiveFilterArrayTag;exports.ActiveFilterDateRangeTag=b.ActiveFilterDateRangeTag;exports.ActiveFilterNumberRangeTag=S.ActiveFilterNumberRangeTag;exports.ActiveAsyncRadioFilter=m.ActiveAsyncRadioFilter;exports.ActiveFilterFooter=M.ActiveFilterFooter;exports.ActiveFilterHeader=D.ActiveFilterHeader;exports.AsyncCheckboxFilter=T.AsyncCheckboxFilter;exports.AsyncRadioFilter=y.AsyncRadioFilter;exports.CheckboxFilter=N.CheckboxFilter;exports.DateRangeFilter=O.DateRangeFilter;exports.MultipleFieldFilter=P.MultipleFieldFilter;exports.NumberRangeFilter=U.NumberRangeFilter;exports.RadioFilter=L.RadioFilter;exports.FiltersDropdown=B.FiltersDropdown;exports.FiltersList=f.FiltersList;exports.FilterGroup=E.FilterGroup;exports.ViewTab=k.ViewTab;exports.CreateView=I.CreateView;exports.EditDropdown=_.EditDropdown;exports.OptionsDropdown=x.OptionsDropdown;exports.PillNotifications=H.PillNotifications;exports.SortableViews=G.SortableViews;exports.UnsavedChangesPill=W.UnsavedChangesPill;exports.ViewDropdowns=X.ViewDropdowns;exports.ViewList=$.ViewList;exports.SHARING_OPTIONS=J.SHARING_OPTIONS;exports.TableManagement=K.TableManagement;exports.RefreshButton=j.RefreshButton;exports.DateOptionMap=i.DateOptionMap;exports.DateValue=i.DateValue;exports.FilterChoiceValue=e.FilterChoiceValue;exports.MIN_SEARCH_ERROR_MESSAGE=e.MIN_SEARCH_ERROR_MESSAGE;exports.SWR_HOOK_OPTIONS=e.SWR_HOOK_OPTIONS;exports.ModalProvider=z.ModalProvider;exports.ModalId=Q.ModalId;exports.useModal=Y.useModal;exports.withCSRF=Z.withCSRF;exports.onlyJSON=t.onlyJSON;exports.vndAPI=t.vndAPI;exports.fetcherV1=s.fetcherV1;exports.fetcherV2=s.fetcherV2;exports.useDropdownManager=ee.useDropdownManager;exports.useDuplicateActiveView=re.useDuplicateActiveView;exports.useFilterArrayLabel=ie.useFilterArrayLabel;exports.useFilterLabel=te.useFilterLabel;exports.usePersistUnsavedChanges=se.usePersistUnsavedChanges;exports.useStores=oe.useStores;exports.useViews=ne.useViews;exports.useViewUrlChange=ae.useViewUrlChange;exports.useUrlChange=ce.useUrlChange;exports.useCustomViews=ue.useCustomViews;exports.useColumns=le.useColumns;exports.useUrlParams=Fe.useUrlParams;exports.Filters=de.Filters;exports.NumberRangeFilterClass=qe.NumberRangeFilter;exports.RangeFilter=ge.RangeFilter;exports.Views=we.Views;exports.Notifications=Ae.Notifications;exports.Table=Ve.Table;exports.MobXProvider=pe.MobXProvider;exports.getAsyncOptions=Ce.getAsyncOptions;exports.getFetcherFunction=Re.getFetcherFunction;exports.isValidDateRange=he.isValidDateRange;exports.viewsAdapter=ve.viewsAdapter;exports.createAllView=be.createAllView;exports.organiseViews=Se.organiseViews;exports.mockUseStores=me.mockUseStores;
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- ._actionsHeaderContainer_fgqms_1>div{white-space:nowrap;flex-wrap:nowrap}._actionsHeaderContainer_fgqms_1{padding:var(--sizes-3);border-bottom:var(--sizes-line) solid var(--colors-neutral-grey-base)}._refreshTooltip_v0eu8_1{position:relative}._refreshButton_v0eu8_5{padding-right:var(--sizes-sm)}._refreshIndicator_v0eu8_9{height:var(--sizes-3);min-width:var(--sizes-3)}
1
+ ._actionsHeaderContainer_fgqms_1>div{white-space:nowrap;flex-wrap:nowrap}._actionsHeaderContainer_fgqms_1{padding:var(--sizes-3);border-bottom:var(--sizes-line) solid var(--colors-neutral-grey-base)}._fieldContainer_43n4j_1{padding:var(--sizes-md);min-width:250px;max-height:500px;overflow:auto}._refreshTooltip_v0eu8_1{position:relative}._refreshButton_v0eu8_5{padding-right:var(--sizes-sm)}._refreshIndicator_v0eu8_9{height:var(--sizes-3);min-width:var(--sizes-3)}
package/dist/index.js CHANGED
@@ -1,166 +1,168 @@
1
- import { SortingMode as o } from "./index2.js";
2
- import { deleteCustomView as p } from "./index3.js";
3
- import { patchCurrentUser as m } from "./index4.js";
4
- import { patchCustomView as x } from "./index5.js";
5
- import { createCustomView as a } from "./index6.js";
6
- import { axios as n } from "./index7.js";
7
- import { useBusinessLogic as c } from "./index8.js";
8
- import { BusinessLogicManager as d } from "./index9.js";
9
- import { setMockedBusinessLogic as w } from "./index10.js";
10
- import { ActionsDropdown as V } from "./index11.js";
1
+ import { SortingMode as o, ViewStatusTypes as t } from "./index2.js";
2
+ import { deleteCustomView as i } from "./index3.js";
3
+ import { patchCurrentUser as f } from "./index4.js";
4
+ import { patchCustomView as s } from "./index5.js";
5
+ import { createCustomView as l } from "./index6.js";
6
+ import { axios as u } from "./index7.js";
7
+ import { useBusinessLogic as F } from "./index8.js";
8
+ import { BusinessLogicManager as g } from "./index9.js";
9
+ import { setMockedBusinessLogic as A } from "./index10.js";
10
+ import { ActionsDropdown as R } from "./index11.js";
11
11
  import { ErrorBoundary as h } from "./index12.js";
12
- import { SearchBar as R } from "./index13.js";
13
- import { TableControls as D } from "./index14.js";
14
- import { ToastsManager as S } from "./index15.js";
15
- import { ActiveFilters as N } from "./index16.js";
16
- import { FilterArrayField as y } from "./index17.js";
17
- import { FilterField as L } from "./index18.js";
18
- import { ActiveFilterTag as B } from "./index19.js";
19
- import { ActiveFilterArrayTag as k } from "./index20.js";
20
- import { ActiveFilterDateRangeTag as _ } from "./index21.js";
21
- import { ActiveFilterNumberRangeTag as G } from "./index22.js";
22
- import { ActiveAsyncRadioFilter as K } from "./index23.js";
23
- import { ActiveFilterFooter as X } from "./index24.js";
24
- import { ActiveFilterHeader as q } from "./index25.js";
25
- import { AsyncCheckboxFilter as Q } from "./index26.js";
26
- import { AsyncRadioFilter as Z } from "./index27.js";
27
- import { CheckboxFilter as rr } from "./index28.js";
28
- import { DateRangeFilter as or } from "./index29.js";
29
- import { MultipleFieldFilter as pr } from "./index30.js";
30
- import { NumberRangeFilter as mr } from "./index31.js";
31
- import { RadioFilter as xr } from "./index32.js";
32
- import { FiltersDropdown as ar } from "./index33.js";
33
- import { FiltersList as nr } from "./index34.js";
34
- import { FilterGroup as cr } from "./index35.js";
35
- import { ViewTab as dr } from "./index36.js";
36
- import { CreateView as wr } from "./index37.js";
37
- import { EditDropdown as Vr } from "./index38.js";
12
+ import { SearchBar as S } from "./index13.js";
13
+ import { TableControls as M } from "./index14.js";
14
+ import { ToastsManager as T } from "./index15.js";
15
+ import { ActiveFilters as O } from "./index16.js";
16
+ import { FilterArrayField as P } from "./index17.js";
17
+ import { FilterField as U } from "./index18.js";
18
+ import { ActiveFilterTag as E } from "./index19.js";
19
+ import { ActiveFilterArrayTag as _ } from "./index20.js";
20
+ import { ActiveFilterDateRangeTag as H } from "./index21.js";
21
+ import { ActiveFilterNumberRangeTag as J } from "./index22.js";
22
+ import { ActiveAsyncRadioFilter as W } from "./index23.js";
23
+ import { ActiveFilterFooter as j } from "./index24.js";
24
+ import { ActiveFilterHeader as z } from "./index25.js";
25
+ import { AsyncCheckboxFilter as Y } from "./index26.js";
26
+ import { AsyncRadioFilter as $ } from "./index27.js";
27
+ import { CheckboxFilter as er } from "./index28.js";
28
+ import { DateRangeFilter as tr } from "./index29.js";
29
+ import { MultipleFieldFilter as ir } from "./index30.js";
30
+ import { NumberRangeFilter as fr } from "./index31.js";
31
+ import { RadioFilter as sr } from "./index32.js";
32
+ import { FiltersDropdown as lr } from "./index33.js";
33
+ import { FiltersList as ur } from "./index34.js";
34
+ import { FilterGroup as Fr } from "./index35.js";
35
+ import { ViewTab as gr } from "./index36.js";
36
+ import { CreateView as Ar } from "./index37.js";
37
+ import { EditDropdown as Rr } from "./index38.js";
38
38
  import { OptionsDropdown as hr } from "./index39.js";
39
- import { PillNotifications as Rr } from "./index40.js";
40
- import { SortableViews as Dr } from "./index41.js";
41
- import { UnsavedChangesPill as Sr } from "./index42.js";
42
- import { ViewDropdowns as Nr } from "./index43.js";
43
- import { ViewList as yr } from "./index44.js";
44
- import { SHARING_OPTIONS as Lr } from "./index45.js";
45
- import { TableManagement as Br } from "./index46.js";
46
- import { RefreshButton as kr } from "./index47.js";
47
- import { DateOptionMap as _r, DateValue as Er } from "./index48.js";
48
- import { FilterChoiceValue as Jr, SWR_HOOK_OPTIONS as Kr } from "./index49.js";
49
- import { ModalProvider as Xr } from "./index50.js";
50
- import { ModalId as qr } from "./index51.js";
51
- import { useModal as Qr } from "./index52.js";
52
- import { withCSRF as Zr } from "./index53.js";
53
- import { onlyJSON as re, vndAPI as ee } from "./index54.js";
54
- import { fetcherV1 as te, fetcherV2 as pe } from "./index55.js";
55
- import { useDropdownManager as me } from "./index56.js";
56
- import { useDuplicateActiveView as xe } from "./index57.js";
57
- import { useFilterArrayLabel as ae } from "./index58.js";
58
- import { useFilterLabel as ne } from "./index59.js";
59
- import { usePersistUnsavedChanges as ce } from "./index60.js";
60
- import { useStores as de } from "./index61.js";
61
- import { useViews as we } from "./index62.js";
62
- import { useViewUrlChange as Ve } from "./index63.js";
63
- import { useUrlChange as he } from "./index64.js";
64
- import { useCustomViews as Re } from "./index65.js";
39
+ import { PillNotifications as Sr } from "./index40.js";
40
+ import { SortableViews as Mr } from "./index41.js";
41
+ import { UnsavedChangesPill as Tr } from "./index42.js";
42
+ import { ViewDropdowns as Or } from "./index43.js";
43
+ import { ViewList as Pr } from "./index44.js";
44
+ import { SHARING_OPTIONS as Ur } from "./index45.js";
45
+ import { TableManagement as Er } from "./index46.js";
46
+ import { RefreshButton as _r } from "./index47.js";
47
+ import { DateOptionMap as Hr, DateValue as Gr } from "./index48.js";
48
+ import { FilterChoiceValue as Kr, MIN_SEARCH_ERROR_MESSAGE as Wr, SWR_HOOK_OPTIONS as Xr } from "./index49.js";
49
+ import { ModalProvider as qr } from "./index50.js";
50
+ import { ModalId as Qr } from "./index51.js";
51
+ import { useModal as Zr } from "./index52.js";
52
+ import { withCSRF as re } from "./index53.js";
53
+ import { onlyJSON as oe, vndAPI as te } from "./index54.js";
54
+ import { fetcherV1 as ie, fetcherV2 as me } from "./index55.js";
55
+ import { useDropdownManager as xe } from "./index56.js";
56
+ import { useDuplicateActiveView as ae } from "./index57.js";
57
+ import { useFilterArrayLabel as ne } from "./index58.js";
58
+ import { useFilterLabel as ce } from "./index59.js";
59
+ import { usePersistUnsavedChanges as de } from "./index60.js";
60
+ import { useStores as we } from "./index61.js";
61
+ import { useViews as Ve } from "./index62.js";
62
+ import { useViewUrlChange as Ce } from "./index63.js";
63
+ import { useUrlChange as ve } from "./index64.js";
64
+ import { useCustomViews as be } from "./index65.js";
65
65
  import { useColumns as De } from "./index66.js";
66
- import { useUrlParams as Se } from "./index67.js";
67
- import { Filters as Ne } from "./index68.js";
68
- import { NumberRangeFilter as ye } from "./index69.js";
69
- import { RangeFilter as Le } from "./index70.js";
70
- import { Views as Be } from "./index71.js";
66
+ import { useUrlParams as Ne } from "./index67.js";
67
+ import { Filters as ye } from "./index68.js";
68
+ import { NumberRangeFilter as Le } from "./index69.js";
69
+ import { RangeFilter as Be } from "./index70.js";
70
+ import { Views as Ie } from "./index71.js";
71
71
  import { Notifications as ke } from "./index72.js";
72
- import { Table as _e } from "./index73.js";
73
- import { MobXProvider as Ge } from "./index74.js";
74
- import { getAsyncOptions as Ke } from "./index75.js";
75
- import { getFetcherFunction as Xe } from "./index76.js";
76
- import { isValidDateRange as qe } from "./index77.js";
77
- import { viewsAdapter as Qe } from "./index78.js";
78
- import { createAllView as Ze } from "./index79.js";
79
- import { organiseViews as ro } from "./index80.js";
80
- import { mockUseStores as oo } from "./index81.js";
72
+ import { Table as Ge } from "./index73.js";
73
+ import { MobXProvider as Ke } from "./index74.js";
74
+ import { getAsyncOptions as Xe } from "./index75.js";
75
+ import { getFetcherFunction as qe } from "./index76.js";
76
+ import { isValidDateRange as Qe } from "./index77.js";
77
+ import { viewsAdapter as Ze } from "./index78.js";
78
+ import { createAllView as ro } from "./index79.js";
79
+ import { organiseViews as oo } from "./index80.js";
80
+ import { mockUseStores as po } from "./index81.js";
81
81
  export {
82
- V as ActionsDropdown,
83
- K as ActiveAsyncRadioFilter,
84
- k as ActiveFilterArrayTag,
85
- _ as ActiveFilterDateRangeTag,
86
- X as ActiveFilterFooter,
87
- q as ActiveFilterHeader,
88
- G as ActiveFilterNumberRangeTag,
89
- B as ActiveFilterTag,
90
- N as ActiveFilters,
91
- Q as AsyncCheckboxFilter,
92
- Z as AsyncRadioFilter,
93
- d as BusinessLogicManager,
94
- rr as CheckboxFilter,
95
- wr as CreateView,
96
- _r as DateOptionMap,
97
- or as DateRangeFilter,
98
- Er as DateValue,
99
- Vr as EditDropdown,
82
+ R as ActionsDropdown,
83
+ W as ActiveAsyncRadioFilter,
84
+ _ as ActiveFilterArrayTag,
85
+ H as ActiveFilterDateRangeTag,
86
+ j as ActiveFilterFooter,
87
+ z as ActiveFilterHeader,
88
+ J as ActiveFilterNumberRangeTag,
89
+ E as ActiveFilterTag,
90
+ O as ActiveFilters,
91
+ Y as AsyncCheckboxFilter,
92
+ $ as AsyncRadioFilter,
93
+ g as BusinessLogicManager,
94
+ er as CheckboxFilter,
95
+ Ar as CreateView,
96
+ Hr as DateOptionMap,
97
+ tr as DateRangeFilter,
98
+ Gr as DateValue,
99
+ Rr as EditDropdown,
100
100
  h as ErrorBoundary,
101
- y as FilterArrayField,
102
- Jr as FilterChoiceValue,
103
- L as FilterField,
104
- cr as FilterGroup,
105
- Ne as Filters,
106
- ar as FiltersDropdown,
107
- nr as FiltersList,
108
- Ge as MobXProvider,
109
- qr as ModalId,
110
- Xr as ModalProvider,
111
- pr as MultipleFieldFilter,
101
+ P as FilterArrayField,
102
+ Kr as FilterChoiceValue,
103
+ U as FilterField,
104
+ Fr as FilterGroup,
105
+ ye as Filters,
106
+ lr as FiltersDropdown,
107
+ ur as FiltersList,
108
+ Wr as MIN_SEARCH_ERROR_MESSAGE,
109
+ Ke as MobXProvider,
110
+ Qr as ModalId,
111
+ qr as ModalProvider,
112
+ ir as MultipleFieldFilter,
112
113
  ke as Notifications,
113
- mr as NumberRangeFilter,
114
- ye as NumberRangeFilterClass,
114
+ fr as NumberRangeFilter,
115
+ Le as NumberRangeFilterClass,
115
116
  hr as OptionsDropdown,
116
- Rr as PillNotifications,
117
- xr as RadioFilter,
118
- Le as RangeFilter,
119
- kr as RefreshButton,
120
- Lr as SHARING_OPTIONS,
121
- Kr as SWR_HOOK_OPTIONS,
122
- R as SearchBar,
123
- Dr as SortableViews,
117
+ Sr as PillNotifications,
118
+ sr as RadioFilter,
119
+ Be as RangeFilter,
120
+ _r as RefreshButton,
121
+ Ur as SHARING_OPTIONS,
122
+ Xr as SWR_HOOK_OPTIONS,
123
+ S as SearchBar,
124
+ Mr as SortableViews,
124
125
  o as SortingMode,
125
- _e as Table,
126
- D as TableControls,
127
- Br as TableManagement,
128
- S as ToastsManager,
129
- Sr as UnsavedChangesPill,
130
- Nr as ViewDropdowns,
131
- yr as ViewList,
132
- dr as ViewTab,
133
- Be as Views,
134
- n as axios,
135
- Ze as createAllView,
136
- a as createCustomView,
137
- p as deleteCustomView,
138
- te as fetcherV1,
139
- pe as fetcherV2,
140
- Ke as getAsyncOptions,
141
- Xe as getFetcherFunction,
142
- qe as isValidDateRange,
143
- oo as mockUseStores,
144
- re as onlyJSON,
145
- ro as organiseViews,
146
- m as patchCurrentUser,
147
- x as patchCustomView,
148
- w as setMockedBusinessLogic,
149
- c as useBusinessLogic,
126
+ Ge as Table,
127
+ M as TableControls,
128
+ Er as TableManagement,
129
+ T as ToastsManager,
130
+ Tr as UnsavedChangesPill,
131
+ Or as ViewDropdowns,
132
+ Pr as ViewList,
133
+ t as ViewStatusTypes,
134
+ gr as ViewTab,
135
+ Ie as Views,
136
+ u as axios,
137
+ ro as createAllView,
138
+ l as createCustomView,
139
+ i as deleteCustomView,
140
+ ie as fetcherV1,
141
+ me as fetcherV2,
142
+ Xe as getAsyncOptions,
143
+ qe as getFetcherFunction,
144
+ Qe as isValidDateRange,
145
+ po as mockUseStores,
146
+ oe as onlyJSON,
147
+ oo as organiseViews,
148
+ f as patchCurrentUser,
149
+ s as patchCustomView,
150
+ A as setMockedBusinessLogic,
151
+ F as useBusinessLogic,
150
152
  De as useColumns,
151
- Re as useCustomViews,
152
- me as useDropdownManager,
153
- xe as useDuplicateActiveView,
154
- ae as useFilterArrayLabel,
155
- ne as useFilterLabel,
156
- Qr as useModal,
157
- ce as usePersistUnsavedChanges,
158
- de as useStores,
159
- he as useUrlChange,
160
- Se as useUrlParams,
161
- Ve as useViewUrlChange,
162
- we as useViews,
163
- Qe as viewsAdapter,
164
- ee as vndAPI,
165
- Zr as withCSRF
153
+ be as useCustomViews,
154
+ xe as useDropdownManager,
155
+ ae as useDuplicateActiveView,
156
+ ne as useFilterArrayLabel,
157
+ ce as useFilterLabel,
158
+ Zr as useModal,
159
+ de as usePersistUnsavedChanges,
160
+ we as useStores,
161
+ ve as useUrlChange,
162
+ Ne as useUrlParams,
163
+ Ce as useViewUrlChange,
164
+ Ve as useViews,
165
+ Ze as viewsAdapter,
166
+ te as vndAPI,
167
+ re as withCSRF
166
168
  };
package/dist/index10.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("@veeqo/ui"),c=require("./index2.cjs"),T=require("./index9.cjs"),o=require("@veeqo/components"),e={BRAND_IDS:"brand_ids",ORDER_NUMBER:"search.order_number",SHOE_SIZE:"shoe_size",SHOE:"shoe",CHANNEL_ID:"channel_id",PRODUCT_COUNT:"product_count",DUE_DATE:"due_date",MAX_PRODUCTS:"max_products"},r=[e.DUE_DATE],_=[e.PRODUCT_COUNT],A="search.all",D="sort",n=a.DateRanges.TODAY,u=a.getDateRange(n),p=a.DATE_RANGE_OPTIONS.find(({value:l})=>l===n),R="25",m="1",O="order",S=!1,b=200,h=[10,25,50,100],y="page[number]",L="page[size]",g=["order_id","shipping_rates","package","action"],N=["price"],U="api/v2/orders",I=c.SortingMode.MONOLITH,i={DATE_RANGE_FILTERS:r,SEARCH_FILTER_ID:A,SORT_FILTER_ID:D,NUMBER_RANGE_FILTERS:_,DEFAULT_DATE_SELECTION:n,DEFAULT_DATE_RANGE:u,DEFAULT_DATE_PRESET:p,DEFAULT_PAGE_SIZE:R,DEFAULT_PAGE_NUMBER:m,VIEW_TYPE:O,IS_VIEWS_READONLY:S,FILTERS_DEBOUCE_INTERVAL_MS:b,PAGE_SIZE_OPTIONS:h,PAGE_NUMBER_FILTER_ID:y,PAGE_SIZE_FILTER_ID:L,DEFAULT_VISIBLE_COLUMNS:g,DEFAULT_HIDDEN_COLUMNS:N,TABLE_DATA_URL:U,SORTING_MODE:I},E=()=>{const l=new Map,s=new Map;return l.set(e.BRAND_IDS,{id:e.BRAND_IDS,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"brand"}),label:"Brand",filterType:"checkbox",isFilterAllowed:!0,fetchAsyncFilterOptions:{URL:"/catalog/brands",labelProperty:"name",valueProperty:"id",fetcher:"fetcherV1",baseProperty:"brands"}}),s.set("brand",{id:"brand",label:"Brand",fields:[l.get(e.BRAND_IDS)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"brand"})}),l.set(e.ORDER_NUMBER,{id:e.ORDER_NUMBER,label:"Order number",filterType:"text",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"})}),s.set("order",{id:"order",label:"Order",fields:[l.get(e.ORDER_NUMBER)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"product-menu"})}),l.set(e.SHOE_SIZE,{id:e.SHOE_SIZE,label:"Shoe size",filterType:"radio",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"}),options:[{label:"One",value:"1"},{label:"Two",value:"2"},{label:"Three",value:"3"},{label:"Four",value:"4"},{label:"Five",value:"5"}]}),s.set(e.SHOE,{id:e.SHOE,label:"Shoe",fields:[l.get(e.SHOE_SIZE)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"})}),l.set(e.CHANNEL_ID,{id:e.CHANNEL_ID,label:"Channel",filterType:"checkbox",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"}),fetchAsyncFilterOptions:{URL:"/channels",labelProperty:"name",valueProperty:"id",fetcher:"fetcherV1"}}),s.set("channel",{id:"channel",label:"Store",fields:[l.get(e.CHANNEL_ID)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"fba"})}),l.set(e.PRODUCT_COUNT,{id:e.PRODUCT_COUNT,label:"Product count",filterType:"number_range",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"}),options:[{label:"Min",value:"0"},{label:"Max",value:"100"}]}),s.set(e.PRODUCT_COUNT,{id:e.PRODUCT_COUNT,label:"Product count",fields:[l.get(e.PRODUCT_COUNT)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"reports"})}),l.set(e.DUE_DATE,{id:e.DUE_DATE,label:"Due date",filterType:"date_range",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"}),options:[{label:"Today",value:"TODAY"},{label:"Yesterday",value:"YESTERDAY"},{label:"Last 7 days",value:"LAST_7_DAYS"},{label:"Last 30 days",value:"LAST_30_DAYS"},{label:"Last 90 days",value:"LAST_90_DAYS"},{label:"Last month",value:"LAST_MONTH"},{label:"Last 12 months",value:"LAST_12_MONTHS"},{label:"Week to date",value:"WEEK_TO_DATE"},{label:"Month to date",value:"MONTH_TO_DATE"},{label:"Year to date",value:"YEAR_TO_DATE"}]}),s.set("due",{id:"due",label:"Due",fields:[l.get(e.DUE_DATE)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"date"})}),l.set(e.MAX_PRODUCTS,{id:e.MAX_PRODUCTS,label:"Max products",filterType:"number",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"products"})}),s.set("max_count",{id:"max_count",label:"Max count",fields:[l.get(e.MAX_PRODUCTS)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"reports"})}),{FIELDS_MAP:l,GROUP_MAP:s}},C=l=>{const s=E(),d={...i,...s,...l};T.BusinessLogicManager.setBusinessLogic(d)};exports.DATE_RANGE_FILTERS=r;exports.NUMBER_RANGE_FILTERS=_;exports.customAppBusinessLogic=i;exports.filterIds=e;exports.generateMockedFilterMaps=E;exports.setMockedBusinessLogic=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("@veeqo/ui"),c=require("./index2.cjs"),T=require("./index9.cjs"),o=require("@veeqo/components"),e={BRAND_IDS:"brand_ids",ORDER_NUMBER:"search.order_number",ORDER_CODE:"search.order_code",SHOE_SIZE:"shoe_size",SHOE:"shoe",CHANNEL_ID:"channel_id",PRODUCT_COUNT:"product_count",DUE_DATE:"due_date",MAX_PRODUCTS:"max_products"},r=[e.DUE_DATE],_=[e.PRODUCT_COUNT],D="search.all",A="sort",n=a.DateRanges.TODAY,p=a.getDateRange(n),u=a.DATE_RANGE_OPTIONS.find(({value:l})=>l===n),R="25",O="1",m="order",S=!1,h=200,b=[10,25,50,100],y="page[number]",L="page[size]",g=["order_id","shipping_rates","package","action"],C=["price"],N="api/v2/orders",U=c.SortingMode.MONOLITH,i={DATE_RANGE_FILTERS:r,SEARCH_FILTER_ID:D,SORT_FILTER_ID:A,NUMBER_RANGE_FILTERS:_,DEFAULT_DATE_SELECTION:n,DEFAULT_DATE_RANGE:p,DEFAULT_DATE_PRESET:u,DEFAULT_PAGE_SIZE:R,DEFAULT_PAGE_NUMBER:O,VIEW_TYPE:m,IS_VIEWS_READONLY:S,FILTERS_DEBOUCE_INTERVAL_MS:h,PAGE_SIZE_OPTIONS:b,PAGE_NUMBER_FILTER_ID:y,PAGE_SIZE_FILTER_ID:L,DEFAULT_VISIBLE_COLUMNS:g,DEFAULT_HIDDEN_COLUMNS:C,TABLE_DATA_URL:N,SORTING_MODE:U},E=()=>{const l=new Map,s=new Map;return l.set(e.BRAND_IDS,{id:e.BRAND_IDS,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"brand"}),label:"Brand",filterType:"checkbox",isFilterAllowed:!0,fetchAsyncFilterOptions:{URL:"/catalog/brands",labelProperty:"name",valueProperty:"id",fetcher:"fetcherV1",baseProperty:"brands"}}),s.set("brand",{id:"brand",label:"Brand",fields:[l.get(e.BRAND_IDS)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"brand"})}),l.set(e.ORDER_NUMBER,{id:e.ORDER_NUMBER,label:"Order number",filterType:"text",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"})}),l.set(e.ORDER_CODE,{id:e.ORDER_CODE,label:"Order code",filterType:"text",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"})}),s.set("order",{id:"order",label:"Order",fields:[l.get(e.ORDER_NUMBER),l.get(e.ORDER_CODE)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"product-menu"})}),l.set(e.SHOE_SIZE,{id:e.SHOE_SIZE,label:"Shoe size",filterType:"radio",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"}),options:[{label:"One",value:"1"},{label:"Two",value:"2"},{label:"Three",value:"3"},{label:"Four",value:"4"},{label:"Five",value:"5"}]}),s.set(e.SHOE,{id:e.SHOE,label:"Shoe",fields:[l.get(e.SHOE_SIZE)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"})}),l.set(e.CHANNEL_ID,{id:e.CHANNEL_ID,label:"Channel",filterType:"checkbox",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"}),fetchAsyncFilterOptions:{URL:"/channels",labelProperty:"name",valueProperty:"id",fetcher:"fetcherV1"}}),s.set("channel",{id:"channel",label:"Store",fields:[l.get(e.CHANNEL_ID)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"fba"})}),l.set(e.PRODUCT_COUNT,{id:e.PRODUCT_COUNT,label:"Product count",filterType:"number_range",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"}),options:[{label:"Min",value:"0"},{label:"Max",value:"100"}]}),s.set(e.PRODUCT_COUNT,{id:e.PRODUCT_COUNT,label:"Product count",fields:[l.get(e.PRODUCT_COUNT)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"reports"})}),l.set(e.DUE_DATE,{id:e.DUE_DATE,label:"Due date",filterType:"date_range",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"}),options:[{label:"Today",value:"TODAY"},{label:"Yesterday",value:"YESTERDAY"},{label:"Last 7 days",value:"LAST_7_DAYS"},{label:"Last 30 days",value:"LAST_30_DAYS"},{label:"Last 90 days",value:"LAST_90_DAYS"},{label:"Last month",value:"LAST_MONTH"},{label:"Last 12 months",value:"LAST_12_MONTHS"},{label:"Week to date",value:"WEEK_TO_DATE"},{label:"Month to date",value:"MONTH_TO_DATE"},{label:"Year to date",value:"YEAR_TO_DATE"}]}),s.set("due",{id:"due",label:"Due",fields:[l.get(e.DUE_DATE)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"date"})}),l.set(e.MAX_PRODUCTS,{id:e.MAX_PRODUCTS,label:"Max products",filterType:"number",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"products"})}),s.set("max_count",{id:"max_count",label:"Max count",fields:[l.get(e.MAX_PRODUCTS)],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"reports"})}),{FIELDS_MAP:l,GROUP_MAP:s}},I=l=>{const s=E(),d={...i,...s,...l};T.BusinessLogicManager.setBusinessLogic(d)};exports.DATE_RANGE_FILTERS=r;exports.NUMBER_RANGE_FILTERS=_;exports.customAppBusinessLogic=i;exports.filterIds=e;exports.generateMockedFilterMaps=E;exports.setMockedBusinessLogic=I;
package/dist/index10.js CHANGED
@@ -1,41 +1,42 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { DATE_RANGE_OPTIONS as n, getDateRange as _, DateRanges as E } from "@veeqo/ui";
2
+ import { DATE_RANGE_OPTIONS as _, getDateRange as n, DateRanges as E } from "@veeqo/ui";
3
3
  import { SortingMode as i } from "./index2.js";
4
4
  import { BusinessLogicManager as d } from "./index9.js";
5
5
  import { VeeqoCommon as a } from "@veeqo/components";
6
6
  const e = {
7
7
  BRAND_IDS: "brand_ids",
8
8
  ORDER_NUMBER: "search.order_number",
9
+ ORDER_CODE: "search.order_code",
9
10
  SHOE_SIZE: "shoe_size",
10
11
  SHOE: "shoe",
11
12
  CHANNEL_ID: "channel_id",
12
13
  PRODUCT_COUNT: "product_count",
13
14
  DUE_DATE: "due_date",
14
15
  MAX_PRODUCTS: "max_products"
15
- }, T = [e.DUE_DATE], D = [e.PRODUCT_COUNT], p = "search.all", A = "sort", r = E.TODAY, c = _(r), u = n.find(
16
- ({ value: l }) => l === r
17
- ), O = "25", R = "1", S = "order", h = !1, b = 200, y = [10, 25, 50, 100], L = "page[number]", U = "page[size]", N = ["order_id", "shipping_rates", "package", "action"], m = ["price"], I = "api/v2/orders", g = i.MONOLITH, f = {
18
- DATE_RANGE_FILTERS: T,
16
+ }, D = [e.DUE_DATE], T = [e.PRODUCT_COUNT], p = "search.all", c = "sort", s = E.TODAY, A = n(s), O = _.find(
17
+ ({ value: l }) => l === s
18
+ ), R = "25", u = "1", h = "order", S = !1, b = 200, y = [10, 25, 50, 100], L = "page[number]", U = "page[size]", N = ["order_id", "shipping_rates", "package", "action"], g = ["price"], m = "api/v2/orders", I = i.MONOLITH, f = {
19
+ DATE_RANGE_FILTERS: D,
19
20
  SEARCH_FILTER_ID: p,
20
- SORT_FILTER_ID: A,
21
- NUMBER_RANGE_FILTERS: D,
22
- DEFAULT_DATE_SELECTION: r,
23
- DEFAULT_DATE_RANGE: c,
24
- DEFAULT_DATE_PRESET: u,
25
- DEFAULT_PAGE_SIZE: O,
26
- DEFAULT_PAGE_NUMBER: R,
27
- VIEW_TYPE: S,
28
- IS_VIEWS_READONLY: h,
21
+ SORT_FILTER_ID: c,
22
+ NUMBER_RANGE_FILTERS: T,
23
+ DEFAULT_DATE_SELECTION: s,
24
+ DEFAULT_DATE_RANGE: A,
25
+ DEFAULT_DATE_PRESET: O,
26
+ DEFAULT_PAGE_SIZE: R,
27
+ DEFAULT_PAGE_NUMBER: u,
28
+ VIEW_TYPE: h,
29
+ IS_VIEWS_READONLY: S,
29
30
  FILTERS_DEBOUCE_INTERVAL_MS: b,
30
31
  PAGE_SIZE_OPTIONS: y,
31
32
  PAGE_NUMBER_FILTER_ID: L,
32
33
  PAGE_SIZE_FILTER_ID: U,
33
34
  DEFAULT_VISIBLE_COLUMNS: N,
34
- DEFAULT_HIDDEN_COLUMNS: m,
35
- TABLE_DATA_URL: I,
36
- SORTING_MODE: g
35
+ DEFAULT_HIDDEN_COLUMNS: g,
36
+ TABLE_DATA_URL: m,
37
+ SORTING_MODE: I
37
38
  }, M = () => {
38
- const l = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
39
+ const l = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
39
40
  return l.set(e.BRAND_IDS, {
40
41
  id: e.BRAND_IDS,
41
42
  glyph: /* @__PURE__ */ t(a.Glyph, { name: "brand" }),
@@ -49,7 +50,7 @@ const e = {
49
50
  fetcher: "fetcherV1",
50
51
  baseProperty: "brands"
51
52
  }
52
- }), s.set("brand", {
53
+ }), r.set("brand", {
53
54
  id: "brand",
54
55
  label: "Brand",
55
56
  fields: [l.get(e.BRAND_IDS)],
@@ -60,10 +61,16 @@ const e = {
60
61
  filterType: "text",
61
62
  isFilterAllowed: !0,
62
63
  glyph: /* @__PURE__ */ t(a.Glyph, { name: "filter" })
63
- }), s.set("order", {
64
+ }), l.set(e.ORDER_CODE, {
65
+ id: e.ORDER_CODE,
66
+ label: "Order code",
67
+ filterType: "text",
68
+ isFilterAllowed: !0,
69
+ glyph: /* @__PURE__ */ t(a.Glyph, { name: "filter" })
70
+ }), r.set("order", {
64
71
  id: "order",
65
72
  label: "Order",
66
- fields: [l.get(e.ORDER_NUMBER)],
73
+ fields: [l.get(e.ORDER_NUMBER), l.get(e.ORDER_CODE)],
67
74
  glyph: /* @__PURE__ */ t(a.Glyph, { name: "product-menu" })
68
75
  }), l.set(e.SHOE_SIZE, {
69
76
  id: e.SHOE_SIZE,
@@ -93,7 +100,7 @@ const e = {
93
100
  value: "5"
94
101
  }
95
102
  ]
96
- }), s.set(e.SHOE, {
103
+ }), r.set(e.SHOE, {
97
104
  id: e.SHOE,
98
105
  label: "Shoe",
99
106
  fields: [l.get(e.SHOE_SIZE)],
@@ -110,7 +117,7 @@ const e = {
110
117
  valueProperty: "id",
111
118
  fetcher: "fetcherV1"
112
119
  }
113
- }), s.set("channel", {
120
+ }), r.set("channel", {
114
121
  id: "channel",
115
122
  label: "Store",
116
123
  fields: [l.get(e.CHANNEL_ID)],
@@ -131,7 +138,7 @@ const e = {
131
138
  value: "100"
132
139
  }
133
140
  ]
134
- }), s.set(e.PRODUCT_COUNT, {
141
+ }), r.set(e.PRODUCT_COUNT, {
135
142
  id: e.PRODUCT_COUNT,
136
143
  label: "Product count",
137
144
  fields: [l.get(e.PRODUCT_COUNT)],
@@ -184,7 +191,7 @@ const e = {
184
191
  value: "YEAR_TO_DATE"
185
192
  }
186
193
  ]
187
- }), s.set("due", {
194
+ }), r.set("due", {
188
195
  id: "due",
189
196
  label: "Due",
190
197
  fields: [l.get(e.DUE_DATE)],
@@ -195,19 +202,19 @@ const e = {
195
202
  filterType: "number",
196
203
  isFilterAllowed: !0,
197
204
  glyph: /* @__PURE__ */ t(a.Glyph, { name: "products" })
198
- }), s.set("max_count", {
205
+ }), r.set("max_count", {
199
206
  id: "max_count",
200
207
  label: "Max count",
201
208
  fields: [l.get(e.MAX_PRODUCTS)],
202
209
  glyph: /* @__PURE__ */ t(a.Glyph, { name: "reports" })
203
- }), { FIELDS_MAP: l, GROUP_MAP: s };
210
+ }), { FIELDS_MAP: l, GROUP_MAP: r };
204
211
  }, B = (l) => {
205
- const s = M(), o = { ...f, ...s, ...l };
212
+ const r = M(), o = { ...f, ...r, ...l };
206
213
  d.setBusinessLogic(o);
207
214
  };
208
215
  export {
209
- T as DATE_RANGE_FILTERS,
210
- D as NUMBER_RANGE_FILTERS,
216
+ D as DATE_RANGE_FILTERS,
217
+ T as NUMBER_RANGE_FILTERS,
211
218
  f as customAppBusinessLogic,
212
219
  e as filterIds,
213
220
  M as generateMockedFilterMaps,
package/dist/index100.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("@veeqo/ui"),r=({shouldShow:a,viewName:n,onCancel:t,onDelete:o})=>e.jsx(i.Modal,{headerTitle:`Delete '${n}' view?`,"data-testid":"act-react-listing-custom-confirmation-popup",variant:"sm",shouldShow:a,onClose:t,rightActions:[{className:"act-react-listing-custom-confirmation-popup-cancel",label:"Cancel",onClick:t,variant:"default"},{className:"act-react-listing-custom-confirmation-popup-delete",label:"Delete",onClick:o,variant:"primaryDestructive"}],showHeaderCloseButton:!0,children:e.jsx(i.Text,{variant:"body",children:"This cannot be undone."})});exports.Confirmation=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=(t,r)=>{if(!r)return t;const i=r.toLowerCase();return t.filter(e=>{var s,a;return((s=e==null?void 0:e.title)==null?void 0:s.toLowerCase().includes(i))||((a=e==null?void 0:e.id)==null?void 0:a.toLowerCase().includes(i))})};exports.filterColumnsBySearch=d;
package/dist/index100.js CHANGED
@@ -1,31 +1,13 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { Modal as n, Text as r } from "@veeqo/ui";
3
- const s = ({ shouldShow: a, viewName: i, onCancel: t, onDelete: o }) => /* @__PURE__ */ e(
4
- n,
5
- {
6
- headerTitle: `Delete '${i}' view?`,
7
- "data-testid": "act-react-listing-custom-confirmation-popup",
8
- variant: "sm",
9
- shouldShow: a,
10
- onClose: t,
11
- rightActions: [
12
- {
13
- className: "act-react-listing-custom-confirmation-popup-cancel",
14
- label: "Cancel",
15
- onClick: t,
16
- variant: "default"
17
- },
18
- {
19
- className: "act-react-listing-custom-confirmation-popup-delete",
20
- label: "Delete",
21
- onClick: o,
22
- variant: "primaryDestructive"
23
- }
24
- ],
25
- showHeaderCloseButton: !0,
26
- children: /* @__PURE__ */ e(r, { variant: "body", children: "This cannot be undone." })
27
- }
28
- );
1
+ const a = (t, r) => {
2
+ if (!r) return t;
3
+ const i = r.toLowerCase();
4
+ return t.filter(
5
+ (e) => {
6
+ var s, C;
7
+ return ((s = e == null ? void 0 : e.title) == null ? void 0 : s.toLowerCase().includes(i)) || ((C = e == null ? void 0 : e.id) == null ? void 0 : C.toLowerCase().includes(i));
8
+ }
9
+ );
10
+ };
29
11
  export {
30
- s as Confirmation
12
+ a as filterColumnsBySearch
31
13
  };