@bexis2/bexis2-core-ui 0.0.16 → 0.0.18
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/.eslintignore +13 -0
- package/.eslintrc.cjs +20 -0
- package/.github/workflows/main.yml +44 -0
- package/.prettierignore +13 -0
- package/.prettierrc +9 -0
- package/package.json +4 -5
- package/playwright.config.ts +11 -0
- package/postcss.config.cjs +6 -0
- package/src/app.d.ts +11 -0
- package/src/app.html +15 -0
- package/src/app.postcss +2 -0
- package/src/index.test.ts +7 -0
- package/{dist → src/lib}/components/File/FileUploader.svelte +3 -3
- package/src/lib/components/ListView.svelte +13 -0
- package/src/lib/index.ts +15 -0
- package/src/lib/models/Models.ts +39 -0
- package/{dist/services/Api.js → src/lib/services/Api.ts} +58 -44
- package/src/lib/stores/apistore.ts +32 -0
- package/src/routes/+layout.js +5 -0
- package/src/routes/+layout.svelte +10 -0
- package/src/routes/+page.svelte +0 -0
- package/src/routes/test/+page.svelte +1 -0
- package/static/favicon.png +0 -0
- package/svelte.config.js +23 -0
- package/tailwind.config.cjs +9 -0
- package/tests/test.ts +6 -0
- package/tsconfig.json +19 -0
- package/vite.config.ts +9 -0
- package/dist/TableView.svelte.d.ts +0 -23
- package/dist/components/File/FileIcon.svelte.d.ts +0 -23
- package/dist/components/File/FileInfo.svelte.d.ts +0 -27
- package/dist/components/File/FileUploader.svelte.d.ts +0 -44
- package/dist/components/ListView.svelte +0 -6
- package/dist/components/ListView.svelte.d.ts +0 -14
- package/dist/components/Spinner/Spinner.svelte.d.ts +0 -23
- package/dist/index.d.ts +0 -9
- package/dist/index.js +0 -9
- package/dist/models/Models.d.ts +0 -31
- package/dist/models/Models.js +0 -1
- package/dist/services/Api.d.ts +0 -7
- package/dist/stores/apistore.d.ts +0 -4
- package/dist/stores/apistore.js +0 -22
- /package/{dist → src/lib}/TableView.svelte +0 -0
- /package/{dist → src/lib}/components/File/FileIcon.svelte +0 -0
- /package/{dist → src/lib}/components/File/FileInfo.svelte +0 -0
- /package/{dist → src/lib}/components/Spinner/Spinner.svelte +0 -0
- /package/{dist → src/lib}/css/core.ui.css +0 -0
- /package/{dist → src/lib}/css/themes/theme-bexis2.css +0 -0
- /package/{dist → src/lib}/css/themes/theme-crimson.css +0 -0
- /package/{dist → src/lib}/css/themes/theme-gold-nouveau.css +0 -0
- /package/{dist → src/lib}/css/themes/theme-hamlindigo.css +0 -0
- /package/{dist → src/lib}/css/themes/theme-modern.css +0 -0
- /package/{dist → src/lib}/css/themes/theme-rocket.css +0 -0
- /package/{dist → src/lib}/css/themes/theme-sahara.css +0 -0
- /package/{dist → src/lib}/css/themes/theme-seafoam.css +0 -0
- /package/{dist → src/lib}/css/themes/theme-seasonal.css +0 -0
- /package/{dist → src/lib}/css/themes/theme-skeleton.css +0 -0
- /package/{dist → src/lib}/css/themes/theme-vintage.css +0 -0
package/.eslintignore
ADDED
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
parser: '@typescript-eslint/parser',
|
|
4
|
+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
|
|
5
|
+
plugins: ['svelte3', '@typescript-eslint'],
|
|
6
|
+
ignorePatterns: ['*.cjs'],
|
|
7
|
+
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
|
|
8
|
+
settings: {
|
|
9
|
+
'svelte3/typescript': () => require('typescript')
|
|
10
|
+
},
|
|
11
|
+
parserOptions: {
|
|
12
|
+
sourceType: 'module',
|
|
13
|
+
ecmaVersion: 2020
|
|
14
|
+
},
|
|
15
|
+
env: {
|
|
16
|
+
browser: true,
|
|
17
|
+
es2017: true,
|
|
18
|
+
node: true
|
|
19
|
+
}
|
|
20
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: GitHub Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master # Set a branch name to trigger deployment
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
deploy:
|
|
11
|
+
runs-on: ubuntu-20.04 # Set platform for runner
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v2
|
|
16
|
+
|
|
17
|
+
- name: Setup Node
|
|
18
|
+
uses: actions/setup-node@v2
|
|
19
|
+
with:
|
|
20
|
+
node-version: '16'
|
|
21
|
+
|
|
22
|
+
- name: Cache pnpm modules
|
|
23
|
+
uses: actions/cache@v2
|
|
24
|
+
with:
|
|
25
|
+
path: ~/.pnpm-store
|
|
26
|
+
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
27
|
+
restore-keys: |
|
|
28
|
+
${{ runner.os }}-
|
|
29
|
+
- uses: pnpm/action-setup@v2.0.1
|
|
30
|
+
with:
|
|
31
|
+
version: 6.20.1
|
|
32
|
+
run_install: true
|
|
33
|
+
|
|
34
|
+
- run: pnpm i # Run install
|
|
35
|
+
- run: pnpm run build # Run build
|
|
36
|
+
- run: dir
|
|
37
|
+
- run: cp -a static/. ./build/ # Copy missing files to build folder
|
|
38
|
+
|
|
39
|
+
- name: Deploy
|
|
40
|
+
uses: peaceiris/actions-gh-pages@v3
|
|
41
|
+
if: ${{ github.ref == 'refs/heads/master' }}
|
|
42
|
+
with:
|
|
43
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
44
|
+
publish_dir: ./build # Copy all files from the build folder to the gh-page branch
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bexis2/bexis2-core-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
7
7
|
"package": "svelte-package",
|
|
8
8
|
"build": "vite build",
|
|
9
|
+
"build package": "svelte-kit sync && svelte-package --watch",
|
|
9
10
|
"preview": "vite preview",
|
|
10
11
|
"test": "playwright test",
|
|
11
12
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
@@ -21,8 +22,10 @@
|
|
|
21
22
|
"@playwright/test": "^1.28.1",
|
|
22
23
|
"@skeletonlabs/skeleton": "^1.2.5",
|
|
23
24
|
"@sveltejs/adapter-auto": "^2.0.0",
|
|
25
|
+
"@sveltejs/adapter-static": "^2.0.2",
|
|
24
26
|
"@sveltejs/kit": "^1.5.0",
|
|
25
27
|
"@sveltejs/package": "^2.0.2",
|
|
28
|
+
"svelte-fa": "^3.0.3",
|
|
26
29
|
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
27
30
|
"@typescript-eslint/parser": "^5.45.0",
|
|
28
31
|
"autoprefixer": "^10.4.14",
|
|
@@ -48,9 +51,6 @@
|
|
|
48
51
|
"directories": {
|
|
49
52
|
"test": "tests"
|
|
50
53
|
},
|
|
51
|
-
"files": [
|
|
52
|
-
"dist"
|
|
53
|
-
],
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@fortawesome/fontawesome-free": "^6.2.1",
|
|
56
56
|
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
59
59
|
"axios": "^1.2.1",
|
|
60
60
|
"svelte": "^3.54.0",
|
|
61
|
-
"svelte-fa": "^3.0.3",
|
|
62
61
|
"svelte-file-dropzone": "^2.0.1"
|
|
63
62
|
},
|
|
64
63
|
"author": "David Schöne",
|
package/src/app.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="@sveltejs/kit" />
|
|
2
|
+
|
|
3
|
+
// See https://kit.svelte.dev/docs/types#app
|
|
4
|
+
// for information about these interfaces
|
|
5
|
+
// and what to do when importing types
|
|
6
|
+
declare namespace App {
|
|
7
|
+
// interface Error {}
|
|
8
|
+
// interface Locals {}
|
|
9
|
+
// interface PageData {}
|
|
10
|
+
// interface Platform {}
|
|
11
|
+
}
|
package/src/app.html
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
10
|
+
%sveltekit.head%
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<div>%sveltekit.body%</div>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
package/src/app.postcss
ADDED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script lang="ts">
|
|
2
2
|
|
|
3
3
|
import type { FileUploaderModel, FileInfo, Files} from '../../models/Models.js'
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
import DropZone from "svelte-file-dropzone/Dropzone.svelte";
|
|
7
|
-
import
|
|
7
|
+
import Fa from 'svelte-fa/src/fa.svelte'
|
|
8
8
|
|
|
9
9
|
import Spinner from '../Spinner/Spinner.svelte';
|
|
10
10
|
import { createEventDispatcher } from 'svelte';
|
|
@@ -73,7 +73,7 @@ async function load()
|
|
|
73
73
|
|
|
74
74
|
// load menu froms server
|
|
75
75
|
const res = await Api.get(url);
|
|
76
|
-
model = await res.
|
|
76
|
+
model = await res.data();
|
|
77
77
|
|
|
78
78
|
console.log("fileupload",model);
|
|
79
79
|
|
package/src/lib/index.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
// Reexport your entry components here
|
|
3
|
+
import ListView from './components/ListView.svelte'
|
|
4
|
+
|
|
5
|
+
import TableView from './TableView.svelte'
|
|
6
|
+
import FileIcon from './components/File/FileIcon.svelte'
|
|
7
|
+
import FileInfo from './components/File/FileInfo.svelte'
|
|
8
|
+
import FileUploader from './components/File/FileUploader.svelte'
|
|
9
|
+
|
|
10
|
+
export {ListView,TableView, FileInfo, FileIcon, FileUploader }
|
|
11
|
+
|
|
12
|
+
export {Api} from './services/Api.js'
|
|
13
|
+
export {host,username,password,setApiConfig} from './stores/apistore.js'
|
|
14
|
+
|
|
15
|
+
export type {user, FileUploaderModel} from './models/Models.js'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
export interface FileInfo {
|
|
3
|
+
name:string,
|
|
4
|
+
type:string,
|
|
5
|
+
length:number,
|
|
6
|
+
description:string,
|
|
7
|
+
validationHash:string,
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export interface FileUploaderModel{
|
|
13
|
+
accept:string[],
|
|
14
|
+
existingFiles:FileInfo[],
|
|
15
|
+
descriptionType:number,
|
|
16
|
+
multiple:boolean,
|
|
17
|
+
maxSize:number,
|
|
18
|
+
lastModification:Date
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface Files {
|
|
22
|
+
accepted:Blob[],
|
|
23
|
+
rejected:Blob[]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export type user = {
|
|
28
|
+
name:string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface FileObj{
|
|
32
|
+
path:string,
|
|
33
|
+
lastModified:number,
|
|
34
|
+
lastModifiedDate:Date,
|
|
35
|
+
name:string,
|
|
36
|
+
size:number,
|
|
37
|
+
type:string,
|
|
38
|
+
webkitRelativePath:string
|
|
39
|
+
}
|
|
@@ -1,44 +1,58 @@
|
|
|
1
|
-
// Api.js
|
|
2
|
-
import axios from "axios";
|
|
3
|
-
import { host, username, password } from "../stores/apistore";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
// Api.js
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { host, username, password } from "../stores/apistore";
|
|
4
|
+
|
|
5
|
+
console.log("setup axios")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
// implement a method to execute all the request from here.
|
|
9
|
+
const apiRequest = (method, url, request) => {
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
// Create a instance of axios to use the same base url.
|
|
13
|
+
const axiosAPI = axios.create({
|
|
14
|
+
baseURL : host
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const headers = {
|
|
18
|
+
authorization: 'Basic ' + btoa(username + ":" + password)
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
//using the axios instance to perform the request that received from each http method
|
|
22
|
+
return axiosAPI({
|
|
23
|
+
method,
|
|
24
|
+
url,
|
|
25
|
+
data: request,
|
|
26
|
+
headers
|
|
27
|
+
}).then(res => {
|
|
28
|
+
|
|
29
|
+
return Promise.resolve(res);
|
|
30
|
+
})
|
|
31
|
+
.catch(err => {
|
|
32
|
+
return Promise.reject(err);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// function to execute the http get request
|
|
37
|
+
const get = (url, request="") => apiRequest("get",url,request);
|
|
38
|
+
|
|
39
|
+
// function to execute the http delete request
|
|
40
|
+
const deleteRequest = (url, request) => apiRequest("delete", url, request);
|
|
41
|
+
|
|
42
|
+
// function to execute the http post request
|
|
43
|
+
const post = (url, request) => apiRequest("post", url, request);
|
|
44
|
+
|
|
45
|
+
// function to execute the http put request
|
|
46
|
+
const put = (url, request) => apiRequest("put", url, request);
|
|
47
|
+
|
|
48
|
+
// function to execute the http path request
|
|
49
|
+
const patch = (url, request) => apiRequest("patch", url, request);
|
|
50
|
+
|
|
51
|
+
// expose your method to other services or actions
|
|
52
|
+
export const Api ={
|
|
53
|
+
get,
|
|
54
|
+
delete: deleteRequest,
|
|
55
|
+
post,
|
|
56
|
+
put,
|
|
57
|
+
patch
|
|
58
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { writable } from 'svelte/store'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export let host = "window.location.origin";
|
|
5
|
+
export let username = "";
|
|
6
|
+
export let password = "";
|
|
7
|
+
|
|
8
|
+
const hostStore = writable(""); //writable(window.location.origin);
|
|
9
|
+
const usernameStore = writable("");
|
|
10
|
+
const passwordStore = writable("");
|
|
11
|
+
|
|
12
|
+
hostStore.subscribe(value => {
|
|
13
|
+
host = value;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
usernameStore.subscribe(value => {
|
|
17
|
+
username = value;
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
passwordStore.subscribe(value => {
|
|
21
|
+
password = value;
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export function setApiConfig(_host:string ,_user:string,_pw:string)
|
|
27
|
+
{
|
|
28
|
+
console.log("overwrite settings");
|
|
29
|
+
hostStore.update(h=>h = _host);
|
|
30
|
+
usernameStore.update(u=>u = _user);
|
|
31
|
+
passwordStore.update(p=>p = _pw);
|
|
32
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang='ts'>
|
|
2
|
+
// The ordering of these imports is critical to your app working properly
|
|
3
|
+
import '@skeletonlabs/skeleton/themes/theme-skeleton.css';
|
|
4
|
+
// If you have source.organizeImports set to true in VSCode, then it will auto change this ordering
|
|
5
|
+
import '@skeletonlabs/skeleton/styles/all.css';
|
|
6
|
+
// Most of your app wide CSS should be put in this file
|
|
7
|
+
import '../app.postcss';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<slot />
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<h1>test</h1>
|
|
Binary file
|
package/svelte.config.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import adapter from '@sveltejs/adapter-static';
|
|
2
|
+
import { vitePreprocess } from '@sveltejs/kit/vite';
|
|
3
|
+
|
|
4
|
+
/** @type {import('@sveltejs/kit').Config} */
|
|
5
|
+
const config = {
|
|
6
|
+
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
|
7
|
+
// for more information about preprocessors
|
|
8
|
+
preprocess: vitePreprocess(),
|
|
9
|
+
|
|
10
|
+
kit: {
|
|
11
|
+
adapter: adapter({
|
|
12
|
+
pages: 'build',
|
|
13
|
+
assets: 'build',
|
|
14
|
+
fallback: null,
|
|
15
|
+
precompress: false,
|
|
16
|
+
ssr: true
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default config;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
darkMode: 'class',
|
|
4
|
+
content: ['./src/**/*.{html,js,svelte,ts}', require('path').join(require.resolve('@skeletonlabs/skeleton'), '../**/*.{html,js,svelte,ts}')],
|
|
5
|
+
theme: {
|
|
6
|
+
extend: {},
|
|
7
|
+
},
|
|
8
|
+
plugins: [...require('@skeletonlabs/skeleton/tailwind/skeleton.cjs')()],
|
|
9
|
+
}
|
package/tests/test.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./.svelte-kit/tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"allowJs": true,
|
|
5
|
+
"checkJs": true,
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
|
8
|
+
"resolveJsonModule": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"noImplicitAny": false
|
|
13
|
+
},
|
|
14
|
+
"exclude": ["node_modules"]
|
|
15
|
+
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
|
|
16
|
+
//
|
|
17
|
+
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
|
18
|
+
// from the referenced tsconfig.json - TypeScript does not merge them in
|
|
19
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} TableViewProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} TableViewEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} TableViewSlots */
|
|
4
|
-
export default class TableView extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type TableViewProps = typeof __propDef.props;
|
|
11
|
-
export type TableViewEvents = typeof __propDef.events;
|
|
12
|
-
export type TableViewSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} FileIconProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} FileIconEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} FileIconSlots */
|
|
4
|
-
export default class FileIcon extends SvelteComponentTyped<{
|
|
5
|
-
type?: string | undefined;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type FileIconProps = typeof __propDef.props;
|
|
11
|
-
export type FileIconEvents = typeof __propDef.events;
|
|
12
|
-
export type FileIconSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
type?: string | undefined;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} FileInfoProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} FileInfoEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} FileInfoSlots */
|
|
4
|
-
export default class FileInfo extends SvelteComponentTyped<{
|
|
5
|
-
type?: string | undefined;
|
|
6
|
-
name?: string | undefined;
|
|
7
|
-
size?: string | undefined;
|
|
8
|
-
}, {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
}, {}> {
|
|
11
|
-
}
|
|
12
|
-
export type FileInfoProps = typeof __propDef.props;
|
|
13
|
-
export type FileInfoEvents = typeof __propDef.events;
|
|
14
|
-
export type FileInfoSlots = typeof __propDef.slots;
|
|
15
|
-
import { SvelteComponentTyped } from "svelte";
|
|
16
|
-
declare const __propDef: {
|
|
17
|
-
props: {
|
|
18
|
-
type?: string | undefined;
|
|
19
|
-
name?: string | undefined;
|
|
20
|
-
size?: string | undefined;
|
|
21
|
-
};
|
|
22
|
-
events: {
|
|
23
|
-
[evt: string]: CustomEvent<any>;
|
|
24
|
-
};
|
|
25
|
-
slots: {};
|
|
26
|
-
};
|
|
27
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} FileUploaderProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} FileUploaderEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} FileUploaderSlots */
|
|
4
|
-
export default class FileUploader extends SvelteComponentTyped<{
|
|
5
|
-
data: FileUploaderModel | undefined;
|
|
6
|
-
submit?: string | undefined;
|
|
7
|
-
id?: number | undefined;
|
|
8
|
-
version?: number | undefined;
|
|
9
|
-
start?: string | undefined;
|
|
10
|
-
context?: string | undefined;
|
|
11
|
-
}, {
|
|
12
|
-
error: CustomEvent<any>;
|
|
13
|
-
submit: CustomEvent<any>;
|
|
14
|
-
submited: CustomEvent<any>;
|
|
15
|
-
success: CustomEvent<any>;
|
|
16
|
-
} & {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
}, {}> {
|
|
19
|
-
}
|
|
20
|
-
export type FileUploaderProps = typeof __propDef.props;
|
|
21
|
-
export type FileUploaderEvents = typeof __propDef.events;
|
|
22
|
-
export type FileUploaderSlots = typeof __propDef.slots;
|
|
23
|
-
import { FileUploaderModel } from '../../models/Models.js';
|
|
24
|
-
import { SvelteComponentTyped } from "svelte";
|
|
25
|
-
declare const __propDef: {
|
|
26
|
-
props: {
|
|
27
|
-
data: FileUploaderModel | undefined;
|
|
28
|
-
submit?: string | undefined;
|
|
29
|
-
id?: number | undefined;
|
|
30
|
-
version?: number | undefined;
|
|
31
|
-
start?: string | undefined;
|
|
32
|
-
context?: string | undefined;
|
|
33
|
-
};
|
|
34
|
-
events: {
|
|
35
|
-
error: CustomEvent<any>;
|
|
36
|
-
submit: CustomEvent<any>;
|
|
37
|
-
submited: CustomEvent<any>;
|
|
38
|
-
success: CustomEvent<any>;
|
|
39
|
-
} & {
|
|
40
|
-
[evt: string]: CustomEvent<any>;
|
|
41
|
-
};
|
|
42
|
-
slots: {};
|
|
43
|
-
};
|
|
44
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: Record<string, never>;
|
|
4
|
-
events: {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {};
|
|
8
|
-
};
|
|
9
|
-
export type ListViewProps = typeof __propDef.props;
|
|
10
|
-
export type ListViewEvents = typeof __propDef.events;
|
|
11
|
-
export type ListViewSlots = typeof __propDef.slots;
|
|
12
|
-
export default class ListView extends SvelteComponentTyped<ListViewProps, ListViewEvents, ListViewSlots> {
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} SpinnerProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} SpinnerEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} SpinnerSlots */
|
|
4
|
-
export default class Spinner extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type SpinnerProps = typeof __propDef.props;
|
|
11
|
-
export type SpinnerEvents = typeof __propDef.events;
|
|
12
|
-
export type SpinnerSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
package/dist/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import ListView from './components/ListView.svelte';
|
|
2
|
-
import TableView from './TableView.svelte';
|
|
3
|
-
import FileIcon from './components/File/FileIcon.svelte';
|
|
4
|
-
import FileInfo from './components/File/FileInfo.svelte';
|
|
5
|
-
import FileUploader from './components/File/FileUploader.svelte';
|
|
6
|
-
export { ListView, TableView, FileInfo, FileIcon, FileUploader };
|
|
7
|
-
export { Api } from './services/Api.js';
|
|
8
|
-
export { host, username, password, setApiConfig } from './stores/apistore.js';
|
|
9
|
-
export type { user, FileUploaderModel } from './models/Models.js';
|
package/dist/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// Reexport your entry components here
|
|
2
|
-
import ListView from './components/ListView.svelte';
|
|
3
|
-
import TableView from './TableView.svelte';
|
|
4
|
-
import FileIcon from './components/File/FileIcon.svelte';
|
|
5
|
-
import FileInfo from './components/File/FileInfo.svelte';
|
|
6
|
-
import FileUploader from './components/File/FileUploader.svelte';
|
|
7
|
-
export { ListView, TableView, FileInfo, FileIcon, FileUploader };
|
|
8
|
-
export { Api } from './services/Api.js';
|
|
9
|
-
export { host, username, password, setApiConfig } from './stores/apistore.js';
|
package/dist/models/Models.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export interface FileInfo {
|
|
2
|
-
name: string;
|
|
3
|
-
type: string;
|
|
4
|
-
length: number;
|
|
5
|
-
description: string;
|
|
6
|
-
validationHash: string;
|
|
7
|
-
}
|
|
8
|
-
export interface FileUploaderModel {
|
|
9
|
-
accept: string[];
|
|
10
|
-
existingFiles: FileInfo[];
|
|
11
|
-
descriptionType: number;
|
|
12
|
-
multiple: boolean;
|
|
13
|
-
maxSize: number;
|
|
14
|
-
lastModification: Date;
|
|
15
|
-
}
|
|
16
|
-
export interface Files {
|
|
17
|
-
accepted: Blob[];
|
|
18
|
-
rejected: Blob[];
|
|
19
|
-
}
|
|
20
|
-
export type user = {
|
|
21
|
-
name: string;
|
|
22
|
-
};
|
|
23
|
-
export interface FileObj {
|
|
24
|
-
path: string;
|
|
25
|
-
lastModified: number;
|
|
26
|
-
lastModifiedDate: Date;
|
|
27
|
-
name: string;
|
|
28
|
-
size: number;
|
|
29
|
-
type: string;
|
|
30
|
-
webkitRelativePath: string;
|
|
31
|
-
}
|
package/dist/models/Models.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/services/Api.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const Api: {
|
|
2
|
-
get: (url: any, request?: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
3
|
-
delete: (url: any, request: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
|
-
post: (url: any, request: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
5
|
-
put: (url: any, request: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
6
|
-
patch: (url: any, request: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
|
-
};
|
package/dist/stores/apistore.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { writable } from 'svelte/store';
|
|
2
|
-
export let host = "window.location.origin";
|
|
3
|
-
export let username = "";
|
|
4
|
-
export let password = "";
|
|
5
|
-
const hostStore = writable(""); //writable(window.location.origin);
|
|
6
|
-
const usernameStore = writable("");
|
|
7
|
-
const passwordStore = writable("");
|
|
8
|
-
hostStore.subscribe(value => {
|
|
9
|
-
host = value;
|
|
10
|
-
});
|
|
11
|
-
usernameStore.subscribe(value => {
|
|
12
|
-
username = value;
|
|
13
|
-
});
|
|
14
|
-
passwordStore.subscribe(value => {
|
|
15
|
-
password = value;
|
|
16
|
-
});
|
|
17
|
-
export function setApiConfig(_host, _user, _pw) {
|
|
18
|
-
console.log("overwrite settings");
|
|
19
|
-
hostStore.update(h => h = _host);
|
|
20
|
-
usernameStore.update(u => u = _user);
|
|
21
|
-
passwordStore.update(p => p = _pw);
|
|
22
|
-
}
|
|
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
|