@jobber/components 4.26.9-JOB-75261.10 → 4.27.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.
- package/dist/ConfirmationModal/index.js +3 -3
- package/dist/{ConfirmationModal-1f48131f.js → ConfirmationModal-5df4ef33.js} +2 -2
- package/dist/Content/Content.d.ts +10 -1
- package/dist/Content/index.js +1 -1
- package/dist/{Content-a6590328.js → Content-2ca1ffe1.js} +2 -3
- package/dist/DataDump/index.js +1 -1
- package/dist/DataList/DataList.const.d.ts +11 -0
- package/dist/DataList/DataList.d.ts +1 -1
- package/dist/DataList/DataList.stories.d.ts +1 -0
- package/dist/DataList/DataList.types.d.ts +10 -0
- package/dist/DataList/DataList.utils.d.ts +6 -0
- package/dist/DataList/components/DataListLayout/DataListLayout.d.ts +7 -2
- package/dist/DataList/components/DataListLayoutInternal/DataListHeader.d.ts +12 -0
- package/dist/DataList/components/DataListLayoutInternal/DataListItems.d.ts +11 -0
- package/dist/DataList/components/DataListLayoutInternal/DataListLayoutInternal.d.ts +11 -0
- package/dist/DataList/components/DataListLayoutInternal/index.d.ts +2 -0
- package/dist/DataList/hooks/useLayoutMediaQueries.d.ts +1 -0
- package/dist/DataTable/Body.d.ts +1 -2
- package/dist/DataTable/DataTable.d.ts +1 -5
- package/dist/DataTable/Pagination.d.ts +1 -2
- package/dist/DataTable/index.js +9 -13
- package/dist/FeatureSwitch/index.js +2 -2
- package/dist/FormatFile/index.js +5 -5
- package/dist/{FormatFile-7a77494f.js → FormatFile-7462422e.js} +2 -2
- package/dist/Gallery/index.js +5 -5
- package/dist/Glimmer/index.js +2 -2
- package/dist/{Glimmer-a14ad7fd.js → Glimmer-cfa92a88.js} +1 -1
- package/dist/InputAvatar/index.js +2 -2
- package/dist/InputFile/index.js +2 -2
- package/dist/{InputFile-ee80726f.js → InputFile-54d4531d.js} +1 -1
- package/dist/List/index.js +2 -2
- package/dist/Markdown/index.js +2 -2
- package/dist/{Markdown-53a0bfda.js → Markdown-f6748dcb.js} +1 -1
- package/dist/Page/index.js +2 -2
- package/dist/RecurringSelect/index.js +1 -1
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ConfirmationModal = require('../ConfirmationModal-
|
|
5
|
+
var ConfirmationModal = require('../ConfirmationModal-5df4ef33.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('@jobber/hooks/useOnKeyDown');
|
|
8
8
|
require('../Modal-b684b273.js');
|
|
@@ -19,8 +19,8 @@ require('react-router-dom');
|
|
|
19
19
|
require('../Icon-405a216c.js');
|
|
20
20
|
require('@jobber/design');
|
|
21
21
|
require('../ButtonDismiss-c7ee94a9.js');
|
|
22
|
-
require('../Content-
|
|
23
|
-
require('../Markdown-
|
|
22
|
+
require('../Content-2ca1ffe1.js');
|
|
23
|
+
require('../Markdown-f6748dcb.js');
|
|
24
24
|
require('react-markdown');
|
|
25
25
|
require('../Text-e7ed0974.js');
|
|
26
26
|
require('../Emphasis-76a10790.js');
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var useOnKeyDown = require('@jobber/hooks/useOnKeyDown');
|
|
5
5
|
var Modal = require('./Modal-b684b273.js');
|
|
6
|
-
var Content = require('./Content-
|
|
7
|
-
var Markdown = require('./Markdown-
|
|
6
|
+
var Content = require('./Content-2ca1ffe1.js');
|
|
7
|
+
var Markdown = require('./Markdown-f6748dcb.js');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
10
|
|
|
@@ -8,6 +8,15 @@ interface ContentProps {
|
|
|
8
8
|
* @default base
|
|
9
9
|
*/
|
|
10
10
|
readonly spacing?: keyof typeof spacings;
|
|
11
|
+
/**
|
|
12
|
+
* Change the wrapping element to be one of the available
|
|
13
|
+
* semantic tags.
|
|
14
|
+
*
|
|
15
|
+
* @default 'div'
|
|
16
|
+
*/
|
|
17
|
+
readonly type?: "section" | "aside" | "header" | "footer" | "article" | "main" | "div";
|
|
11
18
|
}
|
|
12
|
-
export declare function Content({ children, spacing }: ContentProps):
|
|
19
|
+
export declare function Content({ children, spacing, type, }: ContentProps): import("react").DetailedReactHTMLElement<{
|
|
20
|
+
className: string;
|
|
21
|
+
}, HTMLElement>;
|
|
13
22
|
export {};
|
package/dist/Content/index.js
CHANGED
|
@@ -6,7 +6,6 @@ var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
9
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
11
10
|
|
|
12
11
|
var css_248z$1 = ".SRYe3DkjH1c- > :not(:last-child) {\n margin-bottom: calc(16px * 1);\n margin-bottom: var(--space-base);\n}\n\n.rDJFaGPzCbE- > :not(:last-child) {\n margin-bottom: calc(16px / 2);\n margin-bottom: var(--space-small);\n}\n\n._7TZ4MI3kr4Y- > :not(:last-child) {\n margin-bottom: calc(16px * 1.5);\n margin-bottom: var(--space-large);\n}\n";
|
|
@@ -17,9 +16,9 @@ var css_248z = "._4On2F-4nWuY- {\n padding: 0;\n padding: var(--public-content
|
|
|
17
16
|
var styles = {"padded":"_4On2F-4nWuY-"};
|
|
18
17
|
styleInject_es.styleInject(css_248z);
|
|
19
18
|
|
|
20
|
-
function Content({ children, spacing = "base" }) {
|
|
19
|
+
function Content({ children, spacing = "base", type = "div", }) {
|
|
21
20
|
const className = classnames__default["default"](styles.padded, spacings[spacing]);
|
|
22
|
-
return
|
|
21
|
+
return React.createElement(type, { className }, children);
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
exports.Content = Content;
|
package/dist/DataDump/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var Card = require('../Card-4553732a.js');
|
|
7
|
-
var Content = require('../Content-
|
|
7
|
+
var Content = require('../Content-2ca1ffe1.js');
|
|
8
8
|
var Emphasis = require('../Emphasis-76a10790.js');
|
|
9
9
|
require('classnames');
|
|
10
10
|
require('../style-inject.es-9d2f5f4e.js');
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grab the type from breakpoints const
|
|
3
|
+
*/
|
|
4
|
+
type ValuesOf<T extends readonly unknown[]> = T[number];
|
|
5
|
+
export type Breakpoints = ValuesOf<typeof BREAKPOINTS>;
|
|
1
6
|
export declare const EMPTY_FILTER_RESULTS_MESSAGE = "No Results for Selected Filters";
|
|
2
7
|
export declare const EMPTY_FILTER_RESULTS_ACTION_LABEL = "Clear Filters";
|
|
8
|
+
/**
|
|
9
|
+
* Breakpoints that we support
|
|
10
|
+
*/
|
|
11
|
+
export declare const BREAKPOINTS: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
12
|
+
export declare const BREAKPOINT_SIZES: Record<Breakpoints, number>;
|
|
13
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DataListLayout } from "./components/DataListLayout";
|
|
3
3
|
import { DataListObject, DataListProps } from "./DataList.types";
|
|
4
|
-
export declare function DataList<T extends DataListObject>({ data, headers, loading, filterApplied, children, title, totalCount, }: DataListProps<T>): JSX.Element;
|
|
4
|
+
export declare function DataList<T extends DataListObject>({ data, headers, loading, filterApplied, children, title, totalCount, headerVisibility, }: DataListProps<T>): JSX.Element;
|
|
5
5
|
export declare namespace DataList {
|
|
6
6
|
var Layout: typeof DataListLayout;
|
|
7
7
|
var EmptyState: typeof import("./components/EmptyState").EmptyState;
|
|
@@ -4,3 +4,4 @@ declare const _default: ComponentMeta<typeof DataList>;
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Basic: ComponentStory<typeof DataList>;
|
|
6
6
|
export declare const EmptyState: ComponentStory<typeof DataList>;
|
|
7
|
+
export declare const Breakpoints: ComponentStory<typeof DataList>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { Breakpoints } from "./DataList.const";
|
|
3
|
+
export { Breakpoints } from "./DataList.const";
|
|
2
4
|
export type DataListItemType<T extends DataListObject[]> = Record<keyof T[number], ReactElement>;
|
|
3
5
|
export type DataListItemTypeFromHeader<TData extends DataListObject, THeader extends DataListHeader<TData>> = Record<keyof THeader, ReactElement>;
|
|
4
6
|
export interface DataListObject {
|
|
@@ -54,4 +56,12 @@ export interface DataListProps<T extends DataListObject> {
|
|
|
54
56
|
* in the list
|
|
55
57
|
*/
|
|
56
58
|
readonly totalCount?: number | null;
|
|
59
|
+
/**
|
|
60
|
+
* Determine if the header is visible at a given breakpoint. If one isn't provided,
|
|
61
|
+
* it will use the value from the next smallest breakpoint that has a value.
|
|
62
|
+
* @default { xs: true, sm: true, md: true, lg: true, xl: true }
|
|
63
|
+
*/
|
|
64
|
+
readonly headerVisibility?: {
|
|
65
|
+
[Breakpoint in Breakpoints]?: boolean;
|
|
66
|
+
};
|
|
57
67
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import React, { ReactElement } from "react";
|
|
2
2
|
import { DataListHeader, DataListItemType, DataListItemTypeFromHeader, DataListObject } from "./DataList.types";
|
|
3
3
|
import { EmptyStateProps } from "./components/EmptyState";
|
|
4
|
+
import { Breakpoints } from "./DataList.const";
|
|
4
5
|
/**
|
|
5
6
|
* Return the child component that matches the `type` provided
|
|
6
7
|
*/
|
|
7
8
|
export declare function getCompoundComponent<T>(children: ReactElement | ReactElement[], type: ReactElement<T>["type"]): ReactElement<T> | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Return all instances child component that matches the `type` provided
|
|
11
|
+
*/
|
|
12
|
+
export declare function getCompoundComponents<T>(children: ReactElement | ReactElement[], type: ReactElement<T>["type"]): ReactElement<T>[];
|
|
8
13
|
/**
|
|
9
14
|
* Generate the default elements the DataList would use on the data provided.
|
|
10
15
|
*/
|
|
@@ -22,4 +27,5 @@ interface UseDataListEmptyStateProps {
|
|
|
22
27
|
* Modify EmptyState to include an empty filter results when filtering happens
|
|
23
28
|
*/
|
|
24
29
|
export declare function generateDataListEmptyState({ children, isFilterApplied, setIsFilterApplied, }: UseDataListEmptyStateProps): React.ReactElement<EmptyStateProps> | undefined;
|
|
30
|
+
export declare function sortSizeProp(sizeProp: Breakpoints[]): ("xs" | "sm" | "md" | "lg" | "xl")[];
|
|
25
31
|
export {};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DataListItemType, DataListObject } from "../../DataList.types";
|
|
2
|
+
import { Breakpoints, DataListItemType, DataListObject } from "../../DataList.types";
|
|
3
3
|
export interface DataListLayoutProps<T extends DataListObject> {
|
|
4
|
-
children: (item: DataListItemType<T[]>) => JSX.Element;
|
|
4
|
+
readonly children: (item: DataListItemType<T[]>) => JSX.Element;
|
|
5
|
+
/**
|
|
6
|
+
* The breakpoint at which the layout should be displayed. It will be rendered until a layout with a larger breakpoint is found.
|
|
7
|
+
* @default "xs"
|
|
8
|
+
*/
|
|
9
|
+
readonly size?: Breakpoints;
|
|
5
10
|
}
|
|
6
11
|
export declare function DataListLayout<T extends DataListObject>(_: DataListLayoutProps<T>): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Breakpoints } from "../../DataList.const";
|
|
3
|
+
import { DataListHeader as DataListHeaderType, DataListItemTypeFromHeader, DataListObject, DataListProps } from "../../DataList.types";
|
|
4
|
+
import { DataListLayoutProps } from "../DataListLayout/DataListLayout";
|
|
5
|
+
interface DataListHeaderProps<T extends DataListObject> {
|
|
6
|
+
readonly layouts: React.ReactElement<DataListLayoutProps<T>>[] | undefined;
|
|
7
|
+
readonly mediaMatches?: Record<Breakpoints, boolean>;
|
|
8
|
+
readonly headerData?: DataListItemTypeFromHeader<T, DataListHeaderType<T>>;
|
|
9
|
+
readonly headerVisibility: NonNullable<DataListProps<T>["headerVisibility"]>;
|
|
10
|
+
}
|
|
11
|
+
export declare function DataListHeader<T extends DataListObject>({ layouts, mediaMatches, headerData, headerVisibility, }: DataListHeaderProps<T>): JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Breakpoints } from "../../DataList.const";
|
|
3
|
+
import { DataListObject } from "../../DataList.types";
|
|
4
|
+
import { DataListLayoutProps } from "../DataListLayout/DataListLayout";
|
|
5
|
+
interface DataListItemsProps<T extends DataListObject> {
|
|
6
|
+
readonly layouts: React.ReactElement<DataListLayoutProps<T>>[] | undefined;
|
|
7
|
+
readonly mediaMatches?: Record<Breakpoints, boolean>;
|
|
8
|
+
readonly data: T[];
|
|
9
|
+
}
|
|
10
|
+
export declare function DataListItems<T extends DataListObject>({ layouts, mediaMatches, data, }: DataListItemsProps<T>): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Breakpoints } from "../../DataList.const";
|
|
3
|
+
import { DataListObject } from "../../DataList.types";
|
|
4
|
+
import { DataListLayoutProps } from "../DataListLayout/DataListLayout";
|
|
5
|
+
interface DataListLayoutInternalProps<T extends DataListObject> {
|
|
6
|
+
readonly layouts: React.ReactElement<DataListLayoutProps<T>>[] | undefined;
|
|
7
|
+
readonly renderLayout: (layout: React.ReactElement<DataListLayoutProps<T>>) => JSX.Element;
|
|
8
|
+
readonly mediaMatches?: Record<Breakpoints, boolean>;
|
|
9
|
+
}
|
|
10
|
+
export declare function DataListLayoutInternal<T extends DataListObject>({ layouts, renderLayout, mediaMatches, }: DataListLayoutInternalProps<T>): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useLayoutMediaQueries(): Record<"xs" | "sm" | "md" | "lg" | "xl", boolean>;
|
package/dist/DataTable/Body.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ interface BodyProps<T> {
|
|
|
5
5
|
onRowClick?: (row: Row<T>) => void;
|
|
6
6
|
height?: number;
|
|
7
7
|
emptyState?: ReactNode | ReactNode[];
|
|
8
|
-
loading: boolean;
|
|
9
8
|
}
|
|
10
|
-
export declare function Body<T extends object>({ table, onRowClick, emptyState,
|
|
9
|
+
export declare function Body<T extends object>({ table, onRowClick, emptyState, }: BodyProps<T>): JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -49,9 +49,5 @@ export interface DataTableProps<T> {
|
|
|
49
49
|
* The elements to display when the data table is empty
|
|
50
50
|
*/
|
|
51
51
|
emptyState?: ReactNode | ReactNode[];
|
|
52
|
-
/**
|
|
53
|
-
* When true, shows the loading state of the DataTable
|
|
54
|
-
*/
|
|
55
|
-
loading?: boolean;
|
|
56
52
|
}
|
|
57
|
-
export declare function DataTable<T extends object>({ data, columns, pagination, sorting, height, stickyHeader, pinFirstColumn, onRowClick, emptyState,
|
|
53
|
+
export declare function DataTable<T extends object>({ data, columns, pagination, sorting, height, stickyHeader, pinFirstColumn, onRowClick, emptyState, }: DataTableProps<T>): JSX.Element;
|
|
@@ -4,7 +4,6 @@ interface PaginationProps<T> {
|
|
|
4
4
|
table: Table<T>;
|
|
5
5
|
itemsPerPage?: number[];
|
|
6
6
|
totalItems: number;
|
|
7
|
-
loading: boolean;
|
|
8
7
|
}
|
|
9
|
-
export declare function Pagination<T extends object>({ table, itemsPerPage, totalItems,
|
|
8
|
+
export declare function Pagination<T extends object>({ table, itemsPerPage, totalItems, }: PaginationProps<T>): JSX.Element;
|
|
10
9
|
export {};
|
package/dist/DataTable/index.js
CHANGED
|
@@ -7,12 +7,10 @@ var classnames = require('classnames');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var jobberHooks = require('@jobber/hooks/useResizeObserver');
|
|
9
9
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
10
|
-
var Glimmer = require('../Glimmer-a14ad7fd.js');
|
|
11
10
|
var tslib_es6 = require('../tslib.es6-5b8768b7.js');
|
|
12
11
|
var Option = require('../Option-63267b27.js');
|
|
13
12
|
var Button = require('../Button-7698424c.js');
|
|
14
13
|
var Text = require('../Text-e7ed0974.js');
|
|
15
|
-
require('../Content-a6590328.js');
|
|
16
14
|
require('../FormField-0f880b07.js');
|
|
17
15
|
require('uuid');
|
|
18
16
|
require('react-hook-form');
|
|
@@ -52,16 +50,14 @@ var css_248z$3 = ".m5A5oeRFaMs- {\n position: relative;\n border: calc(16px /
|
|
|
52
50
|
var styles$3 = {"dataTableContainer":"m5A5oeRFaMs-","tableContainer":"cY-5BrIIUg8-","table":"y8xnHe7fwrI-","pinFirstColumn":"t8QYvdtkQXQ-","stickyHeader":"Y21JuHX6fhk-","pinFirstHeaderSortable":"PJEX8dlqCMA-","sortableColumn":"_9ps4aWGs8W0-","clickableRow":"_59XEEB8l5pI-","emptyState":"a2BGGBkY5J8-"};
|
|
53
51
|
styleInject_es.styleInject(css_248z$3);
|
|
54
52
|
|
|
55
|
-
function Body({ table, onRowClick, emptyState,
|
|
53
|
+
function Body({ table, onRowClick, emptyState, }) {
|
|
56
54
|
const bodyRowClasses = classnames__default["default"]({ [styles$3.clickableRow]: !!onRowClick });
|
|
57
55
|
const handleRowClick = React.useCallback((row) => () => {
|
|
58
56
|
if (onRowClick == undefined)
|
|
59
57
|
return;
|
|
60
58
|
onRowClick(row);
|
|
61
59
|
}, [onRowClick]);
|
|
62
|
-
|
|
63
|
-
const loaderColumns = table.getAllColumns().length;
|
|
64
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null, !loading ? (table.getRowModel().rows.length ? (React__default["default"].createElement("tbody", null, table.getRowModel().rows.map(row => {
|
|
60
|
+
return table.getRowModel().rows.length ? (React__default["default"].createElement("tbody", null, table.getRowModel().rows.map(row => {
|
|
65
61
|
return (React__default["default"].createElement("tr", { key: row.id, onClick: handleRowClick(row), className: bodyRowClasses }, row.getVisibleCells().map(cell => {
|
|
66
62
|
return (React__default["default"].createElement("td", { key: cell.id, style: {
|
|
67
63
|
width: cell.column.getSize(),
|
|
@@ -69,8 +65,7 @@ function Body({ table, onRowClick, emptyState, loading, }) {
|
|
|
69
65
|
maxWidth: cell.column.columnDef.maxSize,
|
|
70
66
|
} }, reactTable.flexRender(cell.column.columnDef.cell, cell.getContext())));
|
|
71
67
|
})));
|
|
72
|
-
}))) : (React__default["default"].createElement("div", { className: classnames__default["default"](styles$3.emptyState) }, emptyState))
|
|
73
|
-
React__default["default"].createElement(Glimmer.Glimmer, null)))))))))));
|
|
68
|
+
}))) : (React__default["default"].createElement("div", { className: classnames__default["default"](styles$3.emptyState) }, emptyState));
|
|
74
69
|
}
|
|
75
70
|
|
|
76
71
|
function createTableSettings(data, columns, options) {
|
|
@@ -131,14 +126,15 @@ var styles$2 = {"pagination":"zn0VRVhObt0-","paginationInfo":"_1d4uh90gfSI-","pa
|
|
|
131
126
|
styleInject_es.styleInject(css_248z$2);
|
|
132
127
|
|
|
133
128
|
const defaultItemsPerPageOptions = ["10", "20", "30", "40", "50"];
|
|
134
|
-
function Pagination({ table, itemsPerPage, totalItems,
|
|
129
|
+
function Pagination({ table, itemsPerPage, totalItems, }) {
|
|
135
130
|
const { pageIndex, pageSize } = table.getState().pagination;
|
|
136
131
|
const totalRows = totalItems;
|
|
137
132
|
const firstPosition = pageIndex * pageSize + 1;
|
|
138
133
|
const secondPosition = Math.min(totalRows, pageSize * (pageIndex + 1));
|
|
139
134
|
const itemsPerPageOptions = React.useMemo(() => { var _a; return (_a = itemsPerPage === null || itemsPerPage === void 0 ? void 0 : itemsPerPage.map(item => String(item))) !== null && _a !== void 0 ? _a : defaultItemsPerPageOptions; }, [itemsPerPage]);
|
|
140
135
|
return secondPosition <= 0 ? (React__default["default"].createElement("div", { className: styles$2.pagination },
|
|
141
|
-
React__default["default"].createElement("div", { className: styles$2.paginationInfo },
|
|
136
|
+
React__default["default"].createElement("div", { className: styles$2.paginationInfo },
|
|
137
|
+
React__default["default"].createElement(Text.Text, null, "No items")))) : (React__default["default"].createElement("div", { className: styles$2.pagination },
|
|
142
138
|
React__default["default"].createElement("div", { className: styles$2.paginationInfo }, `Showing ${firstPosition}-${secondPosition} of ${totalRows} items`),
|
|
143
139
|
React__default["default"].createElement("div", { className: styles$2.paginationNav },
|
|
144
140
|
React__default["default"].createElement("div", { className: styles$2.paginationSelect },
|
|
@@ -237,7 +233,7 @@ function Header({ table, stickyHeader, sorting, onRowClick, }) {
|
|
|
237
233
|
}))))));
|
|
238
234
|
}
|
|
239
235
|
|
|
240
|
-
function DataTable({ data, columns, pagination, sorting, height, stickyHeader, pinFirstColumn, onRowClick, emptyState,
|
|
236
|
+
function DataTable({ data, columns, pagination, sorting, height, stickyHeader, pinFirstColumn, onRowClick, emptyState, }) {
|
|
241
237
|
const [ref, { exactWidth }] = jobberHooks.useResizeObserver();
|
|
242
238
|
const tableSettings = createTableSettings(data, columns, {
|
|
243
239
|
pagination,
|
|
@@ -251,7 +247,7 @@ function DataTable({ data, columns, pagination, sorting, height, stickyHeader, p
|
|
|
251
247
|
React__default["default"].createElement("div", { className: styles$3.tableContainer, style: { height }, ref: ref },
|
|
252
248
|
React__default["default"].createElement("table", { className: tableClasses },
|
|
253
249
|
React__default["default"].createElement(Header, { table: table, sorting: sorting, onRowClick: onRowClick, stickyHeader: stickyHeader }),
|
|
254
|
-
React__default["default"].createElement(Body, { table: table, onRowClick: onRowClick, height: height ? height * 0.7 : undefined, emptyState: emptyState
|
|
250
|
+
React__default["default"].createElement(Body, { table: table, onRowClick: onRowClick, height: height ? height * 0.7 : undefined, emptyState: emptyState }),
|
|
255
251
|
table.getRowModel().rows.length &&
|
|
256
252
|
exactWidth &&
|
|
257
253
|
exactWidth > jobberHooks.Breakpoints.small ? (React__default["default"].createElement(Footer, { table: table, viewType: "desktop" })) : null)),
|
|
@@ -260,7 +256,7 @@ function DataTable({ data, columns, pagination, sorting, height, stickyHeader, p
|
|
|
260
256
|
exactWidth <= jobberHooks.Breakpoints.small ? (React__default["default"].createElement(Footer, { table: table })) : null,
|
|
261
257
|
pagination && (React__default["default"].createElement(Pagination, { table: table, itemsPerPage: pagination.itemsPerPage, totalItems: pagination.manualPagination
|
|
262
258
|
? pagination.totalItems
|
|
263
|
-
: table.getCoreRowModel().rows.length
|
|
259
|
+
: table.getCoreRowModel().rows.length }))));
|
|
264
260
|
}
|
|
265
261
|
|
|
266
262
|
const mockContainerWidth = (exactWidth) => {
|
|
@@ -8,11 +8,11 @@ var classnames = require('classnames');
|
|
|
8
8
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
9
9
|
var Heading = require('../Heading-a1191b15.js');
|
|
10
10
|
var Text = require('../Text-e7ed0974.js');
|
|
11
|
-
var Content = require('../Content-
|
|
11
|
+
var Content = require('../Content-2ca1ffe1.js');
|
|
12
12
|
var Switch = require('../Switch-e75145cc.js');
|
|
13
13
|
var Button = require('../Button-7698424c.js');
|
|
14
14
|
var Emphasis = require('../Emphasis-76a10790.js');
|
|
15
|
-
var Markdown = require('../Markdown-
|
|
15
|
+
var Markdown = require('../Markdown-f6748dcb.js');
|
|
16
16
|
require('../Typography-fd6f932a.js');
|
|
17
17
|
require('react-router-dom');
|
|
18
18
|
require('../Icon-405a216c.js');
|
package/dist/FormatFile/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var FormatFile = require('../FormatFile-
|
|
5
|
+
var FormatFile = require('../FormatFile-7462422e.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('filesize');
|
|
@@ -12,7 +12,7 @@ require('react-router-dom');
|
|
|
12
12
|
require('../Icon-405a216c.js');
|
|
13
13
|
require('@jobber/design');
|
|
14
14
|
require('../Typography-fd6f932a.js');
|
|
15
|
-
require('../ConfirmationModal-
|
|
15
|
+
require('../ConfirmationModal-5df4ef33.js');
|
|
16
16
|
require('@jobber/hooks/useOnKeyDown');
|
|
17
17
|
require('../Modal-b684b273.js');
|
|
18
18
|
require('react-dom');
|
|
@@ -21,12 +21,12 @@ require('@jobber/hooks/useRefocusOnActivator');
|
|
|
21
21
|
require('@jobber/hooks/useFocusTrap');
|
|
22
22
|
require('../Heading-a1191b15.js');
|
|
23
23
|
require('../ButtonDismiss-c7ee94a9.js');
|
|
24
|
-
require('../Content-
|
|
25
|
-
require('../Markdown-
|
|
24
|
+
require('../Content-2ca1ffe1.js');
|
|
25
|
+
require('../Markdown-f6748dcb.js');
|
|
26
26
|
require('react-markdown');
|
|
27
27
|
require('../Text-e7ed0974.js');
|
|
28
28
|
require('../Emphasis-76a10790.js');
|
|
29
|
-
require('../Glimmer-
|
|
29
|
+
require('../Glimmer-cfa92a88.js');
|
|
30
30
|
require('../tslib.es6-5b8768b7.js');
|
|
31
31
|
require('../ProgressBar-5dfc1885.js');
|
|
32
32
|
|
|
@@ -5,8 +5,8 @@ var classnames = require('classnames');
|
|
|
5
5
|
var getHumanReadableFileSize = require('filesize');
|
|
6
6
|
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
7
7
|
var Button = require('./Button-7698424c.js');
|
|
8
|
-
var ConfirmationModal = require('./ConfirmationModal-
|
|
9
|
-
var Glimmer = require('./Glimmer-
|
|
8
|
+
var ConfirmationModal = require('./ConfirmationModal-5df4ef33.js');
|
|
9
|
+
var Glimmer = require('./Glimmer-cfa92a88.js');
|
|
10
10
|
var Icon = require('./Icon-405a216c.js');
|
|
11
11
|
var Typography = require('./Typography-fd6f932a.js');
|
|
12
12
|
var Text = require('./Text-e7ed0974.js');
|
package/dist/Gallery/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var classnames = require('classnames');
|
|
7
7
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
8
8
|
var LightBox = require('../LightBox-b59ee23b.js');
|
|
9
|
-
var FormatFile = require('../FormatFile-
|
|
9
|
+
var FormatFile = require('../FormatFile-7462422e.js');
|
|
10
10
|
var Button = require('../Button-7698424c.js');
|
|
11
11
|
require('framer-motion');
|
|
12
12
|
require('react-dom');
|
|
@@ -16,16 +16,16 @@ require('@jobber/hooks/useOnKeyDown');
|
|
|
16
16
|
require('@jobber/hooks/useFocusTrap');
|
|
17
17
|
require('../ButtonDismiss-c7ee94a9.js');
|
|
18
18
|
require('filesize');
|
|
19
|
-
require('../ConfirmationModal-
|
|
19
|
+
require('../ConfirmationModal-5df4ef33.js');
|
|
20
20
|
require('../Modal-b684b273.js');
|
|
21
21
|
require('../Heading-a1191b15.js');
|
|
22
22
|
require('../Typography-fd6f932a.js');
|
|
23
|
-
require('../Content-
|
|
24
|
-
require('../Markdown-
|
|
23
|
+
require('../Content-2ca1ffe1.js');
|
|
24
|
+
require('../Markdown-f6748dcb.js');
|
|
25
25
|
require('react-markdown');
|
|
26
26
|
require('../Text-e7ed0974.js');
|
|
27
27
|
require('../Emphasis-76a10790.js');
|
|
28
|
-
require('../Glimmer-
|
|
28
|
+
require('../Glimmer-cfa92a88.js');
|
|
29
29
|
require('../tslib.es6-5b8768b7.js');
|
|
30
30
|
require('../Icon-405a216c.js');
|
|
31
31
|
require('@jobber/design');
|
package/dist/Glimmer/index.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Glimmer = require('../Glimmer-
|
|
5
|
+
var Glimmer = require('../Glimmer-cfa92a88.js');
|
|
6
6
|
require('../tslib.es6-5b8768b7.js');
|
|
7
7
|
require('react');
|
|
8
8
|
require('classnames');
|
|
9
9
|
require('../style-inject.es-9d2f5f4e.js');
|
|
10
|
-
require('../Content-
|
|
10
|
+
require('../Content-2ca1ffe1.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -4,7 +4,7 @@ var tslib_es6 = require('./tslib.es6-5b8768b7.js');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var classnames = require('classnames');
|
|
6
6
|
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
7
|
-
var Content = require('./Content-
|
|
7
|
+
var Content = require('./Content-2ca1ffe1.js');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
10
|
|
|
@@ -6,7 +6,7 @@ var tslib_es6 = require('../tslib.es6-5b8768b7.js');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
8
8
|
var Avatar = require('../Avatar-1aa30ee1.js');
|
|
9
|
-
var InputFile = require('../InputFile-
|
|
9
|
+
var InputFile = require('../InputFile-54d4531d.js');
|
|
10
10
|
var ProgressBar = require('../ProgressBar-5dfc1885.js');
|
|
11
11
|
var Button = require('../Button-7698424c.js');
|
|
12
12
|
require('classnames');
|
|
@@ -16,7 +16,7 @@ require('@jobber/design');
|
|
|
16
16
|
require('react-dropzone');
|
|
17
17
|
require('axios');
|
|
18
18
|
require('uuid');
|
|
19
|
-
require('../Content-
|
|
19
|
+
require('../Content-2ca1ffe1.js');
|
|
20
20
|
require('../Typography-fd6f932a.js');
|
|
21
21
|
require('react-router-dom');
|
|
22
22
|
|
package/dist/InputFile/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var InputFile = require('../InputFile-
|
|
5
|
+
var InputFile = require('../InputFile-54d4531d.js');
|
|
6
6
|
require('../tslib.es6-5b8768b7.js');
|
|
7
7
|
require('react');
|
|
8
8
|
require('classnames');
|
|
@@ -15,7 +15,7 @@ require('react-router-dom');
|
|
|
15
15
|
require('../Icon-405a216c.js');
|
|
16
16
|
require('@jobber/design');
|
|
17
17
|
require('../Typography-fd6f932a.js');
|
|
18
|
-
require('../Content-
|
|
18
|
+
require('../Content-2ca1ffe1.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -8,7 +8,7 @@ var axios = require('axios');
|
|
|
8
8
|
var uuid = require('uuid');
|
|
9
9
|
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
10
10
|
var Button = require('./Button-7698424c.js');
|
|
11
|
-
var Content = require('./Content-
|
|
11
|
+
var Content = require('./Content-2ca1ffe1.js');
|
|
12
12
|
var Typography = require('./Typography-fd6f932a.js');
|
|
13
13
|
|
|
14
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
package/dist/List/index.js
CHANGED
|
@@ -11,11 +11,11 @@ var Icon = require('../Icon-405a216c.js');
|
|
|
11
11
|
var Text = require('../Text-e7ed0974.js');
|
|
12
12
|
var Heading = require('../Heading-a1191b15.js');
|
|
13
13
|
var Typography = require('../Typography-fd6f932a.js');
|
|
14
|
-
var Markdown = require('../Markdown-
|
|
14
|
+
var Markdown = require('../Markdown-f6748dcb.js');
|
|
15
15
|
var Emphasis = require('../Emphasis-76a10790.js');
|
|
16
16
|
require('@jobber/design');
|
|
17
17
|
require('react-markdown');
|
|
18
|
-
require('../Content-
|
|
18
|
+
require('../Content-2ca1ffe1.js');
|
|
19
19
|
|
|
20
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
21
|
|
package/dist/Markdown/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Markdown = require('../Markdown-
|
|
5
|
+
var Markdown = require('../Markdown-f6748dcb.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('react-markdown');
|
|
8
8
|
require('../Text-e7ed0974.js');
|
|
@@ -11,7 +11,7 @@ require('classnames');
|
|
|
11
11
|
require('../style-inject.es-9d2f5f4e.js');
|
|
12
12
|
require('../Emphasis-76a10790.js');
|
|
13
13
|
require('../Heading-a1191b15.js');
|
|
14
|
-
require('../Content-
|
|
14
|
+
require('../Content-2ca1ffe1.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -5,7 +5,7 @@ var ReactMarkdown = require('react-markdown');
|
|
|
5
5
|
var Text = require('./Text-e7ed0974.js');
|
|
6
6
|
var Emphasis = require('./Emphasis-76a10790.js');
|
|
7
7
|
var Heading = require('./Heading-a1191b15.js');
|
|
8
|
-
var Content = require('./Content-
|
|
8
|
+
var Content = require('./Content-2ca1ffe1.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
package/dist/Page/index.js
CHANGED
|
@@ -8,8 +8,8 @@ var jobberHooks = require('@jobber/hooks/useResizeObserver');
|
|
|
8
8
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
9
9
|
var Heading = require('../Heading-a1191b15.js');
|
|
10
10
|
var Text = require('../Text-e7ed0974.js');
|
|
11
|
-
var Content = require('../Content-
|
|
12
|
-
var Markdown = require('../Markdown-
|
|
11
|
+
var Content = require('../Content-2ca1ffe1.js');
|
|
12
|
+
var Markdown = require('../Markdown-f6748dcb.js');
|
|
13
13
|
var Button = require('../Button-7698424c.js');
|
|
14
14
|
var Menu = require('../Menu-2b5fd0b2.js');
|
|
15
15
|
var Emphasis = require('../Emphasis-76a10790.js');
|
|
@@ -12,7 +12,7 @@ require('../Typography-fd6f932a.js');
|
|
|
12
12
|
var Option = require('../Option-63267b27.js');
|
|
13
13
|
var InputNumber = require('../InputNumber-49873d31.js');
|
|
14
14
|
var InputGroup = require('../InputGroup-3fdde16b.js');
|
|
15
|
-
var Content = require('../Content-
|
|
15
|
+
var Content = require('../Content-2ca1ffe1.js');
|
|
16
16
|
require('../FormField-0f880b07.js');
|
|
17
17
|
require('../tslib.es6-5b8768b7.js');
|
|
18
18
|
require('react-hook-form');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.27.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@jobber/design": "^0.44.4",
|
|
23
|
-
"@jobber/formatters": "
|
|
23
|
+
"@jobber/formatters": "*",
|
|
24
24
|
"@jobber/hooks": "^2.1.5",
|
|
25
25
|
"@popperjs/core": "^2.0.6",
|
|
26
26
|
"@std-proposal/temporal": "0.0.1",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"> 1%",
|
|
85
85
|
"IE 10"
|
|
86
86
|
],
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "8ae1169e35b132825ecad1640d58a511375d481c"
|
|
88
88
|
}
|