@lavalogic/scoria 0.0.34 → 0.0.35
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/QuerySelect.svelte +23 -26
- package/dist/Components/QuerySelect.svelte.d.ts +16 -15
- package/dist/Components/SingleSelect.svelte +9 -12
- package/dist/Components/SingleSelect.svelte.d.ts +10 -10
- package/dist/Components/Table/Body/QuickSearchCell.svelte +13 -15
- package/dist/Components/Table/Misc/FilterInput.svelte +3 -5
- package/dist/Components/Table/Types/Columns/Definitions/Expand/ExpandDef.svelte.d.ts +1 -0
- package/dist/Types/Internal/Misc.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
<svelte:options runes />
|
|
2
2
|
|
|
3
3
|
<script lang="ts" module>
|
|
4
|
-
interface
|
|
5
|
-
options
|
|
6
|
-
|
|
7
|
-
labelProp:
|
|
4
|
+
interface QuerySelectPropsAsObjectCommonProps<V extends object, VP extends ValueProp<V>> {
|
|
5
|
+
options: V[];
|
|
6
|
+
|
|
7
|
+
labelProp: NonNullableKey<V>;
|
|
8
8
|
valueProp: VP;
|
|
9
|
+
|
|
9
10
|
query: (value: string) => Promise<V[]>;
|
|
10
|
-
onchange: (
|
|
11
|
+
onchange: (newValue: V | null) => void;
|
|
11
12
|
|
|
13
|
+
name?: string;
|
|
12
14
|
disabled?: boolean;
|
|
13
|
-
|
|
14
15
|
width?: string;
|
|
15
16
|
height?: string;
|
|
16
17
|
label?: string;
|
|
@@ -23,25 +24,25 @@
|
|
|
23
24
|
isValid?: (item: V | null) => boolean;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
export interface QuerySelectPropsAsObject<V extends object, VP extends
|
|
27
|
-
extends
|
|
27
|
+
export interface QuerySelectPropsAsObject<V extends object, VP extends ValueProp<V>>
|
|
28
|
+
extends QuerySelectPropsAsObjectCommonProps<V, VP> {
|
|
28
29
|
valueAsObject: true;
|
|
29
|
-
|
|
30
|
+
value: V | null;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
export interface QuerySelectPropsAsPrimitive<V extends object, VP extends
|
|
33
|
-
extends
|
|
33
|
+
export interface QuerySelectPropsAsPrimitive<V extends object, VP extends ValueProp<V>>
|
|
34
|
+
extends QuerySelectPropsAsObjectCommonProps<V, VP> {
|
|
34
35
|
valueAsObject: false;
|
|
35
|
-
|
|
36
|
+
value: V[VP] | null;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
export type QuerySelectProps<V extends object, VP extends
|
|
39
|
+
export type QuerySelectProps<V extends object, VP extends ValueProp<V>> =
|
|
39
40
|
| QuerySelectPropsAsObject<V, VP>
|
|
40
41
|
| QuerySelectPropsAsPrimitive<V, VP>;
|
|
41
42
|
</script>
|
|
42
43
|
|
|
43
44
|
<!-- #region Script -->
|
|
44
|
-
<script lang="ts" generics="V extends object, VP extends
|
|
45
|
+
<script lang="ts" generics="V extends object, VP extends ValueProp<V>">
|
|
45
46
|
import { ToastContext } from '../Contexts/ToastContext.svelte.js';
|
|
46
47
|
|
|
47
48
|
import {
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
import Action from './Action.svelte';
|
|
57
58
|
import { Size } from '../Types/Internal/Size.js';
|
|
58
59
|
import { Validity } from '../Types/Internal/Validity.js';
|
|
60
|
+
import type { NonNullableKey, ValueProp } from '../Types/Internal/Misc.js';
|
|
59
61
|
|
|
60
62
|
let {
|
|
61
63
|
label,
|
|
@@ -65,15 +67,15 @@
|
|
|
65
67
|
required = false,
|
|
66
68
|
invalid = false,
|
|
67
69
|
valueAsObject,
|
|
68
|
-
name,
|
|
70
|
+
name = 'Item',
|
|
69
71
|
disabled,
|
|
70
72
|
query,
|
|
71
73
|
width,
|
|
72
74
|
height,
|
|
73
75
|
focusOnLoad = false,
|
|
74
76
|
inputId = generateShortUUID(),
|
|
75
|
-
selectedValue,
|
|
76
|
-
options = $bindable([]),
|
|
77
|
+
value: selectedValue,
|
|
78
|
+
options = $bindable<V[]>([]),
|
|
77
79
|
isValid,
|
|
78
80
|
onchange,
|
|
79
81
|
onfocus
|
|
@@ -86,11 +88,10 @@
|
|
|
86
88
|
let hasRegisteredListeners = $state(false);
|
|
87
89
|
|
|
88
90
|
$effect.pre(() => {
|
|
89
|
-
|
|
90
|
-
selectedValue;
|
|
91
|
+
void selectedValue;
|
|
91
92
|
untrack(() => {
|
|
92
93
|
if (selectedValue != null) {
|
|
93
|
-
if (
|
|
94
|
+
if (valueAsObject) {
|
|
94
95
|
if (!options.some((opt: V) => opt[valueProp] === (selectedValue as V)[valueProp])) {
|
|
95
96
|
options.push(selectedValue! as V);
|
|
96
97
|
}
|
|
@@ -104,16 +105,12 @@
|
|
|
104
105
|
});
|
|
105
106
|
});
|
|
106
107
|
|
|
107
|
-
function valueIsObject(value: V | V[VP] | null): value is V {
|
|
108
|
-
return selectedValue == null || typeof selectedValue == 'object';
|
|
109
|
-
}
|
|
110
|
-
|
|
111
108
|
let isInvalid = $derived(
|
|
112
109
|
(required && !selectedValue) ||
|
|
113
110
|
invalid ||
|
|
114
111
|
isValid?.(
|
|
115
|
-
|
|
116
|
-
? selectedValue
|
|
112
|
+
valueAsObject
|
|
113
|
+
? (selectedValue as V)
|
|
117
114
|
: (options.find((a) => a[valueProp] === selectedValue) ?? null)
|
|
118
115
|
) === false
|
|
119
116
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
interface
|
|
2
|
-
options
|
|
3
|
-
|
|
4
|
-
labelProp: string & keyof V;
|
|
1
|
+
interface QuerySelectPropsAsObjectCommonProps<V extends object, VP extends ValueProp<V>> {
|
|
2
|
+
options: V[];
|
|
3
|
+
labelProp: NonNullableKey<V>;
|
|
5
4
|
valueProp: VP;
|
|
6
5
|
query: (value: string) => Promise<V[]>;
|
|
7
|
-
onchange: (
|
|
6
|
+
onchange: (newValue: V | null) => void;
|
|
7
|
+
name?: string;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
width?: string;
|
|
10
10
|
height?: string;
|
|
@@ -17,23 +17,24 @@ interface commonProps<V extends object, VP extends string & keyof V> {
|
|
|
17
17
|
clearable?: boolean;
|
|
18
18
|
isValid?: (item: V | null) => boolean;
|
|
19
19
|
}
|
|
20
|
-
export interface QuerySelectPropsAsObject<V extends object, VP extends
|
|
20
|
+
export interface QuerySelectPropsAsObject<V extends object, VP extends ValueProp<V>> extends QuerySelectPropsAsObjectCommonProps<V, VP> {
|
|
21
21
|
valueAsObject: true;
|
|
22
|
-
|
|
22
|
+
value: V | null;
|
|
23
23
|
}
|
|
24
|
-
export interface QuerySelectPropsAsPrimitive<V extends object, VP extends
|
|
24
|
+
export interface QuerySelectPropsAsPrimitive<V extends object, VP extends ValueProp<V>> extends QuerySelectPropsAsObjectCommonProps<V, VP> {
|
|
25
25
|
valueAsObject: false;
|
|
26
|
-
|
|
26
|
+
value: V[VP] | null;
|
|
27
27
|
}
|
|
28
|
-
export type QuerySelectProps<V extends object, VP extends
|
|
29
|
-
|
|
28
|
+
export type QuerySelectProps<V extends object, VP extends ValueProp<V>> = QuerySelectPropsAsObject<V, VP> | QuerySelectPropsAsPrimitive<V, VP>;
|
|
29
|
+
import type { NonNullableKey, ValueProp } from '../Types/Internal/Misc.js';
|
|
30
|
+
declare function $$render<V extends object, VP extends ValueProp<V>>(): {
|
|
30
31
|
props: QuerySelectProps<V, VP>;
|
|
31
32
|
exports: {};
|
|
32
33
|
bindings: "options";
|
|
33
34
|
slots: {};
|
|
34
35
|
events: {};
|
|
35
36
|
};
|
|
36
|
-
declare class __sveltets_Render<V extends object, VP extends
|
|
37
|
+
declare class __sveltets_Render<V extends object, VP extends ValueProp<V>> {
|
|
37
38
|
props(): ReturnType<typeof $$render<V, VP>>['props'];
|
|
38
39
|
events(): ReturnType<typeof $$render<V, VP>>['events'];
|
|
39
40
|
slots(): ReturnType<typeof $$render<V, VP>>['slots'];
|
|
@@ -41,12 +42,12 @@ declare class __sveltets_Render<V extends object, VP extends string & keyof V> {
|
|
|
41
42
|
exports(): {};
|
|
42
43
|
}
|
|
43
44
|
interface $$IsomorphicComponent {
|
|
44
|
-
new <V extends object, VP extends
|
|
45
|
+
new <V extends object, VP extends ValueProp<V>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<V, VP>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<V, VP>['props']>, ReturnType<__sveltets_Render<V, VP>['events']>, ReturnType<__sveltets_Render<V, VP>['slots']>> & {
|
|
45
46
|
$$bindings?: ReturnType<__sveltets_Render<V, VP>['bindings']>;
|
|
46
47
|
} & ReturnType<__sveltets_Render<V, VP>['exports']>;
|
|
47
|
-
<V extends object, VP extends
|
|
48
|
+
<V extends object, VP extends ValueProp<V>>(internal: unknown, props: ReturnType<__sveltets_Render<V, VP>['props']> & {}): ReturnType<__sveltets_Render<V, VP>['exports']>;
|
|
48
49
|
z_$$bindings?: ReturnType<__sveltets_Render<any, any>['bindings']>;
|
|
49
50
|
}
|
|
50
51
|
declare const QuerySelect: $$IsomorphicComponent;
|
|
51
|
-
type QuerySelect<V extends object, VP extends
|
|
52
|
+
type QuerySelect<V extends object, VP extends ValueProp<V>> = InstanceType<typeof QuerySelect<V, VP>>;
|
|
52
53
|
export default QuerySelect;
|
|
@@ -9,13 +9,15 @@
|
|
|
9
9
|
import { onMount, tick } from 'svelte';
|
|
10
10
|
import Action from './Action.svelte';
|
|
11
11
|
|
|
12
|
-
interface
|
|
12
|
+
interface SingleSelectCommonProps<V extends object, VP extends ValueProp<V>> {
|
|
13
13
|
options: V[];
|
|
14
14
|
|
|
15
15
|
labelProp: NonNullableKey<V>;
|
|
16
16
|
valueProp: VP;
|
|
17
17
|
// value: V | V[VP] | null;
|
|
18
18
|
|
|
19
|
+
onchange: (newValue: V | null) => void;
|
|
20
|
+
|
|
19
21
|
name?: string;
|
|
20
22
|
width?: string;
|
|
21
23
|
height?: string;
|
|
@@ -37,31 +39,26 @@
|
|
|
37
39
|
createFilter?: (value: string) => boolean;
|
|
38
40
|
onkeydown?: (e: KeyboardEvent) => void;
|
|
39
41
|
onfocus?: (target: HTMLInputElement) => void;
|
|
40
|
-
onchange: (newValue: V | null) => void;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
export interface SingleSelectPropsAsObject<
|
|
44
|
-
V
|
|
45
|
-
VP extends ValueProp<V> = ValueProp<V>
|
|
46
|
-
> extends commonProps<V, VP> {
|
|
44
|
+
export interface SingleSelectPropsAsObject<V extends object, VP extends ValueProp<V>>
|
|
45
|
+
extends SingleSelectCommonProps<V, VP> {
|
|
47
46
|
valueAsObject: true;
|
|
48
47
|
value: V | null;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
export interface SingleSelectPropsAsPrimitive<
|
|
52
|
-
V
|
|
53
|
-
VP extends ValueProp<V> = ValueProp<V>
|
|
54
|
-
> extends commonProps<V, VP> {
|
|
50
|
+
export interface SingleSelectPropsAsPrimitive<V extends object, VP extends ValueProp<V>>
|
|
51
|
+
extends SingleSelectCommonProps<V, VP> {
|
|
55
52
|
valueAsObject: false;
|
|
56
53
|
value: V[VP] | null;
|
|
57
54
|
}
|
|
58
55
|
|
|
59
|
-
export type SingleSelectProps<V extends object, VP extends ValueProp<V
|
|
56
|
+
export type SingleSelectProps<V extends object, VP extends ValueProp<V>> =
|
|
60
57
|
| SingleSelectPropsAsPrimitive<V, VP>
|
|
61
58
|
| SingleSelectPropsAsObject<V, VP>;
|
|
62
59
|
</script>
|
|
63
60
|
|
|
64
|
-
<script lang="ts" generics="V extends object, VP extends ValueProp<V>
|
|
61
|
+
<script lang="ts" generics="V extends object, VP extends ValueProp<V>">
|
|
65
62
|
const {
|
|
66
63
|
label,
|
|
67
64
|
options,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { NonNullableKey, ValueProp } from '../Types/Internal/Misc.js';
|
|
2
|
-
interface
|
|
2
|
+
interface SingleSelectCommonProps<V extends object, VP extends ValueProp<V>> {
|
|
3
3
|
options: V[];
|
|
4
4
|
labelProp: NonNullableKey<V>;
|
|
5
5
|
valueProp: VP;
|
|
6
|
+
onchange: (newValue: V | null) => void;
|
|
6
7
|
name?: string;
|
|
7
8
|
width?: string;
|
|
8
9
|
height?: string;
|
|
@@ -24,25 +25,24 @@ interface commonProps<V extends object, VP extends ValueProp<V> = ValueProp<V>>
|
|
|
24
25
|
createFilter?: (value: string) => boolean;
|
|
25
26
|
onkeydown?: (e: KeyboardEvent) => void;
|
|
26
27
|
onfocus?: (target: HTMLInputElement) => void;
|
|
27
|
-
onchange: (newValue: V | null) => void;
|
|
28
28
|
}
|
|
29
|
-
export interface SingleSelectPropsAsObject<V extends object, VP extends ValueProp<V
|
|
29
|
+
export interface SingleSelectPropsAsObject<V extends object, VP extends ValueProp<V>> extends SingleSelectCommonProps<V, VP> {
|
|
30
30
|
valueAsObject: true;
|
|
31
31
|
value: V | null;
|
|
32
32
|
}
|
|
33
|
-
export interface SingleSelectPropsAsPrimitive<V extends object, VP extends ValueProp<V
|
|
33
|
+
export interface SingleSelectPropsAsPrimitive<V extends object, VP extends ValueProp<V>> extends SingleSelectCommonProps<V, VP> {
|
|
34
34
|
valueAsObject: false;
|
|
35
35
|
value: V[VP] | null;
|
|
36
36
|
}
|
|
37
|
-
export type SingleSelectProps<V extends object, VP extends ValueProp<V
|
|
38
|
-
declare function $$render<V extends object, VP extends ValueProp<V
|
|
37
|
+
export type SingleSelectProps<V extends object, VP extends ValueProp<V>> = SingleSelectPropsAsPrimitive<V, VP> | SingleSelectPropsAsObject<V, VP>;
|
|
38
|
+
declare function $$render<V extends object, VP extends ValueProp<V>>(): {
|
|
39
39
|
props: SingleSelectProps<V, VP>;
|
|
40
40
|
exports: {};
|
|
41
41
|
bindings: "";
|
|
42
42
|
slots: {};
|
|
43
43
|
events: {};
|
|
44
44
|
};
|
|
45
|
-
declare class __sveltets_Render<V extends object, VP extends ValueProp<V
|
|
45
|
+
declare class __sveltets_Render<V extends object, VP extends ValueProp<V>> {
|
|
46
46
|
props(): ReturnType<typeof $$render<V, VP>>['props'];
|
|
47
47
|
events(): ReturnType<typeof $$render<V, VP>>['events'];
|
|
48
48
|
slots(): ReturnType<typeof $$render<V, VP>>['slots'];
|
|
@@ -50,12 +50,12 @@ declare class __sveltets_Render<V extends object, VP extends ValueProp<V> = Valu
|
|
|
50
50
|
exports(): {};
|
|
51
51
|
}
|
|
52
52
|
interface $$IsomorphicComponent {
|
|
53
|
-
new <V extends object, VP extends ValueProp<V
|
|
53
|
+
new <V extends object, VP extends ValueProp<V>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<V, VP>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<V, VP>['props']>, ReturnType<__sveltets_Render<V, VP>['events']>, ReturnType<__sveltets_Render<V, VP>['slots']>> & {
|
|
54
54
|
$$bindings?: ReturnType<__sveltets_Render<V, VP>['bindings']>;
|
|
55
55
|
} & ReturnType<__sveltets_Render<V, VP>['exports']>;
|
|
56
|
-
<V extends object, VP extends ValueProp<V
|
|
56
|
+
<V extends object, VP extends ValueProp<V>>(internal: unknown, props: ReturnType<__sveltets_Render<V, VP>['props']> & {}): ReturnType<__sveltets_Render<V, VP>['exports']>;
|
|
57
57
|
z_$$bindings?: ReturnType<__sveltets_Render<any, any>['bindings']>;
|
|
58
58
|
}
|
|
59
59
|
declare const SingleSelect: $$IsomorphicComponent;
|
|
60
|
-
type SingleSelect<V extends object, VP extends ValueProp<V
|
|
60
|
+
type SingleSelect<V extends object, VP extends ValueProp<V>> = InstanceType<typeof SingleSelect<V, VP>>;
|
|
61
61
|
export default SingleSelect;
|
|
@@ -95,11 +95,6 @@
|
|
|
95
95
|
let valueMin: number | null = $state(null);
|
|
96
96
|
let valueMax: number | null = $state(null);
|
|
97
97
|
|
|
98
|
-
let selectedOption: SelectOption<string | number> | null = $state(
|
|
99
|
-
// HACK crappy bodge to get typescript to understand that this won't be always null
|
|
100
|
-
null as unknown as SelectOption<string | number>
|
|
101
|
-
);
|
|
102
|
-
|
|
103
98
|
let selectedOptions: Array<SelectOption<string | number>> = $state([]);
|
|
104
99
|
let lastQueryOptions: Array<SelectOption<unknown>> = $state([]);
|
|
105
100
|
|
|
@@ -116,15 +111,18 @@
|
|
|
116
111
|
return stringFilterTypes.find((it) => it.value === value)!;
|
|
117
112
|
});
|
|
118
113
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
114
|
+
const filteringStateValue = $derived(
|
|
115
|
+
tableContext.paginationRepo?.filtering.find((it) => it.id === def.id)?.value
|
|
116
|
+
);
|
|
123
117
|
|
|
124
118
|
$effect(() => {
|
|
119
|
+
if (isRemoteSelect && !tableContext.paginationRepo?.filtering) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
void filteringStateValue;
|
|
125
123
|
if (hasQuery) {
|
|
126
124
|
untrack(async () => {
|
|
127
|
-
const gotValue =
|
|
125
|
+
const gotValue = filteringStateValue as unknown as
|
|
128
126
|
| Array<string | number | SelectOption<string | number>>
|
|
129
127
|
| undefined;
|
|
130
128
|
|
|
@@ -146,7 +144,7 @@
|
|
|
146
144
|
return;
|
|
147
145
|
}
|
|
148
146
|
|
|
149
|
-
const gotValue =
|
|
147
|
+
const gotValue = filteringStateValue as unknown as
|
|
150
148
|
| Array<string | number | SelectOption<string | number>>
|
|
151
149
|
| undefined;
|
|
152
150
|
|
|
@@ -161,7 +159,7 @@
|
|
|
161
159
|
selectedNumberFilterType.value === NumberDateFilterMode.Between &&
|
|
162
160
|
tableContext.paginationRepo?.filtering
|
|
163
161
|
) {
|
|
164
|
-
const gotValue =
|
|
162
|
+
const gotValue = filteringStateValue;
|
|
165
163
|
if (gotValue != undefined) {
|
|
166
164
|
const [min, max] = gotValue as [number, number | undefined];
|
|
167
165
|
value = min;
|
|
@@ -171,7 +169,7 @@
|
|
|
171
169
|
value = valueMin = valueMax = null;
|
|
172
170
|
}
|
|
173
171
|
} else if (tableContext.paginationRepo?.filtering) {
|
|
174
|
-
const gotValue =
|
|
172
|
+
const gotValue = filteringStateValue;
|
|
175
173
|
if (gotValue != undefined) {
|
|
176
174
|
const [min] = gotValue as [number, number | undefined];
|
|
177
175
|
value = min;
|
|
@@ -182,7 +180,7 @@
|
|
|
182
180
|
}
|
|
183
181
|
}
|
|
184
182
|
} else if (tableContext.paginationRepo?.filtering) {
|
|
185
|
-
const gotValue =
|
|
183
|
+
const gotValue = filteringStateValue;
|
|
186
184
|
if (gotValue == null || typeof gotValue == 'string' || typeof gotValue == 'number') {
|
|
187
185
|
value = gotValue;
|
|
188
186
|
}
|
|
@@ -296,9 +294,9 @@
|
|
|
296
294
|
query={customFilter!.query!}
|
|
297
295
|
bind:options={lastQueryOptions}
|
|
298
296
|
onchange={(newValue) => {
|
|
299
|
-
console.log(newValue);
|
|
300
297
|
tableContext.paginationRepo?.filterBy(def.id, newValue?.value ?? null);
|
|
301
298
|
tableContext.__queryValues.set(label, newValue);
|
|
299
|
+
value = newValue as SelectOption<string | number> | null;
|
|
302
300
|
}}
|
|
303
301
|
/>
|
|
304
302
|
{:else}
|
|
@@ -150,10 +150,8 @@
|
|
|
150
150
|
);
|
|
151
151
|
|
|
152
152
|
$effect(() => {
|
|
153
|
-
if (isRemoteSelect) {
|
|
154
|
-
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
153
|
+
if (isRemoteSelect && !tableContext.paginationRepo?.filtering) {
|
|
154
|
+
return;
|
|
157
155
|
}
|
|
158
156
|
void filteringStateValue;
|
|
159
157
|
|
|
@@ -370,9 +368,9 @@
|
|
|
370
368
|
query={customFilter!.query!}
|
|
371
369
|
bind:options={lastQueryOptions}
|
|
372
370
|
onchange={(newValue) => {
|
|
373
|
-
console.log(newValue);
|
|
374
371
|
tableContext.paginationRepo?.filterBy(def.id, newValue?.value ?? null);
|
|
375
372
|
tableContext.__queryValues.set(label ?? _uuid, newValue);
|
|
373
|
+
value = newValue as SelectOption<string | number> | null;
|
|
376
374
|
}}
|
|
377
375
|
/>
|
|
378
376
|
{:else}
|
|
@@ -8,6 +8,7 @@ export interface ExpandDefProps<T extends object, R extends object> extends Colu
|
|
|
8
8
|
headerIcon: IconProps['name'];
|
|
9
9
|
innerTableName: string;
|
|
10
10
|
innerTableOptions: TableInitOptions<R>;
|
|
11
|
+
accessorFn: (item: T, index: number) => R;
|
|
11
12
|
}
|
|
12
13
|
export declare class ExpandDef<T extends object, R extends object = object> extends ColumnDef<T> {
|
|
13
14
|
readonly columnType: "Expand";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type NonNullableKey<T> = T extends null ? never : string & keyof T;
|
|
2
|
-
export type ValueProp<V> = keyof V & string;
|
|
2
|
+
export type ValueProp<V> = V extends null ? never : keyof V & string;
|
|
3
3
|
export type Unsubscriber = () => void;
|
|
4
4
|
export type Pixels = number;
|
|
5
5
|
export type BrandedString<T> = string & {
|