@retailcrm/datalens-ui 0.1.1 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retailcrm/datalens-ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Datalens UI packed as library",
5
5
  "author": "RetailDriverLLC <integration@retailcrm.ru>",
6
6
  "contributors": [
@@ -6,7 +6,7 @@ import { getEntityBreadcrumbsItems } from "./helpers.js";
6
6
  /* empty css */
7
7
  const b = block("entry-panel-breadcrumbs");
8
8
  const EntryBreadcrumbs = (props) => {
9
- const { renderRootContent, entry, workbookName, entityBreadcrumbs, endContent } = props;
9
+ const { entry, workbookName, entityBreadcrumbs, endContent } = props;
10
10
  const history = useHistory();
11
11
  const location = useLocation();
12
12
  let breadcrumbsItems = [];
@@ -21,11 +21,7 @@ const EntryBreadcrumbs = (props) => {
21
21
  }
22
22
  return /* @__PURE__ */ jsx(Breadcrumbs, { showRoot: true, className: b(), endContent, children: breadcrumbsItems.map((item, index) => {
23
23
  const last = index === breadcrumbsItems.length - 1;
24
- let content = null;
25
- if (index === 0 && !entry?.workbookId && renderRootContent) {
26
- content = renderRootContent(item);
27
- }
28
- content = item.text;
24
+ const url = new URL(item.path ?? "/", "http://sample.test");
29
25
  return /* @__PURE__ */ jsx(
30
26
  Breadcrumbs.Item,
31
27
  {
@@ -37,8 +33,8 @@ const EntryBreadcrumbs = (props) => {
37
33
  },
38
34
  className: b("item", { link: Boolean(item.path) }),
39
35
  disabled: last,
40
- href: item.path,
41
- children: content
36
+ href: history.createHref({ pathname: url.pathname, search: url.search }),
37
+ children: item.text
42
38
  },
43
39
  index
44
40
  );