ublo-lib 1.30.10 → 1.30.11

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,7 +3,48 @@ import Link from "ublo/link";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { Fragment as _Fragment } from "react/jsx-runtime";
5
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
6
- const Item = ({
6
+ export default function Breadcrumb({
7
+ breadcrumb,
8
+ exclusions = []
9
+ }) {
10
+ return _jsx("div", {
11
+ className: "breadcrumb",
12
+ children: _jsx(Items, {
13
+ rawItem: breadcrumb,
14
+ exclusions: exclusions
15
+ })
16
+ });
17
+ }
18
+ function Items({
19
+ rawItem,
20
+ exclusions
21
+ }) {
22
+ if (!rawItem) return null;
23
+ const {
24
+ next,
25
+ name,
26
+ title,
27
+ path,
28
+ page
29
+ } = rawItem;
30
+ const isCurrent = next === undefined;
31
+ const isNextExcluded = !isCurrent && exclusions.includes(next.name);
32
+ const itemToRender = isNextExcluded ? next.next : next;
33
+ const nextItem = !isCurrent ? _jsx(Items, {
34
+ rawItem: itemToRender,
35
+ exclusions: exclusions
36
+ }) : null;
37
+ return _jsx(Item, {
38
+ name: name,
39
+ page: page,
40
+ path: path,
41
+ itemTitle: title,
42
+ nextItem: nextItem,
43
+ isCurrent: isCurrent,
44
+ exclusions: exclusions
45
+ });
46
+ }
47
+ function Item({
7
48
  name,
8
49
  page,
9
50
  path,
@@ -11,7 +52,7 @@ const Item = ({
11
52
  nextItem,
12
53
  isCurrent,
13
54
  exclusions
14
- }) => {
55
+ }) {
15
56
  const hasTemplate = page !== undefined;
16
57
  const isExternalUrl = /^((http|https):\/\/)/.test(path);
17
58
  const noHref = isCurrent || !hasTemplate;
@@ -38,45 +79,4 @@ const Item = ({
38
79
  ...props
39
80
  }), nextItem]
40
81
  });
41
- };
42
- const Items = ({
43
- rawItem,
44
- exclusions
45
- }) => {
46
- if (!rawItem) return null;
47
- const {
48
- next,
49
- name,
50
- title,
51
- path,
52
- page,
53
- shortTitle
54
- } = rawItem;
55
- const isCurrent = next === undefined;
56
- const isNextExcluded = !isCurrent && exclusions.includes(next.name);
57
- const itemToRender = isNextExcluded ? next.next : next;
58
- const nextItem = !isCurrent ? _jsx(Items, {
59
- rawItem: itemToRender,
60
- exclusions: exclusions
61
- }) : null;
62
- return _jsx(Item, {
63
- name: name,
64
- page: page,
65
- path: path,
66
- itemTitle: shortTitle || title,
67
- nextItem: nextItem,
68
- isCurrent: isCurrent,
69
- exclusions: exclusions
70
- });
71
- };
72
- const Breadcrumb = ({
73
- breadcrumb,
74
- exclusions = []
75
- }) => _jsx("div", {
76
- className: "breadcrumb",
77
- children: _jsx(Items, {
78
- rawItem: breadcrumb,
79
- exclusions: exclusions
80
- })
81
- });
82
- export default Breadcrumb;
82
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.30.10",
3
+ "version": "1.30.11",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.8.3",
6
6
  "leaflet": "^1.9.1",