@humandialog/forms.svelte 1.7.13 → 1.7.15
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 +15 -8
- package/components/Floating_container.svelte +18 -12
- package/components/Grid.menu.svelte +22 -18
- package/components/Grid.menu.svelte.d.ts +2 -0
- package/components/contextmenu.svelte +17 -12
- package/components/document/internal/palette.svelte +63 -44
- package/components/list/list.svelte +1 -1
- package/components/menu.d.ts +1 -1
- package/components/menu.js +2 -2
- package/console.svelte +1 -1
- package/desk.svelte +2 -2
- package/dialog.svelte +12 -3
- package/modal.svelte +12 -3
- package/operations.svelte +1 -1
- package/package.json +1 -1
package/components/Fab.svelte
CHANGED
|
@@ -167,7 +167,7 @@ function on_click(e, operation) {
|
|
|
167
167
|
if (false)
|
|
168
168
|
showMenu(rect, operation.grid);
|
|
169
169
|
else
|
|
170
|
-
showGridMenu(rect, operation.grid);
|
|
170
|
+
showGridMenu(rect, operation.grid, operation.caption ?? "");
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
function toggleExpandToolboxV(e) {
|
|
@@ -205,7 +205,7 @@ function calculatePosition(operation) {
|
|
|
205
205
|
return "";
|
|
206
206
|
const width = 55;
|
|
207
207
|
const height = 55;
|
|
208
|
-
const margin =
|
|
208
|
+
const margin = 0;
|
|
209
209
|
let lShift = 0;
|
|
210
210
|
let tShift = 0;
|
|
211
211
|
let rShift = 0;
|
|
@@ -293,11 +293,7 @@ function operationVisible(operation) {
|
|
|
293
293
|
{@const position = calculatePosition(operation)}
|
|
294
294
|
{#if position}
|
|
295
295
|
<button
|
|
296
|
-
class="
|
|
297
|
-
focus:outline-none font-medium rounded-full text-sm text-center
|
|
298
|
-
dark:text-stone-500 dark:bg-stone-700/80 dark:hover:bg-stone-700
|
|
299
|
-
focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800
|
|
300
|
-
w-[30px] h-[30px]
|
|
296
|
+
class=" w-[55px] h-[55px]
|
|
301
297
|
fixed m-0
|
|
302
298
|
flex items-center justify-center
|
|
303
299
|
disable-dbl-tap-zoom
|
|
@@ -305,7 +301,18 @@ function operationVisible(operation) {
|
|
|
305
301
|
style={position}
|
|
306
302
|
on:click|stopPropagation={(e) => {on_click(e, operation)}}
|
|
307
303
|
on:mousedown={mousedown} >
|
|
308
|
-
|
|
304
|
+
|
|
305
|
+
<div class=" text-stone-500 bg-stone-200/70 hover:bg-stone-200
|
|
306
|
+
focus:outline-none font-medium rounded-full text-sm text-center
|
|
307
|
+
dark:text-stone-500 dark:bg-stone-700/80 dark:hover:bg-stone-700
|
|
308
|
+
focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800
|
|
309
|
+
|
|
310
|
+
flex items-center justify-center
|
|
311
|
+
w-[30px] h-[30px]">
|
|
312
|
+
<div class="w-5 h-5">
|
|
313
|
+
<svelte:component this={operation.icon}/>
|
|
314
|
+
</div>
|
|
315
|
+
</div>
|
|
309
316
|
</button>
|
|
310
317
|
{/if}
|
|
311
318
|
{/if}
|
|
@@ -12,6 +12,7 @@ let around_rect;
|
|
|
12
12
|
let rootElement;
|
|
13
13
|
let internalElement;
|
|
14
14
|
let closeButtonPos = "";
|
|
15
|
+
let maxHeight = 0;
|
|
15
16
|
export async function show(around, _toolbar, _props = {}) {
|
|
16
17
|
if (around instanceof DOMRect) {
|
|
17
18
|
x = around.left;
|
|
@@ -99,21 +100,21 @@ function calculatePosition(x2, y2, around, visible2, fresh) {
|
|
|
99
100
|
myRect = null;
|
|
100
101
|
}
|
|
101
102
|
if (myRect) {
|
|
102
|
-
|
|
103
|
+
maxHeight = screenRect.height / 2 - margin;
|
|
103
104
|
if (myRect.height < maxHeight)
|
|
104
105
|
maxHeight = myRect.height;
|
|
105
106
|
const width = screenRect.width - 2 * margin;
|
|
106
107
|
x2 = margin;
|
|
107
108
|
y2 = screenRect.bottom - maxHeight - margin;
|
|
108
|
-
result = `left: ${x2}px;
|
|
109
|
+
result = `left: ${x2}px; bottom: ${margin}px; width: ${width}px; max-height: ${maxHeight}px; display: block`;
|
|
109
110
|
} else {
|
|
110
|
-
|
|
111
|
+
maxHeight = screenRect.height / 2 - margin;
|
|
111
112
|
const width = screenRect.width - 2 * margin;
|
|
112
113
|
x2 = margin;
|
|
113
114
|
y2 = screenRect.bottom - maxHeight - margin;
|
|
114
|
-
result = `left: ${x2}px;
|
|
115
|
+
result = `left: ${x2}px; bottom: ${margin}px; width: ${width}px; max-height: ${maxHeight}px; display: block`;
|
|
115
116
|
}
|
|
116
|
-
closeButtonPos = `right:
|
|
117
|
+
closeButtonPos = `right: 0.5rem; top: calc(${y2}px + 0.25rem)`;
|
|
117
118
|
} else {
|
|
118
119
|
let myRect = null;
|
|
119
120
|
if (!fresh) {
|
|
@@ -143,21 +144,26 @@ function calculatePosition(x2, y2, around, visible2, fresh) {
|
|
|
143
144
|
<div id="__hd_svelte_floating_container"
|
|
144
145
|
class="p-2 bg-stone-100 dark:bg-stone-800 rounded-lg shadow-md shadow-stone-500 dark:shadow-black z-40 fixed "
|
|
145
146
|
style={cssPosition}
|
|
147
|
+
visible={visible}
|
|
146
148
|
bind:this={rootElement}>
|
|
147
149
|
{#if closeButtonPos}
|
|
148
|
-
<button class="
|
|
149
|
-
|
|
150
|
-
focus:outline-none font-medium
|
|
151
|
-
dark:text-stone-500 dark:bg-stone-700/80 dark:hover:bg-stone-700
|
|
152
|
-
focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800"
|
|
150
|
+
<button class=" text-stone-800 dark:text-stone-400
|
|
151
|
+
fixed w-6 h-6 flex items-center justify-center
|
|
152
|
+
focus:outline-none font-medium text-sm text-center"
|
|
153
153
|
style={closeButtonPos}
|
|
154
|
-
on:click={ hide }>
|
|
154
|
+
on:click={ hide }> <!--rounded-full focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800 text-stone-500 bg-stone-200/70 hover:bg-stone-200 dark:text-stone-500 dark:bg-stone-700/80 dark:hover:bg-stone-700 -->
|
|
155
155
|
<Icon component={FaTimes} s="md"/>
|
|
156
156
|
</button>
|
|
157
157
|
{/if}
|
|
158
158
|
|
|
159
159
|
{#if toolbar}
|
|
160
|
-
<svelte:component this={toolbar} {...props} bind:this={internalElement} />
|
|
160
|
+
<svelte:component this={toolbar} {...props} {maxHeight} bind:this={internalElement} />
|
|
161
161
|
{/if}
|
|
162
162
|
</div>
|
|
163
163
|
|
|
164
|
+
<style>
|
|
165
|
+
:global(body:has(#__hd_svelte_floating_container[visible="true"]))
|
|
166
|
+
{
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
}
|
|
169
|
+
</style>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import {contextItemsStore} from '../stores.js'
|
|
3
3
|
|
|
4
4
|
export let operations = []
|
|
5
|
+
export let label = ''
|
|
5
6
|
export let onHide = undefined;
|
|
6
7
|
|
|
7
8
|
$: grid_cols = init(operations);
|
|
@@ -115,24 +116,27 @@
|
|
|
115
116
|
</script>
|
|
116
117
|
|
|
117
118
|
|
|
118
|
-
<div class="
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
text-sm font-medium text-stone-900 dark:text-stone-400 dark:hover:text-white
|
|
125
|
-
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
|
|
126
|
-
border rounded border-stone-200 dark:border-stone-600 focus:outline-none
|
|
127
|
-
inline-flex items-center justify-center"
|
|
128
|
-
on:click={(e) => {execute_action(e, operation)}}>
|
|
119
|
+
<div class="">
|
|
120
|
+
<p class="block sm:hidden text-stone-800 dark:text-stone-400 text-sm ml-1 mb-1">{label}</p>
|
|
121
|
+
<div class="grid gap-2 {grid_cols} ">
|
|
122
|
+
{#each operations as operation}
|
|
123
|
+
{#if !operation.separator}
|
|
124
|
+
{@const col=col_span(operation.columns ?? 1)}
|
|
129
125
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
126
|
+
<button class=" py-2.5 px-5 {col}
|
|
127
|
+
text-sm font-medium text-stone-900 dark:text-stone-400 dark:hover:text-white
|
|
128
|
+
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
|
|
129
|
+
border rounded border-stone-200 dark:border-stone-600 focus:outline-none
|
|
130
|
+
inline-flex items-center justify-center"
|
|
131
|
+
on:click={(e) => {execute_action(e, operation)}}>
|
|
132
|
+
|
|
133
|
+
{#if operation.icon}
|
|
134
|
+
<div class="w-3 h-3 mr-1"><svelte:component this={operation.icon}/></div>
|
|
135
|
+
{/if}
|
|
136
|
+
<div>{operation.caption}</div>
|
|
137
|
+
</button>
|
|
138
|
+
{/if}
|
|
139
|
+
{/each}
|
|
140
|
+
</div>
|
|
137
141
|
</div>
|
|
138
142
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
/** @typedef {typeof __propDef.slots} GridSlots */
|
|
4
4
|
export default class Grid extends SvelteComponentTyped<{
|
|
5
5
|
operations?: any[] | undefined;
|
|
6
|
+
label?: string | undefined;
|
|
6
7
|
onHide?: any;
|
|
7
8
|
}, {
|
|
8
9
|
[evt: string]: CustomEvent<any>;
|
|
@@ -15,6 +16,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
15
16
|
declare const __propDef: {
|
|
16
17
|
props: {
|
|
17
18
|
operations?: any[] | undefined;
|
|
19
|
+
label?: string | undefined;
|
|
18
20
|
onHide?: any;
|
|
19
21
|
};
|
|
20
22
|
events: {
|
|
@@ -56,15 +56,15 @@ function calculatePosition(x2, y2, visible2, fresh) {
|
|
|
56
56
|
const width = screenRect.width - 2 * margin;
|
|
57
57
|
x2 = margin;
|
|
58
58
|
y2 = screenRect.bottom - maxHeight - margin;
|
|
59
|
-
result = `left: ${x2}px;
|
|
59
|
+
result = `left: ${x2}px; bottom: ${margin}px; width: ${width}px; max-height: ${maxHeight}px; display: block`;
|
|
60
60
|
} else {
|
|
61
61
|
const maxHeight = screenRect.height / 2 - margin;
|
|
62
62
|
const width = screenRect.width - 2 * margin;
|
|
63
63
|
x2 = margin;
|
|
64
64
|
y2 = screenRect.bottom - maxHeight - margin;
|
|
65
|
-
result = `left: ${x2}px;
|
|
65
|
+
result = `left: ${x2}px; bottom: ${margin}px; width: ${width}px; max-height: ${maxHeight}px; display: block`;
|
|
66
66
|
}
|
|
67
|
-
closeButtonPos = `right:
|
|
67
|
+
closeButtonPos = `right: 0.5rem; top: calc(${y2}px + 0.25rem)`;
|
|
68
68
|
} else {
|
|
69
69
|
let myRect = null;
|
|
70
70
|
if (!fresh) {
|
|
@@ -311,7 +311,7 @@ function execute_action(e, operation, index) {
|
|
|
311
311
|
if (false)
|
|
312
312
|
showMenu(rect, operation.grid);
|
|
313
313
|
else
|
|
314
|
-
showGridMenu(rect, operation.grid);
|
|
314
|
+
showGridMenu(rect, operation.grid, operation.caption ?? "");
|
|
315
315
|
} else if (operation.menu) {
|
|
316
316
|
showMenu(rect, operation.menu);
|
|
317
317
|
}
|
|
@@ -408,18 +408,16 @@ function isOperationDisabled(operation) {
|
|
|
408
408
|
class=" bg-white dark:bg-stone-800
|
|
409
409
|
text-stone-800 dark:text-stone-400 rounded-lg border
|
|
410
410
|
border-stone-200 dark:border-stone-700 shadow-md
|
|
411
|
-
z-40 fixed min-w-60 max-h-screen overflow-y-auto"
|
|
411
|
+
z-40 fixed min-w-60 max-h-screen overflow-y-auto overscroll-contain"
|
|
412
412
|
style={css_position}
|
|
413
|
+
visible={visible}
|
|
413
414
|
bind:this={menu_root}>
|
|
414
415
|
|
|
415
416
|
{#if closeButtonPos}
|
|
416
417
|
<button class=" fixed w-6 h-6 flex items-center justify-center
|
|
417
|
-
|
|
418
|
-
focus:outline-none font-medium rounded-full text-sm text-center
|
|
419
|
-
dark:text-stone-500 dark:bg-stone-700/80 dark:hover:bg-stone-700
|
|
420
|
-
focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800"
|
|
418
|
+
focus:outline-none font-medium text-sm text-center"
|
|
421
419
|
style={closeButtonPos}
|
|
422
|
-
on:click={ hide }>
|
|
420
|
+
on:click={ hide }> <!--focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800 rounded-full text-stone-500 bg-stone-200/70 hover:bg-stone-200 dark:text-stone-500 dark:bg-stone-700/80 dark:hover:bg-stone-700 -->
|
|
423
421
|
<Icon component={FaTimes} s="md"/>
|
|
424
422
|
</button>
|
|
425
423
|
{/if}
|
|
@@ -443,7 +441,7 @@ function isOperationDisabled(operation) {
|
|
|
443
441
|
{@const active = calculateBackground(isFocused || isOperationActivated(operation), false)}
|
|
444
442
|
{@const has_submenu = operation.menu !== undefined && operation.menu.length > 0}
|
|
445
443
|
|
|
446
|
-
<button class="block
|
|
444
|
+
<button class="block w-full pr-4 text-left flex flex-row cursor-context-menu {active} focus:outline-none items-center"
|
|
447
445
|
id={menu_item_id}
|
|
448
446
|
bind:this={menu_items[index]}
|
|
449
447
|
on:click|stopPropagation={(e) => { execute_action(e, operation, index) } }
|
|
@@ -485,4 +483,11 @@ function isOperationDisabled(operation) {
|
|
|
485
483
|
</button>
|
|
486
484
|
{/if}
|
|
487
485
|
{/each}
|
|
488
|
-
</div>
|
|
486
|
+
</div>
|
|
487
|
+
|
|
488
|
+
<style>
|
|
489
|
+
:global(body:has(#__hd_svelte_contextmenu[visible="true"]))
|
|
490
|
+
{
|
|
491
|
+
overflow: hidden;
|
|
492
|
+
}
|
|
493
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<svelte:options accessors={true}/>
|
|
2
|
-
<script>import { tick, afterUpdate } from "svelte";
|
|
2
|
+
<script>import { tick, afterUpdate, onMount } from "svelte";
|
|
3
3
|
import Pallete_row from "./palette.row.svelte";
|
|
4
4
|
import { createEventDispatcher } from "svelte";
|
|
5
5
|
import Icon from "../../icon.svelte";
|
|
@@ -38,16 +38,32 @@ afterUpdate(
|
|
|
38
38
|
/*isToolbox && */
|
|
39
39
|
visible && paletteElement
|
|
40
40
|
) {
|
|
41
|
-
|
|
42
|
-
if (
|
|
43
|
-
layoutRoot = document.getElementById("app");
|
|
44
|
-
if (!!layoutRoot && paletteElement.parentElement != layoutRoot) {
|
|
41
|
+
const layoutRoot = getLayoutElement();
|
|
42
|
+
if (layoutRoot && paletteElement.parentElement != layoutRoot) {
|
|
45
43
|
await tick();
|
|
46
44
|
layoutRoot.appendChild(paletteElement);
|
|
47
45
|
}
|
|
48
46
|
}
|
|
49
47
|
}
|
|
50
48
|
);
|
|
49
|
+
onMount(
|
|
50
|
+
() => {
|
|
51
|
+
return () => {
|
|
52
|
+
if (paletteElement) {
|
|
53
|
+
const layoutRoot = getLayoutElement();
|
|
54
|
+
visible = false;
|
|
55
|
+
if (layoutRoot && paletteElement.parentElement == layoutRoot)
|
|
56
|
+
layoutRoot.removeChild(paletteElement);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
function getLayoutElement() {
|
|
62
|
+
let layoutRoot = document.getElementById("__hd_svelte_layout_root");
|
|
63
|
+
if (!layoutRoot)
|
|
64
|
+
layoutRoot = document.getElementById("app");
|
|
65
|
+
return layoutRoot;
|
|
66
|
+
}
|
|
51
67
|
let closeButtonPos = "";
|
|
52
68
|
export function show(x, y, up = false) {
|
|
53
69
|
isToolbox = false;
|
|
@@ -60,7 +76,8 @@ export function show(x, y, up = false) {
|
|
|
60
76
|
if (isDeviceSmallerThan("sm")) {
|
|
61
77
|
setTimeout(() => {
|
|
62
78
|
const rect = paletteElement.getBoundingClientRect();
|
|
63
|
-
closeButtonPos = `right:
|
|
79
|
+
closeButtonPos = `right: 0.5rem; top: 0.25rem`;
|
|
80
|
+
console.log("closeButtonPos", closeButtonPos);
|
|
64
81
|
}, 0);
|
|
65
82
|
}
|
|
66
83
|
}
|
|
@@ -297,51 +314,53 @@ function isRowActive(cmd) {
|
|
|
297
314
|
{:else}
|
|
298
315
|
<!--div hidden={!visible}-->
|
|
299
316
|
|
|
300
|
-
{#if visible && closeButtonPos}
|
|
301
|
-
{#key closeButtonPos}
|
|
302
|
-
<button class=" fixed w-6 h-6 flex items-center justify-center
|
|
303
|
-
text-stone-500 bg-stone-200/70 hover:bg-stone-200
|
|
304
|
-
focus:outline-none font-medium rounded-full text-sm text-center
|
|
305
|
-
dark:text-stone-500 dark:bg-stone-700/80 dark:hover:bg-stone-700
|
|
306
|
-
focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800"
|
|
307
|
-
style={closeButtonPos}
|
|
308
|
-
on:mousedown={buttonMousedown}
|
|
309
|
-
on:click={ () => hide() }>
|
|
310
|
-
<Icon component={FaTimes} s="md"/>
|
|
311
|
-
</button>
|
|
312
|
-
{/key}
|
|
313
|
-
{/if}
|
|
314
|
-
|
|
315
317
|
<div hidden={!visible}
|
|
316
|
-
class="bg-white dark:bg-stone-800 text-stone-500 dark:text-stone-400 rounded-lg border border-stone-200 dark:border-stone-700 shadow-md
|
|
318
|
+
class=" bg-white dark:bg-stone-800 text-stone-500 dark:text-stone-400 rounded-lg border border-stone-200 dark:border-stone-700 shadow-md
|
|
319
|
+
z-40 fixed"
|
|
317
320
|
id="__hd_FormattingPalette"
|
|
318
321
|
bind:this={paletteElement}
|
|
319
322
|
style={css_style} >
|
|
320
323
|
|
|
321
|
-
|
|
322
|
-
{#
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
{
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
is_highlighted={cmd == current_command}
|
|
333
|
-
on:click={ () => { execute_mouse_click(cmd.on_choice); }}
|
|
334
|
-
on:mousemove={ () => { on_mouse_over(cmd); }}
|
|
335
|
-
on:mousedown={buttonMousedown}
|
|
336
|
-
bind:this={rows[idx]}
|
|
337
|
-
{active}
|
|
338
|
-
/>
|
|
339
|
-
{/if}
|
|
340
|
-
{/each}
|
|
341
|
-
{:else}
|
|
342
|
-
<p class="text-sm text-stone-500">No results</p>
|
|
324
|
+
{#if visible && closeButtonPos}
|
|
325
|
+
{#key closeButtonPos}
|
|
326
|
+
<button class=" text-stone-800 dark:text-stone-400
|
|
327
|
+
fixed w-6 h-6 flex items-center justify-center
|
|
328
|
+
focus:outline-none font-medium text-sm text-center"
|
|
329
|
+
style={closeButtonPos}
|
|
330
|
+
on:mousedown={buttonMousedown}
|
|
331
|
+
on:click={ () => hide() }> <!-- rounded-full text-stone-500 bg-stone-200/70 hover:bg-stone-200 dark:text-stone-500 dark:bg-stone-700/80 dark:hover:bg-stone-700 focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800 -->
|
|
332
|
+
<Icon component={FaTimes} s="md"/>
|
|
333
|
+
</button>
|
|
334
|
+
{/key}
|
|
343
335
|
{/if}
|
|
344
336
|
|
|
337
|
+
<div class="w-full overflow-y-auto overscroll-contain" style="max-height: {max_height_px}px">
|
|
338
|
+
|
|
339
|
+
{#if filtered_commands && filtered_commands.length}
|
|
340
|
+
{#each filtered_commands as cmd, idx }
|
|
341
|
+
{#if cmd.separator}
|
|
342
|
+
{#if idx>0 && idx<filtered_commands.length-1} <!-- not first or last place -->
|
|
343
|
+
<hr class="mx-4 my-1 border-stone-300 dark:border-stone-700"/>
|
|
344
|
+
{/if}
|
|
345
|
+
{:else}
|
|
346
|
+
{@const id = "cpi_" + idx}
|
|
347
|
+
{@const active=isRowActive(cmd)}
|
|
348
|
+
<Pallete_row {id}
|
|
349
|
+
cmd={cmd}
|
|
350
|
+
is_highlighted={cmd == current_command}
|
|
351
|
+
on:click={ () => { execute_mouse_click(cmd.on_choice); }}
|
|
352
|
+
on:mousemove={ () => { on_mouse_over(cmd); }}
|
|
353
|
+
on:mousedown={buttonMousedown}
|
|
354
|
+
bind:this={rows[idx]}
|
|
355
|
+
{active}
|
|
356
|
+
/>
|
|
357
|
+
{/if}
|
|
358
|
+
{/each}
|
|
359
|
+
{:else}
|
|
360
|
+
<p class="text-sm text-stone-500">No results</p>
|
|
361
|
+
{/if}
|
|
362
|
+
</div>
|
|
363
|
+
|
|
345
364
|
</div>
|
|
346
365
|
<!---/div-->
|
|
347
366
|
|
|
@@ -368,7 +368,7 @@ export function toggleSelectAll(e) {
|
|
|
368
368
|
<!--hr class="hidden sm:block w-full"-->
|
|
369
369
|
{/if}
|
|
370
370
|
|
|
371
|
-
<!--div class="w-full h-full overflow-y-auto"-->
|
|
371
|
+
<!--div class="w-full h-full overflow-y-auto overscroll-contain"-->
|
|
372
372
|
|
|
373
373
|
|
|
374
374
|
{#if items && items.length > 0 }
|
package/components/menu.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export declare function showMenu(around: DOMRect | DOMPoint, operations: any, pr
|
|
|
7
7
|
export declare function hideWholeContextMenu(): void;
|
|
8
8
|
export declare function showFloatingToolbar(around: DOMRect | DOMPoint, toolbar: any, props?: {}): Floating_container | null;
|
|
9
9
|
export declare function hideFloatingToolbar(): void;
|
|
10
|
-
export declare function showGridMenu(around: DOMRect | DOMPoint, operations: any): void;
|
|
10
|
+
export declare function showGridMenu(around: DOMRect | DOMPoint, operations: any, label?: string): void;
|
package/components/menu.js
CHANGED
|
@@ -64,6 +64,6 @@ export function hideFloatingToolbar() {
|
|
|
64
64
|
toolbar_component.hide();
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
export function showGridMenu(around, operations) {
|
|
68
|
-
showFloatingToolbar(around, Grid, { operations: operations });
|
|
67
|
+
export function showGridMenu(around, operations, label = '') {
|
|
68
|
+
showFloatingToolbar(around, Grid, { operations: operations, label: label });
|
|
69
69
|
}
|
package/console.svelte
CHANGED
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
|
|
169
169
|
</script>
|
|
170
170
|
|
|
171
|
-
<div class="h-full overflow-y-auto">
|
|
171
|
+
<div class="h-full overflow-y-auto overscroll-contain">
|
|
172
172
|
<button class="fixed right-0 m-2 w-6 h-6 text-stone-200 {protoButtonBorderClass}" on:click={protoChange}>
|
|
173
173
|
<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
174
174
|
<path d="M16 4C14 4 11 5 11 9C11 13 11 15 11 18C11 21 6 23 6 23C6 23 11 25 11 28C11 31 11 35 11 39C11 43 14 44 16 44"/>
|
package/desk.svelte
CHANGED
|
@@ -400,7 +400,7 @@
|
|
|
400
400
|
{sidebar_small_width} sm:w-[320px]
|
|
401
401
|
z-20 overflow-x-hidden">
|
|
402
402
|
|
|
403
|
-
<div class=" bg-stone-50 w-full h-full dark:bg-stone-800 overflow-y-auto py-0 px-0">
|
|
403
|
+
<div class=" bg-stone-50 w-full h-full dark:bg-stone-800 overflow-y-auto overscroll-contain py-0 px-0">
|
|
404
404
|
<Configurable config={layout.sidebar[visible_sidebar]}>
|
|
405
405
|
<div slot='alt'></div>
|
|
406
406
|
</Configurable>
|
|
@@ -442,7 +442,7 @@
|
|
|
442
442
|
{content_top}
|
|
443
443
|
{lg_content_area_horizontal_dim}
|
|
444
444
|
z-0 overflow-x-hidden
|
|
445
|
-
{content_height} sm:overflow-y-auto"
|
|
445
|
+
{content_height} sm:overflow-y-auto sm:overscroll-contain"
|
|
446
446
|
>
|
|
447
447
|
<Configurable config={layout.mainContent} min_h_class="min-h-screen">
|
|
448
448
|
<div slot='alt'></div>
|
package/dialog.svelte
CHANGED
|
@@ -34,10 +34,12 @@ let close_callback = void 0;
|
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
36
|
{#if open}
|
|
37
|
-
<div
|
|
37
|
+
<div id="__hd_svelte_property_dialog_container"
|
|
38
|
+
visible={open}
|
|
39
|
+
class="relative z-30" aria-labelledby="modal-title" role="dialog" aria-modal="true" bind:this={root}>
|
|
38
40
|
<div class="fixed w-screen h-screen inset-0 bg-stone-500 dark:bg-stone-800 bg-opacity-75 dark:bg-opacity-75 transition-opacity"></div>
|
|
39
41
|
|
|
40
|
-
<div class="fixed z-30 inset-0 w-screen overflow-y-auto">
|
|
42
|
+
<div class="fixed z-30 inset-0 w-screen overflow-y-auto overscroll-contain">
|
|
41
43
|
<div class="flex min-h-full items-end justify-center p-1 text-center sm:items-center sm:p-0">
|
|
42
44
|
<div class=" p-2 bg-stone-100 dark:bg-stone-800 rounded-lg shadow-md shadow-stone-500 dark:shadow-black text-left shadow-xl transition-all
|
|
43
45
|
sm:my-8 w-full sm:max-w-lg"> <!-- transform overflow-hidden -->
|
|
@@ -46,4 +48,11 @@ let close_callback = void 0;
|
|
|
46
48
|
</div>
|
|
47
49
|
</div>
|
|
48
50
|
</div>
|
|
49
|
-
{/if}
|
|
51
|
+
{/if}
|
|
52
|
+
|
|
53
|
+
<style>
|
|
54
|
+
:global(body:has(#__hd_svelte_property_dialog_container[visible="true"]))
|
|
55
|
+
{
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
}
|
|
58
|
+
</style>
|
package/modal.svelte
CHANGED
|
@@ -59,7 +59,9 @@ function on_cancel(event) {
|
|
|
59
59
|
</script>
|
|
60
60
|
|
|
61
61
|
{#if open}
|
|
62
|
-
<div
|
|
62
|
+
<div id="__hd_svelte_modal_container"
|
|
63
|
+
visible={open}
|
|
64
|
+
class="relative z-30" aria-labelledby="modal-title" role="dialog" aria-modal="true" bind:this={root}>
|
|
63
65
|
<!--
|
|
64
66
|
Background backdrop, show/hide based on modal state.
|
|
65
67
|
|
|
@@ -72,7 +74,7 @@ function on_cancel(event) {
|
|
|
72
74
|
-->
|
|
73
75
|
<div class="fixed w-screen h-screen inset-0 bg-stone-500 dark:bg-stone-800 bg-opacity-75 dark:bg-opacity-75 transition-opacity"></div>
|
|
74
76
|
|
|
75
|
-
<div class="fixed z-30 inset-0 w-screen overflow-y-auto">
|
|
77
|
+
<div class="fixed z-30 inset-0 w-screen overflow-y-auto overscroll-contain">
|
|
76
78
|
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
|
|
77
79
|
<!--
|
|
78
80
|
Modal panel, show/hide based on modal state.
|
|
@@ -132,4 +134,11 @@ function on_cancel(event) {
|
|
|
132
134
|
</div>
|
|
133
135
|
</div>
|
|
134
136
|
</div>
|
|
135
|
-
{/if}
|
|
137
|
+
{/if}
|
|
138
|
+
|
|
139
|
+
<style>
|
|
140
|
+
:global(body:has(#__hd_svelte_modal_container[visible="true"]))
|
|
141
|
+
{
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
}
|
|
144
|
+
</style>
|
package/operations.svelte
CHANGED
|
@@ -182,7 +182,7 @@ function on_click(e, operation, isDisabled) {
|
|
|
182
182
|
else if (operation.toolbar)
|
|
183
183
|
showFloatingToolbar(rect, operation.toolbar, operation.props ?? {});
|
|
184
184
|
else if (operation.grid)
|
|
185
|
-
showGridMenu(rect, operation.grid);
|
|
185
|
+
showGridMenu(rect, operation.grid, operation.caption ?? "");
|
|
186
186
|
}
|
|
187
187
|
function mousedown(e, operation) {
|
|
188
188
|
e.preventDefault();
|