sevago-library 1.7.0-beta.2 → 1.7.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.
@@ -1,7 +1,6 @@
1
1
  export declare const TABLE_FILTER_SECTION_SX: {
2
2
  padding: string;
3
3
  };
4
- export declare const TABLE_FILTER_VISIBLE_BATCH = 50;
5
4
  export declare const TABLE_FILTER_LABELS: {
6
5
  open: string;
7
6
  apply: string;
@@ -1,4 +1,4 @@
1
1
  import { DotNetColumnFilterParams } from '../interface/column-filter-table.interface';
2
2
  import { DotNetColumnFilterSourceController, DotNetColumnFilterSourceOptions } from '../interface/dotnet-column-filter-source.interface';
3
- /** Owns options caching and paging; only explicit client mode loads the complete row source. */
3
+ /** Loads the complete filter domain before enabling selection. Server cache retains options only. */
4
4
  export declare function useDotNetColumnFilterSource<R, P extends DotNetColumnFilterParams>({ cacheKey, request, column, client, enabled, fetchPage, fetchOptions, readPage, optionsPageSize, optionsMaxPages, }: DotNetColumnFilterSourceOptions<R, P>): DotNetColumnFilterSourceController<R>;
@@ -25,7 +25,7 @@ export interface ColumnFilterTableState {
25
25
  /** UI-only: app SWR can use it to load the active column options without mirrored state. */
26
26
  openColumn?: string;
27
27
  }
28
- /** Domain after other columns' filters, excluding its own. Partial pages must keep complete false. */
28
+ /** Complete domain within the business scope and preceding header selections. Partial pages keep complete false. */
29
29
  export interface ColumnFilterOptionsSource {
30
30
  key: string;
31
31
  options: TableFilterOption[];
@@ -60,7 +60,7 @@ export interface ColumnFilterTableController<R> {
60
60
  hasEmptySelection: boolean;
61
61
  setFilters: (changes: ColumnFilterValues) => void;
62
62
  setPage: (page: number, take?: number) => void;
63
- /** Removes the open column's own filter and resets the page for distinct options loading. */
63
+ /** Keeps preceding header selections in application order and resets the page for options loading. */
64
64
  optionsState?: ColumnFilterTableState;
65
65
  }
66
66
  export interface ColumnFilterPage<R> {
@@ -14,16 +14,10 @@ export interface DotNetColumnFilterSourceData<R> {
14
14
  rows: R[];
15
15
  options: TableFilterOption[];
16
16
  }
17
- export interface DotNetColumnFilterOptionsPage {
18
- options: TableFilterOption[];
19
- complete: boolean;
20
- loaded: number;
21
- }
22
17
  export interface DotNetColumnFilterSourceController<R> extends DotNetColumnFilterSourceData<R> {
23
18
  complete: boolean;
24
19
  loading: boolean;
25
20
  error: unknown;
26
21
  allowPartialSelection: boolean;
27
- onLoadMore?: () => void;
28
22
  refresh: () => Promise<void>;
29
23
  }
@@ -15,11 +15,11 @@ export interface DotNetColumnFilterTableOptions<R, P extends DotNetColumnFilterP
15
15
  /** CSV values; [] is serialized as "[]". The application owns URL navigation. */
16
16
  onFiltersChange?: (changes: Record<string, string | undefined>) => void;
17
17
  optionsSort?: DotNetColumnFilterParams['sort'];
18
- /** Server fallback loads one page on open; further pages require the filter's Load more action. Default 500. */
18
+ /** Batch size for automatically loading the complete options domain on open. Default 500. */
19
19
  optionsPageSize?: number;
20
20
  /** Maximum pages requested per options domain. Default 1000. */
21
21
  optionsMaxPages?: number;
22
- /** Prefer a distinct-values service. Must return the complete domain, excluding this column's own filter. */
22
+ /** Prefer a distinct-values service. Returns the complete domain constrained by business scope and preceding header selections. */
23
23
  fetchOptions?: (request: P, column: FilterTableColumn<R, P>) => Promise<TableFilterOption[]>;
24
24
  /** Keep external dialog root arrays when that column has no active header selection. Default true. */
25
25
  preserveExternalArrayParams?: boolean;
@@ -31,6 +31,7 @@ export interface TableColumnFilter {
31
31
  optionsComplete?: boolean;
32
32
  /** Explicit INCLUDE selections may be applied before the domain is complete. */
33
33
  allowPartialSelection?: boolean;
34
+ /** @deprecated The built-in filter displays all supplied options without a Load more action. */
34
35
  onLoadMore?: () => void;
35
36
  sortable?: boolean;
36
37
  labels?: TableFilterLabels;
@@ -5,4 +5,3 @@ type Story = StoryObj;
5
5
  export declare const DotNet: Story;
6
6
  export declare const NodeJs: Story;
7
7
  export declare const ClientFallback: Story;
8
- export declare const IncrementalOptions: Story;
@@ -10,4 +10,5 @@ export declare const collectColumnFilterOptions: <R, P>(rows: R[], column: Filte
10
10
  export declare const filterColumnTableRows: <R, P>(rows: R[], columns: FilterTableColumn<R, P>[], filters: ColumnFilterValues, sort?: TableColumnSort) => R[];
11
11
  /** Opt-in paginated fallback for endpoints without a distinct API; fails rather than returning partial options. */
12
12
  export declare const loadColumnFilterRows: <R>({ fetchPage, take, maxPages, signal, }: ColumnFilterLoadOptions<R>) => Promise<R[]>;
13
- export declare const getColumnFilterOptionsState: (state: ColumnFilterTableState) => ColumnFilterTableState | undefined;
13
+ /** Options follow filter application order; omitted columns retain the legacy own-column scope. */
14
+ export declare const getColumnFilterOptionsState: <R, P>(state: ColumnFilterTableState, columns?: FilterTableColumn<R, P>[]) => ColumnFilterTableState | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sevago-library",
3
- "version": "1.7.0-beta.2",
3
+ "version": "1.7.0",
4
4
  "description": "Sevago SSO Frontend Library - A comprehensive SSO solution with React components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -1,5 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- declare const meta: Meta;
3
- export default meta;
4
- type Story = StoryObj;
5
- export declare const Default: Story;