@bexis2/bexis2-core-ui 0.0.7 → 0.0.8
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/dist/TableView.svelte.d.ts +23 -0
- package/dist/components/File/FileIcon.svelte.d.ts +23 -0
- package/dist/components/File/FileInfo.svelte.d.ts +27 -0
- package/{src/lib → dist}/components/File/FileUploader.svelte +1 -1
- package/dist/components/File/FileUploader.svelte.d.ts +44 -0
- package/dist/components/ListView.svelte +6 -0
- package/dist/components/ListView.svelte.d.ts +14 -0
- package/dist/components/Spinner/Spinner.svelte.d.ts +23 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/models/Models.d.ts +31 -0
- package/dist/models/Models.js +1 -0
- package/dist/services/Api.d.ts +7 -0
- package/{src/lib/services/Api.ts → dist/services/Api.js} +44 -58
- package/dist/stores/apistore.d.ts +4 -0
- package/dist/stores/apistore.js +22 -0
- package/package.json +7 -7
- package/.eslintignore +0 -13
- package/.eslintrc.cjs +0 -20
- package/.prettierignore +0 -13
- package/.prettierrc +0 -9
- package/playwright.config.ts +0 -11
- package/postcss.config.cjs +0 -6
- package/src/app.d.ts +0 -11
- package/src/app.html +0 -15
- package/src/app.postcss +0 -2
- package/src/index.test.ts +0 -7
- package/src/lib/components/ListView.svelte +0 -13
- package/src/lib/index.ts +0 -15
- package/src/lib/models/Models.ts +0 -39
- package/src/lib/stores/apistore.ts +0 -32
- package/src/routes/+layout.svelte +0 -10
- package/src/routes/+page.svelte +0 -0
- package/static/favicon.png +0 -0
- package/svelte.config.js +0 -18
- package/tailwind.config.cjs +0 -9
- package/tests/test.ts +0 -6
- package/tsconfig.json +0 -19
- package/vite.config.ts +0 -9
- /package/{src/lib → dist}/TableView.svelte +0 -0
- /package/{src/lib → dist}/components/File/FileIcon.svelte +0 -0
- /package/{src/lib → dist}/components/File/FileInfo.svelte +0 -0
- /package/{src/lib → dist}/components/Spinner/Spinner.svelte +0 -0
- /package/{src/lib → dist}/css/coreui.postcss +0 -0
- /package/{src/lib → dist}/css/themes/theme-bexis2.css +0 -0
- /package/{src/lib → dist}/css/themes/theme-crimson.css +0 -0
- /package/{src/lib → dist}/css/themes/theme-gold-nouveau.css +0 -0
- /package/{src/lib → dist}/css/themes/theme-hamlindigo.css +0 -0
- /package/{src/lib → dist}/css/themes/theme-modern.css +0 -0
- /package/{src/lib → dist}/css/themes/theme-rocket.css +0 -0
- /package/{src/lib → dist}/css/themes/theme-sahara.css +0 -0
- /package/{src/lib → dist}/css/themes/theme-seafoam.css +0 -0
- /package/{src/lib → dist}/css/themes/theme-seasonal.css +0 -0
- /package/{src/lib → dist}/css/themes/theme-skeleton.css +0 -0
- /package/{src/lib → dist}/css/themes/theme-vintage.css +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,23 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,27 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,44 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,14 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,23 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface FileInfo {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
lenght: 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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
};
|
|
@@ -1,58 +1,44 @@
|
|
|
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
|
-
|
|
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
|
-
};
|
|
1
|
+
// Api.js
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { host, username, password } from "../stores/apistore";
|
|
4
|
+
console.log("setup axios");
|
|
5
|
+
// implement a method to execute all the request from here.
|
|
6
|
+
const apiRequest = (method, url, request) => {
|
|
7
|
+
// Create a instance of axios to use the same base url.
|
|
8
|
+
const axiosAPI = axios.create({
|
|
9
|
+
baseURL: host
|
|
10
|
+
});
|
|
11
|
+
const headers = {
|
|
12
|
+
authorization: 'Basic ' + btoa(username + ":" + password)
|
|
13
|
+
};
|
|
14
|
+
//using the axios instance to perform the request that received from each http method
|
|
15
|
+
return axiosAPI({
|
|
16
|
+
method,
|
|
17
|
+
url,
|
|
18
|
+
data: request,
|
|
19
|
+
headers
|
|
20
|
+
}).then(res => {
|
|
21
|
+
return Promise.resolve(res);
|
|
22
|
+
})
|
|
23
|
+
.catch(err => {
|
|
24
|
+
return Promise.reject(err);
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
// function to execute the http get request
|
|
28
|
+
const get = (url, request = "") => apiRequest("get", url, request);
|
|
29
|
+
// function to execute the http delete request
|
|
30
|
+
const deleteRequest = (url, request) => apiRequest("delete", url, request);
|
|
31
|
+
// function to execute the http post request
|
|
32
|
+
const post = (url, request) => apiRequest("post", url, request);
|
|
33
|
+
// function to execute the http put request
|
|
34
|
+
const put = (url, request) => apiRequest("put", url, request);
|
|
35
|
+
// function to execute the http path request
|
|
36
|
+
const patch = (url, request) => apiRequest("patch", url, request);
|
|
37
|
+
// expose your method to other services or actions
|
|
38
|
+
export const Api = {
|
|
39
|
+
get,
|
|
40
|
+
delete: deleteRequest,
|
|
41
|
+
post,
|
|
42
|
+
put,
|
|
43
|
+
patch
|
|
44
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bexis2/bexis2-core-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
@@ -47,6 +47,9 @@
|
|
|
47
47
|
"directories": {
|
|
48
48
|
"test": "tests"
|
|
49
49
|
},
|
|
50
|
+
"files": [
|
|
51
|
+
"dist"
|
|
52
|
+
],
|
|
50
53
|
"dependencies": {
|
|
51
54
|
"@fortawesome/fontawesome-free": "^6.2.1",
|
|
52
55
|
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
|
@@ -74,11 +77,8 @@
|
|
|
74
77
|
],
|
|
75
78
|
"exports": {
|
|
76
79
|
".": {
|
|
77
|
-
"types": "./
|
|
78
|
-
"svelte": "./
|
|
79
|
-
}
|
|
80
|
-
"files": [
|
|
81
|
-
"dist"
|
|
82
|
-
]
|
|
80
|
+
"types": "./dist/index.d.ts",
|
|
81
|
+
"svelte": "./dist/index.js"
|
|
82
|
+
}
|
|
83
83
|
}
|
|
84
84
|
}
|
package/.eslintignore
DELETED
package/.eslintrc.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
};
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
package/playwright.config.ts
DELETED
package/postcss.config.cjs
DELETED
package/src/app.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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
DELETED
package/src/index.test.ts
DELETED
package/src/lib/index.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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'
|
package/src/lib/models/Models.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export interface FileInfo {
|
|
3
|
-
name:string,
|
|
4
|
-
type:string,
|
|
5
|
-
lenght: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,32 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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 />
|
package/src/routes/+page.svelte
DELETED
|
File without changes
|
package/static/favicon.png
DELETED
|
Binary file
|
package/svelte.config.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import adapter from '@sveltejs/adapter-auto';
|
|
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-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
|
12
|
-
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
|
13
|
-
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
|
14
|
-
adapter: adapter()
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default config;
|
package/tailwind.config.cjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
DELETED
package/tsconfig.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
DELETED
|
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
|