@dosgato/dialog 0.0.71 → 0.0.73

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.
@@ -1,8 +1,8 @@
1
- <script>import applicationOutline from '@iconify-icons/mdi/application-outline';
1
+ <script>import browserIcon from '@iconify-icons/ph/browser';
2
2
  import folderIcon from '@iconify-icons/ph/folder';
3
3
  import folderNotchOpen from '@iconify-icons/ph/folder-notch-open';
4
4
  import { createEventDispatcher, getContext, onMount, setContext } from 'svelte';
5
- import { isNotBlank, randomid, sleep } from 'txstate-utils';
5
+ import { isNotBlank, randomid } from 'txstate-utils';
6
6
  import { Button, Dialog, iconForMime, Tabs, Tree, UploadUI } from '..';
7
7
  import { CHOOSER_API_CONTEXT } from './ChooserAPI';
8
8
  import { CHOOSER_STORE_CONTEXT, ChooserStore } from './ChooserStore';
@@ -90,7 +90,7 @@ const previewId = randomid();
90
90
  <section class="dialog-chooser-chooser">
91
91
  {#if $store.initialized}
92
92
  <Tree headers={[
93
- { label: 'Path', id: 'name', grow: 4, icon: item => ({ icon: item.type === 'asset' ? iconForMime(item.mime) : (item.type === 'folder' ? (item.open ? folderNotchOpen : folderIcon) : applicationOutline) }), get: 'name' }
93
+ { label: 'Path', id: 'name', grow: 4, icon: item => ({ icon: item.type === 'asset' ? iconForMime(item.mime) : (item.type === 'folder' ? (item.open ? folderNotchOpen : folderIcon) : browserIcon) }), get: 'name' }
94
94
  ]} singleSelect store={treeStore} on:deselect={onDeselect} on:choose={onChoose} />
95
95
  {/if}
96
96
  </section>
@@ -203,7 +203,9 @@ export class TreeStore extends ActiveStore {
203
203
  }
204
204
  async openAndRefresh(item, notify = true) {
205
205
  await this.refresh(item, true);
206
- this.value.itemsById[item.id].open = !!item.children?.length;
206
+ const newItem = this.value.itemsById[item.id];
207
+ newItem.open = !!newItem.children?.length;
208
+ item.open = newItem.open;
207
209
  if (notify)
208
210
  this.trigger();
209
211
  }
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.71",
4
+ "version": "0.0.73",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",
7
7
  "dev": "vite dev --force",