@bexis2/bexis2-core-ui 0.2.11 → 0.2.13
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/README.md +273 -214
- package/dist/components/Table/Table.svelte +85 -85
- package/dist/components/Table/TableFilter.svelte +8 -8
- package/dist/components/Table/TablePagination.svelte +38 -38
- package/dist/components/file/FileUploader.svelte +34 -34
- package/dist/components/form/Checkbox.svelte.d.ts +1 -1
- package/dist/components/form/DropdownKvP.svelte +5 -11
- package/dist/components/form/InputContainer.svelte +20 -19
- package/dist/components/form/MultiSelect.svelte +163 -178
- package/dist/components/form/TextArea.svelte +13 -13
- package/dist/components/form/TextInput.svelte +0 -2
- package/dist/components/page/Alert.svelte +28 -30
- package/dist/components/page/BackToTop.svelte +30 -30
- package/dist/components/page/Docs.svelte +22 -19
- package/dist/components/page/Docs.svelte.d.ts +1 -1
- package/dist/components/page/ErrorMessage.svelte +8 -8
- package/dist/components/page/Footer.svelte +5 -5
- package/dist/components/page/Header.svelte +5 -4
- package/dist/components/page/HelpPopUp.svelte +31 -25
- package/dist/components/page/HelpPopUp.svelte.d.ts +5 -12
- package/dist/components/page/Page.svelte +57 -67
- package/dist/components/page/Page.svelte.d.ts +2 -2
- package/dist/components/page/PageCaller.js +19 -21
- package/dist/components/page/Spinner.svelte +9 -10
- package/dist/components/page/Spinner.svelte.d.ts +1 -1
- package/dist/components/page/breadcrumb/Breadcrumb.svelte +19 -23
- package/dist/components/page/menu/Menu.svelte +48 -22
- package/dist/components/page/menu/MenuBar.svelte +8 -14
- package/dist/components/page/menu/MenuBar.svelte.d.ts +1 -1
- package/dist/components/page/menu/MenuDataCaller.js +10 -11
- package/dist/components/page/menu/MenuItem.svelte +28 -15
- package/dist/components/page/menu/MenuItem.svelte.d.ts +2 -1
- package/dist/components/page/menu/MenuSublist.svelte +14 -16
- package/dist/components/page/menu/MenuSublist.svelte.d.ts +2 -3
- package/dist/components/page/menu/SettingsBar.svelte +22 -14
- package/dist/components/page/menu/SettingsBar.svelte.d.ts +2 -2
- package/dist/css/core.ui.postcss +10 -7
- package/dist/css/themes/theme-bexis2.css +12 -13
- package/dist/index.d.ts +3 -5
- package/dist/index.js +5 -5
- package/dist/models/Enums.d.ts +18 -0
- package/dist/models/Enums.js +22 -0
- package/dist/models/Models.d.ts +18 -0
- package/dist/models/Models.js +1 -2
- package/dist/models/Page.d.ts +31 -0
- package/dist/services/BaseCaller.js +16 -21
- package/dist/stores/pageStores.d.ts +4 -4
- package/dist/stores/pageStores.js +27 -27
- package/package.json +2 -2
- package/src/lib/components/Table/Table.svelte +246 -246
- package/src/lib/components/Table/TableFilter.svelte +8 -8
- package/src/lib/components/Table/TablePagination.svelte +61 -61
- package/src/lib/components/Table/filter.ts +141 -141
- package/src/lib/components/file/FileUploader.svelte +184 -184
- package/src/lib/components/form/Checkbox.svelte +1 -1
- package/src/lib/components/form/DateInput.svelte +0 -1
- package/src/lib/components/form/DropdownKvP.svelte +5 -11
- package/src/lib/components/form/InputContainer.svelte +36 -44
- package/src/lib/components/form/MultiSelect.svelte +163 -178
- package/src/lib/components/form/NumberInput.svelte +3 -5
- package/src/lib/components/form/TextArea.svelte +26 -27
- package/src/lib/components/form/TextInput.svelte +2 -5
- package/src/lib/components/page/Alert.svelte +41 -45
- package/src/lib/components/page/BackToTop.svelte +30 -30
- package/src/lib/components/page/Docs.svelte +46 -44
- package/src/lib/components/page/ErrorMessage.svelte +10 -12
- package/src/lib/components/page/Footer.svelte +18 -22
- package/src/lib/components/page/Header.svelte +18 -21
- package/src/lib/components/page/HelpPopUp.svelte +72 -66
- package/src/lib/components/page/Page.svelte +96 -109
- package/src/lib/components/page/PageCaller.js +19 -21
- package/src/lib/components/page/Spinner.svelte +13 -15
- package/src/lib/components/page/breadcrumb/Breadcrumb.svelte +31 -43
- package/src/lib/components/page/menu/Menu.svelte +61 -43
- package/src/lib/components/page/menu/MenuBar.svelte +18 -29
- package/src/lib/components/page/menu/MenuDataCaller.js +10 -11
- package/src/lib/components/page/menu/MenuItem.svelte +45 -34
- package/src/lib/components/page/menu/MenuSublist.svelte +33 -41
- package/src/lib/components/page/menu/SettingsBar.svelte +39 -37
- package/src/lib/css/core.ui.postcss +10 -7
- package/src/lib/css/themes/theme-bexis2.css +12 -13
- package/src/lib/index.ts +78 -77
- package/src/lib/models/Enums.ts +32 -11
- package/src/lib/models/Models.ts +136 -113
- package/src/lib/models/Page.ts +40 -41
- package/src/lib/services/BaseCaller.js +16 -21
- package/src/lib/stores/apiStores.ts +31 -32
- package/src/lib/stores/pageStores.ts +121 -126
package/src/lib/index.ts
CHANGED
|
@@ -1,77 +1,78 @@
|
|
|
1
|
-
// Reexport your entry components here
|
|
2
|
-
import ListView from './components/ListView.svelte';
|
|
3
|
-
import TableView from './TableView.svelte';
|
|
4
|
-
|
|
5
|
-
import FileIcon from './components/file/FileIcon.svelte';
|
|
6
|
-
import FileInfo from './components/file/FileInfo.svelte';
|
|
7
|
-
import FileUploader from './components/file/FileUploader.svelte';
|
|
8
|
-
|
|
9
|
-
//page
|
|
10
|
-
import Spinner from './components/page/Spinner.svelte';
|
|
11
|
-
import Page from './components/page/Page.svelte';
|
|
12
|
-
import Alert from './components/page/Alert.svelte';
|
|
13
|
-
import Menu from './components/page/menu/Menu.svelte';
|
|
14
|
-
import ErrorMessage from './components/page/ErrorMessage.svelte';
|
|
15
|
-
|
|
16
|
-
// input
|
|
17
|
-
import Checkbox from './components/form/Checkbox.svelte';
|
|
18
|
-
import CheckboxKVPList from './components/form/CheckboxKvPList.svelte';
|
|
19
|
-
import CheckboxList from './components/form/CheckboxList.svelte';
|
|
20
|
-
import DateInput from './components/form/DateInput.svelte';
|
|
21
|
-
import DropdownKVP from './components/form/DropdownKvP.svelte';
|
|
22
|
-
import MultiSelect from './components/form/MultiSelect.svelte';
|
|
23
|
-
import NumberInput from './components/form/NumberInput.svelte';
|
|
24
|
-
import TextInput from './components/form/TextInput.svelte';
|
|
25
|
-
import TextArea from './components/form/TextArea.svelte';
|
|
26
|
-
|
|
27
|
-
//table
|
|
28
|
-
import Table from './components/Table/Table.svelte';
|
|
29
|
-
import TableFilter from './components/Table/TableFilter.svelte';
|
|
30
|
-
import { columnFilter, searchFilter } from './components/Table/filter';
|
|
31
|
-
import type { TableConfig, Columns, Column } from './models/Models';
|
|
32
|
-
|
|
33
|
-
//Form
|
|
34
|
-
export {
|
|
35
|
-
Checkbox,
|
|
36
|
-
CheckboxKVPList,
|
|
37
|
-
CheckboxList,
|
|
38
|
-
DateInput,
|
|
39
|
-
DropdownKVP,
|
|
40
|
-
MultiSelect,
|
|
41
|
-
NumberInput,
|
|
42
|
-
TextArea,
|
|
43
|
-
TextInput
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
//File
|
|
47
|
-
export { FileInfo, FileIcon, FileUploader };
|
|
48
|
-
|
|
49
|
-
//others
|
|
50
|
-
export {
|
|
51
|
-
|
|
52
|
-
//Api
|
|
53
|
-
export { Api } from './services/Api.js';
|
|
54
|
-
export { host, username, password, setApiConfig } from './stores/apiStores.js';
|
|
55
|
-
|
|
56
|
-
//Type
|
|
57
|
-
export type {
|
|
58
|
-
userType,
|
|
59
|
-
inputType,
|
|
60
|
-
fileUploaderModel,
|
|
61
|
-
linkType,
|
|
62
|
-
listItemType,
|
|
63
|
-
keyValuePairType
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
1
|
+
// Reexport your entry components here
|
|
2
|
+
// import ListView from './components/ListView.svelte';
|
|
3
|
+
// import TableView from './TableView.svelte';
|
|
4
|
+
|
|
5
|
+
import FileIcon from './components/file/FileIcon.svelte';
|
|
6
|
+
import FileInfo from './components/file/FileInfo.svelte';
|
|
7
|
+
import FileUploader from './components/file/FileUploader.svelte';
|
|
8
|
+
|
|
9
|
+
//page
|
|
10
|
+
import Spinner from './components/page/Spinner.svelte';
|
|
11
|
+
import Page from './components/page/Page.svelte';
|
|
12
|
+
import Alert from './components/page/Alert.svelte';
|
|
13
|
+
import Menu from './components/page/menu/Menu.svelte';
|
|
14
|
+
import ErrorMessage from './components/page/ErrorMessage.svelte';
|
|
15
|
+
|
|
16
|
+
// input
|
|
17
|
+
import Checkbox from './components/form/Checkbox.svelte';
|
|
18
|
+
import CheckboxKVPList from './components/form/CheckboxKvPList.svelte';
|
|
19
|
+
import CheckboxList from './components/form/CheckboxList.svelte';
|
|
20
|
+
import DateInput from './components/form/DateInput.svelte';
|
|
21
|
+
import DropdownKVP from './components/form/DropdownKvP.svelte';
|
|
22
|
+
import MultiSelect from './components/form/MultiSelect.svelte';
|
|
23
|
+
import NumberInput from './components/form/NumberInput.svelte';
|
|
24
|
+
import TextInput from './components/form/TextInput.svelte';
|
|
25
|
+
import TextArea from './components/form/TextArea.svelte';
|
|
26
|
+
|
|
27
|
+
//table
|
|
28
|
+
import Table from './components/Table/Table.svelte';
|
|
29
|
+
import TableFilter from './components/Table/TableFilter.svelte';
|
|
30
|
+
import { columnFilter, searchFilter } from './components/Table/filter';
|
|
31
|
+
import type { TableConfig, Columns, Column } from './models/Models';
|
|
32
|
+
|
|
33
|
+
//Form
|
|
34
|
+
export {
|
|
35
|
+
Checkbox,
|
|
36
|
+
CheckboxKVPList,
|
|
37
|
+
CheckboxList,
|
|
38
|
+
DateInput,
|
|
39
|
+
DropdownKVP,
|
|
40
|
+
MultiSelect,
|
|
41
|
+
NumberInput,
|
|
42
|
+
TextArea,
|
|
43
|
+
TextInput
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//File
|
|
47
|
+
export { FileInfo, FileIcon, FileUploader };
|
|
48
|
+
|
|
49
|
+
//others
|
|
50
|
+
export { Spinner, Page, Alert, Menu, ErrorMessage };
|
|
51
|
+
|
|
52
|
+
//Api
|
|
53
|
+
export { Api } from './services/Api.js';
|
|
54
|
+
export { host, username, password, setApiConfig } from './stores/apiStores.js';
|
|
55
|
+
|
|
56
|
+
//Type
|
|
57
|
+
export type {
|
|
58
|
+
userType,
|
|
59
|
+
inputType,
|
|
60
|
+
fileUploaderModel,
|
|
61
|
+
linkType,
|
|
62
|
+
listItemType,
|
|
63
|
+
keyValuePairType,
|
|
64
|
+
fileInfoType,
|
|
65
|
+
fileReaderInfoType,
|
|
66
|
+
asciiFileReaderInfoType
|
|
67
|
+
} from './models/Models.js';
|
|
68
|
+
|
|
69
|
+
//help
|
|
70
|
+
export { helpStore } from '$store/pageStores';
|
|
71
|
+
export type { helpStoreType, helpItemType } from './models/Models';
|
|
72
|
+
|
|
73
|
+
//enum
|
|
74
|
+
export { positionType, pageContentLayoutType,decimalCharacterType,orientationType,textMarkerType,textSeperatorType } from './models/Enums';
|
|
75
|
+
|
|
76
|
+
// Table
|
|
77
|
+
export { Table, TableFilter, columnFilter, searchFilter };
|
|
78
|
+
export type { TableConfig, Columns, Column };
|
package/src/lib/models/Enums.ts
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
export enum positionType {
|
|
2
|
+
start = 'start',
|
|
3
|
+
end = 'end',
|
|
4
|
+
center = 'center'
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export enum pageContentLayoutType {
|
|
8
|
+
full = 'full',
|
|
9
|
+
center = 'center'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum decimalCharacterType {
|
|
13
|
+
point,
|
|
14
|
+
comma
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum orientationType {
|
|
18
|
+
columnwise,
|
|
19
|
+
rowwise
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export enum textSeperatorType {
|
|
23
|
+
tab = 9,
|
|
24
|
+
comma = 44,
|
|
25
|
+
semicolon = 59,
|
|
26
|
+
space = 32
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export enum textMarkerType {
|
|
30
|
+
quotes,
|
|
31
|
+
doubleQuotes
|
|
32
|
+
}
|
package/src/lib/models/Models.ts
CHANGED
|
@@ -1,113 +1,136 @@
|
|
|
1
|
-
import type { SvelteComponent } from 'svelte';
|
|
2
|
-
import type { ColumnFilterFn } from 'svelte-headless-table/lib/plugins';
|
|
3
|
-
import type { Writable } from 'svelte/store';
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
export interface
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
1
|
+
import type { SvelteComponent } from 'svelte';
|
|
2
|
+
import type { ColumnFilterFn } from 'svelte-headless-table/lib/plugins';
|
|
3
|
+
import type { Writable } from 'svelte/store';
|
|
4
|
+
|
|
5
|
+
import {decimalCharacterType, orientationType,textMarkerType,textSeperatorType} from './Enums'
|
|
6
|
+
|
|
7
|
+
// page
|
|
8
|
+
export interface linkType {
|
|
9
|
+
label: string;
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Form
|
|
14
|
+
export interface inputType {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
feedback: string[];
|
|
18
|
+
invalid: boolean;
|
|
19
|
+
valid: boolean;
|
|
20
|
+
required: boolean;
|
|
21
|
+
placeholder: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface fileInfoType {
|
|
25
|
+
name: string;
|
|
26
|
+
type: string;
|
|
27
|
+
length: number;
|
|
28
|
+
description: string;
|
|
29
|
+
validationHash: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface fileUploaderModel {
|
|
33
|
+
accept: string[];
|
|
34
|
+
existingFiles: fileInfoType[];
|
|
35
|
+
descriptionType: number;
|
|
36
|
+
multiple: boolean;
|
|
37
|
+
maxSize: number;
|
|
38
|
+
lastModification: Date;
|
|
39
|
+
allFilesReadable: boolean;
|
|
40
|
+
asciiFileReaderInfo: asciiFileReaderInfoType
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface asciiFileReaderInfoType extends fileReaderInfoType {
|
|
44
|
+
cells: boolean[];
|
|
45
|
+
seperator: textSeperatorType;
|
|
46
|
+
textMarker: textMarkerType;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export interface fileReaderInfoType {
|
|
51
|
+
decimal: decimalCharacterType;
|
|
52
|
+
orientation: orientationType;
|
|
53
|
+
offset: number;
|
|
54
|
+
variables: number;
|
|
55
|
+
data: number;
|
|
56
|
+
unit: number;
|
|
57
|
+
description: number;
|
|
58
|
+
dateformat: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
export interface filesType {
|
|
63
|
+
accepted: Blob[];
|
|
64
|
+
rejected: Blob[];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type userType = {
|
|
68
|
+
name: string;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export interface fileObjType {
|
|
72
|
+
path: string;
|
|
73
|
+
lastModified: number;
|
|
74
|
+
lastModifiedDate: Date;
|
|
75
|
+
name: string;
|
|
76
|
+
size: number;
|
|
77
|
+
type: string;
|
|
78
|
+
webkitRelativePath: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface ColumnInstructions {
|
|
82
|
+
toStringFn?: (value: any) => string;
|
|
83
|
+
toSortableValueFn?: (value: any) => string | number;
|
|
84
|
+
toFilterableValueFn?: (value: any) => string | number | Date;
|
|
85
|
+
renderComponent?: typeof SvelteComponent;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Table column type
|
|
89
|
+
export interface Column {
|
|
90
|
+
header?: string;
|
|
91
|
+
exclude?: boolean; // false by default
|
|
92
|
+
instructions?: ColumnInstructions;
|
|
93
|
+
disableFiltering?: boolean; // false by default
|
|
94
|
+
disableSorting?: boolean; // false by default
|
|
95
|
+
colFilterFn?: ColumnFilterFn;
|
|
96
|
+
colFilterComponent?: typeof SvelteComponent;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface Columns {
|
|
100
|
+
[key: string]: Column;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Table config type
|
|
104
|
+
export interface TableConfig<T> {
|
|
105
|
+
id: string;
|
|
106
|
+
data: Writable<T[]>;
|
|
107
|
+
columns?: Columns;
|
|
108
|
+
pageSizes?: number[];
|
|
109
|
+
defaultPageSize?: number;
|
|
110
|
+
optionsComponent?: typeof SvelteComponent;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// lists
|
|
114
|
+
export interface keyValuePairType {
|
|
115
|
+
id: number;
|
|
116
|
+
text: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface listItemType {
|
|
120
|
+
id: number;
|
|
121
|
+
text: string;
|
|
122
|
+
group: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
//help
|
|
126
|
+
export interface helpItemType {
|
|
127
|
+
id?: string;
|
|
128
|
+
name: string;
|
|
129
|
+
description: string;
|
|
130
|
+
link?: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface helpStoreType {
|
|
134
|
+
itemId?: string;
|
|
135
|
+
helpItems: helpItemType[];
|
|
136
|
+
}
|
package/src/lib/models/Page.ts
CHANGED
|
@@ -1,41 +1,40 @@
|
|
|
1
|
-
// BREADCRUMB
|
|
2
|
-
/********************************** */
|
|
3
|
-
export interface breadcrumbItemType {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export class BreadcrumbModel {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// MENU
|
|
17
|
-
/********************************** */
|
|
18
|
-
export class MenuModel {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
1
|
+
// BREADCRUMB
|
|
2
|
+
/********************************** */
|
|
3
|
+
export interface breadcrumbItemType {
|
|
4
|
+
label: string;
|
|
5
|
+
link: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class BreadcrumbModel {
|
|
9
|
+
items: breadcrumbItemType[];
|
|
10
|
+
|
|
11
|
+
constructor() {
|
|
12
|
+
this.items = [];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// MENU
|
|
17
|
+
/********************************** */
|
|
18
|
+
export class MenuModel {
|
|
19
|
+
Logo: logoType;
|
|
20
|
+
LaunchBar: menuItemType[];
|
|
21
|
+
MenuBar: menuItemType[];
|
|
22
|
+
AccountBar: menuItemType[];
|
|
23
|
+
Settings: menuItemType[];
|
|
24
|
+
Extended: menuItemType[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface menuItemType {
|
|
28
|
+
Title: string;
|
|
29
|
+
Url: string;
|
|
30
|
+
Target: string;
|
|
31
|
+
Module: string;
|
|
32
|
+
Items: menuItemType[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface logoType {
|
|
36
|
+
Mime: string;
|
|
37
|
+
Name: string;
|
|
38
|
+
Data: string;
|
|
39
|
+
Height: number;
|
|
40
|
+
}
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
// Implementations for all the calls for the pokemon endpoints.
|
|
2
|
-
//import Api from "./Api";
|
|
3
|
-
import { host } from
|
|
4
|
-
|
|
5
|
-
// go to a internal action
|
|
6
|
-
export const goTo = async (url,intern=true) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
// Implementations for all the calls for the pokemon endpoints.
|
|
2
|
+
//import Api from "./Api";
|
|
3
|
+
import { host } from '$store/apiStores';
|
|
4
|
+
|
|
5
|
+
// go to a internal action
|
|
6
|
+
export const goTo = async (url, intern = true) => {
|
|
7
|
+
if (intern == true) {
|
|
8
|
+
// go to inside bexis2
|
|
9
|
+
if (window != null && host != null && url != null) {
|
|
10
|
+
window.open(host + url, '_self')?.focus();
|
|
11
|
+
}
|
|
12
|
+
} // go to a external page
|
|
13
|
+
else {
|
|
14
|
+
window.open(url, '_blank')?.focus();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { writable } from 'svelte/store';
|
|
2
|
-
|
|
3
|
-
export let host = 'window.location.origin';
|
|
4
|
-
export let username = '';
|
|
5
|
-
export let password = '';
|
|
6
|
-
|
|
7
|
-
const hostStore = writable(''); //writable(window.location.origin);
|
|
8
|
-
const usernameStore = writable('');
|
|
9
|
-
const passwordStore = writable('');
|
|
10
|
-
|
|
11
|
-
hostStore.subscribe((value) => {
|
|
12
|
-
host = value;
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
usernameStore.subscribe((value) => {
|
|
16
|
-
username = value;
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
passwordStore.subscribe((value) => {
|
|
20
|
-
password = value;
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export function setApiConfig(_host: string, _user: string, _pw: string) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
1
|
+
import { writable } from 'svelte/store';
|
|
2
|
+
|
|
3
|
+
export let host = 'window.location.origin';
|
|
4
|
+
export let username = '';
|
|
5
|
+
export let password = '';
|
|
6
|
+
|
|
7
|
+
const hostStore = writable(''); //writable(window.location.origin);
|
|
8
|
+
const usernameStore = writable('');
|
|
9
|
+
const passwordStore = writable('');
|
|
10
|
+
|
|
11
|
+
hostStore.subscribe((value) => {
|
|
12
|
+
host = value;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
usernameStore.subscribe((value) => {
|
|
16
|
+
username = value;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
passwordStore.subscribe((value) => {
|
|
20
|
+
password = value;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export function setApiConfig(_host: string, _user: string, _pw: string) {
|
|
24
|
+
console.log('overwrite api settings');
|
|
25
|
+
|
|
26
|
+
hostStore.update((h) => (h = _host));
|
|
27
|
+
usernameStore.update((u) => (u = _user));
|
|
28
|
+
passwordStore.update((p) => (p = _pw));
|
|
29
|
+
|
|
30
|
+
//console.log('overwrite host',_host);
|
|
31
|
+
}
|