@lavalogic/scoria 0.5.5 → 0.5.7

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.
@@ -143,7 +143,7 @@ dialog .modal-main {
143
143
  overflow: auto;
144
144
  }
145
145
  dialog .modal-main.noscroll {
146
- overflow: visible;
146
+ overflow: auto;
147
147
  }
148
148
  dialog .footer {
149
149
  flex-shrink: 0;
@@ -85,7 +85,7 @@ dialog .modal-main {
85
85
  overflow: auto;
86
86
  }
87
87
  dialog .modal-main.noscroll {
88
- overflow: visible;
88
+ overflow: auto;
89
89
  }
90
90
  dialog .footer {
91
91
  flex-shrink: 0;
@@ -275,7 +275,7 @@ dialog .modal-main {
275
275
  overflow: auto;
276
276
  }
277
277
  dialog .modal-main.noscroll {
278
- overflow: visible;
278
+ overflow: auto;
279
279
  }
280
280
  dialog .footer {
281
281
  flex-shrink: 0;
@@ -115,7 +115,14 @@
115
115
  return;
116
116
  }
117
117
  void filteringStateValue;
118
+ if (def.debug) {
119
+ console.log('filtering state value:', $state.snapshot(filteringStateValue));
120
+ }
118
121
  if (hasQuery) {
122
+ if (def.debug) {
123
+ console.log('has query');
124
+ }
125
+
119
126
  untrack(async () => {
120
127
  const gotValue = filteringStateValue as unknown as
121
128
  | Array<string | number | SelectOption<unknown>>
@@ -125,6 +132,9 @@
125
132
  // as unknown as string | number | undefined;
126
133
 
127
134
  if (gotValue != undefined) {
135
+ if (def.debug) {
136
+ console.log(`query values:`, tableContext.dataRepo.__queryValues);
137
+ }
128
138
  const key =
129
139
  customFilter?.id ??
130
140
  customFilter?.label ??
@@ -132,7 +142,16 @@
132
142
  customFilter?.queryKey ??
133
143
  def.id;
134
144
  const x = key == null ? null : tableContext.dataRepo.__queryValues.get(key);
145
+
146
+ if (def.debug) {
147
+ console.log('value:', $state.snapshot(x));
148
+ }
135
149
  value = (x ?? null) as SelectOption<unknown> | null;
150
+ } else if (def.debug) {
151
+ console.log(
152
+ 'filtering state value was undefined',
153
+ $state.snapshot(tableContext.paginationRepo?.filtering)
154
+ );
136
155
  }
137
156
  } catch (e) {
138
157
  console.warn(e);
@@ -140,6 +159,10 @@
140
159
  }
141
160
  });
142
161
  } else if (isSelect) {
162
+ if (def.debug) {
163
+ console.log('is select (not query)');
164
+ }
165
+
143
166
  if (!tableContext.paginationRepo?.filtering) {
144
167
  return;
145
168
  }
@@ -149,18 +172,34 @@
149
172
  | undefined;
150
173
 
151
174
  untrack(async () => {
152
- const x = (await options).filter((it) => {
153
- if (it.value == undefined) {
154
- return true;
175
+ try {
176
+ const opts = await options;
177
+ if (def.debug) {
178
+ console.log('possible options:', $state.snapshot(opts));
155
179
  }
180
+ const x = opts.filter((it) => {
181
+ if (it.value == undefined) {
182
+ return true;
183
+ }
156
184
 
157
- if (typeof it.value == 'string' || typeof it.value == 'number') {
158
- return (gotValue as unknown as Array<string | number> | undefined)?.includes(it.value);
159
- }
185
+ if (typeof it.value == 'string' || typeof it.value == 'number') {
186
+ return (gotValue as unknown as Array<string | number> | undefined)?.includes(
187
+ it.value
188
+ );
189
+ }
190
+
191
+ return false;
192
+ });
160
193
 
161
- return false;
162
- });
163
- selectedOptions = x;
194
+ if (def.debug) {
195
+ console.log('selected options:', x);
196
+ }
197
+ selectedOptions = x;
198
+ } catch (e) {
199
+ if (dev || def.debug) {
200
+ console.log(e);
201
+ }
202
+ }
164
203
  });
165
204
  } else if (isNumeric) {
166
205
  if (
@@ -315,7 +354,6 @@
315
354
 
316
355
  <QuerySelect
317
356
  valueAsObject={false}
318
- {label}
319
357
  clearable
320
358
  name={customFilter?.objectName ?? 'Item'}
321
359
  valueProp="value"
@@ -336,7 +374,6 @@
336
374
 
337
375
  <QuerySelect
338
376
  valueAsObject={true}
339
- {label}
340
377
  clearable
341
378
  name={customFilter?.objectName ?? 'Item'}
342
379
  valueProp="value"
@@ -6,7 +6,6 @@
6
6
  import NumberInput from '../../NumberInput.svelte';
7
7
  import SingleSelect from '../../SingleSelect.svelte';
8
8
  import TextInput from '../../TextInput.svelte';
9
- import { generateShortUUID } from '../../../Helpers/Helpers.svelte.js';
10
9
  import { getContext, onMount, untrack } from 'svelte';
11
10
  import { ColumnType } from '../Types/Columns/ColumnType.js';
12
11
  import { AccessorType } from '../Types/Columns/Definitions/Accessors/AccessorType.js';
@@ -144,10 +143,10 @@
144
143
  if (isRemoteSelect && !tableContext.paginationRepo?.filtering) {
145
144
  return;
146
145
  }
146
+ void filteringStateValue;
147
147
  if (def.debug) {
148
148
  console.log('filtering state value:', $state.snapshot(filteringStateValue));
149
149
  }
150
- void filteringStateValue;
151
150
 
152
151
  if (hasQuery) {
153
152
  if (def.debug) {
@@ -159,7 +158,9 @@
159
158
  // as unknown as string | number | undefined;
160
159
 
161
160
  if (filteringStateValue != undefined) {
162
- console.log(`query values:`, tableContext.dataRepo.__queryValues);
161
+ if (def.debug) {
162
+ console.log(`query values:`, tableContext.dataRepo.__queryValues);
163
+ }
163
164
  const x = tableContext.dataRepo.__queryValues.get(
164
165
  customFilter?.id ??
165
166
  customFilter?.label ??
@@ -206,7 +207,9 @@
206
207
  }
207
208
  selectedOptions = x;
208
209
  } catch (e) {
209
- console.warn(e);
210
+ if (dev || def.debug) {
211
+ console.log(e);
212
+ }
210
213
  }
211
214
  });
212
215
  } else if (isNumeric) {
@@ -116,7 +116,7 @@ dialog .modal-main {
116
116
  overflow: auto;
117
117
  }
118
118
  dialog .modal-main.noscroll {
119
- overflow: visible;
119
+ overflow: auto;
120
120
  }
121
121
  dialog .footer {
122
122
  flex-shrink: 0;
@@ -146,7 +146,7 @@ dialog .modal-main {
146
146
  overflow: auto;
147
147
  }
148
148
  dialog .modal-main.noscroll {
149
- overflow: visible;
149
+ overflow: auto;
150
150
  }
151
151
  dialog .footer {
152
152
  flex-shrink: 0;
@@ -129,7 +129,7 @@ dialog .modal-main {
129
129
  overflow: auto;
130
130
  }
131
131
  dialog .modal-main.noscroll {
132
- overflow: visible;
132
+ overflow: auto;
133
133
  }
134
134
  dialog .footer {
135
135
  flex-shrink: 0;
@@ -172,7 +172,7 @@ dialog .modal-main {
172
172
  overflow: auto;
173
173
  }
174
174
  dialog .modal-main.noscroll {
175
- overflow: visible;
175
+ overflow: auto;
176
176
  }
177
177
  dialog .footer {
178
178
  flex-shrink: 0;
@@ -405,7 +405,7 @@
405
405
  overflow: auto;
406
406
 
407
407
  &.noscroll {
408
- overflow: visible;
408
+ overflow: auto;
409
409
  }
410
410
  }
411
411
  .footer {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lavalogic/scoria",
3
3
  "description": "Svelte components used for the FloWMS Web Frontend",
4
- "version": "0.5.5",
4
+ "version": "0.5.7",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },