@bexis2/bexis2-core-ui 0.0.25 → 0.0.26
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 +3 -13
- package/dist/components/form/CheckboxKvPList.svelte +7 -1
- package/dist/components/form/DropdownKvP.svelte +4 -4
- package/dist/components/form/DropdownKvP.svelte.d.ts +10 -10
- package/dist/components/form/MultiSelect.svelte +6 -4
- package/package.json +99 -101
- package/src/lib/components/form/CheckboxKvPList.svelte +7 -1
- package/src/lib/components/form/DropdownKvP.svelte +4 -4
- package/src/lib/components/form/MultiSelect.svelte +6 -4
package/README.md
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
# bexis-core-ui
|
|
2
2
|
|
|
3
|
-
## new in version 0.0.
|
|
3
|
+
## new in version 0.0.26
|
|
4
4
|
|
|
5
5
|
## Updates
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- fix bugs in checkbox list
|
|
8
|
+
- fix bugs in multi select
|
|
8
9
|
|
|
9
|
-
## Adds
|
|
10
|
-
|
|
11
|
-
- Checkbox
|
|
12
|
-
- CheckboxKVPList
|
|
13
|
-
- CheckboxList
|
|
14
|
-
- DateInput
|
|
15
|
-
- DropdownKVP
|
|
16
|
-
- MultiSelect
|
|
17
|
-
- NumberInput
|
|
18
|
-
- TextArea
|
|
19
|
-
- TextInput
|
|
@@ -11,7 +11,13 @@ let feedback;
|
|
|
11
11
|
<InputContainer label={title} {feedback} {required}>
|
|
12
12
|
{#each source as item}
|
|
13
13
|
<label class="flex items-center space-x-2" for={key}>
|
|
14
|
-
<input
|
|
14
|
+
<input
|
|
15
|
+
class="checkbox"
|
|
16
|
+
type="checkbox"
|
|
17
|
+
bind:group={target}
|
|
18
|
+
checked={item.key}
|
|
19
|
+
value={item.key}
|
|
20
|
+
/>
|
|
15
21
|
<p>{item.value}</p>
|
|
16
22
|
</label>
|
|
17
23
|
{/each}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
export let source;
|
|
6
6
|
export let target;
|
|
7
7
|
export let title;
|
|
8
|
-
export let valid;
|
|
9
|
-
export let invalid;
|
|
10
|
-
export let feedback;
|
|
11
|
-
export let required;
|
|
8
|
+
export let valid = false;
|
|
9
|
+
export let invalid = false;
|
|
10
|
+
export let feedback = [''];
|
|
11
|
+
export let required = false;
|
|
12
12
|
|
|
13
13
|
$: selected = null;
|
|
14
14
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} DropdownKvPEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} DropdownKvPSlots */
|
|
4
4
|
export default class DropdownKvP extends SvelteComponentTyped<{
|
|
5
|
+
target: any;
|
|
5
6
|
id: any;
|
|
6
7
|
source: any;
|
|
7
|
-
target: any;
|
|
8
8
|
title: any;
|
|
9
|
-
|
|
10
|
-
invalid
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
required?: boolean | undefined;
|
|
10
|
+
invalid?: boolean | undefined;
|
|
11
|
+
valid?: boolean | undefined;
|
|
12
|
+
feedback?: string[] | undefined;
|
|
13
13
|
}, {
|
|
14
14
|
change: Event;
|
|
15
15
|
select: Event;
|
|
@@ -23,14 +23,14 @@ export type DropdownKvPSlots = typeof __propDef.slots;
|
|
|
23
23
|
import { SvelteComponentTyped } from "svelte";
|
|
24
24
|
declare const __propDef: {
|
|
25
25
|
props: {
|
|
26
|
+
target: any;
|
|
26
27
|
id: any;
|
|
27
28
|
source: any;
|
|
28
|
-
target: any;
|
|
29
29
|
title: any;
|
|
30
|
-
|
|
31
|
-
invalid
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
required?: boolean | undefined;
|
|
31
|
+
invalid?: boolean | undefined;
|
|
32
|
+
valid?: boolean | undefined;
|
|
33
|
+
feedback?: string[] | undefined;
|
|
34
34
|
};
|
|
35
35
|
events: {
|
|
36
36
|
change: Event;
|
|
@@ -22,14 +22,16 @@
|
|
|
22
22
|
|
|
23
23
|
function updateTarget(selection) {
|
|
24
24
|
//diffrent cases
|
|
25
|
-
|
|
25
|
+
console.log('------');
|
|
26
26
|
|
|
27
27
|
//a) source is complex model is simple
|
|
28
28
|
if (isComplex && !isTargetComplex && isLoaded) {
|
|
29
|
+
console.log('a) source is complex model is simple');
|
|
30
|
+
|
|
29
31
|
target = [];
|
|
30
32
|
for (let i in selection) {
|
|
31
33
|
let item = selection[i];
|
|
32
|
-
target.push(item
|
|
34
|
+
target.push(item[itemId]);
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -39,8 +41,8 @@
|
|
|
39
41
|
target.push(selection[i].value);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
console.log('selection ' + title, selection);
|
|
45
|
+
console.log('target ' + title, target);
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
onMount(async () => {
|
package/package.json
CHANGED
|
@@ -1,103 +1,101 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
}
|
|
2
|
+
"name": "@bexis2/bexis2-core-ui",
|
|
3
|
+
"version": "0.0.26",
|
|
4
|
+
"private": false,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite dev --host",
|
|
7
|
+
"package": "svelte-package --watch",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"build package": "svelte-kit sync && svelte-package --watch",
|
|
10
|
+
"preview": "vite preview",
|
|
11
|
+
"test": "playwright test",
|
|
12
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
13
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
14
|
+
"test:unit": "vitest",
|
|
15
|
+
"lint": "prettier --plugin-search-dir . --check . && eslint .",
|
|
16
|
+
"format": "prettier --plugin-search-dir . --write .",
|
|
17
|
+
"init": "npm init --scope bexis2",
|
|
18
|
+
"link": "npm link",
|
|
19
|
+
"publish": "npm publish --access public"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@playwright/test": "^1.28.1",
|
|
23
|
+
"@skeletonlabs/skeleton": "^1.2.5",
|
|
24
|
+
"@sveltejs/adapter-auto": "^2.0.0",
|
|
25
|
+
"@sveltejs/adapter-static": "^2.0.2",
|
|
26
|
+
"@sveltejs/kit": "^1.5.0",
|
|
27
|
+
"@sveltejs/package": "^2.0.2",
|
|
28
|
+
"@tailwindcss/forms": "^0.5.3",
|
|
29
|
+
"@tailwindcss/line-clamp": "^0.4.2",
|
|
30
|
+
"@tailwindcss/typography": "^0.5.9",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
32
|
+
"@typescript-eslint/parser": "^5.45.0",
|
|
33
|
+
"autoprefixer": "^10.4.14",
|
|
34
|
+
"eslint": "^8.28.0",
|
|
35
|
+
"eslint-config-prettier": "^8.5.0",
|
|
36
|
+
"eslint-plugin-svelte3": "^4.0.0",
|
|
37
|
+
"postcss": "^8.4.23",
|
|
38
|
+
"prettier": "^2.8.0",
|
|
39
|
+
"prettier-plugin-svelte": "^2.8.1",
|
|
40
|
+
"raw-loader": "^4.0.2",
|
|
41
|
+
"svelte": "^3.54.0",
|
|
42
|
+
"svelte-check": "^3.0.1",
|
|
43
|
+
"svelte-fa": "^3.0.3",
|
|
44
|
+
"svelte-headless-table": "^0.17.3",
|
|
45
|
+
"tailwindcss": "^3.3.2",
|
|
46
|
+
"tslib": "^2.4.1",
|
|
47
|
+
"typescript": "^5.0.0",
|
|
48
|
+
"vite": "^4.3.0",
|
|
49
|
+
"vitest": "^0.25.3"
|
|
50
|
+
},
|
|
51
|
+
"type": "module",
|
|
52
|
+
"module": "./src/lib/index.ts",
|
|
53
|
+
"types": "./src/lib/index.d.ts",
|
|
54
|
+
"description": "Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).",
|
|
55
|
+
"main": "./src/lib/index.d.ts",
|
|
56
|
+
"directories": {
|
|
57
|
+
"test": "tests"
|
|
58
|
+
},
|
|
59
|
+
"files": [
|
|
60
|
+
"dist",
|
|
61
|
+
"src/lib"
|
|
62
|
+
],
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@floating-ui/dom": "^1.2.7",
|
|
65
|
+
"@fortawesome/fontawesome-free": "^6.2.1",
|
|
66
|
+
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
|
67
|
+
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
68
|
+
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
69
|
+
"axios": "^1.2.1",
|
|
70
|
+
"highlight.js": "^11.8.0",
|
|
71
|
+
"highlightjs-svelte": "^1.0.6",
|
|
72
|
+
"svelte": "^3.54.0",
|
|
73
|
+
"svelte-file-dropzone": "^2.0.1",
|
|
74
|
+
"svelte-select": "^5.6.0",
|
|
75
|
+
"vest": "^4.6.11"
|
|
76
|
+
},
|
|
77
|
+
"author": "David Schöne",
|
|
78
|
+
"license": "ISC",
|
|
79
|
+
"repository": {
|
|
80
|
+
"type": "git",
|
|
81
|
+
"url": "git+https://github.com/BEXIS2/bexis2-core-ui.git"
|
|
82
|
+
},
|
|
83
|
+
"bugs": {
|
|
84
|
+
"url": "https://github.com/BEXIS2/bexis2-core-ui/issues"
|
|
85
|
+
},
|
|
86
|
+
"homepage": "https://github.com/BEXIS2/bexis2-core-ui#readme",
|
|
87
|
+
"keywords": [
|
|
88
|
+
"bexis2",
|
|
89
|
+
"libary"
|
|
90
|
+
],
|
|
91
|
+
"exports": {
|
|
92
|
+
".": {
|
|
93
|
+
"types": "./dist/index.d.ts",
|
|
94
|
+
"svelte": "./dist/index.js"
|
|
95
|
+
},
|
|
96
|
+
"./dist/index.css": {
|
|
97
|
+
"import": "./dist/index.css",
|
|
98
|
+
"require": "./dist/index.css"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
103
101
|
}
|
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
<InputContainer label={title} {feedback} {required}>
|
|
15
15
|
{#each source as item}
|
|
16
16
|
<label class="flex items-center space-x-2" for={key}>
|
|
17
|
-
<input
|
|
17
|
+
<input
|
|
18
|
+
class="checkbox"
|
|
19
|
+
type="checkbox"
|
|
20
|
+
bind:group={target}
|
|
21
|
+
checked={item.key}
|
|
22
|
+
value={item.key}
|
|
23
|
+
/>
|
|
18
24
|
<p>{item.value}</p>
|
|
19
25
|
</label>
|
|
20
26
|
{/each}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
export let source;
|
|
6
6
|
export let target;
|
|
7
7
|
export let title;
|
|
8
|
-
export let valid;
|
|
9
|
-
export let invalid;
|
|
10
|
-
export let feedback;
|
|
11
|
-
export let required;
|
|
8
|
+
export let valid = false;
|
|
9
|
+
export let invalid = false;
|
|
10
|
+
export let feedback = [''];
|
|
11
|
+
export let required = false;
|
|
12
12
|
|
|
13
13
|
$: selected = null;
|
|
14
14
|
|
|
@@ -22,14 +22,16 @@
|
|
|
22
22
|
|
|
23
23
|
function updateTarget(selection) {
|
|
24
24
|
//diffrent cases
|
|
25
|
-
|
|
25
|
+
console.log('------');
|
|
26
26
|
|
|
27
27
|
//a) source is complex model is simple
|
|
28
28
|
if (isComplex && !isTargetComplex && isLoaded) {
|
|
29
|
+
console.log('a) source is complex model is simple');
|
|
30
|
+
|
|
29
31
|
target = [];
|
|
30
32
|
for (let i in selection) {
|
|
31
33
|
let item = selection[i];
|
|
32
|
-
target.push(item
|
|
34
|
+
target.push(item[itemId]);
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -39,8 +41,8 @@
|
|
|
39
41
|
target.push(selection[i].value);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
console.log('selection ' + title, selection);
|
|
45
|
+
console.log('target ' + title, target);
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
onMount(async () => {
|