@ticatec/uniface-element 0.3.3 → 0.3.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/dist/data-table/lib/HrefLink.d.ts +1 -1
- package/dist/data-table/parts/HrefCell.svelte +7 -2
- package/dist/group-box/group-check-box/GroupCheckBox.svelte +4 -4
- package/dist/group-box/group-radio-box/GroupRadioBox.svelte +4 -4
- package/dist/list-box/ListBox.svelte +2 -2
- package/dist/radio-button/RadioButton.svelte +4 -8
- package/dist/radio-button/RadioButton.svelte.d.ts +1 -5
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export let data;
|
|
6
6
|
export let href: HrefBuilder;
|
|
7
7
|
|
|
8
|
-
let list: Array<HrefLink> = [];
|
|
8
|
+
let list: Array<HrefLink | string> = [];
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
$: {
|
|
@@ -15,7 +15,11 @@
|
|
|
15
15
|
</script>
|
|
16
16
|
<div style="display: flex; flex-direction: row; gap: 8px; justify-content: center">
|
|
17
17
|
{#each list as item, idx}
|
|
18
|
-
|
|
18
|
+
{#if typeof item == "string"}
|
|
19
|
+
<span>{item}</span>
|
|
20
|
+
{:else}
|
|
21
|
+
<button class="link-style" on:click|preventDefault={()=>item.action()}>{item.text}</button>
|
|
22
|
+
{/if}
|
|
19
23
|
{/each}
|
|
20
24
|
</div>
|
|
21
25
|
|
|
@@ -29,6 +33,7 @@
|
|
|
29
33
|
font: inherit;
|
|
30
34
|
padding: 0;
|
|
31
35
|
}
|
|
36
|
+
|
|
32
37
|
button.link-style:focus {
|
|
33
38
|
outline: none;
|
|
34
39
|
}
|
|
@@ -153,10 +153,10 @@
|
|
|
153
153
|
{#if (hideOptions??[]).indexOf(op[keyField]) === -1}
|
|
154
154
|
<CheckBox {compact} {readonly} disabled={disabled || disabledOptions.indexOf(op[keyField]) > -1}
|
|
155
155
|
label={op[textField]} style={item$style} value={selectedList.indexOf(op[keyField]) > -1}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
onchange={handleCheckboxChange(op[keyField])}
|
|
157
|
+
onclick={handleFocus}
|
|
158
|
+
onfocus={handleFocus}
|
|
159
|
+
onblur={handleContainerBlur}/>
|
|
160
160
|
{/if}
|
|
161
161
|
{/each}
|
|
162
162
|
</div>
|
|
@@ -102,10 +102,10 @@
|
|
|
102
102
|
{#each options as op}
|
|
103
103
|
<RadioButton {readonly} {compact} disabled={disabled || disabledOptions.indexOf(op[keyField]) > -1}
|
|
104
104
|
bind:group={value} label={op[textField]} style={item$style} value={op[keyField]}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
onclick={handleRadioClick}
|
|
106
|
+
onchange={handleRadioChange}
|
|
107
|
+
onfocus={handleRadioFocus}
|
|
108
|
+
onblur={handleContainerBlur}/>
|
|
109
109
|
{/each}
|
|
110
110
|
</div>
|
|
111
111
|
{/if}
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
{#if readonly === false && (filter || lazyLoader)}
|
|
185
185
|
<div class="header-search">
|
|
186
186
|
<SearchBox bind:this={searchBox} compact variant="plain" disabled={isBusy} style="width: 100%" bind:value={filterText}
|
|
187
|
-
|
|
187
|
+
onchange={handleCriteriaChange}/>
|
|
188
188
|
</div>
|
|
189
189
|
{/if}
|
|
190
190
|
</div>
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
{#if selectMode === "multiple"}
|
|
196
196
|
<div class="listview-item" style="display: flex; flex-direction: row; align-items: center; gap: 8px">
|
|
197
197
|
<CheckBox style="flex: 0 0 auto; margin-left: 8px" {readonly} value={selectedList.indexOf(item) > -1}
|
|
198
|
-
|
|
198
|
+
onchange={handleSelectionChanged(item)}/>
|
|
199
199
|
<div style="flex: 1 1 auto; cursor: pointer" aria-hidden="true" on:click={handleSelectionChanged(item)}>
|
|
200
200
|
<svelte:component this={itemRender} {readonly} {item} {...item$props}/>
|
|
201
201
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {onMount
|
|
2
|
+
import {onMount} from "svelte";
|
|
3
3
|
|
|
4
4
|
export let value: any;
|
|
5
5
|
export let label: string;
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
export let onfocus: ((event: FocusEvent) => void) | null = null;
|
|
12
12
|
export let onblur: ((event: FocusEvent) => void) | null = null;
|
|
13
13
|
export let onchange: ((event: Event) => void) | null = null;
|
|
14
|
+
export let onclick: ((event: MouseEvent) => void) | null = null;
|
|
14
15
|
|
|
15
16
|
let roProps: any = {};
|
|
16
17
|
let inputElement: HTMLInputElement;
|
|
17
|
-
const dispatch = createEventDispatcher();
|
|
18
18
|
|
|
19
19
|
export const setFocus = () => {
|
|
20
20
|
setTimeout(() => {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}, 50);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
onMount(()=>{
|
|
25
|
+
onMount(() => {
|
|
26
26
|
|
|
27
27
|
})
|
|
28
28
|
|
|
@@ -30,23 +30,19 @@
|
|
|
30
30
|
if (disabled || readonly) {
|
|
31
31
|
e.stopPropagation();
|
|
32
32
|
e.preventDefault();
|
|
33
|
-
|
|
34
|
-
dispatch('click', e);
|
|
33
|
+
onclick?.(e)
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
const handleFocus = (e: FocusEvent) => {
|
|
39
|
-
dispatch('focus', e);
|
|
40
38
|
onfocus?.(e);
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
const handleBlur = (e: FocusEvent) => {
|
|
44
|
-
dispatch('blur', e);
|
|
45
42
|
onblur?.(e);
|
|
46
43
|
}
|
|
47
44
|
|
|
48
45
|
const handleChange = (e: Event) => {
|
|
49
|
-
dispatch('change', e);
|
|
50
46
|
onchange?.(e);
|
|
51
47
|
}
|
|
52
48
|
|
|
@@ -22,13 +22,9 @@ declare const RadioButton: $$__sveltets_2_IsomorphicComponent<{
|
|
|
22
22
|
onfocus?: ((event: FocusEvent) => void) | null;
|
|
23
23
|
onblur?: ((event: FocusEvent) => void) | null;
|
|
24
24
|
onchange?: ((event: Event) => void) | null;
|
|
25
|
+
onclick?: ((event: MouseEvent) => void) | null;
|
|
25
26
|
setFocus?: () => void;
|
|
26
27
|
}, {
|
|
27
|
-
click: CustomEvent<any>;
|
|
28
|
-
focus: CustomEvent<any>;
|
|
29
|
-
blur: CustomEvent<any>;
|
|
30
|
-
change: CustomEvent<any>;
|
|
31
|
-
} & {
|
|
32
28
|
[evt: string]: CustomEvent<any>;
|
|
33
29
|
}, {}, {
|
|
34
30
|
setFocus: () => void;
|
package/package.json
CHANGED