@humandialog/forms.svelte 1.7.28 → 1.8.1
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.25.svelte +473 -0
- package/components/Fab.25.svelte.d.ts +18 -0
- package/components/Fab.svelte +51 -170
- package/components/Floating_container.25.svelte +178 -0
- package/components/Floating_container.25.svelte.d.ts +23 -0
- package/components/Floating_container.svelte +18 -6
- package/components/Grid.menu.svelte +15 -16
- package/components/Grid.menu.svelte.d.ts +2 -2
- package/components/breadcrumb.svelte +27 -27
- package/components/checkbox.svelte +1 -1
- package/components/combo/combo.svelte +60 -79
- package/components/combo/combo.svelte.d.ts +1 -0
- package/components/contextmenu-25.svelte +518 -0
- package/components/contextmenu-25.svelte.d.ts +26 -0
- package/components/contextmenu.svelte +179 -65
- package/components/contextmenu.svelte.d.ts +2 -2
- package/components/date.svelte +42 -21
- package/components/date.svelte.d.ts +1 -0
- package/components/delayed.spinner.svelte +2 -1
- package/components/document/editor.svelte +21 -31
- package/components/document/editor.svelte.d.ts +0 -2
- package/components/document/internal/palette.row.svelte +10 -8
- package/components/document/internal/palette.svelte +7 -8
- package/components/document/rich.edit.svelte +10 -10
- package/components/edit.field.svelte +1 -1
- package/components/input.text.svelte.d.ts +2 -2
- package/components/inputbox.ltop.svelte +1 -1
- package/components/inputbox.ltop.svelte.d.ts +12 -12
- package/components/kanban/internal/kanban.card.svelte +27 -47
- package/components/kanban/internal/kanban.column.svelte +44 -24
- package/components/kanban/internal/kanban.inserter.svelte +11 -14
- package/components/kanban/internal/kanban.move.menu.svelte +12 -12
- package/components/kanban/internal/kanban.props.svelte +24 -9
- package/components/kanban/kanban.svelte +24 -77
- package/components/kanban/kanban.svelte.d.ts +2 -0
- package/components/kanban copy.zip +0 -0
- package/components/list/List.d.ts +1 -0
- package/components/list/List.js +1 -0
- package/components/list/internal/list.element copy.svelte +530 -0
- package/components/list/internal/list.element copy.svelte.d.ts +35 -0
- package/components/list/internal/list.element.svelte +311 -279
- package/components/list/internal/list.element.svelte.d.ts +5 -7
- package/components/list/internal/list.inserter.svelte +38 -6
- package/components/list/internal/note.txt +5 -0
- package/components/list/list.svelte +32 -11
- package/components/list/list.svelte.d.ts +5 -3
- package/components/list/list.title.svelte +2 -0
- package/components/list/list.title.svelte.d.ts +1 -0
- package/components/menu.d.ts +1 -1
- package/components/menu.js +3 -3
- package/components/paginator.svelte +79 -9
- package/components/prose.editable.p.svelte.d.ts +2 -2
- package/components/prose.editable.span.svelte.d.ts +2 -2
- package/components/r.edit.svelte +9 -0
- package/components/r.edit.svelte.d.ts +23 -0
- package/components/r.editable.svelte +75 -0
- package/components/r.editable.svelte.d.ts +31 -0
- package/components/r.figcaption.svelte +5 -0
- package/components/r.figcaption.svelte.d.ts +27 -0
- package/components/r.figure.svelte +25 -0
- package/components/r.figure.svelte.d.ts +29 -0
- package/components/r.icon.svelte +229 -0
- package/components/r.icon.svelte.d.ts +33 -0
- package/components/radio.svelte +1 -1
- package/components/ricons/arrow-up.svelte +11 -0
- package/components/ricons/arrow-up.svelte.d.ts +27 -0
- package/components/ricons/barcode.svelte +14 -0
- package/components/ricons/barcode.svelte.d.ts +27 -0
- package/components/ricons/bold.svelte +10 -0
- package/components/ricons/bold.svelte.d.ts +27 -0
- package/components/ricons/calendar.svelte +13 -0
- package/components/ricons/calendar.svelte.d.ts +27 -0
- package/components/ricons/calendars.svelte +16 -0
- package/components/ricons/calendars.svelte.d.ts +27 -0
- package/components/ricons/cat.svelte +14 -0
- package/components/ricons/cat.svelte.d.ts +27 -0
- package/components/ricons/check-check.svelte +12 -0
- package/components/ricons/check-check.svelte.d.ts +27 -0
- package/components/ricons/check.svelte +18 -0
- package/components/ricons/check.svelte.d.ts +27 -0
- package/components/ricons/chess-rook.svelte +17 -0
- package/components/ricons/chess-rook.svelte.d.ts +27 -0
- package/components/ricons/chevron-down.svelte +11 -0
- package/components/ricons/chevron-down.svelte.d.ts +27 -0
- package/components/ricons/chevron-left.svelte +11 -0
- package/components/ricons/chevron-left.svelte.d.ts +27 -0
- package/components/ricons/chevron-right.svelte +11 -0
- package/components/ricons/chevron-right.svelte.d.ts +27 -0
- package/components/ricons/chevron-up.svelte +11 -0
- package/components/ricons/chevron-up.svelte.d.ts +27 -0
- package/components/ricons/chevrons-down.svelte +12 -0
- package/components/ricons/chevrons-down.svelte.d.ts +27 -0
- package/components/ricons/chevrons-left-right.svelte +12 -0
- package/components/ricons/chevrons-left-right.svelte.d.ts +27 -0
- package/components/ricons/chevrons-left.svelte +12 -0
- package/components/ricons/chevrons-left.svelte.d.ts +27 -0
- package/components/ricons/chevrons-right.svelte +12 -0
- package/components/ricons/chevrons-right.svelte.d.ts +27 -0
- package/components/ricons/chevrons-up-down.svelte +12 -0
- package/components/ricons/chevrons-up-down.svelte.d.ts +27 -0
- package/components/ricons/chevrons-up.svelte +12 -0
- package/components/ricons/chevrons-up.svelte.d.ts +27 -0
- package/components/ricons/circle-check.svelte +28 -0
- package/components/ricons/circle-check.svelte.d.ts +23 -0
- package/components/ricons/circle-dashed.svelte +19 -0
- package/components/ricons/circle-dashed.svelte.d.ts +27 -0
- package/components/ricons/circle-dot-dashed.svelte +20 -0
- package/components/ricons/circle-dot-dashed.svelte.d.ts +27 -0
- package/components/ricons/circle.svelte +30 -0
- package/components/ricons/circle.svelte.d.ts +23 -0
- package/components/ricons/clipboard-list.svelte +17 -0
- package/components/ricons/clipboard-list.svelte.d.ts +27 -0
- package/components/ricons/clipboard-minus.svelte +9 -0
- package/components/ricons/clipboard-minus.svelte.d.ts +23 -0
- package/components/ricons/clipboard-pen-line.svelte +18 -0
- package/components/ricons/clipboard-pen-line.svelte.d.ts +27 -0
- package/components/ricons/code-xml.svelte +12 -0
- package/components/ricons/code-xml.svelte.d.ts +27 -0
- package/components/ricons/download.svelte +13 -0
- package/components/ricons/download.svelte.d.ts +27 -0
- package/components/ricons/ellipsis-vertical.svelte +14 -0
- package/components/ricons/ellipsis-vertical.svelte.d.ts +27 -0
- package/components/ricons/file-archive.svelte +18 -0
- package/components/ricons/file-archive.svelte.d.ts +27 -0
- package/components/ricons/file-text.svelte +17 -0
- package/components/ricons/file-text.svelte.d.ts +27 -0
- package/components/ricons/folder.svelte +12 -0
- package/components/ricons/folder.svelte.d.ts +27 -0
- package/components/ricons/heading-1.svelte +13 -0
- package/components/ricons/heading-1.svelte.d.ts +27 -0
- package/components/ricons/heading-2.svelte +13 -0
- package/components/ricons/heading-2.svelte.d.ts +27 -0
- package/components/ricons/heading-3.svelte +14 -0
- package/components/ricons/heading-3.svelte.d.ts +27 -0
- package/components/ricons/heading-4.svelte +14 -0
- package/components/ricons/heading-4.svelte.d.ts +27 -0
- package/components/ricons/heading-5.svelte +14 -0
- package/components/ricons/heading-5.svelte.d.ts +27 -0
- package/components/ricons/image.svelte +12 -0
- package/components/ricons/image.svelte.d.ts +27 -0
- package/components/ricons/italic.svelte +12 -0
- package/components/ricons/italic.svelte.d.ts +27 -0
- package/components/ricons/languages.svelte +15 -0
- package/components/ricons/languages.svelte.d.ts +27 -0
- package/components/ricons/list-checks.svelte +15 -0
- package/components/ricons/list-checks.svelte.d.ts +27 -0
- package/components/ricons/list-minus.svelte +14 -0
- package/components/ricons/list-minus.svelte.d.ts +27 -0
- package/components/ricons/list-ordered.svelte +16 -0
- package/components/ricons/list-ordered.svelte.d.ts +27 -0
- package/components/ricons/list-plus.svelte +14 -0
- package/components/ricons/list-plus.svelte.d.ts +27 -0
- package/components/ricons/list.svelte +15 -0
- package/components/ricons/list.svelte.d.ts +27 -0
- package/components/ricons/loader-circle.svelte +19 -0
- package/components/ricons/loader-circle.svelte.d.ts +27 -0
- package/components/ricons/log-in.svelte +12 -0
- package/components/ricons/log-in.svelte.d.ts +27 -0
- package/components/ricons/log-out.svelte +12 -0
- package/components/ricons/log-out.svelte.d.ts +27 -0
- package/components/ricons/message-square.svelte +12 -0
- package/components/ricons/message-square.svelte.d.ts +27 -0
- package/components/ricons/messages-square.svelte +15 -0
- package/components/ricons/messages-square.svelte.d.ts +27 -0
- package/components/ricons/minus.svelte +10 -0
- package/components/ricons/minus.svelte.d.ts +27 -0
- package/components/ricons/notebook-tabs.svelte +19 -0
- package/components/ricons/notebook-tabs.svelte.d.ts +27 -0
- package/components/ricons/notebook.svelte +16 -0
- package/components/ricons/notebook.svelte.d.ts +27 -0
- package/components/ricons/package.svelte +22 -0
- package/components/ricons/package.svelte.d.ts +27 -0
- package/components/ricons/paperclip.svelte +12 -0
- package/components/ricons/paperclip.svelte.d.ts +27 -0
- package/components/ricons/pencil.svelte +12 -0
- package/components/ricons/pencil.svelte.d.ts +27 -0
- package/components/ricons/pilcrow.svelte +12 -0
- package/components/ricons/pilcrow.svelte.d.ts +27 -0
- package/components/ricons/save.svelte +12 -0
- package/components/ricons/save.svelte.d.ts +27 -0
- package/components/ricons/square-check-big.svelte +13 -0
- package/components/ricons/square-check-big.svelte.d.ts +27 -0
- package/components/ricons/square-pen.svelte +14 -0
- package/components/ricons/square-pen.svelte.d.ts +27 -0
- package/components/ricons/square.svelte +10 -0
- package/components/ricons/square.svelte.d.ts +27 -0
- package/components/ricons/strikethrough.svelte +13 -0
- package/components/ricons/strikethrough.svelte.d.ts +27 -0
- package/components/ricons/sun-moon.svelte +15 -0
- package/components/ricons/sun-moon.svelte.d.ts +27 -0
- package/components/ricons/table.svelte +13 -0
- package/components/ricons/table.svelte.d.ts +27 -0
- package/components/ricons/tag.svelte +12 -0
- package/components/ricons/tag.svelte.d.ts +27 -0
- package/components/ricons/text-quote.svelte +14 -0
- package/components/ricons/text-quote.svelte.d.ts +27 -0
- package/components/ricons/turtle.svelte +13 -0
- package/components/ricons/turtle.svelte.d.ts +27 -0
- package/components/ricons/underline.svelte +11 -0
- package/components/ricons/underline.svelte.d.ts +27 -0
- package/components/ricons/upload.svelte +13 -0
- package/components/ricons/upload.svelte.d.ts +27 -0
- package/components/ricons/user.svelte +12 -0
- package/components/ricons/user.svelte.d.ts +27 -0
- package/components/ricons/users.svelte +14 -0
- package/components/ricons/users.svelte.d.ts +27 -0
- package/components/ricons/x.svelte +11 -0
- package/components/ricons/x.svelte.d.ts +27 -0
- package/components/sidebar/sidebar.brand.svelte +14 -13
- package/components/sidebar/sidebar.brand.svelte.d.ts +2 -2
- package/components/sidebar/sidebar.group.svelte +52 -30
- package/components/sidebar/sidebar.item.svelte +35 -141
- package/components/sidebar/sidebar.item.svelte.d.ts +2 -5
- package/components/sidebar/sidebar.list.svelte +8 -8
- package/components/sidebar/sidebar.svelte +19 -2
- package/components/simple.table.svelte.d.ts +4 -4
- package/components/table/_template.table.svelte.d.ts +4 -4
- package/components/tags.svelte +10 -3
- package/components/tags.svelte.d.ts +1 -0
- package/components/textarea.ltop.svelte.d.ts +2 -2
- package/components/tile.title.svelte.d.ts +2 -2
- package/desk.svelte +139 -144
- package/dialog.svelte +17 -7
- package/form.box.svelte.d.ts +4 -4
- package/horizontal.nav.tabs.svelte +197 -23
- package/horizontal.nav.tabs.svelte.d.ts +2 -2
- package/horizontal.toolbar.svelte +25 -18
- package/horizontal.toolbar.svelte.d.ts +2 -2
- package/index.d.ts +10 -3
- package/index.js +10 -3
- package/operations.svelte +51 -22
- package/package.json +89 -1
- package/page.row.svelte.d.ts +2 -2
- package/page.svelte +17 -7
- package/page.svelte.d.ts +10 -10
- package/paper.header.svelte +4 -0
- package/paper.header.svelte.d.ts +27 -0
- package/paper.nav.svelte +8 -0
- package/paper.nav.svelte.d.ts +27 -0
- package/paper.svelte +22 -6
- package/paper.svelte.d.ts +2 -0
- package/paper.table.svelte +27 -0
- package/paper.table.svelte.d.ts +27 -0
- package/paper.top.margin.svelte +5 -0
- package/paper.top.margin.svelte.d.ts +27 -0
- package/stores.d.ts +1 -1
- package/tenant.create.svelte +93 -0
- package/tenant.create.svelte.d.ts +29 -0
- package/tenant.members.svelte +116 -93
- package/tile.svelte.d.ts +4 -4
- package/tiles.row.svelte.d.ts +2 -2
- package/tiles.vertical.row.svelte.d.ts +2 -2
- package/updates.d.ts +4 -0
- package/updates.js +56 -14
- package/utils.d.ts +16 -4
- package/utils.js +214 -99
- package/vertical.toolbar.svelte +62 -47
- package/vertical.toolbar.svelte.d.ts +2 -2
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
import {randomString, isDeviceSmallerThan} from '../utils'
|
|
4
4
|
import { ext } from '../i18n.js';
|
|
5
5
|
import { afterUpdate } from 'svelte';
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
export let path;
|
|
8
8
|
export let collapseLonger = false
|
|
9
9
|
|
|
10
10
|
let segments = []
|
|
11
11
|
let userClass = $$props.class ?? ''
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
$: init($location, $querystring)
|
|
14
14
|
|
|
15
15
|
function init(...args)
|
|
16
16
|
{
|
|
17
17
|
if(path && Array.isArray(path) && path.length > 0)
|
|
18
18
|
{
|
|
19
|
-
path.forEach(el =>
|
|
19
|
+
path.forEach(el =>
|
|
20
20
|
segments.push({
|
|
21
21
|
name: el.Name,
|
|
22
22
|
href: el.href ?? '',
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
function shouldBeCollapsed(idx)
|
|
34
34
|
{
|
|
35
35
|
const isSmall = isDeviceSmallerThan("sm")
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
let startDragY = 0
|
|
52
52
|
function mouseDown(e)
|
|
53
53
|
{
|
|
54
|
-
|
|
54
|
+
|
|
55
55
|
isScrolling = true
|
|
56
56
|
startDragX = e.offsetX
|
|
57
57
|
startDragY = e.offsetY
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
{
|
|
63
63
|
if(isScrolling)
|
|
64
64
|
{
|
|
65
|
-
const deltaX = startDragX - e.offsetX
|
|
65
|
+
const deltaX = startDragX - e.offsetX
|
|
66
66
|
//console.log('mouseMove', deltaX)
|
|
67
67
|
|
|
68
68
|
scrollableElement.scrollLeft = startScrollLeft + deltaX
|
|
@@ -80,70 +80,70 @@
|
|
|
80
80
|
*/
|
|
81
81
|
|
|
82
82
|
let pathElements = []
|
|
83
|
-
afterUpdate( () =>
|
|
83
|
+
afterUpdate( () =>
|
|
84
84
|
{
|
|
85
85
|
const elementsNo = pathElements.length
|
|
86
86
|
if(elementsNo > 0)
|
|
87
87
|
{
|
|
88
|
-
// container: "nearest" not supported on iOS and mobile FF
|
|
89
|
-
//const lastElement = pathElements[elementsNo-1]
|
|
90
|
-
//lastElement.scrollIntoView({ container: "nearest"})
|
|
88
|
+
// container: "nearest" not supported on iOS and mobile FF
|
|
89
|
+
//const lastElement = pathElements[elementsNo-1]
|
|
90
|
+
//lastElement.scrollIntoView({ container: "nearest"})
|
|
91
91
|
|
|
92
92
|
const containerRect = containerElement.getBoundingClientRect()
|
|
93
93
|
const wholeWidth = containerElement.scrollWidth
|
|
94
94
|
const visibleWidth = containerRect.width
|
|
95
95
|
containerElement.scrollLeft = wholeWidth - visibleWidth
|
|
96
|
-
|
|
96
|
+
|
|
97
97
|
}
|
|
98
98
|
})
|
|
99
99
|
|
|
100
100
|
</script>
|
|
101
101
|
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
<div class="{userClass} w-full sm:w-fit sm:max-w-full overflow-x-auto sm:overflow-x-hidden" aria-label="Breadcrumb" bind:this={containerElement}>
|
|
103
|
+
<div class="flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse flex-nowrap min-h-[1.25rem]" bind:this={scrollableElement}>
|
|
105
104
|
{#if (segments && segments.length > 0)}
|
|
106
105
|
{#each segments as segment, idx (segment.uniqueKey)}
|
|
107
106
|
{@const isFirst = idx == 0}
|
|
108
107
|
{@const isCollapsed = shouldBeCollapsed(idx)}
|
|
109
108
|
{@const isFirstCollapsed = isCollapsed && idx == 0}
|
|
110
|
-
|
|
109
|
+
|
|
111
110
|
{#if isCollapsed}
|
|
112
111
|
{#if isFirstCollapsed}
|
|
113
112
|
<!--svg class="rtl:rotate-180 w-3 h-3 text-stone-400 mx-1" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
|
|
114
113
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
|
|
115
114
|
</svg-->
|
|
116
|
-
<span class="
|
|
115
|
+
<span class="text-stone-900 dark:text-stone-100 whitespace-nowrap">
|
|
117
116
|
...
|
|
118
117
|
</span>
|
|
119
118
|
{/if}
|
|
120
119
|
{:else}
|
|
121
|
-
<
|
|
120
|
+
<div bind:this={pathElements[idx]}>
|
|
122
121
|
<div class="flex items-center">
|
|
123
122
|
{#if !isFirst}
|
|
124
123
|
<!--svg class="rtl:rotate-180 w-3 h-3 text-stone-400 mx-1" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
|
|
125
124
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
|
|
126
125
|
</svg-->
|
|
127
|
-
<span class="
|
|
128
|
-
|
|
126
|
+
<span class="font-medium text-stone-700 dark:text-stone-400 ">
|
|
127
|
+
 / 
|
|
129
128
|
</span>
|
|
130
129
|
{/if}
|
|
131
|
-
|
|
130
|
+
|
|
132
131
|
{#if segment.href}
|
|
133
|
-
<a href={segment.href} use:link class="
|
|
132
|
+
<a href={segment.href} use:link class="text-stone-700 hover:text-stone-900 dark:text-stone-400 dark:hover:text-white whitespace-nowrap">
|
|
134
133
|
{ext(segment.name)}
|
|
135
134
|
</a>
|
|
136
135
|
{:else}
|
|
137
|
-
<span class="
|
|
136
|
+
<span class="font-medium text-stone-700 dark:text-stone-400 whitespace-nowrap">
|
|
138
137
|
{ext(segment.name)}
|
|
139
138
|
</span>
|
|
140
139
|
{/if}
|
|
141
|
-
|
|
140
|
+
|
|
142
141
|
</div>
|
|
143
|
-
</
|
|
142
|
+
</div>
|
|
144
143
|
{/if}
|
|
145
144
|
{/each}
|
|
145
|
+
{:else}
|
|
146
|
+
<span> ./ </span>
|
|
146
147
|
{/if}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
</nav>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
@@ -9,7 +9,7 @@ export let a = "";
|
|
|
9
9
|
export let context = "";
|
|
10
10
|
export let typename = "";
|
|
11
11
|
export let c = "";
|
|
12
|
-
export let pushChangesImmediately =
|
|
12
|
+
export let pushChangesImmediately = false;
|
|
13
13
|
let item = null;
|
|
14
14
|
let additional_class = $$restProps.class ?? "";
|
|
15
15
|
let value = false;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script>import { data_tick_store, contextItemsStore, contextTypesStore, pushToolsActionsOperations, popToolsActionsOperations, fabHiddenDueToPopup } from "../../stores.js";
|
|
2
|
-
import { informModification, pushChanges } from "../../updates.js";
|
|
2
|
+
import { informModification, pushChanges, informModificationEx } from "../../updates.js";
|
|
3
3
|
import { isDeviceSmallerThan, parseWidthDirective, shouldBeComapact } from "../../utils.js";
|
|
4
4
|
import { afterUpdate, getContext, onMount, setContext } from "svelte";
|
|
5
5
|
import { rCombo_definition, rCombo_item, cached_sources } from "./combo";
|
|
6
6
|
import { FaChevronDown, FaTimes } from "svelte-icons/fa";
|
|
7
7
|
import Icon from "../icon.svelte";
|
|
8
8
|
import { reef } from "@humandialog/auth.svelte/dist/index.js";
|
|
9
|
-
import { showMenu } from "../menu.js";
|
|
9
|
+
import { showMenu, SHOW_MENU_BELOW } from "../menu.js";
|
|
10
10
|
import { ext, i18n } from "../../i18n.js";
|
|
11
|
+
import Ricon from "../r.icon.svelte";
|
|
11
12
|
export let label = "";
|
|
12
13
|
export let self = null;
|
|
13
14
|
export let a = "";
|
|
@@ -19,6 +20,7 @@ export let onSelect = void 0;
|
|
|
19
20
|
export let definition = null;
|
|
20
21
|
export let changed = void 0;
|
|
21
22
|
export let onNewItemCreated = void 0;
|
|
23
|
+
export let typo = false;
|
|
22
24
|
export let icon = false;
|
|
23
25
|
export let placeholder = "";
|
|
24
26
|
export let s = "sm";
|
|
@@ -27,7 +29,7 @@ export let compact = false;
|
|
|
27
29
|
export let inContext = "sel";
|
|
28
30
|
export let cached = false;
|
|
29
31
|
export let filtered = false;
|
|
30
|
-
export let pushChangesImmediately =
|
|
32
|
+
export let pushChangesImmediately = false;
|
|
31
33
|
export let hasNone = isAssociation;
|
|
32
34
|
export let readOnly = false;
|
|
33
35
|
let userClass = $$restProps.class ?? "";
|
|
@@ -90,8 +92,8 @@ let appearance_class;
|
|
|
90
92
|
if (is_compact)
|
|
91
93
|
appearance_class = `${font_size}`;
|
|
92
94
|
else
|
|
93
|
-
appearance_class = ` bg-stone-50 border border-stone-300 text-stone-900 ${font_size} rounded-lg
|
|
94
|
-
focus:ring-primary-600 focus:border-primary-600 block w-full ${input_pb} ${input_pt} px-2.5 dark:bg-stone-700
|
|
95
|
+
appearance_class = ` bg-stone-50 border border-stone-300 text-stone-900 ${font_size} rounded-lg
|
|
96
|
+
focus:ring-primary-600 focus:border-primary-600 block w-full ${input_pb} ${input_pt} px-2.5 dark:bg-stone-700
|
|
95
97
|
dark:border-stone-600 dark:placeholder-stone-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500`;
|
|
96
98
|
let cs = c ? parseWidthDirective(c) : "col-span-1";
|
|
97
99
|
let ctx = context ? context : getContext("ctx");
|
|
@@ -226,7 +228,7 @@ function openDropdownAsMenu() {
|
|
|
226
228
|
action: (f) => on_choose(i)
|
|
227
229
|
});
|
|
228
230
|
});
|
|
229
|
-
showMenu(rect, operations);
|
|
231
|
+
showMenu(rect, operations, SHOW_MENU_BELOW, hide);
|
|
230
232
|
}
|
|
231
233
|
export function hide() {
|
|
232
234
|
if (!is_dropdown_open)
|
|
@@ -305,66 +307,25 @@ async function on_choose(itm) {
|
|
|
305
307
|
tick_request_internal = tick_request_internal + 1;
|
|
306
308
|
} else {
|
|
307
309
|
if (isAssociation) {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
else
|
|
316
|
-
|
|
317
|
-
let fields = calc_path_fields_param();
|
|
318
|
-
if (fields)
|
|
319
|
-
path += fields;
|
|
320
|
-
let result = await reef.post(`/${path}`, body);
|
|
321
|
-
if (result) {
|
|
322
|
-
let result_typename = Object.keys(result)[0];
|
|
323
|
-
item[a] = result[result_typename];
|
|
324
|
-
tick_request_internal = tick_request_internal + 1;
|
|
310
|
+
{
|
|
311
|
+
if (itm) {
|
|
312
|
+
let name = definition.element_name ?? "$display";
|
|
313
|
+
item[a] = {
|
|
314
|
+
$ref: itm.Key,
|
|
315
|
+
[name]: itm.Name
|
|
316
|
+
};
|
|
317
|
+
} else {
|
|
318
|
+
item[a] = null;
|
|
325
319
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
path = `/${typename}/${item.Id}/set`;
|
|
332
|
-
let result = await reef.post(
|
|
333
|
-
path,
|
|
334
|
-
{
|
|
335
|
-
[a]: itm ? itm.Key : null
|
|
336
|
-
}
|
|
337
|
-
);
|
|
338
|
-
if (result) {
|
|
339
|
-
if (itm) {
|
|
340
|
-
let name = definition.element_name ?? "$display";
|
|
341
|
-
item[a] = {
|
|
342
|
-
$ref: itm.Key,
|
|
343
|
-
[name]: itm.Name
|
|
344
|
-
};
|
|
345
|
-
} else {
|
|
346
|
-
item[a] = null;
|
|
347
|
-
}
|
|
348
|
-
tick_request_internal = tick_request_internal + 1;
|
|
320
|
+
tick_request_internal = tick_request_internal + 1;
|
|
321
|
+
if (item && a && typename) {
|
|
322
|
+
informModificationEx(typename, item.Id, a, itm ? itm.Key : null);
|
|
323
|
+
if (pushChangesImmediately)
|
|
324
|
+
pushChanges();
|
|
349
325
|
}
|
|
350
326
|
}
|
|
351
327
|
} else {
|
|
352
|
-
|
|
353
|
-
let path;
|
|
354
|
-
if (item.$ref)
|
|
355
|
-
path = `/${item.$ref}/${choiceCallback}`;
|
|
356
|
-
else
|
|
357
|
-
path = `/${typename}/${item.Id}/${choiceCallback}`;
|
|
358
|
-
let fields = calc_path_fields_param();
|
|
359
|
-
if (fields)
|
|
360
|
-
path += fields;
|
|
361
|
-
let value = itm ? itm.Key ?? itm.Name : null;
|
|
362
|
-
let result = await reef.post(path, { choice: value });
|
|
363
|
-
if (result) {
|
|
364
|
-
item[a] = result;
|
|
365
|
-
tick_request_internal = tick_request_internal + 1;
|
|
366
|
-
}
|
|
367
|
-
} else {
|
|
328
|
+
{
|
|
368
329
|
item[a] = itm ? itm.Key ?? itm.Name : null;
|
|
369
330
|
tick_request_internal = tick_request_internal + 1;
|
|
370
331
|
if (item && a && typename) {
|
|
@@ -575,7 +536,25 @@ function on_focus_out(e) {
|
|
|
575
536
|
|
|
576
537
|
{#if true}
|
|
577
538
|
{@const c = setup_view(item, a, tick_request_internal) }
|
|
578
|
-
|
|
539
|
+
|
|
540
|
+
{#if typo}
|
|
541
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
542
|
+
<span class="inline-block relative flex flex-row items-center
|
|
543
|
+
cursor-pointer"
|
|
544
|
+
on:focusout={on_focus_out}
|
|
545
|
+
on:click={(e) => { show(e, undefined) }}
|
|
546
|
+
bind:this={root_element}>
|
|
547
|
+
<span class="mr-1"
|
|
548
|
+
bind:this={textbox}
|
|
549
|
+
contenteditable={is_dropdown_open && filtered}
|
|
550
|
+
on:keydown={on_keydown}
|
|
551
|
+
>{combo_text}</span>
|
|
552
|
+
<Ricon icon = "chevron-down" size="s"/>
|
|
553
|
+
</span>
|
|
554
|
+
{/if}
|
|
555
|
+
|
|
556
|
+
{#if !typo}
|
|
557
|
+
|
|
579
558
|
<div class="{cs} max-w-full inline-block {userClass}"
|
|
580
559
|
on:focusout={on_focus_out}
|
|
581
560
|
bind:this={root_element}>
|
|
@@ -583,14 +562,14 @@ function on_focus_out(e) {
|
|
|
583
562
|
<label for="name" class="block {label_mb} text-xs font-small text-stone-900 dark:text-white">{label}</label>
|
|
584
563
|
{/if}
|
|
585
564
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
586
|
-
<div bind:this={combo}
|
|
565
|
+
<div bind:this={combo}
|
|
587
566
|
class="max-w-full {appearance_class} flex flex-row content-between items-center"
|
|
588
567
|
>
|
|
589
|
-
|
|
568
|
+
|
|
590
569
|
<p class="max-w-full flex-1 flex flex-row items-center"
|
|
591
570
|
on:click={(e) => { show(e, undefined) }}
|
|
592
571
|
class:cursor-pointer={can_be_activated && is_compact}>
|
|
593
|
-
|
|
572
|
+
|
|
594
573
|
{#if true || !is_dropdown_open}
|
|
595
574
|
{#if icon && sel_item}
|
|
596
575
|
{#if sel_item.Color}
|
|
@@ -605,7 +584,7 @@ function on_focus_out(e) {
|
|
|
605
584
|
{/if}
|
|
606
585
|
{/if}
|
|
607
586
|
|
|
608
|
-
|
|
587
|
+
|
|
609
588
|
<span bind:this={textbox}
|
|
610
589
|
class="dark:text-stone-300 {line_h} truncate pl-0 pr-2.5 {background_class} min-w-[2.5rem]"
|
|
611
590
|
class:ml-2={icon}
|
|
@@ -624,8 +603,8 @@ function on_focus_out(e) {
|
|
|
624
603
|
</div>
|
|
625
604
|
{/if}
|
|
626
605
|
</p>
|
|
627
|
-
|
|
628
|
-
|
|
606
|
+
|
|
607
|
+
|
|
629
608
|
</div>
|
|
630
609
|
|
|
631
610
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
@@ -635,8 +614,8 @@ function on_focus_out(e) {
|
|
|
635
614
|
<button class=" fixed w-6 h-6 flex items-center justify-center
|
|
636
615
|
text-stone-500 bg-stone-200/70 hover:bg-stone-200
|
|
637
616
|
focus:outline-none font-medium rounded-full text-sm text-center
|
|
638
|
-
dark:text-stone-500 dark:bg-stone-700/80 dark:hover:bg-stone-700
|
|
639
|
-
focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800"
|
|
617
|
+
dark:text-stone-500 dark:bg-stone-700/80 dark:hover:bg-stone-700
|
|
618
|
+
focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800"
|
|
640
619
|
style={closeButtonPos}
|
|
641
620
|
on:click={ hide }>
|
|
642
621
|
<Icon component={FaTimes} s="md"/>
|
|
@@ -649,16 +628,16 @@ function on_focus_out(e) {
|
|
|
649
628
|
style={dropdown_position}
|
|
650
629
|
bind:this={dropdownElement}
|
|
651
630
|
use:dropdown_action>
|
|
652
|
-
|
|
653
|
-
|
|
631
|
+
|
|
632
|
+
|
|
654
633
|
|
|
655
634
|
<ul class="py-1">
|
|
656
635
|
|
|
657
636
|
{#if definition.source && definition.source.length}
|
|
658
637
|
{#if hasNone}
|
|
659
|
-
|
|
638
|
+
|
|
660
639
|
<li class="rounded flex flex-row items-center {font_size}
|
|
661
|
-
space-x-10 px-4 py-2 ml-12 sm:ml-0"
|
|
640
|
+
space-x-10 px-4 py-2 ml-12 sm:ml-0"
|
|
662
641
|
class:bg-stone-100={highlighted_option == null}
|
|
663
642
|
class:dark:bg-stone-700={highlighted_option == null}
|
|
664
643
|
class:dark:hover:bg-stone-700={highlighted_option == null}
|
|
@@ -677,7 +656,7 @@ function on_focus_out(e) {
|
|
|
677
656
|
{#each _filtered_source as item (item.Key)}
|
|
678
657
|
{@const active=(highlighted_option == item) ? 'bg-stone-400/30 dark:bg-stone-400/30' : ''}
|
|
679
658
|
<li class="rounded flex flex-row items-center {font_size}
|
|
680
|
-
space-x-10 px-4 py-2 pl-12 sm:pl-2 {active}"
|
|
659
|
+
space-x-10 px-4 py-2 pl-12 sm:pl-2 {active}"
|
|
681
660
|
on:mousemove={() => on_mouse_move(item)}
|
|
682
661
|
on:click|preventDefault|stopPropagation={async () => await on_choose(item)}
|
|
683
662
|
tabindex="-1">
|
|
@@ -685,7 +664,7 @@ function on_focus_out(e) {
|
|
|
685
664
|
{#if icon}
|
|
686
665
|
{#if item.Color}
|
|
687
666
|
<Icon s="md" circle={true} color={item.Color}/>
|
|
688
|
-
{:else if item.Avatar}
|
|
667
|
+
{:else if item.Avatar}
|
|
689
668
|
<Icon s="md" circle={true} symbol={item.Avatar}/>
|
|
690
669
|
{:else if item.Icon}
|
|
691
670
|
<Icon s="md" component={item.Icon}/>
|
|
@@ -715,9 +694,10 @@ function on_focus_out(e) {
|
|
|
715
694
|
</div-->
|
|
716
695
|
</div>
|
|
717
696
|
{/if}
|
|
718
|
-
|
|
697
|
+
{/if}
|
|
698
|
+
{#if !typo}
|
|
719
699
|
<style>
|
|
720
|
-
|
|
700
|
+
|
|
721
701
|
[contenteditable]:focus {
|
|
722
702
|
outline: 0px solid transparent;
|
|
723
703
|
}
|
|
@@ -730,3 +710,4 @@ function on_focus_out(e) {
|
|
|
730
710
|
}
|
|
731
711
|
|
|
732
712
|
</style>
|
|
713
|
+
{/if}
|
|
@@ -14,6 +14,7 @@ declare const __propDef: {
|
|
|
14
14
|
definition?: rCombo_definition | null | undefined;
|
|
15
15
|
changed?: undefined;
|
|
16
16
|
onNewItemCreated?: undefined;
|
|
17
|
+
typo?: boolean | undefined;
|
|
17
18
|
icon?: boolean | undefined;
|
|
18
19
|
placeholder?: string | undefined;
|
|
19
20
|
s?: string | undefined;
|