@softwareone/spi-sv5-library 1.11.1 → 1.11.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,4 +1,4 @@
1
- /// <reference path="./types.d.ts" />
1
+ /// <reference path="./tanstack-types.d.ts" />
2
2
  import ExcelJS from 'exceljs';
3
3
  import saveAs from 'file-saver';
4
4
  import { ColumnFormat } from './excel-setting.js';
@@ -4,5 +4,5 @@ export * from './context.js';
4
4
  export { ColumnFormat, type ExcelSetting } from './excel-setting.js';
5
5
  export * from './excel.js';
6
6
  export { default as Table } from './Table.svelte';
7
- export * from './types.js';
7
+ export type { Action, Pagination, Filter } from './types.js';
8
8
  export { createActionsColumn, createStaticTable, getPage, getPageLimit, sanitizeFilters } from './util.js';
@@ -4,5 +4,4 @@ export * from './context.js';
4
4
  export { ColumnFormat } from './excel-setting.js';
5
5
  export * from './excel.js';
6
6
  export { default as Table } from './Table.svelte';
7
- export * from './types.js';
8
7
  export { createActionsColumn, createStaticTable, getPage, getPageLimit, sanitizeFilters } from './util.js';
@@ -0,0 +1,17 @@
1
+ import '@tanstack/table-core';
2
+ import { RowData } from "@tanstack/table-core";
3
+
4
+ import { ColumnFormat } from './excel-setting.ts';
5
+
6
+ declare module '@tanstack/table-core' {
7
+ interface ColumnMeta<TData extends RowData, TValue> {
8
+ alignColumn?: 'left' | 'right' | 'center';
9
+ className?: string;
10
+ columnWidth?: string;
11
+ style?: string;
12
+ isVisible?: boolean;
13
+ excludeFromExport?: boolean;
14
+ columnFormatExport?: ColumnFormat;
15
+ hideColumnFilter?: boolean;
16
+ }
17
+ }
@@ -1,16 +1,18 @@
1
- import '@tanstack/table-core';
2
-
3
- import { ColumnFormat } from './excel-setting.js';
4
-
5
- declare module '@tanstack/table-core' {
6
- interface ColumnMeta<TData extends RowData, TValue> {
7
- alignColumn?: 'left' | 'right' | 'center';
8
- className?: string;
9
- columnWidth?: string;
10
- style?: string;
11
- isVisible?: boolean;
12
- excludeFromExport?: boolean;
13
- columnFormatExport?: ColumnFormat;
14
- hideColumnFilter?: boolean;
15
- }
1
+ import { Operation } from "./consts.js";
2
+ export interface Action {
3
+ name: string;
4
+ isEnabled: boolean;
5
+ isDelete: boolean;
6
+ isMainAction?: boolean;
7
+ onClick: VoidFunction;
8
+ }
9
+ export interface Pagination {
10
+ totalItems: number;
11
+ totalPages: number;
12
+ currentPage: number;
13
+ }
14
+ export interface Filter {
15
+ column: string;
16
+ value: string;
17
+ operation?: Operation;
16
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softwareone/spi-sv5-library",
3
- "version": "1.11.1",
3
+ "version": "1.11.3",
4
4
  "description": "Svelte components",
5
5
  "keywords": [
6
6
  "svelte",