@ticatec/uniface-element 0.3.3 → 0.3.4

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.
@@ -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
- onChange={handleCheckboxChange(op[keyField])}
157
- onClick={handleFocus}
158
- on:focus={handleFocus}
159
- on:blur={handleContainerBlur}/>
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
- on:click={handleRadioClick}
106
- on:change={handleRadioChange}
107
- on:focus={handleRadioFocus}
108
- on:blur={handleContainerBlur}/>
105
+ onclick={handleRadioClick}
106
+ onchange={handleRadioChange}
107
+ onfocus={handleRadioFocus}
108
+ onblur={handleContainerBlur}/>
109
109
  {/each}
110
110
  </div>
111
111
  {/if}
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import {onMount, createEventDispatcher} from "svelte";
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
- } else {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticatec/uniface-element",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "A comprehensive UI component library for Svelte applications with rich form controls, data tables, layouts and interactive elements",
5
5
  "keywords": [
6
6
  "svelte",