@humandialog/forms.svelte 0.5.6 → 0.5.7
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 +106 -106
- 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 +82 -82
- package/components/kanban/kanban.svelte.d.ts +63 -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 +45 -10
- package/components/list/internal/list.element.svelte.d.ts +29 -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.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
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { rCombo_definition } from '../combo/combo';
|
|
2
|
-
export declare enum rList_property_type {
|
|
3
|
-
Hidden = 0,
|
|
4
|
-
Text = 1,
|
|
5
|
-
Date = 2,
|
|
6
|
-
Combo = 3,
|
|
7
|
-
Static = 4,
|
|
8
|
-
Tags = 5
|
|
9
|
-
}
|
|
10
|
-
export declare class rList_property {
|
|
11
|
-
constructor(type: rList_property_type);
|
|
12
|
-
type: rList_property_type;
|
|
13
|
-
name: string;
|
|
14
|
-
a: string;
|
|
15
|
-
onSelect: Function | undefined;
|
|
16
|
-
position: number | string | undefined;
|
|
17
|
-
}
|
|
18
|
-
export declare class rList_property_combo extends rList_property {
|
|
19
|
-
constructor();
|
|
20
|
-
association: boolean;
|
|
21
|
-
combo_definition: rCombo_definition;
|
|
22
|
-
}
|
|
23
|
-
export declare class rList_property_tags extends rList_property {
|
|
24
|
-
constructor();
|
|
25
|
-
onCreate: Function | undefined;
|
|
26
|
-
getAllTags: Function | undefined;
|
|
27
|
-
}
|
|
28
|
-
export declare class rList_definition {
|
|
29
|
-
title: string;
|
|
30
|
-
title_editable: boolean;
|
|
31
|
-
on_title_changed: Function | undefined;
|
|
32
|
-
title_readonly: boolean;
|
|
33
|
-
title_href: string | undefined;
|
|
34
|
-
title_href_func: Function | undefined;
|
|
35
|
-
summary: string;
|
|
36
|
-
summary_editable: boolean;
|
|
37
|
-
on_summary_changed: Function | undefined;
|
|
38
|
-
summary_readonly: boolean;
|
|
39
|
-
can_insert: boolean;
|
|
40
|
-
onInsert: Function | undefined;
|
|
41
|
-
inserter_icon: boolean;
|
|
42
|
-
onOpen: Function | undefined;
|
|
43
|
-
properties: rList_property[];
|
|
44
|
-
}
|
|
1
|
+
import { rCombo_definition } from '../combo/combo';
|
|
2
|
+
export declare enum rList_property_type {
|
|
3
|
+
Hidden = 0,
|
|
4
|
+
Text = 1,
|
|
5
|
+
Date = 2,
|
|
6
|
+
Combo = 3,
|
|
7
|
+
Static = 4,
|
|
8
|
+
Tags = 5
|
|
9
|
+
}
|
|
10
|
+
export declare class rList_property {
|
|
11
|
+
constructor(type: rList_property_type);
|
|
12
|
+
type: rList_property_type;
|
|
13
|
+
name: string;
|
|
14
|
+
a: string;
|
|
15
|
+
onSelect: Function | undefined;
|
|
16
|
+
position: number | string | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare class rList_property_combo extends rList_property {
|
|
19
|
+
constructor();
|
|
20
|
+
association: boolean;
|
|
21
|
+
combo_definition: rCombo_definition;
|
|
22
|
+
}
|
|
23
|
+
export declare class rList_property_tags extends rList_property {
|
|
24
|
+
constructor();
|
|
25
|
+
onCreate: Function | undefined;
|
|
26
|
+
getAllTags: Function | undefined;
|
|
27
|
+
}
|
|
28
|
+
export declare class rList_definition {
|
|
29
|
+
title: string;
|
|
30
|
+
title_editable: boolean;
|
|
31
|
+
on_title_changed: Function | undefined;
|
|
32
|
+
title_readonly: boolean;
|
|
33
|
+
title_href: string | undefined;
|
|
34
|
+
title_href_func: Function | undefined;
|
|
35
|
+
summary: string;
|
|
36
|
+
summary_editable: boolean;
|
|
37
|
+
on_summary_changed: Function | undefined;
|
|
38
|
+
summary_readonly: boolean;
|
|
39
|
+
can_insert: boolean;
|
|
40
|
+
onInsert: Function | undefined;
|
|
41
|
+
inserter_icon: boolean;
|
|
42
|
+
onOpen: Function | undefined;
|
|
43
|
+
properties: rList_property[];
|
|
44
|
+
}
|
package/components/list/List.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { rCombo_definition } from '../combo/combo';
|
|
2
|
-
export var rList_property_type;
|
|
3
|
-
(function (rList_property_type) {
|
|
4
|
-
rList_property_type[rList_property_type["Hidden"] = 0] = "Hidden";
|
|
5
|
-
rList_property_type[rList_property_type["Text"] = 1] = "Text";
|
|
6
|
-
rList_property_type[rList_property_type["Date"] = 2] = "Date";
|
|
7
|
-
rList_property_type[rList_property_type["Combo"] = 3] = "Combo";
|
|
8
|
-
rList_property_type[rList_property_type["Static"] = 4] = "Static";
|
|
9
|
-
rList_property_type[rList_property_type["Tags"] = 5] = "Tags";
|
|
10
|
-
})(rList_property_type || (rList_property_type = {}));
|
|
11
|
-
export class rList_property {
|
|
12
|
-
constructor(type) {
|
|
13
|
-
this.type = type;
|
|
14
|
-
}
|
|
15
|
-
type = rList_property_type.Hidden;
|
|
16
|
-
name = '';
|
|
17
|
-
a = '';
|
|
18
|
-
onSelect = undefined;
|
|
19
|
-
position = undefined;
|
|
20
|
-
}
|
|
21
|
-
export class rList_property_combo extends rList_property {
|
|
22
|
-
constructor() {
|
|
23
|
-
super(rList_property_type.Combo);
|
|
24
|
-
this.combo_definition = new rCombo_definition;
|
|
25
|
-
}
|
|
26
|
-
association = false;
|
|
27
|
-
combo_definition;
|
|
28
|
-
}
|
|
29
|
-
export class rList_property_tags extends rList_property {
|
|
30
|
-
constructor() {
|
|
31
|
-
super(rList_property_type.Tags);
|
|
32
|
-
}
|
|
33
|
-
onCreate = undefined;
|
|
34
|
-
getAllTags = undefined;
|
|
35
|
-
}
|
|
36
|
-
export class rList_definition {
|
|
37
|
-
title = '';
|
|
38
|
-
title_editable = false;
|
|
39
|
-
on_title_changed = undefined;
|
|
40
|
-
title_readonly = false;
|
|
41
|
-
title_href = undefined;
|
|
42
|
-
title_href_func = undefined;
|
|
43
|
-
summary = '';
|
|
44
|
-
summary_editable = false;
|
|
45
|
-
on_summary_changed = undefined;
|
|
46
|
-
summary_readonly = false;
|
|
47
|
-
can_insert = false;
|
|
48
|
-
onInsert = undefined;
|
|
49
|
-
inserter_icon = false;
|
|
50
|
-
onOpen = undefined;
|
|
51
|
-
properties = [];
|
|
52
|
-
}
|
|
1
|
+
import { rCombo_definition } from '../combo/combo';
|
|
2
|
+
export var rList_property_type;
|
|
3
|
+
(function (rList_property_type) {
|
|
4
|
+
rList_property_type[rList_property_type["Hidden"] = 0] = "Hidden";
|
|
5
|
+
rList_property_type[rList_property_type["Text"] = 1] = "Text";
|
|
6
|
+
rList_property_type[rList_property_type["Date"] = 2] = "Date";
|
|
7
|
+
rList_property_type[rList_property_type["Combo"] = 3] = "Combo";
|
|
8
|
+
rList_property_type[rList_property_type["Static"] = 4] = "Static";
|
|
9
|
+
rList_property_type[rList_property_type["Tags"] = 5] = "Tags";
|
|
10
|
+
})(rList_property_type || (rList_property_type = {}));
|
|
11
|
+
export class rList_property {
|
|
12
|
+
constructor(type) {
|
|
13
|
+
this.type = type;
|
|
14
|
+
}
|
|
15
|
+
type = rList_property_type.Hidden;
|
|
16
|
+
name = '';
|
|
17
|
+
a = '';
|
|
18
|
+
onSelect = undefined;
|
|
19
|
+
position = undefined;
|
|
20
|
+
}
|
|
21
|
+
export class rList_property_combo extends rList_property {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(rList_property_type.Combo);
|
|
24
|
+
this.combo_definition = new rCombo_definition;
|
|
25
|
+
}
|
|
26
|
+
association = false;
|
|
27
|
+
combo_definition;
|
|
28
|
+
}
|
|
29
|
+
export class rList_property_tags extends rList_property {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(rList_property_type.Tags);
|
|
32
|
+
}
|
|
33
|
+
onCreate = undefined;
|
|
34
|
+
getAllTags = undefined;
|
|
35
|
+
}
|
|
36
|
+
export class rList_definition {
|
|
37
|
+
title = '';
|
|
38
|
+
title_editable = false;
|
|
39
|
+
on_title_changed = undefined;
|
|
40
|
+
title_readonly = false;
|
|
41
|
+
title_href = undefined;
|
|
42
|
+
title_href_func = undefined;
|
|
43
|
+
summary = '';
|
|
44
|
+
summary_editable = false;
|
|
45
|
+
on_summary_changed = undefined;
|
|
46
|
+
summary_readonly = false;
|
|
47
|
+
can_insert = false;
|
|
48
|
+
onInsert = undefined;
|
|
49
|
+
inserter_icon = false;
|
|
50
|
+
onOpen = undefined;
|
|
51
|
+
properties = [];
|
|
52
|
+
}
|
|
@@ -66,69 +66,69 @@ async function edit_date(field, prop_idx) {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
<div class="text-xs grid-{definition.properties.length}">
|
|
72
|
-
{#each definition.properties as prop, prop_index}
|
|
73
|
-
<p class="col-span-1 w-full mr-auto mt-0.5">
|
|
74
|
-
{#if item[prop.a] || placeholder == prop.name}
|
|
75
|
-
<span role="gridcell" tabindex="0">
|
|
76
|
-
{#if prop.type == rList_property_type.Date}
|
|
77
|
-
<DatePicker self={item}
|
|
78
|
-
a={prop.a}
|
|
79
|
-
compact={true}
|
|
80
|
-
onSelect={prop.onSelect}
|
|
81
|
-
s="xs"
|
|
82
|
-
inContext="props sel"
|
|
83
|
-
bind:this={props[prop_index]}
|
|
84
|
-
changed={(value)=>{on_date_changed(value, prop.a)}}
|
|
85
|
-
/>
|
|
86
|
-
{:else if prop.type == rList_property_type.Combo}
|
|
87
|
-
<Combo self={item}
|
|
88
|
-
inContext="props sel"
|
|
89
|
-
compact={true}
|
|
90
|
-
a={prop.a}
|
|
91
|
-
onSelect={prop.onSelect}
|
|
92
|
-
isAssociation={prop.association}
|
|
93
|
-
icon={false}
|
|
94
|
-
bind:this={props[prop_index]}
|
|
95
|
-
definition={prop.combo_definition}
|
|
96
|
-
changed={(key,name)=>{on_combo_changed(key, name, prop)}}
|
|
97
|
-
s='xs'/>
|
|
98
|
-
{:else if prop.type == rList_property_type.Static}
|
|
99
|
-
<span class="dark:text-white text-stone-400 truncate px-2.5 bg-stone-900/10 dark:bg-stone-100/10 rounded-lg">
|
|
100
|
-
{item[prop.a]}
|
|
101
|
-
</span>
|
|
102
|
-
{/if}
|
|
103
|
-
</span>
|
|
104
|
-
{/if}
|
|
105
|
-
</p>
|
|
106
|
-
{/each}
|
|
107
|
-
</div>
|
|
108
|
-
|
|
109
|
-
<style>
|
|
110
|
-
.grid-1
|
|
111
|
-
{
|
|
112
|
-
display: grid;
|
|
113
|
-
grid-template-columns: 100%;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.grid-2
|
|
117
|
-
{
|
|
118
|
-
display: grid;
|
|
119
|
-
grid-template-columns: 50% 50%;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.grid-3
|
|
123
|
-
{
|
|
124
|
-
display: grid;
|
|
125
|
-
grid-template-columns: 33% 33% 33%;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.grid-4
|
|
129
|
-
{
|
|
130
|
-
display: grid;
|
|
131
|
-
grid-template-columns: 25% 25% 25% 25%;
|
|
132
|
-
}
|
|
133
|
-
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<div class="text-xs grid-{definition.properties.length}">
|
|
72
|
+
{#each definition.properties as prop, prop_index}
|
|
73
|
+
<p class="col-span-1 w-full mr-auto mt-0.5">
|
|
74
|
+
{#if item[prop.a] || placeholder == prop.name}
|
|
75
|
+
<span role="gridcell" tabindex="0">
|
|
76
|
+
{#if prop.type == rList_property_type.Date}
|
|
77
|
+
<DatePicker self={item}
|
|
78
|
+
a={prop.a}
|
|
79
|
+
compact={true}
|
|
80
|
+
onSelect={prop.onSelect}
|
|
81
|
+
s="xs"
|
|
82
|
+
inContext="props sel"
|
|
83
|
+
bind:this={props[prop_index]}
|
|
84
|
+
changed={(value)=>{on_date_changed(value, prop.a)}}
|
|
85
|
+
/>
|
|
86
|
+
{:else if prop.type == rList_property_type.Combo}
|
|
87
|
+
<Combo self={item}
|
|
88
|
+
inContext="props sel"
|
|
89
|
+
compact={true}
|
|
90
|
+
a={prop.a}
|
|
91
|
+
onSelect={prop.onSelect}
|
|
92
|
+
isAssociation={prop.association}
|
|
93
|
+
icon={false}
|
|
94
|
+
bind:this={props[prop_index]}
|
|
95
|
+
definition={prop.combo_definition}
|
|
96
|
+
changed={(key,name)=>{on_combo_changed(key, name, prop)}}
|
|
97
|
+
s='xs'/>
|
|
98
|
+
{:else if prop.type == rList_property_type.Static}
|
|
99
|
+
<span class="dark:text-white text-stone-400 truncate px-2.5 bg-stone-900/10 dark:bg-stone-100/10 rounded-lg">
|
|
100
|
+
{item[prop.a]}
|
|
101
|
+
</span>
|
|
102
|
+
{/if}
|
|
103
|
+
</span>
|
|
104
|
+
{/if}
|
|
105
|
+
</p>
|
|
106
|
+
{/each}
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<style>
|
|
110
|
+
.grid-1
|
|
111
|
+
{
|
|
112
|
+
display: grid;
|
|
113
|
+
grid-template-columns: 100%;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.grid-2
|
|
117
|
+
{
|
|
118
|
+
display: grid;
|
|
119
|
+
grid-template-columns: 50% 50%;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.grid-3
|
|
123
|
+
{
|
|
124
|
+
display: grid;
|
|
125
|
+
grid-template-columns: 33% 33% 33%;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.grid-4
|
|
129
|
+
{
|
|
130
|
+
display: grid;
|
|
131
|
+
grid-template-columns: 25% 25% 25% 25%;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
134
|
</style>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import { rList_definition } from '../List';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
definition: rList_definition;
|
|
6
|
-
item: object;
|
|
7
|
-
placeholder?: string | undefined;
|
|
8
|
-
editProperty?: ((field: string) => void) | undefined;
|
|
9
|
-
};
|
|
10
|
-
events: {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {};
|
|
14
|
-
};
|
|
15
|
-
export type ListProps = typeof __propDef.props;
|
|
16
|
-
export type ListEvents = typeof __propDef.events;
|
|
17
|
-
export type ListSlots = typeof __propDef.slots;
|
|
18
|
-
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
19
|
-
get editProperty(): (field: string) => void;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { rList_definition } from '../List';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
definition: rList_definition;
|
|
6
|
+
item: object;
|
|
7
|
+
placeholder?: string | undefined;
|
|
8
|
+
editProperty?: ((field: string) => void) | undefined;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {};
|
|
14
|
+
};
|
|
15
|
+
export type ListProps = typeof __propDef.props;
|
|
16
|
+
export type ListEvents = typeof __propDef.events;
|
|
17
|
+
export type ListSlots = typeof __propDef.slots;
|
|
18
|
+
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
19
|
+
get editProperty(): (field: string) => void;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -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,20 @@ 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);
|
|
183
191
|
}
|
|
184
192
|
</script>
|
|
185
193
|
|
|
@@ -241,16 +249,43 @@ async function force_editing(field) {
|
|
|
241
249
|
|
|
242
250
|
{#if summary && (item[summary] || placeholder=='Summary')}
|
|
243
251
|
{@const element_id = `__hd_list_ctrl_${item[item_key]}_Summary`}
|
|
244
|
-
|
|
252
|
+
{#key item[summary]}
|
|
253
|
+
|
|
254
|
+
<!--Summary
|
|
245
255
|
id={element_id}
|
|
246
256
|
on:click={(e) => on_active_row_clicked(e, 'bottom')}
|
|
247
257
|
text={item[summary]}
|
|
248
258
|
readonly={definition.summary_readonly}
|
|
249
259
|
placeholder={placeholder == 'Summary'}
|
|
250
260
|
editable={(text) => {change_summary(text)}}
|
|
251
|
-
clickEdit={edit}
|
|
252
261
|
active={is_row_active}
|
|
253
|
-
|
|
262
|
+
/-->
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
{#if is_row_active}
|
|
266
|
+
<p id={element_id}
|
|
267
|
+
class=" sm:text-xs sm:min-h-[1rem]
|
|
268
|
+
text-base min-h-[1.5rem]
|
|
269
|
+
text-stone-400"
|
|
270
|
+
use:editable={{
|
|
271
|
+
action: (text) => {change_summary(text)},
|
|
272
|
+
readonly: definition.summary_readonly,
|
|
273
|
+
onFinish: (d) => {placeholder='';},
|
|
274
|
+
active: true
|
|
275
|
+
}}>
|
|
276
|
+
{item[summary]}
|
|
277
|
+
</p>
|
|
278
|
+
{:else}
|
|
279
|
+
<p id={element_id}
|
|
280
|
+
class=" sm:text-xs sm:min-h-[1rem]
|
|
281
|
+
text-base min-h-[1.5rem]
|
|
282
|
+
text-stone-400"
|
|
283
|
+
on:click={(e) => on_active_row_clicked(e, 'bottom')}>
|
|
284
|
+
{item[summary]}
|
|
285
|
+
</p>
|
|
286
|
+
{/if}
|
|
287
|
+
{/key}
|
|
288
|
+
|
|
254
289
|
{/if}
|
|
255
290
|
|
|
256
291
|
<section class="block sm:hidden w-full sm:flex-none sm:w-2/3">
|
|
@@ -1,29 +1,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
|
-
};
|
|
13
|
-
events: {
|
|
14
|
-
[evt: string]: CustomEvent<any>;
|
|
15
|
-
};
|
|
16
|
-
slots: {
|
|
17
|
-
left: {
|
|
18
|
-
element: object;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export type ListProps = typeof __propDef.props;
|
|
23
|
-
export type ListEvents = typeof __propDef.events;
|
|
24
|
-
export type ListSlots = typeof __propDef.slots;
|
|
25
|
-
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
26
|
-
get activate(): () => void;
|
|
27
|
-
get editProperty(): (field: string) => void;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
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
|
+
events: {
|
|
14
|
+
[evt: string]: CustomEvent<any>;
|
|
15
|
+
};
|
|
16
|
+
slots: {
|
|
17
|
+
left: {
|
|
18
|
+
element: object;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type ListProps = typeof __propDef.props;
|
|
23
|
+
export type ListEvents = typeof __propDef.events;
|
|
24
|
+
export type ListSlots = typeof __propDef.slots;
|
|
25
|
+
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
26
|
+
get activate(): () => void;
|
|
27
|
+
get editProperty(): (field: string) => void;
|
|
28
|
+
}
|
|
29
|
+
export {};
|