@veeqo/transfigure 1.2.1 → 1.2.3

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 (64) hide show
  1. package/dist/BusinessLogic/types.d.ts +1 -0
  2. package/dist/components/Views/ViewList/ViewsList.d.ts +5 -1
  3. package/dist/index10.cjs +1 -1
  4. package/dist/index10.js +14 -13
  5. package/dist/index103.cjs +19 -1
  6. package/dist/index103.js +23 -14
  7. package/dist/index104.cjs +1 -1
  8. package/dist/index104.js +21 -24
  9. package/dist/index105.cjs +1 -1
  10. package/dist/index105.js +15 -7
  11. package/dist/index106.cjs +1 -1
  12. package/dist/index106.js +1 -1
  13. package/dist/index11.cjs +1 -1
  14. package/dist/index11.js +1 -1
  15. package/dist/index113.cjs +1 -1
  16. package/dist/index113.js +32 -22
  17. package/dist/index114.cjs +1 -1
  18. package/dist/index114.js +22 -32
  19. package/dist/index115.cjs +1 -7
  20. package/dist/index115.js +63 -10
  21. package/dist/index116.cjs +7 -1
  22. package/dist/index116.js +10 -63
  23. package/dist/index22.cjs +1 -1
  24. package/dist/index22.js +1 -1
  25. package/dist/index31.cjs +1 -1
  26. package/dist/index31.js +1 -1
  27. package/dist/index34.cjs +1 -1
  28. package/dist/index34.js +1 -1
  29. package/dist/index36.cjs +1 -1
  30. package/dist/index36.js +62 -60
  31. package/dist/index39.cjs +1 -1
  32. package/dist/index39.js +1 -1
  33. package/dist/index40.cjs +1 -1
  34. package/dist/index40.js +1 -1
  35. package/dist/index41.cjs +1 -1
  36. package/dist/index41.js +1 -1
  37. package/dist/index44.cjs +1 -1
  38. package/dist/index44.js +36 -34
  39. package/dist/index46.cjs +1 -1
  40. package/dist/index46.js +2 -2
  41. package/dist/index47.cjs +1 -1
  42. package/dist/index47.js +2 -2
  43. package/dist/index56.cjs +1 -1
  44. package/dist/index56.js +71 -71
  45. package/dist/index63.cjs +1 -1
  46. package/dist/index63.js +39 -38
  47. package/dist/index80.cjs +1 -1
  48. package/dist/index80.js +1 -1
  49. package/dist/index86.cjs +1 -1
  50. package/dist/index86.js +5 -41
  51. package/dist/index87.cjs +1 -1
  52. package/dist/index87.js +41 -9
  53. package/dist/index88.cjs +1 -1
  54. package/dist/index88.js +8 -117
  55. package/dist/index89.cjs +1 -1
  56. package/dist/index89.js +117 -18
  57. package/dist/index90.cjs +1 -1
  58. package/dist/index90.js +19 -5
  59. package/dist/index98.cjs +1 -19
  60. package/dist/index98.js +7 -24
  61. package/dist/index99.cjs +1 -1
  62. package/dist/index99.js +24 -21
  63. package/dist/storybookHelpers/Code.d.ts +3 -0
  64. package/package.json +1 -1
@@ -14,6 +14,7 @@ export type BusinessLogicType = {
14
14
  DEFAULT_PAGE_SIZE: string;
15
15
  DEFAULT_PAGE_NUMBER: string;
16
16
  VIEW_TYPE: 'order' | 'inventory' | 'catalog';
17
+ IS_VIEWS_READONLY: boolean;
17
18
  FIELDS_MAP: Map<string, Filter>;
18
19
  GROUP_MAP: Map<string, FilterGroupType>;
19
20
  FILTERS_DEBOUCE_INTERVAL_MS: number;
@@ -1 +1,5 @@
1
- export declare const ViewList: () => JSX.Element;
1
+ type ViewListProps = {
2
+ className?: string;
3
+ };
4
+ export declare const ViewList: ({ className }: ViewListProps) => JSX.Element;
5
+ export {};
package/dist/index10.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("@veeqo/ui"),_=require("./index2.cjs"),u=require("./index9.cjs"),o=require("@veeqo/components"),n=["due_date"],r=["product_count"],p="filter[search]",m="sort",a=s.DateRanges.TODAY,E=s.getDateRange(a),T=s.DATE_RANGE_OPTIONS.find(({value:e})=>e===a),A="25",b="1",h="order",y=200,g=[10,25,50,100],L="page[number]",D="page[size]",S=["order_id","shipping_rates","package","action"],R=["price"],M="api/v2/orders",F=_.SortingMode.MONOLITH,i={DATE_RANGE_FILTERS:n,SEARCH_FILTER_ID:p,SORT_FILTER_ID:m,NUMBER_RANGE_FILTERS:r,DEFAULT_DATE_SELECTION:a,DEFAULT_DATE_RANGE:E,DEFAULT_DATE_PRESET:T,DEFAULT_PAGE_SIZE:A,DEFAULT_PAGE_NUMBER:b,VIEW_TYPE:h,FILTERS_DEBOUCE_INTERVAL_MS:y,PAGE_SIZE_OPTIONS:g,PAGE_NUMBER_FILTER_ID:L,PAGE_SIZE_FILTER_ID:D,DEFAULT_VISIBLE_COLUMNS:S,DEFAULT_HIDDEN_COLUMNS:R,TABLE_DATA_URL:M,SORTING_MODE:F},d=()=>{const e=new Map,l=new Map;return e.set("brand_ids[]",{id:"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"}}),l.set("brand",{id:"brand",label:"Brand",fields:[e.get("brand_ids[]")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"brand"})}),e.set("order_number",{id:"order_number",label:"Order number",filterType:"text",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"})}),l.set("order",{id:"order",label:"Order",fields:[e.get("order_number")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"product-menu"})}),e.set("shoe_size",{id:"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"}]}),l.set("shoe",{id:"shoe",label:"Shoe",fields:[e.get("shoe_size")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"})}),e.set("channel_id",{id:"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"}}),l.set("channel",{id:"channel",label:"Store",fields:[e.get("channel_id")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"fba"})}),e.set("product_count",{id:"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"}]}),l.set("product_count",{id:"product_count",label:"Product count",fields:[e.get("product_count")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"reports"})}),e.set("due_date",{id:"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"}]}),l.set("due",{id:"due",label:"Due",fields:[e.get("due_date")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"date"})}),e.set("max_products",{id:"max_products",label:"Max products",filterType:"number",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"products"})}),l.set("max_count",{id:"max_count",label:"Max count",fields:[e.get("max_products")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"reports"})}),{FIELDS_MAP:e,GROUP_MAP:l}},f=e=>{const l=d(),c={...i,...l,...e};u.BusinessLogicManager.setBusinessLogic(c)};exports.DATE_RANGE_FILTERS=n;exports.NUMBER_RANGE_FILTERS=r;exports.customAppBusinessLogic=i;exports.generateMockedFilterMaps=d;exports.setMockedBusinessLogic=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("@veeqo/ui"),_=require("./index2.cjs"),u=require("./index9.cjs"),o=require("@veeqo/components"),n=["due_date"],r=["product_count"],p="filter[search]",E="sort",a=s.DateRanges.TODAY,m=s.getDateRange(a),T=s.DATE_RANGE_OPTIONS.find(({value:e})=>e===a),A="25",b="1",h="order",y=!1,g=200,L=[10,25,50,100],S="page[number]",D="page[size]",R=["order_id","shipping_rates","package","action"],M=["price"],f="api/v2/orders",F=_.SortingMode.MONOLITH,i={DATE_RANGE_FILTERS:n,SEARCH_FILTER_ID:p,SORT_FILTER_ID:E,NUMBER_RANGE_FILTERS:r,DEFAULT_DATE_SELECTION:a,DEFAULT_DATE_RANGE:m,DEFAULT_DATE_PRESET:T,DEFAULT_PAGE_SIZE:A,DEFAULT_PAGE_NUMBER:b,VIEW_TYPE:h,IS_VIEWS_READONLY:y,FILTERS_DEBOUCE_INTERVAL_MS:g,PAGE_SIZE_OPTIONS:L,PAGE_NUMBER_FILTER_ID:S,PAGE_SIZE_FILTER_ID:D,DEFAULT_VISIBLE_COLUMNS:R,DEFAULT_HIDDEN_COLUMNS:M,TABLE_DATA_URL:f,SORTING_MODE:F},d=()=>{const e=new Map,l=new Map;return e.set("brand_ids[]",{id:"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"}}),l.set("brand",{id:"brand",label:"Brand",fields:[e.get("brand_ids[]")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"brand"})}),e.set("order_number",{id:"order_number",label:"Order number",filterType:"text",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"})}),l.set("order",{id:"order",label:"Order",fields:[e.get("order_number")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"product-menu"})}),e.set("shoe_size",{id:"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"}]}),l.set("shoe",{id:"shoe",label:"Shoe",fields:[e.get("shoe_size")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"filter"})}),e.set("channel_id",{id:"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"}}),l.set("channel",{id:"channel",label:"Store",fields:[e.get("channel_id")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"fba"})}),e.set("product_count",{id:"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"}]}),l.set("product_count",{id:"product_count",label:"Product count",fields:[e.get("product_count")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"reports"})}),e.set("due_date",{id:"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"}]}),l.set("due",{id:"due",label:"Due",fields:[e.get("due_date")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"date"})}),e.set("max_products",{id:"max_products",label:"Max products",filterType:"number",isFilterAllowed:!0,glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"products"})}),l.set("max_count",{id:"max_count",label:"Max count",fields:[e.get("max_products")],glyph:t.jsx(o.VeeqoCommon.Glyph,{name:"reports"})}),{FIELDS_MAP:e,GROUP_MAP:l}},I=e=>{const l=d(),c={...i,...l,...e};u.BusinessLogicManager.setBusinessLogic(c)};exports.DATE_RANGE_FILTERS=n;exports.NUMBER_RANGE_FILTERS=r;exports.customAppBusinessLogic=i;exports.generateMockedFilterMaps=d;exports.setMockedBusinessLogic=I;
package/dist/index10.js CHANGED
@@ -5,7 +5,7 @@ import { BusinessLogicManager as _ } from "./index9.js";
5
5
  import { VeeqoCommon as t } from "@veeqo/components";
6
6
  const c = ["due_date"], p = ["product_count"], u = "filter[search]", E = "sort", r = d.TODAY, T = n(r), h = s.find(
7
7
  ({ value: e }) => e === r
8
- ), b = "25", A = "1", y = "order", m = 200, L = [10, 25, 50, 100], g = "page[number]", D = "page[size]", f = ["order_id", "shipping_rates", "package", "action"], S = ["price"], F = "api/v2/orders", O = i.MONOLITH, R = {
8
+ ), b = "25", A = "1", y = "order", m = !1, L = 200, g = [10, 25, 50, 100], D = "page[number]", f = "page[size]", S = ["order_id", "shipping_rates", "package", "action"], F = ["price"], O = "api/v2/orders", R = i.MONOLITH, I = {
9
9
  DATE_RANGE_FILTERS: c,
10
10
  SEARCH_FILTER_ID: u,
11
11
  SORT_FILTER_ID: E,
@@ -16,14 +16,15 @@ const c = ["due_date"], p = ["product_count"], u = "filter[search]", E = "sort",
16
16
  DEFAULT_PAGE_SIZE: b,
17
17
  DEFAULT_PAGE_NUMBER: A,
18
18
  VIEW_TYPE: y,
19
- FILTERS_DEBOUCE_INTERVAL_MS: m,
20
- PAGE_SIZE_OPTIONS: L,
21
- PAGE_NUMBER_FILTER_ID: g,
22
- PAGE_SIZE_FILTER_ID: D,
23
- DEFAULT_VISIBLE_COLUMNS: f,
24
- DEFAULT_HIDDEN_COLUMNS: S,
25
- TABLE_DATA_URL: F,
26
- SORTING_MODE: O
19
+ IS_VIEWS_READONLY: m,
20
+ FILTERS_DEBOUCE_INTERVAL_MS: L,
21
+ PAGE_SIZE_OPTIONS: g,
22
+ PAGE_NUMBER_FILTER_ID: D,
23
+ PAGE_SIZE_FILTER_ID: f,
24
+ DEFAULT_VISIBLE_COLUMNS: S,
25
+ DEFAULT_HIDDEN_COLUMNS: F,
26
+ TABLE_DATA_URL: O,
27
+ SORTING_MODE: R
27
28
  }, M = () => {
28
29
  const e = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
29
30
  return e.set("brand_ids[]", {
@@ -191,14 +192,14 @@ const c = ["due_date"], p = ["product_count"], u = "filter[search]", E = "sort",
191
192
  fields: [e.get("max_products")],
192
193
  glyph: /* @__PURE__ */ l(t.Glyph, { name: "reports" })
193
194
  }), { FIELDS_MAP: e, GROUP_MAP: a };
194
- }, U = (e) => {
195
- const a = M(), o = { ...R, ...a, ...e };
195
+ }, x = (e) => {
196
+ const a = M(), o = { ...I, ...a, ...e };
196
197
  _.setBusinessLogic(o);
197
198
  };
198
199
  export {
199
200
  c as DATE_RANGE_FILTERS,
200
201
  p as NUMBER_RANGE_FILTERS,
201
- R as customAppBusinessLogic,
202
+ I as customAppBusinessLogic,
202
203
  M as generateMockedFilterMaps,
203
- U as setMockedBusinessLogic
204
+ x as setMockedBusinessLogic
204
205
  };
package/dist/index103.cjs CHANGED
@@ -1 +1,19 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),l=require("./index112.cjs"),o=e=>i.jsx(l.StyledSortableViews,{...e,onChange:t=>{t.filter(r=>{var n;return(n=r.children)==null?void 0:n.length}).length||e.onChange(t)}});exports.LegacySortableViews=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),e=require("@veeqo/ui"),s=t=>t&&t.__esModule?t:{default:t},o=s(r),i=o.default(e.Button).attrs(()=>({role:"option",variant:"flat"}))`
2
+ margin: ${e.theme.sizes.xs};
3
+ min-width: 180px;
4
+ justify-content: flex-start;
5
+ font-size: ${e.theme.text.body.fontSize};
6
+
7
+ &:hover {
8
+ background-color: ${e.theme.colors.neutral.grey.lightest};
9
+ color: ${e.theme.colors.secondary.blue.base};
10
+ cursor: pointer;
11
+ }
12
+ `,n=o.default(e.Card.Surface).attrs(()=>({role:"listbox",elevation:4}))`
13
+ margin-top: ${e.theme.sizes.xs};
14
+ background-color: white;
15
+ `,l=o.default.hr`
16
+ width: 100%;
17
+ border-top: 1px solid ${e.theme.colors.neutral.grey.dark};
18
+ margin: 0;
19
+ `;exports.Divider=l;exports.Item=i;exports.MenuItems=n;
package/dist/index103.js CHANGED
@@ -1,17 +1,26 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { StyledSortableViews as i } from "./index112.js";
3
- const h = (e) => /* @__PURE__ */ o(
4
- i,
5
- {
6
- ...e,
7
- onChange: (t) => {
8
- t.filter((n) => {
9
- var r;
10
- return (r = n.children) == null ? void 0 : r.length;
11
- }).length || e.onChange(t);
12
- }
1
+ import t from "styled-components";
2
+ import { theme as o, Card as r, Button as e } from "@veeqo/ui";
3
+ const n = t(e).attrs(() => ({ role: "option", variant: "flat" }))`
4
+ margin: ${o.sizes.xs};
5
+ min-width: 180px;
6
+ justify-content: flex-start;
7
+ font-size: ${o.text.body.fontSize};
8
+
9
+ &:hover {
10
+ background-color: ${o.colors.neutral.grey.lightest};
11
+ color: ${o.colors.secondary.blue.base};
12
+ cursor: pointer;
13
13
  }
14
- );
14
+ `, a = t(r.Surface).attrs(() => ({ role: "listbox", elevation: 4 }))`
15
+ margin-top: ${o.sizes.xs};
16
+ background-color: white;
17
+ `, l = t.hr`
18
+ width: 100%;
19
+ border-top: 1px solid ${o.colors.neutral.grey.dark};
20
+ margin: 0;
21
+ `;
15
22
  export {
16
- h as LegacySortableViews
23
+ l as Divider,
24
+ n as Item,
25
+ a as MenuItems
17
26
  };
package/dist/index104.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),n=require("react"),l=require("./index115.cjs"),v=({children:i,style:o,className:c})=>{const r=n.useRef(null),[u,f]=n.useState(0);return n.useEffect(()=>{const e=r.current,s=()=>{if(e){const{top:a}=e.getBoundingClientRect();f(a)}};s();const t=new ResizeObserver(s);return e&&t.observe(e),()=>{e&&t.unobserve(e),t.disconnect()}},[]),d.jsx(l.AdaptiveStyledContainer,{style:o,className:c,offset:u,ref:r,children:i})};exports.AdaptiveHeightContainer=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@veeqo/ui"),i=require("./index106.cjs"),n=r.theme.colors.secondary.blue.base,a=({onClick:t})=>e.jsx(i.Notification,{children:e.jsx(i.Pill,{children:e.jsxs(r.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(i.Glyph,{ariaLabel:"info",name:"info",color:n}),e.jsxs(i.Wrap,{children:[e.jsx(i.Text,{variant:"body",margin:"0 4px 0 0",children:"You are currently in a"}),e.jsx(i.Bold,{variant:"bodyBoldDark",children:"draft view"}),e.jsx(i.Hint,{variant:"hintText",children:"Apply filters and save these by creating a custom view"})]}),e.jsx(i.Button,{variant:"primary",onClick:t,size:"sm",children:"Create view"})]})})});exports.DraftPill=a;
package/dist/index104.js CHANGED
@@ -1,26 +1,23 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { useRef as a, useState as d, useEffect as m } from "react";
3
- import { AdaptiveStyledContainer as v } from "./index115.js";
4
- const R = ({
5
- children: o,
6
- style: s,
7
- className: f
8
- }) => {
9
- const r = a(null), [i, c] = d(0);
10
- return m(() => {
11
- const e = r.current, n = () => {
12
- if (e) {
13
- const { top: u } = e.getBoundingClientRect();
14
- c(u);
15
- }
16
- };
17
- n();
18
- const t = new ResizeObserver(n);
19
- return e && t.observe(e), () => {
20
- e && t.unobserve(e), t.disconnect();
21
- };
22
- }, []), /* @__PURE__ */ p(v, { style: s, className: f, offset: i, ref: r, children: o });
23
- };
1
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
+ import { Stack as a, theme as n } from "@veeqo/ui";
3
+ import { Notification as t, Pill as o, Glyph as l, Wrap as c, Text as d, Bold as s, Hint as h, Button as m } from "./index106.js";
4
+ const p = n.colors.secondary.blue.base, b = ({ onClick: e }) => /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(o, { children: /* @__PURE__ */ i(a, { direction: "horizontal", alignY: "center", children: [
5
+ /* @__PURE__ */ r(l, { ariaLabel: "info", name: "info", color: p }),
6
+ /* @__PURE__ */ i(c, { children: [
7
+ /* @__PURE__ */ r(d, { variant: "body", margin: "0 4px 0 0", children: "You are currently in a" }),
8
+ /* @__PURE__ */ r(s, { variant: "bodyBoldDark", children: "draft view" }),
9
+ /* @__PURE__ */ r(h, { variant: "hintText", children: "Apply filters and save these by creating a custom view" })
10
+ ] }),
11
+ /* @__PURE__ */ r(
12
+ m,
13
+ {
14
+ variant: "primary",
15
+ onClick: e,
16
+ size: "sm",
17
+ children: "Create view"
18
+ }
19
+ )
20
+ ] }) }) });
24
21
  export {
25
- R as AdaptiveHeightContainer
22
+ b as DraftPill
26
23
  };
package/dist/index105.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index79.cjs"),e=i.createAllView(),t={fixedViews:[e],customViews:[],viewsMap:new Map([[e.id,e]])};exports.INITIAL_VIEWS_STATE=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),l=require("./index112.cjs"),o=e=>i.jsx(l.StyledSortableViews,{...e,onChange:t=>{t.filter(r=>{var n;return(n=r.children)==null?void 0:n.length}).length||e.onChange(t)}});exports.LegacySortableViews=o;
package/dist/index105.js CHANGED
@@ -1,9 +1,17 @@
1
- import { createAllView as i } from "./index79.js";
2
- const e = i(), s = {
3
- fixedViews: [e],
4
- customViews: [],
5
- viewsMap: /* @__PURE__ */ new Map([[e.id, e]])
6
- };
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { StyledSortableViews as i } from "./index112.js";
3
+ const h = (e) => /* @__PURE__ */ o(
4
+ i,
5
+ {
6
+ ...e,
7
+ onChange: (t) => {
8
+ t.filter((n) => {
9
+ var r;
10
+ return (r = n.children) == null ? void 0 : r.length;
11
+ }).length || e.onChange(t);
12
+ }
13
+ }
14
+ );
7
15
  export {
8
- s as INITIAL_VIEWS_STATE
16
+ h as LegacySortableViews
9
17
  };
package/dist/index106.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),t=require("@veeqo/ui"),r=require("@veeqo/components"),l=require("framer-motion"),s=require("./index113.cjs"),c=e=>e&&e.__esModule?e:{default:e},o=c(a),{Glyph:i}=r.VeeqoCommon,d=o.default(l.motion(t.BaseContainer)).attrs(()=>({variants:s.notificationVariants,initial:"initial",animate:"animate",exit:"exit"}))`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),t=require("@veeqo/ui"),r=require("@veeqo/components"),l=require("framer-motion"),s=require("./index114.cjs"),c=e=>e&&e.__esModule?e:{default:e},o=c(a),{Glyph:i}=r.VeeqoCommon,d=o.default(l.motion(t.BaseContainer)).attrs(()=>({variants:s.notificationVariants,initial:"initial",animate:"animate",exit:"exit"}))`
2
2
  display: flex;
3
3
  position: fixed;
4
4
  width: 100vw;
package/dist/index106.js CHANGED
@@ -2,7 +2,7 @@ import t from "styled-components";
2
2
  import { BaseContainer as n, theme as i, Text as e, Banner as a, Button as l } from "@veeqo/ui";
3
3
  import { VeeqoCommon as s } from "@veeqo/components";
4
4
  import { motion as c } from "framer-motion";
5
- import { notificationVariants as p } from "./index113.js";
5
+ import { notificationVariants as p } from "./index114.js";
6
6
  const { Glyph: x } = s, u = t(c(n)).attrs(() => ({
7
7
  variants: p,
8
8
  initial: "initial",
package/dist/index11.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("react"),t=require("@veeqo/ui"),h=require("pluralize"),m=require("./index90.cjs"),f=e=>e&&e.__esModule?e:{default:e},w=f(h),S=({children:e,totalCount:i,selectedCount:o,itemLabel:r="item"})=>{const[l,c]=p.useState(!1),n=o>0,a=n?o:i,d=w.default(r,a),u=`Actions will apply to ${n?`${o} selected`:`${i} filtered`} ${d}`;return s.jsxs(t.Dropdown,{id:"actions-dropdown",ctaProps:{children:"Actions",variant:"primary",size:"sm"},shouldShow:l,setShouldShow:c,style:{padding:t.theme.sizes.none,minWidth:"300px"},children:[s.jsx("div",{className:m.default.actionsHeaderContainer,children:s.jsx(t.MiniAlert,{title:u,variant:"default",customIconColour:t.theme.colors.secondary.blue.base})}),e]})};exports.ActionsDropdown=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("react"),t=require("@veeqo/ui"),h=require("pluralize"),m=require("./index86.cjs"),f=e=>e&&e.__esModule?e:{default:e},w=f(h),S=({children:e,totalCount:i,selectedCount:o,itemLabel:r="item"})=>{const[l,c]=p.useState(!1),n=o>0,a=n?o:i,d=w.default(r,a),u=`Actions will apply to ${n?`${o} selected`:`${i} filtered`} ${d}`;return s.jsxs(t.Dropdown,{id:"actions-dropdown",ctaProps:{children:"Actions",variant:"primary",size:"sm"},shouldShow:l,setShouldShow:c,style:{padding:t.theme.sizes.none,minWidth:"300px"},children:[s.jsx("div",{className:m.default.actionsHeaderContainer,children:s.jsx(t.MiniAlert,{title:u,variant:"default",customIconColour:t.theme.colors.secondary.blue.base})}),e]})};exports.ActionsDropdown=S;
package/dist/index11.js CHANGED
@@ -2,7 +2,7 @@ import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
2
  import { useState as p } from "react";
3
3
  import { Dropdown as h, theme as e, MiniAlert as u } from "@veeqo/ui";
4
4
  import f from "pluralize";
5
- import w from "./index90.js";
5
+ import w from "./index86.js";
6
6
  const b = ({ children: s, totalCount: t, selectedCount: o, itemLabel: n = "item" }) => {
7
7
  const [l, a] = p(!1), i = o > 0, c = f(n, i ? o : t), d = `Actions will apply to ${i ? `${o} selected` : `${t} filtered`} ${c}`;
8
8
  return /* @__PURE__ */ m(
package/dist/index113.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={initial:{opacity:0,y:50,scale:.95},animate:{opacity:1,y:0,scale:1,transition:{duration:.2,ease:"easeOut"}},exit:{opacity:0,y:20,scale:.95,transition:{duration:.2,ease:"easeIn"}}};exports.notificationVariants=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@veeqo/ui"),o=require("@material-ui/core/styles"),t=require("@material-ui/core/Slider"),l=e=>e&&e.__esModule?e:{default:e},i=l(t),a=o.withStyles({root:{color:r.theme.colors.secondary.blue.base,height:4},thumb:{height:20,width:20,backgroundColor:"#fff",border:"3px solid currentColor",marginTop:-8,marginLeft:-10,"&:focus, &:hover, &$active":{boxShadow:"inherit"}},valueLabel:{left:"calc(-50% - 1px)"},track:{height:4,borderRadius:4,backgroundColor:r.theme.colors.secondary.blue.light,opacity:1},rail:{height:4,borderRadius:4,backgroundColor:r.theme.colors.neutral.grey.dark,opacity:1}})(i.default);exports.MUISlider=a;
package/dist/index113.js CHANGED
@@ -1,28 +1,38 @@
1
- const a = {
2
- initial: {
3
- opacity: 0,
4
- y: 50,
5
- scale: 0.95
1
+ import { theme as o } from "@veeqo/ui";
2
+ import { withStyles as r } from "@material-ui/core/styles";
3
+ import e from "@material-ui/core/Slider";
4
+ const l = r({
5
+ root: {
6
+ color: o.colors.secondary.blue.base,
7
+ height: 4
6
8
  },
7
- animate: {
8
- opacity: 1,
9
- y: 0,
10
- scale: 1,
11
- transition: {
12
- duration: 0.2,
13
- ease: "easeOut"
9
+ thumb: {
10
+ height: 20,
11
+ width: 20,
12
+ backgroundColor: "#fff",
13
+ border: "3px solid currentColor",
14
+ marginTop: -8,
15
+ marginLeft: -10,
16
+ "&:focus, &:hover, &$active": {
17
+ boxShadow: "inherit"
14
18
  }
15
19
  },
16
- exit: {
17
- opacity: 0,
18
- y: 20,
19
- scale: 0.95,
20
- transition: {
21
- duration: 0.2,
22
- ease: "easeIn"
23
- }
20
+ valueLabel: {
21
+ left: "calc(-50% - 1px)"
22
+ },
23
+ track: {
24
+ height: 4,
25
+ borderRadius: 4,
26
+ backgroundColor: o.colors.secondary.blue.light,
27
+ opacity: 1
28
+ },
29
+ rail: {
30
+ height: 4,
31
+ borderRadius: 4,
32
+ backgroundColor: o.colors.neutral.grey.dark,
33
+ opacity: 1
24
34
  }
25
- };
35
+ })(e);
26
36
  export {
27
- a as notificationVariants
37
+ l as MUISlider
28
38
  };
package/dist/index114.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@veeqo/ui"),o=require("@material-ui/core/styles"),t=require("@material-ui/core/Slider"),l=e=>e&&e.__esModule?e:{default:e},i=l(t),a=o.withStyles({root:{color:r.theme.colors.secondary.blue.base,height:4},thumb:{height:20,width:20,backgroundColor:"#fff",border:"3px solid currentColor",marginTop:-8,marginLeft:-10,"&:focus, &:hover, &$active":{boxShadow:"inherit"}},valueLabel:{left:"calc(-50% - 1px)"},track:{height:4,borderRadius:4,backgroundColor:r.theme.colors.secondary.blue.light,opacity:1},rail:{height:4,borderRadius:4,backgroundColor:r.theme.colors.neutral.grey.dark,opacity:1}})(i.default);exports.MUISlider=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={initial:{opacity:0,y:50,scale:.95},animate:{opacity:1,y:0,scale:1,transition:{duration:.2,ease:"easeOut"}},exit:{opacity:0,y:20,scale:.95,transition:{duration:.2,ease:"easeIn"}}};exports.notificationVariants=t;
package/dist/index114.js CHANGED
@@ -1,38 +1,28 @@
1
- import { theme as o } from "@veeqo/ui";
2
- import { withStyles as r } from "@material-ui/core/styles";
3
- import e from "@material-ui/core/Slider";
4
- const l = r({
5
- root: {
6
- color: o.colors.secondary.blue.base,
7
- height: 4
1
+ const a = {
2
+ initial: {
3
+ opacity: 0,
4
+ y: 50,
5
+ scale: 0.95
8
6
  },
9
- thumb: {
10
- height: 20,
11
- width: 20,
12
- backgroundColor: "#fff",
13
- border: "3px solid currentColor",
14
- marginTop: -8,
15
- marginLeft: -10,
16
- "&:focus, &:hover, &$active": {
17
- boxShadow: "inherit"
7
+ animate: {
8
+ opacity: 1,
9
+ y: 0,
10
+ scale: 1,
11
+ transition: {
12
+ duration: 0.2,
13
+ ease: "easeOut"
18
14
  }
19
15
  },
20
- valueLabel: {
21
- left: "calc(-50% - 1px)"
22
- },
23
- track: {
24
- height: 4,
25
- borderRadius: 4,
26
- backgroundColor: o.colors.secondary.blue.light,
27
- opacity: 1
28
- },
29
- rail: {
30
- height: 4,
31
- borderRadius: 4,
32
- backgroundColor: o.colors.neutral.grey.dark,
33
- opacity: 1
16
+ exit: {
17
+ opacity: 0,
18
+ y: 20,
19
+ scale: 0.95,
20
+ transition: {
21
+ duration: 0.2,
22
+ ease: "easeIn"
23
+ }
34
24
  }
35
- })(e);
25
+ };
36
26
  export {
37
- l as MUISlider
27
+ a as notificationVariants
38
28
  };
package/dist/index115.cjs CHANGED
@@ -1,7 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("styled-components"),e=require("@veeqo/ui"),a=t=>t&&t.__esModule?t:{default:t},i=a(o),s=i.default(e.BaseContainer)`
2
- padding: ${e.theme.sizes.sm};
3
- // This calculation limits the height to a max of 100% of the viewport and uses offset as the position of the CTA button
4
- // with an additional sizes.base offset at the bottom.
5
- max-height: calc(100vh ${({offset:t})=>t&&`- ${t}px`} - ${e.theme.sizes.base});
6
- overflow-y: auto;
7
- `;exports.AdaptiveStyledContainer=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("mobx-react"),l=require("@veeqo/ui"),v=require("./index113.cjs"),y=p.observer(({data:m,editedValue:t,setEditedValue:c})=>{var b;if(!((b=m.options)!=null&&b.length))return null;const[u,x]=m.options,i=Number(u.value),a=Number(x.value),h=(s,n)=>{if(!Array.isArray(n)||n.length!==2||!t)return;const[e,j]=n,g=t==null?void 0:t.clone();g.setGte(e),g.setLte(j),c(g)},o={gte:(t==null?void 0:t.gte)||0,lte:(t==null?void 0:t.lte)||100},M=s=>{if(!t)return;const n=t.clone(),e=Number(s);e>n.lteMax||(e>=n.gteMin&&e<=n.lteMax&&n.setGte(e),(!n.lte||e>=n.lte)&&n.setLte(n.lteMax),c(n))},f=s=>{if(!t)return;const n=t.clone(),e=Number(s);e<n.gteMin||(e>=n.gteMin&&e<=n.lteMax&&n.setLte(e),(!n.gte||e<=n.gte)&&n.setGte(n.gteMin),c(n))},S=[o.gte,o.lte];return r.jsxs(l.Stack,{spacing:"xs",alignX:"stretch",children:[r.jsxs(l.Stack,{direction:"horizontal",children:[r.jsx(l.TextField,{label:u.label,type:"number",min:i,max:a,value:o.gte.toString(),onChange:M}),r.jsx(l.TextField,{label:x.label,type:"number",min:i,max:a,value:o.lte.toString(),onChange:f})]}),r.jsx(v.MUISlider,{value:S,onChange:h,min:i,max:a,valueLabelDisplay:"auto"})]})});exports.FilterNumberRangeFilter=y;
package/dist/index115.js CHANGED
@@ -1,12 +1,65 @@
1
- import o from "styled-components";
2
- import { theme as e, BaseContainer as i } from "@veeqo/ui";
3
- const h = o(i)`
4
- padding: ${e.sizes.sm};
5
- // This calculation limits the height to a max of 100% of the viewport and uses offset as the position of the CTA button
6
- // with an additional sizes.base offset at the bottom.
7
- max-height: calc(100vh ${({ offset: t }) => t && `- ${t}px`} - ${e.sizes.base});
8
- overflow-y: auto;
9
- `;
1
+ import { jsxs as b, jsx as a } from "react/jsx-runtime";
2
+ import { observer as N } from "mobx-react";
3
+ import { Stack as h, TextField as u } from "@veeqo/ui";
4
+ import { MUISlider as L } from "./index113.js";
5
+ const j = N(
6
+ ({ data: g, editedValue: t, setEditedValue: l }) => {
7
+ var f;
8
+ if (!((f = g.options) != null && f.length)) return null;
9
+ const [i, x] = g.options, s = Number(i.value), c = Number(x.value), p = (e, n) => {
10
+ if (!Array.isArray(n) || n.length !== 2 || !t) return;
11
+ const [r, y] = n, m = t == null ? void 0 : t.clone();
12
+ m.setGte(r), m.setLte(y), l(m);
13
+ }, o = {
14
+ gte: (t == null ? void 0 : t.gte) || 0,
15
+ lte: (t == null ? void 0 : t.lte) || 100
16
+ }, M = (e) => {
17
+ if (!t) return;
18
+ const n = t.clone(), r = Number(e);
19
+ r > n.lteMax || (r >= n.gteMin && r <= n.lteMax && n.setGte(r), (!n.lte || r >= n.lte) && n.setLte(n.lteMax), l(n));
20
+ }, v = (e) => {
21
+ if (!t) return;
22
+ const n = t.clone(), r = Number(e);
23
+ r < n.gteMin || (r >= n.gteMin && r <= n.lteMax && n.setLte(r), (!n.gte || r <= n.gte) && n.setGte(n.gteMin), l(n));
24
+ }, C = [o.gte, o.lte];
25
+ return /* @__PURE__ */ b(h, { spacing: "xs", alignX: "stretch", children: [
26
+ /* @__PURE__ */ b(h, { direction: "horizontal", children: [
27
+ /* @__PURE__ */ a(
28
+ u,
29
+ {
30
+ label: i.label,
31
+ type: "number",
32
+ min: s,
33
+ max: c,
34
+ value: o.gte.toString(),
35
+ onChange: M
36
+ }
37
+ ),
38
+ /* @__PURE__ */ a(
39
+ u,
40
+ {
41
+ label: x.label,
42
+ type: "number",
43
+ min: s,
44
+ max: c,
45
+ value: o.lte.toString(),
46
+ onChange: v
47
+ }
48
+ )
49
+ ] }),
50
+ /* @__PURE__ */ a(
51
+ L,
52
+ {
53
+ value: C,
54
+ onChange: p,
55
+ min: s,
56
+ max: c,
57
+ valueLabelDisplay: "auto"
58
+ }
59
+ )
60
+ ] });
61
+ }
62
+ );
10
63
  export {
11
- h as AdaptiveStyledContainer
64
+ j as FilterNumberRangeFilter
12
65
  };
package/dist/index116.cjs CHANGED
@@ -1 +1,7 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("mobx-react"),l=require("@veeqo/ui"),v=require("./index114.cjs"),y=p.observer(({data:m,editedValue:t,setEditedValue:c})=>{var b;if(!((b=m.options)!=null&&b.length))return null;const[u,x]=m.options,i=Number(u.value),a=Number(x.value),h=(s,n)=>{if(!Array.isArray(n)||n.length!==2||!t)return;const[e,j]=n,g=t==null?void 0:t.clone();g.setGte(e),g.setLte(j),c(g)},o={gte:(t==null?void 0:t.gte)||0,lte:(t==null?void 0:t.lte)||100},M=s=>{if(!t)return;const n=t.clone(),e=Number(s);e>n.lteMax||(e>=n.gteMin&&e<=n.lteMax&&n.setGte(e),(!n.lte||e>=n.lte)&&n.setLte(n.lteMax),c(n))},f=s=>{if(!t)return;const n=t.clone(),e=Number(s);e<n.gteMin||(e>=n.gteMin&&e<=n.lteMax&&n.setLte(e),(!n.gte||e<=n.gte)&&n.setGte(n.gteMin),c(n))},S=[o.gte,o.lte];return r.jsxs(l.Stack,{spacing:"xs",alignX:"stretch",children:[r.jsxs(l.Stack,{direction:"horizontal",children:[r.jsx(l.TextField,{label:u.label,type:"number",min:i,max:a,value:o.gte.toString(),onChange:M}),r.jsx(l.TextField,{label:x.label,type:"number",min:i,max:a,value:o.lte.toString(),onChange:f})]}),r.jsx(v.MUISlider,{value:S,onChange:h,min:i,max:a,valueLabelDisplay:"auto"})]})});exports.FilterNumberRangeFilter=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("styled-components"),e=require("@veeqo/ui"),a=t=>t&&t.__esModule?t:{default:t},i=a(o),s=i.default(e.BaseContainer)`
2
+ padding: ${e.theme.sizes.sm};
3
+ // This calculation limits the height to a max of 100% of the viewport and uses offset as the position of the CTA button
4
+ // with an additional sizes.base offset at the bottom.
5
+ max-height: calc(100vh ${({offset:t})=>t&&`- ${t}px`} - ${e.theme.sizes.base});
6
+ overflow-y: auto;
7
+ `;exports.AdaptiveStyledContainer=s;
package/dist/index116.js CHANGED
@@ -1,65 +1,12 @@
1
- import { jsxs as b, jsx as a } from "react/jsx-runtime";
2
- import { observer as N } from "mobx-react";
3
- import { Stack as h, TextField as u } from "@veeqo/ui";
4
- import { MUISlider as L } from "./index114.js";
5
- const j = N(
6
- ({ data: g, editedValue: t, setEditedValue: l }) => {
7
- var f;
8
- if (!((f = g.options) != null && f.length)) return null;
9
- const [i, x] = g.options, s = Number(i.value), c = Number(x.value), p = (e, n) => {
10
- if (!Array.isArray(n) || n.length !== 2 || !t) return;
11
- const [r, y] = n, m = t == null ? void 0 : t.clone();
12
- m.setGte(r), m.setLte(y), l(m);
13
- }, o = {
14
- gte: (t == null ? void 0 : t.gte) || 0,
15
- lte: (t == null ? void 0 : t.lte) || 100
16
- }, M = (e) => {
17
- if (!t) return;
18
- const n = t.clone(), r = Number(e);
19
- r > n.lteMax || (r >= n.gteMin && r <= n.lteMax && n.setGte(r), (!n.lte || r >= n.lte) && n.setLte(n.lteMax), l(n));
20
- }, v = (e) => {
21
- if (!t) return;
22
- const n = t.clone(), r = Number(e);
23
- r < n.gteMin || (r >= n.gteMin && r <= n.lteMax && n.setLte(r), (!n.gte || r <= n.gte) && n.setGte(n.gteMin), l(n));
24
- }, C = [o.gte, o.lte];
25
- return /* @__PURE__ */ b(h, { spacing: "xs", alignX: "stretch", children: [
26
- /* @__PURE__ */ b(h, { direction: "horizontal", children: [
27
- /* @__PURE__ */ a(
28
- u,
29
- {
30
- label: i.label,
31
- type: "number",
32
- min: s,
33
- max: c,
34
- value: o.gte.toString(),
35
- onChange: M
36
- }
37
- ),
38
- /* @__PURE__ */ a(
39
- u,
40
- {
41
- label: x.label,
42
- type: "number",
43
- min: s,
44
- max: c,
45
- value: o.lte.toString(),
46
- onChange: v
47
- }
48
- )
49
- ] }),
50
- /* @__PURE__ */ a(
51
- L,
52
- {
53
- value: C,
54
- onChange: p,
55
- min: s,
56
- max: c,
57
- valueLabelDisplay: "auto"
58
- }
59
- )
60
- ] });
61
- }
62
- );
1
+ import o from "styled-components";
2
+ import { theme as e, BaseContainer as i } from "@veeqo/ui";
3
+ const h = o(i)`
4
+ padding: ${e.sizes.sm};
5
+ // This calculation limits the height to a max of 100% of the viewport and uses offset as the position of the CTA button
6
+ // with an additional sizes.base offset at the bottom.
7
+ max-height: calc(100vh ${({ offset: t }) => t && `- ${t}px`} - ${e.sizes.base});
8
+ overflow-y: auto;
9
+ `;
63
10
  export {
64
- j as FilterNumberRangeFilter
11
+ h as AdaptiveStyledContainer
65
12
  };
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("./index69.cjs"),R=require("./index116.cjs"),v=require("./index61.cjs"),N=require("./index24.cjs"),q=require("./index25.cjs"),A=d.observer(({filterData:t})=>{const{Filters:{numberRangeFilters:u,clearNumberRangeFilter:a,setNumberRangeFilter:g}}=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 F=()=>{a(t.id)},b=()=>{!e||!n||g({numberRange:e,lte:n.lte,gte:n.gte})};return i.jsx(l.FilterTag,{shouldCloseOnClickAway:!0,header:i.jsx(q.ActiveFilterHeader,{filterLabel:t.label,glyph:t.glyph}),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:F,applyActiveFilter:b})})});exports.ActiveFilterNumberRangeTag=A;
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("./index69.cjs"),R=require("./index115.cjs"),v=require("./index61.cjs"),N=require("./index24.cjs"),q=require("./index25.cjs"),A=d.observer(({filterData:t})=>{const{Filters:{numberRangeFilters:u,clearNumberRangeFilter:a,setNumberRangeFilter:g}}=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 F=()=>{a(t.id)},b=()=>{!e||!n||g({numberRange:e,lte:n.lte,gte:n.gte})};return i.jsx(l.FilterTag,{shouldCloseOnClickAway:!0,header:i.jsx(q.ActiveFilterHeader,{filterLabel:t.label,glyph:t.glyph}),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:F,applyActiveFilter:b})})});exports.ActiveFilterNumberRangeTag=A;
package/dist/index22.js CHANGED
@@ -3,7 +3,7 @@ import { useState as a, useCallback as d, 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 "./index69.js";
6
- import { FilterNumberRangeFilter as h } from "./index116.js";
6
+ import { FilterNumberRangeFilter as h } from "./index115.js";
7
7
  import { useStores as v } from "./index61.js";
8
8
  import { ActiveFilterFooter as A } from "./index24.js";
9
9
  import { ActiveFilterHeader as w } from "./index25.js";