@ticatec/uniface-element 0.1.14 → 0.1.16
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/action-bar/ActionBar.svelte +2 -2
- package/dist/attachment-files/FileUploadBar.svelte +1 -1
- package/dist/attachment-files/FileUploadPanel.svelte +1 -1
- package/dist/base-calendar/CalendarBase.svelte +7 -3
- package/dist/base-calendar/CalendarBase.svelte.d.ts +0 -3
- package/dist/base-calendar/DateContext.d.ts +0 -9
- package/dist/base-calendar/DateContext.js +7 -68
- package/dist/base-calendar/index.d.ts +2 -2
- package/dist/base-calendar/index.js +2 -2
- package/dist/box/Box.svelte +11 -7
- package/dist/box/Box.svelte.d.ts +8 -3
- package/dist/checkbox/CheckBox.svelte +16 -7
- package/dist/checkbox/CheckBox.svelte.d.ts +1 -1
- package/dist/common/CommonPicker.svelte +14 -8
- package/dist/common/CommonPicker.svelte.d.ts +1 -1
- package/dist/common-editor/CommonEditor.svelte +17 -9
- package/dist/common-editor/CommonEditor.svelte.d.ts +2 -0
- package/dist/common-range-editor/CommonRangeEditor.svelte +8 -9
- package/dist/common-range-editor/CommonRangeEditor.svelte.d.ts +0 -2
- package/dist/concise-data-table/Column.d.ts +9 -0
- package/dist/concise-data-table/Column.js +1 -0
- package/dist/concise-data-table/ConciseListTable.svelte +154 -0
- package/dist/concise-data-table/ConciseListTable.svelte.d.ts +26 -0
- package/dist/concise-data-table/DataCell.svelte +22 -0
- package/dist/{data-table/parts/LinkButton.svelte.d.ts → concise-data-table/DataCell.svelte.d.ts} +7 -6
- package/dist/concise-data-table/DataRow.svelte +15 -0
- package/dist/concise-data-table/DataRow.svelte.d.ts +25 -0
- package/dist/concise-data-table/TableOptions.d.ts +11 -0
- package/dist/concise-data-table/TableOptions.js +1 -0
- package/dist/concise-data-table/index.d.ts +5 -0
- package/dist/concise-data-table/index.js +2 -0
- package/dist/concise-data-table/utils.d.ts +6 -0
- package/dist/concise-data-table/utils.js +38 -0
- package/dist/criteria-field/CriteriaField.svelte +3 -2
- package/dist/criteria-field/CriteriaField.svelte.d.ts +1 -0
- package/dist/data-table/DataTable.svelte +2 -0
- package/dist/data-table/lib/ActionsColumn.d.ts +0 -4
- package/dist/data-table/lib/HrefLink.d.ts +1 -1
- package/dist/data-table/parts/ActionsPanel.svelte +2 -2
- package/dist/data-table/parts/ContentPanel.svelte +6 -2
- package/dist/data-table/parts/DataCell.svelte +1 -1
- package/dist/data-table/parts/FixedHeaderPanel.svelte +1 -1
- package/dist/data-table/parts/HrefCell.svelte +8 -10
- package/dist/data-table/parts/TextCell.svelte +6 -9
- package/dist/date-picker/DateTimePicker.svelte +3 -7
- package/dist/date-range/DateRangeEditor.svelte +2 -2
- package/dist/dialog/Dialog.svelte +1 -1
- package/dist/form-field/FormField.svelte +9 -11
- package/dist/form-field/FormField.svelte.d.ts +2 -1
- package/dist/i18n_resources/index.d.ts +3 -0
- package/dist/i18n_resources/index.js +3 -0
- package/dist/i18n_resources/uniface_cn_resource.d.ts +29 -0
- package/dist/i18n_resources/uniface_cn_resource.js +37 -0
- package/dist/i18n_resources/uniface_en_resource.d.ts +29 -0
- package/dist/i18n_resources/uniface_en_resource.js +37 -0
- package/dist/input-options-select/InputOptionsSelect.svelte +105 -28
- package/dist/input-options-select/InputOptionsSelect.svelte.d.ts +2 -4
- package/dist/list-box/ListBox.svelte +81 -47
- package/dist/list-box/ListBox.svelte.d.ts +10 -16
- package/dist/message-box/IMessageBox.js +1 -1
- package/dist/nav-menu/NavigatorMenuItem.svelte +1 -1
- package/dist/options-multi-select/OptionsMultiSelect.svelte +1 -1
- package/dist/property-editor/PropertyEditor.svelte +1 -1
- package/dist/search-box/SearchBox.svelte +19 -12
- package/dist/search-box/SearchBox.svelte.d.ts +6 -2
- package/dist/text-editor/TextEditor.svelte +2 -3
- package/dist/ticatec-uniface-web.css +738 -652
- package/dist/tree-view/TreeNodeView.svelte +6 -8
- package/dist/tree-view/TreeUtils.js +2 -2
- package/package.json +12 -7
- package/dist/UnifaceResource.d.ts +0 -43
- package/dist/UnifaceResource.js +0 -57
- package/dist/assets/arrow_down.svg +0 -1
- package/dist/assets/arrow_up.svg +0 -1
- package/dist/assets/calendar_icon.svg +0 -1
- package/dist/assets/delete_icon.svg +0 -1
- package/dist/assets/icon-dropdown.svg +0 -1
- package/dist/assets/icon_left.svg +0 -1
- package/dist/assets/icon_right.svg +0 -1
- package/dist/assets/pickup-options.svg +0 -1
- package/dist/assets/retry.png +0 -0
- package/dist/data-table/parts/LinkButton.svelte +0 -19
- package/dist/i18nContext.d.ts +0 -21
- package/dist/i18nContext.js +0 -29
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
|
|
3
3
|
import type {ButtonActions} from "./ButtonAction";
|
|
4
|
-
import Button from "../button";
|
|
5
|
-
import Separator from "../separator";
|
|
4
|
+
import Button from "../button/Button.svelte";
|
|
5
|
+
import Separator from "../separator/Separator.svelte";
|
|
6
6
|
|
|
7
7
|
export let buttons: ButtonActions = [];
|
|
8
8
|
export let style: string = '';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import {ProgressStatus} from "../progress-bar/ProgressStatus";
|
|
6
6
|
import {onMount} from "svelte";
|
|
7
7
|
import type UploadFile from "./UploadFile";
|
|
8
|
-
import i18n from "
|
|
8
|
+
import i18n from "@ticatec/i18n";
|
|
9
9
|
|
|
10
10
|
export let file: UploadFile;
|
|
11
11
|
export let removeFile: (file: any) => void;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import type {FileUpload} from "./FileUpload";
|
|
9
9
|
import utils from "../common/utils";
|
|
10
10
|
import ModalPopover from "../common/ModalPopover.svelte";
|
|
11
|
-
import i18n from "
|
|
11
|
+
import i18n from "@ticatec/i18n";
|
|
12
12
|
|
|
13
13
|
export let accept: string = "*/*";
|
|
14
14
|
export let maxSize: number = 1024 * 1024 * 10;
|
|
@@ -12,9 +12,7 @@
|
|
|
12
12
|
export let value: UniDate;
|
|
13
13
|
export let min: UniDate = null;
|
|
14
14
|
export let max: UniDate = null;
|
|
15
|
-
|
|
16
|
-
export let monthTitle: Array<string> | null = null;
|
|
17
|
-
export let weekBegin: number | null = null;
|
|
15
|
+
|
|
18
16
|
export let style: string = '';
|
|
19
17
|
export let cellWidth: number = 32;
|
|
20
18
|
export let cellHeight: number = 32;
|
|
@@ -32,6 +30,12 @@
|
|
|
32
30
|
let showYears: boolean = false;
|
|
33
31
|
let oldValue: any;
|
|
34
32
|
|
|
33
|
+
let weekTitle: Array<string> = dateCtx.weekTitleAbbr;
|
|
34
|
+
let monthTitle: Array<string> = dateCtx.months;
|
|
35
|
+
let weekBegin: number = dateCtx.weekBegin;
|
|
36
|
+
|
|
37
|
+
console.log("日期资源", dateCtx.weekTitle, dateCtx.months, dateCtx.weekTitleAbbr)
|
|
38
|
+
|
|
35
39
|
const onSelectDate = (date: dayjs.Dayjs) => {
|
|
36
40
|
value = date;
|
|
37
41
|
onSelect(value);
|
|
@@ -18,9 +18,6 @@ declare const CalendarBase: $$__sveltets_2_IsomorphicComponent<{
|
|
|
18
18
|
value: UniDate;
|
|
19
19
|
min?: UniDate;
|
|
20
20
|
max?: UniDate;
|
|
21
|
-
weekTitle?: Array<string> | null;
|
|
22
|
-
monthTitle?: Array<string> | null;
|
|
23
|
-
weekBegin?: number | null;
|
|
24
21
|
style?: string;
|
|
25
22
|
cellWidth?: number;
|
|
26
23
|
cellHeight?: number;
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
declare const i18nDateString: any;
|
|
2
|
-
export { i18nDateString };
|
|
3
1
|
export default class DateContext {
|
|
4
|
-
private _months;
|
|
5
|
-
private _monthsAbbr;
|
|
6
|
-
private _weekTitle;
|
|
7
|
-
private _weekTitleAbbr;
|
|
8
2
|
private _weekBegin;
|
|
9
3
|
private _dateFmt;
|
|
10
4
|
private _timeFmt;
|
|
11
|
-
private _confirmText;
|
|
12
5
|
private static instance;
|
|
13
6
|
private constructor();
|
|
14
7
|
static getInstance(): DateContext;
|
|
15
|
-
static initialize(res: any): DateContext;
|
|
16
8
|
get months(): Array<string>;
|
|
17
9
|
get monthsAbbr(): Array<string>;
|
|
18
10
|
get weekTitle(): Array<string>;
|
|
@@ -23,5 +15,4 @@ export default class DateContext {
|
|
|
23
15
|
get dateFormat(): string;
|
|
24
16
|
set timeFormat(value: string);
|
|
25
17
|
get timeFormat(): string;
|
|
26
|
-
get confirmText(): string;
|
|
27
18
|
}
|
|
@@ -1,86 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
zh: {
|
|
3
|
-
months: [
|
|
4
|
-
'一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'
|
|
5
|
-
],
|
|
6
|
-
monthsAbbr: [
|
|
7
|
-
'一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'
|
|
8
|
-
],
|
|
9
|
-
weekTitle: [
|
|
10
|
-
"日", "一", "二", "三", "四", "五", "六"
|
|
11
|
-
],
|
|
12
|
-
confirmText: "确认"
|
|
13
|
-
},
|
|
14
|
-
en: {
|
|
15
|
-
months: [
|
|
16
|
-
'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'
|
|
17
|
-
],
|
|
18
|
-
monthsAbbr: [
|
|
19
|
-
'Jan', 'Feb', 'Mar', 'Api', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
|
|
20
|
-
],
|
|
21
|
-
weekTitle: [
|
|
22
|
-
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
|
|
23
|
-
],
|
|
24
|
-
weekTitleAbbr: [
|
|
25
|
-
"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat"
|
|
26
|
-
],
|
|
27
|
-
confirmText: "OK"
|
|
28
|
-
},
|
|
29
|
-
fr: {
|
|
30
|
-
months: [
|
|
31
|
-
'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'
|
|
32
|
-
],
|
|
33
|
-
monthsAbbr: [
|
|
34
|
-
'Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Août', 'Sept', 'Oct', 'Nov', 'Déc'
|
|
35
|
-
],
|
|
36
|
-
weekTitle: [
|
|
37
|
-
"Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"
|
|
38
|
-
],
|
|
39
|
-
weekTitleAbbr: [
|
|
40
|
-
"Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"
|
|
41
|
-
],
|
|
42
|
-
confirmText: "OK"
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
export { i18nDateString };
|
|
1
|
+
import i18n from "@ticatec/i18n";
|
|
46
2
|
export default class DateContext {
|
|
47
|
-
_months;
|
|
48
|
-
_monthsAbbr;
|
|
49
|
-
_weekTitle;
|
|
50
|
-
_weekTitleAbbr;
|
|
51
3
|
_weekBegin = 1;
|
|
52
4
|
_dateFmt = "YYYY-MM-DD";
|
|
53
5
|
_timeFmt = "HH:mm:ss";
|
|
54
|
-
_confirmText = 'OK';
|
|
55
6
|
static instance;
|
|
56
|
-
constructor(
|
|
57
|
-
this._months = res.months;
|
|
58
|
-
this._monthsAbbr = res.monthsAbbr ?? res.months;
|
|
59
|
-
this._weekTitle = res.weekTitle;
|
|
60
|
-
this._weekTitleAbbr = res.weekTitleAbbr ?? res.weekTitle;
|
|
61
|
-
this._confirmText = res.confirmText ?? 'OK';
|
|
7
|
+
constructor() {
|
|
62
8
|
}
|
|
63
9
|
static getInstance() {
|
|
64
10
|
if (DateContext.instance == null) {
|
|
65
|
-
DateContext.instance = new DateContext(
|
|
11
|
+
DateContext.instance = new DateContext();
|
|
66
12
|
}
|
|
67
13
|
return DateContext.instance;
|
|
68
14
|
}
|
|
69
|
-
static initialize(res) {
|
|
70
|
-
DateContext.instance = new DateContext(res || i18nDateString.en);
|
|
71
|
-
return DateContext.instance;
|
|
72
|
-
}
|
|
73
15
|
get months() {
|
|
74
|
-
return
|
|
16
|
+
return i18n.get("uniface.calendar.months");
|
|
75
17
|
}
|
|
76
18
|
get monthsAbbr() {
|
|
77
|
-
return
|
|
19
|
+
return i18n.get("uniface.calendar.monthsAbbr");
|
|
78
20
|
}
|
|
79
21
|
get weekTitle() {
|
|
80
|
-
return
|
|
22
|
+
return i18n.get("uniface.calendar.weekTitle");
|
|
81
23
|
}
|
|
82
24
|
get weekTitleAbbr() {
|
|
83
|
-
return
|
|
25
|
+
return i18n.get("uniface.calendar.weekTitleAbbr");
|
|
84
26
|
}
|
|
85
27
|
set weekBegin(value) {
|
|
86
28
|
if (value < 0 || value > 6) {
|
|
@@ -103,7 +45,4 @@ export default class DateContext {
|
|
|
103
45
|
get timeFormat() {
|
|
104
46
|
return this._timeFmt;
|
|
105
47
|
}
|
|
106
|
-
get confirmText() {
|
|
107
|
-
return this._confirmText;
|
|
108
|
-
}
|
|
109
48
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Calendar from "./CalendarBase.svelte";
|
|
2
|
-
import DateContext
|
|
2
|
+
import DateContext from "./DateContext";
|
|
3
3
|
import dateUtils from "./dateUtils";
|
|
4
4
|
export default Calendar;
|
|
5
|
-
export { DateContext,
|
|
5
|
+
export { DateContext, dateUtils };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Calendar from "./CalendarBase.svelte";
|
|
2
|
-
import DateContext
|
|
2
|
+
import DateContext from "./DateContext";
|
|
3
3
|
import dateUtils from "./dateUtils";
|
|
4
4
|
export default Calendar;
|
|
5
|
-
export { DateContext,
|
|
5
|
+
export { DateContext, dateUtils };
|
package/dist/box/Box.svelte
CHANGED
|
@@ -3,17 +3,22 @@
|
|
|
3
3
|
export let style: string = "";
|
|
4
4
|
export let title: string = null as unknown as string;
|
|
5
5
|
export let round: boolean = false;
|
|
6
|
+
export let content$style: string | null = null;
|
|
7
|
+
export let header$style: string | null = null;
|
|
8
|
+
export let footer$style: string | null = null;
|
|
9
|
+
export let showFooter: boolean = true;
|
|
10
|
+
export {className as class};
|
|
11
|
+
|
|
12
|
+
let className: string | null = null;
|
|
6
13
|
|
|
7
|
-
export let content$style: string = '';
|
|
8
|
-
export let fonter$style: string = '';
|
|
9
14
|
|
|
10
15
|
</script>
|
|
11
16
|
|
|
12
|
-
<div {style} class="uniface-box" class:round>
|
|
17
|
+
<div {style} class="uniface-box {className}" class:round>
|
|
13
18
|
{#if title || $$slots['header']}
|
|
14
|
-
<div class="box-
|
|
19
|
+
<div class="box-header flex-container" style={header$style}>
|
|
15
20
|
<slot name="header">
|
|
16
|
-
<div
|
|
21
|
+
<div class="title">
|
|
17
22
|
<span>{title}</span>
|
|
18
23
|
</div>
|
|
19
24
|
</slot>
|
|
@@ -23,9 +28,8 @@
|
|
|
23
28
|
<slot></slot>
|
|
24
29
|
</div>
|
|
25
30
|
{#if $$slots['footer']}
|
|
26
|
-
<div class="box-footer" style={
|
|
31
|
+
<div class="box-footer flex-container" style="{footer$style}; {showFooter ? '' : 'display: none' }">
|
|
27
32
|
<slot name="footer">
|
|
28
|
-
|
|
29
33
|
</slot>
|
|
30
34
|
</div>
|
|
31
35
|
{/if}
|
package/dist/box/Box.svelte.d.ts
CHANGED
|
@@ -20,8 +20,11 @@ declare const Box: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithCh
|
|
|
20
20
|
style?: string;
|
|
21
21
|
title?: string;
|
|
22
22
|
round?: boolean;
|
|
23
|
-
content$style?: string;
|
|
24
|
-
|
|
23
|
+
content$style?: string | null;
|
|
24
|
+
header$style?: string | null;
|
|
25
|
+
footer$style?: string | null;
|
|
26
|
+
showFooter?: boolean;
|
|
27
|
+
class?: null;
|
|
25
28
|
}, {
|
|
26
29
|
header: {};
|
|
27
30
|
default: {};
|
|
@@ -32,6 +35,8 @@ declare const Box: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithCh
|
|
|
32
35
|
header: {};
|
|
33
36
|
default: {};
|
|
34
37
|
footer: {};
|
|
35
|
-
}, {
|
|
38
|
+
}, {
|
|
39
|
+
class: null;
|
|
40
|
+
}, string>;
|
|
36
41
|
type Box = InstanceType<typeof Box>;
|
|
37
42
|
export default Box;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
|
|
3
3
|
import type {OnChangeHandler} from "../common/OnChangeHandler";
|
|
4
|
+
import {tick} from "svelte";
|
|
4
5
|
|
|
5
|
-
export let label: string =
|
|
6
|
+
export let label: string | null = null;
|
|
6
7
|
export let readonly: boolean = false;
|
|
7
8
|
export let disabled: boolean = false;
|
|
8
9
|
export let value: boolean = false;
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
let oldValue = value;
|
|
16
17
|
|
|
17
18
|
let checkbox: any;
|
|
19
|
+
let checked: boolean;
|
|
18
20
|
|
|
19
21
|
const handleClickEvent = (e: MouseEvent) => {
|
|
20
22
|
if (readonly || disabled) {
|
|
@@ -22,8 +24,13 @@
|
|
|
22
24
|
e.preventDefault();
|
|
23
25
|
} else {
|
|
24
26
|
indeterminate = false;
|
|
25
|
-
setTimeout(()=>{
|
|
27
|
+
setTimeout(async () => {
|
|
26
28
|
onClick?.(e);
|
|
29
|
+
await tick();
|
|
30
|
+
if (checked != oldValue) {
|
|
31
|
+
value = checked;
|
|
32
|
+
onChange?.(value)
|
|
33
|
+
}
|
|
27
34
|
}, 50)
|
|
28
35
|
e.stopPropagation();
|
|
29
36
|
}
|
|
@@ -33,16 +40,18 @@
|
|
|
33
40
|
checkbox.indeterminate = indeterminate;
|
|
34
41
|
}
|
|
35
42
|
|
|
36
|
-
$:
|
|
43
|
+
$: { //当value从外面发生变化的时候
|
|
44
|
+
checked = value;
|
|
37
45
|
oldValue = value;
|
|
38
|
-
onChange?.(value)
|
|
39
46
|
}
|
|
40
47
|
|
|
41
48
|
|
|
42
49
|
</script>
|
|
43
50
|
<div class="uniface-checkbox" class:disabled class:compact {style}>
|
|
44
|
-
<label on:click={handleClickEvent}
|
|
45
|
-
<input bind:this={checkbox} type="checkbox" bind:checked={
|
|
46
|
-
|
|
51
|
+
<label on:click={handleClickEvent}>
|
|
52
|
+
<input bind:this={checkbox} type="checkbox" bind:checked={checked} {readonly} {disabled}/>
|
|
53
|
+
{#if label}
|
|
54
|
+
<span>{label}</span>
|
|
55
|
+
{/if}
|
|
47
56
|
</label>
|
|
48
57
|
</div>
|
|
@@ -13,7 +13,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
13
13
|
z_$$bindings?: Bindings;
|
|
14
14
|
}
|
|
15
15
|
declare const CheckBox: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
label?: string;
|
|
16
|
+
label?: string | null;
|
|
17
17
|
readonly?: boolean;
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
value?: boolean;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
export let autoFit: boolean = true;
|
|
16
16
|
export let canClean: boolean;
|
|
17
17
|
export let textValue: string;
|
|
18
|
-
export let dropDownIcon: string =
|
|
18
|
+
export let dropDownIcon: string | null = null;
|
|
19
19
|
export let clean: () => void;
|
|
20
20
|
export let iconClickHandler: MouseClickHandler = null as unknown as MouseClickHandler;
|
|
21
21
|
export let showPopup: boolean = false;
|
|
@@ -37,15 +37,21 @@
|
|
|
37
37
|
{#if readonly || disabled}
|
|
38
38
|
<input style="width: 100%" class="readonly" class:disabled readonly {disabled} value={textValue}/>
|
|
39
39
|
{:else}
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<
|
|
40
|
+
<div style="flex: 1 1 auto; position: relative; height: 100%">
|
|
41
|
+
<slot></slot>
|
|
42
|
+
{#if canClean && textValue && textValue.length > 0}
|
|
43
|
+
<div class="uniface-editor-clean-icon">
|
|
44
|
+
<i class="uniface-icon-x clickable " aria-hidden="true" on:click={clean}></i>
|
|
45
|
+
</div>
|
|
46
|
+
{/if}
|
|
47
|
+
</div>
|
|
48
|
+
{#if $$slots['dropdown-icon'] || dropDownIcon}
|
|
49
|
+
<div style="flex: 0 0 auto">
|
|
50
|
+
<slot name="dropdown-icon">
|
|
51
|
+
<Icon name={dropDownIcon} class="action-icon" onClick={iconClickHandler??openPopup}/>
|
|
52
|
+
</slot>
|
|
44
53
|
</div>
|
|
45
54
|
{/if}
|
|
46
|
-
<slot name="dropdown-icon">
|
|
47
|
-
<Icon name={dropDownIcon} class="action-icon" onClick={iconClickHandler??openPopup}/>
|
|
48
|
-
</slot>
|
|
49
55
|
{/if}
|
|
50
56
|
</div>
|
|
51
57
|
{#if showPopup}
|
|
@@ -29,7 +29,7 @@ declare const CommonPicker: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_Pr
|
|
|
29
29
|
autoFit?: boolean;
|
|
30
30
|
canClean: boolean;
|
|
31
31
|
textValue: string;
|
|
32
|
-
dropDownIcon?: string;
|
|
32
|
+
dropDownIcon?: string | null;
|
|
33
33
|
clean: () => void;
|
|
34
34
|
iconClickHandler?: MouseClickHandler;
|
|
35
35
|
showPopup?: boolean;
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
export let showActionIcon: boolean = false;
|
|
19
19
|
export let clean: () => void;
|
|
20
20
|
|
|
21
|
+
export let hasLeadingIcon: boolean = false;
|
|
22
|
+
export let hasTrailingIcon: boolean = false;
|
|
23
|
+
|
|
21
24
|
let className: string = '';
|
|
22
25
|
|
|
23
26
|
</script>
|
|
@@ -40,29 +43,34 @@
|
|
|
40
43
|
{:else}
|
|
41
44
|
<div class:compact class="uniface-common-editor {variant} {className}" tabindex="-1"
|
|
42
45
|
style="{style}">
|
|
43
|
-
{#if $$slots['leading-icon']}
|
|
44
|
-
<slot name="leading-icon"/>
|
|
45
|
-
{/if}
|
|
46
46
|
{#if !utils.isEmpty(prefix)}
|
|
47
47
|
<div class="editor-prefix" tabindex="-1" style="flex: 0 0 auto;">
|
|
48
48
|
<span>{prefix}</span>
|
|
49
49
|
</div>
|
|
50
|
+
{:else if $$slots['leading-icon'] && hasLeadingIcon}
|
|
51
|
+
<div class="editor-embed-icon" style="flex: 0 0 auto;">
|
|
52
|
+
<slot name="leading-icon"/>
|
|
53
|
+
</div>
|
|
50
54
|
{/if}
|
|
51
55
|
{#if disabled || readonly}
|
|
52
56
|
<input style="flex: 1 1 auto" {value} {disabled} {readonly} {placeholder}>
|
|
53
57
|
{:else}
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
<
|
|
58
|
+
<div style="position: relative; flex: 1 1 auto">
|
|
59
|
+
<slot/>
|
|
60
|
+
<div class="uniface-editor-clean-icon {showActionIcon ? '' : 'hidden'}">
|
|
61
|
+
<i class="uniface-icon-x clickable" aria-hidden="true" on:click={clean}></i>
|
|
62
|
+
</div>
|
|
57
63
|
</div>
|
|
58
64
|
{/if}
|
|
59
65
|
{#if !utils.isEmpty(suffix)}
|
|
60
66
|
<div class="editor-suffix" style="flex: 0 0 auto;">
|
|
61
67
|
<span>{suffix}</span>
|
|
62
68
|
</div>
|
|
69
|
+
{:else if $$slots['trailing-icon'] && hasTrailingIcon}
|
|
70
|
+
<div class="editor-embed-icon" style="flex: 0 0 auto;">
|
|
71
|
+
<slot name="trailing-icon"/>
|
|
72
|
+
</div>
|
|
63
73
|
{/if}
|
|
64
|
-
|
|
65
|
-
<slot name="trailing-icon"/>
|
|
66
|
-
{/if}
|
|
74
|
+
|
|
67
75
|
</div>
|
|
68
76
|
{/if}
|
|
@@ -31,6 +31,8 @@ declare const CommonEditor: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_Pr
|
|
|
31
31
|
displayMode?: DisplayMode;
|
|
32
32
|
showActionIcon?: boolean;
|
|
33
33
|
clean: () => void;
|
|
34
|
+
hasLeadingIcon?: boolean;
|
|
35
|
+
hasTrailingIcon?: boolean;
|
|
34
36
|
}, {
|
|
35
37
|
'leading-icon': {};
|
|
36
38
|
default: {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
import utils from "../common/utils";
|
|
3
5
|
import Icon from "../icon";
|
|
4
6
|
|
|
5
7
|
export let variant: '' | 'plain' | 'outlined' | 'filled' = '';
|
|
@@ -12,19 +14,16 @@
|
|
|
12
14
|
let className: string = '';
|
|
13
15
|
|
|
14
16
|
</script>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
<div class="uniface-common-editor uniface-range-editor uniface-common-picker {variant} {className}" class:compact tabindex="-1" {style}
|
|
19
|
+
on:blur>
|
|
20
|
+
<div style="flex: 1 1 auto; height: 100%; display: flex; flex-direction: row; gap: 2px; position: relative">
|
|
17
21
|
<slot name="from"/>
|
|
18
22
|
<div class="divider"></div>
|
|
19
23
|
<slot name="to"/>
|
|
20
24
|
<div class="uniface-editor-clean-icon {showActionIcon ? '' : 'hidden'}">
|
|
21
25
|
<i class="uniface-icon-x clickable" aria-hidden="true" on:click={clean}></i>
|
|
22
26
|
</div>
|
|
23
|
-
{#if $$slots['trailing-icon']}
|
|
24
|
-
<div class="action-icon">
|
|
25
|
-
<slot name="trailing-icon"/>
|
|
26
|
-
</div>
|
|
27
|
-
{/if}
|
|
28
27
|
</div>
|
|
29
|
-
<slot
|
|
30
|
-
</div>
|
|
28
|
+
<slot/>
|
|
29
|
+
</div>
|
|
@@ -26,7 +26,6 @@ declare const CommonRangeEditor: $$__sveltets_2_IsomorphicComponent<$$__sveltets
|
|
|
26
26
|
}, {
|
|
27
27
|
from: {};
|
|
28
28
|
to: {};
|
|
29
|
-
'trailing-icon': {};
|
|
30
29
|
default: {};
|
|
31
30
|
}>, {
|
|
32
31
|
blur: FocusEvent;
|
|
@@ -35,7 +34,6 @@ declare const CommonRangeEditor: $$__sveltets_2_IsomorphicComponent<$$__sveltets
|
|
|
35
34
|
}, {
|
|
36
35
|
from: {};
|
|
37
36
|
to: {};
|
|
38
|
-
'trailing-icon': {};
|
|
39
37
|
default: {};
|
|
40
38
|
}, {
|
|
41
39
|
class: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|