@jobber/components 4.26.1 → 4.26.3
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.
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DataListProps {
|
|
3
|
+
/**
|
|
4
|
+
* Tell the DataList if the data loading
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
items: any[];
|
|
9
|
+
/**
|
|
10
|
+
* Temporary prop for setting default state for if filters are applied
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
filterApplied?: boolean;
|
|
14
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
15
|
+
}
|
|
16
|
+
export declare const EMPTY_FILTER_RESULTS_MESSAGE = "No Results for Selected Filters";
|
|
17
|
+
export declare const EMPTY_FILTER_RESULTS_ACTION_LABEL = "Clear Filters";
|
|
18
|
+
export declare function DataList({ loading, items, filterApplied, children, }: DataListProps): JSX.Element;
|
|
19
|
+
export declare namespace DataList {
|
|
20
|
+
var EmptyState: typeof import("./components/EmptyState").EmptyState;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { XOR } from "ts-xor";
|
|
3
|
+
import { ButtonProps } from "../../../Button";
|
|
4
|
+
interface ActionBase {
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
interface AnchorAction extends ActionBase {
|
|
8
|
+
url: ButtonProps["url"];
|
|
9
|
+
}
|
|
10
|
+
interface LinkAction extends ActionBase {
|
|
11
|
+
to: ButtonProps["to"];
|
|
12
|
+
}
|
|
13
|
+
interface ClickAction extends ActionBase {
|
|
14
|
+
onClick: ButtonProps["onClick"];
|
|
15
|
+
}
|
|
16
|
+
export interface EmptyStateProps {
|
|
17
|
+
message: string;
|
|
18
|
+
action?: XOR<ClickAction, XOR<AnchorAction, LinkAction>>;
|
|
19
|
+
}
|
|
20
|
+
export declare function DataListEmptyState({ message, action }: EmptyStateProps): JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DataListEmptyState as EmptyState, EmptyStateProps, } from "./EmptyState";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "4.26.
|
|
3
|
+
"version": "4.26.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"> 1%",
|
|
84
84
|
"IE 10"
|
|
85
85
|
],
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "4af41f0d6352d5c2fcf5ad4ab90c73e20063bdcb"
|
|
87
87
|
}
|