@memobit/libs 3.35.0 → 3.36.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.
- package/dist/components/PageShell/AppNav.js +38 -27
- package/dist/components/PageShell/FilterField.css +1 -1
- package/dist/components/PageShell/FilterField2.js +243 -190
- package/dist/components/PageShell/FocusShell.js +60 -0
- package/dist/components/PageShell/PageParts.js +176 -155
- package/dist/components/PageShell/PageShell.css +1 -1
- package/dist/components/PageShell/PageShell2.js +11 -6
- package/dist/components/PageShell/WorkbenchPhone.js +75 -65
- package/dist/components/PageShell/WorkbenchShell.js +78 -64
- package/dist/components/PageShell/shellText.js +1 -1
- package/dist/components/PageShell/useConfirmedActions.js +35 -0
- package/dist/components/RouterAppFrame/RouterAppFrame.js +18 -16
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/index.d.ts +57 -7
- package/dist/router.d.ts +11 -2
- package/dist/version.js +1 -1
- package/dist/version.json +4 -4
- package/package.json +1 -1
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
import { Icon as v } from "../Icon/Icon2.js";
|
|
2
|
-
import { libMessages as
|
|
3
|
-
import { useMessages as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { InputSearch as
|
|
6
|
-
import { useAppFrame as
|
|
7
|
-
import { countActiveFilters as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
import { libMessages as z } from "../../contexts/LanguageContext/libMessages.js";
|
|
3
|
+
import { useMessages as O } from "../../hooks/useLanguage.js";
|
|
4
|
+
import { Button as A } from "../Button/Button2.js";
|
|
5
|
+
import { InputSearch as W } from "../InputSearch/InputSearch2.js";
|
|
6
|
+
import { useAppFrame as D } from "./useAppFrame.js";
|
|
7
|
+
import { countActiveFilters as R } from "./filterRules.js";
|
|
8
|
+
import { getMenuItems as V, navToMenuItems as H } from "./menuItems.js";
|
|
9
|
+
import { getHeadingText as $, getResultLabel as q } from "./shellText.js";
|
|
10
|
+
import { AppMark as E, PageMenu as G, PagePager as J, PageTabsRow as K, SortSheetBody as Q } from "./PageParts.js";
|
|
11
|
+
import { useConfirmedActions as U } from "./useConfirmedActions.js";
|
|
12
|
+
import { TabBar as X } from "./AppNav.js";
|
|
13
|
+
import { AppliedFilters as Y, FilterSections as Z } from "./FilterSections.js";
|
|
14
|
+
import { BottomSheet as S } from "./BottomSheet.js";
|
|
15
|
+
import { useCallback as ee, useState as te } from "react";
|
|
16
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
17
|
+
var _e = (l) => {
|
|
18
|
+
const { title: y, counts: m, search: o, sort: s, view: p, filters: r = [], values: d = {}, onFilterChange: C = () => {
|
|
19
|
+
}, onClearFilters: u, pagination: g, tabs: F, aside: N, footer: k, children: B } = l, t = O(z), { primaryAction: a, actions: I, dialog: M } = U(l.primaryAction, l.actions ?? []), n = D(), [w, f] = te(null), c = ee(() => f(null), []), b = R(r, d), x = q(l, t), P = s?.fields.find((L) => L.value === s.value.field)?.label, T = [$(l, t), P].filter(Boolean).join(" · "), h = n?.nav ?? [], _ = h.length > 1 && h.length <= 5, j = [..._ ? [] : H(h), ...V(I, n?.menuItems ?? [], !0)];
|
|
20
|
+
return /* @__PURE__ */ i("div", {
|
|
20
21
|
className: [
|
|
21
22
|
"page-shell",
|
|
22
23
|
"page-shell--workbench",
|
|
23
24
|
"page-shell--phone",
|
|
24
25
|
_ ? "page-shell--with-tabs" : "",
|
|
25
|
-
|
|
26
|
+
a?.variant ? `page-shell--fab-${a.variant}` : ""
|
|
26
27
|
].filter(Boolean).join(" "),
|
|
27
28
|
children: [
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ i("header", {
|
|
29
30
|
className: "page-shell__topbar",
|
|
30
31
|
children: [
|
|
31
|
-
|
|
32
|
-
app:
|
|
32
|
+
n && /* @__PURE__ */ e(E, {
|
|
33
|
+
app: n.app,
|
|
33
34
|
logoOnly: !0
|
|
34
35
|
}),
|
|
35
36
|
/* @__PURE__ */ e("h1", {
|
|
36
37
|
className: "page-shell__title",
|
|
37
|
-
children:
|
|
38
|
+
children: y
|
|
38
39
|
}),
|
|
39
40
|
/* @__PURE__ */ e("span", { className: "page-shell__spacer" }),
|
|
40
|
-
|
|
41
|
+
r.length > 0 && /* @__PURE__ */ i("button", {
|
|
41
42
|
type: "button",
|
|
42
43
|
className: "page-shell__icon-button",
|
|
43
44
|
onClick: () => f("filters"),
|
|
@@ -49,97 +50,106 @@ var ue = (r) => {
|
|
|
49
50
|
children: b
|
|
50
51
|
})]
|
|
51
52
|
}),
|
|
52
|
-
|
|
53
|
-
/* @__PURE__ */ e(
|
|
53
|
+
l.status ?? n?.status,
|
|
54
|
+
/* @__PURE__ */ e(G, { items: j })
|
|
54
55
|
]
|
|
55
56
|
}),
|
|
56
|
-
|
|
57
|
+
o && /* @__PURE__ */ e("div", {
|
|
57
58
|
className: "page-shell__search-row",
|
|
58
|
-
children: /* @__PURE__ */ e(
|
|
59
|
-
value:
|
|
60
|
-
placeholder:
|
|
61
|
-
autoFocus:
|
|
62
|
-
onChange:
|
|
59
|
+
children: /* @__PURE__ */ e(W, {
|
|
60
|
+
value: o.value,
|
|
61
|
+
placeholder: o.placeholder ?? t.search,
|
|
62
|
+
autoFocus: o.autoFocus,
|
|
63
|
+
onChange: o.onChange
|
|
63
64
|
})
|
|
64
65
|
}),
|
|
65
|
-
/* @__PURE__ */ e(
|
|
66
|
-
/* @__PURE__ */ e(
|
|
67
|
-
filters:
|
|
68
|
-
values:
|
|
66
|
+
/* @__PURE__ */ e(K, { tabs: F }),
|
|
67
|
+
/* @__PURE__ */ e(Y, {
|
|
68
|
+
filters: r,
|
|
69
|
+
values: d,
|
|
69
70
|
onFilterChange: C,
|
|
70
|
-
onClearFilters:
|
|
71
|
+
onClearFilters: u,
|
|
71
72
|
scroll: !0
|
|
72
73
|
}),
|
|
73
|
-
(
|
|
74
|
+
(s || p || g && g.pageCount > 1) && /* @__PURE__ */ i("div", {
|
|
74
75
|
className: "page-shell__result-row",
|
|
75
|
-
children: [(
|
|
76
|
+
children: [(s || p) && /* @__PURE__ */ i("button", {
|
|
76
77
|
type: "button",
|
|
77
78
|
className: "page-shell__result-line",
|
|
78
79
|
onClick: () => f("sort"),
|
|
79
|
-
children: [/* @__PURE__ */ e("span", { children:
|
|
80
|
+
children: [/* @__PURE__ */ e("span", { children: T || t.pageSortAndView }), /* @__PURE__ */ e(v, {
|
|
80
81
|
name: "caret-down",
|
|
81
82
|
size: "sm"
|
|
82
83
|
})]
|
|
83
|
-
}), /* @__PURE__ */ e(
|
|
84
|
+
}), /* @__PURE__ */ e(J, { pagination: g })]
|
|
84
85
|
}),
|
|
85
86
|
/* @__PURE__ */ e("div", {
|
|
86
87
|
className: "page-shell__content",
|
|
87
|
-
children:
|
|
88
|
+
children: B
|
|
88
89
|
}),
|
|
89
|
-
|
|
90
|
+
N && /* @__PURE__ */ e("div", {
|
|
91
|
+
className: "page-shell__aside page-shell__aside--stacked",
|
|
92
|
+
children: N
|
|
93
|
+
}),
|
|
94
|
+
k && /* @__PURE__ */ e("div", {
|
|
95
|
+
className: "page-shell__footer",
|
|
96
|
+
children: k
|
|
97
|
+
}),
|
|
98
|
+
a && /* @__PURE__ */ e("button", {
|
|
90
99
|
type: "button",
|
|
91
100
|
className: "page-shell__fab",
|
|
92
|
-
disabled:
|
|
93
|
-
onClick:
|
|
101
|
+
disabled: a.disabled,
|
|
102
|
+
onClick: a.onClick,
|
|
94
103
|
children: /* @__PURE__ */ e(v, {
|
|
95
|
-
name:
|
|
104
|
+
name: a.icon ?? "plus",
|
|
96
105
|
size: "lg"
|
|
97
106
|
})
|
|
98
107
|
}),
|
|
99
|
-
_ && /* @__PURE__ */ e(
|
|
100
|
-
/* @__PURE__ */ e(
|
|
101
|
-
isOpen:
|
|
108
|
+
_ && /* @__PURE__ */ e(X, { nav: h }),
|
|
109
|
+
/* @__PURE__ */ e(S, {
|
|
110
|
+
isOpen: w === "filters",
|
|
102
111
|
tall: !0,
|
|
103
112
|
title: t.filters,
|
|
104
113
|
onClose: c,
|
|
105
|
-
end: b > 0 &&
|
|
114
|
+
end: b > 0 && u ? /* @__PURE__ */ e("button", {
|
|
106
115
|
type: "button",
|
|
107
116
|
className: "page-shell__link",
|
|
108
|
-
onClick:
|
|
117
|
+
onClick: u,
|
|
109
118
|
children: t.pageClearAll
|
|
110
119
|
}) : void 0,
|
|
111
|
-
footer: /* @__PURE__ */ e(
|
|
120
|
+
footer: /* @__PURE__ */ e(A, {
|
|
112
121
|
variant: "info",
|
|
113
122
|
fullWidth: !0,
|
|
114
|
-
disabled:
|
|
123
|
+
disabled: m?.shown === 0,
|
|
115
124
|
onClick: c,
|
|
116
|
-
children:
|
|
125
|
+
children: m ? x(m.shown) : t.pageDone
|
|
117
126
|
}),
|
|
118
|
-
children: /* @__PURE__ */ e(
|
|
119
|
-
filters:
|
|
120
|
-
values:
|
|
127
|
+
children: /* @__PURE__ */ e(Z, {
|
|
128
|
+
filters: r,
|
|
129
|
+
values: d,
|
|
121
130
|
context: "sheet",
|
|
122
131
|
onFilterChange: C
|
|
123
132
|
})
|
|
124
133
|
}),
|
|
125
|
-
/* @__PURE__ */ e(
|
|
126
|
-
isOpen:
|
|
134
|
+
/* @__PURE__ */ e(S, {
|
|
135
|
+
isOpen: w === "sort",
|
|
127
136
|
title: t.pageSortAndView,
|
|
128
137
|
onClose: c,
|
|
129
|
-
footer: /* @__PURE__ */ e(
|
|
138
|
+
footer: /* @__PURE__ */ e(A, {
|
|
130
139
|
variant: "info",
|
|
131
140
|
fullWidth: !0,
|
|
132
141
|
onClick: c,
|
|
133
142
|
children: t.pageDone
|
|
134
143
|
}),
|
|
135
|
-
children: /* @__PURE__ */ e(
|
|
136
|
-
sort:
|
|
137
|
-
view:
|
|
144
|
+
children: /* @__PURE__ */ e(Q, {
|
|
145
|
+
sort: s,
|
|
146
|
+
view: p
|
|
138
147
|
})
|
|
139
|
-
})
|
|
148
|
+
}),
|
|
149
|
+
M
|
|
140
150
|
]
|
|
141
151
|
});
|
|
142
152
|
};
|
|
143
153
|
export {
|
|
144
|
-
|
|
154
|
+
_e as WorkbenchPhone
|
|
145
155
|
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { libMessages as
|
|
2
|
-
import { useMessages as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { InputSearch as
|
|
5
|
-
import { useBreakpoint as
|
|
6
|
-
import { Drawer as
|
|
7
|
-
import { useAppFrame as
|
|
8
|
-
import { countActiveFilters as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
1
|
+
import { libMessages as H } from "../../contexts/LanguageContext/libMessages.js";
|
|
2
|
+
import { useMessages as q } from "../../hooks/useLanguage.js";
|
|
3
|
+
import { Button as v } from "../Button/Button2.js";
|
|
4
|
+
import { InputSearch as z } from "../InputSearch/InputSearch2.js";
|
|
5
|
+
import { useBreakpoint as G } from "../../hooks/useBreakpoint.js";
|
|
6
|
+
import { Drawer as J } from "../Drawer/Drawer2.js";
|
|
7
|
+
import { useAppFrame as K } from "./useAppFrame.js";
|
|
8
|
+
import { countActiveFilters as Q } from "./filterRules.js";
|
|
9
|
+
import { getButtonActions as U, getMenuItems as I } from "./menuItems.js";
|
|
10
|
+
import { getHeadingText as X, getResultLabel as Y, hasViewExtras as Z } from "./shellText.js";
|
|
11
|
+
import { ActionButton as N, AppMark as O, PageMenu as P, PagePager as $, PageTabsRow as ee, SortDropdown as ae, ViewOptions as T, ViewToggle as se } from "./PageParts.js";
|
|
12
|
+
import { useConfirmedActions as le } from "./useConfirmedActions.js";
|
|
13
|
+
import { NavRail as te, SideNav as ie } from "./AppNav.js";
|
|
14
|
+
import { AppliedFilters as re, FilterSections as oe } from "./FilterSections.js";
|
|
15
|
+
import { WorkbenchPhone as ne } from "./WorkbenchPhone.js";
|
|
16
|
+
import { useState as ce } from "react";
|
|
16
17
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
17
|
-
var
|
|
18
|
-
const { isMobile:
|
|
19
|
-
if (
|
|
20
|
-
const { title:
|
|
21
|
-
}, onClearFilters: n, pagination:
|
|
18
|
+
var Me = (i) => {
|
|
19
|
+
const { isMobile: B, isTablet: a } = G(), l = q(H), t = K(), [D, g] = ce(!1), { primaryAction: p, actions: _, dialog: W } = le(i.primaryAction, i.actions ?? []);
|
|
20
|
+
if (B) return /* @__PURE__ */ e(ne, { ...i });
|
|
21
|
+
const { title: j, counts: b, search: o, sort: k, view: r, filters: h = [], values: u = {}, onFilterChange: w = () => {
|
|
22
|
+
}, onClearFilters: n, pagination: R, tabs: V, aside: d, footer: C, children: L } = i, A = i.status ?? t?.status, F = X(i, l), E = Y(i, l), m = Q(h, u), f = h.length > 0, x = t?.menuItems ?? [], c = t?.nav ?? [], M = /* @__PURE__ */ e(oe, {
|
|
22
23
|
filters: h,
|
|
23
24
|
values: u,
|
|
24
25
|
context: "panel",
|
|
25
26
|
onFilterChange: w
|
|
26
|
-
}),
|
|
27
|
+
}), S = m > 0 && /* @__PURE__ */ e("span", {
|
|
27
28
|
className: "page-shell__badge",
|
|
28
29
|
children: m
|
|
29
30
|
});
|
|
@@ -37,13 +38,13 @@ var ke = (o) => {
|
|
|
37
38
|
!a && /* @__PURE__ */ s("aside", {
|
|
38
39
|
className: "page-shell__side",
|
|
39
40
|
children: [
|
|
40
|
-
t && /* @__PURE__ */ e(
|
|
41
|
-
p && /* @__PURE__ */ e(
|
|
41
|
+
t && /* @__PURE__ */ e(O, { app: t.app }),
|
|
42
|
+
p && /* @__PURE__ */ e(N, {
|
|
42
43
|
action: p,
|
|
43
44
|
fullWidth: !0
|
|
44
45
|
}),
|
|
45
|
-
c.length > 1 && /* @__PURE__ */ e(
|
|
46
|
-
|
|
46
|
+
c.length > 1 && /* @__PURE__ */ e(ie, { nav: c }),
|
|
47
|
+
f && /* @__PURE__ */ s("div", {
|
|
47
48
|
className: "page-shell__side-group",
|
|
48
49
|
children: [/* @__PURE__ */ s("div", {
|
|
49
50
|
className: "page-shell__side-head",
|
|
@@ -52,7 +53,7 @@ var ke = (o) => {
|
|
|
52
53
|
className: "page-shell__group-title",
|
|
53
54
|
children: l.filters
|
|
54
55
|
}),
|
|
55
|
-
|
|
56
|
+
S,
|
|
56
57
|
/* @__PURE__ */ e("span", { className: "page-shell__spacer" }),
|
|
57
58
|
m > 0 && n && /* @__PURE__ */ e("button", {
|
|
58
59
|
type: "button",
|
|
@@ -61,12 +62,12 @@ var ke = (o) => {
|
|
|
61
62
|
children: l.pageClearAll
|
|
62
63
|
})
|
|
63
64
|
]
|
|
64
|
-
}),
|
|
65
|
+
}), M]
|
|
65
66
|
}),
|
|
66
|
-
r && /* @__PURE__ */ e(
|
|
67
|
+
r && /* @__PURE__ */ e(T, { view: r })
|
|
67
68
|
]
|
|
68
69
|
}),
|
|
69
|
-
a && c.length > 1 && /* @__PURE__ */ e(
|
|
70
|
+
a && c.length > 1 && /* @__PURE__ */ e(te, {
|
|
70
71
|
app: t?.app,
|
|
71
72
|
nav: c
|
|
72
73
|
}),
|
|
@@ -76,13 +77,13 @@ var ke = (o) => {
|
|
|
76
77
|
/* @__PURE__ */ s("header", {
|
|
77
78
|
className: "page-shell__toolbar",
|
|
78
79
|
children: [
|
|
79
|
-
a &&
|
|
80
|
+
a && f && /* @__PURE__ */ s(v, {
|
|
80
81
|
icon: "tune",
|
|
81
82
|
variant: "default",
|
|
82
|
-
onClick: () =>
|
|
83
|
-
children: [l.filters,
|
|
83
|
+
onClick: () => g(!0),
|
|
84
|
+
children: [l.filters, S]
|
|
84
85
|
}),
|
|
85
|
-
a && t && c.length <= 1 && /* @__PURE__ */ e(
|
|
86
|
+
a && t && c.length <= 1 && /* @__PURE__ */ e(O, {
|
|
86
87
|
app: t.app,
|
|
87
88
|
logoOnly: !0
|
|
88
89
|
}),
|
|
@@ -90,76 +91,89 @@ var ke = (o) => {
|
|
|
90
91
|
className: "page-shell__titles",
|
|
91
92
|
children: [/* @__PURE__ */ e("h1", {
|
|
92
93
|
className: "page-shell__title",
|
|
93
|
-
children:
|
|
94
|
-
}),
|
|
94
|
+
children: j
|
|
95
|
+
}), F && /* @__PURE__ */ e("p", {
|
|
95
96
|
className: "page-shell__heading",
|
|
96
|
-
children:
|
|
97
|
+
children: F
|
|
97
98
|
})]
|
|
98
99
|
}),
|
|
99
|
-
(!
|
|
100
|
-
a && p && /* @__PURE__ */ e(
|
|
101
|
-
a &&
|
|
102
|
-
a && /* @__PURE__ */ e(
|
|
100
|
+
(!o || a) && /* @__PURE__ */ e("span", { className: "page-shell__spacer" }),
|
|
101
|
+
a && p && /* @__PURE__ */ e(N, { action: p }),
|
|
102
|
+
a && A,
|
|
103
|
+
a && /* @__PURE__ */ e(P, { items: I(_, x, !0) }),
|
|
103
104
|
a && /* @__PURE__ */ e("span", { className: "page-shell__break" }),
|
|
104
|
-
|
|
105
|
+
o && /* @__PURE__ */ e(z, {
|
|
105
106
|
className: "page-shell__search",
|
|
106
|
-
value:
|
|
107
|
-
placeholder:
|
|
108
|
-
autoFocus:
|
|
109
|
-
onChange:
|
|
107
|
+
value: o.value,
|
|
108
|
+
placeholder: o.placeholder ?? l.search,
|
|
109
|
+
autoFocus: o.autoFocus,
|
|
110
|
+
onChange: o.onChange
|
|
110
111
|
}),
|
|
111
|
-
|
|
112
|
-
a && r && /* @__PURE__ */ e(
|
|
113
|
-
!a &&
|
|
114
|
-
!a &&
|
|
115
|
-
!a && /* @__PURE__ */ e(
|
|
112
|
+
k && /* @__PURE__ */ e(ae, { sort: k }),
|
|
113
|
+
a && r && /* @__PURE__ */ e(se, { view: r }),
|
|
114
|
+
!a && U(_).map((y) => /* @__PURE__ */ e(N, { action: y }, y.id)),
|
|
115
|
+
!a && A,
|
|
116
|
+
!a && /* @__PURE__ */ e(P, { items: I(_, x, !1) })
|
|
116
117
|
]
|
|
117
118
|
}),
|
|
118
|
-
/* @__PURE__ */ e(
|
|
119
|
+
/* @__PURE__ */ e(ee, { tabs: V }),
|
|
119
120
|
/* @__PURE__ */ s("div", {
|
|
120
121
|
className: "page-shell__status",
|
|
121
|
-
children: [/* @__PURE__ */ e(
|
|
122
|
+
children: [/* @__PURE__ */ e(re, {
|
|
122
123
|
filters: h,
|
|
123
124
|
values: u,
|
|
124
125
|
onFilterChange: w,
|
|
125
126
|
onClearFilters: n
|
|
126
|
-
}), /* @__PURE__ */ e(
|
|
127
|
+
}), /* @__PURE__ */ e($, { pagination: R })]
|
|
127
128
|
}),
|
|
128
129
|
/* @__PURE__ */ e("div", {
|
|
129
130
|
className: "page-shell__content",
|
|
130
|
-
children:
|
|
131
|
+
children: L
|
|
132
|
+
}),
|
|
133
|
+
a && d && /* @__PURE__ */ e("div", {
|
|
134
|
+
className: "page-shell__aside page-shell__aside--stacked",
|
|
135
|
+
children: d
|
|
136
|
+
}),
|
|
137
|
+
C && /* @__PURE__ */ e("div", {
|
|
138
|
+
className: "page-shell__footer",
|
|
139
|
+
children: C
|
|
131
140
|
})
|
|
132
141
|
]
|
|
133
142
|
}),
|
|
134
|
-
a &&
|
|
135
|
-
|
|
136
|
-
|
|
143
|
+
!a && d && /* @__PURE__ */ e("aside", {
|
|
144
|
+
className: "page-shell__aside page-shell__aside--docked",
|
|
145
|
+
children: d
|
|
146
|
+
}),
|
|
147
|
+
a && f && /* @__PURE__ */ e(J, {
|
|
148
|
+
isOpen: D,
|
|
149
|
+
onClose: () => g(!1),
|
|
137
150
|
position: "left",
|
|
138
151
|
title: l.filters,
|
|
139
152
|
footer: /* @__PURE__ */ s("div", {
|
|
140
153
|
className: "page-shell__drawer-footer",
|
|
141
|
-
children: [m > 0 && n && /* @__PURE__ */ e(
|
|
154
|
+
children: [m > 0 && n && /* @__PURE__ */ e(v, {
|
|
142
155
|
variant: "default",
|
|
143
156
|
onClick: n,
|
|
144
157
|
children: l.pageClearAll
|
|
145
|
-
}),
|
|
158
|
+
}), b && /* @__PURE__ */ e(v, {
|
|
146
159
|
variant: "info",
|
|
147
160
|
fullWidth: !0,
|
|
148
|
-
onClick: () =>
|
|
149
|
-
children:
|
|
161
|
+
onClick: () => g(!1),
|
|
162
|
+
children: E(b.shown)
|
|
150
163
|
})]
|
|
151
164
|
}),
|
|
152
165
|
children: /* @__PURE__ */ s("div", {
|
|
153
166
|
className: "page-shell__drawer-body",
|
|
154
|
-
children: [
|
|
167
|
+
children: [M, r && Z(r) && /* @__PURE__ */ e(T, {
|
|
155
168
|
view: r,
|
|
156
169
|
showToggle: !1
|
|
157
170
|
})]
|
|
158
171
|
})
|
|
159
|
-
})
|
|
172
|
+
}),
|
|
173
|
+
W
|
|
160
174
|
]
|
|
161
175
|
});
|
|
162
176
|
};
|
|
163
177
|
export {
|
|
164
|
-
|
|
178
|
+
Me as WorkbenchShell
|
|
165
179
|
};
|
|
@@ -31,7 +31,7 @@ var i = ({ counts: e, noun: a, heading: l }, r) => [e && a ? r.pageItemCount(e.s
|
|
|
31
31
|
icon: "map"
|
|
32
32
|
};
|
|
33
33
|
}
|
|
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);
|
|
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 || e.sliders?.length);
|
|
35
35
|
export {
|
|
36
36
|
i as getHeadingText,
|
|
37
37
|
s as getResultLabel,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { libMessages as s } from "../../contexts/LanguageContext/libMessages.js";
|
|
2
|
+
import { useMessages as c } from "../../hooks/useLanguage.js";
|
|
3
|
+
import a from "../ConfirmDialog/ConfirmDialog2.js";
|
|
4
|
+
import { useState as f } from "react";
|
|
5
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
6
|
+
var x = (r, l) => {
|
|
7
|
+
const i = c(s), [n, e] = f(null), t = (o) => o.confirm ? {
|
|
8
|
+
...o,
|
|
9
|
+
onClick: () => e(o)
|
|
10
|
+
} : o, m = /* @__PURE__ */ u(a, {
|
|
11
|
+
isOpen: n !== null,
|
|
12
|
+
title: n?.confirm?.title ?? n?.label ?? "",
|
|
13
|
+
message: n?.confirm?.message ?? "",
|
|
14
|
+
confirm: {
|
|
15
|
+
text: n?.confirm?.confirmLabel ?? i.confirm,
|
|
16
|
+
variant: n?.confirm?.variant ?? "danger",
|
|
17
|
+
onClick: () => {
|
|
18
|
+
n?.onClick(), e(null);
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
cancel: {
|
|
22
|
+
text: i.cancel,
|
|
23
|
+
onClick: () => e(null)
|
|
24
|
+
},
|
|
25
|
+
usePortal: !0
|
|
26
|
+
});
|
|
27
|
+
return {
|
|
28
|
+
primaryAction: r && t(r),
|
|
29
|
+
actions: l.map(t),
|
|
30
|
+
dialog: m
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
x as useConfirmedActions
|
|
35
|
+
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { AppFrame as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { matchPath as
|
|
5
|
-
var k = ({ nav: n, app:
|
|
6
|
-
const { pathname: t } = d(), a = f(),
|
|
1
|
+
import { AppFrame as i } from "../PageShell/AppFrame.js";
|
|
2
|
+
import { useMemo as e } from "react";
|
|
3
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
4
|
+
import { matchPath as p, useLocation as d, useNavigate as f } from "react-router";
|
|
5
|
+
var k = ({ nav: n, app: r, ...l }) => {
|
|
6
|
+
const { pathname: t } = d(), a = f(), s = e(() => n.map((o) => ({
|
|
7
7
|
id: o.path,
|
|
8
8
|
label: o.label,
|
|
9
9
|
icon: o.icon,
|
|
10
10
|
count: o.count,
|
|
11
|
-
|
|
11
|
+
group: o.group,
|
|
12
|
+
color: o.color,
|
|
13
|
+
isActive: p({
|
|
12
14
|
path: o.path,
|
|
13
15
|
end: o.end ?? o.path === "/"
|
|
14
|
-
}, t) !== null || (o.activeOn ?? []).some((
|
|
15
|
-
path:
|
|
16
|
+
}, t) !== null || (o.activeOn ?? []).some((u) => p({
|
|
17
|
+
path: u,
|
|
16
18
|
end: !1
|
|
17
19
|
}, t) !== null),
|
|
18
20
|
onSelect: () => a(o.path)
|
|
@@ -20,19 +22,19 @@ var k = ({ nav: n, app: e, ...s }) => {
|
|
|
20
22
|
n,
|
|
21
23
|
t,
|
|
22
24
|
a
|
|
23
|
-
]), c = n[0]?.path ?? "/", h =
|
|
24
|
-
...
|
|
25
|
-
onHomeClick:
|
|
25
|
+
]), c = n[0]?.path ?? "/", h = e(() => ({
|
|
26
|
+
...r,
|
|
27
|
+
onHomeClick: r.onHomeClick ?? (t === c ? void 0 : () => a(c))
|
|
26
28
|
}), [
|
|
27
|
-
|
|
29
|
+
r,
|
|
28
30
|
t,
|
|
29
31
|
c,
|
|
30
32
|
a
|
|
31
33
|
]);
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
...
|
|
34
|
+
return /* @__PURE__ */ m(i, {
|
|
35
|
+
...l,
|
|
34
36
|
app: h,
|
|
35
|
-
nav:
|
|
37
|
+
nav: s
|
|
36
38
|
});
|
|
37
39
|
};
|
|
38
40
|
export {
|