@veeqo/transfigure 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BusinessLogic/mocks.d.ts +10 -0
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +88 -78
- package/dist/index100.cjs +19 -1
- package/dist/index100.js +24 -33
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +12 -26
- package/dist/index102.cjs +1 -12
- package/dist/index102.js +21 -16
- package/dist/index103.cjs +1 -19
- package/dist/index103.js +38 -24
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +29 -21
- package/dist/index105.cjs +12 -1
- package/dist/index105.js +16 -15
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +19 -2
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +7 -18
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +63 -7
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +26 -60
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +2 -30
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +2 -2
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +36 -35
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +11 -10
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +46 -44
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +202 -201
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +41 -29
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +1 -1
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +1 -1
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +7 -7
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +7 -13
- package/dist/index92.cjs +1 -104
- package/dist/index92.js +13 -120
- package/dist/index93.cjs +104 -1
- package/dist/index93.js +117 -65
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +63 -24
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +29 -2
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +2 -41
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +39 -9
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +10 -6
- package/dist/mobx/Filters/Filters.d.ts +1 -1
- package/dist/storybookHelpers/apiMocks/views/custom_views.d.ts +45 -4
- package/package.json +5 -2
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { BusinessLogicType } from './types';
|
|
2
2
|
import { Filter, FilterGroupType } from '../types';
|
|
3
|
+
export declare const filterIds: {
|
|
4
|
+
BRAND_IDS: string;
|
|
5
|
+
ORDER_NUMBER: string;
|
|
6
|
+
SHOE_SIZE: string;
|
|
7
|
+
SHOE: string;
|
|
8
|
+
CHANNEL_ID: string;
|
|
9
|
+
PRODUCT_COUNT: string;
|
|
10
|
+
DUE_DATE: string;
|
|
11
|
+
MAX_PRODUCTS: string;
|
|
12
|
+
};
|
|
3
13
|
export declare const DATE_RANGE_FILTERS: string[];
|
|
4
14
|
export declare const NUMBER_RANGE_FILTERS: string[];
|
|
5
15
|
export declare const customAppBusinessLogic: Omit<BusinessLogicType, 'FIELDS_MAP' | 'GROUP_MAP'>;
|
package/dist/index10.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
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;
|
package/dist/index10.js
CHANGED
|
@@ -1,35 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { DATE_RANGE_OPTIONS as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { DATE_RANGE_OPTIONS as n, getDateRange as _, DateRanges as E } from "@veeqo/ui";
|
|
3
3
|
import { SortingMode as i } from "./index2.js";
|
|
4
|
-
import { BusinessLogicManager as
|
|
5
|
-
import { VeeqoCommon as
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
import { BusinessLogicManager as d } from "./index9.js";
|
|
5
|
+
import { VeeqoCommon as a } from "@veeqo/components";
|
|
6
|
+
const e = {
|
|
7
|
+
BRAND_IDS: "brand_ids",
|
|
8
|
+
ORDER_NUMBER: "search.order_number",
|
|
9
|
+
SHOE_SIZE: "shoe_size",
|
|
10
|
+
SHOE: "shoe",
|
|
11
|
+
CHANNEL_ID: "channel_id",
|
|
12
|
+
PRODUCT_COUNT: "product_count",
|
|
13
|
+
DUE_DATE: "due_date",
|
|
14
|
+
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,
|
|
19
|
+
SEARCH_FILTER_ID: p,
|
|
20
|
+
SORT_FILTER_ID: A,
|
|
21
|
+
NUMBER_RANGE_FILTERS: D,
|
|
13
22
|
DEFAULT_DATE_SELECTION: r,
|
|
14
|
-
DEFAULT_DATE_RANGE:
|
|
15
|
-
DEFAULT_DATE_PRESET:
|
|
16
|
-
DEFAULT_PAGE_SIZE:
|
|
17
|
-
DEFAULT_PAGE_NUMBER:
|
|
18
|
-
VIEW_TYPE:
|
|
19
|
-
IS_VIEWS_READONLY:
|
|
20
|
-
FILTERS_DEBOUCE_INTERVAL_MS:
|
|
21
|
-
PAGE_SIZE_OPTIONS:
|
|
22
|
-
PAGE_NUMBER_FILTER_ID:
|
|
23
|
-
PAGE_SIZE_FILTER_ID:
|
|
24
|
-
DEFAULT_VISIBLE_COLUMNS:
|
|
25
|
-
DEFAULT_HIDDEN_COLUMNS:
|
|
26
|
-
TABLE_DATA_URL:
|
|
27
|
-
SORTING_MODE:
|
|
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,
|
|
29
|
+
FILTERS_DEBOUCE_INTERVAL_MS: b,
|
|
30
|
+
PAGE_SIZE_OPTIONS: y,
|
|
31
|
+
PAGE_NUMBER_FILTER_ID: L,
|
|
32
|
+
PAGE_SIZE_FILTER_ID: U,
|
|
33
|
+
DEFAULT_VISIBLE_COLUMNS: N,
|
|
34
|
+
DEFAULT_HIDDEN_COLUMNS: m,
|
|
35
|
+
TABLE_DATA_URL: I,
|
|
36
|
+
SORTING_MODE: g
|
|
28
37
|
}, M = () => {
|
|
29
|
-
const
|
|
30
|
-
return
|
|
31
|
-
id:
|
|
32
|
-
glyph: /* @__PURE__ */
|
|
38
|
+
const l = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
39
|
+
return l.set(e.BRAND_IDS, {
|
|
40
|
+
id: e.BRAND_IDS,
|
|
41
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "brand" }),
|
|
33
42
|
label: "Brand",
|
|
34
43
|
filterType: "checkbox",
|
|
35
44
|
isFilterAllowed: !0,
|
|
@@ -40,28 +49,28 @@ const c = ["due_date"], p = ["product_count"], u = "filter[search]", E = "sort",
|
|
|
40
49
|
fetcher: "fetcherV1",
|
|
41
50
|
baseProperty: "brands"
|
|
42
51
|
}
|
|
43
|
-
}),
|
|
52
|
+
}), s.set("brand", {
|
|
44
53
|
id: "brand",
|
|
45
54
|
label: "Brand",
|
|
46
|
-
fields: [
|
|
47
|
-
glyph: /* @__PURE__ */
|
|
48
|
-
}),
|
|
49
|
-
id:
|
|
55
|
+
fields: [l.get(e.BRAND_IDS)],
|
|
56
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "brand" })
|
|
57
|
+
}), l.set(e.ORDER_NUMBER, {
|
|
58
|
+
id: e.ORDER_NUMBER,
|
|
50
59
|
label: "Order number",
|
|
51
60
|
filterType: "text",
|
|
52
61
|
isFilterAllowed: !0,
|
|
53
|
-
glyph: /* @__PURE__ */
|
|
54
|
-
}),
|
|
62
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "filter" })
|
|
63
|
+
}), s.set("order", {
|
|
55
64
|
id: "order",
|
|
56
65
|
label: "Order",
|
|
57
|
-
fields: [
|
|
58
|
-
glyph: /* @__PURE__ */
|
|
59
|
-
}),
|
|
60
|
-
id:
|
|
66
|
+
fields: [l.get(e.ORDER_NUMBER)],
|
|
67
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "product-menu" })
|
|
68
|
+
}), l.set(e.SHOE_SIZE, {
|
|
69
|
+
id: e.SHOE_SIZE,
|
|
61
70
|
label: "Shoe size",
|
|
62
71
|
filterType: "radio",
|
|
63
72
|
isFilterAllowed: !0,
|
|
64
|
-
glyph: /* @__PURE__ */
|
|
73
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "filter" }),
|
|
65
74
|
options: [
|
|
66
75
|
{
|
|
67
76
|
label: "One",
|
|
@@ -84,34 +93,34 @@ const c = ["due_date"], p = ["product_count"], u = "filter[search]", E = "sort",
|
|
|
84
93
|
value: "5"
|
|
85
94
|
}
|
|
86
95
|
]
|
|
87
|
-
}),
|
|
88
|
-
id:
|
|
96
|
+
}), s.set(e.SHOE, {
|
|
97
|
+
id: e.SHOE,
|
|
89
98
|
label: "Shoe",
|
|
90
|
-
fields: [
|
|
91
|
-
glyph: /* @__PURE__ */
|
|
92
|
-
}),
|
|
93
|
-
id:
|
|
99
|
+
fields: [l.get(e.SHOE_SIZE)],
|
|
100
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "filter" })
|
|
101
|
+
}), l.set(e.CHANNEL_ID, {
|
|
102
|
+
id: e.CHANNEL_ID,
|
|
94
103
|
label: "Channel",
|
|
95
104
|
filterType: "checkbox",
|
|
96
105
|
isFilterAllowed: !0,
|
|
97
|
-
glyph: /* @__PURE__ */
|
|
106
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "filter" }),
|
|
98
107
|
fetchAsyncFilterOptions: {
|
|
99
108
|
URL: "/channels",
|
|
100
109
|
labelProperty: "name",
|
|
101
110
|
valueProperty: "id",
|
|
102
111
|
fetcher: "fetcherV1"
|
|
103
112
|
}
|
|
104
|
-
}),
|
|
113
|
+
}), s.set("channel", {
|
|
105
114
|
id: "channel",
|
|
106
115
|
label: "Store",
|
|
107
|
-
fields: [
|
|
108
|
-
glyph: /* @__PURE__ */
|
|
109
|
-
}),
|
|
110
|
-
id:
|
|
116
|
+
fields: [l.get(e.CHANNEL_ID)],
|
|
117
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "fba" })
|
|
118
|
+
}), l.set(e.PRODUCT_COUNT, {
|
|
119
|
+
id: e.PRODUCT_COUNT,
|
|
111
120
|
label: "Product count",
|
|
112
121
|
filterType: "number_range",
|
|
113
122
|
isFilterAllowed: !0,
|
|
114
|
-
glyph: /* @__PURE__ */
|
|
123
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "filter" }),
|
|
115
124
|
options: [
|
|
116
125
|
{
|
|
117
126
|
label: "Min",
|
|
@@ -122,17 +131,17 @@ const c = ["due_date"], p = ["product_count"], u = "filter[search]", E = "sort",
|
|
|
122
131
|
value: "100"
|
|
123
132
|
}
|
|
124
133
|
]
|
|
125
|
-
}),
|
|
126
|
-
id:
|
|
134
|
+
}), s.set(e.PRODUCT_COUNT, {
|
|
135
|
+
id: e.PRODUCT_COUNT,
|
|
127
136
|
label: "Product count",
|
|
128
|
-
fields: [
|
|
129
|
-
glyph: /* @__PURE__ */
|
|
130
|
-
}),
|
|
131
|
-
id:
|
|
137
|
+
fields: [l.get(e.PRODUCT_COUNT)],
|
|
138
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "reports" })
|
|
139
|
+
}), l.set(e.DUE_DATE, {
|
|
140
|
+
id: e.DUE_DATE,
|
|
132
141
|
label: "Due date",
|
|
133
142
|
filterType: "date_range",
|
|
134
143
|
isFilterAllowed: !0,
|
|
135
|
-
glyph: /* @__PURE__ */
|
|
144
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "filter" }),
|
|
136
145
|
options: [
|
|
137
146
|
{
|
|
138
147
|
label: "Today",
|
|
@@ -175,31 +184,32 @@ const c = ["due_date"], p = ["product_count"], u = "filter[search]", E = "sort",
|
|
|
175
184
|
value: "YEAR_TO_DATE"
|
|
176
185
|
}
|
|
177
186
|
]
|
|
178
|
-
}),
|
|
187
|
+
}), s.set("due", {
|
|
179
188
|
id: "due",
|
|
180
189
|
label: "Due",
|
|
181
|
-
fields: [
|
|
182
|
-
glyph: /* @__PURE__ */
|
|
183
|
-
}),
|
|
184
|
-
id:
|
|
190
|
+
fields: [l.get(e.DUE_DATE)],
|
|
191
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "date" })
|
|
192
|
+
}), l.set(e.MAX_PRODUCTS, {
|
|
193
|
+
id: e.MAX_PRODUCTS,
|
|
185
194
|
label: "Max products",
|
|
186
195
|
filterType: "number",
|
|
187
196
|
isFilterAllowed: !0,
|
|
188
|
-
glyph: /* @__PURE__ */
|
|
189
|
-
}),
|
|
197
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "products" })
|
|
198
|
+
}), s.set("max_count", {
|
|
190
199
|
id: "max_count",
|
|
191
200
|
label: "Max count",
|
|
192
|
-
fields: [
|
|
193
|
-
glyph: /* @__PURE__ */
|
|
194
|
-
}), { FIELDS_MAP:
|
|
195
|
-
},
|
|
196
|
-
const
|
|
197
|
-
|
|
201
|
+
fields: [l.get(e.MAX_PRODUCTS)],
|
|
202
|
+
glyph: /* @__PURE__ */ t(a.Glyph, { name: "reports" })
|
|
203
|
+
}), { FIELDS_MAP: l, GROUP_MAP: s };
|
|
204
|
+
}, B = (l) => {
|
|
205
|
+
const s = M(), o = { ...f, ...s, ...l };
|
|
206
|
+
d.setBusinessLogic(o);
|
|
198
207
|
};
|
|
199
208
|
export {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
209
|
+
T as DATE_RANGE_FILTERS,
|
|
210
|
+
D as NUMBER_RANGE_FILTERS,
|
|
211
|
+
f as customAppBusinessLogic,
|
|
212
|
+
e as filterIds,
|
|
203
213
|
M as generateMockedFilterMaps,
|
|
204
|
-
|
|
214
|
+
B as setMockedBusinessLogic
|
|
205
215
|
};
|
package/dist/index100.cjs
CHANGED
|
@@ -1 +1,19 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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/index100.js
CHANGED
|
@@ -1,35 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
revalidateOnReconnect: !1,
|
|
23
|
-
keepPreviousData: !0
|
|
24
|
-
}
|
|
25
|
-
), o = t == null ? void 0 : t.meta;
|
|
26
|
-
return {
|
|
27
|
-
viewCounts: (i = o == null ? void 0 : o.page) == null ? void 0 : i.total_count,
|
|
28
|
-
error: l,
|
|
29
|
-
isLoadingViewCounts: L,
|
|
30
|
-
mutate: d
|
|
31
|
-
};
|
|
32
|
-
};
|
|
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
|
+
}
|
|
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
|
+
`;
|
|
33
22
|
export {
|
|
34
|
-
|
|
23
|
+
l as Divider,
|
|
24
|
+
n as Item,
|
|
25
|
+
a as MenuItems
|
|
35
26
|
};
|
package/dist/index101.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const 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/index101.js
CHANGED
|
@@ -1,31 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
|
|
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
5
|
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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." })
|
|
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
|
+
}
|
|
27
13
|
}
|
|
28
14
|
);
|
|
29
15
|
export {
|
|
30
|
-
|
|
16
|
+
h as LegacySortableViews
|
|
31
17
|
};
|
package/dist/index102.cjs
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
padding: 8px;
|
|
5
|
-
padding-left: 35px;
|
|
6
|
-
margin: 8px;
|
|
7
|
-
background-color: ${t.theme.colors.neutral.grey.lightest};
|
|
8
|
-
`,l=r.default.hr`
|
|
9
|
-
width: 100%;
|
|
10
|
-
border-top: 1px solid ${t.theme.colors.neutral.grey.dark};
|
|
11
|
-
margin: 0 0 4px 0;
|
|
12
|
-
`;exports.Divider=l;exports.FixedViews=d;
|
|
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/index102.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import r from "
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+
] }) }) });
|
|
15
21
|
export {
|
|
16
|
-
|
|
17
|
-
d as FixedViews
|
|
22
|
+
b as DraftPill
|
|
18
23
|
};
|
package/dist/index103.cjs
CHANGED
|
@@ -1,19 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),R=require("swr"),m=require("qs"),E=require("./index61.cjs"),F=require("./index8.cjs"),P=require("./index62.cjs"),S=require("./index55.cjs"),c=e=>e&&e.__esModule?e:{default:e},V=c(R),i=c(m),h=()=>{var n;const{Filters:{queryParams:e}}=E.useStores(),{TABLE_DATA_URL:l,PAGE_NUMBER_FILTER_ID:o,PAGE_SIZE_FILTER_ID:r}=F.useBusinessLogic(),{isLoading:d}=P.useViews(),_=w.useMemo(()=>{const u={...i.default.parse(e),[o]:"1",[r]:"1"};return i.default.stringify(u,{arrayFormat:"brackets"})},[e,o,r]),f=!d?`${l}?${_}`:null,{data:s,error:L,isLoading:g,mutate:q}=V.default([f,{includeMeta:!0}],([a,u])=>S.fetcherV2(a,u),{revalidateOnFocus:!1,revalidateOnReconnect:!1,keepPreviousData:!0}),t=s==null?void 0:s.meta;return{viewCounts:(n=t==null?void 0:t.page)==null?void 0:n.total_count,error:L,isLoadingViewCounts:g,mutate:q}};exports.useViewCounts=h;
|
package/dist/index103.js
CHANGED
|
@@ -1,26 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { useMemo as _ } from "react";
|
|
2
|
+
import g from "swr";
|
|
3
|
+
import u from "qs";
|
|
4
|
+
import { useStores as w } from "./index61.js";
|
|
5
|
+
import { useBusinessLogic as E } from "./index8.js";
|
|
6
|
+
import { useViews as F } from "./index62.js";
|
|
7
|
+
import { fetcherV2 as R } from "./index55.js";
|
|
8
|
+
const T = () => {
|
|
9
|
+
var n;
|
|
10
|
+
const { Filters: { queryParams: s } } = w(), { TABLE_DATA_URL: c, PAGE_NUMBER_FILTER_ID: r, PAGE_SIZE_FILTER_ID: i } = E(), { isLoading: m } = F(), d = _(() => {
|
|
11
|
+
const t = {
|
|
12
|
+
...u.parse(s),
|
|
13
|
+
[r]: "1",
|
|
14
|
+
[i]: "1"
|
|
15
|
+
};
|
|
16
|
+
return u.stringify(t, { arrayFormat: "brackets" });
|
|
17
|
+
}, [s, r, i]), p = !m ? `${c}?${d}` : null, {
|
|
18
|
+
data: e,
|
|
19
|
+
error: f,
|
|
20
|
+
isLoading: l,
|
|
21
|
+
mutate: L
|
|
22
|
+
} = g(
|
|
23
|
+
[p, { includeMeta: !0 }],
|
|
24
|
+
([a, t]) => R(a, t),
|
|
25
|
+
{
|
|
26
|
+
revalidateOnFocus: !1,
|
|
27
|
+
revalidateOnReconnect: !1,
|
|
28
|
+
keepPreviousData: !0
|
|
29
|
+
}
|
|
30
|
+
), o = e == null ? void 0 : e.meta;
|
|
31
|
+
return {
|
|
32
|
+
viewCounts: (n = o == null ? void 0 : o.page) == null ? void 0 : n.total_count,
|
|
33
|
+
error: f,
|
|
34
|
+
isLoadingViewCounts: l,
|
|
35
|
+
mutate: L
|
|
36
|
+
};
|
|
37
|
+
};
|
|
22
38
|
export {
|
|
23
|
-
|
|
24
|
-
n as Item,
|
|
25
|
-
a as MenuItems
|
|
39
|
+
T as useViewCounts
|
|
26
40
|
};
|
package/dist/index104.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),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;
|
package/dist/index104.js
CHANGED
|
@@ -1,23 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
+
);
|
|
21
29
|
export {
|
|
22
|
-
|
|
30
|
+
s as Confirmation
|
|
23
31
|
};
|