intelliwaketssveltekitv25 1.0.53 → 1.0.55
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/ArrayTable.svelte +12 -2
- package/dist/Functions.d.ts +4 -1
- package/dist/Functions.js +33 -37
- package/dist/SlideDown.svelte +1 -1
- package/package.json +6 -6
package/dist/ArrayTable.svelte
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
SortColumnUpdate,
|
|
18
18
|
ToUpperCaseWords
|
|
19
19
|
} from '@solidbasisventures/intelliwaketsfoundation'
|
|
20
|
+
import { onMount } from 'svelte'
|
|
20
21
|
|
|
21
22
|
let {
|
|
22
23
|
arrayData,
|
|
@@ -40,11 +41,20 @@
|
|
|
40
41
|
|
|
41
42
|
let sorter = $state<ISortColumn<T>>({
|
|
42
43
|
...initialSortColumn,
|
|
43
|
-
primarySort:
|
|
44
|
-
primaryAscending:
|
|
44
|
+
primarySort: null,
|
|
45
|
+
primaryAscending: true,
|
|
45
46
|
empty_to_bottom: false
|
|
46
47
|
})
|
|
47
48
|
|
|
49
|
+
onMount(() => {
|
|
50
|
+
sorter = {
|
|
51
|
+
...initialSortColumn,
|
|
52
|
+
primarySort: arrayStructure.defaultSortColumn ?? null,
|
|
53
|
+
primaryAscending: arrayStructure.defaultSortAscending ?? true,
|
|
54
|
+
empty_to_bottom: false
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
|
|
48
58
|
|
|
49
59
|
let validColumns = $derived(ValidColumns(arrayData, arrayStructure))
|
|
50
60
|
|
package/dist/Functions.d.ts
CHANGED
|
@@ -34,7 +34,10 @@ export declare const DoIDsMatch: (a: any, b: any) => boolean;
|
|
|
34
34
|
* - `update(nextEnabled: boolean)`: Updates the enabled state.
|
|
35
35
|
* - `destroy()`: Cancels the auto-focus behavior and cleans up resources.
|
|
36
36
|
*/
|
|
37
|
-
export declare function autoFocus(el: HTMLElement | HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement
|
|
37
|
+
export declare function autoFocus(el: HTMLElement | HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement, enabled?: boolean): {
|
|
38
|
+
update(nextEnabled: boolean): void;
|
|
39
|
+
destroy(): void;
|
|
40
|
+
};
|
|
38
41
|
export declare function autoGrow(node: HTMLTextAreaElement, _value?: string | null): {
|
|
39
42
|
update(): void;
|
|
40
43
|
destroy(): void;
|
package/dist/Functions.js
CHANGED
|
@@ -184,46 +184,42 @@ export const DoIDsMatch = (a, b) => IsEqual(a, b) || IsEqual(a?.id, b?.id);
|
|
|
184
184
|
* - `update(nextEnabled: boolean)`: Updates the enabled state.
|
|
185
185
|
* - `destroy()`: Cancels the auto-focus behavior and cleans up resources.
|
|
186
186
|
*/
|
|
187
|
+
export function autoFocus(el, enabled = true) {
|
|
188
|
+
let cancelled = false;
|
|
189
|
+
async function run() {
|
|
190
|
+
if (!enabled)
|
|
191
|
+
return;
|
|
192
|
+
await tick();
|
|
193
|
+
if (cancelled)
|
|
194
|
+
return;
|
|
195
|
+
// Avoid focusing detached nodes
|
|
196
|
+
if (!el.isConnected)
|
|
197
|
+
return;
|
|
198
|
+
// Sometimes modals need the next frame (transitions/portals)
|
|
199
|
+
requestAnimationFrame(() => {
|
|
200
|
+
if (!cancelled)
|
|
201
|
+
el.focus();
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
void run();
|
|
205
|
+
return {
|
|
206
|
+
update(nextEnabled) {
|
|
207
|
+
enabled = nextEnabled;
|
|
208
|
+
void run();
|
|
209
|
+
},
|
|
210
|
+
destroy() {
|
|
211
|
+
cancelled = true;
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
}
|
|
187
215
|
// export function autoFocus(
|
|
188
|
-
// el: HTMLElement | HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement
|
|
189
|
-
// enabled: boolean = true
|
|
216
|
+
// el: HTMLElement | HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | never
|
|
190
217
|
// ) {
|
|
191
|
-
//
|
|
192
|
-
//
|
|
193
|
-
//
|
|
194
|
-
//
|
|
195
|
-
//
|
|
196
|
-
// await tick()
|
|
197
|
-
// if (cancelled) return
|
|
198
|
-
//
|
|
199
|
-
// // Avoid focusing detached nodes
|
|
200
|
-
// if (!el.isConnected) return
|
|
201
|
-
//
|
|
202
|
-
// // Sometimes modals need the next frame (transitions/portals)
|
|
203
|
-
// requestAnimationFrame(() => {
|
|
204
|
-
// if (!cancelled) el.focus()
|
|
205
|
-
// })
|
|
206
|
-
// }
|
|
207
|
-
//
|
|
208
|
-
// void run()
|
|
209
|
-
//
|
|
210
|
-
// return {
|
|
211
|
-
// update(nextEnabled: boolean) {
|
|
212
|
-
// enabled = nextEnabled
|
|
213
|
-
// void run()
|
|
214
|
-
// },
|
|
215
|
-
// destroy() {
|
|
216
|
-
// cancelled = true
|
|
217
|
-
// }
|
|
218
|
-
// }
|
|
218
|
+
// tick().then(() => {
|
|
219
|
+
// if (!el) console.error('autoFocus el not available')
|
|
220
|
+
// el?.focus()
|
|
221
|
+
// })
|
|
219
222
|
// }
|
|
220
|
-
export function autoFocus(el) {
|
|
221
|
-
tick().then(() => {
|
|
222
|
-
if (!el)
|
|
223
|
-
console.error('autoFocus el not available');
|
|
224
|
-
el?.focus();
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
223
|
export function autoGrow(node, _value) {
|
|
228
224
|
let userResized = false;
|
|
229
225
|
let pointerDown = false;
|
package/dist/SlideDown.svelte
CHANGED
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
if (show) scrollToActive()
|
|
136
136
|
})
|
|
137
137
|
|
|
138
|
-
const ddStyle = !maxHeight ? undefined : `max-height: ${maxHeight as string};`
|
|
138
|
+
const ddStyle = $derived(!maxHeight ? undefined : `max-height: ${maxHeight as string};`)
|
|
139
139
|
|
|
140
140
|
let indentsExist = $derived(!!ddActions?.some(ddAction => ddAction.active && ddAction.indented))
|
|
141
141
|
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intelliwaketssveltekitv25",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@solidbasisventures/intelliwaketsfoundation": "^5.13.14",
|
|
18
18
|
"@sveltejs/kit": "^2.49.2",
|
|
19
|
-
"svelte": "^5.
|
|
19
|
+
"svelte": "^5.46.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@solidbasisventures/intelliwaketsfoundation": "^5.13.14",
|
|
23
|
-
"@sveltejs/kit": "^2.49.
|
|
24
|
-
"svelte": "^5.
|
|
23
|
+
"@sveltejs/kit": "^2.49.2",
|
|
24
|
+
"svelte": "^5.46.0",
|
|
25
25
|
"@chromatic-com/storybook": "^3.2.6",
|
|
26
26
|
"@eslint/compat": "^1.2.9",
|
|
27
27
|
"@eslint/js": "^9.26.0",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"@vitest/coverage-v8": "^3.1.3",
|
|
48
48
|
"eslint": "^9.26.0",
|
|
49
49
|
"eslint-config-prettier": "^10.1.5",
|
|
50
|
-
"eslint-plugin-svelte": "^3.13.
|
|
50
|
+
"eslint-plugin-svelte": "^3.13.1",
|
|
51
51
|
"globals": "^16.1.0",
|
|
52
52
|
"jsdom": "^26.1.0",
|
|
53
53
|
"playwright": "^1.52.0",
|
|
54
54
|
"prettier": "^3.5.3",
|
|
55
|
-
"prettier-plugin-svelte": "^3.4.
|
|
55
|
+
"prettier-plugin-svelte": "^3.4.1",
|
|
56
56
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
57
57
|
"publint": "^0.3.12",
|
|
58
58
|
"storybook": "^8.6.12",
|