@lavalogic/scoria 0.31.2 → 0.32.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.
- package/dist/Components/CollapsibleCard.svelte +6 -1
- package/dist/Components/StepForm.svelte +1 -1
- package/dist/Components/Table/Body/QuickSearchCell.svelte +9 -8
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte +8 -2
- package/dist/Components/Table/Misc/FilterInput.svelte +14 -10
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/QueryDef.svelte.d.ts +1 -1
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/QueryDef.svelte.js +0 -1
- package/package.json +1 -1
|
@@ -69,12 +69,17 @@
|
|
|
69
69
|
|
|
70
70
|
<style>.collapsible-card {
|
|
71
71
|
background-color: white;
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-flow: column nowrap;
|
|
74
|
+
flex-shrink: 1;
|
|
72
75
|
border-radius: 4px;
|
|
73
76
|
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.1333333333);
|
|
74
77
|
padding: 1.5rem;
|
|
78
|
+
max-height: 100%;
|
|
79
|
+
overflow: hidden;
|
|
75
80
|
}
|
|
76
81
|
.collapsible-card.grow {
|
|
77
|
-
flex
|
|
82
|
+
flex: 1;
|
|
78
83
|
}
|
|
79
84
|
.collapsible-card .heading {
|
|
80
85
|
display: flex;
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
|
|
122
122
|
if (hasQuery(customFilter)) {
|
|
123
123
|
if (def.debug) {
|
|
124
|
-
console.
|
|
124
|
+
console.debug(`${def.id}: `, 'has query');
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
untrack(async () => {
|
|
@@ -132,17 +132,18 @@
|
|
|
132
132
|
|
|
133
133
|
if (gotValue != undefined) {
|
|
134
134
|
if (def.debug) {
|
|
135
|
-
console.
|
|
135
|
+
console.debug(`${def.id}: query values:`, tableContext.dataRepo.__queryValues);
|
|
136
136
|
}
|
|
137
137
|
const key = customFilter.id;
|
|
138
138
|
const x = await tableContext.dataRepo.__queryValues.get(key);
|
|
139
139
|
|
|
140
140
|
if (def.debug) {
|
|
141
|
-
console.
|
|
141
|
+
console.debug(`${def.id}: `, 'value:', $state.snapshot(x));
|
|
142
142
|
}
|
|
143
143
|
asdfvalue = (await x) ?? null;
|
|
144
144
|
} else if (def.debug) {
|
|
145
|
-
console.
|
|
145
|
+
console.debug(
|
|
146
|
+
`${def.id}: `,
|
|
146
147
|
'filtering state value was undefined',
|
|
147
148
|
$state.snapshot(tableContext.paginationRepo?.filtering)
|
|
148
149
|
);
|
|
@@ -154,7 +155,7 @@
|
|
|
154
155
|
}).catch(devCatch);
|
|
155
156
|
} else if (isSelect) {
|
|
156
157
|
if (def.debug) {
|
|
157
|
-
console.
|
|
158
|
+
console.debug(`${def.id}: `, 'is select (not query)');
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
if (!tableContext.paginationRepo?.filtering) {
|
|
@@ -170,7 +171,7 @@
|
|
|
170
171
|
try {
|
|
171
172
|
const opts = await options;
|
|
172
173
|
if (def.debug) {
|
|
173
|
-
console.
|
|
174
|
+
console.debug(`${def.id}: possible options:`, $state.snapshot(opts));
|
|
174
175
|
}
|
|
175
176
|
const x = opts.filter((it) => {
|
|
176
177
|
if (!isSelectOption(it)) {
|
|
@@ -190,12 +191,12 @@
|
|
|
190
191
|
});
|
|
191
192
|
|
|
192
193
|
if (def.debug) {
|
|
193
|
-
console.
|
|
194
|
+
console.debug(`${def.id}: `, 'selected options:', x);
|
|
194
195
|
}
|
|
195
196
|
selectedOptions = x;
|
|
196
197
|
} catch (e) {
|
|
197
198
|
if (dev || def.debug) {
|
|
198
|
-
console.
|
|
199
|
+
console.debug(`${def.id}: `, e);
|
|
199
200
|
}
|
|
200
201
|
}
|
|
201
202
|
}).catch(devCatch);
|
|
@@ -58,7 +58,10 @@
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
} else if (columnDef.debug) {
|
|
61
|
-
console.
|
|
61
|
+
console.debug(
|
|
62
|
+
`${cell.column.columnDef.id}: `,
|
|
63
|
+
'skipping async option insertion because it is stale'
|
|
64
|
+
);
|
|
62
65
|
}
|
|
63
66
|
} catch (e) {
|
|
64
67
|
if (columnDef.debug) {
|
|
@@ -67,7 +70,10 @@
|
|
|
67
70
|
if (valueAsyncCounter === localCounter) {
|
|
68
71
|
//nothing happens
|
|
69
72
|
} else if (columnDef.debug) {
|
|
70
|
-
console.
|
|
73
|
+
console.debug(
|
|
74
|
+
`${cell.column.columnDef.id}: `,
|
|
75
|
+
'skipping caught async option insertion error because it is stale'
|
|
76
|
+
);
|
|
71
77
|
}
|
|
72
78
|
}
|
|
73
79
|
})().catch(devCatch);
|
|
@@ -90,12 +90,16 @@
|
|
|
90
90
|
}
|
|
91
91
|
void filteringStateValue;
|
|
92
92
|
if (def.debug) {
|
|
93
|
-
console.
|
|
93
|
+
console.debug(
|
|
94
|
+
`${def.id}: `,
|
|
95
|
+
'FILTER INPUT: filtering state value:',
|
|
96
|
+
$state.snapshot(filteringStateValue)
|
|
97
|
+
);
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
if (hasQuery(customFilter)) {
|
|
97
101
|
if (def.debug) {
|
|
98
|
-
console.
|
|
102
|
+
console.debug(`${def.id}: `, 'has query');
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
untrack(async () => {
|
|
@@ -104,17 +108,17 @@
|
|
|
104
108
|
|
|
105
109
|
if (filteringStateValue != undefined) {
|
|
106
110
|
if (def.debug) {
|
|
107
|
-
console.
|
|
111
|
+
console.debug(`${def.id}: query values:`, tableContext.dataRepo.__queryValues);
|
|
108
112
|
}
|
|
109
113
|
const x = await tableContext.dataRepo.__queryValues.get(customFilter.id);
|
|
110
114
|
|
|
111
115
|
if (def.debug) {
|
|
112
|
-
console.
|
|
116
|
+
console.debug(`${def.id}: value:`, $state.snapshot(x));
|
|
113
117
|
}
|
|
114
118
|
value = (x ?? null) as SelectOption<unknown> | null;
|
|
115
119
|
} else if (def.debug) {
|
|
116
|
-
console.
|
|
117
|
-
|
|
120
|
+
console.debug(
|
|
121
|
+
`${def.id}: filtering state value was undefined`,
|
|
118
122
|
$state.snapshot(tableContext.paginationRepo?.filtering)
|
|
119
123
|
);
|
|
120
124
|
}
|
|
@@ -125,13 +129,13 @@
|
|
|
125
129
|
}).catch(devCatch);
|
|
126
130
|
} else if (isSelect) {
|
|
127
131
|
if (def.debug) {
|
|
128
|
-
console.
|
|
132
|
+
console.debug(`${def.id}: is select (not query)`);
|
|
129
133
|
}
|
|
130
134
|
untrack(async () => {
|
|
131
135
|
try {
|
|
132
136
|
const opts = await options;
|
|
133
137
|
if (def.debug) {
|
|
134
|
-
console.
|
|
138
|
+
console.debug(`${def.id}: possible options:`, $state.snapshot(options));
|
|
135
139
|
}
|
|
136
140
|
const x = opts.filter((it) => {
|
|
137
141
|
if (it.value != null && (typeof it.value == 'string' || typeof it.value == 'number')) {
|
|
@@ -140,12 +144,12 @@
|
|
|
140
144
|
return false;
|
|
141
145
|
});
|
|
142
146
|
if (def.debug) {
|
|
143
|
-
console.
|
|
147
|
+
console.debug(`${def.id}: selected options:`, x);
|
|
144
148
|
}
|
|
145
149
|
selectedOptions = x;
|
|
146
150
|
} catch (e) {
|
|
147
151
|
if (dev || def.debug) {
|
|
148
|
-
console.
|
|
152
|
+
console.debug(`${def.id}: `, e);
|
|
149
153
|
}
|
|
150
154
|
}
|
|
151
155
|
}).catch(devCatch);
|
|
@@ -9,7 +9,7 @@ export interface QueryDefProps<T extends object, in FilterValueType = unknown, o
|
|
|
9
9
|
export declare class QueryDef<T extends object, FilterValueType = unknown, out FilterOptionsType = unknown> extends AccessorDef<T, FilterValueType, FilterOptionsType> {
|
|
10
10
|
readonly accessorType: "Query";
|
|
11
11
|
constructor(props: QueryDefProps<T, FilterValueType, FilterOptionsType>);
|
|
12
|
-
|
|
12
|
+
filterFn: FilterFn<T, FilterValueType> | undefined;
|
|
13
13
|
getDisplayValue: (item: T, index: number) => string | null | Promise<string | null>;
|
|
14
14
|
readonly query: (queryString: string, item: T, index: number) => Promise<Array<SelectOption<unknown>>>;
|
|
15
15
|
readonly clearable: boolean;
|