@gradio/file 0.11.0 → 0.11.1

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,19 @@
1
1
  # @gradio/file
2
2
 
3
+ ## 0.11.1
4
+
5
+ ### Fixes
6
+
7
+ - [#9946](https://github.com/gradio-app/gradio/pull/9946) [`a966e9f`](https://github.com/gradio-app/gradio/commit/a966e9f753af25eb9d813dfdbce39be6f3014d82) - Hide upload button after upload when `file_count="single"`. Thanks @abidlabs!
8
+
9
+ ### Dependency updates
10
+
11
+ - @gradio/atoms@0.11.1
12
+ - @gradio/client@1.8.0
13
+ - @gradio/utils@0.8.0
14
+ - @gradio/upload@0.14.1
15
+ - @gradio/statustracker@0.9.5
16
+
3
17
  ## 0.11.0
4
18
 
5
19
  ### Features
@@ -45,21 +45,23 @@ $:
45
45
 
46
46
  {#if value && (Array.isArray(value) ? value.length > 0 : true)}
47
47
  <IconButtonWrapper>
48
- <IconButton Icon={UploadIcon} label={i18n("common.upload")}>
49
- <Upload
50
- icon_upload={true}
51
- on:load={handle_upload}
52
- filetype={file_types}
53
- {file_count}
54
- {max_file_size}
55
- {root}
56
- bind:dragging
57
- bind:uploading
58
- on:error
59
- {stream_handler}
60
- {upload}
61
- />
62
- </IconButton>
48
+ {#if !(file_count === "single" && (Array.isArray(value) ? value.length > 0 : value !== null))}
49
+ <IconButton Icon={UploadIcon} label={i18n("common.upload")}>
50
+ <Upload
51
+ icon_upload={true}
52
+ on:load={handle_upload}
53
+ filetype={file_types}
54
+ {file_count}
55
+ {max_file_size}
56
+ {root}
57
+ bind:dragging
58
+ bind:uploading
59
+ on:error
60
+ {stream_handler}
61
+ {upload}
62
+ />
63
+ </IconButton>
64
+ {/if}
63
65
  <IconButton
64
66
  Icon={Clear}
65
67
  label={i18n("common.clear")}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@gradio/file",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
7
7
  "license": "ISC",
8
8
  "private": false,
9
9
  "dependencies": {
10
- "@gradio/atoms": "^0.11.0",
11
- "@gradio/client": "^1.7.1",
12
- "@gradio/icons": "^0.8.1",
13
- "@gradio/statustracker": "^0.9.4",
14
- "@gradio/upload": "^0.14.0",
15
- "@gradio/utils": "^0.7.0",
16
- "@gradio/wasm": "^0.15.0"
10
+ "@gradio/atoms": "^0.11.1",
11
+ "@gradio/client": "^1.8.0",
12
+ "@gradio/statustracker": "^0.9.5",
13
+ "@gradio/utils": "^0.8.0",
14
+ "@gradio/upload": "^0.14.1",
15
+ "@gradio/wasm": "^0.15.0",
16
+ "@gradio/icons": "^0.8.1"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@gradio/preview": "^0.13.0"
@@ -61,21 +61,23 @@
61
61
 
62
62
  {#if value && (Array.isArray(value) ? value.length > 0 : true)}
63
63
  <IconButtonWrapper>
64
- <IconButton Icon={UploadIcon} label={i18n("common.upload")}>
65
- <Upload
66
- icon_upload={true}
67
- on:load={handle_upload}
68
- filetype={file_types}
69
- {file_count}
70
- {max_file_size}
71
- {root}
72
- bind:dragging
73
- bind:uploading
74
- on:error
75
- {stream_handler}
76
- {upload}
77
- />
78
- </IconButton>
64
+ {#if !(file_count === "single" && (Array.isArray(value) ? value.length > 0 : value !== null))}
65
+ <IconButton Icon={UploadIcon} label={i18n("common.upload")}>
66
+ <Upload
67
+ icon_upload={true}
68
+ on:load={handle_upload}
69
+ filetype={file_types}
70
+ {file_count}
71
+ {max_file_size}
72
+ {root}
73
+ bind:dragging
74
+ bind:uploading
75
+ on:error
76
+ {stream_handler}
77
+ {upload}
78
+ />
79
+ </IconButton>
80
+ {/if}
79
81
  <IconButton
80
82
  Icon={Clear}
81
83
  label={i18n("common.clear")}