@milaboratories/uikit 2.2.23 → 2.2.24
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/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import { useEventListener } from '@/composition/useEventListener';
|
|
3
|
+
import type { ImportedFiles } from '@/types';
|
|
4
4
|
import { between, notEmpty, tapIf } from '@milaboratories/helpers';
|
|
5
5
|
import type { StorageHandle } from '@platforma-sdk/model';
|
|
6
|
-
import
|
|
7
|
-
import { getFilePathBreadcrumbs, normalizeExtensions, type FileDialogItem } from './utils';
|
|
6
|
+
import { computed, onMounted, reactive, toRef, watch } from 'vue';
|
|
8
7
|
import { PlDropdown } from '../PlDropdown';
|
|
9
|
-
import { useEventListener } from '@/composition/useEventListener';
|
|
10
|
-
import { defaultData, useVisibleItems, vTextOverflown } from './remote';
|
|
11
|
-
import { PlSearchField } from '../PlSearchField';
|
|
12
8
|
import { PlIcon16 } from '../PlIcon16';
|
|
9
|
+
import { PlSearchField } from '../PlSearchField';
|
|
10
|
+
import style from './pl-file-dialog.module.scss';
|
|
11
|
+
import { defaultData, useVisibleItems, vTextOverflown } from './remote';
|
|
12
|
+
import { getFilePathBreadcrumbs, normalizeExtensions, type FileDialogItem } from './utils';
|
|
13
13
|
|
|
14
14
|
// note that on a Mac, a click combined with the control key is intercepted by the operating system and used to open a context menu, so ctrlKey is not detectable on click events.
|
|
15
15
|
const isCtrlOrMeta = (ev: KeyboardEvent | MouseEvent) => ev.ctrlKey || ev.metaKey;
|
|
@@ -189,22 +189,18 @@ const loadAvailableStorages = () => {
|
|
|
189
189
|
window.platforma.lsDriver
|
|
190
190
|
.getStorageList()
|
|
191
191
|
.then((storageEntries) => {
|
|
192
|
+
// local storage is always returned by the ML, so we need to remove it from remote dialog manually
|
|
193
|
+
storageEntries = storageEntries.filter((it) => it.name !== 'local' && !it.name.startsWith('local_disk_'));
|
|
194
|
+
|
|
192
195
|
data.storageOptions = storageEntries.map((it) => ({
|
|
193
196
|
text: it.name,
|
|
194
197
|
value: it,
|
|
195
198
|
}));
|
|
196
199
|
|
|
197
200
|
if (props.autoSelectStorage) {
|
|
198
|
-
tapIf(
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
e.name === 'local' || // the only local storage on unix systems
|
|
202
|
-
(e.name.startsWith('local_disk_') && e.initialFullPath.length > 4),
|
|
203
|
-
), // local drive where home folder is stored, normally C:\
|
|
204
|
-
(entry) => {
|
|
205
|
-
data.storageEntry = entry;
|
|
206
|
-
},
|
|
207
|
-
);
|
|
201
|
+
tapIf(storageEntries[0], (entry) => {
|
|
202
|
+
data.storageEntry = entry;
|
|
203
|
+
});
|
|
208
204
|
}
|
|
209
205
|
})
|
|
210
206
|
.catch((err) => (data.error = String(err)));
|