@ticatec/uniface-element 0.1.67 → 0.1.69

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.
@@ -0,0 +1 @@
1
+ export type OnSelectedHandler = (item: any) => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -16,6 +16,8 @@
16
16
  export let closeHandler: () => void;
17
17
  export let closeAction: ButtonAction | null = null;
18
18
 
19
+ export let dialog$style: string = "";
20
+
19
21
  export const close = async () => {
20
22
  let confirm = closeConfirm ? await closeConfirm() : true;
21
23
  if (confirm) {
@@ -58,10 +60,10 @@
58
60
 
59
61
  </script>
60
62
 
61
- <div class="uniface-dialog" style="width: {width}; height: {height}; {startMove ? 'cursor: move' : ''}" transition:fade={{duration: 500}} aria-hidden="true"
63
+ <div class="uniface-dialog" style="{startMove ? 'cursor: move' : ''}" transition:fade={{duration: 500}} aria-hidden="true"
62
64
  on:mouseleave={handleMouseUp} on:mousemove={handleMouseMove}>
63
65
  <div>
64
- <div class="uniface-dialog-box" style="top: {top}px; left: {left}px">
66
+ <div class="uniface-dialog-box" style="{dialog$style}; top: {top}px; left: {left}px; width: {width}; height: {height}; ">
65
67
  <div class="title-bar" on:mousedown={handleMouseDown} on:mouseup={handleMouseUp} aria-hidden="true">
66
68
  <div style="flex: 1 1 auto"><span>{title ?? 'New window'}</span></div>
67
69
  <div style="flex: 0 0 auto; padding-left: 12px">
@@ -27,6 +27,7 @@ declare const Dialog: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWit
27
27
  content$style?: string;
28
28
  closeHandler: () => void;
29
29
  closeAction?: ButtonAction | null;
30
+ dialog$style?: string;
30
31
  close?: () => Promise<void>;
31
32
  }, {
32
33
  default: {};
@@ -4,6 +4,7 @@
4
4
  import type {OnChangeHandler} from "../common/OnChangeHandler";
5
5
  import CommonPicker from "../common/CommonPicker.svelte";
6
6
  import {tick} from "svelte";
7
+ import type {OnSelectedHandler} from "../common/OnSelectedHandler";
7
8
 
8
9
  export let variant: '' | 'plain' | 'outlined' | 'filled' = '';
9
10
  export let disabled: boolean = false;
@@ -23,6 +24,8 @@
23
24
  export let itemRender: any = null;
24
25
  export let emptyText: string = null as unknown as string;
25
26
  export let onChange: OnChangeHandler<any> = null as unknown as OnChangeHandler<any>;
27
+ export let onSelected: OnSelectedHandler = null as unknown as OnSelectedHandler;
28
+
26
29
 
27
30
  export const setFocus = () => {
28
31
  setTimeout(()=> {
@@ -47,6 +50,7 @@
47
50
 
48
51
  const handleItemClick = (data: any) => () => {
49
52
  if (disableOptions.indexOf(data[keyField]) < 0) {
53
+ onSelected?.(data);
50
54
  value = data[keyField];
51
55
  editor.focus();
52
56
  showPopup = false;
@@ -1,5 +1,6 @@
1
1
  import { DisplayMode } from "../common/DisplayMode";
2
2
  import type { OnChangeHandler } from "../common/OnChangeHandler";
3
+ import type { OnSelectedHandler } from "../common/OnSelectedHandler";
3
4
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
4
5
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
5
6
  $$bindings?: Bindings;
@@ -32,6 +33,7 @@ declare const OptionsSelect: $$__sveltets_2_IsomorphicComponent<{
32
33
  itemRender?: any;
33
34
  emptyText?: string;
34
35
  onChange?: OnChangeHandler<any>;
36
+ onSelected?: OnSelectedHandler;
35
37
  setFocus?: () => void;
36
38
  }, {
37
39
  blur: FocusEvent;
@@ -451,7 +451,7 @@
451
451
  .options-popover .option-item {
452
452
  width: 100%;
453
453
  box-sizing: border-box;
454
- padding: 4px 6px;
454
+ padding: 12px 6px;
455
455
  cursor: pointer;
456
456
  font-size: 1.1em;
457
457
  line-height: 1.5em;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticatec/uniface-element",
3
- "version": "0.1.67",
3
+ "version": "0.1.69",
4
4
  "description": "uniface web elements",
5
5
  "scripts": {
6
6
  "dev": "vite dev",