asma-core-ui 3.0.4 → 3.0.6

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.
@@ -3,8 +3,7 @@ import { type Table } from '@tanstack/react-table';
3
3
  import type { StyledTableProps } from '../types';
4
4
  export declare function TableFooter<TData extends {
5
5
  id: string | number;
6
- }, TCustomData = Record<string, unknown>>({ table, styledTableProps, tableId, }: {
6
+ }, TCustomData = Record<string, unknown>>({ table, styledTableProps }: {
7
7
  table: Table<TData>;
8
8
  styledTableProps: StyledTableProps<TData, TCustomData>;
9
- tableId: string;
10
9
  }): JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { type Header } from '@tanstack/react-table';
3
+ import type { StyledTableProps } from '../types';
4
+ export declare function TableHeaderCell<TData extends {
5
+ id: string | number;
6
+ }, TCustomData = Record<string, unknown>>({ styledTableProps, header, }: {
7
+ styledTableProps: StyledTableProps<TData, TCustomData>;
8
+ header: Header<TData, unknown>;
9
+ }): JSX.Element;
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { Table } from '@tanstack/react-table';
3
- export declare function TablePagination<TData>({ table, locale, tableId, }: {
3
+ export declare function TablePagination<TData>({ table, locale }: {
4
4
  locale: 'en' | 'no';
5
5
  table: Table<TData>;
6
- tableId: string;
7
6
  }): JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ import type { Header } from '@tanstack/react-table';
2
+ export declare const getTableHeaderStyle: <TData>(props: {
3
+ enableResizing: boolean;
4
+ header: Header<TData, unknown>;
5
+ element: HTMLTableCellElement | null;
6
+ }) => {
7
+ width: string | number | undefined;
8
+ maxWidth: string | number | undefined;
9
+ minWidth: string | number | undefined;
10
+ };
@@ -0,0 +1,6 @@
1
+ import type { Row } from '@tanstack/react-table';
2
+ import type { ITemplate } from '../../service/types';
3
+ export declare const generateActions: (row: Row<ITemplate>) => {
4
+ label: string;
5
+ onClick: () => void;
6
+ }[];
@@ -0,0 +1,5 @@
1
+ import type { ColumnDef } from '@tanstack/react-table';
2
+ import type { ITemplate } from '../../service/types';
3
+ export declare const useColumns: () => {
4
+ columns: ColumnDef<ITemplate, ITemplate>[];
5
+ };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { Participant } from '../helpers/makeData';
2
+ import type { Participant } from '../../helpers/makeData';
3
3
  export declare const RenderSubRows: React.FC<{
4
4
  subRows: Participant[];
5
5
  }>;
@@ -1,4 +1,4 @@
1
- import type { Person } from '../helpers/makeData';
1
+ import type { Person } from '../../helpers/makeData';
2
2
  import type { Row } from '@tanstack/react-table';
3
3
  export declare function getRowActions(row: Row<Person>): ({
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import type { Person } from '../helpers/makeData';
1
+ import type { Person } from '../../helpers/makeData';
2
2
  import type { ColumnDef } from '@tanstack/react-table';
3
3
  /**
4
4
  * Custom props:
@@ -1,4 +1,4 @@
1
- import type { Participant } from '../helpers/makeData';
1
+ import type { Participant } from '../../helpers/makeData';
2
2
  import type { ColumnDef } from '@tanstack/react-table';
3
3
  export declare const useTableSubRowsColumns: () => {
4
4
  columns: ColumnDef<Participant, Participant>[];
@@ -0,0 +1,5 @@
1
+ export declare const TemplatesQueryString: () => string;
2
+ export declare const TemplatesQuery: {
3
+ query: string;
4
+ variables: {};
5
+ };
@@ -0,0 +1,9 @@
1
+ export type ITemplate = {
2
+ id: string;
3
+ context: string;
4
+ archived: string;
5
+ title: string;
6
+ template_uuid: string;
7
+ valid_days: string;
8
+ updated_at: string;
9
+ };
@@ -0,0 +1,4 @@
1
+ import type { ITemplate } from './types';
2
+ export declare const useFetchTemplates: () => {
3
+ data: ITemplate[];
4
+ };
@@ -57,6 +57,7 @@ export type StyledTableProps<TData, TCustomData> = {
57
57
  getRowSelectionIds?: (ids: string[]) => void;
58
58
  hideHeader?: boolean;
59
59
  pageSize?: number;
60
+ enableResizing?: boolean;
60
61
  } & Omit<TTableOptions<TData>, 'getCoreRowModel' | 'getExpandedRowModel' | 'getFilteredRowModel' | 'getSortedRowModel'> & TFooter<TData>;
61
62
  export declare const SELECT_COLUMN_ID = "select";
62
63
  export declare const EXPAND_COLUMN_ID = "expand-column-id";