@ticatec/uniface-element 0.1.56 → 0.1.58

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.
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
 
3
3
  import PageHeader from "./PageHeader.svelte";
4
+ import type {PageAction} from "./PageAction";
4
5
 
5
6
  export let title: string = '';
6
7
  export let comment: string = null as unknown as string;
@@ -8,6 +9,8 @@
8
9
  export let content$style: string = '';
9
10
  export let round: boolean = false;
10
11
  export let shadow: boolean = true;
12
+ export let goBack: PageAction | null = null;
13
+ export let reload: PageAction | null = null;
11
14
  export let style: string = '';
12
15
 
13
16
  </script>
@@ -16,7 +19,7 @@
16
19
  <div class="uniface-page" class:shadow class:round>
17
20
  <div class="uniface-page-header" style={header$style}>
18
21
  <slot name="page-header">
19
- <PageHeader {title} {comment}>
22
+ <PageHeader {title} {comment} {goBack} {reload}>
20
23
  <slot name="header-ext"></slot>
21
24
  </PageHeader>
22
25
  </slot>
@@ -1,3 +1,4 @@
1
+ import type { PageAction } from "./PageAction";
1
2
  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> {
2
3
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
4
  $$bindings?: Bindings;
@@ -23,6 +24,8 @@ declare const Page: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithC
23
24
  content$style?: string;
24
25
  round?: boolean;
25
26
  shadow?: boolean;
27
+ goBack?: PageAction | null;
28
+ reload?: PageAction | null;
26
29
  style?: string;
27
30
  }, {
28
31
  'page-header': {};
@@ -0,0 +1 @@
1
+ export type PageAction = () => any;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,9 +1,23 @@
1
1
  <script lang="ts">
2
+ import Icon from "../icon";
3
+ import type {PageAction} from "./PageAction";
4
+ import {IconButton} from "../button";
2
5
 
3
6
  export let title: string;
4
7
  export let comment: string = '';
8
+ export let goBack: PageAction | null;
9
+ export let reload: PageAction | null;
5
10
 
6
11
  </script>
12
+ {#if goBack}
13
+ <div style="padding-right: 12px;">
14
+ <Icon name="icon_google_keyboard_backspace" onClick={goBack}></Icon>
15
+ </div>
16
+ {:else if reload}
17
+ <div style="padding-right: 12px;">
18
+ <Icon name="icon_google_refresh" onClick={reload}></Icon>
19
+ </div>
20
+ {/if}
7
21
  <div class="page-topic">
8
22
  <span>{title}</span>
9
23
  </div>
@@ -1,3 +1,4 @@
1
+ import type { PageAction } from "./PageAction";
1
2
  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> {
2
3
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
4
  $$bindings?: Bindings;
@@ -19,6 +20,8 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
19
20
  declare const PageHeader: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
21
  title: string;
21
22
  comment?: string;
23
+ goBack: PageAction | null;
24
+ reload: PageAction | null;
22
25
  }, {
23
26
  default: {};
24
27
  }>, {
@@ -15,14 +15,11 @@
15
15
 
16
16
  // 显示提示框函数
17
17
  const show: ShowHint = async (element: Element, text: string, x: number, y: number) => {
18
- if (targetElement != null) {
19
- targetElement.addEventListener('mouseout', hideHint);
20
- }
18
+ element.addEventListener('mouseleave', hideHint);
21
19
  message = text;
22
20
  calculatePosition(x, y);
23
21
  setTimeout(()=> {
24
22
  if (targetElement == element) {
25
- targetElement.addEventListener('mouseout', hideHint);
26
23
  hintVisible = true;
27
24
  }
28
25
  }, 500);
@@ -38,7 +35,7 @@
38
35
  const hideHint = () => {
39
36
  hintVisible = false;
40
37
  if (targetElement) {
41
- targetElement.removeEventListener('mouseout', hideHint);
38
+ targetElement.removeEventListener('mouseleave', hideHint);
42
39
  }
43
40
  targetElement = null;
44
41
  };
@@ -55,7 +55,7 @@
55
55
  <slot name="leading-icon"/>
56
56
  {/if}
57
57
  </svelte:fragment>
58
- <input bind:this={editor} type="text" style="flex: 1 1 auto" bind:value={value} {...input$}
58
+ <input bind:this={editor} type="text" style="flex: 1 1 auto; width: 100%" bind:value={value} {...input$}
59
59
  on:blur on:focus on:keydown on:keyup on:keypress on:input on:compositionstart
60
60
  on:compositionend on:compositionupdate/>
61
61
  <svelte:fragment slot="trailing-icon">
@@ -636,6 +636,9 @@
636
636
  .uniface-common-editor:focus-within .editor-action-icon {
637
637
  visibility: visible;
638
638
  }
639
+ .uniface-common-editor:focus-within:has(input:disabled) {
640
+ border-bottom-color: var(--uniface-editor-border-color, #F1F5F9);
641
+ }
639
642
  .uniface-common-editor:hover .uniface-editor-clean-icon {
640
643
  display: block;
641
644
  }
@@ -649,6 +652,9 @@
649
652
  .uniface-common-editor.outlined:focus-within {
650
653
  border-color: var(--uniface-editor-outlined-active-border-color, #298DFF);
651
654
  }
655
+ .uniface-common-editor.outlined:focus-within:has(input:disabled) {
656
+ border-color: var(--uniface-editor-border-color, #F1F5F9);
657
+ }
652
658
  .uniface-common-editor.outlined:has(input:disabled) {
653
659
  background-color: var(--uniface-editor-outlined-disabled-backgournd-color, #F1F5F9);
654
660
  }
@@ -3473,12 +3479,14 @@ root {
3473
3479
  cursor: default;
3474
3480
  box-sizing: border-box;
3475
3481
  text-align: center;
3482
+ padding: 4px;
3476
3483
  }
3477
3484
  .uniface-icon.clickable {
3478
3485
  cursor: pointer;
3479
3486
  }
3480
3487
  .uniface-icon.clickable:hover {
3481
- color: var(--uniface-plain-hover-color, #42A5F5);
3488
+ background-color: var(--uniface-plain-hover-color, #42A5F5);
3489
+ border-radius: 50%;
3482
3490
  }
3483
3491
  .uniface-icon.clickable:active {
3484
3492
  position: relative;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticatec/uniface-element",
3
- "version": "0.1.56",
3
+ "version": "0.1.58",
4
4
  "description": "uniface web elements",
5
5
  "scripts": {
6
6
  "dev": "vite dev",