highsoft-ui 1.0.40 → 1.0.41
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.
|
@@ -3,11 +3,11 @@ import { useState as N, useEffect as z } from "react";
|
|
|
3
3
|
import { J } from "../../index-CMegByeX.js";
|
|
4
4
|
import { _ as d, B as h } from "../../index-BIyJbk_U.js";
|
|
5
5
|
import { N as A, X as G } from "../../index-C5TH1DPz.js";
|
|
6
|
-
import { c as
|
|
6
|
+
import { c as v } from "../../clsx-OuTLNxxd.js";
|
|
7
7
|
import { Container as y } from "../Container/index.js";
|
|
8
8
|
import { ThemedLogo as q } from "../Logo/index.js";
|
|
9
9
|
import { PrefPanel as S } from "../PrefPanel/index.js";
|
|
10
|
-
import { useMediaQuery as
|
|
10
|
+
import { useMediaQuery as M } from "../../utils.js";
|
|
11
11
|
var F = function(t) {
|
|
12
12
|
return /* @__PURE__ */ e("svg", d({
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -247,34 +247,36 @@ function w1({
|
|
|
247
247
|
host: p = "https://www.highcharts.com",
|
|
248
248
|
pathname: a = typeof window < "u" ? window.location.pathname : ""
|
|
249
249
|
}) {
|
|
250
|
-
return /* @__PURE__ */ e("div", { className:
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
250
|
+
return /* @__PURE__ */ e("div", { className: v(n.sub, n.outer), children: /* @__PURE__ */ e(y, { className: n.subContainer, as: "ul", children: r.map(
|
|
251
|
+
({ title: i, url: _, icon: k, selectedIcon: b, tag: C, tagVariant: m = "success" }, x) => {
|
|
252
|
+
const w = typeof window < "u" && window.location.origin || "http://example.com", g = new URL(_, w), f = g.origin === w && g.pathname === a;
|
|
253
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
|
|
254
|
+
t,
|
|
255
|
+
{
|
|
256
|
+
href: l(_, p),
|
|
257
|
+
className: v({
|
|
258
|
+
[n.selected]: f
|
|
259
|
+
}),
|
|
260
|
+
children: [
|
|
261
|
+
f && b || k,
|
|
262
|
+
/* @__PURE__ */ o("span", { children: [
|
|
263
|
+
i,
|
|
264
|
+
C && /* @__PURE__ */ e(
|
|
265
|
+
"span",
|
|
266
|
+
{
|
|
267
|
+
className: v(
|
|
268
|
+
n.subTag,
|
|
269
|
+
n[`subTag-${m}`]
|
|
270
|
+
),
|
|
271
|
+
children: C
|
|
272
|
+
}
|
|
273
|
+
)
|
|
274
|
+
] })
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
) }, x);
|
|
278
|
+
}
|
|
279
|
+
) }) });
|
|
278
280
|
}
|
|
279
281
|
function M1({
|
|
280
282
|
subItems: r,
|
|
@@ -283,27 +285,27 @@ function M1({
|
|
|
283
285
|
// TODO: Fetch these from the internets
|
|
284
286
|
link: a = "a",
|
|
285
287
|
host: i = "https://www.highcharts.com",
|
|
286
|
-
pathname:
|
|
288
|
+
pathname: _ = typeof window < "u" ? window.location.pathname : ""
|
|
287
289
|
}) {
|
|
288
|
-
const
|
|
290
|
+
const k = M("(max-width: 374px)"), b = M("(max-width: 849px)"), C = M("(min-width: 850px) and (max-width: 999px)"), [m, x] = N(!1), [w, g] = N([]);
|
|
289
291
|
z(() => {
|
|
290
292
|
if (p.length) {
|
|
291
293
|
const c = localStorage.getItem("notifications");
|
|
292
294
|
if (c) {
|
|
293
295
|
const u = JSON.parse(c);
|
|
294
|
-
|
|
296
|
+
g(
|
|
295
297
|
p.filter(
|
|
296
298
|
(s) => !s.id || !u.closed.includes(s.id)
|
|
297
299
|
)
|
|
298
300
|
);
|
|
299
301
|
} else
|
|
300
|
-
|
|
302
|
+
g(p);
|
|
301
303
|
}
|
|
302
304
|
}, [p]);
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
+
const f = () => {
|
|
306
|
+
x(!m);
|
|
305
307
|
}, O = (c) => {
|
|
306
|
-
|
|
308
|
+
g(w.filter((s) => !s.id || s.id !== c));
|
|
307
309
|
const u = localStorage.getItem("notifications");
|
|
308
310
|
if (u) {
|
|
309
311
|
const s = JSON.parse(u);
|
|
@@ -318,11 +320,11 @@ function M1({
|
|
|
318
320
|
};
|
|
319
321
|
return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ o("header", { className: n.header, children: [
|
|
320
322
|
w == null ? void 0 : w.map(
|
|
321
|
-
({ id: c, title: u, description: s, variant:
|
|
323
|
+
({ id: c, title: u, description: s, variant: j, closable: P }, U) => /* @__PURE__ */ e(
|
|
322
324
|
A,
|
|
323
325
|
{
|
|
324
326
|
description: s,
|
|
325
|
-
variant:
|
|
327
|
+
variant: j,
|
|
326
328
|
closable: P,
|
|
327
329
|
onClose: () => O(c),
|
|
328
330
|
children: u
|
|
@@ -330,13 +332,13 @@ function M1({
|
|
|
330
332
|
U
|
|
331
333
|
)
|
|
332
334
|
),
|
|
333
|
-
/* @__PURE__ */ e("div", { className:
|
|
335
|
+
/* @__PURE__ */ e("div", { className: v(n.main, n.outer), children: /* @__PURE__ */ o(y, { as: "nav", className: n.container, children: [
|
|
334
336
|
/* @__PURE__ */ e(
|
|
335
337
|
a,
|
|
336
338
|
{
|
|
337
339
|
className: n.logo,
|
|
338
340
|
href: l("https://www.highcharts.com/", i),
|
|
339
|
-
children: /* @__PURE__ */ e(q, { showText: !
|
|
341
|
+
children: /* @__PURE__ */ e(q, { showText: !C && !k })
|
|
340
342
|
}
|
|
341
343
|
),
|
|
342
344
|
/* @__PURE__ */ e("ul", { className: n.links, children: W.map(({ title: c, url: u }, s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
@@ -397,7 +399,7 @@ function M1({
|
|
|
397
399
|
{
|
|
398
400
|
variant: m ? "white" : "transparent",
|
|
399
401
|
className: n.menu,
|
|
400
|
-
onClick:
|
|
402
|
+
onClick: f,
|
|
401
403
|
children: [
|
|
402
404
|
m ? "Close" : "Menu",
|
|
403
405
|
m ? /* @__PURE__ */ e(G, {}) : /* @__PURE__ */ e($, {})
|
|
@@ -412,22 +414,22 @@ function M1({
|
|
|
412
414
|
items: r,
|
|
413
415
|
link: a,
|
|
414
416
|
host: i,
|
|
415
|
-
pathname:
|
|
417
|
+
pathname: _
|
|
416
418
|
}
|
|
417
419
|
),
|
|
418
420
|
t,
|
|
419
|
-
|
|
421
|
+
b && /* @__PURE__ */ o(V, { children: [
|
|
420
422
|
/* @__PURE__ */ e(
|
|
421
423
|
"div",
|
|
422
424
|
{
|
|
423
|
-
className:
|
|
424
|
-
onClick:
|
|
425
|
+
className: v(n.mobileOverlay, { [n.open]: m }),
|
|
426
|
+
onClick: f
|
|
425
427
|
}
|
|
426
428
|
),
|
|
427
429
|
/* @__PURE__ */ o(
|
|
428
430
|
"nav",
|
|
429
431
|
{
|
|
430
|
-
className:
|
|
432
|
+
className: v(n.mobile, {
|
|
431
433
|
[n.open]: m
|
|
432
434
|
}),
|
|
433
435
|
children: [
|
|
@@ -437,7 +439,7 @@ function M1({
|
|
|
437
439
|
{
|
|
438
440
|
className: n.logo,
|
|
439
441
|
href: l("https://www.highcharts.com/", i),
|
|
440
|
-
children: /* @__PURE__ */ e(q, { showText: !
|
|
442
|
+
children: /* @__PURE__ */ e(q, { showText: !k })
|
|
441
443
|
}
|
|
442
444
|
),
|
|
443
445
|
/* @__PURE__ */ o("div", { className: n.buttons, children: [
|
|
@@ -494,7 +496,7 @@ function M1({
|
|
|
494
496
|
}
|
|
495
497
|
)
|
|
496
498
|
] }),
|
|
497
|
-
/* @__PURE__ */ e("ul", { className: n.links, children: W.map(({ title: c, url: u, icon: s },
|
|
499
|
+
/* @__PURE__ */ e("ul", { className: n.links, children: W.map(({ title: c, url: u, icon: s }, j) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
|
|
498
500
|
h,
|
|
499
501
|
{
|
|
500
502
|
variant: "plain",
|
|
@@ -507,7 +509,7 @@ function M1({
|
|
|
507
509
|
c
|
|
508
510
|
]
|
|
509
511
|
}
|
|
510
|
-
) },
|
|
512
|
+
) }, j)) })
|
|
511
513
|
]
|
|
512
514
|
}
|
|
513
515
|
)
|