@stella-source/stellasource-dsl 0.2.8 → 1.2.9
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/cjs/index.js +12 -31
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Table/Table.d.ts +1 -1
- package/dist/cjs/types/components/Table/styles.d.ts +3 -1
- package/dist/cjs/types/components/Table/types.d.ts +2 -1
- package/dist/cjs/types/components/TableUnitsAndTotals/TableUnitsAndTotals.d.ts +2 -2
- package/dist/cjs/types/components/TableUnitsAndTotals/types.d.ts +12 -25
- package/dist/esm/index.esm.js +13 -32
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/types/components/Table/Table.d.ts +1 -1
- package/dist/esm/types/components/Table/styles.d.ts +3 -1
- package/dist/esm/types/components/Table/types.d.ts +2 -1
- package/dist/esm/types/components/TableUnitsAndTotals/TableUnitsAndTotals.d.ts +2 -2
- package/dist/esm/types/components/TableUnitsAndTotals/types.d.ts +12 -25
- package/dist/index.d.ts +18 -30
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TableProps } from "./types";
|
|
3
|
-
declare function Table<T>({ columns, data, isLoading, serverSide, onPageChange, onSortChange, onFilterChange, onRowSelect, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, }: TableProps<T>): React.JSX.Element;
|
|
3
|
+
declare function Table<T>({ columns, data, isLoading, serverSide, onPageChange, onSortChange, onFilterChange, onRowSelect, onRowClick, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, }: TableProps<T>): React.JSX.Element;
|
|
4
4
|
export default Table;
|
|
@@ -18,7 +18,9 @@ declare const StyledTable: import("styled-components/dist/types").IStyledCompone
|
|
|
18
18
|
declare const CustomIconButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("../IconButton/types").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, HeaderIconButtonProps>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<import("../IconButton/types").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
|
|
19
19
|
declare const SortButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<Omit<import("../IconButton/types").IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, keyof HeaderIconButtonProps> & HeaderIconButtonProps, HeaderIconButtonProps>> & string;
|
|
20
20
|
declare const HeaderRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, never>> & string;
|
|
21
|
-
declare const CellRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
21
|
+
declare const CellRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {
|
|
22
|
+
$isClickable: boolean;
|
|
23
|
+
}>> & string;
|
|
22
24
|
declare const FilterMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
23
25
|
declare const Checkbox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>>, never>, never>> & string;
|
|
24
26
|
declare const MenuItemGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -21,6 +21,7 @@ export interface TableProps<T> {
|
|
|
21
21
|
}[]) => void;
|
|
22
22
|
onFilterChange?: (filters: ColumnFiltersState) => void;
|
|
23
23
|
onRowSelect?: (rows: T[]) => void;
|
|
24
|
+
onRowClick?: (row: T) => void;
|
|
24
25
|
showSelection?: boolean;
|
|
25
26
|
showRowOptions?: boolean;
|
|
26
27
|
showPagination?: boolean;
|
|
@@ -38,7 +39,7 @@ export interface TableProps<T> {
|
|
|
38
39
|
paginationDetails?: PaginationDetails;
|
|
39
40
|
rowStatuses?: Record<number | string, RowStatus>;
|
|
40
41
|
resetTrigger?: number;
|
|
41
|
-
emptyTableState
|
|
42
|
+
emptyTableState?: {
|
|
42
43
|
header: string;
|
|
43
44
|
subHeader?: string;
|
|
44
45
|
showClearFilterButton?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
declare const TableUnitsAndTotals: ({ id, className, value, subValue,
|
|
2
|
+
import { TableUnitsAndTotalsProps } from "./types";
|
|
3
|
+
declare const TableUnitsAndTotals: ({ id, className, value, subValue, valueRightCategory, valueLeftCategory, subValueRightCategory, subValueLeftCategory }: TableUnitsAndTotalsProps) => React.JSX.Element;
|
|
4
4
|
export default TableUnitsAndTotals;
|
|
@@ -1,32 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
TOTAL_PRICE = "total-price",
|
|
3
|
-
TOTAL_WEIGHT = "total-weight"
|
|
4
|
-
}
|
|
5
|
-
export declare enum QuoteCategory {
|
|
6
|
-
ITEM = "/item",
|
|
7
|
-
HOUR = "/hr",
|
|
8
|
-
CWT = "CWT",
|
|
9
|
-
LBS = "lbs",
|
|
10
|
-
KG = "kg",
|
|
11
|
-
TON = "ton"
|
|
12
|
-
}
|
|
13
|
-
interface TableUnitsAndTotalsProps {
|
|
1
|
+
interface TableUnitsAndTotalsCoreProps {
|
|
14
2
|
id?: string;
|
|
15
3
|
className?: string;
|
|
16
4
|
value: number | string;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
interface TotalPriceProps {
|
|
21
|
-
variant: `${QuoteVariants.TOTAL_PRICE}`;
|
|
22
|
-
leftCategory?: `${TableUnitsAndTotalsLeftCategory}`;
|
|
5
|
+
valueRightCategory?: string;
|
|
6
|
+
valueLeftCategory?: string;
|
|
23
7
|
}
|
|
24
|
-
interface
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
interface TableUnitsAndTotalsSubValueProps {
|
|
9
|
+
subValue: number | string;
|
|
10
|
+
subValueRightCategory?: string;
|
|
11
|
+
subValueLeftCategory?: string;
|
|
27
12
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
interface TableUnitsAndTotalsWithoutSubValueProps {
|
|
14
|
+
subValue?: never;
|
|
15
|
+
subValueRightCategory?: never;
|
|
16
|
+
subValueLeftCategory?: never;
|
|
31
17
|
}
|
|
18
|
+
export type TableUnitsAndTotalsProps = TableUnitsAndTotalsCoreProps & (TableUnitsAndTotalsSubValueProps | TableUnitsAndTotalsWithoutSubValueProps);
|
|
32
19
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -257,6 +257,7 @@ interface TableProps<T> {
|
|
|
257
257
|
}[]) => void;
|
|
258
258
|
onFilterChange?: (filters: ColumnFiltersState) => void;
|
|
259
259
|
onRowSelect?: (rows: T[]) => void;
|
|
260
|
+
onRowClick?: (row: T) => void;
|
|
260
261
|
showSelection?: boolean;
|
|
261
262
|
showRowOptions?: boolean;
|
|
262
263
|
showPagination?: boolean;
|
|
@@ -274,7 +275,7 @@ interface TableProps<T> {
|
|
|
274
275
|
paginationDetails?: PaginationDetails;
|
|
275
276
|
rowStatuses?: Record<number | string, RowStatus>;
|
|
276
277
|
resetTrigger?: number;
|
|
277
|
-
emptyTableState
|
|
278
|
+
emptyTableState?: {
|
|
278
279
|
header: string;
|
|
279
280
|
subHeader?: string;
|
|
280
281
|
showClearFilterButton?: boolean;
|
|
@@ -283,7 +284,7 @@ interface TableProps<T> {
|
|
|
283
284
|
}
|
|
284
285
|
type RowStatus = "action-pending" | "completed";
|
|
285
286
|
|
|
286
|
-
declare function Table<T>({ columns, data, isLoading, serverSide, onPageChange, onSortChange, onFilterChange, onRowSelect, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, }: TableProps<T>): React$1.JSX.Element;
|
|
287
|
+
declare function Table<T>({ columns, data, isLoading, serverSide, onPageChange, onSortChange, onFilterChange, onRowSelect, onRowClick, rowStatuses, showSelection, showRowOptions, showPagination, variant, paginationDetails, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, }: TableProps<T>): React$1.JSX.Element;
|
|
287
288
|
|
|
288
289
|
interface PaginationProps {
|
|
289
290
|
id?: string;
|
|
@@ -311,39 +312,26 @@ interface SyncProps {
|
|
|
311
312
|
|
|
312
313
|
declare const Sync: ({ dataTestId, onClick, className, id, showTime, labelPosition, }: SyncProps) => React$1.JSX.Element;
|
|
313
314
|
|
|
314
|
-
|
|
315
|
-
TOTAL_PRICE = "total-price",
|
|
316
|
-
TOTAL_WEIGHT = "total-weight"
|
|
317
|
-
}
|
|
318
|
-
declare enum QuoteCategory {
|
|
319
|
-
ITEM = "/item",
|
|
320
|
-
HOUR = "/hr",
|
|
321
|
-
CWT = "CWT",
|
|
322
|
-
LBS = "lbs",
|
|
323
|
-
KG = "kg",
|
|
324
|
-
TON = "ton"
|
|
325
|
-
}
|
|
326
|
-
interface TableUnitsAndTotalsProps {
|
|
315
|
+
interface TableUnitsAndTotalsCoreProps {
|
|
327
316
|
id?: string;
|
|
328
317
|
className?: string;
|
|
329
318
|
value: number | string;
|
|
330
|
-
|
|
331
|
-
|
|
319
|
+
valueRightCategory?: string;
|
|
320
|
+
valueLeftCategory?: string;
|
|
332
321
|
}
|
|
333
|
-
interface
|
|
334
|
-
|
|
335
|
-
|
|
322
|
+
interface TableUnitsAndTotalsSubValueProps {
|
|
323
|
+
subValue: number | string;
|
|
324
|
+
subValueRightCategory?: string;
|
|
325
|
+
subValueLeftCategory?: string;
|
|
336
326
|
}
|
|
337
|
-
interface
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
type TableUnitsAndTotals$1 = TableUnitsAndTotalsProps & (TotalPriceProps | TotalWeightProps);
|
|
342
|
-
declare enum TableUnitsAndTotalsLeftCategory {
|
|
343
|
-
US_CURRENCY = "$"
|
|
327
|
+
interface TableUnitsAndTotalsWithoutSubValueProps {
|
|
328
|
+
subValue?: never;
|
|
329
|
+
subValueRightCategory?: never;
|
|
330
|
+
subValueLeftCategory?: never;
|
|
344
331
|
}
|
|
332
|
+
type TableUnitsAndTotalsProps = TableUnitsAndTotalsCoreProps & (TableUnitsAndTotalsSubValueProps | TableUnitsAndTotalsWithoutSubValueProps);
|
|
345
333
|
|
|
346
|
-
declare const TableUnitsAndTotals: ({ id, className, value, subValue,
|
|
334
|
+
declare const TableUnitsAndTotals: ({ id, className, value, subValue, valueRightCategory, valueLeftCategory, subValueRightCategory, subValueLeftCategory }: TableUnitsAndTotalsProps) => React$1.JSX.Element;
|
|
347
335
|
|
|
348
336
|
declare const Styles: {
|
|
349
337
|
color: {
|
|
@@ -406,5 +394,5 @@ declare const Styles: {
|
|
|
406
394
|
};
|
|
407
395
|
};
|
|
408
396
|
|
|
409
|
-
export { HelperText, IconButton, Label, Loader, NumberInput, Pagination, PasswordInput,
|
|
410
|
-
export type { StellaIconDefinition };
|
|
397
|
+
export { HelperText, IconButton, Label, Loader, NumberInput, Pagination, PasswordInput, StellaButton, StellaButtonVariant, StellaIcon, Styles, Sync, Table, TableUnitsAndTotals, TextInput, Tooltip };
|
|
398
|
+
export type { StellaIconDefinition, TableUnitsAndTotalsProps };
|