@ticatec/uniface-element 0.1.30 → 0.1.32
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/breadcrumbs/Breadcrumbs.svelte +2 -2
- 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 +1 -1
- 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/lib/RowAction.d.ts +8 -0
- package/dist/data-table/parts/ActionsPanel.svelte +1 -1
- package/dist/data-table/parts/ActionsRow.svelte +24 -10
- package/dist/data-table/parts/ActionsRow.svelte.d.ts +1 -0
- 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/options-select/OptionsSelect.svelte +1 -1
- package/dist/ticatec-uniface-web.css +1 -0
- package/package.json +1 -1
- package/dist/data-table/lib/AdvColumn.d.ts +0 -36
- package/dist/data-table/lib/AdvColumn.js +0 -1
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
<div class="uniface-breadcrumbs" {style}>
|
|
15
|
-
{#each items as item}
|
|
15
|
+
{#each items as item, idx}
|
|
16
16
|
<div>
|
|
17
17
|
<span>{separator}</span>
|
|
18
|
-
<span aria-hidden="true" class="breadcrumb" on:click={onItemClick(item.data)}>{item.label}</span>
|
|
18
|
+
<span aria-hidden="true" class="breadcrumb" on:click={idx==items.length-1 ? null : onItemClick(item.data)}>{item.label}</span>
|
|
19
19
|
</div>
|
|
20
20
|
{/each}
|
|
21
21
|
</div>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import {DisplayMode} from "../common/DisplayMode";
|
|
5
|
+
import type {OnChangeHandler} from "../common/OnChangeHandler";
|
|
6
|
+
import CommonPicker from "../common/CommonPicker.svelte";
|
|
7
|
+
|
|
8
|
+
type OnActionHandler = () => void;
|
|
9
|
+
|
|
10
|
+
export let showHex = true;
|
|
11
|
+
export let showRgb = false;
|
|
12
|
+
|
|
13
|
+
export let variant: '' | 'plain' | 'outlined' | 'filled' = '';
|
|
14
|
+
export let disabled: boolean = false;
|
|
15
|
+
export let readonly: boolean = false;
|
|
16
|
+
export let compact: boolean = false;
|
|
17
|
+
export let value: any = "#ff3e00";
|
|
18
|
+
export let style: string = '';
|
|
19
|
+
export let onChange: OnChangeHandler<any> = null as unknown as OnChangeHandler<any>;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
let oldValue = value;
|
|
23
|
+
|
|
24
|
+
$: if (oldValue != value) {
|
|
25
|
+
oldValue = value;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let editor: any;
|
|
29
|
+
|
|
30
|
+
const clean = () => {
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const handleActionIconClick = () => {
|
|
35
|
+
editor.click();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function handleColorChange(event) {
|
|
39
|
+
selectedColor = event.target.value;
|
|
40
|
+
rgbValues = hexToRgb(selectedColor);
|
|
41
|
+
console.log(selectedColor, rgbValues);
|
|
42
|
+
// dispatch('change', {
|
|
43
|
+
// hex: selectedColor,
|
|
44
|
+
// rgb: rgbValues
|
|
45
|
+
// });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<CommonPicker displayMode={DisplayMode.Edit} {variant} {style} {compact} className="multiple" dropDownIcon="icon_google_color_lens"
|
|
51
|
+
canClean={false} autoFit {clean} textValue={value} {readonly} {disabled} iconClickHandler={handleActionIconClick}>
|
|
52
|
+
<!-- <div style="flex: 1 1 auto; width: 50%; height: 60%; border-radius: 4px; background-color: {value}"></div>-->
|
|
53
|
+
<div style="width: 100%; display: flex; overflow: hidden; flex-direction: row; align-items: center; height: 100%; gap: 8px">
|
|
54
|
+
<input bind:this={editor} style="flex: 0 0 auto; width: 40%; height: 80%; border-radius: 8px;" type="color" bind:value on:change={handleColorChange}/>
|
|
55
|
+
<input style="flex: 0 0 auto; width: 50%; text-align: center" class="text-editor" readonly value={value??''} {disabled}/>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</CommonPicker>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { OnChangeHandler } from "../common/OnChangeHandler";
|
|
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> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const ColorPicker: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
+
showHex?: boolean;
|
|
17
|
+
showRgb?: boolean;
|
|
18
|
+
variant?: "" | "plain" | "outlined" | "filled";
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
readonly?: boolean;
|
|
21
|
+
compact?: boolean;
|
|
22
|
+
value?: any;
|
|
23
|
+
style?: string;
|
|
24
|
+
onChange?: OnChangeHandler<any>;
|
|
25
|
+
}, {
|
|
26
|
+
[evt: string]: CustomEvent<any>;
|
|
27
|
+
}, {}, {}, string>;
|
|
28
|
+
type ColorPicker = InstanceType<typeof ColorPicker>;
|
|
29
|
+
export default ColorPicker;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// Define props with default values
|
|
5
|
+
import i18n from "@ticatec/i18n";
|
|
6
|
+
import langRes from "../i18n_resources/uniface_en_resource";
|
|
7
|
+
|
|
8
|
+
export let initialColor = "#ffffff";
|
|
9
|
+
export let showHex = true;
|
|
10
|
+
export let showRgb = false;
|
|
11
|
+
export let swatches = [];
|
|
12
|
+
|
|
13
|
+
let selectedColor = initialColor;
|
|
14
|
+
let rgbValues = hexToRgb(initialColor);
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
// Convert hex to RGB
|
|
18
|
+
function hexToRgb(hex) {
|
|
19
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
20
|
+
return result ? {
|
|
21
|
+
r: parseInt(result[1], 16),
|
|
22
|
+
g: parseInt(result[2], 16),
|
|
23
|
+
b: parseInt(result[3], 16)
|
|
24
|
+
} : { r: 0, g: 0, b: 0 };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Emit change event when color changes
|
|
28
|
+
function handleColorChange(event) {
|
|
29
|
+
selectedColor = event.target.value;
|
|
30
|
+
rgbValues = hexToRgb(selectedColor);
|
|
31
|
+
dispatch('change', {
|
|
32
|
+
hex: selectedColor,
|
|
33
|
+
rgb: rgbValues
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Select a swatch
|
|
38
|
+
function selectSwatch(color) {
|
|
39
|
+
selectedColor = color;
|
|
40
|
+
rgbValues = hexToRgb(selectedColor);
|
|
41
|
+
// dispatch('change', {
|
|
42
|
+
// hex: selectedColor,
|
|
43
|
+
// rgb: rgbValues
|
|
44
|
+
// });
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<div class="color-picker">
|
|
49
|
+
<label for="color-input">
|
|
50
|
+
{i18n.getText('uniface.pickupColor', langRes.uniface.colorPicker)
|
|
51
|
+
}
|
|
52
|
+
</label>
|
|
53
|
+
|
|
54
|
+
<div class="color-input-group">
|
|
55
|
+
<input
|
|
56
|
+
id="color-input"
|
|
57
|
+
type="color"
|
|
58
|
+
bind:value={selectedColor}
|
|
59
|
+
on:change={handleColorChange}
|
|
60
|
+
/>
|
|
61
|
+
<div
|
|
62
|
+
class="color-preview"
|
|
63
|
+
style="background-color: {selectedColor};"
|
|
64
|
+
></div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
{#if showHex}
|
|
68
|
+
<div class="color-value">
|
|
69
|
+
<span>HEX:</span> {selectedColor}
|
|
70
|
+
</div>
|
|
71
|
+
{/if}
|
|
72
|
+
|
|
73
|
+
{#if showRgb}
|
|
74
|
+
<div class="color-value">
|
|
75
|
+
<span>RGB:</span> rgb({rgbValues.r}, {rgbValues.g}, {rgbValues.b})
|
|
76
|
+
</div>
|
|
77
|
+
{/if}
|
|
78
|
+
|
|
79
|
+
{#if swatches && swatches.length > 0}
|
|
80
|
+
<div class="swatches">
|
|
81
|
+
{#each swatches as swatch}
|
|
82
|
+
<button
|
|
83
|
+
class="swatch"
|
|
84
|
+
style="background-color: {swatch};"
|
|
85
|
+
on:click={() => selectSwatch(swatch)}
|
|
86
|
+
aria-label={`Select color ${swatch}`}
|
|
87
|
+
class:selected={selectedColor === swatch}
|
|
88
|
+
></button>
|
|
89
|
+
{/each}
|
|
90
|
+
</div>
|
|
91
|
+
{/if}
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<style>
|
|
95
|
+
.color-picker {
|
|
96
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
97
|
+
padding: 16px;
|
|
98
|
+
border-radius: 8px;
|
|
99
|
+
background-color: #f8f9fa;
|
|
100
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
|
101
|
+
width: 100%;
|
|
102
|
+
max-width: 300px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
label {
|
|
106
|
+
display: block;
|
|
107
|
+
margin-bottom: 8px;
|
|
108
|
+
font-weight: 500;
|
|
109
|
+
color: #333;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.color-input-group {
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
margin-bottom: 12px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
input[type="color"] {
|
|
119
|
+
-webkit-appearance: none;
|
|
120
|
+
width: 40px;
|
|
121
|
+
height: 40px;
|
|
122
|
+
border: none;
|
|
123
|
+
padding: 0;
|
|
124
|
+
background: none;
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
input[type="color"]::-webkit-color-swatch-wrapper {
|
|
129
|
+
padding: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
input[type="color"]::-webkit-color-swatch {
|
|
133
|
+
border: 1px solid #ddd;
|
|
134
|
+
border-radius: 4px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.color-preview {
|
|
138
|
+
width: 40px;
|
|
139
|
+
height: 40px;
|
|
140
|
+
margin-left: 12px;
|
|
141
|
+
border-radius: 4px;
|
|
142
|
+
border: 1px solid #ddd;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.color-value {
|
|
146
|
+
margin-bottom: 8px;
|
|
147
|
+
font-size: 14px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.color-value span {
|
|
151
|
+
font-weight: 600;
|
|
152
|
+
margin-right: 4px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.swatches {
|
|
156
|
+
display: flex;
|
|
157
|
+
flex-wrap: wrap;
|
|
158
|
+
gap: 8px;
|
|
159
|
+
margin-top: 12px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.swatch {
|
|
163
|
+
width: 24px;
|
|
164
|
+
height: 24px;
|
|
165
|
+
border-radius: 50%;
|
|
166
|
+
border: 1px solid #ddd;
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
transition: transform 0.2s ease;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.swatch:hover {
|
|
172
|
+
transform: scale(1.1);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.swatch.selected {
|
|
176
|
+
border: 2px solid #333;
|
|
177
|
+
box-shadow: 0 0 0 2px white inset;
|
|
178
|
+
}
|
|
179
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
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
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const ColorPickerPanel: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
initialColor?: string;
|
|
16
|
+
showHex?: boolean;
|
|
17
|
+
showRgb?: boolean;
|
|
18
|
+
swatches?: any[];
|
|
19
|
+
}, {
|
|
20
|
+
[evt: string]: CustomEvent<any>;
|
|
21
|
+
}, {}, {}, string>;
|
|
22
|
+
type ColorPickerPanel = InstanceType<typeof ColorPickerPanel>;
|
|
23
|
+
export default ColorPickerPanel;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
{#if readonly || disabled}
|
|
41
41
|
<input style="width: 100%" class="readonly" class:disabled readonly {disabled} value={textValue}/>
|
|
42
42
|
{:else}
|
|
43
|
-
<div style="flex: 1 1 auto; position: relative; height: 100%">
|
|
43
|
+
<div style="flex: 1 1 auto; position: relative; overflow: hidden; height: 100%">
|
|
44
44
|
<slot></slot>
|
|
45
45
|
{#if canClean && textValue && textValue.length > 0}
|
|
46
46
|
<div class="uniface-editor-clean-icon">
|
|
@@ -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">
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
|
|
3
3
|
import type RowAction from "../lib/RowAction";
|
|
4
|
-
import {TextButton} from "../../button";
|
|
4
|
+
import {IconButton, TextButton} from "../../button";
|
|
5
5
|
import type TableRow from "./TableRow";
|
|
6
6
|
import {onDestroy, onMount, tick} from "svelte";
|
|
7
7
|
import utils from "../../common/utils";
|
|
8
8
|
import PopupMenu from "./PopupMenu.svelte";
|
|
9
|
+
|
|
9
10
|
export let row: TableRow;
|
|
10
11
|
export let actions: Array<RowAction>;
|
|
11
12
|
export let alternative: boolean;
|
|
@@ -15,6 +16,8 @@
|
|
|
15
16
|
|
|
16
17
|
export let rowHeight: number;
|
|
17
18
|
|
|
19
|
+
export let align: 'left' | 'center' | undefined;
|
|
20
|
+
|
|
18
21
|
let style: string;
|
|
19
22
|
|
|
20
23
|
|
|
@@ -81,14 +84,20 @@
|
|
|
81
84
|
checkOverflow();
|
|
82
85
|
}
|
|
83
86
|
|
|
84
|
-
$: style = rowHeight== null ? '' : `height: ${rowHeight}px
|
|
87
|
+
$: style = rowHeight == null ? '' : `height: ${rowHeight}px`;
|
|
88
|
+
|
|
85
89
|
|
|
86
90
|
</script>
|
|
87
|
-
<div class="data-row" class:alternative style="position: relative; width: {width}px;
|
|
88
|
-
<div class="action-cell" bind:this={cell}
|
|
89
|
-
style="">
|
|
91
|
+
<div class="data-row" class:alternative style="position: relative; display: block; padding: 0 4px; width: {width}px; {style}">
|
|
92
|
+
<div class="action-cell" bind:this={cell} style="{align=='center' ? 'margin: 0 auto' : ''}">
|
|
90
93
|
{#each actionList as action}
|
|
91
|
-
|
|
94
|
+
{#if action.icon}
|
|
95
|
+
<IconButton style="flex-shrink: 0; top: 0" size="mini" type="{action.type ?? 'primary'}" icon={action.icon}
|
|
96
|
+
onClick={()=>action.callback(row.data)}/>
|
|
97
|
+
{:else}
|
|
98
|
+
<TextButton style="flex-shrink: 0; top: 0" size="mini" type="{action.type ?? 'primary'}" label={action.label}
|
|
99
|
+
onClick={()=>action.callback(row.data)}/>
|
|
100
|
+
{/if}
|
|
92
101
|
{/each}
|
|
93
102
|
{#if popupList.length > 0}
|
|
94
103
|
<TextButton size="mini" type="primary" style="flex-shrink: 0; top: 0" label="..." onClick={showPopupMenu}/>
|
|
@@ -98,10 +107,15 @@
|
|
|
98
107
|
{#if showPopup}
|
|
99
108
|
<PopupMenu {parentRect} closeCallback={()=>{showPopup = false}}>
|
|
100
109
|
<div style="padding: 4px 6px; box-sizing: border-box; background-color: #ffffff;">
|
|
101
|
-
{#each popupList as action}
|
|
102
|
-
<div class="action-popover" style="padding: 4px 6px">
|
|
103
|
-
|
|
104
|
-
|
|
110
|
+
{#each popupList.reverse() as action}
|
|
111
|
+
<div class="action-popover" style="padding: 4px 6px; text-align: center">
|
|
112
|
+
{#if action.icon}
|
|
113
|
+
<IconButton style="flex-shrink: 0; top: 0" size="mini" type="{action.type ?? 'primary'}" icon={action.icon}
|
|
114
|
+
onClick={()=>{action.callback(row.data); showPopup=false}}/>
|
|
115
|
+
{:else}
|
|
116
|
+
<TextButton style="flex-shrink: 0; top: 0" size="mini" type="{action.type ?? 'primary'}" label={action.label}
|
|
117
|
+
onClick={()=>{action.callback(row.data); showPopup=false}}/>
|
|
118
|
+
{/if}
|
|
105
119
|
</div>
|
|
106
120
|
{/each}
|
|
107
121
|
</div>
|
|
@@ -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
|
};
|
|
@@ -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"
|
package/package.json
CHANGED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { HrefBuilder } from "./HrefLink";
|
|
2
|
-
import type { CellHint, FormatCell } from "./FormatCell";
|
|
3
|
-
export default interface AdvColumn {
|
|
4
|
-
/**
|
|
5
|
-
* 对齐方式,文本,可以取值:left, center, right
|
|
6
|
-
*/
|
|
7
|
-
align: string;
|
|
8
|
-
/**
|
|
9
|
-
* 对应的字段/属性名
|
|
10
|
-
*/
|
|
11
|
-
field?: string;
|
|
12
|
-
/**
|
|
13
|
-
* 超链接设置
|
|
14
|
-
*/
|
|
15
|
-
href?: HrefBuilder | null;
|
|
16
|
-
/**
|
|
17
|
-
* 单元格转换函数
|
|
18
|
-
*/
|
|
19
|
-
formatter?: FormatCell;
|
|
20
|
-
/**
|
|
21
|
-
* 是否忽略html的转义符
|
|
22
|
-
*/
|
|
23
|
-
escapeHTML: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* 待显示的提示
|
|
26
|
-
*/
|
|
27
|
-
hint?: CellHint;
|
|
28
|
-
/**
|
|
29
|
-
* 渲染器
|
|
30
|
-
*/
|
|
31
|
-
render?: any;
|
|
32
|
-
/**
|
|
33
|
-
* 宽度
|
|
34
|
-
*/
|
|
35
|
-
width: number;
|
|
36
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|