@lavalogic/scoria 0.0.4 → 0.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.
- package/dist/Components/Table/Body/Rows/Columns/ActionsCell.svelte +2 -2
- package/dist/Components/Table/Body/Rows/Columns/BubbleCell.svelte +2 -2
- package/dist/Components/Table/Body/Rows/Columns/ProgressCell.svelte +2 -2
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte +2 -2
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte +2 -2
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte +2 -2
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte +2 -2
- package/dist/Components/Table/Types/Columns/ColumnType.d.ts +10 -9
- package/dist/Components/Table/Types/Columns/ColumnType.js +10 -10
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorType.d.ts +9 -8
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorType.js +9 -9
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/CheckboxDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/DateInputDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/NumberInputDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/QueryDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/SelectDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/TextInputDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Actions/ActionsDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Display/BubbleDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Display/ProgressBarDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Display/ValidityDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/Definitions/Expand/ExpandDef.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/Columns/DisplayType.d.ts +8 -7
- package/dist/Components/Table/Types/Columns/DisplayType.js +8 -8
- package/dist/Components/Table/Types/DataRepository/ILocalDataRepository.d.ts +1 -2
- package/dist/Components/Table/Types/DataRepository/IRemoteDataRepository.d.ts +1 -2
- package/dist/Components/Table/Types/DataRepository/LocalTableDataRepository.svelte.d.ts +2 -4
- package/dist/Components/Table/Types/DataRepository/RemoteTableDataRepository.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/DataRepository/TableDataRepository.svelte.d.ts +1 -2
- package/dist/Components/Table/Types/ExpandedPanel.d.ts +7 -6
- package/dist/Components/Table/Types/ExpandedPanel.js +7 -7
- package/dist/Components/Table/Types/Filtering/CustomFilterType.d.ts +7 -6
- package/dist/Components/Table/Types/Filtering/CustomFilterType.js +7 -7
- package/dist/Components/Table/Types/Filtering/FilterType.d.ts +5 -4
- package/dist/Components/Table/Types/Filtering/FilterType.js +5 -5
- package/dist/Components/Table/Types/Focus/MultiFocusEdge.d.ts +11 -10
- package/dist/Components/Table/Types/Focus/MultiFocusEdge.js +11 -11
- package/dist/Components/Table/Types/Pagination/PaginationType.d.ts +6 -5
- package/dist/Components/Table/Types/Pagination/PaginationType.js +6 -6
- package/dist/Components/Table/Types/Toolbar/ToolbarPosition.d.ts +7 -6
- package/dist/Components/Table/Types/Toolbar/ToolbarPosition.js +7 -7
- package/dist/Delay/Delay.d.ts +4 -3
- package/dist/Delay/Delay.js +4 -4
- package/dist/Types/Examples/ExampleSelectEnum.d.ts +7 -6
- package/dist/Types/Examples/ExampleSelectEnum.js +7 -7
- package/dist/Types/Internal/ApplicationIdentifier.d.ts +11 -9
- package/dist/Types/Internal/ApplicationIdentifier.js +11 -11
- package/dist/Types/Internal/AttributeOperation.d.ts +31 -30
- package/dist/Types/Internal/AttributeOperation.js +31 -31
- package/dist/Types/Internal/DatePickerType.d.ts +9 -8
- package/dist/Types/Internal/DatePickerType.js +9 -9
- package/dist/Types/Internal/InputVariant.d.ts +7 -6
- package/dist/Types/Internal/InputVariant.js +7 -7
- package/dist/Types/Internal/Shape.d.ts +5 -4
- package/dist/Types/Internal/Shape.js +5 -5
- package/dist/Types/Internal/Side.d.ts +7 -6
- package/dist/Types/Internal/Side.js +7 -7
- package/dist/Types/Internal/Size.d.ts +14 -13
- package/dist/Types/Internal/Size.js +14 -14
- package/dist/Types/Internal/Ternary.d.ts +6 -5
- package/dist/Types/Internal/Ternary.js +6 -6
- package/dist/Types/Internal/Validity.d.ts +8 -7
- package/dist/Types/Internal/Validity.js +8 -8
- package/dist/Types/Internal/Variant.d.ts +11 -10
- package/dist/Types/Internal/Variant.js +11 -11
- package/dist/index.d.ts +20 -19
- package/dist/index.js +20 -19
- package/dist/scss/colours.d.ts +96 -94
- package/dist/scss/colours.js +138 -138
- package/package.json +1 -1
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
let previousValidity = $state(Validity.Valid);
|
|
79
|
-
let validity = $state(Validity.Valid);
|
|
78
|
+
let previousValidity: Validity = $state(Validity.Valid);
|
|
79
|
+
let validity: Validity = $state(Validity.Valid);
|
|
80
80
|
$effect(() => {
|
|
81
81
|
focusDetails.validityTuple.then(([newValidity]) => {
|
|
82
82
|
untrack(() => {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
new TableFocusDetails(cell, tableContext, toastContext.toast)
|
|
29
29
|
);
|
|
30
30
|
|
|
31
|
-
let previousValidity = $state(Validity.Valid);
|
|
32
|
-
let validity = $state(Validity.Valid);
|
|
31
|
+
let previousValidity: Validity = $state(Validity.Valid);
|
|
32
|
+
let validity: Validity = $state(Validity.Valid);
|
|
33
33
|
$effect(() => {
|
|
34
34
|
focusDetails.validityTuple.then(([newValidity]) => {
|
|
35
35
|
untrack(() => {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
new TableFocusDetails(cell, tableContext, toast)
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
-
let previousValidity = $state(Validity.Valid);
|
|
33
|
-
let validity = $state(Validity.Valid);
|
|
32
|
+
let previousValidity: Validity = $state(Validity.Valid);
|
|
33
|
+
let validity: Validity = $state(Validity.Valid);
|
|
34
34
|
$effect(() => {
|
|
35
35
|
focusDetails.validityTuple.then(([newValidity]) => {
|
|
36
36
|
untrack(() => {
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
-
let previousValidity = $state(Validity.Valid);
|
|
110
|
-
let validity = $state(Validity.Valid);
|
|
109
|
+
let previousValidity: Validity = $state(Validity.Valid);
|
|
110
|
+
let validity: Validity = $state(Validity.Valid);
|
|
111
111
|
$effect(() => {
|
|
112
112
|
focusDetails.validityTuple.then(([newValidity]) => {
|
|
113
113
|
untrack(() => {
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
-
let previousValidity = $state(Validity.Valid);
|
|
81
|
-
let validity = $state(Validity.Valid);
|
|
80
|
+
let previousValidity: Validity = $state(Validity.Valid);
|
|
81
|
+
let validity: Validity = $state(Validity.Valid);
|
|
82
82
|
$effect(() => {
|
|
83
83
|
focusDetails.validityTuple.then(([newValidity]) => {
|
|
84
84
|
untrack(() => {
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
return null;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
let previousValidity = $state(Validity.Valid);
|
|
114
|
-
let validity = $state(Validity.Valid);
|
|
113
|
+
let previousValidity: Validity = $state(Validity.Valid);
|
|
114
|
+
let validity: Validity = $state(Validity.Valid);
|
|
115
115
|
$effect(() => {
|
|
116
116
|
focusDetails.validityTuple.then(([newValidity]) => {
|
|
117
117
|
untrack(() => {
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
-
let previousValidity = $state(Validity.Valid);
|
|
102
|
-
let validity = $state(Validity.Valid);
|
|
101
|
+
let previousValidity: Validity = $state(Validity.Valid);
|
|
102
|
+
let validity: Validity = $state(Validity.Valid);
|
|
103
103
|
$effect(() => {
|
|
104
104
|
focusDetails.validityTuple.then(([newValidity]) => {
|
|
105
105
|
untrack(() => {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
Accessor
|
|
3
|
-
Display
|
|
4
|
-
Custom
|
|
5
|
-
Expand
|
|
6
|
-
RowSelect
|
|
7
|
-
Actions
|
|
8
|
-
FilterOnly
|
|
9
|
-
}
|
|
1
|
+
export declare const ColumnType: {
|
|
2
|
+
readonly Accessor: "Accessor";
|
|
3
|
+
readonly Display: "Display";
|
|
4
|
+
readonly Custom: "Custom";
|
|
5
|
+
readonly Expand: "Expand";
|
|
6
|
+
readonly RowSelect: "RowSelect";
|
|
7
|
+
readonly Actions: "Actions";
|
|
8
|
+
readonly FilterOnly: "Filter Only";
|
|
9
|
+
};
|
|
10
|
+
export type ColumnType = (typeof ColumnType)[keyof typeof ColumnType];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export const ColumnType = {
|
|
2
|
+
Accessor: 'Accessor',
|
|
3
|
+
Display: 'Display',
|
|
4
|
+
Custom: 'Custom',
|
|
5
|
+
Expand: 'Expand',
|
|
6
|
+
RowSelect: 'RowSelect',
|
|
7
|
+
Actions: 'Actions',
|
|
8
|
+
FilterOnly: 'Filter Only'
|
|
9
|
+
};
|
|
10
|
+
Object.freeze(ColumnType);
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ColumnType } from '../../ColumnType.js';
|
|
2
1
|
import { ColumnDef, type ColumnDefProps } from '../ColumnDef.svelte.js';
|
|
3
2
|
import type { AccessorType } from './AccessorType.js';
|
|
4
3
|
export interface AccessorDefProps<T extends object> extends ColumnDefProps<T> {
|
|
5
4
|
readonly id: string & keyof T;
|
|
6
5
|
}
|
|
7
6
|
export declare abstract class AccessorDef<T extends object, FilterValueType> extends ColumnDef<T, FilterValueType> {
|
|
8
|
-
readonly columnType
|
|
7
|
+
readonly columnType: "Accessor";
|
|
9
8
|
abstract readonly accessorType: AccessorType;
|
|
10
9
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
Text
|
|
3
|
-
Number
|
|
4
|
-
Date
|
|
5
|
-
Select
|
|
6
|
-
Query
|
|
7
|
-
Checkbox
|
|
8
|
-
}
|
|
1
|
+
export declare const AccessorType: {
|
|
2
|
+
readonly Text: "Text";
|
|
3
|
+
readonly Number: "Number";
|
|
4
|
+
readonly Date: "Date";
|
|
5
|
+
readonly Select: "Select";
|
|
6
|
+
readonly Query: "Query";
|
|
7
|
+
readonly Checkbox: "Checkbox";
|
|
8
|
+
};
|
|
9
|
+
export type AccessorType = (typeof AccessorType)[keyof typeof AccessorType];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export const AccessorType = {
|
|
2
|
+
Text: 'Text',
|
|
3
|
+
Number: 'Number',
|
|
4
|
+
Date: 'Date',
|
|
5
|
+
Select: 'Select',
|
|
6
|
+
Query: 'Query',
|
|
7
|
+
Checkbox: 'Checkbox'
|
|
8
|
+
};
|
|
9
|
+
Object.freeze(AccessorType);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { BoolFilterValueType } from '../../../Filtering/FilterFn.js';
|
|
2
2
|
import { AccessorDef, type AccessorDefProps } from './AccessorDef.svelte.js';
|
|
3
|
-
import { AccessorType } from './AccessorType.js';
|
|
4
3
|
export interface CheckboxDefProps<T extends object> extends AccessorDefProps<T> {
|
|
5
4
|
}
|
|
6
5
|
export declare class CheckboxDef<T extends object> extends AccessorDef<T, BoolFilterValueType> {
|
|
7
|
-
readonly accessorType
|
|
6
|
+
readonly accessorType: "Checkbox";
|
|
8
7
|
constructor(props: CheckboxDefProps<T>);
|
|
9
8
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { DateFilterValueType } from '../../../Filtering/FilterFn.js';
|
|
2
2
|
import { AccessorDef, type AccessorDefProps } from './AccessorDef.svelte.js';
|
|
3
|
-
import { AccessorType } from './AccessorType.js';
|
|
4
3
|
export interface DateInputDefProps<T extends object> extends AccessorDefProps<T> {
|
|
5
4
|
showTime?: boolean;
|
|
6
5
|
}
|
|
7
6
|
export declare class DateInputDef<T extends object> extends AccessorDef<T, DateFilterValueType> {
|
|
8
|
-
readonly accessorType
|
|
7
|
+
readonly accessorType: "Date";
|
|
9
8
|
constructor(props: DateInputDefProps<T>);
|
|
10
9
|
readonly showTime: boolean;
|
|
11
10
|
}
|
package/dist/Components/Table/Types/Columns/Definitions/Accessors/NumberInputDef.svelte.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { AccessorDef } from './AccessorDef.svelte.js';
|
|
2
2
|
import { type ColumnDefProps } from '../ColumnDef.svelte.js';
|
|
3
|
-
import { AccessorType } from './AccessorType.js';
|
|
4
3
|
import type { NumberFilterValueType } from '../../../Filtering/FilterFn.js';
|
|
5
4
|
export interface NumberInputDefProps<T extends object> extends ColumnDefProps<T> {
|
|
6
5
|
min: number;
|
|
7
6
|
max: number;
|
|
8
7
|
}
|
|
9
8
|
export declare class NumberInputDef<T extends object> extends AccessorDef<T, NumberFilterValueType> {
|
|
10
|
-
readonly accessorType
|
|
9
|
+
readonly accessorType: "Number";
|
|
11
10
|
constructor(props: NumberInputDefProps<T>);
|
|
12
11
|
readonly min: number;
|
|
13
12
|
readonly max: number;
|
|
@@ -2,13 +2,12 @@ import type { SelectOption } from '../../../../../../Types/Internal/SelectOption
|
|
|
2
2
|
import type { StringFilterValueType } from '../../../Filtering/FilterFn.js';
|
|
3
3
|
import type { ColumnDefProps } from '../ColumnDef.svelte.js';
|
|
4
4
|
import { AccessorDef } from './AccessorDef.svelte.js';
|
|
5
|
-
import { AccessorType } from './AccessorType.js';
|
|
6
5
|
export interface QueryDefProps<T extends object> extends ColumnDefProps<T> {
|
|
7
6
|
valueAsObject: boolean;
|
|
8
7
|
query: (queryString: string, item: T, index: number) => Promise<Array<SelectOption<unknown>>>;
|
|
9
8
|
}
|
|
10
9
|
export declare class QueryDef<T extends object> extends AccessorDef<T, StringFilterValueType> {
|
|
11
|
-
readonly accessorType
|
|
10
|
+
readonly accessorType: "Query";
|
|
12
11
|
constructor(props: QueryDefProps<T>);
|
|
13
12
|
readonly valueAsObject: boolean;
|
|
14
13
|
readonly query: (queryString: string, item: T, index: number) => Promise<Array<SelectOption<unknown>>>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { SelectOption } from '../../../../../../Types/Internal/SelectOption.js';
|
|
2
2
|
import type { ColumnDefProps } from '../ColumnDef.svelte.js';
|
|
3
3
|
import { AccessorDef } from './AccessorDef.svelte.js';
|
|
4
|
-
import { AccessorType } from './AccessorType.js';
|
|
5
4
|
export interface SelectDefProps<T extends object> extends ColumnDefProps<T> {
|
|
6
5
|
getOptions: (item?: T, index?: number) => Array<SelectOption<string | number>> | Promise<Array<SelectOption<string | number>>>;
|
|
7
6
|
getAllOptions?: () => Promise<Array<SelectOption<string | number>>>;
|
|
@@ -10,7 +9,7 @@ export interface SelectDefProps<T extends object> extends ColumnDefProps<T> {
|
|
|
10
9
|
}
|
|
11
10
|
export declare class SelectDef<T extends object> extends AccessorDef<T, T> {
|
|
12
11
|
constructor(props: SelectDefProps<T>);
|
|
13
|
-
readonly accessorType
|
|
12
|
+
readonly accessorType: "Select";
|
|
14
13
|
readonly sortingFn?: (a: T, b: T) => 1 | -1 | 0;
|
|
15
14
|
readonly optional: boolean;
|
|
16
15
|
readonly getOptions: (item?: T, index?: number) => Array<SelectOption<string | number>> | Promise<Array<SelectOption<string | number>>>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { StringFilterValueType } from '../../../Filtering/FilterFn.js';
|
|
2
2
|
import { AccessorDef, type AccessorDefProps } from './AccessorDef.svelte.js';
|
|
3
|
-
import { AccessorType } from './AccessorType.js';
|
|
4
3
|
export interface TextInputDefProps<T extends object> extends AccessorDefProps<T> {
|
|
5
4
|
}
|
|
6
5
|
export declare class TextInputDef<T extends object> extends AccessorDef<T, StringFilterValueType> {
|
|
7
|
-
readonly accessorType
|
|
6
|
+
readonly accessorType: "Text";
|
|
8
7
|
constructor(props: TextInputDefProps<T>);
|
|
9
8
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ColourSet } from '../../../../../../scss/colours.js';
|
|
2
|
-
import { ColumnType } from '../../ColumnType.js';
|
|
3
2
|
import type { TableActionButton } from '../../TableActionButton.js';
|
|
4
3
|
import { ColumnDef } from '../ColumnDef.svelte.js';
|
|
5
4
|
export interface ActionsDefProps<T extends object> {
|
|
@@ -9,7 +8,7 @@ export interface ActionsDefProps<T extends object> {
|
|
|
9
8
|
}
|
|
10
9
|
export declare class ActionsDef<T extends object> extends ColumnDef<T> {
|
|
11
10
|
constructor(props: ActionsDefProps<T>);
|
|
12
|
-
readonly columnType
|
|
11
|
+
readonly columnType: "Actions";
|
|
13
12
|
readonly actions: TableActionButton<T>[];
|
|
14
13
|
readonly isEnabled?: (item: T, index: number, button: TableActionButton<T>) => boolean | Promise<boolean>;
|
|
15
14
|
readonly getColourSet?: (item: T, index: number, button: TableActionButton<T>) => ColourSet;
|
package/dist/Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Component } from 'svelte';
|
|
2
2
|
import { ColumnDef, type ColumnDefProps } from '../ColumnDef.svelte.js';
|
|
3
3
|
import type { DisplayType } from '../../DisplayType.js';
|
|
4
|
-
import { ColumnType } from '../../ColumnType.js';
|
|
5
4
|
import type { TableCell } from '../../TableCell.js';
|
|
6
5
|
export interface DisplayDefModalProps<T extends object> {
|
|
7
6
|
cell: TableCell<T>;
|
|
@@ -14,6 +13,6 @@ export interface AbstractDisplayDefProps<T extends object> extends ColumnDefProp
|
|
|
14
13
|
export declare abstract class AbstractDisplayDef<T extends object> extends ColumnDef<T> {
|
|
15
14
|
abstract readonly displayType: DisplayType;
|
|
16
15
|
constructor(props: AbstractDisplayDefProps<T>);
|
|
17
|
-
readonly columnType
|
|
16
|
+
readonly columnType: "Display";
|
|
18
17
|
readonly modal: Component<DisplayDefModalProps<T>, any, any> | undefined;
|
|
19
18
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { BubbleColour } from '../../../../../Bubble.svelte';
|
|
2
2
|
import { AbstractDisplayDef, type AbstractDisplayDefProps } from './AbstractDisplayDef.svelte.js';
|
|
3
|
-
import { DisplayType } from '../../DisplayType.js';
|
|
4
3
|
export interface BubbleDefProps<T extends object> extends AbstractDisplayDefProps<T> {
|
|
5
4
|
getColour?: (item: T, index: number, value: string) => BubbleColour | Promise<BubbleColour | null | undefined>;
|
|
6
5
|
}
|
|
7
6
|
export declare class BubbleDef<T extends object> extends AbstractDisplayDef<T> {
|
|
8
|
-
readonly displayType
|
|
7
|
+
readonly displayType: "Bubbles";
|
|
9
8
|
constructor(props: BubbleDefProps<T>);
|
|
10
9
|
getColour: ((item: T, index: number, value: string) => BubbleColour | Promise<BubbleColour | null | undefined>) | undefined;
|
|
11
10
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { BubbleColour } from '../../../../../Bubble.svelte';
|
|
2
2
|
import { AbstractDisplayDef, type AbstractDisplayDefProps } from './AbstractDisplayDef.svelte.js';
|
|
3
|
-
import { DisplayType } from '../../DisplayType.js';
|
|
4
3
|
export interface ProgressBarDefProps<T extends object> extends AbstractDisplayDefProps<T> {
|
|
5
4
|
getColour: (item: T, index: number, value: [number, number]) => BubbleColour | Promise<BubbleColour> | undefined;
|
|
6
5
|
}
|
|
7
6
|
export declare class ProgressBarDef<T extends object> extends AbstractDisplayDef<T> {
|
|
8
|
-
readonly displayType
|
|
7
|
+
readonly displayType: "Progress";
|
|
9
8
|
constructor(props: ProgressBarDefProps<T>);
|
|
10
9
|
readonly getColour: (item: T, index: number, value: [number, number]) => BubbleColour | Promise<BubbleColour> | undefined;
|
|
11
10
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { AbstractDisplayDef, type AbstractDisplayDefProps } from './AbstractDisplayDef.svelte.js';
|
|
2
|
-
import { DisplayType } from '../../DisplayType.js';
|
|
3
2
|
import type { ValidationFn } from '../ValidationFn.js';
|
|
4
3
|
export interface ValidityDefProps<T extends object> extends AbstractDisplayDefProps<T> {
|
|
5
4
|
isValid: ValidationFn<T>;
|
|
6
5
|
}
|
|
7
6
|
export declare class ValidityDef<T extends object> extends AbstractDisplayDef<T> {
|
|
8
|
-
readonly displayType
|
|
7
|
+
readonly displayType: "Validity";
|
|
9
8
|
constructor(props: ValidityDefProps<T>);
|
|
10
9
|
readonly isValid: ValidationFn<T>;
|
|
11
10
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { IconProps } from '../../../../../Icon.svelte';
|
|
2
2
|
import type { TableInitOptions } from '../../../Context/TableInitOptions.js';
|
|
3
|
-
import { ColumnType } from '../../ColumnType.js';
|
|
4
3
|
import type { DefsWrapper } from '../../DefsWrapper.js';
|
|
5
4
|
import { ColumnDef, type ColumnDefProps } from '../ColumnDef.svelte.js';
|
|
6
5
|
export interface ExpandDefProps<T extends object, R extends object> extends ColumnDefProps<T> {
|
|
@@ -11,7 +10,7 @@ export interface ExpandDefProps<T extends object, R extends object> extends Colu
|
|
|
11
10
|
innerTableOptions: TableInitOptions<R>;
|
|
12
11
|
}
|
|
13
12
|
export declare class ExpandDef<T extends object, R extends object = object> extends ColumnDef<T> {
|
|
14
|
-
readonly columnType
|
|
13
|
+
readonly columnType: "Expand";
|
|
15
14
|
constructor(props: ExpandDefProps<T, R>);
|
|
16
15
|
readonly innerTableName: string;
|
|
17
16
|
readonly getInnerColumnDefs: (item: T, index: number) => DefsWrapper<R>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
Normal
|
|
3
|
-
Bubbles
|
|
4
|
-
Progress
|
|
5
|
-
Icon
|
|
6
|
-
Validity
|
|
7
|
-
}
|
|
1
|
+
export declare const DisplayType: {
|
|
2
|
+
readonly Normal: "Normal";
|
|
3
|
+
readonly Bubbles: "Bubbles";
|
|
4
|
+
readonly Progress: "Progress";
|
|
5
|
+
readonly Icon: "Icon";
|
|
6
|
+
readonly Validity: "Validity";
|
|
7
|
+
};
|
|
8
|
+
export type DisplayType = (typeof DisplayType)[keyof typeof DisplayType];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export const DisplayType = {
|
|
2
|
+
Normal: 'Normal',
|
|
3
|
+
Bubbles: 'Bubbles',
|
|
4
|
+
Progress: 'Progress',
|
|
5
|
+
Icon: 'Icon',
|
|
6
|
+
Validity: 'Validity'
|
|
7
|
+
};
|
|
8
|
+
Object.freeze(DisplayType);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { SvelteMap } from 'svelte/reactivity';
|
|
2
2
|
import type { ColumnFiltersState } from '../Filtering/ColumnFiltersState.js';
|
|
3
3
|
import type { FilterMode } from '../Filtering/FilterMode.js';
|
|
4
|
-
import type { PaginationType } from '../Pagination/PaginationType.js';
|
|
5
4
|
import type { IDataRepository } from './IDataRepository.js';
|
|
6
5
|
import type { BoolFilterValueType, DateFilterValueType, FilterFn, NumberFilterValueType, SelectFilterValueType, StringFilterValueType } from '../Filtering/FilterFn.js';
|
|
7
6
|
export interface ILocalDataRepository<T extends object> extends IDataRepository<T> {
|
|
8
|
-
readonly paginationType:
|
|
7
|
+
readonly paginationType: 'Local';
|
|
9
8
|
setPageSize: (size: number | string) => void;
|
|
10
9
|
setPage: (page: number) => void;
|
|
11
10
|
nextPage: () => void;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { SvelteMap } from 'svelte/reactivity';
|
|
2
2
|
import type { ColumnFiltersState } from '../Filtering/ColumnFiltersState.js';
|
|
3
|
-
import type { PaginationType } from '../Pagination/PaginationType.js';
|
|
4
3
|
import type { FilterMode } from '../Filtering/FilterMode.js';
|
|
5
4
|
import type { IDataRepository } from './IDataRepository.js';
|
|
6
5
|
export interface IRemoteDataRepository<T extends object> extends IDataRepository<T> {
|
|
7
|
-
readonly paginationType:
|
|
6
|
+
readonly paginationType: 'Remote';
|
|
8
7
|
setPageSize: (size: number | string) => void;
|
|
9
8
|
setPage: (page: number) => void;
|
|
10
9
|
nextPage: () => void;
|
|
@@ -3,15 +3,13 @@ import type { Row } from '../Context/Row.js';
|
|
|
3
3
|
import type { ColumnFiltersState } from '../Filtering/ColumnFiltersState.js';
|
|
4
4
|
import type { BoolFilterValueType, NumberFilterValueType, SelectFilterValueType, StringFilterValueType } from '../Filtering/FilterFn.js';
|
|
5
5
|
import type { FilterMode } from '../Filtering/FilterMode.js';
|
|
6
|
-
import { FilterType } from '../Filtering/FilterType.js';
|
|
7
6
|
import type { OnChangeFn } from '../OnChangeFn.js';
|
|
8
|
-
import { PaginationType } from '../Pagination/PaginationType.js';
|
|
9
7
|
import type { ILocalDataRepository } from './ILocalDataRepository.js';
|
|
10
8
|
import type { SortingState } from './SortingState.js';
|
|
11
9
|
import { TableDataRepository } from './TableDataRepository.svelte.js';
|
|
12
10
|
export declare class LocalTableDataRepository<T extends object> extends TableDataRepository<T> implements ILocalDataRepository<T> {
|
|
13
11
|
addEmptyRow?: (() => void) | undefined;
|
|
14
|
-
readonly filterType
|
|
12
|
+
readonly filterType: "Real";
|
|
15
13
|
constructor(tableName: string, dataRef: RefWrapper<T[]>, // reactive
|
|
16
14
|
getUserId: () => string | undefined, addEmptyRow?: (() => void) | undefined);
|
|
17
15
|
private _isLoading;
|
|
@@ -31,7 +29,7 @@ export declare class LocalTableDataRepository<T extends object> extends TableDat
|
|
|
31
29
|
get filtering(): ColumnFiltersState;
|
|
32
30
|
set filtering(v: ColumnFiltersState);
|
|
33
31
|
updateSorting: OnChangeFn<SortingState>;
|
|
34
|
-
readonly paginationType:
|
|
32
|
+
readonly paginationType: "Local";
|
|
35
33
|
readonly setFilterMode: (id: string, mode: FilterMode | undefined) => void;
|
|
36
34
|
readonly filterBy: (id: string, value: unknown) => void;
|
|
37
35
|
private _pageStartIndex;
|
|
@@ -2,7 +2,6 @@ import type { FloService } from '../../../../Types/Internal/FloService.js';
|
|
|
2
2
|
import { type TSchema } from '@sinclair/typebox';
|
|
3
3
|
import { TableDataRepository } from './TableDataRepository.svelte.js';
|
|
4
4
|
import type { IRemoteDataRepository } from './IRemoteDataRepository.js';
|
|
5
|
-
import { PaginationType } from '../Pagination/PaginationType.js';
|
|
6
5
|
import { FilterType } from '../Filtering/FilterType.js';
|
|
7
6
|
import type { SortingState } from './SortingState.js';
|
|
8
7
|
import type { ColumnFiltersState } from '../Filtering/ColumnFiltersState.js';
|
|
@@ -33,7 +32,7 @@ export declare class RemoteTableDataRepository<T extends object = object, R exte
|
|
|
33
32
|
private _data;
|
|
34
33
|
get data(): R[];
|
|
35
34
|
set data(v: R[]);
|
|
36
|
-
readonly paginationType
|
|
35
|
+
readonly paginationType: "Remote";
|
|
37
36
|
readonly filterType: FilterType;
|
|
38
37
|
readonly manualSorting = true;
|
|
39
38
|
private _sorting;
|
|
@@ -2,7 +2,6 @@ import { SvelteMap } from 'svelte/reactivity';
|
|
|
2
2
|
import type { FilterMode } from '../Filtering/FilterMode.js';
|
|
3
3
|
import type { FilterType } from '../Filtering/FilterType.js';
|
|
4
4
|
import type { PaginationState } from '../Pagination/PaginationState.js';
|
|
5
|
-
import type { PaginationType } from '../Pagination/PaginationType.js';
|
|
6
5
|
import type { IDataRepository } from './IDataRepository.js';
|
|
7
6
|
import type { ColumnFiltersState } from '../Filtering/ColumnFiltersState.js';
|
|
8
7
|
import type { SortingState } from './SortingState.js';
|
|
@@ -13,7 +12,7 @@ export interface ReadonlyPaginationState extends PaginationState {
|
|
|
13
12
|
export declare abstract class TableDataRepository<T extends object> implements IDataRepository<T> {
|
|
14
13
|
private tableName;
|
|
15
14
|
private getUserId;
|
|
16
|
-
abstract paginationType:
|
|
15
|
+
abstract paginationType: 'Remote' | 'Local';
|
|
17
16
|
abstract filterType: FilterType;
|
|
18
17
|
abstract totalRows: number;
|
|
19
18
|
abstract isLoading: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
None
|
|
3
|
-
Column
|
|
4
|
-
Filter
|
|
5
|
-
Toolbox
|
|
6
|
-
}
|
|
1
|
+
export declare const ExpandedPanel: {
|
|
2
|
+
readonly None: "None";
|
|
3
|
+
readonly Column: "Column";
|
|
4
|
+
readonly Filter: "Filter";
|
|
5
|
+
readonly Toolbox: "Toolbox";
|
|
6
|
+
};
|
|
7
|
+
export type ExpandedPanel = (typeof ExpandedPanel)[keyof typeof ExpandedPanel];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export const ExpandedPanel = {
|
|
2
|
+
None: 'None',
|
|
3
|
+
Column: 'Column',
|
|
4
|
+
Filter: 'Filter',
|
|
5
|
+
Toolbox: 'Toolbox'
|
|
6
|
+
};
|
|
7
|
+
Object.freeze(ExpandedPanel);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
String
|
|
3
|
-
Number
|
|
4
|
-
Select
|
|
5
|
-
Date
|
|
6
|
-
}
|
|
1
|
+
export declare const CustomFilterType: {
|
|
2
|
+
readonly String: "String";
|
|
3
|
+
readonly Number: "Number";
|
|
4
|
+
readonly Select: "Select";
|
|
5
|
+
readonly Date: "Date";
|
|
6
|
+
};
|
|
7
|
+
export type CustomFilterType = (typeof CustomFilterType)[keyof typeof CustomFilterType];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export const CustomFilterType = {
|
|
2
|
+
String: 'String',
|
|
3
|
+
Number: 'Number',
|
|
4
|
+
Select: 'Select',
|
|
5
|
+
Date: 'Date'
|
|
6
|
+
};
|
|
7
|
+
Object.freeze(CustomFilterType);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
Virtual
|
|
3
|
-
Real
|
|
4
|
-
}
|
|
1
|
+
export declare const FilterType: {
|
|
2
|
+
readonly Virtual: "Virtual";
|
|
3
|
+
readonly Real: "Real";
|
|
4
|
+
};
|
|
5
|
+
export type FilterType = (typeof FilterType)[keyof typeof FilterType];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export const FilterType = {
|
|
2
|
+
Virtual: 'Virtual',
|
|
3
|
+
Real: 'Real'
|
|
4
|
+
};
|
|
5
|
+
Object.freeze(FilterType);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
TopLeft
|
|
3
|
-
Top
|
|
4
|
-
TopRight
|
|
5
|
-
Right
|
|
6
|
-
BottomRight
|
|
7
|
-
Bottom
|
|
8
|
-
BottomLeft
|
|
9
|
-
Left
|
|
10
|
-
}
|
|
1
|
+
export declare const MultiFocusEdge: {
|
|
2
|
+
readonly TopLeft: "TopLeft";
|
|
3
|
+
readonly Top: "Top";
|
|
4
|
+
readonly TopRight: "TopRight";
|
|
5
|
+
readonly Right: "Right";
|
|
6
|
+
readonly BottomRight: "BottomRight";
|
|
7
|
+
readonly Bottom: "Bottom";
|
|
8
|
+
readonly BottomLeft: "BottomLeft";
|
|
9
|
+
readonly Left: "Left";
|
|
10
|
+
};
|
|
11
|
+
export type MultiFocusEdge = (typeof MultiFocusEdge)[keyof typeof MultiFocusEdge];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
export const MultiFocusEdge = {
|
|
2
|
+
TopLeft: 'TopLeft',
|
|
3
|
+
Top: 'Top',
|
|
4
|
+
TopRight: 'TopRight',
|
|
5
|
+
Right: 'Right',
|
|
6
|
+
BottomRight: 'BottomRight',
|
|
7
|
+
Bottom: 'Bottom',
|
|
8
|
+
BottomLeft: 'BottomLeft',
|
|
9
|
+
Left: 'Left'
|
|
10
|
+
};
|
|
11
|
+
Object.freeze(MultiFocusEdge);
|