@bexis2/bexis2-core-ui 0.4.65 → 0.4.66
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 +7 -0
- package/dist/__package_types_tmp__/TableView.svelte.d.ts +23 -0
- package/dist/__package_types_tmp__/components/CodeEditor/CodeEditor.svelte.d.ts +32 -0
- package/dist/__package_types_tmp__/components/Facets/Facets.svelte.d.ts +27 -0
- package/dist/__package_types_tmp__/components/Facets/ShowMore.svelte.d.ts +19 -0
- package/dist/__package_types_tmp__/components/File/FileIcon.svelte.d.ts +23 -0
- package/dist/__package_types_tmp__/components/File/FileInfo.svelte.d.ts +27 -0
- package/dist/__package_types_tmp__/components/File/FileUploader.svelte.d.ts +27 -0
- package/dist/__package_types_tmp__/components/ListView.svelte.d.ts +14 -0
- package/dist/__package_types_tmp__/components/Table/ColumnsMenu.svelte.d.ts +21 -0
- package/dist/__package_types_tmp__/components/Table/Table.svelte.d.ts +19 -0
- package/dist/__package_types_tmp__/components/Table/TableContent.svelte.d.ts +19 -0
- package/dist/__package_types_tmp__/components/Table/TableFilter.svelte.d.ts +23 -0
- package/dist/__package_types_tmp__/components/Table/TableFilterServer.svelte.d.ts +23 -0
- package/dist/__package_types_tmp__/components/Table/TablePagination.svelte.d.ts +19 -0
- package/dist/__package_types_tmp__/components/Table/TablePaginationServer.svelte.d.ts +20 -0
- package/dist/__package_types_tmp__/components/Table/filter.d.ts +4 -0
- package/dist/__package_types_tmp__/components/Table/utils.d.ts +34 -0
- package/dist/__package_types_tmp__/components/form/Checkbox.svelte.d.ts +25 -0
- package/dist/__package_types_tmp__/components/form/CheckboxKvPList.svelte.d.ts +22 -0
- package/dist/__package_types_tmp__/components/form/CheckboxList.svelte.d.ts +20 -0
- package/dist/__package_types_tmp__/components/form/DateInput.svelte.d.ts +27 -0
- package/dist/__package_types_tmp__/components/form/Dropdown.svelte.d.ts +45 -0
- package/dist/__package_types_tmp__/components/form/DropdownKvP.svelte.d.ts +47 -0
- package/dist/__package_types_tmp__/components/form/InputContainer.svelte.d.ts +22 -0
- package/dist/__package_types_tmp__/components/form/MultiSelect.svelte.d.ts +79 -0
- package/dist/__package_types_tmp__/components/form/NumberInput.svelte.d.ts +28 -0
- package/dist/__package_types_tmp__/components/form/TextArea.svelte.d.ts +28 -0
- package/dist/__package_types_tmp__/components/form/TextInput.svelte.d.ts +28 -0
- package/dist/__package_types_tmp__/components/page/Alert.svelte.d.ts +22 -0
- package/dist/__package_types_tmp__/components/page/BackToTop.svelte.d.ts +23 -0
- package/dist/__package_types_tmp__/components/page/Docs.svelte.d.ts +18 -0
- package/dist/__package_types_tmp__/components/page/ErrorMessage.svelte.d.ts +16 -0
- package/dist/__package_types_tmp__/components/page/Footer.svelte.d.ts +14 -0
- package/dist/__package_types_tmp__/components/page/GoToTop.svelte.d.ts +23 -0
- package/dist/__package_types_tmp__/components/page/Header.svelte.d.ts +14 -0
- package/dist/__package_types_tmp__/components/page/HelpPopUp.svelte.d.ts +16 -0
- package/dist/__package_types_tmp__/components/page/Notification.svelte.d.ts +14 -0
- package/dist/__package_types_tmp__/components/page/Page.svelte.d.ts +30 -0
- package/dist/__package_types_tmp__/components/page/PageCaller.d.ts +3 -0
- package/dist/__package_types_tmp__/components/page/Spinner.svelte.d.ts +19 -0
- package/dist/__package_types_tmp__/components/page/TablePlaceholder.svelte.d.ts +17 -0
- package/dist/__package_types_tmp__/components/page/breadcrumb/Breadcrumb.svelte.d.ts +16 -0
- package/dist/__package_types_tmp__/components/page/breadcrumb/BreadcrumbDataCaller.d.ts +1 -0
- package/dist/__package_types_tmp__/components/page/menu/Menu.svelte.d.ts +14 -0
- package/dist/__package_types_tmp__/components/page/menu/MenuAccountBar.svelte.d.ts +17 -0
- package/dist/__package_types_tmp__/components/page/menu/MenuBar.svelte.d.ts +17 -0
- package/dist/__package_types_tmp__/components/page/menu/MenuDataCaller.d.ts +1 -0
- package/dist/__package_types_tmp__/components/page/menu/MenuItem.svelte.d.ts +18 -0
- package/dist/__package_types_tmp__/components/page/menu/MenuSublist.svelte.d.ts +17 -0
- package/dist/__package_types_tmp__/components/page/menu/SettingsBar.svelte.d.ts +17 -0
- package/dist/__package_types_tmp__/components/toggle/Toggle.svelte.d.ts +31 -0
- package/dist/__package_types_tmp__/index.d.ts +47 -0
- package/dist/__package_types_tmp__/models/Enums.d.ts +51 -0
- package/dist/__package_types_tmp__/models/Models.d.ts +196 -0
- package/dist/__package_types_tmp__/models/Page.d.ts +32 -0
- package/dist/__package_types_tmp__/services/Api.d.ts +7 -0
- package/dist/__package_types_tmp__/services/BaseCaller.d.ts +1 -0
- package/dist/__package_types_tmp__/stores/apiStores.d.ts +8 -0
- package/dist/__package_types_tmp__/stores/pageStores.d.ts +34 -0
- package/dist/__package_types_tmp__/themes/theme-bexis2.d.ts +2 -0
- package/dist/components/form/Dropdown.svelte +45 -0
- package/dist/components/form/Dropdown.svelte.d.ts +45 -0
- package/dist/components/form/MultiSelect.svelte +26 -5
- package/dist/components/form/MultiSelect.svelte.d.ts +2 -0
- package/package.json +63 -63
- package/src/lib/components/form/Dropdown.svelte +45 -0
- package/src/lib/components/form/MultiSelect.svelte +26 -5
- package/dist/MarkdownReder.svelte +0 -7
- package/dist/MarkdownReder.svelte.d.ts +0 -16
- package/dist/css/themes/theme-bexis2.d.ts +0 -2
- package/dist/css/themes/theme-bexis2.js +0 -229
- package/dist/md/Images/create_party.png +0 -0
- package/dist/md/Images/view_parties.png +0 -0
- package/dist/md.d.ts +0 -7
- package/dist/md.js +0 -52
- package/src/lib/MarkdownReder.svelte +0 -8
- package/src/lib/css/themes/theme-bexis2.js +0 -229
- package/src/lib/md/Images/create_party.png +0 -0
- package/src/lib/md/Images/view_parties.png +0 -0
- package/src/lib/md.ts +0 -73
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare enum positionType {
|
|
2
|
+
start = "start",
|
|
3
|
+
end = "end",
|
|
4
|
+
center = "center"
|
|
5
|
+
}
|
|
6
|
+
export declare enum pageContentLayoutType {
|
|
7
|
+
full = "full",
|
|
8
|
+
center = "center"
|
|
9
|
+
}
|
|
10
|
+
export declare enum decimalCharacterType {
|
|
11
|
+
point = 0,
|
|
12
|
+
comma = 1
|
|
13
|
+
}
|
|
14
|
+
export declare enum orientationType {
|
|
15
|
+
columnwise = 0,
|
|
16
|
+
rowwise = 1
|
|
17
|
+
}
|
|
18
|
+
export declare enum textSeperatorType {
|
|
19
|
+
tab = 9,
|
|
20
|
+
comma = 44,
|
|
21
|
+
semicolon = 59,
|
|
22
|
+
space = 32
|
|
23
|
+
}
|
|
24
|
+
export declare enum textMarkerType {
|
|
25
|
+
quotes = 0,
|
|
26
|
+
doubleQuotes = 1
|
|
27
|
+
}
|
|
28
|
+
export declare enum notificationType {
|
|
29
|
+
success = 0,
|
|
30
|
+
warning = 1,
|
|
31
|
+
error = 2,
|
|
32
|
+
surface = 3
|
|
33
|
+
}
|
|
34
|
+
export declare enum FilterOptionsEnum {
|
|
35
|
+
'e' = "e",// Equal to
|
|
36
|
+
'ne' = "ne",// Not equal to
|
|
37
|
+
'gt' = "gt",// Greater than
|
|
38
|
+
'lt' = "lt",// Less than
|
|
39
|
+
'gte' = "gte",// Greater than or equal to
|
|
40
|
+
'lte' = "lte",// Less than or equal to
|
|
41
|
+
'c' = "c",// Contains
|
|
42
|
+
'nc' = "nc",// Does not contain
|
|
43
|
+
'sw' = "sw",// Starts with
|
|
44
|
+
'ew' = "ew",// Ends with,
|
|
45
|
+
'o' = "o",// On (date)
|
|
46
|
+
'sf' = "sf",// Starting from (date)
|
|
47
|
+
'a' = "a",// After (date)
|
|
48
|
+
'u' = "u",// Until (date)
|
|
49
|
+
'b' = "b",// Before (date)
|
|
50
|
+
'no' = "no"
|
|
51
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import type { SvelteComponent } from 'svelte';
|
|
2
|
+
import type { ColumnFilterFn } from 'svelte-headless-table/lib/plugins';
|
|
3
|
+
import type { Writable } from 'svelte/store';
|
|
4
|
+
import type { FilterOptionsEnum, decimalCharacterType, notificationType, orientationType, textMarkerType, textSeperatorType } from './Enums';
|
|
5
|
+
export interface linkType {
|
|
6
|
+
label: string;
|
|
7
|
+
url: string;
|
|
8
|
+
}
|
|
9
|
+
export interface inputType {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
feedback: string[];
|
|
13
|
+
invalid: boolean;
|
|
14
|
+
valid: boolean;
|
|
15
|
+
required: boolean;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
}
|
|
18
|
+
export interface fileInfoType {
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
length: number;
|
|
22
|
+
description: string;
|
|
23
|
+
validationHash: string;
|
|
24
|
+
}
|
|
25
|
+
export interface fileUploaderType {
|
|
26
|
+
accept: string[];
|
|
27
|
+
existingFiles: fileInfoType[];
|
|
28
|
+
descriptionType: number;
|
|
29
|
+
multiple: boolean;
|
|
30
|
+
maxSize: number;
|
|
31
|
+
}
|
|
32
|
+
export interface asciiFileReaderInfoType extends fileReaderInfoType {
|
|
33
|
+
cells: boolean[];
|
|
34
|
+
seperator: textSeperatorType;
|
|
35
|
+
textMarker: textMarkerType;
|
|
36
|
+
}
|
|
37
|
+
export interface fileReaderInfoType {
|
|
38
|
+
decimal: decimalCharacterType;
|
|
39
|
+
orientation: orientationType;
|
|
40
|
+
offset: number;
|
|
41
|
+
variables: number;
|
|
42
|
+
data: number;
|
|
43
|
+
unit: number;
|
|
44
|
+
description: number;
|
|
45
|
+
dateformat: string;
|
|
46
|
+
}
|
|
47
|
+
export interface filesType {
|
|
48
|
+
accepted: Blob[];
|
|
49
|
+
rejected: Blob[];
|
|
50
|
+
}
|
|
51
|
+
export type userType = {
|
|
52
|
+
name: string;
|
|
53
|
+
};
|
|
54
|
+
export interface fileObjType {
|
|
55
|
+
path: string;
|
|
56
|
+
lastModified: number;
|
|
57
|
+
lastModifiedDate: Date;
|
|
58
|
+
name: string;
|
|
59
|
+
size: number;
|
|
60
|
+
type: string;
|
|
61
|
+
webkitRelativePath: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ColumnInstructions {
|
|
64
|
+
toStringFn?: (any: any) => string;
|
|
65
|
+
toSortableValueFn?: (any: any) => string | number;
|
|
66
|
+
toFilterableValueFn?: (any: any) => string | number | Date;
|
|
67
|
+
renderComponent?: typeof SvelteComponent;
|
|
68
|
+
}
|
|
69
|
+
export interface Column {
|
|
70
|
+
header?: string;
|
|
71
|
+
exclude?: boolean;
|
|
72
|
+
instructions?: ColumnInstructions;
|
|
73
|
+
disableFiltering?: boolean;
|
|
74
|
+
disableSorting?: boolean;
|
|
75
|
+
colFilterFn?: ColumnFilterFn;
|
|
76
|
+
colFilterComponent?: typeof SvelteComponent;
|
|
77
|
+
minWidth?: number;
|
|
78
|
+
fixedWidth?: number;
|
|
79
|
+
}
|
|
80
|
+
export interface Columns {
|
|
81
|
+
[key: string]: Column;
|
|
82
|
+
}
|
|
83
|
+
export type ServerConfig = {
|
|
84
|
+
baseUrl?: string;
|
|
85
|
+
sendModel?: Send;
|
|
86
|
+
entityId?: number;
|
|
87
|
+
versionId?: number;
|
|
88
|
+
};
|
|
89
|
+
export interface TableConfig<T> {
|
|
90
|
+
id: string;
|
|
91
|
+
data: Writable<T[]>;
|
|
92
|
+
resizable?: 'none' | 'rows' | 'columns' | 'both';
|
|
93
|
+
showColumnsMenu?: boolean;
|
|
94
|
+
toggle?: boolean;
|
|
95
|
+
search?: boolean;
|
|
96
|
+
fitToScreen?: boolean;
|
|
97
|
+
height?: null | number;
|
|
98
|
+
rowHeight?: number;
|
|
99
|
+
columns?: Columns;
|
|
100
|
+
exportable?: boolean;
|
|
101
|
+
pageSizes?: number[];
|
|
102
|
+
defaultPageSize?: number;
|
|
103
|
+
optionsComponent?: typeof SvelteComponent;
|
|
104
|
+
server?: ServerConfig;
|
|
105
|
+
}
|
|
106
|
+
export interface keyValuePairType {
|
|
107
|
+
id: number;
|
|
108
|
+
text: string;
|
|
109
|
+
}
|
|
110
|
+
export interface listItemType {
|
|
111
|
+
id: number;
|
|
112
|
+
text: string;
|
|
113
|
+
group: string;
|
|
114
|
+
description: string;
|
|
115
|
+
}
|
|
116
|
+
export interface helpItemType {
|
|
117
|
+
id?: string;
|
|
118
|
+
name: string;
|
|
119
|
+
description: string;
|
|
120
|
+
link?: string;
|
|
121
|
+
}
|
|
122
|
+
export interface helpStoreType {
|
|
123
|
+
itemId?: string;
|
|
124
|
+
helpItems: helpItemType[];
|
|
125
|
+
}
|
|
126
|
+
export interface notificationItemType {
|
|
127
|
+
notificationType?: notificationType;
|
|
128
|
+
message: string;
|
|
129
|
+
}
|
|
130
|
+
export interface notificationStoreType {
|
|
131
|
+
notificationType: notificationType;
|
|
132
|
+
message: string;
|
|
133
|
+
btnStyle: string;
|
|
134
|
+
}
|
|
135
|
+
export type ServerColumn = {
|
|
136
|
+
column: string;
|
|
137
|
+
key: string;
|
|
138
|
+
exclude?: boolean;
|
|
139
|
+
instructions?: {
|
|
140
|
+
missingValues?: {
|
|
141
|
+
[key: string | number]: string;
|
|
142
|
+
};
|
|
143
|
+
displayPattern?: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export type OrderBy = {
|
|
147
|
+
column: string;
|
|
148
|
+
direction: 'asc' | 'desc';
|
|
149
|
+
};
|
|
150
|
+
export type Filter = {
|
|
151
|
+
column: string;
|
|
152
|
+
filterBy: FilterOptionsEnum;
|
|
153
|
+
value: string | number | Date | boolean;
|
|
154
|
+
};
|
|
155
|
+
export interface FacetOption {
|
|
156
|
+
name: string;
|
|
157
|
+
displayName: string;
|
|
158
|
+
count?: number;
|
|
159
|
+
selected?: boolean;
|
|
160
|
+
}
|
|
161
|
+
export interface FacetGroup {
|
|
162
|
+
name: string;
|
|
163
|
+
displayName: string;
|
|
164
|
+
selected?: boolean;
|
|
165
|
+
children: FacetOption[];
|
|
166
|
+
count?: number;
|
|
167
|
+
}
|
|
168
|
+
export interface SelectedFacetGroup extends Omit<FacetGroup, 'children'> {
|
|
169
|
+
children: {
|
|
170
|
+
[key: string]: FacetOption;
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
export declare class Send {
|
|
174
|
+
id: number;
|
|
175
|
+
limit: number;
|
|
176
|
+
offset: number;
|
|
177
|
+
q: string;
|
|
178
|
+
version?: number;
|
|
179
|
+
filter: Filter[];
|
|
180
|
+
order: OrderBy[];
|
|
181
|
+
constructor();
|
|
182
|
+
}
|
|
183
|
+
export declare class Receive {
|
|
184
|
+
count: number;
|
|
185
|
+
data: any[];
|
|
186
|
+
send: Send;
|
|
187
|
+
columns?: ServerColumn[];
|
|
188
|
+
constructor();
|
|
189
|
+
}
|
|
190
|
+
export declare class errorType {
|
|
191
|
+
statusText: string;
|
|
192
|
+
status: number;
|
|
193
|
+
error: string;
|
|
194
|
+
stackTrace: string;
|
|
195
|
+
constructor();
|
|
196
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/********************************** */
|
|
2
|
+
export interface breadcrumbItemType {
|
|
3
|
+
label: string;
|
|
4
|
+
link: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class BreadcrumbModel {
|
|
7
|
+
items: breadcrumbItemType[];
|
|
8
|
+
constructor();
|
|
9
|
+
}
|
|
10
|
+
/********************************** */
|
|
11
|
+
export declare class MenuModel {
|
|
12
|
+
Logo: logoType;
|
|
13
|
+
LaunchBar: menuItemType[];
|
|
14
|
+
MenuBar: menuItemType[];
|
|
15
|
+
AccountBar: menuItemType[];
|
|
16
|
+
Settings: menuItemType[];
|
|
17
|
+
Extended: menuItemType[];
|
|
18
|
+
}
|
|
19
|
+
export interface menuItemType {
|
|
20
|
+
Title: string;
|
|
21
|
+
Url: string;
|
|
22
|
+
Target: string;
|
|
23
|
+
Module: string;
|
|
24
|
+
Internal: boolean;
|
|
25
|
+
Items: menuItemType[];
|
|
26
|
+
}
|
|
27
|
+
export interface logoType {
|
|
28
|
+
Mime: string;
|
|
29
|
+
Name: string;
|
|
30
|
+
Data: string;
|
|
31
|
+
Height: number;
|
|
32
|
+
}
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function goTo(url: any, intern?: boolean, target?: string): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { errorType } from '$models/Models';
|
|
2
|
+
export declare let host: string;
|
|
3
|
+
export declare let username: string;
|
|
4
|
+
export declare let password: string;
|
|
5
|
+
export declare let csrfToken: string;
|
|
6
|
+
export declare const csrfTokenStore: import("svelte/store").Writable<string>;
|
|
7
|
+
export declare const errorStore: import("svelte/store").Writable<errorType>;
|
|
8
|
+
export declare function setApiConfig(_host: string, _user: string, _pw: string): void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { helpItemType, helpStoreType, notificationItemType, notificationStoreType } from '$models/Models';
|
|
2
|
+
import type { MenuModel, breadcrumbItemType } from '$models/Page';
|
|
3
|
+
import { BreadcrumbModel } from '$models/Page';
|
|
4
|
+
export declare const helpStore: {
|
|
5
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<helpStoreType>, invalidate?: import("svelte/store").Invalidator<helpStoreType> | undefined) => import("svelte/store").Unsubscriber;
|
|
6
|
+
set: (this: void, value: helpStoreType) => void;
|
|
7
|
+
update: (this: void, updater: import("svelte/store").Updater<helpStoreType>) => void;
|
|
8
|
+
setHelpItemList: (helpItems: helpItemType[]) => void;
|
|
9
|
+
setItemId: (itemId: string) => void;
|
|
10
|
+
resetItemId: () => void;
|
|
11
|
+
show: (itemId: string) => void;
|
|
12
|
+
showHelpItem: (helpItem: helpItemType) => void;
|
|
13
|
+
hide: () => void;
|
|
14
|
+
toggle: (itemId: string) => void;
|
|
15
|
+
reset: () => void;
|
|
16
|
+
clear: () => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const menuStore: import("svelte/store").Writable<MenuModel>;
|
|
19
|
+
export declare const breadcrumbStore: {
|
|
20
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<BreadcrumbModel>, invalidate?: import("svelte/store").Invalidator<BreadcrumbModel> | undefined) => import("svelte/store").Unsubscriber;
|
|
21
|
+
set: (this: void, value: BreadcrumbModel) => void;
|
|
22
|
+
update: (this: void, updater: import("svelte/store").Updater<BreadcrumbModel>) => void;
|
|
23
|
+
addItem: (item: breadcrumbItemType) => void;
|
|
24
|
+
updateItem: (item: breadcrumbItemType) => void;
|
|
25
|
+
clean: () => void;
|
|
26
|
+
};
|
|
27
|
+
export declare const notificationStore: {
|
|
28
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<notificationStoreType>, invalidate?: import("svelte/store").Invalidator<notificationStoreType> | undefined) => import("svelte/store").Unsubscriber;
|
|
29
|
+
set: (this: void, value: notificationStoreType) => void;
|
|
30
|
+
update: (this: void, updater: import("svelte/store").Updater<notificationStoreType>) => void;
|
|
31
|
+
setNotification: (notificationItem: notificationItemType) => void;
|
|
32
|
+
showNotification: (notificationItem: notificationItemType) => void;
|
|
33
|
+
getBtnStyle: () => string;
|
|
34
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
export let id;
|
|
5
|
+
export let source;
|
|
6
|
+
export let target;
|
|
7
|
+
export let title;
|
|
8
|
+
export let valid = false;
|
|
9
|
+
export let invalid = false;
|
|
10
|
+
export let feedback = [''];
|
|
11
|
+
export let required = false;
|
|
12
|
+
export let help = false;
|
|
13
|
+
|
|
14
|
+
$: selected = null;
|
|
15
|
+
|
|
16
|
+
$: updatedSelectedValue(target);
|
|
17
|
+
$: updatedTarget(selected);
|
|
18
|
+
|
|
19
|
+
function updatedSelectedValue(selection) {
|
|
20
|
+
if (selection != null) {
|
|
21
|
+
selected = selection;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function updatedTarget(value) {
|
|
26
|
+
target = value;
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
31
|
+
<select
|
|
32
|
+
{id}
|
|
33
|
+
class="select variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
|
|
34
|
+
class:input-success={valid}
|
|
35
|
+
class:input-error={invalid}
|
|
36
|
+
bind:value={selected}
|
|
37
|
+
on:change
|
|
38
|
+
on:select
|
|
39
|
+
>
|
|
40
|
+
<option value={null}>-- Please select --</option>
|
|
41
|
+
{#each source as v}
|
|
42
|
+
<option value={v}>{v}</option>
|
|
43
|
+
{/each}
|
|
44
|
+
</select>
|
|
45
|
+
</InputContainer>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} DropdownProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} DropdownEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} DropdownSlots */
|
|
4
|
+
export default class Dropdown extends SvelteComponent<{
|
|
5
|
+
id: any;
|
|
6
|
+
target: any;
|
|
7
|
+
title: any;
|
|
8
|
+
source: any;
|
|
9
|
+
invalid?: boolean | undefined;
|
|
10
|
+
feedback?: string[] | undefined;
|
|
11
|
+
required?: boolean | undefined;
|
|
12
|
+
help?: boolean | undefined;
|
|
13
|
+
valid?: boolean | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
change: Event;
|
|
16
|
+
select: Event;
|
|
17
|
+
} & {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
}, {}> {
|
|
20
|
+
}
|
|
21
|
+
export type DropdownProps = typeof __propDef.props;
|
|
22
|
+
export type DropdownEvents = typeof __propDef.events;
|
|
23
|
+
export type DropdownSlots = typeof __propDef.slots;
|
|
24
|
+
import { SvelteComponent } from "svelte";
|
|
25
|
+
declare const __propDef: {
|
|
26
|
+
props: {
|
|
27
|
+
id: any;
|
|
28
|
+
target: any;
|
|
29
|
+
title: any;
|
|
30
|
+
source: any;
|
|
31
|
+
invalid?: boolean | undefined;
|
|
32
|
+
feedback?: string[] | undefined;
|
|
33
|
+
required?: boolean | undefined;
|
|
34
|
+
help?: boolean | undefined;
|
|
35
|
+
valid?: boolean | undefined;
|
|
36
|
+
};
|
|
37
|
+
events: {
|
|
38
|
+
change: Event;
|
|
39
|
+
select: Event;
|
|
40
|
+
} & {
|
|
41
|
+
[evt: string]: CustomEvent<any>;
|
|
42
|
+
};
|
|
43
|
+
slots: {};
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
@@ -23,10 +23,11 @@
|
|
|
23
23
|
export let help = false;
|
|
24
24
|
export let clearable = true;
|
|
25
25
|
export let disabled = false;
|
|
26
|
+
export let searchable = true;
|
|
26
27
|
|
|
27
28
|
let isLoaded = false;
|
|
28
29
|
|
|
29
|
-
$: value =
|
|
30
|
+
$: value = '';
|
|
30
31
|
$: updateTarget(value);
|
|
31
32
|
$: target, setValue(target);
|
|
32
33
|
|
|
@@ -141,10 +142,28 @@
|
|
|
141
142
|
if (!isMulti) {
|
|
142
143
|
//console.log("onmount",complexSource,complexTarget,value,target)
|
|
143
144
|
if (!complexSource && !complexTarget) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
if(groupBy) { // if groupby is set, the value needs to be set as object with label and value, otherwise the select component does not recognize the value
|
|
148
|
+
value = {
|
|
149
|
+
value: t,
|
|
150
|
+
label: t
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
else // if there is no groupby, the value can be set as simple value, otherwise the select component does not recognize the value
|
|
154
|
+
{
|
|
155
|
+
if(t === null || t === undefined || t === '') {
|
|
156
|
+
value = ''
|
|
157
|
+
}
|
|
158
|
+
else
|
|
159
|
+
{
|
|
160
|
+
value = {
|
|
161
|
+
value: t,
|
|
162
|
+
label: t
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
148
167
|
}
|
|
149
168
|
|
|
150
169
|
if (complexSource && complexTarget) {
|
|
@@ -291,10 +310,12 @@
|
|
|
291
310
|
multiple={isMulti}
|
|
292
311
|
bind:value
|
|
293
312
|
{placeholder}
|
|
313
|
+
|
|
294
314
|
hasError={invalid}
|
|
295
315
|
{loading}
|
|
296
316
|
{clearable}
|
|
297
317
|
{disabled}
|
|
318
|
+
{searchable}
|
|
298
319
|
filter={filterFn}
|
|
299
320
|
on:change
|
|
300
321
|
on:input
|
|
@@ -20,6 +20,7 @@ export default class MultiSelect extends SvelteComponent<{
|
|
|
20
20
|
loading?: boolean | undefined;
|
|
21
21
|
clearable?: boolean | undefined;
|
|
22
22
|
disabled?: boolean | undefined;
|
|
23
|
+
searchable?: boolean | undefined;
|
|
23
24
|
}, {
|
|
24
25
|
change: CustomEvent<any>;
|
|
25
26
|
input: CustomEvent<any>;
|
|
@@ -58,6 +59,7 @@ declare const __propDef: {
|
|
|
58
59
|
loading?: boolean | undefined;
|
|
59
60
|
clearable?: boolean | undefined;
|
|
60
61
|
disabled?: boolean | undefined;
|
|
62
|
+
searchable?: boolean | undefined;
|
|
61
63
|
};
|
|
62
64
|
events: {
|
|
63
65
|
change: CustomEvent<any>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bexis2/bexis2-core-ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.66",
|
|
4
4
|
"private": false,
|
|
5
|
+
"description": "Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"bexis2",
|
|
8
|
+
"libary"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/BEXIS2/bexis2-core-ui#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/BEXIS2/bexis2-core-ui/issues"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/BEXIS2/bexis2-core-ui.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"author": "David Schöne",
|
|
20
|
+
"type": "module",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"svelte": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./dist/index.css": {
|
|
27
|
+
"import": "./dist/index.css",
|
|
28
|
+
"require": "./dist/index.css"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"main": "./src/lib/index.d.ts",
|
|
32
|
+
"types": "./src/lib/index.d.ts",
|
|
33
|
+
"directories": {
|
|
34
|
+
"test": "tests"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"src/lib"
|
|
39
|
+
],
|
|
5
40
|
"scripts": {
|
|
6
41
|
"dev": "vite dev",
|
|
7
42
|
"build": "vite build",
|
|
@@ -19,45 +54,6 @@
|
|
|
19
54
|
"2.npm - package": "svelte-package",
|
|
20
55
|
"3.npm - publish": "npm publish --access public"
|
|
21
56
|
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"@playwright/test": "^1.45.3",
|
|
24
|
-
"@skeletonlabs/skeleton": "^2.10.2",
|
|
25
|
-
"@skeletonlabs/tw-plugin": "^0.4.0",
|
|
26
|
-
"@sveltejs/adapter-auto": "^3.2.2",
|
|
27
|
-
"@sveltejs/adapter-static": "^3.0.2",
|
|
28
|
-
"@sveltejs/package": "^2.3.2",
|
|
29
|
-
"@tailwindcss/forms": "^0.5.7",
|
|
30
|
-
"@tailwindcss/typography": "^0.5.13",
|
|
31
|
-
"@types/node": "^22.0.2",
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
33
|
-
"@typescript-eslint/parser": "^8.0.0",
|
|
34
|
-
"autoprefixer": "^10.4.19",
|
|
35
|
-
"eslint": "^9.8.0",
|
|
36
|
-
"eslint-config-prettier": "^9.1.0",
|
|
37
|
-
"postcss": "^8.4.40",
|
|
38
|
-
"prettier": "^3.3.3",
|
|
39
|
-
"prettier-plugin-svelte": "^3.2.6",
|
|
40
|
-
"raw-loader": "^4.0.2",
|
|
41
|
-
"svelte": "^4.2.18",
|
|
42
|
-
"svelte-check": "^3.8.5",
|
|
43
|
-
"tailwindcss": "^3.4.7",
|
|
44
|
-
"tslib": "^2.6.3",
|
|
45
|
-
"typescript": "^5.5.4",
|
|
46
|
-
"vite": "^5.3.5",
|
|
47
|
-
"vitest": "^2.0.5"
|
|
48
|
-
},
|
|
49
|
-
"type": "module",
|
|
50
|
-
"module": "./src/lib/index.ts",
|
|
51
|
-
"types": "./src/lib/index.d.ts",
|
|
52
|
-
"description": "Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).",
|
|
53
|
-
"main": "./src/lib/index.d.ts",
|
|
54
|
-
"directories": {
|
|
55
|
-
"test": "tests"
|
|
56
|
-
},
|
|
57
|
-
"files": [
|
|
58
|
-
"dist",
|
|
59
|
-
"src/lib"
|
|
60
|
-
],
|
|
61
57
|
"dependencies": {
|
|
62
58
|
"@codemirror/lang-html": "^6.4.9",
|
|
63
59
|
"@codemirror/lang-javascript": "^6.2.2",
|
|
@@ -87,28 +83,32 @@
|
|
|
87
83
|
"svelte-select": "5.8.3",
|
|
88
84
|
"vest": "^5.4.0"
|
|
89
85
|
},
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
86
|
+
"devDependencies": {
|
|
87
|
+
"@playwright/test": "^1.45.3",
|
|
88
|
+
"@skeletonlabs/skeleton": "^2.10.2",
|
|
89
|
+
"@skeletonlabs/tw-plugin": "^0.4.0",
|
|
90
|
+
"@sveltejs/adapter-auto": "^3.2.2",
|
|
91
|
+
"@sveltejs/adapter-static": "^3.0.2",
|
|
92
|
+
"@sveltejs/package": "^2.3.2",
|
|
93
|
+
"@tailwindcss/forms": "^0.5.7",
|
|
94
|
+
"@tailwindcss/typography": "^0.5.13",
|
|
95
|
+
"@types/node": "^22.0.2",
|
|
96
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
97
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
98
|
+
"autoprefixer": "^10.4.19",
|
|
99
|
+
"eslint": "^9.8.0",
|
|
100
|
+
"eslint-config-prettier": "^9.1.0",
|
|
101
|
+
"postcss": "^8.4.40",
|
|
102
|
+
"prettier": "^3.3.3",
|
|
103
|
+
"prettier-plugin-svelte": "^3.2.6",
|
|
104
|
+
"raw-loader": "^4.0.2",
|
|
105
|
+
"svelte": "^4.2.18",
|
|
106
|
+
"svelte-check": "^3.8.5",
|
|
107
|
+
"tailwindcss": "^3.4.7",
|
|
108
|
+
"tslib": "^2.6.3",
|
|
109
|
+
"typescript": "^5.5.4",
|
|
110
|
+
"vite": "^5.3.5",
|
|
111
|
+
"vitest": "^2.0.5"
|
|
98
112
|
},
|
|
99
|
-
"
|
|
100
|
-
"keywords": [
|
|
101
|
-
"bexis2",
|
|
102
|
-
"libary"
|
|
103
|
-
],
|
|
104
|
-
"exports": {
|
|
105
|
-
".": {
|
|
106
|
-
"types": "./dist/index.d.ts",
|
|
107
|
-
"svelte": "./dist/index.js"
|
|
108
|
-
},
|
|
109
|
-
"./dist/index.css": {
|
|
110
|
-
"import": "./dist/index.css",
|
|
111
|
-
"require": "./dist/index.css"
|
|
112
|
-
}
|
|
113
|
-
}
|
|
113
|
+
"module": "./src/lib/index.ts"
|
|
114
114
|
}
|