@gradio/dataframe 0.20.1 → 0.20.2-dev.0
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 +14 -0
- package/Dataframe.stories.svelte +0 -25
- package/Index.svelte +2 -4
- package/dist/Index.svelte +2 -4
- package/dist/Index.svelte.d.ts +3 -7
- package/dist/shared/Table.svelte +8 -7
- package/dist/shared/Table.svelte.d.ts +1 -2
- package/dist/standalone/Index.svelte +1 -4
- package/dist/standalone/Index.svelte.d.ts +0 -2
- package/package.json +6 -6
- package/shared/Table.svelte +9 -7
- package/standalone/Index.svelte +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @gradio/dataframe
|
|
2
2
|
|
|
3
|
+
## 0.20.2-dev.0
|
|
4
|
+
|
|
5
|
+
### Dependency updates
|
|
6
|
+
|
|
7
|
+
- @gradio/upload@0.17.2-dev.0
|
|
8
|
+
- @gradio/client@2.0.0-dev.0
|
|
9
|
+
- @gradio/button@0.5.14-dev.0
|
|
10
|
+
|
|
11
|
+
## 0.20.1
|
|
12
|
+
|
|
13
|
+
### Dependency updates
|
|
14
|
+
|
|
15
|
+
- @gradio/client@1.19.1
|
|
16
|
+
|
|
3
17
|
## 0.20.1
|
|
4
18
|
|
|
5
19
|
### Fixes
|
package/Dataframe.stories.svelte
CHANGED
|
@@ -439,31 +439,6 @@
|
|
|
439
439
|
}}
|
|
440
440
|
/>
|
|
441
441
|
|
|
442
|
-
<Story
|
|
443
|
-
name="Dataframe with custom components"
|
|
444
|
-
args={{
|
|
445
|
-
values: [
|
|
446
|
-
[
|
|
447
|
-
"Absol G",
|
|
448
|
-
70,
|
|
449
|
-
"https://images.pokemontcg.io/pl3/1_hires.png",
|
|
450
|
-
"pl3-1",
|
|
451
|
-
"Supreme Victors"
|
|
452
|
-
]
|
|
453
|
-
],
|
|
454
|
-
datatype: ["str", "number", "image", "str", "str"],
|
|
455
|
-
headers: ["Pokemon", "HP", "Image", "ID", "Set"],
|
|
456
|
-
label: "Pokemon Cards",
|
|
457
|
-
col_count: [5, "fixed"],
|
|
458
|
-
row_count: [1, "dynamic"],
|
|
459
|
-
editable: true,
|
|
460
|
-
editable: true,
|
|
461
|
-
components: {
|
|
462
|
-
image: Image
|
|
463
|
-
}
|
|
464
|
-
}}
|
|
465
|
-
/>
|
|
466
|
-
|
|
467
442
|
<Story
|
|
468
443
|
name="Dataframe with row and column selection"
|
|
469
444
|
args={{
|
package/Index.svelte
CHANGED
|
@@ -51,9 +51,8 @@
|
|
|
51
51
|
export let max_height: number | undefined = undefined;
|
|
52
52
|
export let loading_status: LoadingStatus;
|
|
53
53
|
export let interactive: boolean;
|
|
54
|
-
export let
|
|
54
|
+
export let buttons: string[] | null = null;
|
|
55
55
|
export let max_chars: number | undefined = undefined;
|
|
56
|
-
export let show_copy_button = false;
|
|
57
56
|
export let show_row_numbers = false;
|
|
58
57
|
export let show_search: "none" | "search" | "filter" = "none";
|
|
59
58
|
export let pinned_columns = 0;
|
|
@@ -111,9 +110,8 @@
|
|
|
111
110
|
upload={(...args) => gradio.client.upload(...args)}
|
|
112
111
|
stream_handler={(...args) => gradio.client.stream(...args)}
|
|
113
112
|
bind:value_is_output
|
|
114
|
-
{
|
|
113
|
+
{buttons}
|
|
115
114
|
{max_chars}
|
|
116
|
-
{show_copy_button}
|
|
117
115
|
{show_row_numbers}
|
|
118
116
|
{show_search}
|
|
119
117
|
{pinned_columns}
|
package/dist/Index.svelte
CHANGED
|
@@ -33,9 +33,8 @@ export let latex_delimiters;
|
|
|
33
33
|
export let max_height = void 0;
|
|
34
34
|
export let loading_status;
|
|
35
35
|
export let interactive;
|
|
36
|
-
export let
|
|
36
|
+
export let buttons = null;
|
|
37
37
|
export let max_chars = void 0;
|
|
38
|
-
export let show_copy_button = false;
|
|
39
38
|
export let show_row_numbers = false;
|
|
40
39
|
export let show_search = "none";
|
|
41
40
|
export let pinned_columns = 0;
|
|
@@ -93,9 +92,8 @@ export let fullscreen = false;
|
|
|
93
92
|
upload={(...args) => gradio.client.upload(...args)}
|
|
94
93
|
stream_handler={(...args) => gradio.client.stream(...args)}
|
|
95
94
|
bind:value_is_output
|
|
96
|
-
{
|
|
95
|
+
{buttons}
|
|
97
96
|
{max_chars}
|
|
98
|
-
{show_copy_button}
|
|
99
97
|
{show_row_numbers}
|
|
100
98
|
{show_search}
|
|
101
99
|
{pinned_columns}
|
package/dist/Index.svelte.d.ts
CHANGED
|
@@ -38,9 +38,8 @@ declare const __propDef: {
|
|
|
38
38
|
max_height?: number | undefined;
|
|
39
39
|
loading_status: LoadingStatus;
|
|
40
40
|
interactive: boolean;
|
|
41
|
-
|
|
41
|
+
buttons?: string[] | null;
|
|
42
42
|
max_chars?: number | undefined;
|
|
43
|
-
show_copy_button?: boolean;
|
|
44
43
|
show_row_numbers?: boolean;
|
|
45
44
|
show_search?: "none" | "search" | "filter";
|
|
46
45
|
pinned_columns?: number;
|
|
@@ -143,15 +142,12 @@ export default class Index extends SvelteComponent<IndexProps, IndexEvents, Inde
|
|
|
143
142
|
get interactive(): boolean;
|
|
144
143
|
/**accessor*/
|
|
145
144
|
set interactive(_: boolean);
|
|
146
|
-
get
|
|
145
|
+
get buttons(): string[] | null | undefined;
|
|
147
146
|
/**accessor*/
|
|
148
|
-
set
|
|
147
|
+
set buttons(_: string[] | null | undefined);
|
|
149
148
|
get max_chars(): number | undefined;
|
|
150
149
|
/**accessor*/
|
|
151
150
|
set max_chars(_: number | undefined);
|
|
152
|
-
get show_copy_button(): boolean | undefined;
|
|
153
|
-
/**accessor*/
|
|
154
|
-
set show_copy_button(_: boolean | undefined);
|
|
155
151
|
get show_row_numbers(): boolean | undefined;
|
|
156
152
|
/**accessor*/
|
|
157
153
|
set show_row_numbers(_: boolean | undefined);
|
package/dist/shared/Table.svelte
CHANGED
|
@@ -53,8 +53,7 @@ export let column_widths = [];
|
|
|
53
53
|
export let show_row_numbers = false;
|
|
54
54
|
export let upload;
|
|
55
55
|
export let stream_handler;
|
|
56
|
-
export let
|
|
57
|
-
export let show_copy_button = false;
|
|
56
|
+
export let buttons = null;
|
|
58
57
|
export let value_is_output = false;
|
|
59
58
|
export let max_chars = void 0;
|
|
60
59
|
export let show_search = "none";
|
|
@@ -62,8 +61,8 @@ export let pinned_columns = 0;
|
|
|
62
61
|
export let static_columns = [];
|
|
63
62
|
export let fullscreen = false;
|
|
64
63
|
const df_ctx = create_dataframe_context({
|
|
65
|
-
show_fullscreen_button,
|
|
66
|
-
show_copy_button,
|
|
64
|
+
show_fullscreen_button: buttons === null ? true : buttons.includes("fullscreen"),
|
|
65
|
+
show_copy_button: buttons === null ? true : buttons.includes("copy"),
|
|
67
66
|
show_search,
|
|
68
67
|
show_row_numbers,
|
|
69
68
|
editable,
|
|
@@ -623,7 +622,7 @@ function get_cell_display_value(row, col) {
|
|
|
623
622
|
<svelte:window on:resize={() => set_cell_widths()} />
|
|
624
623
|
|
|
625
624
|
<div class="table-container">
|
|
626
|
-
{#if (label && label.length !== 0 && show_label) ||
|
|
625
|
+
{#if (label && label.length !== 0 && show_label) || (buttons === null ? true : buttons.includes("fullscreen")) || (buttons === null ? true : buttons.includes("copy")) || show_search !== "none"}
|
|
627
626
|
<div class="header-row">
|
|
628
627
|
{#if label && label.length !== 0 && show_label}
|
|
629
628
|
<div class="label">
|
|
@@ -631,10 +630,12 @@ function get_cell_display_value(row, col) {
|
|
|
631
630
|
</div>
|
|
632
631
|
{/if}
|
|
633
632
|
<Toolbar
|
|
634
|
-
{
|
|
633
|
+
show_fullscreen_button={buttons === null
|
|
634
|
+
? true
|
|
635
|
+
: buttons.includes("fullscreen")}
|
|
635
636
|
{fullscreen}
|
|
636
637
|
on_copy={async () => await copy_table_data(data, null)}
|
|
637
|
-
{
|
|
638
|
+
show_copy_button={buttons === null ? true : buttons.includes("copy")}
|
|
638
639
|
{show_search}
|
|
639
640
|
on:search={(e) => df_actions.handle_search(e.detail)}
|
|
640
641
|
on:fullscreen
|
|
@@ -29,8 +29,7 @@ declare const __propDef: {
|
|
|
29
29
|
show_row_numbers?: boolean;
|
|
30
30
|
upload: Client["upload"];
|
|
31
31
|
stream_handler: Client["stream"];
|
|
32
|
-
|
|
33
|
-
show_copy_button?: boolean;
|
|
32
|
+
buttons?: string[] | null;
|
|
34
33
|
value_is_output?: boolean;
|
|
35
34
|
max_chars?: number | undefined;
|
|
36
35
|
show_search?: "none" | "search" | "filter";
|
|
@@ -19,8 +19,6 @@ export let interactive = true;
|
|
|
19
19
|
export let show_row_numbers = false;
|
|
20
20
|
export let max_height = 500;
|
|
21
21
|
export let show_search = "none";
|
|
22
|
-
export let show_copy_button = false;
|
|
23
|
-
export let show_fullscreen_button = false;
|
|
24
22
|
export let wrap = false;
|
|
25
23
|
export let line_breaks = true;
|
|
26
24
|
export let column_widths = [];
|
|
@@ -72,8 +70,7 @@ onMount(() => {
|
|
|
72
70
|
{show_row_numbers}
|
|
73
71
|
{max_height}
|
|
74
72
|
{show_search}
|
|
75
|
-
{
|
|
76
|
-
{show_fullscreen_button}
|
|
73
|
+
buttons={null}
|
|
77
74
|
{wrap}
|
|
78
75
|
{line_breaks}
|
|
79
76
|
{column_widths}
|
|
@@ -10,8 +10,6 @@ declare const __propDef: {
|
|
|
10
10
|
show_row_numbers?: boolean;
|
|
11
11
|
max_height?: number;
|
|
12
12
|
show_search?: "none" | "search" | "filter";
|
|
13
|
-
show_copy_button?: boolean;
|
|
14
|
-
show_fullscreen_button?: boolean;
|
|
15
13
|
wrap?: boolean;
|
|
16
14
|
line_breaks?: boolean;
|
|
17
15
|
column_widths?: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/dataframe",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2-dev.0",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"@types/katex": "^0.16.0",
|
|
14
14
|
"d3-dsv": "^3.0.1",
|
|
15
15
|
"dequal": "^2.0.2",
|
|
16
|
+
"@gradio/button": "^0.5.14-dev.0",
|
|
16
17
|
"@gradio/atoms": "^0.18.1",
|
|
17
|
-
"@gradio/
|
|
18
|
-
"@gradio/checkbox": "^0.4.30",
|
|
19
|
-
"@gradio/markdown-code": "^0.5.2",
|
|
18
|
+
"@gradio/checkbox": "^0.4.31",
|
|
20
19
|
"@gradio/icons": "^0.14.0",
|
|
21
|
-
"@gradio/client": "^1.19.0",
|
|
22
20
|
"@gradio/statustracker": "^0.11.1",
|
|
23
|
-
"@gradio/upload": "^0.17.
|
|
21
|
+
"@gradio/upload": "^0.17.2-dev.0",
|
|
22
|
+
"@gradio/markdown-code": "^0.5.2",
|
|
23
|
+
"@gradio/client": "^2.0.0-dev.0",
|
|
24
24
|
"@gradio/utils": "^0.10.2"
|
|
25
25
|
},
|
|
26
26
|
"exports": {
|
package/shared/Table.svelte
CHANGED
|
@@ -76,8 +76,7 @@
|
|
|
76
76
|
export let show_row_numbers = false;
|
|
77
77
|
export let upload: Client["upload"];
|
|
78
78
|
export let stream_handler: Client["stream"];
|
|
79
|
-
export let
|
|
80
|
-
export let show_copy_button = false;
|
|
79
|
+
export let buttons: string[] | null = null;
|
|
81
80
|
export let value_is_output = false;
|
|
82
81
|
export let max_chars: number | undefined = undefined;
|
|
83
82
|
export let show_search: "none" | "search" | "filter" = "none";
|
|
@@ -86,8 +85,9 @@
|
|
|
86
85
|
export let fullscreen = false;
|
|
87
86
|
|
|
88
87
|
const df_ctx = create_dataframe_context({
|
|
89
|
-
show_fullscreen_button
|
|
90
|
-
|
|
88
|
+
show_fullscreen_button:
|
|
89
|
+
buttons === null ? true : buttons.includes("fullscreen"),
|
|
90
|
+
show_copy_button: buttons === null ? true : buttons.includes("copy"),
|
|
91
91
|
show_search,
|
|
92
92
|
show_row_numbers,
|
|
93
93
|
editable,
|
|
@@ -823,7 +823,7 @@
|
|
|
823
823
|
<svelte:window on:resize={() => set_cell_widths()} />
|
|
824
824
|
|
|
825
825
|
<div class="table-container">
|
|
826
|
-
{#if (label && label.length !== 0 && show_label) ||
|
|
826
|
+
{#if (label && label.length !== 0 && show_label) || (buttons === null ? true : buttons.includes("fullscreen")) || (buttons === null ? true : buttons.includes("copy")) || show_search !== "none"}
|
|
827
827
|
<div class="header-row">
|
|
828
828
|
{#if label && label.length !== 0 && show_label}
|
|
829
829
|
<div class="label">
|
|
@@ -831,10 +831,12 @@
|
|
|
831
831
|
</div>
|
|
832
832
|
{/if}
|
|
833
833
|
<Toolbar
|
|
834
|
-
{
|
|
834
|
+
show_fullscreen_button={buttons === null
|
|
835
|
+
? true
|
|
836
|
+
: buttons.includes("fullscreen")}
|
|
835
837
|
{fullscreen}
|
|
836
838
|
on_copy={async () => await copy_table_data(data, null)}
|
|
837
|
-
{
|
|
839
|
+
show_copy_button={buttons === null ? true : buttons.includes("copy")}
|
|
838
840
|
{show_search}
|
|
839
841
|
on:search={(e) => df_actions.handle_search(e.detail)}
|
|
840
842
|
on:fullscreen
|
package/standalone/Index.svelte
CHANGED
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
export let show_row_numbers = false;
|
|
25
25
|
export let max_height = 500;
|
|
26
26
|
export let show_search: "none" | "search" | "filter" = "none";
|
|
27
|
-
export let show_copy_button = false;
|
|
28
|
-
export let show_fullscreen_button = false;
|
|
29
27
|
export let wrap = false;
|
|
30
28
|
export let line_breaks = true;
|
|
31
29
|
export let column_widths: string[] = [];
|
|
@@ -100,8 +98,7 @@
|
|
|
100
98
|
{show_row_numbers}
|
|
101
99
|
{max_height}
|
|
102
100
|
{show_search}
|
|
103
|
-
{
|
|
104
|
-
{show_fullscreen_button}
|
|
101
|
+
buttons={null}
|
|
105
102
|
{wrap}
|
|
106
103
|
{line_breaks}
|
|
107
104
|
{column_widths}
|