@ticatec/uniface-element 0.1.24 → 0.1.31
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 +9 -1
- package/dist/accordion/AccordionItemView.svelte +14 -4
- package/dist/accordion/AccordionItemView.svelte.d.ts +1 -0
- package/dist/app-top-bar/AppTopBar.svelte +9 -13
- package/dist/app-top-bar/AppTopBar.svelte.d.ts +1 -1
- package/dist/breadcrumbs/Breadcrumb.d.ts +4 -0
- package/dist/breadcrumbs/Breadcrumbs.svelte +21 -0
- package/dist/breadcrumbs/Breadcrumbs.svelte.d.ts +24 -0
- package/dist/breadcrumbs/index.d.ts +4 -0
- package/dist/breadcrumbs/index.js +2 -0
- package/dist/button/Button.svelte +2 -2
- package/dist/card/Card.svelte +3 -1
- package/dist/card/Card.svelte.d.ts +1 -0
- package/dist/card/CommonCardActionBar.svelte +4 -2
- package/dist/card/CommonCardActionBar.svelte.d.ts +1 -0
- package/dist/color-picker/ColorPicker.svelte +59 -0
- package/dist/color-picker/ColorPicker.svelte.d.ts +29 -0
- package/dist/color-picker/ColorPickerPanel.svelte +179 -0
- package/dist/color-picker/ColorPickerPanel.svelte.d.ts +23 -0
- package/dist/color-picker/index.d.ts +2 -0
- package/dist/color-picker/index.js +2 -0
- package/dist/common/CommonPicker.svelte +6 -3
- package/dist/common/Popover.svelte +9 -2
- package/dist/common-editor/CommonEditor.svelte +8 -7
- package/dist/common-range-editor/CommonRangeEditor.svelte +1 -5
- package/dist/data-table/DataTable.svelte +2 -1
- package/dist/data-table/DataTable.svelte.d.ts +1 -0
- package/dist/data-table/lib/ActionsColumn.d.ts +4 -0
- package/dist/data-table/parts/ActionsPanel.svelte +1 -1
- package/dist/data-table/parts/ActionsRow.svelte +4 -3
- package/dist/data-table/parts/ActionsRow.svelte.d.ts +1 -0
- package/dist/date-picker/DatePicker.svelte +2 -2
- package/dist/date-picker/DateTimePicker.svelte +1 -1
- package/dist/date-range/DateRangeEditor.svelte +1 -1
- package/dist/drawer/Drawer.svelte +9 -17
- package/dist/drawer/Drawer.svelte.d.ts +3 -7
- package/dist/i18n_resources/uniface_cn_resource.d.ts +1 -0
- package/dist/i18n_resources/uniface_cn_resource.js +2 -1
- package/dist/i18n_resources/uniface_en_resource.d.ts +2 -0
- package/dist/i18n_resources/uniface_en_resource.js +3 -1
- package/dist/memo-editor/MemoEditor.svelte +1 -1
- package/dist/nav-menu/MenuItem.d.ts +1 -1
- package/dist/options-multi-select/OptionsMultiSelect.svelte +1 -1
- package/dist/options-select/OptionsSelect.svelte +2 -2
- package/dist/prompts-text-editor/PromptsTextEditor.svelte +9 -9
- package/dist/tabs/Tabs.svelte +2 -2
- package/dist/tag/Tag.svelte +1 -1
- package/dist/ticatec-uniface-web.css +178 -93
- package/dist/unit-number-editor/UnitNumberEditor.svelte +6 -5
- package/package.json +6 -2
- package/dist/data-table/lib/AdvColumn.d.ts +0 -36
- /package/dist/{data-table/lib/AdvColumn.js → breadcrumbs/Breadcrumb.js} +0 -0
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import utils from "../common/utils";
|
|
5
|
-
import Icon from "../icon";
|
|
6
|
-
|
|
7
3
|
export let variant: '' | 'plain' | 'outlined' | 'filled' = '';
|
|
8
4
|
export let compact: boolean = false;
|
|
9
5
|
export {className as class};
|
|
@@ -22,7 +18,7 @@
|
|
|
22
18
|
<div class="divider"></div>
|
|
23
19
|
<slot name="to"/>
|
|
24
20
|
<div class="uniface-editor-clean-icon {showActionIcon ? '' : 'hidden'}">
|
|
25
|
-
<i class="
|
|
21
|
+
<i class="icon_google_clear clickable" aria-hidden="true" on:click={clean}></i>
|
|
26
22
|
</div>
|
|
27
23
|
</div>
|
|
28
24
|
<slot/>
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
export let inlineRowHeight: number = 80;
|
|
22
22
|
export let rowBorder: boolean = false;
|
|
23
23
|
export let colBorder: boolean = false;
|
|
24
|
+
export let emptyIndicator: string | undefined = undefined;
|
|
24
25
|
|
|
25
26
|
export let style: string = '';
|
|
26
27
|
|
|
@@ -111,7 +112,7 @@
|
|
|
111
112
|
{/if}
|
|
112
113
|
|
|
113
114
|
<ContentPanel columns={dataColumns} {orderDirection} {orderColumn} {handleWidthChange} {handleCellClick} {tabWidth} bind:rows
|
|
114
|
-
bind:scrollTop {expandRow} {rowHeight} {list} {table} {inlineComponent} bind:inlineRowHeight
|
|
115
|
+
bind:scrollTop {expandRow} {rowHeight} {list} {table} {inlineComponent} bind:inlineRowHeight {emptyIndicator}
|
|
115
116
|
displayHorizontalScroll={actionsColumn!=null || indicatorColumn != null || fixedCols.length > 0}
|
|
116
117
|
showVerticalScroll={actionsColumn == null}/>
|
|
117
118
|
{/if}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<div bind:this={scrollPanel} class="rows-container" style="overflow-y: auto" on:scroll|passive={handleActionPanelScroll}>
|
|
57
57
|
<div>
|
|
58
58
|
{#each rows as row, idx}
|
|
59
|
-
<ActionsRow {row} {rowHeight} parentRect={rect} alternative={idx % 2 == 1} width={actionsColumn.width}
|
|
59
|
+
<ActionsRow {row} {rowHeight} parentRect={rect} alternative={idx % 2 == 1} width={actionsColumn.width} align={actionsColumn.align}
|
|
60
60
|
actions={actionsColumn.getActions(row.data)}/>
|
|
61
61
|
{#if row == expandRow}
|
|
62
62
|
<div class="inline-panel" style="height: {inlineRowHeight??0}px">
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
export let rowHeight: number;
|
|
17
17
|
|
|
18
|
+
export let align: 'left' | 'center' | undefined;
|
|
19
|
+
|
|
18
20
|
let style: string;
|
|
19
21
|
|
|
20
22
|
|
|
@@ -84,9 +86,8 @@
|
|
|
84
86
|
$: style = rowHeight== null ? '' : `height: ${rowHeight}px`
|
|
85
87
|
|
|
86
88
|
</script>
|
|
87
|
-
<div class="data-row" class:alternative style="position: relative; width: {width}px;
|
|
88
|
-
<div class="action-cell" bind:this={cell}
|
|
89
|
-
style="">
|
|
89
|
+
<div class="data-row" class:alternative style="position: relative; display: block; width: {width}px; {style}">
|
|
90
|
+
<div class="action-cell" bind:this={cell} style="{align=='center' ? 'margin: 0 auto' : ''}">
|
|
90
91
|
{#each actionList as action}
|
|
91
92
|
<TextButton style="flex-shrink: 0; top: 0" size="mini" type="primary" label={action.label} onClick={()=>action.callback(row.data)}/>
|
|
92
93
|
{/each}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const handleCalendarSelect = (d: dayjs.Dayjs) => {
|
|
49
|
-
value = d;
|
|
49
|
+
value = d.toDate();
|
|
50
50
|
showPopup = false;
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
|
|
79
79
|
</script>
|
|
80
80
|
|
|
81
|
-
<CommonPicker {displayMode} {variant} {style} className="uniface-date-time-editor" {compact} dropDownIcon="
|
|
81
|
+
<CommonPicker {displayMode} {variant} {style} className="uniface-date-time-editor" {compact} dropDownIcon="icon_google_event_available"
|
|
82
82
|
bind:showPopup canClean={!mandatory && value!=null} autoFit={false} clean={cleanData} {textValue} {readonly} {disabled}>
|
|
83
83
|
|
|
84
84
|
<input style="width: 100%" bind:this={editor} on:click={openPopup} {placeholder} on:keydown={handleKeyDown}
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
|
|
116
116
|
</script>
|
|
117
117
|
|
|
118
|
-
<CommonPicker {displayMode} {variant} {style} className="uniface-date-time-editor" {compact} dropDownIcon="
|
|
118
|
+
<CommonPicker {displayMode} {variant} {style} className="uniface-date-time-editor" {compact} dropDownIcon="icon_google_access_time"
|
|
119
119
|
bind:showPopup canClean={!mandatory && value!=null} autoFit={false} clean={cleanData} {textValue} {readonly} {disabled}>
|
|
120
120
|
|
|
121
121
|
<input style="width: 100%" bind:this={editor} on:click={openPopup} {placeholder} on:keydown={handleKeyDown}
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<input style="width: 100%; text-align: center" readonly on:click={showPopover} value={textTo}/>
|
|
67
67
|
</svelte:fragment>
|
|
68
68
|
<svelte:fragment>
|
|
69
|
-
<i class="
|
|
69
|
+
<i class="icon_google_event_note action-icon" aria-hidden="true" on:click={showPopover}></i>
|
|
70
70
|
</svelte:fragment>
|
|
71
71
|
</CommonRangeEditor>
|
|
72
72
|
|
|
@@ -1,38 +1,30 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import {fly} from "svelte/transition";
|
|
3
|
-
import {createEventDispatcher} from "svelte";
|
|
4
3
|
|
|
5
4
|
|
|
6
|
-
export
|
|
7
|
-
visible = true;
|
|
8
|
-
hidden = false;
|
|
9
|
-
dispatch('open');
|
|
10
|
-
}
|
|
5
|
+
export let visible: boolean = false;
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
visible = false;
|
|
14
|
-
}
|
|
7
|
+
let hidden: boolean = true;
|
|
15
8
|
|
|
16
|
-
export let width:number = 300;
|
|
17
|
-
export let position: 'left' | 'right' = 'left';
|
|
18
9
|
|
|
19
|
-
|
|
20
|
-
let
|
|
21
|
-
let visible: boolean = false;
|
|
10
|
+
export let width:number = 300;
|
|
11
|
+
export let position: 'left' | 'right' = 'left'
|
|
22
12
|
|
|
23
13
|
$: if (visible) {
|
|
24
14
|
hidden = false;
|
|
25
15
|
}
|
|
26
16
|
|
|
17
|
+
|
|
18
|
+
|
|
27
19
|
let xPos: string;
|
|
28
20
|
|
|
29
21
|
$: xPos = position == 'left' ? `${-width}` : '100%';
|
|
30
22
|
|
|
31
23
|
</script>
|
|
32
|
-
<div class="uniface-drawer" style="display: {hidden ? 'none' : 'block'}" on:click={()=>{visible=false;
|
|
24
|
+
<div class="uniface-drawer" aria-hidden="true" style="display: {hidden ? 'none' : 'block'}" on:click={()=>{visible=false;}}>
|
|
33
25
|
{#if visible}
|
|
34
|
-
<div class={position} style="width: {width}px" transition:fly={{ x: xPos, duration: 1000, opacity: 0.5 }}
|
|
35
|
-
on:outroend={()=>{hidden = !visible}} on:click
|
|
26
|
+
<div class={position} style="width: {width}px" transition:fly={{ x: xPos, duration: 1000, opacity: 0.5 }} aria-hidden="false"
|
|
27
|
+
on:outroend={()=>{hidden = !visible}} on:click|stopPropagation>
|
|
36
28
|
<div>
|
|
37
29
|
<slot></slot>
|
|
38
30
|
</div>
|
|
@@ -17,21 +17,17 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
|
17
17
|
children?: any;
|
|
18
18
|
} : {});
|
|
19
19
|
declare const Drawer: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
-
|
|
21
|
-
close?: () => void;
|
|
20
|
+
visible?: boolean;
|
|
22
21
|
width?: number;
|
|
23
22
|
position?: "left" | "right";
|
|
24
23
|
}, {
|
|
25
24
|
default: {};
|
|
26
25
|
}>, {
|
|
27
|
-
|
|
26
|
+
click: MouseEvent;
|
|
28
27
|
} & {
|
|
29
28
|
[evt: string]: CustomEvent<any>;
|
|
30
29
|
}, {
|
|
31
30
|
default: {};
|
|
32
|
-
}, {
|
|
33
|
-
open: () => void;
|
|
34
|
-
close: () => void;
|
|
35
|
-
}, string>;
|
|
31
|
+
}, {}, string>;
|
|
36
32
|
type Drawer = InstanceType<typeof Drawer>;
|
|
37
33
|
export default Drawer;
|
|
@@ -3,6 +3,7 @@ declare const langRes: {
|
|
|
3
3
|
btnClose: string;
|
|
4
4
|
btnCancel: string;
|
|
5
5
|
btnConfirm: string;
|
|
6
|
+
colorPicker: string;
|
|
6
7
|
calendar: {
|
|
7
8
|
months: string[];
|
|
8
9
|
monthsAbbr: string[];
|
|
@@ -23,6 +24,7 @@ declare const langRes: {
|
|
|
23
24
|
dataTable: {
|
|
24
25
|
rowNo: string;
|
|
25
26
|
actions: string;
|
|
27
|
+
emptyDataSet: string;
|
|
26
28
|
};
|
|
27
29
|
};
|
|
28
30
|
};
|
|
@@ -3,6 +3,7 @@ const langRes = {
|
|
|
3
3
|
btnClose: "Close",
|
|
4
4
|
btnCancel: 'Cancel',
|
|
5
5
|
btnConfirm: "OK",
|
|
6
|
+
colorPicker: "Pick up color",
|
|
6
7
|
calendar: {
|
|
7
8
|
months: [
|
|
8
9
|
'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'
|
|
@@ -30,7 +31,8 @@ const langRes = {
|
|
|
30
31
|
},
|
|
31
32
|
dataTable: {
|
|
32
33
|
rowNo: "Row#",
|
|
33
|
-
actions: "Actions"
|
|
34
|
+
actions: "Actions",
|
|
35
|
+
emptyDataSet: 'Empty dataset'
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
};
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
{/if}
|
|
79
79
|
{#if !disabled && value && value.length > 0}
|
|
80
80
|
<div class="action-button-wrapper" style="position: absolute; top: 0; left: 0; width: {width}px;">
|
|
81
|
-
<Icon name="
|
|
81
|
+
<Icon name="icon_google_clear" clickable class="uniface-editor-clean-icon" onClick={clean}/>
|
|
82
82
|
</div>
|
|
83
83
|
{/if}
|
|
84
84
|
</div>
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
|
|
105
105
|
</script>
|
|
106
106
|
|
|
107
|
-
<CommonPicker {displayMode} {variant} {style} {compact} className="multiple" dropDownIcon="
|
|
107
|
+
<CommonPicker {displayMode} {variant} {style} {compact} className="multiple" dropDownIcon="icon_google_arrow_drop_down"
|
|
108
108
|
bind:showPopup canClean={value!=null} autoFit clean={cleanData} {textValue} {readonly} {disabled}>
|
|
109
109
|
|
|
110
110
|
<div class="option-field" aria-hidden="true" on:click={()=>{showPopup = true}}>
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
|
|
75
75
|
</script>
|
|
76
76
|
|
|
77
|
-
<CommonPicker {displayMode} {variant} {style} {compact} dropDownIcon="
|
|
77
|
+
<CommonPicker {displayMode} {variant} {style} {compact} dropDownIcon="icon_google_arrow_drop_down"
|
|
78
78
|
bind:showPopup canClean={!mandatory && value!=null} autoFit clean={cleanData} {textValue} {readonly} {disabled}>
|
|
79
79
|
|
|
80
80
|
<input style="width: 100%" bind:this={editor} on:click={openPopup} {placeholder} readonly
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
{#each options as op}
|
|
85
85
|
{#if hideOptions.indexOf(op[keyField]) < 0}
|
|
86
86
|
{#if itemRender != null}
|
|
87
|
-
<svelte:component this={itemRender} item={op} disabled={disableOptions.indexOf(op[keyField])>-1}
|
|
87
|
+
<svelte:component this={itemRender.component} {...itemRender.props} item={op} disabled={disableOptions.indexOf(op[keyField])>-1}
|
|
88
88
|
on:click={handleItemClick(op)}/>
|
|
89
89
|
{:else}
|
|
90
90
|
<div class="option-item" class:disabled={disableOptions.indexOf(op[keyField])>-1} aria-hidden="true"
|
|
@@ -64,27 +64,27 @@
|
|
|
64
64
|
|
|
65
65
|
<div bind:this={divPanel}>
|
|
66
66
|
<CommonEditor {displayMode} {style} {value} {prefix} {suffix} {readonly} {variant} {compact} class={className}
|
|
67
|
-
showActionIcon={removable && !readonly && !disabled && !utils.isEmpty(value)} {clean}
|
|
67
|
+
showActionIcon={removable && !readonly && !disabled && !utils.isEmpty(value)} {clean}
|
|
68
|
+
hasLeadingIcon={$$slots['leading-icon']!=null}>
|
|
68
69
|
<svelte:fragment slot="leading-icon">
|
|
69
70
|
{#if $$slots['leading-icon']}
|
|
70
|
-
<
|
|
71
|
-
<slot name="leading-icon"/>
|
|
72
|
-
</div>
|
|
71
|
+
<slot name="leading-icon"/>
|
|
73
72
|
{/if}
|
|
74
73
|
</svelte:fragment>
|
|
75
|
-
<input bind:this={editor}
|
|
76
|
-
<
|
|
74
|
+
<input style="width: 100%" bind:this={editor} {disabled} {placeholder} bind:value={value} {readonly}/>
|
|
75
|
+
<svelte:fragment slot="trailing-icon">
|
|
77
76
|
{#if !disabled && !readonly}
|
|
78
|
-
<i class="option-dropdown
|
|
77
|
+
<i class="option-dropdown icon_google_arrow_drop_down" aria-hidden="true" on:click={openPopup}></i>
|
|
79
78
|
{/if}
|
|
80
|
-
</
|
|
79
|
+
</svelte:fragment>
|
|
81
80
|
</CommonEditor>
|
|
82
81
|
|
|
83
82
|
{#if showPopup}
|
|
84
83
|
<Popover target={divPanel} autoFit align="right" on:close={()=>{showPopup=false}}>
|
|
85
84
|
<div class="options-popover" style={mh}>
|
|
86
85
|
{#each words as word}
|
|
87
|
-
<div style="padding-left: 12px; padding-right: 12px" on:click={handleHintClick(word)}
|
|
86
|
+
<div class="option-item" style="padding-left: 12px; padding-right: 12px" on:click={handleHintClick(word)}
|
|
87
|
+
aria-hidden="true">
|
|
88
88
|
<span>{word}</span>
|
|
89
89
|
</div>
|
|
90
90
|
{/each}
|
package/dist/tabs/Tabs.svelte
CHANGED
|
@@ -126,10 +126,10 @@
|
|
|
126
126
|
{:else}
|
|
127
127
|
<span>{tab[textField]}</span>
|
|
128
128
|
{#if refreshable}
|
|
129
|
-
<i class="
|
|
129
|
+
<i class="icon_google_refresh tab-refresh" on:click={reloadTab(tab)} aria-hidden="true"></i>
|
|
130
130
|
{/if}
|
|
131
131
|
{#if closable === true || (typeof (closable) == "function" && closable(tab))}
|
|
132
|
-
<i class="
|
|
132
|
+
<i class="icon_google_clear tab-action" on:click={closeTab(tab)} aria-hidden="true"></i>
|
|
133
133
|
{/if}
|
|
134
134
|
{/if}
|
|
135
135
|
</div>
|
package/dist/tag/Tag.svelte
CHANGED
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
<div class="uniface-tag" {style}>
|
|
23
23
|
<div class="{size} {variant} {className} {colorClass}" class:removable={removable} >
|
|
24
24
|
<span>{text}</span>
|
|
25
|
-
<Icon name="
|
|
25
|
+
<Icon name="icon_google_clear" clickable class="uniface-remove-icon" onClick={removeHandler}/>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|