impact-nova 1.7.30 → 1.7.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.d.ts +2 -0
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +69 -67
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.d.ts +2 -0
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +107 -71
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +277 -213
- package/dist/components/ui/ag-grid-react/headers/utils/date-utils.d.ts +11 -1
- package/dist/components/ui/ag-grid-react/headers/utils/date-utils.js +34 -20
- package/dist/components/ui/ag-grid-react/index.js +16 -15
- package/dist/components/ui/date-picker/date-range-picker.js +182 -165
- package/dist/components/ui/date-picker/month-range-picker.js +221 -166
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +98 -93
- package/dist/components/ui/nested-list/components/SortableItem.d.ts +1 -0
- package/dist/components/ui/nested-list/components/SortableItem.js +37 -36
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +2 -1
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +173 -160
- package/dist/components/ui/nested-list/nested-list.js +200 -196
- package/dist/components/ui/types/ag-grid.types.d.ts +2 -0
- package/dist/components/ui/types/horizontal-scroller.types.d.ts +4 -0
- package/dist/components/ui/types/nested-list.types.d.ts +1 -0
- package/dist/impact-nova.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
import { MonthSelection } from '../../../calendar';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
+
* Convert a MonthSelection to an AG Grid inRange date filter range.
|
|
4
|
+
* Returns { dateFrom: 'YYYY-MM-01', dateTo: 'YYYY-MM-lastDay' }.
|
|
3
5
|
*/
|
|
6
|
+
export declare function serializeMonth(month: MonthSelection): {
|
|
7
|
+
dateFrom: string;
|
|
8
|
+
dateTo: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Reconstruct a MonthSelection from a YYYY-MM-DD date string.
|
|
12
|
+
*/
|
|
13
|
+
export declare function deserializeMonth(dateStr: string | null): MonthSelection | null;
|
|
4
14
|
/**
|
|
5
15
|
* Standardize date serialization for AG Grid filter model
|
|
6
16
|
* Returns YYYY-MM-DD string
|
|
@@ -1,38 +1,52 @@
|
|
|
1
1
|
function o(t) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const n = t.year, e = t.month + 1, r = new Date(n, e, 0).getDate(), a = String(e).padStart(2, "0");
|
|
3
|
+
return {
|
|
4
|
+
dateFrom: `${n}-${a}-01`,
|
|
5
|
+
dateTo: `${n}-${a}-${String(r).padStart(2, "0")}`
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
function s(t) {
|
|
9
|
+
if (!t || typeof t != "string") return null;
|
|
10
|
+
const n = t.split(" ")[0].split("T")[0], [e, r] = n.split("-").map(Number);
|
|
11
|
+
return isNaN(e) || isNaN(r) ? null : { year: e, month: r - 1 };
|
|
5
12
|
}
|
|
6
13
|
function i(t) {
|
|
14
|
+
if (!t) return null;
|
|
15
|
+
const n = t.getFullYear(), e = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0");
|
|
16
|
+
return `${n}-${e}-${r}`;
|
|
17
|
+
}
|
|
18
|
+
function u(t) {
|
|
7
19
|
if (!t || typeof t != "string") return null;
|
|
8
|
-
const n = t.split(" ")[0].split("T")[0], [
|
|
9
|
-
return isNaN(
|
|
20
|
+
const n = t.split(" ")[0].split("T")[0], [e, r, a] = n.split("-").map(Number);
|
|
21
|
+
return isNaN(e) || isNaN(r) || isNaN(a) ? null : new Date(e, r - 1, a);
|
|
10
22
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
23
|
+
function l() {
|
|
24
|
+
return i(/* @__PURE__ */ new Date());
|
|
13
25
|
}
|
|
14
|
-
function
|
|
26
|
+
function c() {
|
|
15
27
|
const t = /* @__PURE__ */ new Date();
|
|
16
|
-
return t.setDate(t.getDate() - 1),
|
|
28
|
+
return t.setDate(t.getDate() - 1), i(t);
|
|
17
29
|
}
|
|
18
|
-
function
|
|
30
|
+
function g(t) {
|
|
19
31
|
return {
|
|
20
32
|
from: `${t}-01-01`,
|
|
21
33
|
to: `${t}-12-31`
|
|
22
34
|
};
|
|
23
35
|
}
|
|
24
|
-
function
|
|
25
|
-
const
|
|
36
|
+
function f(t, n) {
|
|
37
|
+
const e = new Date(n, t, 0).getDate(), r = String(t).padStart(2, "0");
|
|
26
38
|
return {
|
|
27
|
-
from: `${n}-${
|
|
28
|
-
to: `${n}-${
|
|
39
|
+
from: `${n}-${r}-01`,
|
|
40
|
+
to: `${n}-${r}-${e}`
|
|
29
41
|
};
|
|
30
42
|
}
|
|
31
43
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
44
|
+
u as deserializeDate,
|
|
45
|
+
s as deserializeMonth,
|
|
46
|
+
f as getMonthRange,
|
|
47
|
+
l as getTodayStr,
|
|
48
|
+
g as getYearRange,
|
|
49
|
+
c as getYesterdayStr,
|
|
50
|
+
i as serializeDate,
|
|
51
|
+
o as serializeMonth
|
|
38
52
|
};
|
|
@@ -13,13 +13,13 @@ import { AG_GRID_VALUE_FORMATTERS as ye } from "./value-formatters.js";
|
|
|
13
13
|
/* empty css */
|
|
14
14
|
const be = re(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
|
|
15
15
|
ie.registerModules([se, ce, ue]);
|
|
16
|
-
const x = "",
|
|
16
|
+
const x = "", T = "", H = (s) => {
|
|
17
17
|
if (!s) return;
|
|
18
18
|
const r = s.cellRendererParams?.splits;
|
|
19
19
|
if (Array.isArray(r) && r.length > 0) return r;
|
|
20
20
|
const l = s.cellEditorParams?.splits;
|
|
21
21
|
if (Array.isArray(l) && l.length > 0) return l;
|
|
22
|
-
},
|
|
22
|
+
}, V = (s, r) => {
|
|
23
23
|
const l = [];
|
|
24
24
|
for (const g of r) {
|
|
25
25
|
const f = g?.field?.split(".").pop();
|
|
@@ -44,7 +44,7 @@ const x = "", I = "", H = (s) => {
|
|
|
44
44
|
l.push("");
|
|
45
45
|
}
|
|
46
46
|
return l;
|
|
47
|
-
},
|
|
47
|
+
}, _ = (s) => {
|
|
48
48
|
if (typeof navigator < "u" && navigator.clipboard?.writeText) {
|
|
49
49
|
navigator.clipboard.writeText(s).catch(() => K(s));
|
|
50
50
|
return;
|
|
@@ -69,7 +69,7 @@ function De({
|
|
|
69
69
|
onGridReady: a,
|
|
70
70
|
...u
|
|
71
71
|
}) {
|
|
72
|
-
const c = b(null), h = b(null), [F, w] = j(null), [
|
|
72
|
+
const c = b(null), h = b(null), [F, w] = j(null), [I, E] = j(!1), [O, D] = j(null), [W, L] = j(!1), M = b(null), P = b(null), S = b(null), U = v(() => [], []), $ = C(() => ({
|
|
73
73
|
numericColumn: {
|
|
74
74
|
cellClass: "ag-right-aligned-cell",
|
|
75
75
|
headerClass: "ag-right-aligned-header",
|
|
@@ -113,10 +113,10 @@ function De({
|
|
|
113
113
|
c.current.setFilterModel(t), c.current.onFilterChanged();
|
|
114
114
|
},
|
|
115
115
|
openMenu: (e, t, o = "column") => {
|
|
116
|
-
M.current = e,
|
|
116
|
+
M.current = e, P.current = t, S.current = o, L(!0);
|
|
117
117
|
},
|
|
118
118
|
closeMenu: () => {
|
|
119
|
-
M.current = null,
|
|
119
|
+
M.current = null, P.current = null, S.current = null, L(!1);
|
|
120
120
|
},
|
|
121
121
|
// Getters read from refs - O(1) per header, no memory allocation
|
|
122
122
|
get activeMenuColumnId() {
|
|
@@ -189,12 +189,12 @@ function De({
|
|
|
189
189
|
if (t == null || typeof t != "object") return t;
|
|
190
190
|
const o = H(e.column?.getColDef());
|
|
191
191
|
if (o && o.length > 0) {
|
|
192
|
-
const n =
|
|
192
|
+
const n = V(t, o);
|
|
193
193
|
if (o.length === 1) {
|
|
194
194
|
const d = o[0]?.field?.split(".").pop(), y = d ? t[d] : void 0;
|
|
195
195
|
return y && typeof y == "object" && "value" in y ? y.value ?? "" : n[0];
|
|
196
196
|
}
|
|
197
|
-
return
|
|
197
|
+
return T + n.join(x);
|
|
198
198
|
}
|
|
199
199
|
const i = Object.entries(t).map(([, n]) => n && typeof n == "object" && "value" in n ? n.value : typeof n != "object" && typeof n < "u" ? n : null).filter((n) => n != null);
|
|
200
200
|
return i.length === 0 ? "" : i.length === 1 ? i[0] : i.join(x);
|
|
@@ -211,8 +211,8 @@ function De({
|
|
|
211
211
|
return e.value;
|
|
212
212
|
}, []), Y = v((e) => {
|
|
213
213
|
const t = e?.data ?? "";
|
|
214
|
-
if (!t.includes(x) && !t.includes(
|
|
215
|
-
|
|
214
|
+
if (!t.includes(x) && !t.includes(T)) {
|
|
215
|
+
_(t);
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
218
|
const o = [], i = t.split(`
|
|
@@ -223,7 +223,7 @@ function De({
|
|
|
223
223
|
o.push("");
|
|
224
224
|
continue;
|
|
225
225
|
}
|
|
226
|
-
const k = d.split(" ").map((p) => p.startsWith(
|
|
226
|
+
const k = d.split(" ").map((p) => p.startsWith(T) ? { isSplit: !0, slots: p.slice(1).split(x) } : { isSplit: !1, slots: p.split(x) }), N = Math.max(1, ...k.map((p) => p.slots.length));
|
|
227
227
|
if (N === 1) {
|
|
228
228
|
o.push(k.map((p) => p.slots[0] ?? "").join(" "));
|
|
229
229
|
continue;
|
|
@@ -233,7 +233,7 @@ function De({
|
|
|
233
233
|
o.push(te.join(" "));
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
|
|
236
|
+
_(o.join(`
|
|
237
237
|
`));
|
|
238
238
|
}, []), R = v((e) => {
|
|
239
239
|
const t = e.value;
|
|
@@ -241,7 +241,7 @@ function De({
|
|
|
241
241
|
if (typeof t != "object") return String(t);
|
|
242
242
|
const o = H(e.column?.getColDef());
|
|
243
243
|
if (o && o.length > 0) {
|
|
244
|
-
const n =
|
|
244
|
+
const n = V(t, o);
|
|
245
245
|
return o.length === 1 ? n[0] : n.join(`
|
|
246
246
|
`);
|
|
247
247
|
}
|
|
@@ -293,7 +293,7 @@ function De({
|
|
|
293
293
|
/* @__PURE__ */ m(
|
|
294
294
|
xe,
|
|
295
295
|
{
|
|
296
|
-
isOpen:
|
|
296
|
+
isOpen: I,
|
|
297
297
|
columnId: O,
|
|
298
298
|
gridApi: F,
|
|
299
299
|
onClose: A.closeAdvancedFilter,
|
|
@@ -306,7 +306,7 @@ function De({
|
|
|
306
306
|
isOpen: W,
|
|
307
307
|
columnId: M.current,
|
|
308
308
|
gridApi: F,
|
|
309
|
-
anchor:
|
|
309
|
+
anchor: P.current,
|
|
310
310
|
variant: S.current,
|
|
311
311
|
onClose: A.closeMenu
|
|
312
312
|
}
|
|
@@ -335,6 +335,7 @@ function xe({
|
|
|
335
335
|
columnType: E,
|
|
336
336
|
selectOptions: c?.selectOptions,
|
|
337
337
|
isMultiSelect: c?.isMultiSelect,
|
|
338
|
+
datePickerVariant: c?.datePickerVariant,
|
|
338
339
|
initialModel: O,
|
|
339
340
|
api: l
|
|
340
341
|
}
|