@gradio/dataset 0.1.26 → 0.1.28

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @gradio/dataset
2
2
 
3
+ ## 0.1.28
4
+
5
+ ### Dependency updates
6
+
7
+ - @gradio/atoms@0.6.1
8
+ - @gradio/upload@0.8.2
9
+
10
+ ## 0.1.27
11
+
12
+ ### Fixes
13
+
14
+ - [#7761](https://github.com/gradio-app/gradio/pull/7761) [`ca42748`](https://github.com/gradio-app/gradio/commit/ca42748590536e1d940b44ec7c9b6ea402905707) - Ensure `paginate` updates when samples value changes in `Dataset`. Thanks @hannahblair!
15
+
16
+ ### Dependency updates
17
+
18
+ - @gradio/upload@0.8.1
19
+ - @gradio/atoms@0.6.0
20
+
3
21
  ## 0.1.26
4
22
 
5
23
  ### Fixes
package/Index.svelte CHANGED
@@ -51,6 +51,7 @@
51
51
  }
52
52
 
53
53
  $: {
54
+ paginate = samples.length > samples_per_page;
54
55
  if (paginate) {
55
56
  visible_pages = [];
56
57
  selected_samples = samples.slice(
@@ -83,18 +84,19 @@
83
84
 
84
85
  async function get_component_meta(selected_samples: any[][]): Promise<void> {
85
86
  component_meta = await Promise.all(
86
- selected_samples.map(
87
- async (sample_row) =>
88
- await Promise.all(
89
- sample_row.map(async (sample_cell, j) => {
90
- return {
91
- value: sample_cell,
92
- component: (await component_map.get(components[j]))
93
- ?.default as ComponentType<SvelteComponent>
94
- };
95
- })
96
- )
97
- )
87
+ selected_samples &&
88
+ selected_samples.map(
89
+ async (sample_row) =>
90
+ await Promise.all(
91
+ sample_row.map(async (sample_cell, j) => {
92
+ return {
93
+ value: sample_cell,
94
+ component: (await component_map.get(components[j]))
95
+ ?.default as ComponentType<SvelteComponent>
96
+ };
97
+ })
98
+ )
99
+ )
98
100
  );
99
101
  }
100
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/dataset",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -12,9 +12,9 @@
12
12
  "./package.json": "./package.json"
13
13
  },
14
14
  "dependencies": {
15
+ "@gradio/atoms": "^0.6.1",
16
+ "@gradio/upload": "^0.8.2",
15
17
  "@gradio/client": "^0.14.0",
16
- "@gradio/atoms": "^0.5.3",
17
- "@gradio/upload": "^0.8.0",
18
18
  "@gradio/utils": "^0.3.0"
19
19
  }
20
20
  }