@dosgato/dialog 0.0.61 → 0.0.62

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.
@@ -80,7 +80,7 @@ onMount(async () => {
80
80
  const previewId = randomid();
81
81
  </script>
82
82
 
83
- <Dialog size="xl" ignoreTabs title={label} on:escape continueText="Choose" disabled={!$preview && required} cancelText="Cancel" on:continue={onChoose}>
83
+ <Dialog size="xl" ignoreTabs title={label} on:escape continueText="Choose" disabled={!$preview && required} cancelText="Cancel">
84
84
  <section class="dialog-chooser-window">
85
85
  <header class="dialog-chooser-controls">
86
86
  {#if $sources.length > 1}
@@ -106,7 +106,7 @@ const previewId = randomid();
106
106
  <Button class="upload" disabled={$selected?.type !== 'folder' || !(chooserClient.mayUpload?.($selected) ?? true)} on:click={() => { showuploader = true }}>Upload</Button>
107
107
  {/if}
108
108
  <Button cancel {describedby} on:click={() => dispatch('escape')}>Cancel</Button>
109
- <Button class="primary" disabled={!$preview && required} describedby={previewId} on:click={() => dispatch('continue')}>Choose</Button>
109
+ <Button class="primary" disabled={!$preview && required} describedby={previewId} on:click={onChoose}>Choose</Button>
110
110
  </svelte:fragment>
111
111
  {#if showuploader && $selected?.type === 'folder' && chooserClient.upload}
112
112
  <UploadUI title="Upload to {$selected.path}" folder={$selected} uploader={chooserClient.upload.bind(chooserClient)} on:escape={() => { showuploader = false }} on:saved={onUploadComplete}/>
@@ -18,7 +18,6 @@ declare class __sveltets_Render<F> {
18
18
  };
19
19
  events(): {
20
20
  escape: CustomEvent<any>;
21
- continue: CustomEvent<any>;
22
21
  change: CustomEvent<any>;
23
22
  } & {
24
23
  [evt: string]: CustomEvent<any>;
@@ -47,6 +47,8 @@ async function onUploadSubmit() {
47
47
  for (let i = 0; i < uploadList.length; i++) {
48
48
  data.append('file' + i, uploadList[i]);
49
49
  }
50
+ // TODO: accept new list of children from uploader function and feed it
51
+ // to the tree instead of refreshing the tree
50
52
  await uploader(folder, uploadList, ratio => { uploadProgress = ratio; });
51
53
  uploadList = [];
52
54
  uploadError = undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dosgato/dialog",
3
3
  "description": "A component library for building forms that edit a JSON document.",
4
- "version": "0.0.61",
4
+ "version": "0.0.62",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",
7
7
  "dev": "vite dev --force",