@bexis2/bexis2-core-ui 0.0.31 → 0.1.0
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 +15 -0
- package/dist/components/form/DropdownKvP.svelte +17 -2
- package/dist/components/form/DropdownKvP.svelte.d.ts +2 -0
- package/dist/components/form/NumberInput.svelte +2 -0
- package/dist/components/form/NumberInput.svelte.d.ts +1 -0
- package/dist/components/form/TextArea.svelte +2 -0
- package/dist/components/form/TextArea.svelte.d.ts +1 -0
- package/dist/components/form/TextInput.svelte +2 -0
- package/dist/components/form/TextInput.svelte.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -0
- package/dist/models/Models.d.ts +10 -0
- package/package.json +1 -1
- package/src/lib/components/form/DropdownKvP.svelte +17 -2
- package/src/lib/components/form/NumberInput.svelte +2 -0
- package/src/lib/components/form/TextArea.svelte +2 -0
- package/src/lib/components/form/TextInput.svelte +3 -0
- package/src/lib/index.ts +7 -2
- package/src/lib/models/Models.ts +14 -0
package/README.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
# bexis-core-ui
|
|
2
|
+
## v.0.0.32
|
|
3
|
+
### add
|
|
4
|
+
#### types
|
|
5
|
+
- ListItem
|
|
6
|
+
- KvP
|
|
7
|
+
|
|
8
|
+
#### enum
|
|
9
|
+
- Position
|
|
10
|
+
|
|
11
|
+
### update
|
|
12
|
+
#### components
|
|
13
|
+
- DropdownKVP
|
|
14
|
+
- return of the target to complex or id only
|
|
15
|
+
- TextInput, TextArea, Number
|
|
16
|
+
- add placeholder
|
|
2
17
|
|
|
3
18
|
## v0.0.31
|
|
4
19
|
### add
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
export let invalid = false;
|
|
10
10
|
export let feedback = [''];
|
|
11
11
|
export let required = false;
|
|
12
|
+
export let targetIsComplex = false;
|
|
12
13
|
|
|
13
14
|
$: selected = null;
|
|
14
15
|
|
|
@@ -17,12 +18,26 @@
|
|
|
17
18
|
|
|
18
19
|
function updatedSelectedValue(selection) {
|
|
19
20
|
if (selection != null) {
|
|
20
|
-
|
|
21
|
+
if(targetIsComplex)
|
|
22
|
+
{
|
|
23
|
+
selected = selection.id;
|
|
24
|
+
}
|
|
25
|
+
else
|
|
26
|
+
{
|
|
27
|
+
selected = selection
|
|
28
|
+
}
|
|
21
29
|
}
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
function updatedTarget(id) {
|
|
25
|
-
|
|
33
|
+
if(targetIsComplex)
|
|
34
|
+
{
|
|
35
|
+
target = source.find((opt) => opt.id === id);
|
|
36
|
+
}
|
|
37
|
+
else
|
|
38
|
+
{
|
|
39
|
+
target = id;
|
|
40
|
+
}
|
|
26
41
|
}
|
|
27
42
|
</script>
|
|
28
43
|
|
|
@@ -10,6 +10,7 @@ export default class DropdownKvP extends SvelteComponentTyped<{
|
|
|
10
10
|
invalid?: boolean | undefined;
|
|
11
11
|
valid?: boolean | undefined;
|
|
12
12
|
feedback?: string[] | undefined;
|
|
13
|
+
targetIsComplex?: boolean | undefined;
|
|
13
14
|
}, {
|
|
14
15
|
change: Event;
|
|
15
16
|
select: Event;
|
|
@@ -31,6 +32,7 @@ declare const __propDef: {
|
|
|
31
32
|
invalid?: boolean | undefined;
|
|
32
33
|
valid?: boolean | undefined;
|
|
33
34
|
feedback?: string[] | undefined;
|
|
35
|
+
targetIsComplex?: boolean | undefined;
|
|
34
36
|
};
|
|
35
37
|
events: {
|
|
36
38
|
change: Event;
|
|
@@ -6,6 +6,7 @@ export let valid = false;
|
|
|
6
6
|
export let invalid = false;
|
|
7
7
|
export let required = false;
|
|
8
8
|
export let feedback = [""];
|
|
9
|
+
export let placeholder = "";
|
|
9
10
|
</script>
|
|
10
11
|
|
|
11
12
|
<InputContainer {label} {feedback} {required}>
|
|
@@ -17,5 +18,6 @@ export let feedback = [""];
|
|
|
17
18
|
class:input-error={invalid}
|
|
18
19
|
bind:value
|
|
19
20
|
on:input
|
|
21
|
+
{placeholder}
|
|
20
22
|
/>
|
|
21
23
|
</InputContainer>
|
|
@@ -6,6 +6,7 @@ export let valid = false;
|
|
|
6
6
|
export let invalid = false;
|
|
7
7
|
export let required = false;
|
|
8
8
|
export let feedback = [""];
|
|
9
|
+
export let placeholder = "";
|
|
9
10
|
</script>
|
|
10
11
|
|
|
11
12
|
<InputContainer {label} {feedback} {required}>
|
|
@@ -16,5 +17,6 @@ export let feedback = [""];
|
|
|
16
17
|
class:input-error={invalid}
|
|
17
18
|
bind:value
|
|
18
19
|
on:input
|
|
20
|
+
{placeholder}
|
|
19
21
|
/>
|
|
20
22
|
</InputContainer>
|
|
@@ -6,6 +6,7 @@ export let valid = false;
|
|
|
6
6
|
export let invalid = false;
|
|
7
7
|
export let required = false;
|
|
8
8
|
export let feedback = [""];
|
|
9
|
+
export let placeholder = "";
|
|
9
10
|
</script>
|
|
10
11
|
|
|
11
12
|
<InputContainer {label} {feedback} {required}>
|
|
@@ -17,5 +18,6 @@ export let feedback = [""];
|
|
|
17
18
|
class:input-error={invalid}
|
|
18
19
|
bind:value
|
|
19
20
|
on:input
|
|
21
|
+
{placeholder}
|
|
20
22
|
/>
|
|
21
23
|
</InputContainer>
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export { FileInfo, FileIcon, FileUploader };
|
|
|
24
24
|
export { ListView, TableView, Spinner, Page, Alert };
|
|
25
25
|
export { Api } from './services/Api.js';
|
|
26
26
|
export { host, username, password, setApiConfig } from './stores/apistore.js';
|
|
27
|
-
export type { user, Input, FileUploaderModel, Link } from './models/Models.js';
|
|
27
|
+
export type { user, Input, FileUploaderModel, Link, ListItem, KvP } from './models/Models.js';
|
|
28
|
+
export { Position } from './models/Enums';
|
|
28
29
|
export { Table, TableFilter, columnFilter, searchFilter };
|
|
29
30
|
export type { TableConfig, Columns, Column };
|
package/dist/index.js
CHANGED
|
@@ -30,5 +30,7 @@ export { ListView, TableView, Spinner, Page, Alert };
|
|
|
30
30
|
//Api
|
|
31
31
|
export { Api } from './services/Api.js';
|
|
32
32
|
export { host, username, password, setApiConfig } from './stores/apistore.js';
|
|
33
|
+
//enum
|
|
34
|
+
export { Position } from './models/Enums';
|
|
33
35
|
// Table
|
|
34
36
|
export { Table, TableFilter, columnFilter, searchFilter };
|
package/dist/models/Models.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export interface Input {
|
|
|
12
12
|
invalid: boolean;
|
|
13
13
|
valid: boolean;
|
|
14
14
|
required: boolean;
|
|
15
|
+
placeholder: string;
|
|
15
16
|
}
|
|
16
17
|
export interface FileInfo {
|
|
17
18
|
name: string;
|
|
@@ -69,3 +70,12 @@ export interface TableConfig<T> {
|
|
|
69
70
|
defaultPageSize?: number;
|
|
70
71
|
optionsComponent?: typeof SvelteComponent;
|
|
71
72
|
}
|
|
73
|
+
export interface KvP {
|
|
74
|
+
id: number;
|
|
75
|
+
text: string;
|
|
76
|
+
}
|
|
77
|
+
export interface ListItem {
|
|
78
|
+
id: number;
|
|
79
|
+
text: string;
|
|
80
|
+
group: string;
|
|
81
|
+
}
|
package/package.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
export let invalid = false;
|
|
10
10
|
export let feedback = [''];
|
|
11
11
|
export let required = false;
|
|
12
|
+
export let targetIsComplex = false;
|
|
12
13
|
|
|
13
14
|
$: selected = null;
|
|
14
15
|
|
|
@@ -17,12 +18,26 @@
|
|
|
17
18
|
|
|
18
19
|
function updatedSelectedValue(selection) {
|
|
19
20
|
if (selection != null) {
|
|
20
|
-
|
|
21
|
+
if(targetIsComplex)
|
|
22
|
+
{
|
|
23
|
+
selected = selection.id;
|
|
24
|
+
}
|
|
25
|
+
else
|
|
26
|
+
{
|
|
27
|
+
selected = selection
|
|
28
|
+
}
|
|
21
29
|
}
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
function updatedTarget(id) {
|
|
25
|
-
|
|
33
|
+
if(targetIsComplex)
|
|
34
|
+
{
|
|
35
|
+
target = source.find((opt) => opt.id === id);
|
|
36
|
+
}
|
|
37
|
+
else
|
|
38
|
+
{
|
|
39
|
+
target = id;
|
|
40
|
+
}
|
|
26
41
|
}
|
|
27
42
|
</script>
|
|
28
43
|
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
export let invalid: boolean = false;
|
|
10
10
|
export let required: boolean = false;
|
|
11
11
|
export let feedback: string[] = [''];
|
|
12
|
+
export let placeholder: string = "";
|
|
12
13
|
</script>
|
|
13
14
|
|
|
14
15
|
<InputContainer {label} {feedback} {required}>
|
|
@@ -20,5 +21,6 @@
|
|
|
20
21
|
class:input-error={invalid}
|
|
21
22
|
bind:value
|
|
22
23
|
on:input
|
|
24
|
+
{placeholder}
|
|
23
25
|
/>
|
|
24
26
|
</InputContainer>
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
export let invalid: boolean = false;
|
|
10
10
|
export let required: boolean = false;
|
|
11
11
|
export let feedback: string[] = [''];
|
|
12
|
+
export let placeholder: string = "";
|
|
12
13
|
</script>
|
|
13
14
|
|
|
14
15
|
<InputContainer {label} {feedback} {required}>
|
|
@@ -19,5 +20,6 @@
|
|
|
19
20
|
class:input-error={invalid}
|
|
20
21
|
bind:value
|
|
21
22
|
on:input
|
|
23
|
+
{placeholder}
|
|
22
24
|
/>
|
|
23
25
|
</InputContainer>
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
export let invalid: boolean = false;
|
|
10
10
|
export let required: boolean = false;
|
|
11
11
|
export let feedback: string[] = [''];
|
|
12
|
+
export let placeholder: string ="";
|
|
13
|
+
|
|
12
14
|
</script>
|
|
13
15
|
|
|
14
16
|
<InputContainer {label} {feedback} {required}>
|
|
@@ -20,5 +22,6 @@
|
|
|
20
22
|
class:input-error={invalid}
|
|
21
23
|
bind:value
|
|
22
24
|
on:input
|
|
25
|
+
{placeholder}
|
|
23
26
|
/>
|
|
24
27
|
</InputContainer>
|
package/src/lib/index.ts
CHANGED
|
@@ -55,8 +55,13 @@ export type {
|
|
|
55
55
|
user,
|
|
56
56
|
Input,
|
|
57
57
|
FileUploaderModel,
|
|
58
|
-
Link
|
|
59
|
-
|
|
58
|
+
Link,
|
|
59
|
+
ListItem,
|
|
60
|
+
KvP
|
|
61
|
+
} from './models/Models.js';
|
|
62
|
+
|
|
63
|
+
//enum
|
|
64
|
+
export { Position } from './models/Enums';
|
|
60
65
|
|
|
61
66
|
// Table
|
|
62
67
|
export { Table, TableFilter, columnFilter, searchFilter };
|
package/src/lib/models/Models.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface Input {
|
|
|
18
18
|
invalid: boolean;
|
|
19
19
|
valid: boolean;
|
|
20
20
|
required: boolean;
|
|
21
|
+
placeholder:string;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export interface FileInfo {
|
|
@@ -86,3 +87,16 @@ export interface TableConfig<T> {
|
|
|
86
87
|
defaultPageSize?: number;
|
|
87
88
|
optionsComponent?: typeof SvelteComponent;
|
|
88
89
|
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
// lists
|
|
93
|
+
export interface KvP {
|
|
94
|
+
id: number;
|
|
95
|
+
text: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface ListItem {
|
|
99
|
+
id: number;
|
|
100
|
+
text: string;
|
|
101
|
+
group: string;
|
|
102
|
+
}
|