@humandialog/forms.svelte 1.3.11 → 1.3.13
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 +112 -34
- package/components/Fab.svelte.d.ts +17 -17
- package/components/Floating_container.svelte +86 -21
- package/components/Floating_container.svelte.d.ts +21 -21
- package/components/Grid.menu.svelte.d.ts +25 -25
- package/components/button.svelte.d.ts +26 -26
- package/components/checkbox.svelte.d.ts +26 -26
- package/components/combo/combo.d.ts +19 -19
- package/components/combo/combo.item.svelte.d.ts +20 -20
- package/components/combo/combo.js +19 -19
- package/components/combo/combo.source.svelte.d.ts +23 -23
- package/components/combo/combo.svelte +64 -30
- package/components/combo/combo.svelte.d.ts +44 -44
- package/components/contextmenu.svelte +97 -30
- package/components/contextmenu.svelte.d.ts +26 -26
- package/components/date.svelte +40 -30
- package/components/date.svelte.d.ts +33 -33
- package/components/delayed.spinner.svelte.d.ts +19 -19
- package/components/document/editor.svelte +33 -6
- package/components/document/editor.svelte.d.ts +35 -35
- package/components/document/internal/Document_command.d.ts +12 -11
- package/components/document/internal/Document_command.js +12 -11
- 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/findSuggestionMatch.d.ts +16 -16
- package/components/document/internal/findSuggestionMatch.js +51 -51
- package/components/document/internal/h1.icon.svelte.d.ts +23 -23
- package/components/document/internal/h2.icon.svelte.d.ts +23 -23
- package/components/document/internal/h3.icon.svelte.d.ts +23 -23
- package/components/document/internal/h4.icon.svelte.d.ts +23 -23
- package/components/document/internal/palette.row.big.svelte.d.ts +46 -46
- package/components/document/internal/palette.row.svelte +1 -1
- package/components/document/internal/palette.row.svelte.d.ts +46 -46
- package/components/document/internal/palette.svelte +23 -15
- package/components/document/internal/palette.svelte.d.ts +82 -82
- package/components/document/internal/suggestion.d.ts +158 -158
- package/components/document/internal/suggestion.js +194 -194
- package/components/document/rich.edit.svelte.d.ts +34 -34
- package/components/edit.field.svelte.d.ts +31 -31
- package/components/file.loader.svelte.d.ts +25 -25
- package/components/icon.ex.svelte.d.ts +62 -62
- package/components/icon.svelte.d.ts +62 -62
- package/components/input.text.svelte.d.ts +29 -29
- package/components/inputbox.ltop.svelte.d.ts +59 -59
- package/components/kanban/Kanban.d.ts +47 -47
- package/components/kanban/Kanban.js +105 -105
- package/components/kanban/internal/kanban.card.svelte +5 -3
- package/components/kanban/internal/kanban.card.svelte.d.ts +32 -32
- package/components/kanban/internal/kanban.column.svelte.d.ts +53 -53
- 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.d.ts +21 -21
- package/components/kanban/kanban.combo.svelte.d.ts +25 -25
- 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.d.ts +65 -65
- package/components/kanban/kanban.tags.svelte.d.ts +24 -24
- package/components/kanban/kanban.title.svelte.d.ts +21 -21
- package/components/list/List.d.ts +46 -46
- package/components/list/List.js +54 -54
- package/components/list/internal/list.element.props.svelte +2 -2
- package/components/list/internal/list.element.props.svelte.d.ts +21 -21
- package/components/list/internal/list.element.summary.svelte +46 -46
- package/components/list/internal/list.element.summary.svelte.d.ts +24 -24
- package/components/list/internal/list.element.svelte +8 -6
- package/components/list/internal/list.element.svelte.d.ts +31 -31
- package/components/list/internal/list.inserter.svelte.d.ts +19 -19
- package/components/list/list.combo.svelte.d.ts +22 -22
- 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.d.ts +59 -59
- package/components/list/list.title.svelte.d.ts +22 -22
- package/components/menu.d.ts +5 -5
- package/components/menu.js +57 -57
- package/components/radio.svelte.d.ts +26 -26
- package/components/sidebar/sidebar.brand.svelte.d.ts +33 -33
- package/components/sidebar/sidebar.group.svelte +2 -2
- package/components/sidebar/sidebar.group.svelte.d.ts +33 -33
- package/components/sidebar/sidebar.item.svelte +52 -29
- package/components/sidebar/sidebar.item.svelte.d.ts +32 -32
- package/components/sidebar/sidebar.list.svelte +4 -2
- package/components/sidebar/sidebar.list.svelte.d.ts +38 -38
- 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 +6 -3
- package/components/table/table.svelte.d.ts +75 -75
- package/components/tag.colors.svelte.d.ts +17 -17
- package/components/tag.svelte +12 -9
- package/components/tag.svelte.d.ts +20 -20
- package/components/tags.svelte +13 -11
- package/components/tags.svelte.d.ts +32 -32
- package/components/textarea.ltop.svelte.d.ts +35 -35
- package/components/tile.title.svelte.d.ts +29 -29
- package/console.svelte.d.ts +23 -23
- package/desk.svelte +60 -27
- package/desk.svelte.d.ts +23 -23
- package/form.box.svelte.d.ts +35 -35
- package/horizontal.toolbar.svelte +3 -3
- package/horizontal.toolbar.svelte.d.ts +25 -25
- package/index.d.ts +63 -63
- package/index.js +69 -69
- package/internal/configurable.content.svelte.d.ts +29 -29
- package/internal/loading.svelte.d.ts +23 -23
- package/modal.svelte.d.ts +39 -39
- package/operations.svelte +37 -8
- package/operations.svelte.d.ts +16 -16
- package/package.json +9 -9
- package/page.row.svelte.d.ts +31 -31
- package/page.svelte +7 -2
- package/page.svelte.d.ts +47 -47
- package/stores.d.ts +45 -44
- package/stores.js +3 -2
- package/tenant.members.svelte +69 -39
- 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/utils.d.ts +50 -50
- package/utils.js +36 -7
- package/vertical.toolbar.svelte +1 -1
- package/vertical.toolbar.svelte.d.ts +27 -27
package/components/menu.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import Menu from './contextmenu.svelte';
|
|
2
|
-
import Floating_container from './Floating_container.svelte';
|
|
3
|
-
import Grid from './Grid.menu.svelte';
|
|
4
|
-
let menu_comopnent = null;
|
|
5
|
-
let toolbar_component = null;
|
|
6
|
-
export function showMenu(around, operations) {
|
|
7
|
-
let menu_element = document.getElementById("__hd_svelte_contextmenu");
|
|
8
|
-
if (!menu_element) {
|
|
9
|
-
let app_div = document.getElementById("__hd_svelte_layout_root");
|
|
10
|
-
menu_comopnent = new Menu({
|
|
11
|
-
target: app_div,
|
|
12
|
-
props: {}
|
|
13
|
-
});
|
|
14
|
-
menu_comopnent.show(around, operations);
|
|
15
|
-
}
|
|
16
|
-
else if (menu_comopnent) {
|
|
17
|
-
if (menu_comopnent.isVisible())
|
|
18
|
-
menu_comopnent.hide();
|
|
19
|
-
else
|
|
20
|
-
menu_comopnent.show(around, operations);
|
|
21
|
-
}
|
|
22
|
-
else
|
|
23
|
-
console.error('what now?');
|
|
24
|
-
}
|
|
25
|
-
export function hideWholeContextMenu() {
|
|
26
|
-
if (menu_comopnent) {
|
|
27
|
-
if (menu_comopnent.isVisible())
|
|
28
|
-
menu_comopnent.hide();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export function showFloatingToolbar(around, toolbar, props = {}) {
|
|
32
|
-
let floating_container = document.getElementById("__hd_svelte_floating_container");
|
|
33
|
-
if (!floating_container) {
|
|
34
|
-
let app_div = document.getElementById("__hd_svelte_layout_root");
|
|
35
|
-
toolbar_component = new Floating_container({
|
|
36
|
-
target: app_div,
|
|
37
|
-
props: {}
|
|
38
|
-
});
|
|
39
|
-
toolbar_component.show(around, toolbar, props);
|
|
40
|
-
}
|
|
41
|
-
else if (toolbar_component) {
|
|
42
|
-
//if(toolbar_component.isVisible())
|
|
43
|
-
//{
|
|
44
|
-
// toolbar_component.hide();
|
|
45
|
-
//}
|
|
46
|
-
//else
|
|
47
|
-
//{
|
|
48
|
-
toolbar_component.show(around, toolbar, props);
|
|
49
|
-
//}
|
|
50
|
-
}
|
|
51
|
-
else
|
|
52
|
-
console.error('what now?');
|
|
53
|
-
return toolbar_component;
|
|
54
|
-
}
|
|
55
|
-
export function showGridMenu(around, operations) {
|
|
56
|
-
showFloatingToolbar(around, Grid, { operations: operations });
|
|
57
|
-
}
|
|
1
|
+
import Menu from './contextmenu.svelte';
|
|
2
|
+
import Floating_container from './Floating_container.svelte';
|
|
3
|
+
import Grid from './Grid.menu.svelte';
|
|
4
|
+
let menu_comopnent = null;
|
|
5
|
+
let toolbar_component = null;
|
|
6
|
+
export function showMenu(around, operations) {
|
|
7
|
+
let menu_element = document.getElementById("__hd_svelte_contextmenu");
|
|
8
|
+
if (!menu_element) {
|
|
9
|
+
let app_div = document.getElementById("__hd_svelte_layout_root");
|
|
10
|
+
menu_comopnent = new Menu({
|
|
11
|
+
target: app_div,
|
|
12
|
+
props: {}
|
|
13
|
+
});
|
|
14
|
+
menu_comopnent.show(around, operations);
|
|
15
|
+
}
|
|
16
|
+
else if (menu_comopnent) {
|
|
17
|
+
if (menu_comopnent.isVisible())
|
|
18
|
+
menu_comopnent.hide();
|
|
19
|
+
else
|
|
20
|
+
menu_comopnent.show(around, operations);
|
|
21
|
+
}
|
|
22
|
+
else
|
|
23
|
+
console.error('what now?');
|
|
24
|
+
}
|
|
25
|
+
export function hideWholeContextMenu() {
|
|
26
|
+
if (menu_comopnent) {
|
|
27
|
+
if (menu_comopnent.isVisible())
|
|
28
|
+
menu_comopnent.hide();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function showFloatingToolbar(around, toolbar, props = {}) {
|
|
32
|
+
let floating_container = document.getElementById("__hd_svelte_floating_container");
|
|
33
|
+
if (!floating_container) {
|
|
34
|
+
let app_div = document.getElementById("__hd_svelte_layout_root");
|
|
35
|
+
toolbar_component = new Floating_container({
|
|
36
|
+
target: app_div,
|
|
37
|
+
props: {}
|
|
38
|
+
});
|
|
39
|
+
toolbar_component.show(around, toolbar, props);
|
|
40
|
+
}
|
|
41
|
+
else if (toolbar_component) {
|
|
42
|
+
//if(toolbar_component.isVisible())
|
|
43
|
+
//{
|
|
44
|
+
// toolbar_component.hide();
|
|
45
|
+
//}
|
|
46
|
+
//else
|
|
47
|
+
//{
|
|
48
|
+
toolbar_component.show(around, toolbar, props);
|
|
49
|
+
//}
|
|
50
|
+
}
|
|
51
|
+
else
|
|
52
|
+
console.error('what now?');
|
|
53
|
+
return toolbar_component;
|
|
54
|
+
}
|
|
55
|
+
export function showGridMenu(around, operations) {
|
|
56
|
+
showFloatingToolbar(around, Grid, { operations: operations });
|
|
57
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
value: any;
|
|
6
|
-
disabled?: boolean | undefined;
|
|
7
|
-
self?: null | undefined;
|
|
8
|
-
a?: string | undefined;
|
|
9
|
-
context?: string | undefined;
|
|
10
|
-
typename?: string | undefined;
|
|
11
|
-
c?: string | undefined;
|
|
12
|
-
pushChangesImmediately?: boolean | undefined;
|
|
13
|
-
};
|
|
14
|
-
events: {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
};
|
|
17
|
-
slots: {
|
|
18
|
-
default: {};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export type RadioProps = typeof __propDef.props;
|
|
22
|
-
export type RadioEvents = typeof __propDef.events;
|
|
23
|
-
export type RadioSlots = typeof __propDef.slots;
|
|
24
|
-
export default class Radio extends SvelteComponentTyped<RadioProps, RadioEvents, RadioSlots> {
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
value: any;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
|
+
self?: null | undefined;
|
|
8
|
+
a?: string | undefined;
|
|
9
|
+
context?: string | undefined;
|
|
10
|
+
typename?: string | undefined;
|
|
11
|
+
c?: string | undefined;
|
|
12
|
+
pushChangesImmediately?: boolean | undefined;
|
|
13
|
+
};
|
|
14
|
+
events: {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
};
|
|
17
|
+
slots: {
|
|
18
|
+
default: {};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type RadioProps = typeof __propDef.props;
|
|
22
|
+
export type RadioEvents = typeof __propDef.events;
|
|
23
|
+
export type RadioSlots = typeof __propDef.slots;
|
|
24
|
+
export default class Radio extends SvelteComponentTyped<RadioProps, RadioEvents, RadioSlots> {
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} SidebarProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} SidebarEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} SidebarSlots */
|
|
4
|
-
export default class Sidebar extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
img?: string | undefined;
|
|
7
|
-
href?: string | undefined;
|
|
8
|
-
}, {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
}, {
|
|
11
|
-
default: {};
|
|
12
|
-
summary: {};
|
|
13
|
-
}> {
|
|
14
|
-
}
|
|
15
|
-
export type SidebarProps = typeof __propDef.props;
|
|
16
|
-
export type SidebarEvents = typeof __propDef.events;
|
|
17
|
-
export type SidebarSlots = typeof __propDef.slots;
|
|
18
|
-
import { SvelteComponentTyped } from "svelte";
|
|
19
|
-
declare const __propDef: {
|
|
20
|
-
props: {
|
|
21
|
-
[x: string]: any;
|
|
22
|
-
img?: string | undefined;
|
|
23
|
-
href?: string | undefined;
|
|
24
|
-
};
|
|
25
|
-
events: {
|
|
26
|
-
[evt: string]: CustomEvent<any>;
|
|
27
|
-
};
|
|
28
|
-
slots: {
|
|
29
|
-
default: {};
|
|
30
|
-
summary: {};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export {};
|
|
1
|
+
/** @typedef {typeof __propDef.props} SidebarProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} SidebarEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} SidebarSlots */
|
|
4
|
+
export default class Sidebar extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
img?: string | undefined;
|
|
7
|
+
href?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
}, {
|
|
11
|
+
default: {};
|
|
12
|
+
summary: {};
|
|
13
|
+
}> {
|
|
14
|
+
}
|
|
15
|
+
export type SidebarProps = typeof __propDef.props;
|
|
16
|
+
export type SidebarEvents = typeof __propDef.events;
|
|
17
|
+
export type SidebarSlots = typeof __propDef.slots;
|
|
18
|
+
import { SvelteComponentTyped } from "svelte";
|
|
19
|
+
declare const __propDef: {
|
|
20
|
+
props: {
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
img?: string | undefined;
|
|
23
|
+
href?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
events: {
|
|
26
|
+
[evt: string]: CustomEvent<any>;
|
|
27
|
+
};
|
|
28
|
+
slots: {
|
|
29
|
+
default: {};
|
|
30
|
+
summary: {};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
{/if}
|
|
37
37
|
|
|
38
38
|
{#if !collapsable}
|
|
39
|
-
<ul class="
|
|
39
|
+
<ul class= "{list_border}">
|
|
40
40
|
<slot/>
|
|
41
41
|
</ul>
|
|
42
42
|
{:else if !collapsed}
|
|
43
|
-
<ul class="
|
|
43
|
+
<ul class="{list_border}">
|
|
44
44
|
<slot/>
|
|
45
45
|
</ul>
|
|
46
46
|
{/if}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} SidebarProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} SidebarEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} SidebarSlots */
|
|
4
|
-
export default class Sidebar extends SvelteComponentTyped<{
|
|
5
|
-
title?: string | undefined;
|
|
6
|
-
border?: boolean | undefined;
|
|
7
|
-
collapsable?: boolean | undefined;
|
|
8
|
-
onExpand?: any;
|
|
9
|
-
}, {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
}, {
|
|
12
|
-
default: {};
|
|
13
|
-
}> {
|
|
14
|
-
}
|
|
15
|
-
export type SidebarProps = typeof __propDef.props;
|
|
16
|
-
export type SidebarEvents = typeof __propDef.events;
|
|
17
|
-
export type SidebarSlots = typeof __propDef.slots;
|
|
18
|
-
import { SvelteComponentTyped } from "svelte";
|
|
19
|
-
declare const __propDef: {
|
|
20
|
-
props: {
|
|
21
|
-
title?: string | undefined;
|
|
22
|
-
border?: boolean | undefined;
|
|
23
|
-
collapsable?: boolean | undefined;
|
|
24
|
-
onExpand?: any;
|
|
25
|
-
};
|
|
26
|
-
events: {
|
|
27
|
-
[evt: string]: CustomEvent<any>;
|
|
28
|
-
};
|
|
29
|
-
slots: {
|
|
30
|
-
default: {};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export {};
|
|
1
|
+
/** @typedef {typeof __propDef.props} SidebarProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} SidebarEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} SidebarSlots */
|
|
4
|
+
export default class Sidebar extends SvelteComponentTyped<{
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
border?: boolean | undefined;
|
|
7
|
+
collapsable?: boolean | undefined;
|
|
8
|
+
onExpand?: any;
|
|
9
|
+
}, {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
}, {
|
|
12
|
+
default: {};
|
|
13
|
+
}> {
|
|
14
|
+
}
|
|
15
|
+
export type SidebarProps = typeof __propDef.props;
|
|
16
|
+
export type SidebarEvents = typeof __propDef.events;
|
|
17
|
+
export type SidebarSlots = typeof __propDef.slots;
|
|
18
|
+
import { SvelteComponentTyped } from "svelte";
|
|
19
|
+
declare const __propDef: {
|
|
20
|
+
props: {
|
|
21
|
+
title?: string | undefined;
|
|
22
|
+
border?: boolean | undefined;
|
|
23
|
+
collapsable?: boolean | undefined;
|
|
24
|
+
onExpand?: any;
|
|
25
|
+
};
|
|
26
|
+
events: {
|
|
27
|
+
[evt: string]: CustomEvent<any>;
|
|
28
|
+
};
|
|
29
|
+
slots: {
|
|
30
|
+
default: {};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import Icon from "../icon.svelte";
|
|
3
3
|
import { contextItemsStore, auto_hide_sidebar, contextToolbarOperations } from "../../stores";
|
|
4
4
|
import { FaBars, FaEllipsisH } from "svelte-icons/fa";
|
|
5
|
+
import { link, push } from "svelte-spa-router";
|
|
5
6
|
import {
|
|
6
7
|
selectable as _selectable,
|
|
7
8
|
isSelected,
|
|
@@ -9,7 +10,8 @@ import {
|
|
|
9
10
|
handleSelect,
|
|
10
11
|
activateItem,
|
|
11
12
|
startEditing,
|
|
12
|
-
getActive
|
|
13
|
+
getActive,
|
|
14
|
+
isOnNavigationPage
|
|
13
15
|
} from "../../utils";
|
|
14
16
|
import { showMenu } from "../menu";
|
|
15
17
|
export let href;
|
|
@@ -95,14 +97,24 @@ function on_link_clicked(e) {
|
|
|
95
97
|
handleSelect(e);
|
|
96
98
|
else if (item)
|
|
97
99
|
handleSelect(e);
|
|
100
|
+
if (!e.target)
|
|
101
|
+
return;
|
|
102
|
+
let linkNode = e.target;
|
|
103
|
+
while (linkNode && linkNode.tagName != "A")
|
|
104
|
+
linkNode = linkNode.parentElement;
|
|
105
|
+
if (!linkNode)
|
|
106
|
+
return;
|
|
107
|
+
const href2 = linkNode.getAttribute("href");
|
|
108
|
+
e.preventDefault();
|
|
98
109
|
if (isOnPage) {
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
110
|
+
if (isRowActive) {
|
|
111
|
+
if (href2)
|
|
112
|
+
push(href2);
|
|
113
|
+
}
|
|
103
114
|
} else {
|
|
104
|
-
e.stopPropagation();
|
|
105
115
|
auto_hide_sidebar();
|
|
116
|
+
if (href2)
|
|
117
|
+
push(href2);
|
|
106
118
|
}
|
|
107
119
|
}
|
|
108
120
|
function on_contextmenu(e) {
|
|
@@ -144,14 +156,26 @@ function activateRow(e) {
|
|
|
144
156
|
return;
|
|
145
157
|
if (!isOnPage)
|
|
146
158
|
return;
|
|
147
|
-
let operationsContainer
|
|
159
|
+
let operationsContainer;
|
|
148
160
|
if (operations) {
|
|
149
161
|
let operationsList = operations(root);
|
|
150
|
-
operationsContainer
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
162
|
+
operationsContainer = {
|
|
163
|
+
opver: 1,
|
|
164
|
+
operations: [
|
|
165
|
+
{
|
|
166
|
+
caption: "View",
|
|
167
|
+
operations: [
|
|
168
|
+
{
|
|
169
|
+
icon: FaEllipsisH,
|
|
170
|
+
menu: operationsList,
|
|
171
|
+
fab: "M10"
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
};
|
|
177
|
+
} else
|
|
178
|
+
operationsContainer = [];
|
|
155
179
|
activateItem("props", item, operationsContainer);
|
|
156
180
|
if (e)
|
|
157
181
|
e.stopPropagation();
|
|
@@ -166,24 +190,24 @@ function activateRow(e) {
|
|
|
166
190
|
on:contextmenu={on_contextmenu}
|
|
167
191
|
on:keydown
|
|
168
192
|
on:keyup
|
|
169
|
-
class="
|
|
170
|
-
|
|
193
|
+
class=" mb-2
|
|
194
|
+
border border-transparent rounded-lg
|
|
171
195
|
text-stone-900 dark:text-white {user_class}"
|
|
172
196
|
class:sm:hover:bg-stone-100={!!href}
|
|
173
197
|
class:sm:dark:hover:bg-stone-700={!!href}
|
|
174
198
|
class:bg-stone-200={isRowActive}
|
|
175
199
|
class:dark:bg-stone-700={isRowActive}
|
|
176
200
|
class:selected={selected(selectable, context_data)}>
|
|
177
|
-
<div class="flex flex-row justify-between
|
|
201
|
+
<div class="flex flex-row justify-between
|
|
202
|
+
text-base font-semibold">
|
|
178
203
|
{#if href}
|
|
179
204
|
<a href={href}
|
|
180
205
|
on:click={on_link_clicked}
|
|
181
|
-
class="flex-1 ml-2
|
|
182
|
-
class:mb-3={!summary}
|
|
183
|
-
class:sm:mb-2={!summary}
|
|
206
|
+
class="flex-1 ml-2 inline-flex items-center group"
|
|
184
207
|
>
|
|
185
208
|
{#if icon}
|
|
186
|
-
<Icon class="w-5 h-5" component={icon}/>
|
|
209
|
+
<Icon class="w-5 h-5 mt-0.5 ml-2 mr-1" component={icon}/>
|
|
210
|
+
|
|
187
211
|
{/if}
|
|
188
212
|
<span class="ml-3 group-hover:underline"
|
|
189
213
|
use:editable_if_needed={editable}>
|
|
@@ -191,12 +215,10 @@ function activateRow(e) {
|
|
|
191
215
|
</span>
|
|
192
216
|
</a>
|
|
193
217
|
{:else}
|
|
194
|
-
<p class="flex-1 ml-2
|
|
195
|
-
class:mb-3={!summary}
|
|
196
|
-
class:sm:mb-2={!summary}
|
|
218
|
+
<p class="flex-1 ml-2 inline-flex items-center group cursor-default"
|
|
197
219
|
use:selectable_if_needed={selectable}>
|
|
198
220
|
{#if icon}
|
|
199
|
-
<Icon class="w-5 h-5" component={icon}/>
|
|
221
|
+
<Icon class="w-5 h-5 mt-0.5 ml-2 mr-1" component={icon}/>
|
|
200
222
|
{/if}
|
|
201
223
|
<span class="ml-3"
|
|
202
224
|
use:editable_if_needed={editable}>
|
|
@@ -205,11 +227,11 @@ function activateRow(e) {
|
|
|
205
227
|
</p>
|
|
206
228
|
{/if}
|
|
207
229
|
|
|
208
|
-
{#if
|
|
209
|
-
<section class="flex-0 w-20 sm:w-12
|
|
230
|
+
{#if !isOnPage}
|
|
231
|
+
<section class="flex-0 w-20 sm:w-12 flex-0 flex flex-row"
|
|
210
232
|
use:selectable_if_needed={selectable}>
|
|
211
233
|
{#if can_show_context_menu(selectable, context_data)}
|
|
212
|
-
<button class="w-
|
|
234
|
+
<button class="w-5 h-5 mt-0.5 mr-3 ml-auto" on:click={on_show_menu}>
|
|
213
235
|
<FaBars/>
|
|
214
236
|
</button>
|
|
215
237
|
{/if}
|
|
@@ -217,10 +239,11 @@ function activateRow(e) {
|
|
|
217
239
|
{/if}
|
|
218
240
|
</div>
|
|
219
241
|
|
|
220
|
-
{#if
|
|
221
|
-
<p class="
|
|
242
|
+
{#if summaryText}
|
|
243
|
+
<p class="ml-14 mt-1
|
|
222
244
|
text-stone-900 dark:text-stone-400
|
|
223
|
-
cursor-default
|
|
245
|
+
cursor-default
|
|
246
|
+
text-sm "
|
|
224
247
|
use:selectable_if_needed={selectable}
|
|
225
248
|
use:editable_if_needed={summaryEditable}
|
|
226
249
|
bind:this={summaryElement}>
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
href: string;
|
|
6
|
-
icon?: any | undefined;
|
|
7
|
-
active?: boolean | undefined;
|
|
8
|
-
selectable?: any | undefined;
|
|
9
|
-
editable?: any | undefined;
|
|
10
|
-
operations?: any | undefined;
|
|
11
|
-
item?: object | undefined;
|
|
12
|
-
summary?: string | object | undefined;
|
|
13
|
-
editSummary?: (() => Promise<void>) | undefined;
|
|
14
|
-
};
|
|
15
|
-
events: {
|
|
16
|
-
click: MouseEvent;
|
|
17
|
-
keydown: KeyboardEvent;
|
|
18
|
-
keyup: KeyboardEvent;
|
|
19
|
-
} & {
|
|
20
|
-
[evt: string]: CustomEvent<any>;
|
|
21
|
-
};
|
|
22
|
-
slots: {
|
|
23
|
-
default: {};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export type SidebarProps = typeof __propDef.props;
|
|
27
|
-
export type SidebarEvents = typeof __propDef.events;
|
|
28
|
-
export type SidebarSlots = typeof __propDef.slots;
|
|
29
|
-
export default class Sidebar extends SvelteComponentTyped<SidebarProps, SidebarEvents, SidebarSlots> {
|
|
30
|
-
get editSummary(): () => Promise<void>;
|
|
31
|
-
}
|
|
32
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
href: string;
|
|
6
|
+
icon?: any | undefined;
|
|
7
|
+
active?: boolean | undefined;
|
|
8
|
+
selectable?: any | undefined;
|
|
9
|
+
editable?: any | undefined;
|
|
10
|
+
operations?: any | undefined;
|
|
11
|
+
item?: object | undefined;
|
|
12
|
+
summary?: string | object | undefined;
|
|
13
|
+
editSummary?: (() => Promise<void>) | undefined;
|
|
14
|
+
};
|
|
15
|
+
events: {
|
|
16
|
+
click: MouseEvent;
|
|
17
|
+
keydown: KeyboardEvent;
|
|
18
|
+
keyup: KeyboardEvent;
|
|
19
|
+
} & {
|
|
20
|
+
[evt: string]: CustomEvent<any>;
|
|
21
|
+
};
|
|
22
|
+
slots: {
|
|
23
|
+
default: {};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type SidebarProps = typeof __propDef.props;
|
|
27
|
+
export type SidebarEvents = typeof __propDef.events;
|
|
28
|
+
export type SidebarSlots = typeof __propDef.slots;
|
|
29
|
+
export default class Sidebar extends SvelteComponentTyped<SidebarProps, SidebarEvents, SidebarSlots> {
|
|
30
|
+
get editSummary(): () => Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -100,12 +100,14 @@ function onBlurInserter() {
|
|
|
100
100
|
{/each }
|
|
101
101
|
|
|
102
102
|
{#if inserter}
|
|
103
|
-
<Edit class="
|
|
103
|
+
<Edit class=" mb-2 ml-2
|
|
104
|
+
text-base font-normal
|
|
105
|
+
text-stone-500 rounded-lg dark:text-stone-400 hover:bg-stone-100 dark:hover:bg-stone-700"
|
|
104
106
|
onEnter={onNewElement}
|
|
105
107
|
placeholder={inserterPlaceholder}
|
|
106
108
|
inserter={true}
|
|
107
109
|
onBlur={onBlurInserter}
|
|
108
110
|
bind:this={inserterElement}>
|
|
109
|
-
<Icon
|
|
111
|
+
<Icon component={FaPlus} class="w-5 h-5 mt-0.5 ml-2.5 pr-0.5 mr-4"/>
|
|
110
112
|
</Edit>
|
|
111
113
|
{/if}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
objects: object[];
|
|
5
|
-
orderAttrib?: string | undefined;
|
|
6
|
-
inserter?: Function | undefined;
|
|
7
|
-
inserterPlaceholder?: string | undefined;
|
|
8
|
-
ORDER_STEP?: 64 | undefined;
|
|
9
|
-
MIN_ORDER?: 0 | undefined;
|
|
10
|
-
reload?: ((_objects: object[]) => void) | undefined;
|
|
11
|
-
moveUp?: ((element: object) => void) | undefined;
|
|
12
|
-
moveTop?: ((element: object) => void) | undefined;
|
|
13
|
-
moveDown?: ((element: object) => void) | undefined;
|
|
14
|
-
add?: ((onAddHandler: Function) => Promise<void>) | undefined;
|
|
15
|
-
};
|
|
16
|
-
events: {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
};
|
|
19
|
-
slots: {
|
|
20
|
-
default: {
|
|
21
|
-
item: object;
|
|
22
|
-
idx: any;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export type SidebarProps = typeof __propDef.props;
|
|
27
|
-
export type SidebarEvents = typeof __propDef.events;
|
|
28
|
-
export type SidebarSlots = typeof __propDef.slots;
|
|
29
|
-
export default class Sidebar extends SvelteComponentTyped<SidebarProps, SidebarEvents, SidebarSlots> {
|
|
30
|
-
get ORDER_STEP(): 64;
|
|
31
|
-
get MIN_ORDER(): 0;
|
|
32
|
-
get reload(): (_objects: object[]) => void;
|
|
33
|
-
get moveUp(): (element: object) => void;
|
|
34
|
-
get moveTop(): (element: object) => void;
|
|
35
|
-
get moveDown(): (element: object) => void;
|
|
36
|
-
get add(): (onAddHandler: Function) => Promise<void>;
|
|
37
|
-
}
|
|
38
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
objects: object[];
|
|
5
|
+
orderAttrib?: string | undefined;
|
|
6
|
+
inserter?: Function | undefined;
|
|
7
|
+
inserterPlaceholder?: string | undefined;
|
|
8
|
+
ORDER_STEP?: 64 | undefined;
|
|
9
|
+
MIN_ORDER?: 0 | undefined;
|
|
10
|
+
reload?: ((_objects: object[]) => void) | undefined;
|
|
11
|
+
moveUp?: ((element: object) => void) | undefined;
|
|
12
|
+
moveTop?: ((element: object) => void) | undefined;
|
|
13
|
+
moveDown?: ((element: object) => void) | undefined;
|
|
14
|
+
add?: ((onAddHandler: Function) => Promise<void>) | undefined;
|
|
15
|
+
};
|
|
16
|
+
events: {
|
|
17
|
+
[evt: string]: CustomEvent<any>;
|
|
18
|
+
};
|
|
19
|
+
slots: {
|
|
20
|
+
default: {
|
|
21
|
+
item: object;
|
|
22
|
+
idx: any;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type SidebarProps = typeof __propDef.props;
|
|
27
|
+
export type SidebarEvents = typeof __propDef.events;
|
|
28
|
+
export type SidebarSlots = typeof __propDef.slots;
|
|
29
|
+
export default class Sidebar extends SvelteComponentTyped<SidebarProps, SidebarEvents, SidebarSlots> {
|
|
30
|
+
get ORDER_STEP(): 64;
|
|
31
|
+
get MIN_ORDER(): 0;
|
|
32
|
+
get reload(): (_objects: object[]) => void;
|
|
33
|
+
get moveUp(): (element: object) => void;
|
|
34
|
+
get moveTop(): (element: object) => void;
|
|
35
|
+
get moveDown(): (element: object) => void;
|
|
36
|
+
get add(): (onAddHandler: Function) => Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export {};
|