@bexis2/bexis2-core-ui 0.4.69 → 0.4.71
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 +6 -2
- package/dist/__package_types_tmp__/components/form/CheckboxKvPList.svelte.d.ts +1 -0
- package/dist/__package_types_tmp__/components/form/NumberInput.svelte.d.ts +2 -0
- package/dist/components/form/CheckboxKvPList.svelte +3 -0
- package/dist/components/form/CheckboxKvPList.svelte.d.ts +1 -0
- package/dist/components/form/NumberInput.svelte +12 -0
- package/dist/components/form/NumberInput.svelte.d.ts +2 -0
- package/package.json +2 -1
- package/src/lib/components/form/CheckboxKvPList.svelte +1 -1
- package/src/lib/components/form/NumberInput.svelte +17 -0
package/README.md
CHANGED
|
@@ -6,11 +6,13 @@ export let title;
|
|
|
6
6
|
export let description = "";
|
|
7
7
|
export let key;
|
|
8
8
|
export let help = false;
|
|
9
|
+
export let vertical = false;
|
|
9
10
|
let required = false;
|
|
10
11
|
export let feedback;
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<InputContainer {id} label={title} {feedback} {required} {help} {description}>
|
|
15
|
+
<div class="flex gap-2" class:flex-col={vertical} >
|
|
14
16
|
{#each source as item}
|
|
15
17
|
<label class="flex items-center space-x-2" for={item.key}>
|
|
16
18
|
<input
|
|
@@ -24,4 +26,5 @@ export let feedback;
|
|
|
24
26
|
<p>{item.value}</p>
|
|
25
27
|
</label>
|
|
26
28
|
{/each}
|
|
29
|
+
</div>
|
|
27
30
|
</InputContainer>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script>import InputContainer from "./InputContainer.svelte";
|
|
2
2
|
import { helpStore } from "../../stores/pageStores";
|
|
3
|
+
import { convertServerColumns } from "../Table/utils";
|
|
3
4
|
export let id = "";
|
|
4
5
|
export let label = "";
|
|
5
6
|
export let value = "";
|
|
@@ -11,6 +12,14 @@ export let placeholder = "";
|
|
|
11
12
|
export let help = false;
|
|
12
13
|
export let disabled = false;
|
|
13
14
|
export let description = "";
|
|
15
|
+
export let min = Number.MIN_VALUE;
|
|
16
|
+
export let max = Number.MAX_VALUE;
|
|
17
|
+
$: if (parseInt(value) > max) {
|
|
18
|
+
value = max.toString();
|
|
19
|
+
}
|
|
20
|
+
$: if (parseInt(value) < min) {
|
|
21
|
+
value = min.toString();
|
|
22
|
+
}
|
|
14
23
|
</script>
|
|
15
24
|
|
|
16
25
|
<InputContainer {id} {label} {feedback} {required} {help} {description}>
|
|
@@ -21,9 +30,12 @@ export let description = "";
|
|
|
21
30
|
class:input-success={valid}
|
|
22
31
|
class:input-error={invalid}
|
|
23
32
|
bind:value
|
|
33
|
+
{min}
|
|
34
|
+
{max}
|
|
24
35
|
on:input
|
|
25
36
|
on:change
|
|
26
37
|
{placeholder}
|
|
27
38
|
{disabled}
|
|
39
|
+
|
|
28
40
|
/>
|
|
29
41
|
</InputContainer>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bexis2/bexis2-core-ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.71",
|
|
4
4
|
"private": false,
|
|
5
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
6
|
"keywords": [
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"format": "prettier --plugin-search-dir . --write .",
|
|
51
51
|
"check outdated": "npm outdated",
|
|
52
52
|
"upgrade all": "ncu --upgrade",
|
|
53
|
+
"0.npm login": "npm login",
|
|
53
54
|
"1.npm - update package infos": "npm init --scope bexis2",
|
|
54
55
|
"2.npm - package": "svelte-package",
|
|
55
56
|
"3.npm - publish": "npm publish --access public"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import InputContainer from './InputContainer.svelte';
|
|
3
3
|
import { helpStore } from '$store/pageStores';
|
|
4
|
+
import { convertServerColumns } from '../Table/utils';
|
|
4
5
|
|
|
5
6
|
export let id: string = '';
|
|
6
7
|
export let label: string = '';
|
|
@@ -14,6 +15,19 @@
|
|
|
14
15
|
export let help: boolean = false;
|
|
15
16
|
export let disabled: boolean = false;
|
|
16
17
|
export let description : string = '';
|
|
18
|
+
export let min : number = Number.MIN_VALUE;
|
|
19
|
+
export let max : number = Number.MAX_VALUE;
|
|
20
|
+
|
|
21
|
+
// Diese Zeile wird jedes Mal ausgeführt, wenn sich "menge" ändert
|
|
22
|
+
$: if (parseInt(value) > max) {
|
|
23
|
+
value = max.toString();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
$: if (parseInt(value) < min) {
|
|
27
|
+
value = min.toString();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
17
31
|
</script>
|
|
18
32
|
|
|
19
33
|
<InputContainer {id} {label} {feedback} {required} {help} {description}>
|
|
@@ -24,9 +38,12 @@
|
|
|
24
38
|
class:input-success={valid}
|
|
25
39
|
class:input-error={invalid}
|
|
26
40
|
bind:value
|
|
41
|
+
{min}
|
|
42
|
+
{max}
|
|
27
43
|
on:input
|
|
28
44
|
on:change
|
|
29
45
|
{placeholder}
|
|
30
46
|
{disabled}
|
|
47
|
+
|
|
31
48
|
/>
|
|
32
49
|
</InputContainer>
|