@dosgato/dialog 0.0.44 → 0.0.46
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/{FieldHidden.svelte → dist/FieldHidden.svelte} +3 -1
- package/{FieldHidden.svelte.d.ts → dist/FieldHidden.svelte.d.ts} +3 -1
- package/{chooser → dist/chooser}/Chooser.svelte +3 -3
- package/dist/fileIcons.js +47 -0
- package/{tree → dist/tree}/treestore.js +1 -1
- package/package.json +24 -70
- package/fileIcons.js +0 -47
- /package/{Button.svelte → dist/Button.svelte} +0 -0
- /package/{Button.svelte.d.ts → dist/Button.svelte.d.ts} +0 -0
- /package/{ButtonGroup.svelte → dist/ButtonGroup.svelte} +0 -0
- /package/{ButtonGroup.svelte.d.ts → dist/ButtonGroup.svelte.d.ts} +0 -0
- /package/{Checkbox.svelte → dist/Checkbox.svelte} +0 -0
- /package/{Checkbox.svelte.d.ts → dist/Checkbox.svelte.d.ts} +0 -0
- /package/{Container.svelte → dist/Container.svelte} +0 -0
- /package/{Container.svelte.d.ts → dist/Container.svelte.d.ts} +0 -0
- /package/{Dialog.svelte → dist/Dialog.svelte} +0 -0
- /package/{Dialog.svelte.d.ts → dist/Dialog.svelte.d.ts} +0 -0
- /package/{FieldAutocomplete.svelte → dist/FieldAutocomplete.svelte} +0 -0
- /package/{FieldAutocomplete.svelte.d.ts → dist/FieldAutocomplete.svelte.d.ts} +0 -0
- /package/{FieldCheckbox.svelte → dist/FieldCheckbox.svelte} +0 -0
- /package/{FieldCheckbox.svelte.d.ts → dist/FieldCheckbox.svelte.d.ts} +0 -0
- /package/{FieldChoices.svelte → dist/FieldChoices.svelte} +0 -0
- /package/{FieldChoices.svelte.d.ts → dist/FieldChoices.svelte.d.ts} +0 -0
- /package/{FieldChooserLink.svelte → dist/FieldChooserLink.svelte} +0 -0
- /package/{FieldChooserLink.svelte.d.ts → dist/FieldChooserLink.svelte.d.ts} +0 -0
- /package/{FieldCodeEditor.svelte → dist/FieldCodeEditor.svelte} +0 -0
- /package/{FieldCodeEditor.svelte.d.ts → dist/FieldCodeEditor.svelte.d.ts} +0 -0
- /package/{FieldDate.svelte → dist/FieldDate.svelte} +0 -0
- /package/{FieldDate.svelte.d.ts → dist/FieldDate.svelte.d.ts} +0 -0
- /package/{FieldDateTime.svelte → dist/FieldDateTime.svelte} +0 -0
- /package/{FieldDateTime.svelte.d.ts → dist/FieldDateTime.svelte.d.ts} +0 -0
- /package/{FieldDualListbox.svelte → dist/FieldDualListbox.svelte} +0 -0
- /package/{FieldDualListbox.svelte.d.ts → dist/FieldDualListbox.svelte.d.ts} +0 -0
- /package/{FieldIdentifier.svelte → dist/FieldIdentifier.svelte} +0 -0
- /package/{FieldIdentifier.svelte.d.ts → dist/FieldIdentifier.svelte.d.ts} +0 -0
- /package/{FieldMultiple.svelte → dist/FieldMultiple.svelte} +0 -0
- /package/{FieldMultiple.svelte.d.ts → dist/FieldMultiple.svelte.d.ts} +0 -0
- /package/{FieldMultiselect.svelte → dist/FieldMultiselect.svelte} +0 -0
- /package/{FieldMultiselect.svelte.d.ts → dist/FieldMultiselect.svelte.d.ts} +0 -0
- /package/{FieldNumber.svelte → dist/FieldNumber.svelte} +0 -0
- /package/{FieldNumber.svelte.d.ts → dist/FieldNumber.svelte.d.ts} +0 -0
- /package/{FieldRadio.svelte → dist/FieldRadio.svelte} +0 -0
- /package/{FieldRadio.svelte.d.ts → dist/FieldRadio.svelte.d.ts} +0 -0
- /package/{FieldSelect.svelte → dist/FieldSelect.svelte} +0 -0
- /package/{FieldSelect.svelte.d.ts → dist/FieldSelect.svelte.d.ts} +0 -0
- /package/{FieldStandard.svelte → dist/FieldStandard.svelte} +0 -0
- /package/{FieldStandard.svelte.d.ts → dist/FieldStandard.svelte.d.ts} +0 -0
- /package/{FieldText.svelte → dist/FieldText.svelte} +0 -0
- /package/{FieldText.svelte.d.ts → dist/FieldText.svelte.d.ts} +0 -0
- /package/{FieldTextArea.svelte → dist/FieldTextArea.svelte} +0 -0
- /package/{FieldTextArea.svelte.d.ts → dist/FieldTextArea.svelte.d.ts} +0 -0
- /package/{FileIcon.svelte → dist/FileIcon.svelte} +0 -0
- /package/{FileIcon.svelte.d.ts → dist/FileIcon.svelte.d.ts} +0 -0
- /package/{Form.svelte → dist/Form.svelte} +0 -0
- /package/{Form.svelte.d.ts → dist/Form.svelte.d.ts} +0 -0
- /package/{FormDialog.svelte → dist/FormDialog.svelte} +0 -0
- /package/{FormDialog.svelte.d.ts → dist/FormDialog.svelte.d.ts} +0 -0
- /package/{Icon.svelte → dist/Icon.svelte} +0 -0
- /package/{Icon.svelte.d.ts → dist/Icon.svelte.d.ts} +0 -0
- /package/{InlineMessage.svelte → dist/InlineMessage.svelte} +0 -0
- /package/{InlineMessage.svelte.d.ts → dist/InlineMessage.svelte.d.ts} +0 -0
- /package/{InlineMessages.svelte → dist/InlineMessages.svelte} +0 -0
- /package/{InlineMessages.svelte.d.ts → dist/InlineMessages.svelte.d.ts} +0 -0
- /package/{Input.svelte → dist/Input.svelte} +0 -0
- /package/{Input.svelte.d.ts → dist/Input.svelte.d.ts} +0 -0
- /package/{Listbox.svelte → dist/Listbox.svelte} +0 -0
- /package/{Listbox.svelte.d.ts → dist/Listbox.svelte.d.ts} +0 -0
- /package/{Radio.svelte → dist/Radio.svelte} +0 -0
- /package/{Radio.svelte.d.ts → dist/Radio.svelte.d.ts} +0 -0
- /package/{Switcher.svelte → dist/Switcher.svelte} +0 -0
- /package/{Switcher.svelte.d.ts → dist/Switcher.svelte.d.ts} +0 -0
- /package/{Tab.svelte → dist/Tab.svelte} +0 -0
- /package/{Tab.svelte.d.ts → dist/Tab.svelte.d.ts} +0 -0
- /package/{TabStore.d.ts → dist/TabStore.d.ts} +0 -0
- /package/{TabStore.js → dist/TabStore.js} +0 -0
- /package/{Tabs.svelte → dist/Tabs.svelte} +0 -0
- /package/{Tabs.svelte.d.ts → dist/Tabs.svelte.d.ts} +0 -0
- /package/{chooser → dist/chooser}/Chooser.svelte.d.ts +0 -0
- /package/{chooser → dist/chooser}/ChooserAPI.d.ts +0 -0
- /package/{chooser → dist/chooser}/ChooserAPI.js +0 -0
- /package/{chooser → dist/chooser}/ChooserStore.d.ts +0 -0
- /package/{chooser → dist/chooser}/ChooserStore.js +0 -0
- /package/{chooser → dist/chooser}/Details.svelte +0 -0
- /package/{chooser → dist/chooser}/Details.svelte.d.ts +0 -0
- /package/{chooser → dist/chooser}/Thumbnail.svelte +0 -0
- /package/{chooser → dist/chooser}/Thumbnail.svelte.d.ts +0 -0
- /package/{chooser → dist/chooser}/index.d.ts +0 -0
- /package/{chooser → dist/chooser}/index.js +0 -0
- /package/{colorpicker → dist/colorpicker}/FieldColorPicker.svelte +0 -0
- /package/{colorpicker → dist/colorpicker}/FieldColorPicker.svelte.d.ts +0 -0
- /package/{colorpicker → dist/colorpicker}/colorpicker.d.ts +0 -0
- /package/{colorpicker → dist/colorpicker}/colorpicker.js +0 -0
- /package/{colorpicker → dist/colorpicker}/index.d.ts +0 -0
- /package/{colorpicker → dist/colorpicker}/index.js +0 -0
- /package/{cropper → dist/cropper}/FieldCropper.svelte +0 -0
- /package/{cropper → dist/cropper}/FieldCropper.svelte.d.ts +0 -0
- /package/{cropper → dist/cropper}/cropper.d.ts +0 -0
- /package/{cropper → dist/cropper}/cropper.js +0 -0
- /package/{cropper → dist/cropper}/index.d.ts +0 -0
- /package/{cropper → dist/cropper}/index.js +0 -0
- /package/{fileIcons.d.ts → dist/fileIcons.d.ts} +0 -0
- /package/{helpers.d.ts → dist/helpers.d.ts} +0 -0
- /package/{helpers.js → dist/helpers.js} +0 -0
- /package/{iconpicker → dist/iconpicker}/FieldIconPicker.svelte +0 -0
- /package/{iconpicker → dist/iconpicker}/FieldIconPicker.svelte.d.ts +0 -0
- /package/{iconpicker → dist/iconpicker}/iconpicker.d.ts +0 -0
- /package/{iconpicker → dist/iconpicker}/iconpicker.js +0 -0
- /package/{iconpicker → dist/iconpicker}/index.d.ts +0 -0
- /package/{iconpicker → dist/iconpicker}/index.js +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{tree → dist/tree}/LoadIcon.svelte +0 -0
- /package/{tree → dist/tree}/LoadIcon.svelte.d.ts +0 -0
- /package/{tree → dist/tree}/Tree.svelte +0 -0
- /package/{tree → dist/tree}/Tree.svelte.d.ts +0 -0
- /package/{tree → dist/tree}/TreeCell.svelte +0 -0
- /package/{tree → dist/tree}/TreeCell.svelte.d.ts +0 -0
- /package/{tree → dist/tree}/TreeNode.svelte +0 -0
- /package/{tree → dist/tree}/TreeNode.svelte.d.ts +0 -0
- /package/{tree → dist/tree}/index.d.ts +0 -0
- /package/{tree → dist/tree}/index.js +0 -0
- /package/{tree → dist/tree}/treestore.d.ts +0 -0
|
@@ -5,6 +5,8 @@ export let id = undefined;
|
|
|
5
5
|
export let path;
|
|
6
6
|
export let value = '';
|
|
7
7
|
export let notNull = false;
|
|
8
|
+
export let boolean = false;
|
|
9
|
+
export let number = false;
|
|
8
10
|
export let conditional = undefined;
|
|
9
11
|
const store = getContext(FORM_CONTEXT);
|
|
10
12
|
const inheritedPath = getContext(FORM_INHERITED_PATH);
|
|
@@ -12,6 +14,6 @@ const finalPath = [inheritedPath, path].filter(isNotBlank).join('.');
|
|
|
12
14
|
$: store.setField(finalPath, value);
|
|
13
15
|
</script>
|
|
14
16
|
|
|
15
|
-
<Field {path} {conditional} serialize={!notNull ? nullableSerialize : undefined} deserialize={!notNull ? nullableDeserialize : undefined} let:value>
|
|
17
|
+
<Field {path} {conditional} {boolean} {number} serialize={!notNull ? nullableSerialize : undefined} deserialize={!notNull ? nullableDeserialize : undefined} let:value>
|
|
16
18
|
<input type="hidden" name={path} {value} {id}>
|
|
17
19
|
</Field>
|
|
@@ -3,8 +3,10 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
id?: string | undefined;
|
|
5
5
|
path: string;
|
|
6
|
-
value?: string | undefined;
|
|
6
|
+
value?: string | number | boolean | undefined;
|
|
7
7
|
notNull?: boolean | undefined;
|
|
8
|
+
boolean?: boolean | undefined;
|
|
9
|
+
number?: boolean | undefined;
|
|
8
10
|
conditional?: boolean | undefined;
|
|
9
11
|
};
|
|
10
12
|
events: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import applicationOutline from '@iconify-icons/mdi/application-outline';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import folderIcon from '@iconify-icons/ph/folder';
|
|
3
|
+
import folderNotchOpen from '@iconify-icons/ph/folder-notch-open';
|
|
4
4
|
import { derivedStore } from '@txstate-mws/svelte-store';
|
|
5
5
|
import { createEventDispatcher, getContext, onMount, setContext } from 'svelte';
|
|
6
6
|
import { isNotBlank } from 'txstate-utils';
|
|
@@ -94,7 +94,7 @@ onMount(async () => {
|
|
|
94
94
|
<section class="dialog-chooser-chooser">
|
|
95
95
|
{#if $store.initialized}
|
|
96
96
|
<Tree headers={[
|
|
97
|
-
{ label: 'Path', id: 'name', grow: 4, icon: item => item.type === 'asset' ? iconForMime(item.mime) : (item.type === 'folder' ? (item.open ?
|
|
97
|
+
{ label: 'Path', id: 'name', grow: 4, icon: item => item.type === 'asset' ? iconForMime(item.mime) : (item.type === 'folder' ? (item.open ? folderNotchOpen : folderIcon) : applicationOutline), get: 'name' }
|
|
98
98
|
]} singleSelect store={treeStore} on:deselect={onDeselect} on:choose={onChoose} />
|
|
99
99
|
{/if}
|
|
100
100
|
</section>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import archive from '@iconify-icons/ph/archive.js';
|
|
2
|
+
import fileCode from '@iconify-icons/ph/file-code.js';
|
|
3
|
+
import fileText from '@iconify-icons/ph/file-text.js';
|
|
4
|
+
import fileAudio from '@iconify-icons/ph/file-audio.js';
|
|
5
|
+
import filePdf from '@iconify-icons/ph/file-pdf';
|
|
6
|
+
import fileIcon from '@iconify-icons/ph/file.js';
|
|
7
|
+
import fileCsv from '@iconify-icons/ph/file-csv.js';
|
|
8
|
+
import fileVideo from '@iconify-icons/ph/file-video.js';
|
|
9
|
+
import fileImage from '@iconify-icons/ph/file-image.js';
|
|
10
|
+
import microsoftExcel from '@iconify-icons/ph/file-xls.js';
|
|
11
|
+
import microsoftWord from '@iconify-icons/ph/file-doc.js';
|
|
12
|
+
const fileIconsByMime = {
|
|
13
|
+
'application/vnd.ms-excel': microsoftExcel,
|
|
14
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': microsoftExcel,
|
|
15
|
+
'application/vnd.oasis.opendocument.spreadsheet': microsoftExcel,
|
|
16
|
+
'text/csv': fileCsv,
|
|
17
|
+
'application/msword': microsoftWord,
|
|
18
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': microsoftWord,
|
|
19
|
+
'application/vnd.oasis.opendocument.text': microsoftWord,
|
|
20
|
+
'application/rtf': microsoftWord,
|
|
21
|
+
'application/pdf': filePdf,
|
|
22
|
+
'application/json': fileCode,
|
|
23
|
+
'application/x-httpd-php': fileCode,
|
|
24
|
+
'application/x-sh': fileCode,
|
|
25
|
+
'application/xml': fileCode,
|
|
26
|
+
'text/css': fileCode,
|
|
27
|
+
'text/html': fileCode,
|
|
28
|
+
'text/javascript': fileCode,
|
|
29
|
+
'application/gzip': archive,
|
|
30
|
+
'application/java-archive': archive,
|
|
31
|
+
'application/zip': archive,
|
|
32
|
+
'application/vnd.apple.installer+xml': archive,
|
|
33
|
+
'application/vnd.rar': archive,
|
|
34
|
+
'application/x-7z-compressed': archive,
|
|
35
|
+
'application/x-bzip': archive,
|
|
36
|
+
'application/x-bzip2': archive,
|
|
37
|
+
'application/x-tar': archive
|
|
38
|
+
};
|
|
39
|
+
const prefixes = {
|
|
40
|
+
image: fileImage,
|
|
41
|
+
text: fileText,
|
|
42
|
+
video: fileVideo,
|
|
43
|
+
audio: fileAudio
|
|
44
|
+
};
|
|
45
|
+
export function iconForMime(mime) {
|
|
46
|
+
return fileIconsByMime[mime] ?? prefixes[mime.split('/', 2)[0]] ?? fileIcon;
|
|
47
|
+
}
|
|
@@ -313,7 +313,7 @@ export class TreeStore extends ActiveStore {
|
|
|
313
313
|
this.trigger();
|
|
314
314
|
}
|
|
315
315
|
pasteEligible(above = false) {
|
|
316
|
-
return this.value.copied.size && this.pasteEffect(above) !== 'none';
|
|
316
|
+
return this.value.copied.size && (this.value.cut ? this.pasteEffect(above) === 'move' : this.pasteEffect(above) !== 'none');
|
|
317
317
|
}
|
|
318
318
|
pasteEffect(above = false) {
|
|
319
319
|
return this._dropEffect(this.value.selectedItems[0], this.value.copied, above, !this.value.cut);
|
package/package.json
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
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.
|
|
4
|
+
"version": "0.0.46",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"prepublishOnly": "svelte-package",
|
|
7
|
+
"dev": "vite dev --force",
|
|
8
|
+
"package": "svelte-package",
|
|
9
|
+
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
10
|
+
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
|
11
|
+
"lint": "eslint --ignore-path .gitignore ."
|
|
12
|
+
},
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"svelte": "./dist/index.js",
|
|
18
|
+
"import": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
5
22
|
"dependencies": {
|
|
6
23
|
"@txstate-mws/svelte-components": "^1.3.9",
|
|
7
24
|
"@txstate-mws/svelte-forms": "^1.3.4",
|
|
@@ -12,11 +29,11 @@
|
|
|
12
29
|
"txstate-utils": "^1.8.0"
|
|
13
30
|
},
|
|
14
31
|
"devDependencies": {
|
|
15
|
-
"@sveltejs/adapter-auto": "^
|
|
32
|
+
"@sveltejs/adapter-auto": "^2.0.0",
|
|
16
33
|
"@sveltejs/kit": "^1.0.1",
|
|
17
|
-
"@sveltejs/package": "^
|
|
34
|
+
"@sveltejs/package": "^2.0.1",
|
|
18
35
|
"@types/codeflask": "^1.4.3",
|
|
19
|
-
"eslint-config-standard-with-typescript": "^
|
|
36
|
+
"eslint-config-standard-with-typescript": "^34.0.0",
|
|
20
37
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
21
38
|
"svelte-check": "^3.0.1",
|
|
22
39
|
"svelte-preprocess": "^5.0.0",
|
|
@@ -27,69 +44,6 @@
|
|
|
27
44
|
"peerDependencies": {
|
|
28
45
|
"svelte": "^3.53.1"
|
|
29
46
|
},
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
"./Button.svelte": "./Button.svelte",
|
|
34
|
-
"./ButtonGroup.svelte": "./ButtonGroup.svelte",
|
|
35
|
-
"./Checkbox.svelte": "./Checkbox.svelte",
|
|
36
|
-
"./Container.svelte": "./Container.svelte",
|
|
37
|
-
"./Dialog.svelte": "./Dialog.svelte",
|
|
38
|
-
"./FieldAutocomplete.svelte": "./FieldAutocomplete.svelte",
|
|
39
|
-
"./FieldCheckbox.svelte": "./FieldCheckbox.svelte",
|
|
40
|
-
"./FieldChoices.svelte": "./FieldChoices.svelte",
|
|
41
|
-
"./FieldChooserLink.svelte": "./FieldChooserLink.svelte",
|
|
42
|
-
"./FieldCodeEditor.svelte": "./FieldCodeEditor.svelte",
|
|
43
|
-
"./FieldDate.svelte": "./FieldDate.svelte",
|
|
44
|
-
"./FieldDateTime.svelte": "./FieldDateTime.svelte",
|
|
45
|
-
"./FieldDualListbox.svelte": "./FieldDualListbox.svelte",
|
|
46
|
-
"./FieldHidden.svelte": "./FieldHidden.svelte",
|
|
47
|
-
"./FieldIdentifier.svelte": "./FieldIdentifier.svelte",
|
|
48
|
-
"./FieldMultiple.svelte": "./FieldMultiple.svelte",
|
|
49
|
-
"./FieldMultiselect.svelte": "./FieldMultiselect.svelte",
|
|
50
|
-
"./FieldNumber.svelte": "./FieldNumber.svelte",
|
|
51
|
-
"./FieldRadio.svelte": "./FieldRadio.svelte",
|
|
52
|
-
"./FieldSelect.svelte": "./FieldSelect.svelte",
|
|
53
|
-
"./FieldStandard.svelte": "./FieldStandard.svelte",
|
|
54
|
-
"./FieldText.svelte": "./FieldText.svelte",
|
|
55
|
-
"./FieldTextArea.svelte": "./FieldTextArea.svelte",
|
|
56
|
-
"./FileIcon.svelte": "./FileIcon.svelte",
|
|
57
|
-
"./Form.svelte": "./Form.svelte",
|
|
58
|
-
"./FormDialog.svelte": "./FormDialog.svelte",
|
|
59
|
-
"./Icon.svelte": "./Icon.svelte",
|
|
60
|
-
"./InlineMessage.svelte": "./InlineMessage.svelte",
|
|
61
|
-
"./InlineMessages.svelte": "./InlineMessages.svelte",
|
|
62
|
-
"./Input.svelte": "./Input.svelte",
|
|
63
|
-
"./Listbox.svelte": "./Listbox.svelte",
|
|
64
|
-
"./Radio.svelte": "./Radio.svelte",
|
|
65
|
-
"./Switcher.svelte": "./Switcher.svelte",
|
|
66
|
-
"./Tab.svelte": "./Tab.svelte",
|
|
67
|
-
"./TabStore": "./TabStore.js",
|
|
68
|
-
"./Tabs.svelte": "./Tabs.svelte",
|
|
69
|
-
"./chooser/Chooser.svelte": "./chooser/Chooser.svelte",
|
|
70
|
-
"./chooser/ChooserAPI": "./chooser/ChooserAPI.js",
|
|
71
|
-
"./chooser/ChooserStore": "./chooser/ChooserStore.js",
|
|
72
|
-
"./chooser/Details.svelte": "./chooser/Details.svelte",
|
|
73
|
-
"./chooser/Thumbnail.svelte": "./chooser/Thumbnail.svelte",
|
|
74
|
-
"./chooser": "./chooser/index.js",
|
|
75
|
-
"./colorpicker/FieldColorPicker.svelte": "./colorpicker/FieldColorPicker.svelte",
|
|
76
|
-
"./colorpicker/colorpicker": "./colorpicker/colorpicker.js",
|
|
77
|
-
"./colorpicker": "./colorpicker/index.js",
|
|
78
|
-
"./cropper/FieldCropper.svelte": "./cropper/FieldCropper.svelte",
|
|
79
|
-
"./cropper/cropper": "./cropper/cropper.js",
|
|
80
|
-
"./cropper": "./cropper/index.js",
|
|
81
|
-
"./fileIcons": "./fileIcons.js",
|
|
82
|
-
"./helpers": "./helpers.js",
|
|
83
|
-
"./iconpicker/FieldIconPicker.svelte": "./iconpicker/FieldIconPicker.svelte",
|
|
84
|
-
"./iconpicker/iconpicker": "./iconpicker/iconpicker.js",
|
|
85
|
-
"./iconpicker": "./iconpicker/index.js",
|
|
86
|
-
".": "./index.js",
|
|
87
|
-
"./tree/LoadIcon.svelte": "./tree/LoadIcon.svelte",
|
|
88
|
-
"./tree/Tree.svelte": "./tree/Tree.svelte",
|
|
89
|
-
"./tree/TreeCell.svelte": "./tree/TreeCell.svelte",
|
|
90
|
-
"./tree/TreeNode.svelte": "./tree/TreeNode.svelte",
|
|
91
|
-
"./tree": "./tree/index.js",
|
|
92
|
-
"./tree/treestore": "./tree/treestore.js"
|
|
93
|
-
},
|
|
94
|
-
"svelte": "./index.js"
|
|
95
|
-
}
|
|
47
|
+
"files": ["dist"],
|
|
48
|
+
"type": "module"
|
|
49
|
+
}
|
package/fileIcons.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import archiveLight from '@iconify-icons/ph/archive-light.js';
|
|
2
|
-
import fileCodeLight from '@iconify-icons/ph/file-code-light.js';
|
|
3
|
-
import fileTextLight from '@iconify-icons/ph/file-text-light.js';
|
|
4
|
-
import fileAudioLight from '@iconify-icons/ph/file-audio-light.js';
|
|
5
|
-
import filePdfLight from '@iconify-icons/ph/file-pdf-light';
|
|
6
|
-
import fileLight from '@iconify-icons/ph/file-light.js';
|
|
7
|
-
import fileCsvLight from '@iconify-icons/ph/file-csv-light.js';
|
|
8
|
-
import fileVideoLight from '@iconify-icons/ph/file-video-light.js';
|
|
9
|
-
import fileImageLight from '@iconify-icons/ph/file-image-light.js';
|
|
10
|
-
import microsoftExcel from '@iconify-icons/ph/file-xls-light.js';
|
|
11
|
-
import microsoftWord from '@iconify-icons/ph/file-doc-light.js';
|
|
12
|
-
const fileIconsByMime = {
|
|
13
|
-
'application/vnd.ms-excel': microsoftExcel,
|
|
14
|
-
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': microsoftExcel,
|
|
15
|
-
'application/vnd.oasis.opendocument.spreadsheet': microsoftExcel,
|
|
16
|
-
'text/csv': fileCsvLight,
|
|
17
|
-
'application/msword': microsoftWord,
|
|
18
|
-
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': microsoftWord,
|
|
19
|
-
'application/vnd.oasis.opendocument.text': microsoftWord,
|
|
20
|
-
'application/rtf': microsoftWord,
|
|
21
|
-
'application/pdf': filePdfLight,
|
|
22
|
-
'application/json': fileCodeLight,
|
|
23
|
-
'application/x-httpd-php': fileCodeLight,
|
|
24
|
-
'application/x-sh': fileCodeLight,
|
|
25
|
-
'application/xml': fileCodeLight,
|
|
26
|
-
'text/css': fileCodeLight,
|
|
27
|
-
'text/html': fileCodeLight,
|
|
28
|
-
'text/javascript': fileCodeLight,
|
|
29
|
-
'application/gzip': archiveLight,
|
|
30
|
-
'application/java-archive': archiveLight,
|
|
31
|
-
'application/zip': archiveLight,
|
|
32
|
-
'application/vnd.apple.installer+xml': archiveLight,
|
|
33
|
-
'application/vnd.rar': archiveLight,
|
|
34
|
-
'application/x-7z-compressed': archiveLight,
|
|
35
|
-
'application/x-bzip': archiveLight,
|
|
36
|
-
'application/x-bzip2': archiveLight,
|
|
37
|
-
'application/x-tar': archiveLight
|
|
38
|
-
};
|
|
39
|
-
const prefixes = {
|
|
40
|
-
image: fileImageLight,
|
|
41
|
-
text: fileTextLight,
|
|
42
|
-
video: fileVideoLight,
|
|
43
|
-
audio: fileAudioLight
|
|
44
|
-
};
|
|
45
|
-
export function iconForMime(mime) {
|
|
46
|
-
return fileIconsByMime[mime] ?? prefixes[mime.split('/', 2)[0]] ?? fileLight;
|
|
47
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|