sveltekit-ui 1.0.14 → 1.0.16

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.
@@ -13,7 +13,7 @@
13
13
  import SortByInput from "./SortByInput/index.svelte"
14
14
  import ColumnInput from "./ColumnInput/index.svelte"
15
15
 
16
- let { manager } = $props()
16
+ let { manager, header_extra } = $props()
17
17
  </script>
18
18
 
19
19
  {#if Array.isArray(manager?.nav_items) && manager?.nav_items.length > 0}
@@ -100,6 +100,9 @@
100
100
  {#if manager?.is_more_to_load && manager?.nav_items.includes("load_more")}
101
101
  <Button manager={manager?.load_more_button_manager} />
102
102
  {/if}
103
+ {#if header_extra}
104
+ {@render header_extra()}
105
+ {/if}
103
106
  </div>
104
107
  {/if}
105
108
 
@@ -2,7 +2,7 @@ import { create_popover_manager } from "../Popover/index.svelte.js"
2
2
  import { create_button_manager } from "../Button/index.svelte.js"
3
3
  import { create_text_input_manager } from "../TextInput/index.svelte.js"
4
4
  import { create_dropdown_manager } from "../Dropdown/index.svelte.js"
5
- import { set_closurable, get_data_type_at_path } from "../../client/index.js"
5
+ import { deep_copy } from "../../client/index.js"
6
6
 
7
7
  export function create_variable_path_input_manager(config) {
8
8
  let popover_manager = $state(null)
@@ -13,12 +13,14 @@ export function create_variable_path_input_manager(config) {
13
13
  let def_dropdown_manager = $state(null)
14
14
  let levels_nested = $state(null)
15
15
  let path_prepped = $state(null)
16
- let val = $derived(
17
- def_dropdown_manager?.val
16
+ let val = $derived(get_val())
17
+ let val_text = $derived(val_to_text(val))
18
+
19
+ function get_val() {
20
+ return def_dropdown_manager?.val
18
21
  ? [def_dropdown_manager?.val, ...(Array.isArray(path_prepped) ? path_prepped.map((h) => h?.val) : [])]
19
22
  : []
20
- )
21
- let val_text = $derived(val_to_text(val))
23
+ }
22
24
 
23
25
  function prep_path(input) {
24
26
  console.log("prep_path", input)
@@ -49,6 +51,7 @@ export function create_variable_path_input_manager(config) {
49
51
  is_uniform: true,
50
52
  support_icon: "x",
51
53
  on_click: () => {
54
+ let val = get_val()
52
55
  prep_path(Array.isArray(val) ? val.filter((_, idx) => idx !== i) : null)
53
56
  },
54
57
  })
@@ -56,12 +59,14 @@ export function create_variable_path_input_manager(config) {
56
59
  type: "outlined",
57
60
  is_uniform: true,
58
61
  support_icon: "plus",
59
- on_click: () =>
62
+ on_click: () => {
63
+ let val = get_val()
60
64
  prep_path([
61
65
  ...(Array.isArray(val) ? val.slice(0, i) : []),
62
66
  null,
63
67
  ...(Array.isArray(val) ? val.slice(i) : []),
64
- ]),
68
+ ])
69
+ },
65
70
  })
66
71
  let const_string_value_text_input_manager = create_text_input_manager({
67
72
  label: "Property",
@@ -201,10 +206,8 @@ export function create_variable_path_input_manager(config) {
201
206
  is_button_compressed: true,
202
207
  val: input?.val?.[0],
203
208
  on_dropdown_opened: () => {
204
- console.log("open_def", typeof config?.get_defined_options)
205
209
  if (typeof config?.get_defined_options == "function") {
206
210
  defined_options = config?.get_defined_options()
207
- console.log("get_defined_options", defined_options)
208
211
  def_dropdown_manager.set_options(defined_options)
209
212
  }
210
213
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sveltekit-ui",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "A SvelteKit UI component library for building modern web applications",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,19 +19,19 @@
19
19
  "dependencies": {
20
20
  "context-filter-polyfill": "^0.3.23",
21
21
  "qr-code-styling": "^1.9.2",
22
- "svelte": "^5.37.3"
22
+ "svelte": "^5.38.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@sveltejs/kit": "^2.22.2"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@sveltejs/adapter-vercel": "^5.8.1",
29
- "@sveltejs/kit": "^2.27.0",
29
+ "@sveltejs/kit": "^2.27.2",
30
30
  "@sveltejs/package": "^2.4.0",
31
31
  "@sveltejs/vite-plugin-svelte": "^6.1.0",
32
32
  "@vercel/analytics": "^1.5.0",
33
33
  "typescript": "^5.9.2",
34
- "vite": "^7.0.6"
34
+ "vite": "^7.1.0"
35
35
  },
36
36
  "homepage": "https://www.sveltekit-ui.com",
37
37
  "keywords": [
@@ -13,7 +13,7 @@
13
13
  import SortByInput from "$lib/Components/TableAdvanced/SortByInput/index.svelte"
14
14
  import ColumnInput from "$lib/Components/TableAdvanced/ColumnInput/index.svelte"
15
15
 
16
- let { manager } = $props()
16
+ let { manager, header_extra } = $props()
17
17
  </script>
18
18
 
19
19
  {#if Array.isArray(manager?.nav_items) && manager?.nav_items.length > 0}
@@ -100,6 +100,9 @@
100
100
  {#if manager?.is_more_to_load && manager?.nav_items.includes("load_more")}
101
101
  <Button manager={manager?.load_more_button_manager} />
102
102
  {/if}
103
+ {#if header_extra}
104
+ {@render header_extra()}
105
+ {/if}
103
106
  </div>
104
107
  {/if}
105
108
 
@@ -2,7 +2,7 @@ import { create_popover_manager } from "$lib/Components/Popover/index.svelte.js"
2
2
  import { create_button_manager } from "$lib/Components/Button/index.svelte.js"
3
3
  import { create_text_input_manager } from "$lib/Components/TextInput/index.svelte.js"
4
4
  import { create_dropdown_manager } from "$lib/Components/Dropdown/index.svelte.js"
5
- import { set_closurable, get_data_type_at_path } from "$lib/client/index.js"
5
+ import { deep_copy } from "$lib/client/index.js"
6
6
 
7
7
  export function create_variable_path_input_manager(config) {
8
8
  let popover_manager = $state(null)
@@ -13,12 +13,14 @@ export function create_variable_path_input_manager(config) {
13
13
  let def_dropdown_manager = $state(null)
14
14
  let levels_nested = $state(null)
15
15
  let path_prepped = $state(null)
16
- let val = $derived(
17
- def_dropdown_manager?.val
16
+ let val = $derived(get_val())
17
+ let val_text = $derived(val_to_text(val))
18
+
19
+ function get_val() {
20
+ return def_dropdown_manager?.val
18
21
  ? [def_dropdown_manager?.val, ...(Array.isArray(path_prepped) ? path_prepped.map((h) => h?.val) : [])]
19
22
  : []
20
- )
21
- let val_text = $derived(val_to_text(val))
23
+ }
22
24
 
23
25
  function prep_path(input) {
24
26
  console.log("prep_path", input)
@@ -49,6 +51,7 @@ export function create_variable_path_input_manager(config) {
49
51
  is_uniform: true,
50
52
  support_icon: "x",
51
53
  on_click: () => {
54
+ let val = get_val()
52
55
  prep_path(Array.isArray(val) ? val.filter((_, idx) => idx !== i) : null)
53
56
  },
54
57
  })
@@ -56,12 +59,14 @@ export function create_variable_path_input_manager(config) {
56
59
  type: "outlined",
57
60
  is_uniform: true,
58
61
  support_icon: "plus",
59
- on_click: () =>
62
+ on_click: () => {
63
+ let val = get_val()
60
64
  prep_path([
61
65
  ...(Array.isArray(val) ? val.slice(0, i) : []),
62
66
  null,
63
67
  ...(Array.isArray(val) ? val.slice(i) : []),
64
- ]),
68
+ ])
69
+ },
65
70
  })
66
71
  let const_string_value_text_input_manager = create_text_input_manager({
67
72
  label: "Property",
@@ -201,10 +206,8 @@ export function create_variable_path_input_manager(config) {
201
206
  is_button_compressed: true,
202
207
  val: input?.val?.[0],
203
208
  on_dropdown_opened: () => {
204
- console.log("open_def", typeof config?.get_defined_options)
205
209
  if (typeof config?.get_defined_options == "function") {
206
210
  defined_options = config?.get_defined_options()
207
- console.log("get_defined_options", defined_options)
208
211
  def_dropdown_manager.set_options(defined_options)
209
212
  }
210
213
  },