@ticatec/uniface-element 0.3.1 → 0.3.2
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/accordion/Accordion.svelte +1 -1
- package/dist/accordion/AccordionItemView.svelte +2 -2
- package/dist/accordion/AccordionItemView.svelte.d.ts +1 -1
- package/dist/action-bar/ActionBar.svelte +1 -1
- package/dist/data-table/parts/ActionsRow.svelte +5 -5
- package/dist/date-picker/DateTimePicker.svelte +1 -1
- package/dist/icon/Icon.svelte +4 -4
- package/dist/icon/Icon.svelte.d.ts +1 -1
- package/dist/image-files/ImagePreview.svelte +3 -3
- package/dist/memo-editor/MemoEditor.svelte +1 -1
- package/dist/message-box/MessageBoxBoard.svelte +1 -1
- package/dist/page/PageHeader.svelte +2 -2
- package/dist/tag/Tag.svelte +1 -1
- package/dist/transfer/Transfer.svelte +2 -2
- package/package.json +1 -1
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
<div class="uniface-accordion-panel {className}" {style} class:compact>
|
|
46
46
|
{#each accordions as accordion}
|
|
47
|
-
<Accordion title={accordion.title} isOpen={openSet.has(accordion)} {exclusive}
|
|
47
|
+
<Accordion title={accordion.title} isOpen={openSet.has(accordion)} {exclusive} onclick={handleAccordionClick(accordion)}>
|
|
48
48
|
<svelte:component this={accordion.component} {...accordion.params}/>
|
|
49
49
|
</Accordion>
|
|
50
50
|
{/each}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
export let title: string = "";
|
|
5
5
|
export let isOpen = false;
|
|
6
|
-
export let
|
|
6
|
+
export let onclick: MouseClickHandler = null as unknown as MouseClickHandler;
|
|
7
7
|
export let header: any = null;
|
|
8
8
|
|
|
9
9
|
export let exclusive: boolean;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</style>
|
|
17
17
|
|
|
18
18
|
<div class="accordion">
|
|
19
|
-
<div class="header" aria-hidden="true" on:click={
|
|
19
|
+
<div class="header" aria-hidden="true" on:click={onclick}>
|
|
20
20
|
{#if header}
|
|
21
21
|
<svelte:component this={header} {title} {isOpen}/> <!-- TODO 自定义每个条目的标题 -->
|
|
22
22
|
{:else}
|
|
@@ -20,7 +20,7 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
|
20
20
|
declare const AccordionItemView: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
21
21
|
title?: string;
|
|
22
22
|
isOpen?: boolean;
|
|
23
|
-
|
|
23
|
+
onclick?: MouseClickHandler;
|
|
24
24
|
header?: any;
|
|
25
25
|
exclusive: boolean;
|
|
26
26
|
}, {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
{#each (buttons ?? []) as button}
|
|
21
21
|
{#if button}
|
|
22
22
|
<Button label={button.label} icon={button.icon} disabled={button.disabled===true} type={button.type}
|
|
23
|
-
|
|
23
|
+
onclick={handleButtonClick(button)}/>
|
|
24
24
|
{:else }
|
|
25
25
|
<Separator height="24px"/>
|
|
26
26
|
{/if}
|
|
@@ -93,14 +93,14 @@
|
|
|
93
93
|
{#each actionList as action}
|
|
94
94
|
{#if action.icon}
|
|
95
95
|
<IconButton style="flex-shrink: 0; top: 0" size="mini" type="{action.type ?? 'primary'}" icon={action.icon}
|
|
96
|
-
|
|
96
|
+
onclick={()=>action.callback(row.data)}/>
|
|
97
97
|
{:else}
|
|
98
98
|
<TextButton style="flex-shrink: 0; top: 0" size="mini" type="{action.type ?? 'primary'}" label={action.label}
|
|
99
|
-
|
|
99
|
+
onclick={async ()=>action.callback(row.data)}/>
|
|
100
100
|
{/if}
|
|
101
101
|
{/each}
|
|
102
102
|
{#if popupList.length > 0}
|
|
103
|
-
<TextButton size="mini" type="primary" style="flex-shrink: 0; top: 0" label="..."
|
|
103
|
+
<TextButton size="mini" type="primary" style="flex-shrink: 0; top: 0" label="..." onclick={showPopupMenu}/>
|
|
104
104
|
{/if}
|
|
105
105
|
</div>
|
|
106
106
|
|
|
@@ -111,10 +111,10 @@
|
|
|
111
111
|
<div class="action-popover" style="padding: 4px 6px; text-align: center">
|
|
112
112
|
{#if action.icon}
|
|
113
113
|
<IconButton style="flex-shrink: 0; top: 0" size="mini" type="{action.type ?? 'primary'}" icon={action.icon}
|
|
114
|
-
|
|
114
|
+
onclick={async ()=>{action.callback(row.data); showPopup=false}}/>
|
|
115
115
|
{:else}
|
|
116
116
|
<TextButton style="flex-shrink: 0; top: 0" size="mini" type="{action.type ?? 'primary'}" label={action.label}
|
|
117
|
-
|
|
117
|
+
onclick={async ()=>{action.callback(row.data); showPopup=false}}/>
|
|
118
118
|
{/if}
|
|
119
119
|
</div>
|
|
120
120
|
{/each}
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
<span>{displayTime}</span>
|
|
163
163
|
</div>
|
|
164
164
|
<div style="flex: 0 0 auto;">
|
|
165
|
-
<TextButton label={confirmText} type="primary" disabled={btnDisabled}
|
|
165
|
+
<TextButton label={confirmText} type="primary" disabled={btnDisabled} onclick={confirm}/>
|
|
166
166
|
</div>
|
|
167
167
|
</div>
|
|
168
168
|
</div>
|
package/dist/icon/Icon.svelte
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import type {MouseClickHandler} from "../common/MouseClickHandler";
|
|
5
5
|
|
|
6
6
|
export let name: string;
|
|
7
|
-
export let
|
|
7
|
+
export let onclick: MouseClickHandler | null = null;
|
|
8
8
|
export let style: string = '';
|
|
9
9
|
export {className as class};
|
|
10
10
|
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
let respClick: boolean = true;
|
|
13
13
|
|
|
14
14
|
const handleClickEvent = async (e: MouseEvent) => {
|
|
15
|
-
if (
|
|
15
|
+
if (onclick != null && respClick) {
|
|
16
16
|
respClick = false;
|
|
17
|
-
|
|
17
|
+
onclick?.(e);
|
|
18
18
|
await utils.sleep(0.2);
|
|
19
19
|
respClick = true;
|
|
20
20
|
}
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
</script>
|
|
25
|
-
<div class="uniface-icon {className}" class:clickable={
|
|
25
|
+
<div class="uniface-icon {className}" class:clickable={onclick!=null} {style} aria-hidden="true" on:click={handleClickEvent}>
|
|
26
26
|
<i class={name}></i>
|
|
27
27
|
</div>
|
|
@@ -14,7 +14,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
14
14
|
}
|
|
15
15
|
declare const Icon: $$__sveltets_2_IsomorphicComponent<{
|
|
16
16
|
name: string;
|
|
17
|
-
|
|
17
|
+
onclick?: MouseClickHandler | null;
|
|
18
18
|
style?: string;
|
|
19
19
|
class?: string;
|
|
20
20
|
}, {
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
</div>
|
|
90
90
|
<!-- 顶部工具栏 -->
|
|
91
91
|
<div class="toolbar" on:click|stopPropagation aria-hidden="true">
|
|
92
|
-
<IconButton icon="icon_google_zoom_in" type="default"
|
|
93
|
-
<IconButton icon="icon_google_zoom_out" type="default"
|
|
94
|
-
<IconButton icon="icon_google_cancel" type="default"
|
|
92
|
+
<IconButton icon="icon_google_zoom_in" type="default" onclick={zoomIn}></IconButton>
|
|
93
|
+
<IconButton icon="icon_google_zoom_out" type="default" onclick={zoomOut}></IconButton>
|
|
94
|
+
<IconButton icon="icon_google_cancel" type="default" onclick={()=>{visible = false}}></IconButton>
|
|
95
95
|
</div>
|
|
96
96
|
</div>
|
|
97
97
|
</div>
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
|
|
129
129
|
{#if !disabled && value?.length > 0}
|
|
130
130
|
<div class="action-button-wrapper" style="position: absolute; top: 0; left: 0; width: {width}px;">
|
|
131
|
-
<Icon name="icon_google_clear" class="uniface-editor-clean-icon"
|
|
131
|
+
<Icon name="icon_google_clear" class="uniface-editor-clean-icon" onclick={clean}/>
|
|
132
132
|
</div>
|
|
133
133
|
{/if}
|
|
134
134
|
</div>
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
{#if buttons && buttons.length > 0}
|
|
141
141
|
{#each buttons as button}
|
|
142
142
|
<Button style="margin: 0 4px; width: 90px" type={button.type??''} label={button.label}
|
|
143
|
-
|
|
143
|
+
onclick={handleButtonClick(button.result)}/>
|
|
144
144
|
{/each}
|
|
145
145
|
{/if}
|
|
146
146
|
</div>
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
</script>
|
|
12
12
|
{#if goBack}
|
|
13
13
|
<div style="padding-right: 12px;">
|
|
14
|
-
<Icon name="icon_google_keyboard_backspace"
|
|
14
|
+
<Icon name="icon_google_keyboard_backspace" onclick={goBack}></Icon>
|
|
15
15
|
</div>
|
|
16
16
|
{:else if reload}
|
|
17
17
|
<div style="padding-right: 12px;">
|
|
18
|
-
<Icon name="icon_google_refresh"
|
|
18
|
+
<Icon name="icon_google_refresh" onclick={reload}></Icon>
|
|
19
19
|
</div>
|
|
20
20
|
{/if}
|
|
21
21
|
<div class="page-topic">
|
package/dist/tag/Tag.svelte
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<div class="{size} {variant} {className} {colorClass}" class:removable={removable}>
|
|
24
24
|
<span>{text}</span>
|
|
25
25
|
{#if removable}
|
|
26
|
-
<Icon name="icon_google_clear" class="uniface-remove-icon"
|
|
26
|
+
<Icon name="icon_google_clear" class="uniface-remove-icon" onclick={removeHandler}/>
|
|
27
27
|
{/if}
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
</div>
|
|
54
54
|
</ListBox>
|
|
55
55
|
<div class="icon-button-container" style="grid-column: 2/3;">
|
|
56
|
-
<IconButton
|
|
56
|
+
<IconButton onclick={moveToSource} type="primary" disabled={targetSelectedList.length === 0}>
|
|
57
57
|
<i class="icon_google_navigate_before"></i>
|
|
58
58
|
</IconButton>
|
|
59
|
-
<IconButton
|
|
59
|
+
<IconButton onclick={moveToTarget} type="primary" disabled={sourceSelectedList.length === 0}>
|
|
60
60
|
<i class="icon_google_navigate_next"></i>
|
|
61
61
|
</IconButton>
|
|
62
62
|
</div>
|
package/package.json
CHANGED