caplink-saas-ui-shared-component-library 1.36.0 → 1.36.2
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/features/spreadsheet/lib/format-column-width.d.ts +5 -0
- package/dist/features/spreadsheet/lib/setup-columns.d.ts +5 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/date/show-when-date-is-after.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/date/show-when-date-is-before.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/date/show-when-date-is-equals-to.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/index.d.ts +7 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/numeric/show-when-number-is-between.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/numeric/show-when-number-is-equals-to.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/numeric/show-when-number-is-greater-or-equals.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/numeric/show-when-number-is-greater-than.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/numeric/show-when-number-is-less-or-equals.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/numeric/show-when-number-is-less-than.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/show-when-empty-value.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/show-when-not-empty-value.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/text/show-when-text-contains.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/text/show-when-text-ends-with.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/text/show-when-text-is-equals-to.d.ts +1 -0
- package/dist/features/spreadsheet/lib/show-row-by-condition/text/show-when-text-starts-with.d.ts +1 -0
- package/dist/features/spreadsheet/lib/sort-column.d.ts +11 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/apply-spreadsheet-filters.d.ts +11 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/common/apply-common-filters.d.ts +9 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/common/is-empty.d.ts +7 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/common/is-not-empty.d.ts +7 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/date/apply-date-filters.d.ts +10 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/date/date-is-after.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/date/date-is-before.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/date/date-is-equals-to.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/index.d.ts +38 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/apply-numeric-filters.d.ts +11 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/number-is-between.d.ts +9 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/number-is-equals-to.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/number-is-greater-or-equals.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/number-is-greater-than.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/number-is-less-or-equals.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/number-is-less-than.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/number-is-not-between.d.ts +9 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/number-is-not-equals-to.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/text/apply-text-filters.d.ts +10 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/text/text-contains.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/text/text-ends-with.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/text/text-is-equals-to.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/text/text-not-contains.d.ts +8 -0
- package/dist/features/spreadsheet/lib/spreadsheet-filters/text/text-starts-with.d.ts +8 -0
- package/dist/features/spreadsheet/model/context.d.ts +1 -1
- package/dist/features/spreadsheet/model/spreadsheet.d.ts +23 -13
- package/dist/features/spreadsheet/model/use-spreadsheet.d.ts +1 -0
- package/dist/features/spreadsheet/ui/cell.d.ts +1 -1
- package/dist/features/spreadsheet/ui/column-popover/column-counter-selector.d.ts +7 -0
- package/dist/features/spreadsheet/ui/column-popover/column-order-selector.d.ts +7 -0
- package/dist/features/spreadsheet/ui/column-popover/column-values-selector.d.ts +6 -0
- package/dist/features/spreadsheet/ui/column-popover/condition-selector.d.ts +11 -0
- package/dist/features/spreadsheet/ui/column-popover/index.d.ts +6 -0
- package/dist/features/spreadsheet/ui/spreadsheet.d.ts +1 -1
- package/dist/index.es.js +14221 -13710
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +190 -180
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +9 -9
- package/package.json +9 -9
- package/dist/features/spreadsheet/lib/use-spreadsheet.d.ts +0 -1
- /package/dist/features/spreadsheet/{lib → model}/use-highlight-last-row.d.ts +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Column } from '../model/spreadsheet';
|
|
2
|
+
/** Initial column params before spreadsheet internal setup */
|
|
3
|
+
export type InitialColumn = Pick<Column, Exclude<keyof Column, 'alphabetLetter' | 'position' | 'width'>>;
|
|
4
|
+
/** Spreadsheet columns internal states and values setup function */
|
|
5
|
+
export declare function setupColumns(columns: InitialColumn[]): Column[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenDateIsAfter(value: unknown, dateValue: string): boolean;
|
package/dist/features/spreadsheet/lib/show-row-by-condition/date/show-when-date-is-before.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenDateIsBefore(value: unknown, dateValue: string): boolean;
|
package/dist/features/spreadsheet/lib/show-row-by-condition/date/show-when-date-is-equals-to.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenDateIsEqualsTo(value: unknown, dateValue: string): boolean;
|
package/dist/features/spreadsheet/lib/show-row-by-condition/numeric/show-when-number-is-between.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenNumberIsBetween(value: unknown, numberValueA: string, numberValueB: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenNumberIsEqualsTo(value: unknown, numberValue: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenNumberIsGreaterOrEquals(value: unknown, numberValue: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenNumberIsGreaterThan(value: unknown, numberValue: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenNumberIsLessOrEquals(value: unknown, numberValue: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenNumberIsLessThan(value: unknown, numberValue: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenEmptyValue(value: unknown): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenNotEmptyValue(value: unknown): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenTextContains(value: unknown, textValue: string): boolean;
|
package/dist/features/spreadsheet/lib/show-row-by-condition/text/show-when-text-ends-with.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenTextEndsWith(value: unknown, textValue: string): boolean;
|
package/dist/features/spreadsheet/lib/show-row-by-condition/text/show-when-text-is-equals-to.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenTextIsEqualsTo(value: unknown, textValue: string): boolean;
|
package/dist/features/spreadsheet/lib/show-row-by-condition/text/show-when-text-starts-with.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showWhenTextStartsWith(value: unknown, textValue: string): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Matrix } from '../model/matrix';
|
|
2
|
+
import { DataEditorType } from '../model/spreadsheet';
|
|
3
|
+
import { ColumnOrderEnum } from './spreadsheet-filters';
|
|
4
|
+
type SortMatrixByColumnArgs = {
|
|
5
|
+
columnOrder: ColumnOrderEnum;
|
|
6
|
+
columnIndex: number;
|
|
7
|
+
matrix: Matrix<unknown>;
|
|
8
|
+
dataEditorType: DataEditorType;
|
|
9
|
+
};
|
|
10
|
+
export declare function sortMatrixByColumn({ columnIndex, columnOrder, dataEditorType, matrix, }: SortMatrixByColumnArgs): Matrix<unknown>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CommonFiltersEnum, DateFiltersEnum, NumericFiltersEnum, TextFiltersEnum } from '.';
|
|
2
|
+
import { Matrix } from '../../model/matrix';
|
|
3
|
+
type ApplySpreadsheetFiltersArgs = {
|
|
4
|
+
filterType: CommonFiltersEnum & TextFiltersEnum & NumericFiltersEnum & DateFiltersEnum;
|
|
5
|
+
valueA: string;
|
|
6
|
+
valueB?: string;
|
|
7
|
+
columnIndex: number;
|
|
8
|
+
matrix: Matrix<unknown>;
|
|
9
|
+
};
|
|
10
|
+
export declare function applySpreadsheetFilters({ filterType, valueA, valueB, columnIndex, matrix, }: ApplySpreadsheetFiltersArgs): Matrix<unknown>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CommonFiltersEnum } from '..';
|
|
2
|
+
import { Matrix } from '../../../model/matrix';
|
|
3
|
+
type ApplyCommonFilters = {
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
filterType: CommonFiltersEnum;
|
|
6
|
+
matrix: Matrix<unknown>;
|
|
7
|
+
};
|
|
8
|
+
export declare function applyCommonFilters({ filterType, matrix, columnIndex }: ApplyCommonFilters): Matrix<unknown>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DateFiltersEnum } from '..';
|
|
2
|
+
import { Matrix } from '../../../model/matrix';
|
|
3
|
+
type ApplyDateFiltersArgs = {
|
|
4
|
+
dateValue: string;
|
|
5
|
+
matrix: Matrix<unknown>;
|
|
6
|
+
columnIndex: number;
|
|
7
|
+
filterType: DateFiltersEnum;
|
|
8
|
+
};
|
|
9
|
+
export declare function applyDateFilters({ columnIndex, dateValue, matrix, filterType, }: ApplyDateFiltersArgs): Matrix<unknown>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type DateIsBeforeArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
dateValue: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function dateIsAfter({ columnIndex, matrix, dateValue }: DateIsBeforeArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type DateIsBeforeArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
dateValue: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function dateIsBefore({ columnIndex, matrix, dateValue }: DateIsBeforeArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type DateIsEqualsToArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
dateValue: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function dateIsEqualsTo({ columnIndex, matrix, dateValue }: DateIsEqualsToArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare enum CommonFiltersEnum {
|
|
2
|
+
None = "None",
|
|
3
|
+
IsEmptyValue = "IsEmptyValue",
|
|
4
|
+
IsNotEmptyValue = "IsNotEmptyValue"
|
|
5
|
+
}
|
|
6
|
+
export declare enum TextFiltersEnum {
|
|
7
|
+
TextIsEqualsTo = "TextIsEqualsTo",
|
|
8
|
+
TextContains = "TextContains",
|
|
9
|
+
TextNotContains = "TextNotContains",
|
|
10
|
+
TextEndsWith = "TextEndsWith",
|
|
11
|
+
TextStartsWith = "TextStartsWith"
|
|
12
|
+
}
|
|
13
|
+
export declare enum NumericFiltersEnum {
|
|
14
|
+
NumericIsEqualsTo = "NumericIsEqualsTo",
|
|
15
|
+
NumericIsBetween = "NumericIsBetween",
|
|
16
|
+
NumericIsNotBetween = "NumericIsNotBetween",
|
|
17
|
+
NumericIsNotEqualsTo = "NumericIsNotEqualsTo",
|
|
18
|
+
NumericIsGreaterThan = "NumericIsGreaterThan",
|
|
19
|
+
NumericIsGreaterOrEquals = "NumericIsGreaterOrEquals",
|
|
20
|
+
NumericIsLessThan = "NumericIsLessThan",
|
|
21
|
+
NumericIsLessOrEquals = "NumericIsLessOrEquals"
|
|
22
|
+
}
|
|
23
|
+
export declare enum DateFiltersEnum {
|
|
24
|
+
DateIsEqualsTo = "DateIsEqualsTo",
|
|
25
|
+
DateIsAfter = "DateIsAfter",
|
|
26
|
+
DateIsBefore = "DateIsBefore"
|
|
27
|
+
}
|
|
28
|
+
export declare enum ColumnOrderEnum {
|
|
29
|
+
None = "None",
|
|
30
|
+
'A-Z' = "A-Z",
|
|
31
|
+
'Z-A' = "Z-A"
|
|
32
|
+
}
|
|
33
|
+
export declare enum ColumnCounterEnum {
|
|
34
|
+
None = "None",
|
|
35
|
+
Average = "Average",
|
|
36
|
+
Sum = "Sum",
|
|
37
|
+
Length = "Length"
|
|
38
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NumericFiltersEnum } from '..';
|
|
2
|
+
import { Matrix } from '../../../model/matrix';
|
|
3
|
+
type ApplyDateFiltersArgs = {
|
|
4
|
+
numberValueA: string;
|
|
5
|
+
numberValueB?: string;
|
|
6
|
+
matrix: Matrix<unknown>;
|
|
7
|
+
columnIndex: number;
|
|
8
|
+
filterType: NumericFiltersEnum;
|
|
9
|
+
};
|
|
10
|
+
export declare function applyNumericFilters({ columnIndex, numberValueA, numberValueB, matrix, filterType, }: ApplyDateFiltersArgs): Matrix<unknown>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type NumberIsBetweenArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
numberA: number;
|
|
6
|
+
numberB: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function numberIsBetween({ columnIndex, matrix, numberA, numberB }: NumberIsBetweenArgs): unknown[][];
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type NumberIsEqualsToArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
numberValue: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function numberIsEqualsTo({ columnIndex, matrix, numberValue }: NumberIsEqualsToArgs): unknown[][];
|
|
8
|
+
export {};
|
package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/number-is-greater-or-equals.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type NumberIsGreaterOrEqualsArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
numberValue: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function numberIsGreaterOrEquals({ columnIndex, matrix, numberValue, }: NumberIsGreaterOrEqualsArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type NumberIsGreaterThanArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
numberValue: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function numberIsGreaterThan({ columnIndex, matrix, numberValue }: NumberIsGreaterThanArgs): unknown[][];
|
|
8
|
+
export {};
|
package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/number-is-less-or-equals.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type NumberIsLessOrEqualsArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
numberValue: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function numberIsLessOrEquals({ columnIndex, matrix, numberValue, }: NumberIsLessOrEqualsArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type NumberIsLessThanArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
numberValue: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function numberIsLessThan({ columnIndex, matrix, numberValue }: NumberIsLessThanArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type NumberIsNotBetweenArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
numberA: number;
|
|
6
|
+
numberB: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function numberIsNotBetween({ columnIndex, matrix, numberA, numberB, }: NumberIsNotBetweenArgs): unknown[][];
|
|
9
|
+
export {};
|
package/dist/features/spreadsheet/lib/spreadsheet-filters/numeric/number-is-not-equals-to.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type NumberNotIsEqualsToArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
numberValue: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function numberIsNotEqualsTo({ columnIndex, matrix, numberValue }: NumberNotIsEqualsToArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TextFiltersEnum } from '..';
|
|
2
|
+
import { Matrix } from '../../../model/matrix';
|
|
3
|
+
type ApplyDateFiltersArgs = {
|
|
4
|
+
textValue: string;
|
|
5
|
+
matrix: Matrix<unknown>;
|
|
6
|
+
columnIndex: number;
|
|
7
|
+
filterType: TextFiltersEnum;
|
|
8
|
+
};
|
|
9
|
+
export declare function applyTextFilters({ columnIndex, textValue, matrix, filterType, }: ApplyDateFiltersArgs): Matrix<unknown>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type TextContainsArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
textValue: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function textContains({ columnIndex, matrix, textValue }: TextContainsArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type TextEndsWithArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
textValue: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function textEndsWith({ columnIndex, matrix, textValue }: TextEndsWithArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type TextContainsArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
textValue: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function textIsEqualsTo({ columnIndex, matrix, textValue }: TextContainsArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type TextNotContainsArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
textValue: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function textNotContains({ columnIndex, matrix, textValue }: TextNotContainsArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Matrix } from '../../../model/matrix';
|
|
2
|
+
type TextStartsWithArgs = {
|
|
3
|
+
matrix: Matrix<unknown>;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
textValue: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function textStartsWith({ columnIndex, matrix, textValue }: TextStartsWithArgs): unknown[][];
|
|
8
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import * as Spreadsheet from './spreadsheet';
|
|
2
|
+
import type * as Spreadsheet from './spreadsheet';
|
|
3
3
|
export declare const SpreadsheetContext: import('react').Context<Spreadsheet.Context | null>;
|
|
4
4
|
export declare function SpreadsheetContextProvider({ children, startingColumns, matrix: startingMatrix, staticRows, onMatrixChange, onExportData, }: Spreadsheet.ContextProvider): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ClipboardEvent, MouseEvent, PropsWithChildren } from 'react';
|
|
1
|
+
import { ClipboardEvent, Dispatch, MouseEvent, PropsWithChildren, SetStateAction } from 'react';
|
|
2
2
|
import { SpreadsheetProps } from '../ui/spreadsheet';
|
|
3
|
+
import { ColumnCounterEnum, CommonFiltersEnum, DateFiltersEnum, NumericFiltersEnum, TextFiltersEnum } from '../lib/spreadsheet-filters';
|
|
3
4
|
import type * as Matrix from './matrix';
|
|
4
5
|
export declare const COLUMN_STRING_LIMIT = 1200;
|
|
5
6
|
export declare const COLUMN_TITLE_CONTAINER_PADDING_X = 16;
|
|
@@ -65,11 +66,14 @@ export type DataViewer = {
|
|
|
65
66
|
selected?: boolean;
|
|
66
67
|
testid?: string;
|
|
67
68
|
};
|
|
68
|
-
export
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
export type ColumnFilterValue = {
|
|
70
|
+
valueA: string;
|
|
71
|
+
valueB: string;
|
|
72
|
+
};
|
|
73
|
+
export type ColumnFilter = {
|
|
74
|
+
type: CommonFiltersEnum | TextFiltersEnum | NumericFiltersEnum | DateFiltersEnum;
|
|
75
|
+
value: ColumnFilterValue;
|
|
76
|
+
};
|
|
73
77
|
export type ColumnState = {
|
|
74
78
|
/** Whether column is readonly to user */
|
|
75
79
|
readonly?: boolean;
|
|
@@ -77,7 +81,6 @@ export type ColumnState = {
|
|
|
77
81
|
visible?: boolean;
|
|
78
82
|
/** Column width in px */
|
|
79
83
|
width: number;
|
|
80
|
-
footerColumnType: FooterColumnTypeEnum | undefined;
|
|
81
84
|
};
|
|
82
85
|
export type ColumnSettings = {
|
|
83
86
|
select?: {
|
|
@@ -106,18 +109,18 @@ export type Column = {
|
|
|
106
109
|
/** Column tooltip description */
|
|
107
110
|
description?: string;
|
|
108
111
|
/** Column position */
|
|
109
|
-
|
|
112
|
+
index: number;
|
|
110
113
|
/** Column data editor type */
|
|
111
114
|
dataEditorType: DataEditorType;
|
|
112
115
|
/** Alphabet letter by position */
|
|
113
116
|
alphabetLetter?: string;
|
|
114
|
-
/** Column element states
|
|
117
|
+
/** Column element states */
|
|
115
118
|
state: ColumnState;
|
|
116
119
|
/** Column settings */
|
|
117
120
|
settings?: ColumnSettings;
|
|
121
|
+
counter: ColumnCounterEnum;
|
|
122
|
+
filter: ColumnFilter;
|
|
118
123
|
};
|
|
119
|
-
/** Initial column params before spreadsheet internal setup */
|
|
120
|
-
export type InitialColumn = Pick<Column, Exclude<keyof Column, 'alphabetLetter' | 'position' | 'width'>>;
|
|
121
124
|
/** Spreadsheet Cell component */
|
|
122
125
|
export type Cell = {
|
|
123
126
|
/** The cell value */
|
|
@@ -127,11 +130,18 @@ export type Cell = {
|
|
|
127
130
|
width: number;
|
|
128
131
|
className?: string;
|
|
129
132
|
};
|
|
133
|
+
export type TemporaryValue = {
|
|
134
|
+
point: Matrix.Point;
|
|
135
|
+
value: unknown;
|
|
136
|
+
};
|
|
130
137
|
export type Context = {
|
|
131
138
|
size: Matrix.Size;
|
|
139
|
+
setMatrix: Dispatch<SetStateAction<Matrix.Matrix<unknown>>>;
|
|
132
140
|
matrix: Matrix.Matrix<unknown>;
|
|
141
|
+
temporaryValues: TemporaryValue[];
|
|
133
142
|
columns: Column[];
|
|
134
143
|
emptySize: boolean;
|
|
144
|
+
isColumnsFiltersActive?: boolean;
|
|
135
145
|
/** Defines if user can add or delete rows */
|
|
136
146
|
staticRows?: boolean;
|
|
137
147
|
hasSomeEntireRow?: boolean;
|
|
@@ -147,6 +157,7 @@ export type Context = {
|
|
|
147
157
|
onRemoveRow: () => void;
|
|
148
158
|
onSelectRow: (row: number, event?: MouseEvent) => void;
|
|
149
159
|
onSelectColumn: (column: number, event?: MouseEvent) => void;
|
|
160
|
+
onChangeTemporaryValue: (point: Matrix.Point, value: unknown) => void;
|
|
150
161
|
onSelectCell: (point: Matrix.Point) => void;
|
|
151
162
|
isCellSelected: (point: Matrix.Point) => boolean;
|
|
152
163
|
onInsertNewRow: () => void;
|
|
@@ -159,6 +170,7 @@ export type Context = {
|
|
|
159
170
|
columnId: string;
|
|
160
171
|
visible?: boolean;
|
|
161
172
|
}) => void;
|
|
173
|
+
onChangeColumn(columnIndex: number, column: Partial<Column>): void;
|
|
162
174
|
onChangeColumnState({ state, columnIndex }: {
|
|
163
175
|
state: ColumnState;
|
|
164
176
|
columnIndex: number;
|
|
@@ -167,5 +179,3 @@ export type Context = {
|
|
|
167
179
|
onExportData?: () => void;
|
|
168
180
|
};
|
|
169
181
|
export type ContextProvider = Omit<PropsWithChildren<SpreadsheetProps>, 'className'>;
|
|
170
|
-
/** Spreadsheet columns internal states and values setup function */
|
|
171
|
-
export declare function setupColumns(columns: InitialColumn[]): Column[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useSpreadsheet(): import('./spreadsheet').Context;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as Spreadsheet from '../model/spreadsheet';
|
|
2
|
-
export declare function Cell(
|
|
2
|
+
export declare function Cell({ value, width, coordinates, className }: Spreadsheet.Cell): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ColumnCounterEnum } from '../../lib/spreadsheet-filters';
|
|
2
|
+
type ColumnCounterSelectorProps = {
|
|
3
|
+
setColumnCounter(columnOrder: ColumnCounterEnum): void;
|
|
4
|
+
columnCounter: ColumnCounterEnum;
|
|
5
|
+
};
|
|
6
|
+
export declare function ColumnCounterSelector({ columnCounter, setColumnCounter, }: ColumnCounterSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ColumnOrderEnum } from '../../lib/spreadsheet-filters';
|
|
2
|
+
type ColumnOrderSelectorProps = {
|
|
3
|
+
setColumnOrder(columnOrder: ColumnOrderEnum): void;
|
|
4
|
+
columnOrder: ColumnOrderEnum;
|
|
5
|
+
};
|
|
6
|
+
export declare function ColumnOrderSelector({ columnOrder, setColumnOrder }: ColumnOrderSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Column, ColumnFilterValue } from '../../model/spreadsheet';
|
|
2
|
+
import { CommonFiltersEnum, DateFiltersEnum, NumericFiltersEnum, TextFiltersEnum } from '../../lib/spreadsheet-filters';
|
|
3
|
+
type ConditionSelectorProps = {
|
|
4
|
+
filterValue: ColumnFilterValue;
|
|
5
|
+
setFilterValue(filterValue: ColumnFilterValue): void;
|
|
6
|
+
filterType: CommonFiltersEnum | TextFiltersEnum | NumericFiltersEnum | DateFiltersEnum;
|
|
7
|
+
setFilterType(filterType: CommonFiltersEnum | TextFiltersEnum | NumericFiltersEnum | DateFiltersEnum): void;
|
|
8
|
+
column: Column;
|
|
9
|
+
};
|
|
10
|
+
export declare function ConditionSelector({ column, filterValue, setFilterValue, filterType, setFilterType, }: ConditionSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|