@jobber/components 4.53.2-JOB-80005.0 → 4.54.0

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.
@@ -69,7 +69,7 @@ function Banner({ children, type, primaryAction, dismissible = true, icon, onDis
69
69
  onDismiss && onDismiss();
70
70
  }
71
71
  }
72
- function BannerChildren({ children }) {
72
+ function BannerChildren({ children, }) {
73
73
  if (!children)
74
74
  return React__default["default"].createElement(React__default["default"].Fragment, null);
75
75
  if (children && typeof children === "string") {
@@ -8,6 +8,7 @@ import { DataListAction } from "./components/DataListAction";
8
8
  import { DataListLayoutActions } from "./components/DataListLayoutActions";
9
9
  import { DataListBulkActionProps, DataListObject, DataListProps } from "./DataList.types";
10
10
  import { DataListBulkActions } from "./components/DataListBulkActions";
11
+ import { DataListStatusBar } from "./components/DataListStatusBar";
11
12
  export declare function DataList<T extends DataListObject>({ selected, sorting, ...props }: DataListProps<T>): JSX.Element;
12
13
  export declare namespace DataList {
13
14
  var Layout: typeof DataListLayout;
@@ -19,4 +20,5 @@ export declare namespace DataList {
19
20
  var BulkActions: typeof DataListBulkActions;
20
21
  var ItemAction: typeof DataListAction;
21
22
  var BatchAction: (props: DataListBulkActionProps) => JSX.Element;
23
+ var StatusBar: typeof DataListStatusBar;
22
24
  }
@@ -0,0 +1,10 @@
1
+ import { ReactElement } from "react";
2
+ interface DataListStatusBarProps {
3
+ readonly children: ReactElement | ReactElement[];
4
+ }
5
+ export declare function DataListStatusBar(_: DataListStatusBarProps): null;
6
+ /**
7
+ * Renders the DataList.StatusBar component
8
+ */
9
+ export declare function InternalDataListStatusBar(): JSX.Element | null;
10
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./DataListStatusBar";
@@ -987,6 +987,23 @@ function DataListLayoutActionsWrapper({ children }) {
987
987
  return React__default["default"].createElement("div", { className: styles.hidden }, children);
988
988
  }
989
989
 
990
+ // This component is meant to capture the props of the DataList.Filters
991
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
992
+ function DataListStatusBar(_) {
993
+ return null;
994
+ }
995
+ /**
996
+ * Renders the DataList.StatusBar component
997
+ */
998
+ function InternalDataListStatusBar() {
999
+ const { children: parentChildren } = useDataListContext();
1000
+ const component = getCompoundComponent(parentChildren, DataListStatusBar);
1001
+ if (!component)
1002
+ return null;
1003
+ const children = component === null || component === void 0 ? void 0 : component.props.children;
1004
+ return React__default["default"].createElement(React__default["default"].Fragment, null, children);
1005
+ }
1006
+
990
1007
  function DataList(_a) {
991
1008
  var { selected = [], sorting } = _a, props = tslib_es6.__rest(_a, ["selected", "sorting"]);
992
1009
  const [layoutBreakpoints, setLayoutBreakpoints] = React.useState([]);
@@ -1032,6 +1049,7 @@ function InternalDataList() {
1032
1049
  React__default["default"].createElement("div", { className: styles$e.headerFilters },
1033
1050
  React__default["default"].createElement(InternalDataListFilters, null),
1034
1051
  React__default["default"].createElement(InternalDataListSearch, null)),
1052
+ React__default["default"].createElement(InternalDataListStatusBar, null),
1035
1053
  React__default["default"].createElement(DataListHeader, null)),
1036
1054
  initialLoading && React__default["default"].createElement(DataListLoadingState, null),
1037
1055
  showEmptyState && React__default["default"].createElement(InternalDataListEmptyState, null),
@@ -1098,5 +1116,9 @@ DataList.ItemAction = DataListAction;
1098
1116
  DataList.BatchAction = function DataListBatchAction(props) {
1099
1117
  return React__default["default"].createElement(DataListAction, Object.assign({}, props));
1100
1118
  };
1119
+ /**
1120
+ * Defines a status bar that is rendered between the filters and the header.
1121
+ */
1122
+ DataList.StatusBar = DataListStatusBar;
1101
1123
 
1102
1124
  exports.DataList = DataList;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "4.53.2-JOB-80005.0+ab5885f0",
3
+ "version": "4.54.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,8 +20,8 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "@jobber/design": "^0.46.0",
23
- "@jobber/formatters": "^0.2.2",
24
- "@jobber/hooks": "^2.6.3-JOB-80005.6+ab5885f0",
23
+ "@jobber/formatters": "*",
24
+ "@jobber/hooks": "^2.6.2",
25
25
  "@popperjs/core": "^2.0.6",
26
26
  "@std-proposal/temporal": "0.0.1",
27
27
  "@tanstack/react-table": "8.5.13",
@@ -84,5 +84,5 @@
84
84
  "> 1%",
85
85
  "IE 10"
86
86
  ],
87
- "gitHead": "ab5885f062104616051a48f43a4733f4eab74494"
87
+ "gitHead": "0c646dc6699e50aa74bc394e8f8dfe2f49e50835"
88
88
  }