@m4l/components 9.87.1 → 9.87.2
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/components/SideBar/constants.d.ts +1 -1
- package/components/SideBar/constants.js +1 -1
- package/components/SideBar/subcomponents/SideBarNavigation/SideBarNavigation.js +86 -86
- package/components/SideBar/subcomponents/SideBarNavigation/constants.d.ts +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/constants.d.ts.map +1 -1
- package/components/SideBar/subcomponents/SideBarNavigation/constants.js +13 -12
- package/components/SideBar/subcomponents/SideBarNavigation/slots/styled.d.ts +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/slots/styled.d.ts.map +1 -1
- package/components/SideBar/subcomponents/SideBarNavigation/slots/styled.js +14 -15
- package/components/SideBar/subcomponents/SideBarNavigation/useSidebarResize.d.ts +1 -1
- package/components/SideBar/subcomponents/SideBarNavigation/useSidebarResize.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -7,7 +7,7 @@ export declare const PATH_ICONS = "/frontend/domain/microfrontends/";
|
|
|
7
7
|
export declare const SIDEBAR_WIDTH: {
|
|
8
8
|
readonly default: 240;
|
|
9
9
|
readonly min: 180;
|
|
10
|
-
readonly max:
|
|
10
|
+
readonly max: 410;
|
|
11
11
|
};
|
|
12
12
|
export declare const SIDEBAR_INITIAL_PREFERENCES_WAIT_MS = 1500;
|
|
13
13
|
export declare const DEFAULT_SIDEBAR_PREFERENCES: SideBarPreferences;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContentComponentSlots as t, SideBarFooterSlots as e, HeaderSidebarSlots as o, ContentGroupsSlots as s, SideBarMobileSlots as a, SideBarDesktopSlots as n } from "./slots/SideBarEnum.js";
|
|
2
|
-
const _ = "M4LSideBar", r = { default: 240, min: 180, max:
|
|
2
|
+
const _ = "M4LSideBar", r = { default: 240, min: 180, max: 410 }, S = 1500, E = {
|
|
3
3
|
anchored: !0,
|
|
4
4
|
favorites: [],
|
|
5
5
|
width: r.default
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { jsx as i, jsxs as d } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { useEnvironment as
|
|
3
|
-
import { useIsMobile as
|
|
4
|
-
import { ActionsSearchOutlined as
|
|
5
|
-
import { useContext as
|
|
6
|
-
import { shallow as
|
|
7
|
-
import { AreasContext as
|
|
8
|
-
import { useAreasStore as
|
|
9
|
-
import { SIDEBAR_DICTIONARY as h, SIDEBAR_WIDTH as
|
|
10
|
-
import { resolveSidebarWidth as
|
|
11
|
-
import { EMPTY_SIDEBAR_WINDOWS as
|
|
12
|
-
import { sidebarNavigationEntries as
|
|
13
|
-
import { SidebarBranding as
|
|
14
|
-
import { SidebarInstances as
|
|
2
|
+
import { useEnvironment as qe, useModuleDictionary as Je } from "@m4l/core";
|
|
3
|
+
import { useIsMobile as Qe } from "@m4l/graphics";
|
|
4
|
+
import { ActionsSearchOutlined as Xe, ShapeStarOutlined as Ze, ArrowChevronSmUpOutlined as pe } from "@m4l/icons";
|
|
5
|
+
import { useContext as $e, useId as ke, useState as T, useMemo as j, useRef as Ve, useEffect as et } from "react";
|
|
6
|
+
import { shallow as tt } from "zustand/shallow";
|
|
7
|
+
import { AreasContext as rt } from "../../../areas/contexts/AreasContext/index.js";
|
|
8
|
+
import { useAreasStore as it } from "../../../areas/hooks/useAreas/index.js";
|
|
9
|
+
import { SIDEBAR_DICTIONARY as h, SIDEBAR_WIDTH as Ie } from "../../constants.js";
|
|
10
|
+
import { resolveSidebarWidth as ot } from "../../helpers/resolveSidebarWidth.js";
|
|
11
|
+
import { EMPTY_SIDEBAR_WINDOWS as nt, EMPTY_SIDEBAR_MENU as at } from "./constants.js";
|
|
12
|
+
import { sidebarNavigationEntries as dt, sidebarLeaves as st, windowShortcutId as Y, sidebarRoute as ct, filterSidebarEntries as lt, instanceTitle as ut, setShortcutPinned as mt } from "./helpers.js";
|
|
13
|
+
import { SidebarBranding as ht, SidebarAttribution as St } from "./SidebarBranding.js";
|
|
14
|
+
import { SidebarInstances as ft } from "./SidebarInstances.js";
|
|
15
15
|
import { sidebarItemIcon as U } from "./SidebarItemIcon.js";
|
|
16
|
-
import { SidebarLabelTooltip as
|
|
17
|
-
import { SidebarRow as
|
|
18
|
-
import { SidebarPanel as
|
|
19
|
-
import { useSidebarResize as
|
|
20
|
-
function
|
|
21
|
-
return
|
|
16
|
+
import { SidebarLabelTooltip as be } from "./SidebarLabelTooltip.js";
|
|
17
|
+
import { SidebarRow as wt } from "./SidebarRow.js";
|
|
18
|
+
import { SidebarPanel as pt, SidebarChromeHeader as It, SidebarScroll as bt, SidebarSearch as vt, SidebarGlyph as ve, SidebarSearchInput as gt, SidebarBranches as ge, SidebarBranch as Ae, SidebarBranchToggle as Ee, SidebarBranchGlyph as Be, SidebarChevron as Ce, SidebarDisclosure as xe, SidebarDisclosureClip as Te, SidebarChildren as Re, SidebarMenu as At, SidebarGroup as Et, SidebarGroupHeading as Bt, SidebarEmpty as Ct, SidebarChromeFooter as xt, SidebarFooterAction as Tt, SidebarDrawer as Rt, SidebarFrame as Lt, SidebarResizeHandle as Dt } from "./slots/styled.js";
|
|
19
|
+
import { useSidebarResize as Wt } from "./useSidebarResize.js";
|
|
20
|
+
function kt(u) {
|
|
21
|
+
return $e(rt) ? /* @__PURE__ */ i(yt, { ...u }) : /* @__PURE__ */ i(Le, { ...u });
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const I =
|
|
23
|
+
function yt(u) {
|
|
24
|
+
const I = it((s) => ({
|
|
25
25
|
activeAreaId: s.currentAreaId,
|
|
26
26
|
activeWindowId: s.hashAreas[s.currentAreaId]?.currentLayoutId || void 0,
|
|
27
27
|
windows: s.hashWindows,
|
|
28
28
|
selectArea: s.areasActions.selectArea,
|
|
29
29
|
selectLayout: s.areaActions.selectLayout,
|
|
30
30
|
closeWindow: s.windowActions.close
|
|
31
|
-
}),
|
|
32
|
-
return /* @__PURE__ */ i(
|
|
31
|
+
}), tt);
|
|
32
|
+
return /* @__PURE__ */ i(Le, { ...u, areas: I });
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Le({
|
|
35
35
|
anchored: u,
|
|
36
|
-
menuData: I =
|
|
36
|
+
menuData: I = at,
|
|
37
37
|
moduleSelectedId: s,
|
|
38
38
|
onMenuItemClick: b,
|
|
39
39
|
onToggleVisible: N,
|
|
@@ -41,23 +41,23 @@ function Re({
|
|
|
41
41
|
companyLogoSmallUrl: J,
|
|
42
42
|
headerComponent: Q,
|
|
43
43
|
footerComponent: X,
|
|
44
|
-
navigation:
|
|
44
|
+
navigation: De,
|
|
45
45
|
areas: m
|
|
46
46
|
}) {
|
|
47
|
-
const { hostApiRemote: z } =
|
|
47
|
+
const { hostApiRemote: z } = qe(), { getLabel: c } = Je(), {
|
|
48
48
|
title: v,
|
|
49
49
|
showHeading: Z = !0,
|
|
50
50
|
rootTitles: $,
|
|
51
51
|
badgeColor: k,
|
|
52
|
-
attributionLogo:
|
|
53
|
-
attributionLogoUrl:
|
|
52
|
+
attributionLogo: We,
|
|
53
|
+
attributionLogoUrl: ye,
|
|
54
54
|
footerAction: S,
|
|
55
|
-
preferences:
|
|
56
|
-
} =
|
|
57
|
-
() =>
|
|
55
|
+
preferences: Me
|
|
56
|
+
} = De, K = We ?? ye, { favorites: R, updateFavorites: O, width: Fe, onWidthChange: Ne } = Me, L = Qe(), D = Wt(ot(Fe), Ne), g = m?.activeAreaId, V = m?.activeWindowId, W = m?.windows ?? nt, ee = ke(), [te, ze] = T(""), [Ke, Oe] = T(() => /* @__PURE__ */ new Set()), [y, Pe] = T(!0), [f, M] = T(), [A, P] = T(), E = te.trim().toLocaleLowerCase(), B = j(
|
|
57
|
+
() => dt(I, v, $),
|
|
58
58
|
[I, v, $]
|
|
59
|
-
), C = j(() =>
|
|
60
|
-
|
|
59
|
+
), C = j(() => st(B), [B]), w = j(() => Object.values(W).filter((e) => e.emergeType === "layout" && e.winType === "microfrontend"), [W]), _ = w.filter((e) => e.areaId === g), re = Ve(w), ie = new Map(C.map((e) => [e.id, e])), _e = new Map(B.map((e, t) => [e.id, t])), Ge = new Map(w.map((e) => [Y(e.windowId), e])), oe = _.filter((e) => e.moduleId === A?.entry.item.moduleId).sort((e, t) => (e.moduleCount ?? 0) - (t.moduleCount ?? 0));
|
|
60
|
+
et(() => {
|
|
61
61
|
const e = re.current.filter((o) => !W[o.windowId]);
|
|
62
62
|
if (re.current = w, !e.length)
|
|
63
63
|
return;
|
|
@@ -76,8 +76,8 @@ function Re({
|
|
|
76
76
|
return a.length === o.length && a.every((n, l) => n === o[l]) ? o : a;
|
|
77
77
|
});
|
|
78
78
|
}, [w, C, O, W]);
|
|
79
|
-
const
|
|
80
|
-
|
|
79
|
+
const He = (e) => {
|
|
80
|
+
Oe((t) => {
|
|
81
81
|
const r = new Set(t);
|
|
82
82
|
return r.has(e) ? r.delete(e) : r.add(e), r;
|
|
83
83
|
});
|
|
@@ -85,10 +85,10 @@ function Re({
|
|
|
85
85
|
P(void 0);
|
|
86
86
|
}, ne = (e) => {
|
|
87
87
|
const t = R.includes(e);
|
|
88
|
-
O((r) =>
|
|
88
|
+
O((r) => mt(r, e, !t)), t && M((r) => r?.favoriteId === e ? { ...r, favoriteId: void 0 } : r);
|
|
89
89
|
}, ae = (e, t, r) => {
|
|
90
90
|
t.areaId !== g && m?.selectArea(t.areaId), m?.selectLayout(t.areaId, t.windowId), M({ entryId: e.id, areaId: t.areaId, favoriteId: r, windowId: t.windowId }), x(), L && N(!1);
|
|
91
|
-
},
|
|
91
|
+
}, je = (e, t, r, o) => {
|
|
92
92
|
if (o) {
|
|
93
93
|
ae(e, o, r);
|
|
94
94
|
return;
|
|
@@ -100,29 +100,29 @@ function Re({
|
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
t.shiftKey ? b(e.item, { shiftKey: !0 }) : b(e.item), x(), L && N(!1);
|
|
103
|
-
}, de = f && f.areaId === g ? ie.get(f.entryId) : void 0, se = de?.item.moduleId === s ? de : void 0, G = se ?? C.find((e) => e.item.moduleId && e.item.moduleId === s), F = se && (!f?.windowId || f.windowId === V) ? f?.favoriteId : void 0,
|
|
104
|
-
const t =
|
|
103
|
+
}, de = f && f.areaId === g ? ie.get(f.entryId) : void 0, se = de?.item.moduleId === s ? de : void 0, G = se ?? C.find((e) => e.item.moduleId && e.item.moduleId === s), F = se && (!f?.windowId || f.windowId === V) ? f?.favoriteId : void 0, Ye = new Set(G && !F ? ct(B, G.id) : []), ce = lt(B, E), le = R.flatMap((e) => {
|
|
104
|
+
const t = Ge.get(e), r = ie.get(e) ?? C.find((o) => t && o.item.moduleId === t.moduleId);
|
|
105
105
|
return !r || E && !r.item.title.toLocaleLowerCase().includes(E) ? [] : [{ id: e, entry: r, instance: t }];
|
|
106
106
|
}), ue = (e, t, r, o) => {
|
|
107
107
|
const a = r ?? e.id, n = r ? F === a : !F && G?.id === e.id, l = !r && e.item.moduleId && _.some(
|
|
108
108
|
(p) => p.moduleId === e.item.moduleId
|
|
109
109
|
);
|
|
110
110
|
return /* @__PURE__ */ i(
|
|
111
|
-
|
|
111
|
+
wt,
|
|
112
112
|
{
|
|
113
|
-
title: o ?
|
|
113
|
+
title: o ? ut(e.item.title, o.moduleCount ?? 1) : e.item.title,
|
|
114
114
|
icon: U(e.item, z),
|
|
115
115
|
favoriteShortcut: !!r,
|
|
116
116
|
nested: t,
|
|
117
117
|
selected: n,
|
|
118
118
|
pinned: R.includes(a),
|
|
119
119
|
getLabel: c,
|
|
120
|
-
onSelect: (p) =>
|
|
120
|
+
onSelect: (p) => je(e, p, r, o),
|
|
121
121
|
onPin: () => ne(a),
|
|
122
122
|
onAdd: l ? (p) => {
|
|
123
123
|
M({ entryId: e.id, areaId: g }), b(e.item, { shiftKey: !0 });
|
|
124
|
-
const
|
|
125
|
-
P({ entry: e, anchor:
|
|
124
|
+
const Ue = p.currentTarget.closest("[data-sidebar-row]") ?? p.currentTarget;
|
|
125
|
+
P({ entry: e, anchor: Ue });
|
|
126
126
|
} : void 0
|
|
127
127
|
},
|
|
128
128
|
a
|
|
@@ -130,97 +130,97 @@ function Re({
|
|
|
130
130
|
}, me = (e, t, r) => {
|
|
131
131
|
if (!e.children)
|
|
132
132
|
return ue(e, t);
|
|
133
|
-
const o = !!E || !
|
|
134
|
-
return /* @__PURE__ */ d(
|
|
135
|
-
/* @__PURE__ */ i(
|
|
136
|
-
|
|
133
|
+
const o = !!E || !Ke.has(e.id), n = { current: Ye.has(e.id), nested: t };
|
|
134
|
+
return /* @__PURE__ */ d(Ae, { ownerState: n, children: [
|
|
135
|
+
/* @__PURE__ */ i(be, { title: e.item.title, children: (l) => /* @__PURE__ */ d(
|
|
136
|
+
Ee,
|
|
137
137
|
{
|
|
138
138
|
type: "button",
|
|
139
139
|
ownerState: n,
|
|
140
140
|
"aria-expanded": o,
|
|
141
|
-
onClick: () =>
|
|
141
|
+
onClick: () => He(e.id),
|
|
142
142
|
children: [
|
|
143
|
-
/* @__PURE__ */ i(
|
|
143
|
+
/* @__PURE__ */ i(Be, { "aria-hidden": "true", ownerState: n, children: U(e.item, z, t ? void 0 : r) }),
|
|
144
144
|
l,
|
|
145
|
-
/* @__PURE__ */ i(
|
|
145
|
+
/* @__PURE__ */ i(Ce, { "aria-hidden": "true", ownerState: { expanded: o }, children: /* @__PURE__ */ i(pe, {}) })
|
|
146
146
|
]
|
|
147
147
|
}
|
|
148
148
|
) }),
|
|
149
|
-
/* @__PURE__ */ i(
|
|
149
|
+
/* @__PURE__ */ i(xe, { ownerState: { expanded: o }, inert: !o, children: /* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(Re, { ownerState: { nested: t, withGuide: !0 }, role: "group", "aria-label": e.item.title, children: e.children.map((l) => me(l, !0, r)) }) }) })
|
|
150
150
|
] }, e.id);
|
|
151
|
-
}, he = c(h.favorites), H = { current: !!F, nested: !1 }, Se = L ? q : u,
|
|
152
|
-
(Q || J || k) && /* @__PURE__ */ i(
|
|
153
|
-
/* @__PURE__ */ d(
|
|
154
|
-
/* @__PURE__ */ d(
|
|
155
|
-
/* @__PURE__ */ i(
|
|
151
|
+
}, he = c(h.favorites), H = { current: !!F, nested: !1 }, Se = le.length > 0, fe = L ? q : u, we = /* @__PURE__ */ d(pt, { "data-sidebar-panel": !0, "data-testid": "platform-sidebar", inert: !fe, children: [
|
|
152
|
+
(Q || J || k) && /* @__PURE__ */ i(It, { children: Q ?? /* @__PURE__ */ i(ht, { logo: J, title: v, badgeColor: k }) }),
|
|
153
|
+
/* @__PURE__ */ d(bt, { ownerState: { showHeading: Z, hasFavorites: Se }, onScroll: x, children: [
|
|
154
|
+
/* @__PURE__ */ d(vt, { children: [
|
|
155
|
+
/* @__PURE__ */ i(ve, { "aria-hidden": "true", children: /* @__PURE__ */ i(Xe, {}) }),
|
|
156
156
|
/* @__PURE__ */ i(
|
|
157
|
-
|
|
157
|
+
gt,
|
|
158
158
|
{
|
|
159
159
|
type: "search",
|
|
160
160
|
"aria-label": c(h.search),
|
|
161
161
|
placeholder: c(h.search),
|
|
162
162
|
value: te,
|
|
163
163
|
onChange: (e) => {
|
|
164
|
-
|
|
164
|
+
ze(e.currentTarget.value), x();
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
)
|
|
168
168
|
] }),
|
|
169
|
-
/* @__PURE__ */ d(
|
|
170
|
-
|
|
171
|
-
/* @__PURE__ */ i(
|
|
172
|
-
|
|
169
|
+
/* @__PURE__ */ d(ge, { children: [
|
|
170
|
+
Se && /* @__PURE__ */ d(Ae, { role: "group", "aria-label": he, ownerState: H, children: [
|
|
171
|
+
/* @__PURE__ */ i(be, { title: he, children: (e) => /* @__PURE__ */ d(
|
|
172
|
+
Ee,
|
|
173
173
|
{
|
|
174
174
|
type: "button",
|
|
175
175
|
ownerState: H,
|
|
176
176
|
"aria-expanded": y,
|
|
177
177
|
"aria-controls": ee,
|
|
178
|
-
onClick: () =>
|
|
178
|
+
onClick: () => Pe((t) => !t),
|
|
179
179
|
children: [
|
|
180
|
-
/* @__PURE__ */ i(
|
|
180
|
+
/* @__PURE__ */ i(Be, { "aria-hidden": "true", ownerState: H, children: /* @__PURE__ */ i(Ze, {}) }),
|
|
181
181
|
e,
|
|
182
|
-
/* @__PURE__ */ i(
|
|
182
|
+
/* @__PURE__ */ i(Ce, { "aria-hidden": "true", ownerState: { expanded: y }, children: /* @__PURE__ */ i(pe, {}) })
|
|
183
183
|
]
|
|
184
184
|
}
|
|
185
185
|
) }),
|
|
186
186
|
/* @__PURE__ */ i(
|
|
187
|
-
|
|
187
|
+
xe,
|
|
188
188
|
{
|
|
189
189
|
id: ee,
|
|
190
190
|
ownerState: { expanded: y },
|
|
191
191
|
inert: !y,
|
|
192
|
-
children: /* @__PURE__ */ i(
|
|
192
|
+
children: /* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(Re, { ownerState: { nested: !1 }, role: "list", children: le.map(({ id: e, entry: t, instance: r }) => ue(t, !1, e, r)) }) })
|
|
193
193
|
}
|
|
194
194
|
)
|
|
195
195
|
] }),
|
|
196
|
-
/* @__PURE__ */ i(
|
|
197
|
-
Z && /* @__PURE__ */ i(
|
|
198
|
-
/* @__PURE__ */ d(
|
|
199
|
-
ce.map((e) => me(e, !1,
|
|
200
|
-
E && !ce.length && /* @__PURE__ */ i(
|
|
196
|
+
/* @__PURE__ */ i(At, { role: "menu", "aria-label": c(h.navigation), children: /* @__PURE__ */ d(Et, { role: "group", "aria-label": v, children: [
|
|
197
|
+
Z && /* @__PURE__ */ i(Bt, { children: v }),
|
|
198
|
+
/* @__PURE__ */ d(ge, { children: [
|
|
199
|
+
ce.map((e) => me(e, !1, _e.get(e.id))),
|
|
200
|
+
E && !ce.length && /* @__PURE__ */ i(Ct, { role: "status", children: c(h.noResults) })
|
|
201
201
|
] })
|
|
202
202
|
] }) })
|
|
203
203
|
] })
|
|
204
204
|
] }),
|
|
205
|
-
(S || X || K) && /* @__PURE__ */ d(
|
|
205
|
+
(S || X || K) && /* @__PURE__ */ d(xt, { children: [
|
|
206
206
|
S && /* @__PURE__ */ d(
|
|
207
|
-
|
|
207
|
+
Tt,
|
|
208
208
|
{
|
|
209
209
|
type: "button",
|
|
210
210
|
onClick: (e) => {
|
|
211
211
|
e.shiftKey ? b(S.item, { shiftKey: !0 }) : b(S.item);
|
|
212
212
|
},
|
|
213
213
|
children: [
|
|
214
|
-
/* @__PURE__ */ i(
|
|
214
|
+
/* @__PURE__ */ i(ve, { "aria-hidden": "true", children: S.icon }),
|
|
215
215
|
S.item.title
|
|
216
216
|
]
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
219
|
X,
|
|
220
|
-
K && /* @__PURE__ */ i(
|
|
220
|
+
K && /* @__PURE__ */ i(St, { logo: K, label: c(h.attribution) })
|
|
221
221
|
] }),
|
|
222
|
-
m && A &&
|
|
223
|
-
|
|
222
|
+
m && A && fe && oe.length > 1 && /* @__PURE__ */ i(
|
|
223
|
+
ft,
|
|
224
224
|
{
|
|
225
225
|
menu: A,
|
|
226
226
|
instances: oe,
|
|
@@ -235,17 +235,17 @@ function Re({
|
|
|
235
235
|
}
|
|
236
236
|
)
|
|
237
237
|
] });
|
|
238
|
-
return L ? /* @__PURE__ */ i(
|
|
239
|
-
|
|
238
|
+
return L ? /* @__PURE__ */ i(Rt, { open: q, onClose: () => N(!1), children: we }) : /* @__PURE__ */ d(Lt, { ownerState: { width: D.width, expanded: u, resizing: D.resizing }, children: [
|
|
239
|
+
we,
|
|
240
240
|
u && /* @__PURE__ */ i(
|
|
241
|
-
|
|
241
|
+
Dt,
|
|
242
242
|
{
|
|
243
243
|
type: "button",
|
|
244
244
|
role: "separator",
|
|
245
245
|
"aria-orientation": "vertical",
|
|
246
246
|
"aria-label": c(h.resize),
|
|
247
|
-
"aria-valuemin":
|
|
248
|
-
"aria-valuemax":
|
|
247
|
+
"aria-valuemin": Ie.min,
|
|
248
|
+
"aria-valuemax": Ie.max,
|
|
249
249
|
"aria-valuenow": D.width,
|
|
250
250
|
...D.handle
|
|
251
251
|
}
|
|
@@ -253,5 +253,5 @@ function Re({
|
|
|
253
253
|
] });
|
|
254
254
|
}
|
|
255
255
|
export {
|
|
256
|
-
|
|
256
|
+
kt as SideBarNavigation
|
|
257
257
|
};
|
|
@@ -21,6 +21,7 @@ export declare const SIDEBAR_TYPOGRAPHY: {
|
|
|
21
21
|
readonly control: import('@m4l/styles').FontProperties;
|
|
22
22
|
readonly item: import('@m4l/styles').FontProperties;
|
|
23
23
|
readonly hint: import('@m4l/styles').FontProperties;
|
|
24
|
+
readonly footerAction: import('@m4l/styles').FontProperties;
|
|
24
25
|
};
|
|
25
26
|
export declare const SIDEBAR_KEYBOARD_RESIZE_STEP = 8;
|
|
26
27
|
export declare const SIDEBAR_ATTRIBUTION_SIZE: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/SideBar/subcomponents/SideBarNavigation/constants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,gCAAgC,CAAC;AAEnE,oDAAoD;AACpD,eAAO,MAAM,sBAAsB,SAAS,CAAC;AAE7C,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/SideBar/subcomponents/SideBarNavigation/constants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,gCAAgC,CAAC;AAEnE,oDAAoD;AACpD,eAAO,MAAM,sBAAsB,SAAS,CAAC;AAE7C,eAAO,MAAM,kBAAkB;;;;;;;;;;;;CAOrB,CAAC;AACX,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,wBAAwB;;;CAA4C,CAAC;AAClF,eAAO,MAAM,kBAAkB,EAAE,YAAY,EAAO,CAAC;AACrD,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAAC,SAAS,CAAM,CAAC"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { TYPOGRAPHY_SIZES_DESKTOP as
|
|
2
|
-
const {
|
|
3
|
-
heading: { ...
|
|
4
|
-
section:
|
|
5
|
-
control:
|
|
6
|
-
item:
|
|
7
|
-
hint:
|
|
8
|
-
|
|
1
|
+
import { TYPOGRAPHY_SIZES_DESKTOP as o, BASE_LETTER_SPACING as E } from "@m4l/styles";
|
|
2
|
+
const { bodyStandard: _, captionDens: t, captionStandard: n, captionSlim: S } = o.medium, i = "contrast(0) brightness(1.4)", I = "none", R = {
|
|
3
|
+
heading: { ...t, letterSpacing: E["normal0-5"] },
|
|
4
|
+
section: t,
|
|
5
|
+
control: n,
|
|
6
|
+
item: n,
|
|
7
|
+
hint: S,
|
|
8
|
+
footerAction: _
|
|
9
|
+
}, T = 8, s = { width: "47px", height: "9px" }, A = [], e = {};
|
|
9
10
|
export {
|
|
10
11
|
i as DARK_MODE_LOGO_FILTER,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
A as EMPTY_SIDEBAR_MENU,
|
|
13
|
+
e as EMPTY_SIDEBAR_WINDOWS,
|
|
14
|
+
I as LIGHT_MODE_LOGO_FILTER,
|
|
15
|
+
s as SIDEBAR_ATTRIBUTION_SIZE,
|
|
15
16
|
T as SIDEBAR_KEYBOARD_RESIZE_STEP,
|
|
16
17
|
R as SIDEBAR_TYPOGRAPHY
|
|
17
18
|
};
|
|
@@ -15,6 +15,7 @@ export declare const SidebarBrandBadge: import('@emotion/styled').StyledComponen
|
|
|
15
15
|
export declare const SidebarScroll: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<Theme> & {
|
|
16
16
|
ownerState: {
|
|
17
17
|
showHeading: boolean;
|
|
18
|
+
hasFavorites: boolean;
|
|
18
19
|
};
|
|
19
20
|
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
20
21
|
export declare const SidebarSearch: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<Theme>, import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/SideBar/subcomponents/SideBarNavigation/slots/styled.ts"],"names":[],"mappings":"AASA,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAQ1D,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAmClB,eAAO,MAAM,YAAY;gBAAiC,gBAAgB;mGAuBzE,CAAC;AAEF,eAAO,MAAM,aAAa,4IAMvB,CAAC;AAEJ,eAAO,MAAM,YAAY,qMAmCvB,CAAC;AAEH,eAAO,MAAM,mBAAmB,iNAiB7B,CAAC;AAEJ,eAAO,MAAM,mBAAmB,+LAO7B,CAAC;AAEJ,eAAO,MAAM,kBAAkB,sMAQ7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;gBAA+B,gBAAgB;UAIzE,CAAC;AAEJ,eAAO,MAAM,iBAAiB,wLAe3B,CAAC;AAEJ,eAAO,MAAM,aAAa;
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/SideBar/subcomponents/SideBarNavigation/slots/styled.ts"],"names":[],"mappings":"AASA,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAQ1D,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAmClB,eAAO,MAAM,YAAY;gBAAiC,gBAAgB;mGAuBzE,CAAC;AAEF,eAAO,MAAM,aAAa,4IAMvB,CAAC;AAEJ,eAAO,MAAM,YAAY,qMAmCvB,CAAC;AAEH,eAAO,MAAM,mBAAmB,iNAiB7B,CAAC;AAEJ,eAAO,MAAM,mBAAmB,+LAO7B,CAAC;AAEJ,eAAO,MAAM,kBAAkB,sMAQ7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;gBAA+B,gBAAgB;UAIzE,CAAC;AAEJ,eAAO,MAAM,iBAAiB,wLAe3B,CAAC;AAEJ,eAAO,MAAM,aAAa;gBACZ;QAAE,WAAW,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,OAAO,CAAA;KAAE;yGAS1D,CAAC;AAEJ,eAAO,MAAM,aAAa,8MAUvB,CAAC;AAEJ,eAAO,MAAM,kBAAkB,8MAW5B,CAAC;AAEJ,eAAO,MAAM,WAAW,qMAIrB,CAAC;AAEJ,eAAO,MAAM,YAAY,+LAItB,CAAC;AAEJ,eAAO,MAAM,mBAAmB,6MAG9B,CAAC;AAEH,eAAO,MAAM,iBAAiB;gBAA+B,sBAAsB;yGAclF,CAAC;AAEF,eAAO,MAAM,qBAAqB,qMAGhC,CAAC;AAEH,eAAO,MAAM,eAAe,qMAIzB,CAAC;AAEJ,eAAO,MAAM,aAAa;gBAAmC,kBAAkB;mGAiC9E,CAAC;AAEF,eAAO,MAAM,mBAAmB;gBAAkC,kBAAkB;qHAmBnF,CAAC;AAEF,eAAO,MAAM,YAAY,uMAGtB,CAAC;AAEJ,eAAO,MAAM,YAAY,uMAoBvB,CAAC;AAEH,eAAO,MAAM,iBAAiB,2MAE5B,CAAC;AAEH,eAAO,MAAM,kBAAkB;gBAAsC,kBAAkB;UAWtF,CAAC;AAEF,eAAO,MAAM,cAAc;gBAAsC,sBAAsB;UAMtF,CAAC;AAEF,eAAO,MAAM,eAAe;gBAA+B;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE;yGA2BlG,CAAC;AAEF,eAAO,MAAM,eAAe;gBAA+B,eAAe;yGAqBzE,CAAC;AAEF,eAAO,MAAM,cAAc;gBAA+B,eAAe;yGAexE,CAAC;AAEF,eAAO,MAAM,oBAAoB,iNAgB9B,CAAC;AAEJ,eAAO,MAAM,cAAc,uMAMxB,CAAC;AAEJ,eAAO,MAAM,aAAa;gBAAkC,kBAAkB;qHAwB7E,CAAC;AAEF,eAAO,MAAM,YAAY,qMAItB,CAAC;AAEJ,eAAO,MAAM,mBAAmB,+LAM7B,CAAC;AAEJ,eAAO,MAAM,mBAAmB,qNAO7B,CAAC;AAEJ,eAAO,MAAM,sBAAsB,qMAejC,CAAC;AAEH,eAAO,MAAM,yBAAyB,sKAEnC,CAAC;AAEJ,eAAO,MAAM,sBAAsB;gBAA+B,gBAAgB;UAE/E,CAAC;AAEJ,eAAO,MAAM,sBAAsB,uMAMhC,CAAC;AAEJ,eAAO,MAAM,sBAAsB,6IAiBjC,CAAC;AAEH,eAAO,MAAM,kBAAkB;gBAhJ2B,eAAe;6GAqJtE,CAAC"}
|
|
@@ -4,11 +4,11 @@ import { styled as i } from "@mui/material/styles";
|
|
|
4
4
|
import { Image as m } from "../../../../Image/Image.js";
|
|
5
5
|
import { SIDEBAR_WIDTH as O } from "../../../constants.js";
|
|
6
6
|
import R from "../assets/sidebar-texture.jpg.js";
|
|
7
|
-
import { SIDEBAR_TYPOGRAPHY as d, DARK_MODE_LOGO_FILTER as x, LIGHT_MODE_LOGO_FILTER as v, SIDEBAR_ATTRIBUTION_SIZE as
|
|
8
|
-
import { Stack as
|
|
7
|
+
import { SIDEBAR_TYPOGRAPHY as d, DARK_MODE_LOGO_FILTER as x, LIGHT_MODE_LOGO_FILTER as v, SIDEBAR_ATTRIBUTION_SIZE as T } from "../constants.js";
|
|
8
|
+
import { Stack as C } from "../../../../extended/mui/Stack/Stack.js";
|
|
9
9
|
import { Divider as w } from "../../../../extended/mui/Divider/Divider.js";
|
|
10
|
-
import { Chip as
|
|
11
|
-
const s = "260ms cubic-bezier(.2,.8,.2,1)",
|
|
10
|
+
import { Chip as A } from "../../../../Chip/Chip.js";
|
|
11
|
+
const s = "260ms cubic-bezier(.2,.8,.2,1)", E = {
|
|
12
12
|
minWidth: 0,
|
|
13
13
|
overflow: "hidden",
|
|
14
14
|
textOverflow: "ellipsis",
|
|
@@ -119,7 +119,7 @@ const N = i("aside")(
|
|
|
119
119
|
padding: "0 8px 6px",
|
|
120
120
|
flexShrink: 0,
|
|
121
121
|
borderBottom: `1px solid ${p(e)}`
|
|
122
|
-
})), X = i(
|
|
122
|
+
})), X = i(C)({
|
|
123
123
|
flexDirection: "row",
|
|
124
124
|
justifyContent: "space-between",
|
|
125
125
|
alignItems: "center",
|
|
@@ -131,7 +131,7 @@ const N = i("aside")(
|
|
|
131
131
|
filter: e.themeMode === "dark" ? x : v,
|
|
132
132
|
objectFit: "contain",
|
|
133
133
|
borderRadius: 6
|
|
134
|
-
})), Q = i(
|
|
134
|
+
})), Q = i(A)(({ theme: e, color: t }) => ({
|
|
135
135
|
"&&": {
|
|
136
136
|
height: 16,
|
|
137
137
|
minHeight: 16,
|
|
@@ -151,11 +151,9 @@ const N = i("aside")(
|
|
|
151
151
|
flexDirection: "column",
|
|
152
152
|
flex: 1,
|
|
153
153
|
minHeight: 0,
|
|
154
|
-
gap: e.showHeading ? 8 : 12,
|
|
154
|
+
gap: e.hasFavorites ? t.vars.size.baseSpacings.sp4 : e.showHeading ? 8 : 12,
|
|
155
155
|
overflow: "hidden auto",
|
|
156
|
-
padding: "12px 8px 0"
|
|
157
|
-
scrollbarWidth: "thin",
|
|
158
|
-
scrollbarColor: `${t.vars.palette.border.secondary} transparent`
|
|
156
|
+
padding: "12px 8px 0"
|
|
159
157
|
})), ee = i("label")(({ theme: e }) => ({
|
|
160
158
|
display: "flex",
|
|
161
159
|
flex: "0 0 24px",
|
|
@@ -258,7 +256,7 @@ const N = i("aside")(
|
|
|
258
256
|
};
|
|
259
257
|
}
|
|
260
258
|
), ce = i("span")(() => ({
|
|
261
|
-
...
|
|
259
|
+
...E,
|
|
262
260
|
flex: 1
|
|
263
261
|
})), u = i("span")({
|
|
264
262
|
display: "inline-flex",
|
|
@@ -355,7 +353,7 @@ const N = i("aside")(
|
|
|
355
353
|
"&:hover > [data-sidebar-actions], &:focus-within > [data-sidebar-actions]": { display: "flex" }
|
|
356
354
|
};
|
|
357
355
|
}
|
|
358
|
-
),
|
|
356
|
+
), z = i("button")(({ theme: e }) => ({
|
|
359
357
|
...c,
|
|
360
358
|
display: "flex",
|
|
361
359
|
alignItems: "center",
|
|
@@ -411,7 +409,8 @@ const N = i("aside")(
|
|
|
411
409
|
padding: "12px 8px 0",
|
|
412
410
|
minHeight: 22,
|
|
413
411
|
borderTop: `1px solid ${e.vars.palette.border.disabled}`
|
|
414
|
-
})), ye = i(
|
|
412
|
+
})), ye = i(z)(({ theme: e }) => ({
|
|
413
|
+
...d.footerAction,
|
|
415
414
|
width: "100%",
|
|
416
415
|
justifyContent: "center",
|
|
417
416
|
marginBottom: 8,
|
|
@@ -437,7 +436,7 @@ const N = i("aside")(
|
|
|
437
436
|
})), $e = i(m)(({ ownerState: e }) => ({
|
|
438
437
|
filter: e.themeMode === "dark" ? x : v
|
|
439
438
|
})), Ie = i("span")(({ theme: e }) => ({
|
|
440
|
-
...
|
|
439
|
+
...T,
|
|
441
440
|
display: "inline-flex",
|
|
442
441
|
flexShrink: 0,
|
|
443
442
|
color: e.vars.palette.text.disabled,
|
|
@@ -497,7 +496,7 @@ export {
|
|
|
497
496
|
ce as SidebarLabel,
|
|
498
497
|
ie as SidebarMenu,
|
|
499
498
|
K as SidebarPanel,
|
|
500
|
-
|
|
499
|
+
z as SidebarPrimaryAction,
|
|
501
500
|
Z as SidebarResizeHandle,
|
|
502
501
|
B as SidebarRowBody,
|
|
503
502
|
he as SidebarRowFrame,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent } from 'react';
|
|
2
|
-
/** Preview a drag within the
|
|
2
|
+
/** Preview a drag within the desktop width range and save the completed adjustment. */
|
|
3
3
|
export declare function useSidebarResize(savedWidth: number, onWidthChange: (width: number) => void): {
|
|
4
4
|
width: number;
|
|
5
5
|
resizing: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSidebarResize.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/SideBar/subcomponents/SideBarNavigation/useSidebarResize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,IAAI,kBAAkB,EAAE,KAAK,YAAY,IAAI,iBAAiB,EAAoB,MAAM,OAAO,CAAC;AAM3H,
|
|
1
|
+
{"version":3,"file":"useSidebarResize.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/SideBar/subcomponents/SideBarNavigation/useSidebarResize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,IAAI,kBAAkB,EAAE,KAAK,YAAY,IAAI,iBAAiB,EAAoB,MAAM,OAAO,CAAC;AAM3H,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;;;;+BAK3D,iBAAiB,CAAC,iBAAiB,CAAC;+BAepC,iBAAiB,CAAC,iBAAiB,CAAC;6BASrC,iBAAiB,CAAC,iBAAiB,CAAC;iCAApC,iBAAiB,CAAC,iBAAiB,CAAC;sCAApC,iBAAiB,CAAC,iBAAiB,CAAC;;2BAcvC,kBAAkB,CAAC,iBAAiB,CAAC;;EAqBhE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.87.
|
|
3
|
+
"version": "9.87.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -55,22 +55,22 @@
|
|
|
55
55
|
"react-transition-group": "4.4.5",
|
|
56
56
|
"@dnd-kit/dom": "0.5.3",
|
|
57
57
|
"@dnd-kit/react": "0.5.3",
|
|
58
|
-
"
|
|
58
|
+
"react-rnd": "10.5.2",
|
|
59
59
|
"react-color": "2.19.3",
|
|
60
|
+
"@mui/x-date-pickers": "6.20.2",
|
|
60
61
|
"@tanstack/react-virtual": "3.13.23",
|
|
61
|
-
"react-
|
|
62
|
+
"react-draggable": "4.5.0",
|
|
62
63
|
"react-dropzone": "14.4.1",
|
|
63
64
|
"react-spinners": "0.13.8",
|
|
64
|
-
"
|
|
65
|
+
"suncalc": "2.1.1",
|
|
66
|
+
"date-fns-tz": "2.0.0",
|
|
65
67
|
"chart.js": "4.5.1",
|
|
66
68
|
"chartjs-chart-error-bars": "4.4.5",
|
|
67
69
|
"qrcode.react": "3.2.0",
|
|
68
|
-
"suncalc": "2.1.1",
|
|
69
|
-
"date-fns-tz": "2.0.0",
|
|
70
70
|
"simplebar-react": "3.2.6",
|
|
71
|
+
"react-resizable-panels": "2.1.9",
|
|
71
72
|
"re-resizable": "6.11.2",
|
|
72
73
|
"react-simple-code-editor": "0.14.1",
|
|
73
|
-
"react-resizable-panels": "2.1.9",
|
|
74
74
|
"react-data-grid": "7.0.0-beta.47",
|
|
75
75
|
"react-dnd": "16.0.1",
|
|
76
76
|
"react-dnd-html5-backend": "16.0.1",
|