@humandialog/forms.svelte 0.4.45 → 0.5.2
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/components/Fab.svelte +60 -48
- package/components/Floating_container.svelte +5 -4
- package/components/Floating_container.svelte.d.ts +2 -2
- package/components/Grid.menu.svelte +13 -9
- package/components/Grid.menu.svelte.d.ts +2 -2
- package/components/button.svelte +4 -4
- package/components/checkbox.svelte +12 -10
- package/components/checkbox.svelte.d.ts +1 -0
- package/components/combo/combo.d.ts +1 -1
- package/components/combo/combo.js +1 -1
- package/components/combo/combo.source.svelte +2 -2
- package/components/combo/combo.source.svelte.d.ts +1 -1
- package/components/combo/combo.svelte +92 -61
- package/components/combo/combo.svelte.d.ts +7 -4
- package/components/contextmenu.svelte +20 -19
- package/components/contextmenu.svelte.d.ts +5 -5
- package/components/date.svelte +40 -25
- package/components/date.svelte.d.ts +3 -2
- package/components/delayed.spinner.svelte +2 -2
- package/components/document/internal/palette.row.svelte +3 -3
- package/components/document/internal/palette.svelte +2 -2
- package/components/document/internal/palette.svelte.d.ts +1 -1
- package/components/document/rich.edit.svelte +307 -35
- package/components/document/rich.edit.svelte.d.ts +9 -0
- package/components/edit.field.svelte +17 -15
- package/components/edit.field.svelte.d.ts +2 -1
- package/components/file.loader.svelte +6 -6
- package/components/file.loader.svelte.d.ts +10 -10
- package/components/icon.svelte +2 -2
- package/components/icon.svelte.d.ts +3 -3
- package/components/input.text.svelte +3 -3
- package/components/inputbox.ltop.svelte +19 -17
- package/components/inputbox.ltop.svelte.d.ts +4 -2
- package/components/kanban/Kanban.d.ts +23 -0
- package/components/kanban/Kanban.js +23 -0
- package/components/kanban/internal/kanban.card.svelte +158 -0
- package/components/kanban/internal/kanban.card.svelte.d.ts +35 -0
- package/components/kanban/internal/kanban.column.svelte +181 -0
- package/components/kanban/internal/kanban.column.svelte.d.ts +51 -0
- package/components/kanban/internal/kanban.inserter.svelte +24 -0
- package/components/kanban/internal/kanban.inserter.svelte.d.ts +18 -0
- package/components/kanban/internal/kanban.move.menu.svelte +146 -0
- package/components/kanban/internal/kanban.move.menu.svelte.d.ts +19 -0
- package/components/kanban/kanban.callbacks.svelte +15 -0
- package/components/kanban/kanban.callbacks.svelte.d.ts +21 -0
- package/components/kanban/kanban.column.svelte +20 -0
- package/components/kanban/kanban.column.svelte.d.ts +21 -0
- package/components/kanban/kanban.summary.svelte +5 -0
- package/components/kanban/kanban.summary.svelte.d.ts +16 -0
- package/components/kanban/kanban.svelte +156 -0
- package/components/kanban/kanban.svelte.d.ts +43 -0
- package/components/kanban/kanban.title.svelte +8 -0
- package/components/kanban/kanban.title.svelte.d.ts +17 -0
- package/components/list/List.d.ts +4 -2
- package/components/list/List.js +4 -2
- package/components/list/internal/list.element.props.svelte +7 -8
- package/components/list/internal/list.element.props.svelte.d.ts +2 -2
- package/components/list/internal/list.element.summary.svelte +4 -4
- package/components/list/internal/list.element.summary.svelte.d.ts +1 -1
- package/components/list/internal/list.element.svelte +61 -49
- package/components/list/internal/list.element.svelte.d.ts +4 -4
- package/components/list/internal/list.inserter.svelte +9 -6
- package/components/list/internal/list.inserter.svelte.d.ts +1 -1
- package/components/list/list.combo.svelte +2 -2
- package/components/list/list.combo.svelte.d.ts +1 -1
- package/components/list/list.date.svelte +2 -2
- package/components/list/list.date.svelte.d.ts +1 -1
- package/components/list/list.inserter.svelte +1 -1
- package/components/list/list.summary.svelte +2 -2
- package/components/list/list.summary.svelte.d.ts +1 -1
- package/components/list/list.svelte +173 -35
- package/components/list/list.svelte.d.ts +27 -10
- package/components/list/list.title.svelte +6 -2
- package/components/list/list.title.svelte.d.ts +3 -1
- package/components/menu.d.ts +4 -4
- package/components/menu.js +15 -13
- package/components/radio.svelte +12 -10
- package/components/radio.svelte.d.ts +1 -0
- package/components/sidebar/sidebar.group.svelte +1 -13
- package/components/sidebar/sidebar.group.svelte.d.ts +0 -4
- package/components/sidebar/sidebar.item.svelte +13 -13
- package/components/sidebar/sidebar.list.svelte +68 -0
- package/components/sidebar/sidebar.list.svelte.d.ts +33 -0
- package/components/sidebar/sidebar.svelte +1 -1
- package/components/simple.table.svelte +15 -15
- package/components/simple.table.svelte.d.ts +2 -2
- package/components/table/_template.table.svelte +17 -17
- package/components/table/_template.table.svelte.d.ts +2 -2
- package/components/table/table.svelte +31 -31
- package/components/table/table.svelte.d.ts +8 -8
- package/components/textarea.ltop.svelte +4 -4
- package/components/tile.title.svelte +6 -6
- package/desk.svelte +13 -13
- package/form.box.svelte +2 -2
- package/horizontal.toolbar.svelte +28 -19
- package/horizontal.toolbar.svelte.d.ts +2 -2
- package/index.d.ts +14 -5
- package/index.js +14 -5
- package/modal.svelte +17 -17
- package/modal.svelte.d.ts +4 -4
- package/operations.svelte +42 -27
- package/package.json +13 -2
- package/page.svelte +115 -124
- package/page.svelte.d.ts +4 -4
- package/stores.d.ts +9 -7
- package/stores.js +17 -9
- package/tenant.members.svelte +44 -44
- package/tenant.members.svelte.d.ts +10 -10
- package/tile.svelte +3 -3
- package/tiles.vertical.row.svelte +1 -1
- package/updates.d.ts +3 -3
- package/updates.js +35 -3
- package/utils.d.ts +22 -13
- package/utils.js +198 -50
- package/vertical.toolbar.svelte +26 -17
- package/vertical.toolbar.svelte.d.ts +2 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
onInsert: any;
|
|
5
|
+
run?: ((onclose: any) => void) | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
};
|
|
12
|
+
export type KanbanProps = typeof __propDef.props;
|
|
13
|
+
export type KanbanEvents = typeof __propDef.events;
|
|
14
|
+
export type KanbanSlots = typeof __propDef.slots;
|
|
15
|
+
export default class Kanban extends SvelteComponentTyped<KanbanProps, KanbanEvents, KanbanSlots> {
|
|
16
|
+
get run(): (onclose: any) => void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<script>import { FaAngleUp, FaAngleDown, FaAngleDoubleUp, FaAngleDoubleDown } from "svelte-icons/fa";
|
|
2
|
+
import { KanbanColumnTop, KanbanColumnBottom, rKanban_definition } from "../Kanban";
|
|
3
|
+
export let definition;
|
|
4
|
+
export let item;
|
|
5
|
+
export let afterActionOperation = void 0;
|
|
6
|
+
function replaceMenu() {
|
|
7
|
+
if (afterActionOperation)
|
|
8
|
+
setTimeout(() => {
|
|
9
|
+
afterActionOperation(item);
|
|
10
|
+
}, 0);
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
15
|
+
|
|
16
|
+
<menu class="hidden sm:flex flex-row gap-3">
|
|
17
|
+
<section class="flex flex-col gap-1">
|
|
18
|
+
<p class="text-xs h-4 w-[100px] truncate"></p>
|
|
19
|
+
<button class=" h-8 w-full
|
|
20
|
+
text-xs font-medium text-stone-900 dark:text-stone-400 dark:hover:text-white
|
|
21
|
+
bg-stone-100 hover:bg-stone-200 dark:bg-stone-800 dark:hover:bg-stone-700 active:bg-stone-300 dark:active:bg-stone-600
|
|
22
|
+
border rounded border-stone-200 dark:border-stone-600 focus:outline-none
|
|
23
|
+
inline-flex items-center justify-center"
|
|
24
|
+
on:click={(e) => { definition.onUp(item); replaceMenu()}}>
|
|
25
|
+
<div class="w-3 h-3"><FaAngleUp/></div>
|
|
26
|
+
</button>
|
|
27
|
+
|
|
28
|
+
<button class=" h-8 w-full
|
|
29
|
+
text-xs font-medium text-stone-900 dark:text-stone-400 dark:hover:text-white
|
|
30
|
+
bg-stone-100 hover:bg-stone-200 dark:bg-stone-800 dark:hover:bg-stone-700 active:bg-stone-300 dark:active:bg-stone-600
|
|
31
|
+
border rounded border-stone-200 dark:border-stone-600 focus:outline-none
|
|
32
|
+
inline-flex items-center justify-center"
|
|
33
|
+
on:click={(e) => { definition.onDown(item); replaceMenu()}}>
|
|
34
|
+
<div class="w-3 h-3"><FaAngleDown/></div>
|
|
35
|
+
</button>
|
|
36
|
+
</section>
|
|
37
|
+
|
|
38
|
+
{#if definition && definition.columns && definition.columns.length > 0}
|
|
39
|
+
{#each definition.columns as column, idx}
|
|
40
|
+
<section class="flex flex-col gap-1">
|
|
41
|
+
<p class="text-xs h-4 w-[100px] ml-1 truncate">{column.title}</p>
|
|
42
|
+
<button class=" h-8 w-full
|
|
43
|
+
text-base font-medium text-stone-900 dark:text-stone-400 dark:hover:text-white
|
|
44
|
+
bg-stone-100 hover:bg-stone-200 dark:bg-stone-800 dark:hover:bg-stone-700 active:bg-stone-300 dark:active:bg-stone-600
|
|
45
|
+
border rounded border-stone-200 dark:border-stone-600 focus:outline-none
|
|
46
|
+
inline-flex items-center justify-center"
|
|
47
|
+
on:click={(e) => { definition.onReplace(item, idx, KanbanColumnTop); replaceMenu()}}>
|
|
48
|
+
<div class="w-3 h-3"><FaAngleDoubleUp/></div>
|
|
49
|
+
</button>
|
|
50
|
+
|
|
51
|
+
<button class=" h-8 w-full
|
|
52
|
+
text-base font-medium text-stone-900 dark:text-stone-400 dark:hover:text-white
|
|
53
|
+
bg-stone-100 hover:bg-stone-200 dark:bg-stone-800 dark:hover:bg-stone-700 active:bg-stone-300 dark:active:bg-stone-600
|
|
54
|
+
border rounded border-stone-200 dark:border-stone-600 focus:outline-none
|
|
55
|
+
inline-flex items-center justify-center"
|
|
56
|
+
on:click={(e) => { definition.onReplace(item, idx, KanbanColumnBottom); replaceMenu()}}>
|
|
57
|
+
<div class="w-3 h-3"><FaAngleDoubleDown/></div>
|
|
58
|
+
</button>
|
|
59
|
+
</section>
|
|
60
|
+
{/each}
|
|
61
|
+
{/if}
|
|
62
|
+
</menu>
|
|
63
|
+
|
|
64
|
+
<menu class="flex sm:hidden flex-col gap-3">
|
|
65
|
+
<section class="flex flex-row">
|
|
66
|
+
<p class="text-base truncate "></p>
|
|
67
|
+
<div class="flex flex-row ml-auto gap-3">
|
|
68
|
+
<button class=" bg-transparent
|
|
69
|
+
w-[55px] h-[55px]
|
|
70
|
+
m-0
|
|
71
|
+
flex items-center justify-center
|
|
72
|
+
disable-dbl-tap-zoom"
|
|
73
|
+
on:click={(e) => { definition.onUp(item); replaceMenu()}}>
|
|
74
|
+
<div class=" w-10 h-10
|
|
75
|
+
text-white bg-zinc-500 hover:bg-zinc-500
|
|
76
|
+
font-medium rounded-full text-sm text-center shadow-md
|
|
77
|
+
dark:bg-zinc-500 dark:hover:bg-zinc-500
|
|
78
|
+
flex items-center justify-center">
|
|
79
|
+
<div class="w-5 h-5">
|
|
80
|
+
<FaAngleUp/>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</button>
|
|
84
|
+
|
|
85
|
+
<button class=" bg-transparent
|
|
86
|
+
w-[55px] h-[55px]
|
|
87
|
+
m-0
|
|
88
|
+
flex items-center justify-center
|
|
89
|
+
disable-dbl-tap-zoom"
|
|
90
|
+
on:click={(e) => { definition.onDown(item); replaceMenu()}}>
|
|
91
|
+
<div class=" w-10 h-10
|
|
92
|
+
text-white bg-zinc-500 hover:bg-zinc-500
|
|
93
|
+
font-medium rounded-full text-sm text-center shadow-md
|
|
94
|
+
dark:bg-zinc-500 dark:hover:bg-zinc-500
|
|
95
|
+
flex items-center justify-center">
|
|
96
|
+
<div class="w-5 h-5">
|
|
97
|
+
<FaAngleDown/>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</button>
|
|
101
|
+
</div>
|
|
102
|
+
</section>
|
|
103
|
+
|
|
104
|
+
{#if definition && definition.columns && definition.columns.length > 0}
|
|
105
|
+
{#each definition.columns as column, idx}
|
|
106
|
+
<section class="flex flex-row">
|
|
107
|
+
<p class="text-base mt-4 truncate w-[120px]">{column.title}</p>
|
|
108
|
+
<div class="flex flex-row ml-auto gap-3">
|
|
109
|
+
<button class=" bg-transparent
|
|
110
|
+
w-[55px] h-[55px]
|
|
111
|
+
m-0
|
|
112
|
+
flex items-center justify-center
|
|
113
|
+
disable-dbl-tap-zoom"
|
|
114
|
+
on:click={(e) => { definition.onReplace(item, idx, KanbanColumnTop); replaceMenu()}}>
|
|
115
|
+
<div class=" w-10 h-10
|
|
116
|
+
text-white bg-zinc-500 hover:bg-zinc-500
|
|
117
|
+
font-medium rounded-full text-sm text-center shadow-md
|
|
118
|
+
dark:bg-zinc-500 dark:hover:bg-zinc-500
|
|
119
|
+
flex items-center justify-center">
|
|
120
|
+
<div class="w-5 h-5">
|
|
121
|
+
<FaAngleDoubleUp/>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</button>
|
|
125
|
+
|
|
126
|
+
<button class=" bg-transparent
|
|
127
|
+
w-[55px] h-[55px]
|
|
128
|
+
m-0
|
|
129
|
+
flex items-center justify-center
|
|
130
|
+
disable-dbl-tap-zoom"
|
|
131
|
+
on:click={(e) => { definition.onReplace(item, idx, KanbanColumnBottom); replaceMenu()}}>
|
|
132
|
+
<div class=" w-10 h-10
|
|
133
|
+
text-white bg-zinc-500 hover:bg-zinc-500
|
|
134
|
+
font-medium rounded-full text-sm text-center shadow-md
|
|
135
|
+
dark:bg-zinc-500 dark:hover:bg-zinc-500
|
|
136
|
+
flex items-center justify-center">
|
|
137
|
+
<div class="w-5 h-5">
|
|
138
|
+
<FaAngleDoubleDown/>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
</button>
|
|
142
|
+
</div>
|
|
143
|
+
</section>
|
|
144
|
+
{/each}
|
|
145
|
+
{/if}
|
|
146
|
+
</menu>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { rKanban_definition } from '../Kanban';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
definition: rKanban_definition;
|
|
6
|
+
item: object;
|
|
7
|
+
afterActionOperation?: Function | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export type KanbanProps = typeof __propDef.props;
|
|
15
|
+
export type KanbanEvents = typeof __propDef.events;
|
|
16
|
+
export type KanbanSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Kanban extends SvelteComponentTyped<KanbanProps, KanbanEvents, KanbanSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script>import { getContext } from "svelte";
|
|
2
|
+
export let onUp = void 0;
|
|
3
|
+
export let onDown = void 0;
|
|
4
|
+
export let onAdd = void 0;
|
|
5
|
+
export let onRemove = void 0;
|
|
6
|
+
export let onReplace = void 0;
|
|
7
|
+
export let onOpen = void 0;
|
|
8
|
+
let definition = getContext("rKanban-definition");
|
|
9
|
+
definition.onUp = onUp;
|
|
10
|
+
definition.onDown = onDown;
|
|
11
|
+
definition.onAdd = onAdd;
|
|
12
|
+
definition.onRemove = onRemove;
|
|
13
|
+
definition.onReplace = onReplace;
|
|
14
|
+
definition.onOpen = onOpen;
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
onUp?: Function | undefined;
|
|
5
|
+
onDown?: Function | undefined;
|
|
6
|
+
onAdd?: Function | undefined;
|
|
7
|
+
onRemove?: Function | undefined;
|
|
8
|
+
onReplace?: Function | undefined;
|
|
9
|
+
onOpen?: Function | undefined;
|
|
10
|
+
};
|
|
11
|
+
events: {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
};
|
|
14
|
+
slots: {};
|
|
15
|
+
};
|
|
16
|
+
export type KanbanProps = typeof __propDef.props;
|
|
17
|
+
export type KanbanEvents = typeof __propDef.events;
|
|
18
|
+
export type KanbanSlots = typeof __propDef.slots;
|
|
19
|
+
export default class Kanban extends SvelteComponentTyped<KanbanProps, KanbanEvents, KanbanSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script>import { getContext } from "svelte";
|
|
2
|
+
import { rKanban_column } from "./Kanban";
|
|
3
|
+
export let title = "";
|
|
4
|
+
export let width = "w-[240px]";
|
|
5
|
+
export let self = void 0;
|
|
6
|
+
export let a = "";
|
|
7
|
+
export let objects = void 0;
|
|
8
|
+
export let context = "";
|
|
9
|
+
let definition = getContext("rKanban-definition");
|
|
10
|
+
let column = new rKanban_column();
|
|
11
|
+
column.id = definition.columns.length + 1;
|
|
12
|
+
column.title = title;
|
|
13
|
+
column.width = width;
|
|
14
|
+
column.self = self;
|
|
15
|
+
column.a = a;
|
|
16
|
+
column.objects = objects;
|
|
17
|
+
column.context = context;
|
|
18
|
+
definition.columns.push(column);
|
|
19
|
+
</script>
|
|
20
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
width?: string | undefined;
|
|
6
|
+
self?: object | undefined;
|
|
7
|
+
a?: string | undefined;
|
|
8
|
+
objects?: object[] | undefined;
|
|
9
|
+
context?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
events: {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
};
|
|
14
|
+
slots: {};
|
|
15
|
+
};
|
|
16
|
+
export type KanbanProps = typeof __propDef.props;
|
|
17
|
+
export type KanbanEvents = typeof __propDef.events;
|
|
18
|
+
export type KanbanSlots = typeof __propDef.slots;
|
|
19
|
+
export default class Kanban extends SvelteComponentTyped<KanbanProps, KanbanEvents, KanbanSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
a: string;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {};
|
|
10
|
+
};
|
|
11
|
+
export type KanbanProps = typeof __propDef.props;
|
|
12
|
+
export type KanbanEvents = typeof __propDef.events;
|
|
13
|
+
export type KanbanSlots = typeof __propDef.slots;
|
|
14
|
+
export default class Kanban extends SvelteComponentTyped<KanbanProps, KanbanEvents, KanbanSlots> {
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<script>import { setContext, getContext, afterUpdate } from "svelte";
|
|
2
|
+
import { rKanban_definition } from "./Kanban";
|
|
3
|
+
import { parseWidthDirective, clearActiveItem } from "../../utils";
|
|
4
|
+
import { data_tick_store, contextItemsStore, contextTypesStore } from "../../stores";
|
|
5
|
+
import Column from "./internal/kanban.column.svelte";
|
|
6
|
+
export let title = "";
|
|
7
|
+
export let self = void 0;
|
|
8
|
+
export let context = "";
|
|
9
|
+
export let typename = "";
|
|
10
|
+
export let c = "";
|
|
11
|
+
export let key = "";
|
|
12
|
+
let user_class = $$props.class ?? "";
|
|
13
|
+
let definition = new rKanban_definition();
|
|
14
|
+
setContext("rKanban-definition", definition);
|
|
15
|
+
setContext("rIs-table-component", true);
|
|
16
|
+
let item = null;
|
|
17
|
+
let ctx = context ? context : getContext("ctx");
|
|
18
|
+
let cs = c ? parseWidthDirective(c) : "w-full min-w-full";
|
|
19
|
+
clearActiveItem("props");
|
|
20
|
+
let last_tick = -1;
|
|
21
|
+
$:
|
|
22
|
+
setup($data_tick_store, $contextItemsStore);
|
|
23
|
+
function setup(...args) {
|
|
24
|
+
last_tick = $data_tick_store;
|
|
25
|
+
if (self && ctx)
|
|
26
|
+
$contextItemsStore[ctx] = self;
|
|
27
|
+
if (!typename)
|
|
28
|
+
typename = $contextTypesStore[ctx];
|
|
29
|
+
}
|
|
30
|
+
export function refresh() {
|
|
31
|
+
setup();
|
|
32
|
+
}
|
|
33
|
+
export function updateSelf(_self) {
|
|
34
|
+
self = _self;
|
|
35
|
+
setup();
|
|
36
|
+
}
|
|
37
|
+
export function getColumnIdx(item2) {
|
|
38
|
+
for (let idx = 0; idx < columns.length; idx++) {
|
|
39
|
+
let card = columns[idx].findCardByItem(item2);
|
|
40
|
+
if (card)
|
|
41
|
+
return idx;
|
|
42
|
+
}
|
|
43
|
+
return -1;
|
|
44
|
+
}
|
|
45
|
+
let columns = [];
|
|
46
|
+
afterUpdate(() => {
|
|
47
|
+
for (let i = 1; i < columns.length; i++) {
|
|
48
|
+
let left_column = columns[i - 1];
|
|
49
|
+
let right_column = columns[i];
|
|
50
|
+
const left_column_height = left_column.getHeight();
|
|
51
|
+
const right_column_height = right_column.getHeight();
|
|
52
|
+
if (left_column_height > right_column_height) {
|
|
53
|
+
left_column.setBorder(left_column.SET_RIGHT);
|
|
54
|
+
right_column.setBorder(right_column.CLEAR_LEFT);
|
|
55
|
+
} else {
|
|
56
|
+
left_column.setBorder(left_column.CLEAR_RIGHT);
|
|
57
|
+
right_column.setBorder(right_column.SET_LEFT);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
export function showMoveOperationsForItem(item2) {
|
|
62
|
+
columns.forEach((c2) => {
|
|
63
|
+
const card = c2.findCardByItem(item2);
|
|
64
|
+
if (card)
|
|
65
|
+
card.showMoveOperations();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
export function scrollViewToCard(item2) {
|
|
69
|
+
columns.forEach((c2) => {
|
|
70
|
+
const card = c2.findCardByItem(item2);
|
|
71
|
+
if (card)
|
|
72
|
+
card._scrollViewToCard();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<slot/> <!-- Launch definition settings -->
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<section class="h-full mt-5 flex flex-row no-wrap sm:justify-center overflow-x-auto {user_class}">
|
|
81
|
+
{#each definition.columns as column, idx (column.id)}
|
|
82
|
+
<Column title={column.title}
|
|
83
|
+
width={column.width}
|
|
84
|
+
self={column.self}
|
|
85
|
+
a={column.a}
|
|
86
|
+
objects={column.objects}
|
|
87
|
+
context={column.context}
|
|
88
|
+
key={key}
|
|
89
|
+
currentColumnIdx={idx}
|
|
90
|
+
{showMoveOperationsForItem}
|
|
91
|
+
{scrollViewToCard}
|
|
92
|
+
bind:this={columns[idx]}>
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<svelte:fragment slot="kanbanCardTopProps" let:element>
|
|
96
|
+
<slot name="kanbanCardTopProps" {element}/>
|
|
97
|
+
</svelte:fragment>
|
|
98
|
+
|
|
99
|
+
<svelte:fragment slot="kanbanCardMiddleProps" let:element>
|
|
100
|
+
<slot name="kanbanCardMiddleProps" {element}/>
|
|
101
|
+
</svelte:fragment>
|
|
102
|
+
|
|
103
|
+
<svelte:fragment slot="kanbanCardBottomProps" let:element>
|
|
104
|
+
<slot name="kanbanCardBottomProps" {element}/>
|
|
105
|
+
</svelte:fragment>
|
|
106
|
+
|
|
107
|
+
</Column>
|
|
108
|
+
{/each}
|
|
109
|
+
</section>
|
|
110
|
+
|
|
111
|
+
<style>
|
|
112
|
+
.grid-1
|
|
113
|
+
{
|
|
114
|
+
display: grid;
|
|
115
|
+
grid-template-columns: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.grid-2
|
|
119
|
+
{
|
|
120
|
+
display: grid;
|
|
121
|
+
grid-template-columns: 50% 50%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.grid-3
|
|
125
|
+
{
|
|
126
|
+
display: grid;
|
|
127
|
+
grid-template-columns: 33% 33% 33%;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.grid-4
|
|
131
|
+
{
|
|
132
|
+
display: grid;
|
|
133
|
+
grid-template-columns: 25% 25% 25% 25%;
|
|
134
|
+
}
|
|
135
|
+
.grid-5
|
|
136
|
+
{
|
|
137
|
+
display: grid;
|
|
138
|
+
grid-template-columns: 20% 20% 20% 20% 20%;
|
|
139
|
+
}
|
|
140
|
+
.grid-6
|
|
141
|
+
{
|
|
142
|
+
display: grid;
|
|
143
|
+
grid-template-columns: 16.6% 16.6% 16.6% 16.6% 16.6% 16.6;
|
|
144
|
+
}
|
|
145
|
+
.grid-7
|
|
146
|
+
{
|
|
147
|
+
display: grid;
|
|
148
|
+
grid-template-columns: 14.3% 14.3% 14.3% 14.3% 14.3% 14.3% 14.3%;
|
|
149
|
+
}
|
|
150
|
+
.grid-8
|
|
151
|
+
{
|
|
152
|
+
display: grid;
|
|
153
|
+
grid-template-columns: 12.5% 12.5% 12.5% 12.5% 12.5% 12.5% 12.5% 12.5%;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
self?: object | undefined;
|
|
7
|
+
context?: string | undefined;
|
|
8
|
+
typename?: string | undefined;
|
|
9
|
+
c?: string | undefined;
|
|
10
|
+
key?: string | undefined;
|
|
11
|
+
refresh?: (() => void) | undefined;
|
|
12
|
+
updateSelf?: ((_self: object) => void) | undefined;
|
|
13
|
+
getColumnIdx?: ((item: any) => number) | undefined;
|
|
14
|
+
showMoveOperationsForItem?: ((item: any) => void) | undefined;
|
|
15
|
+
scrollViewToCard?: ((item: any) => void) | undefined;
|
|
16
|
+
};
|
|
17
|
+
events: {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
};
|
|
20
|
+
slots: {
|
|
21
|
+
default: {};
|
|
22
|
+
kanbanCardTopProps: {
|
|
23
|
+
element: object;
|
|
24
|
+
};
|
|
25
|
+
kanbanCardMiddleProps: {
|
|
26
|
+
element: object;
|
|
27
|
+
};
|
|
28
|
+
kanbanCardBottomProps: {
|
|
29
|
+
element: object;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type KanbanProps = typeof __propDef.props;
|
|
34
|
+
export type KanbanEvents = typeof __propDef.events;
|
|
35
|
+
export type KanbanSlots = typeof __propDef.slots;
|
|
36
|
+
export default class Kanban extends SvelteComponentTyped<KanbanProps, KanbanEvents, KanbanSlots> {
|
|
37
|
+
get refresh(): () => void;
|
|
38
|
+
get updateSelf(): (_self: object) => void;
|
|
39
|
+
get getColumnIdx(): (item: any) => number;
|
|
40
|
+
get showMoveOperationsForItem(): (item: any) => void;
|
|
41
|
+
get scrollViewToCard(): (item: any) => void;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
a: string;
|
|
5
|
+
onChange?: Function | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
};
|
|
12
|
+
export type KanbanProps = typeof __propDef.props;
|
|
13
|
+
export type KanbanEvents = typeof __propDef.events;
|
|
14
|
+
export type KanbanSlots = typeof __propDef.slots;
|
|
15
|
+
export default class Kanban extends SvelteComponentTyped<KanbanProps, KanbanEvents, KanbanSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -11,7 +11,7 @@ export declare class rList_property {
|
|
|
11
11
|
type: rList_property_type;
|
|
12
12
|
name: string;
|
|
13
13
|
a: string;
|
|
14
|
-
|
|
14
|
+
onSelect: Function | undefined;
|
|
15
15
|
}
|
|
16
16
|
export declare class rList_property_combo extends rList_property {
|
|
17
17
|
constructor();
|
|
@@ -23,12 +23,14 @@ export declare class rList_definition {
|
|
|
23
23
|
title_editable: boolean;
|
|
24
24
|
on_title_changed: Function | undefined;
|
|
25
25
|
title_readonly: boolean;
|
|
26
|
+
title_href: string | undefined;
|
|
27
|
+
title_href_func: Function | undefined;
|
|
26
28
|
summary: string;
|
|
27
29
|
summary_editable: boolean;
|
|
28
30
|
on_summary_changed: Function | undefined;
|
|
29
31
|
summary_readonly: boolean;
|
|
30
32
|
can_insert: boolean;
|
|
31
|
-
|
|
33
|
+
onInsert: Function | undefined;
|
|
32
34
|
inserter_icon: boolean;
|
|
33
35
|
properties: rList_property[];
|
|
34
36
|
}
|
package/components/list/List.js
CHANGED
|
@@ -14,7 +14,7 @@ export class rList_property {
|
|
|
14
14
|
type = rList_property_type.Hidden;
|
|
15
15
|
name = '';
|
|
16
16
|
a = '';
|
|
17
|
-
|
|
17
|
+
onSelect = undefined;
|
|
18
18
|
}
|
|
19
19
|
export class rList_property_combo extends rList_property {
|
|
20
20
|
constructor() {
|
|
@@ -29,12 +29,14 @@ export class rList_definition {
|
|
|
29
29
|
title_editable = false;
|
|
30
30
|
on_title_changed = undefined;
|
|
31
31
|
title_readonly = false;
|
|
32
|
+
title_href = undefined;
|
|
33
|
+
title_href_func = undefined;
|
|
32
34
|
summary = '';
|
|
33
35
|
summary_editable = false;
|
|
34
36
|
on_summary_changed = undefined;
|
|
35
37
|
summary_readonly = false;
|
|
36
38
|
can_insert = false;
|
|
37
|
-
|
|
39
|
+
onInsert = undefined;
|
|
38
40
|
inserter_icon = false;
|
|
39
41
|
properties = [];
|
|
40
42
|
}
|
|
@@ -6,7 +6,7 @@ export let definition;
|
|
|
6
6
|
export let item;
|
|
7
7
|
export let placeholder = "";
|
|
8
8
|
let props = [];
|
|
9
|
-
export function
|
|
9
|
+
export function editProperty(field) {
|
|
10
10
|
let prop_idx = definition.properties.findIndex((p) => p.name == field);
|
|
11
11
|
if (prop_idx < 0)
|
|
12
12
|
return;
|
|
@@ -54,7 +54,6 @@ async function edit_combo(field, prop_idx) {
|
|
|
54
54
|
}
|
|
55
55
|
async function edit_date(field, prop_idx) {
|
|
56
56
|
let combo = props[prop_idx];
|
|
57
|
-
console.log("edit_propery", field, combo);
|
|
58
57
|
if (!!combo)
|
|
59
58
|
combo.show();
|
|
60
59
|
else {
|
|
@@ -78,26 +77,26 @@ async function edit_date(field, prop_idx) {
|
|
|
78
77
|
<DatePicker self={item}
|
|
79
78
|
a={prop.a}
|
|
80
79
|
compact={true}
|
|
81
|
-
|
|
80
|
+
onSelect={prop.onSelect}
|
|
82
81
|
s="xs"
|
|
83
|
-
|
|
82
|
+
inContext="props sel"
|
|
84
83
|
bind:this={props[prop_index]}
|
|
85
84
|
changed={(value)=>{on_date_changed(value, prop.a)}}
|
|
86
85
|
/>
|
|
87
86
|
{:else if prop.type == rList_property_type.Combo}
|
|
88
87
|
<Combo self={item}
|
|
89
|
-
|
|
88
|
+
inContext="props sel"
|
|
90
89
|
compact={true}
|
|
91
90
|
a={prop.a}
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
onSelect={prop.onSelect}
|
|
92
|
+
isAssociation={prop.association}
|
|
94
93
|
icon={false}
|
|
95
94
|
bind:this={props[prop_index]}
|
|
96
95
|
definition={prop.combo_definition}
|
|
97
96
|
changed={(key,name)=>{on_combo_changed(key, name, prop)}}
|
|
98
97
|
s='xs'/>
|
|
99
98
|
{:else if prop.type == rList_property_type.Static}
|
|
100
|
-
<span class="dark:text-white text-
|
|
99
|
+
<span class="dark:text-white text-stone-400 truncate px-2.5 bg-stone-900/10 dark:bg-stone-100/10 rounded-lg">
|
|
101
100
|
{item[prop.a]}
|
|
102
101
|
</span>
|
|
103
102
|
{/if}
|
|
@@ -5,7 +5,7 @@ declare const __propDef: {
|
|
|
5
5
|
definition: rList_definition;
|
|
6
6
|
item: object;
|
|
7
7
|
placeholder?: string | undefined;
|
|
8
|
-
|
|
8
|
+
editProperty?: ((field: string) => void) | undefined;
|
|
9
9
|
};
|
|
10
10
|
events: {
|
|
11
11
|
[evt: string]: CustomEvent<any>;
|
|
@@ -16,6 +16,6 @@ export type ListProps = typeof __propDef.props;
|
|
|
16
16
|
export type ListEvents = typeof __propDef.events;
|
|
17
17
|
export type ListSlots = typeof __propDef.slots;
|
|
18
18
|
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
19
|
-
get
|
|
19
|
+
get editProperty(): (field: string) => void;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
@@ -6,7 +6,7 @@ export let readonly = false;
|
|
|
6
6
|
export let text = "";
|
|
7
7
|
export let placeholder = false;
|
|
8
8
|
export let editable;
|
|
9
|
-
export let
|
|
9
|
+
export let clickEdit;
|
|
10
10
|
let user_class = $$props.class ?? "";
|
|
11
11
|
</script>
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ let user_class = $$props.class ?? "";
|
|
|
14
14
|
{#if readonly}
|
|
15
15
|
<p {id} class=" sm:text-xs sm:min-h-[1rem]
|
|
16
16
|
text-base min-h-[1.5rem]
|
|
17
|
-
text-
|
|
17
|
+
text-stone-400
|
|
18
18
|
{user_class}"
|
|
19
19
|
on:click>
|
|
20
20
|
{text}
|
|
@@ -22,7 +22,7 @@ let user_class = $$props.class ?? "";
|
|
|
22
22
|
{:else if text}
|
|
23
23
|
<p {id} class=" sm:text-xs sm:min-h-[1rem]
|
|
24
24
|
text-base min-h-[1.5rem]
|
|
25
|
-
text-
|
|
25
|
+
text-stone-400
|
|
26
26
|
{user_class}"
|
|
27
27
|
use:_editable={editable}
|
|
28
28
|
on:click>
|
|
@@ -31,7 +31,7 @@ let user_class = $$props.class ?? "";
|
|
|
31
31
|
{:else if placeholder}
|
|
32
32
|
<p {id} class="sm:text-xs sm:min-h-[1rem]
|
|
33
33
|
text-base min-h-[1.5rem]
|
|
34
|
-
text-
|
|
34
|
+
text-stone-400
|
|
35
35
|
{user_class}"
|
|
36
36
|
use:_editable={editable}
|
|
37
37
|
on:click>
|