@veeqo/transfigure 0.0.1 → 0.0.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 (150) hide show
  1. package/README.md +2 -53
  2. package/dist/BusinessLogic/mocks.d.ts +3 -3
  3. package/dist/BusinessLogic/types.d.ts +3 -2
  4. package/dist/components/Filters/ActiveFilters/Categories/index.d.ts +2 -0
  5. package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncCheckboxFilter/ActiveAsyncCheckboxFilter.d.ts +8 -0
  6. package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncCheckboxFilter/index.d.ts +1 -0
  7. package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncRadioFilter/ActiveAsyncRadioFilter.d.ts +8 -0
  8. package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncRadioFilter/index.d.ts +1 -0
  9. package/dist/components/Filters/{Fields → ActiveFilters/Variants/ActiveFilterNumberRangeTag}/FilterNumberRangeFilter/FilterNumberRangeFilter.d.ts +1 -1
  10. package/dist/components/Filters/ActiveFilters/Variants/index.d.ts +5 -0
  11. package/dist/components/Filters/ActiveFilters/index.d.ts +2 -3
  12. package/dist/components/Filters/Fields/index.d.ts +0 -6
  13. package/dist/components/Filters/{Fields/FilterGroup → FilterGroup}/FilterGroup.d.ts +1 -1
  14. package/dist/components/Filters/FilterGroup/index.d.ts +1 -0
  15. package/dist/components/Filters/index.d.ts +1 -0
  16. package/dist/components/TableControls/TableControls.d.ts +1 -0
  17. package/dist/components/TableControls/index.d.ts +1 -0
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.js +75 -75
  21. package/dist/index10.js +3 -12
  22. package/dist/index11.cjs +1 -1
  23. package/dist/index11.js +19 -19
  24. package/dist/index12.cjs +1 -1
  25. package/dist/index12.js +42 -21
  26. package/dist/index13.cjs +1 -1
  27. package/dist/index13.js +23 -38
  28. package/dist/index14.cjs +1 -1
  29. package/dist/index14.js +39 -37
  30. package/dist/index15.cjs +1 -1
  31. package/dist/index15.js +36 -54
  32. package/dist/index16.cjs +1 -1
  33. package/dist/index16.js +32 -46
  34. package/dist/index17.cjs +1 -1
  35. package/dist/index17.js +50 -42
  36. package/dist/index18.cjs +1 -1
  37. package/dist/index18.js +39 -50
  38. package/dist/index19.cjs +1 -1
  39. package/dist/index19.js +59 -37
  40. package/dist/index20.cjs +1 -1
  41. package/dist/index20.js +53 -37
  42. package/dist/index21.cjs +1 -1
  43. package/dist/index21.js +45 -53
  44. package/dist/index22.cjs +1 -1
  45. package/dist/index22.js +43 -33
  46. package/dist/index23.cjs +1 -1
  47. package/dist/index23.js +56 -57
  48. package/dist/index24.cjs +1 -1
  49. package/dist/index24.js +57 -18
  50. package/dist/index25.cjs +1 -1
  51. package/dist/index25.js +38 -31
  52. package/dist/index26.cjs +1 -1
  53. package/dist/index26.js +55 -39
  54. package/dist/index27.cjs +1 -1
  55. package/dist/index27.js +52 -34
  56. package/dist/index28.cjs +1 -1
  57. package/dist/index28.js +81 -47
  58. package/dist/index29.cjs +1 -1
  59. package/dist/index29.js +36 -107
  60. package/dist/index3.js +1 -3
  61. package/dist/index30.cjs +1 -1
  62. package/dist/index30.js +31 -31
  63. package/dist/index31.cjs +1 -1
  64. package/dist/index31.js +10 -30
  65. package/dist/index32.cjs +1 -1
  66. package/dist/index32.js +40 -14
  67. package/dist/index33.js +49 -48
  68. package/dist/index34.js +12 -11
  69. package/dist/index35.js +104 -39
  70. package/dist/index36.cjs +1 -1
  71. package/dist/index36.js +47 -24
  72. package/dist/index37.cjs +1 -1
  73. package/dist/index37.js +43 -22
  74. package/dist/index38.cjs +1 -1
  75. package/dist/index38.js +22 -27
  76. package/dist/index39.cjs +1 -1
  77. package/dist/index39.js +67 -26
  78. package/dist/index4.js +1 -8
  79. package/dist/index40.js +71 -21
  80. package/dist/index41.cjs +1 -1
  81. package/dist/index41.js +31 -18
  82. package/dist/index42.js +2 -8
  83. package/dist/index43.js +13 -1
  84. package/dist/index45.js +14 -12
  85. package/dist/index48.js +1 -3
  86. package/dist/index5.js +2 -9
  87. package/dist/index50.js +3 -12
  88. package/dist/index51.js +8 -42
  89. package/dist/index52.js +20 -35
  90. package/dist/index53.js +16 -25
  91. package/dist/index54.js +18 -27
  92. package/dist/index55.js +31 -36
  93. package/dist/index57.js +22 -32
  94. package/dist/index58.js +14 -15
  95. package/dist/index59.js +2 -10
  96. package/dist/index6.js +8 -40
  97. package/dist/index60.cjs +1 -1
  98. package/dist/index60.js +226 -209
  99. package/dist/index61.js +5 -9
  100. package/dist/index62.js +3 -9
  101. package/dist/index65.js +1 -6
  102. package/dist/index66.js +1 -4
  103. package/dist/index67.js +1 -3
  104. package/dist/index69.js +28 -23
  105. package/dist/index75.cjs +1 -1
  106. package/dist/index75.js +2 -4
  107. package/dist/index76.js +26 -16
  108. package/dist/index77.cjs +1 -19
  109. package/dist/index77.js +14 -29
  110. package/dist/index78.cjs +19 -1
  111. package/dist/index78.js +24 -16
  112. package/dist/index79.cjs +1 -1
  113. package/dist/index79.js +22 -9
  114. package/dist/index80.cjs +78 -10
  115. package/dist/index80.js +92 -13
  116. package/dist/index81.cjs +10 -78
  117. package/dist/index81.js +13 -94
  118. package/dist/index83.cjs +1 -80
  119. package/dist/index83.js +35 -96
  120. package/dist/index84.cjs +1 -1
  121. package/dist/index84.js +62 -35
  122. package/dist/index85.js +1 -3
  123. package/dist/index86.cjs +80 -7
  124. package/dist/index86.js +93 -10
  125. package/dist/index87.cjs +7 -0
  126. package/dist/index87.js +12 -0
  127. package/dist/index9.cjs +1 -1
  128. package/dist/index9.js +99 -84
  129. package/dist/mobx/Filters/Filters.d.ts +5 -0
  130. package/dist/mocks/internal/mockUseStores/index.d.ts +1 -0
  131. package/dist/mocks/internal/mockUseStores/mockUseStores.d.ts +6 -0
  132. package/dist/types.d.ts +1 -1
  133. package/package.json +4 -5
  134. package/dist/components/Filters/Fields/AsyncInlineCheckboxFilter/AsyncInlineCheckboxFilter.d.ts +0 -8
  135. package/dist/components/Filters/Fields/AsyncInlineCheckboxFilter/index.d.ts +0 -1
  136. package/dist/components/Filters/Fields/AsyncInlineRadioFilter/AsyncInlineRadioFilter.d.ts +0 -8
  137. package/dist/components/Filters/Fields/AsyncInlineRadioFilter/index.d.ts +0 -1
  138. package/dist/components/Filters/Fields/FilterGroup/index.d.ts +0 -1
  139. package/dist/components/Table/Table.d.ts +0 -1
  140. /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterArrayField/FilterArrayField.d.ts +0 -0
  141. /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterArrayField/index.d.ts +0 -0
  142. /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterField/FilterField.d.ts +0 -0
  143. /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterField/index.d.ts +0 -0
  144. /package/dist/components/Filters/ActiveFilters/{ActiveFilterArrayTag → Variants/ActiveFilterArrayTag}/ActiveFilterArrayTag.d.ts +0 -0
  145. /package/dist/components/Filters/ActiveFilters/{ActiveFilterArrayTag → Variants/ActiveFilterArrayTag}/index.d.ts +0 -0
  146. /package/dist/components/Filters/ActiveFilters/{ActiveFilterDateRangeTag → Variants/ActiveFilterDateRangeTag}/ActiveFilterDateRangeTag.d.ts +0 -0
  147. /package/dist/components/Filters/ActiveFilters/{ActiveFilterDateRangeTag → Variants/ActiveFilterDateRangeTag}/index.d.ts +0 -0
  148. /package/dist/components/Filters/ActiveFilters/{ActiveFilterNumberRangeTag → Variants/ActiveFilterNumberRangeTag}/ActiveFilterNumberRangeTag.d.ts +0 -0
  149. /package/dist/components/Filters/{Fields → ActiveFilters/Variants/ActiveFilterNumberRangeTag}/FilterNumberRangeFilter/index.d.ts +0 -0
  150. /package/dist/components/Filters/ActiveFilters/{ActiveFilterNumberRangeTag → Variants/ActiveFilterNumberRangeTag}/index.d.ts +0 -0
package/dist/index60.js CHANGED
@@ -1,18 +1,22 @@
1
- var I = Object.defineProperty;
2
- var L = (R, r, i) => r in R ? I(R, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : R[r] = i;
3
- var o = (R, r, i) => L(R, typeof r != "symbol" ? r + "" : r, i);
4
- import { makeObservable as C, computed as E, action as h, observable as d } from "mobx";
5
- import { DateRanges as v } from "@veeqo/ui";
6
- import { parseDate as D } from "@internationalized/date";
7
- import N from "lodash/isEqual";
8
- import { FilterChoiceValue as g } from "./index44.js";
9
- import { RangeFilter as M } from "./index62.js";
10
- import { NumberRangeFilter as S } from "./index61.js";
11
- import { ALL_VIEW_ID as G } from "./index70.js";
12
- import { isValidDateRange as V } from "./index68.js";
1
+ var P = Object.defineProperty;
2
+ var C = (w, t, a) => t in w ? P(w, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : w[t] = a;
3
+ var o = (w, t, a) => C(w, typeof t != "symbol" ? t + "" : t, a);
4
+ import { makeObservable as L, computed as b, action as F, observable as d } from "mobx";
5
+ import { DateRanges as G } from "@veeqo/ui";
6
+ import { parseDate as U } from "@internationalized/date";
7
+ import D from "lodash/isEqual";
8
+ import { FilterChoiceValue as u } from "./index44.js";
9
+ import { RangeFilter as A } from "./index62.js";
10
+ import { NumberRangeFilter as I } from "./index61.js";
11
+ import { ALL_VIEW_ID as v } from "./index70.js";
12
+ import { isValidDateRange as O } from "./index68.js";
13
13
  import { BusinessLogicManager as p } from "./index8.js";
14
- class W {
14
+ class Q {
15
15
  constructor() {
16
+ // PAGINATION
17
+ o(this, "defaultPageSize");
18
+ o(this, "pageSize");
19
+ o(this, "currentPage");
16
20
  // DEFAULT FILTERS
17
21
  o(this, "defaultFilters");
18
22
  o(this, "defaultArrayFilters");
@@ -30,169 +34,186 @@ class W {
30
34
  o(this, "initDefaultFilterMaps", () => {
31
35
  this.defaultFilters = new Map(this.filters), this.defaultArrayFilters = new Map(this.arrayFilters), this.defaultDateRangeFilters = new Map(this.dateRangeFilters), this.defaultNumberRangeFilters = new Map(this.numberRangeFilters);
32
36
  });
33
- o(this, "updateUrl", (r = !1) => {
37
+ o(this, "updateUrl", (t = !1) => {
34
38
  try {
35
- const i = `${window.location.pathname}?${this.queryParams}`;
36
- r ? window.history.pushState({}, "", i) : window.history.replaceState({}, "", i);
37
- } catch (i) {
38
- console.log(i);
39
+ const a = `${window.location.pathname}?${this.queryParams}`;
40
+ t ? window.history.pushState({}, "", a) : window.history.replaceState({}, "", a);
41
+ } catch (a) {
42
+ console.log(a);
39
43
  }
40
44
  });
45
+ // PAGINATION
46
+ o(this, "setCurrentPage", (t) => {
47
+ this.currentPage = t;
48
+ });
49
+ o(this, "setPageSize", (t) => {
50
+ this.pageSize = t;
51
+ });
41
52
  // TEXT FILTERS
42
- o(this, "setFilter", (r, i) => {
43
- this.filters.set(r, i), this.updateUrl();
53
+ o(this, "setFilter", (t, a) => {
54
+ this.filters.set(t, a), this.updateUrl();
44
55
  });
45
- o(this, "clearFilter", (r) => {
46
- this.filters.set(r, ""), this.updateUrl();
56
+ o(this, "clearFilter", (t) => {
57
+ this.filters.set(t, ""), this.updateUrl();
47
58
  });
48
59
  // ARRAY FILTERS
49
- o(this, "setArrayFilter", (r, i) => {
50
- this.arrayFilters.set(r, i), this.updateUrl();
60
+ o(this, "setArrayFilter", (t, a) => {
61
+ this.arrayFilters.set(t, a), this.updateUrl();
51
62
  });
52
- o(this, "clearArrayFilter", (r) => {
53
- this.arrayFilters.set(r, []), this.updateUrl();
63
+ o(this, "clearArrayFilter", (t) => {
64
+ this.arrayFilters.set(t, []), this.updateUrl();
54
65
  });
55
66
  // RANGE FILTERS
56
67
  o(this, "setRangeFilter", ({
57
- key: r,
58
- range: i,
59
- dates: t
68
+ key: t,
69
+ range: a,
70
+ dates: i
60
71
  }) => {
61
- i.setFilterType(r), i.setDates(t.start, t.end), this.updateUrl();
72
+ a.setFilterType(t), a.setDates(i.start, i.end), this.updateUrl();
62
73
  });
63
- o(this, "clearRangeFilter", (r) => {
64
- const i = this.dateRangeFilters.get(r);
65
- i && (i.clear(), this.updateUrl());
74
+ o(this, "clearRangeFilter", (t) => {
75
+ const a = this.dateRangeFilters.get(t);
76
+ a && (a.clear(), this.updateUrl());
66
77
  });
67
78
  // NUMBER RANGE FILTERS
68
79
  o(this, "setNumberRangeFilter", ({
69
- numberRange: r,
70
- gte: i,
71
- lte: t
80
+ numberRange: t,
81
+ gte: a,
82
+ lte: i
72
83
  }) => {
73
- r.setGte(i), r.setLte(t), this.updateUrl();
84
+ t.setGte(a), t.setLte(i), this.updateUrl();
74
85
  });
75
- o(this, "clearNumberRangeFilter", (r) => {
76
- const i = this.numberRangeFilters.get(r);
77
- i && (i.clear(), this.updateUrl());
86
+ o(this, "clearNumberRangeFilter", (t) => {
87
+ const a = this.numberRangeFilters.get(t);
88
+ a && (a.clear(), this.updateUrl());
78
89
  });
79
90
  // CLEARING ALL FILTERS
80
- o(this, "clearAllFilters", (r = !1) => {
81
- const {
82
- SEARCH_FILTER_ID: i
83
- } = p.getBusinessLogic();
84
- this.filters.forEach((t, e) => {
85
- e !== i && this.filters.set(e, "");
86
- }), this.arrayFilters.forEach((t, e) => this.arrayFilters.set(e, [])), this.dateRangeFilters.forEach((t) => t.clear()), this.numberRangeFilters.forEach((t) => t.clear()), r || this.updateUrl();
91
+ o(this, "clearAllFilters", (t = !1) => {
92
+ const { SEARCH_FILTER_ID: a } = p.getBusinessLogic();
93
+ this.filters.forEach((i, e) => {
94
+ e !== a && this.filters.set(e, "");
95
+ }), this.arrayFilters.forEach((i, e) => this.arrayFilters.set(e, [])), this.dateRangeFilters.forEach((i) => i.clear()), this.numberRangeFilters.forEach((i) => i.clear()), t || this.updateUrl();
87
96
  });
88
- o(this, "clearFiltersForGroup", (r) => {
89
- const {
90
- GROUP_MAP: i
91
- } = p.getBusinessLogic(), t = i.get(r);
92
- t && t.fields.forEach((e) => {
97
+ o(this, "clearFiltersForGroup", (t) => {
98
+ const { GROUP_MAP: a } = p.getBusinessLogic(), i = a.get(t);
99
+ i && i.fields.forEach((e) => {
93
100
  this.arrayFilters.has(e.id) ? this.clearArrayFilter(e.id) : this.dateRangeFilters.has(e.id) ? this.clearRangeFilter(e.id) : this.numberRangeFilters.has(e.id) ? this.clearNumberRangeFilter(e.id) : this.clearFilter(e.id);
94
101
  });
95
102
  });
96
103
  // VIEWS
97
- o(this, "setActiveViewId", (r) => {
98
- this.activeViewId = r, this.updateUrl();
104
+ o(this, "setActiveViewId", (t) => {
105
+ this.activeViewId = t, this.updateUrl();
99
106
  });
100
107
  // VISIBILITY
101
- o(this, "toggleFiltersDropdownVisible", (r) => {
102
- this.isFiltersDropdownVisible = r;
108
+ o(this, "toggleFiltersDropdownVisible", (t) => {
109
+ this.isFiltersDropdownVisible = t;
103
110
  });
104
111
  // FILTER GROUPS
105
- o(this, "getFiltersForGroup", (r) => {
106
- const {
107
- GROUP_MAP: i
108
- } = p.getBusinessLogic(), t = i.get(r);
109
- if (!t) return {};
112
+ o(this, "getFiltersForGroup", (t) => {
113
+ const { GROUP_MAP: a } = p.getBusinessLogic(), i = a.get(t);
114
+ if (!i) return {};
110
115
  const e = {};
111
- return t.fields.forEach((n) => {
112
- this.arrayFilters.has(n.id) ? e[n.id] = this.arrayFilters.get(n.id) : this.dateRangeFilters.has(n.id) ? e[n.id] = this.dateRangeFilters.get(n.id) : this.numberRangeFilters.has(n.id) ? e[n.id] = this.numberRangeFilters.get(n.id) : e[n.id] = this.filters.get(n.id);
116
+ return i.fields.forEach((r) => {
117
+ this.arrayFilters.has(r.id) ? e[r.id] = this.arrayFilters.get(r.id) : this.dateRangeFilters.has(r.id) ? e[r.id] = this.dateRangeFilters.get(r.id) : this.numberRangeFilters.has(r.id) ? e[r.id] = this.numberRangeFilters.get(r.id) : e[r.id] = this.filters.get(r.id);
113
118
  }), e;
114
119
  });
115
- o(this, "initFiltersFromView", (r) => {
116
- this.defaultFilters = new Map(r.filterMaps.filters), this.defaultArrayFilters = new Map(r.filterMaps.arrayFilters), this.defaultDateRangeFilters = new Map(Array.from(r.filterMaps.rangeFilters.entries()).map(([i, t]) => {
117
- const e = new M(t.filterType);
118
- return t.gte && t.lte && e.setDates(t.gte, t.lte), [i, e];
119
- })), this.defaultNumberRangeFilters = new Map(Array.from(r.filterMaps.numberRangeFilters.entries()).map(([i, t]) => {
120
- const e = t.clone();
121
- return t.gte && e.setGte(t.gte), t.lte && e.setLte(t.lte), [i, e];
122
- })), this.filters = new Map(r.filterMaps.filters), this.arrayFilters = new Map(r.filterMaps.arrayFilters), this.dateRangeFilters = new Map(Array.from(r.filterMaps.rangeFilters.entries()).map(([i, t]) => {
123
- const e = new M(t.filterType);
124
- return t.gte && t.lte && e.setDates(t.gte, t.lte), [i, e];
125
- })), this.numberRangeFilters = new Map(Array.from(r.filterMaps.numberRangeFilters.entries()).map(([i, t]) => {
126
- const e = t.clone();
127
- return t.gte && e.setGte(t.gte), t.lte && e.setLte(t.lte), [i, e];
128
- })), this.activeViewId = r.id;
120
+ o(this, "initFiltersFromView", (t) => {
121
+ var i;
122
+ const { PAGE_SIZE_OPTIONS: a } = p.getBusinessLogic();
123
+ (i = t.page) != null && i.size && a.includes(t.page.size) && (this.defaultPageSize = t.page.size, this.pageSize = t.page.size), this.defaultFilters = new Map(t.filterMaps.filters), this.defaultArrayFilters = new Map(t.filterMaps.arrayFilters), this.defaultDateRangeFilters = new Map(
124
+ Array.from(t.filterMaps.rangeFilters.entries()).map(([e, r]) => {
125
+ const f = new A(r.filterType);
126
+ return r.gte && r.lte && f.setDates(r.gte, r.lte), [e, f];
127
+ })
128
+ ), this.defaultNumberRangeFilters = new Map(
129
+ Array.from(t.filterMaps.numberRangeFilters.entries()).map(([e, r]) => {
130
+ const f = r.clone();
131
+ return r.gte && f.setGte(r.gte), r.lte && f.setLte(r.lte), [e, f];
132
+ })
133
+ ), this.filters = new Map(t.filterMaps.filters), this.arrayFilters = new Map(t.filterMaps.arrayFilters), this.dateRangeFilters = new Map(
134
+ Array.from(t.filterMaps.rangeFilters.entries()).map(([e, r]) => {
135
+ const f = new A(r.filterType);
136
+ return r.gte && r.lte && f.setDates(r.gte, r.lte), [e, f];
137
+ })
138
+ ), this.numberRangeFilters = new Map(
139
+ Array.from(t.filterMaps.numberRangeFilters.entries()).map(([e, r]) => {
140
+ const f = r.clone();
141
+ return r.gte && f.setGte(r.gte), r.lte && f.setLte(r.lte), [e, f];
142
+ })
143
+ ), this.activeViewId = t.id;
129
144
  });
130
- o(this, "initFromUrl", (r = !0) => {
131
- const {
132
- GROUP_MAP: i,
133
- NUMBER_RANGE_FILTERS: t
134
- } = p.getBusinessLogic(), e = new URLSearchParams(window.location.search), n = Array.from(i.values()).flatMap((F) => F.fields), c = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
135
- Array.from(e.entries()).forEach(([F, l]) => {
136
- (F.includes("_gte") || F.includes("_lte")) && w.set(F, l);
137
- }), Array.from(e.entries()).forEach(([F, l]) => {
138
- if (F === "view" && r) {
139
- this.activeViewId = l;
145
+ o(this, "initFromUrl", (t = !0) => {
146
+ const { GROUP_MAP: a, NUMBER_RANGE_FILTERS: i, PAGE_SIZE_OPTIONS: e } = p.getBusinessLogic(), r = new URLSearchParams(window.location.search), f = Array.from(a.values()).flatMap((n) => n.fields), R = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map();
147
+ Array.from(r.entries()).forEach(([n, s]) => {
148
+ (n.includes("_gte") || n.includes("_lte")) && M.set(n, s);
149
+ }), Array.from(r.entries()).forEach(([n, s]) => {
150
+ if (n === "view" && t) {
151
+ this.activeViewId = s;
140
152
  return;
141
153
  }
142
- let a = n.find((s) => s.id === F);
143
- if (!a) {
144
- const s = F.replace(/_[gl]te$/, "");
145
- t.includes(s) && (a = n.find((m) => m.id === s));
154
+ if (n === "page" && e.includes(Number(s))) {
155
+ this.pageSize = Number(s);
156
+ return;
146
157
  }
147
- if (a)
148
- switch (a.filterType) {
149
- case g.CHECKBOX:
150
- l && T.set(F, l.split(","));
158
+ let l = f.find((g) => g.id === n);
159
+ if (!l) {
160
+ const g = n.replace(/_[gl]te$/, "");
161
+ i.includes(g) && (l = f.find((m) => m.id === g));
162
+ }
163
+ if (l)
164
+ switch (l.filterType) {
165
+ case u.CHECKBOX:
166
+ s && h.set(n, s.split(","));
151
167
  break;
152
- case g.DATE_RANGE:
153
- let s;
154
- if (l === "CUSTOM") {
155
- s = new M("CUSTOM");
156
- const _ = w.get(`${F}_gte`), U = w.get(`${F}_lte`);
157
- _ && U && s.setDates(D(_), D(U));
158
- } else V(l) ? s = new M(l) : s = new M(v.TODAY);
159
- f.set(F, s);
168
+ case u.DATE_RANGE:
169
+ let g;
170
+ if (s === "CUSTOM") {
171
+ g = new A("CUSTOM");
172
+ const _ = M.get(`${n}_gte`), N = M.get(`${n}_lte`);
173
+ _ && N && g.setDates(U(_), U(N));
174
+ } else O(s) ? g = new A(s) : g = new A(G.TODAY);
175
+ T.set(n, g);
160
176
  break;
161
- case g.NUMBER_RANGE:
162
- const m = new S({
163
- filterId: a.id
164
- }), u = F.replace(/_[gl]te$/, ""), y = w.get(`${u}_gte`), A = w.get(`${u}_lte`);
165
- y && m.setGte(Number(y)), A && m.setLte(Number(A)), b.set(u, m);
177
+ case u.NUMBER_RANGE:
178
+ const m = new I({ filterId: l.id }), c = n.replace(/_[gl]te$/, ""), y = M.get(`${c}_gte`), S = M.get(`${c}_lte`);
179
+ y && m.setGte(Number(y)), S && m.setLte(Number(S)), E.set(c, m);
166
180
  break;
167
- case g.TEXT:
168
- case g.NUMBER:
169
- case g.RADIO:
170
- c.set(F, l);
181
+ case u.TEXT:
182
+ case u.NUMBER:
183
+ case u.RADIO:
184
+ R.set(n, s);
171
185
  break;
172
186
  }
173
- }), this.filters = c, this.arrayFilters = T, this.dateRangeFilters = f, this.numberRangeFilters = b, this.updateUrl();
187
+ }), this.filters = R, this.arrayFilters = h, this.dateRangeFilters = T, this.numberRangeFilters = E, this.updateUrl();
174
188
  });
175
- // In Filters class
176
- o(this, "discardChanges", (r = !1) => {
177
- const {
178
- SEARCH_FILTER_ID: i
179
- } = p.getBusinessLogic(), t = new Map(this.defaultFilters);
180
- this.filters.has(i) && t.set(i, this.filters.get(i)), this.filters = t, this.arrayFilters = new Map(this.defaultArrayFilters), this.dateRangeFilters.clear(), this.defaultDateRangeFilters.forEach((e, n) => {
181
- const c = new M(e.filterType);
182
- c.setDates(e.gte, e.lte), this.dateRangeFilters.set(n, c);
183
- }), this.numberRangeFilters.clear(), this.defaultNumberRangeFilters.forEach((e, n) => {
184
- this.numberRangeFilters.set(n, e.clone());
185
- }), this.updateUrl(r);
189
+ o(this, "discardChanges", (t = !1) => {
190
+ this.pageSize = this.defaultPageSize;
191
+ const { SEARCH_FILTER_ID: a } = p.getBusinessLogic(), i = new Map(this.defaultFilters);
192
+ this.filters.has(a) && i.set(a, this.filters.get(a)), this.filters = i, this.arrayFilters = new Map(this.defaultArrayFilters), this.dateRangeFilters.clear(), this.defaultDateRangeFilters.forEach((e, r) => {
193
+ const f = new A(e.filterType);
194
+ f.setDates(e.gte, e.lte), this.dateRangeFilters.set(r, f);
195
+ }), this.numberRangeFilters.clear(), this.defaultNumberRangeFilters.forEach((e, r) => {
196
+ this.numberRangeFilters.set(r, e.clone());
197
+ }), this.updateUrl(t);
186
198
  });
187
- const {
188
- GROUP_MAP: r
189
- } = p.getBusinessLogic(), i = Array.from(r.values()).flatMap((t) => t.fields);
190
- this.filters = new Map(i.filter((t) => t.filterType === g.TEXT || t.filterType === g.NUMBER || t.filterType === g.RADIO || t.filterType === g.DATE_RANGE).map((t) => [t.id, ""])), this.arrayFilters = new Map(i.filter((t) => t.filterType === g.CHECKBOX).map((t) => [t.id, []])), this.dateRangeFilters = new Map(i.filter((t) => t.filterType === g.DATE_RANGE).map((t) => [t.id, new M()])), this.numberRangeFilters = new Map(i.filter((t) => t.filterType === g.NUMBER_RANGE).map((t) => {
191
- const e = new S({
192
- filterId: t.id
193
- });
194
- return [t.id, e];
195
- })), this.defaultArrayFilters = /* @__PURE__ */ new Map(), this.defaultFilters = /* @__PURE__ */ new Map(), this.defaultDateRangeFilters = /* @__PURE__ */ new Map(), this.defaultNumberRangeFilters = /* @__PURE__ */ new Map(), this.initDefaultFilterMaps(), this.isFiltersDropdownVisible = !1, this.activeViewId = void 0, C(this, {
199
+ const { GROUP_MAP: t } = p.getBusinessLogic(), a = Array.from(t.values()).flatMap((i) => i.fields);
200
+ this.filters = new Map(
201
+ a.filter(
202
+ (i) => i.filterType === u.TEXT || i.filterType === u.NUMBER || i.filterType === u.RADIO || i.filterType === u.DATE_RANGE
203
+ ).map((i) => [i.id, ""])
204
+ ), this.arrayFilters = new Map(
205
+ a.filter((i) => i.filterType === u.CHECKBOX).map((i) => [i.id, []])
206
+ ), this.dateRangeFilters = new Map(
207
+ a.filter((i) => i.filterType === u.DATE_RANGE).map((i) => [i.id, new A()])
208
+ ), this.numberRangeFilters = new Map(
209
+ a.filter((i) => i.filterType === u.NUMBER_RANGE).map((i) => {
210
+ const e = new I({ filterId: i.id });
211
+ return [i.id, e];
212
+ })
213
+ ), this.defaultArrayFilters = /* @__PURE__ */ new Map(), this.defaultFilters = /* @__PURE__ */ new Map(), this.defaultDateRangeFilters = /* @__PURE__ */ new Map(), this.defaultNumberRangeFilters = /* @__PURE__ */ new Map(), this.currentPage = 1, this.pageSize = 10, this.defaultPageSize = 10, this.initDefaultFilterMaps(), this.isFiltersDropdownVisible = !1, this.activeViewId = void 0, L(this, {
214
+ defaultPageSize: d,
215
+ pageSize: d,
216
+ currentPage: d,
196
217
  defaultFilters: d,
197
218
  defaultArrayFilters: d,
198
219
  defaultDateRangeFilters: d,
@@ -203,99 +224,95 @@ class W {
203
224
  dateRangeFilters: d,
204
225
  isFiltersDropdownVisible: d,
205
226
  activeViewId: d,
206
- toggleFiltersDropdownVisible: h,
207
- setActiveViewId: h,
208
- setFilter: h,
209
- setArrayFilter: h,
210
- setRangeFilter: h,
211
- setNumberRangeFilter: h,
212
- clearFilter: h,
213
- clearArrayFilter: h,
214
- clearRangeFilter: h,
215
- clearNumberRangeFilter: h,
216
- clearAllFilters: h,
217
- getFiltersForGroup: h,
218
- clearFiltersForGroup: h,
219
- initFromUrl: h,
220
- initFiltersFromView: h,
221
- initDefaultFilterMaps: h,
222
- discardChanges: h,
223
- updateUrl: h,
224
- hasActiveFilters: E,
225
- activeFilterKeysList: E,
226
- queryParams: E,
227
- hasUnsavedChanges: E
227
+ setPageSize: F,
228
+ setCurrentPage: F,
229
+ toggleFiltersDropdownVisible: F,
230
+ setActiveViewId: F,
231
+ setFilter: F,
232
+ setArrayFilter: F,
233
+ setRangeFilter: F,
234
+ setNumberRangeFilter: F,
235
+ clearFilter: F,
236
+ clearArrayFilter: F,
237
+ clearRangeFilter: F,
238
+ clearNumberRangeFilter: F,
239
+ clearAllFilters: F,
240
+ getFiltersForGroup: F,
241
+ clearFiltersForGroup: F,
242
+ initFromUrl: F,
243
+ initFiltersFromView: F,
244
+ initDefaultFilterMaps: F,
245
+ discardChanges: F,
246
+ updateUrl: F,
247
+ hasActiveFilters: b,
248
+ activeFilterKeysList: b,
249
+ queryParams: b,
250
+ hasUnsavedChanges: b
228
251
  });
229
252
  }
230
253
  get hasActiveFilters() {
231
- const {
232
- GROUP_MAP: r
233
- } = p.getBusinessLogic(), i = Array.from(r.values()).flatMap((e) => e.fields), t = new Set(i.map((e) => e.id));
234
- return Array.from(this.filters.entries()).filter(([e]) => t.has(e)).some(([, e]) => e !== "") || Array.from(this.arrayFilters.entries()).filter(([e]) => t.has(e)).some(([, e]) => e.length > 0) || Array.from(this.dateRangeFilters.entries()).filter(([e]) => t.has(e)).some(([, e]) => e.filterType !== void 0) || Array.from(this.numberRangeFilters.entries()).filter(([e]) => t.has(e)).some(([, e]) => e.isActive);
254
+ const { GROUP_MAP: t } = p.getBusinessLogic(), a = Array.from(t.values()).flatMap((e) => e.fields), i = new Set(a.map((e) => e.id));
255
+ return Array.from(this.filters.entries()).filter(([e]) => i.has(e)).some(([, e]) => e !== "") || Array.from(this.arrayFilters.entries()).filter(([e]) => i.has(e)).some(([, e]) => e.length > 0) || Array.from(this.dateRangeFilters.entries()).filter(([e]) => i.has(e)).some(([, e]) => e.filterType !== void 0) || Array.from(this.numberRangeFilters.entries()).filter(([e]) => i.has(e)).some(([, e]) => e.isActive);
235
256
  }
236
257
  get activeFilterKeysList() {
237
- const {
238
- DATE_RANGE_FILTERS: r,
239
- NUMBER_RANGE_FILTERS: i
240
- } = p.getBusinessLogic(), t = Array.from(this.filters.entries()).filter(([f, b]) => b !== "" && !r.includes(f) && !i.includes(f)).map(([f]) => f), e = Array.from(this.arrayFilters.entries()).filter(([, f]) => f.length > 0).map(([f]) => f), n = Array.from(this.dateRangeFilters.entries()).filter(([, f]) => f.filterType !== void 0).map(([f]) => f), c = Array.from(this.numberRangeFilters.entries()).filter(([, f]) => f.isActive).map(([f]) => f);
241
- return [.../* @__PURE__ */ new Set([...t, ...e, ...n, ...c])];
258
+ const { DATE_RANGE_FILTERS: t, NUMBER_RANGE_FILTERS: a } = p.getBusinessLogic(), i = Array.from(this.filters.entries()).filter(
259
+ ([h, T]) => T !== "" && !t.includes(h) && !a.includes(h)
260
+ ).map(([h]) => h), e = Array.from(this.arrayFilters.entries()).filter(([, h]) => h.length > 0).map(([h]) => h), r = Array.from(this.dateRangeFilters.entries()).filter(([, h]) => h.filterType !== void 0).map(([h]) => h), f = Array.from(this.numberRangeFilters.entries()).filter(([, h]) => h.isActive).map(([h]) => h);
261
+ return [.../* @__PURE__ */ new Set([...i, ...e, ...r, ...f])];
242
262
  }
243
263
  get queryParams() {
244
- const {
245
- DATE_RANGE_FILTERS: r,
246
- NUMBER_RANGE_FILTERS: i
247
- } = p.getBusinessLogic(), t = new URLSearchParams();
248
- return Array.from(this.filters.entries()).filter(([e, n]) => n !== "" && !r.includes(e) && !i.includes(e)).forEach(([e, n]) => {
249
- t.append(e, n);
250
- }), Array.from(this.arrayFilters.entries()).filter(([, e]) => e.length > 0).forEach(([e, n]) => {
251
- t.append(e, n.join(","));
252
- }), Array.from(this.dateRangeFilters.entries()).filter(([, e]) => e.filterType !== void 0).forEach(([e, n]) => {
253
- t.set(e, n.filterType), n.filterType === "CUSTOM" && (t.set(`${e}_gte`, n.gte.toString()), t.set(`${e}_lte`, n.lte.toString()));
254
- }), Array.from(this.numberRangeFilters.entries()).filter(([, e]) => e.isActive).forEach(([e, n]) => {
255
- n.gte !== void 0 && t.set(`${e}_gte`, n.gte.toString()), n.isValidLte && t.set(`${e}_lte`, n.lte.toString());
256
- }), this.activeViewId && t.set("view", this.activeViewId), t.toString();
264
+ const { DATE_RANGE_FILTERS: t, NUMBER_RANGE_FILTERS: a } = p.getBusinessLogic(), i = new URLSearchParams();
265
+ return Array.from(this.filters.entries()).filter(
266
+ ([e, r]) => r !== "" && !t.includes(e) && !a.includes(e)
267
+ ).forEach(([e, r]) => {
268
+ i.append(e, r);
269
+ }), Array.from(this.arrayFilters.entries()).filter(([, e]) => e.length > 0).forEach(([e, r]) => {
270
+ i.append(e, r.join(","));
271
+ }), Array.from(this.dateRangeFilters.entries()).filter(([, e]) => e.filterType !== void 0).forEach(([e, r]) => {
272
+ i.set(e, r.filterType), r.filterType === "CUSTOM" && (i.set(`${e}_gte`, r.gte.toString()), i.set(`${e}_lte`, r.lte.toString()));
273
+ }), Array.from(this.numberRangeFilters.entries()).filter(([, e]) => e.isActive).forEach(([e, r]) => {
274
+ r.gte !== void 0 && i.set(`${e}_gte`, r.gte.toString()), r.isValidLte && i.set(`${e}_lte`, r.lte.toString());
275
+ }), this.activeViewId && i.set("view", this.activeViewId), i.set("page", this.pageSize.toString()), i.toString();
257
276
  }
258
277
  get hasUnsavedChanges() {
259
- if (this.activeViewId === G) return !1;
260
- const {
261
- GROUP_MAP: r,
262
- SEARCH_FILTER_ID: i
263
- } = p.getBusinessLogic(), t = Array.from(r.values()).flatMap((l) => l.fields), e = new Set(t.map((l) => l.id));
264
- if (Array.from(this.filters.entries()).filter(([l]) => l !== i && e.has(l)).some(([l, a]) => {
265
- const s = this.defaultFilters.get(l);
266
- return s === void 0 && a !== "" || s !== void 0 && a !== s;
278
+ if (this.activeViewId === v) return !1;
279
+ if (this.defaultPageSize !== this.pageSize) return !0;
280
+ const { GROUP_MAP: t, SEARCH_FILTER_ID: a } = p.getBusinessLogic(), i = Array.from(t.values()).flatMap((n) => n.fields), e = new Set(i.map((n) => n.id));
281
+ if (Array.from(this.filters.entries()).filter(([n]) => n !== a && e.has(n)).some(([n, s]) => {
282
+ const l = this.defaultFilters.get(n);
283
+ return l === void 0 && s !== "" || l !== void 0 && s !== l;
267
284
  }))
268
285
  return !0;
269
- const c = Array.from(this.defaultArrayFilters.entries()).filter(([l]) => e.has(l)).some(([l, a]) => {
270
- const s = this.defaultArrayFilters.get(l) || [];
271
- return a.length > 0 || s.length > 0 ? a.length !== s.length || !N(a, s) : !1;
272
- }), T = Array.from(this.arrayFilters.entries()).filter(([l]) => e.has(l)).some(([l, a]) => {
273
- const s = this.defaultArrayFilters.get(l) || [];
274
- return a.length > 0 || s.length > 0 ? a.length !== s.length || !N(a, s) : !1;
286
+ const f = Array.from(this.defaultArrayFilters.entries()).filter(([n]) => e.has(n)).some(([n, s]) => {
287
+ const l = this.defaultArrayFilters.get(n) || [];
288
+ return s.length > 0 || l.length > 0 ? s.length !== l.length || !D(s, l) : !1;
289
+ }), R = Array.from(this.arrayFilters.entries()).filter(([n]) => e.has(n)).some(([n, s]) => {
290
+ const l = this.defaultArrayFilters.get(n) || [];
291
+ return s.length > 0 || l.length > 0 ? s.length !== l.length || !D(s, l) : !1;
275
292
  });
276
- if (c || T)
293
+ if (f || R)
277
294
  return !0;
278
- const f = Array.from(this.numberRangeFilters.entries()).filter(([l]) => e.has(l)).some(([l, a]) => {
279
- const s = this.defaultNumberRangeFilters.get(l);
280
- return !a.isEqual(s);
295
+ const h = Array.from(this.numberRangeFilters.entries()).filter(([n]) => e.has(n)).some(([n, s]) => {
296
+ const l = this.defaultNumberRangeFilters.get(n);
297
+ return !s.isEqual(l);
281
298
  });
282
- if (Array.from(this.defaultNumberRangeFilters.entries()).filter(([l]) => e.has(l)).some(([l, a]) => {
283
- const s = this.numberRangeFilters.get(l);
284
- return !a.isEqual(s);
285
- }) || f)
299
+ if (Array.from(this.defaultNumberRangeFilters.entries()).filter(([n]) => e.has(n)).some(([n, s]) => {
300
+ const l = this.numberRangeFilters.get(n);
301
+ return !s.isEqual(l);
302
+ }) || h)
286
303
  return !0;
287
- const w = Array.from(this.defaultDateRangeFilters.entries()).filter(([l]) => e.has(l)).some(([l, a]) => {
288
- var m, u, y, A;
289
- const s = this.dateRangeFilters.get(l);
290
- return a != null && a.filterType && !(s != null && s.filterType) || s != null && s.filterType && !(a != null && a.filterType) || (s == null ? void 0 : s.filterType) !== (a == null ? void 0 : a.filterType) ? !0 : (s == null ? void 0 : s.filterType) === "CUSTOM" && (a == null ? void 0 : a.filterType) === "CUSTOM" ? ((m = a.gte) == null ? void 0 : m.toString()) !== ((u = s.gte) == null ? void 0 : u.toString()) || ((y = a.lte) == null ? void 0 : y.toString()) !== ((A = s.lte) == null ? void 0 : A.toString()) : !1;
304
+ const E = Array.from(this.defaultDateRangeFilters.entries()).filter(([n]) => e.has(n)).some(([n, s]) => {
305
+ var g, m, c, y;
306
+ const l = this.dateRangeFilters.get(n);
307
+ return s != null && s.filterType && !(l != null && l.filterType) || l != null && l.filterType && !(s != null && s.filterType) || (l == null ? void 0 : l.filterType) !== (s == null ? void 0 : s.filterType) ? !0 : (l == null ? void 0 : l.filterType) === "CUSTOM" && (s == null ? void 0 : s.filterType) === "CUSTOM" ? ((g = s.gte) == null ? void 0 : g.toString()) !== ((m = l.gte) == null ? void 0 : m.toString()) || ((c = s.lte) == null ? void 0 : c.toString()) !== ((y = l.lte) == null ? void 0 : y.toString()) : !1;
291
308
  });
292
- return Array.from(this.dateRangeFilters.entries()).filter(([l]) => e.has(l)).some(([l, a]) => {
293
- var m, u, y, A;
294
- const s = this.defaultDateRangeFilters.get(l);
295
- return a != null && a.filterType && !(s != null && s.filterType) || s != null && s.filterType && !(a != null && a.filterType) || (s == null ? void 0 : s.filterType) !== (a == null ? void 0 : a.filterType) ? !0 : (s == null ? void 0 : s.filterType) === "CUSTOM" && (a == null ? void 0 : a.filterType) === "CUSTOM" ? ((m = a.gte) == null ? void 0 : m.toString()) !== ((u = s.gte) == null ? void 0 : u.toString()) || ((y = a.lte) == null ? void 0 : y.toString()) !== ((A = s.lte) == null ? void 0 : A.toString()) : !1;
296
- }) || w;
309
+ return Array.from(this.dateRangeFilters.entries()).filter(([n]) => e.has(n)).some(([n, s]) => {
310
+ var g, m, c, y;
311
+ const l = this.defaultDateRangeFilters.get(n);
312
+ return s != null && s.filterType && !(l != null && l.filterType) || l != null && l.filterType && !(s != null && s.filterType) || (l == null ? void 0 : l.filterType) !== (s == null ? void 0 : s.filterType) ? !0 : (l == null ? void 0 : l.filterType) === "CUSTOM" && (s == null ? void 0 : s.filterType) === "CUSTOM" ? ((g = s.gte) == null ? void 0 : g.toString()) !== ((m = l.gte) == null ? void 0 : m.toString()) || ((c = s.lte) == null ? void 0 : c.toString()) !== ((y = l.lte) == null ? void 0 : y.toString()) : !1;
313
+ }) || E;
297
314
  }
298
315
  }
299
316
  export {
300
- W as Filters
317
+ Q as Filters
301
318
  };
package/dist/index61.js CHANGED
@@ -4,9 +4,7 @@ var e = (l, t, i) => v(l, typeof t != "symbol" ? t + "" : t, i);
4
4
  import { makeObservable as L, action as n, observable as h, computed as c } from "mobx";
5
5
  import { BusinessLogicManager as x } from "./index8.js";
6
6
  class u {
7
- constructor({
8
- filterId: t
9
- }) {
7
+ constructor({ filterId: t }) {
10
8
  e(this, "filterId");
11
9
  e(this, "gteMinLabel");
12
10
  e(this, "gteMin");
@@ -24,9 +22,7 @@ class u {
24
22
  this.setGte(void 0), this.setLte(void 0);
25
23
  });
26
24
  e(this, "clone", () => {
27
- const t = new u({
28
- filterId: this.filterId
29
- });
25
+ const t = new u({ filterId: this.filterId });
30
26
  return t.setGte(this.gte), t.setLte(this.lte), t;
31
27
  });
32
28
  e(this, "isEqual", (t) => !(!t || this.lte !== t.lte || this.gte !== t.gte));
@@ -42,9 +38,9 @@ class u {
42
38
  setLte: n,
43
39
  clear: n
44
40
  }), this.filterId = t;
45
- const {
46
- FIELDS_MAP: i
47
- } = x.getBusinessLogic(), s = i.get(this.filterId), f = (a = s == null ? void 0 : s.options) == null ? void 0 : a.every((r) => r.value && Number.isInteger(Number(r.value)));
41
+ const { FIELDS_MAP: i } = x.getBusinessLogic(), s = i.get(this.filterId), f = (a = s == null ? void 0 : s.options) == null ? void 0 : a.every(
42
+ (r) => r.value && Number.isInteger(Number(r.value))
43
+ );
48
44
  if (s && f && ((o = s.options) == null ? void 0 : o.length) === 2) {
49
45
  const [r, g] = s.options, M = Number(r.value), d = Number(g.value);
50
46
  this.gteMin = M, this.gteMinLabel = r.label, this.lteMax = d, this.lteMaxLabel = g.label;
package/dist/index62.js CHANGED
@@ -23,9 +23,7 @@ class L {
23
23
  });
24
24
  s(this, "clear", () => {
25
25
  this.filterType = void 0;
26
- const {
27
- DEFAULT_DATE_RANGE: t
28
- } = c.getBusinessLogic();
26
+ const { DEFAULT_DATE_RANGE: t } = c.getBusinessLogic();
29
27
  t && this.setDates(t.start, t.end);
30
28
  });
31
29
  p(this, {
@@ -39,15 +37,11 @@ class L {
39
37
  setDates: l,
40
38
  clear: l
41
39
  });
42
- const e = t && t !== "CUSTOM" ? a(t) : null, {
43
- DEFAULT_DATE_RANGE: r
44
- } = c.getBusinessLogic();
40
+ const e = t && t !== "CUSTOM" ? a(t) : null, { DEFAULT_DATE_RANGE: r } = c.getBusinessLogic();
45
41
  this.filterType = t, this.gte = (e == null ? void 0 : e.start) ?? r.start, this.lte = (e == null ? void 0 : e.end) ?? r.end;
46
42
  }
47
43
  get filterSelection() {
48
- const {
49
- DEFAULT_DATE_PRESET: t
50
- } = c.getBusinessLogic();
44
+ const { DEFAULT_DATE_PRESET: t } = c.getBusinessLogic();
51
45
  return this.filterType ? f.get(this.filterType) ?? t : t;
52
46
  }
53
47
  get filterLabel() {
package/dist/index65.js CHANGED
@@ -1,11 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { Provider as s } from "mobx-react";
3
- const n = ({
4
- children: i,
5
- Filters: o,
6
- Views: r,
7
- Notifications: t
8
- }) => /* @__PURE__ */ e(s, { Filters: o, Views: r, Notifications: t, children: i });
3
+ const n = ({ children: i, Filters: o, Views: r, Notifications: t }) => /* @__PURE__ */ e(s, { Filters: o, Views: r, Notifications: t, children: i });
9
4
  export {
10
5
  n as MobXProvider
11
6
  };
package/dist/index66.js CHANGED
@@ -1,8 +1,5 @@
1
1
  import o from "lodash/get";
2
- const u = ({
3
- data: t,
4
- config: r
5
- }) => !r || !t ? [] : t.map((e) => {
2
+ const u = ({ data: t, config: r }) => !r || !t ? [] : t.map((e) => {
6
3
  const l = o(e, r.labelProperty), n = o(e, r.valueProperty);
7
4
  return {
8
5
  label: l,