@compill/admin 1.0.85 → 1.0.87

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/index.cjs.js CHANGED
@@ -368,7 +368,6 @@ function Breadcrumbs(_a) {
368
368
  return jsxRuntime.jsx("div", Object.assign({
369
369
  dflex: true,
370
370
  alignItems: "center",
371
- placeContent: "center",
372
371
  trait: "typo.h5"
373
372
  }, props, {
374
373
  children: breadcrumbs.map((b, index) => jsxRuntime.jsx(BreadcrumbItem, {
@@ -417,7 +416,6 @@ function QueryBreadcrumbs(_a) {
417
416
  return jsxRuntime.jsx("div", Object.assign({
418
417
  dflex: true,
419
418
  alignItems: "center",
420
- placeContent: "center",
421
419
  trait: "typo.h5"
422
420
  }, props, {
423
421
  children: breadcrumbs.map((b, index) => jsxRuntime.jsx(BreadcrumbItem, {
@@ -1786,9 +1784,10 @@ function TableFilterButton(_a) {
1786
1784
  function TableTopBar(_a) {
1787
1785
  var {
1788
1786
  title,
1787
+ breadcrumbs,
1789
1788
  children
1790
1789
  } = _a,
1791
- props = __rest(_a, ["title", "children"]);
1790
+ props = __rest(_a, ["title", "breadcrumbs", "children"]);
1792
1791
  return jsxRuntime.jsxs("div", Object.assign({
1793
1792
  dflex: true,
1794
1793
  flexRow: true,
@@ -1796,12 +1795,16 @@ function TableTopBar(_a) {
1796
1795
  gap: "3",
1797
1796
  p: "8"
1798
1797
  }, props, {
1799
- children: [title && jsxRuntime.jsx("h2", {
1800
- textSize: "x2",
1801
- fontWeight: "600",
1802
- textColor: "#3f4254",
1803
- textTransform: "capitalize",
1804
- children: title
1798
+ children: [jsxRuntime.jsxs("div", {
1799
+ children: [title && jsxRuntime.jsx("h2", {
1800
+ textSize: "x2",
1801
+ fontWeight: "600",
1802
+ textColor: "#3f4254",
1803
+ textTransform: "capitalize",
1804
+ children: title
1805
+ }), breadcrumbs && jsxRuntime.jsx(admin.Breadcrumbs, {
1806
+ breadcrumbs: breadcrumbs
1807
+ })]
1805
1808
  }), jsxRuntime.jsx("div", {
1806
1809
  flexGrow: true,
1807
1810
  children: "\u00A0"
@@ -2669,10 +2672,9 @@ function TT({
2669
2672
  } = screen;
2670
2673
  const tableApi = react.runIfFn(api, id !== null && id !== void 0 ? id : "");
2671
2674
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
2672
- children: [breadcrumbs && jsxRuntime.jsx(PageTopBar, {
2673
- breadcrumbs: breadcrumbs
2674
- }), jsxRuntime.jsx(TableTopBar, {
2675
+ children: [jsxRuntime.jsx(TableTopBar, {
2675
2676
  title: title,
2677
+ breadcrumbs: breadcrumbs,
2676
2678
  children: jsxRuntime.jsx(TableButtonBar, {
2677
2679
  buttonBar: buttonBar,
2678
2680
  createView: createView,
package/index.esm.js CHANGED
@@ -7,7 +7,7 @@ import { useParams, useNavigate, Outlet, useLocation, useMatch, Link as Link$1 }
7
7
  import React, { useRef, useCallback, useContext as useContext$2, useLayoutEffect, useEffect, createContext } from 'react';
8
8
  import { INVALIDATE_API, API } from '@compill/admin-api';
9
9
  import { useFormikContext, Formik, Form } from 'formik';
10
- import { ButtonBarButton as ButtonBarButton$1, ButtonBarSubmitButton as ButtonBarSubmitButton$1, PageSectionTitle as PageSectionTitle$1, ButtonBar as ButtonBar$1, ButtonBarDialogButton as ButtonBarDialogButton$1, TableRowActionButton as TableRowActionButton$1, DialogButton as DialogButton$1 } from '@compill/admin';
10
+ import { ButtonBarButton as ButtonBarButton$1, ButtonBarSubmitButton as ButtonBarSubmitButton$1, PageSectionTitle as PageSectionTitle$1, ButtonBar as ButtonBar$1, ButtonBarDialogButton as ButtonBarDialogButton$1, Breadcrumbs as Breadcrumbs$1, TableRowActionButton as TableRowActionButton$1, DialogButton as DialogButton$1 } from '@compill/admin';
11
11
  import { toast } from 'react-toastify';
12
12
  import 'react/jsx-runtime';
13
13
  import { FormProvider, TextArea, FormRenderer, mergeInitialFormValues, FieldLabel, SubmitButton } from '@compill/form';
@@ -358,7 +358,6 @@ function Breadcrumbs(_a) {
358
358
  return jsx("div", Object.assign({
359
359
  dflex: true,
360
360
  alignItems: "center",
361
- placeContent: "center",
362
361
  trait: "typo.h5"
363
362
  }, props, {
364
363
  children: breadcrumbs.map((b, index) => jsx(BreadcrumbItem, {
@@ -407,7 +406,6 @@ function QueryBreadcrumbs(_a) {
407
406
  return jsx("div", Object.assign({
408
407
  dflex: true,
409
408
  alignItems: "center",
410
- placeContent: "center",
411
409
  trait: "typo.h5"
412
410
  }, props, {
413
411
  children: breadcrumbs.map((b, index) => jsx(BreadcrumbItem, {
@@ -1776,9 +1774,10 @@ function TableFilterButton(_a) {
1776
1774
  function TableTopBar(_a) {
1777
1775
  var {
1778
1776
  title,
1777
+ breadcrumbs,
1779
1778
  children
1780
1779
  } = _a,
1781
- props = __rest(_a, ["title", "children"]);
1780
+ props = __rest(_a, ["title", "breadcrumbs", "children"]);
1782
1781
  return jsxs("div", Object.assign({
1783
1782
  dflex: true,
1784
1783
  flexRow: true,
@@ -1786,12 +1785,16 @@ function TableTopBar(_a) {
1786
1785
  gap: "3",
1787
1786
  p: "8"
1788
1787
  }, props, {
1789
- children: [title && jsx("h2", {
1790
- textSize: "x2",
1791
- fontWeight: "600",
1792
- textColor: "#3f4254",
1793
- textTransform: "capitalize",
1794
- children: title
1788
+ children: [jsxs("div", {
1789
+ children: [title && jsx("h2", {
1790
+ textSize: "x2",
1791
+ fontWeight: "600",
1792
+ textColor: "#3f4254",
1793
+ textTransform: "capitalize",
1794
+ children: title
1795
+ }), breadcrumbs && jsx(Breadcrumbs$1, {
1796
+ breadcrumbs: breadcrumbs
1797
+ })]
1795
1798
  }), jsx("div", {
1796
1799
  flexGrow: true,
1797
1800
  children: "\u00A0"
@@ -2659,10 +2662,9 @@ function TT({
2659
2662
  } = screen;
2660
2663
  const tableApi = runIfFn(api, id !== null && id !== void 0 ? id : "");
2661
2664
  return jsxs(Fragment, {
2662
- children: [breadcrumbs && jsx(PageTopBar, {
2663
- breadcrumbs: breadcrumbs
2664
- }), jsx(TableTopBar, {
2665
+ children: [jsx(TableTopBar, {
2665
2666
  title: title,
2667
+ breadcrumbs: breadcrumbs,
2666
2668
  children: jsx(TableButtonBar, {
2667
2669
  buttonBar: buttonBar,
2668
2670
  createView: createView,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compill/admin",
3
- "version": "1.0.85",
3
+ "version": "1.0.87",
4
4
  "module": "./index.esm.js",
5
5
  "main": "./index.cjs.js"
6
6
  }
@@ -1,7 +1,9 @@
1
1
  /// <reference types="react" />
2
+ import { Breadcrumb, QueryBreadcrumbs } from "@compill/admin";
2
3
  import { ParentComponent, SoperioComponent } from "@soperio/react";
3
4
  interface TableTopBarProps extends SoperioComponent, ParentComponent {
4
5
  title?: string;
6
+ breadcrumbs?: Breadcrumb[] | QueryBreadcrumbs;
5
7
  }
6
- export declare function TableTopBar({ title, children, ...props }: TableTopBarProps): JSX.Element;
8
+ export declare function TableTopBar({ title, breadcrumbs, children, ...props }: TableTopBarProps): JSX.Element;
7
9
  export {};