@memobit/libs 3.32.0 → 3.34.0

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.
@@ -1,153 +1,158 @@
1
1
  import { libMessages as V } from "../../contexts/LanguageContext/libMessages.js";
2
2
  import { useMessages as L } from "../../hooks/useLanguage.js";
3
- import { Button as _ } from "../Button/Button2.js";
4
- import { InputSearch as R } from "../InputSearch/InputSearch2.js";
5
- import { useBreakpoint as E } from "../../hooks/useBreakpoint.js";
6
- import { Drawer as H } from "../Drawer/Drawer2.js";
7
- import { useAppFrame as q } from "./useAppFrame.js";
8
- import { countActiveFilters as z } from "./filterRules.js";
9
- import { getHeadingText as G, getResultLabel as J } from "./shellText.js";
10
- import { ActionButton as v, AppMark as B, PageMenu as M, PagePager as K, SortDropdown as Q, ViewOptions as S, ViewToggle as U } from "./PageParts.js";
11
- import { NavRail as X, SideNav as Y } from "./AppNav.js";
12
- import { AppliedFilters as Z, FilterSections as $ } from "./FilterSections.js";
13
- import { getButtonActions as ee, getMenuItems as y } from "./menuItems.js";
14
- import { WorkbenchPhone as le } from "./WorkbenchPhone.js";
15
- import { useState as ae } from "react";
16
- import { jsx as e, jsxs as a } from "react/jsx-runtime";
17
- var Ne = (n) => {
18
- const { isMobile: I, isTablet: l } = E(), t = L(V), r = q(), [O, g] = ae(!1);
19
- if (I) return /* @__PURE__ */ e(le, { ...n });
20
- const { title: D, counts: N, primaryAction: c, actions: d = [], search: p, sort: b, view: s, filters: h = [], values: u = {}, onFilterChange: w = () => {
21
- }, onClearFilters: i, pagination: P, children: T } = n, k = G(n, t), W = J(n, t), m = z(h, u), f = h.length > 0, C = r?.menuItems ?? [], o = r?.nav ?? [], j = !!(s && (s.columns || s.groupBy || s.toggles?.length)), A = /* @__PURE__ */ e($, {
3
+ import { Button as f } from "../Button/Button2.js";
4
+ import { InputSearch as E } from "../InputSearch/InputSearch2.js";
5
+ import { useBreakpoint as H } from "../../hooks/useBreakpoint.js";
6
+ import { Drawer as q } from "../Drawer/Drawer2.js";
7
+ import { useAppFrame as z } from "./useAppFrame.js";
8
+ import { countActiveFilters as G } from "./filterRules.js";
9
+ import { getHeadingText as J, getResultLabel as K, hasViewExtras as Q } from "./shellText.js";
10
+ import { ActionButton as v, AppMark as S, PageMenu as I, PagePager as U, PageTabsRow as X, SortDropdown as Y, ViewOptions as O, ViewToggle as Z } from "./PageParts.js";
11
+ import { NavRail as $, SideNav as ee } from "./AppNav.js";
12
+ import { AppliedFilters as ae, FilterSections as se } from "./FilterSections.js";
13
+ import { getButtonActions as le, getMenuItems as P } from "./menuItems.js";
14
+ import { WorkbenchPhone as te } from "./WorkbenchPhone.js";
15
+ import { useState as re } from "react";
16
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
17
+ var ke = (o) => {
18
+ const { isMobile: T, isTablet: a } = H(), l = L(V), t = z(), [y, d] = re(!1);
19
+ if (T) return /* @__PURE__ */ e(te, { ...o });
20
+ const { title: B, counts: N, primaryAction: p, actions: g = [], search: i, sort: b, view: r, filters: h = [], values: u = {}, onFilterChange: w = () => {
21
+ }, onClearFilters: n, pagination: D, tabs: W, children: j } = o, k = o.status ?? t?.status, C = J(o, l), R = K(o, l), m = G(h, u), _ = h.length > 0, A = t?.menuItems ?? [], c = t?.nav ?? [], F = /* @__PURE__ */ e(se, {
22
22
  filters: h,
23
23
  values: u,
24
24
  context: "panel",
25
25
  onFilterChange: w
26
- }), F = m > 0 && /* @__PURE__ */ e("span", {
26
+ }), x = m > 0 && /* @__PURE__ */ e("span", {
27
27
  className: "page-shell__badge",
28
28
  children: m
29
29
  });
30
- return /* @__PURE__ */ a("div", {
30
+ return /* @__PURE__ */ s("div", {
31
31
  className: [
32
32
  "page-shell",
33
33
  "page-shell--workbench",
34
- l ? "page-shell--tablet" : "page-shell--desktop"
34
+ a ? "page-shell--tablet" : "page-shell--desktop"
35
35
  ].join(" "),
36
36
  children: [
37
- !l && /* @__PURE__ */ a("aside", {
37
+ !a && /* @__PURE__ */ s("aside", {
38
38
  className: "page-shell__side",
39
39
  children: [
40
- r && /* @__PURE__ */ e(B, { app: r.app }),
41
- c && /* @__PURE__ */ e(v, {
42
- action: c,
40
+ t && /* @__PURE__ */ e(S, { app: t.app }),
41
+ p && /* @__PURE__ */ e(v, {
42
+ action: p,
43
43
  fullWidth: !0
44
44
  }),
45
- o.length > 1 && /* @__PURE__ */ e(Y, { nav: o }),
46
- f && /* @__PURE__ */ a("div", {
45
+ c.length > 1 && /* @__PURE__ */ e(ee, { nav: c }),
46
+ _ && /* @__PURE__ */ s("div", {
47
47
  className: "page-shell__side-group",
48
- children: [/* @__PURE__ */ a("div", {
48
+ children: [/* @__PURE__ */ s("div", {
49
49
  className: "page-shell__side-head",
50
50
  children: [
51
51
  /* @__PURE__ */ e("span", {
52
52
  className: "page-shell__group-title",
53
- children: t.filters
53
+ children: l.filters
54
54
  }),
55
- F,
55
+ x,
56
56
  /* @__PURE__ */ e("span", { className: "page-shell__spacer" }),
57
- m > 0 && i && /* @__PURE__ */ e("button", {
57
+ m > 0 && n && /* @__PURE__ */ e("button", {
58
58
  type: "button",
59
59
  className: "page-shell__link",
60
- onClick: i,
61
- children: t.pageClearAll
60
+ onClick: n,
61
+ children: l.pageClearAll
62
62
  })
63
63
  ]
64
- }), A]
64
+ }), F]
65
65
  }),
66
- s && /* @__PURE__ */ e(S, { view: s })
66
+ r && /* @__PURE__ */ e(O, { view: r })
67
67
  ]
68
68
  }),
69
- l && o.length > 1 && /* @__PURE__ */ e(X, {
70
- app: r?.app,
71
- nav: o
69
+ a && c.length > 1 && /* @__PURE__ */ e($, {
70
+ app: t?.app,
71
+ nav: c
72
72
  }),
73
- /* @__PURE__ */ a("div", {
73
+ /* @__PURE__ */ s("div", {
74
74
  className: "page-shell__main",
75
75
  children: [
76
- /* @__PURE__ */ a("header", {
76
+ /* @__PURE__ */ s("header", {
77
77
  className: "page-shell__toolbar",
78
78
  children: [
79
- l && f && /* @__PURE__ */ a(_, {
79
+ a && _ && /* @__PURE__ */ s(f, {
80
80
  icon: "tune",
81
81
  variant: "default",
82
- onClick: () => g(!0),
83
- children: [t.filters, F]
82
+ onClick: () => d(!0),
83
+ children: [l.filters, x]
84
84
  }),
85
- l && r && o.length <= 1 && /* @__PURE__ */ e(B, {
86
- app: r.app,
85
+ a && t && c.length <= 1 && /* @__PURE__ */ e(S, {
86
+ app: t.app,
87
87
  logoOnly: !0
88
88
  }),
89
- /* @__PURE__ */ a("div", {
89
+ /* @__PURE__ */ s("div", {
90
90
  className: "page-shell__titles",
91
91
  children: [/* @__PURE__ */ e("h1", {
92
92
  className: "page-shell__title",
93
- children: D
94
- }), k && /* @__PURE__ */ e("p", {
93
+ children: B
94
+ }), C && /* @__PURE__ */ e("p", {
95
95
  className: "page-shell__heading",
96
- children: k
96
+ children: C
97
97
  })]
98
98
  }),
99
- l && c && /* @__PURE__ */ e(v, { action: c }),
100
- l && /* @__PURE__ */ e(M, { items: y(d, C, !0) }),
101
- l && /* @__PURE__ */ e("span", { className: "page-shell__break" }),
102
- p && /* @__PURE__ */ e(R, {
99
+ (!i || a) && /* @__PURE__ */ e("span", { className: "page-shell__spacer" }),
100
+ a && p && /* @__PURE__ */ e(v, { action: p }),
101
+ a && k,
102
+ a && /* @__PURE__ */ e(I, { items: P(g, A, !0) }),
103
+ a && /* @__PURE__ */ e("span", { className: "page-shell__break" }),
104
+ i && /* @__PURE__ */ e(E, {
103
105
  className: "page-shell__search",
104
- value: p.value,
105
- placeholder: p.placeholder ?? t.search,
106
- onChange: p.onChange
106
+ value: i.value,
107
+ placeholder: i.placeholder ?? l.search,
108
+ autoFocus: i.autoFocus,
109
+ onChange: i.onChange
107
110
  }),
108
- b && /* @__PURE__ */ e(Q, { sort: b }),
109
- l && s && /* @__PURE__ */ e(U, { view: s }),
110
- !l && ee(d).map((x) => /* @__PURE__ */ e(v, { action: x }, x.id)),
111
- !l && /* @__PURE__ */ e(M, { items: y(d, C, !1) })
111
+ b && /* @__PURE__ */ e(Y, { sort: b }),
112
+ a && r && /* @__PURE__ */ e(Z, { view: r }),
113
+ !a && le(g).map((M) => /* @__PURE__ */ e(v, { action: M }, M.id)),
114
+ !a && k,
115
+ !a && /* @__PURE__ */ e(I, { items: P(g, A, !1) })
112
116
  ]
113
117
  }),
114
- /* @__PURE__ */ a("div", {
118
+ /* @__PURE__ */ e(X, { tabs: W }),
119
+ /* @__PURE__ */ s("div", {
115
120
  className: "page-shell__status",
116
- children: [/* @__PURE__ */ e(Z, {
121
+ children: [/* @__PURE__ */ e(ae, {
117
122
  filters: h,
118
123
  values: u,
119
124
  onFilterChange: w,
120
- onClearFilters: i
121
- }), /* @__PURE__ */ e(K, { pagination: P })]
125
+ onClearFilters: n
126
+ }), /* @__PURE__ */ e(U, { pagination: D })]
122
127
  }),
123
128
  /* @__PURE__ */ e("div", {
124
129
  className: "page-shell__content",
125
- children: T
130
+ children: j
126
131
  })
127
132
  ]
128
133
  }),
129
- l && f && /* @__PURE__ */ e(H, {
130
- isOpen: O,
131
- onClose: () => g(!1),
134
+ a && _ && /* @__PURE__ */ e(q, {
135
+ isOpen: y,
136
+ onClose: () => d(!1),
132
137
  position: "left",
133
- title: t.filters,
134
- footer: /* @__PURE__ */ a("div", {
138
+ title: l.filters,
139
+ footer: /* @__PURE__ */ s("div", {
135
140
  className: "page-shell__drawer-footer",
136
- children: [m > 0 && i && /* @__PURE__ */ e(_, {
141
+ children: [m > 0 && n && /* @__PURE__ */ e(f, {
137
142
  variant: "default",
138
- onClick: i,
139
- children: t.pageClearAll
140
- }), N && /* @__PURE__ */ e(_, {
143
+ onClick: n,
144
+ children: l.pageClearAll
145
+ }), N && /* @__PURE__ */ e(f, {
141
146
  variant: "info",
142
147
  fullWidth: !0,
143
- onClick: () => g(!1),
144
- children: W(N.shown)
148
+ onClick: () => d(!1),
149
+ children: R(N.shown)
145
150
  })]
146
151
  }),
147
- children: /* @__PURE__ */ a("div", {
152
+ children: /* @__PURE__ */ s("div", {
148
153
  className: "page-shell__drawer-body",
149
- children: [A, s && j && /* @__PURE__ */ e(S, {
150
- view: s,
154
+ children: [F, r && Q(r) && /* @__PURE__ */ e(O, {
155
+ view: r,
151
156
  showToggle: !1
152
157
  })]
153
158
  })
@@ -156,5 +161,5 @@ var Ne = (n) => {
156
161
  });
157
162
  };
158
163
  export {
159
- Ne as WorkbenchShell
164
+ ke as WorkbenchShell
160
165
  };
@@ -1,14 +1,18 @@
1
- import { formatAppDate as b } from "../../helpers/Datetime.js";
2
- var A = 4, y = 24, $ = 10, k = 8, v = 14, s = (t) => typeof t == "string" || typeof t == "number", u = (t) => Array.isArray(t) ? t.filter(s) : [], d = (t) => s(t) && t !== "" ? t : null, g = (t) => typeof t == "number" ? t : 0, c = (t, n, e) => {
3
- const [r, i] = u(t);
1
+ import { formatAppDate as u } from "../../helpers/Datetime.js";
2
+ var $ = 4, S = 24, k = 10, M = 8, v = 14, s = (t) => typeof t == "string" || typeof t == "number", d = (t) => Array.isArray(t) ? t.filter(s) : [], f = (t) => s(t) && t !== "" ? t : null, h = (t) => typeof t == "number" ? t : 0, y = (t, n, e) => {
3
+ const [r, i] = d(t);
4
4
  return [typeof r == "number" ? r : n, typeof i == "number" ? i : e];
5
- }, M = (t) => typeof t == "object" && t !== null && !Array.isArray(t), m = (t) => M(t) ? t : { text: "" }, S = (t, n) => t.wordMatch ? [{
5
+ }, x = (t) => {
6
+ const [n, e] = d(t);
7
+ return [typeof n == "string" ? n : "", typeof e == "string" ? e : ""];
8
+ }, C = (t) => typeof t == "object" && t !== null && !Array.isArray(t), g = (t) => C(t) ? t : { text: "" }, E = (t, n) => t.wordMatch ? [{
6
9
  value: "or",
7
10
  label: n.anyWord
8
11
  }, {
9
12
  value: "and",
10
13
  label: n.allWords
11
- }] : t.modes, C = (t) => {
14
+ }] : t.modes, V = (t) => {
15
+ if (t.defaultValue !== void 0) return t.defaultValue;
12
16
  switch (t.kind) {
13
17
  case "multi":
14
18
  return [];
@@ -24,100 +28,108 @@ var A = 4, y = 24, $ = 10, k = 8, v = 14, s = (t) => typeof t == "string" || typ
24
28
  default:
25
29
  return null;
26
30
  }
27
- }, h = (t, n) => {
31
+ }, c = (t) => JSON.stringify(Array.isArray(t) ? [...t].map(String).sort() : t ?? null), A = (t, n) => {
32
+ if (t.defaultValue !== void 0) return c(n) !== c(t.defaultValue);
28
33
  switch (t.kind) {
29
34
  case "single":
30
35
  case "date":
31
- return d(n) !== null;
36
+ return f(n) !== null;
32
37
  case "multi":
33
- return u(n).length > 0;
38
+ return d(n).length > 0;
34
39
  case "range": {
35
- const [e, r] = c(n, t.min, t.max);
40
+ const [e, r] = y(n, t.min, t.max);
36
41
  return e > t.min || r < t.max;
37
42
  }
38
43
  case "rating":
39
- return g(n) > 0;
44
+ return h(n) > 0;
40
45
  case "toggle":
41
46
  return n === !0;
42
47
  case "text":
43
- return m(n).text.trim() !== "";
48
+ return g(n).text.trim() !== "";
49
+ case "date-range":
50
+ return x(n).some((e) => e !== "");
44
51
  }
45
- }, _ = (t, n) => t.filter((e) => h(e, n[e.id])).length, f = (t, n) => t.find((e) => e.value === n)?.label ?? String(n), w = (t, n) => {
52
+ }, w = (t, n) => t.filter((e) => A(e, n[e.id])).length, m = (t, n) => t.find((e) => e.value === n)?.label ?? String(n), D = (t, n) => {
46
53
  if (t.kind !== "single" && t.kind !== "multi") return null;
47
54
  if (t.control) return t.control;
48
55
  const e = t.options.length;
49
56
  if (t.kind === "single") {
50
- if (e > $) return "search-list";
57
+ if (e > k) return "search-list";
51
58
  const r = t.options.reduce((i, a) => i + a.label.length, 3);
52
- return e <= A && r <= y ? "segmented" : n === "sheet" ? "chips" : "radio";
59
+ return e <= $ && r <= S ? "segmented" : n === "sheet" ? "chips" : "radio";
53
60
  }
54
- return e > v ? "search-list" : e <= k || n === "sheet" ? "chips" : "checklist";
55
- }, E = (t, n, e) => {
61
+ return e > v ? "search-list" : e <= M || n === "sheet" ? "chips" : "checklist";
62
+ }, T = (t, n, e) => {
56
63
  switch (t.kind) {
57
64
  case "single": {
58
- const r = d(n);
59
- return r === null ? "" : f(t.options, r);
65
+ const r = f(n);
66
+ return r === null ? `${t.label}: ${e.any}` : m(t.options, r);
60
67
  }
61
68
  case "multi": {
62
- const r = u(n);
63
- return r.length === 1 ? f(t.options, r[0]) : e.selectedCount(r.length);
69
+ const r = d(n);
70
+ return r.length === 1 ? m(t.options, r[0]) : e.selectedCount(r.length);
64
71
  }
65
72
  case "range": {
66
- const [r, i] = c(n, t.min, t.max), a = t.unit ? ` ${t.unit}` : "";
73
+ const [r, i] = y(n, t.min, t.max), a = t.unit ? ` ${t.unit}` : "";
67
74
  return r > t.min && i < t.max ? `${r}–${i}${a}` : r > t.min ? `≥ ${r}${a}` : `≤ ${i}${a}`;
68
75
  }
69
76
  case "rating":
70
- return e.ratingAtLeast(g(n));
77
+ return e.ratingAtLeast(h(n));
71
78
  case "toggle":
72
79
  return t.label;
73
80
  case "text": {
74
- const { text: r, mode: i } = m(n), a = S(t, e), l = a && i !== a[0]?.value ? a.find((o) => o.value === i)?.label : void 0;
75
- return l ? `“${r.trim()}” · ${l}` : `“${r.trim()}”`;
81
+ const { text: r, mode: i } = g(n), a = E(t, e), o = a && i !== a[0]?.value ? a.find((l) => l.value === i)?.label : void 0;
82
+ return o ? `“${r.trim()}” · ${o}` : `“${r.trim()}”`;
76
83
  }
77
84
  case "date": {
78
- const r = d(n);
85
+ const r = f(n);
79
86
  if (r === null) return "";
80
- const i = b(String(r));
87
+ const i = u(String(r));
81
88
  return t.relation === "until" ? e.dateUntil(i) : e.dateSince(i);
82
89
  }
90
+ case "date-range": {
91
+ const [r, i] = x(n);
92
+ return r && i ? `${u(r)} – ${u(i)}` : r ? e.dateSince(u(r)) : i ? e.dateUntil(u(i)) : "";
93
+ }
83
94
  }
84
95
  }, F = (t, n, e) => t.flatMap((r) => {
85
96
  const i = n[r.id];
86
- if (!h(r, i)) return [];
97
+ if (!A(r, i)) return [];
87
98
  if (r.kind === "multi") {
88
- const l = u(i);
89
- return l.map((o) => ({
90
- key: `${r.id}:${o}`,
99
+ const o = d(i);
100
+ return o.map((l) => ({
101
+ key: `${r.id}:${l}`,
91
102
  filterId: r.id,
92
- label: f(r.options, o),
93
- next: l.filter((x) => x !== o)
103
+ label: m(r.options, l),
104
+ next: o.filter((b) => b !== l)
94
105
  }));
95
106
  }
96
107
  const a = r.kind === "text" ? {
97
- ...m(i),
108
+ ...g(i),
98
109
  text: ""
99
- } : C(r);
110
+ } : V(r);
100
111
  return [{
101
112
  key: r.id,
102
113
  filterId: r.id,
103
- label: E(r, i, e),
114
+ label: T(r, i, e),
104
115
  next: a
105
116
  }];
106
117
  });
107
118
  export {
108
- _ as countActiveFilters,
109
- C as defaultFilterValue,
110
- E as filterSummary,
119
+ w as countActiveFilters,
120
+ V as defaultFilterValue,
121
+ T as filterSummary,
111
122
  F as getAppliedFilters,
112
- S as getTextModes,
113
- h as isFilterActive,
123
+ E as getTextModes,
124
+ A as isFilterActive,
114
125
  s as isScalar,
115
- M as isTextFilterValue,
116
- f as optionLabel,
117
- w as pickControl,
118
- u as toList,
119
- g as toNumber,
120
- c as toRange,
121
- d as toScalar,
122
- m as toText
126
+ C as isTextFilterValue,
127
+ m as optionLabel,
128
+ D as pickControl,
129
+ x as toDateRange,
130
+ d as toList,
131
+ h as toNumber,
132
+ y as toRange,
133
+ f as toScalar,
134
+ g as toText
123
135
  };
@@ -1,30 +1,37 @@
1
- import { isTextFilterValue as u, toList as a, toScalar as d } from "./filterRules.js";
2
- var v = (e, n) => a(e).flatMap((t) => {
3
- const i = n.find((r) => r === t);
4
- return i === void 0 ? [] : [i];
5
- }), g = (e, n) => n.find((t) => t === e), h = (e) => {
6
- const [n, t] = a(e);
1
+ import { isTextFilterValue as s, toDateRange as d, toList as i, toScalar as f } from "./filterRules.js";
2
+ var g = (e, n) => i(e).flatMap((t) => {
3
+ const r = n.find((a) => a === t);
4
+ return r === void 0 ? [] : [r];
5
+ }), m = (e, n) => n.find((t) => t === e), h = (e) => {
6
+ const [n, t] = i(e);
7
7
  return typeof n == "number" && typeof t == "number" ? [n, t] : null;
8
- }, m = (e) => u(e) ? e : null, F = (e, n) => e.flatMap((t) => {
8
+ }, F = (e) => s(e) ? e : null, c = (e) => {
9
+ const [n, t] = d(e);
10
+ return {
11
+ from: n || null,
12
+ to: t || null
13
+ };
14
+ }, k = (e, n) => e.flatMap((t) => {
9
15
  if (t.kind !== "single" && t.kind !== "multi") return [];
10
- const i = new Set(t.options.map((l) => l.value)), r = n[t.id];
16
+ const r = new Set(t.options.map((l) => l.value)), a = n[t.id];
11
17
  if (t.kind === "single") {
12
- const l = d(r);
13
- return l !== null && !i.has(l) ? [{
18
+ const l = f(a);
19
+ return l !== null && !r.has(l) ? [{
14
20
  id: t.id,
15
21
  value: null
16
22
  }] : [];
17
23
  }
18
- const o = a(r), s = o.filter((l) => i.has(l));
19
- return s.length === o.length ? [] : [{
24
+ const o = i(a), u = o.filter((l) => r.has(l));
25
+ return u.length === o.length ? [] : [{
20
26
  id: t.id,
21
- value: s
27
+ value: u
22
28
  }];
23
29
  });
24
30
  export {
25
- g as asFilterKey,
26
- v as asFilterKeys,
31
+ c as asFilterDateRange,
32
+ m as asFilterKey,
33
+ g as asFilterKeys,
27
34
  h as asFilterRange,
28
- m as asFilterText,
29
- F as getStaleFilterChanges
35
+ F as asFilterText,
36
+ k as getStaleFilterChanges
30
37
  };
@@ -0,0 +1,21 @@
1
+ var d = (a, s, i, l) => {
2
+ const u = Object.keys(l), v = s.map((t) => new Set(u.filter((n) => l[n](t, i[n])))), f = (t, n) => u.every((r) => r === n || v[t].has(r));
3
+ return a.map((t) => {
4
+ const n = l[t.id];
5
+ if (!n || t.kind !== "single" && t.kind !== "multi") return t;
6
+ const r = s.filter((e, o) => f(o, t.id)), k = t.options.map((e) => {
7
+ const o = t.kind === "multi" ? [e.value] : e.value;
8
+ return {
9
+ ...e,
10
+ count: r.filter((m) => n(m, o)).length
11
+ };
12
+ });
13
+ return {
14
+ ...t,
15
+ options: k
16
+ };
17
+ });
18
+ };
19
+ export {
20
+ d as applyLiveCounts
21
+ };
@@ -1,17 +1,18 @@
1
- var o = (l) => l.map((e) => ({
1
+ var r = (l) => l.map((e) => ({
2
2
  label: e.label,
3
3
  icon: e.icon,
4
4
  onClick: e.onClick,
5
5
  isActive: !1,
6
- separator: e.separator
7
- })), r = (l) => l.filter((e) => !e.menu), t = (l, e, a) => [...o(a ? l : l.filter((n) => n.menu)), ...e], i = (l) => l.map((e) => ({
6
+ separator: e.separator,
7
+ disabled: e.disabled
8
+ })), s = (l) => l.filter((e) => !e.menu), i = (l, e, a) => [...r(a ? l : l.filter((n) => n.menu)), ...e], o = (l) => l.map((e) => ({
8
9
  label: e.label,
9
10
  icon: e.icon,
10
11
  onClick: e.onSelect,
11
12
  isActive: e.isActive
12
13
  }));
13
14
  export {
14
- r as getButtonActions,
15
- t as getMenuItems,
16
- i as navToMenuItems
15
+ s as getButtonActions,
16
+ i as getMenuItems,
17
+ o as navToMenuItems
17
18
  };
@@ -1,4 +1,4 @@
1
- var t = ({ counts: e, noun: a, heading: l }, r) => [e && a ? r.pageItemCount(e.shown, e.total, a.one, a.other) : void 0, l].filter(Boolean).join(" · "), v = ({ noun: e, resultLabel: a }, l) => a ?? (e ? (r) => l.pageShowItems(r, e.one, e.other) : l.pageShowResults), i = (e, a) => {
1
+ var i = ({ counts: e, noun: a, heading: l }, r) => [e && a ? r.pageItemCount(e.shown, e.total, a.one, a.other) : void 0, l].filter(Boolean).join(" · "), s = ({ noun: e, resultLabel: a }, l) => a ?? (e ? (r) => l.pageShowItems(r, e.one, e.other) : l.pageShowResults), t = (e, a) => {
2
2
  switch (e) {
3
3
  case "cards":
4
4
  return {
@@ -31,9 +31,10 @@ var t = ({ counts: e, noun: a, heading: l }, r) => [e && a ? r.pageItemCount(e.s
31
31
  icon: "map"
32
32
  };
33
33
  }
34
- }, s = (e, a) => e.map((l) => typeof l == "string" ? i(l, a) : l);
34
+ }, g = (e, a) => e.map((l) => typeof l == "string" ? t(l, a) : l), n = (e) => !!(e.columns || e.groupBy || e.toggles?.length || e.choices?.length);
35
35
  export {
36
- t as getHeadingText,
37
- v as getResultLabel,
38
- s as resolveViewModes
36
+ i as getHeadingText,
37
+ s as getResultLabel,
38
+ n as hasViewExtras,
39
+ g as resolveViewModes
39
40
  };
@@ -1,9 +1,10 @@
1
- import { libMessages as t } from "../../contexts/LanguageContext/libMessages.js";
2
- import { useMessages as a } from "../../hooks/useLanguage.js";
1
+ import { libMessages as a } from "../../contexts/LanguageContext/libMessages.js";
2
+ import { useMessages as t } from "../../hooks/useLanguage.js";
3
3
  import { useMemo as s } from "react";
4
4
  var g = () => {
5
- const e = a(t);
5
+ const e = t(a);
6
6
  return s(() => ({
7
+ any: e.pageAny,
7
8
  selectedCount: e.pageSelectedCount,
8
9
  ratingAtLeast: e.pageRatingAtLeast,
9
10
  dateSince: e.pageDateSince,
@@ -1,23 +1,26 @@
1
1
  import { AppFrame as m } from "../PageShell/AppFrame.js";
2
2
  import { useMemo as p } from "react";
3
- import { jsx as s } from "react/jsx-runtime";
4
- import { matchPath as l, useLocation as u, useNavigate as d } from "react-router";
5
- var g = ({ nav: n, app: e, ...r }) => {
6
- const { pathname: t } = u(), a = d(), h = p(() => n.map((o) => ({
3
+ import { jsx as u } from "react/jsx-runtime";
4
+ import { matchPath as r, useLocation as d, useNavigate as f } from "react-router";
5
+ var k = ({ nav: n, app: e, ...s }) => {
6
+ const { pathname: t } = d(), a = f(), l = p(() => n.map((o) => ({
7
7
  id: o.path,
8
8
  label: o.label,
9
9
  icon: o.icon,
10
10
  count: o.count,
11
- isActive: l({
11
+ isActive: r({
12
12
  path: o.path,
13
13
  end: o.end ?? o.path === "/"
14
- }, t) !== null,
14
+ }, t) !== null || (o.activeOn ?? []).some((i) => r({
15
+ path: i,
16
+ end: !1
17
+ }, t) !== null),
15
18
  onSelect: () => a(o.path)
16
19
  })), [
17
20
  n,
18
21
  t,
19
22
  a
20
- ]), c = n[0]?.path ?? "/", i = p(() => ({
23
+ ]), c = n[0]?.path ?? "/", h = p(() => ({
21
24
  ...e,
22
25
  onHomeClick: e.onHomeClick ?? (t === c ? void 0 : () => a(c))
23
26
  }), [
@@ -26,12 +29,12 @@ var g = ({ nav: n, app: e, ...r }) => {
26
29
  c,
27
30
  a
28
31
  ]);
29
- return /* @__PURE__ */ s(m, {
30
- ...r,
31
- app: i,
32
- nav: h
32
+ return /* @__PURE__ */ u(m, {
33
+ ...s,
34
+ app: h,
35
+ nav: l
33
36
  });
34
37
  };
35
38
  export {
36
- g as RouterAppFrame
39
+ k as RouterAppFrame
37
40
  };
@@ -23,7 +23,7 @@ var r = (i) => {
23
23
  const o = {
24
24
  ...i,
25
25
  lib: d,
26
- libBuildNumber: 659,
26
+ libBuildNumber: 668,
27
27
  libCommit: n,
28
28
  libBuildDate: t
29
29
  };