@lavalogic/scoria 0.16.1 → 0.16.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.
@@ -1,6 +1,9 @@
1
1
  <svelte:options runes />
2
2
 
3
- <script lang="ts" generics="T extends object">
3
+ <script
4
+ lang="ts"
5
+ generics="T extends object"
6
+ >
4
7
  import { dev } from '$app/environment';
5
8
  import { devCatch, generateShortUUID } from '../../../../Helpers/Helpers.svelte.js';
6
9
  import { getContext, untrack } from 'svelte';
@@ -96,26 +99,29 @@
96
99
  export const trHeight = {
97
100
  get value() {
98
101
  return _trHeight;
99
- }
102
+ },
100
103
  };
101
104
 
102
105
  $effect(() => {
103
- if (trRef) {
104
- const observer = new ResizeObserver((entries) => {
105
- if (customHeight) {
106
- _trHeight = 0;
107
- } else {
108
- _trHeight = entries[0].borderBoxSize[0].blockSize;
109
- }
110
- });
111
- observer.observe(trRef);
106
+ void trRef;
107
+ return untrack(() => {
108
+ if (trRef) {
109
+ const observer = new ResizeObserver((entries) => {
110
+ if (customHeight) {
111
+ _trHeight = 0;
112
+ } else {
113
+ _trHeight = entries[0].borderBoxSize[0].blockSize;
114
+ }
115
+ });
116
+ observer.observe(trRef);
112
117
 
113
- const currentTrRef = trRef;
114
- return () => {
115
- observer.unobserve(currentTrRef);
116
- };
117
- }
118
- return () => {};
118
+ const currentTrRef = trRef;
119
+ return () => {
120
+ observer.unobserve(currentTrRef);
121
+ };
122
+ }
123
+ return () => {};
124
+ });
119
125
  });
120
126
 
121
127
  // let innerTrRef: HTMLTableRowElement | undefined = $state();
@@ -163,7 +169,11 @@ onMouseLeave={onMouseLeave} -->
163
169
  />
164
170
  {/if}
165
171
  {#each cells as cell (cell)}
166
- <TableColumn {cell} {expandedColumnDef} {onExpandChange} />
172
+ <TableColumn
173
+ {cell}
174
+ {expandedColumnDef}
175
+ {onExpandChange}
176
+ />
167
177
  {/each}
168
178
  </tr>
169
179
 
@@ -177,7 +187,10 @@ onMouseLeave={onMouseLeave} -->
177
187
  {:then data}
178
188
  {#if data && data.length}
179
189
  {@const options = expandedColumnDef.innerTableOptions}
180
- <td class="no-padding" {colspan}>
190
+ <td
191
+ class="no-padding"
192
+ {colspan}
193
+ >
181
194
  {#if innerTableName}
182
195
  {#key innerTableName}
183
196
  <NestedTable
@@ -1,6 +1,6 @@
1
1
  import type { CustomRemoteFilters } from '../Filtering/CustomRemoteFilters.js';
2
2
  import type { ColumnDef } from './Definitions/ColumnDef.svelte.js';
3
3
  export interface DefsWrapper<T extends object> {
4
- defs: Array<ColumnDef<T>>;
4
+ defs: Array<ColumnDef<T, never>>;
5
5
  remoteFilters?: CustomRemoteFilters<unknown>;
6
6
  }
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.16.1",
4
+ "version": "0.16.2",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },