@bexis2/bexis2-core-ui 0.1.4 → 0.1.5
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 +12 -0
- package/dist/components/Table/TableFilter.svelte +1 -1
- package/dist/components/form/DropdownKvP.svelte +3 -3
- package/dist/components/form/DropdownKvP.svelte.d.ts +2 -2
- package/dist/components/form/MultiSelect.svelte +12 -12
- package/dist/components/form/MultiSelect.svelte.d.ts +6 -6
- package/package.json +1 -1
- package/src/lib/components/Table/TableFilter.svelte +1 -1
- package/src/lib/components/form/DropdownKvP.svelte +3 -3
- package/src/lib/components/form/MultiSelect.svelte +12 -12
package/README.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# bexis-core-ui
|
|
2
2
|
|
|
3
|
+
## v0.1.5
|
|
4
|
+
### update
|
|
5
|
+
- MultiSelect
|
|
6
|
+
- isTargetComplex -> complexTarget
|
|
7
|
+
- isComplex -> complexSource
|
|
8
|
+
- DropdownKVP
|
|
9
|
+
- targetIsComplex -> complexTarget
|
|
10
|
+
|
|
11
|
+
## v0.1.4
|
|
12
|
+
> test for deploy
|
|
13
|
+
|
|
14
|
+
|
|
3
15
|
## v0.1.3
|
|
4
16
|
> test table
|
|
5
17
|
|
|
@@ -207,7 +207,7 @@ if (type === "object") {
|
|
|
207
207
|
on:click|preventDefault={() => {
|
|
208
208
|
active = firstValue?.toString().length > 0 || secondValue?.toString().length > 0;
|
|
209
209
|
$filterValue = [firstOption, firstValue, secondOption, secondValue];
|
|
210
|
-
}}>
|
|
210
|
+
}}>Apply</button
|
|
211
211
|
>
|
|
212
212
|
</div>
|
|
213
213
|
</div>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
export let invalid = false;
|
|
10
10
|
export let feedback = [''];
|
|
11
11
|
export let required = false;
|
|
12
|
-
export let
|
|
12
|
+
export let complexTarget = false;
|
|
13
13
|
|
|
14
14
|
$: selected = null;
|
|
15
15
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
function updatedSelectedValue(selection) {
|
|
20
20
|
if (selection != null) {
|
|
21
|
-
if(
|
|
21
|
+
if(complexTarget)
|
|
22
22
|
{
|
|
23
23
|
selected = selection.id;
|
|
24
24
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function updatedTarget(id) {
|
|
33
|
-
if(
|
|
33
|
+
if(complexTarget)
|
|
34
34
|
{
|
|
35
35
|
target = source.find((opt) => opt.id === id);
|
|
36
36
|
}
|
|
@@ -10,7 +10,7 @@ export default class DropdownKvP extends SvelteComponentTyped<{
|
|
|
10
10
|
invalid?: boolean | undefined;
|
|
11
11
|
valid?: boolean | undefined;
|
|
12
12
|
feedback?: string[] | undefined;
|
|
13
|
-
|
|
13
|
+
complexTarget?: boolean | undefined;
|
|
14
14
|
}, {
|
|
15
15
|
change: Event;
|
|
16
16
|
select: Event;
|
|
@@ -32,7 +32,7 @@ declare const __propDef: {
|
|
|
32
32
|
invalid?: boolean | undefined;
|
|
33
33
|
valid?: boolean | undefined;
|
|
34
34
|
feedback?: string[] | undefined;
|
|
35
|
-
|
|
35
|
+
complexTarget?: boolean | undefined;
|
|
36
36
|
};
|
|
37
37
|
events: {
|
|
38
38
|
change: Event;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
export let target;
|
|
9
9
|
export let title;
|
|
10
10
|
export let itemId = 'value';
|
|
11
|
-
export let
|
|
11
|
+
export let itemLabel = 'label';
|
|
12
12
|
export let isMulti = true;
|
|
13
|
-
export let
|
|
14
|
-
export let
|
|
13
|
+
export let complexSource = false;
|
|
14
|
+
export let complexTarget = false;
|
|
15
15
|
export let required = false;
|
|
16
16
|
export let feedback = [];
|
|
17
17
|
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
function updateTarget(selection) {
|
|
24
24
|
//diffrent cases
|
|
25
25
|
console.log('------');
|
|
26
|
-
console.log('isComplex',
|
|
27
|
-
console.log('
|
|
26
|
+
console.log('isComplex',complexSource);
|
|
27
|
+
console.log('complexTarget',complexTarget);
|
|
28
28
|
console.log('selection',selection);
|
|
29
29
|
|
|
30
30
|
//a) source is complex model is simple
|
|
31
|
-
if (
|
|
31
|
+
if (complexSource && !complexTarget && isLoaded) {
|
|
32
32
|
console.log('a) source is complex model is simple');
|
|
33
33
|
|
|
34
34
|
target = [];
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
if (!
|
|
41
|
+
if (!complexSource && !complexTarget && isLoaded) {
|
|
42
42
|
target = [];
|
|
43
43
|
for (let i in selection) {
|
|
44
44
|
target.push(selection[i].value);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
if (
|
|
48
|
+
if (complexSource && complexTarget && isLoaded)
|
|
49
49
|
{
|
|
50
50
|
console.log("both complex",selection);
|
|
51
51
|
target = selection;
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
//console.log(source);
|
|
62
62
|
|
|
63
63
|
//a) source is complex model is simple
|
|
64
|
-
if (
|
|
64
|
+
if (complexSource && !complexTarget) {
|
|
65
65
|
let items = [];
|
|
66
66
|
// event.detail will be null unless isMulti is true and user has removed a single item
|
|
67
67
|
for (let i in target) {
|
|
@@ -76,14 +76,14 @@
|
|
|
76
76
|
//console.log(value);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
if (
|
|
79
|
+
if (complexSource && complexTarget)
|
|
80
80
|
{
|
|
81
81
|
value = target
|
|
82
82
|
isLoaded = true;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
//b) simple liust and simple model
|
|
86
|
-
if (!
|
|
86
|
+
if (!complexSource && !complexTarget) {
|
|
87
87
|
//console.log("source", source);
|
|
88
88
|
//console.log("target",target);
|
|
89
89
|
isLoaded = true;
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
class="select variant-form-material"
|
|
101
101
|
items={source}
|
|
102
102
|
{itemId}
|
|
103
|
-
{
|
|
103
|
+
label = {itemLabel}
|
|
104
104
|
multiple={isMulti}
|
|
105
105
|
bind:value
|
|
106
106
|
placeholder="-- Please select --"
|
|
@@ -6,12 +6,12 @@ export default class MultiSelect extends SvelteComponentTyped<{
|
|
|
6
6
|
source: any;
|
|
7
7
|
title: any;
|
|
8
8
|
required?: boolean | undefined;
|
|
9
|
-
label?: string | undefined;
|
|
10
9
|
feedback?: any[] | undefined;
|
|
11
|
-
|
|
12
|
-
isTargetComplex?: boolean | undefined;
|
|
10
|
+
complexTarget?: boolean | undefined;
|
|
13
11
|
itemId?: string | undefined;
|
|
12
|
+
itemLabel?: string | undefined;
|
|
14
13
|
isMulti?: boolean | undefined;
|
|
14
|
+
complexSource?: boolean | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
[evt: string]: CustomEvent<any>;
|
|
17
17
|
}, {}> {
|
|
@@ -26,12 +26,12 @@ declare const __propDef: {
|
|
|
26
26
|
source: any;
|
|
27
27
|
title: any;
|
|
28
28
|
required?: boolean | undefined;
|
|
29
|
-
label?: string | undefined;
|
|
30
29
|
feedback?: any[] | undefined;
|
|
31
|
-
|
|
32
|
-
isTargetComplex?: boolean | undefined;
|
|
30
|
+
complexTarget?: boolean | undefined;
|
|
33
31
|
itemId?: string | undefined;
|
|
32
|
+
itemLabel?: string | undefined;
|
|
34
33
|
isMulti?: boolean | undefined;
|
|
34
|
+
complexSource?: boolean | undefined;
|
|
35
35
|
};
|
|
36
36
|
events: {
|
|
37
37
|
[evt: string]: CustomEvent<any>;
|
package/package.json
CHANGED
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
on:click|preventDefault={() => {
|
|
216
216
|
active = firstValue?.toString().length > 0 || secondValue?.toString().length > 0;
|
|
217
217
|
$filterValue = [firstOption, firstValue, secondOption, secondValue];
|
|
218
|
-
}}>
|
|
218
|
+
}}>Apply</button
|
|
219
219
|
>
|
|
220
220
|
</div>
|
|
221
221
|
</div>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
export let invalid = false;
|
|
10
10
|
export let feedback = [''];
|
|
11
11
|
export let required = false;
|
|
12
|
-
export let
|
|
12
|
+
export let complexTarget = false;
|
|
13
13
|
|
|
14
14
|
$: selected = null;
|
|
15
15
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
function updatedSelectedValue(selection) {
|
|
20
20
|
if (selection != null) {
|
|
21
|
-
if(
|
|
21
|
+
if(complexTarget)
|
|
22
22
|
{
|
|
23
23
|
selected = selection.id;
|
|
24
24
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function updatedTarget(id) {
|
|
33
|
-
if(
|
|
33
|
+
if(complexTarget)
|
|
34
34
|
{
|
|
35
35
|
target = source.find((opt) => opt.id === id);
|
|
36
36
|
}
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
export let target;
|
|
9
9
|
export let title;
|
|
10
10
|
export let itemId = 'value';
|
|
11
|
-
export let
|
|
11
|
+
export let itemLabel = 'label';
|
|
12
12
|
export let isMulti = true;
|
|
13
|
-
export let
|
|
14
|
-
export let
|
|
13
|
+
export let complexSource = false;
|
|
14
|
+
export let complexTarget = false;
|
|
15
15
|
export let required = false;
|
|
16
16
|
export let feedback = [];
|
|
17
17
|
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
function updateTarget(selection) {
|
|
24
24
|
//diffrent cases
|
|
25
25
|
console.log('------');
|
|
26
|
-
console.log('isComplex',
|
|
27
|
-
console.log('
|
|
26
|
+
console.log('isComplex',complexSource);
|
|
27
|
+
console.log('complexTarget',complexTarget);
|
|
28
28
|
console.log('selection',selection);
|
|
29
29
|
|
|
30
30
|
//a) source is complex model is simple
|
|
31
|
-
if (
|
|
31
|
+
if (complexSource && !complexTarget && isLoaded) {
|
|
32
32
|
console.log('a) source is complex model is simple');
|
|
33
33
|
|
|
34
34
|
target = [];
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
if (!
|
|
41
|
+
if (!complexSource && !complexTarget && isLoaded) {
|
|
42
42
|
target = [];
|
|
43
43
|
for (let i in selection) {
|
|
44
44
|
target.push(selection[i].value);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
if (
|
|
48
|
+
if (complexSource && complexTarget && isLoaded)
|
|
49
49
|
{
|
|
50
50
|
console.log("both complex",selection);
|
|
51
51
|
target = selection;
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
//console.log(source);
|
|
62
62
|
|
|
63
63
|
//a) source is complex model is simple
|
|
64
|
-
if (
|
|
64
|
+
if (complexSource && !complexTarget) {
|
|
65
65
|
let items = [];
|
|
66
66
|
// event.detail will be null unless isMulti is true and user has removed a single item
|
|
67
67
|
for (let i in target) {
|
|
@@ -76,14 +76,14 @@
|
|
|
76
76
|
//console.log(value);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
if (
|
|
79
|
+
if (complexSource && complexTarget)
|
|
80
80
|
{
|
|
81
81
|
value = target
|
|
82
82
|
isLoaded = true;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
//b) simple liust and simple model
|
|
86
|
-
if (!
|
|
86
|
+
if (!complexSource && !complexTarget) {
|
|
87
87
|
//console.log("source", source);
|
|
88
88
|
//console.log("target",target);
|
|
89
89
|
isLoaded = true;
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
class="select variant-form-material"
|
|
101
101
|
items={source}
|
|
102
102
|
{itemId}
|
|
103
|
-
{
|
|
103
|
+
label = {itemLabel}
|
|
104
104
|
multiple={isMulti}
|
|
105
105
|
bind:value
|
|
106
106
|
placeholder="-- Please select --"
|