@humandialog/forms.svelte 0.5.6 → 0.5.8
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/README.md +0 -0
- package/components/Fab.svelte.d.ts +14 -14
- package/components/Floating_container.svelte.d.ts +21 -21
- package/components/Grid.menu.svelte.d.ts +25 -25
- package/components/button.svelte.d.ts +24 -24
- package/components/checkbox.svelte.d.ts +26 -26
- package/components/combo/combo.d.ts +17 -17
- package/components/combo/combo.item.svelte.d.ts +19 -19
- package/components/combo/combo.js +17 -17
- package/components/combo/combo.source.svelte.d.ts +22 -22
- package/components/combo/combo.svelte.d.ts +42 -42
- package/components/contextmenu.svelte.d.ts +26 -26
- package/components/date.svelte.d.ts +31 -31
- package/components/delayed.spinner.svelte.d.ts +19 -19
- package/components/document/internal/Document_command.d.ts +9 -9
- package/components/document/internal/Document_command.js +9 -9
- package/components/document/internal/Selection_helper.d.ts +7 -7
- package/components/document/internal/Selection_helper.js +133 -133
- package/components/document/internal/Selection_range.d.ts +26 -26
- package/components/document/internal/Selection_range.js +58 -58
- package/components/document/internal/palette.row.svelte.d.ts +36 -36
- package/components/document/internal/palette.svelte.d.ts +67 -67
- package/components/document/rich.edit.svelte.d.ts +32 -32
- package/components/edit.field.svelte.d.ts +28 -28
- package/components/file.loader.svelte.d.ts +25 -25
- package/components/icon.svelte.d.ts +62 -62
- package/components/input.text.svelte.d.ts +29 -29
- package/components/inputbox.ltop.svelte.d.ts +52 -52
- package/components/kanban/Kanban.d.ts +43 -43
- package/components/kanban/Kanban.js +79 -79
- package/components/kanban/internal/kanban.card.svelte +108 -108
- package/components/kanban/internal/kanban.card.svelte.d.ts +32 -32
- package/components/kanban/internal/kanban.column.svelte +66 -66
- package/components/kanban/internal/kanban.column.svelte.d.ts +51 -51
- package/components/kanban/internal/kanban.inserter.svelte +14 -14
- package/components/kanban/internal/kanban.inserter.svelte.d.ts +18 -18
- package/components/kanban/internal/kanban.move.menu.svelte +135 -135
- package/components/kanban/internal/kanban.move.menu.svelte.d.ts +22 -22
- package/components/kanban/internal/kanban.props.svelte.d.ts +19 -19
- package/components/kanban/kanban.callbacks.svelte +1 -1
- package/components/kanban/kanban.callbacks.svelte.d.ts +18 -18
- package/components/kanban/kanban.column.svelte +2 -2
- package/components/kanban/kanban.column.svelte.d.ts +21 -21
- package/components/kanban/kanban.combo.svelte +3 -3
- package/components/kanban/kanban.combo.svelte.d.ts +24 -24
- package/components/kanban/kanban.date.svelte +1 -1
- package/components/kanban/kanban.date.svelte.d.ts +21 -21
- package/components/kanban/kanban.source.svelte.d.ts +23 -23
- package/components/kanban/kanban.static.svelte.d.ts +20 -20
- package/components/kanban/kanban.summary.svelte.d.ts +18 -18
- package/components/kanban/kanban.svelte +89 -82
- package/components/kanban/kanban.svelte.d.ts +65 -63
- package/components/kanban/kanban.tags.svelte.d.ts +23 -23
- package/components/kanban/kanban.title.svelte +2 -2
- package/components/kanban/kanban.title.svelte.d.ts +18 -18
- package/components/list/List.d.ts +44 -44
- package/components/list/List.js +52 -52
- package/components/list/internal/list.element.props.svelte +65 -65
- package/components/list/internal/list.element.props.svelte.d.ts +21 -21
- package/components/list/internal/list.element.summary.svelte +46 -44
- package/components/list/internal/list.element.summary.svelte.d.ts +24 -25
- package/components/list/internal/list.element.svelte +58 -12
- package/components/list/internal/list.element.svelte.d.ts +31 -29
- package/components/list/internal/list.inserter.svelte.d.ts +19 -19
- package/components/list/list.combo.svelte.d.ts +21 -21
- package/components/list/list.date.svelte.d.ts +18 -18
- package/components/list/list.inserter.svelte.d.ts +17 -17
- package/components/list/list.static.svelte.d.ts +17 -17
- package/components/list/list.summary.svelte.d.ts +19 -19
- package/components/list/list.svelte +15 -2
- package/components/list/list.svelte.d.ts +59 -59
- package/components/list/list.title.svelte.d.ts +22 -22
- package/components/menu.d.ts +4 -4
- package/components/menu.js +56 -56
- package/components/radio.svelte.d.ts +26 -26
- package/components/sidebar/sidebar.brand.svelte.d.ts +31 -31
- package/components/sidebar/sidebar.group.svelte.d.ts +33 -33
- package/components/sidebar/sidebar.item.svelte.d.ts +28 -28
- package/components/sidebar/sidebar.list.svelte +15 -15
- package/components/sidebar/sidebar.list.svelte.d.ts +33 -33
- package/components/sidebar/sidebar.svelte.d.ts +27 -27
- package/components/simple.table.svelte.d.ts +41 -41
- package/components/table/_template.table.svelte.d.ts +57 -57
- package/components/table/column.svelte.d.ts +19 -19
- package/components/table/item.svelte.d.ts +17 -17
- package/components/table/table.d.ts +11 -11
- package/components/table/table.js +11 -11
- package/components/table/table.svelte.d.ts +75 -75
- package/components/tag.svelte +17 -17
- package/components/tag.svelte.d.ts +19 -19
- package/components/tags.svelte.d.ts +31 -31
- package/components/textarea.ltop.svelte.d.ts +35 -35
- package/components/tile.title.svelte.d.ts +29 -29
- package/desk.svelte +8 -7
- package/desk.svelte.d.ts +23 -23
- package/form.box.svelte.d.ts +35 -35
- package/horizontal.toolbar.svelte.d.ts +25 -25
- package/index.d.ts +59 -59
- package/index.js +65 -65
- package/internal/configurable.content.svelte.d.ts +27 -27
- package/internal/loading.svelte.d.ts +23 -23
- package/modal.svelte.d.ts +35 -35
- package/operations.svelte.d.ts +16 -16
- package/package.json +8 -8
- package/page.row.svelte.d.ts +31 -31
- package/page.svelte.d.ts +45 -45
- package/stores.d.ts +39 -39
- package/stores.js +0 -0
- package/tenant.members.svelte +1 -1
- package/tenant.members.svelte.d.ts +33 -33
- package/tile.svelte.d.ts +33 -33
- package/tiles.row.svelte.d.ts +31 -31
- package/tiles.vertical.row.svelte.d.ts +29 -29
- package/updates.d.ts +4 -4
- package/updates.js +0 -0
- package/utils.d.ts +35 -35
- package/utils.js +0 -0
- package/vertical.toolbar.svelte.d.ts +27 -27
|
@@ -7,48 +7,50 @@ export let text = "";
|
|
|
7
7
|
export let placeholder = false;
|
|
8
8
|
export let active = false;
|
|
9
9
|
export let editable;
|
|
10
|
-
export let clickEdit;
|
|
11
10
|
let user_class = $$props.class ?? "";
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
15
|
-
{#if readonly}
|
|
16
|
-
<p {id} class=" sm:text-xs sm:min-h-[1rem]
|
|
17
|
-
text-base min-h-[1.5rem]
|
|
18
|
-
text-stone-400
|
|
19
|
-
{user_class}"
|
|
20
|
-
on:click>
|
|
21
|
-
{text}
|
|
22
|
-
</p>
|
|
23
|
-
{:else if text}
|
|
24
|
-
{#if active}
|
|
25
|
-
<p {id} class=" sm:text-xs sm:min-h-[1rem]
|
|
26
|
-
text-base min-h-[1.5rem]
|
|
27
|
-
text-stone-400
|
|
28
|
-
{user_class}"
|
|
29
|
-
use:_editable={{
|
|
30
|
-
action: editable,
|
|
31
|
-
active: true
|
|
32
|
-
}}
|
|
33
|
-
on:click>
|
|
34
|
-
{text}
|
|
35
|
-
</p>
|
|
36
|
-
{:else}
|
|
37
|
-
<p {id} class=" sm:text-xs sm:min-h-[1rem]
|
|
38
|
-
text-base min-h-[1.5rem]
|
|
39
|
-
text-stone-400
|
|
40
|
-
{user_class}"
|
|
41
|
-
on:click>
|
|
42
|
-
{text}
|
|
43
|
-
</p>
|
|
44
|
-
{/if}
|
|
45
|
-
{:else if placeholder}
|
|
46
|
-
<p {id} class="sm:text-xs sm:min-h-[1rem]
|
|
47
|
-
text-base min-h-[1.5rem]
|
|
48
|
-
text-stone-400
|
|
49
|
-
{user_class}"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
14
|
+
{#if readonly}
|
|
15
|
+
<p {id} class=" sm:text-xs sm:min-h-[1rem]
|
|
16
|
+
text-base min-h-[1.5rem]
|
|
17
|
+
text-stone-400
|
|
18
|
+
{user_class}"
|
|
19
|
+
on:click>
|
|
20
|
+
{text}
|
|
21
|
+
</p>
|
|
22
|
+
{:else if text}
|
|
23
|
+
{#if active}
|
|
24
|
+
<p {id} class=" sm:text-xs sm:min-h-[1rem]
|
|
25
|
+
text-base min-h-[1.5rem]
|
|
26
|
+
text-stone-400
|
|
27
|
+
{user_class}"
|
|
28
|
+
use:_editable={{
|
|
29
|
+
action: editable,
|
|
30
|
+
active: true
|
|
31
|
+
}}
|
|
32
|
+
on:click>
|
|
33
|
+
{text}
|
|
34
|
+
</p>
|
|
35
|
+
{:else}
|
|
36
|
+
<p {id} class=" sm:text-xs sm:min-h-[1rem]
|
|
37
|
+
text-base min-h-[1.5rem]
|
|
38
|
+
text-stone-400
|
|
39
|
+
{user_class}"
|
|
40
|
+
on:click>
|
|
41
|
+
{text}
|
|
42
|
+
</p>
|
|
43
|
+
{/if}
|
|
44
|
+
{:else if placeholder}
|
|
45
|
+
<p {id} class="sm:text-xs sm:min-h-[1rem]
|
|
46
|
+
text-base min-h-[1.5rem]
|
|
47
|
+
text-stone-400
|
|
48
|
+
{user_class}"
|
|
49
|
+
use:_editable={{
|
|
50
|
+
action: editable,
|
|
51
|
+
active: true
|
|
52
|
+
}}
|
|
53
|
+
on:click>
|
|
54
|
+
</p>
|
|
55
|
+
{/if}
|
|
56
|
+
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
id: string;
|
|
6
|
-
readonly?: boolean | undefined;
|
|
7
|
-
text?: string | undefined;
|
|
8
|
-
placeholder?: boolean | undefined;
|
|
9
|
-
active?: boolean | undefined;
|
|
10
|
-
editable: any;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export type
|
|
21
|
-
export type
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
id: string;
|
|
6
|
+
readonly?: boolean | undefined;
|
|
7
|
+
text?: string | undefined;
|
|
8
|
+
placeholder?: boolean | undefined;
|
|
9
|
+
active?: boolean | undefined;
|
|
10
|
+
editable: any;
|
|
11
|
+
};
|
|
12
|
+
events: {
|
|
13
|
+
click: MouseEvent;
|
|
14
|
+
} & {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
};
|
|
17
|
+
slots: {};
|
|
18
|
+
};
|
|
19
|
+
export type ListProps = typeof __propDef.props;
|
|
20
|
+
export type ListEvents = typeof __propDef.events;
|
|
21
|
+
export type ListSlots = typeof __propDef.slots;
|
|
22
|
+
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -16,6 +16,7 @@ import { isDeviceSmallerThan } from "../../../utils";
|
|
|
16
16
|
import { rList_definition, rList_property_type } from "../List";
|
|
17
17
|
import { push } from "svelte-spa-router";
|
|
18
18
|
import { FaExternalLinkAlt } from "svelte-icons/fa/";
|
|
19
|
+
import { readonly } from "svelte/store";
|
|
19
20
|
export let item;
|
|
20
21
|
export let title = "";
|
|
21
22
|
export let summary = "";
|
|
@@ -124,10 +125,6 @@ function on_active_row_clicked(e, part) {
|
|
|
124
125
|
if (link)
|
|
125
126
|
push(link);
|
|
126
127
|
} else {
|
|
127
|
-
if (part == "top" && !definition.title_readonly)
|
|
128
|
-
force_editing("Title");
|
|
129
|
-
else if (part == "bottom" && !definition.summary_readonly)
|
|
130
|
-
force_editing("Summary");
|
|
131
128
|
}
|
|
132
129
|
} else {
|
|
133
130
|
}
|
|
@@ -177,9 +174,30 @@ async function force_editing(field) {
|
|
|
177
174
|
if (!element_node.classList.contains("editable")) {
|
|
178
175
|
return;
|
|
179
176
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
element_node.focus();
|
|
178
|
+
setSelectionAtEnd(element_node);
|
|
179
|
+
}
|
|
180
|
+
function setSelectionAtEnd(element) {
|
|
181
|
+
const textNode = element.childNodes[0];
|
|
182
|
+
const text = textNode.textContent;
|
|
183
|
+
let range = document.createRange();
|
|
184
|
+
let end_offset = text.length;
|
|
185
|
+
let end_container = textNode;
|
|
186
|
+
range.setStart(end_container, end_offset);
|
|
187
|
+
range.setEnd(end_container, end_offset);
|
|
188
|
+
let sel = window.getSelection();
|
|
189
|
+
sel.removeAllRanges();
|
|
190
|
+
sel.addRange(range);
|
|
191
|
+
}
|
|
192
|
+
let rootElement;
|
|
193
|
+
export function scrollToView() {
|
|
194
|
+
rootElement.scrollIntoView(
|
|
195
|
+
{
|
|
196
|
+
behavior: "smooth",
|
|
197
|
+
block: "nearest",
|
|
198
|
+
inline: "nearest"
|
|
199
|
+
}
|
|
200
|
+
);
|
|
183
201
|
}
|
|
184
202
|
</script>
|
|
185
203
|
|
|
@@ -187,10 +205,11 @@ async function force_editing(field) {
|
|
|
187
205
|
{#if item}
|
|
188
206
|
{@const element_title = item[title]}
|
|
189
207
|
|
|
190
|
-
<section class="mt-3 flex flex-row my-0 w-full text-sm text-stone-700 dark:text-stone-300 cursor-default rounded-md border border-transparent {selected_class} {focused_class}"
|
|
208
|
+
<section class="mt-3 flex flex-row my-0 w-full text-sm text-stone-700 dark:text-stone-300 cursor-default rounded-md border border-transparent {selected_class} {focused_class} scroll-mt-[50px] sm:scroll-mt-[40px]"
|
|
191
209
|
on:contextmenu={on_contextmenu}
|
|
192
210
|
role="menu"
|
|
193
|
-
tabindex="-1"
|
|
211
|
+
tabindex="-1"
|
|
212
|
+
bind:this={rootElement}>
|
|
194
213
|
|
|
195
214
|
<slot name="left" element={item}/>
|
|
196
215
|
|
|
@@ -241,16 +260,43 @@ async function force_editing(field) {
|
|
|
241
260
|
|
|
242
261
|
{#if summary && (item[summary] || placeholder=='Summary')}
|
|
243
262
|
{@const element_id = `__hd_list_ctrl_${item[item_key]}_Summary`}
|
|
244
|
-
|
|
263
|
+
{#key item[summary]}
|
|
264
|
+
|
|
265
|
+
<!--Summary
|
|
245
266
|
id={element_id}
|
|
246
267
|
on:click={(e) => on_active_row_clicked(e, 'bottom')}
|
|
247
268
|
text={item[summary]}
|
|
248
269
|
readonly={definition.summary_readonly}
|
|
249
270
|
placeholder={placeholder == 'Summary'}
|
|
250
271
|
editable={(text) => {change_summary(text)}}
|
|
251
|
-
clickEdit={edit}
|
|
252
272
|
active={is_row_active}
|
|
253
|
-
|
|
273
|
+
/-->
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
{#if is_row_active}
|
|
277
|
+
<p id={element_id}
|
|
278
|
+
class=" sm:text-xs sm:min-h-[1rem]
|
|
279
|
+
text-base min-h-[1.5rem]
|
|
280
|
+
text-stone-400"
|
|
281
|
+
use:editable={{
|
|
282
|
+
action: (text) => {change_summary(text)},
|
|
283
|
+
readonly: definition.summary_readonly,
|
|
284
|
+
onFinish: (d) => {placeholder='';},
|
|
285
|
+
active: true
|
|
286
|
+
}}>
|
|
287
|
+
{item[summary]}
|
|
288
|
+
</p>
|
|
289
|
+
{:else}
|
|
290
|
+
<p id={element_id}
|
|
291
|
+
class=" sm:text-xs sm:min-h-[1rem]
|
|
292
|
+
text-base min-h-[1.5rem]
|
|
293
|
+
text-stone-400"
|
|
294
|
+
on:click={(e) => on_active_row_clicked(e, 'bottom')}>
|
|
295
|
+
{item[summary]}
|
|
296
|
+
</p>
|
|
297
|
+
{/if}
|
|
298
|
+
{/key}
|
|
299
|
+
|
|
254
300
|
{/if}
|
|
255
301
|
|
|
256
302
|
<section class="block sm:hidden w-full sm:flex-none sm:w-2/3">
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
item: object;
|
|
5
|
-
title?: string | undefined;
|
|
6
|
-
summary?: string | undefined;
|
|
7
|
-
typename?: string | undefined;
|
|
8
|
-
toolbarOperations: any;
|
|
9
|
-
contextMenu: any;
|
|
10
|
-
activate?: (() => void) | undefined;
|
|
11
|
-
editProperty?: ((field: string) => void) | undefined;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export type
|
|
24
|
-
export type
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
-
get
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
item: object;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
summary?: string | undefined;
|
|
7
|
+
typename?: string | undefined;
|
|
8
|
+
toolbarOperations: any;
|
|
9
|
+
contextMenu: any;
|
|
10
|
+
activate?: (() => void) | undefined;
|
|
11
|
+
editProperty?: ((field: string) => void) | undefined;
|
|
12
|
+
scrollToView?: (() => void) | undefined;
|
|
13
|
+
};
|
|
14
|
+
events: {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
};
|
|
17
|
+
slots: {
|
|
18
|
+
left: {
|
|
19
|
+
element: object;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type ListProps = typeof __propDef.props;
|
|
24
|
+
export type ListEvents = typeof __propDef.events;
|
|
25
|
+
export type ListSlots = typeof __propDef.slots;
|
|
26
|
+
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
27
|
+
get activate(): () => void;
|
|
28
|
+
get editProperty(): (field: string) => void;
|
|
29
|
+
get scrollToView(): () => void;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
onInsert: any;
|
|
5
|
-
icon?: boolean | undefined;
|
|
6
|
-
run?: ((onclose: any) => void) | undefined;
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {};
|
|
12
|
-
};
|
|
13
|
-
export type ListProps = typeof __propDef.props;
|
|
14
|
-
export type ListEvents = typeof __propDef.events;
|
|
15
|
-
export type ListSlots = typeof __propDef.slots;
|
|
16
|
-
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
17
|
-
get run(): (onclose: any) => void;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
onInsert: any;
|
|
5
|
+
icon?: boolean | undefined;
|
|
6
|
+
run?: ((onclose: any) => void) | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export type ListProps = typeof __propDef.props;
|
|
14
|
+
export type ListEvents = typeof __propDef.events;
|
|
15
|
+
export type ListSlots = typeof __propDef.slots;
|
|
16
|
+
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
17
|
+
get run(): (onclose: any) => void;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
name: string;
|
|
5
|
-
a?: string | undefined;
|
|
6
|
-
onSelect?: undefined;
|
|
7
|
-
association?: boolean | undefined;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
default: {};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export type ListProps = typeof __propDef.props;
|
|
17
|
-
export type ListEvents = typeof __propDef.events;
|
|
18
|
-
export type ListSlots = typeof __propDef.slots;
|
|
19
|
-
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
name: string;
|
|
5
|
+
a?: string | undefined;
|
|
6
|
+
onSelect?: undefined;
|
|
7
|
+
association?: boolean | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {
|
|
13
|
+
default: {};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export type ListProps = typeof __propDef.props;
|
|
17
|
+
export type ListEvents = typeof __propDef.events;
|
|
18
|
+
export type ListSlots = typeof __propDef.slots;
|
|
19
|
+
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
name: string;
|
|
5
|
-
a?: string | undefined;
|
|
6
|
-
onSelect?: undefined;
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {};
|
|
12
|
-
};
|
|
13
|
-
export type ListProps = typeof __propDef.props;
|
|
14
|
-
export type ListEvents = typeof __propDef.events;
|
|
15
|
-
export type ListSlots = typeof __propDef.slots;
|
|
16
|
-
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
name: string;
|
|
5
|
+
a?: string | undefined;
|
|
6
|
+
onSelect?: undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export type ListProps = typeof __propDef.props;
|
|
14
|
+
export type ListEvents = typeof __propDef.events;
|
|
15
|
+
export type ListSlots = typeof __propDef.slots;
|
|
16
|
+
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
action: Function;
|
|
5
|
-
icon?: boolean | undefined;
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {};
|
|
11
|
-
};
|
|
12
|
-
export type ListProps = typeof __propDef.props;
|
|
13
|
-
export type ListEvents = typeof __propDef.events;
|
|
14
|
-
export type ListSlots = typeof __propDef.slots;
|
|
15
|
-
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
action: Function;
|
|
5
|
+
icon?: boolean | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
};
|
|
12
|
+
export type ListProps = typeof __propDef.props;
|
|
13
|
+
export type ListEvents = typeof __propDef.events;
|
|
14
|
+
export type ListSlots = typeof __propDef.slots;
|
|
15
|
+
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
name: string;
|
|
5
|
-
a?: string | undefined;
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {};
|
|
11
|
-
};
|
|
12
|
-
export type ListProps = typeof __propDef.props;
|
|
13
|
-
export type ListEvents = typeof __propDef.events;
|
|
14
|
-
export type ListSlots = typeof __propDef.slots;
|
|
15
|
-
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
name: string;
|
|
5
|
+
a?: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
};
|
|
12
|
+
export type ListProps = typeof __propDef.props;
|
|
13
|
+
export type ListEvents = typeof __propDef.events;
|
|
14
|
+
export type ListSlots = typeof __propDef.slots;
|
|
15
|
+
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
a: string;
|
|
5
|
-
editable?: boolean | undefined;
|
|
6
|
-
onChange?: Function | undefined;
|
|
7
|
-
readonly?: boolean | undefined;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {};
|
|
13
|
-
};
|
|
14
|
-
export type ListProps = typeof __propDef.props;
|
|
15
|
-
export type ListEvents = typeof __propDef.events;
|
|
16
|
-
export type ListSlots = typeof __propDef.slots;
|
|
17
|
-
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
a: string;
|
|
5
|
+
editable?: boolean | undefined;
|
|
6
|
+
onChange?: Function | undefined;
|
|
7
|
+
readonly?: boolean | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export type ListProps = typeof __propDef.props;
|
|
15
|
+
export type ListEvents = typeof __propDef.events;
|
|
16
|
+
export type ListSlots = typeof __propDef.slots;
|
|
17
|
+
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -135,7 +135,7 @@ export function reload(data, selectElement = KEEP_SELECTION) {
|
|
|
135
135
|
if (!activate_after_dom_update)
|
|
136
136
|
activateItem("props", null, []);
|
|
137
137
|
}
|
|
138
|
-
export function moveUp(element) {
|
|
138
|
+
export async function moveUp(element) {
|
|
139
139
|
if (!orderAttrib)
|
|
140
140
|
return;
|
|
141
141
|
let prev = getPrev(items, element);
|
|
@@ -143,11 +143,13 @@ export function moveUp(element) {
|
|
|
143
143
|
return;
|
|
144
144
|
items = swapElements(items, element, prev);
|
|
145
145
|
[element[orderAttrib], prev[orderAttrib]] = [prev[orderAttrib], element[orderAttrib]];
|
|
146
|
+
await tick();
|
|
147
|
+
scrollToSelectedElement();
|
|
146
148
|
informModification(element, orderAttrib);
|
|
147
149
|
informModification(prev, orderAttrib);
|
|
148
150
|
pushChanges();
|
|
149
151
|
}
|
|
150
|
-
export function moveDown(element) {
|
|
152
|
+
export async function moveDown(element) {
|
|
151
153
|
if (!orderAttrib)
|
|
152
154
|
return;
|
|
153
155
|
let next = getNext(items, element);
|
|
@@ -155,6 +157,8 @@ export function moveDown(element) {
|
|
|
155
157
|
return;
|
|
156
158
|
items = swapElements(items, element, next);
|
|
157
159
|
[element[orderAttrib], next[orderAttrib]] = [next[orderAttrib], element[orderAttrib]];
|
|
160
|
+
await tick();
|
|
161
|
+
scrollToSelectedElement();
|
|
158
162
|
informModification(element, orderAttrib);
|
|
159
163
|
informModification(next, orderAttrib);
|
|
160
164
|
pushChanges();
|
|
@@ -182,6 +186,15 @@ export async function addRowAfter(after = null) {
|
|
|
182
186
|
}
|
|
183
187
|
});
|
|
184
188
|
}
|
|
189
|
+
function scrollToSelectedElement() {
|
|
190
|
+
const activeItem = getActive("props");
|
|
191
|
+
if (!activeItem)
|
|
192
|
+
return;
|
|
193
|
+
const activeItemKey = getItemKey(activeItem);
|
|
194
|
+
const activeIdx = items?.findIndex((i) => getItemKey(i) == activeItemKey);
|
|
195
|
+
if (activeIdx >= 0)
|
|
196
|
+
rows[activeIdx].scrollToView();
|
|
197
|
+
}
|
|
185
198
|
export function remove(element) {
|
|
186
199
|
let removing_idx = items?.findIndex((e) => e == element);
|
|
187
200
|
if (removing_idx < 0)
|