@humandialog/forms.svelte 0.5.9 → 0.5.11
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 +165 -98
- 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 +31 -9
- 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 +4 -4
- package/components/document/rich.edit.svelte.d.ts +32 -32
- package/components/edit.field.svelte +9 -4
- package/components/edit.field.svelte.d.ts +31 -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 +84 -69
- 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 +86 -85
- 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 +2 -2
- package/components/kanban/kanban.title.svelte.d.ts +18 -18
- package/components/list/List.d.ts +45 -45
- package/components/list/List.js +53 -53
- 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 -46
- package/components/list/internal/list.element.summary.svelte.d.ts +24 -24
- 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 +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 +5 -5
- package/components/menu.js +57 -57
- 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 +56 -6
- package/components/sidebar/sidebar.item.svelte.d.ts +29 -28
- package/components/sidebar/sidebar.list.svelte +36 -15
- package/components/sidebar/sidebar.list.svelte.d.ts +35 -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.colors.svelte +20 -20
- package/components/tag.colors.svelte.d.ts +17 -17
- package/components/tag.svelte +24 -24
- package/components/tag.svelte.d.ts +20 -20
- 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/desk.svelte +1 -1
- package/desk.svelte.d.ts +23 -23
- package/form.box.svelte.d.ts +35 -35
- package/horizontal.toolbar.svelte +32 -18
- package/horizontal.toolbar.svelte.d.ts +25 -25
- package/index.d.ts +59 -59
- package/index.js +65 -65
- package/internal/configurable.content.svelte +8 -0
- package/internal/configurable.content.svelte.d.ts +29 -27
- package/internal/loading.svelte.d.ts +23 -23
- package/modal.svelte +5 -2
- package/modal.svelte.d.ts +37 -35
- package/operations.svelte +36 -16
- package/operations.svelte.d.ts +16 -16
- package/package.json +9 -9
- package/page.row.svelte.d.ts +31 -31
- package/page.svelte +17 -4
- package/page.svelte.d.ts +47 -45
- package/stores.d.ts +39 -39
- package/stores.js +0 -0
- package/tenant.members.svelte +3 -3
- 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 +12 -5
- package/vertical.toolbar.svelte.d.ts +27 -27
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
export const KanbanCardTop = 1;
|
|
2
|
-
export const KanbanCardMiddle = 2;
|
|
3
|
-
export const KanbanCardBottom = 3;
|
|
4
|
-
export class rKanban_column {
|
|
5
|
-
id;
|
|
6
|
-
title = '';
|
|
7
|
-
width = 'w-[240px]';
|
|
8
|
-
state = '';
|
|
9
|
-
finishing = false;
|
|
10
|
-
operations = undefined;
|
|
11
|
-
onTitleChanged = undefined;
|
|
12
|
-
}
|
|
13
|
-
export class rKanban_definition {
|
|
14
|
-
columns = [];
|
|
15
|
-
titleAttrib = '';
|
|
16
|
-
titleOnChange = undefined;
|
|
17
|
-
titleReadOnly = false;
|
|
18
|
-
summaryAttrib = '';
|
|
19
|
-
summaryOnChange = undefined;
|
|
20
|
-
summaryReadOnly = false;
|
|
21
|
-
properties = [];
|
|
22
|
-
self = undefined;
|
|
23
|
-
a = '';
|
|
24
|
-
objects = undefined;
|
|
25
|
-
context = '';
|
|
26
|
-
key = '';
|
|
27
|
-
typename = '';
|
|
28
|
-
stateAttrib = '';
|
|
29
|
-
orderAttrib = '';
|
|
30
|
-
onUp = undefined;
|
|
31
|
-
onDown = undefined;
|
|
32
|
-
onAdd = undefined;
|
|
33
|
-
onRemove = undefined;
|
|
34
|
-
onReplace = undefined;
|
|
35
|
-
onOpen = undefined;
|
|
36
|
-
getCardOperations = undefined;
|
|
37
|
-
items = null;
|
|
38
|
-
getItems() {
|
|
39
|
-
if (this.items == null) {
|
|
40
|
-
let item = this.self;
|
|
41
|
-
this.items = null;
|
|
42
|
-
if (this.objects)
|
|
43
|
-
this.items = this.objects;
|
|
44
|
-
else if (item && this.a)
|
|
45
|
-
this.items = item[this.a];
|
|
46
|
-
if (this.items == null)
|
|
47
|
-
this.items = [];
|
|
48
|
-
}
|
|
49
|
-
return this.items;
|
|
50
|
-
}
|
|
51
|
-
clear() {
|
|
52
|
-
this.columns = [];
|
|
53
|
-
this.titleAttrib = '';
|
|
54
|
-
this.titleOnChange = undefined;
|
|
55
|
-
this.titleReadOnly = false;
|
|
56
|
-
this.summaryAttrib = '';
|
|
57
|
-
this.summaryOnChange = undefined;
|
|
58
|
-
this.summaryReadOnly = false;
|
|
59
|
-
this.properties = [];
|
|
60
|
-
this.self = undefined;
|
|
61
|
-
this.a = '';
|
|
62
|
-
this.objects = undefined;
|
|
63
|
-
this.context = '';
|
|
64
|
-
this.key = '';
|
|
65
|
-
this.typename = '';
|
|
66
|
-
this.stateAttrib = '';
|
|
67
|
-
this.orderAttrib = '';
|
|
68
|
-
this.onUp = undefined;
|
|
69
|
-
this.onDown = undefined;
|
|
70
|
-
this.onAdd = undefined;
|
|
71
|
-
this.onRemove = undefined;
|
|
72
|
-
this.onReplace = undefined;
|
|
73
|
-
this.onOpen = undefined;
|
|
74
|
-
this.getCardOperations = undefined;
|
|
75
|
-
this.items = null;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
export const KanbanColumnTop = -1;
|
|
79
|
-
export const KanbanColumnBottom = -2;
|
|
1
|
+
export const KanbanCardTop = 1;
|
|
2
|
+
export const KanbanCardMiddle = 2;
|
|
3
|
+
export const KanbanCardBottom = 3;
|
|
4
|
+
export class rKanban_column {
|
|
5
|
+
id;
|
|
6
|
+
title = '';
|
|
7
|
+
width = 'w-[240px]';
|
|
8
|
+
state = '';
|
|
9
|
+
finishing = false;
|
|
10
|
+
operations = undefined;
|
|
11
|
+
onTitleChanged = undefined;
|
|
12
|
+
}
|
|
13
|
+
export class rKanban_definition {
|
|
14
|
+
columns = [];
|
|
15
|
+
titleAttrib = '';
|
|
16
|
+
titleOnChange = undefined;
|
|
17
|
+
titleReadOnly = false;
|
|
18
|
+
summaryAttrib = '';
|
|
19
|
+
summaryOnChange = undefined;
|
|
20
|
+
summaryReadOnly = false;
|
|
21
|
+
properties = [];
|
|
22
|
+
self = undefined;
|
|
23
|
+
a = '';
|
|
24
|
+
objects = undefined;
|
|
25
|
+
context = '';
|
|
26
|
+
key = '';
|
|
27
|
+
typename = '';
|
|
28
|
+
stateAttrib = '';
|
|
29
|
+
orderAttrib = '';
|
|
30
|
+
onUp = undefined;
|
|
31
|
+
onDown = undefined;
|
|
32
|
+
onAdd = undefined;
|
|
33
|
+
onRemove = undefined;
|
|
34
|
+
onReplace = undefined;
|
|
35
|
+
onOpen = undefined;
|
|
36
|
+
getCardOperations = undefined;
|
|
37
|
+
items = null;
|
|
38
|
+
getItems() {
|
|
39
|
+
if (this.items == null) {
|
|
40
|
+
let item = this.self;
|
|
41
|
+
this.items = null;
|
|
42
|
+
if (this.objects)
|
|
43
|
+
this.items = this.objects;
|
|
44
|
+
else if (item && this.a)
|
|
45
|
+
this.items = item[this.a];
|
|
46
|
+
if (this.items == null)
|
|
47
|
+
this.items = [];
|
|
48
|
+
}
|
|
49
|
+
return this.items;
|
|
50
|
+
}
|
|
51
|
+
clear() {
|
|
52
|
+
this.columns = [];
|
|
53
|
+
this.titleAttrib = '';
|
|
54
|
+
this.titleOnChange = undefined;
|
|
55
|
+
this.titleReadOnly = false;
|
|
56
|
+
this.summaryAttrib = '';
|
|
57
|
+
this.summaryOnChange = undefined;
|
|
58
|
+
this.summaryReadOnly = false;
|
|
59
|
+
this.properties = [];
|
|
60
|
+
this.self = undefined;
|
|
61
|
+
this.a = '';
|
|
62
|
+
this.objects = undefined;
|
|
63
|
+
this.context = '';
|
|
64
|
+
this.key = '';
|
|
65
|
+
this.typename = '';
|
|
66
|
+
this.stateAttrib = '';
|
|
67
|
+
this.orderAttrib = '';
|
|
68
|
+
this.onUp = undefined;
|
|
69
|
+
this.onDown = undefined;
|
|
70
|
+
this.onAdd = undefined;
|
|
71
|
+
this.onRemove = undefined;
|
|
72
|
+
this.onReplace = undefined;
|
|
73
|
+
this.onOpen = undefined;
|
|
74
|
+
this.getCardOperations = undefined;
|
|
75
|
+
this.items = null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export const KanbanColumnTop = -1;
|
|
79
|
+
export const KanbanColumnBottom = -2;
|
|
@@ -127,110 +127,110 @@ export async function editProperty(field) {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
</script>
|
|
131
|
-
|
|
132
|
-
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
133
|
-
|
|
134
|
-
<li class="mx-2 pt-2 pb-4 px-1 rounded-md border border-transparent {selectedClass} {focusedClass} scroll-mt-[50px] sm:scroll-mt-[40px]"
|
|
135
|
-
class:cursor-pointer={!isCardActive}
|
|
136
|
-
on:click={activate}
|
|
137
|
-
use:selectable={item}
|
|
138
|
-
bind:this={card}>
|
|
139
|
-
|
|
140
|
-
<!-- -->
|
|
141
|
-
<!--section class="h-6 w-full flex flex-row ">
|
|
142
|
-
<button class="h-3 w-3"
|
|
143
|
-
class:hidden={!isCardActive}
|
|
144
|
-
on:click={(e) => showMoveOperations()}
|
|
145
|
-
bind:this={moveButton}>
|
|
146
|
-
<FaArrowsAlt/>
|
|
147
|
-
</button>
|
|
148
|
-
|
|
149
|
-
{#if $$slots.kanbanCardTopProps}
|
|
150
|
-
<div class="ml-auto flex flex-row gap-2">
|
|
151
|
-
<slot name="kanbanCardTopProps" element={item}/>
|
|
152
|
-
</div>
|
|
153
|
-
{/if}
|
|
154
|
-
</section-->
|
|
155
|
-
|
|
156
|
-
{#if $$slots.kanbanCardTopProps}
|
|
157
|
-
<section class="flex flex-row justify-between">
|
|
158
|
-
<slot name="kanbanCardTopProps" element={item}/>
|
|
159
|
-
</section>
|
|
160
|
-
{/if}
|
|
161
|
-
<Properties position={KanbanCardTop} {item} bind:this={topProps}/>
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
{#if isCardActive}
|
|
165
|
-
<h3 class=" text-lg font-semibold min-h-[1.75rem]
|
|
166
|
-
sm:text-sm sm:font-semibold sm:min-h-[1.25rem]
|
|
167
|
-
whitespace-nowrap overflow-clip truncate w-full sm:flex-none
|
|
168
|
-
relative"
|
|
169
|
-
use:editable={{
|
|
170
|
-
action: (text) => onTitleChanged(text),
|
|
171
|
-
active: true,
|
|
172
|
-
readonly: definition.titleReadOnly,
|
|
173
|
-
onFinish: (d) => {titleElement.blur()}}}
|
|
174
|
-
bind:this={titleElement}>
|
|
175
|
-
{item[definition.titleAttrib]}
|
|
176
|
-
|
|
177
|
-
{#if definition.onOpen}
|
|
178
|
-
<button class="absolute top-1 right-0 w-5 h-5 sm:w-3 sm:h-3"
|
|
179
|
-
on:click={(e) => definition.onOpen(item)}>
|
|
180
|
-
<FaExternalLinkAlt/>
|
|
181
|
-
</button>
|
|
182
|
-
{/if}
|
|
183
|
-
</h3>
|
|
184
|
-
{:else}
|
|
185
|
-
<h3 class=" text-lg font-semibold min-h-[1.75rem]
|
|
186
|
-
sm:text-sm sm:font-semibold sm:min-h-[1.25rem]
|
|
187
|
-
whitespace-nowrap overflow-clip truncate w-full sm:flex-none
|
|
188
|
-
relative">
|
|
189
|
-
{item[definition.titleAttrib]}
|
|
190
|
-
|
|
191
|
-
</h3>
|
|
192
|
-
{/if}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
{#if $$slots.kanbanCardMiddleProps}
|
|
196
|
-
<section class="w-full flex flex-row">
|
|
197
|
-
<slot name="kanbanCardMiddleProps" element={item} />
|
|
198
|
-
</section>
|
|
199
|
-
{/if}
|
|
200
|
-
|
|
201
|
-
<Properties position={KanbanCardMiddle} {item} bind:this={middleProps}/>
|
|
202
|
-
|
|
203
|
-
{#if item[definition.summaryAttrib] || summaryPlaceholder}
|
|
204
|
-
{#key item[definition.summaryAttrib]}
|
|
205
|
-
{#if isCardActive}
|
|
206
|
-
<p class=" sm:text-xs sm:min-h-[1rem]
|
|
207
|
-
text-base min-h-[1.5rem]
|
|
208
|
-
text-stone-400
|
|
209
|
-
max-h-[75px] sm:max-h-[64px]
|
|
210
|
-
overflow-hidden"
|
|
211
|
-
use:editable={{
|
|
212
|
-
action: (text) => onSummaryChanged(text),
|
|
213
|
-
active: true,
|
|
214
|
-
readonly: definition.summaryReadOnly,
|
|
215
|
-
onFinish: (d) => {summaryPlaceholder = false}}}
|
|
216
|
-
bind:this={summaryElement}>
|
|
217
|
-
{item[definition.summaryAttrib]}
|
|
218
|
-
</p>
|
|
219
|
-
{:else}
|
|
220
|
-
<p class=" sm:text-xs sm:min-h-[1rem]
|
|
221
|
-
text-base min-h-[1.5rem]
|
|
222
|
-
text-stone-400
|
|
223
|
-
max-h-[75px] sm:max-h-[64px]
|
|
224
|
-
overflow-hidden">
|
|
225
|
-
{item[definition.summaryAttrib]}
|
|
226
|
-
</p>
|
|
227
|
-
{/if}
|
|
228
|
-
{/key}
|
|
229
|
-
{/if}
|
|
230
|
-
|
|
231
|
-
{#if $$slots.kanbanCardBottomProps}
|
|
232
|
-
<slot name="kanbanCardBottomProps" element={item} />
|
|
233
|
-
{/if}
|
|
234
|
-
|
|
235
|
-
<Properties position={KanbanCardBottom} {item} bind:this={bottomProps}/>
|
|
130
|
+
</script>
|
|
131
|
+
|
|
132
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
133
|
+
|
|
134
|
+
<li class="mx-2 pt-2 pb-4 px-1 rounded-md border border-transparent {selectedClass} {focusedClass} scroll-mt-[50px] sm:scroll-mt-[40px]"
|
|
135
|
+
class:cursor-pointer={!isCardActive}
|
|
136
|
+
on:click={activate}
|
|
137
|
+
use:selectable={item}
|
|
138
|
+
bind:this={card}>
|
|
139
|
+
|
|
140
|
+
<!-- -->
|
|
141
|
+
<!--section class="h-6 w-full flex flex-row ">
|
|
142
|
+
<button class="h-3 w-3"
|
|
143
|
+
class:hidden={!isCardActive}
|
|
144
|
+
on:click={(e) => showMoveOperations()}
|
|
145
|
+
bind:this={moveButton}>
|
|
146
|
+
<FaArrowsAlt/>
|
|
147
|
+
</button>
|
|
148
|
+
|
|
149
|
+
{#if $$slots.kanbanCardTopProps}
|
|
150
|
+
<div class="ml-auto flex flex-row gap-2">
|
|
151
|
+
<slot name="kanbanCardTopProps" element={item}/>
|
|
152
|
+
</div>
|
|
153
|
+
{/if}
|
|
154
|
+
</section-->
|
|
155
|
+
|
|
156
|
+
{#if $$slots.kanbanCardTopProps}
|
|
157
|
+
<section class="flex flex-row justify-between">
|
|
158
|
+
<slot name="kanbanCardTopProps" element={item}/>
|
|
159
|
+
</section>
|
|
160
|
+
{/if}
|
|
161
|
+
<Properties position={KanbanCardTop} {item} bind:this={topProps}/>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
{#if isCardActive}
|
|
165
|
+
<h3 class=" text-lg font-semibold min-h-[1.75rem]
|
|
166
|
+
sm:text-sm sm:font-semibold sm:min-h-[1.25rem]
|
|
167
|
+
whitespace-nowrap overflow-clip truncate w-full sm:flex-none
|
|
168
|
+
relative"
|
|
169
|
+
use:editable={{
|
|
170
|
+
action: (text) => onTitleChanged(text),
|
|
171
|
+
active: true,
|
|
172
|
+
readonly: definition.titleReadOnly,
|
|
173
|
+
onFinish: (d) => {titleElement.blur()}}}
|
|
174
|
+
bind:this={titleElement}>
|
|
175
|
+
{item[definition.titleAttrib]}
|
|
176
|
+
|
|
177
|
+
{#if definition.onOpen}
|
|
178
|
+
<button class="absolute top-1 right-0 w-5 h-5 sm:w-3 sm:h-3"
|
|
179
|
+
on:click={(e) => definition.onOpen(item)}>
|
|
180
|
+
<FaExternalLinkAlt/>
|
|
181
|
+
</button>
|
|
182
|
+
{/if}
|
|
183
|
+
</h3>
|
|
184
|
+
{:else}
|
|
185
|
+
<h3 class=" text-lg font-semibold min-h-[1.75rem]
|
|
186
|
+
sm:text-sm sm:font-semibold sm:min-h-[1.25rem]
|
|
187
|
+
whitespace-nowrap overflow-clip truncate w-full sm:flex-none
|
|
188
|
+
relative">
|
|
189
|
+
{item[definition.titleAttrib]}
|
|
190
|
+
|
|
191
|
+
</h3>
|
|
192
|
+
{/if}
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
{#if $$slots.kanbanCardMiddleProps}
|
|
196
|
+
<section class="w-full flex flex-row">
|
|
197
|
+
<slot name="kanbanCardMiddleProps" element={item} />
|
|
198
|
+
</section>
|
|
199
|
+
{/if}
|
|
200
|
+
|
|
201
|
+
<Properties position={KanbanCardMiddle} {item} bind:this={middleProps}/>
|
|
202
|
+
|
|
203
|
+
{#if item[definition.summaryAttrib] || summaryPlaceholder}
|
|
204
|
+
{#key item[definition.summaryAttrib]}
|
|
205
|
+
{#if isCardActive}
|
|
206
|
+
<p class=" sm:text-xs sm:min-h-[1rem]
|
|
207
|
+
text-base min-h-[1.5rem]
|
|
208
|
+
text-stone-400
|
|
209
|
+
max-h-[75px] sm:max-h-[64px]
|
|
210
|
+
overflow-hidden"
|
|
211
|
+
use:editable={{
|
|
212
|
+
action: (text) => onSummaryChanged(text),
|
|
213
|
+
active: true,
|
|
214
|
+
readonly: definition.summaryReadOnly,
|
|
215
|
+
onFinish: (d) => {summaryPlaceholder = false}}}
|
|
216
|
+
bind:this={summaryElement}>
|
|
217
|
+
{item[definition.summaryAttrib]}
|
|
218
|
+
</p>
|
|
219
|
+
{:else}
|
|
220
|
+
<p class=" sm:text-xs sm:min-h-[1rem]
|
|
221
|
+
text-base min-h-[1.5rem]
|
|
222
|
+
text-stone-400
|
|
223
|
+
max-h-[75px] sm:max-h-[64px]
|
|
224
|
+
overflow-hidden">
|
|
225
|
+
{item[definition.summaryAttrib]}
|
|
226
|
+
</p>
|
|
227
|
+
{/if}
|
|
228
|
+
{/key}
|
|
229
|
+
{/if}
|
|
230
|
+
|
|
231
|
+
{#if $$slots.kanbanCardBottomProps}
|
|
232
|
+
<slot name="kanbanCardBottomProps" element={item} />
|
|
233
|
+
{/if}
|
|
234
|
+
|
|
235
|
+
<Properties position={KanbanCardBottom} {item} bind:this={bottomProps}/>
|
|
236
236
|
</li>
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
item: object;
|
|
5
|
-
activate?: ((e: any) => void) | undefined;
|
|
6
|
-
_scrollViewToCard?: (() => void) | undefined;
|
|
7
|
-
editProperty?: ((field: string) => Promise<void>) | undefined;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
kanbanCardTopProps: {
|
|
14
|
-
element: object;
|
|
15
|
-
};
|
|
16
|
-
kanbanCardMiddleProps: {
|
|
17
|
-
element: object;
|
|
18
|
-
};
|
|
19
|
-
kanbanCardBottomProps: {
|
|
20
|
-
element: object;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export type KanbanProps = typeof __propDef.props;
|
|
25
|
-
export type KanbanEvents = typeof __propDef.events;
|
|
26
|
-
export type KanbanSlots = typeof __propDef.slots;
|
|
27
|
-
export default class Kanban extends SvelteComponentTyped<KanbanProps, KanbanEvents, KanbanSlots> {
|
|
28
|
-
get activate(): (e: any) => void;
|
|
29
|
-
get _scrollViewToCard(): () => void;
|
|
30
|
-
get editProperty(): (field: string) => Promise<void>;
|
|
31
|
-
}
|
|
32
|
-
export {};
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
item: object;
|
|
5
|
+
activate?: ((e: any) => void) | undefined;
|
|
6
|
+
_scrollViewToCard?: (() => void) | undefined;
|
|
7
|
+
editProperty?: ((field: string) => Promise<void>) | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {
|
|
13
|
+
kanbanCardTopProps: {
|
|
14
|
+
element: object;
|
|
15
|
+
};
|
|
16
|
+
kanbanCardMiddleProps: {
|
|
17
|
+
element: object;
|
|
18
|
+
};
|
|
19
|
+
kanbanCardBottomProps: {
|
|
20
|
+
element: object;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export type KanbanProps = typeof __propDef.props;
|
|
25
|
+
export type KanbanEvents = typeof __propDef.events;
|
|
26
|
+
export type KanbanSlots = typeof __propDef.slots;
|
|
27
|
+
export default class Kanban extends SvelteComponentTyped<KanbanProps, KanbanEvents, KanbanSlots> {
|
|
28
|
+
get activate(): (e: any) => void;
|
|
29
|
+
get _scrollViewToCard(): () => void;
|
|
30
|
+
get editProperty(): (field: string) => Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -99,7 +99,10 @@ let lastActivatedElement = null;
|
|
|
99
99
|
export async function add(after = KanbanColumnTop) {
|
|
100
100
|
if (!definition.onAdd)
|
|
101
101
|
return;
|
|
102
|
-
|
|
102
|
+
if (after === KanbanColumnTop || after === KanbanColumnBottom)
|
|
103
|
+
showInserterAfterId = after;
|
|
104
|
+
else
|
|
105
|
+
showInserterAfterId = after.Id;
|
|
103
106
|
if (activateAfterDomUpdate)
|
|
104
107
|
activateAfterDomUpdate = null;
|
|
105
108
|
lastActivatedElement = getActive("props");
|
|
@@ -144,7 +147,7 @@ function onTitleChanged(text) {
|
|
|
144
147
|
if (columnDef.onTitleChanged)
|
|
145
148
|
columnDef.onTitleChanged(text);
|
|
146
149
|
}
|
|
147
|
-
let
|
|
150
|
+
let headerElement;
|
|
148
151
|
export function activate(e) {
|
|
149
152
|
if (e)
|
|
150
153
|
e.stopPropagation();
|
|
@@ -154,72 +157,84 @@ export function activate(e) {
|
|
|
154
157
|
return;
|
|
155
158
|
}
|
|
156
159
|
activateItem("props", columnDef, columnDef.operations);
|
|
157
|
-
|
|
160
|
+
if (!e)
|
|
161
|
+
headerElement?.scrollIntoView(
|
|
162
|
+
{
|
|
163
|
+
block: "nearest",
|
|
164
|
+
inline: "nearest"
|
|
165
|
+
}
|
|
166
|
+
);
|
|
158
167
|
}
|
|
159
|
-
</script>
|
|
160
|
-
|
|
161
|
-
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
162
|
-
|
|
163
|
-
<section class="snap-center
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
<
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
bind:this={
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
<
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
168
|
+
</script>
|
|
169
|
+
|
|
170
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
171
|
+
|
|
172
|
+
<section class=" snap-center
|
|
173
|
+
sm:snap-align-none
|
|
174
|
+
flex-none sm:flex-1
|
|
175
|
+
sm:min-w-[180px] sm:max-w-[240px]
|
|
176
|
+
sm:min-h-[calc(100vh-8rem)]
|
|
177
|
+
min-h-[calc(100vh-5rem)]
|
|
178
|
+
rounded-md border border-transparent
|
|
179
|
+
{width_class} {selected_class} {focused_class}"
|
|
180
|
+
use:selectable={columnDef}
|
|
181
|
+
on:click={activate}>
|
|
182
|
+
<header class:cursor-pointer={!is_row_active && columnDef.operations} bind:this={headerElement}>
|
|
183
|
+
<h2 class="mt-2 mb-2 text-lg sm:text-xs uppercase w-full min-h-[1rem] text-center whitespace-nowrap relative">
|
|
184
|
+
<span
|
|
185
|
+
use:editable={{
|
|
186
|
+
action: (text) => onTitleChanged(text),
|
|
187
|
+
active: false
|
|
188
|
+
}}
|
|
189
|
+
bind:this={titleElement}>
|
|
190
|
+
{columnDef.title}
|
|
191
|
+
</span>
|
|
192
|
+
|
|
193
|
+
{#if columnDef.finishing}
|
|
194
|
+
<div class="inline-block text-green-600 h-3 w-3 ml-2">
|
|
195
|
+
<FaCheck/>
|
|
196
|
+
</div>
|
|
197
|
+
{/if}
|
|
198
|
+
<!--button class="absolute right-2 w-4 sm:w-2.5"
|
|
199
|
+
on:click|stopPropagation={(e) => add(KanbanColumnTop)}>
|
|
200
|
+
<FaPlus/>
|
|
201
|
+
</button-->
|
|
202
|
+
</h2>
|
|
203
|
+
</header>
|
|
204
|
+
<ul class="w-full border-stone-700 pb-20" bind:this={column_element}>
|
|
205
|
+
{#if showInserterAfterId === KanbanColumnTop}
|
|
206
|
+
<Inserter onInsert={async (text) => {await onInsert(currentColumnIdx, text, KanbanColumnTop)}}
|
|
207
|
+
bind:this={inserter} />
|
|
208
|
+
{/if}
|
|
209
|
+
|
|
210
|
+
{#if column_items && column_items.length > 0}
|
|
211
|
+
{#each column_items as element, item_idx (getItemKey(element))}
|
|
212
|
+
<Card item={element}
|
|
213
|
+
bind:this={cards[item_idx]}>
|
|
214
|
+
<svelte:fragment slot="kanbanCardTopProps" let:element>
|
|
215
|
+
<slot name="kanbanCardTopProps" {element}/>
|
|
216
|
+
</svelte:fragment>
|
|
217
|
+
|
|
218
|
+
<svelte:fragment slot="kanbanCardMiddleProps" let:element>
|
|
219
|
+
<slot name="kanbanCardMiddleProps" {element}/>
|
|
220
|
+
</svelte:fragment>
|
|
221
|
+
|
|
222
|
+
<svelte:fragment slot="kanbanCardBottomProps" let:element>
|
|
223
|
+
<slot name="kanbanCardBottomProps" {element}/>
|
|
224
|
+
</svelte:fragment>
|
|
225
|
+
</Card>
|
|
226
|
+
|
|
227
|
+
{#if showInserterAfterId == element.Id}
|
|
228
|
+
<Inserter onInsert={async (text) => {await onInsert(currentColumnIdx, text, showInserterAfterId)}}
|
|
229
|
+
bind:this={inserter} />
|
|
230
|
+
{/if}
|
|
231
|
+
{/each}
|
|
232
|
+
{/if}
|
|
233
|
+
|
|
234
|
+
{#if showInserterAfterId === KanbanColumnBottom}
|
|
235
|
+
<Inserter onInsert={async (text) => {await onInsert(currentColumnIdx, text, KanbanColumnBottom)}}
|
|
236
|
+
bind:this={inserter} />
|
|
237
|
+
{/if}
|
|
238
|
+
|
|
239
|
+
</ul>
|
|
225
240
|
</section>
|